wikiparser-node 1.37.0 → 1.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle-es8.min.js +23 -23
- package/bundle/bundle-lsp.min.js +30 -30
- package/bundle/bundle.min.js +15 -15
- package/config/moegirl.json +3 -0
- package/data/ext/math.json +4 -9
- package/data/ext/score.json +4 -375
- package/dist/addon/attribute.js +2 -2
- package/dist/addon/table.js +2 -2
- package/dist/base.d.mts +3 -2
- package/dist/base.d.ts +3 -2
- package/dist/base.js +1 -0
- package/dist/base.mjs +1 -0
- package/dist/bin/config.js +5 -4
- package/dist/index.js +4 -4
- package/dist/lib/lintConfig.js +6 -3
- package/dist/lib/lsp.d.ts +3 -1
- package/dist/lib/lsp.js +45 -28
- package/dist/lib/ranges.js +3 -0
- package/dist/lib/title.js +1 -0
- package/dist/render/magicWords.js +14 -10
- package/dist/render/syntaxhighlight.js +12 -8
- package/dist/src/index.js +3 -3
- package/dist/src/link/base.js +1 -0
- package/dist/src/link/file.js +12 -0
- package/dist/src/nowiki/index.js +1 -0
- package/dist/src/table/base.d.ts +5 -0
- package/dist/src/table/base.js +3 -10
- package/dist/src/table/index.d.ts +2 -2
- package/dist/src/table/td.js +8 -5
- package/dist/src/tagPair/translate.js +2 -2
- package/dist/src/transclude.js +1 -0
- package/dist/util/sharable.js +1 -1
- package/dist/util/sharable.mjs +2 -2
- package/dist/util/string.js +2 -1
- package/extensions/dist/base.js +1 -1
- package/extensions/dist/lsp.js +1 -1
- package/i18n/en.json +1 -0
- package/i18n/zh-hans.json +1 -0
- package/i18n/zh-hant.json +1 -0
- package/package.json +15 -14
package/bundle/bundle-es8.min.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
1
|
+
"use strict";(()=>{var no=Object.create;var At=Object.defineProperty,Wd=Object.defineProperties,io=Object.getOwnPropertyDescriptor,Dd=Object.getOwnPropertyDescriptors,Md=Object.getOwnPropertyNames,En=Object.getOwnPropertySymbols,Ud=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,so=Object.prototype.propertyIsEnumerable;var oo=(o,t)=>(t=Symbol[o])?t:Symbol.for("Symbol."+o),Zt=o=>{throw TypeError(o)};var Ln=(o,t,e)=>t in o?At(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,V=(o,t)=>{for(var e in t||(t={}))bi.call(t,e)&&Ln(o,e,t[e]);if(En)for(var e of En(t))so.call(t,e)&&Ln(o,e,t[e]);return o},ge=(o,t)=>Wd(o,Dd(t)),ro=(o,t)=>At(o,"name",{value:t,configurable:!0});var Nn=(o,t)=>{var e={};for(var r in o)bi.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(o!=null&&En)for(var r of En(o))t.indexOf(r)<0&&so.call(o,r)&&(e[r]=o[r]);return e};var w=(o,t)=>()=>(o&&(t=o(o=0)),t);var ao=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),Z=(o,t)=>{for(var e in t)At(o,e,{get:t[e],enumerable:!0})},lo=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Md(t))!bi.call(o,n)&&n!==e&&At(o,n,{get:()=>t[n],enumerable:!(r=io(t,n))||r.enumerable});return o};var zd=(o,t,e)=>(e=o!=null?no(Ud(o)):{},lo(t||!o||!o.__esModule?At(e,"default",{value:o,enumerable:!0}):e,o)),J=o=>lo(At({},"__esModule",{value:!0}),o);var B=o=>{var t;return[,,,no((t=o==null?void 0:o[oo("metadata")])!=null?t:null)]},go=["class","method","getter","setter","accessor","field","value","get","set"],Ir=o=>o!==void 0&&typeof o!="function"?Zt("Function expected"):o,Gd=(o,t,e,r,n)=>({kind:go[o],name:t,metadata:r,addInitializer:i=>e._?Zt("Already initialized"):n.push(Ir(i||null))}),Fr=(o,t)=>Ln(t,oo("metadata"),o[3]),R=(o,t,e,r)=>{for(var n=0,i=o[t>>1],s=i&&i.length;n<s;n++)t&1?i[n].call(e):r=i[n].call(e,r);return r},P=(o,t,e,r,n,i)=>{var s,a,l,p,g,d=t&7,f=!!(t&8),c=!!(t&16),u=d>3?o.length+1:d?f?1:2:0,b=go[d+5],h=d>3&&(o[u-1]=[]),T=o[u]||(o[u]=[]),x=d&&(!c&&!f&&(n=n.prototype),d<5&&(d>3||!c)&&io(d<4?n:{get[e](){return m(this,i)},set[e](k){return C(this,i,k)}},e));d?c&&d<4&&ro(i,(d>2?"set ":d>1?"get ":"")+e):ro(n,e);for(var y=r.length-1;y>=0;y--)p=Gd(d,e,l={},o[3],T),d&&(p.static=f,p.private=c,g=p.access={has:c?k=>Hd(n,k):k=>e in k},d^3&&(g.get=c?k=>(d^1?m:I)(k,n,d^4?i:x.get):k=>k[e]),d>2&&(g.set=c?(k,A)=>C(k,n,A,d^4?i:x.set):(k,A)=>k[e]=A)),a=(0,r[y])(d?d<4?c?i:x[b]:d>4?void 0:{get:x.get,set:x.set}:n,p),l._=1,d^4||a===void 0?Ir(a)&&(d>4?h.unshift(a):d?c?i=a:x[b]=a:n=a):typeof a!="object"||a===null?Zt("Object expected"):(Ir(s=a.get)&&(x.get=s),Ir(s=a.set)&&(x.set=s),Ir(s=a.init)&&h.unshift(s));return d||Fr(o,n),x&&At(n,e,x),c?d^4?i:x:n},ce=(o,t,e)=>Ln(o,typeof t!="symbol"?t+"":t,e),yi=(o,t,e)=>t.has(o)||Zt("Cannot "+e),Hd=(o,t)=>Object(t)!==t?Zt('Cannot use the "in" operator on this value'):o.has(t),m=(o,t,e)=>(yi(o,t,"read from private field"),e?e.call(o):t.get(o)),S=(o,t,e)=>t.has(o)?Zt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),C=(o,t,e,r)=>(yi(o,t,"write to private field"),r?r.call(o,e):t.set(o,e),e),I=(o,t,e)=>(yi(o,t,"access private method"),e);var $n=(o,t,e,r)=>({set _(n){C(o,t,n,e)},get _(){return m(o,t,r)}});var po,Rr,Ti=w(()=>{"use strict";po=(()=>{let o={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(o,null),o})(),Rr=(()=>{let o=["arg-in-ext","blank-alt","bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-json","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","syntax-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(o),o})()});function ke(o,t,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(r,n)=>ke(String(t[n]),t,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(r,n)=>String(t[n])):o.replace(/\0(\d+)\x7F/gu,(r,n)=>t[n])}var Ie,uo,De,Me,Ue,Pr,fo,re,Ee,Vd,Qd,In,Br,co,Jd,Xd,Lp,ae=w(()=>{"use strict";Ie=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,uo=String.raw`[^[\]<>"\0-\x1F\x7F${Ie}\uFFFD]`,De=String.raw`(?:\[[\da-f:.]+\]|${uo})`,Me=String.raw`(?:${uo}|\0\d+[cn!~]\x7F)*`,Ue=o=>o.trim().toLowerCase();Pr=(o,t)=>e=>e.replace(o,t),fo=Pr(/[\0\x7F]|\r$/gmu,""),re=Pr(/\0\d+[cn]\x7F/gu,""),Ee=(o,t="")=>o.map(e=>typeof e=="string"?e:e.text()).join(t),Vd={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Qd=Pr(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,t,e)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):Vd[e.toLowerCase()]),Br=o=>(In!=null||(In=Qd),In(o)),co=Pr(/&#(\d+|x[\da-f]+);/giu,(o,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Jd={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Xd=(o=/[&<>"{}[\]|]/gu)=>Pr(o,t=>`&${Jd[t]};`),Lp=Xd(/[&<>]/gu)});var mo=ao(($p,Kd)=>{Kd.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#isbn":"isbn","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var ho,jr,xo,ki,Or=w(()=>{"use strict";ho=new Set(["alt","link","lang","page","caption"]),jr=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),xo=["templatedata","mapframe","maplink"],ki=mo()});var bo,Yd,qr,yo,To,ko,vo=w(()=>{"use strict";bo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
2
2
|
`,r:"\r",t:" "},Yd=new Set([" "," ",`
|
|
3
|
-
`,"\r"]),qr=o=>o===""?"end of input":o==='"'?`'"'`:JSON.stringify(o),
|
|
4
|
-
`&&e!=="\r";)l();continue}else if(h==="*"){for(l(),l();e&&!(e==="*"&&r.charAt(t)==="/");)l();e==="*"&&(l(),l());continue}}break}},f=()=>{switch(e){case"t":l(),l("r"),l("u"),l("e");return;case"f":l(),l("a"),l("l"),l("s"),l("e");return;case"n":l(),l("u"),l("l"),l("l");return;default:a(`Unexpected ${JSON.stringify(e)}`)}},c=()=>{if(l(),d(),e==="]"){l();return}else if(o&&e===","){l(),d(),l("]");return}let h;for(;e;){if(e==="]"){if(o){l();return}a("Trailing comma in array",h,h+1)}if(
|
|
5
|
-
`)){let n=e+r.length;t.push([r,e,n]),e=n+1}return t},vi=o=>o&&Number(o[1]),vo=(o,t)=>{var n;let e,r=i=>{e!=null||(e=Fn(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of t){let{line:s,column:a,from:l,to:p}=i;l==null?s?(e!=null||(e=Fn(o)),(n=i.column)!=null||(i.column=1),i.from=e[s-1][1]+(i.column-1)):(i.from=0,i.line=1,i.column=1):(!s||!a)&&Object.assign(i,r(l)),p!==void 0&&({line:i.endLine,column:i.endColumn}=r(p)),i.position=i.from}return t},Zd=(o,t)=>{if(t||o.trim())try{JSON.parse(o)}catch(e){let{message:r}=e,n=vi(/\bline (\d+)/u.exec(r)),i=vi(/\bcolumn (\d+)/u.exec(r)),s=vi(/\bposition (\d+)/u.exec(r));return vo(o,[{message:r,line:n,column:i,from:s,severity:"error"}])}return[]},Ao=(o,t)=>{try{t(o)}catch(r){if(!(r instanceof Error)){let e=r,{warnings:n}=e,i=Nn(e,["warnings"]);return i.message&&n.push(i),vo(o,n)}}return[]},So=o=>{var e;if(!o.trim())return[];let t=Ao(o,yo);return((e=t[t.length-1])==null?void 0:e.severity)==="error"?t:[...t,...Zd(o)]},Co=o=>o.trim()?Ao(o,To):[]});var _r,er,Wr,Dr,Ai,W,oe=w(()=>{"use strict";W=class{constructor(t,e){S(this,Dr);S(this,_r);S(this,er);S(this,Wr);C(this,_r,t),C(this,er,e)}get start(){return m(this,er)}get top(){return I(this,Dr,Ai).call(this).top}get left(){return I(this,Dr,Ai).call(this).left}};_r=new WeakMap,er=new WeakMap,Wr=new WeakMap,Dr=new WeakSet,Ai=function(){var t;return(t=m(this,Wr))!=null||C(this,Wr,m(this,_r).getRootNode().posFromIndex(m(this,er))),m(this,Wr)}});var eg,tg,Rn,Si,wo,j,F,me,tr,O,Pn,Le,Bn,jn,On,ot,Ge,qn,je,Eo,z=w(()=>{"use strict";ze();Se();oe();D();eg=new Set(["tr","td","th","caption"]),tg=new Set(["Template:!!","Template:!-"]),Rn=o=>{let t=o.childNodes.find(e=>e.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&tg.has(t.name)||t.is("html")&&eg.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Rn(t.childNodes[1]);if(t.is("magic-word"))try{let e=t.getPossibleValues().map(Rn);return e.includes(2)?2:e.includes(1)&&1}catch(e){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Si=(o,t,e,r)=>({line:o+e-1,character:(e===1?t:0)+r}),wo=o=>(t,e,r,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof W?e:new W(t,s),{offsetHeight:p,offsetWidth:g}=t,{startIndex:d,startLine:f,startCol:c}=o(t,s,a,l),{line:u,character:x}=Si(f,c,p,g);return{rule:r,message:v.msg(n),severity:i,startIndex:d,endIndex:d+t.toString().length,startLine:f,endLine:u,startCol:c,endCol:x}},j=wo((o,t,e,r)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:t+n,startLine:e+i,startCol:i?s:r+s}}),F=wo((o,t,e,r)=>({startIndex:t,startLine:e,startCol:r})),me=(o,t,e,r=0)=>({desc:v.msg(t),range:[o.startIndex+r,o.endIndex],text:e}),tr=(o,t,e)=>({desc:v.msg(t),range:[o,o],text:e}),O=(o,t=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+t],text:e}:me(o,"remove",e,t),Pn=(o,t)=>me(o,"decode",St(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Le=(o,t,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:t}),Bn=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),jn=(o,t)=>me(o,"comment",`<!--${t}-->`),On=(o,t)=>me(o,"uppercase",t.toUpperCase()),ot=(o,t=0)=>({desc:v.msg("whitespace"),range:[o,o+t],text:" "}),Ge=(o,t,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:t.repeat(e)}),qn=(o,t)=>({desc:v.msg("escape"),range:[o,o+t.length],text:t.replace(/\|/gu,"|")}),je=(o,t,e,r)=>{if(o&&(r||v.viewOnly&&o[0]===ne.rev))return o[1];let n=t();return(r||v.viewOnly)&&e([ne.rev,n]),n},Eo=(o,t)=>o==="ol"&&t==="type"?["1","a","A","i","I"]:o==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]});var rg,_n,Ci=w(()=>{"use strict";rg=o=>{if(o.includes("#")){let t=o.indexOf("#"),e=o.slice(0,t),r=o.slice(t+1);return(n,i)=>(t===0||n===e)&&i===r}return t=>t===o},_n=(o,t,e)=>{if(o=o.trim(),!o)return(()=>!0);let r=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(rg);return(({type:n,name:i})=>r.some(s=>s(n,i)))}});var No=oo((zp,Lo)=>{Lo.exports=function(o,t,e,r,n){var i,s;if(r===void 0)r=0;else if(r=r|0,r<0||r>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<r||n>=o.length)throw new RangeError("invalid upper bound");for(;r<=n;)if(i=r+(n-r>>>1),s=+e(o[i],t,i,o),s<0)r=i+1;else if(s>0)n=i-1;else return i;return~r}});var $o,Io,Fo=w(()=>{"use strict";$o=zd(No()),Io=(o,t,e)=>{let r=(0,$o.default)(o,t,e);return r<0?~r:r}});var rr,Wn=w(()=>{"use strict";z();rr=(o=!0)=>t=>{let e=new WeakMap;return function(...r){return je(e.get(this),()=>t.apply(this,r),n=>{e.set(this,n)},o)}}});var Ro,Po=w(()=>{"use strict";Ro=o=>{class t extends o{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}});var Bo,jo,Ur,nr,ir,zr,He,sr,Mr,Oe,wi=w(()=>{"use strict";ze();Fo();z();Se();Wn();Po();D();jo=[Ro],Bo=[rr(!1)];Oe=class{constructor(){R(Mr,5,this);ce(this,"childNodes",[]);S(this,Ur);S(this,nr);S(this,ir);S(this,zr);S(this,He);S(this,sr,{})}get parentNode(){return m(this,Ur)}get nextSibling(){return m(this,nr)}get previousSibling(){return m(this,ir)}getChildNodes(){let{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":C(this,Ur,e),e||(C(this,nr,void 0),C(this,ir,void 0));break;case"nextSibling":C(this,nr,e);break;case"previousSibling":C(this,ir,e);break;case"aIndex":v.viewOnly&&C(this,He,[ne.rev,e]);break;default:this[t]=e}}getRootNode(){return je(m(this,zr),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{let[,e]=t;e.type==="root"&&C(this,zr,t)})}indexFromPos(t,e){{if(t<0||e<0)return;let r=this.getLines();if(t>=r.length)return;let[,n,i]=r[t],s=n+e;return s>i?void 0:s}}posFromIndex(t){{let{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){let r=this.getLines(),n=Io(r,t,([,,i],s)=>i-s);return{top:n,left:t-r[n][1]}}return}}getDimension(){{let t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return je(m(this,sr)[t],()=>{var s;let{childNodes:e}=this,r=((s=m(this,He))==null?void 0:s[0])===ne.rev&&m(this,He)[1],n=t+(t<0?e.length:0),i=this.getAttribute("padding");for(let a=0;a<n;a++)v.viewOnly&&(m(this,sr)[a]=[ne.rev,i],r!==!1&&C(e[a],He,[ne.rev,r+i])),i+=e[a].toString().length+this.getGaps(a);return i},e=>{m(this,sr)[t]=e})}getAbsoluteIndex(){return je(m(this,He),()=>{let{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{C(this,He,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){return Fn(String(this))}seal(t,e){}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}};Mr=B(null),Ur=new WeakMap,nr=new WeakMap,ir=new WeakMap,zr=new WeakMap,He=new WeakMap,sr=new WeakMap,P(Mr,1,"getLines",Bo,Oe),Oe=P(Mr,0,"AstNode",jo,Oe),R(Mr,1,Oe)});var Oo,qo=w(()=>{"use strict";Ci();Oo=o=>{var t,Ei;{class r extends o{constructor(){super(...arguments);S(this,t)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:p,childNodes:g}=l;if(p!=="text"){if(s(l))return l;for(let d=g.length-1;d>=0;d--)a.push(g[d])}}}querySelector(s){return this.getElementBy(I(this,t,Ei).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let p=a.pop(),{type:g,childNodes:d}=p;if(g!=="text"){s(p)&&l.push(p);for(let f=d.length-1;f>=0;f--)a.push(d[f])}}return l}querySelectorAll(s){return this.getElementsBy(I(this,t,Ei).call(this,s))}escape(){}}return t=new WeakSet,Ei=function(s){return _n(s,this)},r}}});var _o,Li,ng,Ct,Wo=w(()=>{"use strict";ae();Se();Ci();wi();qo();_o=[Oo];Ct=class extends(ng=Oe){get length(){return this.childNodes.length}text(t){return Ee(this.childNodes,t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return Dn(this,e,0,[t]),t}closest(t){let e=_n(t,this),{parentNode:r}=this;for(;r;){if(e(r))return r;({parentNode:r}=r)}}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(let e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;let r=this.childNodes[e],{data:n}=r;return r.replaceData(t),n}toString(t,e=""){return this.childNodes.map(r=>r.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){{let r=[];for(let n=0,i=t+this.getAttribute("padding");n<this.length;n++){let s=this.childNodes[n];s.setAttribute("aIndex",i);let a=s.lint(i,e);a.length>0&&Array.prototype.push.apply(r,a),i+=s.toString().length+this.getGaps(n)}return r}}print(t={}){}json(t,e=1/0,r=this.getAbsoluteIndex()){}};Li=B(ng),Ct=P(Li,0,"AstElement",_o,Ct),R(Li,1,Ct)});var Ni,Mo,ig,sg,og,ag,Do,lg,Mn,Uo,Gr,zo=w(()=>{"use strict";ae();z();D();wi();Ni=String.raw`[${Ie}\t]*`,Mo=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,ig=new RegExp(String.raw`${Mo}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${Ni}\d)|\bisbn(?=[-::]?${Ni}(?:\d(?:${Ni}|-)){6})`,"giu"),sg=new RegExp(Mo,"giu"),og=new Set(["attr-value","ext-link-text","link-text"]),ag={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Do=new Set(["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"]),lg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(o){return/\w/u}})(),Gr=class extends Oe{constructor(e){super();S(this,Mn);ce(this,"data","");this.data=e}get type(){return"text"}toString(e){var r;return e&&!((r=this.parentNode)!=null&&r.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),r){var n,i,s;{if(r===!1)return[];let{data:a,parentNode:l,nextSibling:p,previousSibling:g}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:f}=l;if(d==="attr-value"){let{name:_,tag:U}=f;if(U==="ref"&&(_==="name"||_==="follow")||_==="group"&&(U==="ref"||U==="references")||U==="choose"&&(_==="before"||_==="after"))return[]}if(r!=null||(r=l.isPlain()&&!og.has(d)?ig:sg),a.search(r)===-1)return[];r.lastIndex=0;let c=[],u=p==null?void 0:p.type,x=p==null?void 0:p.name,h=g==null?void 0:g.type,T=this.getRootNode(),b=T.toString(),{ext:y,html:k,variants:A}=T.getAttribute("config"),{top:N,left:E}=T.posFromIndex(e),{lintConfig:$}=v,H=$.rules["tag-like"],q=typeof H=="object"&&H[1]?new Set(Object.keys(H[1]).filter(_=>_!=="invalid"&&_!=="disallowed")):new Set,K=new Set(["onlyinclude","noinclude","includeonly",...y,...k[0],...k[1],...k[2],...q,...$.getSeverity("tag-like","disallowed")?Do:[]]);for(let _=r.exec(a);_;_=r.exec(a)){let{index:U,0:M}=_,[,be,Kt]=_,xt=M==="["&&d==="ext-link-text";if(Kt&&Kt!=="]"){let{length:se}=Kt;U+=se,M=M.slice(se)}else{if(M.startsWith("<")&&!K.has(be.toLowerCase())||xt&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(U+1))||p!=null&&p.is("ext")&&x==="nowiki"&&((n=p.innerText)!=null&&n.includes("]"))))continue;M.startsWith(`
|
|
6
|
-
==`)&&(U++,M=M.slice(1))}M=M.toLowerCase();let[Y]=M,yt=M==="rfc"||M==="pmid"||M==="isbn",$r=Y==="{",ui=Y==="}",
|
|
3
|
+
`,"\r"]),qr=o=>o===""?"end of input":o==='"'?`'"'`:JSON.stringify(o),yo=o=>{let t,e,r,n,i=(h,T,x)=>{T===void 0?h.from=t-1:(h.from=T,h.to=x!=null?x:t-1)},s=(h,T,x)=>{let y={message:h,severity:"warning"};i(y,T,x),n.push(y)},a=(h,T,x)=>{let y={warnings:n,message:h,severity:"error"};throw i(y,T,x),y},l=h=>(h&&h!==e&&a(`Expected ${qr(h)} instead of ${qr(e)}`),e=r.charAt(t),t++,e),p=()=>{let h="",T=t-1;if(e==="-"&&(h="-",l()),e==="0")h+=e,l(),e>="0"&&e<="9"&&a("Bad number");else if(e>="1"&&e<="9")for(;e>="0"&&e<="9";)h+=e,l();else a("No number after minus sign");if(e!=="."&&e!=="e"&&e!=="E"){let y=Number(h);Number.isSafeInteger(y)||s("Not a safe integer",T);return}if(e===".")for(h+=".",l(),(e<"0"||e>"9")&&a("Unterminated fractional number");e>="0"&&e<="9";)h+=e,l();if(e==="e"||e==="E")for(h+=e,l(),(e==="-"||e==="+")&&(h+=e,l());e>="0"&&e<="9";)h+=e,l();let x=Number(h);Number.isFinite(x)||a("Bad number")},g=()=>{let h="";if(e==='"')for(;l();){if(e==='"')return l(),h;let T=t-1;if(e==="\\")if(l(),e==="u"){let x=0,y=0;for(;x<4;x++){let k=parseInt(l(),16);if(!isFinite(k))break;y=y*16+k}x<4&&a("Bad unicode escape",T),h+=String.fromCharCode(y)}else typeof bo[e]=="string"?h+=bo[e]:a("Bad escaped character",T,t);else e<" "?a("Bad control character",T,t):h+=e}else a(`Expected '"' instead of ${JSON.stringify(e)}`);return a("Unterminated string")},d=()=>{for(;e;){for(;e&&Yd.has(e);)l();if(o&&e==="/"){let h=r.charAt(t);if(h==="/"){for(l(),l();e&&e!==`
|
|
4
|
+
`&&e!=="\r";)l();continue}else if(h==="*"){for(l(),l();e&&!(e==="*"&&r.charAt(t)==="/");)l();e==="*"&&(l(),l());continue}}break}},f=()=>{switch(e){case"t":l(),l("r"),l("u"),l("e");return;case"f":l(),l("a"),l("l"),l("s"),l("e");return;case"n":l(),l("u"),l("l"),l("l");return;default:a(`Unexpected ${JSON.stringify(e)}`)}},c=()=>{if(l(),d(),e==="]"){l();return}else if(o&&e===","){l(),d(),l("]");return}let h;for(;e;){if(e==="]"){if(o){l();return}a("Trailing comma in array",h,h+1)}if(b(),d(),e==="]"){l();return}else e===","?(h=t-1,l(),d()):a(`Expected "," or "]" instead of ${qr(e)}`)}a("Unterminated array")},u=()=>{let h=new Set;if(l(),d(),e==="}"){l();return}else if(o&&e===","){l(),d(),l("}");return}let T;for(;e;){if(e==="}"){if(o){l();return}a("Trailing comma in object",T,T+1)}T=t;let x=g(),y=t-2;if(d(),l(":"),h.has(x)?s(`Duplicate key ${qr(x)}`,T,y):h.add(x),b(),d(),e==="}"){l();return}else e===","?(T=t-1,l(),d()):a(`Expected "," or "}" instead of ${qr(e)}`)}a(`Expected '"'`)},b=()=>{switch(d(),e){case"":return;case"{":return u();case"[":return c();case'"':return g();case"-":return p();default:return e>="0"&&e<="9"?p():f()}};return h=>{if(r=h,n=[],t=0,e=" ",b(),d(),e)a("Syntax error");else if(n.length>0)throw{warnings:n}}},To=yo(),ko=yo(!0)});function Be(o){let t=new Map,e=new WeakMap;return r=>{let n=typeof r=="string"?t:e;if(n.has(r)){let s=n.get(r);return s.lastIndex=0,s}let i=o(r);return n.set(r,i),i}}var St,Fn,vi,Ao,Zd,So,Co,wo,ze=w(()=>{"use strict";vo();St=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25"));Fn=o=>{let t=[],e=0;for(let r of o.split(`
|
|
5
|
+
`)){let n=e+r.length;t.push([r,e,n]),e=n+1}return t},vi=o=>o&&Number(o[1]),Ao=(o,t)=>{var n;let e,r=i=>{e!=null||(e=Fn(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of t){let{line:s,column:a,from:l,to:p}=i;l==null?s?(e!=null||(e=Fn(o)),(n=i.column)!=null||(i.column=1),i.from=e[s-1][1]+(i.column-1)):(i.from=0,i.line=1,i.column=1):(!s||!a)&&Object.assign(i,r(l)),p!==void 0&&({line:i.endLine,column:i.endColumn}=r(p)),i.position=i.from}return t},Zd=(o,t)=>{if(t||o.trim())try{JSON.parse(o)}catch(e){let{message:r}=e,n=vi(/\bline (\d+)/u.exec(r)),i=vi(/\bcolumn (\d+)/u.exec(r)),s=vi(/\bposition (\d+)/u.exec(r));return Ao(o,[{message:r,line:n,column:i,from:s,severity:"error"}])}return[]},So=(o,t)=>{try{t(o)}catch(r){if(!(r instanceof Error)){let e=r,{warnings:n}=e,i=Nn(e,["warnings"]);return i.message&&n.push(i),Ao(o,n)}}return[]},Co=o=>{var e;if(!o.trim())return[];let t=So(o,To);return((e=t[t.length-1])==null?void 0:e.severity)==="error"?t:[...t,...Zd(o)]},wo=o=>o.trim()?So(o,ko):[]});var _r,er,Wr,Dr,Ai,W,oe=w(()=>{"use strict";W=class{constructor(t,e){S(this,Dr);S(this,_r);S(this,er);S(this,Wr);C(this,_r,t),C(this,er,e)}get start(){return m(this,er)}get top(){return I(this,Dr,Ai).call(this).top}get left(){return I(this,Dr,Ai).call(this).left}};_r=new WeakMap,er=new WeakMap,Wr=new WeakMap,Dr=new WeakSet,Ai=function(){var t;return(t=m(this,Wr))!=null||C(this,Wr,m(this,_r).getRootNode().posFromIndex(m(this,er))),m(this,Wr)}});var eg,tg,Rn,Si,Eo,j,F,me,tr,O,Pn,Le,Bn,jn,On,ot,Ge,qn,je,Lo,z=w(()=>{"use strict";ze();Se();oe();D();eg=new Set(["tr","td","th","caption"]),tg=new Set(["Template:!!","Template:!-"]),Rn=o=>{let t=o.childNodes.find(e=>e.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&tg.has(t.name)||t.is("html")&&eg.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Rn(t.childNodes[1]);if(t.is("magic-word"))try{let e=t.getPossibleValues().map(Rn);return e.includes(2)?2:e.includes(1)&&1}catch(e){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Si=(o,t,e,r)=>({line:o+e-1,character:(e===1?t:0)+r}),Eo=o=>(t,e,r,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof W?e:new W(t,s),{offsetHeight:p,offsetWidth:g}=t,{startIndex:d,startLine:f,startCol:c}=o(t,s,a,l),{line:u,character:b}=Si(f,c,p,g);return{rule:r,message:v.msg(n),severity:i,startIndex:d,endIndex:d+t.toString().length,startLine:f,endLine:u,startCol:c,endCol:b}},j=Eo((o,t,e,r)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:t+n,startLine:e+i,startCol:i?s:r+s}}),F=Eo((o,t,e,r)=>({startIndex:t,startLine:e,startCol:r})),me=(o,t,e,r=0)=>({desc:v.msg(t),range:[o.startIndex+r,o.endIndex],text:e}),tr=(o,t,e)=>({desc:v.msg(t),range:[o,o],text:e}),O=(o,t=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+t],text:e}:me(o,"remove",e,t),Pn=(o,t)=>me(o,"decode",St(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Le=(o,t,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:t}),Bn=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),jn=(o,t)=>me(o,"comment",`<!--${t}-->`),On=(o,t)=>me(o,"uppercase",t.toUpperCase()),ot=(o,t=0)=>({desc:v.msg("whitespace"),range:[o,o+t],text:" "}),Ge=(o,t,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:t.repeat(e)}),qn=(o,t)=>({desc:v.msg("escape"),range:[o,o+t.length],text:t.replace(/\|/gu,"|")}),je=(o,t,e,r)=>{if(o&&(r||v.viewOnly&&o[0]===ne.rev))return o[1];let n=t();return(r||v.viewOnly)&&e([ne.rev,n]),n},Lo=(o,t)=>o==="ol"&&t==="type"?["1","a","A","i","I"]:o==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]});var rg,_n,Ci=w(()=>{"use strict";rg=o=>{if(o.includes("#")){let t=o.indexOf("#"),e=o.slice(0,t),r=o.slice(t+1);return(n,i)=>(t===0||n===e)&&i===r}return t=>t===o},_n=(o,t,e)=>{if(o=o.trim(),!o)return(()=>!0);let r=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(rg);return(({type:n,name:i})=>r.some(s=>s(n,i)))}});var $o=ao((zp,No)=>{No.exports=function(o,t,e,r,n){var i,s;if(r===void 0)r=0;else if(r=r|0,r<0||r>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<r||n>=o.length)throw new RangeError("invalid upper bound");for(;r<=n;)if(i=r+(n-r>>>1),s=+e(o[i],t,i,o),s<0)r=i+1;else if(s>0)n=i-1;else return i;return~r}});var Io,Fo,Ro=w(()=>{"use strict";Io=zd($o()),Fo=(o,t,e)=>{let r=(0,Io.default)(o,t,e);return r<0?~r:r}});var rr,Wn=w(()=>{"use strict";z();rr=(o=!0)=>t=>{let e=new WeakMap;return function(...r){return je(e.get(this),()=>t.apply(this,r),n=>{e.set(this,n)},o)}}});var Po,Bo=w(()=>{"use strict";Po=o=>{class t extends o{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}});var jo,Oo,Ur,nr,ir,zr,He,sr,Mr,Oe,wi=w(()=>{"use strict";ze();Ro();z();Se();Wn();Bo();D();Oo=[Po],jo=[rr(!1)];Oe=class{constructor(){R(Mr,5,this);ce(this,"childNodes",[]);S(this,Ur);S(this,nr);S(this,ir);S(this,zr);S(this,He);S(this,sr,{})}get parentNode(){return m(this,Ur)}get nextSibling(){return m(this,nr)}get previousSibling(){return m(this,ir)}getChildNodes(){let{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":C(this,Ur,e),e||(C(this,nr,void 0),C(this,ir,void 0));break;case"nextSibling":C(this,nr,e);break;case"previousSibling":C(this,ir,e);break;case"aIndex":v.viewOnly&&C(this,He,[ne.rev,e]);break;default:this[t]=e}}getRootNode(){return je(m(this,zr),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{let[,e]=t;e.type==="root"&&C(this,zr,t)})}indexFromPos(t,e){{if(t<0||e<0)return;let r=this.getLines();if(t>=r.length)return;let[,n,i]=r[t],s=n+e;return s>i?void 0:s}}posFromIndex(t){{let{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){let r=this.getLines(),n=Fo(r,t,([,,i],s)=>i-s);return{top:n,left:t-r[n][1]}}return}}getDimension(){{let t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return je(m(this,sr)[t],()=>{var s;let{childNodes:e}=this,r=((s=m(this,He))==null?void 0:s[0])===ne.rev&&m(this,He)[1],n=t+(t<0?e.length:0),i=this.getAttribute("padding");for(let a=0;a<n;a++)v.viewOnly&&(m(this,sr)[a]=[ne.rev,i],r!==!1&&C(e[a],He,[ne.rev,r+i])),i+=e[a].toString().length+this.getGaps(a);return i},e=>{m(this,sr)[t]=e})}getAbsoluteIndex(){return je(m(this,He),()=>{let{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{C(this,He,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){return Fn(String(this))}seal(t,e){}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}};Mr=B(null),Ur=new WeakMap,nr=new WeakMap,ir=new WeakMap,zr=new WeakMap,He=new WeakMap,sr=new WeakMap,P(Mr,1,"getLines",jo,Oe),Oe=P(Mr,0,"AstNode",Oo,Oe),R(Mr,1,Oe)});var qo,_o=w(()=>{"use strict";Ci();qo=o=>{var t,Ei;{class r extends o{constructor(){super(...arguments);S(this,t)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:p,childNodes:g}=l;if(p!=="text"){if(s(l))return l;for(let d=g.length-1;d>=0;d--)a.push(g[d])}}}querySelector(s){return this.getElementBy(I(this,t,Ei).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let p=a.pop(),{type:g,childNodes:d}=p;if(g!=="text"){s(p)&&l.push(p);for(let f=d.length-1;f>=0;f--)a.push(d[f])}}return l}querySelectorAll(s){return this.getElementsBy(I(this,t,Ei).call(this,s))}escape(){}}return t=new WeakSet,Ei=function(s){return _n(s,this)},r}}});var Wo,Li,ng,Ct,Do=w(()=>{"use strict";ae();Se();Ci();wi();_o();Wo=[qo];Ct=class extends(ng=Oe){get length(){return this.childNodes.length}text(t){return Ee(this.childNodes,t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return Dn(this,e,0,[t]),t}closest(t){let e=_n(t,this),{parentNode:r}=this;for(;r;){if(e(r))return r;({parentNode:r}=r)}}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(let e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;let r=this.childNodes[e],{data:n}=r;return r.replaceData(t),n}toString(t,e=""){return this.childNodes.map(r=>r.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){{let r=[];for(let n=0,i=t+this.getAttribute("padding");n<this.length;n++){let s=this.childNodes[n];s.setAttribute("aIndex",i);let a=s.lint(i,e);a.length>0&&Array.prototype.push.apply(r,a),i+=s.toString().length+this.getGaps(n)}return r}}print(t={}){}json(t,e=1/0,r=this.getAbsoluteIndex()){}};Li=B(ng),Ct=P(Li,0,"AstElement",Wo,Ct),R(Li,1,Ct)});var Ni,Uo,ig,sg,og,ag,Mo,lg,Mn,zo,Gr,Go=w(()=>{"use strict";ae();z();D();wi();Ni=String.raw`[${Ie}\t]*`,Uo=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,ig=new RegExp(String.raw`${Uo}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${Ni}\d)|\bisbn(?=[-::]?${Ni}(?:\d(?:${Ni}|-)){6})`,"giu"),sg=new RegExp(Uo,"giu"),og=new Set(["attr-value","ext-link-text","link-text"]),ag={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Mo=new Set(["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"]),lg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(o){return/\w/u}})(),Gr=class extends Oe{constructor(e){super();S(this,Mn);ce(this,"data","");this.data=e}get type(){return"text"}toString(e){var r;return e&&!((r=this.parentNode)!=null&&r.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),r){var n,i,s;{if(r===!1)return[];let{data:a,parentNode:l,nextSibling:p,previousSibling:g}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:f}=l;if(d==="attr-value"){let{name:_,tag:U}=f;if(U==="ref"&&(_==="name"||_==="follow")||_==="group"&&(U==="ref"||U==="references")||U==="choose"&&(_==="before"||_==="after"))return[]}if(r!=null||(r=l.isPlain()&&!og.has(d)?ig:sg),a.search(r)===-1)return[];r.lastIndex=0;let c=[],u=p==null?void 0:p.type,b=p==null?void 0:p.name,h=g==null?void 0:g.type,T=this.getRootNode(),x=T.toString(),{ext:y,html:k,variants:A}=T.getAttribute("config"),{top:N,left:E}=T.posFromIndex(e),{lintConfig:$}=v,H=$.rules["tag-like"],q=typeof H=="object"&&H[1]?new Set(Object.keys(H[1]).filter(_=>_!=="invalid"&&_!=="disallowed")):new Set,K=new Set(["onlyinclude","noinclude","includeonly",...y,...k[0],...k[1],...k[2],...q,...$.getSeverity("tag-like","disallowed")?Mo:[]]);for(let _=r.exec(a);_;_=r.exec(a)){let{index:U,0:M}=_,[,xe,Kt]=_,bt=M==="["&&d==="ext-link-text";if(Kt&&Kt!=="]"){let{length:se}=Kt;U+=se,M=M.slice(se)}else{if(M.startsWith("<")&&!K.has(xe.toLowerCase())||bt&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(U+1))||p!=null&&p.is("ext")&&b==="nowiki"&&((n=p.innerText)!=null&&n.includes("]"))))continue;M.startsWith(`
|
|
6
|
+
==`)&&(U++,M=M.slice(1))}M=M.toLowerCase();let[Y]=M,yt=M==="rfc"||M==="pmid"||M==="isbn",$r=Y==="{",ui=Y==="}",Ks=Y==="[",fi=Y==="]",{length:st}=M;fi&&(U||st>1)&&r.lastIndex--;let Yt=e+U,Tt=Yt+st,fe,Pe,Cn,wn,kt=x[Tt],ci=x[Yt-1],mi=$r||Ks,hi=M==="{"&&ci==="-"&&A.length>0,xi=M==="}"&&kt==="-"&&A.length>0,Ys=Ks&&u==="free-ext-link"&&!a.slice(U+1).trim()||fi&&h==="free-ext-link"&&!a.slice(0,U).includes("]");if(yt)fe="lonely-http",M=M.toUpperCase(),Pe=$.getSeverity(fe,M);else if(Y==="<"){fe="tag-like";let se;/^<\/?\s/u.test(M)||!/[\s/>]/u.test(kt!=null?kt:"")?se="invalid":q.has(xe)?se=xe:Mo.has(xe)&&!y.includes(xe)&&(se="disallowed"),Pe=$.getSeverity(fe,se)}else if(Y==="=")fe="syntax-like",Pe=$.getSeverity(fe,"heading");else if(hi||xi)fe="lonely-bracket",Pe=$.getSeverity(fe,"converter"),hi&&U>0?(M="-{",U--,Yt--,st=2):xi&&U<a.length-1&&(M="}-",Tt++,st=2);else if(Ys)fe="lonely-bracket",Pe=$.getSeverity(fe,"extLink");else if(mi||ui||fi)if(fe="lonely-bracket",st>1||$r&&kt===Y||ui&&ci===Y)Pe=$.getSeverity(fe,"double");else{if(!bt){let se=ag[Y],we=mi?a.slice(U+1):a.slice(0,U);if($r&&((i=se.exec(we))==null?void 0:i[0])==="}"||ui&&((s=se.exec(we))==null?void 0:s[0])==="{")continue;if(!we.includes(Y)){let We=mi?"nextSibling":"previousSibling",$e=this[We];for(;$e&&($e.type!=="text"||!se.test($e.data));)$e=$e[We];if($e&&se.exec($e.data)[0]!==Y)continue}}Pe=$.getSeverity(fe,"single")}else fe="lonely-http",Pe=$.getSeverity(fe);if(!Pe)continue;let Zs=this.posFromIndex(U),{line:eo,character:to}=Si(N,E,Zs.top+1,Zs.left);if(Y==="="){let se=a.indexOf(`
|
|
7
7
|
`,U),we=p,We;if(se===-1){let $e=0;for(;we&&!(we.type==="text"&&($e=we.data.indexOf(`
|
|
8
|
-
`),$e!==-1));)we=we.nextSibling;if(!we)continue;We=we.data.slice(0,$e)}else We=a.slice(U+st,se);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(We))continue;se===-1?(Tt=we.getAbsoluteIndex()+We.length,{top:Cn,left:wn}=T.posFromIndex(Tt)):(Tt+=We.length,st+=We.length)}let vt={rule:fe,message:v.msg(Y==="="?"header-like":"lonely",yt||Y==="h"||hi||bi?M:Y),severity:Pe,startIndex:Yt,endIndex:Tt,startLine:Zs,endLine:Cn!=null?Cn:Zs,startCol:eo,endCol:wn!=null?wn:eo+st};if($.computeEditInfo)if(Y==="<")vt.suggestions=[Ge(Yt,"<")];else if(Y==="h"&&d!=="link-text"&&lg.test(ci||""))vt.suggestions=[ot(Yt)];else if(xt){let se=l.getAbsoluteIndex()+l.toString().length;vt.suggestions=[Ge(se,"]")]}else if(M==="]"&&Ks){let se=e-g.toString().length;vt.suggestions=[tr(se,"left-bracket","[")]}else yt&&(vt.suggestions=[..._[0]===M?[]:[On(vt,M)],...kt===":"||kt===":"?[ot(Tt,1)]:[]]);c.push(vt)}return c}}replaceData(e){I(this,Mn,Uo).call(this,e)}splitText(e){this.lspError("AstText.splitText")}escape(){}print(){}};Mn=new WeakSet,Uo=function(e){this.setAttribute("data",e)}});var ve,at=w(()=>{"use strict";ve=(o=!0,t=!0)=>e=>{class r extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return r}});var Q,xe=w(()=>{"use strict";Q=o=>{}});var Hr,he,lt=w(()=>{"use strict";G();he=class extends L{constructor(e,r,n,i,s){super(e,n,i,s);S(this,Hr);C(this,Hr,r)}get type(){return m(this,Hr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Hr=new WeakMap});var pe,qe=w(()=>{"use strict";pe=({length:o})=>t=>{class e extends t{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var or,ue,dt=w(()=>{"use strict";G();ue=class extends L{constructor(e,r,n,i,s){super(e,n,i,s);S(this,or);C(this,or,r)}get type(){return m(this,or)}set type(e){C(this,or,e)}getAttribute(e){var r;return e==="invalid"?this.type==="converter-flag"&&!!((r=this.parentNode)!=null&&r.isInvalidFlag(this)):super.getAttribute(e)}};or=new WeakMap});var Go,ar,Ve,gt,Un,Ho,$i,dg,ye,lr=w(()=>{"use strict";z();Se();oe();qe();xe();D();G();dt();Go=[Q,pe("[[")];ye=class extends(dg=L){constructor(e,r,n,i=[],s="|"){super(void 0,n,i,{});S(this,Un);S(this,ar,!0);S(this,Ve);S(this,gt);if(this.insertAt(new ue(e,"link-target",n,i,{})),r!==void 0){let a=new L(r,n,i,{});a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}C(this,Ve,s)}get link(){}get fragment(){}afterBuild(){C(this,gt,this.getTitle()),m(this,Ve).includes("\0")&&C(this,Ve,this.buildFromStr(m(this,Ve),0)),I(this,Un,Ho).call(this),super.afterBuild()}setAttribute(e,r){e==="bracket"?C(this,ar,r):e==="title"?C(this,gt,r):super.setAttribute(e,r)}toString(e){let r=super.toString(e,m(this,Ve));return m(this,ar)?`[[${r}]]`:r}text(){let e=super.text("|");return m(this,ar)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,gt):super.getAttribute(e)}getGaps(e){return e===0?m(this,Ve).length:1}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:p}=m(this,gt),{lintConfig:g}=v,{computeEditInfo:d,fix:f}=g,c=new W(this,e),u="unknown-page",x=g.getSeverity(u);if(x&&i.childNodes.some(({type:h})=>h==="template")&&n.push(j(i,c,u,"template-in-link",x)),u="url-encoding",x=g.getSeverity(u),x&&l){let h=j(i,c,u,"unnecessary-encoding",x);(d||f)&&(h.fix=Pn(h,i)),n.push(h)}if(u="pipe-like",x=g.getSeverity(u,"link"),x&&(a==="link"||a==="category")){let h=s==null?void 0:s.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),T=s==null?void 0:s.childNodes[h];if(T){let b=j(s,c,u,"pipe-in-link",x);if(d){let y=b.startIndex+s.getRelativeIndex(h);b.suggestions=[qn(y,T.data)]}n.push(b)}}if(u="no-ignored",x=g.getSeverity(u,"fragment"),x&&p!==void 0&&!Vo(a)){let h=j(i,c,u,"useless-fragment",x);if(d||f){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),b=i.childNodes[T];b&&(h.fix=O(h,i.getRelativeIndex(T)+b.data.indexOf("#")))}n.push(h)}return n}}getTitle(e,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:e,decode:!0,selfLink:!0})}print(){}json(e,r,n=this.getAbsoluteIndex()){}};$i=B(dg),ar=new WeakMap,Ve=new WeakMap,gt=new WeakMap,Un=new WeakSet,Ho=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,gt).title)},ye=P($i,0,"LinkBaseToken",Go,ye),R($i,1,ye)});var Qo,Ii,gg,le,pt=w(()=>{"use strict";xe();G();Qo=[Q];le=class extends(gg=L){get innerText(){return this.firstChild.data}constructor(t="",e,r){super(t,e,r)}};Ii=B(gg),le=P(Ii,0,"NowikiBaseToken",Qo,le),R(Ii,1,le)});var Jo,Fi,pg,de,wt=w(()=>{"use strict";z();at();D();pt();Jo=[ve(!1)];de=class extends(pg=le){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let{lintConfig:e}=v,r="no-ignored",n=e.getSeverity(r,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=F(this,{start:t},r,"useless-attribute",n),{computeEditInfo:l}=e,p=s[1].length+1,g=i.endsWith("/>")?2:1;return a.startIndex+=p,a.startCol+=p,a.endIndex-=g,a.endCol-=g,l&&(a.suggestions=[O(a)]),[a]}}return[]}}};Fi=B(pg),de=P(Fi,0,"NoincludeToken",Jo,de),R(Fi,1,de)});var zn,Xo=w(()=>{"use strict";z();D();lr();wt();zn=class extends ye{get type(){return"redirect-target"}constructor(t,e,r,n){super(t,void 0,r,n),e!==void 0&&this.insertAt(new de(e,r,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){{let e=super.lint(t,!1),r="no-ignored",{lintConfig:n}=v,i=n.getSeverity(r,"redirect");if(i&&this.length===2){let s=j(this.lastChild,{start:t},r,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=O(s)),e.push(s)}return e}}}});var Ko,Lt,Vr,Ri,ug,Et,Yo=w(()=>{"use strict";at();xe();G();lt();Xo();Ko=[ve(!1,!1),Q];Et=class extends(ug=L){constructor(e,r,n,i,s,a,l=[]){super(void 0,a,l);S(this,Lt);S(this,Vr);C(this,Lt,e),C(this,Vr,s),this.append(new he(r,"redirect-syntax",a,l),new zn(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,Lt).length:super.getAttribute(e)}toString(e){return m(this,Lt)+super.toString(e)+m(this,Vr)}lint(e=this.getAbsoluteIndex()){{let r=e+m(this,Lt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",r),this.lastChild.lint(r)}}print(){}};Ri=B(ug),Lt=new WeakMap,Vr=new WeakMap,Et=P(Ri,0,"RedirectToken",Ko,Et),R(Ri,1,Et)});var Zo={};Z(Zo,{parseRedirect:()=>fg});var fg,ea=w(()=>{"use strict";D();Yo();fg=(o,t,e)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let r=t.regexRedirect.exec(o);return r&&v.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(r[0].length)}`,new Et(...r.slice(1),t,e),o):!1}});var ta,Pi,cg,Nt,ra=w(()=>{"use strict";qe();xe();G();ta=[Q,pe("<onlyinclude>")];Nt=class extends(cg=L){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){}};Pi=B(cg),Nt=P(Pi,0,"OnlyincludeToken",ta,Nt),R(Pi,1,Nt)});var ut,Qr=w(()=>{"use strict";ut=(o=1)=>t=>{class e extends t{getGaps(){return o}}return e}});var na,$t,ft,Bi,mg,Fe,Gn=w(()=>{"use strict";Qr();xe();G();na=[ut(),Q];Fe=class extends(mg=L){constructor(e,r,n,i,s,a=[]){super(void 0,s);S(this,$t);S(this,ft);ce(this,"closed");this.setAttribute("name",e.toLowerCase()),C(this,$t,[e,i||e]),this.closed=i!=="",C(this,ft,i===void 0),this.append(r,n);let l=typeof r=="string"?-1:a.indexOf(r);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,ft)?void 0:this.lastChild.text()}get selfClosing(){return m(this,ft)}toString(e){let{firstChild:r,lastChild:n}=this,[i,s]=m(this,$t);return m(this,ft)?`<${i}${r.toString(e)}/>`:`<${i}${r.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,r]=m(this,$t);return m(this,ft)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${r}>`:""}`}getAttribute(e){return e==="padding"?m(this,$t)[0].length+1:super.getAttribute(e)}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Bi=B(mg),$t=new WeakMap,ft=new WeakMap,Fe=P(Bi,0,"TagPairToken",na,Fe),R(Bi,1,Fe)});var ia,ji,hg,It,sa=w(()=>{"use strict";z();oe();at();D();Gn();ia=[ve(!1)];It=class extends(hg=Fe){get type(){return"include"}constructor(t,e="",r,n,i,s){super(t,e,r!=null?r:"",r===void 0||n!=null?n:"",i,s)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let e=[],{firstChild:r,closed:n,name:i}=this,s=new W(this,t),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:p}=l,g=a.map(d=>l.getSeverity(d,"include"));if(g[0]&&r.data.trim()){let d=j(r,s,a[0],"useless-attribute",g[0]);p&&(d.suggestions=[O(d)]),e.push(d)}if(g[1]&&!n){let d=F(this,s,a[1],v.msg("unclosed",`<${i}>`),g[1]);p&&(d.suggestions=[Le(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};ji=B(hg),It=P(ji,0,"IncludeToken",ia,It),R(ji,1,It)});var dr,Hn=w(()=>{"use strict";dr=(o=0)=>t=>{var e,oa;{class n extends t{constructor(){super(...arguments);S(this,e)}hasAttr(a){this.lspError("AttributesParent.hasAttr")}getAttr(a){return I(this,e,oa).call(this).getAttr(a)}}return e=new WeakSet,oa=function(){return this.childNodes[o]},n}}});var ie,aa,la,Vn,qi,da,Qn,fa,ca,ma,Oi,ga,pa,ua,Ft,ha,ba,xa,ya,Ta,_i=w(()=>{"use strict";ie=new Set(["align"]),aa=new Set(["cite"]),la=new Set(["cite","datetime"]),Vn=new Set(["width"]),qi=new Set(["axis","align","bgcolor","height","width","valign"]),da=new Set([...qi,"abbr","headers","scope","rowspan","colspan"]),Qn=new Set(["type"]),fa=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ca=new Set(["clear"]),ma=new Set(["bgcolor","align","valign"]),Oi=new Set(["id","qid","forcemathmode","type","display"]),ga=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),pa=new Set(["weight"]),ua=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),Ft=new Set,ha=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"]),ba={div:ie,h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,blockquote:aa,q:aa,p:ie,br:ca,pre:Vn,ins:la,del:la,ul:Qn,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...fa,"border"]),caption:ie,tr:ma,td:da,th:da,font:new Set(["size","color","face"]),hr:Vn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Qn,poem:ie,categorytree:ie,combooption:ie,img:new Set(["alt","src","width","height","loading","srcset"])},xa={pre:new Set(["format"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:Ft,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:pa,choicetemplate:pa,imagemap:Ft,inputbox:Ft,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Ft,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Oi,"chem"]),chem:Oi,ce:Oi,hiero:Ft,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ga,syntaxhighlight:ga,templatedata:Ft,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Ft,mapframe:new Set([...ua,"frameless"]),maplink:new Set([...ua,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},ya={table:fa,td:new Set([...qi,"scope"]),th:qi,br:ca,caption:ie,div:ie,hr:Vn,h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,li:Qn,p:ie,pre:Vn,tr:ma,ul:Qn},Ta={dynamicpagelist:["category","notcategory","namespace","count","offset","imagewidth","imageheight","imagesperrow","mode","gallerycaption","galleryshowfilesize","galleryshowfilename","order","ordermethod","redirects","stablepages","qualitypages","suppresserrors","addfirstcategorydate","shownamespace","ignoresubpages","googlehack","nofollow"],inputbox:["preloadparams[]","type","width","preload","preloadtitle","page","editintro","useve","usedt","summary","nosummary","minor","break","default","placeholder","bgcolor","buttonlabel","searchbuttonlabel","fulltextbutton","namespaces","labeltext","hidden","id","inline","prefix","dir","searchengine","searchtype","searchfilter","tour","arialabel"]}});var bg,xg,yg,Tg,Jr,gr,Te,Qe,Rt,ka,Wi,pr,va=w(()=>{"use strict";z();ae();_i();oe();D();G();dt();bg=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,xg=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,yg=new Set(["ext","arg","magic-word","template"]),Tg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),pr=class extends L{constructor(e,r,n,i,s,a="",l,p=[]){let g=new ue(n,"attr-key",s,p),d;if(n==="title"||r==="img"&&n==="alt")d=new L(l,s,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(r==="gallery"&&n==="caption"||r==="ref"&&n==="details"||(r==="mapframe"||r==="maplink")&&n==="text"||r==="choose"&&(n==="before"||n==="after")){let f=ge(V({},s),{excludes:[...s.excludes,"heading","html","table","hr","list"]});d=new L(l,f,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new ue(l,"attr-value",s,p,{});super(void 0,s,p);S(this,Rt);S(this,Jr);S(this,gr);S(this,Te);S(this,Qe);C(this,Jr,e),this.append(g,d),C(this,Te,a),C(this,Qe,[...i]),C(this,gr,r),this.setAttribute("name",Ue(re(n)))}get type(){return m(this,Jr)}get tag(){return m(this,gr)}get balanced(){return!m(this,Te)||m(this,Qe)[0]===m(this,Qe)[1]}afterBuild(){m(this,Te).includes("\0")&&C(this,Te,this.buildFromStr(m(this,Te),0)),this.parentNode&&C(this,gr,this.parentNode.name),I(this,Rt,ka).call(this),super.afterBuild()}toString(e){let[r="",n=""]=m(this,Qe);return m(this,Te)?super.toString(e,m(this,Te)+r)+n:this.firstChild.toString(e)}text(){return m(this,Te)?`${super.text(`${m(this,Te).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,r;return m(this,Te)?m(this,Te).length+((r=(e=m(this,Qe)[0])==null?void 0:e.length)!=null?r:0):0}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{balanced:s,firstChild:a,lastChild:l,name:p,tag:g}=this,d=new W(this,e),f=["unclosed-quote","obsolete-attr"],{lintConfig:c}=v,u=f.map(h=>c.getSeverity(h,p));if(u[0]&&!s){let h=j(l,d,f[0],"unclosed-quotes",u[0]);h.startIndex--,h.startCol--,c.computeEditInfo&&(h.suggestions=[Le(h.endIndex,m(this,Qe)[0])]),i.push(h)}let x=I(this,Rt,Wi).call(this,e,d);return x&&i.push(x),u[1]&&((n=ya[g])!=null&&n.has(p))&&i.push(j(a,d,f[1],"obsolete-attribute",u[1])),i}}getValue(){return m(this,Te)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(e){return e==="invalid"?I(this,Rt,Wi).call(this):super.getAttribute(e)}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Jr=new WeakMap,gr=new WeakMap,Te=new WeakMap,Qe=new WeakMap,Rt=new WeakSet,ka=function(){this.setAttribute("name",Ue(this.firstChild.text()))},Wi=function(e,r){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:p}=this,g=!i.childNodes.some(({type:b})=>yg.has(b)),d=this.getValue(),f=xa[l],c=ba[l],{length:u}=this.toString(),x="illegal-attr",h,T;if({lintConfig:h}=v,{computeEditInfo:T}=h,!(f!=null&&f.has(a))&&!(c!=null&&c.has(a))&&(s==="ext-attr"?f||c:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!c||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(a)&&(l==="meta"||l==="link"||!ha.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(p!=null&&p.hasAttr("itemscope"))){if(e===void 0)return!0;{let b=h.getSeverity(x,"unknown");if(b){let y=j(n,r,x,"illegal-attribute-name",b);return T&&(y.suggestions=[O(e,u)]),y}}}else if(a==="style"&&typeof d=="string"&&bg.test(d)){if(e===void 0)return!0;{x="insecure-style";let b=h.getSeverity(x);return b&&j(i,r,x,"insecure-style",b)}}else if(a==="tabindex"&&typeof d=="string"&&d!=="0"){if(e===void 0)return!0;{let b=h.getSeverity(x,"tabindex");if(b){let y=j(i,r,x,"nonzero-tabindex",b);return T&&(y.suggestions=[O(e,u),me(y,"0 tabindex","0")]),y}}}else if(typeof d=="string"&&((/^xmlns:[\w:.-]+$/u.test(a)||Tg.has(a))&&xg.test(d)||g&&(a==="href"||l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(d))){if(e===void 0)return!0;{let b=h.getSeverity(x,"value");return b&&j(i,r,x,"illegal-attribute-value",b)}}else if(g&&s!=="ext-attr"){let b=Eo(l,a),y=String(d).toLowerCase();if(b.length>0&&b.every(k=>k!==y)){if(e===void 0)return!0;{let k=h.getSeverity(x,"value");return k&&j(i,r,x,"illegal-attribute-value",k)}}}return!1}});var Aa,kg,vg,Xr,Kr,Di,ct,Jn=w(()=>{"use strict";z();ae();oe();D();G();dt();va();Aa=o=>o.slice(0,-1),kg=o=>`${Aa(o)}-dirty`,vg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(o){return/[^\W_]/u}})(),ct=class extends L{constructor(e,r,n,i,s=[]){super(void 0,i,s,{});S(this,Kr);S(this,Xr);if(C(this,Xr,r),this.setAttribute("name",n),e){let a=/([^\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=a.exec(e),g=0,d=()=>{l&&(super.insertAt(new ue(l,kg(r),i,s,{})),l="")};for(;p;){let{index:f,0:c,1:u,2:x,3:h,4:T,5:b,6:y}=p;if(l+=e.slice(g,f),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(re(u).trim())){let k=T!=null?T:y,A=[h,b],N=new pr(Aa(r),n,u,A,i,x,k,s);d(),super.insertAt(N)}else l+=c;({lastIndex:g}=a),p=a.exec(e)}l+=e.slice(g),d()}}get type(){return m(this,Xr)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(r=>r instanceof pr&&(!e||r.name===Ue(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let r=this.getAttrTokens(e);return r[r.length-1]}}getAttr(e){var r;return(r=this.getAttrToken(e))==null?void 0:r.getValue()}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{parentNode:i,childNodes:s}=this,a=new Map,l=new Set,p=new W(this,e),g=["no-ignored","no-duplicate"],{lintConfig:d}=v,{computeEditInfo:f,fix:c}=d,u=["closingTag","invalidAttributes","nonWordAttributes"].map(h=>d.getSeverity(g[0],h));if(u[0]&&I(this,Kr,Di).call(this)){let h=F(this,p,g[0],"attributes-of-closing-tag",u[0]);if(f){let T=i.getAbsoluteIndex();h.suggestions=[O(h),Bn(T)]}n.push(h)}for(let h of s)if(h instanceof pr){let{name:T}=h;a.has(T)?(l.add(T),a.get(T).push(h)):a.set(T,[h])}else{let T=h.text().trim(),b=u[vg.test(T)?1:2];if(T&&b){let y=j(h,p,g[0],"invalid-attribute",b);f&&(y.suggestions=[O(y,0," ")]),n.push(y)}}let x=d.getSeverity(g[1],"attribute");if(x&&l.size>0)for(let h of l){let T=a.get(h).map(b=>{let y=b.getValue();return[b,y===!0?"":y]});Array.prototype.push.apply(n,T.map(([b,y],k)=>{let A=j(b,p,g[1],v.msg("duplicate-attribute",h),x);if(f||c){let N=O(A);!y||T.slice(0,k).some(([,E])=>E===y)?A.fix=N:f&&(A.suggestions=[N])}return A}))}return n}}escape(){}getAttribute(e){return e==="invalid"?I(this,Kr,Di).call(this):super.getAttribute(e)}print(){}};Xr=new WeakMap,Kr=new WeakSet,Di=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var Sa={};Z(Sa,{PreToken:()=>Mi});var Mi,Ca=w(()=>{"use strict";G();wt();Mi=class extends L{get type(){return"ext-inner"}constructor(t,e,r=[]){if(t){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(t);a&&(i.lastIndex=a.index+s);let l=i.exec(t),p=0,g="";for(;a&&l;)new de(a[0],e,r,!0),new de(l[0],e,r,!0),g+=`${t.slice(p,a.index)}\0${r.length-1}n${t.slice(a.index+s,l.index)}\0${r.length}n`,p=l.index+s+1,n.lastIndex=p,a=n.exec(t),a&&(i.lastIndex=a.index+s),l=i.exec(t);t=g+t.slice(p)}super(t,e,r,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){return super.lint(t,/<\s*\/\s*(pre)\b/giu)}}});var mt,Xn=w(()=>{"use strict";G();mt=class extends L{get type(){return"ext-inner"}toString(t){return super.toString(t,`
|
|
8
|
+
`),$e!==-1));)we=we.nextSibling;if(!we)continue;We=we.data.slice(0,$e)}else We=a.slice(U+st,se);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(We))continue;se===-1?(Tt=we.getAbsoluteIndex()+We.length,{top:Cn,left:wn}=T.posFromIndex(Tt)):(Tt+=We.length,st+=We.length)}let vt={rule:fe,message:v.msg(Y==="="?"header-like":"lonely",yt||Y==="h"||hi||xi?M:Y),severity:Pe,startIndex:Yt,endIndex:Tt,startLine:eo,endLine:Cn!=null?Cn:eo,startCol:to,endCol:wn!=null?wn:to+st};if($.computeEditInfo)if(Y==="<")vt.suggestions=[Ge(Yt,"<")];else if(Y==="h"&&d!=="link-text"&&lg.test(ci||""))vt.suggestions=[ot(Yt)];else if(bt){let se=l.getAbsoluteIndex()+l.toString().length;vt.suggestions=[Ge(se,"]")]}else if(M==="]"&&Ys){let se=e-g.toString().length;vt.suggestions=[tr(se,"left-bracket","[")]}else yt&&(vt.suggestions=[..._[0]===M?[]:[On(vt,M)],...kt===":"||kt===":"?[ot(Tt,1)]:[]]);c.push(vt)}return c}}replaceData(e){I(this,Mn,zo).call(this,e)}splitText(e){this.lspError("AstText.splitText")}escape(){}print(){}};Mn=new WeakSet,zo=function(e){this.setAttribute("data",e)}});var ve,at=w(()=>{"use strict";ve=(o=!0,t=!0)=>e=>{class r extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return r}});var Q,be=w(()=>{"use strict";Q=o=>{}});var Hr,he,lt=w(()=>{"use strict";G();he=class extends L{constructor(e,r,n,i,s){super(e,n,i,s);S(this,Hr);C(this,Hr,r)}get type(){return m(this,Hr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Hr=new WeakMap});var pe,qe=w(()=>{"use strict";pe=({length:o})=>t=>{class e extends t{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var or,ue,dt=w(()=>{"use strict";G();ue=class extends L{constructor(e,r,n,i,s){super(e,n,i,s);S(this,or);C(this,or,r)}get type(){return m(this,or)}set type(e){C(this,or,e)}getAttribute(e){var r;return e==="invalid"?this.type==="converter-flag"&&!!((r=this.parentNode)!=null&&r.isInvalidFlag(this)):super.getAttribute(e)}};or=new WeakMap});var Ho,ar,Ve,gt,Un,Vo,$i,dg,ye,lr=w(()=>{"use strict";z();Se();oe();qe();be();D();G();dt();Ho=[Q,pe("[[")];ye=class extends(dg=L){constructor(e,r,n,i=[],s="|"){super(void 0,n,i,{});S(this,Un);S(this,ar,!0);S(this,Ve);S(this,gt);if(this.insertAt(new ue(e,"link-target",n,i,{})),r!==void 0){let a=new L(r,n,i,{});a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}C(this,Ve,s)}get link(){}get fragment(){}afterBuild(){C(this,gt,this.getTitle()),m(this,Ve).includes("\0")&&C(this,Ve,this.buildFromStr(m(this,Ve),0)),I(this,Un,Vo).call(this),super.afterBuild()}setAttribute(e,r){e==="bracket"?C(this,ar,r):e==="title"?C(this,gt,r):super.setAttribute(e,r)}toString(e){let r=super.toString(e,m(this,Ve));return m(this,ar)?`[[${r}]]`:r}text(){let e=super.text("|");return m(this,ar)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,gt):super.getAttribute(e)}getGaps(e){return e===0?m(this,Ve).length:1}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:p}=m(this,gt),{lintConfig:g}=v,{computeEditInfo:d,fix:f}=g,c=new W(this,e),u="unknown-page",b=g.getSeverity(u);if(b&&i.childNodes.some(({type:h})=>h==="template")&&n.push(j(i,c,u,"template-in-link",b)),u="url-encoding",b=g.getSeverity(u),b&&l){let h=j(i,c,u,"unnecessary-encoding",b);(d||f)&&(h.fix=Pn(h,i)),n.push(h)}if(u="pipe-like",b=g.getSeverity(u,"link"),b&&(a==="link"||a==="category")){let h=s==null?void 0:s.childNodes.findIndex(x=>x.type==="text"&&x.data.includes("|")),T=s==null?void 0:s.childNodes[h];if(T){let x=j(s,c,u,"pipe-in-link",b);if(d){let y=x.startIndex+s.getRelativeIndex(h);x.suggestions=[qn(y,T.data)]}n.push(x)}}if(u="no-ignored",b=g.getSeverity(u,"fragment"),b&&p!==void 0&&!Qo(a)){let h=j(i,c,u,"useless-fragment",b);if(d||f){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),x=i.childNodes[T];x&&(h.fix=O(h,i.getRelativeIndex(T)+x.data.indexOf("#")))}n.push(h)}return n}}getTitle(e,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:e,decode:!0,selfLink:!0})}print(){}json(e,r,n=this.getAbsoluteIndex()){}};$i=B(dg),ar=new WeakMap,Ve=new WeakMap,gt=new WeakMap,Un=new WeakSet,Vo=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,gt).title)},ye=P($i,0,"LinkBaseToken",Ho,ye),R($i,1,ye)});var Jo,Ii,gg,le,pt=w(()=>{"use strict";be();G();Jo=[Q];le=class extends(gg=L){get innerText(){return this.firstChild.data}constructor(t="",e,r){super(t,e,r)}};Ii=B(gg),le=P(Ii,0,"NowikiBaseToken",Jo,le),R(Ii,1,le)});var Xo,Fi,pg,de,wt=w(()=>{"use strict";z();at();D();pt();Xo=[ve(!1)];de=class extends(pg=le){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let{lintConfig:e}=v,r="no-ignored",n=e.getSeverity(r,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=F(this,{start:t},r,"useless-attribute",n),{computeEditInfo:l}=e,p=s[1].length+1,g=i.endsWith("/>")?2:1;return a.startIndex+=p,a.startCol+=p,a.endIndex-=g,a.endCol-=g,l&&(a.suggestions=[O(a)]),[a]}}return[]}}};Fi=B(pg),de=P(Fi,0,"NoincludeToken",Xo,de),R(Fi,1,de)});var zn,Ko=w(()=>{"use strict";z();D();lr();wt();zn=class extends ye{get type(){return"redirect-target"}constructor(t,e,r,n){super(t,void 0,r,n),e!==void 0&&this.insertAt(new de(e,r,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){{let e=super.lint(t,!1),r="no-ignored",{lintConfig:n}=v,i=n.getSeverity(r,"redirect");if(i&&this.length===2){let s=j(this.lastChild,{start:t},r,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=O(s)),e.push(s)}return e}}}});var Yo,Lt,Vr,Ri,ug,Et,Zo=w(()=>{"use strict";at();be();G();lt();Ko();Yo=[ve(!1,!1),Q];Et=class extends(ug=L){constructor(e,r,n,i,s,a,l=[]){super(void 0,a,l);S(this,Lt);S(this,Vr);C(this,Lt,e),C(this,Vr,s),this.append(new he(r,"redirect-syntax",a,l),new zn(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,Lt).length:super.getAttribute(e)}toString(e){return m(this,Lt)+super.toString(e)+m(this,Vr)}lint(e=this.getAbsoluteIndex()){{let r=e+m(this,Lt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",r),this.lastChild.lint(r)}}print(){}};Ri=B(ug),Lt=new WeakMap,Vr=new WeakMap,Et=P(Ri,0,"RedirectToken",Yo,Et),R(Ri,1,Et)});var ea={};Z(ea,{parseRedirect:()=>fg});var fg,ta=w(()=>{"use strict";D();Zo();fg=(o,t,e)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let r=t.regexRedirect.exec(o);return r&&v.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(r[0].length)}`,new Et(...r.slice(1),t,e),o):!1}});var ra,Pi,cg,Nt,na=w(()=>{"use strict";qe();be();G();ra=[Q,pe("<onlyinclude>")];Nt=class extends(cg=L){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){}};Pi=B(cg),Nt=P(Pi,0,"OnlyincludeToken",ra,Nt),R(Pi,1,Nt)});var ut,Qr=w(()=>{"use strict";ut=(o=1)=>t=>{class e extends t{getGaps(){return o}}return e}});var ia,$t,ft,Bi,mg,Fe,Gn=w(()=>{"use strict";Qr();be();G();ia=[ut(),Q];Fe=class extends(mg=L){constructor(e,r,n,i,s,a=[]){super(void 0,s);S(this,$t);S(this,ft);ce(this,"closed");this.setAttribute("name",e.toLowerCase()),C(this,$t,[e,i||e]),this.closed=i!=="",C(this,ft,i===void 0),this.append(r,n);let l=typeof r=="string"?-1:a.indexOf(r);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,ft)?void 0:this.lastChild.text()}get selfClosing(){return m(this,ft)}toString(e){let{firstChild:r,lastChild:n}=this,[i,s]=m(this,$t);return m(this,ft)?`<${i}${r.toString(e)}/>`:`<${i}${r.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,r]=m(this,$t);return m(this,ft)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${r}>`:""}`}getAttribute(e){return e==="padding"?m(this,$t)[0].length+1:super.getAttribute(e)}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Bi=B(mg),$t=new WeakMap,ft=new WeakMap,Fe=P(Bi,0,"TagPairToken",ia,Fe),R(Bi,1,Fe)});var sa,ji,hg,It,oa=w(()=>{"use strict";z();oe();at();D();Gn();sa=[ve(!1)];It=class extends(hg=Fe){get type(){return"include"}constructor(t,e="",r,n,i,s){super(t,e,r!=null?r:"",r===void 0||n!=null?n:"",i,s)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let e=[],{firstChild:r,closed:n,name:i}=this,s=new W(this,t),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:p}=l,g=a.map(d=>l.getSeverity(d,"include"));if(g[0]&&r.data.trim()){let d=j(r,s,a[0],"useless-attribute",g[0]);p&&(d.suggestions=[O(d)]),e.push(d)}if(g[1]&&!n){let d=F(this,s,a[1],v.msg("unclosed",`<${i}>`),g[1]);p&&(d.suggestions=[Le(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};ji=B(hg),It=P(ji,0,"IncludeToken",sa,It),R(ji,1,It)});var dr,Hn=w(()=>{"use strict";dr=(o=0)=>t=>{var e,aa;{class n extends t{constructor(){super(...arguments);S(this,e)}hasAttr(a){this.lspError("AttributesParent.hasAttr")}getAttr(a){return I(this,e,aa).call(this).getAttr(a)}}return e=new WeakSet,aa=function(){return this.childNodes[o]},n}}});var ie,la,da,Vn,_i,qi,ga,Qn,ca,ma,Oi,pa,ua,fa,Ft,ha,xa,ba,ya,Ta,Wi=w(()=>{"use strict";ie=new Set(["align"]),la=new Set(["cite"]),da=new Set(["cite","datetime"]),Vn=new Set(["width"]),_i=new Set(["bgcolor","align","valign"]),qi=new Set([..._i,"axis","height","nowrap","width"]),ga=new Set([...qi,"abbr","headers","scope","rowspan","colspan"]),Qn=new Set(["type"]),ca=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ma=new Set(["clear"]),Oi=new Set(["id","qid","forcemathmode","type","display"]),pa=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),ua=new Set(["weight"]),fa=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),Ft=new Set,ha=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"]),xa={div:ie,h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,blockquote:la,q:la,p:ie,br:ma,pre:Vn,ins:da,del:da,ul:Qn,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ca,"border"]),caption:ie,tr:_i,td:ga,th:ga,font:new Set(["size","color","face"]),hr:Vn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Qn,poem:ie,categorytree:ie,combooption:ie,img:new Set(["alt","src","width","height","loading","srcset"])},ba={pre:new Set(["format"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:Ft,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:ua,choicetemplate:ua,imagemap:Ft,inputbox:Ft,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Ft,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Oi,"chem"]),chem:Oi,ce:Oi,hiero:Ft,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:pa,syntaxhighlight:pa,templatedata:Ft,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Ft,mapframe:new Set([...fa,"frameless"]),maplink:new Set([...fa,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},ya={table:ca,td:new Set([...qi,"scope"]),th:qi,br:ma,caption:ie,div:ie,hr:Vn,h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,li:Qn,p:ie,pre:Vn,tr:_i,ul:Qn},Ta={dynamicpagelist:["category","notcategory","namespace","count","offset","imagewidth","imageheight","imagesperrow","mode","gallerycaption","galleryshowfilesize","galleryshowfilename","order","ordermethod","redirects","stablepages","qualitypages","suppresserrors","addfirstcategorydate","shownamespace","ignoresubpages","googlehack","nofollow"],inputbox:["preloadparams[]","type","width","preload","preloadtitle","page","editintro","useve","usedt","summary","nosummary","minor","break","default","placeholder","bgcolor","buttonlabel","searchbuttonlabel","fulltextbutton","namespaces","labeltext","hidden","id","inline","prefix","dir","searchengine","searchtype","searchfilter","tour","arialabel"]}});var xg,bg,yg,Tg,Jr,gr,Te,Qe,Rt,ka,Di,pr,va=w(()=>{"use strict";z();ae();Wi();oe();D();G();dt();xg=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,bg=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,yg=new Set(["ext","arg","magic-word","template"]),Tg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),pr=class extends L{constructor(e,r,n,i,s,a="",l,p=[]){let g=new ue(n,"attr-key",s,p),d;if(n==="title"||r==="img"&&n==="alt")d=new L(l,s,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(r==="gallery"&&n==="caption"||r==="ref"&&n==="details"||(r==="mapframe"||r==="maplink")&&n==="text"||r==="choose"&&(n==="before"||n==="after")){let f=ge(V({},s),{excludes:[...s.excludes,"heading","html","table","hr","list"]});d=new L(l,f,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new ue(l,"attr-value",s,p,{});super(void 0,s,p);S(this,Rt);S(this,Jr);S(this,gr);S(this,Te);S(this,Qe);C(this,Jr,e),this.append(g,d),C(this,Te,a),C(this,Qe,[...i]),C(this,gr,r),this.setAttribute("name",Ue(re(n)))}get type(){return m(this,Jr)}get tag(){return m(this,gr)}get balanced(){return!m(this,Te)||m(this,Qe)[0]===m(this,Qe)[1]}afterBuild(){m(this,Te).includes("\0")&&C(this,Te,this.buildFromStr(m(this,Te),0)),this.parentNode&&C(this,gr,this.parentNode.name),I(this,Rt,ka).call(this),super.afterBuild()}toString(e){let[r="",n=""]=m(this,Qe);return m(this,Te)?super.toString(e,m(this,Te)+r)+n:this.firstChild.toString(e)}text(){return m(this,Te)?`${super.text(`${m(this,Te).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,r;return m(this,Te)?m(this,Te).length+((r=(e=m(this,Qe)[0])==null?void 0:e.length)!=null?r:0):0}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{balanced:s,firstChild:a,lastChild:l,name:p,tag:g}=this,d=new W(this,e),f=["unclosed-quote","obsolete-attr"],{lintConfig:c}=v,u=f.map(h=>c.getSeverity(h,p));if(u[0]&&!s){let h=j(l,d,f[0],"unclosed-quotes",u[0]);h.startIndex--,h.startCol--,c.computeEditInfo&&(h.suggestions=[Le(h.endIndex,m(this,Qe)[0])]),i.push(h)}let b=I(this,Rt,Di).call(this,e,d);return b&&i.push(b),u[1]&&((n=ya[g])!=null&&n.has(p))&&i.push(j(a,d,f[1],"obsolete-attribute",u[1])),i}}getValue(){return m(this,Te)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(e){return e==="invalid"?I(this,Rt,Di).call(this):super.getAttribute(e)}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Jr=new WeakMap,gr=new WeakMap,Te=new WeakMap,Qe=new WeakMap,Rt=new WeakSet,ka=function(){this.setAttribute("name",Ue(this.firstChild.text()))},Di=function(e,r){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:p}=this,g=!i.childNodes.some(({type:x})=>yg.has(x)),d=this.getValue(),f=ba[l],c=xa[l],{length:u}=this.toString(),b="illegal-attr",h,T;if({lintConfig:h}=v,{computeEditInfo:T}=h,!(f!=null&&f.has(a))&&!(c!=null&&c.has(a))&&(s==="ext-attr"?f||c:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!c||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(a)&&(l==="meta"||l==="link"||!ha.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(p!=null&&p.hasAttr("itemscope"))){if(e===void 0)return!0;{let x=h.getSeverity(b,"unknown");if(x){let y=j(n,r,b,"illegal-attribute-name",x);return T&&(y.suggestions=[O(e,u)]),y}}}else if(a==="style"&&typeof d=="string"&&xg.test(d)){if(e===void 0)return!0;{b="insecure-style";let x=h.getSeverity(b);return x&&j(i,r,b,"insecure-style",x)}}else if(a==="tabindex"&&typeof d=="string"&&d!=="0"){if(e===void 0)return!0;{let x=h.getSeverity(b,"tabindex");if(x){let y=j(i,r,b,"nonzero-tabindex",x);return T&&(y.suggestions=[O(e,u),me(y,"0 tabindex","0")]),y}}}else if(typeof d=="string"&&((/^xmlns:[\w:.-]+$/u.test(a)||Tg.has(a))&&bg.test(d)||g&&(a==="href"||l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(d))){if(e===void 0)return!0;{let x=h.getSeverity(b,"value");return x&&j(i,r,b,"illegal-attribute-value",x)}}else if(g&&s!=="ext-attr"){let x=Lo(l,a),y=String(d).toLowerCase();if(x.length>0&&x.every(k=>k!==y)){if(e===void 0)return!0;{let k=h.getSeverity(b,"value");return k&&j(i,r,b,"illegal-attribute-value",k)}}}return!1}});var Aa,kg,vg,Xr,Kr,Mi,ct,Jn=w(()=>{"use strict";z();ae();oe();D();G();dt();va();Aa=o=>o.slice(0,-1),kg=o=>`${Aa(o)}-dirty`,vg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(o){return/[^\W_]/u}})(),ct=class extends L{constructor(e,r,n,i,s=[]){super(void 0,i,s,{});S(this,Kr);S(this,Xr);if(C(this,Xr,r),this.setAttribute("name",n),e){let a=/([^\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=a.exec(e),g=0,d=()=>{l&&(super.insertAt(new ue(l,kg(r),i,s,{})),l="")};for(;p;){let{index:f,0:c,1:u,2:b,3:h,4:T,5:x,6:y}=p;if(l+=e.slice(g,f),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(re(u).trim())){let k=T!=null?T:y,A=[h,x],N=new pr(Aa(r),n,u,A,i,b,k,s);d(),super.insertAt(N)}else l+=c;({lastIndex:g}=a),p=a.exec(e)}l+=e.slice(g),d()}}get type(){return m(this,Xr)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(r=>r instanceof pr&&(!e||r.name===Ue(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let r=this.getAttrTokens(e);return r[r.length-1]}}getAttr(e){var r;return(r=this.getAttrToken(e))==null?void 0:r.getValue()}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{parentNode:i,childNodes:s}=this,a=new Map,l=new Set,p=new W(this,e),g=["no-ignored","no-duplicate"],{lintConfig:d}=v,{computeEditInfo:f,fix:c}=d,u=["closingTag","invalidAttributes","nonWordAttributes"].map(h=>d.getSeverity(g[0],h));if(u[0]&&I(this,Kr,Mi).call(this)){let h=F(this,p,g[0],"attributes-of-closing-tag",u[0]);if(f){let T=i.getAbsoluteIndex();h.suggestions=[O(h),Bn(T)]}n.push(h)}for(let h of s)if(h instanceof pr){let{name:T}=h;a.has(T)?(l.add(T),a.get(T).push(h)):a.set(T,[h])}else{let T=h.text().trim(),x=u[vg.test(T)?1:2];if(T&&x){let y=j(h,p,g[0],"invalid-attribute",x);f&&(y.suggestions=[O(y,0," ")]),n.push(y)}}let b=d.getSeverity(g[1],"attribute");if(b&&l.size>0)for(let h of l){let T=a.get(h).map(x=>{let y=x.getValue();return[x,y===!0?"":y]});Array.prototype.push.apply(n,T.map(([x,y],k)=>{let A=j(x,p,g[1],v.msg("duplicate-attribute",h),b);if(f||c){let N=O(A);!y||T.slice(0,k).some(([,E])=>E===y)?A.fix=N:f&&(A.suggestions=[N])}return A}))}return n}}escape(){}getAttribute(e){return e==="invalid"?I(this,Kr,Mi).call(this):super.getAttribute(e)}print(){}};Xr=new WeakMap,Kr=new WeakSet,Mi=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var Sa={};Z(Sa,{PreToken:()=>Ui});var Ui,Ca=w(()=>{"use strict";G();wt();Ui=class extends L{get type(){return"ext-inner"}constructor(t,e,r=[]){if(t){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(t);a&&(i.lastIndex=a.index+s);let l=i.exec(t),p=0,g="";for(;a&&l;)new de(a[0],e,r,!0),new de(l[0],e,r,!0),g+=`${t.slice(p,a.index)}\0${r.length-1}n${t.slice(a.index+s,l.index)}\0${r.length}n`,p=l.index+s+1,n.lastIndex=p,a=n.exec(t),a&&(i.lastIndex=a.index+s),l=i.exec(t);t=g+t.slice(p)}super(t,e,r,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){return super.lint(t,/<\s*\/\s*(pre)\b/giu)}}});var mt,Xn=w(()=>{"use strict";G();mt=class extends L{get type(){return"ext-inner"}toString(t){return super.toString(t,`
|
|
9
9
|
`)}text(){return super.text(`
|
|
10
10
|
`).replace(/\n\s*\n/gu,`
|
|
11
|
-
`)}getGaps(){return 1}print(){}}});var Kn,wa=w(()=>{"use strict";z();
|
|
12
|
-
`).map(a=>s?a:Pt(a,n,i,e)).map(a=>new Kn(t,a,n,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}}});var La,en,tn,Gi,zi,Ag,Je,Hi=w(()=>{"use strict";z();Se();oe();xe();D();G();lt();La=[Q];Je=class extends(Ag=L){constructor(e,r,n,i=[]){super(void 0,n,i);S(this,tn);S(this,en);C(this,en,e);let s=new L(r[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let a=new he(r[1],"heading-trail",n,i);this.append(s,a)}get type(){return"heading"}get level(){return m(this,en)}toString(e){let r=I(this,tn,Gi).call(this);return r+this.firstChild.toString(e)+r+this.lastChild.toString(e)}text(){let e=I(this,tn,Gi).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="invalid"?this.inHtmlAttrs()===2:e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{firstChild:i,level:s}=this,a=i.toString(),l=a.startsWith("="),p=l||a.endsWith("="),g=new W(this,e),d=this.inHtmlAttrs(),f=["h1","unbalanced-header","format-leakage"],{lintConfig:c}=v,{computeEditInfo:u,fix:x}=c,h=f.map(T=>c.getSeverity(T,"apostrophe"));if(h[0]&&this.level===1){let T=j(i,g,f[0],"<h1>",h[0]);u&&!p&&(T.suggestions=[me(T,"h2",`=${a}=`)]),n.push(T)}if(h[1]&&p){let T=v.msg("unbalanced-in-section-header",'"="'),b=j(i,g,f[1],T,h[1]);if(!(!u||a==="="))if(l){let[y]=/^=+/u.exec(a),k=s+y.length;b.suggestions=[{desc:`h${s}`,range:[b.startIndex,b.startIndex+y.length],text:""}],k<7&&b.suggestions.push({desc:`h${k}`,range:[b.endIndex,b.endIndex],text:y})}else{let y=/[^=](=+)$/u.exec(a)[1],k=s+y.length;b.suggestions=[{desc:`h${s}`,range:[b.endIndex-y.length,b.endIndex],text:""}],k<7&&b.suggestions.push({desc:`h${k}`,range:[b.startIndex,b.startIndex],text:y})}n.push(b)}if(d){let T="parsing-order",b=c.getSeverity(T,d===2?"heading":"templateInTable");b&&n.push(F(this,g,T,"header-in-html",b))}if(h[2]){let T=this.getRootNode().toString(),b=i.childNodes.filter(Yn("quote")),y=b.filter(({bold:A})=>A),k=b.filter(({italic:A})=>A);if(y.length%2){let A=j(y[y.length-1],ge(V({},g),{start:e+s,left:g.left+s}),f[2],v.msg("unbalanced-in-section-header","bold-apostrophes"),h[2]);if(u||x){let N=e+s+a.length,E=O(A);T.slice(A.endIndex,N).trim()?u&&(A.suggestions=[E,Le(N,"'''")]):y.length===1&&k.length===0?A.fix=E:u&&(A.suggestions=[E])}n.push(A)}if(k.length%2){let A=j(k[k.length-1],{start:e+s},f[2],v.msg("unbalanced-in-section-header","italic-apostrophes"),h[2]);if(u||x){let N=e+s+a.length;T.slice(A.endIndex,N).trim()?u&&(A.suggestions=[Le(N,"''")]):k.length===1&&y.length===0?A.fix=O(A):u&&(A.suggestions=[O(A)])}n.push(A)}}return n}}print(){}json(e,r,n=this.getAbsoluteIndex()){}};zi=B(Ag),en=new WeakMap,tn=new WeakSet,Gi=function(){return"=".repeat(this.level)},Je=P(zi,0,"HeadingToken",La,Je),R(zi,1,Je)});var Sg,Zn,Na=w(()=>{"use strict";ae();z();D();G();Sg=new RegExp(`https?://${De}${Me}$`,"iu"),Zn=class extends L{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(t,e,r,n=[]){super(void 0,r,n);let i=new L(typeof t=="number"?void 0:t,r,n,{}),s=new L(e,r,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(t,e=!0){let r=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",r),r}afterBuild(){if(!this.anon){let{parentNode:t,firstChild:e}=this,r=this.trimName(e);t&&t.getArgs(r,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,p=(r=Sg.exec(l.text()))==null?void 0:r[0];try{if(p&&new URL(p).search){let g=j(l,{start:t},i,"unescaped-query",a);g.startIndex=g.endIndex,g.startLine=g.endLine,g.startCol=g.endCol,g.endIndex++,g.endCol++,(s.computeEditInfo||s.fix)&&(g.fix=Ge(g.startIndex,"{{=}}")),n.push(g)}}catch(g){}}return n}}print(){}json(t,e,r=this.getAbsoluteIndex()){}}});var $a,rn,Bt,ur,jt,nn,fr,Ot,Qi,Ia,Vi,Cg,ht,Fa=w(()=>{"use strict";ae();z();Se();oe();Qr();xe();D();G();Na();dt();lt();$a=[Q,ut()];ht=class extends(Cg=L){constructor(e,r,n,i=[]){var T,b;let s,a=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);a&&(s=Number(a[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});S(this,Ot);ce(this,"modifier","");S(this,rn,"template");S(this,Bt,":");S(this,ur,!1);S(this,jt,new Map);S(this,nn,0);S(this,fr);let{parserFunction:l,variable:p,functionHook:g}=n,d=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:T[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((b=k[0])!=null?b:"");this.setModifier(`${y}:${A}`)&&(e=k.join(":").slice(A.length))}let f=e.search(/[::]/u),c=e[f]===":",u=f!==-1;if(u||r.length===0&&!m(this,ur)){let y=u?e.slice(0,f):e,k=u&&e.slice(f+1),A=re(y),N=u?A.slice(A.search(/\S/u))+(c?":":""):A.trim(),[,E,$]=Ra(N,l),H=!("functionHook"in n)||g.includes($),q=p.includes($);if(u?$&&H:q){this.setAttribute("name",$),C(this,rn,"magic-word"),c&&C(this,Bt,":");let K=new he(y,"magic-word-name",n,i);if(super.insertAt(K),k!==!1&&r.unshift([k]),this.name==="invoke")for(let _=0;_<2;_++){let U=r.shift();if(!U)break;let M=new ue(U.join("="),`invoke-${_?"function":"module"}`,n,i);super.insertAt(M)}}}if(this.type==="template"){let y=re(e).trim();if(!this.normalizeTitle(y,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ue(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),h=1;for(let y=0;y<r.length;y++){let k=r[y];x||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(h),h++),this.insertAt(new Zn(...k,n,i))}this.seal("modifier")}get type(){return m(this,rn)}get module(){}get function(){}setModifier(e){let[,,r,n]=this.getAttribute("config").parserFunction,i=re(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=r.includes(s),l=n.includes(s);return(m(this,ur)?a:l||!e)||(ne.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),C(this,ur,a),!!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"&&(C(this,fr,I(this,Ot,Qi).call(this)),this.setAttribute("name",m(this,fr).title))}toString(e){let{childNodes:r,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":m(this,Bt))+r.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:r,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(r===1?"":m(this,Bt))+Ee(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return m(this,fr);case"colon":return m(this,Bt);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new W(this,e),{lintConfig:p}=v,{computeEditInfo:g}=p,d=i==="magic-word",f="no-ignored",c=p.getSeverity(f,"fragment");if(d&&!I(this,Ot,Qi).call(this).valid)f="invalid-invoke",c=p.getSeverity(f,"name"),c&&n.push(j(s[1],l,f,"illegal-module",c));else if(c){let u=s[d?1:0],x=u.childNodes.findIndex(T=>T.type==="text"&&Br(T.data).includes("#")),h=u.childNodes[x];if(h){let T=j(u,l,f,"useless-fragment",c);g&&(T.suggestions=[O(T,u.getRelativeIndex(x)+h.data.indexOf("#"))]),n.push(T)}}if(f="invalid-invoke",c=p.getSeverity(f,"function"),c&&d&&a===2)return n.push(F(this,l,f,"missing-function",c)),n;if(f="no-duplicate",c=p.getSeverity(f,"parameter"),c){let u=this.getDuplicatedArgs().filter(([,h])=>!h[0].querySelector("ext")),x="duplicate-parameter";for(let[,h]of u)Array.prototype.push.apply(n,h.map(T=>{let b=j(T,l,f,x,c);return g&&(b.suggestions=[O(b,-1)]),b}))}return n}}insertAt(e,r=this.length){return super.insertAt(e,r),e.anon?I(this,Ot,Ia).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getArgs(e,r,n=!0,i=!0){let s=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),a;return m(this,jt).has(s)?a=m(this,jt).get(s):(a=new Set,m(this,jt).set(s,a)),a}getDuplicatedArgs(){return[...m(this,jt)].filter(([,{size:e}])=>e>1).map(([e,r])=>[e,[...r]])}getPossibleValues(){let{type:e,name:r,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(r){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let a=n.slice(2),l=a[a.length-1];s=[...a.filter(({anon:p})=>!p),...l!=null&&l.anon?[l]:[]].map(({lastChild:p})=>p);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:a})=>a));for(let a=0;a<s.length;){let{length:l,0:p}=s[a].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(a,1);else if(l>1||!p.is("magic-word"))a++;else try{let g=p.getPossibleValues();Array.prototype.splice.apply(s,[a,1,...g]),a+=g.length}catch(g){a++}}return s}print(){}};Vi=B(Cg),rn=new WeakMap,Bt=new WeakMap,ur=new WeakMap,jt=new WeakMap,nn=new WeakMap,fr=new WeakMap,Ot=new WeakSet,Qi=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+re(this.childNodes[e?0:1].text()),10,V({temporary:!0},!e&&{page:""}))},Ia=function(e,r){C(this,nn,m(this,nn)+1);let n;n=m(this,nn)-1;let i=e,s=String(n+1);i.setAttribute("name",s),this.getArgs(s,!1,!1).add(i)},ht=P(Vi,0,"TranscludeToken",$a,ht),R(Vi,1,ht)});var Pa,Ji,wg,qt,Ba=w(()=>{"use strict";at();xe();G();Pa=[ve(),Q];qt=class extends(wg=L){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}};Ji=B(wg),qt=P(Ji,0,"HiddenToken",Pa,qt),R(Ji,1,qt)});var ja,Ki,Eg,Xi,Lg,_t,Oa=w(()=>{"use strict";ae();z();oe();qe();Qr();xe();D();G();dt();Ba();ja=[Q,pe("{{{"),ut()];_t=class extends(Lg=L){constructor(e,r,n=[]){super(void 0,r,n,{});S(this,Ki);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let a=new ue(s,"arg-name",r,n,{});super.insertAt(a)}else if(i>1){let a=new qt(s,r,n);super.insertAt(a)}else{let a=new L(s,r,n);a.type="arg-default",a.setAttribute("stage",2),super.insertAt(a)}}}get type(){return"arg"}get default(){}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Ee(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),r){{let[n,i,...s]=this.childNodes;n.setAttribute("aIndex",e+3);let a=n.lint(e+3,r);if(i){let u=e+4+n.toString().length;i.setAttribute("aIndex",u);let x=i.lint(u,r);x.length>0&&Array.prototype.push.apply(a,x)}let l=["no-ignored","no-arg"],{lintConfig:p}=v,{computeEditInfo:g}=p,d=new W(this,e),f=l.map(u=>p.getSeverity(u,"arg"));if(f[0]&&s.length>0&&Array.prototype.push.apply(a,s.map(u=>{let x=j(u,d,l[0],"invisible-triple-braces",f[0]);return x.startIndex--,x.startCol--,g&&(x.suggestions=[O(x),Ge(x.startIndex,"{{!}}")]),x})),f[1]&&!this.getAttribute("include")){let u=F(this,d,l[1],"unexpected-argument",f[1]);g&&i&&(u.suggestions=[me(u,"expand",i.text())]),a.push(u)}let c=this.closest("ext");if(c){let u="arg-in-ext",x=p.getSeverity(u,c.name);x&&a.push(F(this,d,u,"argument-in-ext",x))}return a}}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Xi=B(Lg),Ki=new WeakSet,Eg=function(){},_t=P(Xi,0,"ArgToken",ja,_t),R(Xi,1,_t)});var za={};Z(za,{parseBraces:()=>sn});var Ng,qa,Yi,_a,Wa,Da,Ua,Ma,sn,ei=w(()=>{"use strict";ze();ae();Hi();Fa();Oa();Ng={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},qa=String.raw`\[(?!\[)`,Yi=String.raw`\n(?![=\0])`,_a=String.raw`|\{{2,}`,Wa=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Da=Be(o=>new RegExp(o,"gmu"));Ua=new RegExp(String.raw`\{\{((?:[^\n{}[]|${qa}|${Yi})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Yi})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${qa}|${Yi})*\}-`,"gu");Ma=o=>{let t=Ue(re(o));return Wa.has(t)?Wa.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},sn=(o,t,e)=>{var u,x,h,T,b;let r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,[,,,n]=t.parserFunction,i=[],s=[],a=(y,k,A,N)=>{k[k.length-1].push(ke(y.slice(A,N),s))},l;do l!==void 0&&(o=l),l=o.replace(Ua,(y,k,A)=>{if(k!==void 0||typeof A=="string")try{let{length:N}=e,E=(k!=null?k:A).split("|");return new ht(ke(E[0],s),E.slice(1).map($=>{let H=$.indexOf("=");return(H===-1?[$]:[$.slice(0,H),$.slice(H+1)]).map(q=>ke(q,s))}),t,e),`\0${N}${Ma(E[0])}`}catch(N){if(!(N instanceof SyntaxError)||N.message!=="Invalid template name")throw N}return s.push(ke(y,s)),`\0${s.length-1}`});while(l!==o);o=l;let p=o.lastIndexOf("}}")-o.length,g=p+o.length!==-1,d=Da(r+(g?_a:"")),f=d.exec(o),c;for(;f||c!==void 0&&c<=o.length&&((x=(u=i[i.length-1])==null?void 0:u[0])!=null&&x.startsWith("="));){if(f!=null&&f[1]){let[,{length:U}]=f;f[0]=f[0].slice(U),f.index+=U}let{0:y,index:k}=f!=null?f:{0:`
|
|
11
|
+
`)}getGaps(){return 1}print(){}}});var Kn,wa=w(()=>{"use strict";z();Wi();D();G();Kn=class extends L{get type(){return"param-line"}constructor(t,e,r,n,i){super(e,r,n,i),this.setAttribute("name",t)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",{lintConfig:r}=v,{name:n,childNodes:i}=this,s=r.getSeverity(e,n);if(!s)return[];let a=v.msg("invalid-parameter",n);if(i.some(({type:f})=>f==="ext"))return[F(this,{start:t},e,a,s)];let l=i.filter(({type:f})=>f!=="comment"&&f!=="include"&&f!=="noinclude"),p=n==="inputbox",g=p?l.findIndex(({type:f})=>f!=="text"):-1,d=l.slice(0,g===-1?void 0:g).map(String).join("").trim();if(d){p&&(d=d.toLowerCase());let f=d.indexOf("="),c=d.slice(0,f===-1?void 0:f).trim(),u=Ta[n];if(f===-1?g===-1||!u.some(b=>b.startsWith(c)):!u.includes(c)){let b=F(this,{start:t},e,a,s);return r.computeEditInfo&&(b.suggestions=[O(b)]),[b]}}return super.lint(t,!1)}}}});var Ea={};Z(Ea,{ParamTagToken:()=>Yr});var Yr,zi=w(()=>{"use strict";Zr();Xn();wa();Yr=class extends mt{constructor(t,e,r,n,i=[],s){super(void 0,n,i,{}),r&&this.safeAppend(r.split(`
|
|
12
|
+
`).map(a=>s?a:Pt(a,n,i,e)).map(a=>new Kn(t,a,n,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}}});var La,en,tn,Hi,Gi,Ag,Je,Vi=w(()=>{"use strict";z();Se();oe();be();D();G();lt();La=[Q];Je=class extends(Ag=L){constructor(e,r,n,i=[]){super(void 0,n,i);S(this,tn);S(this,en);C(this,en,e);let s=new L(r[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let a=new he(r[1],"heading-trail",n,i);this.append(s,a)}get type(){return"heading"}get level(){return m(this,en)}toString(e){let r=I(this,tn,Hi).call(this);return r+this.firstChild.toString(e)+r+this.lastChild.toString(e)}text(){let e=I(this,tn,Hi).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="invalid"?this.inHtmlAttrs()===2:e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{firstChild:i,level:s}=this,a=i.toString(),l=a.startsWith("="),p=l||a.endsWith("="),g=new W(this,e),d=this.inHtmlAttrs(),f=["h1","unbalanced-header","format-leakage"],{lintConfig:c}=v,{computeEditInfo:u,fix:b}=c,h=f.map(T=>c.getSeverity(T,"apostrophe"));if(h[0]&&this.level===1){let T=j(i,g,f[0],"<h1>",h[0]);u&&!p&&(T.suggestions=[me(T,"h2",`=${a}=`)]),n.push(T)}if(h[1]&&p){let T=v.msg("unbalanced-in-section-header",'"="'),x=j(i,g,f[1],T,h[1]);if(!(!u||a==="="))if(l){let[y]=/^=+/u.exec(a),k=s+y.length;x.suggestions=[{desc:`h${s}`,range:[x.startIndex,x.startIndex+y.length],text:""}],k<7&&x.suggestions.push({desc:`h${k}`,range:[x.endIndex,x.endIndex],text:y})}else{let y=/[^=](=+)$/u.exec(a)[1],k=s+y.length;x.suggestions=[{desc:`h${s}`,range:[x.endIndex-y.length,x.endIndex],text:""}],k<7&&x.suggestions.push({desc:`h${k}`,range:[x.startIndex,x.startIndex],text:y})}n.push(x)}if(d){let T="parsing-order",x=c.getSeverity(T,d===2?"heading":"templateInTable");x&&n.push(F(this,g,T,"header-in-html",x))}if(h[2]){let T=this.getRootNode().toString(),x=i.childNodes.filter(Yn("quote")),y=x.filter(({bold:A})=>A),k=x.filter(({italic:A})=>A);if(y.length%2){let A=j(y[y.length-1],ge(V({},g),{start:e+s,left:g.left+s}),f[2],v.msg("unbalanced-in-section-header","bold-apostrophes"),h[2]);if(u||b){let N=e+s+a.length,E=O(A);T.slice(A.endIndex,N).trim()?u&&(A.suggestions=[E,Le(N,"'''")]):y.length===1&&k.length===0?A.fix=E:u&&(A.suggestions=[E])}n.push(A)}if(k.length%2){let A=j(k[k.length-1],{start:e+s},f[2],v.msg("unbalanced-in-section-header","italic-apostrophes"),h[2]);if(u||b){let N=e+s+a.length;T.slice(A.endIndex,N).trim()?u&&(A.suggestions=[Le(N,"''")]):k.length===1&&y.length===0?A.fix=O(A):u&&(A.suggestions=[O(A)])}n.push(A)}}return n}}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Gi=B(Ag),en=new WeakMap,tn=new WeakSet,Hi=function(){return"=".repeat(this.level)},Je=P(Gi,0,"HeadingToken",La,Je),R(Gi,1,Je)});var Sg,Zn,Na=w(()=>{"use strict";ae();z();D();G();Sg=new RegExp(`https?://${De}${Me}$`,"iu"),Zn=class extends L{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(t,e,r,n=[]){super(void 0,r,n);let i=new L(typeof t=="number"?void 0:t,r,n,{}),s=new L(e,r,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(t,e=!0){let r=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",r),r}afterBuild(){if(!this.anon){let{parentNode:t,firstChild:e}=this,r=this.trimName(e);t&&t.getArgs(r,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,p=(r=Sg.exec(l.text()))==null?void 0:r[0];try{if(p&&new URL(p).search){let g=j(l,{start:t},i,"unescaped-query",a);g.startIndex=g.endIndex,g.startLine=g.endLine,g.startCol=g.endCol,g.endIndex++,g.endCol++,(s.computeEditInfo||s.fix)&&(g.fix=Ge(g.startIndex,"{{=}}")),n.push(g)}}catch(g){}}return n}}print(){}json(t,e,r=this.getAbsoluteIndex()){}}});var $a,rn,Bt,ur,jt,nn,fr,Ot,Ji,Ia,Qi,Cg,ht,Fa=w(()=>{"use strict";ae();z();Se();oe();Qr();be();D();G();Na();dt();lt();$a=[Q,ut()];ht=class extends(Cg=L){constructor(e,r,n,i=[]){var T,x;let s,a=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);a&&(s=Number(a[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});S(this,Ot);ce(this,"modifier","");S(this,rn,"template");S(this,Bt,":");S(this,ur,!1);S(this,jt,new Map);S(this,nn,0);S(this,fr);let{parserFunction:l,variable:p,functionHook:g}=n,d=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:T[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=k[0])!=null?x:"");this.setModifier(`${y}:${A}`)&&(e=k.join(":").slice(A.length))}let f=e.search(/[::]/u),c=e[f]===":",u=f!==-1;if(u||r.length===0&&!m(this,ur)){let y=u?e.slice(0,f):e,k=u&&e.slice(f+1),A=re(y),N=u?A.slice(A.search(/\S/u))+(c?":":""):A.trim(),[,E,$]=Ra(N,l),H=!("functionHook"in n)||g.includes($),q=p.includes($);if(u?$&&H:q){this.setAttribute("name",$),C(this,rn,"magic-word"),c&&C(this,Bt,":");let K=new he(y,"magic-word-name",n,i);if(super.insertAt(K),k!==!1&&r.unshift([k]),this.name==="invoke")for(let _=0;_<2;_++){let U=r.shift();if(!U)break;let M=new ue(U.join("="),`invoke-${_?"function":"module"}`,n,i);super.insertAt(M)}}}if(this.type==="template"){let y=re(e).trim();if(!this.normalizeTitle(y,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ue(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let b=this.isTemplate(),h=1;for(let y=0;y<r.length;y++){let k=r[y];b||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(h),h++),this.insertAt(new Zn(...k,n,i))}this.seal("modifier")}get type(){return m(this,rn)}get module(){}get function(){}setModifier(e){let[,,r,n]=this.getAttribute("config").parserFunction,i=re(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=r.includes(s),l=n.includes(s);return(m(this,ur)?a:l||!e)||(ne.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),C(this,ur,a),!!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"&&(C(this,fr,I(this,Ot,Ji).call(this)),this.setAttribute("name",m(this,fr).title))}toString(e){let{childNodes:r,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":m(this,Bt))+r.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:r,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(r===1?"":m(this,Bt))+Ee(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return m(this,fr);case"colon":return m(this,Bt);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new W(this,e),{lintConfig:p}=v,{computeEditInfo:g}=p,d=i==="magic-word",f="no-ignored",c=p.getSeverity(f,"fragment");if(d&&!I(this,Ot,Ji).call(this).valid)f="invalid-invoke",c=p.getSeverity(f,"name"),c&&n.push(j(s[1],l,f,"illegal-module",c));else if(c){let u=s[d?1:0],b=u.childNodes.findIndex(T=>T.type==="text"&&Br(T.data).includes("#")),h=u.childNodes[b];if(h){let T=j(u,l,f,"useless-fragment",c);g&&(T.suggestions=[O(T,u.getRelativeIndex(b)+h.data.indexOf("#"))]),n.push(T)}}if(f="invalid-invoke",c=p.getSeverity(f,"function"),c&&d&&a===2)return n.push(F(this,l,f,"missing-function",c)),n;if(f="no-duplicate",c=p.getSeverity(f,"parameter"),c){let u=this.getDuplicatedArgs().filter(([,h])=>!h[0].querySelector("ext")),b="duplicate-parameter";for(let[,h]of u)Array.prototype.push.apply(n,h.map(T=>{let x=j(T,l,f,b,c);return g&&(x.suggestions=[O(x,-1)]),x}))}return n}}insertAt(e,r=this.length){return super.insertAt(e,r),e.anon?I(this,Ot,Ia).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getArgs(e,r,n=!0,i=!0){let s=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),a;return m(this,jt).has(s)?a=m(this,jt).get(s):(a=new Set,m(this,jt).set(s,a)),a}getDuplicatedArgs(){return[...m(this,jt)].filter(([,{size:e}])=>e>1).map(([e,r])=>[e,[...r]])}getPossibleValues(){let{type:e,name:r,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(r){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let a=n.slice(2),l=a[a.length-1];s=[...a.filter(({anon:p})=>!p),...l!=null&&l.anon?[l]:[]].map(({lastChild:p})=>p);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:a})=>a));for(let a=0;a<s.length;){let{length:l,0:p}=s[a].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(a,1);else if(l>1||!p.is("magic-word"))a++;else try{let g=p.getPossibleValues();Array.prototype.splice.apply(s,[a,1,...g]),a+=g.length}catch(g){a++}}return s}print(){}};Qi=B(Cg),rn=new WeakMap,Bt=new WeakMap,ur=new WeakMap,jt=new WeakMap,nn=new WeakMap,fr=new WeakMap,Ot=new WeakSet,Ji=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+re(this.childNodes[e?0:1].text()),10,V({temporary:!0},!e&&{page:""}))},Ia=function(e,r){C(this,nn,m(this,nn)+1);let n;n=m(this,nn)-1;let i=e,s=String(n+1);i.setAttribute("name",s),this.getArgs(s,!1,!1).add(i)},ht=P(Qi,0,"TranscludeToken",$a,ht),R(Qi,1,ht)});var Pa,Xi,wg,qt,Ba=w(()=>{"use strict";at();be();G();Pa=[ve(),Q];qt=class extends(wg=L){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}};Xi=B(wg),qt=P(Xi,0,"HiddenToken",Pa,qt),R(Xi,1,qt)});var ja,Yi,Eg,Ki,Lg,_t,Oa=w(()=>{"use strict";ae();z();oe();qe();Qr();be();D();G();dt();Ba();ja=[Q,pe("{{{"),ut()];_t=class extends(Lg=L){constructor(e,r,n=[]){super(void 0,r,n,{});S(this,Yi);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let a=new ue(s,"arg-name",r,n,{});super.insertAt(a)}else if(i>1){let a=new qt(s,r,n);super.insertAt(a)}else{let a=new L(s,r,n);a.type="arg-default",a.setAttribute("stage",2),super.insertAt(a)}}}get type(){return"arg"}get default(){}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Ee(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),r){{let[n,i,...s]=this.childNodes;n.setAttribute("aIndex",e+3);let a=n.lint(e+3,r);if(i){let u=e+4+n.toString().length;i.setAttribute("aIndex",u);let b=i.lint(u,r);b.length>0&&Array.prototype.push.apply(a,b)}let l=["no-ignored","no-arg"],{lintConfig:p}=v,{computeEditInfo:g}=p,d=new W(this,e),f=l.map(u=>p.getSeverity(u,"arg"));if(f[0]&&s.length>0&&Array.prototype.push.apply(a,s.map(u=>{let b=j(u,d,l[0],"invisible-triple-braces",f[0]);return b.startIndex--,b.startCol--,g&&(b.suggestions=[O(b),Ge(b.startIndex,"{{!}}")]),b})),f[1]&&!this.getAttribute("include")){let u=F(this,d,l[1],"unexpected-argument",f[1]);g&&i&&(u.suggestions=[me(u,"expand",i.text())]),a.push(u)}let c=this.closest("ext");if(c){let u="arg-in-ext",b=p.getSeverity(u,c.name);b&&a.push(F(this,d,u,"argument-in-ext",b))}return a}}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Ki=B(Lg),Yi=new WeakSet,Eg=function(){},_t=P(Ki,0,"ArgToken",ja,_t),R(Ki,1,_t)});var za={};Z(za,{parseBraces:()=>sn});var Ng,qa,Zi,_a,Wa,Da,Ua,Ma,sn,ei=w(()=>{"use strict";ze();ae();Vi();Fa();Oa();Ng={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},qa=String.raw`\[(?!\[)`,Zi=String.raw`\n(?![=\0])`,_a=String.raw`|\{{2,}`,Wa=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Da=Be(o=>new RegExp(o,"gmu"));Ua=new RegExp(String.raw`\{\{((?:[^\n{}[]|${qa}|${Zi})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Zi})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${qa}|${Zi})*\}-`,"gu");Ma=o=>{let t=Ue(re(o));return Wa.has(t)?Wa.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},sn=(o,t,e)=>{var u,b,h,T,x;let r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,[,,,n]=t.parserFunction,i=[],s=[],a=(y,k,A,N)=>{k[k.length-1].push(ke(y.slice(A,N),s))},l;do l!==void 0&&(o=l),l=o.replace(Ua,(y,k,A)=>{if(k!==void 0||typeof A=="string")try{let{length:N}=e,E=(k!=null?k:A).split("|");return new ht(ke(E[0],s),E.slice(1).map($=>{let H=$.indexOf("=");return(H===-1?[$]:[$.slice(0,H),$.slice(H+1)]).map(q=>ke(q,s))}),t,e),`\0${N}${Ma(E[0])}`}catch(N){if(!(N instanceof SyntaxError)||N.message!=="Invalid template name")throw N}return s.push(ke(y,s)),`\0${s.length-1}`});while(l!==o);o=l;let p=o.lastIndexOf("}}")-o.length,g=p+o.length!==-1,d=Da(r+(g?_a:"")),f=d.exec(o),c;for(;f||c!==void 0&&c<=o.length&&((b=(u=i[i.length-1])==null?void 0:u[0])!=null&&b.startsWith("="));){if(f!=null&&f[1]){let[,{length:U}]=f;f[0]=f[0].slice(U),f.index+=U}let{0:y,index:k}=f!=null?f:{0:`
|
|
13
13
|
`,index:o.length},A=(h=i.pop())!=null?h:{},{0:N,index:E,parts:$,findEqual:H,pos:q}=A,K=y==="="&&H;if(y==="]]"||y==="}-")c=k+2;else if(y===`
|
|
14
|
-
`){c=k+1;let{pos:U,findEqual:M}=(T=i[i.length-1])!=null?T:{};if(U===void 0||M||re(o.slice(U,E))!==""){let
|
|
15
|
-
`)||(o=`${o.slice(0,E)}\0${e.length}h${o.slice(k)}`,c=E+4+String(e.length).length,new Je(
|
|
16
|
-
)`:""}(\s*)$`,"u")),Bg=o=>{if(o)o.startsWith("//")&&(o=`https:${o}`);else return o;return new URL(o).href};Va=[Q];Wt=class extends(jg=L){constructor(e,r,n,i,s){var t=(...$m)=>(super(...$m),S(this,ni),S(this,Ne,""),this);let a,l=Object.entries(i.img).map(([g,d])=>[g,d,Pg(g)]),p=l.find(([,g,d])=>(a=d.exec(e),a&&(a.length!==4||
|
|
17
|
-
`))!=null?i:[]){let a=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!a){super.insertAt(s.trim()?new Dt(s,r,n):s);continue}let[,l,p]=a;I(this,ln,tl).call(this,l)?super.insertAt(new Ke("gallery",l,p,r,n)):super.insertAt(new Dt(s,r,n))}}get widths(){}get heights(){}lint(e=this.getAbsoluteIndex(),r){{let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[],a="no-ignored",{lintConfig:l}=v,p=["Image","NoImage","Comment"].map(g=>l.getSeverity(a,`gallery${g}`));for(let g=0;g<this.length;g++){let d=this.childNodes[g],f=d.toString(),{length:c}=f,u=f.trim(),{type:
|
|
18
|
-
`),i=new Set(e.protocol.split("|")),s=!0,a=!1;for(let l of n){let p=l.trim();if(!(a||!p||p.startsWith("#"))){if(s){let g=l.indexOf("|"),d=g===-1?l:l.slice(0,g),f=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(f.valid&&f.ns===6){let c=new Ke("imagemap",d,g===-1?void 0:l.slice(g+1),e,r);super.insertAt(c),s=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){let g=l.indexOf("["),d=l.slice(g),f=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(f){if(this.normalizeTitle(f[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new pn(l.slice(0,g),f.slice(1),d.slice(d.indexOf("]]")+2),e,r));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let c=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(c){super.insertAt(new pn(l.slice(0,g),c.slice(1),d.slice(d.indexOf("]")+1),e,r));continue}}}}super.insertAt(new Dt(l,e,r))}}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=new W(this,t),{childNodes:i,image:s}=this,a="invalid-imagemap",{lintConfig:l}=v,p=l.getSeverity(a,s?"link":"image");return p&&(s?Array.prototype.push.apply(r,i.filter(g=>{let d=g.toString().trim();return g.is("noinclude")&&d&&!d.startsWith("#")}).map(g=>{let d=j(g,n,a,"invalid-imagemap-link",p);return l.computeEditInfo&&(d.suggestions=[O(d,-1),me(d,"comment","# ")]),d})):r.push(F(this,n,a,"imagemap-without-image",p))),r}}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}}});var ll,ms,Gg,et,hs=w(()=>{"use strict";z();at();qe();D();pt();ll=[ve(!1),pe("<!--")];et=class extends(Gg=le){constructor(e,r,n,i){super(e,n,i);ce(this,"closed");this.closed=r}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){{if(this.closed)return[];let r="unclosed-comment",{lintConfig:n}=v,i=n.getSeverity(r);if(!i)return[];let s=F(this,{start:e},r,"unclosed-comment",i);return n.computeEditInfo&&(s.suggestions=[Le(s.endIndex,"-->")]),[s]}}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){}};ms=B(Gg),et=P(ms,0,"CommentToken",ll,et),R(ms,1,et)});var dl={};Z(dl,{CommentedToken:()=>bs});var bs,gl=w(()=>{"use strict";G();hs();bs=class extends L{get type(){return"ext-inner"}constructor(t,e,r=[]){if(super(void 0,e,r,{AstText:":",CommentToken:":"}),t){let n=t.indexOf("<!--"),i=n!==-1&&t.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(t.slice(s,n)),this.insertAt(new et(t.slice(n+4,i),!0,e,r)),s=i+3,n=t.indexOf("<!--",s),i=n!==-1&&t.indexOf("-->",n+4);s<t.length&&this.insertAt(t.slice(s))}}lint(t=this.getAbsoluteIndex()){return super.lint(t,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}});var ul={};Z(ul,{CategorytreeToken:()=>br});var pl,xs,Hg,br,fl=w(()=>{"use strict";z();qe();D();lr();pl=[pe("")];br=class extends(Hg=ye){get type(){return"ext-inner"}constructor(t,e,r,n=[]){super(t,e,r,n),this.setAttribute("bracket",!1)}getTitle(){let t=this.firstChild.toString().trim(),e={halfParsed:!0},r=this.normalizeTitle(t,14,e);return r.valid&&r.ns===14?r:this.normalizeTitle(`Category:${t}`,0,e)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",r=v.lintConfig.getSeverity(e,"categorytree");if(r){let{link:n}=this;if(!n.valid||n.ns!==14)return[F(this,{start:t},e,"invalid-category",r)]}return super.lint(t,!1)}}};xs=B(Hg),br=P(xs,0,"CategorytreeToken",pl,br),R(xs,1,br)});var cl={};Z(cl,{NowikiToken:()=>ys});var Vg,Qg,un,Ts,ys,ml=w(()=>{"use strict";ze();Or();z();oe();D();pt();Vg=Be(o=>new RegExp(String.raw`<\s*(?:/\s*)${o==="nowiki"?"":"?"}(${o})\b`,"giu")),Qg=new Set(["languages","section","templatestyles"]),ys=class extends le{constructor(){super(...arguments);S(this,un)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex()){{let{name:r,innerText:n}=this,{lintConfig:i}=v,s="void-ext",a=i.getSeverity(s,r);if(a&&I(this,un,Ts).call(this)){let l=F(this,{start:e},s,v.msg("nothing-in",r),a);return i.computeEditInfo&&(l.suggestions=[O(l)]),[l]}{s="invalid-json";let l=i.getSeverity(s),p=i.getSeverity(s,"duplicate");if(ho.includes(r)&&(l||p))return(r==="templatedata"?So:Co)(n).map(({message:g,from:d,to:f=d,line:c,endLine:u=c,column:x,endColumn:h=x,severity:T})=>{if(a=T==="warning"?p:l,!a)return!1;let b=new W(this,e);return{rule:s,message:g,severity:a,startIndex:e+d,endIndex:e+f,startLine:b.top+c-1,endLine:b.top+u-1,startCol:(c>1?0:b.left)+x-1,endCol:(u>1?0:b.left)+h-1}}).filter(g=>g!==!1)}return super.lint(e,Vg(r))}}getAttribute(e){return e==="invalid"?I(this,un,Ts).call(this):super.getAttribute(e)}};un=new WeakSet,Ts=function(){let{name:e,firstChild:{data:r}}=this;return Qg.has(e)&&!!r}});var hl,ks,Jg,Xe,ts=w(()=>{"use strict";z();oe();D();Hn();G();Gn();Jn();hl=[dr()];Xe=class extends(Jg=Fe){get type(){return"ext"}constructor(t,e,r,n,i=v.getConfig(),s=!1,a=[]){let l=t.toLowerCase(),p=new ct(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),g=ge(V({},i),{ext:i.ext.filter(f=>f!==l),excludes:[...i.excludes],inExt:!0}),d;switch(l){case"pre":if(p.getAttr("format")!=="wikitext"){let{PreToken:f}=(Ca(),J(Sa));d=new f(r,g,a);break}case"indicator":case"poem":case"ref":case"option":case"combooption":case"tab":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"?g.excludes.push("heading"):l==="tab"&&(g.ext=g.ext.filter(f=>f!=="tabs")),d=new L(r,g,a);break;case"dynamicpagelist":{let{ParamTagToken:f}=(Ui(),J(Ea));d=new f(l,s,r,g,a);break}case"inputbox":{let{InputboxToken:f}=(Ha(),J(Ga));d=new f(l,s,r,g,a);break}case"references":{let{NestedToken:f}=(ri(),J(ti));g.excludes.push("heading"),d=new f(r,s,["ref"],g,a);break}case"choose":{let{NestedToken:f}=(ri(),J(ti));d=new f(r,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,a);break}case"combobox":{let{NestedToken:f}=(ri(),J(ti));d=new f(r,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,a);break}case"gallery":{let{GalleryToken:f}=(nl(),J(rl));d=new f(r,g,a);break}case"imagemap":{let{ImagemapToken:f}=(al(),J(ol));d=new f(r,g,a);break}case"hiero":{let{CommentedToken:f}=(gl(),J(dl));d=new f(r,g,a);break}case"categorytree":{let{CategorytreeToken:f}=(fl(),J(ul));d=new f(r,void 0,g,a);break}default:{let{NowikiToken:f}=(ml(),J(cl));d=new f(r,g,a)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(t,p,d,n,i,a),this.seal("closed",!0)}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),{lintConfig:n}=v,i=new W(this,t);if(this.name!=="nowiki"){let s=this.inHtmlAttrs(),a="parsing-order",l=s&&n.getSeverity(a,s===2?"ext":"templateInTable");l&&r.push(F(this,i,a,"ext-in-html",l))}if(this.name==="ref"){let s="var-anchor",a=n.getSeverity(s,"ref");a&&this.closest("heading-title")&&r.push(F(this,i,s,"variable-anchor",a)),s="nested-link",a=n.getSeverity(s,"ref"),a&&this.closest("link-text,ext-link-text")&&r.push(F(this,i,s,"ref-in-link",a))}return r}}};ks=B(Jg),Xe=P(ks,0,"ExtToken",hl,Xe),R(ks,1,Xe)});var bt,Ut,tt,xr,vs=w(()=>{"use strict";z();Se();G();D();xr=class extends L{constructor(e,r,n,i,s){super(void 0,i,s);S(this,bt);S(this,Ut);S(this,tt);this.insertAt(r),C(this,bt,n),C(this,Ut,e)}get closing(){return m(this,bt)}toString(e){return`<${m(this,bt)?"/":""}${m(this,Ut)}${super.toString(e)}${this.selfClosing?"/":""}>`}text(e=""){let{closing:r}=this;return`<${r&&!e?"/":""}${m(this,Ut)}${r?"":super.text()}${e}>`}getAttribute(e){return e==="padding"?m(this,Ut).length+(m(this,bt)?2:1):super.getAttribute(e)}findMatchingTag(){return je(m(this,tt),()=>{let{type:e,name:r,parentNode:n,closing:i,selfClosing:s}=this,a=!1,l=!1;if(e==="html"){let[,u,x]=this.getAttribute("config").html;a=x.includes(r),l=u.includes(r)}if(a||l&&s)return this;if(!n)return;let{childNodes:p}=n,g=p.indexOf(this),d=i?p.slice(0,g).reverse():p.slice(g+1),f=[this],{rev:c}=ne;for(let u of d)if(!(!u.is(e)||e==="html"&&(u.name!==r||l&&u.selfClosing)))if(m(u,bt)===i){if(e==="tvar")return;f.push(u)}else{let x=f.pop();if(x===this)return u;v.viewOnly&&(C(x,tt,[c,u]),C(u,tt,[c,x]))}if(v.viewOnly)for(let u of f)C(u,tt,[c,void 0])},e=>{C(this,tt,e),e[1]&&e[1]!==this&&C(e[1],tt,[ne.rev,this])})}print(){}json(e,r,n=this.getAbsoluteIndex()){}};bt=new WeakMap,Ut=new WeakMap,tt=new WeakMap});var bl,As,Xg,_e,xl=w(()=>{"use strict";at();xe();vs();lt();bl=[ve(),Q];_e=class extends(Xg=xr){get type(){return"tvar"}constructor(t,e,r,n,i){let s=new he(e,"tvar-name",n,i);super(t,s,r,n,i)}};As=B(Xg),_e=P(As,0,"TvarToken",bl,_e),R(As,1,_e)});var yl={};Z(yl,{TranslateToken:()=>Ss});var Cs,Kg,Ss,Tl=w(()=>{"use strict";G();Gn();lt();xl();Ss=class extends Fe{constructor(e,r,n,i=[]){let s=new he(e,"translate-attr",n,i);r=r==null?void 0:r.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(l,p,g)=>(new _e("tvar",p,!1,n,i),new _e("","",!0,n,i),`\0${i.length-2}n${g}\0${i.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(l,p,g,d,f,c,u)=>(new _e(p,g,!1,n,i),new _e(c,u,!0,n,i),`\0${i.length-2}n${f}\0${i.length}n`));let a=new L(r,n,i);a.type="translate-inner";super("translate",s,a,"translate",n,i);S(this,Cs);this.seal("closed",!0)}get type(){return"translate"}get selfClosing(){return!1}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){}};Cs=new WeakSet,Kg=function(){}});var Al={};Z(Al,{parseCommentAndExt:()=>Pt});var vl,Yg,ws,Zg,kl,Pt,Zr=w(()=>{"use strict";ze();ae();ra();wt();sa();ts();hs();vl="<onlyinclude>",Yg="</onlyinclude>",{length:ws}=vl,Zg=[!1,!0].map(o=>{let t=o?"includeonly":"(?:no|only)include",e=o?"noinclude":"includeonly";return Be(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${r})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),kl=o=>{let t=o.indexOf(vl);return{i:t,j:o.indexOf(Yg,t+ws)}},Pt=(o,t,e,r)=>{if(r){let{i:l,j:p}=kl(o);if(l!==-1&&p!==-1){let g="",d=f=>{new de(f,t,e),g+=`\0${e.length-1}n`};for(;l!==-1&&p!==-1;){let f=`\0${e.length}g`;new Nt(o.slice(l+ws,p),t,e),l>0&&d(o.slice(0,l)),g+=f,o=o.slice(p+ws+1),{i:l,j:p}=kl(o)}return o&&d(o),g}}let{ext:n}=t,i=n,s=t;if(n.includes("translate")){let{TranslateToken:l}=(Tl(),J(yl)),p=[];i=n.filter(g=>g!=="translate"&&g!=="tvar"),s=ge(V({},t),{ext:i}),o=o.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,g=>(p.push(g),`\0${p.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(g,d,f)=>{let c=e.length;return new l(d,f&&ke(f,p),s,e),`\0${c}g`}),o=ke(o,p)}let a=Zg[r?1:0](i.join("|"));return a.lastIndex=0,a.test(o)?o.replace(a,(l,p,g,d,f,c,u,x,h)=>{let T=e.length,b="n";if(p)b="e",new Xe(p,g,d,f,s,c,e);else if(l.startsWith("<!--")){b="c";let y=l.endsWith("-->");new et(ke(l,e,1).slice(4,y?-3:void 0),y,t,e)}else c?new It(c,u&&ke(u,e,1),x&&ke(x,e,1),h,t,e):new de(l,t,e,!0);return`\0${T}${b}`}):o}});var ep,tp,rp,Sl,fn,Es,np,zt,Cl=w(()=>{"use strict";z();oe();Hn();D();vs();ep=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),tp=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"]),rp=new Set(["strike","big","center","font","tt"]);Sl=[dr()];zt=class extends(np=xr){constructor(e,r,n,i,s,a){super(e,r,n,s,a);S(this,fn);this.setAttribute("name",e.toLowerCase()),C(this,fn,i)}get type(){return"html"}get selfClosing(){return m(this,fn)}text(){let{closing:e,selfClosing:r,name:n}=this,[,,i]=this.getAttribute("config").html;return i.includes(n)?e&&n!=="br"?"":super.text("/"):super.text(r&&!e?"/":"")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{name:i,parentNode:s,closing:a,selfClosing:l}=this,p=new W(this,e),{lintConfig:g}=v,{computeEditInfo:d,fix:f}=g,c=this.inTableAttrs(),u="h1",x=g.getSeverity(u,"html");if(x&&i==="h1"&&!a){let A=F(this,p,u,"<h1>",x);d&&(A.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}]),n.push(A)}if(u="parsing-order",x=c&&g.getSeverity(u,c===2?"html":"templateInTable"),x){let A=F(this,p,u,"html-in-table",x);d&&c===2&&(A.suggestions=[O(A)]),n.push(A)}if(u="obsolete-tag",x=g.getSeverity(u,i),x&&rp.has(i)&&n.push(F(this,p,u,"obsolete-tag",x)),u="bold-header",x=g.getSeverity(u,i),x&&(i==="b"||i==="strong")&&this.isInside("heading-title")){let A=F(this,p,u,"bold-in-header",x);d&&(A.suggestions=[O(A)]),n.push(A)}let[,h,T]=this.getAttribute("config").html,b=T.includes(i),y=h.includes(i),k=!b&&!y;if(u="unmatched-tag",a&&(l||b)||l&&k){if(x=g.getSeverity(u,a?"both":"selfClosing"),x){let A=F(this,p,u,a?"closing-and-self-closing":"invalid-self-closing",x);if(d||f){let N=Bn(e),E={desc:v.msg("no-self-closing"),range:[A.endIndex-2,A.endIndex-1],text:""};y?d&&(A.suggestions=[N,E]):a?A.fix=b?N:E:d&&(A.suggestions=[E,Le(A.endIndex,`></${i}>`,-2)])}n.push(A)}}else if(!this.findMatchingTag()){let A=F(this,p,u,a?"unmatched-closing":"unclosed-tag"),N=this.closest("magic-word");if(N&&ep.has(N.name))x=g.getSeverity(u,"conditional");else if(a)x=g.getSeverity(u,"closing"),A.suggestions=[O(A)];else{x=g.getSeverity(u,"opening");let E=s==null?void 0:s.childNodes;tp.has(i)&&(E!=null&&E.slice(0,E.indexOf(this)).some($=>$.is("html")&&$.name===i&&!$.findMatchingTag())&&(A.suggestions=[Le(e+1,"/")]),this.isInside("heading-title")&&(A.rule="format-leakage",x=g.getSeverity("format-leakage",i)))}x&&(A.severity=x,n.push(A))}return n}}getAttribute(e){return e==="invalid"?this.inTableAttrs()===2:super.getAttribute(e)}json(e,r,n=this.getAbsoluteIndex()){}};Es=B(np),fn=new WeakMap,zt=P(Es,0,"HtmlToken",Sl,zt),R(Es,1,zt)});var wl={};Z(wl,{parseHtml:()=>sp});var ip,sp,El=w(()=>{"use strict";Jn();Cl();ip=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,sp=(o,t,e)=>{var s;let{html:r}=t;(s=t.htmlElements)!=null||(t.htmlElements=new Set([...r[0],...r[1],...r[2]]));let n=o.split("<"),i=n.shift();for(let a of n){let l=ip.exec(a),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!t.htmlElements.has(g)){i+=`<${a}`;continue}let[,d,,f="",c,u]=l,{length:x}=e,h=new ct(f,"html-attrs",g,t,e),T=h.hasAttr("itemprop");if(g==="meta"&&!(T&&h.hasAttr("content"))||g==="link"&&!(T&&h.hasAttr("href"))){i+=`<${a}`,e.length=x;continue}i+=`\0${e.length}x${u}`,new zt(p,h,d==="/",c==="/>",t,e)}return i}});var Ll,Ls,op,rt,Ns=w(()=>{"use strict";Hn();G();lt();Jn();Ll=[dr(1)];rt=class extends(op=L){constructor(t,e,r,n,i,s=[],a){super(void 0,i,s,a),this.append(new he(e,"table-syntax",i,s),new ct(n,"table-attrs",r,i,s))}escape(){}};Ls=B(op),rt=P(Ls,0,"TableBaseToken",Ll,rt),R(Ls,1,rt)});var Nl,$l,Re,$s,yr,cn,Gt,Is=w(()=>{"use strict";z();oe();Wn();D();G();Ns();Gt=class extends($l=rt,Nl=[rr(!1)],$l){constructor(e,r,n,i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(r!=null?r:""),a=s?r.slice(0,s.index):"";/\[\[|-\{/u.test(a)&&(s=null,a="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",a,n,i);R($s,5,this);S(this,yr);S(this,Re,"");s&&([$n(this,Re)._]=s);let l=new L(r==null?void 0:r.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+m(this,Re).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 I(this,yr,cn).call(this).subtype}afterBuild(){m(this,Re).includes("\0")&&C(this,Re,this.buildFromStr(m(this,Re),0)),super.afterBuild()}toString(e){let[r,n,i]=this.childNodes;return r.toString(e)+n.toString(e)+m(this,Re)+i.toString(e)}text(){let[e,r,n]=this.childNodes;return e.text()+r.text()+m(this,Re)+n.text()}getGaps(e){return e===1?m(this,Re).length:0}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e+this.getRelativeIndex(this.length-1)),s="pipe-like",{lintConfig:a}=v,{computeEditInfo:l,fix:p}=a,g=["td","double"].map(d=>a.getSeverity(s,d));for(let d of this.lastChild.childNodes)if(d.type==="text"){let{data:f}=d;if(f.includes("|")){let c=f.includes("||"),u=g[c?1:0];if(u){let x=j(d,i,s,"pipe-in-table",u);if(l||p)if(c){let h={caption:"|+",td:"|",th:"!"}[this.subtype];x.fix=me(x,"newline",f.replace(/\|\|/gu,`
|
|
19
|
-
${h}`))}else l&&(
|
|
20
|
-
`)}getAttr(e){{let r=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(r)||1:r}}escape(){}print(){}json(e,r,n=this.getAbsoluteIndex()){}}
|
|
21
|
-
|}`,r){ne.run(()=>{let n=new he(r?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(n)})}getLayout(e){{let r=this.getAllRows(),{length:n}=r,i=
|
|
14
|
+
`){c=k+1;let{pos:U,findEqual:M}=(T=i[i.length-1])!=null?T:{};if(U===void 0||M||re(o.slice(U,E))!==""){let xe=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(o.slice(E,k));xe&&(xe[2]=ke(xe[2],s),xe[2].includes(`
|
|
15
|
+
`)||(o=`${o.slice(0,E)}\0${e.length}h${o.slice(k)}`,c=E+4+String(e.length).length,new Je(xe[1].length,xe.slice(2),t,e)))}}else if(y==="|"||K)c=k+1,a(o,$,q,k),y==="|"&&$.push([]),A.pos=c,A.findEqual=y==="|",i.push(A);else if(y.startsWith("}}")){let U=y.slice(0,Math.min(N.length,3)),M=N.length-U.length,{length:xe}=e;c=k+U.length,a(o,$,q,k);let Kt=!1,bt="t";if(U.length===3){let Y=$.map($r=>$r.join("=")),yt=Y.length>1&&re(Y[1]).trim();new _t(Y,t,e),yt&&yt.endsWith(":")&&n.includes(yt.slice(0,-1).toLowerCase())&&(bt="s")}else try{new ht($[0][0],$.slice(1),t,e),bt=Ma($[0][0])}catch(Y){if(!(Y instanceof SyntaxError&&Y.message==="Invalid template name"))throw Y;Kt=!0}Kt||(o=`${o.slice(0,E+M)}\0${xe}${bt}${o.slice(c)}`,c=E+M+3+String(xe).length,M>1?i.push({0:N.slice(0,M),index:E,pos:E+M,parts:[[]]}):M===1&&o[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else c=k+y.length,y.startsWith("{")&&(f.pos=c,f.parts=[[]]),i.push(..."0"in A?[A]:[],f);let _=i[i.length-1];if(g&&p+o.length<c)for(g=!1;(x=_==null?void 0:_[0])!=null&&x.startsWith("{");)i.pop(),_=i[i.length-1];d=Da(r+(g?_a:"")+(_?`|${Ng[_[0][0]]}${_.findEqual?"|=":""}`:"")),d.lastIndex=c,f=d.exec(o)}return ke(o,s)}});var Ga={};Z(Ga,{InputboxToken:()=>es});var es,Ha=w(()=>{"use strict";Zr();ei();zi();es=class extends Yr{constructor(t,e,r,n,i=[]){let s=Symbol("InputboxToken"),a=n.excludes.includes("heading")?n:ge(V({},n),{excludes:[...n.excludes,"heading"]}),{length:l}=i;i.push(s),r&&(r=Pt(r,a,i,e)),r&&(r=sn(r,a,i)),i.splice(l,1),super(t,e,r,a,i,{})}}});var ti={};Z(ti,{NestedToken:()=>ts});var $g,Ig,on,cr,ts,ri=w(()=>{"use strict";z();oe();Zr();ei();D();G();rs();wt();$g=new Set(["comment","include","arg","template","magic-word"]),Ig=[!1,!0].map(o=>{let t=o?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${t}(?:\s[^>]*)?/?>|</${t}\s*>)$`,"iu")}),ts=class extends L{constructor(e,r,n,i,s=[]){if(typeof r=="boolean"){let a=Symbol("NestedToken"),{length:l}=s;s.push(a),e&&(e=Pt(e,i,s,r)),e&&(e=sn(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(r,(a,l,p,g,d)=>{let f=`\0${s.length+1}e`;return new Xe(l,p,g,d,i,!1,s),f}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(a,l,p)=>(new de(p,i,s),`${l}\0${s.length}n`)));super(e,i,s);S(this,on);S(this,cr);C(this,on,[...n]),C(this,cr,r)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="no-ignored",{lintConfig:s}=v,a=s.getSeverity(i,this.name);if(!a)return n;let l=new W(this,e),p=typeof m(this,cr)=="boolean"?Ig[m(this,cr)?1:0]:/^<!--[\s\S]*-->$/u;return[...n,...this.childNodes.filter(g=>{let{type:d,name:f}=g;if(d==="ext")return!m(this,on).includes(f);if($g.has(d))return!1;let c=g.toString().trim();return c&&!p.test(c)}).map(g=>{let d=j(g,l,i,v.msg("invalid-content",this.name),a);return s.computeEditInfo&&(d.suggestions=[O(d),jn(d,g.toString())]),d})]}}};on=new WeakMap,cr=new WeakMap});function ns(o,t,e,r,n){t=re(t).trim();let i=t.replace(o==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(o){case"width":return!i&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{let s=r==="gallery-image";if(i){if(Fg(e.protocol).test(i))return Rg(e.protocol).test(i)?t:s;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return t;let a=v.normalizeTitle(i,0,!1,e,{halfParsed:n,decode:!0,selfLink:!0,page:""});return a.valid?a:s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var Fg,Rg,Pg,Bg,Va,Ne,ni,Qa,is,jg,Wt,Ja=w(()=>{"use strict";ze();ae();z();Or();Se();be();D();G();Fg=Be(o=>new RegExp(String.raw`^(?:${o}|//|\0\d+m\x7F)`,"iu")),Rg=Be(o=>new RegExp(String.raw`^(?:(?:${o}|//)${De}|\0\d+m\x7F)${Me}$`,"iu")),Pg=Be(o=>new RegExp(String.raw`^(\s*(?!\s))${o.replace("$1","(.*)")}${o.endsWith("$1")?`(?=$|
|
|
16
|
+
)`:""}(\s*)$`,"u")),Bg=o=>{if(o)o.startsWith("//")&&(o=`https:${o}`);else return o;return new URL(o).href};Va=[Q];Wt=class extends(jg=L){constructor(e,r,n,i,s){var t=(...$m)=>(super(...$m),S(this,ni),S(this,Ne,""),this);let a,l=Object.entries(i.img).map(([g,d])=>[g,d,Pg(g)]),p=l.find(([,g,d])=>(a=d.exec(e),a&&(a.length!==4||ns(g,a[2],i,g==="link"?n:r,!0)!==!1)));if(p&&a){a.length===3?(t(void 0,i,s),C(this,Ne,e)):(t(a[2],i,s,{}),C(this,Ne,a[1]+p[0]+a[3])),this.setAttribute("name",p[1]),p[1]==="alt"&&this.setAttribute("stage",10);return}t(e,i.excludes.includes("list")?i:ge(V({},i),{excludes:[...i.excludes,"list"]}),s),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;let e=super.text().trim();return ne.run(()=>{var s;let r=this.getAttribute("config"),n=new L(e,r);if(n.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(n.firstChild.toString()))return e;let i=ns("link",e,r,(s=this.parentNode)==null?void 0:s.type);return i===!0?void 0:i},v)}}afterBuild(){var e;(e=this.parentNode)!=null&&e.is("gallery-image")&&!ho.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return m(this,Ne)?m(this,Ne).replace("$1",super.toString(e)):super.toString(e)}text(){return m(this,Ne)?m(this,Ne).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(e){return e==="invalid"?this.name==="invalid":e==="padding"?Math.max(0,m(this,Ne).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{lintConfig:s}=v,{computeEditInfo:a,fix:l}=s,{link:p,name:g}=this,d=g==="width"&&this.getValue();if(g==="invalid"||d&&d.endsWith("px")){let f="invalid-gallery",c=s.getSeverity(f,"parameter");if(c){let u=F(this,{start:e},f,"invalid-image-parameter",c);(a||l)&&(u.fix=d?O(u,0,d):O(u,-1)),i.push(u)}}else if(g==="link"){if(p===void 0){let f="invalid-gallery",c=s.getSeverity(f,"link");if(c){let u=F(this,{start:e},f,"invalid-gallery-link",c);if(a){let b=super.toString(),h=b.indexOf("|"),T=b.slice(0,h).trim();h!==-1&&!/[<{]/u.test(T)&&typeof ns("link",T,this.getAttribute("config"),(n=this.parentNode)==null?void 0:n.type)=="string"&&(u.suggestions=[ot(e+this.getRelativeIndex(0)+h)])}i.push(u)}}else if(typeof p=="string"){let f="invalid-url",c=s.getSeverity(f);if(c&&!this.querySelector("magic-word"))try{Bg(p)}catch(u){i.push(F(this,{start:e},f,"invalid-url",c))}}else if(p.encoded){let f="url-encoding",c=s.getSeverity(f,"file");if(c){let u=F(this,{start:e},f,"unnecessary-encoding",c);(a||l)&&(u.fix=Pn(u,this)),i.push(u)}}}else if(g==="manualthumb"){let f="invalid-gallery",c=s.getSeverity(f,"thumb");if(c&&!this.querySelector("arg,magic-word,template")){let{valid:u,ns:b,extension:h}=this.thumb;(!u||b!==6||!jr.has(h))&&i.push(F(this,{start:e},f,"invalid-thumb",c))}}return i}}getValue(){return this.name==="invalid"?this.text():I(this,ni,Qa).call(this)||super.text()}print(){}};is=B(jg),Ne=new WeakMap,ni=new WeakSet,Qa=function(){return m(this,Ne)&&!m(this,Ne).includes("$1")},Wt=P(is,0,"ImageParameterToken",Va,Wt),R(is,1,Wt)});var Xa,Og,qg,Ka,Ya,_g,Za,mr,ss=w(()=>{"use strict";z();Or();oe();D();lr();Ja();Xa=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Og=new Set(["arg"]),qg=new Set(["template","magic-word"]),Ka=new Set(["left","right","center","none"]),Ya=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),_g=o=>{if(o===void 0)return[];let t=/-\{|\}-|\|/gu,e=[],r=t.exec(o),n=0,i=0;for(;r;){let{0:s,index:a}=r;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(o.slice(i,a)),{lastIndex:i}=t),r=t.exec(o)}return e.push(o.slice(i)),e},Za=(o,t)=>o.filter(({childNodes:e})=>!e.some(r=>r.text().trim()&&t.has(r.type))),mr=class extends ye{get type(){return"file"}get extension(){}constructor(t,e,r,n=[],i="|",s){super(t,void 0,r,n,i);let{extension:a}=this.getTitle(!0,!0);this.safeAppend(_g(e).map(l=>new Wt(l,a,s,r,n)))}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i=Za(this.getAllArgs(),Og),s=[...new Set(i.map(({name:E})=>E))],a=s.filter(E=>Xa.has(E)),l=s.filter(E=>Ka.has(E)),p=s.filter(E=>Ya.has(E)),[g]=a,d=g==="framed"||g==="manualthumb",f=new W(this,t),{lintConfig:c}=v,{computeEditInfo:u,fix:b}=c,{ns:h,extension:T}=this.getAttribute("title"),{firstChild:x}=this,y="nested-link",k=c.getSeverity(y,"file");if(k&&jr.has(T)&&this.isInside("ext-link-text")&&((r=this.getValue("link"))==null?void 0:r.trim())!==""){let E=F(this,f,y,"link-in-extlink",k);if(u||b){let $=this.getArg("link");if($){let H=t+$.getRelativeIndex();E.fix={desc:v.msg("delink"),range:[H,H+$.toString().length],text:"link="}}else E.fix=tr(E.endIndex-2,"delink","|link=")}n.push(E)}if(y="invalid-gallery",k=c.getSeverity(y,"extension"),k&&h===6&&!T&&!x.querySelector("arg,magic-word,template")&&n.push(F(this,f,y,"missing-extension",k)),k=c.getSeverity(y,"parameter"),k&&d)for(let E of i.filter(({name:$})=>$==="width")){let $=j(E,f,y,"invalid-image-parameter",k);(u||b)&&($.fix=O($,-1)),n.push($)}if(y="blank-alt",k=c.getSeverity(y),k){let E=this.getArg("alt");if((E==null?void 0:E.getValue())===""){let $=j(E,f,y,"blank-alt",k);(u||b)&&($.fix=O($,-1)),n.push($)}}if(i.length===s.length&&a.length<2&&l.length<2&&p.length<2)return n;y="no-duplicate";let A=["unknownImageParameter","imageParameter"].map(E=>c.getSeverity(y,E)),N=(E,$,H,q=!0)=>E.map(K=>{if(k=A[Number(typeof q=="function"?q(K):q)],!k)return!1;let _=j(K,f,y,v.msg(`${$}-image-parameter`,H),k);return u&&(_.suggestions=[O(_,-1)]),_}).filter(K=>K!==!1);for(let E of s){if(E==="invalid"||E==="width"&&d)continue;let $=E==="caption",H=i.filter(({name:q})=>q===E);if($&&(H=[...H.slice(0,-1).filter(q=>q.text()),...H.slice(-1)]),H.length>1){let q=!$||!T||jr.has(T);if($&&q){let K=Za(H,qg);q=K.length>1&&(_=>K.includes(_))}Array.prototype.push.apply(n,N(H,"duplicate",E,q))}}return a.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Xa.has(E)),"conflicting","frame")),l.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Ka.has(E)),"conflicting","horizontal-alignment")),p.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Ya.has(E)),"conflicting","vertical-alignment")),n}}getAllArgs(){return this.childNodes.slice(1)}getArgs(t){return this.getAllArgs().filter(({name:e})=>t===e)}getArg(t){{let e=this.getArgs(t);return e[t==="manualthumb"?0:e.length-1]}}getValue(t){var e;return(e=this.getArg(t))==null?void 0:e.getValue()}json(t,e,r=this.getAbsoluteIndex()){}}});var el,an,as,os,Wg,Ke,ls=w(()=>{"use strict";z();qe();D();G();ss();el=[pe("")];Ke=class extends(Wg=mr){constructor(e,r,n,i,s=[]){let a;if(n!==void 0){let{length:p}=s;a=new L(n,i,s);for(let g=0;g<10;g++)a.parseOnce();s.splice(p,1)}let l=`${e}-image`;super(r,a==null?void 0:a.firstChild.toString(),i,s,void 0,l);S(this,an);ce(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=l,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let r=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),r?0:6,{halfParsed:!0,temporary:e,decode:!r,page:""})}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="invalid-gallery",{lintConfig:s}=v,a=s.getSeverity(i,"image");if(a&&I(this,an,as).call(this)){let l=F(this,{start:e},i,"invalid-gallery",a);s.computeEditInfo&&(l.suggestions=[tr(e,"prefix","File:")]),n.push(l)}return n}}getAttribute(e){return e==="invalid"?I(this,an,as).call(this):super.getAttribute(e)}};os=B(Wg),an=new WeakSet,as=function(){return this.getAttribute("title").ns!==6},Ke=P(os,0,"GalleryImageToken",el,Ke),R(os,1,Ke)});var Dt,ds=w(()=>{"use strict";wt();Dt=class extends de{}});var rl={};Z(rl,{GalleryToken:()=>gs});var ln,tl,Dg,gs,nl=w(()=>{"use strict";z();D();Xn();ls();ds();gs=class extends mt{constructor(e,r,n=[]){var i;super(void 0,r,n,{});S(this,ln);for(let s of(i=e==null?void 0:e.split(`
|
|
17
|
+
`))!=null?i:[]){let a=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!a){super.insertAt(s.trim()?new Dt(s,r,n):s);continue}let[,l,p]=a;I(this,ln,tl).call(this,l)?super.insertAt(new Ke("gallery",l,p,r,n)):super.insertAt(new Dt(s,r,n))}}get widths(){}get heights(){}lint(e=this.getAbsoluteIndex(),r){{let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[],a="no-ignored",{lintConfig:l}=v,p=["Image","NoImage","Comment"].map(g=>l.getSeverity(a,`gallery${g}`));for(let g=0;g<this.length;g++){let d=this.childNodes[g],f=d.toString(),{length:c}=f,u=f.trim(),{type:b}=d,h=n+g,T=g?0:i;if(d.setAttribute("aIndex",e),b==="noinclude"&&u&&!/^<!--.*-->$/u.test(u)){let[x]=p;if(u.startsWith("|")?[,x]=p:(u.startsWith("<!--")||u.endsWith("-->"))&&([,,x]=p),x){let y=e+c,k={rule:a,message:v.msg("invalid-content","gallery"),severity:x,startIndex:e,endIndex:y,startLine:h,endLine:h,startCol:T,endCol:T+c};l.computeEditInfo&&(k.suggestions=[O(k),jn(k,f)]),s.push(k)}}else if(b!=="noinclude"&&b!=="text"){let x=d.lint(e,r);x.length>0&&Array.prototype.push.apply(s,x)}e+=c+1}return s}}json(e,r,n=this.getAbsoluteIndex()){}};ln=new WeakSet,tl=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},Dg=function(e){}});var hr,ps=w(()=>{"use strict";ze();z();D();lr();hr=class extends ye{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():St(this.firstChild.text().replace(/^\s*:?/u,""))}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n="nested-link",{lintConfig:i}=v,s=i.getSeverity(n);if(s&&this.isInside("ext-link-text")){let a=F(this,{start:t},n,"link-in-extlink",s);(i.computeEditInfo||i.fix)&&(a.fix=me(a,"delink",this.innerText)),r.push(a)}return r}}}});var Mg,Ug,dn,gn,us,Ye,ii=w(()=>{"use strict";z();ae();oe();D();G();Mg=String.raw`(?:[${Ie}\t]| |�*160;|&#[xX]0*[aA]0;)`,Ug=new RegExp(`${Mg}+`,"gu"),Ye=class extends L{constructor(e,r="free-ext-link",n=v.getConfig(),i){super(e,n,i,{});S(this,gn);S(this,dn);C(this,dn,r)}get type(){return m(this,dn)}get innerText(){let e=new Map([["!","|"],["=","="]]),r=Ee(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"&&(r=r.replace(Ug," ")),r}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:co(e).replace(/\n/gu,"%0A")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e),{lintConfig:s}=v,{type:a,childNodes:l}=this;if(a==="magic-link"){let f="invalid-isbn",c=s.getSeverity(f);return c&&I(this,gn,us).call(this)&&n.push(F(this,i,f,"invalid-isbn",c)),n}let p="invalid-url",g=s.getSeverity(p);if(g&&!this.querySelector("magic-word"))try{this.getUrl()}catch(f){n.push(F(this,i,p,"invalid-url",g))}let d=a==="ext-link-url";if(p="unterminated-url",g=s.getSeverity(p,d?"pipe":"punctuation"),g){let f=d?/\|/u:/[,;。:!?()]+/u,c=l.find(u=>u.type==="text"&&f.test(u.data));if(c){let{data:u}=c,b=j(c,i,p,v.msg("in-url",d?'"|"':"full-width-punctuation"),g);if(s.computeEditInfo){let{index:h,0:T}=f.exec(u),x=b.startIndex+h;b.suggestions=d?[ot(x,1)]:[ot(x),{desc:v.msg("encode"),range:[x,x+T.length],text:encodeURI(T)}]}n.push(b)}}return n}}getUrl(e){this.lspError("MagicLinkToken.getUrl")}getAttribute(e){return e==="invalid"?I(this,gn,us).call(this):super.getAttribute(e)}};dn=new WeakMap,gn=new WeakSet,us=function(){if(this.type==="magic-link"){let{link:e}=this;if(e.startsWith("ISBN")){let r=[...e.slice(5)].map(n=>n==="X"?10:Number(n));return r.length===10?r.reduce((n,i,s)=>n+i*(10-s),0)%11!==0:r.length===13&&(r[12]===10||r.reduce((n,i,s)=>n+i*(s%2?3:1),0)%10!==0)}}return!1}});var il,Mt,fs,zg,Ze,cs=w(()=>{"use strict";z();qe();D();G();ii();il=[pe("[")];Ze=class extends(zg=L){constructor(e,r="",n="",i,s=[]){super(void 0,i,s,{});S(this,Mt);let a=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Ye(e,"ext-link-url",i,s);if(this.insertAt(a),C(this,Mt,r),n){let l=new L(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)}${m(this,Mt)}]`:`[${super.toString(e,m(this,Mt))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return m(this,Mt).length}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="var-anchor",s=v.lintConfig.getSeverity(i,"extLink");return s&&this.length===1&&this.isInside("heading-title")&&n.push(F(this,{start:e},i,"variable-anchor",s)),n}}print(){}};fs=B(zg),Mt=new WeakMap,Ze=P(fs,0,"ExtLinkToken",il,Ze),R(fs,1,Ze)});var pn,sl=w(()=>{"use strict";G();wt();ps();cs();pn=class extends L{get type(){return"imagemap-link"}constructor(t,e,r,n,i=[]){super(void 0,n,i),this.append(t,e.length===2?new hr(...e,n,i):new Ze(...e,n,i),new de(r,n,i))}}});var ol={};Z(ol,{ImagemapToken:()=>ms});var ms,al=w(()=>{"use strict";z();Se();oe();D();Xn();ds();ls();sl();ms=class extends mt{get image(){return this.childNodes.find(Yn("imagemap-image"))}constructor(t,e=v.getConfig(),r=[]){if(super(void 0,e,r,{}),!t)return;let n=t.split(`
|
|
18
|
+
`),i=new Set(e.protocol.split("|")),s=!0,a=!1;for(let l of n){let p=l.trim();if(!(a||!p||p.startsWith("#"))){if(s){let g=l.indexOf("|"),d=g===-1?l:l.slice(0,g),f=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(f.valid&&f.ns===6){let c=new Ke("imagemap",d,g===-1?void 0:l.slice(g+1),e,r);super.insertAt(c),s=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){let g=l.indexOf("["),d=l.slice(g),f=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(f){if(this.normalizeTitle(f[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new pn(l.slice(0,g),f.slice(1),d.slice(d.indexOf("]]")+2),e,r));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let c=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(c){super.insertAt(new pn(l.slice(0,g),c.slice(1),d.slice(d.indexOf("]")+1),e,r));continue}}}}super.insertAt(new Dt(l,e,r))}}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=new W(this,t),{childNodes:i,image:s}=this,a="invalid-imagemap",{lintConfig:l}=v,p=l.getSeverity(a,s?"link":"image");return p&&(s?Array.prototype.push.apply(r,i.filter(g=>{let d=g.toString().trim();return g.is("noinclude")&&d&&!d.startsWith("#")}).map(g=>{let d=j(g,n,a,"invalid-imagemap-link",p);return l.computeEditInfo&&(d.suggestions=[O(d,-1),me(d,"comment","# ")]),d})):r.push(F(this,n,a,"imagemap-without-image",p))),r}}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}}});var ll,hs,Gg,et,xs=w(()=>{"use strict";z();at();qe();D();pt();ll=[ve(!1),pe("<!--")];et=class extends(Gg=le){constructor(e,r,n,i){super(e,n,i);ce(this,"closed");this.closed=r}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){{if(this.closed)return[];let r="unclosed-comment",{lintConfig:n}=v,i=n.getSeverity(r);if(!i)return[];let s=F(this,{start:e},r,"unclosed-comment",i);return n.computeEditInfo&&(s.suggestions=[Le(s.endIndex,"-->")]),[s]}}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){}};hs=B(Gg),et=P(hs,0,"CommentToken",ll,et),R(hs,1,et)});var dl={};Z(dl,{CommentedToken:()=>bs});var bs,gl=w(()=>{"use strict";G();xs();bs=class extends L{get type(){return"ext-inner"}constructor(t,e,r=[]){if(super(void 0,e,r,{AstText:":",CommentToken:":"}),t){let n=t.indexOf("<!--"),i=n!==-1&&t.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(t.slice(s,n)),this.insertAt(new et(t.slice(n+4,i),!0,e,r)),s=i+3,n=t.indexOf("<!--",s),i=n!==-1&&t.indexOf("-->",n+4);s<t.length&&this.insertAt(t.slice(s))}}lint(t=this.getAbsoluteIndex()){return super.lint(t,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}});var ul={};Z(ul,{CategorytreeToken:()=>xr});var pl,ys,Hg,xr,fl=w(()=>{"use strict";z();qe();D();lr();pl=[pe("")];xr=class extends(Hg=ye){get type(){return"ext-inner"}constructor(t,e,r,n=[]){super(t,e,r,n),this.setAttribute("bracket",!1)}getTitle(){let t=this.firstChild.toString().trim(),e={halfParsed:!0},r=this.normalizeTitle(t,14,e);return r.valid&&r.ns===14?r:this.normalizeTitle(`Category:${t}`,0,e)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",r=v.lintConfig.getSeverity(e,"categorytree");if(r){let{link:n}=this;if(!n.valid||n.ns!==14)return[F(this,{start:t},e,"invalid-category",r)]}return super.lint(t,!1)}}};ys=B(Hg),xr=P(ys,0,"CategorytreeToken",pl,xr),R(ys,1,xr)});var cl={};Z(cl,{NowikiToken:()=>Ts});var Vg,Qg,un,ks,Ts,ml=w(()=>{"use strict";ze();Or();z();oe();D();pt();Vg=Be(o=>new RegExp(String.raw`<\s*(?:/\s*)${o==="nowiki"?"":"?"}(${o})\b`,"giu")),Qg=new Set(["languages","section","templatestyles"]),Ts=class extends le{constructor(){super(...arguments);S(this,un)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex()){{let{name:r,innerText:n}=this,{lintConfig:i}=v,s="void-ext",a=i.getSeverity(s,r);if(a&&I(this,un,ks).call(this)){let l=F(this,{start:e},s,v.msg("nothing-in",r),a);return i.computeEditInfo&&(l.suggestions=[O(l)]),[l]}{s="invalid-json";let l=i.getSeverity(s),p=i.getSeverity(s,"duplicate");if(xo.includes(r)&&(l||p))return(r==="templatedata"?Co:wo)(n).map(({message:g,from:d,to:f=d,line:c,endLine:u=c,column:b,endColumn:h=b,severity:T})=>{if(a=T==="warning"?p:l,!a)return!1;let x=new W(this,e);return{rule:s,message:g,severity:a,startIndex:e+d,endIndex:e+f,startLine:x.top+c-1,endLine:x.top+u-1,startCol:(c>1?0:x.left)+b-1,endCol:(u>1?0:x.left)+h-1}}).filter(g=>g!==!1)}return super.lint(e,Vg(r))}}getAttribute(e){return e==="invalid"?I(this,un,ks).call(this):super.getAttribute(e)}};un=new WeakSet,ks=function(){let{name:e,firstChild:{data:r}}=this;return Qg.has(e)&&!!r}});var hl,vs,Jg,Xe,rs=w(()=>{"use strict";z();oe();D();Hn();G();Gn();Jn();hl=[dr()];Xe=class extends(Jg=Fe){get type(){return"ext"}constructor(t,e,r,n,i=v.getConfig(),s=!1,a=[]){let l=t.toLowerCase(),p=new ct(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),g=ge(V({},i),{ext:i.ext.filter(f=>f!==l),excludes:[...i.excludes],inExt:!0}),d;switch(l){case"pre":if(p.getAttr("format")!=="wikitext"){let{PreToken:f}=(Ca(),J(Sa));d=new f(r,g,a);break}case"indicator":case"poem":case"ref":case"option":case"combooption":case"tab":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"?g.excludes.push("heading"):l==="tab"&&(g.ext=g.ext.filter(f=>f!=="tabs")),d=new L(r,g,a);break;case"dynamicpagelist":{let{ParamTagToken:f}=(zi(),J(Ea));d=new f(l,s,r,g,a);break}case"inputbox":{let{InputboxToken:f}=(Ha(),J(Ga));d=new f(l,s,r,g,a);break}case"references":{let{NestedToken:f}=(ri(),J(ti));g.excludes.push("heading"),d=new f(r,s,["ref"],g,a);break}case"choose":{let{NestedToken:f}=(ri(),J(ti));d=new f(r,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,a);break}case"combobox":{let{NestedToken:f}=(ri(),J(ti));d=new f(r,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,a);break}case"gallery":{let{GalleryToken:f}=(nl(),J(rl));d=new f(r,g,a);break}case"imagemap":{let{ImagemapToken:f}=(al(),J(ol));d=new f(r,g,a);break}case"hiero":{let{CommentedToken:f}=(gl(),J(dl));d=new f(r,g,a);break}case"categorytree":{let{CategorytreeToken:f}=(fl(),J(ul));d=new f(r,void 0,g,a);break}default:{let{NowikiToken:f}=(ml(),J(cl));d=new f(r,g,a)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(t,p,d,n,i,a),this.seal("closed",!0)}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),{lintConfig:n}=v,i=new W(this,t);if(this.name!=="nowiki"){let s=this.inHtmlAttrs(),a="parsing-order",l=s&&n.getSeverity(a,s===2?"ext":"templateInTable");l&&r.push(F(this,i,a,"ext-in-html",l))}if(this.name==="ref"){let s="var-anchor",a=n.getSeverity(s,"ref");a&&this.closest("heading-title")&&r.push(F(this,i,s,"variable-anchor",a)),s="nested-link",a=n.getSeverity(s,"ref"),a&&this.closest("link-text,ext-link-text")&&r.push(F(this,i,s,"ref-in-link",a))}return r}}};vs=B(Jg),Xe=P(vs,0,"ExtToken",hl,Xe),R(vs,1,Xe)});var xt,Ut,tt,br,As=w(()=>{"use strict";z();Se();G();D();br=class extends L{constructor(e,r,n,i,s){super(void 0,i,s);S(this,xt);S(this,Ut);S(this,tt);this.insertAt(r),C(this,xt,n),C(this,Ut,e)}get closing(){return m(this,xt)}toString(e){return`<${m(this,xt)?"/":""}${m(this,Ut)}${super.toString(e)}${this.selfClosing?"/":""}>`}text(e=""){let{closing:r}=this;return`<${r&&!e?"/":""}${m(this,Ut)}${r?"":super.text()}${e}>`}getAttribute(e){return e==="padding"?m(this,Ut).length+(m(this,xt)?2:1):super.getAttribute(e)}findMatchingTag(){return je(m(this,tt),()=>{let{type:e,name:r,parentNode:n,closing:i,selfClosing:s}=this,a=!1,l=!1;if(e==="html"){let[,u,b]=this.getAttribute("config").html;a=b.includes(r),l=u.includes(r)}if(a||l&&s)return this;if(!n)return;let{childNodes:p}=n,g=p.indexOf(this),d=i?p.slice(0,g).reverse():p.slice(g+1),f=[this],{rev:c}=ne;for(let u of d)if(!(!u.is(e)||e==="html"&&(u.name!==r||l&&u.selfClosing)))if(m(u,xt)===i){if(e==="tvar")return;f.push(u)}else{let b=f.pop();if(b===this)return u;v.viewOnly&&(C(b,tt,[c,u]),C(u,tt,[c,b]))}if(v.viewOnly)for(let u of f)C(u,tt,[c,void 0])},e=>{C(this,tt,e),e[1]&&e[1]!==this&&C(e[1],tt,[ne.rev,this])})}print(){}json(e,r,n=this.getAbsoluteIndex()){}};xt=new WeakMap,Ut=new WeakMap,tt=new WeakMap});var xl,Ss,Xg,_e,bl=w(()=>{"use strict";at();be();As();lt();xl=[ve(),Q];_e=class extends(Xg=br){get type(){return"tvar"}constructor(t,e,r,n,i){let s=new he(e,"tvar-name",n,i);super(t,s,r,n,i)}};Ss=B(Xg),_e=P(Ss,0,"TvarToken",xl,_e),R(Ss,1,_e)});var yl={};Z(yl,{TranslateToken:()=>Cs});var ws,Kg,Cs,Tl=w(()=>{"use strict";G();Gn();lt();bl();Cs=class extends Fe{constructor(e,r,n,i=[]){let s=new he(e,"translate-attr",n,i);r=r==null?void 0:r.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(l,p,g)=>(new _e("tvar",p,!1,n,i),new _e("","",!0,n,i),`\0${i.length-2}n${g}\0${i.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(l,p,g,d,f,c,u)=>(new _e(p,g,!1,n,i),new _e(c,u,!0,n,i),`\0${i.length-2}n${f}\0${i.length}n`));let a=new L(r,n,i);a.type="translate-inner";super("translate",s,a,"translate",n,i);S(this,ws);this.seal("closed",!0)}get type(){return"translate"}get selfClosing(){return!1}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){}};ws=new WeakSet,Kg=function(){}});var Al={};Z(Al,{parseCommentAndExt:()=>Pt});var vl,Yg,Es,Zg,kl,Pt,Zr=w(()=>{"use strict";ze();ae();na();wt();oa();rs();xs();vl="<onlyinclude>",Yg="</onlyinclude>",{length:Es}=vl,Zg=[!1,!0].map(o=>{let t=o?"includeonly":"(?:no|only)include",e=o?"noinclude":"includeonly";return Be(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${r})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),kl=o=>{let t=o.indexOf(vl);return{i:t,j:o.indexOf(Yg,t+Es)}},Pt=(o,t,e,r)=>{if(r){let{i:l,j:p}=kl(o);if(l!==-1&&p!==-1){let g="",d=f=>{new de(f,t,e),g+=`\0${e.length-1}n`};for(;l!==-1&&p!==-1;){let f=`\0${e.length}g`;new Nt(o.slice(l+Es,p),t,e),l>0&&d(o.slice(0,l)),g+=f,o=o.slice(p+Es+1),{i:l,j:p}=kl(o)}return o&&d(o),g}}let{ext:n}=t,i=n,s=t;if(n.includes("translate")){let{TranslateToken:l}=(Tl(),J(yl)),p=[];i=n.filter(g=>g!=="translate"&&g!=="tvar"),s=ge(V({},t),{ext:i}),o=o.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,g=>(p.push(g),`\0${p.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(g,d,f)=>{let c=e.length;return new l(d,f&&ke(f,p),s,e),`\0${c}g`}),o=ke(o,p)}let a=Zg[r?1:0](i.join("|"));return a.lastIndex=0,a.test(o)?o.replace(a,(l,p,g,d,f,c,u,b,h)=>{let T=e.length,x="n";if(p)x="e",new Xe(p,g,d,f,s,c,e);else if(l.startsWith("<!--")){x="c";let y=l.endsWith("-->");new et(ke(l,e,1).slice(4,y?-3:void 0),y,t,e)}else c?new It(c,u&&ke(u,e,1),b&&ke(b,e,1),h,t,e):new de(l,t,e,!0);return`\0${T}${x}`}):o}});var ep,tp,rp,Sl,fn,Ls,np,zt,Cl=w(()=>{"use strict";z();oe();Hn();D();As();ep=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),tp=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"]),rp=new Set(["strike","big","center","font","tt"]);Sl=[dr()];zt=class extends(np=br){constructor(e,r,n,i,s,a){super(e,r,n,s,a);S(this,fn);this.setAttribute("name",e.toLowerCase()),C(this,fn,i)}get type(){return"html"}get selfClosing(){return m(this,fn)}text(){let{closing:e,selfClosing:r,name:n}=this,[,,i]=this.getAttribute("config").html;return i.includes(n)?e&&n!=="br"?"":super.text("/"):super.text(r&&!e?"/":"")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{name:i,parentNode:s,closing:a,selfClosing:l}=this,p=new W(this,e),{lintConfig:g}=v,{computeEditInfo:d,fix:f}=g,c=this.inTableAttrs(),u="h1",b=g.getSeverity(u,"html");if(b&&i==="h1"&&!a){let A=F(this,p,u,"<h1>",b);d&&(A.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}]),n.push(A)}if(u="parsing-order",b=c&&g.getSeverity(u,c===2?"html":"templateInTable"),b){let A=F(this,p,u,"html-in-table",b);d&&c===2&&(A.suggestions=[O(A)]),n.push(A)}if(u="obsolete-tag",b=g.getSeverity(u,i),b&&rp.has(i)&&n.push(F(this,p,u,"obsolete-tag",b)),u="bold-header",b=g.getSeverity(u,i),b&&(i==="b"||i==="strong")&&this.isInside("heading-title")){let A=F(this,p,u,"bold-in-header",b);d&&(A.suggestions=[O(A)]),n.push(A)}let[,h,T]=this.getAttribute("config").html,x=T.includes(i),y=h.includes(i),k=!x&&!y;if(u="unmatched-tag",a&&(l||x)||l&&k){if(b=g.getSeverity(u,a?"both":"selfClosing"),b){let A=F(this,p,u,a?"closing-and-self-closing":"invalid-self-closing",b);if(d||f){let N=Bn(e),E={desc:v.msg("no-self-closing"),range:[A.endIndex-2,A.endIndex-1],text:""};y?d&&(A.suggestions=[N,E]):a?A.fix=x?N:E:d&&(A.suggestions=[E,Le(A.endIndex,`></${i}>`,-2)])}n.push(A)}}else if(!this.findMatchingTag()){let A=F(this,p,u,a?"unmatched-closing":"unclosed-tag"),N=this.closest("magic-word");if(N&&ep.has(N.name))b=g.getSeverity(u,"conditional");else if(a)b=g.getSeverity(u,"closing"),A.suggestions=[O(A)];else{b=g.getSeverity(u,"opening");let E=s==null?void 0:s.childNodes;tp.has(i)&&(E!=null&&E.slice(0,E.indexOf(this)).some($=>$.is("html")&&$.name===i&&!$.findMatchingTag())&&(A.suggestions=[Le(e+1,"/")]),this.isInside("heading-title")&&(A.rule="format-leakage",b=g.getSeverity("format-leakage",i)))}b&&(A.severity=b,n.push(A))}return n}}getAttribute(e){return e==="invalid"?this.inTableAttrs()===2:super.getAttribute(e)}json(e,r,n=this.getAbsoluteIndex()){}};Ls=B(np),fn=new WeakMap,zt=P(Ls,0,"HtmlToken",Sl,zt),R(Ls,1,zt)});var wl={};Z(wl,{parseHtml:()=>sp});var ip,sp,El=w(()=>{"use strict";Jn();Cl();ip=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,sp=(o,t,e)=>{var s;let{html:r}=t;(s=t.htmlElements)!=null||(t.htmlElements=new Set([...r[0],...r[1],...r[2]]));let n=o.split("<"),i=n.shift();for(let a of n){let l=ip.exec(a),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!t.htmlElements.has(g)){i+=`<${a}`;continue}let[,d,,f="",c,u]=l,{length:b}=e,h=new ct(f,"html-attrs",g,t,e),T=h.hasAttr("itemprop");if(g==="meta"&&!(T&&h.hasAttr("content"))||g==="link"&&!(T&&h.hasAttr("href"))){i+=`<${a}`,e.length=b;continue}i+=`\0${e.length}x${u}`,new zt(p,h,d==="/",c==="/>",t,e)}return i}});var Ll,Ns,op,rt,$s=w(()=>{"use strict";Hn();G();lt();Jn();Ll=[dr(1)];rt=class extends(op=L){constructor(t,e,r,n,i,s=[],a){super(void 0,i,s,a),this.append(new he(e,"table-syntax",i,s),new ct(n,"table-attrs",r,i,s))}escape(){}};Ns=B(op),rt=P(Ns,0,"TableBaseToken",Ll,rt),R(Ns,1,rt)});var Nl,$l,Re,Is,yr,cn,Gt,Fs=w(()=>{"use strict";z();oe();Wn();D();G();$s();Gt=class extends($l=rt,Nl=[rr(!1)],$l){constructor(e,r,n,i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(r!=null?r:""),a=s?r.slice(0,s.index):"";/\[\[|-\{/u.test(a)&&(s=null,a="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",a,n,i);R(Is,5,this);S(this,yr);S(this,Re,"");s&&([$n(this,Re)._]=s);let l=new L(r==null?void 0:r.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+m(this,Re).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 I(this,yr,cn).call(this).subtype}afterBuild(){m(this,Re).includes("\0")&&C(this,Re,this.buildFromStr(m(this,Re),0)),super.afterBuild()}toString(e){let[r,n,i]=this.childNodes;return r.toString(e)+n.toString(e)+m(this,Re)+i.toString(e)}text(){let[e,r,n]=this.childNodes;return e.text()+r.text()+m(this,Re)+n.text()}getGaps(e){return e===1?m(this,Re).length:0}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e+this.getRelativeIndex(this.length-1)),s="pipe-like",{lintConfig:a}=v,{computeEditInfo:l,fix:p}=a,g=["td","double"].map(d=>a.getSeverity(s,d));for(let d of this.lastChild.childNodes)if(d.type==="text"){let{data:f}=d;if(f.includes("|")){let c=f.includes("||"),u=g[c?1:0];if(u){let b=j(d,i,s,"pipe-in-table",u);if(l||p)if(c){let h={caption:"|+",td:"|",th:"!"}[this.subtype];b.fix=me(b,"newline",f.replace(/\|\|/gu,`
|
|
19
|
+
${h}`))}else l&&(b.suggestions=[qn(b.startIndex,f)]);n.push(b)}}}return n}}isIndependent(){return this.firstChild.text().startsWith(`
|
|
20
|
+
`)}getAttr(e){{let r=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(r)||1:r}}escape(){}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Is=B($l),Re=new WeakMap,yr=new WeakSet,cn=function(){var a;let e=this.firstChild.text(),r=e.slice(-1),n="td";if(r==="!"?n="th":r==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return V({},I(a=i,yr,cn).call(a))},cn=P(Is,17,"#getSyntax",Nl,yr,cn),Fr(Is,Gt)});var Tr,Rs=w(()=>{"use strict";z();D();$s();Fs();Tr=class extends rt{lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return r;let i=Rn(n),s="fostered-content",a=i&&v.lintConfig.getSeverity(s,i===2?void 0:"transclusion");if(a){let l=j(n,{start:t},s,"content-outside-table",a);l.startIndex++,l.startLine++,l.startCol=0,r.push(l)}return r}}getRowCount(){return Number(this.childNodes.some(t=>t instanceof Gt&&t.isIndependent()&&!t.firstChild.text().endsWith("+")))}}});var Bs,Il,Fl,Ps,kr,Rl=w(()=>{"use strict";z();Se();oe();Wn();D();Rs();lt();Bs=class extends Array{},kr=class extends(Fl=Tr,Il=[rr(!1)],Fl){constructor(e,r,n,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",r,n,i,{});R(Ps,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e),s=["unclosed-table","table-layout"],a=s.map(l=>v.lintConfig.getSeverity(l));if(a[0]&&!this.closed&&n.push(j(this.firstChild,i,s[0],"unclosed-table",a[0])),a[1]){let l=this.getLayout(),{length:p}=l;if(p>1){let g=1,d=1/0,f=0;for(;f<p;f++){let c=l[f],u=c.length;if(u<g)break;u<d&&(d=u);let b=c.indexOf(c[u-1])+1;if(b>d)break;b>g&&(g=b)}if(f<p){let c=this.getNthRow(f),u=j(c,i,s[1],"inconsistent-table",a[1]);u.startIndex++,u.startLine++,u.startCol=0,n.push(u)}}}return n}}close(e=`
|
|
21
|
+
|}`,r){ne.run(()=>{let n=new he(r?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(n)})}getLayout(e){{let r=this.getAllRows(),{length:n}=r,i=Bs.from(Bl(n,()=>[]));for(let s=0;s<i.length;s++){let a=i[s],l=0,p=0,g;for(let d of r[s].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(g=d.subtype!=="caption"),g){let f={row:s,column:l},{rowspan:c,colspan:u}=d;for(l++;a[p];)p++;for(let b=s;b<Math.min(s+c,n);b++)for(let h=p;h<p+u;h++)i[b][h]=f;p+=u}}else if(Pl(d))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,r,n){{let i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(let s of this.childNodes.slice(2)){let{type:a}=s;if(a==="tr"&&s.getRowCount()&&(e--,e<0))return s}return}}json(e,r,n=this.getAbsoluteIndex()){}};Ps=B(Fl),P(Ps,1,"getLayout",Il,kr),Fr(Ps,kr)});var si,jl=w(()=>{"use strict";Rs();si=class extends Tr{get type(){return"tr"}constructor(t,e,r,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,t,"tr",e,r,n)}}});var vr,js=w(()=>{"use strict";pt();vr=class extends le{get indent(){}json(t,e,r=this.getAbsoluteIndex()){}}});var Ar,Os=w(()=>{"use strict";js();Ar=class extends vr{get type(){return"dd"}}});var ql={};Z(ql,{parseTable:()=>lp});var ap,Ol,lp,_l=w(()=>{"use strict";G();Rl();jl();Fs();Os();ap=o=>o.lastChild.constructor!==L,Ol=(o,t)=>o.is("td")?t.pop():o,lp=({firstChild:{data:o},type:t,name:e},r,n)=>{let i=[],s=o.split(`
|
|
22
22
|
`),a=t==="root"||t==="parameter-value"||t==="ext-inner"&&e==="poem"?"":`
|
|
23
23
|
${s.shift()}`,l,p=(g,d)=>{if(!d){a+=g;return}let{lastChild:f}=d;if(ap(d)){let c=new L(g,r,n);c.type="table-inter",c.setAttribute("stage",3),d.insertAt(c)}else f.setText(f.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),f=g.slice(d.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(f);if(c){for(;l&&!l.is("td");)l=i.pop();let[,y,k,A,N]=c;y&&new Ar(y,r,n),p(`
|
|
24
24
|
${d}${y&&`\0${n.length-1}d`}${k}\0${n.length}b`,l),i.push(...l?[l]:[],new kr(A,N,r,n));continue}else if(!l){a+=`
|
|
25
25
|
${g}`;continue}let u=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(f);if(!u){p(`
|
|
26
|
-
${g}`,l),i.push(l);continue}let[,
|
|
27
|
-
${d}${
|
|
28
|
-
${d}${h}`,
|
|
29
|
-
${d}${T}`,E=$=>{let H=new Gt(N,
|
|
30
|
-
`)&&(T=re(c).trim());let{ns:y,valid:k}=v.normalizeTitle(T,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(k){if(g){if(y!==6){a+=`[[${x}`;continue}let N=!1;for(p++;p<s.length;p++){let E=s[p],$=E.split("]]");if($.length>2){N=!0,c+=`[[${$[0]}]]${$[1]}`,u=$.slice(2).join("]]");break}else if($.length===2)c+=`[[${$[0]}]]${$[1]}`;else{c+=`[[${E}`;break}}if(c=Xl(c,t,e,r,n),!N){a+=`[[${d}${f}${c}`;continue}}}else{a+=`[[${x}`;continue}c&&(c=qs(c,t,e,n));let A=hr;b||(y===6?(c&&(c=Ws(c,t,e,!0)),A=mr):y===14&&(A=li)),c===void 0&&f&&(c=""),a+=`\0${e.length}l${u}`,new A(d,c,t,e,f)}return a}});var nd={};Z(nd,{parseMagicLinks:()=>up});var rd,Zl,ed,td,up,id=w(()=>{"use strict";ae();ii();rd=String.raw`[${Ie}\t]| |�*160;|�*a0;`,Zl=`(?:${rd})+`,ed=`(?:${rd}|-)`,td=String.raw`(?:RFC|PMID)${Zl}\d+\b|ISBN${Zl}(?:97[89]${ed}?)?(?:\d${ed}?){9}[\dx]\b`,up=(o,t,e)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${De}${Me})|${td})`,"giu")}catch(r){t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${De}${Me})|${td})`,"giu")}return o.replace(t.regexMagicLinks,(r,n,i)=>{let s=n?r.slice(n.length):r;if(i){let a="",l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(a=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),a=s.slice(g.index+d)+a,s=s.slice(0,g.index+d)}return a.length>=i.length?r:(new Ye(s,void 0,t,e),`${n}\0${e.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return r;return new Ye(s,"magic-link",t,e),`${n}\0${e.length-1}i`})}});var sd,od=w(()=>{"use strict";sd=(o,t)=>o.startsWith(t)?t.length:[...t].findIndex((e,r)=>e!==o[r])});var fp,di,ad=w(()=>{"use strict";z();D();Bs();fp=new Set(["link","category","file"]),di=class extends vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){var e;{let r="syntax-like",n=v.lintConfig.getSeverity(r,"redirect"),{innerText:i}=this;if(n&&i==="#"){let{nextSibling:s}=this;if((s==null?void 0:s.type)==="text"&&fp.has((e=s.nextSibling)==null?void 0:e.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${s.data}`)){let l=F(s,{start:t+1},r,"redirect-like",n);return l.startIndex--,l.startCol--,l.endIndex+=2,l.endCol+=2,[l]}}return[]}}}});var ld={};Z(ld,{parseList:()=>cp});var cp,dd=w(()=>{"use strict";od();ad();js();cp=(o,t,e,r)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(o);if(!n)return t.lastPrefix="",o;let[i,s,a,l]=n,p=a.replace(/;/gu,":"),g=sd(p,t.lastPrefix),d=((g>1?a.slice(g-1):a)+l).split(/(?=;)/u),f=d[0].startsWith(";"),c=d.length-(f?0:1);if(g>1){let q=a.slice(0,g-1);if(f){let K=q.split(/(?=;)/u);d.unshift(...K),c+=q.includes(";")?K.length:0}else d[0]=q+d[0]}t.lastPrefix=p;let u=s+d.map((q,K)=>`\0${r.length+K}d`).join("")+o.slice(i.length);for(let q of d)new di(q,e,r);if(!c)return u;let[x,,h]=e.html,T=/:+|-\{|\0\d+[xq]\x7F/gu,b=T,y=b.exec(u),k=0,A=!1,N=!1,E=0,$=(q,K)=>(new Ar(q,e,r),`${u.slice(0,K)}\0${r.length-1}d${u.slice(K+q.length)}`),H=q=>{q?k&&k--:k++};for(;y&&c;){let{0:q,index:K}=y;if(q==="-{"){if(!E){let{lastIndex:_}=b;b=/-\{|\}-/gu,b.lastIndex=_}E++}else if(q==="}-"){if(E--,!E){let{lastIndex:_}=b;b=T,b.lastIndex=_}}else if(q.endsWith("x")){let{name:_,closing:U,selfClosing:M}=r[Number(q.slice(1,-2))];(x.includes(_)||!M&&!h.includes(_))&&H(U)}else if(q.endsWith("q")){let{bold:_,italic:U}=r[Number(q.slice(1,-2))];_&&(H(A),A=!A),U&&(H(N),N=!N)}else if(k===0){if(q.length>=c)return $(q.slice(0,c),K);c-=q.length,b.lastIndex=K+4+String(r.length).length,u=$(q,K)}y=b.exec(u)}return u}});var Ms,gd,nt,Us,mp,Vt,pd=w(()=>{"use strict";z();oe();Qr();xe();D();G();dt();Ms=new Set(["A","T","R","D","-","H","N"]);gd=[ut(),Q];Vt=class extends(mp=L){constructor(e,r,n=[]){super(void 0,r,n,{});S(this,nt);this.safeAppend(e.map(i=>new ue(i,"converter-flag",r,n)))}get type(){return"converter-flags"}afterBuild(){C(this,nt,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(m(this,nt).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(m(this,nt).filter(r=>e.has(r)))}isInvalidFlag(e,r,n){return!!e&&!r.has(e)&&!n.has(e)&&(r.size>0||!Ms.has(e))}lint(e=this.getAbsoluteIndex(),r){{let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=m(this,nt).filter(u=>!u).length,a=m(this,nt).length-i.size-s,{lintConfig:l}=v,{computeEditInfo:p,fix:g}=l,d=super.lint(e,r);if(n.size===a||m(this,nt).filter(u=>Ms.has(u)).length===a)return d;let f="no-ignored",c=l.getSeverity(f,"conversionFlag");if(c){let u=new W(this,e);for(let x=0;x<this.length;x++){let h=this.childNodes[x],T=h.text().trim();if(this.isInvalidFlag(T,n,i)){let b=j(h,u,f,"invalid-conversion-flag",c);(p||g)&&(n.size===0&&Ms.has(T.toUpperCase())?b.fix=On(b,T):p&&(b.suggestions=[O(b,x&&-1)])),d.push(b)}}}return d}}print(){}};Us=B(mp),nt=new WeakMap,Vt=P(Us,0,"ConverterFlagsToken",gd,Vt),R(Us,1,Vt)});var zs,ud,Gs,hp,it,fd=w(()=>{"use strict";xe();D();G();dt();zs=(o,t,e,r)=>{let n=new L(o,e,r);return n.type=`converter-rule-${t}`,n.setAttribute("stage",11),n};ud=[Q];it=class extends(hp=L){get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,r=v.getConfig(),n=[]){super(void 0,r,n,{});let i=t.indexOf(":"),s=t.slice(0,i).indexOf("=>"),a=s===-1?t.slice(0,i):t.slice(s+2,i);e&&r.variants.includes(a.trim().toLowerCase())?(super.insertAt(new ue(a,"converter-rule-variant",r,n)),super.insertAt(zs(t.slice(i+1),"to",r,n)),s!==-1&&super.insertAt(zs(t.slice(0,s),"from",r,n),0)):super.insertAt(zs(t,"to",r,n))}toString(t){let{childNodes:e,firstChild:r,lastChild:n}=this;return e.length===3?`${r.toString(t)}=>${e[1].toString(t)}:${n.toString(t)}`:super.toString(t,":")}text(){let{childNodes:t,firstChild:e,lastChild:r}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${r.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){}json(t,e,r=this.getAbsoluteIndex()){}};Gs=B(hp),it=P(Gs,0,"ConverterRuleToken",ud,it),R(Gs,1,it)});var cd,Hs,bp,Qt,md=w(()=>{"use strict";ae();qe();xe();G();pd();fd();cd=[Q,pe("-{")];Qt=class extends(bp=L){get type(){return"converter"}constructor(t,e,r,n=[]){super(void 0,r,n),this.insertAt(new Vt(t,r,n));let[i]=e,s=i.includes(":"),a=new it(i,s,r,n);(s?a.length===1:e.length===2&&!re(e[1]).trim())?this.insertAt(new it(e.join(";"),!1,r,n)):this.safeAppend([a,...e.slice(1).map(l=>new it(l,!0,r,n))])}toString(t){let[e,...r]=this.childNodes;return`-{${e.toString(t)}${e.length>0?"|":""}${r.map(n=>n.toString(t)).join(";")}}-`}text(){let[t,...e]=this.childNodes;return`-{${t.text()}|${Ee(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){}};Hs=B(bp),Qt=P(Hs,0,"ConverterToken",cd,Qt),R(Hs,1,Qt)});var hd={};Z(hd,{parseConverter:()=>xp});var xp,bd=w(()=>{"use strict";md();xp=(o,t,e)=>{var l;(l=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));let r=/-\{/gu,n=/-\{|\}-/gu,i=[],s=r,a=s.exec(o);for(;a;){let{0:p,index:g}=a;if(p==="}-"){let d=i.pop(),{length:f}=e,c=o.slice(d.index+2,g),u=c.indexOf("|"),[x,h]=u===-1?[[],c]:[c.slice(0,u).split(";"),c.slice(u+1)],T=h.replace(/(&[#a-z\d]+);/giu,"$1"),b=T.split(t.regexConverter).map(y=>y.replace(/\x01/gu,";"));new Qt(x,b,t,e),o=`${o.slice(0,d.index)}\0${f}v${o.slice(g+2)}`,i.length===0&&(s=r),s.lastIndex=d.index+3+String(f).length}else i.push(a),s=n,s.lastIndex=g+2;a=s.exec(o)}return o}});var gi={};Z(gi,{Token:()=>L});var yp,bn,Ce,ee,te,Cr,wr,xn,Er,X,xd,yd,Td,kd,vd,Ad,Sd,Cd,wd,Ed,Ld,Nd,Vs,L,G=w(()=>{"use strict";ae();z();Se();D();Wo();zo();yp=["category","html-attr#id,ext-attr#id,table-attr#id"],Vs=class Vs extends Ct{constructor(e,r=v.getConfig(),n=[],i){super();S(this,X);S(this,bn,"plain");S(this,Ce,0);S(this,ee);S(this,te);S(this,Cr);S(this,wr,!1);S(this,xn);S(this,Er);typeof e=="string"&&this.insertAt(e),C(this,ee,r),C(this,te,n),n.push(this)}get type(){return m(this,bn)}set type(e){C(this,bn,e)}get pageName(){return m(this.getRootNode(),Er)}set pageName(e){if(e){let r=this.normalizeTitle(e,0,{temporary:!0,page:""});C(this,Er,r.valid?r.title:void 0)}else C(this,Er,e===""?"":void 0)}parseOnce(e=m(this,Ce),r=!1,n){if(e<m(this,Ce)||this.length!==1||!this.isPlain())return this;if(m(this,Ce)>=11)return this;switch(e){case 0:if(this.type==="root"){m(this,te).pop();let i=I(this,X,xd).call(this);r&&(r=!i)}C(this,Cr,r),I(this,X,yd).call(this,r);break;case 1:I(this,X,Td).call(this);break;case 2:I(this,X,kd).call(this);break;case 3:I(this,X,vd).call(this);break;case 4:I(this,X,Ad).call(this);break;case 5:I(this,X,Sd).call(this,n);break;case 6:I(this,X,Cd).call(this,n);break;case 7:I(this,X,wd).call(this);break;case 8:I(this,X,Ed).call(this);break;case 9:I(this,X,Ld).call(this);break;case 10:I(this,X,Nd).call(this)}if(this.type==="root")for(let i of m(this,te))i==null||i.parseOnce(e,r,n);return $n(this,Ce)._++,this}buildFromStr(e,r){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return i&&new Gr(i);let a=Number(i.slice(0,-1));return m(this,te)[a]}).filter(i=>i!=="");return r===0?n.map(String).join(""):r===1?Ee(n):n}build(){C(this,Ce,11);let{length:e,firstChild:r}=this,n=r==null?void 0:r.toString();if(e===1&&r.type==="text"&&n.includes("\0")&&(Dn(this,0,1,this.buildFromStr(n)),this.type==="root"))for(let i of m(this,te))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of m(this,te))e==null||e.afterBuild();C(this,wr,!0)}parse(e=11,r,n){for(e=Math.min(e,11);m(this,Ce)<e;)this.parseOnce(m(this,Ce),r,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Vs}getAttribute(e){var r;switch(e){case"config":return m(this,ee);case"include":return(r=m(this,Cr))!=null?r:!!m(this.getRootNode(),Cr);case"accum":return m(this,te);case"built":return m(this,wr);case"stage":return m(this,Ce);default:return super.getAttribute(e)}}setAttribute(e,r){e==="stage"?(m(this,Ce)===0&&this.type==="root"&&m(this,te).shift(),C(this,Ce,r)):super.setAttribute(e,r)}insertAt(e,r=this.length){let n=typeof e=="string"?new Gr(e):e,{length:i}=this;r+=r<0?i:0,super.insertAt(n,r);let{type:s}=n;return s==="root"&&(n.type="plain"),n}normalizeTitle(e,r=0,n){return v.normalizeTitle(e,r,this.getAttribute("include"),m(this,ee),V({page:this.pageName},n))}inTableAttrs(){var e;return this.isInside("table-attrs")&&((e=this.closest("table-attrs,arg,parameter"))!=null&&e.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(e=this.getAbsoluteIndex(),r){var n;{let{lintConfig:i}=v,{computeEditInfo:s,fix:a,ignoreDisables:l,configurationComment:p}=i,g=super.lint(e,r);if(this.type==="root"){let d=new Map,f="no-duplicate",c=["category","id"].map(h=>i.getSeverity(f,h)),u=this.toString(),x=yp.filter((h,T)=>c[T]).join();if(x){for(let h of this.querySelectorAll(x)){let T;if(h.is("category"))T=h.name;else{let b=h.getValue();b&&b!==!0&&(T=`#${b}`)}if(T){let b=d.get(T);b?b.add(h):d.set(T,new Set([h]))}}for(let[h,T]of d)if(T.size>1&&!h.startsWith("#mw-customcollapsible-")){let b=!h.startsWith("#"),y=`duplicate-${b?"category":"id"}`,k=c[b?0:1];g.push(...[...T].map(A=>{let N=F(A,{start:A.getAbsoluteIndex()},f,y,k);return s&&b&&(N.suggestions=[O(N)]),N}))}}if(!l){let h=new RegExp(String.raw`<!--\s*${p}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),T=[],b=h.exec(u);for(;b;){let{1:y,index:k}=b,A=(n=b[2])==null?void 0:n.trim(),N;(y==="disable-line"||y==="disable-next-line")&&(N=this.posFromIndex(k).top+(y==="disable-line"?0:1)),T.push({line:N,from:y==="disable"?h.lastIndex:void 0,to:y==="enable"?h.lastIndex:void 0,rules:A?new Set(A.split(",").map(E=>E.trim())):void 0}),b=h.exec(u)}g=g.filter(({rule:y,startLine:k,startIndex:A})=>{let N={pos:0};for(let{line:E,from:$,to:H,rules:q}of T){if(E&&E>k+1)break;if(q&&!q.has(y))continue;if(E===k)return!1;$<=A&&$>N.pos?(N.pos=$,N.type="from"):H<=A&&H>N.pos&&(N.pos=H,N.type="to")}return N.type!=="from"})}if(a&&g.some(({fix:h})=>h)){let h=g.map(({fix:y})=>y).filter(y=>y!==void 0).sort(({range:[y,k]},{range:[A,N]})=>k===N?A-y:N-k),T=1/0,b=u;for(let{range:[y,k],text:A}of h)k<=T&&(b=b.slice(0,y)+A+b.slice(k),T=y);Object.assign(g,{output:b})}if(!s)for(let h of g)delete h.fix,delete h.suggestions}return g}}toString(e,r){return e?super.toString(!0,r):je(m(this,xn),()=>super.toString(!1,r),n=>{let i=this.getRootNode();i.type==="root"&&m(i,wr)&&C(this,xn,n)})}};bn=new WeakMap,Ce=new WeakMap,ee=new WeakMap,te=new WeakMap,Cr=new WeakMap,wr=new WeakMap,xn=new WeakMap,Er=new WeakMap,X=new WeakSet,xd=function(){let{parseRedirect:e}=(ea(),J(Zo)),r=this.firstChild.toString(),n=e(r,m(this,ee),m(this,te));return n!==!1&&this.setText(n),!!n},yd=function(e){let{parseCommentAndExt:r}=(Zr(),J(Al));this.setText(r(this.firstChild.toString(),m(this,ee),m(this,te),e))},Td=function(){let{parseBraces:e}=(ei(),J(za)),r=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(r,m(this,ee),m(this,te));this.setText(this.type==="root"?n:n.slice(1))},kd=function(){if(m(this,ee).excludes.includes("html"))return;let{parseHtml:e}=(El(),J(wl));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},vd=function(){if(m(this,ee).excludes.includes("table"))return;let{parseTable:e}=(_l(),J(ql));this.setText(e(this,m(this,ee),m(this,te)))},Ad=function(){if(m(this,ee).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Gl(),J(zl));this.setText(e(this,m(this,ee),m(this,te)))},Sd=function(e){let{parseLinks:r}=(Yl(),J(Kl));this.setText(r(this.firstChild.toString(),m(this,ee),m(this,te),this.pageName,e))},Cd=function(e){let{parseQuotes:r}=(_s(),J(Vl)),n=this.firstChild.toString().split(`
|
|
26
|
+
${g}`,l),i.push(l);continue}let[,b,h,T,x]=u;if(b){for(;!l.is("table");)l=i.pop();l.close(`
|
|
27
|
+
${d}${b}`,!0),p(x,i[i.length-1])}else if(h){l=Ol(l,i),l.is("tr")&&(l=i.pop());let y=new si(`
|
|
28
|
+
${d}${h}`,x,r,n);i.push(l,y),l.insertAt(y)}else{l=Ol(l,i);let y=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,k=y.exec(x),A=0,N=`
|
|
29
|
+
${d}${T}`,E=$=>{let H=new Gt(N,x.slice(A,k==null?void 0:k.index),r,n);return $.insertAt(H),H};for(;k;)E(l),{lastIndex:A}=y,[N]=k,k=y.exec(x);i.push(l,E(l))}}return a.slice(1)}});var mn,Wl=w(()=>{"use strict";mn=o=>!/^_{2}.+_{2}$/u.test(o)});var oi,Dl=w(()=>{"use strict";pt();oi=class extends le{get type(){return"hr"}}});var Ml,hn,qs,dp,Ht,Ul=w(()=>{"use strict";at();qe();pt();Ml=[ve(),pe("__")];Ht=class extends(dp=le){constructor(e,r,n,i,s){var g,d;super(e,i,s);S(this,hn);let a=e.toLowerCase(),[,,l,p]=i.doubleUnderscore;this.setAttribute("name",(d=r?(g=p==null?void 0:p[e])==null?void 0:g.toLowerCase():l==null?void 0:l[a])!=null?d:a),C(this,hn,n)}get type(){return"double-underscore"}toString(){let e=m(this,hn)?"__":"__";return e+this.innerText+e}print(){}};qs=B(dp),hn=new WeakMap,Ht=P(qs,0,"DoubleUnderscoreToken",Ml,Ht),R(qs,1,Ht)});var zl={};Z(zl,{parseHrAndDoubleUnderscore:()=>gp});var gp,Gl=w(()=>{"use strict";Wl();Dl();Ul();Vi();gp=({firstChild:{data:o},type:t,name:e},r,n)=>{var p,g,d;let[i,s,a]=r.doubleUnderscore,l=[...i,...s];return(p=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(i.filter(mn))),(g=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(s.filter(mn))),(d=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(String.raw`^((?:\0\d+[cno]\x7F)*)(-{4,})|__(${l.filter(mn).join("|")})__|_{2}(${l.filter(f=>!mn(f)).map(f=>f.slice(2,-2)).join("|")})_{2}`,"gimu")),t!=="root"&&(t!=="ext-inner"||e!=="poem")&&(o=`\0${o}`),o=o.replace(r.regexHrAndDoubleUnderscore,(f,c,u,b,h)=>{var A;if(u)return new oi(u,r,n),`${c}\0${n.length-1}r`;let T=b!=null?b:h,x=r.sensitiveDoubleUnderscore.has(T),y=T.toLowerCase(),k=r.insensitiveDoubleUnderscore.has(y);return x||k?(new Ht(T,x,!!h,r,n),`\0${n.length-1}${k&&((A=a==null?void 0:a[y])!=null?A:y)==="toc"?"u":"n"}`):f}),r.excludes.includes("heading")||(o=o.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(f,c,u,b,h)=>{let T=`${c}\0${n.length}h`;return new Je(u.length,[b,h],r,n),T})),t==="root"||t==="ext-inner"&&e==="poem"?o:o.slice(1)}});var Sr,ai,Hl=w(()=>{"use strict";z();oe();D();pt();ai=class extends le{constructor(e,r,n,i){super(e,n,i);S(this,Sr);C(this,Sr,r)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return V(V({},this.bold?{bold:m(this,Sr).bold}:void 0),this.italic?{italic:m(this,Sr).italic}:void 0)}text(){let{parentNode:e,innerText:r}=this;return e!=null&&e.is("image-parameter")&&e.name!=="caption"?"":r}lint(e=this.getAbsoluteIndex()){{let{previousSibling:r,bold:n,closing:i}=this,s=(r==null?void 0:r.type)==="text"?r.data:void 0,a=[],l=new W(this,e),p=["lonely-apos","bold-header"],{lintConfig:g}=v,{computeEditInfo:d}=g,f=[void 0,"word"].map(u=>g.getSeverity(p[0],u)),c=g.getSeverity(p[1]);if(s!=null&&s.endsWith("'")){let u=f[(i.bold||i.italic)&&/[a-z\d]'$/iu.test(s)?1:0];if(u){let b=F(this,l,p[0],v.msg("lonely","'"),u),{startLine:h,startCol:T}=b,[,{length:x}]=/(?:^|[^'])('+)$/u.exec(s),y=e-x,k=ge(V({},b),{startIndex:y,endIndex:e,endLine:h,startCol:T-x,endCol:T});d&&n&&(k.suggestions=[Ge(y,"'",x),O(k)]),a.push(k)}}if(c&&n&&this.isInside("heading-title")){let u=F(this,l,p[1],"bold-in-header",c);d&&(u.suggestions=[O(u)]),a.push(u)}return a}}json(e,r,n=this.getAbsoluteIndex()){}};Sr=new WeakMap});var Vl={};Z(Vl,{parseQuotes:()=>_s});var _s,Ws=w(()=>{"use strict";Hl();_s=(o,t,e,r)=>{var c;let n=o.split(/('{2,})/u),{length:i}=n;if(i===1)return o;let s=0,a=0,l,p,g;for(let u=1;u<i;u+=2){let b=n[u].length;switch(b){case 2:a++;break;case 4:n[u-1]+="'",n[u]="'''";case 3:if(s++,l!==void 0)break;n[u-1].endsWith(" ")?p===void 0&&g===void 0&&(g=u):n[u-1].slice(-2,-1)===" "?l=u:p!=null||(p=u);break;default:n[u-1]+="'".repeat(b-5),n[u]="'''''",a++,s++}}if(a%2===1&&s%2===1){let u=(c=l!=null?l:p)!=null?c:g;u!==void 0&&(n[u]="''",n[u-1]+="'")}let d=!1,f=!1;for(let u=1;u<i;u+=2){let b=n[u].length,h=b!==2,T=b!==3,x=new ai(n[u],{bold:h&&!!d,italic:T&&!!f},t,e);h&&(d=!d&&x),T&&(f=!f&&x),n[u]=`\0${e.length-1}q`}return n.join("")}});var Ql={};Z(Ql,{parseExternalLinks:()=>Ds});var Ds,Ms=w(()=>{"use strict";ae();cs();ii();Ds=(o,t,e,r)=>{var n;return(n=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${De}|\0\d+m\x7F)${Me}(?=[[\]<>"\t${Ie}]|\0\d)))([${Ie}]*(?![${Ie}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),o.replace(t.regexExternalLinks,(i,s,a,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(a="",l=s.slice(g.index)+a+l,s=s.slice(0,g.index)),r?(new Ye(s,"ext-link-url",t,e),`[\0${p}f${a}${l}]`):(new Ze(s,a,l,t,e),`\0${p}w`)})}});var li,Jl=w(()=>{"use strict";lr();li=class extends ye{get type(){return"category"}get sortkey(){}json(t,e,r=this.getAbsoluteIndex()){}}});var Kl={};Z(Kl,{parseLinks:()=>Xl});var pp,Xl,Yl=w(()=>{"use strict";ae();D();Ws();Ms();ps();ss();Jl();pp=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Xl=(o,t,e,r,n)=>{var l;(l=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));let i=t.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,s=o.split("[["),a=s.shift();for(let p=0;p<s.length;p++){let g=!1,d,f,c,u,b=s[p],h=i.exec(b);if(h)[,d,f,c,u]=h,u.startsWith("]")&&(c!=null&&c.includes("["))&&(c+="]",u=u.slice(1));else{let N=pp.exec(b);N&&(g=!0,[,d,f,c]=N)}if(d===void 0||t.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){a+=`[[${b}`;continue}let T=re(d).trim(),x=T.startsWith(":");if(x&&g){a+=`[[${b}`;continue}else!T&&c&&!c.includes(`
|
|
30
|
+
`)&&(T=re(c).trim());let{ns:y,valid:k}=v.normalizeTitle(T,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(k){if(g){if(y!==6){a+=`[[${b}`;continue}let N=!1;for(p++;p<s.length;p++){let E=s[p],$=E.split("]]");if($.length>2){N=!0,c+=`[[${$[0]}]]${$[1]}`,u=$.slice(2).join("]]");break}else if($.length===2)c+=`[[${$[0]}]]${$[1]}`;else{c+=`[[${E}`;break}}if(c=Xl(c,t,e,r,n),!N){a+=`[[${d}${f}${c}`;continue}}}else{a+=`[[${b}`;continue}c&&(c=_s(c,t,e,n));let A=hr;x||(y===6?(c&&(c=Ds(c,t,e,!0)),A=mr):y===14&&(A=li)),c===void 0&&f&&(c=""),a+=`\0${e.length}l${u}`,new A(d,c,t,e,f)}return a}});var nd={};Z(nd,{parseMagicLinks:()=>up});var rd,Zl,ed,td,up,id=w(()=>{"use strict";ae();ii();rd=String.raw`[${Ie}\t]| |�*160;|�*a0;`,Zl=`(?:${rd})+`,ed=`(?:${rd}|-)`,td=String.raw`(?:RFC|PMID)${Zl}\d+\b|ISBN${Zl}(?:97[89]${ed}?)?(?:\d${ed}?){9}[\dx]\b`,up=(o,t,e)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${De}${Me})|${td})`,"giu")}catch(r){t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${De}${Me})|${td})`,"giu")}return o.replace(t.regexMagicLinks,(r,n,i)=>{let s=n?r.slice(n.length):r;if(i){let a="",l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(a=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),a=s.slice(g.index+d)+a,s=s.slice(0,g.index+d)}return a.length>=i.length?r:(new Ye(s,void 0,t,e),`${n}\0${e.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return r;return new Ye(s,"magic-link",t,e),`${n}\0${e.length-1}i`})}});var sd,od=w(()=>{"use strict";sd=(o,t)=>o.startsWith(t)?t.length:[...t].findIndex((e,r)=>e!==o[r])});var fp,di,ad=w(()=>{"use strict";z();D();js();fp=new Set(["link","category","file"]),di=class extends vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){var e;{let r="syntax-like",n=v.lintConfig.getSeverity(r,"redirect"),{innerText:i}=this;if(n&&i==="#"){let{nextSibling:s}=this;if((s==null?void 0:s.type)==="text"&&fp.has((e=s.nextSibling)==null?void 0:e.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${s.data}`)){let l=F(s,{start:t+1},r,"redirect-like",n);return l.startIndex--,l.startCol--,l.endIndex+=2,l.endCol+=2,[l]}}return[]}}}});var ld={};Z(ld,{parseList:()=>cp});var cp,dd=w(()=>{"use strict";od();ad();Os();cp=(o,t,e,r)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(o);if(!n)return t.lastPrefix="",o;let[i,s,a,l]=n,p=a.replace(/;/gu,":"),g=sd(p,t.lastPrefix),d=((g>1?a.slice(g-1):a)+l).split(/(?=;)/u),f=d[0].startsWith(";"),c=d.length-(f?0:1);if(g>1){let q=a.slice(0,g-1);if(f){let K=q.split(/(?=;)/u);d.unshift(...K),c+=q.includes(";")?K.length:0}else d[0]=q+d[0]}t.lastPrefix=p;let u=s+d.map((q,K)=>`\0${r.length+K}d`).join("")+o.slice(i.length);for(let q of d)new di(q,e,r);if(!c)return u;let[b,,h]=e.html,T=/:+|-\{|\0\d+[xq]\x7F/gu,x=T,y=x.exec(u),k=0,A=!1,N=!1,E=0,$=(q,K)=>(new Ar(q,e,r),`${u.slice(0,K)}\0${r.length-1}d${u.slice(K+q.length)}`),H=q=>{q?k&&k--:k++};for(;y&&c;){let{0:q,index:K}=y;if(q==="-{"){if(!E){let{lastIndex:_}=x;x=/-\{|\}-/gu,x.lastIndex=_}E++}else if(q==="}-"){if(E--,!E){let{lastIndex:_}=x;x=T,x.lastIndex=_}}else if(q.endsWith("x")){let{name:_,closing:U,selfClosing:M}=r[Number(q.slice(1,-2))];(b.includes(_)||!M&&!h.includes(_))&&H(U)}else if(q.endsWith("q")){let{bold:_,italic:U}=r[Number(q.slice(1,-2))];_&&(H(A),A=!A),U&&(H(N),N=!N)}else if(k===0){if(q.length>=c)return $(q.slice(0,c),K);c-=q.length,x.lastIndex=K+4+String(r.length).length,u=$(q,K)}y=x.exec(u)}return u}});var Us,gd,nt,zs,mp,Vt,pd=w(()=>{"use strict";z();oe();Qr();be();D();G();dt();Us=new Set(["A","T","R","D","-","H","N"]);gd=[ut(),Q];Vt=class extends(mp=L){constructor(e,r,n=[]){super(void 0,r,n,{});S(this,nt);this.safeAppend(e.map(i=>new ue(i,"converter-flag",r,n)))}get type(){return"converter-flags"}afterBuild(){C(this,nt,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(m(this,nt).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(m(this,nt).filter(r=>e.has(r)))}isInvalidFlag(e,r,n){return!!e&&!r.has(e)&&!n.has(e)&&(r.size>0||!Us.has(e))}lint(e=this.getAbsoluteIndex(),r){{let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=m(this,nt).filter(u=>!u).length,a=m(this,nt).length-i.size-s,{lintConfig:l}=v,{computeEditInfo:p,fix:g}=l,d=super.lint(e,r);if(n.size===a||m(this,nt).filter(u=>Us.has(u)).length===a)return d;let f="no-ignored",c=l.getSeverity(f,"conversionFlag");if(c){let u=new W(this,e);for(let b=0;b<this.length;b++){let h=this.childNodes[b],T=h.text().trim();if(this.isInvalidFlag(T,n,i)){let x=j(h,u,f,"invalid-conversion-flag",c);(p||g)&&(n.size===0&&Us.has(T.toUpperCase())?x.fix=On(x,T):p&&(x.suggestions=[O(x,b&&-1)])),d.push(x)}}}return d}}print(){}};zs=B(mp),nt=new WeakMap,Vt=P(zs,0,"ConverterFlagsToken",gd,Vt),R(zs,1,Vt)});var Gs,ud,Hs,hp,it,fd=w(()=>{"use strict";be();D();G();dt();Gs=(o,t,e,r)=>{let n=new L(o,e,r);return n.type=`converter-rule-${t}`,n.setAttribute("stage",11),n};ud=[Q];it=class extends(hp=L){get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,r=v.getConfig(),n=[]){super(void 0,r,n,{});let i=t.indexOf(":"),s=t.slice(0,i).indexOf("=>"),a=s===-1?t.slice(0,i):t.slice(s+2,i);e&&r.variants.includes(a.trim().toLowerCase())?(super.insertAt(new ue(a,"converter-rule-variant",r,n)),super.insertAt(Gs(t.slice(i+1),"to",r,n)),s!==-1&&super.insertAt(Gs(t.slice(0,s),"from",r,n),0)):super.insertAt(Gs(t,"to",r,n))}toString(t){let{childNodes:e,firstChild:r,lastChild:n}=this;return e.length===3?`${r.toString(t)}=>${e[1].toString(t)}:${n.toString(t)}`:super.toString(t,":")}text(){let{childNodes:t,firstChild:e,lastChild:r}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${r.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){}json(t,e,r=this.getAbsoluteIndex()){}};Hs=B(hp),it=P(Hs,0,"ConverterRuleToken",ud,it),R(Hs,1,it)});var cd,Vs,xp,Qt,md=w(()=>{"use strict";ae();qe();be();G();pd();fd();cd=[Q,pe("-{")];Qt=class extends(xp=L){get type(){return"converter"}constructor(t,e,r,n=[]){super(void 0,r,n),this.insertAt(new Vt(t,r,n));let[i]=e,s=i.includes(":"),a=new it(i,s,r,n);(s?a.length===1:e.length===2&&!re(e[1]).trim())?this.insertAt(new it(e.join(";"),!1,r,n)):this.safeAppend([a,...e.slice(1).map(l=>new it(l,!0,r,n))])}toString(t){let[e,...r]=this.childNodes;return`-{${e.toString(t)}${e.length>0?"|":""}${r.map(n=>n.toString(t)).join(";")}}-`}text(){let[t,...e]=this.childNodes;return`-{${t.text()}|${Ee(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){}};Vs=B(xp),Qt=P(Vs,0,"ConverterToken",cd,Qt),R(Vs,1,Qt)});var hd={};Z(hd,{parseConverter:()=>bp});var bp,xd=w(()=>{"use strict";md();bp=(o,t,e)=>{var l;(l=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));let r=/-\{/gu,n=/-\{|\}-/gu,i=[],s=r,a=s.exec(o);for(;a;){let{0:p,index:g}=a;if(p==="}-"){let d=i.pop(),{length:f}=e,c=o.slice(d.index+2,g),u=c.indexOf("|"),[b,h]=u===-1?[[],c]:[c.slice(0,u).split(";"),c.slice(u+1)],T=h.replace(/(&[#a-z\d]+);/giu,"$1"),x=T.split(t.regexConverter).map(y=>y.replace(/\x01/gu,";"));new Qt(b,x,t,e),o=`${o.slice(0,d.index)}\0${f}v${o.slice(g+2)}`,i.length===0&&(s=r),s.lastIndex=d.index+3+String(f).length}else i.push(a),s=n,s.lastIndex=g+2;a=s.exec(o)}return o}});var gi={};Z(gi,{Token:()=>L});var yp,xn,Ce,ee,te,Cr,wr,bn,Er,X,bd,yd,Td,kd,vd,Ad,Sd,Cd,wd,Ed,Ld,Nd,Qs,L,G=w(()=>{"use strict";ae();z();Se();D();Do();Go();yp=["category","html-attr#id,ext-attr#id,table-attr#id"],Qs=class Qs extends Ct{constructor(e,r=v.getConfig(),n=[],i){super();S(this,X);S(this,xn,"plain");S(this,Ce,0);S(this,ee);S(this,te);S(this,Cr);S(this,wr,!1);S(this,bn);S(this,Er);typeof e=="string"&&this.insertAt(e),C(this,ee,r),C(this,te,n),n.push(this)}get type(){return m(this,xn)}set type(e){C(this,xn,e)}get pageName(){return m(this.getRootNode(),Er)}set pageName(e){if(e){let r=this.normalizeTitle(e,0,{temporary:!0,page:""});C(this,Er,r.valid?r.title:void 0)}else C(this,Er,e===""?"":void 0)}parseOnce(e=m(this,Ce),r=!1,n){if(e<m(this,Ce)||this.length!==1||!this.isPlain())return this;if(m(this,Ce)>=11)return this;switch(e){case 0:if(this.type==="root"){m(this,te).pop();let i=I(this,X,bd).call(this);r&&(r=!i)}C(this,Cr,r),I(this,X,yd).call(this,r);break;case 1:I(this,X,Td).call(this);break;case 2:I(this,X,kd).call(this);break;case 3:I(this,X,vd).call(this);break;case 4:I(this,X,Ad).call(this);break;case 5:I(this,X,Sd).call(this,n);break;case 6:I(this,X,Cd).call(this,n);break;case 7:I(this,X,wd).call(this);break;case 8:I(this,X,Ed).call(this);break;case 9:I(this,X,Ld).call(this);break;case 10:I(this,X,Nd).call(this)}if(this.type==="root")for(let i of m(this,te))i==null||i.parseOnce(e,r,n);return $n(this,Ce)._++,this}buildFromStr(e,r){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return i&&new Gr(i);let a=Number(i.slice(0,-1));return m(this,te)[a]}).filter(i=>i!=="");return r===0?n.map(String).join(""):r===1?Ee(n):n}build(){C(this,Ce,11);let{length:e,firstChild:r}=this,n=r==null?void 0:r.toString();if(e===1&&r.type==="text"&&n.includes("\0")&&(Dn(this,0,1,this.buildFromStr(n)),this.type==="root"))for(let i of m(this,te))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of m(this,te))e==null||e.afterBuild();C(this,wr,!0)}parse(e=11,r,n){for(e=Math.min(e,11);m(this,Ce)<e;)this.parseOnce(m(this,Ce),r,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Qs}getAttribute(e){var r;switch(e){case"config":return m(this,ee);case"include":return(r=m(this,Cr))!=null?r:!!m(this.getRootNode(),Cr);case"accum":return m(this,te);case"built":return m(this,wr);case"stage":return m(this,Ce);default:return super.getAttribute(e)}}setAttribute(e,r){e==="stage"?(m(this,Ce)===0&&this.type==="root"&&m(this,te).shift(),C(this,Ce,r)):super.setAttribute(e,r)}insertAt(e,r=this.length){let n=typeof e=="string"?new Gr(e):e,{length:i}=this;r+=r<0?i:0,super.insertAt(n,r);let{type:s}=n;return s==="root"&&(n.type="plain"),n}normalizeTitle(e,r=0,n){return v.normalizeTitle(e,r,this.getAttribute("include"),m(this,ee),V({page:this.pageName},n))}inTableAttrs(){var e;return this.isInside("table-attrs")&&((e=this.closest("table-attrs,arg,parameter"))!=null&&e.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(e=this.getAbsoluteIndex(),r){var n;{let{lintConfig:i}=v,{computeEditInfo:s,fix:a,ignoreDisables:l,configurationComment:p}=i,g=super.lint(e,r);if(this.type==="root"){let d=new Map,f="no-duplicate",c=["category","id"].map(h=>i.getSeverity(f,h)),u=this.toString(),b=yp.filter((h,T)=>c[T]).join();if(b){for(let h of this.querySelectorAll(b)){let T;if(h.is("category"))T=h.name;else{let x=h.getValue();x&&x!==!0&&(T=`#${x}`)}if(T){let x=d.get(T);x?x.add(h):d.set(T,new Set([h]))}}for(let[h,T]of d)if(T.size>1&&!h.startsWith("#mw-customcollapsible-")){let x=!h.startsWith("#"),y=`duplicate-${x?"category":"id"}`,k=c[x?0:1];g.push(...[...T].map(A=>{let N=F(A,{start:A.getAbsoluteIndex()},f,y,k);return s&&x&&(N.suggestions=[O(N)]),N}))}}if(!l){let h=new RegExp(String.raw`<!--\s*${p}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),T=[],x=h.exec(u);for(;x;){let{1:y,index:k}=x,A=(n=x[2])==null?void 0:n.trim(),N;(y==="disable-line"||y==="disable-next-line")&&(N=this.posFromIndex(k).top+(y==="disable-line"?0:1)),T.push({line:N,from:y==="disable"?h.lastIndex:void 0,to:y==="enable"?h.lastIndex:void 0,rules:A?new Set(A.split(",").map(E=>E.trim())):void 0}),x=h.exec(u)}g=g.filter(({rule:y,startLine:k,startIndex:A})=>{let N={pos:0};for(let{line:E,from:$,to:H,rules:q}of T){if(E&&E>k+1)break;if(q&&!q.has(y))continue;if(E===k)return!1;$<=A&&$>N.pos?(N.pos=$,N.type="from"):H<=A&&H>N.pos&&(N.pos=H,N.type="to")}return N.type!=="from"})}if(a&&g.some(({fix:h})=>h)){let h=g.map(({fix:y})=>y).filter(y=>y!==void 0).sort(({range:[y,k]},{range:[A,N]})=>k===N?A-y:N-k),T=1/0,x=u;for(let{range:[y,k],text:A}of h)k<=T&&(x=x.slice(0,y)+A+x.slice(k),T=y);Object.assign(g,{output:x})}if(!s)for(let h of g)delete h.fix,delete h.suggestions}return g}}toString(e,r){return e?super.toString(!0,r):je(m(this,bn),()=>super.toString(!1,r),n=>{let i=this.getRootNode();i.type==="root"&&m(i,wr)&&C(this,bn,n)})}};xn=new WeakMap,Ce=new WeakMap,ee=new WeakMap,te=new WeakMap,Cr=new WeakMap,wr=new WeakMap,bn=new WeakMap,Er=new WeakMap,X=new WeakSet,bd=function(){let{parseRedirect:e}=(ta(),J(ea)),r=this.firstChild.toString(),n=e(r,m(this,ee),m(this,te));return n!==!1&&this.setText(n),!!n},yd=function(e){let{parseCommentAndExt:r}=(Zr(),J(Al));this.setText(r(this.firstChild.toString(),m(this,ee),m(this,te),e))},Td=function(){let{parseBraces:e}=(ei(),J(za)),r=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(r,m(this,ee),m(this,te));this.setText(this.type==="root"?n:n.slice(1))},kd=function(){if(m(this,ee).excludes.includes("html"))return;let{parseHtml:e}=(El(),J(wl));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},vd=function(){if(m(this,ee).excludes.includes("table"))return;let{parseTable:e}=(_l(),J(ql));this.setText(e(this,m(this,ee),m(this,te)))},Ad=function(){if(m(this,ee).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Gl(),J(zl));this.setText(e(this,m(this,ee),m(this,te)))},Sd=function(e){let{parseLinks:r}=(Yl(),J(Kl));this.setText(r(this.firstChild.toString(),m(this,ee),m(this,te),this.pageName,e))},Cd=function(e){let{parseQuotes:r}=(Ws(),J(Vl)),n=this.firstChild.toString().split(`
|
|
31
31
|
`);for(let i=0;i<n.length;i++)n[i]=r(n[i],m(this,ee),m(this,te),e);this.setText(n.join(`
|
|
32
|
-
`))},wd=function(){let{parseExternalLinks:e}=(
|
|
32
|
+
`))},wd=function(){let{parseExternalLinks:e}=(Ms(),J(Ql));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},Ed=function(){let{parseMagicLinks:e}=(id(),J(nd));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},Ld=function(){if(m(this,ee).excludes.includes("list"))return;let{parseList:e}=(dd(),J(ld)),{firstChild:r,type:n,name:i}=this,s=r.toString().split(`
|
|
33
33
|
`),a={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],a,m(this,ee),m(this,te));this.setText(s.join(`
|
|
34
|
-
`))},Nd=function(){if(m(this,ee).variants.length>0){let{parseConverter:e}=(
|
|
34
|
+
`))},Nd=function(){if(m(this,ee).variants.length>0){let{parseConverter:e}=(xd(),J(hd));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))}};L=Qs});var ne,Yn,Pl,Qo,Dn,Ra,Bl,Se=w(()=>{"use strict";ne={running:!1,run(o,t){let{running:e}=this;this.running=!0;let r=t==null?void 0:t.internal;t&&(t.internal=!0);let n=()=>{this.running=e,t&&(t.internal=r)};try{let{Token:i}=(G(),J(gi)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,t){let{internal:e}=t;t.internal=!0;let r=o();return t.internal=e,r},rev:0},Yn=o=>t=>t.type===o,Pl=({type:o})=>o==="tr"||o==="table-syntax",Qo=o=>o==="redirect-target"||o==="link",Dn=(o,t,e,r=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=r):i=Array.prototype.splice.apply(n,[t,e,...r]);for(let l=0;l<r.length;l++){let p=r[l];p.setAttribute("parentNode",o),p.setAttribute("nextSibling",n[t+l+1]),p.setAttribute("previousSibling",n[t+l-1])}return(s=n[t-1])==null||s.setAttribute("nextSibling",n[t]),(a=n[t+r.length])==null||a.setAttribute("previousSibling",n[t+r.length-1]),n===r&&o.setAttribute("childNodes",n),i},Ra=(o,t)=>{let e=o.toLowerCase(),[r,n]=t,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(r,e)&&r[e]]},Bl=(o,t)=>Array.from({length:o},(e,r)=>t(r))});var yn,Tp,$d,Id,kp,Fd,vp,Js,Lr,Tn,Rd=w(()=>{"use strict";Ti();yn=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),Tp={"arg-in-ext":1,"blank-alt":1,"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-json":[2,{duplicate:1}],"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"syntax-like":[2,{}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},$d={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},Id=o=>yn.has(o),kp=o=>Id(o)||Array.isArray(o)&&Id(o[0])&&(o.length===1||typeof o[1]=="object"),Fd=(o,t,e)=>{if(!Rr.includes(t))throw new RangeError(`Unknown lint rule: ${t}`);if(e===void 0)return!1;if(kp(e))return o[t]=e,!0;throw new RangeError(`Invalid lint config for ${t}: ${JSON.stringify(e)}`)},vp=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),Js=class{constructor(t){if(Object.assign(this,vp(Tp)),!!t)for(let e in t)Fd(this,e,t[e])}getSeverity(t,e){var n,i;let r=this[t];return typeof r!="object"?yn.get(r):e&&(i=yn.get((n=r[1])==null?void 0:n[e]))!=null?i:yn.get(r[0])}},Tn=class{constructor(t){S(this,Lr);if(Object.assign(this,$d),t&&!("rules"in t)&&Object.keys(t).some(r=>Rr.includes(r)))this.rules=t;else{let e=t!=null?t:{},{rules:r}=e,n=Nn(e,["rules"]);this.rules=r;for(let i in n){let s=n[i];s!==void 0&&Object.prototype.hasOwnProperty.call($d,i)&&(this[i]=s)}}}get rules(){return m(this,Lr)}set rules(t){C(this,Lr,new Proxy(new Js(t),{set:Fd,deleteProperty(){return!1}}))}getSeverity(t,e){return m(this,Lr).getSeverity(t,e)}};Lr=new WeakMap});var Pd,vn,An,Jt,Nr,Xt,pi,Bd,kn,jd=w(()=>{"use strict";ze();ae();Pd=o=>{let[,{length:t},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[t/3,e]},kn=class{constructor(t,e,r,{temporary:n,decode:i,selfLink:s,page:a}={}){S(this,pi);S(this,vn);S(this,An);S(this,Jt);S(this,Nr);S(this,Xt);ce(this,"page");ce(this,"valid");ce(this,"encoded",!1);this.page=a;let l=t.trim(),p=l.startsWith("../");if(i&&t.includes("%"))try{let c=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(t);t=St(t),this.encoded=c}catch(c){}if(t=Br(t).replace(/[_ ]+/gu," ").trim(),p||a&&l.startsWith("/"))C(this,Nr,0);else{let c=e;t.startsWith(":")&&(c=0,t=t.slice(1).trim());let u=t.split(":");if(u.length>1){let b=Ue(u[0]),h=Object.prototype.hasOwnProperty.call(r.nsid,b)&&r.nsid[b];h&&(c=h,t=u.slice(1).join(":").trim())}C(this,Nr,c)}let g=t.indexOf("#");if(g!==-1){let c=t.slice(g).trim().slice(1);if(c.includes("%"))try{c=St(c)}catch(u){}C(this,Xt,c.replace(/ /gu,"_")),t=t.slice(0,g).trim()}let[d,f]=p?Pd(t):[0,t];this.valid=!!(t||s&&this.ns===0&&m(this,Xt)!==void 0)&&Br(t)===t&&(d===0||a===void 0||a.split("/",d+1).length>d)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(f),this.main=t,C(this,An,r.namespaces),C(this,Jt,r.articlePath||"/wiki/$1"),m(this,Jt).includes("$1")||C(this,Jt,m(this,Jt)+`${m(this,Jt).endsWith("/")?"":"/"}$1`)}get ns(){return m(this,Nr)}get fragment(){return m(this,Xt)}get main(){return m(this,vn)}set main(t){t=t.replace(/_/gu," ").trim(),C(this,vn,t&&t[0].toUpperCase()+t.slice(1))}get prefix(){let t=m(this,An)[this.ns];return t+(t&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:t}=this,e=t.lastIndexOf(".");return e===-1?void 0:t.slice(e+1).toLowerCase()}getRedirection(){let{prefix:t}=this,e=t;return I(this,pi,Bd).call(this,e)}setFragment(t){C(this,Xt,t)}getUrl(t){throw new Error("Title.getUrl method is only available in the LSP version!")}};vn=new WeakMap,An=new WeakMap,Jt=new WeakMap,Nr=new WeakMap,Xt=new WeakMap,pi=new WeakSet,Bd=function(t){var r,n;let e=(t+this.main).replace(/ /gu,"_");if(e.startsWith("/"))e=((r=this.page)!=null?r:"")+e.replace(/(.)\/$/u,"$1");else if(e.startsWith("../")&&((n=this.page)!=null&&n.includes("/"))){let[i,s]=Pd(e),a=this.page.split("/");a.length>i&&(e=a.slice(0,-i).join("/")+(s&&"/")+s)}return[!1,e]}});var Xs,Od,qd,Sp,Sn,_d,Cp,v,D=w(()=>{Ti();Se();Or();ae();Rd();jd();Xs=!0,Od=new Tn,Sp=(o,t,e)=>typeof o=="string"?[!!t,e,o]:[!!o,t,e],Sn={config:ki,get rules(){return Rr},get i18n(){return V(V({},void 0),qd)},set i18n(o){qd=o},get lintConfig(){return Od},set lintConfig(o){Od=new Tn(o)},get viewOnly(){return Xs},set viewOnly(o){Xs&&!o&&ne.rev++,Xs=o},internal:!1,getConfig(o){let t=o!=null?o:this.config,{doubleUnderscore:e,ext:r,parserFunction:n,variable:i}=t;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return r.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),n[1].TRANSLATIONLANGUAGE="translationlanguage"),ge(V(V({},ki),t),{excludes:[]})},msg(o,t=""){var e;return o&&((e=this.i18n[o])!=null?e:o).replace("$1",this.msg(t))},normalizeTitle(o,t=0,e,r=Sn.getConfig(),n){let i;if(n!=null&&n.halfParsed)i=new kn(o,t,r,n);else{let{Token:s}=(G(),J(gi));i=ne.run(()=>{let a=new s(o,r);a.type="root",a.pageName=n==null?void 0:n.page,a.parseOnce(0,e).parseOnce();let l=new kn(a.firstChild.toString(),t,r,n);a.build();for(let p of["main","fragment"]){let g=l[p];if(g!=null&&g.includes("\0")){let d=a.buildFromStr(g,1);p==="main"?l.main=d:l.setFragment(d)}}return l},this)}return i},parse(o,t,e,r,n){o=fo(o);let i,s,a,l;typeof t=="string"?(i=!!e,s=r,a=n,l=t):(i=!!t,s=e,a=r,l=n),s!=null||(s=11),a!=null||(a=this.getConfig());let p;typeof s!="number"&&(p=Array.isArray(s)?s:[s],s=Math.max(...p.map(f=>po[f]||11)));let{Token:g}=(G(),J(gi));return ne.run(()=>{let f=new g(o,a);return f.type="root",f.pageName=l,f.parse(s,i)})},parseWithRef(o,t,e,r=t.getAttribute("include")){return this.parse(o,r,e,t.getAttribute("config"),t.pageName)},createLanguageService(o={}){},lint(o,t,e,r){{let[n,i,s]=Sp(t,e,r);return ne.internal(()=>this.parse(o,n,void 0,i,s).lint(),this)}},print(o,t,e,r){}},_d={},Cp=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(let o in Sn)Cp.has(o)||(_d[o]={enumerable:!1});Object.defineProperties(Sn,_d);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Sn});v=Sn});D();})();
|