37 lines
137 KiB
JavaScript
Raw Permalink Normal View History

2026-05-31 13:21:13 +02:00
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e()}})(function(){"use strict";var Oe=Object.defineProperty;var Un=Object.getOwnPropertyDescriptor;var Mn=Object.getOwnPropertyNames;var zn=Object.prototype.hasOwnProperty;var Ie=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Yn=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Mn(t))!zn.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(s=Un(t,n))||s.enumerable});return e};var Gn=e=>Yn(Oe({},"__esModule",{value:!0}),e);var Di={};Ie(Di,{languages:()=>Dn,parsers:()=>Sr,printers:()=>Li});var Jt=(e,t)=>(r,s,...n)=>r|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,n);var Kn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Wn=Jt("replaceAll",function(){if(typeof this=="string")return Kn}),St=Wn;function jn(e){return this[e<0?this.length+e:e]}var Qn=Jt("at",function(){if(Array.isArray(this)||typeof this=="string")return jn}),V=Qn;var Jn=()=>{},Dt=Jn;var Ot="string",It="array",$t="cursor",kt="indent",Et="align",Xt="trim",vt="group",wt="fill",Tt="if-break",Zt="indent-if-break",te="line-suffix",ee="line-suffix-boundary",Q="line",re="label",xt="break-parent",ne=new Set([$t,kt,Et,Xt,vt,wt,Tt,Zt,te,ee,Q,re,xt]);function $n(e){if(typeof e=="string")return Ot;if(Array.isArray(e))return It;if(!e)return;let{type:t}=e;if(ne.has(t))return t}var se=$n;var Xn=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Zn(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(se(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Xn([...ne].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
Expected it to be ${s}.`}var Be=class extends Error{name="InvalidDocError";constructor(t){super(Zn(t)),this.doc=t}},Lr=Be;function ts(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){if(r.has(i))return r.get(i);let a=n(i);return r.set(i,a),a}function n(i){switch(se(i)){case It:return t(i.map(s));case wt:return t({...i,parts:i.parts.map(s)});case Tt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case vt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Et:case kt:case Zt:case re:case te:return t({...i,contents:s(i.contents)});case Ot:case $t:case Xt:case ee:case Q:case xt:return t(i);default:throw new Lr(i)}}}function ie(e,t=Dr){return ts(e,r=>typeof r=="string"?ct(t,r.split(`
`)):r)}var M=Dt,ae=Dt,Or=Dt,Ir=Dt;function F(e){return M(e),{type:kt,contents:e}}function es(e,t){return Ir(e),M(t),{type:Et,contents:t,n:e}}function Re(e){return es(-1,e)}var qe={type:xt};function Ve(e){return Or(e),{type:wt,parts:e}}function I(e,t={}){return M(e),ae(t.expandedStates,!0),{type:vt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Fe(e,t="",r={}){return M(e),t!==""&&M(t),{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ct(e,t){M(e),ae(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var N={type:Q},H={type:Q,soft:!0},rs={type:Q,hard:!0},ut=[rs,qe],ns={type:Q,hard:!0,literal:!0},Dr=[ns,qe];var Br=Object.freeze({character:"'",codePoint:39}),Rr=Object.freeze({character:'"',codePoint:34}),ss=Object.freeze({preferred:Br,alternate:Rr}),is=Object.freeze({preferred:Rr,alternate:Br});function as(e,t){let{preferred:r,alternate:s}=t===!0||t==="'"?ss:is,{length:n}=e,i=0,a=0;for(let o=0;o<n;o++){let c=e.charCodeAt(o);c===r.codePoint?i++:c===s.codePoint&&a++}return(i>a?s:r).character}var oe=as;function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ue=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#t,s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=this.#t,s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}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.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(V(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 s=`[${He([...this.#t].join(""))}]+`,n=new RegExp(r?`(${s})`:s,"u");return t.split(n)}hasWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=this.#t;return Array.prototype.every.call(t,s=>r.has(s))}#e(t){let r=Number.POSITIVE_INFINITY;for(let s of t.split(`
`)){if(s.length===0)continue;let n=this.getLeadingWhitespaceCount(s);if(n===0)return 0;s.length!==n&&n<r&&(r=n)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#e(t);return r===0?t:t.split(`
`).map(s=>s.slice(r)).join(`
`)}},qr=Ue;var os=[" ",`
`,"\f","\r"," "],ls=new qr(os),R=ls;function cs(e){return Array.isArray(e)&&e.length>0}var Bt=cs;var Me=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Vr=Me;function Fr(e,t,r){if(e.type==="TextNode"){let s=e.chars.trim();if(!s)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===e?t.chars="":t.chars=R.split(s).join(" ")}e.type==="ElementNode"&&(delete t.startTag,delete t.openTag,delete t.parts,delete t.endTag,delete t.closeTag,delete t.nameNode,delete t.body,delete t.blockParamNodes,delete t.params,delete t.path),e.type==="Block"&&(delete t.blockParamNodes,delete t.params),e.type==="AttrNode"&&e.name.toLowerCase()==="class"&&delete t.value,e.type==="PathExpression"&&(t.head=e.head.original)}Fr.ignoredProperties=new Set(["loc","selfClosing"]);var Hr=Fr;function us(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=t.chars;return i.trim()?await n(i,{parser:"css"}):""}}var Ur=us;var Rt=null;function qt(e){if(Rt!==null&&typeof Rt.property){let t=Rt;return Rt=qt.prototype=null,t}return Rt=qt.prototype=e??Object.create(null),new qt}var hs=10;for(let e=0;e<=hs;e++)qt();function ze(e){return qt(e)}function ps(e,t="type"){ze(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Mr=ps;var fs=Object.freeze([]);function Yr(){return fs}var ro=Yr(),no=Yr();var Ye=Object.assign;var zr=console;function Gr(e,t="unexpected unreachable branch"){throw zr.log("unreachable",e),zr.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var ms=(function(){var e=function(X,b,S,y){for(S=S||{},y=X.length;y--;S[X[y]]=b);return S},t=[2,52],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],a=[1,43],o=[1,33],c=[1,34],h=[1,35],f=[1,36],p=[1,37],g=[1,42],E=[1,46],T=[14,15,19,29,34,39,44,47,48,53,57,61],D=[14,15,19,29,34,44,47,48,53,57,61],B=[15,18],O=[14,15,19,29,34,47,48,53,57,61],z=[33,67,73,75,84,85,86,87,88,89],P=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],U=[1,62],C=[1,63],$=[23,33,56,68,73,79],W=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],kr=[2,51],Er=[1,64],vr=[67,73,75,77,84,85,86,87,88,89],wr=[56,67,73,75,84,85,86,87,88,89],Tr=[1,75],we=[1,76],Te=[1,83],dt=[33,67,73,75,79,84,85,86,87,88,89],xr=[23,67,73,75,84,85,86,87,88,89],Nr=[67,68,73,75,84,85,86,87,88,89],gt=[33,79],xe=[1,134],Ar=[73,81],Ne={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:7
`+x.showPosition()+`
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":De="Parse error on line "+(Z+1)+": Unexpected "+(L==Cr?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(De,{text:x.match,token:this.terminals_[L]||L,line:x.yylineno,loc:Ce,expected:Qt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+L);switch(q[0]){case 1:y.push(L),w.push(x.yytext),l.push(x.yylloc),y.push(q[1]),L=null,_e?(L=_e,_e=null):(Lt=x.yyleng,u=x.yytext,Z=x.yylineno,Ce=x.yylloc,Pr>0&&Pr--);break;case 2:if(j=this.productions_[q[1]][1],yt.$=w[w.length-j],yt._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},Fn&&(yt._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Le=this.performAction.apply(yt,[u,Lt,Z,ot.yy,q[1],w,l].concat(Vn)),typeof Le<"u")return Le;j&&(y=y.slice(0,-1*j*2),w=w.slice(0,-1*j),l=l.slice(0,-1*j)),y.push(this.productions_[q[1]][0]),w.push(yt.$),l.push(yt._$),_r=bt[y[y.length-2]][y[y.length-1]],y.push(_r);break;case 3:return!0}}return!0}},Rn=(function(){var X={EOF:1,parseError:function(S,y){if(this.yy.parser)this.yy.parser.parseError(S,y);else throw new Error(S)},setInput:function(b,S){return this.yy=S||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var S=b.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var S=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),S=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
`+S+"^"},test_match:function(b,S){var y,m,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),m=b[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,S,y,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if(y=this._input.match(this.rules[w[l]]),y&&(!S||y[0].length>S[0].length)){if(S=y,m=l,this.options.backtrack_lexer){if(b=this.test_match(y,w[l]),b!==!1)return b;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(b=this.test_match(S,w[m]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(S,y,m,w){function l(u,Z){return y.yytext=y.yytext.substring(u,y.yyleng-Z+u)}var bt=w;switch(m){case 0:if(y.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):y.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),y.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 67;case 8:return 68;case 9:if(S.syntax.square==="string")this.unput(y.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;break;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;break;case 18:return this.popState(),44;break;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(y.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;break;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;break;case 33:return this.popState(),33;break;case 34:return y.yytext=l(1,2).replace(/\\"/g,'"'),84;break;case 35:return y.yytext=l(1,2).replace(/\\'/g,"'"),84;break;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return y.yytext=y.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;break;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return X})();Ne.lexer=Rn;function Ae(){this.yy={}}return Ae.prototype=Ne,Ne.Parser=Ae,new Ae})(),Vt=ms;var Ge=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ke(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u01
`)}var Ze=(function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||$r(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegat
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e})(),go=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Ze(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var pe={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(Is){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function k(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
| ${a.split(`
`).join(`
| `)}
|
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var be={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},dr=(function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e})();function tn(e,t,r){return new dr("Cannot remove a node unless it is part of an array",e,t,r)}function Us(e,t,r){return new dr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function en(e,t){return new dr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var Ct=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new cr(this)}}},cr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function un(e){return typeof e=="function"?e:e.enter}function hn(e){return typeof e=="function"?void 0:e.exit}function ye(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=(function(h,f){if(h.Program&&(f==="Template"&&!h.Template||f==="Block"&&!h.Block))return h.Program;let p=h[f];return p!==void 0?p:h.All})(e,i.type);if(c!==void 0&&(r=un(c),s=hn(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(pn(e,n,a,o),n):ye(e,new Ct(n,a,o))||n;n=void 0}if(n===void 0){let h=be[i.type];for(let f=0;f<h.length;f++)Ms(e,c,t,h[f]);s!==void 0&&(n=s(i,t))}return n}function rn(e,t,r){e[t]=r}function Ms(e,t,r,s){let n,i,{node:a}=r,o=(function(c,h){return c[h]})(a,s);if(o){if(t!==void 0){let c=(function(h,f){let p=typeof h!="function"?h.keys:void 0;if(p===void 0)return;let g=p[f];return g!==void 0?g:p.All})(t,s);c!==void 0&&(n=un(c),i=hn(c))}if(n!==void 0&&n(a,s)!==void 0)throw en(a,s);if(Array.isArray(o))pn(e,o,r,s);else{let c=ye(e,new Ct(o,r,s));c!==void 0&&(function(h,f,p,g){if(g===null)throw tn(p,h,f);if(Array.isArray(g)){if(g.length!==1)throw g.length===0?tn(p,h,f):Us(p,h,f);rn(h,f,g[0])}else rn(h,f,g)})(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw en(a,s)}}function pn(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=ye(e,new Ct(i,r,s));a!==void 0&&(n+=zs(t,n,a)-1)}}function zs(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function Ys(e,t){ye(t,new Ct(e))}function At(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function fn(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var tr;function er(){return tr||(tr=new pt("","(synthetic)")),tr}function nn(e,t){return d.var({name:e,loc:v(t||null)})}function rt(e,t){let r=v(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return d.path({head:d.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:v(t||null)})}}let{head:s,tail:n}=(function(i,a){let[o,...c]=i.split("."),h=d.head({original:o,loc:v(a||null)});return d.path({head:h,tail:c,loc:v(a||null)})})(e,r);return d.path({head:s,tail:n,loc:r})}function me(e,t,r){return d.literal({type:e,value:t,loc:v(r||null)})}function Ht(e=[],t){return d.hash({pairs:e,loc:v(t||null)})}function mn(e){return e.map((t=>typeof t=="string"?d.var({name:t,loc:A.synthetic(t)}):t))}function sn(e=[],t=[],r=
`)}},hr=class extends ur{parse(t,r){t.loc;let s=d.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return this.pendingError?.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=d.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if(s?.type==="ElementNode")throw k(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw k("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=nr(this,t),i=this.source.spanFor(t.loc),a,o=[];if(t.program.blockParams?.length){let p=n.loc.collapse("end");p=t.program.loc?p.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):p.withEnd(i.getEnd()),a=on(this.source,t,p);let g=p.asString(),E=g.indexOf("|")+1,T=g.indexOf("|",E);for(let D of t.program.blockParams){let B,O;B=E>=T?-1:g.indexOf(D,E),B===-1||B+D.length>T?(E=T,O=this.source.spanFor(ir)):(E=B,O=p.sliceStartChars({skipStart:E,chars:D.length}),E+=D.length),o.push(d.var({name:D,loc:O}))}}else a=on(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,f=d.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});At(this.currentElement(),f)}MustacheStatement(t){this.pendingError?.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw k("Illegal use of ...attributes",this.source.spanFor(t.loc));if(fn(t.path))s=d.mustache({path:this.acceptNode(t.path),params:[],hash:d.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:o,params:c,hash:h}=nr(this,t);s=d.mustache({path:o,params:c,hash:h,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw k("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":sr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),sr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":sr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:At(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=(function(o,c){if(c==="")return{lines:o.split(`
`).length-1,columns:0};let[h]=o.split(c),f=h.split(/\n/u),p=f.length-1;return{lines:p,columns:f[p].length}})(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=d.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":At(this.currentElement(),i);break;default:throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw k("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw k("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw k("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw k("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=nr(this,t);return d.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw k('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw k('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=d.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=d.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=d.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return d.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map((s=>d.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)})));return d.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return d.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return d.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return d.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return d.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return d.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function nr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",k(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expressi
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=d.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw k("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let f=d.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(f)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Nt(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw k('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Nt(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Nt(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(d.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Nt(o))throw k(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw k(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=Vs(t),s=mr(t);return d.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}vali
`).length-1}function ui(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return _t(t)}function hi(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return _t(t)}function Kt(e=0){return Array.from({length:Math.min(e,Nn)}).fill(ut)}function pi(e,t){let{node:{value:r}}=e,s=oe(r,fi(e)?!t.singleQuote:t.singleQuote);return[s,St(0,r,s,`\\${s}`),s]}function fi(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function mi(e,t){let r=br(e,t),s=ve(e,t);return s?F([r,N,I(s)]):r}function xn(e,t){let r=br(e,t),s=ve(e,t);return s?[F([r,N,s]),H]:r}function br(e,t){return t("path")}function ve(e,t){let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),r.hash?.pairs.length>0&&s.push(t("hash")),s.length===0?"":ct(N,s)}function yr(e){return["as |",e.blockParams.join(" "),"|"]}var di=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),gi=new Set(["true","false","null","undefined"]),bi=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&gi.has(e)||/\s/u.test(e)||/^\d/u.test(e)||Array.prototype.some.call(e,r=>di.has(r));function yi(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>bi(r,s)?`[${r}]`:r).join(".")}var Si={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:Xs,massageAstNode:Hr,hasPrettierIgnore:Sn,getVisitorKeys:gn,embed:Ur},Ln=Si;var Dn=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var Sr={};Ie(Sr,{glimmer:()=>_i});function ki(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var On=ki;var In=Symbol.for("PRETTIER_IS_FRONT_MATTER");var Wt=3;function Ei(e){let t=e.slice(0,Wt);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
`,Wt);if(r===-1)return;let s=e.slice(Wt,r).trim(),n=e.indexOf(`
${t}`,r),i=s;if(i||(i=t==="+++"?"toml":"yaml"),n===-1&&t==="---"&&i==="yaml"&&(n=e.indexOf(`
...`,r)),n===-1)return;let a=n+1+Wt,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let c=e.slice(0,a),h;return{language:i,explicitLanguage:s||null,value:e.slice(r+1,n),startDelimiter:t,endDelimiter:c.slice(-Wt),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return h??(h=c.split(`
`)),h.length},get column(){return h??(h=c.split(`
`)),V(0,h,-1).length}},[In]:!0}}function vi(e){let t=Ei(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return St(0,r,/[^\n]/gu," ")+e.slice(r.length)}}:{content:e}}var Bn=vi;function wi(e){let t=e.children??e.body;if(t)for(let r=0;r<t.length-1;r++)t[r].type==="TextNode"&&t[r+1].type==="MustacheStatement"&&(t[r].chars=t[r].chars.replace(/\\$/u,"\\\\"))}var Ti=e=>{let{start:t,end:r}=e.loc;t.offset=e.loc.getStart().offset,r.offset=e.loc.getEnd().offset},xi=()=>({name:"glimmerPrettierParsePlugin",visitor:{All(e){Ti(e),wi(e)}}}),Ni={mode:"codemod",plugins:{ast:[xi]}};function Ai(e){let{frontMatter:t,content:r}=Bn(e),s;try{s=dn(r,Ni)}catch(n){let i=Ci(n);if(i){let a=Pi(n);throw On(a,{loc:i,cause:n})}throw n}if(t){let n={...t,type:"FrontMatter",loc:{start:{...t.start,offset:t.start.index},end:{...t.end,offset:t.end.index}}};s.body.unshift(n)}return s}function Pi(e){let{message:t}=e,r=t.split(`
`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(V(0,r,-2))?V(0,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(V(0,r,-1))&&r[1]===""&&V(0,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Ci(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var _i={parse:Ai,astFormat:"glimmer",locStart:mt,locEnd:Gt};var Li={glimmer:Ln};return Gn(Di);});