wikiparser-node 1.18.3 → 1.19.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/README.md +1 -1
- package/bundle/bundle-es7.min.js +29 -28
- package/bundle/bundle-lsp.min.js +27 -26
- package/bundle/bundle.min.js +30 -29
- package/dist/addon/token.js +27 -19
- package/dist/addon/transclude.js +2 -2
- package/dist/base.d.mts +3 -2
- package/dist/base.d.ts +3 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +8 -1
- package/dist/lib/document.d.ts +4 -0
- package/dist/lib/document.js +22 -2
- package/dist/lib/lsp.js +42 -11
- package/dist/lib/text.js +4 -2
- package/dist/parser/braces.js +57 -29
- package/dist/parser/commentAndExt.js +1 -1
- package/dist/src/arg.js +1 -1
- package/dist/src/attribute.js +1 -1
- package/dist/src/imageParameter.js +7 -5
- package/dist/src/index.js +7 -7
- package/dist/src/link/base.js +2 -2
- package/dist/src/paramTag/inputbox.js +9 -4
- package/dist/src/redirect.js +1 -1
- package/dist/src/table/index.d.ts +1 -0
- package/dist/src/table/index.js +1 -1
- package/dist/src/table/trBase.js +31 -16
- package/dist/src/tagPair/ext.js +4 -2
- package/dist/src/transclude.js +14 -6
- package/dist/util/diff.js +1 -1
- package/dist/util/html.js +0 -3
- package/extensions/dist/base.js +1 -1
- package/extensions/es7/base.js +1 -1
- package/extensions/typings.d.ts +2 -2
- package/package.json +7 -6
package/bundle/bundle-lsp.min.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
"use strict";(()=>{var fa=Object.create;var It=Object.defineProperty;var Ui=Object.getOwnPropertyDescriptor;var ba=Object.getOwnPropertyNames;var xa=Object.prototype.hasOwnProperty;var Hi=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),$t=a=>{throw TypeError(a)};var Di=(a,n,e)=>n in a?It(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var Oi=(a,n)=>It(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var zi=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),le=(a,n)=>{for(var e in n)It(a,e,{get:n[e],enumerable:!0})},Ta=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of ba(n))!xa.call(a,r)&&r!==e&&It(a,r,{get:()=>n[r],enumerable:!(t=Ui(n,r))||t.enumerable});return a};var ee=a=>Ta(It({},"__esModule",{value:!0}),a);var de=a=>{var n;return[,,,fa((n=a==null?void 0:a[Hi("metadata")])!=null?n:null)]},Wi=["class","method","getter","setter","accessor","field","value","get","set"],xr=a=>a!==void 0&&typeof a!="function"?$t("Function expected"):a,ya=(a,n,e,t,r)=>({kind:Wi[a],name:n,metadata:t,addInitializer:i=>e._?$t("Already initialized"):r.push(xr(i||null))}),ka=(a,n)=>Di(n,Hi("metadata"),a[3]),ge=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},ue=(a,n,e,t,r,i)=>{var s,o,l,d,p,g=n&7,u=!!(n&8),h=!!(n&16),f=g>3?a.length+1:g?u?1:2:0,m=Wi[g+5],b=g>3&&(a[f-1]=[]),x=a[f]||(a[f]=[]),S=g&&(!h&&!u&&(r=r.prototype),g<5&&(g>3||!h)&&Ui(g<4?r:{get[e](){return c(this,i)},set[e](C){return T(this,i,C)}},e));g?h&&g<4&&Oi(i,(g>2?"set ":g>1?"get ":"")+e):Oi(r,e);for(var N=t.length-1;N>=0;N--)d=ya(g,e,l={},a[3],x),g&&(d.static=u,d.private=h,p=d.access={has:h?C=>va(r,C):C=>e in C},g^3&&(p.get=h?C=>(g^1?c:v)(C,r,g^4?i:S.get):C=>C[e]),g>2&&(p.set=h?(C,I)=>T(C,r,I,g^4?i:S.set):(C,I)=>C[e]=I)),o=(0,t[N])(g?g<4?h?i:S[m]:g>4?void 0:{get:S.get,set:S.set}:r,d),l._=1,g^4||o===void 0?xr(o)&&(g>4?b.unshift(o):g?h?i=o:S[m]=o:r=o):typeof o!="object"||o===null?$t("Object expected"):(xr(s=o.get)&&(S.get=s),xr(s=o.set)&&(S.set=s),xr(s=o.init)&&b.unshift(s));return g||ka(a,r),S&&It(r,e,S),h?g^4?i:S:r},re=(a,n,e)=>Di(a,typeof n!="symbol"?n+"":n,e),Hn=(a,n,e)=>n.has(a)||$t("Cannot "+e),va=(a,n)=>Object(n)!==n?$t('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(Hn(a,n,"read from private field"),e?e.call(a):n.get(a)),y=(a,n,e)=>n.has(a)?$t("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),T=(a,n,e,t)=>(Hn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),v=(a,n,e)=>(Hn(a,n,"access private method"),e);var Jr=(a,n,e,t)=>({set _(r){T(a,n,r,e)},get _(){return c(a,n,t)}});var Gi,Vi,Xi=k(()=>{"use strict";Gi=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(a,null),a})(),Vi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});var Qe,Tr,wa,Qi,Re,Yi,at=k(()=>{"use strict";Qe=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),Tr=a=>Math.round(a*255).toString(16).padStart(2,"0"),wa=(()=>{let a=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\d_])`,n=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,t=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(n).join(String.raw`\s+`)}(?:\s*\/\s*${n})?`}|${String.raw`${new Array(3).fill(n).join(String.raw`\s*,\s*`)}(?:\s*,\s*${n})?`})\s*\)`,r=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${n}\s+${n}(?:\s*\/\s*${n})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${n})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\d_])(${a}|${t}|${r})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\d_])(${a}|${t})`,"giu")}})(),Qi=(a,n=!0)=>{let e=[],t=wa[n?"full":"rgb"];t.lastIndex=0;let r=t.exec(a),i=0;for(;r;){let s=r.index+r[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([r[2],s,i,a[s-1]!=="&"||!/^#\d+$/u.test(r[2])]),r=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e},Re=a=>n=>{let e=new Map;if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t},Yi=a=>n=>{let e=new WeakMap;if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}});var Ne,Ki,_e,Be,lt,Nt,pe,Ul,we,Aa,Sa,dt,Ji,Hl,Ca,Ia,Lt,qe,ne=k(()=>{"use strict";at();Ne=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ki=String.raw`[^[\]<>"\0-\x1F\x7F${Ne}\uFFFD]`,_e=String.raw`(?:\[[\da-f:.]+\]|${Ki})`,Be=String.raw`(?:${Ki}|\0\d+[cn!~]\x7F)*`,lt=(a,n)=>e=>e.replace(a,n),Nt=lt(/[\0\x7F]|\r$/gmu,""),pe=lt(/\0\d+[cn]\x7F/gu,""),Ul=lt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),we=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Aa={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Sa=lt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Aa[e.toLowerCase()]),dt=a=>Sa(a),Ji=lt(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),Hl=lt(/\n/gu,String.raw`\n`),Ca={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ia=a=>lt(a,n=>`&${Ca[n]};`),Lt=Ia(/[&<>]/gu),qe=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Zi=zi((Wl,$a)=>{$a.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","#cscore":"cscore","#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","#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"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#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:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Dn,es=k(()=>{"use strict";Dn=Zi()});var yr,Et,kr,vr,zn,j,ie=k(()=>{"use strict";j=class{constructor(n,e){y(this,vr);y(this,yr);y(this,Et);y(this,kr);T(this,yr,n),T(this,Et,e)}get start(){return c(this,Et)}get top(){return v(this,vr,zn).call(this).top}get left(){return v(this,vr,zn).call(this).left}};yr=new WeakMap,Et=new WeakMap,kr=new WeakMap,vr=new WeakSet,zn=function(){var n;return(n=c(this,kr))!=null||T(this,kr,c(this,yr).getRootNode().posFromIndex(c(this,Et))),c(this,kr)}});var Rt,ts,L,F,Le,Zr,z=k(()=>{"use strict";ye();ie();W();Rt=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),ts=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof j?e:new j(n,s),{offsetHeight:d,offsetWidth:p}=n,{startIndex:g,startLine:u,startCol:h}=a(n,s,o,l),{line:f,character:m}=Rt(u,h,d,p);return{rule:t,message:w.msg(r),severity:i,startIndex:g,endIndex:g+n.toString().length,startLine:u,endLine:f,startCol:h,endCol:m}},L=ts((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),F=ts((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Le=(a,n,e)=>{if(a)return a[1];let t=n();return e([se.rev,t]),t},Zr=(()=>{let a=(n,e)=>n==="ol"&&e==="type"?["1","a","A","i","I"]:n==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(n,e){return a(n,e).map(t=>({name:t}))}}})()});var Na,en,rs=k(()=>{"use strict";Na=(a,n,e)=>{let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)},en=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>Na(i.trim(),t,r))});var wr,Pt,Ft,Ar,Sr,Mt,jt,_t,tn,Bt,Wn=k(()=>{"use strict";z();ye();Bt=class{constructor(){y(this,_t);re(this,"childNodes",[]);y(this,wr);y(this,Pt);y(this,Ft);y(this,Ar);y(this,Sr);y(this,Mt);y(this,jt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,wr)}get nextSibling(){return c(this,Pt)}get previousSibling(){return c(this,Ft)}get offsetHeight(){return v(this,_t,tn).call(this).height}get offsetWidth(){return v(this,_t,tn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":T(this,wr,e),e||(T(this,Pt,void 0),T(this,Ft,void 0));break;case"nextSibling":T(this,Pt,e);break;case"previousSibling":T(this,Ft,e);break;case"aIndex":T(this,Mt,[se.rev,e]);break;default:this[n]=e}}getRootNode(){return Le(c(this,Sr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&T(this,Sr,n)})}indexFromPos(n,e){{if(n<0||e<0)return;let t=this.getLines();if(n>=t.length)return;let[,r,i]=t[n],s=r+e;return s>i?void 0:s}}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Le(c(this,jt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,jt)[i]=[se.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,jt)[n]=e})}getAbsoluteIndex(){return Le(c(this,Mt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{T(this,Mt,n)})}getBoundingClientRect(){return{...v(this,_t,tn).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}is(n){return this.type===n}getLines(){return Le(c(this,Ar),()=>{let n=[],e=0;for(let t of String(this).split(`
|
|
2
|
-
`)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{T(this,Ar,n)})}};wr=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,Ar=new WeakMap,Sr=new WeakMap,Mt=new WeakMap,jt=new WeakMap,_t=new WeakSet,tn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var Ye,Gn,Vn,rn,ns=k(()=>{"use strict";ne();ye();rs();Wn();rn=class extends Bt{constructor(){super(...arguments);y(this,Ye)}get length(){return this.childNodes.length}text(e){return we(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Cr(this,e,1)[0]}insertAt(e,t=this.length){return Cr(this,t,0,[e]),e}closest(e){let t=en(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=en(e,this);return v(this,Ye,Gn).call(this,t)}querySelectorAll(e){let t=en(e,this);return v(this,Ye,Vn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){{if(e===void 0)return;let{length:t}=this.toString();if(e>t||e<-t)return;e+=e<0?t:0;let r=this,i=0,s=0;for(;r.type!=="text";){let{childNodes:o}=r;i+=r.getAttribute("padding");for(let l=0;i<=e&&l<o.length;l++){let d=o[l],{nextSibling:p}=d,g=d.toString(),u=g.length;if(d.setAttribute("aIndex",i),i+=u,i>e||i===e&&u>0&&(!p||p.type==="text"||d.type!=="text"&&(g.trim()||!p.toString().trim()))){r=d,i-=u,s=i;break}i+=r.getGaps(l)}if(r.childNodes===o)return{offsetNode:r,offset:e-s}}return{offsetNode:r,offset:e-s}}}elementFromIndex(e){var t;{let r=(t=this.caretPositionFromIndex(e))==null?void 0:t.offsetNode;return(r==null?void 0:r.type)==="text"?r.parentNode:r}}elementFromPoint(e,t){return this.elementFromIndex(this.indexFromPos(t,e))}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s),r.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+qe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Ye=new WeakSet,Gn=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=v(t=r,Ye,Gn).call(t,e);if(i)return i}},Vn=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...v(r=i,Ye,Vn).call(r,e)));return t}});var Xn,is,La,Ea,Ra,Pa,Fa,Ma,Qn,nn,ss,Ir,os=k(()=>{"use strict";ne();z();W();Wn();Xn=String.raw`[${Ne}\t]*`,is=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Xn}\d)|isbn(?=[-::]?${Xn}(?:\d(?:${Xn}|-)){6})`,La=new RegExp(String.raw`${is}|https?[:/]/+`,"giu"),Ea=new RegExp(is,"giu"),Ra=new Set(["attr-value","ext-link-text","link-text"]),Pa={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Fa={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Ma=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"];try{Qn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){Qn=/\w/u}Ir=class extends Bt{constructor(e){super();y(this,nn);re(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?pe(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var U,M,_;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:O,name:oe,tag:R}=p;if(O!=="ext-attr")g=!0;else if(R==="choose"&&(oe==="before"||oe==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Ea:La),r.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,f=s==null?void 0:s.name,m=o==null?void 0:o.type,b=this.getRootNode(),x=b.toString(),{ext:S,html:N}=b.getAttribute("config"),{top:C,left:I}=b.posFromIndex(e),E=new Set(["onlyinclude","noinclude","includeonly",...S,...N[0],...N[1],...N[2],...Ma]);for(let O=t.exec(r);O;O=t.exec(r)){let[,oe,R]=O,{index:D}=O,H=O[0].toLowerCase();if(R&&R!=="]"){let{length:Te}=R;D+=Te,H=H.slice(Te)}let{0:$,length:G}=H,Z=$==="r"||$==="p"||$==="i";if($==="<"&&!E.has(oe.toLowerCase())||$==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(D+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((U=s.innerText)!=null&&U.includes("]")))||Z&&(!i.getAttribute("plain")||Ra.has(l)))continue;$==="]"&&(D||G>1)&&t.lastIndex--;let K=e+D,me=K+G,P=x[me],xe=x[K-1],Xe=G>1&&!($==="<"&&!/[\s/>]/u.test(P!=null?P:"")||g&&($==="["||$==="]")||Z&&l==="parameter-value")||$==="{"&&(P===$||xe==="-")||$==="}"&&(xe===$||P==="-")||$==="["&&(P===$||l==="ext-link-text"||h==="free-ext-link"&&!r.slice(D+1).trim())||$==="]"&&(xe===$||m==="free-ext-link"&&!r.slice(0,D).includes("]"))?"error":"warning",On=$==="{"||$==="[";if(Xe==="warning"&&(On||($==="]"||$==="}"))){let Te=Pa[$],Un=On?r.slice(D+1):r.slice(0,D);if($==="{"&&((M=Te.exec(Un))==null?void 0:M[0])==="}"||$==="}"&&((_=Te.exec(Un))==null?void 0:_[0])==="{")continue;if(!Un.includes($)){let qi=On?"nextSibling":"previousSibling",ot=this[qi];for(;ot&&(ot.type!=="text"||!Te.test(ot.data));)ot=ot[qi];if(ot&&Te.exec(ot.data)[0]!==$)continue}}Z&&(H=H.toUpperCase());let ji=this.posFromIndex(D),{line:_i,character:Bi}=Rt(C,I,ji.top+1,ji.left),Ct={rule:Fa[$],message:w.msg('lonely "$1"',Z||$==="h"?H:$),severity:Xe,startIndex:K,endIndex:me,startLine:_i,endLine:_i,startCol:Bi,endCol:Bi+G};if($==="<")Ct.suggestions=[{desc:"escape",range:[K,K+1],text:"<"}];else if($==="h"&&l!=="link-text"&&Qn.test(xe||""))Ct.suggestions=[{desc:"whitespace",range:[K,K],text:" "}];else if($==="["&&l==="ext-link-text"){let Te=i.getAbsoluteIndex()+i.toString().length;Ct.suggestions=[{desc:"escape",range:[Te,Te+1],text:"]"}]}else if($==="]"&&m==="free-ext-link"&&Xe==="error"){let Te=e-o.toString().length;Ct.fix={range:[Te,Te],text:"[",desc:"left bracket"}}else Z&&(Ct.suggestions=[...O[0]===H?[]:[{desc:"uppercase",range:[K,me],text:H}],...P===":"||P==="\uFF1A"?[{desc:"whitespace",range:[me,me+1],text:" "}]:[]]);u.push(Ct)}return u}replaceData(e){v(this,nn,ss).call(this,e)}print(){return Lt(this.data)}};nn=new WeakSet,ss=function(e){this.setAttribute("data",e)}});var Ae,gt=k(()=>{"use strict";ye();Ae=(a=!0,n=!0)=>(e,t)=>{class r extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return sn(r,e),r}});var $r,Se,qt=k(()=>{"use strict";q();Se=class extends A{constructor(e,t,r,i,s){super(e,r,i,s);y(this,$r);T(this,$r,t)}get type(){return c(this,$r)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};$r=new WeakMap});var Ot,Q,Oe=k(()=>{"use strict";q();Q=class extends A{constructor(e,t,r,i,s){super(e,r,i,s);y(this,Ot);T(this,Ot,t)}get type(){return c(this,Ot)}set type(e){T(this,Ot,e)}};Ot=new WeakMap});var ja,ut,Ee,Pe,Fe,Nr=k(()=>{"use strict";z();ne();ie();W();q();Oe();ja=a=>a==="redirect-target"||a==="link",Fe=class extends A{constructor(e,t,r=w.getConfig(),i=[],s="|"){super(void 0,r,i,{});y(this,ut,!0);y(this,Ee);y(this,Pe);if(this.insertAt(new Q(e,"link-target",r,i,{})),t!==void 0){let o=new A(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Ee,s)}get link(){return c(this,Pe)}get fragment(){return c(this,Pe).fragment}afterBuild(){T(this,Pe,this.getTitle()),c(this,Ee).includes("\0")&&T(this,Ee,this.buildFromStr(c(this,Ee),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,ut,t):e==="title"?T(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ee));return c(this,ut)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,ut)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ee).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,Pe),p=new j(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&r.push(L(i,p,"unknown-page","template in an internal link target","warning")),l){let g=L(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:Qe(i.text())}],r.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),u=s==null?void 0:s.childNodes[g];if(u){let h=L(s,p,"pipe-like",'additional "|" in the link text',"warning"),f=h.startIndex+s.getRelativeIndex(g);h.suggestions=[{desc:"escape",range:[f,f+u.data.length],text:u.data.replace(/\|/gu,"|")}],r.push(h)}}if(d!==void 0&&!ja(o)){let g=L(i,p,"no-ignored","useless fragment"),u=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),h=i.childNodes[u];h&&(g.fix={range:[g.startIndex+i.getRelativeIndex(u)+h.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),r.push(g)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,ut)?{pre:"[[",post:"]]",sep:c(this,Ee)}:{sep:c(this,Ee)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};ut=new WeakMap,Ee=new WeakMap,Pe=new WeakMap});var ce,Ke=k(()=>{"use strict";q();ce=class extends A{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var as,Yn,_a,J,Je=k(()=>{"use strict";gt();Ke();as=[Ae()];J=class extends(_a=ce){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};Yn=de(_a),J=ue(Yn,0,"NoincludeToken",as,J),ge(Yn,1,J)});var on,ls=k(()=>{"use strict";z();Nr();Je();on=class extends Fe{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new J(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=L(this.lastChild,{start:n},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var ds,Ze,Ut,Kn,Ba,pt,gs=k(()=>{"use strict";gt();q();qt();ls();ds=[Ae(!1,!1)];pt=class extends(Ba=A){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);y(this,Ze);y(this,Ut);T(this,Ze,e),T(this,Ut,s),this.append(new Se(t,"redirect-syntax",o,l),new on(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Ze).length:super.getAttribute(e)}toString(e){return c(this,Ze)+super.toString(e)+c(this,Ut)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,Ze).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,Ze),post:c(this,Ut)})}};Kn=de(Ba),Ze=new WeakMap,Ut=new WeakMap,pt=ue(Kn,0,"RedirectToken",ds,pt),ge(Kn,1,pt)});var us={};le(us,{parseRedirect:()=>qa});var qa,ps=k(()=>{"use strict";W();gs();qa=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&w.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new pt(...t.slice(1),n,e),a):!1}});var an,cs=k(()=>{"use strict";q();an=class extends A{get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}getAttribute(n){return n==="padding"?13:n==="plain"||super.getAttribute(n)}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}}});var et,Ht,Jn=k(()=>{"use strict";q();Ht=class extends A{constructor(e,t,r,i,s,o=[]){super(void 0,s);y(this,et);re(this,"closed");re(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,et,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,et);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,et);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,et)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,et);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};et=new WeakMap});var hs,Zn,Oa,ct,ms=k(()=>{"use strict";z();ie();gt();W();Jn();hs=[Ae(!1)];ct=class extends(Oa=Ht){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new j(this,n);if(t.data.trim()){let o=L(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=F(this,s,"unclosed-comment",w.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};Zn=de(Oa),ct=ue(Zn,0,"IncludeToken",hs,ct),ge(Zn,1,ct)});var Dt,ln=k(()=>{"use strict";ye();Dt=(a=0)=>(n,e)=>{var r,fs;class t extends n{constructor(){super(...arguments);y(this,r)}getAttr(l){return v(this,r,fs).call(this).getAttr(l)}}return r=new WeakSet,fs=function(){return this.childNodes[a]},sn(t,n),t}});var te,bs,xs,gn,ei,Ts,zt,ys,ks,vs,dn,un,pn,cn,ws,ti=k(()=>{"use strict";te=new Set(["align"]),bs=new Set(["cite"]),xs=new Set(["cite","datetime"]),gn=new Set(["width"]),ei=new Set(["axis","align","bgcolor","height","width","valign"]),Ts=new Set([...ei,"abbr","headers","scope","rowspan","colspan"]),zt=new Set(["type"]),ys=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ks=new Set(["clear"]),vs=new Set(["bgcolor","align","valign"]),dn=new Set,un=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"]),pn={div:te,h1:te,h2:te,h3:te,h4:te,h5:te,h6:te,blockquote:bs,q:bs,p:te,br:ks,pre:gn,ins:xs,del:xs,ul:zt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ys,"border"]),caption:te,tr:vs,td:Ts,th:Ts,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:gn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:zt,poem:te,categorytree:te,combooption:te},cn={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:dn,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:dn,inputbox:dn,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:dn,poll:new Set(["id","show-results-before-voting"]),sm2:zt,flashmp3:zt,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"])},ws={table:ys,td:new Set([...ei,"scope"]),th:ei,br:ks,caption:te,div:te,hr:gn,h1:te,h2:te,h3:te,h4:te,h5:te,h6:te,li:zt,p:te,pre:gn,tr:vs,ul:zt}});var Ua,Ha,Lr,Wt,ae,Me,Gt,As=k(()=>{"use strict";z();ne();ti();ie();W();q();Oe();Ua=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Ha=new Set(["ext","arg","magic-word","template"]),Gt=class extends A{constructor(e,t,r,i="",s,o=[],l=w.getConfig(),d=[]){let p=new Q(r,"attr-key",l,d),g;if(r==="title"||t==="img"&&r==="alt")g=new A(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};g=new A(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new Q(s,"attr-value",l,d,{});super(void 0,l,d);y(this,Lr);y(this,Wt);y(this,ae);y(this,Me);T(this,Lr,e),this.append(p,g),T(this,ae,i),T(this,Me,[...o]),T(this,Wt,t),this.setAttribute("name",pe(r).trim().toLowerCase())}get type(){return c(this,Lr)}get tag(){return c(this,Wt)}get balanced(){return!c(this,ae)||c(this,Me)[0]===c(this,Me)[1]}afterBuild(){c(this,ae).includes("\0")&&T(this,ae,this.buildFromStr(c(this,ae),0)),this.parentNode&&T(this,Wt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Me);return c(this,ae)?super.toString(e,c(this,ae)+t)+r:this.firstChild.toString(e)}text(){return c(this,ae)?`${super.text(`${c(this,ae).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,ae)?c(this,ae).length+((t=(e=c(this,Me)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var b;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:d,tag:p}=this,g=this.getValue(),u=new j(this,e);if(!i){let x=L(o,u,"unclosed-quote",w.msg("unclosed $1","quotes"),"warning");x.startIndex--,x.startCol--,x.suggestions=[{range:[x.endIndex,x.endIndex],text:c(this,Me)[0],desc:"close"}],r.push(x)}let h=cn[p],f=pn[p],{length:m}=this.toString();if(!(h!=null&&h.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?h||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(p==="meta"||p==="link"||!un.has(d)))){let x=L(s,u,"illegal-attr","illegal attribute name");x.suggestions=[{desc:"remove",range:[e,e+m],text:""}],r.push(x)}else if(d==="style"&&typeof g=="string"&&Ua.test(g))r.push(L(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let x=L(o,u,"illegal-attr","nonzero tabindex");x.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[x.startIndex,x.endIndex],text:"0"}],r.push(x)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:x})=>Ha.has(x))){let x=Zr.provideValues(p,d),S=String(g).toLowerCase();x.length>0&&x.every(({name:N})=>N!==S)&&r.push(L(o,u,"illegal-attr","illegal attribute value","warning"))}return(b=ws[p])!=null&&b.has(d)&&r.push(L(s,u,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,ae)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Me);return c(this,ae)?super.print({sep:Lt(c(this,ae))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Lr=new WeakMap,Wt=new WeakMap,ae=new WeakMap,Me=new WeakMap});var Ss,Da,ri,Er,tt,hn=k(()=>{"use strict";z();ne();ie();W();q();Oe();As();Ss=a=>a.slice(0,-1),Da=a=>`${Ss(a)}-dirty`;try{ri=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){ri=/[^\W_]/u}tt=class extends A{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});y(this,Er);if(T(this,Er,t),this.setAttribute("name",r),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new Q(l,Da(t),i,s,{})),l="")};for(;d;){let{index:u,0:h,1:f,2:m,3:b,4:x,5:S,6:N}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(pe(f).trim())){let C=x!=null?x:N,I=[b,S],E=new Gt(Ss(t),r,f,m,C,I,i,s);g(),super.insertAt(E)}else l+=h;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,Er)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Gt&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,d=new j(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let p=F(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],r.push(p)}for(let p of s)if(p instanceof Gt){let{name:g}=p;o.has(g)?(l.add(g),o.get(g).push(p)):o.set(g,[p])}else{let g=p.text().trim();if(g){let u=L(p,d,"no-ignored","containing invalid attribute",ri.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],r.push(u)}}if(l.size>0)for(let p of l){let g=o.get(p).map(u=>{let h=u.getValue();return[u,h===!0?"":h]});r.push(...g.map(([u,h],f)=>{let m=L(u,d,"no-duplicate",w.msg("duplicated $1 attribute",p)),b={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||g.slice(0,f).some(([,x])=>x===h)?m.fix=b:m.suggestions=[b],m}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof Q?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Er=new WeakMap});var mn,Cs=k(()=>{"use strict";W();q();Je();mn=class extends A{get type(){return"ext-inner"}constructor(n,e=w.getConfig(),t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),d=0,p="";for(;o&&l;)new J(o[0],e,t),new J(l[0],e,t),p+=`${n.slice(d,o.index)}\0${t.length-1}n\x7F${n.slice(o.index+s,l.index)}\0${t.length}n\x7F`,d=l.index+s+1,r.lastIndex=d,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=p+n.slice(d)}super(n,e,t,{}),this.setAttribute("stage",10)}getAttribute(n){return n==="plain"||super.getAttribute(n)}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var Vt,ni=k(()=>{"use strict";z();ie();Rr();W();q();Oe();Vt=class extends A{get type(){return"ext-inner"}constructor(n,e,t=w.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=Q;this.append(...e.split(`
|
|
3
|
-
`).map(o=>i?o:
|
|
1
|
+
"use strict";(()=>{var Ta=Object.create;var It=Object.defineProperty;var Hi=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var ka=Object.prototype.hasOwnProperty;var zi=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),$t=a=>{throw TypeError(a)};var Wi=(a,n,e)=>n in a?It(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var Di=(a,n)=>It(a,"name",{value:n,configurable:!0});var v=(a,n)=>()=>(a&&(n=a(a=0)),n);var Gi=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),de=(a,n)=>{for(var e in n)It(a,e,{get:n[e],enumerable:!0})},va=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of ya(n))!ka.call(a,r)&&r!==e&&It(a,r,{get:()=>n[r],enumerable:!(t=Hi(n,r))||t.enumerable});return a};var Z=a=>va(It({},"__esModule",{value:!0}),a);var ge=a=>{var n;return[,,,Ta((n=a==null?void 0:a[zi("metadata")])!=null?n:null)]},Vi=["class","method","getter","setter","accessor","field","value","get","set"],xr=a=>a!==void 0&&typeof a!="function"?$t("Function expected"):a,wa=(a,n,e,t,r)=>({kind:Vi[a],name:n,metadata:t,addInitializer:i=>e._?$t("Already initialized"):r.push(xr(i||null))}),Aa=(a,n)=>Wi(n,zi("metadata"),a[3]),ue=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},pe=(a,n,e,t,r,i)=>{var s,o,l,d,p,g=n&7,u=!!(n&8),h=!!(n&16),f=g>3?a.length+1:g?u?1:2:0,m=Vi[g+5],b=g>3&&(a[f-1]=[]),x=a[f]||(a[f]=[]),C=g&&(!h&&!u&&(r=r.prototype),g<5&&(g>3||!h)&&Hi(g<4?r:{get[e](){return c(this,i)},set[e](k){return T(this,i,k)}},e));g?h&&g<4&&Di(i,(g>2?"set ":g>1?"get ":"")+e):Di(r,e);for(var N=t.length-1;N>=0;N--)d=wa(g,e,l={},a[3],x),g&&(d.static=u,d.private=h,p=d.access={has:h?k=>Sa(r,k):k=>e in k},g^3&&(p.get=h?k=>(g^1?c:w)(k,r,g^4?i:C.get):k=>k[e]),g>2&&(p.set=h?(k,I)=>T(k,r,I,g^4?i:C.set):(k,I)=>k[e]=I)),o=(0,t[N])(g?g<4?h?i:C[m]:g>4?void 0:{get:C.get,set:C.set}:r,d),l._=1,g^4||o===void 0?xr(o)&&(g>4?b.unshift(o):g?h?i=o:C[m]=o:r=o):typeof o!="object"||o===null?$t("Object expected"):(xr(s=o.get)&&(C.get=s),xr(s=o.set)&&(C.set=s),xr(s=o.init)&&b.unshift(s));return g||Aa(a,r),C&&It(r,e,C),h?g^4?i:C:r},te=(a,n,e)=>Wi(a,typeof n!="symbol"?n+"":n,e),Dn=(a,n,e)=>n.has(a)||$t("Cannot "+e),Sa=(a,n)=>Object(n)!==n?$t('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(Dn(a,n,"read from private field"),e?e.call(a):n.get(a)),y=(a,n,e)=>n.has(a)?$t("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),T=(a,n,e,t)=>(Dn(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),w=(a,n,e)=>(Dn(a,n,"access private method"),e);var Jr=(a,n,e,t)=>({set _(r){T(a,n,r,e)},get _(){return c(a,n,t)}});var Qi,Xi,Yi=v(()=>{"use strict";Qi=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(a,null),a})(),Xi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});function ve(a){return n=>{let e=new(typeof n=="string"?Map:WeakMap);if(e.has(n)){let r=e.get(n);return r.lastIndex=0,r}let t=a(n);return e.set(n,t),t}}var Qe,Tr,Ca,Ki,ot=v(()=>{"use strict";Qe=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),Tr=a=>Math.round(a*255).toString(16).padStart(2,"0"),Ca=(()=>{let a=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\d_])`,n=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,t=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(n).join(String.raw`\s+`)}(?:\s*\/\s*${n})?`}|${String.raw`${new Array(3).fill(n).join(String.raw`\s*,\s*`)}(?:\s*,\s*${n})?`})\s*\)`,r=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${n}\s+${n}(?:\s*\/\s*${n})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${n})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\d_])(${a}|${t}|${r})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\d_])(${a}|${t})`,"giu")}})(),Ki=(a,n=!0)=>{let e=[],t=Ca[n?"full":"rgb"];t.lastIndex=0;let r=t.exec(a),i=0;for(;r;){let s=r.index+r[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([r[2],s,i,a[s-1]!=="&"||!/^#\d+$/u.test(r[2])]),r=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e}});var Le,Ji,_e,Be,at,Nt,ae,zl,we,Ia,$a,lt,Zi,Wl,Na,La,Lt,qe,re=v(()=>{"use strict";ot();Le=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ji=String.raw`[^[\]<>"\0-\x1F\x7F${Le}\uFFFD]`,_e=String.raw`(?:\[[\da-f:.]+\]|${Ji})`,Be=String.raw`(?:${Ji}|\0\d+[cn!~]\x7F)*`,at=(a,n)=>e=>e.replace(a,n),Nt=at(/[\0\x7F]|\r$/gmu,""),ae=at(/\0\d+[cn]\x7F/gu,""),zl=at(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),we=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Ia={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},$a=at(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Ia[e.toLowerCase()]),lt=a=>$a(a),Zi=at(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),Wl=at(/\n/gu,String.raw`\n`),Na={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},La=a=>at(a,n=>`&${Na[n]};`),Lt=La(/[&<>]/gu),qe=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var es=Gi((Ql,Ea)=>{Ea.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","#cscore":"cscore","#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","#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"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#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:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Hn,ts=v(()=>{"use strict";Hn=es()});var yr,Et,kr,vr,zn,j,ne=v(()=>{"use strict";j=class{constructor(n,e){y(this,vr);y(this,yr);y(this,Et);y(this,kr);T(this,yr,n),T(this,Et,e)}get start(){return c(this,Et)}get top(){return w(this,vr,zn).call(this).top}get left(){return w(this,vr,zn).call(this).left}};yr=new WeakMap,Et=new WeakMap,kr=new WeakMap,vr=new WeakSet,zn=function(){var n;return(n=c(this,kr))!=null||T(this,kr,c(this,yr).getRootNode().posFromIndex(c(this,Et))),c(this,kr)}});var Rt,rs,L,F,Ee,Zr,D=v(()=>{"use strict";Te();ne();H();Rt=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),rs=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof j?e:new j(n,s),{offsetHeight:d,offsetWidth:p}=n,{startIndex:g,startLine:u,startCol:h}=a(n,s,o,l),{line:f,character:m}=Rt(u,h,d,p);return{rule:t,message:A.msg(r),severity:i,startIndex:g,endIndex:g+n.toString().length,startLine:u,endLine:f,startCol:h,endCol:m}},L=rs((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),F=rs((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Ee=(a,n,e)=>{if(a)return a[1];let t=n();return e([oe.rev,t]),t},Zr=(()=>{let a=(n,e)=>n==="ol"&&e==="type"?["1","a","A","i","I"]:n==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(n,e){return a(n,e).map(t=>({name:t}))}}})()});var Ra,en,ns=v(()=>{"use strict";Ra=(a,n,e)=>{let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)},en=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>Ra(i.trim(),t,r))});var wr,Pt,Ft,Ar,Sr,Mt,jt,_t,tn,Bt,Wn=v(()=>{"use strict";D();Te();Bt=class{constructor(){y(this,_t);te(this,"childNodes",[]);y(this,wr);y(this,Pt);y(this,Ft);y(this,Ar);y(this,Sr);y(this,Mt);y(this,jt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,wr)}get nextSibling(){return c(this,Pt)}get previousSibling(){return c(this,Ft)}get offsetHeight(){return w(this,_t,tn).call(this).height}get offsetWidth(){return w(this,_t,tn).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":T(this,wr,e),e||(T(this,Pt,void 0),T(this,Ft,void 0));break;case"nextSibling":T(this,Pt,e);break;case"previousSibling":T(this,Ft,e);break;case"aIndex":T(this,Mt,[oe.rev,e]);break;default:this[n]=e}}getRootNode(){return Ee(c(this,Sr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&T(this,Sr,n)})}indexFromPos(n,e){{if(n<0||e<0)return;let t=this.getLines();if(n>=t.length)return;let[,r,i]=t[n],s=r+e;return s>i?void 0:s}}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Ee(c(this,jt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,jt)[i]=[oe.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,jt)[n]=e})}getAbsoluteIndex(){return Ee(c(this,Mt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{T(this,Mt,n)})}getBoundingClientRect(){return{...w(this,_t,tn).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}is(n){return this.type===n}getLines(){return Ee(c(this,Ar),()=>{let n=[],e=0;for(let t of String(this).split(`
|
|
2
|
+
`)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{T(this,Ar,n)})}};wr=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,Ar=new WeakMap,Sr=new WeakMap,Mt=new WeakMap,jt=new WeakMap,_t=new WeakSet,tn=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var Xe,Gn,Vn,rn,is=v(()=>{"use strict";re();Te();ns();Wn();rn=class extends Bt{constructor(){super(...arguments);y(this,Xe)}get length(){return this.childNodes.length}text(e){return we(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Cr(this,e,1)[0]}insertAt(e,t=this.length){return Cr(this,t,0,[e]),e}closest(e){let t=en(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=en(e,this);return w(this,Xe,Gn).call(this,t)}querySelectorAll(e){let t=en(e,this);return w(this,Xe,Vn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){{if(e===void 0)return;let{length:t}=this.toString();if(e>t||e<-t)return;e+=e<0?t:0;let r=this,i=0,s=0;for(;r.type!=="text";){let{childNodes:o}=r;i+=r.getAttribute("padding");for(let l=0;i<=e&&l<o.length;l++){let d=o[l],{nextSibling:p}=d,g=d.toString(),u=g.length;if(d.setAttribute("aIndex",i),i+=u,i>e||i===e&&u>0&&(!p||p.type==="text"||d.type!=="text"&&(g.trim()||!p.toString().trim()))){r=d,i-=u,s=i;break}i+=r.getGaps(l)}if(r.childNodes===o)return{offsetNode:r,offset:e-s}}return{offsetNode:r,offset:e-s}}}elementFromIndex(e){var t;{let r=(t=this.caretPositionFromIndex(e))==null?void 0:t.offsetNode;return(r==null?void 0:r.type)==="text"?r.parentNode:r}}elementFromPoint(e,t){return this.elementFromIndex(this.indexFromPos(t,e))}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s),r.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+qe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Xe=new WeakSet,Gn=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=w(t=r,Xe,Gn).call(t,e);if(i)return i}},Vn=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...w(r=i,Xe,Vn).call(r,e)));return t}});var Qn,ss,Pa,Fa,Ma,ja,_a,Ba,Xn,nn,os,Ir,as=v(()=>{"use strict";re();D();H();Wn();Qn=String.raw`[${Le}\t]*`,ss=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Qn}\d)|isbn(?=[-::]?${Qn}(?:\d(?:${Qn}|-)){6})`,Pa=new RegExp(String.raw`${ss}|https?[:/]/+`,"giu"),Fa=new RegExp(ss,"giu"),Ma=new Set(["attr-value","ext-link-text","link-text"]),ja={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},_a={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Ba=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"];try{Xn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){Xn=/\w/u}Ir=class extends Bt{constructor(e){super();y(this,nn);te(this,"data","");Object.defineProperties(this,{data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?ae(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var z,E,U;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:W,name:ie,tag:R}=p;if(W!=="ext-attr")g=!0;else if(R==="choose"&&(ie==="before"||ie==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Fa:Pa),r.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,f=s==null?void 0:s.name,m=o==null?void 0:o.type,b=this.getRootNode(),x=b.toString(),{ext:C,html:N}=b.getAttribute("config"),{top:k,left:I}=b.posFromIndex(e),P=new Set(["onlyinclude","noinclude","includeonly",...C,...N[0],...N[1],...N[2],...Ba]);for(let W=t.exec(r);W;W=t.exec(r)){let[,ie,R]=W,{index:_,0:q}=W;if(R&&R!=="]"){let{length:xe}=R;_+=xe,q=q.slice(xe)}q=q.toLowerCase();let{0:$,length:G}=q,me=$==="r"||$==="p"||$==="i";if($==="<"&&!P.has(ie.toLowerCase())||$==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(_+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((z=s.innerText)!=null&&z.includes("]")))||me&&(!i.getAttribute("plain")||Ma.has(l)))continue;$==="]"&&(_||G>1)&&t.lastIndex--;let Y=e+_,se=Y+G,M=x[se],Ne=x[Y-1],St=G>1&&!($==="<"&&!/[\s/>]/u.test(M!=null?M:"")||g&&($==="["||$==="]")||me&&l==="parameter-value")||$==="{"&&(M===$||Ne==="-")||$==="}"&&(Ne===$||M==="-")||$==="["&&(M===$||l==="ext-link-text"||h==="free-ext-link"&&!r.slice(_+1).trim())||$==="]"&&(Ne===$||m==="free-ext-link"&&!r.slice(0,_).includes("]"))?"error":"warning",On=$==="{"||$==="[";if(St==="warning"&&(On||($==="]"||$==="}"))){let xe=ja[$],Un=On?r.slice(_+1):r.slice(0,_);if($==="{"&&((E=xe.exec(Un))==null?void 0:E[0])==="}"||$==="}"&&((U=xe.exec(Un))==null?void 0:U[0])==="{")continue;if(!Un.includes($)){let Ui=On?"nextSibling":"previousSibling",st=this[Ui];for(;st&&(st.type!=="text"||!xe.test(st.data));)st=st[Ui];if(st&&xe.exec(st.data)[0]!==$)continue}}me&&(q=q.toUpperCase());let Bi=this.posFromIndex(_),{line:qi,character:Oi}=Rt(k,I,Bi.top+1,Bi.left),Ct={rule:_a[$],message:A.msg('lonely "$1"',me||$==="h"?q:$),severity:St,startIndex:Y,endIndex:se,startLine:qi,endLine:qi,startCol:Oi,endCol:Oi+G};if($==="<")Ct.suggestions=[{desc:"escape",range:[Y,Y+1],text:"<"}];else if($==="h"&&l!=="link-text"&&Xn.test(Ne||""))Ct.suggestions=[{desc:"whitespace",range:[Y,Y],text:" "}];else if($==="["&&l==="ext-link-text"){let xe=i.getAbsoluteIndex()+i.toString().length;Ct.suggestions=[{desc:"escape",range:[xe,xe+1],text:"]"}]}else if($==="]"&&m==="free-ext-link"&&St==="error"){let xe=e-o.toString().length;Ct.fix={range:[xe,xe],text:"[",desc:"left bracket"}}else me&&(Ct.suggestions=[...W[0]===q?[]:[{desc:"uppercase",range:[Y,se],text:q}],...M===":"||M==="\uFF1A"?[{desc:"whitespace",range:[se,se+1],text:" "}]:[]]);u.push(Ct)}return u}replaceData(e){w(this,nn,os).call(this,e)}print(){return Lt(this.data)}};nn=new WeakSet,os=function(e){this.setAttribute("data",e)}});var Ae,dt=v(()=>{"use strict";Te();Ae=(a=!0,n=!0)=>(e,t)=>{class r extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return sn(r,e),r}});var $r,Se,qt=v(()=>{"use strict";O();Se=class extends S{constructor(e,t,r,i,s){super(e,r,i,s);y(this,$r);T(this,$r,t)}get type(){return c(this,$r)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};$r=new WeakMap});var Ot,X,Oe=v(()=>{"use strict";O();X=class extends S{constructor(e,t,r,i,s){super(e,r,i,s);y(this,Ot);T(this,Ot,t)}get type(){return c(this,Ot)}set type(e){T(this,Ot,e)}};Ot=new WeakMap});var qa,gt,Re,Pe,Fe,Nr=v(()=>{"use strict";D();re();ne();H();O();Oe();qa=a=>a==="redirect-target"||a==="link",Fe=class extends S{constructor(e,t,r=A.getConfig(),i=[],s="|"){super(void 0,r,i,{});y(this,gt,!0);y(this,Re);y(this,Pe);if(this.insertAt(new X(e,"link-target",r,i,{})),t!==void 0){let o=new S(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Re,s)}get link(){return c(this,Pe)}get fragment(){return c(this,Pe).fragment}afterBuild(){T(this,Pe,this.getTitle()),c(this,Re).includes("\0")&&T(this,Re,this.buildFromStr(c(this,Re),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,gt,t):e==="title"?T(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Re));return c(this,gt)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,gt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Re).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,Pe),p=new j(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&r.push(L(i,p,"unknown-page","template in an internal link target","warning")),l){let g=L(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:Qe(i.text())}],r.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),u=s==null?void 0:s.childNodes[g];if(u){let h=L(s,p,"pipe-like",'additional "|" in the link text',"warning"),f=h.startIndex+s.getRelativeIndex(g);h.suggestions=[{desc:"escape",range:[f,f+u.data.length],text:u.data.replace(/\|/gu,"|")}],r.push(h)}}if(d!==void 0&&!qa(o)){let g=L(i,p,"no-ignored","useless fragment"),u=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),h=i.childNodes[u];h&&(g.fix={range:[g.startIndex+i.getRelativeIndex(u)+h.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),r.push(g)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,gt)?{pre:"[[",post:"]]",sep:c(this,Re)}:{sep:c(this,Re)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};gt=new WeakMap,Re=new WeakMap,Pe=new WeakMap});var ce,Ye=v(()=>{"use strict";O();ce=class extends S{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var ls,Yn,Oa,J,Ke=v(()=>{"use strict";dt();Ye();ls=[Ae()];J=class extends(Oa=ce){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};Yn=ge(Oa),J=pe(Yn,0,"NoincludeToken",ls,J),ue(Yn,1,J)});var on,ds=v(()=>{"use strict";D();Nr();Ke();on=class extends Fe{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new J(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=L(this.lastChild,{start:n},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var gs,Je,Ut,Kn,Ua,ut,us=v(()=>{"use strict";dt();O();qt();ds();gs=[Ae(!1,!1)];ut=class extends(Ua=S){constructor(e,t,r,i,s,o,l=[]){super(void 0,o,l);y(this,Je);y(this,Ut);T(this,Je,e),T(this,Ut,s),this.append(new Se(t,"redirect-syntax",o,l),new on(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Je).length:super.getAttribute(e)}toString(e){return c(this,Je)+super.toString(e)+c(this,Ut)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,Je).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,Je),post:c(this,Ut)})}};Kn=ge(Ua),Je=new WeakMap,Ut=new WeakMap,ut=pe(Kn,0,"RedirectToken",gs,ut),ue(Kn,1,ut)});var ps={};de(ps,{parseRedirect:()=>Da});var Da,cs=v(()=>{"use strict";H();us();Da=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&A.normalizeTitle(t[3],0,!1,n,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new ut(...t.slice(1),n,e),a):!1}});var an,hs=v(()=>{"use strict";O();an=class extends S{get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}getAttribute(n){return n==="padding"?13:n==="plain"||super.getAttribute(n)}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}}});var Ze,Dt,Jn=v(()=>{"use strict";O();Dt=class extends S{constructor(e,t,r,i,s,o=[]){super(void 0,s);y(this,Ze);te(this,"closed");te(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,Ze,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,Ze);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,Ze);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,Ze)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,Ze);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};Ze=new WeakMap});var ms,Zn,Ha,pt,fs=v(()=>{"use strict";D();ne();dt();H();Jn();ms=[Ae(!1)];pt=class extends(Ha=Dt){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new j(this,n);if(t.data.trim()){let o=L(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=F(this,s,"unclosed-comment",A.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};Zn=ge(Ha),pt=pe(Zn,0,"IncludeToken",ms,pt),ue(Zn,1,pt)});var Ht,ln=v(()=>{"use strict";Te();Ht=(a=0)=>(n,e)=>{var r,bs;class t extends n{constructor(){super(...arguments);y(this,r)}getAttr(l){return w(this,r,bs).call(this).getAttr(l)}}return r=new WeakSet,bs=function(){return this.childNodes[a]},sn(t,n),t}});var ee,xs,Ts,gn,ei,ys,zt,ks,vs,ws,dn,un,pn,cn,As,ti=v(()=>{"use strict";ee=new Set(["align"]),xs=new Set(["cite"]),Ts=new Set(["cite","datetime"]),gn=new Set(["width"]),ei=new Set(["axis","align","bgcolor","height","width","valign"]),ys=new Set([...ei,"abbr","headers","scope","rowspan","colspan"]),zt=new Set(["type"]),ks=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),vs=new Set(["clear"]),ws=new Set(["bgcolor","align","valign"]),dn=new Set,un=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"]),pn={div:ee,h1:ee,h2:ee,h3:ee,h4:ee,h5:ee,h6:ee,blockquote:xs,q:xs,p:ee,br:vs,pre:gn,ins:Ts,del:Ts,ul:zt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ks,"border"]),caption:ee,tr:ws,td:ys,th:ys,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:gn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:zt,poem:ee,categorytree:ee,combooption:ee},cn={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:dn,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:dn,inputbox:dn,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:dn,poll:new Set(["id","show-results-before-voting"]),sm2:zt,flashmp3:zt,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"])},As={table:ks,td:new Set([...ei,"scope"]),th:ei,br:vs,caption:ee,div:ee,hr:gn,h1:ee,h2:ee,h3:ee,h4:ee,h5:ee,h6:ee,li:zt,p:ee,pre:gn,tr:ws,ul:zt}});var za,Wa,Lr,Wt,le,Me,Gt,Ss=v(()=>{"use strict";D();re();ti();ne();H();O();Oe();za=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Wa=new Set(["ext","arg","magic-word","template"]),Gt=class extends S{constructor(e,t,r,i="",s,o=[],l=A.getConfig(),d=[]){let p=new X(r,"attr-key",l,d),g;if(r==="title"||t==="img"&&r==="alt")g=new S(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};g=new S(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new X(s,"attr-value",l,d,{});super(void 0,l,d);y(this,Lr);y(this,Wt);y(this,le);y(this,Me);T(this,Lr,e),this.append(p,g),T(this,le,i),T(this,Me,[...o]),T(this,Wt,t),this.setAttribute("name",ae(r).trim().toLowerCase())}get type(){return c(this,Lr)}get tag(){return c(this,Wt)}get balanced(){return!c(this,le)||c(this,Me)[0]===c(this,Me)[1]}afterBuild(){c(this,le).includes("\0")&&T(this,le,this.buildFromStr(c(this,le),0)),this.parentNode&&T(this,Wt,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Me);return c(this,le)?super.toString(e,c(this,le)+t)+r:this.firstChild.toString(e)}text(){return c(this,le)?`${super.text(`${c(this,le).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,le)?c(this,le).length+((t=(e=c(this,Me)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var b;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:d,tag:p}=this,g=this.getValue(),u=new j(this,e);if(!i){let x=L(o,u,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");x.startIndex--,x.startCol--,x.suggestions=[{range:[x.endIndex,x.endIndex],text:c(this,Me)[0],desc:"close"}],r.push(x)}let h=cn[p],f=pn[p],{length:m}=this.toString();if(!(h!=null&&h.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?h||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(p==="meta"||p==="link"||!un.has(d)))){let x=L(s,u,"illegal-attr","illegal attribute name");x.suggestions=[{desc:"remove",range:[e,e+m],text:""}],r.push(x)}else if(d==="style"&&typeof g=="string"&&za.test(g))r.push(L(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let x=L(o,u,"illegal-attr","nonzero tabindex");x.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[x.startIndex,x.endIndex],text:"0"}],r.push(x)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:x})=>Wa.has(x))){let x=Zr.provideValues(p,d),C=String(g).toLowerCase();x.length>0&&x.every(({name:N})=>N!==C)&&r.push(L(o,u,"illegal-attr","illegal attribute value","warning"))}return(b=As[p])!=null&&b.has(d)&&r.push(L(s,u,"obsolete-attr","obsolete attribute","warning")),r}getValue(){return c(this,le)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Me);return c(this,le)?super.print({sep:Lt(c(this,le))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.tag=this.tag,r}};Lr=new WeakMap,Wt=new WeakMap,le=new WeakMap,Me=new WeakMap});var Cs,Ga,ri,Er,et,hn=v(()=>{"use strict";D();re();ne();H();O();Oe();Ss();Cs=a=>a.slice(0,-1),Ga=a=>`${Cs(a)}-dirty`;try{ri=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){ri=/[^\W_]/u}et=class extends S{constructor(e,t,r,i,s=[]){super(void 0,i,s,{});y(this,Er);if(T(this,Er,t),this.setAttribute("name",r),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new X(l,Ga(t),i,s,{})),l="")};for(;d;){let{index:u,0:h,1:f,2:m,3:b,4:x,5:C,6:N}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ae(f).trim())){let k=x!=null?x:N,I=[b,C],P=new Gt(Cs(t),r,f,m,k,I,i,s);g(),super.insertAt(P)}else l+=h;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,Er)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Gt&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,d=new j(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let p=F(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],r.push(p)}for(let p of s)if(p instanceof Gt){let{name:g}=p;o.has(g)?(l.add(g),o.get(g).push(p)):o.set(g,[p])}else{let g=p.text().trim();if(g){let u=L(p,d,"no-ignored","containing invalid attribute",ri.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],r.push(u)}}if(l.size>0)for(let p of l){let g=o.get(p).map(u=>{let h=u.getValue();return[u,h===!0?"":h]});r.push(...g.map(([u,h],f)=>{let m=L(u,d,"no-duplicate",A.msg("duplicated $1 attribute",p)),b={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||g.slice(0,f).some(([,x])=>x===h)?m.fix=b:m.suggestions=[b],m}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof X?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Er=new WeakMap});var mn,Is=v(()=>{"use strict";H();O();Ke();mn=class extends S{get type(){return"ext-inner"}constructor(n,e=A.getConfig(),t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),d=0,p="";for(;o&&l;)new J(o[0],e,t),new J(l[0],e,t),p+=`${n.slice(d,o.index)}\0${t.length-1}n\x7F${n.slice(o.index+s,l.index)}\0${t.length}n\x7F`,d=l.index+s+1,r.lastIndex=d,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=p+n.slice(d)}super(n,e,t,{}),this.setAttribute("stage",10)}getAttribute(n){return n==="plain"||super.getAttribute(n)}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var Vt,ni=v(()=>{"use strict";D();ne();Rr();H();O();Oe();Vt=class extends S{get type(){return"ext-inner"}constructor(n,e,t=A.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=X;this.append(...e.split(`
|
|
3
|
+
`).map(o=>i?o:ct(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}toString(n){return super.toString(n,`
|
|
4
4
|
`)}text(){return super.text(`
|
|
5
|
-
`)}getGaps(){return 1}lint(n=this.getAbsoluteIndex()){let e=new j(this,n),t=
|
|
6
|
-
`})}}});var Pr,Xt,fn,Qt,ii=k(()=>{"use strict";z();ye();ie();W();q();qt();Qt=class extends A{constructor(e,t,r,i=[]){super(void 0,r,i);y(this,Xt);y(this,Pr);T(this,Pr,e);let s=new A(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new Se(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Pr)}toString(e){let t=v(this,Xt,fn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=v(this,Xt,fn).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(Yt("quote")),g=p.filter(({bold:m})=>m),u=p.filter(({italic:m})=>m),h=new j(this,e);if(this.level===1){let m=L(i,h,"h1","<h1>");d||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),r.push(m)}if(d){let m=L(i,h,"unbalanced-header",w.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[b]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+b.length],text:""},{desc:`h${s+b.length}`,range:[m.endIndex,m.endIndex],text:b}]}else{let b=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-b.length,m.endIndex],text:""},{desc:`h${s+b.length}`,range:[m.startIndex,m.startIndex],text:b}]}r.push(m)}this.closest("html-attrs,table-attrs")&&r.push(F(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let m=L(g[g.length-1],{...h,start:e+s,left:h.left+s},"format-leakage",w.msg("unbalanced $1 in a section header","bold apostrophes")),b=e+s+o.length;f.slice(m.endIndex,b).trim()?m.suggestions=[{desc:"close",range:[b,b],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},r.push(m)}if(u.length%2){let m=L(u[u.length-1],{start:e+s},"format-leakage",w.msg("unbalanced $1 in a section header","italic apostrophes")),b=e+s+o.length;m.fix=f.slice(m.endIndex,b).trim()?{desc:"close",range:[b,b],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},r.push(m)}return r}print(){let e=v(this,Xt,fn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};Pr=new WeakMap,Xt=new WeakSet,fn=function(){return"=".repeat(this.level)}});var za,bn,Is=k(()=>{"use strict";ne();z();W();q();za=new RegExp(`https?://${_e}${Be}$`,"iu"),bn=class extends A{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(n,e,t=w.getConfig(),r=[]){super(void 0,t,r);let i=new A(typeof n=="number"?void 0:n,t,r,{}),s=new A(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=za.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=L(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var Mr,rt,mt,ft,Kt,nt,xn,$s,Fr,Ns=k(()=>{"use strict";ne();z();ye();ie();q();Is();Oe();qt();Fr=class extends A{constructor(e,t,r,i=[]){var S,N;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});y(this,nt);re(this,"modifier","");y(this,Mr,"template");y(this,rt,":");y(this,mt,!1);y(this,ft,new Map);y(this,Kt);let{parserFunction:[l,d],variable:p,functionHook:g}=r,u=(S=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:S[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[C,...I]=e.split(":"),[E]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((N=I[0])!=null?N:"");this.setModifier(`${C}:${E}`)&&(e=I.join(":").slice(E.length))}let h=e.search(/[::]/u),f=e[h]==="\uFF1A",m=h!==-1;if(m||t.length===0&&!c(this,mt)){let C=m?e.slice(0,h):e,I=m&&e.slice(h+1),E=pe(C),U=m?E.slice(E.search(/\S/u))+(f?"\uFF1A":""):E.trim(),M=U.toLowerCase(),_=Array.isArray(d),O=_?d.includes(U):Object.prototype.hasOwnProperty.call(d,U),oe=!_&&O?d[U]:Object.prototype.hasOwnProperty.call(l,M)&&l[M],R=_&&O||!("functionHook"in r)||g.includes(oe),D=_&&O||p.includes(oe);if(m?oe&&R:D){this.setAttribute("name",oe||M.replace(/^#|:$/u,"")),T(this,Mr,"magic-word"),f&&T(this,rt,"\uFF1A");let H=new Se(C,"magic-word-name",r,i);if(super.insertAt(H),I!==!1&&t.unshift([I]),this.name==="invoke")for(let $=0;$<2;$++){let G=t.shift();if(!G)break;let Z=new Q(G.join("="),`invoke-${$?"function":"module"}`,r,i);super.insertAt(Z)}}}if(this.type==="template"){let C=pe(e).trim();if(!this.normalizeTitle(C,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new Q(e,"template-name",r,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let b=this.isTemplate(),x=1;for(let C=0;C<t.length;C++){let I=t[C];b||this.name==="switch"&&C>0||this.name==="tag"&&C>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(x),x++),this.insertAt(new bn(...I,r,i))}this.seal("modifier")}get type(){return c(this,Mr)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=pe(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,mt)&&o||!c(this,mt)&&(l||e==="")||(se.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,mt,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){var e;if(this.type!=="magic-word"||this.name!=="invoke")throw new Error("TranscludeToken.getModule method is only for modules!");return[v(this,nt,xn).call(this).title,(e=this.childNodes[2])==null?void 0:e.toString(!0).trim()]}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,Kt,v(this,nt,xn).call(this)),this.setAttribute("name",c(this,Kt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,rt))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,rt))+we(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Kt);case"colon":return c(this,rt);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new j(this,e),d=i==="magic-word";if(d&&!v(this,nt,xn).call(this).valid)r.push(L(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&&dt(f.data).includes("#")),h=g.childNodes[u];if(h){let f=L(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(d&&o===2)return r.push(F(this,l,"invalid-invoke","missing module function")),r;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)r.push(...g.map(u=>{let h=L(u,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?v(this,nt,$s).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Yt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,ft).has(i)?s=c(this,ft).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,ft).set(i,s)),s}getDuplicatedArgs(){return[...c(this,ft)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=r.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:d}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let p=d.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch(p){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Lt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,rt))+qe(e.slice(1),{sep:"|"}):qe(e,{sep:"|"})}}}</span>`}};Mr=new WeakMap,rt=new WeakMap,mt=new WeakMap,ft=new WeakMap,Kt=new WeakMap,nt=new WeakSet,xn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,{temporary:!0})},$s=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Ls,si,Wa,bt,Es=k(()=>{"use strict";gt();q();Ls=[Ae()];bt=class extends(Wa=A){get type(){return"hidden"}};si=de(Wa),bt=ue(si,0,"HiddenToken",Ls,bt),ge(si,1,bt)});var yn,Rs,Tn,Ps=k(()=>{"use strict";ne();z();ie();q();Oe();Es();Tn=class extends A{constructor(e,t,r=[]){super(void 0,t,r,{});y(this,yn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new Q(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new bt(s,t,r);super.insertAt(o)}else{let o=new A(s,t,r);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${we(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){v(this,yn,Rs).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=F(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new j(this,e);o.push(...s.map(d=>{let p=L(d,l,"no-ignored","invisible content inside triple braces");return p.startIndex--,p.startCol--,p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""},{desc:"escape",range:[p.startIndex,p.startIndex+1],text:"{{!}}"}],p}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.default=this.default,r}};yn=new WeakSet,Rs=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Bs={};le(Bs,{parseBraces:()=>jr});var Ga,Va,Fs,Ms,js,_s,jr,kn=k(()=>{"use strict";at();ne();ii();Ns();Ps();Ga=2e4,Va={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Fs=String.raw`|\{{2,}`,Ms=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),js=Re(a=>new RegExp(a,"gmu")),_s=a=>{let n=pe(a).trim().toLowerCase();return Ms.has(n)?Ms.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},jr=(a,n,e)=>{var m,b,x,S,N,C;let t=String.raw`${(m=n.excludes)!=null&&m.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=I=>I.replace(/\0(\d+)\x7F/gu,(E,U)=>s[U]),l=(I,E,U,M)=>{E[E.length-1].push(o(I.slice(U,M)))};a=a.replace(/\{\{([^\n{}[]*)\}\}(?!\})|\[\[[^\n[\]{]*\]\]|-\{[^\n{}[]*\}-/gu,(I,E)=>{if(E!==void 0)try{let{length:U}=e,M=E.split("|");return new Fr(M[0],M.slice(1).map(_=>{let O=_.indexOf("=");return O===-1?[_]:[_.slice(0,O),_.slice(O+1)]}),n,e),`\0${U}${_s(M[0])}\x7F`}catch(U){if(!(U instanceof SyntaxError)||U.message!=="Invalid template name")throw U}return s.push(I),`\0${s.length-1}\x7F`});let d=a.lastIndexOf("}}")-a.length,p=d+a.length!==-1,g=js(t+(p?Fs:"")),u=g.exec(a),h=0,f;for(;u||f!==void 0&&f<=a.length&&((x=(b=i[i.length-1])==null?void 0:b[0])!=null&&x.startsWith("="));){if(++h>Ga)throw new RangeError("Maximum iteration exceeded");if(u!=null&&u[1]){let[,{length:$}]=u;u[0]=u[0].slice($),u.index+=$}let{0:I,index:E}=u!=null?u:{0:`
|
|
7
|
-
`,index:a.length},
|
|
8
|
-
`){f=
|
|
9
|
-
)
|
|
10
|
-
|
|
5
|
+
`)}getGaps(){return 1}lint(n=this.getAbsoluteIndex()){let e=new j(this,n),t=A.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){i.setAttribute("aIndex",n);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.push(L(i,e,"no-ignored",t));else{let o=s.findIndex(({type:d})=>d!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let d=L(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],r.push(d)}else r.push(...i.lint(n,!1))}n+=i.toString().length+1}return r}print(){return super.print({sep:`
|
|
6
|
+
`})}}});var Pr,Qt,fn,Xt,ii=v(()=>{"use strict";D();Te();ne();H();O();qt();Xt=class extends S{constructor(e,t,r,i=[]){super(void 0,r,i);y(this,Qt);y(this,Pr);T(this,Pr,e);let s=new S(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new Se(t[1],"heading-trail",r,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Pr)}toString(e){let t=w(this,Qt,fn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=w(this,Qt,fn).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(Yt("quote")),g=p.filter(({bold:m})=>m),u=p.filter(({italic:m})=>m),h=new j(this,e);if(this.level===1){let m=L(i,h,"h1","<h1>");d||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),r.push(m)}if(d){let m=L(i,h,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[b]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+b.length],text:""},{desc:`h${s+b.length}`,range:[m.endIndex,m.endIndex],text:b}]}else{let b=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-b.length,m.endIndex],text:""},{desc:`h${s+b.length}`,range:[m.startIndex,m.startIndex],text:b}]}r.push(m)}this.closest("html-attrs,table-attrs")&&r.push(F(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let m=L(g[g.length-1],{...h,start:e+s,left:h.left+s},"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),b=e+s+o.length;f.slice(m.endIndex,b).trim()?m.suggestions=[{desc:"close",range:[b,b],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},r.push(m)}if(u.length%2){let m=L(u[u.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),b=e+s+o.length;m.fix=f.slice(m.endIndex,b).trim()?{desc:"close",range:[b,b],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},r.push(m)}return r}print(){let e=w(this,Qt,fn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};Pr=new WeakMap,Qt=new WeakSet,fn=function(){return"=".repeat(this.level)}});var Va,bn,$s=v(()=>{"use strict";re();D();H();O();Va=new RegExp(`https?://${_e}${Be}$`,"iu"),bn=class extends S{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(n,e,t=A.getConfig(),r=[]){super(void 0,t,r);let i=new S(typeof n=="number"?void 0:n,t,r,{}),s=new S(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=Va.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=L(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var Mr,tt,ht,mt,Kt,rt,xn,Ns,Fr,Ls=v(()=>{"use strict";re();D();Te();ne();O();$s();Oe();qt();Fr=class extends S{constructor(e,t,r,i=[]){var C,N;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});y(this,rt);te(this,"modifier","");y(this,Mr,"template");y(this,tt,":");y(this,ht,!1);y(this,mt,new Map);y(this,Kt);let{parserFunction:[l,d],variable:p,functionHook:g}=r,u=(C=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:C[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[k,...I]=e.split(":"),[P]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((N=I[0])!=null?N:"");this.setModifier(`${k}:${P}`)&&(e=I.join(":").slice(P.length))}let h=e.search(/[::]/u),f=e[h]==="\uFF1A",m=h!==-1;if(m||t.length===0&&!c(this,ht)){let k=m?e.slice(0,h):e,I=m&&e.slice(h+1),P=ae(k),z=m?P.slice(P.search(/\S/u))+(f?"\uFF1A":""):P.trim(),E=z.toLowerCase(),U=Array.isArray(d),W=U?d.includes(z):Object.prototype.hasOwnProperty.call(d,z),ie=!U&&W?d[z]:Object.prototype.hasOwnProperty.call(l,E)&&l[E],R=U&&W||!("functionHook"in r)||g.includes(ie),_=U&&W||p.includes(ie);if(m?ie&&R:_){this.setAttribute("name",ie||E.replace(/^#|:$/u,"")),T(this,Mr,"magic-word"),f&&T(this,tt,"\uFF1A");let q=new Se(k,"magic-word-name",r,i);if(super.insertAt(q),I!==!1&&t.unshift([I]),this.name==="invoke")for(let $=0;$<2;$++){let G=t.shift();if(!G)break;let me=new X(G.join("="),`invoke-${$?"function":"module"}`,r,i);super.insertAt(me)}}}if(this.type==="template"){let k=ae(e).trim();if(!this.normalizeTitle(k,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new X(e,"template-name",r,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let b=this.isTemplate(),x=1;for(let k=0;k<t.length;k++){let I=t[k];b||this.name==="switch"&&k>0||this.name==="tag"&&k>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(x),x++),this.insertAt(new bn(...I,r,i))}this.seal("modifier")}get type(){return c(this,Mr)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=ae(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,ht)&&o||!c(this,ht)&&(l||e==="")||(oe.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,ht,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){var e;if(this.type!=="magic-word"||this.name!=="invoke")throw new Error("TranscludeToken.getModule method is only for modules!");return[w(this,rt,xn).call(this).title,(e=this.childNodes[2])==null?void 0:e.text().trim()]}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,Kt,w(this,rt,xn).call(this)),this.setAttribute("name",c(this,Kt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,tt))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":c(this,tt))+we(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Kt);case"colon":return c(this,tt);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new j(this,e),d=i==="magic-word";if(d&&!w(this,rt,xn).call(this).valid)r.push(L(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&<(f.data).includes("#")),h=g.childNodes[u];if(h){let f=L(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},r.push(f)}}if(d&&o===2)return r.push(F(this,l,"invalid-invoke","missing module function")),r;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)r.push(...g.map(u=>{let h=L(u,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?w(this,rt,Ns).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Yt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,mt).has(i)?s=c(this,mt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,mt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,mt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=r.slice(2),l=o[o.length-1];s=[...o.filter(({anon:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=r.slice(i,i+2).map(({lastChild:o})=>o));for(let o=0;o<s.length;){let{length:l,0:d}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let p=d.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch(p){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Lt(i)}${s==="magic-word"?r.print()+(t===1?"":c(this,tt))+qe(e.slice(1),{sep:"|"}):qe(e,{sep:"|"})}}}</span>`}};Mr=new WeakMap,tt=new WeakMap,ht=new WeakMap,mt=new WeakMap,Kt=new WeakMap,rt=new WeakSet,xn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},Ns=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);(o!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Es,si,Qa,ft,Rs=v(()=>{"use strict";dt();O();Es=[Ae()];ft=class extends(Qa=S){get type(){return"hidden"}};si=ge(Qa),ft=pe(si,0,"HiddenToken",Es,ft),ue(si,1,ft)});var yn,Ps,Tn,Fs=v(()=>{"use strict";re();D();ne();O();Oe();Rs();Tn=class extends S{constructor(e,t,r=[]){super(void 0,t,r,{});y(this,yn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new X(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new ft(s,t,r);super.insertAt(o)}else{let o=new S(s,t,r);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${we(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){w(this,yn,Ps).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=F(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}r.setAttribute("aIndex",e+3);let o=r.lint(e+3,t);if(i){let l=e+4+r.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new j(this,e);o.push(...s.map(d=>{let p=L(d,l,"no-ignored","invisible content inside triple braces");return p.startIndex--,p.startCol--,p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""},{desc:"escape",range:[p.startIndex,p.startIndex+1],text:"{{!}}"}],p}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.default=this.default,r}};yn=new WeakSet,Ps=function(){this.setAttribute("name",this.firstChild.text().trim())}});var Us={};de(Us,{parseBraces:()=>jr});var Xa,Ms,oi,js,_s,Bs,Os,qs,jr,kn=v(()=>{"use strict";ot();re();ii();Ls();Fs();Xa={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Ms=String.raw`\[(?!\[)`,oi=String.raw`\n(?![=\0])`,js=String.raw`|\{{2,}`,_s=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Bs=ve(a=>new RegExp(a,"gmu"));Os=new RegExp(String.raw`\{\{((?:[^\n{}[]|${Ms}|${oi})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${oi})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${Ms}|${oi})*\}-`,"gu");qs=a=>{let n=ae(a).trim().toLowerCase();return _s.has(n)?_s.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},jr=(a,n,e)=>{var m,b,x,C,N;let t=String.raw`${n.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=k=>k.replace(/\0(\d+)\x7F/gu,(I,P)=>s[P]),l=(k,I,P,z)=>{I[I.length-1].push(o(k.slice(P,z)))},d;do d!==void 0&&(a=d),d=a.replace(Os,(k,I,P)=>{if(I!==void 0||typeof P=="string")try{let{length:z}=e,E=(I!=null?I:P).split("|");return new Fr(o(E[0]),E.slice(1).map(U=>{let W=U.indexOf("=");return(W===-1?[U]:[U.slice(0,W),U.slice(W+1)]).map(o)}),n,e),`\0${z}${qs(E[0])}\x7F`}catch(z){if(!(z instanceof SyntaxError)||z.message!=="Invalid template name")throw z}return s.push(o(k)),`\0${s.length-1}\x7F`});while(d!==a);a=d;let p=a.lastIndexOf("}}")-a.length,g=p+a.length!==-1,u=Bs(t+(g?js:"")),h=u.exec(a),f;for(;h||f!==void 0&&f<=a.length&&((b=(m=i[i.length-1])==null?void 0:m[0])!=null&&b.startsWith("="));){if(h!=null&&h[1]){let[,{length:q}]=h;h[0]=h[0].slice(q),h.index+=q}let{0:k,index:I}=h!=null?h:{0:`
|
|
7
|
+
`,index:a.length},P=(x=i.pop())!=null?x:{},{0:z,index:E,parts:U,findEqual:W,pos:ie}=P,R=k==="="&&W;if(k==="]]"||k==="}-")f=I+2;else if(k===`
|
|
8
|
+
`){f=I+1;let{pos:q,findEqual:$}=(C=i[i.length-1])!=null?C:{};if(q===void 0||$||ae(a.slice(q,E))!==""){let G=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(E,I));G&&(G[2]=o(G[2]),G[2].includes(`
|
|
9
|
+
`)||(a=`${a.slice(0,E)}\0${e.length}h\x7F${a.slice(I)}`,f=E+4+String(e.length).length,new Xt(G[1].length,G.slice(2),n,e)))}}else if(k==="|"||R)f=I+1,l(a,U,ie,I),k==="|"&&U.push([]),P.pos=f,P.findEqual=k==="|",i.push(P);else if(k.startsWith("}}")){let q=k.slice(0,Math.min(z.length,3)),$=z.length-q.length,{length:G}=e;f=I+q.length,l(a,U,ie,I);let me=!1,Y="t";if(q.length===3){let se=U.map(Ne=>Ne.join("=")),M=se.length>1&&ae(se[1]).trim();new Tn(se,n,e),M&&M.endsWith(":")&&r.includes(M.slice(0,-1).toLowerCase())&&(Y="s")}else try{new Fr(U[0][0],U.slice(1),n,e),Y=qs(U[0][0])}catch(se){if(se instanceof SyntaxError&&se.message==="Invalid template name")me=!0;else throw se}me||(a=`${a.slice(0,E+$)}\0${G}${Y}\x7F${a.slice(f)}`,f=E+$+3+String(G).length,$>1?i.push({0:z.slice(0,$),index:E,pos:E+$,parts:[[]]}):$===1&&a[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else f=I+k.length,k.startsWith("{")&&(h.pos=f,h.parts=[[]]),i.push(..."0"in P?[P]:[],h);let _=i[i.length-1];if(g&&p+a.length<f)for(g=!1;(N=_==null?void 0:_[0])!=null&&N.startsWith("{");)i.pop(),_=i[i.length-1];u=Bs(t+(g?js:"")+(_?`|${Xa[_[0][0]]}${_.findEqual?"|=":""}`:"")),u.lastIndex=f,h=u.exec(a)}return o(a)}});var vn,Ds=v(()=>{"use strict";Rr();kn();H();ni();vn=class extends Vt{constructor(n,e,t=A.getConfig(),r=[]){let i=Symbol("InputboxToken"),s=t.excludes.includes("heading")?t:{...t,excludes:[...t.excludes,"heading"]},{length:o}=r;r.push(i),e&&(e=ct(e,s,r,n)),e&&(e=jr(e,s,r)),r.splice(o,1),super(n,e,s,r,{})}}});function Hs(a,n,e,t,r){n=ae(n).trim();let i=n.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!n||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(Ya(e.protocol).test(i))return Ka(e.protocol).test(i)&&n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return n;let s=A.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var Ya,Ka,Ja,Za,fe,An,zs,wn,Ws=v(()=>{"use strict";ot();re();D();H();O();Ya=ve(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),Ka=ve(a=>new RegExp(String.raw`^(?:(?:${a}|//)${_e}|\0\d+m\x7F)${Be}$`,"iu")),Ja=ve(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
|
|
10
|
+
)`:""}(\s*)$`,"u")),Za=new Set(["alt","link","lang","page","caption"]);wn=class extends S{constructor(e,t,r,i){var n=(...Uu)=>(super(...Uu),y(this,An),y(this,fe,""),this);let s,o=Object.entries(r.img).map(([d,p])=>[d,p,Ja(d)]),l=o.find(([,d,p])=>(s=p.exec(e),s&&(s.length!==4||Hs(d,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),T(this,fe,e)):(n(s[2],r,i,{}),T(this,fe,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,r.excludes.includes("list")?r:{...r,excludes:[...r.excludes,"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Hs("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!Za.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,fe)?c(this,fe).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,fe)?c(this,fe).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,fe).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=F(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},r.push(o)}else if(typeof i=="object"&&i.encoded){let o=F(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Qe(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():w(this,An,zs).call(this)||super.text()}print(){return c(this,fe)?`<span class="wpb-image-parameter">${c(this,fe).replace("$1",`<span class="wpb-image-caption">${qe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};fe=new WeakMap,An=new WeakSet,zs=function(){return c(this,fe)&&!c(this,fe).includes("$1")}});var Gs,Vs,Qs,el,tl,Jt,ai=v(()=>{"use strict";D();ne();H();Nr();Ws();Gs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Vs=new Set(["left","right","center","none"]),Qs=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),el=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),tl=a=>{if(a===void 0)return[];let n=/-\{|\}-|\|/gu,e=[],t=n.exec(a),r=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?r+=s==="-{"?1:-1:r===0&&(e.push(a.slice(i,o)),{lastIndex:i}=n),t=n.exec(a)}return e.push(a.slice(i)),e},Jt=class extends Fe{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(n,e,t=A.getConfig(),r=[],i="|"){super(n,void 0,t,r,i);let{extension:s}=this.getTitle(!0,!0);this.append(...tl(e).map(o=>new wn(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var f;let t=super.lint(n,e),r=this.getAllArgs().filter(({childNodes:m})=>{let b=m.filter(x=>x.text().trim());return b.length!==1||b[0].type!=="arg"}),i=[...new Set(r.map(({name:m})=>m))],s=i.filter(m=>Gs.has(m)),o=i.filter(m=>Vs.has(m)),l=i.filter(m=>Qs.has(m)),[d]=s,p=d==="framed"||d==="manualthumb",g=new j(this,n);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(F(this,g,"nested-link","internal link in an external link")),p)for(let m of r.filter(({name:b})=>b==="width")){let b=L(m,g,"invalid-gallery","invalid image parameter");b.fix={range:[b.startIndex-1,b.endIndex],text:"",desc:"remove"},t.push(b)}if(r.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let u=(m,b,x)=>C=>{let N=L(C,g,"no-duplicate",A.msg(`${m} image $1 parameter`,b),x);return N.suggestions=[{desc:"remove",range:[N.startIndex-1,N.endIndex],text:""}],N},{extension:h}=this;for(let m of i){if(m==="invalid"||m==="width"&&p)continue;let b=r.filter(({name:x})=>x===m);m==="caption"&&(b=[...b.slice(0,-1).filter(x=>x.text()),...b.slice(-1)]),b.length>1&&t.push(...b.map(u("duplicated",m,m==="caption"&&h&&!el.has(h)?"warning":"error")))}return s.length>1&&t.push(...r.filter(({name:m})=>Gs.has(m)).map(u("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:m})=>Vs.has(m)).map(u("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:m})=>Qs.has(m)).map(u("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(n){return this.getAllArgs().filter(({name:e})=>n===e)}getArg(n){let e=this.getArgs(n);return e[n==="manualthumb"?0:e.length-1]}getValue(n){var e;return(e=this.getArg(n))==null?void 0:e.getValue()}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:r}=this;return r&&(t.extension=r),t}}});var Zt,li=v(()=>{"use strict";D();H();O();ai();Zt=class extends Jt{constructor(e,t,r,i=A.getConfig(),s=[]){let o;if(r!==void 0){let{length:l}=s;o=new S(r,i,s);for(let d=1;d<11;d++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);te(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,{halfParsed:!0,temporary:e,decode:!t})}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=F(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],r.push(s)}return r}}});var bt,Xs,di,Sn,Ys=v(()=>{"use strict";H();O();li();Ke();Sn=class extends S{constructor(e,t=A.getConfig(),r=[]){var i;super(void 0,t,r,{});y(this,bt);for(let s of(i=e==null?void 0:e.split(`
|
|
11
|
+
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new J(s,t,r):s);continue}let[,l,d]=o;w(this,bt,Xs).call(this,l)?super.insertAt(new Zt("gallery",l,d,t,r)):super.insertAt(new J(s,t,r))}}get type(){return"ext-inner"}get widths(){return w(this,bt,di).call(this,"widths")}get heights(){return w(this,bt,di).call(this,"heights")}toString(e){return super.toString(e,`
|
|
11
12
|
`)}text(){return super.text(`
|
|
12
13
|
`).replace(/\n\s*\n/gu,`
|
|
13
|
-
`)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],d=l.toString(),{length:p}=d,g=d.trim(),{type:u}=l,h=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),u==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)){let m=e+p;s.push({rule:"no-ignored",message:
|
|
14
|
-
`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};
|
|
14
|
+
`)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],d=l.toString(),{length:p}=d,g=d.trim(),{type:u}=l,h=r+o,f=o?0:i;if(l.setAttribute("aIndex",e),u==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)){let m=e+p;s.push({rule:"no-ignored",message:A.msg("invalid content in <$1>","gallery"),severity:g.startsWith("|")?"warning":"error",startIndex:e,endIndex:m,startLine:h,endLine:h,startCol:f,endCol:f+p,suggestions:[{desc:"remove",range:[e,m],text:""},{desc:"comment",range:[e,m],text:`<!--${d}-->`}]})}else u!=="noinclude"&&u!=="text"&&s.push(...l.lint(e,t));e+=p+1}return s}print(){return super.print({sep:`
|
|
15
|
+
`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};bt=new WeakSet,Xs=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},di=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),r=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return r&&Number(r)||120}});var er,gi=v(()=>{"use strict";D();Nr();er=class extends Fe{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push(F(this,{start:n},"nested-link","internal link in an external link")),t}}});var rl,nl,_r,Ue,Cn=v(()=>{"use strict";D();re();ne();H();O();rl=String.raw`(?:[${Le}\t]| |�*160;|&#[xX]0*[aA]0;)`,nl=new RegExp(`${rl}+`,"gu"),Ue=class extends S{constructor(e,t="free-ext-link",r=A.getConfig(),i){super(e,r,i,{});y(this,_r);T(this,_r,t)}get type(){return c(this,_r)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=we(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(nl," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:Zi(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new j(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:g}=this;if(g.startsWith("ISBN")){let u=[...g.slice(5)].map(h=>h==="X"?10:Number(h));(u.length===10&&u.reduce((h,f,m)=>h+f*(10-m),0)%11||u.length===13&&(u[12]===10||u.reduce((h,f,m)=>h+f*(m%2?3:1),0)%10))&&r.push(F(this,i,"invalid-isbn","invalid ISBN"))}return r}let l=s==="ext-link-url",d=l?/\|/u:/[,;。:!?()]+/u,p=o.find(g=>g.type==="text"&&d.test(g.data));if(p){let{data:g}=p,u=L(p,i,"unterminated-url",A.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:f}=d.exec(g),m=u.startIndex+h;u.suggestions=l?[{desc:"whitespace",range:[m,m+1],text:" "}]:[{desc:"whitespace",range:[m,m],text:" "},{desc:"escape",range:[m,m+f.length],text:encodeURI(f)}],r.push(u)}return r}getUrl(e){{let{type:t}=this,{link:r}=this;if(t==="magic-link"){if(r.startsWith("ISBN"))return this.normalizeTitle(`BookSources/${r.slice(5)}`,-1,{temporary:!0}).getUrl(e);r=r.startsWith("RFC")?`https://tools.ietf.org/html/rfc${r.slice(4)}`:`https://pubmed.ncbi.nlm.nih.gov/${r.slice(5)}`}else r.startsWith("//")&&(r=`https:${r}`);return new URL(r)}}};_r=new WeakMap});var De,tr,ui=v(()=>{"use strict";D();H();O();Cn();tr=class extends S{constructor(e,t="",r="",i=A.getConfig(),s=[]){super(void 0,i,s,{});y(this,De);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Ue(e,"ext-link-url",i,s);if(this.insertAt(o),T(this,De,t),r){let l=new S(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,De)}]`:`[${super.toString(e,c(this,De))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,De).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push(F(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,De)}]`}:{pre:"[",sep:c(this,De),post:"]"})}};De=new WeakMap});var Br,Ks=v(()=>{"use strict";O();Ke();gi();ui();Br=class extends S{get type(){return"imagemap-link"}constructor(n,e,t,r,i=[]){super(void 0,r,i),this.append(n,e.length===2?new er(...e,r,i):new tr(...e,r,i),new J(t,r,i))}}});var In,Js=v(()=>{"use strict";D();Te();ne();H();O();Ke();li();Ks();In=class extends S{get type(){return"ext-inner"}get image(){return this.childNodes.find(Yt("imagemap-image"))}constructor(n,e=A.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
|
|
15
16
|
`),i=new Set(e.protocol.split("|")),s=J,o=!0,l=!1;for(let d of r){let p=d.trim();if(!(l||!p||p.startsWith("#"))){if(o){let g=d.indexOf("|"),u=g===-1?d:d.slice(0,g),{valid:h,ns:f}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(h&&f===6){let m=new Zt("imagemap",u,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),u=d.slice(g),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(u);if(h){if(this.normalizeTitle(h[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new Br(d.slice(0,g),h.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(f){super.insertAt(new Br(d.slice(0,g),f.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,e,t))}}toString(n){return super.toString(n,`
|
|
16
17
|
`)}text(){return super.text(`
|
|
17
18
|
`).replace(/\n{2,}/gu,`
|
|
18
19
|
`)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new j(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=L(i,r,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(F(this,r,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
|
|
19
|
-
`})}}});var rl,$n,Ys=k(()=>{"use strict";at();z();W();Ke();rl=Re(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),$n=class extends ce{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let r=F(this,{start:n},"void-ext",w.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,rl(e))}}});var Nn={};le(Nn,{NestedToken:()=>ui});var nl,il,qr,rr,ui,Ln=k(()=>{"use strict";z();ie();Rr();kn();W();q();pi();Je();nl=new Set(["comment","include","arg","template","magic-word"]),il=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),ui=class extends A{constructor(e,t,r,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=ht(e,i,s,t)),e&&(e=jr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,d,p,g)=>{let u=`\0${s.length+1}e\x7F`;return new De(l,d,p,g,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new J(d,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);y(this,qr);y(this,rr);T(this,qr,[...r]),T(this,rr,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new j(this,e),i=typeof c(this,rr)=="boolean"?il[c(this,rr)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,qr).includes(l);if(nl.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).map(s=>{let o=L(s,r,"no-ignored",w.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};qr=new WeakMap,rr=new WeakMap});var Ks,Js,ci,sl,De,pi=k(()=>{"use strict";z();ie();W();ln();q();Jn();hn();Cs();ni();qs();Vs();Qs();Ys();Ks=(a,n)=>{let e=new Set(a);return e.delete(n),[...e]};Js=[Dt()];De=class extends(sl=Ht){get type(){return"ext"}constructor(n,e,t,r,i=w.getConfig(),s=!1,o=[]){var u;let l=n.toLowerCase(),d=new tt(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p={...i,ext:Ks(i.ext,l),excludes:[...(u=i.excludes)!=null?u:[]]},g;switch(p.inExt=!0,l){case"tab":p.ext=Ks(p.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&p.excludes.push("heading"),g=new A(t,p,o);break;case"pre":g=new mn(t,p,o);break;case"dynamicpagelist":g=new Vt(s,t,p,o);break;case"inputbox":p.excludes.push("heading"),g=new vn(s,t,p,o);break;case"references":{let{NestedToken:h}=(Ln(),ee(Nn));p.excludes.push("heading"),g=new h(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:h}=(Ln(),ee(Nn));g=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:h}=(Ln(),ee(Nn));g=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":g=new Sn(t,p,o);break;case"imagemap":g=new In(t,p,o);break;default:g=new $n(t,p,o)}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(n,d,g,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new j(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(F(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(F(this,r,"var-anchor","variable anchor in a section header")),t}};ci=de(sl),De=ue(ci,0,"ExtToken",Js,De),ge(ci,1,De)});var Zs,hi,ol,Tt,eo=k(()=>{"use strict";z();gt();W();Ke();Zs=[Ae(!1)];Tt=class extends(ol=ce){constructor(e,t,r,i){super(e,r,i);re(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=F(this,{start:e},"unclosed-comment",w.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};hi=de(ol),Tt=ue(hi,0,"CommentToken",Zs,Tt),ge(hi,1,Tt)});var no={};le(no,{parseCommentAndExt:()=>ht});var ro,al,mi,ll,to,ht,Rr=k(()=>{"use strict";at();cs();Je();ms();pi();eo();ro="<onlyinclude>",al="</onlyinclude>",{length:mi}=ro,ll=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return Yi(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),to=a=>{let n=a.indexOf(ro);return{i:n,j:a.indexOf(al,n+mi)}},ht=(a,n,e,t)=>{if(t){let{i:r,j:i}=to(a);if(r!==-1&&i!==-1){let s="",o=l=>{new J(l,n,e),s+=`\0${e.length-1}n\x7F`};for(;r!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new an(a.slice(r+mi,i),n,e),r>0&&o(a.slice(0,r)),s+=l,a=a.slice(i+mi+1),{i:r,j:i}=to(a)}return a&&o(a),s}}return a.replace(ll[t?1:0](n.ext),(r,i,s,o,l,d,p,g,u)=>{let h=e.length,f="n";if(i)f="e",new De(i,s,o,l,n,d,e);else if(r.startsWith("<!--")){f="c";let m=r.endsWith("-->");new Tt(r.slice(4,m?-3:void 0),m,n,e)}else d?new ct(d,p,g,u,n,e):new J(r,n,e);return`\0${h}${f}\x7F`})}});var dl,gl,ul,io,nr,je,it,ze,fi,pl,yt,so=k(()=>{"use strict";z();ye();ie();ln();q();dl=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),gl=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),ul=new Set(["strike","big","center","font","tt"]);io=[Dt()];yt=class extends(pl=A){constructor(e,t,r,i,s,o){super(void 0,s,o);y(this,nr);y(this,je);y(this,it);y(this,ze);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,nr,r),T(this,je,i),T(this,it,e)}get type(){return"html"}get selfClosing(){return c(this,je)}get closing(){return c(this,nr)}toString(e){return`<${this.closing?"/":""}${c(this,it)}${super.toString(e)}${c(this,je)?"/":""}>`}text(){let{closing:e}=this,t=c(this,it)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,je)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,it).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new j(this,e);if(i==="h1"&&!o){let m=F(this,d,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(m)}if(this.closest("table-attrs")){let m=F(this,d,"parsing-order","HTML tag in table attributes");m.fix={desc:"remove",range:[e,m.endIndex],text:""},r.push(m)}ul.has(i)&&r.push(F(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(F(this,d,"bold-header","bold in section header","warning"));let{html:[,p,g]}=this.getAttribute("config"),u=g.includes(i),h=p.includes(i);if(o&&(l||u)||l&&(!u&&!h)){let m=F(this,d,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),b={desc:"open",range:[e+1,e+2],text:""},x={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[b,x]:o?m.fix=u?b:x:m.suggestions=[x,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],r.push(m)}else if(!this.findMatchingTag()){let m=F(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let b=this.closest("magic-word");b&&dl.has(b.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let b=s==null?void 0:s.childNodes;gl.has(i)&&(b!=null&&b.slice(0,b.indexOf(this)).some(({type:x,name:S})=>x==="html"&&S===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}r.push(m)}return r}findMatchingTag(){return Le(c(this,ze),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:p}=t,g=p.indexOf(this),u=r?p.slice(0,g).reverse():p.slice(g+1),h=[this],{rev:f}=se;for(let m of u)if(!(!m.is("html")||m.name!==e||d&&c(m,je)))if(c(m,nr)===r)h.push(m);else{let b=h.pop();if(b===this)return m;T(b,ze,[f,m]),T(m,ze,[f,b])}for(let m of h)T(m,ze,[f,void 0])},e=>{T(this,ze,e),e[1]&&e[1]!==this&&T(e[1],ze,[se.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,it)}`,post:`${c(this,je)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,je)}),r}};fi=de(pl),nr=new WeakMap,je=new WeakMap,it=new WeakMap,ze=new WeakMap,yt=ue(fi,0,"HtmlToken",io,yt),ge(fi,1,yt)});var oo={};le(oo,{parseHtml:()=>hl});var cl,hl,ao=k(()=>{"use strict";hn();so();cl=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,hl=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=cl.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!n.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",h,f]=l,{length:m}=e,b=new tt(u,"html-attrs",p,n,e),x=b.getAttr("itemprop");if(p==="meta"&&(x===void 0||b.getAttr("content")===void 0)||p==="link"&&(x===void 0||b.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new yt(d,b,g==="/",h==="/>",n,e)}return i}});var ir,bi=k(()=>{"use strict";ln();W();q();qt();hn();ir=class extends Dt(1)(A){constructor(n,e,t,r,i=w.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new Se(e,"table-syntax",i,s),new tt(r,"table-attrs",t,i,s))}}});var Ce,Or,Ur,xi,sr,Ti=k(()=>{"use strict";z();ie();W();q();bi();sr=class extends ir{constructor(e,t,r=w.getConfig(),i=[]){var d;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);y(this,Ur);y(this,Ce,"");y(this,Or);s&&([Jr(this,Ce)._]=s);let l=new A(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,Ce).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return v(this,Ur,xi).call(this).subtype}afterBuild(){c(this,Ce).includes("\0")&&T(this,Ce,this.buildFromStr(c(this,Ce),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Ce)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Ce)+r.text()}getGaps(e){return e===1?c(this,Ce).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new j(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),d=L(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
|
|
20
|
+
`})}}});var il,$n,Zs=v(()=>{"use strict";ot();D();H();Ye();il=ve(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),$n=class extends ce{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let r=F(this,{start:n},"void-ext",A.msg("nothing should be in <$1>",e));return r.fix={range:[n,r.endIndex],text:"",desc:"empty"},[r]}return super.lint(n,il(e))}}});var Nn={};de(Nn,{NestedToken:()=>pi});var sl,ol,qr,rr,pi,Ln=v(()=>{"use strict";D();ne();Rr();kn();H();O();ci();Ke();sl=new Set(["comment","include","arg","template","magic-word"]),ol=[!1,!0].map(a=>{let n=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),pi=class extends S{constructor(e,t,r,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=ct(e,i,s,t)),e&&(e=jr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,d,p,g)=>{let u=`\0${s.length+1}e\x7F`;return new He(l,d,p,g,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new J(d,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);y(this,qr);y(this,rr);T(this,qr,[...r]),T(this,rr,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new j(this,e),i=typeof c(this,rr)=="boolean"?ol[c(this,rr)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,qr).includes(l);if(sl.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).map(s=>{let o=L(s,r,"no-ignored",A.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};qr=new WeakMap,rr=new WeakMap});var eo,to,hi,al,He,ci=v(()=>{"use strict";D();ne();H();ln();O();Jn();hn();Is();ni();Ds();Ys();Js();Zs();eo=(a,n)=>{let e=new Set(a);return e.delete(n),[...e]};to=[Ht()];He=class extends(al=Dt){get type(){return"ext"}constructor(n,e,t,r,i=A.getConfig(),s=!1,o=[]){let l=n.toLowerCase(),d=new et(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p={...i,ext:eo(i.ext,l),excludes:[...i.excludes]},g;switch(p.inExt=!0,l){case"tab":p.ext=eo(p.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&p.excludes.push("heading"),g=new S(t,p,o);break;case"pre":g=new mn(t,p,o);break;case"dynamicpagelist":g=new Vt(s,t,p,o);break;case"inputbox":g=new vn(s,t,p,o);break;case"references":{let{NestedToken:u}=(Ln(),Z(Nn));p.excludes.push("heading"),g=new u(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:u}=(Ln(),Z(Nn));g=new u(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:u}=(Ln(),Z(Nn));g=new u(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":g=new Sn(t,p,o);break;case"imagemap":g=new In(t,p,o);break;default:g=new $n(t,p,o)}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(n,d,g,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new j(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(F(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(F(this,r,"var-anchor","variable anchor in a section header")),t}};hi=ge(al),He=pe(hi,0,"ExtToken",to,He),ue(hi,1,He)});var ro,mi,ll,xt,no=v(()=>{"use strict";D();dt();H();Ye();ro=[Ae(!1)];xt=class extends(ll=ce){constructor(e,t,r,i){super(e,r,i);te(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=F(this,{start:e},"unclosed-comment",A.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};mi=ge(ll),xt=pe(mi,0,"CommentToken",ro,xt),ue(mi,1,xt)});var oo={};de(oo,{parseCommentAndExt:()=>ct});var so,dl,fi,gl,io,ct,Rr=v(()=>{"use strict";ot();hs();Ke();fs();ci();no();so="<onlyinclude>",dl="</onlyinclude>",{length:fi}=so,gl=[!1,!0].map(a=>{let n=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return ve(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${n}(?:\s[^>]*)?/?>|</${n}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),io=a=>{let n=a.indexOf(so);return{i:n,j:a.indexOf(dl,n+fi)}},ct=(a,n,e,t)=>{if(t){let{i:r,j:i}=io(a);if(r!==-1&&i!==-1){let s="",o=l=>{new J(l,n,e),s+=`\0${e.length-1}n\x7F`};for(;r!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new an(a.slice(r+fi,i),n,e),r>0&&o(a.slice(0,r)),s+=l,a=a.slice(i+fi+1),{i:r,j:i}=io(a)}return a&&o(a),s}}return a.replace(gl[t?1:0](n.ext),(r,i,s,o,l,d,p,g,u)=>{let h=e.length,f="n";if(i)f="e",new He(i,s,o,l,n,d,e);else if(r.startsWith("<!--")){f="c";let m=r.endsWith("-->");new xt(r.slice(4,m?-3:void 0),m,n,e)}else d?new pt(d,p,g,u,n,e):new J(r,n,e);return`\0${h}${f}\x7F`})}});var ul,pl,cl,ao,nr,je,nt,ze,bi,hl,Tt,lo=v(()=>{"use strict";D();Te();ne();ln();O();ul=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),pl=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),cl=new Set(["strike","big","center","font","tt"]);ao=[Ht()];Tt=class extends(hl=S){constructor(e,t,r,i,s,o){super(void 0,s,o);y(this,nr);y(this,je);y(this,nt);y(this,ze);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,nr,r),T(this,je,i),T(this,nt,e)}get type(){return"html"}get selfClosing(){return c(this,je)}get closing(){return c(this,nr)}toString(e){return`<${this.closing?"/":""}${c(this,nt)}${super.toString(e)}${c(this,je)?"/":""}>`}text(){let{closing:e}=this,t=c(this,nt)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,je)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,nt).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new j(this,e);if(i==="h1"&&!o){let m=F(this,d,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(m)}if(this.closest("table-attrs")){let m=F(this,d,"parsing-order","HTML tag in table attributes");m.fix={desc:"remove",range:[e,m.endIndex],text:""},r.push(m)}cl.has(i)&&r.push(F(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&r.push(F(this,d,"bold-header","bold in section header","warning"));let{html:[,p,g]}=this.getAttribute("config"),u=g.includes(i),h=p.includes(i);if(o&&(l||u)||l&&(!u&&!h)){let m=F(this,d,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),b={desc:"open",range:[e+1,e+2],text:""},x={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[b,x]:o?m.fix=u?b:x:m.suggestions=[x,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],r.push(m)}else if(!this.findMatchingTag()){let m=F(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let b=this.closest("magic-word");b&&ul.has(b.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let b=s==null?void 0:s.childNodes;pl.has(i)&&(b!=null&&b.slice(0,b.indexOf(this)).some(({type:x,name:C})=>x==="html"&&C===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}r.push(m)}return r}findMatchingTag(){return Ee(c(this,ze),()=>{let{name:e,parentNode:t,closing:r,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:p}=t,g=p.indexOf(this),u=r?p.slice(0,g).reverse():p.slice(g+1),h=[this],{rev:f}=oe;for(let m of u)if(!(!m.is("html")||m.name!==e||d&&c(m,je)))if(c(m,nr)===r)h.push(m);else{let b=h.pop();if(b===this)return m;T(b,ze,[f,m]),T(m,ze,[f,b])}for(let m of h)T(m,ze,[f,void 0])},e=>{T(this,ze,e),e[1]&&e[1]!==this&&T(e[1],ze,[oe.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,nt)}`,post:`${c(this,je)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,je)}),r}};bi=ge(hl),nr=new WeakMap,je=new WeakMap,nt=new WeakMap,ze=new WeakMap,Tt=pe(bi,0,"HtmlToken",ao,Tt),ue(bi,1,Tt)});var go={};de(go,{parseHtml:()=>fl});var ml,fl,uo=v(()=>{"use strict";hn();lo();ml=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,fl=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=ml.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!n.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",h,f]=l,{length:m}=e,b=new et(u,"html-attrs",p,n,e),x=b.getAttr("itemprop");if(p==="meta"&&(x===void 0||b.getAttr("content")===void 0)||p==="link"&&(x===void 0||b.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new Tt(d,b,g==="/",h==="/>",n,e)}return i}});var ir,xi=v(()=>{"use strict";ln();H();O();qt();hn();ir=class extends Ht(1)(S){constructor(n,e,t,r,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new Se(e,"table-syntax",i,s),new et(r,"table-attrs",t,i,s))}}});var Ce,Or,Ur,Ti,sr,yi=v(()=>{"use strict";D();ne();H();O();xi();sr=class extends ir{constructor(e,t,r=A.getConfig(),i=[]){var d;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);y(this,Ur);y(this,Ce,"");y(this,Or);s&&([Jr(this,Ce)._]=s);let l=new S(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,Ce).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return w(this,Ur,Ti).call(this).subtype}afterBuild(){c(this,Ce).includes("\0")&&T(this,Ce,this.buildFromStr(c(this,Ce),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,Ce)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,Ce)+r.text()}getGaps(e){return e===1?c(this,Ce).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new j(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),d=L(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
|
|
20
21
|
${p}`),desc:"newline"}}else d.suggestions=[{desc:"escape",range:[d.startIndex,d.endIndex],text:o.replace(/\|/gu,"|")}];r.push(d)}}return r}isIndependent(){return this.firstChild.text().startsWith(`
|
|
21
|
-
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Ce)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(r,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),r}};Ce=new WeakMap,Or=new WeakMap,Ur=new WeakSet,
|
|
22
|
-
|}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];
|
|
22
|
+
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Ce)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(r,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),r}};Ce=new WeakMap,Or=new WeakMap,Ur=new WeakSet,Ti=function(){return Ee(c(this,Or),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...w(o=i,Ur,Ti).call(o)}},e=>{T(this,Or,e)})}});var bl,xl,ki,or,vi=v(()=>{"use strict";D();xi();yi();bl=new Set(["tr","td","th","caption"]),xl=new Set(["Template:!!","Template:!-"]),ki=a=>{let n=a.childNodes.find(e=>e.text().trim());if(!n||n.type==="text"&&n.data.trim().startsWith("!")||n.type==="magic-word"&&n.name==="!"||n.type==="template"&&xl.has(n.name)||n.is("html")&&bl.has(n.name))return!1;if(n.is("arg"))return n.length>1&&ki(n.childNodes[1]);if(n.is("magic-word"))try{let e=n.getPossibleValues().map(ki);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch(e){}return n.type==="template"||n.type==="magic-word"&&n.name==="invoke"?"warning":"error"},or=class extends ir{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:o})=>o==="table-inter");if(!r)return t;let i=ki(r);if(!i)return t;let s=L(r,{start:n},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof sr&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var Tl,yl,wi,En,po=v(()=>{"use strict";D();Te();ne();H();vi();qt();Tl=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),yl=({type:a})=>a==="tr"||a==="table-syntax",wi=class extends Array{},En=class extends or{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new j(this,n);this.closed||t.push(L(this.firstChild,r,"unclosed-table",A.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,d=0;for(;d<s;d++){let p=i[d],g=p.length;if(g<o)break;g<l&&(l=g);let u=p.indexOf(p[g-1])+1;if(u>l)break;u>o&&(o=u)}if(d<s){let p=L(this.getNthRow(d),r,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(n=`
|
|
23
|
+
|}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=[n];oe.run(()=>{let s=new Se(void 0,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=wi.from(Tl(t,()=>[]));for(let i=0;i<r.length;i++){let s=r[i],o=0,l=0,d;for(let p of e[i].childNodes.slice(2))if(p.type==="td"){if(p.isIndependent()&&(d=p.subtype!=="caption"),d){let g={row:i,column:o},{rowspan:u,colspan:h}=p;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+u,t);f++)for(let m=l;m<l+h;m++)r[f][m]=g;l+=h}}else if(yl(p))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(n--,n<0))return i}}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var Rn,co=v(()=>{"use strict";vi();Rn=class extends or{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var ar,Ai=v(()=>{"use strict";Ye();ar=class extends ce{get indent(){return this.innerText.split(":").length-1}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:r}=this;return r&&(t.indent=r),t}}});var lr,Si=v(()=>{"use strict";Ai();lr=class extends ar{get type(){return"dd"}}});var mo={};de(mo,{parseTable:()=>vl});var kl,ho,vl,fo=v(()=>{"use strict";O();po();co();yi();Si();kl=a=>a.lastChild.constructor!==S,ho=(a,n)=>a.type==="td"?n.pop():a,vl=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
|
|
23
24
|
`),o=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
|
|
24
|
-
${s.shift()}`,l,d=(p,g)=>{if(!g){o+=p;return}let{lastChild:u}=g;if(
|
|
25
|
-
${g}${N&&`\0${r.length-1}d\x7F`}${
|
|
25
|
+
${s.shift()}`,l,d=(p,g)=>{if(!g){o+=p;return}let{lastChild:u}=g;if(kl(g)){let h=new S(p,t,r);h.type="table-inter",h.setAttribute("stage",3),g.insertAt(h)}else u.setText(u.toString()+p)};for(let p of s){l=i.pop();let[g]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(p),u=p.slice(g.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(u);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,N,k,I,P]=h;N&&new lr(N,t,r),d(`
|
|
26
|
+
${g}${N&&`\0${r.length-1}d\x7F`}${k}\0${r.length}b\x7F`,l),i.push(...l?[l]:[],new En(I,P,t,r));continue}else if(!l){o+=`
|
|
26
27
|
${p}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(u);if(!f){d(`
|
|
27
|
-
${p}`,l),i.push(l);continue}let[,m,b,x,
|
|
28
|
-
${g}${m}`,!0),d(
|
|
29
|
-
${g}${b}`,
|
|
30
|
-
${g}${x}`,U=M=>{let _=new sr(E,S.slice(I,C==null?void 0:C.index),t,r);return M.insertAt(_),_};for(;C;)U(l),{lastIndex:I}=N,[E]=C,C=N.exec(S);i.push(l,U(l))}}return o.slice(1)}});var Pn,ho=k(()=>{"use strict";Ke();Pn=class extends ce{get type(){return"hr"}}});var mo,Ai,yl,kt,fo=k(()=>{"use strict";gt();Ke();mo=[Ae()];kt=class extends(yl=ce){get type(){return"double-underscore"}constructor(n,e,t,r){var l,d;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ai=de(yl),kt=ue(Ai,0,"DoubleUnderscoreToken",mo,kt),ge(Ai,1,kt)});var bo={};le(bo,{parseHrAndDoubleUnderscore:()=>kl});var kl,xo=k(()=>{"use strict";ho();fo();ii();kl=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,d,p;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(p=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,u,h)=>(new Pn(h,t,r),`${u}\0${r.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var b;let h=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new kt(u,h,t,r),`\0${r.length-1}${m&&((b=o==null?void 0:o[f])!=null?b:f)==="toc"?"u":"n"}\x7F`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,u,h,f,m)=>{let b=`${u}\0${r.length}h\x7F`;return new Qt(h.length,[f,m],t,r),b}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Fn,To=k(()=>{"use strict";z();ie();W();Ke();Fn=class extends ce{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:n,innerText:e}=this;return(n==null?void 0:n.type)==="image-parameter"&&n.name!=="caption"?"":e}lint(n=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:r}=this,i=w.msg('lonely "$1"',"'"),s=[],o=new j(this,n),l=(d,p,g)=>[{desc:"escape",range:[d,p],text:"'".repeat(g)},{desc:"remove",range:[d,p],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let d=F(this,o,"lonely-apos",i),{startIndex:p,startLine:g,startCol:u}=d,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),f=n-h;s.push({...d,startIndex:f,endIndex:p,endLine:g,startCol:u-h,endCol:u,suggestions:l(f,p,h)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let d=F(this,o,"lonely-apos",i),{endIndex:p,endLine:g,endCol:u}=d,[{length:h}]=/^'+/u.exec(t.data),f=p+h;s.push({...d,startIndex:p,endIndex:f,startLine:g,startCol:u,endCol:u+h,suggestions:l(p,f,h)})}if(r&&this.closest("heading-title")){let d=F(this,o,"bold-header","bold in section header","warning");d.suggestions=[{desc:"remove",range:[n,n+3],text:""}],s.push(d)}return s}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var yo={};le(yo,{parseQuotes:()=>Si});var Si,Ci=k(()=>{"use strict";To();Si=(a,n,e,t)=>{var g;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,d,p;for(let u=1;u<i;u+=2){let h=r[u].length;switch(h){case 2:o++;break;case 4:r[u-1]+="'",r[u]="'''";case 3:if(s++,l!==void 0)break;r[u-1].endsWith(" ")?d===void 0&&p===void 0&&(p=u):r[u-1].slice(-2,-1)===" "?l=u:d!=null||(d=u);break;default:r[u-1]+="'".repeat(h-5),r[u]="'''''",o++,s++}}if(o%2===1&&s%2===1){let u=(g=l!=null?l:d)!=null?g:p;u!==void 0&&(r[u]="''",r[u-1]+="'")}for(let u=1;u<i;u+=2)new Fn(r[u],n,e),r[u]=`\0${e.length-1}q\x7F`;return r.join("")}});var ko={};le(ko,{parseExternalLinks:()=>Ii});var Ii,$i=k(()=>{"use strict";ne();gi();Cn();Ii=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${_e}|\0\d+m\x7F)${Be}(?=[[\]<>"\t${Ne}]|\0\d))([${Ne}]*(?![${Ne}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:d}=e,p=/&[lg]t;/u.exec(s);return p&&(o="",l=s.slice(p.index)+o+l,s=s.slice(0,p.index)),t?(new Ue(s,"ext-link-url",n,e),`[\0${d}f\x7F${o}${l}]`):(new tr(s,o,l,n,e),`\0${d}w\x7F`)})}});var Mn,vo=k(()=>{"use strict";ne();Nr();Mn=class extends Fe{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&dt(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Ao={};le(Ao,{parseLinks:()=>wo});var vl,wo,So=k(()=>{"use strict";W();Ci();$i();di();oi();vo();vl=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,wo=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.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,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let d=!1,p,g,u,h,f=i[l],m=r.exec(f);if(m)[,p,g,u,h]=m,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let C=vl.exec(f);C&&(d=!0,[,p,g,u]=C)}if(p===void 0||n.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let b=p.trim().startsWith(":");if(b&&d){s+=`[[${f}`;continue}let{ns:x,valid:S}=w.normalizeTitle(p,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(S){if(d){if(x!==6){s+=`[[${f}`;continue}let C=!1;for(l++;l<i.length;l++){let I=i[l],E=I.split("]]");if(E.length>2){C=!0,u+=`[[${E[0]}]]${E[1]}`,h=E.slice(2).join("]]");break}else if(E.length===2)u+=`[[${E[0]}]]${E[1]}`;else{u+=`[[${I}`;break}}if(u=wo(u,n,e,t),!C){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=Si(u,n,e,t));let N=er;b||(x===6?(u&&(u=Ii(u,n,e,!0)),N=Jt):x===14&&(N=Mn)),u===void 0&&g&&(u=""),s+=`\0${e.length}l\x7F${h}`,new N(p,u,n,e,g)}return s}});var Lo={};le(Lo,{parseMagicLinks:()=>wl});var No,Co,Io,$o,wl,Eo=k(()=>{"use strict";ne();Cn();No=String.raw`[${Ne}\t]| |�*160;|�*a0;`,Co=`(?:${No})+`,Io=`(?:${No}|-)`,$o=String.raw`(?:RFC|PMID)${Co}\d+\b|ISBN${Co}(?:97[89]${Io}?)?(?:\d${Io}?){9}[\dx]\b`,wl=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${n.protocol})(${_e}${Be})|${$o})`,"giu")}catch(t){n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${_e}${Be})|${$o})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,p=d.exec(s);if(p){let g=1;p[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,p.index))&&(g=2),o=s.slice(p.index+g)+o,s=s.slice(0,p.index+g)}return o.length>=i.length?t:(new Ue(s,void 0,n,e),`${r}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Ue(s,"magic-link",n,e),`${r}\0${e.length-1}i\x7F`})}});var Ro,Po=k(()=>{"use strict";Ro=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var jn,Fo=k(()=>{"use strict";vi();jn=class extends ar{get type(){return"list"}}});var Mo={};le(Mo,{parseList:()=>Al});var Al,jo=k(()=>{"use strict";Po();Fo();wi();Al=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),d=Ro(l,n.lastPrefix),p=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=p[0].startsWith(";"),u=p.length-(g?0:1);if(d>1){let M=o.slice(0,d-1);g?p.unshift(M):p[0]=M+p[0]}n.lastPrefix=l;let h=s+p.map((M,_)=>`\0${t.length+_}d\x7F`).join("")+a.slice(i.length);for(let M of p)new jn(M,e,t);if(!u)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,b=m,x=b.exec(h),S=0,N=!1,C=!1,I=0,E=(M,_)=>(new lr(M,e,t),`${h.slice(0,_)}\0${t.length-1}d\x7F${h.slice(_+M.length)}`),U=M=>{M?S&&S--:S++};for(;x&&u;){let{0:M,index:_}=x;if(M==="-{"){if(!I){let{lastIndex:O}=b;b=/-\{|\}-/gu,b.lastIndex=O}I++}else if(M==="}-"){if(I--,!I){let{lastIndex:O}=b;b=m,b.lastIndex=O}}else if(M.endsWith("x\x7F")){let{name:O,closing:oe,selfClosing:R}=t[Number(M.slice(1,-2))];(!R||f.includes(O))&&U(oe)}else if(M.endsWith("q\x7F")){let{bold:O,italic:oe}=t[Number(M.slice(1,-2))];O&&(U(N),N=!N),oe&&(U(C),C=!C)}else if(S===0){if(M.length>=u)return E(M.slice(0,u),_);u-=M.length,b.lastIndex=_+4+String(t.length).length,h=E(M,_)}x=b.exec(h)}return h}});var _o,We,_n,Bo=k(()=>{"use strict";z();ie();q();Oe();_o=new Set(["A","T","R","D","-","H","N"]),_n=class extends A{constructor(e,t,r=[]){super(void 0,t,r,{});y(this,We);this.append(...e.map(i=>new Q(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){T(this,We,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,We).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,We).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,We).filter(g=>_o.has(g))),o=c(this,We).filter(g=>!g).length,l=c(this,We).length-i.size-o,d=super.lint(e,t);if(r.size===l||s.size===l)return d;let p=new j(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],h=u.text().trim();if(h&&!r.has(h)&&!i.has(h)&&(r.size>0||!s.has(h))){let f=L(u,p,"no-ignored","invalid conversion flag");r.size===0&&_o.has(h.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:h.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};We=new WeakMap});var dr,qo=k(()=>{"use strict";W();q();Oe();dr=class extends A{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=w.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new Q(o,"converter-rule-variant",t,r)),super.insertAt(new Q(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new Q(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new Q(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var Bn,Oo=k(()=>{"use strict";ne();q();Bo();qo();Bn=class extends A{get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new _n(n,t,r));let[i]=e,s=i.includes(":"),o=new dr(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!pe(e[1]).trim()?this.insertAt(new dr(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new dr(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${we(e,";")}}-`}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${qe(e,{sep:";"})}}-</span>`}}});var Uo={};le(Uo,{parseConverter:()=>Sl});var Sl,Ho=k(()=>{"use strict";Oo();Sl=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:d,index:p}=o;if(d==="}-"){let g=i.pop(),{length:u}=e,h=a.slice(g.index+2,p),f=h.indexOf("|"),[m,b]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],x=b.replace(/(&[#a-z\d]+);/giu,"$1"),S=x.split(n.regexConverter).map(N=>N.replace(/\x01/gu,";"));new Bn(m,S,n,e),a=`${a.slice(0,g.index)}\0${u}v\x7F${a.slice(p+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(u).length}else i.push(o),s=r,s.lastIndex=p+2;o=s.exec(a)}return a}});var zr={};le(zr,{Token:()=>A});var Hr,ve,V,Y,vt,gr,Dr,X,Do,zo,Wo,Go,Vo,Xo,Qo,Yo,Ko,Jo,Zo,ea,Ni,A,q=k(()=>{"use strict";ne();z();ye();W();ns();os();Ni=class Ni extends rn{constructor(e,t=w.getConfig(),r=[],i){super();y(this,X);y(this,Hr,"plain");y(this,ve,0);y(this,V);y(this,Y);y(this,vt);y(this,gr,!1);y(this,Dr);typeof e=="string"&&this.insertAt(e),T(this,V,t),T(this,Y,r),r.push(this)}get type(){return c(this,Hr)}set type(e){T(this,Hr,e)}parseOnce(e=c(this,ve),t=!1,r){if(e<c(this,ve)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,ve)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,Y).pop();let i=v(this,X,Do).call(this);t&&(t=!i)}T(this,vt,t),v(this,X,zo).call(this,t);break;case 1:v(this,X,Wo).call(this);break;case 2:v(this,X,Go).call(this);break;case 3:v(this,X,Vo).call(this);break;case 4:v(this,X,Xo).call(this);break;case 5:v(this,X,Qo).call(this,r);break;case 6:v(this,X,Yo).call(this,r);break;case 7:v(this,X,Ko).call(this);break;case 8:v(this,X,Jo).call(this);break;case 9:v(this,X,Zo).call(this);break;case 10:v(this,X,ea).call(this)}if(this.type==="root")for(let i of c(this,Y))i==null||i.parseOnce(e,t,r);return Jr(this,ve)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Ir(i);if(isNaN(i.slice(-1)))return c(this,Y)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?we(r):r}build(){T(this,ve,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(Cr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,Y))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,Y))e==null||e.afterBuild();T(this,gr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,ve)<e;)this.parseOnce(c(this,ve),t,r);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Ni;case"config":return c(this,V);case"include":return(t=c(this,vt))!=null?t:!!c(this.getRootNode(),vt);case"accum":return c(this,Y);case"built":return c(this,gr);case"stage":return c(this,ve);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,ve)===0&&this.type==="root"&&c(this,Y).shift(),T(this,ve,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Ir(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return w.normalizeTitle(e,t,c(this,vt),c(this,V),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let u of this.querySelectorAll(o)){let h;if(u.type==="category")h=u.name;else{let f=u.getValue();f&&f!==!0&&(h=`#${f}`)}if(h){let f=s.get(h);f?f.add(u):s.set(h,new Set([u]))}}for(let[u,h]of s)if(h.size>1&&!u.startsWith("#mw-customcollapsible-")){let f=!u.startsWith("#"),m=`duplicated ${f?"category":"id"}`,b=f?"error":"warning";r.push(...[...h].map(x=>{let S=F(x,{start:x.getAbsoluteIndex()},"no-duplicate",m,b);return f&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,d=this.toString(),p=[],g=l.exec(d);for(;g;){let{1:u,index:h}=g,f=(i=g[2])==null?void 0:i.trim();p.push({line:this.posFromIndex(h).top+(u==="disable-line"?0:1),from:u==="disable"?l.lastIndex:void 0,to:u==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(m=>m.trim())):void 0}),g=l.exec(d)}r=r.filter(({rule:u,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:b,from:x,to:S,rules:N}of p){if(b>h+1)break;if(N&&!N.has(u))continue;if(b===h&&x===void 0&&S===void 0)return!1;x<=f&&x>m.pos?(m.pos=x,m.type="from"):S<=f&&S>m.pos&&(m.pos=S,m.type="to")}return m.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):Le(c(this,Dr),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,gr)&&T(this,Dr,r)})}};Hr=new WeakMap,ve=new WeakMap,V=new WeakMap,Y=new WeakMap,vt=new WeakMap,gr=new WeakMap,Dr=new WeakMap,X=new WeakSet,Do=function(){let{parseRedirect:e}=(ps(),ee(us)),t=this.firstChild.toString(),r=e(t,c(this,V),c(this,Y));return r&&this.setText(r),!!r},zo=function(e){let{parseCommentAndExt:t}=(Rr(),ee(no));this.setText(t(this.firstChild.toString(),c(this,V),c(this,Y),e))},Wo=function(){let{parseBraces:e}=(kn(),ee(Bs)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,V),c(this,Y));this.setText(this.type==="root"?r:r.slice(1))},Go=function(){var t;if((t=c(this,V).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(ao(),ee(oo));this.setText(e(this.firstChild.toString(),c(this,V),c(this,Y)))},Vo=function(){var t;if((t=c(this,V).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(co(),ee(po));this.setText(e(this,c(this,V),c(this,Y)))},Xo=function(){var t;if((t=c(this,V).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(xo(),ee(bo));this.setText(e(this,c(this,V),c(this,Y)))},Qo=function(e){let{parseLinks:t}=(So(),ee(Ao));this.setText(t(this.firstChild.toString(),c(this,V),c(this,Y),e))},Yo=function(e){var i;if((i=c(this,V).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(Ci(),ee(yo)),r=this.firstChild.toString().split(`
|
|
31
|
-
`);for(let
|
|
32
|
-
`))},
|
|
33
|
-
`),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,V),c(this,
|
|
34
|
-
`))},
|
|
28
|
+
${p}`,l),i.push(l);continue}let[,m,b,x,C]=f;if(m){for(;l.type!=="table";)l=i.pop();l.close(`
|
|
29
|
+
${g}${m}`,!0),d(C,i[i.length-1])}else if(b){l=ho(l,i),l.type==="tr"&&(l=i.pop());let N=new Rn(`
|
|
30
|
+
${g}${b}`,C,t,r);i.push(l,N),l.insertAt(N)}else{l=ho(l,i);let N=x==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,k=N.exec(C),I=0,P=`
|
|
31
|
+
${g}${x}`,z=E=>{let U=new sr(P,C.slice(I,k==null?void 0:k.index),t,r);return E.insertAt(U),U};for(;k;)z(l),{lastIndex:I}=N,[P]=k,k=N.exec(C);i.push(l,z(l))}}return o.slice(1)}});var Pn,bo=v(()=>{"use strict";Ye();Pn=class extends ce{get type(){return"hr"}}});var xo,Ci,wl,yt,To=v(()=>{"use strict";dt();Ye();xo=[Ae()];yt=class extends(wl=ce){get type(){return"double-underscore"}constructor(n,e,t,r){var l,d;super(n,t,r);let i=n.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[n])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ci=ge(wl),yt=pe(Ci,0,"DoubleUnderscoreToken",xo,yt),ue(Ci,1,yt)});var yo={};de(yo,{parseHrAndDoubleUnderscore:()=>Al});var Al,ko=v(()=>{"use strict";bo();To();ii();Al=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,d,p;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(p=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,u,h)=>(new Pn(h,t,r),`${u}\0${r.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var b;let h=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new yt(u,h,t,r),`\0${r.length-1}${m&&((b=o==null?void 0:o[f])!=null?b:f)==="toc"?"u":"n"}\x7F`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,u,h,f,m)=>{let b=`${u}\0${r.length}h\x7F`;return new Xt(h.length,[f,m],t,r),b}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Fn,vo=v(()=>{"use strict";D();ne();H();Ye();Fn=class extends ce{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:n,innerText:e}=this;return(n==null?void 0:n.type)==="image-parameter"&&n.name!=="caption"?"":e}lint(n=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:r}=this,i=A.msg('lonely "$1"',"'"),s=[],o=new j(this,n),l=(d,p,g)=>[{desc:"escape",range:[d,p],text:"'".repeat(g)},{desc:"remove",range:[d,p],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let d=F(this,o,"lonely-apos",i),{startIndex:p,startLine:g,startCol:u}=d,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),f=n-h;s.push({...d,startIndex:f,endIndex:p,endLine:g,startCol:u-h,endCol:u,suggestions:l(f,p,h)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let d=F(this,o,"lonely-apos",i),{endIndex:p,endLine:g,endCol:u}=d,[{length:h}]=/^'+/u.exec(t.data),f=p+h;s.push({...d,startIndex:p,endIndex:f,startLine:g,startCol:u,endCol:u+h,suggestions:l(p,f,h)})}if(r&&this.closest("heading-title")){let d=F(this,o,"bold-header","bold in section header","warning");d.suggestions=[{desc:"remove",range:[n,n+3],text:""}],s.push(d)}return s}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var wo={};de(wo,{parseQuotes:()=>Ii});var Ii,$i=v(()=>{"use strict";vo();Ii=(a,n,e,t)=>{var g;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,d,p;for(let u=1;u<i;u+=2){let h=r[u].length;switch(h){case 2:o++;break;case 4:r[u-1]+="'",r[u]="'''";case 3:if(s++,l!==void 0)break;r[u-1].endsWith(" ")?d===void 0&&p===void 0&&(p=u):r[u-1].slice(-2,-1)===" "?l=u:d!=null||(d=u);break;default:r[u-1]+="'".repeat(h-5),r[u]="'''''",o++,s++}}if(o%2===1&&s%2===1){let u=(g=l!=null?l:d)!=null?g:p;u!==void 0&&(r[u]="''",r[u-1]+="'")}for(let u=1;u<i;u+=2)new Fn(r[u],n,e),r[u]=`\0${e.length-1}q\x7F`;return r.join("")}});var Ao={};de(Ao,{parseExternalLinks:()=>Ni});var Ni,Li=v(()=>{"use strict";re();ui();Cn();Ni=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${_e}|\0\d+m\x7F)${Be}(?=[[\]<>"\t${Le}]|\0\d))([${Le}]*(?![${Le}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:d}=e,p=/&[lg]t;/u.exec(s);return p&&(o="",l=s.slice(p.index)+o+l,s=s.slice(0,p.index)),t?(new Ue(s,"ext-link-url",n,e),`[\0${d}f\x7F${o}${l}]`):(new tr(s,o,l,n,e),`\0${d}w\x7F`)})}});var Mn,So=v(()=>{"use strict";re();Nr();Mn=class extends Fe{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&<(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Io={};de(Io,{parseLinks:()=>Co});var Sl,Co,$o=v(()=>{"use strict";H();$i();Li();gi();ai();So();Sl=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Co=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.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,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let d=!1,p,g,u,h,f=i[l],m=r.exec(f);if(m)[,p,g,u,h]=m,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let k=Sl.exec(f);k&&(d=!0,[,p,g,u]=k)}if(p===void 0||n.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let b=p.trim().startsWith(":");if(b&&d){s+=`[[${f}`;continue}let{ns:x,valid:C}=A.normalizeTitle(p,0,!1,n,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(C){if(d){if(x!==6){s+=`[[${f}`;continue}let k=!1;for(l++;l<i.length;l++){let I=i[l],P=I.split("]]");if(P.length>2){k=!0,u+=`[[${P[0]}]]${P[1]}`,h=P.slice(2).join("]]");break}else if(P.length===2)u+=`[[${P[0]}]]${P[1]}`;else{u+=`[[${I}`;break}}if(u=Co(u,n,e,t),!k){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=Ii(u,n,e,t));let N=er;b||(x===6?(u&&(u=Ni(u,n,e,!0)),N=Jt):x===14&&(N=Mn)),u===void 0&&g&&(u=""),s+=`\0${e.length}l\x7F${h}`,new N(p,u,n,e,g)}return s}});var Po={};de(Po,{parseMagicLinks:()=>Cl});var Ro,No,Lo,Eo,Cl,Fo=v(()=>{"use strict";re();Cn();Ro=String.raw`[${Le}\t]| |�*160;|�*a0;`,No=`(?:${Ro})+`,Lo=`(?:${Ro}|-)`,Eo=String.raw`(?:RFC|PMID)${No}\d+\b|ISBN${No}(?:97[89]${Lo}?)?(?:\d${Lo}?){9}[\dx]\b`,Cl=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${n.protocol})(${_e}${Be})|${Eo})`,"giu")}catch(t){n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${_e}${Be})|${Eo})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,p=d.exec(s);if(p){let g=1;p[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,p.index))&&(g=2),o=s.slice(p.index+g)+o,s=s.slice(0,p.index+g)}return o.length>=i.length?t:(new Ue(s,void 0,n,e),`${r}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Ue(s,"magic-link",n,e),`${r}\0${e.length-1}i\x7F`})}});var Mo,jo=v(()=>{"use strict";Mo=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var jn,_o=v(()=>{"use strict";Ai();jn=class extends ar{get type(){return"list"}}});var Bo={};de(Bo,{parseList:()=>Il});var Il,qo=v(()=>{"use strict";jo();_o();Si();Il=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),d=Mo(l,n.lastPrefix),p=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=p[0].startsWith(";"),u=p.length-(g?0:1);if(d>1){let E=o.slice(0,d-1);g?p.unshift(E):p[0]=E+p[0]}n.lastPrefix=l;let h=s+p.map((E,U)=>`\0${t.length+U}d\x7F`).join("")+a.slice(i.length);for(let E of p)new jn(E,e,t);if(!u)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,b=m,x=b.exec(h),C=0,N=!1,k=!1,I=0,P=(E,U)=>(new lr(E,e,t),`${h.slice(0,U)}\0${t.length-1}d\x7F${h.slice(U+E.length)}`),z=E=>{E?C&&C--:C++};for(;x&&u;){let{0:E,index:U}=x;if(E==="-{"){if(!I){let{lastIndex:W}=b;b=/-\{|\}-/gu,b.lastIndex=W}I++}else if(E==="}-"){if(I--,!I){let{lastIndex:W}=b;b=m,b.lastIndex=W}}else if(E.endsWith("x\x7F")){let{name:W,closing:ie,selfClosing:R}=t[Number(E.slice(1,-2))];(!R||f.includes(W))&&z(ie)}else if(E.endsWith("q\x7F")){let{bold:W,italic:ie}=t[Number(E.slice(1,-2))];W&&(z(N),N=!N),ie&&(z(k),k=!k)}else if(C===0){if(E.length>=u)return P(E.slice(0,u),U);u-=E.length,b.lastIndex=U+4+String(t.length).length,h=P(E,U)}x=b.exec(h)}return h}});var Oo,We,_n,Uo=v(()=>{"use strict";D();ne();O();Oe();Oo=new Set(["A","T","R","D","-","H","N"]),_n=class extends S{constructor(e,t,r=[]){super(void 0,t,r,{});y(this,We);this.append(...e.map(i=>new X(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){T(this,We,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,We).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,We).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,We).filter(g=>Oo.has(g))),o=c(this,We).filter(g=>!g).length,l=c(this,We).length-i.size-o,d=super.lint(e,t);if(r.size===l||s.size===l)return d;let p=new j(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],h=u.text().trim();if(h&&!r.has(h)&&!i.has(h)&&(r.size>0||!s.has(h))){let f=L(u,p,"no-ignored","invalid conversion flag");r.size===0&&Oo.has(h.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:h.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};We=new WeakMap});var dr,Do=v(()=>{"use strict";H();O();Oe();dr=class extends S{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=A.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new X(o,"converter-rule-variant",t,r)),super.insertAt(new X(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new X(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new X(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var Bn,Ho=v(()=>{"use strict";re();O();Uo();Do();Bn=class extends S{get type(){return"converter"}constructor(n,e,t,r=[]){super(void 0,t,r),this.insertAt(new _n(n,t,r));let[i]=e,s=i.includes(":"),o=new dr(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!ae(e[1]).trim()?this.insertAt(new dr(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new dr(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${we(e,";")}}-`}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${qe(e,{sep:";"})}}-</span>`}}});var zo={};de(zo,{parseConverter:()=>$l});var $l,Wo=v(()=>{"use strict";Ho();$l=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:d,index:p}=o;if(d==="}-"){let g=i.pop(),{length:u}=e,h=a.slice(g.index+2,p),f=h.indexOf("|"),[m,b]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],x=b.replace(/(&[#a-z\d]+);/giu,"$1"),C=x.split(n.regexConverter).map(N=>N.replace(/\x01/gu,";"));new Bn(m,C,n,e),a=`${a.slice(0,g.index)}\0${u}v\x7F${a.slice(p+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(u).length}else i.push(o),s=r,s.lastIndex=p+2;o=s.exec(a)}return a}});var zr={};de(zr,{Token:()=>S});var Dr,ke,V,K,kt,gr,Hr,Q,Go,Vo,Qo,Xo,Yo,Ko,Jo,Zo,ea,ta,ra,na,Ei,S,O=v(()=>{"use strict";re();D();Te();H();is();as();Ei=class Ei extends rn{constructor(e,t=A.getConfig(),r=[],i){super();y(this,Q);y(this,Dr,"plain");y(this,ke,0);y(this,V);y(this,K);y(this,kt);y(this,gr,!1);y(this,Hr);typeof e=="string"&&this.insertAt(e),T(this,V,t),T(this,K,r),r.push(this)}get type(){return c(this,Dr)}set type(e){T(this,Dr,e)}parseOnce(e=c(this,ke),t=!1,r){if(e<c(this,ke)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,ke)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,K).pop();let i=w(this,Q,Go).call(this);t&&(t=!i)}T(this,kt,t),w(this,Q,Vo).call(this,t);break;case 1:w(this,Q,Qo).call(this);break;case 2:w(this,Q,Xo).call(this);break;case 3:w(this,Q,Yo).call(this);break;case 4:w(this,Q,Ko).call(this);break;case 5:w(this,Q,Jo).call(this,r);break;case 6:w(this,Q,Zo).call(this,r);break;case 7:w(this,Q,ea).call(this);break;case 8:w(this,Q,ta).call(this);break;case 9:w(this,Q,ra).call(this);break;case 10:w(this,Q,na).call(this)}if(this.type==="root")for(let i of c(this,K))i==null||i.parseOnce(e,t,r);return Jr(this,ke)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Ir(i);if(isNaN(i.slice(-1)))return c(this,K)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?we(r):r}build(){T(this,ke,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(Cr(this,0,1,this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,K))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,K))e==null||e.afterBuild();T(this,gr,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,ke)<e;)this.parseOnce(c(this,ke),t,r);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Ei;case"config":return c(this,V);case"include":return(t=c(this,kt))!=null?t:!!c(this.getRootNode(),kt);case"accum":return c(this,K);case"built":return c(this,gr);case"stage":return c(this,ke);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,ke)===0&&this.type==="root"&&c(this,K).shift(),T(this,ke,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new Ir(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r){return A.normalizeTitle(e,t,c(this,kt),c(this,V),r)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let u of this.querySelectorAll(o)){let h;if(u.type==="category")h=u.name;else{let f=u.getValue();f&&f!==!0&&(h=`#${f}`)}if(h){let f=s.get(h);f?f.add(u):s.set(h,new Set([u]))}}for(let[u,h]of s)if(h.size>1&&!u.startsWith("#mw-customcollapsible-")){let f=!u.startsWith("#"),m=`duplicated ${f?"category":"id"}`,b=f?"error":"warning";r.push(...[...h].map(x=>{let C=F(x,{start:x.getAbsoluteIndex()},"no-duplicate",m,b);return f&&(C.suggestions=[{desc:"remove",range:[C.startIndex,C.endIndex],text:""}]),C}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,d=this.toString(),p=[],g=l.exec(d);for(;g;){let{1:u,index:h}=g,f=(i=g[2])==null?void 0:i.trim();p.push({line:this.posFromIndex(h).top+(u==="disable-line"?0:1),from:u==="disable"?l.lastIndex:void 0,to:u==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(m=>m.trim())):void 0}),g=l.exec(d)}r=r.filter(({rule:u,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:b,from:x,to:C,rules:N}of p){if(b>h+1)break;if(N&&!N.has(u))continue;if(b===h&&x===void 0&&C===void 0)return!1;x<=f&&x>m.pos?(m.pos=x,m.type="from"):C<=f&&C>m.pos&&(m.pos=C,m.type="to")}return m.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):Ee(c(this,Hr),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,gr)&&T(this,Hr,r)})}};Dr=new WeakMap,ke=new WeakMap,V=new WeakMap,K=new WeakMap,kt=new WeakMap,gr=new WeakMap,Hr=new WeakMap,Q=new WeakSet,Go=function(){let{parseRedirect:e}=(cs(),Z(ps)),t=this.firstChild.toString(),r=e(t,c(this,V),c(this,K));return r&&this.setText(r),!!r},Vo=function(e){let{parseCommentAndExt:t}=(Rr(),Z(oo));this.setText(t(this.firstChild.toString(),c(this,V),c(this,K),e))},Qo=function(){let{parseBraces:e}=(kn(),Z(Us)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,V),c(this,K));this.setText(this.type==="root"?r:r.slice(1))},Xo=function(){if(c(this,V).excludes.includes("html"))return;let{parseHtml:e}=(uo(),Z(go));this.setText(e(this.firstChild.toString(),c(this,V),c(this,K)))},Yo=function(){if(c(this,V).excludes.includes("table"))return;let{parseTable:e}=(fo(),Z(mo));this.setText(e(this,c(this,V),c(this,K)))},Ko=function(){if(c(this,V).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(ko(),Z(yo));this.setText(e(this,c(this,V),c(this,K)))},Jo=function(e){let{parseLinks:t}=($o(),Z(Io));this.setText(t(this.firstChild.toString(),c(this,V),c(this,K),e))},Zo=function(e){if(c(this,V).excludes.includes("quote"))return;let{parseQuotes:t}=($i(),Z(wo)),r=this.firstChild.toString().split(`
|
|
32
|
+
`);for(let i=0;i<r.length;i++)r[i]=t(r[i],c(this,V),c(this,K),e);this.setText(r.join(`
|
|
33
|
+
`))},ea=function(){if(c(this,V).excludes.includes("extLink"))return;let{parseExternalLinks:e}=(Li(),Z(Ao));this.setText(e(this.firstChild.toString(),c(this,V),c(this,K)))},ta=function(){if(c(this,V).excludes.includes("magicLink"))return;let{parseMagicLinks:e}=(Fo(),Z(Po));this.setText(e(this.firstChild.toString(),c(this,V),c(this,K)))},ra=function(){if(c(this,V).excludes.includes("list"))return;let{parseList:e}=(qo(),Z(Bo)),{firstChild:t,type:r,name:i}=this,s=t.toString().split(`
|
|
34
|
+
`),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,V),c(this,K));this.setText(s.join(`
|
|
35
|
+
`))},na=function(){if(c(this,V).variants.length>0){let{parseConverter:e}=(Wo(),Z(zo));this.setText(e(this.firstChild.toString(),c(this,V),c(this,K)))}};S=Ei});var oe,Yt,Cr,sn,Te=v(()=>{"use strict";oe={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(O(),Z(zr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},Yt=a=>n=>n.type===a,Cr=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i;r.length===e?(i=r,r=t):i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let d=t[l];d.setAttribute("parentNode",a),d.setAttribute("nextSibling",r[n+l+1]),d.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),r===t&&a.setAttribute("childNodes",r),i},sn=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var ia={};de(ia,{Title:()=>Ri});var Wr,Gr,Ie,ur,vt,Ri,sa=v(()=>{"use strict";re();Ri=class{constructor(n,e,t,{temporary:r,decode:i,selfLink:s}={}){y(this,Wr);y(this,Gr);y(this,Ie);y(this,ur);y(this,vt);te(this,"valid");te(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let d=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=Qe(n),this.encoded=d}catch(d){}if(n=lt(n).replace(/[_ ]+/gu," ").trim(),o)T(this,ur,0);else{let d=e;n.startsWith(":")&&(d=0,n=n.slice(1).trim());let p=n.split(":");if(p.length>1){let g=p[0].trim().toLowerCase(),u=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];u&&(d=u,n=p.slice(1).join(":").trim())}T(this,ur,d)}let l=n.indexOf("#");if(l!==-1){let d=n.slice(l).trim().slice(1);if(d.includes("%"))try{d=Qe(d)}catch(p){}T(this,vt,d.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,vt)!==void 0)&<(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,T(this,Gr,t.namespaces),T(this,Ie,t.articlePath||"/wiki/$1"),c(this,Ie).includes("$1")||T(this,Ie,c(this,Ie)+`${c(this,Ie).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,ur)}get fragment(){return c(this,vt)}get main(){return c(this,Wr)}set main(n){n=n.replace(/_/gu," ").trim(),T(this,Wr,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Gr)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){T(this,vt,n)}getUrl(n){{typeof n=="string"&&(T(this,Ie,n||"/wiki/$1"),c(this,Ie).includes("$1")||T(this,Ie,c(this,Ie)+`${c(this,Ie).endsWith("/")?"":"/"}$1`));let{title:e,fragment:t}=this;return e?c(this,Ie).replace("$1",encodeURIComponent(e)+(t?`#${encodeURIComponent(t)}`:"")):t===void 0?"":`#${encodeURIComponent(t)}`}}};Wr=new WeakMap,Gr=new WeakMap,Ie=new WeakMap,ur=new WeakMap,vt=new WeakMap});var oa=Gi((km,Nl)=>{Nl.exports={behaviorSwitches:[{aliases:["notoc"],description:"Hides the table of contents (TOC)."},{aliases:["forcetoc"],description:"Forces the table of contents to appear at its normal position (before the first header, overriding `__NOTOC__`)."},{aliases:["toc"],description:"Places a table of contents at the word's current position (overriding `__NOTOC__`). If this is used multiple times, the table of contents will appear at the first word's position."},{aliases:["noeditsection"],description:"Hides the section edit links beside headings. Use of this in a template will extend the effect to that template, the pages it's included on, and any other templates included on the same page."},{aliases:["newsectionlink"],description:'Adds a link beside the "Edit" tab for adding a new section on a non-talk page.'},{aliases:["nonewsectionlink"],description:'Removes the link beside the "Edit" tab on pages in talk namespaces.'},{aliases:["nogallery"],description:"Used on a category page, replaces thumbnails in the category view with normal links."},{aliases:["hiddencat"],description:"Used on a category page, hides the category from the lists of categories in its members and subcategories (there is an option in the user preferences to show them)."},{aliases:["expectunusedcategory"],description:"Used on a category page, removes the category from Special:UnusedCategories."},{aliases:["nocontentconvert","nocc"],description:"On wikis with language variants, don't perform any content language conversion in article display."},{aliases:["notitleconvert","notc"],description:"On wikis with language variants, don't perform language conversion on the title (all other content is converted)."},{aliases:["index"],description:"Tell search engines to index the page."},{aliases:["noindex"],description:"Tell search engines not to index the page (i.e. do not list in search engines' results)."},{aliases:["staticredirect"],description:`On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title".`},{aliases:["expectunusedtemplate"],description:"Used on a template page, removes the page from Special:UnusedTemplates."},{aliases:["noglobal"],description:"Disables the global user page. If present on the central user page, will prevent it from being displayed on remote wikis, and it also determines whether a link to a user page on remote wiki should be red or blue."},{aliases:["disambig"],description:"Identifies a disambiguation page."},{aliases:["archivedtalk"],description:'Hides "reply" links from discussions on archived pages.'},{aliases:["notalk"],description:"Makes a page in a talk namespace not be treated like a talk page."}],parserFunctions:[{aliases:["localurl"],signatures:[[{label:"page name"}],[{label:"page name"},{label:"query string"}]],description:"The relative path to the title."},{aliases:["localurle"],signatures:[[{label:"page name"}],[{label:"page name"},{label:"query string"}]],description:"The percent-encoded relative path to the title."},{aliases:["fullurl"],signatures:[[{label:"page name"}],[{label:"page name"},{label:"query string"}]],description:"A protocol-relative path to the title, which depends on the configuration setting for the local wiki (and so may or may not start with `http(s)://`). This will also resolve [interwiki](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Interwiki) prefixes. **Note:** Unbracketed (plain) protocol-relative links are not automagically linked."},{aliases:["fullurle"],signatures:[[{label:"page name"}],[{label:"page name"},{label:"query string"}]],description:"A percent-encoded protocol-relative path to the title, which depends on the configuration setting for the local wiki (and so may or may not start with `http(s)://`). This will also resolve [interwiki](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Interwiki) prefixes. **Note:** Unbracketed (plain) protocol-relative links are not automagically linked."},{aliases:["canonicalurl"],signatures:[[{label:"page name"}],[{label:"page name"},{label:"query string"}]],description:"The absolute path to the title, using the canonical URL. This will also resolve [interwiki](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Interwiki) prefixes."},{aliases:["canonicalurle"],signatures:[[{label:"page name"}],[{label:"page name"},{label:"query string"}]],description:"The percent-encoded absolute path to the title, using the canonical URL. This will also resolve [interwiki](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Interwiki) prefixes."},{aliases:["filepath"],signatures:[[{label:"file name"}],[{label:"file name"},{label:"nowiki",const:!0}],[{label:"file name"},{label:"thumbnail size"}]],description:"A protocol-relative path to the full size or thumbnail of a media file."},{aliases:["urlencode"],signatures:[[{label:"string"}],[{label:"string"},{label:"QUERY",const:!0}],[{label:"string"},{label:"WIKI",const:!0}],[{label:"string"},{label:"PATH",const:!0}]],description:`The input encoded for use in URLs.
|
|
35
36
|
|
|
36
37
|
Encoding:
|
|
37
38
|
|code|space|
|
|
@@ -97,8 +98,8 @@ It supports a second and a third parameter to replace these values.`},{aliases:[
|
|
|
97
98
|
|
|
98
99
|
See [help](https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:ParserFunctions#Escaping_pipe_characters_in_tables) for further explanation.`},{aliases:["="],description:`Used to include an equal sign.
|
|
99
100
|
|
|
100
|
-
See [help](https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:ParserFunctions#Raw_equal_signs) for further explanation.`},{aliases:["pagesize"],signatures:[[],[{label:"page name"}],[{label:"page name"},{label:"R",const:!0}]],description:"**[Expensive]** Returns the byte size of the specified page."}]}});var ca={};le(ca,{LanguageService:()=>Ri,isAttr:()=>Ei,tasks:()=>aa});var aa,Il,$l,Nl,Ll,la,El,Rl,Pl,Fl,Ei,Ml,ia,Yr,da,pr,he,sa,ga,Vr,Xr,cr,qn,oa,be,st,Ge,Ve,mr,Kr,fr,br,At,B,Qr,$e,Pi,ua,Fi,pa,Mi,hr,Ri,ha=k(()=>{"use strict";at();ti();z();ne();W();aa=new WeakMap,Il=new Set(["ref"]),$l=new Set(["ref","references"]),Nl=new Set(["name","extends","follow"]),Ll=new Set(["group"]),la=new Set(["arg-name","template-name","link-target","parameter-key"]),El=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...la]),Rl=new Set(["text","comment","noinclude","include"]),Pl=["ext","html","table"].map(a=>`${a}-attr#style`).join(),Fl=Re(a=>new RegExp(`^(?:${a}|//)`,"iu")),Ei=({type:a,parentNode:n,length:e,firstChild:t},r)=>a==="attr-value"&&e===1&&t.type==="text"&&(!r||n.name==="style"),Ml=a=>a.type==="html-attr"||a.type==="table-attr",ia=a=>a.childNodes.every(({type:n})=>Rl.has(n)),Yr=(a,n)=>{let{top:e,left:t}=a.posFromIndex(n);return{line:e,character:t}},da=(a,n,e)=>({start:Yr(a,n),end:Yr(a,e)}),pr=a=>{let{top:n,left:e,height:t,width:r}=a.getBoundingClientRect();return{start:{line:n,character:e},end:Rt(n,e,t,r)}},he=(a,n,e,{line:t,character:r},i,s)=>[...new Set(a)].map(o=>{var d;let l=(d=s==null?void 0:s(o))==null?void 0:d.description;return{label:o,kind:n,textEdit:{range:{start:{line:t,character:r-e.length},end:{line:t,character:r}},newText:o+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),sa=(a,n,{line:e,character:t})=>{let r=a.indexFromPos(e,t);return a.caretPositionFromIndex(r+Number(/\w/u.test(n.charAt(r))))},ga=(a,n,e)=>{let{type:t,parentNode:r={}}=a,{name:i,tag:s}=r;return t==="attr-value"&&n.has(s)&&e.has(i)?a.toString().trim():NaN},Vr=a=>ga(a,Il,Nl),Xr=a=>ga(a,$l,Ll),cr=(a,n)=>{let e=a==null?void 0:a.getAttr(n);return e!==!0&&e||!1},qn=a=>{let{type:n,name:e,parentNode:t}=a;switch(n){case"heading":return a.level;case"heading-title":return t.level;case"parameter-key":return`${t.parentNode.name}|${t.name}`;case"ext":case"html":case"image-parameter":return e;default:return t.name}},oa=(a,n,e=!1)=>({range:da(a,...n.range),newText:n.text,title:`${e?"Fix":"Suggestion"}: ${n.desc}`,fix:e}),Ri=class{constructor(n){y(this,B);y(this,be);y(this,st);y(this,Ge);y(this,Ve);y(this,mr);y(this,Kr);y(this,fr);y(this,br);y(this,At);re(this,"include",!0);re(this,"config");re(this,"data");aa.set(n,this),Object.defineProperties(this,{config:{enumerable:!1},data:{value:na(),enumerable:!1}})}destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(n,e,t=!0){let r=await v(this,B,$e).call(this,e);return r.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:o}=i;return s!=="attr-value"&&!ia(i)?[]:o.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:d}=l,p=Qi(d,t).filter(([,,,u])=>u);if(p.length===0)return[];let g=l.getAbsoluteIndex();return p.map(([u,h,f])=>{let m=n(u);return m.length===4&&{color:{red:m[0]/255,green:m[1]/255,blue:m[2]/255,alpha:m[3]},range:da(r,g+h,g+f)}}).filter(Boolean)})})}provideColorPresentations(n){let{color:{red:e,green:t,blue:r,alpha:i},range:s}=n,o=`#${Tr(e)}${Tr(t)}${Tr(r)}${i<1?Tr(i):""}`;return[{label:o,textEdit:{range:s,newText:o}}]}async provideCompletionItems(n,e){var I,E,U,M,_,O,oe;let{re:t,allTags:r,functions:i,switches:s,protocols:o,params:l,tags:d,ext:p}=v(this,B,pa).call(this),{line:g,character:u}=e,h=n.split(/\r?\n/u,g+1)[g],f=t.exec((I=h==null?void 0:h.slice(0,u))!=null?I:""),[,,m={},b={}]=this.config.doubleUnderscore;if((f==null?void 0:f[1])!==void 0){let R=f[1].startsWith("/");return he(r,"Class",f[1].slice(R?1:0),e,R&&!(h!=null&&h.slice(u).trim().startsWith(">"))?">":"")}else{if(f!=null&&f[4])return he(s,"Constant",f[4],e,"",R=>{if(this.data)return R=R.slice(2,-2),R in m?R=m[R]:R in b&&(R=b[R]),v(this,B,Mi).call(this,R.toLowerCase())});if((f==null?void 0:f[5])!==void 0)return he(o,"Reference",f[5],e)}let x=await v(this,B,$e).call(this,n),S;if(f!=null&&f[2]){S=x.elementFromPoint(f.index+f[2].length-1,g);let R=(E=f[3])!=null?E:"";if(f[2]==="{{{")return he(x.querySelectorAll("arg").filter(P=>P.name&&P!==S).map(({name:P})=>P),"Variable",R,e);let[D,H]=this.config.parserFunction,$=Array.isArray(H),G=h.charAt(u),Z=R.startsWith(":"),K=Z?R.slice(1).trimStart():R;if(f[2]==="[[")return he(x.querySelectorAll("link,file,category,redirect-target").filter(P=>P!==S).map(({name:P})=>P),"Folder",K,e);let me=i;return G===":"?me=i.filter(P=>!P.endsWith("\uFF1A")):G==="\uFF1A"&&(me=i.filter(P=>P.endsWith("\uFF1A")).map(P=>P.slice(0,-1))),[...he(me,"Function",R,e,"",P=>{if(this.data)P in D?P=D[P]:!$&&P in H&&(P=H[P]);else return;return v(this,B,hr).call(this,P.toLowerCase())}),...R.startsWith("#")?[]:he(x.querySelectorAll("template").filter(P=>P!==S).map(P=>{let{name:xe}=P;if(Z)return xe;let{ns:Xe}=P.getAttribute("title");return Xe===0?`:${xe}`:Xe===10?xe.slice(9):xe}),"Folder",K,e)]}let N,C;if((f==null?void 0:f[7])===void 0&&(S=x.elementFromPoint(u,g),{type:N,parentNode:C}=S),(f==null?void 0:f[6])!==void 0||N==="image-parameter"){let R=x.indexFromPos(g,u),D=(M=(U=f==null?void 0:f[6])==null?void 0:U.trimStart())!=null?M:c(this,be).slice(S.getAbsoluteIndex(),R).trimStart(),H=c(this,be)[R]==="=";return[...he(l,"Property",D,e).filter(({label:$})=>!H||!/[= ]$/u.test($)),...he(x.querySelectorAll("image-parameter#width").filter($=>$!==S).map($=>$.text()),"Unit",D,e)]}else if((f==null?void 0:f[7])!==void 0||N==="attr-key"){let R=(O=(_=f==null?void 0:f[7])==null?void 0:_.toLowerCase())!=null?O:C.tag,D=(oe=f==null?void 0:f[9])!=null?oe:S.toString().slice(0,u-x.posFromIndex(S.getAbsoluteIndex()).left);if(!d.has(R))return;let H=pn[R],$=cn[R],G=$&&he($,"Field",D,e);return p.includes(R)&&!H?G:[...G!=null?G:[],...R==="meta"||R==="link"?[]:he(un,"Property",D,e),...H?he(H,"Property",D,e):[],...he(["data-"],"Variable",D,e),...he(["xmlns:"],"Interface",D,e)]}else if(N==="parameter-key"||N==="parameter-value"&&C.anon){let R=C.parentNode,{type:D,name:H}=R;if(D==="magic-word"&&H!=="invoke")return;let $=c(this,be).slice(S.getAbsoluteIndex(),x.indexFromPos(g,u)).trimStart(),[G,Z]=D==="magic-word"?R.getModule():[];return $?he(x.querySelectorAll("parameter").filter(K=>{if(K===C||K.anon||K.parentNode.type!==D||K.parentNode.name!==H)return!1;if(D==="template")return!0;let[me,P]=K.parentNode.getModule();return me===G&&P===Z}).map(({name:K})=>K),"Variable",$,e,N==="parameter-value"?"=":""):void 0}else if(Ei(S)&&Ml(C)){let R=Zr.provideValues(C.tag,C.name);if(R.length===0)return;let D=c(this,be).slice(S.getAbsoluteIndex(),x.indexFromPos(g,u)).trimStart();return he(R.map(({name:H})=>H),"Value",D,e)}}async provideDiagnostics(n,e=!0){let t=await v(this,B,$e).call(this,n),r=t.lint();return[(e?r:r.filter(({severity:l})=>l==="error")).map(({startLine:l,startCol:d,endLine:p,endCol:g,severity:u,rule:h,message:f,fix:m,suggestions:b})=>({range:{start:{line:l,character:d},end:{line:p,character:g}},severity:u==="error"?1:2,source:"WikiLint",code:h,message:f,data:[...m?[oa(t,m,!0)]:[],...b?b.map(x=>oa(t,x)):[]]})),[],[]].flat(2)}async provideFoldingRanges(n){let e=await v(this,B,$e).call(this,n),{length:t}=e.getLines(),r=[],i=new Array(6),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let o of[...s].reverse())o.getRelativeIndex();for(let o of s){let{offsetHeight:l}=o;if(o.type==="heading-title"||l>2){let{top:d}=e.posFromIndex(o.getAbsoluteIndex());if(o.type==="heading-title"){let{level:p}=o.parentNode;for(let g=p-1;g<6;g++){let u=i[g];u!==void 0&&u<d-1&&r.push({startLine:u,endLine:d-1,kind:"region"}),i[g]=void 0}i[p-1]=d+l-1}else r.push({startLine:d,endLine:d+l-2,kind:"region"})}}for(let o of i)o!==void 0&&o<t-1&&r.push({startLine:o,endLine:t-1,kind:"region"});return r}async provideLinks(n){var s;(s=this.config)!=null||(this.config=w.getConfig());let{articlePath:e,protocol:t}=this.config,r=e==null?void 0:e.includes("//"),i=Fl(t);return(await v(this,B,$e).call(this,n)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value,image-parameter#link${r?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""}`).reverse().map(o=>{let l;o.is("magic-word")&&({name:l}=o,o=o.childNodes[1].lastChild);let{type:d,parentNode:p,firstChild:g,lastChild:u,childNodes:h,length:f}=o,{tag:m}=p;if(l!=null||(l=p.name),!(d!=="attr-value"||l==="src"&&["templatestyles","img"].includes(m)||l==="cite"&&["blockquote","del","ins","q"].includes(m))||!ia(o))return!1;let b=h.filter(x=>x.type==="text").map(({data:x})=>x).join("").trim();if(!b)return!1;try{if(o.is("magic-link")||o.is("ext-link-url")||o.is("free-ext-link"))b=o.getUrl(e);else if(d==="link-target"&&(p.is("link")||p.is("redirect-target")||p.is("category"))){if(b.startsWith("/"))return!1;b=p.link.getUrl(e)}else if(d==="template-name")b=p.getAttribute("title").getUrl(e);else if(["link-target","invoke-module","parameter-value"].includes(d)||d==="attr-value"&&l==="src"&&m==="templatestyles"||d==="image-parameter"&&!i.test(b)){if(!r||b.startsWith("/"))return!1;let x=0;switch(d){case"attr-value":x=10;break;case"invoke-module":x=828;break;case"parameter-value":x=l==="filepath"?6:274}let S=w.normalizeTitle(b,x,!1,this.config,{temporary:!0});if(!S.valid)return!1;b=S.getUrl()}if(typeof b=="string"&&b.startsWith("//")&&(b=`https:${b}`),b=new URL(b).href,d==="image-parameter"){let x=g.getBoundingClientRect(),{top:S,left:N,height:C,width:I}=f===1?x:u.getBoundingClientRect();return{range:{start:{line:x.top,character:x.left},end:Rt(S,N,C,I)},target:b}}return{range:pr(o),target:b}}catch(x){return!1}}).filter(Boolean)}async provideReferences(n,e){let t=await v(this,B,$e).call(this,n),{offsetNode:r,offset:i}=sa(t,c(this,be),e),s=r.type==="text"?r.parentNode:r,o=i===0&&(s.type==="ext-attr-dirty"||s.type==="html-attr-dirty")?s.parentNode.parentNode:s,{type:l}=o,d=Vr(o),p=Xr(o);if(!d&&!p&&!El.has(l))return;let g=qn(o),u=t.querySelectorAll(l==="heading-title"?"heading":l).filter(h=>l==="attr-value"?Vr(h)===d||Xr(h)===p:qn(h)===g).reverse().map(h=>({range:pr(h.type==="parameter-key"?h.parentNode:h)}));return u.length===0?void 0:u}async provideDefinition(n,e){let t=await v(this,B,$e).call(this,n),r=t.elementFromPoint(e.character,e.line),i=r.is("ext")&&r.name==="ref"?r:r.closest("ext#ref"),s=cr(i,"name");if(!s)return;let o=cr(i,"group"),l=t.querySelectorAll("ext#ref").filter(d=>d.innerText&&cr(d,"name")===s&&cr(d,"group")===o).reverse().map(({lastChild:d})=>({range:pr(d)}));return l.length===0?void 0:l}async resolveRenameLocation(n,e){let t=await v(this,B,$e).call(this,n),r=t.elementFromPoint(e.character,e.line),{type:i}=r,s=Vr(r),o=Xr(r);return!s&&!o&&(!la.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(r.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(r.parentNode.type))?void 0:pr(r)}async provideRenameEdits(n,e,t){let r=await v(this,B,$e).call(this,n),i=r.elementFromPoint(e.character,e.line),{type:s}=i,o=Vr(i),l=o&&cr(i.parentNode.parentNode,"group"),d=Xr(i),p=qn(i),g=r.querySelectorAll(s).filter(u=>{let{type:h}=u.parentNode;return s==="link-target"&&h!=="link"&&h!=="redirect-target"?!1:s==="attr-value"?Xr(u)===d||Vr(u)===o&&cr(u.parentNode.parentNode,"group")===l:qn(u)===p});return g.length===0?void 0:{changes:{"":g.reverse().map(u=>({range:pr(u),newText:t}))}}}async provideHover(n,e){if(!this.data)return;let t=await v(this,B,$e).call(this,n),{offsetNode:r,offset:i}=sa(t,c(this,be),e);r.type==="text"&&(i+=r.getRelativeIndex(),r=r.parentNode);let{type:s,parentNode:o,length:l,name:d}=r,p,g,u,h;if(r.is("double-underscore")&&i>0)p=v(this,B,Mi).call(this,r.name);else if(s==="magic-word-name")p=v(this,B,hr).call(this,o.name),g=r.toString(!0).trim(),u=o.getAttribute("colon");else if(r.is("magic-word")&&!r.modifier&&l===1&&(i>0||t.posFromIndex(r.getAbsoluteIndex()).left===e.character))p=v(this,B,hr).call(this,d),g=r.firstChild.toString(!0).trim(),u=r.getAttribute("colon");else if((r.is("magic-word")||r.is("template"))&&r.modifier&&i>=2&&r.getRelativeIndex(0)>i&&(g=r.modifier.trim().slice(0,-1),p=v(this,B,hr).call(this,g.toLowerCase()),u=":",p)){let f=r.getAbsoluteIndex();h={start:Yr(t,f+2),end:Yr(t,f+r.modifier.trimEnd().length+1)}}return p&&{contents:{kind:"markdown",value:(p.signatures?`${p.signatures.map(f=>`- **{{ ${g}${f.length===0?"**":`${u}** `}${f.map(({label:m,const:b})=>b?m:`*${m}*`).join(" **|** ")} **}}**`).join(`
|
|
101
|
+
See [help](https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:ParserFunctions#Raw_equal_signs) for further explanation.`},{aliases:["pagesize"],signatures:[[],[{label:"page name"}],[{label:"page name"},{label:"R",const:!0}]],description:"**[Expensive]** Returns the byte size of the specified page."}]}});var fa={};de(fa,{LanguageService:()=>Fi,isAttr:()=>Pi,tasks:()=>ga});var ga,Ll,El,Rl,Pl,ua,Fl,Ml,jl,_l,Pi,Bl,aa,Yr,pa,pr,he,la,ca,Vr,Qr,cr,qn,da,be,it,Ge,Ve,mr,Kr,fr,br,wt,B,Xr,$e,Mi,ha,ji,ma,_i,hr,Fi,ba=v(()=>{"use strict";ot();ti();D();re();H();ga=new WeakMap,Ll=new Set(["ref"]),El=new Set(["ref","references"]),Rl=new Set(["name","extends","follow"]),Pl=new Set(["group"]),ua=new Set(["arg-name","template-name","link-target","parameter-key"]),Fl=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...ua]),Ml=new Set(["text","comment","noinclude","include"]),jl=["ext","html","table"].map(a=>`${a}-attr#style`).join(),_l=ve(a=>new RegExp(`^(?:${a}|//)`,"iu")),Pi=({type:a,parentNode:n,length:e,firstChild:t},r)=>a==="attr-value"&&e===1&&t.type==="text"&&(!r||n.name==="style"),Bl=a=>a.type==="html-attr"||a.type==="table-attr",aa=a=>a.childNodes.every(({type:n})=>Ml.has(n)),Yr=(a,n)=>{let{top:e,left:t}=a.posFromIndex(n);return{line:e,character:t}},pa=(a,n,e)=>({start:Yr(a,n),end:Yr(a,e)}),pr=a=>{let{top:n,left:e,height:t,width:r}=a.getBoundingClientRect();return{start:{line:n,character:e},end:Rt(n,e,t,r)}},he=(a,n,e,{line:t,character:r},i,s)=>[...new Set(a)].map(o=>{var d;let l=(d=s==null?void 0:s(o))==null?void 0:d.description;return{label:o,kind:n,textEdit:{range:{start:{line:t,character:r-e.length},end:{line:t,character:r}},newText:o+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),la=(a,n,{line:e,character:t})=>{let r=a.indexFromPos(e,t);return a.caretPositionFromIndex(r+Number(/\w/u.test(n.charAt(r))))},ca=(a,n,e)=>{let{type:t,parentNode:r={}}=a,{name:i,tag:s}=r;return t==="attr-value"&&n.has(s)&&e.has(i)?a.toString().trim():NaN},Vr=a=>ca(a,Ll,Rl),Qr=a=>ca(a,El,Pl),cr=(a,n)=>{let e=a==null?void 0:a.getAttr(n);return e!==!0&&e||!1},qn=a=>{let{type:n,name:e,parentNode:t}=a;switch(n){case"heading":return a.level;case"heading-title":return t.level;case"parameter-key":return`${t.parentNode.name}|${t.name}`;case"ext":case"html":case"image-parameter":return e;default:return t.name}},da=(a,n,e=!1)=>({range:pa(a,...n.range),newText:n.text,title:`${e?"Fix":"Suggestion"}: ${n.desc}`,fix:e}),Fi=class{constructor(n){y(this,B);y(this,be);y(this,it);y(this,Ge);y(this,Ve);y(this,mr);y(this,Kr);y(this,fr);y(this,br);y(this,wt);te(this,"include",!0);te(this,"config");te(this,"data");ga.set(n,this),Object.defineProperties(this,{config:{enumerable:!1},data:{value:oa(),enumerable:!1}})}destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(n,e,t=!0){let r=await w(this,B,$e).call(this,e);return r.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:o}=i;return s!=="attr-value"&&!aa(i)?[]:o.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:d}=l,p=Ki(d,t).filter(([,,,u])=>u);if(p.length===0)return[];let g=l.getAbsoluteIndex();return p.map(([u,h,f])=>{let m=n(u);return m.length===4&&{color:{red:m[0]/255,green:m[1]/255,blue:m[2]/255,alpha:m[3]},range:pa(r,g+h,g+f)}}).filter(Boolean)})})}provideColorPresentations(n){let{color:{red:e,green:t,blue:r,alpha:i},range:s}=n,o=`#${Tr(e)}${Tr(t)}${Tr(r)}${i<1?Tr(i):""}`;return[{label:o,textEdit:{range:s,newText:o}}]}async provideCompletionItems(n,e){var I,P,z,E,U,W,ie;let{re:t,allTags:r,functions:i,switches:s,protocols:o,params:l,tags:d,ext:p}=w(this,B,ma).call(this),{line:g,character:u}=e,h=n.split(/\r?\n/u,g+1)[g],f=t.exec((I=h==null?void 0:h.slice(0,u))!=null?I:""),[,,m={},b={}]=this.config.doubleUnderscore;if((f==null?void 0:f[1])!==void 0){let R=f[1].startsWith("/");return he(r,"Class",f[1].slice(R?1:0),e,R&&!(h!=null&&h.slice(u).trim().startsWith(">"))?">":"")}else{if(f!=null&&f[4])return he(s,"Constant",f[4],e,"",R=>{if(this.data)return R=R.slice(2,-2),R in m?R=m[R]:R in b&&(R=b[R]),w(this,B,_i).call(this,R.toLowerCase())});if((f==null?void 0:f[5])!==void 0)return he(o,"Reference",f[5],e)}let x=await w(this,B,$e).call(this,n),C;if(f!=null&&f[2]){C=x.elementFromPoint(f.index+f[2].length-1,g);let R=(P=f[3])!=null?P:"";if(f[2]==="{{{")return he(x.querySelectorAll("arg").filter(M=>M.name&&M!==C).map(({name:M})=>M),"Variable",R,e);let[_,q]=this.config.parserFunction,$=Array.isArray(q),G=h.charAt(u),me=R.startsWith(":"),Y=me?R.slice(1).trimStart():R;if(f[2]==="[[")return he(x.querySelectorAll("link,file,category,redirect-target").filter(M=>M!==C).map(({name:M})=>M),"Folder",Y,e);let se=i;return G===":"?se=i.filter(M=>!M.endsWith("\uFF1A")):G==="\uFF1A"&&(se=i.filter(M=>M.endsWith("\uFF1A")).map(M=>M.slice(0,-1))),[...he(se,"Function",R,e,"",M=>{if(this.data)M in _?M=_[M]:!$&&M in q&&(M=q[M]);else return;return w(this,B,hr).call(this,M.toLowerCase())}),...R.startsWith("#")?[]:he(x.querySelectorAll("template").filter(M=>M!==C).map(M=>{let{name:Ne}=M;if(me)return Ne;let{ns:St}=M.getAttribute("title");return St===0?`:${Ne}`:St===10?Ne.slice(9):Ne}),"Folder",Y,e)]}let N,k;if((f==null?void 0:f[7])===void 0&&(C=x.elementFromPoint(u,g),{type:N,parentNode:k}=C),(f==null?void 0:f[6])!==void 0||N==="image-parameter"){let R=x.indexFromPos(g,u),_=(E=(z=f==null?void 0:f[6])==null?void 0:z.trimStart())!=null?E:c(this,be).slice(C.getAbsoluteIndex(),R).trimStart(),q=c(this,be)[R]==="=";return[...he(l,"Property",_,e).filter(({label:$})=>!q||!/[= ]$/u.test($)),...he(x.querySelectorAll("image-parameter#width").filter($=>$!==C).map($=>$.text()),"Unit",_,e)]}else if((f==null?void 0:f[7])!==void 0||N==="attr-key"){let R=(W=(U=f==null?void 0:f[7])==null?void 0:U.toLowerCase())!=null?W:k.tag,_=(ie=f==null?void 0:f[9])!=null?ie:C.toString().slice(0,u-x.posFromIndex(C.getAbsoluteIndex()).left);if(!d.has(R))return;let q=pn[R],$=cn[R],G=$&&he($,"Field",_,e);return p.includes(R)&&!q?G:[...G!=null?G:[],...R==="meta"||R==="link"?[]:he(un,"Property",_,e),...q?he(q,"Property",_,e):[],...he(["data-"],"Variable",_,e),...he(["xmlns:"],"Interface",_,e)]}else if(N==="parameter-key"||N==="parameter-value"&&k.anon){let R=k.parentNode,{type:_,name:q}=R;if(_==="magic-word"&&q!=="invoke")return;let $=c(this,be).slice(C.getAbsoluteIndex(),x.indexFromPos(g,u)).trimStart(),[G,me]=_==="magic-word"?R.getModule():[];return $?he(x.querySelectorAll("parameter").filter(Y=>{if(Y===k||Y.anon||Y.parentNode.type!==_||Y.parentNode.name!==q)return!1;if(_==="template")return!0;let[se,M]=Y.parentNode.getModule();return se===G&&M===me}).map(({name:Y})=>Y),"Variable",$,e,N==="parameter-value"?"=":""):void 0}else if(Pi(C)&&Bl(k)){let R=Zr.provideValues(k.tag,k.name);if(R.length===0)return;let _=c(this,be).slice(C.getAbsoluteIndex(),x.indexFromPos(g,u)).trimStart();return he(R.map(({name:q})=>q),"Value",_,e)}}async provideDiagnostics(n,e=!0){let t=await w(this,B,$e).call(this,n),r=t.lint();return[(e?r:r.filter(({severity:l})=>l==="error")).map(({startLine:l,startCol:d,endLine:p,endCol:g,severity:u,rule:h,message:f,fix:m,suggestions:b})=>({range:{start:{line:l,character:d},end:{line:p,character:g}},severity:u==="error"?1:2,source:"WikiLint",code:h,message:f,data:[...m?[da(t,m,!0)]:[],...b?b.map(x=>da(t,x)):[]]})),[],[]].flat(2)}async provideFoldingRanges(n){let e=await w(this,B,$e).call(this,n),{length:t}=e.getLines(),r=[],i=new Array(6),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let o of[...s].reverse())o.getRelativeIndex();for(let o of s){let{offsetHeight:l}=o;if(o.type==="heading-title"||l>2){let{top:d}=e.posFromIndex(o.getAbsoluteIndex());if(o.type==="heading-title"){let{level:p}=o.parentNode;for(let g=p-1;g<6;g++){let u=i[g];u!==void 0&&u<d-1&&r.push({startLine:u,endLine:d-1,kind:"region"}),i[g]=void 0}i[p-1]=d+l-1}else r.push({startLine:d,endLine:d+l-2,kind:"region"})}}for(let o of i)o!==void 0&&o<t-1&&r.push({startLine:o,endLine:t-1,kind:"region"});return r}async provideLinks(n){var s;(s=this.config)!=null||(this.config=A.getConfig());let{articlePath:e,protocol:t}=this.config,r=e==null?void 0:e.includes("//"),i=_l(t);return(await w(this,B,$e).call(this,n)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value,image-parameter#link${r?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""}`).reverse().map(o=>{let l;o.is("magic-word")&&({name:l}=o,o=o.childNodes[1].lastChild);let{type:d,parentNode:p,firstChild:g,lastChild:u,childNodes:h,length:f}=o,{tag:m}=p;if(l!=null||(l=p.name),!(d!=="attr-value"||l==="src"&&["templatestyles","img"].includes(m)||l==="cite"&&["blockquote","del","ins","q"].includes(m))||!aa(o))return!1;let b=h.filter(x=>x.type==="text").map(({data:x})=>x).join("").trim();if(!b)return!1;try{if(o.is("magic-link")||o.is("ext-link-url")||o.is("free-ext-link"))b=o.getUrl(e);else if(d==="link-target"&&(p.is("link")||p.is("redirect-target")||p.is("category"))){if(b.startsWith("/"))return!1;b=p.link.getUrl(e)}else if(d==="template-name")b=p.getAttribute("title").getUrl(e);else if(["link-target","invoke-module","parameter-value"].includes(d)||d==="attr-value"&&l==="src"&&m==="templatestyles"||d==="image-parameter"&&!i.test(b)){if(!r||b.startsWith("/"))return!1;let x=0;switch(d){case"attr-value":x=10;break;case"invoke-module":x=828;break;case"parameter-value":x=l==="filepath"?6:274}let C=A.normalizeTitle(b,x,!1,this.config,{temporary:!0});if(!C.valid)return!1;b=C.getUrl()}if(typeof b=="string"&&b.startsWith("//")&&(b=`https:${b}`),b=new URL(b).href,d==="image-parameter"){let x=g.getBoundingClientRect(),{top:C,left:N,height:k,width:I}=f===1?x:u.getBoundingClientRect();return{range:{start:{line:x.top,character:x.left},end:Rt(C,N,k,I)},target:b}}return{range:pr(o),target:b}}catch(x){return!1}}).filter(Boolean)}async provideReferences(n,e){let t=await w(this,B,$e).call(this,n),{offsetNode:r,offset:i}=la(t,c(this,be),e),s=r.type==="text"?r.parentNode:r,o=i===0&&(s.type==="ext-attr-dirty"||s.type==="html-attr-dirty")?s.parentNode.parentNode:s,{type:l}=o,d=Vr(o),p=Qr(o);if(!d&&!p&&!Fl.has(l))return;let g=qn(o),u=t.querySelectorAll(l==="heading-title"?"heading":l).filter(h=>l==="attr-value"?Vr(h)===d||Qr(h)===p:qn(h)===g).reverse().map(h=>({range:pr(h.type==="parameter-key"?h.parentNode:h)}));return u.length===0?void 0:u}async provideDefinition(n,e){let t=await w(this,B,$e).call(this,n),r=t.elementFromPoint(e.character,e.line),i=r.is("ext")&&r.name==="ref"?r:r.closest("ext#ref"),s=cr(i,"name");if(!s)return;let o=cr(i,"group"),l=t.querySelectorAll("ext#ref").filter(d=>d.innerText&&cr(d,"name")===s&&cr(d,"group")===o).reverse().map(({lastChild:d})=>({range:pr(d)}));return l.length===0?void 0:l}async resolveRenameLocation(n,e){let t=await w(this,B,$e).call(this,n),r=t.elementFromPoint(e.character,e.line),{type:i}=r,s=Vr(r),o=Qr(r);return!s&&!o&&(!ua.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(r.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(r.parentNode.type))?void 0:pr(r)}async provideRenameEdits(n,e,t){let r=await w(this,B,$e).call(this,n),i=r.elementFromPoint(e.character,e.line),{type:s}=i,o=Vr(i),l=o&&cr(i.parentNode.parentNode,"group"),d=Qr(i),p=qn(i),g=r.querySelectorAll(s).filter(u=>{let{type:h}=u.parentNode;return s==="link-target"&&h!=="link"&&h!=="redirect-target"?!1:s==="attr-value"?Qr(u)===d||Vr(u)===o&&cr(u.parentNode.parentNode,"group")===l:qn(u)===p});return g.length===0?void 0:{changes:{"":g.reverse().map(u=>({range:pr(u),newText:t}))}}}async provideHover(n,e){if(!this.data)return;let t=await w(this,B,$e).call(this,n),{offsetNode:r,offset:i}=la(t,c(this,be),e);r.type==="text"&&(i+=r.getRelativeIndex(),r=r.parentNode);let{type:s,parentNode:o,length:l,name:d}=r,p,g,u,h;if(r.is("double-underscore")&&i>0)p=w(this,B,_i).call(this,r.name);else if(s==="magic-word-name")p=w(this,B,hr).call(this,o.name),g=r.text().trim(),u=o.getAttribute("colon");else if(r.is("magic-word")&&!r.modifier&&l===1&&(i>0||t.posFromIndex(r.getAbsoluteIndex()).left===e.character))p=w(this,B,hr).call(this,d),g=r.firstChild.text().trim(),u=r.getAttribute("colon");else if((r.is("magic-word")||r.is("template"))&&r.modifier&&i>=2&&r.getRelativeIndex(0)>i&&(g=r.modifier.trim().slice(0,-1),p=w(this,B,hr).call(this,g.toLowerCase()),u=":",p)){let f=r.getAbsoluteIndex();h={start:Yr(t,f+2),end:Yr(t,f+r.modifier.trimEnd().length+1)}}return p&&{contents:{kind:"markdown",value:(p.signatures?`${p.signatures.map(f=>`- **{{ ${g}${f.length===0?"**":`${u}** `}${f.map(({label:m,const:b})=>b?m:`*${m}*`).join(" **|** ")} **}}**`).join(`
|
|
101
102
|
`)}
|
|
102
103
|
|
|
103
|
-
`:"")+p.description},range:h!=null?h:pr(r)}}async provideSignatureHelp(n,e){if(!this.data)return;let{line:t,character:r}=e,i=n.split(/\r?\n/u,t+1)[t],{lastChild:s}=await
|
|
104
|
+
`:"")+p.description},range:h!=null?h:pr(r)}}async provideSignatureHelp(n,e){if(!this.data)return;let{line:t,character:r}=e,i=n.split(/\r?\n/u,t+1)[t],{lastChild:s}=await w(this,B,ha).call(this,`${i.slice(0,r+/^[^{}<]*/u.exec(i.slice(r))[0].length)}}}`);if(!s.is("magic-word")||s.length===1)return;let{name:o,childNodes:l,firstChild:d}=s,p=w(this,B,hr).call(this,o);if(!(p!=null&&p.signatures))return;let g=l.length-1,u=p.signatures.filter(b=>{var x;return(b.length>=g||((x=b[b.length-1])==null?void 0:x.rest))&&b.every(({label:C,const:N},k)=>{var P;let I=N&&k<g&&((P=l[k+1])==null?void 0:P.text().trim());return!I||C.toLowerCase().includes(I.toLowerCase())})});if(u.length===0)return;let h=-1;for(let b=s.getAbsoluteIndex()+s.getAttribute("padding");h<g&&(b+=l[h+1].toString().length+1,!(b>r));h++);let f=d.text().trim(),m=s.getAttribute("colon");return{signatures:u.map(b=>({label:`{{${f}${b.length===0?"":m}${b.map(({label:x})=>x).join("|")}}}`,parameters:b.map(({label:x,const:C})=>({label:x,...C?{documentation:"Predefined parameter"}:void 0})),...b.length<g?{activeParameter:Math.min(h,b.length-1)}:void 0})),activeParameter:h}}async provideInlayHints(n){let e=[],t=await w(this,B,$e).call(this,n);for(let r of t.querySelectorAll("template,magic-word#invoke").reverse()){let{type:i,childNodes:s}=r;e.push(...s.slice(i==="template"?1:3).filter(({anon:o})=>o).reverse().map(o=>({position:Yr(t,o.getAbsoluteIndex()),label:`${o.name}=`,kind:2})))}return e}findStyleTokens(){return c(this,mr).querySelectorAll(jl).filter(({lastChild:n})=>Pi(n))}};be=new WeakMap,it=new WeakMap,Ge=new WeakMap,Ve=new WeakMap,mr=new WeakMap,Kr=new WeakMap,fr=new WeakMap,br=new WeakMap,wt=new WeakMap,B=new WeakSet,Xr=function(){return c(this,fr)===this.config&&c(this,br)===this.include},$e=async function(n){var e;return n=Nt(n),!c(this,Ge)&&w(this,B,Xr).call(this)&&c(this,be)===n?c(this,mr):(T(this,be,n),(e=c(this,Ge))!=null||T(this,Ge,w(this,B,Mi).call(this)),c(this,Ge))},Mi=async function(){var t;(t=this.config)!=null||(this.config=A.getConfig()),T(this,fr,this.config),T(this,br,this.include);let n=c(this,be),e=await A.partialParse(n,()=>c(this,be),this.include,this.config);return w(this,B,Xr).call(this)&&c(this,be)===n?(T(this,mr,e),T(this,Ge,void 0),e):(T(this,Ge,w(this,B,Mi).call(this)),c(this,Ge))},ha=async function(n){var e;return n=Nt(n),!c(this,Ve)&&w(this,B,Xr).call(this)&&c(this,it)===n?c(this,Kr):(T(this,it,n),(e=c(this,Ve))!=null||T(this,Ve,w(this,B,ji).call(this)),c(this,Ve))},ji=async function(){var t;(t=this.config)!=null||(this.config=A.getConfig()),T(this,fr,this.config),T(this,br,this.include);let n=c(this,it),e=await A.partialParse(n,()=>c(this,it),this.include,this.config);return w(this,B,Xr).call(this)&&c(this,it)===n?(T(this,Kr,e),T(this,Ve,void 0),e):(T(this,Ve,w(this,B,ji).call(this)),c(this,Ve))},ma=function(){var n;if(!c(this,wt)||c(this,wt)[1]!==this.config){(n=this.config)!=null||(this.config=A.getConfig());let{nsid:e,ext:t,html:r,parserFunction:[i,s,...o],doubleUnderscore:l,protocol:d,img:p}=this.config,g=new Set([t,r].flat(2)),u=new RegExp("(?:"+String.raw`<(\/?\w*)`+"|"+String.raw`(\{{2,4}|\[\[)\s*([^|{}<>[\]\s][^|{}<>[\]#]*)?`+"|"+String.raw`(__(?:(?!__)[\p{L}\d_])*)`+"|"+String.raw`(?<!\[)\[([a-z:/]*)`+"|"+String.raw`\[\[\s*(?:${Object.entries(e).filter(([,h])=>h===6).map(([h])=>h).join("|")})\s*:[^[\]{}<>]+\|([^[\]{}<>|=]*)`+"|"+String.raw`<(\w+)(?:\s(?:[^<>{}|=\s]+(?:\s*=\s*(?:[^\s"']\S*|(["']).*?\8))?(?=\s))*)?\s(\w*)`+")$","iu");T(this,wt,[{re:u,ext:t,tags:g,allTags:[...g,"onlyinclude","includeonly","noinclude"],functions:[Object.keys(i),Array.isArray(s)?s:Object.keys(s),o].flat(2),switches:l.slice(0,2).flat().map(h=>`__${h}__`),protocols:d.split("|"),params:Object.keys(p).filter(h=>h.endsWith("$1")||!h.includes("$1")).map(h=>h.replace(/\$1$/u,""))},this.config])}return c(this,wt)[0]},_i=function(n){return this.data.behaviorSwitches.find(({aliases:e})=>e.includes(n))},hr=function(n){return this.data.parserFunctions.find(({aliases:e})=>e.some(t=>t.replace(/^#/u,"")===n))}});var At,xa,ql,A,H=v(()=>{Yi();Te();ts();re();At={config:Hn,i18n:void 0,rules:Xi,getConfig(a){let n=a!=null?a:this.config,{doubleUnderscore:e}=n;for(let t=0;t<2;t++)e.length>t+2&&e[t].length===0&&(e[t]=Object.keys(e[t+2]));return{...Hn,...n,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=At.getConfig(),r){let{Title:i}=(sa(),Z(ia)),s;if(r!=null&&r.halfParsed)s=new i(a,n,t,r);else{let{Token:o}=(O(),Z(zr));s=oe.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let d=new i(l.toString(),n,t,r);for(let p of["main","fragment"]){let g=d[p];if(g!=null&&g.includes("\0")){let u=l.buildFromStr(g,1);p==="main"?d.main=u:d.setFragment(u)}}return d})}return s},parse(a,n,e=11,t=At.getConfig()){a=Nt(a);let r;typeof e!="number"&&(r=Array.isArray(e)?e:[e],e=Math.max(...r.map(o=>Qi[o]||11)));let{Token:i}=(O(),Z(zr));return oe.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,n)})},async partialParse(a,n,e,t=At.getConfig()){{let{Token:r}=(O(),Z(zr)),i=typeof setImmediate=="function"?setImmediate:setTimeout,{running:s}=oe;oe.running=!0;let o=new r(Nt(a),t);o.type="root";let l=0;try{await new Promise(d=>{let p=()=>{n()===a?(l++,i(g,0)):d()},g=()=>{l===12?(o.afterBuild(),d()):(o[l===11?"build":"parseOnce"](l,e),p())};i(g,0)})}catch(d){throw oe.running=s,d}return oe.running=s,o}},createLanguageService(a){var n;{let e=(ba(),Z(fa)),{LanguageService:t,tasks:r}=e;return(n=r.get(a))!=null?n:new t(a)}}},xa={},ql=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in At)ql.has(a)||(xa[a]={enumerable:!1});Object.defineProperties(At,xa);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:At});A=At});H();})();
|
|
104
105
|
//# sourceMappingURL=bundle-lsp.min.js.map
|