wikiparser-node 1.29.1 → 1.29.2

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