wikiparser-node 1.0.1-b → 1.0.2-b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,37 +1,37 @@
1
- (()=>{(()=>{"use strict";var Vt={891:(Y,b,t)=>{t.d(b,{default:()=>M});const S={minConfig:t(166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config,excludes:[]}},msg(C,P=""){var f,l;return((l=(f=this.i18n)==null?void 0:f[C])!=null?l:C).replace("$1",P)},normalizeTitle(C,P=0,f=!1,l=S.getConfig(),n=!1,i=!1,d=!1){const{Title:r}=t(599);if(n)return new r(C,P,l,i,d);const{Token:o}=t(541),s=this.run(()=>new o(C,l).parseOnce(0,f).parseOnce());return new r(String(s),P,l,i,d)},parse(C,P,f=S.MAX_STAGE,l=S.getConfig()){const{Token:n}=t(541);let i;return this.run(()=>{i=new n(C.replace(/[\0\x7F]/gu,""),l);try{i.parse(f,P)}catch(d){}}),i},run(C){return C()}},I={},R=new Set(["MAX_STAGE","minConfig"]),W=new Set(["config","normalizeTitle","parse"]);for(const C in S)R.has(C)?I[C]={enumerable:!1,writable:!1}:W.has(C)||(I[C]={enumerable:!1});Object.defineProperties(S,I),typeof self=="object"?Object.assign(self,{Parser:S}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:S});const M=S},599:(Y,b,t)=>{t.r(b),t.d(b,{Title:()=>C});var S=t(467),I=t(891),R=Object.defineProperty,W=(P,f,l)=>f in P?R(P,f,{enumerable:!0,configurable:!0,writable:!0,value:l}):P[f]=l,M=(P,f,l)=>(W(P,typeof f!="symbol"?f+"":f,l),l);class C{constructor(f,l=0,n=I.default.getConfig(),i=!1,d=!1){M(this,"valid"),M(this,"ns"),M(this,"fragment"),M(this,"encoded",!1);var r;const{namespaces:o,nsid:s}=n;let h=(r=o[l])!=null?r:"";if(f=(0,S.m9)(f),i&&f.includes("%"))try{const v=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(f);f=decodeURIComponent(f),this.encoded=v}catch(v){}f=f.replace(/_/gu," ").trim(),f.startsWith(":")&&(h="",f=f.slice(1).trim());const p=f.split(":");if(p.length>1){const v=s[p[0].trim().toLowerCase()],F=v===void 0?void 0:o[v];F!==void 0&&(h=F,f=p.slice(1).join(":").trim())}this.ns=s[h.toLowerCase()];const E=f.indexOf("#");let _;E!==-1&&(_=f.slice(E+1).trim(),f=f.slice(0,E).trim()),this.valid=!!(f||d&&_!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(f),this.fragment=_}}},959:(Y,b,t)=>{t.d(b,{a:()=>W});var S=Object.defineProperty,I=(M,C,P)=>C in M?S(M,C,{enumerable:!0,configurable:!0,writable:!0,value:P}):M[C]=P,R=(M,C,P)=>(I(M,typeof C!="symbol"?C+"":C,P),P);const W=M=>{class C extends M{text(){return""}}return R(C,"hidden",!0),C}},313:(Y,b,t)=>{t.r(b),t.d(b,{parseBraces:()=>$});var S=t(467),I=t(891),R=t(485),W=t(169),M=t(541),C=Object.defineProperty,P=(g,e,T)=>e in g?C(g,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):g[e]=T,f=(g,e,T)=>(P(g,typeof e!="symbol"?e+"":e,T),T);class l extends M.Token{constructor(e,T,c=I.default.getConfig(),D=[]){super(void 0,c,D),f(this,"type","parameter");const U=new M.Token(typeof e=="number"?void 0:e,c,D,{}),K=new M.Token(T,c,D);U.type="parameter-key",K.type="parameter-value",this.append(U,K.setAttribute("stage",2))}get anon(){return this.firstChild.length===0}afterBuild(){const e=new Set(["comment","noinclude","include"]);if(!this.anon){const T=this.firstChild.toString(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),{parentNode:c}=this;this.setAttribute("name",T),c&&c.getArgs(T,!1,!1).add(this)}}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(e){return this.anon||e===1?0:1}lint(e=this.getAbsoluteIndex()){var T;const c=super.lint(e),{firstChild:D}=this,U=(T=new RegExp(`https?://${S._X}${S.Qk}$`,"iu").exec(D.toString(new Set(["comment","noinclude","include"]))))==null?void 0:T[0];if(U&&new URL(U).search){const K=(0,W.D)(D,{start:e},"unescaped query string in an anonymous parameter");c.push({...K,startIndex:K.endIndex,endIndex:K.endIndex+1,startLine:K.endLine,startCol:K.endCol,endCol:K.endCol+1})}return c}print(){return super.print({sep:this.anon?"":"="})}}var n=t(34),i=t(669),d=Object.defineProperty,r=(g,e,T)=>e in g?d(g,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):g[e]=T,o=(g,e,T)=>(r(g,typeof e!="symbol"?e+"":e,T),T),s=(g,e,T)=>{if(!e.has(g))throw TypeError("Cannot "+T)},h=(g,e,T)=>(s(g,e,"read from private field"),T?T.call(g):e.get(g)),p=(g,e,T)=>{if(e.has(g))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(g):e.set(g,T)},E=(g,e,T,c)=>(s(g,e,"write to private field"),c?c.call(g,T):e.set(g,T),T),_=(g,e,T)=>(s(g,e,"access private method"),T),v,F,B,z,Q,L;class w extends M.Token{constructor(e,T,c=I.default.getConfig(),D=[]){var U,K;super(void 0,c,D,{}),p(this,Q),o(this,"type","template"),o(this,"modifier",""),p(this,v,void 0),p(this,F,!0),p(this,B,!1),p(this,z,new Map);const{parserFunction:[G,V]}=c,X=(U=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:U[0];if(X)this.setAttribute("modifier",X),e=e.slice(X.length);else if(e.includes(":")){const[et,...tt]=e.split(":"),[nt]=/^(?:\s|\0\d+c\x7F)*/u.exec((K=tt[0])!=null?K:"");this.setModifier(`${et}:${nt}`)&&(e=tt.join(":").slice(nt.length))}if(e.includes(":")||T.length===0&&!h(this,B)){const[et,...tt]=e.split(":"),nt=(0,S.PN)(et),k=nt.trim(),it=V.includes(k),q=G[k.toLowerCase()];if(!(tt.length>0&&/\s$/u.test(nt))&&(it||q)){this.setAttribute("name",q!=null?q:k.toLowerCase()).type="magic-word";const st=new RegExp(`^\\s*${k}\\s*$`,it?"u":"iu"),lt=new i.SyntaxToken(et,st,"magic-word-name",c,D,{});if(super.insertAt(lt),tt.length>0&&T.unshift([tt.join(":")]),this.name==="invoke")for(let dt=0;dt<2;dt++){const ft=T.shift();if(!ft)break;const rt=new n.D(ft.join("="),`invoke-${dt?"function":"module"}`,c,D);super.insertAt(rt)}}}if(this.type==="template"){const et=(0,S.PN)((0,S.m9)(e)).split("#")[0].trim();if(!et||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(et))throw D.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${(0,S.jq)(et)}`);const tt=new n.D(e,"template-name",c,D,{});super.insertAt(tt)}const J=this.isTemplate();let j=1;for(let et=0;et<T.length;et++){const tt=T[et];!J&&!(this.name==="switch"&&et>0)&&(tt[0]=tt.join("="),tt.length=1),tt.length===1&&(tt.unshift(j),j++),this.insertAt(new l(...tt,c,D))}}setModifier(e){const{parserFunction:[,,T,c]}=this.getAttribute("config"),D=(0,S.PN)(e).trim();if(e&&!D.endsWith(":"))return!1;const U=D.slice(0,-1).toLowerCase(),K=T.includes(U),G=c.includes(U);return h(this,B)&&K||!h(this,B)&&(G||e==="")||this.length>1&&(K||G||e==="")?(this.setAttribute("modifier",e),E(this,B,K),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){if(this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,"string")),this.isTemplate()){const e=this.type==="template",T=this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828);E(this,v,T.fragment),E(this,F,T.valid)}}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(T=>T.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){const{childNodes:e,length:T,firstChild:c,modifier:D,type:U,name:K}=this;return U==="magic-word"&&K==="vardefine"?"":`{{${D}${U==="magic-word"?`${c.text()}${T===1?"":":"}${(0,S.fL)(e.slice(1),"|")}`:super.text("|")}}}`}getPadding(){return this.modifier.length+2}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){const T=super.lint(e),{type:c,childNodes:D}=this;let U;if(this.isTemplate())h(this,v)!==void 0&&(U={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,W.D)(D[c==="template"?0:1],U,"useless fragment")));else return T;h(this,F)||(U={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,W.D)(D[1],U,"illegal module name")));const K=this.getDuplicatedArgs();return K.length>0&&(U!=null||(U={start:e,...this.getRootNode().posFromIndex(e)}),T.push(...K.flatMap(([,G])=>G).map(G=>(0,W.D)(G,U,"duplicated parameter")))),T}insertAt(e,T=this.length){return super.insertAt(e,T),e.anon?_(this,Q,L).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(e=>e.type==="parameter")}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,T=!1,c=!0){const D=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let U;return h(this,z).has(D)?U=h(this,z).get(D):(U=new Set(this.getAllArgs().filter(({name:K})=>D===K)),h(this,z).set(D,U)),U}getDuplicatedArgs(){return this.isTemplate()?[...h(this,z)].filter(([,{size:e}])=>e>1).map(([e,T])=>[e,[...T]]):[]}getPossibleValues(){const{type:e,name:T,childNodes:c,constructor:{name:D}}=this;if(e==="template")throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let U;switch(T){case"if":case"ifexist":case"ifexpr":case"iferror":U=2;break;case"ifeq":U=3;break;default:throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const K=c.slice(U,U+2).map(({childNodes:[,G]})=>G);for(let G=0;G<K.length;){const{length:V,0:X}=K[G].childNodes.filter(J=>J.text().trim());if(V===0)K.splice(G,1);else if(V>1||X.type!=="magic-word")G++;else try{const J=X.getPossibleValues();K.splice(G,1,...J),G+=J.length}catch(J){G++}}return K}print(){const{childNodes:e,length:T,firstChild:c,modifier:D,type:U}=this;return`<span class="wpb-${U}">{{${D}${U==="magic-word"?`${c.print()}${T===1?"":":"}${(0,S.S0)(e.slice(1),{sep:"|"})}`:(0,S.S0)(e,{sep:"|"})}}}</span>`}}v=new WeakMap,F=new WeakMap,B=new WeakMap,z=new WeakMap,Q=new WeakSet,L=function(g){const e=this.getAnonArgs(),T=typeof g!="number";for(let c=T?e.indexOf(g):g-1;c<e.length;c++){const D=e[c],{name:U}=D,K=String(c+1);U!==K&&this.getArgs(K,!1,!1).add(D.setAttribute("name",K))}};var m=t(465),O=Object.defineProperty,y=(g,e,T)=>e in g?O(g,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):g[e]=T,x=(g,e,T)=>(y(g,typeof e!="symbol"?e+"":e,T),T);class u extends M.Token{constructor(e,T=I.default.getConfig(),c=[]){super(void 0,T,c,{}),x(this,"type","arg");for(let D=0;D<e.length;D++)if(D===0){const U=new n.D(e[D],"arg-name",T,c,{});super.insertAt(U)}else if(D>1){const U=new m.R(e[D],T,c,{});super.insertAt(U)}else{const U=new M.Token(e[D],T,c);U.type="arg-default",super.insertAt(U.setAttribute("stage",2))}}get default(){var e,T;return(T=(e=this.childNodes[1])==null?void 0:e.text())!=null?T:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${(0,S.fL)(this.childNodes.slice(0,2),"|")}}}}`}getPadding(){return 3}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){if(!this.getAttribute("include"))return[(0,W.Y)(this,{start:e},"unexpected template argument")];const{childNodes:[T,c,...D]}=this,U=T.lint(e+3);if(c&&U.push(...c.lint(e+4+String(T).length)),D.length>0){const K={start:e,...this.getRootNode().posFromIndex(e)};U.push(...D.map(G=>{const V=(0,W.D)(G,K,"invisible content inside triple braces"),{startIndex:X,startCol:J}=V;return{...V,startIndex:X-1,startCol:J-1}}))}return U}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}const $=(g,e=I.default.getConfig(),T=[])=>{var c,D,U,K,G,V;const X=`${(c=e.excludes)!=null&&c.includes("heading")?"":"^(\0\\d+c\x7F)*={1,6}|"}\\[\\[|\\{{2,}|-\\{(?!\\{)`,{parserFunction:[,,,J]}=e,j=[],et={"=":`
2
- `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},tt=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]);let nt=new RegExp(X,"gmu"),k=nt.exec(g),it=g.includes("}}"),q;for(;k||q!==void 0&&q<=g.length&&((U=(D=j[j.length-1])==null?void 0:D[0])!=null&&U.startsWith("="));){if(k!=null&&k[1]){const[,{length:ht}]=k;k[0]=k[0].slice(ht),k.index+=ht}const{0:st,index:lt}=k!=null?k:{0:`
3
- `,index:g.length},dt=(K=j.pop())!=null?K:{},{0:ft,index:rt,parts:pt,findEqual:At,pos:$t}=dt,Ct=st==="="&&At;if(st==="]]"||st==="}-")q=lt+2;else if(st===`
4
- `){q=lt+1;const{pos:ht,findEqual:ct}=(G=j[j.length-1])!=null?G:{};if(ht===void 0||ct||(0,S.PN)(g.slice(ht,rt))!==""){const gt=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(g.slice(rt,lt));gt&&(g=`${g.slice(0,rt)}\0${T.length}h\x7F${g.slice(lt)}`,q=rt+4+String(T.length).length,new R.D(gt[1].length,gt.slice(2),e,T))}}else if(st==="|"||Ct)q=lt+1,pt[pt.length-1].push(g.slice($t,lt)),st==="|"&&pt.push([]),dt.pos=q,dt.findEqual=st==="|",j.push(dt);else if(st.startsWith("}}")){const ht=st.slice(0,Math.min(ft.length,3)),ct=ft.length-ht.length,{length:gt}=T;q=lt+ht.length,pt[pt.length-1].push(g.slice($t,lt));let St=!1,vt="t";if(ht.length===3){const at=pt.map(_t=>_t.join("=")),Et=at.length>1&&(0,S.PN)(at[1]).trim();new u(at,e,T),Et&&Et.endsWith(":")&&J.includes(Et.slice(0,-1).toLowerCase())&&(vt="s")}else try{new w(pt[0][0],pt.slice(1),e,T);const at=(0,S.PN)(pt[0][0]).trim();tt.has(at)?vt=tt.get(at):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(at)?vt="m":/^#vardefine:./iu.test(at)&&(vt="c")}catch(at){if(at instanceof SyntaxError&&at.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))q=rt+ft.length,St=!0;else throw at}St||(g=`${g.slice(0,rt+ct)}\0${gt}${vt}\x7F${g.slice(q)}`,q=rt+ct+3+String(gt).length,ct>1?j.push({0:ft.slice(0,ct),index:rt,pos:rt+ct,parts:[[]]}):ct===1&&g[rt-1]==="-"&&j.push({0:"-{",index:rt-1,pos:rt+1,parts:[[]]}))}else q=lt+st.length,st.startsWith("{")&&(k.pos=q,k.parts=[[]]),j.push(..."0"in dt?[dt]:[],k);it&&(it=g.slice(q).includes("}}"));let xt=j[j.length-1];!it&&((V=xt==null?void 0:xt[0])!=null&&V.startsWith("{"))&&(j.pop(),xt=j[j.length-1]),nt=new RegExp(X+(xt?`|${et[xt[0][0]]}${xt.findEqual?"|=":""}`:""),"gmu"),nt.lastIndex=q,k=nt.exec(g)}return g}},551:(Y,b,t)=>{t.r(b),t.d(b,{parseCommentAndExt:()=>h});var S=t(891),I=t(541),R=Object.defineProperty,W=(p,E,_)=>E in p?R(p,E,{enumerable:!0,configurable:!0,writable:!0,value:_}):p[E]=_,M=(p,E,_)=>(W(p,typeof E!="symbol"?E+"":E,_),_);class C extends I.Token{constructor(){super(...arguments),M(this,"type","onlyinclude")}toString(E){return`<onlyinclude>${super.toString()}</onlyinclude>`}getPadding(){return 13}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}var P=t(826),f=t(959),l=t(415),n=Object.defineProperty,i=(p,E,_)=>E in p?n(p,E,{enumerable:!0,configurable:!0,writable:!0,value:_}):p[E]=_,d=(p,E,_)=>(i(p,typeof E!="symbol"?E+"":E,_),_);class r extends(0,f.a)(l.m){constructor(E,_="",v,F,B=S.default.getConfig(),z=[]){super(E,_,v!=null?v:"",v===void 0||F!=null?F:"",B,z),d(this,"type","include")}}var o=t(895),s=t(976);const h=(p,E=S.default.getConfig(),_=[],v=!1)=>{const F="<onlyinclude>",B="</onlyinclude>",{length:z}=F;if(v){let O=p.indexOf(F),y=p.indexOf(B,O+z);if(O!==-1&&y!==-1){let x="";for(;O!==-1&&y!==-1;){const u=`\0${_.length}e\x7F`;new C(p.slice(O+z,y),E,_),O>0?(new P.O(p.slice(0,O),E,_),x+=`\0${_.length-1}c\x7F${u}`):x+=u,p=p.slice(y+z+1),O=p.indexOf(F),y=p.indexOf(B,O+z)}return`${x}${p}`}}const Q=E.ext.join("|"),L=v?"includeonly":"(?:no|only)include",w=v?"noinclude":"includeonly",m=new RegExp(`<!--.*?(?:-->|$)|<${L}(?:\\s[^>]*?)?>|</${L}\\s*>|<(${Q})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${w})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return p.replace(m,(O,y,x,u,$,g,e,T,c)=>{const D=`\0${_.length}${y?"e":"c"}\x7F`;if(y)new o.$(y,x,u,$,E,_);else if(O.startsWith("<!--")){const U=O.endsWith("-->");new s.T(O.slice(4,U?-3:void 0),U,E,_)}else g?new r(g,e,T,c,E,_):new P.O(O,E,_);return D})}},295:(Y,b,t)=>{t.r(b),t.d(b,{parseConverter:()=>Q});var S=t(891),I=t(467),R=t(541),W=t(169),M=t(34),C=Object.defineProperty,P=(L,w,m)=>w in L?C(L,w,{enumerable:!0,configurable:!0,writable:!0,value:m}):L[w]=m,f=(L,w,m)=>(P(L,typeof w!="symbol"?w+"":w,m),m),l=(L,w,m)=>{if(!w.has(L))throw TypeError("Cannot "+m)},n=(L,w,m)=>(l(L,w,"read from private field"),m?m.call(L):w.get(L)),i=(L,w,m)=>{if(w.has(L))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(L):w.set(L,m)},d=(L,w,m,O)=>(l(L,w,"write to private field"),O?O.call(L,m):w.set(L,m),m),r;const o=new Set(["A","T","R","D","-","H","N"]);class s extends R.Token{constructor(w,m=S.default.getConfig(),O=[]){super(void 0,m,O,{}),f(this,"type","converter-flags"),i(this,r,void 0),this.append(...w.map(y=>new M.D(y,"converter-flag",m,O)))}afterBuild(){d(this,r,this.childNodes.map(w=>w.text().trim()))}toString(w){return super.toString(w,";")}text(){return super.text(";")}getGaps(w){return w<this.length-1?1:0}getUnknownFlags(){return new Set(n(this,r).filter(w=>/\{{3}[^{}]+\}{3}/u.test(w)))}getVariantFlags(){const w=new Set(this.getAttribute("config").variants);return new Set(n(this,r).filter(m=>w.has(m)))}lint(w=this.getAbsoluteIndex()){const m=this.getVariantFlags(),O=this.getUnknownFlags(),y=new Set(n(this,r).filter(c=>o.has(c))),{length:x}=n(this,r).filter(c=>!c),u=n(this,r).length-O.size-x,$=super.lint(w);if(m.size===u||y.size===u)return $;const g={start:w,...this.getRootNode().posFromIndex(w)},{childNodes:e,length:T}=this;for(let c=0;c<T;c++){const D=e[c],U=D.text().trim();if(U&&!m.has(U)&&!O.has(U)&&(m.size>0||!y.has(U))){const K=(0,W.D)(D,g,"invalid conversion flag");$.push(K)}}return $}print(){return super.print({sep:";"})}}r=new WeakMap;var h=Object.defineProperty,p=(L,w,m)=>w in L?h(L,w,{enumerable:!0,configurable:!0,writable:!0,value:m}):L[w]=m,E=(L,w,m)=>(p(L,typeof w!="symbol"?w+"":w,m),m);class _ extends R.Token{constructor(w,m=!0,O=S.default.getConfig(),y=[]){if(super(void 0,O,y),E(this,"type","converter-rule"),m){const x=w.indexOf(":"),u=w.slice(0,x).indexOf("=>"),$=u===-1?w.slice(0,x):w.slice(u+2,x);O.variants.includes($.trim())?(super.insertAt(new M.D($,"converter-rule-variant",O,y)),super.insertAt(new M.D(w.slice(x+1),"converter-rule-to",O,y)),u!==-1&&super.insertAt(new M.D(w.slice(0,u),"converter-rule-from",O,y),0)):super.insertAt(new M.D(w,"converter-rule-noconvert",O,y))}else super.insertAt(new M.D(w,"converter-rule-noconvert",O,y))}toString(w){const{childNodes:m}=this;if(m.length===3){const[O,y,x]=m;return`${O.toString(w)}=>${y.toString(w)}:${x.toString(w)}`}return super.toString(w,":")}text(){const{childNodes:w}=this;if(w.length===3){const[m,O,y]=w;return`${m.text()}=>${O.text()}:${y.text()}`}return super.text(":")}getGaps(w){return w===0&&this.length===3?2:1}print(){const{childNodes:w}=this;if(w.length===3){const[m,O,y]=w;return`<span class="wpb-converter-rule">${m.print()}=>${O.print()}:${y.print()}</span>`}return super.print({sep:":"})}}var v=Object.defineProperty,F=(L,w,m)=>w in L?v(L,w,{enumerable:!0,configurable:!0,writable:!0,value:m}):L[w]=m,B=(L,w,m)=>(F(L,typeof w!="symbol"?w+"":w,m),m);class z extends R.Token{constructor(w,m,O=S.default.getConfig(),y=[]){super(void 0,O,y),B(this,"type","converter"),this.append(new s(w,O,y));const[x]=m,u=x.includes(":"),$=new _(x,u,O,y);u&&$.length===1?this.insertAt(new _(m.join(";"),!1,O,y)):this.append($,...m.slice(1).map(g=>new _(g,!0,O,y)))}toString(w){const{childNodes:[m,...O]}=this;return`-{${m.toString()}${m.length>0?"|":""}${O.map(y=>y.toString()).join(";")}}-`}text(){const{childNodes:[w,...m]}=this;return`-{${w.text()}|${(0,I.fL)(m,";")}}-`}getPadding(){return 2}getGaps(w){return w||this.firstChild.length>0?1:0}print(){const{childNodes:[w,...m]}=this;return`<span class="wpb-converter">-{${w.print()}${w.length>0?"|":""}${(0,I.S0)(m,{sep:";"})}}-</span>`}}const Q=(L,w=S.default.getConfig(),m=[])=>{const O=/-\{/gu,y=/-\{|\}-/gu,x=[];let u=O,$=u.exec(L);for(;$;){const{0:g,index:e}=$;if(g==="}-"){const T=x.pop(),{length:c}=m,D=L.slice(T.index+2,e),U=D.indexOf("|"),[K,G]=U===-1?[[],D]:[D.slice(0,U).split(";"),D.slice(U+1)],V=G.replace(/(&[#a-z\d]+);/giu,"$1"),X=`(?:${w.variants.join("|")})`,J=V.split(new RegExp(`;(?=\\s*(?:${X}|[^;]*?=>\\s*${X})\\s*:)`,"u")).map(j=>j.replace(/\x01/gu,";"));new z(K,J,w,m),L=`${L.slice(0,T.index)}\0${c}v\x7F${L.slice(e+2)}`,x.length===0&&(u=O),u.lastIndex=T.index+3+String(c).length}else x.push($),u=y,u.lastIndex=e+2;$=u.exec(L)}return L}},418:(Y,b,t)=>{t.r(b),t.d(b,{parseExternalLinks:()=>W});var S=t(467),I=t(891),R=t(944);const W=(M,C=I.default.getConfig(),P=[])=>{const f=new RegExp(`\\[((?:(?:${C.protocol}|//)${S._X}|\0\\d+m\x7F)${S.Qk})(\\p{Zs}*)([^\\]-\b
5
- -\uFFFD]*)\\]`,"giu");return M.replace(f,(l,n,i,d)=>{const{length:r}=P,o=/&[lg]t;/u.exec(n);return o&&(n=n.slice(0,o.index),i="",d=`${n.slice(o.index)}${i}${d}`),new R.a(n,i,d,C,P),`\0${r}w\x7F`})}},362:(Y,b,t)=>{t.r(b),t.d(b,{parseHrAndDoubleUnderscore:()=>r});var S=t(891),I=t(439),R=Object.defineProperty,W=(o,s,h)=>s in o?R(o,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[s]=h,M=(o,s,h)=>(W(o,typeof s!="symbol"?s+"":s,h),h);class C extends I.h{constructor(){super(...arguments),M(this,"type","hr")}}var P=t(959),f=Object.defineProperty,l=(o,s,h)=>s in o?f(o,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[s]=h,n=(o,s,h)=>(l(o,typeof s!="symbol"?s+"":s,h),h);class i extends(0,P.a)(I.h){constructor(){super(...arguments),n(this,"type","double-underscore")}getPadding(){return 2}toString(s){return`__${this.firstChild.data}__`}print(){return super.print({pre:"__",post:"__"})}}var d=t(485);const r=({firstChild:o,type:s,name:h},p=S.default.getConfig(),E=[])=>{const{doubleUnderscore:_}=p,v=new Set(_[0]),F=new Set(_[1]);let{data:B}=o;return s!=="root"&&(s!=="ext-inner"||h!=="poem")&&(B=`\0${B}`),B=B.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(z,Q,L)=>(new C(L,p,E),`${Q}\0${E.length-1}r\x7F`)).replace(new RegExp(`__(${_.flat().join("|")})__`,"giu"),(z,Q)=>v.has(Q.toLowerCase())||F.has(Q)?(new i(Q,p,E),`\0${E.length-1}u\x7F`):z).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(z,Q,L,w,m)=>{const O=`${Q}\0${E.length}h\x7F`;return new d.D(L.length,[w,m],p,E),O}),s==="root"||s==="ext-inner"&&h==="poem"?B:B.slice(1)}},980:(Y,b,t)=>{t.r(b),t.d(b,{parseHtml:()=>E});var S=t(891),I=t(83),R=t(169),W=t(467),M=t(541),C=Object.defineProperty,P=(_,v,F)=>v in _?C(_,v,{enumerable:!0,configurable:!0,writable:!0,value:F}):_[v]=F,f=(_,v,F)=>(P(_,typeof v!="symbol"?v+"":v,F),F),l=(_,v,F)=>{if(!v.has(_))throw TypeError("Cannot "+F)},n=(_,v,F)=>(l(_,v,"read from private field"),F?F.call(_):v.get(_)),i=(_,v,F)=>{if(v.has(_))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(_):v.set(_,F)},d=(_,v,F,B)=>(l(_,v,"write to private field"),B?B.call(_,F):v.set(_,F),F),r,o,s;const h=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]);class p extends M.Token{constructor(v,F,B,z,Q=S.default.getConfig(),L=[]){super(void 0,Q,L),f(this,"type","html"),i(this,r,void 0),i(this,o,void 0),i(this,s,void 0),this.insertAt(F),this.setAttribute("name",v.toLowerCase()),d(this,r,B),d(this,o,z),d(this,s,v)}get closing(){return n(this,r)}toString(v){return`<${n(this,r)?"/":""}${n(this,s)}${super.toString()}${n(this,o)?"/":""}>`}text(){return`<${n(this,r)?"/":""}${n(this,s)}${n(this,r)?"":super.text()}${n(this,o)?"/":""}>`}getPadding(){return n(this,s).length+(n(this,r)?2:1)}lint(v=this.getAbsoluteIndex()){const F=super.lint(v);let B;this.name==="h1"&&!n(this,r)&&(B=(0,R.Y)(this,{start:v},"<h1>"),F.push(B)),this.closest("table-attrs")&&(B!=null||(B=(0,R.Y)(this,{start:v},"")),F.push({...B,message:S.default.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(z){if(z instanceof SyntaxError){const{message:Q}=z;B!=null||(B=(0,R.Y)(this,{start:v},""));const[L]=Q.split(":"),w={...B,message:S.default.msg(L)};if(L==="unclosed tag")w.severity="warning";else if(L==="unmatched closing tag"){const m=this.closest("magic-word");m&&h.has(m.name)&&(w.severity="warning")}F.push(w)}}return F}findMatchingTag(){const{html:v}=this.getAttribute("config"),{name:F,parentNode:B}=this,z=(0,W.jq)(String(this));if(n(this,r)&&(n(this,o)||v[2].includes(F)))throw new SyntaxError(`tag that is both closing and self-closing: ${z}`);if(v[2].includes(F)||n(this,o)&&v[1].includes(F))return this;if(n(this,o)&&v[0].includes(F))throw new SyntaxError(`invalid self-closing tag: ${z}`);if(!B)return;const{childNodes:Q}=B,L=Q.indexOf(this),w=n(this,r)?Q.slice(0,L).reverse().filter(({type:O,name:y})=>O==="html"&&y===F):Q.slice(L+1).filter(({type:O,name:y})=>O==="html"&&y===F);let m=n(this,r)?-1:1;for(const O of w)if(O.closing?m--:m++,m===0)return O;throw new SyntaxError(`${n(this,r)?"unmatched closing":"unclosed"} tag: ${z}`)}print(){return super.print({pre:`&lt;${n(this,r)?"/":""}${n(this,s)}`,post:`${n(this,o)?"/":""}&gt;`})}}r=new WeakMap,o=new WeakMap,s=new WeakMap;const E=(_,v=S.default.getConfig(),F=[])=>{const B=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,z=new Set(v.html.flat()),Q=_.split("<");let L=Q.shift();for(const w of Q){const m=B.exec(w),O=m==null?void 0:m[2],y=O==null?void 0:O.toLowerCase();if(!m||!z.has(y)){L+=`<${w}`;continue}const[,x,,u="",$,g]=m,e=new I.x(u,"html-attrs",y,v,F),T=e.getAttr("itemprop");if(y==="meta"&&(T===void 0||e.getAttr("content")===void 0)||y==="link"&&(T===void 0||e.getAttr("href")===void 0)){L+=`<${w}`,F.pop();continue}L+=`\0${F.length}x\x7F${g}`,new p(O,e,x==="/",$==="/>",v,F)}return L}},106:(Y,b,t)=>{t.r(b),t.d(b,{parseLinks:()=>f});var S=t(891),I=t(524),R=t(533),W=Object.defineProperty,M=(l,n,i)=>n in l?W(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,C=(l,n,i)=>(M(l,typeof n!="symbol"?n+"":n,i),i);class P extends I.h{constructor(){super(...arguments),C(this,"type","category")}}const f=(l,n=S.default.getConfig(),i=[])=>{const{parseQuotes:d}=t(704),r=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,o=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${n.protocol})`,"iu"),h=l.split("[[");let p=h.shift();for(let E=0;E<h.length;E++){let _=!1,v,F,B,z;const Q=h[E],L=r.exec(Q);if(L)[,v,F,B,z]=L,z.startsWith("]")&&(B!=null&&B.includes("["))&&(B+="]",z=z.slice(1));else{const u=o.exec(Q);u&&(_=!0,[,v,F,B]=u)}if(v===void 0||s.test(v)||/\0\d+[exhbru]\x7F/u.test(v)){p+=`[[${Q}`;continue}const w=v.trim().startsWith(":");if(w&&_){p+=`[[${Q}`;continue}const m=S.default.normalizeTitle(v,0,!1,n,!0,!0,!0),{ns:O,valid:y}=m;if(y){if(_){if(O!==6){p+=`[[${Q}`;continue}let u=!1;for(E++;E<h.length;E++){const $=h[E],g=$.split("]]");if(g.length>2){u=!0,B+=`[[${g[0]}]]${g[1]}`,z=g.slice(2).join("]]");break}else if(g.length===2)B+=`[[${g[0]}]]${g[1]}`;else{B+=`[[${$}`;break}}if(B=f(B,n,i),!u){p+=`[[${v}${F}${B}`;continue}}}else{p+=`[[${Q}`;continue}B&&(B=d(B,n,i)),p+=`\0${i.length}l\x7F${z}`;let x=I.h;w||(O===6?x=R.q:O===14&&(x=P)),B===void 0&&F&&(B=""),new x(v,B,n,i,F)}return p}},904:(Y,b,t)=>{t.r(b),t.d(b,{parseList:()=>P});var S=t(891),I=t(461),R=Object.defineProperty,W=(f,l,n)=>l in f?R(f,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):f[l]=n,M=(f,l,n)=>(W(f,typeof l!="symbol"?l+"":l,n),n);class C extends I.k{constructor(){super(...arguments),M(this,"type","list")}}const P=(f,l=S.default.getConfig(),n=[])=>{const i=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(f);if(!i)return f;const[d,r,o]=i;let s=`${r}\0${n.length}d\x7F${f.slice(d.length)}`,h=o.split(";").length-1;if(new C(o,l,n),!h)return s;let p=/:+|-\{/gu,E=p.exec(s),_=0;for(;E&&h;){const{0:v,index:F}=E;if(v.startsWith(":")){if(v.length>=h)return new I.k(":".repeat(h),l,n),`${s.slice(0,F)}\0${n.length-1}d\x7F${s.slice(F+h)}`;s=`${s.slice(0,F)}\0${n.length}d\x7F${s.slice(p.lastIndex)}`,h-=v.length,p.lastIndex=F+4+String(n.length).length,new I.k(v,l,n)}else if(v==="-{"){if(!_){const{lastIndex:B}=p;p=/-\{|\}-/gu,p.lastIndex=B}_++}else if(_--,!_){const{lastIndex:B}=p;p=/:+|-\{/gu,p.lastIndex=B}E=p.exec(s)}return s}},311:(Y,b,t)=>{t.r(b),t.d(b,{parseMagicLinks:()=>W});var S=t(467),I=t(891),R=t(686);const W=(M,C=I.default.getConfig(),P=[])=>{const f=new RegExp(`(^|[^\\p{L}\\d_])(?:${C.protocol})(${S._X}${S.Qk})`,"giu");return M.replace(f,(l,n,i)=>{let d="",r=n?l.slice(1):l;const o=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(r);o&&(d=r.slice(o.index),r=r.slice(0,o.index));const s=new RegExp(`[,;.:!?${r.includes("(")?"":")"}]+$`,"u"),h=s.exec(r);if(h){let p=0;h[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(r.slice(0,h.index))&&(p=1),d=`${r.slice(h.index+p)}${d}`,r=r.slice(0,h.index+p)}return d.length>=i.length?l:(new R.k(r,!1,C,P),`${n}\0${P.length-1}w\x7F${d}`)})}},704:(Y,b,t)=>{t.r(b),t.d(b,{parseQuotes:()=>f});var S=t(891),I=t(169),R=t(439),W=Object.defineProperty,M=(l,n,i)=>n in l?W(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,C=(l,n,i)=>(M(l,typeof n!="symbol"?n+"":n,i),i);class P extends R.h{constructor(){super(...arguments),C(this,"type","quote")}lint(n=this.getAbsoluteIndex()){const{previousSibling:i,nextSibling:d}=this,r=S.default.msg('lonely "$1"',"'"),o=[];let s;if((i==null?void 0:i.type)==="text"&&i.data.endsWith("'")){s=(0,I.Y)(this,{start:n},r);const{startIndex:h,startLine:p,startCol:E}=s,[,{length:_}]=i.data.match(/(?:^|[^'])('+)$/u),v=n-_;o.push({...s,startIndex:v,endIndex:h,startCol:E-_,endLine:p,endCol:E})}if((d==null?void 0:d.type)==="text"&&d.data.startsWith("'")){s!=null||(s=(0,I.Y)(this,{start:n},r));const{endIndex:h,endLine:p,endCol:E}=s,[{length:_}]=d.data.match(/^'+/u),v=h+_;o.push({...s,startIndex:h,endIndex:v,startLine:p,startCol:E,endCol:E+_})}return o}}const f=(l,n=S.default.getConfig(),i=[])=>{var d;const r=l.split(/('{2,})/u),{length:o}=r;if(o===1)return l;let s=0,h=0,p,E,_;for(let v=1;v<o;v+=2){const{length:F}=r[v];switch(F){case 2:h++;break;case 4:r[v-1]+="'",r[v]="'''";case 3:if(s++,p!==void 0)break;r[v-1].endsWith(" ")?E===void 0&&_===void 0&&(_=v):r[v-1].slice(-2,-1)===" "?p=v:E!=null||(E=v);break;default:r[v-1]+="'".repeat(F-5),r[v]="'''''",h++,s++}}if(h%2===1&&s%2===1){const v=(d=p!=null?p:E)!=null?d:_;v!==void 0&&(r[v]="''",r[v-1]+="'")}for(let v=1;v<o;v+=2)new P(r[v],n,i),r[v]=`\0${i.length-1}q\x7F`;return r.join("")}},508:(Y,b,t)=>{t.r(b),t.d(b,{parseTable:()=>O});var S=t(891),I=t(541),R=t(169),W=t(669),M=t(83);class C extends I.Token{constructor(x,u,$,g=S.default.getConfig(),e=[],T={}){super(void 0,g,e,T),this.append(new W.SyntaxToken(u,x,"table-syntax",g,e,{}),new M.x($,"table-attrs",this.type,g,e))}}class P extends C{lint(x=this.getAbsoluteIndex()){const u=super.lint(x),$=this.childNodes.find(({type:c})=>c==="table-inter");if(!$)return u;const g=$.childNodes.find(c=>c.text().trim()),e=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!g||e.test(String(g))||g.type==="arg"&&e.test(g.default||""))return u;if(g.type==="magic-word")try{if(g.getPossibleValues().every(c=>e.test(c.text())))return u}catch(c){}const T=(0,R.D)($,{start:x},"content to be moved out from the table");return u.push({...T,startIndex:T.startIndex+1,startLine:T.startLine+1,startCol:0}),u}text(){const x=super.text();return this.type==="tr"&&!x.trim().includes(`
6
- `)?"":x}}var f=Object.defineProperty,l=(y,x,u)=>x in y?f(y,x,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[x]=u,n=(y,x,u)=>(l(y,typeof x!="symbol"?x+"":x,u),u);const i=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u;class d extends P{constructor(x,u,$=S.default.getConfig(),g=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,x,u,$,g,{}),n(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(x=this.getAbsoluteIndex()){const u=super.lint(x);if(!this.closed){const{firstChild:$}=this,g=(0,R.D)($,{start:x},"unclosed table");u.push(g)}return u}close(x=`
7
- |}`,u=!1){const $=this.getAttribute("config"),g=this.getAttribute("accum");super.insertAt(S.default.run(()=>new W.SyntaxToken(x,i,"table-syntax",$,g,{})))}}var r=Object.defineProperty,o=(y,x,u)=>x in y?r(y,x,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[x]=u,s=(y,x,u)=>(o(y,typeof x!="symbol"?x+"":x,u),u);class h extends P{constructor(x,u,$=S.default.getConfig(),g=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,x,u,$,g,{}),s(this,"type","tr")}}var p=Object.defineProperty,E=(y,x,u)=>x in y?p(y,x,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[x]=u,_=(y,x,u)=>(E(y,typeof x!="symbol"?x+"":x,u),u),v=(y,x,u)=>{if(!x.has(y))throw TypeError("Cannot "+u)},F=(y,x,u)=>(v(y,x,"read from private field"),u?u.call(y):x.get(y)),B=(y,x,u)=>{if(x.has(y))throw TypeError("Cannot add the same private member more than once");x instanceof WeakSet?x.add(y):x.set(y,u)},z=(y,x,u,$)=>(v(y,x,"write to private field"),$?$.call(y,u):x.set(y,u),u),Q=(y,x,u,$)=>({set _(g){z(y,x,g,u)},get _(){return F(y,x,$)}}),L;class w extends C{constructor(x,u,$=S.default.getConfig(),g=[]){var e;let T=u==null?void 0:u.match(/\||\0\d+!\x7F/u),c=T?u.slice(0,T.index):"";/\[\[|-\{/u.test(c)&&(T=void 0,c=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,x,c,$,g),_(this,"type","td"),B(this,L,""),T&&([Q(this,L)._]=T);const D=new I.Token(u==null?void 0:u.slice(((e=T==null?void 0:T.index)!=null?e:NaN)+F(this,L).length),$,g);D.type="td-inner",this.insertAt(D.setAttribute("stage",4))}get subtype(){return this.getSyntax().subtype}getSyntax(){const x=this.firstChild.text(),u=x[x.length-1];let $="td";return u==="!"?$="th":u==="+"&&($="caption"),{subtype:$}}afterBuild(){F(this,L).includes("\0")&&z(this,L,this.buildFromStr(F(this,L),"string"))}toString(x){const{childNodes:[u,$,g]}=this;return`${u.toString()}${$.toString()}${F(this,L)}${g.toString()}`}text(){const{childNodes:[x,u,$]}=this;return`${x.text()}${u.text()}${F(this,L)}${$.text()}`}getGaps(x){return x===1?F(this,L).length:0}lint(x=this.getAbsoluteIndex()){const u=super.lint(x);x+=this.getRelativeIndex(this.length-1);for(const $ of this.lastChild.childNodes)$.type==="text"&&$.data.includes("|")&&u.push((0,R.D)($,{start:x},'additional "|" in a table cell',"warning"));return u}print(){const{childNodes:[x,u,$]}=this;return`<span class="wpb-td">${x.print()}${u.print()}${F(this,L)}${$.print()}</span>`}}L=new WeakMap;var m=t(461);const O=({firstChild:{data:y},type:x,name:u},$=S.default.getConfig(),g=[])=>{const e=[],T=y.split(`
8
- `);let c=x==="root"||x==="parameter-value"||x==="ext-inner"&&u==="poem"?"":`
9
- ${T.shift()}`;const D=(U,K)=>{if(!K){c+=U;return}const{lastChild:G}=K;if(G.constructor===I.Token)G.setText(String(G)+U);else{const V=new I.Token(U,$,g);V.type="table-inter",K.insertAt(V.setAttribute("stage",3))}};for(const U of T){let K=e.pop();const[G]=/^(?:\s|\0\d+c\x7F)*/u.exec(U),V=U.slice(G.length),X=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(V);if(X){for(;K&&K.type!=="td";)K=e.pop();const[,k,it,q,st]=X;k&&new m.k(k,$,g),D(`
10
- ${G}${k&&`\0${g.length-1}d\x7F`}${it}\0${g.length}b\x7F`,K),e.push(...K?[K]:[],new d(q,st,$,g));continue}else if(!K){c+=`
11
- ${U}`;continue}const J=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(V);if(!J){D(`
12
- ${U}`,K),e.push(K);continue}const[,j,et,tt,nt]=J;if(j){for(;K.type!=="table";)K=e.pop();K.close(`
13
- ${G}${j}`,!0),D(nt,e[e.length-1])}else if(et){K.type==="td"&&(K=e.pop()),K.type==="tr"&&(K=e.pop());const k=new h(`
14
- ${G}${et}`,nt,$,g);e.push(K,k),K.insertAt(k)}else{K.type==="td"&&(K=e.pop());const k=tt==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let it=k.exec(nt),q=0,st=`
15
- ${G}${tt}`;for(;it;)K.insertAt(new w(st,nt.slice(q,it.index),$,g)),{lastIndex:q}=k,[st]=it,it=k.exec(nt);const lt=new w(st,nt.slice(q),$,g);e.push(K,lt),K.insertAt(lt)}}return c.slice(1)}},34:(Y,b,t)=>{t.d(b,{D:()=>R});var S=t(891),I=t(541);class R extends I.Token{constructor(M,C,P=S.default.getConfig(),f=[],l){super(M,P,f,l),this.type=C}}},83:(Y,b,t)=>{t.d(b,{x:()=>L});var S=t(169),I=t(467),R=t(891),W=t(541),M=t(34),C=(w,m,O)=>{if(!m.has(w))throw TypeError("Cannot "+O)},P=(w,m,O)=>(C(w,m,"read from private field"),O?O.call(w):m.get(w)),f=(w,m,O)=>{if(m.has(w))throw TypeError("Cannot add the same private member more than once");m instanceof WeakSet?m.add(w):m.set(w,O)},l=(w,m,O,y)=>(C(w,m,"write to private field"),y?y.call(w,O):m.set(w,O),O),n,i,d;const r=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),o=new Set(["align"]),s=new Set(["cite"]),h=new Set(["cite","datetime"]),p=new Set(["width"]),E=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),_=new Set(["type"]),v={div:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,blockquote:s,q:s,p:o,br:new Set(["clear"]),pre:p,ins:h,del:h,ul:_,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:o,tr:new Set(["bgcolor","align","valign"]),td:E,th:E,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:p,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},F=new Set,B={nowiki:F,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:F,inputbox:F,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:F,poll:new Set(["id","show-results-before-voting"]),sm2:_,flashmp3:_,tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"])},z=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u");class Q extends W.Token{constructor(m,O,y,x="",u,$=[],g=R.default.getConfig(),e=[]){const T=new M.D(y,"attr-key",g,e,{});let c;if(y==="title"||O==="img"&&y==="alt")c=new W.Token(u,g,e,{}),c.type="attr-value",c.setAttribute("stage",R.default.MAX_STAGE-1);else if(O==="gallery"&&y==="caption"){const D={...g,excludes:[...g.excludes,"quote","extLink","magicLink","list"]};c=new W.Token(u,D,e,{}),c.type="attr-value",c.setAttribute("stage",5)}else if(O==="choose"&&(y==="before"||y==="after")){const D={...g,excludes:[...g.excludes,"heading","html","table","hr","list"]};c=new W.Token(u,D,e,{}),c.type="attr-value",c.setAttribute("stage",1)}else c=new M.D(u,"attr-value",g,e,{});super(void 0,g,e),f(this,n,void 0),f(this,i,void 0),f(this,d,void 0),this.type=m,this.append(T,c),l(this,n,x),l(this,i,$),l(this,d,O),this.setAttribute("name",(0,I.PN)(y).trim().toLowerCase())}get balanced(){return!P(this,n)||P(this,i)[0]===P(this,i)[1]}get tag(){return P(this,d)}get value(){return this.getValue()}afterBuild(){P(this,n).includes("\0")&&l(this,n,this.buildFromStr(P(this,n),"string")),this.parentNode&&l(this,d,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(m){const[O="",y=""]=P(this,i);return P(this,n)?`${super.toString(m,`${P(this,n)}${O}`)}${y}`:this.firstChild.toString(m)}text(){return P(this,n)?`${super.text(`${P(this,n).trim()}"`)}"`:this.firstChild.text()}getGaps(m){var O,y;return P(this,n)&&m===0?P(this,n).length+((y=(O=P(this,i)[0])==null?void 0:O.length)!=null?y:0):0}lint(m=this.getAbsoluteIndex()){var O;const y=super.lint(m),{balanced:x,firstChild:u,lastChild:$,type:g,name:e,value:T}=this,c=P(this,d);let D;if(!x){const U=this.getRootNode();D={start:m,...U.posFromIndex(m)};const K=(0,S.D)($,D,"unclosed quotes","warning"),G=K.startIndex-1;y.push({...K,startIndex:G,startCol:K.startCol-1})}return B[c]&&!B[c].has(e)||(g!=="ext-attr"&&!/\{\{[^{]+\}\}/u.test(e)||c in v)&&!((O=v[c])!=null&&O.has(e))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(e)&&(c==="meta"||c==="link"||!r.has(e))?(D!=null||(D={start:m,...this.getRootNode().posFromIndex(m)}),y.push((0,S.D)(u,D,"illegal attribute name"))):e==="style"&&typeof T=="string"&&z.test(T)?(D!=null||(D={start:m,...this.getRootNode().posFromIndex(m)}),y.push((0,S.D)($,D,"insecure style"))):e==="tabindex"&&typeof T=="string"&&T.trim()!=="0"&&(D!=null||(D={start:m,...this.getRootNode().posFromIndex(m)}),y.push((0,S.D)($,D,"nonzero tabindex"))),y}getValue(){if(P(this,n)){const m=this.lastChild.text();return P(this,i)[1]?m:m.trim()}return this.type==="ext-attr"||""}print(){const[m="",O=""]=P(this,i);return P(this,n)?super.print({sep:`${P(this,n)}${m}`,post:O}):super.print()}}n=new WeakMap,i=new WeakMap,d=new WeakMap;class L extends W.Token{constructor(m,O,y,x=R.default.getConfig(),u=[]){if(super(void 0,x,u,{}),this.type=O,this.setAttribute("name",y),m){const $=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu");let g="",e=$.exec(m),T=0;const c=()=>{g&&(super.insertAt(new M.D(g,`${O.slice(0,-1)}-dirty`,x,u)),g="")};for(;e;){const{index:D,0:U,1:K,2:G,3:V,4:X,5:J,6:j}=e;if(g+=m.slice(T,D),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test((0,I.PN)(K).trim())){const et=X!=null?X:j,tt=[V,J],nt=new Q(O.slice(0,-1),y,K,G,et,tt,x,u);c(),super.insertAt(nt)}else g+=U;({lastIndex:T}=$),e=$.exec(m)}g+=m.slice(T),c()}}afterBuild(){if(this.type==="table-attrs"){const{parentNode:m}=this;this.setAttribute("name",(m==null?void 0:m.type)==="td"&&m.subtype==="caption"?"caption":m==null?void 0:m.type)}}getAttrTokens(m){return this.childNodes.filter(O=>O instanceof Q&&O.name===m.toLowerCase().trim())}getAttrToken(m){const O=this.getAttrTokens(m);return O[O.length-1]}getAttr(m){var O;return(O=this.getAttrToken(m))==null?void 0:O.getValue()}lint(m=this.getAbsoluteIndex()){const O=super.lint(m),{parentNode:y,length:x,childNodes:u}=this,$=new Map,g=new Set;let e;(y==null?void 0:y.type)==="html"&&y.closing&&this.text().trim()&&(e={start:m,...this.getRootNode().posFromIndex(m)},O.push((0,S.Y)(this,e,"attributes of a closing tag")));for(let T=0;T<x;T++){const c=u[T];if(c instanceof M.D&&c.text().trim())e!=null||(e={start:m,...this.getRootNode().posFromIndex(m)}),O.push((0,S.D)(c,e,"containing invalid attribute"));else if(c instanceof Q){const{name:D}=c;$.has(D)?(g.add(D),$.get(D).push(c)):D!=="class"&&$.set(D,[c])}}if(g.size>0){e!=null||(e={start:m,...this.getRootNode().posFromIndex(m)});for(const T of g)O.push(...$.get(T).map(c=>(0,S.D)(c,e,R.default.msg("duplicated $1 attribute",T))))}return O}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(m=>m.print(m instanceof M.D&&m.text().trim()?{class:"hidden"}:void 0)).join("")}</span>`:""}}},944:(Y,b,t)=>{t.d(b,{a:()=>d});var S=t(891),I=t(541),R=t(686),W=Object.defineProperty,M=(r,o,s)=>o in r?W(r,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[o]=s,C=(r,o,s)=>(M(r,typeof o!="symbol"?o+"":o,s),s),P=(r,o,s)=>{if(!o.has(r))throw TypeError("Cannot "+s)},f=(r,o,s)=>(P(r,o,"read from private field"),s?s.call(r):o.get(r)),l=(r,o,s)=>{if(o.has(r))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(r):o.set(r,s)},n=(r,o,s,h)=>(P(r,o,"write to private field"),h?h.call(r,s):o.set(r,s),s),i;class d extends I.Token{constructor(o,s="",h="",p=S.default.getConfig(),E=[]){if(super(void 0,p,E,{}),C(this,"type","ext-link"),l(this,i,void 0),this.insertAt(new R.k(o,!0,p,E)),n(this,i,s),h){const _=new I.Token(h,p,E,{});_.type="ext-link-text",this.insertAt(_.setAttribute("stage",S.default.MAX_STAGE-1))}}toString(o){return this.length===1?`[${super.toString(o)}${f(this,i)}]`:`[${super.toString(o,f(this,i))}]`}text(){return`[${super.text(" ")}]`}getPadding(){return 1}getGaps(o){return o===0?f(this,i).length:0}print(){return super.print(this.length===1?{pre:"[",post:`${f(this,i)}]`}:{pre:"[",sep:f(this,i),post:"]"})}}i=new WeakMap},420:(Y,b,t)=>{t.r(b),t.d(b,{GalleryToken:()=>f});var S=t(891),I=t(541),R=t(39),W=t(465),M=Object.defineProperty,C=(l,n,i)=>n in l?M(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,P=(l,n,i)=>(C(l,typeof n!="symbol"?n+"":n,i),i);class f extends I.Token{constructor(n,i=S.default.getConfig(),d=[]){var r;super(void 0,i,d,{}),P(this,"type","ext-inner");for(const o of(r=n==null?void 0:n.split(`
16
- `))!=null?r:[]){const s=/^([^|]+)(?:\|(.*))?/u.exec(o);if(!s){super.insertAt(o.trim()?new W.R(o,i,[],{}):o);continue}const[,h,p]=s;this.normalizeTitle(h,6,!0,!0).valid?super.insertAt(new R._("gallery",h,p,i,d)):super.insertAt(new W.R(o,i,[],{}))}}toString(n){return super.toString(n,`
1
+ (()=>{(()=>{"use strict";var Vt={891:(Y,M,t)=>{t.d(M,{default:()=>b});const $={minConfig:t(166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config,excludes:[]}},msg(S,P=""){var x,o;return((o=(x=this.i18n)==null?void 0:x[S])!=null?o:S).replace("$1",P)},normalizeTitle(S,P=0,x=!1,o=$.getConfig(),n=!1,r=!1,d=!1){const{Title:i}=t(599);if(n)return new i(S,P,o,r,d);const{Token:l}=t(541),s=this.run(()=>new l(S,o).parseOnce(0,x).parseOnce());return new i(String(s),P,o,r,d)},parse(S,P,x=$.MAX_STAGE,o=$.getConfig()){const{Token:n}=t(541);let r;return this.run(()=>{r=new n(S.replace(/[\0\x7F]/gu,""),o);try{r.parse(x,P)}catch(d){}}),r},run(S){return S()}},I={},R=new Set(["MAX_STAGE","minConfig"]),W=new Set(["config","normalizeTitle","parse"]);for(const S in $)R.has(S)?I[S]={enumerable:!1,writable:!1}:W.has(S)||(I[S]={enumerable:!1});Object.defineProperties($,I),typeof self=="object"?Object.assign(self,{Parser:$}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:$});const b=$},599:(Y,M,t)=>{t.r(M),t.d(M,{Title:()=>S});var $=t(467),I=t(891),R=Object.defineProperty,W=(P,x,o)=>x in P?R(P,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[x]=o,b=(P,x,o)=>(W(P,typeof x!="symbol"?x+"":x,o),o);class S{constructor(x,o=0,n=I.default.getConfig(),r=!1,d=!1){b(this,"valid"),b(this,"ns"),b(this,"fragment"),b(this,"encoded",!1);var i;const{namespaces:l,nsid:s}=n;let a=(i=l[o])!=null?i:"";if(x=(0,$.m9)(x),r&&x.includes("%"))try{const m=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(x);x=decodeURIComponent(x),this.encoded=m}catch(m){}x=x.replace(/_/gu," ").trim(),x.startsWith(":")&&(a="",x=x.slice(1).trim());const c=x.split(":");if(c.length>1){const m=s[c[0].trim().toLowerCase()],F=m===void 0?void 0:l[m];F!==void 0&&(a=F,x=c.slice(1).join(":").trim())}this.ns=s[a.toLowerCase()];const v=x.indexOf("#");let _;v!==-1&&(_=x.slice(v+1).trim(),x=x.slice(0,v).trim()),this.valid=!!(x||d&&_!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(x),this.fragment=_}}},959:(Y,M,t)=>{t.d(M,{a:()=>W});var $=Object.defineProperty,I=(b,S,P)=>S in b?$(b,S,{enumerable:!0,configurable:!0,writable:!0,value:P}):b[S]=P,R=(b,S,P)=>(I(b,typeof S!="symbol"?S+"":S,P),P);const W=b=>{class S extends b{text(){return""}}return R(S,"hidden",!0),S}},313:(Y,M,t)=>{t.r(M),t.d(M,{parseBraces:()=>C});var $=t(467),I=t(891),R=t(485),W=t(169),b=t(541),S=Object.defineProperty,P=(f,e,T)=>e in f?S(f,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[e]=T,x=(f,e,T)=>(P(f,typeof e!="symbol"?e+"":e,T),T);class o extends b.Token{constructor(e,T,p=I.default.getConfig(),D=[]){super(void 0,p,D),x(this,"type","parameter");const B=new b.Token(typeof e=="number"?void 0:e,p,D,{}),U=new b.Token(T,p,D);B.type="parameter-key",U.type="parameter-value",U.setAttribute("stage",2),this.append(B,U)}get anon(){return this.firstChild.length===0}afterBuild(){const e=new Set(["comment","noinclude","include"]);if(!this.anon){const T=this.firstChild.toString(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),{parentNode:p}=this;this.setAttribute("name",T),p&&p.getArgs(T,!1,!1).add(this)}}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(e){return this.anon||e===1?0:1}lint(e=this.getAbsoluteIndex()){var T;const p=super.lint(e),{firstChild:D}=this,B=(T=new RegExp(`https?://${$._X}${$.Qk}$`,"iu").exec(D.toString(new Set(["comment","noinclude","include"]))))==null?void 0:T[0];if(B&&new URL(B).search){const U=(0,W.D)(D,{start:e},"unescaped query string in an anonymous parameter");p.push({...U,startIndex:U.endIndex,endIndex:U.endIndex+1,startLine:U.endLine,startCol:U.endCol,endCol:U.endCol+1})}return p}print(){return super.print({sep:this.anon?"":"="})}}var n=t(34),r=t(669),d=Object.defineProperty,i=(f,e,T)=>e in f?d(f,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[e]=T,l=(f,e,T)=>(i(f,typeof e!="symbol"?e+"":e,T),T),s=(f,e,T)=>{if(!e.has(f))throw TypeError("Cannot "+T)},a=(f,e,T)=>(s(f,e,"read from private field"),T?T.call(f):e.get(f)),c=(f,e,T)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,T)},v=(f,e,T,p)=>(s(f,e,"write to private field"),p?p.call(f,T):e.set(f,T),T),_=(f,e,T)=>(s(f,e,"access private method"),T),m,F,K,G,Q,L;class w extends b.Token{constructor(e,T,p=I.default.getConfig(),D=[]){var B,U;super(void 0,p,D,{}),c(this,Q),l(this,"type","template"),l(this,"modifier",""),c(this,m,void 0),c(this,F,!0),c(this,K,!1),c(this,G,new Map);const{parserFunction:[z,V]}=p,X=(B=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:B[0];if(X)this.setAttribute("modifier",X),e=e.slice(X.length);else if(e.includes(":")){const[et,...tt]=e.split(":"),[nt]=/^(?:\s|\0\d+c\x7F)*/u.exec((U=tt[0])!=null?U:"");this.setModifier(`${et}:${nt}`)&&(e=tt.join(":").slice(nt.length))}if(e.includes(":")||T.length===0&&!a(this,K)){const[et,...tt]=e.split(":"),nt=(0,$.PN)(et),k=nt.trim(),it=V.includes(k),q=z[k.toLowerCase()];if(!(tt.length>0&&/\s$/u.test(nt))&&(it||q)){this.setAttribute("name",q!=null?q:k.toLowerCase()),this.type="magic-word";const st=new RegExp(`^\\s*${k}\\s*$`,it?"u":"iu"),lt=new r.SyntaxToken(et,st,"magic-word-name",p,D,{});if(super.insertAt(lt),tt.length>0&&T.unshift([tt.join(":")]),this.name==="invoke")for(let dt=0;dt<2;dt++){const ft=T.shift();if(!ft)break;const rt=new n.D(ft.join("="),`invoke-${dt?"function":"module"}`,p,D);super.insertAt(rt)}}}if(this.type==="template"){const et=(0,$.PN)((0,$.m9)(e)).split("#")[0].trim();if(!et||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(et))throw D.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${(0,$.jq)(et)}`);const tt=new n.D(e,"template-name",p,D,{});super.insertAt(tt)}const J=this.isTemplate();let j=1;for(let et=0;et<T.length;et++){const tt=T[et];!J&&!(this.name==="switch"&&et>0)&&(tt[0]=tt.join("="),tt.length=1),tt.length===1&&(tt.unshift(j),j++),this.insertAt(new o(...tt,p,D))}}setModifier(e){const{parserFunction:[,,T,p]}=this.getAttribute("config"),D=(0,$.PN)(e).trim();if(e&&!D.endsWith(":"))return!1;const B=D.slice(0,-1).toLowerCase(),U=T.includes(B),z=p.includes(B);return a(this,K)&&U||!a(this,K)&&(z||e==="")||this.length>1&&(U||z||e==="")?(this.setAttribute("modifier",e),v(this,K,U),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){if(this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,"string")),this.isTemplate()){const e=this.type==="template",T=this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828);v(this,m,T.fragment),v(this,F,T.valid)}}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(T=>T.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){const{childNodes:e,length:T,firstChild:p,modifier:D,type:B,name:U}=this;return B==="magic-word"&&U==="vardefine"?"":`{{${D}${B==="magic-word"?`${p.text()}${T===1?"":":"}${(0,$.fL)(e.slice(1),"|")}`:super.text("|")}}}`}getPadding(){return this.modifier.length+2}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){const T=super.lint(e),{type:p,childNodes:D}=this;let B;if(this.isTemplate())a(this,m)!==void 0&&(B={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,W.D)(D[p==="template"?0:1],B,"useless fragment")));else return T;a(this,F)||(B={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,W.D)(D[1],B,"illegal module name")));const U=this.getDuplicatedArgs();return U.length>0&&(B!=null||(B={start:e,...this.getRootNode().posFromIndex(e)}),T.push(...U.flatMap(([,z])=>z).map(z=>(0,W.D)(z,B,"duplicated parameter")))),T}insertAt(e,T=this.length){return super.insertAt(e,T),e.anon?_(this,Q,L).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(e=>e.type==="parameter")}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,T=!1,p=!0){const D=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let B;return a(this,G).has(D)?B=a(this,G).get(D):(B=new Set(this.getAllArgs().filter(({name:U})=>D===U)),a(this,G).set(D,B)),B}getDuplicatedArgs(){return this.isTemplate()?[...a(this,G)].filter(([,{size:e}])=>e>1).map(([e,T])=>[e,[...T]]):[]}getPossibleValues(){const{type:e,name:T,childNodes:p,constructor:{name:D}}=this;if(e==="template")throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let B;switch(T){case"if":case"ifexist":case"ifexpr":case"iferror":B=2;break;case"ifeq":B=3;break;default:throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const U=p.slice(B,B+2).map(({childNodes:[,z]})=>z);for(let z=0;z<U.length;){const{length:V,0:X}=U[z].childNodes.filter(J=>J.text().trim());if(V===0)U.splice(z,1);else if(V>1||X.type!=="magic-word")z++;else try{const J=X.getPossibleValues();U.splice(z,1,...J),z+=J.length}catch(J){z++}}return U}print(){const{childNodes:e,length:T,firstChild:p,modifier:D,type:B}=this;return`<span class="wpb-${B}">{{${D}${B==="magic-word"?`${p.print()}${T===1?"":":"}${(0,$.S0)(e.slice(1),{sep:"|"})}`:(0,$.S0)(e,{sep:"|"})}}}</span>`}}m=new WeakMap,F=new WeakMap,K=new WeakMap,G=new WeakMap,Q=new WeakSet,L=function(f){const e=this.getAnonArgs(),T=typeof f!="number";for(let p=T?e.indexOf(f):f-1;p<e.length;p++){const D=e[p],{name:B}=D,U=String(p+1);B!==U&&(D.setAttribute("name",U),this.getArgs(U,!1,!1).add(D))}};var E=t(465),O=Object.defineProperty,y=(f,e,T)=>e in f?O(f,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[e]=T,g=(f,e,T)=>(y(f,typeof e!="symbol"?e+"":e,T),T);class u extends b.Token{constructor(e,T=I.default.getConfig(),p=[]){super(void 0,T,p,{}),g(this,"type","arg");for(let D=0;D<e.length;D++)if(D===0){const B=new n.D(e[D],"arg-name",T,p,{});super.insertAt(B)}else if(D>1){const B=new E.R(e[D],T,p,{});super.insertAt(B)}else{const B=new b.Token(e[D],T,p);B.type="arg-default",B.setAttribute("stage",2),super.insertAt(B)}}get default(){var e,T;return(T=(e=this.childNodes[1])==null?void 0:e.text())!=null?T:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${(0,$.fL)(this.childNodes.slice(0,2),"|")}}}}`}getPadding(){return 3}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){if(!this.getAttribute("include"))return[(0,W.Y)(this,{start:e},"unexpected template argument")];const{childNodes:[T,p,...D]}=this,B=T.lint(e+3);if(p&&B.push(...p.lint(e+4+String(T).length)),D.length>0){const U={start:e,...this.getRootNode().posFromIndex(e)};B.push(...D.map(z=>{const V=(0,W.D)(z,U,"invisible content inside triple braces"),{startIndex:X,startCol:J}=V;return{...V,startIndex:X-1,startCol:J-1}}))}return B}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}const C=(f,e=I.default.getConfig(),T=[])=>{var p,D,B,U,z,V;const X=`${(p=e.excludes)!=null&&p.includes("heading")?"":"^(\0\\d+c\x7F)*={1,6}|"}\\[\\[|\\{{2,}|-\\{(?!\\{)`,{parserFunction:[,,,J]}=e,j=[],et={"=":`
2
+ `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},tt=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]);let nt=new RegExp(X,"gmu"),k=nt.exec(f),it=f.includes("}}"),q;for(;k||q!==void 0&&q<=f.length&&((B=(D=j[j.length-1])==null?void 0:D[0])!=null&&B.startsWith("="));){if(k!=null&&k[1]){const[,{length:ht}]=k;k[0]=k[0].slice(ht),k.index+=ht}const{0:st,index:lt}=k!=null?k:{0:`
3
+ `,index:f.length},dt=(U=j.pop())!=null?U:{},{0:ft,index:rt,parts:pt,findEqual:At,pos:Ct}=dt,$t=st==="="&&At;if(st==="]]"||st==="}-")q=lt+2;else if(st===`
4
+ `){q=lt+1;const{pos:ht,findEqual:ct}=(z=j[j.length-1])!=null?z:{};if(ht===void 0||ct||(0,$.PN)(f.slice(ht,rt))!==""){const gt=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(f.slice(rt,lt));gt&&(f=`${f.slice(0,rt)}\0${T.length}h\x7F${f.slice(lt)}`,q=rt+4+String(T.length).length,new R.D(gt[1].length,gt.slice(2),e,T))}}else if(st==="|"||$t)q=lt+1,pt[pt.length-1].push(f.slice(Ct,lt)),st==="|"&&pt.push([]),dt.pos=q,dt.findEqual=st==="|",j.push(dt);else if(st.startsWith("}}")){const ht=st.slice(0,Math.min(ft.length,3)),ct=ft.length-ht.length,{length:gt}=T;q=lt+ht.length,pt[pt.length-1].push(f.slice(Ct,lt));let St=!1,vt="t";if(ht.length===3){const at=pt.map(_t=>_t.join("=")),Et=at.length>1&&(0,$.PN)(at[1]).trim();new u(at,e,T),Et&&Et.endsWith(":")&&J.includes(Et.slice(0,-1).toLowerCase())&&(vt="s")}else try{new w(pt[0][0],pt.slice(1),e,T);const at=(0,$.PN)(pt[0][0]).trim();tt.has(at)?vt=tt.get(at):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(at)?vt="m":/^#vardefine:./iu.test(at)&&(vt="c")}catch(at){if(at instanceof SyntaxError&&at.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))q=rt+ft.length,St=!0;else throw at}St||(f=`${f.slice(0,rt+ct)}\0${gt}${vt}\x7F${f.slice(q)}`,q=rt+ct+3+String(gt).length,ct>1?j.push({0:ft.slice(0,ct),index:rt,pos:rt+ct,parts:[[]]}):ct===1&&f[rt-1]==="-"&&j.push({0:"-{",index:rt-1,pos:rt+1,parts:[[]]}))}else q=lt+st.length,st.startsWith("{")&&(k.pos=q,k.parts=[[]]),j.push(..."0"in dt?[dt]:[],k);it&&(it=f.slice(q).includes("}}"));let xt=j[j.length-1];!it&&((V=xt==null?void 0:xt[0])!=null&&V.startsWith("{"))&&(j.pop(),xt=j[j.length-1]),nt=new RegExp(X+(xt?`|${et[xt[0][0]]}${xt.findEqual?"|=":""}`:""),"gmu"),nt.lastIndex=q,k=nt.exec(f)}return f}},551:(Y,M,t)=>{t.r(M),t.d(M,{parseCommentAndExt:()=>a});var $=t(891),I=t(541),R=Object.defineProperty,W=(c,v,_)=>v in c?R(c,v,{enumerable:!0,configurable:!0,writable:!0,value:_}):c[v]=_,b=(c,v,_)=>(W(c,typeof v!="symbol"?v+"":v,_),_);class S extends I.Token{constructor(){super(...arguments),b(this,"type","onlyinclude")}toString(v){return`<onlyinclude>${super.toString()}</onlyinclude>`}getPadding(){return 13}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}var P=t(826),x=t(959),o=t(415),n=Object.defineProperty,r=(c,v,_)=>v in c?n(c,v,{enumerable:!0,configurable:!0,writable:!0,value:_}):c[v]=_,d=(c,v,_)=>(r(c,typeof v!="symbol"?v+"":v,_),_);class i extends(0,x.a)(o.m){constructor(v,_="",m,F,K=$.default.getConfig(),G=[]){super(v,_,m!=null?m:"",m===void 0||F!=null?F:"",K,G),d(this,"type","include")}}var l=t(895),s=t(976);const a=(c,v=$.default.getConfig(),_=[],m=!1)=>{const F="<onlyinclude>",K="</onlyinclude>",{length:G}=F;if(m){let O=c.indexOf(F),y=c.indexOf(K,O+G);if(O!==-1&&y!==-1){let g="";for(;O!==-1&&y!==-1;){const u=`\0${_.length}e\x7F`;new S(c.slice(O+G,y),v,_),O>0?(new P.O(c.slice(0,O),v,_),g+=`\0${_.length-1}c\x7F${u}`):g+=u,c=c.slice(y+G+1),O=c.indexOf(F),y=c.indexOf(K,O+G)}return`${g}${c}`}}const Q=v.ext.join("|"),L=m?"includeonly":"(?:no|only)include",w=m?"noinclude":"includeonly",E=new RegExp(`<!--.*?(?:-->|$)|<${L}(?:\\s[^>]*?)?>|</${L}\\s*>|<(${Q})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${w})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return c.replace(E,(O,y,g,u,C,f,e,T,p)=>{const D=`\0${_.length}${y?"e":"c"}\x7F`;if(y)new l.$(y,g,u,C,v,_);else if(O.startsWith("<!--")){const B=O.endsWith("-->");new s.T(O.slice(4,B?-3:void 0),B,v,_)}else f?new i(f,e,T,p,v,_):new P.O(O,v,_);return D})}},295:(Y,M,t)=>{t.r(M),t.d(M,{parseConverter:()=>Q});var $=t(891),I=t(467),R=t(541),W=t(169),b=t(34),S=Object.defineProperty,P=(L,w,E)=>w in L?S(L,w,{enumerable:!0,configurable:!0,writable:!0,value:E}):L[w]=E,x=(L,w,E)=>(P(L,typeof w!="symbol"?w+"":w,E),E),o=(L,w,E)=>{if(!w.has(L))throw TypeError("Cannot "+E)},n=(L,w,E)=>(o(L,w,"read from private field"),E?E.call(L):w.get(L)),r=(L,w,E)=>{if(w.has(L))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(L):w.set(L,E)},d=(L,w,E,O)=>(o(L,w,"write to private field"),O?O.call(L,E):w.set(L,E),E),i;const l=new Set(["A","T","R","D","-","H","N"]);class s extends R.Token{constructor(w,E=$.default.getConfig(),O=[]){super(void 0,E,O,{}),x(this,"type","converter-flags"),r(this,i,void 0),this.append(...w.map(y=>new b.D(y,"converter-flag",E,O)))}afterBuild(){d(this,i,this.childNodes.map(w=>w.text().trim()))}toString(w){return super.toString(w,";")}text(){return super.text(";")}getGaps(w){return w<this.length-1?1:0}getUnknownFlags(){return new Set(n(this,i).filter(w=>/\{{3}[^{}]+\}{3}/u.test(w)))}getVariantFlags(){const w=new Set(this.getAttribute("config").variants);return new Set(n(this,i).filter(E=>w.has(E)))}lint(w=this.getAbsoluteIndex()){const E=this.getVariantFlags(),O=this.getUnknownFlags(),y=new Set(n(this,i).filter(p=>l.has(p))),{length:g}=n(this,i).filter(p=>!p),u=n(this,i).length-O.size-g,C=super.lint(w);if(E.size===u||y.size===u)return C;const f={start:w,...this.getRootNode().posFromIndex(w)},{childNodes:e,length:T}=this;for(let p=0;p<T;p++){const D=e[p],B=D.text().trim();if(B&&!E.has(B)&&!O.has(B)&&(E.size>0||!y.has(B))){const U=(0,W.D)(D,f,"invalid conversion flag");C.push(U)}}return C}print(){return super.print({sep:";"})}}i=new WeakMap;var a=Object.defineProperty,c=(L,w,E)=>w in L?a(L,w,{enumerable:!0,configurable:!0,writable:!0,value:E}):L[w]=E,v=(L,w,E)=>(c(L,typeof w!="symbol"?w+"":w,E),E);class _ extends R.Token{constructor(w,E=!0,O=$.default.getConfig(),y=[]){if(super(void 0,O,y),v(this,"type","converter-rule"),E){const g=w.indexOf(":"),u=w.slice(0,g).indexOf("=>"),C=u===-1?w.slice(0,g):w.slice(u+2,g);O.variants.includes(C.trim())?(super.insertAt(new b.D(C,"converter-rule-variant",O,y)),super.insertAt(new b.D(w.slice(g+1),"converter-rule-to",O,y)),u!==-1&&super.insertAt(new b.D(w.slice(0,u),"converter-rule-from",O,y),0)):super.insertAt(new b.D(w,"converter-rule-noconvert",O,y))}else super.insertAt(new b.D(w,"converter-rule-noconvert",O,y))}toString(w){const{childNodes:E}=this;if(E.length===3){const[O,y,g]=E;return`${O.toString(w)}=>${y.toString(w)}:${g.toString(w)}`}return super.toString(w,":")}text(){const{childNodes:w}=this;if(w.length===3){const[E,O,y]=w;return`${E.text()}=>${O.text()}:${y.text()}`}return super.text(":")}getGaps(w){return w===0&&this.length===3?2:1}print(){const{childNodes:w}=this;if(w.length===3){const[E,O,y]=w;return`<span class="wpb-converter-rule">${E.print()}=>${O.print()}:${y.print()}</span>`}return super.print({sep:":"})}}var m=Object.defineProperty,F=(L,w,E)=>w in L?m(L,w,{enumerable:!0,configurable:!0,writable:!0,value:E}):L[w]=E,K=(L,w,E)=>(F(L,typeof w!="symbol"?w+"":w,E),E);class G extends R.Token{constructor(w,E,O=$.default.getConfig(),y=[]){super(void 0,O,y),K(this,"type","converter"),this.append(new s(w,O,y));const[g]=E,u=g.includes(":"),C=new _(g,u,O,y);u&&C.length===1?this.insertAt(new _(E.join(";"),!1,O,y)):this.append(C,...E.slice(1).map(f=>new _(f,!0,O,y)))}toString(w){const{childNodes:[E,...O]}=this;return`-{${E.toString()}${E.length>0?"|":""}${O.map(y=>y.toString()).join(";")}}-`}text(){const{childNodes:[w,...E]}=this;return`-{${w.text()}|${(0,I.fL)(E,";")}}-`}getPadding(){return 2}getGaps(w){return w||this.firstChild.length>0?1:0}print(){const{childNodes:[w,...E]}=this;return`<span class="wpb-converter">-{${w.print()}${w.length>0?"|":""}${(0,I.S0)(E,{sep:";"})}}-</span>`}}const Q=(L,w=$.default.getConfig(),E=[])=>{const O=/-\{/gu,y=/-\{|\}-/gu,g=[];let u=O,C=u.exec(L);for(;C;){const{0:f,index:e}=C;if(f==="}-"){const T=g.pop(),{length:p}=E,D=L.slice(T.index+2,e),B=D.indexOf("|"),[U,z]=B===-1?[[],D]:[D.slice(0,B).split(";"),D.slice(B+1)],V=z.replace(/(&[#a-z\d]+);/giu,"$1"),X=`(?:${w.variants.join("|")})`,J=V.split(new RegExp(`;(?=\\s*(?:${X}|[^;]*?=>\\s*${X})\\s*:)`,"u")).map(j=>j.replace(/\x01/gu,";"));new G(U,J,w,E),L=`${L.slice(0,T.index)}\0${p}v\x7F${L.slice(e+2)}`,g.length===0&&(u=O),u.lastIndex=T.index+3+String(p).length}else g.push(C),u=y,u.lastIndex=e+2;C=u.exec(L)}return L}},418:(Y,M,t)=>{t.r(M),t.d(M,{parseExternalLinks:()=>W});var $=t(467),I=t(891),R=t(944);const W=(b,S=I.default.getConfig(),P=[])=>{const x=new RegExp(`\\[((?:(?:${S.protocol}|//)${$._X}|\0\\d+m\x7F)${$.Qk})(\\p{Zs}*)([^\\]-\b
5
+ -\uFFFD]*)\\]`,"giu");return b.replace(x,(o,n,r,d)=>{const{length:i}=P,l=/&[lg]t;/u.exec(n);return l&&(n=n.slice(0,l.index),r="",d=`${n.slice(l.index)}${r}${d}`),new R.a(n,r,d,S,P),`\0${i}w\x7F`})}},362:(Y,M,t)=>{t.r(M),t.d(M,{parseHrAndDoubleUnderscore:()=>i});var $=t(891),I=t(439),R=Object.defineProperty,W=(l,s,a)=>s in l?R(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a,b=(l,s,a)=>(W(l,typeof s!="symbol"?s+"":s,a),a);class S extends I.h{constructor(){super(...arguments),b(this,"type","hr")}}var P=t(959),x=Object.defineProperty,o=(l,s,a)=>s in l?x(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a,n=(l,s,a)=>(o(l,typeof s!="symbol"?s+"":s,a),a);class r extends(0,P.a)(I.h){constructor(s,a,c=$.default.getConfig(),v=[]){super(s,c,v),n(this,"type","double-underscore")}getPadding(){return 2}toString(s){return`__${this.firstChild.data}__`}print(){return super.print({pre:"__",post:"__"})}}var d=t(485);const i=({firstChild:{data:l},type:s,name:a},c=$.default.getConfig(),v=[])=>{const{doubleUnderscore:_}=c,m=new Set(_[0]),F=new Set(_[1]);return s!=="root"&&(s!=="ext-inner"||a!=="poem")&&(l=`\0${l}`),l=l.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(K,G,Q)=>(new S(Q,c,v),`${G}\0${v.length-1}r\x7F`)).replace(new RegExp(`__(${_.flat().join("|")})__`,"giu"),(K,G)=>{const Q=F.has(G);return Q||m.has(G.toLowerCase())?(new r(G,Q,c,v),`\0${v.length-1}u\x7F`):K}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(K,G,Q,L,w)=>{const E=`${G}\0${v.length}h\x7F`;return new d.D(Q.length,[L,w],c,v),E}),s==="root"||s==="ext-inner"&&a==="poem"?l:l.slice(1)}},980:(Y,M,t)=>{t.r(M),t.d(M,{parseHtml:()=>v});var $=t(891),I=t(83),R=t(169),W=t(467),b=t(541),S=Object.defineProperty,P=(_,m,F)=>m in _?S(_,m,{enumerable:!0,configurable:!0,writable:!0,value:F}):_[m]=F,x=(_,m,F)=>(P(_,typeof m!="symbol"?m+"":m,F),F),o=(_,m,F)=>{if(!m.has(_))throw TypeError("Cannot "+F)},n=(_,m,F)=>(o(_,m,"read from private field"),F?F.call(_):m.get(_)),r=(_,m,F)=>{if(m.has(_))throw TypeError("Cannot add the same private member more than once");m instanceof WeakSet?m.add(_):m.set(_,F)},d=(_,m,F,K)=>(o(_,m,"write to private field"),K?K.call(_,F):m.set(_,F),F),i,l,s;const a=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]);class c extends b.Token{constructor(m,F,K,G,Q=$.default.getConfig(),L=[]){super(void 0,Q,L),x(this,"type","html"),r(this,i,void 0),r(this,l,void 0),r(this,s,void 0),this.insertAt(F),this.setAttribute("name",m.toLowerCase()),d(this,i,K),d(this,l,G),d(this,s,m)}get closing(){return n(this,i)}toString(m){return`<${n(this,i)?"/":""}${n(this,s)}${super.toString()}${n(this,l)?"/":""}>`}text(){return`<${n(this,i)?"/":""}${n(this,s)}${n(this,i)?"":super.text()}${n(this,l)?"/":""}>`}getPadding(){return n(this,s).length+(n(this,i)?2:1)}lint(m=this.getAbsoluteIndex()){const F=super.lint(m);let K;this.name==="h1"&&!n(this,i)&&(K=(0,R.Y)(this,{start:m},"<h1>"),F.push(K)),this.closest("table-attrs")&&(K!=null||(K=(0,R.Y)(this,{start:m},"")),F.push({...K,message:$.default.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(G){if(G instanceof SyntaxError){const{message:Q}=G;K!=null||(K=(0,R.Y)(this,{start:m},""));const[L]=Q.split(":"),w={...K,message:$.default.msg(L)};if(L==="unclosed tag")w.severity="warning";else if(L==="unmatched closing tag"){const E=this.closest("magic-word");E&&a.has(E.name)&&(w.severity="warning")}F.push(w)}}return F}findMatchingTag(){const{html:m}=this.getAttribute("config"),{name:F,parentNode:K}=this,G=(0,W.jq)(String(this));if(n(this,i)&&(n(this,l)||m[2].includes(F)))throw new SyntaxError(`tag that is both closing and self-closing: ${G}`);if(m[2].includes(F)||n(this,l)&&m[1].includes(F))return this;if(n(this,l)&&m[0].includes(F))throw new SyntaxError(`invalid self-closing tag: ${G}`);if(!K)return;const{childNodes:Q}=K,L=Q.indexOf(this),w=n(this,i)?Q.slice(0,L).reverse().filter(({type:O,name:y})=>O==="html"&&y===F):Q.slice(L+1).filter(({type:O,name:y})=>O==="html"&&y===F);let E=n(this,i)?-1:1;for(const O of w)if(O.closing?E--:E++,E===0)return O;throw new SyntaxError(`${n(this,i)?"unmatched closing":"unclosed"} tag: ${G}`)}print(){return super.print({pre:`&lt;${n(this,i)?"/":""}${n(this,s)}`,post:`${n(this,l)?"/":""}&gt;`})}}i=new WeakMap,l=new WeakMap,s=new WeakMap;const v=(_,m=$.default.getConfig(),F=[])=>{const K=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,G=new Set(m.html.flat()),Q=_.split("<");let L=Q.shift();for(const w of Q){const E=K.exec(w),O=E==null?void 0:E[2],y=O==null?void 0:O.toLowerCase();if(!E||!G.has(y)){L+=`<${w}`;continue}const[,g,,u="",C,f]=E,e=new I.x(u,"html-attrs",y,m,F),T=e.getAttr("itemprop");if(y==="meta"&&(T===void 0||e.getAttr("content")===void 0)||y==="link"&&(T===void 0||e.getAttr("href")===void 0)){L+=`<${w}`,F.pop();continue}L+=`\0${F.length}x\x7F${f}`,new c(O,e,g==="/",C==="/>",m,F)}return L}},106:(Y,M,t)=>{t.r(M),t.d(M,{parseLinks:()=>x});var $=t(891),I=t(524),R=t(533),W=Object.defineProperty,b=(o,n,r)=>n in o?W(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,S=(o,n,r)=>(b(o,typeof n!="symbol"?n+"":n,r),r);class P extends I.h{constructor(){super(...arguments),S(this,"type","category")}}const x=(o,n=$.default.getConfig(),r=[])=>{const{parseQuotes:d}=t(704),i=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,l=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${n.protocol})`,"iu"),a=o.split("[[");let c=a.shift();for(let v=0;v<a.length;v++){let _=!1,m,F,K,G;const Q=a[v],L=i.exec(Q);if(L)[,m,F,K,G]=L,G.startsWith("]")&&(K!=null&&K.includes("["))&&(K+="]",G=G.slice(1));else{const u=l.exec(Q);u&&(_=!0,[,m,F,K]=u)}if(m===void 0||s.test(m)||/\0\d+[exhbru]\x7F/u.test(m)){c+=`[[${Q}`;continue}const w=m.trim().startsWith(":");if(w&&_){c+=`[[${Q}`;continue}const E=$.default.normalizeTitle(m,0,!1,n,!0,!0,!0),{ns:O,valid:y}=E;if(y){if(_){if(O!==6){c+=`[[${Q}`;continue}let u=!1;for(v++;v<a.length;v++){const C=a[v],f=C.split("]]");if(f.length>2){u=!0,K+=`[[${f[0]}]]${f[1]}`,G=f.slice(2).join("]]");break}else if(f.length===2)K+=`[[${f[0]}]]${f[1]}`;else{K+=`[[${C}`;break}}if(K=x(K,n,r),!u){c+=`[[${m}${F}${K}`;continue}}}else{c+=`[[${Q}`;continue}K&&(K=d(K,n,r)),c+=`\0${r.length}l\x7F${G}`;let g=I.h;w||(O===6?g=R.q:O===14&&(g=P)),K===void 0&&F&&(K=""),new g(m,K,n,r,F)}return c}},904:(Y,M,t)=>{t.r(M),t.d(M,{parseList:()=>x});var $=t(891),I=t(933),R=Object.defineProperty,W=(o,n,r)=>n in o?R(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,b=(o,n,r)=>(W(o,typeof n!="symbol"?n+"":n,r),r);class S extends I.T{constructor(){super(...arguments),b(this,"type","list")}}var P=t(461);const x=(o,n=$.default.getConfig(),r=[])=>{const d=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(o);if(!d)return o;const[i,l,s]=d;let a=`${l}\0${r.length}d\x7F${o.slice(i.length)}`,c=s.split(";").length-1;if(new S(s,n,r),!c)return a;let v=/:+|-\{/gu,_=v.exec(a),m=0;for(;_&&c;){const{0:F,index:K}=_;if(F.startsWith(":")){if(F.length>=c)return new P.k(":".repeat(c),n,r),`${a.slice(0,K)}\0${r.length-1}d\x7F${a.slice(K+c)}`;a=`${a.slice(0,K)}\0${r.length}d\x7F${a.slice(v.lastIndex)}`,c-=F.length,v.lastIndex=K+4+String(r.length).length,new P.k(F,n,r)}else if(F==="-{"){if(!m){const{lastIndex:G}=v;v=/-\{|\}-/gu,v.lastIndex=G}m++}else if(m--,!m){const{lastIndex:G}=v;v=/:+|-\{/gu,v.lastIndex=G}_=v.exec(a)}return a}},311:(Y,M,t)=>{t.r(M),t.d(M,{parseMagicLinks:()=>W});var $=t(467),I=t(891),R=t(686);const W=(b,S=I.default.getConfig(),P=[])=>{const x=new RegExp(`(^|[^\\p{L}\\d_])(?:${S.protocol})(${$._X}${$.Qk})`,"giu");return b.replace(x,(o,n,r)=>{let d="",i=n?o.slice(1):o;const l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(i);l&&(d=i.slice(l.index),i=i.slice(0,l.index));const s=new RegExp(`[,;.:!?${i.includes("(")?"":")"}]+$`,"u"),a=s.exec(i);if(a){let c=0;a[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(i.slice(0,a.index))&&(c=1),d=`${i.slice(a.index+c)}${d}`,i=i.slice(0,a.index+c)}return d.length>=r.length?o:(new R.k(i,!1,S,P),`${n}\0${P.length-1}w\x7F${d}`)})}},704:(Y,M,t)=>{t.r(M),t.d(M,{parseQuotes:()=>x});var $=t(891),I=t(169),R=t(439),W=Object.defineProperty,b=(o,n,r)=>n in o?W(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,S=(o,n,r)=>(b(o,typeof n!="symbol"?n+"":n,r),r);class P extends R.h{constructor(){super(...arguments),S(this,"type","quote")}lint(n=this.getAbsoluteIndex()){const{previousSibling:r,nextSibling:d}=this,i=$.default.msg('lonely "$1"',"'"),l=[];let s;if((r==null?void 0:r.type)==="text"&&r.data.endsWith("'")){s=(0,I.Y)(this,{start:n},i);const{startIndex:a,startLine:c,startCol:v}=s,[,{length:_}]=r.data.match(/(?:^|[^'])('+)$/u),m=n-_;l.push({...s,startIndex:m,endIndex:a,startCol:v-_,endLine:c,endCol:v})}if((d==null?void 0:d.type)==="text"&&d.data.startsWith("'")){s!=null||(s=(0,I.Y)(this,{start:n},i));const{endIndex:a,endLine:c,endCol:v}=s,[{length:_}]=d.data.match(/^'+/u),m=a+_;l.push({...s,startIndex:a,endIndex:m,startLine:c,startCol:v,endCol:v+_})}return l}}const x=(o,n=$.default.getConfig(),r=[])=>{var d;const i=o.split(/('{2,})/u),{length:l}=i;if(l===1)return o;let s=0,a=0,c,v,_;for(let m=1;m<l;m+=2){const{length:F}=i[m];switch(F){case 2:a++;break;case 4:i[m-1]+="'",i[m]="'''";case 3:if(s++,c!==void 0)break;i[m-1].endsWith(" ")?v===void 0&&_===void 0&&(_=m):i[m-1].slice(-2,-1)===" "?c=m:v!=null||(v=m);break;default:i[m-1]+="'".repeat(F-5),i[m]="'''''",a++,s++}}if(a%2===1&&s%2===1){const m=(d=c!=null?c:v)!=null?d:_;m!==void 0&&(i[m]="''",i[m-1]+="'")}for(let m=1;m<l;m+=2)new P(i[m],n,r),i[m]=`\0${r.length-1}q\x7F`;return i.join("")}},508:(Y,M,t)=>{t.r(M),t.d(M,{parseTable:()=>O});var $=t(891),I=t(541),R=t(169),W=t(669),b=t(83);class S extends I.Token{constructor(g,u,C,f=$.default.getConfig(),e=[],T={}){super(void 0,f,e,T),this.append(new W.SyntaxToken(u,g,"table-syntax",f,e,{}),new b.x(C,"table-attrs",this.type,f,e))}}class P extends S{lint(g=this.getAbsoluteIndex()){const u=super.lint(g),C=this.childNodes.find(({type:p})=>p==="table-inter");if(!C)return u;const f=C.childNodes.find(p=>p.text().trim()),e=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!f||e.test(String(f))||f.type==="arg"&&e.test(f.default||""))return u;if(f.type==="magic-word")try{if(f.getPossibleValues().every(p=>e.test(p.text())))return u}catch(p){}const T=(0,R.D)(C,{start:g},"content to be moved out from the table");return u.push({...T,startIndex:T.startIndex+1,startLine:T.startLine+1,startCol:0}),u}text(){const g=super.text();return this.type==="tr"&&!g.trim().includes(`
6
+ `)?"":g}}var x=Object.defineProperty,o=(y,g,u)=>g in y?x(y,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[g]=u,n=(y,g,u)=>(o(y,typeof g!="symbol"?g+"":g,u),u);const r=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u;class d extends P{constructor(g,u,C=$.default.getConfig(),f=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,g,u,C,f,{}),n(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(g=this.getAbsoluteIndex()){const u=super.lint(g);if(!this.closed){const{firstChild:C}=this,f=(0,R.D)(C,{start:g},"unclosed table");u.push(f)}return u}close(g=`
7
+ |}`,u=!1){const C=this.getAttribute("config"),f=this.getAttribute("accum");super.insertAt($.default.run(()=>new W.SyntaxToken(g,r,"table-syntax",C,f,{})))}}var i=Object.defineProperty,l=(y,g,u)=>g in y?i(y,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[g]=u,s=(y,g,u)=>(l(y,typeof g!="symbol"?g+"":g,u),u);class a extends P{constructor(g,u,C=$.default.getConfig(),f=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,g,u,C,f,{}),s(this,"type","tr")}}var c=Object.defineProperty,v=(y,g,u)=>g in y?c(y,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[g]=u,_=(y,g,u)=>(v(y,typeof g!="symbol"?g+"":g,u),u),m=(y,g,u)=>{if(!g.has(y))throw TypeError("Cannot "+u)},F=(y,g,u)=>(m(y,g,"read from private field"),u?u.call(y):g.get(y)),K=(y,g,u)=>{if(g.has(y))throw TypeError("Cannot add the same private member more than once");g instanceof WeakSet?g.add(y):g.set(y,u)},G=(y,g,u,C)=>(m(y,g,"write to private field"),C?C.call(y,u):g.set(y,u),u),Q=(y,g,u,C)=>({set _(f){G(y,g,f,u)},get _(){return F(y,g,C)}}),L;class w extends S{constructor(g,u,C=$.default.getConfig(),f=[]){var e;let T=u==null?void 0:u.match(/\||\0\d+!\x7F/u),p=T?u.slice(0,T.index):"";/\[\[|-\{/u.test(p)&&(T=void 0,p=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,g,p,C,f),_(this,"type","td"),K(this,L,""),T&&([Q(this,L)._]=T);const D=new I.Token(u==null?void 0:u.slice(((e=T==null?void 0:T.index)!=null?e:NaN)+F(this,L).length),C,f);D.type="td-inner",D.setAttribute("stage",4),this.insertAt(D)}get subtype(){return this.getSyntax().subtype}getSyntax(){const g=this.firstChild.text(),u=g[g.length-1];let C="td";return u==="!"?C="th":u==="+"&&(C="caption"),{subtype:C}}afterBuild(){F(this,L).includes("\0")&&G(this,L,this.buildFromStr(F(this,L),"string"))}toString(g){const{childNodes:[u,C,f]}=this;return`${u.toString()}${C.toString()}${F(this,L)}${f.toString()}`}text(){const{childNodes:[g,u,C]}=this;return`${g.text()}${u.text()}${F(this,L)}${C.text()}`}getGaps(g){return g===1?F(this,L).length:0}lint(g=this.getAbsoluteIndex()){const u=super.lint(g);g+=this.getRelativeIndex(this.length-1);for(const C of this.lastChild.childNodes)C.type==="text"&&C.data.includes("|")&&u.push((0,R.D)(C,{start:g},'additional "|" in a table cell',"warning"));return u}print(){const{childNodes:[g,u,C]}=this;return`<span class="wpb-td">${g.print()}${u.print()}${F(this,L)}${C.print()}</span>`}}L=new WeakMap;var E=t(461);const O=({firstChild:{data:y},type:g,name:u},C=$.default.getConfig(),f=[])=>{const e=[],T=y.split(`
8
+ `);let p=g==="root"||g==="parameter-value"||g==="ext-inner"&&u==="poem"?"":`
9
+ ${T.shift()}`;const D=(B,U)=>{if(!U){p+=B;return}const{lastChild:z}=U;if(z.constructor===I.Token)z.setText(String(z)+B);else{const V=new I.Token(B,C,f);V.type="table-inter",V.setAttribute("stage",3),U.insertAt(V)}};for(const B of T){let U=e.pop();const[z]=/^(?:\s|\0\d+c\x7F)*/u.exec(B),V=B.slice(z.length),X=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(V);if(X){for(;U&&U.type!=="td";)U=e.pop();const[,k,it,q,st]=X;k&&new E.k(k,C,f),D(`
10
+ ${z}${k&&`\0${f.length-1}d\x7F`}${it}\0${f.length}b\x7F`,U),e.push(...U?[U]:[],new d(q,st,C,f));continue}else if(!U){p+=`
11
+ ${B}`;continue}const J=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(V);if(!J){D(`
12
+ ${B}`,U),e.push(U);continue}const[,j,et,tt,nt]=J;if(j){for(;U.type!=="table";)U=e.pop();U.close(`
13
+ ${z}${j}`,!0),D(nt,e[e.length-1])}else if(et){U.type==="td"&&(U=e.pop()),U.type==="tr"&&(U=e.pop());const k=new a(`
14
+ ${z}${et}`,nt,C,f);e.push(U,k),U.insertAt(k)}else{U.type==="td"&&(U=e.pop());const k=tt==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let it=k.exec(nt),q=0,st=`
15
+ ${z}${tt}`;for(;it;)U.insertAt(new w(st,nt.slice(q,it.index),C,f)),{lastIndex:q}=k,[st]=it,it=k.exec(nt);const lt=new w(st,nt.slice(q),C,f);e.push(U,lt),U.insertAt(lt)}}return p.slice(1)}},34:(Y,M,t)=>{t.d(M,{D:()=>R});var $=t(891),I=t(541);class R extends I.Token{constructor(b,S,P=$.default.getConfig(),x=[],o){super(b,P,x,o),this.type=S}}},83:(Y,M,t)=>{t.d(M,{x:()=>L});var $=t(169),I=t(467),R=t(891),W=t(541),b=t(34),S=(w,E,O)=>{if(!E.has(w))throw TypeError("Cannot "+O)},P=(w,E,O)=>(S(w,E,"read from private field"),O?O.call(w):E.get(w)),x=(w,E,O)=>{if(E.has(w))throw TypeError("Cannot add the same private member more than once");E instanceof WeakSet?E.add(w):E.set(w,O)},o=(w,E,O,y)=>(S(w,E,"write to private field"),y?y.call(w,O):E.set(w,O),O),n,r,d;const i=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),l=new Set(["align"]),s=new Set(["cite"]),a=new Set(["cite","datetime"]),c=new Set(["width"]),v=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),_=new Set(["type"]),m={div:l,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,blockquote:s,q:s,p:l,br:new Set(["clear"]),pre:c,ins:a,del:a,ul:_,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:l,tr:new Set(["bgcolor","align","valign"]),td:v,th:v,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:c,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},F=new Set,K={nowiki:F,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:F,inputbox:F,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:F,poll:new Set(["id","show-results-before-voting"]),sm2:_,flashmp3:_,tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"])},G=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u");class Q extends W.Token{constructor(E,O,y,g="",u,C=[],f=R.default.getConfig(),e=[]){const T=new b.D(y,"attr-key",f,e,{});let p;if(y==="title"||O==="img"&&y==="alt")p=new W.Token(u,f,e,{}),p.type="attr-value",p.setAttribute("stage",R.default.MAX_STAGE-1);else if(O==="gallery"&&y==="caption"){const D={...f,excludes:[...f.excludes,"quote","extLink","magicLink","list"]};p=new W.Token(u,D,e,{}),p.type="attr-value",p.setAttribute("stage",5)}else if(O==="choose"&&(y==="before"||y==="after")){const D={...f,excludes:[...f.excludes,"heading","html","table","hr","list"]};p=new W.Token(u,D,e,{}),p.type="attr-value",p.setAttribute("stage",1)}else p=new b.D(u,"attr-value",f,e,{});super(void 0,f,e),x(this,n,void 0),x(this,r,void 0),x(this,d,void 0),this.type=E,this.append(T,p),o(this,n,g),o(this,r,C),o(this,d,O),this.setAttribute("name",(0,I.PN)(y).trim().toLowerCase())}get balanced(){return!P(this,n)||P(this,r)[0]===P(this,r)[1]}get tag(){return P(this,d)}get value(){return this.getValue()}afterBuild(){P(this,n).includes("\0")&&o(this,n,this.buildFromStr(P(this,n),"string")),this.parentNode&&o(this,d,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(E){const[O="",y=""]=P(this,r);return P(this,n)?`${super.toString(E,`${P(this,n)}${O}`)}${y}`:this.firstChild.toString(E)}text(){return P(this,n)?`${super.text(`${P(this,n).trim()}"`)}"`:this.firstChild.text()}getGaps(E){var O,y;return P(this,n)&&E===0?P(this,n).length+((y=(O=P(this,r)[0])==null?void 0:O.length)!=null?y:0):0}lint(E=this.getAbsoluteIndex()){var O;const y=super.lint(E),{balanced:g,firstChild:u,lastChild:C,type:f,name:e,value:T}=this,p=P(this,d);let D;if(!g){const B=this.getRootNode();D={start:E,...B.posFromIndex(E)};const U=(0,$.D)(C,D,"unclosed quotes","warning"),z=U.startIndex-1;y.push({...U,startIndex:z,startCol:U.startCol-1})}return K[p]&&!K[p].has(e)||(f!=="ext-attr"&&!/\{\{[^{]+\}\}/u.test(e)||p in m)&&!((O=m[p])!=null&&O.has(e))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(e)&&(p==="meta"||p==="link"||!i.has(e))?(D!=null||(D={start:E,...this.getRootNode().posFromIndex(E)}),y.push((0,$.D)(u,D,"illegal attribute name"))):e==="style"&&typeof T=="string"&&G.test(T)?(D!=null||(D={start:E,...this.getRootNode().posFromIndex(E)}),y.push((0,$.D)(C,D,"insecure style"))):e==="tabindex"&&typeof T=="string"&&T.trim()!=="0"&&(D!=null||(D={start:E,...this.getRootNode().posFromIndex(E)}),y.push((0,$.D)(C,D,"nonzero tabindex"))),y}getValue(){if(P(this,n)){const E=this.lastChild.text();return P(this,r)[1]?E:E.trim()}return this.type==="ext-attr"||""}print(){const[E="",O=""]=P(this,r);return P(this,n)?super.print({sep:`${P(this,n)}${E}`,post:O}):super.print()}}n=new WeakMap,r=new WeakMap,d=new WeakMap;class L extends W.Token{constructor(E,O,y,g=R.default.getConfig(),u=[]){if(super(void 0,g,u,{}),this.type=O,this.setAttribute("name",y),E){const C=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu");let f="",e=C.exec(E),T=0;const p=()=>{f&&(super.insertAt(new b.D(f,`${O.slice(0,-1)}-dirty`,g,u)),f="")};for(;e;){const{index:D,0:B,1:U,2:z,3:V,4:X,5:J,6:j}=e;if(f+=E.slice(T,D),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test((0,I.PN)(U).trim())){const et=X!=null?X:j,tt=[V,J],nt=new Q(O.slice(0,-1),y,U,z,et,tt,g,u);p(),super.insertAt(nt)}else f+=B;({lastIndex:T}=C),e=C.exec(E)}f+=E.slice(T),p()}}afterBuild(){if(this.type==="table-attrs"){const{parentNode:E}=this;this.setAttribute("name",(E==null?void 0:E.type)==="td"&&E.subtype==="caption"?"caption":E==null?void 0:E.type)}}getAttrTokens(E){return this.childNodes.filter(O=>O instanceof Q&&O.name===E.toLowerCase().trim())}getAttrToken(E){const O=this.getAttrTokens(E);return O[O.length-1]}getAttr(E){var O;return(O=this.getAttrToken(E))==null?void 0:O.getValue()}lint(E=this.getAbsoluteIndex()){const O=super.lint(E),{parentNode:y,length:g,childNodes:u}=this,C=new Map,f=new Set;let e;(y==null?void 0:y.type)==="html"&&y.closing&&this.text().trim()&&(e={start:E,...this.getRootNode().posFromIndex(E)},O.push((0,$.Y)(this,e,"attributes of a closing tag")));for(let T=0;T<g;T++){const p=u[T];if(p instanceof b.D&&p.text().trim())e!=null||(e={start:E,...this.getRootNode().posFromIndex(E)}),O.push((0,$.D)(p,e,"containing invalid attribute"));else if(p instanceof Q){const{name:D}=p;C.has(D)?(f.add(D),C.get(D).push(p)):D!=="class"&&C.set(D,[p])}}if(f.size>0){e!=null||(e={start:E,...this.getRootNode().posFromIndex(E)});for(const T of f)O.push(...C.get(T).map(p=>(0,$.D)(p,e,R.default.msg("duplicated $1 attribute",T))))}return O}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(E=>E.print(E instanceof b.D&&E.text().trim()?{class:"hidden"}:void 0)).join("")}</span>`:""}}},944:(Y,M,t)=>{t.d(M,{a:()=>d});var $=t(891),I=t(541),R=t(686),W=Object.defineProperty,b=(i,l,s)=>l in i?W(i,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[l]=s,S=(i,l,s)=>(b(i,typeof l!="symbol"?l+"":l,s),s),P=(i,l,s)=>{if(!l.has(i))throw TypeError("Cannot "+s)},x=(i,l,s)=>(P(i,l,"read from private field"),s?s.call(i):l.get(i)),o=(i,l,s)=>{if(l.has(i))throw TypeError("Cannot add the same private member more than once");l instanceof WeakSet?l.add(i):l.set(i,s)},n=(i,l,s,a)=>(P(i,l,"write to private field"),a?a.call(i,s):l.set(i,s),s),r;class d extends I.Token{constructor(l,s="",a="",c=$.default.getConfig(),v=[]){if(super(void 0,c,v,{}),S(this,"type","ext-link"),o(this,r,void 0),this.insertAt(new R.k(l,!0,c,v)),n(this,r,s),a){const _=new I.Token(a,c,v,{});_.type="ext-link-text",_.setAttribute("stage",$.default.MAX_STAGE-1),this.insertAt(_)}}toString(l){return this.length===1?`[${super.toString(l)}${x(this,r)}]`:`[${super.toString(l,x(this,r))}]`}text(){return`[${super.text(" ")}]`}getPadding(){return 1}getGaps(l){return l===0?x(this,r).length:0}print(){return super.print(this.length===1?{pre:"[",post:`${x(this,r)}]`}:{pre:"[",sep:x(this,r),post:"]"})}}r=new WeakMap},420:(Y,M,t)=>{t.r(M),t.d(M,{GalleryToken:()=>x});var $=t(891),I=t(541),R=t(39),W=t(465),b=Object.defineProperty,S=(o,n,r)=>n in o?b(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,P=(o,n,r)=>(S(o,typeof n!="symbol"?n+"":n,r),r);class x extends I.Token{constructor(n,r=$.default.getConfig(),d=[]){var i;super(void 0,r,d,{}),P(this,"type","ext-inner");for(const l of(i=n==null?void 0:n.split(`
16
+ `))!=null?i:[]){const s=/^([^|]+)(?:\|(.*))?/u.exec(l);if(!s){super.insertAt(l.trim()?new W.R(l,r,[],{}):l);continue}const[,a,c]=s;this.normalizeTitle(a,6,!0,!0).valid?super.insertAt(new R._("gallery",a,c,r,d)):super.insertAt(new W.R(l,r,[],{}))}}toString(n){return super.toString(n,`
17
17
  `)}text(){return super.text(`
18
18
  `).replace(/\n\s*\n/gu,`
19
- `)}getGaps(n){return n<this.length-1?1:0}lint(n=this.getAbsoluteIndex()){const{top:i,left:d}=this.getRootNode().posFromIndex(n),r=[];for(let o=0;o<this.length;o++){const s=this.childNodes[o],h=String(s),{length:p}=h,E=h.trim(),_=i+o,v=o?0:d;s.type==="hidden"&&E&&!/^<!--.*-->$/u.test(E)?r.push({message:S.default.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:n,endIndex:n+p,startLine:_,endLine:_,startCol:v,endCol:v+p}):s.type!=="hidden"&&s.type!=="text"&&r.push(...s.lint(n)),n+=p+1}return r}print(){return super.print({sep:`
20
- `})}}},485:(Y,b,t)=>{t.d(b,{D:()=>r});var S=t(169),I=t(891),R=t(541),W=t(669),M=Object.defineProperty,C=(o,s,h)=>s in o?M(o,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[s]=h,P=(o,s,h)=>(C(o,typeof s!="symbol"?s+"":s,h),h),f=(o,s,h)=>{if(!s.has(o))throw TypeError("Cannot "+h)},l=(o,s,h)=>(f(o,s,"read from private field"),h?h.call(o):s.get(o)),n=(o,s,h)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,h)},i,d;class r extends R.Token{constructor(s,h,p=I.default.getConfig(),E=[]){super(void 0,p,E),n(this,i),P(this,"type","heading"),this.setAttribute("name",String(s));const _=new R.Token(h[0],p,E);_.type="heading-title",_.setAttribute("stage",2);const v=new W.SyntaxToken(h[1],/^[^\S\n]*$/u,"heading-trail",p,E,{});this.append(_,v)}get level(){return Number(this.name)}toString(s){const h=l(this,i,d);return`${h}${this.firstChild.toString()}${h}${this.lastChild.toString()}`}text(){const s=l(this,i,d);return`${s}${this.firstChild.text()}${s}`}getPadding(){return super.getPadding()+this.level}getGaps(s){return s===0?this.level:0}lint(s=this.getAbsoluteIndex()){const h=super.lint(s),p=String(this.firstChild);let E;return this.name==="1"&&(E=(0,S.Y)(this,{start:s},"<h1>"),h.push(E)),(p.startsWith("=")||p.endsWith("="))&&(E!=null||(E=(0,S.Y)(this,{start:s},"")),h.push({...E,message:I.default.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&(E!=null||(E=(0,S.Y)(this,{start:s},"")),h.push({...E,message:I.default.msg("section header in a HTML tag")})),h}print(){const s=l(this,i,d);return super.print({pre:s,sep:s})}}i=new WeakSet,d=function(){return"=".repeat(this.level)}},465:(Y,b,t)=>{t.d(b,{R:()=>C});var S=t(959),I=t(541),R=Object.defineProperty,W=(P,f,l)=>f in P?R(P,f,{enumerable:!0,configurable:!0,writable:!0,value:l}):P[f]=l,M=(P,f,l)=>(W(P,typeof f!="symbol"?f+"":f,l),l);class C extends(0,S.a)(I.Token){constructor(){super(...arguments),M(this,"type","hidden")}}},842:(Y,b,t)=>{t.r(b),t.d(b,{ImagemapToken:()=>s});var S=t(169),I=t(891),R=t(541),W=t(826),M=t(39),C=t(524),P=t(944),f=Object.defineProperty,l=(h,p,E)=>p in h?f(h,p,{enumerable:!0,configurable:!0,writable:!0,value:E}):h[p]=E,n=(h,p,E)=>(l(h,typeof p!="symbol"?p+"":p,E),E);class i extends R.Token{constructor(p,E,_,v=I.default.getConfig(),F=[]){super(void 0,v,F),n(this,"type","imagemap-link"),this.append(p,E.length===2?new C.h(...E,v,F):new P.a(...E,v,F),new W.O(_,v,F))}}var d=Object.defineProperty,r=(h,p,E)=>p in h?d(h,p,{enumerable:!0,configurable:!0,writable:!0,value:E}):h[p]=E,o=(h,p,E)=>(r(h,typeof p!="symbol"?p+"":p,E),E);class s extends R.Token{constructor(p,E=I.default.getConfig(),_=[]){if(super(void 0,E,_,{}),o(this,"type","ext-inner"),!p)return;const v=p.split(`
21
- `),F=new Set(E.protocol.split("|")),B=W.O;let z=!0,Q=!1;for(const L of v){const w=L.trim();if(!(Q||!w||w.startsWith("#"))){if(z){const[m,...O]=L.split("|"),y=this.normalizeTitle(m,0,!0);if(y.valid&&y.ns===6){const x=new M._("imagemap",m,O.length>0?O.join("|"):void 0,E,_);super.insertAt(x),z=!1;continue}else Q=!0}else if(L.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(L);continue}else if(L.includes("[")){const m=L.indexOf("["),O=L.slice(m),y=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(O);if(y){if(this.normalizeTitle(y[1],0,!0,!1,!0).valid){super.insertAt(new i(L.slice(0,m),y.slice(1),O.slice(O.indexOf("]]")+2),E,_));continue}}else if(F.has(O.slice(1,O.indexOf(":")+1))||F.has(O.slice(1,O.indexOf("//")+2))){const x=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(O);if(x){super.insertAt(new i(L.slice(0,m),x.slice(1),O.slice(O.indexOf("]")+1),E,_));continue}}}}super.insertAt(new B(L,E,_))}}get image(){return this.childNodes.find(({type:p})=>p==="imagemap-image")}toString(p){return super.toString(p,`
19
+ `)}getGaps(n){return n<this.length-1?1:0}lint(n=this.getAbsoluteIndex()){const{top:r,left:d}=this.getRootNode().posFromIndex(n),i=[];for(let l=0;l<this.length;l++){const s=this.childNodes[l],a=String(s),{length:c}=a,v=a.trim(),_=r+l,m=l?0:d;s.type==="hidden"&&v&&!/^<!--.*-->$/u.test(v)?i.push({message:$.default.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:n,endIndex:n+c,startLine:_,endLine:_,startCol:m,endCol:m+c}):s.type!=="hidden"&&s.type!=="text"&&i.push(...s.lint(n)),n+=c+1}return i}print(){return super.print({sep:`
20
+ `})}}},485:(Y,M,t)=>{t.d(M,{D:()=>i});var $=t(169),I=t(891),R=t(541),W=t(669),b=Object.defineProperty,S=(l,s,a)=>s in l?b(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a,P=(l,s,a)=>(S(l,typeof s!="symbol"?s+"":s,a),a),x=(l,s,a)=>{if(!s.has(l))throw TypeError("Cannot "+a)},o=(l,s,a)=>(x(l,s,"read from private field"),a?a.call(l):s.get(l)),n=(l,s,a)=>{if(s.has(l))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(l):s.set(l,a)},r,d;class i extends R.Token{constructor(s,a,c=I.default.getConfig(),v=[]){super(void 0,c,v),n(this,r),P(this,"type","heading"),this.setAttribute("name",String(s));const _=new R.Token(a[0],c,v);_.type="heading-title",_.setAttribute("stage",2);const m=new W.SyntaxToken(a[1],/^[^\S\n]*$/u,"heading-trail",c,v,{});this.append(_,m)}get level(){return Number(this.name)}toString(s){const a=o(this,r,d);return`${a}${this.firstChild.toString()}${a}${this.lastChild.toString()}`}text(){const s=o(this,r,d);return`${s}${this.firstChild.text()}${s}`}getPadding(){return super.getPadding()+this.level}getGaps(s){return s===0?this.level:0}lint(s=this.getAbsoluteIndex()){const a=super.lint(s),c=String(this.firstChild);let v;return this.name==="1"&&(v=(0,$.Y)(this,{start:s},"<h1>"),a.push(v)),(c.startsWith("=")||c.endsWith("="))&&(v!=null||(v=(0,$.Y)(this,{start:s},"")),a.push({...v,message:I.default.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&(v!=null||(v=(0,$.Y)(this,{start:s},"")),a.push({...v,message:I.default.msg("section header in a HTML tag")})),a}print(){const s=o(this,r,d);return super.print({pre:s,sep:s})}}r=new WeakSet,d=function(){return"=".repeat(this.level)}},465:(Y,M,t)=>{t.d(M,{R:()=>S});var $=t(959),I=t(541),R=Object.defineProperty,W=(P,x,o)=>x in P?R(P,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[x]=o,b=(P,x,o)=>(W(P,typeof x!="symbol"?x+"":x,o),o);class S extends(0,$.a)(I.Token){constructor(){super(...arguments),b(this,"type","hidden")}}},842:(Y,M,t)=>{t.r(M),t.d(M,{ImagemapToken:()=>s});var $=t(169),I=t(891),R=t(541),W=t(826),b=t(39),S=t(524),P=t(944),x=Object.defineProperty,o=(a,c,v)=>c in a?x(a,c,{enumerable:!0,configurable:!0,writable:!0,value:v}):a[c]=v,n=(a,c,v)=>(o(a,typeof c!="symbol"?c+"":c,v),v);class r extends R.Token{constructor(c,v,_,m=I.default.getConfig(),F=[]){super(void 0,m,F),n(this,"type","imagemap-link"),this.append(c,v.length===2?new S.h(...v,m,F):new P.a(...v,m,F),new W.O(_,m,F))}}var d=Object.defineProperty,i=(a,c,v)=>c in a?d(a,c,{enumerable:!0,configurable:!0,writable:!0,value:v}):a[c]=v,l=(a,c,v)=>(i(a,typeof c!="symbol"?c+"":c,v),v);class s extends R.Token{constructor(c,v=I.default.getConfig(),_=[]){if(super(void 0,v,_,{}),l(this,"type","ext-inner"),!c)return;const m=c.split(`
21
+ `),F=new Set(v.protocol.split("|")),K=W.O;let G=!0,Q=!1;for(const L of m){const w=L.trim();if(!(Q||!w||w.startsWith("#"))){if(G){const[E,...O]=L.split("|"),y=this.normalizeTitle(E,0,!0);if(y.valid&&y.ns===6){const g=new b._("imagemap",E,O.length>0?O.join("|"):void 0,v,_);super.insertAt(g),G=!1;continue}else Q=!0}else if(L.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(L);continue}else if(L.includes("[")){const E=L.indexOf("["),O=L.slice(E),y=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(O);if(y){if(this.normalizeTitle(y[1],0,!0,!1,!0).valid){super.insertAt(new r(L.slice(0,E),y.slice(1),O.slice(O.indexOf("]]")+2),v,_));continue}}else if(F.has(O.slice(1,O.indexOf(":")+1))||F.has(O.slice(1,O.indexOf("//")+2))){const g=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(O);if(g){super.insertAt(new r(L.slice(0,E),g.slice(1),O.slice(O.indexOf("]")+1),v,_));continue}}}}super.insertAt(new K(L,v,_))}}get image(){return this.childNodes.find(({type:c})=>c==="imagemap-image")}toString(c){return super.toString(c,`
22
22
  `)}text(){return super.text(`
23
23
  `).replace(/\n{2,}/gu,`
24
- `)}getGaps(p){return p<this.length-1?1:0}lint(p=this.getAbsoluteIndex()){const E=super.lint(p),_={start:p,...this.getRootNode().posFromIndex(p)};return this.image?E.push(...this.childNodes.filter(v=>{const F=String(v).trim();return v.type==="noinclude"&&F&&!F.startsWith("#")}).map(v=>(0,S.D)(v,_,"invalid link in <imagemap>"))):E.push((0,S.Y)(this,_,"<imagemap> without an image")),E}print(){return super.print({sep:`
25
- `})}}},541:(Y,b,t)=>{t.r(b),t.d(b,{Token:()=>Zt});var S=t(467),I=t(891),R=Object.defineProperty,W=(N,a,A)=>a in N?R(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,M=(N,a,A)=>(W(N,typeof a!="symbol"?a+"":a,A),A),C=(N,a,A)=>{if(!a.has(N))throw TypeError("Cannot "+A)},P=(N,a,A)=>(C(N,a,"read from private field"),A?A.call(N):a.get(N)),f=(N,a,A)=>{if(a.has(N))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(N):a.set(N,A)},l=(N,a,A,H)=>(C(N,a,"write to private field"),H?H.call(N,A):a.set(N,A),A),n=(N,a,A)=>(C(N,a,"access private method"),A),i,d,r;class o{constructor(){f(this,d),M(this,"type"),M(this,"childNodes",[]),f(this,i,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return P(this,i)}get nextSibling(){var a;const A=(a=P(this,i))==null?void 0:a.childNodes;return A&&A[A.indexOf(this)+1]}get previousSibling(){var a;const A=(a=P(this,i))==null?void 0:a.childNodes;return A&&A[A.indexOf(this)-1]}get offsetHeight(){return n(this,d,r).call(this).height}get offsetWidth(){return n(this,d,r).call(this).width}hasAttribute(a){return a in this}getAttribute(a){return this.hasAttribute(a)?String(this[a]):void 0}setAttribute(a,A){return a==="parentNode"?l(this,i,A):this[a]=A,this}getRootNode(){let{parentNode:a}=this;for(;a!=null&&a.parentNode;)({parentNode:a}=a);return a!=null?a:this}posFromIndex(a){const A=String(this);if(a>=-A.length&&a<=A.length){const H=A.slice(0,a).split(`
26
- `);return{top:H.length-1,left:H[H.length-1].length}}}getPadding(){return 0}getGaps(a){return 0}getRelativeIndex(a){let A;const H=(Z,ot)=>A.slice(0,Z).reduce((mt,bt,It)=>mt+String(bt).length+ot.getGaps(It),0)+ot.getPadding();if(a===void 0){const{parentNode:Z}=this;return Z?({childNodes:A}=Z,H(A.indexOf(this),Z)):0}return{childNodes:A}=this,H(a,this)}getAbsoluteIndex(){const{parentNode:a}=this;return a?a.getAbsoluteIndex()+this.getRelativeIndex():0}}i=new WeakMap,d=new WeakSet,r=function(){const N=String(this).split(`
27
- `);return{height:N.length,width:N[N.length-1].length}};var s=Object.defineProperty,h=(N,a,A)=>a in N?s(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,p=(N,a,A)=>(h(N,typeof a!="symbol"?a+"":a,A),A);const E=new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"]);class _ extends o{constructor(){super(...arguments),p(this,"name")}get length(){return this.childNodes.length}text(a){return(0,S.fL)(this.childNodes,a)}normalize(){const{childNodes:a}=this;for(let A=a.length-1;A>=0;A--){const H=a[A],Z=a[A-1];H.type!=="text"||this.getGaps(A-1)||(H.data===""?a.splice(A,1):(Z==null?void 0:Z.type)==="text"&&(Z.setAttribute("data",Z.data+H.data),a.splice(A,1)))}}removeAt(a){const{childNodes:A}=this,[H]=A.splice(a,1);return H}insertAt(a,A=this.length){const{childNodes:H}=this;return a.setAttribute("parentNode",this),H.splice(A,0,a),a}closest(a){let{parentNode:A}=this,H;const Z=new Set(a.split(",").map(ot=>ot.trim()));for(H=({type:ot})=>Z.has(ot);A;){if(H(A))return A;({parentNode:A}=A)}}append(...a){for(const A of a)this.insertAt(A)}replaceChildren(...a){this.childNodes.length=0,this.append(...a)}setText(a,A=0){const H=this.childNodes[A],{data:Z}=H;return H.replaceData(a),Z}toString(a,A=""){return this.childNodes.map(H=>H.toString()).join(A)}lint(a=this.getAbsoluteIndex()){const{SyntaxToken:A}=t(669);if(this instanceof A||this.constructor.hidden||this.type==="ext-inner"&&E.has(this.name))return[];const H=[];for(let Z=0,ot=a+this.getPadding();Z<this.length;Z++){const mt=this.childNodes[Z];H.push(...mt.lint(ot)),ot+=String(mt).length+this.getGaps(Z)}return H}print(a={}){var A;return String(this)?`<span class="wpb-${(A=a.class)!=null?A:this.type}">${(0,S.S0)(this.childNodes,a)}</span>`:""}}var v=Object.defineProperty,F=(N,a,A)=>a in N?v(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,B=(N,a,A)=>(F(N,typeof a!="symbol"?a+"":a,A),A),z=(N,a,A)=>{if(!a.has(N))throw TypeError("Cannot "+A)},Q=(N,a,A)=>{if(a.has(N))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(N):a.set(N,A)},L=(N,a,A)=>(z(N,a,"access private method"),A),w,m;const O=/https?:\/\/|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,y=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,x=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"];class u extends o{constructor(a){super(),Q(this,w),B(this,"type","text"),B(this,"data"),this.data=a}toString(){return this.data}text(){return this.data}lint(a=this.getAbsoluteIndex()){const{data:A,parentNode:H,nextSibling:Z,previousSibling:ot}=this,mt=H==null?void 0:H.type,bt=H==null?void 0:H.name,It=Z==null?void 0:Z.type,kt=ot==null?void 0:ot.type,yt=mt==="free-ext-link"||mt==="ext-link-url"||mt==="image-parameter"&&bt==="link"?y:O,Ut=[],{ext:jt,html:qt}=this.getRootNode().getAttribute("config");if(A.search(yt)!==-1){yt.lastIndex=0;const Kt=this.getRootNode(),{top:te,left:ee}=Kt.posFromIndex(a),ne=new Set([jt,qt,x].flat(2));for(let Ot=yt.exec(A);Ot;Ot=yt.exec(A)){const[,Ft,se]=Ot;let{0:Dt,index:Tt}=Ot;Ft&&Ft!=="]"&&(Tt+=Ft.length,Dt=Dt.slice(Ft.length));const Nt=a+Tt,Mt=A.slice(0,Tt).split(`
28
- `),Gt=Mt.length+te-1,zt=Mt[Mt.length-1],Ht=Mt.length===1?ee+zt.length:zt.length,{0:ut,length:Wt}=Dt,Yt=Nt+Wt,Xt=String(Kt),wt=Xt[Yt],Lt=Xt[Nt-1],re=Wt>1&&(ut!=="<"||/[\s/>]/u.test(wt!=null?wt:""))||ut==="{"&&(wt===ut||Lt==="-")||ut==="}"&&(Lt===ut||wt==="-")||ut==="["&&(wt===ut||mt==="ext-link-text"||!A.slice(Tt+1).trim()&&It==="free-ext-link")||ut==="]"&&(Lt===ut||!A.slice(0,Tt).trim()&&kt==="free-ext-link")?"error":"warning";(ut!=="h"||Tt>0)&&(ut!=="<"||ne.has(se.toLowerCase()))&&Ut.push({message:I.default.msg('lonely "$1"',ut==="h"?Dt:ut),severity:re,startIndex:Nt,endIndex:Yt,startLine:Gt,endLine:Gt,startCol:Ht,endCol:Ht+Wt})}return Ut}return[]}replaceData(a){L(this,w,m).call(this,a)}}w=new WeakSet,m=function(N){this.setAttribute("data",N)};var $=Object.defineProperty,g=(N,a,A)=>a in N?$(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,e=(N,a,A)=>(g(N,typeof a!="symbol"?a+"":a,A),A),T=(N,a,A)=>{if(!a.has(N))throw TypeError("Cannot "+A)},c=(N,a,A)=>(T(N,a,"read from private field"),A?A.call(N):a.get(N)),D=(N,a,A)=>{if(a.has(N))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(N):a.set(N,A)},U=(N,a,A,H)=>(T(N,a,"write to private field"),H?H.call(N,A):a.set(N,A),A),K=(N,a,A,H)=>({set _(Z){U(N,a,Z,A)},get _(){return c(N,a,H)}}),G=(N,a,A)=>(T(N,a,"access private method"),A),V,X,J,j,et,tt,nt,k,it,q,st,lt,dt,ft,rt,pt,At,$t,Ct,xt,ht,ct,gt,St,vt,at,Et,_t;const{MAX_STAGE:Bt}=I.default,Jt=class Qt extends _{constructor(a,A=I.default.getConfig(),H=[],Z){super(),D(this,et),D(this,nt),D(this,it),D(this,st),D(this,dt),D(this,rt),D(this,At),D(this,Ct),D(this,ht),D(this,gt),D(this,vt),D(this,Et),e(this,"type","root"),D(this,V,0),D(this,X,void 0),D(this,J,void 0),D(this,j,void 0),typeof a=="string"&&this.insertAt(a),U(this,X,A),U(this,J,H),H.push(this)}parseOnce(a=c(this,V),A=!1){if(a<c(this,V)||!this.isPlain()||this.length===0)return this;switch(a){case 0:this.type==="root"&&c(this,J).shift(),U(this,j,A),G(this,nt,k).call(this,A);break;case 1:G(this,it,q).call(this);break;case 2:G(this,st,lt).call(this);break;case 3:G(this,dt,ft).call(this);break;case 4:G(this,rt,pt).call(this);break;case 5:G(this,At,$t).call(this);break;case 6:G(this,Ct,xt).call(this);break;case 7:G(this,ht,ct).call(this);break;case 8:G(this,gt,St).call(this);break;case 9:G(this,vt,at).call(this);break;case 10:G(this,Et,_t).call(this)}if(this.type==="root")for(const H of c(this,J))H.parseOnce(a,A);return K(this,V)._++,this}buildFromStr(a,A){const H=a.split(/[\0\x7F]/u).map((Z,ot)=>{if(ot%2===0)return new u(Z);if(isNaN(Z[Z.lengtht-1]))return c(this,J)[Number(Z.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${Z}`)});return A==="string"?H.map(String).join(""):A==="text"?(0,S.fL)(H):H}afterBuild(){if(this.type==="root")for(const a of c(this,J))a.afterBuild()}parse(a=Bt,A=!1){for(;c(this,V)<a;)this.parseOnce(c(this,V),A);return a&&(G(this,et,tt).call(this),this.afterBuild()),this}getAttribute(a){switch(a){case"config":return JSON.parse(JSON.stringify(c(this,X)));case"accum":return c(this,J);case"include":{if(c(this,j)!==void 0)return c(this,j);const A=this.getRootNode();return A.type==="root"&&A!==this?A.getAttribute("include"):!1}default:return super.getAttribute(a)}}setAttribute(a,A){switch(a){case"stage":return c(this,V)===0&&this.type==="root"&&c(this,J).shift(),U(this,V,A),this;default:return super.setAttribute(a,A)}}isPlain(){return this.constructor===Qt}insertAt(a,A=this.length){const H=typeof a=="string"?new u(a):a;return super.insertAt(H,A),H.type==="root"&&(H.type="plain"),H}normalizeTitle(a,A=0,H=!1,Z=!1,ot=!1){return I.default.normalizeTitle(a,A,c(this,j),c(this,X),H,Z,ot)}};V=new WeakMap,X=new WeakMap,J=new WeakMap,j=new WeakMap,et=new WeakSet,tt=function(){var N;U(this,V,Bt);const{length:a,firstChild:A}=this,H=String(A);if(a===1&&A.type==="text"&&H.includes("\0")&&(this.replaceChildren(...this.buildFromStr(H)),this.normalize(),this.type==="root"))for(const Z of c(this,J))G(N=Z,et,tt).call(N)},nt=new WeakSet,k=function(N){const{parseCommentAndExt:a}=t(551);this.setText(a(String(this),c(this,X),c(this,J),N))},it=new WeakSet,q=function(){const{parseBraces:N}=t(313),a=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,A=N(a,c(this,X),c(this,J));this.setText(this.type==="root"?A:A.slice(1))},st=new WeakSet,lt=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("html"))return;const{parseHtml:a}=t(980);this.setText(a(String(this),c(this,X),c(this,J)))},dt=new WeakSet,ft=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("table"))return;const{parseTable:a}=t(508);this.setText(a(this,c(this,X),c(this,J)))},rt=new WeakSet,pt=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("hr"))return;const{parseHrAndDoubleUnderscore:a}=t(362);this.setText(a(this,c(this,X),c(this,J)))},At=new WeakSet,$t=function(){const{parseLinks:N}=t(106);this.setText(N(String(this),c(this,X),c(this,J)))},Ct=new WeakSet,xt=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("quote"))return;const{parseQuotes:a}=t(704),A=String(this).split(`
29
- `);for(let H=0;H<A.length;H++)A[H]=a(A[H],c(this,X),c(this,J));this.setText(A.join(`
30
- `))},ht=new WeakSet,ct=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("extLink"))return;const{parseExternalLinks:a}=t(418);this.setText(a(String(this),c(this,X),c(this,J)))},gt=new WeakSet,St=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("magicLink"))return;const{parseMagicLinks:a}=t(311);this.setText(a(String(this),c(this,X),c(this,J)))},vt=new WeakSet,at=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("list"))return;const{parseList:a}=t(904),A=String(this).split(`
31
- `);let H=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;H<A.length;H++)A[H]=a(A[H],c(this,X),c(this,J));this.setText(A.join(`
32
- `))},Et=new WeakSet,_t=function(){if(c(this,X).variants.length>0){const{parseConverter:N}=t(295);this.setText(N(String(this),c(this,X),c(this,J)))}};let Zt=Jt},299:(Y,b,t)=>{t.d(b,{o:()=>r});var S=t(169),I=t(891),R=t(541),W=t(34),M=(o,s,h)=>{if(!s.has(o))throw TypeError("Cannot "+h)},C=(o,s,h)=>(M(o,s,"read from private field"),h?h.call(o):s.get(o)),P=(o,s,h)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,h)},f=(o,s,h,p)=>(M(o,s,"write to private field"),p?p.call(o,h):s.set(o,h),h),l,n,i,d;class r extends R.Token{constructor(s,h,p=I.default.getConfig(),E=[],_="|"){if(super(void 0,p,E,{}),P(this,l,!0),P(this,n,void 0),P(this,i,void 0),P(this,d,!1),this.insertAt(new W.D(s,"link-target",p,E,{})),h!==void 0){const v=new R.Token(h,p,E,{});v.type="link-text",this.insertAt(v.setAttribute("stage",I.default.MAX_STAGE-1))}f(this,n,_)}afterBuild(){const s=this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0);f(this,i,s.fragment),f(this,d,s.encoded),C(this,n).includes("\0")&&f(this,n,this.buildFromStr(C(this,n),"string"))}setAttribute(s,h){return s==="bracket"?(f(this,l,!!h),this):super.setAttribute(s,h)}toString(s){const h=super.toString(s,C(this,n));return C(this,l)?`[[${h}]]`:h}text(){const s=super.text("|");return C(this,l)?`[[${s}]]`:s}getPadding(){return 2}getGaps(s){return s>=this.length-1?0:s===0?C(this,n).length:1}lint(s=this.getAbsoluteIndex()){const h=super.lint(s),{childNodes:[p,E],type:_}=this;let v;return _==="link"&&p.childNodes.some(({type:F})=>F==="template")&&(v={start:s,...this.getRootNode().posFromIndex(s)},h.push((0,S.D)(p,v,"template in an internal link target","warning"))),C(this,d)&&(v!=null||(v={start:s,...this.getRootNode().posFromIndex(s)}),h.push((0,S.D)(p,v,"unnecessary URL encoding in an internal link"))),_==="link"&&(E!=null&&E.childNodes.some(F=>F.type==="text"&&F.data.includes("|")))?(v!=null||(v={start:s,...this.getRootNode().posFromIndex(s)}),h.push((0,S.D)(E,v,'additional "|" in the link text',"warning"))):_!=="link"&&C(this,i)!==void 0&&(v!=null||(v={start:s,...this.getRootNode().posFromIndex(s)}),h.push((0,S.D)(p,v,"useless fragment"))),h}print(){return super.print(C(this,l)?{pre:"[[",post:"]]",sep:C(this,n)}:{sep:C(this,n)})}}l=new WeakMap,n=new WeakMap,i=new WeakMap,d=new WeakMap},533:(Y,b,t)=>{t.d(b,{q:()=>y});var S=t(467),I=t(169),R=t(891),W=t(299),M=t(541),C=Object.defineProperty,P=(x,u,$)=>u in x?C(x,u,{enumerable:!0,configurable:!0,writable:!0,value:$}):x[u]=$,f=(x,u,$)=>(P(x,typeof u!="symbol"?u+"":u,$),$),l=(x,u,$)=>{if(!u.has(x))throw TypeError("Cannot "+$)},n=(x,u,$)=>(l(x,u,"read from private field"),$?$.call(x):u.get(x)),i=(x,u,$)=>{if(u.has(x))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(x):u.set(x,$)},d=(x,u,$,g)=>(l(x,u,"write to private field"),g?g.call(x,$):u.set(x,$),$),r;const o=new Set(["alt","link","lang","page","caption"]);function s(x,u,$=R.default.getConfig(),g=!1){u=u.trim();let e=u.replace(/\0\d+t\x7F/gu,"").trim();switch(x){case"width":return/^(?:\d+x?|\d*x\d+)$/u.test(e);case"link":{if(!e||new RegExp(`^(?:(?:${$.protocol}|//)${S._X}|\0\\d+m\x7F)${S.Qk}$`,"iu").test(e))return u;e.startsWith("[[")&&e.endsWith("]]")&&(e=e.slice(2,-2));const c=R.default.normalizeTitle(e,0,!1,$,g,!0,!0);return c.valid&&c}case"lang":return $.variants.includes(e);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(e)}}class h extends M.Token{constructor(u,$=R.default.getConfig(),g=[]){var e=(...K)=>{super(...K),f(this,"type","image-parameter"),i(this,r,"")},T;let c;const D=Object.entries($.img).map(([K,G])=>[K,G,new RegExp(`^(\\s*)${K.replace("$1","(.*)")}(\\s*)$`,"u")]),U=D.find(([,K,G])=>(c=G.exec(u),c&&(c.length!==4||s(K,c[2],$,!0)!==!1)));if(U&&c){c.length===3?(e(void 0,$,g),d(this,r,u)):(e(c[2],$,g,{}),d(this,r,`${c[1]}${U[0]}${c[3]}`)),this.setAttribute("name",U[1]);return}e(u,{...$,excludes:[...(T=$.excludes)!=null?T:[],"list"]},g),this.setAttribute("name","caption").setAttribute("stage",7)}get link(){return this.name==="link"?s("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var u;((u=this.parentNode)==null?void 0:u.type)==="gallery-image"&&!o.has(this.name)&&this.setAttribute("name","invalid")}isPlain(){return this.name==="caption"}toString(u){return n(this,r)?n(this,r).replace("$1",super.toString(u)):super.toString(u)}text(){return n(this,r)?n(this,r).replace("$1",super.text()).trim():super.text().trim()}getPadding(){return Math.max(0,n(this,r).indexOf("$1"))}lint(u=this.getAbsoluteIndex()){const $=super.lint(u),{link:g,name:e}=this;return e==="invalid"?$.push((0,I.Y)(this,{start:u},"invalid gallery image parameter")):typeof g=="object"&&g.encoded&&$.push((0,I.Y)(this,{start:u},"unnecessary URL encoding in an internal link")),$}print(){return n(this,r)?`<span class="wpb-image-parameter">${n(this,r).replace("$1",`<span class="wpb-image-caption">${(0,S.S0)(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}}r=new WeakMap;var p=Object.defineProperty,E=(x,u,$)=>u in x?p(x,u,{enumerable:!0,configurable:!0,writable:!0,value:$}):x[u]=$,_=(x,u,$)=>(E(x,typeof u!="symbol"?u+"":u,$),$),v=(x,u,$)=>{if(!u.has(x))throw TypeError("Cannot "+$)},F=(x,u,$)=>{if(u.has(x))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(x):u.set(x,$)},B=(x,u,$)=>(v(x,u,"access private method"),$),z,Q;const L=new Set(["manualthumb","frameless","framed","thumbnail"]),w=new Set(["left","right","center","none"]),m=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),O=(x,u,$,g)=>{if(g===void 0)return[];const e=new RegExp(`${[x,u,$].map(S.hr).join("|")}`,"gu"),T=[];let c=e.exec(g),D=0,U=0;for(;c;){const{0:K,index:G}=c;K!==$?D+=K===x?1:-1:D===0&&(T.push(g.slice(U,G)),{lastIndex:U}=e),c=e.exec(g)}return T.push(g.slice(U)),T};class y extends W.o{constructor(u,$,g=R.default.getConfig(),e=[],T="|"){super(u,void 0,g,e,T),F(this,z),_(this,"type","file"),this.append(...O("-{","}-","|",$).map(c=>new h(c,g,e)))}lint(u=this.getAbsoluteIndex()){const $=super.lint(u),g=this.getAllArgs().filter(({childNodes:G})=>{const V=G.filter(X=>X.text().trim());return V.length!==1||V[0].type!=="arg"}),e=[...new Set(g.map(({name:G})=>G))].filter(G=>G!=="invalid"),T=e.filter(G=>L.has(G)),c=e.filter(G=>w.has(G)),D=e.filter(G=>m.has(G));if(g.length===e.length&&T.length<2&&c.length<2&&D.length<2)return $;const U={start:u,...this.getRootNode().posFromIndex(u)},K=(G,V)=>X=>(0,I.D)(X,U,R.default.msg(`${G} image $1 parameter`,V));for(const G of e){let V=g.filter(({name:X})=>X===G);G==="caption"&&(V=[...V.slice(0,-1).filter(X=>X.text()),...V.slice(-1)]),V.length>1&&$.push(...V.map(K("duplicated",G)))}return T.length>1&&$.push(...g.filter(({name:G})=>L.has(G)).map(K("conflicting","frame"))),c.length>1&&$.push(...g.filter(({name:G})=>w.has(G)).map(K("conflicting","horizontal-alignment"))),D.length>1&&$.push(...g.filter(({name:G})=>m.has(G)).map(K("conflicting","vertical-alignment"))),$}getAllArgs(){return this.childNodes.slice(1)}getArgs(u){return this.getAllArgs().filter(({name:$})=>u===$)}getFrameArgs(){return B(this,z,Q).call(this,L,"\u6846\u67B6")}getHorizAlignArgs(){return B(this,z,Q).call(this,w,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return B(this,z,Q).call(this,m,"\u5782\u76F4\u5BF9\u9F50")}}z=new WeakSet,Q=function(x,u){return this.getAllArgs().filter(({name:g})=>x.has(g))}},39:(Y,b,t)=>{t.d(b,{_:()=>n});var S=t(169),I=t(891),R=t(541),W=t(533),M=(i,d,r)=>{if(!d.has(i))throw TypeError("Cannot "+r)},C=(i,d,r)=>(M(i,d,"read from private field"),r?r.call(i):d.get(i)),P=(i,d,r)=>{if(d.has(i))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(i):d.set(i,r)},f=(i,d,r,o)=>(M(i,d,"write to private field"),o?o.call(i,r):d.set(i,r),r),l;class n extends W.q{constructor(d,r,o,s=I.default.getConfig(),h=[]){let p;if(o!==void 0){p=new R.Token(o,s,h),p.type="plain";for(let E=1;E<I.default.MAX_STAGE;E++)p.parseOnce();h.splice(h.indexOf(p),1)}super(r,p==null?void 0:p.toString(),s,h),P(this,l,!1),this.setAttribute("bracket",!1).type=`${d}-image`}afterBuild(){const d=this.type==="imagemap-image",r=this.normalizeTitle(String(this.firstChild),d?0:6,!0,!d);f(this,l,r.ns!==6)}getPadding(){return 0}lint(d=this.getAbsoluteIndex()){const r=super.lint(d);return C(this,l)&&r.push((0,S.Y)(this,{start:d},"invalid gallery image")),r}}l=new WeakMap},524:(Y,b,t)=>{t.d(b,{h:()=>M});var S=t(299),I=Object.defineProperty,R=(C,P,f)=>P in C?I(C,P,{enumerable:!0,configurable:!0,writable:!0,value:f}):C[P]=f,W=(C,P,f)=>(R(C,typeof P!="symbol"?P+"":P,f),f);class M extends S.o{constructor(){super(...arguments),W(this,"type","link")}}},686:(Y,b,t)=>{t.d(b,{k:()=>W});var S=t(169),I=t(891),R=t(541);class W extends R.Token{constructor(C,P=!1,f=I.default.getConfig(),l=[]){super(C,f,l,{}),this.type=P?"ext-link-url":"free-ext-link"}lint(C=this.getAbsoluteIndex()){const P=super.lint(C),f=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,l=new RegExp(f,"u"),n=new RegExp(f,"gu");let i;for(const d of this.childNodes){if(d.type!=="text"||!l.test(d.data))continue;i!=null||(i={start:C,...this.getRootNode().posFromIndex(C)});const{data:r}=d,o=(0,S.D)(d,i,"","warning");n.lastIndex=0;for(let s=n.exec(r);s;s=n.exec(r)){const{index:h,0:p}=s,E=r.slice(0,h).split(`
33
- `),{length:_}=E,{length:v}=E[E.length-1],F=C+h,B=o.startLine+_-1,z=_===1?o.startCol+v:v;P.push({...o,message:I.default.msg("$1 in URL",p.startsWith("|")?'"|"':I.default.msg("full-width punctuation")),startIndex:F,endIndex:F+p.length,startLine:B,endLine:B,startCol:z,endCol:z+p.length})}}return P}}},57:(Y,b,t)=>{t.r(b),t.d(b,{NestedToken:()=>n});var S=t(169),I=t(891),R=t(541),W=t(895),M=t(826),C=t(976),P=Object.defineProperty,f=(i,d,r)=>d in i?P(i,d,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[d]=r,l=(i,d,r)=>(f(i,typeof d!="symbol"?d+"":d,r),r);class n extends R.Token{constructor(d,r,o,s=I.default.getConfig(),h=[]){var p;const E=(p=d==null?void 0:d.replace(r,(_,v,F,B,z)=>{const Q=`\0${h.length+1}${v?"e":"c"}\x7F`;if(v)new W.$(v,F,B,z,s,h);else{const L=_.endsWith("-->");new C.T(_.slice(4,L?-3:void 0),L,s,h)}return Q}))==null?void 0:p.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(_,v,F)=>(new M.O(F,s,h),`${v}\0${h.length}c\x7F`));super(E,s,h,{}),l(this,"type","ext-inner")}lint(d=this.getAbsoluteIndex()){let r;return[...super.lint(d),...this.childNodes.filter(o=>{if(o.type==="ext"||o.type==="comment")return!1;const s=String(o).trim();return s&&!/^<!--.*-->$/su.test(s)}).map(o=>(r!=null||(r={start:d,...this.getRootNode().posFromIndex(d)}),(0,S.D)(o,r,I.default.msg("invalid content in <$1>",this.name))))]}}},439:(Y,b,t)=>{t.d(b,{h:()=>R});var S=t(891),I=t(541);class R extends I.Token{constructor(M="",C=S.default.getConfig(),P=[]){super(M,C,P)}}},976:(Y,b,t)=>{t.d(b,{T:()=>f});var S=t(169),I=t(959),R=t(891),W=t(439),M=Object.defineProperty,C=(l,n,i)=>n in l?M(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,P=(l,n,i)=>(C(l,typeof n!="symbol"?n+"":n,i),i);class f extends(0,I.a)(W.h){constructor(n,i=!0,d=R.default.getConfig(),r=[]){super(n,d,r),P(this,"type","comment"),P(this,"closed"),this.closed=i}getPadding(){return 4}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}lint(n=this.getAbsoluteIndex()){return this.closed?[]:[(0,S.Y)(this,{start:n},"unclosed HTML comment")]}toString(n){return`<!--${this.firstChild.data}${this.closed?"-->":""}`}}},461:(Y,b,t)=>{t.d(b,{k:()=>M});var S=t(439),I=Object.defineProperty,R=(C,P,f)=>P in C?I(C,P,{enumerable:!0,configurable:!0,writable:!0,value:f}):C[P]=f,W=(C,P,f)=>(R(C,typeof P!="symbol"?P+"":P,f),f);class M extends S.h{constructor(){super(...arguments),W(this,"type","dd")}}},491:(Y,b,t)=>{t.r(b),t.d(b,{NowikiToken:()=>P});var S=t(169),I=t(891),R=t(439),W=Object.defineProperty,M=(f,l,n)=>l in f?W(f,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):f[l]=n,C=(f,l,n)=>(M(f,typeof l!="symbol"?l+"":l,n),n);class P extends R.h{constructor(){super(...arguments),C(this,"type","ext-inner")}lint(l=this.getAbsoluteIndex()){const{name:n,firstChild:i}=this;return(n==="templatestyles"||n==="section")&&i.data?[(0,S.Y)(this,{start:l},I.default.msg("nothing should be in <$1>",n))]:super.lint(l)}}},826:(Y,b,t)=>{t.d(b,{O:()=>C});var S=t(959),I=t(439),R=Object.defineProperty,W=(P,f,l)=>f in P?R(P,f,{enumerable:!0,configurable:!0,writable:!0,value:l}):P[f]=l,M=(P,f,l)=>(W(P,typeof f!="symbol"?f+"":f,l),l);class C extends(0,S.a)(I.h){constructor(){super(...arguments),M(this,"type","noinclude")}}},160:(Y,b,t)=>{t.r(b),t.d(b,{ParamTagToken:()=>f});var S=t(169),I=t(891),R=t(541),W=t(34),M=Object.defineProperty,C=(l,n,i)=>n in l?M(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,P=(l,n,i)=>(C(l,typeof n!="symbol"?n+"":n,i),i);class f extends R.Token{constructor(n,i=I.default.getConfig(),d=[],r={}){if(super(void 0,i,d,{}),P(this,"type","ext-inner"),n){const o=W.D;this.append(...n.split(`
34
- `).map(s=>new o(s,"param-line",i,d,{})))}}toString(n){return super.toString(n,`
24
+ `)}getGaps(c){return c<this.length-1?1:0}lint(c=this.getAbsoluteIndex()){const v=super.lint(c),_={start:c,...this.getRootNode().posFromIndex(c)};return this.image?v.push(...this.childNodes.filter(m=>{const F=String(m).trim();return m.type==="noinclude"&&F&&!F.startsWith("#")}).map(m=>(0,$.D)(m,_,"invalid link in <imagemap>"))):v.push((0,$.Y)(this,_,"<imagemap> without an image")),v}print(){return super.print({sep:`
25
+ `})}}},541:(Y,M,t)=>{t.r(M),t.d(M,{Token:()=>Zt});var $=t(467),I=t(891),R=Object.defineProperty,W=(N,h,A)=>h in N?R(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,b=(N,h,A)=>(W(N,typeof h!="symbol"?h+"":h,A),A),S=(N,h,A)=>{if(!h.has(N))throw TypeError("Cannot "+A)},P=(N,h,A)=>(S(N,h,"read from private field"),A?A.call(N):h.get(N)),x=(N,h,A)=>{if(h.has(N))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(N):h.set(N,A)},o=(N,h,A,H)=>(S(N,h,"write to private field"),H?H.call(N,A):h.set(N,A),A),n=(N,h,A)=>(S(N,h,"access private method"),A),r,d,i;class l{constructor(){x(this,d),b(this,"type"),b(this,"childNodes",[]),x(this,r,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return P(this,r)}get nextSibling(){var h;const A=(h=P(this,r))==null?void 0:h.childNodes;return A&&A[A.indexOf(this)+1]}get previousSibling(){var h;const A=(h=P(this,r))==null?void 0:h.childNodes;return A&&A[A.indexOf(this)-1]}get offsetHeight(){return n(this,d,i).call(this).height}get offsetWidth(){return n(this,d,i).call(this).width}hasAttribute(h){return h in this}getAttribute(h){return this.hasAttribute(h)?String(this[h]):void 0}setAttribute(h,A){h==="parentNode"?o(this,r,A):this[h]=A}getRootNode(){let{parentNode:h}=this;for(;h!=null&&h.parentNode;)({parentNode:h}=h);return h!=null?h:this}posFromIndex(h){const A=String(this);if(h>=-A.length&&h<=A.length){const H=A.slice(0,h).split(`
26
+ `);return{top:H.length-1,left:H[H.length-1].length}}}getPadding(){return 0}getGaps(h){return 0}getRelativeIndex(h){let A;const H=(Z,ot)=>A.slice(0,Z).reduce((mt,bt,It)=>mt+String(bt).length+ot.getGaps(It),0)+ot.getPadding();if(h===void 0){const{parentNode:Z}=this;return Z?({childNodes:A}=Z,H(A.indexOf(this),Z)):0}return{childNodes:A}=this,H(h,this)}getAbsoluteIndex(){const{parentNode:h}=this;return h?h.getAbsoluteIndex()+this.getRelativeIndex():0}}r=new WeakMap,d=new WeakSet,i=function(){const N=String(this).split(`
27
+ `);return{height:N.length,width:N[N.length-1].length}};var s=Object.defineProperty,a=(N,h,A)=>h in N?s(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,c=(N,h,A)=>(a(N,typeof h!="symbol"?h+"":h,A),A);const v=new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"]);class _ extends l{constructor(){super(...arguments),c(this,"name")}get length(){return this.childNodes.length}text(h){return(0,$.fL)(this.childNodes,h)}normalize(){const{childNodes:h}=this;for(let A=h.length-1;A>=0;A--){const H=h[A],Z=h[A-1];H.type!=="text"||this.getGaps(A-1)||(H.data===""?h.splice(A,1):(Z==null?void 0:Z.type)==="text"&&(Z.setAttribute("data",Z.data+H.data),h.splice(A,1)))}}removeAt(h){const{childNodes:A}=this,[H]=A.splice(h,1);return H}insertAt(h,A=this.length){const{childNodes:H}=this;return h.setAttribute("parentNode",this),H.splice(A,0,h),h}closest(h){let{parentNode:A}=this,H;const Z=new Set(h.split(",").map(ot=>ot.trim()));for(H=({type:ot})=>Z.has(ot);A;){if(H(A))return A;({parentNode:A}=A)}}append(...h){for(const A of h)this.insertAt(A)}replaceChildren(...h){this.childNodes.length=0,this.append(...h)}setText(h,A=0){const H=this.childNodes[A],{data:Z}=H;return H.replaceData(h),Z}toString(h,A=""){return this.childNodes.map(H=>H.toString()).join(A)}lint(h=this.getAbsoluteIndex()){const{SyntaxToken:A}=t(669);if(this instanceof A||this.constructor.hidden||this.type==="ext-inner"&&v.has(this.name))return[];const H=[];for(let Z=0,ot=h+this.getPadding();Z<this.length;Z++){const mt=this.childNodes[Z];H.push(...mt.lint(ot)),ot+=String(mt).length+this.getGaps(Z)}return H}print(h={}){var A;return String(this)?`<span class="wpb-${(A=h.class)!=null?A:this.type}">${(0,$.S0)(this.childNodes,h)}</span>`:""}}var m=Object.defineProperty,F=(N,h,A)=>h in N?m(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,K=(N,h,A)=>(F(N,typeof h!="symbol"?h+"":h,A),A),G=(N,h,A)=>{if(!h.has(N))throw TypeError("Cannot "+A)},Q=(N,h,A)=>{if(h.has(N))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(N):h.set(N,A)},L=(N,h,A)=>(G(N,h,"access private method"),A),w,E;const O=/https?:\/\/|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,y=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,g=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"];class u extends l{constructor(h){super(),Q(this,w),K(this,"type","text"),K(this,"data"),this.data=h}toString(){return this.data}text(){return this.data}lint(h=this.getAbsoluteIndex()){const{data:A,parentNode:H,nextSibling:Z,previousSibling:ot}=this,mt=H==null?void 0:H.type,bt=H==null?void 0:H.name,It=Z==null?void 0:Z.type,kt=ot==null?void 0:ot.type,yt=mt==="free-ext-link"||mt==="ext-link-url"||mt==="image-parameter"&&bt==="link"?y:O,Ut=[],{ext:jt,html:qt}=this.getRootNode().getAttribute("config");if(A.search(yt)!==-1){yt.lastIndex=0;const Kt=this.getRootNode(),{top:te,left:ee}=Kt.posFromIndex(h),ne=new Set([jt,qt,g].flat(2));for(let Ot=yt.exec(A);Ot;Ot=yt.exec(A)){const[,Ft,se]=Ot;let{0:Dt,index:Tt}=Ot;Ft&&Ft!=="]"&&(Tt+=Ft.length,Dt=Dt.slice(Ft.length));const Nt=h+Tt,Mt=A.slice(0,Tt).split(`
28
+ `),Gt=Mt.length+te-1,zt=Mt[Mt.length-1],Ht=Mt.length===1?ee+zt.length:zt.length,{0:ut,length:Wt}=Dt,Yt=Nt+Wt,Xt=String(Kt),wt=Xt[Yt],Lt=Xt[Nt-1],re=Wt>1&&(ut!=="<"||/[\s/>]/u.test(wt!=null?wt:""))||ut==="{"&&(wt===ut||Lt==="-")||ut==="}"&&(Lt===ut||wt==="-")||ut==="["&&(wt===ut||mt==="ext-link-text"||!A.slice(Tt+1).trim()&&It==="free-ext-link")||ut==="]"&&(Lt===ut||!A.slice(0,Tt).trim()&&kt==="free-ext-link")?"error":"warning";(ut!=="h"||Tt>0)&&(ut!=="<"||ne.has(se.toLowerCase()))&&Ut.push({message:I.default.msg('lonely "$1"',ut==="h"?Dt:ut),severity:re,startIndex:Nt,endIndex:Yt,startLine:Gt,endLine:Gt,startCol:Ht,endCol:Ht+Wt})}return Ut}return[]}replaceData(h){L(this,w,E).call(this,h)}}w=new WeakSet,E=function(N){this.setAttribute("data",N)};var C=Object.defineProperty,f=(N,h,A)=>h in N?C(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,e=(N,h,A)=>(f(N,typeof h!="symbol"?h+"":h,A),A),T=(N,h,A)=>{if(!h.has(N))throw TypeError("Cannot "+A)},p=(N,h,A)=>(T(N,h,"read from private field"),A?A.call(N):h.get(N)),D=(N,h,A)=>{if(h.has(N))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(N):h.set(N,A)},B=(N,h,A,H)=>(T(N,h,"write to private field"),H?H.call(N,A):h.set(N,A),A),U=(N,h,A,H)=>({set _(Z){B(N,h,Z,A)},get _(){return p(N,h,H)}}),z=(N,h,A)=>(T(N,h,"access private method"),A),V,X,J,j,et,tt,nt,k,it,q,st,lt,dt,ft,rt,pt,At,Ct,$t,xt,ht,ct,gt,St,vt,at,Et,_t;const{MAX_STAGE:Bt}=I.default,Jt=class Qt extends _{constructor(h,A=I.default.getConfig(),H=[],Z){super(),D(this,et),D(this,nt),D(this,it),D(this,st),D(this,dt),D(this,rt),D(this,At),D(this,$t),D(this,ht),D(this,gt),D(this,vt),D(this,Et),e(this,"type","root"),D(this,V,0),D(this,X,void 0),D(this,J,void 0),D(this,j,void 0),typeof h=="string"&&this.insertAt(h),B(this,X,A),B(this,J,H),H.push(this)}parseOnce(h=p(this,V),A=!1){if(h<p(this,V)||!this.isPlain()||this.length===0)return this;switch(h){case 0:this.type==="root"&&p(this,J).shift(),B(this,j,A),z(this,nt,k).call(this,A);break;case 1:z(this,it,q).call(this);break;case 2:z(this,st,lt).call(this);break;case 3:z(this,dt,ft).call(this);break;case 4:z(this,rt,pt).call(this);break;case 5:z(this,At,Ct).call(this);break;case 6:z(this,$t,xt).call(this);break;case 7:z(this,ht,ct).call(this);break;case 8:z(this,gt,St).call(this);break;case 9:z(this,vt,at).call(this);break;case 10:z(this,Et,_t).call(this)}if(this.type==="root")for(const H of p(this,J))H.parseOnce(h,A);return U(this,V)._++,this}buildFromStr(h,A){const H=h.split(/[\0\x7F]/u).map((Z,ot)=>{if(ot%2===0)return new u(Z);if(isNaN(Z[Z.lengtht-1]))return p(this,J)[Number(Z.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${Z}`)});return A==="string"?H.map(String).join(""):A==="text"?(0,$.fL)(H):H}afterBuild(){if(this.type==="root")for(const h of p(this,J))h.afterBuild()}parse(h=Bt,A=!1){for(;p(this,V)<h;)this.parseOnce(p(this,V),A);return h&&(z(this,et,tt).call(this),this.afterBuild()),this}getAttribute(h){switch(h){case"config":return JSON.parse(JSON.stringify(p(this,X)));case"accum":return p(this,J);case"include":{if(p(this,j)!==void 0)return p(this,j);const A=this.getRootNode();return A.type==="root"&&A!==this?A.getAttribute("include"):!1}default:return super.getAttribute(h)}}setAttribute(h,A){switch(h){case"stage":p(this,V)===0&&this.type==="root"&&p(this,J).shift(),B(this,V,A);break;default:super.setAttribute(h,A)}}isPlain(){return this.constructor===Qt}insertAt(h,A=this.length){const H=typeof h=="string"?new u(h):h;return super.insertAt(H,A),H.type==="root"&&(H.type="plain"),H}normalizeTitle(h,A=0,H=!1,Z=!1,ot=!1){return I.default.normalizeTitle(h,A,p(this,j),p(this,X),H,Z,ot)}};V=new WeakMap,X=new WeakMap,J=new WeakMap,j=new WeakMap,et=new WeakSet,tt=function(){var N;B(this,V,Bt);const{length:h,firstChild:A}=this,H=String(A);if(h===1&&A.type==="text"&&H.includes("\0")&&(this.replaceChildren(...this.buildFromStr(H)),this.normalize(),this.type==="root"))for(const Z of p(this,J))z(N=Z,et,tt).call(N)},nt=new WeakSet,k=function(N){const{parseCommentAndExt:h}=t(551);this.setText(h(String(this.firstChild),p(this,X),p(this,J),N))},it=new WeakSet,q=function(){const{parseBraces:N}=t(313),h=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,A=N(h,p(this,X),p(this,J));this.setText(this.type==="root"?A:A.slice(1))},st=new WeakSet,lt=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("html"))return;const{parseHtml:h}=t(980);this.setText(h(String(this.firstChild),p(this,X),p(this,J)))},dt=new WeakSet,ft=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("table"))return;const{parseTable:h}=t(508);this.setText(h(this,p(this,X),p(this,J)))},rt=new WeakSet,pt=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("hr"))return;const{parseHrAndDoubleUnderscore:h}=t(362);this.setText(h(this,p(this,X),p(this,J)))},At=new WeakSet,Ct=function(){const{parseLinks:N}=t(106);this.setText(N(String(this.firstChild),p(this,X),p(this,J)))},$t=new WeakSet,xt=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("quote"))return;const{parseQuotes:h}=t(704),A=String(this.firstChild).split(`
29
+ `);for(let H=0;H<A.length;H++)A[H]=h(A[H],p(this,X),p(this,J));this.setText(A.join(`
30
+ `))},ht=new WeakSet,ct=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("extLink"))return;const{parseExternalLinks:h}=t(418);this.setText(h(String(this.firstChild),p(this,X),p(this,J)))},gt=new WeakSet,St=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("magicLink"))return;const{parseMagicLinks:h}=t(311);this.setText(h(String(this.firstChild),p(this,X),p(this,J)))},vt=new WeakSet,at=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("list"))return;const{parseList:h}=t(904),A=String(this.firstChild).split(`
31
+ `);let H=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;H<A.length;H++)A[H]=h(A[H],p(this,X),p(this,J));this.setText(A.join(`
32
+ `))},Et=new WeakSet,_t=function(){if(p(this,X).variants.length>0){const{parseConverter:N}=t(295);this.setText(N(String(this.firstChild),p(this,X),p(this,J)))}};let Zt=Jt},299:(Y,M,t)=>{t.d(M,{o:()=>i});var $=t(169),I=t(891),R=t(541),W=t(34),b=(l,s,a)=>{if(!s.has(l))throw TypeError("Cannot "+a)},S=(l,s,a)=>(b(l,s,"read from private field"),a?a.call(l):s.get(l)),P=(l,s,a)=>{if(s.has(l))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(l):s.set(l,a)},x=(l,s,a,c)=>(b(l,s,"write to private field"),c?c.call(l,a):s.set(l,a),a),o,n,r,d;class i extends R.Token{constructor(s,a,c=I.default.getConfig(),v=[],_="|"){if(super(void 0,c,v,{}),P(this,o,!0),P(this,n,void 0),P(this,r,void 0),P(this,d,!1),this.insertAt(new W.D(s,"link-target",c,v,{})),a!==void 0){const m=new R.Token(a,c,v,{});m.type="link-text",m.setAttribute("stage",I.default.MAX_STAGE-1),this.insertAt(m)}x(this,n,_)}afterBuild(){const s=this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0);x(this,r,s.fragment),x(this,d,s.encoded),S(this,n).includes("\0")&&x(this,n,this.buildFromStr(S(this,n),"string"))}setAttribute(s,a){s==="bracket"?x(this,o,!!a):super.setAttribute(s,a)}toString(s){const a=super.toString(s,S(this,n));return S(this,o)?`[[${a}]]`:a}text(){const s=super.text("|");return S(this,o)?`[[${s}]]`:s}getPadding(){return 2}getGaps(s){return s>=this.length-1?0:s===0?S(this,n).length:1}lint(s=this.getAbsoluteIndex()){const a=super.lint(s),{childNodes:[c,v],type:_}=this;let m;return _==="link"&&c.childNodes.some(({type:F})=>F==="template")&&(m={start:s,...this.getRootNode().posFromIndex(s)},a.push((0,$.D)(c,m,"template in an internal link target","warning"))),S(this,d)&&(m!=null||(m={start:s,...this.getRootNode().posFromIndex(s)}),a.push((0,$.D)(c,m,"unnecessary URL encoding in an internal link"))),_==="link"&&(v!=null&&v.childNodes.some(F=>F.type==="text"&&F.data.includes("|")))?(m!=null||(m={start:s,...this.getRootNode().posFromIndex(s)}),a.push((0,$.D)(v,m,'additional "|" in the link text',"warning"))):_!=="link"&&S(this,r)!==void 0&&(m!=null||(m={start:s,...this.getRootNode().posFromIndex(s)}),a.push((0,$.D)(c,m,"useless fragment"))),a}print(){return super.print(S(this,o)?{pre:"[[",post:"]]",sep:S(this,n)}:{sep:S(this,n)})}}o=new WeakMap,n=new WeakMap,r=new WeakMap,d=new WeakMap},533:(Y,M,t)=>{t.d(M,{q:()=>y});var $=t(467),I=t(169),R=t(891),W=t(299),b=t(541),S=Object.defineProperty,P=(g,u,C)=>u in g?S(g,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):g[u]=C,x=(g,u,C)=>(P(g,typeof u!="symbol"?u+"":u,C),C),o=(g,u,C)=>{if(!u.has(g))throw TypeError("Cannot "+C)},n=(g,u,C)=>(o(g,u,"read from private field"),C?C.call(g):u.get(g)),r=(g,u,C)=>{if(u.has(g))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(g):u.set(g,C)},d=(g,u,C,f)=>(o(g,u,"write to private field"),f?f.call(g,C):u.set(g,C),C),i;const l=new Set(["alt","link","lang","page","caption"]);function s(g,u,C=R.default.getConfig(),f=!1){u=u.trim();let e=u.replace(/\0\d+t\x7F/gu,"").trim();switch(g){case"width":return/^(?:\d+x?|\d*x\d+)$/u.test(e);case"link":{if(!e||new RegExp(`^(?:(?:${C.protocol}|//)${$._X}|\0\\d+m\x7F)${$.Qk}$`,"iu").test(e))return u;e.startsWith("[[")&&e.endsWith("]]")&&(e=e.slice(2,-2));const p=R.default.normalizeTitle(e,0,!1,C,f,!0,!0);return p.valid&&p}case"lang":return C.variants.includes(e);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(e)}}class a extends b.Token{constructor(u,C=R.default.getConfig(),f=[]){var e=(...U)=>{super(...U),x(this,"type","image-parameter"),r(this,i,"")},T;let p;const D=Object.entries(C.img).map(([U,z])=>[U,z,new RegExp(`^(\\s*)${U.replace("$1","(.*)")}(\\s*)$`,"u")]),B=D.find(([,U,z])=>(p=z.exec(u),p&&(p.length!==4||s(U,p[2],C,!0)!==!1)));if(B&&p){p.length===3?(e(void 0,C,f),d(this,i,u)):(e(p[2],C,f,{}),d(this,i,`${p[1]}${B[0]}${p[3]}`)),this.setAttribute("name",B[1]);return}e(u,{...C,excludes:[...(T=C.excludes)!=null?T:[],"list"]},f),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get link(){return this.name==="link"?s("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var u;((u=this.parentNode)==null?void 0:u.type)==="gallery-image"&&!l.has(this.name)&&this.setAttribute("name","invalid")}isPlain(){return this.name==="caption"}toString(u){return n(this,i)?n(this,i).replace("$1",super.toString(u)):super.toString(u)}text(){return n(this,i)?n(this,i).replace("$1",super.text()).trim():super.text().trim()}getPadding(){return Math.max(0,n(this,i).indexOf("$1"))}lint(u=this.getAbsoluteIndex()){const C=super.lint(u),{link:f,name:e}=this;return e==="invalid"?C.push((0,I.Y)(this,{start:u},"invalid gallery image parameter")):typeof f=="object"&&f.encoded&&C.push((0,I.Y)(this,{start:u},"unnecessary URL encoding in an internal link")),C}print(){return n(this,i)?`<span class="wpb-image-parameter">${n(this,i).replace("$1",`<span class="wpb-image-caption">${(0,$.S0)(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}}i=new WeakMap;var c=Object.defineProperty,v=(g,u,C)=>u in g?c(g,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):g[u]=C,_=(g,u,C)=>(v(g,typeof u!="symbol"?u+"":u,C),C),m=(g,u,C)=>{if(!u.has(g))throw TypeError("Cannot "+C)},F=(g,u,C)=>{if(u.has(g))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(g):u.set(g,C)},K=(g,u,C)=>(m(g,u,"access private method"),C),G,Q;const L=new Set(["manualthumb","frameless","framed","thumbnail"]),w=new Set(["left","right","center","none"]),E=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),O=(g,u,C,f)=>{if(f===void 0)return[];const e=new RegExp(`${[g,u,C].map($.hr).join("|")}`,"gu"),T=[];let p=e.exec(f),D=0,B=0;for(;p;){const{0:U,index:z}=p;U!==C?D+=U===g?1:-1:D===0&&(T.push(f.slice(B,z)),{lastIndex:B}=e),p=e.exec(f)}return T.push(f.slice(B)),T};class y extends W.o{constructor(u,C,f=R.default.getConfig(),e=[],T="|"){super(u,void 0,f,e,T),F(this,G),_(this,"type","file"),this.append(...O("-{","}-","|",C).map(p=>new a(p,f,e)))}lint(u=this.getAbsoluteIndex()){const C=super.lint(u),f=this.getAllArgs().filter(({childNodes:z})=>{const V=z.filter(X=>X.text().trim());return V.length!==1||V[0].type!=="arg"}),e=[...new Set(f.map(({name:z})=>z))].filter(z=>z!=="invalid"),T=e.filter(z=>L.has(z)),p=e.filter(z=>w.has(z)),D=e.filter(z=>E.has(z));if(f.length===e.length&&T.length<2&&p.length<2&&D.length<2)return C;const B={start:u,...this.getRootNode().posFromIndex(u)},U=(z,V)=>X=>(0,I.D)(X,B,R.default.msg(`${z} image $1 parameter`,V));for(const z of e){let V=f.filter(({name:X})=>X===z);z==="caption"&&(V=[...V.slice(0,-1).filter(X=>X.text()),...V.slice(-1)]),V.length>1&&C.push(...V.map(U("duplicated",z)))}return T.length>1&&C.push(...f.filter(({name:z})=>L.has(z)).map(U("conflicting","frame"))),p.length>1&&C.push(...f.filter(({name:z})=>w.has(z)).map(U("conflicting","horizontal-alignment"))),D.length>1&&C.push(...f.filter(({name:z})=>E.has(z)).map(U("conflicting","vertical-alignment"))),C}getAllArgs(){return this.childNodes.slice(1)}getArgs(u){return this.getAllArgs().filter(({name:C})=>u===C)}getFrameArgs(){return K(this,G,Q).call(this,L,"\u6846\u67B6")}getHorizAlignArgs(){return K(this,G,Q).call(this,w,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return K(this,G,Q).call(this,E,"\u5782\u76F4\u5BF9\u9F50")}}G=new WeakSet,Q=function(g,u){return this.getAllArgs().filter(({name:f})=>g.has(f))}},39:(Y,M,t)=>{t.d(M,{_:()=>n});var $=t(169),I=t(891),R=t(541),W=t(533),b=(r,d,i)=>{if(!d.has(r))throw TypeError("Cannot "+i)},S=(r,d,i)=>(b(r,d,"read from private field"),i?i.call(r):d.get(r)),P=(r,d,i)=>{if(d.has(r))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(r):d.set(r,i)},x=(r,d,i,l)=>(b(r,d,"write to private field"),l?l.call(r,i):d.set(r,i),i),o;class n extends W.q{constructor(d,i,l,s=I.default.getConfig(),a=[]){let c;if(l!==void 0){c=new R.Token(l,s,a),c.type="plain";for(let v=1;v<I.default.MAX_STAGE;v++)c.parseOnce();a.splice(a.indexOf(c),1)}super(i,c==null?void 0:c.toString(),s,a),P(this,o,!1),this.setAttribute("bracket",!1),this.type=`${d}-image`}afterBuild(){const d=this.type==="imagemap-image",i=this.normalizeTitle(String(this.firstChild),d?0:6,!0,!d);x(this,o,i.ns!==6)}getPadding(){return 0}lint(d=this.getAbsoluteIndex()){const i=super.lint(d);return S(this,o)&&i.push((0,$.Y)(this,{start:d},"invalid gallery image")),i}}o=new WeakMap},524:(Y,M,t)=>{t.d(M,{h:()=>b});var $=t(299),I=Object.defineProperty,R=(S,P,x)=>P in S?I(S,P,{enumerable:!0,configurable:!0,writable:!0,value:x}):S[P]=x,W=(S,P,x)=>(R(S,typeof P!="symbol"?P+"":P,x),x);class b extends $.o{constructor(){super(...arguments),W(this,"type","link")}}},686:(Y,M,t)=>{t.d(M,{k:()=>W});var $=t(169),I=t(891),R=t(541);class W extends R.Token{constructor(S,P=!1,x=I.default.getConfig(),o=[]){super(S,x,o,{}),this.type=P?"ext-link-url":"free-ext-link"}lint(S=this.getAbsoluteIndex()){const P=super.lint(S),x=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,o=new RegExp(x,"u"),n=new RegExp(x,"gu");let r;for(const d of this.childNodes){if(d.type!=="text"||!o.test(d.data))continue;r!=null||(r={start:S,...this.getRootNode().posFromIndex(S)});const{data:i}=d,l=(0,$.D)(d,r,"","warning");n.lastIndex=0;for(let s=n.exec(i);s;s=n.exec(i)){const{index:a,0:c}=s,v=i.slice(0,a).split(`
33
+ `),{length:_}=v,{length:m}=v[v.length-1],F=S+a,K=l.startLine+_-1,G=_===1?l.startCol+m:m;P.push({...l,message:I.default.msg("$1 in URL",c.startsWith("|")?'"|"':I.default.msg("full-width punctuation")),startIndex:F,endIndex:F+c.length,startLine:K,endLine:K,startCol:G,endCol:G+c.length})}}return P}}},57:(Y,M,t)=>{t.r(M),t.d(M,{NestedToken:()=>n});var $=t(169),I=t(891),R=t(541),W=t(895),b=t(826),S=t(976),P=Object.defineProperty,x=(r,d,i)=>d in r?P(r,d,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[d]=i,o=(r,d,i)=>(x(r,typeof d!="symbol"?d+"":d,i),i);class n extends R.Token{constructor(d,i,l,s=I.default.getConfig(),a=[]){var c;const v=(c=d==null?void 0:d.replace(i,(_,m,F,K,G)=>{const Q=`\0${a.length+1}${m?"e":"c"}\x7F`;if(m)new W.$(m,F,K,G,s,a);else{const L=_.endsWith("-->");new S.T(_.slice(4,L?-3:void 0),L,s,a)}return Q}))==null?void 0:c.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(_,m,F)=>(new b.O(F,s,a),`${m}\0${a.length}c\x7F`));super(v,s,a,{}),o(this,"type","ext-inner")}lint(d=this.getAbsoluteIndex()){let i;return[...super.lint(d),...this.childNodes.filter(l=>{if(l.type==="ext"||l.type==="comment")return!1;const s=String(l).trim();return s&&!/^<!--.*-->$/su.test(s)}).map(l=>(i!=null||(i={start:d,...this.getRootNode().posFromIndex(d)}),(0,$.D)(l,i,I.default.msg("invalid content in <$1>",this.name))))]}}},439:(Y,M,t)=>{t.d(M,{h:()=>R});var $=t(891),I=t(541);class R extends I.Token{constructor(b="",S=$.default.getConfig(),P=[]){super(b,S,P)}}},976:(Y,M,t)=>{t.d(M,{T:()=>x});var $=t(169),I=t(959),R=t(891),W=t(439),b=Object.defineProperty,S=(o,n,r)=>n in o?b(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,P=(o,n,r)=>(S(o,typeof n!="symbol"?n+"":n,r),r);class x extends(0,I.a)(W.h){constructor(n,r=!0,d=R.default.getConfig(),i=[]){super(n,d,i),P(this,"type","comment"),P(this,"closed"),this.closed=r}getPadding(){return 4}lint(n=this.getAbsoluteIndex()){return this.closed?[]:[(0,$.Y)(this,{start:n},"unclosed HTML comment")]}toString(n){return`<!--${this.firstChild.data}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}}},461:(Y,M,t)=>{t.d(M,{k:()=>b});var $=t(933),I=Object.defineProperty,R=(S,P,x)=>P in S?I(S,P,{enumerable:!0,configurable:!0,writable:!0,value:x}):S[P]=x,W=(S,P,x)=>(R(S,typeof P!="symbol"?P+"":P,x),x);class b extends $.T{constructor(){super(...arguments),W(this,"type","dd")}}},491:(Y,M,t)=>{t.r(M),t.d(M,{NowikiToken:()=>P});var $=t(169),I=t(891),R=t(439),W=Object.defineProperty,b=(x,o,n)=>o in x?W(x,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):x[o]=n,S=(x,o,n)=>(b(x,typeof o!="symbol"?o+"":o,n),n);class P extends R.h{constructor(){super(...arguments),S(this,"type","ext-inner")}lint(o=this.getAbsoluteIndex()){const{name:n,firstChild:r}=this;return(n==="templatestyles"||n==="section")&&r.data?[(0,$.Y)(this,{start:o},I.default.msg("nothing should be in <$1>",n))]:super.lint(o)}}},933:(Y,M,t)=>{t.d(M,{T:()=>I});var $=t(439);class I extends $.h{}},826:(Y,M,t)=>{t.d(M,{O:()=>S});var $=t(959),I=t(439),R=Object.defineProperty,W=(P,x,o)=>x in P?R(P,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[x]=o,b=(P,x,o)=>(W(P,typeof x!="symbol"?x+"":x,o),o);class S extends(0,$.a)(I.h){constructor(){super(...arguments),b(this,"type","noinclude")}}},160:(Y,M,t)=>{t.r(M),t.d(M,{ParamTagToken:()=>x});var $=t(169),I=t(891),R=t(541),W=t(34),b=Object.defineProperty,S=(o,n,r)=>n in o?b(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,P=(o,n,r)=>(S(o,typeof n!="symbol"?n+"":n,r),r);class x extends R.Token{constructor(n,r=I.default.getConfig(),d=[],i={}){if(super(void 0,r,d,{}),P(this,"type","ext-inner"),n){const l=W.D;this.append(...n.split(`
34
+ `).map(s=>new l(s,"param-line",r,d,{})))}}toString(n){return super.toString(n,`
35
35
  `)}text(){return super.text(`
36
- `)}getGaps(n){return n<this.length-1?1:0}print(){return super.print({sep:`
37
- `})}lint(n=this.getAbsoluteIndex()){let i;return this.childNodes.filter(d=>{const{childNodes:r}=d,o=r.findIndex(({type:h})=>h!=="text"),s=(o>=0?r.slice(0,o).map(String).join(""):String(d)).trim();return s&&!(o>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(s)}).map(d=>(i!=null||(i={start:n,...this.getRootNode().posFromIndex(n)}),(0,S.D)(d,i,I.default.msg("invalid parameter of $1",this.name))))}}},504:(Y,b,t)=>{t.r(b),t.d(b,{InputboxToken:()=>W});var S=t(313),I=t(891),R=t(160);class W extends R.ParamTagToken{constructor(C,P=I.default.getConfig(),f=[]){const l=Symbol("InputboxToken");f.push(l),C&&(C=(0,S.parseBraces)(C,P,f)),f.splice(f.indexOf(l),1),super(C,P,f,{})}}},435:(Y,b,t)=>{t.r(b),t.d(b,{PreToken:()=>P});var S=t(891),I=t(541),R=t(826),W=Object.defineProperty,M=(f,l,n)=>l in f?W(f,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):f[l]=n,C=(f,l,n)=>(M(f,typeof l!="symbol"?l+"":l,n),n);class P extends I.Token{constructor(l,n=S.default.getConfig(),i=[]){if(l){const d="<nowiki>",r="</nowiki>",{length:o}=d;let s=l.indexOf(d),h=l.indexOf(r,s+o),p="";for(;s!==-1&&h!==-1;)new R.O(d,n,i),new R.O(r,n,i),p+=`${l.slice(0,s)}\0${i.length-1}c\x7F${l.slice(s+o,h)}\0${i.length}c\x7F`,l=l.slice(h+o+1),s=l.indexOf(d),h=l.indexOf(r,s+o);l=`${p}${l}`}super(l,n,i,{}),C(this,"type","ext-inner"),this.setAttribute("stage",S.default.MAX_STAGE-1)}isPlain(){return!0}}},669:(Y,b,t)=>{t.r(b),t.d(b,{SyntaxToken:()=>R});var S=t(891),I=t(541);class R extends I.Token{constructor(M,C,P="plain",f=S.default.getConfig(),l=[],n){super(M,f,l,n),this.type=P}}},895:(Y,b,t)=>{t.d(b,{$:()=>n});var S=t(169),I=t(891),R=t(541),W=t(415),M=t(83),C=Object.defineProperty,P=(i,d,r)=>d in i?C(i,d,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[d]=r,f=(i,d,r)=>(P(i,typeof d!="symbol"?d+"":d,r),r);const l=(i,d)=>{const r=new Set(i);return r.delete(d),[...r]};class n extends W.m{constructor(d,r,o,s,h=I.default.getConfig(),p=[]){var E;const _=d.toLowerCase(),v=new M.x(!r||/^\s/u.test(r)?r:` ${r}`,"ext-attrs",_,h,p),F={...h,ext:l(h.ext,_),excludes:[...(E=h.excludes)!=null?E:[]]};let B;switch(F.inExt=!0,_){case"tab":F.ext=l(F.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":_==="poem"&&F.excludes.push("heading"),B=new R.Token(o,F,p);break;case"pre":{const{PreToken:z}=t(435);B=new z(o,F,p);break}case"dynamicpagelist":{const{ParamTagToken:z}=t(160);B=new z(o,F,p);break}case"inputbox":{F.excludes.push("heading");const{InputboxToken:z}=t(504);B=new z(o,F,p);break}case"references":{const{NestedToken:z}=t(57);B=new z(o,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],F,p);break}case"choose":{const{NestedToken:z}=t(57);B=new z(o,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],F,p);break}case"combobox":{const{NestedToken:z}=t(57);B=new z(o,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],F,p);break}case"gallery":{const{GalleryToken:z}=t(420);B=new z(o,F,p);break}case"imagemap":{const{ImagemapToken:z}=t(842);B=new z(o,F,p);break}default:{const{NowikiToken:z}=t(491);B=new z(o,F)}}B.setAttribute("name",_).type="ext-inner",super(d,v,B,s,h,p),f(this,"type","ext")}lint(d=this.getAbsoluteIndex()){const r=super.lint(d);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){const o=this.getRootNode(),s={start:d,...o.posFromIndex(d)};r.push((0,S.Y)(this,s,"extension tag in HTML tag attributes"))}return r}}},415:(Y,b,t)=>{t.d(b,{m:()=>n});var S=t(891),I=t(541),R=(i,d,r)=>{if(!d.has(i))throw TypeError("Cannot "+r)},W=(i,d,r)=>(R(i,d,"read from private field"),r?r.call(i):d.get(i)),M=(i,d,r)=>{if(d.has(i))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(i):d.set(i,r)},C=(i,d,r,o)=>(R(i,d,"write to private field"),o?o.call(i,r):d.set(i,r),r),P,f,l;class n extends I.Token{constructor(d,r,o,s,h=S.default.getConfig(),p=[]){super(void 0,h),M(this,P,void 0),M(this,f,void 0),M(this,l,void 0),this.setAttribute("name",d.toLowerCase()),C(this,l,[d,s||d]),C(this,P,s===void 0),C(this,f,s!==""),this.append(r,o);const E=typeof r=="string"?-1:p.indexOf(r);p.splice(E===-1?1/0:E,0,this)}get closed(){return W(this,f)}toString(d){const{firstChild:r,lastChild:o}=this,[s,h]=W(this,l);return W(this,P)?`<${s}${r.toString(d)}/>`:`<${s}${r.toString(d)}>${o.toString(d)}${this.closed?`</${h}>`:""}`}text(){const[d,r]=W(this,l);return W(this,P)?`<${d}${this.firstChild.text()}/>`:`<${d}${super.text(">")}${this.closed?`</${r}>`:""}`}getPadding(){return W(this,l)[0].length+1}getGaps(d){return 1}print(){const[d,r]=W(this,l);return super.print(W(this,P)?{pre:`&lt;${d}`,post:"/&gt;"}:{pre:`&lt;${d}`,sep:"&gt;",post:this.closed?`&lt;/${r}&gt;`:""})}}P=new WeakMap,f=new WeakMap,l=new WeakMap},169:(Y,b,t)=>{t.d(b,{D:()=>I,Y:()=>R});var S=t(891);const I=(W,M,C,P="error")=>{const f=W.getRelativeIndex(),{offsetHeight:l,offsetWidth:n,parentNode:i}=W,{top:d,left:r}=i.posFromIndex(f),{start:o}=M,{top:s,left:h}="top"in M?M:W.getRootNode().posFromIndex(o),p=String(W),E=o+f,_=s+d,v=d?r:h+r;return{message:S.default.msg(C),severity:P,startIndex:E,endIndex:E+p.length,startLine:_,endLine:_+l-1,startCol:v,endCol:l===1?v+n:n}},R=(W,M,C,P="error")=>{const{start:f}=M,{offsetHeight:l,offsetWidth:n}=W,i=String(W),{top:d,left:r}="top"in M?M:W.getRootNode().posFromIndex(f);return{message:S.default.msg(C),severity:P,startIndex:f,endIndex:f+i.length,startLine:d,endLine:d+l-1,startCol:r,endCol:l===1?r+n:n}}},467:(Y,b,t)=>{t.d(b,{PN:()=>R,Qk:()=>I,S0:()=>f,_X:()=>S,fL:()=>M,hr:()=>W,jq:()=>P,m9:()=>C});const S='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',I='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',R=l=>l.replace(/\0\d+c\x7F/gu,""),W=l=>l.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),M=(l,n="")=>l.map(i=>typeof i=="string"?i:i.text()).join(n),C=l=>l.replace(/&#(\d+|x[\da-f]+);/giu,(n,i)=>String.fromCodePoint(+`${i[0].toLowerCase()==="x"?"0":""}${i}`)),P=l=>l.replace(/\n/gu,"\\n"),f=(l,n={})=>{const{pre:i="",post:d="",sep:r=""}=n,o={"&":"amp","<":"lt",">":"gt"};return`${i}${l.map(s=>s.type==="text"?s.data.replace(/[&<>]/gu,h=>`&${o[h]};`):s.print()).join(r)}${d}`}},166:Y=>{Y.exports=JSON.parse('{"ext":[],"html":[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link","img"]],"namespaces":{"6":"File","10":"Template"},"nsid":{},"parserFunction":[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#regex":"regex","#related":"related","#cscore":"cscore"},[],["msg","\u539F\u59CB","raw"],["\u66FF\u4EE3","subst","\u5B89\u5168\u66FF\u4EE3","safesubst"]],"doubleUnderscore":[[],[]],"protocol":"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:","interwiki":[],"img":{},"variants":[]}')}},Rt={};function Pt(Y){var b=Rt[Y];if(b!==void 0)return b.exports;var t=Rt[Y]={exports:{}};return Vt[Y](t,t.exports,Pt),t.exports}Pt.d=(Y,b)=>{for(var t in b)Pt.o(b,t)&&!Pt.o(Y,t)&&Object.defineProperty(Y,t,{enumerable:!0,get:b[t]})},Pt.o=(Y,b)=>Object.prototype.hasOwnProperty.call(Y,b),Pt.r=Y=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Y,"__esModule",{value:!0})};var ie=Pt(891)})();})();
36
+ `)}getGaps(n){return n<this.length-1?1:0}lint(n=this.getAbsoluteIndex()){let r;return this.childNodes.filter(d=>{const{childNodes:i}=d,l=i.findIndex(({type:a})=>a!=="text"),s=(l>=0?i.slice(0,l).map(String).join(""):String(d)).trim();return s&&!(l>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(s)}).map(d=>(r!=null||(r={start:n,...this.getRootNode().posFromIndex(n)}),(0,$.D)(d,r,I.default.msg("invalid parameter of $1",this.name))))}print(){return super.print({sep:`
37
+ `})}}},504:(Y,M,t)=>{t.r(M),t.d(M,{InputboxToken:()=>W});var $=t(313),I=t(891),R=t(160);class W extends R.ParamTagToken{constructor(S,P=I.default.getConfig(),x=[]){const o=Symbol("InputboxToken");x.push(o),S&&(S=(0,$.parseBraces)(S,P,x)),x.splice(x.indexOf(o),1),super(S,P,x,{})}}},435:(Y,M,t)=>{t.r(M),t.d(M,{PreToken:()=>P});var $=t(891),I=t(541),R=t(826),W=Object.defineProperty,b=(x,o,n)=>o in x?W(x,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):x[o]=n,S=(x,o,n)=>(b(x,typeof o!="symbol"?o+"":o,n),n);class P extends I.Token{constructor(o,n=$.default.getConfig(),r=[]){if(o){const d="<nowiki>",i="</nowiki>",{length:l}=d;let s=o.indexOf(d),a=o.indexOf(i,s+l),c="";for(;s!==-1&&a!==-1;)new R.O(d,n,r),new R.O(i,n,r),c+=`${o.slice(0,s)}\0${r.length-1}c\x7F${o.slice(s+l,a)}\0${r.length}c\x7F`,o=o.slice(a+l+1),s=o.indexOf(d),a=o.indexOf(i,s+l);o=`${c}${o}`}super(o,n,r,{}),S(this,"type","ext-inner"),this.setAttribute("stage",$.default.MAX_STAGE-1)}isPlain(){return!0}}},669:(Y,M,t)=>{t.r(M),t.d(M,{SyntaxToken:()=>R});var $=t(891),I=t(541);class R extends I.Token{constructor(b,S,P="plain",x=$.default.getConfig(),o=[],n){super(b,x,o,n),this.type=P}}},895:(Y,M,t)=>{t.d(M,{$:()=>n});var $=t(169),I=t(891),R=t(541),W=t(415),b=t(83),S=Object.defineProperty,P=(r,d,i)=>d in r?S(r,d,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[d]=i,x=(r,d,i)=>(P(r,typeof d!="symbol"?d+"":d,i),i);const o=(r,d)=>{const i=new Set(r);return i.delete(d),[...i]};class n extends W.m{constructor(d,i,l,s,a=I.default.getConfig(),c=[]){var v;const _=d.toLowerCase(),m=new b.x(!i||/^\s/u.test(i)?i:` ${i}`,"ext-attrs",_,a,c),F={...a,ext:o(a.ext,_),excludes:[...(v=a.excludes)!=null?v:[]]};let K;switch(F.inExt=!0,_){case"tab":F.ext=o(F.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":_==="poem"&&F.excludes.push("heading"),K=new R.Token(l,F,c);break;case"pre":{const{PreToken:G}=t(435);K=new G(l,F,c);break}case"dynamicpagelist":{const{ParamTagToken:G}=t(160);K=new G(l,F,c);break}case"inputbox":{F.excludes.push("heading");const{InputboxToken:G}=t(504);K=new G(l,F,c);break}case"references":{const{NestedToken:G}=t(57);K=new G(l,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],F,c);break}case"choose":{const{NestedToken:G}=t(57);K=new G(l,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],F,c);break}case"combobox":{const{NestedToken:G}=t(57);K=new G(l,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],F,c);break}case"gallery":{const{GalleryToken:G}=t(420);K=new G(l,F,c);break}case"imagemap":{const{ImagemapToken:G}=t(842);K=new G(l,F,c);break}default:{const{NowikiToken:G}=t(491);K=new G(l,F)}}K.setAttribute("name",_),K.type="ext-inner",super(d,m,K,s,a,c),x(this,"type","ext")}lint(d=this.getAbsoluteIndex()){const i=super.lint(d);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){const l=this.getRootNode(),s={start:d,...l.posFromIndex(d)};i.push((0,$.Y)(this,s,"extension tag in HTML tag attributes"))}return i}}},415:(Y,M,t)=>{t.d(M,{m:()=>n});var $=t(891),I=t(541),R=(r,d,i)=>{if(!d.has(r))throw TypeError("Cannot "+i)},W=(r,d,i)=>(R(r,d,"read from private field"),i?i.call(r):d.get(r)),b=(r,d,i)=>{if(d.has(r))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(r):d.set(r,i)},S=(r,d,i,l)=>(R(r,d,"write to private field"),l?l.call(r,i):d.set(r,i),i),P,x,o;class n extends I.Token{constructor(d,i,l,s,a=$.default.getConfig(),c=[]){super(void 0,a),b(this,P,void 0),b(this,x,void 0),b(this,o,void 0),this.setAttribute("name",d.toLowerCase()),S(this,o,[d,s||d]),S(this,P,s===void 0),S(this,x,s!==""),this.append(i,l);const v=typeof i=="string"?-1:c.indexOf(i);c.splice(v===-1?1/0:v,0,this)}get closed(){return W(this,x)}toString(d){const{firstChild:i,lastChild:l}=this,[s,a]=W(this,o);return W(this,P)?`<${s}${i.toString(d)}/>`:`<${s}${i.toString(d)}>${l.toString(d)}${this.closed?`</${a}>`:""}`}text(){const[d,i]=W(this,o);return W(this,P)?`<${d}${this.firstChild.text()}/>`:`<${d}${super.text(">")}${this.closed?`</${i}>`:""}`}getPadding(){return W(this,o)[0].length+1}getGaps(d){return 1}print(){const[d,i]=W(this,o);return super.print(W(this,P)?{pre:`&lt;${d}`,post:"/&gt;"}:{pre:`&lt;${d}`,sep:"&gt;",post:this.closed?`&lt;/${i}&gt;`:""})}}P=new WeakMap,x=new WeakMap,o=new WeakMap},169:(Y,M,t)=>{t.d(M,{D:()=>I,Y:()=>R});var $=t(891);const I=(W,b,S,P="error")=>{const x=W.getRelativeIndex(),{offsetHeight:o,offsetWidth:n,parentNode:r}=W,{top:d,left:i}=r.posFromIndex(x),{start:l}=b,{top:s,left:a}="top"in b?b:W.getRootNode().posFromIndex(l),c=String(W),v=l+x,_=s+d,m=d?i:a+i;return{message:$.default.msg(S),severity:P,startIndex:v,endIndex:v+c.length,startLine:_,endLine:_+o-1,startCol:m,endCol:o===1?m+n:n}},R=(W,b,S,P="error")=>{const{start:x}=b,{offsetHeight:o,offsetWidth:n}=W,r=String(W),{top:d,left:i}="top"in b?b:W.getRootNode().posFromIndex(x);return{message:$.default.msg(S),severity:P,startIndex:x,endIndex:x+r.length,startLine:d,endLine:d+o-1,startCol:i,endCol:o===1?i+n:n}}},467:(Y,M,t)=>{t.d(M,{PN:()=>R,Qk:()=>I,S0:()=>x,_X:()=>$,fL:()=>b,hr:()=>W,jq:()=>P,m9:()=>S});const $='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',I='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',R=o=>o.replace(/\0\d+c\x7F/gu,""),W=o=>o.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),b=(o,n="")=>o.map(r=>typeof r=="string"?r:r.text()).join(n),S=o=>o.replace(/&#(\d+|x[\da-f]+);/giu,(n,r)=>String.fromCodePoint(+`${r[0].toLowerCase()==="x"?"0":""}${r}`)),P=o=>o.replace(/\n/gu,"\\n"),x=(o,n={})=>{const{pre:r="",post:d="",sep:i=""}=n,l={"&":"amp","<":"lt",">":"gt"};return`${r}${o.map(s=>s.type==="text"?s.data.replace(/[&<>]/gu,a=>`&${l[a]};`):s.print()).join(i)}${d}`}},166:Y=>{Y.exports=JSON.parse('{"ext":[],"html":[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link","img"]],"namespaces":{"6":"File","10":"Template"},"nsid":{},"parserFunction":[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#regex":"regex","#related":"related","#cscore":"cscore"},[],["msg","\u539F\u59CB","raw"],["\u66FF\u4EE3","subst","\u5B89\u5168\u66FF\u4EE3","safesubst"]],"doubleUnderscore":[[],[]],"protocol":"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:","interwiki":[],"img":{},"variants":[]}')}},Rt={};function Pt(Y){var M=Rt[Y];if(M!==void 0)return M.exports;var t=Rt[Y]={exports:{}};return Vt[Y](t,t.exports,Pt),t.exports}Pt.d=(Y,M)=>{for(var t in M)Pt.o(M,t)&&!Pt.o(Y,t)&&Object.defineProperty(Y,t,{enumerable:!0,get:M[t]})},Pt.o=(Y,M)=>Object.prototype.hasOwnProperty.call(Y,M),Pt.r=Y=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Y,"__esModule",{value:!0})};var ie=Pt(891)})();})();
@@ -1,11 +1,10 @@
1
1
  (() => {
2
2
  const MAX_STAGE = 11;
3
- /** web worker */
4
3
  const workerJS = () => {
5
- self.importScripts('https://fastly.jsdelivr.net/gh/bhsd-harry/wikiparser-node@1.0.1-b/bundle/bundle.min.js');
4
+ self.importScripts('https://fastly.jsdelivr.net/gh/bhsd-harry/wikiparser-node@1.0.2-b/bundle/bundle.min.js');
6
5
  const { Parser } = self, entities = { '&': 'amp', '<': 'lt', '>': 'gt' };
7
- /** @implements */
8
6
  self.onmessage = ({ data }) => {
7
+ var _a;
9
8
  const [command, qid, ...args] = data;
10
9
  switch (command) {
11
10
  case 'setI18N':
@@ -20,9 +19,8 @@
20
19
  case 'lint':
21
20
  self.postMessage([qid, Parser.parse(...args).lint(), args[0]]);
22
21
  break;
23
- // case 'print':
24
22
  default: {
25
- const stage = args[2] === undefined ? MAX_STAGE : args[2];
23
+ const stage = (_a = args[2]) !== null && _a !== void 0 ? _a : MAX_STAGE;
26
24
  self.postMessage([
27
25
  qid,
28
26
  Parser.parse(...args).childNodes.map(child => [
@@ -39,18 +37,7 @@
39
37
  };
40
38
  const blob = new Blob([`(${String(workerJS).replace(/MAX_STAGE/gu, String(MAX_STAGE))})()`], { type: 'text/javascript' }), url = URL.createObjectURL(blob), worker = new Worker(url);
41
39
  URL.revokeObjectURL(url);
42
- /**
43
- * 生成事件监听函数
44
- * @param qid 输入id
45
- * @param resolve Promise对象的resolve函数
46
- * @param raw 原始文本
47
- */
48
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
40
  const getListener = (qid, resolve, raw) => {
50
- /**
51
- * 事件监听函数
52
- * @param {{data: [number, unknown, string]}} e 消息事件
53
- */
54
41
  const listener = ({ data: [rid, res, resRaw] }) => {
55
42
  if (rid === qid && (raw === undefined || raw === resRaw)) {
56
43
  worker.removeEventListener('message', listener);
@@ -59,42 +46,20 @@
59
46
  };
60
47
  return listener;
61
48
  };
62
- /**
63
- * 更新I18N消息
64
- * @param i18n I18N消息
65
- */
66
49
  const setI18N = (i18n) => {
67
50
  worker.postMessage(['setI18N', i18n]);
68
51
  };
69
- /**
70
- * 更新解析设置
71
- * @param config 设置
72
- */
73
52
  const setConfig = (config) => {
74
53
  worker.postMessage(['setConfig', config]);
75
54
  };
76
- /** 获取Parser.minConfig */
77
55
  const getConfig = () => new Promise(resolve => {
78
56
  worker.addEventListener('message', getListener(-3, resolve));
79
57
  worker.postMessage(['getConfig', -3]);
80
58
  });
81
- /**
82
- * 将解析改为异步执行
83
- * @param wikitext wikitext
84
- * @param include 是否嵌入
85
- * @param stage 解析层级
86
- * @param qid Printer编号
87
- */
88
59
  const print = (wikitext, include, stage, qid = -1) => new Promise(resolve => {
89
60
  worker.addEventListener('message', getListener(qid, resolve));
90
61
  worker.postMessage(['print', qid, wikitext, include, stage]);
91
62
  });
92
- /**
93
- * 将语法分析改为异步执行
94
- * @param wikitext wikitext
95
- * @param include 是否嵌入
96
- * @param qid Linter编号,暂时固定为`-2`
97
- */
98
63
  const lint = (wikitext, include, qid = -2) => new Promise(resolve => {
99
64
  worker.addEventListener('message', getListener(qid, resolve, wikitext));
100
65
  worker.postMessage(['lint', qid, wikitext, include]);
@@ -7,87 +7,74 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11
+ if (kind === "m") throw new TypeError("Private method is not writable");
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15
+ };
16
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
+ };
10
21
  (() => {
22
+ var _Printer_instances, _Printer_id, _Printer_preview, _Printer_textbox, _Printer_root, _Printer_viewportChanged, _Printer_tick, _Printer_paint;
11
23
  const { wikiparse } = window, { MAX_STAGE } = wikiparse;
12
- /** 用于打印AST */
13
24
  class Printer {
14
- /* eslint-enable es-x/no-class-fields */
15
- /**
16
- * @param preview 置于下层的代码高亮
17
- * @param textbox 置于上层的文本框
18
- * @param include 是否嵌入
19
- */
20
25
  constructor(preview, textbox, include) {
21
- this.id = wikiparse.id++;
26
+ _Printer_instances.add(this);
27
+ _Printer_id.set(this, void 0);
28
+ _Printer_preview.set(this, void 0);
29
+ _Printer_textbox.set(this, void 0);
30
+ _Printer_root.set(this, void 0);
31
+ _Printer_viewportChanged.set(this, void 0);
32
+ __classPrivateFieldSet(this, _Printer_id, wikiparse.id++, "f");
33
+ __classPrivateFieldSet(this, _Printer_preview, preview, "f");
34
+ __classPrivateFieldSet(this, _Printer_textbox, textbox, "f");
35
+ __classPrivateFieldSet(this, _Printer_root, [], "f");
36
+ __classPrivateFieldSet(this, _Printer_viewportChanged, false, "f");
22
37
  this.include = Boolean(include);
23
- this.preview = preview;
24
- this.textbox = textbox;
25
- this.root = [];
26
38
  this.running = undefined;
27
- this.viewportChanged = false;
28
39
  this.ticks = [0, undefined];
29
40
  }
30
- /** 倒计时 */
31
- tick() {
32
- setTimeout(() => {
33
- const { ticks } = this;
34
- if (ticks[0] > 0) {
35
- ticks[0] -= 500;
36
- this[ticks[0] <= 0 ? ticks[1] : 'tick']();
37
- }
38
- }, 500);
39
- }
40
- /**
41
- * 用于debounce
42
- * @param delay 延迟
43
- * @param method 方法
44
- */
45
41
  queue(delay, method) {
46
42
  const { ticks } = this, [state] = ticks;
47
43
  if (state <= 0 || method === 'coarsePrint' || ticks[1] !== 'coarsePrint') {
48
44
  ticks[0] = delay;
49
45
  ticks[1] = method;
50
46
  if (state <= 0) {
51
- this.tick();
47
+ __classPrivateFieldGet(this, _Printer_instances, "m", _Printer_tick).call(this);
52
48
  }
53
49
  }
54
50
  }
55
- /** 渲染 */
56
- paint() {
57
- this.preview.innerHTML = `<span class="wpb-root">${this.root.map(([, , printed]) => printed).join('')}</span> `;
58
- this.preview.scrollTop = this.textbox.scrollTop;
59
- this.preview.classList.remove('active');
60
- this.textbox.style.color = 'transparent';
61
- }
62
- /** 初步解析 */
63
51
  coarsePrint() {
64
52
  return __awaiter(this, void 0, void 0, function* () {
65
53
  if (this.running) {
66
54
  return undefined;
67
55
  }
68
- const { include, textbox: { value } } = this, parsed = yield wikiparse.print(value, include, 2, this.id);
69
- if (this.include !== include || this.textbox.value !== value) {
56
+ const { include } = this, { value } = __classPrivateFieldGet(this, _Printer_textbox, "f"), parsed = yield wikiparse.print(value, include, 2, __classPrivateFieldGet(this, _Printer_id, "f"));
57
+ if (this.include !== include || __classPrivateFieldGet(this, _Printer_textbox, "f").value !== value) {
70
58
  this.running = undefined;
71
59
  this.running = this.coarsePrint();
72
60
  return this.running;
73
61
  }
74
- this.root = parsed;
75
- this.paint();
62
+ __classPrivateFieldSet(this, _Printer_root, parsed, "f");
63
+ __classPrivateFieldGet(this, _Printer_instances, "m", _Printer_paint).call(this);
76
64
  this.running = undefined;
77
65
  this.running = this.finePrint();
78
66
  return this.running;
79
67
  });
80
68
  }
81
- /** 根据可见范围精细解析 */
82
69
  finePrint() {
83
70
  return __awaiter(this, void 0, void 0, function* () {
84
71
  if (this.running) {
85
- this.viewportChanged = true;
72
+ __classPrivateFieldSet(this, _Printer_viewportChanged, true, "f");
86
73
  return undefined;
87
74
  }
88
- this.viewportChanged = false;
89
- const { root, preview: { scrollHeight, offsetHeight: parentHeight, scrollTop, children: [rootNode] }, include, textbox: { value }, } = this;
90
- let text = value, start = 0, { length: end } = root;
75
+ __classPrivateFieldSet(this, _Printer_viewportChanged, false, "f");
76
+ const { include } = this, { value } = __classPrivateFieldGet(this, _Printer_textbox, "f"), { scrollHeight, offsetHeight: parentHeight, scrollTop, children: [rootNode] } = __classPrivateFieldGet(this, _Printer_preview, "f");
77
+ let text = value, start = 0, { length: end } = __classPrivateFieldGet(this, _Printer_root, "f");
91
78
  if (scrollHeight > parentHeight) {
92
79
  const childNodes = [...rootNode.childNodes], headings = childNodes.filter(({ className }) => className === 'wpb-heading'), { length } = headings;
93
80
  if (length > 0) {
@@ -96,26 +83,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
96
83
  let j = headings.slice(i).findIndex(({ offsetTop }) => offsetTop >= scrollTop + parentHeight);
97
84
  j = j === -1 ? length : i + j;
98
85
  start = i ? childNodes.indexOf(headings[i - 1]) : 0;
99
- while (i <= j && root[start][0] === MAX_STAGE) {
86
+ while (i <= j && __classPrivateFieldGet(this, _Printer_root, "f")[start][0] === MAX_STAGE) {
100
87
  start = childNodes.indexOf(headings[i++]);
101
88
  }
102
89
  end = j === length ? end : childNodes.indexOf(headings[j]);
103
- while (i <= j && root[end - 1][0] === MAX_STAGE) {
90
+ while (i <= j && __classPrivateFieldGet(this, _Printer_root, "f")[end - 1][0] === MAX_STAGE) {
104
91
  end = childNodes.indexOf(headings[--j]);
105
92
  }
106
- text = root.slice(start, end).map(([, str]) => str).join('');
93
+ text = __classPrivateFieldGet(this, _Printer_root, "f").slice(start, end).map(([, str]) => str).join('');
107
94
  }
108
95
  }
109
96
  if (start === end) {
110
97
  this.running = undefined;
111
98
  return undefined;
112
99
  }
113
- const parsed = yield wikiparse.print(text, include, MAX_STAGE, this.id);
114
- if (this.include === include && this.textbox.value === value) {
115
- this.root.splice(start, end - start, ...parsed);
116
- this.paint();
100
+ const parsed = yield wikiparse.print(text, include, MAX_STAGE, __classPrivateFieldGet(this, _Printer_id, "f"));
101
+ if (this.include === include && __classPrivateFieldGet(this, _Printer_textbox, "f").value === value) {
102
+ __classPrivateFieldGet(this, _Printer_root, "f").splice(start, end - start, ...parsed);
103
+ __classPrivateFieldGet(this, _Printer_instances, "m", _Printer_paint).call(this);
117
104
  this.running = undefined;
118
- if (this.viewportChanged) {
105
+ if (__classPrivateFieldGet(this, _Printer_viewportChanged, "f")) {
119
106
  this.running = this.finePrint();
120
107
  }
121
108
  }
@@ -127,12 +114,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
127
114
  });
128
115
  }
129
116
  }
130
- /**
131
- * 高亮textarea
132
- * @param textbox textarea元素
133
- * @param include 是否嵌入
134
- * @throws `TypeError` 不是textarea
135
- */
117
+ _Printer_id = new WeakMap(), _Printer_preview = new WeakMap(), _Printer_textbox = new WeakMap(), _Printer_root = new WeakMap(), _Printer_viewportChanged = new WeakMap(), _Printer_instances = new WeakSet(), _Printer_tick = function _Printer_tick() {
118
+ setTimeout(() => {
119
+ const { ticks } = this, [t, method] = ticks;
120
+ if (t > 0) {
121
+ ticks[0] -= 500;
122
+ if (t <= 500) {
123
+ this[method]();
124
+ }
125
+ else {
126
+ __classPrivateFieldGet(this, _Printer_instances, "m", _Printer_tick).call(this);
127
+ }
128
+ }
129
+ }, 500);
130
+ }, _Printer_paint = function _Printer_paint() {
131
+ __classPrivateFieldGet(this, _Printer_preview, "f").innerHTML = `<span class="wpb-root">${__classPrivateFieldGet(this, _Printer_root, "f").map(([, , printed]) => printed).join('')}</span> `;
132
+ __classPrivateFieldGet(this, _Printer_preview, "f").scrollTop = __classPrivateFieldGet(this, _Printer_textbox, "f").scrollTop;
133
+ __classPrivateFieldGet(this, _Printer_preview, "f").classList.remove('active');
134
+ __classPrivateFieldGet(this, _Printer_textbox, "f").style.color = 'transparent';
135
+ };
136
136
  const edit = (textbox, include) => {
137
137
  if (!(textbox instanceof HTMLTextAreaElement)) {
138
138
  throw new TypeError('wikiparse.edit方法仅可用于textarea元素!');
@@ -9,12 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  (() => {
11
11
  const { wikiparse } = window;
12
- /**
13
- * 高亮代码块
14
- * @param ele 代码块
15
- * @param linenums 是否添加行号
16
- * @param start 起始行号
17
- */
18
12
  const highlight = (ele, linenums, start = 1) => __awaiter(void 0, void 0, void 0, function* () {
19
13
  if (ele.classList.contains('highlighted')) {
20
14
  return;
@@ -22,7 +16,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
16
  const html = (yield wikiparse.print(ele.innerText)).map(([, , printed]) => printed).join('');
23
17
  ele.classList.add('highlighted');
24
18
  if (linenums) {
25
- // 添加行号。这里不使用<table>排版,而是使用<ol>
26
19
  const lines = html.split('\n').map((line, i) => {
27
20
  const li = document.createElement('li');
28
21
  li.id = `L${i + start}`;
@@ -34,7 +27,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
27
  }
35
28
  const ol = document.createElement('ol');
36
29
  ol.start = start;
37
- ol.style.paddingLeft = `${(lines.length + start - 1).toString().length + 2.5}ch`;
30
+ ol.style.paddingLeft = `${String(lines.length + start - 1).length + 2.5}ch`;
38
31
  ol.append(...lines);
39
32
  ele.replaceChildren(ol);
40
33
  }
@@ -7,37 +7,42 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11
+ if (kind === "m") throw new TypeError("Private method is not writable");
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15
+ };
16
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
+ };
10
21
  (() => {
22
+ var _Linter_instances, _Linter_id, _Linter_wikitext, _Linter_running, _Linter_lint;
11
23
  const { wikiparse } = window;
12
- /** 用于语法分析 */
13
24
  class Linter {
14
- /* eslint-enable es-x/no-class-fields */
15
- /** @param include 是否嵌入 */
16
25
  constructor(include) {
17
- this.id = wikiparse.id++;
26
+ _Linter_instances.add(this);
27
+ _Linter_id.set(this, void 0);
28
+ _Linter_wikitext.set(this, void 0);
29
+ _Linter_running.set(this, void 0);
30
+ __classPrivateFieldSet(this, _Linter_id, wikiparse.id++, "f");
31
+ __classPrivateFieldSet(this, _Linter_wikitext, undefined, "f");
32
+ __classPrivateFieldSet(this, _Linter_running, undefined, "f");
18
33
  this.include = Boolean(include);
19
- this.wikitext = undefined;
20
- this.running = undefined;
21
34
  }
22
- /**
23
- * 提交语法分析
24
- * @param wikitext 待分析的文本
25
- */
26
35
  queue(wikitext) {
27
- this.wikitext = wikitext;
28
- this.running = this.lint(wikitext);
29
- return this.running;
30
- }
31
- /**
32
- * 执行语法分析
33
- * @param wikitext 待分析的文本
34
- */
35
- lint(wikitext) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- const { include } = this, errors = yield wikiparse.lint(wikitext, include, this.id);
38
- return this.include === include && this.wikitext === wikitext ? errors : this.running;
39
- });
36
+ __classPrivateFieldSet(this, _Linter_wikitext, wikitext, "f");
37
+ __classPrivateFieldSet(this, _Linter_running, __classPrivateFieldGet(this, _Linter_instances, "m", _Linter_lint).call(this, wikitext), "f");
38
+ return __classPrivateFieldGet(this, _Linter_running, "f");
40
39
  }
41
40
  }
41
+ _Linter_id = new WeakMap(), _Linter_wikitext = new WeakMap(), _Linter_running = new WeakMap(), _Linter_instances = new WeakSet(), _Linter_lint = function _Linter_lint(wikitext) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const { include } = this, errors = yield wikiparse.lint(wikitext, include, __classPrivateFieldGet(this, _Linter_id, "f"));
44
+ return this.include === include && __classPrivateFieldGet(this, _Linter_wikitext, "f") === wikitext ? errors : __classPrivateFieldGet(this, _Linter_running, "f");
45
+ });
46
+ };
42
47
  wikiparse.Linter = Linter;
43
48
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "1.0.1-b",
3
+ "version": "1.0.2-b",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -31,12 +31,12 @@
31
31
  },
32
32
  "scripts": {
33
33
  "prepublishOnly": "webpack build --mode production && npm run build:ext",
34
- "build:core": "rm bundle/*.js; webpack build --mode development; webpack build --mode production",
35
- "build:ext": "rm -rf extensions/dist/; tsc --project extensions/tsconfig.json; ls extensions/dist/*.js | xargs gsed -i '/export {};/d'",
34
+ "build:core": "rm bundle/*.js; webpack build --mode development; webpack build --mode production; eslint --no-eslintrc -c .eslintrc.browser.json bundle/",
35
+ "build:ext": "rm -rf extensions/dist/; tsc --project extensions/tsconfig.json; ls extensions/dist/*.js | xargs gsed -i '/export {};/d'; eslint --no-eslintrc -c .eslintrc.browser.json extensions/dist/",
36
36
  "build:test": "rm -rf dist/; tsc; gsed -i 's|./config/minimum|../config/minimum|' dist/index.js",
37
37
  "build": "npm run build:core && npm run build:ext",
38
38
  "diff": "git diff --ignore-all-space --color-moved",
39
- "lint:ts": "eslint --cache --ignore-pattern 'dist/' .",
39
+ "lint:ts": "tsc --noEmit && eslint --cache .",
40
40
  "lint:json": "ajv -s config/.schema.json -d 'config/*.json' --strict=true --strict-required=false",
41
41
  "lint:css": "stylelint extensions/*.css",
42
42
  "lint": "npm run lint:ts && npm run lint:json && npm run lint:css",