wikiparser-node 1.18.2 → 1.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +6 -1
  2. package/bundle/bundle-es7.min.js +29 -28
  3. package/bundle/bundle-lsp.min.js +31 -30
  4. package/bundle/bundle.min.js +30 -29
  5. package/config/minimum.json +7 -0
  6. package/dist/addon/token.js +37 -28
  7. package/dist/addon/transclude.js +1 -3
  8. package/dist/base.d.mts +4 -0
  9. package/dist/base.d.ts +4 -0
  10. package/dist/base.js +1 -0
  11. package/dist/base.mjs +2 -1
  12. package/dist/bin/config.js +3 -2
  13. package/dist/index.d.ts +14 -1
  14. package/dist/index.js +72 -72
  15. package/dist/lib/element.d.ts +6 -0
  16. package/dist/lib/element.js +543 -466
  17. package/dist/lib/lsp.d.ts +1 -0
  18. package/dist/lib/lsp.js +20 -15
  19. package/dist/lib/redirectMap.d.ts +7 -0
  20. package/dist/lib/redirectMap.js +31 -0
  21. package/dist/lib/text.d.ts +2 -2
  22. package/dist/lib/text.js +385 -325
  23. package/dist/lib/title.d.ts +23 -4
  24. package/dist/lib/title.js +17 -5
  25. package/dist/mixin/noEscape.d.ts +4 -0
  26. package/dist/mixin/noEscape.js +22 -0
  27. package/dist/mixin/readOnly.d.ts +4 -0
  28. package/dist/mixin/readOnly.js +26 -0
  29. package/dist/parser/braces.js +79 -37
  30. package/dist/parser/commentAndExt.js +5 -16
  31. package/dist/parser/links.js +1 -1
  32. package/dist/parser/quotes.js +1 -1
  33. package/dist/parser/redirect.js +1 -3
  34. package/dist/src/arg.js +253 -202
  35. package/dist/src/attribute.d.ts +0 -5
  36. package/dist/src/attribute.js +4 -8
  37. package/dist/src/converter.js +213 -162
  38. package/dist/src/gallery.js +1 -2
  39. package/dist/src/heading.js +5 -6
  40. package/dist/src/imageParameter.js +16 -16
  41. package/dist/src/imagemap.js +3 -2
  42. package/dist/src/index.d.ts +1 -1
  43. package/dist/src/index.js +722 -694
  44. package/dist/src/link/base.js +292 -241
  45. package/dist/src/link/file.js +13 -17
  46. package/dist/src/link/galleryImage.js +1 -1
  47. package/dist/src/link/redirectTarget.js +1 -2
  48. package/dist/src/magicLink.d.ts +0 -6
  49. package/dist/src/magicLink.js +5 -15
  50. package/dist/src/nested.js +7 -7
  51. package/dist/src/nowiki/base.js +2 -1
  52. package/dist/src/nowiki/index.js +4 -3
  53. package/dist/src/onlyinclude.js +95 -44
  54. package/dist/src/parameter.d.ts +0 -6
  55. package/dist/src/parameter.js +1 -13
  56. package/dist/src/redirect.js +6 -6
  57. package/dist/src/syntax.d.ts +4 -1
  58. package/dist/src/syntax.js +4 -1
  59. package/dist/src/table/base.d.ts +0 -5
  60. package/dist/src/table/base.js +2 -9
  61. package/dist/src/table/index.d.ts +1 -0
  62. package/dist/src/table/index.js +7 -4
  63. package/dist/src/table/td.d.ts +1 -0
  64. package/dist/src/table/td.js +2 -3
  65. package/dist/src/table/trBase.js +31 -14
  66. package/dist/src/tagPair/index.js +2 -1
  67. package/dist/src/transclude.js +713 -657
  68. package/dist/util/debug.js +10 -3
  69. package/dist/util/diff.js +1 -1
  70. package/dist/util/string.js +4 -5
  71. package/extensions/dist/base.js +8 -6
  72. package/extensions/dist/lint.js +1 -1
  73. package/extensions/es7/base.js +8 -6
  74. package/extensions/es7/lint.js +1 -1
  75. package/extensions/ui.css +1 -1
  76. package/package.json +3 -3
