wikiparser-node 1.33.0 → 1.34.0

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