<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>SAPedia  - 最近更改 [zh]</title>
		<link>https://saoaw.com/Special:RecentChanges</link>
		<description>用这个订阅源跟踪本wiki的最近更改。</description>
		<language>zh</language>
		<generator>MediaWiki 1.45.3</generator>
		<lastBuildDate>Mon, 21 Sep 2026 13:13:56 GMT</lastBuildDate>
		<item>
			<title>MediaWiki:Deployment.json</title>
			<link>https://saoaw.com/index.php?title=MediaWiki:Deployment.json&amp;diff=1101&amp;oldid=1081</link>
			<guid isPermaLink="false">https://saoaw.com/index.php?title=MediaWiki:Deployment.json&amp;diff=1101&amp;oldid=1081</guid>
			<description>&lt;p&gt;chore(auto): update deployment hash (1 file(s) changed)&lt;/p&gt;
&lt;a href=&quot;https://saoaw.com/index.php?title=MediaWiki:Deployment.json&amp;amp;diff=1101&amp;amp;oldid=1081&quot;&gt;显示更改&lt;/a&gt;</description>
			<pubDate>Sun, 30 Aug 2026 04:21:39 GMT</pubDate>
			<dc:creator>Saoutax-ibot</dc:creator>
			<comments>https://saoaw.com/MediaWiki_talk:Deployment.json</comments>
		</item>
		<item>
			<title>MediaWiki:Gadget-interfaceVariantConverter.js</title>
			<link>https://saoaw.com/index.php?title=MediaWiki:Gadget-interfaceVariantConverter.js&amp;diff=1100&amp;oldid=1078</link>
			<guid isPermaLink="false">https://saoaw.com/index.php?title=MediaWiki:Gadget-interfaceVariantConverter.js&amp;diff=1100&amp;oldid=1078</guid>
			<description>&lt;p&gt;Git commit: &lt;a href=&quot;https://github.com/SAPedia/InterfaceCodes/commit/3575ae787b94cecccebb93a082a30874dbbb0c1c&quot; class=&quot;extiw&quot; title=&quot;git:commit/3575ae787b94cecccebb93a082a30874dbbb0c1c&quot;&gt;refactor: replace crypto-js with native crypto&lt;/a&gt; by &lt;a href=&quot;/User:Saoutax&quot; title=&quot;User:Saoutax&quot;&gt;U:Saoutax&lt;/a&gt;, Co-authored-by: Claude&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年8月30日 (日) 12:21的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;第8行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第8行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/* &amp;lt;nowiki&amp;gt; */&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/* &amp;lt;nowiki&amp;gt; */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&quot;use strict&quot;;(()=&amp;gt;{var J=Object.defineProperty,Q=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var _=o=&amp;gt;{throw TypeError(o)};var I=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)=&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c &lt;/del&gt;in o?J(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,{enumerable:!0,configurable:!0,writable:!0,value:l}):o[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;]=l,b=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;)=&amp;gt;{for(var l in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;||(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;={}))U.call(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)&amp;amp;&amp;amp;I(o,l,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;[l]);if(S)for(var l of S(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;))W.call(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)&amp;amp;&amp;amp;I(o,l,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;[l]);return o},M=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;)=&amp;gt;Q(o,Y(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;));var j=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;)=&amp;gt;{var l={};for(var w in o)U.call(o,w)&amp;amp;&amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;.indexOf(w)&amp;lt;0&amp;amp;&amp;amp;(l[w]=o[w]);if(o!=null&amp;amp;&amp;amp;S)for(var w of S(o))&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;.indexOf(w)&amp;lt;0&amp;amp;&amp;amp;W.call(o,w)&amp;amp;&amp;amp;(l[w]=o[w]);return l};var N=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)=&amp;gt;I(o,typeof &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;!=&quot;symbol&quot;?&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;+&quot;&quot;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l),ee=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)=&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;.has(o)||_(&quot;Cannot &quot;+l);var D=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)=&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;.has(o)?_(&quot;Cannot add the same private member more than once&quot;):&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c &lt;/del&gt;instanceof WeakSet?&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;.add(o):&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;.set(o,l);var u=(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,l)=&amp;gt;(ee(o,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,&quot;access private method&quot;),l);$(()=&amp;gt;(async()=&amp;gt;{var r,T,k,L,q,H,F,R,B,G;let{wgPageName:o,wgUserName:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,wgArticleId:l}=mw.config.get([&quot;wgPageName&quot;,&quot;wgUserName&quot;,&quot;wgArticleId&quot;]),w=o.replace(/\/.*?$/,&quot;&quot;),P=new mw.Api,z=b({main:[&quot;zh-cn&quot;,&quot;zh-tw&quot;,&quot;zh-hk&quot;],dependent:{&quot;(main)&quot;:&quot;zh-cn&quot;,&quot;zh-hans&quot;:&quot;zh-cn&quot;,&quot;zh-hant&quot;:&quot;zh-tw&quot;},noteTA:{G1:&quot;MediaWiki&quot;},autoPopulate:!0,useOpenCC:!0,manualAction:{&quot;zh-hk&quot;:d=&amp;gt;d.replaceAll(&quot;户&quot;,&quot;戶&quot;),&quot;zh-tw&quot;:d=&amp;gt;d.replaceAll(&quot;名稱空間&quot;,&quot;命名空間&quot;).replaceAll(&quot;記憶體&quot;,&quot;內存&quot;)},watchlist:&quot;nochange&quot;},window.lr_aivc),A=&quot;&quot;;if(z.autoPopulate)try{A=(await P.get({action:&quot;parse&quot;,assertuser:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,pageid:l,prop:&quot;wikitext&quot;})).parse.wikitext[&quot;*&quot;]}catch(d){}let K=d=&amp;gt;Object.entries(d).map(([g,t])=&amp;gt;`${g}=${t}`).join(&quot;|&quot;),y=d=&amp;gt;d===&quot;(main)&quot;?w:`${w}/${d}`,h={lcMarker:/-{([\s\S]*?)}-/g,lcMarkerEsc:/-\\{([\s\S]*?)}\\-/g,nowiki:/&amp;lt;nowiki&amp;gt;([\s\S]*?)&amp;lt;\/nowiki&amp;gt;/g,link:/\[\[([\s\S]*?)(?:#([\s\S]*?))?(\|[\s\S]*?)?\]\]/g,extLink:/([^[])\[([^[]+?)( [\s\S]+?)?\]([^\]])/g,template:/\{\{([\s\S]*?)\}\}/g,htmlEntity:/&amp;amp;([a-zA-Z0-9#]+);/g,noOCC:/&amp;lt;!--noOCC--&amp;gt;([\s\S]*?)&amp;lt;!--\/noOCC--&amp;gt;/gi},X=d=&amp;gt;{let g=[],t=[],s=e=&amp;gt;t.push(e)-1,i=d;return i=i.replace(h.lcMarker,(e,n)=&amp;gt;`-\\{${n}}\\-`),i=i.replace(h.nowiki,(e,n)=&amp;gt;`&amp;lt;nowiki&amp;gt;${g.push(n)-1}&amp;lt;/nowiki&amp;gt;`),i=i.replace(h.link,(e,n,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,p)=&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;||p?`[[${p?s(n):n}${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;?`#${s(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;)}`:&quot;&quot;}${p!=null?p:&quot;&quot;}]]`:e),i=i.replace(h.extLink,(e,n,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,p,f)=&amp;gt;`${n}[${s(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;)}${p!=null?p:&quot;&quot;}]${f}`),i=i.replace(h.template,(e,n)=&amp;gt;{let[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,...p]=n.split(&quot;|&quot;);return s(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;),`${p.reduce((O,m)=&amp;gt;{let C=m.indexOf(&quot;=&quot;);return C===-1?`${O}|${m}`:`${O}|${s(m.slice(0,C))}=${m.slice(C+1)}`},`{{${t.length-1}`)}}}`}),i=i.replace(h.lcMarkerEsc,(e,n)=&amp;gt;`-\\{${s(n!=null?n:&quot;&quot;)}}\\-`),i=i.replace(h.htmlEntity,(e,n)=&amp;gt;`&amp;amp;${s(n)};`),i=i.replace(h.nowiki,(e,n)=&amp;gt;`&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;${g[n]}&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;`),{replaced:i,mappings:t}},Z=(d,g)=&amp;gt;{let t=[],s=d;return s=s.replace(h.nowiki,(i,e)=&amp;gt;`&amp;lt;nowiki&amp;gt;${t.push(e)-1}&amp;lt;/nowiki&amp;gt;`),s=s.replace(h.htmlEntity,(i,e)=&amp;gt;`&amp;amp;${g[e]};`),s=s.replace(h.template,(i,e)=&amp;gt;{let[n,...&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;]=e.split(&quot;|&quot;);return`${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;.reduce((f,O)=&amp;gt;{let m=O.indexOf(&quot;=&quot;);return m===-1?`${f}|${O}`:`${f}|${g[O.slice(0,m)]}=${O.slice(m+1)}`},`{{${g[n]}`)}}}`}),s=s.replace(h.extLink,(i,e,n,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,p)=&amp;gt;`${e}[${g[n]}${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;!=null?&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;:&quot;&quot;}]${p}`),s=s.replace(h.link,(i,e,n,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;)=&amp;gt;n||&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;?`[[${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;?g[e]:e}${g[n]?`#${g[n]}`:&quot;&quot;}${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;!=null?&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;:&quot;&quot;}]]`:i),s=s.replace(h.nowiki,(i,e)=&amp;gt;`&amp;lt;nowiki&amp;gt;${t[e]}&amp;lt;/nowiki&amp;gt;`),s=s.replace(h.lcMarkerEsc,(i,e)=&amp;gt;{var n;return`-{${(n=g[e])!=null?n:e}}-`}),s};class x extends OO.ui.ProcessDialog{constructor(i){var e=i,{data:t}=e,s=j(e,[&quot;data&quot;]);super(b({data:t},s));D(this,r);this.config=t.config,this.prepopContent=t.prepopContent}initialize(){super.initialize(),this.configPanel=u(this,r,T).call(this),this.confirmPanel=u(this,r,T).call(this),this.ogText=new OO.ui.MultilineTextInputWidget({value:this.prepopContent,autosize:!0}),this.mainVariants=new OO.ui.TextInputWidget({value:this.config.main.join(&quot;;&quot;)}),this.depVariants=new OO.ui.TextInputWidget({value:Object.entries(this.config.dependent).map(([t,s])=&amp;gt;`${t}:${s}`).join(&quot;;&quot;)}),this.noteTAParams=new OO.ui.TextInputWidget({value:K(this.config.noteTA)}),this.occCheckbox=new OO.ui.CheckboxInputWidget({selected:this.config.useOpenCC}),this.configPanel.$element.append(u(this,r,k).call(this,this.ogText,wgULS(&quot;原始内容&quot;,&quot;原始內容&quot;),&quot;top&quot;),u(this,r,k).call(this,this.mainVariants,wgULS(&quot;主要变体&quot;,&quot;主要變体&quot;),&quot;top&quot;),u(this,r,k).call(this,this.depVariants,wgULS(&quot;依赖变体&quot;,&quot;依賴變体&quot;),&quot;top&quot;),u(this,r,k).call(this,this.noteTAParams,wgULS(&quot;NoteTA参数&quot;,&quot;NoteTA參數&quot;),&quot;top&quot;),u(this,r,k).call(this,this.occCheckbox,&quot;使用OpenCC&quot;,&quot;inline&quot;)),this.stackLayout=new OO.ui.StackLayout({items:[this.configPanel,this.confirmPanel]}),this.ogText.connect(this,{resize:&quot;updateSize&quot;}),this.$body.append(this.stackLayout.$element)}getBodyHeight(){return this.stackLayout.getCurrentItem().$element.outerHeight(!0)}getSetupProcess(t){return super.getSetupProcess(t).next(()=&amp;gt;{u(this,r,L).call(this,&quot;config&quot;,this.configPanel)},this)}getReadyProcess(t){return super.getReadyProcess(t).next(()=&amp;gt;{this.ogText.focus()},this)}getActionProcess(t){let i={cancel:()=&amp;gt;this.close({action:t}),continue:async()=&amp;gt;{if(u(this,r,q).call(this),this.config.main.includes(&quot;(main)&quot;))throw new OO.ui.Error(wgULS(&quot;主页面不得作为主要变体&quot;,&quot;主頁面不得作為主要變体&quot;));u(this,r,H).call(this),this.textInputs={},this.confirmPanel.$element.empty(),await u(this,r,R).call(this,this.ogText.getValue()),u(this,r,L).call(this,&quot;confirm&quot;,this.confirmPanel)},back:()=&amp;gt;{u(this,r,L).call(this,&quot;config&quot;,this.configPanel)},submit:async()=&amp;gt;{await u(this,r,G).call(this),this.close({action:t}),mw.notify(&quot;保存成功！&quot;,{title:wgULS(&quot;自动繁简转换工具&quot;,&quot;自動繁簡轉換工具&quot;),type:&quot;success&quot;,tag:&quot;lr-aivc&quot;}),setTimeout(()=&amp;gt;location.reload(),730)}}[t];return i?new OO.ui.Process((async()=&amp;gt;{try{await i()}catch(e){throw e instanceof OO.ui.Error?e:(console.error(&quot;[VariantConverter] Error:&quot;,e),new OO.ui.Error(String(e)))}})(),this):super.getActionProcess(t)}}r=new WeakSet,T=function(){return new OO.ui.PanelLayout({scrollable:!1,expanded:!1,padded:!0})},k=function(t,s,i){return new OO.ui.FieldLayout(t,{label:s,align:i}).$element},L=function(t,s){this.actions.setMode(t),this.stackLayout.setItem(s),this.updateSize()},q=function(){Object.assign(this.config,{main:this.mainVariants.getValue().split(&quot;;&quot;),dependent:Object.fromEntries(this.depVariants.getValue().split(&quot;;&quot;).map(t=&amp;gt;t.split(&quot;:&quot;))),noteTAStr:this.noteTAParams.getValue(),useOpenCC:this.occCheckbox.isSelected(),dependentInv:{}})},H=function(){for(let t of this.config.main)this.config.dependentInv[t]=[t];try{for(let[t,s]of Object.entries(this.config.dependent))this.config.dependentInv[s].push(t)}catch(t){throw console.error(&quot;[VariantConverter] Error: Key not found in dependentInv. Config dump:&quot;,this.config),new OO.ui.Error(wgULS(&quot;依赖变体格式错误，请检查控制台&quot;,&quot;依賴變体格式錯誤，請檢查控制臺&quot;))}},F=function(t,s){var e;let i=new OO.ui.MultilineTextInputWidget({value:s,autosize:!0});if(this.textInputs[t]=i,i.connect(this,{resize:&quot;updateSize&quot;}),this.confirmPanel.$element.append(u(this,r,k).call(this,i,t,&quot;top&quot;)),(e=window==null?void 0:window.InPageEdit)!=null&amp;amp;&amp;amp;e.quickDiff){let n=this.config.dependentInv[t].map(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;=&amp;gt;new OO.ui.ButtonWidget({label:`${wgULS(&quot;对比&quot;,&quot;對比&quot;)}${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;===&quot;(main)&quot;?wgULS(&quot;主页面&quot;,&quot;主頁面&quot;):&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;}`}).on(&quot;click&quot;,()=&amp;gt;window.InPageEdit.quickDiff({fromtitle:y(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;),totext:i.getValue(),pageName:y(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;),isPreview:!0})));this.confirmPanel.$element.append(new OO.ui.FieldLayout(new OO.ui.Widget({content:[new OO.ui.HorizontalLayout({items:n})]})).$element)}},R=async function(t){this.confirmPanel.$element.append(`&amp;lt;p&amp;gt;${wgULS(&quot;请确认以下转换是否正确&quot;,&quot;請確認以下轉換是否正確&quot;)}：&amp;lt;/p&amp;gt;`),this.config.useOpenCC&amp;amp;&amp;amp;!window.OpenCC&amp;amp;&amp;amp;await libCachedCode.injectCachedCode(&quot;https://fastly.jsdelivr.net/npm/opencc-js@1.4.1&quot;,&quot;script&quot;);let{replaced:s,mappings:i}=X(t);await Promise.all(this.config.main.filter(e=&amp;gt;e!==&quot;(main)&quot;).map(async e=&amp;gt;{var m,C,E;let n=`{{NoteTA|${this.config.noteTAStr}}}&amp;lt;pre id=&quot;converted&quot;&amp;gt;-{}-${s}&amp;lt;/pre&amp;gt;`,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;=await P.post({action:&quot;parse&quot;,assertuser:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,text:n,contentmodel:&quot;wikitext&quot;,prop:&quot;text&quot;,uselang:e,disablelimitreport:!0,pst:!0}),f=$($.parseHTML(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;.parse.text[&quot;*&quot;])).find(&quot;#converted&quot;).text();this.config.useOpenCC&amp;amp;&amp;amp;(f=u(this,r,B).call(this,f,e));let O=(E=(C=(m=this.config.manualAction)[e])==null?void 0:C.call(m,f))!=null?E:f;u(this,r,F).call(this,e,Z(O,i))}))},B=function(t,s){let i=[],e=t.replace(h.noOCC,(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,p)=&amp;gt;`&amp;lt;!--noOCC--&amp;gt;${i.push(p)-1}&amp;lt;!--/noOCC--&amp;gt;`),n=s.replace(&quot;hans&quot;,&quot;cn&quot;).replace(/zh-(?:han)?/,&quot;&quot;).replace(&quot;tw&quot;,&quot;twp&quot;);return e=OpenCC.Converter({from:n,to:n})(e),e.replace(h.noOCC,(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,p)=&amp;gt;`&amp;lt;!--noOCC--&amp;gt;${i[p]}&amp;lt;!--/noOCC--&amp;gt;`)},G=async function(){let t=(n,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,p)=&amp;gt;({action:&quot;edit&quot;,assertuser:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;,title:n,text:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;,summary:p,tags:&quot;VariantConverter|Automation tool&quot;,watchlist:this.config.watchlist}),s=this.config.main.map(n=&amp;gt;P.postWithToken(&quot;csrf&quot;,t(y(n),this.textInputs[n].getValue(),`自动转换自[[${o}]]`))),i=Object.entries(this.config.dependent).map(([n,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;])=&amp;gt;P.postWithToken(&quot;csrf&quot;,t(y(n),this.textInputs[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;].getValue(),`自动转换自[[${o}]]（同步${&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;}）`))),e=await Promise.allSettled([...s,...i]);console.log(&quot;[VariantConverter] Saved changes&quot;,e)},N(x,&quot;static&quot;,M(b({},OO.ui.ProcessDialog.static),{tagName:&quot;div&quot;,name:&quot;lr-aivc&quot;,title:wgULS(&quot;自动繁简转换工具&quot;,&quot;自動繁簡轉換工具&quot;),actions:[{action:&quot;cancel&quot;,label:&quot;取消&quot;,flags:[&quot;safe&quot;,&quot;close&quot;,&quot;destructive&quot;],modes:&quot;config&quot;},{action:&quot;continue&quot;,label:wgULS(&quot;继续&quot;,&quot;繼續&quot;),flags:[&quot;primary&quot;,&quot;progressive&quot;],modes:&quot;config&quot;},{action:&quot;back&quot;,label:&quot;返回&quot;,flags:[&quot;safe&quot;,&quot;back&quot;],modes:&quot;confirm&quot;},{action:&quot;submit&quot;,label:wgULS(&quot;确认&quot;,&quot;確認&quot;),flags:[&quot;primary&quot;,&quot;progressive&quot;],modes:&quot;confirm&quot;}]}));let v=new OO.ui.WindowManager;$(document.body).append(v.$element);let V=new x({size:&quot;large&quot;,data:{config:z,prepopContent:A}});v.addWindows([V]),$(mw.util.addPortletLink(&quot;p-cactions&quot;,&quot;#&quot;,wgULS(&quot;自动繁简转换&quot;,&quot;自動繁簡轉換&quot;),&quot;ca-VariantConverter&quot;,wgULS(&quot;自动同步界面消息的繁简版本&quot;,&quot;自動同步介面消息的繁簡版本&quot;))).on(&quot;click&quot;,d=&amp;gt;{d.preventDefault(),$(&quot;#mw-notification-area&quot;).appendTo(document.body),v.openWindow(V)})})());})();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&quot;use strict&quot;;(()=&amp;gt;{var J=Object.defineProperty,Q=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var _=o=&amp;gt;{throw TypeError(o)};var I=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)=&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;in o?J(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,{enumerable:!0,configurable:!0,writable:!0,value:l}):o[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;]=l,b=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;)=&amp;gt;{for(var l in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;||(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;={}))U.call(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)&amp;amp;&amp;amp;I(o,l,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;[l]);if(S)for(var l of S(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;))W.call(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)&amp;amp;&amp;amp;I(o,l,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;[l]);return o},M=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;)=&amp;gt;Q(o,Y(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;));var j=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;)=&amp;gt;{var l={};for(var w in o)U.call(o,w)&amp;amp;&amp;amp;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;.indexOf(w)&amp;lt;0&amp;amp;&amp;amp;(l[w]=o[w]);if(o!=null&amp;amp;&amp;amp;S)for(var w of S(o))&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;.indexOf(w)&amp;lt;0&amp;amp;&amp;amp;W.call(o,w)&amp;amp;&amp;amp;(l[w]=o[w]);return l};var N=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)=&amp;gt;I(o,typeof &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;!=&quot;symbol&quot;?&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;+&quot;&quot;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l),ee=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)=&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;.has(o)||_(&quot;Cannot &quot;+l);var D=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)=&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;.has(o)?_(&quot;Cannot add the same private member more than once&quot;):&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;instanceof WeakSet?&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;.add(o):&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;.set(o,l);var u=(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,l)=&amp;gt;(ee(o,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,&quot;access private method&quot;),l);$(()=&amp;gt;(async()=&amp;gt;{var r,T,k,L,q,H,F,R,B,G;let{wgPageName:o,wgUserName:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,wgArticleId:l}=mw.config.get([&quot;wgPageName&quot;,&quot;wgUserName&quot;,&quot;wgArticleId&quot;]),w=o.replace(/\/.*?$/,&quot;&quot;),P=new mw.Api,z=b({main:[&quot;zh-cn&quot;,&quot;zh-tw&quot;,&quot;zh-hk&quot;],dependent:{&quot;(main)&quot;:&quot;zh-cn&quot;,&quot;zh-hans&quot;:&quot;zh-cn&quot;,&quot;zh-hant&quot;:&quot;zh-tw&quot;},noteTA:{G1:&quot;MediaWiki&quot;},autoPopulate:!0,useOpenCC:!0,manualAction:{&quot;zh-hk&quot;:d=&amp;gt;d.replaceAll(&quot;户&quot;,&quot;戶&quot;),&quot;zh-tw&quot;:d=&amp;gt;d.replaceAll(&quot;名稱空間&quot;,&quot;命名空間&quot;).replaceAll(&quot;記憶體&quot;,&quot;內存&quot;)},watchlist:&quot;nochange&quot;},window.lr_aivc),A=&quot;&quot;;if(z.autoPopulate)try{A=(await P.get({action:&quot;parse&quot;,assertuser:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,pageid:l,prop:&quot;wikitext&quot;})).parse.wikitext[&quot;*&quot;]}catch(d){}let K=d=&amp;gt;Object.entries(d).map(([g,t])=&amp;gt;`${g}=${t}`).join(&quot;|&quot;),y=d=&amp;gt;d===&quot;(main)&quot;?w:`${w}/${d}`,h={lcMarker:/-{([\s\S]*?)}-/g,lcMarkerEsc:/-\\{([\s\S]*?)}\\-/g,nowiki:/&amp;lt;nowiki&amp;gt;([\s\S]*?)&amp;lt;\/nowiki&amp;gt;/g,link:/\[\[([\s\S]*?)(?:#([\s\S]*?))?(\|[\s\S]*?)?\]\]/g,extLink:/([^[])\[([^[]+?)( [\s\S]+?)?\]([^\]])/g,template:/\{\{([\s\S]*?)\}\}/g,htmlEntity:/&amp;amp;([a-zA-Z0-9#]+);/g,noOCC:/&amp;lt;!--noOCC--&amp;gt;([\s\S]*?)&amp;lt;!--\/noOCC--&amp;gt;/gi},X=d=&amp;gt;{let g=[],t=[],s=e=&amp;gt;t.push(e)-1,i=d;return i=i.replace(h.lcMarker,(e,n)=&amp;gt;`-\\{${n}}\\-`),i=i.replace(h.nowiki,(e,n)=&amp;gt;`&amp;lt;nowiki&amp;gt;${g.push(n)-1}&amp;lt;/nowiki&amp;gt;`),i=i.replace(h.link,(e,n,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,p)=&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;||p?`[[${p?s(n):n}${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;?`#${s(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;)}`:&quot;&quot;}${p!=null?p:&quot;&quot;}]]`:e),i=i.replace(h.extLink,(e,n,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,p,f)=&amp;gt;`${n}[${s(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;)}${p!=null?p:&quot;&quot;}]${f}`),i=i.replace(h.template,(e,n)=&amp;gt;{let[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,...p]=n.split(&quot;|&quot;);return s(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;),`${p.reduce((O,m)=&amp;gt;{let C=m.indexOf(&quot;=&quot;);return C===-1?`${O}|${m}`:`${O}|${s(m.slice(0,C))}=${m.slice(C+1)}`},`{{${t.length-1}`)}}}`}),i=i.replace(h.lcMarkerEsc,(e,n)=&amp;gt;`-\\{${s(n!=null?n:&quot;&quot;)}}\\-`),i=i.replace(h.htmlEntity,(e,n)=&amp;gt;`&amp;amp;${s(n)};`),i=i.replace(h.nowiki,(e,n)=&amp;gt;`&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;${g[n]}&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;`),{replaced:i,mappings:t}},Z=(d,g)=&amp;gt;{let t=[],s=d;return s=s.replace(h.nowiki,(i,e)=&amp;gt;`&amp;lt;nowiki&amp;gt;${t.push(e)-1}&amp;lt;/nowiki&amp;gt;`),s=s.replace(h.htmlEntity,(i,e)=&amp;gt;`&amp;amp;${g[e]};`),s=s.replace(h.template,(i,e)=&amp;gt;{let[n,...&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;]=e.split(&quot;|&quot;);return`${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;.reduce((f,O)=&amp;gt;{let m=O.indexOf(&quot;=&quot;);return m===-1?`${f}|${O}`:`${f}|${g[O.slice(0,m)]}=${O.slice(m+1)}`},`{{${g[n]}`)}}}`}),s=s.replace(h.extLink,(i,e,n,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,p)=&amp;gt;`${e}[${g[n]}${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;!=null?&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;:&quot;&quot;}]${p}`),s=s.replace(h.link,(i,e,n,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;)=&amp;gt;n||&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;?`[[${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;?g[e]:e}${g[n]?`#${g[n]}`:&quot;&quot;}${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;!=null?&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;:&quot;&quot;}]]`:i),s=s.replace(h.nowiki,(i,e)=&amp;gt;`&amp;lt;nowiki&amp;gt;${t[e]}&amp;lt;/nowiki&amp;gt;`),s=s.replace(h.lcMarkerEsc,(i,e)=&amp;gt;{var n;return`-{${(n=g[e])!=null?n:e}}-`}),s};class x extends OO.ui.ProcessDialog{constructor(i){var e=i,{data:t}=e,s=j(e,[&quot;data&quot;]);super(b({data:t},s));D(this,r);this.config=t.config,this.prepopContent=t.prepopContent}initialize(){super.initialize(),this.configPanel=u(this,r,T).call(this),this.confirmPanel=u(this,r,T).call(this),this.ogText=new OO.ui.MultilineTextInputWidget({value:this.prepopContent,autosize:!0}),this.mainVariants=new OO.ui.TextInputWidget({value:this.config.main.join(&quot;;&quot;)}),this.depVariants=new OO.ui.TextInputWidget({value:Object.entries(this.config.dependent).map(([t,s])=&amp;gt;`${t}:${s}`).join(&quot;;&quot;)}),this.noteTAParams=new OO.ui.TextInputWidget({value:K(this.config.noteTA)}),this.occCheckbox=new OO.ui.CheckboxInputWidget({selected:this.config.useOpenCC}),this.configPanel.$element.append(u(this,r,k).call(this,this.ogText,wgULS(&quot;原始内容&quot;,&quot;原始內容&quot;),&quot;top&quot;),u(this,r,k).call(this,this.mainVariants,wgULS(&quot;主要变体&quot;,&quot;主要變体&quot;),&quot;top&quot;),u(this,r,k).call(this,this.depVariants,wgULS(&quot;依赖变体&quot;,&quot;依賴變体&quot;),&quot;top&quot;),u(this,r,k).call(this,this.noteTAParams,wgULS(&quot;NoteTA参数&quot;,&quot;NoteTA參數&quot;),&quot;top&quot;),u(this,r,k).call(this,this.occCheckbox,&quot;使用OpenCC&quot;,&quot;inline&quot;)),this.stackLayout=new OO.ui.StackLayout({items:[this.configPanel,this.confirmPanel]}),this.ogText.connect(this,{resize:&quot;updateSize&quot;}),this.$body.append(this.stackLayout.$element)}getBodyHeight(){return this.stackLayout.getCurrentItem().$element.outerHeight(!0)}getSetupProcess(t){return super.getSetupProcess(t).next(()=&amp;gt;{u(this,r,L).call(this,&quot;config&quot;,this.configPanel)},this)}getReadyProcess(t){return super.getReadyProcess(t).next(()=&amp;gt;{this.ogText.focus()},this)}getActionProcess(t){let i={cancel:()=&amp;gt;this.close({action:t}),continue:async()=&amp;gt;{if(u(this,r,q).call(this),this.config.main.includes(&quot;(main)&quot;))throw new OO.ui.Error(wgULS(&quot;主页面不得作为主要变体&quot;,&quot;主頁面不得作為主要變体&quot;));u(this,r,H).call(this),this.textInputs={},this.confirmPanel.$element.empty(),await u(this,r,R).call(this,this.ogText.getValue()),u(this,r,L).call(this,&quot;confirm&quot;,this.confirmPanel)},back:()=&amp;gt;{u(this,r,L).call(this,&quot;config&quot;,this.configPanel)},submit:async()=&amp;gt;{await u(this,r,G).call(this),this.close({action:t}),mw.notify(&quot;保存成功！&quot;,{title:wgULS(&quot;自动繁简转换工具&quot;,&quot;自動繁簡轉換工具&quot;),type:&quot;success&quot;,tag:&quot;lr-aivc&quot;}),setTimeout(()=&amp;gt;location.reload(),730)}}[t];return i?new OO.ui.Process((async()=&amp;gt;{try{await i()}catch(e){throw e instanceof OO.ui.Error?e:(console.error(&quot;[VariantConverter] Error:&quot;,e),new OO.ui.Error(String(e)))}})(),this):super.getActionProcess(t)}}r=new WeakSet,T=function(){return new OO.ui.PanelLayout({scrollable:!1,expanded:!1,padded:!0})},k=function(t,s,i){return new OO.ui.FieldLayout(t,{label:s,align:i}).$element},L=function(t,s){this.actions.setMode(t),this.stackLayout.setItem(s),this.updateSize()},q=function(){Object.assign(this.config,{main:this.mainVariants.getValue().split(&quot;;&quot;),dependent:Object.fromEntries(this.depVariants.getValue().split(&quot;;&quot;).map(t=&amp;gt;t.split(&quot;:&quot;))),noteTAStr:this.noteTAParams.getValue(),useOpenCC:this.occCheckbox.isSelected(),dependentInv:{}})},H=function(){for(let t of this.config.main)this.config.dependentInv[t]=[t];try{for(let[t,s]of Object.entries(this.config.dependent))this.config.dependentInv[s].push(t)}catch(t){throw console.error(&quot;[VariantConverter] Error: Key not found in dependentInv. Config dump:&quot;,this.config),new OO.ui.Error(wgULS(&quot;依赖变体格式错误，请检查控制台&quot;,&quot;依賴變体格式錯誤，請檢查控制臺&quot;))}},F=function(t,s){var e;let i=new OO.ui.MultilineTextInputWidget({value:s,autosize:!0});if(this.textInputs[t]=i,i.connect(this,{resize:&quot;updateSize&quot;}),this.confirmPanel.$element.append(u(this,r,k).call(this,i,t,&quot;top&quot;)),(e=window==null?void 0:window.InPageEdit)!=null&amp;amp;&amp;amp;e.quickDiff){let n=this.config.dependentInv[t].map(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;=&amp;gt;new OO.ui.ButtonWidget({label:`${wgULS(&quot;对比&quot;,&quot;對比&quot;)}${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;===&quot;(main)&quot;?wgULS(&quot;主页面&quot;,&quot;主頁面&quot;):&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;}`}).on(&quot;click&quot;,()=&amp;gt;window.InPageEdit.quickDiff({fromtitle:y(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;),totext:i.getValue(),pageName:y(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;),isPreview:!0})));this.confirmPanel.$element.append(new OO.ui.FieldLayout(new OO.ui.Widget({content:[new OO.ui.HorizontalLayout({items:n})]})).$element)}},R=async function(t){this.confirmPanel.$element.append(`&amp;lt;p&amp;gt;${wgULS(&quot;请确认以下转换是否正确&quot;,&quot;請確認以下轉換是否正確&quot;)}：&amp;lt;/p&amp;gt;`),this.config.useOpenCC&amp;amp;&amp;amp;!window.OpenCC&amp;amp;&amp;amp;await libCachedCode.injectCachedCode(&quot;https://fastly.jsdelivr.net/npm/opencc-js@1.4.1&quot;,&quot;script&quot;);let{replaced:s,mappings:i}=X(t);await Promise.all(this.config.main.filter(e=&amp;gt;e!==&quot;(main)&quot;).map(async e=&amp;gt;{var m,C,E;let n=`{{NoteTA|${this.config.noteTAStr}}}&amp;lt;pre id=&quot;converted&quot;&amp;gt;-{}-${s}&amp;lt;/pre&amp;gt;`,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;=await P.post({action:&quot;parse&quot;,assertuser:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,text:n,contentmodel:&quot;wikitext&quot;,prop:&quot;text&quot;,uselang:e,disablelimitreport:!0,pst:!0}),f=$($.parseHTML(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;.parse.text[&quot;*&quot;])).find(&quot;#converted&quot;).text();this.config.useOpenCC&amp;amp;&amp;amp;(f=u(this,r,B).call(this,f,e));let O=(E=(C=(m=this.config.manualAction)[e])==null?void 0:C.call(m,f))!=null?E:f;u(this,r,F).call(this,e,Z(O,i))}))},B=function(t,s){let i=[],e=t.replace(h.noOCC,(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,p)=&amp;gt;`&amp;lt;!--noOCC--&amp;gt;${i.push(p)-1}&amp;lt;!--/noOCC--&amp;gt;`),n=s.replace(&quot;hans&quot;,&quot;cn&quot;).replace(/zh-(?:han)?/,&quot;&quot;).replace(&quot;tw&quot;,&quot;twp&quot;);return e=OpenCC.Converter({from:n,to:n})(e),e.replace(h.noOCC,(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,p)=&amp;gt;`&amp;lt;!--noOCC--&amp;gt;${i[p]}&amp;lt;!--/noOCC--&amp;gt;`)},G=async function(){let t=(n,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,p)=&amp;gt;({action:&quot;edit&quot;,assertuser:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/ins&gt;,title:n,text:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;,summary:p,tags:&quot;VariantConverter|Automation tool&quot;,watchlist:this.config.watchlist}),s=this.config.main.map(n=&amp;gt;P.postWithToken(&quot;csrf&quot;,t(y(n),this.textInputs[n].getValue(),`自动转换自[[${o}]]`))),i=Object.entries(this.config.dependent).map(([n,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;])=&amp;gt;P.postWithToken(&quot;csrf&quot;,t(y(n),this.textInputs[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;].getValue(),`自动转换自[[${o}]]（同步${&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/ins&gt;}）`))),e=await Promise.allSettled([...s,...i]);console.log(&quot;[VariantConverter] Saved changes&quot;,e)},N(x,&quot;static&quot;,M(b({},OO.ui.ProcessDialog.static),{tagName:&quot;div&quot;,name:&quot;lr-aivc&quot;,title:wgULS(&quot;自动繁简转换工具&quot;,&quot;自動繁簡轉換工具&quot;),actions:[{action:&quot;cancel&quot;,label:&quot;取消&quot;,flags:[&quot;safe&quot;,&quot;close&quot;,&quot;destructive&quot;],modes:&quot;config&quot;},{action:&quot;continue&quot;,label:wgULS(&quot;继续&quot;,&quot;繼續&quot;),flags:[&quot;primary&quot;,&quot;progressive&quot;],modes:&quot;config&quot;},{action:&quot;back&quot;,label:&quot;返回&quot;,flags:[&quot;safe&quot;,&quot;back&quot;],modes:&quot;confirm&quot;},{action:&quot;submit&quot;,label:wgULS(&quot;确认&quot;,&quot;確認&quot;),flags:[&quot;primary&quot;,&quot;progressive&quot;],modes:&quot;confirm&quot;}]}));let v=new OO.ui.WindowManager;$(document.body).append(v.$element);let V=new x({size:&quot;large&quot;,data:{config:z,prepopContent:A}});v.addWindows([V]),$(mw.util.addPortletLink(&quot;p-cactions&quot;,&quot;#&quot;,wgULS(&quot;自动繁简转换&quot;,&quot;自動繁簡轉換&quot;),&quot;ca-VariantConverter&quot;,wgULS(&quot;自动同步界面消息的繁简版本&quot;,&quot;自動同步介面消息的繁簡版本&quot;))).on(&quot;click&quot;,d=&amp;gt;{d.preventDefault(),$(&quot;#mw-notification-area&quot;).appendTo(document.body),v.openWindow(V)})})());})();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/* &amp;lt;/nowiki&amp;gt; */&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/* &amp;lt;/nowiki&amp;gt; */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 30 Aug 2026 04:21:39 GMT</pubDate>
			<dc:creator>Saoutax-ibot</dc:creator>
			<comments>https://saoaw.com/MediaWiki_talk:Gadget-interfaceVariantConverter.js</comments>
		</item>
</channel></rss>