dorian 2.6.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.node-version +1 -1
  3. data/.npm-version +1 -1
  4. data/.rubocop.yml +25 -21
  5. data/.ruby-version +1 -1
  6. data/.tool-versions +2 -3
  7. data/Gemfile +0 -4
  8. data/Gemfile.lock +63 -116
  9. data/VERSION +1 -1
  10. data/dorian.gemspec +19 -19
  11. data/lib/dorian/bin.rb +82 -75
  12. data/package-lock.json +8 -8
  13. data/package.json +5 -5
  14. data/vendor/prettier/LICENSE +0 -4372
  15. data/vendor/prettier/README.md +14 -19
  16. data/vendor/prettier/THIRD-PARTY-NOTICES.md +6059 -0
  17. data/vendor/prettier/bin/prettier.cjs +27 -18
  18. data/vendor/prettier/doc.d.ts +11 -0
  19. data/vendor/prettier/doc.js +742 -776
  20. data/vendor/prettier/doc.mjs +743 -766
  21. data/vendor/prettier/index.cjs +266 -371
  22. data/vendor/prettier/index.d.ts +43 -16
  23. data/vendor/prettier/index.mjs +9615 -16721
  24. data/vendor/prettier/internal/experimental-cli-worker.mjs +2841 -0
  25. data/vendor/prettier/internal/experimental-cli.mjs +12790 -0
  26. data/vendor/prettier/internal/legacy-cli.mjs +6229 -0
  27. data/vendor/prettier/package.json +113 -108
  28. data/vendor/prettier/plugins/acorn.js +16 -6618
  29. data/vendor/prettier/plugins/acorn.mjs +16 -6456
  30. data/vendor/prettier/plugins/angular.js +4 -2435
  31. data/vendor/prettier/plugins/angular.mjs +4 -2375
  32. data/vendor/prettier/plugins/babel.d.ts +7 -7
  33. data/vendor/prettier/plugins/babel.js +15 -14271
  34. data/vendor/prettier/plugins/babel.mjs +15 -13986
  35. data/vendor/prettier/plugins/estree.d.ts +6 -1
  36. data/vendor/prettier/plugins/estree.js +43 -9486
  37. data/vendor/prettier/plugins/estree.mjs +43 -9278
  38. data/vendor/prettier/plugins/flow.js +19 -51476
  39. data/vendor/prettier/plugins/flow.mjs +19 -51218
  40. data/vendor/prettier/plugins/glimmer.d.ts +5 -1
  41. data/vendor/prettier/plugins/glimmer.js +30 -8527
  42. data/vendor/prettier/plugins/glimmer.mjs +30 -8414
  43. data/vendor/prettier/plugins/graphql.d.ts +5 -1
  44. data/vendor/prettier/plugins/graphql.js +15 -2408
  45. data/vendor/prettier/plugins/graphql.mjs +15 -2334
  46. data/vendor/prettier/plugins/html.d.ts +6 -1
  47. data/vendor/prettier/plugins/html.js +25 -8182
  48. data/vendor/prettier/plugins/html.mjs +25 -8077
  49. data/vendor/prettier/plugins/markdown.d.ts +5 -1
  50. data/vendor/prettier/plugins/markdown.js +57 -9063
  51. data/vendor/prettier/plugins/markdown.mjs +57 -8972
  52. data/vendor/prettier/plugins/meriyah.js +5 -5953
  53. data/vendor/prettier/plugins/meriyah.mjs +5 -5800
  54. data/vendor/prettier/plugins/postcss.d.ts +5 -1
  55. data/vendor/prettier/plugins/postcss.js +61 -9244
  56. data/vendor/prettier/plugins/postcss.mjs +61 -9046
  57. data/vendor/prettier/plugins/typescript.js +15 -38052
  58. data/vendor/prettier/plugins/typescript.mjs +15 -37726
  59. data/vendor/prettier/plugins/yaml.d.ts +5 -1
  60. data/vendor/prettier/plugins/yaml.js +157 -7423
  61. data/vendor/prettier/plugins/yaml.mjs +157 -7327
  62. data/vendor/prettier/standalone.d.ts +1 -1
  63. data/vendor/prettier/standalone.js +29 -3984
  64. data/vendor/prettier/standalone.mjs +29 -3938
  65. metadata +145 -40
  66. data/vendor/prettier/internal/cli.mjs +0 -4366
