@shopify/cli
Version:
A CLI tool to build for the Shopify platform
29 lines (27 loc) • 139 kB
JavaScript
import{b as ln,g as Ke}from"./chunk-VPRTJUIN.js";function mn(t){return this[t<0?this.length+t:t]}function yn(t){if(typeof t=="string")return Ar;if(Array.isArray(t))return Dr;if(!t)return;let{type:e}=t;if(Br.has(e))return e}function An(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(xr(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let a=bn([...Br].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${a}.`}function vn(t,e){if(typeof t=="string")return e(t);let r=new Map;return a(t);function a(i){if(r.has(i))return r.get(i);let s=n(i);return r.set(i,s),s}function n(i){switch(xr(i)){case Dr:return e(i.map(a));case Se:return e({...i,parts:i.parts.map(a)});case ke:return e({...i,breakContents:a(i.breakContents),flatContents:a(i.flatContents)});case Ce:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(a),u=s[0]):u=a(u),e({...i,contents:u,expandedStates:s})}case ve:case Ee:case Cr:case wr:case Sr:return e({...i,contents:a(i.contents)});case Ar:case Er:case vr:case kr:case gt:case we:return e(i);default:throw new En(i)}}}function ae(t,e=xn){return vn(t,r=>typeof r=="string"?Bt(e,r.split(`
`)):r)}function R(t){return mt(t),{type:Ee,contents:t}}function kn(t,e){return Sn(t),mt(e),{type:ve,contents:e,n:t}}function Je(t){return kn(-1,t)}function Qe(t){return Cn(t),{type:Se,parts:t}}function L(t,e={}){return mt(t),Tr(e.expandedStates,!0),{type:Ce,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Ye(t,e="",r={}){return mt(t),e!==""&&mt(e),{type:ke,breakContents:t,flatContents:e,groupId:r.groupId}}function Bt(t,e){mt(t),Tr(e);let r=[];for(let a=0;a<e.length;a++)a!==0&&r.push(t),r.push(e[a]);return r}function Pn(t,e){let{preferred:r,alternate:a}=e===!0||e==="'"?Tn:Nn,{length:n}=t,i=0,s=0;for(let u=0;u<n;u++){let l=t.charCodeAt(u);l===r.codePoint?i++:l===a.codePoint&&s++}return(i>s?a:r).character}function Fn(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function On(t){return Array.isArray(t)&&t.length>0}function Lr(t,e,r){if(t.type==="TextNode"){let a=t.chars.trim();if(!a)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===t?e.chars="":e.chars=O.split(a).join(" ")}t.type==="ElementNode"&&(delete e.startTag,delete e.openTag,delete e.parts,delete e.endTag,delete e.closeTag,delete e.nameNode,delete e.body,delete e.blockParamNodes,delete e.params,delete e.path),t.type==="Block"&&(delete e.blockParamNodes,delete e.params),t.type==="AttrNode"&&t.name.toLowerCase()==="class"&&delete e.value,t.type==="PathExpression"&&(e.head=t.head.original)}function Hn(t){let{node:e}=t;if(e.type!=="TextNode")return;let{parent:r}=t;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===e))return;let a=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(a&&!(a.value.type==="TextNode"&&(a.value.chars===""||a.value.chars==="css"))))return async n=>{let i=e.chars;return i.trim()?await n(i,{parser:"css"}):""}}function Ct(t){if(At!==null&&typeof At.property){let e=At;return At=Ct.prototype=null,e}return At=Ct.prototype=t??Object.create(null),new Ct}function Mn(t){return Ct(t)}function Gn(t,e="type"){Mn(t);function r(a){let n=a[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:a});return i}return r}function qr(){return Wn}function Kn(t,e="unexpected unreachable branch"){throw Ze.log("unreachable",t),Ze.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}function Be(t,e){var r=e&&e.loc,a,n,i,s;r&&(a=r.start.line,n=r.end.line,i=r.start.column,s=r.end.column,t+=" - "+a+":"+i);for(var u=Error.prototype.constructor.call(this,t),l=0;l<ie.length;l++)this[ie[l]]=u[ie[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Be);try{r&&(this.lineNumber=a,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=i,this.endColumn=s))}catch{}}function qt(){this.parents=[]}function _t(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Xe(t){_t.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function tr(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function G(t){t===void 0&&(t={}),this.options=t}function pe(t,e,r){e===void 0&&(e=t.length);var a=t[e-1],n=t[e-2];if(!a)return r;if(a.type==="ContentStatement")return(n||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(a.original)}function de(t,e,r){e===void 0&&(e=-1);var a=t[e+1],n=t[e+2];if(!a)return r;if(a.type==="ContentStatement")return(n||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(a.original)}function at(t,e,r){var a=t[e==null?0:e+1];if(!(!a||a.type!=="ContentStatement"||!r&&a.rightStripped)){var n=a.value;a.value=a.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),a.rightStripped=a.value!==n}}function Z(t,e,r){var a=t[e==null?t.length-1:e-1];if(!(!a||a.type!=="ContentStatement"||!r&&a.leftStripped)){var n=a.value;return a.value=a.value.replace(r?/\s+$/:/[ \t]+$/,""),a.leftStripped=a.value!==n,a.leftStripped}}function xe(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new pt(t.path.original+" doesn't match "+e,r)}}function Ir(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function Xn(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function ta(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function ea(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function ra(t,e,r,a){a=this.locInfo(a);var n;t?n="@":e?n=e.original+".":n="";for(var i=[],s=0,u=0,l=r.length;u<l;u++){var h=r[u].part,p=r[u].original!==h,f=r[u].separator,y=f===".#"?"#":"";if(n+=(f||"")+h,!p&&(h===".."||h==="."||h==="this")){if(i.length>0)throw new pt("Invalid path: "+n,{loc:a});h===".."&&s++}else i.push("".concat(y).concat(h))}var D=e||i.shift();return{type:"PathExpression",this:n.startsWith("this."),data:t,depth:s,head:D,tail:i,parts:D?Zn([D],i,!0):i,original:n,loc:a}}function na(t,e,r,a,n,i){var s=a.charAt(3)||a.charAt(2),u=s!=="{"&&s!=="&",l=/\*/.test(a);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:u,strip:n,loc:this.locInfo(i)}}function aa(t,e,r,a){xe(t,r),a=this.locInfo(a);var n={type:"Program",body:e,strip:{},loc:a};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:n,openStrip:{},inverseStrip:{},closeStrip:{},loc:a}}function ia(t,e,r,a,n,i){a&&a.path&&xe(t,a);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var u,l;if(r){if(s)throw new pt("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=a.strip),l=r.strip,u=r.program}return n&&(n=u,u=e,e=n),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:u,openStrip:t.strip,inverseStrip:l,closeStrip:a&&a.strip,loc:this.locInfo(i)}}function sa(t,e){if(!e&&t.length){var r=t[0].loc,a=t[t.length-1].loc;r&&a&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:a.end.line,column:a.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function ua(t,e,r,a){return xe(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(a)}}function me(t,e){var r,a,n;if(t.type==="Program")return t;Pt.yy=Or,Pt.yy.locInfo=function(u){return new Ir(e&&e.srcName,u)};var i;typeof((r=e?.syntax)===null||r===void 0?void 0:r.square)=="function"?i=e.syntax.square:((a=e?.syntax)===null||a===void 0?void 0:a.square)==="node"?i=oa:i="string";var s;return typeof((n=e?.syntax)===null||n===void 0?void 0:n.hash)=="function"?s=e.syntax.hash:s=la,Pt.yy.syntax={square:i,hash:s},Pt.parse(t)}function oa(t,e){return{type:"ArrayLiteral",items:t,loc:e}}function la(t,e){return{type:"HashLiteral",pairs:t.pairs,loc:e}}function er(t,e){var r=me(t,e),a=new Yn(e);return a.accept(r)}function B(t){return ma.test(t)}function rr(t){return fa.test(t)}function ya(t){return t.replace(ga,`
`)}function $r(t){return function(e){return Array.isArray(e)&&e[0]===t}}function Ea(){return[...$t]}function va(t){return $t.has(t.toLowerCase())&&t[0]?.toLowerCase()===t[0]}function xt(t){return!!t&&t.length>0}function Ne(t){return t.length===0?void 0:t[t.length-1]}function Ca(t){return t.length===0?void 0:t[0]}function Hr(t){return t(new wa).validate()}function A(t,e){let{module:r,loc:a}=e,{line:n,column:i}=a.start,s=e.asString(),u=s?`
|
| ${s.split(`
`).join(`
| `)}
|
`:"",l=new Error(`${t}: ${u}(error occurred in '${r}' @ line ${n} : column ${i})`);return l.name="SyntaxError",l.location=e,l.code=s,l}function ar(t,e,r){return new Le("Cannot remove a node unless it is part of an array",t,e,r)}function Ta(t,e,r){return new Le("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}function ir(t,e){return new Le("Replacing and removing in key handlers is not yet supported.",t,null,e)}function Mr(t){return typeof t=="function"?t:t.enter}function Gr(t){return typeof t=="function"?void 0:t.exit}function Mt(t,e){let r,a,n,{node:i,parent:s,parentKey:u}=e,l=(function(h,p){if(h.Program&&(p==="Template"&&!h.Template||p==="Block"&&!h.Block))return h.Program;let f=h[p];return f!==void 0?f:h.All})(t,i.type);if(l!==void 0&&(r=Mr(l),a=Gr(l)),r!==void 0&&(n=r(i,e)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(jr(t,n,s,u),n):Mt(t,new zt(n,s,u))||n;n=void 0}if(n===void 0){let h=zr[i.type];for(let p=0;p<h.length;p++)Pa(t,l,e,h[p]);a!==void 0&&(n=a(i,e))}return n}function sr(t,e,r){t[e]=r}function Pa(t,e,r,a){let n,i,{node:s}=r,u=(function(l,h){return l[h]})(s,a);if(u){if(e!==void 0){let l=(function(h,p){let f=typeof h!="function"?h.keys:void 0;if(f===void 0)return;let y=f[p];return y!==void 0?y:f.All})(e,a);l!==void 0&&(n=Mr(l),i=Gr(l))}if(n!==void 0&&n(s,a)!==void 0)throw ir(s,a);if(Array.isArray(u))jr(t,u,r,a);else{let l=Mt(t,new zt(u,r,a));l!==void 0&&(function(h,p,f,y){if(y===null)throw ar(f,h,p);if(Array.isArray(y)){if(y.length!==1)throw y.length===0?ar(f,h,p):Ta(f,h,p);sr(h,p,y[0])}else sr(h,p,y)})(s,a,u,l)}if(i!==void 0&&i(s,a)!==void 0)throw ir(s,a)}}function jr(t,e,r,a){for(let n=0;n<e.length;n++){let i=e[n],s=Mt(t,new zt(i,r,a));s!==void 0&&(n+=Fa(e,n,s)-1)}}function Fa(t,e,r){return r===null?(t.splice(e,1),0):Array.isArray(r)?(t.splice(e,1,...r),r.length):(t.splice(e,1,r),1)}function La(t,e){Mt(e,new zt(t))}function dt(t,e){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(t).push(e)}function Wr(t){return t.type==="StringLiteral"||t.type==="BooleanLiteral"||t.type==="NumberLiteral"||t.type==="NullLiteral"||t.type==="UndefinedLiteral"}function ue(){return se||(se=new St("","(synthetic)")),se}function ur(t,e){return g.var({name:t,loc:v(e||null)})}function Q(t,e){let r=v(e||null);if(typeof t!="string"){if("type"in t)return t;{t.head.indexOf(".");let{head:i,tail:s}=t;return g.path({head:g.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:s,loc:v(e||null)})}}let{head:a,tail:n}=(function(i,s){let[u,...l]=i.split("."),h=g.head({original:u,loc:v(s||null)});return g.path({head:h,tail:l,loc:v(s||null)})})(t,r);return g.path({head:a,tail:n,loc:r})}function Ot(t,e,r){return g.literal({type:t,value:e,loc:v(r||null)})}function Dt(t=[],e){return g.hash({pairs:t,loc:v(e||null)})}function Kr(t){return t.map((e=>typeof e=="string"?g.var({name:e,loc:P.synthetic(e)}):e))}function or(t=[],e=[],r=!1,a){return g.blockItself({body:t,params:Kr(e),chained:r,loc:v(a||null)})}function lr(t=[],e=[],r){return g.template({body:t,blockParams:e,loc:v(r||null)})}function v(...t){if(t.length===1){let e=t[0];return e&&typeof e=="object"?P.forHbsLoc(ue(),e):P.forHbsLoc(ue(),Sa)}{let[e,r,a,n,i]=t,s=i?new St("",i):ue();return P.forHbsLoc(s,{start:{line:e,column:r},end:{line:a||e,column:n||r}})}}function oe(t){return function(e,r){return Ot(t,e,r)}}function le(t,e){let r;switch(e.path.type){case"PathExpression":r=t.PathExpression(e.path);break;case"SubExpression":r=t.SubExpression(e.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=e.path.type==="BooleanLiteral"?e.path.original.toString():e.path.type==="StringLiteral"?`"${e.path.original}"`:e.path.type==="NullLiteral"?"null":e.path.type==="NumberLiteral"?e.path.value.toString():"undefined",A(`${e.path.type} "${e.path.type==="StringLiteral"?e.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,t.source.spanFor(e.path.loc))}}let a=e.params.map((i=>t.acceptNode(i))),n=xt(a)?Ne(a).loc:r.loc;return{path:r,params:a,hash:e.hash?t.Hash(e.hash):g.hash({pairs:[],loc:t.source.spanFor(n).collapse("end")})}}function ce(t,e){let{path:r,params:a,hash:n,loc:i}=e;if(Wr(r)){let u=`{{${(function(l){return l.type==="UndefinedLiteral"?"undefined":JSON.stringify(l.value)})(r)}}}`;throw A(`In <${t.name} ... ${u} ..., ${u} is not a valid modifier`,e.loc)}let s=g.elementModifier({path:r,params:a,hash:n,loc:i});t.modifiers.push(s)}function cr(t,e,r){if(!e.program.loc){let n=Y(0,e.program.body,0),i=Y(0,e.program.body,-1);if(n&&i)e.program.loc={...n.loc,end:i.loc.end};else{let s=t.spanFor(e.loc);e.program.loc=r.withEnd(s.getEnd())}}let a=t.spanFor(e.program.loc).getEnd();return e.inverse&&!e.inverse.loc&&(e.inverse.loc=a.collapsed()),e}function lt(t){return/[\t\n\f ]/u.test(t)}function $a(t,e={}){let r,a,n,i=e.mode||"precompile";typeof t=="string"?(r=new St(t,e.meta?.moduleName),a=i==="codemod"?me(t,e.parseOptions):er(t,e.parseOptions)):t instanceof St?(r=t,a=i==="codemod"?me(t.source,e.parseOptions):er(t.source,e.parseOptions)):(r=new St("",e.meta?.moduleName),a=t),i==="codemod"&&(n=new Ra);let s=P.forCharPositions(r,0,r.source.length);a.loc={source:"(program)",start:s.startPosition,end:s.endPosition};let u=new Oa(r,n,i).parse(a,e.locals??[]);if(e.plugins?.ast)for(let l of e.plugins.ast)La(u,l(_r({},e,{syntax:Va},{plugins:void 0})).visitor);return u}function Jr(t){return t.toUpperCase()===t}function Ga(t){return t.type==="ElementNode"&&typeof t.tag=="string"&&!t.tag.startsWith(":")&&(Jr(t.tag[0])||t.tag.includes("."))}function ja(t){return Ma.has(t.toLowerCase())&&!Jr(t[0])}function Qr(t){return t.selfClosing===!0||ja(t.tag)||Ga(t)&&t.children.every(e=>qe(e))}function qe(t){return t.type==="TextNode"&&!/\S/u.test(t.chars)}function hr(t){return t?.type==="MustacheCommentStatement"&&typeof t.value=="string"&&t.value.trim()==="prettier-ignore"}function Wa(t){return hr(t.node)||t.isInArray&&(t.key==="children"||t.key==="body"||t.key==="parts")&&hr(t.siblings[t.index-2])}function Ka(t,e,r){let{node:a}=t;switch(a.type){case"Block":case"Program":case"Template":return L(t.map(r,"body"));case"ElementNode":{let n=e.htmlWhitespaceSensitivity!=="ignore",i=[!n&&t.previous?.type==="ElementNode"?V:"",L([Qa(t,r)])];if(Qr(a))return[i];let s=["</",a.tag,">"],u=a.tag==="style";if(a.children.length===0||(!n||u)&&a.children.every(h=>qe(h)))return[i,s];let l=t.map(r,"children");return u||!n?[i,R([V,...l]),V,s]:[i,R(L(l)),s]}case"BlockStatement":return tn(t)?[ni(t,r),mr(t,e,r),fr(t,e,r)]:[ti(t,r),L([mr(t,e,r),fr(t,e,r),ai(t,e,r)])];case"ElementModifierStatement":return L(["{{",yr(t,r),"}}"]);case"MustacheStatement":return L([Gt(a),yr(t,r),jt(a)]);case"SubExpression":return L(["(",ci(t,r),V,")"]);case"AttrNode":{let{name:n,value:i}=a,s=i.type==="TextNode";if(s&&i.chars===""&&wt(i)===Ae(i))return n;let u=s?he(i.chars,e.singleQuote):i.type==="ConcatStatement"?he(i.parts.map(h=>h.type==="TextNode"?h.chars:"").join(""),e.singleQuote):"",l=r("value");return[n,"=",u,n==="class"&&u?L(R(l)):l,u]}case"ConcatStatement":return t.map(r,"parts");case"Hash":return Bt(x,t.map(r,"pairs"));case"HashPair":return[a.key,"=",r("value")];case"TextNode":{let n=a.chars,{parent:i}=t;if(i.type==="ElementNode"){if(i.tag==="pre")return ae(n);if(i.tag==="style")return n=Vt(0,n,/^\n+/gu,""),n=O.trimEnd(n),n=O.dedentString(n),ae(n,yt)}n=Vt(0,n,"{{","\\{{");let s=ii(t);if(s){if(s==="class"){let F=n.trim().split(/\s+/u).join(" "),q=!1,$=!1;return t.parent.type==="ConcatStatement"&&(t.previous?.type==="MustacheStatement"&&/^\s/u.test(n)&&(q=!0),t.next?.type==="MustacheStatement"&&/\s$/u.test(n)&&F!==""&&($=!0)),[q?x:"",F,$?x:""]}return ae(n)}let u=O.isWhitespaceOnly(n),{isFirst:l,isLast:h}=t;if(e.htmlWhitespaceSensitivity!=="ignore"){let F=h&&t.parent.type==="Template",q=l&&t.parent.type==="Template";if(u){if(q||F)return"";let w=[x],K=ht(n);return K&&(w=Et(K)),h&&(w=w.map(j=>Je(j))),w}let $=O.getLeadingWhitespace(n),H=[];if($){H=[x];let w=ht($);w&&(H=Et(w)),n=n.slice($.length)}let k=O.getTrailingWhitespace(n),I=[];if(k){if(!F){I=[x];let w=ht(k);w&&(I=Et(w)),h&&(I=I.map(K=>Je(K)))}n=n.slice(0,-k.length)}return[...H,Qe(gr(n)),...I]}let p=ht(n),f=si(n),y=ui(n);if((l||h)&&u&&(t.parent.type==="Block"||t.parent.type==="ElementNode"||t.parent.type==="Template"))return"";u&&p?(f=Math.min(p,Yr),y=0):((t.next?.type==="BlockStatement"||t.next?.type==="ElementNode")&&(y=Math.max(y,1)),(t.previous?.type==="BlockStatement"||t.previous?.type==="ElementNode")&&(f=Math.max(f,1)));let D="",C="";return y===0&&t.next?.type==="MustacheStatement"&&(C=" "),f===0&&t.previous?.type==="MustacheStatement"&&(D=" "),l&&(f=0,D=""),h&&(y=0,C=""),O.hasLeadingWhitespace(n)&&(n=D+O.trimStart(n)),O.hasTrailingWhitespace(n)&&(n=O.trimEnd(n)+C),[...Et(f),Qe(gr(n)),...Et(y)]}case"MustacheCommentStatement":{let n=wt(a),i=Ae(a),s=e.originalText.charAt(n+2)==="~",u=e.originalText.charAt(i-3)==="~",l=a.value.includes("}}")?"--":"";return["{{",s?"~":"","!",l,a.value,l,u?"~":"","}}"]}case"PathExpression":return mi(a);case"BooleanLiteral":return String(a.value);case"CommentStatement":return["<!--",a.value,"-->"];case"StringLiteral":return oi(t,e);case"NumberLiteral":return String(a.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";default:throw new Rn(a,"Handlebars")}}function Ja(t,e){return wt(t)-wt(e)}function Qa(t,e){let{node:r}=t,a=["attributes","modifiers","comments"].filter(i=>Rt(r[i])),n=a.flatMap(i=>r[i]).sort(Ja);for(let i of a)t.each(({node:s})=>{let u=n.indexOf(s);n.splice(u,1,[x,e()])},i);return Rt(r.blockParams)&&n.push(x,Ie(r)),["<",r.tag,R(n),Ya(r)]}function Ya(t){return Qr(t)?Ye([V,"/>"],[" />",V]):Ye([V,">"],">")}function Gt(t){let e=t.trusting?"{{{":"{{",r=t.strip?.open?"~":"";return[e,r]}function jt(t){let e=t.trusting?"}}}":"}}";return[t.strip?.close?"~":"",e]}function Za(t){let e=Gt(t),r=t.openStrip.open?"~":"";return[e,r,"#"]}function Xa(t){let e=jt(t);return[t.openStrip.close?"~":"",e]}function pr(t){let e=Gt(t),r=t.closeStrip.open?"~":"";return[e,r,"/"]}function dr(t){let e=jt(t);return[t.closeStrip.close?"~":"",e]}function Zr(t){let e=Gt(t),r=t.inverseStrip.open?"~":"";return[e,r]}function Xr(t){let e=jt(t);return[t.inverseStrip.close?"~":"",e]}function ti(t,e){let{node:r}=t,a=[],n=Wt(t,e);return n&&a.push(L(n)),Rt(r.program.blockParams)&&a.push(Ie(r.program)),L([Za(r),_e(t,e),a.length>0?R([x,Bt(x,a)]):"",V,Xa(r)])}function ei(t,e){return[e.htmlWhitespaceSensitivity==="ignore"?yt:"",Zr(t),"else",Xr(t)]}function tn(t){if(!t.match(r=>r.type==="BlockStatement",(r,a)=>a==="body"&&r.type==="Block"&&r.body.length===1,(r,a)=>a==="inverse"&&r.type==="BlockStatement"))return!1;let{node:e}=t;return e.path.type==="PathExpression"&&e.path.head.type==="VarHead"&&e.path.head.name==="if"||ri(e,t.grandparent)}function ni(t,e){let{node:r,grandparent:a}=t;return L([Zr(a),["else"," ",a.inverse.body[0].path.head.name],R([x,L(Wt(t,e)),...Rt(r.program.blockParams)?[x,Ie(r.program)]:[]]),V,Xr(a)])}function ai(t,e,r){let{node:a}=t;return e.htmlWhitespaceSensitivity==="ignore"?[en(a)?V:yt,pr(a),r("path"),dr(a)]:[pr(a),r("path"),dr(a)]}function en(t){return t.type==="BlockStatement"&&t.program.body.every(e=>qe(e))}function mr(t,e,r){let{node:a}=t;if(en(a))return"";let n=r("program");return e.htmlWhitespaceSensitivity==="ignore"?R([yt,n]):R(n)}function fr(t,e,r){let{node:a}=t;if(!a.inverse)return"";let n=r("inverse"),i=e.htmlWhitespaceSensitivity==="ignore"?[yt,n]:n;return t.call(tn,"inverse","body",0)?i:[ei(a,e),R(i)]}function gr(t){return Bt(x,O.split(t))}function ii(t){for(let e=0;e<2;e++){let r=t.getParentNode(e);if(r?.type==="AttrNode")return r.name.toLowerCase()}}function ht(t){return t=typeof t=="string"?t:"",t.split(`
`).length-1}function si(t){t=typeof t=="string"?t:"";let e=(t.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return ht(e)}function ui(t){t=typeof t=="string"?t:"";let e=(t.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return ht(e)}function Et(t=0){return Array.from({length:Math.min(t,Yr)}).fill(yt)}function oi(t,e){let{node:{value:r}}=t,a=he(r,li(t)?!e.singleQuote:e.singleQuote);return[a,Vt(0,r,a,`\\${a}`),a]}function li(t){let{ancestors:e}=t,r=e.findIndex(a=>a.type!=="SubExpression");return r!==-1&&e[r+1].type==="ConcatStatement"&&e[r+2].type==="AttrNode"}function ci(t,e){let r=_e(t,e),a=Wt(t,e);return a?R([r,x,L(a)]):r}function yr(t,e){let r=_e(t,e),a=Wt(t,e);return a?[R([r,x,a]),V]:r}function _e(t,e){return e("path")}function Wt(t,e){let{node:r}=t,a=[];return r.params.length>0&&a.push(...t.map(e,"params")),r.hash?.pairs.length>0&&a.push(e("hash")),a.length===0?"":Bt(x,a)}function Ie(t){return["as |",t.blockParams.join(" "),"|"]}function mi(t){return t.tail.length===0&&t.original.includes("/")?t.original:[t.head.original,...t.tail].map((e,r)=>di(e,r)?`[${e}]`:e).join(".")}function bi(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}function Ei(t){let e=t.slice(0,vt);if(e!=="---"&&e!=="+++")return;let r=t.indexOf(`
`,vt);if(r===-1)return;let a=t.slice(vt,r).trim(),n=t.indexOf(`
${e}`,r),i=a;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
...`,r)),n===-1)return;let s=n+1+vt,u=t.charAt(s+1);if(!/\s?/u.test(u))return;let l=t.slice(0,s),h;return{language:i,explicitLanguage:a||null,value:t.slice(r+1,n),startDelimiter:e,endDelimiter:l.slice(-vt),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return h??(h=l.split(`
`)),h.length},get column(){return h??(h=l.split(`
`)),Y(0,h,-1).length}},[Di]:!0}}function vi(t){let e=Ei(t);return e?{frontMatter:e,get content(){let{raw:r}=e;return Vt(0,r,/[^\n]/gu," ")+t.slice(r.length)}}:{content:t}}function Si(t){let e=t.children??t.body;if(e)for(let r=0;r<e.length-1;r++)e[r].type==="TextNode"&&e[r+1].type==="MustacheStatement"&&(e[r].chars=e[r].chars.replace(/\\$/u,"\\\\"))}function xi(t){let{frontMatter:e,content:r}=Ci(t),a;try{a=$a(r,Bi)}catch(n){let i=Ni(n);if(i){let s=Ti(n);throw Ai(s,{loc:i,cause:n})}throw n}if(e){let n={...e,type:"FrontMatter",loc:{start:{...e.start,offset:e.start.index},end:{...e.end,offset:e.end.index}}};a.body.unshift(n)}return a}function Ti(t){let{message:e}=t,r=e.split(`
`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(Y(0,r,-2))?Y(0,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(Y(0,r,-1))&&r[1]===""&&Y(0,r,-2)===""&&r.slice(2,-2).every(a=>a.startsWith("|"))?r[0].trim().slice(0,-1):e}function Ni(t){let{location:e,hash:r}=t;if(e){let{start:a,end:n}=e;return typeof n.line!="number"?{start:a}:e}if(r){let{loc:{last_line:a,last_column:n}}=r;return{start:{line:a,column:n+1}}}}var cn,De,hn,br,pn,dn,Vt,fn,Y,gn,Ht,Ar,Dr,Er,Ee,ve,vr,Ce,Se,ke,Cr,Sr,kr,gt,wr,we,Br,xr,bn,Dn,En,mt,Tr,Cn,Sn,Nr,x,V,wn,yt,Bn,xn,Pr,Fr,Tn,Nn,he,Ln,qn,_n,In,O,Rt,Vn,Rn,$n,Un,At,zn,jn,Wn,Ii,Oi,_r,Ze,Jn,Pt,ie,pt,Qn,Yn,It,Zn,Or,Ft,ca,ha,pa,da,Vr,ma,fa,ga,Rr,Vi,Te,Ri,$i,ba,Aa,Hi,Da,Ui,$t,tt,Sa,fe,X,ka,nr,wa,Ba,P,Pe,Fe,it,M,et,Ut,kt,ft,be,xa,St,zr,Le,zt,Na,se,qa,Lt,g,_a,Ia,Oa,Va,Ra,Ha,zi,Ua,za,wt,Ae,Ma,Yr,ri,hi,pi,di,fi,gi,yi,rn,Ai,Di,vt,Ci,ki,wi,Bi,Pi,Fi,Li=ln(()=>{Ke();cn=Object.defineProperty,De=(t,e)=>{for(var r in e)cn(t,r,{get:e[r],enumerable:!0})},hn={};De(hn,{languages:()=>yi,parsers:()=>rn,printers:()=>Fi});br=(t,e)=>(r,a,...n)=>r|1&&a==null?void 0:(e.call(a)??a[t]).apply(a,n),pn=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},dn=br("replaceAll",function(){if(typeof this=="string")return pn}),Vt=dn;fn=br("at",function(){if(Array.isArray(this)||typeof this=="string")return mn}),Y=fn,gn=()=>{},Ht=gn,Ar="string",Dr="array",Er="cursor",Ee="indent",ve="align",vr="trim",Ce="group",Se="fill",ke="if-break",Cr="indent-if-break",Sr="line-suffix",kr="line-suffix-boundary",gt="line",wr="label",we="break-parent",Br=new Set([Er,Ee,ve,vr,Ce,Se,ke,Cr,Sr,kr,gt,wr,we]);xr=yn,bn=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);Dn=class extends Error{name="InvalidDocError";constructor(t){super(An(t)),this.doc=t}},En=Dn;mt=Ht,Tr=Ht,Cn=Ht,Sn=Ht;Nr={type:we};x={type:gt},V={type:gt,soft:!0},wn={type:gt,hard:!0},yt=[wn,Nr],Bn={type:gt,hard:!0,literal:!0},xn=[Bn,Nr],Pr=Object.freeze({character:"'",codePoint:39}),Fr=Object.freeze({character:'"',codePoint:34}),Tn=Object.freeze({preferred:Pr,alternate:Fr}),Nn=Object.freeze({preferred:Fr,alternate:Pr});he=Pn;Ln=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let e=this.#t,r=0;for(let a=0;a<t.length&&e.has(t.charAt(a));a++)r++;return r}getTrailingWhitespaceCount(t){let e=this.#t,r=0;for(let a=t.length-1;a>=0&&e.has(t.charAt(a));a--)r++;return r}getLeadingWhitespace(t){let e=this.getLeadingWhitespaceCount(t);return t.slice(0,e)}getTrailingWhitespace(t){let e=this.getTrailingWhitespaceCount(t);return t.slice(t.length-e)}hasLeadingWhitespace(t){return this.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(Y(0,t,-1))}trimStart(t){let e=this.getLeadingWhitespaceCount(t);return t.slice(e)}trimEnd(t){let e=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-e)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,e=!1){let r=`[${Fn([...this.#t].join(""))}]+`,a=new RegExp(e?`(${r})`:r,"u");return t.split(a)}hasWhitespaceCharacter(t){let e=this.#t;return Array.prototype.some.call(t,r=>e.has(r))}hasNonWhitespaceCharacter(t){let e=this.#t;return Array.prototype.some.call(t,r=>!e.has(r))}isWhitespaceOnly(t){let e=this.#t;return Array.prototype.every.call(t,r=>e.has(r))}#e(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(`
`)){if(r.length===0)continue;let a=this.getLeadingWhitespaceCount(r);if(a===0)return 0;r.length!==a&&a<e&&(e=a)}return e===Number.POSITIVE_INFINITY?0:e}dedentString(t){let e=this.#e(t);return e===0?t:t.split(`
`).map(r=>r.slice(e)).join(`
`)}},qn=Ln,_n=[" ",`
`,"\f","\r"," "],In=new qn(_n),O=In;Rt=On,Vn=class extends Error{name="UnexpectedNodeError";constructor(t,e,r="type"){super(`Unexpected ${e} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Rn=Vn;Lr.ignoredProperties=new Set(["loc","selfClosing"]);$n=Lr;Un=Hn,At=null;zn=10;for(let t=0;t<=zn;t++)Ct();jn=Gn,Wn=Object.freeze([]);Ii=qr(),Oi=qr(),_r=Object.assign,Ze=console;Jn=(function(){var t=function(U,m,b,d){for(b=b||{},d=U.length;d--;b[U[d]]=m);return b},e=[2,52],r=[1,20],a=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],s=[1,43],u=[1,33],l=[1,34],h=[1,35],p=[1,36],f=[1,37],y=[1,42],D=[1,46],C=[14,15,19,29,34,39,44,47,48,53,57,61],F=[14,15,19,29,34,44,47,48,53,57,61],q=[15,18],$=[14,15,19,29,34,47,48,53,57,61],H=[33,67,73,75,84,85,86,87,88,89],k=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],I=[1,62],w=[1,63],K=[23,33,56,68,73,79],j=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],Oe=[2,51],Ve=[1,64],Re=[67,73,75,77,84,85,86,87,88,89],$e=[56,67,73,75,84,85,86,87,88,89],He=[1,75],Kt=[1,76],Jt=[1,83],st=[33,67,73,75,79,84,85,86,87,88,89],Ue=[23,67,73,75,84,85,86,87,88,89],ze=[67,68,73,75,84,85,86,87,88,89],ut=[33,79],Qt=[1,134],Me=[73,81],Yt={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:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,2],[76,0],[76,2],[80,1],[80,2]],performAction:function(U,m,b,d,E,o,T){var c=o.length-1;switch(E){case 1:return o[c-1];case 2:this.$=d.prepareProgram(o[c]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 28:case 29:case 30:case 31:case 38:case 39:case 46:case 47:this.$=o[c];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(o[c]),strip:d.stripFlags(o[c],o[c]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[c],value:o[c],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(o[c-2],o[c-1],o[c],this._$);break;case 12:this.$={path:o[c-3],params:o[c-2],hash:o[c-1]};break;case 13:this.$=d.prepareBlock(o[c-3],o[c-2],o[c-1],o[c],!1,this._$);break;case 14:this.$=d.prepareBlock(o[c-3],o[c-2],o[c-1],o[c],!0,this._$);break;case 15:this.$={open:o[c-5],path:o[c-4],params:o[c-3],hash:o[c-2],blockParams:o[c-1],strip:d.stripFlags(o[c-5],o[c])};break;case 16:case 17:this.$={path:o[c-4],params:o[c-3],hash:o[c-2],blockParams:o[c-1],strip:d.stripFlags(o[c-5],o[c])};break;case 18:this.$={strip:d.stripFlags(o[c-1],o[c-1]),program:o[c]};break;case 19:var J=d.prepareBlock(o[c-2],o[c-1],o[c],o[c],!1,this._$),bt=d.prepareProgram([J],o[c-1].loc);bt.chained=!0,this.$={strip:o[c-2].strip,program:bt,chain:!0};break;case 21:this.$={path:o[c-1],strip:d.stripFlags(o[c-2],o[c])};break;case 22:this.$=d.prepareMustache(d.syntax.hash(o[c-1],d.locInfo(this._$),{yy:d,syntax:"expr"}),[],void 0,o[c-2],d.stripFlags(o[c-2],o[c]),this._$);break;case 23:case 24:this.$=d.prepareMustache(o[c-3],o[c-2],o[c-1],o[c-4],d.stripFlags(o[c-4],o[c]),this._$);break;case 25:this.$={type:"PartialStatement",name:o[c-3],params:o[c-2],hash:o[c-1],indent:"",strip:d.stripFlags(o[c-4],o[c]),loc:d.locInfo(this._$)};break;case 26:this.$=d.preparePartialBlock(o[c-2],o[c-1],o[c],this._$);break;case 27:this.$={path:o[c-3],params:o[c-2],hash:o[c-1],strip:d.stripFlags(o[c-4],o[c])};break;case 32:this.$=d.syntax.hash(o[c-1],d.locInfo(this._$),{yy:d,syntax:"expr"});break;case 33:this.$={type:"SubExpression",path:o[c-3],params:o[c-2],hash:o[c-1],loc:d.locInfo(this._$)};break;case 34:this.$={type:"Hash",pairs:o[c],loc:d.locInfo(this._$)};break;case 35:this.$={type:"HashPair",key:d.id(o[c-2]),value:o[c],loc:d.locInfo(this._$)};break;case 36:this.$=d.syntax.square(o[c-1],d.locInfo(this._$),{yy:d,syntax:"expr"});break;case 37:this.$=d.id(o[c-1]);break;case 40:this.$={type:"StringLiteral",value:o[c],original:o[c],loc:d.locInfo(this._$)};break;case 41:this.$={type:"NumberLiteral",value:Number(o[c]),original:Number(o[c]),loc:d.locInfo(this._$)};break;case 42:this.$={type:"BooleanLiteral",value:o[c]==="true",original:o[c]==="true",loc:d.locInfo(this._$)};break;case 43:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 44:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 45:this.$=d.preparePath(!0,!1,o[c],this._$);break;case 48:this.$=d.preparePath(!1,o[c-2],o[c],this._$);break;case 49:this.$=d.preparePath(!1,!1,o[c],this._$);break;case 50:o[c-2].push({part:d.id(o[c]),original:o[c],separator:o[c-1]}),this.$=o[c-2];break;case 51:this.$=[{part:d.id(o[c]),original:o[c]}];break;case 52:case 54:case 56:case 64:case 70:case 76:case 84:case 88:case 92:case 96:case 100:case 106:this.$=[];break;case 53:case 55:case 57:case 65:case 71:case 77:case 85:case 89:case 93:case 97:case 101:case 105:case 107:case 109:o[c-1].push(o[c]);break;case 104:case 108:this.$=[o[c]];break}},table:[t([5,14,15,19,29,34,48,53,57,61],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,60:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],53:[1,14],57:[1,18],61:[1,24]}),{1:[2,1]},t(a,[2,53]),t(a,[2,3]),t(a,[2,4]),t(a,[2,5]),t(a,[2,6]),t(a,[2,7]),t(a,[2,8]),t(a,[2,9]),{20:28,49:25,50:26,64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{20:28,50:45,64:29,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t(C,e,{6:3,4:47}),t(F,e,{6:3,4:48}),t(q,[2,54],{17:49}),{20:28,50:50,64:29,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t($,e,{6:3,4:51}),t([5,14,15,18,19,29,34,39,44,47,48,53,57,61],[2,10]),{20:52,64:53,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{20:54,64:53,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{20:55,64:53,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{20:28,50:56,64:29,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{33:[1,57]},t(H,[2,84],{51:58}),t([23,33,56,68,79],[2,34],{72:59,73:[1,60]}),t(k,[2,28]),t(k,[2,29],{91:61,92:I,93:w}),t(K,[2,104]),t(k,[2,38]),t(k,[2,39]),t(k,[2,40]),t(k,[2,41]),t(k,[2,42]),t(k,[2,43]),t(k,[2,44]),t(j,[2,30]),t(j,[2,31]),t([23,33,56,67,68,73,75,79,84,85,86,87,88,89,92,93],Oe,{74:Ve}),t(k,[2,49],{91:65,92:I,93:w}),{73:D,90:66},t(Re,[2,106],{76:67}),{20:28,49:68,50:69,64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t($e,[2,88],{54:70}),t(j,Oe),{25:71,38:73,39:He,43:74,44:Kt,45:72,47:[2,60]},{28:77,43:78,44:Kt,47:[2,62]},{13:80,15:r,18:[1,79]},t(H,[2,92],{58:81}),{26:82,47:Jt},t(st,[2,64],{30:84}),{91:61,92:I,93:w},t(st,[2,70],{35:85}),t(Ue,[2,56],{21:86}),t(H,[2,96],{62:87}),t(a,[2,22]),{20:28,33:[2,86],49:90,50:89,52:88,64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t(K,[2,105]),{74:Ve},{73:D,90:91},{73:[2,46]},{73:[2,47]},{20:28,50:92,64:29,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{73:[1,93]},t(k,[2,45],{91:65,92:I,93:w}),{20:28,50:95,64:29,65:38,66:39,67:n,73:D,75:s,77:[1,94],82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{68:[1,96]},t(ze,[2,100],{69:97}),{20:28,49:100,50:99,55:98,56:[2,90],64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{26:101,47:Jt},{47:[2,61]},t(C,e,{6:3,4:102}),{47:[2,20]},{20:103,64:53,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t($,e,{6:3,4:104}),{26:105,47:Jt},{47:[2,63]},t(a,[2,11]),t(q,[2,55]),{20:28,33:[2,94],49:108,50:107,59:106,64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t(a,[2,26]),{20:109,64:53,65:38,66:39,67:n,73:D,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},t(ut,[2,66],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,31:110,50:111,49:112,67:n,73:i,75:s,84:u,85:l,86:h,87:p,88:f,89:y}),t(ut,[2,72],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,36:113,50:114,49:115,67:n,73:i,75:s,84:u,85:l,86:h,87:p,88:f,89:y}),{20:28,22:116,23:[2,58],49:118,50:117,64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{20:28,33:[2,98],49:121,50:120,63:119,64:29,65:38,66:39,67:n,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{33:[1,122]},t(H,[2,85]),{33:[2,87]},t(k,[2,48],{91:65,92:I,93:w}),t(K,[2,35]),t(j,[2,50]),t(j,[2,36]),t(Re,[2,107]),t(j,[2,32]),{20:28,49:125,50:124,64:29,65:38,66:39,67:n,68:[2,102],70:123,71:27,72:30,73:i,75:s,82:31,83:32,84:u,85:l,86:h,87:p,88:f,89:y,90:41},{56:[1,126]},t($e,[2,89]),{56:[2,91]},t(a,[2,13]),{38:73,39:He,43:74,44:Kt,45:128,46:127,47:[2,82]},t(st,[2,76],{40:129}),{47:[2,18]},t(a,[2,14]),{33:[1,130]},t(H,[2,93]),{33:[2,95]},{33:[1,131]},{32:132,33:[2,68],78:133,79:Qt},t(st,[2,65]),t(ut,[2,67]),{33:[2,74],37:135,78:136,79:Qt},t(st,[2,71]),t(ut,[2,73]),{23:[1,137]},t(Ue,[2,57]),{23:[2,59]},{33:[1,138]},t(H,[2,97]),{33:[2,99]},t(a,[2,23]),{68:[1,139]},t(ze,[2,101]),{68:[2,103]},t(a,[2,24]),{47:[2,19]},{47:[2,83]},t(ut,[2,78],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,41:140,50:141,49:142,67:n,73:i,75:s,84:u,85:l,86:h,87:p,88:f,89:y}),t(a,[2,25]),t(a,[2,21]),{33:[1,143]},{33:[2,69]},{73:[1,145],80:144},{33:[1,146]},{33:[2,75]},t(q,[2,12]),t($,[2,27]),t(j,[2,33]),{33:[2,80],42:147,78:148,79:Qt},t(st,[2,77]),t(ut,[2,79]),t(C,[2,15]),{73:[1,150],81:[1,149]},t(Me,[2,108]),t(F,[2,16]),{33:[1,151]},{33:[2,81]},{33:[2,37]},t(Me,[2,109]),t(C,[2,17])],defaultActions:{4:[2,1],62:[2,46],63:[2,47],72:[2,61],74:[2,20],78:[2,63],90:[2,87],100:[2,91],104:[2,18],108:[2,95],118:[2,59],121:[2,99],125:[2,103],127:[2,19],128:[2,83],133:[2,69],136:[2,75],148:[2,81],149:[2,37]},parseError:function(U,m){if(m.recoverable)this.trace(U);else{var b=new Error(U);throw b.hash=m,b}},parse:function(U){var m=this,b=[0],d=[],E=[null],o=[],T=this.table,c="",J=0,bt=0,Ge=0,an=2,je=1,sn=o.slice.call(arguments,1),S=Object.create(this.lexer),rt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(rt.yy[Xt]=this.yy[Xt]);S.setInput(U,rt.yy),rt.yy.lexer=S,rt.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var te=S.yylloc;o.push(te);var un=S.options&&S.options.ranges;typeof rt.yy.parseError=="function"?this.parseError=rt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qi(z){b.length=b.length-2*z,E.length=E.length-z,o.length=o.length-z}for(var on=function(){var z;return z=S.lex()||je,typeof z!="number"&&(z=m.symbols_[z]||z),z},N,ee,nt,_,_i,re,ot={},Tt,W,We,Nt;;){if(nt=b[b.length-1],this.defaultActions[nt]?_=this.defaultActions[nt]:((N===null||typeof N>"u")&&(N=on()),_=T[nt]&&T[nt][N]),typeof _>"u"||!_.length||!_[0]){var ne="";Nt=[];for(Tt in T[nt])this.terminals_[Tt]&&Tt>an&&Nt.push("'"+this.terminals_[Tt]+"'");S.showPosition?ne="Parse error on line "+(J+1)+`:
`+S.showPosition()+`
Expecting `+Nt.join(", ")+", got '"+(this.terminals_[N]||N)+"'":ne="Parse error on line "+(J+1)+": Unexpected "+(N==je?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(ne,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:te,expected:Nt})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+nt+", token: "+N);switch(_[0]){case 1:b.push(N),E.push(S.yytext),o.push(S.yylloc),b.push(_[1]),N=null,ee?(N=ee,ee=null):(bt=S.yyleng,c=S.yytext,J=S.yylineno,te=S.yylloc,Ge>0&&Ge--);break;case 2:if(W=this.productions_[_[1]][1],ot.$=E[E.length-W],ot._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},un&&(ot._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),re=this.performAction.apply(ot,[c,bt,J,rt.yy,_[1],E,o].concat(sn)),typeof re<"u")return re;W&&(b=b.slice(0,-1*W*2),E=E.slice(0,-1*W),o=o.slice(0,-1*W)),b.push(this.productions_[_[1]][0]),E.push(ot.$),o.push(ot._$),We=T[b[b.length-2]][b[b.length-1]],b.push(We);break;case 3:return!0}}return!0}},nn=(function(){var U={EOF:1,parseError:function(m,b){if(this.yy.parser)this.yy.parser.parseError(m,b);else throw new Error(m)},setInput:function(m,b){return this.yy=b||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var b=m.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var b=m.length,d=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var E=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),d.length-1&&(this.yylineno-=d.length-1);var o=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:d?(d.length===E.length?this.yylloc.first_column:0)+E[E.length-d.length].length-d[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-b]),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(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),b=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
`+b+"^"},test_match:function(m,b){var d,E,o;if(this.options.backtrack_lexer&&(o={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&&(o.yylloc.range=this.yylloc.range.slice(0))),E=m[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],d=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var T in o)this[T]=o[T];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,b,d,E;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),T=0;T<o.length;T++)if(d=this._input.match(this.rules[o[T]]),d&&(!b||d[0].length>b[0].length)){if(b=d,E=T,this.options.backtrack_lexer){if(m=this.test_match(d,o[T]),m!==!1)return m;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(m=this.test_match(b,o[E]),m!==!1?m:!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 m=this.next();return m||this.lex()},begin:function(m){this.conditionStack.push(m)},popState:function(){var m=this.conditionStack.length-1;return m>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(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},pushState:function(m){this.begin(m)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(m,b,d,E){function o(c,J){return b.yytext=b.yytext.substring(c,b.yyleng-J+c)}var T=E;switch(d){case 0:if(b.yytext.slice(-2)==="\\\\"?(o(0,1),this.begin("mu")):b.yytext.slice(-1)==="\\"?(o(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(o(5,9),18);case 5:return 15;case 6:return this.popState(),14;case 7:return 67;case 8:return 68;case 9:if(m.syntax.square==="string")this.unput(b.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;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;case 18:return this.popState(),44;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(b.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;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;case 33:return this.popState(),33;case 34:return b.yytext=o(1,2).replace(/\\"/g,'"'),84;case 35:return b.yytext=o(1,2).replace(/\\'/g,"'"),84;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 b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;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 U})();Yt.lexer=nn;function Zt(){this.yy={}}return Zt.prototype=Yt,Yt.Parser=Zt,new Zt})(),Pt=Jn,ie=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];Be.prototype=new Error;pt=Be;qt.prototype={constructor:qt,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!qt.prototype[r.type])throw new pt('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new pt(t.type+" requires "+e)},acceptArray:fun