wikiparser-node 1.32.0 → 1.34.0

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