@@ -1,34 +1,35 @@
1
- "use strict";(()=>{var Fo=Object.create;var bt=Object.defineProperty,Ro=Object.defineProperties,ui=Object.getOwnPropertyDescriptor,Po=Object.getOwnPropertyDescriptors,jo=Object.getOwnPropertyNames,gi=Object.getOwnPropertySymbols;var ci=Object.prototype.hasOwnProperty,Bo=Object.prototype.propertyIsEnumerable;var hi=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),Tt=a=>{throw TypeError(a)};var Ir=(a,r,e)=>r in a?bt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,Y=(a,r)=>{for(var e in r||(r={}))ci.call(r,e)&&Ir(a,e,r[e]);if(gi)for(var e of gi(r))Bo.call(r,e)&&Ir(a,e,r[e]);return a},de=(a,r)=>Ro(a,Po(r)),pi=(a,r)=>bt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var qo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),ge=(a,r)=>{for(var e in r)bt(a,e,{get:r[e],enumerable:!0})},_o=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of jo(r))!ci.call(a,n)&&n!==e&&bt(a,n,{get:()=>r[n],enumerable:!(t=ui(r,n))||t.enumerable});return a};var Q=a=>_o(bt({},"__esModule",{value:!0}),a);var re=a=>{var r;return[,,,Fo((r=a==null?void 0:a[hi("metadata")])!=null?r:null)]},mi=["class","method","getter","setter","accessor","field","value","get","set"],er=a=>a!==void 0&&typeof a!="function"?Tt("Function expected"):a,Oo=(a,r,e,t,n)=>({kind:mi[a],name:r,metadata:t,addInitializer:i=>e._?Tt("Already initialized"):n.push(er(i||null))}),Mo=(a,r)=>Ir(r,hi("metadata"),a[3]),ne=(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},ie=(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=mi[d+5],x=d>3&&(a[f-1]=[]),v=a[f]||(a[f]=[]),$=d&&(!h&&!p&&(n=n.prototype),d<5&&(d>3||!h)&&ui(d<4?n:{get[e](){return c(this,i)},set[e](S){return b(this,i,S)}},e));d?h&&d<4&&pi(i,(d>2?"set ":d>1?"get ":"")+e):pi(n,e);for(var w=t.length-1;w>=0;w--)g=Oo(d,e,l={},a[3],v),d&&(g.static=p,g.private=h,u=g.access={has:h?S=>Do(n,S):S=>e in S},d^3&&(u.get=h?S=>(d^1?c:N)(S,n,d^4?i:$.get):S=>S[e]),d>2&&(u.set=h?(S,I)=>b(S,n,I,d^4?i:$.set):(S,I)=>S[e]=I)),o=(0,t[w])(d?d<4?h?i:$[m]:d>4?void 0:{get:$.get,set:$.set}:n,g),l._=1,d^4||o===void 0?er(o)&&(d>4?x.unshift(o):d?h?i=o:$[m]=o:n=o):typeof o!="object"||o===null?Tt("Object expected"):(er(s=o.get)&&($.get=s),er(s=o.set)&&($.set=s),er(s=o.init)&&x.unshift(s));return d||Mo(a,n),$&&bt(n,e,$),h?d^4?i:$:n},se=(a,r,e)=>Ir(a,typeof r!="symbol"?r+"":r,e),un=(a,r,e)=>r.has(a)||Tt("Cannot "+e),Do=(a,r)=>Object(r)!==r?Tt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(un(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?Tt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(un(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(un(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 fi=(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 xi,bi,Ti=y(()=>{"use strict";xi=(()=>{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})(),bi=(()=>{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 De,yi=y(()=>{"use strict";De=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var we,ki,Le,Fe,Je,cn,oe,vi,be,zo,Wo,Ye,Ai,Ga,Uo,Go,yt,Re,X=y(()=>{"use strict";yi();we=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,ki=String.raw`[^[\]<>"\0-\x1F\x7F${we}\uFFFD]`,Le=String.raw`(?:\[[\da-f:.]+\]|${ki})`,Fe=String.raw`(?:${ki}|\0\d+[cn!~]\x7F)*`,Je=(a,r)=>e=>e.replace(a,r),cn=Je(/[\0\x7F]|\r$/gmu,""),oe=Je(/\0\d+[cn]\x7F/gu,""),vi=Je(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),be=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),zo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Wo=Je(/&(?:#(\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)):zo[e.toLowerCase()]),Ye=a=>Wo(a),Ai=Je(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Ga=Je(/\n/gu,String.raw`\n`),Uo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Go=a=>Je(a,r=>`&${Uo[r]};`),yt=Go(/[&<>]/gu),Re=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Si=qo((Qa,Ho)=>{Ho.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:[{"#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,wi=y(()=>{"use strict";hn=Si()});var tr,kt,rr,nr,mn,R,K=y(()=>{"use strict";R=class{constructor(r,e){T(this,nr);T(this,tr);T(this,kt);T(this,rr);b(this,tr,r),b(this,kt,e)}get start(){return c(this,kt)}get top(){return N(this,nr,mn).call(this).top}get left(){return N(this,nr,mn).call(this).left}};tr=new WeakMap,kt=new WeakMap,rr=new WeakMap,nr=new WeakSet,mn=function(){var r;return(r=c(this,rr))!=null||b(this,rr,c(this,tr).getRootNode().posFromIndex(c(this,kt))),c(this,rr)}});var fn,Ci,C,E,Ce,$i,q=y(()=>{"use strict";Te();K();_();fn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),Ci=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}=fn(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=Ci((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}}),E=Ci((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),Ce=(a,r,e)=>{if(a)return a[1];let t=r();return e([Z.rev,t]),t},$i=(()=>{let a=(r,e)=>r==="ol"&&e==="type"?["1","a","A","i","I"]:r==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(r,e){return a(r,e).map(t=>({name:t}))}}})()});var Vo,Er,Ii=y(()=>{"use strict";Vo=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Er=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Vo(i.trim(),t,n))});var ir,vt,At,sr,or,St,wt,ar,xn,Ct,bn=y(()=>{"use strict";q();Te();Ct=class{constructor(){T(this,ar);se(this,"childNodes",[]);T(this,ir);T(this,vt);T(this,At);T(this,sr);T(this,or);T(this,St);T(this,wt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,ir)}get nextSibling(){return c(this,vt)}get previousSibling(){return c(this,At)}get offsetHeight(){return N(this,ar,xn).call(this).height}get offsetWidth(){return N(this,ar,xn).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,ir,e),e||(b(this,vt,void 0),b(this,At,void 0));break;case"nextSibling":b(this,vt,e);break;case"previousSibling":b(this,At,e);break;case"aIndex":b(this,St,[Z.rev,e]);break;default:this[r]=e}}getRootNode(){return Ce(c(this,or),()=>{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,or,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 Ce(c(this,wt)[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,wt)[i]=[Z.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,wt)[r]=e})}getAbsoluteIndex(){return Ce(c(this,St),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,St,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return Ce(c(this,sr),()=>{let r=[],e=0;for(let t of String(this).split(`
2
- `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{b(this,sr,r)})}};ir=new WeakMap,vt=new WeakMap,At=new WeakMap,sr=new WeakMap,or=new WeakMap,St=new WeakMap,wt=new WeakMap,ar=new WeakSet,xn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var ze,Tn,yn,Lr,Ni=y(()=>{"use strict";X();Te();Ii();bn();Lr=class extends Ct{constructor(){super(...arguments);T(this,ze)}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 kn(this,e,1)[0]}insertAt(e,t=this.length){return kn(this,t,0,[e]),e}closest(e){let t=Er(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Er(e,this);return N(this,ze,Tn).call(this,t)}querySelectorAll(e){let t=Er(e,this);return N(this,ze,yn).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}">`)+Re(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=de(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}};ze=new WeakSet,Tn=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,ze,Tn).call(t,e);if(i)return i}},yn=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,ze,yn).call(n,e)));return t}});var vn,Ei,Qo,Xo,Ko,Jo,Yo,Zo,An,Fr,Li,lr,Fi=y(()=>{"use strict";X();q();_();bn();vn=String.raw`[${we}\t]*`,Ei=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${vn}\d)|isbn(?=[-::]?${vn}(?:\d(?:${vn}|-)){6})`,Qo=new RegExp(String.raw`${Ei}|https?[:/]/+`,"giu"),Xo=new RegExp(Ei,"giu"),Ko=new Set(["attr-value","ext-link-text","link-text"]),Jo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Yo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Zo=["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{An=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){An=/\w/u}lr=class extends Ct{constructor(e){super();T(this,Fr);se(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"))?oe(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var B,F,H;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:z,name:le,tag:fe}=u;if(z!=="ext-attr")d=!0;else if(fe==="choose"&&(le==="before"||le==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||d?Xo:Qo),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(),v=x.toString(),{ext:$,html:w}=x.getAttribute("config"),{top:S,left:I}=x.posFromIndex(e),j=new Set(["onlyinclude","noinclude","includeonly",...$,...w[0],...w[1],...w[2],...Zo]);for(let z=t.exec(n);z;z=t.exec(n)){let[,le,fe]=z,{index:J}=z,U=z[0].toLowerCase();if(fe&&fe!=="]"){let{length:he}=fe;J+=he,U=U.slice(he)}let{0:L,length:ee}=U,Se=L==="r"||L==="p"||L==="i";if(L==="<"&&!j.has(le.toLowerCase())||L==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(J+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((B=s.innerText)!=null&&B.includes("]")))||Se&&(!i.getAttribute("plain")||Ko.has(l)))continue;L==="]"&&(J||ee>1)&&t.lastIndex--;let pe=e+J,ce=pe+ee,xe=v[ce],ft=v[pe-1],dn=ee>1&&!(L==="<"&&!/[\s/>]/u.test(xe!=null?xe:"")||d&&(L==="["||L==="]")||Se&&l==="parameter-value")||L==="{"&&(xe===L||ft==="-")||L==="}"&&(ft===L||xe==="-")||L==="["&&(xe===L||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(J+1).trim())||L==="]"&&(ft===L||m==="free-ext-link"&&!n.slice(0,J).includes("]"))?"error":"warning",gn=L==="{"||L==="[";if(dn==="warning"&&(gn||(L==="]"||L==="}"))){let he=Jo[L],pn=gn?n.slice(J+1):n.slice(0,J);if(L==="{"&&((F=he.exec(pn))==null?void 0:F[0])==="}"||L==="}"&&((H=he.exec(pn))==null?void 0:H[0])==="{")continue;if(!pn.includes(L)){let di=gn?"nextSibling":"previousSibling",Ke=this[di];for(;Ke&&(Ke.type!=="text"||!he.test(Ke.data));)Ke=Ke[di];if(Ke&&he.exec(Ke.data)[0]!==L)continue}}Se&&(U=U.toUpperCase());let oi=this.posFromIndex(J),{line:ai,character:li}=fn(S,I,oi.top+1,oi.left),xt={rule:Yo[L],message:A.msg('lonely "$1"',Se||L==="h"?U:L),severity:dn,startIndex:pe,endIndex:ce,startLine:ai,endLine:ai,startCol:li,endCol:li+ee};if(L==="<")xt.suggestions=[{desc:"escape",range:[pe,pe+1],text:"&lt;"}];else if(L==="h"&&l!=="link-text"&&An.test(ft||""))xt.suggestions=[{desc:"whitespace",range:[pe,pe],text:" "}];else if(L==="["&&l==="ext-link-text"){let he=i.getAbsoluteIndex()+i.toString().length;xt.suggestions=[{desc:"escape",range:[he,he+1],text:"&#93;"}]}else if(L==="]"&&m==="free-ext-link"&&dn==="error"){let he=e-o.toString().length;xt.fix={range:[he,he],text:"[",desc:"left bracket"}}else Se&&(xt.suggestions=[...z[0]===U?[]:[{desc:"uppercase",range:[pe,ce],text:U}],...xe===":"||xe==="\uFF1A"?[{desc:"whitespace",range:[ce,ce+1],text:" "}]:[]]);p.push(xt)}return p}replaceData(e){N(this,Fr,Li).call(this,e)}print(){return yt(this.data)}};Fr=new WeakSet,Li=function(e){this.setAttribute("data",e)}});var ye,Ze=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 Rr(n,e),n}});var dr,ke,$t=y(()=>{"use strict";P();ke=class extends k{constructor(e,t,n,i,s,o){super(e,i,s,o);T(this,dr);b(this,dr,n)}get type(){return c(this,dr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};dr=new WeakMap});var It,D,Pe=y(()=>{"use strict";P();D=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,It);b(this,It,t)}get type(){return c(this,It)}set type(e){b(this,It,e)}};It=new WeakMap});var ea,et,$e,je,Ie,gr=y(()=>{"use strict";q();X();K();_();P();Pe();ea=a=>a==="redirect-target"||a==="link",Ie=class extends k{constructor(e,t,n=A.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,et,!0);T(this,$e);T(this,je);if(this.insertAt(new D(e,"link-target",n,i,{})),t!==void 0){let o=new k(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,$e,s)}get link(){}get fragment(){return c(this,je).fragment}afterBuild(){b(this,je,this.getTitle()),c(this,$e).includes("\0")&&b(this,$e,this.buildFromStr(c(this,$e),0)),this.setAttribute("name",c(this,je).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,et,t):e==="title"?b(this,je,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,$e));return c(this,et)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,et)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,je):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,$e).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,je),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:De(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&&!ea(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,et)?{pre:"[[",post:"]]",sep:c(this,$e)}:{sep:c(this,$e)})}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}};et=new WeakMap,$e=new WeakMap,je=new WeakMap});var ae,We=y(()=>{"use strict";P();ae=class extends k{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ri,Sn,ta,G,Ue=y(()=>{"use strict";Ze();We();Ri=[ye()];G=class extends(ta=ae){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};Sn=re(ta),G=ie(Sn,0,"NoincludeToken",Ri,G),ne(Sn,1,G)});var Pr,Pi=y(()=>{"use strict";q();gr();Ue();Pr=class extends Ie{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new G(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 ji,Ge,Nt,wn,ra,tt,Bi=y(()=>{"use strict";Ze();P();$t();Pi();ji=[ye(!1,!1)];tt=class extends(ra=k){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 Pr(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)})}};wn=re(ra),Ge=new WeakMap,Nt=new WeakMap,tt=ie(wn,0,"RedirectToken",ji,tt),ne(wn,1,tt)});var qi={};ge(qi,{parseRedirect:()=>na});var na,_i=y(()=>{"use strict";_();Bi();na=(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 tt(...t.slice(1),r,e),a):!1}});var jr,Oi=y(()=>{"use strict";P();jr=class extends k{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,Et,Cn=y(()=>{"use strict";P();Et=class extends k{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,He);se(this,"closed");se(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 Mi,$n,ia,rt,Di=y(()=>{"use strict";q();K();Ze();_();Cn();Mi=[ye(!1)];rt=class extends(ia=Et){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=E(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}};$n=re(ia),rt=ie($n,0,"IncludeToken",Mi,rt),ne($n,1,rt)});var Lt,Br=y(()=>{"use strict";Te();Lt=(a=0)=>(r,e)=>{var n,zi;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return N(this,n,zi).call(this).getAttr(l)}}return n=new WeakSet,zi=function(){return this.childNodes[a]},Rr(t,r),t}});var V,Wi,Ui,_r,In,Gi,Ft,Hi,Vi,Qi,qr,Xi,Ki,Ji,Yi,Zi=y(()=>{"use strict";V=new Set(["align"]),Wi=new Set(["cite"]),Ui=new Set(["cite","datetime"]),_r=new Set(["width"]),In=new Set(["axis","align","bgcolor","height","width","valign"]),Gi=new Set([...In,"abbr","headers","scope","rowspan","colspan"]),Ft=new Set(["type"]),Hi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Vi=new Set(["clear"]),Qi=new Set(["bgcolor","align","valign"]),qr=new Set,Xi=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"]),Ki={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:Wi,q:Wi,p:V,br:Vi,pre:_r,ins:Ui,del:Ui,ul:Ft,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Hi,"border"]),caption:V,tr:Qi,td:Gi,th:Gi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:_r,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ft,poem:V,categorytree:V,combooption:V},Ji={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:qr,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:qr,inputbox:qr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:qr,poll:new Set(["id","show-results-before-voting"]),sm2:Ft,flashmp3:Ft,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"])},Yi={table:Hi,td:new Set([...In,"scope"]),th:In,br:Vi,caption:V,div:V,hr:_r,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:Ft,p:V,pre:_r,tr:Qi,ul:Ft}});var sa,oa,pr,Rt,te,Ne,Pt,es=y(()=>{"use strict";q();X();Zi();K();_();P();Pe();sa=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,oa=new Set(["ext","arg","magic-word","template"]),Pt=class extends k{constructor(e,t,n,i="",s,o=[],l=A.getConfig(),g=[]){let u=new D(n,"attr-key",l,g),d;if(n==="title"||t==="img"&&n==="alt")d=new k(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=de(Y({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});d=new k(s,p,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new D(s,"attr-value",l,g,{});super(void 0,l,g);T(this,pr);T(this,Rt);T(this,te);T(this,Ne);b(this,pr,e),this.append(u,d),b(this,te,i),b(this,Ne,[...o]),b(this,Rt,t),this.setAttribute("name",oe(n).trim().toLowerCase())}get type(){return c(this,pr)}get tag(){return c(this,Rt)}get balanced(){return!c(this,te)||c(this,Ne)[0]===c(this,Ne)[1]}afterBuild(){c(this,te).includes("\0")&&b(this,te,this.buildFromStr(c(this,te),0)),this.parentNode&&b(this,Rt,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,te)?super.toString(e,c(this,te)+t)+n:this.firstChild.toString(e)}text(){return c(this,te)?`${super.text(`${c(this,te).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,te)?c(this,te).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 v=C(o,p,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");v.startIndex--,v.startCol--,v.suggestions=[{range:[v.endIndex,v.endIndex],text:c(this,Ne)[0],desc:"close"}],n.push(v)}let h=Ji[u],f=Ki[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"||!Xi.has(g)))){let v=C(s,p,"illegal-attr","illegal attribute name");v.suggestions=[{desc:"remove",range:[e,e+m],text:""}],n.push(v)}else if(g==="style"&&typeof d=="string"&&sa.test(d))n.push(C(o,p,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let v=C(o,p,"illegal-attr","nonzero tabindex");v.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],n.push(v)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:v})=>oa.has(v))){let v=$i.provideValues(u,g),$=String(d).toLowerCase();v.length>0&&v.every(({name:w})=>w!==$)&&n.push(C(o,p,"illegal-attr","illegal attribute value","warning"))}return(x=Yi[u])!=null&&x.has(g)&&n.push(C(s,p,"obsolete-attr","obsolete attribute","warning")),n}getValue(){return c(this,te)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ne);return c(this,te)?super.print({sep:yt(c(this,te))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.tag=this.tag,n}};pr=new WeakMap,Rt=new WeakMap,te=new WeakMap,Ne=new WeakMap});var ts,aa,Nn,ur,Ve,Or=y(()=>{"use strict";q();X();K();_();P();Pe();es();ts=a=>a.slice(0,-1),aa=a=>`${ts(a)}-dirty`;try{Nn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){Nn=/[^\W_]/u}Ve=class extends k{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});T(this,ur);if(b(this,ur,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 D(l,aa(t),i,s,{})),l="")};for(;g;){let{index:p,0:h,1:f,2:m,3:x,4:v,5:$,6:w}=g;if(l+=e.slice(u,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(f).trim())){let S=v!=null?v:w,I=[x,$],j=new Pt(ts(t),n,f,m,S,I,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,ur)}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 Pt&&(!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=E(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 Pt){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(([,v])=>v===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 D?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};ur=new WeakMap});var Mr,rs=y(()=>{"use strict";_();P();Ue();Mr=class extends k{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 G(o[0],e,t),new G(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 jt,En=y(()=>{"use strict";q();K();cr();_();P();Pe();jt=class extends k{get type(){return"ext-inner"}constructor(r,e,t=A.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=D;this.append(...e.split(`
3
- `).map(o=>i?o:nt(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,`
1
+ "use strict";(()=>{var Oo=Object.create;var Tt=Object.defineProperty,qo=Object.defineProperties,mi=Object.getOwnPropertyDescriptor,_o=Object.getOwnPropertyDescriptors,Mo=Object.getOwnPropertyNames,ci=Object.getOwnPropertySymbols;var fi=Object.prototype.hasOwnProperty,Do=Object.prototype.propertyIsEnumerable;var xi=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),yt=a=>{throw TypeError(a)};var Lr=(a,r,e)=>r in a?Tt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,K=(a,r)=>{for(var e in r||(r={}))fi.call(r,e)&&Lr(a,e,r[e]);if(ci)for(var e of ci(r))Do.call(r,e)&&Lr(a,e,r[e]);return a},de=(a,r)=>qo(a,_o(r)),hi=(a,r)=>Tt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var zo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),ge=(a,r)=>{for(var e in r)Tt(a,e,{get:r[e],enumerable:!0})},Wo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Mo(r))!fi.call(a,n)&&n!==e&&Tt(a,n,{get:()=>r[n],enumerable:!(t=mi(r,n))||t.enumerable});return a};var J=a=>Wo(Tt({},"__esModule",{value:!0}),a);var ne=a=>{var r;return[,,,Oo((r=a==null?void 0:a[xi("metadata")])!=null?r:null)]},bi=["class","method","getter","setter","accessor","field","value","get","set"],nr=a=>a!==void 0&&typeof a!="function"?yt("Function expected"):a,Go=(a,r,e,t,n)=>({kind:bi[a],name:r,metadata:t,addInitializer:i=>e._?yt("Already initialized"):n.push(nr(i||null))}),Uo=(a,r)=>Lr(r,xi("metadata"),a[3]),ie=(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},se=(a,r,e,t,n,i)=>{var s,o,l,d,p,g=r&7,u=!!(r&8),h=!!(r&16),f=g>3?a.length+1:g?u?1:2:0,m=bi[g+5],x=g>3&&(a[f-1]=[]),v=a[f]||(a[f]=[]),C=g&&(!h&&!u&&(n=n.prototype),g<5&&(g>3||!h)&&mi(g<4?n:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));g?h&&g<4&&hi(i,(g>2?"set ":g>1?"get ":"")+e):hi(n,e);for(var E=t.length-1;E>=0;E--)d=Go(g,e,l={},a[3],v),g&&(d.static=u,d.private=h,p=d.access={has:h?$=>Ho(n,$):$=>e in $},g^3&&(p.get=h?$=>(g^1?c:N)($,n,g^4?i:C.get):$=>$[e]),g>2&&(p.set=h?($,S)=>b($,n,S,g^4?i:C.set):($,S)=>$[e]=S)),o=(0,t[E])(g?g<4?h?i:C[m]:g>4?void 0:{get:C.get,set:C.set}:n,d),l._=1,g^4||o===void 0?nr(o)&&(g>4?x.unshift(o):g?h?i=o:C[m]=o:n=o):typeof o!="object"||o===null?yt("Object expected"):(nr(s=o.get)&&(C.get=s),nr(s=o.set)&&(C.set=s),nr(s=o.init)&&x.unshift(s));return g||Uo(a,n),C&&Tt(n,e,C),h?g^4?i:C:n},oe=(a,r,e)=>Lr(a,typeof r!="symbol"?r+"":r,e),mn=(a,r,e)=>r.has(a)||yt("Cannot "+e),Ho=(a,r)=>Object(r)!==r?yt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(mn(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?yt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(mn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(mn(a,r,"access private method"),e);var Fr=(a,r,e,t)=>({set _(n){b(a,r,n,e)},get _(){return c(a,r,t)}});var Ti=(a,r,e)=>new Promise((t,n)=>{var i=l=>{try{o(e.next(l))}catch(d){n(d)}},s=l=>{try{o(e.throw(l))}catch(d){n(d)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,r)).next())});var yi,ki,vi=y(()=>{"use strict";yi=(()=>{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})(),ki=(()=>{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 $e(a){return r=>{let e=new(typeof r=="string"?Map:WeakMap);if(e.has(r)){let n=e.get(r);return n.lastIndex=0,n}let t=a(r);return e.set(r,t),t}}var We,kt=y(()=>{"use strict";We=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var Ae,Ai,Fe,Re,Ze,Si,ae,tl,be,Vo,Xo,et,wi,rl,Qo,Ko,vt,Pe,Y=y(()=>{"use strict";kt();Ae=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ai=String.raw`[^[\]<>"\0-\x1F\x7F${Ae}\uFFFD]`,Fe=String.raw`(?:\[[\da-f:.]+\]|${Ai})`,Re=String.raw`(?:${Ai}|\0\d+[cn!~]\x7F)*`,Ze=(a,r)=>e=>e.replace(a,r),Si=Ze(/[\0\x7F]|\r$/gmu,""),ae=Ze(/\0\d+[cn]\x7F/gu,""),tl=Ze(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),be=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Vo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Xo=Ze(/&(?:#(\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)):Vo[e.toLowerCase()]),et=a=>Xo(a),wi=Ze(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),rl=Ze(/\n/gu,String.raw`\n`),Qo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ko=a=>Ze(a,r=>`&${Qo[r]};`),vt=Ko(/[&<>]/gu),Pe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Ci=zo((sl,Jo)=>{Jo.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 fn,$i=y(()=>{"use strict";fn=Ci()});var ir,At,sr,or,xn,P,X=y(()=>{"use strict";P=class{constructor(r,e){T(this,or);T(this,ir);T(this,At);T(this,sr);b(this,ir,r),b(this,At,e)}get start(){return c(this,At)}get top(){return N(this,or,xn).call(this).top}get left(){return N(this,or,xn).call(this).left}};ir=new WeakMap,At=new WeakMap,sr=new WeakMap,or=new WeakSet,xn=function(){var r;return(r=c(this,sr))!=null||b(this,sr,c(this,ir).getRootNode().posFromIndex(c(this,At))),c(this,sr)}});var bn,Ii,w,F,Se,Ni,q=y(()=>{"use strict";me();X();_();bn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),Ii=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof P?e:new P(r,s),{offsetHeight:d,offsetWidth:p}=r,{startIndex:g,startLine:u,startCol:h}=a(r,s,o,l),{line:f,character:m}=bn(u,h,d,p);return{rule:t,message:A.msg(n),severity:i,startIndex:g,endIndex:g+r.toString().length,startLine:u,endLine:f,startCol:h,endCol:m}},w=Ii((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}}),F=Ii((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),Se=(a,r,e)=>{if(a)return a[1];let t=r();return e([pe.rev,t]),t},Ni=(()=>{let a=(r,e)=>r==="ol"&&e==="type"?["1","a","A","i","I"]:r==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(r,e){return a(r,e).map(t=>({name:t}))}}})()});var Yo,Rr,Ei=y(()=>{"use strict";Yo=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Rr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Yo(i.trim(),t,n))});var ar,St,wt,lr,dr,Ct,$t,gr,Tn,It,yn=y(()=>{"use strict";q();me();It=class{constructor(){T(this,gr);oe(this,"childNodes",[]);T(this,ar);T(this,St);T(this,wt);T(this,lr);T(this,dr);T(this,Ct);T(this,$t,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,ar)}get nextSibling(){return c(this,St)}get previousSibling(){return c(this,wt)}get offsetHeight(){return N(this,gr,Tn).call(this).height}get offsetWidth(){return N(this,gr,Tn).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,ar,e),e||(b(this,St,void 0),b(this,wt,void 0));break;case"nextSibling":b(this,St,e);break;case"previousSibling":b(this,wt,e);break;case"aIndex":b(this,Ct,[pe.rev,e]);break;default:this[r]=e}}getRootNode(){return Se(c(this,dr),()=>{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,dr,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 Se(c(this,$t)[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,$t)[i]=[pe.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,$t)[r]=e})}getAbsoluteIndex(){return Se(c(this,Ct),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,Ct,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return Se(c(this,lr),()=>{let r=[],e=0;for(let t of String(this).split(`
2
+ `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{b(this,lr,r)})}};ar=new WeakMap,St=new WeakMap,wt=new WeakMap,lr=new WeakMap,dr=new WeakMap,Ct=new WeakMap,$t=new WeakMap,gr=new WeakSet,Tn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var Ge,kn,vn,Pr,Li=y(()=>{"use strict";Y();me();Ei();yn();Pr=class extends It{constructor(){super(...arguments);T(this,Ge)}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 pr(this,e,1)[0]}insertAt(e,t=this.length){return pr(this,t,0,[e]),e}closest(e){let t=Rr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Rr(e,this);return N(this,Ge,kn).call(this,t)}querySelectorAll(e){let t=Rr(e,this);return N(this,Ge,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 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}">`)+Pe(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=de(K({},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}};Ge=new WeakSet,kn=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,Ge,kn).call(t,e);if(i)return i}},vn=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,Ge,vn).call(n,e)));return t}});var An,Fi,Zo,ea,ta,ra,na,ia,Sn,jr,Ri,ur,Pi=y(()=>{"use strict";Y();q();_();yn();An=String.raw`[${Ae}\t]*`,Fi=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${An}\d)|isbn(?=[-::]?${An}(?:\d(?:${An}|-)){6})`,Zo=new RegExp(String.raw`${Fi}|https?[:/]/+`,"giu"),ea=new RegExp(Fi,"giu"),ta=new Set(["attr-value","ext-link-text","link-text"]),ra={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},na={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},ia=["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{Sn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){Sn=/\w/u}ur=class extends It{constructor(e){super();T(this,jr);oe(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 M,R,B;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:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:O,name:Q,tag:xe}=p;if(O!=="ext-attr")g=!0;else if(xe==="choose"&&(Q==="before"||Q==="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:Zo),n.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,x=this.getRootNode(),v=x.toString(),{ext:C,html:E}=x.getAttribute("config"),{top:$,left:S}=x.posFromIndex(e),L=new Set(["onlyinclude","noinclude","includeonly",...C,...E[0],...E[1],...E[2],...ia]);for(let O=t.exec(n);O;O=t.exec(n)){let[,Q,xe]=O,{index:ce,0:V}=O;if(xe&&xe!=="]"){let{length:he}=xe;ce+=he,V=V.slice(he)}V=V.toLowerCase();let{0:I,length:te}=V,Z=I==="r"||I==="p"||I==="i";if(I==="<"&&!L.has(Q.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(ce+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||Z&&(!i.getAttribute("plain")||ta.has(l)))continue;I==="]"&&(ce||te>1)&&t.lastIndex--;let ve=e+ce,Le=ve+te,re=v[Le],ze=v[ve-1],rr=te>1&&!(I==="<"&&!/[\s/>]/u.test(re!=null?re:"")||g&&(I==="["||I==="]")||Z&&l==="parameter-value")||I==="{"&&(re===I||ze==="-")||I==="}"&&(ze===I||re==="-")||I==="["&&(re===I||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(ce+1).trim())||I==="]"&&(ze===I||m==="free-ext-link"&&!n.slice(0,ce).includes("]"))?"error":"warning",cn=I==="{"||I==="[";if(rr==="warning"&&(cn||(I==="]"||I==="}"))){let he=ra[I],hn=cn?n.slice(ce+1):n.slice(0,ce);if(I==="{"&&((R=he.exec(hn))==null?void 0:R[0])==="}"||I==="}"&&((B=he.exec(hn))==null?void 0:B[0])==="{")continue;if(!hn.includes(I)){let ui=cn?"nextSibling":"previousSibling",Ye=this[ui];for(;Ye&&(Ye.type!=="text"||!he.test(Ye.data));)Ye=Ye[ui];if(Ye&&he.exec(Ye.data)[0]!==I)continue}}Z&&(V=V.toUpperCase());let di=this.posFromIndex(ce),{line:gi,character:pi}=bn($,S,di.top+1,di.left),bt={rule:na[I],message:A.msg('lonely "$1"',Z||I==="h"?V:I),severity:rr,startIndex:ve,endIndex:Le,startLine:gi,endLine:gi,startCol:pi,endCol:pi+te};if(I==="<")bt.suggestions=[{desc:"escape",range:[ve,ve+1],text:"&lt;"}];else if(I==="h"&&l!=="link-text"&&Sn.test(ze||""))bt.suggestions=[{desc:"whitespace",range:[ve,ve],text:" "}];else if(I==="["&&l==="ext-link-text"){let he=i.getAbsoluteIndex()+i.toString().length;bt.suggestions=[{desc:"escape",range:[he,he+1],text:"&#93;"}]}else if(I==="]"&&m==="free-ext-link"&&rr==="error"){let he=e-o.toString().length;bt.fix={range:[he,he],text:"[",desc:"left bracket"}}else Z&&(bt.suggestions=[...O[0]===V?[]:[{desc:"uppercase",range:[ve,Le],text:V}],...re===":"||re==="\uFF1A"?[{desc:"whitespace",range:[Le,Le+1],text:" "}]:[]]);u.push(bt)}return u}replaceData(e){N(this,jr,Ri).call(this,e)}print(){return vt(this.data)}};jr=new WeakSet,Ri=function(e){this.setAttribute("data",e)}});var Te,tt=y(()=>{"use strict";me();Te=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Br(n,e),n}});var cr,ye,Nt=y(()=>{"use strict";j();ye=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,cr);b(this,cr,t)}get type(){return c(this,cr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};cr=new WeakMap});var Et,W,je=y(()=>{"use strict";j();W=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,Et);b(this,Et,t)}get type(){return c(this,Et)}set type(e){b(this,Et,e)}};Et=new WeakMap});var sa,rt,we,Be,Ie,hr=y(()=>{"use strict";q();Y();X();_();j();je();sa=a=>a==="redirect-target"||a==="link",Ie=class extends k{constructor(e,t,n=A.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,rt,!0);T(this,we);T(this,Be);if(this.insertAt(new W(e,"link-target",n,i,{})),t!==void 0){let o=new k(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,we,s)}get link(){}get fragment(){return c(this,Be).fragment}afterBuild(){b(this,Be,this.getTitle()),c(this,we).includes("\0")&&b(this,we,this.buildFromStr(c(this,we),0)),this.setAttribute("name",c(this,Be).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,rt,t):e==="title"?b(this,Be,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,we));return c(this,rt)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,rt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Be):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,we).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,Be),p=new P(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&n.push(w(i,p,"unknown-page","template in an internal link target","warning")),l){let g=w(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:We(i.text())}],n.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=w(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,"&#124;")}],n.push(h)}}if(d!==void 0&&!sa(o)){let g=w(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"}),n.push(g)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,rt)?{pre:"[[",post:"]]",sep:c(this,we)}:{sep:c(this,we)})}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}};rt=new WeakMap,we=new WeakMap,Be=new WeakMap});var le,Ue=y(()=>{"use strict";j();le=class extends k{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var ji,wn,oa,U,He=y(()=>{"use strict";tt();Ue();ji=[Te()];U=class extends(oa=le){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};wn=ne(oa),U=se(wn,0,"NoincludeToken",ji,U),ie(wn,1,U)});var Or,Bi=y(()=>{"use strict";q();hr();He();Or=class extends Ie{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new U(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=w(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 Oi,Ve,Lt,Cn,aa,nt,qi=y(()=>{"use strict";tt();j();Nt();Bi();Oi=[Te(!1,!1)];nt=class extends(aa=k){constructor(e,t,n,i,s,o,l=[]){super(void 0,o,l);T(this,Ve);T(this,Lt);b(this,Ve,e),b(this,Lt,s),this.append(new ye(t,"redirect-syntax",o,l),new Or(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Ve).length:super.getAttribute(e)}toString(e){return c(this,Ve)+super.toString(e)+c(this,Lt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,Ve).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,Ve),post:c(this,Lt)})}};Cn=ne(aa),Ve=new WeakMap,Lt=new WeakMap,nt=se(Cn,0,"RedirectToken",Oi,nt),ie(Cn,1,nt)});var _i={};ge(_i,{parseRedirect:()=>la});var la,Mi=y(()=>{"use strict";_();qi();la=(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,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new nt(...t.slice(1),r,e),a):!1}});var qr,Di=y(()=>{"use strict";j();qr=class extends k{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 Xe,Ft,$n=y(()=>{"use strict";j();Ft=class extends k{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,Xe);oe(this,"closed");oe(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),b(this,Xe,[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,Xe);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,Xe);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,Xe)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,Xe);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};Xe=new WeakMap});var zi,In,da,it,Wi=y(()=>{"use strict";q();X();tt();_();$n();zi=[Te(!1)];it=class extends(da=Ft){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 P(this,r);if(t.data.trim()){let o=w(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){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}};In=ne(da),it=se(In,0,"IncludeToken",zi,it),ie(In,1,it)});var Rt,_r=y(()=>{"use strict";me();Rt=(a=0)=>(r,e)=>{var n,Gi;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return N(this,n,Gi).call(this).getAttr(l)}}return n=new WeakSet,Gi=function(){return this.childNodes[a]},Br(t,r),t}});var H,Ui,Hi,Dr,Nn,Vi,Pt,Xi,Qi,Ki,Mr,Ji,Yi,Zi,es,ts=y(()=>{"use strict";H=new Set(["align"]),Ui=new Set(["cite"]),Hi=new Set(["cite","datetime"]),Dr=new Set(["width"]),Nn=new Set(["axis","align","bgcolor","height","width","valign"]),Vi=new Set([...Nn,"abbr","headers","scope","rowspan","colspan"]),Pt=new Set(["type"]),Xi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Qi=new Set(["clear"]),Ki=new Set(["bgcolor","align","valign"]),Mr=new Set,Ji=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"]),Yi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:Ui,q:Ui,p:H,br:Qi,pre:Dr,ins:Hi,del:Hi,ul:Pt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Xi,"border"]),caption:H,tr:Ki,td:Vi,th:Vi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Dr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Pt,poem:H,categorytree:H,combooption:H},Zi={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:Mr,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:Mr,inputbox:Mr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Mr,poll:new Set(["id","show-results-before-voting"]),sm2:Pt,flashmp3:Pt,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"])},es={table:Xi,td:new Set([...Nn,"scope"]),th:Nn,br:Qi,caption:H,div:H,hr:Dr,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:Pt,p:H,pre:Dr,tr:Ki,ul:Pt}});var ga,pa,mr,jt,ee,Ne,Bt,rs=y(()=>{"use strict";q();Y();ts();X();_();j();je();ga=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,pa=new Set(["ext","arg","magic-word","template"]),Bt=class extends k{constructor(e,t,n,i="",s,o=[],l=A.getConfig(),d=[]){let p=new W(n,"attr-key",l,d),g;if(n==="title"||t==="img"&&n==="alt")g=new k(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let u=de(K({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});g=new k(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new W(s,"attr-value",l,d,{});super(void 0,l,d);T(this,mr);T(this,jt);T(this,ee);T(this,Ne);b(this,mr,e),this.append(p,g),b(this,ee,i),b(this,Ne,[...o]),b(this,jt,t),this.setAttribute("name",ae(n).trim().toLowerCase())}get type(){return c(this,mr)}get tag(){return c(this,jt)}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,jt,this.parentNode.name),this.setAttribute("name",this.firstChild.text().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:d,tag:p}=this,g=this.getValue(),u=new P(this,e);if(!i){let v=w(o,u,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");v.startIndex--,v.startCol--,v.suggestions=[{range:[v.endIndex,v.endIndex],text:c(this,Ne)[0],desc:"close"}],n.push(v)}let h=Zi[p],f=Yi[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"||!Ji.has(d)))){let v=w(s,u,"illegal-attr","illegal attribute name");v.suggestions=[{desc:"remove",range:[e,e+m],text:""}],n.push(v)}else if(d==="style"&&typeof g=="string"&&ga.test(g))n.push(w(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let v=w(o,u,"illegal-attr","nonzero tabindex");v.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],n.push(v)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:v})=>pa.has(v))){let v=Ni.provideValues(p,d),C=String(g).toLowerCase();v.length>0&&v.every(({name:E})=>E!==C)&&n.push(w(o,u,"illegal-attr","illegal attribute value","warning"))}return(x=es[p])!=null&&x.has(d)&&n.push(w(s,u,"obsolete-attr","obsolete attribute","warning")),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:vt(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}};mr=new WeakMap,jt=new WeakMap,ee=new WeakMap,Ne=new WeakMap});var ns,ua,En,fr,Qe,zr=y(()=>{"use strict";q();Y();X();_();j();je();rs();ns=a=>a.slice(0,-1),ua=a=>`${ns(a)}-dirty`;try{En=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){En=/[^\W_]/u}Qe=class extends k{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});T(this,fr);if(b(this,fr,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="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new W(l,ua(t),i,s,{})),l="")};for(;d;){let{index:u,0:h,1:f,2:m,3:x,4:v,5:C,6:E}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ae(f).trim())){let $=v!=null?v:E,S=[x,C],L=new Bt(ns(t),n,f,m,$,S,i,s);g(),super.insertAt(L)}else l+=h;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,fr)}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 Bt&&(!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,d=new P(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:""}],n.push(p)}for(let p of s)if(p instanceof Bt){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=w(p,d,"no-ignored","containing invalid attribute",En.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],n.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]});n.push(...g.map(([u,h],f)=>{let m=w(u,d,"no-duplicate",A.msg("duplicated $1 attribute",p)),x={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||g.slice(0,f).some(([,v])=>v===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 W?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};fr=new WeakMap});var Wr,is=y(()=>{"use strict";_();j();He();Wr=class extends k{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),d=0,p="";for(;o&&l;)new U(o[0],e,t),new U(l[0],e,t),p+=`${r.slice(d,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,d=l.index+s+1,n.lastIndex=d,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=p+r.slice(d)}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 Ot,Ln=y(()=>{"use strict";q();X();xr();_();j();je();Ot=class extends k{get type(){return"ext-inner"}constructor(r,e,t=A.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=W;this.append(...e.split(`
3
+ `).map(o=>i?o:st(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(`
5
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new R(this,r),t=A.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){i.setAttribute("aIndex",r);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push(C(i,e,"no-ignored",t));else{let o=s.findIndex(({type:g})=>g!=="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 g=C(i,e,"no-ignored",t);g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""}],n.push(g)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
6
- `})}}});var hr,Bt,Dr,qt,Ln=y(()=>{"use strict";q();Te();K();_();P();$t();qt=class extends k{constructor(e,t,n,i=[]){super(void 0,n,i);T(this,Bt);T(this,hr);b(this,hr,e);let s=new k(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ke(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,hr)}toString(e){let t=N(this,Bt,Dr).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Bt,Dr).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 n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),g=l||o.endsWith("="),u=i.childNodes.filter(_t("quote")),d=u.filter(({bold:m})=>m),p=u.filter(({italic:m})=>m),h=new R(this,e);if(this.level===1){let m=C(i,h,"h1","<h1>");g||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),n.push(m)}if(g){let m=C(i,h,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[m.endIndex,m.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-x.length,m.endIndex],text:""},{desc:`h${s+x.length}`,range:[m.startIndex,m.startIndex],text:x}]}n.push(m)}this.closest("html-attrs,table-attrs")&&n.push(E(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(d.length%2){let m=C(d[d.length-1],de(Y({},h),{start:e+s,left:h.left+s}),"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(m.endIndex,x).trim()?m.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}if(p.length%2){let m=C(p[p.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;m.fix=f.slice(m.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}return n}print(){let e=N(this,Bt,Dr).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};hr=new WeakMap,Bt=new WeakSet,Dr=function(){return"=".repeat(this.level)}});var la,zr,ns=y(()=>{"use strict";X();q();_();P();la=new RegExp(`https?://${Le}${Fe}$`,"iu"),zr=class extends k{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(r,e,t=A.getConfig(),n=[]){super(void 0,t,n);let i=new k(typeof r=="number"?void 0:r,t,n,{}),s=new k(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.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:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=la.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=C(n,{start:r},"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(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon,duplicated:this.duplicated}),t}}});var fr,Qe,it,st,Ot,ot,Fn,is,mr,ss=y(()=>{"use strict";X();q();Te();K();P();ns();Pe();$t();mr=class extends k{constructor(e,t,n,i=[]){var $,w;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,n,i,{});T(this,ot);se(this,"modifier","");T(this,fr,"template");T(this,Qe,":");T(this,it,!1);T(this,st,new Map);T(this,Ot);let{parserFunction:[l,g],variable:u,functionHook:d}=n,p=($=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:$[0];if(p)this.setAttribute("modifier",p),e=e.slice(p.length);else if(e.includes(":")){let[S,...I]=e.split(":"),[j]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((w=I[0])!=null?w:"");this.setModifier(`${S}:${j}`)&&(e=I.join(":").slice(j.length))}let h=e.search(/[::]/u),f=e[h]==="\uFF1A",m=h!==-1;if(m||t.length===0&&!c(this,it)){let S=m?e.slice(0,h):e,I=m&&e.slice(h+1),j=oe(S),B=m?j.slice(j.search(/\S/u))+(f?"\uFF1A":""):j.trim(),F=B.toLowerCase(),H=Array.isArray(g),z=H?g.includes(B):Object.prototype.hasOwnProperty.call(g,B),le=!H&&z?g[B]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],fe=H&&z||!("functionHook"in n)||d.includes(le),J=H&&z||u.includes(le);if(m?le&&fe:J){this.setAttribute("name",le||F.replace(/^#|:$/u,"")),b(this,fr,"magic-word"),f&&b(this,Qe,"\uFF1A");let U=new RegExp(String.raw`^\s*${B}\s*$`,z?"u":"iu"),L=new ke(S,U,"magic-word-name",n,i,{});if(super.insertAt(L),I!==!1&&t.unshift([I]),this.name==="invoke")for(let ee=0;ee<2;ee++){let Se=t.shift();if(!Se)break;let pe=new D(Se.join("="),`invoke-${ee?"function":"module"}`,n,i);super.insertAt(pe)}}}if(this.type==="template"){let S=oe(e).trim();if(!this.normalizeTitle(S,10,!0,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new D(e,"template-name",n,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),v=1;for(let S=0;S<t.length;S++){let I=t[S];x||this.name==="switch"&&S>0||this.name==="tag"&&S>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(v),v++),this.insertAt(new zr(...I,n,i))}this.seal("modifier")}get type(){return c(this,fr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=oe(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return c(this,it)&&o||!c(this,it)&&(l||e==="")||(Z.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),b(this,it,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(b(this,Ot,N(this,ot,Fn).call(this)),this.setAttribute("name",c(this,Ot).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,Qe))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":c(this,Qe))+be(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Ot);case"colon":return c(this,Qe);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new R(this,e),g=i==="magic-word";if(g&&!N(this,ot,Fn).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[g?1:0],p=d.childNodes.findIndex(f=>f.type==="text"&&Ye(f.data).includes("#")),h=d.childNodes[p];if(h){let f=C(d,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+d.getRelativeIndex(p)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},n.push(f)}}if(g&&o===2)return n.push(E(this,l,"invalid-invoke","missing module function")),n;let u=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(u.length>0)for(let[,d]of u)n.push(...d.map(p=>{let h=C(p,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,ot,is).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(_t("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,st).has(i)?s=c(this,st).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,st).set(i,s)),s}getDuplicatedArgs(){return[...c(this,st)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=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=n.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:g}=s[o].childNodes.filter(u=>u.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let u=g.getPossibleValues();s.splice(o,1,...u),o+=u.length}catch(u){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${yt(i)}${s==="magic-word"?n.print()+(t===1?"":c(this,Qe))+Re(e.slice(1),{sep:"|"}):Re(e,{sep:"|"})}}}</span>`}};fr=new WeakMap,Qe=new WeakMap,it=new WeakMap,st=new WeakMap,Ot=new WeakMap,ot=new WeakSet,Fn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,!0)},is=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?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 os,Rn,da,at,as=y(()=>{"use strict";Ze();P();os=[ye()];at=class extends(da=k){get type(){return"hidden"}};Rn=re(da),at=ie(Rn,0,"HiddenToken",os,at),ne(Rn,1,at)});var Pn,ga,Wr,ls=y(()=>{"use strict";X();q();K();P();Pe();as();Wr=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,Pn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new D(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new at(s,t,n);super.insertAt(o)}else{let o=new k(s,t,n);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`{{{${be(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=E(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}n.setAttribute("aIndex",e+3);let o=n.lint(e+3,t);if(i){let l=e+4+n.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new R(this,e);o.push(...s.map(g=>{let u=C(g,l,"no-ignored","invisible content inside triple braces");return u.startIndex--,u.startCol--,u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:""},{desc:"escape",range:[u.startIndex,u.startIndex+1],text:"{{!}}"}],u}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.default=this.default,n}};Pn=new WeakSet,ga=function(){}});var us={};ge(us,{parseBraces:()=>xr});var pa,ds,gs,ps,xr,Ur=y(()=>{"use strict";X();Ln();ss();ls();pa={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ds=String.raw`|\{{2,}`,gs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ps=a=>{let r=oe(a).trim().toLowerCase();return gs.has(r)?gs.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},xr=(a,r,e)=>{var h,f,m,x,v,$;let t=String.raw`${(h=r.excludes)!=null&&h.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=w=>w.replace(/\0(\d+)\x7F/gu,(S,I)=>s[I]);a=a.replace(/\{\{([^\n{}[]*)\}\}(?!\})|\[\[[^\n[\]{]*\]\]/gu,(w,S)=>{if(S!==void 0)try{let{length:I}=e,j=S.split("|");return new mr(j[0],j.slice(1).map(B=>{let F=B.indexOf("=");return F===-1?[B]:[B.slice(0,F),B.slice(F+1)]}),r,e),`\0${I}${ps(j[0])}\x7F`}catch(I){if(!(I instanceof SyntaxError)||I.message!=="Invalid template name")throw I}return s.push(w),`\0${s.length-1}\x7F`});let l=a.lastIndexOf("}}")-a.length,g=l+a.length!==-1,u=new RegExp(t+(g?ds:""),"gmu"),d=u.exec(a),p;for(;d||p!==void 0&&p<=a.length&&((m=(f=i[i.length-1])==null?void 0:f[0])!=null&&m.startsWith("="));){if(d!=null&&d[1]){let[,{length:U}]=d;d[0]=d[0].slice(U),d.index+=U}let{0:w,index:S}=d!=null?d:{0:`
7
- `,index:a.length},I=(x=i.pop())!=null?x:{},{0:j,index:B,parts:F,findEqual:H,pos:z}=I,le=w==="="&&H,fe=U=>{F[F.length-1].push(o(U.slice(z,S)))};if(w==="]]"||w==="}-")p=S+2;else if(w===`
8
- `){p=S+1;let{pos:U,findEqual:L}=(v=i[i.length-1])!=null?v:{};if(U===void 0||L||oe(a.slice(U,B))!==""){let ee=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(B,S));ee&&(a=`${a.slice(0,B)}\0${e.length}h\x7F${a.slice(S)}`,p=B+4+String(e.length).length,ee[2]=o(ee[2]),new qt(ee[1].length,ee.slice(2),r,e))}}else if(w==="|"||le)p=S+1,fe(a),w==="|"&&F.push([]),I.pos=p,I.findEqual=w==="|",i.push(I);else if(w.startsWith("}}")){let U=w.slice(0,Math.min(j.length,3)),L=j.length-U.length,{length:ee}=e;p=S+U.length,fe(a);let Se=!1,pe="t";if(U.length===3){let ce=F.map(ft=>ft.join("=")),xe=ce.length>1&&oe(ce[1]).trim();new Wr(ce,r,e),xe&&xe.endsWith(":")&&n.includes(xe.slice(0,-1).toLowerCase())&&(pe="s")}else try{new mr(F[0][0],F.slice(1),r,e),pe=ps(F[0][0])}catch(ce){if(ce instanceof SyntaxError&&ce.message==="Invalid template name")Se=!0;else throw ce}Se||(a=`${a.slice(0,B+L)}\0${ee}${pe}\x7F${a.slice(p)}`,p=B+L+3+String(ee).length,L>1?i.push({0:j.slice(0,L),index:B,pos:B+L,parts:[[]]}):L===1&&a[B-1]==="-"&&i.push({0:"-{",index:B-1,pos:B+1,parts:[[]]}))}else p=S+w.length,w.startsWith("{")&&(d.pos=p,d.parts=[[]]),i.push(..."0"in I?[I]:[],d);let J=i[i.length-1];if(g&&l+a.length<p)for(g=!1;($=J==null?void 0:J[0])!=null&&$.startsWith("{");)i.pop(),J=i[i.length-1];u=new RegExp(t+(g?ds:"")+(J?`|${pa[J[0][0]]}${J.findEqual?"|=":""}`:""),"gmu"),u.lastIndex=p,d=u.exec(a)}return o(a)}});var Gr,cs=y(()=>{"use strict";cr();Ur();_();En();Gr=class extends jt{constructor(r,e,t=A.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=nt(e,t,n,r)),e&&(e=xr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function hs(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i)return r;let s=new RegExp(String.raw`^(?:${e.protocol}|//|\0\d+m\x7F)`,"iu"),o=new RegExp(String.raw`^(?:(?:${e.protocol}|//)${Le}|\0\d+m\x7F)${Fe}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=A.normalizeTitle(i,0,!1,e,!1,t,!0,!0);return l.valid&&l}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var ua,ue,Vr,ms,Hr,fs=y(()=>{"use strict";X();q();_();P();ua=new Set(["alt","link","lang","page","caption"]);Hr=class extends k{constructor(e,t,n,i){var r=(...Og)=>(super(...Og),T(this,Vr),T(this,ue,""),this);var g;let s,o=Object.entries(n.img).map(([u,d])=>{let p=new RegExp(String.raw`^(\s*(?!\s))${u.replace("$1","(.*)")}${u.endsWith("$1")?`(?=$|
9
- )`:""}(\s*)$`,"u");return[u,d,p]}),l=o.find(([,u,d])=>(s=d.exec(e),s&&(s.length!==4||hs(u,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),b(this,ue,e)):(r(s[2],n,i,{}),b(this,ue,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,de(Y({},n),{excludes:[...(g=n.excludes)!=null?g:[],"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"&&!ua.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ue)?c(this,ue).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ue)?c(this,ue).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,ue).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=E(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=E(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:De(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,Vr,ms).call(this)||super.text()}print(){return c(this,ue)?`<span class="wpb-image-parameter">${c(this,ue).replace("$1",`<span class="wpb-image-caption">${Re(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ue=new WeakMap,Vr=new WeakSet,ms=function(){return c(this,ue)&&!c(this,ue).includes("$1")}});var xs,bs,Ts,ca,Mt,jn=y(()=>{"use strict";X();q();K();_();gr();fs();xs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),bs=new Set(["left","right","center","none"]),Ts=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ca=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(vi).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:g,index:u}=s;g!==e?o+=g===a?1:-1:o===0&&(i.push(t.slice(l,u)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},Mt=class extends Ie{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=A.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ca("-{","}-","|",e).map(o=>new Hr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:f})=>{let m=f.filter(x=>x.text().trim());return m.length!==1||m[0].type!=="arg"}),i=[...new Set(n.map(({name:f})=>f))],s=i.filter(f=>xs.has(f)),o=i.filter(f=>bs.has(f)),l=i.filter(f=>Ts.has(f)),[g]=s,u=g==="framed"||g==="manualthumb",d=new R(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(E(this,d,"nested-link","internal link in an external link")),u)for(let f of n.filter(({name:m})=>m==="width")){let m=C(f,d,"invalid-gallery","invalid image parameter");m.fix={range:[m.startIndex-1,m.endIndex],text:"",desc:"remove"},t.push(m)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(f,m)=>x=>{let v=C(x,d,"no-duplicate",A.msg(`${f} image $1 parameter`,m));return v.suggestions=[{desc:"remove",range:[v.startIndex-1,v.endIndex],text:""}],v};for(let f of i){if(f==="invalid"||f==="width"&&u)continue;let m=n.filter(({name:x})=>x===f);f==="caption"&&(m=[...m.slice(0,-1).filter(x=>x.text()),...m.slice(-1)]),m.length>1&&t.push(...m.map(p("duplicated",f)))}return s.length>1&&t.push(...n.filter(({name:f})=>xs.has(f)).map(p("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:f})=>bs.has(f)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:f})=>Ts.has(f)).map(p("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var Dt,Bn=y(()=>{"use strict";q();_();P();jn();Dt=class extends Mt{constructor(e,t,n,i=A.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new k(n,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);se(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,e,!0,!t)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=E(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}}});var lt,ys,qn,Qr,ks=y(()=>{"use strict";_();P();Bn();Ue();Qr=class extends k{constructor(e,t=A.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,lt);for(let s of(i=e==null?void 0:e.split(`
10
- `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new G(s,t,n):s);continue}let[,l,g]=o;N(this,lt,ys).call(this,l)?super.insertAt(new Dt("gallery",l,g,t,n)):super.insertAt(new G(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,lt,qn).call(this,"widths")}get heights(){return N(this,lt,qn).call(this,"heights")}toString(e){return super.toString(e,`
5
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new P(this,r),t=A.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){i.setAttribute("aIndex",r);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push(w(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=w(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],n.push(d)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
6
+ `})}}});var br,qt,Gr,_t,Fn=y(()=>{"use strict";q();me();X();_();j();Nt();_t=class extends k{constructor(e,t,n,i=[]){super(void 0,n,i);T(this,qt);T(this,br);b(this,br,e);let s=new k(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ye(t[1],"heading-trail",n,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,br)}toString(e){let t=N(this,qt,Gr).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,qt,Gr).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 n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(Mt("quote")),g=p.filter(({bold:m})=>m),u=p.filter(({italic:m})=>m),h=new P(this,e);if(this.level===1){let m=w(i,h,"h1","<h1>");d||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),n.push(m)}if(d){let m=w(i,h,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[m.endIndex,m.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-x.length,m.endIndex],text:""},{desc:`h${s+x.length}`,range:[m.startIndex,m.startIndex],text:x}]}n.push(m)}this.closest("html-attrs,table-attrs")&&n.push(F(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let m=w(g[g.length-1],de(K({},h),{start:e+s,left:h.left+s}),"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(m.endIndex,x).trim()?m.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}if(u.length%2){let m=w(u[u.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;m.fix=f.slice(m.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}return n}print(){let e=N(this,qt,Gr).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};br=new WeakMap,qt=new WeakSet,Gr=function(){return"=".repeat(this.level)}});var ca,Ur,ss=y(()=>{"use strict";Y();q();_();j();ca=new RegExp(`https?://${Fe}${Re}$`,"iu"),Ur=class extends k{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(r,e,t=A.getConfig(),n=[]){super(void 0,t,n);let i=new k(typeof r=="number"?void 0:r,t,n,{}),s=new k(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.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:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=ca.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=w(n,{start:r},"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(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var yr,Ke,ot,at,Dt,lt,Rn,os,Tr,as=y(()=>{"use strict";Y();q();me();X();j();ss();je();Nt();Tr=class extends k{constructor(e,t,n,i=[]){var C,E;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,n,i,{});T(this,lt);oe(this,"modifier","");T(this,yr,"template");T(this,Ke,":");T(this,ot,!1);T(this,at,new Map);T(this,Dt);let{parserFunction:[l,d],variable:p,functionHook:g}=n,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[$,...S]=e.split(":"),[L]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((E=S[0])!=null?E:"");this.setModifier(`${$}:${L}`)&&(e=S.join(":").slice(L.length))}let h=e.search(/[::]/u),f=e[h]==="\uFF1A",m=h!==-1;if(m||t.length===0&&!c(this,ot)){let $=m?e.slice(0,h):e,S=m&&e.slice(h+1),L=ae($),M=m?L.slice(L.search(/\S/u))+(f?"\uFF1A":""):L.trim(),R=M.toLowerCase(),B=Array.isArray(d),O=B?d.includes(M):Object.prototype.hasOwnProperty.call(d,M),Q=!B&&O?d[M]:Object.prototype.hasOwnProperty.call(l,R)&&l[R],xe=B&&O||!("functionHook"in n)||g.includes(Q),ce=B&&O||p.includes(Q);if(m?Q&&xe:ce){this.setAttribute("name",Q||R.replace(/^#|:$/u,"")),b(this,yr,"magic-word"),f&&b(this,Ke,"\uFF1A");let V=new ye($,"magic-word-name",n,i);if(super.insertAt(V),S!==!1&&t.unshift([S]),this.name==="invoke")for(let I=0;I<2;I++){let te=t.shift();if(!te)break;let Z=new W(te.join("="),`invoke-${I?"function":"module"}`,n,i);super.insertAt(Z)}}}if(this.type==="template"){let $=ae(e).trim();if(!this.normalizeTitle($,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new W(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),v=1;for(let $=0;$<t.length;$++){let S=t[$];x||this.name==="switch"&&$>0||this.name==="tag"&&$>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(v),v++),this.insertAt(new Ur(...S,n,i))}this.seal("modifier")}get type(){return c(this,yr)}setModifier(e){let{parserFunction:[,,t,n]}=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=n.includes(s);return c(this,ot)&&o||!c(this,ot)&&(l||e==="")||(pe.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),b(this,ot,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(b(this,Dt,N(this,lt,Rn).call(this)),this.setAttribute("name",c(this,Dt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,Ke))+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":c(this,Ke))+be(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Dt);case"colon":return c(this,Ke);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new P(this,e),d=i==="magic-word";if(d&&!N(this,lt,Rn).call(this).valid)n.push(w(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&&et(f.data).includes("#")),h=g.childNodes[u];if(h){let f=w(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},n.push(f)}}if(d&&o===2)return n.push(F(this,l,"invalid-invoke","missing module function")),n;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)n.push(...g.map(u=>{let h=w(u,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,lt,os).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Mt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,at).has(i)?s=c(this,at).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,at).set(i,s)),s}getDuplicatedArgs(){return[...c(this,at)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=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=n.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=n.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:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${vt(i)}${s==="magic-word"?n.print()+(t===1?"":c(this,Ke))+Pe(e.slice(1),{sep:"|"}):Pe(e,{sep:"|"})}}}</span>`}};yr=new WeakMap,Ke=new WeakMap,ot=new WeakMap,at=new WeakMap,Dt=new WeakMap,lt=new WeakSet,Rn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},os=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?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,Pn,ha,dt,ds=y(()=>{"use strict";tt();j();ls=[Te()];dt=class extends(ha=k){get type(){return"hidden"}};Pn=ne(ha),dt=se(Pn,0,"HiddenToken",ls,dt),ie(Pn,1,dt)});var jn,ma,Hr,gs=y(()=>{"use strict";Y();q();X();j();je();ds();Hr=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,jn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new W(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new dt(s,t,n);super.insertAt(o)}else{let o=new k(s,t,n);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`{{{${be(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,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]}n.setAttribute("aIndex",e+3);let o=n.lint(e+3,t);if(i){let l=e+4+n.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new P(this,e);o.push(...s.map(d=>{let p=w(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 n=super.json(void 0,t);return n.default=this.default,n}};jn=new WeakSet,ma=function(){}});var xs={};ge(xs,{parseBraces:()=>kr});var fa,ps,Bn,us,cs,hs,fs,ms,kr,Vr=y(()=>{"use strict";kt();Y();Fn();as();gs();fa={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ps=String.raw`\[(?!\[)`,Bn=String.raw`\n(?![=\0])`,us=String.raw`|\{{2,}`,cs=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),hs=$e(a=>new RegExp(a,"gmu"));fs=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ps}|${Bn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Bn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ps}|${Bn})*\}-`,"gu");ms=a=>{let r=ae(a).trim().toLowerCase();return cs.has(r)?cs.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},kr=(a,r,e)=>{var m,x,v,C,E,$;let t=String.raw`${(m=r.excludes)!=null&&m.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=S=>S.replace(/\0(\d+)\x7F/gu,(L,M)=>s[M]),l=(S,L,M,R)=>{L[L.length-1].push(o(S.slice(M,R)))},d;do d!==void 0&&(a=d),d=a.replace(fs,(S,L,M)=>{if(L!==void 0||typeof M=="string")try{let{length:R}=e,B=(L!=null?L:M).split("|");return new Tr(o(B[0]),B.slice(1).map(O=>{let Q=O.indexOf("=");return(Q===-1?[O]:[O.slice(0,Q),O.slice(Q+1)]).map(o)}),r,e),`\0${R}${ms(B[0])}\x7F`}catch(R){if(!(R instanceof SyntaxError)||R.message!=="Invalid template name")throw R}return s.push(o(S)),`\0${s.length-1}\x7F`});while(d!==a);a=d;let p=a.lastIndexOf("}}")-a.length,g=p+a.length!==-1,u=hs(t+(g?us:"")),h=u.exec(a),f;for(;h||f!==void 0&&f<=a.length&&((v=(x=i[i.length-1])==null?void 0:x[0])!=null&&v.startsWith("="));){if(h!=null&&h[1]){let[,{length:I}]=h;h[0]=h[0].slice(I),h.index+=I}let{0:S,index:L}=h!=null?h:{0:`
7
+ `,index:a.length},M=(C=i.pop())!=null?C:{},{0:R,index:B,parts:O,findEqual:Q,pos:xe}=M,ce=S==="="&&Q;if(S==="]]"||S==="}-")f=L+2;else if(S===`
8
+ `){f=L+1;let{pos:I,findEqual:te}=(E=i[i.length-1])!=null?E:{};if(I===void 0||te||ae(a.slice(I,B))!==""){let Z=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(B,L));Z&&(Z[2]=o(Z[2]),Z[2].includes(`
9
+ `)||(a=`${a.slice(0,B)}\0${e.length}h\x7F${a.slice(L)}`,f=B+4+String(e.length).length,new _t(Z[1].length,Z.slice(2),r,e)))}}else if(S==="|"||ce)f=L+1,l(a,O,xe,L),S==="|"&&O.push([]),M.pos=f,M.findEqual=S==="|",i.push(M);else if(S.startsWith("}}")){let I=S.slice(0,Math.min(R.length,3)),te=R.length-I.length,{length:Z}=e;f=L+I.length,l(a,O,xe,L);let ve=!1,Le="t";if(I.length===3){let re=O.map(rr=>rr.join("=")),ze=re.length>1&&ae(re[1]).trim();new Hr(re,r,e),ze&&ze.endsWith(":")&&n.includes(ze.slice(0,-1).toLowerCase())&&(Le="s")}else try{new Tr(O[0][0],O.slice(1),r,e),Le=ms(O[0][0])}catch(re){if(re instanceof SyntaxError&&re.message==="Invalid template name")ve=!0;else throw re}ve||(a=`${a.slice(0,B+te)}\0${Z}${Le}\x7F${a.slice(f)}`,f=B+te+3+String(Z).length,te>1?i.push({0:R.slice(0,te),index:B,pos:B+te,parts:[[]]}):te===1&&a[B-1]==="-"&&i.push({0:"-{",index:B-1,pos:B+1,parts:[[]]}))}else f=L+S.length,S.startsWith("{")&&(h.pos=f,h.parts=[[]]),i.push(..."0"in M?[M]:[],h);let V=i[i.length-1];if(g&&p+a.length<f)for(g=!1;($=V==null?void 0:V[0])!=null&&$.startsWith("{");)i.pop(),V=i[i.length-1];u=hs(t+(g?us:"")+(V?`|${fa[V[0][0]]}${V.findEqual?"|=":""}`:"")),u.lastIndex=f,h=u.exec(a)}return o(a)}});var Xr,bs=y(()=>{"use strict";xr();Vr();_();Ln();Xr=class extends Ot{constructor(r,e,t=A.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=st(e,t,n,r)),e&&(e=kr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function Ts(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(xa(e.protocol).test(i))return ba(e.protocol).test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return r;let s=A.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var xa,ba,Ta,ya,ue,Kr,ys,Qr,ks=y(()=>{"use strict";kt();Y();q();_();j();xa=$e(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),ba=$e(a=>new RegExp(String.raw`^(?:(?:${a}|//)${Fe}|\0\d+m\x7F)${Re}$`,"iu")),Ta=$e(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
10
+ )`:""}(\s*)$`,"u")),ya=new Set(["alt","link","lang","page","caption"]);Qr=class extends k{constructor(e,t,n,i){var r=(...Yg)=>(super(...Yg),T(this,Kr),T(this,ue,""),this);var d;let s,o=Object.entries(n.img).map(([p,g])=>[p,g,Ta(p)]),l=o.find(([,p,g])=>(s=g.exec(e),s&&(s.length!==4||Ts(p,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),b(this,ue,e)):(r(s[2],n,i,{}),b(this,ue,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,de(K({},n),{excludes:[...(d=n.excludes)!=null?d:[],"list"]}),i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Ts("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ya.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ue)?c(this,ue).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ue)?c(this,ue).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,ue).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=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"},n.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:We(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,Kr,ys).call(this)||super.text()}print(){return c(this,ue)?`<span class="wpb-image-parameter">${c(this,ue).replace("$1",`<span class="wpb-image-caption">${Pe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ue=new WeakMap,Kr=new WeakSet,ys=function(){return c(this,ue)&&!c(this,ue).includes("$1")}});var vs,As,Ss,ka,va,zt,On=y(()=>{"use strict";q();X();_();hr();ks();vs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),As=new Set(["left","right","center","none"]),Ss=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ka=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),va=a=>{if(a===void 0)return[];let r=/-\{|\}-|\|/gu,e=[],t=r.exec(a),n=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(a.slice(i,o)),{lastIndex:i}=r),t=r.exec(a)}return e.push(a.slice(i)),e},zt=class extends Ie{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=A.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...va(e).map(o=>new Qr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var f;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let x=m.filter(v=>v.text().trim());return x.length!==1||x[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>vs.has(m)),o=i.filter(m=>As.has(m)),l=i.filter(m=>Ss.has(m)),[d]=s,p=d==="framed"||d==="manualthumb",g=new P(this,r);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 n.filter(({name:x})=>x==="width")){let x=w(m,g,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let u=(m,x,v)=>C=>{let E=w(C,g,"no-duplicate",A.msg(`${m} image $1 parameter`,x),v);return E.suggestions=[{desc:"remove",range:[E.startIndex-1,E.endIndex],text:""}],E},{extension:h}=this;for(let m of i){if(m==="invalid"||m==="width"&&p)continue;let x=n.filter(({name:v})=>v===m);m==="caption"&&(x=[...x.slice(0,-1).filter(v=>v.text()),...x.slice(-1)]),x.length>1&&t.push(...x.map(u("duplicated",m,m==="caption"&&h&&!ka.has(h)?"warning":"error")))}return s.length>1&&t.push(...n.filter(({name:m})=>vs.has(m)).map(u("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>As.has(m)).map(u("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>Ss.has(m)).map(u("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var Wt,qn=y(()=>{"use strict";q();_();j();On();Wt=class extends zt{constructor(e,t,n,i=A.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new k(n,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);oe(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 n=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:"}],n.push(s)}return n}}});var gt,ws,_n,Jr,Cs=y(()=>{"use strict";_();j();qn();He();Jr=class extends k{constructor(e,t=A.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,gt);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 U(s,t,n):s);continue}let[,l,d]=o;N(this,gt,ws).call(this,l)?super.insertAt(new Wt("gallery",l,d,t,n)):super.insertAt(new U(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,gt,_n).call(this,"widths")}get heights(){return N(this,gt,_n).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:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],g=l.toString(),{length:u}=g,d=g.trim(),{type:p}=l,h=n+o,f=o?0:i;if(l.setAttribute("aIndex",e),p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let m=e+u;s.push({rule:"no-ignored",message:A.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:m,startLine:h,endLine:h,startCol:f,endCol:f+u,suggestions:[{desc:"remove",range:[e,m],text:""},{desc:"comment",range:[e,m],text:`<!--${g}-->`}]})}else p!=="noinclude"&&p!=="text"&&s.push(...l.lint(e,t));e+=u+1}return s}print(){return super.print({sep:`
14
- `})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{widths:this.widths,heights:this.heights}),n}};lt=new WeakSet,ys=function(e){return this.normalizeTitle(e,6,!0,!0,!0).valid},qn=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),n=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return n&&Number(n)||120}});var zt,_n=y(()=>{"use strict";q();gr();zt=class extends Ie{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(E(this,{start:r},"nested-link","internal link in an external link")),t}}});var ha,ma,br,Be,Xr=y(()=>{"use strict";q();X();K();_();P();ha=String.raw`(?:[${we}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,ma=new RegExp(`${ha}+`,"gu"),Be=class extends k{constructor(e,t="free-ext-link",n=A.getConfig(),i){super(e,n,i,{});T(this,br);b(this,br,t)}get type(){return c(this,br)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=be(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(ma," ")),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:Ai(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:d}=this;if(d.startsWith("ISBN")){let p=[...d.slice(5)].map(h=>h==="X"?10:Number(h));(p.length===10&&p.reduce((h,f,m)=>h+f*(10-m),0)%11||p.length===13&&(p[12]===10||p.reduce((h,f,m)=>h+f*(m%2?3:1),0)%10))&&n.push(E(this,i,"invalid-isbn","invalid ISBN"))}return n}let l=s==="ext-link-url",g=l?/\|/u:/[,;。:!?()]+/u,u=o.find(d=>d.type==="text"&&g.test(d.data));if(u){let{data:d}=u,p=C(u,i,"unterminated-url",A.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:f}=g.exec(d),m=p.startIndex+h;p.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)}],n.push(p)}return n}getUrl(e){}};br=new WeakMap});var qe,Wt,On=y(()=>{"use strict";q();_();P();Xr();Wt=class extends k{constructor(e,t="",n="",i=A.getConfig(),s=[]){super(void 0,i,s,{});T(this,qe);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Be(e,"ext-link-url",i,s);if(this.insertAt(o),b(this,qe,t),n){let l=new k(n,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,qe)}]`:`[${super.toString(e,c(this,qe))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,qe).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(E(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,qe)}]`}:{pre:"[",sep:c(this,qe),post:"]"})}};qe=new WeakMap});var Tr,vs=y(()=>{"use strict";P();Ue();_n();On();Tr=class extends k{get type(){return"imagemap-link"}constructor(r,e,t,n,i=[]){super(void 0,n,i),this.append(r,e.length===2?new zt(...e,n,i):new Wt(...e,n,i),new G(t,n,i))}}});var Kr,As=y(()=>{"use strict";q();Te();K();_();P();Ue();Bn();vs();Kr=class extends k{get type(){return"ext-inner"}get image(){return this.childNodes.find(_t("imagemap-image"))}constructor(r,e=A.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
15
- `),i=new Set(e.protocol.split("|")),s=G,o=!0,l=!1;for(let g of n){let u=g.trim();if(!(l||!u||u.startsWith("#"))){if(o){let d=g.indexOf("|"),p=d===-1?g:g.slice(0,d),{valid:h,ns:f}=this.normalizeTitle(p,0,!0,!0);if(h&&f===6){let m=new Dt("imagemap",p,d===-1?void 0:g.slice(d+1),e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(g.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let d=g.indexOf("["),p=g.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(p);if(h){if(this.normalizeTitle(h[1],0,!0,!0,!1,!0).valid){super.insertAt(new Tr(g.slice(0,d),h.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(i.has(p.slice(1,p.indexOf(":")+1))||i.has(p.slice(1,p.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(p);if(f){super.insertAt(new Tr(g.slice(0,d),f.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}toString(r){return super.toString(r,`
14
+ `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:n,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=n+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 n=super.json(void 0,t);return Object.assign(n,{widths:this.widths,heights:this.heights}),n}};gt=new WeakSet,ws=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},_n=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),n=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return n&&Number(n)||120}});var Gt,Mn=y(()=>{"use strict";q();hr();Gt=class extends Ie{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(F(this,{start:r},"nested-link","internal link in an external link")),t}}});var Aa,Sa,vr,Oe,Yr=y(()=>{"use strict";q();Y();X();_();j();Aa=String.raw`(?:[${Ae}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,Sa=new RegExp(`${Aa}+`,"gu"),Oe=class extends k{constructor(e,t="free-ext-link",n=A.getConfig(),i){super(e,n,i,{});T(this,vr);b(this,vr,t)}get type(){return c(this,vr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=be(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(Sa," ")),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:wi(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new P(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))&&n.push(F(this,i,"invalid-isbn","invalid ISBN"))}return n}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=w(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)}],n.push(u)}return n}getUrl(e){}};vr=new WeakMap});var qe,Ut,Dn=y(()=>{"use strict";q();_();j();Yr();Ut=class extends k{constructor(e,t="",n="",i=A.getConfig(),s=[]){super(void 0,i,s,{});T(this,qe);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Oe(e,"ext-link-url",i,s);if(this.insertAt(o),b(this,qe,t),n){let l=new k(n,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,qe)}]`:`[${super.toString(e,c(this,qe))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,qe).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(F(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,qe)}]`}:{pre:"[",sep:c(this,qe),post:"]"})}};qe=new WeakMap});var Ar,$s=y(()=>{"use strict";j();He();Mn();Dn();Ar=class extends k{get type(){return"imagemap-link"}constructor(r,e,t,n,i=[]){super(void 0,n,i),this.append(r,e.length===2?new Gt(...e,n,i):new Ut(...e,n,i),new U(t,n,i))}}});var Zr,Is=y(()=>{"use strict";q();me();X();_();j();He();qn();$s();Zr=class extends k{get type(){return"ext-inner"}get image(){return this.childNodes.find(Mt("imagemap-image"))}constructor(r,e=A.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
16
+ `),i=new Set(e.protocol.split("|")),s=U,o=!0,l=!1;for(let d of n){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 Wt("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 Ar(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 Ar(d.slice(0,g),f.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,e,t))}}toString(r){return super.toString(r,`
16
17
  `)}text(){return super.text(`
17
18
  `).replace(/\n{2,}/gu,`
18
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);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=C(i,n,"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(E(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
19
- `})}}});var Jr,Ss=y(()=>{"use strict";q();_();We();Jr=class extends ae{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let i=E(this,{start:r},"void-ext",A.msg("nothing should be in <$1>",e));return i.fix={range:[r,i.endIndex],text:"",desc:"empty"},[i]}let n=new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu");return super.lint(r,n)}}});var Yr={};ge(Yr,{NestedToken:()=>Mn});var fa,yr,Ut,Mn,Zr=y(()=>{"use strict";q();K();cr();Ur();_();P();Dn();Ue();fa=new Set(["comment","include","arg","template","magic-word"]),Mn=class extends k{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=nt(e,i,s,t)),e&&(e=xr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,g,u,d)=>{let p=`\0${s.length+1}e\x7F`;return new _e(l,g,u,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new G(g,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,yr);T(this,Ut);b(this,yr,[...n]),b(this,Ut,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new R(this,e),i=c(this,Ut)?"includeonly":"noinclude",s=typeof c(this,Ut)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{let{type:l,name:g}=o;if(l==="ext")return!c(this,yr).includes(g);if(fa.has(l))return!1;let u=o.toString().trim();return u&&!s.test(u)}).map(o=>{let l=C(o,n,"no-ignored",A.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};yr=new WeakMap,Ut=new WeakMap});var ws,Cs,zn,xa,_e,Dn=y(()=>{"use strict";q();K();_();Br();P();Cn();Or();rs();En();cs();ks();As();Ss();ws=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};Cs=[Lt()];_e=class extends(xa=Et){get type(){return"ext"}constructor(r,e,t,n,i=A.getConfig(),s=!1,o=[]){var p;let l=r.toLowerCase(),g=new Ve(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u=de(Y({},i),{ext:ws(i.ext,l),excludes:[...(p=i.excludes)!=null?p:[]]}),d;switch(u.inExt=!0,l){case"tab":u.ext=ws(u.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&u.excludes.push("heading"),d=new k(t,u,o);break;case"pre":d=new Mr(t,u,o);break;case"dynamicpagelist":d=new jt(s,t,u,o);break;case"inputbox":u.excludes.push("heading"),d=new Gr(s,t,u,o);break;case"references":{let{NestedToken:h}=(Zr(),Q(Yr));u.excludes.push("heading"),d=new h(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:h}=(Zr(),Q(Yr));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:h}=(Zr(),Q(Yr));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":d=new Qr(t,u,o);break;case"imagemap":d=new Kr(t,u,o);break;default:d=new Jr(t,u,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,g,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(E(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(E(this,n,"var-anchor","variable anchor in a section header")),t}};zn=re(xa),_e=ie(zn,0,"ExtToken",Cs,_e),ne(zn,1,_e)});var $s,Wn,ba,dt,Is=y(()=>{"use strict";q();Ze();_();We();$s=[ye(!1)];dt=class extends(ba=ae){constructor(e,t,n,i){super(e,n,i);se(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=E(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:"&lt;!--",post:this.closed?"--&gt;":""})}};Wn=re(ba),dt=ie(Wn,0,"CommentToken",$s,dt),ne(Wn,1,dt)});var Ls={};ge(Ls,{parseCommentAndExt:()=>nt});var Es,Ta,Un,ya,ka,va,Ns,nt,cr=y(()=>{"use strict";Oi();Ue();Di();Dn();Is();Es="<onlyinclude>",Ta="</onlyinclude>",{length:Un}=Es,ya=new WeakMap,ka=new WeakMap,va=(a,r)=>{let e=r?ya:ka;if(e.has(a))return e.get(a);let t=r?"includeonly":"(?:no|only)include",n=r?"noinclude":"includeonly",i=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${a.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${n}\s*)>|$))`,"giu");return e.set(a,i),i},Ns=a=>{let r=a.indexOf(Es);return{i:r,j:a.indexOf(Ta,r+Un)}},nt=(a,r,e,t)=>{if(t){let{i:n,j:i}=Ns(a);if(n!==-1&&i!==-1){let s="",o=l=>{new G(l,r,e),s+=`\0${e.length-1}n\x7F`};for(;n!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new jr(a.slice(n+Un,i),r,e),n>0&&o(a.slice(0,n)),s+=l,a=a.slice(i+Un+1),{i:n,j:i}=Ns(a)}return a&&o(a),s}}return a.replace(va(r.ext,t),(n,i,s,o,l,g,u,d,p)=>{let h=e.length,f="n";if(i)f="e",new _e(i,s,o,l,r,g,e);else if(n.startsWith("<!--")){f="c";let m=n.endsWith("-->");new dt(n.slice(4,m?-3:void 0),m,r,e)}else g?new rt(g,u,d,p,r,e):new G(n,r,e);return`\0${h}${f}\x7F`})}});var Aa,Sa,wa,Fs,Gt,Ee,Xe,Oe,Gn,Ca,gt,Rs=y(()=>{"use strict";q();Te();K();Br();P();Aa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Sa=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"]),wa=new Set(["strike","big","center","font","tt"]);Fs=[Lt()];gt=class extends(Ca=k){constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Gt);T(this,Ee);T(this,Xe);T(this,Oe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),b(this,Gt,n),b(this,Ee,i),b(this,Xe,e)}get type(){return"html"}get selfClosing(){return c(this,Ee)}get closing(){return c(this,Gt)}toString(e){return`<${this.closing?"/":""}${c(this,Xe)}${super.toString(e)}${c(this,Ee)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Xe)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Ee)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Xe).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,g=new R(this,e);if(i==="h1"&&!o){let m=E(this,g,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(m)}if(this.closest("table-attrs")){let m=E(this,g,"parsing-order","HTML tag in table attributes");m.fix={desc:"remove",range:[e,m.endIndex],text:""},n.push(m)}wa.has(i)&&n.push(E(this,g,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&n.push(E(this,g,"bold-header","bold in section header","warning"));let{html:[,u,d]}=this.getAttribute("config"),p=d.includes(i),h=u.includes(i);if(o&&(l||p)||l&&(!p&&!h)){let m=E(this,g,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},v={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[x,v]:o?m.fix=p?x:v:m.suggestions=[v,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],n.push(m)}else if(!this.findMatchingTag()){let m=E(this,g,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Aa.has(x.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Sa.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:v,name:$})=>v==="html"&&$===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}n.push(m)}return n}findMatchingTag(){return Ce(c(this,Oe),()=>{let{name:e,parentNode:t,closing:n,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),g=s.includes(e);if(l||g&&i)return this;if(!t)return;let{childNodes:u}=t,d=u.indexOf(this),p=n?u.slice(0,d).reverse():u.slice(d+1),h=[this],{rev:f}=Z;for(let m of p)if(!(!m.is("html")||m.name!==e||g&&c(m,Ee)))if(c(m,Gt)===n)h.push(m);else{let x=h.pop();if(x===this)return m;b(x,Oe,[f,m]),b(m,Oe,[f,x])}for(let m of h)b(m,Oe,[f,void 0])},e=>{b(this,Oe,e),e[1]&&e[1]!==this&&b(e[1],Oe,[Z.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Xe)}`,post:`${c(this,Ee)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Ee)}),n}};Gn=re(Ca),Gt=new WeakMap,Ee=new WeakMap,Xe=new WeakMap,Oe=new WeakMap,gt=ie(Gn,0,"HtmlToken",Fs,gt),ne(Gn,1,gt)});var Ps={};ge(Ps,{parseHtml:()=>Ia});var $a,Ia,js=y(()=>{"use strict";Or();Rs();$a=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Ia=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=$a.exec(o),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!r.htmlElements.has(u)){i+=`<${o}`;continue}let[,d,,p="",h,f]=l,{length:m}=e,x=new Ve(p,"html-attrs",u,r,e),v=x.getAttr("itemprop");if(u==="meta"&&(v===void 0||x.getAttr("content")===void 0)||u==="link"&&(v===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new gt(g,x,d==="/",h==="/>",r,e)}return i}});var Ht,Hn=y(()=>{"use strict";Br();_();P();$t();Or();Ht=class extends Lt(1)(k){constructor(r,e,t,n,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ke(e,r,"table-syntax",i,s,{}),new Ve(n,"table-attrs",t,i,s))}}});var ve,kr,vr,Vn,Vt,Qn=y(()=>{"use strict";q();K();_();P();Hn();Vt=class extends Ht{constructor(e,t,n=A.getConfig(),i=[]){var g;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,n,i);T(this,vr);T(this,ve,"");T(this,kr);s&&([Nr(this,ve)._]=s);let l=new k(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,ve).length),n,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 N(this,vr,Vn).call(this).subtype}afterBuild(){c(this,ve).includes("\0")&&b(this,ve,this.buildFromStr(c(this,ve),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,ve)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,ve)+n.text()}getGaps(e){return e===1?c(this,ve).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(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("||"),g=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let u={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
20
- ${u}`),desc:"newline"}}else g.suggestions=[{desc:"escape",range:[g.startIndex,g.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(g)}}return n}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,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,ve)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{subtype:this.subtype,rowspan:this.rowspan,colspan:this.colspan}),n}};ve=new WeakMap,kr=new WeakMap,vr=new WeakSet,Vn=function(){return Ce(c(this,kr),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return Y({},N(o=i,vr,Vn).call(o))},e=>{b(this,kr,e)})}});var Qt,Xn=y(()=>{"use strict";q();Hn();Qn();Qt=class extends Ht{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return t;let i=n.childNodes.find(l=>l.text().trim()),s=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!i||s.test(i.toString())||i.is("arg")&&s.test(i.default||""))return t;if(i.is("magic-word"))try{if(i.getPossibleValues().every(l=>s.test(l.text())))return t}catch(l){}let o=C(n,{start:r},"fostered-content","content to be moved out from the table");return o.severity=i.type==="template"?"warning":"error",o.startIndex++,o.startLine++,o.startCol=0,t.push(o),t}getRowCount(){return Number(this.childNodes.some(r=>r instanceof Vt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Na,Ea,La,Kn,en,Bs=y(()=>{"use strict";q();Te();K();_();Xn();$t();Na=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Ea=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),La=({type:a})=>a==="tr"||a==="table-syntax",Kn=class extends Array{},en=class extends Qt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",A.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,g=0;for(;g<s;g++){let u=i[g],d=u.length;if(d<o)break;d<l&&(l=d);let p=u.indexOf(u[d-1])+1;if(p>l)break;p>o&&(o=p)}if(g<s){let u=C(this.getNthRow(g),n,"table-layout","inconsistent table layout","warning");u.startIndex++,u.startLine++,u.startCol=0,t.push(u)}}return t}close(r=`
22
- |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:A.parse(r,this.getAttribute("include"),2,t).childNodes;Z.run(()=>{let s=new ke(void 0,Na,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new Kn(...Ea(t,()=>[]));for(let i=0;i<n.length;i++){let s=n[i],o=0,l=0,g;for(let u of e[i].childNodes.slice(2))if(u.type==="td"){if(u.isIndependent()&&(g=u.subtype!=="caption"),g){let d={row:i,column:o},{rowspan:p,colspan:h}=u;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+p,t);f++)for(let m=l;m<l+h;m++)n[f][m]=d;l+=h}}else if(La(u))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(r--,r<0))return i}}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var tn,qs=y(()=>{"use strict";Xn();tn=class extends Qt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var Xt,Jn=y(()=>{"use strict";We();Xt=class extends ae{get indent(){return this.innerText.split(":").length-1}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:n}=this;return n&&(t.indent=n),t}}});var Kt,Yn=y(()=>{"use strict";Jn();Kt=class extends Xt{get type(){return"dd"}}});var Os={};ge(Os,{parseTable:()=>Ra});var Fa,_s,Ra,Ms=y(()=>{"use strict";P();Bs();qs();Qn();Yn();Fa=a=>a.lastChild.constructor!==k,_s=(a,r)=>a.type==="td"?r.pop():a,Ra=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
19
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);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=w(i,n,"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,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
20
+ `})}}});var wa,en,Ns=y(()=>{"use strict";kt();q();_();Ue();wa=$e(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),en=class extends le{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let n=F(this,{start:r},"void-ext",A.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:"",desc:"empty"},[n]}return super.lint(r,wa(e))}}});var tn={};ge(tn,{NestedToken:()=>zn});var Ca,$a,Sr,Ht,zn,rn=y(()=>{"use strict";q();X();xr();Vr();_();j();Wn();He();Ca=new Set(["comment","include","arg","template","magic-word"]),$a=[!1,!0].map(a=>{let r=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${r}(?:\s[^>]*)?/?>|</${r}\s*>)$`,"iu")}),zn=class extends k{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=st(e,i,s,t)),e&&(e=kr(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 _e(l,d,p,g,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new U(d,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,Sr);T(this,Ht);b(this,Sr,[...n]),b(this,Ht,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new P(this,e),i=typeof c(this,Ht)=="boolean"?$a[c(this,Ht)?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,Sr).includes(l);if(Ca.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).map(s=>{let o=w(s,n,"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})]}};Sr=new WeakMap,Ht=new WeakMap});var Es,Ls,Gn,Ia,_e,Wn=y(()=>{"use strict";q();X();_();_r();j();$n();zr();is();Ln();bs();Cs();Is();Ns();Es=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};Ls=[Rt()];_e=class extends(Ia=Ft){get type(){return"ext"}constructor(r,e,t,n,i=A.getConfig(),s=!1,o=[]){var u;let l=r.toLowerCase(),d=new Qe(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p=de(K({},i),{ext:Es(i.ext,l),excludes:[...(u=i.excludes)!=null?u:[]]}),g;switch(p.inExt=!0,l){case"tab":p.ext=Es(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 k(t,p,o);break;case"pre":g=new Wr(t,p,o);break;case"dynamicpagelist":g=new Ot(s,t,p,o);break;case"inputbox":p.excludes.push("heading"),g=new Xr(s,t,p,o);break;case"references":{let{NestedToken:h}=(rn(),J(tn));p.excludes.push("heading"),g=new h(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:h}=(rn(),J(tn));g=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:h}=(rn(),J(tn));g=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":g=new Jr(t,p,o);break;case"imagemap":g=new Zr(t,p,o);break;default:g=new en(t,p,o)}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(r,d,g,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(F(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(F(this,n,"var-anchor","variable anchor in a section header")),t}};Gn=ne(Ia),_e=se(Gn,0,"ExtToken",Ls,_e),ie(Gn,1,_e)});var Fs,Un,Na,pt,Rs=y(()=>{"use strict";q();tt();_();Ue();Fs=[Te(!1)];pt=class extends(Na=le){constructor(e,t,n,i){super(e,n,i);oe(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:"&lt;!--",post:this.closed?"--&gt;":""})}};Un=ne(Na),pt=se(Un,0,"CommentToken",Fs,pt),ie(Un,1,pt)});var Bs={};ge(Bs,{parseCommentAndExt:()=>st});var js,Ea,Hn,La,Ps,st,xr=y(()=>{"use strict";kt();Di();He();Wi();Wn();Rs();js="<onlyinclude>",Ea="</onlyinclude>",{length:Hn}=js,La=[!1,!0].map(a=>{let r=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return $e(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${r}(?:\s[^>]*)?/?>|</${r}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Ps=a=>{let r=a.indexOf(js);return{i:r,j:a.indexOf(Ea,r+Hn)}},st=(a,r,e,t)=>{if(t){let{i:n,j:i}=Ps(a);if(n!==-1&&i!==-1){let s="",o=l=>{new U(l,r,e),s+=`\0${e.length-1}n\x7F`};for(;n!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new qr(a.slice(n+Hn,i),r,e),n>0&&o(a.slice(0,n)),s+=l,a=a.slice(i+Hn+1),{i:n,j:i}=Ps(a)}return a&&o(a),s}}return a.replace(La[t?1:0](r.ext),(n,i,s,o,l,d,p,g,u)=>{let h=e.length,f="n";if(i)f="e",new _e(i,s,o,l,r,d,e);else if(n.startsWith("<!--")){f="c";let m=n.endsWith("-->");new pt(n.slice(4,m?-3:void 0),m,r,e)}else d?new it(d,p,g,u,r,e):new U(n,r,e);return`\0${h}${f}\x7F`})}});var Fa,Ra,Pa,Os,Vt,Ee,Je,Me,Vn,ja,ut,qs=y(()=>{"use strict";q();me();X();_r();j();Fa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Ra=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"]),Pa=new Set(["strike","big","center","font","tt"]);Os=[Rt()];ut=class extends(ja=k){constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Vt);T(this,Ee);T(this,Je);T(this,Me);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),b(this,Vt,n),b(this,Ee,i),b(this,Je,e)}get type(){return"html"}get selfClosing(){return c(this,Ee)}get closing(){return c(this,Vt)}toString(e){return`<${this.closing?"/":""}${c(this,Je)}${super.toString(e)}${c(this,Ee)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Je)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Ee)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Je).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new P(this,e);if(i==="h1"&&!o){let m=F(this,d,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.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:""},n.push(m)}Pa.has(i)&&n.push(F(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&n.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"),x={desc:"open",range:[e+1,e+2],text:""},v={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[x,v]:o?m.fix=u?x:v:m.suggestions=[v,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],n.push(m)}else if(!this.findMatchingTag()){let m=F(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Fa.has(x.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Ra.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:v,name:C})=>v==="html"&&C===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}n.push(m)}return n}findMatchingTag(){return Se(c(this,Me),()=>{let{name:e,parentNode:t,closing:n,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=n?p.slice(0,g).reverse():p.slice(g+1),h=[this],{rev:f}=pe;for(let m of u)if(!(!m.is("html")||m.name!==e||d&&c(m,Ee)))if(c(m,Vt)===n)h.push(m);else{let x=h.pop();if(x===this)return m;b(x,Me,[f,m]),b(m,Me,[f,x])}for(let m of h)b(m,Me,[f,void 0])},e=>{b(this,Me,e),e[1]&&e[1]!==this&&b(e[1],Me,[pe.rev,this])})}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Je)}`,post:`${c(this,Ee)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Ee)}),n}};Vn=ne(ja),Vt=new WeakMap,Ee=new WeakMap,Je=new WeakMap,Me=new WeakMap,ut=se(Vn,0,"HtmlToken",Os,ut),ie(Vn,1,ut)});var _s={};ge(_s,{parseHtml:()=>Oa});var Ba,Oa,Ms=y(()=>{"use strict";zr();qs();Ba=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Oa=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=Ba.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!r.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",h,f]=l,{length:m}=e,x=new Qe(u,"html-attrs",p,r,e),v=x.getAttr("itemprop");if(p==="meta"&&(v===void 0||x.getAttr("content")===void 0)||p==="link"&&(v===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new ut(d,x,g==="/",h==="/>",r,e)}return i}});var Xt,Xn=y(()=>{"use strict";_r();_();j();Nt();zr();Xt=class extends Rt(1)(k){constructor(r,e,t,n,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ye(e,"table-syntax",i,s),new Qe(n,"table-attrs",t,i,s))}}});var ke,wr,Cr,Qn,Qt,Kn=y(()=>{"use strict";q();X();_();j();Xn();Qt=class extends Xt{constructor(e,t,n=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,n,i);T(this,Cr);T(this,ke,"");T(this,wr);s&&([Fr(this,ke)._]=s);let l=new k(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,ke).length),n,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 N(this,Cr,Qn).call(this).subtype}afterBuild(){c(this,ke).includes("\0")&&b(this,ke,this.buildFromStr(c(this,ke),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,ke)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,ke)+n.text()}getGaps(e){return e===1?c(this,ke).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new P(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=w(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,`
21
+ ${p}`),desc:"newline"}}else d.suggestions=[{desc:"escape",range:[d.startIndex,d.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(d)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
22
+ `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,ke)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(n,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),n}};ke=new WeakMap,wr=new WeakMap,Cr=new WeakSet,Qn=function(){return Se(c(this,wr),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return K({},N(o=i,Cr,Qn).call(o))},e=>{b(this,wr,e)})}});var qa,_a,Jn,Kt,Yn=y(()=>{"use strict";q();Xn();Kn();qa=new Set(["tr","td","th","caption"]),_a=new Set(["Template:!!","Template:!-"]),Jn=a=>{let r=a.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.type==="magic-word"&&r.name==="!"||r.type==="template"&&_a.has(r.name)||r.is("html")&&qa.has(r.name))return!1;if(r.is("arg"))return r.length>1&&Jn(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(Jn);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch(e){}return r.type==="template"||r.type==="magic-word"&&r.name==="invoke"?"warning":"error"},Kt=class extends Xt{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:o})=>o==="table-inter");if(!n)return t;let i=Jn(n);if(!i)return t;let s=w(n,{start:r},"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(r=>r instanceof Qt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Ma,Da,Zn,nn,Ds=y(()=>{"use strict";q();me();X();_();Yn();Nt();Ma=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),Da=({type:a})=>a==="tr"||a==="table-syntax",Zn=class extends Array{},nn=class extends Kt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);this.closed||t.push(w(this.firstChild,n,"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=w(this.getNthRow(d),n,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(r=`
23
+ |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=[r];pe.run(()=>{let s=new ye(void 0,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=Zn.from(Ma(t,()=>[]));for(let i=0;i<n.length;i++){let s=n[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++)n[f][m]=g;l+=h}}else if(Da(p))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(r--,r<0))return i}}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var sn,zs=y(()=>{"use strict";Yn();sn=class extends Kt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var Jt,ei=y(()=>{"use strict";Ue();Jt=class extends le{get indent(){return this.innerText.split(":").length-1}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:n}=this;return n&&(t.indent=n),t}}});var Yt,ti=y(()=>{"use strict";ei();Yt=class extends Jt{get type(){return"dd"}}});var Gs={};ge(Gs,{parseTable:()=>Wa});var za,Ws,Wa,Us=y(()=>{"use strict";j();Ds();zs();Kn();ti();za=a=>a.lastChild.constructor!==k,Ws=(a,r)=>a.type==="td"?r.pop():a,Wa=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
23
24
  `),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
24
- ${s.shift()}`,l,g=(u,d)=>{if(!d){o+=u;return}let{lastChild:p}=d;if(Fa(d)){let h=new k(u,t,n);h.type="table-inter",h.setAttribute("stage",3),d.insertAt(h)}else p.setText(p.toString()+u)};for(let u of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),p=u.slice(d.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,w,S,I,j]=h;w&&new Kt(w,t,n),g(`
25
- ${d}${w&&`\0${n.length-1}d\x7F`}${S}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new en(I,j,t,n));continue}else if(!l){o+=`
26
- ${u}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(p);if(!f){g(`
27
- ${u}`,l),i.push(l);continue}let[,m,x,v,$]=f;if(m){for(;l.type!=="table";)l=i.pop();l.close(`
28
- ${d}${m}`,!0),g($,i[i.length-1])}else if(x){l=_s(l,i),l.type==="tr"&&(l=i.pop());let w=new tn(`
29
- ${d}${x}`,$,t,n);i.push(l,w),l.insertAt(w)}else{l=_s(l,i);let w=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,S=w.exec($),I=0,j=`
30
- ${d}${v}`,B=F=>{let H=new Vt(j,$.slice(I,S==null?void 0:S.index),t,n);return F.insertAt(H),H};for(;S;)B(l),{lastIndex:I}=w,[j]=S,S=w.exec($);i.push(l,B(l))}}return o.slice(1)}});var rn,Ds=y(()=>{"use strict";We();rn=class extends ae{get type(){return"hr"}}});var zs,Zn,Pa,pt,Ws=y(()=>{"use strict";Ze();We();zs=[ye()];pt=class extends(Pa=ae){get type(){return"double-underscore"}constructor(r,e,t,n){var l,g;super(r,t,n);let i=r.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(g=e?(l=o==null?void 0:o[r])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?g:i)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Zn=re(Pa),pt=ie(Zn,0,"DoubleUnderscoreToken",zs,pt),ne(Zn,1,pt)});var Us={};ge(Us,{parseHrAndDoubleUnderscore:()=>ja});var ja,Gs=y(()=>{"use strict";Ds();Ws();Ln();ja=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,g,u;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(g=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(u=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,h)=>(new rn(h,t,n),`${p}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var x;let h=t.sensitiveDoubleUnderscore.has(p),f=p.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new pt(p,h,t,n),`\0${n.length-1}${m&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,h,f,m)=>{let x=`${p}\0${n.length}h\x7F`;return new qt(h.length,[f,m],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var nn,Hs=y(()=>{"use strict";q();K();_();We();nn=class extends ae{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=A.msg('lonely "$1"',"'"),s=[],o=new R(this,r),l=(g,u,d)=>[{desc:"escape",range:[g,u],text:"&apos;".repeat(d)},{desc:"remove",range:[g,u],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let g=E(this,o,"lonely-apos",i),{startIndex:u,startLine:d,startCol:p}=g,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),f=r-h;s.push(de(Y({},g),{startIndex:f,endIndex:u,endLine:d,startCol:p-h,endCol:p,suggestions:l(f,u,h)}))}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let g=E(this,o,"lonely-apos",i),{endIndex:u,endLine:d,endCol:p}=g,[{length:h}]=/^'+/u.exec(t.data),f=u+h;s.push(de(Y({},g),{startIndex:u,endIndex:f,startLine:d,startCol:p,endCol:p+h,suggestions:l(u,f,h)}))}if(n&&this.closest("heading-title")){let g=E(this,o,"bold-header","bold in section header","warning");g.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(g)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Vs={};ge(Vs,{parseQuotes:()=>ei});var ei,ti=y(()=>{"use strict";Hs();ei=(a,r,e,t)=>{var d;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,g,u;for(let p=1;p<i;p+=2){let h=n[p].length;switch(h){case 2:o++;break;case 4:n[p-1]+="'",n[p]="'''";case 3:if(s++,l!==void 0)break;n[p-1].endsWith(" ")?g===void 0&&u===void 0&&(u=p):n[p-1].slice(-2,-1)===" "?l=p:g!=null||(g=p);break;default:n[p-1]+="'".repeat(h-5),n[p]="'''''",o++,s++}}if(o%2===1&&s%2===1){let p=(d=l!=null?l:g)!=null?d:u;p!==void 0&&(n[p]="''",n[p-1]+="'")}for(let p=1;p<i;p+=2)new nn(n[p],r,e),n[p]=`\0${e.length-1}q\x7F`;return n.join("")}});var Qs={};ge(Qs,{parseExternalLinks:()=>ri});var ri,ni=y(()=>{"use strict";X();On();Xr();ri=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Le}|\0\d+m\x7F)${Fe}(?=[[\]<>"\t${we}]|\0\d))([${we}]*(?![${we}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:g}=e,u=/&[lg]t;/u.exec(s);return u&&(o="",l=s.slice(u.index)+o+l,s=s.slice(0,u.index)),t?(new Be(s,"ext-link-url",r,e),`[\0${g}f\x7F${o}${l}]`):(new Wt(s,o,l,r,e),`\0${g}w\x7F`)})}});var sn,Xs=y(()=>{"use strict";X();gr();sn=class extends Ie{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&Ye(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var Js={};ge(Js,{parseLinks:()=>Ks});var Ba,Ks,Ys=y(()=>{"use strict";_();ti();ni();_n();jn();Xs();Ba=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ks=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=r.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 g=!1,u,d,p,h,f=i[l],m=n.exec(f);if(m)[,u,d,p,h]=m,h.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",h=h.slice(1));else{let S=Ba.exec(f);S&&(g=!0,[,u,d,p]=S)}if(u===void 0||r.regexLinks.test(u)||/\0\d+[exhbru]\x7F/u.test(u)){s+=`[[${f}`;continue}let x=u.trim().startsWith(":");if(x&&g){s+=`[[${f}`;continue}let{ns:v,valid:$}=A.normalizeTitle(u,0,!1,r,!0,!0,!0,!0);if($){if(g){if(v!==6){s+=`[[${f}`;continue}let S=!1;for(l++;l<i.length;l++){let I=i[l],j=I.split("]]");if(j.length>2){S=!0,p+=`[[${j[0]}]]${j[1]}`,h=j.slice(2).join("]]");break}else if(j.length===2)p+=`[[${j[0]}]]${j[1]}`;else{p+=`[[${I}`;break}}if(p=Ks(p,r,e,t),!S){s+=`[[${u}${d}${p}`;continue}}}else{s+=`[[${f}`;continue}p&&(p=ei(p,r,e,t));let w=zt;x||(v===6?(p&&(p=ri(p,r,e,!0)),w=Mt):v===14&&(w=sn)),p===void 0&&d&&(p=""),s+=`\0${e.length}l\x7F${h}`,new w(u,p,r,e,d)}return s}});var no={};ge(no,{parseMagicLinks:()=>qa});var ro,Zs,eo,to,qa,io=y(()=>{"use strict";X();Xr();ro=String.raw`[${we}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Zs=`(?:${ro})+`,eo=`(?:${ro}|-)`,to=String.raw`(?:RFC|PMID)${Zs}\d+\b|ISBN${Zs}(?:97[89]${eo}?)?(?:\d${eo}?){9}[\dx]\b`,qa=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Le}${Fe})|${to})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Le}${Fe})|${to})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.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 g=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=g.exec(s);if(u){let d=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(d=2),o=s.slice(u.index+d)+o,s=s.slice(0,u.index+d)}return o.length>=i.length?t:(new Be(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Be(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var so,oo=y(()=>{"use strict";so=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var on,ao=y(()=>{"use strict";Jn();on=class extends Xt{get type(){return"list"}}});var lo={};ge(lo,{parseList:()=>_a});var _a,go=y(()=>{"use strict";oo();ao();Yn();_a=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),g=so(l,r.lastPrefix),u=(g>1?o.slice(g-1):o).split(/(?=;)/u),d=u[0].startsWith(";"),p=u.length-(d?0:1);if(g>1){let F=o.slice(0,g-1);d?u.unshift(F):u[0]=F+u[0]}r.lastPrefix=l;let h=s+u.map((F,H)=>`\0${t.length+H}d\x7F`).join("")+a.slice(i.length);for(let F of u)new on(F,e,t);if(!p)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,x=m,v=x.exec(h),$=0,w=!1,S=!1,I=0,j=(F,H)=>(new Kt(F,e,t),`${h.slice(0,H)}\0${t.length-1}d\x7F${h.slice(H+F.length)}`),B=F=>{F?$&&$--:$++};for(;v&&p;){let{0:F,index:H}=v;if(F==="-{"){if(!I){let{lastIndex:z}=x;x=/-\{|\}-/gu,x.lastIndex=z}I++}else if(F==="}-"){if(I--,!I){let{lastIndex:z}=x;x=m,x.lastIndex=z}}else if(F.endsWith("x\x7F")){let{name:z,closing:le,selfClosing:fe}=t[Number(F.slice(1,-2))];(!fe||f.includes(z))&&B(le)}else if(F.endsWith("q\x7F")){let{bold:z,italic:le}=t[Number(F.slice(1,-2))];z&&(B(w),w=!w),le&&(B(S),S=!S)}else if($===0){if(F.length>=p)return j(F.slice(0,p),H);p-=F.length,x.lastIndex=H+4+String(t.length).length,h=j(F,H)}v=x.exec(h)}return h}});var po,Me,an,uo=y(()=>{"use strict";q();K();P();Pe();po=new Set(["A","T","R","D","-","H","N"]),an=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,Me);this.append(...e.map(i=>new D(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){b(this,Me,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,Me).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Me).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Me).filter(d=>po.has(d))),o=c(this,Me).filter(d=>!d).length,l=c(this,Me).length-i.size-o,g=super.lint(e,t);if(n.size===l||s.size===l)return g;let u=new R(this,e);for(let d=0;d<this.length;d++){let p=this.childNodes[d],h=p.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let f=C(p,u,"no-ignored","invalid conversion flag");n.size===0&&po.has(h.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:h.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(d&&1),f.endIndex],text:""}],g.push(f)}}return g}print(){return super.print({sep:";"})}};Me=new WeakMap});var Jt,co=y(()=>{"use strict";_();P();Pe();Jt=class extends k{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=A.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new D(o,"converter-rule-variant",t,n)),super.insertAt(new D(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new D(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new D(r,"converter-rule-to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var ln,ho=y(()=>{"use strict";X();P();uo();co();ln=class extends k{get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.append(new an(r,t,n));let[i]=e,s=i.includes(":"),o=new Jt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new Jt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Jt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${be(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Re(e,{sep:";"})}}-</span>`}}});var mo={};ge(mo,{parseConverter:()=>Oa});var Oa,fo=y(()=>{"use strict";ho();Oa=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:g,index:u}=o;if(g==="}-"){let d=i.pop(),{length:p}=e,h=a.slice(d.index+2,u),f=h.indexOf("|"),[m,x]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],v=x.replace(/(&[#a-z\d]+);/giu,"$1"),$=v.split(r.regexConverter).map(w=>w.replace(/\x01/gu,";"));new ln(m,$,r,e),a=`${a.slice(0,d.index)}\0${p}v\x7F${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=n,s.lastIndex=u+2;o=s.exec(a)}return a}});var wr={};ge(wr,{Token:()=>k});var Ar,Ae,O,W,ut,Yt,Sr,M,xo,bo,To,yo,ko,vo,Ao,So,wo,Co,$o,Io,ii,k,P=y(()=>{"use strict";X();q();_();Ni();Fi();ii=class ii extends Lr{constructor(e,t=A.getConfig(),n=[],i){super();T(this,M);T(this,Ar,"plain");T(this,Ae,0);T(this,O);T(this,W);T(this,ut);T(this,Yt,!1);T(this,Sr);typeof e=="string"&&this.insertAt(e),b(this,O,t),b(this,W,n),n.push(this)}get type(){return c(this,Ar)}set type(e){b(this,Ar,e)}parseOnce(e=c(this,Ae),t=!1,n){if(e<c(this,Ae)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,Ae)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,W).pop();let i=N(this,M,xo).call(this);t&&(t=!i)}b(this,ut,t),N(this,M,bo).call(this,t);break;case 1:N(this,M,To).call(this);break;case 2:N(this,M,yo).call(this);break;case 3:N(this,M,ko).call(this);break;case 4:N(this,M,vo).call(this);break;case 5:N(this,M,Ao).call(this,n);break;case 6:N(this,M,So).call(this,n);break;case 7:N(this,M,wo).call(this);break;case 8:N(this,M,Co).call(this);break;case 9:N(this,M,$o).call(this);break;case 10:N(this,M,Io).call(this)}if(this.type==="root")for(let i of c(this,W))i==null||i.parseOnce(e,t,n);return Nr(this,Ae)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new lr(i);if(isNaN(i.slice(-1)))return c(this,W)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?be(n):n}build(){b(this,Ae,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(this.replaceChildren(...this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of c(this,W))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,W))e==null||e.afterBuild();b(this,Yt,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,Ae)<e;)this.parseOnce(c(this,Ae),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ii;case"config":return c(this,O);case"include":return(t=c(this,ut))!=null?t:!!c(this.getRootNode(),ut);case"accum":return c(this,W);case"built":return c(this,Yt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,Ae)===0&&this.type==="root"&&c(this,W).shift(),b(this,Ae,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new lr(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s,o){return A.normalizeTitle(e,t,c(this,ut),c(this,O),n,i,s,o)}lint(e=this.getAbsoluteIndex(),t){var i;let n=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 p of this.querySelectorAll(o)){let h;if(p.type==="category")h=p.name;else{let f=p.getValue();f&&f!==!0&&(h=`#${f}`)}if(h){let f=s.get(h);f?f.add(p):s.set(h,new Set([p]))}}for(let[p,h]of s)if(h.size>1&&!p.startsWith("#mw-customcollapsible-")){let f=!p.startsWith("#"),m=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";n.push(...[...h].map(v=>{let $=E(v,{start:v.getAbsoluteIndex()},"no-duplicate",m,x);return f&&($.suggestions=[{desc:"remove",range:[$.startIndex,$.endIndex],text:""}]),$}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,g=this.toString(),u=[],d=l.exec(g);for(;d;){let{1:p,index:h}=d,f=(i=d[2])==null?void 0:i.trim();u.push({line:this.posFromIndex(h).top+(p==="disable-line"?0:1),from:p==="disable"?l.lastIndex:void 0,to:p==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(m=>m.trim())):void 0}),d=l.exec(g)}n=n.filter(({rule:p,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:x,from:v,to:$,rules:w}of u){if(x>h+1)break;if(w&&!w.has(p))continue;if(x===h&&v===void 0&&$===void 0)return!1;v<=f&&v>m.pos?(m.pos=v,m.type="from"):$<=f&&$>m.pos&&(m.pos=$,m.type="to")}return m.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):Ce(c(this,Sr),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,Yt)&&b(this,Sr,n)})}};Ar=new WeakMap,Ae=new WeakMap,O=new WeakMap,W=new WeakMap,ut=new WeakMap,Yt=new WeakMap,Sr=new WeakMap,M=new WeakSet,xo=function(){let{parseRedirect:e}=(_i(),Q(qi)),t=this.firstChild.toString(),n=e(t,c(this,O),c(this,W));return n&&this.setText(n),!!n},bo=function(e){let{parseCommentAndExt:t}=(cr(),Q(Ls));this.setText(t(this.firstChild.toString(),c(this,O),c(this,W),e))},To=function(){let{parseBraces:e}=(Ur(),Q(us)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,O),c(this,W));this.setText(this.type==="root"?n:n.slice(1))},yo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(js(),Q(Ps));this.setText(e(this.firstChild.toString(),c(this,O),c(this,W)))},ko=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Ms(),Q(Os));this.setText(e(this,c(this,O),c(this,W)))},vo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Gs(),Q(Us));this.setText(e(this,c(this,O),c(this,W)))},Ao=function(e){let{parseLinks:t}=(Ys(),Q(Js));this.setText(t(this.firstChild.toString(),c(this,O),c(this,W),e))},So=function(e){var i;if((i=c(this,O).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(ti(),Q(Vs)),n=this.firstChild.toString().split(`
31
- `);for(let s=0;s<n.length;s++)n[s]=t(n[s],c(this,O),c(this,W),e);this.setText(n.join(`
32
- `))},wo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ni(),Q(Qs));this.setText(e(this.firstChild.toString(),c(this,O),c(this,W)))},Co=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(io(),Q(no));this.setText(e(this.firstChild.toString(),c(this,O),c(this,W)))},$o=function(){var g;if((g=c(this,O).excludes)!=null&&g.includes("list"))return;let{parseList:e}=(go(),Q(lo)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
33
- `),o={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,O),c(this,W));this.setText(s.join(`
34
- `))},Io=function(){if(c(this,O).variants.length>0){let{parseConverter:e}=(fo(),Q(mo));this.setText(e(this.firstChild.toString(),c(this,O),c(this,W)))}};k=ii});var Z,_t,kn,Rr,Te=y(()=>{"use strict";Z={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),Q(wr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},_t=a=>r=>r.type===a,kn=(a,r,e,t=[])=>{var s,o;let n=a.getChildNodes(),i=n.splice(r,e,...t);for(let l=0;l<t.length;l++){let g=t[l];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",n[r+l+1]),g.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(o=n[r+t.length])==null||o.setAttribute("previousSibling",n[r+t.length-1]),i},Rr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var No={};ge(No,{Title:()=>si});var Cr,$r,ct,Zt,ht,si,Eo=y(()=>{"use strict";X();si=class{constructor(r,e,t,n,i,s){T(this,Cr);T(this,$r);T(this,ct);T(this,Zt);T(this,ht);se(this,"valid");se(this,"encoded",!1);let o=r.trim().startsWith("../");if(i&&r.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=De(r),this.encoded=g}catch(g){}if(r=Ye(r).replace(/[_ ]+/gu," ").trim(),o)b(this,Zt,0);else{let g=e;r.startsWith(":")&&(g=0,r=r.slice(1).trim());let u=r.split(":");if(u.length>1){let d=u[0].trim().toLowerCase(),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(g=p,r=u.slice(1).join(":").trim())}b(this,Zt,g)}let l=r.indexOf("#");if(l!==-1){let g=r.slice(l).trim().slice(1);if(g.includes("%"))try{g=De(g)}catch(u){}b(this,ht,g.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,ht)!==void 0)&&Ye(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,b(this,$r,t.namespaces),b(this,ct,t.articlePath||"/wiki/$1"),c(this,ct).includes("$1")||b(this,ct,c(this,ct)+`${c(this,ct).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Zt)}get fragment(){return c(this,ht)}get main(){return c(this,Cr)}set main(r){r=r.replace(/_/gu," ").trim(),b(this,Cr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,$r)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){b(this,ht,r)}getUrl(r){}};Cr=new WeakMap,$r=new WeakMap,ct=new WeakMap,Zt=new WeakMap,ht=new WeakMap});var mt,Lo,Ma,A,_=y(()=>{Ti();Te();wi();X();mt={config:hn,i18n:void 0,rules:bi,getConfig(a){let r=a!=null?a:this.config,{doubleUnderscore:e}=r;for(let t=0;t<2;t++)e.length>t+2&&e[t].length===0&&(e[t]=Object.keys(e[t+2]));return de(Y(Y({},hn),r),{excludes:[]})},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=mt.getConfig(),n=!1,i,s=!1,o=!1){let{Title:l}=(Eo(),Q(No)),g;if(i)g=new l(a,r,t,n,s,o);else{let{Token:u}=(P(),Q(wr));g=Z.run(()=>{let d=new u(a,t);d.type="root",d.parseOnce(0,e).parseOnce();let p=new l(d.toString(),r,t,n,s,o);for(let h of["main","fragment"]){let f=p[h];if(f!=null&&f.includes("\0")){let m=d.buildFromStr(f,1);h==="main"?p.main=m:p.setFragment(m)}}return p})}return g},parse(a,r,e=11,t=mt.getConfig()){if(a=cn(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>xi[o]||11))}let{Token:n}=(P(),Q(wr));return Z.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})},partialParse(n,i,s){return fi(this,arguments,function*(a,r,e,t=mt.getConfig()){let{Token:o}=(P(),Q(wr)),l=typeof setImmediate=="function"?setImmediate:setTimeout,{running:g}=Z;Z.running=!0;let u=new o(cn(a),t);u.type="root";let d=0;return yield new Promise(p=>{let h=()=>{r()===a?(d++,l(f,0)):p()},f=()=>{d===12?(u.afterBuild(),p()):(u[d===11?"build":"parseOnce"](d,e),h())};l(f,0)}),Z.running=g,u})},createLanguageService(a){}},Lo={},Ma=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in mt)Ma.has(a)||(Lo[a]={enumerable:!1});Object.defineProperties(mt,Lo);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:mt});A=mt});_();})();
25
+ ${s.shift()}`,l,d=(p,g)=>{if(!g){o+=p;return}let{lastChild:u}=g;if(za(g)){let h=new k(p,t,n);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[,E,$,S,L]=h;E&&new Yt(E,t,n),d(`
26
+ ${g}${E&&`\0${n.length-1}d\x7F`}${$}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new nn(S,L,t,n));continue}else if(!l){o+=`
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(`
28
+ ${p}`,l),i.push(l);continue}let[,m,x,v,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(x){l=Ws(l,i),l.type==="tr"&&(l=i.pop());let E=new sn(`
30
+ ${g}${x}`,C,t,n);i.push(l,E),l.insertAt(E)}else{l=Ws(l,i);let E=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,$=E.exec(C),S=0,L=`
31
+ ${g}${v}`,M=R=>{let B=new Qt(L,C.slice(S,$==null?void 0:$.index),t,n);return R.insertAt(B),B};for(;$;)M(l),{lastIndex:S}=E,[L]=$,$=E.exec(C);i.push(l,M(l))}}return o.slice(1)}});var on,Hs=y(()=>{"use strict";Ue();on=class extends le{get type(){return"hr"}}});var Vs,ri,Ga,ct,Xs=y(()=>{"use strict";tt();Ue();Vs=[Te()];ct=class extends(Ga=le){get type(){return"double-underscore"}constructor(r,e,t,n){var l,d;super(r,t,n);let i=r.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[r])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};ri=ne(Ga),ct=se(ri,0,"DoubleUnderscoreToken",Vs,ct),ie(ri,1,ct)});var Qs={};ge(Qs,{parseHrAndDoubleUnderscore:()=>Ua});var Ua,Ks=y(()=>{"use strict";Hs();Xs();Fn();Ua=({firstChild:{data:a},type:r,name:e},t,n)=>{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")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,u,h)=>(new on(h,t,n),`${u}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var x;let h=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new ct(u,h,t,n),`\0${n.length-1}${m&&((x=o==null?void 0:o[f])!=null?x: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 x=`${u}\0${n.length}h\x7F`;return new _t(h.length,[f,m],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var an,Js=y(()=>{"use strict";q();X();_();Ue();an=class extends le{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=A.msg('lonely "$1"',"'"),s=[],o=new P(this,r),l=(d,p,g)=>[{desc:"escape",range:[d,p],text:"&apos;".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=r-h;s.push(de(K({},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(de(K({},d),{startIndex:p,endIndex:f,startLine:g,startCol:u,endCol:u+h,suggestions:l(p,f,h)}))}if(n&&this.closest("heading-title")){let d=F(this,o,"bold-header","bold in section header","warning");d.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(d)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Ys={};ge(Ys,{parseQuotes:()=>ni});var ni,ii=y(()=>{"use strict";Js();ni=(a,r,e,t)=>{var g;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,d,p;for(let u=1;u<i;u+=2){let h=n[u].length;switch(h){case 2:o++;break;case 4:n[u-1]+="'",n[u]="'''";case 3:if(s++,l!==void 0)break;n[u-1].endsWith(" ")?d===void 0&&p===void 0&&(p=u):n[u-1].slice(-2,-1)===" "?l=u:d!=null||(d=u);break;default:n[u-1]+="'".repeat(h-5),n[u]="'''''",o++,s++}}if(o%2===1&&s%2===1){let u=(g=l!=null?l:d)!=null?g:p;u!==void 0&&(n[u]="''",n[u-1]+="'")}for(let u=1;u<i;u+=2)new an(n[u],r,e),n[u]=`\0${e.length-1}q\x7F`;return n.join("")}});var Zs={};ge(Zs,{parseExternalLinks:()=>si});var si,oi=y(()=>{"use strict";Y();Dn();Yr();si=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Fe}|\0\d+m\x7F)${Re}(?=[[\]<>"\t${Ae}]|\0\d))([${Ae}]*(?![${Ae}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.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 Oe(s,"ext-link-url",r,e),`[\0${d}f\x7F${o}${l}]`):(new Ut(s,o,l,r,e),`\0${d}w\x7F`)})}});var ln,eo=y(()=>{"use strict";Y();hr();ln=class extends Ie{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&et(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var ro={};ge(ro,{parseLinks:()=>to});var Ha,to,no=y(()=>{"use strict";_();ii();oi();Mn();On();eo();Ha=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,to=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=r.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=n.exec(f);if(m)[,p,g,u,h]=m,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let $=Ha.exec(f);$&&(d=!0,[,p,g,u]=$)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let x=p.trim().startsWith(":");if(x&&d){s+=`[[${f}`;continue}let{ns:v,valid:C}=A.normalizeTitle(p,0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(C){if(d){if(v!==6){s+=`[[${f}`;continue}let $=!1;for(l++;l<i.length;l++){let S=i[l],L=S.split("]]");if(L.length>2){$=!0,u+=`[[${L[0]}]]${L[1]}`,h=L.slice(2).join("]]");break}else if(L.length===2)u+=`[[${L[0]}]]${L[1]}`;else{u+=`[[${S}`;break}}if(u=to(u,r,e,t),!$){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=ni(u,r,e,t));let E=Gt;x||(v===6?(u&&(u=si(u,r,e,!0)),E=zt):v===14&&(E=ln)),u===void 0&&g&&(u=""),s+=`\0${e.length}l\x7F${h}`,new E(p,u,r,e,g)}return s}});var lo={};ge(lo,{parseMagicLinks:()=>Va});var ao,io,so,oo,Va,go=y(()=>{"use strict";Y();Yr();ao=String.raw`[${Ae}\t]|&nbsp;|&#0*160;|&#x0*a0;`,io=`(?:${ao})+`,so=`(?:${ao}|-)`,oo=String.raw`(?:RFC|PMID)${io}\d+\b|ISBN${io}(?:97[89]${so}?)?(?:\d${so}?){9}[\dx]\b`,Va=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Fe}${Re})|${oo})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Fe}${Re})|${oo})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.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 Oe(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Oe(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var po,uo=y(()=>{"use strict";po=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var dn,co=y(()=>{"use strict";ei();dn=class extends Jt{get type(){return"list"}}});var ho={};ge(ho,{parseList:()=>Xa});var Xa,mo=y(()=>{"use strict";uo();co();ti();Xa=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),d=po(l,r.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 R=o.slice(0,d-1);g?p.unshift(R):p[0]=R+p[0]}r.lastPrefix=l;let h=s+p.map((R,B)=>`\0${t.length+B}d\x7F`).join("")+a.slice(i.length);for(let R of p)new dn(R,e,t);if(!u)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,x=m,v=x.exec(h),C=0,E=!1,$=!1,S=0,L=(R,B)=>(new Yt(R,e,t),`${h.slice(0,B)}\0${t.length-1}d\x7F${h.slice(B+R.length)}`),M=R=>{R?C&&C--:C++};for(;v&&u;){let{0:R,index:B}=v;if(R==="-{"){if(!S){let{lastIndex:O}=x;x=/-\{|\}-/gu,x.lastIndex=O}S++}else if(R==="}-"){if(S--,!S){let{lastIndex:O}=x;x=m,x.lastIndex=O}}else if(R.endsWith("x\x7F")){let{name:O,closing:Q,selfClosing:xe}=t[Number(R.slice(1,-2))];(!xe||f.includes(O))&&M(Q)}else if(R.endsWith("q\x7F")){let{bold:O,italic:Q}=t[Number(R.slice(1,-2))];O&&(M(E),E=!E),Q&&(M($),$=!$)}else if(C===0){if(R.length>=u)return L(R.slice(0,u),B);u-=R.length,x.lastIndex=B+4+String(t.length).length,h=L(R,B)}v=x.exec(h)}return h}});var fo,De,gn,xo=y(()=>{"use strict";q();X();j();je();fo=new Set(["A","T","R","D","-","H","N"]),gn=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,De);this.append(...e.map(i=>new W(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){b(this,De,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,De).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,De).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,De).filter(g=>fo.has(g))),o=c(this,De).filter(g=>!g).length,l=c(this,De).length-i.size-o,d=super.lint(e,t);if(n.size===l||s.size===l)return d;let p=new P(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],h=u.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let f=w(u,p,"no-ignored","invalid conversion flag");n.size===0&&fo.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:";"})}};De=new WeakMap});var Zt,bo=y(()=>{"use strict";_();j();je();Zt=class extends k{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=A.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new W(o,"converter-rule-variant",t,n)),super.insertAt(new W(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new W(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new W(r,"converter-rule-to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var pn,To=y(()=>{"use strict";Y();j();xo();bo();pn=class extends k{get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.insertAt(new gn(r,t,n));let[i]=e,s=i.includes(":"),o=new Zt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!ae(e[1]).trim()?this.insertAt(new Zt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Zt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${be(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Pe(e,{sep:";"})}}-</span>`}}});var yo={};ge(yo,{parseConverter:()=>Qa});var Qa,ko=y(()=>{"use strict";To();Qa=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/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,x]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],v=x.replace(/(&[#a-z\d]+);/giu,"$1"),C=v.split(r.regexConverter).map(E=>E.replace(/\x01/gu,";"));new pn(m,C,r,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=n,s.lastIndex=p+2;o=s.exec(a)}return a}});var un={};ge(un,{Token:()=>k});var $r,fe,D,G,ht,er,Ir,z,vo,Ao,So,wo,Co,$o,Io,No,Eo,Lo,Fo,Ro,ai,k,j=y(()=>{"use strict";Y();q();me();_();Li();Pi();ai=class ai extends Pr{constructor(e,t=A.getConfig(),n=[],i){super();T(this,z);T(this,$r,"plain");T(this,fe,0);T(this,D);T(this,G);T(this,ht);T(this,er,!1);T(this,Ir);typeof e=="string"&&this.insertAt(e),b(this,D,t),b(this,G,n),n.push(this)}get type(){return c(this,$r)}set type(e){b(this,$r,e)}parseOnce(e=c(this,fe),t=!1,n){if(e<c(this,fe)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,G).pop();let i=N(this,z,vo).call(this);t&&(t=!i)}b(this,ht,t),N(this,z,Ao).call(this,t);break;case 1:N(this,z,So).call(this);break;case 2:N(this,z,wo).call(this);break;case 3:N(this,z,Co).call(this);break;case 4:N(this,z,$o).call(this);break;case 5:N(this,z,Io).call(this,n);break;case 6:N(this,z,No).call(this,n);break;case 7:N(this,z,Eo).call(this);break;case 8:N(this,z,Lo).call(this);break;case 9:N(this,z,Fo).call(this);break;case 10:N(this,z,Ro).call(this)}if(this.type==="root")for(let i of c(this,G))i==null||i.parseOnce(e,t,n);return Fr(this,fe)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new ur(i);if(isNaN(i.slice(-1)))return c(this,G)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?be(n):n}build(){b(this,fe,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(pr(this,0,1,this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of c(this,G))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,G))e==null||e.afterBuild();b(this,er,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,fe)<e;)this.parseOnce(c(this,fe),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ai;case"config":return c(this,D);case"include":return(t=c(this,ht))!=null?t:!!c(this.getRootNode(),ht);case"accum":return c(this,G);case"built":return c(this,er);case"stage":return c(this,fe);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,fe)===0&&this.type==="root"&&c(this,G).shift(),b(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new ur(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n){return A.normalizeTitle(e,t,c(this,ht),c(this,D),n)}lint(e=this.getAbsoluteIndex(),t){var i;let n=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"}`,x=f?"error":"warning";n.push(...[...h].map(v=>{let C=F(v,{start:v.getAbsoluteIndex()},"no-duplicate",m,x);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)}n=n.filter(({rule:u,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:x,from:v,to:C,rules:E}of p){if(x>h+1)break;if(E&&!E.has(u))continue;if(x===h&&v===void 0&&C===void 0)return!1;v<=f&&v>m.pos?(m.pos=v,m.type="from"):C<=f&&C>m.pos&&(m.pos=C,m.type="to")}return m.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):Se(c(this,Ir),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,er)&&b(this,Ir,n)})}};$r=new WeakMap,fe=new WeakMap,D=new WeakMap,G=new WeakMap,ht=new WeakMap,er=new WeakMap,Ir=new WeakMap,z=new WeakSet,vo=function(){let{parseRedirect:e}=(Mi(),J(_i)),t=this.firstChild.toString(),n=e(t,c(this,D),c(this,G));return n&&this.setText(n),!!n},Ao=function(e){let{parseCommentAndExt:t}=(xr(),J(Bs));this.setText(t(this.firstChild.toString(),c(this,D),c(this,G),e))},So=function(){let{parseBraces:e}=(Vr(),J(xs)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,D),c(this,G));this.setText(this.type==="root"?n:n.slice(1))},wo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Ms(),J(_s));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},Co=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Us(),J(Gs));this.setText(e(this,c(this,D),c(this,G)))},$o=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Ks(),J(Qs));this.setText(e(this,c(this,D),c(this,G)))},Io=function(e){let{parseLinks:t}=(no(),J(ro));this.setText(t(this.firstChild.toString(),c(this,D),c(this,G),e))},No=function(e){var i;if((i=c(this,D).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(ii(),J(Ys)),n=this.firstChild.toString().split(`
32
+ `);for(let s=0;s<n.length;s++)n[s]=t(n[s],c(this,D),c(this,G),e);this.setText(n.join(`
33
+ `))},Eo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(oi(),J(Zs));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},Lo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(go(),J(lo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},Fo=function(){var d;if((d=c(this,D).excludes)!=null&&d.includes("list"))return;let{parseList:e}=(mo(),J(ho)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
34
+ `),o={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,D),c(this,G));this.setText(s.join(`
35
+ `))},Ro=function(){if(c(this,D).variants.length>0){let{parseConverter:e}=(ko(),J(yo));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))}};k=ai});var pe,Mt,pr,Br,me=y(()=>{"use strict";pe={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(j(),J(un)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},Mt=a=>r=>r.type===a,pr=(a,r,e,t=[])=>{var s,o;let n=a.getChildNodes(),i;n.length===e?(i=n,n=t):i=n.splice(r,e,...t);for(let l=0;l<t.length;l++){let d=t[l];d.setAttribute("parentNode",a),d.setAttribute("nextSibling",n[r+l+1]),d.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(o=n[r+t.length])==null||o.setAttribute("previousSibling",n[r+t.length-1]),n===t&&a.setAttribute("childNodes",n),i},Br=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var Po={};ge(Po,{Title:()=>li});var Nr,Er,mt,tr,ft,li,jo=y(()=>{"use strict";Y();li=class{constructor(r,e,t,{temporary:n,decode:i,selfLink:s}={}){T(this,Nr);T(this,Er);T(this,mt);T(this,tr);T(this,ft);oe(this,"valid");oe(this,"encoded",!1);let o=r.trim().startsWith("../");if(i&&r.includes("%"))try{let d=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=We(r),this.encoded=d}catch(d){}if(r=et(r).replace(/[_ ]+/gu," ").trim(),o)b(this,tr,0);else{let d=e;r.startsWith(":")&&(d=0,r=r.slice(1).trim());let p=r.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,r=p.slice(1).join(":").trim())}b(this,tr,d)}let l=r.indexOf("#");if(l!==-1){let d=r.slice(l).trim().slice(1);if(d.includes("%"))try{d=We(d)}catch(p){}b(this,ft,d.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,ft)!==void 0)&&et(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,b(this,Er,t.namespaces),b(this,mt,t.articlePath||"/wiki/$1"),c(this,mt).includes("$1")||b(this,mt,c(this,mt)+`${c(this,mt).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,tr)}get fragment(){return c(this,ft)}get main(){return c(this,Nr)}set main(r){r=r.replace(/_/gu," ").trim(),b(this,Nr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,Er)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){b(this,ft,r)}getUrl(r){}};Nr=new WeakMap,Er=new WeakMap,mt=new WeakMap,tr=new WeakMap,ft=new WeakMap});var xt,Bo,Ka,A,_=y(()=>{vi();me();$i();Y();xt={config:fn,i18n:void 0,rules:ki,getConfig(a){let r=a!=null?a:this.config,{doubleUnderscore:e}=r;for(let t=0;t<2;t++)e.length>t+2&&e[t].length===0&&(e[t]=Object.keys(e[t+2]));return de(K(K({},fn),r),{excludes:[]})},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=xt.getConfig(),n){let{Title:i}=(jo(),J(Po)),s;if(n!=null&&n.halfParsed)s=new i(a,r,t,n);else{let{Token:o}=(j(),J(un));s=pe.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let d=new i(l.toString(),r,t,n);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,r,e=11,t=xt.getConfig()){a=Si(a);let n;typeof e!="number"&&(n=Array.isArray(e)?e:[e],e=Math.max(...n.map(o=>yi[o]||11)));let{Token:i}=(j(),J(un));return pe.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,r)})},partialParse(n,i,s){return Ti(this,arguments,function*(a,r,e,t=xt.getConfig()){})},createLanguageService(a){}},Bo={},Ka=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in xt)Ka.has(a)||(Bo[a]={enumerable:!1});Object.defineProperties(xt,Bo);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:xt});A=xt});_();})();