wikiparser-node 1.17.1 → 1.18.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 CHANGED
@@ -57,6 +57,25 @@ For more browser extensions, please refer to the corresponding [documentation](h
57
57
 
58
58
  # Usage
59
59
 
60
+ ## CLI usage
61
+
62
+ For MediaWiki sites hosted by the Wikimedia Foundation, such as different language editions of Wikipedia, you can use the following command to obtain the parser configuration:
63
+
64
+ ```sh
65
+ npx getParserConfig <site> <script path> [force]
66
+ # For example:
67
+ npx getParserConfig jawiki https://ja.wikipedia.org/w
68
+ ```
69
+
70
+ The generated configuration file will be saved in the `config` directory. You can then use the site name for [`Parser.config`](https://github.com/bhsd-harry/wikiparser-node/wiki/Parser-%28EN%29#config).
71
+
72
+ ```javascript
73
+ // For example:
74
+ Parser.config = 'jawiki';
75
+ ```
76
+
77
+ ## API usage
78
+
60
79
  Please refer to the [Wiki](https://github.com/bhsd-harry/wikiparser-node/wiki/Home-%28EN%29).
61
80
 
62
81
  # Known issues
package/bin/config.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ require('../dist/bin/config.js');
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Eo=Object.create;var xt=Object.defineProperty,Lo=Object.defineProperties,pi=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,Ro=Object.getOwnPropertyNames,di=Object.getOwnPropertySymbols;var ui=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable;var ci=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),bt=a=>{throw TypeError(a)};var $r=(a,r,e)=>r in a?xt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,Y=(a,r)=>{for(var e in r||(r={}))ui.call(r,e)&&$r(a,e,r[e]);if(di)for(var e of di(r))Po.call(r,e)&&$r(a,e,r[e]);return a},ae=(a,r)=>Lo(a,Fo(r)),gi=(a,r)=>xt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var jo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),le=(a,r)=>{for(var e in r)xt(a,e,{get:r[e],enumerable:!0})},Bo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ro(r))!ui.call(a,n)&&n!==e&&xt(a,n,{get:()=>r[n],enumerable:!(t=pi(r,n))||t.enumerable});return a};var Q=a=>Bo(xt({},"__esModule",{value:!0}),a);var te=a=>{var r;return[,,,Eo((r=a==null?void 0:a[ci("metadata")])!=null?r:null)]},hi=["class","method","getter","setter","accessor","field","value","get","set"],Zt=a=>a!==void 0&&typeof a!="function"?bt("Function expected"):a,qo=(a,r,e,t,n)=>({kind:hi[a],name:r,metadata:t,addInitializer:i=>e._?bt("Already initialized"):n.push(Zt(i||null))}),_o=(a,r)=>$r(r,ci("metadata"),a[3]),re=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ne=(a,r,e,t,n,i)=>{var s,o,l,g,u,d=r&7,p=!!(r&8),h=!!(r&16),f=d>3?a.length+1:d?p?1:2:0,m=hi[d+5],x=d>3&&(a[f-1]=[]),k=a[f]||(a[f]=[]),S=d&&(!h&&!p&&(n=n.prototype),d<5&&(d>3||!h)&&pi(d<4?n:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));d?h&&d<4&&gi(i,(d>2?"set ":d>1?"get ":"")+e):gi(n,e);for(var w=t.length-1;w>=0;w--)g=qo(d,e,l={},a[3],k),d&&(g.static=p,g.private=h,u=g.access={has:h?$=>Oo(n,$):$=>e in $},d^3&&(u.get=h?$=>(d^1?c:N)($,n,d^4?i:S.get):$=>$[e]),d>2&&(u.set=h?($,F)=>b($,n,F,d^4?i:S.set):($,F)=>$[e]=F)),o=(0,t[w])(d?d<4?h?i:S[m]:d>4?void 0:{get:S.get,set:S.set}:n,g),l._=1,d^4||o===void 0?Zt(o)&&(d>4?x.unshift(o):d?h?i=o:S[m]=o:n=o):typeof o!="object"||o===null?bt("Object expected"):(Zt(s=o.get)&&(S.get=s),Zt(s=o.set)&&(S.set=s),Zt(s=o.init)&&x.unshift(s));return d||_o(a,n),S&&xt(n,e,S),h?d^4?i:S:n},ie=(a,r,e)=>$r(a,typeof r!="symbol"?r+"":r,e),pn=(a,r,e)=>r.has(a)||bt("Cannot "+e),Oo=(a,r)=>Object(r)!==r?bt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(pn(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?bt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(pn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(pn(a,r,"access private method"),e);var Nr=(a,r,e,t)=>({set _(n){b(a,r,n,e)},get _(){return c(a,r,t)}});var mi=(a,r,e)=>new Promise((t,n)=>{var i=l=>{try{o(e.next(l))}catch(g){n(g)}},s=l=>{try{o(e.throw(l))}catch(g){n(g)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,r)).next())});var fi,xi,bi=y(()=>{"use strict";fi=(()=>{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};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})()});var ze,Ti=y(()=>{"use strict";ze=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Se,yi,Ee,Le,Ke,un,se,ki,be,Mo,zo,Je,vi,Wa,Wo,Uo,Tt,Fe,X=y(()=>{"use strict";Ti();Se=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,yi=String.raw`[^[\]<>"\0-\x1F\x7F${Se}\uFFFD]`,Ee=String.raw`(?:\[[\da-f:.]+\]|${yi})`,Le=String.raw`(?:${yi}|\0\d+[cn!~]\x7F)*`,Ke=(a,r)=>e=>e.replace(a,r),un=Ke(/[\0\x7F]|\r$/gmu,""),se=Ke(/\0\d+[cn]\x7F/gu,""),ki=Ke(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),be=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Mo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},zo=Ke(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Mo[e.toLowerCase()]),Je=a=>zo(a),vi=Ke(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Wa=Ke(/\n/gu,String.raw`\n`),Wo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Uo=a=>Ke(a,r=>`&${Wo[r]};`),Tt=Uo(/[&<>]/gu),Fe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Ai=jo((Ga,Do)=>{Do.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},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{"#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","#replace":"replace","#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":"section","#section-x":"section-x","#section-h":"section-h","#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 cn,Si=y(()=>{"use strict";cn=Ai()});var er,yt,tr,rr,hn,R,K=y(()=>{"use strict";R=class{constructor(r,e){T(this,rr);T(this,er);T(this,yt);T(this,tr);b(this,er,r),b(this,yt,e)}get start(){return c(this,yt)}get top(){return N(this,rr,hn).call(this).top}get left(){return N(this,rr,hn).call(this).left}};er=new WeakMap,yt=new WeakMap,tr=new WeakMap,rr=new WeakSet,hn=function(){var r;return(r=c(this,tr))!=null||b(this,tr,c(this,er).getRootNode().posFromIndex(c(this,yt))),c(this,tr)}});var mn,wi,C,I,we,B=y(()=>{"use strict";Te();K();q();mn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),wi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(r,s),{offsetHeight:g,offsetWidth:u}=r,{startIndex:d,startLine:p,startCol:h}=a(r,s,o,l),{line:f,character:m}=mn(p,h,g,u);return{rule:t,message:A.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:p,endLine:f,startCol:h,endCol:m}},C=wi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),I=wi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),we=(a,r,e)=>{if(a)return a[1];let t=r();return e([Z.rev,t]),t}});var Go,Ir,Ci=y(()=>{"use strict";Go=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Ir=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Go(i.trim(),t,n))});var nr,kt,vt,ir,sr,At,St,or,fn,wt,xn=y(()=>{"use strict";B();Te();wt=class{constructor(){T(this,or);ie(this,"childNodes",[]);T(this,nr);T(this,kt);T(this,vt);T(this,ir);T(this,sr);T(this,At);T(this,St,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,nr)}get nextSibling(){return c(this,kt)}get previousSibling(){return c(this,vt)}get offsetHeight(){return N(this,or,fn).call(this).height}get offsetWidth(){return N(this,or,fn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":b(this,nr,e),e||(b(this,kt,void 0),b(this,vt,void 0));break;case"nextSibling":b(this,kt,e);break;case"previousSibling":b(this,vt,e);break;case"aIndex":b(this,At,[Z.rev,e]);break;default:this[r]=e}}getRootNode(){return we(c(this,sr),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&b(this,sr,r)})}indexFromPos(r,e){}posFromIndex(r){let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=t.findIndex(([,,i])=>r<=i);return{top:n,left:r-t[n][1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return we(c(this,St)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,St)[i]=[Z.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,St)[r]=e})}getAbsoluteIndex(){return we(c(this,At),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,At,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return we(c(this,ir),()=>{let r=[],e=0;for(let t of String(this).split(`
1
+ "use strict";(()=>{var Eo=Object.create;var xt=Object.defineProperty,Lo=Object.defineProperties,pi=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,Ro=Object.getOwnPropertyNames,di=Object.getOwnPropertySymbols;var ui=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable;var ci=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),bt=a=>{throw TypeError(a)};var $r=(a,r,e)=>r in a?xt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,Y=(a,r)=>{for(var e in r||(r={}))ui.call(r,e)&&$r(a,e,r[e]);if(di)for(var e of di(r))Po.call(r,e)&&$r(a,e,r[e]);return a},ae=(a,r)=>Lo(a,Fo(r)),gi=(a,r)=>xt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var jo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),le=(a,r)=>{for(var e in r)xt(a,e,{get:r[e],enumerable:!0})},Bo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ro(r))!ui.call(a,n)&&n!==e&&xt(a,n,{get:()=>r[n],enumerable:!(t=pi(r,n))||t.enumerable});return a};var Q=a=>Bo(xt({},"__esModule",{value:!0}),a);var te=a=>{var r;return[,,,Eo((r=a==null?void 0:a[ci("metadata")])!=null?r:null)]},hi=["class","method","getter","setter","accessor","field","value","get","set"],Zt=a=>a!==void 0&&typeof a!="function"?bt("Function expected"):a,qo=(a,r,e,t,n)=>({kind:hi[a],name:r,metadata:t,addInitializer:i=>e._?bt("Already initialized"):n.push(Zt(i||null))}),_o=(a,r)=>$r(r,ci("metadata"),a[3]),re=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ne=(a,r,e,t,n,i)=>{var s,o,l,g,u,d=r&7,p=!!(r&8),h=!!(r&16),f=d>3?a.length+1:d?p?1:2:0,m=hi[d+5],x=d>3&&(a[f-1]=[]),k=a[f]||(a[f]=[]),S=d&&(!h&&!p&&(n=n.prototype),d<5&&(d>3||!h)&&pi(d<4?n:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));d?h&&d<4&&gi(i,(d>2?"set ":d>1?"get ":"")+e):gi(n,e);for(var w=t.length-1;w>=0;w--)g=qo(d,e,l={},a[3],k),d&&(g.static=p,g.private=h,u=g.access={has:h?$=>Oo(n,$):$=>e in $},d^3&&(u.get=h?$=>(d^1?c:N)($,n,d^4?i:S.get):$=>$[e]),d>2&&(u.set=h?($,F)=>b($,n,F,d^4?i:S.set):($,F)=>$[e]=F)),o=(0,t[w])(d?d<4?h?i:S[m]:d>4?void 0:{get:S.get,set:S.set}:n,g),l._=1,d^4||o===void 0?Zt(o)&&(d>4?x.unshift(o):d?h?i=o:S[m]=o:n=o):typeof o!="object"||o===null?bt("Object expected"):(Zt(s=o.get)&&(S.get=s),Zt(s=o.set)&&(S.set=s),Zt(s=o.init)&&x.unshift(s));return d||_o(a,n),S&&xt(n,e,S),h?d^4?i:S:n},ie=(a,r,e)=>$r(a,typeof r!="symbol"?r+"":r,e),pn=(a,r,e)=>r.has(a)||bt("Cannot "+e),Oo=(a,r)=>Object(r)!==r?bt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(pn(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?bt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(pn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(pn(a,r,"access private method"),e);var Nr=(a,r,e,t)=>({set _(n){b(a,r,n,e)},get _(){return c(a,r,t)}});var mi=(a,r,e)=>new Promise((t,n)=>{var i=l=>{try{o(e.next(l))}catch(g){n(g)}},s=l=>{try{o(e.throw(l))}catch(g){n(g)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,r)).next())});var fi,xi,bi=y(()=>{"use strict";fi=(()=>{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};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})()});var ze,Ti=y(()=>{"use strict";ze=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Se,yi,Ee,Le,Ke,un,se,ki,be,Mo,zo,Je,vi,Wa,Wo,Uo,Tt,Fe,X=y(()=>{"use strict";Ti();Se=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,yi=String.raw`[^[\]<>"\0-\x1F\x7F${Se}\uFFFD]`,Ee=String.raw`(?:\[[\da-f:.]+\]|${yi})`,Le=String.raw`(?:${yi}|\0\d+[cn!~]\x7F)*`,Ke=(a,r)=>e=>e.replace(a,r),un=Ke(/[\0\x7F]|\r$/gmu,""),se=Ke(/\0\d+[cn]\x7F/gu,""),ki=Ke(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),be=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Mo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},zo=Ke(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Mo[e.toLowerCase()]),Je=a=>zo(a),vi=Ke(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Wa=Ke(/\n/gu,String.raw`\n`),Wo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Uo=a=>Ke(a,r=>`&${Wo[r]};`),Tt=Uo(/[&<>]/gu),Fe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Ai=jo((Ga,Do)=>{Do.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},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{"#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 cn,Si=y(()=>{"use strict";cn=Ai()});var er,yt,tr,rr,hn,R,K=y(()=>{"use strict";R=class{constructor(r,e){T(this,rr);T(this,er);T(this,yt);T(this,tr);b(this,er,r),b(this,yt,e)}get start(){return c(this,yt)}get top(){return N(this,rr,hn).call(this).top}get left(){return N(this,rr,hn).call(this).left}};er=new WeakMap,yt=new WeakMap,tr=new WeakMap,rr=new WeakSet,hn=function(){var r;return(r=c(this,tr))!=null||b(this,tr,c(this,er).getRootNode().posFromIndex(c(this,yt))),c(this,tr)}});var mn,wi,C,I,we,B=y(()=>{"use strict";Te();K();q();mn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),wi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(r,s),{offsetHeight:g,offsetWidth:u}=r,{startIndex:d,startLine:p,startCol:h}=a(r,s,o,l),{line:f,character:m}=mn(p,h,g,u);return{rule:t,message:A.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:p,endLine:f,startCol:h,endCol:m}},C=wi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),I=wi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),we=(a,r,e)=>{if(a)return a[1];let t=r();return e([Z.rev,t]),t}});var Go,Ir,Ci=y(()=>{"use strict";Go=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Ir=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Go(i.trim(),t,n))});var nr,kt,vt,ir,sr,At,St,or,fn,wt,xn=y(()=>{"use strict";B();Te();wt=class{constructor(){T(this,or);ie(this,"childNodes",[]);T(this,nr);T(this,kt);T(this,vt);T(this,ir);T(this,sr);T(this,At);T(this,St,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,nr)}get nextSibling(){return c(this,kt)}get previousSibling(){return c(this,vt)}get offsetHeight(){return N(this,or,fn).call(this).height}get offsetWidth(){return N(this,or,fn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":b(this,nr,e),e||(b(this,kt,void 0),b(this,vt,void 0));break;case"nextSibling":b(this,kt,e);break;case"previousSibling":b(this,vt,e);break;case"aIndex":b(this,At,[Z.rev,e]);break;default:this[r]=e}}getRootNode(){return we(c(this,sr),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&b(this,sr,r)})}indexFromPos(r,e){}posFromIndex(r){let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=t.findIndex(([,,i])=>r<=i);return{top:n,left:r-t[n][1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return we(c(this,St)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,St)[i]=[Z.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,St)[r]=e})}getAbsoluteIndex(){return we(c(this,At),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,At,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return we(c(this,ir),()=>{let r=[],e=0;for(let t of String(this).split(`
2
2
  `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{b(this,ir,r)})}};nr=new WeakMap,kt=new WeakMap,vt=new WeakMap,ir=new WeakMap,sr=new WeakMap,At=new WeakMap,St=new WeakMap,or=new WeakSet,fn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var We,bn,Tn,Er,$i=y(()=>{"use strict";X();Te();Ci();xn();Er=class extends wt{constructor(){super(...arguments);T(this,We)}get length(){return this.childNodes.length}text(e){return be(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=n=>{var i,s;e.splice(n,1),(i=e[n-1])==null||i.setAttribute("nextSibling",e[n]),(s=e[n])==null||s.setAttribute("previousSibling",e[n-1])};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||e.length===1||this.getGaps(n-(n&&1))||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return yn(this,e,1)[0]}insertAt(e,t=this.length){return yn(this,t,0,[e]),e}closest(e){let t=Ir(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Ir(e,this);return N(this,We,bn).call(this,t)}querySelectorAll(e){let t=Ir(e,this);return N(this,We,Tn).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 n=this.childNodes[t],{data:i}=n;return n.replaceData(e),i}toString(e,t=""){return this.childNodes.map(n=>n.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let n=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s),n.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return n}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Fe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=ae(Y({},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),n.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return n}};We=new WeakSet,bn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=N(t=n,We,bn).call(t,e);if(i)return i}},Tn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(n=i,We,Tn).call(n,e)));return t}});var kn,Ni,Ho,Vo,Qo,Xo,Ko,Jo,vn,Lr,Ii,ar,Ei=y(()=>{"use strict";X();B();q();xn();kn=String.raw`[${Se}\t]*`,Ni=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${kn}\d)|isbn(?=[-::]?${kn}(?:\d(?:${kn}|-)){6})`,Ho=new RegExp(String.raw`${Ni}|https?[:/]/+`,"giu"),Vo=new RegExp(Ni,"giu"),Qo=new Set(["attr-value","ext-link-text","link-text"]),Xo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ko={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Jo=["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{vn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){vn=/\w/u}ar=class extends wt{constructor(e){super();T(this,Lr);ie(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"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var _,L,V;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:u}=i,d=!1;if(l==="attr-value"){let{type:J,name:he,tag:me}=u;if(J!=="ext-attr")d=!0;else if(me==="choose"&&(he==="before"||he==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||d?Vo:Ho),n.search(t)===-1)return[];t.lastIndex=0;let p=[],h=s==null?void 0:s.type,f=s==null?void 0:s.name,m=o==null?void 0:o.type,x=this.getRootNode(),k=x.toString(),{ext:S,html:w}=x.getAttribute("config"),{top:$,left:F}=x.posFromIndex(e),j=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Jo]);for(let J=t.exec(n);J;J=t.exec(n)){let[,he,me]=J,{index:G}=J,W=J[0].toLowerCase();if(me&&me!=="]"){let{length:ue}=me;G+=ue,W=W.slice(ue)}let{0:E,length:ge}=W,Me=E==="r"||E==="p"||E==="i";if(E==="<"&&!j.has(he.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(G+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((_=s.innerText)!=null&&_.includes("]")))||Me&&(!i.getAttribute("plain")||Qo.has(l)))continue;E==="]"&&(G||ge>1)&&t.lastIndex--;let fe=e+G,pe=fe+ge,xe=k[pe],mt=k[fe-1],ln=ge>1&&!(E==="<"&&!/[\s/>]/u.test(xe!=null?xe:"")||d&&(E==="["||E==="]")||Me&&l==="parameter-value")||E==="{"&&(xe===E||mt==="-")||E==="}"&&(mt===E||xe==="-")||E==="["&&(xe===E||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(G+1).trim())||E==="]"&&(mt===E||m==="free-ext-link"&&!n.slice(0,G).includes("]"))?"error":"warning",dn=E==="{"||E==="[";if(ln==="warning"&&(dn||(E==="]"||E==="}"))){let ue=Xo[E],gn=dn?n.slice(G+1):n.slice(0,G);if(E==="{"&&((L=ue.exec(gn))==null?void 0:L[0])==="}"||E==="}"&&((V=ue.exec(gn))==null?void 0:V[0])==="{")continue;if(!gn.includes(E)){let li=dn?"nextSibling":"previousSibling",Xe=this[li];for(;Xe&&(Xe.type!=="text"||!ue.test(Xe.data));)Xe=Xe[li];if(Xe&&ue.exec(Xe.data)[0]!==E)continue}}Me&&(W=W.toUpperCase());let si=this.posFromIndex(G),{line:oi,character:ai}=mn($,F,si.top+1,si.left),ft={rule:Ko[E],message:A.msg('lonely "$1"',Me||E==="h"?W:E),severity:ln,startIndex:fe,endIndex:pe,startLine:oi,endLine:oi,startCol:ai,endCol:ai+ge};if(E==="<")ft.suggestions=[{desc:"escape",range:[fe,fe+1],text:"&lt;"}];else if(E==="h"&&l!=="link-text"&&vn.test(mt||""))ft.suggestions=[{desc:"whitespace",range:[fe,fe],text:" "}];else if(E==="["&&l==="ext-link-text"){let ue=i.getAbsoluteIndex()+i.toString().length;ft.suggestions=[{desc:"escape",range:[ue,ue+1],text:"&#93;"}]}else if(E==="]"&&m==="free-ext-link"&&ln==="error"){let ue=e-o.toString().length;ft.fix={range:[ue,ue],text:"[",desc:"left bracket"}}else Me&&(ft.suggestions=[...J[0]===W?[]:[{desc:"uppercase",range:[fe,pe],text:W}],...xe===":"||xe==="\uFF1A"?[{desc:"whitespace",range:[pe,pe+1],text:" "}]:[]]);p.push(ft)}return p}replaceData(e){N(this,Lr,Ii).call(this,e)}print(){return Tt(this.data)}};Lr=new WeakSet,Ii=function(e){this.setAttribute("data",e)}});var ye,Ye=y(()=>{"use strict";Te();ye=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Fr(n,e),n}});var lr,ke,Ct=y(()=>{"use strict";P();ke=class extends v{constructor(e,t,n,i,s,o){super(e,i,s,o);T(this,lr);b(this,lr,n)}get type(){return c(this,lr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};lr=new WeakMap});var $t,z,Re=y(()=>{"use strict";P();z=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);T(this,$t);b(this,$t,t)}get type(){return c(this,$t)}set type(e){b(this,$t,e)}};$t=new WeakMap});var Yo,Ze,Ce,Pe,$e,dr=y(()=>{"use strict";B();X();K();q();P();Re();Yo=a=>a==="redirect-target"||a==="link",$e=class extends v{constructor(e,t,n=A.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,Ze,!0);T(this,Ce);T(this,Pe);if(this.insertAt(new z(e,"link-target",n,i,{})),t!==void 0){let o=new v(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,Ce,s)}get link(){}get fragment(){return c(this,Pe).fragment}afterBuild(){b(this,Pe,this.getTitle()),c(this,Ce).includes("\0")&&b(this,Ce,this.buildFromStr(c(this,Ce),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,Ze,t):e==="title"?b(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ce));return c(this,Ze)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,Ze)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ce).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,Pe),u=new R(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push(C(i,u,"unknown-page","template in an internal link target","warning")),l){let d=C(i,u,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:ze(i.text())}],n.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let h=C(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=h.startIndex+s.getRelativeIndex(d);h.suggestions=[{desc:"escape",range:[f,f+p.data.length],text:p.data.replace(/\|/gu,"&#124;")}],n.push(h)}}if(g!==void 0&&!Yo(o)){let d=C(i,u,"no-ignored","useless fragment"),p=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),h=i.childNodes[p];h&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+h.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),n.push(d)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,e,t,!0,!0)}print(){return super.print(c(this,Ze)?{pre:"[[",post:"]]",sep:c(this,Ce)}:{sep:c(this,Ce)})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(n.fragment=s),n}};Ze=new WeakMap,Ce=new WeakMap,Pe=new WeakMap});var oe,Ue=y(()=>{"use strict";P();oe=class extends v{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Li,An,Zo,D,De=y(()=>{"use strict";Ye();Ue();Li=[ye()];D=class extends(Zo=oe){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};An=te(Zo),D=ne(An,0,"NoincludeToken",Li,D),re(An,1,D)});var Rr,Fi=y(()=>{"use strict";B();dr();De();Rr=class extends $e{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new D(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!1,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=C(this.lastChild,{start:r},"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 Ri,Ge,Nt,Sn,ea,et,Pi=y(()=>{"use strict";Ye();P();Ct();Fi();Ri=[ye(!1,!1)];et=class extends(ea=v){constructor(e,t,n,i,s,o,l=[]){super(void 0,o,l);T(this,Ge);T(this,Nt);b(this,Ge,e),b(this,Nt,s);let g=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new ke(t,g,"redirect-syntax",o,l,{}),new Rr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Ge).length:super.getAttribute(e)}toString(e){return c(this,Ge)+super.toString(e)+c(this,Nt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,Ge).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,Ge),post:c(this,Nt)})}};Sn=te(ea),Ge=new WeakMap,Nt=new WeakMap,et=ne(Sn,0,"RedirectToken",Ri,et),re(Sn,1,et)});var ji={};le(ji,{parseRedirect:()=>ta});var ta,Bi=y(()=>{"use strict";q();Pi();ta=(a,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(a);return t&&A.normalizeTitle(t[3],0,!1,r,!0,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new et(...t.slice(1),r,e),a):!1}});var Pr,qi=y(()=>{"use strict";P();Pr=class extends v{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var He,It,wn=y(()=>{"use strict";P();It=class extends v{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,He);ie(this,"closed");ie(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),b(this,He,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);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:n,lastChild:i}=this,[s,o]=c(this,He);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,He);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,He)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,He);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};He=new WeakMap});var _i,Cn,ra,tt,Oi=y(()=>{"use strict";B();K();Ye();q();wn();_i=[ye(!1)];tt=class extends(ra=It){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:n,name:i}=this,s=new R(this,r);if(t.data.trim()){let o=C(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=I(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}};Cn=te(ra),tt=ne(Cn,0,"IncludeToken",_i,tt),re(Cn,1,tt)});var Et,jr=y(()=>{"use strict";Te();Et=(a=0)=>(r,e)=>{var n,Mi;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return N(this,n,Mi).call(this).getAttr(l)}}return n=new WeakSet,Mi=function(){return this.childNodes[a]},Fr(t,r),t}});var H,zi,Wi,qr,$n,Ui,Lt,Di,Gi,Hi,Br,Vi,Qi,Xi,Ki,Ji=y(()=>{"use strict";H=new Set(["align"]),zi=new Set(["cite"]),Wi=new Set(["cite","datetime"]),qr=new Set(["width"]),$n=new Set(["axis","align","bgcolor","height","width","valign"]),Ui=new Set([...$n,"abbr","headers","scope","rowspan","colspan"]),Lt=new Set(["type"]),Di=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gi=new Set(["clear"]),Hi=new Set(["bgcolor","align","valign"]),Br=new Set,Vi=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"]),Qi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:zi,q:zi,p:H,br:Gi,pre:qr,ins:Wi,del:Wi,ul:Lt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Di,"border"]),caption:H,tr:Hi,td:Ui,th:Ui,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:qr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Lt,poem:H,categorytree:H,combooption:H},Xi={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:Br,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:Br,inputbox:Br,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Br,poll:new Set(["id","show-results-before-voting"]),sm2:Lt,flashmp3:Lt,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"])},Ki={table:Di,td:new Set([...$n,"scope"]),th:$n,br:Gi,caption:H,div:H,hr:qr,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:Lt,p:H,pre:qr,tr:Hi,ul:Lt}});var na,gr,Ft,ee,Ne,Rt,Yi=y(()=>{"use strict";B();X();Ji();K();q();P();Re();na=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Rt=class extends v{constructor(e,t,n,i="",s,o=[],l=A.getConfig(),g=[]){let u=new z(n,"attr-key",l,g),d;if(n==="title"||t==="img"&&n==="alt")d=new v(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let p=ae(Y({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});d=new v(s,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new z(s,"attr-value",l,g,{});super(void 0,l,g);T(this,gr);T(this,Ft);T(this,ee);T(this,Ne);b(this,gr,e),this.append(u,d),b(this,ee,i),b(this,Ne,[...o]),b(this,Ft,t),this.setAttribute("name",se(n).trim().toLowerCase())}get type(){return c(this,gr)}get tag(){return c(this,Ft)}get balanced(){return!c(this,ee)||c(this,Ne)[0]===c(this,Ne)[1]}afterBuild(){c(this,ee).includes("\0")&&b(this,ee,this.buildFromStr(c(this,ee),0)),this.parentNode&&b(this,Ft,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=c(this,Ne);return c(this,ee)?super.toString(e,c(this,ee)+t)+n:this.firstChild.toString(e)}text(){return c(this,ee)?`${super.text(`${c(this,ee).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,ee)?c(this,ee).length+((t=(e=c(this,Ne)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:u}=this,d=this.getValue(),p=new R(this,e);if(!i){let k=C(o,p,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");k.startIndex--,k.startCol--,k.suggestions=[{range:[k.endIndex,k.endIndex],text:c(this,Ne)[0],desc:"close"}],n.push(k)}let h=Xi[u],f=Qi[u],{length:m}=this.toString();if(!(h!=null&&h.has(g))&&!(f!=null&&f.has(g))&&(l==="ext-attr"?h||f:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(u==="meta"||u==="link"||!Vi.has(g)))){let k=C(s,p,"illegal-attr","illegal attribute name");k.suggestions=[{desc:"remove",range:[e,e+m],text:""}],n.push(k)}else if((x=Ki[u])!=null&&x.has(g))n.push(C(s,p,"obsolete-attr","obsolete attribute","warning"));else if(g==="style"&&typeof d=="string"&&na.test(d))n.push(C(o,p,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let k=C(o,p,"illegal-attr","nonzero tabindex");k.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[k.startIndex,k.endIndex],text:"0"}],n.push(k)}return n}getValue(){return c(this,ee)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ne);return c(this,ee)?super.print({sep:Tt(c(this,ee))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.tag=this.tag,n}};gr=new WeakMap,Ft=new WeakMap,ee=new WeakMap,Ne=new WeakMap});var Zi,ia,Nn,pr,Ve,_r=y(()=>{"use strict";B();X();K();q();P();Re();Yi();Zi=a=>a.slice(0,-1),ia=a=>`${Zi(a)}-dirty`;try{Nn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){Nn=/[^\W_]/u}Ve=class extends v{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});T(this,pr);if(b(this,pr,t),this.setAttribute("name",n),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="",g=o.exec(e),u=0,d=()=>{l&&(super.insertAt(new z(l,ia(t),i,s,{})),l="")};for(;g;){let{index:p,0:h,1:f,2:m,3:x,4:k,5:S,6:w}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(se(f).trim())){let $=k!=null?k:w,F=[x,S],j=new Rt(Zi(t),n,f,m,$,F,i,s);d(),super.insertAt(j)}else l+=h;({lastIndex:u}=o),g=o.exec(e)}l+=e.slice(u),d()}}get type(){return c(this,pr)}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 Rt&&(!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 n=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,g=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let u=I(this,g,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();u.suggestions=[{desc:"remove",range:[e,u.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],n.push(u)}for(let u of s)if(u instanceof Rt){let{name:d}=u;o.has(d)?(l.add(d),o.get(d).push(u)):o.set(d,[u])}else{let d=u.text().trim();if(d){let p=C(u,g,"no-ignored","containing invalid attribute",Nn.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],n.push(p)}}if(l.size>0)for(let u of l){let d=o.get(u).map(p=>{let h=p.getValue();return[p,h===!0?"":h]});n.push(...d.map(([p,h],f)=>{let m=C(p,g,"no-duplicate",A.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||d.slice(0,f).some(([,k])=>k===h)?m.fix=x:m.suggestions=[x],m}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof z?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};pr=new WeakMap});var Or,es=y(()=>{"use strict";q();P();De();Or=class extends v{get type(){return"ext-inner"}constructor(r,e=A.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),g=0,u="";for(;o&&l;)new D(o[0],e,t),new D(l[0],e,t),u+=`${r.slice(g,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,g=l.index+s+1,n.lastIndex=g,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=u+r.slice(g)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var Pt,In=y(()=>{"use strict";B();K();ur();q();P();Re();Pt=class extends v{get type(){return"ext-inner"}constructor(r,e,t=A.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=z;this.append(...e.split(`
3
3
  `).map(o=>i?o:rt(o,t,n,r)).map(o=>new s(o,"param-line",t,n,{})))}n.splice(n.indexOf(this),1),n.push(this)}toString(r){return super.toString(r,`
4
4
  `)}text(){return super.text(`