wikiparser-node 1.22.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle-es8.min.js +2 -2
- package/bundle/bundle-lsp.min.js +2 -2
- package/bundle/bundle.min.js +2 -2
- package/config/default.json +2 -0
- package/config/minimum.json +1 -0
- package/config/moegirl.json +2 -0
- package/dist/lib/document.js +1 -1
- package/dist/lib/element.js +3 -3
- package/dist/lib/lsp.js +25 -8
- package/dist/lib/range.js +8 -2
- package/dist/mixin/readOnly.js +3 -1
- package/dist/parser/selector.js +11 -9
- package/extensions/dist/base.js +1 -1
- package/package.json +2 -2
package/bundle/bundle-es8.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";(()=>{var Vo=Object.defineProperty,Qo=Object.defineProperties;var Jo=Object.getOwnPropertyDescriptors;var mn=Object.getOwnPropertySymbols;var Xo=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable;var vn=e=>{throw TypeError(e)};var ks=(e,t,s)=>t in e?Vo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,fe=(e,t)=>{for(var s in t||(t={}))Xo.call(t,s)&&ks(e,s,t[s]);if(mn)for(var s of mn(t))Ko.call(t,s)&&ks(e,s,t[s]);return e},Se=(e,t)=>Qo(e,Jo(t));var Yo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ke=(e,t,s)=>ks(e,typeof t!="symbol"?t+"":t,s),_s=(e,t,s)=>t.has(e)||vn("Cannot "+s);var f=(e,t,s)=>(_s(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?vn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),L=(e,t,s,n)=>(_s(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),j=(e,t,s)=>(_s(e,t,"access private method"),s);var bn=(e,t,s,n)=>({set _(l){L(e,t,l,s)},get _(){return f(e,t,n)}});var Za=Yo((td,Go)=>{var Zo=Object.create,nt=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,Gi=Object.getOwnPropertyNames,ea=Object.prototype.hasOwnProperty,ll=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),rt=e=>{throw TypeError(e)},ol=(e,t,s)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,wn=(e,t)=>nt(e,"name",{value:t,configurable:!0}),T=(e,t)=>function(){return e&&(t=(0,e[Gi(e)[0]])(e=0)),t},ta=(e,t)=>function(){return t||(0,e[Gi(e)[0]])((t={exports:{}}).exports,t),t.exports},Y=(e,t)=>{for(var s in t)nt(e,s,{get:t[s],enumerable:!0})},sa=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Gi(t))!ea.call(e,l)&&l!==s&&nt(e,l,{get:()=>t[l],enumerable:!(n=rl(t,l))||n.enumerable});return e},G=e=>sa(nt({},"__esModule",{value:!0}),e),Z=e=>{var t;return[,,,Zo((t=e==null?void 0:e[ll("metadata")])!=null?t:null)]},al=["class","method","getter","setter","accessor","field","value","get","set"],mt=e=>e!==void 0&&typeof e!="function"?rt("Function expected"):e,ia=(e,t,s,n,l)=>({kind:al[e],name:t,metadata:n,addInitializer:i=>s._?rt("Already initialized"):l.push(mt(i||null))}),ds=(e,t)=>ol(t,ll("metadata"),e[3]),ee=(e,t,s,n)=>{for(var l=0,i=e[t>>1],r=i&&i.length;l<r;l++)t&1?i[l].call(s):n=i[l].call(s,n);return n},te=(e,t,s,n,l,i)=>{var r,o,a,h,d,u=t&7,g=!!(t&8),c=!!(t&16),p=u>3?e.length+1:u?g?1:2:0,v=al[u+5],m=u>3&&(e[p-1]=[]),x=e[p]||(e[p]=[]),b=u&&(!c&&!g&&(l=l.prototype),u<5&&(u>3||!c)&&rl(u<4?l:{get[s](){return de(this,i)},set[s](y){return xe(this,i,y)}},s));u?c&&u<4&&wn(i,(u>2?"set ":u>1?"get ":"")+s):wn(l,s);for(var w=n.length-1;w>=0;w--)h=ia(u,s,a={},e[3],x),u&&(h.static=g,h.private=c,d=h.access={has:c?y=>ra(l,y):y=>s in y},u^3&&(d.get=c?y=>(u^1?de:Lt)(y,l,u^4?i:b.get):y=>y[s]),u>2&&(d.set=c?(y,A)=>xe(y,l,A,u^4?i:b.set):(y,A)=>y[s]=A)),o=(0,n[w])(u?u<4?c?i:b[v]:u>4?void 0:{get:b.get,set:b.set}:l,h),a._=1,u^4||o===void 0?mt(o)&&(u>4?m.unshift(o):u?c?i=o:b[v]=o:l=o):typeof o!="object"||o===null?rt("Object expected"):(mt(r=o.get)&&(b.get=r),mt(r=o.set)&&(b.set=r),mt(r=o.init)&&m.unshift(r));return u||ds(e,l),b&&nt(l,s,b),c?u^4?i:b:l},na=(e,t,s)=>ol(e,typeof t!="symbol"?t+"":t,s),Vi=(e,t,s)=>t.has(e)||rt("Cannot "+s),ra=(e,t)=>Object(t)!==t?rt('Cannot use the "in" operator on this value'):e.has(t),de=(e,t,s)=>(Vi(e,t,"read from private field"),s?s.call(e):t.get(e)),_e=(e,t,s)=>t.has(e)?rt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),xe=(e,t,s,n)=>(Vi(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),Lt=(e,t,s)=>(Vi(e,t,"access private method"),s),la=(e,t,s,n)=>({set _(l){xe(e,t,l,s)},get _(){return de(e,t,n)}}),dl,Qi,hl=T({"base.ts"(){"use strict";dl=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),Qi=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function Ze(e){const t=new Map,s=new WeakMap;return n=>{const l=typeof n=="string"?t:s;if(l.has(n)){const r=l.get(n);return r.lastIndex=0,r}const i=e(n);return l.set(n,i),i}}var Ft,ul,Rt=T({"../common/dist/index.mjs"(){"use strict";Ft=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),ul=Ze}}),Ne,$s,et,tt,st,$e,Ge,cl,ve,We,yn,Sn,jt,gl,An,kn,Et,it,oe=T({"util/string.ts"(){"use strict";Rt(),Ne=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,$s=String.raw`[^[\]<>"\0-\x1F\x7F${Ne}\uFFFD]`,et=String.raw`(?:\[[\da-f:.]+\]|${$s})`,tt=String.raw`(?:${$s}|\0\d+[cn!~]\x7F)*`,st=e=>e.trim().toLowerCase(),$e=(e,t)=>e.replace(/\0(\d+)\x7F/gu,(s,n)=>t[n]),Ge=(e,t)=>s=>s.replace(e,t),cl=Ge(/[\0\x7F]|\r$/gmu,""),ve=Ge(/\0\d+[cn]\x7F/gu,""),We=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),yn={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Sn=Ge(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):yn[s.toLowerCase()]),jt=e=>Sn(e),gl=Ge(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),An={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},kn=e=>Ge(e,t=>`&${An[t]};`),Et=kn(/[&<>]/gu),it=(e,t={})=>{const{pre:s="",post:n="",sep:l=""}=t;return s+e.map(i=>i.print()).join(l)+n}}}),oa=ta({"config/minimum.json"(e,t){t.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","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),me,Li,Me=T({"util/constants.ts"(){"use strict";me=11,Li=oa()}}),le,ae=T({"lib/rect.ts"(){"use strict";var e,t,s,n,Fi,i;le=(i=class{constructor(r,o){N(this,n);N(this,e);N(this,t);N(this,s);L(this,e,r),L(this,t,o)}get start(){return f(this,t)}get top(){return j(this,n,Fi).call(this).top}get left(){return j(this,n,Fi).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakSet,Fi=function(){var r;return(r=f(this,s))!=null||L(this,s,f(this,e).getRootNode().posFromIndex(f(this,t))),f(this,s)},i)}}),_n,$n,It,ji,Ts,R,V,qe,pl,M=T({"util/lint.ts"(){"use strict";pe(),ae(),B(),_n=new Set(["tr","td","th","caption"]),$n=new Set(["Template:!!","Template:!-"]),It=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&$n.has(t.name)||t.is("html")&&_n.has(t.name))return!1;if(t.is("arg"))return t.length>1&&It(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(It);return s.includes(2)?2:s.includes(1)&&1}catch(s){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},ji=(e,t,s,n)=>({line:e+s-1,character:(s===1?t:0)+n}),Ts=e=>(t,s,n,l,i="error")=>{const{start:r}=s,{top:o,left:a}=s instanceof le?s:new le(t,r),{offsetHeight:h,offsetWidth:d}=t,{startIndex:u,startLine:g,startCol:c}=e(t,r,o,a),{line:p,character:v}=ji(g,c,h,d);return{rule:n,message:_.msg(l),severity:i,startIndex:u,endIndex:u+t.toString().length,startLine:g,endLine:p,startCol:c,endCol:v}},R=Ts((e,t,s,n)=>{const l=e.getRelativeIndex(),{top:i,left:r}=e.parentNode.posFromIndex(l);return{startIndex:t+l,startLine:s+i,startCol:i?r:n+r}}),V=Ts((e,t,s,n)=>({startIndex:t,startLine:s,startCol:n})),qe=(e,t,s,n)=>{if(e&&(n||_.viewOnly&&e[0]===be.rev))return e[1];const l=t();return(n||_.viewOnly)&&s([be.rev,l]),l},pl=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),Tn,Yt,aa=T({"parser/selector.ts"(){"use strict";Tn=(e,t,s)=>{if(e.includes("#")){const[n,...l]=e.split("#");return(!n||n===t)&&l.every(i=>i===s)}return!e||e===t},Yt=(e,t,s)=>({type:n,name:l})=>e.split(",").some(i=>Tn(i.trim(),n,l))}}),hs,Ji=T({"mixin/cached.ts"(){"use strict";M(),hs=(e=!0)=>t=>{const s=new WeakMap;return function(...n){return qe(s.get(this),()=>t.apply(this,n),l=>{s.set(this,l)},e)}}}}),Cn,qt,dt,ht,Wt,ut,ct,Mt,Cs,Ut,Nt,fl=T({"lib/node.ts"(){"use strict";M(),pe(),Ji(),B(),Cn=[hs(!1)],Nt=class{constructor(){ee(Ut,5,this),_e(this,Mt),na(this,"childNodes",[]),_e(this,qt),_e(this,dt),_e(this,ht),_e(this,Wt),_e(this,ut),_e(this,ct,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return de(this,qt)}get nextSibling(){return de(this,dt)}get previousSibling(){return de(this,ht)}get offsetHeight(){return Lt(this,Mt,Cs).call(this).height}get offsetWidth(){return Lt(this,Mt,Cs).call(this).width}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":xe(this,qt,t),t||(xe(this,dt,void 0),xe(this,ht,void 0));break;case"nextSibling":xe(this,dt,t);break;case"previousSibling":xe(this,ht,t);break;case"aIndex":_.viewOnly&&xe(this,ut,[be.rev,t]);break;default:this[e]=t}}getRootNode(){return qe(de(this,Wt),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&xe(this,Wt,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),n=s.findIndex(([,,l])=>e<=l);return{top:n,left:e-s[n][1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return qe(de(this,ct)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let n=this.getAttribute("padding");for(let l=0;l<s;l++)_.viewOnly&&(de(this,ct)[l]=[be.rev,n]),n+=t[l].toString().length+this.getGaps(l);return n},t=>{de(this,ct)[e]=t})}getAbsoluteIndex(){return qe(de(this,ut),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{xe(this,ut,e)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){const e=[];let t=0;for(const s of String(this).split(`
|
|
2
|
-
`)){const n=t+s.length;e.push([s,t,n]),t=n+1}return e}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},Ut=Z(null),qt=new WeakMap,dt=new WeakMap,ht=new WeakMap,Wt=new WeakMap,ut=new WeakMap,ct=new WeakMap,Mt=new WeakSet,Cs=function(){const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}},te(Ut,1,"getLines",Cn,Nt),ds(Ut,Nt)}}),xl,da=T({"lib/element.ts"(){"use strict";var e,Ei,Pi,n;oe(),pe(),aa(),fl(),xl=(n=class extends Nt{constructor(){super(...arguments);N(this,e)}get length(){return this.childNodes.length}text(i){return We(this.childNodes,i)}normalize(){const i=this.getChildNodes(),r=o=>{var a,h;i.splice(o,1),(a=i[o-1])==null||a.setAttribute("nextSibling",i[o]),(h=i[o])==null||h.setAttribute("previousSibling",i[o-1])};for(let o=i.length-1;o>=0;o--){const{type:a,data:h}=i[o];a!=="text"||i.length===1||this.getGaps(o-(o&&1))||h===""&&r(o)}this.setAttribute("childNodes",i)}removeAt(i){return as(this,i,1)[0]}insertAt(i,r=this.length){return as(this,r,0,[i]),i}closest(i){const r=Yt(i,this);let{parentNode:o}=this;for(;o;){if(r(o))return o;({parentNode:o}=o)}}querySelector(i){const r=Yt(i,this);return j(this,e,Ei).call(this,r)}querySelectorAll(i){const r=Yt(i,this);return j(this,e,Pi).call(this,r)}append(...i){this.safeAppend(i)}safeAppend(i){for(const r of i)this.insertAt(r)}replaceChildren(...i){this.safeReplaceChildren(i)}safeReplaceChildren(i){for(let r=this.length-1;r>=0;r--)this.removeAt(r);this.safeAppend(i)}setText(i,r=0){r+=r<0?this.length:0;const o=this.childNodes[r],{data:a}=o;return o.replaceData(i),a}toString(i,r=""){return this.childNodes.map(o=>o.toString(i)).join(r)}caretPositionFromIndex(i){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(i){this.lspError("AstElement.elementFromIndex")}elementFromPoint(i,r){this.lspError("AstElement.elementFromPoint")}lint(i=this.getAbsoluteIndex(),r){const o=[];for(let a=0,h=i+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a];d.setAttribute("aIndex",h);const u=d.lint(h,r);u.length>0&&o.push(...u),h+=d.toString().length+this.getGaps(a)}return o}print(i={}){const r=i.class;return this.toString()?(r===""?"":`<span class="wpb-${r!=null?r:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+it(this.childNodes,i)+(r===""?"":"</span>"):""}json(i,r=this.getAbsoluteIndex()){const o=Se(fe({},this),{type:this.type,range:[r,r+this.toString().length],childNodes:[]});for(let a=0,h=r+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a],{length:u}=d.toString();d.setAttribute("aIndex",h),o.childNodes.push(d.type==="text"?{data:d.data,range:[h,h+u]}:d.json(void 0,h)),h+=u+this.getGaps(a)}return o}},e=new WeakSet,Ei=function(i){var r;for(const o of this.childNodes){if(o.type==="text")continue;if(i(o))return o;const a=j(r=o,e,Ei).call(r,i);if(a)return a}},Pi=function(i){var o;let r=[];for(const a of this.childNodes)a.type!=="text"&&(i(a)&&r.push(a),r=[...r,...j(o=a,e,Pi).call(o,i)]);return r},n)}}),zt,Is,In,Nn,Ln,Fn,Ns,Ls,Ri,ha=T({"lib/text.ts"(){"use strict";var e,ml,s;oe(),M(),B(),fl(),zt=String.raw`[${Ne}\t]*`,Is=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${zt}\d)|isbn(?=[-::]?${zt}(?:\d(?:${zt}|-)){6})`,In=new RegExp(String.raw`${Is}|https?[:/]/+`,"giu"),Nn=new RegExp(Is,"giu"),Ln=new Set(["attr-value","ext-link-text","link-text"]),Fn={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ns=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"]);try{Ls=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(n){Ls=/\w/u}Ri=(s=class extends Nt{constructor(l){super();N(this,e);ke(this,"data","");this.data=l}get type(){return"text"}toString(l){var i;return l&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?ve(this.data):this.data}text(){return this.data}lint(l=this.getAbsoluteIndex(),i){var C,I,U;if(i===!1)return[];const{data:r,parentNode:o,nextSibling:a,previousSibling:h}=this;if(!o)throw new Error("An isolated text node cannot be linted!");const{type:d,name:u,parentNode:g}=o;if(d==="attr-value"){const{name:F,tag:P}=g;if(P==="ref"&&(F==="name"||F==="extends"||F==="follow")||F==="group"&&(P==="ref"||P==="references")||P==="choose"&&(F==="before"||F==="after"))return[]}if(i!=null||(i=d==="free-ext-link"||d==="ext-link-url"||d==="ext-link-text"||d==="image-parameter"&&u==="link"||d==="attr-value"?Nn:In),r.search(i)===-1)return[];i.lastIndex=0;const c=[],p=a==null?void 0:a.type,v=a==null?void 0:a.name,m=h==null?void 0:h.type,x=this.getRootNode(),b=x.toString(),{ext:w,html:y,variants:A}=x.getAttribute("config"),{top:k,left:S}=x.posFromIndex(l),$=new Set(["onlyinclude","noinclude","includeonly",...w,...y[0],...y[1],...y[2],...Ns]);for(let F=i.exec(r);F;F=i.exec(r)){const[,P,X]=F;let{index:W,0:Q}=F;if(X&&X!=="]"){const{length:ce}=X;W+=ce,Q=Q.slice(ce)}Q=Q.toLowerCase();const[z]=Q,ie=z==="r"||z==="p"||z==="i",q=z==="{",D=z==="}",H=z==="[",J=z==="]";let{length:ne}=Q;if(z==="<"&&!$.has(P.toLowerCase())||H&&d==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(W+1))||a!=null&&a.is("ext")&&v==="nowiki"&&((C=a.innerText)!=null&&C.includes("]")))||ie&&(!o.isPlain()||Ln.has(d)))continue;J&&(W||ne>1)&&i.lastIndex--;let K=l+W,re=K+ne,ue,Ae;const Pe=b[re],bs=b[K-1],ws=q||H,ys=q&&bs==="-"&&A.length>0,Ss=D&&Pe==="-"&&A.length>0,cn=H&&p==="free-ext-link"&&!r.slice(W+1).trim()||J&&m==="free-ext-link"&&!r.slice(0,W).includes("]");if(ie)ue="lonely-http",Q=Q.toUpperCase(),Ae=_.lintConfig.getSeverity(ue,Q);else if(z==="<"){ue="tag-like";let ce;/^<\s/u.test(Q)||!/[\s/>]/u.test(Pe!=null?Pe:"")?ce="invalid":Ns.has(P)&&(ce="disallowed"),Ae=_.lintConfig.getSeverity(ue,ce)}else if(ys||Ss)ue="lonely-bracket",Ae=_.lintConfig.getSeverity(ue,"converter"),ys&&W>0?(Q="-{",W--,K--,ne=2):Ss&&W<r.length-1&&(Q="}-",re++,ne=2);else if(cn)ue="lonely-bracket",Ae=_.lintConfig.getSeverity(ue,"extLink");else if(ws||D||J)if(ue="lonely-bracket",ne>1||q&&Pe===z||D&&bs===z)Ae=_.lintConfig.getSeverity(ue,"double");else{if(!H||d!=="ext-link-text"){const ce=Fn[z],As=ws?r.slice(W+1):r.slice(0,W);if(q&&((I=ce.exec(As))==null?void 0:I[0])==="}"||D&&((U=ce.exec(As))==null?void 0:U[0])==="{")continue;if(!As.includes(z)){const xn=ws?"nextSibling":"previousSibling";let Re=this[xn];for(;Re&&(Re.type!=="text"||!ce.test(Re.data));)Re=Re[xn];if(Re&&ce.exec(Re.data)[0]!==z)continue}}Ae=_.lintConfig.getSeverity(ue,"single")}else ue="lonely-http",Ae=_.lintConfig.getSeverity(ue);if(!Ae)continue;const gn=this.posFromIndex(W),{line:pn,character:fn}=ji(k,S,gn.top+1,gn.left),De={rule:ue,message:_.msg('lonely "$1"',ie||z==="h"||ys||Ss?Q:z),severity:Ae,startIndex:K,endIndex:re,startLine:pn,endLine:pn,startCol:fn,endCol:fn+ne};if(z==="<")De.suggestions=[{desc:"escape",range:[K,K+1],text:"<"}];else if(z==="h"&&d!=="link-text"&&Ls.test(bs||""))De.suggestions=[{desc:"whitespace",range:[K,K],text:" "}];else if(H&&d==="ext-link-text"){const ce=o.getAbsoluteIndex()+o.toString().length;De.suggestions=[{desc:"escape",range:[ce,ce+1],text:"]"}]}else if(J&&cn){const ce=l-h.toString().length;De.suggestions=[{desc:"left bracket",range:[ce,ce],text:"["}]}else ie&&(De.suggestions=[...F[0]===Q?[]:[{desc:"uppercase",range:[K,re],text:Q}],...Pe===":"||Pe===":"?[{desc:"whitespace",range:[re,re+1],text:" "}]:[]]);c.push(De)}return c}replaceData(l){j(this,e,ml).call(this,l)}print(){return Et(this.data)}},e=new WeakSet,ml=function(l){this.setAttribute("data",l)},s)}}),Ue,lt=T({"mixin/hidden.ts"(){"use strict";pe(),Ue=(e=!0,t=!0)=>s=>{class n extends s{text(){return""}lint(i){return e?[]:super.lint(i)}}return at(n,s),n}}}),ze,ot=T({"src/syntax.ts"(){"use strict";var e,t;O(),ze=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}lint(n=this.getAbsoluteIndex()){return super.lint(n,!1)}},e=new WeakMap,t)}}),Te,Le=T({"mixin/padded.ts"(){"use strict";pe(),Te=({length:e})=>t=>{class s extends t{getAttribute(l){return l==="padding"?e:super.getAttribute(l)}}return at(s,t),s}}}),ge,Fe=T({"src/atom.ts"(){"use strict";var e,t;O(),ge=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}set type(n){L(this,e,n)}getAttribute(n){var l;return n==="invalid"?this.type==="converter-flag"&&!!((l=this.parentNode)!=null&&l.isInvalidFlag(this)):super.getAttribute(n)}},e=new WeakMap,t)}}),jn,En,Fs,Pn,Ie,us=T({"src/link/base.ts"(){"use strict";var e,t,s,n;M(),Me(),oe(),ae(),Le(),B(),O(),Fe(),jn=l=>l==="redirect-target"||l==="link",En=[Te("[[")],Ie=(n=class extends(Pn=E){constructor(i,r,o,a=[],h="|"){super(void 0,o,a,{});N(this,e,!0);N(this,t);N(this,s);if(this.insertAt(new ge(i,"link-target",o,a,{})),r!==void 0){const d=new E(r,o,a,{});d.type="link-text",d.setAttribute("stage",me-1),this.insertAt(d)}L(this,t,h)}get link(){}get fragment(){return f(this,s).fragment}afterBuild(){L(this,s,this.getTitle()),f(this,t).includes("\0")&&L(this,t,this.buildFromStr(f(this,t),0)),this.setAttribute("name",f(this,s).title),super.afterBuild()}setAttribute(i,r){i==="bracket"?L(this,e,r):i==="title"?L(this,s,r):super.setAttribute(i,r)}toString(i){const r=super.toString(i,f(this,t));return f(this,e)?`[[${r}]]`:r}text(){const i=super.text("|");return f(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?f(this,s):super.getAttribute(i)}getGaps(i){return i===0?f(this,t).length:1}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{childNodes:[a,h],type:d}=this,{encoded:u,fragment:g}=f(this,s),c=new le(this,i);let p="unknown-page",v=_.lintConfig.getSeverity(p);if(v&&a.childNodes.some(({type:m})=>m==="template")&&o.push(R(a,c,p,"template in an internal link target",v)),p="url-encoding",v=_.lintConfig.getSeverity(p),v&&u){const m=R(a,c,p,"unnecessary URL encoding in an internal link",v);m.fix={desc:"decode",range:[m.startIndex,m.endIndex],text:Ft(a.text())},o.push(m)}if(p="pipe-like",v=_.lintConfig.getSeverity(p,"link"),v&&(d==="link"||d==="category")){const m=h==null?void 0:h.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),x=h==null?void 0:h.childNodes[m];if(x){const b=R(h,c,p,'additional "|" in the link text',v),w=b.startIndex+h.getRelativeIndex(m);b.suggestions=[{desc:"escape",range:[w,w+x.data.length],text:x.data.replace(/\|/gu,"|")}],o.push(b)}}if(p="no-ignored",v=_.lintConfig.getSeverity(p,"fragment"),v&&g!==void 0&&!jn(d)){const m=R(a,c,p,"useless fragment",v),x=a.childNodes.findIndex(w=>w.type==="text"&&w.data.includes("#")),b=a.childNodes[x];b&&(m.fix={desc:"remove",range:[m.startIndex+a.getRelativeIndex(x)+b.data.indexOf("#"),m.endIndex],text:""}),o.push(m)}return o}getTitle(i,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(f(this,e)?{pre:"[[",post:"]]",sep:f(this,t)}:{sep:f(this,t)})}json(i,r=this.getAbsoluteIndex()){const o=super.json(void 0,r),{type:a,fragment:h}=this;return h!==void 0&&(a==="link"||a==="redirect-target")&&(o.fragment=h),o}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n),Fs=Z(Pn),Ie=te(Fs,0,"LinkBaseToken",En,Ie),ee(Fs,1,Ie)}}),je,He=T({"src/nowiki/base.ts"(){"use strict";O(),je=class extends E{get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}}}}),Rn,js,On,he,Ee=T({"src/nowiki/noinclude.ts"(){"use strict";lt(),He(),Rn=[Ue()],he=class extends(On=je){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},js=Z(On),he=te(js,0,"NoincludeToken",Rn,he),ee(js,1,he)}}),vl,ua=T({"src/link/redirectTarget.ts"(){"use strict";M(),B(),us(),Ee(),vl=class extends Ie{get type(){return"redirect-target"}constructor(e,t,s,n){super(e,void 0,s,n),t!==void 0&&this.insertAt(new he(t,s,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){const t=super.lint(e,!1),s="no-ignored",n=_.lintConfig.getSeverity(s,"redirect");if(n&&this.length===2){const l=R(this.lastChild,{start:e},s,"useless link text",n);l.startIndex--,l.startCol--,l.fix={desc:"remove",range:[l.startIndex,l.endIndex],text:""},t.push(l)}return t}}}}),Bn,Es,qn,vt,ca=T({"src/redirect.ts"(){"use strict";var e,t,s;lt(),O(),ot(),ua(),Bn=[Ue(!1,!1)],vt=(s=class extends(qn=E){constructor(l,i,r,o,a,h,d=[]){super(void 0,h,d);N(this,e);N(this,t);L(this,e,l),L(this,t,a),this.append(new ze(i,"redirect-syntax",h,d),new vl(r,o==null?void 0:o.slice(1),h,d))}get type(){return"redirect"}getAttribute(l){return l==="padding"?f(this,e).length:super.getAttribute(l)}toString(l){return f(this,e)+super.toString(l)+f(this,t)}lint(l=this.getAbsoluteIndex()){const i=l+f(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",i),this.lastChild.lint(i)}print(){return super.print({pre:f(this,e),post:f(this,t)})}},e=new WeakMap,t=new WeakMap,s),Es=Z(qn),vt=te(Es,0,"RedirectToken",Bn,vt),ee(Es,1,vt)}}),bl={};Y(bl,{parseRedirect:()=>wl});var wl,ga=T({"parser/redirect.ts"(){"use strict";B(),ca(),wl=(e,t,s)=>{var l;(l=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const n=t.regexRedirect.exec(e);return n&&_.normalizeTitle(n[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(n[0].length)}`,new vt(...n.slice(1),t,s),e):!1}}}),Wn,Ps,Mn,bt,pa=T({"src/onlyinclude.ts"(){"use strict";Le(),O(),Wn=[Te("<onlyinclude>")],bt=class extends(Mn=E){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Ps=Z(Mn),bt=te(Ps,0,"OnlyincludeToken",Wn,bt),ee(Ps,1,bt)}}),Ot,cs=T({"mixin/gapped.ts"(){"use strict";pe(),Ot=(e=1)=>t=>{class s extends t{getGaps(){return e}}return at(s,t),s}}}),Un,Rs,zn,Be,Xi=T({"src/tagPair/index.ts"(){"use strict";var e,t;cs(),O(),Un=[Ot()],Be=(t=class extends(zn=E){constructor(n,l,i,r,o,a=[]){super(void 0,o);N(this,e);ke(this,"closed");ke(this,"selfClosing");this.setAttribute("name",n.toLowerCase()),L(this,e,[n,r||n]),this.closed=r!=="",this.selfClosing=r===void 0,this.append(l,i);const h=typeof l=="string"?-1:a.indexOf(l);a.splice(h===-1?1/0:h,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(n){const{selfClosing:l,firstChild:i,lastChild:r}=this,[o,a]=f(this,e);return l?`<${o}${i.toString(n)}/>`:`<${o}${i.toString(n)}>${r.toString(n)}${this.closed?`</${a}>`:""}`}text(){const[n,l]=f(this,e);return this.selfClosing?`<${n}${this.firstChild.text()}/>`:`<${n}${super.text(">")}${this.closed?`</${l}>`:""}`}getAttribute(n){return n==="padding"?f(this,e)[0].length+1:super.getAttribute(n)}print(){const[n,l]=f(this,e);return super.print(this.selfClosing?{pre:`<${n}`,post:"/>"}:{pre:`<${n}`,sep:">",post:this.closed?`</${l}>`:""})}},e=new WeakMap,t),Rs=Z(zn),Be=te(Rs,0,"TagPairToken",Un,Be),ee(Rs,1,Be)}}),yl,fa=T({"src/tagPair/translate.ts"(){"use strict";var e,Sl,s;O(),Xi(),ot(),Ee(),yl=(s=class extends Be{constructor(l,i,r,o=[]){const a=new ze(l,"translate-attr",r,o);i=i==null?void 0:i.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(d,u,g,c)=>(new he(u,r,o),new he(c,r,o),`\0${o.length-1}n${g}\0${o.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(d,u,g,c,p)=>(new he(u,r,o),new he(p,r,o),`\0${o.length-1}n${c}\0${o.length}n`));const h=new E(i,r,o);h.type="translate-inner";super("translate",a,h,"translate",r,o);N(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(l){return l?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${j(this,e,Sl).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,Sl=function(){return this.firstChild.toString()===" nowrap"},s)}}),Hn,Os,Dn,wt,xa=T({"src/tagPair/include.ts"(){"use strict";M(),ae(),lt(),B(),Xi(),Hn=[Ue(!1)],wt=class extends(Dn=Be){get type(){return"include"}constructor(e,t="",s,n,l,i){super(e,t,s!=null?s:"",s===void 0||n!=null?n:"",l,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){const t=[],{firstChild:s,closed:n,name:l}=this,i=new le(this,e),r=["no-ignored","unclosed-comment"],o=r.map(a=>_.lintConfig.getSeverity(a,"include"));if(o[0]&&s.data.trim()){const a=R(s,i,r[0],"useless attribute",o[0]);a.suggestions=[{desc:"remove",range:[a.startIndex,a.endIndex],text:""}],t.push(a)}if(o[1]&&!n){const a=V(this,i,r[1],_.msg("unclosed $1",`<${l}>`),o[1]);a.suggestions=[{desc:"close",range:[a.endIndex,a.endIndex],text:`</${l}>`}],t.push(a)}return t}},Os=Z(Dn),wt=te(Os,0,"IncludeToken",Hn,wt),ee(Os,1,wt)}}),gs,Ki=T({"mixin/attributesParent.ts"(){"use strict";pe(),gs=(e=0)=>t=>{var n,Oi;class s extends t{constructor(){super(...arguments);N(this,n)}hasAttr(o){return j(this,n,Oi).call(this).hasAttr(o)}getAttr(o){return j(this,n,Oi).call(this).getAttr(o)}}return n=new WeakSet,Oi=function(){return this.childNodes[e]},at(s,t),s}}}),se,Bs,qs,gt,Ht,Ws,Oe,Ms,Us,zs,Dt,Hs,we,Al,kl,_l,$l,ma=T({"util/sharable.ts"(){"use strict";se=new Set(["align"]),Bs=new Set(["cite"]),qs=new Set(["cite","datetime"]),gt=new Set(["width"]),Ht=new Set(["axis","align","bgcolor","height","width","valign"]),Ws=new Set([...Ht,"abbr","headers","scope","rowspan","colspan"]),Oe=new Set(["type"]),Ms=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Us=new Set(["clear"]),zs=new Set(["bgcolor","align","valign"]),Dt=new Set(["qid","forcemathmode","type","display"]),Hs=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),we=new Set,Al=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"]),kl={div:se,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,blockquote:Bs,q:Bs,p:se,br:Us,pre:gt,ins:qs,del:qs,ul:Oe,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ms,"border"]),caption:se,tr:zs,td:Ws,th:Ws,font:new Set(["size","color","face"]),hr:gt,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Oe,poem:se,categorytree:se,combooption:se,math:we,chem:we,ce:we,img:new Set(["alt","src","width","height","loading"])},_l={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:we,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:we,inputbox:we,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:we,poll:new Set(["id","show-results-before-voting"]),sm2:Oe,flashmp3:Oe,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([...Dt,"chem"]),chem:Dt,ce:Dt,hiero:we,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Hs,syntaxhighlight:Hs,templatedata:we,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:we},$l={table:Ms,td:new Set([...Ht,"scope"]),th:Ht,br:Us,caption:se,div:se,hr:gt,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,li:Oe,p:se,pre:gt,tr:zs,ul:Oe}}}),Gn,Vn,Qn,Jn,Zt,va=T({"src/attribute.ts"(){"use strict";var e,t,s,n,l,Bi,r;M(),oe(),Me(),ma(),ae(),B(),O(),Fe(),Gn=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Vn=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Qn=new Set(["ext","arg","magic-word","template"]),Jn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Zt=(r=class extends E{constructor(a,h,d,u="",g,c=[],p=_.getConfig(),v=[]){const m=new ge(d,"attr-key",p,v);let x;if(d==="title"||h==="img"&&d==="alt")x=new E(g,p,v,{}),x.type="attr-value",x.setAttribute("stage",me-1);else if(h==="gallery"&&d==="caption"||h==="choose"&&(d==="before"||d==="after")||h==="img"&&d==="src"&&(g!=null&&g.includes("{{"))){const b=Se(fe({},p),{excludes:[...p.excludes,"heading","html","table","hr","list"]});x=new E(g,b,v,{}),x.type="attr-value",x.setAttribute("stage",1)}else x=new ge(g,"attr-value",p,v,{});super(void 0,p,v);N(this,l);N(this,e);N(this,t);N(this,s);N(this,n);L(this,e,a),this.append(m,x),L(this,s,u),L(this,n,[...c]),L(this,t,h),this.setAttribute("name",st(ve(d)))}get type(){return f(this,e)}get tag(){return f(this,t)}get balanced(){return!f(this,s)||f(this,n)[0]===f(this,n)[1]}afterBuild(){f(this,s).includes("\0")&&L(this,s,this.buildFromStr(f(this,s),0)),this.parentNode&&L(this,t,this.parentNode.name),this.setAttribute("name",st(this.firstChild.text())),super.afterBuild()}toString(a){const[h="",d=""]=f(this,n);return f(this,s)?super.toString(a,f(this,s)+h)+d:this.firstChild.toString(a)}text(){return f(this,s)?`${super.text(`${f(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var a,h;return f(this,s)?f(this,s).length+((h=(a=f(this,n)[0])==null?void 0:a.length)!=null?h:0):0}lint(a=this.getAbsoluteIndex(),h){var y;const d=super.lint(a,h),{balanced:u,firstChild:g,lastChild:c,name:p,tag:v}=this,m=new le(this,a),x=["unclosed-quote","obsolete-attr"],b=x.map(A=>_.lintConfig.getSeverity(A,p));if(b[0]&&!u){const A=R(c,m,x[0],_.msg("unclosed $1","quotes"),b[0]);A.startIndex--,A.startCol--,A.suggestions=[{desc:"close",range:[A.endIndex,A.endIndex],text:f(this,n)[0]}],d.push(A)}const w=j(this,l,Bi).call(this,a,m);return w&&d.push(w),b[1]&&((y=$l[v])!=null&&y.has(p))&&d.push(R(g,m,x[1],"obsolete attribute",b[1])),d}getValue(){return f(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}getAttribute(a){return a==="invalid"?j(this,l,Bi).call(this):super.getAttribute(a)}print(){const[a="",h=""]=f(this,n);return f(this,s)?super.print({sep:Et(f(this,s))+a,post:h}):super.print()}json(a,h=this.getAbsoluteIndex()){const d=super.json(void 0,h);return d.tag=this.tag,d}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,l=new WeakSet,Bi=function(a,h){const{firstChild:d,lastChild:u,type:g,name:c,tag:p,parentNode:v}=this,m=!u.childNodes.some(({type:k})=>Qn.has(k)),x=this.getValue(),b=_l[p],w=kl[p],{length:y}=this.toString();let A="illegal-attr";if(!(b!=null&&b.has(c))&&!(w!=null&&w.has(c))&&(g==="ext-attr"?b||w:!/\{\{[^{]+\}\}/u.test(c))&&(g==="ext-attr"&&!w||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(p==="meta"||p==="link"||!Al.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"unknown");if(k){const S=R(d,h,A,"illegal attribute name",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""}],S}}else if(c==="style"&&typeof x=="string"&&Gn.test(x)){if(a===void 0)return!0;A="insecure-style";const k=_.lintConfig.getSeverity(A);return k&&R(u,h,A,"insecure style",k)}else if(c==="tabindex"&&typeof x=="string"&&x!=="0"){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"tabindex");if(k){const S=R(u,h,A,"nonzero tabindex",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""},{desc:"0 tabindex",range:[S.startIndex,S.endIndex],text:"0"}],S}}else if(m&&g!=="ext-attr"){const k=pl(p,c),S=String(x).toLowerCase();if(k.length>0&&k.every($=>$!==S)){if(a===void 0)return!0;const $=_.lintConfig.getSeverity(A,"value");return $&&R(u,h,A,"illegal attribute value",$)}}else if(typeof x=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Jn.has(c))&&Vn.test(x)||m&&(c==="href"||p==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(x))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"value");return k&&R(u,h,A,"illegal attribute value",k)}return!1},r)}}),Ds,Xn,Gs,ps,Yi=T({"src/attributes.ts"(){"use strict";var e,t,es,n;M(),oe(),ae(),B(),O(),Fe(),va(),Ds=l=>l.slice(0,-1),Xn=l=>`${Ds(l)}-dirty`;try{Gs=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(l){Gs=/[^\W_]/u}ps=(n=class extends E{constructor(i,r,o,a,h=[]){super(void 0,a,h,{});N(this,t);N(this,e);if(L(this,e,r),this.setAttribute("name",o),i){const d=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",g=d.exec(i),c=0;const p=()=>{u&&(super.insertAt(new ge(u,Xn(r),a,h,{})),u="")};for(;g;){const{index:v,0:m,1:x,2:b,3:w,4:y,5:A,6:k}=g;if(u+=i.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ve(x).trim())){const S=y!=null?y:k,$=[w,A],C=new Zt(Ds(r),o,x,b,S,$,a,h);p(),super.insertAt(C)}else u+=m;({lastIndex:c}=d),g=d.exec(i)}u+=i.slice(c),p()}}get type(){return f(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(r=>r instanceof Zt&&(!i||r.name===st(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){const r=this.getAttrTokens(i);return r[r.length-1]}getAttr(i){var r;return(r=this.getAttrToken(i))==null?void 0:r.getValue()}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{parentNode:a,childNodes:h}=this,d=new Map,u=new Set,g=new le(this,i),c=["no-ignored","no-duplicate"],p=["closingTag","invalidAttributes","nonWordAttributes"].map(m=>_.lintConfig.getSeverity(c[0],m));if(p[0]&&j(this,t,es).call(this)){const m=V(this,g,c[0],"attributes of a closing tag",p[0]),x=a.getAbsoluteIndex();m.suggestions=[{desc:"remove",range:[i,m.endIndex],text:""},{desc:"open",range:[x+1,x+2],text:""}],o.push(m)}for(const m of h)if(m instanceof Zt){const{name:x}=m;d.has(x)?(u.add(x),d.get(x).push(m)):d.set(x,[m])}else{const x=m.text().trim(),b=p[Gs.test(x)?1:2];if(x&&b){const w=R(m,g,c[0],"containing invalid attribute",b);w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:" "}],o.push(w)}}const v=_.lintConfig.getSeverity(c[1],"attribute");if(v&&u.size>0)for(const m of u){const x=d.get(m).map(b=>{const w=b.getValue();return[b,w===!0?"":w]});o.push(...x.map(([b,w],y)=>{const A=R(b,g,c[1],_.msg("duplicated $1 attribute",m),v),k={desc:"remove",range:[A.startIndex,A.endIndex],text:""};return!w||x.slice(0,y).some(([,S])=>S===w)?A.fix=k:A.suggestions=[k],A}))}return o}getAttribute(i){return i==="invalid"?j(this,t,es).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${j(this,t,es).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof ge?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,es=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},n)}}),Tl={};Y(Tl,{PreToken:()=>Cl});var Cl,ba=T({"src/pre.ts"(){"use strict";Me(),O(),Ee(),Cl=class extends E{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const n=/<nowiki>/giu,l=/<\/nowiki>/giu,{length:i}=n.source;let r=n.exec(e);r&&(l.lastIndex=r.index+i);let o=l.exec(e),a=0,h="";for(;r&&o;)new he(r[0],t,s),new he(o[0],t,s),h+=`${e.slice(a,r.index)}\0${s.length-1}n${e.slice(r.index+i,o.index)}\0${s.length}n`,a=o.index+i+1,n.lastIndex=a,r=n.exec(e),r&&(l.lastIndex=r.index+i),o=l.exec(e);e=h+e.slice(a)}super(e,t,s,{}),this.setAttribute("stage",me-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),fs,Zi=T({"mixin/multiLine.ts"(){"use strict";pe(),fs=e=>{class t extends e{toString(n){return super.toString(n,`
|
|
1
|
+
"use strict";(()=>{var Vo=Object.defineProperty,Qo=Object.defineProperties;var Jo=Object.getOwnPropertyDescriptors;var mn=Object.getOwnPropertySymbols;var Xo=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable;var vn=e=>{throw TypeError(e)};var ks=(e,t,s)=>t in e?Vo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,fe=(e,t)=>{for(var s in t||(t={}))Xo.call(t,s)&&ks(e,s,t[s]);if(mn)for(var s of mn(t))Ko.call(t,s)&&ks(e,s,t[s]);return e},Se=(e,t)=>Qo(e,Jo(t));var Yo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ke=(e,t,s)=>ks(e,typeof t!="symbol"?t+"":t,s),_s=(e,t,s)=>t.has(e)||vn("Cannot "+s);var f=(e,t,s)=>(_s(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?vn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),L=(e,t,s,n)=>(_s(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),j=(e,t,s)=>(_s(e,t,"access private method"),s);var bn=(e,t,s,n)=>({set _(l){L(e,t,l,s)},get _(){return f(e,t,n)}});var Za=Yo((td,Go)=>{var Zo=Object.create,nt=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,Gi=Object.getOwnPropertyNames,ea=Object.prototype.hasOwnProperty,ll=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),rt=e=>{throw TypeError(e)},ol=(e,t,s)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,wn=(e,t)=>nt(e,"name",{value:t,configurable:!0}),T=(e,t)=>function(){return e&&(t=(0,e[Gi(e)[0]])(e=0)),t},ta=(e,t)=>function(){return t||(0,e[Gi(e)[0]])((t={exports:{}}).exports,t),t.exports},Y=(e,t)=>{for(var s in t)nt(e,s,{get:t[s],enumerable:!0})},sa=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Gi(t))!ea.call(e,l)&&l!==s&&nt(e,l,{get:()=>t[l],enumerable:!(n=rl(t,l))||n.enumerable});return e},G=e=>sa(nt({},"__esModule",{value:!0}),e),Z=e=>{var t;return[,,,Zo((t=e==null?void 0:e[ll("metadata")])!=null?t:null)]},al=["class","method","getter","setter","accessor","field","value","get","set"],mt=e=>e!==void 0&&typeof e!="function"?rt("Function expected"):e,ia=(e,t,s,n,l)=>({kind:al[e],name:t,metadata:n,addInitializer:i=>s._?rt("Already initialized"):l.push(mt(i||null))}),ds=(e,t)=>ol(t,ll("metadata"),e[3]),ee=(e,t,s,n)=>{for(var l=0,i=e[t>>1],r=i&&i.length;l<r;l++)t&1?i[l].call(s):n=i[l].call(s,n);return n},te=(e,t,s,n,l,i)=>{var r,o,a,h,d,u=t&7,g=!!(t&8),c=!!(t&16),p=u>3?e.length+1:u?g?1:2:0,v=al[u+5],m=u>3&&(e[p-1]=[]),x=e[p]||(e[p]=[]),b=u&&(!c&&!g&&(l=l.prototype),u<5&&(u>3||!c)&&rl(u<4?l:{get[s](){return de(this,i)},set[s](y){return xe(this,i,y)}},s));u?c&&u<4&&wn(i,(u>2?"set ":u>1?"get ":"")+s):wn(l,s);for(var w=n.length-1;w>=0;w--)h=ia(u,s,a={},e[3],x),u&&(h.static=g,h.private=c,d=h.access={has:c?y=>ra(l,y):y=>s in y},u^3&&(d.get=c?y=>(u^1?de:Lt)(y,l,u^4?i:b.get):y=>y[s]),u>2&&(d.set=c?(y,A)=>xe(y,l,A,u^4?i:b.set):(y,A)=>y[s]=A)),o=(0,n[w])(u?u<4?c?i:b[v]:u>4?void 0:{get:b.get,set:b.set}:l,h),a._=1,u^4||o===void 0?mt(o)&&(u>4?m.unshift(o):u?c?i=o:b[v]=o:l=o):typeof o!="object"||o===null?rt("Object expected"):(mt(r=o.get)&&(b.get=r),mt(r=o.set)&&(b.set=r),mt(r=o.init)&&m.unshift(r));return u||ds(e,l),b&&nt(l,s,b),c?u^4?i:b:l},na=(e,t,s)=>ol(e,typeof t!="symbol"?t+"":t,s),Vi=(e,t,s)=>t.has(e)||rt("Cannot "+s),ra=(e,t)=>Object(t)!==t?rt('Cannot use the "in" operator on this value'):e.has(t),de=(e,t,s)=>(Vi(e,t,"read from private field"),s?s.call(e):t.get(e)),_e=(e,t,s)=>t.has(e)?rt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),xe=(e,t,s,n)=>(Vi(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),Lt=(e,t,s)=>(Vi(e,t,"access private method"),s),la=(e,t,s,n)=>({set _(l){xe(e,t,l,s)},get _(){return de(e,t,n)}}),dl,Qi,hl=T({"base.ts"(){"use strict";dl=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),Qi=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function Ze(e){const t=new Map,s=new WeakMap;return n=>{const l=typeof n=="string"?t:s;if(l.has(n)){const r=l.get(n);return r.lastIndex=0,r}const i=e(n);return l.set(n,i),i}}var Ft,ul,Rt=T({"../common/dist/index.mjs"(){"use strict";Ft=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),ul=Ze}}),Ne,$s,et,tt,st,$e,Ge,cl,ve,We,yn,Sn,jt,gl,An,kn,Et,it,oe=T({"util/string.ts"(){"use strict";Rt(),Ne=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,$s=String.raw`[^[\]<>"\0-\x1F\x7F${Ne}\uFFFD]`,et=String.raw`(?:\[[\da-f:.]+\]|${$s})`,tt=String.raw`(?:${$s}|\0\d+[cn!~]\x7F)*`,st=e=>e.trim().toLowerCase(),$e=(e,t)=>e.replace(/\0(\d+)\x7F/gu,(s,n)=>t[n]),Ge=(e,t)=>s=>s.replace(e,t),cl=Ge(/[\0\x7F]|\r$/gmu,""),ve=Ge(/\0\d+[cn]\x7F/gu,""),We=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),yn={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Sn=Ge(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):yn[s.toLowerCase()]),jt=e=>Sn(e),gl=Ge(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),An={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},kn=e=>Ge(e,t=>`&${An[t]};`),Et=kn(/[&<>]/gu),it=(e,t={})=>{const{pre:s="",post:n="",sep:l=""}=t;return s+e.map(i=>i.print()).join(l)+n}}}),oa=ta({"config/minimum.json"(e,t){t.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","#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:[]}}}),me,Li,Me=T({"util/constants.ts"(){"use strict";me=11,Li=oa()}}),le,ae=T({"lib/rect.ts"(){"use strict";var e,t,s,n,Fi,i;le=(i=class{constructor(r,o){N(this,n);N(this,e);N(this,t);N(this,s);L(this,e,r),L(this,t,o)}get start(){return f(this,t)}get top(){return j(this,n,Fi).call(this).top}get left(){return j(this,n,Fi).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakSet,Fi=function(){var r;return(r=f(this,s))!=null||L(this,s,f(this,e).getRootNode().posFromIndex(f(this,t))),f(this,s)},i)}}),_n,$n,It,ji,Ts,R,V,qe,pl,M=T({"util/lint.ts"(){"use strict";pe(),ae(),B(),_n=new Set(["tr","td","th","caption"]),$n=new Set(["Template:!!","Template:!-"]),It=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&$n.has(t.name)||t.is("html")&&_n.has(t.name))return!1;if(t.is("arg"))return t.length>1&&It(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(It);return s.includes(2)?2:s.includes(1)&&1}catch(s){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},ji=(e,t,s,n)=>({line:e+s-1,character:(s===1?t:0)+n}),Ts=e=>(t,s,n,l,i="error")=>{const{start:r}=s,{top:o,left:a}=s instanceof le?s:new le(t,r),{offsetHeight:h,offsetWidth:d}=t,{startIndex:u,startLine:g,startCol:c}=e(t,r,o,a),{line:p,character:v}=ji(g,c,h,d);return{rule:n,message:_.msg(l),severity:i,startIndex:u,endIndex:u+t.toString().length,startLine:g,endLine:p,startCol:c,endCol:v}},R=Ts((e,t,s,n)=>{const l=e.getRelativeIndex(),{top:i,left:r}=e.parentNode.posFromIndex(l);return{startIndex:t+l,startLine:s+i,startCol:i?r:n+r}}),V=Ts((e,t,s,n)=>({startIndex:t,startLine:s,startCol:n})),qe=(e,t,s,n)=>{if(e&&(n||_.viewOnly&&e[0]===be.rev))return e[1];const l=t();return(n||_.viewOnly)&&s([be.rev,l]),l},pl=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),Tn,Yt,aa=T({"parser/selector.ts"(){"use strict";Tn=(e,t,s)=>{if(e.includes("#")){const n=e.indexOf("#");return(n===0||e.slice(0,n)===t)&&e.slice(n+1)===s}return!e||e===t},Yt=(e,t,s)=>{const n=e.split(",");return({type:l,name:i})=>n.some(r=>Tn(r.trim(),l,i))}}}),hs,Ji=T({"mixin/cached.ts"(){"use strict";M(),hs=(e=!0)=>t=>{const s=new WeakMap;return function(...n){return qe(s.get(this),()=>t.apply(this,n),l=>{s.set(this,l)},e)}}}}),Cn,qt,dt,ht,Wt,ut,ct,Mt,Cs,Ut,Nt,fl=T({"lib/node.ts"(){"use strict";M(),pe(),Ji(),B(),Cn=[hs(!1)],Nt=class{constructor(){ee(Ut,5,this),_e(this,Mt),na(this,"childNodes",[]),_e(this,qt),_e(this,dt),_e(this,ht),_e(this,Wt),_e(this,ut),_e(this,ct,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return de(this,qt)}get nextSibling(){return de(this,dt)}get previousSibling(){return de(this,ht)}get offsetHeight(){return Lt(this,Mt,Cs).call(this).height}get offsetWidth(){return Lt(this,Mt,Cs).call(this).width}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":xe(this,qt,t),t||(xe(this,dt,void 0),xe(this,ht,void 0));break;case"nextSibling":xe(this,dt,t);break;case"previousSibling":xe(this,ht,t);break;case"aIndex":_.viewOnly&&xe(this,ut,[be.rev,t]);break;default:this[e]=t}}getRootNode(){return qe(de(this,Wt),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&xe(this,Wt,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),n=s.findIndex(([,,l])=>e<=l);return{top:n,left:e-s[n][1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return qe(de(this,ct)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let n=this.getAttribute("padding");for(let l=0;l<s;l++)_.viewOnly&&(de(this,ct)[l]=[be.rev,n]),n+=t[l].toString().length+this.getGaps(l);return n},t=>{de(this,ct)[e]=t})}getAbsoluteIndex(){return qe(de(this,ut),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{xe(this,ut,e)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){const e=[];let t=0;for(const s of String(this).split(`
|
|
2
|
+
`)){const n=t+s.length;e.push([s,t,n]),t=n+1}return e}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},Ut=Z(null),qt=new WeakMap,dt=new WeakMap,ht=new WeakMap,Wt=new WeakMap,ut=new WeakMap,ct=new WeakMap,Mt=new WeakSet,Cs=function(){const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}},te(Ut,1,"getLines",Cn,Nt),ds(Ut,Nt)}}),xl,da=T({"lib/element.ts"(){"use strict";var e,Ei,Pi,n;oe(),pe(),aa(),fl(),xl=(n=class extends Nt{constructor(){super(...arguments);N(this,e)}get length(){return this.childNodes.length}text(i){return We(this.childNodes,i)}normalize(){const i=this.getChildNodes(),r=o=>{var a,h;i.splice(o,1),(a=i[o-1])==null||a.setAttribute("nextSibling",i[o]),(h=i[o])==null||h.setAttribute("previousSibling",i[o-1])};for(let o=i.length-1;o>=0;o--){const{type:a,data:h}=i[o];a!=="text"||i.length===1||this.getGaps(o-(o&&1))||h===""&&r(o)}this.setAttribute("childNodes",i)}removeAt(i){return as(this,i,1)[0]}insertAt(i,r=this.length){return as(this,r,0,[i]),i}closest(i){const r=Yt(i,this);let{parentNode:o}=this;for(;o;){if(r(o))return o;({parentNode:o}=o)}}querySelector(i){const r=Yt(i,this);return j(this,e,Ei).call(this,r)}querySelectorAll(i){const r=Yt(i,this);return j(this,e,Pi).call(this,r)}append(...i){this.safeAppend(i)}safeAppend(i){for(const r of i)this.insertAt(r)}replaceChildren(...i){this.safeReplaceChildren(i)}safeReplaceChildren(i){for(let r=this.length-1;r>=0;r--)this.removeAt(r);this.safeAppend(i)}setText(i,r=0){r+=r<0?this.length:0;const o=this.childNodes[r],{data:a}=o;return o.replaceData(i),a}toString(i,r=""){return this.childNodes.map(o=>o.toString(i)).join(r)}caretPositionFromIndex(i){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(i){this.lspError("AstElement.elementFromIndex")}elementFromPoint(i,r){this.lspError("AstElement.elementFromPoint")}lint(i=this.getAbsoluteIndex(),r){const o=[];for(let a=0,h=i+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a];d.setAttribute("aIndex",h);const u=d.lint(h,r);u.length>0&&o.push(...u),h+=d.toString().length+this.getGaps(a)}return o}print(i={}){const r=i.class;return this.toString()?(r===""?"":`<span class="wpb-${r!=null?r:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+it(this.childNodes,i)+(r===""?"":"</span>"):""}json(i,r=this.getAbsoluteIndex()){const o=Se(fe({},this),{type:this.type,range:[r,r+this.toString().length],childNodes:[]});for(let a=0,h=r+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a],{length:u}=d.toString();d.setAttribute("aIndex",h),o.childNodes.push(d.type==="text"?{data:d.data,range:[h,h+u]}:d.json(void 0,h)),h+=u+this.getGaps(a)}return o}},e=new WeakSet,Ei=function(i){var r;for(const o of this.childNodes){if(o.type==="text")continue;if(i(o))return o;const a=j(r=o,e,Ei).call(r,i);if(a)return a}},Pi=function(i,r=[]){var o;for(const a of this.childNodes)a.type!=="text"&&(i(a)&&r.push(a),j(o=a,e,Pi).call(o,i,r));return r},n)}}),zt,Is,In,Nn,Ln,Fn,Ns,Ls,Ri,ha=T({"lib/text.ts"(){"use strict";var e,ml,s;oe(),M(),B(),fl(),zt=String.raw`[${Ne}\t]*`,Is=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${zt}\d)|isbn(?=[-::]?${zt}(?:\d(?:${zt}|-)){6})`,In=new RegExp(String.raw`${Is}|https?[:/]/+`,"giu"),Nn=new RegExp(Is,"giu"),Ln=new Set(["attr-value","ext-link-text","link-text"]),Fn={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ns=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"]);try{Ls=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(n){Ls=/\w/u}Ri=(s=class extends Nt{constructor(l){super();N(this,e);ke(this,"data","");this.data=l}get type(){return"text"}toString(l){var i;return l&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?ve(this.data):this.data}text(){return this.data}lint(l=this.getAbsoluteIndex(),i){var C,I,U;if(i===!1)return[];const{data:r,parentNode:o,nextSibling:a,previousSibling:h}=this;if(!o)throw new Error("An isolated text node cannot be linted!");const{type:d,name:u,parentNode:g}=o;if(d==="attr-value"){const{name:F,tag:P}=g;if(P==="ref"&&(F==="name"||F==="extends"||F==="follow")||F==="group"&&(P==="ref"||P==="references")||P==="choose"&&(F==="before"||F==="after"))return[]}if(i!=null||(i=d==="free-ext-link"||d==="ext-link-url"||d==="ext-link-text"||d==="image-parameter"&&u==="link"||d==="attr-value"?Nn:In),r.search(i)===-1)return[];i.lastIndex=0;const c=[],p=a==null?void 0:a.type,v=a==null?void 0:a.name,m=h==null?void 0:h.type,x=this.getRootNode(),b=x.toString(),{ext:w,html:y,variants:A}=x.getAttribute("config"),{top:k,left:S}=x.posFromIndex(l),$=new Set(["onlyinclude","noinclude","includeonly",...w,...y[0],...y[1],...y[2],...Ns]);for(let F=i.exec(r);F;F=i.exec(r)){const[,P,X]=F;let{index:W,0:Q}=F;if(X&&X!=="]"){const{length:ce}=X;W+=ce,Q=Q.slice(ce)}Q=Q.toLowerCase();const[z]=Q,ie=z==="r"||z==="p"||z==="i",q=z==="{",D=z==="}",H=z==="[",J=z==="]";let{length:ne}=Q;if(z==="<"&&!$.has(P.toLowerCase())||H&&d==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(W+1))||a!=null&&a.is("ext")&&v==="nowiki"&&((C=a.innerText)!=null&&C.includes("]")))||ie&&(!o.isPlain()||Ln.has(d)))continue;J&&(W||ne>1)&&i.lastIndex--;let K=l+W,re=K+ne,ue,Ae;const Pe=b[re],bs=b[K-1],ws=q||H,ys=q&&bs==="-"&&A.length>0,Ss=D&&Pe==="-"&&A.length>0,cn=H&&p==="free-ext-link"&&!r.slice(W+1).trim()||J&&m==="free-ext-link"&&!r.slice(0,W).includes("]");if(ie)ue="lonely-http",Q=Q.toUpperCase(),Ae=_.lintConfig.getSeverity(ue,Q);else if(z==="<"){ue="tag-like";let ce;/^<\s/u.test(Q)||!/[\s/>]/u.test(Pe!=null?Pe:"")?ce="invalid":Ns.has(P)&&(ce="disallowed"),Ae=_.lintConfig.getSeverity(ue,ce)}else if(ys||Ss)ue="lonely-bracket",Ae=_.lintConfig.getSeverity(ue,"converter"),ys&&W>0?(Q="-{",W--,K--,ne=2):Ss&&W<r.length-1&&(Q="}-",re++,ne=2);else if(cn)ue="lonely-bracket",Ae=_.lintConfig.getSeverity(ue,"extLink");else if(ws||D||J)if(ue="lonely-bracket",ne>1||q&&Pe===z||D&&bs===z)Ae=_.lintConfig.getSeverity(ue,"double");else{if(!H||d!=="ext-link-text"){const ce=Fn[z],As=ws?r.slice(W+1):r.slice(0,W);if(q&&((I=ce.exec(As))==null?void 0:I[0])==="}"||D&&((U=ce.exec(As))==null?void 0:U[0])==="{")continue;if(!As.includes(z)){const xn=ws?"nextSibling":"previousSibling";let Re=this[xn];for(;Re&&(Re.type!=="text"||!ce.test(Re.data));)Re=Re[xn];if(Re&&ce.exec(Re.data)[0]!==z)continue}}Ae=_.lintConfig.getSeverity(ue,"single")}else ue="lonely-http",Ae=_.lintConfig.getSeverity(ue);if(!Ae)continue;const gn=this.posFromIndex(W),{line:pn,character:fn}=ji(k,S,gn.top+1,gn.left),De={rule:ue,message:_.msg('lonely "$1"',ie||z==="h"||ys||Ss?Q:z),severity:Ae,startIndex:K,endIndex:re,startLine:pn,endLine:pn,startCol:fn,endCol:fn+ne};if(z==="<")De.suggestions=[{desc:"escape",range:[K,K+1],text:"<"}];else if(z==="h"&&d!=="link-text"&&Ls.test(bs||""))De.suggestions=[{desc:"whitespace",range:[K,K],text:" "}];else if(H&&d==="ext-link-text"){const ce=o.getAbsoluteIndex()+o.toString().length;De.suggestions=[{desc:"escape",range:[ce,ce+1],text:"]"}]}else if(J&&cn){const ce=l-h.toString().length;De.suggestions=[{desc:"left bracket",range:[ce,ce],text:"["}]}else ie&&(De.suggestions=[...F[0]===Q?[]:[{desc:"uppercase",range:[K,re],text:Q}],...Pe===":"||Pe===":"?[{desc:"whitespace",range:[re,re+1],text:" "}]:[]]);c.push(De)}return c}replaceData(l){j(this,e,ml).call(this,l)}print(){return Et(this.data)}},e=new WeakSet,ml=function(l){this.setAttribute("data",l)},s)}}),Ue,lt=T({"mixin/hidden.ts"(){"use strict";pe(),Ue=(e=!0,t=!0)=>s=>{class n extends s{text(){return""}lint(i){return e?[]:super.lint(i)}}return at(n,s),n}}}),ze,ot=T({"src/syntax.ts"(){"use strict";var e,t;O(),ze=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}lint(n=this.getAbsoluteIndex()){return super.lint(n,!1)}},e=new WeakMap,t)}}),Te,Le=T({"mixin/padded.ts"(){"use strict";pe(),Te=({length:e})=>t=>{class s extends t{getAttribute(l){return l==="padding"?e:super.getAttribute(l)}}return at(s,t),s}}}),ge,Fe=T({"src/atom.ts"(){"use strict";var e,t;O(),ge=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}set type(n){L(this,e,n)}getAttribute(n){var l;return n==="invalid"?this.type==="converter-flag"&&!!((l=this.parentNode)!=null&&l.isInvalidFlag(this)):super.getAttribute(n)}},e=new WeakMap,t)}}),jn,En,Fs,Pn,Ie,us=T({"src/link/base.ts"(){"use strict";var e,t,s,n;M(),Me(),oe(),ae(),Le(),B(),O(),Fe(),jn=l=>l==="redirect-target"||l==="link",En=[Te("[[")],Ie=(n=class extends(Pn=E){constructor(i,r,o,a=[],h="|"){super(void 0,o,a,{});N(this,e,!0);N(this,t);N(this,s);if(this.insertAt(new ge(i,"link-target",o,a,{})),r!==void 0){const d=new E(r,o,a,{});d.type="link-text",d.setAttribute("stage",me-1),this.insertAt(d)}L(this,t,h)}get link(){}get fragment(){return f(this,s).fragment}afterBuild(){L(this,s,this.getTitle()),f(this,t).includes("\0")&&L(this,t,this.buildFromStr(f(this,t),0)),this.setAttribute("name",f(this,s).title),super.afterBuild()}setAttribute(i,r){i==="bracket"?L(this,e,r):i==="title"?L(this,s,r):super.setAttribute(i,r)}toString(i){const r=super.toString(i,f(this,t));return f(this,e)?`[[${r}]]`:r}text(){const i=super.text("|");return f(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?f(this,s):super.getAttribute(i)}getGaps(i){return i===0?f(this,t).length:1}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{childNodes:[a,h],type:d}=this,{encoded:u,fragment:g}=f(this,s),c=new le(this,i);let p="unknown-page",v=_.lintConfig.getSeverity(p);if(v&&a.childNodes.some(({type:m})=>m==="template")&&o.push(R(a,c,p,"template in an internal link target",v)),p="url-encoding",v=_.lintConfig.getSeverity(p),v&&u){const m=R(a,c,p,"unnecessary URL encoding in an internal link",v);m.fix={desc:"decode",range:[m.startIndex,m.endIndex],text:Ft(a.text())},o.push(m)}if(p="pipe-like",v=_.lintConfig.getSeverity(p,"link"),v&&(d==="link"||d==="category")){const m=h==null?void 0:h.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),x=h==null?void 0:h.childNodes[m];if(x){const b=R(h,c,p,'additional "|" in the link text',v),w=b.startIndex+h.getRelativeIndex(m);b.suggestions=[{desc:"escape",range:[w,w+x.data.length],text:x.data.replace(/\|/gu,"|")}],o.push(b)}}if(p="no-ignored",v=_.lintConfig.getSeverity(p,"fragment"),v&&g!==void 0&&!jn(d)){const m=R(a,c,p,"useless fragment",v),x=a.childNodes.findIndex(w=>w.type==="text"&&w.data.includes("#")),b=a.childNodes[x];b&&(m.fix={desc:"remove",range:[m.startIndex+a.getRelativeIndex(x)+b.data.indexOf("#"),m.endIndex],text:""}),o.push(m)}return o}getTitle(i,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(f(this,e)?{pre:"[[",post:"]]",sep:f(this,t)}:{sep:f(this,t)})}json(i,r=this.getAbsoluteIndex()){const o=super.json(void 0,r),{type:a,fragment:h}=this;return h!==void 0&&(a==="link"||a==="redirect-target")&&(o.fragment=h),o}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n),Fs=Z(Pn),Ie=te(Fs,0,"LinkBaseToken",En,Ie),ee(Fs,1,Ie)}}),je,He=T({"src/nowiki/base.ts"(){"use strict";O(),je=class extends E{get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}}}}),Rn,js,On,he,Ee=T({"src/nowiki/noinclude.ts"(){"use strict";lt(),He(),Rn=[Ue()],he=class extends(On=je){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},js=Z(On),he=te(js,0,"NoincludeToken",Rn,he),ee(js,1,he)}}),vl,ua=T({"src/link/redirectTarget.ts"(){"use strict";M(),B(),us(),Ee(),vl=class extends Ie{get type(){return"redirect-target"}constructor(e,t,s,n){super(e,void 0,s,n),t!==void 0&&this.insertAt(new he(t,s,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){const t=super.lint(e,!1),s="no-ignored",n=_.lintConfig.getSeverity(s,"redirect");if(n&&this.length===2){const l=R(this.lastChild,{start:e},s,"useless link text",n);l.startIndex--,l.startCol--,l.fix={desc:"remove",range:[l.startIndex,l.endIndex],text:""},t.push(l)}return t}}}}),Bn,Es,qn,vt,ca=T({"src/redirect.ts"(){"use strict";var e,t,s;lt(),O(),ot(),ua(),Bn=[Ue(!1,!1)],vt=(s=class extends(qn=E){constructor(l,i,r,o,a,h,d=[]){super(void 0,h,d);N(this,e);N(this,t);L(this,e,l),L(this,t,a),this.append(new ze(i,"redirect-syntax",h,d),new vl(r,o==null?void 0:o.slice(1),h,d))}get type(){return"redirect"}getAttribute(l){return l==="padding"?f(this,e).length:super.getAttribute(l)}toString(l){return f(this,e)+super.toString(l)+f(this,t)}lint(l=this.getAbsoluteIndex()){const i=l+f(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",i),this.lastChild.lint(i)}print(){return super.print({pre:f(this,e),post:f(this,t)})}},e=new WeakMap,t=new WeakMap,s),Es=Z(qn),vt=te(Es,0,"RedirectToken",Bn,vt),ee(Es,1,vt)}}),bl={};Y(bl,{parseRedirect:()=>wl});var wl,ga=T({"parser/redirect.ts"(){"use strict";B(),ca(),wl=(e,t,s)=>{var l;(l=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const n=t.regexRedirect.exec(e);return n&&_.normalizeTitle(n[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(n[0].length)}`,new vt(...n.slice(1),t,s),e):!1}}}),Wn,Ps,Mn,bt,pa=T({"src/onlyinclude.ts"(){"use strict";Le(),O(),Wn=[Te("<onlyinclude>")],bt=class extends(Mn=E){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Ps=Z(Mn),bt=te(Ps,0,"OnlyincludeToken",Wn,bt),ee(Ps,1,bt)}}),Ot,cs=T({"mixin/gapped.ts"(){"use strict";pe(),Ot=(e=1)=>t=>{class s extends t{getGaps(){return e}}return at(s,t),s}}}),Un,Rs,zn,Be,Xi=T({"src/tagPair/index.ts"(){"use strict";var e,t;cs(),O(),Un=[Ot()],Be=(t=class extends(zn=E){constructor(n,l,i,r,o,a=[]){super(void 0,o);N(this,e);ke(this,"closed");ke(this,"selfClosing");this.setAttribute("name",n.toLowerCase()),L(this,e,[n,r||n]),this.closed=r!=="",this.selfClosing=r===void 0,this.append(l,i);const h=typeof l=="string"?-1:a.indexOf(l);a.splice(h===-1?1/0:h,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(n){const{selfClosing:l,firstChild:i,lastChild:r}=this,[o,a]=f(this,e);return l?`<${o}${i.toString(n)}/>`:`<${o}${i.toString(n)}>${r.toString(n)}${this.closed?`</${a}>`:""}`}text(){const[n,l]=f(this,e);return this.selfClosing?`<${n}${this.firstChild.text()}/>`:`<${n}${super.text(">")}${this.closed?`</${l}>`:""}`}getAttribute(n){return n==="padding"?f(this,e)[0].length+1:super.getAttribute(n)}print(){const[n,l]=f(this,e);return super.print(this.selfClosing?{pre:`<${n}`,post:"/>"}:{pre:`<${n}`,sep:">",post:this.closed?`</${l}>`:""})}},e=new WeakMap,t),Rs=Z(zn),Be=te(Rs,0,"TagPairToken",Un,Be),ee(Rs,1,Be)}}),yl,fa=T({"src/tagPair/translate.ts"(){"use strict";var e,Sl,s;O(),Xi(),ot(),Ee(),yl=(s=class extends Be{constructor(l,i,r,o=[]){const a=new ze(l,"translate-attr",r,o);i=i==null?void 0:i.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(d,u,g,c)=>(new he(u,r,o),new he(c,r,o),`\0${o.length-1}n${g}\0${o.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(d,u,g,c,p)=>(new he(u,r,o),new he(p,r,o),`\0${o.length-1}n${c}\0${o.length}n`));const h=new E(i,r,o);h.type="translate-inner";super("translate",a,h,"translate",r,o);N(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(l){return l?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${j(this,e,Sl).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,Sl=function(){return this.firstChild.toString()===" nowrap"},s)}}),Hn,Os,Dn,wt,xa=T({"src/tagPair/include.ts"(){"use strict";M(),ae(),lt(),B(),Xi(),Hn=[Ue(!1)],wt=class extends(Dn=Be){get type(){return"include"}constructor(e,t="",s,n,l,i){super(e,t,s!=null?s:"",s===void 0||n!=null?n:"",l,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){const t=[],{firstChild:s,closed:n,name:l}=this,i=new le(this,e),r=["no-ignored","unclosed-comment"],o=r.map(a=>_.lintConfig.getSeverity(a,"include"));if(o[0]&&s.data.trim()){const a=R(s,i,r[0],"useless attribute",o[0]);a.suggestions=[{desc:"remove",range:[a.startIndex,a.endIndex],text:""}],t.push(a)}if(o[1]&&!n){const a=V(this,i,r[1],_.msg("unclosed $1",`<${l}>`),o[1]);a.suggestions=[{desc:"close",range:[a.endIndex,a.endIndex],text:`</${l}>`}],t.push(a)}return t}},Os=Z(Dn),wt=te(Os,0,"IncludeToken",Hn,wt),ee(Os,1,wt)}}),gs,Ki=T({"mixin/attributesParent.ts"(){"use strict";pe(),gs=(e=0)=>t=>{var n,Oi;class s extends t{constructor(){super(...arguments);N(this,n)}hasAttr(o){return j(this,n,Oi).call(this).hasAttr(o)}getAttr(o){return j(this,n,Oi).call(this).getAttr(o)}}return n=new WeakSet,Oi=function(){return this.childNodes[e]},at(s,t),s}}}),se,Bs,qs,gt,Ht,Ws,Oe,Ms,Us,zs,Dt,Hs,we,Al,kl,_l,$l,ma=T({"util/sharable.ts"(){"use strict";se=new Set(["align"]),Bs=new Set(["cite"]),qs=new Set(["cite","datetime"]),gt=new Set(["width"]),Ht=new Set(["axis","align","bgcolor","height","width","valign"]),Ws=new Set([...Ht,"abbr","headers","scope","rowspan","colspan"]),Oe=new Set(["type"]),Ms=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Us=new Set(["clear"]),zs=new Set(["bgcolor","align","valign"]),Dt=new Set(["qid","forcemathmode","type","display"]),Hs=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),we=new Set,Al=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"]),kl={div:se,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,blockquote:Bs,q:Bs,p:se,br:Us,pre:gt,ins:qs,del:qs,ul:Oe,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ms,"border"]),caption:se,tr:zs,td:Ws,th:Ws,font:new Set(["size","color","face"]),hr:gt,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Oe,poem:se,categorytree:se,combooption:se,math:we,chem:we,ce:we,img:new Set(["alt","src","width","height","loading"])},_l={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:we,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:we,inputbox:we,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:we,poll:new Set(["id","show-results-before-voting"]),sm2:Oe,flashmp3:Oe,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([...Dt,"chem"]),chem:Dt,ce:Dt,hiero:we,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Hs,syntaxhighlight:Hs,templatedata:we,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:we},$l={table:Ms,td:new Set([...Ht,"scope"]),th:Ht,br:Us,caption:se,div:se,hr:gt,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,li:Oe,p:se,pre:gt,tr:zs,ul:Oe}}}),Gn,Vn,Qn,Jn,Zt,va=T({"src/attribute.ts"(){"use strict";var e,t,s,n,l,Bi,r;M(),oe(),Me(),ma(),ae(),B(),O(),Fe(),Gn=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Vn=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Qn=new Set(["ext","arg","magic-word","template"]),Jn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Zt=(r=class extends E{constructor(a,h,d,u="",g,c=[],p=_.getConfig(),v=[]){const m=new ge(d,"attr-key",p,v);let x;if(d==="title"||h==="img"&&d==="alt")x=new E(g,p,v,{}),x.type="attr-value",x.setAttribute("stage",me-1);else if(h==="gallery"&&d==="caption"||h==="choose"&&(d==="before"||d==="after")||h==="img"&&d==="src"&&(g!=null&&g.includes("{{"))){const b=Se(fe({},p),{excludes:[...p.excludes,"heading","html","table","hr","list"]});x=new E(g,b,v,{}),x.type="attr-value",x.setAttribute("stage",1)}else x=new ge(g,"attr-value",p,v,{});super(void 0,p,v);N(this,l);N(this,e);N(this,t);N(this,s);N(this,n);L(this,e,a),this.append(m,x),L(this,s,u),L(this,n,[...c]),L(this,t,h),this.setAttribute("name",st(ve(d)))}get type(){return f(this,e)}get tag(){return f(this,t)}get balanced(){return!f(this,s)||f(this,n)[0]===f(this,n)[1]}afterBuild(){f(this,s).includes("\0")&&L(this,s,this.buildFromStr(f(this,s),0)),this.parentNode&&L(this,t,this.parentNode.name),this.setAttribute("name",st(this.firstChild.text())),super.afterBuild()}toString(a){const[h="",d=""]=f(this,n);return f(this,s)?super.toString(a,f(this,s)+h)+d:this.firstChild.toString(a)}text(){return f(this,s)?`${super.text(`${f(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var a,h;return f(this,s)?f(this,s).length+((h=(a=f(this,n)[0])==null?void 0:a.length)!=null?h:0):0}lint(a=this.getAbsoluteIndex(),h){var y;const d=super.lint(a,h),{balanced:u,firstChild:g,lastChild:c,name:p,tag:v}=this,m=new le(this,a),x=["unclosed-quote","obsolete-attr"],b=x.map(A=>_.lintConfig.getSeverity(A,p));if(b[0]&&!u){const A=R(c,m,x[0],_.msg("unclosed $1","quotes"),b[0]);A.startIndex--,A.startCol--,A.suggestions=[{desc:"close",range:[A.endIndex,A.endIndex],text:f(this,n)[0]}],d.push(A)}const w=j(this,l,Bi).call(this,a,m);return w&&d.push(w),b[1]&&((y=$l[v])!=null&&y.has(p))&&d.push(R(g,m,x[1],"obsolete attribute",b[1])),d}getValue(){return f(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}getAttribute(a){return a==="invalid"?j(this,l,Bi).call(this):super.getAttribute(a)}print(){const[a="",h=""]=f(this,n);return f(this,s)?super.print({sep:Et(f(this,s))+a,post:h}):super.print()}json(a,h=this.getAbsoluteIndex()){const d=super.json(void 0,h);return d.tag=this.tag,d}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,l=new WeakSet,Bi=function(a,h){const{firstChild:d,lastChild:u,type:g,name:c,tag:p,parentNode:v}=this,m=!u.childNodes.some(({type:k})=>Qn.has(k)),x=this.getValue(),b=_l[p],w=kl[p],{length:y}=this.toString();let A="illegal-attr";if(!(b!=null&&b.has(c))&&!(w!=null&&w.has(c))&&(g==="ext-attr"?b||w:!/\{\{[^{]+\}\}/u.test(c))&&(g==="ext-attr"&&!w||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(p==="meta"||p==="link"||!Al.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"unknown");if(k){const S=R(d,h,A,"illegal attribute name",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""}],S}}else if(c==="style"&&typeof x=="string"&&Gn.test(x)){if(a===void 0)return!0;A="insecure-style";const k=_.lintConfig.getSeverity(A);return k&&R(u,h,A,"insecure style",k)}else if(c==="tabindex"&&typeof x=="string"&&x!=="0"){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"tabindex");if(k){const S=R(u,h,A,"nonzero tabindex",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""},{desc:"0 tabindex",range:[S.startIndex,S.endIndex],text:"0"}],S}}else if(m&&g!=="ext-attr"){const k=pl(p,c),S=String(x).toLowerCase();if(k.length>0&&k.every($=>$!==S)){if(a===void 0)return!0;const $=_.lintConfig.getSeverity(A,"value");return $&&R(u,h,A,"illegal attribute value",$)}}else if(typeof x=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Jn.has(c))&&Vn.test(x)||m&&(c==="href"||p==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(x))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"value");return k&&R(u,h,A,"illegal attribute value",k)}return!1},r)}}),Ds,Xn,Gs,ps,Yi=T({"src/attributes.ts"(){"use strict";var e,t,es,n;M(),oe(),ae(),B(),O(),Fe(),va(),Ds=l=>l.slice(0,-1),Xn=l=>`${Ds(l)}-dirty`;try{Gs=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(l){Gs=/[^\W_]/u}ps=(n=class extends E{constructor(i,r,o,a,h=[]){super(void 0,a,h,{});N(this,t);N(this,e);if(L(this,e,r),this.setAttribute("name",o),i){const d=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",g=d.exec(i),c=0;const p=()=>{u&&(super.insertAt(new ge(u,Xn(r),a,h,{})),u="")};for(;g;){const{index:v,0:m,1:x,2:b,3:w,4:y,5:A,6:k}=g;if(u+=i.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ve(x).trim())){const S=y!=null?y:k,$=[w,A],C=new Zt(Ds(r),o,x,b,S,$,a,h);p(),super.insertAt(C)}else u+=m;({lastIndex:c}=d),g=d.exec(i)}u+=i.slice(c),p()}}get type(){return f(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(r=>r instanceof Zt&&(!i||r.name===st(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){const r=this.getAttrTokens(i);return r[r.length-1]}getAttr(i){var r;return(r=this.getAttrToken(i))==null?void 0:r.getValue()}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{parentNode:a,childNodes:h}=this,d=new Map,u=new Set,g=new le(this,i),c=["no-ignored","no-duplicate"],p=["closingTag","invalidAttributes","nonWordAttributes"].map(m=>_.lintConfig.getSeverity(c[0],m));if(p[0]&&j(this,t,es).call(this)){const m=V(this,g,c[0],"attributes of a closing tag",p[0]),x=a.getAbsoluteIndex();m.suggestions=[{desc:"remove",range:[i,m.endIndex],text:""},{desc:"open",range:[x+1,x+2],text:""}],o.push(m)}for(const m of h)if(m instanceof Zt){const{name:x}=m;d.has(x)?(u.add(x),d.get(x).push(m)):d.set(x,[m])}else{const x=m.text().trim(),b=p[Gs.test(x)?1:2];if(x&&b){const w=R(m,g,c[0],"containing invalid attribute",b);w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:" "}],o.push(w)}}const v=_.lintConfig.getSeverity(c[1],"attribute");if(v&&u.size>0)for(const m of u){const x=d.get(m).map(b=>{const w=b.getValue();return[b,w===!0?"":w]});o.push(...x.map(([b,w],y)=>{const A=R(b,g,c[1],_.msg("duplicated $1 attribute",m),v),k={desc:"remove",range:[A.startIndex,A.endIndex],text:""};return!w||x.slice(0,y).some(([,S])=>S===w)?A.fix=k:A.suggestions=[k],A}))}return o}getAttribute(i){return i==="invalid"?j(this,t,es).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${j(this,t,es).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof ge?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,es=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},n)}}),Tl={};Y(Tl,{PreToken:()=>Cl});var Cl,ba=T({"src/pre.ts"(){"use strict";Me(),O(),Ee(),Cl=class extends E{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const n=/<nowiki>/giu,l=/<\/nowiki>/giu,{length:i}=n.source;let r=n.exec(e);r&&(l.lastIndex=r.index+i);let o=l.exec(e),a=0,h="";for(;r&&o;)new he(r[0],t,s),new he(o[0],t,s),h+=`${e.slice(a,r.index)}\0${s.length-1}n${e.slice(r.index+i,o.index)}\0${s.length}n`,a=o.index+i+1,n.lastIndex=a,r=n.exec(e),r&&(l.lastIndex=r.index+i),o=l.exec(e);e=h+e.slice(a)}super(e,t,s,{}),this.setAttribute("stage",me-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),fs,Zi=T({"mixin/multiLine.ts"(){"use strict";pe(),fs=e=>{class t extends e{toString(n){return super.toString(n,`
|
|
3
3
|
`)}text(){return super.text(`
|
|
4
4
|
`).replace(/\n\s*\n/gu,`
|
|
5
5
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
package/bundle/bundle-lsp.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";(()=>{var Io=Object.defineProperty;var Br=e=>{throw TypeError(e)};var To=(e,t,s)=>t in e?Io(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var No=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ke=(e,t,s)=>To(e,typeof t!="symbol"?t+"":t,s),Us=(e,t,s)=>t.has(e)||Br("Cannot "+s);var x=(e,t,s)=>(Us(e,t,"read from private field"),s?s.call(e):t.get(e)),O=(e,t,s)=>t.has(e)?Br("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),R=(e,t,s,r)=>(Us(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),P=(e,t,s)=>(Us(e,t,"access private method"),s);var Wr=(e,t,s,r)=>({set _(l){R(e,t,l,s)},get _(){return x(e,t,r)}});var Nd=No((Fd,Co)=>{var Lo=Object.create,wt=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyNames,Fo=Object.prototype.hasOwnProperty,ql=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yt=e=>{throw TypeError(e)},Bl=(e,t,s)=>t in e?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ur=(e,t)=>wt(e,"name",{value:t,configurable:!0}),N=(e,t)=>function(){return e&&(t=(0,e[mr(e)[0]])(e=0)),t},jo=(e,t)=>function(){return t||(0,e[mr(e)[0]])((t={exports:{}}).exports,t),t.exports},ie=(e,t)=>{for(var s in t)wt(e,s,{get:t[s],enumerable:!0})},Ro=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of mr(t))!Fo.call(e,l)&&l!==s&&wt(e,l,{get:()=>t[l],enumerable:!(r=Ol(t,l))||r.enumerable});return e},ee=e=>Ro(wt({},"__esModule",{value:!0}),e),re=e=>{var t;return[,,,Lo((t=e==null?void 0:e[ql("metadata")])!=null?t:null)]},Wl=["class","method","getter","setter","accessor","field","value","get","set"],Ot=e=>e!==void 0&&typeof e!="function"?yt("Function expected"):e,Po=(e,t,s,r,l)=>({kind:Wl[e],name:t,metadata:r,addInitializer:i=>s._?yt("Already initialized"):l.push(Ot(i||null))}),Ls=(e,t)=>Bl(t,ql("metadata"),e[3]),ne=(e,t,s,r)=>{for(var l=0,i=e[t>>1],n=i&&i.length;l<n;l++)t&1?i[l].call(s):r=i[l].call(s,r);return r},le=(e,t,s,r,l,i)=>{var n,a,o,d,u,h=t&7,p=!!(t&8),c=!!(t&16),m=h>3?e.length+1:h?p?1:2:0,S=Wl[h+5],A=h>3&&(e[m-1]=[]),y=e[m]||(e[m]=[]),$=h&&(!c&&!p&&(l=l.prototype),h<5&&(h>3||!c)&&Ol(h<4?l:{get[s](){return ge(this,i)},set[s](g){return Ce(this,i,g)}},s));h?c&&h<4&&Ur(i,(h>2?"set ":h>1?"get ":"")+s):Ur(l,s);for(var f=r.length-1;f>=0;f--)d=Po(h,s,o={},e[3],y),h&&(d.static=p,d.private=c,u=d.access={has:c?g=>Oo(l,g):g=>s in g},h^3&&(u.get=c?g=>(h^1?ge:ft)(g,l,h^4?i:$.get):g=>g[s]),h>2&&(u.set=c?(g,w)=>Ce(g,l,w,h^4?i:$.set):(g,w)=>g[s]=w)),a=(0,r[f])(h?h<4?c?i:$[S]:h>4?void 0:{get:$.get,set:$.set}:l,d),o._=1,h^4||a===void 0?Ot(a)&&(h>4?A.unshift(a):h?c?i=a:$[S]=a:l=a):typeof a!="object"||a===null?yt("Object expected"):(Ot(n=a.get)&&($.get=n),Ot(n=a.set)&&($.set=n),Ot(n=a.init)&&A.unshift(n));return h||Ls(e,l),$&&wt(l,s,$),c?h^4?i:$:l},Eo=(e,t,s)=>Bl(e,typeof t!="symbol"?t+"":t,s),xr=(e,t,s)=>t.has(e)||yt("Cannot "+s),Oo=(e,t)=>Object(t)!==t?yt('Cannot use the "in" operator on this value'):e.has(t),ge=(e,t,s)=>(xr(e,t,"read from private field"),s?s.call(e):t.get(e)),je=(e,t,s)=>t.has(e)?yt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ce=(e,t,s,r)=>(xr(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),ft=(e,t,s)=>(xr(e,t,"access private method"),s),qo=(e,t,s,r)=>({set _(l){Ce(e,t,l,s)},get _(){return ge(e,t,r)}}),Ul,vr,Ml=N({"base.ts"(){"use strict";Ul=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),vr=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function Xe(e){const t=new Map,s=new WeakMap;return r=>{const l=typeof r=="string"?t:s;if(l.has(r)){const n=l.get(r);return n.lastIndex=0,n}const i=e(r);return l.set(r,i),i}}var es,zl,Mr,Hl,Dl,St=N({"../common/dist/index.mjs"(){"use strict";es=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),zl=e=>Math.round(e*255).toString(16).padStart(2,"0"),Mr=(()=>{const e=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,t=String.raw`(?:\d*\.)?\d+%?`,s=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,r=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(t).join(String.raw`\s+`)}(?:\s*\/\s*${t})?`}|${String.raw`${new Array(3).fill(t).join(String.raw`\s*,\s*`)}(?:\s*,\s*${t})?`})\s*\)`,l=String.raw`hsla?\(\s*(?:${String.raw`${s}\s+${t}\s+${t}(?:\s*\/\s*${t})?`}|${String.raw`${s}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${t})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${e}|${r}|${l})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${e}|${r})`,"giu")}})(),Hl=(e,t=!0)=>{const s=[],r=Mr[t?"full":"rgb"];r.lastIndex=0;let l=r.exec(e),i=0;for(;l;){const n=l.index+l[1].length;n>i&&s.push([e.slice(i,n),i,n,!1]),{lastIndex:i}=r,s.push([l[2],n,i,e[n-1]!=="&"||!/^#\d+$/u.test(l[2])]),l=r.exec(e)}return e.length>i&&s.push([e.slice(i),i,e.length,!1]),s},Dl=Xe}}),Be,Ms,mt,xt,vt,Re,rt,ts,Ie,Ye,zr,Hr,ss,Gl,Dr,Gr,is,bt,he=N({"util/string.ts"(){"use strict";St(),Be=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ms=String.raw`[^[\]<>"\0-\x1F\x7F${Be}\uFFFD]`,mt=String.raw`(?:\[[\da-f:.]+\]|${Ms})`,xt=String.raw`(?:${Ms}|\0\d+[cn!~]\x7F)*`,vt=e=>e.trim().toLowerCase(),Re=(e,t)=>e.replace(/\0(\d+)\x7F/gu,(s,r)=>t[r]),rt=(e,t)=>s=>s.replace(e,t),ts=rt(/[\0\x7F]|\r$/gmu,""),Ie=rt(/\0\d+[cn]\x7F/gu,""),Ye=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),zr={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Hr=rt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):zr[s.toLowerCase()]),ss=e=>Hr(e),Gl=rt(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Dr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Gr=e=>rt(e,t=>`&${Dr[t]};`),is=Gr(/[&<>]/gu),bt=(e,t={})=>{const{pre:s="",post:r="",sep:l=""}=t;return s+e.map(i=>i.print()).join(l)+r}}}),Bo=jo({"config/minimum.json"(e,t){t.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","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),Se,Yi,Ze=N({"util/constants.ts"(){"use strict";Se=11,Yi=Bo()}}),de,ce=N({"lib/rect.ts"(){"use strict";var e,t,s,r,Zi,i;de=(i=class{constructor(n,a){O(this,r);O(this,e);O(this,t);O(this,s);R(this,e,n),R(this,t,a)}get start(){return x(this,t)}get top(){return P(this,r,Zi).call(this).top}get left(){return P(this,r,Zi).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakSet,Zi=function(){var n;return(n=x(this,s))!=null||R(this,s,x(this,e).getRootNode().posFromIndex(x(this,t))),x(this,s)},i)}}),Vr,Qr,Kt,rs,zs,X,te,Ke,br,K=N({"util/lint.ts"(){"use strict";we(),ce(),J(),Vr=new Set(["tr","td","th","caption"]),Qr=new Set(["Template:!!","Template:!-"]),Kt=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Qr.has(t.name)||t.is("html")&&Vr.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Kt(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(Kt);return s.includes(2)?2:s.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},rs=(e,t,s,r)=>({line:e+s-1,character:(s===1?t:0)+r}),zs=e=>(t,s,r,l,i="error")=>{const{start:n}=s,{top:a,left:o}=s instanceof de?s:new de(t,n),{offsetHeight:d,offsetWidth:u}=t,{startIndex:h,startLine:p,startCol:c}=e(t,n,a,o),{line:m,character:S}=rs(p,c,d,u);return{rule:r,message:I.msg(l),severity:i,startIndex:h,endIndex:h+t.toString().length,startLine:p,endLine:m,startCol:c,endCol:S}},X=zs((e,t,s,r)=>{const l=e.getRelativeIndex(),{top:i,left:n}=e.parentNode.posFromIndex(l);return{startIndex:t+l,startLine:s+i,startCol:i?n:r+n}}),te=zs((e,t,s,r)=>({startIndex:t,startLine:s,startCol:r})),Ke=(e,t,s,r)=>{if(e&&(r||I.viewOnly&&e[0]===ve.rev))return e[1];const l=t();return(r||I.viewOnly)&&s([ve.rev,l]),l},br=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),Jr,ys,Wo=N({"parser/selector.ts"(){"use strict";Jr=(e,t,s)=>{if(e.includes("#")){const[r,...l]=e.split("#");return(!r||r===t)&&l.every(i=>i===s)}return!e||e===t},ys=(e,t,s)=>({type:r,name:l})=>e.split(",").some(i=>Jr(i.trim(),r,l))}}),Fs,wr=N({"mixin/cached.ts"(){"use strict";K(),Fs=(e=!0)=>t=>{const s=new WeakMap;return function(...r){return Ke(s.get(this),()=>t.apply(this,r),l=>{s.set(this,l)},e)}}}}),Xr,os,Ct,It,ds,Tt,Nt,Lt,us,hs,Yt,Vl=N({"lib/node.ts"(){"use strict";K(),we(),wr(),J(),Xr=[Fs(!1)],Yt=class{constructor(){ne(hs,5,this),je(this,Lt),Eo(this,"childNodes",[]),je(this,os),je(this,Ct),je(this,It),je(this,ds),je(this,Tt),je(this,Nt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return ge(this,os)}get nextSibling(){return ge(this,Ct)}get previousSibling(){return ge(this,It)}get offsetHeight(){return ft(this,Lt,us).call(this).height}get offsetWidth(){return ft(this,Lt,us).call(this).width}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":Ce(this,os,t),t||(Ce(this,Ct,void 0),Ce(this,It,void 0));break;case"nextSibling":Ce(this,Ct,t);break;case"previousSibling":Ce(this,It,t);break;case"aIndex":I.viewOnly&&Ce(this,Tt,[ve.rev,t]);break;default:this[e]=t}}getRootNode(){return Ke(ge(this,ds),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&Ce(this,ds,e)})}indexFromPos(e,t){{if(e<0||t<0)return;const s=this.getLines();if(e>=s.length)return;const[,r,l]=s[e],i=r+t;return i>l?void 0:i}this.lspError("AstNode.indexFromPos")}posFromIndex(e){const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),r=s.findIndex(([,,l])=>e<=l);return{top:r,left:e-s[r][1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return Ke(ge(this,Nt)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let r=this.getAttribute("padding");for(let l=0;l<s;l++)I.viewOnly&&(ge(this,Nt)[l]=[ve.rev,r]),r+=t[l].toString().length+this.getGaps(l);return r},t=>{ge(this,Nt)[e]=t})}getAbsoluteIndex(){return Ke(ge(this,Tt),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{Ce(this,Tt,e)})}getBoundingClientRect(){return{...ft(this,Lt,us).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(e){return this.type===e}getLines(){const e=[];let t=0;for(const s of String(this).split(`
|
|
2
|
-
`)){const r=t+s.length;e.push([s,t,r]),t=r+1}return e}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},hs=re(null),os=new WeakMap,Ct=new WeakMap,It=new WeakMap,ds=new WeakMap,Tt=new WeakMap,Nt=new WeakMap,Lt=new WeakSet,us=function(){const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}},le(hs,1,"getLines",Xr,Yt),Ls(hs,Yt)}}),Ql,Uo=N({"lib/element.ts"(){"use strict";var e,er,tr,r;he(),we(),Wo(),Vl(),Ql=(r=class extends Yt{constructor(){super(...arguments);O(this,e)}get length(){return this.childNodes.length}text(i){return Ye(this.childNodes,i)}normalize(){const i=this.getChildNodes(),n=a=>{var o,d;i.splice(a,1),(o=i[a-1])==null||o.setAttribute("nextSibling",i[a]),(d=i[a])==null||d.setAttribute("previousSibling",i[a-1])};for(let a=i.length-1;a>=0;a--){const{type:o,data:d}=i[a];o!=="text"||i.length===1||this.getGaps(a-(a&&1))||d===""&&n(a)}this.setAttribute("childNodes",i)}removeAt(i){return Ns(this,i,1)[0]}insertAt(i,n=this.length){return Ns(this,n,0,[i]),i}closest(i){const n=ys(i,this);let{parentNode:a}=this;for(;a;){if(n(a))return a;({parentNode:a}=a)}}querySelector(i){const n=ys(i,this);return P(this,e,er).call(this,n)}querySelectorAll(i){const n=ys(i,this);return P(this,e,tr).call(this,n)}append(...i){this.safeAppend(i)}safeAppend(i){for(const n of i)this.insertAt(n)}replaceChildren(...i){this.safeReplaceChildren(i)}safeReplaceChildren(i){for(let n=this.length-1;n>=0;n--)this.removeAt(n);this.safeAppend(i)}setText(i,n=0){n+=n<0?this.length:0;const a=this.childNodes[n],{data:o}=a;return a.replaceData(i),o}toString(i,n=""){return this.childNodes.map(a=>a.toString(i)).join(n)}caretPositionFromIndex(i){{if(i===void 0)return;const{length:n}=this.toString();if(i>n||i<-n)return;i+=i<0?n:0;let a=this,o=0,d=0;for(;a.type!=="text";){const{childNodes:u}=a;o+=a.getAttribute("padding");for(let h=0;o<=i&&h<u.length;h++){const p=u[h],{nextSibling:c}=p,m=p.toString(),S=m.length;if(p.setAttribute("aIndex",o),o+=S,o>i||o===i&&S>0&&(!c||c.type==="text"||p.type!=="text"&&(m.trim()||!c.toString().trim()))){a=p,o-=S,d=o;break}o+=a.getGaps(h)}if(a.childNodes===u)return{offsetNode:a,offset:i-d}}return{offsetNode:a,offset:i-d}}this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(i){var n;{const a=(n=this.caretPositionFromIndex(i))==null?void 0:n.offsetNode;return(a==null?void 0:a.type)==="text"?a.parentNode:a}this.lspError("AstElement.elementFromIndex")}elementFromPoint(i,n){return this.elementFromIndex(this.indexFromPos(n,i))}lint(i=this.getAbsoluteIndex(),n){const a=[];for(let o=0,d=i+this.getAttribute("padding");o<this.length;o++){const u=this.childNodes[o];u.setAttribute("aIndex",d);const h=u.lint(d,n);h.length>0&&a.push(...h),d+=u.toString().length+this.getGaps(o)}return a}print(i={}){const n=i.class;return this.toString()?(n===""?"":`<span class="wpb-${n!=null?n:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+bt(this.childNodes,i)+(n===""?"":"</span>"):""}json(i,n=this.getAbsoluteIndex()){const a={...this,type:this.type,range:[n,n+this.toString().length],childNodes:[]};for(let o=0,d=n+this.getAttribute("padding");o<this.length;o++){const u=this.childNodes[o],{length:h}=u.toString();u.setAttribute("aIndex",d),a.childNodes.push(u.type==="text"?{data:u.data,range:[d,d+h]}:u.json(void 0,d)),d+=h+this.getGaps(o)}return a}},e=new WeakSet,er=function(i){var n;for(const a of this.childNodes){if(a.type==="text")continue;if(i(a))return a;const o=P(n=a,e,er).call(n,i);if(o)return o}},tr=function(i){var a;let n=[];for(const o of this.childNodes)o.type!=="text"&&(i(o)&&n.push(o),n=[...n,...P(a=o,e,tr).call(a,i)]);return n},r)}}),cs,Hs,Kr,Yr,Zr,en,Ds,Gs,sr,Mo=N({"lib/text.ts"(){"use strict";var e,Jl,s;he(),K(),J(),Vl(),cs=String.raw`[${Be}\t]*`,Hs=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${cs}\d)|isbn(?=[-::]?${cs}(?:\d(?:${cs}|-)){6})`,Kr=new RegExp(String.raw`${Hs}|https?[:/]/+`,"giu"),Yr=new RegExp(Hs,"giu"),Zr=new Set(["attr-value","ext-link-text","link-text"]),en={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ds=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"]);try{Gs=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{Gs=/\w/u}sr=(s=class extends Yt{constructor(l){super();O(this,e);ke(this,"data","");this.data=l}get type(){return"text"}toString(l){var i;return l&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?Ie(this.data):this.data}text(){return this.data}lint(l=this.getAbsoluteIndex(),i){var _,C,E;if(i===!1)return[];const{data:n,parentNode:a,nextSibling:o,previousSibling:d}=this;if(!a)throw new Error("An isolated text node cannot be linted!");const{type:u,name:h,parentNode:p}=a;if(u==="attr-value"){const{name:T,tag:L}=p;if(L==="ref"&&(T==="name"||T==="extends"||T==="follow")||T==="group"&&(L==="ref"||L==="references")||L==="choose"&&(T==="before"||T==="after"))return[]}if(i!=null||(i=u==="free-ext-link"||u==="ext-link-url"||u==="ext-link-text"||u==="image-parameter"&&h==="link"||u==="attr-value"?Yr:Kr),n.search(i)===-1)return[];i.lastIndex=0;const c=[],m=o==null?void 0:o.type,S=o==null?void 0:o.name,A=d==null?void 0:d.type,y=this.getRootNode(),$=y.toString(),{ext:f,html:g,variants:w}=y.getAttribute("config"),{top:b,left:v}=y.posFromIndex(l),k=new Set(["onlyinclude","noinclude","includeonly",...f,...g[0],...g[1],...g[2],...Ds]);for(let T=i.exec(n);T;T=i.exec(n)){const[,L,B]=T;let{index:j,0:F}=T;if(B&&B!=="]"){const{length:z}=B;j+=z,F=F.slice(z)}F=F.toLowerCase();const[U]=F,W=U==="r"||U==="p"||U==="i",q=U==="{",M=U==="}",D=U==="[",G=U==="]";let{length:Z}=F;if(U==="<"&&!k.has(L.toLowerCase())||D&&u==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(j+1))||o!=null&&o.is("ext")&&S==="nowiki"&&((_=o.innerText)!=null&&_.includes("]")))||W&&(!a.isPlain()||Zr.has(u)))continue;G&&(j||Z>1)&&i.lastIndex--;let Y=l+j,se=Y+Z,ue,Ae;const Le=$[se],it=$[Y-1],V=q||D,oe=q&&it==="-"&&w.length>0,me=M&&Le==="-"&&w.length>0,xe=D&&m==="free-ext-link"&&!n.slice(j+1).trim()||G&&A==="free-ext-link"&&!n.slice(0,j).includes("]");if(W)ue="lonely-http",F=F.toUpperCase(),Ae=I.lintConfig.getSeverity(ue,F);else if(U==="<"){ue="tag-like";let z;/^<\s/u.test(F)||!/[\s/>]/u.test(Le!=null?Le:"")?z="invalid":Ds.has(L)&&(z="disallowed"),Ae=I.lintConfig.getSeverity(ue,z)}else if(oe||me)ue="lonely-bracket",Ae=I.lintConfig.getSeverity(ue,"converter"),oe&&j>0?(F="-{",j--,Y--,Z=2):me&&j<n.length-1&&(F="}-",se++,Z=2);else if(xe)ue="lonely-bracket",Ae=I.lintConfig.getSeverity(ue,"extLink");else if(V||M||G)if(ue="lonely-bracket",Z>1||q&&Le===U||M&&it===U)Ae=I.lintConfig.getSeverity(ue,"double");else{if(!D||u!=="ext-link-text"){const z=en[U],Ee=V?n.slice(j+1):n.slice(0,j);if(q&&((C=z.exec(Ee))==null?void 0:C[0])==="}"||M&&((E=z.exec(Ee))==null?void 0:E[0])==="{")continue;if(!Ee.includes(U)){const _t=V?"nextSibling":"previousSibling";let De=this[_t];for(;De&&(De.type!=="text"||!z.test(De.data));)De=De[_t];if(De&&z.exec(De.data)[0]!==U)continue}}Ae=I.lintConfig.getSeverity(ue,"single")}else ue="lonely-http",Ae=I.lintConfig.getSeverity(ue);if(!Ae)continue;const $e=this.posFromIndex(j),{line:He,character:ye}=rs(b,v,$e.top+1,$e.left),Fe={rule:ue,message:I.msg('lonely "$1"',W||U==="h"||oe||me?F:U),severity:Ae,startIndex:Y,endIndex:se,startLine:He,endLine:He,startCol:ye,endCol:ye+Z};if(U==="<")Fe.suggestions=[{desc:"escape",range:[Y,Y+1],text:"<"}];else if(U==="h"&&u!=="link-text"&&Gs.test(it||""))Fe.suggestions=[{desc:"whitespace",range:[Y,Y],text:" "}];else if(D&&u==="ext-link-text"){const z=a.getAbsoluteIndex()+a.toString().length;Fe.suggestions=[{desc:"escape",range:[z,z+1],text:"]"}]}else if(G&&xe){const z=l-d.toString().length;Fe.suggestions=[{desc:"left bracket",range:[z,z],text:"["}]}else W&&(Fe.suggestions=[...T[0]===F?[]:[{desc:"uppercase",range:[Y,se],text:F}],...Le===":"||Le===":"?[{desc:"whitespace",range:[se,se+1],text:" "}]:[]]);c.push(Fe)}return c}replaceData(l){P(this,e,Jl).call(this,l)}print(){return is(this.data)}},e=new WeakSet,Jl=function(l){this.setAttribute("data",l)},s)}}),et,At=N({"mixin/hidden.ts"(){"use strict";we(),et=(e=!0,t=!0)=>s=>{class r extends s{text(){return""}lint(i){return e?[]:super.lint(i)}}return kt(r,s),r}}}),tt,$t=N({"src/syntax.ts"(){"use strict";var e,t;Q(),tt=(t=class extends H{constructor(r,l,i,n,a){super(r,i,n,a);O(this,e);R(this,e,l)}get type(){return x(this,e)}lint(r=this.getAbsoluteIndex()){return super.lint(r,!1)}},e=new WeakMap,t)}}),Pe,We=N({"mixin/padded.ts"(){"use strict";we(),Pe=({length:e})=>t=>{class s extends t{getAttribute(l){return l==="padding"?e:super.getAttribute(l)}}return kt(s,t),s}}}),be,Ue=N({"src/atom.ts"(){"use strict";var e,t;Q(),be=(t=class extends H{constructor(r,l,i,n,a){super(r,i,n,a);O(this,e);R(this,e,l)}get type(){return x(this,e)}set type(r){R(this,e,r)}getAttribute(r){var l;return r==="invalid"?this.type==="converter-flag"&&!!((l=this.parentNode)!=null&&l.isInvalidFlag(this)):super.getAttribute(r)}},e=new WeakMap,t)}}),tn,sn,Vs,rn,qe,js=N({"src/link/base.ts"(){"use strict";var e,t,s,r;K(),Ze(),he(),ce(),We(),J(),Q(),Ue(),tn=l=>l==="redirect-target"||l==="link",sn=[Pe("[[")],qe=(r=class extends(rn=H){constructor(i,n,a,o=[],d="|"){super(void 0,a,o,{});O(this,e,!0);O(this,t);O(this,s);if(this.insertAt(new be(i,"link-target",a,o,{})),n!==void 0){const u=new H(n,a,o,{});u.type="link-text",u.setAttribute("stage",Se-1),this.insertAt(u)}R(this,t,d)}get link(){return x(this,s)}get fragment(){return x(this,s).fragment}afterBuild(){R(this,s,this.getTitle()),x(this,t).includes("\0")&&R(this,t,this.buildFromStr(x(this,t),0)),this.setAttribute("name",x(this,s).title),super.afterBuild()}setAttribute(i,n){i==="bracket"?R(this,e,n):i==="title"?R(this,s,n):super.setAttribute(i,n)}toString(i){const n=super.toString(i,x(this,t));return x(this,e)?`[[${n}]]`:n}text(){const i=super.text("|");return x(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?x(this,s):super.getAttribute(i)}getGaps(i){return i===0?x(this,t).length:1}lint(i=this.getAbsoluteIndex(),n){const a=super.lint(i,n),{childNodes:[o,d],type:u}=this,{encoded:h,fragment:p}=x(this,s),c=new de(this,i);let m="unknown-page",S=I.lintConfig.getSeverity(m);if(S&&o.childNodes.some(({type:A})=>A==="template")&&a.push(X(o,c,m,"template in an internal link target",S)),m="url-encoding",S=I.lintConfig.getSeverity(m),S&&h){const A=X(o,c,m,"unnecessary URL encoding in an internal link",S);A.fix={desc:"decode",range:[A.startIndex,A.endIndex],text:es(o.text())},a.push(A)}if(m="pipe-like",S=I.lintConfig.getSeverity(m,"link"),S&&(u==="link"||u==="category")){const A=d==null?void 0:d.childNodes.findIndex($=>$.type==="text"&&$.data.includes("|")),y=d==null?void 0:d.childNodes[A];if(y){const $=X(d,c,m,'additional "|" in the link text',S),f=$.startIndex+d.getRelativeIndex(A);$.suggestions=[{desc:"escape",range:[f,f+y.data.length],text:y.data.replace(/\|/gu,"|")}],a.push($)}}if(m="no-ignored",S=I.lintConfig.getSeverity(m,"fragment"),S&&p!==void 0&&!tn(u)){const A=X(o,c,m,"useless fragment",S),y=o.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),$=o.childNodes[y];$&&(A.fix={desc:"remove",range:[A.startIndex+o.getRelativeIndex(y)+$.data.indexOf("#"),A.endIndex],text:""}),a.push(A)}return a}getTitle(i,n){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:n,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(x(this,e)?{pre:"[[",post:"]]",sep:x(this,t)}:{sep:x(this,t)})}json(i,n=this.getAbsoluteIndex()){const a=super.json(void 0,n),{type:o,fragment:d}=this;return d!==void 0&&(o==="link"||o==="redirect-target")&&(a.fragment=d),a}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r),Vs=re(rn),qe=le(Vs,0,"LinkBaseToken",sn,qe),ne(Vs,1,qe)}}),Me,st=N({"src/nowiki/base.ts"(){"use strict";Q(),Me=class extends H{get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}}}}),nn,Qs,ln,pe,ze=N({"src/nowiki/noinclude.ts"(){"use strict";At(),st(),nn=[et()],pe=class extends(ln=Me){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Qs=re(ln),pe=le(Qs,0,"NoincludeToken",nn,pe),ne(Qs,1,pe)}}),Xl,zo=N({"src/link/redirectTarget.ts"(){"use strict";K(),J(),js(),ze(),Xl=class extends qe{get type(){return"redirect-target"}constructor(e,t,s,r){super(e,void 0,s,r),t!==void 0&&this.insertAt(new pe(t,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){const t=super.lint(e,!1),s="no-ignored",r=I.lintConfig.getSeverity(s,"redirect");if(r&&this.length===2){const l=X(this.lastChild,{start:e},s,"useless link text",r);l.startIndex--,l.startCol--,l.fix={desc:"remove",range:[l.startIndex,l.endIndex],text:""},t.push(l)}return t}}}}),an,Js,on,qt,Ho=N({"src/redirect.ts"(){"use strict";var e,t,s;At(),Q(),$t(),zo(),an=[et(!1,!1)],qt=(s=class extends(on=H){constructor(l,i,n,a,o,d,u=[]){super(void 0,d,u);O(this,e);O(this,t);R(this,e,l),R(this,t,o),this.append(new tt(i,"redirect-syntax",d,u),new Xl(n,a==null?void 0:a.slice(1),d,u))}get type(){return"redirect"}getAttribute(l){return l==="padding"?x(this,e).length:super.getAttribute(l)}toString(l){return x(this,e)+super.toString(l)+x(this,t)}lint(l=this.getAbsoluteIndex()){const i=l+x(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",i),this.lastChild.lint(i)}print(){return super.print({pre:x(this,e),post:x(this,t)})}},e=new WeakMap,t=new WeakMap,s),Js=re(on),qt=le(Js,0,"RedirectToken",an,qt),ne(Js,1,qt)}}),Kl={};ie(Kl,{parseRedirect:()=>Yl});var Yl,Do=N({"parser/redirect.ts"(){"use strict";J(),Ho(),Yl=(e,t,s)=>{var l;(l=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=t.regexRedirect.exec(e);return r&&I.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(r[0].length)}`,new qt(...r.slice(1),t,s),e):!1}}}),dn,Xs,un,Bt,Go=N({"src/onlyinclude.ts"(){"use strict";We(),Q(),dn=[Pe("<onlyinclude>")],Bt=class extends(un=H){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Xs=re(un),Bt=le(Xs,0,"OnlyincludeToken",dn,Bt),ne(Xs,1,Bt)}}),ls,Rs=N({"mixin/gapped.ts"(){"use strict";we(),ls=(e=1)=>t=>{class s extends t{getGaps(){return e}}return kt(s,t),s}}}),hn,Ks,cn,Je,yr=N({"src/tagPair/index.ts"(){"use strict";var e,t;Rs(),Q(),hn=[ls()],Je=(t=class extends(cn=H){constructor(r,l,i,n,a,o=[]){super(void 0,a);O(this,e);ke(this,"closed");ke(this,"selfClosing");this.setAttribute("name",r.toLowerCase()),R(this,e,[r,n||r]),this.closed=n!=="",this.selfClosing=n===void 0,this.append(l,i);const d=typeof l=="string"?-1:o.indexOf(l);o.splice(d===-1?1/0:d,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(r){const{selfClosing:l,firstChild:i,lastChild:n}=this,[a,o]=x(this,e);return l?`<${a}${i.toString(r)}/>`:`<${a}${i.toString(r)}>${n.toString(r)}${this.closed?`</${o}>`:""}`}text(){const[r,l]=x(this,e);return this.selfClosing?`<${r}${this.firstChild.text()}/>`:`<${r}${super.text(">")}${this.closed?`</${l}>`:""}`}getAttribute(r){return r==="padding"?x(this,e)[0].length+1:super.getAttribute(r)}print(){const[r,l]=x(this,e);return super.print(this.selfClosing?{pre:`<${r}`,post:"/>"}:{pre:`<${r}`,sep:">",post:this.closed?`</${l}>`:""})}},e=new WeakMap,t),Ks=re(cn),Je=le(Ks,0,"TagPairToken",hn,Je),ne(Ks,1,Je)}}),Zl,Vo=N({"src/tagPair/translate.ts"(){"use strict";var e,ea,s;Q(),yr(),$t(),ze(),Zl=(s=class extends Je{constructor(l,i,n,a=[]){const o=new tt(l,"translate-attr",n,a);i=i==null?void 0:i.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(u,h,p,c)=>(new pe(h,n,a),new pe(c,n,a),`\0${a.length-1}n${p}\0${a.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(u,h,p,c,m)=>(new pe(h,n,a),new pe(m,n,a),`\0${a.length-1}n${c}\0${a.length}n`));const d=new H(i,n,a);d.type="translate-inner";super("translate",o,d,"translate",n,a);O(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(l){return l?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${P(this,e,ea).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,ea=function(){return this.firstChild.toString()===" nowrap"},s)}}),gn,Ys,pn,Wt,Qo=N({"src/tagPair/include.ts"(){"use strict";K(),ce(),At(),J(),yr(),gn=[et(!1)],Wt=class extends(pn=Je){get type(){return"include"}constructor(e,t="",s,r,l,i){super(e,t,s!=null?s:"",s===void 0||r!=null?r:"",l,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){const t=[],{firstChild:s,closed:r,name:l}=this,i=new de(this,e),n=["no-ignored","unclosed-comment"],a=n.map(o=>I.lintConfig.getSeverity(o,"include"));if(a[0]&&s.data.trim()){const o=X(s,i,n[0],"useless attribute",a[0]);o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],t.push(o)}if(a[1]&&!r){const o=te(this,i,n[1],I.msg("unclosed $1",`<${l}>`),a[1]);o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${l}>`}],t.push(o)}return t}},Ys=re(pn),Wt=le(Ys,0,"IncludeToken",gn,Wt),ne(Ys,1,Wt)}}),Ps,Sr=N({"mixin/attributesParent.ts"(){"use strict";we(),Ps=(e=0)=>t=>{var r,ir;class s extends t{constructor(){super(...arguments);O(this,r)}hasAttr(a){return P(this,r,ir).call(this).hasAttr(a)}getAttr(a){return P(this,r,ir).call(this).getAttr(a)}}return r=new WeakSet,ir=function(){return this.childNodes[e]},kt(s,t),s}}}),ae,Zs,ei,Ft,gs,ti,Ge,si,ii,ri,ps,ni,Te,Ar,$r,kr,ta,sa=N({"util/sharable.ts"(){"use strict";ae=new Set(["align"]),Zs=new Set(["cite"]),ei=new Set(["cite","datetime"]),Ft=new Set(["width"]),gs=new Set(["axis","align","bgcolor","height","width","valign"]),ti=new Set([...gs,"abbr","headers","scope","rowspan","colspan"]),Ge=new Set(["type"]),si=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ii=new Set(["clear"]),ri=new Set(["bgcolor","align","valign"]),ps=new Set(["qid","forcemathmode","type","display"]),ni=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Te=new Set,Ar=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"]),$r={div:ae,h1:ae,h2:ae,h3:ae,h4:ae,h5:ae,h6:ae,blockquote:Zs,q:Zs,p:ae,br:ii,pre:Ft,ins:ei,del:ei,ul:Ge,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...si,"border"]),caption:ae,tr:ri,td:ti,th:ti,font:new Set(["size","color","face"]),hr:Ft,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ge,poem:ae,categorytree:ae,combooption:ae,math:Te,chem:Te,ce:Te,img:new Set(["alt","src","width","height","loading"])},kr={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:Te,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:Te,inputbox:Te,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Te,poll:new Set(["id","show-results-before-voting"]),sm2:Ge,flashmp3:Ge,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([...ps,"chem"]),chem:ps,ce:ps,hiero:Te,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ni,syntaxhighlight:ni,templatedata:Te,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Te},ta={table:si,td:new Set([...gs,"scope"]),th:gs,br:ii,caption:ae,div:ae,hr:Ft,h1:ae,h2:ae,h3:ae,h4:ae,h5:ae,h6:ae,li:Ge,p:ae,pre:Ft,tr:ri,ul:Ge}}}),fn,mn,xn,vn,Ss,Jo=N({"src/attribute.ts"(){"use strict";var e,t,s,r,l,rr,n;K(),he(),Ze(),sa(),ce(),J(),Q(),Ue(),fn=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,mn=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,xn=new Set(["ext","arg","magic-word","template"]),vn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Ss=(n=class extends H{constructor(o,d,u,h="",p,c=[],m=I.getConfig(),S=[]){const A=new be(u,"attr-key",m,S);let y;if(u==="title"||d==="img"&&u==="alt")y=new H(p,m,S,{}),y.type="attr-value",y.setAttribute("stage",Se-1);else if(d==="gallery"&&u==="caption"||d==="choose"&&(u==="before"||u==="after")||d==="img"&&u==="src"&&(p!=null&&p.includes("{{"))){const $={...m,excludes:[...m.excludes,"heading","html","table","hr","list"]};y=new H(p,$,S,{}),y.type="attr-value",y.setAttribute("stage",1)}else y=new be(p,"attr-value",m,S,{});super(void 0,m,S);O(this,l);O(this,e);O(this,t);O(this,s);O(this,r);R(this,e,o),this.append(A,y),R(this,s,h),R(this,r,[...c]),R(this,t,d),this.setAttribute("name",vt(Ie(u)))}get type(){return x(this,e)}get tag(){return x(this,t)}get balanced(){return!x(this,s)||x(this,r)[0]===x(this,r)[1]}afterBuild(){x(this,s).includes("\0")&&R(this,s,this.buildFromStr(x(this,s),0)),this.parentNode&&R(this,t,this.parentNode.name),this.setAttribute("name",vt(this.firstChild.text())),super.afterBuild()}toString(o){const[d="",u=""]=x(this,r);return x(this,s)?super.toString(o,x(this,s)+d)+u:this.firstChild.toString(o)}text(){return x(this,s)?`${super.text(`${x(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var o,d;return x(this,s)?x(this,s).length+((d=(o=x(this,r)[0])==null?void 0:o.length)!=null?d:0):0}lint(o=this.getAbsoluteIndex(),d){var g;const u=super.lint(o,d),{balanced:h,firstChild:p,lastChild:c,name:m,tag:S}=this,A=new de(this,o),y=["unclosed-quote","obsolete-attr"],$=y.map(w=>I.lintConfig.getSeverity(w,m));if($[0]&&!h){const w=X(c,A,y[0],I.msg("unclosed $1","quotes"),$[0]);w.startIndex--,w.startCol--,w.suggestions=[{desc:"close",range:[w.endIndex,w.endIndex],text:x(this,r)[0]}],u.push(w)}const f=P(this,l,rr).call(this,o,A);return f&&u.push(f),$[1]&&((g=ta[S])!=null&&g.has(m))&&u.push(X(p,A,y[1],"obsolete attribute",$[1])),u}getValue(){return x(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}getAttribute(o){return o==="invalid"?P(this,l,rr).call(this):super.getAttribute(o)}print(){const[o="",d=""]=x(this,r);return x(this,s)?super.print({sep:is(x(this,s))+o,post:d}):super.print()}json(o,d=this.getAbsoluteIndex()){const u=super.json(void 0,d);return u.tag=this.tag,u}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,l=new WeakSet,rr=function(o,d){const{firstChild:u,lastChild:h,type:p,name:c,tag:m,parentNode:S}=this,A=!h.childNodes.some(({type:b})=>xn.has(b)),y=this.getValue(),$=kr[m],f=$r[m],{length:g}=this.toString();let w="illegal-attr";if(!($!=null&&$.has(c))&&!(f!=null&&f.has(c))&&(p==="ext-attr"?$||f:!/\{\{[^{]+\}\}/u.test(c))&&(p==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(m==="meta"||m==="link"||!Ar.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(S!=null&&S.hasAttr("itemscope"))){if(o===void 0)return!0;const b=I.lintConfig.getSeverity(w,"unknown");if(b){const v=X(u,d,w,"illegal attribute name",b);return v.suggestions=[{desc:"remove",range:[o,o+g],text:""}],v}}else if(c==="style"&&typeof y=="string"&&fn.test(y)){if(o===void 0)return!0;w="insecure-style";const b=I.lintConfig.getSeverity(w);return b&&X(h,d,w,"insecure style",b)}else if(c==="tabindex"&&typeof y=="string"&&y!=="0"){if(o===void 0)return!0;const b=I.lintConfig.getSeverity(w,"tabindex");if(b){const v=X(h,d,w,"nonzero tabindex",b);return v.suggestions=[{desc:"remove",range:[o,o+g],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],v}}else if(A&&p!=="ext-attr"){const b=br(m,c),v=String(y).toLowerCase();if(b.length>0&&b.every(k=>k!==v)){if(o===void 0)return!0;const k=I.lintConfig.getSeverity(w,"value");return k&&X(h,d,w,"illegal attribute value",k)}}else if(typeof y=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||vn.has(c))&&mn.test(y)||A&&(c==="href"||m==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(y))){if(o===void 0)return!0;const b=I.lintConfig.getSeverity(w,"value");return b&&X(h,d,w,"illegal attribute value",b)}return!1},n)}}),li,bn,ai,Es,_r=N({"src/attributes.ts"(){"use strict";var e,t,As,r;K(),he(),ce(),J(),Q(),Ue(),Jo(),li=l=>l.slice(0,-1),bn=l=>`${li(l)}-dirty`;try{ai=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{ai=/[^\W_]/u}Es=(r=class extends H{constructor(i,n,a,o,d=[]){super(void 0,o,d,{});O(this,t);O(this,e);if(R(this,e,n),this.setAttribute("name",a),i){const u=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let h="",p=u.exec(i),c=0;const m=()=>{h&&(super.insertAt(new be(h,bn(n),o,d,{})),h="")};for(;p;){const{index:S,0:A,1:y,2:$,3:f,4:g,5:w,6:b}=p;if(h+=i.slice(c,S),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(Ie(y).trim())){const v=g!=null?g:b,k=[f,w],_=new Ss(li(n),a,y,$,v,k,o,d);m(),super.insertAt(_)}else h+=A;({lastIndex:c}=u),p=u.exec(i)}h+=i.slice(c),m()}}get type(){return x(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(n=>n instanceof Ss&&(!i||n.name===vt(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){const n=this.getAttrTokens(i);return n[n.length-1]}getAttr(i){var n;return(n=this.getAttrToken(i))==null?void 0:n.getValue()}lint(i=this.getAbsoluteIndex(),n){const a=super.lint(i,n),{parentNode:o,childNodes:d}=this,u=new Map,h=new Set,p=new de(this,i),c=["no-ignored","no-duplicate"],m=["closingTag","invalidAttributes","nonWordAttributes"].map(A=>I.lintConfig.getSeverity(c[0],A));if(m[0]&&P(this,t,As).call(this)){const A=te(this,p,c[0],"attributes of a closing tag",m[0]),y=o.getAbsoluteIndex();A.suggestions=[{desc:"remove",range:[i,A.endIndex],text:""},{desc:"open",range:[y+1,y+2],text:""}],a.push(A)}for(const A of d)if(A instanceof Ss){const{name:y}=A;u.has(y)?(h.add(y),u.get(y).push(A)):u.set(y,[A])}else{const y=A.text().trim(),$=m[ai.test(y)?1:2];if(y&&$){const f=X(A,p,c[0],"containing invalid attribute",$);f.suggestions=[{desc:"remove",range:[f.startIndex,f.endIndex],text:" "}],a.push(f)}}const S=I.lintConfig.getSeverity(c[1],"attribute");if(S&&h.size>0)for(const A of h){const y=u.get(A).map($=>{const f=$.getValue();return[$,f===!0?"":f]});a.push(...y.map(([$,f],g)=>{const w=X($,p,c[1],I.msg("duplicated $1 attribute",A),S),b={desc:"remove",range:[w.startIndex,w.endIndex],text:""};return!f||y.slice(0,g).some(([,v])=>v===f)?w.fix=b:w.suggestions=[b],w}))}return a}getAttribute(i){return i==="invalid"?P(this,t,As).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${P(this,t,As).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof be?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,As=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},r)}}),ia={};ie(ia,{PreToken:()=>ra});var ra,Xo=N({"src/pre.ts"(){"use strict";Ze(),Q(),ze(),ra=class extends H{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const r=/<nowiki>/giu,l=/<\/nowiki>/giu,{length:i}=r.source;let n=r.exec(e);n&&(l.lastIndex=n.index+i);let a=l.exec(e),o=0,d="";for(;n&&a;)new pe(n[0],t,s),new pe(a[0],t,s),d+=`${e.slice(o,n.index)}\0${s.length-1}n${e.slice(n.index+i,a.index)}\0${s.length}n`,o=a.index+i+1,r.lastIndex=o,n=r.exec(e),n&&(l.lastIndex=n.index+i),a=l.exec(e);e=d+e.slice(o)}super(e,t,s,{}),this.setAttribute("stage",Se-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),Os,Cr=N({"mixin/multiLine.ts"(){"use strict";we(),Os=e=>{class t extends e{toString(r){return super.toString(r,`
|
|
1
|
+
"use strict";(()=>{var Io=Object.defineProperty;var Br=e=>{throw TypeError(e)};var To=(e,t,s)=>t in e?Io(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var No=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ke=(e,t,s)=>To(e,typeof t!="symbol"?t+"":t,s),Us=(e,t,s)=>t.has(e)||Br("Cannot "+s);var x=(e,t,s)=>(Us(e,t,"read from private field"),s?s.call(e):t.get(e)),O=(e,t,s)=>t.has(e)?Br("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),R=(e,t,s,r)=>(Us(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),P=(e,t,s)=>(Us(e,t,"access private method"),s);var Wr=(e,t,s,r)=>({set _(l){R(e,t,l,s)},get _(){return x(e,t,r)}});var Nd=No((Fd,Co)=>{var Lo=Object.create,wt=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyNames,Fo=Object.prototype.hasOwnProperty,ql=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yt=e=>{throw TypeError(e)},Bl=(e,t,s)=>t in e?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ur=(e,t)=>wt(e,"name",{value:t,configurable:!0}),N=(e,t)=>function(){return e&&(t=(0,e[mr(e)[0]])(e=0)),t},jo=(e,t)=>function(){return t||(0,e[mr(e)[0]])((t={exports:{}}).exports,t),t.exports},ie=(e,t)=>{for(var s in t)wt(e,s,{get:t[s],enumerable:!0})},Ro=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of mr(t))!Fo.call(e,l)&&l!==s&&wt(e,l,{get:()=>t[l],enumerable:!(r=Ol(t,l))||r.enumerable});return e},ee=e=>Ro(wt({},"__esModule",{value:!0}),e),re=e=>{var t;return[,,,Lo((t=e==null?void 0:e[ql("metadata")])!=null?t:null)]},Wl=["class","method","getter","setter","accessor","field","value","get","set"],Ot=e=>e!==void 0&&typeof e!="function"?yt("Function expected"):e,Po=(e,t,s,r,l)=>({kind:Wl[e],name:t,metadata:r,addInitializer:i=>s._?yt("Already initialized"):l.push(Ot(i||null))}),Ls=(e,t)=>Bl(t,ql("metadata"),e[3]),ne=(e,t,s,r)=>{for(var l=0,i=e[t>>1],n=i&&i.length;l<n;l++)t&1?i[l].call(s):r=i[l].call(s,r);return r},le=(e,t,s,r,l,i)=>{var n,a,o,d,u,h=t&7,p=!!(t&8),c=!!(t&16),m=h>3?e.length+1:h?p?1:2:0,S=Wl[h+5],A=h>3&&(e[m-1]=[]),y=e[m]||(e[m]=[]),$=h&&(!c&&!p&&(l=l.prototype),h<5&&(h>3||!c)&&Ol(h<4?l:{get[s](){return ge(this,i)},set[s](g){return Ce(this,i,g)}},s));h?c&&h<4&&Ur(i,(h>2?"set ":h>1?"get ":"")+s):Ur(l,s);for(var f=r.length-1;f>=0;f--)d=Po(h,s,o={},e[3],y),h&&(d.static=p,d.private=c,u=d.access={has:c?g=>Oo(l,g):g=>s in g},h^3&&(u.get=c?g=>(h^1?ge:ft)(g,l,h^4?i:$.get):g=>g[s]),h>2&&(u.set=c?(g,w)=>Ce(g,l,w,h^4?i:$.set):(g,w)=>g[s]=w)),a=(0,r[f])(h?h<4?c?i:$[S]:h>4?void 0:{get:$.get,set:$.set}:l,d),o._=1,h^4||a===void 0?Ot(a)&&(h>4?A.unshift(a):h?c?i=a:$[S]=a:l=a):typeof a!="object"||a===null?yt("Object expected"):(Ot(n=a.get)&&($.get=n),Ot(n=a.set)&&($.set=n),Ot(n=a.init)&&A.unshift(n));return h||Ls(e,l),$&&wt(l,s,$),c?h^4?i:$:l},Eo=(e,t,s)=>Bl(e,typeof t!="symbol"?t+"":t,s),xr=(e,t,s)=>t.has(e)||yt("Cannot "+s),Oo=(e,t)=>Object(t)!==t?yt('Cannot use the "in" operator on this value'):e.has(t),ge=(e,t,s)=>(xr(e,t,"read from private field"),s?s.call(e):t.get(e)),je=(e,t,s)=>t.has(e)?yt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ce=(e,t,s,r)=>(xr(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),ft=(e,t,s)=>(xr(e,t,"access private method"),s),qo=(e,t,s,r)=>({set _(l){Ce(e,t,l,s)},get _(){return ge(e,t,r)}}),Ul,vr,Ml=N({"base.ts"(){"use strict";Ul=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),vr=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function Xe(e){const t=new Map,s=new WeakMap;return r=>{const l=typeof r=="string"?t:s;if(l.has(r)){const n=l.get(r);return n.lastIndex=0,n}const i=e(r);return l.set(r,i),i}}var es,zl,Mr,Hl,Dl,St=N({"../common/dist/index.mjs"(){"use strict";es=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),zl=e=>Math.round(e*255).toString(16).padStart(2,"0"),Mr=(()=>{const e=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\p{N}_])`,t=String.raw`(?:\d*\.)?\d+%?`,s=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,r=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(t).join(String.raw`\s+`)}(?:\s*\/\s*${t})?`}|${String.raw`${new Array(3).fill(t).join(String.raw`\s*,\s*`)}(?:\s*,\s*${t})?`})\s*\)`,l=String.raw`hsla?\(\s*(?:${String.raw`${s}\s+${t}\s+${t}(?:\s*\/\s*${t})?`}|${String.raw`${s}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${t})?`})\s*\)`;return{full:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${e}|${r}|${l})`,"giu"),rgb:new RegExp(String.raw`(^|[^\p{L}\p{N}_])(${e}|${r})`,"giu")}})(),Hl=(e,t=!0)=>{const s=[],r=Mr[t?"full":"rgb"];r.lastIndex=0;let l=r.exec(e),i=0;for(;l;){const n=l.index+l[1].length;n>i&&s.push([e.slice(i,n),i,n,!1]),{lastIndex:i}=r,s.push([l[2],n,i,e[n-1]!=="&"||!/^#\d+$/u.test(l[2])]),l=r.exec(e)}return e.length>i&&s.push([e.slice(i),i,e.length,!1]),s},Dl=Xe}}),Be,Ms,mt,xt,vt,Re,rt,ts,Ie,Ye,zr,Hr,ss,Gl,Dr,Gr,is,bt,he=N({"util/string.ts"(){"use strict";St(),Be=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ms=String.raw`[^[\]<>"\0-\x1F\x7F${Be}\uFFFD]`,mt=String.raw`(?:\[[\da-f:.]+\]|${Ms})`,xt=String.raw`(?:${Ms}|\0\d+[cn!~]\x7F)*`,vt=e=>e.trim().toLowerCase(),Re=(e,t)=>e.replace(/\0(\d+)\x7F/gu,(s,r)=>t[r]),rt=(e,t)=>s=>s.replace(e,t),ts=rt(/[\0\x7F]|\r$/gmu,""),Ie=rt(/\0\d+[cn]\x7F/gu,""),Ye=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),zr={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Hr=rt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):zr[s.toLowerCase()]),ss=e=>Hr(e),Gl=rt(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Dr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Gr=e=>rt(e,t=>`&${Dr[t]};`),is=Gr(/[&<>]/gu),bt=(e,t={})=>{const{pre:s="",post:r="",sep:l=""}=t;return s+e.map(i=>i.print()).join(l)+r}}}),Bo=jo({"config/minimum.json"(e,t){t.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","#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:[]}}}),Se,Yi,Ze=N({"util/constants.ts"(){"use strict";Se=11,Yi=Bo()}}),de,ce=N({"lib/rect.ts"(){"use strict";var e,t,s,r,Zi,i;de=(i=class{constructor(n,a){O(this,r);O(this,e);O(this,t);O(this,s);R(this,e,n),R(this,t,a)}get start(){return x(this,t)}get top(){return P(this,r,Zi).call(this).top}get left(){return P(this,r,Zi).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakSet,Zi=function(){var n;return(n=x(this,s))!=null||R(this,s,x(this,e).getRootNode().posFromIndex(x(this,t))),x(this,s)},i)}}),Vr,Qr,Kt,rs,zs,X,te,Ke,br,K=N({"util/lint.ts"(){"use strict";we(),ce(),J(),Vr=new Set(["tr","td","th","caption"]),Qr=new Set(["Template:!!","Template:!-"]),Kt=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Qr.has(t.name)||t.is("html")&&Vr.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Kt(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(Kt);return s.includes(2)?2:s.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},rs=(e,t,s,r)=>({line:e+s-1,character:(s===1?t:0)+r}),zs=e=>(t,s,r,l,i="error")=>{const{start:n}=s,{top:a,left:o}=s instanceof de?s:new de(t,n),{offsetHeight:d,offsetWidth:u}=t,{startIndex:h,startLine:p,startCol:c}=e(t,n,a,o),{line:m,character:S}=rs(p,c,d,u);return{rule:r,message:I.msg(l),severity:i,startIndex:h,endIndex:h+t.toString().length,startLine:p,endLine:m,startCol:c,endCol:S}},X=zs((e,t,s,r)=>{const l=e.getRelativeIndex(),{top:i,left:n}=e.parentNode.posFromIndex(l);return{startIndex:t+l,startLine:s+i,startCol:i?n:r+n}}),te=zs((e,t,s,r)=>({startIndex:t,startLine:s,startCol:r})),Ke=(e,t,s,r)=>{if(e&&(r||I.viewOnly&&e[0]===ve.rev))return e[1];const l=t();return(r||I.viewOnly)&&s([ve.rev,l]),l},br=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),Jr,ys,Wo=N({"parser/selector.ts"(){"use strict";Jr=(e,t,s)=>{if(e.includes("#")){const r=e.indexOf("#");return(r===0||e.slice(0,r)===t)&&e.slice(r+1)===s}return!e||e===t},ys=(e,t,s)=>{const r=e.split(",");return({type:l,name:i})=>r.some(n=>Jr(n.trim(),l,i))}}}),Fs,wr=N({"mixin/cached.ts"(){"use strict";K(),Fs=(e=!0)=>t=>{const s=new WeakMap;return function(...r){return Ke(s.get(this),()=>t.apply(this,r),l=>{s.set(this,l)},e)}}}}),Xr,os,Ct,It,ds,Tt,Nt,Lt,us,hs,Yt,Vl=N({"lib/node.ts"(){"use strict";K(),we(),wr(),J(),Xr=[Fs(!1)],Yt=class{constructor(){ne(hs,5,this),je(this,Lt),Eo(this,"childNodes",[]),je(this,os),je(this,Ct),je(this,It),je(this,ds),je(this,Tt),je(this,Nt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return ge(this,os)}get nextSibling(){return ge(this,Ct)}get previousSibling(){return ge(this,It)}get offsetHeight(){return ft(this,Lt,us).call(this).height}get offsetWidth(){return ft(this,Lt,us).call(this).width}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":Ce(this,os,t),t||(Ce(this,Ct,void 0),Ce(this,It,void 0));break;case"nextSibling":Ce(this,Ct,t);break;case"previousSibling":Ce(this,It,t);break;case"aIndex":I.viewOnly&&Ce(this,Tt,[ve.rev,t]);break;default:this[e]=t}}getRootNode(){return Ke(ge(this,ds),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&Ce(this,ds,e)})}indexFromPos(e,t){{if(e<0||t<0)return;const s=this.getLines();if(e>=s.length)return;const[,r,l]=s[e],i=r+t;return i>l?void 0:i}this.lspError("AstNode.indexFromPos")}posFromIndex(e){const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),r=s.findIndex(([,,l])=>e<=l);return{top:r,left:e-s[r][1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return Ke(ge(this,Nt)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let r=this.getAttribute("padding");for(let l=0;l<s;l++)I.viewOnly&&(ge(this,Nt)[l]=[ve.rev,r]),r+=t[l].toString().length+this.getGaps(l);return r},t=>{ge(this,Nt)[e]=t})}getAbsoluteIndex(){return Ke(ge(this,Tt),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{Ce(this,Tt,e)})}getBoundingClientRect(){return{...ft(this,Lt,us).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}is(e){return this.type===e}getLines(){const e=[];let t=0;for(const s of String(this).split(`
|
|
2
|
+
`)){const r=t+s.length;e.push([s,t,r]),t=r+1}return e}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},hs=re(null),os=new WeakMap,Ct=new WeakMap,It=new WeakMap,ds=new WeakMap,Tt=new WeakMap,Nt=new WeakMap,Lt=new WeakSet,us=function(){const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}},le(hs,1,"getLines",Xr,Yt),Ls(hs,Yt)}}),Ql,Uo=N({"lib/element.ts"(){"use strict";var e,er,tr,r;he(),we(),Wo(),Vl(),Ql=(r=class extends Yt{constructor(){super(...arguments);O(this,e)}get length(){return this.childNodes.length}text(i){return Ye(this.childNodes,i)}normalize(){const i=this.getChildNodes(),n=a=>{var o,d;i.splice(a,1),(o=i[a-1])==null||o.setAttribute("nextSibling",i[a]),(d=i[a])==null||d.setAttribute("previousSibling",i[a-1])};for(let a=i.length-1;a>=0;a--){const{type:o,data:d}=i[a];o!=="text"||i.length===1||this.getGaps(a-(a&&1))||d===""&&n(a)}this.setAttribute("childNodes",i)}removeAt(i){return Ns(this,i,1)[0]}insertAt(i,n=this.length){return Ns(this,n,0,[i]),i}closest(i){const n=ys(i,this);let{parentNode:a}=this;for(;a;){if(n(a))return a;({parentNode:a}=a)}}querySelector(i){const n=ys(i,this);return P(this,e,er).call(this,n)}querySelectorAll(i){const n=ys(i,this);return P(this,e,tr).call(this,n)}append(...i){this.safeAppend(i)}safeAppend(i){for(const n of i)this.insertAt(n)}replaceChildren(...i){this.safeReplaceChildren(i)}safeReplaceChildren(i){for(let n=this.length-1;n>=0;n--)this.removeAt(n);this.safeAppend(i)}setText(i,n=0){n+=n<0?this.length:0;const a=this.childNodes[n],{data:o}=a;return a.replaceData(i),o}toString(i,n=""){return this.childNodes.map(a=>a.toString(i)).join(n)}caretPositionFromIndex(i){{if(i===void 0)return;const{length:n}=this.toString();if(i>n||i<-n)return;i+=i<0?n:0;let a=this,o=0,d=0;for(;a.type!=="text";){const{childNodes:u}=a;o+=a.getAttribute("padding");for(let h=0;o<=i&&h<u.length;h++){const p=u[h],{nextSibling:c}=p,m=p.toString(),S=m.length;if(p.setAttribute("aIndex",o),o+=S,o>i||o===i&&S>0&&(!c||c.type==="text"||p.type!=="text"&&(m.trim()||!c.toString().trim()))){a=p,o-=S,d=o;break}o+=a.getGaps(h)}if(a.childNodes===u)return{offsetNode:a,offset:i-d}}return{offsetNode:a,offset:i-d}}this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(i){var n;{const a=(n=this.caretPositionFromIndex(i))==null?void 0:n.offsetNode;return(a==null?void 0:a.type)==="text"?a.parentNode:a}this.lspError("AstElement.elementFromIndex")}elementFromPoint(i,n){return this.elementFromIndex(this.indexFromPos(n,i))}lint(i=this.getAbsoluteIndex(),n){const a=[];for(let o=0,d=i+this.getAttribute("padding");o<this.length;o++){const u=this.childNodes[o];u.setAttribute("aIndex",d);const h=u.lint(d,n);h.length>0&&a.push(...h),d+=u.toString().length+this.getGaps(o)}return a}print(i={}){const n=i.class;return this.toString()?(n===""?"":`<span class="wpb-${n!=null?n:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+bt(this.childNodes,i)+(n===""?"":"</span>"):""}json(i,n=this.getAbsoluteIndex()){const a={...this,type:this.type,range:[n,n+this.toString().length],childNodes:[]};for(let o=0,d=n+this.getAttribute("padding");o<this.length;o++){const u=this.childNodes[o],{length:h}=u.toString();u.setAttribute("aIndex",d),a.childNodes.push(u.type==="text"?{data:u.data,range:[d,d+h]}:u.json(void 0,d)),d+=h+this.getGaps(o)}return a}},e=new WeakSet,er=function(i){var n;for(const a of this.childNodes){if(a.type==="text")continue;if(i(a))return a;const o=P(n=a,e,er).call(n,i);if(o)return o}},tr=function(i,n=[]){var a;for(const o of this.childNodes)o.type!=="text"&&(i(o)&&n.push(o),P(a=o,e,tr).call(a,i,n));return n},r)}}),cs,Hs,Kr,Yr,Zr,en,Ds,Gs,sr,Mo=N({"lib/text.ts"(){"use strict";var e,Jl,s;he(),K(),J(),Vl(),cs=String.raw`[${Be}\t]*`,Hs=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${cs}\d)|isbn(?=[-::]?${cs}(?:\d(?:${cs}|-)){6})`,Kr=new RegExp(String.raw`${Hs}|https?[:/]/+`,"giu"),Yr=new RegExp(Hs,"giu"),Zr=new Set(["attr-value","ext-link-text","link-text"]),en={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ds=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"]);try{Gs=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{Gs=/\w/u}sr=(s=class extends Yt{constructor(l){super();O(this,e);ke(this,"data","");this.data=l}get type(){return"text"}toString(l){var i;return l&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?Ie(this.data):this.data}text(){return this.data}lint(l=this.getAbsoluteIndex(),i){var _,C,E;if(i===!1)return[];const{data:n,parentNode:a,nextSibling:o,previousSibling:d}=this;if(!a)throw new Error("An isolated text node cannot be linted!");const{type:u,name:h,parentNode:p}=a;if(u==="attr-value"){const{name:T,tag:L}=p;if(L==="ref"&&(T==="name"||T==="extends"||T==="follow")||T==="group"&&(L==="ref"||L==="references")||L==="choose"&&(T==="before"||T==="after"))return[]}if(i!=null||(i=u==="free-ext-link"||u==="ext-link-url"||u==="ext-link-text"||u==="image-parameter"&&h==="link"||u==="attr-value"?Yr:Kr),n.search(i)===-1)return[];i.lastIndex=0;const c=[],m=o==null?void 0:o.type,S=o==null?void 0:o.name,A=d==null?void 0:d.type,y=this.getRootNode(),$=y.toString(),{ext:f,html:g,variants:w}=y.getAttribute("config"),{top:b,left:v}=y.posFromIndex(l),k=new Set(["onlyinclude","noinclude","includeonly",...f,...g[0],...g[1],...g[2],...Ds]);for(let T=i.exec(n);T;T=i.exec(n)){const[,L,B]=T;let{index:j,0:F}=T;if(B&&B!=="]"){const{length:z}=B;j+=z,F=F.slice(z)}F=F.toLowerCase();const[U]=F,W=U==="r"||U==="p"||U==="i",q=U==="{",M=U==="}",D=U==="[",G=U==="]";let{length:Z}=F;if(U==="<"&&!k.has(L.toLowerCase())||D&&u==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(j+1))||o!=null&&o.is("ext")&&S==="nowiki"&&((_=o.innerText)!=null&&_.includes("]")))||W&&(!a.isPlain()||Zr.has(u)))continue;G&&(j||Z>1)&&i.lastIndex--;let Y=l+j,se=Y+Z,ue,Ae;const Le=$[se],it=$[Y-1],V=q||D,oe=q&&it==="-"&&w.length>0,me=M&&Le==="-"&&w.length>0,xe=D&&m==="free-ext-link"&&!n.slice(j+1).trim()||G&&A==="free-ext-link"&&!n.slice(0,j).includes("]");if(W)ue="lonely-http",F=F.toUpperCase(),Ae=I.lintConfig.getSeverity(ue,F);else if(U==="<"){ue="tag-like";let z;/^<\s/u.test(F)||!/[\s/>]/u.test(Le!=null?Le:"")?z="invalid":Ds.has(L)&&(z="disallowed"),Ae=I.lintConfig.getSeverity(ue,z)}else if(oe||me)ue="lonely-bracket",Ae=I.lintConfig.getSeverity(ue,"converter"),oe&&j>0?(F="-{",j--,Y--,Z=2):me&&j<n.length-1&&(F="}-",se++,Z=2);else if(xe)ue="lonely-bracket",Ae=I.lintConfig.getSeverity(ue,"extLink");else if(V||M||G)if(ue="lonely-bracket",Z>1||q&&Le===U||M&&it===U)Ae=I.lintConfig.getSeverity(ue,"double");else{if(!D||u!=="ext-link-text"){const z=en[U],Ee=V?n.slice(j+1):n.slice(0,j);if(q&&((C=z.exec(Ee))==null?void 0:C[0])==="}"||M&&((E=z.exec(Ee))==null?void 0:E[0])==="{")continue;if(!Ee.includes(U)){const _t=V?"nextSibling":"previousSibling";let De=this[_t];for(;De&&(De.type!=="text"||!z.test(De.data));)De=De[_t];if(De&&z.exec(De.data)[0]!==U)continue}}Ae=I.lintConfig.getSeverity(ue,"single")}else ue="lonely-http",Ae=I.lintConfig.getSeverity(ue);if(!Ae)continue;const $e=this.posFromIndex(j),{line:He,character:ye}=rs(b,v,$e.top+1,$e.left),Fe={rule:ue,message:I.msg('lonely "$1"',W||U==="h"||oe||me?F:U),severity:Ae,startIndex:Y,endIndex:se,startLine:He,endLine:He,startCol:ye,endCol:ye+Z};if(U==="<")Fe.suggestions=[{desc:"escape",range:[Y,Y+1],text:"<"}];else if(U==="h"&&u!=="link-text"&&Gs.test(it||""))Fe.suggestions=[{desc:"whitespace",range:[Y,Y],text:" "}];else if(D&&u==="ext-link-text"){const z=a.getAbsoluteIndex()+a.toString().length;Fe.suggestions=[{desc:"escape",range:[z,z+1],text:"]"}]}else if(G&&xe){const z=l-d.toString().length;Fe.suggestions=[{desc:"left bracket",range:[z,z],text:"["}]}else W&&(Fe.suggestions=[...T[0]===F?[]:[{desc:"uppercase",range:[Y,se],text:F}],...Le===":"||Le===":"?[{desc:"whitespace",range:[se,se+1],text:" "}]:[]]);c.push(Fe)}return c}replaceData(l){P(this,e,Jl).call(this,l)}print(){return is(this.data)}},e=new WeakSet,Jl=function(l){this.setAttribute("data",l)},s)}}),et,At=N({"mixin/hidden.ts"(){"use strict";we(),et=(e=!0,t=!0)=>s=>{class r extends s{text(){return""}lint(i){return e?[]:super.lint(i)}}return kt(r,s),r}}}),tt,$t=N({"src/syntax.ts"(){"use strict";var e,t;Q(),tt=(t=class extends H{constructor(r,l,i,n,a){super(r,i,n,a);O(this,e);R(this,e,l)}get type(){return x(this,e)}lint(r=this.getAbsoluteIndex()){return super.lint(r,!1)}},e=new WeakMap,t)}}),Pe,We=N({"mixin/padded.ts"(){"use strict";we(),Pe=({length:e})=>t=>{class s extends t{getAttribute(l){return l==="padding"?e:super.getAttribute(l)}}return kt(s,t),s}}}),be,Ue=N({"src/atom.ts"(){"use strict";var e,t;Q(),be=(t=class extends H{constructor(r,l,i,n,a){super(r,i,n,a);O(this,e);R(this,e,l)}get type(){return x(this,e)}set type(r){R(this,e,r)}getAttribute(r){var l;return r==="invalid"?this.type==="converter-flag"&&!!((l=this.parentNode)!=null&&l.isInvalidFlag(this)):super.getAttribute(r)}},e=new WeakMap,t)}}),tn,sn,Vs,rn,qe,js=N({"src/link/base.ts"(){"use strict";var e,t,s,r;K(),Ze(),he(),ce(),We(),J(),Q(),Ue(),tn=l=>l==="redirect-target"||l==="link",sn=[Pe("[[")],qe=(r=class extends(rn=H){constructor(i,n,a,o=[],d="|"){super(void 0,a,o,{});O(this,e,!0);O(this,t);O(this,s);if(this.insertAt(new be(i,"link-target",a,o,{})),n!==void 0){const u=new H(n,a,o,{});u.type="link-text",u.setAttribute("stage",Se-1),this.insertAt(u)}R(this,t,d)}get link(){return x(this,s)}get fragment(){return x(this,s).fragment}afterBuild(){R(this,s,this.getTitle()),x(this,t).includes("\0")&&R(this,t,this.buildFromStr(x(this,t),0)),this.setAttribute("name",x(this,s).title),super.afterBuild()}setAttribute(i,n){i==="bracket"?R(this,e,n):i==="title"?R(this,s,n):super.setAttribute(i,n)}toString(i){const n=super.toString(i,x(this,t));return x(this,e)?`[[${n}]]`:n}text(){const i=super.text("|");return x(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?x(this,s):super.getAttribute(i)}getGaps(i){return i===0?x(this,t).length:1}lint(i=this.getAbsoluteIndex(),n){const a=super.lint(i,n),{childNodes:[o,d],type:u}=this,{encoded:h,fragment:p}=x(this,s),c=new de(this,i);let m="unknown-page",S=I.lintConfig.getSeverity(m);if(S&&o.childNodes.some(({type:A})=>A==="template")&&a.push(X(o,c,m,"template in an internal link target",S)),m="url-encoding",S=I.lintConfig.getSeverity(m),S&&h){const A=X(o,c,m,"unnecessary URL encoding in an internal link",S);A.fix={desc:"decode",range:[A.startIndex,A.endIndex],text:es(o.text())},a.push(A)}if(m="pipe-like",S=I.lintConfig.getSeverity(m,"link"),S&&(u==="link"||u==="category")){const A=d==null?void 0:d.childNodes.findIndex($=>$.type==="text"&&$.data.includes("|")),y=d==null?void 0:d.childNodes[A];if(y){const $=X(d,c,m,'additional "|" in the link text',S),f=$.startIndex+d.getRelativeIndex(A);$.suggestions=[{desc:"escape",range:[f,f+y.data.length],text:y.data.replace(/\|/gu,"|")}],a.push($)}}if(m="no-ignored",S=I.lintConfig.getSeverity(m,"fragment"),S&&p!==void 0&&!tn(u)){const A=X(o,c,m,"useless fragment",S),y=o.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),$=o.childNodes[y];$&&(A.fix={desc:"remove",range:[A.startIndex+o.getRelativeIndex(y)+$.data.indexOf("#"),A.endIndex],text:""}),a.push(A)}return a}getTitle(i,n){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:n,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(x(this,e)?{pre:"[[",post:"]]",sep:x(this,t)}:{sep:x(this,t)})}json(i,n=this.getAbsoluteIndex()){const a=super.json(void 0,n),{type:o,fragment:d}=this;return d!==void 0&&(o==="link"||o==="redirect-target")&&(a.fragment=d),a}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r),Vs=re(rn),qe=le(Vs,0,"LinkBaseToken",sn,qe),ne(Vs,1,qe)}}),Me,st=N({"src/nowiki/base.ts"(){"use strict";Q(),Me=class extends H{get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}}}}),nn,Qs,ln,pe,ze=N({"src/nowiki/noinclude.ts"(){"use strict";At(),st(),nn=[et()],pe=class extends(ln=Me){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Qs=re(ln),pe=le(Qs,0,"NoincludeToken",nn,pe),ne(Qs,1,pe)}}),Xl,zo=N({"src/link/redirectTarget.ts"(){"use strict";K(),J(),js(),ze(),Xl=class extends qe{get type(){return"redirect-target"}constructor(e,t,s,r){super(e,void 0,s,r),t!==void 0&&this.insertAt(new pe(t,s,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){const t=super.lint(e,!1),s="no-ignored",r=I.lintConfig.getSeverity(s,"redirect");if(r&&this.length===2){const l=X(this.lastChild,{start:e},s,"useless link text",r);l.startIndex--,l.startCol--,l.fix={desc:"remove",range:[l.startIndex,l.endIndex],text:""},t.push(l)}return t}}}}),an,Js,on,qt,Ho=N({"src/redirect.ts"(){"use strict";var e,t,s;At(),Q(),$t(),zo(),an=[et(!1,!1)],qt=(s=class extends(on=H){constructor(l,i,n,a,o,d,u=[]){super(void 0,d,u);O(this,e);O(this,t);R(this,e,l),R(this,t,o),this.append(new tt(i,"redirect-syntax",d,u),new Xl(n,a==null?void 0:a.slice(1),d,u))}get type(){return"redirect"}getAttribute(l){return l==="padding"?x(this,e).length:super.getAttribute(l)}toString(l){return x(this,e)+super.toString(l)+x(this,t)}lint(l=this.getAbsoluteIndex()){const i=l+x(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",i),this.lastChild.lint(i)}print(){return super.print({pre:x(this,e),post:x(this,t)})}},e=new WeakMap,t=new WeakMap,s),Js=re(on),qt=le(Js,0,"RedirectToken",an,qt),ne(Js,1,qt)}}),Kl={};ie(Kl,{parseRedirect:()=>Yl});var Yl,Do=N({"parser/redirect.ts"(){"use strict";J(),Ho(),Yl=(e,t,s)=>{var l;(l=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const r=t.regexRedirect.exec(e);return r&&I.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(r[0].length)}`,new qt(...r.slice(1),t,s),e):!1}}}),dn,Xs,un,Bt,Go=N({"src/onlyinclude.ts"(){"use strict";We(),Q(),dn=[Pe("<onlyinclude>")],Bt=class extends(un=H){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Xs=re(un),Bt=le(Xs,0,"OnlyincludeToken",dn,Bt),ne(Xs,1,Bt)}}),ls,Rs=N({"mixin/gapped.ts"(){"use strict";we(),ls=(e=1)=>t=>{class s extends t{getGaps(){return e}}return kt(s,t),s}}}),hn,Ks,cn,Je,yr=N({"src/tagPair/index.ts"(){"use strict";var e,t;Rs(),Q(),hn=[ls()],Je=(t=class extends(cn=H){constructor(r,l,i,n,a,o=[]){super(void 0,a);O(this,e);ke(this,"closed");ke(this,"selfClosing");this.setAttribute("name",r.toLowerCase()),R(this,e,[r,n||r]),this.closed=n!=="",this.selfClosing=n===void 0,this.append(l,i);const d=typeof l=="string"?-1:o.indexOf(l);o.splice(d===-1?1/0:d,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(r){const{selfClosing:l,firstChild:i,lastChild:n}=this,[a,o]=x(this,e);return l?`<${a}${i.toString(r)}/>`:`<${a}${i.toString(r)}>${n.toString(r)}${this.closed?`</${o}>`:""}`}text(){const[r,l]=x(this,e);return this.selfClosing?`<${r}${this.firstChild.text()}/>`:`<${r}${super.text(">")}${this.closed?`</${l}>`:""}`}getAttribute(r){return r==="padding"?x(this,e)[0].length+1:super.getAttribute(r)}print(){const[r,l]=x(this,e);return super.print(this.selfClosing?{pre:`<${r}`,post:"/>"}:{pre:`<${r}`,sep:">",post:this.closed?`</${l}>`:""})}},e=new WeakMap,t),Ks=re(cn),Je=le(Ks,0,"TagPairToken",hn,Je),ne(Ks,1,Je)}}),Zl,Vo=N({"src/tagPair/translate.ts"(){"use strict";var e,ea,s;Q(),yr(),$t(),ze(),Zl=(s=class extends Je{constructor(l,i,n,a=[]){const o=new tt(l,"translate-attr",n,a);i=i==null?void 0:i.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(u,h,p,c)=>(new pe(h,n,a),new pe(c,n,a),`\0${a.length-1}n${p}\0${a.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(u,h,p,c,m)=>(new pe(h,n,a),new pe(m,n,a),`\0${a.length-1}n${c}\0${a.length}n`));const d=new H(i,n,a);d.type="translate-inner";super("translate",o,d,"translate",n,a);O(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(l){return l?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${P(this,e,ea).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,ea=function(){return this.firstChild.toString()===" nowrap"},s)}}),gn,Ys,pn,Wt,Qo=N({"src/tagPair/include.ts"(){"use strict";K(),ce(),At(),J(),yr(),gn=[et(!1)],Wt=class extends(pn=Je){get type(){return"include"}constructor(e,t="",s,r,l,i){super(e,t,s!=null?s:"",s===void 0||r!=null?r:"",l,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){const t=[],{firstChild:s,closed:r,name:l}=this,i=new de(this,e),n=["no-ignored","unclosed-comment"],a=n.map(o=>I.lintConfig.getSeverity(o,"include"));if(a[0]&&s.data.trim()){const o=X(s,i,n[0],"useless attribute",a[0]);o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],t.push(o)}if(a[1]&&!r){const o=te(this,i,n[1],I.msg("unclosed $1",`<${l}>`),a[1]);o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${l}>`}],t.push(o)}return t}},Ys=re(pn),Wt=le(Ys,0,"IncludeToken",gn,Wt),ne(Ys,1,Wt)}}),Ps,Sr=N({"mixin/attributesParent.ts"(){"use strict";we(),Ps=(e=0)=>t=>{var r,ir;class s extends t{constructor(){super(...arguments);O(this,r)}hasAttr(a){return P(this,r,ir).call(this).hasAttr(a)}getAttr(a){return P(this,r,ir).call(this).getAttr(a)}}return r=new WeakSet,ir=function(){return this.childNodes[e]},kt(s,t),s}}}),ae,Zs,ei,Ft,gs,ti,Ge,si,ii,ri,ps,ni,Te,Ar,$r,kr,ta,sa=N({"util/sharable.ts"(){"use strict";ae=new Set(["align"]),Zs=new Set(["cite"]),ei=new Set(["cite","datetime"]),Ft=new Set(["width"]),gs=new Set(["axis","align","bgcolor","height","width","valign"]),ti=new Set([...gs,"abbr","headers","scope","rowspan","colspan"]),Ge=new Set(["type"]),si=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ii=new Set(["clear"]),ri=new Set(["bgcolor","align","valign"]),ps=new Set(["qid","forcemathmode","type","display"]),ni=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Te=new Set,Ar=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"]),$r={div:ae,h1:ae,h2:ae,h3:ae,h4:ae,h5:ae,h6:ae,blockquote:Zs,q:Zs,p:ae,br:ii,pre:Ft,ins:ei,del:ei,ul:Ge,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...si,"border"]),caption:ae,tr:ri,td:ti,th:ti,font:new Set(["size","color","face"]),hr:Ft,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ge,poem:ae,categorytree:ae,combooption:ae,math:Te,chem:Te,ce:Te,img:new Set(["alt","src","width","height","loading"])},kr={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:Te,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:Te,inputbox:Te,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Te,poll:new Set(["id","show-results-before-voting"]),sm2:Ge,flashmp3:Ge,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([...ps,"chem"]),chem:ps,ce:ps,hiero:Te,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ni,syntaxhighlight:ni,templatedata:Te,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Te},ta={table:si,td:new Set([...gs,"scope"]),th:gs,br:ii,caption:ae,div:ae,hr:Ft,h1:ae,h2:ae,h3:ae,h4:ae,h5:ae,h6:ae,li:Ge,p:ae,pre:Ft,tr:ri,ul:Ge}}}),fn,mn,xn,vn,Ss,Jo=N({"src/attribute.ts"(){"use strict";var e,t,s,r,l,rr,n;K(),he(),Ze(),sa(),ce(),J(),Q(),Ue(),fn=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,mn=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,xn=new Set(["ext","arg","magic-word","template"]),vn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Ss=(n=class extends H{constructor(o,d,u,h="",p,c=[],m=I.getConfig(),S=[]){const A=new be(u,"attr-key",m,S);let y;if(u==="title"||d==="img"&&u==="alt")y=new H(p,m,S,{}),y.type="attr-value",y.setAttribute("stage",Se-1);else if(d==="gallery"&&u==="caption"||d==="choose"&&(u==="before"||u==="after")||d==="img"&&u==="src"&&(p!=null&&p.includes("{{"))){const $={...m,excludes:[...m.excludes,"heading","html","table","hr","list"]};y=new H(p,$,S,{}),y.type="attr-value",y.setAttribute("stage",1)}else y=new be(p,"attr-value",m,S,{});super(void 0,m,S);O(this,l);O(this,e);O(this,t);O(this,s);O(this,r);R(this,e,o),this.append(A,y),R(this,s,h),R(this,r,[...c]),R(this,t,d),this.setAttribute("name",vt(Ie(u)))}get type(){return x(this,e)}get tag(){return x(this,t)}get balanced(){return!x(this,s)||x(this,r)[0]===x(this,r)[1]}afterBuild(){x(this,s).includes("\0")&&R(this,s,this.buildFromStr(x(this,s),0)),this.parentNode&&R(this,t,this.parentNode.name),this.setAttribute("name",vt(this.firstChild.text())),super.afterBuild()}toString(o){const[d="",u=""]=x(this,r);return x(this,s)?super.toString(o,x(this,s)+d)+u:this.firstChild.toString(o)}text(){return x(this,s)?`${super.text(`${x(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var o,d;return x(this,s)?x(this,s).length+((d=(o=x(this,r)[0])==null?void 0:o.length)!=null?d:0):0}lint(o=this.getAbsoluteIndex(),d){var g;const u=super.lint(o,d),{balanced:h,firstChild:p,lastChild:c,name:m,tag:S}=this,A=new de(this,o),y=["unclosed-quote","obsolete-attr"],$=y.map(w=>I.lintConfig.getSeverity(w,m));if($[0]&&!h){const w=X(c,A,y[0],I.msg("unclosed $1","quotes"),$[0]);w.startIndex--,w.startCol--,w.suggestions=[{desc:"close",range:[w.endIndex,w.endIndex],text:x(this,r)[0]}],u.push(w)}const f=P(this,l,rr).call(this,o,A);return f&&u.push(f),$[1]&&((g=ta[S])!=null&&g.has(m))&&u.push(X(p,A,y[1],"obsolete attribute",$[1])),u}getValue(){return x(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}getAttribute(o){return o==="invalid"?P(this,l,rr).call(this):super.getAttribute(o)}print(){const[o="",d=""]=x(this,r);return x(this,s)?super.print({sep:is(x(this,s))+o,post:d}):super.print()}json(o,d=this.getAbsoluteIndex()){const u=super.json(void 0,d);return u.tag=this.tag,u}},e=new WeakMap,t=new WeakMap,s=new WeakMap,r=new WeakMap,l=new WeakSet,rr=function(o,d){const{firstChild:u,lastChild:h,type:p,name:c,tag:m,parentNode:S}=this,A=!h.childNodes.some(({type:b})=>xn.has(b)),y=this.getValue(),$=kr[m],f=$r[m],{length:g}=this.toString();let w="illegal-attr";if(!($!=null&&$.has(c))&&!(f!=null&&f.has(c))&&(p==="ext-attr"?$||f:!/\{\{[^{]+\}\}/u.test(c))&&(p==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(m==="meta"||m==="link"||!Ar.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(S!=null&&S.hasAttr("itemscope"))){if(o===void 0)return!0;const b=I.lintConfig.getSeverity(w,"unknown");if(b){const v=X(u,d,w,"illegal attribute name",b);return v.suggestions=[{desc:"remove",range:[o,o+g],text:""}],v}}else if(c==="style"&&typeof y=="string"&&fn.test(y)){if(o===void 0)return!0;w="insecure-style";const b=I.lintConfig.getSeverity(w);return b&&X(h,d,w,"insecure style",b)}else if(c==="tabindex"&&typeof y=="string"&&y!=="0"){if(o===void 0)return!0;const b=I.lintConfig.getSeverity(w,"tabindex");if(b){const v=X(h,d,w,"nonzero tabindex",b);return v.suggestions=[{desc:"remove",range:[o,o+g],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],v}}else if(A&&p!=="ext-attr"){const b=br(m,c),v=String(y).toLowerCase();if(b.length>0&&b.every(k=>k!==v)){if(o===void 0)return!0;const k=I.lintConfig.getSeverity(w,"value");return k&&X(h,d,w,"illegal attribute value",k)}}else if(typeof y=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||vn.has(c))&&mn.test(y)||A&&(c==="href"||m==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(y))){if(o===void 0)return!0;const b=I.lintConfig.getSeverity(w,"value");return b&&X(h,d,w,"illegal attribute value",b)}return!1},n)}}),li,bn,ai,Es,_r=N({"src/attributes.ts"(){"use strict";var e,t,As,r;K(),he(),ce(),J(),Q(),Ue(),Jo(),li=l=>l.slice(0,-1),bn=l=>`${li(l)}-dirty`;try{ai=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{ai=/[^\W_]/u}Es=(r=class extends H{constructor(i,n,a,o,d=[]){super(void 0,o,d,{});O(this,t);O(this,e);if(R(this,e,n),this.setAttribute("name",a),i){const u=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let h="",p=u.exec(i),c=0;const m=()=>{h&&(super.insertAt(new be(h,bn(n),o,d,{})),h="")};for(;p;){const{index:S,0:A,1:y,2:$,3:f,4:g,5:w,6:b}=p;if(h+=i.slice(c,S),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(Ie(y).trim())){const v=g!=null?g:b,k=[f,w],_=new Ss(li(n),a,y,$,v,k,o,d);m(),super.insertAt(_)}else h+=A;({lastIndex:c}=u),p=u.exec(i)}h+=i.slice(c),m()}}get type(){return x(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(n=>n instanceof Ss&&(!i||n.name===vt(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){const n=this.getAttrTokens(i);return n[n.length-1]}getAttr(i){var n;return(n=this.getAttrToken(i))==null?void 0:n.getValue()}lint(i=this.getAbsoluteIndex(),n){const a=super.lint(i,n),{parentNode:o,childNodes:d}=this,u=new Map,h=new Set,p=new de(this,i),c=["no-ignored","no-duplicate"],m=["closingTag","invalidAttributes","nonWordAttributes"].map(A=>I.lintConfig.getSeverity(c[0],A));if(m[0]&&P(this,t,As).call(this)){const A=te(this,p,c[0],"attributes of a closing tag",m[0]),y=o.getAbsoluteIndex();A.suggestions=[{desc:"remove",range:[i,A.endIndex],text:""},{desc:"open",range:[y+1,y+2],text:""}],a.push(A)}for(const A of d)if(A instanceof Ss){const{name:y}=A;u.has(y)?(h.add(y),u.get(y).push(A)):u.set(y,[A])}else{const y=A.text().trim(),$=m[ai.test(y)?1:2];if(y&&$){const f=X(A,p,c[0],"containing invalid attribute",$);f.suggestions=[{desc:"remove",range:[f.startIndex,f.endIndex],text:" "}],a.push(f)}}const S=I.lintConfig.getSeverity(c[1],"attribute");if(S&&h.size>0)for(const A of h){const y=u.get(A).map($=>{const f=$.getValue();return[$,f===!0?"":f]});a.push(...y.map(([$,f],g)=>{const w=X($,p,c[1],I.msg("duplicated $1 attribute",A),S),b={desc:"remove",range:[w.startIndex,w.endIndex],text:""};return!f||y.slice(0,g).some(([,v])=>v===f)?w.fix=b:w.suggestions=[b],w}))}return a}getAttribute(i){return i==="invalid"?P(this,t,As).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${P(this,t,As).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof be?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,As=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},r)}}),ia={};ie(ia,{PreToken:()=>ra});var ra,Xo=N({"src/pre.ts"(){"use strict";Ze(),Q(),ze(),ra=class extends H{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const r=/<nowiki>/giu,l=/<\/nowiki>/giu,{length:i}=r.source;let n=r.exec(e);n&&(l.lastIndex=n.index+i);let a=l.exec(e),o=0,d="";for(;n&&a;)new pe(n[0],t,s),new pe(a[0],t,s),d+=`${e.slice(o,n.index)}\0${s.length-1}n${e.slice(n.index+i,a.index)}\0${s.length}n`,o=a.index+i+1,r.lastIndex=o,n=r.exec(e),n&&(l.lastIndex=n.index+i),a=l.exec(e);e=d+e.slice(o)}super(e,t,s,{}),this.setAttribute("stage",Se-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),Os,Cr=N({"mixin/multiLine.ts"(){"use strict";we(),Os=e=>{class t extends e{toString(r){return super.toString(r,`
|
|
3
3
|
`)}text(){return super.text(`
|
|
4
4
|
`).replace(/\n\s*\n/gu,`
|
|
5
5
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
package/bundle/bundle.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";(()=>{var zo=Object.defineProperty;var pn=e=>{throw TypeError(e)};var Ho=(e,t,s)=>t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Do=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Se=(e,t,s)=>Ho(e,typeof t!="symbol"?t+"":t,s),Ss=(e,t,s)=>t.has(e)||pn("Cannot "+s);var f=(e,t,s)=>(Ss(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),L=(e,t,s,n)=>(Ss(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),j=(e,t,s)=>(Ss(e,t,"access private method"),s);var fn=(e,t,s,n)=>({set _(l){L(e,t,l,s)},get _(){return f(e,t,n)}});var Ga=Do((Qa,Uo)=>{var Go=Object.create,st=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,zi=Object.getOwnPropertyNames,Vo=Object.prototype.hasOwnProperty,sl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),it=e=>{throw TypeError(e)},il=(e,t,s)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,xn=(e,t)=>st(e,"name",{value:t,configurable:!0}),T=(e,t)=>function(){return e&&(t=(0,e[zi(e)[0]])(e=0)),t},Qo=(e,t)=>function(){return t||(0,e[zi(e)[0]])((t={exports:{}}).exports,t),t.exports},Y=(e,t)=>{for(var s in t)st(e,s,{get:t[s],enumerable:!0})},Jo=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of zi(t))!Vo.call(e,l)&&l!==s&&st(e,l,{get:()=>t[l],enumerable:!(n=tl(t,l))||n.enumerable});return e},G=e=>Jo(st({},"__esModule",{value:!0}),e),Z=e=>{var t;return[,,,Go((t=e==null?void 0:e[sl("metadata")])!=null?t:null)]},nl=["class","method","getter","setter","accessor","field","value","get","set"],ft=e=>e!==void 0&&typeof e!="function"?it("Function expected"):e,Xo=(e,t,s,n,l)=>({kind:nl[e],name:t,metadata:n,addInitializer:i=>s._?it("Already initialized"):l.push(ft(i||null))}),os=(e,t)=>il(t,sl("metadata"),e[3]),ee=(e,t,s,n)=>{for(var l=0,i=e[t>>1],r=i&&i.length;l<r;l++)t&1?i[l].call(s):n=i[l].call(s,n);return n},te=(e,t,s,n,l,i)=>{var r,o,a,h,d,u=t&7,g=!!(t&8),c=!!(t&16),p=u>3?e.length+1:u?g?1:2:0,v=nl[u+5],m=u>3&&(e[p-1]=[]),x=e[p]||(e[p]=[]),b=u&&(!c&&!g&&(l=l.prototype),u<5&&(u>3||!c)&&tl(u<4?l:{get[s](){return de(this,i)},set[s](y){return fe(this,i,y)}},s));u?c&&u<4&&xn(i,(u>2?"set ":u>1?"get ":"")+s):xn(l,s);for(var w=n.length-1;w>=0;w--)h=Xo(u,s,a={},e[3],x),u&&(h.static=g,h.private=c,d=h.access={has:c?y=>Yo(l,y):y=>s in y},u^3&&(d.get=c?y=>(u^1?de:It)(y,l,u^4?i:b.get):y=>y[s]),u>2&&(d.set=c?(y,A)=>fe(y,l,A,u^4?i:b.set):(y,A)=>y[s]=A)),o=(0,n[w])(u?u<4?c?i:b[v]:u>4?void 0:{get:b.get,set:b.set}:l,h),a._=1,u^4||o===void 0?ft(o)&&(u>4?m.unshift(o):u?c?i=o:b[v]=o:l=o):typeof o!="object"||o===null?it("Object expected"):(ft(r=o.get)&&(b.get=r),ft(r=o.set)&&(b.set=r),ft(r=o.init)&&m.unshift(r));return u||os(e,l),b&&st(l,s,b),c?u^4?i:b:l},Ko=(e,t,s)=>il(e,typeof t!="symbol"?t+"":t,s),Hi=(e,t,s)=>t.has(e)||it("Cannot "+s),Yo=(e,t)=>Object(t)!==t?it('Cannot use the "in" operator on this value'):e.has(t),de=(e,t,s)=>(Hi(e,t,"read from private field"),s?s.call(e):t.get(e)),Ae=(e,t,s)=>t.has(e)?it("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),fe=(e,t,s,n)=>(Hi(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),It=(e,t,s)=>(Hi(e,t,"access private method"),s),Zo=(e,t,s,n)=>({set _(l){fe(e,t,l,s)},get _(){return de(e,t,n)}}),rl,Di,ll=T({"base.ts"(){"use strict";rl=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),Di=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function Ke(e){const t=new Map,s=new WeakMap;return n=>{const l=typeof n=="string"?t:s;if(l.has(n)){const r=l.get(n);return r.lastIndex=0,r}const i=e(n);return l.set(n,i),i}}var Nt,ol,Et=T({"../common/dist/index.mjs"(){"use strict";Nt=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),ol=Ke}}),Ce,As,Ye,Ze,et,ke,He,al,me,Be,mn,vn,Lt,dl,bn,wn,Ft,tt,oe=T({"util/string.ts"(){"use strict";Et(),Ce=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,As=String.raw`[^[\]<>"\0-\x1F\x7F${Ce}\uFFFD]`,Ye=String.raw`(?:\[[\da-f:.]+\]|${As})`,Ze=String.raw`(?:${As}|\0\d+[cn!~]\x7F)*`,et=e=>e.trim().toLowerCase(),ke=(e,t)=>e.replace(/\0(\d+)\x7F/gu,(s,n)=>t[n]),He=(e,t)=>s=>s.replace(e,t),al=He(/[\0\x7F]|\r$/gmu,""),me=He(/\0\d+[cn]\x7F/gu,""),Be=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),mn={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},vn=He(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):mn[s.toLowerCase()]),Lt=e=>vn(e),dl=He(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),bn={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},wn=e=>He(e,t=>`&${bn[t]};`),Ft=wn(/[&<>]/gu),tt=(e,t={})=>{const{pre:s="",post:n="",sep:l=""}=t;return s+e.map(i=>i.print()).join(l)+n}}}),ea=Qo({"config/minimum.json"(e,t){t.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","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),xe,Ci,qe=T({"util/constants.ts"(){"use strict";xe=11,Ci=ea()}}),le,ae=T({"lib/rect.ts"(){"use strict";var e,t,s,n,Ii,i;le=(i=class{constructor(r,o){N(this,n);N(this,e);N(this,t);N(this,s);L(this,e,r),L(this,t,o)}get start(){return f(this,t)}get top(){return j(this,n,Ii).call(this).top}get left(){return j(this,n,Ii).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakSet,Ii=function(){var r;return(r=f(this,s))!=null||L(this,s,f(this,e).getRootNode().posFromIndex(f(this,t))),f(this,s)},i)}}),yn,Sn,Tt,Ni,ks,R,V,Oe,hl,M=T({"util/lint.ts"(){"use strict";pe(),ae(),B(),yn=new Set(["tr","td","th","caption"]),Sn=new Set(["Template:!!","Template:!-"]),Tt=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Sn.has(t.name)||t.is("html")&&yn.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Tt(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(Tt);return s.includes(2)?2:s.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Ni=(e,t,s,n)=>({line:e+s-1,character:(s===1?t:0)+n}),ks=e=>(t,s,n,l,i="error")=>{const{start:r}=s,{top:o,left:a}=s instanceof le?s:new le(t,r),{offsetHeight:h,offsetWidth:d}=t,{startIndex:u,startLine:g,startCol:c}=e(t,r,o,a),{line:p,character:v}=Ni(g,c,h,d);return{rule:n,message:_.msg(l),severity:i,startIndex:u,endIndex:u+t.toString().length,startLine:g,endLine:p,startCol:c,endCol:v}},R=ks((e,t,s,n)=>{const l=e.getRelativeIndex(),{top:i,left:r}=e.parentNode.posFromIndex(l);return{startIndex:t+l,startLine:s+i,startCol:i?r:n+r}}),V=ks((e,t,s,n)=>({startIndex:t,startLine:s,startCol:n})),Oe=(e,t,s,n)=>{if(e&&(n||_.viewOnly&&e[0]===ve.rev))return e[1];const l=t();return(n||_.viewOnly)&&s([ve.rev,l]),l},hl=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),An,Xt,ta=T({"parser/selector.ts"(){"use strict";An=(e,t,s)=>{if(e.includes("#")){const[n,...l]=e.split("#");return(!n||n===t)&&l.every(i=>i===s)}return!e||e===t},Xt=(e,t,s)=>({type:n,name:l})=>e.split(",").some(i=>An(i.trim(),n,l))}}),as,Gi=T({"mixin/cached.ts"(){"use strict";M(),as=(e=!0)=>t=>{const s=new WeakMap;return function(...n){return Oe(s.get(this),()=>t.apply(this,n),l=>{s.set(this,l)},e)}}}}),kn,Ot,ot,at,Bt,dt,ht,qt,_s,Wt,Ct,ul=T({"lib/node.ts"(){"use strict";M(),pe(),Gi(),B(),kn=[as(!1)],Ct=class{constructor(){ee(Wt,5,this),Ae(this,qt),Ko(this,"childNodes",[]),Ae(this,Ot),Ae(this,ot),Ae(this,at),Ae(this,Bt),Ae(this,dt),Ae(this,ht,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return de(this,Ot)}get nextSibling(){return de(this,ot)}get previousSibling(){return de(this,at)}get offsetHeight(){return It(this,qt,_s).call(this).height}get offsetWidth(){return It(this,qt,_s).call(this).width}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":fe(this,Ot,t),t||(fe(this,ot,void 0),fe(this,at,void 0));break;case"nextSibling":fe(this,ot,t);break;case"previousSibling":fe(this,at,t);break;case"aIndex":_.viewOnly&&fe(this,dt,[ve.rev,t]);break;default:this[e]=t}}getRootNode(){return Oe(de(this,Bt),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&fe(this,Bt,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),n=s.findIndex(([,,l])=>e<=l);return{top:n,left:e-s[n][1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return Oe(de(this,ht)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let n=this.getAttribute("padding");for(let l=0;l<s;l++)_.viewOnly&&(de(this,ht)[l]=[ve.rev,n]),n+=t[l].toString().length+this.getGaps(l);return n},t=>{de(this,ht)[e]=t})}getAbsoluteIndex(){return Oe(de(this,dt),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{fe(this,dt,e)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){const e=[];let t=0;for(const s of String(this).split(`
|
|
2
|
-
`)){const n=t+s.length;e.push([s,t,n]),t=n+1}return e}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},Wt=Z(null),Ot=new WeakMap,ot=new WeakMap,at=new WeakMap,Bt=new WeakMap,dt=new WeakMap,ht=new WeakMap,qt=new WeakSet,_s=function(){const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}},te(Wt,1,"getLines",kn,Ct),os(Wt,Ct)}}),cl,sa=T({"lib/element.ts"(){"use strict";var e,Li,Fi,n;oe(),pe(),ta(),ul(),cl=(n=class extends Ct{constructor(){super(...arguments);N(this,e)}get length(){return this.childNodes.length}text(i){return Be(this.childNodes,i)}normalize(){const i=this.getChildNodes(),r=o=>{var a,h;i.splice(o,1),(a=i[o-1])==null||a.setAttribute("nextSibling",i[o]),(h=i[o])==null||h.setAttribute("previousSibling",i[o-1])};for(let o=i.length-1;o>=0;o--){const{type:a,data:h}=i[o];a!=="text"||i.length===1||this.getGaps(o-(o&&1))||h===""&&r(o)}this.setAttribute("childNodes",i)}removeAt(i){return ls(this,i,1)[0]}insertAt(i,r=this.length){return ls(this,r,0,[i]),i}closest(i){const r=Xt(i,this);let{parentNode:o}=this;for(;o;){if(r(o))return o;({parentNode:o}=o)}}querySelector(i){const r=Xt(i,this);return j(this,e,Li).call(this,r)}querySelectorAll(i){const r=Xt(i,this);return j(this,e,Fi).call(this,r)}append(...i){this.safeAppend(i)}safeAppend(i){for(const r of i)this.insertAt(r)}replaceChildren(...i){this.safeReplaceChildren(i)}safeReplaceChildren(i){for(let r=this.length-1;r>=0;r--)this.removeAt(r);this.safeAppend(i)}setText(i,r=0){r+=r<0?this.length:0;const o=this.childNodes[r],{data:a}=o;return o.replaceData(i),a}toString(i,r=""){return this.childNodes.map(o=>o.toString(i)).join(r)}caretPositionFromIndex(i){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(i){this.lspError("AstElement.elementFromIndex")}elementFromPoint(i,r){this.lspError("AstElement.elementFromPoint")}lint(i=this.getAbsoluteIndex(),r){const o=[];for(let a=0,h=i+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a];d.setAttribute("aIndex",h);const u=d.lint(h,r);u.length>0&&o.push(...u),h+=d.toString().length+this.getGaps(a)}return o}print(i={}){const r=i.class;return this.toString()?(r===""?"":`<span class="wpb-${r!=null?r:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+tt(this.childNodes,i)+(r===""?"":"</span>"):""}json(i,r=this.getAbsoluteIndex()){const o={...this,type:this.type,range:[r,r+this.toString().length],childNodes:[]};for(let a=0,h=r+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a],{length:u}=d.toString();d.setAttribute("aIndex",h),o.childNodes.push(d.type==="text"?{data:d.data,range:[h,h+u]}:d.json(void 0,h)),h+=u+this.getGaps(a)}return o}},e=new WeakSet,Li=function(i){var r;for(const o of this.childNodes){if(o.type==="text")continue;if(i(o))return o;const a=j(r=o,e,Li).call(r,i);if(a)return a}},Fi=function(i){var o;let r=[];for(const a of this.childNodes)a.type!=="text"&&(i(a)&&r.push(a),r=[...r,...j(o=a,e,Fi).call(o,i)]);return r},n)}}),Mt,$s,_n,$n,Tn,Cn,Ts,Cs,ji,ia=T({"lib/text.ts"(){"use strict";var e,gl,s;oe(),M(),B(),ul(),Mt=String.raw`[${Ce}\t]*`,$s=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Mt}\d)|isbn(?=[-::]?${Mt}(?:\d(?:${Mt}|-)){6})`,_n=new RegExp(String.raw`${$s}|https?[:/]/+`,"giu"),$n=new RegExp($s,"giu"),Tn=new Set(["attr-value","ext-link-text","link-text"]),Cn={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ts=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"]);try{Cs=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{Cs=/\w/u}ji=(s=class extends Ct{constructor(l){super();N(this,e);Se(this,"data","");this.data=l}get type(){return"text"}toString(l){var i;return l&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?me(this.data):this.data}text(){return this.data}lint(l=this.getAbsoluteIndex(),i){var C,I,U;if(i===!1)return[];const{data:r,parentNode:o,nextSibling:a,previousSibling:h}=this;if(!o)throw new Error("An isolated text node cannot be linted!");const{type:d,name:u,parentNode:g}=o;if(d==="attr-value"){const{name:F,tag:P}=g;if(P==="ref"&&(F==="name"||F==="extends"||F==="follow")||F==="group"&&(P==="ref"||P==="references")||P==="choose"&&(F==="before"||F==="after"))return[]}if(i!=null||(i=d==="free-ext-link"||d==="ext-link-url"||d==="ext-link-text"||d==="image-parameter"&&u==="link"||d==="attr-value"?$n:_n),r.search(i)===-1)return[];i.lastIndex=0;const c=[],p=a==null?void 0:a.type,v=a==null?void 0:a.name,m=h==null?void 0:h.type,x=this.getRootNode(),b=x.toString(),{ext:w,html:y,variants:A}=x.getAttribute("config"),{top:k,left:S}=x.posFromIndex(l),$=new Set(["onlyinclude","noinclude","includeonly",...w,...y[0],...y[1],...y[2],...Ts]);for(let F=i.exec(r);F;F=i.exec(r)){const[,P,X]=F;let{index:W,0:Q}=F;if(X&&X!=="]"){const{length:ce}=X;W+=ce,Q=Q.slice(ce)}Q=Q.toLowerCase();const[z]=Q,ie=z==="r"||z==="p"||z==="i",q=z==="{",D=z==="}",H=z==="[",J=z==="]";let{length:ne}=Q;if(z==="<"&&!$.has(P.toLowerCase())||H&&d==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(W+1))||a!=null&&a.is("ext")&&v==="nowiki"&&((C=a.innerText)!=null&&C.includes("]")))||ie&&(!o.isPlain()||Tn.has(d)))continue;J&&(W||ne>1)&&i.lastIndex--;let K=l+W,re=K+ne,ue,ye;const je=b[re],ms=b[K-1],vs=q||H,bs=q&&ms==="-"&&A.length>0,ws=D&&je==="-"&&A.length>0,dn=H&&p==="free-ext-link"&&!r.slice(W+1).trim()||J&&m==="free-ext-link"&&!r.slice(0,W).includes("]");if(ie)ue="lonely-http",Q=Q.toUpperCase(),ye=_.lintConfig.getSeverity(ue,Q);else if(z==="<"){ue="tag-like";let ce;/^<\s/u.test(Q)||!/[\s/>]/u.test(je!=null?je:"")?ce="invalid":Ts.has(P)&&(ce="disallowed"),ye=_.lintConfig.getSeverity(ue,ce)}else if(bs||ws)ue="lonely-bracket",ye=_.lintConfig.getSeverity(ue,"converter"),bs&&W>0?(Q="-{",W--,K--,ne=2):ws&&W<r.length-1&&(Q="}-",re++,ne=2);else if(dn)ue="lonely-bracket",ye=_.lintConfig.getSeverity(ue,"extLink");else if(vs||D||J)if(ue="lonely-bracket",ne>1||q&&je===z||D&&ms===z)ye=_.lintConfig.getSeverity(ue,"double");else{if(!H||d!=="ext-link-text"){const ce=Cn[z],ys=vs?r.slice(W+1):r.slice(0,W);if(q&&((I=ce.exec(ys))==null?void 0:I[0])==="}"||D&&((U=ce.exec(ys))==null?void 0:U[0])==="{")continue;if(!ys.includes(z)){const gn=vs?"nextSibling":"previousSibling";let Ee=this[gn];for(;Ee&&(Ee.type!=="text"||!ce.test(Ee.data));)Ee=Ee[gn];if(Ee&&ce.exec(Ee.data)[0]!==z)continue}}ye=_.lintConfig.getSeverity(ue,"single")}else ue="lonely-http",ye=_.lintConfig.getSeverity(ue);if(!ye)continue;const hn=this.posFromIndex(W),{line:un,character:cn}=Ni(k,S,hn.top+1,hn.left),ze={rule:ue,message:_.msg('lonely "$1"',ie||z==="h"||bs||ws?Q:z),severity:ye,startIndex:K,endIndex:re,startLine:un,endLine:un,startCol:cn,endCol:cn+ne};if(z==="<")ze.suggestions=[{desc:"escape",range:[K,K+1],text:"<"}];else if(z==="h"&&d!=="link-text"&&Cs.test(ms||""))ze.suggestions=[{desc:"whitespace",range:[K,K],text:" "}];else if(H&&d==="ext-link-text"){const ce=o.getAbsoluteIndex()+o.toString().length;ze.suggestions=[{desc:"escape",range:[ce,ce+1],text:"]"}]}else if(J&&dn){const ce=l-h.toString().length;ze.suggestions=[{desc:"left bracket",range:[ce,ce],text:"["}]}else ie&&(ze.suggestions=[...F[0]===Q?[]:[{desc:"uppercase",range:[K,re],text:Q}],...je===":"||je===":"?[{desc:"whitespace",range:[re,re+1],text:" "}]:[]]);c.push(ze)}return c}replaceData(l){j(this,e,gl).call(this,l)}print(){return Ft(this.data)}},e=new WeakSet,gl=function(l){this.setAttribute("data",l)},s)}}),We,nt=T({"mixin/hidden.ts"(){"use strict";pe(),We=(e=!0,t=!0)=>s=>{class n extends s{text(){return""}lint(i){return e?[]:super.lint(i)}}return lt(n,s),n}}}),Me,rt=T({"src/syntax.ts"(){"use strict";var e,t;O(),Me=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}lint(n=this.getAbsoluteIndex()){return super.lint(n,!1)}},e=new WeakMap,t)}}),_e,Ie=T({"mixin/padded.ts"(){"use strict";pe(),_e=({length:e})=>t=>{class s extends t{getAttribute(l){return l==="padding"?e:super.getAttribute(l)}}return lt(s,t),s}}}),ge,Ne=T({"src/atom.ts"(){"use strict";var e,t;O(),ge=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}set type(n){L(this,e,n)}getAttribute(n){var l;return n==="invalid"?this.type==="converter-flag"&&!!((l=this.parentNode)!=null&&l.isInvalidFlag(this)):super.getAttribute(n)}},e=new WeakMap,t)}}),In,Nn,Is,Ln,Te,ds=T({"src/link/base.ts"(){"use strict";var e,t,s,n;M(),qe(),oe(),ae(),Ie(),B(),O(),Ne(),In=l=>l==="redirect-target"||l==="link",Nn=[_e("[[")],Te=(n=class extends(Ln=E){constructor(i,r,o,a=[],h="|"){super(void 0,o,a,{});N(this,e,!0);N(this,t);N(this,s);if(this.insertAt(new ge(i,"link-target",o,a,{})),r!==void 0){const d=new E(r,o,a,{});d.type="link-text",d.setAttribute("stage",xe-1),this.insertAt(d)}L(this,t,h)}get link(){}get fragment(){return f(this,s).fragment}afterBuild(){L(this,s,this.getTitle()),f(this,t).includes("\0")&&L(this,t,this.buildFromStr(f(this,t),0)),this.setAttribute("name",f(this,s).title),super.afterBuild()}setAttribute(i,r){i==="bracket"?L(this,e,r):i==="title"?L(this,s,r):super.setAttribute(i,r)}toString(i){const r=super.toString(i,f(this,t));return f(this,e)?`[[${r}]]`:r}text(){const i=super.text("|");return f(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?f(this,s):super.getAttribute(i)}getGaps(i){return i===0?f(this,t).length:1}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{childNodes:[a,h],type:d}=this,{encoded:u,fragment:g}=f(this,s),c=new le(this,i);let p="unknown-page",v=_.lintConfig.getSeverity(p);if(v&&a.childNodes.some(({type:m})=>m==="template")&&o.push(R(a,c,p,"template in an internal link target",v)),p="url-encoding",v=_.lintConfig.getSeverity(p),v&&u){const m=R(a,c,p,"unnecessary URL encoding in an internal link",v);m.fix={desc:"decode",range:[m.startIndex,m.endIndex],text:Nt(a.text())},o.push(m)}if(p="pipe-like",v=_.lintConfig.getSeverity(p,"link"),v&&(d==="link"||d==="category")){const m=h==null?void 0:h.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),x=h==null?void 0:h.childNodes[m];if(x){const b=R(h,c,p,'additional "|" in the link text',v),w=b.startIndex+h.getRelativeIndex(m);b.suggestions=[{desc:"escape",range:[w,w+x.data.length],text:x.data.replace(/\|/gu,"|")}],o.push(b)}}if(p="no-ignored",v=_.lintConfig.getSeverity(p,"fragment"),v&&g!==void 0&&!In(d)){const m=R(a,c,p,"useless fragment",v),x=a.childNodes.findIndex(w=>w.type==="text"&&w.data.includes("#")),b=a.childNodes[x];b&&(m.fix={desc:"remove",range:[m.startIndex+a.getRelativeIndex(x)+b.data.indexOf("#"),m.endIndex],text:""}),o.push(m)}return o}getTitle(i,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(f(this,e)?{pre:"[[",post:"]]",sep:f(this,t)}:{sep:f(this,t)})}json(i,r=this.getAbsoluteIndex()){const o=super.json(void 0,r),{type:a,fragment:h}=this;return h!==void 0&&(a==="link"||a==="redirect-target")&&(o.fragment=h),o}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n),Is=Z(Ln),Te=te(Is,0,"LinkBaseToken",Nn,Te),ee(Is,1,Te)}}),Le,Ue=T({"src/nowiki/base.ts"(){"use strict";O(),Le=class extends E{get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}}}}),Fn,Ns,jn,he,Fe=T({"src/nowiki/noinclude.ts"(){"use strict";nt(),Ue(),Fn=[We()],he=class extends(jn=Le){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Ns=Z(jn),he=te(Ns,0,"NoincludeToken",Fn,he),ee(Ns,1,he)}}),pl,na=T({"src/link/redirectTarget.ts"(){"use strict";M(),B(),ds(),Fe(),pl=class extends Te{get type(){return"redirect-target"}constructor(e,t,s,n){super(e,void 0,s,n),t!==void 0&&this.insertAt(new he(t,s,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){const t=super.lint(e,!1),s="no-ignored",n=_.lintConfig.getSeverity(s,"redirect");if(n&&this.length===2){const l=R(this.lastChild,{start:e},s,"useless link text",n);l.startIndex--,l.startCol--,l.fix={desc:"remove",range:[l.startIndex,l.endIndex],text:""},t.push(l)}return t}}}}),En,Ls,Pn,xt,ra=T({"src/redirect.ts"(){"use strict";var e,t,s;nt(),O(),rt(),na(),En=[We(!1,!1)],xt=(s=class extends(Pn=E){constructor(l,i,r,o,a,h,d=[]){super(void 0,h,d);N(this,e);N(this,t);L(this,e,l),L(this,t,a),this.append(new Me(i,"redirect-syntax",h,d),new pl(r,o==null?void 0:o.slice(1),h,d))}get type(){return"redirect"}getAttribute(l){return l==="padding"?f(this,e).length:super.getAttribute(l)}toString(l){return f(this,e)+super.toString(l)+f(this,t)}lint(l=this.getAbsoluteIndex()){const i=l+f(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",i),this.lastChild.lint(i)}print(){return super.print({pre:f(this,e),post:f(this,t)})}},e=new WeakMap,t=new WeakMap,s),Ls=Z(Pn),xt=te(Ls,0,"RedirectToken",En,xt),ee(Ls,1,xt)}}),fl={};Y(fl,{parseRedirect:()=>xl});var xl,la=T({"parser/redirect.ts"(){"use strict";B(),ra(),xl=(e,t,s)=>{var l;(l=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const n=t.regexRedirect.exec(e);return n&&_.normalizeTitle(n[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(n[0].length)}`,new xt(...n.slice(1),t,s),e):!1}}}),Rn,Fs,On,mt,oa=T({"src/onlyinclude.ts"(){"use strict";Ie(),O(),Rn=[_e("<onlyinclude>")],mt=class extends(On=E){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Fs=Z(On),mt=te(Fs,0,"OnlyincludeToken",Rn,mt),ee(Fs,1,mt)}}),Pt,hs=T({"mixin/gapped.ts"(){"use strict";pe(),Pt=(e=1)=>t=>{class s extends t{getGaps(){return e}}return lt(s,t),s}}}),Bn,js,qn,Re,Vi=T({"src/tagPair/index.ts"(){"use strict";var e,t;hs(),O(),Bn=[Pt()],Re=(t=class extends(qn=E){constructor(n,l,i,r,o,a=[]){super(void 0,o);N(this,e);Se(this,"closed");Se(this,"selfClosing");this.setAttribute("name",n.toLowerCase()),L(this,e,[n,r||n]),this.closed=r!=="",this.selfClosing=r===void 0,this.append(l,i);const h=typeof l=="string"?-1:a.indexOf(l);a.splice(h===-1?1/0:h,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(n){const{selfClosing:l,firstChild:i,lastChild:r}=this,[o,a]=f(this,e);return l?`<${o}${i.toString(n)}/>`:`<${o}${i.toString(n)}>${r.toString(n)}${this.closed?`</${a}>`:""}`}text(){const[n,l]=f(this,e);return this.selfClosing?`<${n}${this.firstChild.text()}/>`:`<${n}${super.text(">")}${this.closed?`</${l}>`:""}`}getAttribute(n){return n==="padding"?f(this,e)[0].length+1:super.getAttribute(n)}print(){const[n,l]=f(this,e);return super.print(this.selfClosing?{pre:`<${n}`,post:"/>"}:{pre:`<${n}`,sep:">",post:this.closed?`</${l}>`:""})}},e=new WeakMap,t),js=Z(qn),Re=te(js,0,"TagPairToken",Bn,Re),ee(js,1,Re)}}),ml,aa=T({"src/tagPair/translate.ts"(){"use strict";var e,vl,s;O(),Vi(),rt(),Fe(),ml=(s=class extends Re{constructor(l,i,r,o=[]){const a=new Me(l,"translate-attr",r,o);i=i==null?void 0:i.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(d,u,g,c)=>(new he(u,r,o),new he(c,r,o),`\0${o.length-1}n${g}\0${o.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(d,u,g,c,p)=>(new he(u,r,o),new he(p,r,o),`\0${o.length-1}n${c}\0${o.length}n`));const h=new E(i,r,o);h.type="translate-inner";super("translate",a,h,"translate",r,o);N(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(l){return l?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${j(this,e,vl).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,vl=function(){return this.firstChild.toString()===" nowrap"},s)}}),Wn,Es,Mn,vt,da=T({"src/tagPair/include.ts"(){"use strict";M(),ae(),nt(),B(),Vi(),Wn=[We(!1)],vt=class extends(Mn=Re){get type(){return"include"}constructor(e,t="",s,n,l,i){super(e,t,s!=null?s:"",s===void 0||n!=null?n:"",l,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){const t=[],{firstChild:s,closed:n,name:l}=this,i=new le(this,e),r=["no-ignored","unclosed-comment"],o=r.map(a=>_.lintConfig.getSeverity(a,"include"));if(o[0]&&s.data.trim()){const a=R(s,i,r[0],"useless attribute",o[0]);a.suggestions=[{desc:"remove",range:[a.startIndex,a.endIndex],text:""}],t.push(a)}if(o[1]&&!n){const a=V(this,i,r[1],_.msg("unclosed $1",`<${l}>`),o[1]);a.suggestions=[{desc:"close",range:[a.endIndex,a.endIndex],text:`</${l}>`}],t.push(a)}return t}},Es=Z(Mn),vt=te(Es,0,"IncludeToken",Wn,vt),ee(Es,1,vt)}}),us,Qi=T({"mixin/attributesParent.ts"(){"use strict";pe(),us=(e=0)=>t=>{var n,Ei;class s extends t{constructor(){super(...arguments);N(this,n)}hasAttr(o){return j(this,n,Ei).call(this).hasAttr(o)}getAttr(o){return j(this,n,Ei).call(this).getAttr(o)}}return n=new WeakSet,Ei=function(){return this.childNodes[e]},lt(s,t),s}}}),se,Ps,Rs,ut,Ut,Os,Pe,Bs,qs,Ws,zt,Ms,be,bl,wl,yl,Sl,ha=T({"util/sharable.ts"(){"use strict";se=new Set(["align"]),Ps=new Set(["cite"]),Rs=new Set(["cite","datetime"]),ut=new Set(["width"]),Ut=new Set(["axis","align","bgcolor","height","width","valign"]),Os=new Set([...Ut,"abbr","headers","scope","rowspan","colspan"]),Pe=new Set(["type"]),Bs=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),qs=new Set(["clear"]),Ws=new Set(["bgcolor","align","valign"]),zt=new Set(["qid","forcemathmode","type","display"]),Ms=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),be=new Set,bl=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"]),wl={div:se,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,blockquote:Ps,q:Ps,p:se,br:qs,pre:ut,ins:Rs,del:Rs,ul:Pe,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Bs,"border"]),caption:se,tr:Ws,td:Os,th:Os,font:new Set(["size","color","face"]),hr:ut,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Pe,poem:se,categorytree:se,combooption:se,math:be,chem:be,ce:be,img:new Set(["alt","src","width","height","loading"])},yl={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:be,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:be,inputbox:be,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:be,poll:new Set(["id","show-results-before-voting"]),sm2:Pe,flashmp3:Pe,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([...zt,"chem"]),chem:zt,ce:zt,hiero:be,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Ms,syntaxhighlight:Ms,templatedata:be,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:be},Sl={table:Bs,td:new Set([...Ut,"scope"]),th:Ut,br:qs,caption:se,div:se,hr:ut,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,li:Pe,p:se,pre:ut,tr:Ws,ul:Pe}}}),Un,zn,Hn,Dn,Kt,ua=T({"src/attribute.ts"(){"use strict";var e,t,s,n,l,Pi,r;M(),oe(),qe(),ha(),ae(),B(),O(),Ne(),Un=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,zn=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Hn=new Set(["ext","arg","magic-word","template"]),Dn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Kt=(r=class extends E{constructor(a,h,d,u="",g,c=[],p=_.getConfig(),v=[]){const m=new ge(d,"attr-key",p,v);let x;if(d==="title"||h==="img"&&d==="alt")x=new E(g,p,v,{}),x.type="attr-value",x.setAttribute("stage",xe-1);else if(h==="gallery"&&d==="caption"||h==="choose"&&(d==="before"||d==="after")||h==="img"&&d==="src"&&(g!=null&&g.includes("{{"))){const b={...p,excludes:[...p.excludes,"heading","html","table","hr","list"]};x=new E(g,b,v,{}),x.type="attr-value",x.setAttribute("stage",1)}else x=new ge(g,"attr-value",p,v,{});super(void 0,p,v);N(this,l);N(this,e);N(this,t);N(this,s);N(this,n);L(this,e,a),this.append(m,x),L(this,s,u),L(this,n,[...c]),L(this,t,h),this.setAttribute("name",et(me(d)))}get type(){return f(this,e)}get tag(){return f(this,t)}get balanced(){return!f(this,s)||f(this,n)[0]===f(this,n)[1]}afterBuild(){f(this,s).includes("\0")&&L(this,s,this.buildFromStr(f(this,s),0)),this.parentNode&&L(this,t,this.parentNode.name),this.setAttribute("name",et(this.firstChild.text())),super.afterBuild()}toString(a){const[h="",d=""]=f(this,n);return f(this,s)?super.toString(a,f(this,s)+h)+d:this.firstChild.toString(a)}text(){return f(this,s)?`${super.text(`${f(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var a,h;return f(this,s)?f(this,s).length+((h=(a=f(this,n)[0])==null?void 0:a.length)!=null?h:0):0}lint(a=this.getAbsoluteIndex(),h){var y;const d=super.lint(a,h),{balanced:u,firstChild:g,lastChild:c,name:p,tag:v}=this,m=new le(this,a),x=["unclosed-quote","obsolete-attr"],b=x.map(A=>_.lintConfig.getSeverity(A,p));if(b[0]&&!u){const A=R(c,m,x[0],_.msg("unclosed $1","quotes"),b[0]);A.startIndex--,A.startCol--,A.suggestions=[{desc:"close",range:[A.endIndex,A.endIndex],text:f(this,n)[0]}],d.push(A)}const w=j(this,l,Pi).call(this,a,m);return w&&d.push(w),b[1]&&((y=Sl[v])!=null&&y.has(p))&&d.push(R(g,m,x[1],"obsolete attribute",b[1])),d}getValue(){return f(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}getAttribute(a){return a==="invalid"?j(this,l,Pi).call(this):super.getAttribute(a)}print(){const[a="",h=""]=f(this,n);return f(this,s)?super.print({sep:Ft(f(this,s))+a,post:h}):super.print()}json(a,h=this.getAbsoluteIndex()){const d=super.json(void 0,h);return d.tag=this.tag,d}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,l=new WeakSet,Pi=function(a,h){const{firstChild:d,lastChild:u,type:g,name:c,tag:p,parentNode:v}=this,m=!u.childNodes.some(({type:k})=>Hn.has(k)),x=this.getValue(),b=yl[p],w=wl[p],{length:y}=this.toString();let A="illegal-attr";if(!(b!=null&&b.has(c))&&!(w!=null&&w.has(c))&&(g==="ext-attr"?b||w:!/\{\{[^{]+\}\}/u.test(c))&&(g==="ext-attr"&&!w||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(p==="meta"||p==="link"||!bl.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"unknown");if(k){const S=R(d,h,A,"illegal attribute name",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""}],S}}else if(c==="style"&&typeof x=="string"&&Un.test(x)){if(a===void 0)return!0;A="insecure-style";const k=_.lintConfig.getSeverity(A);return k&&R(u,h,A,"insecure style",k)}else if(c==="tabindex"&&typeof x=="string"&&x!=="0"){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"tabindex");if(k){const S=R(u,h,A,"nonzero tabindex",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""},{desc:"0 tabindex",range:[S.startIndex,S.endIndex],text:"0"}],S}}else if(m&&g!=="ext-attr"){const k=hl(p,c),S=String(x).toLowerCase();if(k.length>0&&k.every($=>$!==S)){if(a===void 0)return!0;const $=_.lintConfig.getSeverity(A,"value");return $&&R(u,h,A,"illegal attribute value",$)}}else if(typeof x=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Dn.has(c))&&zn.test(x)||m&&(c==="href"||p==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(x))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"value");return k&&R(u,h,A,"illegal attribute value",k)}return!1},r)}}),Us,Gn,zs,cs,Ji=T({"src/attributes.ts"(){"use strict";var e,t,Yt,n;M(),oe(),ae(),B(),O(),Ne(),ua(),Us=l=>l.slice(0,-1),Gn=l=>`${Us(l)}-dirty`;try{zs=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{zs=/[^\W_]/u}cs=(n=class extends E{constructor(i,r,o,a,h=[]){super(void 0,a,h,{});N(this,t);N(this,e);if(L(this,e,r),this.setAttribute("name",o),i){const d=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",g=d.exec(i),c=0;const p=()=>{u&&(super.insertAt(new ge(u,Gn(r),a,h,{})),u="")};for(;g;){const{index:v,0:m,1:x,2:b,3:w,4:y,5:A,6:k}=g;if(u+=i.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(me(x).trim())){const S=y!=null?y:k,$=[w,A],C=new Kt(Us(r),o,x,b,S,$,a,h);p(),super.insertAt(C)}else u+=m;({lastIndex:c}=d),g=d.exec(i)}u+=i.slice(c),p()}}get type(){return f(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(r=>r instanceof Kt&&(!i||r.name===et(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){const r=this.getAttrTokens(i);return r[r.length-1]}getAttr(i){var r;return(r=this.getAttrToken(i))==null?void 0:r.getValue()}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{parentNode:a,childNodes:h}=this,d=new Map,u=new Set,g=new le(this,i),c=["no-ignored","no-duplicate"],p=["closingTag","invalidAttributes","nonWordAttributes"].map(m=>_.lintConfig.getSeverity(c[0],m));if(p[0]&&j(this,t,Yt).call(this)){const m=V(this,g,c[0],"attributes of a closing tag",p[0]),x=a.getAbsoluteIndex();m.suggestions=[{desc:"remove",range:[i,m.endIndex],text:""},{desc:"open",range:[x+1,x+2],text:""}],o.push(m)}for(const m of h)if(m instanceof Kt){const{name:x}=m;d.has(x)?(u.add(x),d.get(x).push(m)):d.set(x,[m])}else{const x=m.text().trim(),b=p[zs.test(x)?1:2];if(x&&b){const w=R(m,g,c[0],"containing invalid attribute",b);w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:" "}],o.push(w)}}const v=_.lintConfig.getSeverity(c[1],"attribute");if(v&&u.size>0)for(const m of u){const x=d.get(m).map(b=>{const w=b.getValue();return[b,w===!0?"":w]});o.push(...x.map(([b,w],y)=>{const A=R(b,g,c[1],_.msg("duplicated $1 attribute",m),v),k={desc:"remove",range:[A.startIndex,A.endIndex],text:""};return!w||x.slice(0,y).some(([,S])=>S===w)?A.fix=k:A.suggestions=[k],A}))}return o}getAttribute(i){return i==="invalid"?j(this,t,Yt).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${j(this,t,Yt).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof ge?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,Yt=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},n)}}),Al={};Y(Al,{PreToken:()=>kl});var kl,ca=T({"src/pre.ts"(){"use strict";qe(),O(),Fe(),kl=class extends E{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const n=/<nowiki>/giu,l=/<\/nowiki>/giu,{length:i}=n.source;let r=n.exec(e);r&&(l.lastIndex=r.index+i);let o=l.exec(e),a=0,h="";for(;r&&o;)new he(r[0],t,s),new he(o[0],t,s),h+=`${e.slice(a,r.index)}\0${s.length-1}n${e.slice(r.index+i,o.index)}\0${s.length}n`,a=o.index+i+1,n.lastIndex=a,r=n.exec(e),r&&(l.lastIndex=r.index+i),o=l.exec(e);e=h+e.slice(a)}super(e,t,s,{}),this.setAttribute("stage",xe-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),gs,Xi=T({"mixin/multiLine.ts"(){"use strict";pe(),gs=e=>{class t extends e{toString(n){return super.toString(n,`
|
|
1
|
+
"use strict";(()=>{var zo=Object.defineProperty;var pn=e=>{throw TypeError(e)};var Ho=(e,t,s)=>t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Do=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Se=(e,t,s)=>Ho(e,typeof t!="symbol"?t+"":t,s),Ss=(e,t,s)=>t.has(e)||pn("Cannot "+s);var f=(e,t,s)=>(Ss(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),L=(e,t,s,n)=>(Ss(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),j=(e,t,s)=>(Ss(e,t,"access private method"),s);var fn=(e,t,s,n)=>({set _(l){L(e,t,l,s)},get _(){return f(e,t,n)}});var Ga=Do((Qa,Uo)=>{var Go=Object.create,st=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,zi=Object.getOwnPropertyNames,Vo=Object.prototype.hasOwnProperty,sl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),it=e=>{throw TypeError(e)},il=(e,t,s)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,xn=(e,t)=>st(e,"name",{value:t,configurable:!0}),T=(e,t)=>function(){return e&&(t=(0,e[zi(e)[0]])(e=0)),t},Qo=(e,t)=>function(){return t||(0,e[zi(e)[0]])((t={exports:{}}).exports,t),t.exports},Y=(e,t)=>{for(var s in t)st(e,s,{get:t[s],enumerable:!0})},Jo=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of zi(t))!Vo.call(e,l)&&l!==s&&st(e,l,{get:()=>t[l],enumerable:!(n=tl(t,l))||n.enumerable});return e},G=e=>Jo(st({},"__esModule",{value:!0}),e),Z=e=>{var t;return[,,,Go((t=e==null?void 0:e[sl("metadata")])!=null?t:null)]},nl=["class","method","getter","setter","accessor","field","value","get","set"],ft=e=>e!==void 0&&typeof e!="function"?it("Function expected"):e,Xo=(e,t,s,n,l)=>({kind:nl[e],name:t,metadata:n,addInitializer:i=>s._?it("Already initialized"):l.push(ft(i||null))}),os=(e,t)=>il(t,sl("metadata"),e[3]),ee=(e,t,s,n)=>{for(var l=0,i=e[t>>1],r=i&&i.length;l<r;l++)t&1?i[l].call(s):n=i[l].call(s,n);return n},te=(e,t,s,n,l,i)=>{var r,o,a,h,d,u=t&7,g=!!(t&8),c=!!(t&16),p=u>3?e.length+1:u?g?1:2:0,v=nl[u+5],m=u>3&&(e[p-1]=[]),x=e[p]||(e[p]=[]),b=u&&(!c&&!g&&(l=l.prototype),u<5&&(u>3||!c)&&tl(u<4?l:{get[s](){return de(this,i)},set[s](y){return fe(this,i,y)}},s));u?c&&u<4&&xn(i,(u>2?"set ":u>1?"get ":"")+s):xn(l,s);for(var w=n.length-1;w>=0;w--)h=Xo(u,s,a={},e[3],x),u&&(h.static=g,h.private=c,d=h.access={has:c?y=>Yo(l,y):y=>s in y},u^3&&(d.get=c?y=>(u^1?de:It)(y,l,u^4?i:b.get):y=>y[s]),u>2&&(d.set=c?(y,A)=>fe(y,l,A,u^4?i:b.set):(y,A)=>y[s]=A)),o=(0,n[w])(u?u<4?c?i:b[v]:u>4?void 0:{get:b.get,set:b.set}:l,h),a._=1,u^4||o===void 0?ft(o)&&(u>4?m.unshift(o):u?c?i=o:b[v]=o:l=o):typeof o!="object"||o===null?it("Object expected"):(ft(r=o.get)&&(b.get=r),ft(r=o.set)&&(b.set=r),ft(r=o.init)&&m.unshift(r));return u||os(e,l),b&&st(l,s,b),c?u^4?i:b:l},Ko=(e,t,s)=>il(e,typeof t!="symbol"?t+"":t,s),Hi=(e,t,s)=>t.has(e)||it("Cannot "+s),Yo=(e,t)=>Object(t)!==t?it('Cannot use the "in" operator on this value'):e.has(t),de=(e,t,s)=>(Hi(e,t,"read from private field"),s?s.call(e):t.get(e)),Ae=(e,t,s)=>t.has(e)?it("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),fe=(e,t,s,n)=>(Hi(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),It=(e,t,s)=>(Hi(e,t,"access private method"),s),Zo=(e,t,s,n)=>({set _(l){fe(e,t,l,s)},get _(){return de(e,t,n)}}),rl,Di,ll=T({"base.ts"(){"use strict";rl=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),Di=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function Ke(e){const t=new Map,s=new WeakMap;return n=>{const l=typeof n=="string"?t:s;if(l.has(n)){const r=l.get(n);return r.lastIndex=0,r}const i=e(n);return l.set(n,i),i}}var Nt,ol,Et=T({"../common/dist/index.mjs"(){"use strict";Nt=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25")),ol=Ke}}),Ce,As,Ye,Ze,et,ke,He,al,me,Be,mn,vn,Lt,dl,bn,wn,Ft,tt,oe=T({"util/string.ts"(){"use strict";Et(),Ce=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,As=String.raw`[^[\]<>"\0-\x1F\x7F${Ce}\uFFFD]`,Ye=String.raw`(?:\[[\da-f:.]+\]|${As})`,Ze=String.raw`(?:${As}|\0\d+[cn!~]\x7F)*`,et=e=>e.trim().toLowerCase(),ke=(e,t)=>e.replace(/\0(\d+)\x7F/gu,(s,n)=>t[n]),He=(e,t)=>s=>s.replace(e,t),al=He(/[\0\x7F]|\r$/gmu,""),me=He(/\0\d+[cn]\x7F/gu,""),Be=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),mn={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},vn=He(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):mn[s.toLowerCase()]),Lt=e=>vn(e),dl=He(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),bn={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},wn=e=>He(e,t=>`&${bn[t]};`),Ft=wn(/[&<>]/gu),tt=(e,t={})=>{const{pre:s="",post:n="",sep:l=""}=t;return s+e.map(i=>i.print()).join(l)+n}}}),ea=Qo({"config/minimum.json"(e,t){t.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","#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:[]}}}),xe,Ci,qe=T({"util/constants.ts"(){"use strict";xe=11,Ci=ea()}}),le,ae=T({"lib/rect.ts"(){"use strict";var e,t,s,n,Ii,i;le=(i=class{constructor(r,o){N(this,n);N(this,e);N(this,t);N(this,s);L(this,e,r),L(this,t,o)}get start(){return f(this,t)}get top(){return j(this,n,Ii).call(this).top}get left(){return j(this,n,Ii).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakSet,Ii=function(){var r;return(r=f(this,s))!=null||L(this,s,f(this,e).getRootNode().posFromIndex(f(this,t))),f(this,s)},i)}}),yn,Sn,Tt,Ni,ks,R,V,Oe,hl,M=T({"util/lint.ts"(){"use strict";pe(),ae(),B(),yn=new Set(["tr","td","th","caption"]),Sn=new Set(["Template:!!","Template:!-"]),Tt=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Sn.has(t.name)||t.is("html")&&yn.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Tt(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(Tt);return s.includes(2)?2:s.includes(1)&&1}catch{}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Ni=(e,t,s,n)=>({line:e+s-1,character:(s===1?t:0)+n}),ks=e=>(t,s,n,l,i="error")=>{const{start:r}=s,{top:o,left:a}=s instanceof le?s:new le(t,r),{offsetHeight:h,offsetWidth:d}=t,{startIndex:u,startLine:g,startCol:c}=e(t,r,o,a),{line:p,character:v}=Ni(g,c,h,d);return{rule:n,message:_.msg(l),severity:i,startIndex:u,endIndex:u+t.toString().length,startLine:g,endLine:p,startCol:c,endCol:v}},R=ks((e,t,s,n)=>{const l=e.getRelativeIndex(),{top:i,left:r}=e.parentNode.posFromIndex(l);return{startIndex:t+l,startLine:s+i,startCol:i?r:n+r}}),V=ks((e,t,s,n)=>({startIndex:t,startLine:s,startCol:n})),Oe=(e,t,s,n)=>{if(e&&(n||_.viewOnly&&e[0]===ve.rev))return e[1];const l=t();return(n||_.viewOnly)&&s([ve.rev,l]),l},hl=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),An,Xt,ta=T({"parser/selector.ts"(){"use strict";An=(e,t,s)=>{if(e.includes("#")){const n=e.indexOf("#");return(n===0||e.slice(0,n)===t)&&e.slice(n+1)===s}return!e||e===t},Xt=(e,t,s)=>{const n=e.split(",");return({type:l,name:i})=>n.some(r=>An(r.trim(),l,i))}}}),as,Gi=T({"mixin/cached.ts"(){"use strict";M(),as=(e=!0)=>t=>{const s=new WeakMap;return function(...n){return Oe(s.get(this),()=>t.apply(this,n),l=>{s.set(this,l)},e)}}}}),kn,Ot,ot,at,Bt,dt,ht,qt,_s,Wt,Ct,ul=T({"lib/node.ts"(){"use strict";M(),pe(),Gi(),B(),kn=[as(!1)],Ct=class{constructor(){ee(Wt,5,this),Ae(this,qt),Ko(this,"childNodes",[]),Ae(this,Ot),Ae(this,ot),Ae(this,at),Ae(this,Bt),Ae(this,dt),Ae(this,ht,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return de(this,Ot)}get nextSibling(){return de(this,ot)}get previousSibling(){return de(this,at)}get offsetHeight(){return It(this,qt,_s).call(this).height}get offsetWidth(){return It(this,qt,_s).call(this).width}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":fe(this,Ot,t),t||(fe(this,ot,void 0),fe(this,at,void 0));break;case"nextSibling":fe(this,ot,t);break;case"previousSibling":fe(this,at,t);break;case"aIndex":_.viewOnly&&fe(this,dt,[ve.rev,t]);break;default:this[e]=t}}getRootNode(){return Oe(de(this,Bt),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&fe(this,Bt,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),n=s.findIndex(([,,l])=>e<=l);return{top:n,left:e-s[n][1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return Oe(de(this,ht)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let n=this.getAttribute("padding");for(let l=0;l<s;l++)_.viewOnly&&(de(this,ht)[l]=[ve.rev,n]),n+=t[l].toString().length+this.getGaps(l);return n},t=>{de(this,ht)[e]=t})}getAbsoluteIndex(){return Oe(de(this,dt),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{fe(this,dt,e)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){const e=[];let t=0;for(const s of String(this).split(`
|
|
2
|
+
`)){const n=t+s.length;e.push([s,t,n]),t=n+1}return e}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},Wt=Z(null),Ot=new WeakMap,ot=new WeakMap,at=new WeakMap,Bt=new WeakMap,dt=new WeakMap,ht=new WeakMap,qt=new WeakSet,_s=function(){const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}},te(Wt,1,"getLines",kn,Ct),os(Wt,Ct)}}),cl,sa=T({"lib/element.ts"(){"use strict";var e,Li,Fi,n;oe(),pe(),ta(),ul(),cl=(n=class extends Ct{constructor(){super(...arguments);N(this,e)}get length(){return this.childNodes.length}text(i){return Be(this.childNodes,i)}normalize(){const i=this.getChildNodes(),r=o=>{var a,h;i.splice(o,1),(a=i[o-1])==null||a.setAttribute("nextSibling",i[o]),(h=i[o])==null||h.setAttribute("previousSibling",i[o-1])};for(let o=i.length-1;o>=0;o--){const{type:a,data:h}=i[o];a!=="text"||i.length===1||this.getGaps(o-(o&&1))||h===""&&r(o)}this.setAttribute("childNodes",i)}removeAt(i){return ls(this,i,1)[0]}insertAt(i,r=this.length){return ls(this,r,0,[i]),i}closest(i){const r=Xt(i,this);let{parentNode:o}=this;for(;o;){if(r(o))return o;({parentNode:o}=o)}}querySelector(i){const r=Xt(i,this);return j(this,e,Li).call(this,r)}querySelectorAll(i){const r=Xt(i,this);return j(this,e,Fi).call(this,r)}append(...i){this.safeAppend(i)}safeAppend(i){for(const r of i)this.insertAt(r)}replaceChildren(...i){this.safeReplaceChildren(i)}safeReplaceChildren(i){for(let r=this.length-1;r>=0;r--)this.removeAt(r);this.safeAppend(i)}setText(i,r=0){r+=r<0?this.length:0;const o=this.childNodes[r],{data:a}=o;return o.replaceData(i),a}toString(i,r=""){return this.childNodes.map(o=>o.toString(i)).join(r)}caretPositionFromIndex(i){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(i){this.lspError("AstElement.elementFromIndex")}elementFromPoint(i,r){this.lspError("AstElement.elementFromPoint")}lint(i=this.getAbsoluteIndex(),r){const o=[];for(let a=0,h=i+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a];d.setAttribute("aIndex",h);const u=d.lint(h,r);u.length>0&&o.push(...u),h+=d.toString().length+this.getGaps(a)}return o}print(i={}){const r=i.class;return this.toString()?(r===""?"":`<span class="wpb-${r!=null?r:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+tt(this.childNodes,i)+(r===""?"":"</span>"):""}json(i,r=this.getAbsoluteIndex()){const o={...this,type:this.type,range:[r,r+this.toString().length],childNodes:[]};for(let a=0,h=r+this.getAttribute("padding");a<this.length;a++){const d=this.childNodes[a],{length:u}=d.toString();d.setAttribute("aIndex",h),o.childNodes.push(d.type==="text"?{data:d.data,range:[h,h+u]}:d.json(void 0,h)),h+=u+this.getGaps(a)}return o}},e=new WeakSet,Li=function(i){var r;for(const o of this.childNodes){if(o.type==="text")continue;if(i(o))return o;const a=j(r=o,e,Li).call(r,i);if(a)return a}},Fi=function(i,r=[]){var o;for(const a of this.childNodes)a.type!=="text"&&(i(a)&&r.push(a),j(o=a,e,Fi).call(o,i,r));return r},n)}}),Mt,$s,_n,$n,Tn,Cn,Ts,Cs,ji,ia=T({"lib/text.ts"(){"use strict";var e,gl,s;oe(),M(),B(),ul(),Mt=String.raw`[${Ce}\t]*`,$s=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Mt}\d)|isbn(?=[-::]?${Mt}(?:\d(?:${Mt}|-)){6})`,_n=new RegExp(String.raw`${$s}|https?[:/]/+`,"giu"),$n=new RegExp($s,"giu"),Tn=new Set(["attr-value","ext-link-text","link-text"]),Cn={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ts=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"]);try{Cs=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{Cs=/\w/u}ji=(s=class extends Ct{constructor(l){super();N(this,e);Se(this,"data","");this.data=l}get type(){return"text"}toString(l){var i;return l&&!((i=this.parentNode)!=null&&i.getAttribute("built"))?me(this.data):this.data}text(){return this.data}lint(l=this.getAbsoluteIndex(),i){var C,I,U;if(i===!1)return[];const{data:r,parentNode:o,nextSibling:a,previousSibling:h}=this;if(!o)throw new Error("An isolated text node cannot be linted!");const{type:d,name:u,parentNode:g}=o;if(d==="attr-value"){const{name:F,tag:P}=g;if(P==="ref"&&(F==="name"||F==="extends"||F==="follow")||F==="group"&&(P==="ref"||P==="references")||P==="choose"&&(F==="before"||F==="after"))return[]}if(i!=null||(i=d==="free-ext-link"||d==="ext-link-url"||d==="ext-link-text"||d==="image-parameter"&&u==="link"||d==="attr-value"?$n:_n),r.search(i)===-1)return[];i.lastIndex=0;const c=[],p=a==null?void 0:a.type,v=a==null?void 0:a.name,m=h==null?void 0:h.type,x=this.getRootNode(),b=x.toString(),{ext:w,html:y,variants:A}=x.getAttribute("config"),{top:k,left:S}=x.posFromIndex(l),$=new Set(["onlyinclude","noinclude","includeonly",...w,...y[0],...y[1],...y[2],...Ts]);for(let F=i.exec(r);F;F=i.exec(r)){const[,P,X]=F;let{index:W,0:Q}=F;if(X&&X!=="]"){const{length:ce}=X;W+=ce,Q=Q.slice(ce)}Q=Q.toLowerCase();const[z]=Q,ie=z==="r"||z==="p"||z==="i",q=z==="{",D=z==="}",H=z==="[",J=z==="]";let{length:ne}=Q;if(z==="<"&&!$.has(P.toLowerCase())||H&&d==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(W+1))||a!=null&&a.is("ext")&&v==="nowiki"&&((C=a.innerText)!=null&&C.includes("]")))||ie&&(!o.isPlain()||Tn.has(d)))continue;J&&(W||ne>1)&&i.lastIndex--;let K=l+W,re=K+ne,ue,ye;const je=b[re],ms=b[K-1],vs=q||H,bs=q&&ms==="-"&&A.length>0,ws=D&&je==="-"&&A.length>0,dn=H&&p==="free-ext-link"&&!r.slice(W+1).trim()||J&&m==="free-ext-link"&&!r.slice(0,W).includes("]");if(ie)ue="lonely-http",Q=Q.toUpperCase(),ye=_.lintConfig.getSeverity(ue,Q);else if(z==="<"){ue="tag-like";let ce;/^<\s/u.test(Q)||!/[\s/>]/u.test(je!=null?je:"")?ce="invalid":Ts.has(P)&&(ce="disallowed"),ye=_.lintConfig.getSeverity(ue,ce)}else if(bs||ws)ue="lonely-bracket",ye=_.lintConfig.getSeverity(ue,"converter"),bs&&W>0?(Q="-{",W--,K--,ne=2):ws&&W<r.length-1&&(Q="}-",re++,ne=2);else if(dn)ue="lonely-bracket",ye=_.lintConfig.getSeverity(ue,"extLink");else if(vs||D||J)if(ue="lonely-bracket",ne>1||q&&je===z||D&&ms===z)ye=_.lintConfig.getSeverity(ue,"double");else{if(!H||d!=="ext-link-text"){const ce=Cn[z],ys=vs?r.slice(W+1):r.slice(0,W);if(q&&((I=ce.exec(ys))==null?void 0:I[0])==="}"||D&&((U=ce.exec(ys))==null?void 0:U[0])==="{")continue;if(!ys.includes(z)){const gn=vs?"nextSibling":"previousSibling";let Ee=this[gn];for(;Ee&&(Ee.type!=="text"||!ce.test(Ee.data));)Ee=Ee[gn];if(Ee&&ce.exec(Ee.data)[0]!==z)continue}}ye=_.lintConfig.getSeverity(ue,"single")}else ue="lonely-http",ye=_.lintConfig.getSeverity(ue);if(!ye)continue;const hn=this.posFromIndex(W),{line:un,character:cn}=Ni(k,S,hn.top+1,hn.left),ze={rule:ue,message:_.msg('lonely "$1"',ie||z==="h"||bs||ws?Q:z),severity:ye,startIndex:K,endIndex:re,startLine:un,endLine:un,startCol:cn,endCol:cn+ne};if(z==="<")ze.suggestions=[{desc:"escape",range:[K,K+1],text:"<"}];else if(z==="h"&&d!=="link-text"&&Cs.test(ms||""))ze.suggestions=[{desc:"whitespace",range:[K,K],text:" "}];else if(H&&d==="ext-link-text"){const ce=o.getAbsoluteIndex()+o.toString().length;ze.suggestions=[{desc:"escape",range:[ce,ce+1],text:"]"}]}else if(J&&dn){const ce=l-h.toString().length;ze.suggestions=[{desc:"left bracket",range:[ce,ce],text:"["}]}else ie&&(ze.suggestions=[...F[0]===Q?[]:[{desc:"uppercase",range:[K,re],text:Q}],...je===":"||je===":"?[{desc:"whitespace",range:[re,re+1],text:" "}]:[]]);c.push(ze)}return c}replaceData(l){j(this,e,gl).call(this,l)}print(){return Ft(this.data)}},e=new WeakSet,gl=function(l){this.setAttribute("data",l)},s)}}),We,nt=T({"mixin/hidden.ts"(){"use strict";pe(),We=(e=!0,t=!0)=>s=>{class n extends s{text(){return""}lint(i){return e?[]:super.lint(i)}}return lt(n,s),n}}}),Me,rt=T({"src/syntax.ts"(){"use strict";var e,t;O(),Me=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}lint(n=this.getAbsoluteIndex()){return super.lint(n,!1)}},e=new WeakMap,t)}}),_e,Ie=T({"mixin/padded.ts"(){"use strict";pe(),_e=({length:e})=>t=>{class s extends t{getAttribute(l){return l==="padding"?e:super.getAttribute(l)}}return lt(s,t),s}}}),ge,Ne=T({"src/atom.ts"(){"use strict";var e,t;O(),ge=(t=class extends E{constructor(n,l,i,r,o){super(n,i,r,o);N(this,e);L(this,e,l)}get type(){return f(this,e)}set type(n){L(this,e,n)}getAttribute(n){var l;return n==="invalid"?this.type==="converter-flag"&&!!((l=this.parentNode)!=null&&l.isInvalidFlag(this)):super.getAttribute(n)}},e=new WeakMap,t)}}),In,Nn,Is,Ln,Te,ds=T({"src/link/base.ts"(){"use strict";var e,t,s,n;M(),qe(),oe(),ae(),Ie(),B(),O(),Ne(),In=l=>l==="redirect-target"||l==="link",Nn=[_e("[[")],Te=(n=class extends(Ln=E){constructor(i,r,o,a=[],h="|"){super(void 0,o,a,{});N(this,e,!0);N(this,t);N(this,s);if(this.insertAt(new ge(i,"link-target",o,a,{})),r!==void 0){const d=new E(r,o,a,{});d.type="link-text",d.setAttribute("stage",xe-1),this.insertAt(d)}L(this,t,h)}get link(){}get fragment(){return f(this,s).fragment}afterBuild(){L(this,s,this.getTitle()),f(this,t).includes("\0")&&L(this,t,this.buildFromStr(f(this,t),0)),this.setAttribute("name",f(this,s).title),super.afterBuild()}setAttribute(i,r){i==="bracket"?L(this,e,r):i==="title"?L(this,s,r):super.setAttribute(i,r)}toString(i){const r=super.toString(i,f(this,t));return f(this,e)?`[[${r}]]`:r}text(){const i=super.text("|");return f(this,e)?`[[${i}]]`:i}getAttribute(i){return i==="title"?f(this,s):super.getAttribute(i)}getGaps(i){return i===0?f(this,t).length:1}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{childNodes:[a,h],type:d}=this,{encoded:u,fragment:g}=f(this,s),c=new le(this,i);let p="unknown-page",v=_.lintConfig.getSeverity(p);if(v&&a.childNodes.some(({type:m})=>m==="template")&&o.push(R(a,c,p,"template in an internal link target",v)),p="url-encoding",v=_.lintConfig.getSeverity(p),v&&u){const m=R(a,c,p,"unnecessary URL encoding in an internal link",v);m.fix={desc:"decode",range:[m.startIndex,m.endIndex],text:Nt(a.text())},o.push(m)}if(p="pipe-like",v=_.lintConfig.getSeverity(p,"link"),v&&(d==="link"||d==="category")){const m=h==null?void 0:h.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),x=h==null?void 0:h.childNodes[m];if(x){const b=R(h,c,p,'additional "|" in the link text',v),w=b.startIndex+h.getRelativeIndex(m);b.suggestions=[{desc:"escape",range:[w,w+x.data.length],text:x.data.replace(/\|/gu,"|")}],o.push(b)}}if(p="no-ignored",v=_.lintConfig.getSeverity(p,"fragment"),v&&g!==void 0&&!In(d)){const m=R(a,c,p,"useless fragment",v),x=a.childNodes.findIndex(w=>w.type==="text"&&w.data.includes("#")),b=a.childNodes[x];b&&(m.fix={desc:"remove",range:[m.startIndex+a.getRelativeIndex(x)+b.data.indexOf("#"),m.endIndex],text:""}),o.push(m)}return o}getTitle(i,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:i,decode:!0,selfLink:!0})}print(){return super.print(f(this,e)?{pre:"[[",post:"]]",sep:f(this,t)}:{sep:f(this,t)})}json(i,r=this.getAbsoluteIndex()){const o=super.json(void 0,r),{type:a,fragment:h}=this;return h!==void 0&&(a==="link"||a==="redirect-target")&&(o.fragment=h),o}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n),Is=Z(Ln),Te=te(Is,0,"LinkBaseToken",Nn,Te),ee(Is,1,Te)}}),Le,Ue=T({"src/nowiki/base.ts"(){"use strict";O(),Le=class extends E{get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}}}}),Fn,Ns,jn,he,Fe=T({"src/nowiki/noinclude.ts"(){"use strict";nt(),Ue(),Fn=[We()],he=class extends(jn=Le){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Ns=Z(jn),he=te(Ns,0,"NoincludeToken",Fn,he),ee(Ns,1,he)}}),pl,na=T({"src/link/redirectTarget.ts"(){"use strict";M(),B(),ds(),Fe(),pl=class extends Te{get type(){return"redirect-target"}constructor(e,t,s,n){super(e,void 0,s,n),t!==void 0&&this.insertAt(new he(t,s,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(e=this.getAbsoluteIndex()){const t=super.lint(e,!1),s="no-ignored",n=_.lintConfig.getSeverity(s,"redirect");if(n&&this.length===2){const l=R(this.lastChild,{start:e},s,"useless link text",n);l.startIndex--,l.startCol--,l.fix={desc:"remove",range:[l.startIndex,l.endIndex],text:""},t.push(l)}return t}}}}),En,Ls,Pn,xt,ra=T({"src/redirect.ts"(){"use strict";var e,t,s;nt(),O(),rt(),na(),En=[We(!1,!1)],xt=(s=class extends(Pn=E){constructor(l,i,r,o,a,h,d=[]){super(void 0,h,d);N(this,e);N(this,t);L(this,e,l),L(this,t,a),this.append(new Me(i,"redirect-syntax",h,d),new pl(r,o==null?void 0:o.slice(1),h,d))}get type(){return"redirect"}getAttribute(l){return l==="padding"?f(this,e).length:super.getAttribute(l)}toString(l){return f(this,e)+super.toString(l)+f(this,t)}lint(l=this.getAbsoluteIndex()){const i=l+f(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",i),this.lastChild.lint(i)}print(){return super.print({pre:f(this,e),post:f(this,t)})}},e=new WeakMap,t=new WeakMap,s),Ls=Z(Pn),xt=te(Ls,0,"RedirectToken",En,xt),ee(Ls,1,xt)}}),fl={};Y(fl,{parseRedirect:()=>xl});var xl,la=T({"parser/redirect.ts"(){"use strict";B(),ra(),xl=(e,t,s)=>{var l;(l=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const n=t.regexRedirect.exec(e);return n&&_.normalizeTitle(n[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0}).valid?(e=`\0${s.length}o${e.slice(n[0].length)}`,new xt(...n.slice(1),t,s),e):!1}}}),Rn,Fs,On,mt,oa=T({"src/onlyinclude.ts"(){"use strict";Ie(),O(),Rn=[_e("<onlyinclude>")],mt=class extends(On=E){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}},Fs=Z(On),mt=te(Fs,0,"OnlyincludeToken",Rn,mt),ee(Fs,1,mt)}}),Pt,hs=T({"mixin/gapped.ts"(){"use strict";pe(),Pt=(e=1)=>t=>{class s extends t{getGaps(){return e}}return lt(s,t),s}}}),Bn,js,qn,Re,Vi=T({"src/tagPair/index.ts"(){"use strict";var e,t;hs(),O(),Bn=[Pt()],Re=(t=class extends(qn=E){constructor(n,l,i,r,o,a=[]){super(void 0,o);N(this,e);Se(this,"closed");Se(this,"selfClosing");this.setAttribute("name",n.toLowerCase()),L(this,e,[n,r||n]),this.closed=r!=="",this.selfClosing=r===void 0,this.append(l,i);const h=typeof l=="string"?-1:a.indexOf(l);a.splice(h===-1?1/0:h,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(n){const{selfClosing:l,firstChild:i,lastChild:r}=this,[o,a]=f(this,e);return l?`<${o}${i.toString(n)}/>`:`<${o}${i.toString(n)}>${r.toString(n)}${this.closed?`</${a}>`:""}`}text(){const[n,l]=f(this,e);return this.selfClosing?`<${n}${this.firstChild.text()}/>`:`<${n}${super.text(">")}${this.closed?`</${l}>`:""}`}getAttribute(n){return n==="padding"?f(this,e)[0].length+1:super.getAttribute(n)}print(){const[n,l]=f(this,e);return super.print(this.selfClosing?{pre:`<${n}`,post:"/>"}:{pre:`<${n}`,sep:">",post:this.closed?`</${l}>`:""})}},e=new WeakMap,t),js=Z(qn),Re=te(js,0,"TagPairToken",Bn,Re),ee(js,1,Re)}}),ml,aa=T({"src/tagPair/translate.ts"(){"use strict";var e,vl,s;O(),Vi(),rt(),Fe(),ml=(s=class extends Re{constructor(l,i,r,o=[]){const a=new Me(l,"translate-attr",r,o);i=i==null?void 0:i.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(d,u,g,c)=>(new he(u,r,o),new he(c,r,o),`\0${o.length-1}n${g}\0${o.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(d,u,g,c,p)=>(new he(u,r,o),new he(p,r,o),`\0${o.length-1}n${c}\0${o.length}n`));const h=new E(i,r,o);h.type="translate-inner";super("translate",a,h,"translate",r,o);N(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(l){return l?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${j(this,e,vl).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}},e=new WeakSet,vl=function(){return this.firstChild.toString()===" nowrap"},s)}}),Wn,Es,Mn,vt,da=T({"src/tagPair/include.ts"(){"use strict";M(),ae(),nt(),B(),Vi(),Wn=[We(!1)],vt=class extends(Mn=Re){get type(){return"include"}constructor(e,t="",s,n,l,i){super(e,t,s!=null?s:"",s===void 0||n!=null?n:"",l,i)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){const t=[],{firstChild:s,closed:n,name:l}=this,i=new le(this,e),r=["no-ignored","unclosed-comment"],o=r.map(a=>_.lintConfig.getSeverity(a,"include"));if(o[0]&&s.data.trim()){const a=R(s,i,r[0],"useless attribute",o[0]);a.suggestions=[{desc:"remove",range:[a.startIndex,a.endIndex],text:""}],t.push(a)}if(o[1]&&!n){const a=V(this,i,r[1],_.msg("unclosed $1",`<${l}>`),o[1]);a.suggestions=[{desc:"close",range:[a.endIndex,a.endIndex],text:`</${l}>`}],t.push(a)}return t}},Es=Z(Mn),vt=te(Es,0,"IncludeToken",Wn,vt),ee(Es,1,vt)}}),us,Qi=T({"mixin/attributesParent.ts"(){"use strict";pe(),us=(e=0)=>t=>{var n,Ei;class s extends t{constructor(){super(...arguments);N(this,n)}hasAttr(o){return j(this,n,Ei).call(this).hasAttr(o)}getAttr(o){return j(this,n,Ei).call(this).getAttr(o)}}return n=new WeakSet,Ei=function(){return this.childNodes[e]},lt(s,t),s}}}),se,Ps,Rs,ut,Ut,Os,Pe,Bs,qs,Ws,zt,Ms,be,bl,wl,yl,Sl,ha=T({"util/sharable.ts"(){"use strict";se=new Set(["align"]),Ps=new Set(["cite"]),Rs=new Set(["cite","datetime"]),ut=new Set(["width"]),Ut=new Set(["axis","align","bgcolor","height","width","valign"]),Os=new Set([...Ut,"abbr","headers","scope","rowspan","colspan"]),Pe=new Set(["type"]),Bs=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),qs=new Set(["clear"]),Ws=new Set(["bgcolor","align","valign"]),zt=new Set(["qid","forcemathmode","type","display"]),Ms=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),be=new Set,bl=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"]),wl={div:se,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,blockquote:Ps,q:Ps,p:se,br:qs,pre:ut,ins:Rs,del:Rs,ul:Pe,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Bs,"border"]),caption:se,tr:Ws,td:Os,th:Os,font:new Set(["size","color","face"]),hr:ut,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Pe,poem:se,categorytree:se,combooption:se,math:be,chem:be,ce:be,img:new Set(["alt","src","width","height","loading"])},yl={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:be,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:be,inputbox:be,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:be,poll:new Set(["id","show-results-before-voting"]),sm2:Pe,flashmp3:Pe,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([...zt,"chem"]),chem:zt,ce:zt,hiero:be,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Ms,syntaxhighlight:Ms,templatedata:be,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:be},Sl={table:Bs,td:new Set([...Ut,"scope"]),th:Ut,br:qs,caption:se,div:se,hr:ut,h1:se,h2:se,h3:se,h4:se,h5:se,h6:se,li:Pe,p:se,pre:ut,tr:Ws,ul:Pe}}}),Un,zn,Hn,Dn,Kt,ua=T({"src/attribute.ts"(){"use strict";var e,t,s,n,l,Pi,r;M(),oe(),qe(),ha(),ae(),B(),O(),Ne(),Un=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,zn=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,Hn=new Set(["ext","arg","magic-word","template"]),Dn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Kt=(r=class extends E{constructor(a,h,d,u="",g,c=[],p=_.getConfig(),v=[]){const m=new ge(d,"attr-key",p,v);let x;if(d==="title"||h==="img"&&d==="alt")x=new E(g,p,v,{}),x.type="attr-value",x.setAttribute("stage",xe-1);else if(h==="gallery"&&d==="caption"||h==="choose"&&(d==="before"||d==="after")||h==="img"&&d==="src"&&(g!=null&&g.includes("{{"))){const b={...p,excludes:[...p.excludes,"heading","html","table","hr","list"]};x=new E(g,b,v,{}),x.type="attr-value",x.setAttribute("stage",1)}else x=new ge(g,"attr-value",p,v,{});super(void 0,p,v);N(this,l);N(this,e);N(this,t);N(this,s);N(this,n);L(this,e,a),this.append(m,x),L(this,s,u),L(this,n,[...c]),L(this,t,h),this.setAttribute("name",et(me(d)))}get type(){return f(this,e)}get tag(){return f(this,t)}get balanced(){return!f(this,s)||f(this,n)[0]===f(this,n)[1]}afterBuild(){f(this,s).includes("\0")&&L(this,s,this.buildFromStr(f(this,s),0)),this.parentNode&&L(this,t,this.parentNode.name),this.setAttribute("name",et(this.firstChild.text())),super.afterBuild()}toString(a){const[h="",d=""]=f(this,n);return f(this,s)?super.toString(a,f(this,s)+h)+d:this.firstChild.toString(a)}text(){return f(this,s)?`${super.text(`${f(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var a,h;return f(this,s)?f(this,s).length+((h=(a=f(this,n)[0])==null?void 0:a.length)!=null?h:0):0}lint(a=this.getAbsoluteIndex(),h){var y;const d=super.lint(a,h),{balanced:u,firstChild:g,lastChild:c,name:p,tag:v}=this,m=new le(this,a),x=["unclosed-quote","obsolete-attr"],b=x.map(A=>_.lintConfig.getSeverity(A,p));if(b[0]&&!u){const A=R(c,m,x[0],_.msg("unclosed $1","quotes"),b[0]);A.startIndex--,A.startCol--,A.suggestions=[{desc:"close",range:[A.endIndex,A.endIndex],text:f(this,n)[0]}],d.push(A)}const w=j(this,l,Pi).call(this,a,m);return w&&d.push(w),b[1]&&((y=Sl[v])!=null&&y.has(p))&&d.push(R(g,m,x[1],"obsolete attribute",b[1])),d}getValue(){return f(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}getAttribute(a){return a==="invalid"?j(this,l,Pi).call(this):super.getAttribute(a)}print(){const[a="",h=""]=f(this,n);return f(this,s)?super.print({sep:Ft(f(this,s))+a,post:h}):super.print()}json(a,h=this.getAbsoluteIndex()){const d=super.json(void 0,h);return d.tag=this.tag,d}},e=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,l=new WeakSet,Pi=function(a,h){const{firstChild:d,lastChild:u,type:g,name:c,tag:p,parentNode:v}=this,m=!u.childNodes.some(({type:k})=>Hn.has(k)),x=this.getValue(),b=yl[p],w=wl[p],{length:y}=this.toString();let A="illegal-attr";if(!(b!=null&&b.has(c))&&!(w!=null&&w.has(c))&&(g==="ext-attr"?b||w:!/\{\{[^{]+\}\}/u.test(c))&&(g==="ext-attr"&&!w||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(c)&&(p==="meta"||p==="link"||!bl.has(c)))||(c==="itemtype"||c==="itemid"||c==="itemref")&&!(v!=null&&v.hasAttr("itemscope"))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"unknown");if(k){const S=R(d,h,A,"illegal attribute name",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""}],S}}else if(c==="style"&&typeof x=="string"&&Un.test(x)){if(a===void 0)return!0;A="insecure-style";const k=_.lintConfig.getSeverity(A);return k&&R(u,h,A,"insecure style",k)}else if(c==="tabindex"&&typeof x=="string"&&x!=="0"){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"tabindex");if(k){const S=R(u,h,A,"nonzero tabindex",k);return S.suggestions=[{desc:"remove",range:[a,a+y],text:""},{desc:"0 tabindex",range:[S.startIndex,S.endIndex],text:"0"}],S}}else if(m&&g!=="ext-attr"){const k=hl(p,c),S=String(x).toLowerCase();if(k.length>0&&k.every($=>$!==S)){if(a===void 0)return!0;const $=_.lintConfig.getSeverity(A,"value");return $&&R(u,h,A,"illegal attribute value",$)}}else if(typeof x=="string"&&((/^xmlns:[\w:.-]+$/u.test(c)||Dn.has(c))&&zn.test(x)||m&&(c==="href"||p==="img"&&c==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(x))){if(a===void 0)return!0;const k=_.lintConfig.getSeverity(A,"value");return k&&R(u,h,A,"illegal attribute value",k)}return!1},r)}}),Us,Gn,zs,cs,Ji=T({"src/attributes.ts"(){"use strict";var e,t,Yt,n;M(),oe(),ae(),B(),O(),Ne(),ua(),Us=l=>l.slice(0,-1),Gn=l=>`${Us(l)}-dirty`;try{zs=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{zs=/[^\W_]/u}cs=(n=class extends E{constructor(i,r,o,a,h=[]){super(void 0,a,h,{});N(this,t);N(this,e);if(L(this,e,r),this.setAttribute("name",o),i){const d=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let u="",g=d.exec(i),c=0;const p=()=>{u&&(super.insertAt(new ge(u,Gn(r),a,h,{})),u="")};for(;g;){const{index:v,0:m,1:x,2:b,3:w,4:y,5:A,6:k}=g;if(u+=i.slice(c,v),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(me(x).trim())){const S=y!=null?y:k,$=[w,A],C=new Kt(Us(r),o,x,b,S,$,a,h);p(),super.insertAt(C)}else u+=m;({lastIndex:c}=d),g=d.exec(i)}u+=i.slice(c),p()}}get type(){return f(this,e)}afterBuild(){const{parentNode:i}=this;i!=null&&i.is("td")&&this.setAttribute("name",i.subtype),super.afterBuild()}getAttrTokens(i){return this.childNodes.filter(r=>r instanceof Kt&&(!i||r.name===et(i)))}hasAttr(i){return this.getAttrTokens(i).length>0}getAttrToken(i){const r=this.getAttrTokens(i);return r[r.length-1]}getAttr(i){var r;return(r=this.getAttrToken(i))==null?void 0:r.getValue()}lint(i=this.getAbsoluteIndex(),r){const o=super.lint(i,r),{parentNode:a,childNodes:h}=this,d=new Map,u=new Set,g=new le(this,i),c=["no-ignored","no-duplicate"],p=["closingTag","invalidAttributes","nonWordAttributes"].map(m=>_.lintConfig.getSeverity(c[0],m));if(p[0]&&j(this,t,Yt).call(this)){const m=V(this,g,c[0],"attributes of a closing tag",p[0]),x=a.getAbsoluteIndex();m.suggestions=[{desc:"remove",range:[i,m.endIndex],text:""},{desc:"open",range:[x+1,x+2],text:""}],o.push(m)}for(const m of h)if(m instanceof Kt){const{name:x}=m;d.has(x)?(u.add(x),d.get(x).push(m)):d.set(x,[m])}else{const x=m.text().trim(),b=p[zs.test(x)?1:2];if(x&&b){const w=R(m,g,c[0],"containing invalid attribute",b);w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:" "}],o.push(w)}}const v=_.lintConfig.getSeverity(c[1],"attribute");if(v&&u.size>0)for(const m of u){const x=d.get(m).map(b=>{const w=b.getValue();return[b,w===!0?"":w]});o.push(...x.map(([b,w],y)=>{const A=R(b,g,c[1],_.msg("duplicated $1 attribute",m),v),k={desc:"remove",range:[A.startIndex,A.endIndex],text:""};return!w||x.slice(0,y).some(([,S])=>S===w)?A.fix=k:A.suggestions=[k],A}))}return o}getAttribute(i){return i==="invalid"?j(this,t,Yt).call(this):super.getAttribute(i)}print(){return this.toString()?`<span class="wpb-${this.type}${j(this,t,Yt).call(this)?" wpb-invalid":""}">${this.childNodes.map(i=>i.print(i instanceof ge?{class:i.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,Yt=function(){const{parentNode:i}=this;return(i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()!==""},n)}}),Al={};Y(Al,{PreToken:()=>kl});var kl,ca=T({"src/pre.ts"(){"use strict";qe(),O(),Fe(),kl=class extends E{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const n=/<nowiki>/giu,l=/<\/nowiki>/giu,{length:i}=n.source;let r=n.exec(e);r&&(l.lastIndex=r.index+i);let o=l.exec(e),a=0,h="";for(;r&&o;)new he(r[0],t,s),new he(o[0],t,s),h+=`${e.slice(a,r.index)}\0${s.length-1}n${e.slice(r.index+i,o.index)}\0${s.length}n`,a=o.index+i+1,n.lastIndex=a,r=n.exec(e),r&&(l.lastIndex=r.index+i),o=l.exec(e);e=h+e.slice(a)}super(e,t,s,{}),this.setAttribute("stage",xe-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),gs,Xi=T({"mixin/multiLine.ts"(){"use strict";pe(),gs=e=>{class t extends e{toString(n){return super.toString(n,`
|
|
3
3
|
`)}text(){return super.text(`
|
|
4
4
|
`).replace(/\n\s*\n/gu,`
|
|
5
5
|
`)}getGaps(){return 1}print(){return super.print({sep:`
|
package/config/default.json
CHANGED
|
@@ -567,6 +567,7 @@
|
|
|
567
567
|
"translation",
|
|
568
568
|
"chart",
|
|
569
569
|
"avatar",
|
|
570
|
+
"img",
|
|
570
571
|
"mentor"
|
|
571
572
|
],
|
|
572
573
|
"variable": [
|
|
@@ -936,6 +937,7 @@
|
|
|
936
937
|
"#头像": "avatar",
|
|
937
938
|
"#頭像": "avatar",
|
|
938
939
|
"#avatar": "avatar",
|
|
940
|
+
"#img": "img",
|
|
939
941
|
"wb報表名稱": "wbreponame",
|
|
940
942
|
"wb报告名": "wbreponame",
|
|
941
943
|
"wbreponame": "wbreponame"
|
package/config/minimum.json
CHANGED
package/config/moegirl.json
CHANGED
|
@@ -396,6 +396,7 @@
|
|
|
396
396
|
"vardefine",
|
|
397
397
|
"vardefineecho",
|
|
398
398
|
"invoke",
|
|
399
|
+
"img",
|
|
399
400
|
"related"
|
|
400
401
|
],
|
|
401
402
|
"variable": [
|
|
@@ -629,6 +630,7 @@
|
|
|
629
630
|
"样式路径": "stylepath",
|
|
630
631
|
"stylepath": "stylepath",
|
|
631
632
|
"msgnw": "msgnw",
|
|
633
|
+
"#img": "img",
|
|
632
634
|
"#related": "related"
|
|
633
635
|
},
|
|
634
636
|
{
|
package/dist/lib/document.js
CHANGED
|
@@ -113,7 +113,7 @@ class EmbeddedDocument {
|
|
|
113
113
|
this.languageId = id;
|
|
114
114
|
this.lineCount = root.getLines().length;
|
|
115
115
|
this.#root = root;
|
|
116
|
-
this.#content =
|
|
116
|
+
this.#content = token.toString();
|
|
117
117
|
this.#offset = token.getAbsoluteIndex();
|
|
118
118
|
this.pre = pre;
|
|
119
119
|
this.#post = post;
|
package/dist/lib/element.js
CHANGED
|
@@ -260,9 +260,9 @@ let AstElement = (() => {
|
|
|
260
260
|
/**
|
|
261
261
|
* 符合条件的所有后代节点
|
|
262
262
|
* @param condition 条件
|
|
263
|
+
* @param descendants 已经找到的后代节点
|
|
263
264
|
*/
|
|
264
|
-
#getElementsBy(condition) {
|
|
265
|
-
let descendants = [];
|
|
265
|
+
#getElementsBy(condition, descendants = []) {
|
|
266
266
|
for (const child of this.childNodes) {
|
|
267
267
|
if (child.type === 'text') {
|
|
268
268
|
continue;
|
|
@@ -270,7 +270,7 @@ let AstElement = (() => {
|
|
|
270
270
|
else if (condition(child)) {
|
|
271
271
|
descendants.push(child);
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
child.#getElementsBy(condition, descendants);
|
|
274
274
|
}
|
|
275
275
|
return descendants;
|
|
276
276
|
}
|
package/dist/lib/lsp.js
CHANGED
|
@@ -227,14 +227,16 @@ const adjustPos = (height, width, line, column) => {
|
|
|
227
227
|
* Get the position of a Stylelint error.
|
|
228
228
|
* @param rect bounding client rect of the token
|
|
229
229
|
* @param bottom bottom of the style block
|
|
230
|
-
* @param
|
|
231
|
-
* @param
|
|
230
|
+
* @param lineOrCode line number or code string
|
|
231
|
+
* @param columnOrOffset column number or offset in the code string
|
|
232
232
|
*/
|
|
233
|
-
const getStylelintPos = (rect, bottom,
|
|
233
|
+
const getStylelintPos = (rect, bottom, lineOrCode, columnOrOffset) => {
|
|
234
234
|
const { top, left, height, width } = rect, start = bottom - height - 1;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
if (typeof lineOrCode === 'number') {
|
|
236
|
+
return (0, lint_1.getEndPos)(top, left, ...adjustPos(height, width, lineOrCode - start, columnOrOffset));
|
|
237
|
+
}
|
|
238
|
+
const lines = lineOrCode.slice(0, columnOrOffset).split(/\r?\n/u);
|
|
239
|
+
return getStylelintPos(rect, bottom, lines.length, lines.at(-1).length);
|
|
238
240
|
};
|
|
239
241
|
/**
|
|
240
242
|
* Convert LilyPond errors to VSCode diagnostics.
|
|
@@ -762,7 +764,7 @@ class LanguageService {
|
|
|
762
764
|
if (tokens.length === 0) {
|
|
763
765
|
return [];
|
|
764
766
|
}
|
|
765
|
-
const
|
|
767
|
+
const code = tokens.map(({ type, tag, lastChild }, i) => `${type === 'ext-attr' ? 'div' : tag}#${i}{\n${(0, common_1.sanitizeInlineStyle)(lastChild.toString())}\n}`).join('\n'), cssErrors = await (0, stylelint_util_1.styleLint)((await document_1.stylelint), code, cssRules);
|
|
766
768
|
if (cssErrors.length === 0) {
|
|
767
769
|
return [];
|
|
768
770
|
}
|
|
@@ -772,7 +774,7 @@ class LanguageService {
|
|
|
772
774
|
acc += height + 2;
|
|
773
775
|
return acc;
|
|
774
776
|
});
|
|
775
|
-
return cssErrors.map(({ rule, text: msg, severity, line, column, endLine = line, endColumn = column, }) => {
|
|
777
|
+
return cssErrors.map(({ rule, text: msg, severity, line, column, endLine = line, endColumn = column, fix, }) => {
|
|
776
778
|
const i = bottoms.findIndex(bottom => bottom >= line);
|
|
777
779
|
return {
|
|
778
780
|
range: {
|
|
@@ -783,6 +785,21 @@ class LanguageService {
|
|
|
783
785
|
source: 'Stylelint',
|
|
784
786
|
code: rule,
|
|
785
787
|
message: msg.slice(0, msg.lastIndexOf('(') - 1),
|
|
788
|
+
...fix
|
|
789
|
+
? {
|
|
790
|
+
data: [
|
|
791
|
+
{
|
|
792
|
+
range: {
|
|
793
|
+
start: getStylelintPos(rects[i], bottoms[i], code, fix.range[0]),
|
|
794
|
+
end: getStylelintPos(rects[i], bottoms[i], code, fix.range[1]),
|
|
795
|
+
},
|
|
796
|
+
newText: fix.text,
|
|
797
|
+
title: `Fix: ${rule}`,
|
|
798
|
+
fix: true,
|
|
799
|
+
},
|
|
800
|
+
],
|
|
801
|
+
}
|
|
802
|
+
: {},
|
|
786
803
|
};
|
|
787
804
|
});
|
|
788
805
|
})() :
|
package/dist/lib/range.js
CHANGED
|
@@ -6,8 +6,13 @@ const constants_1 = require("../util/constants");
|
|
|
6
6
|
* 计算绝对位置
|
|
7
7
|
* @param referenceNode 容器
|
|
8
8
|
* @param offset 相对位置
|
|
9
|
+
* @param end 是否是终点
|
|
9
10
|
*/
|
|
10
|
-
const getIndex = (referenceNode, offset) =>
|
|
11
|
+
const getIndex = (referenceNode, offset, end) => {
|
|
12
|
+
end &&= referenceNode.type !== 'text';
|
|
13
|
+
return referenceNode.getAbsoluteIndex() + referenceNode.getRelativeIndex(offset - (end ? 1 : 0))
|
|
14
|
+
+ (end ? referenceNode.childNodes[offset - 1].toString().length : 0);
|
|
15
|
+
};
|
|
11
16
|
/**
|
|
12
17
|
* 获取父节点或抛出错误
|
|
13
18
|
* @param node 参考节点
|
|
@@ -66,7 +71,8 @@ class AstRange {
|
|
|
66
71
|
}
|
|
67
72
|
/** end character index / 终点绝对位置 */
|
|
68
73
|
get endIndex() {
|
|
69
|
-
|
|
74
|
+
const { endContainer, endOffset } = this;
|
|
75
|
+
return getIndex(endContainer, endOffset, this.#startContainer ? !this.collapsed : endOffset > 0);
|
|
70
76
|
}
|
|
71
77
|
/** end position / 终点行列位置 */
|
|
72
78
|
get endPos() {
|
package/dist/mixin/readOnly.js
CHANGED
|
@@ -19,7 +19,9 @@ const readOnly = (readonly = false) =>
|
|
|
19
19
|
index_1.default.viewOnly = readonly;
|
|
20
20
|
}
|
|
21
21
|
const result = method.apply(this, args);
|
|
22
|
-
|
|
22
|
+
if (!debug_1.Shadow.running) {
|
|
23
|
+
index_1.default.viewOnly = viewOnly;
|
|
24
|
+
}
|
|
23
25
|
return result;
|
|
24
26
|
};
|
|
25
27
|
exports.readOnly = readOnly;
|
package/dist/parser/selector.js
CHANGED
|
@@ -15,8 +15,8 @@ const attributes_1 = require("../lib/attributes");
|
|
|
15
15
|
*/
|
|
16
16
|
const basic = (selector, type, name) => {
|
|
17
17
|
if (selector.includes('#')) {
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
18
|
+
const i = selector.indexOf('#');
|
|
19
|
+
return (i === 0 || selector.slice(0, i) === type) && selector.slice(i + 1) === name;
|
|
20
20
|
}
|
|
21
21
|
return !selector || selector === type;
|
|
22
22
|
};
|
|
@@ -450,12 +450,14 @@ const checkToken = (selector, scope, has) => (token) => {
|
|
|
450
450
|
* @param scope 作用对象
|
|
451
451
|
* @param has `:has()`伪选择器
|
|
452
452
|
*/
|
|
453
|
-
const getCondition = (selector, scope, has) =>
|
|
454
|
-
/*
|
|
455
|
-
/[^a-z\-,#\s]|(?<![\s,])\s+(?![\s,])/u.test(selector.trim())
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
/*
|
|
459
|
-
);
|
|
453
|
+
const getCondition = (selector, scope, has) => {
|
|
454
|
+
/* NOT FOR BROWSER */
|
|
455
|
+
if (/[^a-z\-,#\s]|(?<![\s,])\s+(?![\s,])/u.test(selector.trim())) {
|
|
456
|
+
return checkToken(selector, scope, has);
|
|
457
|
+
}
|
|
458
|
+
/* NOT FOR BROWSER END */
|
|
459
|
+
const parts = selector.split(',');
|
|
460
|
+
return (({ type, name }) => parts.some(str => basic(str.trim(), type, name)));
|
|
461
|
+
};
|
|
460
462
|
exports.getCondition = getCondition;
|
|
461
463
|
constants_1.parsers['parseSelector'] = __filename;
|
package/extensions/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var _a;
|
|
3
|
-
const version = '1.22.
|
|
3
|
+
const version = '1.22.1', 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://testingcf.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.22.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"color-name": "^2.0.0",
|
|
88
88
|
"entities": "^6.0.0",
|
|
89
89
|
"mathjax": "^3.2.2",
|
|
90
|
-
"stylelint": "^16.
|
|
90
|
+
"stylelint": "^16.22.0",
|
|
91
91
|
"vscode-css-languageservice": "^6.3.7",
|
|
92
92
|
"vscode-html-languageservice": "^5.5.1",
|
|
93
93
|
"vscode-json-languageservice": "^5.6.1"
|