@shopify/create-app
Version:
A CLI tool to create a new Shopify app.
3,118 lines • 149 kB
JavaScript
import {
__esm,
init_cjs_shims
} from "./chunk-3XNI6LP4.js";
// ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/angular.mjs
function Fr(t29) {
return typeof t29 == "string" ? (e) => e === t29 : (e) => t29.test(e);
}
function Sn(t29, e, n) {
let s = Fr(e);
for (let r = n; r < t29.length; r++) {
let i = t29[r];
if (s(i)) return r;
}
throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t29)}`);
}
function En(t29) {
return t29.slice(0, 1).toLowerCase() + t29.slice(1);
}
function Re(t29) {
let { start: e, end: n } = t29;
return { start: e, end: n, range: [e, n] };
}
function xn(t29) {
return !!t29.extra?.parenthesized;
}
function ve(t29) {
return t29.type === "TSNonNullExpression" && !xn(t29) ? ve(t29.expression) : (t29.type === "OptionalCallExpression" || t29.type === "OptionalMemberExpression") && !xn(t29);
}
function Vr(t29, e) {
return t29 == null || e == null ? t29 == e : t29.isEquivalent(e);
}
function Ur(t29, e, n) {
let s = t29.length;
if (s !== e.length) return !1;
for (let r = 0; r < s; r++) if (!n(t29[r], e[r])) return !1;
return !0;
}
function oe(t29, e) {
return Ur(t29, e, (n, s) => n.isEquivalent(s));
}
function li(t29) {
return t29 >= vs && t29 <= ws || t29 == ks;
}
function G(t29) {
return Qr <= t29 && t29 <= Kr;
}
function jt(t29) {
return t29 >= Cs && t29 <= _s || t29 >= en && t29 <= tn;
}
function Wn(t29) {
return t29 === Ss || t29 === xs || t29 === qt;
}
function wi(t29) {
return { kind: l.Statement, statement: t29, ...xi };
}
function Ei(t29, e) {
Qe(t29, (n, s) => (e(n, s), n), W.None);
}
function pt(t29, e, n) {
for (let s = 0; s < t29.expressions.length; s++) t29.expressions[s] = (t29.expressions[s], void 0);
}
function Qe(t29, e, n) {
switch (t29.kind) {
case l.StyleProp:
case l.StyleMap:
case l.ClassProp:
case l.ClassMap:
case l.AnimationString:
case l.AnimationBinding:
case l.Binding:
t29.expression instanceof pe ? pt(t29.expression, e, n) : t29.expression = (t29.expression, void 0);
break;
case l.Property:
case l.DomProperty:
case l.Attribute:
t29.expression instanceof pe ? pt(t29.expression, e, n) : t29.expression = (t29.expression, void 0), t29.sanitizer = t29.sanitizer && (t29.sanitizer, void 0);
break;
case l.TwoWayProperty:
t29.expression = (t29.expression, void 0), t29.sanitizer = t29.sanitizer && (t29.sanitizer, void 0);
break;
case l.I18nExpression:
t29.expression = (t29.expression, void 0);
break;
case l.InterpolateText:
pt(t29.interpolation, e, n);
break;
case l.Statement:
Xt(t29.statement, e, n);
break;
case l.Variable:
t29.initializer = (t29.initializer, void 0);
break;
case l.Conditional:
for (let s of t29.conditions) s.expr !== null && (s.expr = (s.expr, void 0));
t29.processed !== null && (t29.processed = (t29.processed, void 0)), t29.contextValue !== null && (t29.contextValue = (t29.contextValue, void 0));
break;
case l.Animation:
case l.AnimationListener:
case l.Listener:
case l.TwoWayListener:
for (let s of t29.handlerOps) Qe(s, e, n | W.InChildOperation);
break;
case l.ExtractedAttribute:
t29.expression = t29.expression && (t29.expression, void 0), t29.trustedValueFn = t29.trustedValueFn && (t29.trustedValueFn, void 0);
break;
case l.RepeaterCreate:
if (t29.trackByOps === null) t29.track = (t29.track, void 0);
else for (let s of t29.trackByOps) Qe(s, e, n | W.InChildOperation);
t29.trackByFn !== null && (t29.trackByFn = (t29.trackByFn, void 0));
break;
case l.Repeater:
t29.collection = (t29.collection, void 0);
break;
case l.Defer:
t29.loadingConfig !== null && (t29.loadingConfig = (t29.loadingConfig, void 0)), t29.placeholderConfig !== null && (t29.placeholderConfig = (t29.placeholderConfig, void 0)), t29.resolverFn !== null && (t29.resolverFn = (t29.resolverFn, void 0));
break;
case l.I18nMessage:
for (let [s, r] of t29.params) t29.params.set(s, void 0);
for (let [s, r] of t29.postprocessingParams) t29.postprocessingParams.set(s, void 0);
break;
case l.DeferWhen:
t29.expr = (t29.expr, void 0);
break;
case l.StoreLet:
t29.value = (t29.value, void 0);
break;
case l.Advance:
case l.Container:
case l.ContainerEnd:
case l.ContainerStart:
case l.DeferOn:
case l.DisableBindings:
case l.Element:
case l.ElementEnd:
case l.ElementStart:
case l.EnableBindings:
case l.I18n:
case l.I18nApply:
case l.I18nContext:
case l.I18nEnd:
case l.I18nStart:
case l.IcuEnd:
case l.IcuStart:
case l.Namespace:
case l.Pipe:
case l.Projection:
case l.ProjectionDef:
case l.Template:
case l.Text:
case l.I18nAttributes:
case l.IcuPlaceholder:
case l.DeclareLet:
case l.SourceLocation:
case l.ConditionalCreate:
case l.ConditionalBranchCreate:
case l.Control:
case l.ControlCreate:
break;
default:
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${l[t29.kind]}`);
}
}
function Xt(t29, e, n) {
if (t29 instanceof De) t29.expr = (t29.expr, void 0);
else if (t29 instanceof Be) t29.value = (t29.value, void 0);
else if (t29 instanceof kt) t29.value !== void 0 && (t29.value = (t29.value, void 0));
else if (t29 instanceof Tt) {
t29.condition = (t29.condition, void 0);
for (let s of t29.trueCase) Xt(s, e, n);
for (let s of t29.falseCase) Xt(s, e, n);
} else throw new Error(`Unhandled statement kind: ${t29.constructor.name}`);
}
function xe(t29, e, n) {
return new b(t29, e, f.Character, n, String.fromCharCode(n));
}
function ki(t29, e, n) {
return new b(t29, e, f.Identifier, 0, n);
}
function Ti(t29, e, n) {
return new b(t29, e, f.PrivateIdentifier, 0, n);
}
function bi(t29, e, n) {
return new b(t29, e, f.Keyword, 0, n);
}
function B(t29, e, n) {
return new b(t29, e, f.Operator, 0, n);
}
function Ai(t29, e, n) {
return new b(t29, e, f.Number, n, "");
}
function Ii(t29, e, n) {
return new b(t29, e, f.Error, 0, n);
}
function Ni(t29, e, n) {
return new b(t29, e, f.RegExpBody, 0, n);
}
function Pi(t29, e, n) {
return new b(t29, e, f.RegExpFlags, 0, n);
}
function cs(t29) {
return Cs <= t29 && t29 <= _s || en <= t29 && t29 <= tn || t29 == Ze || t29 == Zt;
}
function us(t29) {
return jt(t29) || G(t29) || t29 == Ze || t29 == Zt;
}
function Li(t29) {
return t29 == ti || t29 == Zr;
}
function Mi(t29) {
return t29 == ys || t29 == Es;
}
function Ri(t29) {
switch (t29) {
case si:
return $e;
case ni:
return jr;
case ri:
return zr;
case ii:
return vs;
case ai:
return qr;
default:
return t29;
}
}
function $i(t29) {
let e = parseInt(t29);
if (isNaN(e)) throw new Error("Invalid integer literal when parsing " + t29);
return e;
}
function V(t29) {
return t29.start.toString() || "(unknown)";
}
function re(t29, e, n, s) {
n.length > 0 && (n = ` ${n} `);
let r = V(s), i = `Parser Error: ${t29}${n}[${e}] in ${r}`;
return new Pe(s, i);
}
function Oi(t29) {
let e = /* @__PURE__ */ new Map(), n = 0, s = 0, r = 0;
for (; r < t29.length; ) {
let i = t29[r];
if (i.type === 9) {
let [a, p] = i.parts;
n += p.length, s += a.length;
} else {
let a = i.parts.reduce((p, h) => p + h.length, 0);
s += a, n += a;
}
e.set(s, n), r++;
}
return e;
}
function L(t29) {
return (e) => e.kind === t29;
}
function be(t29, e) {
return (n) => n.kind === t29 && e === n.expression instanceof pe;
}
function Bi(t29) {
return (t29.kind === l.Property || t29.kind === l.TwoWayProperty) && !(t29.expression instanceof pe);
}
function Ke(t29) {
return t29.slice(t29.length - 1);
}
function Ps(t29) {
let e = new Xe(t29, Fi), n = new Ge(e, 0, 0, 0), s = n.moveBy(t29.length);
return { text: t29, file: e, start: n, end: s, sourceSpan: new Je(n, s) };
}
function Ls() {
return Vi ?? (Vi = new he(new Le()));
}
function Hi(t29) {
let e = Ui(t29);
return e === null ? [] : [{ type: "CommentLine", value: t29.slice(e + 2), ...Re({ start: e, end: t29.length }) }];
}
function Ms(t29) {
let { result: e } = t29;
if (e.errors.length !== 0) {
let [n] = e.errors;
if (!(n instanceof Pe)) throw n;
let { message: s } = n;
{
let a = s.match(/ in .*?@\d+:\d+$/);
a && (s = s.slice(0, a.index));
}
let r = t29.start;
{
let a = s.match(/at column (?<index>\d+)/);
a && (s = s.slice(0, a.index), r = r.moveBy(Number(a.groups.index)));
}
let i = new SyntaxError(s.trim(), { cause: n });
throw Object.assign(i, { location: r, span: n.span }), i.cause ?? (i.cause = n), i;
}
return t29;
}
function Ki(t29) {
return this[t29 < 0 ? this.length + t29 : t29];
}
function kr(t29) {
return t29 instanceof Ne;
}
function Tr(t29) {
return t29 instanceof ue;
}
function Lr(t29, e) {
return new eo(t29, e).expressions;
}
function hn(t29) {
let e = t29.range?.[0] ?? t29.start, n = (t29.declaration?.decorators ?? t29.decorators)?.[0];
return n ? Math.min(hn(n), e) : e;
}
function Mr(t29) {
return t29.range?.[1] ?? t29.end;
}
function at(t29) {
return { astFormat: "estree", parse(e) {
let n = t29(e), { comments: s } = n;
return delete n.comments, t29 === ot && n.type !== "NGChainedExpression" && (n = { ...n, type: "NGChainedExpression", expressions: [n] }), { type: "NGRoot", node: n, comments: s };
}, locStart: hn, locEnd: Mr };
}
var Or, Dr, Br, gn, vn, lt, j, Me, ct, v, wn, Rr, fn, co, yn, Cn, _n, P, kn, Tn, bn, An, In, Nn, Pn, Ln, u, S, ht, ft, dt, mt, gt, Oe, vt, wt, w, xt, St, Et, yt, Ct, _t, ae, le, kt, De, Be, Tt, Mn, o, c, bt, uo, Rn, K, g, Ae, A, ce, At, It, Nt, ye, Pt, Fe, Lt, Ce, Mt, I, Rt, $t, Ot, Hr, E, _e, Ve, Ue, He, Dt, Bt, Ft, We, qe, je, Ie, Vt, Ut, Ht, O, U, ue, Ne, Wt, $n, On, M, Dn, Wr, we, vs, $e, qr, jr, zr, ws, Gr, xs, Xr, Zt, Jr, Bn, Ss, X, N, Fn, Es, F, ys, z, ze, J, Ee, Yr, y, Vn, Un, Qr, Kr, en, Zr, tn, ie, ut, Q, ei, Ze, Cs, ti, ni, si, ri, ii, oi, ai, _s, ke, Hn, ne, ks, qt, Ge, Xe, Je, Ye, Pe, qn, jn, zn, ci, Ts, ui, zt, pi, hi, nn, fo, mo, fi, go, di, vo, bs, wo, xo, mi, gi, vi, So, Eo, yo, l, Z, Gn, Xn, R, Jn, Yn, Qn, Kn, $, Zn, es, Gt, xi, Si, As, fe, et, Co, _o, ko, pe, ee, ts, ns, ss, rs, is, W, To, os, as, bo, Ao, Io, No, Po, yi, Ci, ls, Is, Lo, Mo, f, H, _i, Le, b, Te, Se, Jt, Yt, Qt, he, se, ps, Y, Kt, Di, Ro, $o, Oo, Do, Bo, Fo, Vo, Uo, Ho, Wo, qo, hs, jo, zo, fs, ds, Ns, Xo, Jo, ms, gs, Yo, Fi, Vi, Ui, tt, Rs, $s, Os, Ds, Bs, nt, Fs, Vs, Us, Wi, Hs, Ws, qi, qs, ji, zi, js, zs, Gs, Xs, Js, Ys, Qs, Ks, Zs, Gi, Xi, Ji, Yi, st, er, tr, nr, sr, rr, ir, or, ar, lr, cr, ur, pr, hr, sn, fr, dr, mr, gr, Qi, vr, wr, xr, rt, Sr, Er, yr, Cr, Zi, _r, de, te, m, br, _, on, an, ln, Ar, Ir, Nr, Pr, me, eo, it, ot, cn, to, un, pn, no, so, ro, io, init_angular = __esm({
"../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/angular.mjs"() {
init_cjs_shims();
Or = Object.defineProperty, Dr = Object.getPrototypeOf, Br = Reflect.get, gn = (t29) => {
throw TypeError(t29);
}, vn = (t29, e) => {
for (var n in e) Or(t29, n, { get: e[n], enumerable: !0 });
}, lt = (t29, e, n) => e.has(t29) || gn("Cannot " + n), j = (t29, e, n) => (lt(t29, e, "read from private field"), n ? n.call(t29) : e.get(t29)), Me = (t29, e, n) => e.has(t29) ? gn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t29) : e.set(t29, n), ct = (t29, e, n, s) => (lt(t29, e, "write to private field"), s ? s.call(t29, n) : e.set(t29, n), n), v = (t29, e, n) => (lt(t29, e, "access private method"), n), wn = (t29, e, n) => Br(Dr(t29), n, e), Rr = {};
vn(Rr, { parsers: () => fn });
fn = {};
vn(fn, { __ng_action: () => no, __ng_binding: () => so, __ng_directive: () => io, __ng_interpolation: () => ro });
co = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
(function(t29) {
t29[t29.Emulated = 0] = "Emulated", t29[t29.None = 2] = "None", t29[t29.ShadowDom = 3] = "ShadowDom", t29[t29.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom";
})(yn || (yn = {}));
(function(t29) {
t29[t29.OnPush = 0] = "OnPush", t29[t29.Default = 1] = "Default", t29[t29.Eager = 1] = "Eager";
})(Cn || (Cn = {}));
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.SignalBased = 1] = "SignalBased", t29[t29.HasDecoratorInputTransform = 2] = "HasDecoratorInputTransform";
})(_n || (_n = {}));
(function(t29) {
t29[t29.NONE = 0] = "NONE", t29[t29.HTML = 1] = "HTML", t29[t29.STYLE = 2] = "STYLE", t29[t29.SCRIPT = 3] = "SCRIPT", t29[t29.URL = 4] = "URL", t29[t29.RESOURCE_URL = 5] = "RESOURCE_URL", t29[t29.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING";
})(P || (P = {}));
(function(t29) {
t29[t29.Error = 0] = "Error", t29[t29.Warning = 1] = "Warning", t29[t29.Ignore = 2] = "Ignore";
})(kn || (kn = {}));
(function(t29) {
t29[t29.Directive = 0] = "Directive", t29[t29.Component = 1] = "Component", t29[t29.Injectable = 2] = "Injectable", t29[t29.Pipe = 3] = "Pipe", t29[t29.NgModule = 4] = "NgModule";
})(Tn || (Tn = {}));
(function(t29) {
t29[t29.Directive = 0] = "Directive", t29[t29.Pipe = 1] = "Pipe", t29[t29.NgModule = 2] = "NgModule";
})(bn || (bn = {}));
(function(t29) {
t29[t29.Emulated = 0] = "Emulated", t29[t29.None = 2] = "None", t29[t29.ShadowDom = 3] = "ShadowDom", t29[t29.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom";
})(An || (An = {}));
(function(t29) {
t29[t29.Little = 0] = "Little", t29[t29.Big = 1] = "Big";
})(In || (In = {}));
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.Const = 1] = "Const";
})(Nn || (Nn = {}));
(function(t29) {
t29[t29.Dynamic = 0] = "Dynamic", t29[t29.Bool = 1] = "Bool", t29[t29.String = 2] = "String", t29[t29.Int = 3] = "Int", t29[t29.Number = 4] = "Number", t29[t29.Function = 5] = "Function", t29[t29.Inferred = 6] = "Inferred", t29[t29.None = 7] = "None";
})(Pn || (Pn = {}));
(function(t29) {
t29[t29.Minus = 0] = "Minus", t29[t29.Plus = 1] = "Plus";
})(Ln || (Ln = {}));
(function(t29) {
t29[t29.Equals = 0] = "Equals", t29[t29.NotEquals = 1] = "NotEquals", t29[t29.Assign = 2] = "Assign", t29[t29.Identical = 3] = "Identical", t29[t29.NotIdentical = 4] = "NotIdentical", t29[t29.Minus = 5] = "Minus", t29[t29.Plus = 6] = "Plus", t29[t29.Divide = 7] = "Divide", t29[t29.Multiply = 8] = "Multiply", t29[t29.Modulo = 9] = "Modulo", t29[t29.And = 10] = "And", t29[t29.Or = 11] = "Or", t29[t29.BitwiseOr = 12] = "BitwiseOr", t29[t29.BitwiseAnd = 13] = "BitwiseAnd", t29[t29.Lower = 14] = "Lower", t29[t29.LowerEquals = 15] = "LowerEquals", t29[t29.Bigger = 16] = "Bigger", t29[t29.BiggerEquals = 17] = "BiggerEquals", t29[t29.NullishCoalesce = 18] = "NullishCoalesce", t29[t29.Exponentiation = 19] = "Exponentiation", t29[t29.In = 20] = "In", t29[t29.InstanceOf = 21] = "InstanceOf", t29[t29.AdditionAssignment = 22] = "AdditionAssignment", t29[t29.SubtractionAssignment = 23] = "SubtractionAssignment", t29[t29.MultiplicationAssignment = 24] = "MultiplicationAssignment", t29[t29.DivisionAssignment = 25] = "DivisionAssignment", t29[t29.RemainderAssignment = 26] = "RemainderAssignment", t29[t29.ExponentiationAssignment = 27] = "ExponentiationAssignment", t29[t29.AndAssignment = 28] = "AndAssignment", t29[t29.OrAssignment = 29] = "OrAssignment", t29[t29.NullishCoalesceAssignment = 30] = "NullishCoalesceAssignment";
})(u || (u = {}));
S = class {
type;
sourceSpan;
constructor(e, n) {
this.type = e || null, this.sourceSpan = n || null;
}
prop(e, n) {
return new xt(this, e, null, n);
}
key(e, n, s) {
return new St(this, e, n, s);
}
callFn(e, n, s) {
return new dt(this, e, null, n, s);
}
instantiate(e, n, s) {
return new mt(this, e, n, s);
}
conditional(e, n = null, s) {
return new wt(this, e, n, null, s);
}
equals(e, n) {
return new w(u.Equals, this, e, null, n);
}
notEquals(e, n) {
return new w(u.NotEquals, this, e, null, n);
}
identical(e, n) {
return new w(u.Identical, this, e, null, n);
}
notIdentical(e, n) {
return new w(u.NotIdentical, this, e, null, n);
}
minus(e, n) {
return new w(u.Minus, this, e, null, n);
}
plus(e, n) {
return new w(u.Plus, this, e, null, n);
}
divide(e, n) {
return new w(u.Divide, this, e, null, n);
}
multiply(e, n) {
return new w(u.Multiply, this, e, null, n);
}
modulo(e, n) {
return new w(u.Modulo, this, e, null, n);
}
power(e, n) {
return new w(u.Exponentiation, this, e, null, n);
}
and(e, n) {
return new w(u.And, this, e, null, n);
}
bitwiseOr(e, n) {
return new w(u.BitwiseOr, this, e, null, n);
}
bitwiseAnd(e, n) {
return new w(u.BitwiseAnd, this, e, null, n);
}
or(e, n) {
return new w(u.Or, this, e, null, n);
}
lower(e, n) {
return new w(u.Lower, this, e, null, n);
}
lowerEquals(e, n) {
return new w(u.LowerEquals, this, e, null, n);
}
bigger(e, n) {
return new w(u.Bigger, this, e, null, n);
}
biggerEquals(e, n) {
return new w(u.BiggerEquals, this, e, null, n);
}
isBlank(e) {
return this.equals(TYPED_NULL_EXPR, e);
}
nullishCoalesce(e, n) {
return new w(u.NullishCoalesce, this, e, null, n);
}
toStmt() {
return new De(this, null);
}
}, ht = class t extends S {
name;
constructor(e, n, s) {
super(n, s), this.name = e;
}
isEquivalent(e) {
return e instanceof t && this.name === e.name;
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitReadVarExpr(this, n);
}
clone() {
return new t(this.name, this.type, this.sourceSpan);
}
set(e) {
return new w(u.Assign, this, e, null, this.sourceSpan);
}
}, ft = class t2 extends S {
expr;
constructor(e, n, s) {
super(n, s), this.expr = e;
}
visitExpression(e, n) {
return e.visitTypeofExpr(this, n);
}
isEquivalent(e) {
return e instanceof t2 && e.expr.isEquivalent(this.expr);
}
isConstant() {
return this.expr.isConstant();
}
clone() {
return new t2(this.expr.clone());
}
}, dt = class t3 extends S {
fn;
args;
pure;
constructor(e, n, s, r, i = !1) {
super(s, r), this.fn = e, this.args = n, this.pure = i;
}
get receiver() {
return this.fn;
}
isEquivalent(e) {
return e instanceof t3 && this.fn.isEquivalent(e.fn) && oe(this.args, e.args) && this.pure === e.pure;
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitInvokeFunctionExpr(this, n);
}
clone() {
return new t3(this.fn.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan, this.pure);
}
}, mt = class t4 extends S {
classExpr;
args;
constructor(e, n, s, r) {
super(s, r), this.classExpr = e, this.args = n;
}
isEquivalent(e) {
return e instanceof t4 && this.classExpr.isEquivalent(e.classExpr) && oe(this.args, e.args);
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitInstantiateExpr(this, n);
}
clone() {
return new t4(this.classExpr.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan);
}
}, gt = class t5 extends S {
body;
flags;
constructor(e, n, s) {
super(null, s), this.body = e, this.flags = n;
}
isEquivalent(e) {
return e instanceof t5 && this.body === e.body && this.flags === e.flags;
}
isConstant() {
return !0;
}
visitExpression(e, n) {
return e.visitRegularExpressionLiteral(this, n);
}
clone() {
return new t5(this.body, this.flags, this.sourceSpan);
}
}, Oe = class t6 extends S {
value;
constructor(e, n, s) {
super(n, s), this.value = e;
}
isEquivalent(e) {
return e instanceof t6 && this.value === e.value;
}
isConstant() {
return !0;
}
visitExpression(e, n) {
return e.visitLiteralExpr(this, n);
}
clone() {
return new t6(this.value, this.type, this.sourceSpan);
}
}, vt = class t7 extends S {
value;
typeParams;
constructor(e, n, s = null, r) {
super(n, r), this.value = e, this.typeParams = s;
}
isEquivalent(e) {
return e instanceof t7 && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName;
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitExternalExpr(this, n);
}
clone() {
return new t7(this.value, this.type, this.typeParams, this.sourceSpan);
}
}, wt = class t8 extends S {
condition;
falseCase;
trueCase;
constructor(e, n, s = null, r, i) {
super(r || n.type, i), this.condition = e, this.falseCase = s, this.trueCase = n;
}
isEquivalent(e) {
return e instanceof t8 && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && Vr(this.falseCase, e.falseCase);
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitConditionalExpr(this, n);
}
clone() {
return new t8(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan);
}
}, w = class t9 extends S {
operator;
rhs;
lhs;
constructor(e, n, s, r, i) {
super(r || n.type, i), this.operator = e, this.rhs = s, this.lhs = n;
}
isEquivalent(e) {
return e instanceof t9 && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitBinaryOperatorExpr(this, n);
}
clone() {
return new t9(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan);
}
isAssignment() {
let e = this.operator;
return e === u.Assign || e === u.AdditionAssignment || e === u.SubtractionAssignment || e === u.MultiplicationAssignment || e === u.DivisionAssignment || e === u.RemainderAssignment || e === u.ExponentiationAssignment || e === u.AndAssignment || e === u.OrAssignment || e === u.NullishCoalesceAssignment;
}
}, xt = class t10 extends S {
receiver;
name;
constructor(e, n, s, r) {
super(s, r), this.receiver = e, this.name = n;
}
get index() {
return this.name;
}
isEquivalent(e) {
return e instanceof t10 && this.receiver.isEquivalent(e.receiver) && this.name === e.name;
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitReadPropExpr(this, n);
}
set(e) {
return new w(u.Assign, this.receiver.prop(this.name), e, null, this.sourceSpan);
}
clone() {
return new t10(this.receiver.clone(), this.name, this.type, this.sourceSpan);
}
}, St = class t11 extends S {
receiver;
index;
constructor(e, n, s, r) {
super(s, r), this.receiver = e, this.index = n;
}
isEquivalent(e) {
return e instanceof t11 && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index);
}
isConstant() {
return !1;
}
visitExpression(e, n) {
return e.visitReadKeyExpr(this, n);
}
set(e) {
return new w(u.Assign, this.receiver.key(this.index), e, null, this.sourceSpan);
}
clone() {
return new t11(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
}
}, Et = class t12 extends S {
entries;
constructor(e, n, s) {
super(n, s), this.entries = e;
}
isConstant() {
return this.entries.every((e) => e.isConstant());
}
isEquivalent(e) {
return e instanceof t12 && oe(this.entries, e.entries);
}
visitExpression(e, n) {
return e.visitLiteralArrayExpr(this, n);
}
clone() {
return new t12(this.entries.map((e) => e.clone()), this.type, this.sourceSpan);
}
}, yt = class t13 {
expression;
constructor(e) {
this.expression = e;
}
isEquivalent(e) {
return e instanceof t13 && this.expression.isEquivalent(e.expression);
}
clone() {
return new t13(this.expression.clone());
}
isConstant() {
return this.expression.isConstant();
}
}, Ct = class t14 extends S {
entries;
valueType = null;
constructor(e, n, s) {
super(n, s), this.entries = e, n && (this.valueType = n.valueType);
}
isEquivalent(e) {
return e instanceof t14 && oe(this.entries, e.entries);
}
isConstant() {
return this.entries.every((e) => e.isConstant());
}
visitExpression(e, n) {
return e.visitLiteralMapExpr(this, n);
}
clone() {
let e = this.entries.map((n) => n.clone());
return new t14(e, this.type, this.sourceSpan);
}
}, _t = class t15 extends S {
expression;
constructor(e, n) {
super(null, n), this.expression = e;
}
isEquivalent(e) {
return e instanceof t15 && this.expression.isEquivalent(e.expression);
}
isConstant() {
return this.expression.isConstant();
}
visitExpression(e, n) {
return e.visitSpreadElementExpr(this, n);
}
clone() {
return new t15(this.expression.clone(), this.sourceSpan);
}
};
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.Final = 1] = "Final", t29[t29.Private = 2] = "Private", t29[t29.Exported = 4] = "Exported", t29[t29.Static = 8] = "Static";
})(ae || (ae = {}));
le = class {
modifiers;
sourceSpan;
leadingComments;
constructor(e = ae.None, n = null, s) {
this.modifiers = e, this.sourceSpan = n, this.leadingComments = s;
}
hasModifier(e) {
return (this.modifiers & e) !== 0;
}
addLeadingComment(e) {
this.leadingComments = this.leadingComments ?? [], this.leadingComments.push(e);
}
}, kt = class t16 extends le {
name;
value;
type;
constructor(e, n, s, r, i, a) {
super(r, i, a), this.name = e, this.value = n, this.type = s || n && n.type || null;
}
isEquivalent(e) {
return e instanceof t16 && this.name === e.name && (this.value ? !!e.value && this.value.isEquivalent(e.value) : !e.value);
}
visitStatement(e, n) {
return e.visitDeclareVarStmt(this, n);
}
}, De = class t17 extends le {
expr;
constructor(e, n, s) {
super(ae.None, n, s), this.expr = e;
}
isEquivalent(e) {
return e instanceof t17 && this.expr.isEquivalent(e.expr);
}
visitStatement(e, n) {
return e.visitExpressionStmt(this, n);
}
}, Be = class t18 extends le {
value;
constructor(e, n = null, s) {
super(ae.None, n, s), this.value = e;
}
isEquivalent(e) {
return e instanceof t18 && this.value.isEquivalent(e.value);
}
visitStatement(e, n) {
return e.visitReturnStmt(this, n);
}
}, Tt = class t19 extends le {
condition;
trueCase;
falseCase;
constructor(e, n, s = [], r, i) {
super(ae.None, r, i), this.condition = e, this.trueCase = n, this.falseCase = s;
}
isEquivalent(e) {
return e instanceof t19 && this.condition.isEquivalent(e.condition) && oe(this.trueCase, e.trueCase) && oe(this.falseCase, e.falseCase);
}
visitStatement(e, n) {
return e.visitIfStmt(this, n);
}
}, Mn = class t20 {
static INSTANCE = new t20();
keyOf(e) {
if (e instanceof Oe && typeof e.value == "string") return `"${e.value}"`;
if (e instanceof Oe) return String(e.value);
if (e instanceof gt) return `/${e.body}/${e.flags ?? ""}`;
if (e instanceof Et) {
let n = [];
for (let s of e.entries) n.push(this.keyOf(s));
return `[${n.join(",")}]`;
} else if (e instanceof Ct) {
let n = [];
for (let s of e.entries) if (s instanceof yt) n.push("..." + this.keyOf(s.expression));
else {
let r = s.key;
s.quoted && (r = `"${r}"`), n.push(r + ":" + this.keyOf(s.value));
}
return `{${n.join(",")}}`;
} else {
if (e instanceof vt) return `import("${e.value.moduleName}", ${e.value.name})`;
if (e instanceof ht) return `read(${e.name})`;
if (e instanceof ft) return `typeof(${this.keyOf(e.expr)})`;
if (e instanceof _t) return `...${this.keyOf(e.expression)}`;
throw new Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`);
}
}
}, o = "@angular/core", c = class {
static core = { name: null, moduleName: o };
static namespaceHTML = { name: "\u0275\u0275namespaceHTML", moduleName: o };
static namespaceMathML = { name: "\u0275\u0275namespaceMathML", moduleName: o };
static namespaceSVG = { name: "\u0275\u0275namespaceSVG", moduleName: o };
static element = { name: "\u0275\u0275element", moduleName: o };
static elementStart = { name: "\u0275\u0275elementStart", moduleName: o };
static elementEnd = { name: "\u0275\u0275elementEnd", moduleName: o };
static domElement = { name: "\u0275\u0275domElement", moduleName: o };
static domElementStart = { name: "\u0275\u0275domElementStart", moduleName: o };
static domElementEnd = { name: "\u0275\u0275domElementEnd", moduleName: o };
static domElementContainer = { name: "\u0275\u0275domElementContainer", moduleName: o };
static domElementContainerStart = { name: "\u0275\u0275domElementContainerStart", moduleName: o };
static domElementContainerEnd = { name: "\u0275\u0275domElementContainerEnd", moduleName: o };
static domTemplate = { name: "\u0275\u0275domTemplate", moduleName: o };
static domListener = { name: "\u0275\u0275domListener", moduleName: o };
static advance = { name: "\u0275\u0275advance", moduleName: o };
static syntheticHostProperty = { name: "\u0275\u0275syntheticHostProperty", moduleName: o };
static syntheticHostListener = { name: "\u0275\u0275syntheticHostListener", moduleName: o };
static attribute = { name: "\u0275\u0275attribute", moduleName: o };
static classProp = { name: "\u0275\u0275classProp", moduleName: o };
static elementContainerStart = { name: "\u0275\u0275elementContainerStart", moduleName: o };
static elementContainerEnd = { name: "\u0275\u0275elementContainerEnd", moduleName: o };
static elementContainer = { name: "\u0275\u0275elementContainer", moduleName: o };
static styleMap = { name: "\u0275\u0275styleMap", moduleName: o };
static classMap = { name: "\u0275\u0275classMap", moduleName: o };
static styleProp = { name: "\u0275\u0275styleProp", moduleName: o };
static interpolate = { name: "\u0275\u0275interpolate", moduleName: o };
static interpolate1 = { name: "\u0275\u0275interpolate1", moduleName: o };
static interpolate2 = { name: "\u0275\u0275interpolate2", moduleName: o };
static interpolate3 = { name: "\u0275\u0275interpolate3", moduleName: o };
static interpolate4 = { name: "\u0275\u0275interpolate4", moduleName: o };
static interpolate5 = { name: "\u0275\u0275interpolate5", moduleName: o };
static interpolate6 = { name: "\u0275\u0275interpolate6", moduleName: o };
static interpolate7 = { name: "\u0275\u0275interpolate7", moduleName: o };
static interpolate8 = { name: "\u0275\u0275interpolate8", moduleName: o };
static interpolateV = { name: "\u0275\u0275interpolateV", moduleName: o };
static nextContext = { name: "\u0275\u0275nextContext", moduleName: o };
static resetView = { name: "\u0275\u0275resetView", moduleName: o };
static templateCreate = { name: "\u0275\u0275template", moduleName: o };
static defer = { name: "\u0275\u0275defer", moduleName: o };
static deferWhen = { name: "\u0275\u0275deferWhen", moduleName: o };
static deferOnIdle = { name: "\u0275\u0275deferOnIdle", moduleName: o };
static deferOnImmediate = { name: "\u0275\u0275deferOnImmediate", moduleName: o };
static deferOnTimer = { name: "\u0275\u0275deferOnTimer", moduleName: o };
static deferOnHover = { name: "\u0275\u0275deferOnHover", moduleName: o };
static deferOnInteraction = { name: "\u0275\u0275deferOnInteraction", moduleName: o };
static deferOnViewport = { name: "\u0275\u0275deferOnViewport", moduleName: o };
static deferPrefetchWhen = { name: "\u0275\u0275deferPrefetchWhen", moduleName: o };
static deferPrefetchOnIdle = { name: "\u0275\u0275deferPrefetchOnIdle", moduleName: o };
static deferPrefetchOnImmediate = { name: "\u0275\u0275deferPrefetchOnImmediate", moduleName: o };
static deferPrefetchOnTimer = { name: "\u0275\u0275deferPrefetchOnTimer", moduleName: o };
static deferPrefetchOnHover = { name: "\u0275\u0275deferPrefetchOnHover", moduleName: o };
static deferPrefetchOnInteraction = { name: "\u0275\u0275deferPrefetchOnInteraction", moduleName: o };
static deferPrefetchOnViewport = { name: "\u0275\u0275deferPrefetchOnViewport", moduleName: o };
static deferHydrateWhen = { name: "\u0275\u0275deferHydrateWhen", moduleName: o };
static deferHydrateNever = { name: "\u0275\u0275deferHydrateNever", moduleName: o };
static deferHydrateOnIdle = { name: "\u0275\u0275deferHydrateOnIdle", moduleName: o };
static deferHydrateOnImmediate = { name: "\u0275\u0275deferHydrateOnImmediate", moduleName: o };
static deferHydrateOnTimer = { name: "\u0275\u0275deferHydrateOnTimer", moduleName: o };
static deferHydrateOnHover = { name: "\u0275\u0275deferHydrateOnHover", moduleName: o };
static deferHydrateOnInteraction = { name: "\u0275\u0275deferHydrateOnInteraction", moduleName: o };
static deferHydrateOnViewport = { name: "\u0275\u0275deferHydrateOnViewport", moduleName: o };
static deferEnableTimerScheduling = { name: "\u0275\u0275deferEnableTimerScheduling", moduleName: o };
static conditionalCreate = { name: "\u0275\u0275conditionalCreate", moduleName: o };
static conditionalBranchCreate = { name: "\u0275\u0275conditionalBranchCreate", moduleName: o };
static conditional = { name: "\u0275\u0275conditional", moduleName: o };
static repeater = { name: "\u0275\u0275repeater", moduleName: o };
static repeaterCreate = { name: "\u0275\u0275repeaterCreate", moduleName: o };
static repeaterTrackByIndex = { name: "\u0275\u0275repeaterTrackByIndex", moduleName: o };
static repeaterTrackByIdentity = { name: "\u0275\u0275repeaterTrackByIdentity", moduleName: o };
static componentInstance = { name: "\u0275\u0275componentInstance", moduleName: o };
static text = { name: "\u0275\u0275text", moduleName: o };
static enableBindings = { name: "\u0275\u0275enableBindings", moduleName: o };
static disableBindings = { name: "\u0275\u0275disableBindings", moduleName: o };
static getCurrentView = { name: "\u0275\u0275getCurrentView", moduleName: o };
static textInterpolate = { name: "\u0275\u0275textInterpolate", moduleName: o };
static textInterpolate1 = { name: "\u0275\u0275textInterpolate1", moduleName: o };
static textInterpolate2 = { name: "\u0275\u0275textInterpolate2", moduleName: o };
static textInterpolate3 = { name: "\u0275\u0275textInterpolate3", moduleName: o };
static textInterpolate4 = { name: "\u0275\u0275textInterpolate4", moduleName: o };
static textInterpolate5 = { name: "\u0275\u0275textInterpolate5", moduleName: o };
static textInterpolate6 = { name: "\u0275\u0275textInterpolate6", moduleName: o };
static textInterpolate7 = { name: "\u0275\u0275textInterpolate7", moduleName: o };
static textInterpolate8 = { name: "\u0275\u0275textInterpolate8", moduleName: o };
static textInterpolateV = { name: "\u0275\u0275textInterpolateV", moduleName: o };
static restoreView = { name: "\u0275\u0275restoreView", moduleName: o };
static pureFunction0 = { name: "\u0275\u0275pureFunction0", moduleName: o };
static pureFunction1 = { name: "\u0275\u0275pureFunction1", moduleName: o };
static pureFunction2 = { name: "\u0275\u0275pureFunction2", moduleName: o };
static pureFunction3 = { name: "\u0275\u0275pureFunction3", moduleName: o };
static pureFunction4 = { name: "\u0275\u0275pureFunction4", moduleName: o };
static pureFunction5 = { name: "\u0275\u0275pureFunction5", moduleName: o };
static pureFunction6 = { name: "\u0275\u0275pureFunction6", moduleName: o };
static pureFunction7 = { name: "\u0275\u0275pureFunction7", moduleName: o };
static pureFunction8 = { name: "\u0275\u0275pureFunction8", moduleName: o };
static pureFunctionV = { name: "\u0275\u0275pureFunctionV", moduleName: o };
static pipeBind1 = { name: "\u0275\u0275pipeBind1", moduleName: o };
static pipeBind2 = { name: "\u0275\u0275pipeBind2", moduleName: o };
static pipeBind3 = { name: "\u0275\u0275pipeBind3", moduleName: o };
static pipeBind4 = { name: "\u0275\u0275pipeBind4", moduleName: o };
static pipeBindV = { name: "\u0275\u0275pipeBindV", moduleName: o };
static domProperty = { name: "\u0275\u0275domProperty", moduleName: o };
static ariaProperty = { name: "\u0275\u0275ariaProperty", moduleName: o };
static property = { name: "\u0275\u0275property", moduleName: o };
static control = { name: "\u0275\u0275control", moduleName: o };
static controlCreate = { name: "\u0275\u0275controlCreate", moduleName: o };
static animationEnterListener = { name: "\u0275\u0275animateEnterListener", moduleName: o };
static animationLeaveListener = { name: "\u0275\u0275animateLeaveListener", moduleName: o };
static animationEnter = { name: "\u0275\u0275animateEnter", moduleName: o };
static animationLeave = { name: "\u0275\u0275animateLeave", moduleName: o };
static i18n = { name: "\u0275\u0275i18n", moduleName: o };
static i18nAttributes = { name: "\u0275\u0275i18nAttributes", moduleName: o };
static i18nExp = { name: "\u0275\u0275i18nExp", moduleName: o };
static i18nStart = { name: "\u0275\u0275i18nStart", moduleName: o };
static i18nEnd = { name: "\u0275\u0275i18nEnd", moduleName: o };
static i18nApply = { name: "\u0275\u0275i18nApply", moduleName: o };
static i18nPostprocess = { name: "\u0275\u0275i18nPostprocess", moduleName: o };
static pipe = { name: "\u0275\u0275pipe", moduleName: o };
static projection = { name: "\u0275\u0275projection", moduleName: o };
static projectionDef = { name: "\u0275\u0275projectionDef", moduleName: o };
static reference = { name: "\u0275\u0275reference", moduleName: o };
static inject = { name: "\u0275\u0275inject", moduleName: o };
static injectAttribute = { name: "\u0275\u0275injectAttribute", moduleName: o };
static directiveInject = { name: "\u0275\u0275directiveInject", moduleName: o };
static invalidFactory = { name: "\u0275\u0275invalidFactory", moduleName: o };
static invalidFactoryDep = { name: "\u0275\u0275invalidFactoryDep", moduleName: o };
static templateRefExtractor = { name: "\u0275\u0275templateRefExtractor", moduleName: o };
static forwardRef = { name: "forwardRef", moduleName: o };
static resolveForwardRef = { name: "resolveForwardRef", moduleName: o };
static replaceMetadata = { name: "\u0275\u0275replaceMetadata", moduleName: o };
static getReplaceMetadataURL = { name: "\u0275\u0275getReplaceMetadataURL", moduleName: o };
static \u0275\u0275defineInjectable = { name: "\u0275\u0275defineInjectable", moduleName: o };
static declareInjectable = { name: "\u0275\u0275ngDeclareInjectable", moduleName: o };
static InjectableDeclaration = { name: "\u0275\u0275InjectableDeclaration", moduleName: o };
static resolveWindow = { name: "\u0275\u0275resolveWindow", moduleName: o };
static resolveDocument = { name: "\u0275\u0275resolveDocument", moduleName: o };
static resolveBody = { name: "\u0275\u0275resolveBody", moduleName: o };
static getComponentDepsFactory = { name: "\u0275\u0275getComponentDepsFactory", moduleName: o };
static defineComponent = { name: "\u0275\u0275defineComponent", moduleName: o };
static declareComponent = { name: "\u0275\u0275ngDeclareComponent", moduleName: o };
static setComponentScope = { name: "\u0275\u0275setComponentScope", moduleName: o };
static ChangeDetectionStrategy = { name: "ChangeDetectionStrategy", moduleName: o };
static ViewEncapsulation = { name: "ViewEncapsulation", moduleName: o };
static ComponentDeclaration = { name: "\u0275\u0275ComponentDeclaration", moduleName: o };
static FactoryDeclaration = { name: "\u0275\u0275FactoryDeclaration", moduleName: o };
static declareFactory = { name: "\u0275\u0275ngDeclareFactory", moduleName: o };
static FactoryTarget = { name: "\u0275\u0275FactoryTarget", moduleName: o };
static defineDirective = { name: "\u0275\u0275defineDirective", moduleName: o };
static declareDirective = { name: "\u0275\u0275ngDeclareDirective", moduleName: o };
static DirectiveDeclaration = { name: "\u0275\u0275DirectiveDeclaration", moduleName: o };
static InjectorDef = { name: "\u0275\u0275InjectorDef", moduleName: o };
static InjectorDeclaration = { name: "\u0275\u0275InjectorDeclaration", moduleName: o };
static defineInjector = { name: "\u0275\u0275defineInjector", moduleName: o };
static declareInjector = { name: "\u0275\u0275ngDeclareInjector", moduleName: o };
static NgModuleDeclaration = { name: "\u0275\u0275NgModuleDeclaration", moduleName: o };
static ModuleWithProviders = { name: "ModuleWithProviders", moduleName: o };
static defineNgModule = { name: "\u0275\u0275defineNgModule", moduleName: o };
static declareNgModule = { name: "\u0275\u0275ngDeclareNgModule", moduleName: o };
static setNgModuleScope = { name: "\u0275\u0275setNgModuleScope", moduleName: o };
static registerNgModuleType = { name: "\u0275\u0275registerNgModuleType", moduleName: o };
static PipeDeclaration = { name: "\u0275\u0275PipeDeclaration", moduleName: o };
static definePipe = { name: "\u0275\u0275definePipe", moduleName: o };
static declarePipe = { name: "\u0275\u0275ngDeclarePipe", moduleName: o };
static declareClassMetadata = { name: "\u0275\u0275ngDeclareClassMetadata", moduleName: o };
static declareClassMetadataAsync = { name: "\u0275\u0275ngDeclareClassMetadataAsync", moduleName: o };
static setClassMetadata = { name: "\u0275setClassMetadata", moduleName: o };
static setClassMetadataAsync = { name: "\u0275setClassMetadataAsync", moduleName: o };
static setClassDebugInfo = { name: "\u0275setClassDebugInfo", moduleName: o };
static queryRefresh = { name: "\u0275\u0275queryRefresh", moduleName: o };
static viewQuery = { name: "\u0275\u0275viewQuery", moduleName: o };
static loadQuery = { name: "\u0275\u0275loadQuery", moduleName: o };
static contentQuery = { name: "\u0275\u0275contentQuery", moduleName: o };
static viewQuerySignal = { name: "\u0275\u0275viewQuerySignal", moduleName: o };
static contentQuerySignal = { name: "\u0275\u0275contentQuerySignal", moduleName: o };
static queryAdvance = { name: "\u0275\u0275queryAdvance", moduleName: o };
static twoWayProperty = { name: "\u0275\u0275twoWayProperty", moduleName: o };
static twoWayBindingSet = { name: "\u0275\u0275twoWayBindingSet", moduleName: o };
static twoWayListener = { name: "\u0275\u0275twoWayListener", moduleName: o };
static declareLet = { name: "\u0275\u0275declareLet", moduleName: o };
static storeLet = { name: "\u0275\u0275storeLet", moduleName: o };
static readContextLet = { name: "\u0275\u0275readContextLet", moduleName: o };
static arrowFunction = { name: "\u0275\u0275arrowFunction", moduleName: o };
static attachSourceLocations = { name: "\u0275\u0275attachSourceLocations", moduleName: o };
static NgOnChangesFeature = { name: "\u0275\u0275NgOnChangesFeature", moduleName: o };
static ControlFeature = { name: "\u0275\u0275ControlFeature", moduleName: o };
static InheritDefinitionFeature = { name: "\u0275\u0275InheritDefinitionFeature", moduleName: o };
static ProvidersFeature = { name: "\u0275\u0275ProvidersFeature", moduleName: o };
static HostDirectivesFeature = { name: "\u0275\u0275HostDirectivesFeature", moduleName: o };
static ExternalStylesFeature = { name: "\u0275\u0275ExternalStylesFeature", moduleName: o };
static listener = { name: "\u0275\u0275listener", moduleName: o };
static getInheritedFactory = { name: "\u0275\u0275getInheritedFactory", moduleName: o };
static sanitizeHtml = { name: "\u0275\u0275sanitizeHtml", moduleName: o };
static sanitizeStyle = { name: "\u0275\u0275sanitizeStyle", moduleName: o };
static validateAttribute = { name: "\u0275\u0275validateAttribute", moduleName: o };
static sanitizeResourceUrl = { name: "\u0275\u0275sanitizeResourceUrl", moduleName: o };
static sanitizeScript = { name: "\u0275\u0275sanitizeScript", moduleName: o };
static sanitizeUrl = { name: "\u0275\u0275sanitizeUrl", moduleName: o };
static sanitizeUrlOrResourceUrl = { name: "\u0275\u0275sanitizeUrlOrResourceUrl", moduleName: o };
static trustConstantHtml = { name: "\u0275\u0275trustConstantHtml", moduleName: o };
static trustConstantResourceUrl = { name: "\u0275\u0275trustConstantResourceUrl", moduleName: o };
static inputDecorator = { name: "Input", moduleName: o };
static outputDecorator = { name: "Output", moduleName: o };
static viewChildDecorator = { name: "ViewChild", moduleName: o };
static viewChildrenDecorator = { name: "ViewChildren", moduleName: o };
static contentChildDecorator = { name: "ContentChild", moduleName: o };
static contentChildrenDecorator = { name: "ContentChildren", moduleName: o };
static InputSignalBrandWriteType = { name: "\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE", moduleName: o };
static UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: o };
static unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: o };
static assertType = { name: "\u0275assertType", moduleName: o };
}, bt = class {
full;
major;
minor;
patch;
constructor(e) {
this.full = e;
let n = e.split(".");
this.major = n[0], this.minor = n[1], this.patch = n.slice(2).join(".");
}
}, uo = /* @__PURE__ */ new Map([[u.And, "&&"], [u.Bigger, ">"], [u.BiggerEquals, ">="], [u.BitwiseOr, "|"], [u.BitwiseAnd, "&"], [u.Divide, "/"], [u.Assign, "="], [u.Equals, "=="], [u.Identical, "==="], [u.Lower, "<"], [u.LowerEquals, "<="], [u.Minus, "-"], [u.Modulo, "%"], [u.Exponentiation, "**"], [u.Multiply, "*"], [u.NotEquals, "!="], [u.NotIdentical, "!=="], [u.NullishCoalesce, "??"], [u.Or, "||"], [u.Plus, "+"], [u.In, "in"], [u.InstanceOf, "instanceof"], [u.AdditionAssignment, "+="], [u.SubtractionAssignment, "-="], [u.MultiplicationAssignment, "*="], [u.DivisionAssignment, "/="], [u.RemainderAssignment, "%="], [u.ExponentiationAssignment, "**="], [u.AndAssignment, "&&="], [u.OrAssignment, "||="], [u.NullishCoalesceAssignment, "??="]]);
(function(t29) {
t29[t29.Class = 0] = "Class", t29[t29.Function = 1] = "Function";
})(Rn || (Rn = {}));
K = class {
start;
end;
constructor(e, n) {
this.start = e, this.end = n;
}
toAbsolute(e) {
return new O(e + this.start, e + this.end);
}
}, g = class {
span;
sourceSpan;
constructor(e, n) {
this.span = e, this.sourceSpan = n;
}
toString() {
return "AST";
}
}, Ae = class extends g {
nameSpan;
constructor(e, n, s) {
super(e, n), this.nameSpan = s;
}
}, A = class extends g {
visit(e, n = null) {
return e.visitEmptyExpr?.(this, n);
}
}, ce = class extends g {
visit(e, n = null) {
return e.visitImplicitReceiver(this, n);
}
}, At = class extends g {
visit(e, n = null) {
return e.visitThisReceiver?.(this, n);
}
}, It = class extends g {
expressions;
constructor(e, n, s) {
super(e, n), this.expressions = s;
}
visit(e, n = null) {
return e.visitChain(this, n);
}
}, Nt = class extends g {
condition;
trueExp;
falseExp;
constructor(e, n, s, r, i) {
super(e, n), this.condition = s, this.trueExp = r, this.falseExp = i;
}
visit(e, n = null) {
return e.visitConditional(this, n);
}
}, ye = class extends Ae {
receiver;
name;
constructor(e, n, s, r, i) {
super(e, n, s), this.receiver = r, this.name = i;
}
visit(e, n = null) {
return e.visitPropertyRead(this, n);
}
}, Pt = class extends Ae {
receiver;
name;
constructor(e, n, s, r, i) {
super(e, n, s), this.receiver = r, this.name = i;
}
visit(e, n = null) {
return e.visitSafePropertyRead(this, n);
}
}, Fe = class extends g {
receiver;
key;
constructor(e, n, s, r) {
super(e, n), this.receiver = s, this.key = r;
}
visit(e, n = null) {
return e.visitKeyedRead(this, n);
}
}, Lt = class extends g {
receiver;
key;
constructor(e, n, s, r) {
super(e, n), this.receiver = s, this.key = r;
}
visit(e, n = null) {
return e.visitSafeKeyedRead(this, n);
}
};
(function(t29) {
t29[t29.ReferencedByName = 0] = "ReferencedByName", t29[t29.ReferencedDirectly = 1] = "ReferencedDirectly";
})(Ce || (Ce = {}));
Mt = class extends Ae {
exp;
name;
args;
type;
constructor(e, n, s, r, i, a, p) {
super(e, n, p), this.exp = s, this.name = r, this.args = i, this.type = a;
}
visit(e, n = null) {
return e.visitPipe(this, n);
}
}, I = class extends g {
value;
constructor(e, n, s) {
super(e, n), this.value = s;
}
visit(e, n = null) {
return e.visitLiteralPrimitive(this, n);
}
}, Rt = class extends g {
expressions;
constructor(e, n, s) {
super(e, n), this.expressions = s;
}
visit(e, n = null) {
return e.visitLiteralArray(this, n);
}
}, $t = class extends g {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitSpreadElement(this, n);
}
}, Ot = class extends g {
keys;
values;
constructor(e, n, s, r) {
super(e, n), this.keys = s, this.values = r;
}
visit(e, n = null) {
return e.visitLiteralMap(this, n);
}
}, Hr = class extends g {
strings;
expressions;
constructor(e, n, s, r) {
super(e, n), this.strings = s, this.expressions = r;
}
visit(e, n = null) {
return e.visitInterpolation(this, n);
}
}, E = class extends g {
operation;
left;
right;
constructor(e, n, s, r, i) {
super(e, n), this.operation = s, this.left = r, this.right = i;
}
visit(e, n = null) {
return e.visitBinary(this, n);
}
static isAssignmentOperation(e) {
return e === "=" || e === "+=" || e === "-=" || e === "*=" || e === "/=" || e === "%=" || e === "**=" || e === "&&=" || e === "||=" || e === "??=";
}
}, _e = class t21 extends E {
operator;
expr;
left = null;
right = null;
operation = null;
static createMinus(e, n, s) {
return new t21(e, n, "-", s, "-", new I(e, n, 0), s);
}
static createPlus(e, n, s) {
return new t21(e, n, "+", s, "-", s, new I(e, n, 0));
}
constructor(e, n, s, r, i, a, p) {
super(e, n, i, a, p), this.operator = s, this.expr = r;
}
visit(e, n = null) {
return e.visitUnary !== void 0 ? e.visitUnary(this, n) : e.visitBinary(this, n);
}
}, Ve = class extends g {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitPrefixNot(this, n);
}
}, Ue = class extends g {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitTypeofExpression(this, n);
}
}, He = class extends g {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitVoidExpression(this, n);
}
}, Dt = class extends g {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitNonNullAssert(this, n);
}
}, Bt = class extends g {
receiver;
args;
argumentSpan;
constructor(e, n, s, r, i) {
super(e, n), this.receiver = s, this.args = r, this.argumentSpan = i;
}
visit(e, n = null) {
return e.visitCall(this, n);
}
}, Ft = class extends g {
receiver;
args;
argumentSpan;
constructor(e, n, s, r, i) {
super(e, n), this.receiver = s, this.args = r, this.argumentSpan = i;
}
visit(e, n = null) {
return e.visitSafeCall(this, n);
}
}, We = class extends g {
tag;
template;
constructor(e, n, s, r) {
super(e, n), this.tag = s, this.template = r;
}
visit(e, n) {
return e.visitTaggedTemplateLiteral(this, n);
}
}, qe = class extends g {
elements;
expressions;
constructor(e, n, s, r) {
super(e, n), this.elements = s, this.expressions = r;
}
visit(e, n) {
return e.visitTemplateLiteral(this, n);
}
}, je = class extends g {
text;
constructor(e, n, s) {
super(e, n), this.text = s;
}
visit(e, n) {
return e.visitTemplateLiteralElement(this, n);
}
}, Ie = class extends g {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n) {
return e.visitParenthesizedExpression(this, n);
}
}, Vt = class {
name;
span;
sourceSpan;
constructor(e, n, s) {
this.name = e, this.span = n, this.sourceSpan = s;
}
}, Ut = class extends g {
parameters;
body;
constructor(e, n, s, r) {
super(e, n), this.parameters = s, this.body = r;
}
visit(e, n) {
return e.visitArrowFunction(this, n);
}
}, Ht = class extends g {
body;
flags;
constructor(e, n, s, r) {
super(e, n), this.body = s, this.flags = r;
}
visit(e, n) {
return e.visitRegularExpressionLiteral(this, n);
}
}, O = class {
start;
end;
constructor(e, n) {
this.start = e, this.end = n;
}
}, U = class extends g {
ast;
source;
location;
errors;
constructor(e, n, s, r, i) {
super(new K(0, n === null ? 0 : n.length), new O(r, n === null ? r : r + n.length)), this.ast = e, this.source = n, this.location = s, this.errors = i;
}
visit(e, n = null) {
return e.visitASTWithSource ? e.visitASTWithSource(this, n) : this.ast.visit(e, n);
}
toString() {
return `${this.source} in ${this.location}`;
}
}, ue = class {
sourceSpan;
key;
value;
constructor(e, n, s) {
this.sourceSpan = e, this.key = n, this.value = s;
}
}, Ne = class {
sourceSpan;
key;
value;
constructor(e, n, s) {
this.sourceSpan = e, this.key = n, this.value = s;
}
}, Wt = class {
visit(e, n) {
e.visit(this, n);
}
visitUnary(e, n) {
this.visit(e.expr, n);
}
visitBinary(e, n) {
this.visit(e.left, n), this.visit(e.right, n);
}
visitChain(e, n) {
this.visitAll(e.expressions, n);
}
visitConditional(e, n) {
this.visit(e.condition, n), this.visit(e.trueExp, n), this.visit(e.falseExp, n);
}
visitPipe(e, n) {
this.visit(e.exp, n), this.visitAll(e.args, n);
}
visitImplicitReceiver(e, n) {
}
visitThisReceiver(e, n) {
}
visitInterpolation(e, n) {
this.visitAll(e.expressions, n);
}
visitKeyedRead(e, n) {
this.visit(e.receiver, n), this.visit(e.key, n);
}
visitLiteralArray(e, n) {
this.visitAll(e.expressions, n);
}
visitLiteralMap(e, n) {
this.visitAll(e.values, n);
}
visitLiteralPrimitive(e, n) {
}
visitPrefixNot(e, n) {
this.visit(e.expression, n);
}
visitTypeofExpression(e, n) {
this.visit(e.expression, n);
}
visitVoidExpression(e, n) {
this.visit(e.expression, n);
}
visitNonNullAssert(e, n) {
this.visit(e.expression, n);
}
visitPropertyRead(e, n) {
this.visit(e.receiver, n);
}
visitSafePropertyRead(e, n) {
this.visit(e.receiver, n);
}
visitSafeKeyedRead(e, n) {
this.visit(e.receiver, n), this.visit(e.key, n);
}
visitCall(e, n) {
this.visit(e.receiver, n), this.visitAll(e.args, n);
}
visitSafeCall(e, n) {
this.visit(e.receiver, n), this.visitAll(e.args, n);
}
visitTemplateLiteral(e, n) {
for (let s = 0; s < e.elements.length; s++) {
this.visit(e.elements[s], n);
let r = s < e.expressions.length ? e.expressions[s] : null;
r !== null && this.visit(r, n);
}
}
visitTemplateLiteralElement(e, n) {
}
visitTaggedTemplateLiteral(e, n) {
this.visit(e.tag, n), this.visit(e.template, n);
}
visitParenthesizedExpression(e, n) {
this.visit(e.expression, n);
}
visitArrowFunction(e, n) {
this.visit(e.body, n);
}
visitRegularExpressionLiteral(e, n) {
}
visitSpreadElement(e, n) {
this.visit(e.expression, n);
}
visitEmptyExpr(e, n) {
}
visitAll(e, n) {
for (let s of e) this.visit(s, n);
}
};
(function(t29) {
t29[t29.DEFAULT = 0] = "DEFAULT", t29[t29.LITERAL_ATTR = 1] = "LITERAL_ATTR", t29[t29.LEGACY_ANIMATION = 2] = "LEGACY_ANIMATION", t29[t29.TWO_WAY = 3] = "TWO_WAY", t29[t29.ANIMATION = 4] = "ANIMATION";
})($n || ($n = {}));
(function(t29) {
t29[t29.Regular = 0] = "Regular", t29[t29.LegacyAnimation = 1] = "LegacyAnimation", t29[t29.TwoWay = 2] = "TwoWay", t29[t29.Animation = 3] = "Animation";
})(On || (On = {}));
(function(t29) {
t29[t29.Property = 0] = "Property", t29[t29.Attribute = 1] = "Attribute", t29[t29.Class = 2] = "Class", t29[t29.Style = 3] = "Style", t29[t29.LegacyAnimation = 4] = "LegacyAnimation", t29[t29.TwoWay = 5] = "TwoWay", t29[t29.Animation = 6] = "Animation";
})(M || (M = {}));
(function(t29) {
t29[t29.RAW_TEXT = 0] = "RAW_TEXT", t29[t29.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", t29[t29.PARSABLE_DATA = 2] = "PARSABLE_DATA";
})(Dn || (Dn = {}));
Wr = "ctx", we = 0, vs = 9, $e = 10, qr = 11, jr = 12, zr = 13, ws = 32, Gr = 33, xs = 34, Xr = 35, Zt = 36, Jr = 37, Bn = 38, Ss = 39, X = 40, N = 41, Fn = 42, Es = 43, F = 44, ys = 45, z = 46, ze = 47, J = 58, Ee = 59, Yr = 60, y = 61, Vn = 62, Un = 63, Qr = 48, Kr = 57, en = 65, Zr = 69, tn = 90, ie = 91, ut = 92, Q = 93, ei = 94, Ze = 95, Cs = 97, ti = 101, ni = 102, si = 110, ri = 114, ii = 116, oi = 117, ai = 118, _s = 122, ke = 123, Hn = 124, ne = 125, ks = 160, qt = 96;
Ge = class t22 {
file;
offset;
line;
col;
constructor(e, n, s, r) {
this.file = e, this.offset = n, this.line = s, this.col = r;
}
toString() {
return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;
}
moveBy(e) {
let n = this.file.content, s = n.length, r = this.offset, i = this.line, a = this.col;
for (; r > 0 && e < 0; ) if (r--, e++, n.charCodeAt(r) == $e) {
i--;
let h = n.substring(0, r - 1).lastIndexOf(String.fromCharCode($e));
a = h > 0 ? r - h : r;
} else a--;
for (; r < s && e > 0; ) {
let p = n.charCodeAt(r);
r++, e--, p == $e ? (i++, a = 0) : a++;
}
return new t22(this.file, r, i, a);
}
getContext(e, n) {
let s = this.file.content, r = this.offset;
if (r != null) {
r > s.length - 1 && (r = s.length - 1);
let i = r, a = 0, p = 0;
for (; a < e && r > 0 && (r--, a++, !(s[r] == `
` && ++p == n)); ) ;
for (a = 0, p = 0; a < e && i < s.length - 1 && (i++, a++, !(s[i] == `
` && ++p == n)); ) ;
return { before: s.substring(r, this.offset), after: s.substring(this.offset, i + 1) };
}
return null;
}
}, Xe = class {
content;
url;
constructor(e, n) {
this.content = e, this.url = n;
}
}, Je = class {
start;
end;
fullStart;
details;
constructor(e, n, s = e, r = null) {
this.start = e, this.end = n, this.fullStart = s, this.details = r;
}
toString() {
return this.start.file.content.substring(this.start.offset, this.end.offset);
}
};
(function(t29) {
t29[t29.WARNING = 0] = "WARNING", t29[t29.ERROR = 1] = "ERROR";
})(Ye || (Ye = {}));
Pe = class extends Error {
span;
msg;
level;
relatedError;
constructor(e, n, s = Ye.ERROR, r) {
super(n), this.span = e, this.msg = n, this.level = s, this.relatedError = r, Object.setPrototypeOf(this, new.target.prototype);
}
contextualMessage() {
let e = this.span.start.getContext(100, 3);
return e ? `${this.msg} ("${e.before}[${Ye[this.level]} ->]${e.after}")` : this.msg;
}
toString() {
let e = this.span.details ? `, ${this.span.details}` : "";
return `${this.contextualMessage()}: ${this.span.start}${e}`;
}
};
(function(t29) {
t29[t29.Inline = 0] = "Inline", t29[t29.SideEffect = 1] = "SideEffect", t29[t29.Omit = 2] = "Omit";
})(qn || (qn = {}));
(function(t29) {
t29[t29.Global = 0] = "Global", t29[t29.Local = 1] = "Local";
})(jn || (jn = {}));
(function(t29) {
t29[t29.Directive = 0] = "Directive", t29[t29.Pipe = 1] = "Pipe", t29[t29.NgModule = 2] = "NgModule";
})(zn || (zn = {}));
ci = "(:(where|is)\\()?", Ts = "-shadowcsshost", ui = "-shadowcsscontext", zt = "[^)(]*", pi = `(?:\\(${zt}\\)|${zt})+?`, hi = `(?:\\(${pi}\\)|${zt})+?`, nn = `(?:\\((${hi})\\))`, fo = new RegExp("(:nth-[-\\w]+)" + nn, "g"), mo = new RegExp(Ts + nn + "?([^,{]*)", "gim"), fi = ui + nn + "?([^{]*)", go = new RegExp(`${ci}(${fi})`, "gim"), di = Ts + "-no-combinator", vo = new RegExp(`${di}(?![^(]*\\))`, "g"), bs = "%COMMENT%", wo = new RegExp(bs, "g"), xo = new RegExp(`(\\s*(?:${bs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, "g"), mi = "%COMMA_IN_PLACEHOLDER%", gi = "%SEMI_IN_PLACEHOLDER%", vi = "%COLON_IN_PLACEHOLDER%", So = new RegExp(mi, "g"), Eo = new RegExp(gi, "g"), yo = new RegExp(vi, "g");
(function(t29) {
t29[t29.ListEnd = 0] = "ListEnd", t29[t29.Statement = 1] = "Statement", t29[t29.Variable = 2] = "Variable", t29[t29.ElementStart = 3] = "ElementStart", t29[t29.Element = 4] = "Element", t29[t29.Template = 5] = "Template", t29[t29.ElementEnd = 6] = "ElementEnd", t29[t29.ContainerStart = 7] = "ContainerStart", t29[t29.Container = 8] = "Container", t29[t29.ContainerEnd = 9] = "ContainerEnd", t29[t29.DisableBindings = 10] = "DisableBindings", t29[t29.ConditionalCreate = 11] = "ConditionalCreate", t29[t29.ConditionalBranchCreate = 12] = "ConditionalBranchCreate", t29[t29.Conditional = 13] = "Conditional", t29[t29.EnableBindings = 14] = "EnableBindings", t29[t29.Text = 15] = "Text", t29[t29.Listener = 16] = "Listener", t29[t29.InterpolateText = 17] = "InterpolateText", t29[t29.Binding = 18] = "Binding", t29[t29.Property = 19] = "Property", t29[t29.StyleProp = 20] = "StyleProp", t29[t29.ClassProp = 21] = "ClassProp", t29[t29.StyleMap = 22] = "StyleMap", t29[t29.ClassMap = 23] = "ClassMap", t29[t29.Advance = 24] = "Advance", t29[t29.Pipe = 25] = "Pipe", t29[t29.Attribute = 26] = "Attribute", t29[t29.ExtractedAttribute = 27] = "ExtractedAttribute", t29[t29.Defer = 28] = "Defer", t29[t29.DeferOn = 29] = "DeferOn", t29[t29.DeferWhen = 30] = "DeferWhen", t29[t29.I18nMessage = 31] = "I18nMessage", t29[t29.DomProperty = 32] = "DomProperty", t29[t29.Namespace = 33] = "Namespace", t29[t29.ProjectionDef = 34] = "ProjectionDef", t29[t29.Projection = 35] = "Projection", t29[t29.RepeaterCreate = 36] = "RepeaterCreate", t29[t29.Repeater = 37] = "Repeater", t29[t29.TwoWayProperty = 38] = "TwoWayProperty", t29[t29.TwoWayListener = 39] = "TwoWayListener", t29[t29.DeclareLet = 40] = "DeclareLet", t29[t29.StoreLet = 41] = "StoreLet", t29[t29.I18nStart = 42] = "I18nStart", t29[t29.I18n = 43] = "I18n", t29[t29.I18nEnd = 44] = "I18nEnd", t29[t29.I18nExpression = 45] = "I18nExpression", t29[t29.I18nApply = 46] = "I18nApply", t29[t29.IcuStart = 47] = "IcuStart", t29[t29.IcuEnd = 48] = "IcuEnd", t29[t29.IcuPlaceholder = 49] = "IcuPlaceholder", t29[t29.I18nContext = 50] = "I18nContext", t29[t29.I18nAttributes = 51] = "I18nAttributes", t29[t29.SourceLocation = 52] = "SourceLocation", t29[t29.Animation = 53] = "Animation", t29[t29.AnimationString = 54] = "AnimationString", t29[t29.AnimationBinding = 55] = "AnimationBinding", t29[t29.AnimationListener = 56] = "AnimationListener", t29[t29.Control = 57] = "Control", t29[t29.ControlCreate = 58] = "ControlCreate";
})(l || (l = {}));
(function(t29) {
t29[t29.LexicalRead = 0] = "LexicalRead", t29[t29.Context = 1] = "Context", t29[t29.TrackContext = 2] = "TrackContext", t29[t29.ReadVariable = 3] = "ReadVariable", t29[t29.NextContext = 4] = "NextContext", t29[t29.Reference = 5] = "Reference", t29[t29.StoreLet = 6] = "StoreLet", t29[t29.ContextLetReference = 7] = "ContextLetReference", t29[t29.GetCurrentView = 8] = "GetCurrentView", t29[t29.RestoreView = 9] = "RestoreView", t29[t29.ResetView = 10] = "ResetView", t29[t29.PureFunctionExpr = 11] = "PureFunctionExpr", t29[t29.PureFunctionParameterExpr = 12] = "PureFunctionParameterExpr", t29[t29.PipeBinding = 13] = "PipeBinding", t29[t29.PipeBindingVariadic = 14] = "PipeBindingVariadic", t29[t29.SafePropertyRead = 15] = "SafePropertyRead", t29[t29.SafeKeyedRead = 16] = "SafeKeyedRead", t29[t29.SafeInvokeFunction = 17] = "SafeInvokeFunction", t29[t29.SafeTernaryExpr = 18] = "SafeTernaryExpr", t29[t29.EmptyExpr = 19] = "EmptyExpr", t29[t29.AssignTemporaryExpr = 20] = "AssignTemporaryExpr", t29[t29.ReadTemporaryExpr = 21] = "ReadTemporaryExpr", t29[t29.SlotLiteralExpr = 22] = "SlotLiteralExpr", t29[t29.ConditionalCase = 23] = "ConditionalCase", t29[t29.ConstCollected = 24] = "ConstCollected", t29[t29.TwoWayBindingSet = 25] = "TwoWayBindingSet", t29[t29.ArrowFunction = 26] = "ArrowFunction";
})(Z || (Z = {}));
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.AlwaysInline = 1] = "AlwaysInline";
})(Gn || (Gn = {}));
(function(t29) {
t29[t29.Context = 0] = "Context", t29[t29.Identifier = 1] = "Identifier", t29[t29.SavedView = 2] = "SavedView", t29[t29.Alias = 3] = "Alias";
})(Xn || (Xn = {}));
(function(t29) {
t29[t29.Attribute = 0] = "Attribute", t29[t29.ClassName = 1] = "ClassName", t29[t29.StyleProperty = 2] = "StyleProperty", t29[t29.Property = 3] = "Property", t29[t29.Template = 4] = "Template", t29[t29.I18n = 5] = "I18n", t29[t29.LegacyAnimation = 6] = "LegacyAnimation", t29[t29.TwoWayProperty = 7] = "TwoWayProperty", t29[t29.Animation = 8] = "Animation";
})(R || (R = {}));
(function(t29) {
t29[t29.Creation = 0] = "Creation", t29[t29.Postproccessing = 1] = "Postproccessing";
})(Jn || (Jn = {}));
(function(t29) {
t29[t29.I18nText = 0] = "I18nText", t29[t29.I18nAttribute = 1] = "I18nAttribute";
})(Yn || (Yn = {}));
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.ElementTag = 1] = "ElementTag", t29[t29.TemplateTag = 2] = "TemplateTag", t29[t29.OpenTag = 4] = "OpenTag", t29[t29.CloseTag = 8] = "CloseTag", t29[t29.ExpressionIndex = 16] = "ExpressionIndex";
})(Qn || (Qn = {}));
(function(t29) {
t29[t29.HTML = 0] = "HTML", t29[t29.SVG = 1] = "SVG", t29[t29.Math = 2] = "Math";
})(Kn || (Kn = {}));
(function(t29) {
t29[t29.Idle = 0] = "Idle", t29[t29.Immediate = 1] = "Immediate", t29[t29.Timer = 2] = "Timer", t29[t29.Hover = 3] = "Hover", t29[t29.Interaction = 4] = "Interaction", t29[t29.Viewport = 5] = "Viewport", t29[t29.Never = 6] = "Never";
})($ || ($ = {}));
(function(t29) {
t29[t29.RootI18n = 0] = "RootI18n", t29[t29.Icu = 1] = "Icu", t29[t29.Attr = 2] = "Attr";
})(Zn || (Zn = {}));
(function(t29) {
t29[t29.NgTemplate = 0] = "NgTemplate", t29[t29.Structural = 1] = "Structural", t29[t29.Block = 2] = "Block";
})(es || (es = {}));
Gt = class t23 {
static nextListId = 0;
debugListId = t23.nextListId++;
head = { kind: l.ListEnd, next: null, prev: null, debugListId: this.debugListId };
tail = { kind: l.ListEnd, next: null, prev: null, debugListId: this.debugListId };
constructor() {
this.head.next = this.tail, this.tail.prev = this.head;
}
push(e) {
if (Array.isArray(e)) {
for (let s of e) this.push(s);
return;
}
t23.assertIsNotEnd(e), t23.assertIsUnowned(e), e.debugListId = this.debugListId;
let n = this.tail.prev;
e.prev = n, n.next = e, e.next = this.tail, this.tail.prev = e;
}
prepend(e) {
if (e.length === 0) return;
for (let r of e) t23.assertIsNotEnd(r), t23.assertIsUnowned(r), r.debugListId = this.debugListId;
let n = this.head.next, s = this.head;
for (let r of e) s.next = r, r.prev = s, s = r;
s.next = n, n.prev = s;
}
*[Symbol.iterator]() {
let e = this.head.next;
for (; e !== this.tail; ) {
t23.assertIsOwned(e, this.debugListId);
let n = e.next;
yield e, e = n;
}
}
*reversed() {
let e = this.tail.prev;
for (; e !== this.head; ) {
t23.assertIsOwned(e, this.debugListId);
let n = e.prev;
yield e, e = n;
}
}
static replace(e, n) {
t23.assertIsNotEnd(e), t23.assertIsNotEnd(n), t23.assertIsOwned(e), t23.assertIsUnowned(n), n.debugListId = e.debugListId, e.prev !== null && (e.prev.next = n, n.prev = e.prev), e.next !== null && (e.next.prev = n, n.next = e.next), e.debugListId = null, e.prev = null, e.next = null;
}
static replaceWithMany(e, n) {
if (n.length === 0) {
t23.remove(e);
return;
}
t23.assertIsNotEnd(e), t23.assertIsOwned(e);
let s = e.debugListId;
e.debugListId = null;
for (let d of n) t23.assertIsNotEnd(d), t23.assertIsUnowned(d);
let { prev: r, next: i } = e;
e.prev = null, e.next = null;
let a = r;
for (let d of n) t23.assertIsUnowned(d), d.debugListId = s, a.next = d, d.prev = a, d.next = null, a = d;
let p = n[0], h = a;
r !== null && (r.next = p, p.prev = r), i !== null && (i.prev = h, h.next = i);
}
static remove(e) {
t23.assertIsNotEnd(e), t23.assertIsOwned(e), e.prev.next = e.next, e.next.prev = e.prev, e.debugListId = null, e.prev = null, e.next = null;
}
static insertBefore(e, n) {
if (Array.isArray(e)) {
for (let s of e) t23.insertBefore(s, n);
return;
}
if (t23.assertIsOwned(n), n.prev === null) throw new Error("AssertionError: illegal operation on list start");
t23.assertIsNotEnd(e), t23.assertIsUnowned(e), e.debugListId = n.debugListId, e.prev = null, n.prev.next = e, e.prev = n.prev, e.next = n, n.prev = e;
}
static insertAfter(e, n) {
if (t23.assertIsOwned(n), n.next === null) throw new Error("AssertionError: illegal operation on list end");
t23.assertIsNotEnd(e), t23.assertIsUnowned(e), e.debugListId = n.debugListId, n.next.prev = e, e.next = n.next, e.prev = n, n.next = e;
}
static assertIsUnowned(e) {
if (e.debugListId !== null) throw new Error(`AssertionError: illegal operation on owned node: ${l[e.kind]}`);
}
static assertIsOwned(e, n) {
if (e.debugListId === null) throw new Error(`AssertionError: illegal operation on unowned node: ${l[e.kind]}`);
if (n !== void 0 && e.debugListId !== n) throw new Error(`AssertionError: node belongs to the wrong list (expected ${n}, actual ${e.debugListId})`);
}
static assertIsNotEnd(e) {
if (e.kind === l.ListEnd) throw new Error("AssertionError: illegal operation on list head or tail");
}
};
xi = { debugListId: null, prev: null, next: null }, Si = /* @__PURE__ */ Symbol("ConsumesSlot"), As = /* @__PURE__ */ Symbol("DependsOnSlotContext"), fe = /* @__PURE__ */ Symbol("ConsumesVars"), et = /* @__PURE__ */ Symbol("UsesVarOffset"), Co = { [Si]: !0, numSlotsUsed: 1 }, _o = { [As]: !0 }, ko = { [fe]: !0 }, pe = class {
strings;
expressions;
i18nPlaceholders;
constructor(e, n, s) {
if (this.strings = e, this.expressions = n, this.i18nPlaceholders = s, s.length !== 0 && s.length !== n.length) throw new Error(`Expected ${n.length} placeholders to match interpolation expression count, but got ${s.length}`);
}
}, ee = class extends S {
constructor(e = null) {
super(null, e);
}
}, ts = class t24 extends ee {
target;
value;
sourceSpan;
kind = Z.StoreLet;
[fe] = !0;
[As] = !0;
constructor(e, n, s) {
super(), this.target = e, this.value = n, this.sourceSpan = s;
}
visitExpression() {
}
isEquivalent(e) {
return e instanceof t24 && e.target === this.target && e.value.isEquivalent(this.value);
}
isConstant() {
return !1;
}
transformInternalExpressions(e, n) {
this.value = (this.value, void 0);
}
clone() {
return new t24(this.target, this.value, this.sourceSpan);
}
}, ns = class t25 extends ee {
kind = Z.PureFunctionExpr;
[fe] = !0;
[et] = !0;
varOffset = null;
body;
args;
fn = null;
constructor(e, n) {
super(), this.body = e, this.args = n;
}
visitExpression(e, n) {
this.body?.visitExpression(e, n);
for (let s of this.args) s.visitExpression(e, n);
}
isEquivalent(e) {
return !(e instanceof t25) || e.args.length !== this.args.length ? !1 : e.body !== null && this.body !== null && e.body.isEquivalent(this.body) && e.args.every((n, s) => n.isEquivalent(this.args[s]));
}
isConstant() {
return !1;
}
transformInternalExpressions(e, n) {
this.body !== null ? this.body = (this.body, n | W.InChildOperation, void 0) : this.fn !== null && (this.fn = (this.fn, void 0));
for (let s = 0; s < this.args.length; s++) this.args[s] = (this.args[s], void 0);
}
clone() {
let e = new t25(this.body?.clone() ?? null, this.args.map((n) => n.clone()));
return e.fn = this.fn?.clone() ?? null, e.varOffset = this.varOffset, e;
}
}, ss = class t26 extends ee {
target;
targetSlot;
name;
args;
kind = Z.PipeBinding;
[fe] = !0;
[et] = !0;
varOffset = null;
constructor(e, n, s, r) {
super(), this.target = e, this.targetSlot = n, this.name = s, this.args = r;
}
visitExpression(e, n) {
for (let s of this.args) s.visitExpression(e, n);
}
isEquivalent() {
return !1;
}
isConstant() {
return !1;
}
transformInternalExpressions(e, n) {
for (let s = 0; s < this.args.length; s++) this.args[s] = (this.args[s], void 0);
}
clone() {
let e = new t26(this.target, this.targetSlot, this.name, this.args.map((n) => n.clone()));
return e.varOffset = this.varOffset, e;
}
}, rs = class t27 extends ee {
target;
targetSlot;
name;
args;
numArgs;
kind = Z.PipeBindingVariadic;
[fe] = !0;
[et] = !0;
varOffset = null;
constructor(e, n, s, r, i) {
super(), this.target = e, this.targetSlot = n, this.name = s, this.args = r, this.numArgs = i;
}
visitExpression(e, n) {
this.args.visitExpression(e, n);
}
isEquivalent() {
return !1;
}
isConstant() {
return !1;
}
transformInternalExpressions(e, n) {
this.args = (this.args, void 0);
}
clone() {
let e = new t27(this.target, this.targetSlot, this.name, this.args.clone(), this.numArgs);
return e.varOffset = this.varOffset, e;
}
}, is = class t28 extends ee {
parameters;
body;
kind = Z.ArrowFunction;
[fe] = !0;
[et] = !0;
contextName = Wr;
currentViewName = "view";
varOffset = null;
ops;
constructor(e, n) {
super(), this.parameters = e, this.body = n, this.ops = new Gt(), this.ops.push([wi(new Be(n, n.sourceSpan))]);
}
visitExpression(e, n) {
for (let s of this.ops) Ei(s, (r) => {
r.visitExpression(e, n);
});
}
isEquivalent(e) {
return e instanceof t28 && e.parameters.length === this.parameters.length && e.parameters.every((n, s) => n.isEquivalent(this.parameters[s])) && e.body.isEquivalent(this.body);
}
isConstant() {
return !1;
}
transformInternalExpressions(e, n) {
for (let s of this.ops) Qe(s, e, n | (W.InChildOperation | W.InArrowFunctionOperation));
}
clone() {
let e = new t28(this.parameters, this.body);
return e.varOffset = this.varOffset, e.ops = this.ops, e;
}
};
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.InChildOperation = 1] = "InChildOperation", t29[t29.InArrowFunctionOperation = 2] = "InArrowFunctionOperation";
})(W || (W = {}));
To = /* @__PURE__ */ new Set([l.Element, l.ElementStart, l.Container, l.ContainerStart, l.Template, l.RepeaterCreate, l.ConditionalCreate, l.ConditionalBranchCreate]);
(function(t29) {
t29[t29.Tmpl = 0] = "Tmpl", t29[t29.Host = 1] = "Host", t29[t29.Both = 2] = "Both";
})(os || (os = {}));
(function(t29) {
t29[t29.Full = 0] = "Full", t29[t29.DomOnly = 1] = "DomOnly";
})(as || (as = {}));
bo = /* @__PURE__ */ new Map([[c.ariaProperty, c.ariaProperty], [c.attribute, c.attribute], [c.classProp, c.classProp], [c.element, c.element], [c.elementContainer, c.elementContainer], [c.elementContainerEnd, c.elementContainerEnd], [c.elementContainerStart, c.elementContainerStart], [c.elementEnd, c.elementEnd], [c.elementStart, c.elementStart], [c.domProperty, c.domProperty], [c.i18nExp, c.i18nExp], [c.listener, c.listener], [c.listener, c.listener], [c.property, c.property], [c.styleProp, c.styleProp], [c.syntheticHostListener, c.syntheticHostListener], [c.syntheticHostProperty, c.syntheticHostProperty], [c.templateCreate, c.templateCreate], [c.twoWayProperty, c.twoWayProperty], [c.twoWayListener, c.twoWayListener], [c.declareLet, c.declareLet], [c.conditionalCreate, c.conditionalBranchCreate], [c.conditionalBranchCreate, c.conditionalBranchCreate], [c.domElement, c.domElement], [c.domElementStart, c.domElementStart], [c.domElementEnd, c.domElementEnd], [c.domElementContainer, c.domElementContainer], [c.domElementContainerStart, c.domElementContainerStart], [c.domElementContainerEnd, c.domElementContainerEnd], [c.domListener, c.domListener], [c.domTemplate, c.domTemplate], [c.animationEnter, c.animationEnter], [c.animationLeave, c.animationLeave], [c.animationEnterListener, c.animationEnterListener], [c.animationLeaveListener, c.animationLeaveListener]]), Ao = /* @__PURE__ */ new Map([["&&", u.And], [">", u.Bigger], [">=", u.BiggerEquals], ["|", u.BitwiseOr], ["&", u.BitwiseAnd], ["/", u.Divide], ["=", u.Assign], ["==", u.Equals], ["===", u.Identical], ["<", u.Lower], ["<=", u.LowerEquals], ["-", u.Minus], ["%", u.Modulo], ["**", u.Exponentiation], ["*", u.Multiply], ["!=", u.NotEquals], ["!==", u.NotIdentical], ["??", u.NullishCoalesce], ["||", u.Or], ["+", u.Plus], ["in", u.In], ["instanceof", u.InstanceOf], ["+=", u.AdditionAssignment], ["-=", u.SubtractionAssignment], ["*=", u.MultiplicationAssignment], ["/=", u.DivisionAssignment], ["%=", u.RemainderAssignment], ["**=", u.ExponentiationAssignment], ["&&=", u.AndAssignment], ["||=", u.OrAssignment], ["??=", u.NullishCoalesceAssignment]]), Io = Object.freeze([]), No = /* @__PURE__ */ new Map([[l.ElementEnd, [l.ElementStart, l.Element]], [l.ContainerEnd, [l.ContainerStart, l.Container]], [l.I18nEnd, [l.I18nStart, l.I18n]]]), Po = /* @__PURE__ */ new Set([l.Pipe]), yi = {}, Ci = "\uE500";
yi.ngsp = Ci;
(function(t29) {
t29.HEX = "hexadecimal", t29.DEC = "decimal";
})(ls || (ls = {}));
Is = ` \f
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`, Lo = new RegExp(`[^${Is}]`), Mo = new RegExp(`[${Is}]{2,}`, "g");
(function(t29) {
t29[t29.Character = 0] = "Character", t29[t29.Identifier = 1] = "Identifier", t29[t29.PrivateIdentifier = 2] = "PrivateIdentifier", t29[t29.Keyword = 3] = "Keyword", t29[t29.String = 4] = "String", t29[t29.Operator = 5] = "Operator", t29[t29.Number = 6] = "Number", t29[t29.RegExpBody = 7] = "RegExpBody", t29[t29.RegExpFlags = 8] = "RegExpFlags", t29[t29.Error = 9] = "Error";
})(f || (f = {}));
(function(t29) {
t29[t29.Plain = 0] = "Plain", t29[t29.TemplateLiteralPart = 1] = "TemplateLiteralPart", t29[t29.TemplateLiteralEnd = 2] = "TemplateLiteralEnd";
})(H || (H = {}));
_i = ["var", "let", "as", "null", "undefined", "true", "false", "if", "else", "this", "typeof", "void", "in", "instanceof"], Le = class {
tokenize(e) {
return new Jt(e).scan();
}
}, b = class {
index;
end;
type;
numValue;
strValue;
constructor(e, n, s, r, i) {
this.index = e, this.end = n, this.type = s, this.numValue = r, this.strValue = i;
}
isCharacter(e) {
return this.type === f.Character && this.numValue === e;
}
isNumber() {
return this.type === f.Number;
}
isString() {
return this.type === f.String;
}
isOperator(e) {
return this.type === f.Operator && this.strValue === e;
}
isIdentifier() {
return this.type === f.Identifier;
}
isPrivateIdentifier() {
return this.type === f.PrivateIdentifier;
}
isKeyword() {
return this.type === f.Keyword;
}
isKeywordLet() {
return this.type === f.Keyword && this.strValue === "let";
}
isKeywordAs() {
return this.type === f.Keyword && this.strValue === "as";
}
isKeywordNull() {
return this.type === f.Keyword && this.strValue === "null";
}
isKeywordUndefined() {
return this.type === f.Keyword && this.strValue === "undefined";
}
isKeywordTrue() {
return this.type === f.Keyword && this.strValue === "true";
}
isKeywordFalse() {
return this.type === f.Keyword && this.strValue === "false";
}
isKeywordThis() {
return this.type === f.Keyword && this.strValue === "this";
}
isKeywordTypeof() {
return this.type === f.Keyword && this.strValue === "typeof";
}
isKeywordVoid() {
return this.type === f.Keyword && this.strValue === "void";
}
isKeywordIn() {
return this.type === f.Keyword && this.strValue === "in";
}
isKeywordInstanceOf() {
return this.type === f.Keyword && this.strValue === "instanceof";
}
isError() {
return this.type === f.Error;
}
isRegExpBody() {
return this.type === f.RegExpBody;
}
isRegExpFlags() {
return this.type === f.RegExpFlags;
}
toNumber() {
return this.type === f.Number ? this.numValue : -1;
}
isTemplateLiteralPart() {
return this.isString() && this.kind === H.TemplateLiteralPart;
}
isTemplateLiteralEnd() {
return this.isString() && this.kind === H.TemplateLiteralEnd;
}
isTemplateLiteralInterpolationStart() {
return this.isOperator("${");
}
toString() {
switch (this.type) {
case f.Character:
case f.Identifier:
case f.Keyword:
case f.Operator:
case f.PrivateIdentifier:
case f.String:
case f.Error:
case f.RegExpBody:
case f.RegExpFlags:
return this.strValue;
case f.Number:
return this.numValue.toString();
default:
return null;
}
}
}, Te = class extends b {
kind;
constructor(e, n, s, r) {
super(e, n, f.String, 0, s), this.kind = r;
}
};
Se = new b(-1, -1, f.Character, 0, ""), Jt = class {
input;
tokens = [];
length;
peek = 0;
index = -1;
braceStack = [];
constructor(e) {
this.input = e, this.length = e.length, this.advance();
}
scan() {
let e = this.scanToken();
for (; e !== null; ) this.tokens.push(e), e = this.scanToken();
return this.tokens;
}
advance() {
this.peek = ++this.index >= this.length ? we : this.input.charCodeAt(this.index);
}
scanToken() {
let e = this.input, n = this.length, s = this.peek, r = this.index;
for (; s <= ws; ) if (++r >= n) {
s = we;
break;
} else s = e.charCodeAt(r);
if (this.peek = s, this.index = r, r >= n) return null;
if (cs(s)) return this.scanIdentifier();
if (G(s)) return this.scanNumber(r);
let i = r;
switch (s) {
case z:
return this.advance(), G(this.peek) ? this.scanNumber(i) : this.peek !== z ? xe(i, this.index, z) : (this.advance(), this.peek === z ? (this.advance(), B(i, this.index, "...")) : this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0));
case X:
case N:
case ie:
case Q:
case F:
case J:
case Ee:
return this.scanCharacter(i, s);
case ke:
return this.scanOpenBrace(i, s);
case ne:
return this.scanCloseBrace(i, s);
case Ss:
case xs:
return this.scanString();
case qt:
return this.advance(), this.scanTemplateLiteralPart(i);
case Xr:
return this.scanPrivateIdentifier();
case Es:
return this.scanComplexOperator(i, "+", y, "=");
case ys:
return this.scanComplexOperator(i, "-", y, "=");
case ze:
return this.isStartOfRegex() ? this.scanRegex(r) : this.scanComplexOperator(i, "/", y, "=");
case Jr:
return this.scanComplexOperator(i, "%", y, "=");
case ei:
return this.scanOperator(i, "^");
case Fn:
return this.scanStar(i);
case Un:
return this.scanQuestion(i);
case Yr:
case Vn:
return this.scanComplexOperator(i, String.fromCharCode(s), y, "=");
case Gr:
return this.scanComplexOperator(i, "!", y, "=", y, "=");
case y:
return this.scanEquals(i);
case Bn:
return this.scanComplexOperator(i, "&", Bn, "&", y, "=");
case Hn:
return this.scanComplexOperator(i, "|", Hn, "|", y, "=");
case ks:
for (; li(this.peek); ) this.advance();
return this.scanToken();
}
return this.advance(), this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0);
}
scanCharacter(e, n) {
return this.advance(), xe(e, this.index, n);
}
scanOperator(e, n) {
return this.advance(), B(e, this.index, n);
}
scanOpenBrace(e, n) {
return this.braceStack.push("expression"), this.advance(), xe(e, this.index, n);
}
scanCloseBrace(e, n) {
return this.advance(), this.braceStack.pop() === "interpolation" ? (this.tokens.push(xe(e, this.index, ne)), this.scanTemplateLiteralPart(this.index)) : xe(e, this.index, n);
}
scanComplexOperator(e, n, s, r, i, a) {
this.advance();
let p = n;
return this.peek == s && (this.advance(), p += r), i != null && this.peek == i && (this.advance(), p += a), B(e, this.index, p);
}
scanEquals(e) {
this.advance();
let n = "=";
if (this.peek === y) this.advance(), n += "=";
else if (this.peek === Vn) return this.advance(), n += ">", B(e, this.index, n);
return this.peek === y && (this.advance(), n += "="), B(e, this.index, n);
}
scanIdentifier() {
let e = this.index;
for (this.advance(); us(this.peek); ) this.advance();
let n = this.input.substring(e, this.index);
return _i.indexOf(n) > -1 ? bi(e, this.index, n) : ki(e, this.index, n);
}
scanPrivateIdentifier() {
let e = this.index;
if (this.advance(), !cs(this.peek)) return this.error("Invalid character [#]", -1);
for (; us(this.peek); ) this.advance();
let n = this.input.substring(e, this.index);
return Ti(e, this.index, n);
}
scanNumber(e) {
let n = this.index === e, s = !1;
for (this.advance(); ; ) {
if (!G(this.peek)) if (this.peek === Ze) {
if (!G(this.input.charCodeAt(this.index - 1)) || !G(this.input.charCodeAt(this.index + 1))) return this.error("Invalid numeric separator", 0);
s = !0;
} else if (this.peek === z) n = !1;
else if (Li(this.peek)) {
if (this.advance(), Mi(this.peek) && this.advance(), !G(this.peek)) return this.error("Invalid exponent", -1);
n = !1;
} else break;
this.advance();
}
let r = this.input.substring(e, this.index);
s && (r = r.replace(/_/g, ""));
let i = n ? $i(r) : parseFloat(r);
return Ai(e, this.index, i);
}
scanString() {
let e = this.index, n = this.peek;
this.advance();
let s = "", r = this.index, i = this.input;
for (; this.peek != n; ) if (this.peek == ut) {
let p = this.scanStringBackslash(s, r);
if (typeof p != "string") return p;
s = p, r = this.index;
} else {
if (this.peek == we) return this.error("Unterminated quote", 0);
this.advance();
}
let a = i.substring(r, this.index);
return this.advance(), new Te(e, this.index, s + a, H.Plain);
}
scanQuestion(e) {
this.advance();
let n = "?";
return this.peek === Un ? (n += "?", this.advance(), this.peek === y && (n += "=", this.advance())) : this.peek === z && (n += ".", this.advance()), B(e, this.index, n);
}
scanTemplateLiteralPart(e) {
let n = "", s = this.index;
for (; this.peek !== qt; ) if (this.peek === ut) {
let i = this.scanStringBackslash(n, s);
if (typeof i != "string") return i;
n = i, s = this.index;
} else if (this.peek === Zt) {
let i = this.index;
if (this.advance(), this.peek === ke) return this.braceStack.push("interpolation"), this.tokens.push(new Te(e, i, n + this.input.substring(s, i), H.TemplateLiteralPart)), this.advance(), B(i, this.index, this.input.substring(i, this.index));
} else {
if (this.peek === we) return this.error("Unterminated template literal", 0);
this.advance();
}
let r = this.input.substring(s, this.index);
return this.advance(), new Te(e, this.index, n + r, H.TemplateLiteralEnd);
}
error(e, n) {
let s = this.index + n;
return Ii(s, this.index, `Lexer Error: ${e} at column ${s} in expression [${this.input}]`);
}
scanStringBackslash(e, n) {
e += this.input.substring(n, this.index);
let s;
if (this.advance(), this.peek === oi) {
let r = this.input.substring(this.index + 1, this.index + 5);
if (/^[0-9a-f]+$/i.test(r)) s = parseInt(r, 16);
else return this.error(`Invalid unicode escape [\\u${r}]`, 0);
for (let i = 0; i < 5; i++) this.advance();
} else s = Ri(this.peek), this.advance();
return e += String.fromCharCode(s), e;
}
scanStar(e) {
this.advance();
let n = "*";
return this.peek === Fn ? (n += "*", this.advance(), this.peek === y && (n += "=", this.advance())) : this.peek === y && (n += "=", this.advance()), B(e, this.index, n);
}
isStartOfRegex() {
if (this.tokens.length === 0) return !0;
let e = this.tokens[this.tokens.length - 1];
if (e.isOperator("!")) {
let n = this.tokens.length > 1 ? this.tokens[this.tokens.length - 2] : null;
return n === null || n.type !== f.Identifier && !n.isCharacter(N) && !n.isCharacter(Q);
}
return e.type === f.Operator || e.isCharacter(X) || e.isCharacter(ie) || e.isCharacter(F) || e.isCharacter(J);
}
scanRegex(e) {
this.advance();
let n = this.index, s = !1, r = !1;
for (; ; ) {
let h = this.peek;
if (h === we) return this.error("Unterminated regular expression", 0);
if (s) s = !1;
else if (h === ut) s = !0;
else if (h === ie) r = !0;
else if (h === Q) r = !1;
else if (h === ze && !r) break;
this.advance();
}
let i = this.input.substring(n, this.index);
this.advance();
let a = Ni(e, this.index, i), p = this.scanRegexFlags(this.index);
return p !== null ? (this.tokens.push(a), p) : a;
}
scanRegexFlags(e) {
if (!jt(this.peek)) return null;
for (; jt(this.peek); ) this.advance();
return Pi(e, this.index, this.input.substring(e, this.index));
}
};
Yt = class {
strings;
expressions;
offsets;
constructor(e, n, s) {
this.strings = e, this.expressions = n, this.offsets = s;
}
}, Qt = class {
templateBindings;
warnings;
errors;
constructor(e, n, s) {
this.templateBindings = e, this.warnings = n, this.errors = s;
}
};
he = class {
_lexer;
_supportsDirectPipeReferences;
constructor(e, n = !1) {
this._lexer = e, this._supportsDirectPipeReferences = n;
}
parseAction(e, n, s) {
let r = [];
this._checkNoInterpolation(r, e, n);
let { stripped: i } = this._stripComments(e), a = this._lexer.tokenize(i), p = new Y(e, n, s, a, 1, r, 0, this._supportsDirectPipeReferences).parseChain();
return new U(p, e, V(n), s, r);
}
parseBinding(e, n, s) {
let r = [], i = this._parseBindingAst(e, n, s, r);
return new U(i, e, V(n), s, r);
}
checkSimpleExpression(e) {
let n = new Kt();
return e.visit(n), n.errors;
}
parseSimpleBinding(e, n, s) {
let r = [], i = this._parseBindingAst(e, n, s, r), a = this.checkSimpleExpression(i);
return a.length > 0 && r.push(re(`Host binding expression cannot contain ${a.join(" ")}`, e, "", n)), new U(i, e, V(n), s, r);
}
_parseBindingAst(e, n, s, r) {
this._checkNoInterpolation(r, e, n);
let { stripped: i } = this._stripComments(e), a = this._lexer.tokenize(i);
return new Y(e, n, s, a, 0, r, 0, this._supportsDirectPipeReferences).parseChain();
}
parseTemplateBindings(e, n, s, r, i) {
let a = this._lexer.tokenize(n), p = [];
return new Y(n, s, i, a, 0, p, 0, this._supportsDirectPipeReferences).parseTemplateBindings({ source: e, span: new O(r, r + e.length) });
}
parseInterpolation(e, n, s, r) {
let i = [], { strings: a, expressions: p, offsets: h } = this.splitInterpolation(e, n, i, r);
if (p.length === 0) return null;
let d = [];
for (let x = 0; x < p.length; ++x) {
let D = r?.[x * 2 + 1]?.sourceSpan, k = p[x].text, { stripped: T, hasComments: C } = this._stripComments(k), q = this._lexer.tokenize(T);
if (C && T.trim().length === 0 && q.length === 0) {
i.push(re("Interpolation expression cannot only contain a comment", e, `at column ${p[x].start} in`, n));
continue;
}
let ge = new Y(D ? k : e, D || n, s, q, 0, i, h[x], this._supportsDirectPipeReferences).parseChain();
d.push(ge);
}
return this.createInterpolationAst(a.map((x) => x.text), d, e, V(n), s, i);
}
parseInterpolationExpression(e, n, s) {
let { stripped: r } = this._stripComments(e), i = this._lexer.tokenize(r), a = [], p = new Y(e, n, s, i, 0, a, 0, this._supportsDirectPipeReferences).parseChain(), h = ["", ""];
return this.createInterpolationAst(h, [p], e, V(n), s, a);
}
createInterpolationAst(e, n, s, r, i, a) {
let p = new K(0, s.length), h = new Hr(p, p.toAbsolute(i), e, n);
return new U(h, s, r, i, a);
}
splitInterpolation(e, n, s, r) {
let i = [], a = [], p = [], h = r ? Oi(r) : null, d = 0, x = !1, D = !1, k = "{{", T = "}}";
for (; d < e.length; ) if (x) {
let C = d, q = C + k.length, ge = this._getInterpolationEndIndex(e, T, q);
if (ge === -1) {
x = !1, D = !0;
break;
}
let dn = ge + T.length, mn = e.substring(q, ge);
mn.trim().length === 0 && s.push(re("Blank expressions are not allowed in interpolated strings", e, `at column ${d} in`, n)), a.push({ text: mn, start: C, end: dn });
let $r = (h?.get(C) ?? C) + k.length;
p.push($r), d = dn, x = !1;
} else {
let C = d;
d = e.indexOf(k, d), d === -1 && (d = e.length);
let q = e.substring(C, d);
i.push({ text: q, start: C, end: d }), x = !0;
}
if (!x) if (D) {
let C = i[i.length - 1];
C.text += e.substring(d), C.end = e.length;
} else i.push({ text: e.substring(d), start: d, end: e.length });
return new Yt(i, a, p);
}
wrapLiteralPrimitive(e, n, s) {
let r = new K(0, e == null ? 0 : e.length);
return new U(new I(r, r.toAbsolute(s), e), e, typeof n == "string" ? n : V(n), s, []);
}
_stripComments(e) {
let n = this._commentStart(e);
return n != null ? { stripped: e.substring(0, n), hasComments: !0 } : { stripped: e, hasComments: !1 };
}
_commentStart(e) {
let n = null;
for (let s = 0; s < e.length - 1; s++) {
let r = e.charCodeAt(s), i = e.charCodeAt(s + 1);
if (r === ze && i == ze && n == null) return s;
n === r ? n = null : n == null && Wn(r) && (n = r);
}
return null;
}
_checkNoInterpolation(e, n, s) {
let r = -1, i = -1;
for (let a of this._forEachUnquotedChar(n, 0)) if (r === -1) n.startsWith("{{") && (r = a);
else if (i = this._getInterpolationEndIndex(n, "}}", a), i > -1) break;
r > -1 && i > -1 && e.push(re("Got interpolation ({{}}) where expression was expected", n, `at column ${r} in`, s));
}
_getInterpolationEndIndex(e, n, s) {
for (let r of this._forEachUnquotedChar(e, s)) {
if (e.startsWith(n, r)) return r;
if (e.startsWith("//", r)) return e.indexOf(n, r);
}
return -1;
}
*_forEachUnquotedChar(e, n) {
let s = null, r = 0;
for (let i = n; i < e.length; i++) {
let a = e[i];
Wn(e.charCodeAt(i)) && (s === null || s === a) && r % 2 === 0 ? s = s === null ? a : null : s === null && (yield i), r = a === "\\" ? r + 1 : 0;
}
}
};
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.Writable = 1] = "Writable";
})(se || (se = {}));
ps = /* @__PURE__ */ new Set(["d", "g", "i", "m", "s", "u", "v", "y"]), Y = class {
input;
parseSourceSpan;
absoluteOffset;
tokens;
parseFlags;
errors;
offset;
supportsDirectPipeReferences;
rparensExpected = 0;
rbracketsExpected = 0;
rbracesExpected = 0;
context = se.None;
sourceSpanCache = /* @__PURE__ */ new Map();
index = 0;
constructor(e, n, s, r, i, a, p, h) {
this.input = e, this.parseSourceSpan = n, this.absoluteOffset = s, this.tokens = r, this.parseFlags = i, this.errors = a, this.offset = p, this.supportsDirectPipeReferences = h;
}
peek(e) {
let n = this.index + e;
return n < this.tokens.length ? this.tokens[n] : Se;
}
get next() {
return this.peek(0);
}
get atEOF() {
return this.index >= this.tokens.length;
}
get inputIndex() {
return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;
}
get currentEndIndex() {
return this.index > 0 ? this.peek(-1).end + this.offset : this.tokens.length === 0 ? this.input.length + this.offset : this.next.index + this.offset;
}
get currentAbsoluteOffset() {
return this.absoluteOffset + this.inputIndex;
}
span(e, n) {
let s = this.currentEndIndex;
if (n !== void 0 && n > this.currentEndIndex && (s = n), e > s) {
let r = s;
s = e, e = r;
}
return new K(e, s);
}
sourceSpan(e, n) {
let s = `${e}@${this.inputIndex}:${n}`;
return this.sourceSpanCache.has(s) || this.sourceSpanCache.set(s, this.span(e, n).toAbsolute(this.absoluteOffset)), this.sourceSpanCache.get(s);
}
advance() {
this.index++;
}
withContext(e, n) {
this.context |= e;
let s = n();
return this.context ^= e, s;
}
consumeOptionalCharacter(e) {
return this.next.isCharacter(e) ? (this.advance(), !0) : !1;
}
peekKeywordLet() {
return this.next.isKeywordLet();
}
peekKeywordAs() {
return this.next.isKeywordAs();
}
expectCharacter(e) {
this.consumeOptionalCharacter(e) || this.error(`Missing expected ${String.fromCharCode(e)}`);
}
consumeOptionalOperator(e) {
return this.next.isOperator(e) ? (this.advance(), !0) : !1;
}
isAssignmentOperator(e) {
return e.type === f.Operator && E.isAssignmentOperation(e.strValue);
}
expectOperator(e) {
this.consumeOptionalOperator(e) || this.error(`Missing expected operator ${e}`);
}
prettyPrintToken(e) {
return e === Se ? "end of input" : `token ${e}`;
}
expectIdentifierOrKeyword() {
let e = this.next;
return !e.isIdentifier() && !e.isKeyword() ? (e.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(e, "expected identifier or keyword") : this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`), null) : (this.advance(), e.toString());
}
expectIdentifierOrKeywordOrString() {
let e = this.next;
return !e.isIdentifier() && !e.isKeyword() && !e.isString() ? (e.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(e, "expected identifier, keyword or string") : this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`), "") : (this.advance(), e.toString());
}
parseChain() {
let e = [], n = this.inputIndex;
for (; this.index < this.tokens.length; ) {
let s = this.parsePipe();
if (e.push(s), this.consumeOptionalCharacter(Ee)) for (this.parseFlags & 1 || this.error("Binding expression cannot contain chained expression"); this.consumeOptionalCharacter(Ee); ) ;
else if (this.index < this.tokens.length) {
let r = this.index;
if (this.error(`Unexpected token '${this.next}'`), this.index === r) break;
}
}
if (e.length === 0) {
let s = this.offset, r = this.offset + this.input.length;
return new A(this.span(s, r), this.sourceSpan(s, r));
}
return e.length == 1 ? e[0] : new It(this.span(n), this.sourceSpan(n), e);
}
parsePipe() {
let e = this.inputIndex, n = this.parseExpression();
if (this.consumeOptionalOperator("|")) {
this.parseFlags & 1 && this.error("Cannot have a pipe in an action expression");
do {
let s = this.inputIndex, r = this.expectIdentifierOrKeyword(), i, a;
r !== null ? i = this.sourceSpan(s) : (r = "", a = this.next.index !== -1 ? this.next.index : this.input.length + this.offset, i = new K(a, a).toAbsolute(this.absoluteOffset));
let p = [];
for (; this.consumeOptionalCharacter(J); ) p.push(this.parseExpression());
let h;
if (this.supportsDirectPipeReferences) {
let d = r.charCodeAt(0);
h = d === Ze || d >= en && d <= tn ? Ce.ReferencedDirectly : Ce.ReferencedByName;
} else h = Ce.ReferencedByName;
n = new Mt(this.span(e), this.sourceSpan(e, a), n, r, p, h, i);
} while (this.consumeOptionalOperator("|"));
}
return n;
}
parseExpression() {
return this.parseConditional();
}
parseConditional() {
let e = this.inputIndex, n = this.parseLogicalOr();
if (this.consumeOptionalOperator("?")) {
let s = this.parsePipe(), r;
if (this.consumeOptionalCharacter(J)) r = this.parsePipe();
else {
let i = this.inputIndex, a = this.input.substring(e, i);
this.error(`Conditional expression ${a} requires all 3 expressions`), r = new A(this.span(e), this.sourceSpan(e));
}
return new Nt(this.span(e), this.sourceSpan(e), n, s, r);
} else return n;
}
parseLogicalOr() {
let e = this.inputIndex, n = this.parseLogicalAnd();
for (; this.consumeOptionalOperator("||"); ) {
let s = this.parseLogicalAnd();
n = new E(this.span(e), this.sourceSpan(e), "||", n, s);
}
return n;
}
parseLogicalAnd() {
let e = this.inputIndex, n = this.parseNullishCoalescing();
for (; this.consumeOptionalOperator("&&"); ) {
let s = this.parseNullishCoalescing();
n = new E(this.span(e), this.sourceSpan(e), "&&", n, s);
}
return n;
}
parseNullishCoalescing() {
let e = this.inputIndex, n = this.parseEquality();
for (; this.consumeOptionalOperator("??"); ) {
let s = this.parseEquality();
n = new E(this.span(e), this.sourceSpan(e), "??", n, s);
}
return n;
}
parseEquality() {
let e = this.inputIndex, n = this.parseRelational();
for (; this.next.type == f.Operator; ) {
let s = this.next.strValue;
switch (s) {
case "==":
case "===":
case "!=":
case "!==":
this.advance();
let r = this.parseRelational();
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
continue;
}
break;
}
return n;
}
parseRelational() {
let e = this.inputIndex, n = this.parseAdditive();
for (; this.next.type == f.Operator || this.next.isKeywordIn() || this.next.isKeywordInstanceOf(); ) {
let s = this.next.strValue;
switch (s) {
case "<":
case ">":
case "<=":
case ">=":
case "in":
case "instanceof":
this.advance();
let r = this.parseAdditive();
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
continue;
}
break;
}
return n;
}
parseAdditive() {
let e = this.inputIndex, n = this.parseMultiplicative();
for (; this.next.type == f.Operator; ) {
let s = this.next.strValue;
switch (s) {
case "+":
case "-":
this.advance();
let r = this.parseMultiplicative();
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
continue;
}
break;
}
return n;
}
parseMultiplicative() {
let e = this.inputIndex, n = this.parseExponentiation();
for (; this.next.type == f.Operator; ) {
let s = this.next.strValue;
switch (s) {
case "*":
case "%":
case "/":
this.advance();
let r = this.parseExponentiation();
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
continue;
}
break;
}
return n;
}
parseExponentiation() {
let e = this.inputIndex, n = this.parsePrefix();
for (; this.next.type == f.Operator && this.next.strValue === "**"; ) {
(n instanceof _e || n instanceof Ve || n instanceof Ue || n instanceof He) && this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"), this.advance();
let s = this.parseExponentiation();
n = new E(this.span(e), this.sourceSpan(e), "**", n, s);
}
return n;
}
parsePrefix() {
if (this.next.type == f.Operator) {
let e = this.inputIndex, n = this.next.strValue, s;
switch (n) {
case "+":
return this.advance(), s = this.parsePrefix(), _e.createPlus(this.span(e), this.sourceSpan(e), s);
case "-":
return this.advance(), s = this.parsePrefix(), _e.createMinus(this.span(e), this.sourceSpan(e), s);
case "!":
return this.advance(), s = this.parsePrefix(), new Ve(this.span(e), this.sourceSpan(e), s);
}
} else if (this.next.isKeywordTypeof()) {
let e = this.inputIndex;
this.advance();
let n = this.parsePrefix();
return new Ue(this.span(e), this.sourceSpan(e), n);
} else if (this.next.isKeywordVoid()) {
let e = this.inputIndex;
this.advance();
let n = this.parsePrefix();
return new He(this.span(e), this.sourceSpan(e), n);
}
return this.parseCallChain();
}
parseCallChain() {
let e = this.inputIndex, n = this.parsePrimary();
for (; ; ) if (this.consumeOptionalCharacter(z)) n = this.parseAccessMember(n, e, !1);
else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(X) ? n = this.parseCall(n, e, !0) : n = this.consumeOptionalCharacter(ie) ? this.parseKeyedReadOrWrite(n, e, !0) : this.parseAccessMember(n, e, !0);
else if (this.consumeOptionalCharacter(ie)) n = this.parseKeyedReadOrWrite(n, e, !1);
else if (this.consumeOptionalCharacter(X)) n = this.parseCall(n, e, !1);
else if (this.consumeOptionalOperator("!")) n = new Dt(this.span(e), this.sourceSpan(e), n);
else if (this.next.isTemplateLiteralEnd()) n = this.parseNoInterpolationTaggedTemplateLiteral(n, e);
else if (this.next.isTemplateLiteralPart()) n = this.parseTaggedTemplateLiteral(n, e);
else return n;
}
parsePrimary() {
let e = this.inputIndex;
if (this.isArrowFunction()) return this.parseArrowFunction(e);
if (this.consumeOptionalCharacter(X)) {
this.rparensExpected++;
let n = this.parsePipe();
return this.consumeOptionalCharacter(N) || (this.error("Missing closing parentheses"), this.consumeOptionalCharacter(N)), this.rparensExpected--, new Ie(this.span(e), this.sourceSpan(e), n);
} else {
if (this.next.isKeywordNull()) return this.advance(), new I(this.span(e), this.sourceSpan(e), null);
if (this.next.isKeywordUndefined()) return this.advance(), new I(this.span(e), this.sourceSpan(e), void 0);
if (this.next.isKeywordTrue()) return this.advance(), new I(this.span(e), this.sourceSpan(e), !0);
if (this.next.isKeywordFalse()) return this.advance(), new I(this.span(e), this.sourceSpan(e), !1);
if (this.next.isKeywordIn()) return this.advance(), new I(this.span(e), this.sourceSpan(e), "in");
if (this.next.isKeywordThis()) return this.advance(), new At(this.span(e), this.sourceSpan(e));
if (this.consumeOptionalCharacter(ie)) return this.parseLiteralArray(e);
if (this.next.isCharacter(ke)) return this.parseLiteralMap();
if (this.next.isIdentifier()) return this.parseAccessMember(new ce(this.span(e), this.sourceSpan(e)), e, !1);
if (this.next.isNumber()) {
let n = this.next.toNumber();
return this.advance(), new I(this.span(e), this.sourceSpan(e), n);
} else {
if (this.next.isTemplateLiteralEnd()) return this.parseNoInterpolationTemplateLiteral();
if (this.next.isTemplateLiteralPart()) return this.parseTemplateLiteral();
if (this.next.isString() && this.next.kind === H.Plain) {
let n = this.next.toString();
return this.advance(), new I(this.span(e), this.sourceSpan(e), n);
} else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new A(this.span(e), this.sourceSpan(e))) : this.next.isRegExpBody() ? this.parseRegularExpressionLiteral() : this.index >= this.tokens.length ? (this.error(`Unexpected end of expression: ${this.input}`), new A(this.span(e), this.sourceSpan(e))) : (this.error(`Unexpected token ${this.next}`), new A(this.span(e), this.sourceSpan(e)));
}
}
}
parseLiteralArray(e) {
this.rbracketsExpected++;
let n = [];
do
if (this.next.isOperator("...")) n.push(this.parseSpreadElement());
else if (!this.next.isCharacter(Q)) n.push(this.parsePipe());
else break;
while (this.consumeOptionalCharacter(F));
return this.rbracketsExpected--, this.expectCharacter(Q), new Rt(this.span(e), this.sourceSpan(e), n);
}
parseLiteralMap() {
let e = [], n = [], s = this.inputIndex;
if (this.expectCharacter(ke), !this.consumeOptionalCharacter(ne)) {
this.rbracesExpected++;
do {
let r = this.inputIndex;
if (this.next.isOperator("...")) {
this.advance(), e.push({ kind: "spread", span: this.span(r), sourceSpan: this.sourceSpan(r) }), n.push(this.parsePipe());
continue;
}
let i = this.next.isString(), a = this.expectIdentifierOrKeywordOrString(), p = this.span(r), h = this.sourceSpan(r), d = { kind: "property", key: a, quoted: i, span: p, sourceSpan: h };
e.push(d), i ? (this.expectCharacter(J), n.push(this.parsePipe())) : this.consumeOptionalCharacter(J) ? n.push(this.parsePipe()) : (d.isShorthandInitialized = !0, n.push(new ye(p, h, h, new ce(p, h), a)));
} while (this.consumeOptionalCharacter(F) && !this.next.isCharacter(ne));
this.rbracesExpected--, this.expectCharacter(ne);
}
return new Ot(this.span(s), this.sourceSpan(s), e, n);
}
parseAccessMember(e, n, s) {
let r = this.inputIndex, i = this.withContext(se.Writable, () => {
let p = this.expectIdentifierOrKeyword() ?? "";
return p.length === 0 && this.error("Expected identifier for property access", e.span.end), p;
}), a = this.sourceSpan(r);
if (s) return this.isAssignmentOperator(this.next) ? (this.advance(), this.error("The '?.' operator cannot be used in the assignment"), new A(this.span(n), this.sourceSpan(n))) : new Pt(this.span(n), this.sourceSpan(n), a, e, i);
if (this.isAssignmentOperator(this.next)) {
let p = this.next.strValue;
if (!(this.parseFlags & 1)) return this.advance(), this.error("Bindings cannot contain assignments"), new A(this.span(n), this.sourceSpan(n));
let h = new ye(this.span(n), this.sourceSpan(n), a, e, i);
this.advance();
let d = this.parseConditional();
return new E(this.span(n), this.sourceSpan(n), p, h, d);
} else return new ye(this.span(n), this.sourceSpan(n), a, e, i);
}
parseCall(e, n, s) {
let r = this.inputIndex;
this.rparensExpected++;
let i = this.parseCallArguments(), a = this.span(r, this.inputIndex).toAbsolute(this.absoluteOffset);
this.expectCharacter(N), this.rparensExpected--;
let p = this.span(n), h = this.sourceSpan(n);
return s ? new Ft(p, h, e, i, a) : new Bt(p, h, e, i, a);
}
parseCallArguments() {
if (this.next.isCharacter(N)) return [];
let e = [];
do
e.push(this.next.isOperator("...") ? this.parseSpreadElement() : this.parsePipe());
while (this.consumeOptionalCharacter(F));
return e;
}
parseSpreadElement() {
this.next.isOperator("...") || this.error("Spread element must start with '...' operator");
let e = this.inputIndex;
this.advance();
let n = this.parsePipe(), s = this.span(e), r = this.sourceSpan(e);
return new $t(s, r, n);
}
expectTemplateBindingKey() {
let e = "", n = !1, s = this.currentAbsoluteOffset;
do
e += this.expectIdentifierOrKeywordOrString(), n = this.consumeOptionalOperator("-"), n && (e += "-");
while (n);
return { source: e, span: new O(s, s + e.length) };
}
parseTemplateBindings(e) {
let n = [];
for (n.push(...this.parseDirectiveKeywordBindings(e)); this.index < this.tokens.length; ) {
let s = this.parseLetBinding();
if (s) n.push(s);
else {
let r = this.expectTemplateBindingKey(), i = this.parseAsBinding(r);
i ? n.push(i) : (r.source = e.source + r.source.charAt(0).toUpperCase() + r.source.substring(1), n.push(...this.parseDirectiveKeywordBindings(r)));
}
this.consumeStatementTerminator();
}
return new Qt(n, [], this.errors);
}
parseKeyedReadOrWrite(e, n, s) {
return this.withContext(se.Writable, () => {
this.rbracketsExpected++;
let r = this.parsePipe();
if (r instanceof A && this.error("Key access cannot be empty"), this.rbracketsExpected--, this.expectCharacter(Q), this.isAssignmentOperator(this.next)) {
let i = this.next.strValue;
if (s) this.advance(), this.error("The '?.' operator cannot be used in the assignment");
else {
let a = new Fe(this.span(n), this.sourceSpan(n), e, r);
this.advance();
let p = this.parseConditional();
return new E(this.span(n), this.sourceSpan(n), i, a, p);
}
} else return s ? new Lt(this.span(n), this.sourceSpan(n), e, r) : new Fe(this.span(n), this.sourceSpan(n), e, r);
return new A(this.span(n), this.sourceSpan(n));
});
}
parseDirectiveKeywordBindings(e) {
let n = [];
this.consumeOptionalCharacter(J);
let s = this.getDirectiveBoundTarget(), r = this.currentAbsoluteOffset, i = this.parseAsBinding(e);
i || (this.consumeStatementTerminator(), r = this.currentAbsoluteOffset);
let a = new O(e.span.start, r);
return n.push(new Ne(a, e, s)), i && n.push(i), n;
}
getDirectiveBoundTarget() {
if (this.next === Se || this.peekKeywordAs() || this.peekKeywordLet()) return null;
let e = this.parsePipe(), { start: n, end: s } = e.span, r = this.input.substring(n, s);
return new U(e, r, V(this.parseSourceSpan), this.absoluteOffset + n, this.errors);
}
parseAsBinding(e) {
if (!this.peekKeywordAs()) return null;
this.advance();
let n = this.expectTemplateBindingKey();
this.consumeStatementTerminator();
let s = new O(e.span.start, this.currentAbsoluteOffset);
return new ue(s, n, e);
}
parseLetBinding() {
if (!this.peekKeywordLet()) return null;
let e = this.currentAbsoluteOffset;
this.advance();
let n = this.expectTemplateBindingKey(), s = null;
this.consumeOptionalOperator("=") && (s = this.expectTemplateBindingKey()), this.consumeStatementTerminator();
let r = new O(e, this.currentAbsoluteOffset);
return new ue(r, n, s);
}
parseNoInterpolationTaggedTemplateLiteral(e, n) {
let s = this.parseNoInterpolationTemplateLiteral();
return new We(this.span(n), this.sourceSpan(n), e, s);
}
parseNoInterpolationTemplateLiteral() {
let e = this.next.strValue, n = this.inputIndex;
this.advance();
let s = this.span(n), r = this.sourceSpan(n);
return new qe(s, r, [new je(s, r, e)], []);
}
parseTaggedTemplateLiteral(e, n) {
let s = this.parseTemplateLiteral();
return new We(this.span(n), this.sourceSpan(n), e, s);
}
parseTemplateLiteral() {
let e = [], n = [], s = this.inputIndex;
for (; this.next !== Se; ) {
let r = this.next;
if (r.isTemplateLiteralPart() || r.isTemplateLiteralEnd()) {
let i = this.inputIndex;
if (this.advance(), e.push(new je(this.span(i), this.sourceSpan(i), r.strValue)), r.isTemplateLiteralEnd()) break;
} else if (r.isTemplateLiteralInterpolationStart()) {
this.advance(), this.rbracesExpected++;
let i = this.parsePipe();
i instanceof A ? this.error("Template literal interpolation cannot be empty") : n.push(i), this.rbracesExpected--;
} else this.advance();
}
return new qe(this.span(s), this.sourceSpan(s), e, n);
}
parseRegularExpressionLiteral() {
let e = this.next;
if (this.advance(), !e.isRegExpBody()) return new A(this.span(this.inputIndex), this.sourceSpan(this.inputIndex));
let n = null;
if (this.next.isRegExpFlags()) {
n = this.next, this.advance();
let i = /* @__PURE__ */ new Set();
for (let a = 0; a < n.strValue.length; a++) {
let p = n.strValue[a];
ps.has(p) ? i.has(p) ? this.error(`Duplicate regular expression flag "${p}"`, n.index + a) : i.add(p) : this.error(`Unsupported regular expression flag "${p}". The supported flags are: ` + Array.from(ps, (h) => `"${h}"`).join(", "), n.index + a);
}
}
let s = e.index, r = n ? n.end : e.end;
return new Ht(this.span(s, r), this.sourceSpan(s, r), e.strValue, n ? n.strValue : null);
}
parseArrowFunction(e) {
let n;
if (this.next.isIdentifier()) {
let r = this.next;
this.advance(), n = [this.getArrowFunctionIdentifierArg(r)];
} else this.next.isCharacter(X) ? (this.rparensExpected++, this.advance(), n = this.parseArrowFunctionParameters(), this.rparensExpected--) : (n = [], this.error(`Unexpected token ${this.next}`));
this.expectOperator("=>");
let s;
if (this.next.isCharacter(ke)) this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."), s = new A(this.span(e), this.sourceSpan(e));
else {
let r = this.parseFlags;
this.parseFlags = 1, s = this.parseExpression(), this.parseFlags = r;
}
return new Ut(this.span(e), this.sourceSpan(e), n, s);
}
parseArrowFunctionParameters() {
let e = [];
if (!this.consumeOptionalCharacter(N)) for (; this.next !== Se; ) if (this.next.isIdentifier()) {
let n = this.next;
if (this.advance(), e.push(this.getArrowFunctionIdentifierArg(n)), this.consumeOptionalCharacter(N)) break;
this.expectCharacter(F);
} else {
this.error(`Unexpected token ${this.next}`);
break;
}
return e;
}
getArrowFunctionIdentifierArg(e) {
return new Vt(e.strValue, this.span(e.index), this.sourceSpan(e.index));
}
isArrowFunction() {
let e = this.index, n = this.tokens;
if (e > n.length - 2) return !1;
if (n[e].isIdentifier() && n[e + 1].isOperator("=>")) return !0;
if (n[e].isCharacter(X)) {
let s = e + 1;
for (s; s < n.length && !(!n[s].isIdentifier() && !n[s].isCharacter(F)); s++) ;
return s < n.length - 1 && n[s].isCharacter(N) && n[s + 1].isOperator("=>");
}
return !1;
}
consumeStatementTerminator() {
this.consumeOptionalCharacter(Ee) || this.consumeOptionalCharacter(F);
}
error(e, n = this.index) {
this.errors.push(re(e, this.input, this.getErrorLocationText(n), this.parseSourceSpan)), this.skip();
}
getErrorLocationText(e) {
return e < this.tokens.length ? `at column ${this.tokens[e].index + 1} in` : "at the end of the expression";
}
_reportErrorForPrivateIdentifier(e, n) {
let s = `Private identifiers are not supported. Unexpected private identifier: ${e}`;
n !== null && (s += `, ${n}`), this.error(s);
}
skip() {
let e = this.next;
for (; this.index < this.tokens.length && !e.isCharacter(Ee) && !e.isOperator("|") && (this.rparensExpected <= 0 || !e.isCharacter(N)) && (this.rbracesExpected <= 0 || !e.isCharacter(ne)) && (this.rbracketsExpected <= 0 || !e.isCharacter(Q)) && (!(this.context & se.Writable) || !this.isAssignmentOperator(e)); ) this.next.isError() && this.errors.push(re(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan)), this.advance(), e = this.next;
}
};
Kt = class extends Wt {
errors = [];
visitPipe() {
this.errors.push("pipes");
}
};
Di = new Map(Object.entries({ class: "className", for: "htmlFor", formaction: "formAction", innerHtml: "innerHTML", readonly: "readOnly", tabindex: "tabIndex", "aria-activedescendant": "ariaActiveDescendantElement", "aria-atomic": "ariaAtomic", "aria-autocomplete": "ariaAutoComplete", "aria-busy": "ariaBusy", "aria-checked": "ariaChecked", "aria-colcount": "ariaColCount", "aria-colindex": "ariaColIndex", "aria-colindextext": "ariaColIndexText", "aria-colspan": "ariaColSpan", "aria-controls": "ariaControlsElements", "aria-current": "ariaCurrent", "aria-describedby": "ariaDescribedByElements", "aria-description": "ariaDescription", "aria-details": "ariaDetailsElements", "aria-disabled": "ariaDisabled", "aria-errormessage": "ariaErrorMessageElements", "aria-expanded": "ariaExpanded", "aria-flowto": "ariaFlowToElements", "aria-haspopup": "ariaHasPopup", "aria-hidden": "ariaHidden", "aria-invalid": "ariaInvalid", "aria-keyshortcuts": "ariaKeyShortcuts", "aria-label": "ariaLabel", "aria-labelledby": "ariaLabelledByElements", "aria-level": "ariaLevel", "aria-live": "ariaLive", "aria-modal": "ariaModal", "aria-multiline": "ariaMultiLine", "aria-multiselectable": "ariaMultiSelectable", "aria-orientation": "ariaOrientation", "aria-owns": "ariaOwnsElements", "aria-placeholder": "ariaPlaceholder", "aria-posinset": "ariaPosInSet", "aria-pressed": "ariaPressed", "aria-readonly": "ariaReadOnly", "aria-required": "ariaRequired", "aria-roledescription": "ariaRoleDescription", "aria-rowcount": "ariaRowCount", "aria-rowindex": "ariaRowIndex", "aria-rowindextext": "ariaRowIndexText", "aria-rowspan": "ariaRowSpan", "aria-selected": "ariaSelected", "aria-setsize": "ariaSetSize", "aria-sort": "ariaSort", "aria-valuemax": "ariaValueMax", "aria-valuemin": "ariaValueMin", "aria-valuenow": "ariaValueNow", "aria-valuetext": "ariaValueText" })), Ro = Array.from(Di).reduce((t29, [e, n]) => (t29.set(e, n), t29), /* @__PURE__ */ new Map()), $o = new he(new Le());
Oo = [{ test: L(l.StyleMap), transform: Ke }, { test: L(l.ClassMap), transform: Ke }, { test: L(l.StyleProp) }, { test: L(l.ClassProp) }, { test: be(l.Attribute, !0) }, { test: be(l.Property, !0) }, { test: Bi }, { test: be(l.Attribute, !1) }, { test: L(l.Control) }], Do = [{ test: be(l.DomProperty, !0) }, { test: be(l.DomProperty, !1) }, { test: L(l.Attribute) }, { test: L(l.StyleMap), transform: Ke }, { test: L(l.ClassMap), transform: Ke }, { test: L(l.StyleProp) }, { test: L(l.ClassProp) }], Bo = /* @__PURE__ */ new Set([l.Listener, l.TwoWayListener, l.AnimationListener, l.StyleMap, l.ClassMap, l.StyleProp, l.ClassProp, l.Property, l.TwoWayProperty, l.DomProperty, l.Attribute, l.Animation, l.Control]);
Fo = /* @__PURE__ */ new Map([[$.Idle, { none: c.deferOnIdle, prefetch: c.deferPrefetchOnIdle, hydrate: c.deferHydrateOnIdle }], [$.Immediate, { none: c.deferOnImmediate, prefetch: c.deferPrefetchOnImmediate, hydrate: c.deferHydrateOnImmediate }], [$.Timer, { none: c.deferOnTimer, prefetch: c.deferPrefetchOnTimer, hydrate: c.deferHydrateOnTimer }], [$.Hover, { none: c.deferOnHover, prefetch: c.deferPrefetchOnHover, hydrate: c.deferHydrateOnHover }], [$.Interaction, { none: c.deferOnInteraction, prefetch: c.deferPrefetchOnInteraction, hydrate: c.deferHydrateOnInteraction }], [$.Viewport, { none: c.deferOnViewport, prefetch: c.deferPrefetchOnViewport, hydrate: c.deferHydrateOnViewport }], [$.Never, { none: c.deferHydrateNever, prefetch: c.deferHydrateNever, hydrate: c.deferHydrateNever }]]), Vo = [c.pipeBind1, c.pipeBind2, c.pipeBind3, c.pipeBind4], Uo = { constant: [c.interpolate, c.interpolate1, c.interpolate2, c.interpolate3, c.interpolate4, c.interpolate5, c.interpolate6, c.interpolate7, c.interpolate8], variable: c.interpolateV, mapping: (t29) => {
if (t29 % 2 === 0) throw new Error("Expected odd number of arguments");
return (t29 - 1) / 2;
} }, Ho = /* @__PURE__ */ new Map([["window", c.resolveWindow], ["document", c.resolveDocument], ["body", c.resolveBody]]), Wo = /* @__PURE__ */ new Map([[P.HTML, c.sanitizeHtml], [P.RESOURCE_URL, c.sanitizeResourceUrl], [P.SCRIPT, c.sanitizeScript], [P.STYLE, c.sanitizeStyle], [P.URL, c.sanitizeUrl], [P.ATTRIBUTE_NO_BINDING, c.validateAttribute]]), qo = /* @__PURE__ */ new Map([[P.HTML, c.trustConstantHtml], [P.RESOURCE_URL, c.trustConstantResourceUrl]]);
(function(t29) {
t29[t29.None = 0] = "None", t29[t29.ViewContextRead = 1] = "ViewContextRead", t29[t29.ViewContextWrite = 2] = "ViewContextWrite", t29[t29.SideEffectful = 4] = "SideEffectful";
})(hs || (hs = {}));
jo = /* @__PURE__ */ new Set([l.Container, l.ContainerStart, l.ContainerEnd, l.Element, l.ElementStart, l.ElementEnd, l.Template]), zo = /* @__PURE__ */ new Map([[M.Property, R.Property], [M.TwoWay, R.TwoWayProperty], [M.Attribute, R.Attribute], [M.Class, R.ClassName], [M.Style, R.StyleProperty], [M.LegacyAnimation, R.LegacyAnimation], [M.Animation, R.Animation]]);
(function(t29) {
t29[t29.NG_CONTENT = 0] = "NG_CONTENT", t29[t29.STYLE = 1] = "STYLE", t29[t29.STYLESHEET = 2] = "STYLESHEET", t29[t29.SCRIPT = 3] = "SCRIPT", t29[t29.OTHER = 4] = "OTHER";
})(fs || (fs = {}));
(function(t29) {
t29.IDLE = "idle", t29.TIMER = "timer", t29.INTERACTION = "interaction", t29.IMMEDIATE = "immediate", t29.HOVER = "hover", t29.VIEWPORT = "viewport", t29.NEVER = "never";
})(ds || (ds = {}));
Ns = "%COMP%", Xo = `_nghost-${Ns}`, Jo = `_ngcontent-${Ns}`;
(function(t29) {
t29[t29.Extract = 0] = "Extract", t29[t29.Merge = 1] = "Merge";
})(ms || (ms = {}));
(function(t29) {
t29[t29.Selector = 0] = "Selector", t29[t29.HostDirective = 1] = "HostDirective";
})(gs || (gs = {}));
Yo = new bt("21.2.8"), Fi = "test.html";
Ui = (t29) => he.prototype._commentStart(t29);
tt = (t29) => (e) => {
let n = Ps(e);
return Ms({ ...n, result: Ls()[t29](e, n.sourceSpan, 0), comments: Hi(e) });
}, Rs = tt("parseAction"), $s = tt("parseBinding"), Os = tt("parseSimpleBinding"), Ds = tt("parseInterpolationExpression"), Bs = (t29) => {
let e = Ps(t29);
return Ms({ ...e, result: Ls().parseTemplateBindings("", t29, e.sourceSpan, 0, 0), comments: [] });
}, nt = class {
text;
constructor(t29) {
this.text = t29;
}
getCharacterIndex(t29, e) {
return Sn(this.text, t29, e);
}
transformSpan(t29) {
return Re(t29);
}
createNode(t29, e) {
let n = t29.start, s = t29.end, r = t29.range;
if (e && (Array.isArray(e) ? ([n, s] = e, r = e) : ({ start: n, end: s } = e.sourceSpan ?? e, r = [n, s])), r ? [n, s] = r : typeof n == "number" && typeof s == "number" && (r = [n, s]), !(typeof n == "number" && typeof s == "number" && r)) throw new Error("Missing location information");
let i = { ...t29, start: n, end: s, range: r };
switch (i.type) {
case "NumericLiteral":
case "StringLiteral":
case "RegExpLiteral": {
let a = this.text.slice(n, s), { value: p } = i;
i.extra = { ...i.extra, raw: a, rawValue: p };
break;
}
}
return i;
}
}, Fs = Object.defineProperty, Vs = (t29, e) => {
let n = {};
for (var s in t29) Fs(n, s, { get: t29[s], enumerable: !0 });
return e && Fs(n, Symbol.toStringTag, { value: "Module" }), n;
}, Us = (t29, e) => ({ type: "ArrayExpression", elements: e.transformChildren(t29.expressions) }), Wi = { id: null, generator: !1, async: !1, expression: !0 }, Hs = (t29, e) => ({ type: "ArrowFunctionExpression", params: t29.parameters.map((n) => e.createNode({ type: "Identifier", name: n.name }, n.sourceSpan)), body: e.transformChild(t29.body), ...Wi }), Ws = (t29, e) => e.transformChild(t29.ast), qi = (t29) => t29 === "&&" || t29 === "||" || t29 === "??", qs = (t29, e) => {
let { operation: n } = t29, [s, r] = e.transformChildren([t29.left, t29.right]);
return qi(n) ? { type: "LogicalExpression", operator: n, left: s, right: r } : E.isAssignmentOperation(n) ? { type: "AssignmentExpression", left: s, right: r, operator: n } : { left: s, right: r, type: "BinaryExpression", operator: n };
}, ji = { optional: !1 }, zi = { optional: !0 }, js = ({ optional: t29 }) => (e, n) => {
let s = n.transformChildren(e.args), r = n.transformChild(e.receiver);
return t29 || ve(r) ? { type: "OptionalCallExpression", callee: r, arguments: s, optional: t29 } : { type: "CallExpression", callee: r, arguments: s };
}, zs = js(ji), Gs = js(zi), Xs = (t29, e) => ({ type: "NGChainedExpression", expressions: e.transformChildren(t29.expressions) }), Js = (t29, e) => {
let [n, s, r] = e.transformChildren([t29.condition, t29.trueExp, t29.falseExp]);
return { type: "ConditionalExpression", test: n, consequent: s, alternate: r };
}, Ys = () => ({ type: "NGEmptyExpression" }), Qs = (t29, e) => {
let { expressions: n } = t29;
if (n.length !== 1) throw new Error("Unexpected 'Interpolation'");
return e.transformChild(n[0]);
}, Ks = (t29) => {
let { value: e } = t29;
switch (typeof e) {
case "boolean":
return { type: "BooleanLiteral", value: e };
case "number":
return { type: "NumericLiteral", value: e };
case "object":
return { type: "NullLiteral" };
case "string":
return { type: "StringLiteral", value: e };
case "undefined":
return { type: "Identifier", name: "undefined" };
default:
throw new Error(`Unexpected 'LiteralPrimitive' value type ${typeof e}`);
}
}, Zs = (t29) => ({ type: "RegExpLiteral", pattern: t29.body, flags: t29.flags ?? "" }), Gi = { computed: !0, optional: !1 }, Xi = { computed: !0, optional: !0 }, Ji = { computed: !1, optional: !1 }, Yi = { computed: !1, optional: !0 }, st = ({ computed: t29, optional: e }) => (n, s) => {
let { receiver: r } = n, i;
if (t29) {
let { key: p } = n;
i = s.transformChild(p);
} else {
let p = r instanceof ce, { name: h, nameSpan: d } = n;
if (i = s.create({ type: "Identifier", name: h }, d, p ? s.ancestors : []), p) return i;
}
let a = s.transformChild(r);
return e || ve(a) ? { type: "OptionalMemberExpression", optional: e, property: i, object: a, computed: t29 } : { type: "MemberExpression", property: i, object: a, computed: t29 };
}, er = st(Gi), tr = st(Xi), nr = st(Ji), sr = st(Yi), rr = (t29, e) => ({ type: "TSNonNullExpression", expression: e.transformChild(t29.expression) }), ir = (t29, e) => {
let { keys: n, values: s } = t29, r = (i, a = t29) => e.create(i, a, [t29, ...e.ancestors]);
return { type: "ObjectExpression", properties: n.map((i, a) => {
let p = s[a], h = [i.sourceSpan.start, p.sourceSpan.end];
if (i.kind === "spread") return r({ type: "SpreadElement", argument: e.transformChild(p) }, h);
let d = !!i.isShorthandInitialized;
return r({ type: "ObjectProperty", key: r(i.quoted ? { type: "StringLiteral", value: i.key } : { type: "Identifier", name: i.key }, i.sourceSpan), value: e.transformChild(p), shorthand: d, computed: !1, method: !1 }, h);
}) };
}, or = (t29, e) => e.transformChild(t29.expression), ar = (t29, e) => ({ type: "NGPipeExpression", left: e.transformChild(t29.exp), right: e.create({ type: "Identifier", name: t29.name }, t29.nameSpan), arguments: e.transformChildren(t29.args) }), lr = (t29, e) => ({ type: "SpreadElement", argument: e.transformChild(t29.expression) }), cr = (t29, e) => ({ type: "TaggedTemplateExpression", tag: e.transformChild(t29.tag), quasi: e.transformChild(t29.template) }), ur = (t29, e) => ({ type: "TemplateLiteral", quasis: e.transformChildren(t29.elements), expressions: e.transformChildren(t29.expressions) }), pr = (t29, e) => {
let [n] = e.ancestors, { elements: s } = n, r = s.indexOf(t29), i = r === 0, a = r === s.length - 1, p = t29.sourceSpan.end - (a ? 1 : 0), h = t29.sourceSpan.start + (i ? 1 : 0), d = e.text.slice(h, p);
return { type: "TemplateElement", value: { cooked: t29.text, raw: d }, tail: a, range: [h, p] };
}, hr = () => ({ type: "ThisExpression" }), sn = (t29) => (e, n) => ({ type: "UnaryExpression", prefix: !0, operator: t29, argument: n.transformChild(e.expression) }), fr = sn("!"), dr = sn("typeof"), mr = sn("void"), gr = (t29, e) => ({ type: "UnaryExpression", prefix: !0, argument: e.transformChild(t29.expr), operator: t29.operator }), Qi = (t29) => {
throw new Error(`Unexpected node type '${t29.constructor.name}'`);
}, vr = Qi, wr = Vs({ visitASTWithSource: () => Ws, visitArrowFunction: () => Hs, visitBinary: () => qs, visitCall: () => zs, visitChain: () => Xs, visitConditional: () => Js, visitEmptyExpr: () => Ys, visitImplicitReceiver: () => vr, visitInterpolation: () => Qs, visitKeyedRead: () => er, visitLiteralArray: () => Us, visitLiteralMap: () => ir, visitLiteralPrimitive: () => Ks, visitNonNullAssert: () => rr, visitParenthesizedExpression: () => or, visitPipe: () => ar, visitPrefixNot: () => fr, visitPropertyRead: () => nr, visitRegularExpressionLiteral: () => Zs, visitSafeCall: () => Gs, visitSafeKeyedRead: () => tr, visitSafePropertyRead: () => sr, visitSpreadElement: () => lr, visitTaggedTemplateLiteral: () => cr, visitTemplateLiteral: () => ur, visitTemplateLiteralElement: () => pr, visitThisReceiver: () => hr, visitTypeofExpression: () => dr, visitUnary: () => gr, visitVoidExpression: () => mr }), xr = wr, rt = class rn extends nt {
node;
ancestors;
constructor({ node: e, text: n, ancestors: s = [] }) {
super(n), this.node = e, this.ancestors = s;
}
create(e, n, s = this.ancestors) {
return s[0] instanceof Ie && (e.extra = { ...e.extra, parenthesized: !0 }), super.createNode(e, e.range ?? n ?? this.node);
}
transformChild(e) {
return new rn({ node: e, ancestors: [this.node, ...this.ancestors], text: this.text }).transform();
}
transformChildren(e) {
return e.map((n) => this.transformChild(n));
}
transform() {
let { node: e } = this, n = e.visit(xr, this);
return this.create(n, this.node);
}
static transform(e, n) {
return new rn({ node: e, text: n, ancestors: [] }).transform();
}
}, Sr = class extends rt {
constructor(t29) {
super({ node: t29, text: t29.source });
}
}, Er = (t29, e) => rt.transform(t29, e), yr = (t29) => new Sr(t29).transform(), Cr = (t29, e) => (n, s, ...r) => n | 1 && s == null ? void 0 : (e.call(s) ?? s[t29]).apply(s, r);
Zi = Cr("at", function() {
if (Array.isArray(this) || typeof this == "string") return Ki;
}), _r = Zi;
eo = (me = class extends nt {
constructor(n, s) {
super(s), Me(this, m), Me(this, de), Me(this, te), ct(this, de, n), ct(this, te, s);
for (let r of n) v(this, m, Ar).call(this, r);
}
get expressions() {
return v(this, m, Nr).call(this);
}
}, de = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakSet(), br = function() {
return j(this, de)[0].key;
}, _ = function(n, s) {
return wn(me.prototype, this, "createNode").call(this, n, s);
}, on = function(n) {
return Er(n, this.text);
}, an = function(n) {
return En(n.slice(j(this, m, br).source.length));
}, ln = function(n) {
let s = j(this, te);
if (s[n.start] !== '"' && s[n.start] !== "'") return;
let r = s[n.start], i = !1;
for (let a = n.start + 1; a < s.length; a++) switch (s[a]) {
case r:
if (!i) {
n.end = a + 1;
return;
}
default:
i = !1;
break;
case "\\":
i = !i;
break;
}
}, Ar = function(n) {
v(this, m, ln).call(this, n.key.span), Tr(n) && n.value && v(this, m, ln).call(this, n.value.span);
}, Ir = function(n) {
if (!n.value || n.value.source) return n.value;
let s = this.getCharacterIndex(/\S/, n.sourceSpan.start);
return { source: "$implicit", span: { start: s, end: s } };
}, Nr = function() {
let n = j(this, de), [s] = n, r = j(this, te).slice(s.sourceSpan.start, s.sourceSpan.end).trim().length === 0 ? n.slice(1) : n, i = [], a = null;
for (let [p, h] of r.entries()) {
if (a && kr(a) && Tr(h) && h.value && h.value.source === a.key.source) {
let d = v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: h.key.source }, h.key.span), x = (T, C) => ({ ...T, ...this.transformSpan({ start: T.start, end: C }) }), D = (T) => ({ ...x(T, d.end), alias: d }), k = i.pop();
if (k.type === "NGMicrosyntaxExpression") i.push(D(k));
else if (k.type === "NGMicrosyntaxKeyedExpression") {
let T = D(k.expression);
i.push(x({ ...k, expression: T }, T.end));
} else throw new Error(`Unexpected type ${k.type}`);
} else i.push(v(this, m, Pr).call(this, h, p));
a = h;
}
return v(this, m, _).call(this, { type: "NGMicrosyntax", body: i }, i.length === 0 ? n[0].sourceSpan : { start: i[0].start, end: _r(0, i, -1).end });
}, Pr = function(n, s) {
if (kr(n)) {
let { key: r, value: i } = n;
return i ? s === 0 ? v(this, m, _).call(this, { type: "NGMicrosyntaxExpression", expression: v(this, m, on).call(this, i.ast), alias: null }, i) : v(this, m, _).call(this, { type: "NGMicrosyntaxKeyedExpression", key: v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: v(this, m, an).call(this, r.source) }, r.span), expression: v(this, m, _).call(this, { type: "NGMicrosyntaxExpression", expression: v(this, m, on).call(this, i.ast), alias: null }, i) }, [r.span.start, i.sourceSpan.end]) : v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: v(this, m, an).call(this, r.source) }, r.span);
} else {
let { key: r, sourceSpan: i } = n;
if (/^let\s$/.test(j(this, te).slice(i.start, i.start + 4))) {
let { value: a } = n;
return v(this, m, _).call(this, { type: "NGMicrosyntaxLet", key: v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: r.source }, r.span), value: a ? v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: a.source }, a.span) : null }, [i.start, a ? a.span.end : r.span.end]);
} else {
let a = v(this, m, Ir).call(this, n);
return v(this, m, _).call(this, { type: "NGMicrosyntaxAs", key: v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: a.source }, a.span), alias: v(this, m, _).call(this, { type: "NGMicrosyntaxKey", name: r.source }, r.span) }, [a.span.start, r.span.end]);
}
}
}, me);
it = (t29) => (e) => {
let { result: n, comments: s } = t29(e);
return Object.assign(yr(n), { comments: s });
}, ot = it(Rs), cn = it($s), to = it(Os), un = it(Ds), pn = (t29) => Lr(Bs(t29).result.templateBindings, t29);
no = at(ot), so = at(cn), ro = at(un), io = at(pn);
}
});
init_angular();
export {
Rr as default,
fn as parsers
};
//# sourceMappingURL=angular-75GZFSHJ.js.map