wikiparser-node 1.16.3 → 1.16.5

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 (154) hide show
  1. package/README.md +1 -1
  2. package/bundle/bundle.es7.js +28 -28
  3. package/bundle/bundle.lsp.js +30 -30
  4. package/bundle/bundle.min.js +29 -29
  5. package/coverage/badge.svg +1 -1
  6. package/data/signatures.json +43 -0
  7. package/dist/addon/table.js +7 -4
  8. package/dist/addon/token.js +119 -113
  9. package/dist/addon/transclude.js +7 -5
  10. package/dist/base.d.mts +99 -30
  11. package/dist/base.d.ts +99 -30
  12. package/dist/index.d.ts +10 -4
  13. package/dist/index.js +59 -14
  14. package/dist/lib/attributes.js +2 -2
  15. package/dist/lib/element.d.ts +128 -29
  16. package/dist/lib/element.js +178 -32
  17. package/dist/lib/lsp.d.ts +62 -27
  18. package/dist/lib/lsp.js +395 -304
  19. package/dist/lib/node.d.ts +123 -54
  20. package/dist/lib/node.js +216 -87
  21. package/dist/lib/range.d.ts +83 -31
  22. package/dist/lib/range.js +83 -31
  23. package/dist/lib/ranges.d.ts +1 -1
  24. package/dist/lib/ranges.js +3 -2
  25. package/dist/lib/text.d.ts +40 -14
  26. package/dist/lib/text.js +47 -19
  27. package/dist/lib/title.d.ts +54 -17
  28. package/dist/lib/title.js +101 -47
  29. package/dist/mixin/attributesParent.d.ts +37 -21
  30. package/dist/mixin/attributesParent.js +18 -20
  31. package/dist/mixin/flagsParent.d.ts +38 -12
  32. package/dist/mixin/hidden.d.ts +0 -2
  33. package/dist/mixin/hidden.js +0 -2
  34. package/dist/mixin/magicLinkParent.d.ts +11 -5
  35. package/dist/mixin/singleLine.d.ts +0 -2
  36. package/dist/mixin/singleLine.js +3 -3
  37. package/dist/mixin/sol.d.ts +0 -2
  38. package/dist/mixin/sol.js +2 -3
  39. package/dist/mixin/syntax.d.ts +0 -2
  40. package/dist/mixin/syntax.js +0 -2
  41. package/dist/parser/braces.js +4 -2
  42. package/dist/parser/links.js +13 -7
  43. package/dist/parser/list.js +3 -1
  44. package/dist/parser/quotes.js +22 -2
  45. package/dist/parser/redirect.js +4 -1
  46. package/dist/parser/selector.js +1 -1
  47. package/dist/src/arg.d.ts +19 -9
  48. package/dist/src/arg.js +34 -15
  49. package/dist/src/atom.d.ts +5 -1
  50. package/dist/src/atom.js +5 -1
  51. package/dist/src/attribute.d.ts +26 -8
  52. package/dist/src/attribute.js +30 -11
  53. package/dist/src/attributes.d.ts +50 -22
  54. package/dist/src/attributes.js +54 -26
  55. package/dist/src/converter.d.ts +4 -2
  56. package/dist/src/converter.js +12 -9
  57. package/dist/src/converterFlags.d.ts +45 -15
  58. package/dist/src/converterFlags.js +45 -15
  59. package/dist/src/converterRule.d.ts +30 -11
  60. package/dist/src/converterRule.js +46 -16
  61. package/dist/src/extLink.d.ts +6 -2
  62. package/dist/src/extLink.js +14 -11
  63. package/dist/src/gallery.d.ts +13 -9
  64. package/dist/src/gallery.js +35 -21
  65. package/dist/src/heading.d.ts +13 -7
  66. package/dist/src/heading.js +28 -18
  67. package/dist/src/hidden.d.ts +5 -1
  68. package/dist/src/hidden.js +7 -3
  69. package/dist/src/html.d.ts +12 -10
  70. package/dist/src/html.js +17 -12
  71. package/dist/src/imageParameter.d.ts +27 -12
  72. package/dist/src/imageParameter.js +27 -12
  73. package/dist/src/imagemap.d.ts +4 -4
  74. package/dist/src/imagemap.js +9 -5
  75. package/dist/src/imagemapLink.d.ts +3 -1
  76. package/dist/src/imagemapLink.js +3 -1
  77. package/dist/src/index.d.ts +65 -64
  78. package/dist/src/index.js +111 -132
  79. package/dist/src/link/base.d.ts +14 -6
  80. package/dist/src/link/base.js +45 -21
  81. package/dist/src/link/category.d.ts +9 -4
  82. package/dist/src/link/category.js +20 -4
  83. package/dist/src/link/file.d.ts +71 -23
  84. package/dist/src/link/file.js +100 -36
  85. package/dist/src/link/galleryImage.d.ts +8 -4
  86. package/dist/src/link/galleryImage.js +15 -8
  87. package/dist/src/link/index.d.ts +14 -6
  88. package/dist/src/link/index.js +15 -5
  89. package/dist/src/link/redirectTarget.d.ts +4 -3
  90. package/dist/src/link/redirectTarget.js +5 -3
  91. package/dist/src/magicLink.d.ts +28 -12
  92. package/dist/src/magicLink.js +56 -34
  93. package/dist/src/nested.d.ts +5 -3
  94. package/dist/src/nested.js +9 -6
  95. package/dist/src/nowiki/base.d.ts +4 -2
  96. package/dist/src/nowiki/base.js +6 -5
  97. package/dist/src/nowiki/comment.d.ts +6 -2
  98. package/dist/src/nowiki/comment.js +8 -3
  99. package/dist/src/nowiki/dd.d.ts +0 -3
  100. package/dist/src/nowiki/dd.js +0 -8
  101. package/dist/src/nowiki/doubleUnderscore.d.ts +5 -1
  102. package/dist/src/nowiki/doubleUnderscore.js +5 -1
  103. package/dist/src/nowiki/index.d.ts +5 -1
  104. package/dist/src/nowiki/index.js +5 -1
  105. package/dist/src/nowiki/list.d.ts +5 -1
  106. package/dist/src/nowiki/list.js +5 -1
  107. package/dist/src/nowiki/listBase.d.ts +15 -5
  108. package/dist/src/nowiki/listBase.js +41 -10
  109. package/dist/src/nowiki/noinclude.d.ts +5 -1
  110. package/dist/src/nowiki/noinclude.js +5 -1
  111. package/dist/src/nowiki/quote.d.ts +15 -8
  112. package/dist/src/nowiki/quote.js +32 -12
  113. package/dist/src/onlyinclude.d.ts +4 -2
  114. package/dist/src/onlyinclude.js +4 -2
  115. package/dist/src/paramTag/index.d.ts +1 -1
  116. package/dist/src/paramTag/index.js +1 -1
  117. package/dist/src/parameter.d.ts +24 -12
  118. package/dist/src/parameter.js +45 -27
  119. package/dist/src/pre.d.ts +1 -1
  120. package/dist/src/pre.js +1 -1
  121. package/dist/src/redirect.d.ts +2 -0
  122. package/dist/src/redirect.js +2 -0
  123. package/dist/src/syntax.d.ts +5 -1
  124. package/dist/src/syntax.js +5 -1
  125. package/dist/src/table/base.d.ts +5 -1
  126. package/dist/src/table/base.js +11 -4
  127. package/dist/src/table/index.d.ts +134 -66
  128. package/dist/src/table/index.js +149 -81
  129. package/dist/src/table/td.d.ts +18 -10
  130. package/dist/src/table/td.js +23 -15
  131. package/dist/src/table/tr.d.ts +13 -3
  132. package/dist/src/table/tr.js +14 -6
  133. package/dist/src/table/trBase.d.ts +28 -12
  134. package/dist/src/table/trBase.js +28 -18
  135. package/dist/src/tagPair/ext.d.ts +3 -1
  136. package/dist/src/tagPair/ext.js +11 -10
  137. package/dist/src/tagPair/include.d.ts +8 -2
  138. package/dist/src/tagPair/include.js +8 -2
  139. package/dist/src/tagPair/index.d.ts +6 -2
  140. package/dist/src/tagPair/index.js +6 -2
  141. package/dist/src/transclude.d.ts +107 -33
  142. package/dist/src/transclude.js +139 -45
  143. package/dist/util/debug.js +2 -7
  144. package/dist/util/html.js +1 -14
  145. package/dist/util/string.js +7 -1
  146. package/extensions/dist/base.js +25 -8
  147. package/extensions/dist/codejar.js +2 -1
  148. package/extensions/dist/lsp.js +5 -10
  149. package/extensions/es7/base.js +25 -8
  150. package/extensions/ui.css +1 -162
  151. package/i18n/zh-hans.json +1 -1
  152. package/i18n/zh-hant.json +1 -1
  153. package/package.json +3 -3
  154. package/extensions/dist/test-page.js +0 -89
