wikiparser-node 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle-es8.min.js +25 -25
- package/bundle/bundle-lsp.min.js +22 -22
- package/bundle/bundle.min.js +2 -2
- package/config/default.json +1 -0
- package/dist/bin/config.js +3 -3
- package/dist/parser/magicLinks.js +1 -1
- package/dist/render/html.js +4 -4
- package/dist/src/attribute.js +1 -1
- package/dist/src/nowiki/index.js +8 -8
- package/dist/src/nowiki/noinclude.js +1 -1
- package/extensions/dist/base.js +4 -1
- package/extensions/dist/lsp.js +3 -0
- package/extensions/typings.d.ts +1 -0
- package/logo.png +0 -0
- package/package.json +6 -6
package/bundle/bundle.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var rl=Object.defineProperty;var kr=t=>{throw TypeError(t)};var il=(t,e,s)=>e in t?rl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var nl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ot=(t,e,s)=>il(t,typeof e!="symbol"?e+"":e,s),Ge=(t,e,s)=>e.has(t)||kr("Cannot "+s);var p=(t,e,s)=>(Ge(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?kr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),$=(t,e,s,r)=>(Ge(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),B=(t,e,s)=>(Ge(t,e,"access private method"),s);var Sr=(t,e,s,r)=>({set _(i){$(t,e,i,s)},get _(){return p(t,e,r)}});var mo=nl((vo,el)=>{var al=Object.create,qt=Object.defineProperty,an=Object.getOwnPropertyDescriptor,rr=Object.getOwnPropertyNames,ll=Object.prototype.hasOwnProperty,ln=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Mt=t=>{throw TypeError(t)},on=(t,e,s)=>e in t?qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,$r=(t,e)=>qt(t,"name",{value:e,configurable:!0}),f=(t,e)=>function(){return t&&(e=(0,t[rr(t)[0]])(t=0)),e},ol=(t,e)=>function(){return e||(0,t[rr(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e)=>{for(var s in e)qt(t,s,{get:e[s],enumerable:!0})},ul=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of rr(e))!ll.call(t,i)&&i!==s&&qt(t,i,{get:()=>e[i],enumerable:!(r=an(e,i))||r.enumerable});return t},O=t=>ul(qt({},"__esModule",{value:!0}),t),W=t=>{var e;return[,,,al((e=t==null?void 0:t[ln("metadata")])!=null?e:null)]},un=["class","method","getter","setter","accessor","field","value","get","set"],Yt=t=>t!==void 0&&typeof t!="function"?Mt("Function expected"):t,hl=(t,e,s,r,i)=>({kind:un[t],name:e,metadata:r,addInitializer:n=>s._?Mt("Already initialized"):i.push(Yt(n||null))}),ir=(t,e)=>on(e,ln("metadata"),t[3]),R=(t,e,s,r)=>{for(var i=0,n=t[e>>1],a=n&&n.length;i<a;i++)e&1?n[i].call(s):r=n[i].call(s,r);return r},j=(t,e,s,r,i,n)=>{var a,o,l,h,u,d=e&7,x=!!(e&8),c=!!(e&16),g=d>3?t.length+1:d?x?1:2:0,v=un[d+5],y=d>3&&(t[g-1]=[]),C=t[g]||(t[g]=[]),b=d&&(!c&&!x&&(i=i.prototype),d<5&&(d>3||!c)&&an(d<4?i:{get[s](){return U(this,n)},set[s](w){return tt(this,n,w)}},s));d?c&&d<4&&$r(n,(d>2?"set ":d>1?"get ":"")+s):$r(i,s);for(var T=r.length-1;T>=0;T--)h=hl(d,s,l={},t[3],C),d&&(h.static=x,h.private=c,u=h.access={has:c?w=>pl(i,w):w=>s in w},d^3&&(u.get=c?w=>(d^1?U:Hs)(w,i,d^4?n:b.get):w=>w[s]),d>2&&(u.set=c?(w,I)=>tt(w,i,I,d^4?n:b.set):(w,I)=>w[s]=I)),o=(0,r[T])(d?d<4?c?n:b[v]:d>4?void 0:{get:b.get,set:b.set}:i,h),l._=1,d^4||o===void 0?Yt(o)&&(d>4?y.unshift(o):d?c?n=o:b[v]=o:i=o):typeof o!="object"||o===null?Mt("Object expected"):(Yt(a=o.get)&&(b.get=a),Yt(a=o.set)&&(b.set=a),Yt(a=o.init)&&y.unshift(a));return d||ir(t,i),b&&qt(i,s,b),c?d^4?n:b:i},dl=(t,e,s)=>on(t,typeof e!="symbol"?e+"":e,s),nr=(t,e,s)=>e.has(t)||Mt("Cannot "+s),pl=(t,e)=>Object(e)!==e?Mt('Cannot use the "in" operator on this value'):t.has(e),U=(t,e,s)=>(nr(t,e,"read from private field"),s?s.call(t):e.get(t)),ct=(t,e,s)=>e.has(t)?Mt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),tt=(t,e,s,r)=>(nr(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),Hs=(t,e,s)=>(nr(t,e,"access private method"),s),cl=(t,e,s,r)=>({set _(i){tt(t,e,i,s)},get _(){return U(t,e,r)}});function K(t,e,s){return s===1?t.replace(/\0(\d+)g\x7F/gu,(r,i)=>K(String(e[i]),e,2)):s===2?t.replace(/\0(\d+)n\x7F/gu,(r,i)=>String(e[i])):t.replace(/\0(\d+)\x7F/gu,(r,i)=>e[i])}var At,Ve,ce,ge,Ot,Ct,hn,H,yt,Cr,Ir,we,Gs,dn,Nr,Fr,xe,Wt,D=f({"util/string.ts"(){"use strict";At=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ve=String.raw`[^[\]<>"\0-\x1F\x7F${At}\uFFFD]`,ce=String.raw`(?:\[[\da-f:.]+\]|${Ve})`,ge=String.raw`(?:${Ve}|\0\d+[cn!~]\x7F)*`,Ot=t=>t.trim().toLowerCase(),Ct=(t,e)=>s=>s.replace(t,e),hn=Ct(/[\0\x7F]|\r$/gmu,""),H=Ct(/\0\d+[cn]\x7F/gu,""),yt=(t,e="")=>t.map(s=>typeof s=="string"?s:s.text()).join(e),Cr={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ir=Ct(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(t,e,s)=>e?String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e)):Cr[s.toLowerCase()]),Gs=t=>(we!=null||(we=Ir),we(t)),dn=Ct(/&#(\d+|x[\da-f]+);/giu,(t,e)=>String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e))),Nr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Fr=(t=/[&<>"{}[\]|]/gu)=>Ct(t,e=>`&${Nr[e]};`),xe=Fr(/[&<>]/gu),Wt=(t,e={})=>{const{pre:s="",post:r="",sep:i=""}=e;return s+t.map(n=>n.print()).join(i)+r}}}),gl=ol({"config/minimum.json"(t,e){e.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{0:"",6:"File",10:"Template",14:"Category",828:"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),J,pn,Vs,ht=f({"util/constants.ts"(){"use strict";J=11,pn=new Set(["alt","link","lang","page","caption"]),Vs=gl()}});function pe(t){const e=new Map,s=new WeakMap;return r=>{const i=typeof r=="string"?e:s;if(i.has(r)){const a=i.get(r);return a.lastIndex=0,a}const n=t(r);return i.set(r,n),n}}var Qs,je=f({"../common/dist/index.mjs"(){"use strict";Qs=t=>decodeURIComponent(t.replace(/%(?![\da-f]{2})/giu,"%25"))}}),Lr,Er,Fe,jt,cn,Oe=f({"util/lint.ts"(){"use strict";ft(),rt(),Lr=new Set(["tr","td","th","caption"]),Er=new Set(["Template:!!","Template:!-"]),Fe=t=>{const e=t.childNodes.find(s=>s.text().trim());if(!e||e.type==="text"&&e.data.trim().startsWith("!")||e.is("magic-word")&&e.name==="!"||e.is("template")&&Er.has(e.name)||e.is("html")&&Lr.has(e.name))return!1;if(e.is("arg"))return e.length>1&&Fe(e.childNodes[1]);if(e.is("magic-word"))try{const s=e.getPossibleValues().map(Fe);return s.includes(2)?2:s.includes(1)&&1}catch{}return e.is("template")||e.is("magic-word")&&e.name==="invoke"?1:2},jt=(t,e,s,r)=>{if(t&&(r||V.viewOnly&&t[0]===nt.rev))return t[1];const i=e();return(r||V.viewOnly)&&s([nt.rev,i]),i},cn=(t,e)=>t==="ol"&&e==="type"?["1","a","A","i","I"]:t==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[]}}),Pr,gn,xl=f({"util/selector.ts"(){"use strict";Pr=t=>{if(t.includes("#")){const e=t.indexOf("#"),s=t.slice(0,e),r=t.slice(e+1);return(i,n)=>(e===0||i===s)&&n===r}return e=>e===t},gn=(t,e,s)=>{if(t=t.trim(),!t)return(()=>!0);const r=t.split(",").map(i=>i.trim()).filter(i=>i!=="").map(Pr);return(({type:i,name:n})=>r.some(a=>a(i,n)))}}}),We,ar=f({"mixin/cached.ts"(){"use strict";Oe(),We=(t=!0)=>e=>{const s=new WeakMap;return function(...r){return jt(s.get(this),()=>e.apply(this,r),i=>{s.set(this,i)},t)}}}}),xn,ml=f({"mixin/nodeLike.ts"(){"use strict";xn=t=>{class e extends t{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){}get offsetWidth(){}}return e}}}),Br,Rr,_e,Gt,Vt,Ae,ye,Qt,Xt,bt,mn=f({"lib/node.ts"(){"use strict";Oe(),ft(),ar(),ml(),rt(),Rr=[xn],Br=[We(!1)],bt=class{constructor(){R(Xt,5,this),dl(this,"childNodes",[]),ct(this,_e),ct(this,Gt),ct(this,Vt),ct(this,Ae),ct(this,ye),ct(this,Qt,{})}get parentNode(){return U(this,_e)}get nextSibling(){return U(this,Gt)}get previousSibling(){return U(this,Vt)}getChildNodes(){const{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":tt(this,_e,e),e||(tt(this,Gt,void 0),tt(this,Vt,void 0));break;case"nextSibling":tt(this,Gt,e);break;case"previousSibling":tt(this,Vt,e);break;case"aIndex":break;default:this[t]=e}}getRootNode(){return jt(U(this,Ae),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{const[,e]=t;e.type==="root"&&tt(this,Ae,t)})}indexFromPos(t,e){}posFromIndex(t){}getDimension(){}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){const{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return jt(U(this,Qt)[t],()=>{const{childNodes:e}=this,s=t+(t<0?e.length:0);let r=this.getAttribute("padding");for(let i=0;i<s;i++)V.viewOnly&&(U(this,Qt)[i]=[nt.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{U(this,Qt)[t]=e})}getAbsoluteIndex(){return jt(U(this,ye),()=>{const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{tt(this,ye,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){}seal(t,e){}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}},Xt=W(null),_e=new WeakMap,Gt=new WeakMap,Vt=new WeakMap,Ae=new WeakMap,ye=new WeakMap,Qt=new WeakMap,j(Xt,1,"getLines",Br,bt),bt=j(Xt,0,"AstNode",Rr,bt),R(Xt,1,bt)}}),fn,fl=f({"mixin/elementLike.ts"(){"use strict";fn=t=>{}}}),jr,Qe,Or,Zt,vl=f({"lib/element.ts"(){"use strict";D(),ft(),xl(),mn(),fl(),jr=[fn],Zt=class extends(Or=bt){get length(){return this.childNodes.length}text(t){return yt(this.childNodes,t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return yr(this,e,0,[t]),t}closest(t){const e=gn(t,this);let{parentNode:s}=this;for(;s;){if(e(s))return s;({parentNode:s}=s)}}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(const e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;const s=this.childNodes[e],{data:r}=s;return s.replaceData(t),r}toString(t,e=""){return this.childNodes.map(s=>s.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){}print(t={}){{const e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+Wt(this.childNodes,t)+(e===""?"":"</span>"):""}}json(t,e=this.getAbsoluteIndex()){}},Qe=W(Or),Zt=j(Qe,0,"AstElement",jr,Zt),R(Qe,1,Zt)}}),Xs,bl=f({"lib/text.ts"(){"use strict";var t,vn,s;D(),mn(),Xs=(s=class extends bt{constructor(i){super();k(this,t);ot(this,"data","");this.data=i}get type(){return"text"}toString(i){var n;return i&&!((n=this.parentNode)!=null&&n.getAttribute("built"))?H(this.data):this.data}text(){return this.data}lint(i=this.getAbsoluteIndex(),n){}replaceData(i){B(this,t,vn).call(this,i)}splitText(i){this.lspError("AstText.splitText")}escape(){}print(){return xe(this.data)}},t=new WeakSet,vn=function(i){this.setAttribute("data",i)},s)}}),xt,Tt=f({"mixin/hidden.ts"(){"use strict";xt=(t=!0,e=!0)=>s=>{class r extends s{text(){return""}lint(n){}}return r}}}),G,Q=f({"mixin/noEscape.ts"(){"use strict";G=t=>{}}}),mt,kt=f({"src/syntax.ts"(){"use strict";var t,e;E(),mt=(e=class extends N{constructor(r,i,n,a,o){super(r,n,a,o);k(this,t);$(this,t,i)}get type(){return p(this,t)}lint(r=this.getAbsoluteIndex()){}},t=new WeakMap,e)}}),at,dt=f({"mixin/padded.ts"(){"use strict";at=({length:t})=>e=>{class s extends e{getAttribute(i){return i==="padding"?t:super.getAttribute(i)}}return s}}}),st,St=f({"src/atom.ts"(){"use strict";var t,e;E(),st=(e=class extends N{constructor(r,i,n,a,o){super(r,n,a,o);k(this,t);$(this,t,i)}get type(){return p(this,t)}set type(r){$(this,t,r)}getAttribute(r){var i;return r==="invalid"?this.type==="converter-flag"&&!!((i=this.parentNode)!=null&&i.isInvalidFlag(this)):super.getAttribute(r)}},t=new WeakMap,e)}}),Wr,Xe,qr,ut,fe=f({"src/link/base.ts"(){"use strict";var t,e,s,r,bn,n;ht(),dt(),Q(),E(),St(),Wr=[G,at("[[")],ut=(n=class extends(qr=N){constructor(o,l,h,u=[],d="|"){super(void 0,h,u,{});k(this,r);k(this,t,!0);k(this,e);k(this,s);if(this.insertAt(new st(o,"link-target",h,u,{})),l!==void 0){const x=new N(l,h,u,{});x.type="link-text",x.setAttribute("stage",J-1),this.insertAt(x)}$(this,e,d)}get link(){}get fragment(){}afterBuild(){$(this,s,this.getTitle()),p(this,e).includes("\0")&&$(this,e,this.buildFromStr(p(this,e),0)),B(this,r,bn).call(this),super.afterBuild()}setAttribute(o,l){o==="bracket"?$(this,t,l):o==="title"?$(this,s,l):super.setAttribute(o,l)}toString(o){const l=super.toString(o,p(this,e));return p(this,t)?`[[${l}]]`:l}text(){const o=super.text("|");return p(this,t)?`[[${o}]]`:o}getAttribute(o){return o==="title"?p(this,s):super.getAttribute(o)}getGaps(o){return o===0?p(this,e).length:1}lint(o=this.getAbsoluteIndex(),l){}getTitle(o,l){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:l,temporary:o,decode:!0,selfLink:!0})}print(){return super.print(p(this,t)?{pre:"[[",post:"]]",sep:p(this,e)}:{sep:p(this,e)})}json(o,l=this.getAbsoluteIndex()){}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakSet,bn=function(){this.type!=="ext-inner"&&this.setAttribute("name",p(this,s).title)},n),Xe=W(qr),ut=j(Xe,0,"LinkBaseToken",Wr,ut),R(Xe,1,ut)}}),Mr,Je,Ur,et,$t=f({"src/nowiki/base.ts"(){"use strict";Q(),E(),Mr=[G],et=class extends(Ur=N){get innerText(){return this.firstChild.data}constructor(t="",e,s){super(t,e,s)}},Je=W(Ur),et=j(Je,0,"NowikiBaseToken",Mr,et),R(Je,1,et)}}),zr,Ke,Dr,Y,Ut=f({"src/nowiki/noinclude.ts"(){"use strict";Tt(),$t(),zr=[xt(!1)],Y=class extends(Dr=et){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},Ke=W(Dr),Y=j(Ke,0,"NoincludeToken",zr,Y),R(Ke,1,Y)}}),wn,wl=f({"src/link/redirectTarget.ts"(){"use strict";fe(),Ut(),wn=class extends ut{get type(){return"redirect-target"}constructor(t,e,s,r){super(t,void 0,s,r),e!==void 0&&this.insertAt(new Y(e,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){}}}}),Hr,Ye,Gr,te,_l=f({"src/redirect.ts"(){"use strict";var t,e,s;Tt(),Q(),E(),kt(),wl(),Hr=[xt(!1,!1),G],te=(s=class extends(Gr=N){constructor(i,n,a,o,l,h,u=[]){super(void 0,h,u);k(this,t);k(this,e);$(this,t,i),$(this,e,l),this.append(new mt(n,"redirect-syntax",h,u),new wn(a,o==null?void 0:o.slice(1),h,u))}get type(){return"redirect"}getAttribute(i){return i==="padding"?p(this,t).length:super.getAttribute(i)}toString(i){return p(this,t)+super.toString(i)+p(this,e)}lint(i=this.getAbsoluteIndex()){}print(){return super.print({pre:p(this,t),post:p(this,e)})}},t=new WeakMap,e=new WeakMap,s),Ye=W(Gr),te=j(Ye,0,"RedirectToken",Hr,te),R(Ye,1,te)}}),_n={};M(_n,{parseRedirect:()=>An});var An,Al=f({"parser/redirect.ts"(){"use strict";rt(),_l(),An=(t,e,s)=>{var i;(i=e.regexRedirect)!=null||(e.regexRedirect=new RegExp(String.raw`^(\s*)((?:${e.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=e.regexRedirect.exec(t);return r&&V.normalizeTitle(r[3],0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(t=`\0${s.length}o${t.slice(r[0].length)}`,new te(...r.slice(1),e,s),t):!1}}}),Vr,Ze,Qr,ee,yl=f({"src/onlyinclude.ts"(){"use strict";dt(),Q(),E(),Vr=[G,at("<onlyinclude>")],ee=class extends(Qr=N){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Ze=W(Qr),ee=j(Ze,0,"OnlyincludeToken",Vr,ee),R(Ze,1,ee)}}),ve,qe=f({"mixin/gapped.ts"(){"use strict";ve=(t=1)=>e=>{class s extends e{getGaps(){return t}}return s}}}),Xr,ts,Jr,wt,lr=f({"src/tagPair/index.ts"(){"use strict";var t,e,s;qe(),Q(),E(),Xr=[ve(),G],wt=(s=class extends(Jr=N){constructor(i,n,a,o,l,h=[]){super(void 0,l);k(this,t);k(this,e);ot(this,"closed");this.setAttribute("name",i.toLowerCase()),$(this,t,[i,o||i]),this.closed=o!=="",$(this,e,o===void 0),this.append(n,a);const u=typeof n=="string"?-1:h.indexOf(n);h.splice(u===-1?1/0:u,0,this)}get innerText(){return p(this,e)?void 0:this.lastChild.text()}get selfClosing(){return p(this,e)}toString(i){const{firstChild:n,lastChild:a}=this,[o,l]=p(this,t);return p(this,e)?`<${o}${n.toString(i)}/>`:`<${o}${n.toString(i)}>${a.toString(i)}${this.closed?`</${l}>`:""}`}text(){const[i,n]=p(this,t);return p(this,e)?`<${i}${this.firstChild.text()}/>`:`<${i}${super.text(">")}${this.closed?`</${n}>`:""}`}getAttribute(i){return i==="padding"?p(this,t)[0].length+1:super.getAttribute(i)}print(){{const[i,n]=p(this,t);return super.print(p(this,e)?{pre:`<${i}`,post:"/>"}:{pre:`<${i}`,sep:">",post:this.closed?`</${n}>`:""})}}json(i,n=this.getAbsoluteIndex()){}},t=new WeakMap,e=new WeakMap,s),ts=W(Jr),wt=j(ts,0,"TagPairToken",Xr,wt),R(ts,1,wt)}}),Kr,es,Yr,se,Tl=f({"src/tagPair/include.ts"(){"use strict";Tt(),lr(),Kr=[xt(!1)],se=class extends(Yr=wt){get type(){return"include"}constructor(t,e="",s,r,i,n){super(t,e,s!=null?s:"",s===void 0||r!=null?r:"",i,n)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},es=W(Yr),se=j(es,0,"IncludeToken",Kr,se),R(es,1,se)}}),Me,or=f({"mixin/attributesParent.ts"(){"use strict";Me=(t=0)=>e=>{}}}),X,ss,rs,is,Zr,ns,as,ti,ei,si,Te,ls,os,us,pt,yn,Tn,kn,kl=f({"util/sharable.ts"(){"use strict";X=new Set(["align"]),ss=new Set(["cite"]),rs=new Set(["cite","datetime"]),is=new Set(["width"]),Zr=new Set(["axis","align","bgcolor","height","width","valign"]),ns=new Set([...Zr,"abbr","headers","scope","rowspan","colspan"]),as=new Set(["type"]),ti=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ei=new Set(["clear"]),si=new Set(["bgcolor","align","valign"]),Te=new Set(["id","qid","forcemathmode","type","display"]),ls=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),os=new Set(["weight"]),us=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),pt=new Set,yn=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Tn={div:X,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,blockquote:ss,q:ss,p:X,br:ei,pre:is,ins:rs,del:rs,ul:as,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ti,"border"]),caption:X,tr:si,td:ns,th:ns,font:new Set(["size","color","face"]),hr:is,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:as,poem:X,categorytree:X,combooption:X,img:new Set(["alt","src","width","height","loading","srcset"])},kn={pre:new Set(["format"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:pt,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:os,choicetemplate:os,imagemap:pt,inputbox:pt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:pt,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Te,"chem"]),chem:Te,ce:Te,hiero:pt,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ls,syntaxhighlight:ls,templatedata:pt,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:pt,mapframe:new Set([...us,"frameless"]),maplink:new Set([...us,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])}}}),ri,ii,ni,ai,Js,Sl=f({"src/attribute.ts"(){"use strict";var t,e,s,r,i,Sn,$n,o;Oe(),D(),ht(),kl(),E(),St(),ri=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ii=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,ni=new Set(["ext","arg","magic-word","template"]),ai=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Js=(o=class extends N{constructor(h,u,d,x,c,g="",v,y=[]){const C=new st(d,"attr-key",c,y);let b;if(d==="title"||u==="img"&&d==="alt")b=new N(v,c,y,{}),b.type="attr-value",b.setAttribute("stage",J-1);else if(u==="gallery"&&d==="caption"||u==="ref"&&d==="details"||(u==="mapframe"||u==="maplink")&&d==="text"||u==="choose"&&(d==="before"||d==="after")){const T={...c,excludes:[...c.excludes,"heading","html","table","hr","list"]};b=new N(v,T,y,{}),b.type="attr-value",b.setAttribute("stage",1)}else b=new st(v,"attr-value",c,y,{});super(void 0,c,y);k(this,i);k(this,t);k(this,e);k(this,s);k(this,r);$(this,t,h),this.append(C,b),$(this,s,g),$(this,r,[...x]),$(this,e,u),this.setAttribute("name",Ot(H(d)))}get type(){return p(this,t)}get tag(){return p(this,e)}get balanced(){}afterBuild(){p(this,s).includes("\0")&&$(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&$(this,e,this.parentNode.name),B(this,i,Sn).call(this),super.afterBuild()}toString(h){const[u="",d=""]=p(this,r);return p(this,s)?super.toString(h,p(this,s)+u)+d:this.firstChild.toString(h)}text(){return p(this,s)?`${super.text(`${p(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var h,u;return p(this,s)?p(this,s).length+((u=(h=p(this,r)[0])==null?void 0:h.length)!=null?u:0):0}lint(h=this.getAbsoluteIndex(),u){}getValue(){return p(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(h){return h==="invalid"?B(this,i,$n).call(this):super.getAttribute(h)}print(){{const[h="",u=""]=p(this,r);return p(this,s)?super.print({sep:xe(p(this,s))+h,post:u}):super.print()}}json(h,u=this.getAbsoluteIndex()){}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakSet,Sn=function(){this.setAttribute("name",Ot(this.firstChild.text()))},$n=function(h,u){const{firstChild:d,lastChild:x,type:c,name:g,tag:v,parentNode:y}=this,C=!x.childNodes.some(({type:A})=>ni.has(A)),b=this.getValue(),T=kn[v],w=Tn[v],{length:I}=this.toString();let L="illegal-attr",P,m;if(!(T!=null&&T.has(g))&&!(w!=null&&w.has(g))&&(c==="ext-attr"?T||w:!/\{\{[^{]+\}\}/u.test(g))&&(c==="ext-attr"&&!w||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(v==="meta"||v==="link"||!yn.has(g)))||(g==="itemtype"||g==="itemid"||g==="itemref")&&!(y!=null&&y.hasAttr("itemscope"))){if(h===void 0)return!0}else if(g==="style"&&typeof b=="string"&&ri.test(b)){if(h===void 0)return!0}else if(g==="tabindex"&&typeof b=="string"&&b!=="0"){if(h===void 0)return!0}else if(typeof b=="string"&&((/^xmlns:[\w:.-]+$/u.test(g)||ai.has(g))&&ii.test(b)||C&&(g==="href"||v==="img"&&g==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(b))){if(h===void 0)return!0}else if(C&&c!=="ext-attr"){const A=cn(v,g),_=String(b).toLowerCase();if(A.length>0&&A.every(S=>S!==_)&&h===void 0)return!0}return!1},o)}}),hs,li,Ue,ur=f({"src/attributes.ts"(){"use strict";var t,e,Ks,r;D(),E(),St(),Sl(),hs=i=>i.slice(0,-1),li=i=>`${hs(i)}-dirty`,Ue=(r=class extends N{constructor(n,a,o,l,h=[]){super(void 0,l,h,{});k(this,e);k(this,t);if($(this,t,a),this.setAttribute("name",o),n){const u=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let d="",x=u.exec(n),c=0;const g=(()=>{d&&(super.insertAt(new st(d,li(a),l,h,{})),d="")});for(;x;){const{index:v,0:y,1:C,2:b,3:T,4:w,5:I,6:L}=x;if(d+=n.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(H(C).trim())){const P=w!=null?w:L,m=[T,I],A=new Js(hs(a),o,C,m,l,b,P,h);g(),super.insertAt(A)}else d+=y;({lastIndex:c}=u),x=u.exec(n)}d+=n.slice(c),g()}}get type(){return p(this,t)}afterBuild(){const{parentNode:n}=this;n!=null&&n.is("td")&&this.setAttribute("name",n.subtype),super.afterBuild()}getAttrTokens(n){return this.childNodes.filter(a=>a instanceof Js&&(!n||a.name===Ot(n)))}hasAttr(n){return this.getAttrTokens(n).length>0}getAttrToken(n){}getAttr(n){}lint(n=this.getAbsoluteIndex(),a){}escape(){}getAttribute(n){return n==="invalid"?B(this,e,Ks).call(this):super.getAttribute(n)}print(){return this.toString()?`<span class="wpb-${this.type}${B(this,e,Ks).call(this)?" wpb-invalid":""}">${this.childNodes.map(n=>n.print(n instanceof st?{class:n.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},t=new WeakMap,e=new WeakSet,Ks=function(){const{parentNode:n}=this;return(n==null?void 0:n.type)==="html"&&n.closing&&this.text().trim()!==""},r)}}),Cn={};M(Cn,{PreToken:()=>In});var In,$l=f({"src/pre.ts"(){"use strict";ht(),E(),Ut(),In=class extends N{get type(){return"ext-inner"}constructor(t,e,s=[]){if(t){const r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:n}=r.source;let a=r.exec(t);a&&(i.lastIndex=a.index+n);let o=i.exec(t),l=0,h="";for(;a&&o;)new Y(a[0],e,s,!0),new Y(o[0],e,s,!0),h+=`${t.slice(l,a.index)}\0${s.length-1}n${t.slice(a.index+n,o.index)}\0${s.length}n`,l=o.index+n+1,r.lastIndex=l,a=r.exec(t),a&&(i.lastIndex=a.index+n),o=i.exec(t);t=h+t.slice(l)}super(t,e,s,{}),this.setAttribute("stage",J-1)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){}}}}),ze,hr=f({"src/multiLine/index.ts"(){"use strict";E(),ze=class extends N{get type(){return"ext-inner"}toString(t){return super.toString(t,`
|
|
1
|
+
"use strict";(()=>{var rl=Object.defineProperty;var kr=t=>{throw TypeError(t)};var il=(t,e,s)=>e in t?rl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var nl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ot=(t,e,s)=>il(t,typeof e!="symbol"?e+"":e,s),Ge=(t,e,s)=>e.has(t)||kr("Cannot "+s);var p=(t,e,s)=>(Ge(t,e,"read from private field"),s?s.call(t):e.get(t)),k=(t,e,s)=>e.has(t)?kr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),$=(t,e,s,r)=>(Ge(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),B=(t,e,s)=>(Ge(t,e,"access private method"),s);var Sr=(t,e,s,r)=>({set _(i){$(t,e,i,s)},get _(){return p(t,e,r)}});var mo=nl((vo,el)=>{var al=Object.create,qt=Object.defineProperty,an=Object.getOwnPropertyDescriptor,rr=Object.getOwnPropertyNames,ll=Object.prototype.hasOwnProperty,ln=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Mt=t=>{throw TypeError(t)},on=(t,e,s)=>e in t?qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,$r=(t,e)=>qt(t,"name",{value:e,configurable:!0}),f=(t,e)=>function(){return t&&(e=(0,t[rr(t)[0]])(t=0)),e},ol=(t,e)=>function(){return e||(0,t[rr(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e)=>{for(var s in e)qt(t,s,{get:e[s],enumerable:!0})},ul=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of rr(e))!ll.call(t,i)&&i!==s&&qt(t,i,{get:()=>e[i],enumerable:!(r=an(e,i))||r.enumerable});return t},O=t=>ul(qt({},"__esModule",{value:!0}),t),W=t=>{var e;return[,,,al((e=t==null?void 0:t[ln("metadata")])!=null?e:null)]},un=["class","method","getter","setter","accessor","field","value","get","set"],Yt=t=>t!==void 0&&typeof t!="function"?Mt("Function expected"):t,hl=(t,e,s,r,i)=>({kind:un[t],name:e,metadata:r,addInitializer:n=>s._?Mt("Already initialized"):i.push(Yt(n||null))}),ir=(t,e)=>on(e,ln("metadata"),t[3]),R=(t,e,s,r)=>{for(var i=0,n=t[e>>1],a=n&&n.length;i<a;i++)e&1?n[i].call(s):r=n[i].call(s,r);return r},j=(t,e,s,r,i,n)=>{var a,o,l,h,u,d=e&7,x=!!(e&8),c=!!(e&16),g=d>3?t.length+1:d?x?1:2:0,v=un[d+5],y=d>3&&(t[g-1]=[]),C=t[g]||(t[g]=[]),b=d&&(!c&&!x&&(i=i.prototype),d<5&&(d>3||!c)&&an(d<4?i:{get[s](){return U(this,n)},set[s](w){return tt(this,n,w)}},s));d?c&&d<4&&$r(n,(d>2?"set ":d>1?"get ":"")+s):$r(i,s);for(var T=r.length-1;T>=0;T--)h=hl(d,s,l={},t[3],C),d&&(h.static=x,h.private=c,u=h.access={has:c?w=>pl(i,w):w=>s in w},d^3&&(u.get=c?w=>(d^1?U:Hs)(w,i,d^4?n:b.get):w=>w[s]),d>2&&(u.set=c?(w,I)=>tt(w,i,I,d^4?n:b.set):(w,I)=>w[s]=I)),o=(0,r[T])(d?d<4?c?n:b[v]:d>4?void 0:{get:b.get,set:b.set}:i,h),l._=1,d^4||o===void 0?Yt(o)&&(d>4?y.unshift(o):d?c?n=o:b[v]=o:i=o):typeof o!="object"||o===null?Mt("Object expected"):(Yt(a=o.get)&&(b.get=a),Yt(a=o.set)&&(b.set=a),Yt(a=o.init)&&y.unshift(a));return d||ir(t,i),b&&qt(i,s,b),c?d^4?n:b:i},dl=(t,e,s)=>on(t,typeof e!="symbol"?e+"":e,s),nr=(t,e,s)=>e.has(t)||Mt("Cannot "+s),pl=(t,e)=>Object(e)!==e?Mt('Cannot use the "in" operator on this value'):t.has(e),U=(t,e,s)=>(nr(t,e,"read from private field"),s?s.call(t):e.get(t)),ct=(t,e,s)=>e.has(t)?Mt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),tt=(t,e,s,r)=>(nr(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),Hs=(t,e,s)=>(nr(t,e,"access private method"),s),cl=(t,e,s,r)=>({set _(i){tt(t,e,i,s)},get _(){return U(t,e,r)}});function K(t,e,s){return s===1?t.replace(/\0(\d+)g\x7F/gu,(r,i)=>K(String(e[i]),e,2)):s===2?t.replace(/\0(\d+)n\x7F/gu,(r,i)=>String(e[i])):t.replace(/\0(\d+)\x7F/gu,(r,i)=>e[i])}var At,Ve,ce,ge,Ot,Ct,hn,H,yt,Cr,Ir,we,Gs,dn,Nr,Fr,xe,Wt,D=f({"util/string.ts"(){"use strict";At=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ve=String.raw`[^[\]<>"\0-\x1F\x7F${At}\uFFFD]`,ce=String.raw`(?:\[[\da-f:.]+\]|${Ve})`,ge=String.raw`(?:${Ve}|\0\d+[cn!~]\x7F)*`,Ot=t=>t.trim().toLowerCase(),Ct=(t,e)=>s=>s.replace(t,e),hn=Ct(/[\0\x7F]|\r$/gmu,""),H=Ct(/\0\d+[cn]\x7F/gu,""),yt=(t,e="")=>t.map(s=>typeof s=="string"?s:s.text()).join(e),Cr={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ir=Ct(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(t,e,s)=>e?String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e)):Cr[s.toLowerCase()]),Gs=t=>(we!=null||(we=Ir),we(t)),dn=Ct(/&#(\d+|x[\da-f]+);/giu,(t,e)=>String.fromCodePoint(+((/^x/iu.test(e)?"0":"")+e))),Nr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Fr=(t=/[&<>"{}[\]|]/gu)=>Ct(t,e=>`&${Nr[e]};`),xe=Fr(/[&<>]/gu),Wt=(t,e={})=>{const{pre:s="",post:r="",sep:i=""}=e;return s+t.map(n=>n.print()).join(i)+r}}}),gl=ol({"config/minimum.json"(t,e){e.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{0:"",6:"File",10:"Template",14:"Category",828:"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),J,pn,Vs,ht=f({"util/constants.ts"(){"use strict";J=11,pn=new Set(["alt","link","lang","page","caption"]),Vs=gl()}});function pe(t){const e=new Map,s=new WeakMap;return r=>{const i=typeof r=="string"?e:s;if(i.has(r)){const a=i.get(r);return a.lastIndex=0,a}const n=t(r);return i.set(r,n),n}}var Qs,je=f({"../common/dist/index.mjs"(){"use strict";Qs=t=>decodeURIComponent(t.replace(/%(?![\da-f]{2})/giu,"%25"))}}),Lr,Er,Fe,jt,cn,Oe=f({"util/lint.ts"(){"use strict";ft(),rt(),Lr=new Set(["tr","td","th","caption"]),Er=new Set(["Template:!!","Template:!-"]),Fe=t=>{const e=t.childNodes.find(s=>s.text().trim());if(!e||e.type==="text"&&e.data.trim().startsWith("!")||e.is("magic-word")&&e.name==="!"||e.is("template")&&Er.has(e.name)||e.is("html")&&Lr.has(e.name))return!1;if(e.is("arg"))return e.length>1&&Fe(e.childNodes[1]);if(e.is("magic-word"))try{const s=e.getPossibleValues().map(Fe);return s.includes(2)?2:s.includes(1)&&1}catch{}return e.is("template")||e.is("magic-word")&&e.name==="invoke"?1:2},jt=(t,e,s,r)=>{if(t&&(r||V.viewOnly&&t[0]===nt.rev))return t[1];const i=e();return(r||V.viewOnly)&&s([nt.rev,i]),i},cn=(t,e)=>t==="ol"&&e==="type"?["1","a","A","i","I"]:t==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[]}}),Pr,gn,xl=f({"util/selector.ts"(){"use strict";Pr=t=>{if(t.includes("#")){const e=t.indexOf("#"),s=t.slice(0,e),r=t.slice(e+1);return(i,n)=>(e===0||i===s)&&n===r}return e=>e===t},gn=(t,e,s)=>{if(t=t.trim(),!t)return(()=>!0);const r=t.split(",").map(i=>i.trim()).filter(i=>i!=="").map(Pr);return(({type:i,name:n})=>r.some(a=>a(i,n)))}}}),We,ar=f({"mixin/cached.ts"(){"use strict";Oe(),We=(t=!0)=>e=>{const s=new WeakMap;return function(...r){return jt(s.get(this),()=>e.apply(this,r),i=>{s.set(this,i)},t)}}}}),xn,ml=f({"mixin/nodeLike.ts"(){"use strict";xn=t=>{class e extends t{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){}get offsetWidth(){}}return e}}}),Br,Rr,_e,Gt,Vt,Ae,ye,Qt,Xt,bt,mn=f({"lib/node.ts"(){"use strict";Oe(),ft(),ar(),ml(),rt(),Rr=[xn],Br=[We(!1)],bt=class{constructor(){R(Xt,5,this),dl(this,"childNodes",[]),ct(this,_e),ct(this,Gt),ct(this,Vt),ct(this,Ae),ct(this,ye),ct(this,Qt,{})}get parentNode(){return U(this,_e)}get nextSibling(){return U(this,Gt)}get previousSibling(){return U(this,Vt)}getChildNodes(){const{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":tt(this,_e,e),e||(tt(this,Gt,void 0),tt(this,Vt,void 0));break;case"nextSibling":tt(this,Gt,e);break;case"previousSibling":tt(this,Vt,e);break;case"aIndex":break;default:this[t]=e}}getRootNode(){return jt(U(this,Ae),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{const[,e]=t;e.type==="root"&&tt(this,Ae,t)})}indexFromPos(t,e){}posFromIndex(t){}getDimension(){}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){const{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return jt(U(this,Qt)[t],()=>{const{childNodes:e}=this,s=t+(t<0?e.length:0);let r=this.getAttribute("padding");for(let i=0;i<s;i++)V.viewOnly&&(U(this,Qt)[i]=[nt.rev,r]),r+=e[i].toString().length+this.getGaps(i);return r},e=>{U(this,Qt)[t]=e})}getAbsoluteIndex(){return jt(U(this,ye),()=>{const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{tt(this,ye,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){}seal(t,e){}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}},Xt=W(null),_e=new WeakMap,Gt=new WeakMap,Vt=new WeakMap,Ae=new WeakMap,ye=new WeakMap,Qt=new WeakMap,j(Xt,1,"getLines",Br,bt),bt=j(Xt,0,"AstNode",Rr,bt),R(Xt,1,bt)}}),fn,fl=f({"mixin/elementLike.ts"(){"use strict";fn=t=>{}}}),jr,Qe,Or,Zt,vl=f({"lib/element.ts"(){"use strict";D(),ft(),xl(),mn(),fl(),jr=[fn],Zt=class extends(Or=bt){get length(){return this.childNodes.length}text(t){return yt(this.childNodes,t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return yr(this,e,0,[t]),t}closest(t){const e=gn(t,this);let{parentNode:s}=this;for(;s;){if(e(s))return s;({parentNode:s}=s)}}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(const e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;const s=this.childNodes[e],{data:r}=s;return s.replaceData(t),r}toString(t,e=""){return this.childNodes.map(s=>s.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){}print(t={}){{const e=t.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+Wt(this.childNodes,t)+(e===""?"":"</span>"):""}}json(t,e=this.getAbsoluteIndex()){}},Qe=W(Or),Zt=j(Qe,0,"AstElement",jr,Zt),R(Qe,1,Zt)}}),Xs,bl=f({"lib/text.ts"(){"use strict";var t,vn,s;D(),mn(),Xs=(s=class extends bt{constructor(i){super();k(this,t);ot(this,"data","");this.data=i}get type(){return"text"}toString(i){var n;return i&&!((n=this.parentNode)!=null&&n.getAttribute("built"))?H(this.data):this.data}text(){return this.data}lint(i=this.getAbsoluteIndex(),n){}replaceData(i){B(this,t,vn).call(this,i)}splitText(i){this.lspError("AstText.splitText")}escape(){}print(){return xe(this.data)}},t=new WeakSet,vn=function(i){this.setAttribute("data",i)},s)}}),xt,Tt=f({"mixin/hidden.ts"(){"use strict";xt=(t=!0,e=!0)=>s=>{class r extends s{text(){return""}lint(n){}}return r}}}),G,Q=f({"mixin/noEscape.ts"(){"use strict";G=t=>{}}}),mt,kt=f({"src/syntax.ts"(){"use strict";var t,e;E(),mt=(e=class extends N{constructor(r,i,n,a,o){super(r,n,a,o);k(this,t);$(this,t,i)}get type(){return p(this,t)}lint(r=this.getAbsoluteIndex()){}},t=new WeakMap,e)}}),at,dt=f({"mixin/padded.ts"(){"use strict";at=({length:t})=>e=>{class s extends e{getAttribute(i){return i==="padding"?t:super.getAttribute(i)}}return s}}}),st,St=f({"src/atom.ts"(){"use strict";var t,e;E(),st=(e=class extends N{constructor(r,i,n,a,o){super(r,n,a,o);k(this,t);$(this,t,i)}get type(){return p(this,t)}set type(r){$(this,t,r)}getAttribute(r){var i;return r==="invalid"?this.type==="converter-flag"&&!!((i=this.parentNode)!=null&&i.isInvalidFlag(this)):super.getAttribute(r)}},t=new WeakMap,e)}}),Wr,Xe,qr,ut,fe=f({"src/link/base.ts"(){"use strict";var t,e,s,r,bn,n;ht(),dt(),Q(),E(),St(),Wr=[G,at("[[")],ut=(n=class extends(qr=N){constructor(o,l,h,u=[],d="|"){super(void 0,h,u,{});k(this,r);k(this,t,!0);k(this,e);k(this,s);if(this.insertAt(new st(o,"link-target",h,u,{})),l!==void 0){const x=new N(l,h,u,{});x.type="link-text",x.setAttribute("stage",J-1),this.insertAt(x)}$(this,e,d)}get link(){}get fragment(){}afterBuild(){$(this,s,this.getTitle()),p(this,e).includes("\0")&&$(this,e,this.buildFromStr(p(this,e),0)),B(this,r,bn).call(this),super.afterBuild()}setAttribute(o,l){o==="bracket"?$(this,t,l):o==="title"?$(this,s,l):super.setAttribute(o,l)}toString(o){const l=super.toString(o,p(this,e));return p(this,t)?`[[${l}]]`:l}text(){const o=super.text("|");return p(this,t)?`[[${o}]]`:o}getAttribute(o){return o==="title"?p(this,s):super.getAttribute(o)}getGaps(o){return o===0?p(this,e).length:1}lint(o=this.getAbsoluteIndex(),l){}getTitle(o,l){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:l,temporary:o,decode:!0,selfLink:!0})}print(){return super.print(p(this,t)?{pre:"[[",post:"]]",sep:p(this,e)}:{sep:p(this,e)})}json(o,l=this.getAbsoluteIndex()){}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakSet,bn=function(){this.type!=="ext-inner"&&this.setAttribute("name",p(this,s).title)},n),Xe=W(qr),ut=j(Xe,0,"LinkBaseToken",Wr,ut),R(Xe,1,ut)}}),Mr,Je,Ur,et,$t=f({"src/nowiki/base.ts"(){"use strict";Q(),E(),Mr=[G],et=class extends(Ur=N){get innerText(){return this.firstChild.data}constructor(t="",e,s){super(t,e,s)}},Je=W(Ur),et=j(Je,0,"NowikiBaseToken",Mr,et),R(Je,1,et)}}),zr,Ke,Dr,Y,Ut=f({"src/nowiki/noinclude.ts"(){"use strict";Tt(),$t(),zr=[xt(!1)],Y=class extends(Dr=et){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},Ke=W(Dr),Y=j(Ke,0,"NoincludeToken",zr,Y),R(Ke,1,Y)}}),wn,wl=f({"src/link/redirectTarget.ts"(){"use strict";fe(),Ut(),wn=class extends ut{get type(){return"redirect-target"}constructor(t,e,s,r){super(t,void 0,s,r),e!==void 0&&this.insertAt(new Y(e,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){}}}}),Hr,Ye,Gr,te,_l=f({"src/redirect.ts"(){"use strict";var t,e,s;Tt(),Q(),E(),kt(),wl(),Hr=[xt(!1,!1),G],te=(s=class extends(Gr=N){constructor(i,n,a,o,l,h,u=[]){super(void 0,h,u);k(this,t);k(this,e);$(this,t,i),$(this,e,l),this.append(new mt(n,"redirect-syntax",h,u),new wn(a,o==null?void 0:o.slice(1),h,u))}get type(){return"redirect"}getAttribute(i){return i==="padding"?p(this,t).length:super.getAttribute(i)}toString(i){return p(this,t)+super.toString(i)+p(this,e)}lint(i=this.getAbsoluteIndex()){}print(){return super.print({pre:p(this,t),post:p(this,e)})}},t=new WeakMap,e=new WeakMap,s),Ye=W(Gr),te=j(Ye,0,"RedirectToken",Hr,te),R(Ye,1,te)}}),_n={};M(_n,{parseRedirect:()=>An});var An,Al=f({"parser/redirect.ts"(){"use strict";rt(),_l(),An=(t,e,s)=>{var i;(i=e.regexRedirect)!=null||(e.regexRedirect=new RegExp(String.raw`^(\s*)((?:${e.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=e.regexRedirect.exec(t);return r&&V.normalizeTitle(r[3],0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(t=`\0${s.length}o${t.slice(r[0].length)}`,new te(...r.slice(1),e,s),t):!1}}}),Vr,Ze,Qr,ee,yl=f({"src/onlyinclude.ts"(){"use strict";dt(),Q(),E(),Vr=[G,at("<onlyinclude>")],ee=class extends(Qr=N){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Ze=W(Qr),ee=j(Ze,0,"OnlyincludeToken",Vr,ee),R(Ze,1,ee)}}),ve,qe=f({"mixin/gapped.ts"(){"use strict";ve=(t=1)=>e=>{class s extends e{getGaps(){return t}}return s}}}),Xr,ts,Jr,wt,lr=f({"src/tagPair/index.ts"(){"use strict";var t,e,s;qe(),Q(),E(),Xr=[ve(),G],wt=(s=class extends(Jr=N){constructor(i,n,a,o,l,h=[]){super(void 0,l);k(this,t);k(this,e);ot(this,"closed");this.setAttribute("name",i.toLowerCase()),$(this,t,[i,o||i]),this.closed=o!=="",$(this,e,o===void 0),this.append(n,a);const u=typeof n=="string"?-1:h.indexOf(n);h.splice(u===-1?1/0:u,0,this)}get innerText(){return p(this,e)?void 0:this.lastChild.text()}get selfClosing(){return p(this,e)}toString(i){const{firstChild:n,lastChild:a}=this,[o,l]=p(this,t);return p(this,e)?`<${o}${n.toString(i)}/>`:`<${o}${n.toString(i)}>${a.toString(i)}${this.closed?`</${l}>`:""}`}text(){const[i,n]=p(this,t);return p(this,e)?`<${i}${this.firstChild.text()}/>`:`<${i}${super.text(">")}${this.closed?`</${n}>`:""}`}getAttribute(i){return i==="padding"?p(this,t)[0].length+1:super.getAttribute(i)}print(){{const[i,n]=p(this,t);return super.print(p(this,e)?{pre:`<${i}`,post:"/>"}:{pre:`<${i}`,sep:">",post:this.closed?`</${n}>`:""})}}json(i,n=this.getAbsoluteIndex()){}},t=new WeakMap,e=new WeakMap,s),ts=W(Jr),wt=j(ts,0,"TagPairToken",Xr,wt),R(ts,1,wt)}}),Kr,es,Yr,se,Tl=f({"src/tagPair/include.ts"(){"use strict";Tt(),lr(),Kr=[xt(!1)],se=class extends(Yr=wt){get type(){return"include"}constructor(t,e="",s,r,i,n){super(t,e,s!=null?s:"",s===void 0||r!=null?r:"",i,n)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){}},es=W(Yr),se=j(es,0,"IncludeToken",Kr,se),R(es,1,se)}}),Me,or=f({"mixin/attributesParent.ts"(){"use strict";Me=(t=0)=>e=>{}}}),X,ss,rs,is,Zr,ns,as,ti,ei,si,Te,ls,os,us,pt,yn,Tn,kn,kl=f({"util/sharable.ts"(){"use strict";X=new Set(["align"]),ss=new Set(["cite"]),rs=new Set(["cite","datetime"]),is=new Set(["width"]),Zr=new Set(["axis","align","bgcolor","height","width","valign"]),ns=new Set([...Zr,"abbr","headers","scope","rowspan","colspan"]),as=new Set(["type"]),ti=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ei=new Set(["clear"]),si=new Set(["bgcolor","align","valign"]),Te=new Set(["id","qid","forcemathmode","type","display"]),ls=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),os=new Set(["weight"]),us=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),pt=new Set,yn=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Tn={div:X,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,blockquote:ss,q:ss,p:X,br:ei,pre:is,ins:rs,del:rs,ul:as,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ti,"border"]),caption:X,tr:si,td:ns,th:ns,font:new Set(["size","color","face"]),hr:is,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:as,poem:X,categorytree:X,combooption:X,img:new Set(["alt","src","width","height","loading","srcset"])},kn={pre:new Set(["format"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:pt,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:os,choicetemplate:os,imagemap:pt,inputbox:pt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:pt,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Te,"chem"]),chem:Te,ce:Te,hiero:pt,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ls,syntaxhighlight:ls,templatedata:pt,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:pt,mapframe:new Set([...us,"frameless"]),maplink:new Set([...us,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])}}}),ri,ii,ni,ai,Js,Sl=f({"src/attribute.ts"(){"use strict";var t,e,s,r,i,Sn,$n,o;Oe(),D(),ht(),kl(),E(),St(),ri=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ii=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,ni=new Set(["ext","arg","magic-word","template"]),ai=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Js=(o=class extends N{constructor(h,u,d,x,c,g="",v,y=[]){const C=new st(d,"attr-key",c,y);let b;if(d==="title"||u==="img"&&d==="alt")b=new N(v,c,y,{}),b.type="attr-value",b.setAttribute("stage",J-1);else if(u==="gallery"&&d==="caption"||u==="ref"&&d==="details"||(u==="mapframe"||u==="maplink")&&d==="text"||u==="choose"&&(d==="before"||d==="after")){const T={...c,excludes:[...c.excludes,"heading","html","table","hr","list"]};b=new N(v,T,y,{}),b.type="attr-value",b.setAttribute("stage",1)}else b=new st(v,"attr-value",c,y,{});super(void 0,c,y);k(this,i);k(this,t);k(this,e);k(this,s);k(this,r);$(this,t,h),this.append(C,b),$(this,s,g),$(this,r,[...x]),$(this,e,u),this.setAttribute("name",Ot(H(d)))}get type(){return p(this,t)}get tag(){return p(this,e)}get balanced(){}afterBuild(){p(this,s).includes("\0")&&$(this,s,this.buildFromStr(p(this,s),0)),this.parentNode&&$(this,e,this.parentNode.name),B(this,i,Sn).call(this),super.afterBuild()}toString(h){const[u="",d=""]=p(this,r);return p(this,s)?super.toString(h,p(this,s)+u)+d:this.firstChild.toString(h)}text(){return p(this,s)?`${super.text(`${p(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var h,u;return p(this,s)?p(this,s).length+((u=(h=p(this,r)[0])==null?void 0:h.length)!=null?u:0):0}lint(h=this.getAbsoluteIndex(),u){}getValue(){return p(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(h){return h==="invalid"?B(this,i,$n).call(this):super.getAttribute(h)}print(){{const[h="",u=""]=p(this,r);return p(this,s)?super.print({sep:xe(p(this,s))+h,post:u}):super.print()}}json(h,u=this.getAbsoluteIndex()){}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakSet,Sn=function(){this.setAttribute("name",Ot(this.firstChild.text()))},$n=function(h,u){const{firstChild:d,lastChild:x,type:c,name:g,tag:v,parentNode:y}=this,C=!x.childNodes.some(({type:A})=>ni.has(A)),b=this.getValue(),T=kn[v],w=Tn[v],{length:I}=this.toString();let L="illegal-attr",P,m;if(!(T!=null&&T.has(g))&&!(w!=null&&w.has(g))&&(c==="ext-attr"?T||w:!/\{\{[^{]+\}\}/u.test(g))&&(c==="ext-attr"&&!w||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(v==="meta"||v==="link"||!yn.has(g)))||(g==="itemtype"||g==="itemid"||g==="itemref")&&!(y!=null&&y.hasAttr("itemscope"))){if(h===void 0)return!0}else if(g==="style"&&typeof b=="string"&&ri.test(b)){if(h===void 0)return!0}else if(g==="tabindex"&&typeof b=="string"&&b!=="0"){if(h===void 0)return!0}else if(typeof b=="string"&&((/^xmlns:[\w:.-]+$/u.test(g)||ai.has(g))&&ii.test(b)||C&&(g==="href"||v==="img"&&g==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(b))){if(h===void 0)return!0}else if(C&&c!=="ext-attr"){const A=cn(v,g),_=String(b).toLowerCase();if(A.length>0&&A.every(S=>S!==_)&&h===void 0)return!0}return!1},o)}}),hs,li,Ue,ur=f({"src/attributes.ts"(){"use strict";var t,e,Ks,r;D(),E(),St(),Sl(),hs=i=>i.slice(0,-1),li=i=>`${hs(i)}-dirty`,Ue=(r=class extends N{constructor(n,a,o,l,h=[]){super(void 0,l,h,{});k(this,e);k(this,t);if($(this,t,a),this.setAttribute("name",o),n){const u=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let d="",x=u.exec(n),c=0;const g=(()=>{d&&(super.insertAt(new st(d,li(a),l,h,{})),d="")});for(;x;){const{index:v,0:y,1:C,2:b,3:T,4:w,5:I,6:L}=x;if(d+=n.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(H(C).trim())){const P=w!=null?w:L,m=[T,I],A=new Js(hs(a),o,C,m,l,b,P,h);g(),super.insertAt(A)}else d+=y;({lastIndex:c}=u),x=u.exec(n)}d+=n.slice(c),g()}}get type(){return p(this,t)}afterBuild(){const{parentNode:n}=this;n!=null&&n.is("td")&&this.setAttribute("name",n.subtype),super.afterBuild()}getAttrTokens(n){return this.childNodes.filter(a=>a instanceof Js&&(!n||a.name===Ot(n)))}hasAttr(n){return this.getAttrTokens(n).length>0}getAttrToken(n){}getAttr(n){}lint(n=this.getAbsoluteIndex(),a){}escape(){}getAttribute(n){return n==="invalid"?B(this,e,Ks).call(this):super.getAttribute(n)}print(){return this.toString()?`<span class="wpb-${this.type}${B(this,e,Ks).call(this)?" wpb-invalid":""}">${this.childNodes.map(n=>n.print(n instanceof st?{class:n.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},t=new WeakMap,e=new WeakSet,Ks=function(){const{parentNode:n}=this;return(n==null?void 0:n.type)==="html"&&n.closing&&this.text().trim()!==""},r)}}),Cn={};M(Cn,{PreToken:()=>In});var In,$l=f({"src/pre.ts"(){"use strict";ht(),E(),Ut(),In=class extends N{get type(){return"ext-inner"}constructor(t,e,s=[]){if(t){const r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:n}=r.source;let a=r.exec(t);a&&(i.lastIndex=a.index+n);let o=i.exec(t),l=0,h="";for(;a&&o;)new Y(a[0],e,s,!0),new Y(o[0],e,s,!0),h+=`${t.slice(l,a.index)}\0${s.length-1}n${t.slice(a.index+n,o.index)}\0${s.length}n`,l=o.index+n+1,r.lastIndex=l,a=r.exec(t),a&&(i.lastIndex=a.index+n),o=i.exec(t);t=h+t.slice(l)}super(t,e,s,{}),this.setAttribute("stage",J-1)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){}}}}),ze,hr=f({"src/multiLine/index.ts"(){"use strict";E(),ze=class extends N{get type(){return"ext-inner"}toString(t){return super.toString(t,`
|
|
2
2
|
`)}text(){return super.text(`
|
|
3
3
|
`).replace(/\n\s*\n/gu,`
|
|
4
4
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
|
@@ -20,7 +20,7 @@ ${u}`,l),n.push(l);continue}const[,v,y,C,b]=g;if(v){for(;!l.is("table");)l=n.pop
|
|
|
20
20
|
${d}${v}`,!0),h(b,n[n.length-1])}else if(y){l=Ps(l,n),l.is("tr")&&(l=n.pop());const T=new fa(`
|
|
21
21
|
${d}${y}`,b,r,i);n.push(l,T),l.insertAt(T)}else{l=Ps(l,n);const T=C==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let w=T.exec(b),I=0,L=`
|
|
22
22
|
${d}${C}`;const P=m=>{const A=new tr(L,b.slice(I,w==null?void 0:w.index),r,i);return m.insertAt(A),A};for(;w;)P(l),{lastIndex:I}=T,[L]=w,w=T.exec(b);n.push(l,P(l))}}return o.slice(1)}}}),oe,Zl=f({"../cm-util/dist/index.mjs"(){"use strict";oe=t=>!/^_{2}.+_{2}$/u.test(t)}}),Aa,to=f({"src/nowiki/hr.ts"(){"use strict";$t(),Aa=class extends et{get type(){return"hr"}}}}),Vi,Bs,Qi,ue,eo=f({"src/nowiki/doubleUnderscore.ts"(){"use strict";var t,e;Tt(),dt(),$t(),Vi=[xt(),at("__")],ue=(e=class extends(Qi=et){constructor(r,i,n,a,o){var d,x;super(r,a,o);k(this,t);const l=r.toLowerCase(),{doubleUnderscore:[,,h,u]}=a;this.setAttribute("name",(x=i?(d=u==null?void 0:u[r])==null?void 0:d.toLowerCase():h==null?void 0:h[l])!=null?x:l),$(this,t,n)}get type(){return"double-underscore"}toString(){const r=p(this,t)?"__":"__";return r+this.innerText+r}print(){{const r=p(this,t)?"__":"__";return super.print({pre:r,post:r})}}},t=new WeakMap,e),Bs=W(Qi),ue=j(Bs,0,"DoubleUnderscoreToken",Vi,ue),R(Bs,1,ue)}}),ya={};M(ya,{parseHrAndDoubleUnderscore:()=>Ta});var Ta,so=f({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Zl(),to(),eo(),En(),Ta=({firstChild:{data:t},type:e,name:s},r,i)=>{var h,u,d;const{doubleUnderscore:[n,a,o]}=r,l=[...n,...a];return(h=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(n.filter(oe))),(u=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(a.filter(oe))),(d=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(String.raw`^((?:\0\d+[cno]\x7F)*)(-{4,})|__(${l.filter(oe).join("|")})__|_{2}(${l.filter(x=>!oe(x)).map(x=>x.slice(2,-2)).join("|")})_{2}`,"gimu")),e!=="root"&&(e!=="ext-inner"||s!=="poem")&&(t=`\0${t}`),t=t.replace(r.regexHrAndDoubleUnderscore,(x,c,g,v,y)=>{var I;if(g)return new Aa(g,r,i),`${c}\0${i.length-1}r`;const C=v!=null?v:y,b=r.sensitiveDoubleUnderscore.has(C),T=C.toLowerCase(),w=r.insensitiveDoubleUnderscore.has(T);return b||w?(new ue(C,b,!!y,r,i),`\0${i.length-1}${w&&((I=o==null?void 0:o[T])!=null?I:T)==="toc"?"u":"n"}`):x}),r.excludes.includes("heading")||(t=t.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(x,c,g,v,y)=>{const C=`${c}\0${i.length}h`;return new Nt(g.length,[v,y],r,i),C})),e==="root"||e==="ext-inner"&&s==="poem"?t:t.slice(1)}}}),ka,ro=f({"src/nowiki/quote.ts"(){"use strict";var t,e;$t(),ka=(e=class extends et{constructor(r,i,n,a){super(r,n,a);k(this,t);$(this,t,i)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){}text(){const{parentNode:r,innerText:i}=this;return r!=null&&r.is("image-parameter")&&r.name!=="caption"?"":i}lint(r=this.getAbsoluteIndex()){}json(r,i=this.getAbsoluteIndex()){}},t=new WeakMap,e)}}),Sa={};M(Sa,{parseQuotes:()=>wr});var wr,$a=f({"parser/quotes.ts"(){"use strict";ro(),wr=(t,e,s,r)=>{var c;const i=t.split(/('{2,})/u),{length:n}=i;if(n===1)return t;let a=0,o=0,l,h,u;for(let g=1;g<n;g+=2){const v=i[g].length;switch(v){case 2:o++;break;case 4:i[g-1]+="'",i[g]="'''";case 3:if(a++,l!==void 0)break;i[g-1].endsWith(" ")?h===void 0&&u===void 0&&(u=g):i[g-1].slice(-2,-1)===" "?l=g:h!=null||(h=g);break;default:i[g-1]+="'".repeat(v-5),i[g]="'''''",o++,a++}}if(o%2===1&&a%2===1){const g=(c=l!=null?l:h)!=null?c:u;g!==void 0&&(i[g]="''",i[g-1]+="'")}let d=!1,x=!1;for(let g=1;g<n;g+=2){const v=i[g].length,y=v!==2,C=v!==3,b=new ka(i[g],{bold:y&&!!d,italic:C&&!!x},e,s);y&&(d=!d&&b),C&&(x=!x&&b),i[g]=`\0${s.length-1}q`}return i.join("")}}}),Ca={};M(Ca,{parseExternalLinks:()=>_r});var _r,Ia=f({"parser/externalLinks.ts"(){"use strict";D(),Kn(),xr(),_r=(t,e,s,r)=>{var i;return(i=e.regexExternalLinks)!=null||(e.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${e.protocol}|//)${ce}|\0\d+m\x7F)${ge}(?=[[\]<>"\t${At}]|\0\d)))([${At}]*(?![${At}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),t.replace(e.regexExternalLinks,(n,a,o,l)=>{const{length:h}=s,u=/&[lg]t;/u.exec(a);return u&&(o="",l=a.slice(u.index)+o+l,a=a.slice(0,u.index)),r?(new me(a,"ext-link-url",e,s),`[\0${h}f${o}${l}]`):(new Et(a,o,l,e,s),`\0${h}w`)})}}}),Na,io=f({"src/link/category.ts"(){"use strict";fe(),Na=class extends ut{get type(){return"category"}get sortkey(){}json(t,e=this.getAbsoluteIndex()){}}}}),Fa={};M(Fa,{parseLinks:()=>er});var Xi,er,no=f({"parser/links.ts"(){"use strict";D(),rt(),$a(),Ia(),Xn(),Un(),io(),Xi=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,er=(t,e,s,r,i)=>{var l;(l=e.regexLinks)!=null||(e.regexLinks=new RegExp(String.raw`^\s*(?:${e.protocol}|//)`,"iu"));const n=e.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])*)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,a=t.split("[[");let o=a.shift();for(let h=0;h<a.length;h++){let u=!1,d,x,c,g;const v=a[h],y=n.exec(v);if(y)[,d,x,c,g]=y,g.startsWith("]")&&(c!=null&&c.includes("["))&&(c+="]",g=g.slice(1));else{const L=Xi.exec(v);L&&(u=!0,[,d,x,c]=L)}if(d===void 0||e.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){o+=`[[${v}`;continue}let C=H(d).trim();const b=C.startsWith(":");if(b&&u){o+=`[[${v}`;continue}else!C&&c&&!c.includes(`
|
|
23
|
-
`)&&(C=H(c).trim());const{ns:T,valid:w}=V.normalizeTitle(C,0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(w){if(u){if(T!==6){o+=`[[${v}`;continue}let L=!1;for(h++;h<a.length;h++){const P=a[h],m=P.split("]]");if(m.length>2){L=!0,c+=`[[${m[0]}]]${m[1]}`,g=m.slice(2).join("]]");break}else if(m.length===2)c+=`[[${m[0]}]]${m[1]}`;else{c+=`[[${P}`;break}}if(c=er(c,e,s,r,i),!L){o+=`[[${d}${x}${c}`;continue}}}else{o+=`[[${v}`;continue}c&&(c=wr(c,e,s,i));let I=gr;b||(T===6?(c&&(c=_r(c,e,s,!0)),I=cr):T===14&&(I=Na)),c===void 0&&x&&(c=""),o+=`\0${s.length}l${g}`,new I(d,c,e,s,x)}return o}}}),La={};M(La,{parseMagicLinks:()=>Ea});var Rs,js,Os,Ws,Ea,ao=f({"parser/magicLinks.ts"(){"use strict";D(),xr(),Rs=String.raw`[${At}\t]| |�*160;|�*a0;`,js=`(?:${Rs})+`,Os=`(?:${Rs}|-)`,Ws=String.raw`(?:RFC|PMID)${js}\d+\b|ISBN${js}(?:97[89]${Os}?)?(?:\d${Os}?){9}[\dx]\b`,Ea=(t,e,s)=>{if(!e.regexMagicLinks)try{e.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${e.protocol})(${ce}${ge})|${Ws})`,"giu")}catch{e.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${e.protocol})(${ce}${ge})|${Ws})`,"giu")}return t.replace(e.regexMagicLinks,(r,i,n)=>{let a=i?r.slice(i.length):r;if(n){let o="";const l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);l&&(o=a.slice(l.index),a=a.slice(0,l.index));const h=a.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=h.exec(a);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,u.index))&&(d=2),o=a.slice(u.index+d)+o,a=a.slice(0,u.index+d)}return o.length>=n.length?r:(new me(a,void 0,e,s),`${i}\0${s.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new me(a,"magic-link",e,s),`${i}\0${s.length-1}i`})}}}),Pa,lo=f({"util/html.ts"(){"use strict";Pa=(t,e)=>t.startsWith(e)?e.length:[...e].findIndex((s,r)=>s!==t[r])}}),Ba,oo=f({"src/nowiki/list.ts"(){"use strict";va(),Ba=class extends vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){}}}}),Ra={};M(Ra,{parseList:()=>ja});var ja,uo=f({"parser/list.ts"(){"use strict";lo(),oo(),ba(),ja=(t,e,s,r)=>{const i=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(t);if(!i)return e.lastPrefix="",t;const[n,a,o,l]=i,h=o.replace(/;/gu,":"),u=Pa(h,e.lastPrefix),d=((u>1?o.slice(u-1):o)+l).split(/(?=;)/u),x=d[0].startsWith(";");let c=d.length-(x?0:1);if(u>1){const _=o.slice(0,u-1);if(x){const S=_.split(/(?=;)/u);d.unshift(...S),c+=_.includes(";")?S.length:0}else d[0]=_+d[0]}e.lastPrefix=h;let g=a+d.map((_,S)=>`\0${r.length+S}d`).join("")+t.slice(n.length);for(const _ of d)new Ba(_,s,r);if(!c)return g;const{html:[v,,y]}=s,C=/:+|-\{|\0\d+[xq]\x7F/gu;let b=C,T=b.exec(g),w=0,I=!1,L=!1,P=0;const m=(_,S)=>(new br(_,s,r),`${g.slice(0,S)}\0${r.length-1}d${g.slice(S+_.length)}`),A=_=>{_?w&&w--:w++};for(;T&&c;){const{0:_,index:S}=T;if(_==="-{"){if(!P){const{lastIndex:F}=b;b=/-\{|\}-/gu,b.lastIndex=F}P++}else if(_==="}-"){if(P--,!P){const{lastIndex:F}=b;b=C,b.lastIndex=F}}else if(_.endsWith("x")){const{name:F,closing:q,selfClosing:z}=r[Number(_.slice(1,-2))];(v.includes(F)||!z&&!y.includes(F))&&A(q)}else if(_.endsWith("q")){const{bold:F,italic:q}=r[Number(_.slice(1,-2))];F&&(A(I),I=!I),q&&(A(L),L=!L)}else if(w===0){if(_.length>=c)return m(_.slice(0,c),S);c-=_.length,b.lastIndex=S+4+String(r.length).length,g=m(_,S)}T=b.exec(g)}return g}}}),Ji,Ki,qs,Yi,he,ho=f({"src/converterFlags.ts"(){"use strict";var t,e;qe(),Q(),E(),St(),Ji=new Set(["A","T","R","D","-","H","N"]),Ki=[ve(),G],he=(e=class extends(Yi=N){constructor(r,i,n=[]){super(void 0,i,n,{});k(this,t);this.safeAppend(r.map(a=>new st(a,"converter-flag",i,n)))}get type(){return"converter-flags"}afterBuild(){$(this,t,this.childNodes.map(r=>r.text().trim())),super.afterBuild()}toString(r){return super.toString(r,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(p(this,t).filter(r=>/\{{3}[^{}]+\}{3}/u.test(r)))}getVariantFlags(){const r=new Set(this.getAttribute("config").variants);return new Set(p(this,t).filter(i=>r.has(i)))}isInvalidFlag(r,i,n,a){return typeof r=="object"&&(r=r.text().trim(),i=this.getVariantFlags(),n=this.getUnknownFlags(),a=new Set(p(this,t).filter(o=>Ji.has(o)))),!!r&&!i.has(r)&&!n.has(r)&&(i.size>0||!a.has(r))}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print({sep:";"})}},t=new WeakMap,e),qs=W(Yi),he=j(qs,0,"ConverterFlagsToken",Ki,he),R(qs,1,he)}}),Ie,Zi,Ms,tn,_t,po=f({"src/converterRule.ts"(){"use strict";ht(),Q(),rt(),E(),St(),Ie=(t,e,s,r)=>{const i=new N(t,s,r);return i.type=`converter-rule-${e}`,i.setAttribute("stage",J),i},Zi=[G],_t=class extends(tn=N){get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,s=V.getConfig(),r=[]){super(void 0,s,r,{});const i=t.indexOf(":"),n=t.slice(0,i).indexOf("=>"),a=n===-1?t.slice(0,i):t.slice(n+2,i);e&&s.variants.includes(a.trim().toLowerCase())?(super.insertAt(new st(a,"converter-rule-variant",s,r)),super.insertAt(Ie(t.slice(i+1),"to",s,r)),n!==-1&&super.insertAt(Ie(t.slice(0,n),"from",s,r),0)):super.insertAt(Ie(t,"to",s,r))}toString(t){const{childNodes:e,firstChild:s,lastChild:r}=this;return e.length===3?`${s.toString(t)}=>${e[1].toString(t)}:${r.toString(t)}`:super.toString(t,":")}text(){const{childNodes:t,firstChild:e,lastChild:s}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${s.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){{const{childNodes:t}=this;if(t.length===3){const[e,s,r]=t;return`<span class="wpb-converter-rule">${e.print()}=>${s.print()}:${r.print()}</span>`}return super.print({sep:":"})}}json(t,e=this.getAbsoluteIndex()){}},Ms=W(tn),_t=j(Ms,0,"ConverterRuleToken",Zi,_t),R(Ms,1,_t)}}),en,Us,sn,de,co=f({"src/converter.ts"(){"use strict";D(),dt(),Q(),E(),ho(),po(),en=[G,at("-{")],de=class extends(sn=N){get type(){return"converter"}constructor(t,e,s,r=[]){super(void 0,s,r),this.insertAt(new he(t,s,r));const[i]=e,n=i.includes(":"),a=new _t(i,n,s,r);(n?a.length===1:e.length===2&&!H(e[1]).trim())?this.insertAt(new _t(e.join(";"),!1,s,r)):this.safeAppend([a,...e.slice(1).map(o=>new _t(o,!0,s,r))])}toString(t){const{childNodes:[e,...s]}=this;return`-{${e.toString(t)}${e.length>0?"|":""}${s.map(r=>r.toString(t)).join(";")}}-`}text(){const{childNodes:[t,...e]}=this;return`-{${t.text()}|${yt(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){{const{childNodes:[t,...e]}=this;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${Wt(e,{sep:";"})}}-</span>`}}},Us=W(sn),de=j(Us,0,"ConverterToken",en,de),R(Us,1,de)}}),Oa={};M(Oa,{parseConverter:()=>Wa});var Wa,go=f({"parser/converter.ts"(){"use strict";co(),Wa=(t,e,s)=>{var l;(l=e.regexConverter)!=null||(e.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${e.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const r=/-\{/gu,i=/-\{|\}-/gu,n=[];let a=r,o=a.exec(t);for(;o;){const{0:h,index:u}=o;if(h==="}-"){const d=n.pop(),{length:x}=s,c=t.slice(d.index+2,u),g=c.indexOf("|"),[v,y]=g===-1?[[],c]:[c.slice(0,g).split(";"),c.slice(g+1)],C=y.replace(/(&[#a-z\d]+);/giu,"$1"),b=C.split(e.regexConverter).map(T=>T.replace(/\x01/gu,";"));new de(v,b,e,s),t=`${t.slice(0,d.index)}\0${x}v${t.slice(u+2)}`,n.length===0&&(a=r),a.lastIndex=d.index+3+String(x).length}else n.push(o),a=i,a.lastIndex=u+2;o=a.exec(t)}return t}}}),Re={};M(Re,{Token:()=>N});var N,E=f({"src/index.ts"(){"use strict";var t,e,s,r,i,n,a,o,l,qa,Ma,Ua,za,Da,Ha,Ga,Va,Qa,Xa,Ja,Ka,I;D(),ht(),Oe(),ft(),rt(),vl(),bl(),N=(I=class extends Zt{constructor(m,A=V.getConfig(),_=[],S){super();k(this,l);k(this,t,"plain");k(this,e,0);k(this,s);k(this,r);k(this,i);k(this,n,!1);k(this,a);k(this,o);typeof m=="string"&&this.insertAt(m),$(this,s,A),$(this,r,_),_.push(this)}get type(){return p(this,t)}set type(m){$(this,t,m)}get pageName(){return p(this.getRootNode(),o)}set pageName(m){if(m){const A=this.normalizeTitle(m,0,{temporary:!0,page:""});$(this,o,A.valid?A.title:void 0)}else $(this,o,m===""?"":void 0)}parseOnce(m=p(this,e),A=!1,_){if(m<p(this,e)||this.length!==1||!this.isPlain())return this;if(p(this,e)>=J)return this;switch(m){case 0:if(this.type==="root"){p(this,r).pop();const S=B(this,l,qa).call(this);A&&(A=!S)}$(this,i,A),B(this,l,Ma).call(this,A);break;case 1:B(this,l,Ua).call(this);break;case 2:B(this,l,za).call(this);break;case 3:B(this,l,Da).call(this);break;case 4:B(this,l,Ha).call(this);break;case 5:B(this,l,Ga).call(this,_);break;case 6:B(this,l,Va).call(this,_);break;case 7:B(this,l,Qa).call(this);break;case 8:B(this,l,Xa).call(this);break;case 9:B(this,l,Ja).call(this);break;case 10:B(this,l,Ka).call(this)}if(this.type==="root")for(const S of p(this,r))S==null||S.parseOnce(m,A,_);return Sr(this,e)._++,this}buildFromStr(m,A){const _=m.split(/[\0\x7F]/u).map((S,F)=>{if(F%2===0)return S&&new Xs(S);const q=Number(S.slice(0,-1));return p(this,r)[q]}).filter(S=>S!=="");return A===0?_.map(String).join(""):A===1?yt(_):_}build(){$(this,e,J);const{length:m,firstChild:A}=this,_=A==null?void 0:A.toString();if(m===1&&A.type==="text"&&_.includes("\0")&&(yr(this,0,1,this.buildFromStr(_)),this.type==="root"))for(const S of p(this,r))S==null||S.build()}afterBuild(){if(this.type==="root")for(const m of p(this,r))m==null||m.afterBuild();$(this,n,!0)}parse(m=J,A,_){for(m=Math.min(m,J);p(this,e)<m;)this.parseOnce(p(this,e),A,_);return m&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===I}getAttribute(m){var A;switch(m){case"config":return p(this,s);case"include":return(A=p(this,i))!=null?A:!!p(this.getRootNode(),i);case"accum":return p(this,r);case"built":return p(this,n);case"stage":return p(this,e);case"invalid":return this.type==="table-inter"&&Fe(this)===2;default:return super.getAttribute(m)}}setAttribute(m,A){switch(m){case"stage":p(this,e)===0&&this.type==="root"&&p(this,r).shift(),$(this,e,A);break;default:super.setAttribute(m,A)}}insertAt(m,A=this.length){const _=typeof m=="string"?new Xs(m):m,{length:S}=this;A+=A<0?S:0,super.insertAt(_,A);const{type:F}=_;return F==="root"&&(_.type="plain"),_}normalizeTitle(m,A=0,_){return V.normalizeTitle(m,A,this.getAttribute("include"),p(this,s),{page:this.pageName,..._})}inTableAttrs(){var m;return this.isInside("table-attrs")&&((m=this.closest("table-attrs,arg,parameter"))!=null&&m.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(m=this.getAbsoluteIndex(),A){}toString(m,A){return m?super.toString(!0,A):jt(p(this,a),()=>super.toString(!1,A),_=>{const S=this.getRootNode();S.type==="root"&&p(S,n)&&$(this,a,_)})}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakMap,l=new WeakSet,qa=function(){const{parseRedirect:m}=(Al(),O(_n)),A=this.firstChild.toString(),_=m(A,p(this,s),p(this,r));return _!==!1&&this.setText(_),!!_},Ma=function(m){const{parseCommentAndExt:A}=(He(),O(pa));this.setText(A(this.firstChild.toString(),p(this,s),p(this,r),m))},Ua=function(){const{parseBraces:m}=(pr(),O(Rn)),A=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,_=m(A,p(this,s),p(this,r));this.setText(this.type==="root"?_:_.slice(1))},za=function(){if(p(this,s).excludes.includes("html"))return;const{parseHtml:m}=(Ql(),O(ca));this.setText(m(this.firstChild.toString(),p(this,s),p(this,r)))},Da=function(){if(p(this,s).excludes.includes("table"))return;const{parseTable:m}=(Yl(),O(wa));this.setText(m(this,p(this,s),p(this,r)))},Ha=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:m}=(so(),O(ya));this.setText(m(this,p(this,s),p(this,r)))},Ga=function(m){const{parseLinks:A}=(no(),O(Fa));this.setText(A(this.firstChild.toString(),p(this,s),p(this,r),this.pageName,m))},Va=function(m){const{parseQuotes:A}=($a(),O(Sa)),_=this.firstChild.toString().split(`
|
|
23
|
+
`)&&(C=H(c).trim());const{ns:T,valid:w}=V.normalizeTitle(C,0,!1,e,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(w){if(u){if(T!==6){o+=`[[${v}`;continue}let L=!1;for(h++;h<a.length;h++){const P=a[h],m=P.split("]]");if(m.length>2){L=!0,c+=`[[${m[0]}]]${m[1]}`,g=m.slice(2).join("]]");break}else if(m.length===2)c+=`[[${m[0]}]]${m[1]}`;else{c+=`[[${P}`;break}}if(c=er(c,e,s,r,i),!L){o+=`[[${d}${x}${c}`;continue}}}else{o+=`[[${v}`;continue}c&&(c=wr(c,e,s,i));let I=gr;b||(T===6?(c&&(c=_r(c,e,s,!0)),I=cr):T===14&&(I=Na)),c===void 0&&x&&(c=""),o+=`\0${s.length}l${g}`,new I(d,c,e,s,x)}return o}}}),La={};M(La,{parseMagicLinks:()=>Ea});var Rs,js,Os,Ws,Ea,ao=f({"parser/magicLinks.ts"(){"use strict";D(),xr(),Rs=String.raw`[${At}\t]| |�*160;|�*a0;`,js=`(?:${Rs})+`,Os=`(?:${Rs}|-)`,Ws=String.raw`(?:RFC|PMID)${js}\d+\b|ISBN${js}(?:97[89]${Os}?)?(?:\d${Os}?){9}[\dx]\b`,Ea=(t,e,s)=>{if(!e.regexMagicLinks)try{e.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${e.protocol})(${ce}${ge})|${Ws})`,"giu")}catch{e.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${e.protocol})(${ce}${ge})|${Ws})`,"giu")}return t.replace(e.regexMagicLinks,(r,i,n)=>{let a=i?r.slice(i.length):r;if(n){let o="";const l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);l&&(o=a.slice(l.index),a=a.slice(0,l.index));const h=a.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=h.exec(a);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,u.index))&&(d=2),o=a.slice(u.index+d)+o,a=a.slice(0,u.index+d)}return o.length>=n.length?r:(new me(a,void 0,e,s),`${i}\0${s.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(a))return r;return new me(a,"magic-link",e,s),`${i}\0${s.length-1}i`})}}}),Pa,lo=f({"util/html.ts"(){"use strict";Pa=(t,e)=>t.startsWith(e)?e.length:[...e].findIndex((s,r)=>s!==t[r])}}),Ba,oo=f({"src/nowiki/list.ts"(){"use strict";va(),Ba=class extends vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){}}}}),Ra={};M(Ra,{parseList:()=>ja});var ja,uo=f({"parser/list.ts"(){"use strict";lo(),oo(),ba(),ja=(t,e,s,r)=>{const i=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(t);if(!i)return e.lastPrefix="",t;const[n,a,o,l]=i,h=o.replace(/;/gu,":"),u=Pa(h,e.lastPrefix),d=((u>1?o.slice(u-1):o)+l).split(/(?=;)/u),x=d[0].startsWith(";");let c=d.length-(x?0:1);if(u>1){const _=o.slice(0,u-1);if(x){const S=_.split(/(?=;)/u);d.unshift(...S),c+=_.includes(";")?S.length:0}else d[0]=_+d[0]}e.lastPrefix=h;let g=a+d.map((_,S)=>`\0${r.length+S}d`).join("")+t.slice(n.length);for(const _ of d)new Ba(_,s,r);if(!c)return g;const{html:[v,,y]}=s,C=/:+|-\{|\0\d+[xq]\x7F/gu;let b=C,T=b.exec(g),w=0,I=!1,L=!1,P=0;const m=(_,S)=>(new br(_,s,r),`${g.slice(0,S)}\0${r.length-1}d${g.slice(S+_.length)}`),A=_=>{_?w&&w--:w++};for(;T&&c;){const{0:_,index:S}=T;if(_==="-{"){if(!P){const{lastIndex:F}=b;b=/-\{|\}-/gu,b.lastIndex=F}P++}else if(_==="}-"){if(P--,!P){const{lastIndex:F}=b;b=C,b.lastIndex=F}}else if(_.endsWith("x")){const{name:F,closing:q,selfClosing:z}=r[Number(_.slice(1,-2))];(v.includes(F)||!z&&!y.includes(F))&&A(q)}else if(_.endsWith("q")){const{bold:F,italic:q}=r[Number(_.slice(1,-2))];F&&(A(I),I=!I),q&&(A(L),L=!L)}else if(w===0){if(_.length>=c)return m(_.slice(0,c),S);c-=_.length,b.lastIndex=S+4+String(r.length).length,g=m(_,S)}T=b.exec(g)}return g}}}),Ji,Ki,qs,Yi,he,ho=f({"src/converterFlags.ts"(){"use strict";var t,e;qe(),Q(),E(),St(),Ji=new Set(["A","T","R","D","-","H","N"]),Ki=[ve(),G],he=(e=class extends(Yi=N){constructor(r,i,n=[]){super(void 0,i,n,{});k(this,t);this.safeAppend(r.map(a=>new st(a,"converter-flag",i,n)))}get type(){return"converter-flags"}afterBuild(){$(this,t,this.childNodes.map(r=>r.text().trim())),super.afterBuild()}toString(r){return super.toString(r,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(p(this,t).filter(r=>/\{{3}[^{}]+\}{3}/u.test(r)))}getVariantFlags(){const r=new Set(this.getAttribute("config").variants);return new Set(p(this,t).filter(i=>r.has(i)))}isInvalidFlag(r,i,n,a){return typeof r=="object"&&(r=r.text().trim(),i=this.getVariantFlags(),n=this.getUnknownFlags(),a=new Set(p(this,t).filter(o=>Ji.has(o)))),!!r&&!i.has(r)&&!n.has(r)&&(i.size>0||!a.has(r))}lint(r=this.getAbsoluteIndex(),i){}print(){return super.print({sep:";"})}},t=new WeakMap,e),qs=W(Yi),he=j(qs,0,"ConverterFlagsToken",Ki,he),R(qs,1,he)}}),Ie,Zi,Ms,tn,_t,po=f({"src/converterRule.ts"(){"use strict";ht(),Q(),rt(),E(),St(),Ie=(t,e,s,r)=>{const i=new N(t,s,r);return i.type=`converter-rule-${e}`,i.setAttribute("stage",J),i},Zi=[G],_t=class extends(tn=N){get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,s=V.getConfig(),r=[]){super(void 0,s,r,{});const i=t.indexOf(":"),n=t.slice(0,i).indexOf("=>"),a=n===-1?t.slice(0,i):t.slice(n+2,i);e&&s.variants.includes(a.trim().toLowerCase())?(super.insertAt(new st(a,"converter-rule-variant",s,r)),super.insertAt(Ie(t.slice(i+1),"to",s,r)),n!==-1&&super.insertAt(Ie(t.slice(0,n),"from",s,r),0)):super.insertAt(Ie(t,"to",s,r))}toString(t){const{childNodes:e,firstChild:s,lastChild:r}=this;return e.length===3?`${s.toString(t)}=>${e[1].toString(t)}:${r.toString(t)}`:super.toString(t,":")}text(){const{childNodes:t,firstChild:e,lastChild:s}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${s.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){{const{childNodes:t}=this;if(t.length===3){const[e,s,r]=t;return`<span class="wpb-converter-rule">${e.print()}=>${s.print()}:${r.print()}</span>`}return super.print({sep:":"})}}json(t,e=this.getAbsoluteIndex()){}},Ms=W(tn),_t=j(Ms,0,"ConverterRuleToken",Zi,_t),R(Ms,1,_t)}}),en,Us,sn,de,co=f({"src/converter.ts"(){"use strict";D(),dt(),Q(),E(),ho(),po(),en=[G,at("-{")],de=class extends(sn=N){get type(){return"converter"}constructor(t,e,s,r=[]){super(void 0,s,r),this.insertAt(new he(t,s,r));const[i]=e,n=i.includes(":"),a=new _t(i,n,s,r);(n?a.length===1:e.length===2&&!H(e[1]).trim())?this.insertAt(new _t(e.join(";"),!1,s,r)):this.safeAppend([a,...e.slice(1).map(o=>new _t(o,!0,s,r))])}toString(t){const{childNodes:[e,...s]}=this;return`-{${e.toString(t)}${e.length>0?"|":""}${s.map(r=>r.toString(t)).join(";")}}-`}text(){const{childNodes:[t,...e]}=this;return`-{${t.text()}|${yt(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){{const{childNodes:[t,...e]}=this;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${Wt(e,{sep:";"})}}-</span>`}}},Us=W(sn),de=j(Us,0,"ConverterToken",en,de),R(Us,1,de)}}),Oa={};M(Oa,{parseConverter:()=>Wa});var Wa,go=f({"parser/converter.ts"(){"use strict";co(),Wa=(t,e,s)=>{var l;(l=e.regexConverter)!=null||(e.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${e.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const r=/-\{/gu,i=/-\{|\}-/gu,n=[];let a=r,o=a.exec(t);for(;o;){const{0:h,index:u}=o;if(h==="}-"){const d=n.pop(),{length:x}=s,c=t.slice(d.index+2,u),g=c.indexOf("|"),[v,y]=g===-1?[[],c]:[c.slice(0,g).split(";"),c.slice(g+1)],C=y.replace(/(&[#a-z\d]+);/giu,"$1"),b=C.split(e.regexConverter).map(T=>T.replace(/\x01/gu,";"));new de(v,b,e,s),t=`${t.slice(0,d.index)}\0${x}v${t.slice(u+2)}`,n.length===0&&(a=r),a.lastIndex=d.index+3+String(x).length}else n.push(o),a=i,a.lastIndex=u+2;o=a.exec(t)}return t}}}),Re={};M(Re,{Token:()=>N});var N,E=f({"src/index.ts"(){"use strict";var t,e,s,r,i,n,a,o,l,qa,Ma,Ua,za,Da,Ha,Ga,Va,Qa,Xa,Ja,Ka,I;D(),ht(),Oe(),ft(),rt(),vl(),bl(),N=(I=class extends Zt{constructor(m,A=V.getConfig(),_=[],S){super();k(this,l);k(this,t,"plain");k(this,e,0);k(this,s);k(this,r);k(this,i);k(this,n,!1);k(this,a);k(this,o);typeof m=="string"&&this.insertAt(m),$(this,s,A),$(this,r,_),_.push(this)}get type(){return p(this,t)}set type(m){$(this,t,m)}get pageName(){return p(this.getRootNode(),o)}set pageName(m){if(m){const A=this.normalizeTitle(m,0,{temporary:!0,page:""});$(this,o,A.valid?A.title:void 0)}else $(this,o,m===""?"":void 0)}parseOnce(m=p(this,e),A=!1,_){if(m<p(this,e)||this.length!==1||!this.isPlain())return this;if(p(this,e)>=J)return this;switch(m){case 0:if(this.type==="root"){p(this,r).pop();const S=B(this,l,qa).call(this);A&&(A=!S)}$(this,i,A),B(this,l,Ma).call(this,A);break;case 1:B(this,l,Ua).call(this);break;case 2:B(this,l,za).call(this);break;case 3:B(this,l,Da).call(this);break;case 4:B(this,l,Ha).call(this);break;case 5:B(this,l,Ga).call(this,_);break;case 6:B(this,l,Va).call(this,_);break;case 7:B(this,l,Qa).call(this);break;case 8:B(this,l,Xa).call(this);break;case 9:B(this,l,Ja).call(this);break;case 10:B(this,l,Ka).call(this)}if(this.type==="root")for(const S of p(this,r))S==null||S.parseOnce(m,A,_);return Sr(this,e)._++,this}buildFromStr(m,A){const _=m.split(/[\0\x7F]/u).map((S,F)=>{if(F%2===0)return S&&new Xs(S);const q=Number(S.slice(0,-1));return p(this,r)[q]}).filter(S=>S!=="");return A===0?_.map(String).join(""):A===1?yt(_):_}build(){$(this,e,J);const{length:m,firstChild:A}=this,_=A==null?void 0:A.toString();if(m===1&&A.type==="text"&&_.includes("\0")&&(yr(this,0,1,this.buildFromStr(_)),this.type==="root"))for(const S of p(this,r))S==null||S.build()}afterBuild(){if(this.type==="root")for(const m of p(this,r))m==null||m.afterBuild();$(this,n,!0)}parse(m=J,A,_){for(m=Math.min(m,J);p(this,e)<m;)this.parseOnce(p(this,e),A,_);return m&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===I}getAttribute(m){var A;switch(m){case"config":return p(this,s);case"include":return(A=p(this,i))!=null?A:!!p(this.getRootNode(),i);case"accum":return p(this,r);case"built":return p(this,n);case"stage":return p(this,e);case"invalid":return this.type==="table-inter"&&Fe(this)===2;default:return super.getAttribute(m)}}setAttribute(m,A){switch(m){case"stage":p(this,e)===0&&this.type==="root"&&p(this,r).shift(),$(this,e,A);break;default:super.setAttribute(m,A)}}insertAt(m,A=this.length){const _=typeof m=="string"?new Xs(m):m,{length:S}=this;A+=A<0?S:0,super.insertAt(_,A);const{type:F}=_;return F==="root"&&(_.type="plain"),_}normalizeTitle(m,A=0,_){return V.normalizeTitle(m,A,this.getAttribute("include"),p(this,s),{page:this.pageName,..._})}inTableAttrs(){var m;return this.isInside("table-attrs")&&((m=this.closest("table-attrs,arg,parameter"))!=null&&m.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(m=this.getAbsoluteIndex(),A){}toString(m,A){return m?super.toString(!0,A):jt(p(this,a),()=>super.toString(!1,A),_=>{const S=this.getRootNode();S.type==="root"&&p(S,n)&&$(this,a,_)})}},t=new WeakMap,e=new WeakMap,s=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakMap,l=new WeakSet,qa=function(){const{parseRedirect:m}=(Al(),O(_n)),A=this.firstChild.toString(),_=m(A,p(this,s),p(this,r));return _!==!1&&this.setText(_),!!_},Ma=function(m){const{parseCommentAndExt:A}=(He(),O(pa));this.setText(A(this.firstChild.toString(),p(this,s),p(this,r),m))},Ua=function(){const{parseBraces:m}=(pr(),O(Rn)),A=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,_=m(A,p(this,s),p(this,r));this.setText(this.type==="root"?_:_.slice(1))},za=function(){if(p(this,s).excludes.includes("html"))return;const{parseHtml:m}=(Ql(),O(ca));this.setText(m(this.firstChild.toString(),p(this,s),p(this,r)))},Da=function(){if(p(this,s).excludes.includes("table"))return;const{parseTable:m}=(Yl(),O(wa));this.setText(m(this,p(this,s),p(this,r)))},Ha=function(){if(p(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:m}=(so(),O(ya));this.setText(m(this,p(this,s),p(this,r)))},Ga=function(m){const{parseLinks:A}=(no(),O(Fa));this.setText(A(this.firstChild.toString(),p(this,s),p(this,r),this.pageName,m))},Va=function(m){const{parseQuotes:A}=($a(),O(Sa)),_=this.firstChild.toString().split(`
|
|
24
24
|
`);for(let S=0;S<_.length;S++)_[S]=A(_[S],p(this,s),p(this,r),m);this.setText(_.join(`
|
|
25
25
|
`))},Qa=function(){const{parseExternalLinks:m}=(Ia(),O(Ca));this.setText(m(this.firstChild.toString(),p(this,s),p(this,r)))},Xa=function(){const{parseMagicLinks:m}=(ao(),O(La));this.setText(m(this.firstChild.toString(),p(this,s),p(this,r)))},Ja=function(){if(p(this,s).excludes.includes("list"))return;const{parseList:m}=(uo(),O(Ra)),{firstChild:A,type:_,name:S}=this,F=A.toString().split(`
|
|
26
26
|
`),q={lastPrefix:""};let z=_==="root"||_==="ext-inner"&&S==="poem"?0:1;for(;z<F.length;z++)F[z]=m(F[z],q,p(this,s),p(this,r));this.setText(F.join(`
|
package/config/default.json
CHANGED
package/dist/bin/config.js
CHANGED
|
@@ -77,7 +77,7 @@ const mw = {
|
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
|
-
const pkg = "wikiparser-node", version = "1.
|
|
80
|
+
const pkg = "wikiparser-node", version = "1.35.0";
|
|
81
81
|
let mwConfig;
|
|
82
82
|
/**
|
|
83
83
|
* Get the parser configuration for a Wikimedia Foundation project.
|
|
@@ -122,7 +122,7 @@ exports.default = async (site, url, user, force, internal) => {
|
|
|
122
122
|
siprop: 'general|magicwords|functionhooks|namespaces|namespacealiases',
|
|
123
123
|
format: 'json',
|
|
124
124
|
formatversion: '2',
|
|
125
|
-
}, { query: { general: { articlepath, variants }, magicwords, namespaces, namespacealiases, functionhooks, }, } = await (await fetch(`${url}/api.php?${new URLSearchParams(params).toString()}`, headers)).json();
|
|
125
|
+
}, { query: { general: { articlepath, variants, langconversion }, magicwords, namespaces, namespacealiases, functionhooks, }, } = await (await fetch(`${url}/api.php?${new URLSearchParams(params).toString()}`, headers)).json();
|
|
126
126
|
try {
|
|
127
127
|
eval(m); // eslint-disable-line no-eval
|
|
128
128
|
}
|
|
@@ -140,7 +140,7 @@ exports.default = async (site, url, user, force, internal) => {
|
|
|
140
140
|
]), config = {
|
|
141
141
|
...(0, cm_util_1.getParserConfig)(require(path_1.default.join(dir, 'minimum')), mwConfig),
|
|
142
142
|
...(0, cm_util_1.getKeywords)(magicwords),
|
|
143
|
-
variants: (0, cm_util_1.getVariants)(variants),
|
|
143
|
+
variants: langconversion ? (0, cm_util_1.getVariants)(variants) : [],
|
|
144
144
|
namespaces: Object.fromEntries(ns),
|
|
145
145
|
nsid: Object.fromEntries([
|
|
146
146
|
...ns.map(([id, canonical]) => [canonical.toLowerCase(), Number(id)]),
|
|
@@ -30,7 +30,7 @@ const parseMagicLinks = (wikitext, config, accum) => {
|
|
|
30
30
|
let url = lead ? m.slice(lead.length) : m;
|
|
31
31
|
if (p1) {
|
|
32
32
|
let trail = '';
|
|
33
|
-
const m2 = /&(?:
|
|
33
|
+
const m2 = /&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(url);
|
|
34
34
|
if (m2) {
|
|
35
35
|
trail = url.slice(m2.index);
|
|
36
36
|
url = url.slice(0, m2.index);
|
package/dist/render/html.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toHtml = void 0;
|
|
4
4
|
const constants_1 = require("../util/constants");
|
|
5
|
-
const blockElems = 'table|
|
|
5
|
+
const blockElems = 'table|h[1-6]|pre|p|[uod]l', antiBlockElems = 't[dh]';
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
7
|
-
/<(?:table|\/
|
|
8
|
-
const openRegex = new RegExp(String.raw `<(?:${blockElems}
|
|
7
|
+
/<(?:table|\/t[dh]|\/?(?:tr|caption|d[td]|li))\b/iu;
|
|
8
|
+
const openRegex = new RegExp(String.raw `<(?:${blockElems}|\/${antiBlockElems}|\/?(?:tr|caption|d[td]|li))\b`, 'iu');
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
10
|
-
/<(?:\/(?:
|
|
10
|
+
/<(?:\/(?:pre|p)|t[dh]|\/?(?:center|blockquote|div|hr|figure))\b/iu;
|
|
11
11
|
const closeRegex = new RegExp(String.raw `<(?:\/(?:${blockElems})|${antiBlockElems}|\/?(?:center|blockquote|div|hr|figure))\b`, 'iu');
|
|
12
12
|
/**
|
|
13
13
|
* 将展开后的节点转换为HTML
|
package/dist/src/attribute.js
CHANGED
|
@@ -55,7 +55,7 @@ const fixed_1 = require("../mixin/fixed");
|
|
|
55
55
|
const cached_1 = require("../mixin/cached");
|
|
56
56
|
exports.stages = { 'ext-attr': 0, 'html-attr': 2, 'table-attr': 3 };
|
|
57
57
|
const ariaAttrs = new Set(['aria-describedby', 'aria-flowto', 'aria-labelledby', 'aria-owns']);
|
|
58
|
-
const insecureStyle = /expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u, evil = /(?:^|\s|\*\/)(?:
|
|
58
|
+
const insecureStyle = /expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u, evil = /(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu, complexTypes = new Set(['ext', 'arg', 'magic-word', 'template']), urlAttrs = new Set([
|
|
59
59
|
'about',
|
|
60
60
|
'property',
|
|
61
61
|
'resource',
|
package/dist/src/nowiki/index.js
CHANGED
|
@@ -65,7 +65,7 @@ class NowikiToken extends base_1.NowikiBaseToken {
|
|
|
65
65
|
if (name === 'templatedata' && (sSyntax
|
|
66
66
|
|| sDuplicate)) {
|
|
67
67
|
// browser版本使用`lintJSONNative()`
|
|
68
|
-
return (0, common_1.lintJSON)(innerText).map(({ message,
|
|
68
|
+
return (0, common_1.lintJSON)(innerText).map(({ message, from, to = from, line, endLine = line, column, endColumn = column,
|
|
69
69
|
/* NOT FOR BROWSER ONLY */
|
|
70
70
|
severity, }) => {
|
|
71
71
|
s =
|
|
@@ -77,17 +77,17 @@ class NowikiToken extends base_1.NowikiBaseToken {
|
|
|
77
77
|
if (!s) {
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
|
-
const rect = new rect_1.BoundingRect(this, start)
|
|
80
|
+
const rect = new rect_1.BoundingRect(this, start);
|
|
81
81
|
return {
|
|
82
82
|
rule,
|
|
83
83
|
message,
|
|
84
84
|
severity: s,
|
|
85
|
-
startIndex,
|
|
86
|
-
endIndex:
|
|
87
|
-
startLine,
|
|
88
|
-
endLine:
|
|
89
|
-
startCol,
|
|
90
|
-
endCol:
|
|
85
|
+
startIndex: start + from,
|
|
86
|
+
endIndex: start + to,
|
|
87
|
+
startLine: rect.top + line - 1,
|
|
88
|
+
endLine: rect.top + endLine - 1,
|
|
89
|
+
startCol: (line > 1 ? 0 : rect.left) + column - 1,
|
|
90
|
+
endCol: (endLine > 1 ? 0 : rect.left) + endColumn - 1,
|
|
91
91
|
};
|
|
92
92
|
}).filter((e) => e !== false);
|
|
93
93
|
}
|
|
@@ -88,7 +88,7 @@ let NoincludeToken = (() => {
|
|
|
88
88
|
LINT: {
|
|
89
89
|
const { lintConfig } = index_1.default, rule = 'no-ignored', s = lintConfig.getSeverity(rule, 'include');
|
|
90
90
|
if (s) {
|
|
91
|
-
const { innerText } = this, mt = /^<(
|
|
91
|
+
const { innerText } = this, mt = /^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(innerText);
|
|
92
92
|
if (mt) {
|
|
93
93
|
const e = (0, lint_1.generateForSelf)(this, { start }, rule, 'useless-attribute', s), { computeEditInfo } = lintConfig, before = mt[1].length + 1, after = innerText.endsWith('/>') ? 2 : 1;
|
|
94
94
|
e.startIndex += before;
|
package/extensions/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var _a;
|
|
3
|
-
const version = '1.
|
|
3
|
+
const version = '1.35.0', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
|
|
4
4
|
? src.replace(file, '')
|
|
5
5
|
: `https://testingcf.jsdelivr.net/npm/wikiparser-node@${version}`;
|
|
6
6
|
const workerJS = () => {
|
|
@@ -221,6 +221,9 @@ const workerJS = () => {
|
|
|
221
221
|
break;
|
|
222
222
|
case 'findStyleTokens':
|
|
223
223
|
postMessage([command, qid, getLSP(qid).findStyleTokens().map(token => token.json())]);
|
|
224
|
+
break;
|
|
225
|
+
case 'findTemplateTokens':
|
|
226
|
+
postMessage([command, qid, getLSP(qid).findTemplateTokens().map(token => token.json())]);
|
|
224
227
|
}
|
|
225
228
|
};
|
|
226
229
|
};
|
package/extensions/dist/lsp.js
CHANGED
|
@@ -77,6 +77,9 @@ class LanguageService {
|
|
|
77
77
|
findStyleTokens() {
|
|
78
78
|
return wikiparse.provide('findStyleTokens', __classPrivateFieldGet(this, _LanguageService_id, "f"));
|
|
79
79
|
}
|
|
80
|
+
findTemplateTokens() {
|
|
81
|
+
return wikiparse.provide('findTemplateTokens', __classPrivateFieldGet(this, _LanguageService_id, "f"));
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
84
|
_LanguageService_id = new WeakMap(), _LanguageService_include = new WeakMap(), _LanguageService_hasData = new WeakMap(), _LanguageService_instances = new WeakSet(), _LanguageService_loadData = async function _LanguageService_loadData() {
|
|
82
85
|
if (!__classPrivateFieldGet(this, _LanguageService_hasData, "f")) {
|
package/extensions/typings.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export interface LanguageServiceBase extends Omit<
|
|
|
44
44
|
provideColorPresentations(color: ColorInformation): Promise<ColorPresentation[]>;
|
|
45
45
|
resolveCodeAction(rule?: string): Promise<CodeAction>;
|
|
46
46
|
findStyleTokens(): Promise<AST[]>;
|
|
47
|
+
findTemplateTokens(): Promise<AST[]>;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
/* eslint-disable @typescript-eslint/method-signature-style */
|
package/logo.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiparser-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@bhsd/cm-util": "^0.1.0",
|
|
85
|
-
"@bhsd/common": "^1.
|
|
86
|
-
"@bhsd/stylelint-util": "^0.1
|
|
85
|
+
"@bhsd/common": "^1.3.0",
|
|
86
|
+
"@bhsd/stylelint-util": "^1.0.1",
|
|
87
87
|
"binary-search": "^1.3.6",
|
|
88
88
|
"vscode-languageserver-types": "^3.17.5"
|
|
89
89
|
},
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"mathoid-texvcjs": "^0.6.0",
|
|
94
94
|
"prism-wiki": "^1.2.0",
|
|
95
95
|
"prismjs": "^1.30.0",
|
|
96
|
-
"stylelint": "^
|
|
96
|
+
"stylelint": "^17.0.0",
|
|
97
97
|
"vscode-css-languageservice": "^6.3.8",
|
|
98
98
|
"vscode-html-languageservice": "^5.6.0",
|
|
99
99
|
"vscode-json-languageservice": "^5.6.3"
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@bhsd/code-standard": "^1.3.2",
|
|
103
103
|
"@bhsd/nodejs": "^0.1.0",
|
|
104
|
-
"@bhsd/test-util": "^0.
|
|
104
|
+
"@bhsd/test-util": "^0.3.0",
|
|
105
105
|
"@codemirror/lint": "^6.9.2",
|
|
106
106
|
"@eslint/markdown": "7.5.1",
|
|
107
107
|
"@stylistic/eslint-plugin": "^5.5.0",
|
|
@@ -133,6 +133,6 @@
|
|
|
133
133
|
"vscode-languageserver-textdocument": "^1.0.12"
|
|
134
134
|
},
|
|
135
135
|
"engines": {
|
|
136
|
-
"node": ">=
|
|
136
|
+
"node": ">=20.19.5"
|
|
137
137
|
}
|
|
138
138
|
}
|