wikiparser-node 1.26.0 → 1.27.1

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,29 +1,29 @@
1
- "use strict";(()=>{var Ha=Object.defineProperty;var fr=t=>{throw TypeError(t)};var Ga=(t,e,s)=>e in t?Ha(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var Va=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var lt=(t,e,s)=>Ga(t,typeof e!="symbol"?e+"":e,s),He=(t,e,s)=>e.has(t)||fr("Cannot "+s);var p=(t,e,s)=>(He(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?fr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),C=(t,e,s,r)=>(He(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),E=(t,e,s)=>(He(t,e,"access private method"),s);var mr=(t,e,s,r)=>({set _(i){C(t,e,i,s)},get _(){return p(t,e,r)}});var Xl=Va((Kl,Ma)=>{var Qa=Object.create,qt=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Qs=Object.getOwnPropertyNames,Xa=Object.prototype.hasOwnProperty,Ki=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Wt=t=>{throw TypeError(t)},Yi=(t,e,s)=>e in t?qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,vr=(t,e)=>qt(t,"name",{value:e,configurable:!0}),m=(t,e)=>function(){return t&&(e=(0,t[Qs(t)[0]])(t=0)),e},Ja=(t,e)=>function(){return e||(0,t[Qs(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e)=>{for(var s in e)qt(t,s,{get:e[s],enumerable:!0})},Ka=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qs(e))!Xa.call(t,i)&&i!==s&&qt(t,i,{get:()=>e[i],enumerable:!(r=Ji(e,i))||r.enumerable});return t},R=t=>Ka(qt({},"__esModule",{value:!0}),t),q=t=>{var e;return[,,,Qa((e=t==null?void 0:t[Ki("metadata")])!=null?e:null)]},Zi=["class","method","getter","setter","accessor","field","value","get","set"],Kt=t=>t!==void 0&&typeof t!="function"?Wt("Function expected"):t,Ya=(t,e,s,r,i)=>({kind:Zi[t],name:e,metadata:r,addInitializer:n=>s._?Wt("Already initialized"):i.push(Kt(n||null))}),Xs=(t,e)=>Yi(e,Ki("metadata"),t[3]),O=(t,e,s,r)=>{for(var i=0,n=t[e>>1],a=n&&n.length;i<a;i++)e&1?n[i].call(s):r=n[i].call(s,r);return r},B=(t,e,s,r,i,n)=>{var a,l,o,d,h,u=e&7,x=!!(e&8),c=!!(e&16),g=u>3?t.length+1:u?x?1:2:0,v=Zi[u+5],A=u>3&&(t[g-1]=[]),_=t[g]||(t[g]=[]),S=u&&(!c&&!x&&(i=i.prototype),u<5&&(u>3||!c)&&Ji(u<4?i:{get[s](){return D(this,n)},set[s](w){return Y(this,n,w)}},s));u?c&&u<4&&vr(n,(u>2?"set ":u>1?"get ":"")+s):vr(i,s);for(var T=r.length-1;T>=0;T--)d=Ya(u,s,o={},t[3],_),u&&(d.static=x,d.private=c,h=d.access={has:c?w=>tl(i,w):w=>s in w},u^3&&(h.get=c?w=>(u^1?D:Bs)(w,i,u^4?n:S.get):w=>w[s]),u>2&&(h.set=c?(w,N)=>Y(w,i,N,u^4?n:S.set):(w,N)=>w[s]=N)),l=(0,r[T])(u?u<4?c?n:S[v]:u>4?void 0:{get:S.get,set:S.set}:i,d),o._=1,u^4||l===void 0?Kt(l)&&(u>4?A.unshift(l):u?c?n=l:S[v]=l:i=l):typeof l!="object"||l===null?Wt("Object expected"):(Kt(a=l.get)&&(S.get=a),Kt(a=l.set)&&(S.set=a),Kt(a=l.init)&&A.unshift(a));return u||Xs(t,i),S&&qt(i,s,S),c?u^4?n:S:i},Za=(t,e,s)=>Yi(t,typeof e!="symbol"?e+"":e,s),Js=(t,e,s)=>e.has(t)||Wt("Cannot "+s),tl=(t,e)=>Object(e)!==e?Wt('Cannot use the "in" operator on this value'):t.has(e),D=(t,e,s)=>(Js(t,e,"read from private field"),s?s.call(t):e.get(t)),gt=(t,e,s)=>e.has(t)?Wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),Y=(t,e,s,r)=>(Js(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),Bs=(t,e,s)=>(Js(t,e,"access private method"),s),el=(t,e,s,r)=>({set _(i){Y(t,e,i,s)},get _(){return D(t,e,r)}});function Z(t,e,s){return s===1?t.replace(/\0(\d+)g\x7F/gu,(r,i)=>Z(String(e[i]),e,2)):s===2?t.replace(/\0(\d+)n\x7F/gu,(r,i)=>String(e[i])):t.replace(/\0(\d+)\x7F/gu,(r,i)=>e[i])}var _t,Ge,de,pe,Ot,It,tn,J,yt,br,wr,qs,en,_r,Ar,ce,Bt,G=m({"util/string.ts"(){"use strict";_t=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ge=String.raw`[^[\]<>"\0-\x1F\x7F${_t}\uFFFD]`,de=String.raw`(?:\[[\da-f:.]+\]|${Ge})`,pe=String.raw`(?:${Ge}|\0\d+[cn!~]\x7F)*`,Ot=t=>t.trim().toLowerCase(),It=(t,e)=>s=>s.replace(t,e),tn=It(/[\0\x7F]|\r$/gmu,""),J=It(/\0\d+[cn]\x7F/gu,""),yt=(t,e="")=>t.map(s=>typeof s=="string"?s:s.text()).join(e),br={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},wr=It(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(t,e,s)=>e?String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e)):br[s.toLowerCase()]),qs=t=>wr(t),en=It(/&#(\d+|x[\da-f]+);/giu,(t,e)=>String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e))),_r={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ar=t=>It(t,e=>`&${_r[e]};`),ce=Ar(/[&<>]/gu),Bt=(t,e={})=>{const{pre:s="",post:r="",sep:i=""}=e;return s+t.map(n=>n.print()).join(i)+r}}}),sl=Ja({"config/minimum.json"(t,e){e.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","#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","#translation":"translation","#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","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#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:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),it,Ws,St=m({"util/constants.ts"(){"use strict";it=11,Ws=sl()}});function ue(t){const e=new Map,s=new WeakMap;return r=>{const i=typeof r=="string"?e:s;if(i.has(r)){const a=i.get(r);return a.lastIndex=0,a}const n=t(r);return i.set(r,n),n}}var Le,sn,xe=m({"../common/dist/index.mjs"(){"use strict";Le=t=>decodeURIComponent(t.replace(/%(?![\da-f]{2})/giu,"%25")),sn=ue}}),yr,Sr,ke,At,rn,fe=m({"util/lint.ts"(){"use strict";ut(),Q(),yr=new Set(["tr","td","th","caption"]),Sr=new Set(["Template:!!","Template:!-"]),ke=t=>{const e=t.childNodes.find(s=>s.text().trim());if(!e||e.type==="text"&&e.data.trim().startsWith("!")||e.is("magic-word")&&e.name==="!"||e.is("template")&&Sr.has(e.name)||e.is("html")&&yr.has(e.name))return!1;if(e.is("arg"))return e.length>1&&ke(e.childNodes[1]);if(e.is("magic-word"))try{const s=e.getPossibleValues().map(ke);return s.includes(2)?2:s.includes(1)&&1}catch{}return e.is("template")||e.is("magic-word")&&e.name==="invoke"?1:2},At=(t,e,s,r)=>{if(t&&(r||U.viewOnly&&t[0]===tt.rev))return t[1];const i=e();return(r||U.viewOnly)&&s([tt.rev,i]),i},rn=(t,e)=>t==="ol"&&e==="type"?["1","a","A","i","I"]:t==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[]}}),Tr,Ks,nn=m({"parser/selector.ts"(){"use strict";Tr=(t,e,s)=>{if(t.includes("#")){const r=t.indexOf("#");return(r===0||t.slice(0,r)===e)&&t.slice(r+1)===s}return!t||t===e},Ks=(t,e,s)=>{const r=t.split(",");return({type:i,name:n})=>r.some(a=>Tr(a.trim(),i,n))}}}),je,Ys=m({"mixin/cached.ts"(){"use strict";fe(),je=(t=!0)=>e=>{const s=new WeakMap;return function(...r){return At(s.get(this),()=>e.apply(this,r),i=>{s.set(this,i)},t)}}}}),an,rl=m({"mixin/nodeLike.ts"(){"use strict";an=t=>{class e extends t{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return e}}}),$r,kr,be,Dt,zt,we,Ht,Gt,Vt,bt,ln=m({"lib/node.ts"(){"use strict";fe(),ut(),Ys(),rl(),Q(),kr=[an],$r=[je(!1)],bt=class{constructor(){O(Vt,5,this),Za(this,"childNodes",[]),gt(this,be),gt(this,Dt),gt(this,zt),gt(this,we),gt(this,Ht),gt(this,Gt,{})}get parentNode(){return D(this,be)}get nextSibling(){return D(this,Dt)}get previousSibling(){return D(this,zt)}getChildNodes(){const{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":Y(this,be,e),e||(Y(this,Dt,void 0),Y(this,zt,void 0));break;case"nextSibling":Y(this,Dt,e);break;case"previousSibling":Y(this,zt,e);break;case"aIndex":U.viewOnly&&Y(this,Ht,[tt.rev,e]);break;default:this[t]=e}}getRootNode(){return At(D(this,we),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{const[,e]=t;e.type==="root"&&Y(this,we,t)})}indexFromPos(t,e){this.lspError("AstNode.indexFromPos")}posFromIndex(t){const{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){const s=this.getLines(),r=s.findIndex(([,,i])=>t<=i);return{top:r,left:t-s[r][1]}}}getDimension(){const t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){const{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return At(D(this,Gt)[t],()=>{const{childNodes:e}=this,s=t+(t<0?e.length:0);let r=this.getAttribute("padding");for(let i=0;i<s;i++)U.viewOnly&&(D(this,Gt)[i]=[tt.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{D(this,Gt)[t]=e})}getAbsoluteIndex(){return At(D(this,Ht),()=>{const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{Y(this,Ht,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){const t=[];let e=0;for(const s of String(this).split(`
2
- `)){const r=e+s.length;t.push([s,e,r]),e=r+1}return t}seal(t,e){const s=!e&&!!this[t];Object.defineProperty(this,t,{enumerable:s,configurable:!0})}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}},Vt=q(null),be=new WeakMap,Dt=new WeakMap,zt=new WeakMap,we=new WeakMap,Ht=new WeakMap,Gt=new WeakMap,B(Vt,1,"getLines",$r,bt),bt=B(Vt,0,"AstNode",kr,bt),O(Vt,1,bt)}}),on,il=m({"mixin/elementLike.ts"(){"use strict";nn(),on=t=>{var s,Ms;class e extends t{constructor(){super(...arguments);k(this,s)}getElementBy(a){for(const l of this.childNodes){if(l.type==="text")continue;if(a(l))return l;const o=l.getElementBy(a);if(o)return o}}querySelector(a){return this.getElementBy(E(this,s,Ms).call(this,a))}getElementsBy(a,l=[]){for(const o of this.childNodes)o.type!=="text"&&(a(o)&&l.push(o),o.getElementsBy(a,l));return l}querySelectorAll(a){return this.getElementsBy(E(this,s,Ms).call(this,a))}escape(){}}return s=new WeakSet,Ms=function(a){return Ks(a,this)},e}}}),Cr,Ve,Ir,Yt,nl=m({"lib/element.ts"(){"use strict";G(),ut(),nn(),ln(),il(),Cr=[on],Yt=class extends(Ir=bt){get length(){return this.childNodes.length}text(t){return yt(this.childNodes,t)}normalize(){const t=this.getChildNodes(),e=s=>{var r,i;t.splice(s,1),(r=t[s-1])==null||r.setAttribute("nextSibling",t[s]),(i=t[s])==null||i.setAttribute("previousSibling",t[s-1])};for(let s=t.length-1;s>=0;s--){const{type:r,data:i}=t[s];r!=="text"||t.length===1||this.getGaps(s-(s&&1))||i===""&&e(s)}this.setAttribute("childNodes",t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return gr(this,e,0,[t]),t}closest(t){const e=Ks(t,this);let{parentNode:s}=this;for(;s;){if(e(s))return s;({parentNode:s}=s)}}append(...t){this.safeAppend(t)}safeAppend(t){for(const e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;const s=this.childNodes[e],{data:r}=s;return s.replaceData(t),r}toString(t,e=""){return this.childNodes.map(s=>s.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){}print(t={}){const e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+Bt(this.childNodes,t)+(e===""?"":"</span>"):""}json(t,e=this.getAbsoluteIndex()){this.lspError("AstElement.json")}},Ve=q(Ir),Yt=B(Ve,0,"AstElement",Cr,Yt),O(Ve,1,Yt)}}),Us,al=m({"lib/text.ts"(){"use strict";var t,hn,s;G(),ln(),Us=(s=class extends bt{constructor(i){super();k(this,t);lt(this,"data","");this.data=i}get type(){return"text"}toString(i){var n;return i&&!((n=this.parentNode)!=null&&n.getAttribute("built"))?J(this.data):this.data}text(){return this.data}lint(i=this.getAbsoluteIndex(),n){}replaceData(i){E(this,t,hn).call(this,i)}splitText(i){this.lspError("AstText.splitText")}escape(){}print(){return ce(this.data)}},t=new WeakSet,hn=function(i){this.setAttribute("data",i)},s)}}),Tt,Mt=m({"mixin/hidden.ts"(){"use strict";Tt=(t=!0,e=!0)=>s=>{class r extends s{text(){return""}lint(n){}}return r}}}),at,ot=m({"mixin/noEscape.ts"(){"use strict";at=t=>{}}}),$t,Ut=m({"src/syntax.ts"(){"use strict";var t,e;F(),$t=(e=class extends I{constructor(r,i,n,a,l){super(r,n,a,l);k(this,t);C(this,t,i)}get type(){return p(this,t)}lint(r=this.getAbsoluteIndex()){}},t=new WeakMap,e)}}),ht,ft=m({"mixin/padded.ts"(){"use strict";ht=({length:t})=>e=>{class s extends e{getAttribute(i){return i==="padding"?t:super.getAttribute(i)}}return s}}}),V,mt=m({"src/atom.ts"(){"use strict";var t,e;F(),V=(e=class extends I{constructor(r,i,n,a,l){super(r,n,a,l);k(this,t);C(this,t,i)}get type(){return p(this,t)}set type(r){C(this,t,r)}getAttribute(r){var i;return r==="invalid"?this.type==="converter-flag"&&!!((i=this.parentNode)!=null&&i.isInvalidFlag(this)):super.getAttribute(r)}},t=new WeakMap,e)}}),Nr,Qe,Fr,xt,Re=m({"src/link/base.ts"(){"use strict";var t,e,s,r;St(),ft(),ot(),F(),mt(),Nr=[at,ht("[[")],xt=(r=class extends(Fr=I){constructor(n,a,l,o=[],d="|"){super(void 0,l,o,{});k(this,t,!0);k(this,e);k(this,s);if(this.insertAt(new V(n,"link-target",l,o,{})),a!==void 0){const h=new I(a,l,o,{});h.type="link-text",h.setAttribute("stage",it-1),this.insertAt(h)}C(this,e,d)}get link(){}get fragment(){}afterBuild(){C(this,s,this.getTitle()),p(this,e).includes("\0")&&C(this,e,this.buildFromStr(p(this,e),0)),this.setAttribute("name",p(this,s).title),super.afterBuild()}setAttribute(n,a){n==="bracket"?C(this,t,a):n==="title"?C(this,s,a):super.setAttribute(n,a)}toString(n){const a=super.toString(n,p(this,e));return p(this,t)?`[[${a}]]`:a}text(){const n=super.text("|");return p(this,t)?`[[${n}]]`:n}getAttribute(n){return n==="title"?p(this,s):super.getAttribute(n)}getGaps(n){return n===0?p(this,e).length:1}lint(n=this.getAbsoluteIndex(),a){}getTitle(n,a){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:a,temporary:n,decode:!0,selfLink:!0})}print(){return super.print(p(this,t)?{pre:"[[",post:"]]",sep:p(this,e)}:{sep:p(this,e)})}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r),Qe=q(Fr),xt=B(Qe,0,"LinkBaseToken",Nr,xt),O(Qe,1,xt)}}),Lr,Xe,Er,nt,kt=m({"src/nowiki/base.ts"(){"use strict";ot(),F(),Lr=[at],nt=class extends(Er=I){get innerText(){return this.firstChild.data}constructor(t="",e,s){super(t,e,s)}},Xe=q(Er),nt=B(Xe,0,"NowikiBaseToken",Lr,nt),O(Xe,1,nt)}}),Pr,Je,jr,z,vt=m({"src/nowiki/noinclude.ts"(){"use strict";Mt(),kt(),Pr=[Tt()],z=class extends(jr=nt){get type(){return"noinclude"}toString(t){return t?"":super.toString()}},Je=q(jr),z=B(Je,0,"NoincludeToken",Pr,z),O(Je,1,z)}}),un,ll=m({"src/link/redirectTarget.ts"(){"use strict";Re(),vt(),un=class extends xt{get type(){return"redirect-target"}constructor(t,e,s,r){super(t,void 0,s,r),e!==void 0&&this.insertAt(new z(e,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(t=this.getAbsoluteIndex()){}}}}),Rr,Ke,Or,Zt,ol=m({"src/redirect.ts"(){"use strict";var t,e,s;Mt(),ot(),F(),Ut(),ll(),Rr=[Tt(!1,!1),at],Zt=(s=class extends(Or=I){constructor(i,n,a,l,o,d,h=[]){super(void 0,d,h);k(this,t);k(this,e);C(this,t,i),C(this,e,o),this.append(new $t(n,"redirect-syntax",d,h),new un(a,l==null?void 0:l.slice(1),d,h))}get type(){return"redirect"}getAttribute(i){return i==="padding"?p(this,t).length:super.getAttribute(i)}toString(i){return p(this,t)+super.toString(i)+p(this,e)}lint(i=this.getAbsoluteIndex()){}print(){return super.print({pre:p(this,t),post:p(this,e)})}},t=new WeakMap,e=new WeakMap,s),Ke=q(Or),Zt=B(Ke,0,"RedirectToken",Rr,Zt),O(Ke,1,Zt)}}),dn={};M(dn,{parseRedirect:()=>pn});var pn,hl=m({"parser/redirect.ts"(){"use strict";Q(),ol(),pn=(t,e,s)=>{var i;(i=e.regexRedirect)!=null||(e.regexRedirect=new RegExp(String.raw`^(\s*)((?:${e.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=e.regexRedirect.exec(t);return r&&U.normalizeTitle(r[3],0,!1,e,{halfParsed:!0,temporary:!0,decode:!0}).valid?(t=`\0${s.length}o${t.slice(r[0].length)}`,new Zt(...r.slice(1),e,s),t):!1}}}),Br,Ye,qr,te,ul=m({"src/onlyinclude.ts"(){"use strict";ft(),ot(),F(),Br=[at,ht("<onlyinclude>")],te=class extends(qr=I){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}},Ye=q(qr),te=B(Ye,0,"OnlyincludeToken",Br,te),O(Ye,1,te)}}),me,Oe=m({"mixin/gapped.ts"(){"use strict";me=(t=1)=>e=>{class s extends e{getGaps(){return t}}return s}}}),Wr,Ze,Mr,wt,Zs=m({"src/tagPair/index.ts"(){"use strict";var t,e;Oe(),ot(),F(),Wr=[me(),at],wt=(e=class extends(Mr=I){constructor(r,i,n,a,l,o=[]){super(void 0,l);k(this,t);lt(this,"closed");lt(this,"selfClosing");this.setAttribute("name",r.toLowerCase()),C(this,t,[r,a||r]),this.closed=a!=="",this.selfClosing=a===void 0,this.append(i,n);const d=typeof i=="string"?-1:o.indexOf(i);o.splice(d===-1?1/0:d,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(r){const{selfClosing:i,firstChild:n,lastChild:a}=this,[l,o]=p(this,t);return i?`<${l}${n.toString(r)}/>`:`<${l}${n.toString(r)}>${a.toString(r)}${this.closed?`</${o}>`:""}`}text(){const[r,i]=p(this,t);return this.selfClosing?`<${r}${this.firstChild.text()}/>`:`<${r}${super.text(">")}${this.closed?`</${i}>`:""}`}getAttribute(r){return r==="padding"?p(this,t)[0].length+1:super.getAttribute(r)}print(){const[r,i]=p(this,t);return super.print(this.selfClosing?{pre:`&lt;${r}`,post:"/&gt;"}:{pre:`&lt;${r}`,sep:"&gt;",post:this.closed?`&lt;/${i}&gt;`:""})}},t=new WeakMap,e),Ze=q(Mr),wt=B(Ze,0,"TagPairToken",Wr,wt),O(Ze,1,wt)}}),cn,dl=m({"src/tagPair/translate.ts"(){"use strict";var t,gn,s;F(),Zs(),Ut(),vt(),cn=(s=class extends wt{constructor(i,n,a,l=[]){const o=new $t(i,"translate-attr",a,l);n=n==null?void 0:n.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(h,u,x,c)=>(new z(u,a,l),new z(c,a,l),`\0${l.length-1}n${x}\0${l.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(h,u,x,c,g)=>(new z(u,a,l),new z(g,a,l),`\0${l.length-1}n${c}\0${l.length}n`));const d=new I(n,a,l);d.type="translate-inner";super("translate",o,d,"translate",a,l);k(this,t);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(i){return i?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${E(this,t,gn).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}},t=new WeakSet,gn=function(){return this.firstChild.toString()===" nowrap"},s)}}),Ur,ts,Dr,ee,pl=m({"src/tagPair/include.ts"(){"use strict";Mt(),Zs(),Ur=[Tt(!1)],ee=class extends(Dr=wt){get type(){return"include"}constructor(t,e="",s,r,i,n){super(t,e,s!=null?s:"",s===void 0||r!=null?r:"",i,n)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},ts=q(Dr),ee=B(ts,0,"IncludeToken",Ur,ee),O(ts,1,ee)}}),Be,tr=m({"mixin/attributesParent.ts"(){"use strict";Be=(t=0)=>e=>{var r,xn;class s extends e{constructor(){super(...arguments);k(this,r)}hasAttr(l){this.lspError("AttributesParent.hasAttr")}getAttr(l){return E(this,r,xn).call(this).getAttr(l)}}return r=new WeakSet,xn=function(){return this.childNodes[t]},s}}}),K,es,ss,rs,zr,is,Qt,Hr,Gr,Vr,_e,ns,st,fn,mn,vn,cl=m({"util/sharable.ts"(){"use strict";K=new Set(["align"]),es=new Set(["cite"]),ss=new Set(["cite","datetime"]),rs=new Set(["width"]),zr=new Set(["axis","align","bgcolor","height","width","valign"]),is=new Set([...zr,"abbr","headers","scope","rowspan","colspan"]),Qt=new Set(["type"]),Hr=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gr=new Set(["clear"]),Vr=new Set(["bgcolor","align","valign"]),_e=new Set(["qid","forcemathmode","type","display"]),ns=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),st=new Set,fn=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"]),mn={div:K,h1:K,h2:K,h3:K,h4:K,h5:K,h6:K,blockquote:es,q:es,p:K,br:Gr,pre:rs,ins:ss,del:ss,ul:Qt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Hr,"border"]),caption:K,tr:Vr,td:is,th:is,font:new Set(["size","color","face"]),hr:rs,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Qt,poem:K,categorytree:K,combooption:K,math:st,chem:st,ce:st,img:new Set(["alt","src","width","height","loading","srcset"])},vn={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:st,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:st,inputbox:st,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:st,poll:new Set(["id","show-results-before-voting"]),sm2:Qt,flashmp3:Qt,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"]),math:new Set([..._e,"chem"]),chem:_e,ce:_e,hiero:st,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ns,syntaxhighlight:ns,templatedata:st,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:st}}}),Qr,Xr,Jr,Kr,Ds,gl=m({"src/attribute.ts"(){"use strict";var t,e,s,r,i,bn,a;fe(),G(),St(),cl(),Q(),F(),mt(),Qr=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Xr=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Jr=new Set(["ext","arg","magic-word","template"]),Kr=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Ds=(a=class extends I{constructor(o,d,h,u="",x,c=[],g=U.getConfig(),v=[]){const A=new V(h,"attr-key",g,v);let _;if(h==="title"||d==="img"&&h==="alt")_=new I(x,g,v,{}),_.type="attr-value",_.setAttribute("stage",it-1);else if(d==="gallery"&&h==="caption"||d==="choose"&&(h==="before"||h==="after")){const S={...g,excludes:[...g.excludes,"heading","html","table","hr","list"]};_=new I(x,S,v,{}),_.type="attr-value",_.setAttribute("stage",1)}else _=new V(x,"attr-value",g,v,{});super(void 0,g,v);k(this,i);k(this,t);k(this,e);k(this,s);k(this,r);C(this,t,o),this.append(A,_),C(this,s,u),C(this,r,[...c]),C(this,e,d),this.setAttribute("name",Ot(J(h)))}get type(){return p(this,t)}get tag(){return p(this,e)}get balanced(){return!p(this,s)||p(this,r)[0]===p(this,r)[1]}afterBuild(){p(this,s).includes("\0")&&C(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&C(this,e,this.parentNode.name),this.setAttribute("name",Ot(this.firstChild.text())),super.afterBuild()}toString(o){const[d="",h=""]=p(this,r);return p(this,s)?super.toString(o,p(this,s)+d)+h:this.firstChild.toString(o)}text(){return p(this,s)?`${super.text(`${p(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var o,d;return p(this,s)?p(this,s).length+((d=(o=p(this,r)[0])==null?void 0:o.length)!=null?d:0):0}lint(o=this.getAbsoluteIndex(),d){}getValue(){return p(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(o){return o==="invalid"?E(this,i,bn).call(this):super.getAttribute(o)}print(){const[o="",d=""]=p(this,r);return p(this,s)?super.print({sep:ce(p(this,s))+o,post:d}):super.print()}json(o,d=this.getAbsoluteIndex()){const h=super.json(void 0,d)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakSet,bn=function(o,d){const{firstChild:h,lastChild:u,type:x,name:c,tag:g,parentNode:v}=this,A=!u.childNodes.some(({type:b})=>Jr.has(b)),_=this.getValue(),S=vn[g],T=mn[g],{length:w}=this.toString();let N="illegal-attr",j,f;if(!(S!=null&&S.has(c))&&!(T!=null&&T.has(c))&&(x==="ext-attr"?S||T:!/\{\{[^{]+\}\}/u.test(c))&&(x==="ext-attr"&&!T||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(g==="meta"||g==="link"||!fn.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(o===void 0)return!0}else if(c==="style"&&typeof _=="string"&&Qr.test(_)){if(o===void 0)return!0}else if(c==="tabindex"&&typeof _=="string"&&_!=="0"){if(o===void 0)return!0}else if(A&&x!=="ext-attr"){const b=rn(g,c),$=String(_).toLowerCase();if(b.length>0&&b.every(y=>y!==$)&&o===void 0)return!0}else if(typeof _=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Kr.has(c))&&Xr.test(_)||A&&(c==="href"||g==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(_))&&o===void 0)return!0;return!1},a)}}),as,Yr,qe,er=m({"src/attributes.ts"(){"use strict";var t,e,zs,r;G(),F(),mt(),gl(),as=i=>i.slice(0,-1),Yr=i=>`${as(i)}-dirty`,qe=(r=class extends I{constructor(n,a,l,o,d=[]){super(void 0,o,d,{});k(this,e);k(this,t);if(C(this,t,a),this.setAttribute("name",l),n){const h=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",x=h.exec(n),c=0;const g=()=>{u&&(super.insertAt(new V(u,Yr(a),o,d,{})),u="")};for(;x;){const{index:v,0:A,1:_,2:S,3:T,4:w,5:N,6:j}=x;if(u+=n.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(J(_).trim())){const f=w!=null?w:j,b=[T,N],$=new Ds(as(a),l,_,S,f,b,o,d);g(),super.insertAt($)}else u+=A;({lastIndex:c}=h),x=h.exec(n)}u+=n.slice(c),g()}}get type(){return p(this,t)}afterBuild(){const{parentNode:n}=this;n!=null&&n.is("td")&&this.setAttribute("name",n.subtype),super.afterBuild()}getAttrTokens(n){return this.childNodes.filter(a=>a instanceof Ds&&(!n||a.name===Ot(n)))}hasAttr(n){return this.getAttrTokens(n).length>0}getAttrToken(n){const a=this.getAttrTokens(n);return a[a.length-1]}getAttr(n){var a;return(a=this.getAttrToken(n))==null?void 0:a.getValue()}lint(n=this.getAbsoluteIndex(),a){}getAttribute(n){return n==="invalid"?E(this,e,zs).call(this):super.getAttribute(n)}print(){return this.toString()?`<span class="wpb-${this.type}${E(this,e,zs).call(this)?" wpb-invalid":""}">${this.childNodes.map(n=>n.print(n instanceof V?{class:n.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},t=new WeakMap,e=new WeakSet,zs=function(){const{parentNode:n}=this;return(n==null?void 0:n.type)==="html"&&n.closing&&this.text().trim()!==""},r)}}),wn={};M(wn,{PreToken:()=>_n});var _n,xl=m({"src/pre.ts"(){"use strict";St(),F(),vt(),_n=class extends I{get type(){return"ext-inner"}constructor(t,e,s=[]){if(t){const r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:n}=r.source;let a=r.exec(t);a&&(i.lastIndex=a.index+n);let l=i.exec(t),o=0,d="";for(;a&&l;)new z(a[0],e,s),new z(l[0],e,s),d+=`${t.slice(o,a.index)}\0${s.length-1}n${t.slice(a.index+n,l.index)}\0${s.length}n`,o=l.index+n+1,r.lastIndex=o,a=r.exec(t),a&&(i.lastIndex=a.index+n),l=i.exec(t);t=d+t.slice(o)}super(t,e,s,{}),this.setAttribute("stage",it-1)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){}}}}),We,sr=m({"mixin/multiLine.ts"(){"use strict";We=t=>{class e extends t{toString(r){return super.toString(r,`
1
+ "use strict";(()=>{var Ha=Object.defineProperty;var fr=t=>{throw TypeError(t)};var Ga=(t,e,s)=>e in t?Ha(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var Va=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var lt=(t,e,s)=>Ga(t,typeof e!="symbol"?e+"":e,s),He=(t,e,s)=>e.has(t)||fr("Cannot "+s);var p=(t,e,s)=>(He(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?fr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),C=(t,e,s,r)=>(He(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),E=(t,e,s)=>(He(t,e,"access private method"),s);var mr=(t,e,s,r)=>({set _(i){C(t,e,i,s)},get _(){return p(t,e,r)}});var Xl=Va((Kl,Ma)=>{var Qa=Object.create,qt=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Qs=Object.getOwnPropertyNames,Xa=Object.prototype.hasOwnProperty,Ki=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Wt=t=>{throw TypeError(t)},Yi=(t,e,s)=>e in t?qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,vr=(t,e)=>qt(t,"name",{value:e,configurable:!0}),m=(t,e)=>function(){return t&&(e=(0,t[Qs(t)[0]])(t=0)),e},Ja=(t,e)=>function(){return e||(0,t[Qs(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e)=>{for(var s in e)qt(t,s,{get:e[s],enumerable:!0})},Ka=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qs(e))!Xa.call(t,i)&&i!==s&&qt(t,i,{get:()=>e[i],enumerable:!(r=Ji(e,i))||r.enumerable});return t},R=t=>Ka(qt({},"__esModule",{value:!0}),t),q=t=>{var e;return[,,,Qa((e=t==null?void 0:t[Ki("metadata")])!=null?e:null)]},Zi=["class","method","getter","setter","accessor","field","value","get","set"],Kt=t=>t!==void 0&&typeof t!="function"?Wt("Function expected"):t,Ya=(t,e,s,r,i)=>({kind:Zi[t],name:e,metadata:r,addInitializer:n=>s._?Wt("Already initialized"):i.push(Kt(n||null))}),Xs=(t,e)=>Yi(e,Ki("metadata"),t[3]),O=(t,e,s,r)=>{for(var i=0,n=t[e>>1],a=n&&n.length;i<a;i++)e&1?n[i].call(s):r=n[i].call(s,r);return r},B=(t,e,s,r,i,n)=>{var a,l,o,d,h,u=e&7,x=!!(e&8),c=!!(e&16),g=u>3?t.length+1:u?x?1:2:0,v=Zi[u+5],_=u>3&&(t[g-1]=[]),A=t[g]||(t[g]=[]),S=u&&(!c&&!x&&(i=i.prototype),u<5&&(u>3||!c)&&Ji(u<4?i:{get[s](){return D(this,n)},set[s](w){return Y(this,n,w)}},s));u?c&&u<4&&vr(n,(u>2?"set ":u>1?"get ":"")+s):vr(i,s);for(var y=r.length-1;y>=0;y--)d=Ya(u,s,o={},t[3],A),u&&(d.static=x,d.private=c,h=d.access={has:c?w=>tl(i,w):w=>s in w},u^3&&(h.get=c?w=>(u^1?D:Bs)(w,i,u^4?n:S.get):w=>w[s]),u>2&&(h.set=c?(w,N)=>Y(w,i,N,u^4?n:S.set):(w,N)=>w[s]=N)),l=(0,r[y])(u?u<4?c?n:S[v]:u>4?void 0:{get:S.get,set:S.set}:i,d),o._=1,u^4||l===void 0?Kt(l)&&(u>4?_.unshift(l):u?c?n=l:S[v]=l:i=l):typeof l!="object"||l===null?Wt("Object expected"):(Kt(a=l.get)&&(S.get=a),Kt(a=l.set)&&(S.set=a),Kt(a=l.init)&&_.unshift(a));return u||Xs(t,i),S&&qt(i,s,S),c?u^4?n:S:i},Za=(t,e,s)=>Yi(t,typeof e!="symbol"?e+"":e,s),Js=(t,e,s)=>e.has(t)||Wt("Cannot "+s),tl=(t,e)=>Object(e)!==e?Wt('Cannot use the "in" operator on this value'):t.has(e),D=(t,e,s)=>(Js(t,e,"read from private field"),s?s.call(t):e.get(t)),gt=(t,e,s)=>e.has(t)?Wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),Y=(t,e,s,r)=>(Js(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),Bs=(t,e,s)=>(Js(t,e,"access private method"),s),el=(t,e,s,r)=>({set _(i){Y(t,e,i,s)},get _(){return D(t,e,r)}});function Z(t,e,s){return s===1?t.replace(/\0(\d+)g\x7F/gu,(r,i)=>Z(String(e[i]),e,2)):s===2?t.replace(/\0(\d+)n\x7F/gu,(r,i)=>String(e[i])):t.replace(/\0(\d+)\x7F/gu,(r,i)=>e[i])}var At,Ge,de,pe,Ot,It,tn,J,St,br,wr,qs,en,_r,Ar,ce,Bt,G=m({"util/string.ts"(){"use strict";At=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ge=String.raw`[^[\]<>"\0-\x1F\x7F${At}\uFFFD]`,de=String.raw`(?:\[[\da-f:.]+\]|${Ge})`,pe=String.raw`(?:${Ge}|\0\d+[cn!~]\x7F)*`,Ot=t=>t.trim().toLowerCase(),It=(t,e)=>s=>s.replace(t,e),tn=It(/[\0\x7F]|\r$/gmu,""),J=It(/\0\d+[cn]\x7F/gu,""),St=(t,e="")=>t.map(s=>typeof s=="string"?s:s.text()).join(e),br={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},wr=It(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(t,e,s)=>e?String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e)):br[s.toLowerCase()]),qs=t=>wr(t),en=It(/&#(\d+|x[\da-f]+);/giu,(t,e)=>String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e))),_r={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ar=t=>It(t,e=>`&${_r[e]};`),ce=Ar(/[&<>]/gu),Bt=(t,e={})=>{const{pre:s="",post:r="",sep:i=""}=e;return s+t.map(n=>n.print()).join(i)+r}}}),sl=Ja({"config/minimum.json"(t,e){e.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","#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","#translation":"translation","#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","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#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:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),tt,Ws,ft=m({"util/constants.ts"(){"use strict";tt=11,Ws=sl()}});function ue(t){const e=new Map,s=new WeakMap;return r=>{const i=typeof r=="string"?e:s;if(i.has(r)){const a=i.get(r);return a.lastIndex=0,a}const n=t(r);return i.set(r,n),n}}var Le,sn,xe=m({"../common/dist/index.mjs"(){"use strict";Le=t=>decodeURIComponent(t.replace(/%(?![\da-f]{2})/giu,"%25")),sn=ue}}),yr,Sr,ke,yt,rn,fe=m({"util/lint.ts"(){"use strict";ut(),Q(),yr=new Set(["tr","td","th","caption"]),Sr=new Set(["Template:!!","Template:!-"]),ke=t=>{const e=t.childNodes.find(s=>s.text().trim());if(!e||e.type==="text"&&e.data.trim().startsWith("!")||e.is("magic-word")&&e.name==="!"||e.is("template")&&Sr.has(e.name)||e.is("html")&&yr.has(e.name))return!1;if(e.is("arg"))return e.length>1&&ke(e.childNodes[1]);if(e.is("magic-word"))try{const s=e.getPossibleValues().map(ke);return s.includes(2)?2:s.includes(1)&&1}catch{}return e.is("template")||e.is("magic-word")&&e.name==="invoke"?1:2},yt=(t,e,s,r)=>{if(t&&(r||U.viewOnly&&t[0]===et.rev))return t[1];const i=e();return(r||U.viewOnly)&&s([et.rev,i]),i},rn=(t,e)=>t==="ol"&&e==="type"?["1","a","A","i","I"]:t==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[]}}),Tr,Ks,nn=m({"parser/selector.ts"(){"use strict";Tr=(t,e,s)=>{if(t.includes("#")){const r=t.indexOf("#");return(r===0||t.slice(0,r)===e)&&t.slice(r+1)===s}return!t||t===e},Ks=(t,e,s)=>{const r=t.split(",");return(({type:i,name:n})=>r.some(a=>Tr(a.trim(),i,n)))}}}),je,Ys=m({"mixin/cached.ts"(){"use strict";fe(),je=(t=!0)=>e=>{const s=new WeakMap;return function(...r){return yt(s.get(this),()=>e.apply(this,r),i=>{s.set(this,i)},t)}}}}),an,rl=m({"mixin/nodeLike.ts"(){"use strict";an=t=>{class e extends t{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return e}}}),$r,kr,be,Dt,zt,we,Ht,Gt,Vt,wt,ln=m({"lib/node.ts"(){"use strict";fe(),ut(),Ys(),rl(),Q(),kr=[an],$r=[je(!1)],wt=class{constructor(){O(Vt,5,this),Za(this,"childNodes",[]),gt(this,be),gt(this,Dt),gt(this,zt),gt(this,we),gt(this,Ht),gt(this,Gt,{})}get parentNode(){return D(this,be)}get nextSibling(){return D(this,Dt)}get previousSibling(){return D(this,zt)}getChildNodes(){const{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":Y(this,be,e),e||(Y(this,Dt,void 0),Y(this,zt,void 0));break;case"nextSibling":Y(this,Dt,e);break;case"previousSibling":Y(this,zt,e);break;case"aIndex":U.viewOnly&&Y(this,Ht,[et.rev,e]);break;default:this[t]=e}}getRootNode(){return yt(D(this,we),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{const[,e]=t;e.type==="root"&&Y(this,we,t)})}indexFromPos(t,e){this.lspError("AstNode.indexFromPos")}posFromIndex(t){const{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){const s=this.getLines(),r=s.findIndex(([,,i])=>t<=i);return{top:r,left:t-s[r][1]}}}getDimension(){const t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){const{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return yt(D(this,Gt)[t],()=>{const{childNodes:e}=this,s=t+(t<0?e.length:0);let r=this.getAttribute("padding");for(let i=0;i<s;i++)U.viewOnly&&(D(this,Gt)[i]=[et.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{D(this,Gt)[t]=e})}getAbsoluteIndex(){return yt(D(this,Ht),()=>{const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{Y(this,Ht,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){const t=[];let e=0;for(const s of String(this).split(`
2
+ `)){const r=e+s.length;t.push([s,e,r]),e=r+1}return t}seal(t,e){const s=!e&&!!this[t];Object.defineProperty(this,t,{enumerable:s,configurable:!0})}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}},Vt=q(null),be=new WeakMap,Dt=new WeakMap,zt=new WeakMap,we=new WeakMap,Ht=new WeakMap,Gt=new WeakMap,B(Vt,1,"getLines",$r,wt),wt=B(Vt,0,"AstNode",kr,wt),O(Vt,1,wt)}}),on,il=m({"mixin/elementLike.ts"(){"use strict";nn(),on=t=>{var s,Ms;class e extends t{constructor(){super(...arguments);k(this,s)}getElementBy(a){for(const l of this.childNodes){if(l.type==="text")continue;if(a(l))return l;const o=l.getElementBy(a);if(o)return o}}querySelector(a){return this.getElementBy(E(this,s,Ms).call(this,a))}getElementsBy(a,l=[]){for(const o of this.childNodes)o.type!=="text"&&(a(o)&&l.push(o),o.getElementsBy(a,l));return l}querySelectorAll(a){return this.getElementsBy(E(this,s,Ms).call(this,a))}escape(){}}return s=new WeakSet,Ms=function(a){return Ks(a,this)},e}}}),Cr,Ve,Ir,Yt,nl=m({"lib/element.ts"(){"use strict";G(),ut(),nn(),ln(),il(),Cr=[on],Yt=class extends(Ir=wt){get length(){return this.childNodes.length}text(t){return St(this.childNodes,t)}normalize(){const t=this.getChildNodes(),e=s=>{var r,i;t.splice(s,1),(r=t[s-1])==null||r.setAttribute("nextSibling",t[s]),(i=t[s])==null||i.setAttribute("previousSibling",t[s-1])};for(let s=t.length-1;s>=0;s--){const{type:r,data:i}=t[s];r!=="text"||t.length===1||this.getGaps(s-(s&&1))||i===""&&e(s)}this.setAttribute("childNodes",t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return gr(this,e,0,[t]),t}closest(t){const e=Ks(t,this);let{parentNode:s}=this;for(;s;){if(e(s))return s;({parentNode:s}=s)}}append(...t){this.safeAppend(t)}safeAppend(t){for(const e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;const s=this.childNodes[e],{data:r}=s;return s.replaceData(t),r}toString(t,e=""){return this.childNodes.map(s=>s.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){}print(t={}){const e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+Bt(this.childNodes,t)+(e===""?"":"</span>"):""}json(t,e=this.getAbsoluteIndex()){this.lspError("AstElement.json")}},Ve=q(Ir),Yt=B(Ve,0,"AstElement",Cr,Yt),O(Ve,1,Yt)}}),Us,al=m({"lib/text.ts"(){"use strict";var t,hn,s;G(),ln(),Us=(s=class extends wt{constructor(i){super();k(this,t);lt(this,"data","");this.data=i}get type(){return"text"}toString(i){var n;return i&&!((n=this.parentNode)!=null&&n.getAttribute("built"))?J(this.data):this.data}text(){return this.data}lint(i=this.getAbsoluteIndex(),n){}replaceData(i){E(this,t,hn).call(this,i)}splitText(i){this.lspError("AstText.splitText")}escape(){}print(){return ce(this.data)}},t=new WeakSet,hn=function(i){this.setAttribute("data",i)},s)}}),Tt,Mt=m({"mixin/hidden.ts"(){"use strict";Tt=(t=!0,e=!0)=>s=>{class r extends s{text(){return""}lint(n){}}return r}}}),at,ot=m({"mixin/noEscape.ts"(){"use strict";at=t=>{}}}),$t,Ut=m({"src/syntax.ts"(){"use strict";var t,e;F(),$t=(e=class extends I{constructor(r,i,n,a,l){super(r,n,a,l);k(this,t);C(this,t,i)}get type(){return p(this,t)}lint(r=this.getAbsoluteIndex()){}},t=new WeakMap,e)}}),ht,mt=m({"mixin/padded.ts"(){"use strict";ht=({length:t})=>e=>{class s extends e{getAttribute(i){return i==="padding"?t:super.getAttribute(i)}}return s}}}),V,vt=m({"src/atom.ts"(){"use strict";var t,e;F(),V=(e=class extends I{constructor(r,i,n,a,l){super(r,n,a,l);k(this,t);C(this,t,i)}get type(){return p(this,t)}set type(r){C(this,t,r)}getAttribute(r){var i;return r==="invalid"?this.type==="converter-flag"&&!!((i=this.parentNode)!=null&&i.isInvalidFlag(this)):super.getAttribute(r)}},t=new WeakMap,e)}}),Nr,Qe,Fr,xt,Re=m({"src/link/base.ts"(){"use strict";var t,e,s,r;ft(),mt(),ot(),F(),vt(),Nr=[at,ht("[[")],xt=(r=class extends(Fr=I){constructor(n,a,l,o=[],d="|"){super(void 0,l,o,{});k(this,t,!0);k(this,e);k(this,s);if(this.insertAt(new V(n,"link-target",l,o,{})),a!==void 0){const h=new I(a,l,o,{});h.type="link-text",h.setAttribute("stage",tt-1),this.insertAt(h)}C(this,e,d)}get link(){}get fragment(){}afterBuild(){C(this,s,this.getTitle()),p(this,e).includes("\0")&&C(this,e,this.buildFromStr(p(this,e),0)),this.setAttribute("name",p(this,s).title),super.afterBuild()}setAttribute(n,a){n==="bracket"?C(this,t,a):n==="title"?C(this,s,a):super.setAttribute(n,a)}toString(n){const a=super.toString(n,p(this,e));return p(this,t)?`[[${a}]]`:a}text(){const n=super.text("|");return p(this,t)?`[[${n}]]`:n}getAttribute(n){return n==="title"?p(this,s):super.getAttribute(n)}getGaps(n){return n===0?p(this,e).length:1}lint(n=this.getAbsoluteIndex(),a){}getTitle(n,a){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:a,temporary:n,decode:!0,selfLink:!0})}print(){return super.print(p(this,t)?{pre:"[[",post:"]]",sep:p(this,e)}:{sep:p(this,e)})}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r),Qe=q(Fr),xt=B(Qe,0,"LinkBaseToken",Nr,xt),O(Qe,1,xt)}}),Lr,Xe,Er,nt,kt=m({"src/nowiki/base.ts"(){"use strict";ot(),F(),Lr=[at],nt=class extends(Er=I){get innerText(){return this.firstChild.data}constructor(t="",e,s){super(t,e,s)}},Xe=q(Er),nt=B(Xe,0,"NowikiBaseToken",Lr,nt),O(Xe,1,nt)}}),Pr,Je,jr,z,bt=m({"src/nowiki/noinclude.ts"(){"use strict";Mt(),kt(),Pr=[Tt()],z=class extends(jr=nt){get type(){return"noinclude"}toString(t){return t?"":super.toString()}},Je=q(jr),z=B(Je,0,"NoincludeToken",Pr,z),O(Je,1,z)}}),un,ll=m({"src/link/redirectTarget.ts"(){"use strict";Re(),bt(),un=class extends xt{get type(){return"redirect-target"}constructor(t,e,s,r){super(t,void 0,s,r),e!==void 0&&this.insertAt(new z(e,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(t=this.getAbsoluteIndex()){}}}}),Rr,Ke,Or,Zt,ol=m({"src/redirect.ts"(){"use strict";var t,e,s;Mt(),ot(),F(),Ut(),ll(),Rr=[Tt(!1,!1),at],Zt=(s=class extends(Or=I){constructor(i,n,a,l,o,d,h=[]){super(void 0,d,h);k(this,t);k(this,e);C(this,t,i),C(this,e,o),this.append(new $t(n,"redirect-syntax",d,h),new un(a,l==null?void 0:l.slice(1),d,h))}get type(){return"redirect"}getAttribute(i){return i==="padding"?p(this,t).length:super.getAttribute(i)}toString(i){return p(this,t)+super.toString(i)+p(this,e)}lint(i=this.getAbsoluteIndex()){}print(){return super.print({pre:p(this,t),post:p(this,e)})}},t=new WeakMap,e=new WeakMap,s),Ke=q(Or),Zt=B(Ke,0,"RedirectToken",Rr,Zt),O(Ke,1,Zt)}}),dn={};M(dn,{parseRedirect:()=>pn});var pn,hl=m({"parser/redirect.ts"(){"use strict";Q(),ol(),pn=(t,e,s)=>{var i;(i=e.regexRedirect)!=null||(e.regexRedirect=new RegExp(String.raw`^(\s*)((?:${e.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=e.regexRedirect.exec(t);return r&&U.normalizeTitle(r[3],0,!1,e,{halfParsed:!0,temporary:!0,decode:!0}).valid?(t=`\0${s.length}o${t.slice(r[0].length)}`,new Zt(...r.slice(1),e,s),t):!1}}}),Br,Ye,qr,te,ul=m({"src/onlyinclude.ts"(){"use strict";mt(),ot(),F(),Br=[at,ht("<onlyinclude>")],te=class extends(qr=I){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}},Ye=q(qr),te=B(Ye,0,"OnlyincludeToken",Br,te),O(Ye,1,te)}}),me,Oe=m({"mixin/gapped.ts"(){"use strict";me=(t=1)=>e=>{class s extends e{getGaps(){return t}}return s}}}),Wr,Ze,Mr,_t,Zs=m({"src/tagPair/index.ts"(){"use strict";var t,e;Oe(),ot(),F(),Wr=[me(),at],_t=(e=class extends(Mr=I){constructor(r,i,n,a,l,o=[]){super(void 0,l);k(this,t);lt(this,"closed");lt(this,"selfClosing");this.setAttribute("name",r.toLowerCase()),C(this,t,[r,a||r]),this.closed=a!=="",this.selfClosing=a===void 0,this.append(i,n);const d=typeof i=="string"?-1:o.indexOf(i);o.splice(d===-1?1/0:d,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(r){const{selfClosing:i,firstChild:n,lastChild:a}=this,[l,o]=p(this,t);return i?`<${l}${n.toString(r)}/>`:`<${l}${n.toString(r)}>${a.toString(r)}${this.closed?`</${o}>`:""}`}text(){const[r,i]=p(this,t);return this.selfClosing?`<${r}${this.firstChild.text()}/>`:`<${r}${super.text(">")}${this.closed?`</${i}>`:""}`}getAttribute(r){return r==="padding"?p(this,t)[0].length+1:super.getAttribute(r)}print(){const[r,i]=p(this,t);return super.print(this.selfClosing?{pre:`&lt;${r}`,post:"/&gt;"}:{pre:`&lt;${r}`,sep:"&gt;",post:this.closed?`&lt;/${i}&gt;`:""})}},t=new WeakMap,e),Ze=q(Mr),_t=B(Ze,0,"TagPairToken",Wr,_t),O(Ze,1,_t)}}),cn,dl=m({"src/tagPair/translate.ts"(){"use strict";var t,gn,s;F(),Zs(),Ut(),bt(),cn=(s=class extends _t{constructor(i,n,a,l=[]){const o=new $t(i,"translate-attr",a,l);n=n==null?void 0:n.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(h,u,x,c)=>(new z(u,a,l),new z(c,a,l),`\0${l.length-1}n${x}\0${l.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(h,u,x,c,g)=>(new z(u,a,l),new z(g,a,l),`\0${l.length-1}n${c}\0${l.length}n`));const d=new I(n,a,l);d.type="translate-inner";super("translate",o,d,"translate",a,l);k(this,t);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(i){return i?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${E(this,t,gn).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}},t=new WeakSet,gn=function(){return this.firstChild.toString()===" nowrap"},s)}}),Ur,ts,Dr,ee,pl=m({"src/tagPair/include.ts"(){"use strict";Mt(),Zs(),Ur=[Tt(!1)],ee=class extends(Dr=_t){get type(){return"include"}constructor(t,e="",s,r,i,n){super(t,e,s!=null?s:"",s===void 0||r!=null?r:"",i,n)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},ts=q(Dr),ee=B(ts,0,"IncludeToken",Ur,ee),O(ts,1,ee)}}),Be,tr=m({"mixin/attributesParent.ts"(){"use strict";Be=(t=0)=>e=>{var r,xn;class s extends e{constructor(){super(...arguments);k(this,r)}hasAttr(l){this.lspError("AttributesParent.hasAttr")}getAttr(l){return E(this,r,xn).call(this).getAttr(l)}}return r=new WeakSet,xn=function(){return this.childNodes[t]},s}}}),K,es,ss,rs,zr,is,Qt,Hr,Gr,Vr,_e,ns,rt,fn,mn,vn,cl=m({"util/sharable.ts"(){"use strict";K=new Set(["align"]),es=new Set(["cite"]),ss=new Set(["cite","datetime"]),rs=new Set(["width"]),zr=new Set(["axis","align","bgcolor","height","width","valign"]),is=new Set([...zr,"abbr","headers","scope","rowspan","colspan"]),Qt=new Set(["type"]),Hr=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gr=new Set(["clear"]),Vr=new Set(["bgcolor","align","valign"]),_e=new Set(["qid","forcemathmode","type","display"]),ns=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),rt=new Set,fn=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"]),mn={div:K,h1:K,h2:K,h3:K,h4:K,h5:K,h6:K,blockquote:es,q:es,p:K,br:Gr,pre:rs,ins:ss,del:ss,ul:Qt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Hr,"border"]),caption:K,tr:Vr,td:is,th:is,font:new Set(["size","color","face"]),hr:rs,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Qt,poem:K,categorytree:K,combooption:K,math:rt,chem:rt,ce:rt,img:new Set(["alt","src","width","height","loading","srcset"])},vn={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:rt,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:rt,inputbox:rt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:rt,poll:new Set(["id","show-results-before-voting"]),sm2:Qt,flashmp3:Qt,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"]),math:new Set([..._e,"chem"]),chem:_e,ce:_e,hiero:rt,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ns,syntaxhighlight:ns,templatedata:rt,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:rt}}}),Qr,Xr,Jr,Kr,Ds,gl=m({"src/attribute.ts"(){"use strict";var t,e,s,r,i,bn,a;fe(),G(),ft(),cl(),Q(),F(),vt(),Qr=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Xr=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Jr=new Set(["ext","arg","magic-word","template"]),Kr=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Ds=(a=class extends I{constructor(o,d,h,u="",x,c=[],g=U.getConfig(),v=[]){const _=new V(h,"attr-key",g,v);let A;if(h==="title"||d==="img"&&h==="alt")A=new I(x,g,v,{}),A.type="attr-value",A.setAttribute("stage",tt-1);else if(d==="gallery"&&h==="caption"||d==="choose"&&(h==="before"||h==="after")){const S={...g,excludes:[...g.excludes,"heading","html","table","hr","list"]};A=new I(x,S,v,{}),A.type="attr-value",A.setAttribute("stage",1)}else A=new V(x,"attr-value",g,v,{});super(void 0,g,v);k(this,i);k(this,t);k(this,e);k(this,s);k(this,r);C(this,t,o),this.append(_,A),C(this,s,u),C(this,r,[...c]),C(this,e,d),this.setAttribute("name",Ot(J(h)))}get type(){return p(this,t)}get tag(){return p(this,e)}get balanced(){return!p(this,s)||p(this,r)[0]===p(this,r)[1]}afterBuild(){p(this,s).includes("\0")&&C(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&C(this,e,this.parentNode.name),this.setAttribute("name",Ot(this.firstChild.text())),super.afterBuild()}toString(o){const[d="",h=""]=p(this,r);return p(this,s)?super.toString(o,p(this,s)+d)+h:this.firstChild.toString(o)}text(){return p(this,s)?`${super.text(`${p(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var o,d;return p(this,s)?p(this,s).length+((d=(o=p(this,r)[0])==null?void 0:o.length)!=null?d:0):0}lint(o=this.getAbsoluteIndex(),d){}getValue(){return p(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(o){return o==="invalid"?E(this,i,bn).call(this):super.getAttribute(o)}print(){const[o="",d=""]=p(this,r);return p(this,s)?super.print({sep:ce(p(this,s))+o,post:d}):super.print()}json(o,d=this.getAbsoluteIndex()){const h=super.json(void 0,d)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakSet,bn=function(o,d){const{firstChild:h,lastChild:u,type:x,name:c,tag:g,parentNode:v}=this,_=!u.childNodes.some(({type:b})=>Jr.has(b)),A=this.getValue(),S=vn[g],y=mn[g],{length:w}=this.toString();let N="illegal-attr",j,f;if(!(S!=null&&S.has(c))&&!(y!=null&&y.has(c))&&(x==="ext-attr"?S||y:!/\{\{[^{]+\}\}/u.test(c))&&(x==="ext-attr"&&!y||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(g==="meta"||g==="link"||!fn.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(o===void 0)return!0}else if(c==="style"&&typeof A=="string"&&Qr.test(A)){if(o===void 0)return!0}else if(c==="tabindex"&&typeof A=="string"&&A!=="0"){if(o===void 0)return!0}else if(typeof A=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Kr.has(c))&&Xr.test(A)||_&&(c==="href"||g==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(A))){if(o===void 0)return!0}else if(_&&x!=="ext-attr"){const b=rn(g,c),$=String(A).toLowerCase();if(b.length>0&&b.every(T=>T!==$)&&o===void 0)return!0}return!1},a)}}),as,Yr,qe,er=m({"src/attributes.ts"(){"use strict";var t,e,zs,r;G(),F(),vt(),gl(),as=i=>i.slice(0,-1),Yr=i=>`${as(i)}-dirty`,qe=(r=class extends I{constructor(n,a,l,o,d=[]){super(void 0,o,d,{});k(this,e);k(this,t);if(C(this,t,a),this.setAttribute("name",l),n){const h=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",x=h.exec(n),c=0;const g=(()=>{u&&(super.insertAt(new V(u,Yr(a),o,d,{})),u="")});for(;x;){const{index:v,0:_,1:A,2:S,3:y,4:w,5:N,6:j}=x;if(u+=n.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(J(A).trim())){const f=w!=null?w:j,b=[y,N],$=new Ds(as(a),l,A,S,f,b,o,d);g(),super.insertAt($)}else u+=_;({lastIndex:c}=h),x=h.exec(n)}u+=n.slice(c),g()}}get type(){return p(this,t)}afterBuild(){const{parentNode:n}=this;n!=null&&n.is("td")&&this.setAttribute("name",n.subtype),super.afterBuild()}getAttrTokens(n){return this.childNodes.filter(a=>a instanceof Ds&&(!n||a.name===Ot(n)))}hasAttr(n){return this.getAttrTokens(n).length>0}getAttrToken(n){const a=this.getAttrTokens(n);return a[a.length-1]}getAttr(n){var a;return(a=this.getAttrToken(n))==null?void 0:a.getValue()}lint(n=this.getAbsoluteIndex(),a){}getAttribute(n){return n==="invalid"?E(this,e,zs).call(this):super.getAttribute(n)}print(){return this.toString()?`<span class="wpb-${this.type}${E(this,e,zs).call(this)?" wpb-invalid":""}">${this.childNodes.map(n=>n.print(n instanceof V?{class:n.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},t=new WeakMap,e=new WeakSet,zs=function(){const{parentNode:n}=this;return(n==null?void 0:n.type)==="html"&&n.closing&&this.text().trim()!==""},r)}}),wn={};M(wn,{PreToken:()=>_n});var _n,xl=m({"src/pre.ts"(){"use strict";ft(),F(),bt(),_n=class extends I{get type(){return"ext-inner"}constructor(t,e,s=[]){if(t){const r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:n}=r.source;let a=r.exec(t);a&&(i.lastIndex=a.index+n);let l=i.exec(t),o=0,d="";for(;a&&l;)new z(a[0],e,s),new z(l[0],e,s),d+=`${t.slice(o,a.index)}\0${s.length-1}n${t.slice(a.index+n,l.index)}\0${s.length}n`,o=l.index+n+1,r.lastIndex=o,a=r.exec(t),a&&(i.lastIndex=a.index+n),l=i.exec(t);t=d+t.slice(o)}super(t,e,s,{}),this.setAttribute("stage",tt-1)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){}}}}),We,sr=m({"mixin/multiLine.ts"(){"use strict";We=t=>{class e extends t{toString(r){return super.toString(r,`
3
3
  `)}text(){return super.text(`
4
4
  `).replace(/\n\s*\n/gu,`
5
5
  `)}getGaps(){return 1}print(){return super.print({sep:`
6
- `})}}return e}}}),An={};M(An,{ParamTagToken:()=>Nt});var Zr,ls,ti,Nt,yn=m({"src/paramTag/index.ts"(){"use strict";Ue(),sr(),Q(),F(),mt(),Zr=[We],Nt=class extends(ti=I){get type(){return"ext-inner"}constructor(t,e,s=U.getConfig(),r=[],i){if(super(void 0,s,r,{}),e){const n=V;this.append(...e.split(`
7
- `).map(a=>i?a:ve(a,s,r,t)).map(a=>new n(a,"param-line",s,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(t=this.getAbsoluteIndex()){}},ls=q(ti),Nt=B(ls,0,"ParamTagToken",Zr,Nt),O(ls,1,Nt)}}),ei,os,si,Ft,Sn=m({"src/heading.ts"(){"use strict";var t,e,Ce,r;ot(),F(),Ut(),ei=[at],Ft=(r=class extends(si=I){constructor(n,a,l,o=[]){super(void 0,l,o);k(this,e);k(this,t);C(this,t,n);const d=new I(a[0],l,o);d.type="heading-title",d.setAttribute("stage",2);const h=new $t(a[1],"heading-trail",l,o);this.append(d,h)}get type(){return"heading"}get level(){return p(this,t)}toString(n){const a=E(this,e,Ce).call(this);return a+this.firstChild.toString(n)+a+this.lastChild.toString(n)}text(){const n=E(this,e,Ce).call(this);return n+this.firstChild.text()+n}getAttribute(n){return n==="invalid"?this.inHtmlAttrs()===2:n==="padding"?this.level:super.getAttribute(n)}getGaps(){return this.level}lint(n=this.getAbsoluteIndex(),a){}print(){const n=E(this,e,Ce).call(this);return super.print({pre:n,sep:n})}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakMap,e=new WeakSet,Ce=function(){return"=".repeat(this.level)},r),os=q(si),Ft=B(os,0,"HeadingToken",ei,Ft),O(os,1,Ft)}}),Tn,fl=m({"src/parameter.ts"(){"use strict";F(),Tn=class extends I{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(t,e,s,r=[]){super(void 0,s,r);const i=new I(typeof t=="number"?void 0:t,s,r,{}),n=new I(e,s,r);i.type="parameter-key",i.setAttribute("stage",2),n.type="parameter-value",n.setAttribute("stage",2),this.append(i,n)}trimName(t,e=!0){const s=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",s),s}afterBuild(){if(!this.anon){const{parentNode:t,firstChild:e}=this,s=this.trimName(e);t&&t.getArgs(s,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){}print(){return super.print({sep:this.anon?"":"="})}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ri,hs,ii,Lt,ml=m({"src/transclude.ts"(){"use strict";var t,e,s,r,i,n,Hs,$n,o;G(),ut(),Oe(),ot(),F(),fl(),mt(),Ut(),ri=[at,me()],Lt=(o=class extends(ii=I){constructor(h,u,x,c=[]){var y,W;let g;const v=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(h);v&&(g=Number(v[1]),h=h.replace(`\0${g}h`,c[g].toString().replace(/^\n/u,"")));super(void 0,x,c,{});k(this,n);lt(this,"modifier","");k(this,t,"template");k(this,e,":");k(this,s,!1);k(this,r,new Map);k(this,i);const{parserFunction:[A,_],variable:S,functionHook:T}=x,w=(y=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(h))==null?void 0:y[0];if(w)this.setAttribute("modifier",w),h=h.slice(w.length);else if(h.includes(":")){const[P,...L]=h.split(":"),[H]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((W=L[0])!=null?W:"");this.setModifier(`${P}:${H}`)&&(h=L.join(":").slice(H.length))}const N=h.search(/[::]/u),j=h[N]===":",f=N!==-1;if(f||u.length===0&&!p(this,s)){const P=f?h.slice(0,N):h,L=f&&h.slice(N+1),H=J(P),X=f?H.slice(H.search(/\S/u))+(j?":":""):H.trim(),Ct=X.toLowerCase(),dt=Array.isArray(_),et=dt?_.includes(X):Object.prototype.hasOwnProperty.call(_,X),pt=!dt&&et?_[X]:Object.prototype.hasOwnProperty.call(A,Ct)&&A[Ct],De=dt&&et||!("functionHook"in x)||T.includes(pt),Ua=dt&&et||S.includes(pt);if(f?pt&&De:Ua){this.setAttribute("name",pt||Ct.replace(/^#|:$/u,"")),C(this,t,"magic-word"),j&&C(this,e,":");const Da=new $t(P,"magic-word-name",x,c);if(super.insertAt(Da),L!==!1&&u.unshift([L]),this.name==="invoke")for(let ze=0;ze<2;ze++){const xr=u.shift();if(!xr)break;const za=new V(xr.join("="),`invoke-${ze?"function":"module"}`,x,c);super.insertAt(za)}}}if(this.type==="template"){const P=J(h).trim();if(!this.normalizeTitle(P,10,{halfParsed:!0,temporary:!0}).valid)throw c.pop(),new SyntaxError("Invalid template name");const L=new V(h,"template-name",x,c,{});super.insertAt(L)}typeof g=="number"&&(c[g]=void 0);const b=this.isTemplate();let $=1;for(let P=0;P<u.length;P++){const L=u[P];b||this.name==="switch"&&P>0||this.name==="tag"&&P>1||(L[0]=L.join("="),L.length=1),L.length===1&&(L.unshift($),$++),this.insertAt(new Tn(...L,x,c))}this.seal("modifier")}get type(){return p(this,t)}get module(){}get function(){}setModifier(h){const{parserFunction:[,,u,x]}=this.getAttribute("config"),c=J(h).trim();if(h&&!c.endsWith(":"))return!1;const g=c.slice(0,-1).toLowerCase(),v=u.includes(g),A=x.includes(g);return p(this,s)&&v||!p(this,s)&&(A||!h)||(tt.running||this.length>1)&&(v||A||!h)?(this.setAttribute("modifier",h),C(this,s,v),!!h):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(C(this,i,E(this,n,Hs).call(this)),this.setAttribute("name",p(this,i).title))}toString(h){const{childNodes:u,length:x,firstChild:c,modifier:g,type:v}=this;return`{{${g}${v==="magic-word"?c.toString(h)+(x===1?"":p(this,e))+u.slice(1).map(A=>A.toString(h)).join("|"):super.toString(h,"|")}}}`}text(){const{childNodes:h,length:u,firstChild:x,modifier:c,type:g,name:v}=this;return g==="magic-word"&&v==="vardefine"?"":`{{${c}${g==="magic-word"?x.text()+(u===1?"":p(this,e))+yt(h.slice(1),"|"):super.text("|")}}}`}getAttribute(h){switch(h){case"padding":return this.modifier.length+2;case"title":return p(this,i);case"colon":return p(this,e);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!E(this,n,Hs).call(this).valid);default:return super.getAttribute(h)}}lint(h=this.getAbsoluteIndex(),u){}insertAt(h,u=this.length){return super.insertAt(h,u),h.anon?E(this,n,$n).call(this,h):h.name&&this.getArgs(h.name,!1,!1).add(h),h}getAllArgs(){return this.childNodes.filter(cr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:h})=>h)}getArgs(h,u,x=!0){const c=String(h).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let g;return p(this,r).has(c)?g=p(this,r).get(c):(g=new Set(this.getAllArgs().filter(({name:v})=>c===v)),p(this,r).set(c,g)),g}getDuplicatedArgs(){return[...p(this,r)].filter(([,{size:h}])=>h>1).map(([h,u])=>[h,[...u]])}getPossibleValues(){const{type:h,name:u,childNodes:x}=this;if(h==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let c,g;switch(u){case"if":case"ifexist":case"ifexpr":case"iferror":c=2;break;case"ifeq":c=3;break;case"switch":{const v=x.slice(2),A=v[v.length-1];g=[...v.filter(({anon:_})=>!_),...A!=null&&A.anon?[A]:[]].map(({lastChild:_})=>_);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}g!=null||(g=x.slice(c,c+2).map(({lastChild:v})=>v));for(let v=0;v<g.length;){const{length:A,0:_}=g[v].childNodes.filter(S=>S.text().trim());if(A===0)g.splice(v,1);else if(A>1||_.type!=="magic-word")v++;else try{const S=_.getPossibleValues();g.splice(v,1,...S),v+=S.length}catch{v++}}return g}print(){const{childNodes:h,length:u,firstChild:x,modifier:c,type:g}=this;return`<span class="wpb-${g}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${g==="magic-word"?ce(c)+x.print()+(u===1?"":p(this,e))+Bt(h.slice(1),{sep:"|"}):(c?`<span class="wpb-magic-word">${ce(c)}</span>`:"")+Bt(h,{sep:"|"})}}}</span>`}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakSet,Hs=function(){const h=this.type==="template";return this.normalizeTitle(this.childNodes[h?0:1].text(),h?10:828,{temporary:!0})},$n=function(h){const u=this.getAnonArgs(),x=typeof h!="number";for(let c=x?u.indexOf(h):h-1;c<u.length;c++){const g=u[c],{name:v}=g,A=String(c+1);(v!==A||g===h)&&(g.setAttribute("name",A),this.getArgs(A,!1,!1).add(g))}},o),hs=q(ii),Lt=B(hs,0,"TranscludeToken",ri,Lt),O(hs,1,Lt)}}),ni,us,ai,se,vl=m({"src/hidden.ts"(){"use strict";Mt(),F(),ni=[Tt()],se=class extends(ai=I){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}},us=q(ai),se=B(us,0,"HiddenToken",ni,se),O(us,1,se)}}),li,ds,oi,re,bl=m({"src/arg.ts"(){"use strict";var t,wl,s;G(),ft(),Oe(),ot(),F(),mt(),vl(),li=[at,ht("{{{"),me()],re=(s=class extends(oi=I){constructor(i,n,a=[]){super(void 0,n,a,{});k(this,t);for(let l=0;l<i.length;l++){const o=i[l];if(l===0){const d=new V(o,"arg-name",n,a,{});super.insertAt(d)}else if(l>1){const d=new se(o,n,a);super.insertAt(d)}else{const d=new I(o,n,a);d.type="arg-default",d.setAttribute("stage",2),super.insertAt(d)}}}get type(){return"arg"}get default(){}toString(i){return`{{{${super.toString(i,"|")}}}}`}text(){return`{{{${yt(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(i=this.getAbsoluteIndex(),n){}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(i,n=this.getAbsoluteIndex()){const a=super.json(void 0,n)}},t=new WeakSet,wl=function(){},s),ds=q(oi),re=B(ds,0,"ArgToken",li,re),O(ds,1,re)}}),kn={};M(kn,{parseBraces:()=>Me});var hi,ps,Ae,cs,gs,xs,ui,fs,Me,rr=m({"parser/braces.ts"(){"use strict";xe(),G(),Sn(),ml(),bl(),hi={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ps=String.raw`\[(?!\[)`,Ae=String.raw`\n(?![=\0])`,cs=String.raw`|\{{2,}`,gs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),xs=ue(t=>new RegExp(t,"gmu")),ui=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ps}|${Ae})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Ae})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ps}|${Ae})*\}-`,"gu"),fs=t=>{const e=Ot(J(t));return gs.has(e)?gs.get(e):/^(?:filepath|(?:full|canonical)urle?):./u.test(e)?"m":/^#vardefine:./u.test(e)?"n":"t"},Me=(t,e,s)=>{var g,v,A,_,S;const r=String.raw`${e.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,i]}=e,n=[],a=[],l=(T,w,N,j)=>{w[w.length-1].push(Z(T.slice(N,j),a))};let o;do o!==void 0&&(t=o),o=t.replace(ui,(T,w,N)=>{if(w!==void 0||typeof N=="string")try{const{length:j}=s,f=(w!=null?w:N).split("|");return new Lt(Z(f[0],a),f.slice(1).map(b=>{const $=b.indexOf("=");return($===-1?[b]:[b.slice(0,$),b.slice($+1)]).map(y=>Z(y,a))}),e,s),`\0${j}${fs(f[0])}`}catch(j){if(!(j instanceof SyntaxError)||j.message!=="Invalid template name")throw j}return a.push(Z(T,a)),`\0${a.length-1}`});while(o!==t);t=o;const d=t.lastIndexOf("}}")-t.length;let h=d+t.length!==-1,u=xs(r+(h?cs:"")),x=u.exec(t),c;for(;x||c!==void 0&&c<=t.length&&((v=(g=n[n.length-1])==null?void 0:g[0])!=null&&v.startsWith("="));){if(x!=null&&x[1]){const[,{length:L}]=x;x[0]=x[0].slice(L),x.index+=L}const{0:T,index:w}=x!=null?x:{0:`
8
- `,index:t.length},N=(A=n.pop())!=null?A:{},{0:j,index:f,parts:b,findEqual:$,pos:y}=N,W=T==="="&&$;if(T==="]]"||T==="}-")c=w+2;else if(T===`
9
- `){c=w+1;const{pos:L,findEqual:H}=(_=n[n.length-1])!=null?_:{};if(L===void 0||H||J(t.slice(L,f))!==""){const X=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(t.slice(f,w));X&&(X[2]=Z(X[2],a),X[2].includes(`
10
- `)||(t=`${t.slice(0,f)}\0${s.length}h${t.slice(w)}`,c=f+4+String(s.length).length,new Ft(X[1].length,X.slice(2),e,s)))}}else if(T==="|"||W)c=w+1,l(t,b,y,w),T==="|"&&b.push([]),N.pos=c,N.findEqual=T==="|",n.push(N);else if(T.startsWith("}}")){const L=T.slice(0,Math.min(j.length,3)),H=j.length-L.length,{length:X}=s;c=w+L.length,l(t,b,y,w);let Ct=!1,dt="t";if(L.length===3){const et=b.map(De=>De.join("=")),pt=et.length>1&&J(et[1]).trim();new re(et,e,s),pt&&pt.endsWith(":")&&i.includes(pt.slice(0,-1).toLowerCase())&&(dt="s")}else try{new Lt(b[0][0],b.slice(1),e,s),dt=fs(b[0][0])}catch(et){if(et instanceof SyntaxError&&et.message==="Invalid template name")Ct=!0;else throw et}Ct||(t=`${t.slice(0,f+H)}\0${X}${dt}${t.slice(c)}`,c=f+H+3+String(X).length,H>1?n.push({0:j.slice(0,H),index:f,pos:f+H,parts:[[]]}):H===1&&t[f-1]==="-"&&n.push({0:"-{",index:f-1,pos:f+1,parts:[[]]}))}else c=w+T.length,T.startsWith("{")&&(x.pos=c,x.parts=[[]]),n.push(..."0"in N?[N]:[],x);let P=n[n.length-1];if(h&&d+t.length<c)for(h=!1;(S=P==null?void 0:P[0])!=null&&S.startsWith("{");)n.pop(),P=n[n.length-1];u=xs(r+(h?cs:"")+(P?`|${hi[P[0][0]]}${P.findEqual?"|=":""}`:"")),u.lastIndex=c,x=u.exec(t)}return Z(t,a)}}}),Cn={};M(Cn,{InputboxToken:()=>In});var In,_l=m({"src/paramTag/inputbox.ts"(){"use strict";Ue(),rr(),Q(),yn(),In=class extends Nt{constructor(t,e,s=U.getConfig(),r=[]){const i=Symbol("InputboxToken"),n=s.excludes.includes("heading")?s:{...s,excludes:[...s.excludes,"heading"]},{length:a}=r;r.push(i),e&&(e=ve(e,n,r,t)),e&&(e=Me(e,n,r)),r.splice(a,1),super(t,e,n,r,{})}}}}),Ie={};M(Ie,{NestedToken:()=>Nn});var Nn,ms=m({"src/nested.ts"(){"use strict";var t,e,s;Ue(),rr(),F(),Jn(),vt(),Nn=(s=class extends I{constructor(i,n,a,l,o=[]){if(typeof n=="boolean"){const d=Symbol("NestedToken"),{length:h}=o;o.push(d),i&&(i=ve(i,l,o,n)),i&&(i=Me(i,l,o)),o.splice(h,1)}else i&&(i=i.replace(n,(d,h,u,x,c)=>{const g=`\0${o.length+1}e`;return new Rt(h,u,x,c,l,!1,o),g}));i&&(i=i.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(d,h,u)=>(new z(u,l,o),`${h}\0${o.length}n`)));super(i,l,o);k(this,t);k(this,e);C(this,t,[...a]),C(this,e,n)}get type(){return"ext-inner"}lint(i=this.getAbsoluteIndex(),n){}},t=new WeakMap,e=new WeakMap,s)}});function di(t,e,s,r,i){e=J(e).trim();let n=e.replace(t==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(t){case"width":return!n&&!!e||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(n);case"link":{if(n){if(Fn(s.protocol).test(n))return Ln(s.protocol).test(n)&&e;n.startsWith("[[")&&n.endsWith("]]")&&(n=n.slice(2,-2))}else return e;const a=U.normalizeTitle(n,0,!1,s,{halfParsed:r,decode:!0,selfLink:!0});return a.valid&&a}case"lang":return(i==="svg"||i==="svgz")&&!/[^a-z\d-]/u.test(n);case"alt":case"class":case"manualthumb":return!0;case"page":return(i==="djvu"||i==="djv"||i==="pdf")&&Number(n)>0;default:return!!n&&!isNaN(n)}}var Fn,Ln,pi,ci,En,Al=m({"src/imageParameter.ts"(){"use strict";var t,e,Pn,i;xe(),G(),Q(),F(),Fn=ue(n=>new RegExp(String.raw`^(?:${n}|//|\0\d+m\x7F)`,"iu")),Ln=ue(n=>new RegExp(String.raw`^(?:(?:${n}|//)${de}|\0\d+m\x7F)${pe}$`,"iu")),pi=ue(n=>new RegExp(String.raw`^(\s*(?!\s))${n.replace("$1","(.*)")}${n.endsWith("$1")?`(?=$|
11
- )`:""}(\s*)$`,"u")),ci=new Set(["alt","link","lang","page","caption"]),En=(i=class extends I{constructor(a,l,o,d){var n=(...r)=>(super(...r),k(this,e),k(this,t,""),this);let h;const u=Object.entries(o.img).map(([c,g])=>[c,g,pi(c)]),x=u.find(([,c,g])=>(h=g.exec(a),h&&(h.length!==4||di(c,h[2],o,!0,l)!==!1)));if(x&&h){h.length===3?(n(void 0,o,d),C(this,t,a)):(n(h[2],o,d,{}),C(this,t,h[1]+x[0]+h[3])),this.setAttribute("name",x[1]);return}n(a,o.excludes.includes("list")?o:{...o,excludes:[...o.excludes,"list"]},d),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?di("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var a;(a=this.parentNode)!=null&&a.is("gallery-image")&&!ci.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(a){return p(this,t)?p(this,t).replace("$1",super.toString(a)):super.toString(a)}text(){return p(this,t)?p(this,t).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"}getAttribute(a){return a==="invalid"?this.name==="invalid":a==="padding"?Math.max(0,p(this,t).indexOf("$1")):super.getAttribute(a)}lint(a=this.getAbsoluteIndex(),l){}getValue(){return this.name==="invalid"?this.text():E(this,e,Pn).call(this)||super.text()}print(){return p(this,t)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${p(this,t).replace("$1",`<span class="wpb-image-caption">${Bt(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}},t=new WeakMap,e=new WeakSet,Pn=function(){return p(this,t)&&!p(this,t).includes("$1")},i)}}),gi,ir,jn=m({"src/link/file.ts"(){"use strict";Re(),Al(),gi=t=>{if(t===void 0)return[];const e=/-\{|\}-|\|/gu,s=[];let r=e.exec(t),i=0,n=0;for(;r;){const{0:a,index:l}=r;a!=="|"?i+=a==="-{"?1:-1:i===0&&(s.push(t.slice(n,l)),{lastIndex:n}=e),r=e.exec(t)}return s.push(t.slice(n)),s},ir=class extends xt{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(t,e,s,r=[],i="|"){super(t,void 0,s,r,i);const{extension:n}=this.getTitle(!0,!0);this.safeAppend(gi(e).map(a=>new En(a,n,s,r)))}lint(t=this.getAbsoluteIndex(),e){}getAllArgs(){return this.childNodes.slice(1)}getArgs(t){return this.getAllArgs().filter(({name:e})=>t===e)}getArg(t){const e=this.getArgs(t);return e[t==="manualthumb"?0:e.length-1]}getValue(t){var e;return(e=this.getArg(t))==null?void 0:e.getValue()}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),xi,vs,fi,Et,Rn=m({"src/link/galleryImage.ts"(){"use strict";var t,On,s;St(),ft(),F(),jn(),xi=[ht("")],Et=(s=class extends(fi=ir){constructor(i,n,a,l,o=[]){let d;if(a!==void 0){const{length:h}=o;d=new I(a,l,o);for(let u=0;u<it-1;u++)d.parseOnce();o.splice(h,1)}super(n,d==null?void 0:d.toString(),l,o);k(this,t);lt(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${i}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(i){const n=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),n?0:6,{halfParsed:!0,temporary:i,decode:!n})}lint(i=this.getAbsoluteIndex(),n){}getAttribute(i){return i==="invalid"?E(this,t,On).call(this):super.getAttribute(i)}},t=new WeakSet,On=function(){const{ns:i}=this.getAttribute("title");return i!==6},s),vs=q(fi),Et=B(vs,0,"GalleryImageToken",xi,Et),O(vs,1,Et)}}),Bn={};M(Bn,{GalleryToken:()=>ie});var mi,bs,vi,ie,yl=m({"src/gallery.ts"(){"use strict";var t,qn,Sl,r;sr(),F(),Rn(),vt(),mi=[We],ie=(r=class extends(vi=I){constructor(n,a,l=[]){var o;super(void 0,a,l,{});k(this,t);for(const d of(o=n==null?void 0:n.split(`
12
- `))!=null?o:[]){const h=/^([^|]+)(?:\|(.*))?/u.exec(d);if(!h){super.insertAt(d.trim()?new z(d,a,l):d);continue}const[,u,x]=h;E(this,t,qn).call(this,u)?super.insertAt(new Et("gallery",u,x,a,l)):super.insertAt(new z(d,a,l))}}get type(){return"ext-inner"}get widths(){}get heights(){}lint(n=this.getAbsoluteIndex(),a){}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakSet,qn=function(n){return this.normalizeTitle(n,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},Sl=function(n){},r),bs=q(vi),ie=B(bs,0,"GalleryToken",mi,ie),O(bs,1,ie)}}),nr,Wn=m({"src/link/index.ts"(){"use strict";xe(),Re(),nr=class extends xt{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():Le(this.firstChild.text().replace(/^\s*:?/u,""))}lint(t=this.getAbsoluteIndex(),e){}}}}),bi,wi,ge,ar=m({"src/magicLink.ts"(){"use strict";var t,e,Mn,r;G(),Q(),F(),bi=String.raw`(?:[${_t}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,wi=new RegExp(`${bi}+`,"gu"),ge=(r=class extends I{constructor(n,a="free-ext-link",l=U.getConfig(),o){super(n,l,o,{});k(this,e);k(this,t);C(this,t,a)}get type(){return p(this,t)}get innerText(){const n=new Map([["!","|"],["=","="]]);let a=yt(this.childNodes.map(l=>{const{type:o}=l,d=String(l.name);return o==="magic-word"&&n.has(d)?n.get(d):l}));return this.type==="magic-link"&&(a=a.replace(wi," ")),a}get link(){const{innerText:n}=this;return this.type==="magic-link"?n.startsWith("ISBN")?`ISBN ${n.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:n:en(n).replace(/\n/gu,"%0A")}lint(n=this.getAbsoluteIndex(),a){}getUrl(n){this.lspError("MagicLinkToken.getUrl")}getAttribute(n){return n==="invalid"?E(this,e,Mn).call(this):super.getAttribute(n)}},t=new WeakMap,e=new WeakSet,Mn=function(){if(this.type==="magic-link"){const{link:n}=this;if(n.startsWith("ISBN")){const a=[...n.slice(5)].map(l=>l==="X"?10:Number(l));return a.length===10?a.reduce((l,o,d)=>l+o*(10-d),0)%11!==0:a.length===13&&(a[12]===10||a.reduce((l,o,d)=>l+o*(d%2?3:1),0)%10!==0)}}return!1},r)}}),_i,ws,Ai,Pt,Un=m({"src/extLink.ts"(){"use strict";var t,e;St(),ft(),F(),ar(),_i=[ht("[")],Pt=(e=class extends(Ai=I){constructor(r,i="",n="",a,l=[]){super(void 0,a,l,{});k(this,t);const o=r&&/^\0\d+f\x7F$/u.test(r)?l[Number(r.slice(1,-2))]:new ge(r,"ext-link-url",a,l);if(this.insertAt(o),C(this,t,i),n){const d=new I(n,a,l,{});d.type="ext-link-text",d.setAttribute("stage",it-1),this.insertAt(d)}}get type(){return"ext-link"}toString(r){return this.length===1?`[${super.toString(r)}${p(this,t)}]`:`[${super.toString(r,p(this,t))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return p(this,t).length}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print(this.length===1?{pre:"[",post:`${p(this,t)}]`}:{pre:"[",sep:p(this,t),post:"]"})}},t=new WeakMap,e),ws=q(Ai),Pt=B(ws,0,"ExtLinkToken",_i,Pt),O(ws,1,Pt)}}),Gs,Tl=m({"src/imagemapLink.ts"(){"use strict";F(),vt(),Wn(),Un(),Gs=class extends I{get type(){return"imagemap-link"}constructor(t,e,s,r,i=[]){super(void 0,r,i),this.append(t,e.length===2?new nr(...e,r,i):new Pt(...e,r,i),new z(s,r,i))}}}}),Dn={};M(Dn,{ImagemapToken:()=>ne});var yi,_s,Si,ne,$l=m({"src/imagemap.ts"(){"use strict";ut(),sr(),Q(),F(),vt(),Rn(),Tl(),yi=[We],ne=class extends(Si=I){get type(){return"ext-inner"}get image(){return this.childNodes.find(cr("imagemap-image"))}constructor(t,e=U.getConfig(),s=[]){if(super(void 0,e,s,{}),!t)return;const r=t.split(`
13
- `),i=new Set(e.protocol.split("|")),n=z;let a=!0,l=!1;for(const o of r){const d=o.trim();if(!(l||!d||d.startsWith("#"))){if(a){const h=o.indexOf("|"),u=h===-1?o:o.slice(0,h),{valid:x,ns:c}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(x&&c===6){const g=new Et("imagemap",u,h===-1?void 0:o.slice(h+1),e,s);super.insertAt(g),a=!1;continue}else l=!0}else if(o.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(o);continue}else if(o.includes("[")){const h=o.indexOf("["),u=o.slice(h),x=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(u);if(x){if(this.normalizeTitle(x[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Gs(o.slice(0,h),x.slice(1),u.slice(u.indexOf("]]")+2),e,s));continue}}else if(u.startsWith("[//")||i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){const c=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(c){super.insertAt(new Gs(o.slice(0,h),c.slice(1),u.slice(u.indexOf("]")+1),e,s));continue}}}}super.insertAt(new n(o,e,s))}}lint(t=this.getAbsoluteIndex(),e){}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}},_s=q(Si),ne=B(_s,0,"ImagemapToken",yi,ne),O(_s,1,ne)}}),Ti,As,$i,jt,zn=m({"src/nowiki/comment.ts"(){"use strict";Mt(),ft(),kt(),Ti=[Tt(!1),ht("<!--")],jt=class extends($i=nt){constructor(e,s,r,i){super(e,r,i);lt(this,"closed");this.closed=s}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}},As=q($i),jt=B(As,0,"CommentToken",Ti,jt),O(As,1,jt)}}),Hn={};M(Hn,{CommentedToken:()=>Gn});var Gn,kl=m({"src/commented.ts"(){"use strict";F(),zn(),Gn=class extends I{get type(){return"ext-inner"}constructor(t,e,s=[]){if(super(void 0,e,s,{AstText:":",CommentToken:":"}),t){let r=t.indexOf("<!--"),i=r!==-1&&t.indexOf("-->",r+4),n=0;for(;i!==!1&&i!==-1;)r>n&&this.insertAt(t.slice(n,r)),this.insertAt(new jt(t.slice(r+4,i),!0,e,s)),n=i+3,r=t.indexOf("<!--",n),i=r!==-1&&t.indexOf("-->",r+4);n<t.length&&this.insertAt(t.slice(n))}}lint(t=this.getAbsoluteIndex()){}}}}),Vn={};M(Vn,{NowikiToken:()=>Qn});var ki,Qn,Cl=m({"src/nowiki/index.ts"(){"use strict";var t,Xn,s;kt(),ki=new Set(["languages","section","templatestyles"]),Qn=(s=class extends nt{constructor(){super(...arguments);k(this,t)}get type(){return"ext-inner"}lint(i=this.getAbsoluteIndex()){}getAttribute(i){return i==="invalid"?E(this,t,Xn).call(this):super.getAttribute(i)}},t=new WeakSet,Xn=function(){const{name:i,firstChild:{data:n}}=this;return ki.has(i)&&!!n},s)}}),Ci,ys,Ii,Rt,Jn=m({"src/tagPair/ext.ts"(){"use strict";Q(),tr(),F(),Zs(),er(),Ci=[Be()],Rt=class extends(Ii=wt){get type(){return"ext"}constructor(t,e,s,r,i=U.getConfig(),n=!1,a=[]){const l=t.toLowerCase(),o=new qe(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),d={...i,ext:i.ext.filter(u=>u!==l),excludes:[...i.excludes],inExt:!0};let h;switch(l){case"tab":d.ext=d.ext.filter(u=>u!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&d.excludes.push("heading"),h=new I(s,d,a);break;case"pre":{const{PreToken:u}=(xl(),R(wn));h=new u(s,d,a);break}case"dynamicpagelist":{const{ParamTagToken:u}=(yn(),R(An));h=new u(n,s,d,a);break}case"inputbox":{const{InputboxToken:u}=(_l(),R(Cn));h=new u(n,s,d,a);break}case"references":{const{NestedToken:u}=(ms(),R(Ie));d.excludes.push("heading"),h=new u(s,n,["ref"],d,a);break}case"choose":{const{NestedToken:u}=(ms(),R(Ie));h=new u(s,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],d,a);break}case"combobox":{const{NestedToken:u}=(ms(),R(Ie));h=new u(s,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],d,a);break}case"gallery":{const{GalleryToken:u}=(yl(),R(Bn));h=new u(s,d,a);break}case"imagemap":{const{ImagemapToken:u}=($l(),R(Dn));h=new u(s,d,a);break}case"hiero":{const{CommentedToken:u}=(kl(),R(Hn));h=new u(s,d,a);break}default:{const{NowikiToken:u}=(Cl(),R(Vn));h=new u(s,d,a)}}h.setAttribute("name",l),h.type==="plain"&&(h.type="ext-inner"),super(t,o,h,r,i,a),this.seal("closed",!0)}lint(t=this.getAbsoluteIndex(),e){}},ys=q(Ii),Rt=B(ys,0,"ExtToken",Ci,Rt),O(ys,1,Rt)}}),Kn={};M(Kn,{parseCommentAndExt:()=>ve});var Ss,Ni,ye,Fi,Ts,ve,Ue=m({"parser/commentAndExt.ts"(){"use strict";xe(),G(),ul(),vt(),dl(),pl(),Jn(),zn(),Ss="<onlyinclude>",Ni="</onlyinclude>",{length:ye}=Ss,Fi=[!1,!0].map(t=>{const e=t?"includeonly":"(?:no|only)include",s=t?"noinclude":"includeonly";return sn(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${e}(?:\s[^>]*)?/?>|</${e}\s*>|<(${r.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu"))}),Ts=t=>{const e=t.indexOf(Ss);return{i:e,j:t.indexOf(Ni,e+ye)}},ve=(t,e,s,r)=>{if(r){let{i:l,j:o}=Ts(t);if(l!==-1&&o!==-1){let d="";const h=u=>{new z(u,e,s),d+=`\0${s.length-1}n`};for(;l!==-1&&o!==-1;){const u=`\0${s.length}e`;new te(t.slice(l+ye,o),e,s),l>0&&h(t.slice(0,l)),d+=u,t=t.slice(o+ye+1),{i:l,j:o}=Ts(t)}return t&&h(t),d}}const{ext:i}=e,n=i.filter(l=>l!=="translate"&&l!=="tvar"),a={...e,ext:n};if(i.includes("translate")){const l=[];t=t.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,o=>(l.push(o),`\0${l.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(o,d,h)=>{const u=s.length;return new cn(d,h&&Z(h,l),a,s),`\0${u}g`}),t=Z(t,l)}return t.replace(Fi[r?1:0](n),(l,o,d,h,u,x,c,g,v)=>{const A=s.length;let _="n";if(o)_="e",new Rt(o,d,h,u,a,x,s);else if(l.startsWith("<!--")){_="c";const S=l.endsWith("-->");new jt(Z(l,s,1).slice(4,S?-3:void 0),S,e,s)}else x?new ee(x,c&&Z(c,s,1),g&&Z(g,s,1),v,e,s):new z(l,e,s);return`\0${A}${_}`})}}}),Li,$s,Ei,ae,Il=m({"src/html.ts"(){"use strict";var t,e,s,r,i;fe(),ut(),tr(),Q(),F(),Li=[Be()],ae=(i=class extends(Ei=I){constructor(a,l,o,d,h,u){super(void 0,h,u);k(this,t);k(this,e);k(this,s);k(this,r);this.insertAt(l),this.setAttribute("name",a.toLowerCase()),C(this,t,o),C(this,e,d),C(this,s,a)}get type(){return"html"}get selfClosing(){return p(this,e)}get closing(){return p(this,t)}toString(a){return`<${this.closing?"/":""}${p(this,s)}${super.toString(a)}${p(this,e)?"/":""}>`}text(){const{closing:a}=this,l=p(this,s)+(a?"":super.text());return`<${a?"/":""}${l}${p(this,e)?"/":""}>`}getAttribute(a){return a==="invalid"?this.inTableAttrs()===2:a==="padding"?p(this,s).length+(this.closing?2:1):super.getAttribute(a)}lint(a=this.getAbsoluteIndex(),l){}findMatchingTag(){return At(p(this,r),()=>{const{name:a,parentNode:l,closing:o,selfClosing:d}=this,{html:[,h,u]}=this.getAttribute("config"),x=u.includes(a),c=h.includes(a);if(x||c&&d)return this;if(!l)return;const{childNodes:g}=l,v=g.indexOf(this),A=o?g.slice(0,v).reverse():g.slice(v+1),_=[this],{rev:S}=tt;for(const T of A)if(!(!T.is("html")||T.name!==a||c&&p(T,e)))if(p(T,t)===o)_.push(T);else{const w=_.pop();if(w===this)return T;U.viewOnly&&(C(w,r,[S,T]),C(T,r,[S,w]))}if(U.viewOnly)for(const T of _)C(T,r,[S,void 0])},a=>{C(this,r,a),a[1]&&a[1]!==this&&C(a[1],r,[tt.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${p(this,s)}`,post:`${p(this,e)?"/":""}&gt;`})}json(a,l=this.getAbsoluteIndex()){const o=super.json(void 0,l)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i),$s=q(Ei),ae=B($s,0,"HtmlToken",Li,ae),O($s,1,ae)}}),Yn={};M(Yn,{parseHtml:()=>Zn});var Pi,Zn,Nl=m({"parser/html.ts"(){"use strict";er(),Il(),Pi=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Zn=(t,e,s)=>{var a;const{html:r}=e;(a=e.htmlElements)!=null||(e.htmlElements=new Set([...r[0],...r[1],...r[2]]));const i=t.split("<");let n=i.shift();for(const l of i){const o=Pi.exec(l),d=o==null?void 0:o[2],h=d==null?void 0:d.toLowerCase();if(!o||!e.htmlElements.has(h)){n+=`<${l}`;continue}const[,u,,x="",c,g]=o,{length:v}=s,A=new qe(x,"html-attrs",h,e,s),_=A.hasAttr("itemprop");if(h==="meta"&&!(_&&A.hasAttr("content"))||h==="link"&&!(_&&A.hasAttr("href"))){n+=`<${l}`,s.length=v;continue}n+=`\0${s.length}x${g}`,new ae(d,A,u==="/",c==="/>",e,s)}return n}}}),lr,ta=m({"src/table/base.ts"(){"use strict";tr(),F(),Ut(),er(),lr=class extends Be(1)(I){constructor(t,e,s,r,i,n=[],a){super(void 0,i,n,a),this.append(new $t(e,"table-syntax",i,n),new qe(r,"table-attrs",s,i,n))}escape(){}}}}),ji,ks,rt,Se,Xt,Jt,Ee,ea=m({"src/table/td.ts"(){"use strict";Ys(),F(),ta(),Ee=class extends(ks=lr,ji=[je(!1)],ks){constructor(t,e,s,r=[]){var l;let i=/\||\0\d+!\x7F/u.exec(e!=null?e:""),n=i?e.slice(0,i.index):"";/\[\[|-\{/u.test(n)&&(i=null,n=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,t,"td",n,s,r),O(Se,5,this),gt(this,Xt),gt(this,rt,""),i&&([el(this,rt)._]=i);const a=new I(e==null?void 0:e.slice(((l=i==null?void 0:i.index)!=null?l:NaN)+D(this,rt).length),s,r);a.type="td-inner",a.setAttribute("stage",4),this.insertAt(a)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return Bs(this,Xt,Jt).call(this).subtype}afterBuild(){D(this,rt).includes("\0")&&Y(this,rt,this.buildFromStr(D(this,rt),0)),super.afterBuild()}toString(t){const{childNodes:[e,s,r]}=this;return e.toString(t)+s.toString(t)+D(this,rt)+r.toString(t)}text(){const{childNodes:[t,e,s]}=this;return t.text()+e.text()+D(this,rt)+s.text()}getGaps(t){return t===1?D(this,rt).length:0}lint(t=this.getAbsoluteIndex(),e){}isIndependent(){return this.firstChild.text().startsWith(`
14
- `)}getAttr(t){const e=super.getAttr(t);return t==="rowspan"||t==="colspan"?parseInt(e)||1:e}escape(){}print(){const{childNodes:[t,e,s]}=this;return`<span class="wpb-td">${t.print()}${e.print()}${D(this,rt)}${s.print()}</span>`}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}},Se=q(ks),rt=new WeakMap,Xt=new WeakSet,Jt=function(){var t;const e=this.firstChild.text(),s=e.slice(-1);let r="td";if(s==="!"?r="th":s==="+"&&(r="caption"),this.isIndependent())return{subtype:r};const{previousSibling:i}=this;return{...Bs(t=i,Xt,Jt).call(t)}},Jt=B(Se,17,"#getSyntax",ji,Xt,Jt),Xs(Se,Ee)}}),or,sa=m({"src/table/trBase.ts"(){"use strict";ta(),ea(),or=class extends lr{lint(t=this.getAbsoluteIndex(),e){}getRowCount(){return Number(this.childNodes.some(t=>t instanceof Ee&&t.isIndependent()&&!t.firstChild.text().endsWith("+")))}}}}),Ri,Oi,Bi,qi,Cs,Te,Ne,Fl=m({"src/table/index.ts"(){"use strict";ut(),Ys(),sa(),Ut(),Ri=(t,e)=>new Array(t).fill(void 0).map((s,r)=>e(r)),Oi=({type:t})=>t==="tr"||t==="table-syntax",Bi=class extends Array{},Ne=class extends(Cs=or,qi=[je(!1)],Cs){constructor(t,e,s,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,t,"table",e,s,r,{}),O(Te,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(t=this.getAbsoluteIndex(),e){}close(t=`
15
- |}`,e){const s=this.getAttribute("config"),r=this.getAttribute("accum");tt.run(()=>{const i=new $t(e?t:void 0,"table-syntax",s,r);super.insertAt(i)})}getLayout(t){const e=this.getAllRows(),{length:s}=e,r=Bi.from(Ri(s,()=>[]));for(let i=0;i<r.length;i++){const n=r[i];let a=0,l=0,o;for(const d of e[i].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(o=d.subtype!=="caption"),o){const h={row:i,column:a},{rowspan:u,colspan:x}=d;for(a++;n[l];)l++;for(let c=i;c<Math.min(i+u,s);c++)for(let g=l;g<l+x;g++)r[c][g]=h;l+=x}}else if(Oi(d))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(t=>t.is("tr")&&t.getRowCount()>0)]}getNthRow(t,e,s){const r=super.getRowCount();if(t===0&&r)return this;r&&t--;for(const i of this.childNodes.slice(2)){const{type:n}=i;if(n==="tr"&&i.getRowCount()&&(t--,t<0))return i}}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}},Te=q(Cs),B(Te,1,"getLayout",qi,Ne),Xs(Te,Ne)}}),ra,Ll=m({"src/table/tr.ts"(){"use strict";sa(),ra=class extends or{get type(){return"tr"}constructor(t,e,s,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,t,"tr",e,s,r)}}}}),hr,ia=m({"src/nowiki/listBase.ts"(){"use strict";kt(),hr=class extends nt{get indent(){}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ur,na=m({"src/nowiki/dd.ts"(){"use strict";ia(),ur=class extends hr{get type(){return"dd"}}}}),aa={};M(aa,{parseTable:()=>la});var Wi,Is,la,El=m({"parser/table.ts"(){"use strict";F(),Fl(),Ll(),ea(),na(),Wi=t=>t.lastChild.constructor!==I,Is=(t,e)=>t.is("td")?e.pop():t,la=({firstChild:{data:t},type:e,name:s},r,i)=>{const n=[],a=t.split(`
6
+ `})}}return e}}}),An={};M(An,{ParamTagToken:()=>Nt});var Zr,ls,ti,Nt,yn=m({"src/paramTag/index.ts"(){"use strict";Ue(),sr(),Q(),F(),vt(),Zr=[We],Nt=class extends(ti=I){get type(){return"ext-inner"}constructor(t,e,s=U.getConfig(),r=[],i){if(super(void 0,s,r,{}),e){const n=V;this.append(...e.split(`
7
+ `).map(a=>i?a:ve(a,s,r,t)).map(a=>new n(a,"param-line",s,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}lint(t=this.getAbsoluteIndex()){}},ls=q(ti),Nt=B(ls,0,"ParamTagToken",Zr,Nt),O(ls,1,Nt)}}),ei,os,si,Ft,Sn=m({"src/heading.ts"(){"use strict";var t,e,Ce,r;ot(),F(),Ut(),ei=[at],Ft=(r=class extends(si=I){constructor(n,a,l,o=[]){super(void 0,l,o);k(this,e);k(this,t);C(this,t,n);const d=new I(a[0],l,o);d.type="heading-title",d.setAttribute("stage",2);const h=new $t(a[1],"heading-trail",l,o);this.append(d,h)}get type(){return"heading"}get level(){return p(this,t)}toString(n){const a=E(this,e,Ce).call(this);return a+this.firstChild.toString(n)+a+this.lastChild.toString(n)}text(){const n=E(this,e,Ce).call(this);return n+this.firstChild.text()+n}getAttribute(n){return n==="invalid"?this.inHtmlAttrs()===2:n==="padding"?this.level:super.getAttribute(n)}getGaps(){return this.level}lint(n=this.getAbsoluteIndex(),a){}print(){const n=E(this,e,Ce).call(this);return super.print({pre:n,sep:n})}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakMap,e=new WeakSet,Ce=function(){return"=".repeat(this.level)},r),os=q(si),Ft=B(os,0,"HeadingToken",ei,Ft),O(os,1,Ft)}}),Tn,fl=m({"src/parameter.ts"(){"use strict";F(),Tn=class extends I{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(t,e,s,r=[]){super(void 0,s,r);const i=new I(typeof t=="number"?void 0:t,s,r,{}),n=new I(e,s,r);i.type="parameter-key",i.setAttribute("stage",2),n.type="parameter-value",n.setAttribute("stage",2),this.append(i,n)}trimName(t,e=!0){const s=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",s),s}afterBuild(){if(!this.anon){const{parentNode:t,firstChild:e}=this,s=this.trimName(e);t&&t.getArgs(s,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){}print(){return super.print({sep:this.anon?"":"="})}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ri,hs,ii,Lt,ml=m({"src/transclude.ts"(){"use strict";var t,e,s,r,i,n,Hs,$n,o;G(),ut(),Oe(),ot(),F(),fl(),vt(),Ut(),ri=[at,me()],Lt=(o=class extends(ii=I){constructor(h,u,x,c=[]){var T,W;let g;const v=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(h);v&&(g=Number(v[1]),h=h.replace(`\0${g}h`,c[g].toString().replace(/^\n/u,"")));super(void 0,x,c,{});k(this,n);lt(this,"modifier","");k(this,t,"template");k(this,e,":");k(this,s,!1);k(this,r,new Map);k(this,i);const{parserFunction:[_,A],variable:S,functionHook:y}=x,w=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(h))==null?void 0:T[0];if(w)this.setAttribute("modifier",w),h=h.slice(w.length);else if(h.includes(":")){const[P,...L]=h.split(":"),[H]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((W=L[0])!=null?W:"");this.setModifier(`${P}:${H}`)&&(h=L.join(":").slice(H.length))}const N=h.search(/[::]/u),j=h[N]===":",f=N!==-1;if(f||u.length===0&&!p(this,s)){const P=f?h.slice(0,N):h,L=f&&h.slice(N+1),H=J(P),X=f?H.slice(H.search(/\S/u))+(j?":":""):H.trim(),Ct=X.toLowerCase(),dt=Array.isArray(A),st=dt?A.includes(X):Object.prototype.hasOwnProperty.call(A,X),pt=!dt&&st?A[X]:Object.prototype.hasOwnProperty.call(_,Ct)&&_[Ct],De=dt&&st||!("functionHook"in x)||y.includes(pt),Ua=dt&&st||S.includes(pt);if(f?pt&&De:Ua){this.setAttribute("name",pt||Ct.replace(/^#|:$/u,"")),C(this,t,"magic-word"),j&&C(this,e,":");const Da=new $t(P,"magic-word-name",x,c);if(super.insertAt(Da),L!==!1&&u.unshift([L]),this.name==="invoke")for(let ze=0;ze<2;ze++){const xr=u.shift();if(!xr)break;const za=new V(xr.join("="),`invoke-${ze?"function":"module"}`,x,c);super.insertAt(za)}}}if(this.type==="template"){const P=J(h).trim();if(!this.normalizeTitle(P,10,{halfParsed:!0,temporary:!0}).valid)throw c.pop(),new SyntaxError("Invalid template name");const L=new V(h,"template-name",x,c,{});super.insertAt(L)}typeof g=="number"&&(c[g]=void 0);const b=this.isTemplate();let $=1;for(let P=0;P<u.length;P++){const L=u[P];b||this.name==="switch"&&P>0||this.name==="tag"&&P>1||(L[0]=L.join("="),L.length=1),L.length===1&&(L.unshift($),$++),this.insertAt(new Tn(...L,x,c))}this.seal("modifier")}get type(){return p(this,t)}get module(){}get function(){}setModifier(h){const{parserFunction:[,,u,x]}=this.getAttribute("config"),c=J(h).trim();if(h&&!c.endsWith(":"))return!1;const g=c.slice(0,-1).toLowerCase(),v=u.includes(g),_=x.includes(g);return p(this,s)&&v||!p(this,s)&&(_||!h)||(et.running||this.length>1)&&(v||_||!h)?(this.setAttribute("modifier",h),C(this,s,v),!!h):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(C(this,i,E(this,n,Hs).call(this)),this.setAttribute("name",p(this,i).title))}toString(h){const{childNodes:u,length:x,firstChild:c,modifier:g,type:v}=this;return`{{${g}${v==="magic-word"?c.toString(h)+(x===1?"":p(this,e))+u.slice(1).map(_=>_.toString(h)).join("|"):super.toString(h,"|")}}}`}text(){const{childNodes:h,length:u,firstChild:x,modifier:c,type:g,name:v}=this;return g==="magic-word"&&v==="vardefine"?"":`{{${c}${g==="magic-word"?x.text()+(u===1?"":p(this,e))+St(h.slice(1),"|"):super.text("|")}}}`}getAttribute(h){switch(h){case"padding":return this.modifier.length+2;case"title":return p(this,i);case"colon":return p(this,e);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!E(this,n,Hs).call(this).valid);default:return super.getAttribute(h)}}lint(h=this.getAbsoluteIndex(),u){}insertAt(h,u=this.length){return super.insertAt(h,u),h.anon?E(this,n,$n).call(this,h):h.name&&this.getArgs(h.name,!1,!1).add(h),h}getAllArgs(){return this.childNodes.filter(cr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:h})=>h)}getArgs(h,u,x=!0){const c=String(h).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let g;return p(this,r).has(c)?g=p(this,r).get(c):(g=new Set(this.getAllArgs().filter(({name:v})=>c===v)),p(this,r).set(c,g)),g}getDuplicatedArgs(){return[...p(this,r)].filter(([,{size:h}])=>h>1).map(([h,u])=>[h,[...u]])}getPossibleValues(){const{type:h,name:u,childNodes:x}=this;if(h==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let c,g;switch(u){case"if":case"ifexist":case"ifexpr":case"iferror":c=2;break;case"ifeq":c=3;break;case"switch":{const v=x.slice(2),_=v[v.length-1];g=[...v.filter(({anon:A})=>!A),..._!=null&&_.anon?[_]:[]].map(({lastChild:A})=>A);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}g!=null||(g=x.slice(c,c+2).map(({lastChild:v})=>v));for(let v=0;v<g.length;){const{length:_,0:A}=g[v].childNodes.filter(S=>S.text().trim());if(_===0)g.splice(v,1);else if(_>1||A.type!=="magic-word")v++;else try{const S=A.getPossibleValues();g.splice(v,1,...S),v+=S.length}catch{v++}}return g}print(){const{childNodes:h,length:u,firstChild:x,modifier:c,type:g}=this;return`<span class="wpb-${g}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${g==="magic-word"?ce(c)+x.print()+(u===1?"":p(this,e))+Bt(h.slice(1),{sep:"|"}):(c?`<span class="wpb-magic-word">${ce(c)}</span>`:"")+Bt(h,{sep:"|"})}}}</span>`}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakSet,Hs=function(){const h=this.type==="template";return this.normalizeTitle(this.childNodes[h?0:1].text(),h?10:828,{temporary:!0})},$n=function(h){const u=this.getAnonArgs(),x=typeof h!="number";for(let c=x?u.indexOf(h):h-1;c<u.length;c++){const g=u[c],{name:v}=g,_=String(c+1);(v!==_||g===h)&&(g.setAttribute("name",_),this.getArgs(_,!1,!1).add(g))}},o),hs=q(ii),Lt=B(hs,0,"TranscludeToken",ri,Lt),O(hs,1,Lt)}}),ni,us,ai,se,vl=m({"src/hidden.ts"(){"use strict";Mt(),F(),ni=[Tt()],se=class extends(ai=I){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}},us=q(ai),se=B(us,0,"HiddenToken",ni,se),O(us,1,se)}}),li,ds,oi,re,bl=m({"src/arg.ts"(){"use strict";var t,wl,s;G(),mt(),Oe(),ot(),F(),vt(),vl(),li=[at,ht("{{{"),me()],re=(s=class extends(oi=I){constructor(i,n,a=[]){super(void 0,n,a,{});k(this,t);for(let l=0;l<i.length;l++){const o=i[l];if(l===0){const d=new V(o,"arg-name",n,a,{});super.insertAt(d)}else if(l>1){const d=new se(o,n,a);super.insertAt(d)}else{const d=new I(o,n,a);d.type="arg-default",d.setAttribute("stage",2),super.insertAt(d)}}}get type(){return"arg"}get default(){}toString(i){return`{{{${super.toString(i,"|")}}}}`}text(){return`{{{${St(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(i=this.getAbsoluteIndex(),n){}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(i,n=this.getAbsoluteIndex()){const a=super.json(void 0,n)}},t=new WeakSet,wl=function(){},s),ds=q(oi),re=B(ds,0,"ArgToken",li,re),O(ds,1,re)}}),kn={};M(kn,{parseBraces:()=>Me});var hi,ps,Ae,cs,gs,xs,ui,fs,Me,rr=m({"parser/braces.ts"(){"use strict";xe(),G(),Sn(),ml(),bl(),hi={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ps=String.raw`\[(?!\[)`,Ae=String.raw`\n(?![=\0])`,cs=String.raw`|\{{2,}`,gs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),xs=ue(t=>new RegExp(t,"gmu")),ui=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ps}|${Ae})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Ae})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ps}|${Ae})*\}-`,"gu"),fs=t=>{const e=Ot(J(t));return gs.has(e)?gs.get(e):/^(?:filepath|(?:full|canonical)urle?):./u.test(e)?"m":/^#vardefine:./u.test(e)?"n":"t"},Me=(t,e,s)=>{var g,v,_,A,S;const r=String.raw`${e.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,i]}=e,n=[],a=[],l=(y,w,N,j)=>{w[w.length-1].push(Z(y.slice(N,j),a))};let o;do o!==void 0&&(t=o),o=t.replace(ui,(y,w,N)=>{if(w!==void 0||typeof N=="string")try{const{length:j}=s,f=(w!=null?w:N).split("|");return new Lt(Z(f[0],a),f.slice(1).map(b=>{const $=b.indexOf("=");return($===-1?[b]:[b.slice(0,$),b.slice($+1)]).map(T=>Z(T,a))}),e,s),`\0${j}${fs(f[0])}`}catch(j){if(!(j instanceof SyntaxError)||j.message!=="Invalid template name")throw j}return a.push(Z(y,a)),`\0${a.length-1}`});while(o!==t);t=o;const d=t.lastIndexOf("}}")-t.length;let h=d+t.length!==-1,u=xs(r+(h?cs:"")),x=u.exec(t),c;for(;x||c!==void 0&&c<=t.length&&((v=(g=n[n.length-1])==null?void 0:g[0])!=null&&v.startsWith("="));){if(x!=null&&x[1]){const[,{length:L}]=x;x[0]=x[0].slice(L),x.index+=L}const{0:y,index:w}=x!=null?x:{0:`
8
+ `,index:t.length},N=(_=n.pop())!=null?_:{},{0:j,index:f,parts:b,findEqual:$,pos:T}=N,W=y==="="&&$;if(y==="]]"||y==="}-")c=w+2;else if(y===`
9
+ `){c=w+1;const{pos:L,findEqual:H}=(A=n[n.length-1])!=null?A:{};if(L===void 0||H||J(t.slice(L,f))!==""){const X=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(t.slice(f,w));X&&(X[2]=Z(X[2],a),X[2].includes(`
10
+ `)||(t=`${t.slice(0,f)}\0${s.length}h${t.slice(w)}`,c=f+4+String(s.length).length,new Ft(X[1].length,X.slice(2),e,s)))}}else if(y==="|"||W)c=w+1,l(t,b,T,w),y==="|"&&b.push([]),N.pos=c,N.findEqual=y==="|",n.push(N);else if(y.startsWith("}}")){const L=y.slice(0,Math.min(j.length,3)),H=j.length-L.length,{length:X}=s;c=w+L.length,l(t,b,T,w);let Ct=!1,dt="t";if(L.length===3){const st=b.map(De=>De.join("=")),pt=st.length>1&&J(st[1]).trim();new re(st,e,s),pt&&pt.endsWith(":")&&i.includes(pt.slice(0,-1).toLowerCase())&&(dt="s")}else try{new Lt(b[0][0],b.slice(1),e,s),dt=fs(b[0][0])}catch(st){if(st instanceof SyntaxError&&st.message==="Invalid template name")Ct=!0;else throw st}Ct||(t=`${t.slice(0,f+H)}\0${X}${dt}${t.slice(c)}`,c=f+H+3+String(X).length,H>1?n.push({0:j.slice(0,H),index:f,pos:f+H,parts:[[]]}):H===1&&t[f-1]==="-"&&n.push({0:"-{",index:f-1,pos:f+1,parts:[[]]}))}else c=w+y.length,y.startsWith("{")&&(x.pos=c,x.parts=[[]]),n.push(..."0"in N?[N]:[],x);let P=n[n.length-1];if(h&&d+t.length<c)for(h=!1;(S=P==null?void 0:P[0])!=null&&S.startsWith("{");)n.pop(),P=n[n.length-1];u=xs(r+(h?cs:"")+(P?`|${hi[P[0][0]]}${P.findEqual?"|=":""}`:"")),u.lastIndex=c,x=u.exec(t)}return Z(t,a)}}}),Cn={};M(Cn,{InputboxToken:()=>In});var In,_l=m({"src/paramTag/inputbox.ts"(){"use strict";Ue(),rr(),Q(),yn(),In=class extends Nt{constructor(t,e,s=U.getConfig(),r=[]){const i=Symbol("InputboxToken"),n=s.excludes.includes("heading")?s:{...s,excludes:[...s.excludes,"heading"]},{length:a}=r;r.push(i),e&&(e=ve(e,n,r,t)),e&&(e=Me(e,n,r)),r.splice(a,1),super(t,e,n,r,{})}}}}),Ie={};M(Ie,{NestedToken:()=>Nn});var Nn,ms=m({"src/nested.ts"(){"use strict";var t,e,s;Ue(),rr(),F(),Jn(),bt(),Nn=(s=class extends I{constructor(i,n,a,l,o=[]){if(typeof n=="boolean"){const d=Symbol("NestedToken"),{length:h}=o;o.push(d),i&&(i=ve(i,l,o,n)),i&&(i=Me(i,l,o)),o.splice(h,1)}else i&&(i=i.replace(n,(d,h,u,x,c)=>{const g=`\0${o.length+1}e`;return new Rt(h,u,x,c,l,!1,o),g}));i&&(i=i.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(d,h,u)=>(new z(u,l,o),`${h}\0${o.length}n`)));super(i,l,o);k(this,t);k(this,e);C(this,t,[...a]),C(this,e,n)}get type(){return"ext-inner"}lint(i=this.getAbsoluteIndex(),n){}},t=new WeakMap,e=new WeakMap,s)}});function di(t,e,s,r,i){e=J(e).trim();let n=e.replace(t==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(t){case"width":return!n&&!!e||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(n);case"link":{if(n){if(Fn(s.protocol).test(n))return Ln(s.protocol).test(n)&&e;n.startsWith("[[")&&n.endsWith("]]")&&(n=n.slice(2,-2))}else return e;const a=U.normalizeTitle(n,0,!1,s,{halfParsed:r,decode:!0,selfLink:!0});return a.valid&&a}case"lang":return(i==="svg"||i==="svgz")&&!/[^a-z\d-]/u.test(n);case"alt":case"class":case"manualthumb":return!0;case"page":return(i==="djvu"||i==="djv"||i==="pdf")&&Number(n)>0;default:return!!n&&!isNaN(n)}}var Fn,Ln,pi,ci,En,Al=m({"src/imageParameter.ts"(){"use strict";var t,e,Pn,i;xe(),G(),ft(),Q(),F(),Fn=ue(n=>new RegExp(String.raw`^(?:${n}|//|\0\d+m\x7F)`,"iu")),Ln=ue(n=>new RegExp(String.raw`^(?:(?:${n}|//)${de}|\0\d+m\x7F)${pe}$`,"iu")),pi=ue(n=>new RegExp(String.raw`^(\s*(?!\s))${n.replace("$1","(.*)")}${n.endsWith("$1")?`(?=$|
11
+ )`:""}(\s*)$`,"u")),ci=new Set(["alt","link","lang","page","caption"]),En=(i=class extends I{constructor(a,l,o,d){var n=(...r)=>(super(...r),k(this,e),k(this,t,""),this);let h;const u=Object.entries(o.img).map(([c,g])=>[c,g,pi(c)]),x=u.find(([,c,g])=>(h=g.exec(a),h&&(h.length!==4||di(c,h[2],o,!0,l)!==!1)));if(x&&h){h.length===3?(n(void 0,o,d),C(this,t,a)):(n(h[2],o,d,{}),C(this,t,h[1]+x[0]+h[3])),this.setAttribute("name",x[1]),x[1]==="alt"&&this.setAttribute("stage",tt-1);return}n(a,o.excludes.includes("list")?o:{...o,excludes:[...o.excludes,"list"]},d),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?di("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var a;(a=this.parentNode)!=null&&a.is("gallery-image")&&!ci.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(a){return p(this,t)?p(this,t).replace("$1",super.toString(a)):super.toString(a)}text(){return p(this,t)?p(this,t).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(a){return a==="invalid"?this.name==="invalid":a==="padding"?Math.max(0,p(this,t).indexOf("$1")):super.getAttribute(a)}lint(a=this.getAbsoluteIndex(),l){}getValue(){return this.name==="invalid"?this.text():E(this,e,Pn).call(this)||super.text()}print(){return p(this,t)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${p(this,t).replace("$1",`<span class="wpb-image-caption">${Bt(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}},t=new WeakMap,e=new WeakSet,Pn=function(){return p(this,t)&&!p(this,t).includes("$1")},i)}}),gi,ir,jn=m({"src/link/file.ts"(){"use strict";Re(),Al(),gi=t=>{if(t===void 0)return[];const e=/-\{|\}-|\|/gu,s=[];let r=e.exec(t),i=0,n=0;for(;r;){const{0:a,index:l}=r;a!=="|"?i+=a==="-{"?1:-1:i===0&&(s.push(t.slice(n,l)),{lastIndex:n}=e),r=e.exec(t)}return s.push(t.slice(n)),s},ir=class extends xt{get type(){return"file"}get extension(){}constructor(t,e,s,r=[],i="|"){super(t,void 0,s,r,i);const{extension:n}=this.getTitle(!0,!0);this.safeAppend(gi(e).map(a=>new En(a,n,s,r)))}lint(t=this.getAbsoluteIndex(),e){}getAllArgs(){return this.childNodes.slice(1)}getArgs(t){return this.getAllArgs().filter(({name:e})=>t===e)}getArg(t){const e=this.getArgs(t);return e[t==="manualthumb"?0:e.length-1]}getValue(t){var e;return(e=this.getArg(t))==null?void 0:e.getValue()}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),xi,vs,fi,Et,Rn=m({"src/link/galleryImage.ts"(){"use strict";var t,On,s;ft(),mt(),F(),jn(),xi=[ht("")],Et=(s=class extends(fi=ir){constructor(i,n,a,l,o=[]){let d;if(a!==void 0){const{length:h}=o;d=new I(a,l,o);for(let u=0;u<tt-1;u++)d.parseOnce();o.splice(h,1)}super(n,d==null?void 0:d.toString(),l,o);k(this,t);lt(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${i}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(i){const n=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),n?0:6,{halfParsed:!0,temporary:i,decode:!n})}lint(i=this.getAbsoluteIndex(),n){}getAttribute(i){return i==="invalid"?E(this,t,On).call(this):super.getAttribute(i)}},t=new WeakSet,On=function(){const{ns:i}=this.getAttribute("title");return i!==6},s),vs=q(fi),Et=B(vs,0,"GalleryImageToken",xi,Et),O(vs,1,Et)}}),Bn={};M(Bn,{GalleryToken:()=>ie});var mi,bs,vi,ie,yl=m({"src/gallery.ts"(){"use strict";var t,qn,Sl,r;sr(),F(),Rn(),bt(),mi=[We],ie=(r=class extends(vi=I){constructor(n,a,l=[]){var o;super(void 0,a,l,{});k(this,t);for(const d of(o=n==null?void 0:n.split(`
12
+ `))!=null?o:[]){const h=/^([^|]+)(?:\|(.*))?/u.exec(d);if(!h){super.insertAt(d.trim()?new z(d,a,l):d);continue}const[,u,x]=h;E(this,t,qn).call(this,u)?super.insertAt(new Et("gallery",u,x,a,l)):super.insertAt(new z(d,a,l))}}get type(){return"ext-inner"}get widths(){}get heights(){}lint(n=this.getAbsoluteIndex(),a){}json(n,a=this.getAbsoluteIndex()){const l=super.json(void 0,a)}},t=new WeakSet,qn=function(n){return this.normalizeTitle(n,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},Sl=function(n){},r),bs=q(vi),ie=B(bs,0,"GalleryToken",mi,ie),O(bs,1,ie)}}),nr,Wn=m({"src/link/index.ts"(){"use strict";xe(),Re(),nr=class extends xt{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():Le(this.firstChild.text().replace(/^\s*:?/u,""))}lint(t=this.getAbsoluteIndex(),e){}}}}),bi,wi,ge,ar=m({"src/magicLink.ts"(){"use strict";var t,e,Mn,r;G(),Q(),F(),bi=String.raw`(?:[${At}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,wi=new RegExp(`${bi}+`,"gu"),ge=(r=class extends I{constructor(n,a="free-ext-link",l=U.getConfig(),o){super(n,l,o,{});k(this,e);k(this,t);C(this,t,a)}get type(){return p(this,t)}get innerText(){const n=new Map([["!","|"],["=","="]]);let a=St(this.childNodes.map(l=>{const{type:o}=l,d=String(l.name);return o==="magic-word"&&n.has(d)?n.get(d):l}));return this.type==="magic-link"&&(a=a.replace(wi," ")),a}get link(){const{innerText:n}=this;return this.type==="magic-link"?n.startsWith("ISBN")?`ISBN ${n.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:n:en(n).replace(/\n/gu,"%0A")}lint(n=this.getAbsoluteIndex(),a){}getUrl(n){this.lspError("MagicLinkToken.getUrl")}getAttribute(n){return n==="invalid"?E(this,e,Mn).call(this):super.getAttribute(n)}},t=new WeakMap,e=new WeakSet,Mn=function(){if(this.type==="magic-link"){const{link:n}=this;if(n.startsWith("ISBN")){const a=[...n.slice(5)].map(l=>l==="X"?10:Number(l));return a.length===10?a.reduce((l,o,d)=>l+o*(10-d),0)%11!==0:a.length===13&&(a[12]===10||a.reduce((l,o,d)=>l+o*(d%2?3:1),0)%10!==0)}}return!1},r)}}),_i,ws,Ai,Pt,Un=m({"src/extLink.ts"(){"use strict";var t,e;ft(),mt(),F(),ar(),_i=[ht("[")],Pt=(e=class extends(Ai=I){constructor(r,i="",n="",a,l=[]){super(void 0,a,l,{});k(this,t);const o=r&&/^\0\d+f\x7F$/u.test(r)?l[Number(r.slice(1,-2))]:new ge(r,"ext-link-url",a,l);if(this.insertAt(o),C(this,t,i),n){const d=new I(n,a,l,{});d.type="ext-link-text",d.setAttribute("stage",tt-1),this.insertAt(d)}}get type(){return"ext-link"}toString(r){return this.length===1?`[${super.toString(r)}${p(this,t)}]`:`[${super.toString(r,p(this,t))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return p(this,t).length}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print(this.length===1?{pre:"[",post:`${p(this,t)}]`}:{pre:"[",sep:p(this,t),post:"]"})}},t=new WeakMap,e),ws=q(Ai),Pt=B(ws,0,"ExtLinkToken",_i,Pt),O(ws,1,Pt)}}),Gs,Tl=m({"src/imagemapLink.ts"(){"use strict";F(),bt(),Wn(),Un(),Gs=class extends I{get type(){return"imagemap-link"}constructor(t,e,s,r,i=[]){super(void 0,r,i),this.append(t,e.length===2?new nr(...e,r,i):new Pt(...e,r,i),new z(s,r,i))}}}}),Dn={};M(Dn,{ImagemapToken:()=>ne});var yi,_s,Si,ne,$l=m({"src/imagemap.ts"(){"use strict";ut(),sr(),Q(),F(),bt(),Rn(),Tl(),yi=[We],ne=class extends(Si=I){get type(){return"ext-inner"}get image(){return this.childNodes.find(cr("imagemap-image"))}constructor(t,e=U.getConfig(),s=[]){if(super(void 0,e,s,{}),!t)return;const r=t.split(`
13
+ `),i=new Set(e.protocol.split("|")),n=z;let a=!0,l=!1;for(const o of r){const d=o.trim();if(!(l||!d||d.startsWith("#"))){if(a){const h=o.indexOf("|"),u=h===-1?o:o.slice(0,h),{valid:x,ns:c}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(x&&c===6){const g=new Et("imagemap",u,h===-1?void 0:o.slice(h+1),e,s);super.insertAt(g),a=!1;continue}else l=!0}else if(o.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(o);continue}else if(o.includes("[")){const h=o.indexOf("["),u=o.slice(h),x=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(u);if(x){if(this.normalizeTitle(x[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Gs(o.slice(0,h),x.slice(1),u.slice(u.indexOf("]]")+2),e,s));continue}}else if(u.startsWith("[//")||i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){const c=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(c){super.insertAt(new Gs(o.slice(0,h),c.slice(1),u.slice(u.indexOf("]")+1),e,s));continue}}}}super.insertAt(new n(o,e,s))}}lint(t=this.getAbsoluteIndex(),e){}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}},_s=q(Si),ne=B(_s,0,"ImagemapToken",yi,ne),O(_s,1,ne)}}),Ti,As,$i,jt,zn=m({"src/nowiki/comment.ts"(){"use strict";Mt(),mt(),kt(),Ti=[Tt(!1),ht("<!--")],jt=class extends($i=nt){constructor(e,s,r,i){super(e,r,i);lt(this,"closed");this.closed=s}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}},As=q($i),jt=B(As,0,"CommentToken",Ti,jt),O(As,1,jt)}}),Hn={};M(Hn,{CommentedToken:()=>Gn});var Gn,kl=m({"src/commented.ts"(){"use strict";F(),zn(),Gn=class extends I{get type(){return"ext-inner"}constructor(t,e,s=[]){if(super(void 0,e,s,{AstText:":",CommentToken:":"}),t){let r=t.indexOf("<!--"),i=r!==-1&&t.indexOf("-->",r+4),n=0;for(;i!==!1&&i!==-1;)r>n&&this.insertAt(t.slice(n,r)),this.insertAt(new jt(t.slice(r+4,i),!0,e,s)),n=i+3,r=t.indexOf("<!--",n),i=r!==-1&&t.indexOf("-->",r+4);n<t.length&&this.insertAt(t.slice(n))}}lint(t=this.getAbsoluteIndex()){}}}}),Vn={};M(Vn,{NowikiToken:()=>Qn});var ki,Qn,Cl=m({"src/nowiki/index.ts"(){"use strict";var t,Xn,s;kt(),ki=new Set(["languages","section","templatestyles"]),Qn=(s=class extends nt{constructor(){super(...arguments);k(this,t)}get type(){return"ext-inner"}lint(i=this.getAbsoluteIndex()){}getAttribute(i){return i==="invalid"?E(this,t,Xn).call(this):super.getAttribute(i)}},t=new WeakSet,Xn=function(){const{name:i,firstChild:{data:n}}=this;return ki.has(i)&&!!n},s)}}),Ci,ys,Ii,Rt,Jn=m({"src/tagPair/ext.ts"(){"use strict";Q(),tr(),F(),Zs(),er(),Ci=[Be()],Rt=class extends(Ii=_t){get type(){return"ext"}constructor(t,e,s,r,i=U.getConfig(),n=!1,a=[]){const l=t.toLowerCase(),o=new qe(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),d={...i,ext:i.ext.filter(u=>u!==l),excludes:[...i.excludes],inExt:!0};let h;switch(l){case"tab":d.ext=d.ext.filter(u=>u!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&d.excludes.push("heading"),h=new I(s,d,a);break;case"pre":{const{PreToken:u}=(xl(),R(wn));h=new u(s,d,a);break}case"dynamicpagelist":{const{ParamTagToken:u}=(yn(),R(An));h=new u(n,s,d,a);break}case"inputbox":{const{InputboxToken:u}=(_l(),R(Cn));h=new u(n,s,d,a);break}case"references":{const{NestedToken:u}=(ms(),R(Ie));d.excludes.push("heading"),h=new u(s,n,["ref"],d,a);break}case"choose":{const{NestedToken:u}=(ms(),R(Ie));h=new u(s,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],d,a);break}case"combobox":{const{NestedToken:u}=(ms(),R(Ie));h=new u(s,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],d,a);break}case"gallery":{const{GalleryToken:u}=(yl(),R(Bn));h=new u(s,d,a);break}case"imagemap":{const{ImagemapToken:u}=($l(),R(Dn));h=new u(s,d,a);break}case"hiero":{const{CommentedToken:u}=(kl(),R(Hn));h=new u(s,d,a);break}default:{const{NowikiToken:u}=(Cl(),R(Vn));h=new u(s,d,a)}}h.setAttribute("name",l),h.type==="plain"&&(h.type="ext-inner"),super(t,o,h,r,i,a),this.seal("closed",!0)}lint(t=this.getAbsoluteIndex(),e){}},ys=q(Ii),Rt=B(ys,0,"ExtToken",Ci,Rt),O(ys,1,Rt)}}),Kn={};M(Kn,{parseCommentAndExt:()=>ve});var Ss,Ni,ye,Fi,Ts,ve,Ue=m({"parser/commentAndExt.ts"(){"use strict";xe(),G(),ul(),bt(),dl(),pl(),Jn(),zn(),Ss="<onlyinclude>",Ni="</onlyinclude>",{length:ye}=Ss,Fi=[!1,!0].map(t=>{const e=t?"includeonly":"(?:no|only)include",s=t?"noinclude":"includeonly";return sn(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${e}(?:\s[^>]*)?/?>|</${e}\s*>|<(${r.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu"))}),Ts=t=>{const e=t.indexOf(Ss);return{i:e,j:t.indexOf(Ni,e+ye)}},ve=(t,e,s,r)=>{if(r){let{i:o,j:d}=Ts(t);if(o!==-1&&d!==-1){let h="";const u=x=>{new z(x,e,s),h+=`\0${s.length-1}n`};for(;o!==-1&&d!==-1;){const x=`\0${s.length}e`;new te(t.slice(o+ye,d),e,s),o>0&&u(t.slice(0,o)),h+=x,t=t.slice(d+ye+1),{i:o,j:d}=Ts(t)}return t&&u(t),h}}const{ext:i}=e,n=i.filter(o=>o!=="translate"&&o!=="tvar"),a={...e,ext:n};if(i.includes("translate")){const o=[];t=t.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,d=>(o.push(d),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(d,h,u)=>{const x=s.length;return new cn(h,u&&Z(u,o),a,s),`\0${x}g`}),t=Z(t,o)}const l=Fi[r?1:0](n);return l.lastIndex=0,l.test(t)?t.replace(l,(o,d,h,u,x,c,g,v,_)=>{const A=s.length;let S="n";if(d)S="e",new Rt(d,h,u,x,a,c,s);else if(o.startsWith("<!--")){S="c";const y=o.endsWith("-->");new jt(Z(o,s,1).slice(4,y?-3:void 0),y,e,s)}else c?new ee(c,g&&Z(g,s,1),v&&Z(v,s,1),_,e,s):new z(o,e,s);return`\0${A}${S}`}):t}}}),Li,$s,Ei,ae,Il=m({"src/html.ts"(){"use strict";var t,e,s,r,i;fe(),ut(),tr(),Q(),F(),Li=[Be()],ae=(i=class extends(Ei=I){constructor(a,l,o,d,h,u){super(void 0,h,u);k(this,t);k(this,e);k(this,s);k(this,r);this.insertAt(l),this.setAttribute("name",a.toLowerCase()),C(this,t,o),C(this,e,d),C(this,s,a)}get type(){return"html"}get selfClosing(){return p(this,e)}get closing(){return p(this,t)}toString(a){return`<${this.closing?"/":""}${p(this,s)}${super.toString(a)}${p(this,e)?"/":""}>`}text(){const{closing:a}=this,l=p(this,s)+(a?"":super.text());return`<${a?"/":""}${l}${p(this,e)?"/":""}>`}getAttribute(a){return a==="invalid"?this.inTableAttrs()===2:a==="padding"?p(this,s).length+(this.closing?2:1):super.getAttribute(a)}lint(a=this.getAbsoluteIndex(),l){}findMatchingTag(){return yt(p(this,r),()=>{const{name:a,parentNode:l,closing:o,selfClosing:d}=this,{html:[,h,u]}=this.getAttribute("config"),x=u.includes(a),c=h.includes(a);if(x||c&&d)return this;if(!l)return;const{childNodes:g}=l,v=g.indexOf(this),_=o?g.slice(0,v).reverse():g.slice(v+1),A=[this],{rev:S}=et;for(const y of _)if(!(!y.is("html")||y.name!==a||c&&p(y,e)))if(p(y,t)===o)A.push(y);else{const w=A.pop();if(w===this)return y;U.viewOnly&&(C(w,r,[S,y]),C(y,r,[S,w]))}if(U.viewOnly)for(const y of A)C(y,r,[S,void 0])},a=>{C(this,r,a),a[1]&&a[1]!==this&&C(a[1],r,[et.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${p(this,s)}`,post:`${p(this,e)?"/":""}&gt;`})}json(a,l=this.getAbsoluteIndex()){const o=super.json(void 0,l)}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i),$s=q(Ei),ae=B($s,0,"HtmlToken",Li,ae),O($s,1,ae)}}),Yn={};M(Yn,{parseHtml:()=>Zn});var Pi,Zn,Nl=m({"parser/html.ts"(){"use strict";er(),Il(),Pi=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Zn=(t,e,s)=>{var a;const{html:r}=e;(a=e.htmlElements)!=null||(e.htmlElements=new Set([...r[0],...r[1],...r[2]]));const i=t.split("<");let n=i.shift();for(const l of i){const o=Pi.exec(l),d=o==null?void 0:o[2],h=d==null?void 0:d.toLowerCase();if(!o||!e.htmlElements.has(h)){n+=`<${l}`;continue}const[,u,,x="",c,g]=o,{length:v}=s,_=new qe(x,"html-attrs",h,e,s),A=_.hasAttr("itemprop");if(h==="meta"&&!(A&&_.hasAttr("content"))||h==="link"&&!(A&&_.hasAttr("href"))){n+=`<${l}`,s.length=v;continue}n+=`\0${s.length}x${g}`,new ae(d,_,u==="/",c==="/>",e,s)}return n}}}),lr,ta=m({"src/table/base.ts"(){"use strict";tr(),F(),Ut(),er(),lr=class extends Be(1)(I){constructor(t,e,s,r,i,n=[],a){super(void 0,i,n,a),this.append(new $t(e,"table-syntax",i,n),new qe(r,"table-attrs",s,i,n))}escape(){}}}}),ji,ks,it,Se,Xt,Jt,Ee,ea=m({"src/table/td.ts"(){"use strict";Ys(),F(),ta(),Ee=class extends(ks=lr,ji=[je(!1)],ks){constructor(t,e,s,r=[]){var l;let i=/\||\0\d+!\x7F/u.exec(e!=null?e:""),n=i?e.slice(0,i.index):"";/\[\[|-\{/u.test(n)&&(i=null,n=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,t,"td",n,s,r),O(Se,5,this),gt(this,Xt),gt(this,it,""),i&&([el(this,it)._]=i);const a=new I(e==null?void 0:e.slice(((l=i==null?void 0:i.index)!=null?l:NaN)+D(this,it).length),s,r);a.type="td-inner",a.setAttribute("stage",4),this.insertAt(a)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return Bs(this,Xt,Jt).call(this).subtype}afterBuild(){D(this,it).includes("\0")&&Y(this,it,this.buildFromStr(D(this,it),0)),super.afterBuild()}toString(t){const{childNodes:[e,s,r]}=this;return e.toString(t)+s.toString(t)+D(this,it)+r.toString(t)}text(){const{childNodes:[t,e,s]}=this;return t.text()+e.text()+D(this,it)+s.text()}getGaps(t){return t===1?D(this,it).length:0}lint(t=this.getAbsoluteIndex(),e){}isIndependent(){return this.firstChild.text().startsWith(`
14
+ `)}getAttr(t){const e=super.getAttr(t);return t==="rowspan"||t==="colspan"?parseInt(e)||1:e}escape(){}print(){const{childNodes:[t,e,s]}=this;return`<span class="wpb-td">${t.print()}${e.print()}${D(this,it)}${s.print()}</span>`}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}},Se=q(ks),it=new WeakMap,Xt=new WeakSet,Jt=function(){var t;const e=this.firstChild.text(),s=e.slice(-1);let r="td";if(s==="!"?r="th":s==="+"&&(r="caption"),this.isIndependent())return{subtype:r};const{previousSibling:i}=this;return{...Bs(t=i,Xt,Jt).call(t)}},Jt=B(Se,17,"#getSyntax",ji,Xt,Jt),Xs(Se,Ee)}}),or,sa=m({"src/table/trBase.ts"(){"use strict";ta(),ea(),or=class extends lr{lint(t=this.getAbsoluteIndex(),e){}getRowCount(){return Number(this.childNodes.some(t=>t instanceof Ee&&t.isIndependent()&&!t.firstChild.text().endsWith("+")))}}}}),Ri,Oi,Bi,qi,Cs,Te,Ne,Fl=m({"src/table/index.ts"(){"use strict";ut(),Ys(),sa(),Ut(),Ri=(t,e)=>new Array(t).fill(void 0).map((s,r)=>e(r)),Oi=({type:t})=>t==="tr"||t==="table-syntax",Bi=class extends Array{},Ne=class extends(Cs=or,qi=[je(!1)],Cs){constructor(t,e,s,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,t,"table",e,s,r,{}),O(Te,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(t=this.getAbsoluteIndex(),e){}close(t=`
15
+ |}`,e){const s=this.getAttribute("config"),r=this.getAttribute("accum");et.run(()=>{const i=new $t(e?t:void 0,"table-syntax",s,r);super.insertAt(i)})}getLayout(t){const e=this.getAllRows(),{length:s}=e,r=Bi.from(Ri(s,()=>[]));for(let i=0;i<r.length;i++){const n=r[i];let a=0,l=0,o;for(const d of e[i].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(o=d.subtype!=="caption"),o){const h={row:i,column:a},{rowspan:u,colspan:x}=d;for(a++;n[l];)l++;for(let c=i;c<Math.min(i+u,s);c++)for(let g=l;g<l+x;g++)r[c][g]=h;l+=x}}else if(Oi(d))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(t=>t.is("tr")&&t.getRowCount()>0)]}getNthRow(t,e,s){const r=super.getRowCount();if(t===0&&r)return this;r&&t--;for(const i of this.childNodes.slice(2)){const{type:n}=i;if(n==="tr"&&i.getRowCount()&&(t--,t<0))return i}}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}},Te=q(Cs),B(Te,1,"getLayout",qi,Ne),Xs(Te,Ne)}}),ra,Ll=m({"src/table/tr.ts"(){"use strict";sa(),ra=class extends or{get type(){return"tr"}constructor(t,e,s,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,t,"tr",e,s,r)}}}}),hr,ia=m({"src/nowiki/listBase.ts"(){"use strict";kt(),hr=class extends nt{get indent(){}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ur,na=m({"src/nowiki/dd.ts"(){"use strict";ia(),ur=class extends hr{get type(){return"dd"}}}}),aa={};M(aa,{parseTable:()=>la});var Wi,Is,la,El=m({"parser/table.ts"(){"use strict";F(),Fl(),Ll(),ea(),na(),Wi=t=>t.lastChild.constructor!==I,Is=(t,e)=>t.is("td")?e.pop():t,la=({firstChild:{data:t},type:e,name:s},r,i)=>{const n=[],a=t.split(`
16
16
  `);let l=e==="root"||e==="parameter-value"||e==="ext-inner"&&s==="poem"?"":`
17
- ${a.shift()}`,o;const d=(h,u)=>{if(!u){l+=h;return}const{lastChild:x}=u;if(Wi(u)){const c=new I(h,r,i);c.type="table-inter",c.setAttribute("stage",3),u.insertAt(c)}else x.setText(x.toString()+h)};for(const h of a){o=n.pop();const[u]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(h),x=h.slice(u.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(x);if(c){for(;o&&!o.is("td");)o=n.pop();const[,T,w,N,j]=c;T&&new ur(T,r,i),d(`
18
- ${u}${T&&`\0${i.length-1}d`}${w}\0${i.length}b`,o),n.push(...o?[o]:[],new Ne(N,j,r,i));continue}else if(!o){l+=`
17
+ ${a.shift()}`,o;const d=(h,u)=>{if(!u){l+=h;return}const{lastChild:x}=u;if(Wi(u)){const c=new I(h,r,i);c.type="table-inter",c.setAttribute("stage",3),u.insertAt(c)}else x.setText(x.toString()+h)};for(const h of a){o=n.pop();const[u]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(h),x=h.slice(u.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(x);if(c){for(;o&&!o.is("td");)o=n.pop();const[,y,w,N,j]=c;y&&new ur(y,r,i),d(`
18
+ ${u}${y&&`\0${i.length-1}d`}${w}\0${i.length}b`,o),n.push(...o?[o]:[],new Ne(N,j,r,i));continue}else if(!o){l+=`
19
19
  ${h}`;continue}const g=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(x);if(!g){d(`
20
- ${h}`,o),n.push(o);continue}const[,v,A,_,S]=g;if(v){for(;!o.is("table");)o=n.pop();o.close(`
21
- ${u}${v}`,!0),d(S,n[n.length-1])}else if(A){o=Is(o,n),o.is("tr")&&(o=n.pop());const T=new ra(`
22
- ${u}${A}`,S,r,i);n.push(o,T),o.insertAt(T)}else{o=Is(o,n);const T=_==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let w=T.exec(S),N=0,j=`
23
- ${u}${_}`;const f=b=>{const $=new Ee(j,S.slice(N,w==null?void 0:w.index),r,i);return b.insertAt($),$};for(;w;)f(o),{lastIndex:N}=T,[j]=w,w=T.exec(S);n.push(o,f(o))}}return l.slice(1)}}}),oa,Pl=m({"src/nowiki/hr.ts"(){"use strict";kt(),oa=class extends nt{get type(){return"hr"}}}}),Mi,Ns,Ui,le,jl=m({"src/nowiki/doubleUnderscore.ts"(){"use strict";Mt(),ft(),kt(),Mi=[Tt(),ht("__")],le=class extends(Ui=nt){get type(){return"double-underscore"}constructor(t,e,s,r){var l,o;super(t,s,r);const i=t.toLowerCase(),{doubleUnderscore:[,,n,a]}=s;this.setAttribute("name",(o=e?(l=a==null?void 0:a[t])==null?void 0:l.toLowerCase():n==null?void 0:n[i])!=null?o:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}},Ns=q(Ui),le=B(Ns,0,"DoubleUnderscoreToken",Mi,le),O(Ns,1,le)}}),ha={};M(ha,{parseHrAndDoubleUnderscore:()=>ua});var ua,Rl=m({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Pl(),jl(),Sn(),ua=({firstChild:{data:t},type:e,name:s},r,i)=>{var o,d,h;const{doubleUnderscore:[n,a,l]}=r;return(o=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(n)),(d=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(a)),(h=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(`__(${[...n,...a].join("|")})__`,"giu")),e!=="root"&&(e!=="ext-inner"||s!=="poem")&&(t=`\0${t}`),t=t.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(u,x,c)=>(new oa(c,r,i),`${x}\0${i.length-1}r`)).replace(r.regexHrAndDoubleUnderscore,(u,x)=>{var A;const c=r.sensitiveDoubleUnderscore.has(x),g=x.toLowerCase(),v=r.insensitiveDoubleUnderscore.has(g);return c||v?(new le(x,c,r,i),`\0${i.length-1}${v&&((A=l==null?void 0:l[g])!=null?A:g)==="toc"?"u":"n"}`):u}),r.excludes.includes("heading")||(t=t.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(u,x,c,g,v)=>{const A=`${x}\0${i.length}h`;return new Ft(c.length,[g,v],r,i),A})),e==="root"||e==="ext-inner"&&s==="poem"?t:t.slice(1)}}}),da,Ol=m({"src/nowiki/quote.ts"(){"use strict";var t,e;kt(),da=(e=class extends nt{constructor(r,i,n,a){super(r,n,a);k(this,t);C(this,t,i)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:p(this,t).bold}:void 0,...this.italic?{italic:p(this,t).italic}:void 0}}text(){const{parentNode:r,innerText:i}=this;return r!=null&&r.is("image-parameter")&&r.name!=="caption"?"":i}lint(r=this.getAbsoluteIndex()){}json(r,i=this.getAbsoluteIndex()){const n=super.json(void 0,i)}},t=new WeakMap,e)}}),pa={};M(pa,{parseQuotes:()=>dr});var dr,ca=m({"parser/quotes.ts"(){"use strict";Ol(),dr=(t,e,s,r)=>{var c;const i=t.split(/('{2,})/u),{length:n}=i;if(n===1)return t;let a=0,l=0,o,d,h;for(let g=1;g<n;g+=2){const v=i[g].length;switch(v){case 2:l++;break;case 4:i[g-1]+="'",i[g]="'''";case 3:if(a++,o!==void 0)break;i[g-1].endsWith(" ")?d===void 0&&h===void 0&&(h=g):i[g-1].slice(-2,-1)===" "?o=g:d!=null||(d=g);break;default:i[g-1]+="'".repeat(v-5),i[g]="'''''",l++,a++}}if(l%2===1&&a%2===1){const g=(c=o!=null?o:d)!=null?c:h;g!==void 0&&(i[g]="''",i[g-1]+="'")}let u=!0,x=!0;for(let g=1;g<n;g+=2){const v=i[g].length,A=v!==2,_=v!==3;A&&(u=!u),_&&(x=!x),new da(i[g],{bold:A&&u,italic:_&&x},e,s),i[g]=`\0${s.length-1}q`}return i.join("")}}}),ga={};M(ga,{parseExternalLinks:()=>pr});var pr,xa=m({"parser/externalLinks.ts"(){"use strict";G(),Un(),ar(),pr=(t,e,s,r)=>{var i;return(i=e.regexExternalLinks)!=null||(e.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${e.protocol}|//)${de}|\0\d+m\x7F)${pe}(?=[[\]<>"\t${_t}]|\0\d)))([${_t}]*(?![${_t}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),t.replace(e.regexExternalLinks,(n,a,l,o)=>{const{length:d}=s,h=/&[lg]t;/u.exec(a);return h&&(l="",o=a.slice(h.index)+l+o,a=a.slice(0,h.index)),r?(new ge(a,"ext-link-url",e,s),`[\0${d}f${l}${o}]`):(new Pt(a,l,o,e,s),`\0${d}w`)})}}}),fa,Bl=m({"src/link/category.ts"(){"use strict";Re(),fa=class extends xt{get type(){return"category"}get sortkey(){}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ma={};M(ma,{parseLinks:()=>Vs});var Di,Vs,ql=m({"parser/links.ts"(){"use strict";G(),Q(),ca(),xa(),Wn(),jn(),Bl(),Di=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Vs=(t,e,s,r)=>{var l;(l=e.regexLinks)!=null||(e.regexLinks=new RegExp(String.raw`^\s*(?:${e.protocol}|//)`,"iu"));const i=e.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,n=t.split("[[");let a=n.shift();for(let o=0;o<n.length;o++){let d=!1,h,u,x,c;const g=n[o],v=i.exec(g);if(v)[,h,u,x,c]=v,c.startsWith("]")&&(x!=null&&x.includes("["))&&(x+="]",c=c.slice(1));else{const N=Di.exec(g);N&&(d=!0,[,h,u,x]=N)}if(h===void 0||e.regexLinks.test(h)||/\0\d+[exhbru]\x7F/u.test(h)){a+=`[[${g}`;continue}let A=J(h).trim();const _=A.startsWith(":");if(_&&d){a+=`[[${g}`;continue}else!A&&x&&!x.includes(`
24
- `)&&(A=J(x).trim());const{ns:S,valid:T}=U.normalizeTitle(A,0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(T){if(d){if(S!==6){a+=`[[${g}`;continue}let N=!1;for(o++;o<n.length;o++){const j=n[o],f=j.split("]]");if(f.length>2){N=!0,x+=`[[${f[0]}]]${f[1]}`,c=f.slice(2).join("]]");break}else if(f.length===2)x+=`[[${f[0]}]]${f[1]}`;else{x+=`[[${j}`;break}}if(x=Vs(x,e,s,r),!N){a+=`[[${h}${u}${x}`;continue}}}else{a+=`[[${g}`;continue}x&&(x=dr(x,e,s,r));let w=nr;_||(S===6?(x&&(x=pr(x,e,s,!0)),w=ir):S===14&&(w=fa)),x===void 0&&u&&(x=""),a+=`\0${s.length}l${c}`,new w(h,x,e,s,u)}return a}}}),va={};M(va,{parseMagicLinks:()=>ba});var Fs,Ls,Es,Ps,ba,Wl=m({"parser/magicLinks.ts"(){"use strict";G(),ar(),Fs=String.raw`[${_t}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Ls=`(?:${Fs})+`,Es=`(?:${Fs}|-)`,Ps=String.raw`(?:RFC|PMID)${Ls}\d+\b|ISBN${Ls}(?:97[89]${Es}?)?(?:\d${Es}?){9}[\dx]\b`,ba=(t,e,s)=>{if(!e.regexMagicLinks)try{e.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${e.protocol})(${de}${pe})|${Ps})`,"giu")}catch{e.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${e.protocol})(${de}${pe})|${Ps})`,"giu")}return t.replace(e.regexMagicLinks,(r,i,n)=>{let a=i?r.slice(i.length):r;if(n){let l="";const o=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);o&&(l=a.slice(o.index),a=a.slice(0,o.index));const d=a.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,h=d.exec(a);if(h){let u=1;h[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,h.index))&&(u=2),l=a.slice(h.index+u)+l,a=a.slice(0,h.index+u)}return l.length>=n.length?r:(new ge(a,void 0,e,s),`${i}\0${s.length-1}w${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new ge(a,"magic-link",e,s),`${i}\0${s.length-1}i`})}}}),wa,Ml=m({"util/html.ts"(){"use strict";wa=(t,e)=>t.startsWith(e)?e.length:[...e].findIndex((s,r)=>s!==t[r])}}),_a,Ul=m({"src/nowiki/list.ts"(){"use strict";ia(),_a=class extends hr{get type(){return"list"}}}}),Aa={};M(Aa,{parseList:()=>ya});var ya,Dl=m({"parser/list.ts"(){"use strict";Ml(),Ul(),na(),ya=(t,e,s,r)=>{const i=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(t);if(!i)return e.lastPrefix="",t;const[n,a,l,o]=i,d=l.replace(/;/gu,":"),h=wa(d,e.lastPrefix),u=((h>1?l.slice(h-1):l)+o).split(/(?=;)/u),x=u[0].startsWith(";");let c=u.length-(x?0:1);if(h>1){const y=l.slice(0,h-1);if(x){const W=y.split(/(?=;)/u);u.unshift(...W),c+=y.includes(";")?W.length:0}else u[0]=y+u[0]}e.lastPrefix=d;let g=a+u.map((y,W)=>`\0${r.length+W}d`).join("")+t.slice(n.length);for(const y of u)new _a(y,s,r);if(!c)return g;const{html:[v,,A]}=s,_=/:+|-\{|\0\d+[xq]\x7F/gu;let S=_,T=S.exec(g),w=0,N=!1,j=!1,f=0;const b=(y,W)=>(new ur(y,s,r),`${g.slice(0,W)}\0${r.length-1}d${g.slice(W+y.length)}`),$=y=>{y?w&&w--:w++};for(;T&&c;){const{0:y,index:W}=T;if(y==="-{"){if(!f){const{lastIndex:P}=S;S=/-\{|\}-/gu,S.lastIndex=P}f++}else if(y==="}-"){if(f--,!f){const{lastIndex:P}=S;S=_,S.lastIndex=P}}else if(y.endsWith("x")){const{name:P,closing:L,selfClosing:H}=r[Number(y.slice(1,-2))];(v.includes(P)||!H&&!A.includes(P))&&$(L)}else if(y.endsWith("q")){const{bold:P,italic:L}=r[Number(y.slice(1,-2))];P&&($(N),N=!N),L&&($(j),j=!j)}else if(w===0){if(y.length>=c)return b(y.slice(0,c),W);c-=y.length,S.lastIndex=W+4+String(r.length).length,g=b(y,W)}T=S.exec(g)}return g}}}),zi,Hi,js,Gi,oe,zl=m({"src/converterFlags.ts"(){"use strict";var t,e;Oe(),F(),mt(),zi=new Set(["A","T","R","D","-","H","N"]),Hi=[me()],oe=(e=class extends(Gi=I){constructor(r,i,n=[]){super(void 0,i,n,{});k(this,t);this.safeAppend(r.map(a=>new V(a,"converter-flag",i,n)))}get type(){return"converter-flags"}afterBuild(){C(this,t,this.childNodes.map(r=>r.text().trim())),super.afterBuild()}toString(r){return super.toString(r,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(p(this,t).filter(r=>/\{{3}[^{}]+\}{3}/u.test(r)))}getVariantFlags(){const r=new Set(this.getAttribute("config").variants);return new Set(p(this,t).filter(i=>r.has(i)))}isInvalidFlag(r,i,n,a){return typeof r=="object"&&(r=r.text().trim(),i=this.getVariantFlags(),n=this.getUnknownFlags(),a=new Set(p(this,t).filter(l=>zi.has(l)))),!!r&&!i.has(r)&&!n.has(r)&&(i.size>0||!a.has(r))}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print({sep:";"})}},t=new WeakMap,e),js=q(Gi),oe=B(js,0,"ConverterFlagsToken",Hi,oe),O(js,1,oe)}}),Fe,Hl=m({"src/converterRule.ts"(){"use strict";Q(),F(),mt(),Fe=class extends I{get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,s=U.getConfig(),r=[]){super(void 0,s,r);const i=t.indexOf(":"),n=t.slice(0,i).indexOf("=>"),a=n===-1?t.slice(0,i):t.slice(n+2,i);e&&s.variants.includes(a.trim().toLowerCase())?(super.insertAt(new V(a,"converter-rule-variant",s,r)),super.insertAt(new V(t.slice(i+1),"converter-rule-to",s,r)),n!==-1&&super.insertAt(new V(t.slice(0,n),"converter-rule-from",s,r),0)):super.insertAt(new V(t,"converter-rule-to",s,r))}toString(t){const{childNodes:e,firstChild:s,lastChild:r}=this;return e.length===3?`${s.toString(t)}=>${e[1].toString(t)}:${r.toString(t)}`:super.toString(t,":")}text(){const{childNodes:t,firstChild:e,lastChild:s}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${s.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){const{childNodes:t}=this;if(t.length===3){const[e,s,r]=t;return`<span class="wpb-converter-rule">${e.print()}=>${s.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),Vi,Rs,Qi,he,Gl=m({"src/converter.ts"(){"use strict";G(),ft(),ot(),F(),zl(),Hl(),Vi=[at,ht("-{")],he=class extends(Qi=I){get type(){return"converter"}constructor(t,e,s,r=[]){super(void 0,s,r),this.insertAt(new oe(t,s,r));const[i]=e,n=i.includes(":"),a=new Fe(i,n,s,r);n&&a.length===1||!n&&e.length===2&&!J(e[1]).trim()?this.insertAt(new Fe(e.join(";"),!1,s,r)):this.append(a,...e.slice(1).map(l=>new Fe(l,!0,s,r)))}toString(t){const{childNodes:[e,...s]}=this;return`-{${e.toString(t)}${e.length>0?"|":""}${s.map(r=>r.toString(t)).join(";")}}-`}text(){const{childNodes:[t,...e]}=this;return`-{${t.text()}|${yt(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){const{childNodes:[t,...e]}=this;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${Bt(e,{sep:";"})}}-</span>`}},Rs=q(Qi),he=B(Rs,0,"ConverterToken",Vi,he),O(Rs,1,he)}}),Sa={};M(Sa,{parseConverter:()=>Ta});var Ta,Vl=m({"parser/converter.ts"(){"use strict";Gl(),Ta=(t,e,s)=>{var o;(o=e.regexConverter)!=null||(e.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${e.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const r=/-\{/gu,i=/-\{|\}-/gu,n=[];let a=r,l=a.exec(t);for(;l;){const{0:d,index:h}=l;if(d==="}-"){const u=n.pop(),{length:x}=s,c=t.slice(u.index+2,h),g=c.indexOf("|"),[v,A]=g===-1?[[],c]:[c.slice(0,g).split(";"),c.slice(g+1)],_=A.replace(/(&[#a-z\d]+);/giu,"$1"),S=_.split(e.regexConverter).map(T=>T.replace(/\x01/gu,";"));new he(v,S,e,s),t=`${t.slice(0,u.index)}\0${x}v${t.slice(h+2)}`,n.length===0&&(a=r),a.lastIndex=u.index+3+String(x).length}else n.push(l),a=i,a.lastIndex=h+2;l=a.exec(t)}return t}}}),Pe={};M(Pe,{Token:()=>I});var I,F=m({"src/index.ts"(){"use strict";var t,e,s,r,i,n,a,l,$a,ka,Ca,Ia,Na,Fa,La,Ea,Pa,ja,Ra,Oa,w;G(),St(),fe(),ut(),Q(),nl(),al(),I=(w=class extends Yt{constructor(f,b=U.getConfig(),$=[],y){super();k(this,l);k(this,t,"plain");k(this,e,0);k(this,s);k(this,r);k(this,i);k(this,n,!1);k(this,a);typeof f=="string"&&this.insertAt(f),C(this,s,b),C(this,r,$),$.push(this)}get type(){return p(this,t)}set type(f){C(this,t,f)}parseOnce(f=p(this,e),b=!1,$){if(f<p(this,e)||this.length===0||!this.isPlain())return this;if(p(this,e)>=it)return this;switch(f){case 0:if(this.type==="root"){p(this,r).pop();const y=E(this,l,$a).call(this);b&&(b=!y)}C(this,i,b),E(this,l,ka).call(this,b);break;case 1:E(this,l,Ca).call(this);break;case 2:E(this,l,Ia).call(this);break;case 3:E(this,l,Na).call(this);break;case 4:E(this,l,Fa).call(this);break;case 5:E(this,l,La).call(this,$);break;case 6:E(this,l,Ea).call(this,$);break;case 7:E(this,l,Pa).call(this);break;case 8:E(this,l,ja).call(this);break;case 9:E(this,l,Ra).call(this);break;case 10:E(this,l,Oa).call(this)}if(this.type==="root")for(const y of p(this,r))y==null||y.parseOnce(f,b,$);return mr(this,e)._++,this}buildFromStr(f,b){const $=f.split(/[\0\x7F]/u).map((y,W)=>{if(W%2===0)return new Us(y);if(isNaN(y.slice(-1)))return p(this,r)[Number(y.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${y}`)});return b===0?$.map(String).join(""):b===1?yt($):$}build(){C(this,e,it);const{length:f,firstChild:b}=this,$=b==null?void 0:b.toString();if(f===1&&b.type==="text"&&$.includes("\0")&&(gr(this,0,1,this.buildFromStr($)),this.normalize(),this.type==="root"))for(const y of p(this,r))y==null||y.build()}afterBuild(){if(this.type==="root")for(const f of p(this,r))f==null||f.afterBuild();C(this,n,!0)}parse(f=it,b,$){for(f=Math.min(f,it);p(this,e)<f;)this.parseOnce(p(this,e),b,$);return f&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===w}getAttribute(f){var b;switch(f){case"config":return p(this,s);case"include":return(b=p(this,i))!=null?b:!!p(this.getRootNode(),i);case"accum":return p(this,r);case"built":return p(this,n);case"stage":return p(this,e);case"invalid":return this.type==="table-inter"&&ke(this)===2;default:return super.getAttribute(f)}}setAttribute(f,b){switch(f){case"stage":p(this,e)===0&&this.type==="root"&&p(this,r).shift(),C(this,e,b);break;default:super.setAttribute(f,b)}}insertAt(f,b=this.length){const $=typeof f=="string"?new Us(f):f;super.insertAt($,b);const{type:y}=$;return y==="root"&&($.type="plain"),$}normalizeTitle(f,b=0,$){return U.normalizeTitle(f,b,p(this,i),p(this,s),$)}inTableAttrs(){var f,b;return((f=this.closest("table-attrs,ext"))==null?void 0:f.type)==="table-attrs"&&((b=this.closest("table-attrs,arg,magic-word,template"))!=null&&b.is("table-attrs")?2:1)}inHtmlAttrs(){var f;return(f=this.closest("html-attrs,ext"))!=null&&f.is("html-attrs")?2:this.inTableAttrs()}lint(f=this.getAbsoluteIndex(),b){}toString(f,b){return f?super.toString(!0,b):At(p(this,a),()=>super.toString(!1,b),$=>{const y=this.getRootNode();y.type==="root"&&p(y,n)&&C(this,a,$)})}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,l=new WeakSet,$a=function(){const{parseRedirect:f}=(hl(),R(dn)),b=this.firstChild.toString(),$=f(b,p(this,s),p(this,r));return $&&this.setText($),!!$},ka=function(f){const{parseCommentAndExt:b}=(Ue(),R(Kn));this.setText(b(this.firstChild.toString(),p(this,s),p(this,r),f))},Ca=function(){const{parseBraces:f}=(rr(),R(kn)),b=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,$=f(b,p(this,s),p(this,r));this.setText(this.type==="root"?$:$.slice(1))},Ia=function(){if(p(this,s).excludes.includes("html"))return;const{parseHtml:f}=(Nl(),R(Yn));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},Na=function(){if(p(this,s).excludes.includes("table"))return;const{parseTable:f}=(El(),R(aa));this.setText(f(this,p(this,s),p(this,r)))},Fa=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:f}=(Rl(),R(ha));this.setText(f(this,p(this,s),p(this,r)))},La=function(f){const{parseLinks:b}=(ql(),R(ma));this.setText(b(this.firstChild.toString(),p(this,s),p(this,r),f))},Ea=function(f){if(p(this,s).excludes.includes("quote"))return;const{parseQuotes:b}=(ca(),R(pa)),$=this.firstChild.toString().split(`
25
- `);for(let y=0;y<$.length;y++)$[y]=b($[y],p(this,s),p(this,r),f);this.setText($.join(`
26
- `))},Pa=function(){if(p(this,s).excludes.includes("extLink"))return;const{parseExternalLinks:f}=(xa(),R(ga));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},ja=function(){if(p(this,s).excludes.includes("magicLink"))return;const{parseMagicLinks:f}=(Wl(),R(va));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},Ra=function(){if(p(this,s).excludes.includes("list"))return;const{parseList:f}=(Dl(),R(Aa)),{firstChild:b,type:$,name:y}=this,W=b.toString().split(`
27
- `),P={lastPrefix:""};let L=$==="root"||$==="ext-inner"&&y==="poem"?0:1;for(;L<W.length;L++)W[L]=f(W[L],P,p(this,s),p(this,r));this.setText(W.join(`
28
- `))},Oa=function(){if(p(this,s).variants.length>0){const{parseConverter:f}=(Vl(),R(Sa));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))}},w)}}),tt,cr,gr,ut=m({"util/debug.ts"(){"use strict";tt={running:!1,run(t){const{running:e}=this;this.running=!0;try{const{Token:s}=(F(),R(Pe)),r=t();return r instanceof s&&!r.getAttribute("built")&&r.afterBuild(),this.running=e,r}catch(s){throw this.running=e,s}},rev:0},cr=t=>e=>e.type===t,gr=(t,e,s,r=[])=>{var a,l;let i=t.getChildNodes(),n;i.length===s?(n=i,i=r):n=i.splice(e,s,...r);for(let o=0;o<r.length;o++){const d=r[o];d.setAttribute("parentNode",t),d.setAttribute("nextSibling",i[e+o+1]),d.setAttribute("previousSibling",i[e+o-1])}return(a=i[e-1])==null||a.setAttribute("nextSibling",i[e]),(l=i[e+r.length])==null||l.setAttribute("previousSibling",i[e+r.length-1]),i===r&&t.setAttribute("childNodes",i),n}}}),Ba={};M(Ba,{Title:()=>qa});var qa,Ql=m({"lib/title.ts"(){"use strict";var t,e,s,r,i,n;xe(),G(),qa=(n=class{constructor(a,l,o,{temporary:d,decode:h,selfLink:u}={}){k(this,t);k(this,e);k(this,s);k(this,r);k(this,i);lt(this,"valid");lt(this,"encoded",!1);const x=a.trim().startsWith("../");if(h&&a.includes("%"))try{const g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(a);a=Le(a),this.encoded=g}catch{}if(a=qs(a).replace(/[_ ]+/gu," ").trim(),x)C(this,r,0);else{let g=l;a.startsWith(":")&&(g=0,a=a.slice(1).trim());const v=a.split(":");if(v.length>1){const A=Ot(v[0]),_=Object.prototype.hasOwnProperty.call(o.nsid,A)&&o.nsid[A];_&&(g=_,a=v.slice(1).join(":").trim())}C(this,r,g)}const c=a.indexOf("#");if(c!==-1){let g=a.slice(c).trim().slice(1);if(g.includes("%"))try{g=Le(g)}catch{}C(this,i,g.replace(/ /gu,"_")),a=a.slice(0,c).trim()}this.valid=!!(a||u&&this.ns===0&&p(this,i)!==void 0)&&qs(a)===a&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(x?/^(?:\.\.\/)+(.*)/u.exec(a)[1]:a),this.main=a,C(this,e,o.namespaces),C(this,s,o.articlePath||"/wiki/$1"),p(this,s).includes("$1")||C(this,s,p(this,s)+`${p(this,s).endsWith("/")?"":"/"}$1`),d||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return p(this,r)}get fragment(){return p(this,i)}get main(){return p(this,t)}set main(a){a=a.replace(/_/gu," ").trim(),C(this,t,a&&a[0].toUpperCase()+a.slice(1))}get prefix(){const a=p(this,e)[this.ns];return a+(a&&":")}get title(){return this.getRedirection()[1]}get extension(){const{main:a}=this,l=a.lastIndexOf(".");return l===-1?void 0:a.slice(l+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(a){C(this,i,a)}getUrl(a){throw new Error("Title.getUrl method is only available in the LSP version!")}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n)}}),Wa={};M(Wa,{default:()=>U});Ma.exports=R(Wa);var $e,ct,Os,Xi,U,Q=m({"index.ts"(){ut(),St(),G(),$e=!0,ct={config:Ws,get rules(){},get i18n(){},set i18n(t){},get lintConfig(){},set lintConfig(t){},get viewOnly(){return $e},set viewOnly(t){$e&&!t&&tt.rev++,$e=t},getConfig(t){const e=t!=null?t:this.config,{doubleUnderscore:s,ext:r,parserFunction:i,variable:n}=e;for(let a=0;a<2;a++)s.length>a+2&&s[a].length===0&&(s[a]=Object.keys(s[a+2]));return r.includes("translate")&&!n.includes("translationlanguage")&&(n.push("translationlanguage"),Array.isArray(i[1])?i[1].push("TRANSLATIONLANGUAGE"):i[1].TRANSLATIONLANGUAGE="translationlanguage"),{...Ws,...e,excludes:[]}},msg(t,e=""){},normalizeTitle(t,e=0,s,r=ct.getConfig(),i){const{Title:n}=(Ql(),R(Ba));let a;if(i!=null&&i.halfParsed)a=new n(t,e,r,i);else{const{Token:l}=(F(),R(Pe));a=tt.run(()=>{const o=new l(t,r);o.type="root",o.parseOnce(0,s).parseOnce();const d=new n(o.toString(),e,r,i);o.build();for(const h of["main","fragment"]){const u=d[h];if(u!=null&&u.includes("\0")){const x=o.buildFromStr(u,1);h==="main"?d.main=x:d.setFragment(x)}}return d})}return a},parse(t,e,s=it,r=ct.getConfig()){t=tn(t);let i;const{Token:n}=(F(),R(Pe));return tt.run(()=>{const l=new n(t,r);return l.type="root",l.parse(s,e)})},async partialParse(t,e,s,r=ct.getConfig()){},createLanguageService(t={}){throw new Error("Parser.createLanguageService method is only available in the LSP version!")}},Os={},Xi=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(const t in ct)Xi.has(t)||(Os[t]={enumerable:!1});Object.defineProperties(ct,Os),Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:ct}),U=ct}});Q()});Xl();})();
20
+ ${h}`,o),n.push(o);continue}const[,v,_,A,S]=g;if(v){for(;!o.is("table");)o=n.pop();o.close(`
21
+ ${u}${v}`,!0),d(S,n[n.length-1])}else if(_){o=Is(o,n),o.is("tr")&&(o=n.pop());const y=new ra(`
22
+ ${u}${_}`,S,r,i);n.push(o,y),o.insertAt(y)}else{o=Is(o,n);const y=A==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let w=y.exec(S),N=0,j=`
23
+ ${u}${A}`;const f=b=>{const $=new Ee(j,S.slice(N,w==null?void 0:w.index),r,i);return b.insertAt($),$};for(;w;)f(o),{lastIndex:N}=y,[j]=w,w=y.exec(S);n.push(o,f(o))}}return l.slice(1)}}}),oa,Pl=m({"src/nowiki/hr.ts"(){"use strict";kt(),oa=class extends nt{get type(){return"hr"}}}}),Mi,Ns,Ui,le,jl=m({"src/nowiki/doubleUnderscore.ts"(){"use strict";Mt(),mt(),kt(),Mi=[Tt(),ht("__")],le=class extends(Ui=nt){get type(){return"double-underscore"}constructor(t,e,s,r){var l,o;super(t,s,r);const i=t.toLowerCase(),{doubleUnderscore:[,,n,a]}=s;this.setAttribute("name",(o=e?(l=a==null?void 0:a[t])==null?void 0:l.toLowerCase():n==null?void 0:n[i])!=null?o:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}},Ns=q(Ui),le=B(Ns,0,"DoubleUnderscoreToken",Mi,le),O(Ns,1,le)}}),ha={};M(ha,{parseHrAndDoubleUnderscore:()=>ua});var ua,Rl=m({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Pl(),jl(),Sn(),ua=({firstChild:{data:t},type:e,name:s},r,i)=>{var o,d,h;const{doubleUnderscore:[n,a,l]}=r;return(o=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(n)),(d=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(a)),(h=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(`__(${[...n,...a].join("|")})__`,"giu")),e!=="root"&&(e!=="ext-inner"||s!=="poem")&&(t=`\0${t}`),t=t.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(u,x,c)=>(new oa(c,r,i),`${x}\0${i.length-1}r`)).replace(r.regexHrAndDoubleUnderscore,(u,x)=>{var _;const c=r.sensitiveDoubleUnderscore.has(x),g=x.toLowerCase(),v=r.insensitiveDoubleUnderscore.has(g);return c||v?(new le(x,c,r,i),`\0${i.length-1}${v&&((_=l==null?void 0:l[g])!=null?_:g)==="toc"?"u":"n"}`):u}),r.excludes.includes("heading")||(t=t.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(u,x,c,g,v)=>{const _=`${x}\0${i.length}h`;return new Ft(c.length,[g,v],r,i),_})),e==="root"||e==="ext-inner"&&s==="poem"?t:t.slice(1)}}}),da,Ol=m({"src/nowiki/quote.ts"(){"use strict";var t,e;kt(),da=(e=class extends nt{constructor(r,i,n,a){super(r,n,a);k(this,t);C(this,t,i)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return{...this.bold?{bold:p(this,t).bold}:void 0,...this.italic?{italic:p(this,t).italic}:void 0}}text(){const{parentNode:r,innerText:i}=this;return r!=null&&r.is("image-parameter")&&r.name!=="caption"?"":i}lint(r=this.getAbsoluteIndex()){}json(r,i=this.getAbsoluteIndex()){const n=super.json(void 0,i)}},t=new WeakMap,e)}}),pa={};M(pa,{parseQuotes:()=>dr});var dr,ca=m({"parser/quotes.ts"(){"use strict";Ol(),dr=(t,e,s,r)=>{var c;const i=t.split(/('{2,})/u),{length:n}=i;if(n===1)return t;let a=0,l=0,o,d,h;for(let g=1;g<n;g+=2){const v=i[g].length;switch(v){case 2:l++;break;case 4:i[g-1]+="'",i[g]="'''";case 3:if(a++,o!==void 0)break;i[g-1].endsWith(" ")?d===void 0&&h===void 0&&(h=g):i[g-1].slice(-2,-1)===" "?o=g:d!=null||(d=g);break;default:i[g-1]+="'".repeat(v-5),i[g]="'''''",l++,a++}}if(l%2===1&&a%2===1){const g=(c=o!=null?o:d)!=null?c:h;g!==void 0&&(i[g]="''",i[g-1]+="'")}let u=!0,x=!0;for(let g=1;g<n;g+=2){const v=i[g].length,_=v!==2,A=v!==3;_&&(u=!u),A&&(x=!x),new da(i[g],{bold:_&&u,italic:A&&x},e,s),i[g]=`\0${s.length-1}q`}return i.join("")}}}),ga={};M(ga,{parseExternalLinks:()=>pr});var pr,xa=m({"parser/externalLinks.ts"(){"use strict";G(),Un(),ar(),pr=(t,e,s,r)=>{var i;return(i=e.regexExternalLinks)!=null||(e.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${e.protocol}|//)${de}|\0\d+m\x7F)${pe}(?=[[\]<>"\t${At}]|\0\d)))([${At}]*(?![${At}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),t.replace(e.regexExternalLinks,(n,a,l,o)=>{const{length:d}=s,h=/&[lg]t;/u.exec(a);return h&&(l="",o=a.slice(h.index)+l+o,a=a.slice(0,h.index)),r?(new ge(a,"ext-link-url",e,s),`[\0${d}f${l}${o}]`):(new Pt(a,l,o,e,s),`\0${d}w`)})}}}),fa,Bl=m({"src/link/category.ts"(){"use strict";Re(),fa=class extends xt{get type(){return"category"}get sortkey(){}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),ma={};M(ma,{parseLinks:()=>Vs});var Di,Vs,ql=m({"parser/links.ts"(){"use strict";G(),Q(),ca(),xa(),Wn(),jn(),Bl(),Di=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Vs=(t,e,s,r)=>{var l;(l=e.regexLinks)!=null||(e.regexLinks=new RegExp(String.raw`^\s*(?:${e.protocol}|//)`,"iu"));const i=e.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,n=t.split("[[");let a=n.shift();for(let o=0;o<n.length;o++){let d=!1,h,u,x,c;const g=n[o],v=i.exec(g);if(v)[,h,u,x,c]=v,c.startsWith("]")&&(x!=null&&x.includes("["))&&(x+="]",c=c.slice(1));else{const N=Di.exec(g);N&&(d=!0,[,h,u,x]=N)}if(h===void 0||e.regexLinks.test(h)||/\0\d+[exhbru]\x7F/u.test(h)){a+=`[[${g}`;continue}let _=J(h).trim();const A=_.startsWith(":");if(A&&d){a+=`[[${g}`;continue}else!_&&x&&!x.includes(`
24
+ `)&&(_=J(x).trim());const{ns:S,valid:y}=U.normalizeTitle(_,0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(y){if(d){if(S!==6){a+=`[[${g}`;continue}let N=!1;for(o++;o<n.length;o++){const j=n[o],f=j.split("]]");if(f.length>2){N=!0,x+=`[[${f[0]}]]${f[1]}`,c=f.slice(2).join("]]");break}else if(f.length===2)x+=`[[${f[0]}]]${f[1]}`;else{x+=`[[${j}`;break}}if(x=Vs(x,e,s,r),!N){a+=`[[${h}${u}${x}`;continue}}}else{a+=`[[${g}`;continue}x&&(x=dr(x,e,s,r));let w=nr;A||(S===6?(x&&(x=pr(x,e,s,!0)),w=ir):S===14&&(w=fa)),x===void 0&&u&&(x=""),a+=`\0${s.length}l${c}`,new w(h,x,e,s,u)}return a}}}),va={};M(va,{parseMagicLinks:()=>ba});var Fs,Ls,Es,Ps,ba,Wl=m({"parser/magicLinks.ts"(){"use strict";G(),ar(),Fs=String.raw`[${At}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Ls=`(?:${Fs})+`,Es=`(?:${Fs}|-)`,Ps=String.raw`(?:RFC|PMID)${Ls}\d+\b|ISBN${Ls}(?:97[89]${Es}?)?(?:\d${Es}?){9}[\dx]\b`,ba=(t,e,s)=>{if(!e.regexMagicLinks)try{e.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${e.protocol})(${de}${pe})|${Ps})`,"giu")}catch{e.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${e.protocol})(${de}${pe})|${Ps})`,"giu")}return t.replace(e.regexMagicLinks,(r,i,n)=>{let a=i?r.slice(i.length):r;if(n){let l="";const o=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);o&&(l=a.slice(o.index),a=a.slice(0,o.index));const d=a.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,h=d.exec(a);if(h){let u=1;h[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,h.index))&&(u=2),l=a.slice(h.index+u)+l,a=a.slice(0,h.index+u)}return l.length>=n.length?r:(new ge(a,void 0,e,s),`${i}\0${s.length-1}w${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new ge(a,"magic-link",e,s),`${i}\0${s.length-1}i`})}}}),wa,Ml=m({"util/html.ts"(){"use strict";wa=(t,e)=>t.startsWith(e)?e.length:[...e].findIndex((s,r)=>s!==t[r])}}),_a,Ul=m({"src/nowiki/list.ts"(){"use strict";ia(),_a=class extends hr{get type(){return"list"}}}}),Aa={};M(Aa,{parseList:()=>ya});var ya,Dl=m({"parser/list.ts"(){"use strict";Ml(),Ul(),na(),ya=(t,e,s,r)=>{const i=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(t);if(!i)return e.lastPrefix="",t;const[n,a,l,o]=i,d=l.replace(/;/gu,":"),h=wa(d,e.lastPrefix),u=((h>1?l.slice(h-1):l)+o).split(/(?=;)/u),x=u[0].startsWith(";");let c=u.length-(x?0:1);if(h>1){const T=l.slice(0,h-1);if(x){const W=T.split(/(?=;)/u);u.unshift(...W),c+=T.includes(";")?W.length:0}else u[0]=T+u[0]}e.lastPrefix=d;let g=a+u.map((T,W)=>`\0${r.length+W}d`).join("")+t.slice(n.length);for(const T of u)new _a(T,s,r);if(!c)return g;const{html:[v,,_]}=s,A=/:+|-\{|\0\d+[xq]\x7F/gu;let S=A,y=S.exec(g),w=0,N=!1,j=!1,f=0;const b=(T,W)=>(new ur(T,s,r),`${g.slice(0,W)}\0${r.length-1}d${g.slice(W+T.length)}`),$=T=>{T?w&&w--:w++};for(;y&&c;){const{0:T,index:W}=y;if(T==="-{"){if(!f){const{lastIndex:P}=S;S=/-\{|\}-/gu,S.lastIndex=P}f++}else if(T==="}-"){if(f--,!f){const{lastIndex:P}=S;S=A,S.lastIndex=P}}else if(T.endsWith("x")){const{name:P,closing:L,selfClosing:H}=r[Number(T.slice(1,-2))];(v.includes(P)||!H&&!_.includes(P))&&$(L)}else if(T.endsWith("q")){const{bold:P,italic:L}=r[Number(T.slice(1,-2))];P&&($(N),N=!N),L&&($(j),j=!j)}else if(w===0){if(T.length>=c)return b(T.slice(0,c),W);c-=T.length,S.lastIndex=W+4+String(r.length).length,g=b(T,W)}y=S.exec(g)}return g}}}),zi,Hi,js,Gi,oe,zl=m({"src/converterFlags.ts"(){"use strict";var t,e;Oe(),F(),vt(),zi=new Set(["A","T","R","D","-","H","N"]),Hi=[me()],oe=(e=class extends(Gi=I){constructor(r,i,n=[]){super(void 0,i,n,{});k(this,t);this.safeAppend(r.map(a=>new V(a,"converter-flag",i,n)))}get type(){return"converter-flags"}afterBuild(){C(this,t,this.childNodes.map(r=>r.text().trim())),super.afterBuild()}toString(r){return super.toString(r,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(p(this,t).filter(r=>/\{{3}[^{}]+\}{3}/u.test(r)))}getVariantFlags(){const r=new Set(this.getAttribute("config").variants);return new Set(p(this,t).filter(i=>r.has(i)))}isInvalidFlag(r,i,n,a){return typeof r=="object"&&(r=r.text().trim(),i=this.getVariantFlags(),n=this.getUnknownFlags(),a=new Set(p(this,t).filter(l=>zi.has(l)))),!!r&&!i.has(r)&&!n.has(r)&&(i.size>0||!a.has(r))}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print({sep:";"})}},t=new WeakMap,e),js=q(Gi),oe=B(js,0,"ConverterFlagsToken",Hi,oe),O(js,1,oe)}}),Fe,Hl=m({"src/converterRule.ts"(){"use strict";Q(),F(),vt(),Fe=class extends I{get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,s=U.getConfig(),r=[]){super(void 0,s,r);const i=t.indexOf(":"),n=t.slice(0,i).indexOf("=>"),a=n===-1?t.slice(0,i):t.slice(n+2,i);e&&s.variants.includes(a.trim().toLowerCase())?(super.insertAt(new V(a,"converter-rule-variant",s,r)),super.insertAt(new V(t.slice(i+1),"converter-rule-to",s,r)),n!==-1&&super.insertAt(new V(t.slice(0,n),"converter-rule-from",s,r),0)):super.insertAt(new V(t,"converter-rule-to",s,r))}toString(t){const{childNodes:e,firstChild:s,lastChild:r}=this;return e.length===3?`${s.toString(t)}=>${e[1].toString(t)}:${r.toString(t)}`:super.toString(t,":")}text(){const{childNodes:t,firstChild:e,lastChild:s}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${s.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){const{childNodes:t}=this;if(t.length===3){const[e,s,r]=t;return`<span class="wpb-converter-rule">${e.print()}=>${s.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(t,e=this.getAbsoluteIndex()){const s=super.json(void 0,e)}}}}),Vi,Rs,Qi,he,Gl=m({"src/converter.ts"(){"use strict";G(),mt(),ot(),F(),zl(),Hl(),Vi=[at,ht("-{")],he=class extends(Qi=I){get type(){return"converter"}constructor(t,e,s,r=[]){super(void 0,s,r),this.insertAt(new oe(t,s,r));const[i]=e,n=i.includes(":"),a=new Fe(i,n,s,r);n&&a.length===1||!n&&e.length===2&&!J(e[1]).trim()?this.insertAt(new Fe(e.join(";"),!1,s,r)):this.append(a,...e.slice(1).map(l=>new Fe(l,!0,s,r)))}toString(t){const{childNodes:[e,...s]}=this;return`-{${e.toString(t)}${e.length>0?"|":""}${s.map(r=>r.toString(t)).join(";")}}-`}text(){const{childNodes:[t,...e]}=this;return`-{${t.text()}|${St(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){const{childNodes:[t,...e]}=this;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${Bt(e,{sep:";"})}}-</span>`}},Rs=q(Qi),he=B(Rs,0,"ConverterToken",Vi,he),O(Rs,1,he)}}),Sa={};M(Sa,{parseConverter:()=>Ta});var Ta,Vl=m({"parser/converter.ts"(){"use strict";Gl(),Ta=(t,e,s)=>{var o;(o=e.regexConverter)!=null||(e.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${e.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const r=/-\{/gu,i=/-\{|\}-/gu,n=[];let a=r,l=a.exec(t);for(;l;){const{0:d,index:h}=l;if(d==="}-"){const u=n.pop(),{length:x}=s,c=t.slice(u.index+2,h),g=c.indexOf("|"),[v,_]=g===-1?[[],c]:[c.slice(0,g).split(";"),c.slice(g+1)],A=_.replace(/(&[#a-z\d]+);/giu,"$1"),S=A.split(e.regexConverter).map(y=>y.replace(/\x01/gu,";"));new he(v,S,e,s),t=`${t.slice(0,u.index)}\0${x}v${t.slice(h+2)}`,n.length===0&&(a=r),a.lastIndex=u.index+3+String(x).length}else n.push(l),a=i,a.lastIndex=h+2;l=a.exec(t)}return t}}}),Pe={};M(Pe,{Token:()=>I});var I,F=m({"src/index.ts"(){"use strict";var t,e,s,r,i,n,a,l,$a,ka,Ca,Ia,Na,Fa,La,Ea,Pa,ja,Ra,Oa,w;G(),ft(),fe(),ut(),Q(),nl(),al(),I=(w=class extends Yt{constructor(f,b=U.getConfig(),$=[],T){super();k(this,l);k(this,t,"plain");k(this,e,0);k(this,s);k(this,r);k(this,i);k(this,n,!1);k(this,a);typeof f=="string"&&this.insertAt(f),C(this,s,b),C(this,r,$),$.push(this)}get type(){return p(this,t)}set type(f){C(this,t,f)}parseOnce(f=p(this,e),b=!1,$){if(f<p(this,e)||this.length===0||!this.isPlain())return this;if(p(this,e)>=tt)return this;switch(f){case 0:if(this.type==="root"){p(this,r).pop();const T=E(this,l,$a).call(this);b&&(b=!T)}C(this,i,b),E(this,l,ka).call(this,b);break;case 1:E(this,l,Ca).call(this);break;case 2:E(this,l,Ia).call(this);break;case 3:E(this,l,Na).call(this);break;case 4:E(this,l,Fa).call(this);break;case 5:E(this,l,La).call(this,$);break;case 6:E(this,l,Ea).call(this,$);break;case 7:E(this,l,Pa).call(this);break;case 8:E(this,l,ja).call(this);break;case 9:E(this,l,Ra).call(this);break;case 10:E(this,l,Oa).call(this)}if(this.type==="root")for(const T of p(this,r))T==null||T.parseOnce(f,b,$);return mr(this,e)._++,this}buildFromStr(f,b){const $=f.split(/[\0\x7F]/u).map((T,W)=>{if(W%2===0)return new Us(T);if(isNaN(T.slice(-1)))return p(this,r)[Number(T.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${T}`)});return b===0?$.map(String).join(""):b===1?St($):$}build(){C(this,e,tt);const{length:f,firstChild:b}=this,$=b==null?void 0:b.toString();if(f===1&&b.type==="text"&&$.includes("\0")&&(gr(this,0,1,this.buildFromStr($)),this.normalize(),this.type==="root"))for(const T of p(this,r))T==null||T.build()}afterBuild(){if(this.type==="root")for(const f of p(this,r))f==null||f.afterBuild();C(this,n,!0)}parse(f=tt,b,$){for(f=Math.min(f,tt);p(this,e)<f;)this.parseOnce(p(this,e),b,$);return f&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===w}getAttribute(f){var b;switch(f){case"config":return p(this,s);case"include":return(b=p(this,i))!=null?b:!!p(this.getRootNode(),i);case"accum":return p(this,r);case"built":return p(this,n);case"stage":return p(this,e);case"invalid":return this.type==="table-inter"&&ke(this)===2;default:return super.getAttribute(f)}}setAttribute(f,b){switch(f){case"stage":p(this,e)===0&&this.type==="root"&&p(this,r).shift(),C(this,e,b);break;default:super.setAttribute(f,b)}}insertAt(f,b=this.length){const $=typeof f=="string"?new Us(f):f;super.insertAt($,b);const{type:T}=$;return T==="root"&&($.type="plain"),$}normalizeTitle(f,b=0,$){return U.normalizeTitle(f,b,p(this,i),p(this,s),$)}inTableAttrs(){var f,b;return((f=this.closest("table-attrs,ext"))==null?void 0:f.type)==="table-attrs"&&((b=this.closest("table-attrs,arg,magic-word,template"))!=null&&b.is("table-attrs")?2:1)}inHtmlAttrs(){var f;return(f=this.closest("html-attrs,ext"))!=null&&f.is("html-attrs")?2:this.inTableAttrs()}lint(f=this.getAbsoluteIndex(),b){}toString(f,b){return f?super.toString(!0,b):yt(p(this,a),()=>super.toString(!1,b),$=>{const T=this.getRootNode();T.type==="root"&&p(T,n)&&C(this,a,$)})}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,l=new WeakSet,$a=function(){const{parseRedirect:f}=(hl(),R(dn)),b=this.firstChild.toString(),$=f(b,p(this,s),p(this,r));return $&&this.setText($),!!$},ka=function(f){const{parseCommentAndExt:b}=(Ue(),R(Kn));this.setText(b(this.firstChild.toString(),p(this,s),p(this,r),f))},Ca=function(){const{parseBraces:f}=(rr(),R(kn)),b=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,$=f(b,p(this,s),p(this,r));this.setText(this.type==="root"?$:$.slice(1))},Ia=function(){if(p(this,s).excludes.includes("html"))return;const{parseHtml:f}=(Nl(),R(Yn));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},Na=function(){if(p(this,s).excludes.includes("table"))return;const{parseTable:f}=(El(),R(aa));this.setText(f(this,p(this,s),p(this,r)))},Fa=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:f}=(Rl(),R(ha));this.setText(f(this,p(this,s),p(this,r)))},La=function(f){const{parseLinks:b}=(ql(),R(ma));this.setText(b(this.firstChild.toString(),p(this,s),p(this,r),f))},Ea=function(f){if(p(this,s).excludes.includes("quote"))return;const{parseQuotes:b}=(ca(),R(pa)),$=this.firstChild.toString().split(`
25
+ `);for(let T=0;T<$.length;T++)$[T]=b($[T],p(this,s),p(this,r),f);this.setText($.join(`
26
+ `))},Pa=function(){if(p(this,s).excludes.includes("extLink"))return;const{parseExternalLinks:f}=(xa(),R(ga));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},ja=function(){if(p(this,s).excludes.includes("magicLink"))return;const{parseMagicLinks:f}=(Wl(),R(va));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))},Ra=function(){if(p(this,s).excludes.includes("list"))return;const{parseList:f}=(Dl(),R(Aa)),{firstChild:b,type:$,name:T}=this,W=b.toString().split(`
27
+ `),P={lastPrefix:""};let L=$==="root"||$==="ext-inner"&&T==="poem"?0:1;for(;L<W.length;L++)W[L]=f(W[L],P,p(this,s),p(this,r));this.setText(W.join(`
28
+ `))},Oa=function(){if(p(this,s).variants.length>0){const{parseConverter:f}=(Vl(),R(Sa));this.setText(f(this.firstChild.toString(),p(this,s),p(this,r)))}},w)}}),et,cr,gr,ut=m({"util/debug.ts"(){"use strict";et={running:!1,run(t){const{running:e}=this;this.running=!0;try{const{Token:s}=(F(),R(Pe)),r=t();return r instanceof s&&!r.getAttribute("built")&&r.afterBuild(),this.running=e,r}catch(s){throw this.running=e,s}},rev:0},cr=t=>e=>e.type===t,gr=(t,e,s,r=[])=>{var a,l;let i=t.getChildNodes(),n;i.length===s?(n=i,i=r):n=i.splice(e,s,...r);for(let o=0;o<r.length;o++){const d=r[o];d.setAttribute("parentNode",t),d.setAttribute("nextSibling",i[e+o+1]),d.setAttribute("previousSibling",i[e+o-1])}return(a=i[e-1])==null||a.setAttribute("nextSibling",i[e]),(l=i[e+r.length])==null||l.setAttribute("previousSibling",i[e+r.length-1]),i===r&&t.setAttribute("childNodes",i),n}}}),Ba={};M(Ba,{Title:()=>qa});var qa,Ql=m({"lib/title.ts"(){"use strict";var t,e,s,r,i,n;xe(),G(),qa=(n=class{constructor(a,l,o,{temporary:d,decode:h,selfLink:u}={}){k(this,t);k(this,e);k(this,s);k(this,r);k(this,i);lt(this,"valid");lt(this,"encoded",!1);const x=a.trim().startsWith("../");if(h&&a.includes("%"))try{const g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(a);a=Le(a),this.encoded=g}catch{}if(a=qs(a).replace(/[_ ]+/gu," ").trim(),x)C(this,r,0);else{let g=l;a.startsWith(":")&&(g=0,a=a.slice(1).trim());const v=a.split(":");if(v.length>1){const _=Ot(v[0]),A=Object.prototype.hasOwnProperty.call(o.nsid,_)&&o.nsid[_];A&&(g=A,a=v.slice(1).join(":").trim())}C(this,r,g)}const c=a.indexOf("#");if(c!==-1){let g=a.slice(c).trim().slice(1);if(g.includes("%"))try{g=Le(g)}catch{}C(this,i,g.replace(/ /gu,"_")),a=a.slice(0,c).trim()}this.valid=!!(a||u&&this.ns===0&&p(this,i)!==void 0)&&qs(a)===a&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(x?/^(?:\.\.\/)+(.*)/u.exec(a)[1]:a),this.main=a,C(this,e,o.namespaces),C(this,s,o.articlePath||"/wiki/$1"),p(this,s).includes("$1")||C(this,s,p(this,s)+`${p(this,s).endsWith("/")?"":"/"}$1`),d||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return p(this,r)}get fragment(){return p(this,i)}get main(){return p(this,t)}set main(a){a=a.replace(/_/gu," ").trim(),C(this,t,a&&a[0].toUpperCase()+a.slice(1))}get prefix(){const a=p(this,e)[this.ns];return a+(a&&":")}get title(){return this.getRedirection()[1]}get extension(){const{main:a}=this,l=a.lastIndexOf(".");return l===-1?void 0:a.slice(l+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(a){C(this,i,a)}getUrl(a){throw new Error("Title.getUrl method is only available in the LSP version!")}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n)}}),Wa={};M(Wa,{default:()=>U});Ma.exports=R(Wa);var $e,ct,Os,Xi,U,Q=m({"index.ts"(){ut(),ft(),G(),$e=!0,ct={config:Ws,get rules(){},get i18n(){},set i18n(t){},get lintConfig(){},set lintConfig(t){},get viewOnly(){return $e},set viewOnly(t){$e&&!t&&et.rev++,$e=t},getConfig(t){const e=t!=null?t:this.config,{doubleUnderscore:s,ext:r,parserFunction:i,variable:n}=e;for(let a=0;a<2;a++)s.length>a+2&&s[a].length===0&&(s[a]=Object.keys(s[a+2]));return r.includes("translate")&&!n.includes("translationlanguage")&&(n.push("translationlanguage"),Array.isArray(i[1])?i[1].push("TRANSLATIONLANGUAGE"):i[1].TRANSLATIONLANGUAGE="translationlanguage"),{...Ws,...e,excludes:[]}},msg(t,e=""){},normalizeTitle(t,e=0,s,r=ct.getConfig(),i){const{Title:n}=(Ql(),R(Ba));let a;if(i!=null&&i.halfParsed)a=new n(t,e,r,i);else{const{Token:l}=(F(),R(Pe));a=et.run(()=>{const o=new l(t,r);o.type="root",o.parseOnce(0,s).parseOnce();const d=new n(o.toString(),e,r,i);o.build();for(const h of["main","fragment"]){const u=d[h];if(u!=null&&u.includes("\0")){const x=o.buildFromStr(u,1);h==="main"?d.main=x:d.setFragment(x)}}return d})}return a},parse(t,e,s=tt,r=ct.getConfig()){t=tn(t);let i;const{Token:n}=(F(),R(Pe));return et.run(()=>{const l=new n(t,r);return l.type="root",l.parse(s,e)})},async partialParse(t,e,s,r=ct.getConfig()){},createLanguageService(t={}){throw new Error("Parser.createLanguageService method is only available in the LSP version!")}},Os={},Xi=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(const t in ct)Xi.has(t)||(Os[t]={enumerable:!1});Object.defineProperties(ct,Os),Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:ct}),U=ct}});Q()});Xl();})();
29
29
  //# sourceMappingURL=bundle.min.js.map
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="98" height="20" role="img" aria-label="Coverage: 86%"><title>Coverage: 86%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="98" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="35" height="20" fill="#4c1"/><rect width="98" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="795" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">86%</text><text x="795" y="140" transform="scale(.1)" fill="#fff" textLength="250">86%</text></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="98" height="20" role="img" aria-label="Coverage: 87%"><title>Coverage: 87%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="98" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="35" height="20" fill="#4c1"/><rect width="98" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="795" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">87%</text><text x="795" y="140" transform="scale(.1)" fill="#fff" textLength="250">87%</text></g></svg>
package/data/.schema.json CHANGED
@@ -10,7 +10,8 @@
10
10
  "description": "An array of aliases for the magic word",
11
11
  "type": "array",
12
12
  "items": {
13
- "type": "string"
13
+ "type": "string",
14
+ "pattern": "^[^A-Z]+$"
14
15
  },
15
16
  "minItems": 1,
16
17
  "uniqueItems": true