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