@@ -1,2435 +1,4 @@
1
- (function (n) {
2
- function e() {
3
- var i = n();
4
- return i.default || i;
5
- }
6
- if (typeof exports == "object" && typeof module == "object")
7
- module.exports = e();
8
- else if (typeof define == "function" && define.amd) define(e);
9
- else {
10
- var t =
11
- typeof globalThis < "u"
12
- ? globalThis
13
- : typeof global < "u"
14
- ? global
15
- : typeof self < "u"
16
- ? self
17
- : this || {};
18
- (t.prettierPlugins = t.prettierPlugins || {}),
19
- (t.prettierPlugins.angular = e());
20
- }
21
- })(function () {
22
- "use strict";
23
- var Ut = Object.defineProperty;
24
- var Je = Object.getOwnPropertyDescriptor;
25
- var Xe = Object.getOwnPropertyNames;
26
- var ts = Object.prototype.hasOwnProperty;
27
- var ae = (r) => {
28
- throw TypeError(r);
29
- };
30
- var oe = (r, t) => {
31
- for (var e in t) Ut(r, e, { get: t[e], enumerable: !0 });
32
- },
33
- es = (r, t, e, s) => {
34
- if ((t && typeof t == "object") || typeof t == "function")
35
- for (let i of Xe(t))
36
- !ts.call(r, i) &&
37
- i !== e &&
38
- Ut(r, i, {
39
- get: () => t[i],
40
- enumerable: !(s = Je(t, i)) || s.enumerable,
41
- });
42
- return r;
43
- };
44
- var ss = (r) => es(Ut({}, "__esModule", { value: !0 }), r);
45
- var Ft = (r, t, e) => t.has(r) || ae("Cannot " + e);
46
- var O = (r, t, e) => (
47
- Ft(r, t, "read from private field"), e ? e.call(r) : t.get(r)
48
- ),
49
- P = (r, t, e) =>
50
- t.has(r)
51
- ? ae("Cannot add the same private member more than once")
52
- : t instanceof WeakSet
53
- ? t.add(r)
54
- : t.set(r, e),
55
- Y = (r, t, e, s) => (
56
- Ft(r, t, "write to private field"), s ? s.call(r, e) : t.set(r, e), e
57
- ),
58
- c = (r, t, e) => (Ft(r, t, "access private method"), e);
59
- var rr = {};
60
- oe(rr, { parsers: () => ne });
61
- var ne = {};
62
- oe(ne, {
63
- __ng_action: () => Xs,
64
- __ng_binding: () => tr,
65
- __ng_directive: () => sr,
66
- __ng_interpolation: () => er,
67
- });
68
- var Z = class {
69
- constructor(t, e, s, i) {
70
- (this.input = e),
71
- (this.errLocation = s),
72
- (this.ctxLocation = i),
73
- (this.message = `Parser Error: ${t} ${s} [${e}] in ${i}`);
74
- }
75
- },
76
- b = class {
77
- constructor(t, e) {
78
- (this.start = t), (this.end = e);
79
- }
80
- toAbsolute(t) {
81
- return new L(t + this.start, t + this.end);
82
- }
83
- },
84
- m = class {
85
- constructor(t, e) {
86
- (this.span = t), (this.sourceSpan = e);
87
- }
88
- toString() {
89
- return "AST";
90
- }
91
- },
92
- J = class extends m {
93
- constructor(t, e, s) {
94
- super(t, e), (this.nameSpan = s);
95
- }
96
- },
97
- $ = class extends m {
98
- visit(t, e = null) {}
99
- },
100
- K = class extends m {
101
- visit(t, e = null) {
102
- return t.visitImplicitReceiver(this, e);
103
- }
104
- },
105
- Lt = class extends K {
106
- visit(t, e = null) {
107
- var s;
108
- return (s = t.visitThisReceiver) == null ? void 0 : s.call(t, this, e);
109
- }
110
- },
111
- X = class extends m {
112
- constructor(t, e, s) {
113
- super(t, e), (this.expressions = s);
114
- }
115
- visit(t, e = null) {
116
- return t.visitChain(this, e);
117
- }
118
- },
119
- tt = class extends m {
120
- constructor(t, e, s, i, n) {
121
- super(t, e),
122
- (this.condition = s),
123
- (this.trueExp = i),
124
- (this.falseExp = n);
125
- }
126
- visit(t, e = null) {
127
- return t.visitConditional(this, e);
128
- }
129
- },
130
- M = class extends J {
131
- constructor(t, e, s, i, n) {
132
- super(t, e, s), (this.receiver = i), (this.name = n);
133
- }
134
- visit(t, e = null) {
135
- return t.visitPropertyRead(this, e);
136
- }
137
- },
138
- et = class extends J {
139
- constructor(t, e, s, i, n, a) {
140
- super(t, e, s), (this.receiver = i), (this.name = n), (this.value = a);
141
- }
142
- visit(t, e = null) {
143
- return t.visitPropertyWrite(this, e);
144
- }
145
- },
146
- _ = class extends J {
147
- constructor(t, e, s, i, n) {
148
- super(t, e, s), (this.receiver = i), (this.name = n);
149
- }
150
- visit(t, e = null) {
151
- return t.visitSafePropertyRead(this, e);
152
- }
153
- },
154
- st = class extends m {
155
- constructor(t, e, s, i) {
156
- super(t, e), (this.receiver = s), (this.key = i);
157
- }
158
- visit(t, e = null) {
159
- return t.visitKeyedRead(this, e);
160
- }
161
- },
162
- U = class extends m {
163
- constructor(t, e, s, i) {
164
- super(t, e), (this.receiver = s), (this.key = i);
165
- }
166
- visit(t, e = null) {
167
- return t.visitSafeKeyedRead(this, e);
168
- }
169
- },
170
- rt = class extends m {
171
- constructor(t, e, s, i, n) {
172
- super(t, e), (this.receiver = s), (this.key = i), (this.value = n);
173
- }
174
- visit(t, e = null) {
175
- return t.visitKeyedWrite(this, e);
176
- }
177
- },
178
- it = class extends J {
179
- constructor(t, e, s, i, n, a) {
180
- super(t, e, a), (this.exp = s), (this.name = i), (this.args = n);
181
- }
182
- visit(t, e = null) {
183
- return t.visitPipe(this, e);
184
- }
185
- },
186
- E = class extends m {
187
- constructor(t, e, s) {
188
- super(t, e), (this.value = s);
189
- }
190
- visit(t, e = null) {
191
- return t.visitLiteralPrimitive(this, e);
192
- }
193
- },
194
- nt = class extends m {
195
- constructor(t, e, s) {
196
- super(t, e), (this.expressions = s);
197
- }
198
- visit(t, e = null) {
199
- return t.visitLiteralArray(this, e);
200
- }
201
- },
202
- at = class extends m {
203
- constructor(t, e, s, i) {
204
- super(t, e), (this.keys = s), (this.values = i);
205
- }
206
- visit(t, e = null) {
207
- return t.visitLiteralMap(this, e);
208
- }
209
- },
210
- ot = class extends m {
211
- constructor(t, e, s, i) {
212
- super(t, e), (this.strings = s), (this.expressions = i);
213
- }
214
- visit(t, e = null) {
215
- return t.visitInterpolation(this, e);
216
- }
217
- },
218
- A = class extends m {
219
- constructor(t, e, s, i, n) {
220
- super(t, e), (this.operation = s), (this.left = i), (this.right = n);
221
- }
222
- visit(t, e = null) {
223
- return t.visitBinary(this, e);
224
- }
225
- },
226
- F = class r extends A {
227
- static createMinus(t, e, s) {
228
- return new r(t, e, "-", s, "-", new E(t, e, 0), s);
229
- }
230
- static createPlus(t, e, s) {
231
- return new r(t, e, "+", s, "-", s, new E(t, e, 0));
232
- }
233
- constructor(t, e, s, i, n, a, o) {
234
- super(t, e, n, a, o),
235
- (this.operator = s),
236
- (this.expr = i),
237
- (this.left = null),
238
- (this.right = null),
239
- (this.operation = null);
240
- }
241
- visit(t, e = null) {
242
- return t.visitUnary !== void 0
243
- ? t.visitUnary(this, e)
244
- : t.visitBinary(this, e);
245
- }
246
- },
247
- ct = class extends m {
248
- constructor(t, e, s) {
249
- super(t, e), (this.expression = s);
250
- }
251
- visit(t, e = null) {
252
- return t.visitPrefixNot(this, e);
253
- }
254
- },
255
- ht = class extends m {
256
- constructor(t, e, s) {
257
- super(t, e), (this.expression = s);
258
- }
259
- visit(t, e = null) {
260
- return t.visitNonNullAssert(this, e);
261
- }
262
- },
263
- pt = class extends m {
264
- constructor(t, e, s, i, n) {
265
- super(t, e),
266
- (this.receiver = s),
267
- (this.args = i),
268
- (this.argumentSpan = n);
269
- }
270
- visit(t, e = null) {
271
- return t.visitCall(this, e);
272
- }
273
- },
274
- D = class extends m {
275
- constructor(t, e, s, i, n) {
276
- super(t, e),
277
- (this.receiver = s),
278
- (this.args = i),
279
- (this.argumentSpan = n);
280
- }
281
- visit(t, e = null) {
282
- return t.visitSafeCall(this, e);
283
- }
284
- },
285
- L = class {
286
- constructor(t, e) {
287
- (this.start = t), (this.end = e);
288
- }
289
- },
290
- R = class extends m {
291
- constructor(t, e, s, i, n) {
292
- super(
293
- new b(0, e === null ? 0 : e.length),
294
- new L(i, e === null ? i : i + e.length),
295
- ),
296
- (this.ast = t),
297
- (this.source = e),
298
- (this.location = s),
299
- (this.errors = n);
300
- }
301
- visit(t, e = null) {
302
- return t.visitASTWithSource
303
- ? t.visitASTWithSource(this, e)
304
- : this.ast.visit(t, e);
305
- }
306
- toString() {
307
- return `${this.source} in ${this.location}`;
308
- }
309
- },
310
- W = class {
311
- constructor(t, e, s) {
312
- (this.sourceSpan = t), (this.key = e), (this.value = s);
313
- }
314
- },
315
- ut = class {
316
- constructor(t, e, s) {
317
- (this.sourceSpan = t), (this.key = e), (this.value = s);
318
- }
319
- },
320
- Rt = class {
321
- visit(t, e) {
322
- t.visit(this, e);
323
- }
324
- visitUnary(t, e) {
325
- this.visit(t.expr, e);
326
- }
327
- visitBinary(t, e) {
328
- this.visit(t.left, e), this.visit(t.right, e);
329
- }
330
- visitChain(t, e) {
331
- this.visitAll(t.expressions, e);
332
- }
333
- visitConditional(t, e) {
334
- this.visit(t.condition, e),
335
- this.visit(t.trueExp, e),
336
- this.visit(t.falseExp, e);
337
- }
338
- visitPipe(t, e) {
339
- this.visit(t.exp, e), this.visitAll(t.args, e);
340
- }
341
- visitImplicitReceiver(t, e) {}
342
- visitThisReceiver(t, e) {}
343
- visitInterpolation(t, e) {
344
- this.visitAll(t.expressions, e);
345
- }
346
- visitKeyedRead(t, e) {
347
- this.visit(t.receiver, e), this.visit(t.key, e);
348
- }
349
- visitKeyedWrite(t, e) {
350
- this.visit(t.receiver, e), this.visit(t.key, e), this.visit(t.value, e);
351
- }
352
- visitLiteralArray(t, e) {
353
- this.visitAll(t.expressions, e);
354
- }
355
- visitLiteralMap(t, e) {
356
- this.visitAll(t.values, e);
357
- }
358
- visitLiteralPrimitive(t, e) {}
359
- visitPrefixNot(t, e) {
360
- this.visit(t.expression, e);
361
- }
362
- visitNonNullAssert(t, e) {
363
- this.visit(t.expression, e);
364
- }
365
- visitPropertyRead(t, e) {
366
- this.visit(t.receiver, e);
367
- }
368
- visitPropertyWrite(t, e) {
369
- this.visit(t.receiver, e), this.visit(t.value, e);
370
- }
371
- visitSafePropertyRead(t, e) {
372
- this.visit(t.receiver, e);
373
- }
374
- visitSafeKeyedRead(t, e) {
375
- this.visit(t.receiver, e), this.visit(t.key, e);
376
- }
377
- visitCall(t, e) {
378
- this.visit(t.receiver, e), this.visitAll(t.args, e);
379
- }
380
- visitSafeCall(t, e) {
381
- this.visit(t.receiver, e), this.visitAll(t.args, e);
382
- }
383
- visitAll(t, e) {
384
- for (let s of t) this.visit(s, e);
385
- }
386
- };
387
- var ce;
388
- (function (r) {
389
- (r[(r.DEFAULT = 0)] = "DEFAULT"),
390
- (r[(r.LITERAL_ATTR = 1)] = "LITERAL_ATTR"),
391
- (r[(r.ANIMATION = 2)] = "ANIMATION"),
392
- (r[(r.TWO_WAY = 3)] = "TWO_WAY");
393
- })(ce || (ce = {}));
394
- var he;
395
- (function (r) {
396
- (r[(r.Regular = 0)] = "Regular"),
397
- (r[(r.Animation = 1)] = "Animation"),
398
- (r[(r.TwoWay = 2)] = "TwoWay");
399
- })(he || (he = {}));
400
- var pe;
401
- (function (r) {
402
- (r[(r.Property = 0)] = "Property"),
403
- (r[(r.Attribute = 1)] = "Attribute"),
404
- (r[(r.Class = 2)] = "Class"),
405
- (r[(r.Style = 3)] = "Style"),
406
- (r[(r.Animation = 4)] = "Animation"),
407
- (r[(r.TwoWay = 5)] = "TwoWay");
408
- })(pe || (pe = {}));
409
- function ue(r) {
410
- return (r >= 9 && r <= 32) || r == 160;
411
- }
412
- function B(r) {
413
- return 48 <= r && r <= 57;
414
- }
415
- function le(r) {
416
- return (r >= 97 && r <= 122) || (r >= 65 && r <= 90);
417
- }
418
- function Dt(r) {
419
- return r === 39 || r === 34 || r === 96;
420
- }
421
- var l;
422
- (function (r) {
423
- (r[(r.Character = 0)] = "Character"),
424
- (r[(r.Identifier = 1)] = "Identifier"),
425
- (r[(r.PrivateIdentifier = 2)] = "PrivateIdentifier"),
426
- (r[(r.Keyword = 3)] = "Keyword"),
427
- (r[(r.String = 4)] = "String"),
428
- (r[(r.Operator = 5)] = "Operator"),
429
- (r[(r.Number = 6)] = "Number"),
430
- (r[(r.Error = 7)] = "Error");
431
- })(l || (l = {}));
432
- var Ps = [
433
- "var",
434
- "let",
435
- "as",
436
- "null",
437
- "undefined",
438
- "true",
439
- "false",
440
- "if",
441
- "else",
442
- "this",
443
- ],
444
- yt = class {
445
- tokenize(t) {
446
- let e = new Vt(t),
447
- s = [],
448
- i = e.scanToken();
449
- for (; i != null; ) s.push(i), (i = e.scanToken());
450
- return s;
451
- }
452
- },
453
- I = class {
454
- constructor(t, e, s, i, n) {
455
- (this.index = t),
456
- (this.end = e),
457
- (this.type = s),
458
- (this.numValue = i),
459
- (this.strValue = n);
460
- }
461
- isCharacter(t) {
462
- return this.type == l.Character && this.numValue == t;
463
- }
464
- isNumber() {
465
- return this.type == l.Number;
466
- }
467
- isString() {
468
- return this.type == l.String;
469
- }
470
- isOperator(t) {
471
- return this.type == l.Operator && this.strValue == t;
472
- }
473
- isIdentifier() {
474
- return this.type == l.Identifier;
475
- }
476
- isPrivateIdentifier() {
477
- return this.type == l.PrivateIdentifier;
478
- }
479
- isKeyword() {
480
- return this.type == l.Keyword;
481
- }
482
- isKeywordLet() {
483
- return this.type == l.Keyword && this.strValue == "let";
484
- }
485
- isKeywordAs() {
486
- return this.type == l.Keyword && this.strValue == "as";
487
- }
488
- isKeywordNull() {
489
- return this.type == l.Keyword && this.strValue == "null";
490
- }
491
- isKeywordUndefined() {
492
- return this.type == l.Keyword && this.strValue == "undefined";
493
- }
494
- isKeywordTrue() {
495
- return this.type == l.Keyword && this.strValue == "true";
496
- }
497
- isKeywordFalse() {
498
- return this.type == l.Keyword && this.strValue == "false";
499
- }
500
- isKeywordThis() {
501
- return this.type == l.Keyword && this.strValue == "this";
502
- }
503
- isError() {
504
- return this.type == l.Error;
505
- }
506
- toNumber() {
507
- return this.type == l.Number ? this.numValue : -1;
508
- }
509
- toString() {
510
- switch (this.type) {
511
- case l.Character:
512
- case l.Identifier:
513
- case l.Keyword:
514
- case l.Operator:
515
- case l.PrivateIdentifier:
516
- case l.String:
517
- case l.Error:
518
- return this.strValue;
519
- case l.Number:
520
- return this.numValue.toString();
521
- default:
522
- return null;
523
- }
524
- }
525
- };
526
- function ge(r, t, e) {
527
- return new I(r, t, l.Character, e, String.fromCharCode(e));
528
- }
529
- function bs(r, t, e) {
530
- return new I(r, t, l.Identifier, 0, e);
531
- }
532
- function Ks(r, t, e) {
533
- return new I(r, t, l.PrivateIdentifier, 0, e);
534
- }
535
- function Bs(r, t, e) {
536
- return new I(r, t, l.Keyword, 0, e);
537
- }
538
- function Gt(r, t, e) {
539
- return new I(r, t, l.Operator, 0, e);
540
- }
541
- function Ts(r, t, e) {
542
- return new I(r, t, l.String, 0, e);
543
- }
544
- function Ms(r, t, e) {
545
- return new I(r, t, l.Number, e, "");
546
- }
547
- function _s(r, t, e) {
548
- return new I(r, t, l.Error, 0, e);
549
- }
550
- var Bt = new I(-1, -1, l.Character, 0, ""),
551
- Vt = class {
552
- constructor(t) {
553
- (this.input = t),
554
- (this.peek = 0),
555
- (this.index = -1),
556
- (this.length = t.length),
557
- this.advance();
558
- }
559
- advance() {
560
- this.peek =
561
- ++this.index >= this.length ? 0 : this.input.charCodeAt(this.index);
562
- }
563
- scanToken() {
564
- let t = this.input,
565
- e = this.length,
566
- s = this.peek,
567
- i = this.index;
568
- for (; s <= 32; )
569
- if (++i >= e) {
570
- s = 0;
571
- break;
572
- } else s = t.charCodeAt(i);
573
- if (((this.peek = s), (this.index = i), i >= e)) return null;
574
- if (me(s)) return this.scanIdentifier();
575
- if (B(s)) return this.scanNumber(i);
576
- let n = i;
577
- switch (s) {
578
- case 46:
579
- return (
580
- this.advance(),
581
- B(this.peek) ? this.scanNumber(n) : ge(n, this.index, 46)
582
- );
583
- case 40:
584
- case 41:
585
- case 123:
586
- case 125:
587
- case 91:
588
- case 93:
589
- case 44:
590
- case 58:
591
- case 59:
592
- return this.scanCharacter(n, s);
593
- case 39:
594
- case 34:
595
- return this.scanString();
596
- case 35:
597
- return this.scanPrivateIdentifier();
598
- case 43:
599
- case 45:
600
- case 42:
601
- case 47:
602
- case 37:
603
- case 94:
604
- return this.scanOperator(n, String.fromCharCode(s));
605
- case 63:
606
- return this.scanQuestion(n);
607
- case 60:
608
- case 62:
609
- return this.scanComplexOperator(n, String.fromCharCode(s), 61, "=");
610
- case 33:
611
- case 61:
612
- return this.scanComplexOperator(
613
- n,
614
- String.fromCharCode(s),
615
- 61,
616
- "=",
617
- 61,
618
- "=",
619
- );
620
- case 38:
621
- return this.scanComplexOperator(n, "&", 38, "&");
622
- case 124:
623
- return this.scanComplexOperator(n, "|", 124, "|");
624
- case 160:
625
- for (; ue(this.peek); ) this.advance();
626
- return this.scanToken();
627
- }
628
- return (
629
- this.advance(),
630
- this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0)
631
- );
632
- }
633
- scanCharacter(t, e) {
634
- return this.advance(), ge(t, this.index, e);
635
- }
636
- scanOperator(t, e) {
637
- return this.advance(), Gt(t, this.index, e);
638
- }
639
- scanComplexOperator(t, e, s, i, n, a) {
640
- this.advance();
641
- let o = e;
642
- return (
643
- this.peek == s && (this.advance(), (o += i)),
644
- n != null && this.peek == n && (this.advance(), (o += a)),
645
- Gt(t, this.index, o)
646
- );
647
- }
648
- scanIdentifier() {
649
- let t = this.index;
650
- for (this.advance(); Se(this.peek); ) this.advance();
651
- let e = this.input.substring(t, this.index);
652
- return Ps.indexOf(e) > -1 ? Bs(t, this.index, e) : bs(t, this.index, e);
653
- }
654
- scanPrivateIdentifier() {
655
- let t = this.index;
656
- if ((this.advance(), !me(this.peek)))
657
- return this.error("Invalid character [#]", -1);
658
- for (; Se(this.peek); ) this.advance();
659
- let e = this.input.substring(t, this.index);
660
- return Ks(t, this.index, e);
661
- }
662
- scanNumber(t) {
663
- let e = this.index === t,
664
- s = !1;
665
- for (this.advance(); ; ) {
666
- if (!B(this.peek))
667
- if (this.peek === 95) {
668
- if (
669
- !B(this.input.charCodeAt(this.index - 1)) ||
670
- !B(this.input.charCodeAt(this.index + 1))
671
- )
672
- return this.error("Invalid numeric separator", 0);
673
- s = !0;
674
- } else if (this.peek === 46) e = !1;
675
- else if (Us(this.peek)) {
676
- if (
677
- (this.advance(), Fs(this.peek) && this.advance(), !B(this.peek))
678
- )
679
- return this.error("Invalid exponent", -1);
680
- e = !1;
681
- } else break;
682
- this.advance();
683
- }
684
- let i = this.input.substring(t, this.index);
685
- s && (i = i.replace(/_/g, ""));
686
- let n = e ? Ws(i) : parseFloat(i);
687
- return Ms(t, this.index, n);
688
- }
689
- scanString() {
690
- let t = this.index,
691
- e = this.peek;
692
- this.advance();
693
- let s = "",
694
- i = this.index,
695
- n = this.input;
696
- for (; this.peek != e; )
697
- if (this.peek == 92) {
698
- s += n.substring(i, this.index);
699
- let o;
700
- if ((this.advance(), this.peek == 117)) {
701
- let p = n.substring(this.index + 1, this.index + 5);
702
- if (/^[0-9a-f]+$/i.test(p)) o = parseInt(p, 16);
703
- else return this.error(`Invalid unicode escape [\\u${p}]`, 0);
704
- for (let u = 0; u < 5; u++) this.advance();
705
- } else (o = Ds(this.peek)), this.advance();
706
- (s += String.fromCharCode(o)), (i = this.index);
707
- } else {
708
- if (this.peek == 0) return this.error("Unterminated quote", 0);
709
- this.advance();
710
- }
711
- let a = n.substring(i, this.index);
712
- return this.advance(), Ts(t, this.index, s + a);
713
- }
714
- scanQuestion(t) {
715
- this.advance();
716
- let e = "?";
717
- return (
718
- (this.peek === 63 || this.peek === 46) &&
719
- ((e += this.peek === 46 ? "." : "?"), this.advance()),
720
- Gt(t, this.index, e)
721
- );
722
- }
723
- error(t, e) {
724
- let s = this.index + e;
725
- return _s(
726
- s,
727
- this.index,
728
- `Lexer Error: ${t} at column ${s} in expression [${this.input}]`,
729
- );
730
- }
731
- };
732
- function me(r) {
733
- return (97 <= r && r <= 122) || (65 <= r && r <= 90) || r == 95 || r == 36;
734
- }
735
- function Se(r) {
736
- return le(r) || B(r) || r == 95 || r == 36;
737
- }
738
- function Us(r) {
739
- return r == 101 || r == 69;
740
- }
741
- function Fs(r) {
742
- return r == 45 || r == 43;
743
- }
744
- function Ds(r) {
745
- switch (r) {
746
- case 110:
747
- return 10;
748
- case 102:
749
- return 12;
750
- case 114:
751
- return 13;
752
- case 116:
753
- return 9;
754
- case 118:
755
- return 11;
756
- default:
757
- return r;
758
- }
759
- }
760
- function Ws(r) {
761
- let t = parseInt(r);
762
- if (isNaN(t)) throw new Error("Invalid integer literal when parsing " + r);
763
- return t;
764
- }
765
- var Gs = [/@/, /^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];
766
- function Ee(r, t) {
767
- if (t != null && !(Array.isArray(t) && t.length == 2))
768
- throw new Error(`Expected '${r}' to be an array, [start, end].`);
769
- if (t != null) {
770
- let e = t[0],
771
- s = t[1];
772
- Gs.forEach((i) => {
773
- if (i.test(e) || i.test(s))
774
- throw new Error(
775
- `['${e}', '${s}'] contains unusable interpolation symbol.`,
776
- );
777
- });
778
- }
779
- }
780
- var zt = class r {
781
- static fromArray(t) {
782
- return t ? (Ee("interpolation", t), new r(t[0], t[1])) : Q;
783
- }
784
- constructor(t, e) {
785
- (this.start = t), (this.end = e);
786
- }
787
- },
788
- Q = new zt("{{", "}}");
789
- var qt = class {
790
- constructor(t, e, s) {
791
- (this.strings = t), (this.expressions = e), (this.offsets = s);
792
- }
793
- },
794
- Ht = class {
795
- constructor(t, e, s) {
796
- (this.templateBindings = t), (this.warnings = e), (this.errors = s);
797
- }
798
- },
799
- mt = class {
800
- constructor(t) {
801
- (this._lexer = t), (this.errors = []);
802
- }
803
- parseAction(t, e, s, i = Q) {
804
- this._checkNoInterpolation(t, e, i);
805
- let n = this._stripComments(t),
806
- a = this._lexer.tokenize(n),
807
- o = new z(t, e, s, a, 1, this.errors, 0).parseChain();
808
- return new R(o, t, e, s, this.errors);
809
- }
810
- parseBinding(t, e, s, i = Q) {
811
- let n = this._parseBindingAst(t, e, s, i);
812
- return new R(n, t, e, s, this.errors);
813
- }
814
- checkSimpleExpression(t) {
815
- let e = new jt();
816
- return t.visit(e), e.errors;
817
- }
818
- parseSimpleBinding(t, e, s, i = Q) {
819
- let n = this._parseBindingAst(t, e, s, i),
820
- a = this.checkSimpleExpression(n);
821
- return (
822
- a.length > 0 &&
823
- this._reportError(
824
- `Host binding expression cannot contain ${a.join(" ")}`,
825
- t,
826
- e,
827
- ),
828
- new R(n, t, e, s, this.errors)
829
- );
830
- }
831
- _reportError(t, e, s, i) {
832
- this.errors.push(new Z(t, e, s, i));
833
- }
834
- _parseBindingAst(t, e, s, i) {
835
- this._checkNoInterpolation(t, e, i);
836
- let n = this._stripComments(t),
837
- a = this._lexer.tokenize(n);
838
- return new z(t, e, s, a, 0, this.errors, 0).parseChain();
839
- }
840
- parseTemplateBindings(t, e, s, i, n) {
841
- let a = this._lexer.tokenize(e);
842
- return new z(e, s, n, a, 0, this.errors, 0).parseTemplateBindings({
843
- source: t,
844
- span: new L(i, i + t.length),
845
- });
846
- }
847
- parseInterpolation(t, e, s, i, n = Q) {
848
- let {
849
- strings: a,
850
- expressions: o,
851
- offsets: p,
852
- } = this.splitInterpolation(t, e, i, n);
853
- if (o.length === 0) return null;
854
- let u = [];
855
- for (let f = 0; f < o.length; ++f) {
856
- let S = o[f].text,
857
- g = this._stripComments(S),
858
- y = this._lexer.tokenize(g),
859
- w = new z(t, e, s, y, 0, this.errors, p[f]).parseChain();
860
- u.push(w);
861
- }
862
- return this.createInterpolationAst(
863
- a.map((f) => f.text),
864
- u,
865
- t,
866
- e,
867
- s,
868
- );
869
- }
870
- parseInterpolationExpression(t, e, s) {
871
- let i = this._stripComments(t),
872
- n = this._lexer.tokenize(i),
873
- a = new z(t, e, s, n, 0, this.errors, 0).parseChain(),
874
- o = ["", ""];
875
- return this.createInterpolationAst(o, [a], t, e, s);
876
- }
877
- createInterpolationAst(t, e, s, i, n) {
878
- let a = new b(0, s.length),
879
- o = new ot(a, a.toAbsolute(n), t, e);
880
- return new R(o, s, i, n, this.errors);
881
- }
882
- splitInterpolation(t, e, s, i = Q) {
883
- let n = [],
884
- a = [],
885
- o = [],
886
- p = s ? Vs(s) : null,
887
- u = 0,
888
- f = !1,
889
- S = !1,
890
- { start: g, end: y } = i;
891
- for (; u < t.length; )
892
- if (f) {
893
- let w = u,
894
- H = w + g.length,
895
- j = this._getInterpolationEndIndex(t, y, H);
896
- if (j === -1) {
897
- (f = !1), (S = !0);
898
- break;
899
- }
900
- let T = j + y.length,
901
- Nt = t.substring(H, j);
902
- Nt.trim().length === 0 &&
903
- this._reportError(
904
- "Blank expressions are not allowed in interpolated strings",
905
- t,
906
- `at column ${u} in`,
907
- e,
908
- ),
909
- a.push({ text: Nt, start: w, end: T });
910
- let Ze = ((p == null ? void 0 : p.get(w)) ?? w) + g.length;
911
- o.push(Ze), (u = T), (f = !1);
912
- } else {
913
- let w = u;
914
- (u = t.indexOf(g, u)), u === -1 && (u = t.length);
915
- let H = t.substring(w, u);
916
- n.push({ text: H, start: w, end: u }), (f = !0);
917
- }
918
- if (!f)
919
- if (S) {
920
- let w = n[n.length - 1];
921
- (w.text += t.substring(u)), (w.end = t.length);
922
- } else n.push({ text: t.substring(u), start: u, end: t.length });
923
- return new qt(n, a, o);
924
- }
925
- wrapLiteralPrimitive(t, e, s) {
926
- let i = new b(0, t == null ? 0 : t.length);
927
- return new R(new E(i, i.toAbsolute(s), t), t, e, s, this.errors);
928
- }
929
- _stripComments(t) {
930
- let e = this._commentStart(t);
931
- return e != null ? t.substring(0, e) : t;
932
- }
933
- _commentStart(t) {
934
- let e = null;
935
- for (let s = 0; s < t.length - 1; s++) {
936
- let i = t.charCodeAt(s),
937
- n = t.charCodeAt(s + 1);
938
- if (i === 47 && n == 47 && e == null) return s;
939
- e === i ? (e = null) : e == null && Dt(i) && (e = i);
940
- }
941
- return null;
942
- }
943
- _checkNoInterpolation(t, e, { start: s, end: i }) {
944
- let n = -1,
945
- a = -1;
946
- for (let o of this._forEachUnquotedChar(t, 0))
947
- if (n === -1) t.startsWith(s) && (n = o);
948
- else if (((a = this._getInterpolationEndIndex(t, i, o)), a > -1))
949
- break;
950
- n > -1 &&
951
- a > -1 &&
952
- this._reportError(
953
- `Got interpolation (${s}${i}) where expression was expected`,
954
- t,
955
- `at column ${n} in`,
956
- e,
957
- );
958
- }
959
- _getInterpolationEndIndex(t, e, s) {
960
- for (let i of this._forEachUnquotedChar(t, s)) {
961
- if (t.startsWith(e, i)) return i;
962
- if (t.startsWith("//", i)) return t.indexOf(e, i);
963
- }
964
- return -1;
965
- }
966
- *_forEachUnquotedChar(t, e) {
967
- let s = null,
968
- i = 0;
969
- for (let n = e; n < t.length; n++) {
970
- let a = t[n];
971
- Dt(t.charCodeAt(n)) && (s === null || s === a) && i % 2 === 0
972
- ? (s = s === null ? a : null)
973
- : s === null && (yield n),
974
- (i = a === "\\" ? i + 1 : 0);
975
- }
976
- }
977
- },
978
- gt;
979
- (function (r) {
980
- (r[(r.None = 0)] = "None"), (r[(r.Writable = 1)] = "Writable");
981
- })(gt || (gt = {}));
982
- var z = class {
983
- constructor(t, e, s, i, n, a, o) {
984
- (this.input = t),
985
- (this.location = e),
986
- (this.absoluteOffset = s),
987
- (this.tokens = i),
988
- (this.parseFlags = n),
989
- (this.errors = a),
990
- (this.offset = o),
991
- (this.rparensExpected = 0),
992
- (this.rbracketsExpected = 0),
993
- (this.rbracesExpected = 0),
994
- (this.context = gt.None),
995
- (this.sourceSpanCache = new Map()),
996
- (this.index = 0);
997
- }
998
- peek(t) {
999
- let e = this.index + t;
1000
- return e < this.tokens.length ? this.tokens[e] : Bt;
1001
- }
1002
- get next() {
1003
- return this.peek(0);
1004
- }
1005
- get atEOF() {
1006
- return this.index >= this.tokens.length;
1007
- }
1008
- get inputIndex() {
1009
- return this.atEOF
1010
- ? this.currentEndIndex
1011
- : this.next.index + this.offset;
1012
- }
1013
- get currentEndIndex() {
1014
- return this.index > 0
1015
- ? this.peek(-1).end + this.offset
1016
- : this.tokens.length === 0
1017
- ? this.input.length + this.offset
1018
- : this.next.index + this.offset;
1019
- }
1020
- get currentAbsoluteOffset() {
1021
- return this.absoluteOffset + this.inputIndex;
1022
- }
1023
- span(t, e) {
1024
- let s = this.currentEndIndex;
1025
- if ((e !== void 0 && e > this.currentEndIndex && (s = e), t > s)) {
1026
- let i = s;
1027
- (s = t), (t = i);
1028
- }
1029
- return new b(t, s);
1030
- }
1031
- sourceSpan(t, e) {
1032
- let s = `${t}@${this.inputIndex}:${e}`;
1033
- return (
1034
- this.sourceSpanCache.has(s) ||
1035
- this.sourceSpanCache.set(
1036
- s,
1037
- this.span(t, e).toAbsolute(this.absoluteOffset),
1038
- ),
1039
- this.sourceSpanCache.get(s)
1040
- );
1041
- }
1042
- advance() {
1043
- this.index++;
1044
- }
1045
- withContext(t, e) {
1046
- this.context |= t;
1047
- let s = e();
1048
- return (this.context ^= t), s;
1049
- }
1050
- consumeOptionalCharacter(t) {
1051
- return this.next.isCharacter(t) ? (this.advance(), !0) : !1;
1052
- }
1053
- peekKeywordLet() {
1054
- return this.next.isKeywordLet();
1055
- }
1056
- peekKeywordAs() {
1057
- return this.next.isKeywordAs();
1058
- }
1059
- expectCharacter(t) {
1060
- this.consumeOptionalCharacter(t) ||
1061
- this.error(`Missing expected ${String.fromCharCode(t)}`);
1062
- }
1063
- consumeOptionalOperator(t) {
1064
- return this.next.isOperator(t) ? (this.advance(), !0) : !1;
1065
- }
1066
- expectOperator(t) {
1067
- this.consumeOptionalOperator(t) ||
1068
- this.error(`Missing expected operator ${t}`);
1069
- }
1070
- prettyPrintToken(t) {
1071
- return t === Bt ? "end of input" : `token ${t}`;
1072
- }
1073
- expectIdentifierOrKeyword() {
1074
- let t = this.next;
1075
- return !t.isIdentifier() && !t.isKeyword()
1076
- ? (t.isPrivateIdentifier()
1077
- ? this._reportErrorForPrivateIdentifier(
1078
- t,
1079
- "expected identifier or keyword",
1080
- )
1081
- : this.error(
1082
- `Unexpected ${this.prettyPrintToken(t)}, expected identifier or keyword`,
1083
- ),
1084
- null)
1085
- : (this.advance(), t.toString());
1086
- }
1087
- expectIdentifierOrKeywordOrString() {
1088
- let t = this.next;
1089
- return !t.isIdentifier() && !t.isKeyword() && !t.isString()
1090
- ? (t.isPrivateIdentifier()
1091
- ? this._reportErrorForPrivateIdentifier(
1092
- t,
1093
- "expected identifier, keyword or string",
1094
- )
1095
- : this.error(
1096
- `Unexpected ${this.prettyPrintToken(t)}, expected identifier, keyword, or string`,
1097
- ),
1098
- "")
1099
- : (this.advance(), t.toString());
1100
- }
1101
- parseChain() {
1102
- let t = [],
1103
- e = this.inputIndex;
1104
- for (; this.index < this.tokens.length; ) {
1105
- let s = this.parsePipe();
1106
- if ((t.push(s), this.consumeOptionalCharacter(59)))
1107
- for (
1108
- this.parseFlags & 1 ||
1109
- this.error(
1110
- "Binding expression cannot contain chained expression",
1111
- );
1112
- this.consumeOptionalCharacter(59);
1113
-
1114
- );
1115
- else if (this.index < this.tokens.length) {
1116
- let i = this.index;
1117
- if (
1118
- (this.error(`Unexpected token '${this.next}'`), this.index === i)
1119
- )
1120
- break;
1121
- }
1122
- }
1123
- if (t.length === 0) {
1124
- let s = this.offset,
1125
- i = this.offset + this.input.length;
1126
- return new $(this.span(s, i), this.sourceSpan(s, i));
1127
- }
1128
- return t.length == 1
1129
- ? t[0]
1130
- : new X(this.span(e), this.sourceSpan(e), t);
1131
- }
1132
- parsePipe() {
1133
- let t = this.inputIndex,
1134
- e = this.parseExpression();
1135
- if (this.consumeOptionalOperator("|")) {
1136
- this.parseFlags & 1 &&
1137
- this.error("Cannot have a pipe in an action expression");
1138
- do {
1139
- let s = this.inputIndex,
1140
- i = this.expectIdentifierOrKeyword(),
1141
- n,
1142
- a;
1143
- i !== null
1144
- ? (n = this.sourceSpan(s))
1145
- : ((i = ""),
1146
- (a =
1147
- this.next.index !== -1
1148
- ? this.next.index
1149
- : this.input.length + this.offset),
1150
- (n = new b(a, a).toAbsolute(this.absoluteOffset)));
1151
- let o = [];
1152
- for (; this.consumeOptionalCharacter(58); )
1153
- o.push(this.parseExpression());
1154
- e = new it(this.span(t), this.sourceSpan(t, a), e, i, o, n);
1155
- } while (this.consumeOptionalOperator("|"));
1156
- }
1157
- return e;
1158
- }
1159
- parseExpression() {
1160
- return this.parseConditional();
1161
- }
1162
- parseConditional() {
1163
- let t = this.inputIndex,
1164
- e = this.parseLogicalOr();
1165
- if (this.consumeOptionalOperator("?")) {
1166
- let s = this.parsePipe(),
1167
- i;
1168
- if (this.consumeOptionalCharacter(58)) i = this.parsePipe();
1169
- else {
1170
- let n = this.inputIndex,
1171
- a = this.input.substring(t, n);
1172
- this.error(
1173
- `Conditional expression ${a} requires all 3 expressions`,
1174
- ),
1175
- (i = new $(this.span(t), this.sourceSpan(t)));
1176
- }
1177
- return new tt(this.span(t), this.sourceSpan(t), e, s, i);
1178
- } else return e;
1179
- }
1180
- parseLogicalOr() {
1181
- let t = this.inputIndex,
1182
- e = this.parseLogicalAnd();
1183
- for (; this.consumeOptionalOperator("||"); ) {
1184
- let s = this.parseLogicalAnd();
1185
- e = new A(this.span(t), this.sourceSpan(t), "||", e, s);
1186
- }
1187
- return e;
1188
- }
1189
- parseLogicalAnd() {
1190
- let t = this.inputIndex,
1191
- e = this.parseNullishCoalescing();
1192
- for (; this.consumeOptionalOperator("&&"); ) {
1193
- let s = this.parseNullishCoalescing();
1194
- e = new A(this.span(t), this.sourceSpan(t), "&&", e, s);
1195
- }
1196
- return e;
1197
- }
1198
- parseNullishCoalescing() {
1199
- let t = this.inputIndex,
1200
- e = this.parseEquality();
1201
- for (; this.consumeOptionalOperator("??"); ) {
1202
- let s = this.parseEquality();
1203
- e = new A(this.span(t), this.sourceSpan(t), "??", e, s);
1204
- }
1205
- return e;
1206
- }
1207
- parseEquality() {
1208
- let t = this.inputIndex,
1209
- e = this.parseRelational();
1210
- for (; this.next.type == l.Operator; ) {
1211
- let s = this.next.strValue;
1212
- switch (s) {
1213
- case "==":
1214
- case "===":
1215
- case "!=":
1216
- case "!==":
1217
- this.advance();
1218
- let i = this.parseRelational();
1219
- e = new A(this.span(t), this.sourceSpan(t), s, e, i);
1220
- continue;
1221
- }
1222
- break;
1223
- }
1224
- return e;
1225
- }
1226
- parseRelational() {
1227
- let t = this.inputIndex,
1228
- e = this.parseAdditive();
1229
- for (; this.next.type == l.Operator; ) {
1230
- let s = this.next.strValue;
1231
- switch (s) {
1232
- case "<":
1233
- case ">":
1234
- case "<=":
1235
- case ">=":
1236
- this.advance();
1237
- let i = this.parseAdditive();
1238
- e = new A(this.span(t), this.sourceSpan(t), s, e, i);
1239
- continue;
1240
- }
1241
- break;
1242
- }
1243
- return e;
1244
- }
1245
- parseAdditive() {
1246
- let t = this.inputIndex,
1247
- e = this.parseMultiplicative();
1248
- for (; this.next.type == l.Operator; ) {
1249
- let s = this.next.strValue;
1250
- switch (s) {
1251
- case "+":
1252
- case "-":
1253
- this.advance();
1254
- let i = this.parseMultiplicative();
1255
- e = new A(this.span(t), this.sourceSpan(t), s, e, i);
1256
- continue;
1257
- }
1258
- break;
1259
- }
1260
- return e;
1261
- }
1262
- parseMultiplicative() {
1263
- let t = this.inputIndex,
1264
- e = this.parsePrefix();
1265
- for (; this.next.type == l.Operator; ) {
1266
- let s = this.next.strValue;
1267
- switch (s) {
1268
- case "*":
1269
- case "%":
1270
- case "/":
1271
- this.advance();
1272
- let i = this.parsePrefix();
1273
- e = new A(this.span(t), this.sourceSpan(t), s, e, i);
1274
- continue;
1275
- }
1276
- break;
1277
- }
1278
- return e;
1279
- }
1280
- parsePrefix() {
1281
- if (this.next.type == l.Operator) {
1282
- let t = this.inputIndex,
1283
- e = this.next.strValue,
1284
- s;
1285
- switch (e) {
1286
- case "+":
1287
- return (
1288
- this.advance(),
1289
- (s = this.parsePrefix()),
1290
- F.createPlus(this.span(t), this.sourceSpan(t), s)
1291
- );
1292
- case "-":
1293
- return (
1294
- this.advance(),
1295
- (s = this.parsePrefix()),
1296
- F.createMinus(this.span(t), this.sourceSpan(t), s)
1297
- );
1298
- case "!":
1299
- return (
1300
- this.advance(),
1301
- (s = this.parsePrefix()),
1302
- new ct(this.span(t), this.sourceSpan(t), s)
1303
- );
1304
- }
1305
- }
1306
- return this.parseCallChain();
1307
- }
1308
- parseCallChain() {
1309
- let t = this.inputIndex,
1310
- e = this.parsePrimary();
1311
- for (;;)
1312
- if (this.consumeOptionalCharacter(46))
1313
- e = this.parseAccessMember(e, t, !1);
1314
- else if (this.consumeOptionalOperator("?."))
1315
- this.consumeOptionalCharacter(40)
1316
- ? (e = this.parseCall(e, t, !0))
1317
- : (e = this.consumeOptionalCharacter(91)
1318
- ? this.parseKeyedReadOrWrite(e, t, !0)
1319
- : this.parseAccessMember(e, t, !0));
1320
- else if (this.consumeOptionalCharacter(91))
1321
- e = this.parseKeyedReadOrWrite(e, t, !1);
1322
- else if (this.consumeOptionalCharacter(40))
1323
- e = this.parseCall(e, t, !1);
1324
- else if (this.consumeOptionalOperator("!"))
1325
- e = new ht(this.span(t), this.sourceSpan(t), e);
1326
- else return e;
1327
- }
1328
- parsePrimary() {
1329
- let t = this.inputIndex;
1330
- if (this.consumeOptionalCharacter(40)) {
1331
- this.rparensExpected++;
1332
- let e = this.parsePipe();
1333
- return this.rparensExpected--, this.expectCharacter(41), e;
1334
- } else {
1335
- if (this.next.isKeywordNull())
1336
- return (
1337
- this.advance(), new E(this.span(t), this.sourceSpan(t), null)
1338
- );
1339
- if (this.next.isKeywordUndefined())
1340
- return (
1341
- this.advance(), new E(this.span(t), this.sourceSpan(t), void 0)
1342
- );
1343
- if (this.next.isKeywordTrue())
1344
- return this.advance(), new E(this.span(t), this.sourceSpan(t), !0);
1345
- if (this.next.isKeywordFalse())
1346
- return this.advance(), new E(this.span(t), this.sourceSpan(t), !1);
1347
- if (this.next.isKeywordThis())
1348
- return this.advance(), new Lt(this.span(t), this.sourceSpan(t));
1349
- if (this.consumeOptionalCharacter(91)) {
1350
- this.rbracketsExpected++;
1351
- let e = this.parseExpressionList(93);
1352
- return (
1353
- this.rbracketsExpected--,
1354
- this.expectCharacter(93),
1355
- new nt(this.span(t), this.sourceSpan(t), e)
1356
- );
1357
- } else {
1358
- if (this.next.isCharacter(123)) return this.parseLiteralMap();
1359
- if (this.next.isIdentifier())
1360
- return this.parseAccessMember(
1361
- new K(this.span(t), this.sourceSpan(t)),
1362
- t,
1363
- !1,
1364
- );
1365
- if (this.next.isNumber()) {
1366
- let e = this.next.toNumber();
1367
- return this.advance(), new E(this.span(t), this.sourceSpan(t), e);
1368
- } else if (this.next.isString()) {
1369
- let e = this.next.toString();
1370
- return this.advance(), new E(this.span(t), this.sourceSpan(t), e);
1371
- } else
1372
- return this.next.isPrivateIdentifier()
1373
- ? (this._reportErrorForPrivateIdentifier(this.next, null),
1374
- new $(this.span(t), this.sourceSpan(t)))
1375
- : this.index >= this.tokens.length
1376
- ? (this.error(`Unexpected end of expression: ${this.input}`),
1377
- new $(this.span(t), this.sourceSpan(t)))
1378
- : (this.error(`Unexpected token ${this.next}`),
1379
- new $(this.span(t), this.sourceSpan(t)));
1380
- }
1381
- }
1382
- }
1383
- parseExpressionList(t) {
1384
- let e = [];
1385
- do
1386
- if (!this.next.isCharacter(t)) e.push(this.parsePipe());
1387
- else break;
1388
- while (this.consumeOptionalCharacter(44));
1389
- return e;
1390
- }
1391
- parseLiteralMap() {
1392
- let t = [],
1393
- e = [],
1394
- s = this.inputIndex;
1395
- if ((this.expectCharacter(123), !this.consumeOptionalCharacter(125))) {
1396
- this.rbracesExpected++;
1397
- do {
1398
- let i = this.inputIndex,
1399
- n = this.next.isString(),
1400
- a = this.expectIdentifierOrKeywordOrString(),
1401
- o = { key: a, quoted: n };
1402
- if ((t.push(o), n))
1403
- this.expectCharacter(58), e.push(this.parsePipe());
1404
- else if (this.consumeOptionalCharacter(58))
1405
- e.push(this.parsePipe());
1406
- else {
1407
- o.isShorthandInitialized = !0;
1408
- let p = this.span(i),
1409
- u = this.sourceSpan(i);
1410
- e.push(new M(p, u, u, new K(p, u), a));
1411
- }
1412
- } while (
1413
- this.consumeOptionalCharacter(44) &&
1414
- !this.next.isCharacter(125)
1415
- );
1416
- this.rbracesExpected--, this.expectCharacter(125);
1417
- }
1418
- return new at(this.span(s), this.sourceSpan(s), t, e);
1419
- }
1420
- parseAccessMember(t, e, s) {
1421
- let i = this.inputIndex,
1422
- n = this.withContext(gt.Writable, () => {
1423
- let p = this.expectIdentifierOrKeyword() ?? "";
1424
- return (
1425
- p.length === 0 &&
1426
- this.error(
1427
- "Expected identifier for property access",
1428
- t.span.end,
1429
- ),
1430
- p
1431
- );
1432
- }),
1433
- a = this.sourceSpan(i),
1434
- o;
1435
- if (s)
1436
- this.consumeOptionalOperator("=")
1437
- ? (this.error("The '?.' operator cannot be used in the assignment"),
1438
- (o = new $(this.span(e), this.sourceSpan(e))))
1439
- : (o = new _(this.span(e), this.sourceSpan(e), a, t, n));
1440
- else if (this.consumeOptionalOperator("=")) {
1441
- if (!(this.parseFlags & 1))
1442
- return (
1443
- this.error("Bindings cannot contain assignments"),
1444
- new $(this.span(e), this.sourceSpan(e))
1445
- );
1446
- let p = this.parseConditional();
1447
- o = new et(this.span(e), this.sourceSpan(e), a, t, n, p);
1448
- } else o = new M(this.span(e), this.sourceSpan(e), a, t, n);
1449
- return o;
1450
- }
1451
- parseCall(t, e, s) {
1452
- let i = this.inputIndex;
1453
- this.rparensExpected++;
1454
- let n = this.parseCallArguments(),
1455
- a = this.span(i, this.inputIndex).toAbsolute(this.absoluteOffset);
1456
- this.expectCharacter(41), this.rparensExpected--;
1457
- let o = this.span(e),
1458
- p = this.sourceSpan(e);
1459
- return s ? new D(o, p, t, n, a) : new pt(o, p, t, n, a);
1460
- }
1461
- parseCallArguments() {
1462
- if (this.next.isCharacter(41)) return [];
1463
- let t = [];
1464
- do t.push(this.parsePipe());
1465
- while (this.consumeOptionalCharacter(44));
1466
- return t;
1467
- }
1468
- expectTemplateBindingKey() {
1469
- let t = "",
1470
- e = !1,
1471
- s = this.currentAbsoluteOffset;
1472
- do
1473
- (t += this.expectIdentifierOrKeywordOrString()),
1474
- (e = this.consumeOptionalOperator("-")),
1475
- e && (t += "-");
1476
- while (e);
1477
- return { source: t, span: new L(s, s + t.length) };
1478
- }
1479
- parseTemplateBindings(t) {
1480
- let e = [];
1481
- for (
1482
- e.push(...this.parseDirectiveKeywordBindings(t));
1483
- this.index < this.tokens.length;
1484
-
1485
- ) {
1486
- let s = this.parseLetBinding();
1487
- if (s) e.push(s);
1488
- else {
1489
- let i = this.expectTemplateBindingKey(),
1490
- n = this.parseAsBinding(i);
1491
- n
1492
- ? e.push(n)
1493
- : ((i.source =
1494
- t.source +
1495
- i.source.charAt(0).toUpperCase() +
1496
- i.source.substring(1)),
1497
- e.push(...this.parseDirectiveKeywordBindings(i)));
1498
- }
1499
- this.consumeStatementTerminator();
1500
- }
1501
- return new Ht(e, [], this.errors);
1502
- }
1503
- parseKeyedReadOrWrite(t, e, s) {
1504
- return this.withContext(gt.Writable, () => {
1505
- this.rbracketsExpected++;
1506
- let i = this.parsePipe();
1507
- if (
1508
- (i instanceof $ && this.error("Key access cannot be empty"),
1509
- this.rbracketsExpected--,
1510
- this.expectCharacter(93),
1511
- this.consumeOptionalOperator("="))
1512
- )
1513
- if (s)
1514
- this.error("The '?.' operator cannot be used in the assignment");
1515
- else {
1516
- let n = this.parseConditional();
1517
- return new rt(this.span(e), this.sourceSpan(e), t, i, n);
1518
- }
1519
- else
1520
- return s
1521
- ? new U(this.span(e), this.sourceSpan(e), t, i)
1522
- : new st(this.span(e), this.sourceSpan(e), t, i);
1523
- return new $(this.span(e), this.sourceSpan(e));
1524
- });
1525
- }
1526
- parseDirectiveKeywordBindings(t) {
1527
- let e = [];
1528
- this.consumeOptionalCharacter(58);
1529
- let s = this.getDirectiveBoundTarget(),
1530
- i = this.currentAbsoluteOffset,
1531
- n = this.parseAsBinding(t);
1532
- n ||
1533
- (this.consumeStatementTerminator(), (i = this.currentAbsoluteOffset));
1534
- let a = new L(t.span.start, i);
1535
- return e.push(new ut(a, t, s)), n && e.push(n), e;
1536
- }
1537
- getDirectiveBoundTarget() {
1538
- if (this.next === Bt || this.peekKeywordAs() || this.peekKeywordLet())
1539
- return null;
1540
- let t = this.parsePipe(),
1541
- { start: e, end: s } = t.span,
1542
- i = this.input.substring(e, s);
1543
- return new R(t, i, this.location, this.absoluteOffset + e, this.errors);
1544
- }
1545
- parseAsBinding(t) {
1546
- if (!this.peekKeywordAs()) return null;
1547
- this.advance();
1548
- let e = this.expectTemplateBindingKey();
1549
- this.consumeStatementTerminator();
1550
- let s = new L(t.span.start, this.currentAbsoluteOffset);
1551
- return new W(s, e, t);
1552
- }
1553
- parseLetBinding() {
1554
- if (!this.peekKeywordLet()) return null;
1555
- let t = this.currentAbsoluteOffset;
1556
- this.advance();
1557
- let e = this.expectTemplateBindingKey(),
1558
- s = null;
1559
- this.consumeOptionalOperator("=") &&
1560
- (s = this.expectTemplateBindingKey()),
1561
- this.consumeStatementTerminator();
1562
- let i = new L(t, this.currentAbsoluteOffset);
1563
- return new W(i, e, s);
1564
- }
1565
- consumeStatementTerminator() {
1566
- this.consumeOptionalCharacter(59) || this.consumeOptionalCharacter(44);
1567
- }
1568
- error(t, e = null) {
1569
- this.errors.push(
1570
- new Z(t, this.input, this.locationText(e), this.location),
1571
- ),
1572
- this.skip();
1573
- }
1574
- locationText(t = null) {
1575
- return (
1576
- t == null && (t = this.index),
1577
- t < this.tokens.length
1578
- ? `at column ${this.tokens[t].index + 1} in`
1579
- : "at the end of the expression"
1580
- );
1581
- }
1582
- _reportErrorForPrivateIdentifier(t, e) {
1583
- let s = `Private identifiers are not supported. Unexpected private identifier: ${t}`;
1584
- e !== null && (s += `, ${e}`), this.error(s);
1585
- }
1586
- skip() {
1587
- let t = this.next;
1588
- for (
1589
- ;
1590
- this.index < this.tokens.length &&
1591
- !t.isCharacter(59) &&
1592
- !t.isOperator("|") &&
1593
- (this.rparensExpected <= 0 || !t.isCharacter(41)) &&
1594
- (this.rbracesExpected <= 0 || !t.isCharacter(125)) &&
1595
- (this.rbracketsExpected <= 0 || !t.isCharacter(93)) &&
1596
- (!(this.context & gt.Writable) || !t.isOperator("="));
1597
-
1598
- )
1599
- this.next.isError() &&
1600
- this.errors.push(
1601
- new Z(
1602
- this.next.toString(),
1603
- this.input,
1604
- this.locationText(),
1605
- this.location,
1606
- ),
1607
- ),
1608
- this.advance(),
1609
- (t = this.next);
1610
- }
1611
- },
1612
- jt = class extends Rt {
1613
- constructor() {
1614
- super(...arguments), (this.errors = []);
1615
- }
1616
- visitPipe() {
1617
- this.errors.push("pipes");
1618
- }
1619
- };
1620
- function Vs(r) {
1621
- let t = new Map(),
1622
- e = 0,
1623
- s = 0,
1624
- i = 0;
1625
- for (; i < r.length; ) {
1626
- let n = r[i];
1627
- if (n.type === 9) {
1628
- let [a, o] = n.parts;
1629
- (e += o.length), (s += a.length);
1630
- } else {
1631
- let a = n.parts.reduce((o, p) => o + p.length, 0);
1632
- (s += a), (e += a);
1633
- }
1634
- t.set(s, e), i++;
1635
- }
1636
- return t;
1637
- }
1638
- function Ce({ start: r, end: t }, e) {
1639
- let s = r,
1640
- i = t;
1641
- for (; i !== s && /\s/.test(e[i - 1]); ) i--;
1642
- for (; s !== i && /\s/.test(e[s]); ) s++;
1643
- return { start: s, end: i };
1644
- }
1645
- function zs({ start: r, end: t }, e) {
1646
- let s = r,
1647
- i = t;
1648
- for (; i !== e.length && /\s/.test(e[i]); ) i++;
1649
- for (; s !== 0 && /\s/.test(e[s - 1]); ) s--;
1650
- return { start: s, end: i };
1651
- }
1652
- function qs(r, t) {
1653
- return t[r.start - 1] === "(" && t[r.end] === ")"
1654
- ? { start: r.start - 1, end: r.end + 1 }
1655
- : r;
1656
- }
1657
- function Ae(r, t, e) {
1658
- let s = 0,
1659
- i = { start: r.start, end: r.end };
1660
- for (;;) {
1661
- let n = zs(i, t),
1662
- a = qs(n, t);
1663
- if (n.start === a.start && n.end === a.end) break;
1664
- (i.start = a.start), (i.end = a.end), s++;
1665
- }
1666
- return {
1667
- hasParens: (e ? s - 1 : s) !== 0,
1668
- outerSpan: Ce(e ? { start: i.start + 1, end: i.end - 1 } : i, t),
1669
- innerSpan: Ce(r, t),
1670
- };
1671
- }
1672
- function Oe(r) {
1673
- return typeof r == "string" ? (t) => t === r : (t) => r.test(t);
1674
- }
1675
- function Ie(r, t, e) {
1676
- let s = Oe(t);
1677
- for (let i = e; i >= 0; i--) {
1678
- let n = r[i];
1679
- if (s(n)) return i;
1680
- }
1681
- throw new Error(
1682
- `Cannot find front char ${t} from index ${e} in ${JSON.stringify(r)}`,
1683
- );
1684
- }
1685
- function ke(r, t, e) {
1686
- let s = Oe(t);
1687
- for (let i = e; i < r.length; i++) {
1688
- let n = r[i];
1689
- if (s(n)) return i;
1690
- }
1691
- throw new Error(
1692
- `Cannot find character ${t} from index ${e} in ${JSON.stringify(r)}`,
1693
- );
1694
- }
1695
- function Ne(r) {
1696
- return r.slice(0, 1).toLowerCase() + r.slice(1);
1697
- }
1698
- function Ct(r) {
1699
- let { start: t, end: e } = r;
1700
- return { start: t, end: e, range: [t, e] };
1701
- }
1702
- var Hs = (r) => mt.prototype._commentStart(r);
1703
- function js(r, t) {
1704
- let e = t ? Hs(r) : null;
1705
- if (e === null) return { text: r, comments: [] };
1706
- let s = {
1707
- type: "CommentLine",
1708
- value: r.slice(e + 2),
1709
- ...Ct({ start: e, end: r.length }),
1710
- };
1711
- return { text: r.slice(0, e), comments: [s] };
1712
- }
1713
- function At(r, t = !0) {
1714
- return (e) => {
1715
- let s = new yt(),
1716
- i = new mt(s),
1717
- { text: n, comments: a } = js(e, t),
1718
- o = r(n, i);
1719
- if (o.errors.length !== 0) {
1720
- let [{ message: p }] = o.errors;
1721
- throw new SyntaxError(
1722
- p.replace(/^Parser Error: | at column \d+ in [^]*$/g, ""),
1723
- );
1724
- }
1725
- return { result: o, comments: a, text: n };
1726
- };
1727
- }
1728
- var Le = At((r, t) => t.parseBinding(r, "", 0)),
1729
- Ys = At((r, t) => t.parseSimpleBinding(r, "", 0)),
1730
- Re = At((r, t) => t.parseAction(r, "", 0)),
1731
- Pe = At((r, t) => t.parseInterpolationExpression(r, "", 0)),
1732
- be = At((r, t) => t.parseTemplateBindings("", r, "", 0, 0), !1);
1733
- var Js = (r, t, e) => {
1734
- if (!(r && t == null))
1735
- return Array.isArray(t) || typeof t == "string"
1736
- ? t[e < 0 ? t.length + e : e]
1737
- : t.at(e);
1738
- },
1739
- Tt = Js;
1740
- var Yt = class {
1741
- text;
1742
- constructor(t) {
1743
- this.text = t;
1744
- }
1745
- getCharacterIndex(t, e) {
1746
- return ke(this.text, t, e);
1747
- }
1748
- getCharacterLastIndex(t, e) {
1749
- return Ie(this.text, t, e);
1750
- }
1751
- transformSpan(t, { stripSpaces: e = !1, hasParentParens: s = !1 } = {}) {
1752
- if (!e) return Ct(t);
1753
- let { outerSpan: i, innerSpan: n, hasParens: a } = Ae(t, this.text, s),
1754
- o = Ct(n);
1755
- return (
1756
- a &&
1757
- (o.extra = {
1758
- parenthesized: !0,
1759
- parenStart: i.start,
1760
- parenEnd: i.end,
1761
- }),
1762
- o
1763
- );
1764
- }
1765
- createNode(t, { stripSpaces: e = !0, hasParentParens: s = !1 } = {}) {
1766
- let { type: i, start: n, end: a } = t,
1767
- o = {
1768
- ...t,
1769
- ...this.transformSpan(
1770
- { start: n, end: a },
1771
- { stripSpaces: e, hasParentParens: s },
1772
- ),
1773
- };
1774
- switch (i) {
1775
- case "NumericLiteral":
1776
- case "StringLiteral": {
1777
- let p = this.text.slice(o.start, o.end),
1778
- { value: u } = o;
1779
- o.extra = { ...o.extra, raw: p, rawValue: u };
1780
- break;
1781
- }
1782
- case "ObjectProperty": {
1783
- let { shorthand: p } = o;
1784
- p && (o.extra = { ...o.extra, shorthand: p });
1785
- break;
1786
- }
1787
- }
1788
- return o;
1789
- }
1790
- },
1791
- Ke = Yt;
1792
- function Jt(r) {
1793
- var t;
1794
- return !!((t = r.extra) != null && t.parenthesized);
1795
- }
1796
- function k(r) {
1797
- return Jt(r) ? r.extra.parenStart : r.start;
1798
- }
1799
- function N(r) {
1800
- return Jt(r) ? r.extra.parenEnd : r.end;
1801
- }
1802
- function Be(r) {
1803
- return (
1804
- (r.type === "OptionalCallExpression" ||
1805
- r.type === "OptionalMemberExpression") &&
1806
- !Jt(r)
1807
- );
1808
- }
1809
- function Te(r, t) {
1810
- let { start: e, end: s } = r.sourceSpan;
1811
- return e >= s || /^\s+$/.test(t.slice(e, s));
1812
- }
1813
- var kt,
1814
- St,
1815
- h,
1816
- d,
1817
- Ot,
1818
- v,
1819
- Zt,
1820
- It = class extends Ke {
1821
- constructor(e, s) {
1822
- super(s);
1823
- P(this, h);
1824
- P(this, kt);
1825
- P(this, St);
1826
- Y(this, kt, e), Y(this, St, s);
1827
- }
1828
- get node() {
1829
- return c(this, h, v).call(this, O(this, kt));
1830
- }
1831
- transformNode(e) {
1832
- return c(this, h, Zt).call(this, e);
1833
- }
1834
- };
1835
- (kt = new WeakMap()),
1836
- (St = new WeakMap()),
1837
- (h = new WeakSet()),
1838
- (d = function (e, { stripSpaces: s = !0, hasParentParens: i = !1 } = {}) {
1839
- return this.createNode(e, { stripSpaces: s, hasParentParens: i });
1840
- }),
1841
- (Ot = function (
1842
- e,
1843
- s,
1844
- { computed: i, optional: n, end: a = N(s), hasParentParens: o = !1 },
1845
- ) {
1846
- if (Te(e, O(this, St)) || e.sourceSpan.start === s.start) return s;
1847
- let p = c(this, h, v).call(this, e),
1848
- u = Be(p);
1849
- return c(this, h, d).call(
1850
- this,
1851
- {
1852
- type: n || u ? "OptionalMemberExpression" : "MemberExpression",
1853
- object: p,
1854
- property: s,
1855
- computed: i,
1856
- ...(n ? { optional: !0 } : u ? { optional: !1 } : void 0),
1857
- start: k(p),
1858
- end: a,
1859
- },
1860
- { hasParentParens: o },
1861
- );
1862
- }),
1863
- (v = function (e, s = !1) {
1864
- return c(this, h, Zt).call(this, e, s);
1865
- }),
1866
- (Zt = function (e, s = !1) {
1867
- if (e instanceof ot) {
1868
- let { expressions: i } = e;
1869
- if (i.length !== 1) throw new Error("Unexpected 'Interpolation'");
1870
- return c(this, h, v).call(this, i[0]);
1871
- }
1872
- if (e instanceof F)
1873
- return c(this, h, d).call(
1874
- this,
1875
- {
1876
- type: "UnaryExpression",
1877
- prefix: !0,
1878
- argument: c(this, h, v).call(this, e.expr),
1879
- operator: e.operator,
1880
- ...e.sourceSpan,
1881
- },
1882
- { hasParentParens: s },
1883
- );
1884
- if (e instanceof A) {
1885
- let { left: i, operation: n, right: a } = e,
1886
- o = c(this, h, v).call(this, i),
1887
- p = c(this, h, v).call(this, a),
1888
- u = k(o),
1889
- f = N(p),
1890
- S = { left: o, right: p, start: u, end: f };
1891
- return n === "&&" || n === "||" || n === "??"
1892
- ? c(this, h, d).call(
1893
- this,
1894
- { ...S, type: "LogicalExpression", operator: n },
1895
- { hasParentParens: s },
1896
- )
1897
- : c(this, h, d).call(
1898
- this,
1899
- { ...S, type: "BinaryExpression", operator: n },
1900
- { hasParentParens: s },
1901
- );
1902
- }
1903
- if (e instanceof it) {
1904
- let { exp: i, name: n, args: a } = e,
1905
- o = c(this, h, v).call(this, i),
1906
- p = k(o),
1907
- u = N(o),
1908
- f = this.getCharacterIndex(/\S/, this.getCharacterIndex("|", u) + 1),
1909
- S = c(this, h, d).call(this, {
1910
- type: "Identifier",
1911
- name: n,
1912
- start: f,
1913
- end: f + n.length,
1914
- }),
1915
- g = a.map((y) => c(this, h, v).call(this, y));
1916
- return c(this, h, d).call(
1917
- this,
1918
- {
1919
- type: "NGPipeExpression",
1920
- left: o,
1921
- right: S,
1922
- arguments: g,
1923
- start: p,
1924
- end: N(g.length === 0 ? S : Tt(!1, g, -1)),
1925
- },
1926
- { hasParentParens: s },
1927
- );
1928
- }
1929
- if (e instanceof X)
1930
- return c(this, h, d).call(
1931
- this,
1932
- {
1933
- type: "NGChainedExpression",
1934
- expressions: e.expressions.map((i) => c(this, h, v).call(this, i)),
1935
- ...e.sourceSpan,
1936
- },
1937
- { hasParentParens: s },
1938
- );
1939
- if (e instanceof tt) {
1940
- let { condition: i, trueExp: n, falseExp: a } = e,
1941
- o = c(this, h, v).call(this, i),
1942
- p = c(this, h, v).call(this, n),
1943
- u = c(this, h, v).call(this, a);
1944
- return c(this, h, d).call(
1945
- this,
1946
- {
1947
- type: "ConditionalExpression",
1948
- test: o,
1949
- consequent: p,
1950
- alternate: u,
1951
- start: k(o),
1952
- end: N(u),
1953
- },
1954
- { hasParentParens: s },
1955
- );
1956
- }
1957
- if (e instanceof $)
1958
- return c(this, h, d).call(
1959
- this,
1960
- { type: "NGEmptyExpression", ...e.sourceSpan },
1961
- { hasParentParens: s },
1962
- );
1963
- if (e instanceof K)
1964
- return c(this, h, d).call(
1965
- this,
1966
- { type: "ThisExpression", ...e.sourceSpan },
1967
- { hasParentParens: s },
1968
- );
1969
- if (e instanceof st || e instanceof U)
1970
- return c(this, h, Ot).call(
1971
- this,
1972
- e.receiver,
1973
- c(this, h, v).call(this, e.key),
1974
- {
1975
- computed: !0,
1976
- optional: e instanceof U,
1977
- end: e.sourceSpan.end,
1978
- hasParentParens: s,
1979
- },
1980
- );
1981
- if (e instanceof nt)
1982
- return c(this, h, d).call(
1983
- this,
1984
- {
1985
- type: "ArrayExpression",
1986
- elements: e.expressions.map((i) => c(this, h, v).call(this, i)),
1987
- ...e.sourceSpan,
1988
- },
1989
- { hasParentParens: s },
1990
- );
1991
- if (e instanceof at) {
1992
- let { keys: i, values: n } = e,
1993
- a = n.map((p) => c(this, h, v).call(this, p)),
1994
- o = i.map(({ key: p, quoted: u }, f) => {
1995
- let S = a[f],
1996
- g = k(S),
1997
- y = N(S),
1998
- w = this.getCharacterIndex(
1999
- /\S/,
2000
- f === 0
2001
- ? e.sourceSpan.start + 1
2002
- : this.getCharacterIndex(",", N(a[f - 1])) + 1,
2003
- ),
2004
- H =
2005
- g === w
2006
- ? y
2007
- : this.getCharacterLastIndex(
2008
- /\S/,
2009
- this.getCharacterLastIndex(":", g - 1) - 1,
2010
- ) + 1,
2011
- j = { start: w, end: H },
2012
- T = u
2013
- ? c(this, h, d).call(this, {
2014
- type: "StringLiteral",
2015
- value: p,
2016
- ...j,
2017
- })
2018
- : c(this, h, d).call(this, {
2019
- type: "Identifier",
2020
- name: p,
2021
- ...j,
2022
- }),
2023
- Nt = T.end < T.start || w === g;
2024
- return c(this, h, d).call(this, {
2025
- type: "ObjectProperty",
2026
- key: T,
2027
- value: S,
2028
- shorthand: Nt,
2029
- computed: !1,
2030
- start: k(T),
2031
- end: y,
2032
- });
2033
- });
2034
- return c(this, h, d).call(
2035
- this,
2036
- { type: "ObjectExpression", properties: o, ...e.sourceSpan },
2037
- { hasParentParens: s },
2038
- );
2039
- }
2040
- if (e instanceof E) {
2041
- let { value: i } = e;
2042
- switch (typeof i) {
2043
- case "boolean":
2044
- return c(this, h, d).call(
2045
- this,
2046
- { type: "BooleanLiteral", value: i, ...e.sourceSpan },
2047
- { hasParentParens: s },
2048
- );
2049
- case "number":
2050
- return c(this, h, d).call(
2051
- this,
2052
- { type: "NumericLiteral", value: i, ...e.sourceSpan },
2053
- { hasParentParens: s },
2054
- );
2055
- case "object":
2056
- return c(this, h, d).call(
2057
- this,
2058
- { type: "NullLiteral", ...e.sourceSpan },
2059
- { hasParentParens: s },
2060
- );
2061
- case "string":
2062
- return c(this, h, d).call(
2063
- this,
2064
- { type: "StringLiteral", value: i, ...e.sourceSpan },
2065
- { hasParentParens: s },
2066
- );
2067
- case "undefined":
2068
- return c(this, h, d).call(
2069
- this,
2070
- { type: "Identifier", name: "undefined", ...e.sourceSpan },
2071
- { hasParentParens: s },
2072
- );
2073
- default:
2074
- throw new Error(
2075
- `Unexpected LiteralPrimitive value type ${typeof i}`,
2076
- );
2077
- }
2078
- }
2079
- if (e instanceof pt || e instanceof D) {
2080
- let i = e instanceof D,
2081
- { receiver: n, args: a } = e,
2082
- o =
2083
- a.length === 1
2084
- ? [c(this, h, v).call(this, a[0], !0)]
2085
- : a.map((S) => c(this, h, v).call(this, S)),
2086
- p = c(this, h, v).call(this, n),
2087
- u = Be(p),
2088
- f = i || u ? "OptionalCallExpression" : "CallExpression";
2089
- return c(this, h, d).call(
2090
- this,
2091
- {
2092
- type: f,
2093
- callee: p,
2094
- arguments: o,
2095
- optional: f === "OptionalCallExpression" ? i : void 0,
2096
- start: k(p),
2097
- end: e.sourceSpan.end,
2098
- },
2099
- { hasParentParens: s },
2100
- );
2101
- }
2102
- if (e instanceof ht) {
2103
- let i = c(this, h, v).call(this, e.expression);
2104
- return c(this, h, d).call(
2105
- this,
2106
- {
2107
- type: "TSNonNullExpression",
2108
- expression: i,
2109
- start: k(i),
2110
- end: e.sourceSpan.end,
2111
- },
2112
- { hasParentParens: s },
2113
- );
2114
- }
2115
- if (e instanceof ct) {
2116
- let i = c(this, h, v).call(this, e.expression);
2117
- return c(this, h, d).call(
2118
- this,
2119
- {
2120
- type: "UnaryExpression",
2121
- prefix: !0,
2122
- operator: "!",
2123
- argument: i,
2124
- start: e.sourceSpan.start,
2125
- end: N(i),
2126
- },
2127
- { hasParentParens: s },
2128
- );
2129
- }
2130
- if (e instanceof M || e instanceof _) {
2131
- let { receiver: i, name: n } = e,
2132
- a = this.getCharacterLastIndex(/\S/, e.sourceSpan.end - 1) + 1,
2133
- o = c(this, h, d).call(
2134
- this,
2135
- { type: "Identifier", name: n, start: a - n.length, end: a },
2136
- Te(i, O(this, St)) ? { hasParentParens: s } : {},
2137
- );
2138
- return c(this, h, Ot).call(this, i, o, {
2139
- computed: !1,
2140
- optional: e instanceof _,
2141
- hasParentParens: s,
2142
- });
2143
- }
2144
- if (e instanceof rt) {
2145
- let i = c(this, h, v).call(this, e.key),
2146
- n = c(this, h, v).call(this, e.value),
2147
- a = c(this, h, Ot).call(this, e.receiver, i, {
2148
- computed: !0,
2149
- optional: !1,
2150
- end: this.getCharacterIndex("]", N(i)) + 1,
2151
- });
2152
- return c(this, h, d).call(
2153
- this,
2154
- {
2155
- type: "AssignmentExpression",
2156
- left: a,
2157
- operator: "=",
2158
- right: n,
2159
- start: k(a),
2160
- end: N(n),
2161
- },
2162
- { hasParentParens: s },
2163
- );
2164
- }
2165
- if (e instanceof et) {
2166
- let { receiver: i, name: n, value: a } = e,
2167
- o = c(this, h, v).call(this, a),
2168
- p =
2169
- this.getCharacterLastIndex(
2170
- /\S/,
2171
- this.getCharacterLastIndex("=", k(o) - 1) - 1,
2172
- ) + 1,
2173
- u = c(this, h, d).call(this, {
2174
- type: "Identifier",
2175
- name: n,
2176
- start: p - n.length,
2177
- end: p,
2178
- }),
2179
- f = c(this, h, Ot).call(this, i, u, { computed: !1, optional: !1 });
2180
- return c(this, h, d).call(
2181
- this,
2182
- {
2183
- type: "AssignmentExpression",
2184
- left: f,
2185
- operator: "=",
2186
- right: o,
2187
- start: k(f),
2188
- end: N(o),
2189
- },
2190
- { hasParentParens: s },
2191
- );
2192
- }
2193
- throw Object.assign(new Error("Unexpected node"), { node: e });
2194
- });
2195
- function Me(r, t) {
2196
- return new It(r, t).node;
2197
- }
2198
- function _e(r) {
2199
- return r instanceof ut;
2200
- }
2201
- function Ue(r) {
2202
- return r instanceof W;
2203
- }
2204
- var wt,
2205
- q,
2206
- x,
2207
- Fe,
2208
- C,
2209
- te,
2210
- ee,
2211
- se,
2212
- De,
2213
- We,
2214
- Ge,
2215
- Ve,
2216
- Xt = class extends It {
2217
- constructor(e, s) {
2218
- super(void 0, s);
2219
- P(this, x);
2220
- P(this, wt);
2221
- P(this, q);
2222
- Y(this, wt, e), Y(this, q, s);
2223
- for (let i of e) c(this, x, De).call(this, i);
2224
- }
2225
- get expressions() {
2226
- return c(this, x, Ge).call(this);
2227
- }
2228
- };
2229
- (wt = new WeakMap()),
2230
- (q = new WeakMap()),
2231
- (x = new WeakSet()),
2232
- (Fe = function () {
2233
- return O(this, wt)[0].key;
2234
- }),
2235
- (C = function (e, { stripSpaces: s = !0 } = {}) {
2236
- return this.createNode(e, { stripSpaces: s });
2237
- }),
2238
- (te = function (e) {
2239
- return this.transformNode(e);
2240
- }),
2241
- (ee = function (e) {
2242
- return Ne(e.slice(O(this, x, Fe).source.length));
2243
- }),
2244
- (se = function (e) {
2245
- let s = O(this, q);
2246
- if (s[e.start] !== '"' && s[e.start] !== "'") return;
2247
- let i = s[e.start],
2248
- n = !1;
2249
- for (let a = e.start + 1; a < s.length; a++)
2250
- switch (s[a]) {
2251
- case i:
2252
- if (!n) {
2253
- e.end = a + 1;
2254
- return;
2255
- }
2256
- default:
2257
- n = !1;
2258
- break;
2259
- case "\\":
2260
- n = !n;
2261
- break;
2262
- }
2263
- }),
2264
- (De = function (e) {
2265
- c(this, x, se).call(this, e.key.span),
2266
- Ue(e) && e.value && c(this, x, se).call(this, e.value.span);
2267
- }),
2268
- (We = function (e) {
2269
- if (!e.value || e.value.source) return e.value;
2270
- let s = this.getCharacterIndex(/\S/, e.sourceSpan.start);
2271
- return { source: "$implicit", span: { start: s, end: s } };
2272
- }),
2273
- (Ge = function () {
2274
- let e = O(this, wt),
2275
- [s] = e,
2276
- i =
2277
- O(this, q).slice(s.sourceSpan.start, s.sourceSpan.end).trim()
2278
- .length === 0
2279
- ? e.slice(1)
2280
- : e,
2281
- n = [],
2282
- a = null;
2283
- for (let [o, p] of i.entries()) {
2284
- if (a && _e(a) && Ue(p) && p.value && p.value.source === a.key.source) {
2285
- let u = c(this, x, C).call(this, {
2286
- type: "NGMicrosyntaxKey",
2287
- name: p.key.source,
2288
- ...p.key.span,
2289
- }),
2290
- f = (y, w) => ({
2291
- ...y,
2292
- ...this.transformSpan({ start: y.start, end: w }),
2293
- }),
2294
- S = (y) => ({ ...f(y, u.end), alias: u }),
2295
- g = n.pop();
2296
- if (g.type === "NGMicrosyntaxExpression") n.push(S(g));
2297
- else if (g.type === "NGMicrosyntaxKeyedExpression") {
2298
- let y = S(g.expression);
2299
- n.push(f({ ...g, expression: y }, y.end));
2300
- } else throw new Error(`Unexpected type ${g.type}`);
2301
- } else n.push(c(this, x, Ve).call(this, p, o));
2302
- a = p;
2303
- }
2304
- return c(this, x, C).call(this, {
2305
- type: "NGMicrosyntax",
2306
- body: n,
2307
- ...(n.length === 0
2308
- ? e[0].sourceSpan
2309
- : { start: n[0].start, end: Tt(!1, n, -1).end }),
2310
- });
2311
- }),
2312
- (Ve = function (e, s) {
2313
- if (_e(e)) {
2314
- let { key: i, value: n } = e;
2315
- return n
2316
- ? s === 0
2317
- ? c(this, x, C).call(this, {
2318
- type: "NGMicrosyntaxExpression",
2319
- expression: c(this, x, te).call(this, n.ast),
2320
- alias: null,
2321
- ...n.sourceSpan,
2322
- })
2323
- : c(this, x, C).call(this, {
2324
- type: "NGMicrosyntaxKeyedExpression",
2325
- key: c(this, x, C).call(this, {
2326
- type: "NGMicrosyntaxKey",
2327
- name: c(this, x, ee).call(this, i.source),
2328
- ...i.span,
2329
- }),
2330
- expression: c(this, x, C).call(this, {
2331
- type: "NGMicrosyntaxExpression",
2332
- expression: c(this, x, te).call(this, n.ast),
2333
- alias: null,
2334
- ...n.sourceSpan,
2335
- }),
2336
- start: i.span.start,
2337
- end: n.sourceSpan.end,
2338
- })
2339
- : c(this, x, C).call(this, {
2340
- type: "NGMicrosyntaxKey",
2341
- name: c(this, x, ee).call(this, i.source),
2342
- ...i.span,
2343
- });
2344
- } else {
2345
- let { key: i, sourceSpan: n } = e;
2346
- if (/^let\s$/.test(O(this, q).slice(n.start, n.start + 4))) {
2347
- let { value: o } = e;
2348
- return c(this, x, C).call(this, {
2349
- type: "NGMicrosyntaxLet",
2350
- key: c(this, x, C).call(this, {
2351
- type: "NGMicrosyntaxKey",
2352
- name: i.source,
2353
- ...i.span,
2354
- }),
2355
- value: o
2356
- ? c(this, x, C).call(this, {
2357
- type: "NGMicrosyntaxKey",
2358
- name: o.source,
2359
- ...o.span,
2360
- })
2361
- : null,
2362
- start: n.start,
2363
- end: o ? o.span.end : i.span.end,
2364
- });
2365
- } else {
2366
- let o = c(this, x, We).call(this, e);
2367
- return c(this, x, C).call(this, {
2368
- type: "NGMicrosyntaxAs",
2369
- key: c(this, x, C).call(this, {
2370
- type: "NGMicrosyntaxKey",
2371
- name: o.source,
2372
- ...o.span,
2373
- }),
2374
- alias: c(this, x, C).call(this, {
2375
- type: "NGMicrosyntaxKey",
2376
- name: i.source,
2377
- ...i.span,
2378
- }),
2379
- start: o.span.start,
2380
- end: i.span.end,
2381
- });
2382
- }
2383
- }
2384
- });
2385
- function Qe(r, t) {
2386
- return new Xt(r, t).expressions;
2387
- }
2388
- function Mt({ result: { ast: r }, text: t, comments: e }) {
2389
- return Object.assign(Me(r, t), { comments: e });
2390
- }
2391
- function ze({ result: { templateBindings: r }, text: t }) {
2392
- return Qe(r, t);
2393
- }
2394
- var qe = (r) => Mt(Le(r));
2395
- var He = (r) => Mt(Pe(r)),
2396
- re = (r) => Mt(Re(r)),
2397
- je = (r) => ze(be(r));
2398
- function ie(r) {
2399
- var s, i, n;
2400
- let t = ((s = r.range) == null ? void 0 : s[0]) ?? r.start,
2401
- e =
2402
- (n =
2403
- ((i = r.declaration) == null ? void 0 : i.decorators) ??
2404
- r.decorators) == null
2405
- ? void 0
2406
- : n[0];
2407
- return e ? Math.min(ie(e), t) : t;
2408
- }
2409
- function Ye(r) {
2410
- var t;
2411
- return ((t = r.range) == null ? void 0 : t[1]) ?? r.end;
2412
- }
2413
- function _t(r) {
2414
- return {
2415
- astFormat: "estree",
2416
- parse(t) {
2417
- let e = r(t);
2418
- return {
2419
- type: "NGRoot",
2420
- node:
2421
- r === re && e.type !== "NGChainedExpression"
2422
- ? { ...e, type: "NGChainedExpression", expressions: [e] }
2423
- : e,
2424
- };
2425
- },
2426
- locStart: ie,
2427
- locEnd: Ye,
2428
- };
2429
- }
2430
- var Xs = _t(re),
2431
- tr = _t(qe),
2432
- er = _t(He),
2433
- sr = _t(je);
2434
- return ss(rr);
2435
- });
1
+ (function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var lt=Object.defineProperty;var Or=Object.getOwnPropertyDescriptor;var Dr=Object.getOwnPropertyNames;var Br=Object.getPrototypeOf,Fr=Object.prototype.hasOwnProperty;var Vr=Reflect.get;var vn=t=>{throw TypeError(t)};var wn=(t,e)=>{for(var n in e)lt(t,n,{get:e[n],enumerable:!0})},Ur=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Dr(e))!Fr.call(t,r)&&r!==n&&lt(t,r,{get:()=>e[r],enumerable:!(s=Or(e,r))||s.enumerable});return t};var Hr=t=>Ur(lt({},"__esModule",{value:!0}),t);var ct=(t,e,n)=>e.has(t)||vn("Cannot "+n);var j=(t,e,n)=>(ct(t,e,"read from private field"),n?n.call(t):e.get(t)),Me=(t,e,n)=>e.has(t)?vn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ut=(t,e,n,s)=>(ct(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),v=(t,e,n)=>(ct(t,e,"access private method"),n);var xn=(t,e,n)=>Vr(Br(t),n,e);var uo={};wn(uo,{parsers:()=>dn});var dn={};wn(dn,{__ng_action:()=>oo,__ng_binding:()=>ao,__ng_directive:()=>co,__ng_interpolation:()=>lo});function Wr(t){return typeof t=="string"?e=>e===t:e=>t.test(e)}function En(t,e,n){let s=Wr(e);for(let r=n;r<t.length;r++){let i=t[r];if(s(i))return r}throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`)}function yn(t){return t.slice(0,1).toLowerCase()+t.slice(1)}function Re(t){let{start:e,end:n}=t;return{start:e,end:n,range:[e,n]}}function Sn(t){return!!t.extra?.parenthesized}function ve(t){return t.type==="TSNonNullExpression"&&!Sn(t)?ve(t.expression):(t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression")&&!Sn(t)}var mo=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var Cn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Cn||(Cn={}));var _n;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t[t.Eager=1]="Eager"})(_n||(_n={}));var kn;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(kn||(kn={}));var P;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING"})(P||(P={}));var Tn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Tn||(Tn={}));var bn;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(bn||(bn={}));var An;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(An||(An={}));var In;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(In||(In={}));var Nn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Nn||(Nn={}));var Pn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(Pn||(Pn={}));var Ln;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(Ln||(Ln={}));var Mn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(Mn||(Mn={}));var u;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Assign=2]="Assign",t[t.Identical=3]="Identical",t[t.NotIdentical=4]="NotIdentical",t[t.Minus=5]="Minus",t[t.Plus=6]="Plus",t[t.Divide=7]="Divide",t[t.Multiply=8]="Multiply",t[t.Modulo=9]="Modulo",t[t.And=10]="And",t[t.Or=11]="Or",t[t.BitwiseOr=12]="BitwiseOr",t[t.BitwiseAnd=13]="BitwiseAnd",t[t.Lower=14]="Lower",t[t.LowerEquals=15]="LowerEquals",t[t.Bigger=16]="Bigger",t[t.BiggerEquals=17]="BiggerEquals",t[t.NullishCoalesce=18]="NullishCoalesce",t[t.Exponentiation=19]="Exponentiation",t[t.In=20]="In",t[t.InstanceOf=21]="InstanceOf",t[t.AdditionAssignment=22]="AdditionAssignment",t[t.SubtractionAssignment=23]="SubtractionAssignment",t[t.MultiplicationAssignment=24]="MultiplicationAssignment",t[t.DivisionAssignment=25]="DivisionAssignment",t[t.RemainderAssignment=26]="RemainderAssignment",t[t.ExponentiationAssignment=27]="ExponentiationAssignment",t[t.AndAssignment=28]="AndAssignment",t[t.OrAssignment=29]="OrAssignment",t[t.NullishCoalesceAssignment=30]="NullishCoalesceAssignment"})(u||(u={}));function qr(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function jr(t,e,n){let s=t.length;if(s!==e.length)return!1;for(let r=0;r<s;r++)if(!n(t[r],e[r]))return!1;return!0}function oe(t,e){return jr(t,e,(n,s)=>n.isEquivalent(s))}var S=class{type;sourceSpan;constructor(e,n){this.type=e||null,this.sourceSpan=n||null}prop(e,n){return new St(this,e,null,n)}key(e,n,s){return new Et(this,e,n,s)}callFn(e,n,s){return new mt(this,e,null,n,s)}instantiate(e,n,s){return new gt(this,e,n,s)}conditional(e,n=null,s){return new xt(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)}},ft=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)}},dt=class t 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 t&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr.clone())}};var mt=class t 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 t&&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 t(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure)}};var gt=class t extends S{classExpr;args;constructor(e,n,s,r){super(s,r),this.classExpr=e,this.args=n}isEquivalent(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&oe(this.args,e.args)}isConstant(){return!1}visitExpression(e,n){return e.visitInstantiateExpr(this,n)}clone(){return new t(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},vt=class t extends S{body;flags;constructor(e,n,s){super(null,s),this.body=e,this.flags=n}isEquivalent(e){return e instanceof t&&this.body===e.body&&this.flags===e.flags}isConstant(){return!0}visitExpression(e,n){return e.visitRegularExpressionLiteral(this,n)}clone(){return new t(this.body,this.flags,this.sourceSpan)}},Oe=class t extends S{value;constructor(e,n,s){super(n,s),this.value=e}isEquivalent(e){return e instanceof t&&this.value===e.value}isConstant(){return!0}visitExpression(e,n){return e.visitLiteralExpr(this,n)}clone(){return new t(this.value,this.type,this.sourceSpan)}};var wt=class t extends S{value;typeParams;constructor(e,n,s=null,r){super(n,r),this.value=e,this.typeParams=s}isEquivalent(e){return e instanceof t&&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 t(this.value,this.type,this.typeParams,this.sourceSpan)}};var xt=class t 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 t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&qr(this.falseCase,e.falseCase)}isConstant(){return!1}visitExpression(e,n){return e.visitConditionalExpr(this,n)}clone(){return new t(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var w=class t 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 t&&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 t(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}},St=class t 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 t&&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 t(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},Et=class t extends S{receiver;index;constructor(e,n,s,r){super(s,r),this.receiver=e,this.index=n}isEquivalent(e){return e instanceof t&&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 t(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},yt=class t 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 t&&oe(this.entries,e.entries)}visitExpression(e,n){return e.visitLiteralArrayExpr(this,n)}clone(){return new t(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}};var Ct=class t{expression;constructor(e){this.expression=e}isEquivalent(e){return e instanceof t&&this.expression.isEquivalent(e.expression)}clone(){return new t(this.expression.clone())}isConstant(){return this.expression.isConstant()}},_t=class t 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 t&&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 t(e,this.type,this.sourceSpan)}};var kt=class t extends S{expression;constructor(e,n){super(null,n),this.expression=e}isEquivalent(e){return e instanceof t&&this.expression.isEquivalent(e.expression)}isConstant(){return this.expression.isConstant()}visitExpression(e,n){return e.visitSpreadElementExpr(this,n)}clone(){return new t(this.expression.clone(),this.sourceSpan)}},ae;(function(t){t[t.None=0]="None",t[t.Final=1]="Final",t[t.Private=2]="Private",t[t.Exported=4]="Exported",t[t.Static=8]="Static"})(ae||(ae={}));var 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)}},Tt=class t 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 t&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,n){return e.visitDeclareVarStmt(this,n)}};var De=class t extends le{expr;constructor(e,n,s){super(ae.None,n,s),this.expr=e}isEquivalent(e){return e instanceof t&&this.expr.isEquivalent(e.expr)}visitStatement(e,n){return e.visitExpressionStmt(this,n)}},Be=class t extends le{value;constructor(e,n=null,s){super(ae.None,n,s),this.value=e}isEquivalent(e){return e instanceof t&&this.value.isEquivalent(e.value)}visitStatement(e,n){return e.visitReturnStmt(this,n)}},bt=class t 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 t&&this.condition.isEquivalent(e.condition)&&oe(this.trueCase,e.trueCase)&&oe(this.falseCase,e.falseCase)}visitStatement(e,n){return e.visitIfStmt(this,n)}};var Rn=class t{static INSTANCE=new t;keyOf(e){if(e instanceof Oe&&typeof e.value=="string")return`"${e.value}"`;if(e instanceof Oe)return String(e.value);if(e instanceof vt)return`/${e.body}/${e.flags??""}`;if(e instanceof yt){let n=[];for(let s of e.entries)n.push(this.keyOf(s));return`[${n.join(",")}]`}else if(e instanceof _t){let n=[];for(let s of e.entries)if(s instanceof Ct)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 wt)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof ft)return`read(${e.name})`;if(e instanceof dt)return`typeof(${this.keyOf(e.expr)})`;if(e instanceof kt)return`...${this.keyOf(e.expression)}`;throw new Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}}};var 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}};var At=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(".")}};var go=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,"??="]]);var $n;(function(t){t[t.Class=0]="Class",t[t.Function=1]="Function"})($n||($n={}));var 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)}},It=class extends g{visit(e,n=null){return e.visitThisReceiver?.(this,n)}},Nt=class extends g{expressions;constructor(e,n,s){super(e,n),this.expressions=s}visit(e,n=null){return e.visitChain(this,n)}},Pt=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)}},Lt=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)}},Mt=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)}},Ce;(function(t){t[t.ReferencedByName=0]="ReferencedByName",t[t.ReferencedDirectly=1]="ReferencedDirectly"})(Ce||(Ce={}));var Rt=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)}},$t=class extends g{expressions;constructor(e,n,s){super(e,n),this.expressions=s}visit(e,n=null){return e.visitLiteralArray(this,n)}},Ot=class extends g{expression;constructor(e,n,s){super(e,n),this.expression=s}visit(e,n=null){return e.visitSpreadElement(this,n)}},Dt=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)}},zr=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 t extends E{operator;expr;left=null;right=null;operation=null;static createMinus(e,n,s){return new t(e,n,"-",s,"-",new I(e,n,0),s)}static createPlus(e,n,s){return new t(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)}},Bt=class extends g{expression;constructor(e,n,s){super(e,n),this.expression=s}visit(e,n=null){return e.visitNonNullAssert(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.visitCall(this,n)}},Vt=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)}},Ut=class{name;span;sourceSpan;constructor(e,n,s){this.name=e,this.span=n,this.sourceSpan=s}},Ht=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)}},Wt=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}},qt=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)}};var On;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LITERAL_ATTR=1]="LITERAL_ATTR",t[t.LEGACY_ANIMATION=2]="LEGACY_ANIMATION",t[t.TWO_WAY=3]="TWO_WAY",t[t.ANIMATION=4]="ANIMATION"})(On||(On={}));var Dn;(function(t){t[t.Regular=0]="Regular",t[t.LegacyAnimation=1]="LegacyAnimation",t[t.TwoWay=2]="TwoWay",t[t.Animation=3]="Animation"})(Dn||(Dn={}));var M;(function(t){t[t.Property=0]="Property",t[t.Attribute=1]="Attribute",t[t.Class=2]="Class",t[t.Style=3]="Style",t[t.LegacyAnimation=4]="LegacyAnimation",t[t.TwoWay=5]="TwoWay",t[t.Animation=6]="Animation"})(M||(M={}));var Bn;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(Bn||(Bn={}));var Gr="ctx";var we=0;var ws=9,$e=10,Xr=11,Jr=12,Yr=13,xs=32,Qr=33,Ss=34,Kr=35,en=36,Zr=37,Fn=38,Es=39,X=40,N=41,Vn=42,ys=43,F=44,Cs=45,z=46,ze=47,J=58,Ee=59,ei=60,y=61,Un=62,Hn=63,ti=48;var ni=57,tn=65,si=69;var nn=90,ie=91,pt=92,Q=93,ri=94,Ze=95,_s=97;var ii=101,oi=102,ai=110,li=114,ci=116,ui=117,pi=118;var ks=122,ke=123,Wn=124,ne=125,Ts=160;var jt=96;function hi(t){return t>=ws&&t<=xs||t==Ts}function G(t){return ti<=t&&t<=ni}function zt(t){return t>=_s&&t<=ks||t>=tn&&t<=nn}function qn(t){return t===Es||t===Ss||t===jt}var Ge=class t{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 t(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]==`
2
+ `&&++p==n)););for(a=0,p=0;a<e&&i<s.length-1&&(i++,a++,!(s[i]==`
3
+ `&&++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)}},Ye;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(Ye||(Ye={}));var 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}`}};var jn;(function(t){t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit"})(jn||(jn={}));var zn;(function(t){t[t.Global=0]="Global",t[t.Local=1]="Local"})(zn||(zn={}));var Gn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(Gn||(Gn={}));var fi="(:(where|is)\\()?";var bs="-shadowcsshost",di="-shadowcsscontext",Gt="[^)(]*",mi=`(?:\\(${Gt}\\)|${Gt})+?`,gi=`(?:\\(${mi}\\)|${Gt})+?`,sn=`(?:\\((${gi})\\))`,xo=new RegExp("(:nth-[-\\w]+)"+sn,"g"),So=new RegExp(bs+sn+"?([^,{]*)","gim"),vi=di+sn+"?([^{]*)",Eo=new RegExp(`${fi}(${vi})`,"gim"),wi=bs+"-no-combinator",yo=new RegExp(`${wi}(?![^(]*\\))`,"g");var As="%COMMENT%",Co=new RegExp(As,"g");var _o=new RegExp(`(\\s*(?:${As}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g");var xi="%COMMA_IN_PLACEHOLDER%",Si="%SEMI_IN_PLACEHOLDER%",Ei="%COLON_IN_PLACEHOLDER%",ko=new RegExp(xi,"g"),To=new RegExp(Si,"g"),bo=new RegExp(Ei,"g");var l;(function(t){t[t.ListEnd=0]="ListEnd",t[t.Statement=1]="Statement",t[t.Variable=2]="Variable",t[t.ElementStart=3]="ElementStart",t[t.Element=4]="Element",t[t.Template=5]="Template",t[t.ElementEnd=6]="ElementEnd",t[t.ContainerStart=7]="ContainerStart",t[t.Container=8]="Container",t[t.ContainerEnd=9]="ContainerEnd",t[t.DisableBindings=10]="DisableBindings",t[t.ConditionalCreate=11]="ConditionalCreate",t[t.ConditionalBranchCreate=12]="ConditionalBranchCreate",t[t.Conditional=13]="Conditional",t[t.EnableBindings=14]="EnableBindings",t[t.Text=15]="Text",t[t.Listener=16]="Listener",t[t.InterpolateText=17]="InterpolateText",t[t.Binding=18]="Binding",t[t.Property=19]="Property",t[t.StyleProp=20]="StyleProp",t[t.ClassProp=21]="ClassProp",t[t.StyleMap=22]="StyleMap",t[t.ClassMap=23]="ClassMap",t[t.Advance=24]="Advance",t[t.Pipe=25]="Pipe",t[t.Attribute=26]="Attribute",t[t.ExtractedAttribute=27]="ExtractedAttribute",t[t.Defer=28]="Defer",t[t.DeferOn=29]="DeferOn",t[t.DeferWhen=30]="DeferWhen",t[t.I18nMessage=31]="I18nMessage",t[t.DomProperty=32]="DomProperty",t[t.Namespace=33]="Namespace",t[t.ProjectionDef=34]="ProjectionDef",t[t.Projection=35]="Projection",t[t.RepeaterCreate=36]="RepeaterCreate",t[t.Repeater=37]="Repeater",t[t.TwoWayProperty=38]="TwoWayProperty",t[t.TwoWayListener=39]="TwoWayListener",t[t.DeclareLet=40]="DeclareLet",t[t.StoreLet=41]="StoreLet",t[t.I18nStart=42]="I18nStart",t[t.I18n=43]="I18n",t[t.I18nEnd=44]="I18nEnd",t[t.I18nExpression=45]="I18nExpression",t[t.I18nApply=46]="I18nApply",t[t.IcuStart=47]="IcuStart",t[t.IcuEnd=48]="IcuEnd",t[t.IcuPlaceholder=49]="IcuPlaceholder",t[t.I18nContext=50]="I18nContext",t[t.I18nAttributes=51]="I18nAttributes",t[t.SourceLocation=52]="SourceLocation",t[t.Animation=53]="Animation",t[t.AnimationString=54]="AnimationString",t[t.AnimationBinding=55]="AnimationBinding",t[t.AnimationListener=56]="AnimationListener",t[t.Control=57]="Control",t[t.ControlCreate=58]="ControlCreate"})(l||(l={}));var Z;(function(t){t[t.LexicalRead=0]="LexicalRead",t[t.Context=1]="Context",t[t.TrackContext=2]="TrackContext",t[t.ReadVariable=3]="ReadVariable",t[t.NextContext=4]="NextContext",t[t.Reference=5]="Reference",t[t.StoreLet=6]="StoreLet",t[t.ContextLetReference=7]="ContextLetReference",t[t.GetCurrentView=8]="GetCurrentView",t[t.RestoreView=9]="RestoreView",t[t.ResetView=10]="ResetView",t[t.PureFunctionExpr=11]="PureFunctionExpr",t[t.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",t[t.PipeBinding=13]="PipeBinding",t[t.PipeBindingVariadic=14]="PipeBindingVariadic",t[t.SafePropertyRead=15]="SafePropertyRead",t[t.SafeKeyedRead=16]="SafeKeyedRead",t[t.SafeInvokeFunction=17]="SafeInvokeFunction",t[t.SafeTernaryExpr=18]="SafeTernaryExpr",t[t.EmptyExpr=19]="EmptyExpr",t[t.AssignTemporaryExpr=20]="AssignTemporaryExpr",t[t.ReadTemporaryExpr=21]="ReadTemporaryExpr",t[t.SlotLiteralExpr=22]="SlotLiteralExpr",t[t.ConditionalCase=23]="ConditionalCase",t[t.ConstCollected=24]="ConstCollected",t[t.TwoWayBindingSet=25]="TwoWayBindingSet",t[t.ArrowFunction=26]="ArrowFunction"})(Z||(Z={}));var Xn;(function(t){t[t.None=0]="None",t[t.AlwaysInline=1]="AlwaysInline"})(Xn||(Xn={}));var Jn;(function(t){t[t.Context=0]="Context",t[t.Identifier=1]="Identifier",t[t.SavedView=2]="SavedView",t[t.Alias=3]="Alias"})(Jn||(Jn={}));var R;(function(t){t[t.Attribute=0]="Attribute",t[t.ClassName=1]="ClassName",t[t.StyleProperty=2]="StyleProperty",t[t.Property=3]="Property",t[t.Template=4]="Template",t[t.I18n=5]="I18n",t[t.LegacyAnimation=6]="LegacyAnimation",t[t.TwoWayProperty=7]="TwoWayProperty",t[t.Animation=8]="Animation"})(R||(R={}));var Yn;(function(t){t[t.Creation=0]="Creation",t[t.Postproccessing=1]="Postproccessing"})(Yn||(Yn={}));var Qn;(function(t){t[t.I18nText=0]="I18nText",t[t.I18nAttribute=1]="I18nAttribute"})(Qn||(Qn={}));var Kn;(function(t){t[t.None=0]="None",t[t.ElementTag=1]="ElementTag",t[t.TemplateTag=2]="TemplateTag",t[t.OpenTag=4]="OpenTag",t[t.CloseTag=8]="CloseTag",t[t.ExpressionIndex=16]="ExpressionIndex"})(Kn||(Kn={}));var Zn;(function(t){t[t.HTML=0]="HTML",t[t.SVG=1]="SVG",t[t.Math=2]="Math"})(Zn||(Zn={}));var $;(function(t){t[t.Idle=0]="Idle",t[t.Immediate=1]="Immediate",t[t.Timer=2]="Timer",t[t.Hover=3]="Hover",t[t.Interaction=4]="Interaction",t[t.Viewport=5]="Viewport",t[t.Never=6]="Never"})($||($={}));var es;(function(t){t[t.RootI18n=0]="RootI18n",t[t.Icu=1]="Icu",t[t.Attr=2]="Attr"})(es||(es={}));var ts;(function(t){t[t.NgTemplate=0]="NgTemplate",t[t.Structural=1]="Structural",t[t.Block=2]="Block"})(ts||(ts={}));var Xt=class t{static nextListId=0;debugListId=t.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}t.assertIsNotEnd(e),t.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)t.assertIsNotEnd(r),t.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;){t.assertIsOwned(e,this.debugListId);let n=e.next;yield e,e=n}}*reversed(){let e=this.tail.prev;for(;e!==this.head;){t.assertIsOwned(e,this.debugListId);let n=e.prev;yield e,e=n}}static replace(e,n){t.assertIsNotEnd(e),t.assertIsNotEnd(n),t.assertIsOwned(e),t.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){t.remove(e);return}t.assertIsNotEnd(e),t.assertIsOwned(e);let s=e.debugListId;e.debugListId=null;for(let d of n)t.assertIsNotEnd(d),t.assertIsUnowned(d);let{prev:r,next:i}=e;e.prev=null,e.next=null;let a=r;for(let d of n)t.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){t.assertIsNotEnd(e),t.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)t.insertBefore(s,n);return}if(t.assertIsOwned(n),n.prev===null)throw new Error("AssertionError: illegal operation on list start");t.assertIsNotEnd(e),t.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(t.assertIsOwned(n),n.next===null)throw new Error("AssertionError: illegal operation on list end");t.assertIsNotEnd(e),t.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")}};function yi(t){return{kind:l.Statement,statement:t,...Ci}}var Ci={debugListId:null,prev:null,next:null},_i=Symbol("ConsumesSlot"),Is=Symbol("DependsOnSlotContext"),fe=Symbol("ConsumesVars"),et=Symbol("UsesVarOffset"),Ao={[_i]:!0,numSlotsUsed:1},Io={[Is]:!0},No={[fe]:!0};var 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}`)}};var ee=class extends S{constructor(e=null){super(null,e)}};var ns=class t extends ee{target;value;sourceSpan;kind=Z.StoreLet;[fe]=!0;[Is]=!0;constructor(e,n,s){super(),this.target=e,this.value=n,this.sourceSpan=s}visitExpression(){}isEquivalent(e){return e instanceof t&&e.target===this.target&&e.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(e,n){this.value=(this.value,void 0)}clone(){return new t(this.target,this.value,this.sourceSpan)}};var ss=class t 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 t)||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 t(this.body?.clone()??null,this.args.map(n=>n.clone()));return e.fn=this.fn?.clone()??null,e.varOffset=this.varOffset,e}};var rs=class t 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 t(this.target,this.targetSlot,this.name,this.args.map(n=>n.clone()));return e.varOffset=this.varOffset,e}},is=class t 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 t(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return e.varOffset=this.varOffset,e}};var os=class t extends ee{parameters;body;kind=Z.ArrowFunction;[fe]=!0;[et]=!0;contextName=Gr;currentViewName="view";varOffset=null;ops;constructor(e,n){super(),this.parameters=e,this.body=n,this.ops=new Xt,this.ops.push([yi(new Be(n,n.sourceSpan))])}visitExpression(e,n){for(let s of this.ops)ki(s,r=>{r.visitExpression(e,n)})}isEquivalent(e){return e instanceof t&&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 t(this.parameters,this.body);return e.varOffset=this.varOffset,e.ops=this.ops,e}};function ki(t,e){Qe(t,(n,s)=>(e(n,s),n),W.None)}var W;(function(t){t[t.None=0]="None",t[t.InChildOperation=1]="InChildOperation",t[t.InArrowFunctionOperation=2]="InArrowFunctionOperation"})(W||(W={}));function ht(t,e,n){for(let s=0;s<t.expressions.length;s++)t.expressions[s]=(t.expressions[s],void 0)}function Qe(t,e,n){switch(t.kind){case l.StyleProp:case l.StyleMap:case l.ClassProp:case l.ClassMap:case l.AnimationString:case l.AnimationBinding:case l.Binding:t.expression instanceof pe?ht(t.expression,e,n):t.expression=(t.expression,void 0);break;case l.Property:case l.DomProperty:case l.Attribute:t.expression instanceof pe?ht(t.expression,e,n):t.expression=(t.expression,void 0),t.sanitizer=t.sanitizer&&(t.sanitizer,void 0);break;case l.TwoWayProperty:t.expression=(t.expression,void 0),t.sanitizer=t.sanitizer&&(t.sanitizer,void 0);break;case l.I18nExpression:t.expression=(t.expression,void 0);break;case l.InterpolateText:ht(t.interpolation,e,n);break;case l.Statement:Jt(t.statement,e,n);break;case l.Variable:t.initializer=(t.initializer,void 0);break;case l.Conditional:for(let s of t.conditions)s.expr!==null&&(s.expr=(s.expr,void 0));t.processed!==null&&(t.processed=(t.processed,void 0)),t.contextValue!==null&&(t.contextValue=(t.contextValue,void 0));break;case l.Animation:case l.AnimationListener:case l.Listener:case l.TwoWayListener:for(let s of t.handlerOps)Qe(s,e,n|W.InChildOperation);break;case l.ExtractedAttribute:t.expression=t.expression&&(t.expression,void 0),t.trustedValueFn=t.trustedValueFn&&(t.trustedValueFn,void 0);break;case l.RepeaterCreate:if(t.trackByOps===null)t.track=(t.track,void 0);else for(let s of t.trackByOps)Qe(s,e,n|W.InChildOperation);t.trackByFn!==null&&(t.trackByFn=(t.trackByFn,void 0));break;case l.Repeater:t.collection=(t.collection,void 0);break;case l.Defer:t.loadingConfig!==null&&(t.loadingConfig=(t.loadingConfig,void 0)),t.placeholderConfig!==null&&(t.placeholderConfig=(t.placeholderConfig,void 0)),t.resolverFn!==null&&(t.resolverFn=(t.resolverFn,void 0));break;case l.I18nMessage:for(let[s,r]of t.params)t.params.set(s,void 0);for(let[s,r]of t.postprocessingParams)t.postprocessingParams.set(s,void 0);break;case l.DeferWhen:t.expr=(t.expr,void 0);break;case l.StoreLet:t.value=(t.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[t.kind]}`)}}function Jt(t,e,n){if(t instanceof De)t.expr=(t.expr,void 0);else if(t instanceof Be)t.value=(t.value,void 0);else if(t instanceof Tt)t.value!==void 0&&(t.value=(t.value,void 0));else if(t instanceof bt){t.condition=(t.condition,void 0);for(let s of t.trueCase)Jt(s,e,n);for(let s of t.falseCase)Jt(s,e,n)}else throw new Error(`Unhandled statement kind: ${t.constructor.name}`)}var Po=new Set([l.Element,l.ElementStart,l.Container,l.ContainerStart,l.Template,l.RepeaterCreate,l.ConditionalCreate,l.ConditionalBranchCreate]);var as;(function(t){t[t.Tmpl=0]="Tmpl",t[t.Host=1]="Host",t[t.Both=2]="Both"})(as||(as={}));var ls;(function(t){t[t.Full=0]="Full",t[t.DomOnly=1]="DomOnly"})(ls||(ls={}));var Lo=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]]);var Mo=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]]);var Ro=Object.freeze([]);var $o=new Map([[l.ElementEnd,[l.ElementStart,l.Element]],[l.ContainerEnd,[l.ContainerStart,l.Container]],[l.I18nEnd,[l.I18nStart,l.I18n]]]),Oo=new Set([l.Pipe]);var Ti={},bi="\uE500";Ti.ngsp=bi;var cs;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(cs||(cs={}));var Ns=` \f
4
+ \r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,Do=new RegExp(`[^${Ns}]`),Bo=new RegExp(`[${Ns}]{2,}`,"g");var f;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error"})(f||(f={}));var H;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(H||(H={}));var Ai=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],Le=class{tokenize(e){return new Yt(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}};function xe(t,e,n){return new b(t,e,f.Character,n,String.fromCharCode(n))}function Ii(t,e,n){return new b(t,e,f.Identifier,0,n)}function Ni(t,e,n){return new b(t,e,f.PrivateIdentifier,0,n)}function Pi(t,e,n){return new b(t,e,f.Keyword,0,n)}function B(t,e,n){return new b(t,e,f.Operator,0,n)}function Li(t,e,n){return new b(t,e,f.Number,n,"")}function Mi(t,e,n){return new b(t,e,f.Error,0,n)}function Ri(t,e,n){return new b(t,e,f.RegExpBody,0,n)}function $i(t,e,n){return new b(t,e,f.RegExpFlags,0,n)}var Se=new b(-1,-1,f.Character,0,""),Yt=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<=xs;)if(++r>=n){s=we;break}else s=e.charCodeAt(r);if(this.peek=s,this.index=r,r>=n)return null;if(us(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 Es:case Ss:return this.scanString();case jt:return this.advance(),this.scanTemplateLiteralPart(i);case Kr:return this.scanPrivateIdentifier();case ys:return this.scanComplexOperator(i,"+",y,"=");case Cs:return this.scanComplexOperator(i,"-",y,"=");case ze:return this.isStartOfRegex()?this.scanRegex(r):this.scanComplexOperator(i,"/",y,"=");case Zr:return this.scanComplexOperator(i,"%",y,"=");case ri:return this.scanOperator(i,"^");case Vn:return this.scanStar(i);case Hn:return this.scanQuestion(i);case ei:case Un:return this.scanComplexOperator(i,String.fromCharCode(s),y,"=");case Qr:return this.scanComplexOperator(i,"!",y,"=",y,"=");case y:return this.scanEquals(i);case Fn:return this.scanComplexOperator(i,"&",Fn,"&",y,"=");case Wn:return this.scanComplexOperator(i,"|",Wn,"|",y,"=");case Ts:for(;hi(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===Un)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();ps(this.peek);)this.advance();let n=this.input.substring(e,this.index);return Ai.indexOf(n)>-1?Pi(e,this.index,n):Ii(e,this.index,n)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!us(this.peek))return this.error("Invalid character [#]",-1);for(;ps(this.peek);)this.advance();let n=this.input.substring(e,this.index);return Ni(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(Oi(this.peek)){if(this.advance(),Di(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?Fi(r):parseFloat(r);return Li(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==pt){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===Hn?(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!==jt;)if(this.peek===pt){let i=this.scanStringBackslash(n,s);if(typeof i!="string")return i;n=i,s=this.index}else if(this.peek===en){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 Mi(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===ui){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=Bi(this.peek),this.advance();return e+=String.fromCharCode(s),e}scanStar(e){this.advance();let n="*";return this.peek===Vn?(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===pt)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=Ri(e,this.index,i),p=this.scanRegexFlags(this.index);return p!==null?(this.tokens.push(a),p):a}scanRegexFlags(e){if(!zt(this.peek))return null;for(;zt(this.peek);)this.advance();return $i(e,this.index,this.input.substring(e,this.index))}};function us(t){return _s<=t&&t<=ks||tn<=t&&t<=nn||t==Ze||t==en}function ps(t){return zt(t)||G(t)||t==Ze||t==en}function Oi(t){return t==ii||t==si}function Di(t){return t==Cs||t==ys}function Bi(t){switch(t){case ai:return $e;case oi:return Jr;case li:return Yr;case ci:return ws;case pi:return Xr;default:return t}}function Fi(t){let e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}var Qt=class{strings;expressions;offsets;constructor(e,n,s){this.strings=e,this.expressions=n,this.offsets=s}},Kt=class{templateBindings;warnings;errors;constructor(e,n,s){this.templateBindings=e,this.warnings=n,this.errors=s}};function V(t){return t.start.toString()||"(unknown)"}var 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 Zt;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 zr(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?Vi(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 mn=ge+T.length,gn=e.substring(q,ge);gn.trim().length===0&&s.push(re("Blank expressions are not allowed in interpolated strings",e,`at column ${d} in`,n)),a.push({text:gn,start:C,end:mn});let $r=(h?.get(C)??C)+k.length;p.push($r),d=mn,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 Qt(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&&qn(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];qn(e.charCodeAt(i))&&(s===null||s===a)&&r%2===0?s=s===null?a:null:s===null&&(yield i),r=a==="\\"?r+1:0}}},se;(function(t){t[t.None=0]="None",t[t.Writable=1]="Writable"})(se||(se={}));var hs=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=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 Nt(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>=tn&&d<=nn?Ce.ReferencedDirectly:Ce.ReferencedByName}else h=Ce.ReferencedByName;n=new Rt(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 Pt(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 Bt(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 It(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 $t(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 Dt(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 Lt(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 Vt(p,h,e,i,a):new Ft(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 Ot(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 Kt(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 Mt(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=new Set;for(let a=0;a<n.strValue.length;a++){let p=n.strValue[a];hs.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(hs,h=>`"${h}"`).join(", "),n.index+a)}}let s=e.index,r=n?n.end:e.end;return new Wt(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 Ht(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 Ut(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}};function re(t,e,n,s){n.length>0&&(n=` ${n} `);let r=V(s),i=`Parser Error: ${t}${n}[${e}] in ${r}`;return new Pe(s,i)}var Zt=class extends qt{errors=[];visitPipe(){this.errors.push("pipes")}};function Vi(t){let e=new Map,n=0,s=0,r=0;for(;r<t.length;){let i=t[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}var Ui=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"})),Fo=Array.from(Ui).reduce((t,[e,n])=>(t.set(e,n),t),new Map);var Vo=new he(new Le);function L(t){return e=>e.kind===t}function be(t,e){return n=>n.kind===t&&e===n.expression instanceof pe}function Hi(t){return(t.kind===l.Property||t.kind===l.TwoWayProperty)&&!(t.expression instanceof pe)}var Uo=[{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:Hi},{test:be(l.Attribute,!1)},{test:L(l.Control)}],Ho=[{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)}],Wo=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]);function Ke(t){return t.slice(t.length-1)}var qo=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}]]);var jo=[c.pipeBind1,c.pipeBind2,c.pipeBind3,c.pipeBind4];var zo={constant:[c.interpolate,c.interpolate1,c.interpolate2,c.interpolate3,c.interpolate4,c.interpolate5,c.interpolate6,c.interpolate7,c.interpolate8],variable:c.interpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}};var Go=new Map([["window",c.resolveWindow],["document",c.resolveDocument],["body",c.resolveBody]]);var Xo=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]]),Jo=new Map([[P.HTML,c.trustConstantHtml],[P.RESOURCE_URL,c.trustConstantResourceUrl]]);var fs;(function(t){t[t.None=0]="None",t[t.ViewContextRead=1]="ViewContextRead",t[t.ViewContextWrite=2]="ViewContextWrite",t[t.SideEffectful=4]="SideEffectful"})(fs||(fs={}));var Yo=new Set([l.Container,l.ContainerStart,l.ContainerEnd,l.Element,l.ElementStart,l.ElementEnd,l.Template]);var Qo=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]]);var Ko=Symbol("queryAdvancePlaceholder");var ds;(function(t){t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER"})(ds||(ds={}));var ms;(function(t){t.IDLE="idle",t.TIMER="timer",t.INTERACTION="interaction",t.IMMEDIATE="immediate",t.HOVER="hover",t.VIEWPORT="viewport",t.NEVER="never"})(ms||(ms={}));var Ps="%COMP%",Zo=`_nghost-${Ps}`,ea=`_ngcontent-${Ps}`;var gs;(function(t){t[t.Extract=0]="Extract",t[t.Merge=1]="Merge"})(gs||(gs={}));var vs;(function(t){t[t.Selector=0]="Selector",t[t.HostDirective=1]="HostDirective"})(vs||(vs={}));var ta=new At("21.2.8");var Wi="test.html";function Ls(t){let e=new Xe(t,Wi),n=new Ge(e,0,0,0),s=n.moveBy(t.length);return{text:t,file:e,start:n,end:s,sourceSpan:new Je(n,s)}}var qi;function Ms(){return qi??(qi=new he(new Le))}var ji=t=>he.prototype._commentStart(t);function zi(t){let e=ji(t);return e===null?[]:[{type:"CommentLine",value:t.slice(e+2),...Re({start:e,end:t.length})}]}function Rs(t){let{result:e}=t;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=t.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 t}var tt=t=>e=>{let n=Ls(e);return Rs({...n,result:Ms()[t](e,n.sourceSpan,0),comments:zi(e)})},$s=tt("parseAction"),Os=tt("parseBinding"),Ds=tt("parseSimpleBinding"),Bs=tt("parseInterpolationExpression"),Fs=t=>{let e=Ls(t);return Rs({...e,result:Ms().parseTemplateBindings("",t,e.sourceSpan,0,0),comments:[]})};var nt=class{text;constructor(t){this.text=t}getCharacterIndex(t,e){return En(this.text,t,e)}transformSpan(t){return Re(t)}createNode(t,e){let n=t.start,s=t.end,r=t.range;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]);if(!(typeof n=="number"&&typeof s=="number"&&r))throw new Error("Missing location information");let i={...t,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}};var Vs=Object.defineProperty,Us=(t,e)=>{let n={};for(var s in t)Vs(n,s,{get:t[s],enumerable:!0});return e&&Vs(n,Symbol.toStringTag,{value:"Module"}),n};var Hs=(t,e)=>({type:"ArrayExpression",elements:e.transformChildren(t.expressions)});var Gi={id:null,generator:!1,async:!1,expression:!0},Ws=(t,e)=>({type:"ArrowFunctionExpression",params:t.parameters.map(n=>e.createNode({type:"Identifier",name:n.name},n.sourceSpan)),body:e.transformChild(t.body),...Gi});var qs=(t,e)=>e.transformChild(t.ast);var Xi=t=>t==="&&"||t==="||"||t==="??",js=(t,e)=>{let{operation:n}=t,[s,r]=e.transformChildren([t.left,t.right]);return Xi(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}};var Ji={optional:!1},Yi={optional:!0},zs=({optional:t})=>(e,n)=>{let s=n.transformChildren(e.args),r=n.transformChild(e.receiver);return t||ve(r)?{type:"OptionalCallExpression",callee:r,arguments:s,optional:t}:{type:"CallExpression",callee:r,arguments:s}},Gs=zs(Ji),Xs=zs(Yi);var Js=(t,e)=>({type:"NGChainedExpression",expressions:e.transformChildren(t.expressions)});var Ys=(t,e)=>{let[n,s,r]=e.transformChildren([t.condition,t.trueExp,t.falseExp]);return{type:"ConditionalExpression",test:n,consequent:s,alternate:r}};var Qs=()=>({type:"NGEmptyExpression"});var Ks=(t,e)=>{let{expressions:n}=t;if(n.length!==1)throw new Error("Unexpected 'Interpolation'");return e.transformChild(n[0])};var Zs=t=>{let{value:e}=t;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}`)}},er=t=>({type:"RegExpLiteral",pattern:t.body,flags:t.flags??""});var Qi={computed:!0,optional:!1},Ki={computed:!0,optional:!0},Zi={computed:!1,optional:!1},eo={computed:!1,optional:!0},st=({computed:t,optional:e})=>(n,s)=>{let{receiver:r}=n,i;if(t){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:t}:{type:"MemberExpression",property:i,object:a,computed:t}},tr=st(Qi),nr=st(Ki),sr=st(Zi),rr=st(eo);var ir=(t,e)=>({type:"TSNonNullExpression",expression:e.transformChild(t.expression)});var or=(t,e)=>{let{keys:n,values:s}=t,r=(i,a=t)=>e.create(i,a,[t,...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)})}};var ar=(t,e)=>e.transformChild(t.expression);var lr=(t,e)=>({type:"NGPipeExpression",left:e.transformChild(t.exp),right:e.create({type:"Identifier",name:t.name},t.nameSpan),arguments:e.transformChildren(t.args)});var cr=(t,e)=>({type:"SpreadElement",argument:e.transformChild(t.expression)});var ur=(t,e)=>({type:"TaggedTemplateExpression",tag:e.transformChild(t.tag),quasi:e.transformChild(t.template)}),pr=(t,e)=>({type:"TemplateLiteral",quasis:e.transformChildren(t.elements),expressions:e.transformChildren(t.expressions)}),hr=(t,e)=>{let[n]=e.ancestors,{elements:s}=n,r=s.indexOf(t),i=r===0,a=r===s.length-1,p=t.sourceSpan.end-(a?1:0),h=t.sourceSpan.start+(i?1:0),d=e.text.slice(h,p);return{type:"TemplateElement",value:{cooked:t.text,raw:d},tail:a,range:[h,p]}};var fr=()=>({type:"ThisExpression"});var rn=t=>(e,n)=>({type:"UnaryExpression",prefix:!0,operator:t,argument:n.transformChild(e.expression)}),dr=rn("!"),mr=rn("typeof"),gr=rn("void"),vr=(t,e)=>({type:"UnaryExpression",prefix:!0,argument:e.transformChild(t.expr),operator:t.operator});var to=t=>{throw new Error(`Unexpected node type '${t.constructor.name}'`)},wr=to;var xr=Us({visitASTWithSource:()=>qs,visitArrowFunction:()=>Ws,visitBinary:()=>js,visitCall:()=>Gs,visitChain:()=>Js,visitConditional:()=>Ys,visitEmptyExpr:()=>Qs,visitImplicitReceiver:()=>wr,visitInterpolation:()=>Ks,visitKeyedRead:()=>tr,visitLiteralArray:()=>Hs,visitLiteralMap:()=>or,visitLiteralPrimitive:()=>Zs,visitNonNullAssert:()=>ir,visitParenthesizedExpression:()=>ar,visitPipe:()=>lr,visitPrefixNot:()=>dr,visitPropertyRead:()=>sr,visitRegularExpressionLiteral:()=>er,visitSafeCall:()=>Xs,visitSafeKeyedRead:()=>nr,visitSafePropertyRead:()=>rr,visitSpreadElement:()=>cr,visitTaggedTemplateLiteral:()=>ur,visitTemplateLiteral:()=>pr,visitTemplateLiteralElement:()=>hr,visitThisReceiver:()=>fr,visitTypeofExpression:()=>mr,visitUnary:()=>vr,visitVoidExpression:()=>gr});var Sr=xr;var rt=class on 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 on({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(Sr,this);return this.create(n,this.node)}static transform(e,n){return new on({node:e,text:n,ancestors:[]}).transform()}};var Er=class extends rt{constructor(t){super({node:t,text:t.source})}};var yr=(t,e)=>rt.transform(t,e),Cr=t=>new Er(t).transform();var _r=(t,e)=>(n,s,...r)=>n|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,r);function no(t){return this[t<0?this.length+t:t]}var so=_r("at",function(){if(Array.isArray(this)||typeof this=="string")return no}),kr=so;function Tr(t){return t instanceof Ne}function br(t){return t instanceof ue}var de,te,m,Ar,_,an,ln,cn,Ir,Nr,Pr,Lr,me,ro=(me=class extends nt{constructor(n,s){super(s);Me(this,m);Me(this,de);Me(this,te);ut(this,de,n),ut(this,te,s);for(let r of n)v(this,m,Ir).call(this,r)}get expressions(){return v(this,m,Pr).call(this)}},de=new WeakMap,te=new WeakMap,m=new WeakSet,Ar=function(){return j(this,de)[0].key},_=function(n,s){return xn(me.prototype,this,"createNode").call(this,n,s)},an=function(n){return yr(n,this.text)},ln=function(n){return yn(n.slice(j(this,m,Ar).source.length))},cn=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}},Ir=function(n){v(this,m,cn).call(this,n.key.span),br(n)&&n.value&&v(this,m,cn).call(this,n.value.span)},Nr=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}}},Pr=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&&Tr(a)&&br(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,Lr).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:kr(0,i,-1).end})},Lr=function(n,s){if(Tr(n)){let{key:r,value:i}=n;return i?s===0?v(this,m,_).call(this,{type:"NGMicrosyntaxExpression",expression:v(this,m,an).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,ln).call(this,r.source)},r.span),expression:v(this,m,_).call(this,{type:"NGMicrosyntaxExpression",expression:v(this,m,an).call(this,i.ast),alias:null},i)},[r.span.start,i.sourceSpan.end]):v(this,m,_).call(this,{type:"NGMicrosyntaxKey",name:v(this,m,ln).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,Nr).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);function Mr(t,e){return new ro(t,e).expressions}var it=t=>e=>{let{result:n,comments:s}=t(e);return Object.assign(Cr(n),{comments:s})},ot=it($s),un=it(Os),io=it(Ds),pn=it(Bs),hn=t=>Mr(Fs(t).result.templateBindings,t);function fn(t){let e=t.range?.[0]??t.start,n=(t.declaration?.decorators??t.decorators)?.[0];return n?Math.min(fn(n),e):e}function Rr(t){return t.range?.[1]??t.end}function at(t){return{astFormat:"estree",parse(e){let n=t(e),{comments:s}=n;return delete n.comments,t===ot&&n.type!=="NGChainedExpression"&&(n={...n,type:"NGChainedExpression",expressions:[n]}),{type:"NGRoot",node:n,comments:s}},locStart:fn,locEnd:Rr}}var oo=at(ot),ao=at(un),lo=at(pn),co=at(hn);return Hr(uo);});