sigma-ui
Version:
CLI for SIGMA-UI components.
996 lines (995 loc) • 171 kB
JavaScript
import "./chunk-PZ5AY32C.js";
// ../../node_modules/.pnpm/prettier@3.5.0/node_modules/prettier/plugins/glimmer.mjs
var Ws = Object.defineProperty;
var Or = (e5) => {
throw TypeError(e5);
};
var Fe = (e5, t) => {
for (var r in t) Ws(e5, r, { get: t[r], enumerable: true });
};
var Br = (e5, t, r) => t.has(e5) || Or("Cannot " + r);
var I = (e5, t, r) => (Br(e5, t, "read from private field"), r ? r.call(e5) : t.get(e5));
var Lt = (e5, t, r) => t.has(e5) ? Or("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e5) : t.set(e5, r);
var Y = (e5, t, r, s) => (Br(e5, t, "write to private field"), s ? s.call(e5, r) : t.set(e5, r), r);
var Pr = {};
Fe(Pr, { languages: () => ps, parsers: () => xr, printers: () => wi });
var js = (e5, t, r, s) => {
if (!(e5 && t == null)) return t.replaceAll ? t.replaceAll(r, s) : r.global ? t.replace(r, s) : t.split(r).join(s);
};
var He = js;
var Dt = "string";
var Gt = "array";
var Kt = "cursor";
var _t = "indent";
var Ot = "align";
var Wt = "trim";
var Bt = "group";
var It = "fill";
var bt = "if-break";
var jt = "indent-if-break";
var Qt = "line-suffix";
var Jt = "line-suffix-boundary";
var j = "line";
var $t = "label";
var Rt = "break-parent";
var fe = /* @__PURE__ */ new Set([Kt, _t, Ot, Wt, Bt, It, bt, jt, Qt, Jt, j, $t, Rt]);
var Qs = (e5, t, r) => {
if (!(e5 && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
};
var G = Qs;
function Js(e5) {
if (typeof e5 == "string") return Dt;
if (Array.isArray(e5)) return Gt;
if (!e5) return;
let { type: t } = e5;
if (fe.has(t)) return t;
}
var qt = Js;
var $s = (e5) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e5);
function Xs(e5) {
let t = e5 === null ? "null" : typeof e5;
if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
Expected it to be 'string' or 'object'.`;
if (qt(e5)) throw new Error("doc is valid.");
let r = Object.prototype.toString.call(e5);
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
let s = $s([...fe].map((n) => `'${n}'`));
return `Unexpected doc.type '${e5.type}'.
Expected it to be ${s}.`;
}
var Ue = class extends Error {
name = "InvalidDocError";
constructor(t) {
super(Xs(t)), this.doc = t;
}
};
var Me = Ue;
function tn(e5, t) {
if (typeof e5 == "string") return t(e5);
let r = /* @__PURE__ */ new Map();
return s(e5);
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 (qt(i)) {
case Gt:
return t(i.map(s));
case It:
return t({ ...i, parts: i.parts.map(s) });
case bt:
return t({ ...i, breakContents: s(i.breakContents), flatContents: s(i.flatContents) });
case Bt: {
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 Ot:
case _t:
case jt:
case $t:
case Qt:
return t({ ...i, contents: s(i.contents) });
case Dt:
case Kt:
case Wt:
case Jt:
case j:
case Rt:
return t(i);
default:
throw new Me(i);
}
}
}
function Ir(e5, t = Rr) {
return tn(e5, (r) => typeof r == "string" ? yt(t, r.split(`
`)) : r);
}
var ze = () => {
};
var kt = ze;
var Ye = ze;
var qr = ze;
function B(e5) {
return kt(e5), { type: _t, contents: e5 };
}
function en(e5, t) {
return kt(t), { type: Ot, contents: t, n: e5 };
}
function R(e5, t = {}) {
return kt(e5), Ye(t.expandedStates, true), { type: Bt, id: t.id, contents: e5, break: !!t.shouldBreak, expandedStates: t.expandedStates };
}
function Xt(e5) {
return en(-1, e5);
}
function Ge(e5) {
return qr(e5), { type: It, parts: e5 };
}
function Ke(e5, t = "", r = {}) {
return kt(e5), t !== "" && kt(t), { type: bt, breakContents: e5, flatContents: t, groupId: r.groupId };
}
var Vr = { type: Rt };
var rn = { type: j, hard: true };
var sn = { type: j, hard: true, literal: true };
var L = { type: j };
var H = { type: j, soft: true };
var tt = [rn, Vr];
var Rr = [sn, Vr];
function yt(e5, t) {
kt(e5), Ye(t);
let r = [];
for (let s = 0; s < t.length; s++) s !== 0 && r.push(e5), r.push(t[s]);
return r;
}
var me = "'";
var Fr = '"';
function nn(e5, t) {
let r = t === true || t === me ? me : Fr, s = r === me ? Fr : me, n = 0, i = 0;
for (let a of e5) a === r ? n++ : a === s && i++;
return n > i ? s : r;
}
var de = nn;
function We(e5) {
if (typeof e5 != "string") throw new TypeError("Expected a string");
return e5.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
var z;
var je = class {
constructor(t) {
Lt(this, z);
Y(this, z, new Set(t));
}
getLeadingWhitespaceCount(t) {
let r = I(this, z), s = 0;
for (let n = 0; n < t.length && r.has(t.charAt(n)); n++) s++;
return s;
}
getTrailingWhitespaceCount(t) {
let r = I(this, z), 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 I(this, z).has(t.charAt(0));
}
hasTrailingWhitespace(t) {
return I(this, z).has(G(false, 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 = false) {
let s = `[${We([...I(this, z)].join(""))}]+`, n = new RegExp(r ? `(${s})` : s, "u");
return t.split(n);
}
hasWhitespaceCharacter(t) {
let r = I(this, z);
return Array.prototype.some.call(t, (s) => r.has(s));
}
hasNonWhitespaceCharacter(t) {
let r = I(this, z);
return Array.prototype.some.call(t, (s) => !r.has(s));
}
isWhitespaceOnly(t) {
let r = I(this, z);
return Array.prototype.every.call(t, (s) => r.has(s));
}
};
z = /* @__PURE__ */ new WeakMap();
var Hr = je;
var an = [" ", `
`, "\f", "\r", " "];
var on = new Hr(an);
var K = on;
function ln(e5) {
return Array.isArray(e5) && e5.length > 0;
}
var Zt = ln;
var Qe = class extends Error {
name = "UnexpectedNodeError";
constructor(t, r, s = "type") {
super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`), this.node = t;
}
};
var Ur = Qe;
function Mr(e5, t, r) {
if (e5.type === "TextNode") {
let s = e5.chars.trim();
if (!s) return null;
r.tag === "style" && r.children.length === 1 && r.children[0] === e5 ? t.chars = "" : t.chars = K.split(s).join(" ");
}
e5.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), e5.type === "Block" && (delete t.blockParamNodes, delete t.params), e5.type === "AttrNode" && e5.name.toLowerCase() === "class" && delete t.value, e5.type === "PathExpression" && (t.head = e5.head.original);
}
Mr.ignoredProperties = /* @__PURE__ */ new Set(["loc", "selfClosing"]);
var zr = Mr;
function cn(e5) {
let { node: t } = e5;
if (t.type !== "TextNode") return;
let { parent: r } = e5;
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 = await n(t.chars, { parser: "css" });
return i ? [tt, i, Xt(H)] : [];
};
}
var Yr = cn;
var te = null;
function ee(e5) {
if (te !== null && typeof te.property) {
let t = te;
return te = ee.prototype = null, t;
}
return te = ee.prototype = e5 ?? /* @__PURE__ */ Object.create(null), new ee();
}
var un = 10;
for (let e5 = 0; e5 <= un; e5++) ee();
function Je(e5) {
return ee(e5);
}
function hn(e5, t = "type") {
Je(e5);
function r(s) {
let n = s[t], i = e5[n];
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${n}'.`), { node: s });
return i;
}
return r;
}
var Gr = hn;
var Kr = { 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"] };
var pn = Gr(Kr);
var Wr = pn;
function St(e5) {
return e5.loc.start.offset;
}
function re(e5) {
return e5.loc.end.offset;
}
var jr = /* @__PURE__ */ new Set(["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
function Jr(e5) {
return e5.toUpperCase() === e5;
}
function fn(e5) {
return e5.type === "ElementNode" && typeof e5.tag == "string" && !e5.tag.startsWith(":") && (Jr(e5.tag[0]) || e5.tag.includes("."));
}
function mn(e5) {
return jr.has(e5.toLowerCase()) && !Jr(e5[0]);
}
function $e(e5) {
return e5.selfClosing === true || mn(e5.tag) || fn(e5) && e5.children.every((t) => ge(t));
}
function ge(e5) {
return e5.type === "TextNode" && !/\S/u.test(e5.chars);
}
function Qr(e5) {
return (e5 == null ? void 0 : e5.type) === "MustacheCommentStatement" && typeof e5.value == "string" && e5.value.trim() === "prettier-ignore";
}
function $r(e5) {
return Qr(e5.node) || e5.isInArray && (e5.key === "children" || e5.key === "body" || e5.key === "parts") && Qr(e5.siblings[e5.index - 2]);
}
var is = 2;
function dn(e5, t, r) {
var n, i, a, o, c, h, p, m, S;
let { node: s } = e5;
switch (s.type) {
case "Block":
case "Program":
case "Template":
return R(e5.map(r, "body"));
case "ElementNode": {
let y = R(bn(e5, r)), E = t.htmlWhitespaceSensitivity === "ignore" && ((n = e5.next) == null ? void 0 : n.type) === "ElementNode" ? H : "";
if ($e(s)) return [y, E];
let C = ["</", s.tag, ">"];
return s.children.length === 0 ? [y, B(C), E] : t.htmlWhitespaceSensitivity === "ignore" ? [y, B(Xr(e5, t, r)), tt, B(C), E] : [y, B(R(Xr(e5, t, r))), B(C), E];
}
case "BlockStatement":
return wn(e5) ? [Tn(e5, r), es(e5, r, t), rs(e5, r, t)] : [vn(e5, r), R([es(e5, r, t), rs(e5, r, t), Nn(e5, r, t)])];
case "ElementModifierStatement":
return R(["{{", ns(e5, r), "}}"]);
case "MustacheStatement":
return R([be(s), ns(e5, r), ye(s)]);
case "SubExpression":
return R(["(", _n(e5, r), H, ")"]);
case "AttrNode": {
let { name: y, value: E } = s, C = E.type === "TextNode";
if (C && E.chars === "" && St(E) === re(E)) return y;
let w = C ? de(E.chars, t.singleQuote) : E.type === "ConcatStatement" ? de(E.parts.map((q) => q.type === "TextNode" ? q.chars : "").join(""), t.singleQuote) : "", U = r("value");
return [y, "=", w, y === "class" && w ? R(B(U)) : U, w];
}
case "ConcatStatement":
return e5.map(r, "parts");
case "Hash":
return yt(L, e5.map(r, "pairs"));
case "HashPair":
return [s.key, "=", r("value")];
case "TextNode": {
if (e5.parent.tag === "pre" || e5.parent.tag === "style") return s.chars;
let y = He(false, s.chars, "{{", String.raw`\{{`), E = xn(e5);
if (E) {
if (E === "class") {
let X = y.trim().split(/\s+/u).join(" "), rt = false, V = false;
return e5.parent.type === "ConcatStatement" && (((i = e5.previous) == null ? void 0 : i.type) === "MustacheStatement" && /^\s/u.test(y) && (rt = true), ((a = e5.next) == null ? void 0 : a.type) === "MustacheStatement" && /\s$/u.test(y) && X !== "" && (V = true)), [rt ? L : "", X, V ? L : ""];
}
return Ir(y);
}
let C = K.isWhitespaceOnly(y), { isFirst: x, isLast: w } = e5;
if (t.htmlWhitespaceSensitivity !== "ignore") {
let X = w && e5.parent.type === "Template", rt = x && e5.parent.type === "Template";
if (C) {
if (rt || X) return "";
let A = [L], nt = Vt(y);
return nt && (A = se(nt)), w && (A = A.map((ue) => Xt(ue))), A;
}
let V = K.getLeadingWhitespace(y), xt = [];
if (V) {
xt = [L];
let A = Vt(V);
A && (xt = se(A)), y = y.slice(V.length);
}
let F = K.getTrailingWhitespace(y), st = [];
if (F) {
if (!X) {
st = [L];
let A = Vt(F);
A && (st = se(A)), w && (st = st.map((nt) => Xt(nt)));
}
y = y.slice(0, -F.length);
}
return [...xt, Ge(ss(y)), ...st];
}
let U = Vt(y), q = Pn(y), $ = An(y);
if ((x || w) && C && (e5.parent.type === "Block" || e5.parent.type === "ElementNode" || e5.parent.type === "Template")) return "";
C && U ? (q = Math.min(U, is), $ = 0) : ((((o = e5.next) == null ? void 0 : o.type) === "BlockStatement" || ((c = e5.next) == null ? void 0 : c.type) === "ElementNode") && ($ = Math.max($, 1)), (((h = e5.previous) == null ? void 0 : h.type) === "BlockStatement" || ((p = e5.previous) == null ? void 0 : p.type) === "ElementNode") && (q = Math.max(q, 1)));
let Nt = "", Ct = "";
return $ === 0 && ((m = e5.next) == null ? void 0 : m.type) === "MustacheStatement" && (Ct = " "), q === 0 && ((S = e5.previous) == null ? void 0 : S.type) === "MustacheStatement" && (Nt = " "), x && (q = 0, Nt = ""), w && ($ = 0, Ct = ""), K.hasLeadingWhitespace(y) && (y = Nt + K.trimStart(y)), K.hasTrailingWhitespace(y) && (y = K.trimEnd(y) + Ct), [...se(q), Ge(ss(y)), ...se($)];
}
case "MustacheCommentStatement": {
let y = St(s), E = re(s), C = t.originalText.charAt(y + 2) === "~", x = t.originalText.charAt(E - 3) === "~", w = s.value.includes("}}") ? "--" : "";
return ["{{", C ? "~" : "", "!", w, s.value, w, x ? "~" : "", "}}"];
}
case "PathExpression":
return Rn(s);
case "BooleanLiteral":
return String(s.value);
case "CommentStatement":
return ["<!--", s.value, "-->"];
case "StringLiteral":
return Ln(e5, t);
case "NumberLiteral":
return String(s.value);
case "UndefinedLiteral":
return "undefined";
case "NullLiteral":
return "null";
case "AtHead":
case "VarHead":
case "ThisHead":
default:
throw new Ur(s, "Handlebars");
}
}
function gn(e5, t) {
return St(e5) - St(t);
}
function bn(e5, t) {
let { node: r } = e5, s = ["attributes", "modifiers", "comments"].filter((i) => Zt(r[i])), n = s.flatMap((i) => r[i]).sort(gn);
for (let i of s) e5.each(({ node: a }) => {
let o = n.indexOf(a);
n.splice(o, 1, [L, t()]);
}, i);
return Zt(r.blockParams) && n.push(L, Ze(r)), ["<", r.tag, B(n), yn(r)];
}
function Xr(e5, t, r) {
let { node: s } = e5, n = s.children.every((i) => ge(i));
return t.htmlWhitespaceSensitivity === "ignore" && n ? "" : e5.map(({ isFirst: i }) => {
let a = r();
return i && t.htmlWhitespaceSensitivity === "ignore" ? [H, a] : a;
}, "children");
}
function yn(e5) {
return $e(e5) ? Ke([H, "/>"], [" />", H]) : Ke([H, ">"], ">");
}
function be(e5) {
var s;
let t = e5.trusting ? "{{{" : "{{", r = (s = e5.strip) != null && s.open ? "~" : "";
return [t, r];
}
function ye(e5) {
var s;
let t = e5.trusting ? "}}}" : "}}";
return [(s = e5.strip) != null && s.close ? "~" : "", t];
}
function kn(e5) {
let t = be(e5), r = e5.openStrip.open ? "~" : "";
return [t, r, "#"];
}
function Sn(e5) {
let t = ye(e5);
return [e5.openStrip.close ? "~" : "", t];
}
function Zr(e5) {
let t = be(e5), r = e5.closeStrip.open ? "~" : "";
return [t, r, "/"];
}
function ts(e5) {
let t = ye(e5);
return [e5.closeStrip.close ? "~" : "", t];
}
function as(e5) {
let t = be(e5), r = e5.inverseStrip.open ? "~" : "";
return [t, r];
}
function os(e5) {
let t = ye(e5);
return [e5.inverseStrip.close ? "~" : "", t];
}
function vn(e5, t) {
let { node: r } = e5, s = [], n = ke(e5, t);
return n && s.push(R(n)), Zt(r.program.blockParams) && s.push(Ze(r.program)), R([kn(r), Xe(e5, t), s.length > 0 ? B([L, yt(L, s)]) : "", H, Sn(r)]);
}
function En(e5, t) {
return [t.htmlWhitespaceSensitivity === "ignore" ? tt : "", as(e5), "else", os(e5)];
}
var ls = (e5, t) => e5.head.type === "VarHead" && t.head.type === "VarHead" && e5.head.name === t.head.name;
function wn(e5) {
var s;
let { grandparent: t, node: r } = e5;
return ((s = t == null ? void 0 : t.inverse) == null ? void 0 : s.body.length) === 1 && t.inverse.body[0] === r && ls(t.inverse.body[0].path, t.path);
}
function Tn(e5, t) {
let { node: r, grandparent: s } = e5;
return R([as(s), ["else", " ", s.inverse.body[0].path.head.name], B([L, R(ke(e5, t)), ...Zt(r.program.blockParams) ? [L, Ze(r.program)] : []]), H, os(s)]);
}
function Nn(e5, t, r) {
let { node: s } = e5;
return r.htmlWhitespaceSensitivity === "ignore" ? [cs(s) ? H : tt, Zr(s), t("path"), ts(s)] : [Zr(s), t("path"), ts(s)];
}
function cs(e5) {
return e5.type === "BlockStatement" && e5.program.body.every((t) => ge(t));
}
function Cn(e5) {
return us(e5) && e5.inverse.body.length === 1 && e5.inverse.body[0].type === "BlockStatement" && ls(e5.inverse.body[0].path, e5.path);
}
function us(e5) {
return e5.type === "BlockStatement" && e5.inverse;
}
function es(e5, t, r) {
let { node: s } = e5;
if (cs(s)) return "";
let n = t("program");
return r.htmlWhitespaceSensitivity === "ignore" ? B([tt, n]) : B(n);
}
function rs(e5, t, r) {
let { node: s } = e5, n = t("inverse"), i = r.htmlWhitespaceSensitivity === "ignore" ? [tt, n] : n;
return Cn(s) ? i : us(s) ? [En(s, r), B(i)] : "";
}
function ss(e5) {
return yt(L, K.split(e5));
}
function xn(e5) {
for (let t = 0; t < 2; t++) {
let r = e5.getParentNode(t);
if ((r == null ? void 0 : r.type) === "AttrNode") return r.name.toLowerCase();
}
}
function Vt(e5) {
return e5 = typeof e5 == "string" ? e5 : "", e5.split(`
`).length - 1;
}
function Pn(e5) {
e5 = typeof e5 == "string" ? e5 : "";
let t = (e5.match(/^([^\S\n\r]*[\n\r])+/gu) || [])[0] || "";
return Vt(t);
}
function An(e5) {
e5 = typeof e5 == "string" ? e5 : "";
let t = (e5.match(/([\n\r][^\S\n\r]*)+$/gu) || [])[0] || "";
return Vt(t);
}
function se(e5 = 0) {
return Array.from({ length: Math.min(e5, is) }).fill(tt);
}
function Ln(e5, t) {
let { node: { value: r } } = e5, s = de(r, Dn(e5) ? !t.singleQuote : t.singleQuote);
return [s, He(false, r, s, `\\${s}`), s];
}
function Dn(e5) {
let { ancestors: t } = e5, r = t.findIndex((s) => s.type !== "SubExpression");
return r !== -1 && t[r + 1].type === "ConcatStatement" && t[r + 2].type === "AttrNode";
}
function _n(e5, t) {
let r = Xe(e5, t), s = ke(e5, t);
return s ? B([r, L, R(s)]) : r;
}
function ns(e5, t) {
let r = Xe(e5, t), s = ke(e5, t);
return s ? [B([r, L, s]), H] : r;
}
function Xe(e5, t) {
return t("path");
}
function ke(e5, t) {
var n;
let { node: r } = e5, s = [];
return r.params.length > 0 && s.push(...e5.map(t, "params")), ((n = r.hash) == null ? void 0 : n.pairs.length) > 0 && s.push(t("hash")), s.length === 0 ? "" : yt(L, s);
}
function Ze(e5) {
return ["as |", e5.blockParams.join(" "), "|"];
}
var On = new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~");
var Bn = /* @__PURE__ */ new Set(["true", "false", "null", "undefined"]);
var In = (e5, t) => t === 0 && e5.startsWith("@") ? false : t !== 0 && Bn.has(e5) || /\s/u.test(e5) || /^\d/u.test(e5) || Array.prototype.some.call(e5, (r) => On.has(r));
function Rn(e5) {
return e5.tail.length === 0 && e5.original.includes("/") ? e5.original : [e5.head.original, ...e5.tail].map((r, s) => In(r, s) ? `[${r}]` : r).join(".");
}
var qn = { print: dn, massageAstNode: zr, hasPrettierIgnore: $r, getVisitorKeys: Wr, embed: Yr };
var hs = qn;
var ps = [{ linguistLanguageId: 155, name: "Handlebars", type: "markup", color: "#f7931e", aliases: ["hbs", "htmlbars"], extensions: [".handlebars", ".hbs"], tmScope: "text.html.handlebars", aceMode: "handlebars", parsers: ["glimmer"], vscodeLanguageIds: ["handlebars"] }];
var xr = {};
Fe(xr, { glimmer: () => Ei });
var Vn = Object.freeze([]);
function ms() {
return Vn;
}
var Ma = ms();
var za = ms();
var tr = Object.assign;
var fs = console;
function ds(e5, t = "unexpected unreachable branch") {
throw fs.log("unreachable", e5), fs.log(`${t} :: ${JSON.stringify(e5)} (${e5})`), new Error("code reached unreachable");
}
var Fn = function() {
var e5 = function(it, d, k, g) {
for (k = k || {}, g = it.length; g--; k[it[g]] = d) ;
return k;
}, t = [2, 44], r = [1, 20], s = [5, 14, 15, 19, 29, 34, 39, 44, 47, 48, 52, 56, 60], n = [1, 35], i = [1, 38], a = [1, 30], o = [1, 31], c = [1, 32], h = [1, 33], p = [1, 34], m = [1, 37], S = [14, 15, 19, 29, 34, 39, 44, 47, 48, 52, 56, 60], y = [14, 15, 19, 29, 34, 44, 47, 48, 52, 56, 60], E = [15, 18], C = [14, 15, 19, 29, 34, 47, 48, 52, 56, 60], x = [33, 64, 71, 79, 80, 81, 82, 83, 84], w = [23, 33, 55, 64, 67, 71, 74, 79, 80, 81, 82, 83, 84], U = [1, 51], q = [23, 33, 55, 64, 67, 71, 74, 79, 80, 81, 82, 83, 84, 86], $ = [2, 43], Nt = [55, 64, 71, 79, 80, 81, 82, 83, 84], Ct = [1, 58], X = [1, 59], rt = [1, 66], V = [33, 64, 71, 74, 79, 80, 81, 82, 83, 84], xt = [23, 64, 71, 79, 80, 81, 82, 83, 84], F = [1, 76], st = [64, 67, 71, 79, 80, 81, 82, 83, 84], A = [33, 74], nt = [23, 33, 55, 67, 71, 74], ue = [1, 106], De = [1, 118], Ar = [71, 76], _e = { 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, expr: 49, mustache_repetition0: 50, mustache_option0: 51, OPEN_UNESCAPED: 52, mustache_repetition1: 53, mustache_option1: 54, CLOSE_UNESCAPED: 55, OPEN_PARTIAL: 56, partial_repetition0: 57, partial_option0: 58, openPartialBlock: 59, OPEN_PARTIAL_BLOCK: 60, openPartialBlock_repetition0: 61, openPartialBlock_option0: 62, sexpr: 63, OPEN_SEXPR: 64, sexpr_repetition0: 65, sexpr_option0: 66, CLOSE_SEXPR: 67, hash: 68, hash_repetition_plus0: 69, hashSegment: 70, ID: 71, EQUALS: 72, blockParams: 73, OPEN_BLOCK_PARAMS: 74, blockParams_repetition_plus0: 75, CLOSE_BLOCK_PARAMS: 76, path: 77, dataName: 78, STRING: 79, NUMBER: 80, BOOLEAN: 81, UNDEFINED: 82, NULL: 83, DATA: 84, pathSegments: 85, SEP: 86, $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", 52: "OPEN_UNESCAPED", 55: "CLOSE_UNESCAPED", 56: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 64: "OPEN_SEXPR", 67: "CLOSE_SEXPR", 71: "ID", 72: "EQUALS", 74: "OPEN_BLOCK_PARAMS", 76: "CLOSE_BLOCK_PARAMS", 79: "STRING", 80: "NUMBER", 81: "BOOLEAN", 82: "UNDEFINED", 83: "NULL", 84: "DATA", 86: "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, 5], [8, 5], [11, 5], [12, 3], [59, 5], [49, 1], [49, 1], [63, 5], [68, 1], [70, 3], [73, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [78, 2], [77, 1], [85, 3], [85, 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], [50, 0], [50, 2], [51, 0], [51, 1], [53, 0], [53, 2], [54, 0], [54, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [65, 0], [65, 2], [66, 0], [66, 1], [69, 1], [69, 2], [75, 1], [75, 2]], performAction: function(d, k, g, b, N, l, Pt) {
var u = l.length - 1;
switch (N) {
case 1:
return l[u - 1];
case 2:
this.$ = b.prepareProgram(l[u]);
break;
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 20:
case 27:
case 28:
case 33:
case 34:
this.$ = l[u];
break;
case 9:
this.$ = { type: "CommentStatement", value: b.stripComment(l[u]), strip: b.stripFlags(l[u], l[u]), loc: b.locInfo(this._$) };
break;
case 10:
this.$ = { type: "ContentStatement", original: l[u], value: l[u], loc: b.locInfo(this._$) };
break;
case 11:
this.$ = b.prepareRawBlock(l[u - 2], l[u - 1], l[u], this._$);
break;
case 12:
this.$ = { path: l[u - 3], params: l[u - 2], hash: l[u - 1] };
break;
case 13:
this.$ = b.prepareBlock(l[u - 3], l[u - 2], l[u - 1], l[u], false, this._$);
break;
case 14:
this.$ = b.prepareBlock(l[u - 3], l[u - 2], l[u - 1], l[u], true, this._$);
break;
case 15:
this.$ = { open: l[u - 5], path: l[u - 4], params: l[u - 3], hash: l[u - 2], blockParams: l[u - 1], strip: b.stripFlags(l[u - 5], l[u]) };
break;
case 16:
case 17:
this.$ = { path: l[u - 4], params: l[u - 3], hash: l[u - 2], blockParams: l[u - 1], strip: b.stripFlags(l[u - 5], l[u]) };
break;
case 18:
this.$ = { strip: b.stripFlags(l[u - 1], l[u - 1]), program: l[u] };
break;
case 19:
var at = b.prepareBlock(l[u - 2], l[u - 1], l[u], l[u], false, this._$), Yt = b.prepareProgram([at], l[u - 1].loc);
Yt.chained = true, this.$ = { strip: l[u - 2].strip, program: Yt, chain: true };
break;
case 21:
this.$ = { path: l[u - 1], strip: b.stripFlags(l[u - 2], l[u]) };
break;
case 22:
case 23:
this.$ = b.prepareMustache(l[u - 3], l[u - 2], l[u - 1], l[u - 4], b.stripFlags(l[u - 4], l[u]), this._$);
break;
case 24:
this.$ = { type: "PartialStatement", name: l[u - 3], params: l[u - 2], hash: l[u - 1], indent: "", strip: b.stripFlags(l[u - 4], l[u]), loc: b.locInfo(this._$) };
break;
case 25:
this.$ = b.preparePartialBlock(l[u - 2], l[u - 1], l[u], this._$);
break;
case 26:
this.$ = { path: l[u - 3], params: l[u - 2], hash: l[u - 1], strip: b.stripFlags(l[u - 4], l[u]) };
break;
case 29:
this.$ = { type: "SubExpression", path: l[u - 3], params: l[u - 2], hash: l[u - 1], loc: b.locInfo(this._$) };
break;
case 30:
this.$ = { type: "Hash", pairs: l[u], loc: b.locInfo(this._$) };
break;
case 31:
this.$ = { type: "HashPair", key: b.id(l[u - 2]), value: l[u], loc: b.locInfo(this._$) };
break;
case 32:
this.$ = b.id(l[u - 1]);
break;
case 35:
this.$ = { type: "StringLiteral", value: l[u], original: l[u], loc: b.locInfo(this._$) };
break;
case 36:
this.$ = { type: "NumberLiteral", value: Number(l[u]), original: Number(l[u]), loc: b.locInfo(this._$) };
break;
case 37:
this.$ = { type: "BooleanLiteral", value: l[u] === "true", original: l[u] === "true", loc: b.locInfo(this._$) };
break;
case 38:
this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: b.locInfo(this._$) };
break;
case 39:
this.$ = { type: "NullLiteral", original: null, value: null, loc: b.locInfo(this._$) };
break;
case 40:
this.$ = b.preparePath(true, l[u], this._$);
break;
case 41:
this.$ = b.preparePath(false, l[u], this._$);
break;
case 42:
l[u - 2].push({ part: b.id(l[u]), original: l[u], separator: l[u - 1] }), this.$ = l[u - 2];
break;
case 43:
this.$ = [{ part: b.id(l[u]), original: l[u] }];
break;
case 44:
case 46:
case 48:
case 56:
case 62:
case 68:
case 76:
case 80:
case 84:
case 88:
case 92:
this.$ = [];
break;
case 45:
case 47:
case 49:
case 57:
case 63:
case 69:
case 77:
case 81:
case 85:
case 89:
case 93:
case 97:
case 99:
l[u - 1].push(l[u]);
break;
case 96:
case 98:
this.$ = [l[u]];
break;
}
}, table: [e5([5, 14, 15, 19, 29, 34, 48, 52, 56, 60], t, { 3: 1, 4: 2, 6: 3 }), { 1: [3] }, { 5: [1, 4] }, e5([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, 59: 19, 14: [1, 12], 15: r, 19: [1, 23], 29: [1, 21], 34: [1, 22], 48: [1, 13], 52: [1, 14], 56: [1, 18], 60: [1, 24] }), { 1: [2, 1] }, e5(s, [2, 45]), e5(s, [2, 3]), e5(s, [2, 4]), e5(s, [2, 5]), e5(s, [2, 6]), e5(s, [2, 7]), e5(s, [2, 8]), e5(s, [2, 9]), { 20: 26, 49: 25, 63: 27, 64: n, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 20: 26, 49: 39, 63: 27, 64: n, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(S, t, { 6: 3, 4: 40 }), e5(y, t, { 6: 3, 4: 41 }), e5(E, [2, 46], { 17: 42 }), { 20: 26, 49: 43, 63: 27, 64: n, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(C, t, { 6: 3, 4: 44 }), e5([5, 14, 15, 18, 19, 29, 34, 39, 44, 47, 48, 52, 56, 60], [2, 10]), { 20: 45, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 20: 46, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 20: 47, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 20: 26, 49: 48, 63: 27, 64: n, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(x, [2, 76], { 50: 49 }), e5(w, [2, 27]), e5(w, [2, 28]), e5(w, [2, 33]), e5(w, [2, 34]), e5(w, [2, 35]), e5(w, [2, 36]), e5(w, [2, 37]), e5(w, [2, 38]), e5(w, [2, 39]), { 20: 26, 49: 50, 63: 27, 64: n, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(w, [2, 41], { 86: U }), { 71: i, 85: 52 }, e5(q, $), e5(Nt, [2, 80], { 53: 53 }), { 25: 54, 38: 56, 39: Ct, 43: 57, 44: X, 45: 55, 47: [2, 52] }, { 28: 60, 43: 61, 44: X, 47: [2, 54] }, { 13: 63, 15: r, 18: [1, 62] }, e5(x, [2, 84], { 57: 64 }), { 26: 65, 47: rt }, e5(V, [2, 56], { 30: 67 }), e5(V, [2, 62], { 35: 68 }), e5(xt, [2, 48], { 21: 69 }), e5(x, [2, 88], { 61: 70 }), { 20: 26, 33: [2, 78], 49: 72, 51: 71, 63: 27, 64: n, 68: 73, 69: 74, 70: 75, 71: F, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(st, [2, 92], { 65: 77 }), { 71: [1, 78] }, e5(w, [2, 40], { 86: U }), { 20: 26, 49: 80, 54: 79, 55: [2, 82], 63: 27, 64: n, 68: 81, 69: 74, 70: 75, 71: F, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 26: 82, 47: rt }, { 47: [2, 53] }, e5(S, t, { 6: 3, 4: 83 }), { 47: [2, 20] }, { 20: 84, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(C, t, { 6: 3, 4: 85 }), { 26: 86, 47: rt }, { 47: [2, 55] }, e5(s, [2, 11]), e5(E, [2, 47]), { 20: 26, 33: [2, 86], 49: 88, 58: 87, 63: 27, 64: n, 68: 89, 69: 74, 70: 75, 71: F, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(s, [2, 25]), { 20: 90, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(A, [2, 58], { 20: 26, 63: 27, 77: 28, 78: 29, 85: 36, 69: 74, 70: 75, 31: 91, 49: 92, 68: 93, 64: n, 71: F, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m }), e5(A, [2, 64], { 20: 26, 63: 27, 77: 28, 78: 29, 85: 36, 69: 74, 70: 75, 36: 94, 49: 95, 68: 96, 64: n, 71: F, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m }), { 20: 26, 22: 97, 23: [2, 50], 49: 98, 63: 27, 64: n, 68: 99, 69: 74, 70: 75, 71: F, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 20: 26, 33: [2, 90], 49: 101, 62: 100, 63: 27, 64: n, 68: 102, 69: 74, 70: 75, 71: F, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 33: [1, 103] }, e5(x, [2, 77]), { 33: [2, 79] }, e5([23, 33, 55, 67, 74], [2, 30], { 70: 104, 71: [1, 105] }), e5(nt, [2, 96]), e5(q, $, { 72: ue }), { 20: 26, 49: 108, 63: 27, 64: n, 66: 107, 67: [2, 94], 68: 109, 69: 74, 70: 75, 71: F, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, e5(q, [2, 42]), { 55: [1, 110] }, e5(Nt, [2, 81]), { 55: [2, 83] }, e5(s, [2, 13]), { 38: 56, 39: Ct, 43: 57, 44: X, 45: 112, 46: 111, 47: [2, 74] }, e5(V, [2, 68], { 40: 113 }), { 47: [2, 18] }, e5(s, [2, 14]), { 33: [1, 114] }, e5(x, [2, 85]), { 33: [2, 87] }, { 33: [1, 115] }, { 32: 116, 33: [2, 60], 73: 117, 74: De }, e5(V, [2, 57]), e5(A, [2, 59]), { 33: [2, 66], 37: 119, 73: 120, 74: De }, e5(V, [2, 63]), e5(A, [2, 65]), { 23: [1, 121] }, e5(xt, [2, 49]), { 23: [2, 51] }, { 33: [1, 122] }, e5(x, [2, 89]), { 33: [2, 91] }, e5(s, [2, 22]), e5(nt, [2, 97]), { 72: ue }, { 20: 26, 49: 123, 63: 27, 64: n, 71: i, 77: 28, 78: 29, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m, 85: 36 }, { 67: [1, 124] }, e5(st, [2, 93]), { 67: [2, 95] }, e5(s, [2, 23]), { 47: [2, 19] }, { 47: [2, 75] }, e5(A, [2, 70], { 20: 26, 63: 27, 77: 28, 78: 29, 85: 36, 69: 74, 70: 75, 41: 125, 49: 126, 68: 127, 64: n, 71: F, 79: a, 80: o, 81: c, 82: h, 83: p, 84: m }), e5(s, [2, 24]), e5(s, [2, 21]), { 33: [1, 128] }, { 33: [2, 61] }, { 71: [1, 130], 75: 129 }, { 33: [1, 131] }, { 33: [2, 67] }, e5(E, [2, 12]), e5(C, [2, 26]), e5(nt, [2, 31]), e5(w, [2, 29]), { 33: [2, 72], 42: 132, 73: 133, 74: De }, e5(V, [2, 69]), e5(A, [2, 71]), e5(S, [2, 15]), { 71: [1, 135], 76: [1, 134] }, e5(Ar, [2, 98]), e5(y, [2, 16]), { 33: [1, 136] }, { 33: [2, 73] }, { 33: [2, 32] }, e5(Ar, [2, 99]), e5(S, [2, 17])], defaultActions: { 4: [2, 1], 55: [2, 53], 57: [2, 20], 61: [2, 55], 73: [2, 79], 81: [2, 83], 85: [2, 18], 89: [2, 87], 99: [2, 51], 102: [2, 91], 109: [2, 95], 111: [2, 19], 112: [2, 75], 117: [2, 61], 120: [2, 67], 133: [2, 73], 134: [2, 32] }, parseError: function(d, k) {
if (k.recoverable) this.trace(d);
else {
var g = new Error(d);
throw g.hash = k, g;
}
}, parse: function(d) {
var k = this, g = [0], b = [], N = [null], l = [], Pt = this.table, u = "", at = 0, Yt = 0, Lr = 0, zs = 2, Dr = 1, Ys = l.slice.call(arguments, 1), P = Object.create(this.lexer), dt = { yy: {} };
for (var Be in this.yy) Object.prototype.hasOwnProperty.call(this.yy, Be) && (dt.yy[Be] = this.yy[Be]);
P.setInput(d, dt.yy), dt.yy.lexer = P, dt.yy.parser = this, typeof P.yylloc > "u" && (P.yylloc = {});
var Ie = P.yylloc;
l.push(Ie);
var Gs = P.options && P.options.ranges;
typeof dt.yy.parseError == "function" ? this.parseError = dt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function Ti(W) {
g.length = g.length - 2 * W, N.length = N.length - W, l.length = l.length - W;
}
for (var Ks = function() {
var W;
return W = P.lex() || Dr, typeof W != "number" && (W = k.symbols_[W] || W), W;
}, O, Re, gt, M, Ni, qe, At = {}, he, Z, _r, pe; ; ) {
if (gt = g[g.length - 1], this.defaultActions[gt] ? M = this.defaultActions[gt] : ((O === null || typeof O > "u") && (O = Ks()), M = Pt[gt] && Pt[gt][O]), typeof M > "u" || !M.length || !M[0]) {
var Ve = "";
pe = [];
for (he in Pt[gt]) this.terminals_[he] && he > zs && pe.push("'" + this.terminals_[he] + "'");
P.showPosition ? Ve = "Parse error on line " + (at + 1) + `:
` + P.showPosition() + `
Expecting ` + pe.join(", ") + ", got '" + (this.terminals_[O] || O) + "'" : Ve = "Parse error on line " + (at + 1) + ": Unexpected " + (O == Dr ? "end of input" : "'" + (this.terminals_[O] || O) + "'"), this.parseError(Ve, { text: P.match, token: this.terminals_[O] || O, line: P.yylineno, loc: Ie, expected: pe });
}
if (M[0] instanceof Array && M.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + gt + ", token: " + O);
switch (M[0]) {
case 1:
g.push(O), N.push(P.yytext), l.push(P.yylloc), g.push(M[1]), O = null, Re ? (O = Re, Re = null) : (Yt = P.yyleng, u = P.yytext, at = P.yylineno, Ie = P.yylloc, Lr > 0 && Lr--);
break;
case 2:
if (Z = this.productions_[M[1]][1], At.$ = N[N.length - Z], At._$ = { first_line: l[l.length - (Z || 1)].first_line, last_line: l[l.length - 1].last_line, first_column: l[l.length - (Z || 1)].first_column, last_column: l[l.length - 1].last_column }, Gs && (At._$.range = [l[l.length - (Z || 1)].range[0], l[l.length - 1].range[1]]), qe = this.performAction.apply(At, [u, Yt, at, dt.yy, M[1], N, l].concat(Ys)), typeof qe < "u") return qe;
Z && (g = g.slice(0, -1 * Z * 2), N = N.slice(0, -1 * Z), l = l.slice(0, -1 * Z)), g.push(this.productions_[M[1]][0]), N.push(At.$), l.push(At._$), _r = Pt[g[g.length - 2]][g[g.length - 1]], g.push(_r);
break;
case 3:
return true;
}
}
return true;
} }, Ms = /* @__PURE__ */ function() {
var it = { EOF: 1, parseError: function(k, g) {
if (this.yy.parser) this.yy.parser.parseError(k, g);
else throw new Error(k);
}, setInput: function(d, k) {
return this.yy = k || this.yy || {}, this._input = d, this._more = this._backtrack = this.done = false, 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 d = this._input[0];
this.yytext += d, this.yyleng++, this.offset++, this.match += d, this.matched += d;
var k = d.match(/(?:\r\n?|\n).*/g);
return k ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), d;
}, unput: function(d) {
var k = d.length, g = d.split(/(?:\r\n?|\n)/g);
this._input = d + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - k), this.offset -= k;
var b = 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), g.length - 1 && (this.yylineno -= g.length - 1);
var N = 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: g ? (g.length === b.length ? this.yylloc.first_column : 0) + b[b.length - g.length].length - g[0].length : this.yylloc.first_column - k }, this.options.ranges && (this.yylloc.range = [N[0], N[0] + this.yyleng - k]), this.yyleng = this.yytext.length, this;
}, more: function() {
return this._more = true, this;
}, reject: function() {
if (this.options.backtrack_lexer) this._backtrack = true;
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(d) {
this.unput(this.match.slice(d));
}, pastInput: function() {
var d = this.matched.substr(0, this.matched.length - this.match.length);
return (d.length > 20 ? "..." : "") + d.substr(-20).replace(/\n/g, "");
}, upcomingInput: function() {
var d = this.match;
return d.length < 20 && (d += this._input.substr(0, 20 - d.length)), (d.substr(0, 20) + (d.length > 20 ? "..." : "")).replace(/\n/g, "");
}, showPosition: function() {
var d = this.pastInput(), k = new Array(d.length + 1).join("-");
return d + this.upcomingInput() + `
` + k + "^";
}, test_match: function(d, k) {
var g, b, N;
if (this.options.backtrack_lexer && (N = { 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 && (N.yylloc.range = this.yylloc.range.slice(0))), b = d[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + d[0].length }, this.yytext += d[0], this.match += d[0], this.matches = d, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = false, this._backtrack = false, this._input = this._input.slice(d[0].length), this.matched += d[0], g = this.performAction.call(this, this.yy, this, k, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = false), g) return g;
if (this._backtrack) {
for (var l in N) this[l] = N[l];
return false;
}
return false;
}, next: function() {
if (this.done) return this.EOF;
this._input || (this.done = true);
var d, k, g, b;
this._more || (this.yytext = "", this.match = "");
for (var N = this._currentRules(), l = 0; l < N.length; l++) if (g = this._input.match(this.rules[N[l]]), g && (!k || g[0].length > k[0].length)) {
if (k = g, b = l, this.options.backtrack_lexer) {
if (d = this.test_match(g, N[l]), d !== false) return d;
if (this._backtrack) {
k = false;
continue;
} else return false;
} else if (!this.options.flex) break;
}
return k ? (d = this.test_match(k, N[b]), d !== false ? d : false) : 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 k = this.next();
return k || this.lex();
}, begin: function(k) {
this.conditionStack.push(k);
}, popState: function() {
var k = this.conditionStack.length - 1;
return k > 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(k) {
return k = this.conditionStack.length - 1 - Math.abs(k || 0), k >= 0 ? this.conditionStack[k] : "INITIAL";
}, pushState: function(k) {
this.begin(k);
}, stateStackSize: function() {
return this.conditionStack.length;
}, options: {}, performAction: function(k, g, b, N) {
function l(u, at) {
return g.yytext = g.yytext.substring(u, g.yyleng - at + u);
}
var Pt = N;
switch (b) {
case 0:
if (g.yytext.slice(-2) === "\\\\" ? (l(0, 1), this.begin("mu")) : g.yytext.slice(-1) === "\\" ? (l(0, 1), this.begin("emu")) : this.begin("mu"), g.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 64;
case 8:
return 67;
case 9:
return 19;
case 10:
return this.popState(), this.begin("raw"), 23;
break;
case 11:
return 56;
case 12:
return 60;
case 13:
return 29;
case 14:
return 47;
case 15:
return this.popState(), 44;
break;
case 16:
return this.popState(), 44;
break;
case 17:
return 34;
case 18:
return 39;
case 19:
return 52;
case 20:
return 48;
case 21:
this.unput(g.yytext), this.popState(), this.begin("com");
break;
case 22:
return this.popState(), 14;
break;
case 23:
return 48;
case 24:
return 72;
case 25:
return 71;
case 26:
return 71;
case 27:
return 86;
case 28:
break;
case 29:
return this.popState(), 55;
break;
case 30:
return this.popState(), 33;
break;
case 31:
return g.yytext = l(1, 2).replace(/\\"/g, '"'), 79;
break;
case 32:
return g.yytext = l(1, 2).replace(/\\'/g, "'"), 79;
break;
case 33:
return 84;
case 34:
return 81;
case 35:
return 81;
case 36:
return 82;
case 37:
return 83;
case 38:
return 80;
case 39:
return 74;
case 40:
return 76;
case 41:
return 71;
case 42:
return g.yytext = g.yytext.replace(/\\([\\\]])/g, "$1"), 71;
break;
case 43:
return "INVALID";
case 44:
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], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [6], inclusive: false }, raw: { rules: [3, 4, 5], inclusive: false }, INITIAL: { rules: [0, 1, 44], inclusive: true } } };
return it;
}();
_e.lexer = Ms;
function Oe() {
this.yy = {};
}
return Oe.prototype = _e, _e.Parser = Oe, new Oe();
}();
var Se = Fn;
var er = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"];
function rr(e5, 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.end.column, e5 += " - " + s + ":" + i);
for (var o = Error.prototype.constructor.call(this, e5), c = 0; c < er.length; c++) this[er[c]] = o[er[c]];
Error.captureStackTrace && Error.captureStackTrace(this, rr);
try {
r && (this.lineNumber = s, this.endLineNumber = n, Object.defineProperty ? (Object.defineProperty(this, "column", { value: i, enumerable: true }), Object.defineProperty(this, "endColumn", { value: a, enumerable: true })) : (this.column = i, this.endColumn = a));
} catch {
}
}
rr.prototype = new Error();
var ot = rr;
function ve() {
this.parents = [];
}
ve.prototype = { constructor: ve, mutating: false, acceptKey: function(e5, t) {
var r = this.accept(e5[t]);
if (this.mutating) {
if (r && !ve.prototype[r.type]) throw new ot('Unexpected node type "' + r.type + '" found when accepting ' + t + " on " + e5.type);
e5[t] = r;
}
}, acceptRequired: function(e5, t) {
if (this.acceptKey(e5, t), !e5[t]) throw new ot(e5.type + " requires " + t);
}, acceptArray: function(e5) {
for (var t = 0, r = e5.length; t < r; t++) this.acceptKey(e5, t), e5[t] || (e5.splice(t, 1), t--, r--);
}, accept: function(e5) {
if (e5) {
if (!this[e5.type]) throw new ot("Unknown type: