wikiparser-node 1.35.1 → 1.35.2
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 +1 -1
- package/bundle/bundle-lsp.min.js +1 -1
- package/dist/bin/config.js +1 -1
- package/dist/lib/text.js +2 -2
- package/extensions/dist/base.js +1 -1
- package/package.json +12 -12
package/bundle/bundle-es8.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";(()=>{var eo=Object.create;var vt=Object.defineProperty,$d=Object.defineProperties,to=Object.getOwnPropertyDescriptor,Id=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertyNames,Cn=Object.getOwnPropertySymbols,Rd=Object.getPrototypeOf,mi=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable;var no=(o,r)=>(r=Symbol[o])?r:Symbol.for("Symbol."+o),Yt=o=>{throw TypeError(o)};var wn=(o,r,e)=>r in o?vt(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,V=(o,r)=>{for(var e in r||(r={}))mi.call(r,e)&&wn(o,e,r[e]);if(Cn)for(var e of Cn(r))ro.call(r,e)&&wn(o,e,r[e]);return o},ge=(o,r)=>$d(o,Id(r)),Zs=(o,r)=>vt(o,"name",{value:r,configurable:!0});var hi=(o,r)=>{var e={};for(var t in o)mi.call(o,t)&&r.indexOf(t)<0&&(e[t]=o[t]);if(o!=null&&Cn)for(var t of Cn(o))r.indexOf(t)<0&&ro.call(o,t)&&(e[t]=o[t]);return e};var w=(o,r)=>()=>(o&&(r=o(o=0)),r);var io=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports),Z=(o,r)=>{for(var e in r)vt(o,e,{get:r[e],enumerable:!0})},so=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Fd(r))!mi.call(o,n)&&n!==e&&vt(o,n,{get:()=>r[n],enumerable:!(t=to(r,n))||t.enumerable});return o};var Pd=(o,r,e)=>(e=o!=null?eo(Rd(o)):{},so(r||!o||!o.__esModule?vt(e,"default",{value:o,enumerable:!0}):e,o)),X=o=>so(vt({},"__esModule",{value:!0}),o);var B=o=>{var r;return[,,,eo((r=o==null?void 0:o[no("metadata")])!=null?r:null)]},oo=["class","method","getter","setter","accessor","field","value","get","set"],Fr=o=>o!==void 0&&typeof o!="function"?Yt("Function expected"):o,Bd=(o,r,e,t,n)=>({kind:oo[o],name:r,metadata:t,addInitializer:i=>e._?Yt("Already initialized"):n.push(Fr(i||null))}),Rr=(o,r)=>wn(r,no("metadata"),o[3]),R=(o,r,e,t)=>{for(var n=0,i=o[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},P=(o,r,e,t,n,i)=>{var s,a,l,u,g,d=r&7,p=!!(r&8),c=!!(r&16),f=d>3?o.length+1:d?p?1:2:0,h=oo[d+5],x=d>3&&(o[f-1]=[]),T=o[f]||(o[f]=[]),b=d&&(!c&&!p&&(n=n.prototype),d<5&&(d>3||!c)&&to(d<4?n:{get[e](){return m(this,i)},set[e](k){return C(this,i,k)}},e));d?c&&d<4&&Zs(i,(d>2?"set ":d>1?"get ":"")+e):Zs(n,e);for(var y=t.length-1;y>=0;y--)u=Bd(d,e,l={},o[3],T),d&&(u.static=p,u.private=c,g=u.access={has:c?k=>jd(n,k):k=>e in k},d^3&&(g.get=c?k=>(d^1?m:I)(k,n,d^4?i:b.get):k=>k[e]),d>2&&(g.set=c?(k,A)=>C(k,n,A,d^4?i:b.set):(k,A)=>k[e]=A)),a=(0,t[y])(d?d<4?c?i:b[h]:d>4?void 0:{get:b.get,set:b.set}:n,u),l._=1,d^4||a===void 0?Fr(a)&&(d>4?x.unshift(a):d?c?i=a:b[h]=a:n=a):typeof a!="object"||a===null?Yt("Object expected"):(Fr(s=a.get)&&(b.get=s),Fr(s=a.set)&&(b.set=s),Fr(s=a.init)&&x.unshift(s));return d||Rr(o,n),b&&vt(n,e,b),c?d^4?i:b:n},ce=(o,r,e)=>wn(o,typeof r!="symbol"?r+"":r,e),bi=(o,r,e)=>r.has(o)||Yt("Cannot "+e),jd=(o,r)=>Object(r)!==r?Yt('Cannot use the "in" operator on this value'):o.has(r),m=(o,r,e)=>(bi(o,r,"read from private field"),e?e.call(o):r.get(o)),S=(o,r,e)=>r.has(o)?Yt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),C=(o,r,e,t)=>(bi(o,r,"write to private field"),t?t.call(o,e):r.set(o,e),e),I=(o,r,e)=>(bi(o,r,"access private method"),e);var En=(o,r,e,t)=>({set _(n){C(o,r,n,e)},get _(){return m(o,r,t)}});var ao,Pr,xi=w(()=>{"use strict";ao=(()=>{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})(),Pr=(()=>{let o=["arg-in-ext","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,r,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(t,n)=>ke(String(r[n]),r,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(t,n)=>String(r[n])):o.replace(/\0(\d+)\x7F/gu,(t,n)=>r[n])}var Ie,lo,De,Me,Ue,Br,go,re,Ee,Od,qd,Ln,jr,uo,_d,Wd,hu,ae=w(()=>{"use strict";Ie=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,lo=String.raw`[^[\]<>"\0-\x1F\x7F${Ie}\uFFFD]`,De=String.raw`(?:\[[\da-f:.]+\]|${lo})`,Me=String.raw`(?:${lo}|\0\d+[cn!~]\x7F)*`,Ue=o=>o.trim().toLowerCase();Br=(o,r)=>e=>e.replace(o,r),go=Br(/[\0\x7F]|\r$/gmu,""),re=Br(/\0\d+[cn]\x7F/gu,""),Ee=(o,r="")=>o.map(e=>typeof e=="string"?e:e.text()).join(r),Od={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},qd=Br(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Od[e.toLowerCase()]),jr=o=>(Ln!=null||(Ln=qd),Ln(o)),uo=Br(/&#(\d+|x[\da-f]+);/giu,(o,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),_d={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Wd=(o=/[&<>"{}[\]|]/gu)=>Br(o,r=>`&${_d[r]};`),hu=Wd(/[&<>]/gu)});var po=io((xu,Dd)=>{Dd.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 fo,Or,yi,Nn=w(()=>{"use strict";fo=new Set(["alt","link","lang","page","caption"]),Or=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),yi=po()});function Be(o){let r=new Map,e=new WeakMap;return t=>{let n=typeof t=="string"?r:e;if(n.has(t)){let s=n.get(t);return s.lastIndex=0,s}let i=o(t);return n.set(t,i),i}}var At,$n,Ti,Md,co,ze=w(()=>{"use strict";At=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25"));$n=o=>{let r=[],e=0;for(let t of o.split(`
|
|
2
|
-
`)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},Ti=o=>o&&Number(o[1]),Md=(o,r)=>{var n;let e,t=i=>{e!=null||(e=$n(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of r){let{line:s,column:a,from:l,to:u}=i;l==null?s?(e!=null||(e=$n(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,t(l)),u!==void 0&&({line:i.endLine,column:i.endColumn}=t(u)),i.position=i.from}return r},co=(o,r)=>{if(r||o.trim())try{JSON.parse(o)}catch(e){let{message:t}=e,n=Ti(/\bline (\d+)/u.exec(t)),i=Ti(/\bcolumn (\d+)/u.exec(t)),s=Ti(/\bposition (\d+)/u.exec(t));return Md(o,[{message:t,line:n,column:i,from:s,severity:"error"}])}return[]}});var qr,Zt,_r,Wr,ki,W,se=w(()=>{"use strict";W=class{constructor(r,e){S(this,Wr);S(this,qr);S(this,Zt);S(this,_r);C(this,qr,r),C(this,Zt,e)}get start(){return m(this,Zt)}get top(){return I(this,Wr,ki).call(this).top}get left(){return I(this,Wr,ki).call(this).left}};qr=new WeakMap,Zt=new WeakMap,_r=new WeakMap,Wr=new WeakSet,ki=function(){var r;return(r=m(this,_r))!=null||C(this,_r,m(this,qr).getRootNode().posFromIndex(m(this,Zt))),m(this,_r)}});var Ud,zd,In,vi,mo,j,F,me,er,O,Fn,Le,Rn,Pn,Bn,st,Ge,jn,je,ho,z=w(()=>{"use strict";ze();Se();se();D();Ud=new Set(["tr","td","th","caption"]),zd=new Set(["Template:!!","Template:!-"]),In=o=>{let r=o.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.is("magic-word")&&r.name==="!"||r.is("template")&&zd.has(r.name)||r.is("html")&&Ud.has(r.name))return!1;if(r.is("arg"))return r.length>1&&In(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(In);return e.includes(2)?2:e.includes(1)&&1}catch(e){}return r.is("template")||r.is("magic-word")&&r.name==="invoke"?1:2},vi=(o,r,e,t)=>({line:o+e-1,character:(e===1?r:0)+t}),mo=o=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof W?e:new W(r,s),{offsetHeight:u,offsetWidth:g}=r,{startIndex:d,startLine:p,startCol:c}=o(r,s,a,l),{line:f,character:h}=vi(p,c,u,g);return{rule:t,message:v.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:p,endLine:f,startCol:c,endCol:h}},j=mo((o,r,e,t)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),F=mo((o,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),me=(o,r,e,t=0)=>({desc:v.msg(r),range:[o.startIndex+t,o.endIndex],text:e}),er=(o,r,e)=>({desc:v.msg(r),range:[o,o],text:e}),O=(o,r=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+r],text:e}:me(o,"remove",e,r),Fn=(o,r)=>me(o,"decode",At(r.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Le=(o,r,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:r}),Rn=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),Pn=(o,r)=>me(o,"comment",`<!--${r}-->`),Bn=(o,r)=>me(o,"uppercase",r.toUpperCase()),st=(o,r=0)=>({desc:v.msg("whitespace"),range:[o,o+r],text:" "}),Ge=(o,r,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:r.repeat(e)}),jn=(o,r)=>({desc:v.msg("escape"),range:[o,o+r.length],text:r.replace(/\|/gu,"|")}),je=(o,r,e,t)=>{if(o&&(t||v.viewOnly&&o[0]===oe.rev))return o[1];let n=r();return(t||v.viewOnly)&&e([oe.rev,n]),n},ho=(o,r)=>o==="ol"&&r==="type"?["1","a","A","i","I"]:o==="th"&&r==="scope"?["row","col","rowgroup","colgroup"]:r==="dir"?["ltr","rtl","auto"]:r==="aria-hidden"?["true","false"]:[]});var Gd,On,Ai=w(()=>{"use strict";Gd=o=>{if(o.includes("#")){let r=o.indexOf("#"),e=o.slice(0,r),t=o.slice(r+1);return(n,i)=>(r===0||n===e)&&i===t}return r=>r===o},On=(o,r,e)=>{if(o=o.trim(),!o)return(()=>!0);let t=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Gd);return(({type:n,name:i})=>t.some(s=>s(n,i)))}});var xo=io(($u,bo)=>{bo.exports=function(o,r,e,t,n){var i,s;if(t===void 0)t=0;else if(t=t|0,t<0||t>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<t||n>=o.length)throw new RangeError("invalid upper bound");for(;t<=n;)if(i=t+(n-t>>>1),s=+e(o[i],r,i,o),s<0)t=i+1;else if(s>0)n=i-1;else return i;return~t}});var yo,To,ko=w(()=>{"use strict";yo=Pd(xo()),To=(o,r,e)=>{let t=(0,yo.default)(o,r,e);return t<0?~t:t}});var tr,qn=w(()=>{"use strict";z();tr=(o=!0)=>r=>{let e=new WeakMap;return function(...t){return je(e.get(this),()=>r.apply(this,t),n=>{e.set(this,n)},o)}}});var vo,Ao=w(()=>{"use strict";vo=o=>{class r 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 r}});var So,Co,Mr,rr,nr,Ur,ir,sr,Dr,Oe,Si=w(()=>{"use strict";ze();ko();z();Se();qn();Ao();D();Co=[vo],So=[tr(!1)];Oe=class{constructor(){R(Dr,5,this);ce(this,"childNodes",[]);S(this,Mr);S(this,rr);S(this,nr);S(this,Ur);S(this,ir);S(this,sr,{})}get parentNode(){return m(this,Mr)}get nextSibling(){return m(this,rr)}get previousSibling(){return m(this,nr)}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":C(this,Mr,e),e||(C(this,rr,void 0),C(this,nr,void 0));break;case"nextSibling":C(this,rr,e);break;case"previousSibling":C(this,nr,e);break;case"aIndex":v.viewOnly&&C(this,ir,[oe.rev,e]);break;default:this[r]=e}}getRootNode(){return je(m(this,Ur),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&C(this,Ur,r)})}indexFromPos(r,e){{if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}}posFromIndex(r){{let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=To(t,r,([,,i],s)=>i-s);return{top:n,left:r-t[n][1]}}return}}getDimension(){{let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return je(m(this,sr)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)v.viewOnly&&(m(this,sr)[i]=[oe.rev,n]),n+=e[i].toString().length+this.getGaps(i);return n},e=>{m(this,sr)[r]=e})}getAbsoluteIndex(){return je(m(this,ir),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{C(this,ir,r)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(r){return this.type===r}getLines(){return $n(String(this))}seal(r,e){}lspError(r){throw new Error(`${r} method is only available in the LSP version!`)}};Dr=B(null),Mr=new WeakMap,rr=new WeakMap,nr=new WeakMap,Ur=new WeakMap,ir=new WeakMap,sr=new WeakMap,P(Dr,1,"getLines",So,Oe),Oe=P(Dr,0,"AstNode",Co,Oe),R(Dr,1,Oe)});var wo,Eo=w(()=>{"use strict";Ai();wo=o=>{var r,Ci;{class t extends o{constructor(){super(...arguments);S(this,r)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:u,childNodes:g}=l;if(u!=="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,r,Ci).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let u=a.pop(),{type:g,childNodes:d}=u;if(g!=="text"){s(u)&&l.push(u);for(let p=d.length-1;p>=0;p--)a.push(d[p])}}return l}querySelectorAll(s){return this.getElementsBy(I(this,r,Ci).call(this,s))}escape(){}}return r=new WeakSet,Ci=function(s){return On(s,this)},t}}});var Lo,wi,Hd,St,No=w(()=>{"use strict";ae();Se();Ai();Si();Eo();Lo=[wo];St=class extends(Hd=Oe){get length(){return this.childNodes.length}text(r){return Ee(this.childNodes,r)}removeAt(r){this.lspError("AstElement.removeAt")}insertAt(r,e=this.length){return _n(this,e,0,[r]),r}closest(r){let e=On(r,this),{parentNode:t}=this;for(;t;){if(e(t))return t;({parentNode:t}=t)}}isInside(r){var e;return((e=this.closest(`${r},ext`))==null?void 0:e.type)===r}append(...r){this.safeAppend(r)}safeAppend(r){for(let e of r)this.insertAt(e)}safeReplaceChildren(r){}setText(r,e=0){e+=e<0?this.length:0;let t=this.childNodes[e],{data:n}=t;return t.replaceData(r),n}toString(r,e=""){return this.childNodes.map(t=>t.toString(r)).join(e)}caretPositionFromIndex(r){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(r){this.lspError("AstElement.elementFromIndex")}elementFromPoint(r,e){this.lspError("AstElement.elementFromPoint")}lint(r=this.getAbsoluteIndex(),e){{let t=[];for(let n=0,i=r+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(t,a),i+=s.toString().length+this.getGaps(n)}return t}}print(r={}){}json(r,e=1/0,t=this.getAbsoluteIndex()){}};wi=B(Hd),St=P(wi,0,"AstElement",Lo,St),R(wi,1,St)});var Ei,Io,Vd,Qd,Xd,Jd,$o,Kd,Wn,Fo,zr,Ro=w(()=>{"use strict";ae();z();D();Si();Ei=String.raw`[${Ie}\t]*`,Io=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,Vd=new RegExp(String.raw`${Io}|https?[:/]/+|(?:rfc|pmid)(?=[-::]?${Ei}\d)|isbn(?=[-::]?${Ei}(?:\d(?:${Ei}|-)){6})`,"giu"),Qd=new RegExp(Io,"giu"),Xd=new Set(["attr-value","ext-link-text","link-text"]),Jd={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},$o=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"]),Kd=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(o){return/\w/u}})(),zr=class extends Oe{constructor(e){super();S(this,Wn);ce(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var n,i,s;{if(t===!1)return[];let{data:a,parentNode:l,nextSibling:u,previousSibling:g}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:p}=l;if(d==="attr-value"){let{name:_,tag:U}=p;if(U==="ref"&&(_==="name"||_==="follow")||_==="group"&&(U==="ref"||U==="references")||U==="choose"&&(_==="before"||_==="after"))return[]}if(t!=null||(t=l.isPlain()&&!Xd.has(d)?Vd:Qd),a.search(t)===-1)return[];t.lastIndex=0;let c=[],f=u==null?void 0:u.type,h=u==null?void 0:u.name,x=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")?$o:[]]);for(let _=t.exec(a);_;_=t.exec(a)){let{index:U,0:M}=_,[,be,Jt]=_,bt=M==="["&&d==="ext-link-text";if(Jt&&Jt!=="]"){let{length:ie}=Jt;U+=ie,M=M.slice(ie)}else{if(M.startsWith("<")&&!K.has(be.toLowerCase())||bt&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(U+1))||u!=null&&u.is("ext")&&h==="nowiki"&&((n=u.innerText)!=null&&n.includes("]"))))continue;M.startsWith(`
|
|
2
|
+
`)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},Ti=o=>o&&Number(o[1]),Md=(o,r)=>{var n;let e,t=i=>{e!=null||(e=$n(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of r){let{line:s,column:a,from:l,to:u}=i;l==null?s?(e!=null||(e=$n(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,t(l)),u!==void 0&&({line:i.endLine,column:i.endColumn}=t(u)),i.position=i.from}return r},co=(o,r)=>{if(r||o.trim())try{JSON.parse(o)}catch(e){let{message:t}=e,n=Ti(/\bline (\d+)/u.exec(t)),i=Ti(/\bcolumn (\d+)/u.exec(t)),s=Ti(/\bposition (\d+)/u.exec(t));return Md(o,[{message:t,line:n,column:i,from:s,severity:"error"}])}return[]}});var qr,Zt,_r,Wr,ki,W,se=w(()=>{"use strict";W=class{constructor(r,e){S(this,Wr);S(this,qr);S(this,Zt);S(this,_r);C(this,qr,r),C(this,Zt,e)}get start(){return m(this,Zt)}get top(){return I(this,Wr,ki).call(this).top}get left(){return I(this,Wr,ki).call(this).left}};qr=new WeakMap,Zt=new WeakMap,_r=new WeakMap,Wr=new WeakSet,ki=function(){var r;return(r=m(this,_r))!=null||C(this,_r,m(this,qr).getRootNode().posFromIndex(m(this,Zt))),m(this,_r)}});var Ud,zd,In,vi,mo,j,F,me,er,O,Fn,Le,Rn,Pn,Bn,st,Ge,jn,je,ho,z=w(()=>{"use strict";ze();Se();se();D();Ud=new Set(["tr","td","th","caption"]),zd=new Set(["Template:!!","Template:!-"]),In=o=>{let r=o.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.is("magic-word")&&r.name==="!"||r.is("template")&&zd.has(r.name)||r.is("html")&&Ud.has(r.name))return!1;if(r.is("arg"))return r.length>1&&In(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(In);return e.includes(2)?2:e.includes(1)&&1}catch(e){}return r.is("template")||r.is("magic-word")&&r.name==="invoke"?1:2},vi=(o,r,e,t)=>({line:o+e-1,character:(e===1?r:0)+t}),mo=o=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof W?e:new W(r,s),{offsetHeight:u,offsetWidth:g}=r,{startIndex:d,startLine:p,startCol:c}=o(r,s,a,l),{line:f,character:h}=vi(p,c,u,g);return{rule:t,message:v.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:p,endLine:f,startCol:c,endCol:h}},j=mo((o,r,e,t)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),F=mo((o,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),me=(o,r,e,t=0)=>({desc:v.msg(r),range:[o.startIndex+t,o.endIndex],text:e}),er=(o,r,e)=>({desc:v.msg(r),range:[o,o],text:e}),O=(o,r=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+r],text:e}:me(o,"remove",e,r),Fn=(o,r)=>me(o,"decode",At(r.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Le=(o,r,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:r}),Rn=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),Pn=(o,r)=>me(o,"comment",`<!--${r}-->`),Bn=(o,r)=>me(o,"uppercase",r.toUpperCase()),st=(o,r=0)=>({desc:v.msg("whitespace"),range:[o,o+r],text:" "}),Ge=(o,r,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:r.repeat(e)}),jn=(o,r)=>({desc:v.msg("escape"),range:[o,o+r.length],text:r.replace(/\|/gu,"|")}),je=(o,r,e,t)=>{if(o&&(t||v.viewOnly&&o[0]===oe.rev))return o[1];let n=r();return(t||v.viewOnly)&&e([oe.rev,n]),n},ho=(o,r)=>o==="ol"&&r==="type"?["1","a","A","i","I"]:o==="th"&&r==="scope"?["row","col","rowgroup","colgroup"]:r==="dir"?["ltr","rtl","auto"]:r==="aria-hidden"?["true","false"]:[]});var Gd,On,Ai=w(()=>{"use strict";Gd=o=>{if(o.includes("#")){let r=o.indexOf("#"),e=o.slice(0,r),t=o.slice(r+1);return(n,i)=>(r===0||n===e)&&i===t}return r=>r===o},On=(o,r,e)=>{if(o=o.trim(),!o)return(()=>!0);let t=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Gd);return(({type:n,name:i})=>t.some(s=>s(n,i)))}});var xo=io(($u,bo)=>{bo.exports=function(o,r,e,t,n){var i,s;if(t===void 0)t=0;else if(t=t|0,t<0||t>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<t||n>=o.length)throw new RangeError("invalid upper bound");for(;t<=n;)if(i=t+(n-t>>>1),s=+e(o[i],r,i,o),s<0)t=i+1;else if(s>0)n=i-1;else return i;return~t}});var yo,To,ko=w(()=>{"use strict";yo=Pd(xo()),To=(o,r,e)=>{let t=(0,yo.default)(o,r,e);return t<0?~t:t}});var tr,qn=w(()=>{"use strict";z();tr=(o=!0)=>r=>{let e=new WeakMap;return function(...t){return je(e.get(this),()=>r.apply(this,t),n=>{e.set(this,n)},o)}}});var vo,Ao=w(()=>{"use strict";vo=o=>{class r 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 r}});var So,Co,Mr,rr,nr,Ur,ir,sr,Dr,Oe,Si=w(()=>{"use strict";ze();ko();z();Se();qn();Ao();D();Co=[vo],So=[tr(!1)];Oe=class{constructor(){R(Dr,5,this);ce(this,"childNodes",[]);S(this,Mr);S(this,rr);S(this,nr);S(this,Ur);S(this,ir);S(this,sr,{})}get parentNode(){return m(this,Mr)}get nextSibling(){return m(this,rr)}get previousSibling(){return m(this,nr)}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":C(this,Mr,e),e||(C(this,rr,void 0),C(this,nr,void 0));break;case"nextSibling":C(this,rr,e);break;case"previousSibling":C(this,nr,e);break;case"aIndex":v.viewOnly&&C(this,ir,[oe.rev,e]);break;default:this[r]=e}}getRootNode(){return je(m(this,Ur),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&C(this,Ur,r)})}indexFromPos(r,e){{if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}}posFromIndex(r){{let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=To(t,r,([,,i],s)=>i-s);return{top:n,left:r-t[n][1]}}return}}getDimension(){{let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return je(m(this,sr)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)v.viewOnly&&(m(this,sr)[i]=[oe.rev,n]),n+=e[i].toString().length+this.getGaps(i);return n},e=>{m(this,sr)[r]=e})}getAbsoluteIndex(){return je(m(this,ir),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{C(this,ir,r)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(r){return this.type===r}getLines(){return $n(String(this))}seal(r,e){}lspError(r){throw new Error(`${r} method is only available in the LSP version!`)}};Dr=B(null),Mr=new WeakMap,rr=new WeakMap,nr=new WeakMap,Ur=new WeakMap,ir=new WeakMap,sr=new WeakMap,P(Dr,1,"getLines",So,Oe),Oe=P(Dr,0,"AstNode",Co,Oe),R(Dr,1,Oe)});var wo,Eo=w(()=>{"use strict";Ai();wo=o=>{var r,Ci;{class t extends o{constructor(){super(...arguments);S(this,r)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:u,childNodes:g}=l;if(u!=="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,r,Ci).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let u=a.pop(),{type:g,childNodes:d}=u;if(g!=="text"){s(u)&&l.push(u);for(let p=d.length-1;p>=0;p--)a.push(d[p])}}return l}querySelectorAll(s){return this.getElementsBy(I(this,r,Ci).call(this,s))}escape(){}}return r=new WeakSet,Ci=function(s){return On(s,this)},t}}});var Lo,wi,Hd,St,No=w(()=>{"use strict";ae();Se();Ai();Si();Eo();Lo=[wo];St=class extends(Hd=Oe){get length(){return this.childNodes.length}text(r){return Ee(this.childNodes,r)}removeAt(r){this.lspError("AstElement.removeAt")}insertAt(r,e=this.length){return _n(this,e,0,[r]),r}closest(r){let e=On(r,this),{parentNode:t}=this;for(;t;){if(e(t))return t;({parentNode:t}=t)}}isInside(r){var e;return((e=this.closest(`${r},ext`))==null?void 0:e.type)===r}append(...r){this.safeAppend(r)}safeAppend(r){for(let e of r)this.insertAt(e)}safeReplaceChildren(r){}setText(r,e=0){e+=e<0?this.length:0;let t=this.childNodes[e],{data:n}=t;return t.replaceData(r),n}toString(r,e=""){return this.childNodes.map(t=>t.toString(r)).join(e)}caretPositionFromIndex(r){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(r){this.lspError("AstElement.elementFromIndex")}elementFromPoint(r,e){this.lspError("AstElement.elementFromPoint")}lint(r=this.getAbsoluteIndex(),e){{let t=[];for(let n=0,i=r+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(t,a),i+=s.toString().length+this.getGaps(n)}return t}}print(r={}){}json(r,e=1/0,t=this.getAbsoluteIndex()){}};wi=B(Hd),St=P(wi,0,"AstElement",Lo,St),R(wi,1,St)});var Ei,Io,Vd,Qd,Xd,Jd,$o,Kd,Wn,Fo,zr,Ro=w(()=>{"use strict";ae();z();D();Si();Ei=String.raw`[${Ie}\t]*`,Io=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,Vd=new RegExp(String.raw`${Io}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${Ei}\d)|\bisbn(?=[-::]?${Ei}(?:\d(?:${Ei}|-)){6})`,"giu"),Qd=new RegExp(Io,"giu"),Xd=new Set(["attr-value","ext-link-text","link-text"]),Jd={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},$o=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"]),Kd=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(o){return/\w/u}})(),zr=class extends Oe{constructor(e){super();S(this,Wn);ce(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var n,i,s;{if(t===!1)return[];let{data:a,parentNode:l,nextSibling:u,previousSibling:g}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:p}=l;if(d==="attr-value"){let{name:_,tag:U}=p;if(U==="ref"&&(_==="name"||_==="follow")||_==="group"&&(U==="ref"||U==="references")||U==="choose"&&(_==="before"||_==="after"))return[]}if(t!=null||(t=l.isPlain()&&!Xd.has(d)?Vd:Qd),a.search(t)===-1)return[];t.lastIndex=0;let c=[],f=u==null?void 0:u.type,h=u==null?void 0:u.name,x=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")?$o:[]]);for(let _=t.exec(a);_;_=t.exec(a)){let{index:U,0:M}=_,[,be,Jt]=_,bt=M==="["&&d==="ext-link-text";if(Jt&&Jt!=="]"){let{length:ie}=Jt;U+=ie,M=M.slice(ie)}else{if(M.startsWith("<")&&!K.has(be.toLowerCase())||bt&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(U+1))||u!=null&&u.is("ext")&&h==="nowiki"&&((n=u.innerText)!=null&&n.includes("]"))))continue;M.startsWith(`
|
|
3
3
|
==`)&&(U++,M=M.slice(1))}M=M.toLowerCase();let[Y]=M,xt=M==="rfc"||M==="pmid"||M==="isbn",Ir=Y==="{",di=Y==="}",Qs=Y==="[",gi=Y==="]",{length:it}=M;gi&&(U||it>1)&&t.lastIndex--;let Kt=e+U,yt=Kt+it,fe,Pe,An,Sn,Tt=b[yt],ui=b[Kt-1],pi=Ir||Qs,fi=M==="{"&&ui==="-"&&A.length>0,ci=M==="}"&&Tt==="-"&&A.length>0,Xs=Qs&&f==="free-ext-link"&&!a.slice(U+1).trim()||gi&&x==="free-ext-link"&&!a.slice(0,U).includes("]");if(xt)fe="lonely-http",M=M.toUpperCase(),Pe=$.getSeverity(fe,M);else if(Y==="<"){fe="tag-like";let ie;/^<\/?\s/u.test(M)||!/[\s/>]/u.test(Tt!=null?Tt:"")?ie="invalid":q.has(be)?ie=be:$o.has(be)&&!y.includes(be)&&(ie="disallowed"),Pe=$.getSeverity(fe,ie)}else if(Y==="=")fe="syntax-like",Pe=$.getSeverity(fe,"heading");else if(fi||ci)fe="lonely-bracket",Pe=$.getSeverity(fe,"converter"),fi&&U>0?(M="-{",U--,Kt--,it=2):ci&&U<a.length-1&&(M="}-",yt++,it=2);else if(Xs)fe="lonely-bracket",Pe=$.getSeverity(fe,"extLink");else if(pi||di||gi)if(fe="lonely-bracket",it>1||Ir&&Tt===Y||di&&ui===Y)Pe=$.getSeverity(fe,"double");else{if(!bt){let ie=Jd[Y],we=pi?a.slice(U+1):a.slice(0,U);if(Ir&&((i=ie.exec(we))==null?void 0:i[0])==="}"||di&&((s=ie.exec(we))==null?void 0:s[0])==="{")continue;if(!we.includes(Y)){let We=pi?"nextSibling":"previousSibling",$e=this[We];for(;$e&&($e.type!=="text"||!ie.test($e.data));)$e=$e[We];if($e&&ie.exec($e.data)[0]!==Y)continue}}Pe=$.getSeverity(fe,"single")}else fe="lonely-http",Pe=$.getSeverity(fe);if(!Pe)continue;let Js=this.posFromIndex(U),{line:Ks,character:Ys}=vi(N,E,Js.top+1,Js.left);if(Y==="="){let ie=a.indexOf(`
|
|
4
4
|
`,U),we=u,We;if(ie===-1){let $e=0;for(;we&&!(we.type==="text"&&($e=we.data.indexOf(`
|
|
5
5
|
`),$e!==-1));)we=we.nextSibling;if(!we)continue;We=we.data.slice(0,$e)}else We=a.slice(U+it,ie);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(We))continue;ie===-1?(yt=we.getAbsoluteIndex()+We.length,{top:An,left:Sn}=T.posFromIndex(yt)):(yt+=We.length,it+=We.length)}let kt={rule:fe,message:v.msg(Y==="="?"header-like":"lonely",xt||Y==="h"||fi||ci?M:Y),severity:Pe,startIndex:Kt,endIndex:yt,startLine:Ks,endLine:An!=null?An:Ks,startCol:Ys,endCol:Sn!=null?Sn:Ys+it};if($.computeEditInfo)if(Y==="<")kt.suggestions=[Ge(Kt,"<")];else if(Y==="h"&&d!=="link-text"&&Kd.test(ui||""))kt.suggestions=[st(Kt)];else if(bt){let ie=l.getAbsoluteIndex()+l.toString().length;kt.suggestions=[Ge(ie,"]")]}else if(M==="]"&&Xs){let ie=e-g.toString().length;kt.suggestions=[er(ie,"left-bracket","[")]}else xt&&(kt.suggestions=[..._[0]===M?[]:[Bn(kt,M)],...Tt===":"||Tt===":"?[st(yt,1)]:[]]);c.push(kt)}return c}}replaceData(e){I(this,Wn,Fo).call(this,e)}splitText(e){this.lspError("AstText.splitText")}escape(){}print(){}};Wn=new WeakSet,Fo=function(e){this.setAttribute("data",e)}});var ve,ot=w(()=>{"use strict";ve=(o=!0,r=!0)=>e=>{class t extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return t}});var Q,xe=w(()=>{"use strict";Q=o=>{}});var Gr,he,at=w(()=>{"use strict";G();he=class extends L{constructor(e,t,n,i,s){super(e,n,i,s);S(this,Gr);C(this,Gr,t)}get type(){return m(this,Gr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Gr=new WeakMap});var ue,qe=w(()=>{"use strict";ue=({length:o})=>r=>{class e extends r{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var or,pe,lt=w(()=>{"use strict";G();pe=class extends L{constructor(e,t,n,i,s){super(e,n,i,s);S(this,or);C(this,or,t)}get type(){return m(this,or)}set type(e){C(this,or,e)}getAttribute(e){var t;return e==="invalid"?this.type==="converter-flag"&&!!((t=this.parentNode)!=null&&t.isInvalidFlag(this)):super.getAttribute(e)}};or=new WeakMap});var Po,ar,He,dt,Dn,Bo,Li,Yd,ye,lr=w(()=>{"use strict";z();Se();se();qe();xe();D();G();lt();Po=[Q,ue("[[")];ye=class extends(Yd=L){constructor(e,t,n,i=[],s="|"){super(void 0,n,i,{});S(this,Dn);S(this,ar,!0);S(this,He);S(this,dt);if(this.insertAt(new pe(e,"link-target",n,i,{})),t!==void 0){let a=new L(t,n,i,{});a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}C(this,He,s)}get link(){}get fragment(){}afterBuild(){C(this,dt,this.getTitle()),m(this,He).includes("\0")&&C(this,He,this.buildFromStr(m(this,He),0)),I(this,Dn,Bo).call(this),super.afterBuild()}setAttribute(e,t){e==="bracket"?C(this,ar,t):e==="title"?C(this,dt,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,m(this,He));return m(this,ar)?`[[${t}]]`:t}text(){let e=super.text("|");return m(this,ar)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,dt):super.getAttribute(e)}getGaps(e){return e===0?m(this,He).length:1}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:u}=m(this,dt),{lintConfig:g}=v,{computeEditInfo:d,fix:p}=g,c=new W(this,e),f="unknown-page",h=g.getSeverity(f);if(h&&i.childNodes.some(({type:x})=>x==="template")&&n.push(j(i,c,f,"template-in-link",h)),f="url-encoding",h=g.getSeverity(f),h&&l){let x=j(i,c,f,"unnecessary-encoding",h);(d||p)&&(x.fix=Fn(x,i)),n.push(x)}if(f="pipe-like",h=g.getSeverity(f,"link"),h&&(a==="link"||a==="category")){let x=s==null?void 0:s.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),T=s==null?void 0:s.childNodes[x];if(T){let b=j(s,c,f,"pipe-in-link",h);if(d){let y=b.startIndex+s.getRelativeIndex(x);b.suggestions=[jn(y,T.data)]}n.push(b)}}if(f="no-ignored",h=g.getSeverity(f,"fragment"),h&&u!==void 0&&!jo(a)){let x=j(i,c,f,"useless-fragment",h);if(d||p){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),b=i.childNodes[T];b&&(x.fix=O(x,i.getRelativeIndex(T)+b.data.indexOf("#")))}n.push(x)}return n}}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Li=B(Yd),ar=new WeakMap,He=new WeakMap,dt=new WeakMap,Dn=new WeakSet,Bo=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,dt).title)},ye=P(Li,0,"LinkBaseToken",Po,ye),R(Li,1,ye)});var Oo,Ni,Zd,le,gt=w(()=>{"use strict";xe();G();Oo=[Q];le=class extends(Zd=L){get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}};Ni=B(Zd),le=P(Ni,0,"NowikiBaseToken",Oo,le),R(Ni,1,le)});var qo,$i,eg,de,Ct=w(()=>{"use strict";z();ot();D();gt();qo=[ve(!1)];de=class extends(eg=le){get type(){return"noinclude"}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){{let{lintConfig:e}=v,t="no-ignored",n=e.getSeverity(t,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=F(this,{start:r},t,"useless-attribute",n),{computeEditInfo:l}=e,u=s[1].length+1,g=i.endsWith("/>")?2:1;return a.startIndex+=u,a.startCol+=u,a.endIndex-=g,a.endCol-=g,l&&(a.suggestions=[O(a)]),[a]}}return[]}}};$i=B(eg),de=P($i,0,"NoincludeToken",qo,de),R($i,1,de)});var Mn,_o=w(()=>{"use strict";z();D();lr();Ct();Mn=class extends ye{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new de(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(r=this.getAbsoluteIndex()){{let e=super.lint(r,!1),t="no-ignored",{lintConfig:n}=v,i=n.getSeverity(t,"redirect");if(i&&this.length===2){let s=j(this.lastChild,{start:r},t,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=O(s)),e.push(s)}return e}}}});var Wo,Et,Hr,Ii,tg,wt,Do=w(()=>{"use strict";ot();xe();G();at();_o();Wo=[ve(!1,!1),Q];wt=class extends(tg=L){constructor(e,t,n,i,s,a,l=[]){super(void 0,a,l);S(this,Et);S(this,Hr);C(this,Et,e),C(this,Hr,s),this.append(new he(t,"redirect-syntax",a,l),new Mn(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,Et).length:super.getAttribute(e)}toString(e){return m(this,Et)+super.toString(e)+m(this,Hr)}lint(e=this.getAbsoluteIndex()){{let t=e+m(this,Et).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}}print(){}};Ii=B(tg),Et=new WeakMap,Hr=new WeakMap,wt=P(Ii,0,"RedirectToken",Wo,wt),R(Ii,1,wt)});var Mo={};Z(Mo,{parseRedirect:()=>rg});var rg,Uo=w(()=>{"use strict";D();Do();rg=(o,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(o);return t&&v.normalizeTitle(t[3],0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(t[0].length)}`,new wt(...t.slice(1),r,e),o):!1}});var zo,Fi,ng,Lt,Go=w(()=>{"use strict";qe();xe();G();zo=[Q,ue("<onlyinclude>")];Lt=class extends(ng=L){get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}isPlain(){return!0}print(){}};Fi=B(ng),Lt=P(Fi,0,"OnlyincludeToken",zo,Lt),R(Fi,1,Lt)});var ut,Vr=w(()=>{"use strict";ut=(o=1)=>r=>{class e extends r{getGaps(){return o}}return e}});var Ho,Nt,pt,Ri,ig,Fe,Un=w(()=>{"use strict";Vr();xe();G();Ho=[ut(),Q];Fe=class extends(ig=L){constructor(e,t,n,i,s,a=[]){super(void 0,s);S(this,Nt);S(this,pt);ce(this,"closed");this.setAttribute("name",e.toLowerCase()),C(this,Nt,[e,i||e]),this.closed=i!=="",C(this,pt,i===void 0),this.append(t,n);let l=typeof t=="string"?-1:a.indexOf(t);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,pt)?void 0:this.lastChild.text()}get selfClosing(){return m(this,pt)}toString(e){let{firstChild:t,lastChild:n}=this,[i,s]=m(this,Nt);return m(this,pt)?`<${i}${t.toString(e)}/>`:`<${i}${t.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,t]=m(this,Nt);return m(this,pt)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?m(this,Nt)[0].length+1:super.getAttribute(e)}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Ri=B(ig),Nt=new WeakMap,pt=new WeakMap,Fe=P(Ri,0,"TagPairToken",Ho,Fe),R(Ri,1,Fe)});var Vo,Pi,sg,$t,Qo=w(()=>{"use strict";z();se();ot();D();Un();Vo=[ve(!1)];$t=class extends(sg=Fe){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){{let e=[],{firstChild:t,closed:n,name:i}=this,s=new W(this,r),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:u}=l,g=a.map(d=>l.getSeverity(d,"include"));if(g[0]&&t.data.trim()){let d=j(t,s,a[0],"useless-attribute",g[0]);u&&(d.suggestions=[O(d)]),e.push(d)}if(g[1]&&!n){let d=F(this,s,a[1],v.msg("unclosed",`<${i}>`),g[1]);u&&(d.suggestions=[Le(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};Pi=B(sg),$t=P(Pi,0,"IncludeToken",Vo,$t),R(Pi,1,$t)});var dr,zn=w(()=>{"use strict";dr=(o=0)=>r=>{var e,Xo;{class n extends r{constructor(){super(...arguments);S(this,e)}hasAttr(a){this.lspError("AttributesParent.hasAttr")}getAttr(a){return I(this,e,Xo).call(this).getAttr(a)}}return e=new WeakSet,Xo=function(){return this.childNodes[o]},n}}});var ne,Jo,Ko,Gn,ji,Yo,Hn,ra,na,ia,Bi,Zo,ea,ta,It,sa,oa,aa,la,da,Oi=w(()=>{"use strict";ne=new Set(["align"]),Jo=new Set(["cite"]),Ko=new Set(["cite","datetime"]),Gn=new Set(["width"]),ji=new Set(["axis","align","bgcolor","height","width","valign"]),Yo=new Set([...ji,"abbr","headers","scope","rowspan","colspan"]),Hn=new Set(["type"]),ra=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),na=new Set(["clear"]),ia=new Set(["bgcolor","align","valign"]),Bi=new Set(["id","qid","forcemathmode","type","display"]),Zo=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),ea=new Set(["weight"]),ta=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),It=new Set,sa=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"]),oa={div:ne,h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,blockquote:Jo,q:Jo,p:ne,br:na,pre:Gn,ins:Ko,del:Ko,ul:Hn,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ra,"border"]),caption:ne,tr:ia,td:Yo,th:Yo,font:new Set(["size","color","face"]),hr:Gn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Hn,poem:ne,categorytree:ne,combooption:ne,img:new Set(["alt","src","width","height","loading","srcset"])},aa={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:It,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:ea,choicetemplate:ea,imagemap:It,inputbox:It,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:It,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([...Bi,"chem"]),chem:Bi,ce:Bi,hiero:It,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Zo,syntaxhighlight:Zo,templatedata:It,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:It,mapframe:new Set([...ta,"frameless"]),maplink:new Set([...ta,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},la={table:ra,td:new Set([...ji,"scope"]),th:ji,br:na,caption:ne,div:ne,hr:Gn,h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,li:Hn,p:ne,pre:Gn,tr:ia,ul:Hn},da={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 og,ag,lg,dg,Qr,gr,Te,Ve,Ft,ga,qi,ur,ua=w(()=>{"use strict";z();ae();Oi();se();D();G();lt();og=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ag=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,lg=new Set(["ext","arg","magic-word","template"]),dg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ur=class extends L{constructor(e,t,n,i,s,a="",l,u=[]){let g=new pe(n,"attr-key",s,u),d;if(n==="title"||t==="img"&&n==="alt")d=new L(l,s,u,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="ref"&&n==="details"||(t==="mapframe"||t==="maplink")&&n==="text"||t==="choose"&&(n==="before"||n==="after")){let p=ge(V({},s),{excludes:[...s.excludes,"heading","html","table","hr","list"]});d=new L(l,p,u,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new pe(l,"attr-value",s,u,{});super(void 0,s,u);S(this,Ft);S(this,Qr);S(this,gr);S(this,Te);S(this,Ve);C(this,Qr,e),this.append(g,d),C(this,Te,a),C(this,Ve,[...i]),C(this,gr,t),this.setAttribute("name",Ue(re(n)))}get type(){return m(this,Qr)}get tag(){return m(this,gr)}get balanced(){return!m(this,Te)||m(this,Ve)[0]===m(this,Ve)[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,Ft,ga).call(this),super.afterBuild()}toString(e){let[t="",n=""]=m(this,Ve);return m(this,Te)?super.toString(e,m(this,Te)+t)+n:this.firstChild.toString(e)}text(){return m(this,Te)?`${super.text(`${m(this,Te).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return m(this,Te)?m(this,Te).length+((t=(e=m(this,Ve)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var n;{let i=super.lint(e,t),{balanced:s,firstChild:a,lastChild:l,name:u,tag:g}=this,d=new W(this,e),p=["unclosed-quote","obsolete-attr"],{lintConfig:c}=v,f=p.map(x=>c.getSeverity(x,u));if(f[0]&&!s){let x=j(l,d,p[0],"unclosed-quotes",f[0]);x.startIndex--,x.startCol--,c.computeEditInfo&&(x.suggestions=[Le(x.endIndex,m(this,Ve)[0])]),i.push(x)}let h=I(this,Ft,qi).call(this,e,d);return h&&i.push(h),f[1]&&((n=la[g])!=null&&n.has(u))&&i.push(j(a,d,p[1],"obsolete-attribute",f[1])),i}}getValue(){return m(this,Te)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(e){return e==="invalid"?I(this,Ft,qi).call(this):super.getAttribute(e)}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Qr=new WeakMap,gr=new WeakMap,Te=new WeakMap,Ve=new WeakMap,Ft=new WeakSet,ga=function(){this.setAttribute("name",Ue(this.firstChild.text()))},qi=function(e,t){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:u}=this,g=!i.childNodes.some(({type:b})=>lg.has(b)),d=this.getValue(),p=aa[l],c=oa[l],{length:f}=this.toString(),h="illegal-attr",x,T;if({lintConfig:x}=v,{computeEditInfo:T}=x,!(p!=null&&p.has(a))&&!(c!=null&&c.has(a))&&(s==="ext-attr"?p||c:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!c||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(a)&&(l==="meta"||l==="link"||!sa.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(u!=null&&u.hasAttr("itemscope"))){if(e===void 0)return!0;{let b=x.getSeverity(h,"unknown");if(b){let y=j(n,t,h,"illegal-attribute-name",b);return T&&(y.suggestions=[O(e,f)]),y}}}else if(a==="style"&&typeof d=="string"&&og.test(d)){if(e===void 0)return!0;{h="insecure-style";let b=x.getSeverity(h);return b&&j(i,t,h,"insecure-style",b)}}else if(a==="tabindex"&&typeof d=="string"&&d!=="0"){if(e===void 0)return!0;{let b=x.getSeverity(h,"tabindex");if(b){let y=j(i,t,h,"nonzero-tabindex",b);return T&&(y.suggestions=[O(e,f),me(y,"0 tabindex","0")]),y}}}else if(typeof d=="string"&&((/^xmlns:[\w:.-]+$/u.test(a)||dg.has(a))&&ag.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=x.getSeverity(h,"value");return b&&j(i,t,h,"illegal-attribute-value",b)}}else if(g&&s!=="ext-attr"){let b=ho(l,a),y=String(d).toLowerCase();if(b.length>0&&b.every(k=>k!==y)){if(e===void 0)return!0;{let k=x.getSeverity(h,"value");return k&&j(i,t,h,"illegal-attribute-value",k)}}}return!1}});var pa,gg,ug,Xr,Jr,_i,ft,Vn=w(()=>{"use strict";z();ae();se();D();G();lt();ua();pa=o=>o.slice(0,-1),gg=o=>`${pa(o)}-dirty`,ug=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(o){return/[^\W_]/u}})(),ft=class extends L{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});S(this,Jr);S(this,Xr);if(C(this,Xr,t),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="",u=a.exec(e),g=0,d=()=>{l&&(super.insertAt(new pe(l,gg(t),i,s,{})),l="")};for(;u;){let{index:p,0:c,1:f,2:h,3:x,4:T,5:b,6:y}=u;if(l+=e.slice(g,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(re(f).trim())){let k=T!=null?T:y,A=[x,b],N=new ur(pa(t),n,f,A,i,h,k,s);d(),super.insertAt(N)}else l+=c;({lastIndex:g}=a),u=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(t=>t instanceof ur&&(!e||t.name===Ue(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let t=this.getAttrTokens(e);return t[t.length-1]}}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{parentNode:i,childNodes:s}=this,a=new Map,l=new Set,u=new W(this,e),g=["no-ignored","no-duplicate"],{lintConfig:d}=v,{computeEditInfo:p,fix:c}=d,f=["closingTag","invalidAttributes","nonWordAttributes"].map(x=>d.getSeverity(g[0],x));if(f[0]&&I(this,Jr,_i).call(this)){let x=F(this,u,g[0],"attributes-of-closing-tag",f[0]);if(p){let T=i.getAbsoluteIndex();x.suggestions=[O(x),Rn(T)]}n.push(x)}for(let x of s)if(x instanceof ur){let{name:T}=x;a.has(T)?(l.add(T),a.get(T).push(x)):a.set(T,[x])}else{let T=x.text().trim(),b=f[ug.test(T)?1:2];if(T&&b){let y=j(x,u,g[0],"invalid-attribute",b);p&&(y.suggestions=[O(y,0," ")]),n.push(y)}}let h=d.getSeverity(g[1],"attribute");if(h&&l.size>0)for(let x of l){let T=a.get(x).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,u,g[1],v.msg("duplicate-attribute",x),h);if(p||c){let N=O(A);!y||T.slice(0,k).some(([,E])=>E===y)?A.fix=N:p&&(A.suggestions=[N])}return A}))}return n}}escape(){}getAttribute(e){return e==="invalid"?I(this,Jr,_i).call(this):super.getAttribute(e)}print(){}};Xr=new WeakMap,Jr=new WeakSet,_i=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var fa={};Z(fa,{PreToken:()=>Wi});var Wi,ca=w(()=>{"use strict";G();Ct();Wi=class extends L{get type(){return"ext-inner"}constructor(r,e,t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(r);a&&(i.lastIndex=a.index+s);let l=i.exec(r),u=0,g="";for(;a&&l;)new de(a[0],e,t,!0),new de(l[0],e,t,!0),g+=`${r.slice(u,a.index)}\0${t.length-1}n${r.slice(a.index+s,l.index)}\0${t.length}n`,u=l.index+s+1,n.lastIndex=u,a=n.exec(r),a&&(i.lastIndex=a.index+s),l=i.exec(r);r=g+r.slice(u)}super(r,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var ct,Qn=w(()=>{"use strict";G();ct=class extends L{get type(){return"ext-inner"}toString(r){return super.toString(r,`
|
package/bundle/bundle-lsp.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";(()=>{var jo=Object.create;var Wt=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var Tu=Object.getOwnPropertyNames;var yu=Object.getPrototypeOf,ku=Object.prototype.hasOwnProperty;var qo=(o,r)=>(r=Symbol[o])?r:Symbol.for("Symbol."+o),hr=o=>{throw TypeError(o)};var _o=(o,r,e)=>r in o?Wt(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var Bo=(o,r)=>Wt(o,"name",{value:r,configurable:!0});var L=(o,r)=>()=>(o&&(r=o(o=0)),r);var Qi=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports),re=(o,r)=>{for(var e in r)Wt(o,e,{get:r[e],enumerable:!0})},Wo=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Tu(r))!ku.call(o,n)&&n!==e&&Wt(o,n,{get:()=>r[n],enumerable:!(t=Oo(r,n))||t.enumerable});return o};var vu=(o,r,e)=>(e=o!=null?jo(yu(o)):{},Wo(r||!o||!o.__esModule?Wt(e,"default",{value:o,enumerable:!0}):e,o)),K=o=>Wo(Wt({},"__esModule",{value:!0}),o);var O=o=>{var r;return[,,,jo((r=o==null?void 0:o[qo("metadata")])!=null?r:null)]},Do=["class","method","getter","setter","accessor","field","value","get","set"],ln=o=>o!==void 0&&typeof o!="function"?hr("Function expected"):o,Au=(o,r,e,t,n)=>({kind:Do[o],name:r,metadata:t,addInitializer:i=>e._?hr("Already initialized"):n.push(ln(i||null))}),dn=(o,r)=>_o(r,qo("metadata"),o[3]),B=(o,r,e,t)=>{for(var n=0,i=o[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},j=(o,r,e,t,n,i)=>{var s,a,l,g,d,u=r&7,p=!!(r&8),m=!!(r&16),c=u>3?o.length+1:u?p?1:2:0,h=Do[u+5],b=u>3&&(o[c-1]=[]),y=o[c]||(o[c]=[]),x=u&&(!m&&!p&&(n=n.prototype),u<5&&(u>3||!m)&&Oo(u<4?n:{get[e](){return f(this,i)},set[e](k){return S(this,i,k)}},e));u?m&&u<4&&Bo(i,(u>2?"set ":u>1?"get ":"")+e):Bo(n,e);for(var T=t.length-1;T>=0;T--)g=Au(u,e,l={},o[3],y),u&&(g.static=p,g.private=m,d=g.access={has:m?k=>Su(n,k):k=>e in k},u^3&&(d.get=m?k=>(u^1?f:C)(k,n,u^4?i:x.get):k=>k[e]),u>2&&(d.set=m?(k,A)=>S(k,n,A,u^4?i:x.set):(k,A)=>k[e]=A)),a=(0,t[T])(u?u<4?m?i:x[h]:u>4?void 0:{get:x.get,set:x.set}:n,g),l._=1,u^4||a===void 0?ln(a)&&(u>4?b.unshift(a):u?m?i=a:x[h]=a:n=a):typeof a!="object"||a===null?hr("Object expected"):(ln(s=a.get)&&(x.get=s),ln(s=a.set)&&(x.set=s),ln(s=a.init)&&b.unshift(s));return u||dn(o,n),x&&Wt(n,e,x),m?u^4?i:x:n},ge=(o,r,e)=>_o(o,typeof r!="symbol"?r+"":r,e),Xi=(o,r,e)=>r.has(o)||hr("Cannot "+e),Su=(o,r)=>Object(r)!==r?hr('Cannot use the "in" operator on this value'):o.has(r),f=(o,r,e)=>(Xi(o,r,"read from private field"),e?e.call(o):r.get(o)),w=(o,r,e)=>r.has(o)?hr("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),S=(o,r,e,t)=>(Xi(o,r,"write to private field"),t?t.call(o,e):r.set(o,e),e),C=(o,r,e)=>(Xi(o,r,"access private method"),e);var Yn=(o,r,e,t)=>({set _(n){S(o,r,n,e)},get _(){return f(o,r,t)}});var Mo,Dt,Zn=L(()=>{"use strict";Mo=(()=>{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})(),Dt=(()=>{let o=["arg-in-ext","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 $e(o,r,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(t,n)=>$e(String(r[n]),r,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(t,n)=>String(r[n])):o.replace(/\0(\d+)\x7F/gu,(t,n)=>r[n])}var We,Uo,tt,rt,nt,un,br,se,Pe,wu,Cu,ei,Mt,Ho,Lu,Eu,Ut,it,ae=L(()=>{"use strict";We=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Uo=String.raw`[^[\]<>"\0-\x1F\x7F${We}\uFFFD]`,tt=String.raw`(?:\[[\da-f:.]+\]|${Uo})`,rt=String.raw`(?:${Uo}|\0\d+[cn!~]\x7F)*`,nt=o=>o.trim().toLowerCase();un=(o,r)=>e=>e.replace(o,r),br=un(/[\0\x7F]|\r$/gmu,""),se=un(/\0\d+[cn]\x7F/gu,""),Pe=(o,r="")=>o.map(e=>typeof e=="string"?e:e.text()).join(r),wu={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Cu=un(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):wu[e.toLowerCase()]),Mt=o=>(ei!=null||(ei=Cu),ei(o)),Ho=un(/&#(\d+|x[\da-f]+);/giu,(o,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Lu={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Eu=(o=/[&<>"{}[\]|]/gu)=>un(o,r=>`&${Lu[r]};`),Ut=Eu(/[&<>]/gu),it=(o,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+o.map(i=>i.print()).join(n)+t}});var zo=Qi((cp,$u)=>{$u.exports={"argument-in-ext":"template argument inside an extension tag","attributes-of-closing-tag":"attributes of a closing tag","bold-apostrophes":"bold apostrophes","bold-in-header":"bold text in a section header",close:null,"closing-and-self-closing":"tag that is both closing and self-closing",comment:null,"conflicting-image-parameter":"conflicting image $1 parameter","content-outside-table":"content to be moved outside the table",decode:null,delink:null,"duplicate-attribute":"duplicate $1 attribute","duplicate-category":"duplicate category","duplicate-id":"duplicate HTML id","duplicate-image-parameter":"duplicate image $1 parameter","duplicate-parameter":"duplicate template parameter",encode:null,escape:null,expand:null,"ext-in-html":"extension tag in HTML tag attributes",frame:null,"full-width-punctuation":"full-width punctuation","header-in-html":"section header in HTML tag attributes","header-like":"header-like syntax in plain text","horizontal-alignment":null,"html-in-table":"HTML tag in table attributes","illegal-attribute-name":"invalid attribute name","illegal-attribute-value":"invalid attribute value","illegal-module":"invalid Scribunto module name","imagemap-without-image":"<imagemap> without an image","in-url":"$1 in URL","inconsistent-table":"inconsistent table layout","insecure-style":"insecure style","invalid-attribute":"element containing an invalid attribute name","invalid-category":"invalid category name","invalid-content":"invalid content in <$1>","invalid-conversion-flag":"invalid conversion flag","invalid-gallery":"invalid gallery image","invalid-gallery-link":"invalid link in gallery image","invalid-image-parameter":"invalid image parameter","invalid-imagemap-link":"invalid link in <imagemap>","invalid-isbn":"invalid ISBN","invalid-parameter":"invalid parameter of <$1>","invalid-self-closing":"invalid self-closing tag","invalid-thumb":"invalid thumbnail filename","invalid-url":"invalid URL","invisible-triple-braces":"invisible content inside triple braces","italic-apostrophes":"italic apostrophes","left-bracket":"opening bracket","link-in-extlink":"internal link in an external link",lonely:'lonely "$1"',"missing-extension":"missing file extension","missing-function":"missing Scribunto module function name",newline:null,"no-self-closing":"no self-closing","nonzero-tabindex":"nonzero tabindex","nothing-in":"nothing should be in <$1>","obsolete-attribute":"obsolete attribute","obsolete-tag":"obsolete HTML tag",open:null,prefix:null,"pipe-in-link":'additional "|" in the link text',"pipe-in-table":'additional "|" in a table cell',"redirect-like":"redirect-like syntax in a list item","ref-in-link":"<ref> in an internal or external link",remove:null,"template-in-link":"template in an internal link target","unbalanced-in-section-header":"unbalanced $1 in a section header",unclosed:"unclosed $1","unclosed-comment":"unclosed HTML comment","unclosed-quotes":"unclosed quotes","unclosed-table":"unclosed table","unclosed-tag":"unclosed tag","unescaped-query":"unescaped query string in an anonymous parameter","unexpected-argument":"unexpected template argument","unmatched-closing":"unmatched closing tag","unnecessary-encoding":"unnecessary percent-encoding in an internal link",uppercase:null,"useless-attribute":"useless attribute","useless-fragment":"useless fragment","useless-link-text":"useless link text","variable-anchor":"variable anchor in a section header","vertical-alignment":null,whitespace:null}});var Go=Qi((fp,Nu)=>{Nu.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 Vo,Qo,gn,Ji,ti=L(()=>{"use strict";Vo=zo(),Qo=new Set(["alt","link","lang","page","caption"]),gn=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),Ji=Go()});function Be(o){let r=new Map,e=new WeakMap;return t=>{let n=typeof t=="string"?r:e;if(n.has(t)){let s=n.get(t);return s.lastIndex=0,s}let i=o(t);return n.set(t,i),i}}var Ht,Xo,Iu,Jo,ri,Ki,Fu,Ko,He=L(()=>{"use strict";Ht=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25")),Xo=o=>Math.round(o*255).toString(16).padStart(2,"0"),Iu=(()=>{let o=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,r=String.raw`(?:\d*\.)?\d+%?`,e=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,t=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(r).join(String.raw`\s+`)}(?:\s*\/\s*${r})?`}|${String.raw`${new Array(3).fill(r).join(String.raw`\s*,\s*`)}(?:\s*,\s*${r})?`})\s*\)`,n=String.raw`hsla?\(\s*(?:${String.raw`${e}\s+${r}\s+${r}(?:\s*\/\s*${r})?`}|${String.raw`${e}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${r})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${o}|${t}|${n})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${o}|${t})`,"giu")}})(),Jo=(o,r=!0)=>{let e=[],t=Iu[r?"full":"rgb"];t.lastIndex=0;let n=t.exec(o),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([o.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([n[2],s,i,o[s-1]!=="&"||!/^#\d+$/u.test(n[2])]),n=t.exec(o)}return o.length>i&&e.push([o.slice(i),i,o.length,!1]),e};ri=o=>{let r=[],e=0;for(let t of o.split(`
|
|
2
|
-
`)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},Ki=o=>o&&Number(o[1]),Fu=(o,r)=>{var n;let e,t=i=>{e!=null||(e=ri(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of r){let{line:s,column:a,from:l,to:g}=i;l==null?s?(e!=null||(e=ri(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,t(l)),g!==void 0&&({line:i.endLine,column:i.endColumn}=t(g)),i.position=i.from}return r},Ko=(o,r)=>{if(r||o.trim())try{JSON.parse(o)}catch(e){let{message:t}=e,n=Ki(/\bline (\d+)/u.exec(t)),i=Ki(/\bcolumn (\d+)/u.exec(t)),s=Ki(/\bposition (\d+)/u.exec(t));return Fu(o,[{message:t,line:n,column:i,from:s,severity:"error"}])}return[]}});var pn,xr,cn,fn,Yi,U,pe=L(()=>{"use strict";U=class{constructor(r,e){w(this,fn);w(this,pn);w(this,xr);w(this,cn);S(this,pn,r),S(this,xr,e)}get start(){return f(this,xr)}get top(){return C(this,fn,Yi).call(this).top}get left(){return C(this,fn,Yi).call(this).left}};pn=new WeakMap,xr=new WeakMap,cn=new WeakMap,fn=new WeakSet,Yi=function(){var r;return(r=f(this,cn))!=null||S(this,cn,f(this,pn).getRootNode().posFromIndex(f(this,xr))),f(this,cn)}});var Ru,Pu,Tr,yr,Yo,q,P,ve,kr,_,ni,je,ii,si,oi,vt,st,ai,ze,li,z=L(()=>{"use strict";He();Ae();pe();M();Ru=new Set(["tr","td","th","caption"]),Pu=new Set(["Template:!!","Template:!-"]),Tr=o=>{let r=o.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.is("magic-word")&&r.name==="!"||r.is("template")&&Pu.has(r.name)||r.is("html")&&Ru.has(r.name))return!1;if(r.is("arg"))return r.length>1&&Tr(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(Tr);return e.includes(2)?2:e.includes(1)&&1}catch{}return r.is("template")||r.is("magic-word")&&r.name==="invoke"?1:2},yr=(o,r,e,t)=>({line:o+e-1,character:(e===1?r:0)+t}),Yo=o=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof U?e:new U(r,s),{offsetHeight:g,offsetWidth:d}=r,{startIndex:u,startLine:p,startCol:m}=o(r,s,a,l),{line:c,character:h}=yr(p,m,g,d);return{rule:t,message:v.msg(n),severity:i,startIndex:u,endIndex:u+r.toString().length,startLine:p,endLine:c,startCol:m,endCol:h}},q=Yo((o,r,e,t)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),P=Yo((o,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),ve=(o,r,e,t=0)=>({desc:v.msg(r),range:[o.startIndex+t,o.endIndex],text:e}),kr=(o,r,e)=>({desc:v.msg(r),range:[o,o],text:e}),_=(o,r=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+r],text:e}:ve(o,"remove",e,r),ni=(o,r)=>ve(o,"decode",Ht(r.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),je=(o,r,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:r}),ii=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),si=(o,r)=>ve(o,"comment",`<!--${r}-->`),oi=(o,r)=>ve(o,"uppercase",r.toUpperCase()),vt=(o,r=0)=>({desc:v.msg("whitespace"),range:[o,o+r],text:" "}),st=(o,r,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:r.repeat(e)}),ai=(o,r)=>({desc:v.msg("escape"),range:[o,o+r.length],text:r.replace(/\|/gu,"|")}),ze=(o,r,e,t)=>{if(o&&(t||v.viewOnly&&o[0]===J.rev))return o[1];let n=r();return(t||v.viewOnly)&&e([J.rev,n]),n},li=(o,r)=>o==="ol"&&r==="type"?["1","a","A","i","I"]:o==="th"&&r==="scope"?["row","col","rowgroup","colgroup"]:r==="dir"?["ltr","rtl","auto"]:r==="aria-hidden"?["true","false"]:[]});var Bu,di,Zi=L(()=>{"use strict";Bu=o=>{if(o.includes("#")){let r=o.indexOf("#"),e=o.slice(0,r),t=o.slice(r+1);return(n,i)=>(r===0||n===e)&&i===t}return r=>r===o},di=(o,r,e)=>{if(o=o.trim(),!o)return(()=>!0);let t=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Bu);return(({type:n,name:i})=>t.some(s=>s(n,i)))}});var ea=Qi((wp,Zo)=>{Zo.exports=function(o,r,e,t,n){var i,s;if(t===void 0)t=0;else if(t=t|0,t<0||t>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<t||n>=o.length)throw new RangeError("invalid upper bound");for(;t<=n;)if(i=t+(n-t>>>1),s=+e(o[i],r,i,o),s<0)t=i+1;else if(s>0)n=i-1;else return i;return~t}});var ta,ra,na=L(()=>{"use strict";ta=vu(ea()),ra=(o,r,e)=>{let t=(0,ta.default)(o,r,e);return t<0?~t:t}});var vr,ui=L(()=>{"use strict";z();vr=(o=!0)=>r=>{let e=new WeakMap;return function(...t){return ze(e.get(this),()=>r.apply(this,t),n=>{e.set(this,n)},o)}}});var ia,sa=L(()=>{"use strict";ia=o=>{class r 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 r}});var oa,aa,hn,Ar,Sr,bn,wr,Cr,mn,Ge,es=L(()=>{"use strict";He();na();z();Ae();ui();sa();M();aa=[ia],oa=[vr(!1)];Ge=class{constructor(){B(mn,5,this);ge(this,"childNodes",[]);w(this,hn);w(this,Ar);w(this,Sr);w(this,bn);w(this,wr);w(this,Cr,{})}get parentNode(){return f(this,hn)}get nextSibling(){return f(this,Ar)}get previousSibling(){return f(this,Sr)}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":S(this,hn,e),e||(S(this,Ar,void 0),S(this,Sr,void 0));break;case"nextSibling":S(this,Ar,e);break;case"previousSibling":S(this,Sr,e);break;case"aIndex":v.viewOnly&&S(this,wr,[J.rev,e]);break;default:this[r]=e}}getRootNode(){return ze(f(this,bn),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&S(this,bn,r)})}indexFromPos(r,e){{if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}}posFromIndex(r){{let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=ra(t,r,([,,i],s)=>i-s);return{top:n,left:r-t[n][1]}}return}}getDimension(){{let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ze(f(this,Cr)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)v.viewOnly&&(f(this,Cr)[i]=[J.rev,n]),n+=e[i].toString().length+this.getGaps(i);return n},e=>{f(this,Cr)[r]=e})}getAbsoluteIndex(){return ze(f(this,wr),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{S(this,wr,r)})}getBoundingClientRect(){return{...this.getDimension(),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(r){return this.type===r}getLines(){return ri(String(this))}seal(r,e){{if(v.internal)return;let t=!e&&!!this[r];t||Object.defineProperty(this,r,{enumerable:t,configurable:!0})}}lspError(r){throw new Error(`${r} method is only available in the LSP version!`)}};mn=O(null),hn=new WeakMap,Ar=new WeakMap,Sr=new WeakMap,bn=new WeakMap,wr=new WeakMap,Cr=new WeakMap,j(mn,1,"getLines",oa,Ge),Ge=j(mn,0,"AstNode",aa,Ge),B(mn,1,Ge)});var la,da=L(()=>{"use strict";Zi();la=o=>{var r,ts;{class t extends o{constructor(){super(...arguments);w(this,r)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:g,childNodes:d}=l;if(g!=="text"){if(s(l))return l;for(let u=d.length-1;u>=0;u--)a.push(d[u])}}}querySelector(s){return this.getElementBy(C(this,r,ts).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let g=a.pop(),{type:d,childNodes:u}=g;if(d!=="text"){s(g)&&l.push(g);for(let p=u.length-1;p>=0;p--)a.push(u[p])}}return l}querySelectorAll(s){return this.getElementsBy(C(this,r,ts).call(this,s))}escape(){for(let s of this.childNodes)s.escape()}}return r=new WeakSet,ts=function(s){return di(s,this)},t}}});var ua,rs,ju,zt,ga=L(()=>{"use strict";ae();Ae();Zi();es();da();ua=[la];zt=class extends(ju=Ge){get length(){return this.childNodes.length}text(r){return Pe(this.childNodes,r)}removeAt(r){return Gt(this,r,1)[0]}insertAt(r,e=this.length){return Gt(this,e,0,[r]),r}closest(r){let e=di(r,this),{parentNode:t}=this;for(;t;){if(e(t))return t;({parentNode:t}=t)}}isInside(r){var e;return((e=this.closest(`${r},ext`))==null?void 0:e.type)===r}append(...r){this.safeAppend(r)}safeAppend(r){for(let e of r)this.insertAt(e)}safeReplaceChildren(r){for(let e=this.length-1;e>=0;e--)this.removeAt(e);this.safeAppend([...r])}setText(r,e=0){e+=e<0?this.length:0;let t=this.childNodes[e],{data:n}=t;return t.replaceData(r),n}toString(r,e=""){return this.childNodes.map(t=>t.toString(r)).join(e)}caretPositionFromIndex(r){{if(r===void 0)return;let{length:e}=this.toString();if(r>e||r<-e)return;r+=r<0?e:0;let t=this,n=0,i=0;for(;t.type!=="text";){let{childNodes:s}=t;n+=t.getAttribute("padding");for(let a=0;n<=r&&a<s.length;a++){let l=s[a],{nextSibling:g}=l,d=l.toString(),u=d.length;if(l.setAttribute("aIndex",n),n+=u,n>r||n===r&&u>0&&(!g||g.type==="text"||l.type!=="text"&&(d.trim()||!g.toString().trim()))){t=l,n-=u,i=n;break}n+=t.getGaps(a)}if(t.childNodes===s)return{offsetNode:t,offset:r-i}}return{offsetNode:t,offset:r-i}}this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(r){var e;{let t=(e=this.caretPositionFromIndex(r))==null?void 0:e.offsetNode;return(t==null?void 0:t.type)==="text"?t.parentNode:t}this.lspError("AstElement.elementFromIndex")}elementFromPoint(r,e){return this.elementFromIndex(this.indexFromPos(e,r))}lint(r=this.getAbsoluteIndex(),e){{let t=[];for(let n=0,i=r+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(t,a),i+=s.toString().length+this.getGaps(n)}return t}}print(r={}){{let e=r.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+it(this.childNodes,r)+(e===""?"":"</span>"):""}}json(r,e=1/0,t=this.getAbsoluteIndex()){{let n={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};if(e>=1)for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let a=this.childNodes[i],{length:l}=a.toString();a.setAttribute("aIndex",s),n.childNodes.push(a.type==="text"?{data:a.data,range:[s,s+l]}:a.json(void 0,e-1,s)),s+=l+this.getGaps(i)}return n}}};rs=O(ju),zt=j(rs,0,"AstElement",ua,zt),B(rs,1,zt)});var At,xn=L(()=>{"use strict";At=(o=1)=>r=>{class e extends r{getGaps(){return o}}return e}});var Z,we=L(()=>{"use strict";Z=o=>{{class r extends o{escape(){}}return r}}});var Ou,gi,pa=L(()=>{"use strict";ae();z();M();G();Ou=new RegExp(`https?://${tt}${rt}$`,"iu"),gi=class extends ${get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(r,e,t,n=[]){super(void 0,t,n);let i=new $(typeof r=="number"?void 0:r,t,n,{}),s=new $(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var t;{let n=super.lint(r,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,g=(t=Ou.exec(l.text()))==null?void 0:t[0];try{if(g&&new URL(g).search){let d=q(l,{start:r},i,"unescaped-query",a);d.startIndex=d.endIndex,d.startLine=d.endLine,d.startCol=d.endCol,d.endIndex++,d.endCol++,(s.computeEditInfo||s.fix)&&(d.fix=st(d.startIndex,"{{=}}")),n.push(d)}}catch{}}return n}}print(){return super.print({sep:this.anon?"":"="})}json(r,e,t=this.getAbsoluteIndex()){{let n=super.json(void 0,e,t);return Object.assign(n,{anon:this.anon},this.duplicated&&{duplicated:!0}),n}}}});var Lr,ce,St=L(()=>{"use strict";G();ce=class extends ${constructor(e,t,n,i,s){super(e,n,i,s);w(this,Lr);S(this,Lr,t)}get type(){return f(this,Lr)}set type(e){S(this,Lr,e)}getAttribute(e){var t;return e==="invalid"?this.type==="converter-flag"&&!!((t=this.parentNode)!=null&&t.isInvalidFlag(this)):super.getAttribute(e)}};Lr=new WeakMap});var Tn,Te,wt=L(()=>{"use strict";G();Te=class extends ${constructor(e,t,n,i,s){super(e,n,i,s);w(this,Tn);S(this,Tn,t)}get type(){return f(this,Tn)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Tn=new WeakMap});var ma={};re(ma,{TranscludeToken:()=>ot});var ca,kn,Ct,Er,Vt,$r,at,yn,fa,ns,qu,ot,is=L(()=>{"use strict";ae();z();Ae();pe();xn();we();M();G();pa();St();wt();ca=[Z,At()];ot=class extends(qu=$){constructor(e,t,n,i=[]){var y,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,{});w(this,at);ge(this,"modifier","");w(this,kn,"template");w(this,Ct,":");w(this,Er,!1);w(this,Vt,new Map);w(this,$r);let{parserFunction:l,variable:g,functionHook:d}=n,u=(y=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:y[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[T,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=k[0])!=null?x:"");this.setModifier(`${T}:${A}`)&&(e=k.join(":").slice(A.length))}let p=e.search(/[::]/u),m=e[p]===":",c=p!==-1;if(c||t.length===0&&!f(this,Er)){let T=c?e.slice(0,p):e,k=c&&e.slice(p+1),A=se(T),N=c?A.slice(A.search(/\S/u))+(m?":":""):A.trim(),[,E,F]=ha(N,l),V=!("functionHook"in n)||d.includes(F),W=g.includes(F);if(c?F&&V:W){this.setAttribute("name",F),S(this,kn,"magic-word"),m&&S(this,Ct,":");let Y=new Te(T,"magic-word-name",n,i);if(super.insertAt(Y),k!==!1&&t.unshift([k]),this.name==="invoke")for(let D=0;D<2;D++){let I=t.shift();if(!I)break;let R=new ce(I.join("="),`invoke-${D?"function":"module"}`,n,i);super.insertAt(R)}}}if(this.type==="template"){let T=se(e).trim();if(!this.normalizeTitle(T,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ce(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),b=1;for(let T=0;T<t.length;T++){let k=t[T];h||this.name==="switch"&&T>0||this.name==="tag"&&T>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(b),b++),this.insertAt(new gi(...k,n,i))}this.seal("modifier")}get type(){return f(this,kn)}get module(){return this.type==="magic-word"&&this.name==="invoke"?C(this,at,yn).call(this).title:void 0}get function(){var e;return this.type==="magic-word"&&this.name==="invoke"?(e=this.childNodes[2])==null?void 0:e.text().trim():void 0}setModifier(e){let[,,t,n]=this.getAttribute("config").parserFunction,i=se(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=t.includes(s),l=n.includes(s);return(f(this,Er)?a:l||!e)||(J.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),S(this,Er,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"&&(S(this,$r,C(this,at,yn).call(this)),this.setAttribute("name",f(this,$r).title))}toString(e){let{childNodes:t,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":f(this,Ct))+t.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":f(this,Ct))+Pe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return f(this,$r);case"colon":return f(this,Ct);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!C(this,at,yn).call(this).valid);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new U(this,e),{lintConfig:g}=v,{computeEditInfo:d}=g,u=i==="magic-word",p="no-ignored",m=g.getSeverity(p,"fragment");if(u&&!C(this,at,yn).call(this).valid)p="invalid-invoke",m=g.getSeverity(p,"name"),m&&n.push(q(s[1],l,p,"illegal-module",m));else if(m){let c=s[u?1:0],h=c.childNodes.findIndex(y=>y.type==="text"&&Mt(y.data).includes("#")),b=c.childNodes[h];if(b){let y=q(c,l,p,"useless-fragment",m);d&&(y.suggestions=[_(y,c.getRelativeIndex(h)+b.data.indexOf("#"))]),n.push(y)}}if(p="invalid-invoke",m=g.getSeverity(p,"function"),m&&u&&a===2)return n.push(P(this,l,p,"missing-function",m)),n;if(p="no-duplicate",m=g.getSeverity(p,"parameter"),m){let c=this.getDuplicatedArgs().filter(([,b])=>!b[0].querySelector("ext")),h="duplicate-parameter";for(let[,b]of c)Array.prototype.push.apply(n,b.map(y=>{let x=q(y,l,p,h,m);return d&&(x.suggestions=[_(x,-1)]),x}))}return n}}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?C(this,at,fa).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Nr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return f(this,Vt).has(i)?s=f(this,Vt).get(i):(s=new Set(this.getAllArgs().filter(({name:a})=>i===a)),f(this,Vt).set(i,s)),s}getDuplicatedArgs(){return[...f(this,Vt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let a=n.slice(2),l=a[a.length-1];s=[...a.filter(({anon:g})=>!g),...l!=null&&l.anon?[l]:[]].map(({lastChild:g})=>g);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:g}=s[a].childNodes.filter(d=>d.text().trim());if(l===0)s.splice(a,1);else if(l>1||!g.is("magic-word"))a++;else try{let d=g.getPossibleValues();Array.prototype.splice.apply(s,[a,1,...d]),a+=d.length}catch{a++}}return s}print(){{let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${s==="magic-word"?Ut(i)+n.print()+(t===1?"":f(this,Ct))+it(e.slice(1),{sep:"|"}):(i?`<span class="wpb-magic-word">${Ut(i)}</span>`:"")+it(e,{sep:"|"})}}}</span>`}}};ns=O(qu),kn=new WeakMap,Ct=new WeakMap,Er=new WeakMap,Vt=new WeakMap,$r=new WeakMap,at=new WeakSet,yn=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+se(this.childNodes[e?0:1].text()),10,{temporary:!0,...!e&&{page:""}})},fa=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:a}=s,l=String(i+1);(a!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},ot=j(ns,0,"TranscludeToken",ca,ot),B(ns,1,ot)});var ss,xa,_u,Wu,Du,Mu,ba,Uu,An,os,as,vn,Ta=L(()=>{"use strict";ae();z();Ae();M();es();ss=String.raw`[${We}\t]*`,xa=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,_u=new RegExp(String.raw`${xa}|https?[:/]/+|(?:rfc|pmid)(?=[-::]?${ss}\d)|isbn(?=[-::]?${ss}(?:\d(?:${ss}|-)){6})`,"giu"),Wu=new RegExp(xa,"giu"),Du=new Set(["attr-value","ext-link-text","link-text"]),Mu={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},ba=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"]),Uu=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{return/\w/u}})(),as=class as extends Ge{constructor(e){super();w(this,An);ge(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var n,i,s;{if(t===!1)return[];let{data:a,parentNode:l,nextSibling:g,previousSibling:d}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:u,parentNode:p}=l;if(u==="attr-value"){let{name:D,tag:I}=p;if(I==="ref"&&(D==="name"||D==="follow")||D==="group"&&(I==="ref"||I==="references")||I==="choose"&&(D==="before"||D==="after"))return[]}if(t!=null||(t=l.isPlain()&&!Du.has(u)?_u:Wu),a.search(t)===-1)return[];t.lastIndex=0;let m=[],c=g==null?void 0:g.type,h=g==null?void 0:g.name,b=d==null?void 0:d.type,y=this.getRootNode(),x=y.toString(),{ext:T,html:k,variants:A}=y.getAttribute("config"),{top:N,left:E}=y.posFromIndex(e),{lintConfig:F}=v,V=F.rules["tag-like"],W=typeof V=="object"&&V[1]?new Set(Object.keys(V[1]).filter(D=>D!=="invalid"&&D!=="disallowed")):new Set,Y=new Set(["onlyinclude","noinclude","includeonly",...T,...k[0],...k[1],...k[2],...W,...F.getSeverity("tag-like","disallowed")?ba:[]]);for(let D=t.exec(a);D;D=t.exec(a)){let{index:I,0:R}=D,[,ee,oe]=D,xe=R==="["&&u==="ext-link-text";if(oe&&oe!=="]"){let{length:ue}=oe;I+=ue,R=R.slice(ue)}else{if(R.startsWith("<")&&!Y.has(ee.toLowerCase())||xe&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(I+1))||g!=null&&g.is("ext")&&h==="nowiki"&&((n=g.innerText)!=null&&n.includes("]"))))continue;R.startsWith(`
|
|
2
|
+
`)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},Ki=o=>o&&Number(o[1]),Fu=(o,r)=>{var n;let e,t=i=>{e!=null||(e=ri(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of r){let{line:s,column:a,from:l,to:g}=i;l==null?s?(e!=null||(e=ri(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,t(l)),g!==void 0&&({line:i.endLine,column:i.endColumn}=t(g)),i.position=i.from}return r},Ko=(o,r)=>{if(r||o.trim())try{JSON.parse(o)}catch(e){let{message:t}=e,n=Ki(/\bline (\d+)/u.exec(t)),i=Ki(/\bcolumn (\d+)/u.exec(t)),s=Ki(/\bposition (\d+)/u.exec(t));return Fu(o,[{message:t,line:n,column:i,from:s,severity:"error"}])}return[]}});var pn,xr,cn,fn,Yi,U,pe=L(()=>{"use strict";U=class{constructor(r,e){w(this,fn);w(this,pn);w(this,xr);w(this,cn);S(this,pn,r),S(this,xr,e)}get start(){return f(this,xr)}get top(){return C(this,fn,Yi).call(this).top}get left(){return C(this,fn,Yi).call(this).left}};pn=new WeakMap,xr=new WeakMap,cn=new WeakMap,fn=new WeakSet,Yi=function(){var r;return(r=f(this,cn))!=null||S(this,cn,f(this,pn).getRootNode().posFromIndex(f(this,xr))),f(this,cn)}});var Ru,Pu,Tr,yr,Yo,q,P,ve,kr,_,ni,je,ii,si,oi,vt,st,ai,ze,li,z=L(()=>{"use strict";He();Ae();pe();M();Ru=new Set(["tr","td","th","caption"]),Pu=new Set(["Template:!!","Template:!-"]),Tr=o=>{let r=o.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.is("magic-word")&&r.name==="!"||r.is("template")&&Pu.has(r.name)||r.is("html")&&Ru.has(r.name))return!1;if(r.is("arg"))return r.length>1&&Tr(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(Tr);return e.includes(2)?2:e.includes(1)&&1}catch{}return r.is("template")||r.is("magic-word")&&r.name==="invoke"?1:2},yr=(o,r,e,t)=>({line:o+e-1,character:(e===1?r:0)+t}),Yo=o=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof U?e:new U(r,s),{offsetHeight:g,offsetWidth:d}=r,{startIndex:u,startLine:p,startCol:m}=o(r,s,a,l),{line:c,character:h}=yr(p,m,g,d);return{rule:t,message:v.msg(n),severity:i,startIndex:u,endIndex:u+r.toString().length,startLine:p,endLine:c,startCol:m,endCol:h}},q=Yo((o,r,e,t)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),P=Yo((o,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),ve=(o,r,e,t=0)=>({desc:v.msg(r),range:[o.startIndex+t,o.endIndex],text:e}),kr=(o,r,e)=>({desc:v.msg(r),range:[o,o],text:e}),_=(o,r=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+r],text:e}:ve(o,"remove",e,r),ni=(o,r)=>ve(o,"decode",Ht(r.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),je=(o,r,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:r}),ii=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),si=(o,r)=>ve(o,"comment",`<!--${r}-->`),oi=(o,r)=>ve(o,"uppercase",r.toUpperCase()),vt=(o,r=0)=>({desc:v.msg("whitespace"),range:[o,o+r],text:" "}),st=(o,r,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:r.repeat(e)}),ai=(o,r)=>({desc:v.msg("escape"),range:[o,o+r.length],text:r.replace(/\|/gu,"|")}),ze=(o,r,e,t)=>{if(o&&(t||v.viewOnly&&o[0]===J.rev))return o[1];let n=r();return(t||v.viewOnly)&&e([J.rev,n]),n},li=(o,r)=>o==="ol"&&r==="type"?["1","a","A","i","I"]:o==="th"&&r==="scope"?["row","col","rowgroup","colgroup"]:r==="dir"?["ltr","rtl","auto"]:r==="aria-hidden"?["true","false"]:[]});var Bu,di,Zi=L(()=>{"use strict";Bu=o=>{if(o.includes("#")){let r=o.indexOf("#"),e=o.slice(0,r),t=o.slice(r+1);return(n,i)=>(r===0||n===e)&&i===t}return r=>r===o},di=(o,r,e)=>{if(o=o.trim(),!o)return(()=>!0);let t=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Bu);return(({type:n,name:i})=>t.some(s=>s(n,i)))}});var ea=Qi((wp,Zo)=>{Zo.exports=function(o,r,e,t,n){var i,s;if(t===void 0)t=0;else if(t=t|0,t<0||t>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<t||n>=o.length)throw new RangeError("invalid upper bound");for(;t<=n;)if(i=t+(n-t>>>1),s=+e(o[i],r,i,o),s<0)t=i+1;else if(s>0)n=i-1;else return i;return~t}});var ta,ra,na=L(()=>{"use strict";ta=vu(ea()),ra=(o,r,e)=>{let t=(0,ta.default)(o,r,e);return t<0?~t:t}});var vr,ui=L(()=>{"use strict";z();vr=(o=!0)=>r=>{let e=new WeakMap;return function(...t){return ze(e.get(this),()=>r.apply(this,t),n=>{e.set(this,n)},o)}}});var ia,sa=L(()=>{"use strict";ia=o=>{class r 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 r}});var oa,aa,hn,Ar,Sr,bn,wr,Cr,mn,Ge,es=L(()=>{"use strict";He();na();z();Ae();ui();sa();M();aa=[ia],oa=[vr(!1)];Ge=class{constructor(){B(mn,5,this);ge(this,"childNodes",[]);w(this,hn);w(this,Ar);w(this,Sr);w(this,bn);w(this,wr);w(this,Cr,{})}get parentNode(){return f(this,hn)}get nextSibling(){return f(this,Ar)}get previousSibling(){return f(this,Sr)}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":S(this,hn,e),e||(S(this,Ar,void 0),S(this,Sr,void 0));break;case"nextSibling":S(this,Ar,e);break;case"previousSibling":S(this,Sr,e);break;case"aIndex":v.viewOnly&&S(this,wr,[J.rev,e]);break;default:this[r]=e}}getRootNode(){return ze(f(this,bn),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&S(this,bn,r)})}indexFromPos(r,e){{if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}}posFromIndex(r){{let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=ra(t,r,([,,i],s)=>i-s);return{top:n,left:r-t[n][1]}}return}}getDimension(){{let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return ze(f(this,Cr)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)v.viewOnly&&(f(this,Cr)[i]=[J.rev,n]),n+=e[i].toString().length+this.getGaps(i);return n},e=>{f(this,Cr)[r]=e})}getAbsoluteIndex(){return ze(f(this,wr),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{S(this,wr,r)})}getBoundingClientRect(){return{...this.getDimension(),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(r){return this.type===r}getLines(){return ri(String(this))}seal(r,e){{if(v.internal)return;let t=!e&&!!this[r];t||Object.defineProperty(this,r,{enumerable:t,configurable:!0})}}lspError(r){throw new Error(`${r} method is only available in the LSP version!`)}};mn=O(null),hn=new WeakMap,Ar=new WeakMap,Sr=new WeakMap,bn=new WeakMap,wr=new WeakMap,Cr=new WeakMap,j(mn,1,"getLines",oa,Ge),Ge=j(mn,0,"AstNode",aa,Ge),B(mn,1,Ge)});var la,da=L(()=>{"use strict";Zi();la=o=>{var r,ts;{class t extends o{constructor(){super(...arguments);w(this,r)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:g,childNodes:d}=l;if(g!=="text"){if(s(l))return l;for(let u=d.length-1;u>=0;u--)a.push(d[u])}}}querySelector(s){return this.getElementBy(C(this,r,ts).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let g=a.pop(),{type:d,childNodes:u}=g;if(d!=="text"){s(g)&&l.push(g);for(let p=u.length-1;p>=0;p--)a.push(u[p])}}return l}querySelectorAll(s){return this.getElementsBy(C(this,r,ts).call(this,s))}escape(){for(let s of this.childNodes)s.escape()}}return r=new WeakSet,ts=function(s){return di(s,this)},t}}});var ua,rs,ju,zt,ga=L(()=>{"use strict";ae();Ae();Zi();es();da();ua=[la];zt=class extends(ju=Ge){get length(){return this.childNodes.length}text(r){return Pe(this.childNodes,r)}removeAt(r){return Gt(this,r,1)[0]}insertAt(r,e=this.length){return Gt(this,e,0,[r]),r}closest(r){let e=di(r,this),{parentNode:t}=this;for(;t;){if(e(t))return t;({parentNode:t}=t)}}isInside(r){var e;return((e=this.closest(`${r},ext`))==null?void 0:e.type)===r}append(...r){this.safeAppend(r)}safeAppend(r){for(let e of r)this.insertAt(e)}safeReplaceChildren(r){for(let e=this.length-1;e>=0;e--)this.removeAt(e);this.safeAppend([...r])}setText(r,e=0){e+=e<0?this.length:0;let t=this.childNodes[e],{data:n}=t;return t.replaceData(r),n}toString(r,e=""){return this.childNodes.map(t=>t.toString(r)).join(e)}caretPositionFromIndex(r){{if(r===void 0)return;let{length:e}=this.toString();if(r>e||r<-e)return;r+=r<0?e:0;let t=this,n=0,i=0;for(;t.type!=="text";){let{childNodes:s}=t;n+=t.getAttribute("padding");for(let a=0;n<=r&&a<s.length;a++){let l=s[a],{nextSibling:g}=l,d=l.toString(),u=d.length;if(l.setAttribute("aIndex",n),n+=u,n>r||n===r&&u>0&&(!g||g.type==="text"||l.type!=="text"&&(d.trim()||!g.toString().trim()))){t=l,n-=u,i=n;break}n+=t.getGaps(a)}if(t.childNodes===s)return{offsetNode:t,offset:r-i}}return{offsetNode:t,offset:r-i}}this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(r){var e;{let t=(e=this.caretPositionFromIndex(r))==null?void 0:e.offsetNode;return(t==null?void 0:t.type)==="text"?t.parentNode:t}this.lspError("AstElement.elementFromIndex")}elementFromPoint(r,e){return this.elementFromIndex(this.indexFromPos(e,r))}lint(r=this.getAbsoluteIndex(),e){{let t=[];for(let n=0,i=r+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(t,a),i+=s.toString().length+this.getGaps(n)}return t}}print(r={}){{let e=r.class;return this.toString()?(e===""?"":`<span class="wpb-${e!=null?e:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+it(this.childNodes,r)+(e===""?"":"</span>"):""}}json(r,e=1/0,t=this.getAbsoluteIndex()){{let n={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};if(e>=1)for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let a=this.childNodes[i],{length:l}=a.toString();a.setAttribute("aIndex",s),n.childNodes.push(a.type==="text"?{data:a.data,range:[s,s+l]}:a.json(void 0,e-1,s)),s+=l+this.getGaps(i)}return n}}};rs=O(ju),zt=j(rs,0,"AstElement",ua,zt),B(rs,1,zt)});var At,xn=L(()=>{"use strict";At=(o=1)=>r=>{class e extends r{getGaps(){return o}}return e}});var Z,we=L(()=>{"use strict";Z=o=>{{class r extends o{escape(){}}return r}}});var Ou,gi,pa=L(()=>{"use strict";ae();z();M();G();Ou=new RegExp(`https?://${tt}${rt}$`,"iu"),gi=class extends ${get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(r,e,t,n=[]){super(void 0,t,n);let i=new $(typeof r=="number"?void 0:r,t,n,{}),s=new $(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var t;{let n=super.lint(r,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,g=(t=Ou.exec(l.text()))==null?void 0:t[0];try{if(g&&new URL(g).search){let d=q(l,{start:r},i,"unescaped-query",a);d.startIndex=d.endIndex,d.startLine=d.endLine,d.startCol=d.endCol,d.endIndex++,d.endCol++,(s.computeEditInfo||s.fix)&&(d.fix=st(d.startIndex,"{{=}}")),n.push(d)}}catch{}}return n}}print(){return super.print({sep:this.anon?"":"="})}json(r,e,t=this.getAbsoluteIndex()){{let n=super.json(void 0,e,t);return Object.assign(n,{anon:this.anon},this.duplicated&&{duplicated:!0}),n}}}});var Lr,ce,St=L(()=>{"use strict";G();ce=class extends ${constructor(e,t,n,i,s){super(e,n,i,s);w(this,Lr);S(this,Lr,t)}get type(){return f(this,Lr)}set type(e){S(this,Lr,e)}getAttribute(e){var t;return e==="invalid"?this.type==="converter-flag"&&!!((t=this.parentNode)!=null&&t.isInvalidFlag(this)):super.getAttribute(e)}};Lr=new WeakMap});var Tn,Te,wt=L(()=>{"use strict";G();Te=class extends ${constructor(e,t,n,i,s){super(e,n,i,s);w(this,Tn);S(this,Tn,t)}get type(){return f(this,Tn)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Tn=new WeakMap});var ma={};re(ma,{TranscludeToken:()=>ot});var ca,kn,Ct,Er,Vt,$r,at,yn,fa,ns,qu,ot,is=L(()=>{"use strict";ae();z();Ae();pe();xn();we();M();G();pa();St();wt();ca=[Z,At()];ot=class extends(qu=$){constructor(e,t,n,i=[]){var y,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,{});w(this,at);ge(this,"modifier","");w(this,kn,"template");w(this,Ct,":");w(this,Er,!1);w(this,Vt,new Map);w(this,$r);let{parserFunction:l,variable:g,functionHook:d}=n,u=(y=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:y[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[T,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=k[0])!=null?x:"");this.setModifier(`${T}:${A}`)&&(e=k.join(":").slice(A.length))}let p=e.search(/[::]/u),m=e[p]===":",c=p!==-1;if(c||t.length===0&&!f(this,Er)){let T=c?e.slice(0,p):e,k=c&&e.slice(p+1),A=se(T),N=c?A.slice(A.search(/\S/u))+(m?":":""):A.trim(),[,E,F]=ha(N,l),V=!("functionHook"in n)||d.includes(F),W=g.includes(F);if(c?F&&V:W){this.setAttribute("name",F),S(this,kn,"magic-word"),m&&S(this,Ct,":");let Y=new Te(T,"magic-word-name",n,i);if(super.insertAt(Y),k!==!1&&t.unshift([k]),this.name==="invoke")for(let D=0;D<2;D++){let I=t.shift();if(!I)break;let R=new ce(I.join("="),`invoke-${D?"function":"module"}`,n,i);super.insertAt(R)}}}if(this.type==="template"){let T=se(e).trim();if(!this.normalizeTitle(T,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ce(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),b=1;for(let T=0;T<t.length;T++){let k=t[T];h||this.name==="switch"&&T>0||this.name==="tag"&&T>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(b),b++),this.insertAt(new gi(...k,n,i))}this.seal("modifier")}get type(){return f(this,kn)}get module(){return this.type==="magic-word"&&this.name==="invoke"?C(this,at,yn).call(this).title:void 0}get function(){var e;return this.type==="magic-word"&&this.name==="invoke"?(e=this.childNodes[2])==null?void 0:e.text().trim():void 0}setModifier(e){let[,,t,n]=this.getAttribute("config").parserFunction,i=se(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=t.includes(s),l=n.includes(s);return(f(this,Er)?a:l||!e)||(J.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),S(this,Er,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"&&(S(this,$r,C(this,at,yn).call(this)),this.setAttribute("name",f(this,$r).title))}toString(e){let{childNodes:t,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":f(this,Ct))+t.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":f(this,Ct))+Pe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return f(this,$r);case"colon":return f(this,Ct);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!C(this,at,yn).call(this).valid);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new U(this,e),{lintConfig:g}=v,{computeEditInfo:d}=g,u=i==="magic-word",p="no-ignored",m=g.getSeverity(p,"fragment");if(u&&!C(this,at,yn).call(this).valid)p="invalid-invoke",m=g.getSeverity(p,"name"),m&&n.push(q(s[1],l,p,"illegal-module",m));else if(m){let c=s[u?1:0],h=c.childNodes.findIndex(y=>y.type==="text"&&Mt(y.data).includes("#")),b=c.childNodes[h];if(b){let y=q(c,l,p,"useless-fragment",m);d&&(y.suggestions=[_(y,c.getRelativeIndex(h)+b.data.indexOf("#"))]),n.push(y)}}if(p="invalid-invoke",m=g.getSeverity(p,"function"),m&&u&&a===2)return n.push(P(this,l,p,"missing-function",m)),n;if(p="no-duplicate",m=g.getSeverity(p,"parameter"),m){let c=this.getDuplicatedArgs().filter(([,b])=>!b[0].querySelector("ext")),h="duplicate-parameter";for(let[,b]of c)Array.prototype.push.apply(n,b.map(y=>{let x=q(y,l,p,h,m);return d&&(x.suggestions=[_(x,-1)]),x}))}return n}}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?C(this,at,fa).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Nr("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return f(this,Vt).has(i)?s=f(this,Vt).get(i):(s=new Set(this.getAllArgs().filter(({name:a})=>i===a)),f(this,Vt).set(i,s)),s}getDuplicatedArgs(){return[...f(this,Vt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let a=n.slice(2),l=a[a.length-1];s=[...a.filter(({anon:g})=>!g),...l!=null&&l.anon?[l]:[]].map(({lastChild:g})=>g);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:g}=s[a].childNodes.filter(d=>d.text().trim());if(l===0)s.splice(a,1);else if(l>1||!g.is("magic-word"))a++;else try{let d=g.getPossibleValues();Array.prototype.splice.apply(s,[a,1,...d]),a+=d.length}catch{a++}}return s}print(){{let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${s==="magic-word"?Ut(i)+n.print()+(t===1?"":f(this,Ct))+it(e.slice(1),{sep:"|"}):(i?`<span class="wpb-magic-word">${Ut(i)}</span>`:"")+it(e,{sep:"|"})}}}</span>`}}};ns=O(qu),kn=new WeakMap,Ct=new WeakMap,Er=new WeakMap,Vt=new WeakMap,$r=new WeakMap,at=new WeakSet,yn=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+se(this.childNodes[e?0:1].text()),10,{temporary:!0,...!e&&{page:""}})},fa=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:a}=s,l=String(i+1);(a!==l||s===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},ot=j(ns,0,"TranscludeToken",ca,ot),B(ns,1,ot)});var ss,xa,_u,Wu,Du,Mu,ba,Uu,An,os,as,vn,Ta=L(()=>{"use strict";ae();z();Ae();M();es();ss=String.raw`[${We}\t]*`,xa=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,_u=new RegExp(String.raw`${xa}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${ss}\d)|\bisbn(?=[-::]?${ss}(?:\d(?:${ss}|-)){6})`,"giu"),Wu=new RegExp(xa,"giu"),Du=new Set(["attr-value","ext-link-text","link-text"]),Mu={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},ba=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"]),Uu=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{return/\w/u}})(),as=class as extends Ge{constructor(e){super();w(this,An);ge(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?se(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var n,i,s;{if(t===!1)return[];let{data:a,parentNode:l,nextSibling:g,previousSibling:d}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:u,parentNode:p}=l;if(u==="attr-value"){let{name:D,tag:I}=p;if(I==="ref"&&(D==="name"||D==="follow")||D==="group"&&(I==="ref"||I==="references")||I==="choose"&&(D==="before"||D==="after"))return[]}if(t!=null||(t=l.isPlain()&&!Du.has(u)?_u:Wu),a.search(t)===-1)return[];t.lastIndex=0;let m=[],c=g==null?void 0:g.type,h=g==null?void 0:g.name,b=d==null?void 0:d.type,y=this.getRootNode(),x=y.toString(),{ext:T,html:k,variants:A}=y.getAttribute("config"),{top:N,left:E}=y.posFromIndex(e),{lintConfig:F}=v,V=F.rules["tag-like"],W=typeof V=="object"&&V[1]?new Set(Object.keys(V[1]).filter(D=>D!=="invalid"&&D!=="disallowed")):new Set,Y=new Set(["onlyinclude","noinclude","includeonly",...T,...k[0],...k[1],...k[2],...W,...F.getSeverity("tag-like","disallowed")?ba:[]]);for(let D=t.exec(a);D;D=t.exec(a)){let{index:I,0:R}=D,[,ee,oe]=D,xe=R==="["&&u==="ext-link-text";if(oe&&oe!=="]"){let{length:ue}=oe;I+=ue,R=R.slice(ue)}else{if(R.startsWith("<")&&!Y.has(ee.toLowerCase())||xe&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(I+1))||g!=null&&g.is("ext")&&h==="nowiki"&&((n=g.innerText)!=null&&n.includes("]"))))continue;R.startsWith(`
|
|
3
3
|
==`)&&(I++,R=R.slice(1))}R=R.toLowerCase();let[X]=R,de=R==="rfc"||R==="pmid"||R==="isbn",Q=X==="{",yt=X==="}",an=X==="[",Ui=X==="]",{length:kt}=R;Ui&&(I||kt>1)&&t.lastIndex--;let mr=e+I,Ot=mr+kt,ke,Ue,Jn,Kn,qt=x[Ot],Hi=x[mr-1],zi=Q||an,Gi=R==="{"&&Hi==="-"&&A.length>0,Vi=R==="}"&&qt==="-"&&A.length>0,Io=an&&c==="free-ext-link"&&!a.slice(I+1).trim()||Ui&&b==="free-ext-link"&&!a.slice(0,I).includes("]");if(de)ke="lonely-http",R=R.toUpperCase(),Ue=F.getSeverity(ke,R);else if(X==="<"){ke="tag-like";let ue;/^<\/?\s/u.test(R)||!/[\s/>]/u.test(qt!=null?qt:"")?ue="invalid":W.has(ee)?ue=ee:ba.has(ee)&&!T.includes(ee)&&(ue="disallowed"),Ue=F.getSeverity(ke,ue)}else if(X==="=")ke="syntax-like",Ue=F.getSeverity(ke,"heading");else if(Gi||Vi)ke="lonely-bracket",Ue=F.getSeverity(ke,"converter"),Gi&&I>0?(R="-{",I--,mr--,kt=2):Vi&&I<a.length-1&&(R="}-",Ot++,kt=2);else if(Io)ke="lonely-bracket",Ue=F.getSeverity(ke,"extLink");else if(zi||yt||Ui)if(ke="lonely-bracket",kt>1||Q&&qt===X||yt&&Hi===X)Ue=F.getSeverity(ke,"double");else{if(!xe){let ue=Mu[X],Re=zi?a.slice(I+1):a.slice(0,I);if(Q&&((i=ue.exec(Re))==null?void 0:i[0])==="}"||yt&&((s=ue.exec(Re))==null?void 0:s[0])==="{")continue;if(!Re.includes(X)){let et=zi?"nextSibling":"previousSibling",_e=this[et];for(;_e&&(_e.type!=="text"||!ue.test(_e.data));)_e=_e[et];if(_e&&ue.exec(_e.data)[0]!==X)continue}}Ue=F.getSeverity(ke,"single")}else ke="lonely-http",Ue=F.getSeverity(ke);if(!Ue)continue;let Fo=this.posFromIndex(I),{line:Ro,character:Po}=yr(N,E,Fo.top+1,Fo.left);if(X==="="){let ue=a.indexOf(`
|
|
4
4
|
`,I),Re=g,et;if(ue===-1){let _e=0;for(;Re&&!(Re.type==="text"&&(_e=Re.data.indexOf(`
|
|
5
5
|
`),_e!==-1));)Re=Re.nextSibling;if(!Re)continue;et=Re.data.slice(0,_e)}else et=a.slice(I+kt,ue);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(et))continue;ue===-1?(Ot=Re.getAbsoluteIndex()+et.length,{top:Jn,left:Kn}=y.posFromIndex(Ot)):(Ot+=et.length,kt+=et.length)}let _t={rule:ke,message:v.msg(X==="="?"header-like":"lonely",de||X==="h"||Gi||Vi?R:X),severity:Ue,startIndex:mr,endIndex:Ot,startLine:Ro,endLine:Jn!=null?Jn:Ro,startCol:Po,endCol:Kn!=null?Kn:Po+kt};if(F.computeEditInfo)if(X==="<")_t.suggestions=[st(mr,"<")];else if(X==="h"&&u!=="link-text"&&Uu.test(Hi||""))_t.suggestions=[vt(mr)];else if(xe){let ue=l.getAbsoluteIndex()+l.toString().length;_t.suggestions=[st(ue,"]")]}else if(R==="]"&&Io){let ue=e-d.toString().length;_t.suggestions=[kr(ue,"left-bracket","[")]}else de&&(_t.suggestions=[...D[0]===R?[]:[oi(_t,R)],...qt===":"||qt===":"?[vt(Ot,1)]:[]]);m.push(_t)}return m}}replaceData(e){C(this,An,os).call(this,e)}splitText(e){{let{parentNode:t,data:n}=this;if(!t)throw new Error("The text node to be split has no parent node!");let i=new as(n.slice(e));return Gt(t,t.childNodes.indexOf(this)+1,0,[i]),this.setAttribute("data",n.slice(0,e)),i}this.lspError("AstText.splitText")}escape(){{let{parentNode:e}=this;if(!e)throw new Error("The text node to be escaped has no parent node!");let{TranscludeToken:t}=(is(),K(ma)),n=e.getAttribute("config"),i=e.childNodes.indexOf(this)+1,s=g=>Math.max(this.data.lastIndexOf("=",g),this.data.lastIndexOf("|",g)),a=s(),l=()=>new t(this.data[a]==="="?"=":"!",[],n);for(;a>=0;a=s(a-1))a<this.data.length-1&&this.splitText(a+1),e.insertAt(J.run(l),i),C(this,An,os).call(this,this.data.slice(0,a))}}print(){return Ut(this.data)}};An=new WeakSet,os=function(e){this.setAttribute("data",e)};vn=as});var Ne,Lt=L(()=>{"use strict";Ne=(o=!0,r=!0)=>e=>{class t extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return t}});var he,Ve=L(()=>{"use strict";he=({length:o})=>r=>{class e extends r{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var ya,Qt,De,Qe,pi,ka,ls,Hu,Ce,Ir=L(()=>{"use strict";z();Ae();pe();Ve();we();M();G();St();ya=[Z,he("[[")];Ce=class extends(Hu=$){constructor(e,t,n,i=[],s="|"){super(void 0,n,i,{});w(this,pi);w(this,Qt,!0);w(this,De);w(this,Qe);if(this.insertAt(new ce(e,"link-target",n,i,{})),t!==void 0){let a=new $(t,n,i,{});a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}S(this,De,s)}get link(){return f(this,Qe)}get fragment(){return f(this,Qe).fragment}afterBuild(){S(this,Qe,this.getTitle()),f(this,De).includes("\0")&&S(this,De,this.buildFromStr(f(this,De),0)),C(this,pi,ka).call(this),super.afterBuild()}setAttribute(e,t){e==="bracket"?S(this,Qt,t):e==="title"?S(this,Qe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,f(this,De));return f(this,Qt)?`[[${t}]]`:t}text(){let e=super.text("|");return f(this,Qt)?`[[${e}]]`:e}getAttribute(e){return e==="title"?f(this,Qe):super.getAttribute(e)}getGaps(e){return e===0?f(this,De).length:1}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:g}=f(this,Qe),{lintConfig:d}=v,{computeEditInfo:u,fix:p}=d,m=new U(this,e),c="unknown-page",h=d.getSeverity(c);if(h&&i.childNodes.some(({type:b})=>b==="template")&&n.push(q(i,m,c,"template-in-link",h)),c="url-encoding",h=d.getSeverity(c),h&&l){let b=q(i,m,c,"unnecessary-encoding",h);(u||p)&&(b.fix=ni(b,i)),n.push(b)}if(c="pipe-like",h=d.getSeverity(c,"link"),h&&(a==="link"||a==="category")){let b=s==null?void 0:s.childNodes.findIndex(x=>x.type==="text"&&x.data.includes("|")),y=s==null?void 0:s.childNodes[b];if(y){let x=q(s,m,c,"pipe-in-link",h);if(u){let T=x.startIndex+s.getRelativeIndex(b);x.suggestions=[ai(T,y.data)]}n.push(x)}}if(c="no-ignored",h=d.getSeverity(c,"fragment"),h&&g!==void 0&&!va(a)){let b=q(i,m,c,"useless-fragment",h);if(u||p){let y=i.childNodes.findIndex(T=>T.type==="text"&&T.data.includes("#")),x=i.childNodes[y];x&&(b.fix=_(b,i.getRelativeIndex(y)+x.data.indexOf("#")))}n.push(b)}return n}}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(f(this,Qt)?{pre:"[[",post:"]]",sep:f(this,De)}:{sep:f(this,De)})}json(e,t,n=this.getAbsoluteIndex()){{let i=super.json(void 0,t,n),{type:s,fragment:a}=this;return a!==void 0&&(s==="link"||s==="redirect-target")&&(i.fragment=a),i}}};ls=O(Hu),Qt=new WeakMap,De=new WeakMap,Qe=new WeakMap,pi=new WeakSet,ka=function(){this.type!=="ext-inner"&&this.setAttribute("name",f(this,Qe).title)},Ce=j(ls,0,"LinkBaseToken",ya,Ce),B(ls,1,Ce)});var Aa,ds,zu,fe,Et=L(()=>{"use strict";we();G();Aa=[Z];fe=class extends(zu=$){get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}};ds=O(zu),fe=j(ds,0,"NowikiBaseToken",Aa,fe),B(ds,1,fe)});var Sa,us,Gu,me,Xt=L(()=>{"use strict";z();Lt();M();Et();Sa=[Ne(!1)];me=class extends(Gu=fe){get type(){return"noinclude"}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){{let{lintConfig:e}=v,t="no-ignored",n=e.getSeverity(t,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=P(this,{start:r},t,"useless-attribute",n),{computeEditInfo:l}=e,g=s[1].length+1,d=i.endsWith("/>")?2:1;return a.startIndex+=g,a.startCol+=g,a.endIndex-=d,a.endCol-=d,l&&(a.suggestions=[_(a)]),[a]}}return[]}}};us=O(Gu),me=j(us,0,"NoincludeToken",Sa,me),B(us,1,me)});var ci,wa=L(()=>{"use strict";z();M();Ir();Xt();ci=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new me(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(r=this.getAbsoluteIndex()){{let e=super.lint(r,!1),t="no-ignored",{lintConfig:n}=v,i=n.getSeverity(t,"redirect");if(i&&this.length===2){let s=q(this.lastChild,{start:r},t,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=_(s)),e.push(s)}return e}}}});var Ca,$t,Fr,gs,Vu,Jt,La=L(()=>{"use strict";Lt();we();G();wt();wa();Ca=[Ne(!1,!1),Z];Jt=class extends(Vu=$){constructor(e,t,n,i,s,a,l=[]){super(void 0,a,l);w(this,$t);w(this,Fr);S(this,$t,e),S(this,Fr,s),this.append(new Te(t,"redirect-syntax",a,l),new ci(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?f(this,$t).length:super.getAttribute(e)}toString(e){return f(this,$t)+super.toString(e)+f(this,Fr)}lint(e=this.getAbsoluteIndex()){{let t=e+f(this,$t).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}}print(){return super.print({pre:f(this,$t),post:f(this,Fr)})}};gs=O(Vu),$t=new WeakMap,Fr=new WeakMap,Jt=j(gs,0,"RedirectToken",Ca,Jt),B(gs,1,Jt)});var Ea={};re(Ea,{parseRedirect:()=>Qu});var Qu,$a=L(()=>{"use strict";M();La();Qu=(o,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(o);return t&&v.normalizeTitle(t[3],0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(t[0].length)}`,new Jt(...t.slice(1),r,e),o):!1}});var Na,ps,Xu,Kt,Ia=L(()=>{"use strict";Ve();we();G();Na=[Z,he("<onlyinclude>")];Kt=class extends(Xu=$){get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}};ps=O(Xu),Kt=j(ps,0,"OnlyincludeToken",Na,Kt),B(ps,1,Kt)});var Fa,Nt,Xe,cs,Ju,Me,fi=L(()=>{"use strict";xn();we();G();Fa=[At(),Z];Me=class extends(Ju=$){constructor(e,t,n,i,s,a=[]){super(void 0,s);w(this,Nt);w(this,Xe);ge(this,"closed");this.setAttribute("name",e.toLowerCase()),S(this,Nt,[e,i||e]),this.closed=i!=="",S(this,Xe,i===void 0),this.append(t,n);let l=typeof t=="string"?-1:a.indexOf(t);a.splice(l===-1?1/0:l,0,this)}get innerText(){return f(this,Xe)?void 0:this.lastChild.text()}get selfClosing(){return f(this,Xe)}toString(e){let{firstChild:t,lastChild:n}=this,[i,s]=f(this,Nt);return f(this,Xe)?`<${i}${t.toString(e)}/>`:`<${i}${t.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,t]=f(this,Nt);return f(this,Xe)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?f(this,Nt)[0].length+1:super.getAttribute(e)}print(){{let[e,t]=f(this,Nt);return super.print(f(this,Xe)?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}}json(e,t,n=this.getAbsoluteIndex()){{let i=super.json(void 0,t,n);return i.selfClosing=f(this,Xe),i}}};cs=O(Ju),Nt=new WeakMap,Xe=new WeakMap,Me=j(cs,0,"TagPairToken",Fa,Me),B(cs,1,Me)});var Ra,fs,Ku,Yt,Pa=L(()=>{"use strict";z();pe();Lt();M();fi();Ra=[Ne(!1)];Yt=class extends(Ku=Me){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){{let e=[],{firstChild:t,closed:n,name:i}=this,s=new U(this,r),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:g}=l,d=a.map(u=>l.getSeverity(u,"include"));if(d[0]&&t.data.trim()){let u=q(t,s,a[0],"useless-attribute",d[0]);g&&(u.suggestions=[_(u)]),e.push(u)}if(d[1]&&!n){let u=P(this,s,a[1],v.msg("unclosed",`<${i}>`),d[1]);g&&(u.suggestions=[je(u.endIndex,`</${i}>`)]),e.push(u)}return e}}};fs=O(Ku),Yt=j(fs,0,"IncludeToken",Ra,Yt),B(fs,1,Yt)});var Rr,mi=L(()=>{"use strict";Rr=(o=0)=>r=>{var e,ms;{class n extends r{constructor(){super(...arguments);w(this,e)}hasAttr(a){return C(this,e,ms).call(this).hasAttr(a)}getAttr(a){return C(this,e,ms).call(this).getAttr(a)}}return e=new WeakSet,ms=function(){return this.childNodes[o]},n}}});var le,Ba,ja,hi,bs,Oa,bi,Da,Ma,Ua,hs,qa,_a,Wa,Zt,xi,Ti,yi,Ha,ki,vi=L(()=>{"use strict";le=new Set(["align"]),Ba=new Set(["cite"]),ja=new Set(["cite","datetime"]),hi=new Set(["width"]),bs=new Set(["axis","align","bgcolor","height","width","valign"]),Oa=new Set([...bs,"abbr","headers","scope","rowspan","colspan"]),bi=new Set(["type"]),Da=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Ma=new Set(["clear"]),Ua=new Set(["bgcolor","align","valign"]),hs=new Set(["id","qid","forcemathmode","type","display"]),qa=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),_a=new Set(["weight"]),Wa=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),Zt=new Set,xi=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Ti={div:le,h1:le,h2:le,h3:le,h4:le,h5:le,h6:le,blockquote:Ba,q:Ba,p:le,br:Ma,pre:hi,ins:ja,del:ja,ul:bi,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Da,"border"]),caption:le,tr:Ua,td:Oa,th:Oa,font:new Set(["size","color","face"]),hr:hi,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:bi,poem:le,categorytree:le,combooption:le,img:new Set(["alt","src","width","height","loading","srcset"])},yi={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:Zt,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:_a,choicetemplate:_a,imagemap:Zt,inputbox:Zt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Zt,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([...hs,"chem"]),chem:hs,ce:hs,hiero:Zt,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:qa,syntaxhighlight:qa,templatedata:Zt,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Zt,mapframe:new Set([...Wa,"frameless"]),maplink:new Set([...Wa,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},Ha={table:Da,td:new Set([...bs,"scope"]),th:bs,br:Ma,caption:le,div:le,hr:hi,h1:le,h2:le,h3:le,h4:le,h5:le,h6:le,li:bi,p:le,pre:hi,tr:Ua,ul:bi},ki={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 Yu,Zu,eg,tg,Sn,Pr,be,Je,er,za,xs,Br,Ga=L(()=>{"use strict";z();ae();vi();pe();M();G();St();Yu=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Zu=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,eg=new Set(["ext","arg","magic-word","template"]),tg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Br=class extends ${constructor(e,t,n,i,s,a="",l,g=[]){let d=new ce(n,"attr-key",s,g),u;if(n==="title"||t==="img"&&n==="alt")u=new $(l,s,g,{}),u.type="attr-value",u.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="ref"&&n==="details"||(t==="mapframe"||t==="maplink")&&n==="text"||t==="choose"&&(n==="before"||n==="after")){let p={...s,excludes:[...s.excludes,"heading","html","table","hr","list"]};u=new $(l,p,g,{}),u.type="attr-value",u.setAttribute("stage",1)}else u=new ce(l,"attr-value",s,g,{});super(void 0,s,g);w(this,er);w(this,Sn);w(this,Pr);w(this,be);w(this,Je);S(this,Sn,e),this.append(d,u),S(this,be,a),S(this,Je,[...i]),S(this,Pr,t),this.setAttribute("name",nt(se(n)))}get type(){return f(this,Sn)}get tag(){return f(this,Pr)}get balanced(){return!f(this,be)||f(this,Je)[0]===f(this,Je)[1]}afterBuild(){f(this,be).includes("\0")&&S(this,be,this.buildFromStr(f(this,be),0)),this.parentNode&&S(this,Pr,this.parentNode.name),C(this,er,za).call(this),super.afterBuild()}toString(e){let[t="",n=""]=f(this,Je);return f(this,be)?super.toString(e,f(this,be)+t)+n:this.firstChild.toString(e)}text(){return f(this,be)?`${super.text(`${f(this,be).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return f(this,be)?f(this,be).length+((t=(e=f(this,Je)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var n;{let i=super.lint(e,t),{balanced:s,firstChild:a,lastChild:l,name:g,tag:d}=this,u=new U(this,e),p=["unclosed-quote","obsolete-attr"],{lintConfig:m}=v,c=p.map(b=>m.getSeverity(b,g));if(c[0]&&!s){let b=q(l,u,p[0],"unclosed-quotes",c[0]);b.startIndex--,b.startCol--,m.computeEditInfo&&(b.suggestions=[je(b.endIndex,f(this,Je)[0])]),i.push(b)}let h=C(this,er,xs).call(this,e,u);return h&&i.push(h),c[1]&&((n=Ha[d])!=null&&n.has(g))&&i.push(q(a,u,p[1],"obsolete-attribute",c[1])),i}}getValue(){return f(this,be)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){this.type!=="ext-attr"&&(S(this,be,"{{=}}"),this.lastChild.escape())}getAttribute(e){return e==="invalid"?C(this,er,xs).call(this):super.getAttribute(e)}print(){{let[e="",t=""]=f(this,Je);return f(this,be)?super.print({sep:Ut(f(this,be))+e,post:t}):super.print()}}json(e,t,n=this.getAbsoluteIndex()){{let i=super.json(void 0,t,n);return i.tag=this.tag,i}}};Sn=new WeakMap,Pr=new WeakMap,be=new WeakMap,Je=new WeakMap,er=new WeakSet,za=function(){this.setAttribute("name",nt(this.firstChild.text()))},xs=function(e,t){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:g}=this,d=!i.childNodes.some(({type:x})=>eg.has(x)),u=this.getValue(),p=yi[l],m=Ti[l],{length:c}=this.toString(),h="illegal-attr",b,y;if({lintConfig:b}=v,{computeEditInfo:y}=b,!(p!=null&&p.has(a))&&!(m!=null&&m.has(a))&&(s==="ext-attr"?p||m:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(a)&&(l==="meta"||l==="link"||!xi.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(g!=null&&g.hasAttr("itemscope"))){if(e===void 0)return!0;{let x=b.getSeverity(h,"unknown");if(x){let T=q(n,t,h,"illegal-attribute-name",x);return y&&(T.suggestions=[_(e,c)]),T}}}else if(a==="style"&&typeof u=="string"&&Yu.test(u)){if(e===void 0)return!0;{h="insecure-style";let x=b.getSeverity(h);return x&&q(i,t,h,"insecure-style",x)}}else if(a==="tabindex"&&typeof u=="string"&&u!=="0"){if(e===void 0)return!0;{let x=b.getSeverity(h,"tabindex");if(x){let T=q(i,t,h,"nonzero-tabindex",x);return y&&(T.suggestions=[_(e,c),ve(T,"0 tabindex","0")]),T}}}else if(typeof u=="string"&&((/^xmlns:[\w:.-]+$/u.test(a)||tg.has(a))&&Zu.test(u)||d&&(a==="href"||l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(u))){if(e===void 0)return!0;{let x=b.getSeverity(h,"value");return x&&q(i,t,h,"illegal-attribute-value",x)}}else if(d&&s!=="ext-attr"){let x=li(l,a),T=String(u).toLowerCase();if(x.length>0&&x.every(k=>k!==T)){if(e===void 0)return!0;{let k=b.getSeverity(h,"value");return k&&q(i,t,h,"illegal-attribute-value",k)}}}return!1}});var Va,rg,ng,wn,jr,Ai,It,Si=L(()=>{"use strict";z();ae();pe();M();G();St();Ga();Va=o=>o.slice(0,-1),rg=o=>`${Va(o)}-dirty`,ng=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{return/[^\W_]/u}})(),It=class extends ${constructor(e,t,n,i,s=[]){super(void 0,i,s,{});w(this,jr);w(this,wn);if(S(this,wn,t),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="",g=a.exec(e),d=0,u=()=>{l&&(super.insertAt(new ce(l,rg(t),i,s,{})),l="")};for(;g;){let{index:p,0:m,1:c,2:h,3:b,4:y,5:x,6:T}=g;if(l+=e.slice(d,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(se(c).trim())){let k=y!=null?y:T,A=[b,x],N=new Br(Va(t),n,c,A,i,h,k,s);u(),super.insertAt(N)}else l+=m;({lastIndex:d}=a),g=a.exec(e)}l+=e.slice(d),u()}}get type(){return f(this,wn)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Br&&(!e||t.name===nt(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let t=this.getAttrTokens(e);return t[t.length-1]}}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{parentNode:i,childNodes:s}=this,a=new Map,l=new Set,g=new U(this,e),d=["no-ignored","no-duplicate"],{lintConfig:u}=v,{computeEditInfo:p,fix:m}=u,c=["closingTag","invalidAttributes","nonWordAttributes"].map(b=>u.getSeverity(d[0],b));if(c[0]&&C(this,jr,Ai).call(this)){let b=P(this,g,d[0],"attributes-of-closing-tag",c[0]);if(p){let y=i.getAbsoluteIndex();b.suggestions=[_(b),ii(y)]}n.push(b)}for(let b of s)if(b instanceof Br){let{name:y}=b;a.has(y)?(l.add(y),a.get(y).push(b)):a.set(y,[b])}else{let y=b.text().trim(),x=c[ng.test(y)?1:2];if(y&&x){let T=q(b,g,d[0],"invalid-attribute",x);p&&(T.suggestions=[_(T,0," ")]),n.push(T)}}let h=u.getSeverity(d[1],"attribute");if(h&&l.size>0)for(let b of l){let y=a.get(b).map(x=>{let T=x.getValue();return[x,T===!0?"":T]});Array.prototype.push.apply(n,y.map(([x,T],k)=>{let A=q(x,g,d[1],v.msg("duplicate-attribute",b),h);if(p||m){let N=_(A);!T||y.slice(0,k).some(([,E])=>E===T)?A.fix=N:p&&(A.suggestions=[N])}return A}))}return n}}escape(){this.type!=="ext-attrs"&&super.escape()}getAttribute(e){return e==="invalid"?C(this,jr,Ai).call(this):super.getAttribute(e)}print(){return this.toString()?`<span class="wpb-${this.type}${C(this,jr,Ai).call(this)?" wpb-invalid":""}">${this.childNodes.map(e=>e.print(e instanceof ce?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};wn=new WeakMap,jr=new WeakSet,Ai=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var Qa={};re(Qa,{PreToken:()=>Ts});var Ts,Xa=L(()=>{"use strict";G();Xt();Ts=class extends ${get type(){return"ext-inner"}constructor(r,e,t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(r);a&&(i.lastIndex=a.index+s);let l=i.exec(r),g=0,d="";for(;a&&l;)new me(a[0],e,t,!0),new me(l[0],e,t,!0),d+=`${r.slice(g,a.index)}\0${t.length-1}n${r.slice(a.index+s,l.index)}\0${t.length}n`,g=l.index+s+1,n.lastIndex=g,a=n.exec(r),a&&(i.lastIndex=a.index+s),l=i.exec(r);r=d+r.slice(g)}super(r,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var Ft,wi=L(()=>{"use strict";G();Ft=class extends ${get type(){return"ext-inner"}toString(r){return super.toString(r,`
|
package/dist/bin/config.js
CHANGED
package/dist/lib/text.js
CHANGED
|
@@ -54,8 +54,8 @@ const cached_1 = require("../mixin/cached");
|
|
|
54
54
|
/* NOT FOR BROWSER END */
|
|
55
55
|
const sp = /* #__PURE__ */ (() => String.raw `[${string_1.zs}\t]*`)(), source = /* #__PURE__ */ (() => String.raw `<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`)();
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
57
|
-
|
|
58
|
-
const errorSyntax = /* #__PURE__ */ (() => new RegExp(String.raw `${source}
|
|
57
|
+
/\bhttps?[:/]\/+|\b(?:rfc|pmid)(?=[-::]?\s*\d)|\bisbn(?=[-::]?\s*(?:\d(?:\s*|-)){6})/giu;
|
|
58
|
+
const errorSyntax = /* #__PURE__ */ (() => new RegExp(String.raw `${source}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${sp}\d)|\bisbn(?=[-::]?${sp}(?:\d(?:${sp}|-)){6})`, 'giu'))();
|
|
59
59
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
60
60
|
/<(?:\/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}/giu;
|
|
61
61
|
const errorSyntaxUrl = /* #__PURE__ */ new RegExp(source, 'giu'), noLinkTypes = new Set(['attr-value', 'ext-link-text', 'link-text']), regexes = {
|
package/extensions/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var _a;
|
|
3
|
-
const version = '1.35.
|
|
3
|
+
const version = '1.35.2', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
|
|
4
4
|
? src.replace(file, '')
|
|
5
5
|
: `https://fastly.jsdelivr.net/npm/wikiparser-node@${version}`;
|
|
6
6
|
const workerJS = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiparser-node",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.2",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -93,23 +93,23 @@
|
|
|
93
93
|
"mathoid-texvcjs": "^0.6.0",
|
|
94
94
|
"prism-wiki": "^1.3.0",
|
|
95
95
|
"prismjs": "^1.30.0",
|
|
96
|
-
"stylelint": "^17.
|
|
96
|
+
"stylelint": "^17.3.0",
|
|
97
97
|
"vscode-css-languageservice": "^6.3.9",
|
|
98
98
|
"vscode-html-languageservice": "^5.6.1",
|
|
99
99
|
"vscode-json-languageservice": "^5.7.1"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@bhsd/code-standard": "^2.0.
|
|
102
|
+
"@bhsd/code-standard": "^2.0.1",
|
|
103
103
|
"@bhsd/nodejs": "^0.1.0",
|
|
104
104
|
"@bhsd/test-util": "^0.3.0",
|
|
105
|
-
"@codemirror/lint": "^6.9.
|
|
105
|
+
"@codemirror/lint": "^6.9.4",
|
|
106
106
|
"@eslint/markdown": "^7.5.1",
|
|
107
|
-
"@stylistic/eslint-plugin": "^5.
|
|
107
|
+
"@stylistic/eslint-plugin": "^5.8.0",
|
|
108
108
|
"@types/color-name": "^2.0.0",
|
|
109
109
|
"@types/color-rgba": "^2.1.3",
|
|
110
110
|
"@types/mocha": "^10.0.10",
|
|
111
|
-
"@types/node": "^24.10.
|
|
112
|
-
"@types/prismjs": "^1.26.
|
|
111
|
+
"@types/node": "^24.10.13",
|
|
112
|
+
"@types/prismjs": "^1.26.6",
|
|
113
113
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
114
114
|
"@typescript-eslint/parser": "^8.54.0",
|
|
115
115
|
"c8": "^10.1.3",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"color-rgba": "^3.0.0",
|
|
118
118
|
"diff2html-cli": "^5.2.15",
|
|
119
119
|
"esbuild": "^0.27.3",
|
|
120
|
-
"eslint": "^9.39.
|
|
120
|
+
"eslint": "^9.39.3",
|
|
121
121
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
122
|
-
"eslint-plugin-jsdoc": "^62.
|
|
123
|
-
"eslint-plugin-jsonc": "^2.21.
|
|
122
|
+
"eslint-plugin-jsdoc": "^62.7.0",
|
|
123
|
+
"eslint-plugin-jsonc": "^2.21.1",
|
|
124
124
|
"eslint-plugin-n": "^17.23.2",
|
|
125
125
|
"eslint-plugin-promise": "^7.2.1",
|
|
126
126
|
"eslint-plugin-regexp": "^3.0.0",
|
|
127
|
-
"eslint-plugin-unicorn": "^
|
|
128
|
-
"markdownlint-cli2": "^0.
|
|
127
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
128
|
+
"markdownlint-cli2": "^0.21.0",
|
|
129
129
|
"mocha": "^11.7.5",
|
|
130
130
|
"monaco-editor": "^0.55.1",
|
|
131
131
|
"typescript": "^5.9.3",
|