wikiparser-node 1.18.3 → 1.18.4

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,35 +1,36 @@
1
- "use strict";(()=>{var No=Object.create;var xt=Object.defineProperty;var di=Object.getOwnPropertyDescriptor;var Eo=Object.getOwnPropertyNames;var Lo=Object.prototype.hasOwnProperty;var gi=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),bt=a=>{throw TypeError(a)};var pi=(a,n,e)=>n in a?xt(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var li=(a,n)=>xt(a,"name",{value:n,configurable:!0});var y=(a,n)=>()=>(a&&(n=a(a=0)),n);var Fo=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),le=(a,n)=>{for(var e in n)xt(a,e,{get:n[e],enumerable:!0})},Ro=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Eo(n))!Lo.call(a,r)&&r!==e&&xt(a,r,{get:()=>n[r],enumerable:!(t=di(n,r))||t.enumerable});return a};var X=a=>Ro(xt({},"__esModule",{value:!0}),a);var te=a=>{var n;return[,,,No((n=a==null?void 0:a[gi("metadata")])!=null?n:null)]},ui=["class","method","getter","setter","accessor","field","value","get","set"],tr=a=>a!==void 0&&typeof a!="function"?bt("Function expected"):a,Po=(a,n,e,t,r)=>({kind:ui[a],name:n,metadata:t,addInitializer:i=>e._?bt("Already initialized"):r.push(tr(i||null))}),jo=(a,n)=>pi(n,gi("metadata"),a[3]),re=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},ne=(a,n,e,t,r,i)=>{var s,o,l,g,u,d=n&7,p=!!(n&8),m=!!(n&16),f=d>3?a.length+1:d?p?1:2:0,h=ui[d+5],x=d>3&&(a[f-1]=[]),v=a[f]||(a[f]=[]),C=d&&(!m&&!p&&(r=r.prototype),d<5&&(d>3||!m)&&di(d<4?r:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));d?m&&d<4&&li(i,(d>2?"set ":d>1?"get ":"")+e):li(r,e);for(var E=t.length-1;E>=0;E--)g=Po(d,e,l={},a[3],v),d&&(g.static=p,g.private=m,u=g.access={has:m?$=>Bo(r,$):$=>e in $},d^3&&(u.get=m?$=>(d^1?c:N)($,r,d^4?i:C.get):$=>$[e]),d>2&&(u.set=m?($,S)=>b($,r,S,d^4?i:C.set):($,S)=>$[e]=S)),o=(0,t[E])(d?d<4?m?i:C[h]:d>4?void 0:{get:C.get,set:C.set}:r,g),l._=1,d^4||o===void 0?tr(o)&&(d>4?x.unshift(o):d?m?i=o:C[h]=o:r=o):typeof o!="object"||o===null?bt("Object expected"):(tr(s=o.get)&&(C.get=s),tr(s=o.set)&&(C.set=s),tr(s=o.init)&&x.unshift(s));return d||jo(a,r),C&&xt(r,e,C),m?d^4?i:C:r},ie=(a,n,e)=>pi(a,typeof n!="symbol"?n+"":n,e),un=(a,n,e)=>n.has(a)||bt("Cannot "+e),Bo=(a,n)=>Object(n)!==n?bt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(un(a,n,"read from private field"),e?e.call(a):n.get(a)),T=(a,n,e)=>n.has(a)?bt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),b=(a,n,e,t)=>(un(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),N=(a,n,e)=>(un(a,n,"access private method"),e);var Nr=(a,n,e,t)=>({set _(r){b(a,n,r,e)},get _(){return c(a,n,t)}});var ci,hi,mi=y(()=>{"use strict";ci=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(a,null),a})(),hi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});var Me,De,fi,Tt=y(()=>{"use strict";Me=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),De=a=>n=>{let e=new Map;if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t},fi=a=>n=>{let e=new WeakMap;if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}});var ke,xi,Ne,Ee,Je,bi,se,Wa,fe,qo,Oo,Ye,Ti,Ha,_o,Mo,yt,Le,Q=y(()=>{"use strict";Tt();ke=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,xi=String.raw`[^[\]<>"\0-\x1F\x7F${ke}\uFFFD]`,Ne=String.raw`(?:\[[\da-f:.]+\]|${xi})`,Ee=String.raw`(?:${xi}|\0\d+[cn!~]\x7F)*`,Je=(a,n)=>e=>e.replace(a,n),bi=Je(/[\0\x7F]|\r$/gmu,""),se=Je(/\0\d+[cn]\x7F/gu,""),Wa=Je(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),fe=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),qo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Oo=Je(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):qo[e.toLowerCase()]),Ye=a=>Oo(a),Ti=Je(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),Ha=Je(/\n/gu,String.raw`\n`),_o={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Mo=a=>Je(a,n=>`&${_o[n]};`),yt=Mo(/[&<>]/gu),Le=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var yi=Fo((Qa,Do)=>{Do.exports={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"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"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","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var cn,ki=y(()=>{"use strict";cn=yi()});var rr,kt,nr,ir,hn,R,V=y(()=>{"use strict";R=class{constructor(n,e){T(this,ir);T(this,rr);T(this,kt);T(this,nr);b(this,rr,n),b(this,kt,e)}get start(){return c(this,kt)}get top(){return N(this,ir,hn).call(this).top}get left(){return N(this,ir,hn).call(this).left}};rr=new WeakMap,kt=new WeakMap,nr=new WeakMap,ir=new WeakSet,hn=function(){var n;return(n=c(this,nr))!=null||b(this,nr,c(this,rr).getRootNode().posFromIndex(c(this,kt))),c(this,nr)}});var mn,vi,w,L,ve,Ai,_=y(()=>{"use strict";ce();V();M();mn=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),vi=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(n,s),{offsetHeight:g,offsetWidth:u}=n,{startIndex:d,startLine:p,startCol:m}=a(n,s,o,l),{line:f,character:h}=mn(p,m,g,u);return{rule:t,message:A.msg(r),severity:i,startIndex:d,endIndex:d+n.toString().length,startLine:p,endLine:f,startCol:m,endCol:h}},w=vi((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),L=vi((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),ve=(a,n,e)=>{if(a)return a[1];let t=n();return e([de.rev,t]),t},Ai=(()=>{let a=(n,e)=>n==="ol"&&e==="type"?["1","a","A","i","I"]:n==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(n,e){return a(n,e).map(t=>({name:t}))}}})()});var zo,Er,Si=y(()=>{"use strict";zo=(a,n,e)=>{let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)},Er=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>zo(i.trim(),t,r))});var sr,vt,At,or,ar,St,wt,lr,fn,Ct,xn=y(()=>{"use strict";_();ce();Ct=class{constructor(){T(this,lr);ie(this,"childNodes",[]);T(this,sr);T(this,vt);T(this,At);T(this,or);T(this,ar);T(this,St);T(this,wt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,sr)}get nextSibling(){return c(this,vt)}get previousSibling(){return c(this,At)}get offsetHeight(){return N(this,lr,fn).call(this).height}get offsetWidth(){return N(this,lr,fn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":b(this,sr,e),e||(b(this,vt,void 0),b(this,At,void 0));break;case"nextSibling":b(this,vt,e);break;case"previousSibling":b(this,At,e);break;case"aIndex":b(this,St,[de.rev,e]);break;default:this[n]=e}}getRootNode(){return ve(c(this,ar),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&b(this,ar,n)})}indexFromPos(n,e){}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ve(c(this,wt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,wt)[i]=[de.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,wt)[n]=e})}getAbsoluteIndex(){return ve(c(this,St),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{b(this,St,n)})}getBoundingClientRect(){}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}is(n){return this.type===n}getLines(){return ve(c(this,or),()=>{let n=[],e=0;for(let t of String(this).split(`
2
- `)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{b(this,or,n)})}};sr=new WeakMap,vt=new WeakMap,At=new WeakMap,or=new WeakMap,ar=new WeakMap,St=new WeakMap,wt=new WeakMap,lr=new WeakSet,fn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var ze,bn,Tn,Lr,wi=y(()=>{"use strict";Q();ce();Si();xn();Lr=class extends Ct{constructor(){super(...arguments);T(this,ze)}get length(){return this.childNodes.length}text(e){return fe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return dr(this,e,1)[0]}insertAt(e,t=this.length){return dr(this,t,0,[e]),e}closest(e){let t=Er(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Er(e,this);return N(this,ze,bn).call(this,t)}querySelectorAll(e){let t=Er(e,this);return N(this,ze,Tn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s),r.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Le(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};ze=new WeakSet,bn=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=N(t=r,ze,bn).call(t,e);if(i)return i}},Tn=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(r=i,ze,Tn).call(r,e)));return t}});var yn,Ci,Go,Uo,Wo,Ho,Vo,Xo,kn,Fr,$i,gr,Ii=y(()=>{"use strict";Q();_();M();xn();yn=String.raw`[${ke}\t]*`,Ci=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${yn}\d)|isbn(?=[-::]?${yn}(?:\d(?:${yn}|-)){6})`,Go=new RegExp(String.raw`${Ci}|https?[:/]/+`,"giu"),Uo=new RegExp(Ci,"giu"),Wo=new Set(["attr-value","ext-link-text","link-text"]),Ho={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Vo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Xo=["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"];try{kn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){kn=/\w/u}gr=class extends Ct{constructor(e){super();T(this,Fr);ie(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var O,P,j;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:u}=i,d=!1;if(l==="attr-value"){let{type:q,name:ae,tag:me}=u;if(q!=="ext-attr")d=!0;else if(me==="choose"&&(ae==="before"||ae==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||d?Uo:Go),r.search(t)===-1)return[];t.lastIndex=0;let p=[],m=s==null?void 0:s.type,f=s==null?void 0:s.name,h=o==null?void 0:o.type,x=this.getRootNode(),v=x.toString(),{ext:C,html:E}=x.getAttribute("config"),{top:$,left:S}=x.posFromIndex(e),F=new Set(["onlyinclude","noinclude","includeonly",...C,...E[0],...E[1],...E[2],...Xo]);for(let q=t.exec(r);q;q=t.exec(r)){let[,ae,me]=q,{index:pe}=q,K=q[0].toLowerCase();if(me&&me!=="]"){let{length:ue}=me;pe+=ue,K=K.slice(ue)}let{0:I,length:Y}=K,Z=I==="r"||I==="p"||I==="i";if(I==="<"&&!F.has(ae.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(pe+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((O=s.innerText)!=null&&O.includes("]")))||Z&&(!i.getAttribute("plain")||Wo.has(l)))continue;I==="]"&&(pe||Y>1)&&t.lastIndex--;let ye=e+pe,Ie=ye+Y,ee=v[Ie],_e=v[ye-1],er=Y>1&&!(I==="<"&&!/[\s/>]/u.test(ee!=null?ee:"")||d&&(I==="["||I==="]")||Z&&l==="parameter-value")||I==="{"&&(ee===I||_e==="-")||I==="}"&&(_e===I||ee==="-")||I==="["&&(ee===I||l==="ext-link-text"||m==="free-ext-link"&&!r.slice(pe+1).trim())||I==="]"&&(_e===I||h==="free-ext-link"&&!r.slice(0,pe).includes("]"))?"error":"warning",gn=I==="{"||I==="[";if(er==="warning"&&(gn||(I==="]"||I==="}"))){let ue=Ho[I],pn=gn?r.slice(pe+1):r.slice(0,pe);if(I==="{"&&((P=ue.exec(pn))==null?void 0:P[0])==="}"||I==="}"&&((j=ue.exec(pn))==null?void 0:j[0])==="{")continue;if(!pn.includes(I)){let ai=gn?"nextSibling":"previousSibling",Ke=this[ai];for(;Ke&&(Ke.type!=="text"||!ue.test(Ke.data));)Ke=Ke[ai];if(Ke&&ue.exec(Ke.data)[0]!==I)continue}}Z&&(K=K.toUpperCase());let ii=this.posFromIndex(pe),{line:si,character:oi}=mn($,S,ii.top+1,ii.left),ft={rule:Vo[I],message:A.msg('lonely "$1"',Z||I==="h"?K:I),severity:er,startIndex:ye,endIndex:Ie,startLine:si,endLine:si,startCol:oi,endCol:oi+Y};if(I==="<")ft.suggestions=[{desc:"escape",range:[ye,ye+1],text:"&lt;"}];else if(I==="h"&&l!=="link-text"&&kn.test(_e||""))ft.suggestions=[{desc:"whitespace",range:[ye,ye],text:" "}];else if(I==="["&&l==="ext-link-text"){let ue=i.getAbsoluteIndex()+i.toString().length;ft.suggestions=[{desc:"escape",range:[ue,ue+1],text:"&#93;"}]}else if(I==="]"&&h==="free-ext-link"&&er==="error"){let ue=e-o.toString().length;ft.fix={range:[ue,ue],text:"[",desc:"left bracket"}}else Z&&(ft.suggestions=[...q[0]===K?[]:[{desc:"uppercase",range:[ye,Ie],text:K}],...ee===":"||ee==="\uFF1A"?[{desc:"whitespace",range:[Ie,Ie+1],text:" "}]:[]]);p.push(ft)}return p}replaceData(e){N(this,Fr,$i).call(this,e)}print(){return yt(this.data)}};Fr=new WeakSet,$i=function(e){this.setAttribute("data",e)}});var xe,Ze=y(()=>{"use strict";ce();xe=(a=!0,n=!0)=>(e,t)=>{class r extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Rr(r,e),r}});var pr,be,$t=y(()=>{"use strict";B();be=class extends k{constructor(e,t,r,i,s){super(e,r,i,s);T(this,pr);b(this,pr,t)}get type(){return c(this,pr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};pr=new WeakMap});var It,G,Fe=y(()=>{"use strict";B();G=class extends k{constructor(e,t,r,i,s){super(e,r,i,s);T(this,It);b(this,It,t)}get type(){return c(this,It)}set type(e){b(this,It,e)}};It=new WeakMap});var Qo,et,Ae,Re,we,ur=y(()=>{"use strict";_();Q();V();M();B();Fe();Qo=a=>a==="redirect-target"||a==="link",we=class extends k{constructor(e,t,r=A.getConfig(),i=[],s="|"){super(void 0,r,i,{});T(this,et,!0);T(this,Ae);T(this,Re);if(this.insertAt(new G(e,"link-target",r,i,{})),t!==void 0){let o=new k(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,Ae,s)}get link(){}get fragment(){return c(this,Re).fragment}afterBuild(){b(this,Re,this.getTitle()),c(this,Ae).includes("\0")&&b(this,Ae,this.buildFromStr(c(this,Ae),0)),this.setAttribute("name",c(this,Re).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,et,t):e==="title"?b(this,Re,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ae));return c(this,et)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,et)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Re):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ae).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,Re),u=new R(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&r.push(w(i,u,"unknown-page","template in an internal link target","warning")),l){let d=w(i,u,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:Me(i.text())}],r.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let m=w(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(d);m.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"&#124;")}],r.push(m)}}if(g!==void 0&&!Qo(o)){let d=w(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[p];m&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+m.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),r.push(d)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,et)?{pre:"[[",post:"]]",sep:c(this,Ae)}:{sep:c(this,Ae)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};et=new WeakMap,Ae=new WeakMap,Re=new WeakMap});var oe,Ge=y(()=>{"use strict";B();oe=class extends k{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var Ni,vn,Ko,W,Ue=y(()=>{"use strict";Ze();Ge();Ni=[xe()];W=class extends(Ko=oe){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};vn=te(Ko),W=ne(vn,0,"NoincludeToken",Ni,W),re(vn,1,W)});var Pr,Ei=y(()=>{"use strict";_();ur();Ue();Pr=class extends we{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new W(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=w(this.lastChild,{start:n},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var Li,We,Nt,An,Jo,tt,Fi=y(()=>{"use strict";Ze();B();$t();Ei();Li=[xe(!1,!1)];tt=class extends(Jo=k){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);T(this,We);T(this,Nt);b(this,We,e),b(this,Nt,s),this.append(new be(t,"redirect-syntax",o,l),new Pr(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,We).length:super.getAttribute(e)}toString(e){return c(this,We)+super.toString(e)+c(this,Nt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,We).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,We),post:c(this,Nt)})}};An=te(Jo),We=new WeakMap,Nt=new WeakMap,tt=ne(An,0,"RedirectToken",Li,tt),re(An,1,tt)});var Ri={};le(Ri,{parseRedirect:()=>Yo});var Yo,Pi=y(()=>{"use strict";M();Fi();Yo=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&A.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new tt(...t.slice(1),n,e),a):!1}});var jr,ji=y(()=>{"use strict";B();jr=class extends k{get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}getAttribute(n){return n==="padding"?13:n==="plain"||super.getAttribute(n)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var He,Et,Sn=y(()=>{"use strict";B();Et=class extends k{constructor(e,t,r,i,s,o=[]){super(void 0,s);T(this,He);ie(this,"closed");ie(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),b(this,He,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,He);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,He);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,He)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,He);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};He=new WeakMap});var Bi,wn,Zo,rt,qi=y(()=>{"use strict";_();V();Ze();M();Sn();Bi=[xe(!1)];rt=class extends(Zo=Et){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new R(this,n);if(t.data.trim()){let o=w(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=L(this,s,"unclosed-comment",A.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};wn=te(Zo),rt=ne(wn,0,"IncludeToken",Bi,rt),re(wn,1,rt)});var Lt,Br=y(()=>{"use strict";ce();Lt=(a=0)=>(n,e)=>{var r,Oi;class t extends n{constructor(){super(...arguments);T(this,r)}getAttr(l){return N(this,r,Oi).call(this).getAttr(l)}}return r=new WeakSet,Oi=function(){return this.childNodes[a]},Rr(t,n),t}});var H,_i,Mi,Or,Cn,Di,Ft,zi,Gi,Ui,qr,Wi,Hi,Vi,Xi,Qi=y(()=>{"use strict";H=new Set(["align"]),_i=new Set(["cite"]),Mi=new Set(["cite","datetime"]),Or=new Set(["width"]),Cn=new Set(["axis","align","bgcolor","height","width","valign"]),Di=new Set([...Cn,"abbr","headers","scope","rowspan","colspan"]),Ft=new Set(["type"]),zi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gi=new Set(["clear"]),Ui=new Set(["bgcolor","align","valign"]),qr=new Set,Wi=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Hi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:_i,q:_i,p:H,br:Gi,pre:Or,ins:Mi,del:Mi,ul:Ft,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...zi,"border"]),caption:H,tr:Ui,td:Di,th:Di,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Or,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ft,poem:H,categorytree:H,combooption:H},Vi={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:qr,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:qr,inputbox:qr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:qr,poll:new Set(["id","show-results-before-voting"]),sm2:Ft,flashmp3:Ft,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),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"])},Xi={table:zi,td:new Set([...Cn,"scope"]),th:Cn,br:Gi,caption:H,div:H,hr:Or,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:Ft,p:H,pre:Or,tr:Ui,ul:Ft}});var ea,ta,cr,Rt,J,Ce,Pt,Ki=y(()=>{"use strict";_();Q();Qi();V();M();B();Fe();ea=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ta=new Set(["ext","arg","magic-word","template"]),Pt=class extends k{constructor(e,t,r,i="",s,o=[],l=A.getConfig(),g=[]){let u=new G(r,"attr-key",l,g),d;if(r==="title"||t==="img"&&r==="alt")d=new k(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let p={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new k(s,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new G(s,"attr-value",l,g,{});super(void 0,l,g);T(this,cr);T(this,Rt);T(this,J);T(this,Ce);b(this,cr,e),this.append(u,d),b(this,J,i),b(this,Ce,[...o]),b(this,Rt,t),this.setAttribute("name",se(r).trim().toLowerCase())}get type(){return c(this,cr)}get tag(){return c(this,Rt)}get balanced(){return!c(this,J)||c(this,Ce)[0]===c(this,Ce)[1]}afterBuild(){c(this,J).includes("\0")&&b(this,J,this.buildFromStr(c(this,J),0)),this.parentNode&&b(this,Rt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Ce);return c(this,J)?super.toString(e,c(this,J)+t)+r:this.firstChild.toString(e)}text(){return c(this,J)?`${super.text(`${c(this,J).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,J)?c(this,J).length+((t=(e=c(this,Ce)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:u}=this,d=this.getValue(),p=new R(this,e);if(!i){let v=w(o,p,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");v.startIndex--,v.startCol--,v.suggestions=[{range:[v.endIndex,v.endIndex],text:c(this,Ce)[0],desc:"close"}],r.push(v)}let m=Vi[u],f=Hi[u],{length:h}=this.toString();if(!(m!=null&&m.has(g))&&!(f!=null&&f.has(g))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(u==="meta"||u==="link"||!Wi.has(g)))){let v=w(s,p,"illegal-attr","illegal attribute name");v.suggestions=[{desc:"remove",range:[e,e+h],text:""}],r.push(v)}else if(g==="style"&&typeof d=="string"&&ea.test(d))r.push(w(o,p,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let v=w(o,p,"illegal-attr","nonzero tabindex");v.suggestions=[{desc:"remove",range:[e,e+h],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],r.push(v)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:v})=>ta.has(v))){let v=Ai.provideValues(u,g),C=String(d).toLowerCase();v.length>0&&v.every(({name:E})=>E!==C)&&r.push(w(o,p,"illegal-attr","illegal attribute value","warning"))}return(x=Xi[u])!=null&&x.has(g)&&r.push(w(s,p,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,J)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ce);return c(this,J)?super.print({sep:yt(c(this,J))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};cr=new WeakMap,Rt=new WeakMap,J=new WeakMap,Ce=new WeakMap});var Ji,ra,$n,hr,Ve,_r=y(()=>{"use strict";_();Q();V();M();B();Fe();Ki();Ji=a=>a.slice(0,-1),ra=a=>`${Ji(a)}-dirty`;try{$n=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){$n=/[^\W_]/u}Ve=class extends k{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});T(this,hr);if(b(this,hr,t),this.setAttribute("name",r),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",g=o.exec(e),u=0,d=()=>{l&&(super.insertAt(new G(l,ra(t),i,s,{})),l="")};for(;g;){let{index:p,0:m,1:f,2:h,3:x,4:v,5:C,6:E}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(se(f).trim())){let $=v!=null?v:E,S=[x,C],F=new Pt(Ji(t),r,f,h,$,S,i,s);d(),super.insertAt(F)}else l+=m;({lastIndex:u}=o),g=o.exec(e)}l+=e.slice(u),d()}}get type(){return c(this,hr)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Pt&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,g=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let u=L(this,g,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();u.suggestions=[{desc:"remove",range:[e,u.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],r.push(u)}for(let u of s)if(u instanceof Pt){let{name:d}=u;o.has(d)?(l.add(d),o.get(d).push(u)):o.set(d,[u])}else{let d=u.text().trim();if(d){let p=w(u,g,"no-ignored","containing invalid attribute",$n.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],r.push(p)}}if(l.size>0)for(let u of l){let d=o.get(u).map(p=>{let m=p.getValue();return[p,m===!0?"":m]});r.push(...d.map(([p,m],f)=>{let h=w(p,g,"no-duplicate",A.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||d.slice(0,f).some(([,v])=>v===m)?h.fix=x:h.suggestions=[x],h}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof G?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};hr=new WeakMap});var Mr,Yi=y(()=>{"use strict";M();B();Ue();Mr=class extends k{get type(){return"ext-inner"}constructor(n,e=A.getConfig(),t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),g=0,u="";for(;o&&l;)new W(o[0],e,t),new W(l[0],e,t),u+=`${n.slice(g,o.index)}\0${t.length-1}n\x7F${n.slice(o.index+s,l.index)}\0${t.length}n\x7F`,g=l.index+s+1,r.lastIndex=g,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=u+n.slice(g)}super(n,e,t,{}),this.setAttribute("stage",10)}getAttribute(n){return n==="plain"||super.getAttribute(n)}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var jt,In=y(()=>{"use strict";_();V();mr();M();B();Fe();jt=class extends k{get type(){return"ext-inner"}constructor(n,e,t=A.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=G;this.append(...e.split(`
3
- `).map(o=>i?o:nt(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}toString(n){return super.toString(n,`
1
+ "use strict";(()=>{var Fo=Object.create;var xt=Object.defineProperty;var pi=Object.getOwnPropertyDescriptor;var Ro=Object.getOwnPropertyNames;var Po=Object.prototype.hasOwnProperty;var ui=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),bt=a=>{throw TypeError(a)};var ci=(a,r,e)=>r in a?xt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var gi=(a,r)=>xt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var jo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),le=(a,r)=>{for(var e in r)xt(a,e,{get:r[e],enumerable:!0})},Bo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ro(r))!Po.call(a,n)&&n!==e&&xt(a,n,{get:()=>r[n],enumerable:!(t=pi(r,n))||t.enumerable});return a};var K=a=>Bo(xt({},"__esModule",{value:!0}),a);var re=a=>{var r;return[,,,Fo((r=a==null?void 0:a[ui("metadata")])!=null?r:null)]},hi=["class","method","getter","setter","accessor","field","value","get","set"],tr=a=>a!==void 0&&typeof a!="function"?bt("Function expected"):a,Oo=(a,r,e,t,n)=>({kind:hi[a],name:r,metadata:t,addInitializer:i=>e._?bt("Already initialized"):n.push(tr(i||null))}),qo=(a,r)=>ci(r,ui("metadata"),a[3]),ne=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ie=(a,r,e,t,n,i)=>{var s,o,l,d,p,g=r&7,u=!!(r&8),h=!!(r&16),f=g>3?a.length+1:g?u?1:2:0,m=hi[g+5],x=g>3&&(a[f-1]=[]),v=a[f]||(a[f]=[]),C=g&&(!h&&!u&&(n=n.prototype),g<5&&(g>3||!h)&&pi(g<4?n:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));g?h&&g<4&&gi(i,(g>2?"set ":g>1?"get ":"")+e):gi(n,e);for(var E=t.length-1;E>=0;E--)d=Oo(g,e,l={},a[3],v),g&&(d.static=u,d.private=h,p=d.access={has:h?$=>_o(n,$):$=>e in $},g^3&&(p.get=h?$=>(g^1?c:N)($,n,g^4?i:C.get):$=>$[e]),g>2&&(p.set=h?($,S)=>b($,n,S,g^4?i:C.set):($,S)=>$[e]=S)),o=(0,t[E])(g?g<4?h?i:C[m]:g>4?void 0:{get:C.get,set:C.set}:n,d),l._=1,g^4||o===void 0?tr(o)&&(g>4?x.unshift(o):g?h?i=o:C[m]=o:n=o):typeof o!="object"||o===null?bt("Object expected"):(tr(s=o.get)&&(C.get=s),tr(s=o.set)&&(C.set=s),tr(s=o.init)&&x.unshift(s));return g||qo(a,n),C&&xt(n,e,C),h?g^4?i:C:n},se=(a,r,e)=>ci(a,typeof r!="symbol"?r+"":r,e),un=(a,r,e)=>r.has(a)||bt("Cannot "+e),_o=(a,r)=>Object(r)!==r?bt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(un(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?bt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(un(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(un(a,r,"access private method"),e);var Nr=(a,r,e,t)=>({set _(n){b(a,r,n,e)},get _(){return c(a,r,t)}});var mi,fi,xi=y(()=>{"use strict";mi=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(a,null),a})(),fi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});function we(a){return r=>{let e=new(typeof r=="string"?Map:WeakMap);if(e.has(r)){let n=e.get(r);return n.lastIndex=0,n}let t=a(r);return e.set(r,t),t}}var De,Tt=y(()=>{"use strict";De=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ke,bi,Ee,Le,Je,Ti,oe,Xa,fe,Mo,Do,Ye,yi,Qa,zo,Wo,yt,Fe,J=y(()=>{"use strict";Tt();ke=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,bi=String.raw`[^[\]<>"\0-\x1F\x7F${ke}\uFFFD]`,Ee=String.raw`(?:\[[\da-f:.]+\]|${bi})`,Le=String.raw`(?:${bi}|\0\d+[cn!~]\x7F)*`,Je=(a,r)=>e=>e.replace(a,r),Ti=Je(/[\0\x7F]|\r$/gmu,""),oe=Je(/\0\d+[cn]\x7F/gu,""),Xa=Je(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),fe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Mo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Do=Je(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Mo[e.toLowerCase()]),Ye=a=>Do(a),yi=Je(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Qa=Je(/\n/gu,String.raw`\n`),zo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Wo=a=>Je(a,r=>`&${zo[r]};`),yt=Wo(/[&<>]/gu),Fe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var ki=jo((Ya,Go)=>{Go.exports={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"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"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","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var cn,vi=y(()=>{"use strict";cn=ki()});var rr,kt,nr,ir,hn,P,X=y(()=>{"use strict";P=class{constructor(r,e){T(this,ir);T(this,rr);T(this,kt);T(this,nr);b(this,rr,r),b(this,kt,e)}get start(){return c(this,kt)}get top(){return N(this,ir,hn).call(this).top}get left(){return N(this,ir,hn).call(this).left}};rr=new WeakMap,kt=new WeakMap,nr=new WeakMap,ir=new WeakSet,hn=function(){var r;return(r=c(this,nr))!=null||b(this,nr,c(this,rr).getRootNode().posFromIndex(c(this,kt))),c(this,nr)}});var mn,Ai,w,F,ve,Si,q=y(()=>{"use strict";ce();X();_();mn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),Ai=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof P?e:new P(r,s),{offsetHeight:d,offsetWidth:p}=r,{startIndex:g,startLine:u,startCol:h}=a(r,s,o,l),{line:f,character:m}=mn(u,h,d,p);return{rule:t,message:A.msg(n),severity:i,startIndex:g,endIndex:g+r.toString().length,startLine:u,endLine:f,startCol:h,endCol:m}},w=Ai((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),F=Ai((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),ve=(a,r,e)=>{if(a)return a[1];let t=r();return e([de.rev,t]),t},Si=(()=>{let a=(r,e)=>r==="ol"&&e==="type"?["1","a","A","i","I"]:r==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(r,e){return a(r,e).map(t=>({name:t}))}}})()});var Uo,Er,wi=y(()=>{"use strict";Uo=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Er=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Uo(i.trim(),t,n))});var sr,vt,At,or,ar,St,wt,lr,fn,Ct,xn=y(()=>{"use strict";q();ce();Ct=class{constructor(){T(this,lr);se(this,"childNodes",[]);T(this,sr);T(this,vt);T(this,At);T(this,or);T(this,ar);T(this,St);T(this,wt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,sr)}get nextSibling(){return c(this,vt)}get previousSibling(){return c(this,At)}get offsetHeight(){return N(this,lr,fn).call(this).height}get offsetWidth(){return N(this,lr,fn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":b(this,sr,e),e||(b(this,vt,void 0),b(this,At,void 0));break;case"nextSibling":b(this,vt,e);break;case"previousSibling":b(this,At,e);break;case"aIndex":b(this,St,[de.rev,e]);break;default:this[r]=e}}getRootNode(){return ve(c(this,ar),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&b(this,ar,r)})}indexFromPos(r,e){}posFromIndex(r){let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=t.findIndex(([,,i])=>r<=i);return{top:n,left:r-t[n][1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ve(c(this,wt)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,wt)[i]=[de.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,wt)[r]=e})}getAbsoluteIndex(){return ve(c(this,St),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,St,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return ve(c(this,or),()=>{let r=[],e=0;for(let t of String(this).split(`
2
+ `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{b(this,or,r)})}};sr=new WeakMap,vt=new WeakMap,At=new WeakMap,or=new WeakMap,ar=new WeakMap,St=new WeakMap,wt=new WeakMap,lr=new WeakSet,fn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var ze,bn,Tn,Lr,Ci=y(()=>{"use strict";J();ce();wi();xn();Lr=class extends Ct{constructor(){super(...arguments);T(this,ze)}get length(){return this.childNodes.length}text(e){return fe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=n=>{var i,s;e.splice(n,1),(i=e[n-1])==null||i.setAttribute("nextSibling",e[n]),(s=e[n])==null||s.setAttribute("previousSibling",e[n-1])};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||e.length===1||this.getGaps(n-(n&&1))||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return dr(this,e,1)[0]}insertAt(e,t=this.length){return dr(this,t,0,[e]),e}closest(e){let t=Er(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Er(e,this);return N(this,ze,bn).call(this,t)}querySelectorAll(e){let t=Er(e,this);return N(this,ze,Tn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let n=this.childNodes[t],{data:i}=n;return n.replaceData(e),i}toString(e,t=""){return this.childNodes.map(n=>n.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let n=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s),n.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return n}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Fe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),n.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return n}};ze=new WeakSet,bn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=N(t=n,ze,bn).call(t,e);if(i)return i}},Tn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(n=i,ze,Tn).call(n,e)));return t}});var yn,$i,Ho,Vo,Xo,Qo,Ko,Jo,kn,Fr,Ii,gr,Ni=y(()=>{"use strict";J();q();_();xn();yn=String.raw`[${ke}\t]*`,$i=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${yn}\d)|isbn(?=[-::]?${yn}(?:\d(?:${yn}|-)){6})`,Ho=new RegExp(String.raw`${$i}|https?[:/]/+`,"giu"),Vo=new RegExp($i,"giu"),Xo=new Set(["attr-value","ext-link-text","link-text"]),Qo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ko={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Jo=["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"];try{kn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){kn=/\w/u}gr=class extends Ct{constructor(e){super();T(this,Fr);se(this,"data","");Object.defineProperties(this,{data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?oe(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var M,R,B;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:O,name:Q,tag:me}=p;if(O!=="ext-attr")g=!0;else if(me==="choose"&&(Q==="before"||Q==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Vo:Ho),n.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,f=s==null?void 0:s.name,m=o==null?void 0:o.type,x=this.getRootNode(),v=x.toString(),{ext:C,html:E}=x.getAttribute("config"),{top:$,left:S}=x.posFromIndex(e),L=new Set(["onlyinclude","noinclude","includeonly",...C,...E[0],...E[1],...E[2],...Jo]);for(let O=t.exec(n);O;O=t.exec(n)){let[,Q,me]=O,{index:pe,0:V}=O;if(me&&me!=="]"){let{length:ue}=me;pe+=ue,V=V.slice(ue)}V=V.toLowerCase();let{0:I,length:ee}=V,Y=I==="r"||I==="p"||I==="i";if(I==="<"&&!L.has(Q.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(pe+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||Y&&(!i.getAttribute("plain")||Xo.has(l)))continue;I==="]"&&(pe||ee>1)&&t.lastIndex--;let ye=e+pe,Ne=ye+ee,te=v[Ne],Me=v[ye-1],er=ee>1&&!(I==="<"&&!/[\s/>]/u.test(te!=null?te:"")||g&&(I==="["||I==="]")||Y&&l==="parameter-value")||I==="{"&&(te===I||Me==="-")||I==="}"&&(Me===I||te==="-")||I==="["&&(te===I||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(pe+1).trim())||I==="]"&&(Me===I||m==="free-ext-link"&&!n.slice(0,pe).includes("]"))?"error":"warning",gn=I==="{"||I==="[";if(er==="warning"&&(gn||(I==="]"||I==="}"))){let ue=Qo[I],pn=gn?n.slice(pe+1):n.slice(0,pe);if(I==="{"&&((R=ue.exec(pn))==null?void 0:R[0])==="}"||I==="}"&&((B=ue.exec(pn))==null?void 0:B[0])==="{")continue;if(!pn.includes(I)){let di=gn?"nextSibling":"previousSibling",Ke=this[di];for(;Ke&&(Ke.type!=="text"||!ue.test(Ke.data));)Ke=Ke[di];if(Ke&&ue.exec(Ke.data)[0]!==I)continue}}Y&&(V=V.toUpperCase());let oi=this.posFromIndex(pe),{line:ai,character:li}=mn($,S,oi.top+1,oi.left),ft={rule:Ko[I],message:A.msg('lonely "$1"',Y||I==="h"?V:I),severity:er,startIndex:ye,endIndex:Ne,startLine:ai,endLine:ai,startCol:li,endCol:li+ee};if(I==="<")ft.suggestions=[{desc:"escape",range:[ye,ye+1],text:"&lt;"}];else if(I==="h"&&l!=="link-text"&&kn.test(Me||""))ft.suggestions=[{desc:"whitespace",range:[ye,ye],text:" "}];else if(I==="["&&l==="ext-link-text"){let ue=i.getAbsoluteIndex()+i.toString().length;ft.suggestions=[{desc:"escape",range:[ue,ue+1],text:"&#93;"}]}else if(I==="]"&&m==="free-ext-link"&&er==="error"){let ue=e-o.toString().length;ft.fix={range:[ue,ue],text:"[",desc:"left bracket"}}else Y&&(ft.suggestions=[...O[0]===V?[]:[{desc:"uppercase",range:[ye,Ne],text:V}],...te===":"||te==="\uFF1A"?[{desc:"whitespace",range:[Ne,Ne+1],text:" "}]:[]]);u.push(ft)}return u}replaceData(e){N(this,Fr,Ii).call(this,e)}print(){return yt(this.data)}};Fr=new WeakSet,Ii=function(e){this.setAttribute("data",e)}});var xe,Ze=y(()=>{"use strict";ce();xe=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Rr(n,e),n}});var pr,be,$t=y(()=>{"use strict";j();be=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,pr);b(this,pr,t)}get type(){return c(this,pr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};pr=new WeakMap});var It,W,Re=y(()=>{"use strict";j();W=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,It);b(this,It,t)}get type(){return c(this,It)}set type(e){b(this,It,e)}};It=new WeakMap});var Yo,et,Ae,Pe,Ce,ur=y(()=>{"use strict";q();J();X();_();j();Re();Yo=a=>a==="redirect-target"||a==="link",Ce=class extends k{constructor(e,t,n=A.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,et,!0);T(this,Ae);T(this,Pe);if(this.insertAt(new W(e,"link-target",n,i,{})),t!==void 0){let o=new k(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,Ae,s)}get link(){}get fragment(){return c(this,Pe).fragment}afterBuild(){b(this,Pe,this.getTitle()),c(this,Ae).includes("\0")&&b(this,Ae,this.buildFromStr(c(this,Ae),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,et,t):e==="title"?b(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ae));return c(this,et)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,et)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ae).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,Pe),p=new P(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&n.push(w(i,p,"unknown-page","template in an internal link target","warning")),l){let g=w(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:De(i.text())}],n.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),u=s==null?void 0:s.childNodes[g];if(u){let h=w(s,p,"pipe-like",'additional "|" in the link text',"warning"),f=h.startIndex+s.getRelativeIndex(g);h.suggestions=[{desc:"escape",range:[f,f+u.data.length],text:u.data.replace(/\|/gu,"&#124;")}],n.push(h)}}if(d!==void 0&&!Yo(o)){let g=w(i,p,"no-ignored","useless fragment"),u=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),h=i.childNodes[u];h&&(g.fix={range:[g.startIndex+i.getRelativeIndex(u)+h.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),n.push(g)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,et)?{pre:"[[",post:"]]",sep:c(this,Ae)}:{sep:c(this,Ae)})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(n.fragment=s),n}};et=new WeakMap,Ae=new WeakMap,Pe=new WeakMap});var ae,We=y(()=>{"use strict";j();ae=class extends k{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ei,vn,Zo,U,Ge=y(()=>{"use strict";Ze();We();Ei=[xe()];U=class extends(Zo=ae){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};vn=re(Zo),U=ie(vn,0,"NoincludeToken",Ei,U),ne(vn,1,U)});var Pr,Li=y(()=>{"use strict";q();ur();Ge();Pr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new U(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=w(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var Fi,Ue,Nt,An,ea,tt,Ri=y(()=>{"use strict";Ze();j();$t();Li();Fi=[xe(!1,!1)];tt=class extends(ea=k){constructor(e,t,n,i,s,o,l=[]){super(void 0,o,l);T(this,Ue);T(this,Nt);b(this,Ue,e),b(this,Nt,s),this.append(new be(t,"redirect-syntax",o,l),new Pr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Ue).length:super.getAttribute(e)}toString(e){return c(this,Ue)+super.toString(e)+c(this,Nt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,Ue).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,Ue),post:c(this,Nt)})}};An=re(ea),Ue=new WeakMap,Nt=new WeakMap,tt=ie(An,0,"RedirectToken",Fi,tt),ne(An,1,tt)});var Pi={};le(Pi,{parseRedirect:()=>ta});var ta,ji=y(()=>{"use strict";_();Ri();ta=(a,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(a);return t&&A.normalizeTitle(t[3],0,!1,r,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new tt(...t.slice(1),r,e),a):!1}});var jr,Bi=y(()=>{"use strict";j();jr=class extends k{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var He,Et,Sn=y(()=>{"use strict";j();Et=class extends k{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,He);se(this,"closed");se(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),b(this,He,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:n,lastChild:i}=this,[s,o]=c(this,He);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,He);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,He)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,He);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};He=new WeakMap});var Oi,wn,ra,rt,qi=y(()=>{"use strict";q();X();Ze();_();Sn();Oi=[xe(!1)];rt=class extends(ra=Et){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:n,name:i}=this,s=new P(this,r);if(t.data.trim()){let o=w(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=F(this,s,"unclosed-comment",A.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};wn=re(ra),rt=ie(wn,0,"IncludeToken",Oi,rt),ne(wn,1,rt)});var Lt,Br=y(()=>{"use strict";ce();Lt=(a=0)=>(r,e)=>{var n,_i;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return N(this,n,_i).call(this).getAttr(l)}}return n=new WeakSet,_i=function(){return this.childNodes[a]},Rr(t,r),t}});var H,Mi,Di,qr,Cn,zi,Ft,Wi,Gi,Ui,Or,Hi,Vi,Xi,Qi,Ki=y(()=>{"use strict";H=new Set(["align"]),Mi=new Set(["cite"]),Di=new Set(["cite","datetime"]),qr=new Set(["width"]),Cn=new Set(["axis","align","bgcolor","height","width","valign"]),zi=new Set([...Cn,"abbr","headers","scope","rowspan","colspan"]),Ft=new Set(["type"]),Wi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gi=new Set(["clear"]),Ui=new Set(["bgcolor","align","valign"]),Or=new Set,Hi=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Vi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:Mi,q:Mi,p:H,br:Gi,pre:qr,ins:Di,del:Di,ul:Ft,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Wi,"border"]),caption:H,tr:Ui,td:zi,th:zi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:qr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ft,poem:H,categorytree:H,combooption:H},Xi={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:Or,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:Or,inputbox:Or,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Or,poll:new Set(["id","show-results-before-voting"]),sm2:Ft,flashmp3:Ft,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),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"])},Qi={table:Wi,td:new Set([...Cn,"scope"]),th:Cn,br:Gi,caption:H,div:H,hr:qr,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:Ft,p:H,pre:qr,tr:Ui,ul:Ft}});var na,ia,cr,Rt,Z,$e,Pt,Ji=y(()=>{"use strict";q();J();Ki();X();_();j();Re();na=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ia=new Set(["ext","arg","magic-word","template"]),Pt=class extends k{constructor(e,t,n,i="",s,o=[],l=A.getConfig(),d=[]){let p=new W(n,"attr-key",l,d),g;if(n==="title"||t==="img"&&n==="alt")g=new k(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};g=new k(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new W(s,"attr-value",l,d,{});super(void 0,l,d);T(this,cr);T(this,Rt);T(this,Z);T(this,$e);b(this,cr,e),this.append(p,g),b(this,Z,i),b(this,$e,[...o]),b(this,Rt,t),this.setAttribute("name",oe(n).trim().toLowerCase())}get type(){return c(this,cr)}get tag(){return c(this,Rt)}get balanced(){return!c(this,Z)||c(this,$e)[0]===c(this,$e)[1]}afterBuild(){c(this,Z).includes("\0")&&b(this,Z,this.buildFromStr(c(this,Z),0)),this.parentNode&&b(this,Rt,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=c(this,$e);return c(this,Z)?super.toString(e,c(this,Z)+t)+n:this.firstChild.toString(e)}text(){return c(this,Z)?`${super.text(`${c(this,Z).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,Z)?c(this,Z).length+((t=(e=c(this,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:d,tag:p}=this,g=this.getValue(),u=new P(this,e);if(!i){let v=w(o,u,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");v.startIndex--,v.startCol--,v.suggestions=[{range:[v.endIndex,v.endIndex],text:c(this,$e)[0],desc:"close"}],n.push(v)}let h=Xi[p],f=Vi[p],{length:m}=this.toString();if(!(h!=null&&h.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?h||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(p==="meta"||p==="link"||!Hi.has(d)))){let v=w(s,u,"illegal-attr","illegal attribute name");v.suggestions=[{desc:"remove",range:[e,e+m],text:""}],n.push(v)}else if(d==="style"&&typeof g=="string"&&na.test(g))n.push(w(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let v=w(o,u,"illegal-attr","nonzero tabindex");v.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],n.push(v)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:v})=>ia.has(v))){let v=Si.provideValues(p,d),C=String(g).toLowerCase();v.length>0&&v.every(({name:E})=>E!==C)&&n.push(w(o,u,"illegal-attr","illegal attribute value","warning"))}return(x=Qi[p])!=null&&x.has(d)&&n.push(w(s,u,"obsolete-attr","obsolete attribute","warning")),n}getValue(){return c(this,Z)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,$e);return c(this,Z)?super.print({sep:yt(c(this,Z))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.tag=this.tag,n}};cr=new WeakMap,Rt=new WeakMap,Z=new WeakMap,$e=new WeakMap});var Yi,sa,$n,hr,Ve,_r=y(()=>{"use strict";q();J();X();_();j();Re();Ji();Yi=a=>a.slice(0,-1),sa=a=>`${Yi(a)}-dirty`;try{$n=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){$n=/[^\W_]/u}Ve=class extends k{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});T(this,hr);if(b(this,hr,t),this.setAttribute("name",n),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new W(l,sa(t),i,s,{})),l="")};for(;d;){let{index:u,0:h,1:f,2:m,3:x,4:v,5:C,6:E}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(f).trim())){let $=v!=null?v:E,S=[x,C],L=new Pt(Yi(t),n,f,m,$,S,i,s);g(),super.insertAt(L)}else l+=h;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,hr)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Pt&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,d=new P(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let p=F(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],n.push(p)}for(let p of s)if(p instanceof Pt){let{name:g}=p;o.has(g)?(l.add(g),o.get(g).push(p)):o.set(g,[p])}else{let g=p.text().trim();if(g){let u=w(p,d,"no-ignored","containing invalid attribute",$n.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],n.push(u)}}if(l.size>0)for(let p of l){let g=o.get(p).map(u=>{let h=u.getValue();return[u,h===!0?"":h]});n.push(...g.map(([u,h],f)=>{let m=w(u,d,"no-duplicate",A.msg("duplicated $1 attribute",p)),x={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||g.slice(0,f).some(([,v])=>v===h)?m.fix=x:m.suggestions=[x],m}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof W?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};hr=new WeakMap});var Mr,Zi=y(()=>{"use strict";_();j();Ge();Mr=class extends k{get type(){return"ext-inner"}constructor(r,e=A.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),d=0,p="";for(;o&&l;)new U(o[0],e,t),new U(l[0],e,t),p+=`${r.slice(d,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,d=l.index+s+1,n.lastIndex=d,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=p+r.slice(d)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var jt,In=y(()=>{"use strict";q();X();mr();_();j();Re();jt=class extends k{get type(){return"ext-inner"}constructor(r,e,t=A.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=W;this.append(...e.split(`
3
+ `).map(o=>i?o:nt(o,t,n,r)).map(o=>new s(o,"param-line",t,n,{})))}n.splice(n.indexOf(this),1),n.push(this)}toString(r){return super.toString(r,`
4
4
  `)}text(){return super.text(`
5
- `)}getGaps(){return 1}lint(n=this.getAbsoluteIndex()){let e=new R(this,n),t=A.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){i.setAttribute("aIndex",n);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.push(w(i,e,"no-ignored",t));else{let o=s.findIndex(({type:g})=>g!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let g=w(i,e,"no-ignored",t);g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""}],r.push(g)}else r.push(...i.lint(n,!1))}n+=i.toString().length+1}return r}print(){return super.print({sep:`
6
- `})}}});var fr,Bt,Dr,qt,Nn=y(()=>{"use strict";_();ce();V();M();B();$t();qt=class extends k{constructor(e,t,r,i=[]){super(void 0,r,i);T(this,Bt);T(this,fr);b(this,fr,e);let s=new k(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,fr)}toString(e){let t=N(this,Bt,Dr).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Bt,Dr).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),g=l||o.endsWith("="),u=i.childNodes.filter(Ot("quote")),d=u.filter(({bold:h})=>h),p=u.filter(({italic:h})=>h),m=new R(this,e);if(this.level===1){let h=w(i,m,"h1","<h1>");g||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),r.push(h)}if(g){let h=w(i,m,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);h.suggestions=[{desc:`h${s}`,range:[h.startIndex,h.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[h.endIndex,h.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];h.suggestions=[{desc:`h${s}`,range:[h.endIndex-x.length,h.endIndex],text:""},{desc:`h${s+x.length}`,range:[h.startIndex,h.startIndex],text:x}]}r.push(h)}this.closest("html-attrs,table-attrs")&&r.push(L(this,m,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(d.length%2){let h=w(d[d.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(h.endIndex,x).trim()?h.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:h.fix={desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}if(p.length%2){let h=w(p[p.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;h.fix=f.slice(h.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[h.startIndex,h.endIndex],text:""},r.push(h)}return r}print(){let e=N(this,Bt,Dr).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};fr=new WeakMap,Bt=new WeakSet,Dr=function(){return"=".repeat(this.level)}});var na,zr,Zi=y(()=>{"use strict";Q();_();M();B();na=new RegExp(`https?://${Ne}${Ee}$`,"iu"),zr=class extends k{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(n,e,t=A.getConfig(),r=[]){super(void 0,t,r);let i=new k(typeof n=="number"?void 0:n,t,r,{}),s=new k(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=na.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=w(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var br,Xe,it,st,_t,ot,En,es,xr,ts=y(()=>{"use strict";Q();_();ce();V();B();Zi();Fe();$t();xr=class extends k{constructor(e,t,r,i=[]){var C,E;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});T(this,ot);ie(this,"modifier","");T(this,br,"template");T(this,Xe,":");T(this,it,!1);T(this,st,new Map);T(this,_t);let{parserFunction:[l,g],variable:u,functionHook:d}=r,p=(C=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:C[0];if(p)this.setAttribute("modifier",p),e=e.slice(p.length);else if(e.includes(":")){let[$,...S]=e.split(":"),[F]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((E=S[0])!=null?E:"");this.setModifier(`${$}:${F}`)&&(e=S.join(":").slice(F.length))}let m=e.search(/[::]/u),f=e[m]==="\uFF1A",h=m!==-1;if(h||t.length===0&&!c(this,it)){let $=h?e.slice(0,m):e,S=h&&e.slice(m+1),F=se($),O=h?F.slice(F.search(/\S/u))+(f?"\uFF1A":""):F.trim(),P=O.toLowerCase(),j=Array.isArray(g),q=j?g.includes(O):Object.prototype.hasOwnProperty.call(g,O),ae=!j&&q?g[O]:Object.prototype.hasOwnProperty.call(l,P)&&l[P],me=j&&q||!("functionHook"in r)||d.includes(ae),pe=j&&q||u.includes(ae);if(h?ae&&me:pe){this.setAttribute("name",ae||P.replace(/^#|:$/u,"")),b(this,br,"magic-word"),f&&b(this,Xe,"\uFF1A");let K=new be($,"magic-word-name",r,i);if(super.insertAt(K),S!==!1&&t.unshift([S]),this.name==="invoke")for(let I=0;I<2;I++){let Y=t.shift();if(!Y)break;let Z=new G(Y.join("="),`invoke-${I?"function":"module"}`,r,i);super.insertAt(Z)}}}if(this.type==="template"){let $=se(e).trim();if(!this.normalizeTitle($,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new G(e,"template-name",r,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),v=1;for(let $=0;$<t.length;$++){let S=t[$];x||this.name==="switch"&&$>0||this.name==="tag"&&$>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(v),v++),this.insertAt(new zr(...S,r,i))}this.seal("modifier")}get type(){return c(this,br)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=se(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,it)&&o||!c(this,it)&&(l||e==="")||(de.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),b(this,it,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(b(this,_t,N(this,ot,En).call(this)),this.setAttribute("name",c(this,_t).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,Xe))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,Xe))+fe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,_t);case"colon":return c(this,Xe);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new R(this,e),g=i==="magic-word";if(g&&!N(this,ot,En).call(this).valid)r.push(w(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[g?1:0],p=d.childNodes.findIndex(f=>f.type==="text"&&Ye(f.data).includes("#")),m=d.childNodes[p];if(m){let f=w(d,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+d.getRelativeIndex(p)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(g&&o===2)return r.push(L(this,l,"invalid-invoke","missing module function")),r;let u=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(u.length>0)for(let[,d]of u)r.push(...d.map(p=>{let m=w(p,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,ot,es).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Ot("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,st).has(i)?s=c(this,st).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,st).set(i,s)),s}getDuplicatedArgs(){return[...c(this,st)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=r.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:g}=s[o].childNodes.filter(u=>u.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let u=g.getPossibleValues();s.splice(o,1,...u),o+=u.length}catch(u){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${yt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,Xe))+Le(e.slice(1),{sep:"|"}):Le(e,{sep:"|"})}}}</span>`}};br=new WeakMap,Xe=new WeakMap,it=new WeakMap,st=new WeakMap,_t=new WeakMap,ot=new WeakSet,En=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,{temporary:!0})},es=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var rs,Ln,ia,at,ns=y(()=>{"use strict";Ze();B();rs=[xe()];at=class extends(ia=k){get type(){return"hidden"}};Ln=te(ia),at=ne(Ln,0,"HiddenToken",rs,at),re(Ln,1,at)});var Fn,sa,Gr,is=y(()=>{"use strict";Q();_();V();B();Fe();ns();Gr=class extends k{constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Fn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new G(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new at(s,t,r);super.insertAt(o)}else{let o=new k(s,t,r);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}}get type(){return"arg"}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`{{{${fe(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=L(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new R(this,e);o.push(...s.map(g=>{let u=w(g,l,"no-ignored","invisible content inside triple braces");return u.startIndex--,u.startCol--,u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:""},{desc:"escape",range:[u.startIndex,u.startIndex+1],text:"{{!}}"}],u}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.default=this.default,r}};Fn=new WeakSet,sa=function(){}});var ds={};le(ds,{parseBraces:()=>Tr});var oa,aa,ss,os,as,ls,Tr,Ur=y(()=>{"use strict";Tt();Q();Nn();ts();is();oa=2e4,aa={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ss=String.raw`|\{{2,}`,os=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),as=De(a=>new RegExp(a,"gmu")),ls=a=>{let n=se(a).trim().toLowerCase();return os.has(n)?os.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},Tr=(a,n,e)=>{var h,x,v,C,E,$;let t=String.raw`${(h=n.excludes)!=null&&h.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=S=>S.replace(/\0(\d+)\x7F/gu,(F,O)=>s[O]),l=(S,F,O,P)=>{F[F.length-1].push(o(S.slice(O,P)))};a=a.replace(/\{\{([^\n{}[]*)\}\}(?!\})|\[\[[^\n[\]{]*\]\]|-\{[^\n{}[]*\}-/gu,(S,F)=>{if(F!==void 0)try{let{length:O}=e,P=F.split("|");return new xr(P[0],P.slice(1).map(j=>{let q=j.indexOf("=");return q===-1?[j]:[j.slice(0,q),j.slice(q+1)]}),n,e),`\0${O}${ls(P[0])}\x7F`}catch(O){if(!(O instanceof SyntaxError)||O.message!=="Invalid template name")throw O}return s.push(S),`\0${s.length-1}\x7F`});let g=a.lastIndexOf("}}")-a.length,u=g+a.length!==-1,d=as(t+(u?ss:"")),p=d.exec(a),m=0,f;for(;p||f!==void 0&&f<=a.length&&((v=(x=i[i.length-1])==null?void 0:x[0])!=null&&v.startsWith("="));){if(++m>oa)throw new RangeError("Maximum iteration exceeded");if(p!=null&&p[1]){let[,{length:I}]=p;p[0]=p[0].slice(I),p.index+=I}let{0:S,index:F}=p!=null?p:{0:`
7
- `,index:a.length},O=(C=i.pop())!=null?C:{},{0:P,index:j,parts:q,findEqual:ae,pos:me}=O,pe=S==="="&&ae;if(S==="]]"||S==="}-")f=F+2;else if(S===`
8
- `){f=F+1;let{pos:I,findEqual:Y}=(E=i[i.length-1])!=null?E:{};if(I===void 0||Y||se(a.slice(I,j))!==""){let Z=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(j,F));Z&&(a=`${a.slice(0,j)}\0${e.length}h\x7F${a.slice(F)}`,f=j+4+String(e.length).length,Z[2]=o(Z[2]),new qt(Z[1].length,Z.slice(2),n,e))}}else if(S==="|"||pe)f=F+1,l(a,q,me,F),S==="|"&&q.push([]),O.pos=f,O.findEqual=S==="|",i.push(O);else if(S.startsWith("}}")){let I=S.slice(0,Math.min(P.length,3)),Y=P.length-I.length,{length:Z}=e;f=F+I.length,l(a,q,me,F);let ye=!1,Ie="t";if(I.length===3){let ee=q.map(er=>er.join("=")),_e=ee.length>1&&se(ee[1]).trim();new Gr(ee,n,e),_e&&_e.endsWith(":")&&r.includes(_e.slice(0,-1).toLowerCase())&&(Ie="s")}else try{new xr(q[0][0],q.slice(1),n,e),Ie=ls(q[0][0])}catch(ee){if(ee instanceof SyntaxError&&ee.message==="Invalid template name")ye=!0;else throw ee}ye||(a=`${a.slice(0,j+Y)}\0${Z}${Ie}\x7F${a.slice(f)}`,f=j+Y+3+String(Z).length,Y>1?i.push({0:P.slice(0,Y),index:j,pos:j+Y,parts:[[]]}):Y===1&&a[j-1]==="-"&&i.push({0:"-{",index:j-1,pos:j+1,parts:[[]]}))}else f=F+S.length,S.startsWith("{")&&(p.pos=f,p.parts=[[]]),i.push(..."0"in O?[O]:[],p);let K=i[i.length-1];if(u&&g+a.length<f)for(u=!1;($=K==null?void 0:K[0])!=null&&$.startsWith("{");)i.pop(),K=i[i.length-1];d=as(t+(u?ss:"")+(K?`|${aa[K[0][0]]}${K.findEqual?"|=":""}`:"")),d.lastIndex=f,p=d.exec(a)}return o(a)}});var Wr,gs=y(()=>{"use strict";mr();Ur();M();In();Wr=class extends jt{constructor(n,e,t=A.getConfig(),r=[]){let i=Symbol("InputboxToken"),{length:s}=r;r.push(i),e&&(e=nt(e,t,r,n)),e&&(e=Tr(e,t,r)),r.splice(s,1),super(n,e,t,r,{})}}});function ps(a,n,e,t,r){n=n.trim();let i=n.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!n||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(la(e.protocol).test(i))return da(e.protocol).test(i)&&n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return n;let s=A.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var la,da,ga,pa,ge,Vr,us,Hr,cs=y(()=>{"use strict";Tt();Q();_();M();B();la=De(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),da=De(a=>new RegExp(String.raw`^(?:(?:${a}|//)${Ne}|\0\d+m\x7F)${Ee}$`,"iu")),ga=De(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
9
- )`:""}(\s*)$`,"u")),pa=new Set(["alt","link","lang","page","caption"]);Hr=class extends k{constructor(e,t,r,i){var n=(...zg)=>(super(...zg),T(this,Vr),T(this,ge,""),this);var g;let s,o=Object.entries(r.img).map(([u,d])=>[u,d,ga(u)]),l=o.find(([,u,d])=>(s=d.exec(e),s&&(s.length!==4||ps(u,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),b(this,ge,e)):(n(s[2],r,i,{}),b(this,ge,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,{...r,excludes:[...(g=r.excludes)!=null?g:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?ps("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!pa.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ge)?c(this,ge).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ge)?c(this,ge).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,ge).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=L(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},r.push(o)}else if(typeof i=="object"&&i.encoded){let o=L(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Me(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():N(this,Vr,us).call(this)||super.text()}print(){return c(this,ge)?`<span class="wpb-image-parameter">${c(this,ge).replace("$1",`<span class="wpb-image-caption">${Le(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ge=new WeakMap,Vr=new WeakSet,us=function(){return c(this,ge)&&!c(this,ge).includes("$1")}});var hs,ms,fs,ua,ca,Mt,Rn=y(()=>{"use strict";_();V();M();ur();cs();hs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),ms=new Set(["left","right","center","none"]),fs=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ua=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),ca=a=>{if(a===void 0)return[];let n=/-\{|\}-|\|/gu,e=[],t=n.exec(a),r=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?r+=s==="-{"?1:-1:r===0&&(e.push(a.slice(i,o)),{lastIndex:i}=n),t=n.exec(a)}return e.push(a.slice(i)),e},Mt=class extends we{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(n,e,t=A.getConfig(),r=[],i="|"){super(n,void 0,t,r,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ca(e).map(o=>new Hr(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var f;let t=super.lint(n,e),r=this.getAllArgs().filter(({childNodes:h})=>{let x=h.filter(v=>v.text().trim());return x.length!==1||x[0].type!=="arg"}),i=[...new Set(r.map(({name:h})=>h))],s=i.filter(h=>hs.has(h)),o=i.filter(h=>ms.has(h)),l=i.filter(h=>fs.has(h)),[g]=s,u=g==="framed"||g==="manualthumb",d=new R(this,n);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(L(this,d,"nested-link","internal link in an external link")),u)for(let h of r.filter(({name:x})=>x==="width")){let x=w(h,d,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(r.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(h,x,v)=>C=>{let E=w(C,d,"no-duplicate",A.msg(`${h} image $1 parameter`,x),v);return E.suggestions=[{desc:"remove",range:[E.startIndex-1,E.endIndex],text:""}],E},{extension:m}=this;for(let h of i){if(h==="invalid"||h==="width"&&u)continue;let x=r.filter(({name:v})=>v===h);h==="caption"&&(x=[...x.slice(0,-1).filter(v=>v.text()),...x.slice(-1)]),x.length>1&&t.push(...x.map(p("duplicated",h,h==="caption"&&m&&!ua.has(m)?"warning":"error")))}return s.length>1&&t.push(...r.filter(({name:h})=>hs.has(h)).map(p("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:h})=>ms.has(h)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:h})=>fs.has(h)).map(p("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(n){return this.getAllArgs().filter(({name:e})=>n===e)}getArg(n){let e=this.getArgs(n);return e[n==="manualthumb"?0:e.length-1]}getValue(n){var e;return(e=this.getArg(n))==null?void 0:e.getValue()}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:r}=this;return r&&(t.extension=r),t}}});var Dt,Pn=y(()=>{"use strict";_();M();B();Rn();Dt=class extends Mt{constructor(e,t,r,i=A.getConfig(),s=[]){let o;if(r!==void 0){let{length:l}=s;o=new k(r,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);ie(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,{halfParsed:!0,temporary:e,decode:!t})}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=L(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],r.push(s)}return r}}});var lt,xs,jn,Xr,bs=y(()=>{"use strict";M();B();Pn();Ue();Xr=class extends k{constructor(e,t=A.getConfig(),r=[]){var i;super(void 0,t,r,{});T(this,lt);for(let s of(i=e==null?void 0:e.split(`
10
- `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new W(s,t,r):s);continue}let[,l,g]=o;N(this,lt,xs).call(this,l)?super.insertAt(new Dt("gallery",l,g,t,r)):super.insertAt(new W(s,t,r))}}get type(){return"ext-inner"}get widths(){return N(this,lt,jn).call(this,"widths")}get heights(){return N(this,lt,jn).call(this,"heights")}toString(e){return super.toString(e,`
5
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new P(this,r),t=A.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){i.setAttribute("aIndex",r);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push(w(i,e,"no-ignored",t));else{let o=s.findIndex(({type:d})=>d!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let d=w(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],n.push(d)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
6
+ `})}}});var fr,Bt,Dr,Ot,Nn=y(()=>{"use strict";q();ce();X();_();j();$t();Ot=class extends k{constructor(e,t,n,i=[]){super(void 0,n,i);T(this,Bt);T(this,fr);b(this,fr,e);let s=new k(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],"heading-trail",n,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,fr)}toString(e){let t=N(this,Bt,Dr).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Bt,Dr).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(qt("quote")),g=p.filter(({bold:m})=>m),u=p.filter(({italic:m})=>m),h=new P(this,e);if(this.level===1){let m=w(i,h,"h1","<h1>");d||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),n.push(m)}if(d){let m=w(i,h,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[m.endIndex,m.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-x.length,m.endIndex],text:""},{desc:`h${s+x.length}`,range:[m.startIndex,m.startIndex],text:x}]}n.push(m)}this.closest("html-attrs,table-attrs")&&n.push(F(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let m=w(g[g.length-1],{...h,start:e+s,left:h.left+s},"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(m.endIndex,x).trim()?m.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}if(u.length%2){let m=w(u[u.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;m.fix=f.slice(m.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}return n}print(){let e=N(this,Bt,Dr).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};fr=new WeakMap,Bt=new WeakSet,Dr=function(){return"=".repeat(this.level)}});var oa,zr,es=y(()=>{"use strict";J();q();_();j();oa=new RegExp(`https?://${Ee}${Le}$`,"iu"),zr=class extends k{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(r,e,t=A.getConfig(),n=[]){super(void 0,t,n);let i=new k(typeof r=="number"?void 0:r,t,n,{}),s=new k(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=oa.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=w(n,{start:r},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var br,Xe,it,st,_t,ot,En,ts,xr,rs=y(()=>{"use strict";J();q();ce();X();j();es();Re();$t();xr=class extends k{constructor(e,t,n,i=[]){var C,E;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});T(this,ot);se(this,"modifier","");T(this,br,"template");T(this,Xe,":");T(this,it,!1);T(this,st,new Map);T(this,_t);let{parserFunction:[l,d],variable:p,functionHook:g}=n,u=(C=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:C[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[$,...S]=e.split(":"),[L]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((E=S[0])!=null?E:"");this.setModifier(`${$}:${L}`)&&(e=S.join(":").slice(L.length))}let h=e.search(/[::]/u),f=e[h]==="\uFF1A",m=h!==-1;if(m||t.length===0&&!c(this,it)){let $=m?e.slice(0,h):e,S=m&&e.slice(h+1),L=oe($),M=m?L.slice(L.search(/\S/u))+(f?"\uFF1A":""):L.trim(),R=M.toLowerCase(),B=Array.isArray(d),O=B?d.includes(M):Object.prototype.hasOwnProperty.call(d,M),Q=!B&&O?d[M]:Object.prototype.hasOwnProperty.call(l,R)&&l[R],me=B&&O||!("functionHook"in n)||g.includes(Q),pe=B&&O||p.includes(Q);if(m?Q&&me:pe){this.setAttribute("name",Q||R.replace(/^#|:$/u,"")),b(this,br,"magic-word"),f&&b(this,Xe,"\uFF1A");let V=new be($,"magic-word-name",n,i);if(super.insertAt(V),S!==!1&&t.unshift([S]),this.name==="invoke")for(let I=0;I<2;I++){let ee=t.shift();if(!ee)break;let Y=new W(ee.join("="),`invoke-${I?"function":"module"}`,n,i);super.insertAt(Y)}}}if(this.type==="template"){let $=oe(e).trim();if(!this.normalizeTitle($,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new W(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),v=1;for(let $=0;$<t.length;$++){let S=t[$];x||this.name==="switch"&&$>0||this.name==="tag"&&$>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(v),v++),this.insertAt(new zr(...S,n,i))}this.seal("modifier")}get type(){return c(this,br)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=oe(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return c(this,it)&&o||!c(this,it)&&(l||e==="")||(de.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),b(this,it,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(b(this,_t,N(this,ot,En).call(this)),this.setAttribute("name",c(this,_t).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,Xe))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":c(this,Xe))+fe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,_t);case"colon":return c(this,Xe);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new P(this,e),d=i==="magic-word";if(d&&!N(this,ot,En).call(this).valid)n.push(w(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&&Ye(f.data).includes("#")),h=g.childNodes[u];if(h){let f=w(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},n.push(f)}}if(d&&o===2)return n.push(F(this,l,"invalid-invoke","missing module function")),n;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)n.push(...g.map(u=>{let h=w(u,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,ot,ts).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(qt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,st).has(i)?s=c(this,st).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,st).set(i,s)),s}getDuplicatedArgs(){return[...c(this,st)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=n.slice(2),l=o[o.length-1];s=[...o.filter(({anon:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:o})=>o));for(let o=0;o<s.length;){let{length:l,0:d}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let p=d.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch(p){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${yt(i)}${s==="magic-word"?n.print()+(t===1?"":c(this,Xe))+Fe(e.slice(1),{sep:"|"}):Fe(e,{sep:"|"})}}}</span>`}};br=new WeakMap,Xe=new WeakMap,it=new WeakMap,st=new WeakMap,_t=new WeakMap,ot=new WeakSet,En=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},ts=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var ns,Ln,aa,at,is=y(()=>{"use strict";Ze();j();ns=[xe()];at=class extends(aa=k){get type(){return"hidden"}};Ln=re(aa),at=ie(Ln,0,"HiddenToken",ns,at),ne(Ln,1,at)});var Fn,la,Wr,ss=y(()=>{"use strict";J();q();X();j();Re();is();Wr=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,Fn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new W(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new at(s,t,n);super.insertAt(o)}else{let o=new k(s,t,n);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}}get type(){return"arg"}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`{{{${fe(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=F(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}n.setAttribute("aIndex",e+3);let o=n.lint(e+3,t);if(i){let l=e+4+n.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new P(this,e);o.push(...s.map(d=>{let p=w(d,l,"no-ignored","invisible content inside triple braces");return p.startIndex--,p.startCol--,p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""},{desc:"escape",range:[p.startIndex,p.startIndex+1],text:"{{!}}"}],p}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.default=this.default,n}};Fn=new WeakSet,la=function(){}});var us={};le(us,{parseBraces:()=>Tr});var da,os,Rn,as,ls,ds,ps,gs,Tr,Gr=y(()=>{"use strict";Tt();J();Nn();rs();ss();da={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},os=String.raw`\[(?!\[)`,Rn=String.raw`\n(?![=\0])`,as=String.raw`|\{{2,}`,ls=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ds=we(a=>new RegExp(a,"gmu"));ps=new RegExp(String.raw`\{\{((?:[^\n{}[]|${os}|${Rn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Rn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${os}|${Rn})*\}-`,"gu");gs=a=>{let r=oe(a).trim().toLowerCase();return ls.has(r)?ls.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},Tr=(a,r,e)=>{var m,x,v,C,E,$;let t=String.raw`${(m=r.excludes)!=null&&m.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=S=>S.replace(/\0(\d+)\x7F/gu,(L,M)=>s[M]),l=(S,L,M,R)=>{L[L.length-1].push(o(S.slice(M,R)))},d;do d!==void 0&&(a=d),d=a.replace(ps,(S,L,M)=>{if(L!==void 0||typeof M=="string")try{let{length:R}=e,B=(L!=null?L:M).split("|");return new xr(o(B[0]),B.slice(1).map(O=>{let Q=O.indexOf("=");return(Q===-1?[O]:[O.slice(0,Q),O.slice(Q+1)]).map(o)}),r,e),`\0${R}${gs(B[0])}\x7F`}catch(R){if(!(R instanceof SyntaxError)||R.message!=="Invalid template name")throw R}return s.push(o(S)),`\0${s.length-1}\x7F`});while(d!==a);a=d;let p=a.lastIndexOf("}}")-a.length,g=p+a.length!==-1,u=ds(t+(g?as:"")),h=u.exec(a),f;for(;h||f!==void 0&&f<=a.length&&((v=(x=i[i.length-1])==null?void 0:x[0])!=null&&v.startsWith("="));){if(h!=null&&h[1]){let[,{length:I}]=h;h[0]=h[0].slice(I),h.index+=I}let{0:S,index:L}=h!=null?h:{0:`
7
+ `,index:a.length},M=(C=i.pop())!=null?C:{},{0:R,index:B,parts:O,findEqual:Q,pos:me}=M,pe=S==="="&&Q;if(S==="]]"||S==="}-")f=L+2;else if(S===`
8
+ `){f=L+1;let{pos:I,findEqual:ee}=(E=i[i.length-1])!=null?E:{};if(I===void 0||ee||oe(a.slice(I,B))!==""){let Y=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(B,L));Y&&(Y[2]=o(Y[2]),Y[2].includes(`
9
+ `)||(a=`${a.slice(0,B)}\0${e.length}h\x7F${a.slice(L)}`,f=B+4+String(e.length).length,new Ot(Y[1].length,Y.slice(2),r,e)))}}else if(S==="|"||pe)f=L+1,l(a,O,me,L),S==="|"&&O.push([]),M.pos=f,M.findEqual=S==="|",i.push(M);else if(S.startsWith("}}")){let I=S.slice(0,Math.min(R.length,3)),ee=R.length-I.length,{length:Y}=e;f=L+I.length,l(a,O,me,L);let ye=!1,Ne="t";if(I.length===3){let te=O.map(er=>er.join("=")),Me=te.length>1&&oe(te[1]).trim();new Wr(te,r,e),Me&&Me.endsWith(":")&&n.includes(Me.slice(0,-1).toLowerCase())&&(Ne="s")}else try{new xr(O[0][0],O.slice(1),r,e),Ne=gs(O[0][0])}catch(te){if(te instanceof SyntaxError&&te.message==="Invalid template name")ye=!0;else throw te}ye||(a=`${a.slice(0,B+ee)}\0${Y}${Ne}\x7F${a.slice(f)}`,f=B+ee+3+String(Y).length,ee>1?i.push({0:R.slice(0,ee),index:B,pos:B+ee,parts:[[]]}):ee===1&&a[B-1]==="-"&&i.push({0:"-{",index:B-1,pos:B+1,parts:[[]]}))}else f=L+S.length,S.startsWith("{")&&(h.pos=f,h.parts=[[]]),i.push(..."0"in M?[M]:[],h);let V=i[i.length-1];if(g&&p+a.length<f)for(g=!1;($=V==null?void 0:V[0])!=null&&$.startsWith("{");)i.pop(),V=i[i.length-1];u=ds(t+(g?as:"")+(V?`|${da[V[0][0]]}${V.findEqual?"|=":""}`:"")),u.lastIndex=f,h=u.exec(a)}return o(a)}});var Ur,cs=y(()=>{"use strict";mr();Gr();_();In();Ur=class extends jt{constructor(r,e,t=A.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=nt(e,t,n,r)),e&&(e=Tr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function hs(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(ga(e.protocol).test(i))return pa(e.protocol).test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return r;let s=A.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var ga,pa,ua,ca,ge,Vr,ms,Hr,fs=y(()=>{"use strict";Tt();J();q();_();j();ga=we(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),pa=we(a=>new RegExp(String.raw`^(?:(?:${a}|//)${Ee}|\0\d+m\x7F)${Le}$`,"iu")),ua=we(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
10
+ )`:""}(\s*)$`,"u")),ca=new Set(["alt","link","lang","page","caption"]);Hr=class extends k{constructor(e,t,n,i){var r=(...Ug)=>(super(...Ug),T(this,Vr),T(this,ge,""),this);var d;let s,o=Object.entries(n.img).map(([p,g])=>[p,g,ua(p)]),l=o.find(([,p,g])=>(s=g.exec(e),s&&(s.length!==4||hs(p,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),b(this,ge,e)):(r(s[2],n,i,{}),b(this,ge,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,{...n,excludes:[...(d=n.excludes)!=null?d:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?hs("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ca.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ge)?c(this,ge).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ge)?c(this,ge).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,ge).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=F(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=F(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:De(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,Vr,ms).call(this)||super.text()}print(){return c(this,ge)?`<span class="wpb-image-parameter">${c(this,ge).replace("$1",`<span class="wpb-image-caption">${Fe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ge=new WeakMap,Vr=new WeakSet,ms=function(){return c(this,ge)&&!c(this,ge).includes("$1")}});var xs,bs,Ts,ha,ma,Mt,Pn=y(()=>{"use strict";q();X();_();ur();fs();xs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),bs=new Set(["left","right","center","none"]),Ts=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ha=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),ma=a=>{if(a===void 0)return[];let r=/-\{|\}-|\|/gu,e=[],t=r.exec(a),n=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(a.slice(i,o)),{lastIndex:i}=r),t=r.exec(a)}return e.push(a.slice(i)),e},Mt=class extends Ce{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=A.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ma(e).map(o=>new Hr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var f;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let x=m.filter(v=>v.text().trim());return x.length!==1||x[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>xs.has(m)),o=i.filter(m=>bs.has(m)),l=i.filter(m=>Ts.has(m)),[d]=s,p=d==="framed"||d==="manualthumb",g=new P(this,r);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(F(this,g,"nested-link","internal link in an external link")),p)for(let m of n.filter(({name:x})=>x==="width")){let x=w(m,g,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let u=(m,x,v)=>C=>{let E=w(C,g,"no-duplicate",A.msg(`${m} image $1 parameter`,x),v);return E.suggestions=[{desc:"remove",range:[E.startIndex-1,E.endIndex],text:""}],E},{extension:h}=this;for(let m of i){if(m==="invalid"||m==="width"&&p)continue;let x=n.filter(({name:v})=>v===m);m==="caption"&&(x=[...x.slice(0,-1).filter(v=>v.text()),...x.slice(-1)]),x.length>1&&t.push(...x.map(u("duplicated",m,m==="caption"&&h&&!ha.has(h)?"warning":"error")))}return s.length>1&&t.push(...n.filter(({name:m})=>xs.has(m)).map(u("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>bs.has(m)).map(u("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>Ts.has(m)).map(u("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var Dt,jn=y(()=>{"use strict";q();_();j();Pn();Dt=class extends Mt{constructor(e,t,n,i=A.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new k(n,i,s);for(let d=1;d<11;d++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);se(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,{halfParsed:!0,temporary:e,decode:!t})}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=F(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}}});var lt,ys,Bn,Xr,ks=y(()=>{"use strict";_();j();jn();Ge();Xr=class extends k{constructor(e,t=A.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,lt);for(let s of(i=e==null?void 0:e.split(`
11
+ `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new U(s,t,n):s);continue}let[,l,d]=o;N(this,lt,ys).call(this,l)?super.insertAt(new Dt("gallery",l,d,t,n)):super.insertAt(new U(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,lt,Bn).call(this,"widths")}get heights(){return N(this,lt,Bn).call(this,"heights")}toString(e){return super.toString(e,`
11
12
  `)}text(){return super.text(`
12
13
  `).replace(/\n\s*\n/gu,`
13
- `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],g=l.toString(),{length:u}=g,d=g.trim(),{type:p}=l,m=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let h=e+u;s.push({rule:"no-ignored",message:A.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:h,startLine:m,endLine:m,startCol:f,endCol:f+u,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],text:`<!--${g}-->`}]})}else p!=="noinclude"&&p!=="text"&&s.push(...l.lint(e,t));e+=u+1}return s}print(){return super.print({sep:`
14
- `})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};lt=new WeakSet,xs=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},jn=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),r=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return r&&Number(r)||120}});var zt,Bn=y(()=>{"use strict";_();ur();zt=class extends we{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push(L(this,{start:n},"nested-link","internal link in an external link")),t}}});var ha,ma,yr,Pe,Qr=y(()=>{"use strict";_();Q();V();M();B();ha=String.raw`(?:[${ke}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,ma=new RegExp(`${ha}+`,"gu"),Pe=class extends k{constructor(e,t="free-ext-link",r=A.getConfig(),i){super(e,r,i,{});T(this,yr);b(this,yr,t)}get type(){return c(this,yr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=fe(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(ma," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:Ti(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new R(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:d}=this;if(d.startsWith("ISBN")){let p=[...d.slice(5)].map(m=>m==="X"?10:Number(m));(p.length===10&&p.reduce((m,f,h)=>m+f*(10-h),0)%11||p.length===13&&(p[12]===10||p.reduce((m,f,h)=>m+f*(h%2?3:1),0)%10))&&r.push(L(this,i,"invalid-isbn","invalid ISBN"))}return r}let l=s==="ext-link-url",g=l?/\|/u:/[,;。:!?()]+/u,u=o.find(d=>d.type==="text"&&g.test(d.data));if(u){let{data:d}=u,p=w(u,i,"unterminated-url",A.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:m,0:f}=g.exec(d),h=p.startIndex+m;p.suggestions=l?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+f.length],text:encodeURI(f)}],r.push(p)}return r}getUrl(e){}};yr=new WeakMap});var je,Gt,qn=y(()=>{"use strict";_();M();B();Qr();Gt=class extends k{constructor(e,t="",r="",i=A.getConfig(),s=[]){super(void 0,i,s,{});T(this,je);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Pe(e,"ext-link-url",i,s);if(this.insertAt(o),b(this,je,t),r){let l=new k(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,je)}]`:`[${super.toString(e,c(this,je))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,je).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push(L(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,je)}]`}:{pre:"[",sep:c(this,je),post:"]"})}};je=new WeakMap});var kr,Ts=y(()=>{"use strict";B();Ue();Bn();qn();kr=class extends k{get type(){return"imagemap-link"}constructor(n,e,t,r,i=[]){super(void 0,r,i),this.append(n,e.length===2?new zt(...e,r,i):new Gt(...e,r,i),new W(t,r,i))}}});var Kr,ys=y(()=>{"use strict";_();ce();V();M();B();Ue();Pn();Ts();Kr=class extends k{get type(){return"ext-inner"}get image(){return this.childNodes.find(Ot("imagemap-image"))}constructor(n,e=A.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
15
- `),i=new Set(e.protocol.split("|")),s=W,o=!0,l=!1;for(let g of r){let u=g.trim();if(!(l||!u||u.startsWith("#"))){if(o){let d=g.indexOf("|"),p=d===-1?g:g.slice(0,d),{valid:m,ns:f}=this.normalizeTitle(p,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new Dt("imagemap",p,d===-1?void 0:g.slice(d+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(g.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let d=g.indexOf("["),p=g.slice(d),m=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(p);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new kr(g.slice(0,d),m.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(i.has(p.slice(1,p.indexOf(":")+1))||i.has(p.slice(1,p.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(p);if(f){super.insertAt(new kr(g.slice(0,d),f.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}toString(n){return super.toString(n,`
14
+ `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],d=l.toString(),{length:p}=d,g=d.trim(),{type:u}=l,h=n+o,f=o?0:i;if(l.setAttribute("aIndex",e),u==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)){let m=e+p;s.push({rule:"no-ignored",message:A.msg("invalid content in <$1>","gallery"),severity:g.startsWith("|")?"warning":"error",startIndex:e,endIndex:m,startLine:h,endLine:h,startCol:f,endCol:f+p,suggestions:[{desc:"remove",range:[e,m],text:""},{desc:"comment",range:[e,m],text:`<!--${d}-->`}]})}else u!=="noinclude"&&u!=="text"&&s.push(...l.lint(e,t));e+=p+1}return s}print(){return super.print({sep:`
15
+ `})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{widths:this.widths,heights:this.heights}),n}};lt=new WeakSet,ys=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},Bn=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),n=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return n&&Number(n)||120}});var zt,On=y(()=>{"use strict";q();ur();zt=class extends Ce{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(F(this,{start:r},"nested-link","internal link in an external link")),t}}});var fa,xa,yr,je,Qr=y(()=>{"use strict";q();J();X();_();j();fa=String.raw`(?:[${ke}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,xa=new RegExp(`${fa}+`,"gu"),je=class extends k{constructor(e,t="free-ext-link",n=A.getConfig(),i){super(e,n,i,{});T(this,yr);b(this,yr,t)}get type(){return c(this,yr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=fe(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(xa," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:yi(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new P(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:g}=this;if(g.startsWith("ISBN")){let u=[...g.slice(5)].map(h=>h==="X"?10:Number(h));(u.length===10&&u.reduce((h,f,m)=>h+f*(10-m),0)%11||u.length===13&&(u[12]===10||u.reduce((h,f,m)=>h+f*(m%2?3:1),0)%10))&&n.push(F(this,i,"invalid-isbn","invalid ISBN"))}return n}let l=s==="ext-link-url",d=l?/\|/u:/[,;。:!?()]+/u,p=o.find(g=>g.type==="text"&&d.test(g.data));if(p){let{data:g}=p,u=w(p,i,"unterminated-url",A.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:f}=d.exec(g),m=u.startIndex+h;u.suggestions=l?[{desc:"whitespace",range:[m,m+1],text:" "}]:[{desc:"whitespace",range:[m,m],text:" "},{desc:"escape",range:[m,m+f.length],text:encodeURI(f)}],n.push(u)}return n}getUrl(e){}};yr=new WeakMap});var Be,Wt,qn=y(()=>{"use strict";q();_();j();Qr();Wt=class extends k{constructor(e,t="",n="",i=A.getConfig(),s=[]){super(void 0,i,s,{});T(this,Be);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new je(e,"ext-link-url",i,s);if(this.insertAt(o),b(this,Be,t),n){let l=new k(n,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,Be)}]`:`[${super.toString(e,c(this,Be))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,Be).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(F(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Be)}]`}:{pre:"[",sep:c(this,Be),post:"]"})}};Be=new WeakMap});var kr,vs=y(()=>{"use strict";j();Ge();On();qn();kr=class extends k{get type(){return"imagemap-link"}constructor(r,e,t,n,i=[]){super(void 0,n,i),this.append(r,e.length===2?new zt(...e,n,i):new Wt(...e,n,i),new U(t,n,i))}}});var Kr,As=y(()=>{"use strict";q();ce();X();_();j();Ge();jn();vs();Kr=class extends k{get type(){return"ext-inner"}get image(){return this.childNodes.find(qt("imagemap-image"))}constructor(r,e=A.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
16
+ `),i=new Set(e.protocol.split("|")),s=U,o=!0,l=!1;for(let d of n){let p=d.trim();if(!(l||!p||p.startsWith("#"))){if(o){let g=d.indexOf("|"),u=g===-1?d:d.slice(0,g),{valid:h,ns:f}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(h&&f===6){let m=new Dt("imagemap",u,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),u=d.slice(g),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(u);if(h){if(this.normalizeTitle(h[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new kr(d.slice(0,g),h.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(f){super.insertAt(new kr(d.slice(0,g),f.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,e,t))}}toString(r){return super.toString(r,`
16
17
  `)}text(){return super.text(`
17
18
  `).replace(/\n{2,}/gu,`
18
- `)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=w(i,r,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(L(this,r,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
19
- `})}}});var fa,Jr,ks=y(()=>{"use strict";Tt();_();M();Ge();fa=De(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Jr=class extends oe{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let r=L(this,{start:n},"void-ext",A.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,fa(e))}}});var Yr={};le(Yr,{NestedToken:()=>On});var xa,ba,vr,Ut,On,Zr=y(()=>{"use strict";_();V();mr();Ur();M();B();_n();Ue();xa=new Set(["comment","include","arg","template","magic-word"]),ba=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),On=class extends k{constructor(e,t,r,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=nt(e,i,s,t)),e&&(e=Tr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,g,u,d)=>{let p=`\0${s.length+1}e\x7F`;return new Be(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new W(g,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,vr);T(this,Ut);b(this,vr,[...r]),b(this,Ut,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new R(this,e),i=typeof c(this,Ut)=="boolean"?ba[c(this,Ut)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,vr).includes(l);if(xa.has(o))return!1;let g=s.toString().trim();return g&&!i.test(g)}).map(s=>{let o=w(s,r,"no-ignored",A.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};vr=new WeakMap,Ut=new WeakMap});var vs,As,Mn,Ta,Be,_n=y(()=>{"use strict";_();V();M();Br();B();Sn();_r();Yi();In();gs();bs();ys();ks();vs=(a,n)=>{let e=new Set(a);return e.delete(n),[...e]};As=[Lt()];Be=class extends(Ta=Et){get type(){return"ext"}constructor(n,e,t,r,i=A.getConfig(),s=!1,o=[]){var p;let l=n.toLowerCase(),g=new Ve(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u={...i,ext:vs(i.ext,l),excludes:[...(p=i.excludes)!=null?p:[]]},d;switch(u.inExt=!0,l){case"tab":u.ext=vs(u.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&u.excludes.push("heading"),d=new k(t,u,o);break;case"pre":d=new Mr(t,u,o);break;case"dynamicpagelist":d=new jt(s,t,u,o);break;case"inputbox":u.excludes.push("heading"),d=new Wr(s,t,u,o);break;case"references":{let{NestedToken:m}=(Zr(),X(Yr));u.excludes.push("heading"),d=new m(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:m}=(Zr(),X(Yr));d=new m(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:m}=(Zr(),X(Yr));d=new m(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":d=new Xr(t,u,o);break;case"imagemap":d=new Kr(t,u,o);break;default:d=new Jr(t,u,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(n,g,d,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(L(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(L(this,r,"var-anchor","variable anchor in a section header")),t}};Mn=te(Ta),Be=ne(Mn,0,"ExtToken",As,Be),re(Mn,1,Be)});var Ss,Dn,ya,dt,ws=y(()=>{"use strict";_();Ze();M();Ge();Ss=[xe(!1)];dt=class extends(ya=oe){constructor(e,t,r,i){super(e,r,i);ie(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=L(this,{start:e},"unclosed-comment",A.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};Dn=te(ya),dt=ne(Dn,0,"CommentToken",Ss,dt),re(Dn,1,dt)});var Is={};le(Is,{parseCommentAndExt:()=>nt});var $s,ka,zn,va,Cs,nt,mr=y(()=>{"use strict";Tt();ji();Ue();qi();_n();ws();$s="<onlyinclude>",ka="</onlyinclude>",{length:zn}=$s,va=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return fi(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Cs=a=>{let n=a.indexOf($s);return{i:n,j:a.indexOf(ka,n+zn)}},nt=(a,n,e,t)=>{if(t){let{i:r,j:i}=Cs(a);if(r!==-1&&i!==-1){let s="",o=l=>{new W(l,n,e),s+=`\0${e.length-1}n\x7F`};for(;r!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new jr(a.slice(r+zn,i),n,e),r>0&&o(a.slice(0,r)),s+=l,a=a.slice(i+zn+1),{i:r,j:i}=Cs(a)}return a&&o(a),s}}return a.replace(va[t?1:0](n.ext),(r,i,s,o,l,g,u,d,p)=>{let m=e.length,f="n";if(i)f="e",new Be(i,s,o,l,n,g,e);else if(r.startsWith("<!--")){f="c";let h=r.endsWith("-->");new dt(r.slice(4,h?-3:void 0),h,n,e)}else g?new rt(g,u,d,p,n,e):new W(r,n,e);return`\0${m}${f}\x7F`})}});var Aa,Sa,wa,Ns,Wt,$e,Qe,qe,Gn,Ca,gt,Es=y(()=>{"use strict";_();ce();V();Br();B();Aa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Sa=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),wa=new Set(["strike","big","center","font","tt"]);Ns=[Lt()];gt=class extends(Ca=k){constructor(e,t,r,i,s,o){super(void 0,s,o);T(this,Wt);T(this,$e);T(this,Qe);T(this,qe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),b(this,Wt,r),b(this,$e,i),b(this,Qe,e)}get type(){return"html"}get selfClosing(){return c(this,$e)}get closing(){return c(this,Wt)}toString(e){return`<${this.closing?"/":""}${c(this,Qe)}${super.toString(e)}${c(this,$e)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Qe)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,$e)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Qe).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,g=new R(this,e);if(i==="h1"&&!o){let h=L(this,g,"h1","<h1>");h.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(h)}if(this.closest("table-attrs")){let h=L(this,g,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},r.push(h)}wa.has(i)&&r.push(L(this,g,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(L(this,g,"bold-header","bold in section header","warning"));let{html:[,u,d]}=this.getAttribute("config"),p=d.includes(i),m=u.includes(i);if(o&&(l||p)||l&&(!p&&!m)){let h=L(this,g,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},v={desc:"no self-closing",range:[h.endIndex-2,h.endIndex-1],text:""};m?h.suggestions=[x,v]:o?h.fix=p?x:v:h.suggestions=[v,{desc:"close",range:[h.endIndex-2,h.endIndex],text:`></${i}>`}],r.push(h)}else if(!this.findMatchingTag()){let h=L(this,g,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Aa.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Sa.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:v,name:C})=>v==="html"&&C===i))?h.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(h.severity="warning")}r.push(h)}return r}findMatchingTag(){return ve(c(this,qe),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),g=s.includes(e);if(l||g&&i)return this;if(!t)return;let{childNodes:u}=t,d=u.indexOf(this),p=r?u.slice(0,d).reverse():u.slice(d+1),m=[this],{rev:f}=de;for(let h of p)if(!(!h.is("html")||h.name!==e||g&&c(h,$e)))if(c(h,Wt)===r)m.push(h);else{let x=m.pop();if(x===this)return h;b(x,qe,[f,h]),b(h,qe,[f,x])}for(let h of m)b(h,qe,[f,void 0])},e=>{b(this,qe,e),e[1]&&e[1]!==this&&b(e[1],qe,[de.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Qe)}`,post:`${c(this,$e)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,$e)}),r}};Gn=te(Ca),Wt=new WeakMap,$e=new WeakMap,Qe=new WeakMap,qe=new WeakMap,gt=ne(Gn,0,"HtmlToken",Ns,gt),re(Gn,1,gt)});var Ls={};le(Ls,{parseHtml:()=>Ia});var $a,Ia,Fs=y(()=>{"use strict";_r();Es();$a=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Ia=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=$a.exec(o),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!n.htmlElements.has(u)){i+=`<${o}`;continue}let[,d,,p="",m,f]=l,{length:h}=e,x=new Ve(p,"html-attrs",u,n,e),v=x.getAttr("itemprop");if(u==="meta"&&(v===void 0||x.getAttr("content")===void 0)||u==="link"&&(v===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=h;continue}i+=`\0${e.length}x\x7F${f}`,new gt(g,x,d==="/",m==="/>",n,e)}return i}});var Ht,Un=y(()=>{"use strict";Br();M();B();$t();_r();Ht=class extends Lt(1)(k){constructor(n,e,t,r,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new be(e,"table-syntax",i,s),new Ve(r,"table-attrs",t,i,s))}}});var Te,Ar,Sr,Wn,Vt,Hn=y(()=>{"use strict";_();V();M();B();Un();Vt=class extends Ht{constructor(e,t,r=A.getConfig(),i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);T(this,Sr);T(this,Te,"");T(this,Ar);s&&([Nr(this,Te)._]=s);let l=new k(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,Te).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return N(this,Sr,Wn).call(this).subtype}afterBuild(){c(this,Te).includes("\0")&&b(this,Te,this.buildFromStr(c(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Te)+r.text()}getGaps(e){return e===1?c(this,Te).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new R(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),g=w(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let u={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
20
- ${u}`),desc:"newline"}}else g.suggestions=[{desc:"escape",range:[g.startIndex,g.endIndex],text:o.replace(/\|/gu,"&#124;")}];r.push(g)}}return r}isIndependent(){return this.firstChild.text().startsWith(`
21
- `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Te)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(r,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),r}};Te=new WeakMap,Ar=new WeakMap,Sr=new WeakSet,Wn=function(){return ve(c(this,Ar),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...N(o=i,Sr,Wn).call(o)}},e=>{b(this,Ar,e)})}});var Na,Xt,Vn=y(()=>{"use strict";_();Un();Hn();Na=new Set(["tr","td","th","caption"]),Xt=class extends Ht{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:l})=>l==="table-inter");if(!r)return t;let i=r.childNodes.find(l=>l.text().trim()),s=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!i||s.test(i.toString())||i.is("arg")&&s.test(i.default||"")||i.is("html")&&Na.has(i.name))return t;if(i.is("magic-word"))try{if(i.getPossibleValues().every(l=>s.test(l.text())))return t}catch(l){}let o=w(r,{start:n},"fostered-content","content to be moved out from the table");return o.severity=i.type==="template"?"warning":"error",o.startIndex++,o.startLine++,o.startCol=0,t.push(o),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof Vt&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var Ea,La,Xn,en,Rs=y(()=>{"use strict";_();ce();V();M();Vn();$t();Ea=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),La=({type:a})=>a==="tr"||a==="table-syntax",Xn=class extends Array{},en=class extends Xt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);this.closed||t.push(w(this.firstChild,r,"unclosed-table",A.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,g=0;for(;g<s;g++){let u=i[g],d=u.length;if(d<o)break;d<l&&(l=d);let p=u.indexOf(u[d-1])+1;if(p>l)break;p>o&&(o=p)}if(g<s){let u=w(this.getNthRow(g),r,"table-layout","inconsistent table layout","warning");u.startIndex++,u.startLine++,u.startCol=0,t.push(u)}}return t}close(n=`
22
- |}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];de.run(()=>{let s=new be(void 0,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=new Xn(...Ea(t,()=>[]));for(let i=0;i<r.length;i++){let s=r[i],o=0,l=0,g;for(let u of e[i].childNodes.slice(2))if(u.type==="td"){if(u.isIndependent()&&(g=u.subtype!=="caption"),g){let d={row:i,column:o},{rowspan:p,colspan:m}=u;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+p,t);f++)for(let h=l;h<l+m;h++)r[f][h]=d;l+=m}}else if(La(u))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(n--,n<0))return i}}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var tn,Ps=y(()=>{"use strict";Vn();tn=class extends Xt{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var Qt,Qn=y(()=>{"use strict";Ge();Qt=class extends oe{get indent(){return this.innerText.split(":").length-1}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:r}=this;return r&&(t.indent=r),t}}});var Kt,Kn=y(()=>{"use strict";Qn();Kt=class extends Qt{get type(){return"dd"}}});var Bs={};le(Bs,{parseTable:()=>Ra});var Fa,js,Ra,qs=y(()=>{"use strict";B();Rs();Ps();Hn();Kn();Fa=a=>a.lastChild.constructor!==k,js=(a,n)=>a.type==="td"?n.pop():a,Ra=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
23
- `),o=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
24
- ${s.shift()}`,l,g=(u,d)=>{if(!d){o+=u;return}let{lastChild:p}=d;if(Fa(d)){let m=new k(u,t,r);m.type="table-inter",m.setAttribute("stage",3),d.insertAt(m)}else p.setText(p.toString()+u)};for(let u of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),p=u.slice(d.length),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,E,$,S,F]=m;E&&new Kt(E,t,r),g(`
25
- ${d}${E&&`\0${r.length-1}d\x7F`}${$}\0${r.length}b\x7F`,l),i.push(...l?[l]:[],new en(S,F,t,r));continue}else if(!l){o+=`
26
- ${u}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(p);if(!f){g(`
27
- ${u}`,l),i.push(l);continue}let[,h,x,v,C]=f;if(h){for(;l.type!=="table";)l=i.pop();l.close(`
28
- ${d}${h}`,!0),g(C,i[i.length-1])}else if(x){l=js(l,i),l.type==="tr"&&(l=i.pop());let E=new tn(`
29
- ${d}${x}`,C,t,r);i.push(l,E),l.insertAt(E)}else{l=js(l,i);let E=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,$=E.exec(C),S=0,F=`
30
- ${d}${v}`,O=P=>{let j=new Vt(F,C.slice(S,$==null?void 0:$.index),t,r);return P.insertAt(j),j};for(;$;)O(l),{lastIndex:S}=E,[F]=$,$=E.exec(C);i.push(l,O(l))}}return o.slice(1)}});var rn,Os=y(()=>{"use strict";Ge();rn=class extends oe{get type(){return"hr"}}});var _s,Jn,Pa,pt,Ms=y(()=>{"use strict";Ze();Ge();_s=[xe()];pt=class extends(Pa=oe){get type(){return"double-underscore"}constructor(n,e,t,r){var l,g;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(g=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?g:i)}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Jn=te(Pa),pt=ne(Jn,0,"DoubleUnderscoreToken",_s,pt),re(Jn,1,pt)});var Ds={};le(Ds,{parseHrAndDoubleUnderscore:()=>ja});var ja,zs=y(()=>{"use strict";Os();Ms();Nn();ja=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,g,u;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(g=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(u=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,m)=>(new rn(m,t,r),`${p}\0${r.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var x;let m=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new pt(p,m,t,r),`\0${r.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,m,f,h)=>{let x=`${p}\0${r.length}h\x7F`;return new qt(m.length,[f,h],t,r),x}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var nn,Gs=y(()=>{"use strict";_();V();M();Ge();nn=class extends oe{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:n,innerText:e}=this;return(n==null?void 0:n.type)==="image-parameter"&&n.name!=="caption"?"":e}lint(n=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:r}=this,i=A.msg('lonely "$1"',"'"),s=[],o=new R(this,n),l=(g,u,d)=>[{desc:"escape",range:[g,u],text:"&apos;".repeat(d)},{desc:"remove",range:[g,u],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let g=L(this,o,"lonely-apos",i),{startIndex:u,startLine:d,startCol:p}=g,[,{length:m}]=/(?:^|[^'])('+)$/u.exec(e.data),f=n-m;s.push({...g,startIndex:f,endIndex:u,endLine:d,startCol:p-m,endCol:p,suggestions:l(f,u,m)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let g=L(this,o,"lonely-apos",i),{endIndex:u,endLine:d,endCol:p}=g,[{length:m}]=/^'+/u.exec(t.data),f=u+m;s.push({...g,startIndex:u,endIndex:f,startLine:d,startCol:p,endCol:p+m,suggestions:l(u,f,m)})}if(r&&this.closest("heading-title")){let g=L(this,o,"bold-header","bold in section header","warning");g.suggestions=[{desc:"remove",range:[n,n+3],text:""}],s.push(g)}return s}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Us={};le(Us,{parseQuotes:()=>Yn});var Yn,Zn=y(()=>{"use strict";Gs();Yn=(a,n,e,t)=>{var d;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,g,u;for(let p=1;p<i;p+=2){let m=r[p].length;switch(m){case 2:o++;break;case 4:r[p-1]+="'",r[p]="'''";case 3:if(s++,l!==void 0)break;r[p-1].endsWith(" ")?g===void 0&&u===void 0&&(u=p):r[p-1].slice(-2,-1)===" "?l=p:g!=null||(g=p);break;default:r[p-1]+="'".repeat(m-5),r[p]="'''''",o++,s++}}if(o%2===1&&s%2===1){let p=(d=l!=null?l:g)!=null?d:u;p!==void 0&&(r[p]="''",r[p-1]+="'")}for(let p=1;p<i;p+=2)new nn(r[p],n,e),r[p]=`\0${e.length-1}q\x7F`;return r.join("")}});var Ws={};le(Ws,{parseExternalLinks:()=>ei});var ei,ti=y(()=>{"use strict";Q();qn();Qr();ei=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${Ne}|\0\d+m\x7F)${Ee}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:g}=e,u=/&[lg]t;/u.exec(s);return u&&(o="",l=s.slice(u.index)+o+l,s=s.slice(0,u.index)),t?(new Pe(s,"ext-link-url",n,e),`[\0${g}f\x7F${o}${l}]`):(new Gt(s,o,l,n,e),`\0${g}w\x7F`)})}});var sn,Hs=y(()=>{"use strict";Q();ur();sn=class extends we{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&Ye(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Xs={};le(Xs,{parseLinks:()=>Vs});var Ba,Vs,Qs=y(()=>{"use strict";M();Zn();ti();Bn();Rn();Hs();Ba=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Vs=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let g=!1,u,d,p,m,f=i[l],h=r.exec(f);if(h)[,u,d,p,m]=h,m.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",m=m.slice(1));else{let $=Ba.exec(f);$&&(g=!0,[,u,d,p]=$)}if(u===void 0||n.regexLinks.test(u)||/\0\d+[exhbru]\x7F/u.test(u)){s+=`[[${f}`;continue}let x=u.trim().startsWith(":");if(x&&g){s+=`[[${f}`;continue}let{ns:v,valid:C}=A.normalizeTitle(u,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(C){if(g){if(v!==6){s+=`[[${f}`;continue}let $=!1;for(l++;l<i.length;l++){let S=i[l],F=S.split("]]");if(F.length>2){$=!0,p+=`[[${F[0]}]]${F[1]}`,m=F.slice(2).join("]]");break}else if(F.length===2)p+=`[[${F[0]}]]${F[1]}`;else{p+=`[[${S}`;break}}if(p=Vs(p,n,e,t),!$){s+=`[[${u}${d}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=Yn(p,n,e,t));let E=zt;x||(v===6?(p&&(p=ei(p,n,e,!0)),E=Mt):v===14&&(E=sn)),p===void 0&&d&&(p=""),s+=`\0${e.length}l\x7F${m}`,new E(u,p,n,e,d)}return s}});var eo={};le(eo,{parseMagicLinks:()=>qa});var Zs,Ks,Js,Ys,qa,to=y(()=>{"use strict";Q();Qr();Zs=String.raw`[${ke}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Ks=`(?:${Zs})+`,Js=`(?:${Zs}|-)`,Ys=String.raw`(?:RFC|PMID)${Ks}\d+\b|ISBN${Ks}(?:97[89]${Js}?)?(?:\d${Js}?){9}[\dx]\b`,qa=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${n.protocol})(${Ne}${Ee})|${Ys})`,"giu")}catch(t){n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${Ne}${Ee})|${Ys})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let g=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=g.exec(s);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(d=2),o=s.slice(u.index+d)+o,s=s.slice(0,u.index+d)}return o.length>=i.length?t:(new Pe(s,void 0,n,e),`${r}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Pe(s,"magic-link",n,e),`${r}\0${e.length-1}i\x7F`})}});var ro,no=y(()=>{"use strict";ro=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var on,io=y(()=>{"use strict";Qn();on=class extends Qt{get type(){return"list"}}});var so={};le(so,{parseList:()=>Oa});var Oa,oo=y(()=>{"use strict";no();io();Kn();Oa=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),g=ro(l,n.lastPrefix),u=(g>1?o.slice(g-1):o).split(/(?=;)/u),d=u[0].startsWith(";"),p=u.length-(d?0:1);if(g>1){let P=o.slice(0,g-1);d?u.unshift(P):u[0]=P+u[0]}n.lastPrefix=l;let m=s+u.map((P,j)=>`\0${t.length+j}d\x7F`).join("")+a.slice(i.length);for(let P of u)new on(P,e,t);if(!p)return m;let{html:[f]}=e,h=/:+|-\{|\0\d+[xq]\x7F/gu,x=h,v=x.exec(m),C=0,E=!1,$=!1,S=0,F=(P,j)=>(new Kt(P,e,t),`${m.slice(0,j)}\0${t.length-1}d\x7F${m.slice(j+P.length)}`),O=P=>{P?C&&C--:C++};for(;v&&p;){let{0:P,index:j}=v;if(P==="-{"){if(!S){let{lastIndex:q}=x;x=/-\{|\}-/gu,x.lastIndex=q}S++}else if(P==="}-"){if(S--,!S){let{lastIndex:q}=x;x=h,x.lastIndex=q}}else if(P.endsWith("x\x7F")){let{name:q,closing:ae,selfClosing:me}=t[Number(P.slice(1,-2))];(!me||f.includes(q))&&O(ae)}else if(P.endsWith("q\x7F")){let{bold:q,italic:ae}=t[Number(P.slice(1,-2))];q&&(O(E),E=!E),ae&&(O($),$=!$)}else if(C===0){if(P.length>=p)return F(P.slice(0,p),j);p-=P.length,x.lastIndex=j+4+String(t.length).length,m=F(P,j)}v=x.exec(m)}return m}});var ao,Oe,an,lo=y(()=>{"use strict";_();V();B();Fe();ao=new Set(["A","T","R","D","-","H","N"]),an=class extends k{constructor(e,t,r=[]){super(void 0,t,r,{});T(this,Oe);this.append(...e.map(i=>new G(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){b(this,Oe,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,Oe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Oe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Oe).filter(d=>ao.has(d))),o=c(this,Oe).filter(d=>!d).length,l=c(this,Oe).length-i.size-o,g=super.lint(e,t);if(r.size===l||s.size===l)return g;let u=new R(this,e);for(let d=0;d<this.length;d++){let p=this.childNodes[d],m=p.text().trim();if(m&&!r.has(m)&&!i.has(m)&&(r.size>0||!s.has(m))){let f=w(p,u,"no-ignored","invalid conversion flag");r.size===0&&ao.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(d&&1),f.endIndex],text:""}],g.push(f)}}return g}print(){return super.print({sep:";"})}};Oe=new WeakMap});var Jt,go=y(()=>{"use strict";M();B();Fe();Jt=class extends k{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=A.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new G(o,"converter-rule-variant",t,r)),super.insertAt(new G(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new G(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new G(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var ln,po=y(()=>{"use strict";Q();B();lo();go();ln=class extends k{get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new an(n,t,r));let[i]=e,s=i.includes(":"),o=new Jt(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!se(e[1]).trim()?this.insertAt(new Jt(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new Jt(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${fe(e,";")}}-`}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${Le(e,{sep:";"})}}-</span>`}}});var uo={};le(uo,{parseConverter:()=>_a});var _a,co=y(()=>{"use strict";po();_a=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:g,index:u}=o;if(g==="}-"){let d=i.pop(),{length:p}=e,m=a.slice(d.index+2,u),f=m.indexOf("|"),[h,x]=f===-1?[[],m]:[m.slice(0,f).split(";"),m.slice(f+1)],v=x.replace(/(&[#a-z\d]+);/giu,"$1"),C=v.split(n.regexConverter).map(E=>E.replace(/\x01/gu,";"));new ln(h,C,n,e),a=`${a.slice(0,d.index)}\0${p}v\x7F${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=r,s.lastIndex=u+2;o=s.exec(a)}return a}});var dn={};le(dn,{Token:()=>k});var wr,he,D,U,ut,Yt,Cr,z,ho,mo,fo,xo,bo,To,yo,ko,vo,Ao,So,wo,ri,k,B=y(()=>{"use strict";Q();_();ce();M();wi();Ii();ri=class ri extends Lr{constructor(e,t=A.getConfig(),r=[],i){super();T(this,z);T(this,wr,"plain");T(this,he,0);T(this,D);T(this,U);T(this,ut);T(this,Yt,!1);T(this,Cr);typeof e=="string"&&this.insertAt(e),b(this,D,t),b(this,U,r),r.push(this)}get type(){return c(this,wr)}set type(e){b(this,wr,e)}parseOnce(e=c(this,he),t=!1,r){if(e<c(this,he)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,he)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,U).pop();let i=N(this,z,ho).call(this);t&&(t=!i)}b(this,ut,t),N(this,z,mo).call(this,t);break;case 1:N(this,z,fo).call(this);break;case 2:N(this,z,xo).call(this);break;case 3:N(this,z,bo).call(this);break;case 4:N(this,z,To).call(this);break;case 5:N(this,z,yo).call(this,r);break;case 6:N(this,z,ko).call(this,r);break;case 7:N(this,z,vo).call(this);break;case 8:N(this,z,Ao).call(this);break;case 9:N(this,z,So).call(this);break;case 10:N(this,z,wo).call(this)}if(this.type==="root")for(let i of c(this,U))i==null||i.parseOnce(e,t,r);return Nr(this,he)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new gr(i);if(isNaN(i.slice(-1)))return c(this,U)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?fe(r):r}build(){b(this,he,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(dr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,U))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,U))e==null||e.afterBuild();b(this,Yt,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,he)<e;)this.parseOnce(c(this,he),t,r);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ri;case"config":return c(this,D);case"include":return(t=c(this,ut))!=null?t:!!c(this.getRootNode(),ut);case"accum":return c(this,U);case"built":return c(this,Yt);case"stage":return c(this,he);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,he)===0&&this.type==="root"&&c(this,U).shift(),b(this,he,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new gr(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return A.normalizeTitle(e,t,c(this,ut),c(this,D),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let p of this.querySelectorAll(o)){let m;if(p.type==="category")m=p.name;else{let f=p.getValue();f&&f!==!0&&(m=`#${f}`)}if(m){let f=s.get(m);f?f.add(p):s.set(m,new Set([p]))}}for(let[p,m]of s)if(m.size>1&&!p.startsWith("#mw-customcollapsible-")){let f=!p.startsWith("#"),h=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";r.push(...[...m].map(v=>{let C=L(v,{start:v.getAbsoluteIndex()},"no-duplicate",h,x);return f&&(C.suggestions=[{desc:"remove",range:[C.startIndex,C.endIndex],text:""}]),C}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,g=this.toString(),u=[],d=l.exec(g);for(;d;){let{1:p,index:m}=d,f=(i=d[2])==null?void 0:i.trim();u.push({line:this.posFromIndex(m).top+(p==="disable-line"?0:1),from:p==="disable"?l.lastIndex:void 0,to:p==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(h=>h.trim())):void 0}),d=l.exec(g)}r=r.filter(({rule:p,startLine:m,startIndex:f})=>{let h={pos:0};for(let{line:x,from:v,to:C,rules:E}of u){if(x>m+1)break;if(E&&!E.has(p))continue;if(x===m&&v===void 0&&C===void 0)return!1;v<=f&&v>h.pos?(h.pos=v,h.type="from"):C<=f&&C>h.pos&&(h.pos=C,h.type="to")}return h.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):ve(c(this,Cr),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,Yt)&&b(this,Cr,r)})}};wr=new WeakMap,he=new WeakMap,D=new WeakMap,U=new WeakMap,ut=new WeakMap,Yt=new WeakMap,Cr=new WeakMap,z=new WeakSet,ho=function(){let{parseRedirect:e}=(Pi(),X(Ri)),t=this.firstChild.toString(),r=e(t,c(this,D),c(this,U));return r&&this.setText(r),!!r},mo=function(e){let{parseCommentAndExt:t}=(mr(),X(Is));this.setText(t(this.firstChild.toString(),c(this,D),c(this,U),e))},fo=function(){let{parseBraces:e}=(Ur(),X(ds)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,D),c(this,U));this.setText(this.type==="root"?r:r.slice(1))},xo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Fs(),X(Ls));this.setText(e(this.firstChild.toString(),c(this,D),c(this,U)))},bo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(qs(),X(Bs));this.setText(e(this,c(this,D),c(this,U)))},To=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(zs(),X(Ds));this.setText(e(this,c(this,D),c(this,U)))},yo=function(e){let{parseLinks:t}=(Qs(),X(Xs));this.setText(t(this.firstChild.toString(),c(this,D),c(this,U),e))},ko=function(e){var i;if((i=c(this,D).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(Zn(),X(Us)),r=this.firstChild.toString().split(`
31
- `);for(let s=0;s<r.length;s++)r[s]=t(r[s],c(this,D),c(this,U),e);this.setText(r.join(`
32
- `))},vo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ti(),X(Ws));this.setText(e(this.firstChild.toString(),c(this,D),c(this,U)))},Ao=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(to(),X(eo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,U)))},So=function(){var g;if((g=c(this,D).excludes)!=null&&g.includes("list"))return;let{parseList:e}=(oo(),X(so)),{firstChild:t,type:r,name:i}=this,s=t.toString().split(`
33
- `),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,D),c(this,U));this.setText(s.join(`
34
- `))},wo=function(){if(c(this,D).variants.length>0){let{parseConverter:e}=(co(),X(uo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,U)))}};k=ri});var de,Ot,dr,Rr,ce=y(()=>{"use strict";de={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(B(),X(dn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},Ot=a=>n=>n.type===a,dr=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i;r.length===e?(i=r,r=t):i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let g=t[l];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",r[n+l+1]),g.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),r===t&&a.setAttribute("childNodes",r),i},Rr=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var Co={};le(Co,{Title:()=>ni});var $r,Ir,ct,Zt,ht,ni,$o=y(()=>{"use strict";Q();ni=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){T(this,$r);T(this,Ir);T(this,ct);T(this,Zt);T(this,ht);ie(this,"valid");ie(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=Me(n),this.encoded=g}catch(g){}if(n=Ye(n).replace(/[_ ]+/gu," ").trim(),o)b(this,Zt,0);else{let g=e;n.startsWith(":")&&(g=0,n=n.slice(1).trim());let u=n.split(":");if(u.length>1){let d=u[0].trim().toLowerCase(),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(g=p,n=u.slice(1).join(":").trim())}b(this,Zt,g)}let l=n.indexOf("#");if(l!==-1){let g=n.slice(l).trim().slice(1);if(g.includes("%"))try{g=Me(g)}catch(u){}b(this,ht,g.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,ht)!==void 0)&&Ye(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,b(this,Ir,t.namespaces),b(this,ct,t.articlePath||"/wiki/$1"),c(this,ct).includes("$1")||b(this,ct,c(this,ct)+`${c(this,ct).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Zt)}get fragment(){return c(this,ht)}get main(){return c(this,$r)}set main(n){n=n.replace(/_/gu," ").trim(),b(this,$r,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Ir)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){b(this,ht,n)}getUrl(n){}};$r=new WeakMap,Ir=new WeakMap,ct=new WeakMap,Zt=new WeakMap,ht=new WeakMap});var mt,Io,Ma,A,M=y(()=>{mi();ce();ki();Q();mt={config:cn,i18n:void 0,rules:hi,getConfig(a){let n=a!=null?a:this.config,{doubleUnderscore:e}=n;for(let t=0;t<2;t++)e.length>t+2&&e[t].length===0&&(e[t]=Object.keys(e[t+2]));return{...cn,...n,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=mt.getConfig(),r){let{Title:i}=($o(),X(Co)),s;if(r!=null&&r.halfParsed)s=new i(a,n,t,r);else{let{Token:o}=(B(),X(dn));s=de.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let g=new i(l.toString(),n,t,r);for(let u of["main","fragment"]){let d=g[u];if(d!=null&&d.includes("\0")){let p=l.buildFromStr(d,1);u==="main"?g.main=p:g.setFragment(p)}}return g})}return s},parse(a,n,e=11,t=mt.getConfig()){a=bi(a);let r;typeof e!="number"&&(r=Array.isArray(e)?e:[e],e=Math.max(...r.map(o=>ci[o]||11)));let{Token:i}=(B(),X(dn));return de.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,n)})},async partialParse(a,n,e,t=mt.getConfig()){},createLanguageService(a){}},Io={},Ma=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in mt)Ma.has(a)||(Io[a]={enumerable:!1});Object.defineProperties(mt,Io);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:mt});A=mt});M();})();
19
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=w(i,n,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(F(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
20
+ `})}}});var ba,Jr,Ss=y(()=>{"use strict";Tt();q();_();We();ba=we(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Jr=class extends ae{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let n=F(this,{start:r},"void-ext",A.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:"",desc:"empty"},[n]}return super.lint(r,ba(e))}}});var Yr={};le(Yr,{NestedToken:()=>_n});var Ta,ya,vr,Gt,_n,Zr=y(()=>{"use strict";q();X();mr();Gr();_();j();Mn();Ge();Ta=new Set(["comment","include","arg","template","magic-word"]),ya=[!1,!0].map(a=>{let r=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${r}(?:\s[^>]*)?/?>|</${r}\s*>)$`,"iu")}),_n=class extends k{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=nt(e,i,s,t)),e&&(e=Tr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,d,p,g)=>{let u=`\0${s.length+1}e\x7F`;return new Oe(l,d,p,g,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new U(d,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,vr);T(this,Gt);b(this,vr,[...n]),b(this,Gt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new P(this,e),i=typeof c(this,Gt)=="boolean"?ya[c(this,Gt)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,vr).includes(l);if(Ta.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).map(s=>{let o=w(s,n,"no-ignored",A.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};vr=new WeakMap,Gt=new WeakMap});var ws,Cs,Dn,ka,Oe,Mn=y(()=>{"use strict";q();X();_();Br();j();Sn();_r();Zi();In();cs();ks();As();Ss();ws=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};Cs=[Lt()];Oe=class extends(ka=Et){get type(){return"ext"}constructor(r,e,t,n,i=A.getConfig(),s=!1,o=[]){var u;let l=r.toLowerCase(),d=new Ve(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p={...i,ext:ws(i.ext,l),excludes:[...(u=i.excludes)!=null?u:[]]},g;switch(p.inExt=!0,l){case"tab":p.ext=ws(p.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&p.excludes.push("heading"),g=new k(t,p,o);break;case"pre":g=new Mr(t,p,o);break;case"dynamicpagelist":g=new jt(s,t,p,o);break;case"inputbox":p.excludes.push("heading"),g=new Ur(s,t,p,o);break;case"references":{let{NestedToken:h}=(Zr(),K(Yr));p.excludes.push("heading"),g=new h(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:h}=(Zr(),K(Yr));g=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:h}=(Zr(),K(Yr));g=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":g=new Xr(t,p,o);break;case"imagemap":g=new Kr(t,p,o);break;default:g=new Jr(t,p,o)}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(r,d,g,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(F(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(F(this,n,"var-anchor","variable anchor in a section header")),t}};Dn=re(ka),Oe=ie(Dn,0,"ExtToken",Cs,Oe),ne(Dn,1,Oe)});var $s,zn,va,dt,Is=y(()=>{"use strict";q();Ze();_();We();$s=[xe(!1)];dt=class extends(va=ae){constructor(e,t,n,i){super(e,n,i);se(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=F(this,{start:e},"unclosed-comment",A.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};zn=re(va),dt=ie(zn,0,"CommentToken",$s,dt),ne(zn,1,dt)});var Ls={};le(Ls,{parseCommentAndExt:()=>nt});var Es,Aa,Wn,Sa,Ns,nt,mr=y(()=>{"use strict";Tt();Bi();Ge();qi();Mn();Is();Es="<onlyinclude>",Aa="</onlyinclude>",{length:Wn}=Es,Sa=[!1,!0].map(a=>{let r=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return we(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${r}(?:\s[^>]*)?/?>|</${r}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Ns=a=>{let r=a.indexOf(Es);return{i:r,j:a.indexOf(Aa,r+Wn)}},nt=(a,r,e,t)=>{if(t){let{i:n,j:i}=Ns(a);if(n!==-1&&i!==-1){let s="",o=l=>{new U(l,r,e),s+=`\0${e.length-1}n\x7F`};for(;n!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new jr(a.slice(n+Wn,i),r,e),n>0&&o(a.slice(0,n)),s+=l,a=a.slice(i+Wn+1),{i:n,j:i}=Ns(a)}return a&&o(a),s}}return a.replace(Sa[t?1:0](r.ext),(n,i,s,o,l,d,p,g,u)=>{let h=e.length,f="n";if(i)f="e",new Oe(i,s,o,l,r,d,e);else if(n.startsWith("<!--")){f="c";let m=n.endsWith("-->");new dt(n.slice(4,m?-3:void 0),m,r,e)}else d?new rt(d,p,g,u,r,e):new U(n,r,e);return`\0${h}${f}\x7F`})}});var wa,Ca,$a,Fs,Ut,Ie,Qe,qe,Gn,Ia,gt,Rs=y(()=>{"use strict";q();ce();X();Br();j();wa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Ca=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),$a=new Set(["strike","big","center","font","tt"]);Fs=[Lt()];gt=class extends(Ia=k){constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Ut);T(this,Ie);T(this,Qe);T(this,qe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),b(this,Ut,n),b(this,Ie,i),b(this,Qe,e)}get type(){return"html"}get selfClosing(){return c(this,Ie)}get closing(){return c(this,Ut)}toString(e){return`<${this.closing?"/":""}${c(this,Qe)}${super.toString(e)}${c(this,Ie)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Qe)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Ie)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Qe).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new P(this,e);if(i==="h1"&&!o){let m=F(this,d,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(m)}if(this.closest("table-attrs")){let m=F(this,d,"parsing-order","HTML tag in table attributes");m.fix={desc:"remove",range:[e,m.endIndex],text:""},n.push(m)}$a.has(i)&&n.push(F(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&n.push(F(this,d,"bold-header","bold in section header","warning"));let{html:[,p,g]}=this.getAttribute("config"),u=g.includes(i),h=p.includes(i);if(o&&(l||u)||l&&(!u&&!h)){let m=F(this,d,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},v={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[x,v]:o?m.fix=u?x:v:m.suggestions=[v,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],n.push(m)}else if(!this.findMatchingTag()){let m=F(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&wa.has(x.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Ca.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:v,name:C})=>v==="html"&&C===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}n.push(m)}return n}findMatchingTag(){return ve(c(this,qe),()=>{let{name:e,parentNode:t,closing:n,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:p}=t,g=p.indexOf(this),u=n?p.slice(0,g).reverse():p.slice(g+1),h=[this],{rev:f}=de;for(let m of u)if(!(!m.is("html")||m.name!==e||d&&c(m,Ie)))if(c(m,Ut)===n)h.push(m);else{let x=h.pop();if(x===this)return m;b(x,qe,[f,m]),b(m,qe,[f,x])}for(let m of h)b(m,qe,[f,void 0])},e=>{b(this,qe,e),e[1]&&e[1]!==this&&b(e[1],qe,[de.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Qe)}`,post:`${c(this,Ie)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Ie)}),n}};Gn=re(Ia),Ut=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,qe=new WeakMap,gt=ie(Gn,0,"HtmlToken",Fs,gt),ne(Gn,1,gt)});var Ps={};le(Ps,{parseHtml:()=>Ea});var Na,Ea,js=y(()=>{"use strict";_r();Rs();Na=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Ea=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=Na.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!r.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",h,f]=l,{length:m}=e,x=new Ve(u,"html-attrs",p,r,e),v=x.getAttr("itemprop");if(p==="meta"&&(v===void 0||x.getAttr("content")===void 0)||p==="link"&&(v===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new gt(d,x,g==="/",h==="/>",r,e)}return i}});var Ht,Un=y(()=>{"use strict";Br();_();j();$t();_r();Ht=class extends Lt(1)(k){constructor(r,e,t,n,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new be(e,"table-syntax",i,s),new Ve(n,"table-attrs",t,i,s))}}});var Te,Ar,Sr,Hn,Vt,Vn=y(()=>{"use strict";q();X();_();j();Un();Vt=class extends Ht{constructor(e,t,n=A.getConfig(),i=[]){var d;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,n,i);T(this,Sr);T(this,Te,"");T(this,Ar);s&&([Nr(this,Te)._]=s);let l=new k(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,Te).length),n,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return N(this,Sr,Hn).call(this).subtype}afterBuild(){c(this,Te).includes("\0")&&b(this,Te,this.buildFromStr(c(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,Te)+n.text()}getGaps(e){return e===1?c(this,Te).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new P(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),d=w(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
21
+ ${p}`),desc:"newline"}}else d.suggestions=[{desc:"escape",range:[d.startIndex,d.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(d)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
22
+ `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Te)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(n,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),n}};Te=new WeakMap,Ar=new WeakMap,Sr=new WeakSet,Hn=function(){return ve(c(this,Ar),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...N(o=i,Sr,Hn).call(o)}},e=>{b(this,Ar,e)})}});var La,Fa,Xn,Xt,Qn=y(()=>{"use strict";q();Un();Vn();La=new Set(["tr","td","th","caption"]),Fa=new Set(["Template:!!","Template:!-"]),Xn=a=>{let r=a.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.type==="magic-word"&&r.name==="!"||r.type==="template"&&Fa.has(r.name)||r.is("html")&&La.has(r.name))return!1;if(r.is("arg"))return r.length>1&&Xn(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(Xn);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch(e){}return r.type==="template"||r.type==="magic-word"&&r.name==="invoke"?"warning":"error"},Xt=class extends Ht{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:o})=>o==="table-inter");if(!n)return t;let i=Xn(n);if(!i)return t;let s=w(n,{start:r},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(r=>r instanceof Vt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Ra,Pa,Kn,en,Bs=y(()=>{"use strict";q();ce();X();_();Qn();$t();Ra=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),Pa=({type:a})=>a==="tr"||a==="table-syntax",Kn=class extends Array{},en=class extends Xt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);this.closed||t.push(w(this.firstChild,n,"unclosed-table",A.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,d=0;for(;d<s;d++){let p=i[d],g=p.length;if(g<o)break;g<l&&(l=g);let u=p.indexOf(p[g-1])+1;if(u>l)break;u>o&&(o=u)}if(d<s){let p=w(this.getNthRow(d),n,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(r=`
23
+ |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=[r];de.run(()=>{let s=new be(void 0,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=Kn.from(Ra(t,()=>[]));for(let i=0;i<n.length;i++){let s=n[i],o=0,l=0,d;for(let p of e[i].childNodes.slice(2))if(p.type==="td"){if(p.isIndependent()&&(d=p.subtype!=="caption"),d){let g={row:i,column:o},{rowspan:u,colspan:h}=p;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+u,t);f++)for(let m=l;m<l+h;m++)n[f][m]=g;l+=h}}else if(Pa(p))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(r--,r<0))return i}}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var tn,Os=y(()=>{"use strict";Qn();tn=class extends Xt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var Qt,Jn=y(()=>{"use strict";We();Qt=class extends ae{get indent(){return this.innerText.split(":").length-1}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:n}=this;return n&&(t.indent=n),t}}});var Kt,Yn=y(()=>{"use strict";Jn();Kt=class extends Qt{get type(){return"dd"}}});var _s={};le(_s,{parseTable:()=>Ba});var ja,qs,Ba,Ms=y(()=>{"use strict";j();Bs();Os();Vn();Yn();ja=a=>a.lastChild.constructor!==k,qs=(a,r)=>a.type==="td"?r.pop():a,Ba=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
24
+ `),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
25
+ ${s.shift()}`,l,d=(p,g)=>{if(!g){o+=p;return}let{lastChild:u}=g;if(ja(g)){let h=new k(p,t,n);h.type="table-inter",h.setAttribute("stage",3),g.insertAt(h)}else u.setText(u.toString()+p)};for(let p of s){l=i.pop();let[g]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(p),u=p.slice(g.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(u);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,E,$,S,L]=h;E&&new Kt(E,t,n),d(`
26
+ ${g}${E&&`\0${n.length-1}d\x7F`}${$}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new en(S,L,t,n));continue}else if(!l){o+=`
27
+ ${p}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(u);if(!f){d(`
28
+ ${p}`,l),i.push(l);continue}let[,m,x,v,C]=f;if(m){for(;l.type!=="table";)l=i.pop();l.close(`
29
+ ${g}${m}`,!0),d(C,i[i.length-1])}else if(x){l=qs(l,i),l.type==="tr"&&(l=i.pop());let E=new tn(`
30
+ ${g}${x}`,C,t,n);i.push(l,E),l.insertAt(E)}else{l=qs(l,i);let E=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,$=E.exec(C),S=0,L=`
31
+ ${g}${v}`,M=R=>{let B=new Vt(L,C.slice(S,$==null?void 0:$.index),t,n);return R.insertAt(B),B};for(;$;)M(l),{lastIndex:S}=E,[L]=$,$=E.exec(C);i.push(l,M(l))}}return o.slice(1)}});var rn,Ds=y(()=>{"use strict";We();rn=class extends ae{get type(){return"hr"}}});var zs,Zn,Oa,pt,Ws=y(()=>{"use strict";Ze();We();zs=[xe()];pt=class extends(Oa=ae){get type(){return"double-underscore"}constructor(r,e,t,n){var l,d;super(r,t,n);let i=r.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[r])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Zn=re(Oa),pt=ie(Zn,0,"DoubleUnderscoreToken",zs,pt),ne(Zn,1,pt)});var Gs={};le(Gs,{parseHrAndDoubleUnderscore:()=>qa});var qa,Us=y(()=>{"use strict";Ds();Ws();Nn();qa=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,d,p;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(p=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,u,h)=>(new rn(h,t,n),`${u}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var x;let h=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new pt(u,h,t,n),`\0${n.length-1}${m&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}\x7F`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,u,h,f,m)=>{let x=`${u}\0${n.length}h\x7F`;return new Ot(h.length,[f,m],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var nn,Hs=y(()=>{"use strict";q();X();_();We();nn=class extends ae{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=A.msg('lonely "$1"',"'"),s=[],o=new P(this,r),l=(d,p,g)=>[{desc:"escape",range:[d,p],text:"&apos;".repeat(g)},{desc:"remove",range:[d,p],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let d=F(this,o,"lonely-apos",i),{startIndex:p,startLine:g,startCol:u}=d,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),f=r-h;s.push({...d,startIndex:f,endIndex:p,endLine:g,startCol:u-h,endCol:u,suggestions:l(f,p,h)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let d=F(this,o,"lonely-apos",i),{endIndex:p,endLine:g,endCol:u}=d,[{length:h}]=/^'+/u.exec(t.data),f=p+h;s.push({...d,startIndex:p,endIndex:f,startLine:g,startCol:u,endCol:u+h,suggestions:l(p,f,h)})}if(n&&this.closest("heading-title")){let d=F(this,o,"bold-header","bold in section header","warning");d.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(d)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Vs={};le(Vs,{parseQuotes:()=>ei});var ei,ti=y(()=>{"use strict";Hs();ei=(a,r,e,t)=>{var g;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,d,p;for(let u=1;u<i;u+=2){let h=n[u].length;switch(h){case 2:o++;break;case 4:n[u-1]+="'",n[u]="'''";case 3:if(s++,l!==void 0)break;n[u-1].endsWith(" ")?d===void 0&&p===void 0&&(p=u):n[u-1].slice(-2,-1)===" "?l=u:d!=null||(d=u);break;default:n[u-1]+="'".repeat(h-5),n[u]="'''''",o++,s++}}if(o%2===1&&s%2===1){let u=(g=l!=null?l:d)!=null?g:p;u!==void 0&&(n[u]="''",n[u-1]+="'")}for(let u=1;u<i;u+=2)new nn(n[u],r,e),n[u]=`\0${e.length-1}q\x7F`;return n.join("")}});var Xs={};le(Xs,{parseExternalLinks:()=>ri});var ri,ni=y(()=>{"use strict";J();qn();Qr();ri=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ee}|\0\d+m\x7F)${Le}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:d}=e,p=/&[lg]t;/u.exec(s);return p&&(o="",l=s.slice(p.index)+o+l,s=s.slice(0,p.index)),t?(new je(s,"ext-link-url",r,e),`[\0${d}f\x7F${o}${l}]`):(new Wt(s,o,l,r,e),`\0${d}w\x7F`)})}});var sn,Qs=y(()=>{"use strict";J();ur();sn=class extends Ce{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&Ye(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var Js={};le(Js,{parseLinks:()=>Ks});var _a,Ks,Ys=y(()=>{"use strict";_();ti();ni();On();Pn();Qs();_a=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ks=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let d=!1,p,g,u,h,f=i[l],m=n.exec(f);if(m)[,p,g,u,h]=m,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let $=_a.exec(f);$&&(d=!0,[,p,g,u]=$)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let x=p.trim().startsWith(":");if(x&&d){s+=`[[${f}`;continue}let{ns:v,valid:C}=A.normalizeTitle(p,0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(C){if(d){if(v!==6){s+=`[[${f}`;continue}let $=!1;for(l++;l<i.length;l++){let S=i[l],L=S.split("]]");if(L.length>2){$=!0,u+=`[[${L[0]}]]${L[1]}`,h=L.slice(2).join("]]");break}else if(L.length===2)u+=`[[${L[0]}]]${L[1]}`;else{u+=`[[${S}`;break}}if(u=Ks(u,r,e,t),!$){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=ei(u,r,e,t));let E=zt;x||(v===6?(u&&(u=ri(u,r,e,!0)),E=Mt):v===14&&(E=sn)),u===void 0&&g&&(u=""),s+=`\0${e.length}l\x7F${h}`,new E(p,u,r,e,g)}return s}});var no={};le(no,{parseMagicLinks:()=>Ma});var ro,Zs,eo,to,Ma,io=y(()=>{"use strict";J();Qr();ro=String.raw`[${ke}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Zs=`(?:${ro})+`,eo=`(?:${ro}|-)`,to=String.raw`(?:RFC|PMID)${Zs}\d+\b|ISBN${Zs}(?:97[89]${eo}?)?(?:\d${eo}?){9}[\dx]\b`,Ma=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ee}${Le})|${to})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ee}${Le})|${to})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,p=d.exec(s);if(p){let g=1;p[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,p.index))&&(g=2),o=s.slice(p.index+g)+o,s=s.slice(0,p.index+g)}return o.length>=i.length?t:(new je(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new je(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var so,oo=y(()=>{"use strict";so=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var on,ao=y(()=>{"use strict";Jn();on=class extends Qt{get type(){return"list"}}});var lo={};le(lo,{parseList:()=>Da});var Da,go=y(()=>{"use strict";oo();ao();Yn();Da=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),d=so(l,r.lastPrefix),p=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=p[0].startsWith(";"),u=p.length-(g?0:1);if(d>1){let R=o.slice(0,d-1);g?p.unshift(R):p[0]=R+p[0]}r.lastPrefix=l;let h=s+p.map((R,B)=>`\0${t.length+B}d\x7F`).join("")+a.slice(i.length);for(let R of p)new on(R,e,t);if(!u)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,x=m,v=x.exec(h),C=0,E=!1,$=!1,S=0,L=(R,B)=>(new Kt(R,e,t),`${h.slice(0,B)}\0${t.length-1}d\x7F${h.slice(B+R.length)}`),M=R=>{R?C&&C--:C++};for(;v&&u;){let{0:R,index:B}=v;if(R==="-{"){if(!S){let{lastIndex:O}=x;x=/-\{|\}-/gu,x.lastIndex=O}S++}else if(R==="}-"){if(S--,!S){let{lastIndex:O}=x;x=m,x.lastIndex=O}}else if(R.endsWith("x\x7F")){let{name:O,closing:Q,selfClosing:me}=t[Number(R.slice(1,-2))];(!me||f.includes(O))&&M(Q)}else if(R.endsWith("q\x7F")){let{bold:O,italic:Q}=t[Number(R.slice(1,-2))];O&&(M(E),E=!E),Q&&(M($),$=!$)}else if(C===0){if(R.length>=u)return L(R.slice(0,u),B);u-=R.length,x.lastIndex=B+4+String(t.length).length,h=L(R,B)}v=x.exec(h)}return h}});var po,_e,an,uo=y(()=>{"use strict";q();X();j();Re();po=new Set(["A","T","R","D","-","H","N"]),an=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,_e);this.append(...e.map(i=>new W(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){b(this,_e,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,_e).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,_e).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,_e).filter(g=>po.has(g))),o=c(this,_e).filter(g=>!g).length,l=c(this,_e).length-i.size-o,d=super.lint(e,t);if(n.size===l||s.size===l)return d;let p=new P(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],h=u.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let f=w(u,p,"no-ignored","invalid conversion flag");n.size===0&&po.has(h.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:h.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};_e=new WeakMap});var Jt,co=y(()=>{"use strict";_();j();Re();Jt=class extends k{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=A.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new W(o,"converter-rule-variant",t,n)),super.insertAt(new W(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new W(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new W(r,"converter-rule-to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var ln,ho=y(()=>{"use strict";J();j();uo();co();ln=class extends k{get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.insertAt(new an(r,t,n));let[i]=e,s=i.includes(":"),o=new Jt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new Jt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Jt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${fe(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Fe(e,{sep:";"})}}-</span>`}}});var mo={};le(mo,{parseConverter:()=>za});var za,fo=y(()=>{"use strict";ho();za=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:d,index:p}=o;if(d==="}-"){let g=i.pop(),{length:u}=e,h=a.slice(g.index+2,p),f=h.indexOf("|"),[m,x]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],v=x.replace(/(&[#a-z\d]+);/giu,"$1"),C=v.split(r.regexConverter).map(E=>E.replace(/\x01/gu,";"));new ln(m,C,r,e),a=`${a.slice(0,g.index)}\0${u}v\x7F${a.slice(p+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(u).length}else i.push(o),s=n,s.lastIndex=p+2;o=s.exec(a)}return a}});var dn={};le(dn,{Token:()=>k});var wr,he,D,G,ut,Yt,Cr,z,xo,bo,To,yo,ko,vo,Ao,So,wo,Co,$o,Io,ii,k,j=y(()=>{"use strict";J();q();ce();_();Ci();Ni();ii=class ii extends Lr{constructor(e,t=A.getConfig(),n=[],i){super();T(this,z);T(this,wr,"plain");T(this,he,0);T(this,D);T(this,G);T(this,ut);T(this,Yt,!1);T(this,Cr);typeof e=="string"&&this.insertAt(e),b(this,D,t),b(this,G,n),n.push(this)}get type(){return c(this,wr)}set type(e){b(this,wr,e)}parseOnce(e=c(this,he),t=!1,n){if(e<c(this,he)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,he)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,G).pop();let i=N(this,z,xo).call(this);t&&(t=!i)}b(this,ut,t),N(this,z,bo).call(this,t);break;case 1:N(this,z,To).call(this);break;case 2:N(this,z,yo).call(this);break;case 3:N(this,z,ko).call(this);break;case 4:N(this,z,vo).call(this);break;case 5:N(this,z,Ao).call(this,n);break;case 6:N(this,z,So).call(this,n);break;case 7:N(this,z,wo).call(this);break;case 8:N(this,z,Co).call(this);break;case 9:N(this,z,$o).call(this);break;case 10:N(this,z,Io).call(this)}if(this.type==="root")for(let i of c(this,G))i==null||i.parseOnce(e,t,n);return Nr(this,he)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new gr(i);if(isNaN(i.slice(-1)))return c(this,G)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?fe(n):n}build(){b(this,he,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(dr(this,0,1,this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of c(this,G))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,G))e==null||e.afterBuild();b(this,Yt,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,he)<e;)this.parseOnce(c(this,he),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ii;case"config":return c(this,D);case"include":return(t=c(this,ut))!=null?t:!!c(this.getRootNode(),ut);case"accum":return c(this,G);case"built":return c(this,Yt);case"stage":return c(this,he);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,he)===0&&this.type==="root"&&c(this,G).shift(),b(this,he,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new gr(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n){return A.normalizeTitle(e,t,c(this,ut),c(this,D),n)}lint(e=this.getAbsoluteIndex(),t){var i;let n=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let u of this.querySelectorAll(o)){let h;if(u.type==="category")h=u.name;else{let f=u.getValue();f&&f!==!0&&(h=`#${f}`)}if(h){let f=s.get(h);f?f.add(u):s.set(h,new Set([u]))}}for(let[u,h]of s)if(h.size>1&&!u.startsWith("#mw-customcollapsible-")){let f=!u.startsWith("#"),m=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";n.push(...[...h].map(v=>{let C=F(v,{start:v.getAbsoluteIndex()},"no-duplicate",m,x);return f&&(C.suggestions=[{desc:"remove",range:[C.startIndex,C.endIndex],text:""}]),C}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,d=this.toString(),p=[],g=l.exec(d);for(;g;){let{1:u,index:h}=g,f=(i=g[2])==null?void 0:i.trim();p.push({line:this.posFromIndex(h).top+(u==="disable-line"?0:1),from:u==="disable"?l.lastIndex:void 0,to:u==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(m=>m.trim())):void 0}),g=l.exec(d)}n=n.filter(({rule:u,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:x,from:v,to:C,rules:E}of p){if(x>h+1)break;if(E&&!E.has(u))continue;if(x===h&&v===void 0&&C===void 0)return!1;v<=f&&v>m.pos?(m.pos=v,m.type="from"):C<=f&&C>m.pos&&(m.pos=C,m.type="to")}return m.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):ve(c(this,Cr),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,Yt)&&b(this,Cr,n)})}};wr=new WeakMap,he=new WeakMap,D=new WeakMap,G=new WeakMap,ut=new WeakMap,Yt=new WeakMap,Cr=new WeakMap,z=new WeakSet,xo=function(){let{parseRedirect:e}=(ji(),K(Pi)),t=this.firstChild.toString(),n=e(t,c(this,D),c(this,G));return n&&this.setText(n),!!n},bo=function(e){let{parseCommentAndExt:t}=(mr(),K(Ls));this.setText(t(this.firstChild.toString(),c(this,D),c(this,G),e))},To=function(){let{parseBraces:e}=(Gr(),K(us)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,D),c(this,G));this.setText(this.type==="root"?n:n.slice(1))},yo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(js(),K(Ps));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},ko=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Ms(),K(_s));this.setText(e(this,c(this,D),c(this,G)))},vo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Us(),K(Gs));this.setText(e(this,c(this,D),c(this,G)))},Ao=function(e){let{parseLinks:t}=(Ys(),K(Js));this.setText(t(this.firstChild.toString(),c(this,D),c(this,G),e))},So=function(e){var i;if((i=c(this,D).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(ti(),K(Vs)),n=this.firstChild.toString().split(`
32
+ `);for(let s=0;s<n.length;s++)n[s]=t(n[s],c(this,D),c(this,G),e);this.setText(n.join(`
33
+ `))},wo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ni(),K(Xs));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},Co=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(io(),K(no));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},$o=function(){var d;if((d=c(this,D).excludes)!=null&&d.includes("list"))return;let{parseList:e}=(go(),K(lo)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
34
+ `),o={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,D),c(this,G));this.setText(s.join(`
35
+ `))},Io=function(){if(c(this,D).variants.length>0){let{parseConverter:e}=(fo(),K(mo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))}};k=ii});var de,qt,dr,Rr,ce=y(()=>{"use strict";de={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(j(),K(dn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},qt=a=>r=>r.type===a,dr=(a,r,e,t=[])=>{var s,o;let n=a.getChildNodes(),i;n.length===e?(i=n,n=t):i=n.splice(r,e,...t);for(let l=0;l<t.length;l++){let d=t[l];d.setAttribute("parentNode",a),d.setAttribute("nextSibling",n[r+l+1]),d.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(o=n[r+t.length])==null||o.setAttribute("previousSibling",n[r+t.length-1]),n===t&&a.setAttribute("childNodes",n),i},Rr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var No={};le(No,{Title:()=>si});var $r,Ir,ct,Zt,ht,si,Eo=y(()=>{"use strict";J();si=class{constructor(r,e,t,{temporary:n,decode:i,selfLink:s}={}){T(this,$r);T(this,Ir);T(this,ct);T(this,Zt);T(this,ht);se(this,"valid");se(this,"encoded",!1);let o=r.trim().startsWith("../");if(i&&r.includes("%"))try{let d=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=De(r),this.encoded=d}catch(d){}if(r=Ye(r).replace(/[_ ]+/gu," ").trim(),o)b(this,Zt,0);else{let d=e;r.startsWith(":")&&(d=0,r=r.slice(1).trim());let p=r.split(":");if(p.length>1){let g=p[0].trim().toLowerCase(),u=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];u&&(d=u,r=p.slice(1).join(":").trim())}b(this,Zt,d)}let l=r.indexOf("#");if(l!==-1){let d=r.slice(l).trim().slice(1);if(d.includes("%"))try{d=De(d)}catch(p){}b(this,ht,d.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,ht)!==void 0)&&Ye(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,b(this,Ir,t.namespaces),b(this,ct,t.articlePath||"/wiki/$1"),c(this,ct).includes("$1")||b(this,ct,c(this,ct)+`${c(this,ct).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Zt)}get fragment(){return c(this,ht)}get main(){return c(this,$r)}set main(r){r=r.replace(/_/gu," ").trim(),b(this,$r,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,Ir)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){b(this,ht,r)}getUrl(r){}};$r=new WeakMap,Ir=new WeakMap,ct=new WeakMap,Zt=new WeakMap,ht=new WeakMap});var mt,Lo,Wa,A,_=y(()=>{xi();ce();vi();J();mt={config:cn,i18n:void 0,rules:fi,getConfig(a){let r=a!=null?a:this.config,{doubleUnderscore:e}=r;for(let t=0;t<2;t++)e.length>t+2&&e[t].length===0&&(e[t]=Object.keys(e[t+2]));return{...cn,...r,excludes:[]}},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=mt.getConfig(),n){let{Title:i}=(Eo(),K(No)),s;if(n!=null&&n.halfParsed)s=new i(a,r,t,n);else{let{Token:o}=(j(),K(dn));s=de.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let d=new i(l.toString(),r,t,n);for(let p of["main","fragment"]){let g=d[p];if(g!=null&&g.includes("\0")){let u=l.buildFromStr(g,1);p==="main"?d.main=u:d.setFragment(u)}}return d})}return s},parse(a,r,e=11,t=mt.getConfig()){a=Ti(a);let n;typeof e!="number"&&(n=Array.isArray(e)?e:[e],e=Math.max(...n.map(o=>mi[o]||11)));let{Token:i}=(j(),K(dn));return de.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,r)})},async partialParse(a,r,e,t=mt.getConfig()){},createLanguageService(a){}},Lo={},Wa=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in mt)Wa.has(a)||(Lo[a]={enumerable:!1});Object.defineProperties(mt,Lo);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:mt});A=mt});_();})();
35
36
  //# sourceMappingURL=bundle.min.js.map