Files
client/node_modules/prettier/plugins/html.mjs
T

26 lines
164 KiB
JavaScript
Raw Normal View History

2026-10-07 18:56:27 +02:00
var Nr=Object.defineProperty;var Dr=e=>{throw TypeError(e)};var es=(e,t,r)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ir=(e,t)=>{for(var r in t)Nr(e,r,{get:t[r],enumerable:!0})};var Wt=(e,t,r)=>es(e,typeof t!="symbol"?t+"":t,r),ts=(e,t,r)=>t.has(e)||Dr("Cannot "+r);var qe=(e,t,r)=>(ts(e,t,"read from private field"),r?r.call(e):t.get(e)),Rr=(e,t,r)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var Zi={};Ir(Zi,{languages:()=>Ui,options:()=>zi,parsers:()=>Pr,printers:()=>$o});var ke=(e,t)=>(r,n,...i)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,i);var rs=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},ns=ke("replaceAll",function(){if(typeof this=="string")return rs}),T=ns;function is(e){return this[e<0?this.length+e:e]}var ss=ke("at",function(){if(Array.isArray(this)||typeof this=="string")return is}),I=ss;var as=()=>{},He=as;var Fe="string",Ve="array",ot="cursor",be="indent",we="align",lt="trim",Te="group",ye="fill",Ee="if-break",xe="indent-if-break",ct="line-suffix",ut="line-suffix-boundary",z="line",pt="label",Le="break-parent",ht=new Set([ot,be,we,lt,Te,ye,Ee,xe,ct,ut,z,pt,Le]);function mt(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function os(e){if(typeof e=="string")return Fe;if(Array.isArray(e))return Ve;if(!e)return;let{type:t}=e;if(ht.has(t))return t}var ft=os;var ls=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function cs(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
Expected it to be 'string' or 'object'.`;if(ft(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ls([...ht].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
Expected it to be ${n}.`}var zt=class extends Error{name="InvalidDocError";constructor(t){super(cs(t)),this.doc=t}},Or=zt;function Gt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){return mt(r,s,i)}function i(s){switch(ft(s)){case Ve:return t(s.map(n));case ye:return t({...s,parts:s.parts.map(n)});case Ee:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Te:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(n),o=a[0]):o=n(o),t({...s,contents:o,expandedStates:a})}case we:case be:case xe:case pt:case ct:return t({...s,contents:n(s.contents)});case Fe:case ot:case lt:case ut:case z:case Le:return t(s);default:throw new Or(s)}}}function L(e,t=Mr){return Gt(e,r=>typeof r=="string"?R(t,r.split(`
`)):r)}var D=He,dt=He,Br=He,qr=He;function A(e){return D(e),{type:be,contents:e}}function us(e,t){return qr(e),D(t),{type:we,contents:t,n:e}}function Hr(e){return us(Number.NEGATIVE_INFINITY,e)}var G={type:Le};function gt(e){return Br(e),{type:ye,parts:e}}function C(e,t={}){return D(e),dt(t.expandedStates,!0),{type:Te,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function $(e,t="",r={}){return D(e),t!==""&&D(t),{type:Ee,breakContents:e,flatContents:t,groupId:r.groupId}}function Fr(e,t){return D(e),{type:xe,contents:e,groupId:t.groupId,negate:t.negate}}function R(e,t){D(e),dt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var S={type:z},y={type:z,soft:!0},ps={type:z,hard:!0},k=[ps,G],hs={type:z,hard:!0,literal:!0},Mr=[hs,G];var Vr=Object.freeze({character:"'",codePoint:39}),Ur=Object.freeze({character:'"',codePoint:34}),ms=Object.freeze({preferred:Vr,alternate:Ur}),fs=Object.freeze({preferred:Ur,alternate:Vr});function Wr(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?ms:fs,{length:i}=e,s=0,a=0;for(let o=0;o<i;o++){let l=e.charCodeAt(o);l===r.codePoint?s++:l===n.codePoint&&a++}return(s>a?n:r).character}function $t(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var jt=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let i=0;i<t.length&&r.has(t.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let i=t.length-1;i>=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(I(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${$t([...this.#e].join(""))}]+`,i=new RegExp(r?`(${n})`:n);return t.split(i)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
`).map(n=>n.slice(r)).join(`
`)}},zr=jt;var ds=[" ",`
`,"\f","\r"," "],gs=new zr(ds),P=gs;var Yt=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},Gr=Yt;function j(e,t=!0){return[A([y,e]),t?y:""]}function q(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function E(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{i=n(a,o)});let s=await t(e,r,t);return i?C(s):j(s)}function _s(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/.test(s)?"":E(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},q)}var $r=_s;var Ss=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),se=Ss;var vs=Array.prototype.toReversed??function(){return[...this].reverse()},Cs=ke("toReversed",function(){if(Array.isArray(this))return vs}),jr=Cs;function ks(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??!1}var bs=ks();function Yr(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function ws(e){return e=Yr(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Ts(e){e=Yr(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Kt(e){return bs?Ts(e):ws(e)}var Kr=e=>String(e).split(/[/\\]/).pop(),Qr=e=>String(e).startsWith("file:");function ys(e){return Array.isArray(e)&&e.length>0}var X=ys;function Xr(e,t){if(!t)return;let r=Kr(t).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(i=>r.endsWith(i)))}function Es(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var xs=void 0;function Jr(e,t){if(t){if(Qr(t))try{t=Kt(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function Ls(e,t){let r=jr(0,e.plugins).flatMap(i=>i.languages??[]);return(Es(r,t.language)??Xr(r,t.physicalFile)??Xr(r,t.file)??Jr(r,t.physicalFile)??Jr(r,t.file)??xs?.(r,t.physicalFile))?.parsers[0]}var _t=Ls;var St=Symbol.for("PRETTIER_IS_FRONT_MATTER");function As(e){return!!e?.[St]}var ae=As;function Ps(e){return T(0,e,/[^\n]/g," ")}var vt=Ps;var Ue=3;function Ns(e){let t=e.slice(0,Ue);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
`,Ue);if(r===-1)return;let n=e.slice(Ue,r).trim(),i=e.indexOf(`
${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(`
...`,r)),i===-1)return;let a=i+1+Ue,o=e.charAt(a+1);if(!/\s?/.test(o))return;let l=e.slice(0,a),c;return{language:s,explicitLanguage:n||null,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:l.slice(-Ue),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return c??(c=l.split(`
`)),c.length},get column(){return c??(c=l.split(`
`)),I(0,c,-1).length}},[St]:!0}}function Ds(e){let t=Ns(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return vt(r)+e.slice(r.length)}}:{content:e}}var Qt=Ds;var Zr="inline",Xt={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",option:"block",optgroup:"block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block"},en="normal",Jt={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Is(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var oe=Is;var Rs=e=>T(0,e,/^[\t\f\r ]*\n/g,""),Zt=e=>Rs(P.trimEnd(e)),tn=e=>{let t=e,r=P.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=P.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function Ct(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||Y(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||wt(e,t)&&!O(e,t)&&e.kind!=="interpolation")}function le(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:Os(e.prev)}function Os(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function N(e){return e.kind==="text"||e.kind==="comment"}function O(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||oe(e)&&(e.name==="script"||e.name==="style"))}function rn(e,t){return e.children&&!O(e,t)}function nn(e,t){return O(e,t)||e.kind==="interpolation"||er(e)}function er(e){return dn(e).startsWith("pre")}function sn(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Y(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||Y(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Vs(e.parent.cssDisplay))||e.prev&&!zs(e.prev.cssDisplay))}}function an(e,t){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Y(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||Y(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Us(e.parent.cssDisplay))||e.next&&!Ws(e.next.cssDisplay))}function on(e,t){return Gs(e.cssDisplay)&&!O(e,t)}function We(e){return ae(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function ln(e){return tr(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>Bs(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="t
`||e==="\f"||e==="\r"||e===" "}var ea=/^[ \t\n\r\u000c]+/,ta=/^[, \t\n\r\u000c]+/,ra=/^[^ \t\n\r\u000c]+/,na=/[,]+$/,Pn=/^\d+$/,ia=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function sa(e){let t=e.length,r,n,i,s,a,o=0,l;function c(h){let f,g=h.exec(e.substring(o));if(g)return[f]=g,o+=f.length,f}let u=[];for(;;){if(c(ta),o>=t){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}l=o,r=c(ra),n=[],r.slice(-1)===","?(r=r.replace(na,""),_()):d()}function d(){for(c(ea),i="",s="in descriptor";;){if(a=e.charAt(o),s==="in descriptor")if(An(a))i&&(n.push(i),i="",s="after descriptor");else if(a===","){o+=1,i&&n.push(i),_();return}else if(a==="(")i+=a,s="in parens";else if(a===""){i&&n.push(i),_();return}else i+=a;else if(s==="in parens")if(a===")")i+=a,s="in descriptor";else if(a===""){n.push(i),_();return}else i+=a;else if(s==="after descriptor"&&!An(a))if(a===""){_();return}else s="in descriptor",o-=1;o+=1}}function _(){let h=!1,f,g,v,W,ie={},Q,at,Ce,Be,Ut;for(W=0;W<n.length;W++)Q=n[W],at=Q[Q.length-1],Ce=Q.substring(0,Q.length-1),Be=parseInt(Ce,10),Ut=parseFloat(Ce),Pn.test(Ce)&&at==="w"?((f||g)&&(h=!0),Be===0?h=!0:f=Be):ia.test(Ce)&&at==="x"?((f||g||v)&&(h=!0),Ut<0?h=!0:g=Ut):Pn.test(Ce)&&at==="h"?((v||g)&&(h=!0),Be===0?h=!0:v=Be):h=!0;if(!h)ie.source={value:r,startOffset:l},f&&(ie.width={value:f}),g&&(ie.density={value:g}),v&&(ie.height={value:v}),u.push(ie);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${Q}".`)}}var Nn=sa;var Dn=e=>e.node.fullName==="srcset"&&(e.parent.fullName==="img"||e.parent.fullName==="source"),In={width:"w",height:"h",density:"x"},aa=Object.keys(In);function Rn(e,t,r){let n=w(r.node),i=Nn(n),s=aa.filter(h=>i.some(f=>se(f,h)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[a]=s,o=In[a],l=i.map(h=>h.source.value),c=Math.max(...l.map(h=>h.length)),u=i.map(h=>h[a]?String(h[a].value):""),d=u.map(h=>{let f=h.indexOf(".");return f===-1?h.length:f}),_=Math.max(...d);return j(R([",",S],l.map((h,f)=>{let g=[h],v=u[f];if(v){let W=c-h.length+1,ie=_-d[f],Q=" ".repeat(W+ie);g.push($(Q," "),v+o)}return g})))}var On=({node:e},t)=>e.fullName==="style"&&!t.parentParser&&!e.value.includes("{{"),Mn=async(e,t,r)=>j(await e(w(r.node),{parser:"css",__isHTMLStyleAttribute:!0}));var oa=new WeakMap;function la(e,t){return mt(oa,e.root,r=>r.children.some(n=>yt(n,t)&&["ts","typescript"].includes(n.attrMap.lang)))}var H=la;function Bn(e,t,r){let n=w(r.node);return E(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},q)}function qn(e,t,r,n){let i=w(r.node),s=H(r,n)?"babel-ts":"babel";return E(`function _(${i}) {}`,e,{parser:s,__isVueBindings:!0})}async function Hn(e,t,r,n){let i=w(r.node),{left:s,operator:a,right:o}=ca(i),l=H(r,n);return[C(await E(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await E(o,e,{parser:l?"__ts_expression":"__js_expression"})]}function ca(e){let t=/(.*?)\s+(in|of)\s+(.*)/s,r=e.match(t);if(!r)return;let n={for:r[3].trim()};if(!n.for)return;let i=/,([^,\]}]*)(?:,([^,\]}]*))?$/,s=/^\(|\)$/g,a=T(0,r[1].trim(),s,""),o=a.match(i);o?(n.alias=a.replace(i,""),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=a;let l=[n.alias,n.iterator1,n.iterator2];if(!l.some((c,u)=>!c&&(u===0||l.slice(u+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:r[2],right:n.for}}var ua=[{test:e=>e.node.fullName==="v-for",print:Hn},{test:(e,t)=>e.node.fullName==="generic"&&yt(e.parent,t),print:Bn},{test:({node:e},t)=>gn(e)||_n(e,t),print:qn},{test(e){let t=e.node.fullName;return t.startsWith("@")||t.startsWith("v-on:")},print:pa},{test(e){let t=e.node.fullName;return t.startsWith(":")||t.startsWith(".")||t.startsWith("v-bind:")},print:ha},{test:e=>e.node.fullName.startsWith("v-"),print:Fn}].map(({test:e,print:t})=>({test:(r,n)=>n.parser==="vue"&&e(r,n),print:t}));async function pa(e,t,r,n){try{return await Fn(e,t,r,n)}catch(a){if(a.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=w(r.node),s=H(r,n)?"__vue_ts_event_bin
${e}`;var ti=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ri(e){let t=J(e);return e.kind==="element"&&!e.endSourceSpan&&X(e.children)?Math.max(t,ri(I(0,e.children,-1))):t}function Ze(e,t,r){let n=e.node;if(le(n)){let i=ri(n);return[B(n,t),L(P.trimEnd(t.originalText.slice(F(n)+(n.prev&&je(n.prev)?Lt(n).length:0),i-(n.next&&V(n.next)?pe(n,t).length:0)))),M(n,t)]}return r()}function Nt(e,t){return N(e)&&N(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?kt(t)?k:S:"":kt(t)?k:y:je(e)&&(le(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&V(t)?"":t.kind==="comment"&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces?y:!t.isLeadingSpaceSensitive||kt(t)||V(t)&&e.lastChild&&K(e.lastChild)&&e.lastChild.lastChild&&K(e.lastChild.lastChild)?k:t.hasLeadingSpaces?S:y}function Ae(e,t,r){let{node:n}=e;if(tr(n))return[G,...e.map(()=>{let s=e.node,a=s.prev?Nt(s.prev,s):"";return[a?[a,We(s.prev)?k:""]:"",Ze(e,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map(({node:s,index:a})=>{if(N(s)){if(s.prev&&N(s.prev)){let h=Nt(s.prev,s);if(h)return We(s.prev)?[k,k,Ze(e,t,r)]:[h,Ze(e,t,r)]}return Ze(e,t,r)}let o=[],l=[],c=[],u=[],d=s.prev?Nt(s.prev,s):"",_=s.next?Nt(s,s.next):"";return d&&(We(s.prev)?o.push(k,k):d===k?o.push(k):N(s.prev)?l.push(d):l.push($("",y,{groupId:i[a-1]}))),_&&(We(s)?N(s.next)&&u.push(k,k):_===k?N(s.next)&&u.push(k):c.push(_)),[...o,C([...l,C([Ze(e,t,r),...c],{id:i[a]})]),...u]},"children")}function ni(e,t,r){let{node:n}=e,i=[];Da(e)&&i.push("} "),i.push("@",n.name);let s=Pa(n);if(n.parameters&&(s||i.push(" "),i.push("(",C(r("parameters")),")")),s)return i.push(";"),i;if(!Na(n)){i.push(" {");let a=ii(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(A([k,Ae(e,t,r)])),a&&i.push(k,"}")):a&&i.push("}")}return C(i,{shouldBreak:!0})}function ii(e){return!(e.next?.kind==="angularControlFlowBlock"&&ti.get(e.name)?.has(e.next.name))}var Aa=e=>e?.kind==="angularControlFlowBlock"&&(e.name==="case"||e.name==="default"),Pa=e=>e?.kind==="angularControlFlowBlock"&&e.name==="default never";function Na(e){return Aa(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function Da(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!le(t)&&!ii(t)}function si(e,t,r){return[A([y,R([";",S],e.map(r,"children"))]),y]}function ai(e,t,r){let{node:n}=e;return[me(n,t),C([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",A([S,R(S,e.map(r,"cases"))])]:"",y]),ue(n,t)]}function oi(e,t,r){let{node:n}=e;return[n.value," {",C([A([y,e.map(({node:i,isLast:s})=>{let a=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&a.unshift(S),i.hasTrailingSpaces&&!s&&a.push(S)),a},"expression")]),y]),"}"]}function li(e,t,r){let{node:n}=e;if(Ct(n,t))return[B(n,t),C(Ke(e,t,r)),L(Pt(n,t)),...$e(n,t),M(n,t)];let i=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),a=u=>C([C(Ke(e,t,r),{id:s}),u,$e(n,t)]);if(n.children.length===0)return a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?S:"");let o=u=>i?Fr(u,{groupId:s}):(O(n,t)||Ge(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?u:A(u),l=()=>i?$(y,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?S:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Hr(y):y,c=()=>(n.next?V(n.next):he(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":Y(n)&&K(n.lastChild)?"":i?$(y,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrail
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=Dt(e),r=this._schema.get(t)||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Va.get(n)??n)}allKnownEventsOfElement(e){let t=Dt(e);return Array.from(this._eventSchema.get(t)??[])}normalizeAnimationStyleProperty(e){return pi(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(Ua(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function Ua(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=2,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1,canSelfClose:o=!1}={}){e&&e.length>0&&e.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a,this.canSelfClose=o??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},di,tt;function Ne(e){return tt||(di=new m({canSelfClose:!0}),tt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:0}),script:new m({contentType:0}),
`);a=o>0?i-o:i}else a--;for(;i<n&&t>0;){let o=r.charCodeAt(i);i++,t--,o==10?(s++,a=0):a++}return new gi(this.file,i,s,a)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,a=0,o=0;for(;a<t&&i>0&&(i--,a++,!(n[i]==`
`&&++o==r)););for(a=0,o=0;a<t&&s<n.length-1&&(s++,a++,!(n[s]==`
`&&++o==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},rt=class{content;url;constructor(e,t){this.content=e,this.url=t}},p=class{start;end;fullStart;details;constructor(e,t,r=e,n=null){this.start=e,this.end=t,this.fullStart=r,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Wa=(function(e){return e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR",e})({}),te=class extends Error{span;msg;level;relatedError;constructor(e,t,r=1,n){super(t),this.span=e,this.msg=t,this.level=r,this.relatedError=n,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Wa[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var de=class{sourceSpan;i18n;constructor(e,t){this.sourceSpan=e,this.i18n=t}},_i=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitText(this,t)}kind="text"},Si=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitCdata(this,t)}kind="cdata"},vi=class extends de{switchValue;type;cases;switchValueSourceSpan;constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}kind="expansion"},Ci=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}kind="expansionCase"},ki=class extends de{name;value;keySpan;valueSpan;valueTokens;constructor(e,t,r,n,i,s,a){super(r,a),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s}visit(e,t){return e.visitAttribute(this,t)}kind="attribute";get nameSpan(){return this.keySpan}},bi=class{value;type;sourceSpan;constructor(e,t,r){this.value=e,this.type=t,this.sourceSpan=r}visit(e,t){return e.visitStartTagComment?e.visitStartTagComment(this,t):void 0}kind="startTagComment"},re=class extends de{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;nameSpan;isVoid;comments;constructor(e,t,r,n,i,s,a,o=null,l=null,c,u,d=[]){super(s,u),this.name=e,this.attrs=t,this.directives=r,this.children=n,this.isSelfClosing=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=l,this.isVoid=c,this.comments=d}visit(e,t){return e.visitElement(this,t)}kind="element"},wi=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}kind="comment"},Ti=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}kind="docType"},ge=class extends de{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i,s,a=null,o){super(n,o),this.name=e,this.parameters=t,this.children=r,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=a}visit(e,t){return e.visitBlock(this,t)}kind="block"},U=class extends de{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;comments;constructor(e,t,r,n,i,s,a,o,l,c=null,u,d=[]){super(o,u),this.componentName=e,this.tagName=t,this.fullName=r,this.attrs=n,this.directives=i,this.children=s,this.isSelfClosing=a,this.startSourceSpan=l,this.endSourceSpan=c,this.comments=d}visit(e,t){return e.visitComponent(this,t)}kind="component"},yi=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i=null){this.name=e,this.attrs=t,this.sourceSpan=r,this.startSourceSpan=n,this.endSourceSpan=i}visit(e,t){return e.visitDirective(this,t)}kind="directive"},fr=class{expression;sourceSpan;constructor(e,t){this.expression=e,this.sourceSpan=t}visit(e,t){return e.visitBlockParameter(this,t)}kind="blockParameter";startSourceSpan=null;endSourceSpan=null},dr=class{name;value;sourceSpan;nameSpan;valueSpa
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(43),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();this._attemptCharCodeUntilFn(n=>nt(n)?!e:ro(n)?(e=!0,!1):!0);let r=this._cursor.getChars(t).trim();return Ka.test(r)?r="else if":Ya.test(r)&&(r="default never"),r}_consumeBlockStart(e){this._requireCharCode(64),this._beginToken(26,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{t.type=30;return}if(t.parts[0]==="default never"&&this._attemptCharCode(59)){this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([]);return}this._attemptCharCode(123)?(this._beginToken(27),this._endToken([])):this._isBlockStart()&&(t.parts[0]==="case"||t.parts[0]==="default")?(this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([])):t.type=30}_consumeBlockEnd(e){this._beginToken(28,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Ai);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(29);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&Rt(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Ai)}}_consumeLetDeclaration(e){if(this._requireStr("@let"),this._beginToken(31,e),nt(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=34;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){t.type=34;return}this._attemptCharCodeUntilFn(r=>b(r)&&!Oe(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(33),this._cursor.advance(),this._endToken([])):(t.type=34,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>Re(r)||r===36||r===95||t&&Ie(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(32,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;Rt(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(eo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(
`){var n;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&(!((n=this._getTagDefinition(i))===null||n===void 0)&&n.ignoreFirstLf)&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===`
`){var s;let a=this._getContainer();a!=null&&a.children.length===0&&(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.ignoreFirstLf)&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,Oi):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let a=t.sourceSpan;this._addToParent(new _i(i,new p(n.start,a.end,n.fullStart,n.details),r))}}_closeVoidElement(){var t;let r=this._getContainer();r!==null&&(!((t=this._getTagDefinition(r))===null||t===void 0)&&t.isVoid)&&this._containerStack.pop()}_consumeElementStartTag(t){var r;let n=[],i=[],s=[];this._consumeAttributesAndDirectives(n,i,s);let a=this._getElementFullName(t,this._getClosestElementLikeParent()),o=this._getTagDefinition(a),l=!1;if(this._peek.type===2){this._advance(),l=!0;let v=this._getTagDefinition(a);this.canSelfClose||v?.canSelfClose||Pe(a)!==null||v?.isVoid||this.errors.push(x.create(a,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),l=!1);let c=this._peek.sourceSpan.fullStart,u=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),d=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),_=new p(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new re(a,n,i,[],l,u,d,void 0,_,o?.isVoid??!1,void 0,s),f=this._getContainer(),g=f!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.name));this._pushContainer(h,g),l?this._popContainer(a,re,u):t.type===4&&(this._popContainer(a,re,null),this.errors.push(x.create(a,u,`Opening tag "${a}" not terminated.`)))}_consumeComponentStartTag(t){var r;let n=t.parts[0],i=[],s=[],a=[];this._consumeAttributesAndDirectives(i,s,a);let o=this._getClosestElementLikeParent(),l=this._getComponentTagName(t,o),c=this._getComponentFullName(t,o),u=this._peek.type===37;this._advance();let d=this._peek.sourceSpan.fullStart,_=new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),h=new U(n,l,c,i,s,[],u,_,new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),void 0,void 0,a),f=this._getContainer(),g=f!==null&&h.tagName!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.tagName));this._pushContainer(h,g),u?this._popContainer(c,U,_):t.type===39&&(this._popContainer(c,U,null),this.errors.push(x.create(c,_,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(t,r,n){for(;this._peek.type===15||this._peek.type===40||this._peek.type===12;)if(this._peek.type===40)r.push(this._consumeDirective(this._peek));else if(this._peek.type===15)t.push(this._consumeAttr(this._advance()));else{let i=this._advance();n.push(new bi(i.parts[0],i.parts[1],i.sourceSpan))}}_consumeComponentEndTag(t){let r=this._getComponentFullName(t,this._getClosestElementLikeParent());if(!this._popContainer(r,U,t.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],i;n instanceof U&&n.componentName===t.parts[0]?i=`, did you mean "${n.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${r}"${i}`;this.errors.push(x.create(r,t.sourceSpan,s))}}_getTagDefinition(t){return typeof t=="string"?this.tagDefinitionResolver(t):t instanceof re?this.tagDefinitionResolver(t.name):t instanceof U&&t.tagName!==null?this.tagDefinitionResolver(t.tagName):null}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeElementEndTag(t){var r;let n=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t,this._getClosestElementLikeParent());if(n&&(!((r=this._getTagDefinition(n))===null||r===void 0)&&r.isVoid))this.errors.push(x.create(n,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(n,re,t.sourceSpan)){let i=`Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function uo(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.firstChild;r.removeChild(s),n--;let o=new p(s.sourceSpan.start,a.sourceSpan.end),l=new p(o.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=l,i.startSourceSpan=o,i.removeChild(a)}})}function po(e,t,r){e.walk(n=>{if(n.children)for(let i=0;i<n.children.length;i++){let s=n.children[i];if(s.kind!=="text"&&!t(s))continue;s.kind!=="text"&&(s.kind="text",s.value=r(s));let a=s.prev;!a||a.kind!=="text"||(a.value+=s.value,a.sourceSpan=new p(a.sourceSpan.start,s.sourceSpan.end),n.removeChild(s),i--)}})}function ho(e){return po(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function mo(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&!X(r.startTagComments)&&r.children.length===1&&r.firstChild.kind==="text"&&!P.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+a.value,s.sourceSpan=new p(s.sourceSpan.start,a.sourceSpan.end),s.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,s.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(a)}})}function fo(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/s;e.walk(n=>{if(rn(n,t))for(let i of n.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,a,o=i.value.split(r);for(let l=0;l<o.length;l++,s=a){let c=o[l];if(l%2===0){a=s.moveBy(c.length),c.length>0&&n.insertChildBefore(i,{kind:"text",value:c,sourceSpan:new p(s,a)});continue}a=s.moveBy(c.length+4),n.insertChildBefore(i,{kind:"interpolation",sourceSpan:new p(s,a),children:c.length===0?[]:[{kind:"text",value:c,sourceSpan:new p(s.moveBy(2),a.moveBy(-2))}]})}n.removeChild(i)}})}function go(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&P.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let i=nn(r,t),s=er(r);if(!i)for(let a=0;a<n.length;a++){let o=n[a];if(o.kind!=="text")continue;let{leadingWhitespace:l,text:c,trailingWhitespace:u}=tn(o.value),d=o.prev,_=o.next;c?(o.value=c,o.sourceSpan=new p(o.sourceSpan.start.moveBy(l.length),o.sourceSpan.end.moveBy(-u.length)),l&&(d&&(d.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),u&&(o.hasTrailingSpaces=!0,_&&(_.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(l||u)&&(d&&(d.hasTrailingSpaces=!0),_&&(_.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=s})}function _o(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function So(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function vo(e,t){e.walk(r=>{r.cssDisplay=fn(r,t)})}function Co(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=on(r,t);return}for(let i of n)i.isLeadingSpaceSensitive=sn(i,t),i.isTrailingSpaceSensitive=an(i,t);for(let i=0;i<n.length;i++){let s=n[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===n.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var Fi=lo;function ko(e,t,r){let{node:n}=e;switch(n.kind){case"root":retu