@@ -1,34 +1,34 @@
1
- "use strict";(()=>{var vo=Object.create;var gt=Object.defineProperty,Ao=Object.defineProperties,ri=Object.getOwnPropertyDescriptor,So=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols;var ni=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable;var ii=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),pt=a=>{throw TypeError(a)};var Tr=(a,r,e)=>r in a?gt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,H=(a,r)=>{for(var e in r||(r={}))ni.call(r,e)&&Tr(a,e,r[e]);if(ei)for(var e of ei(r))Co.call(r,e)&&Tr(a,e,r[e]);return a},oe=(a,r)=>Ao(a,So(r)),ti=(a,r)=>gt(a,"name",{value:r,configurable:!0});var k=(a,r)=>()=>(a&&(r=a(a=0)),r);var $o=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),ae=(a,r)=>{for(var e in r)gt(a,e,{get:r[e],enumerable:!0})},No=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of wo(r))!ni.call(a,n)&&n!==e&&gt(a,n,{get:()=>r[n],enumerable:!(t=ri(r,n))||t.enumerable});return a};var Y=a=>No(gt({},"__esModule",{value:!0}),a);var pe=a=>{var r;return[,,,vo((r=a==null?void 0:a[ii("metadata")])!=null?r:null)]},si=["class","method","getter","setter","accessor","field","value","get","set"],Dt=a=>a!==void 0&&typeof a!="function"?pt("Function expected"):a,Eo=(a,r,e,t,n)=>({kind:si[a],name:r,metadata:t,addInitializer:i=>e._?pt("Already initialized"):n.push(Dt(i||null))}),Io=(a,r)=>Tr(r,ii("metadata"),a[3]),ue=(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},ce=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),m=!!(r&16),h=d>3?a.length+1:d?c?1:2:0,f=si[d+5],v=d>3&&(a[h-1]=[]),T=a[h]||(a[h]=[]),S=d&&(!m&&!c&&(n=n.prototype),d<5&&(d>3||!m)&&ri(d<4?n:{get[e](){return u(this,i)},set[e](L){return y(this,i,L)}},e));d?m&&d<4&&ti(i,(d>2?"set ":d>1?"get ":"")+e):ti(n,e);for(var w=t.length-1;w>=0;w--)p=Eo(d,e,l={},a[3],T),d&&(p.static=c,p.private=m,g=p.access={has:m?L=>Lo(n,L):L=>e in L},d^3&&(g.get=m?L=>(d^1?u:E)(L,n,d^4?i:S.get):L=>L[e]),d>2&&(g.set=m?(L,N)=>y(L,n,N,d^4?i:S.set):(L,N)=>L[e]=N)),o=(0,t[w])(d?d<4?m?i:S[f]:d>4?void 0:{get:S.get,set:S.set}:n,p),l._=1,d^4||o===void 0?Dt(o)&&(d>4?v.unshift(o):d?m?i=o:S[f]=o:n=o):typeof o!="object"||o===null?pt("Object expected"):(Dt(s=o.get)&&(S.get=s),Dt(s=o.set)&&(S.set=s),Dt(s=o.init)&&v.unshift(s));return d||Io(a,n),S&&gt(n,e,S),m?d^4?i:S:n},re=(a,r,e)=>Tr(a,typeof r!="symbol"?r+"":r,e),an=(a,r,e)=>r.has(a)||pt("Cannot "+e),Lo=(a,r)=>Object(r)!==r?pt('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(an(a,r,"read from private field"),e?e.call(a):r.get(a)),b=(a,r,e)=>r.has(a)?pt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),y=(a,r,e,t)=>(an(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),E=(a,r,e)=>(an(a,r,"access private method"),e);var yr=(a,r,e,t)=>({set _(n){y(a,r,n,e)},get _(){return u(a,r,t)}});var oi,ai,li=k(()=>{"use strict";oi=(()=>{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})(),ai=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});var qe,di=k(()=>{"use strict";qe=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ye,gi,$e,Ne,Qe,pi,ie,ui,me,Fo,Ro,Ut,ci,mi,Po,Bo,ut,Ee,K=k(()=>{"use strict";di();ye=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,gi=String.raw`[^[\]<>"\0-\x1F\x7F${ye}\uFFFD]`,$e=String.raw`(?:\[[\da-f:.]+\]|${gi})`,Ne=String.raw`(?:${gi}|\0\d+[cn!~]\x7F)*`,Qe=(a,r)=>e=>e.replace(a,r),pi=Qe(/[\0\x7F]|\r$/gmu,""),ie=Qe(/\0\d+[cn]\x7F/gu,""),ui=Qe(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),me=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Fo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ro=Qe(/&(?:#(\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)):Fo[e.toLowerCase()]),Ut=a=>Ro(a),ci=Qe(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),mi=Qe(/\n/gu,String.raw`\n`),Po={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Bo=a=>Qe(a,r=>`&${Po[r]};`),ut=Bo(/[&<>]/gu),Ee=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var hi=$o((La,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},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var ln,fi=k(()=>{"use strict";ln=hi()});var Ht,ct,Vt,Xt,dn,I,J=k(()=>{"use strict";I=class{constructor(r,e){b(this,Xt);b(this,Ht);b(this,ct);b(this,Vt);y(this,Ht,r),y(this,ct,e)}get start(){return u(this,ct)}get top(){return E(this,Xt,dn).call(this).top}get left(){return E(this,Xt,dn).call(this).left}};Ht=new WeakMap,ct=new WeakMap,Vt=new WeakMap,Xt=new WeakSet,dn=function(){var r;return(r=u(this,Vt))!=null||y(this,Vt,u(this,Ht).getRootNode().posFromIndex(u(this,ct))),u(this,Vt)}});var gn,xi,C,$,Oe,j=k(()=>{"use strict";Se();J();R();gn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),xi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof I?e:new I(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:m}=a(r,s,o,l),{line:h,character:f}=gn(c,m,p,g);return{rule:t,message:x.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:h,startCol:m,endCol:f}},C=xi((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}}),$=xi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),Oe=(a,r,e)=>{if(a)return a[1];let t=r();return e([Ie.rev,t]),t}});var qo,kr,bi=k(()=>{"use strict";qo=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},kr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>qo(i.trim(),t,n))});var Ti,Qt,mt,ht,Kt,Jt,Yt,ft,vr,xt,pn=k(()=>{"use strict";j();Ti=(a,r)=>r.childNodes.slice(0,a).reduce((e,t,n)=>e+t.toString().length+r.getGaps(n),0)+r.getAttribute("padding"),xt=class{constructor(){b(this,ft);re(this,"childNodes",[]);b(this,Qt);b(this,mt);b(this,ht);b(this,Kt);b(this,Jt);b(this,Yt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,Qt)}get nextSibling(){return u(this,mt)}get previousSibling(){return u(this,ht)}get offsetHeight(){return E(this,ft,vr).call(this).height}get offsetWidth(){return E(this,ft,vr).call(this).width}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":y(this,Qt,e),e||(y(this,mt,void 0),y(this,ht,void 0));break;case"nextSibling":y(this,mt,e);break;case"previousSibling":y(this,ht,e);break;default:this[r]=e}}getRootNode(){return Oe(u(this,Jt),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&e.getAttribute("built")&&y(this,Jt,r)})}indexFromPos(r,e){if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}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?Ti(e.childNodes.indexOf(this),e):0}return Ti(r,this)}getAbsoluteIndex(){return Oe(u(this,Yt),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{y(this,Yt,r)})}getBoundingClientRect(){return H(H({},E(this,ft,vr).call(this)),this.getRootNode().posFromIndex(this.getAbsoluteIndex()))}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return Oe(u(this,Kt),()=>{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=>{y(this,Kt,r)})}};Qt=new WeakMap,mt=new WeakMap,ht=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,Yt=new WeakMap,ft=new WeakSet,vr=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var _e,un,cn,Ar,yi=k(()=>{"use strict";K();Se();bi();pn();Ar=class extends xt{constructor(){super(...arguments);b(this,_e)}get length(){return this.childNodes.length}text(e){return me(this.childNodes,e)}normalize(){let e=[...this.childNodes],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 mn(this,e,1)[0]}insertAt(e,t=this.length){return mn(this,t,0,[e]),e}closest(e){let t=kr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=kr(e,this);return E(this,_e,un).call(this,t)}querySelectorAll(e){let t=kr(e,this);return E(this,_e,cn).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)}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];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}">`)+Ee(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=oe(H({},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();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}};_e=new WeakSet,un=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=E(t=n,_e,un).call(t,e);if(i)return i}},cn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...E(n=i,_e,cn).call(n,e)));return t}});var hn,ki,Oo,_o,Mo,zo,Go,Wo,fn,Sr,vi,Zt,Ai=k(()=>{"use strict";K();j();R();pn();hn=String.raw`[${ye}\t]*`,ki=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${hn}\d)|isbn(?=[-::]?${hn}(?:\d(?:${hn}|-)){6})`,Oo=new RegExp(String.raw`${ki}|https?[:/]/+`,"giu"),_o=new RegExp(ki,"giu"),Mo=new Set(["attr-value","ext-link-text","link-text"]),zo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Go={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Wo=["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{fn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){fn=/\w/u}Zt=class extends xt{constructor(e){super();b(this,Sr);re(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?ie(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var z,B,X;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:p,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:Q,name:Z,tag:U}=g;if(Q!=="ext-attr")d=!0;else if(U==="choose"&&(Z==="before"||Z==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&p==="link"||d?_o:Oo),n.search(t)===-1)return[];t.lastIndex=0;let c=[],m=s==null?void 0:s.type,h=s==null?void 0:s.name,f=o==null?void 0:o.type,v=this.getRootNode(),T=v.toString(),{ext:S,html:w}=v.getAttribute("config"),{top:L,left:N}=v.posFromIndex(e),q=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Wo]);for(let Q=t.exec(n);Q;Q=t.exec(n)){let[,Z,U]=Q,{index:W}=Q,ee=Q[0].toLowerCase();if(U&&U!=="]"){let{length:de}=U;W+=de,ee=ee.slice(de)}let{0:F,length:Ae}=ee,te=F==="r"||F==="p"||F==="i";if(F==="<"&&!q.has(Z.toLowerCase())||F==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(W+1))||s!=null&&s.is("ext")&&h==="nowiki"&&((z=s.innerText)!=null&&z.includes("]")))||te&&(!i.getAttribute("plain")||Mo.has(l)))continue;F==="]"&&(W||Ae>1)&&t.lastIndex--;let ge=e+W,Ve=ge+Ae,je=T[Ve],br=T[ge-1],nn=Ae>1&&!(F==="<"&&!/[\s/>]/u.test(je!=null?je:"")||d&&(F==="["||F==="]")||te&&l==="parameter-value")||F==="{"&&(je===F||br==="-")||F==="}"&&(br===F||je==="-")||F==="["&&(je===F||l==="ext-link-text"||m==="free-ext-link"&&!n.slice(W+1).trim())||F==="]"&&(br===F||f==="free-ext-link"&&!n.slice(0,W).includes("]"))?"error":"warning",sn=F==="{"||F==="[";if(nn==="warning"&&(sn||(F==="]"||F==="}"))){let de=zo[F],on=sn?n.slice(W+1):n.slice(0,W);if(F==="{"&&((B=de.exec(on))==null?void 0:B[0])==="}"||F==="}"&&((X=de.exec(on))==null?void 0:X[0])==="{")continue;if(!on.includes(F)){let Zn=sn?"nextSibling":"previousSibling",Xe=this[Zn];for(;Xe&&(Xe.type!=="text"||!de.test(Xe.data));)Xe=Xe[Zn];if(Xe&&de.exec(Xe.data)[0]!==F)continue}}te&&(ee=ee.toUpperCase());let Kn=this.posFromIndex(W),{line:Jn,character:Yn}=gn(L,N,Kn.top+1,Kn.left),dt={rule:Go[F],message:x.msg('lonely "$1"',te||F==="h"?ee:F),severity:nn,startIndex:ge,endIndex:Ve,startLine:Jn,endLine:Jn,startCol:Yn,endCol:Yn+Ae};if(F==="<")dt.suggestions=[{desc:"escape",range:[ge,ge+1],text:"&lt;"}];else if(F==="h"&&l!=="link-text"&&fn.test(br||""))dt.suggestions=[{desc:"whitespace",range:[ge,ge],text:" "}];else if(F==="["&&l==="ext-link-text"){let de=i.getAbsoluteIndex()+i.toString().length;dt.suggestions=[{desc:"escape",range:[de,de+1],text:"&#93;"}]}else if(F==="]"&&f==="free-ext-link"&&nn==="error"){let de=e-o.toString().length;dt.fix={range:[de,de],text:"[",desc:"left bracket"}}else te&&(dt.suggestions=[...Q[0]===ee?[]:[{desc:"uppercase",range:[ge,Ve],text:ee}],...je===":"||je==="\uFF1A"?[{desc:"whitespace",range:[Ve,Ve+1],text:" "}]:[]]);c.push(dt)}return c}replaceData(e){E(this,Sr,vi).call(this,e)}print(){return ut(this.data)}};Sr=new WeakSet,vi=function(e){this.setAttribute("data",e)}});var he,Ke=k(()=>{"use strict";Se();he=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return wr(n,e),n}});var er,fe,bt=k(()=>{"use strict";P();fe=class extends A{constructor(e,t,n,i,s,o){super(e,i,s,o);b(this,er);y(this,er,n)}get type(){return u(this,er)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};er=new WeakMap});var Tt,M,Le=k(()=>{"use strict";P();M=class extends A{constructor(e,t,n,i,s){super(e,n,i,s);b(this,Tt);y(this,Tt,t)}get type(){return u(this,Tt)}set type(e){y(this,Tt,e)}};Tt=new WeakMap});var Do,Je,ke,Me,we,tr=k(()=>{"use strict";j();K();J();R();P();Le();Do=a=>a==="redirect-target"||a==="link",we=class extends A{constructor(e,t,n=x.getConfig(),i=[],s="|"){super(void 0,n,i,{});b(this,Je,!0);b(this,ke);b(this,Me);if(this.insertAt(new M(e,"link-target",n,i,{})),t!==void 0){let o=new A(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}y(this,ke,s)}afterBuild(){y(this,Me,this.getTitle()),u(this,ke).includes("\0")&&y(this,ke,this.buildFromStr(u(this,ke),0)),this.setAttribute("name",u(this,Me).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?y(this,Je,t):e==="title"?y(this,Me,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,ke));return u(this,Je)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Je)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,Me):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,ke).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:p}=u(this,Me),g=new I(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push(C(i,g,"unknown-page","template in an internal link target","warning")),l){let d=C(i,g,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:qe(i.text())}],n.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(c=>c.type==="text"&&c.data.includes("|"));if(d){let c=C(s,g,"pipe-like",'additional "|" in the link text',"warning"),m=c.startIndex+d.getRelativeIndex();c.suggestions=[{desc:"escape",range:[m,m+d.data.length],text:d.data.replace(/\|/gu,"&#124;")}],n.push(c)}}if(p!==void 0&&!Do(o)){let d=C(i,g,"no-ignored","useless fragment"),c=i.childNodes.find(m=>m.type==="text"&&m.data.includes("#"));c&&(d.fix={range:[d.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),n.push(d)}return n}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(u(this,Je)?{pre:"[[",post:"]]",sep:u(this,ke)}:{sep:u(this,ke)})}};Je=new WeakMap,ke=new WeakMap,Me=new WeakMap});var se,ze=k(()=>{"use strict";P();se=class extends A{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Si,xn,Uo,D,Ge=k(()=>{"use strict";Ke();ze();Si=[he()];D=class extends(Uo=se){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};xn=pe(Uo),D=ce(xn,0,"NoincludeToken",Si,D),ue(xn,1,D)});var Cr,wi=k(()=>{"use strict";j();tr();Ge();Cr=class extends we{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new D(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!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 Ci,We,yt,bn,Ho,Ye,$i=k(()=>{"use strict";Ke();R();P();bt();wi();Ci=[he(!1,!1)];Ye=class extends(Ho=A){constructor(e,t,n,i,s,o=x.getConfig(),l=[]){super(void 0,o,l);b(this,We);b(this,yt);y(this,We,e),y(this,yt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new fe(t,p,"redirect-syntax",o,l,{}),new Cr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,We).length:super.getAttribute(e)}toString(e){return u(this,We)+super.toString(e)+u(this,yt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,We).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,We),post:u(this,yt)})}};bn=pe(Ho),We=new WeakMap,yt=new WeakMap,Ye=ce(bn,0,"RedirectToken",Ci,Ye),ue(bn,1,Ye)});var Ni={};ae(Ni,{parseRedirect:()=>Vo});var Vo,Ei=k(()=>{"use strict";R();$i();Vo=(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&&x.normalizeTitle(t[3],0,!1,r,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ye(...t.slice(1),r,e),a):!1}});var $r,Ii=k(()=>{"use strict";P();$r=class extends A{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 De,kt,Tn=k(()=>{"use strict";P();kt=class extends A{constructor(e,t,n,i,s,o=[]){super(void 0,s);b(this,De);re(this,"closed");re(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),y(this,De,[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]=u(this,De);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,De);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,De)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,De);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};De=new WeakMap});var Li,yn,Xo,Ze,Fi=k(()=>{"use strict";j();J();Ke();R();Tn();Li=[he(!1)];Ze=class extends(Xo=kt){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 I(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=$(this,s,"unclosed-comment",x.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};yn=pe(Xo),Ze=ce(yn,0,"IncludeToken",Li,Ze),ue(yn,1,Ze)});var V,Ri,Pi,Er,kn,Bi,vt,ji,qi,Oi,Nr,_i,Mi,zi,Gi,Wi=k(()=>{"use strict";V=new Set(["align"]),Ri=new Set(["cite"]),Pi=new Set(["cite","datetime"]),Er=new Set(["width"]),kn=new Set(["axis","align","bgcolor","height","width","valign"]),Bi=new Set([...kn,"abbr","headers","scope","rowspan","colspan"]),vt=new Set(["type"]),ji=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),qi=new Set(["clear"]),Oi=new Set(["bgcolor","align","valign"]),Nr=new Set,_i=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"]),Mi={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:Ri,q:Ri,p:V,br:qi,pre:Er,ins:Pi,del:Pi,ul:vt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ji,"border"]),caption:V,tr:Oi,td:Bi,th:Bi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Er,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:vt,poem:V,categorytree:V,combooption:V},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:Nr,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:Nr,inputbox:Nr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Nr,poll:new Set(["id","show-results-before-voting"]),sm2:vt,flashmp3:vt,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"])},Gi={table:ji,td:new Set([...kn,"scope"]),th:kn,br:qi,caption:V,div:V,hr:Er,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:vt,p:V,pre:Er,tr:Oi,ul:vt}});var Qo,rr,At,ne,Ce,St,Di=k(()=>{"use strict";j();K();Wi();J();R();P();Le();Qo=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,St=class extends A{constructor(e,t,n,i="",s,o=[],l=x.getConfig(),p=[]){let g=new M(n,"attr-key",l,p),d;if(n==="title"||t==="img"&&n==="alt")d=new A(s,l,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let c=oe(H({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});d=new A(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new M(s,"attr-value",l,p,{});super(void 0,l,p);b(this,rr);b(this,At);b(this,ne);b(this,Ce);y(this,rr,e),this.append(g,d),y(this,ne,i),y(this,Ce,[...o]),y(this,At,t),this.setAttribute("name",ie(n).trim().toLowerCase())}get type(){return u(this,rr)}get tag(){return u(this,At)}get balanced(){return!u(this,ne)||u(this,Ce)[0]===u(this,Ce)[1]}afterBuild(){u(this,ne).includes("\0")&&y(this,ne,this.buildFromStr(u(this,ne),0)),this.parentNode&&y(this,At,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,Ce);return u(this,ne)?super.toString(e,u(this,ne)+t)+n:this.firstChild.toString(e)}text(){return u(this,ne)?`${super.text(`${u(this,ne).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,ne)?u(this,ne).length+((t=(e=u(this,Ce)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var v;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:p,tag:g}=this,d=this.getValue(),c=new I(this,e);if(!i){let T=C(o,c,"unclosed-quote",x.msg("unclosed $1","quotes"),"warning");T.startIndex--,T.startCol--,T.suggestions=[{range:[T.endIndex,T.endIndex],text:u(this,Ce)[0],desc:"close"}],n.push(T)}let m=zi[g],h=Mi[g],{length:f}=this.toString();if(!(m!=null&&m.has(p))&&!(h!=null&&h.has(p))&&(l==="ext-attr"?m||h:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!h||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!_i.has(p)))){let T=C(s,c,"illegal-attr","illegal attribute name");T.suggestions=[{desc:"remove",range:[e,e+f],text:""}],n.push(T)}else if((v=Gi[g])!=null&&v.has(p))n.push(C(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Qo.test(d))n.push(C(o,c,"insecure-style","insecure style"));else if(p==="tabindex"&&typeof d=="string"&&d!=="0"){let T=C(o,c,"illegal-attr","nonzero tabindex");T.suggestions=[{desc:"remove",range:[e,e+f],text:""},{desc:"0 tabindex",range:[T.startIndex,T.endIndex],text:"0"}],n.push(T)}return n}getValue(){return u(this,ne)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,Ce);return u(this,ne)?super.print({sep:ut(u(this,ne))+e,post:t}):super.print()}};rr=new WeakMap,At=new WeakMap,ne=new WeakMap,Ce=new WeakMap});var Ui,Ko,vn,nr,Ue,Ir=k(()=>{"use strict";j();K();J();R();P();Le();Di();Ui=a=>a.slice(0,-1),Ko=a=>`${Ui(a)}-dirty`;try{vn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){vn=/[^\W_]/u}Ue=class extends A{constructor(e,t,n,i=x.getConfig(),s=[]){super(void 0,i,s,{});b(this,nr);if(y(this,nr,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="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new M(l,Ko(t),i,s,{})),l="")};for(;p;){let{index:c,0:m,1:h,2:f,3:v,4:T,5:S,6:w}=p;if(l+=e.slice(g,c),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ie(h).trim())){let L=T!=null?T:w,N=[v,S],q=new St(Ui(t),n,h,f,L,N,i,s);d(),super.insertAt(q)}else l+=m;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,nr)}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 St&&(!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,p=new I(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=$(this,p,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],n.push(g)}for(let g of s)if(g instanceof St){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let c=C(g,p,"no-ignored","containing invalid attribute",vn.test(d)?"error":"warning");c.suggestions=[{desc:"remove",range:[c.startIndex,c.endIndex],text:" "}],n.push(c)}}if(l.size>0)for(let g of l){let d=o.get(g).map(c=>{let m=c.getValue();return[c,m===!0?"":m]});n.push(...d.map(([c,m],h)=>{let f=C(c,p,"no-duplicate",x.msg("duplicated $1 attribute",g)),v={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!m||d.slice(0,h).some(([,T])=>T===m)?f.fix=v:f.suggestions=[v],f}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof M?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};nr=new WeakMap});var Lr,Hi=k(()=>{"use strict";R();P();Ge();Lr=class extends A{get type(){return"ext-inner"}constructor(r,e=x.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),p=0,g="";for(;o&&l;)new D(o[0],e,t),new D(l[0],e,t),g+=`${r.slice(p,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,p=l.index+s+1,n.lastIndex=p,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(p)}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 wt,An=k(()=>{"use strict";j();J();ir();R();P();Le();wt=class extends A{get type(){return"ext-inner"}constructor(r,e,t=x.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=M;this.append(...e.split(`
3
- `).map(o=>i?o:et(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 Io=Object.create;var mt=Object.defineProperty,Eo=Object.defineProperties,pi=Object.getOwnPropertyDescriptor,Lo=Object.getOwnPropertyDescriptors,Fo=Object.getOwnPropertyNames,di=Object.getOwnPropertySymbols;var ui=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable;var ci=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),ft=a=>{throw TypeError(a)};var Cr=(a,r,e)=>r in a?mt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,J=(a,r)=>{for(var e in r||(r={}))ui.call(r,e)&&Cr(a,e,r[e]);if(di)for(var e of di(r))Po.call(r,e)&&Cr(a,e,r[e]);return a},de=(a,r)=>Eo(a,Lo(r)),gi=(a,r)=>mt(a,"name",{value:r,configurable:!0});var v=(a,r)=>()=>(a&&(r=a(a=0)),r);var Ro=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),ge=(a,r)=>{for(var e in r)mt(a,e,{get:r[e],enumerable:!0})},jo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Fo(r))!ui.call(a,n)&&n!==e&&mt(a,n,{get:()=>r[n],enumerable:!(t=pi(r,n))||t.enumerable});return a};var Q=a=>jo(mt({},"__esModule",{value:!0}),a);var re=a=>{var r;return[,,,Io((r=a==null?void 0:a[ci("metadata")])!=null?r:null)]},hi=["class","method","getter","setter","accessor","field","value","get","set"],Jt=a=>a!==void 0&&typeof a!="function"?ft("Function expected"):a,Bo=(a,r,e,t,n)=>({kind:hi[a],name:r,metadata:t,addInitializer:i=>e._?ft("Already initialized"):n.push(Jt(i||null))}),qo=(a,r)=>Cr(r,ci("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,d,p=r&7,u=!!(r&8),h=!!(r&16),m=p>3?a.length+1:p?u?1:2:0,f=hi[p+5],k=p>3&&(a[m-1]=[]),y=a[m]||(a[m]=[]),S=p&&(!h&&!u&&(n=n.prototype),p<5&&(p>3||!h)&&pi(p<4?n:{get[e](){return c(this,i)},set[e](I){return T(this,i,I)}},e));p?h&&p<4&&gi(i,(p>2?"set ":p>1?"get ":"")+e):gi(n,e);for(var w=t.length-1;w>=0;w--)g=Bo(p,e,l={},a[3],y),p&&(g.static=u,g.private=h,d=g.access={has:h?I=>_o(n,I):I=>e in I},p^3&&(d.get=h?I=>(p^1?c:$)(I,n,p^4?i:S.get):I=>I[e]),p>2&&(d.set=h?(I,L)=>T(I,n,L,p^4?i:S.set):(I,L)=>I[e]=L)),o=(0,t[w])(p?p<4?h?i:S[f]:p>4?void 0:{get:S.get,set:S.set}:n,g),l._=1,p^4||o===void 0?Jt(o)&&(p>4?k.unshift(o):p?h?i=o:S[f]=o:n=o):typeof o!="object"||o===null?ft("Object expected"):(Jt(s=o.get)&&(S.get=s),Jt(s=o.set)&&(S.set=s),Jt(s=o.init)&&k.unshift(s));return p||qo(a,n),S&&mt(n,e,S),h?p^4?i:S:n},se=(a,r,e)=>Cr(a,typeof r!="symbol"?r+"":r,e),gn=(a,r,e)=>r.has(a)||ft("Cannot "+e),_o=(a,r)=>Object(r)!==r?ft('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(gn(a,r,"read from private field"),e?e.call(a):r.get(a)),x=(a,r,e)=>r.has(a)?ft("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),T=(a,r,e,t)=>(gn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),$=(a,r,e)=>(gn(a,r,"access private method"),e);var $r=(a,r,e,t)=>({set _(n){T(a,r,n,e)},get _(){return c(a,r,t)}});var mi=(a,r,e)=>new Promise((t,n)=>{var i=l=>{try{o(e.next(l))}catch(g){n(g)}},s=l=>{try{o(e.throw(l))}catch(g){n(g)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(i,s);o((e=e.apply(a,r)).next())});var fi,xi,bi=v(()=>{"use strict";fi=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11};return Object.setPrototypeOf(a,null),a})(),xi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(a),a})()});var Oe,Ti=v(()=>{"use strict";Oe=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ve,yi,Ne,Ie,Qe,pn,oe,ki,fe,Oo,Mo,Ke,vi,Ai,zo,Uo,xt,Ee,D=v(()=>{"use strict";Ti();ve=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,yi=String.raw`[^[\]<>"\0-\x1F\x7F${ve}\uFFFD]`,Ne=String.raw`(?:\[[\da-f:.]+\]|${yi})`,Ie=String.raw`(?:${yi}|\0\d+[cn!~]\x7F)*`,Qe=(a,r)=>e=>e.replace(a,r),pn=Qe(/[\0\x7F]|\r$/gmu,""),oe=Qe(/\0\d+[cn]\x7F/gu,""),ki=Qe(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),fe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Oo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Mo=Qe(/&(?:#(\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)):Oo[e.toLowerCase()]),Ke=a=>Mo(a),vi=Qe(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Ai=Qe(/\n/gu,String.raw`\n`),zo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Uo=a=>Qe(a,r=>`&${zo[r]};`),xt=Uo(/[&<>]/gu),Ee=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Si=Ro((za,Wo)=>{Wo.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var un,wi=v(()=>{"use strict";un=Si()});var Yt,bt,Zt,er,cn,E,K=v(()=>{"use strict";E=class{constructor(r,e){x(this,er);x(this,Yt);x(this,bt);x(this,Zt);T(this,Yt,r),T(this,bt,e)}get start(){return c(this,bt)}get top(){return $(this,er,cn).call(this).top}get left(){return $(this,er,cn).call(this).left}};Yt=new WeakMap,bt=new WeakMap,Zt=new WeakMap,er=new WeakSet,cn=function(){var r;return(r=c(this,Zt))!=null||T(this,Zt,c(this,Yt).getRootNode().posFromIndex(c(this,bt))),c(this,Zt)}});var hn,Ci,C,N,Le,q=v(()=>{"use strict";Ae();K();P();hn=(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 E?e:new E(r,s),{offsetHeight:g,offsetWidth:d}=r,{startIndex:p,startLine:u,startCol:h}=a(r,s,o,l),{line:m,character:f}=hn(u,h,g,d);return{rule:t,message:b.msg(n),severity:i,startIndex:p,endIndex:p+r.toString().length,startLine:u,endLine:m,startCol:h,endCol:f}},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}}),N=Ci((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),Le=(a,r,e)=>{if(a)return a[1];let t=r();return e([pe.rev,t]),t}});var Go,Nr,$i=v(()=>{"use strict";Go=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Nr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Go(i.trim(),t,n))});var tr,Tt,yt,rr,nr,kt,vt,ir,mn,At,fn=v(()=>{"use strict";q();Ae();At=class{constructor(){x(this,ir);se(this,"childNodes",[]);x(this,tr);x(this,Tt);x(this,yt);x(this,rr);x(this,nr);x(this,kt);x(this,vt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,tr)}get nextSibling(){return c(this,Tt)}get previousSibling(){return c(this,yt)}get offsetHeight(){return $(this,ir,mn).call(this).height}get offsetWidth(){return $(this,ir,mn).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":T(this,tr,e),e||(T(this,Tt,void 0),T(this,yt,void 0));break;case"nextSibling":T(this,Tt,e);break;case"previousSibling":T(this,yt,e);break;case"aIndex":T(this,kt,[pe.rev,e]);break;default:this[r]=e}}getRootNode(){return Le(c(this,nr),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&T(this,nr,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 Le(c(this,vt)[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,vt)[i]=[pe.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,vt)[r]=e})}getAbsoluteIndex(){return Le(c(this,kt),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{T(this,kt,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return Le(c(this,rr),()=>{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=>{T(this,rr,r)})}};tr=new WeakMap,Tt=new WeakMap,yt=new WeakMap,rr=new WeakMap,nr=new WeakMap,kt=new WeakMap,vt=new WeakMap,ir=new WeakSet,mn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var Me,xn,bn,Ir,Ni=v(()=>{"use strict";D();Ae();$i();fn();Ir=class extends At{constructor(){super(...arguments);x(this,Me)}get length(){return this.childNodes.length}text(e){return fe(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 Tn(this,e,1)[0]}insertAt(e,t=this.length){return Tn(this,t,0,[e]),e}closest(e){let t=Nr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Nr(e,this);return $(this,Me,xn).call(this,t)}querySelectorAll(e){let t=Nr(e,this);return $(this,Me,bn).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}">`)+Ee(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=de(J({},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}};Me=new WeakSet,xn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=$(t=n,Me,xn).call(t,e);if(i)return i}},bn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...$(n=i,Me,bn).call(n,e)));return t}});var yn,Ii,Do,Ho,Vo,Xo,Qo,Ko,kn,Er,Ei,sr,Li=v(()=>{"use strict";D();q();P();fn();yn=String.raw`[${ve}\t]*`,Ii=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${yn}\d)|isbn(?=[-::]?${yn}(?:\d(?:${yn}|-)){6})`,Do=new RegExp(String.raw`${Ii}|https?[:/]/+`,"giu"),Ho=new RegExp(Ii,"giu"),Vo=new Set(["attr-value","ext-link-text","link-text"]),Xo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Qo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Ko=["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{kn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){kn=/\w/u}sr=class extends At{constructor(e){super();x(this,Er);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 le,j,V;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:d}=i,p=!1;if(l==="attr-value"){let{type:X,name:Y,tag:G}=d;if(X!=="ext-attr")p=!0;else if(G==="choose"&&(Y==="before"||Y==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||p?Ho:Do),n.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,f=o==null?void 0:o.type,k=this.getRootNode(),y=k.toString(),{ext:S,html:w}=k.getAttribute("config"),{top:I,left:L}=k.posFromIndex(e),B=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Ko]);for(let X=t.exec(n);X;X=t.exec(n)){let[,Y,G]=X,{index:U}=X,Z=X[0].toLowerCase();if(G&&G!=="]"){let{length:ce}=G;U+=ce,Z=Z.slice(ce)}let{0:F,length:we}=Z,ee=F==="r"||F==="p"||F==="i";if(F==="<"&&!B.has(Y.toLowerCase())||F==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(U+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((le=s.innerText)!=null&&le.includes("]")))||ee&&(!i.getAttribute("plain")||Vo.has(l)))continue;F==="]"&&(U||we>1)&&t.lastIndex--;let me=e+U,Ve=me+we,_e=y[Ve],wr=y[me-1],an=we>1&&!(F==="<"&&!/[\s/>]/u.test(_e!=null?_e:"")||p&&(F==="["||F==="]")||ee&&l==="parameter-value")||F==="{"&&(_e===F||wr==="-")||F==="}"&&(wr===F||_e==="-")||F==="["&&(_e===F||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(U+1).trim())||F==="]"&&(wr===F||f==="free-ext-link"&&!n.slice(0,U).includes("]"))?"error":"warning",ln=F==="{"||F==="[";if(an==="warning"&&(ln||(F==="]"||F==="}"))){let ce=Xo[F],dn=ln?n.slice(U+1):n.slice(0,U);if(F==="{"&&((j=ce.exec(dn))==null?void 0:j[0])==="}"||F==="}"&&((V=ce.exec(dn))==null?void 0:V[0])==="{")continue;if(!dn.includes(F)){let li=ln?"nextSibling":"previousSibling",Xe=this[li];for(;Xe&&(Xe.type!=="text"||!ce.test(Xe.data));)Xe=Xe[li];if(Xe&&ce.exec(Xe.data)[0]!==F)continue}}ee&&(Z=Z.toUpperCase());let si=this.posFromIndex(U),{line:oi,character:ai}=hn(I,L,si.top+1,si.left),ht={rule:Qo[F],message:b.msg('lonely "$1"',ee||F==="h"?Z:F),severity:an,startIndex:me,endIndex:Ve,startLine:oi,endLine:oi,startCol:ai,endCol:ai+we};if(F==="<")ht.suggestions=[{desc:"escape",range:[me,me+1],text:"&lt;"}];else if(F==="h"&&l!=="link-text"&&kn.test(wr||""))ht.suggestions=[{desc:"whitespace",range:[me,me],text:" "}];else if(F==="["&&l==="ext-link-text"){let ce=i.getAbsoluteIndex()+i.toString().length;ht.suggestions=[{desc:"escape",range:[ce,ce+1],text:"&#93;"}]}else if(F==="]"&&f==="free-ext-link"&&an==="error"){let ce=e-o.toString().length;ht.fix={range:[ce,ce],text:"[",desc:"left bracket"}}else ee&&(ht.suggestions=[...X[0]===Z?[]:[{desc:"uppercase",range:[me,Ve],text:Z}],..._e===":"||_e==="\uFF1A"?[{desc:"whitespace",range:[Ve,Ve+1],text:" "}]:[]]);u.push(ht)}return u}replaceData(e){$(this,Er,Ei).call(this,e)}print(){return xt(this.data)}};Er=new WeakSet,Ei=function(e){this.setAttribute("data",e)}});var xe,Je=v(()=>{"use strict";Ae();xe=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Lr(n,e),n}});var or,be,St=v(()=>{"use strict";R();be=class extends A{constructor(e,t,n,i,s,o){super(e,i,s,o);x(this,or);T(this,or,n)}get type(){return c(this,or)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};or=new WeakMap});var wt,M,Fe=v(()=>{"use strict";R();M=class extends A{constructor(e,t,n,i,s){super(e,n,i,s);x(this,wt);T(this,wt,t)}get type(){return c(this,wt)}set type(e){T(this,wt,e)}};wt=new WeakMap});var Jo,Ye,Se,Pe,Ce,ar=v(()=>{"use strict";q();D();K();P();R();Fe();Jo=a=>a==="redirect-target"||a==="link",Ce=class extends A{constructor(e,t,n=b.getConfig(),i=[],s="|"){super(void 0,n,i,{});x(this,Ye,!0);x(this,Se);x(this,Pe);if(this.insertAt(new M(e,"link-target",n,i,{})),t!==void 0){let o=new A(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Se,s)}get link(){}get fragment(){return c(this,Pe).fragment}afterBuild(){T(this,Pe,this.getTitle()),c(this,Se).includes("\0")&&T(this,Se,this.buildFromStr(c(this,Se),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,Ye,t):e==="title"?T(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Se));return c(this,Ye)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,Ye)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Se).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,Pe),d=new E(this,e);if(i.childNodes.some(({type:p})=>p==="template")&&n.push(C(i,d,"unknown-page","template in an internal link target","warning")),l){let p=C(i,d,"url-encoding","unnecessary URL encoding in an internal link");p.suggestions=[{desc:"decode",range:[p.startIndex,p.endIndex],text:Oe(i.text())}],n.push(p)}if(o==="link"||o==="category"){let p=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),u=s==null?void 0:s.childNodes[p];if(u){let h=C(s,d,"pipe-like",'additional "|" in the link text',"warning"),m=h.startIndex+s.getRelativeIndex(p);h.suggestions=[{desc:"escape",range:[m,m+u.data.length],text:u.data.replace(/\|/gu,"&#124;")}],n.push(h)}}if(g!==void 0&&!Jo(o)){let p=C(i,d,"no-ignored","useless fragment"),u=i.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("#")),h=i.childNodes[u];h&&(p.fix={range:[p.startIndex+i.getRelativeIndex(u)+h.data.indexOf("#"),p.endIndex],text:"",desc:"remove"}),n.push(p)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,e,t,!0,!0)}print(){return super.print(c(this,Ye)?{pre:"[[",post:"]]",sep:c(this,Se)}:{sep:c(this,Se)})}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}};Ye=new WeakMap,Se=new WeakMap,Pe=new WeakMap});var ae,ze=v(()=>{"use strict";R();ae=class extends A{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Fi,vn,Yo,W,Ue=v(()=>{"use strict";Je();ze();Fi=[xe()];W=class extends(Yo=ae){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};vn=re(Yo),W=ie(vn,0,"NoincludeToken",Fi,W),ne(vn,1,W)});var Fr,Pi=v(()=>{"use strict";q();ar();Ue();Fr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new W(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!1,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=C(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var Ri,We,Ct,An,Zo,Ze,ji=v(()=>{"use strict";Je();P();R();St();Pi();Ri=[xe(!1,!1)];Ze=class extends(Zo=A){constructor(e,t,n,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);x(this,We);x(this,Ct);T(this,We,e),T(this,Ct,s);let g=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new be(t,g,"redirect-syntax",o,l,{}),new Fr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,We).length:super.getAttribute(e)}toString(e){return c(this,We)+super.toString(e)+c(this,Ct)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+c(this,We).length+this.firstChild.toString().length)}print(){return super.print({pre:c(this,We),post:c(this,Ct)})}};An=re(Zo),We=new WeakMap,Ct=new WeakMap,Ze=ie(An,0,"RedirectToken",Ri,Ze),ne(An,1,Ze)});var Bi={};ge(Bi,{parseRedirect:()=>ea});var ea,qi=v(()=>{"use strict";P();ji();ea=(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&&b.normalizeTitle(t[3],0,!1,r,!0,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ze(...t.slice(1),r,e),a):!1}});var Pr,_i=v(()=>{"use strict";R();Pr=class extends A{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 Ge,$t,Sn=v(()=>{"use strict";R();$t=class extends A{constructor(e,t,n,i,s,o=[]){super(void 0,s);x(this,Ge);se(this,"closed");se(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,Ge,[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,Ge);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,Ge);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,Ge)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,Ge);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};Ge=new WeakMap});var Oi,wn,ta,et,Mi=v(()=>{"use strict";q();K();Je();P();Sn();Oi=[xe(!1)];et=class extends(ta=$t){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 E(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=N(this,s,"unclosed-comment",b.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};wn=re(ta),et=ie(wn,0,"IncludeToken",Oi,et),ne(wn,1,et)});var Nt,Rr=v(()=>{"use strict";Ae();Nt=(a=0)=>(r,e)=>{var n,zi;class t extends r{constructor(){super(...arguments);x(this,n)}getAttr(l){return $(this,n,zi).call(this).getAttr(l)}}return n=new WeakSet,zi=function(){return this.childNodes[a]},Lr(t,r),t}});var H,Ui,Wi,Br,Cn,Gi,It,Di,Hi,Vi,jr,Xi,Qi,Ki,Ji,Yi=v(()=>{"use strict";H=new Set(["align"]),Ui=new Set(["cite"]),Wi=new Set(["cite","datetime"]),Br=new Set(["width"]),Cn=new Set(["axis","align","bgcolor","height","width","valign"]),Gi=new Set([...Cn,"abbr","headers","scope","rowspan","colspan"]),It=new Set(["type"]),Di=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Hi=new Set(["clear"]),Vi=new Set(["bgcolor","align","valign"]),jr=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"]),Qi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:Ui,q:Ui,p:H,br:Hi,pre:Br,ins:Wi,del:Wi,ul:It,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Di,"border"]),caption:H,tr:Vi,td:Gi,th:Gi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Br,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:It,poem:H,categorytree:H,combooption:H},Ki={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:jr,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:jr,inputbox:jr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:jr,poll:new Set(["id","show-results-before-voting"]),sm2:It,flashmp3:It,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"])},Ji={table:Di,td:new Set([...Cn,"scope"]),th:Cn,br:Hi,caption:H,div:H,hr:Br,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:It,p:H,pre:Br,tr:Vi,ul:It}});var ra,lr,Et,te,$e,Lt,Zi=v(()=>{"use strict";q();D();Yi();K();P();R();Fe();ra=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Lt=class extends A{constructor(e,t,n,i="",s,o=[],l=b.getConfig(),g=[]){let d=new M(n,"attr-key",l,g),p;if(n==="title"||t==="img"&&n==="alt")p=new A(s,l,g,{}),p.type="attr-value",p.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let u=de(J({},l),{excludes:[...l.excludes,"heading","html","table","hr","list"]});p=new A(s,u,g,{}),p.type="attr-value",p.setAttribute("stage",1)}else p=new M(s,"attr-value",l,g,{});super(void 0,l,g);x(this,lr);x(this,Et);x(this,te);x(this,$e);T(this,lr,e),this.append(d,p),T(this,te,i),T(this,$e,[...o]),T(this,Et,t),this.setAttribute("name",oe(n).trim().toLowerCase())}get type(){return c(this,lr)}get tag(){return c(this,Et)}get balanced(){return!c(this,te)||c(this,$e)[0]===c(this,$e)[1]}afterBuild(){c(this,te).includes("\0")&&T(this,te,this.buildFromStr(c(this,te),0)),this.parentNode&&T(this,Et,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=c(this,$e);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,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var k;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:d}=this,p=this.getValue(),u=new E(this,e);if(!i){let y=C(o,u,"unclosed-quote",b.msg("unclosed $1","quotes"),"warning");y.startIndex--,y.startCol--,y.suggestions=[{range:[y.endIndex,y.endIndex],text:c(this,$e)[0],desc:"close"}],n.push(y)}let h=Ki[d],m=Qi[d],{length:f}=this.toString();if(!(h!=null&&h.has(g))&&!(m!=null&&m.has(g))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(d==="meta"||d==="link"||!Xi.has(g)))){let y=C(s,u,"illegal-attr","illegal attribute name");y.suggestions=[{desc:"remove",range:[e,e+f],text:""}],n.push(y)}else if((k=Ji[d])!=null&&k.has(g))n.push(C(s,u,"obsolete-attr","obsolete attribute","warning"));else if(g==="style"&&typeof p=="string"&&ra.test(p))n.push(C(o,u,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof p=="string"&&p!=="0"){let y=C(o,u,"illegal-attr","nonzero tabindex");y.suggestions=[{desc:"remove",range:[e,e+f],text:""},{desc:"0 tabindex",range:[y.startIndex,y.endIndex],text:"0"}],n.push(y)}return n}getValue(){return c(this,te)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,$e);return c(this,te)?super.print({sep:xt(c(this,te))+e,post:t}):super.print()}};lr=new WeakMap,Et=new WeakMap,te=new WeakMap,$e=new WeakMap});var es,na,$n,dr,De,qr=v(()=>{"use strict";q();D();K();P();R();Fe();Zi();es=a=>a.slice(0,-1),na=a=>`${es(a)}-dirty`;try{$n=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){$n=/[^\W_]/u}De=class extends A{constructor(e,t,n,i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,dr);if(T(this,dr,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),d=0,p=()=>{l&&(super.insertAt(new M(l,na(t),i,s,{})),l="")};for(;g;){let{index:u,0:h,1:m,2:f,3:k,4:y,5:S,6:w}=g;if(l+=e.slice(d,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(m).trim())){let I=y!=null?y:w,L=[k,S],B=new Lt(es(t),n,m,f,I,L,i,s);p(),super.insertAt(B)}else l+=h;({lastIndex:d}=o),g=o.exec(e)}l+=e.slice(d),p()}}get type(){return c(this,dr)}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 Lt&&(!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 E(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let d=N(this,g,"no-ignored","attributes of a closing tag"),p=i.getAbsoluteIndex();d.suggestions=[{desc:"remove",range:[e,d.endIndex],text:""},{desc:"open",range:[p+1,p+2],text:""}],n.push(d)}for(let d of s)if(d instanceof Lt){let{name:p}=d;o.has(p)?(l.add(p),o.get(p).push(d)):o.set(p,[d])}else{let p=d.text().trim();if(p){let u=C(d,g,"no-ignored","containing invalid attribute",$n.test(p)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],n.push(u)}}if(l.size>0)for(let d of l){let p=o.get(d).map(u=>{let h=u.getValue();return[u,h===!0?"":h]});n.push(...p.map(([u,h],m)=>{let f=C(u,g,"no-duplicate",b.msg("duplicated $1 attribute",d)),k={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!h||p.slice(0,m).some(([,y])=>y===h)?f.fix=k:f.suggestions=[k],f}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof M?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};dr=new WeakMap});var _r,ts=v(()=>{"use strict";P();R();Ue();_r=class extends A{get type(){return"ext-inner"}constructor(r,e=b.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,d="";for(;o&&l;)new W(o[0],e,t),new W(l[0],e,t),d+=`${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=d+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 Ft,Nn=v(()=>{"use strict";q();K();gr();P();R();Fe();Ft=class extends A{get type(){return"ext-inner"}constructor(r,e,t=b.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=M;this.append(...e.split(`
3
+ `).map(o=>i?o:tt(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 I(this,r),t=x.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){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:p})=>p!=="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 p=C(i,e,"no-ignored",t);p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""}],n.push(p)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
6
- `})}}});var sr,Ct,Fr,$t,Sn=k(()=>{"use strict";j();Se();J();R();P();bt();$t=class extends A{constructor(e,t,n=x.getConfig(),i=[]){super(void 0,n,i);b(this,Ct);b(this,sr);y(this,sr,e);let s=new A(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new fe(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,sr)}toString(e){let t=u(this,Ct,Fr);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,Ct,Fr);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("="),p=l||o.endsWith("="),g=i.childNodes.filter(Nt("quote")),d=g.filter(({bold:f})=>f),c=g.filter(({italic:f})=>f),m=new I(this,e);if(this.level===1){let f=C(i,m,"h1","<h1>");p||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),n.push(f)}if(p){let f=C(i,m,"unbalanced-header",x.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[v]=/^=+/u.exec(o);f.suggestions=[{desc:`h${s}`,range:[f.startIndex,f.startIndex+v.length],text:""},{desc:`h${s+v.length}`,range:[f.endIndex,f.endIndex],text:v}]}else{let v=/[^=](=+)$/u.exec(o)[1];f.suggestions=[{desc:`h${s}`,range:[f.endIndex-v.length,f.endIndex],text:""},{desc:`h${s+v.length}`,range:[f.startIndex,f.startIndex],text:v}]}n.push(f)}this.closest("html-attrs,table-attrs")&&n.push($(this,m,"parsing-order","section header in a HTML tag"));let h=this.getRootNode().toString();if(d.length%2){let f=C(d[d.length-1],oe(H({},m),{start:e+s,left:m.left+s}),"format-leakage",x.msg("unbalanced $1 in a section header","bold apostrophes")),v=e+s+o.length;h.slice(f.endIndex,v).trim()?f.suggestions=[{desc:"close",range:[v,v],text:"'''"}]:f.fix={desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}if(c.length%2){let f=C(c[c.length-1],{start:e+s},"format-leakage",x.msg("unbalanced $1 in a section header","italic apostrophes")),v=e+s+o.length;f.fix=h.slice(f.endIndex,v).trim()?{desc:"close",range:[v,v],text:"''"}:{desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}return n}print(){let e=u(this,Ct,Fr);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};sr=new WeakMap,Ct=new WeakSet,Fr=function(){return"=".repeat(this.level)}});var Jo,Rr,Vi=k(()=>{"use strict";K();j();R();P();Jo=new RegExp(`https?://${$e}${Ne}$`,"iu"),Rr=class extends A{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(r,e,t=x.getConfig(),n=[]){super(void 0,t,n);let i=new A(typeof r=="number"?void 0:r,t,n,{}),s=new A(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=Jo.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(){let r=super.json();return r.anon=this.anon,r}}});var ar,tt,rt,nt,wn,Xi,or,Qi=k(()=>{"use strict";K();j();Se();J();R();P();Vi();Le();bt();or=class extends A{constructor(e,t,n=x.getConfig(),i=[]){var f,v;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,{});b(this,nt);re(this,"modifier","");b(this,ar,"template");b(this,tt,!1);b(this,rt,new Map);let{parserFunction:[l,p],variable:g}=n,d=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[T,...S]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((v=S[0])!=null?v:"");this.setModifier(`${T}:${w}`)&&(e=S.join(":").slice(w.length))}let c=e.includes(":");if(c||t.length===0&&!u(this,tt)){let T=e.indexOf(":"),S=T===-1?e:e.slice(0,T),w=T===-1?void 0:e.slice(T+1),L=ie(S),N=L[w===void 0?"trim":"trimStart"](),q=N.toLowerCase(),z=Array.isArray(p),B=z?p.includes(N):Object.prototype.hasOwnProperty.call(p,N),X=!z&&B?p[N]:Object.prototype.hasOwnProperty.call(l,q)&&l[q];if(z&&B||g.includes(X)||c&&X){this.setAttribute("name",X||q.replace(/^#/u,"")),y(this,ar,"magic-word");let Z=new RegExp(String.raw`^\s*${N}\s*$`,B?"u":"iu"),U=new fe(S,Z,"magic-word-name",n,i,{});if(super.insertAt(U),w!==void 0&&t.unshift([w]),this.name==="invoke")for(let W=0;W<2;W++){let ee=t.shift();if(!ee)break;let F=new M(ee.join("="),`invoke-${W?"function":"module"}`,n,i);super.insertAt(F)}}}if(this.type==="template"){let T=ie(e).trim();if(!this.normalizeTitle(T,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new M(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let m=this.isTemplate(),h=1;for(let[T,S]of t.entries())m||this.name==="switch"&&T>0||this.name==="tag"&&T>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(h),h++),this.insertAt(new Rr(...S,n,i));this.seal("modifier")}get type(){return u(this,ar)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=ie(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return u(this,tt)&&o||!u(this,tt)&&(l||e==="")||(Ie.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),y(this,tt,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&this.setAttribute("name",E(this,nt,wn).call(this).title)}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":":")+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?"":":")+me(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;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 I(this,e),p=i==="magic-word";if(p&&!E(this,nt,wn).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.find(m=>m.type==="text"&&Ut(m.data).includes("#"));if(c){let m=C(d,l,"no-ignored","useless fragment");m.fix={range:[m.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),m.endIndex],text:"",desc:"remove"},n.push(m)}}if(p&&o===2)return n.push($(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(g.length>0)for(let[,d]of g)n.push(...d.map(c=>{let m=C(c,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?E(this,nt,Xi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Nt("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 u(this,rt).has(i)?s=u(this,rt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,rt).set(i,s)),s}getDuplicatedArgs(){return[...u(this,rt)].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:p}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||p.type!=="magic-word")o++;else try{let g=p.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${ut(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ee(e.slice(1),{sep:"|"}):Ee(e,{sep:"|"})}}}</span>`}};ar=new WeakMap,tt=new WeakMap,rt=new WeakMap,nt=new WeakSet,wn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Xi=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.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Ki,Cn,Yo,it,Ji=k(()=>{"use strict";Ke();P();Ki=[he()];it=class extends(Yo=A){get type(){return"hidden"}};Cn=pe(Yo),it=ce(Cn,0,"HiddenToken",Ki,it),ue(Cn,1,it)});var Br,Yi,Pr,Zi=k(()=>{"use strict";K();j();J();R();P();Le();Ji();Pr=class extends A{constructor(e,t=x.getConfig(),n=[]){super(void 0,t,n,{});b(this,Br);for(let[i,s]of e.entries())if(i===0){let o=new M(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new it(s,t,n);super.insertAt(o)}else{let o=new A(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`{{{${me(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){E(this,Br,Yi).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=$(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new I(this,e);o.push(...s.map(p=>{let g=C(p,l,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}};Br=new WeakSet,Yi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var ts={};ae(ts,{parseBraces:()=>lr});var Zo,es,$n,ea,lr,jr=k(()=>{"use strict";K();Sn();Qi();Zi();Zo={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},es=String.raw`|\{{2,}`,$n=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ea=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,lr=(a,r,e)=>{var d,c,m,h,f,v;let t=String.raw`${(d=r.excludes)!=null&&d.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[];a=a.replace(ea,(T,S)=>{var w;return new or(T.slice(2,-2),[],r,e),`\0${e.length-2}${(w=$n.get(S.toLowerCase()))!=null?w:"t"}\x7F`});let s=a.lastIndexOf("}}")-a.length,o=s+a.length!==-1,l=new RegExp(t+(o?es:""),"gmu"),p=l.exec(a),g;for(;p||g!==void 0&&g<=a.length&&((m=(c=i[i.length-1])==null?void 0:c[0])!=null&&m.startsWith("="));){if(p!=null&&p[1]){let[,{length:U}]=p;p[0]=p[0].slice(U),p.index+=U}let{0:T,index:S}=p!=null?p:{0:`
7
- `,index:a.length},w=(h=i.pop())!=null?h:{},{0:L,index:N,parts:q,findEqual:z,pos:B}=w,X=T==="="&&z,Q=U=>{q[q.length-1].push(U.slice(B,S))};if(T==="]]"||T==="}-")g=S+2;else if(T===`
8
- `){g=S+1;let{pos:U,findEqual:W}=(f=i[i.length-1])!=null?f:{};if(U===void 0||W||ie(a.slice(U,N))!==""){let ee=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(N,S));ee&&(a=`${a.slice(0,N)}\0${e.length}h\x7F${a.slice(S)}`,g=N+4+String(e.length).length,new $t(ee[1].length,ee.slice(2),r,e))}}else if(T==="|"||X)g=S+1,Q(a),T==="|"&&q.push([]),w.pos=g,w.findEqual=T==="|",i.push(w);else if(T.startsWith("}}")){let U=T.slice(0,Math.min(L.length,3)),W=L.length-U.length,{length:ee}=e;g=S+U.length,Q(a);let F=!1,Ae="t";if(U.length===3){let te=q.map(Ve=>Ve.join("=")),ge=te.length>1&&ie(te[1]).trim();new Pr(te,r,e),ge&&ge.endsWith(":")&&n.includes(ge.slice(0,-1).toLowerCase())&&(Ae="s")}else try{new or(q[0][0],q.slice(1),r,e);let te=ie(q[0][0]).trim();$n.has(te.toLowerCase())?Ae=$n.get(te.toLowerCase()):/^(?:filepath|(?:full|canonical)urle?):./iu.test(te)?Ae="m":/^#vardefine:./iu.test(te)&&(Ae="n")}catch(te){if(te instanceof SyntaxError&&te.message==="Invalid template name")F=!0;else throw te}F||(a=`${a.slice(0,N+W)}\0${ee}${Ae}\x7F${a.slice(g)}`,g=N+W+3+String(ee).length,W>1?i.push({0:L.slice(0,W),index:N,pos:N+W,parts:[[]]}):W===1&&a[N-1]==="-"&&i.push({0:"-{",index:N-1,pos:N+1,parts:[[]]}))}else g=S+T.length,T.startsWith("{")&&(p.pos=g,p.parts=[[]]),i.push(..."0"in w?[w]:[],p);let Z=i[i.length-1];if(o&&s+a.length<g)for(o=!1;(v=Z==null?void 0:Z[0])!=null&&v.startsWith("{");)i.pop(),Z=i[i.length-1];l=new RegExp(t+(o?es:"")+(Z?`|${Zo[Z[0][0]]}${Z.findEqual?"|=":""}`:""),"gmu"),l.lastIndex=g,p=l.exec(a)}return a}});var qr,rs=k(()=>{"use strict";ir();jr();R();An();qr=class extends wt{constructor(r,e,t=x.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=et(e,t,n,r)),e&&(e=lr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function ns(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}|//)${$e}|\0\d+m\x7F)${Ne}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=x.normalizeTitle(i,0,!1,e,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 ta,le,_r,is,Or,ss=k(()=>{"use strict";K();j();R();P();ta=new Set(["alt","link","lang","page","caption"]);Or=class extends A{constructor(e,t,n=x.getConfig(),i){var r=(...kg)=>(super(...kg),b(this,_r),b(this,le,""),this);var p;let s,o=Object.entries(n.img).map(([g,d])=>{let c=new RegExp(String.raw`^(\s*(?!\s))${g.replace("$1","(.*)")}${g.endsWith("$1")?`(?=$|
9
- )`:""}(\s*)$`,"u");return[g,d,c]}),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||ns(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),y(this,le,e)):(r(s[2],n,i,{}),y(this,le,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,oe(H({},n),{excludes:[...(p=n.excludes)!=null?p:[],"list"]}),i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?ns("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ta.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return u(this,le)?u(this,le).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,le)?u(this,le).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,le).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=$(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=$(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:qe(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():E(this,_r,is).call(this)||super.text()}print(){return u(this,le)?`<span class="wpb-image-parameter">${u(this,le).replace("$1",`<span class="wpb-image-caption">${Ee(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};le=new WeakMap,_r=new WeakSet,is=function(){return u(this,le)&&!u(this,le).includes("$1")}});var os,as,ls,ra,Et,Nn=k(()=>{"use strict";K();j();J();R();tr();ss();os=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),as=new Set(["left","right","center","none"]),ls=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ra=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(ui).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:p,index:g}=s;p!==e?o+=p===a?1:-1:o===0&&(i.push(t.slice(l,g)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},Et=class extends we{get type(){return"file"}get extension(){return this.getTitle().extension}constructor(r,e,t=x.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0);this.append(...ra("-{","}-","|",e).map(o=>new Or(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var m;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:h})=>{let f=h.filter(v=>v.text().trim());return f.length!==1||f[0].type!=="arg"}),i=[...new Set(n.map(({name:h})=>h))],s=i.filter(h=>os.has(h)),o=i.filter(h=>as.has(h)),l=i.filter(h=>ls.has(h)),[p]=s,g=p==="framed"||p==="manualthumb",d=new I(this,r);if(this.closest("ext-link-text")&&((m=this.getValue("link"))==null?void 0:m.trim())!==""&&t.push($(this,d,"nested-link","internal link in an external link")),g)for(let h of n.filter(({name:f})=>f==="width")){let f=C(h,d,"invalid-gallery","invalid image parameter");f.fix={range:[f.startIndex-1,f.endIndex],text:"",desc:"remove"},t.push(f)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let c=(h,f)=>v=>{let T=C(v,d,"no-duplicate",x.msg(`${h} image $1 parameter`,f));return T.suggestions=[{desc:"remove",range:[T.startIndex-1,T.endIndex],text:""}],T};for(let h of i){if(h==="invalid"||h==="width"&&g)continue;let f=n.filter(({name:v})=>v===h);h==="caption"&&(f=[...f.slice(0,-1).filter(v=>v.text()),...f.slice(-1)]),f.length>1&&t.push(...f.map(c("duplicated",h)))}return s.length>1&&t.push(...n.filter(({name:h})=>os.has(h)).map(c("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:h})=>as.has(h)).map(c("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:h})=>ls.has(h)).map(c("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()}}});var It,En=k(()=>{"use strict";j();R();P();Nn();It=class extends Et{constructor(e,t,n,i=x.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new A(n,i,s);for(let p=1;p<11;p++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);re(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(){let e=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),e?0:6,!0,!e)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i,interwiki:s}=this.getAttribute("title");if(s||i!==6){let o=$(this,{start:e},"invalid-gallery","invalid gallery image");o.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(o)}return n}}});var zr,ds,Mr,gs=k(()=>{"use strict";R();P();En();Ge();Mr=class extends A{constructor(e,t=x.getConfig(),n=[]){var i;super(void 0,t,n,{});b(this,zr);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 D(s,t,n):s);continue}let[,l,p]=o;E(this,zr,ds).call(this,l)?super.insertAt(new It("gallery",l,p,t,n)):super.insertAt(new D(s,t,n))}}get type(){return"ext-inner"}toString(e){return super.toString(e,`
5
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new E(this,r),t=b.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){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 pr,Pt,Or,Rt,In=v(()=>{"use strict";q();Ae();K();P();R();St();Rt=class extends A{constructor(e,t,n=b.getConfig(),i=[]){super(void 0,n,i);x(this,Pt);x(this,pr);T(this,pr,e);let s=new A(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,pr)}toString(e){let t=$(this,Pt,Or).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=$(this,Pt,Or).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("="),d=i.childNodes.filter(jt("quote")),p=d.filter(({bold:f})=>f),u=d.filter(({italic:f})=>f),h=new E(this,e);if(this.level===1){let f=C(i,h,"h1","<h1>");g||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),n.push(f)}if(g){let f=C(i,h,"unbalanced-header",b.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[k]=/^=+/u.exec(o);f.suggestions=[{desc:`h${s}`,range:[f.startIndex,f.startIndex+k.length],text:""},{desc:`h${s+k.length}`,range:[f.endIndex,f.endIndex],text:k}]}else{let k=/[^=](=+)$/u.exec(o)[1];f.suggestions=[{desc:`h${s}`,range:[f.endIndex-k.length,f.endIndex],text:""},{desc:`h${s+k.length}`,range:[f.startIndex,f.startIndex],text:k}]}n.push(f)}this.closest("html-attrs,table-attrs")&&n.push(N(this,h,"parsing-order","section header in an HTML tag"));let m=this.getRootNode().toString();if(p.length%2){let f=C(p[p.length-1],de(J({},h),{start:e+s,left:h.left+s}),"format-leakage",b.msg("unbalanced $1 in a section header","bold apostrophes")),k=e+s+o.length;m.slice(f.endIndex,k).trim()?f.suggestions=[{desc:"close",range:[k,k],text:"'''"}]:f.fix={desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}if(u.length%2){let f=C(u[u.length-1],{start:e+s},"format-leakage",b.msg("unbalanced $1 in a section header","italic apostrophes")),k=e+s+o.length;f.fix=m.slice(f.endIndex,k).trim()?{desc:"close",range:[k,k],text:"''"}:{desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}return n}print(){let e=$(this,Pt,Or).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}};pr=new WeakMap,Pt=new WeakSet,Or=function(){return"=".repeat(this.level)}});var ia,Mr,rs=v(()=>{"use strict";D();q();P();R();ia=new RegExp(`https?://${Ne}${Ie}$`,"iu"),Mr=class extends A{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=b.getConfig(),n=[]){super(void 0,t,n);let i=new A(typeof r=="number"?void 0:r,t,n,{}),s=new A(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=ia.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 cr,rt,nt,Bt,it,En,ns,ur,is=v(()=>{"use strict";D();q();Ae();K();P();R();rs();Fe();St();ur=class extends A{constructor(e,t,n=b.getConfig(),i=[]){var f,k;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,{});x(this,it);se(this,"modifier","");x(this,cr,"template");x(this,rt,!1);x(this,nt,new Map);x(this,Bt);let{parserFunction:[l,g],variable:d}=n,p=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(p)this.setAttribute("modifier",p),e=e.slice(p.length);else if(e.includes(":")){let[y,...S]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((k=S[0])!=null?k:"");this.setModifier(`${y}:${w}`)&&(e=S.join(":").slice(w.length))}let u=e.includes(":");if(u||t.length===0&&!c(this,rt)){let y=e.indexOf(":"),S=y===-1?e:e.slice(0,y),w=y===-1?void 0:e.slice(y+1),I=oe(S),L=I[w===void 0?"trim":"trimStart"](),B=L.toLowerCase(),le=Array.isArray(g),j=le?g.includes(L):Object.prototype.hasOwnProperty.call(g,L),V=!le&&j?g[L]:Object.prototype.hasOwnProperty.call(l,B)&&l[B];if(le&&j||d.includes(V)||u&&V){this.setAttribute("name",V||B.replace(/^#/u,"")),T(this,cr,"magic-word");let Y=new RegExp(String.raw`^\s*${L}\s*$`,j?"u":"iu"),G=new be(S,Y,"magic-word-name",n,i,{});if(super.insertAt(G),w!==void 0&&t.unshift([w]),this.name==="invoke")for(let U=0;U<2;U++){let Z=t.shift();if(!Z)break;let F=new M(Z.join("="),`invoke-${U?"function":"module"}`,n,i);super.insertAt(F)}}}if(this.type==="template"){let y=oe(e).trim();if(!this.normalizeTitle(y,10,!0,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new M(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),m=1;for(let[y,S]of t.entries())h||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(m),m++),this.insertAt(new Mr(...S,n,i));this.seal("modifier")}get type(){return c(this,cr)}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,rt)&&o||!c(this,rt)&&(l||e==="")||(pe.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,rt,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"&&(T(this,Bt,$(this,it,En).call(this)),this.setAttribute("name",c(this,Bt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":":")+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?"":":")+fe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Bt);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 E(this,e),g=i==="magic-word";if(g&&!$(this,it,En).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let p=s[g?1:0],u=p.childNodes.findIndex(m=>m.type==="text"&&Ke(m.data).includes("#")),h=p.childNodes[u];if(h){let m=C(p,l,"no-ignored","useless fragment");m.fix={range:[m.startIndex+p.getRelativeIndex(u)+h.data.indexOf("#"),m.endIndex],text:"",desc:"remove"},n.push(m)}}if(g&&o===2)return n.push(N(this,l,"invalid-invoke","missing module function")),n;let d=this.getDuplicatedArgs().filter(([,p])=>!p[0].querySelector("ext"));if(d.length>0)for(let[,p]of d)n.push(...p.map(u=>{let h=C(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?$(this,it,ns).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(jt("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,nt).has(i)?s=c(this,nt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,nt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,nt)].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(d=>d.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let d=g.getPossibleValues();s.splice(o,1,...d),o+=d.length}catch(d){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${xt(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ee(e.slice(1),{sep:"|"}):Ee(e,{sep:"|"})}}}</span>`}};cr=new WeakMap,rt=new WeakMap,nt=new WeakMap,Bt=new WeakMap,it=new WeakSet,En=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,!0)},ns=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.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var ss,Ln,sa,st,os=v(()=>{"use strict";Je();R();ss=[xe()];st=class extends(sa=A){get type(){return"hidden"}};Ln=re(sa),st=ie(Ln,0,"HiddenToken",ss,st),ne(Ln,1,st)});var Fn,oa,zr,as=v(()=>{"use strict";D();q();K();P();R();Fe();os();zr=class extends A{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});x(this,Fn);for(let[i,s]of e.entries())if(i===0){let o=new M(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new st(s,t,n);super.insertAt(o)}else{let o=new A(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`{{{${fe(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=N(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new E(this,e);o.push(...s.map(g=>{let d=C(g,l,"no-ignored","invisible content inside triple braces");return d.startIndex--,d.startCol--,d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""},{desc:"escape",range:[d.startIndex,d.startIndex+1],text:"{{!}}"}],d}))}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}};Fn=new WeakSet,oa=function(){}});var ds={};ge(ds,{parseBraces:()=>hr});var aa,ls,Pn,la,hr,Ur=v(()=>{"use strict";D();In();is();as();aa={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ls=String.raw`|\{{2,}`,Pn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),la=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,hr=(a,r,e)=>{var p,u,h,m,f,k;let t=String.raw`${(p=r.excludes)!=null&&p.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[];a=a.replace(la,(y,S)=>{var w;return new ur(y.slice(2,-2),[],r,e),`\0${e.length-2}${(w=Pn.get(S.toLowerCase()))!=null?w:"t"}\x7F`});let s=a.lastIndexOf("}}")-a.length,o=s+a.length!==-1,l=new RegExp(t+(o?ls:""),"gmu"),g=l.exec(a),d;for(;g||d!==void 0&&d<=a.length&&((h=(u=i[i.length-1])==null?void 0:u[0])!=null&&h.startsWith("="));){if(g!=null&&g[1]){let[,{length:G}]=g;g[0]=g[0].slice(G),g.index+=G}let{0:y,index:S}=g!=null?g:{0:`
7
+ `,index:a.length},w=(m=i.pop())!=null?m:{},{0:I,index:L,parts:B,findEqual:le,pos:j}=w,V=y==="="&&le,X=G=>{B[B.length-1].push(G.slice(j,S))};if(y==="]]"||y==="}-")d=S+2;else if(y===`
8
+ `){d=S+1;let{pos:G,findEqual:U}=(f=i[i.length-1])!=null?f:{};if(G===void 0||U||oe(a.slice(G,L))!==""){let Z=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(L,S));Z&&(a=`${a.slice(0,L)}\0${e.length}h\x7F${a.slice(S)}`,d=L+4+String(e.length).length,new Rt(Z[1].length,Z.slice(2),r,e))}}else if(y==="|"||V)d=S+1,X(a),y==="|"&&B.push([]),w.pos=d,w.findEqual=y==="|",i.push(w);else if(y.startsWith("}}")){let G=y.slice(0,Math.min(I.length,3)),U=I.length-G.length,{length:Z}=e;d=S+G.length,X(a);let F=!1,we="t";if(G.length===3){let ee=B.map(Ve=>Ve.join("=")),me=ee.length>1&&oe(ee[1]).trim();new zr(ee,r,e),me&&me.endsWith(":")&&n.includes(me.slice(0,-1).toLowerCase())&&(we="s")}else try{new ur(B[0][0],B.slice(1),r,e);let ee=oe(B[0][0]).trim();Pn.has(ee.toLowerCase())?we=Pn.get(ee.toLowerCase()):/^(?:filepath|(?:full|canonical)urle?):./iu.test(ee)?we="m":/^#vardefine:./iu.test(ee)&&(we="n")}catch(ee){if(ee instanceof SyntaxError&&ee.message==="Invalid template name")F=!0;else throw ee}F||(a=`${a.slice(0,L+U)}\0${Z}${we}\x7F${a.slice(d)}`,d=L+U+3+String(Z).length,U>1?i.push({0:I.slice(0,U),index:L,pos:L+U,parts:[[]]}):U===1&&a[L-1]==="-"&&i.push({0:"-{",index:L-1,pos:L+1,parts:[[]]}))}else d=S+y.length,y.startsWith("{")&&(g.pos=d,g.parts=[[]]),i.push(..."0"in w?[w]:[],g);let Y=i[i.length-1];if(o&&s+a.length<d)for(o=!1;(k=Y==null?void 0:Y[0])!=null&&k.startsWith("{");)i.pop(),Y=i[i.length-1];l=new RegExp(t+(o?ls:"")+(Y?`|${aa[Y[0][0]]}${Y.findEqual?"|=":""}`:""),"gmu"),l.lastIndex=d,g=l.exec(a)}return a}});var Wr,gs=v(()=>{"use strict";gr();Ur();P();Nn();Wr=class extends Ft{constructor(r,e,t=b.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=tt(e,t,n,r)),e&&(e=hr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function ps(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}|//)${Ne}|\0\d+m\x7F)${Ie}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=b.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 da,ue,Dr,us,Gr,cs=v(()=>{"use strict";D();q();P();R();da=new Set(["alt","link","lang","page","caption"]);Gr=class extends A{constructor(e,t,n=b.getConfig(),i){var r=(...jg)=>(super(...jg),x(this,Dr),x(this,ue,""),this);var g;let s,o=Object.entries(n.img).map(([d,p])=>{let u=new RegExp(String.raw`^(\s*(?!\s))${d.replace("$1","(.*)")}${d.endsWith("$1")?`(?=$|
9
+ )`:""}(\s*)$`,"u");return[d,p,u]}),l=o.find(([,d,p])=>(s=p.exec(e),s&&(s.length!==4||ps(d,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),T(this,ue,e)):(r(s[2],n,i,{}),T(this,ue,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,de(J({},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"?ps("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!da.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=N(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=N(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Oe(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():$(this,Dr,us).call(this)||super.text()}print(){return c(this,ue)?`<span class="wpb-image-parameter">${c(this,ue).replace("$1",`<span class="wpb-image-caption">${Ee(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ue=new WeakMap,Dr=new WeakSet,us=function(){return c(this,ue)&&!c(this,ue).includes("$1")}});var hs,ms,fs,ga,qt,Rn=v(()=>{"use strict";D();q();K();P();ar();cs();hs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),ms=new Set(["left","right","center","none"]),fs=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ga=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(ki).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:g,index:d}=s;g!==e?o+=g===a?1:-1:o===0&&(i.push(t.slice(l,d)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},qt=class extends Ce{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=b.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ga("-{","}-","|",e).map(o=>new Gr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let f=m.filter(k=>k.text().trim());return f.length!==1||f[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>hs.has(m)),o=i.filter(m=>ms.has(m)),l=i.filter(m=>fs.has(m)),[g]=s,d=g==="framed"||g==="manualthumb",p=new E(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(N(this,p,"nested-link","internal link in an external link")),d)for(let m of n.filter(({name:f})=>f==="width")){let f=C(m,p,"invalid-gallery","invalid image parameter");f.fix={range:[f.startIndex-1,f.endIndex],text:"",desc:"remove"},t.push(f)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let u=(m,f)=>k=>{let y=C(k,p,"no-duplicate",b.msg(`${m} image $1 parameter`,f));return y.suggestions=[{desc:"remove",range:[y.startIndex-1,y.endIndex],text:""}],y};for(let m of i){if(m==="invalid"||m==="width"&&d)continue;let f=n.filter(({name:k})=>k===m);m==="caption"&&(f=[...f.slice(0,-1).filter(k=>k.text()),...f.slice(-1)]),f.length>1&&t.push(...f.map(u("duplicated",m)))}return s.length>1&&t.push(...n.filter(({name:m})=>hs.has(m)).map(u("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>ms.has(m)).map(u("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>fs.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 _t,jn=v(()=>{"use strict";q();P();R();Rn();_t=class extends qt{constructor(e,t,n,i=b.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new A(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=N(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}}});var ot,xs,Bn,Hr,bs=v(()=>{"use strict";P();R();jn();Ue();Hr=class extends A{constructor(e,t=b.getConfig(),n=[]){var i;super(void 0,t,n,{});x(this,ot);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 W(s,t,n):s);continue}let[,l,g]=o;$(this,ot,xs).call(this,l)?super.insertAt(new _t("gallery",l,g,t,n)):super.insertAt(new W(s,t,n))}}get type(){return"ext-inner"}get widths(){return $(this,ot,Bn).call(this,"widths")}get heights(){return $(this,ot,Bn).call(this,"heights")}toString(e){return super.toString(e,`
11
11
  `)}text(){return super.text(`
12
12
  `).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,l]of this.childNodes.entries()){let p=l.toString(),{length:g}=p,d=p.trim(),c=n+o,m=o?0:i;if(l.type==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let h=e+g;s.push({rule:"no-ignored",message:x.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:h,startLine:c,endLine:c,startCol:m,endCol:m+g,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],text:`<!--${p}-->`}]})}else l.type!=="noinclude"&&l.type!=="text"&&s.push(...l.lint(e,t));e+=g+1}return s}print(){return super.print({sep:`
14
- `})}};zr=new WeakSet,ds=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var Lt,In=k(()=>{"use strict";j();tr();Lt=class extends we{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push($(this,{start:r},"nested-link","internal link in an external link")),t}}});var na,ia,dr,Fe,Gr=k(()=>{"use strict";j();K();J();R();P();na=String.raw`(?:[${ye}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,ia=new RegExp(`${na}+`,"gu"),Fe=class extends A{constructor(e,t="free-ext-link",n=x.getConfig(),i){super(e,n,i,{});b(this,dr);y(this,dr,t)}get type(){return u(this,dr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=me(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(ia," ")),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:ci(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new I(this,e);if(this.type==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let g=[...p.slice(5)].map(d=>d==="X"?10:Number(d));(g.length===10&&g.reduce((d,c,m)=>d+c*(10-m),0)%11||g.length===13&&(g[12]===10||g.reduce((d,c,m)=>d+c*(m%2?3:1),0)%10))&&n.push($(this,i,"invalid-isbn","invalid ISBN"))}return n}let s=this.type==="ext-link-url",o=s?/\|/u:/[,;。:!?()]+/u,l=this.childNodes.find(p=>p.type==="text"&&o.test(p.data));if(l){let{data:p}=l,g=C(l,i,"unterminated-url",x.msg("$1 in URL",s?'"|"':"full-width punctuation"),"warning"),{index:d,0:c}=o.exec(p),m=g.startIndex+d;g.suggestions=s?[{desc:"whitespace",range:[m,m+1],text:" "}]:[{desc:"whitespace",range:[m,m],text:" "},{desc:"escape",range:[m,m+c.length],text:encodeURI(c)}],n.push(g)}return n}};dr=new WeakMap});var Re,Ft,Ln=k(()=>{"use strict";j();R();P();Gr();Ft=class extends A{constructor(e,t="",n="",i=x.getConfig(),s=[]){super(void 0,i,s,{});b(this,Re);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Fe(e,"ext-link-url",i,s);if(this.insertAt(o),y(this,Re,t),n){let l=new A(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)}${u(this,Re)}]`:`[${super.toString(e,u(this,Re))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,Re).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push($(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${u(this,Re)}]`}:{pre:"[",sep:u(this,Re),post:"]"})}};Re=new WeakMap});var gr,ps=k(()=>{"use strict";R();P();Ge();In();Ln();gr=class extends A{get type(){return"imagemap-link"}constructor(r,e,t,n=x.getConfig(),i=[]){super(void 0,n,i),this.append(r,e.length===2?new Lt(...e,n,i):new Ft(...e,n,i),new D(t,n,i))}}});var Wr,us=k(()=>{"use strict";j();Se();J();R();P();Ge();En();ps();Wr=class extends A{get type(){return"ext-inner"}get image(){return this.childNodes.find(Nt("imagemap-image"))}constructor(r,e=x.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
15
- `),i=new Set(e.protocol.split("|")),s=D,o=!0,l=!1;for(let p of n){let g=p.trim();if(!(l||!g||g.startsWith("#"))){if(o){let d=p.indexOf("|"),c=d===-1?p:p.slice(0,d),m=this.normalizeTitle(c,0,!0);if(m.valid&&!m.interwiki&&m.ns===6){let h=new It("imagemap",c,d===-1?void 0:p.slice(d+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(p.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(p);continue}else if(p.includes("[")){let d=p.indexOf("["),c=p.slice(d),m=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(c);if(m){if(this.normalizeTitle(m[1],0,!0,!1,!0).valid){super.insertAt(new gr(p.slice(0,d),m.slice(1),c.slice(c.indexOf("]]")+2),e,t));continue}}else if(i.has(c.slice(1,c.indexOf(":")+1))||i.has(c.slice(1,c.indexOf("//")+2))){let h=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(c);if(h){super.insertAt(new gr(p.slice(0,d),h.slice(1),c.slice(c.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(p,e,t))}}toString(r){return super.toString(r,`
13
+ `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let[o,l]of this.childNodes.entries()){let g=l.toString(),{length:d}=g,p=g.trim(),{type:u}=l,h=n+o,m=o?0:i;if(u==="noinclude"&&p&&!/^<!--.*-->$/u.test(p)){let f=e+d;s.push({rule:"no-ignored",message:b.msg("invalid content in <$1>","gallery"),severity:p.startsWith("|")?"warning":"error",startIndex:e,endIndex:f,startLine:h,endLine:h,startCol:m,endCol:m+d,suggestions:[{desc:"remove",range:[e,f],text:""},{desc:"comment",range:[e,f],text:`<!--${g}-->`}]})}else u!=="noinclude"&&u!=="text"&&s.push(...l.lint(e,t));e+=d+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}};ot=new WeakSet,xs=function(e){return this.normalizeTitle(e,6,!0,!0,!0).valid},Bn=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 Ot,qn=v(()=>{"use strict";q();ar();Ot=class extends Ce{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(N(this,{start:r},"nested-link","internal link in an external link")),t}}});var pa,ua,mr,Re,Vr=v(()=>{"use strict";q();D();K();P();R();pa=String.raw`(?:[${ve}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,ua=new RegExp(`${pa}+`,"gu"),Re=class extends A{constructor(e,t="free-ext-link",n=b.getConfig(),i){super(e,n,i,{});x(this,mr);T(this,mr,t)}get type(){return c(this,mr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=fe(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(ua," ")),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:vi(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let u=[...p.slice(5)].map(h=>h==="X"?10:Number(h));(u.length===10&&u.reduce((h,m,f)=>h+m*(10-f),0)%11||u.length===13&&(u[12]===10||u.reduce((h,m,f)=>h+m*(f%2?3:1),0)%10))&&n.push(N(this,i,"invalid-isbn","invalid ISBN"))}return n}let l=s==="ext-link-url",g=l?/\|/u:/[,;。:!?()]+/u,d=o.find(p=>p.type==="text"&&g.test(p.data));if(d){let{data:p}=d,u=C(d,i,"unterminated-url",b.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:m}=g.exec(p),f=u.startIndex+h;u.suggestions=l?[{desc:"whitespace",range:[f,f+1],text:" "}]:[{desc:"whitespace",range:[f,f],text:" "},{desc:"escape",range:[f,f+m.length],text:encodeURI(m)}],n.push(u)}return n}getUrl(e){}};mr=new WeakMap});var je,Mt,_n=v(()=>{"use strict";q();P();R();Vr();Mt=class extends A{constructor(e,t="",n="",i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,je);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Re(e,"ext-link-url",i,s);if(this.insertAt(o),T(this,je,t),n){let l=new A(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,je)}]`:`[${super.toString(e,c(this,je))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,je).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(N(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,je)}]`}:{pre:"[",sep:c(this,je),post:"]"})}};je=new WeakMap});var fr,Ts=v(()=>{"use strict";P();R();Ue();qn();_n();fr=class extends A{get type(){return"imagemap-link"}constructor(r,e,t,n=b.getConfig(),i=[]){super(void 0,n,i),this.append(r,e.length===2?new Ot(...e,n,i):new Mt(...e,n,i),new W(t,n,i))}}});var Xr,ys=v(()=>{"use strict";q();Ae();K();P();R();Ue();jn();Ts();Xr=class extends A{get type(){return"ext-inner"}get image(){return this.childNodes.find(jt("imagemap-image"))}constructor(r,e=b.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
15
+ `),i=new Set(e.protocol.split("|")),s=W,o=!0,l=!1;for(let g of n){let d=g.trim();if(!(l||!d||d.startsWith("#"))){if(o){let p=g.indexOf("|"),u=p===-1?g:g.slice(0,p),{valid:h,ns:m}=this.normalizeTitle(u,0,!0,!0);if(h&&m===6){let f=new _t("imagemap",u,p===-1?void 0:g.slice(p+1),e,t);super.insertAt(f),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 p=g.indexOf("["),u=g.slice(p),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(u);if(h){if(this.normalizeTitle(h[1],0,!0,!0,!1,!0).valid){super.insertAt(new fr(g.slice(0,p),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 m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(m){super.insertAt(new fr(g.slice(0,p),m.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}toString(r){return super.toString(r,`
16
16
  `)}text(){return super.text(`
17
17
  `).replace(/\n{2,}/gu,`
18
- `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new I(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($(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
19
- `})}}});var Dr,cs=k(()=>{"use strict";j();R();ze();Dr=class extends se{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let i=$(this,{start:r},"void-ext",x.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 Ur={};ae(Ur,{NestedToken:()=>Fn});var sa,pr,Rt,Fn,Hr=k(()=>{"use strict";j();J();ir();jr();R();P();Rn();Ge();sa=new Set(["comment","include","arg","template","magic-word"]),Fn=class extends A{constructor(e,t,n,i=x.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=et(e,i,s,t)),e&&(e=lr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,p,g,d)=>{let c=`\0${s.length+1}e\x7F`;return new Pt(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new D(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);b(this,pr);b(this,Rt);y(this,pr,[...n]),y(this,Rt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new I(this,e),i=u(this,Rt)?"includeonly":"noinclude",s=typeof u(this,Rt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,pr).includes(o.name);if(sa.has(o.type))return!1;let l=o.toString().trim();return l&&!s.test(l)}).map(o=>{let l=C(o,n,"no-ignored",x.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})]}};pr=new WeakMap,Rt=new WeakMap});var ms,Pt,Rn=k(()=>{"use strict";j();J();R();P();Tn();Ir();Hi();An();rs();gs();us();cs();ms=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Pt=class extends kt{get type(){return"ext"}constructor(r,e,t,n,i=x.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new Ue(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),g=oe(H({},i),{ext:ms(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]}),d;switch(g.inExt=!0,l){case"tab":g.ext=ms(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new A(t,g,o);break;case"pre":d=new Lr(t,g,o);break;case"dynamicpagelist":d=new wt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new qr(s,t,g,o);break;case"references":{let{NestedToken:m}=(Hr(),Y(Ur));g.excludes.push("heading"),d=new m(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:m}=(Hr(),Y(Ur));d=new m(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:m}=(Hr(),Y(Ur));d=new m(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,o);break}case"gallery":d=new Mr(t,g,o);break;case"imagemap":d=new Wr(t,g,o);break;default:d=new Dr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new I(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push($(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push($(this,n,"var-anchor","variable anchor in a section header")),t}}});var hs,Pn,oa,st,fs=k(()=>{"use strict";j();Ke();R();ze();hs=[he(!1)];st=class extends(oa=se){constructor(e,t,n,i){super(e,n,i);re(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=$(this,{start:e},"unclosed-comment",x.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;":""})}};Pn=pe(oa),st=ce(Pn,0,"CommentToken",hs,st),ue(Pn,1,st)});var Ts={};ae(Ts,{parseCommentAndExt:()=>et});var bs,aa,Bn,xs,et,ir=k(()=>{"use strict";Ii();Ge();Fi();Rn();fs();bs="<onlyinclude>",aa="</onlyinclude>",{length:Bn}=bs,xs=a=>{let r=a.indexOf(bs);return{i:r,j:a.indexOf(aa,r+Bn)}},et=(a,r,e,t)=>{if(t){let{i:l,j:p}=xs(a);if(l!==-1&&p!==-1){let g="",d=c=>{new D(c,r,e),g+=`\0${e.length-1}n\x7F`};for(;l!==-1&&p!==-1;){let c=`\0${e.length}e\x7F`;new $r(a.slice(l+Bn,p),r,e),l>0&&d(a.slice(0,l)),g+=c,a=a.slice(p+Bn+1),{i:l,j:p}=xs(a)}return a&&d(a),g}}let n=r.ext.join("|"),i=t?"includeonly":"(?:no|only)include",s=t?"noinclude":"includeonly",o=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${i}(?:\s[^>]*)?/?>|</${i}\s*>|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu");return a.replace(o,(l,p,g,d,c,m,h,f,v)=>{let T=e.length,S="n";if(p)S="e",new Pt(p,g,d,c,r,m,e);else if(l.startsWith("<!--")){S="c";let w=l.endsWith("-->");new st(l.slice(4,w?-3:void 0),w,r,e)}else m?new Ze(m,h,f,v,r,e):new D(l,r,e);return`\0${T}${S}\x7F`})}});var la,da,ga,Bt,xe,He,Vr,ys=k(()=>{"use strict";j();K();J();P();la=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),da=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"]),ga=new Set(["strike","big","center","font","tt"]),Vr=class extends A{constructor(e,t,n,i,s,o){super(void 0,s,o);b(this,Bt);b(this,xe);b(this,He);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),y(this,Bt,n),y(this,xe,i),y(this,He,e)}get type(){return"html"}get selfClosing(){return u(this,xe)}get closing(){return u(this,Bt)}toString(e){return`<${this.closing?"/":""}${u(this,He)}${super.toString(e)}${u(this,xe)?"/":""}>`}text(){let{closing:e}=this,t=u(this,He)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,xe)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,He).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new I(this,e);if(this.name==="h1"&&!this.closing){let o=$(this,i,"h1","<h1>");o.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(o)}if(this.closest("table-attrs")){let o=$(this,i,"parsing-order","HTML tag in table attributes");o.fix={desc:"remove",range:[e,o.endIndex],text:""},n.push(o)}try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,p=l.split(":",1)[0].toLowerCase(),g=$(this,i,"unmatched-tag",p),d={desc:"no self-closing",range:[g.endIndex-2,g.endIndex-1],text:""};switch(p){case"unclosed tag":{let c=(s=this.parentNode)==null?void 0:s.childNodes;da.has(this.name)&&(c!=null&&c.slice(0,c.indexOf(this)).some(({type:m,name:h})=>m==="html"&&h===this.name))?g.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(g.severity="warning");break}case"unmatched closing tag":{let c=this.closest("magic-word");c&&la.has(c.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}];break}case"tag that is both closing and self-closing":{let{html:[c,,m]}=this.getAttribute("config"),h={desc:"open",range:[e+1,e+2],text:""};m.includes(this.name)?g.fix=h:c.includes(this.name)?g.fix=d:g.suggestions=[h,d];break}case"invalid self-closing tag":g.suggestions=[d,{desc:"close",range:[g.endIndex-2,g.endIndex],text:`></${this.name}>`}]}n.push(g)}}return ga.has(this.name)&&n.push($(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push($(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=mi(this.toString());if(o&&(u(this,xe)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,xe)&&t.includes(i))return this;if(u(this,xe)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:p}=s,g=p.indexOf(this),d=o?p.slice(0,g).reverse():p.slice(g+1),c=o?-1:1;for(let m of d)if(!(!m.is("html")||m.name!==i)&&(u(m,Bt)?c--:c++,c===0))return m;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${u(this,He)}`,post:`${u(this,xe)?"/":""}&gt;`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,xe)}),e}};Bt=new WeakMap,xe=new WeakMap,He=new WeakMap});var ks={};ae(ks,{parseHtml:()=>ua});var pa,ua,vs=k(()=>{"use strict";Ir();ys();pa=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,ua=(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=pa.exec(o),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!r.htmlElements.has(g)){i+=`<${o}`;continue}let[,d,,c="",m,h]=l,{length:f}=e,v=new Ue(c,"html-attrs",g,r,e),T=v.getAttr("itemprop");if(g==="meta"&&(T===void 0||v.getAttr("content")===void 0)||g==="link"&&(T===void 0||v.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${h}`,new Vr(p,v,d==="/",m==="/>",r,e)}return i}});var As,ws=k(()=>{"use strict";Se();As=(a=0)=>(r,e)=>{var n,Ss;class t extends r{constructor(){super(...arguments);b(this,n)}getAttr(l){return u(this,n,Ss).getAttr(l)}}return n=new WeakSet,Ss=function(){return this.childNodes[a]},wr(t,r),t}});var jt,jn=k(()=>{"use strict";ws();R();P();bt();Ir();jt=class extends As(1)(A){constructor(r,e,t,n,i=x.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new fe(e,r,"table-syntax",i,s,{}),new Ue(n,"table-attrs",t,i,s))}}});var be,ur,cr,qn,ot,On=k(()=>{"use strict";j();J();R();P();jn();ot=class extends jt{constructor(e,t,n=x.getConfig(),i=[]){var p;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);b(this,cr);b(this,be,"");b(this,ur);s&&([yr(this,be)._]=s);let l=new A(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,be).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 E(this,cr,qn).call(this).subtype}afterBuild(){u(this,be).includes("\0")&&y(this,be,this.buildFromStr(u(this,be),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,be)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,be)+n.text()}getGaps(e){return e===1?u(this,be).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new I(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("||"),p=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];p.fix={range:[p.startIndex,p.endIndex],text:o.replace(/\|\|/gu,`
20
- ${g}`),desc:"newline"}}else p.suggestions=[{desc:"escape",range:[p.startIndex,p.endIndex],text:o.replace(/\|/gu,"&#124;")}];n.push(p)}}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()}${u(this,be)}${n.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};be=new WeakMap,ur=new WeakMap,cr=new WeakSet,qn=function(){return Oe(u(this,ur),()=>{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 H({},E(o=i,cr,qn).call(o))},e=>{y(this,ur,e)})}});var qt,_n=k(()=>{"use strict";j();jn();On();qt=class extends jt{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 ot&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}getNthCol(r,e){let t=0;for(let n of this.childNodes.slice(2))if(n instanceof ot&&(n.isIndependent()&&(t=+(n.subtype!=="caption")),r-=t,r<0))return n}}});var ca,ma,ha,Mn,Xr,Cs=k(()=>{"use strict";j();Se();J();R();_n();bt();ca=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,ma=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),ha=({type:a})=>a==="tr"||a==="table-syntax",Mn=class extends Array{},Xr=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 I(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",x.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,p=0;for(;p<s;p++){let g=i[p],d=g.length;if(d<o)break;d<l&&(l=d);let c=g.indexOf(g[d-1])+1;if(c>l)break;c>o&&(o=c)}if(p<s){let g=C(this.getNthRow(p),n,"table-layout","inconsistent table layout","warning");g.startIndex++,g.startLine++,g.startCol=0,t.push(g)}}return t}close(r=`
22
- |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:x.parse(r,this.getAttribute("include"),2,t).childNodes;Ie.run(()=>{let s=new fe(void 0,ca,"table-syntax",t,n,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new Mn(...ma(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,p;for(let g of e[i].childNodes.slice(2))if(g.type==="td"){if(g.isIndependent()&&(p=g.subtype!=="caption"),p){let d={row:i,column:o},{rowspan:c,colspan:m}=g;for(o++;s[l];)l++;for(let h=i;h<Math.min(i+c,t);h++)for(let f=l;f<l+m;f++)n[h][f]=d;l+=m}}else if(ha(g))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthCell(r){var t;let e=r;return e&&((t=this.getNthRow(e.row,!1,!1))==null?void 0:t.getNthCol(e.column))}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2))if(i.type==="tr"&&i.getRowCount()&&(r--,r<0))return i}json(){let r=super.json();return r.closed=this.closed,r}}});var Qr,$s=k(()=>{"use strict";_n();Qr=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 Ot,zn=k(()=>{"use strict";ze();Ot=class extends se{}});var _t,Gn=k(()=>{"use strict";zn();_t=class extends Ot{get type(){return"dd"}}});var Es={};ae(Es,{parseTable:()=>xa});var fa,Ns,xa,Is=k(()=>{"use strict";P();Cs();$s();On();Gn();fa=a=>a.lastChild.constructor!==A,Ns=(a,r)=>a.type==="td"?r.pop():a,xa=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
18
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(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(N(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
19
+ `})}}});var Qr,ks=v(()=>{"use strict";q();P();ze();Qr=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=N(this,{start:r},"void-ext",b.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 Kr={};ge(Kr,{NestedToken:()=>On});var ca,xr,zt,On,Jr=v(()=>{"use strict";q();K();gr();Ur();P();R();Mn();Ue();ca=new Set(["comment","include","arg","template","magic-word"]),On=class extends A{constructor(e,t,n,i=b.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=tt(e,i,s,t)),e&&(e=hr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,g,d,p)=>{let u=`\0${s.length+1}e\x7F`;return new Be(l,g,d,p,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new W(g,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);x(this,xr);x(this,zt);T(this,xr,[...n]),T(this,zt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new E(this,e),i=c(this,zt)?"includeonly":"noinclude",s=typeof c(this,zt)=="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,xr).includes(g);if(ca.has(l))return!1;let d=o.toString().trim();return d&&!s.test(d)}).map(o=>{let l=C(o,n,"no-ignored",b.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})]}};xr=new WeakMap,zt=new WeakMap});var vs,As,zn,ha,Be,Mn=v(()=>{"use strict";q();K();P();Rr();R();Sn();qr();ts();Nn();gs();bs();ys();ks();vs=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};As=[Nt()];Be=class extends(ha=$t){get type(){return"ext"}constructor(r,e,t,n,i=b.getConfig(),s=!1,o=[]){var u;let l=r.toLowerCase(),g=new De(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),d=de(J({},i),{ext:vs(i.ext,l),excludes:[...(u=i.excludes)!=null?u:[]]}),p;switch(d.inExt=!0,l){case"tab":d.ext=vs(d.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&d.excludes.push("heading"),p=new A(t,d,o);break;case"pre":p=new _r(t,d,o);break;case"dynamicpagelist":p=new Ft(s,t,d,o);break;case"inputbox":d.excludes.push("heading"),p=new Wr(s,t,d,o);break;case"references":{let{NestedToken:h}=(Jr(),Q(Kr));d.excludes.push("heading"),p=new h(t,s,["ref"],d,o);break}case"choose":{let{NestedToken:h}=(Jr(),Q(Kr));p=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],d,o);break}case"combobox":{let{NestedToken:h}=(Jr(),Q(Kr));p=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],d,o);break}case"gallery":p=new Hr(t,d,o);break;case"imagemap":p=new Xr(t,d,o);break;default:p=new Qr(t,d,o)}p.setAttribute("name",l),p.type==="plain"&&(p.type="ext-inner"),super(r,g,p,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(N(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(N(this,n,"var-anchor","variable anchor in a section header")),t}};zn=re(ha),Be=ie(zn,0,"ExtToken",As,Be),ne(zn,1,Be)});var Ss,Un,ma,at,ws=v(()=>{"use strict";q();Je();P();ze();Ss=[xe(!1)];at=class extends(ma=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=N(this,{start:e},"unclosed-comment",b.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=re(ma),at=ie(Un,0,"CommentToken",Ss,at),ne(Un,1,at)});var Ns={};ge(Ns,{parseCommentAndExt:()=>tt});var $s,fa,Wn,Cs,tt,gr=v(()=>{"use strict";_i();Ue();Mi();Mn();ws();$s="<onlyinclude>",fa="</onlyinclude>",{length:Wn}=$s,Cs=a=>{let r=a.indexOf($s);return{i:r,j:a.indexOf(fa,r+Wn)}},tt=(a,r,e,t)=>{if(t){let{i:l,j:g}=Cs(a);if(l!==-1&&g!==-1){let d="",p=u=>{new W(u,r,e),d+=`\0${e.length-1}n\x7F`};for(;l!==-1&&g!==-1;){let u=`\0${e.length}e\x7F`;new Pr(a.slice(l+Wn,g),r,e),l>0&&p(a.slice(0,l)),d+=u,a=a.slice(g+Wn+1),{i:l,j:g}=Cs(a)}return a&&p(a),d}}let n=r.ext.join("|"),i=t?"includeonly":"(?:no|only)include",s=t?"noinclude":"includeonly",o=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${i}(?:\s[^>]*)?/?>|</${i}\s*>|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu");return a.replace(o,(l,g,d,p,u,h,m,f,k)=>{let y=e.length,S="n";if(g)S="e",new Be(g,d,p,u,r,h,e);else if(l.startsWith("<!--")){S="c";let w=l.endsWith("-->");new at(l.slice(4,w?-3:void 0),w,r,e)}else h?new et(h,m,f,k,r,e):new W(l,r,e);return`\0${y}${S}\x7F`})}});var xa,ba,Ta,Is,Ut,Te,He,Gn,ya,lt,Es=v(()=>{"use strict";q();D();K();Rr();R();xa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ba=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"]),Ta=new Set(["strike","big","center","font","tt"]);Is=[Nt()];lt=class extends(ya=A){constructor(e,t,n,i,s,o){super(void 0,s,o);x(this,Ut);x(this,Te);x(this,He);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,Ut,n),T(this,Te,i),T(this,He,e)}get type(){return"html"}get selfClosing(){return c(this,Te)}get closing(){return c(this,Ut)}toString(e){return`<${this.closing?"/":""}${c(this,He)}${super.toString(e)}${c(this,Te)?"/":""}>`}text(){let{closing:e}=this,t=c(this,He)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Te)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,He).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new E(this,e);if(this.name==="h1"&&!this.closing){let o=N(this,i,"h1","<h1>");o.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(o)}if(this.closest("table-attrs")){let o=N(this,i,"parsing-order","HTML tag in table attributes");o.fix={desc:"remove",range:[e,o.endIndex],text:""},n.push(o)}try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,g=l.split(":",1)[0].toLowerCase(),d=N(this,i,"unmatched-tag",g),p={desc:"no self-closing",range:[d.endIndex-2,d.endIndex-1],text:""};switch(g){case"unclosed tag":{let u=(s=this.parentNode)==null?void 0:s.childNodes;ba.has(this.name)&&(u!=null&&u.slice(0,u.indexOf(this)).some(({type:h,name:m})=>h==="html"&&m===this.name))?d.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(d.severity="warning");break}case"unmatched closing tag":{let u=this.closest("magic-word");u&&xa.has(u.name)?d.severity="warning":d.suggestions=[{desc:"remove",range:[e,d.endIndex],text:""}];break}case"tag that is both closing and self-closing":{let{html:[u,,h]}=this.getAttribute("config"),m={desc:"open",range:[e+1,e+2],text:""};h.includes(this.name)?d.fix=m:u.includes(this.name)?d.fix=p:d.suggestions=[m,p];break}case"invalid self-closing tag":d.suggestions=[p,{desc:"close",range:[d.endIndex-2,d.endIndex],text:`></${this.name}>`}]}n.push(d)}}return Ta.has(this.name)&&n.push(N(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push(N(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=Ai(this.toString());if(o&&(c(this,Te)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||c(this,Te)&&t.includes(i))return this;if(c(this,Te)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:g}=s,d=g.indexOf(this),p=o?g.slice(0,d).reverse():g.slice(d+1),u=o?-1:1;for(let h of p)if(!(!h.is("html")||h.name!==i)&&(c(h,Ut)?u--:u++,u===0))return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,He)}`,post:`${c(this,Te)?"/":""}&gt;`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Te)}),n}};Gn=re(ya),Ut=new WeakMap,Te=new WeakMap,He=new WeakMap,lt=ie(Gn,0,"HtmlToken",Is,lt),ne(Gn,1,lt)});var Ls={};ge(Ls,{parseHtml:()=>va});var ka,va,Fs=v(()=>{"use strict";qr();Es();ka=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,va=(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=ka.exec(o),g=l==null?void 0:l[2],d=g==null?void 0:g.toLowerCase();if(!l||!r.htmlElements.has(d)){i+=`<${o}`;continue}let[,p,,u="",h,m]=l,{length:f}=e,k=new De(u,"html-attrs",d,r,e),y=k.getAttr("itemprop");if(d==="meta"&&(y===void 0||k.getAttr("content")===void 0)||d==="link"&&(y===void 0||k.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${m}`,new lt(g,k,p==="/",h==="/>",r,e)}return i}});var Wt,Dn=v(()=>{"use strict";Rr();P();R();St();qr();Wt=class extends Nt(1)(A){constructor(r,e,t,n,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new be(e,r,"table-syntax",i,s,{}),new De(n,"table-attrs",t,i,s))}}});var ye,br,Tr,Hn,Gt,Vn=v(()=>{"use strict";q();K();P();R();Dn();Gt=class extends Wt{constructor(e,t,n=b.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);x(this,Tr);x(this,ye,"");x(this,br);s&&([$r(this,ye)._]=s);let l=new A(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,ye).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 $(this,Tr,Hn).call(this).subtype}afterBuild(){c(this,ye).includes("\0")&&T(this,ye,this.buildFromStr(c(this,ye),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,ye)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,ye)+n.text()}getGaps(e){return e===1?c(this,ye).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(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 d={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
20
+ ${d}`),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,ye)}${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}};ye=new WeakMap,br=new WeakMap,Tr=new WeakSet,Hn=function(){return Le(c(this,br),()=>{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 J({},$(o=i,Tr,Hn).call(o))},e=>{T(this,br,e)})}});var Dt,Xn=v(()=>{"use strict";q();Dn();Vn();Dt=class extends Wt{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 Gt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Aa,Sa,wa,Qn,Yr,Ps=v(()=>{"use strict";q();Ae();K();P();Xn();St();Aa=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Sa=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),wa=({type:a})=>a==="tr"||a==="table-syntax",Qn=class extends Array{},Yr=class extends Dt{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 E(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",b.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 d=i[g],p=d.length;if(p<o)break;p<l&&(l=p);let u=d.indexOf(d[p-1])+1;if(u>l)break;u>o&&(o=u)}if(g<s){let d=C(this.getNthRow(g),n,"table-layout","inconsistent table layout","warning");d.startIndex++,d.startLine++,d.startCol=0,t.push(d)}}return t}close(r=`
22
+ |}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:b.parse(r,this.getAttribute("include"),2,t).childNodes;pe.run(()=>{let s=new be(void 0,Aa,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new Qn(...Sa(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,g;for(let d of e[i].childNodes.slice(2))if(d.type==="td"){if(d.isIndependent()&&(g=d.subtype!=="caption"),g){let p={row:i,column:o},{rowspan:u,colspan:h}=d;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+u,t);m++)for(let f=l;f<l+h;f++)n[m][f]=p;l+=h}}else if(wa(d))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 Zr,Rs=v(()=>{"use strict";Xn();Zr=class extends Dt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var Ht,Kn=v(()=>{"use strict";ze();Ht=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 Vt,Jn=v(()=>{"use strict";Kn();Vt=class extends Ht{get type(){return"dd"}}});var Bs={};ge(Bs,{parseTable:()=>$a});var Ca,js,$a,qs=v(()=>{"use strict";R();Ps();Rs();Vn();Jn();Ca=a=>a.lastChild.constructor!==A,js=(a,r)=>a.type==="td"?r.pop():a,$a=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
23
23
  `),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
24
- ${s.shift()}`,l,p=(g,d)=>{if(!d){o+=g;return}let{lastChild:c}=d;if(fa(d)){let m=new A(g,t,n);m.type="table-inter",m.setAttribute("stage",3),d.insertAt(m)}else c.setText(c.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),c=g.slice(d.length),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(c);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,w,L,N,q]=m;w&&new _t(w,t,n),p(`
25
- ${d}${w&&`\0${n.length-1}d\x7F`}${L}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new Xr(N,q,t,n));continue}else if(!l){o+=`
26
- ${g}`;continue}let h=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(c);if(!h){p(`
27
- ${g}`,l),i.push(l);continue}let[,f,v,T,S]=h;if(f){for(;l.type!=="table";)l=i.pop();l.close(`
28
- ${d}${f}`,!0),p(S,i[i.length-1])}else if(v){l=Ns(l,i),l.type==="tr"&&(l=i.pop());let w=new Qr(`
29
- ${d}${v}`,S,t,n);i.push(l,w),l.insertAt(w)}else{l=Ns(l,i);let w=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,L=w.exec(S),N=0,q=`
30
- ${d}${T}`,z=B=>{let X=new ot(q,S.slice(N,L==null?void 0:L.index),t,n);return B.insertAt(X),X};for(;L;)z(l),{lastIndex:N}=w,[q]=L,L=w.exec(S);i.push(l,z(l))}}return o.slice(1)}});var Kr,Ls=k(()=>{"use strict";ze();Kr=class extends se{get type(){return"hr"}}});var Fs,Wn,ba,at,Rs=k(()=>{"use strict";Ke();R();ze();Fs=[he()];at=class extends(ba=se){get type(){return"double-underscore"}constructor(r,e,t=x.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Wn=pe(ba),at=ce(Wn,0,"DoubleUnderscoreToken",Fs,at),ue(Wn,1,at)});var Ps={};ae(Ps,{parseHrAndDoubleUnderscore:()=>Ta});var Ta,Bs=k(()=>{"use strict";Ls();Rs();Sn();Ta=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,p,g;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(p=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(g=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,c,m)=>(new Kr(m,t,n),`${c}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,c)=>{var v;let m=t.sensitiveDoubleUnderscore.has(c),h=c.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(h);return m||f?(new at(c,m,t,n),`\0${n.length-1}${f&&((v=o==null?void 0:o[h])!=null?v:h)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,c,m,h,f)=>{let v=`${c}\0${n.length}h\x7F`;return new $t(m.length,[h,f],t,n),v}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Jr,js=k(()=>{"use strict";j();J();R();ze();Jr=class extends se{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=x.msg('lonely "$1"',"'"),s=[],o=new I(this,r),l=(p,g,d)=>[{desc:"escape",range:[p,g],text:"&apos;".repeat(d)},{desc:"remove",range:[p,g],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let p=$(this,o,"lonely-apos",i),{startIndex:g,startLine:d,startCol:c}=p,[,{length:m}]=/(?:^|[^'])('+)$/u.exec(e.data),h=r-m;s.push(oe(H({},p),{startIndex:h,endIndex:g,endLine:d,startCol:c-m,endCol:c,suggestions:l(h,g,m)}))}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let p=$(this,o,"lonely-apos",i),{endIndex:g,endLine:d,endCol:c}=p,[{length:m}]=/^'+/u.exec(t.data),h=g+m;s.push(oe(H({},p),{startIndex:g,endIndex:h,startLine:d,startCol:c,endCol:c+m,suggestions:l(g,h,m)}))}if(n&&this.closest("heading-title")){let p=$(this,o,"bold-header","bold in section header","warning");p.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(p)}return s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var qs={};ae(qs,{parseQuotes:()=>Dn});var Dn,Un=k(()=>{"use strict";js();Dn=(a,r,e)=>{var g;let t=a.split(/('{2,})/u),{length:n}=t;if(n===1)return a;let i=0,s=0,o,l,p;for(let d=1;d<n;d+=2){let c=t[d].length;switch(c){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(i++,o!==void 0)break;t[d-1].endsWith(" ")?l===void 0&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(g=o!=null?o:l)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<n;d+=2)new Jr(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Os={};ae(Os,{parseExternalLinks:()=>Hn});var Hn,Vn=k(()=>{"use strict";K();Ln();Gr();Hn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${$e}|\0\d+m\x7F)${Ne}(?=[[\]<>"\t${ye}]|\0\d))([${ye}]*(?![${ye}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(o="",l=s.slice(g.index)+o+l,s=s.slice(0,g.index)),t?(new Fe(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new Ft(s,o,l,r,e),`\0${p}w\x7F`)})}});var Yr,_s=k(()=>{"use strict";tr();Yr=class extends we{get type(){return"category"}}});var zs={};ae(zs,{parseLinks:()=>Ms});var ya,Ms,Gs=k(()=>{"use strict";R();Un();Vn();In();Nn();_s();ya=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ms=(a,r,e)=>{var s;(s=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let t=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,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,m=n[o],h=t.exec(m);if(h)[,p,g,d,c]=h,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let N=ya.exec(m);N&&(l=!0,[,p,g,d]=N)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${m}`;continue}let f=p.trim().startsWith(":");if(f&&l){i+=`[[${m}`;continue}let v=x.normalizeTitle(p,0,!1,r,!0,!0,!0),{ns:T,valid:S,interwiki:w}=v;if(S){if(l){if(w||T!==6){i+=`[[${m}`;continue}let N=!1;for(o++;o<n.length;o++){let q=n[o],z=q.split("]]");if(z.length>2){N=!0,d+=`[[${z[0]}]]${z[1]}`,c=z.slice(2).join("]]");break}else if(z.length===2)d+=`[[${z[0]}]]${z[1]}`;else{d+=`[[${q}`;break}}if(d=Ms(d,r,e),!N){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${m}`;continue}d&&(d=Dn(d,r,e));let L=Lt;f||(!w&&T===6?(d&&(d=Hn(d,r,e,!0)),L=Et):!w&&T===14&&(L=Yr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new L(p,d,r,e,g)}return i}});var Vs={};ae(Vs,{parseMagicLinks:()=>ka});var Hs,Ws,Ds,Us,ka,Xs=k(()=>{"use strict";K();Gr();Hs=String.raw`[${ye}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Ws=`(?:${Hs})+`,Ds=`(?:${Hs}|-)`,Us=String.raw`(?:RFC|PMID)${Ws}\d+\b|ISBN${Ws}(?:97[89]${Ds}?)?(?:\d${Ds}?){9}[\dx]\b`,ka=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${$e}${Ne})|${Us})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${$e}${Ne})|${Us})`,"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 p=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=p.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),o=s.slice(g.index+d)+o,s=s.slice(0,g.index+d)}return o.length>=i.length?t:(new Fe(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 Fe(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var Qs,Ks=k(()=>{"use strict";Qs=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var Zr,Js=k(()=>{"use strict";zn();Zr=class extends Ot{get type(){return"list"}}});var Ys={};ae(Ys,{parseList:()=>va});var va,Zs=k(()=>{"use strict";Ks();Js();Gn();va=(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,":"),p=Qs(l,r.lastPrefix),g=(p>1?o.slice(p-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),c=g.length-(d?0:1);if(p>1){let B=o.slice(0,p-1);d?g.unshift(B):g[0]=B+g[0]}r.lastPrefix=l;let m=s+g.map((B,X)=>`\0${t.length+X}d\x7F`).join("")+a.slice(i.length);for(let B of g)new Zr(B,e,t);if(!c)return m;let{html:[h]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,v=f,T=v.exec(m),S=0,w=!1,L=!1,N=0,q=(B,X)=>(new _t(B,e,t),`${m.slice(0,X)}\0${t.length-1}d\x7F${m.slice(X+B.length)}`),z=B=>{B?S&&S--:S++};for(;T&&c;){let{0:B,index:X}=T;if(B==="-{"){if(!N){let{lastIndex:Q}=v;v=/-\{|\}-/gu,v.lastIndex=Q}N++}else if(B==="}-"){if(N--,!N){let{lastIndex:Q}=v;v=f,v.lastIndex=Q}}else if(B.endsWith("x\x7F")){let{name:Q,closing:Z,selfClosing:U}=t[Number(B.slice(1,-2))];(!U||h.includes(Q))&&z(Z)}else if(B.endsWith("q\x7F")){let{bold:Q,italic:Z}=t[Number(B.slice(1,-2))];Q&&(z(w),w=!w),Z&&(z(L),L=!L)}else if(S===0){if(B.length>=c)return q(B.slice(0,c),X);c-=B.length,v.lastIndex=X+4+String(t.length).length,m=q(B,X)}T=v.exec(m)}return m}});var eo,Pe,en,to=k(()=>{"use strict";j();J();R();P();Le();eo=new Set(["A","T","R","D","-","H","N"]),en=class extends A{constructor(e,t=x.getConfig(),n=[]){super(void 0,t,n,{});b(this,Pe);this.append(...e.map(i=>new M(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){y(this,Pe,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(u(this,Pe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Pe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Pe).filter(d=>eo.has(d))),o=u(this,Pe).filter(d=>!d).length,l=u(this,Pe).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new I(this,e);for(let[d,c]of this.childNodes.entries()){let m=c.text().trim();if(m&&!n.has(m)&&!i.has(m)&&(n.size>0||!s.has(m))){let h=C(c,g,"no-ignored","invalid conversion flag");n.size===0&&eo.has(m.toUpperCase())?h.fix={range:[h.startIndex,h.endIndex],text:m.toUpperCase(),desc:"uppercase"}:h.suggestions=[{desc:"remove",range:[h.startIndex-(d&&1),h.endIndex],text:""}],p.push(h)}}return p}print(){return super.print({sep:";"})}};Pe=new WeakMap});var Mt,ro=k(()=>{"use strict";R();P();Le();Mt=class extends A{get type(){return"converter-rule"}constructor(r,e=!0,t=x.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 M(o,"converter-rule-variant",t,n)),super.insertAt(new M(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new M(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new M(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:":"})}}});var tn,no=k(()=>{"use strict";K();R();P();to();ro();tn=class extends A{get type(){return"converter"}constructor(r,e,t=x.getConfig(),n=[]){super(void 0,t,n),this.append(new en(r,t,n));let[i]=e,s=i.includes(":"),o=new Mt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!ie(e[1]).trim()?this.insertAt(new Mt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Mt(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()}|${me(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?"|":""}${Ee(e,{sep:";"})}}-</span>`}}});var io={};ae(io,{parseConverter:()=>Aa});var Aa,so=k(()=>{"use strict";no();Aa=(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:p,index:g}=o;if(p==="}-"){let d=i.pop(),{length:c}=e,m=a.slice(d.index+2,g),h=m.indexOf("|"),[f,v]=h===-1?[[],m]:[m.slice(0,h).split(";"),m.slice(h+1)],T=v.replace(/(&[#a-z\d]+);/giu,"$1"),S=T.split(r.regexConverter).map(w=>w.replace(/\x01/gu,";"));new tn(f,S,r,e),a=`${a.slice(0,d.index)}\0${c}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(c).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var rn={};ae(rn,{Token:()=>A});var mr,Te,O,G,lt,zt,hr,_,oo,ao,lo,go,po,uo,co,mo,ho,fo,xo,bo,Xn,A,P=k(()=>{"use strict";K();j();R();yi();Ai();Xn=class Xn extends Ar{constructor(e,t=x.getConfig(),n=[],i){super();b(this,_);b(this,mr,"plain");b(this,Te,0);b(this,O);b(this,G);b(this,lt);b(this,zt,!1);b(this,hr);typeof e=="string"&&this.insertAt(e),y(this,O,t),y(this,G,n),n.push(this)}get type(){return u(this,mr)}set type(e){y(this,mr,e)}parseOnce(e=u(this,Te),t=!1){if(e<u(this,Te)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,Te)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,G).pop();let n=E(this,_,oo).call(this);t&&(t=!n)}y(this,lt,t),E(this,_,ao).call(this,t);break;case 1:E(this,_,lo).call(this);break;case 2:E(this,_,go).call(this);break;case 3:E(this,_,po).call(this);break;case 4:E(this,_,uo).call(this);break;case 5:E(this,_,co).call(this);break;case 6:E(this,_,mo).call(this);break;case 7:E(this,_,ho).call(this);break;case 8:E(this,_,fo).call(this);break;case 9:E(this,_,xo).call(this);break;case 10:E(this,_,bo).call(this)}if(this.type==="root")for(let n of u(this,G))n==null||n.parseOnce(e,t);return yr(this,Te)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Zt(i);if(isNaN(i.slice(-1)))return u(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?me(n):n}build(){y(this,Te,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 u(this,G))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,G))e==null||e.afterBuild();y(this,zt,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,Te)<e;)this.parseOnce(u(this,Te),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Xn;case"config":return u(this,O);case"include":return(t=u(this,lt))!=null?t:!!u(this.getRootNode(),lt);case"accum":return u(this,G);case"built":return u(this,zt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,Te)===0&&this.type==="root"&&u(this,G).shift(),y(this,Te,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Zt(e):e;return super.insertAt(n,t),n.type==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s){return x.normalizeTitle(e,t,u(this,lt),u(this,O),n,i,s)}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 c of this.querySelectorAll(o)){let m;if(c.type==="category")m=c.name;else{let h=c.getValue();h&&h!==!0&&(m=`#${h}`)}if(m){let h=s.get(m);h?h.add(c):s.set(m,new Set([c]))}}for(let[c,m]of s)if(m.size>1&&!c.startsWith("#mw-customcollapsible-")){let h=!c.startsWith("#"),f=`duplicated ${h?"category":"id"}`,v=h?"error":"warning";n.push(...[...m].map(T=>{let S=$(T,{start:T.getAbsoluteIndex()},"no-duplicate",f,v);return h&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,p=this.toString(),g=[],d=l.exec(p);for(;d;){let{1:c,index:m}=d,h=(i=d[2])==null?void 0:i.trim();g.push({line:this.posFromIndex(m).top+(c==="disable-line"?0:1),from:c==="disable"?l.lastIndex:void 0,to:c==="enable"?l.lastIndex:void 0,rules:h?new Set(h.split(",").map(f=>f.trim())):void 0}),d=l.exec(p)}n=n.filter(({rule:c,startLine:m,startIndex:h})=>{let f={pos:0};for(let{line:v,from:T,to:S,rules:w}of g){if(v>m+1)break;if(w&&!w.has(c))continue;if(v===m&&T===void 0&&S===void 0)return!1;T<=h&&T>f.pos?(f.pos=T,f.type="from"):S<=h&&S>f.pos&&(f.pos=S,f.type="to")}return f.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):Oe(u(this,hr),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&u(i,zt)&&y(this,hr,n)})}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}};mr=new WeakMap,Te=new WeakMap,O=new WeakMap,G=new WeakMap,lt=new WeakMap,zt=new WeakMap,hr=new WeakMap,_=new WeakSet,oo=function(){let{parseRedirect:e}=(Ei(),Y(Ni)),t=this.firstChild.toString(),n=e(t,u(this,O),u(this,G));return n&&this.setText(n),!!n},ao=function(e){let{parseCommentAndExt:t}=(ir(),Y(Ts));this.setText(t(this.firstChild.toString(),u(this,O),u(this,G),e))},lo=function(){let{parseBraces:e}=(jr(),Y(ts)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,u(this,O),u(this,G));this.setText(this.type==="root"?n:n.slice(1))},go=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(vs(),Y(ks));this.setText(e(this.firstChild.toString(),u(this,O),u(this,G)))},po=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Is(),Y(Es));this.setText(e(this,u(this,O),u(this,G)))},uo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Bs(),Y(Ps));this.setText(e(this,u(this,O),u(this,G)))},co=function(){let{parseLinks:e}=(Gs(),Y(zs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,G)))},mo=function(){var n;if((n=u(this,O).excludes)!=null&&n.includes("quote"))return;let{parseQuotes:e}=(Un(),Y(qs)),t=this.firstChild.toString().split(`
31
- `);for(let i=0;i<t.length;i++)t[i]=e(t[i],u(this,O),u(this,G));this.setText(t.join(`
32
- `))},ho=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(Vn(),Y(Os));this.setText(e(this.firstChild.toString(),u(this,O),u(this,G)))},fo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(Xs(),Y(Vs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,G)))},xo=function(){var s;if((s=u(this,O).excludes)!=null&&s.includes("list"))return;let{parseList:e}=(Zs(),Y(Ys)),t=this.firstChild.toString().split(`
33
- `),n={lastPrefix:""},i=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;i<t.length;i++)t[i]=e(t[i],n,u(this,O),u(this,G));this.setText(t.join(`
34
- `))},bo=function(){if(u(this,O).variants.length>0){let{parseConverter:e}=(so(),Y(io));this.setText(e(this.firstChild.toString(),u(this,O),u(this,G)))}};A=Xn});var Ie,Nt,mn,wr,Se=k(()=>{"use strict";Ie={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),Y(rn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},Nt=a=>r=>r.type===a,mn=(a,r,e,t=[])=>{var o,l;let{childNodes:n}=a,i=Object.isFrozen(n)?[...n]:n,s=i.splice(r,e,...t);for(let p=0;p<t.length;p++){let g=t[p];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",i[r+p+1]),g.setAttribute("previousSibling",i[r+p-1])}return(o=i[r-1])==null||o.setAttribute("nextSibling",i[r]),(l=i[r+t.length])==null||l.setAttribute("previousSibling",i[r+t.length-1]),s},wr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var To={};ae(To,{Title:()=>Qn});var fr,xr,Gt,Be,Qn,yo=k(()=>{"use strict";K();Qn=class{constructor(r,e,t,n,i){b(this,fr);b(this,xr);b(this,Gt);b(this,Be);re(this,"interwiki","");re(this,"valid");re(this,"encoded",!1);let s=r.trim().startsWith("../");if(n&&r.includes("%"))try{let l=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=qe(r),this.encoded=l}catch(l){}if(r=Ut(r).replace(/[_ ]+/gu," ").trim(),s)y(this,Gt,0);else{let l=e;r.startsWith(":")&&(l=0,r=r.slice(1).trim());let p=r.split(":");if(p.length>1){let g=p[0].trim().toLowerCase(),d=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];d&&(l=d,r=p.slice(1).join(":").trim())}y(this,Gt,l)}let o=r.indexOf("#");if(o!==-1){let l=r.slice(o).trim().slice(1);if(l.includes("%"))try{l=qe(l)}catch(p){}y(this,Be,l.replace(/ /gu,"_")),r=r.slice(0,o).trim()}this.valid=!!(r||this.interwiki||i&&this.ns===0&&u(this,Be)!==void 0)&&Ut(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(s?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}}),y(this,xr,t.namespaces)}get ns(){return u(this,Gt)}get fragment(){return u(this,Be)}get main(){return u(this,fr)}set main(r){r=r.replace(/_/gu," ").trim(),y(this,fr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=u(this,xr)[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()}toString(r){return(r?this.title.replace(/_/gu," "):this.title)+(u(this,Be)===void 0?"":`#${u(this,Be)}`)}getRedirection(){return[!1,(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){y(this,Be,r)}};fr=new WeakMap,xr=new WeakMap,Gt=new WeakMap,Be=new WeakMap});var Wt,ko,Sa,x,R=k(()=>{li();Se();fi();K();Wt={config:ln,i18n:void 0,rules:ai,getConfig(){let{doubleUnderscore:a}=this.config;for(let r=0;r<2;r++)a.length>r+2&&a[r].length===0&&(a[r]=Object.keys(a[r+2]));return oe(H(H({},ln),this.config),{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=Wt.getConfig(),n,i=!1,s=!1){let{Title:o}=(yo(),Y(To)),l;if(n)l=new o(a,r,t,i,s);else{let{Token:p}=(P(),Y(rn));l=Ie.run(()=>{let g=new p(a,t);g.type="root",g.parseOnce(0,e).parseOnce();let d=new o(g.toString(),r,t,i,s);for(let c of["main","fragment"]){let m=d[c];if(m!=null&&m.includes("\0")){let h=g.buildFromStr(m,1);c==="main"?d.main=h:d.setFragment(h)}}return d})}return l},parse(a,r,e=11,t=Wt.getConfig()){if(a=pi(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>oi[o]||11))}let{Token:n}=(P(),Y(rn));return Ie.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})},createLanguageService(a){var n;let r,{LanguageService:e,tasks:t}=r;return(n=t.get(a))!=null?n:new e(a)}},ko={},Sa=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in Wt)Sa.has(a)||(ko[a]={enumerable:!1});Object.defineProperties(Wt,ko);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Wt});x=Wt});R();})();
24
+ ${s.shift()}`,l,g=(d,p)=>{if(!p){o+=d;return}let{lastChild:u}=p;if(Ca(p)){let h=new A(d,t,n);h.type="table-inter",h.setAttribute("stage",3),p.insertAt(h)}else u.setText(u.toString()+d)};for(let d of s){l=i.pop();let[p]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(d),u=d.slice(p.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[,w,I,L,B]=h;w&&new Vt(w,t,n),g(`
25
+ ${p}${w&&`\0${n.length-1}d\x7F`}${I}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new Yr(L,B,t,n));continue}else if(!l){o+=`
26
+ ${d}`;continue}let m=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(u);if(!m){g(`
27
+ ${d}`,l),i.push(l);continue}let[,f,k,y,S]=m;if(f){for(;l.type!=="table";)l=i.pop();l.close(`
28
+ ${p}${f}`,!0),g(S,i[i.length-1])}else if(k){l=js(l,i),l.type==="tr"&&(l=i.pop());let w=new Zr(`
29
+ ${p}${k}`,S,t,n);i.push(l,w),l.insertAt(w)}else{l=js(l,i);let w=y==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,I=w.exec(S),L=0,B=`
30
+ ${p}${y}`,le=j=>{let V=new Gt(B,S.slice(L,I==null?void 0:I.index),t,n);return j.insertAt(V),V};for(;I;)le(l),{lastIndex:L}=w,[B]=I,I=w.exec(S);i.push(l,le(l))}}return o.slice(1)}});var en,_s=v(()=>{"use strict";ze();en=class extends ae{get type(){return"hr"}}});var Os,Yn,Na,dt,Ms=v(()=>{"use strict";Je();P();ze();Os=[xe()];dt=class extends(Na=ae){get type(){return"double-underscore"}constructor(r,e,t=b.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Yn=re(Na),dt=ie(Yn,0,"DoubleUnderscoreToken",Os,dt),ne(Yn,1,dt)});var zs={};ge(zs,{parseHrAndDoubleUnderscore:()=>Ia});var Ia,Us=v(()=>{"use strict";_s();Ms();In();Ia=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,g,d;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)),(d=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,(p,u,h)=>(new en(h,t,n),`${u}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(p,u)=>{var k;let h=t.sensitiveDoubleUnderscore.has(u),m=u.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(m);return h||f?(new dt(u,h,t,n),`\0${n.length-1}${f&&((k=o==null?void 0:o[m])!=null?k:m)==="toc"?"u":"n"}\x7F`):p}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,u,h,m,f)=>{let k=`${u}\0${n.length}h\x7F`;return new Rt(h.length,[m,f],t,n),k}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var tn,Ws=v(()=>{"use strict";q();K();P();ze();tn=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=b.msg('lonely "$1"',"'"),s=[],o=new E(this,r),l=(g,d,p)=>[{desc:"escape",range:[g,d],text:"&apos;".repeat(p)},{desc:"remove",range:[g,d],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let g=N(this,o,"lonely-apos",i),{startIndex:d,startLine:p,startCol:u}=g,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=r-h;s.push(de(J({},g),{startIndex:m,endIndex:d,endLine:p,startCol:u-h,endCol:u,suggestions:l(m,d,h)}))}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let g=N(this,o,"lonely-apos",i),{endIndex:d,endLine:p,endCol:u}=g,[{length:h}]=/^'+/u.exec(t.data),m=d+h;s.push(de(J({},g),{startIndex:d,endIndex:m,startLine:p,startCol:u,endCol:u+h,suggestions:l(d,m,h)}))}if(n&&this.closest("heading-title")){let g=N(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 Gs={};ge(Gs,{parseQuotes:()=>Zn});var Zn,ei=v(()=>{"use strict";Ws();Zn=(a,r,e,t)=>{var p;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,g,d;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(" ")?g===void 0&&d===void 0&&(d=u):n[u-1].slice(-2,-1)===" "?l=u:g!=null||(g=u);break;default:n[u-1]+="'".repeat(h-5),n[u]="'''''",o++,s++}}if(o%2===1&&s%2===1){let u=(p=l!=null?l:g)!=null?p:d;u!==void 0&&(n[u]="''",n[u-1]+="'")}for(let u=1;u<i;u+=2)new tn(n[u],r,e),n[u]=`\0${e.length-1}q\x7F`;return n.join("")}});var Ds={};ge(Ds,{parseExternalLinks:()=>ti});var ti,ri=v(()=>{"use strict";D();_n();Vr();ti=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ne}|\0\d+m\x7F)${Ie}(?=[[\]<>"\t${ve}]|\0\d))([${ve}]*(?![${ve}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:g}=e,d=/&[lg]t;/u.exec(s);return d&&(o="",l=s.slice(d.index)+o+l,s=s.slice(0,d.index)),t?(new Re(s,"ext-link-url",r,e),`[\0${g}f\x7F${o}${l}]`):(new Mt(s,o,l,r,e),`\0${g}w\x7F`)})}});var rn,Hs=v(()=>{"use strict";D();ar();rn=class extends Ce{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&Ke(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var Xs={};ge(Xs,{parseLinks:()=>Vs});var Ea,Vs,Qs=v(()=>{"use strict";P();ei();ri();qn();Rn();Hs();Ea=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Vs=(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,d,p,u,h,m=i[l],f=n.exec(m);if(f)[,d,p,u,h]=f,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let I=Ea.exec(m);I&&(g=!0,[,d,p,u]=I)}if(d===void 0||r.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){s+=`[[${m}`;continue}let k=d.trim().startsWith(":");if(k&&g){s+=`[[${m}`;continue}let{ns:y,valid:S}=b.normalizeTitle(d,0,!1,r,!0,!0,!0,!0);if(S){if(g){if(y!==6){s+=`[[${m}`;continue}let I=!1;for(l++;l<i.length;l++){let L=i[l],B=L.split("]]");if(B.length>2){I=!0,u+=`[[${B[0]}]]${B[1]}`,h=B.slice(2).join("]]");break}else if(B.length===2)u+=`[[${B[0]}]]${B[1]}`;else{u+=`[[${L}`;break}}if(u=Vs(u,r,e,t),!I){s+=`[[${d}${p}${u}`;continue}}}else{s+=`[[${m}`;continue}u&&(u=Zn(u,r,e,t));let w=Ot;k||(y===6?(u&&(u=ti(u,r,e,!0)),w=qt):y===14&&(w=rn)),u===void 0&&p&&(u=""),s+=`\0${e.length}l\x7F${h}`,new w(d,u,r,e,p)}return s}});var eo={};ge(eo,{parseMagicLinks:()=>La});var Zs,Ks,Js,Ys,La,to=v(()=>{"use strict";D();Vr();Zs=String.raw`[${ve}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Ks=`(?:${Zs})+`,Js=`(?:${Zs}|-)`,Ys=String.raw`(?:RFC|PMID)${Ks}\d+\b|ISBN${Ks}(?:97[89]${Js}?)?(?:\d${Js}?){9}[\dx]\b`,La=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ne}${Ie})|${Ys})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ne}${Ie})|${Ys})`,"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,d=g.exec(s);if(d){let p=1;d[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,d.index))&&(p=2),o=s.slice(d.index+p)+o,s=s.slice(0,d.index+p)}return o.length>=i.length?t:(new Re(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 Re(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var ro,no=v(()=>{"use strict";ro=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var nn,io=v(()=>{"use strict";Kn();nn=class extends Ht{get type(){return"list"}}});var so={};ge(so,{parseList:()=>Fa});var Fa,oo=v(()=>{"use strict";no();io();Jn();Fa=(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=ro(l,r.lastPrefix),d=(g>1?o.slice(g-1):o).split(/(?=;)/u),p=d[0].startsWith(";"),u=d.length-(p?0:1);if(g>1){let j=o.slice(0,g-1);p?d.unshift(j):d[0]=j+d[0]}r.lastPrefix=l;let h=s+d.map((j,V)=>`\0${t.length+V}d\x7F`).join("")+a.slice(i.length);for(let j of d)new nn(j,e,t);if(!u)return h;let{html:[m]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,k=f,y=k.exec(h),S=0,w=!1,I=!1,L=0,B=(j,V)=>(new Vt(j,e,t),`${h.slice(0,V)}\0${t.length-1}d\x7F${h.slice(V+j.length)}`),le=j=>{j?S&&S--:S++};for(;y&&u;){let{0:j,index:V}=y;if(j==="-{"){if(!L){let{lastIndex:X}=k;k=/-\{|\}-/gu,k.lastIndex=X}L++}else if(j==="}-"){if(L--,!L){let{lastIndex:X}=k;k=f,k.lastIndex=X}}else if(j.endsWith("x\x7F")){let{name:X,closing:Y,selfClosing:G}=t[Number(j.slice(1,-2))];(!G||m.includes(X))&&le(Y)}else if(j.endsWith("q\x7F")){let{bold:X,italic:Y}=t[Number(j.slice(1,-2))];X&&(le(w),w=!w),Y&&(le(I),I=!I)}else if(S===0){if(j.length>=u)return B(j.slice(0,u),V);u-=j.length,k.lastIndex=V+4+String(t.length).length,h=B(j,V)}y=k.exec(h)}return h}});var ao,qe,sn,lo=v(()=>{"use strict";q();K();P();R();Fe();ao=new Set(["A","T","R","D","-","H","N"]),sn=class extends A{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});x(this,qe);this.append(...e.map(i=>new M(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){T(this,qe,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,qe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,qe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,qe).filter(p=>ao.has(p))),o=c(this,qe).filter(p=>!p).length,l=c(this,qe).length-i.size-o,g=super.lint(e,t);if(n.size===l||s.size===l)return g;let d=new E(this,e);for(let[p,u]of this.childNodes.entries()){let h=u.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let m=C(u,d,"no-ignored","invalid conversion flag");n.size===0&&ao.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase(),desc:"uppercase"}:m.suggestions=[{desc:"remove",range:[m.startIndex-(p&&1),m.endIndex],text:""}],g.push(m)}}return g}print(){return super.print({sep:";"})}};qe=new WeakMap});var Xt,go=v(()=>{"use strict";P();R();Fe();Xt=class extends A{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=b.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 M(o,"converter-rule-variant",t,n)),super.insertAt(new M(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new M(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new M(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 on,po=v(()=>{"use strict";D();P();R();lo();go();on=class extends A{get type(){return"converter"}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n),this.append(new sn(r,t,n));let[i]=e,s=i.includes(":"),o=new Xt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new Xt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Xt(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()}|${fe(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?"|":""}${Ee(e,{sep:";"})}}-</span>`}}});var uo={};ge(uo,{parseConverter:()=>Pa});var Pa,co=v(()=>{"use strict";po();Pa=(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:d}=o;if(g==="}-"){let p=i.pop(),{length:u}=e,h=a.slice(p.index+2,d),m=h.indexOf("|"),[f,k]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],y=k.replace(/(&[#a-z\d]+);/giu,"$1"),S=y.split(r.regexConverter).map(w=>w.replace(/\x01/gu,";"));new on(f,S,r,e),a=`${a.slice(0,p.index)}\0${u}v\x7F${a.slice(d+2)}`,i.length===0&&(s=t),s.lastIndex=p.index+3+String(u).length}else i.push(o),s=n,s.lastIndex=d+2;o=s.exec(a)}return a}});var vr={};ge(vr,{Token:()=>A});var yr,ke,_,z,gt,Qt,kr,O,ho,mo,fo,xo,bo,To,yo,ko,vo,Ao,So,wo,ni,A,R=v(()=>{"use strict";D();q();P();Ni();Li();ni=class ni extends Ir{constructor(e,t=b.getConfig(),n=[],i){super();x(this,O);x(this,yr,"plain");x(this,ke,0);x(this,_);x(this,z);x(this,gt);x(this,Qt,!1);x(this,kr);typeof e=="string"&&this.insertAt(e),T(this,_,t),T(this,z,n),n.push(this)}get type(){return c(this,yr)}set type(e){T(this,yr,e)}parseOnce(e=c(this,ke),t=!1,n){if(e<c(this,ke)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,ke)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,z).pop();let i=$(this,O,ho).call(this);t&&(t=!i)}T(this,gt,t),$(this,O,mo).call(this,t);break;case 1:$(this,O,fo).call(this);break;case 2:$(this,O,xo).call(this);break;case 3:$(this,O,bo).call(this);break;case 4:$(this,O,To).call(this);break;case 5:$(this,O,yo).call(this,n);break;case 6:$(this,O,ko).call(this,n);break;case 7:$(this,O,vo).call(this);break;case 8:$(this,O,Ao).call(this);break;case 9:$(this,O,So).call(this);break;case 10:$(this,O,wo).call(this)}if(this.type==="root")for(let i of c(this,z))i==null||i.parseOnce(e,t,n);return $r(this,ke)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new sr(i);if(isNaN(i.slice(-1)))return c(this,z)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?fe(n):n}build(){T(this,ke,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,z))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,z))e==null||e.afterBuild();T(this,Qt,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,ke)<e;)this.parseOnce(c(this,ke),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ni;case"config":return c(this,_);case"include":return(t=c(this,gt))!=null?t:!!c(this.getRootNode(),gt);case"accum":return c(this,z);case"built":return c(this,Qt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,ke)===0&&this.type==="root"&&c(this,z).shift(),T(this,ke,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new sr(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 b.normalizeTitle(e,t,c(this,gt),c(this,_),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 u of this.querySelectorAll(o)){let h;if(u.type==="category")h=u.name;else{let m=u.getValue();m&&m!==!0&&(h=`#${m}`)}if(h){let m=s.get(h);m?m.add(u):s.set(h,new Set([u]))}}for(let[u,h]of s)if(h.size>1&&!u.startsWith("#mw-customcollapsible-")){let m=!u.startsWith("#"),f=`duplicated ${m?"category":"id"}`,k=m?"error":"warning";n.push(...[...h].map(y=>{let S=N(y,{start:y.getAbsoluteIndex()},"no-duplicate",f,k);return m&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,g=this.toString(),d=[],p=l.exec(g);for(;p;){let{1:u,index:h}=p,m=(i=p[2])==null?void 0:i.trim();d.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:m?new Set(m.split(",").map(f=>f.trim())):void 0}),p=l.exec(g)}n=n.filter(({rule:u,startLine:h,startIndex:m})=>{let f={pos:0};for(let{line:k,from:y,to:S,rules:w}of d){if(k>h+1)break;if(w&&!w.has(u))continue;if(k===h&&y===void 0&&S===void 0)return!1;y<=m&&y>f.pos?(f.pos=y,f.type="from"):S<=m&&S>f.pos&&(f.pos=S,f.type="to")}return f.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):Le(c(this,kr),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,Qt)&&T(this,kr,n)})}};yr=new WeakMap,ke=new WeakMap,_=new WeakMap,z=new WeakMap,gt=new WeakMap,Qt=new WeakMap,kr=new WeakMap,O=new WeakSet,ho=function(){let{parseRedirect:e}=(qi(),Q(Bi)),t=this.firstChild.toString(),n=e(t,c(this,_),c(this,z));return n&&this.setText(n),!!n},mo=function(e){let{parseCommentAndExt:t}=(gr(),Q(Ns));this.setText(t(this.firstChild.toString(),c(this,_),c(this,z),e))},fo=function(){let{parseBraces:e}=(Ur(),Q(ds)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,_),c(this,z));this.setText(this.type==="root"?n:n.slice(1))},xo=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Fs(),Q(Ls));this.setText(e(this.firstChild.toString(),c(this,_),c(this,z)))},bo=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(qs(),Q(Bs));this.setText(e(this,c(this,_),c(this,z)))},To=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Us(),Q(zs));this.setText(e(this,c(this,_),c(this,z)))},yo=function(e){let{parseLinks:t}=(Qs(),Q(Xs));this.setText(t(this.firstChild.toString(),c(this,_),c(this,z),e))},ko=function(e){var i;if((i=c(this,_).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(ei(),Q(Gs)),n=this.firstChild.toString().split(`
31
+ `);for(let s=0;s<n.length;s++)n[s]=t(n[s],c(this,_),c(this,z),e);this.setText(n.join(`
32
+ `))},vo=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ri(),Q(Ds));this.setText(e(this.firstChild.toString(),c(this,_),c(this,z)))},Ao=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(to(),Q(eo));this.setText(e(this.firstChild.toString(),c(this,_),c(this,z)))},So=function(){var g;if((g=c(this,_).excludes)!=null&&g.includes("list"))return;let{parseList:e}=(oo(),Q(so)),{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,_),c(this,z));this.setText(s.join(`
34
+ `))},wo=function(){if(c(this,_).variants.length>0){let{parseConverter:e}=(co(),Q(uo));this.setText(e(this.firstChild.toString(),c(this,_),c(this,z)))}};A=ni});var pe,jt,Tn,Lr,Ae=v(()=>{"use strict";pe={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(R(),Q(vr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},jt=a=>r=>r.type===a,Tn=(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},Lr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var Co={};ge(Co,{Title:()=>ii});var Ar,Sr,pt,Kt,ut,ii,$o=v(()=>{"use strict";D();ii=class{constructor(r,e,t,n,i,s){x(this,Ar);x(this,Sr);x(this,pt);x(this,Kt);x(this,ut);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=Oe(r),this.encoded=g}catch(g){}if(r=Ke(r).replace(/[_ ]+/gu," ").trim(),o)T(this,Kt,0);else{let g=e;r.startsWith(":")&&(g=0,r=r.slice(1).trim());let d=r.split(":");if(d.length>1){let p=d[0].trim().toLowerCase(),u=Object.prototype.hasOwnProperty.call(t.nsid,p)&&t.nsid[p];u&&(g=u,r=d.slice(1).join(":").trim())}T(this,Kt,g)}let l=r.indexOf("#");if(l!==-1){let g=r.slice(l).trim().slice(1);if(g.includes("%"))try{g=Oe(g)}catch(d){}T(this,ut,g.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,ut)!==void 0)&&Ke(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,T(this,Sr,t.namespaces),T(this,pt,t.articlePath||"/wiki/$1"),c(this,pt).includes("$1")||T(this,pt,c(this,pt)+`${c(this,pt).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Kt)}get fragment(){return c(this,ut)}get main(){return c(this,Ar)}set main(r){r=r.replace(/_/gu," ").trim(),T(this,Ar,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,Sr)[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){T(this,ut,r)}getUrl(r){}};Ar=new WeakMap,Sr=new WeakMap,pt=new WeakMap,Kt=new WeakMap,ut=new WeakMap});var ct,No,Ra,b,P=v(()=>{bi();Ae();wi();D();ct={config:un,i18n:void 0,rules:xi,getConfig(){let{doubleUnderscore:a}=this.config;for(let r=0;r<2;r++)a.length>r+2&&a[r].length===0&&(a[r]=Object.keys(a[r+2]));return de(J(J({},un),this.config),{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=ct.getConfig(),n=!1,i,s=!1,o=!1){let{Title:l}=($o(),Q(Co)),g;if(i)g=new l(a,r,t,n,s,o);else{let{Token:d}=(R(),Q(vr));g=pe.run(()=>{let p=new d(a,t);p.type="root",p.parseOnce(0,e).parseOnce();let u=new l(p.toString(),r,t,n,s,o);for(let h of["main","fragment"]){let m=u[h];if(m!=null&&m.includes("\0")){let f=p.buildFromStr(m,1);h==="main"?u.main=f:u.setFragment(f)}}return u})}return g},parse(a,r,e=11,t=ct.getConfig()){if(a=pn(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>fi[o]||11))}let{Token:n}=(R(),Q(vr));return pe.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})},partialParse(n,i,s){return mi(this,arguments,function*(a,r,e,t=ct.getConfig()){let{Token:o}=(R(),Q(vr)),l=typeof setImmediate=="function"?setImmediate:setTimeout,{running:g}=pe;pe.running=!0;let d=new o(pn(a),t);d.type="root";let p=0;return yield new Promise(u=>{let h=()=>{r()===a?(p++,l(m,0)):u()},m=()=>{p===12?(d.afterBuild(),u()):(d[p===11?"build":"parseOnce"](p,e),h())};l(m,0)}),pe.running=g,d})},createLanguageService(a){}},No={},Ra=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in ct)Ra.has(a)||(No[a]={enumerable:!1});Object.defineProperties(ct,No);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:ct});b=ct});P();})();