@angular-eslint/bundled-angular-compiler 20.1.2-alpha.9 → 20.2.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 (2) hide show
  1. package/dist/index.js +1231 -782
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  BinaryOperator: () => BinaryOperator,
33
33
  BinaryOperatorExpr: () => BinaryOperatorExpr,
34
34
  BindingPipe: () => BindingPipe,
35
+ BindingPipeType: () => BindingPipeType,
35
36
  BindingType: () => BindingType,
36
37
  Block: () => Block,
37
38
  BlockParameter: () => BlockParameter,
@@ -42,6 +43,7 @@ __export(index_exports, {
42
43
  Call: () => Call,
43
44
  Chain: () => Chain,
44
45
  ChangeDetectionStrategy: () => ChangeDetectionStrategy,
46
+ CombinedRecursiveAstVisitor: () => CombinedRecursiveAstVisitor,
45
47
  CommaExpr: () => CommaExpr,
46
48
  Comment: () => Comment2,
47
49
  CompilerConfig: () => CompilerConfig,
@@ -85,7 +87,6 @@ __export(index_exports, {
85
87
  JSDocComment: () => JSDocComment,
86
88
  JitEvaluator: () => JitEvaluator,
87
89
  KeyedRead: () => KeyedRead,
88
- KeyedWrite: () => KeyedWrite,
89
90
  LeadingComment: () => LeadingComment,
90
91
  LetDeclaration: () => LetDeclaration2,
91
92
  Lexer: () => Lexer,
@@ -118,10 +119,8 @@ __export(index_exports, {
118
119
  ParsedPropertyType: () => ParsedPropertyType,
119
120
  ParsedVariable: () => ParsedVariable,
120
121
  Parser: () => Parser2,
121
- ParserError: () => ParserError,
122
122
  PrefixNot: () => PrefixNot,
123
123
  PropertyRead: () => PropertyRead,
124
- PropertyWrite: () => PropertyWrite,
125
124
  R3Identifiers: () => Identifiers,
126
125
  R3NgModuleMetadataKind: () => R3NgModuleMetadataKind,
127
126
  R3SelectorScopeMode: () => R3SelectorScopeMode,
@@ -214,9 +213,6 @@ __export(index_exports, {
214
213
  VoidExpr: () => VoidExpr,
215
214
  VoidExpression: () => VoidExpression,
216
215
  WrappedNodeExpr: () => WrappedNodeExpr,
217
- WriteKeyExpr: () => WriteKeyExpr,
218
- WritePropExpr: () => WritePropExpr,
219
- WriteVarExpr: () => WriteVarExpr,
220
216
  Xliff: () => Xliff,
221
217
  Xliff2: () => Xliff2,
222
218
  Xmb: () => Xmb,
@@ -283,7 +279,7 @@ __export(index_exports, {
283
279
  });
284
280
  module.exports = __toCommonJS(index_exports);
285
281
 
286
- // ../../node_modules/.pnpm/@angular+compiler@20.0.6/node_modules/@angular/compiler/fesm2022/compiler.mjs
282
+ // ../../node_modules/.pnpm/@angular+compiler@20.2.1/node_modules/@angular/compiler/fesm2022/compiler.mjs
287
283
  var _SELECTOR_REGEXP = new RegExp(
288
284
  `(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
289
285
  // 8: ","
@@ -1174,24 +1170,34 @@ var BinaryOperator;
1174
1170
  (function(BinaryOperator2) {
1175
1171
  BinaryOperator2[BinaryOperator2["Equals"] = 0] = "Equals";
1176
1172
  BinaryOperator2[BinaryOperator2["NotEquals"] = 1] = "NotEquals";
1177
- BinaryOperator2[BinaryOperator2["Identical"] = 2] = "Identical";
1178
- BinaryOperator2[BinaryOperator2["NotIdentical"] = 3] = "NotIdentical";
1179
- BinaryOperator2[BinaryOperator2["Minus"] = 4] = "Minus";
1180
- BinaryOperator2[BinaryOperator2["Plus"] = 5] = "Plus";
1181
- BinaryOperator2[BinaryOperator2["Divide"] = 6] = "Divide";
1182
- BinaryOperator2[BinaryOperator2["Multiply"] = 7] = "Multiply";
1183
- BinaryOperator2[BinaryOperator2["Modulo"] = 8] = "Modulo";
1184
- BinaryOperator2[BinaryOperator2["And"] = 9] = "And";
1185
- BinaryOperator2[BinaryOperator2["Or"] = 10] = "Or";
1186
- BinaryOperator2[BinaryOperator2["BitwiseOr"] = 11] = "BitwiseOr";
1187
- BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 12] = "BitwiseAnd";
1188
- BinaryOperator2[BinaryOperator2["Lower"] = 13] = "Lower";
1189
- BinaryOperator2[BinaryOperator2["LowerEquals"] = 14] = "LowerEquals";
1190
- BinaryOperator2[BinaryOperator2["Bigger"] = 15] = "Bigger";
1191
- BinaryOperator2[BinaryOperator2["BiggerEquals"] = 16] = "BiggerEquals";
1192
- BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 17] = "NullishCoalesce";
1193
- BinaryOperator2[BinaryOperator2["Exponentiation"] = 18] = "Exponentiation";
1194
- BinaryOperator2[BinaryOperator2["In"] = 19] = "In";
1173
+ BinaryOperator2[BinaryOperator2["Assign"] = 2] = "Assign";
1174
+ BinaryOperator2[BinaryOperator2["Identical"] = 3] = "Identical";
1175
+ BinaryOperator2[BinaryOperator2["NotIdentical"] = 4] = "NotIdentical";
1176
+ BinaryOperator2[BinaryOperator2["Minus"] = 5] = "Minus";
1177
+ BinaryOperator2[BinaryOperator2["Plus"] = 6] = "Plus";
1178
+ BinaryOperator2[BinaryOperator2["Divide"] = 7] = "Divide";
1179
+ BinaryOperator2[BinaryOperator2["Multiply"] = 8] = "Multiply";
1180
+ BinaryOperator2[BinaryOperator2["Modulo"] = 9] = "Modulo";
1181
+ BinaryOperator2[BinaryOperator2["And"] = 10] = "And";
1182
+ BinaryOperator2[BinaryOperator2["Or"] = 11] = "Or";
1183
+ BinaryOperator2[BinaryOperator2["BitwiseOr"] = 12] = "BitwiseOr";
1184
+ BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 13] = "BitwiseAnd";
1185
+ BinaryOperator2[BinaryOperator2["Lower"] = 14] = "Lower";
1186
+ BinaryOperator2[BinaryOperator2["LowerEquals"] = 15] = "LowerEquals";
1187
+ BinaryOperator2[BinaryOperator2["Bigger"] = 16] = "Bigger";
1188
+ BinaryOperator2[BinaryOperator2["BiggerEquals"] = 17] = "BiggerEquals";
1189
+ BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 18] = "NullishCoalesce";
1190
+ BinaryOperator2[BinaryOperator2["Exponentiation"] = 19] = "Exponentiation";
1191
+ BinaryOperator2[BinaryOperator2["In"] = 20] = "In";
1192
+ BinaryOperator2[BinaryOperator2["AdditionAssignment"] = 21] = "AdditionAssignment";
1193
+ BinaryOperator2[BinaryOperator2["SubtractionAssignment"] = 22] = "SubtractionAssignment";
1194
+ BinaryOperator2[BinaryOperator2["MultiplicationAssignment"] = 23] = "MultiplicationAssignment";
1195
+ BinaryOperator2[BinaryOperator2["DivisionAssignment"] = 24] = "DivisionAssignment";
1196
+ BinaryOperator2[BinaryOperator2["RemainderAssignment"] = 25] = "RemainderAssignment";
1197
+ BinaryOperator2[BinaryOperator2["ExponentiationAssignment"] = 26] = "ExponentiationAssignment";
1198
+ BinaryOperator2[BinaryOperator2["AndAssignment"] = 27] = "AndAssignment";
1199
+ BinaryOperator2[BinaryOperator2["OrAssignment"] = 28] = "OrAssignment";
1200
+ BinaryOperator2[BinaryOperator2["NullishCoalesceAssignment"] = 29] = "NullishCoalesceAssignment";
1195
1201
  })(BinaryOperator || (BinaryOperator = {}));
1196
1202
  function nullSafeIsEquivalent(base, other) {
1197
1203
  if (base == null || other == null) {
@@ -1328,7 +1334,7 @@ var ReadVarExpr = class _ReadVarExpr extends Expression {
1328
1334
  return new _ReadVarExpr(this.name, this.type, this.sourceSpan);
1329
1335
  }
1330
1336
  set(value) {
1331
- return new WriteVarExpr(this.name, value, null, this.sourceSpan);
1337
+ return new BinaryOperatorExpr(BinaryOperator.Assign, this, value, null, this.sourceSpan);
1332
1338
  }
1333
1339
  };
1334
1340
  var TypeofExpr = class _TypeofExpr extends Expression {
@@ -1397,88 +1403,6 @@ var WrappedNodeExpr = class _WrappedNodeExpr extends Expression {
1397
1403
  return new _WrappedNodeExpr(this.node, this.type, this.sourceSpan);
1398
1404
  }
1399
1405
  };
1400
- var WriteVarExpr = class _WriteVarExpr extends Expression {
1401
- static {
1402
- __name(this, "WriteVarExpr");
1403
- }
1404
- name;
1405
- value;
1406
- constructor(name, value, type, sourceSpan) {
1407
- super(type || value.type, sourceSpan);
1408
- this.name = name;
1409
- this.value = value;
1410
- }
1411
- isEquivalent(e) {
1412
- return e instanceof _WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
1413
- }
1414
- isConstant() {
1415
- return false;
1416
- }
1417
- visitExpression(visitor, context) {
1418
- return visitor.visitWriteVarExpr(this, context);
1419
- }
1420
- clone() {
1421
- return new _WriteVarExpr(this.name, this.value.clone(), this.type, this.sourceSpan);
1422
- }
1423
- toDeclStmt(type, modifiers) {
1424
- return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
1425
- }
1426
- toConstDecl() {
1427
- return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);
1428
- }
1429
- };
1430
- var WriteKeyExpr = class _WriteKeyExpr extends Expression {
1431
- static {
1432
- __name(this, "WriteKeyExpr");
1433
- }
1434
- receiver;
1435
- index;
1436
- value;
1437
- constructor(receiver, index, value, type, sourceSpan) {
1438
- super(type || value.type, sourceSpan);
1439
- this.receiver = receiver;
1440
- this.index = index;
1441
- this.value = value;
1442
- }
1443
- isEquivalent(e) {
1444
- return e instanceof _WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
1445
- }
1446
- isConstant() {
1447
- return false;
1448
- }
1449
- visitExpression(visitor, context) {
1450
- return visitor.visitWriteKeyExpr(this, context);
1451
- }
1452
- clone() {
1453
- return new _WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan);
1454
- }
1455
- };
1456
- var WritePropExpr = class _WritePropExpr extends Expression {
1457
- static {
1458
- __name(this, "WritePropExpr");
1459
- }
1460
- receiver;
1461
- name;
1462
- value;
1463
- constructor(receiver, name, value, type, sourceSpan) {
1464
- super(type || value.type, sourceSpan);
1465
- this.receiver = receiver;
1466
- this.name = name;
1467
- this.value = value;
1468
- }
1469
- isEquivalent(e) {
1470
- return e instanceof _WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value);
1471
- }
1472
- isConstant() {
1473
- return false;
1474
- }
1475
- visitExpression(visitor, context) {
1476
- return visitor.visitWritePropExpr(this, context);
1477
- }
1478
- clone() {
1479
- return new _WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan);
1480
- }
1481
- };
1482
1406
  var InvokeFunctionExpr = class _InvokeFunctionExpr extends Expression {
1483
1407
  static {
1484
1408
  __name(this, "InvokeFunctionExpr");
@@ -2024,6 +1948,10 @@ var BinaryOperatorExpr = class _BinaryOperatorExpr extends Expression {
2024
1948
  clone() {
2025
1949
  return new _BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan);
2026
1950
  }
1951
+ isAssignment() {
1952
+ const op = this.operator;
1953
+ return op === BinaryOperator.Assign || op === BinaryOperator.AdditionAssignment || op === BinaryOperator.SubtractionAssignment || op === BinaryOperator.MultiplicationAssignment || op === BinaryOperator.DivisionAssignment || op === BinaryOperator.RemainderAssignment || op === BinaryOperator.ExponentiationAssignment || op === BinaryOperator.AndAssignment || op === BinaryOperator.OrAssignment || op === BinaryOperator.NullishCoalesceAssignment;
1954
+ }
2027
1955
  };
2028
1956
  var ReadPropExpr = class _ReadPropExpr extends Expression {
2029
1957
  static {
@@ -2050,7 +1978,7 @@ var ReadPropExpr = class _ReadPropExpr extends Expression {
2050
1978
  return visitor.visitReadPropExpr(this, context);
2051
1979
  }
2052
1980
  set(value) {
2053
- return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);
1981
+ return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.prop(this.name), value, null, this.sourceSpan);
2054
1982
  }
2055
1983
  clone() {
2056
1984
  return new _ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);
@@ -2077,7 +2005,7 @@ var ReadKeyExpr = class _ReadKeyExpr extends Expression {
2077
2005
  return visitor.visitReadKeyExpr(this, context);
2078
2006
  }
2079
2007
  set(value) {
2080
- return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);
2008
+ return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.key(this.index), value, null, this.sourceSpan);
2081
2009
  }
2082
2010
  clone() {
2083
2011
  return new _ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
@@ -2370,21 +2298,6 @@ var RecursiveAstVisitor$1 = class RecursiveAstVisitor {
2370
2298
  visitReadVarExpr(ast, context) {
2371
2299
  return this.visitExpression(ast, context);
2372
2300
  }
2373
- visitWriteVarExpr(ast, context) {
2374
- ast.value.visitExpression(this, context);
2375
- return this.visitExpression(ast, context);
2376
- }
2377
- visitWriteKeyExpr(ast, context) {
2378
- ast.receiver.visitExpression(this, context);
2379
- ast.index.visitExpression(this, context);
2380
- ast.value.visitExpression(this, context);
2381
- return this.visitExpression(ast, context);
2382
- }
2383
- visitWritePropExpr(ast, context) {
2384
- ast.receiver.visitExpression(this, context);
2385
- ast.value.visitExpression(this, context);
2386
- return this.visitExpression(ast, context);
2387
- }
2388
2301
  visitDynamicImportExpr(ast, context) {
2389
2302
  return this.visitExpression(ast, context);
2390
2303
  }
@@ -2703,9 +2616,6 @@ var output_ast = /* @__PURE__ */ Object.freeze({
2703
2616
  UnaryOperatorExpr,
2704
2617
  VoidExpr,
2705
2618
  WrappedNodeExpr,
2706
- WriteKeyExpr,
2707
- WritePropExpr,
2708
- WriteVarExpr,
2709
2619
  areAllEquivalent,
2710
2620
  arrowFn,
2711
2621
  expressionType,
@@ -2799,23 +2709,23 @@ var ConstantPool = class {
2799
2709
  }
2800
2710
  if (!newValue && !fixup.shared || newValue && forceShared) {
2801
2711
  const name = this.freshName();
2802
- let definition;
2712
+ let value;
2803
2713
  let usage;
2804
2714
  if (this.isClosureCompilerEnabled && isLongStringLiteral(literal2)) {
2805
- definition = variable(name).set(new FunctionExpr(
2715
+ value = new FunctionExpr(
2806
2716
  [],
2807
2717
  // Params.
2808
2718
  [
2809
2719
  // Statements.
2810
2720
  new ReturnStatement(literal2)
2811
2721
  ]
2812
- ));
2722
+ );
2813
2723
  usage = variable(name).callFn([]);
2814
2724
  } else {
2815
- definition = variable(name).set(literal2);
2725
+ value = literal2;
2816
2726
  usage = variable(name);
2817
2727
  }
2818
- this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final));
2728
+ this.statements.push(new DeclareVarStmt(name, value, INFERRED_TYPE, StmtModifier.Final));
2819
2729
  fixup.fixup(usage);
2820
2730
  }
2821
2731
  return fixup;
@@ -2872,7 +2782,7 @@ var ConstantPool = class {
2872
2782
  const parameters = resultExpressions.filter(isVariable).map((e) => new FnParam(e.name, DYNAMIC_TYPE));
2873
2783
  const pureFunctionDeclaration = arrowFn(parameters, resultMap(resultExpressions), INFERRED_TYPE);
2874
2784
  const name = this.freshName();
2875
- this.statements.push(variable(name).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, StmtModifier.Final));
2785
+ this.statements.push(new DeclareVarStmt(name, pureFunctionDeclaration, INFERRED_TYPE, StmtModifier.Final));
2876
2786
  literalFactory = variable(name);
2877
2787
  this.literalFactories.set(key, literalFactory);
2878
2788
  }
@@ -2957,6 +2867,23 @@ var Identifiers = class {
2957
2867
  static element = { name: "\u0275\u0275element", moduleName: CORE };
2958
2868
  static elementStart = { name: "\u0275\u0275elementStart", moduleName: CORE };
2959
2869
  static elementEnd = { name: "\u0275\u0275elementEnd", moduleName: CORE };
2870
+ static domElement = { name: "\u0275\u0275domElement", moduleName: CORE };
2871
+ static domElementStart = { name: "\u0275\u0275domElementStart", moduleName: CORE };
2872
+ static domElementEnd = { name: "\u0275\u0275domElementEnd", moduleName: CORE };
2873
+ static domElementContainer = {
2874
+ name: "\u0275\u0275domElementContainer",
2875
+ moduleName: CORE
2876
+ };
2877
+ static domElementContainerStart = {
2878
+ name: "\u0275\u0275domElementContainerStart",
2879
+ moduleName: CORE
2880
+ };
2881
+ static domElementContainerEnd = {
2882
+ name: "\u0275\u0275domElementContainerEnd",
2883
+ moduleName: CORE
2884
+ };
2885
+ static domTemplate = { name: "\u0275\u0275domTemplate", moduleName: CORE };
2886
+ static domListener = { name: "\u0275\u0275domListener", moduleName: CORE };
2960
2887
  static advance = { name: "\u0275\u0275advance", moduleName: CORE };
2961
2888
  static syntheticHostProperty = {
2962
2889
  name: "\u0275\u0275syntheticHostProperty",
@@ -3134,7 +3061,18 @@ var Identifiers = class {
3134
3061
  static pipeBind4 = { name: "\u0275\u0275pipeBind4", moduleName: CORE };
3135
3062
  static pipeBindV = { name: "\u0275\u0275pipeBindV", moduleName: CORE };
3136
3063
  static domProperty = { name: "\u0275\u0275domProperty", moduleName: CORE };
3064
+ static ariaProperty = { name: "\u0275\u0275ariaProperty", moduleName: CORE };
3137
3065
  static property = { name: "\u0275\u0275property", moduleName: CORE };
3066
+ static animationEnterListener = {
3067
+ name: "\u0275\u0275animateEnterListener",
3068
+ moduleName: CORE
3069
+ };
3070
+ static animationLeaveListener = {
3071
+ name: "\u0275\u0275animateLeaveListener",
3072
+ moduleName: CORE
3073
+ };
3074
+ static animationEnter = { name: "\u0275\u0275animateEnter", moduleName: CORE };
3075
+ static animationLeave = { name: "\u0275\u0275animateLeave", moduleName: CORE };
3138
3076
  static i18n = { name: "\u0275\u0275i18n", moduleName: CORE };
3139
3077
  static i18nAttributes = { name: "\u0275\u0275i18nAttributes", moduleName: CORE };
3140
3078
  static i18nExp = { name: "\u0275\u0275i18nExp", moduleName: CORE };
@@ -3278,6 +3216,10 @@ var Identifiers = class {
3278
3216
  name: "\u0275\u0275ExternalStylesFeature",
3279
3217
  moduleName: CORE
3280
3218
  };
3219
+ static AnimationsFeature = {
3220
+ name: "\u0275\u0275AnimationsFeature",
3221
+ moduleName: CORE
3222
+ };
3281
3223
  static listener = { name: "\u0275\u0275listener", moduleName: CORE };
3282
3224
  static getInheritedFactory = {
3283
3225
  name: "\u0275\u0275getInheritedFactory",
@@ -3309,6 +3251,7 @@ var Identifiers = class {
3309
3251
  static InputSignalBrandWriteType = { name: "\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE", moduleName: CORE };
3310
3252
  static UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: CORE };
3311
3253
  static unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: CORE };
3254
+ static assertType = { name: "\u0275assertType", moduleName: CORE };
3312
3255
  };
3313
3256
  var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
3314
3257
  function dashCaseToCamelCase(input) {
@@ -3569,6 +3512,38 @@ var _EmittedLine = class {
3569
3512
  this.indent = indent;
3570
3513
  }
3571
3514
  };
3515
+ var BINARY_OPERATORS$1 = /* @__PURE__ */ new Map([
3516
+ [BinaryOperator.And, "&&"],
3517
+ [BinaryOperator.Bigger, ">"],
3518
+ [BinaryOperator.BiggerEquals, ">="],
3519
+ [BinaryOperator.BitwiseOr, "|"],
3520
+ [BinaryOperator.BitwiseAnd, "&"],
3521
+ [BinaryOperator.Divide, "/"],
3522
+ [BinaryOperator.Assign, "="],
3523
+ [BinaryOperator.Equals, "=="],
3524
+ [BinaryOperator.Identical, "==="],
3525
+ [BinaryOperator.Lower, "<"],
3526
+ [BinaryOperator.LowerEquals, "<="],
3527
+ [BinaryOperator.Minus, "-"],
3528
+ [BinaryOperator.Modulo, "%"],
3529
+ [BinaryOperator.Exponentiation, "**"],
3530
+ [BinaryOperator.Multiply, "*"],
3531
+ [BinaryOperator.NotEquals, "!="],
3532
+ [BinaryOperator.NotIdentical, "!=="],
3533
+ [BinaryOperator.NullishCoalesce, "??"],
3534
+ [BinaryOperator.Or, "||"],
3535
+ [BinaryOperator.Plus, "+"],
3536
+ [BinaryOperator.In, "in"],
3537
+ [BinaryOperator.AdditionAssignment, "+="],
3538
+ [BinaryOperator.SubtractionAssignment, "-="],
3539
+ [BinaryOperator.MultiplicationAssignment, "*="],
3540
+ [BinaryOperator.DivisionAssignment, "/="],
3541
+ [BinaryOperator.RemainderAssignment, "%="],
3542
+ [BinaryOperator.ExponentiationAssignment, "**="],
3543
+ [BinaryOperator.AndAssignment, "&&="],
3544
+ [BinaryOperator.OrAssignment, "||="],
3545
+ [BinaryOperator.NullishCoalesceAssignment, "??="]
3546
+ ]);
3572
3547
  var EmitterVisitorContext = class _EmitterVisitorContext {
3573
3548
  static {
3574
3549
  __name(this, "EmitterVisitorContext");
@@ -3765,46 +3740,6 @@ var AbstractEmitterVisitor = class {
3765
3740
  ctx.println(stmt, `}`);
3766
3741
  return null;
3767
3742
  }
3768
- visitWriteVarExpr(expr, ctx) {
3769
- const lineWasEmpty = ctx.lineIsEmpty();
3770
- if (!lineWasEmpty) {
3771
- ctx.print(expr, "(");
3772
- }
3773
- ctx.print(expr, `${expr.name} = `);
3774
- expr.value.visitExpression(this, ctx);
3775
- if (!lineWasEmpty) {
3776
- ctx.print(expr, ")");
3777
- }
3778
- return null;
3779
- }
3780
- visitWriteKeyExpr(expr, ctx) {
3781
- const lineWasEmpty = ctx.lineIsEmpty();
3782
- if (!lineWasEmpty) {
3783
- ctx.print(expr, "(");
3784
- }
3785
- expr.receiver.visitExpression(this, ctx);
3786
- ctx.print(expr, `[`);
3787
- expr.index.visitExpression(this, ctx);
3788
- ctx.print(expr, `] = `);
3789
- expr.value.visitExpression(this, ctx);
3790
- if (!lineWasEmpty) {
3791
- ctx.print(expr, ")");
3792
- }
3793
- return null;
3794
- }
3795
- visitWritePropExpr(expr, ctx) {
3796
- const lineWasEmpty = ctx.lineIsEmpty();
3797
- if (!lineWasEmpty) {
3798
- ctx.print(expr, "(");
3799
- }
3800
- expr.receiver.visitExpression(this, ctx);
3801
- ctx.print(expr, `.${expr.name} = `);
3802
- expr.value.visitExpression(this, ctx);
3803
- if (!lineWasEmpty) {
3804
- ctx.print(expr, ")");
3805
- }
3806
- return null;
3807
- }
3808
3743
  visitInvokeFunctionExpr(expr, ctx) {
3809
3744
  const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr;
3810
3745
  if (shouldParenthesize) {
@@ -3923,76 +3858,15 @@ var AbstractEmitterVisitor = class {
3923
3858
  return null;
3924
3859
  }
3925
3860
  visitBinaryOperatorExpr(ast, ctx) {
3926
- let opStr;
3927
- switch (ast.operator) {
3928
- case BinaryOperator.Equals:
3929
- opStr = "==";
3930
- break;
3931
- case BinaryOperator.Identical:
3932
- opStr = "===";
3933
- break;
3934
- case BinaryOperator.NotEquals:
3935
- opStr = "!=";
3936
- break;
3937
- case BinaryOperator.NotIdentical:
3938
- opStr = "!==";
3939
- break;
3940
- case BinaryOperator.And:
3941
- opStr = "&&";
3942
- break;
3943
- case BinaryOperator.BitwiseOr:
3944
- opStr = "|";
3945
- break;
3946
- case BinaryOperator.BitwiseAnd:
3947
- opStr = "&";
3948
- break;
3949
- case BinaryOperator.Or:
3950
- opStr = "||";
3951
- break;
3952
- case BinaryOperator.Plus:
3953
- opStr = "+";
3954
- break;
3955
- case BinaryOperator.Minus:
3956
- opStr = "-";
3957
- break;
3958
- case BinaryOperator.Divide:
3959
- opStr = "/";
3960
- break;
3961
- case BinaryOperator.Multiply:
3962
- opStr = "*";
3963
- break;
3964
- case BinaryOperator.Modulo:
3965
- opStr = "%";
3966
- break;
3967
- case BinaryOperator.Exponentiation:
3968
- opStr = "**";
3969
- break;
3970
- case BinaryOperator.Lower:
3971
- opStr = "<";
3972
- break;
3973
- case BinaryOperator.LowerEquals:
3974
- opStr = "<=";
3975
- break;
3976
- case BinaryOperator.Bigger:
3977
- opStr = ">";
3978
- break;
3979
- case BinaryOperator.BiggerEquals:
3980
- opStr = ">=";
3981
- break;
3982
- case BinaryOperator.NullishCoalesce:
3983
- opStr = "??";
3984
- break;
3985
- case BinaryOperator.In:
3986
- opStr = "in";
3987
- break;
3988
- default:
3989
- throw new Error(`Unknown operator ${ast.operator}`);
3861
+ const operator = BINARY_OPERATORS$1.get(ast.operator);
3862
+ if (!operator) {
3863
+ throw new Error(`Unknown operator ${ast.operator}`);
3990
3864
  }
3991
3865
  const parens = ast !== this.lastIfCondition;
3992
3866
  if (parens)
3993
3867
  ctx.print(ast, `(`);
3994
3868
  ast.lhs.visitExpression(this, ctx);
3995
- ctx.print(ast, ` ${opStr} `);
3869
+ ctx.print(ast, ` ${operator} `);
3996
3870
  ast.rhs.visitExpression(this, ctx);
3997
3871
  if (parens)
3998
3872
  ctx.print(ast, `)`);
@@ -4180,7 +4054,7 @@ function compileFactoryFunction(meta) {
4180
4054
  let retExpr = null;
4181
4055
  function makeConditionalFactory(nonCtorExpr) {
4182
4056
  const r = variable("__ngConditionalFactory__");
4183
- body.push(r.set(NULL_EXPR).toDeclStmt());
4057
+ body.push(new DeclareVarStmt(r.name, NULL_EXPR, INFERRED_TYPE));
4184
4058
  const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() : importExpr(Identifiers.invalidFactory).callFn([]).toStmt();
4185
4059
  body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
4186
4060
  return r;
@@ -4309,21 +4183,6 @@ function getInjectFn(target) {
4309
4183
  }
4310
4184
  }
4311
4185
  __name(getInjectFn, "getInjectFn");
4312
- var ParserError = class {
4313
- static {
4314
- __name(this, "ParserError");
4315
- }
4316
- input;
4317
- errLocation;
4318
- ctxLocation;
4319
- message;
4320
- constructor(message, input, errLocation, ctxLocation) {
4321
- this.input = input;
4322
- this.errLocation = errLocation;
4323
- this.ctxLocation = ctxLocation;
4324
- this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`;
4325
- }
4326
- };
4327
4186
  var ParseSpan = class {
4328
4187
  static {
4329
4188
  __name(this, "ParseSpan");
@@ -4430,23 +4289,6 @@ var PropertyRead = class extends ASTWithName {
4430
4289
  return visitor.visitPropertyRead(this, context);
4431
4290
  }
4432
4291
  };
4433
- var PropertyWrite = class extends ASTWithName {
4434
- static {
4435
- __name(this, "PropertyWrite");
4436
- }
4437
- receiver;
4438
- name;
4439
- value;
4440
- constructor(span, sourceSpan, nameSpan, receiver, name, value) {
4441
- super(span, sourceSpan, nameSpan);
4442
- this.receiver = receiver;
4443
- this.name = name;
4444
- this.value = value;
4445
- }
4446
- visit(visitor, context = null) {
4447
- return visitor.visitPropertyWrite(this, context);
4448
- }
4449
- };
4450
4292
  var SafePropertyRead = class extends ASTWithName {
4451
4293
  static {
4452
4294
  __name(this, "SafePropertyRead");
@@ -4492,23 +4334,11 @@ var SafeKeyedRead = class extends AST {
4492
4334
  return visitor.visitSafeKeyedRead(this, context);
4493
4335
  }
4494
4336
  };
4495
- var KeyedWrite = class extends AST {
4496
- static {
4497
- __name(this, "KeyedWrite");
4498
- }
4499
- receiver;
4500
- key;
4501
- value;
4502
- constructor(span, sourceSpan, receiver, key, value) {
4503
- super(span, sourceSpan);
4504
- this.receiver = receiver;
4505
- this.key = key;
4506
- this.value = value;
4507
- }
4508
- visit(visitor, context = null) {
4509
- return visitor.visitKeyedWrite(this, context);
4510
- }
4511
- };
4337
+ var BindingPipeType;
4338
+ (function(BindingPipeType2) {
4339
+ BindingPipeType2[BindingPipeType2["ReferencedByName"] = 0] = "ReferencedByName";
4340
+ BindingPipeType2[BindingPipeType2["ReferencedDirectly"] = 1] = "ReferencedDirectly";
4341
+ })(BindingPipeType || (BindingPipeType = {}));
4512
4342
  var BindingPipe = class extends ASTWithName {
4513
4343
  static {
4514
4344
  __name(this, "BindingPipe");
@@ -4516,11 +4346,13 @@ var BindingPipe = class extends ASTWithName {
4516
4346
  exp;
4517
4347
  name;
4518
4348
  args;
4519
- constructor(span, sourceSpan, exp, name, args, nameSpan) {
4349
+ type;
4350
+ constructor(span, sourceSpan, exp, name, args, type, nameSpan) {
4520
4351
  super(span, sourceSpan, nameSpan);
4521
4352
  this.exp = exp;
4522
4353
  this.name = name;
4523
4354
  this.args = args;
4355
+ this.type = type;
4524
4356
  }
4525
4357
  visit(visitor, context = null) {
4526
4358
  return visitor.visitPipe(this, context);
@@ -4598,6 +4430,9 @@ var Binary = class extends AST {
4598
4430
  visit(visitor, context = null) {
4599
4431
  return visitor.visitBinary(this, context);
4600
4432
  }
4433
+ static isAssignmentOperation(op) {
4434
+ return op === "=" || op === "+=" || op === "-=" || op === "*=" || op === "/=" || op === "%=" || op === "**=" || op === "&&=" || op === "||=" || op === "??=";
4435
+ }
4601
4436
  };
4602
4437
  var Unary = class _Unary extends Binary {
4603
4438
  static {
@@ -4894,11 +4729,6 @@ var RecursiveAstVisitor2 = class {
4894
4729
  this.visit(ast.receiver, context);
4895
4730
  this.visit(ast.key, context);
4896
4731
  }
4897
- visitKeyedWrite(ast, context) {
4898
- this.visit(ast.receiver, context);
4899
- this.visit(ast.key, context);
4900
- this.visit(ast.value, context);
4901
- }
4902
4732
  visitLiteralArray(ast, context) {
4903
4733
  this.visitAll(ast.expressions, context);
4904
4734
  }
@@ -4922,10 +4752,6 @@ var RecursiveAstVisitor2 = class {
4922
4752
  visitPropertyRead(ast, context) {
4923
4753
  this.visit(ast.receiver, context);
4924
4754
  }
4925
- visitPropertyWrite(ast, context) {
4926
- this.visit(ast.receiver, context);
4927
- this.visit(ast.value, context);
4928
- }
4929
4755
  visitSafePropertyRead(ast, context) {
4930
4756
  this.visit(ast.receiver, context);
4931
4757
  }
@@ -4977,6 +4803,7 @@ var ParsedProperty = class {
4977
4803
  keySpan;
4978
4804
  valueSpan;
4979
4805
  isLiteral;
4806
+ isLegacyAnimation;
4980
4807
  isAnimation;
4981
4808
  constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {
4982
4809
  this.name = name;
@@ -4986,6 +4813,7 @@ var ParsedProperty = class {
4986
4813
  this.keySpan = keySpan;
4987
4814
  this.valueSpan = valueSpan;
4988
4815
  this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;
4816
+ this.isLegacyAnimation = this.type === ParsedPropertyType.LEGACY_ANIMATION;
4989
4817
  this.isAnimation = this.type === ParsedPropertyType.ANIMATION;
4990
4818
  }
4991
4819
  };
@@ -4993,14 +4821,16 @@ var ParsedPropertyType;
4993
4821
  (function(ParsedPropertyType2) {
4994
4822
  ParsedPropertyType2[ParsedPropertyType2["DEFAULT"] = 0] = "DEFAULT";
4995
4823
  ParsedPropertyType2[ParsedPropertyType2["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
4996
- ParsedPropertyType2[ParsedPropertyType2["ANIMATION"] = 2] = "ANIMATION";
4824
+ ParsedPropertyType2[ParsedPropertyType2["LEGACY_ANIMATION"] = 2] = "LEGACY_ANIMATION";
4997
4825
  ParsedPropertyType2[ParsedPropertyType2["TWO_WAY"] = 3] = "TWO_WAY";
4826
+ ParsedPropertyType2[ParsedPropertyType2["ANIMATION"] = 4] = "ANIMATION";
4998
4827
  })(ParsedPropertyType || (ParsedPropertyType = {}));
4999
4828
  var ParsedEventType;
5000
4829
  (function(ParsedEventType2) {
5001
4830
  ParsedEventType2[ParsedEventType2["Regular"] = 0] = "Regular";
5002
- ParsedEventType2[ParsedEventType2["Animation"] = 1] = "Animation";
4831
+ ParsedEventType2[ParsedEventType2["LegacyAnimation"] = 1] = "LegacyAnimation";
5003
4832
  ParsedEventType2[ParsedEventType2["TwoWay"] = 2] = "TwoWay";
4833
+ ParsedEventType2[ParsedEventType2["Animation"] = 3] = "Animation";
5004
4834
  })(ParsedEventType || (ParsedEventType = {}));
5005
4835
  var ParsedEvent = class {
5006
4836
  static {
@@ -5046,8 +4876,9 @@ var BindingType;
5046
4876
  BindingType2[BindingType2["Attribute"] = 1] = "Attribute";
5047
4877
  BindingType2[BindingType2["Class"] = 2] = "Class";
5048
4878
  BindingType2[BindingType2["Style"] = 3] = "Style";
5049
- BindingType2[BindingType2["Animation"] = 4] = "Animation";
4879
+ BindingType2[BindingType2["LegacyAnimation"] = 4] = "LegacyAnimation";
5050
4880
  BindingType2[BindingType2["TwoWay"] = 5] = "TwoWay";
4881
+ BindingType2[BindingType2["Animation"] = 6] = "Animation";
5051
4882
  })(BindingType || (BindingType = {}));
5052
4883
  var BoundElementProperty = class {
5053
4884
  static {
@@ -5237,7 +5068,7 @@ var BoundEvent = class _BoundEvent {
5237
5068
  }
5238
5069
  static fromParsedEvent(event) {
5239
5070
  const target = event.type === ParsedEventType.Regular ? event.targetOrPhase : null;
5240
- const phase = event.type === ParsedEventType.Animation ? event.targetOrPhase : null;
5071
+ const phase = event.type === ParsedEventType.LegacyAnimation ? event.targetOrPhase : null;
5241
5072
  if (event.keySpan === void 0) {
5242
5073
  throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);
5243
5074
  }
@@ -5258,11 +5089,13 @@ var Element$1 = class Element {
5258
5089
  directives;
5259
5090
  children;
5260
5091
  references;
5092
+ isSelfClosing;
5261
5093
  sourceSpan;
5262
5094
  startSourceSpan;
5263
5095
  endSourceSpan;
5096
+ isVoid;
5264
5097
  i18n;
5265
- constructor(name, attributes, inputs, outputs, directives, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5098
+ constructor(name, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, isVoid, i18n2) {
5266
5099
  this.name = name;
5267
5100
  this.attributes = attributes;
5268
5101
  this.inputs = inputs;
@@ -5270,9 +5103,11 @@ var Element$1 = class Element {
5270
5103
  this.directives = directives;
5271
5104
  this.children = children;
5272
5105
  this.references = references;
5106
+ this.isSelfClosing = isSelfClosing;
5273
5107
  this.sourceSpan = sourceSpan;
5274
5108
  this.startSourceSpan = startSourceSpan;
5275
5109
  this.endSourceSpan = endSourceSpan;
5110
+ this.isVoid = isVoid;
5276
5111
  this.i18n = i18n2;
5277
5112
  }
5278
5113
  visit(visitor) {
@@ -5642,11 +5477,12 @@ var Component$1 = class Component {
5642
5477
  directives;
5643
5478
  children;
5644
5479
  references;
5480
+ isSelfClosing;
5645
5481
  sourceSpan;
5646
5482
  startSourceSpan;
5647
5483
  endSourceSpan;
5648
5484
  i18n;
5649
- constructor(componentName, tagName, fullName, attributes, inputs, outputs, directives, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5485
+ constructor(componentName, tagName, fullName, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5650
5486
  this.componentName = componentName;
5651
5487
  this.tagName = tagName;
5652
5488
  this.fullName = fullName;
@@ -5656,6 +5492,7 @@ var Component$1 = class Component {
5656
5492
  this.directives = directives;
5657
5493
  this.children = children;
5658
5494
  this.references = references;
5495
+ this.isSelfClosing = isSelfClosing;
5659
5496
  this.sourceSpan = sourceSpan;
5660
5497
  this.startSourceSpan = startSourceSpan;
5661
5498
  this.endSourceSpan = endSourceSpan;
@@ -5706,11 +5543,12 @@ var Template = class {
5706
5543
  children;
5707
5544
  references;
5708
5545
  variables;
5546
+ isSelfClosing;
5709
5547
  sourceSpan;
5710
5548
  startSourceSpan;
5711
5549
  endSourceSpan;
5712
5550
  i18n;
5713
- constructor(tagName, attributes, inputs, outputs, directives, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5551
+ constructor(tagName, attributes, inputs, outputs, directives, templateAttrs, children, references, variables, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5714
5552
  this.tagName = tagName;
5715
5553
  this.attributes = attributes;
5716
5554
  this.inputs = inputs;
@@ -5720,6 +5558,7 @@ var Template = class {
5720
5558
  this.children = children;
5721
5559
  this.references = references;
5722
5560
  this.variables = variables;
5561
+ this.isSelfClosing = isSelfClosing;
5723
5562
  this.sourceSpan = sourceSpan;
5724
5563
  this.startSourceSpan = startSourceSpan;
5725
5564
  this.endSourceSpan = endSourceSpan;
@@ -5736,15 +5575,17 @@ var Content = class {
5736
5575
  selector;
5737
5576
  attributes;
5738
5577
  children;
5578
+ isSelfClosing;
5739
5579
  sourceSpan;
5740
5580
  startSourceSpan;
5741
5581
  endSourceSpan;
5742
5582
  i18n;
5743
5583
  name = "ng-content";
5744
- constructor(selector, attributes, children, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5584
+ constructor(selector, attributes, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5745
5585
  this.selector = selector;
5746
5586
  this.attributes = attributes;
5747
5587
  this.children = children;
5588
+ this.isSelfClosing = isSelfClosing;
5748
5589
  this.sourceSpan = sourceSpan;
5749
5590
  this.startSourceSpan = startSourceSpan;
5750
5591
  this.endSourceSpan = endSourceSpan;
@@ -5932,7 +5773,7 @@ function visitAll$1(visitor, nodes) {
5932
5773
  const result = [];
5933
5774
  if (visitor.visit) {
5934
5775
  for (const node of nodes) {
5935
- visitor.visit(node) || node.visit(visitor);
5776
+ visitor.visit(node);
5936
5777
  }
5937
5778
  } else {
5938
5779
  for (const node of nodes) {
@@ -7119,7 +6960,7 @@ var ParseErrorLevel;
7119
6960
  ParseErrorLevel2[ParseErrorLevel2["WARNING"] = 0] = "WARNING";
7120
6961
  ParseErrorLevel2[ParseErrorLevel2["ERROR"] = 1] = "ERROR";
7121
6962
  })(ParseErrorLevel || (ParseErrorLevel = {}));
7122
- var ParseError = class {
6963
+ var ParseError = class extends Error {
7123
6964
  static {
7124
6965
  __name(this, "ParseError");
7125
6966
  }
@@ -7128,10 +6969,12 @@ var ParseError = class {
7128
6969
  level;
7129
6970
  relatedError;
7130
6971
  constructor(span, msg, level = ParseErrorLevel.ERROR, relatedError) {
6972
+ super(msg);
7131
6973
  this.span = span;
7132
6974
  this.msg = msg;
7133
6975
  this.level = level;
7134
6976
  this.relatedError = relatedError;
6977
+ Object.setPrototypeOf(this, new.target.prototype);
7135
6978
  }
7136
6979
  contextualMessage() {
7137
6980
  const ctx = this.span.start.getContext(100, 3);
@@ -7633,7 +7476,11 @@ function tupleOfTypes(types) {
7633
7476
  __name(tupleOfTypes, "tupleOfTypes");
7634
7477
  function compilePipeFromMetadata(metadata) {
7635
7478
  const definitionMapValues = [];
7636
- definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
7479
+ definitionMapValues.push({
7480
+ key: "name",
7481
+ value: literal(metadata.pipeName ?? metadata.name),
7482
+ quoted: false
7483
+ });
7637
7484
  definitionMapValues.push({ key: "type", value: metadata.type.value, quoted: false });
7638
7485
  definitionMapValues.push({ key: "pure", value: literal(metadata.pure), quoted: false });
7639
7486
  if (metadata.isStandalone === false) {
@@ -8545,6 +8392,10 @@ var OpKind;
8545
8392
  OpKind2[OpKind2["I18nContext"] = 50] = "I18nContext";
8546
8393
  OpKind2[OpKind2["I18nAttributes"] = 51] = "I18nAttributes";
8547
8394
  OpKind2[OpKind2["SourceLocation"] = 52] = "SourceLocation";
8395
+ OpKind2[OpKind2["Animation"] = 53] = "Animation";
8396
+ OpKind2[OpKind2["AnimationString"] = 54] = "AnimationString";
8397
+ OpKind2[OpKind2["AnimationBinding"] = 55] = "AnimationBinding";
8398
+ OpKind2[OpKind2["AnimationListener"] = 56] = "AnimationListener";
8548
8399
  })(OpKind || (OpKind = {}));
8549
8400
  var ExpressionKind;
8550
8401
  (function(ExpressionKind2) {
@@ -8600,8 +8451,9 @@ var BindingKind;
8600
8451
  BindingKind2[BindingKind2["Property"] = 3] = "Property";
8601
8452
  BindingKind2[BindingKind2["Template"] = 4] = "Template";
8602
8453
  BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
8603
- BindingKind2[BindingKind2["Animation"] = 6] = "Animation";
8454
+ BindingKind2[BindingKind2["LegacyAnimation"] = 6] = "LegacyAnimation";
8604
8455
  BindingKind2[BindingKind2["TwoWayProperty"] = 7] = "TwoWayProperty";
8456
+ BindingKind2[BindingKind2["Animation"] = 8] = "Animation";
8605
8457
  })(BindingKind || (BindingKind = {}));
8606
8458
  var I18nParamResolutionTime;
8607
8459
  (function(I18nParamResolutionTime2) {
@@ -8751,13 +8603,13 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
8751
8603
  };
8752
8604
  }
8753
8605
  __name(createBindingOp, "createBindingOp");
8754
- function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
8606
+ function createPropertyOp(target, name, expression, bindingKind, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
8755
8607
  return {
8756
8608
  kind: OpKind.Property,
8757
8609
  target,
8758
8610
  name,
8759
8611
  expression,
8760
- isAnimationTrigger,
8612
+ bindingKind,
8761
8613
  securityContext,
8762
8614
  sanitizer: null,
8763
8615
  isStructuralTemplateAttribute,
@@ -8898,6 +8750,22 @@ function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
8898
8750
  };
8899
8751
  }
8900
8752
  __name(createRepeaterOp, "createRepeaterOp");
8753
+ function createAnimationBindingOp(name, target, animationKind, expression, securityContext, sourceSpan, animationBindingKind) {
8754
+ return {
8755
+ kind: OpKind.AnimationBinding,
8756
+ name,
8757
+ target,
8758
+ animationKind,
8759
+ expression,
8760
+ i18nMessage: null,
8761
+ securityContext,
8762
+ sanitizer: null,
8763
+ sourceSpan,
8764
+ animationBindingKind,
8765
+ ...NEW_OP
8766
+ };
8767
+ }
8768
+ __name(createAnimationBindingOp, "createAnimationBindingOp");
8901
8769
  function createDeferWhenOp(target, expr, modifier, sourceSpan) {
8902
8770
  return {
8903
8771
  kind: OpKind.DeferWhen,
@@ -9777,6 +9645,8 @@ function transformExpressionsInOp(op, transform2, flags) {
9777
9645
  case OpKind.StyleMap:
9778
9646
  case OpKind.ClassProp:
9779
9647
  case OpKind.ClassMap:
9648
+ case OpKind.AnimationString:
9649
+ case OpKind.AnimationBinding:
9780
9650
  case OpKind.Binding:
9781
9651
  if (op.expression instanceof Interpolation2) {
9782
9652
  transformExpressionsInInterpolation(op.expression, transform2, flags);
@@ -9824,6 +9694,8 @@ function transformExpressionsInOp(op, transform2, flags) {
9824
9694
  op.contextValue = transformExpressionsInExpression(op.contextValue, transform2, flags);
9825
9695
  }
9826
9696
  break;
9697
+ case OpKind.Animation:
9698
+ case OpKind.AnimationListener:
9827
9699
  case OpKind.Listener:
9828
9700
  case OpKind.TwoWayListener:
9829
9701
  for (const innerOp of op.handlerOps) {
@@ -9922,13 +9794,6 @@ function transformExpressionsInExpression(expr, transform2, flags) {
9922
9794
  } else if (expr instanceof ReadKeyExpr) {
9923
9795
  expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
9924
9796
  expr.index = transformExpressionsInExpression(expr.index, transform2, flags);
9925
- } else if (expr instanceof WritePropExpr) {
9926
- expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
9927
- expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
9928
- } else if (expr instanceof WriteKeyExpr) {
9929
- expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
9930
- expr.index = transformExpressionsInExpression(expr.index, transform2, flags);
9931
- expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
9932
9797
  } else if (expr instanceof InvokeFunctionExpr) {
9933
9798
  expr.fn = transformExpressionsInExpression(expr.fn, transform2, flags);
9934
9799
  for (let i = 0; i < expr.args.length; i++) {
@@ -9952,8 +9817,6 @@ function transformExpressionsInExpression(expr, transform2, flags) {
9952
9817
  expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
9953
9818
  } else if (expr instanceof VoidExpr) {
9954
9819
  expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
9955
- } else if (expr instanceof WriteVarExpr) {
9956
- expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
9957
9820
  } else if (expr instanceof LocalizedString) {
9958
9821
  for (let i = 0; i < expr.expressions.length; i++) {
9959
9822
  expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform2, flags);
@@ -10147,7 +10010,7 @@ var OpList = class _OpList {
10147
10010
  oldOp.next = null;
10148
10011
  let prev = oldPrev;
10149
10012
  for (const newOp of newOps) {
10150
- this.assertIsUnowned(newOp);
10013
+ _OpList.assertIsUnowned(newOp);
10151
10014
  newOp.debugListId = listId;
10152
10015
  prev.next = newOp;
10153
10016
  newOp.prev = prev;
@@ -10183,7 +10046,7 @@ var OpList = class _OpList {
10183
10046
  static insertBefore(op, target) {
10184
10047
  if (Array.isArray(op)) {
10185
10048
  for (const o of op) {
10186
- this.insertBefore(o, target);
10049
+ _OpList.insertBefore(o, target);
10187
10050
  }
10188
10051
  return;
10189
10052
  }
@@ -10418,7 +10281,40 @@ function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) {
10418
10281
  };
10419
10282
  }
10420
10283
  __name(createTextOp, "createTextOp");
10421
- function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {
10284
+ function createAnimationStringOp(name, target, animationKind, expression, securityContext, sourceSpan) {
10285
+ return {
10286
+ kind: OpKind.AnimationString,
10287
+ name,
10288
+ target,
10289
+ animationKind,
10290
+ expression,
10291
+ i18nMessage: null,
10292
+ securityContext,
10293
+ sanitizer: null,
10294
+ sourceSpan,
10295
+ ...NEW_OP
10296
+ };
10297
+ }
10298
+ __name(createAnimationStringOp, "createAnimationStringOp");
10299
+ function createAnimationOp(name, target, animationKind, callbackOps, securityContext, sourceSpan) {
10300
+ const handlerOps = new OpList();
10301
+ handlerOps.push(callbackOps);
10302
+ return {
10303
+ kind: OpKind.Animation,
10304
+ name,
10305
+ target,
10306
+ animationKind,
10307
+ handlerOps,
10308
+ handlerFnName: null,
10309
+ i18nMessage: null,
10310
+ securityContext,
10311
+ sanitizer: null,
10312
+ sourceSpan,
10313
+ ...NEW_OP
10314
+ };
10315
+ }
10316
+ __name(createAnimationOp, "createAnimationOp");
10317
+ function createListenerOp(target, targetSlot, name, tag, handlerOps, legacyAnimationPhase, eventTarget, hostListener, sourceSpan) {
10422
10318
  const handlerList = new OpList();
10423
10319
  handlerList.push(handlerOps);
10424
10320
  return {
@@ -10431,14 +10327,34 @@ function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPh
10431
10327
  handlerOps: handlerList,
10432
10328
  handlerFnName: null,
10433
10329
  consumesDollarEvent: false,
10434
- isAnimationListener: animationPhase !== null,
10435
- animationPhase,
10330
+ isLegacyAnimationListener: legacyAnimationPhase !== null,
10331
+ legacyAnimationPhase,
10436
10332
  eventTarget,
10437
10333
  sourceSpan,
10438
10334
  ...NEW_OP
10439
10335
  };
10440
10336
  }
10441
10337
  __name(createListenerOp, "createListenerOp");
10338
+ function createAnimationListenerOp(target, targetSlot, name, tag, handlerOps, animationKind, eventTarget, hostListener, sourceSpan) {
10339
+ const handlerList = new OpList();
10340
+ handlerList.push(handlerOps);
10341
+ return {
10342
+ kind: OpKind.AnimationListener,
10343
+ target,
10344
+ targetSlot,
10345
+ tag,
10346
+ hostListener,
10347
+ name,
10348
+ animationKind,
10349
+ handlerOps: handlerList,
10350
+ handlerFnName: null,
10351
+ consumesDollarEvent: false,
10352
+ eventTarget,
10353
+ sourceSpan,
10354
+ ...NEW_OP
10355
+ };
10356
+ }
10357
+ __name(createAnimationListenerOp, "createAnimationListenerOp");
10442
10358
  function createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) {
10443
10359
  const handlerList = new OpList();
10444
10360
  handlerList.push(handlerOps);
@@ -10677,12 +10593,12 @@ function createSourceLocationOp(templatePath, locations) {
10677
10593
  };
10678
10594
  }
10679
10595
  __name(createSourceLocationOp, "createSourceLocationOp");
10680
- function createDomPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
10596
+ function createDomPropertyOp(name, expression, bindingKind, i18nContext, securityContext, sourceSpan) {
10681
10597
  return {
10682
10598
  kind: OpKind.DomProperty,
10683
10599
  name,
10684
10600
  expression,
10685
- isAnimationTrigger,
10601
+ bindingKind,
10686
10602
  i18nContext,
10687
10603
  securityContext,
10688
10604
  sanitizer: null,
@@ -10699,6 +10615,11 @@ var CompilationJobKind;
10699
10615
  CompilationJobKind2[CompilationJobKind2["Host"] = 1] = "Host";
10700
10616
  CompilationJobKind2[CompilationJobKind2["Both"] = 2] = "Both";
10701
10617
  })(CompilationJobKind || (CompilationJobKind = {}));
10618
+ var TemplateCompilationMode;
10619
+ (function(TemplateCompilationMode2) {
10620
+ TemplateCompilationMode2[TemplateCompilationMode2["Full"] = 0] = "Full";
10621
+ TemplateCompilationMode2[TemplateCompilationMode2["DomOnly"] = 1] = "DomOnly";
10622
+ })(TemplateCompilationMode || (TemplateCompilationMode = {}));
10702
10623
  var CompilationJob = class {
10703
10624
  static {
10704
10625
  __name(this, "CompilationJob");
@@ -10706,10 +10627,12 @@ var CompilationJob = class {
10706
10627
  componentName;
10707
10628
  pool;
10708
10629
  compatibility;
10709
- constructor(componentName, pool, compatibility) {
10630
+ mode;
10631
+ constructor(componentName, pool, compatibility, mode) {
10710
10632
  this.componentName = componentName;
10711
10633
  this.pool = pool;
10712
10634
  this.compatibility = compatibility;
10635
+ this.mode = mode;
10713
10636
  }
10714
10637
  kind = CompilationJobKind.Both;
10715
10638
  /**
@@ -10733,8 +10656,8 @@ var ComponentCompilationJob = class extends CompilationJob {
10733
10656
  allDeferrableDepsFn;
10734
10657
  relativeTemplatePath;
10735
10658
  enableDebugLocations;
10736
- constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
10737
- super(componentName, pool, compatibility);
10659
+ constructor(componentName, pool, compatibility, mode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
10660
+ super(componentName, pool, compatibility, mode);
10738
10661
  this.relativeContextFilePath = relativeContextFilePath;
10739
10662
  this.i18nUseExternalIds = i18nUseExternalIds;
10740
10663
  this.deferMeta = deferMeta;
@@ -10831,7 +10754,7 @@ var CompilationUnit = class {
10831
10754
  *ops() {
10832
10755
  for (const op of this.create) {
10833
10756
  yield op;
10834
- if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
10757
+ if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
10835
10758
  for (const listenerOp of op.handlerOps) {
10836
10759
  yield listenerOp;
10837
10760
  }
@@ -10877,8 +10800,8 @@ var HostBindingCompilationJob = class extends CompilationJob {
10877
10800
  static {
10878
10801
  __name(this, "HostBindingCompilationJob");
10879
10802
  }
10880
- constructor(componentName, pool, compatibility) {
10881
- super(componentName, pool, compatibility);
10803
+ constructor(componentName, pool, compatibility, mode) {
10804
+ super(componentName, pool, compatibility, mode);
10882
10805
  this.root = new HostBindingCompilationUnit(this);
10883
10806
  }
10884
10807
  kind = CompilationJobKind.Host;
@@ -11065,7 +10988,7 @@ function extractAttributes(job) {
11065
10988
  extractAttributeOp(unit, op, elements);
11066
10989
  break;
11067
10990
  case OpKind.Property:
11068
- if (!op.isAnimationTrigger) {
10991
+ if (op.bindingKind !== BindingKind.LegacyAnimation && op.bindingKind !== BindingKind.Animation) {
11069
10992
  let bindingKind;
11070
10993
  if (op.i18nMessage !== null && op.templateKind === null) {
11071
10994
  bindingKind = BindingKind.I18n;
@@ -11089,7 +11012,7 @@ function extractAttributes(job) {
11089
11012
  null,
11090
11013
  op.securityContext
11091
11014
  ),
11092
- lookupElement$2(elements, op.target)
11015
+ lookupElement$3(elements, op.target)
11093
11016
  );
11094
11017
  }
11095
11018
  break;
@@ -11106,7 +11029,7 @@ function extractAttributes(job) {
11106
11029
  /* i18nMessage */
11107
11030
  null,
11108
11031
  op.securityContext
11109
- ), lookupElement$2(elements, op.target));
11032
+ ), lookupElement$3(elements, op.target));
11110
11033
  break;
11111
11034
  case OpKind.StyleProp:
11112
11035
  case OpKind.ClassProp:
@@ -11123,11 +11046,11 @@ function extractAttributes(job) {
11123
11046
  /* i18nMessage */
11124
11047
  null,
11125
11048
  SecurityContext.STYLE
11126
- ), lookupElement$2(elements, op.target));
11049
+ ), lookupElement$3(elements, op.target));
11127
11050
  }
11128
11051
  break;
11129
11052
  case OpKind.Listener:
11130
- if (!op.isAnimationListener) {
11053
+ if (!op.isLegacyAnimationListener) {
11131
11054
  const extractedAttributeOp = createExtractedAttributeOp(
11132
11055
  op.target,
11133
11056
  BindingKind.Property,
@@ -11147,7 +11070,7 @@ function extractAttributes(job) {
11147
11070
  }
11148
11071
  unit.create.push(extractedAttributeOp);
11149
11072
  } else {
11150
- OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target));
11073
+ OpList.insertBefore(extractedAttributeOp, lookupElement$3(elements, op.target));
11151
11074
  }
11152
11075
  }
11153
11076
  break;
@@ -11166,7 +11089,7 @@ function extractAttributes(job) {
11166
11089
  null,
11167
11090
  SecurityContext.NONE
11168
11091
  );
11169
- OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target));
11092
+ OpList.insertBefore(extractedAttributeOp, lookupElement$3(elements, op.target));
11170
11093
  }
11171
11094
  break;
11172
11095
  }
@@ -11174,14 +11097,14 @@ function extractAttributes(job) {
11174
11097
  }
11175
11098
  }
11176
11099
  __name(extractAttributes, "extractAttributes");
11177
- function lookupElement$2(elements, xref) {
11100
+ function lookupElement$3(elements, xref) {
11178
11101
  const el = elements.get(xref);
11179
11102
  if (el === void 0) {
11180
11103
  throw new Error("All attributes should have an element-like target.");
11181
11104
  }
11182
11105
  return el;
11183
11106
  }
11184
- __name(lookupElement$2, "lookupElement$2");
11107
+ __name(lookupElement$3, "lookupElement$3");
11185
11108
  function extractAttributeOp(unit, op, elements) {
11186
11109
  if (op.expression instanceof Interpolation2) {
11187
11110
  return;
@@ -11195,21 +11118,21 @@ function extractAttributeOp(unit, op, elements) {
11195
11118
  if (unit.job.kind === CompilationJobKind.Host) {
11196
11119
  unit.create.push(extractedAttributeOp);
11197
11120
  } else {
11198
- const ownerOp = lookupElement$2(elements, op.target);
11121
+ const ownerOp = lookupElement$3(elements, op.target);
11199
11122
  OpList.insertBefore(extractedAttributeOp, ownerOp);
11200
11123
  }
11201
11124
  OpList.remove(op);
11202
11125
  }
11203
11126
  }
11204
11127
  __name(extractAttributeOp, "extractAttributeOp");
11205
- function lookupElement$1(elements, xref) {
11128
+ function lookupElement$2(elements, xref) {
11206
11129
  const el = elements.get(xref);
11207
11130
  if (el === void 0) {
11208
11131
  throw new Error("All attributes should have an element-like target.");
11209
11132
  }
11210
11133
  return el;
11211
11134
  }
11212
- __name(lookupElement$1, "lookupElement$1");
11135
+ __name(lookupElement$2, "lookupElement$2");
11213
11136
  function specializeBindings(job) {
11214
11137
  const elements = /* @__PURE__ */ new Map();
11215
11138
  for (const unit of job.units) {
@@ -11229,19 +11152,42 @@ function specializeBindings(job) {
11229
11152
  case BindingKind.Attribute:
11230
11153
  if (op.name === "ngNonBindable") {
11231
11154
  OpList.remove(op);
11232
- const target = lookupElement$1(elements, op.target);
11155
+ const target = lookupElement$2(elements, op.target);
11233
11156
  target.nonBindable = true;
11157
+ } else if (op.name.startsWith("animate.")) {
11158
+ OpList.replace(op, createAnimationBindingOp(
11159
+ op.name,
11160
+ op.target,
11161
+ op.name === "animate.enter" ? "enter" : "leave",
11162
+ op.expression,
11163
+ op.securityContext,
11164
+ op.sourceSpan,
11165
+ 0
11166
+ /* ir.AnimationBindingKind.STRING */
11167
+ ));
11234
11168
  } else {
11235
11169
  const [namespace, name] = splitNsName(op.name);
11236
11170
  OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
11237
11171
  }
11238
11172
  break;
11239
- case BindingKind.Property:
11240
11173
  case BindingKind.Animation:
11174
+ OpList.replace(op, createAnimationBindingOp(
11175
+ op.name,
11176
+ op.target,
11177
+ op.name === "animate.enter" ? "enter" : "leave",
11178
+ op.expression,
11179
+ op.securityContext,
11180
+ op.sourceSpan,
11181
+ 1
11182
+ /* ir.AnimationBindingKind.VALUE */
11183
+ ));
11184
+ break;
11185
+ case BindingKind.Property:
11186
+ case BindingKind.LegacyAnimation:
11241
11187
  if (job.kind === CompilationJobKind.Host) {
11242
- OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
11188
+ OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind, op.i18nContext, op.securityContext, op.sourceSpan));
11243
11189
  } else {
11244
- OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
11190
+ OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
11245
11191
  }
11246
11192
  break;
11247
11193
  case BindingKind.TwoWayProperty:
@@ -11260,6 +11206,7 @@ function specializeBindings(job) {
11260
11206
  }
11261
11207
  __name(specializeBindings, "specializeBindings");
11262
11208
  var CHAIN_COMPATIBILITY = /* @__PURE__ */ new Map([
11209
+ [Identifiers.ariaProperty, Identifiers.ariaProperty],
11263
11210
  [Identifiers.attribute, Identifiers.attribute],
11264
11211
  [Identifiers.classProp, Identifiers.classProp],
11265
11212
  [Identifiers.element, Identifiers.element],
@@ -11281,7 +11228,19 @@ var CHAIN_COMPATIBILITY = /* @__PURE__ */ new Map([
11281
11228
  [Identifiers.twoWayListener, Identifiers.twoWayListener],
11282
11229
  [Identifiers.declareLet, Identifiers.declareLet],
11283
11230
  [Identifiers.conditionalCreate, Identifiers.conditionalBranchCreate],
11284
- [Identifiers.conditionalBranchCreate, Identifiers.conditionalBranchCreate]
11231
+ [Identifiers.conditionalBranchCreate, Identifiers.conditionalBranchCreate],
11232
+ [Identifiers.domElement, Identifiers.domElement],
11233
+ [Identifiers.domElementStart, Identifiers.domElementStart],
11234
+ [Identifiers.domElementEnd, Identifiers.domElementEnd],
11235
+ [Identifiers.domElementContainer, Identifiers.domElementContainer],
11236
+ [Identifiers.domElementContainerStart, Identifiers.domElementContainerStart],
11237
+ [Identifiers.domElementContainerEnd, Identifiers.domElementContainerEnd],
11238
+ [Identifiers.domListener, Identifiers.domListener],
11239
+ [Identifiers.domTemplate, Identifiers.domTemplate],
11240
+ [Identifiers.animationEnter, Identifiers.animationEnter],
11241
+ [Identifiers.animationLeave, Identifiers.animationLeave],
11242
+ [Identifiers.animationEnterListener, Identifiers.animationEnterListener],
11243
+ [Identifiers.animationLeaveListener, Identifiers.animationLeaveListener]
11285
11244
  ]);
11286
11245
  var MAX_CHAIN_LENGTH = 256;
11287
11246
  function chain(job) {
@@ -11350,6 +11309,7 @@ function generateConditionalExpressions(job) {
11350
11309
  test = literal(-1);
11351
11310
  }
11352
11311
  let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId());
11312
+ let caseExpressionTemporaryXref = null;
11353
11313
  for (let i = op.conditions.length - 1; i >= 0; i--) {
11354
11314
  let conditionalCase = op.conditions[i];
11355
11315
  if (conditionalCase.expr === null) {
@@ -11359,7 +11319,7 @@ function generateConditionalExpressions(job) {
11359
11319
  const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref);
11360
11320
  conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);
11361
11321
  } else if (conditionalCase.alias !== null) {
11362
- const caseExpressionTemporaryXref = job.allocateXrefId();
11322
+ caseExpressionTemporaryXref ??= job.allocateXrefId();
11363
11323
  conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);
11364
11324
  op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);
11365
11325
  }
@@ -11378,6 +11338,7 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
11378
11338
  ["|", BinaryOperator.BitwiseOr],
11379
11339
  ["&", BinaryOperator.BitwiseAnd],
11380
11340
  ["/", BinaryOperator.Divide],
11341
+ ["=", BinaryOperator.Assign],
11381
11342
  ["==", BinaryOperator.Equals],
11382
11343
  ["===", BinaryOperator.Identical],
11383
11344
  ["<", BinaryOperator.Lower],
@@ -11391,7 +11352,16 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
11391
11352
  ["??", BinaryOperator.NullishCoalesce],
11392
11353
  ["||", BinaryOperator.Or],
11393
11354
  ["+", BinaryOperator.Plus],
11394
- ["in", BinaryOperator.In]
11355
+ ["in", BinaryOperator.In],
11356
+ ["+=", BinaryOperator.AdditionAssignment],
11357
+ ["-=", BinaryOperator.SubtractionAssignment],
11358
+ ["*=", BinaryOperator.MultiplicationAssignment],
11359
+ ["/=", BinaryOperator.DivisionAssignment],
11360
+ ["%=", BinaryOperator.RemainderAssignment],
11361
+ ["**=", BinaryOperator.ExponentiationAssignment],
11362
+ ["&&=", BinaryOperator.AndAssignment],
11363
+ ["||=", BinaryOperator.OrAssignment],
11364
+ ["??=", BinaryOperator.NullishCoalesceAssignment]
11395
11365
  ]);
11396
11366
  function namespaceForKey(namespacePrefixKey) {
11397
11367
  const NAMESPACES = /* @__PURE__ */ new Map([
@@ -11618,26 +11588,68 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
11618
11588
  return literalArr(attrArray);
11619
11589
  }
11620
11590
  __name(serializeAttributes, "serializeAttributes");
11621
- function convertI18nBindings(job) {
11622
- const i18nAttributesByElem = /* @__PURE__ */ new Map();
11591
+ function lookupElement$1(elements, xref) {
11592
+ const el = elements.get(xref);
11593
+ if (el === void 0) {
11594
+ throw new Error("All attributes should have an element-like target.");
11595
+ }
11596
+ return el;
11597
+ }
11598
+ __name(lookupElement$1, "lookupElement$1");
11599
+ function convertAnimations(job) {
11600
+ const elements = /* @__PURE__ */ new Map();
11623
11601
  for (const unit of job.units) {
11624
11602
  for (const op of unit.create) {
11625
- if (op.kind === OpKind.I18nAttributes) {
11626
- i18nAttributesByElem.set(op.target, op);
11603
+ if (!isElementOrContainerOp(op)) {
11604
+ continue;
11627
11605
  }
11606
+ elements.set(op.xref, op);
11628
11607
  }
11629
- for (const op of unit.update) {
11630
- switch (op.kind) {
11631
- case OpKind.Property:
11632
- case OpKind.Attribute:
11633
- if (op.i18nContext === null) {
11634
- continue;
11635
- }
11636
- if (!(op.expression instanceof Interpolation2)) {
11637
- continue;
11638
- }
11639
- const i18nAttributesForElem = i18nAttributesByElem.get(op.target);
11640
- if (i18nAttributesForElem === void 0) {
11608
+ }
11609
+ for (const unit of job.units) {
11610
+ for (const op of unit.ops()) {
11611
+ if (op.kind === OpKind.AnimationBinding) {
11612
+ const createAnimationOp2 = getAnimationOp(op);
11613
+ if (job.kind === CompilationJobKind.Host) {
11614
+ unit.create.push(createAnimationOp2);
11615
+ } else {
11616
+ OpList.insertAfter(createAnimationOp2, lookupElement$1(elements, op.target));
11617
+ }
11618
+ OpList.remove(op);
11619
+ }
11620
+ }
11621
+ }
11622
+ }
11623
+ __name(convertAnimations, "convertAnimations");
11624
+ function getAnimationOp(op) {
11625
+ if (op.animationBindingKind === 0) {
11626
+ return createAnimationStringOp(op.name, op.target, op.name === "animate.enter" ? "enter" : "leave", op.expression, op.securityContext, op.sourceSpan);
11627
+ } else {
11628
+ const expression = op.expression;
11629
+ return createAnimationOp(op.name, op.target, op.name === "animate.enter" ? "enter" : "leave", [createStatementOp(new ReturnStatement(expression, expression.sourceSpan))], op.securityContext, op.sourceSpan);
11630
+ }
11631
+ }
11632
+ __name(getAnimationOp, "getAnimationOp");
11633
+ function convertI18nBindings(job) {
11634
+ const i18nAttributesByElem = /* @__PURE__ */ new Map();
11635
+ for (const unit of job.units) {
11636
+ for (const op of unit.create) {
11637
+ if (op.kind === OpKind.I18nAttributes) {
11638
+ i18nAttributesByElem.set(op.target, op);
11639
+ }
11640
+ }
11641
+ for (const op of unit.update) {
11642
+ switch (op.kind) {
11643
+ case OpKind.Property:
11644
+ case OpKind.Attribute:
11645
+ if (op.i18nContext === null) {
11646
+ continue;
11647
+ }
11648
+ if (!(op.expression instanceof Interpolation2)) {
11649
+ continue;
11650
+ }
11651
+ const i18nAttributesForElem = i18nAttributesByElem.get(op.target);
11652
+ if (i18nAttributesForElem === void 0) {
11641
11653
  throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");
11642
11654
  }
11643
11655
  if (i18nAttributesForElem.target !== op.target) {
@@ -12292,6 +12304,8 @@ function recursivelyProcessView(view, parentScope) {
12292
12304
  op.trackByOps.prepend(generateVariablesInScopeForView(view, scope, false));
12293
12305
  }
12294
12306
  break;
12307
+ case OpKind.Animation:
12308
+ case OpKind.AnimationListener:
12295
12309
  case OpKind.Listener:
12296
12310
  case OpKind.TwoWayListener:
12297
12311
  op.handlerOps.prepend(generateVariablesInScopeForView(view, scope, true));
@@ -12364,7 +12378,7 @@ function getScopeForView(view, parent) {
12364
12378
  return scope;
12365
12379
  }
12366
12380
  __name(getScopeForView, "getScopeForView");
12367
- function generateVariablesInScopeForView(view, scope, isListener) {
12381
+ function generateVariablesInScopeForView(view, scope, isCallback) {
12368
12382
  const newOps = [];
12369
12383
  if (scope.view !== view.xref) {
12370
12384
  newOps.push(createVariableOp(view.job.allocateXrefId(), scope.viewContextVariable, new NextContextExpr(), VariableFlags.None));
@@ -12381,7 +12395,7 @@ function generateVariablesInScopeForView(view, scope, isListener) {
12381
12395
  for (const ref of scope.references) {
12382
12396
  newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.targetSlot, ref.offset), VariableFlags.None));
12383
12397
  }
12384
- if (scope.view !== view.xref || isListener) {
12398
+ if (scope.view !== view.xref || isCallback) {
12385
12399
  for (const decl of scope.letDeclarations) {
12386
12400
  newOps.push(createVariableOp(view.job.allocateXrefId(), decl.variable, new ContextLetReferenceExpr(decl.targetId, decl.targetSlot), VariableFlags.None));
12387
12401
  }
@@ -12607,16 +12621,20 @@ var Element2 = class extends NodeWithI18n {
12607
12621
  attrs;
12608
12622
  directives;
12609
12623
  children;
12624
+ isSelfClosing;
12610
12625
  startSourceSpan;
12611
12626
  endSourceSpan;
12612
- constructor(name, attrs, directives, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12627
+ isVoid;
12628
+ constructor(name, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, isVoid, i18n2) {
12613
12629
  super(sourceSpan, i18n2);
12614
12630
  this.name = name;
12615
12631
  this.attrs = attrs;
12616
12632
  this.directives = directives;
12617
12633
  this.children = children;
12634
+ this.isSelfClosing = isSelfClosing;
12618
12635
  this.startSourceSpan = startSourceSpan;
12619
12636
  this.endSourceSpan = endSourceSpan;
12637
+ this.isVoid = isVoid;
12620
12638
  }
12621
12639
  visit(visitor, context) {
12622
12640
  return visitor.visitElement(this, context);
@@ -12669,9 +12687,10 @@ var Component2 = class extends NodeWithI18n {
12669
12687
  attrs;
12670
12688
  directives;
12671
12689
  children;
12690
+ isSelfClosing;
12672
12691
  startSourceSpan;
12673
12692
  endSourceSpan;
12674
- constructor(componentName, tagName, fullName, attrs, directives, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12693
+ constructor(componentName, tagName, fullName, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12675
12694
  super(sourceSpan, i18n2);
12676
12695
  this.componentName = componentName;
12677
12696
  this.tagName = tagName;
@@ -12679,6 +12698,7 @@ var Component2 = class extends NodeWithI18n {
12679
12698
  this.attrs = attrs;
12680
12699
  this.directives = directives;
12681
12700
  this.children = children;
12701
+ this.isSelfClosing = isSelfClosing;
12682
12702
  this.startSourceSpan = startSourceSpan;
12683
12703
  this.endSourceSpan = endSourceSpan;
12684
12704
  }
@@ -14940,16 +14960,6 @@ var NAMED_ENTITIES = {
14940
14960
  };
14941
14961
  var NGSP_UNICODE = "\uE500";
14942
14962
  NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
14943
- var TokenError = class extends ParseError {
14944
- static {
14945
- __name(this, "TokenError");
14946
- }
14947
- tokenType;
14948
- constructor(errorMsg, tokenType, span) {
14949
- super(span, errorMsg);
14950
- this.tokenType = tokenType;
14951
- }
14952
- };
14953
14963
  var TokenizeResult = class {
14954
14964
  static {
14955
14965
  __name(this, "TokenizeResult");
@@ -14988,15 +14998,20 @@ var CharacterReferenceType;
14988
14998
  CharacterReferenceType2["HEX"] = "hexadecimal";
14989
14999
  CharacterReferenceType2["DEC"] = "decimal";
14990
15000
  })(CharacterReferenceType || (CharacterReferenceType = {}));
14991
- var _ControlFlowError = class {
14992
- static {
14993
- __name(this, "_ControlFlowError");
14994
- }
14995
- error;
14996
- constructor(error) {
14997
- this.error = error;
14998
- }
14999
- };
15001
+ var SUPPORTED_BLOCKS = [
15002
+ "@if",
15003
+ "@else",
15004
+ // Covers `@else if` as well
15005
+ "@for",
15006
+ "@switch",
15007
+ "@case",
15008
+ "@default",
15009
+ "@empty",
15010
+ "@defer",
15011
+ "@placeholder",
15012
+ "@loading",
15013
+ "@error"
15014
+ ];
15000
15015
  var _Tokenizer = class {
15001
15016
  static {
15002
15017
  __name(this, "_Tokenizer");
@@ -15073,9 +15088,9 @@ var _Tokenizer = class {
15073
15088
  }
15074
15089
  } else if (this._tokenizeLet && // Use `peek` instead of `attempCharCode` since we
15075
15090
  // don't want to advance in case it's not `@let`.
15076
- this._cursor.peek() === $AT && !this._inInterpolation && this._attemptStr("@let")) {
15091
+ this._cursor.peek() === $AT && !this._inInterpolation && this._isLetStart()) {
15077
15092
  this._consumeLetDeclaration(start);
15078
- } else if (this._tokenizeBlocks && this._attemptCharCode($AT)) {
15093
+ } else if (this._tokenizeBlocks && this._isBlockStart()) {
15079
15094
  this._consumeBlockStart(start);
15080
15095
  } else if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode($RBRACE)) {
15081
15096
  this._consumeBlockEnd(start);
@@ -15108,6 +15123,7 @@ var _Tokenizer = class {
15108
15123
  return this._cursor.getChars(nameCursor).trim();
15109
15124
  }
15110
15125
  _consumeBlockStart(start) {
15126
+ this._requireCharCode($AT);
15111
15127
  this._beginToken(24, start);
15112
15128
  const startToken = this._endToken([this._getBlockName()]);
15113
15129
  if (this._cursor.peek() === $LPAREN) {
@@ -15169,6 +15185,7 @@ var _Tokenizer = class {
15169
15185
  }
15170
15186
  }
15171
15187
  _consumeLetDeclaration(start) {
15188
+ this._requireStr("@let");
15172
15189
  this._beginToken(29, start);
15173
15190
  if (isWhitespace(this._cursor.peek())) {
15174
15191
  this._attemptCharCodeUntilFn(isNotWhitespace);
@@ -15264,10 +15281,10 @@ var _Tokenizer = class {
15264
15281
  }
15265
15282
  _endToken(parts, end) {
15266
15283
  if (this._currentTokenStart === null) {
15267
- throw new TokenError("Programming error - attempted to end a token when there was no start to the token", this._currentTokenType, this._cursor.getSpan(end));
15284
+ throw new ParseError(this._cursor.getSpan(end), "Programming error - attempted to end a token when there was no start to the token");
15268
15285
  }
15269
15286
  if (this._currentTokenType === null) {
15270
- throw new TokenError("Programming error - attempted to end a token which has no token type", null, this._cursor.getSpan(this._currentTokenStart));
15287
+ throw new ParseError(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
15271
15288
  }
15272
15289
  const token = {
15273
15290
  type: this._currentTokenType,
@@ -15283,17 +15300,17 @@ var _Tokenizer = class {
15283
15300
  if (this._isInExpansionForm()) {
15284
15301
  msg += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`;
15285
15302
  }
15286
- const error = new TokenError(msg, this._currentTokenType, span);
15303
+ const error = new ParseError(span, msg);
15287
15304
  this._currentTokenStart = null;
15288
15305
  this._currentTokenType = null;
15289
- return new _ControlFlowError(error);
15306
+ return error;
15290
15307
  }
15291
15308
  handleError(e) {
15292
15309
  if (e instanceof CursorError) {
15293
15310
  e = this._createError(e.msg, this._cursor.getSpan(e.cursor));
15294
15311
  }
15295
- if (e instanceof _ControlFlowError) {
15296
- this.errors.push(e.error);
15312
+ if (e instanceof ParseError) {
15313
+ this.errors.push(e);
15297
15314
  } else {
15298
15315
  throw e;
15299
15316
  }
@@ -15368,6 +15385,26 @@ var _Tokenizer = class {
15368
15385
  this._cursor.advance();
15369
15386
  return char;
15370
15387
  }
15388
+ _peekStr(chars) {
15389
+ const len = chars.length;
15390
+ if (this._cursor.charsLeft() < len) {
15391
+ return false;
15392
+ }
15393
+ const cursor = this._cursor.clone();
15394
+ for (let i = 0; i < len; i++) {
15395
+ if (cursor.peek() !== chars.charCodeAt(i)) {
15396
+ return false;
15397
+ }
15398
+ cursor.advance();
15399
+ }
15400
+ return true;
15401
+ }
15402
+ _isBlockStart() {
15403
+ return this._cursor.peek() === $AT && SUPPORTED_BLOCKS.some((blockName) => this._peekStr(blockName));
15404
+ }
15405
+ _isLetStart() {
15406
+ return this._cursor.peek() === $AT && this._peekStr("@let");
15407
+ }
15371
15408
  _consumeEntity(textTokenType) {
15372
15409
  this._beginToken(
15373
15410
  9
@@ -15533,7 +15570,7 @@ var _Tokenizer = class {
15533
15570
  this._consumeTagOpenEnd();
15534
15571
  }
15535
15572
  } catch (e) {
15536
- if (e instanceof _ControlFlowError) {
15573
+ if (e instanceof ParseError) {
15537
15574
  if (openToken) {
15538
15575
  openToken.type = openToken.type === 33 ? 37 : 4;
15539
15576
  } else {
@@ -15629,6 +15666,16 @@ var _Tokenizer = class {
15629
15666
  }
15630
15667
  return isNameEnd(code);
15631
15668
  }, "nameEndPredicate");
15669
+ } else if (attrNameStart === $LBRACKET) {
15670
+ let openBrackets = 0;
15671
+ nameEndPredicate = /* @__PURE__ */ __name((code) => {
15672
+ if (code === $LBRACKET) {
15673
+ openBrackets++;
15674
+ } else if (code === $RBRACKET) {
15675
+ openBrackets--;
15676
+ }
15677
+ return openBrackets <= 0 ? isNameEnd(code) : isNewLine(code);
15678
+ }, "nameEndPredicate");
15632
15679
  } else {
15633
15680
  nameEndPredicate = isNameEnd;
15634
15681
  }
@@ -15901,7 +15948,7 @@ var _Tokenizer = class {
15901
15948
  return true;
15902
15949
  }
15903
15950
  }
15904
- if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._cursor.peek() === $AT || this._cursor.peek() === $RBRACE)) {
15951
+ if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._isBlockStart() || this._isLetStart() || this._cursor.peek() === $RBRACE)) {
15905
15952
  return true;
15906
15953
  }
15907
15954
  return false;
@@ -16224,15 +16271,17 @@ var EscapedCharacterCursor = class _EscapedCharacterCursor extends PlainCharacte
16224
16271
  }
16225
16272
  }
16226
16273
  };
16227
- var CursorError = class {
16274
+ var CursorError = class extends Error {
16228
16275
  static {
16229
16276
  __name(this, "CursorError");
16230
16277
  }
16231
16278
  msg;
16232
16279
  cursor;
16233
16280
  constructor(msg, cursor) {
16281
+ super(msg);
16234
16282
  this.msg = msg;
16235
16283
  this.cursor = cursor;
16284
+ Object.setPrototypeOf(this, new.target.prototype);
16236
16285
  }
16237
16286
  };
16238
16287
  var TreeError = class _TreeError extends ParseError {
@@ -16271,7 +16320,7 @@ var Parser$1 = class Parser {
16271
16320
  const tokenizeResult = tokenize(source, url, this.getTagDefinition, options);
16272
16321
  const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);
16273
16322
  parser.build();
16274
- return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));
16323
+ return new ParseTreeResult(parser.rootNodes, [...tokenizeResult.errors, ...parser.errors]);
16275
16324
  }
16276
16325
  };
16277
16326
  var _TreeBuilder = class __TreeBuilder {
@@ -16492,11 +16541,11 @@ var _TreeBuilder = class __TreeBuilder {
16492
16541
  const directives = [];
16493
16542
  this._consumeAttributesAndDirectives(attrs, directives);
16494
16543
  const fullName = this._getElementFullName(startTagToken, this._getClosestElementLikeParent());
16544
+ const tagDef = this._getTagDefinition(fullName);
16495
16545
  let selfClosing = false;
16496
16546
  if (this._peek.type === 2) {
16497
16547
  this._advance();
16498
16548
  selfClosing = true;
16499
- const tagDef = this._getTagDefinition(fullName);
16500
16549
  if (!(tagDef?.canSelfClose || getNsPrefix(fullName) !== null || tagDef?.isVoid)) {
16501
16550
  this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void, custom and foreign elements can be self closed "${startTagToken.parts[1]}"`));
16502
16551
  }
@@ -16507,7 +16556,7 @@ var _TreeBuilder = class __TreeBuilder {
16507
16556
  const end = this._peek.sourceSpan.fullStart;
16508
16557
  const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
16509
16558
  const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
16510
- const el = new Element2(fullName, attrs, directives, [], span, startSpan, void 0);
16559
+ const el = new Element2(fullName, attrs, directives, [], selfClosing, span, startSpan, void 0, tagDef?.isVoid ?? false);
16511
16560
  const parent = this._getContainer();
16512
16561
  const isClosedByChild = parent !== null && !!this._getTagDefinition(parent)?.isClosedByChild(el.name);
16513
16562
  this._pushContainer(el, isClosedByChild);
@@ -16531,7 +16580,7 @@ var _TreeBuilder = class __TreeBuilder {
16531
16580
  const end = this._peek.sourceSpan.fullStart;
16532
16581
  const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
16533
16582
  const startSpan = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
16534
- const node = new Component2(componentName, tagName, fullName, attrs, directives, [], span, startSpan, void 0);
16583
+ const node = new Component2(componentName, tagName, fullName, attrs, directives, [], selfClosing, span, startSpan, void 0);
16535
16584
  const parent = this._getContainer();
16536
16585
  const isClosedByChild = parent !== null && node.tagName !== null && !!this._getTagDefinition(parent)?.isClosedByChild(node.tagName);
16537
16586
  this._pushContainer(node, isClosedByChild);
@@ -16857,11 +16906,11 @@ var WhitespaceVisitor = class {
16857
16906
  }
16858
16907
  visitElement(element2, context) {
16859
16908
  if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
16860
- const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
16909
+ const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
16861
16910
  this.originalNodeMap?.set(newElement2, element2);
16862
16911
  return newElement2;
16863
16912
  }
16864
- const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
16913
+ const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
16865
16914
  this.originalNodeMap?.set(newElement, element2);
16866
16915
  return newElement;
16867
16916
  }
@@ -16922,11 +16971,11 @@ var WhitespaceVisitor = class {
16922
16971
  }
16923
16972
  visitComponent(node, context) {
16924
16973
  if (node.tagName && SKIP_WS_TRIM_TAGS.has(node.tagName) || hasPreserveWhitespacesAttr(node.attrs)) {
16925
- const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16974
+ const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16926
16975
  this.originalNodeMap?.set(newElement2, node);
16927
16976
  return newElement2;
16928
16977
  }
16929
- const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16978
+ const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16930
16979
  this.originalNodeMap?.set(newElement, node);
16931
16980
  return newElement;
16932
16981
  }
@@ -17247,13 +17296,17 @@ var _Scanner = class {
17247
17296
  case $HASH:
17248
17297
  return this.scanPrivateIdentifier();
17249
17298
  case $PLUS:
17299
+ return this.scanComplexOperator(start, "+", $EQ, "=");
17250
17300
  case $MINUS:
17301
+ return this.scanComplexOperator(start, "-", $EQ, "=");
17251
17302
  case $SLASH:
17303
+ return this.scanComplexOperator(start, "/", $EQ, "=");
17252
17304
  case $PERCENT:
17305
+ return this.scanComplexOperator(start, "%", $EQ, "=");
17253
17306
  case $CARET:
17254
- return this.scanOperator(start, String.fromCharCode(peek));
17307
+ return this.scanOperator(start, "^");
17255
17308
  case $STAR:
17256
- return this.scanComplexOperator(start, "*", $STAR, "*");
17309
+ return this.scanStar(start);
17257
17310
  case $QUESTION:
17258
17311
  return this.scanQuestion(start);
17259
17312
  case $LT:
@@ -17263,9 +17316,9 @@ var _Scanner = class {
17263
17316
  case $EQ:
17264
17317
  return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, "=", $EQ, "=");
17265
17318
  case $AMPERSAND:
17266
- return this.scanComplexOperator(start, "&", $AMPERSAND, "&");
17319
+ return this.scanComplexOperator(start, "&", $AMPERSAND, "&", $EQ, "=");
17267
17320
  case $BAR:
17268
- return this.scanComplexOperator(start, "|", $BAR, "|");
17321
+ return this.scanComplexOperator(start, "|", $BAR, "|", $EQ, "=");
17269
17322
  case $NBSP:
17270
17323
  while (isWhitespace(this.peek))
17271
17324
  this.advance();
@@ -17398,12 +17451,19 @@ var _Scanner = class {
17398
17451
  }
17399
17452
  scanQuestion(start) {
17400
17453
  this.advance();
17401
- let str = "?";
17402
- if (this.peek === $QUESTION || this.peek === $PERIOD) {
17403
- str += this.peek === $PERIOD ? "." : "?";
17454
+ let operator = "?";
17455
+ if (this.peek === $QUESTION) {
17456
+ operator += "?";
17457
+ this.advance();
17458
+ if (this.peek === $EQ) {
17459
+ operator += "=";
17460
+ this.advance();
17461
+ }
17462
+ } else if (this.peek === $PERIOD) {
17463
+ operator += ".";
17404
17464
  this.advance();
17405
17465
  }
17406
- return newOperatorToken(start, this.index, str);
17466
+ return newOperatorToken(start, this.index, operator);
17407
17467
  }
17408
17468
  scanTemplateLiteralPart(start) {
17409
17469
  let buffer = "";
@@ -17460,6 +17520,22 @@ var _Scanner = class {
17460
17520
  buffer += String.fromCharCode(unescapedCode);
17461
17521
  return buffer;
17462
17522
  }
17523
+ scanStar(start) {
17524
+ this.advance();
17525
+ let operator = "*";
17526
+ if (this.peek === $STAR) {
17527
+ operator += "*";
17528
+ this.advance();
17529
+ if (this.peek === $EQ) {
17530
+ operator += "=";
17531
+ this.advance();
17532
+ }
17533
+ } else if (this.peek === $EQ) {
17534
+ operator += "=";
17535
+ this.advance();
17536
+ }
17537
+ return newOperatorToken(start, this.index, operator);
17538
+ }
17463
17539
  };
17464
17540
  function isIdentifierStart(code) {
17465
17541
  return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$;
@@ -17528,25 +17604,32 @@ var TemplateBindingParseResult = class {
17528
17604
  this.errors = errors;
17529
17605
  }
17530
17606
  };
17607
+ function getLocation(span) {
17608
+ return span.start.toString() || "(unknown)";
17609
+ }
17610
+ __name(getLocation, "getLocation");
17531
17611
  var Parser2 = class {
17532
17612
  static {
17533
17613
  __name(this, "Parser");
17534
17614
  }
17535
17615
  _lexer;
17536
- errors = [];
17537
- constructor(_lexer) {
17616
+ _supportsDirectPipeReferences;
17617
+ constructor(_lexer, _supportsDirectPipeReferences = false) {
17538
17618
  this._lexer = _lexer;
17619
+ this._supportsDirectPipeReferences = _supportsDirectPipeReferences;
17539
17620
  }
17540
- parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17541
- this._checkNoInterpolation(input, location, interpolationConfig);
17542
- const sourceToLex = this._stripComments(input);
17621
+ parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17622
+ const errors = [];
17623
+ this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
17624
+ const { stripped: sourceToLex } = this._stripComments(input);
17543
17625
  const tokens = this._lexer.tokenize(sourceToLex);
17544
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1, this.errors, 0).parseChain();
17545
- return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
17626
+ const ast = new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 1, errors, 0, this._supportsDirectPipeReferences).parseChain();
17627
+ return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17546
17628
  }
17547
- parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17548
- const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);
17549
- return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
17629
+ parseBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17630
+ const errors = [];
17631
+ const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
17632
+ return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17550
17633
  }
17551
17634
  checkSimpleExpression(ast) {
17552
17635
  const checker = new SimpleExpressionChecker();
@@ -17554,22 +17637,20 @@ var Parser2 = class {
17554
17637
  return checker.errors;
17555
17638
  }
17556
17639
  // Host bindings parsed here
17557
- parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17558
- const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);
17559
- const errors = this.checkSimpleExpression(ast);
17560
- if (errors.length > 0) {
17561
- this._reportError(`Host binding expression cannot contain ${errors.join(" ")}`, input, location);
17562
- }
17563
- return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
17564
- }
17565
- _reportError(message, input, errLocation, ctxLocation) {
17566
- this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
17567
- }
17568
- _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
17569
- this._checkNoInterpolation(input, location, interpolationConfig);
17570
- const sourceToLex = this._stripComments(input);
17640
+ parseSimpleBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17641
+ const errors = [];
17642
+ const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
17643
+ const simplExpressionErrors = this.checkSimpleExpression(ast);
17644
+ if (simplExpressionErrors.length > 0) {
17645
+ errors.push(getParseError(`Host binding expression cannot contain ${simplExpressionErrors.join(" ")}`, input, "", parseSourceSpan));
17646
+ }
17647
+ return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17648
+ }
17649
+ _parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
17650
+ this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
17651
+ const { stripped: sourceToLex } = this._stripComments(input);
17571
17652
  const tokens = this._lexer.tokenize(sourceToLex);
17572
- return new _ParseAST(input, location, absoluteOffset, tokens, 0, this.errors, 0).parseChain();
17653
+ return new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
17573
17654
  }
17574
17655
  /**
17575
17656
  * Parse microsyntax template expression and return a list of bindings or
@@ -17597,53 +17678,52 @@ var Parser2 = class {
17597
17678
  * @param absoluteKeyOffset start of the `templateKey`
17598
17679
  * @param absoluteValueOffset start of the `templateValue`
17599
17680
  */
17600
- parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
17681
+ parseTemplateBindings(templateKey, templateValue, parseSourceSpan, absoluteKeyOffset, absoluteValueOffset) {
17601
17682
  const tokens = this._lexer.tokenize(templateValue);
17602
- const parser = new _ParseAST(
17603
- templateValue,
17604
- templateUrl,
17605
- absoluteValueOffset,
17606
- tokens,
17607
- 0,
17608
- this.errors,
17609
- 0
17610
- /* relative offset */
17611
- );
17683
+ const errors = [];
17684
+ const parser = new _ParseAST(templateValue, parseSourceSpan, absoluteValueOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences);
17612
17685
  return parser.parseTemplateBindings({
17613
17686
  source: templateKey,
17614
17687
  span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length)
17615
17688
  });
17616
17689
  }
17617
- parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17618
- const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig);
17690
+ parseInterpolation(input, parseSourceSpan, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17691
+ const errors = [];
17692
+ const { strings, expressions, offsets } = this.splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig);
17619
17693
  if (expressions.length === 0)
17620
17694
  return null;
17621
17695
  const expressionNodes = [];
17622
17696
  for (let i = 0; i < expressions.length; ++i) {
17697
+ const expressionSpan = interpolatedTokens?.[i * 2 + 1]?.sourceSpan;
17623
17698
  const expressionText = expressions[i].text;
17624
- const sourceToLex = this._stripComments(expressionText);
17699
+ const { stripped: sourceToLex, hasComments } = this._stripComments(expressionText);
17625
17700
  const tokens = this._lexer.tokenize(sourceToLex);
17626
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0, this.errors, offsets[i]).parseChain();
17701
+ if (hasComments && sourceToLex.trim().length === 0 && tokens.length === 0) {
17702
+ errors.push(getParseError("Interpolation expression cannot only contain a comment", input, `at column ${expressions[i].start} in`, parseSourceSpan));
17703
+ continue;
17704
+ }
17705
+ const ast = new _ParseAST(expressionSpan ? expressionText : input, expressionSpan || parseSourceSpan, absoluteOffset, tokens, 0, errors, offsets[i], this._supportsDirectPipeReferences).parseChain();
17627
17706
  expressionNodes.push(ast);
17628
17707
  }
17629
- return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input, location, absoluteOffset);
17708
+ return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17630
17709
  }
17631
17710
  /**
17632
17711
  * Similar to `parseInterpolation`, but treats the provided string as a single expression
17633
17712
  * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
17634
17713
  * This is used for parsing the switch expression in ICUs.
17635
17714
  */
17636
- parseInterpolationExpression(expression, location, absoluteOffset) {
17637
- const sourceToLex = this._stripComments(expression);
17715
+ parseInterpolationExpression(expression, parseSourceSpan, absoluteOffset) {
17716
+ const { stripped: sourceToLex } = this._stripComments(expression);
17638
17717
  const tokens = this._lexer.tokenize(sourceToLex);
17639
- const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0, this.errors, 0).parseChain();
17718
+ const errors = [];
17719
+ const ast = new _ParseAST(expression, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
17640
17720
  const strings = ["", ""];
17641
- return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
17721
+ return this.createInterpolationAst(strings, [ast], expression, getLocation(parseSourceSpan), absoluteOffset, errors);
17642
17722
  }
17643
- createInterpolationAst(strings, expressions, input, location, absoluteOffset) {
17723
+ createInterpolationAst(strings, expressions, input, location, absoluteOffset, errors) {
17644
17724
  const span = new ParseSpan(0, input.length);
17645
17725
  const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions);
17646
- return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);
17726
+ return new ASTWithSource(interpolation, input, location, absoluteOffset, errors);
17647
17727
  }
17648
17728
  /**
17649
17729
  * Splits a string of text into "raw" text segments and expressions present in interpolations in
@@ -17652,7 +17732,7 @@ var Parser2 = class {
17652
17732
  * `SplitInterpolation` with splits that look like
17653
17733
  * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
17654
17734
  */
17655
- splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17735
+ splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17656
17736
  const strings = [];
17657
17737
  const expressions = [];
17658
17738
  const offsets = [];
@@ -17683,7 +17763,7 @@ var Parser2 = class {
17683
17763
  const fullEnd = exprEnd + interpEnd.length;
17684
17764
  const text2 = input.substring(exprStart, exprEnd);
17685
17765
  if (text2.trim().length === 0) {
17686
- this._reportError("Blank expressions are not allowed in interpolated strings", input, `at column ${i} in`, location);
17766
+ errors.push(getParseError("Blank expressions are not allowed in interpolated strings", input, `at column ${i} in`, parseSourceSpan));
17687
17767
  }
17688
17768
  expressions.push({ text: text2, start: fullStart, end: fullEnd });
17689
17769
  const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;
@@ -17704,13 +17784,13 @@ var Parser2 = class {
17704
17784
  }
17705
17785
  return new SplitInterpolation(strings, expressions, offsets);
17706
17786
  }
17707
- wrapLiteralPrimitive(input, location, absoluteOffset) {
17787
+ wrapLiteralPrimitive(input, sourceSpanOrLocation, absoluteOffset) {
17708
17788
  const span = new ParseSpan(0, input == null ? 0 : input.length);
17709
- return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);
17789
+ return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, typeof sourceSpanOrLocation === "string" ? sourceSpanOrLocation : getLocation(sourceSpanOrLocation), absoluteOffset, []);
17710
17790
  }
17711
17791
  _stripComments(input) {
17712
17792
  const i = this._commentStart(input);
17713
- return i != null ? input.substring(0, i) : input;
17793
+ return i != null ? { stripped: input.substring(0, i), hasComments: true } : { stripped: input, hasComments: false };
17714
17794
  }
17715
17795
  _commentStart(input) {
17716
17796
  let outerQuote = null;
@@ -17727,7 +17807,7 @@ var Parser2 = class {
17727
17807
  }
17728
17808
  return null;
17729
17809
  }
17730
- _checkNoInterpolation(input, location, { start, end }) {
17810
+ _checkNoInterpolation(errors, input, parseSourceSpan, { start, end }) {
17731
17811
  let startIndex = -1;
17732
17812
  let endIndex = -1;
17733
17813
  for (const charIndex of this._forEachUnquotedChar(input, 0)) {
@@ -17743,7 +17823,7 @@ var Parser2 = class {
17743
17823
  }
17744
17824
  }
17745
17825
  if (startIndex > -1 && endIndex > -1) {
17746
- this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location);
17826
+ errors.push(getParseError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, parseSourceSpan));
17747
17827
  }
17748
17828
  }
17749
17829
  /**
@@ -17790,12 +17870,13 @@ var _ParseAST = class {
17790
17870
  __name(this, "_ParseAST");
17791
17871
  }
17792
17872
  input;
17793
- location;
17873
+ parseSourceSpan;
17794
17874
  absoluteOffset;
17795
17875
  tokens;
17796
17876
  parseFlags;
17797
17877
  errors;
17798
17878
  offset;
17879
+ supportsDirectPipeReferences;
17799
17880
  rparensExpected = 0;
17800
17881
  rbracketsExpected = 0;
17801
17882
  rbracesExpected = 0;
@@ -17806,14 +17887,15 @@ var _ParseAST = class {
17806
17887
  // and may change for subsequent expressions visited by the parser.
17807
17888
  sourceSpanCache = /* @__PURE__ */ new Map();
17808
17889
  index = 0;
17809
- constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {
17890
+ constructor(input, parseSourceSpan, absoluteOffset, tokens, parseFlags, errors, offset, supportsDirectPipeReferences) {
17810
17891
  this.input = input;
17811
- this.location = location;
17892
+ this.parseSourceSpan = parseSourceSpan;
17812
17893
  this.absoluteOffset = absoluteOffset;
17813
17894
  this.tokens = tokens;
17814
17895
  this.parseFlags = parseFlags;
17815
17896
  this.errors = errors;
17816
17897
  this.offset = offset;
17898
+ this.supportsDirectPipeReferences = supportsDirectPipeReferences;
17817
17899
  }
17818
17900
  peek(offset) {
17819
17901
  const i = this.index + offset;
@@ -17925,6 +18007,9 @@ var _ParseAST = class {
17925
18007
  return false;
17926
18008
  }
17927
18009
  }
18010
+ isAssignmentOperator(token) {
18011
+ return token.type === TokenType.Operator && Binary.isAssignmentOperation(token.strValue);
18012
+ }
17928
18013
  expectOperator(operator) {
17929
18014
  if (this.consumeOptionalOperator(operator))
17930
18015
  return;
@@ -18011,7 +18096,14 @@ var _ParseAST = class {
18011
18096
  while (this.consumeOptionalCharacter($COLON)) {
18012
18097
  args.push(this.parseExpression());
18013
18098
  }
18014
- result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);
18099
+ let type;
18100
+ if (this.supportsDirectPipeReferences) {
18101
+ const charCode = nameId.charCodeAt(0);
18102
+ type = charCode === $_ || charCode >= $A && charCode <= $Z ? BindingPipeType.ReferencedDirectly : BindingPipeType.ReferencedByName;
18103
+ } else {
18104
+ type = BindingPipeType.ReferencedByName;
18105
+ }
18106
+ result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, type, nameSpan);
18015
18107
  } while (this.consumeOptionalOperator("|"));
18016
18108
  }
18017
18109
  return result;
@@ -18324,27 +18416,30 @@ var _ParseAST = class {
18324
18416
  return id2;
18325
18417
  });
18326
18418
  const nameSpan = this.sourceSpan(nameStart);
18327
- let receiver;
18328
18419
  if (isSafe) {
18329
- if (this.consumeOptionalOperator("=")) {
18420
+ if (this.isAssignmentOperator(this.next)) {
18421
+ this.advance();
18330
18422
  this.error("The '?.' operator cannot be used in the assignment");
18331
- receiver = new EmptyExpr$1(this.span(start), this.sourceSpan(start));
18423
+ return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
18332
18424
  } else {
18333
- receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18425
+ return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18334
18426
  }
18335
18427
  } else {
18336
- if (this.consumeOptionalOperator("=")) {
18428
+ if (this.isAssignmentOperator(this.next)) {
18429
+ const operation = this.next.strValue;
18337
18430
  if (!(this.parseFlags & 1)) {
18431
+ this.advance();
18338
18432
  this.error("Bindings cannot contain assignments");
18339
18433
  return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
18340
18434
  }
18435
+ const receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18436
+ this.advance();
18341
18437
  const value = this.parseConditional();
18342
- receiver = new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id, value);
18438
+ return new Binary(this.span(start), this.sourceSpan(start), operation, receiver, value);
18343
18439
  } else {
18344
- receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18440
+ return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18345
18441
  }
18346
18442
  }
18347
- return receiver;
18348
18443
  }
18349
18444
  parseCall(receiver, start, isSafe) {
18350
18445
  const argumentStart = this.inputIndex;
@@ -18437,12 +18532,16 @@ var _ParseAST = class {
18437
18532
  }
18438
18533
  this.rbracketsExpected--;
18439
18534
  this.expectCharacter($RBRACKET);
18440
- if (this.consumeOptionalOperator("=")) {
18535
+ if (this.isAssignmentOperator(this.next)) {
18536
+ const operation = this.next.strValue;
18441
18537
  if (isSafe) {
18538
+ this.advance();
18442
18539
  this.error("The '?.' operator cannot be used in the assignment");
18443
18540
  } else {
18541
+ const binaryReceiver = new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
18542
+ this.advance();
18444
18543
  const value = this.parseConditional();
18445
- return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value);
18544
+ return new Binary(this.span(start), this.sourceSpan(start), operation, binaryReceiver, value);
18446
18545
  }
18447
18546
  } else {
18448
18547
  return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) : new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
@@ -18499,7 +18598,7 @@ var _ParseAST = class {
18499
18598
  const ast = this.parsePipe();
18500
18599
  const { start, end } = ast.span;
18501
18600
  const value = this.input.substring(start, end);
18502
- return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);
18601
+ return new ASTWithSource(ast, value, getLocation(this.parseSourceSpan), this.absoluteOffset + start, this.errors);
18503
18602
  }
18504
18603
  /**
18505
18604
  * Return the binding for a variable declared using `as`. Note that the order
@@ -18600,13 +18699,11 @@ var _ParseAST = class {
18600
18699
  * Records an error and skips over the token stream until reaching a recoverable point. See
18601
18700
  * `this.skip` for more details on token skipping.
18602
18701
  */
18603
- error(message, index = null) {
18604
- this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
18702
+ error(message, index = this.index) {
18703
+ this.errors.push(getParseError(message, this.input, this.getErrorLocationText(index), this.parseSourceSpan));
18605
18704
  this.skip();
18606
18705
  }
18607
- locationText(index = null) {
18608
- if (index == null)
18609
- index = this.index;
18706
+ getErrorLocationText(index) {
18610
18707
  return index < this.tokens.length ? `at column ${this.tokens[index].index + 1} in` : `at the end of the expression`;
18611
18708
  }
18612
18709
  /**
@@ -18638,7 +18735,7 @@ var _ParseAST = class {
18638
18735
  * none of the calling productions are not expecting the closing token else we will never
18639
18736
  * make progress in the case of an extraneous group closing symbol (such as a stray ')').
18640
18737
  * That is, we skip a closing symbol if we are not in a grouping production.
18641
- * - '=' in a `Writable` context
18738
+ * - Assignment in a `Writable` context
18642
18739
  * - In this context, we are able to recover after seeing the `=` operator, which
18643
18740
  * signals the presence of an independent rvalue expression following the `=` operator.
18644
18741
  *
@@ -18647,15 +18744,24 @@ var _ParseAST = class {
18647
18744
  */
18648
18745
  skip() {
18649
18746
  let n = this.next;
18650
- while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator("|") && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !n.isOperator("="))) {
18747
+ while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator("|") && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !this.isAssignmentOperator(n))) {
18651
18748
  if (this.next.isError()) {
18652
- this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
18749
+ this.errors.push(getParseError(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan));
18653
18750
  }
18654
18751
  this.advance();
18655
18752
  n = this.next;
18656
18753
  }
18657
18754
  }
18658
18755
  };
18756
+ function getParseError(message, input, locationText, parseSourceSpan) {
18757
+ if (locationText.length > 0) {
18758
+ locationText = ` ${locationText} `;
18759
+ }
18760
+ const location = getLocation(parseSourceSpan);
18761
+ const error = `Parser Error: ${message}${locationText}[${input}] in ${location}`;
18762
+ return new ParseError(parseSourceSpan, error);
18763
+ }
18764
+ __name(getParseError, "getParseError");
18659
18765
  var SimpleExpressionChecker = class extends RecursiveAstVisitor2 {
18660
18766
  static {
18661
18767
  __name(this, "SimpleExpressionChecker");
@@ -18719,9 +18825,6 @@ var SerializeExpressionVisitor = class {
18719
18825
  visitKeyedRead(ast, context) {
18720
18826
  return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}]`;
18721
18827
  }
18722
- visitKeyedWrite(ast, context) {
18723
- return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}] = ${ast.value.visit(this, context)}`;
18724
- }
18725
18828
  visitLiteralArray(ast, context) {
18726
18829
  return `[${ast.expressions.map((e) => e.visit(this, context)).join(", ")}]`;
18727
18830
  }
@@ -18759,13 +18862,6 @@ var SerializeExpressionVisitor = class {
18759
18862
  return `${ast.receiver.visit(this, context)}.${ast.name}`;
18760
18863
  }
18761
18864
  }
18762
- visitPropertyWrite(ast, context) {
18763
- if (ast.receiver instanceof ImplicitReceiver) {
18764
- return `${ast.name} = ${ast.value.visit(this, context)}`;
18765
- } else {
18766
- return `${ast.receiver.visit(this, context)}.${ast.name} = ${ast.value.visit(this, context)}`;
18767
- }
18768
- }
18769
18865
  visitSafePropertyRead(ast, context) {
18770
18866
  return `${ast.receiver.visit(this, context)}?.${ast.name}`;
18771
18867
  }
@@ -19088,7 +19184,45 @@ var _ATTR_TO_PROP = new Map(Object.entries({
19088
19184
  "formaction": "formAction",
19089
19185
  "innerHtml": "innerHTML",
19090
19186
  "readonly": "readOnly",
19091
- "tabindex": "tabIndex"
19187
+ "tabindex": "tabIndex",
19188
+ // https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
19189
+ "aria-atomic": "ariaAtomic",
19190
+ "aria-autocomplete": "ariaAutoComplete",
19191
+ "aria-busy": "ariaBusy",
19192
+ "aria-checked": "ariaChecked",
19193
+ "aria-colcount": "ariaColCount",
19194
+ "aria-colindex": "ariaColIndex",
19195
+ "aria-colspan": "ariaColSpan",
19196
+ "aria-current": "ariaCurrent",
19197
+ "aria-disabled": "ariaDisabled",
19198
+ "aria-expanded": "ariaExpanded",
19199
+ "aria-haspopup": "ariaHasPopup",
19200
+ "aria-hidden": "ariaHidden",
19201
+ "aria-invalid": "ariaInvalid",
19202
+ "aria-keyshortcuts": "ariaKeyShortcuts",
19203
+ "aria-label": "ariaLabel",
19204
+ "aria-level": "ariaLevel",
19205
+ "aria-live": "ariaLive",
19206
+ "aria-modal": "ariaModal",
19207
+ "aria-multiline": "ariaMultiLine",
19208
+ "aria-multiselectable": "ariaMultiSelectable",
19209
+ "aria-orientation": "ariaOrientation",
19210
+ "aria-placeholder": "ariaPlaceholder",
19211
+ "aria-posinset": "ariaPosInSet",
19212
+ "aria-pressed": "ariaPressed",
19213
+ "aria-readonly": "ariaReadOnly",
19214
+ "aria-required": "ariaRequired",
19215
+ "aria-roledescription": "ariaRoleDescription",
19216
+ "aria-rowcount": "ariaRowCount",
19217
+ "aria-rowindex": "ariaRowIndex",
19218
+ "aria-rowspan": "ariaRowSpan",
19219
+ "aria-selected": "ariaSelected",
19220
+ "aria-setsize": "ariaSetSize",
19221
+ "aria-sort": "ariaSort",
19222
+ "aria-valuemax": "ariaValueMax",
19223
+ "aria-valuemin": "ariaValueMin",
19224
+ "aria-valuenow": "ariaValueNow",
19225
+ "aria-valuetext": "ariaValueText"
19092
19226
  }));
19093
19227
  var _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName, attributeName]) => {
19094
19228
  inverted.set(propertyName, attributeName);
@@ -19768,7 +19902,7 @@ var _I18nVisitor = class {
19768
19902
  const expr = this._expressionParser.parseBinding(
19769
19903
  expression,
19770
19904
  /* location */
19771
- token.sourceSpan.start.toString(),
19905
+ token.sourceSpan,
19772
19906
  /* absoluteOffset */
19773
19907
  token.sourceSpan.start.offset,
19774
19908
  this._interpolationConfig
@@ -19818,14 +19952,6 @@ function extractPlaceholderName(input) {
19818
19952
  return input.split(_CUSTOM_PH_EXP)[2];
19819
19953
  }
19820
19954
  __name(extractPlaceholderName, "extractPlaceholderName");
19821
- var I18nError = class extends ParseError {
19822
- static {
19823
- __name(this, "I18nError");
19824
- }
19825
- constructor(span, msg) {
19826
- super(span, msg);
19827
- }
19828
- };
19829
19955
  var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
19830
19956
  // NOTE: All strings in this set *must* be lowercase!
19831
19957
  // TrustedHTML
@@ -20031,7 +20157,7 @@ var I18nMetaVisitor = class {
20031
20157
  }
20032
20158
  }
20033
20159
  _reportError(node, msg) {
20034
- this._errors.push(new I18nError(node.sourceSpan, msg));
20160
+ this._errors.push(new ParseError(node.sourceSpan, msg));
20035
20161
  }
20036
20162
  };
20037
20163
  var I18N_MEANING_SEPARATOR = "|";
@@ -20092,7 +20218,7 @@ function createGoogleGetMsgStatements(variable$1, message, closureVar, placehold
20092
20218
  })))
20093
20219
  }));
20094
20220
  }
20095
- const googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();
20221
+ const googGetMsgStmt = new DeclareVarStmt(closureVar.name, variable(GOOG_GET_MSG).callFn(args), INFERRED_TYPE, StmtModifier.Final);
20096
20222
  googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));
20097
20223
  const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));
20098
20224
  return [googGetMsgStmt, i18nAssignmentStmt];
@@ -20642,10 +20768,32 @@ function addNamesToView(unit, baseName, state, compatibility) {
20642
20768
  switch (op.kind) {
20643
20769
  case OpKind.Property:
20644
20770
  case OpKind.DomProperty:
20645
- if (op.isAnimationTrigger) {
20771
+ if (op.bindingKind === BindingKind.LegacyAnimation) {
20646
20772
  op.name = "@" + op.name;
20647
20773
  }
20648
20774
  break;
20775
+ case OpKind.Animation:
20776
+ if (op.handlerFnName === null) {
20777
+ const animationKind2 = op.name.replace(".", "");
20778
+ op.handlerFnName = `${unit.fnName}_${animationKind2}_cb`;
20779
+ op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
20780
+ }
20781
+ break;
20782
+ case OpKind.AnimationListener:
20783
+ if (op.handlerFnName !== null) {
20784
+ break;
20785
+ }
20786
+ if (!op.hostListener && op.targetSlot.slot === null) {
20787
+ throw new Error(`Expected a slot to be assigned`);
20788
+ }
20789
+ const animationKind = op.name.replace(".", "");
20790
+ if (op.hostListener) {
20791
+ op.handlerFnName = `${baseName}_${animationKind}_HostBindingHandler`;
20792
+ } else {
20793
+ op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animationKind}_${op.targetSlot.slot}_listener`;
20794
+ }
20795
+ op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
20796
+ break;
20649
20797
  case OpKind.Listener:
20650
20798
  if (op.handlerFnName !== null) {
20651
20799
  break;
@@ -20653,15 +20801,15 @@ function addNamesToView(unit, baseName, state, compatibility) {
20653
20801
  if (!op.hostListener && op.targetSlot.slot === null) {
20654
20802
  throw new Error(`Expected a slot to be assigned`);
20655
20803
  }
20656
- let animation = "";
20657
- if (op.isAnimationListener) {
20658
- op.name = `@${op.name}.${op.animationPhase}`;
20659
- animation = "animation";
20804
+ let animation2 = "";
20805
+ if (op.isLegacyAnimationListener) {
20806
+ op.name = `@${op.name}.${op.legacyAnimationPhase}`;
20807
+ animation2 = "animation";
20660
20808
  }
20661
20809
  if (op.hostListener) {
20662
- op.handlerFnName = `${baseName}_${animation}${op.name}_HostBindingHandler`;
20810
+ op.handlerFnName = `${baseName}_${animation2}${op.name}_HostBindingHandler`;
20663
20811
  } else {
20664
- op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation}${op.name}_${op.targetSlot.slot}_listener`;
20812
+ op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation2}${op.name}_${op.targetSlot.slot}_listener`;
20665
20813
  }
20666
20814
  op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
20667
20815
  break;
@@ -20778,7 +20926,7 @@ __name(stripImportant, "stripImportant");
20778
20926
  function mergeNextContextExpressions(job) {
20779
20927
  for (const unit of job.units) {
20780
20928
  for (const op of unit.create) {
20781
- if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
20929
+ if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
20782
20930
  mergeNextContextsInOps(op.handlerOps);
20783
20931
  }
20784
20932
  }
@@ -20879,7 +21027,7 @@ function kindWithInterpolationTest(kind, interpolation) {
20879
21027
  }
20880
21028
  __name(kindWithInterpolationTest, "kindWithInterpolationTest");
20881
21029
  function basicListenerKindTest(op) {
20882
- return op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) || op.kind === OpKind.TwoWayListener;
21030
+ return op.kind === OpKind.Listener && !(op.hostListener && op.isLegacyAnimationListener) || op.kind === OpKind.TwoWayListener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener;
20883
21031
  }
20884
21032
  __name(basicListenerKindTest, "basicListenerKindTest");
20885
21033
  function nonInterpolationPropertyKindTest(op) {
@@ -20887,7 +21035,7 @@ function nonInterpolationPropertyKindTest(op) {
20887
21035
  }
20888
21036
  __name(nonInterpolationPropertyKindTest, "nonInterpolationPropertyKindTest");
20889
21037
  var CREATE_ORDERING = [
20890
- { test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener, "test") },
21038
+ { test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.isLegacyAnimationListener, "test") },
20891
21039
  { test: basicListenerKindTest }
20892
21040
  ];
20893
21041
  var UPDATE_ORDERING = [
@@ -20912,6 +21060,7 @@ var UPDATE_HOST_ORDERING = [
20912
21060
  var handledOpKinds = /* @__PURE__ */ new Set([
20913
21061
  OpKind.Listener,
20914
21062
  OpKind.TwoWayListener,
21063
+ OpKind.AnimationListener,
20915
21064
  OpKind.StyleMap,
20916
21065
  OpKind.ClassMap,
20917
21066
  OpKind.StyleProp,
@@ -20919,7 +21068,8 @@ var handledOpKinds = /* @__PURE__ */ new Set([
20919
21068
  OpKind.Property,
20920
21069
  OpKind.TwoWayProperty,
20921
21070
  OpKind.DomProperty,
20922
- OpKind.Attribute
21071
+ OpKind.Attribute,
21072
+ OpKind.Animation
20923
21073
  ]);
20924
21074
  function orderOps(job) {
20925
21075
  for (const unit of job.units) {
@@ -21087,6 +21237,11 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
21087
21237
  subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
21088
21238
  }
21089
21239
  break;
21240
+ case OpKind.Projection:
21241
+ if (op.fallbackView !== null) {
21242
+ subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.fallbackView), i18nBlock, op.fallbackViewI18nPlaceholder, subTemplateIndex);
21243
+ }
21244
+ break;
21090
21245
  }
21091
21246
  }
21092
21247
  return subTemplateIndex;
@@ -21234,6 +21389,38 @@ function elementOrContainerBase(instruction, slot, tag, constIndex, localRefInde
21234
21389
  return call(instruction, args, sourceSpan);
21235
21390
  }
21236
21391
  __name(elementOrContainerBase, "elementOrContainerBase");
21392
+ function templateBase(instruction, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
21393
+ const args = [
21394
+ literal(slot),
21395
+ templateFnRef,
21396
+ literal(decls),
21397
+ literal(vars),
21398
+ literal(tag),
21399
+ literal(constIndex)
21400
+ ];
21401
+ if (localRefs !== null) {
21402
+ args.push(literal(localRefs));
21403
+ args.push(importExpr(Identifiers.templateRefExtractor));
21404
+ }
21405
+ while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
21406
+ args.pop();
21407
+ }
21408
+ return call(instruction, args, sourceSpan);
21409
+ }
21410
+ __name(templateBase, "templateBase");
21411
+ function propertyBase(instruction, name, expression, sanitizer, sourceSpan) {
21412
+ const args = [literal(name)];
21413
+ if (expression instanceof Interpolation2) {
21414
+ args.push(interpolationToExpression(expression, sourceSpan));
21415
+ } else {
21416
+ args.push(expression);
21417
+ }
21418
+ if (sanitizer !== null) {
21419
+ args.push(sanitizer);
21420
+ }
21421
+ return call(instruction, args, sourceSpan);
21422
+ }
21423
+ __name(propertyBase, "propertyBase");
21237
21424
  function elementEnd(sourceSpan) {
21238
21425
  return call(Identifiers.elementEnd, [], sourceSpan);
21239
21426
  }
@@ -21267,22 +21454,7 @@ function elementContainerEnd() {
21267
21454
  }
21268
21455
  __name(elementContainerEnd, "elementContainerEnd");
21269
21456
  function template(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
21270
- const args = [
21271
- literal(slot),
21272
- templateFnRef,
21273
- literal(decls),
21274
- literal(vars),
21275
- literal(tag),
21276
- literal(constIndex)
21277
- ];
21278
- if (localRefs !== null) {
21279
- args.push(literal(localRefs));
21280
- args.push(importExpr(Identifiers.templateRefExtractor));
21281
- }
21282
- while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
21283
- args.pop();
21284
- }
21285
- return call(Identifiers.templateCreate, args, sourceSpan);
21457
+ return templateBase(Identifiers.templateCreate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
21286
21458
  }
21287
21459
  __name(template, "template");
21288
21460
  function disableBindings() {
@@ -21640,17 +21812,12 @@ function i18nAttributes(slot, i18nAttributesConfig) {
21640
21812
  return call(Identifiers.i18nAttributes, args, null);
21641
21813
  }
21642
21814
  __name(i18nAttributes, "i18nAttributes");
21815
+ function ariaProperty(name, expression, sourceSpan) {
21816
+ return propertyBase(Identifiers.ariaProperty, name, expression, null, sourceSpan);
21817
+ }
21818
+ __name(ariaProperty, "ariaProperty");
21643
21819
  function property(name, expression, sanitizer, sourceSpan) {
21644
- const args = [literal(name)];
21645
- if (expression instanceof Interpolation2) {
21646
- args.push(interpolationToExpression(expression, sourceSpan));
21647
- } else {
21648
- args.push(expression);
21649
- }
21650
- if (sanitizer !== null) {
21651
- args.push(sanitizer);
21652
- }
21653
- return call(Identifiers.property, args, sourceSpan);
21820
+ return propertyBase(Identifiers.property, name, expression, sanitizer, sourceSpan);
21654
21821
  }
21655
21822
  __name(property, "property");
21656
21823
  function twoWayProperty(name, expression, sanitizer, sourceSpan) {
@@ -21704,6 +21871,58 @@ function classMap(expression, sourceSpan) {
21704
21871
  return call(Identifiers.classMap, [value], sourceSpan);
21705
21872
  }
21706
21873
  __name(classMap, "classMap");
21874
+ function domElement(slot, tag, constIndex, localRefIndex, sourceSpan) {
21875
+ return elementOrContainerBase(Identifiers.domElement, slot, tag, constIndex, localRefIndex, sourceSpan);
21876
+ }
21877
+ __name(domElement, "domElement");
21878
+ function domElementStart(slot, tag, constIndex, localRefIndex, sourceSpan) {
21879
+ return elementOrContainerBase(Identifiers.domElementStart, slot, tag, constIndex, localRefIndex, sourceSpan);
21880
+ }
21881
+ __name(domElementStart, "domElementStart");
21882
+ function domElementEnd(sourceSpan) {
21883
+ return call(Identifiers.domElementEnd, [], sourceSpan);
21884
+ }
21885
+ __name(domElementEnd, "domElementEnd");
21886
+ function domElementContainerStart(slot, constIndex, localRefIndex, sourceSpan) {
21887
+ return elementOrContainerBase(
21888
+ Identifiers.domElementContainerStart,
21889
+ slot,
21890
+ /* tag */
21891
+ null,
21892
+ constIndex,
21893
+ localRefIndex,
21894
+ sourceSpan
21895
+ );
21896
+ }
21897
+ __name(domElementContainerStart, "domElementContainerStart");
21898
+ function domElementContainer(slot, constIndex, localRefIndex, sourceSpan) {
21899
+ return elementOrContainerBase(
21900
+ Identifiers.domElementContainer,
21901
+ slot,
21902
+ /* tag */
21903
+ null,
21904
+ constIndex,
21905
+ localRefIndex,
21906
+ sourceSpan
21907
+ );
21908
+ }
21909
+ __name(domElementContainer, "domElementContainer");
21910
+ function domElementContainerEnd() {
21911
+ return call(Identifiers.domElementContainerEnd, [], null);
21912
+ }
21913
+ __name(domElementContainerEnd, "domElementContainerEnd");
21914
+ function domListener(name, handlerFn, eventTargetResolver, sourceSpan) {
21915
+ const args = [literal(name), handlerFn];
21916
+ if (eventTargetResolver !== null) {
21917
+ args.push(importExpr(eventTargetResolver));
21918
+ }
21919
+ return call(Identifiers.domListener, args, sourceSpan);
21920
+ }
21921
+ __name(domListener, "domListener");
21922
+ function domTemplate(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
21923
+ return templateBase(Identifiers.domTemplate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
21924
+ }
21925
+ __name(domTemplate, "domTemplate");
21707
21926
  var PIPE_BINDINGS = [
21708
21927
  Identifiers.pipeBind1,
21709
21928
  Identifiers.pipeBind2,
@@ -21736,13 +21955,34 @@ function i18nApply(slot, sourceSpan) {
21736
21955
  }
21737
21956
  __name(i18nApply, "i18nApply");
21738
21957
  function domProperty(name, expression, sanitizer, sourceSpan) {
21739
- const args = [literal(name), expression];
21958
+ return propertyBase(Identifiers.domProperty, name, expression, sanitizer, sourceSpan);
21959
+ }
21960
+ __name(domProperty, "domProperty");
21961
+ function animation(animationKind, handlerFn, sanitizer, sourceSpan) {
21962
+ const args = [handlerFn];
21740
21963
  if (sanitizer !== null) {
21741
21964
  args.push(sanitizer);
21742
21965
  }
21743
- return call(Identifiers.domProperty, args, sourceSpan);
21966
+ const identifier = animationKind === "enter" ? Identifiers.animationEnter : Identifiers.animationLeave;
21967
+ return call(identifier, args, sourceSpan);
21744
21968
  }
21745
- __name(domProperty, "domProperty");
21969
+ __name(animation, "animation");
21970
+ function animationString(animationKind, expression, sanitizer, sourceSpan) {
21971
+ const value = expression instanceof Interpolation2 ? interpolationToExpression(expression, sourceSpan) : expression;
21972
+ const args = [value];
21973
+ if (sanitizer !== null) {
21974
+ args.push(sanitizer);
21975
+ }
21976
+ const identifier = animationKind === "enter" ? Identifiers.animationEnter : Identifiers.animationLeave;
21977
+ return call(identifier, args, sourceSpan);
21978
+ }
21979
+ __name(animationString, "animationString");
21980
+ function animationListener(animationKind, handlerFn, eventTargetResolver, sourceSpan) {
21981
+ const args = [handlerFn];
21982
+ const identifier = animationKind === "enter" ? Identifiers.animationEnterListener : Identifiers.animationLeaveListener;
21983
+ return call(identifier, args, sourceSpan);
21984
+ }
21985
+ __name(animationListener, "animationListener");
21746
21986
  function syntheticHostProperty(name, expression, sourceSpan) {
21747
21987
  return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
21748
21988
  }
@@ -21864,11 +22104,20 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
21864
22104
  return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
21865
22105
  }
21866
22106
  __name(callVariadicInstruction, "callVariadicInstruction");
22107
+ var ARIA_PREFIX = "aria";
21867
22108
  var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
21868
22109
  ["window", Identifiers.resolveWindow],
21869
22110
  ["document", Identifiers.resolveDocument],
21870
22111
  ["body", Identifiers.resolveBody]
21871
22112
  ]);
22113
+ var DOM_PROPERTY_REMAPPING = /* @__PURE__ */ new Map([
22114
+ ["class", "className"],
22115
+ ["for", "htmlFor"],
22116
+ ["formaction", "formAction"],
22117
+ ["innerHtml", "innerHTML"],
22118
+ ["readonly", "readOnly"],
22119
+ ["tabindex", "tabIndex"]
22120
+ ]);
21872
22121
  function reify(job) {
21873
22122
  for (const unit of job.units) {
21874
22123
  reifyCreateOperations(unit, unit.create);
@@ -21884,22 +22133,22 @@ function reifyCreateOperations(unit, ops) {
21884
22133
  OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
21885
22134
  break;
21886
22135
  case OpKind.ElementStart:
21887
- OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
22136
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan) : elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
21888
22137
  break;
21889
22138
  case OpKind.Element:
21890
- OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
22139
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElement(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan) : element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
21891
22140
  break;
21892
22141
  case OpKind.ElementEnd:
21893
- OpList.replace(op, elementEnd(op.sourceSpan));
22142
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementEnd(op.sourceSpan) : elementEnd(op.sourceSpan));
21894
22143
  break;
21895
22144
  case OpKind.ContainerStart:
21896
- OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
22145
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan) : elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
21897
22146
  break;
21898
22147
  case OpKind.Container:
21899
- OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
22148
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan) : elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
21900
22149
  break;
21901
22150
  case OpKind.ContainerEnd:
21902
- OpList.replace(op, elementContainerEnd());
22151
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerEnd() : elementContainerEnd());
21903
22152
  break;
21904
22153
  case OpKind.I18nStart:
21905
22154
  OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));
@@ -21924,7 +22173,11 @@ function reifyCreateOperations(unit, ops) {
21924
22173
  throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
21925
22174
  }
21926
22175
  const childView = unit.job.views.get(op.xref);
21927
- OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
22176
+ OpList.replace(
22177
+ op,
22178
+ // Block templates can't have directives so we can always generate them as DOM-only.
22179
+ op.templateKind === TemplateKind.Block || unit.job.mode === TemplateCompilationMode.DomOnly ? domTemplate(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan) : template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan)
22180
+ );
21928
22181
  break;
21929
22182
  case OpKind.DisableBindings:
21930
22183
  OpList.replace(op, disableBindings());
@@ -21938,13 +22191,30 @@ function reifyCreateOperations(unit, ops) {
21938
22191
  case OpKind.DeclareLet:
21939
22192
  OpList.replace(op, declareLet(op.handle.slot, op.sourceSpan));
21940
22193
  break;
22194
+ case OpKind.AnimationString:
22195
+ OpList.replace(op, animationString(op.animationKind, op.expression, op.sanitizer, op.sourceSpan));
22196
+ break;
22197
+ case OpKind.Animation:
22198
+ const animationCallbackFn = reifyListenerHandler(
22199
+ unit,
22200
+ op.handlerFnName,
22201
+ op.handlerOps,
22202
+ /* consumesDollarEvent */
22203
+ false
22204
+ );
22205
+ OpList.replace(op, animation(op.animationKind, animationCallbackFn, op.sanitizer, op.sourceSpan));
22206
+ break;
22207
+ case OpKind.AnimationListener:
22208
+ const animationListenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
22209
+ OpList.replace(op, animationListener(op.animationKind, animationListenerFn, null, op.sourceSpan));
22210
+ break;
21941
22211
  case OpKind.Listener:
21942
22212
  const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
21943
22213
  const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
21944
22214
  if (eventTargetResolver === void 0) {
21945
22215
  throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);
21946
22216
  }
21947
- OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
22217
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && !op.hostListener && !op.isLegacyAnimationListener ? domListener(op.name, listenerFn, eventTargetResolver, op.sourceSpan) : listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isLegacyAnimationListener, op.sourceSpan));
21948
22218
  break;
21949
22219
  case OpKind.TwoWayListener:
21950
22220
  OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));
@@ -22096,7 +22366,7 @@ function reifyCreateOperations(unit, ops) {
22096
22366
  }
22097
22367
  }
22098
22368
  __name(reifyCreateOperations, "reifyCreateOperations");
22099
- function reifyUpdateOperations(_unit, ops) {
22369
+ function reifyUpdateOperations(unit, ops) {
22100
22370
  for (const op of ops) {
22101
22371
  transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
22102
22372
  switch (op.kind) {
@@ -22104,7 +22374,7 @@ function reifyUpdateOperations(_unit, ops) {
22104
22374
  OpList.replace(op, advance(op.delta, op.sourceSpan));
22105
22375
  break;
22106
22376
  case OpKind.Property:
22107
- OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));
22377
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && op.bindingKind !== BindingKind.LegacyAnimation && op.bindingKind !== BindingKind.Animation ? reifyDomProperty(op) : reifyProperty(op));
22108
22378
  break;
22109
22379
  case OpKind.TwoWayProperty:
22110
22380
  OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
@@ -22137,10 +22407,10 @@ function reifyUpdateOperations(_unit, ops) {
22137
22407
  if (op.expression instanceof Interpolation2) {
22138
22408
  throw new Error("not yet handled");
22139
22409
  } else {
22140
- if (op.isAnimationTrigger) {
22410
+ if (op.bindingKind === BindingKind.LegacyAnimation || op.bindingKind === BindingKind.Animation) {
22141
22411
  OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
22142
22412
  } else {
22143
- OpList.replace(op, domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
22413
+ OpList.replace(op, reifyDomProperty(op));
22144
22414
  }
22145
22415
  }
22146
22416
  break;
@@ -22172,6 +22442,22 @@ function reifyUpdateOperations(_unit, ops) {
22172
22442
  }
22173
22443
  }
22174
22444
  __name(reifyUpdateOperations, "reifyUpdateOperations");
22445
+ function ariaAttrName(name) {
22446
+ return name.charAt(ARIA_PREFIX.length) !== "-" ? ARIA_PREFIX + "-" + name.slice(ARIA_PREFIX.length).toLowerCase() : name;
22447
+ }
22448
+ __name(ariaAttrName, "ariaAttrName");
22449
+ function isAriaProperty(name) {
22450
+ return name.startsWith(ARIA_PREFIX) && name.length > ARIA_PREFIX.length;
22451
+ }
22452
+ __name(isAriaProperty, "isAriaProperty");
22453
+ function reifyDomProperty(op) {
22454
+ return isAriaProperty(op.name) ? attribute(ariaAttrName(op.name), op.expression, null, null, op.sourceSpan) : domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan);
22455
+ }
22456
+ __name(reifyDomProperty, "reifyDomProperty");
22457
+ function reifyProperty(op) {
22458
+ return isAriaProperty(op.name) ? ariaProperty(op.name, op.expression, op.sourceSpan) : property(op.name, op.expression, op.sanitizer, op.sourceSpan);
22459
+ }
22460
+ __name(reifyProperty, "reifyProperty");
22175
22461
  function reifyIrExpression(expr) {
22176
22462
  if (!isIrExpression(expr)) {
22177
22463
  return expr;
@@ -22363,6 +22649,8 @@ function processLexicalScope$1(view, ops) {
22363
22649
  break;
22364
22650
  }
22365
22651
  break;
22652
+ case OpKind.Animation:
22653
+ case OpKind.AnimationListener:
22366
22654
  case OpKind.Listener:
22367
22655
  case OpKind.TwoWayListener:
22368
22656
  processLexicalScope$1(view, op.handlerOps);
@@ -22424,10 +22712,10 @@ function resolveDollarEvent(job) {
22424
22712
  __name(resolveDollarEvent, "resolveDollarEvent");
22425
22713
  function transformDollarEvent(ops) {
22426
22714
  for (const op of ops) {
22427
- if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
22715
+ if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener || op.kind === OpKind.AnimationListener) {
22428
22716
  transformExpressionsInOp(op, (expr) => {
22429
22717
  if (expr instanceof LexicalReadExpr && expr.name === "$event") {
22430
- if (op.kind === OpKind.Listener) {
22718
+ if (op.kind === OpKind.Listener || op.kind === OpKind.AnimationListener) {
22431
22719
  op.consumesDollarEvent = true;
22432
22720
  }
22433
22721
  return new ReadVarExpr(expr.name);
@@ -22501,6 +22789,20 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
22501
22789
  recordElementClose(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
22502
22790
  pendingStructuralDirective = void 0;
22503
22791
  }
22792
+ if (op.fallbackView !== null) {
22793
+ const view2 = job.views.get(op.fallbackView);
22794
+ if (op.fallbackViewI18nPlaceholder === void 0) {
22795
+ resolvePlaceholdersForView(job, view2, i18nContexts, elements);
22796
+ } else {
22797
+ if (currentOps === null) {
22798
+ throw Error("i18n tag placeholder should only occur inside an i18n block");
22799
+ }
22800
+ recordTemplateStart(job, view2, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
22801
+ resolvePlaceholdersForView(job, view2, i18nContexts, elements);
22802
+ recordTemplateClose(job, view2, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
22803
+ pendingStructuralDirective = void 0;
22804
+ }
22805
+ }
22504
22806
  break;
22505
22807
  case OpKind.ConditionalCreate:
22506
22808
  case OpKind.ConditionalBranchCreate:
@@ -22715,6 +23017,8 @@ function processLexicalScope(unit, ops, savedView) {
22715
23017
  break;
22716
23018
  }
22717
23019
  break;
23020
+ case OpKind.Animation:
23021
+ case OpKind.AnimationListener:
22718
23022
  case OpKind.Listener:
22719
23023
  case OpKind.TwoWayListener:
22720
23024
  processLexicalScope(unit, op.handlerOps, savedView);
@@ -22727,7 +23031,7 @@ function processLexicalScope(unit, ops, savedView) {
22727
23031
  }
22728
23032
  }
22729
23033
  for (const op of ops) {
22730
- if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
23034
+ if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener) {
22731
23035
  continue;
22732
23036
  }
22733
23037
  transformExpressionsInOp(op, (expr) => {
@@ -22838,7 +23142,7 @@ function saveAndRestoreView(job) {
22838
23142
  }, new GetCurrentViewExpr(), VariableFlags.None)
22839
23143
  ]);
22840
23144
  for (const op of unit.create) {
22841
- if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener) {
23145
+ if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener && op.kind !== OpKind.Animation && op.kind !== OpKind.AnimationListener) {
22842
23146
  continue;
22843
23147
  }
22844
23148
  let needsRestoreView = unit !== job.root;
@@ -22951,6 +23255,11 @@ function stripNonrequiredParentheses(job) {
22951
23255
  case BinaryOperator.NullishCoalesce:
22952
23256
  checkNullishCoalescingParens(expr, requiredParens);
22953
23257
  break;
23258
+ // these 2 cases can be dropped if the regression introduced in 5.9.2 is fixed
23259
+ // see https://github.com/microsoft/TypeScript/issues/62307
23260
+ case BinaryOperator.And:
23261
+ case BinaryOperator.Or:
23262
+ checkAndOrParens(expr, requiredParens);
22954
23263
  }
22955
23264
  }
22956
23265
  });
@@ -22983,6 +23292,12 @@ function checkNullishCoalescingParens(expr, requiredParens) {
22983
23292
  }
22984
23293
  }
22985
23294
  __name(checkNullishCoalescingParens, "checkNullishCoalescingParens");
23295
+ function checkAndOrParens(expr, requiredParens) {
23296
+ if (expr.lhs instanceof ParenthesizedExpr && expr.lhs.expr instanceof BinaryOperatorExpr && expr.lhs.expr.operator === BinaryOperator.NullishCoalesce) {
23297
+ requiredParens.add(expr.lhs);
23298
+ }
23299
+ }
23300
+ __name(checkAndOrParens, "checkAndOrParens");
22986
23301
  function isLogicalAndOr(expr) {
22987
23302
  return expr instanceof BinaryOperatorExpr && (expr.operator === BinaryOperator.And || expr.operator === BinaryOperator.Or);
22988
23303
  }
@@ -23060,7 +23375,7 @@ function generateTemporaries(ops) {
23060
23375
  });
23061
23376
  generatedStatements.push(...Array.from(new Set(defs.values())).map((name) => createStatementOp(new DeclareVarStmt(name))));
23062
23377
  opCount++;
23063
- if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
23378
+ if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
23064
23379
  op.handlerOps.prepend(generateTemporaries(op.handlerOps));
23065
23380
  } else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
23066
23381
  op.trackByOps.prepend(generateTemporaries(op.trackByOps));
@@ -23299,7 +23614,7 @@ function optimizeVariables(job) {
23299
23614
  inlineAlwaysInlineVariables(unit.create);
23300
23615
  inlineAlwaysInlineVariables(unit.update);
23301
23616
  for (const op of unit.create) {
23302
- if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
23617
+ if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
23303
23618
  inlineAlwaysInlineVariables(op.handlerOps);
23304
23619
  } else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
23305
23620
  inlineAlwaysInlineVariables(op.trackByOps);
@@ -23308,7 +23623,7 @@ function optimizeVariables(job) {
23308
23623
  optimizeVariablesInOpList(unit.create, job.compatibility);
23309
23624
  optimizeVariablesInOpList(unit.update, job.compatibility);
23310
23625
  for (const op of unit.create) {
23311
- if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
23626
+ if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
23312
23627
  optimizeVariablesInOpList(op.handlerOps, job.compatibility);
23313
23628
  } else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
23314
23629
  optimizeVariablesInOpList(op.trackByOps, job.compatibility);
@@ -23596,6 +23911,7 @@ var phases = [
23596
23911
  { kind: CompilationJobKind.Both, fn: deduplicateTextBindings },
23597
23912
  { kind: CompilationJobKind.Both, fn: specializeStyleBindings },
23598
23913
  { kind: CompilationJobKind.Both, fn: specializeBindings },
23914
+ { kind: CompilationJobKind.Both, fn: convertAnimations },
23599
23915
  { kind: CompilationJobKind.Both, fn: extractAttributes },
23600
23916
  { kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
23601
23917
  { kind: CompilationJobKind.Both, fn: parseExtractedStyles },
@@ -23755,6 +24071,7 @@ __name(emitHostBindingFunction, "emitHostBindingFunction");
23755
24071
  var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
23756
24072
  var domSchema = new DomElementSchemaRegistry();
23757
24073
  var NG_TEMPLATE_TAG_NAME = "ng-template";
24074
+ var ANIMATE_PREFIX$1 = "animate.";
23758
24075
  function isI18nRootNode(meta) {
23759
24076
  return meta instanceof Message;
23760
24077
  }
@@ -23763,20 +24080,23 @@ function isSingleI18nIcu(meta) {
23763
24080
  return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu2;
23764
24081
  }
23765
24082
  __name(isSingleI18nIcu, "isSingleI18nIcu");
23766
- function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
23767
- const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
24083
+ function ingestComponent(componentName, template2, constantPool, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
24084
+ const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
23768
24085
  ingestNodes(job.root, template2);
23769
24086
  return job;
23770
24087
  }
23771
24088
  __name(ingestComponent, "ingestComponent");
23772
24089
  function ingestHostBinding(input, bindingParser, constantPool) {
23773
- const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
24090
+ const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode, TemplateCompilationMode.DomOnly);
23774
24091
  for (const property2 of input.properties ?? []) {
23775
24092
  let bindingKind = BindingKind.Property;
23776
24093
  if (property2.name.startsWith("attr.")) {
23777
24094
  property2.name = property2.name.substring("attr.".length);
23778
24095
  bindingKind = BindingKind.Attribute;
23779
24096
  }
24097
+ if (property2.isLegacyAnimation) {
24098
+ bindingKind = BindingKind.LegacyAnimation;
24099
+ }
23780
24100
  if (property2.isAnimation) {
23781
24101
  bindingKind = BindingKind.Animation;
23782
24102
  }
@@ -23839,8 +24159,13 @@ function ingestHostAttribute(job, name, value, securityContexts) {
23839
24159
  }
23840
24160
  __name(ingestHostAttribute, "ingestHostAttribute");
23841
24161
  function ingestHostEvent(job, event) {
23842
- const [phase, target] = event.type !== ParsedEventType.Animation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
23843
- const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
24162
+ let eventBinding;
24163
+ if (event.type === ParsedEventType.Animation) {
24164
+ eventBinding = createAnimationListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), event.name.endsWith("enter") ? "enter" : "leave", event.targetOrPhase, true, event.sourceSpan);
24165
+ } else {
24166
+ const [phase, target] = event.type !== ParsedEventType.LegacyAnimation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
24167
+ eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
24168
+ }
23844
24169
  job.root.create.push(eventBinding);
23845
24170
  }
23846
24171
  __name(ingestHostEvent, "ingestHostEvent");
@@ -24259,20 +24584,6 @@ function convertAst(ast, job, baseSourceSpan) {
24259
24584
  } else {
24260
24585
  return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));
24261
24586
  }
24262
- } else if (ast instanceof PropertyWrite) {
24263
- if (ast.receiver instanceof ImplicitReceiver) {
24264
- return new WritePropExpr(
24265
- // TODO: Is it correct to always use the root context in place of the implicit receiver?
24266
- new ContextExpr(job.root.xref),
24267
- ast.name,
24268
- convertAst(ast.value, job, baseSourceSpan),
24269
- null,
24270
- convertSourceSpan(ast.span, baseSourceSpan)
24271
- );
24272
- }
24273
- return new WritePropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
24274
- } else if (ast instanceof KeyedWrite) {
24275
- return new WriteKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
24276
24587
  } else if (ast instanceof Call) {
24277
24588
  if (ast.receiver instanceof ImplicitReceiver) {
24278
24589
  throw new Error(`Unexpected ImplicitReceiver`);
@@ -24368,6 +24679,7 @@ var BINDING_KINDS = /* @__PURE__ */ new Map([
24368
24679
  [BindingType.Attribute, BindingKind.Attribute],
24369
24680
  [BindingType.Class, BindingKind.ClassName],
24370
24681
  [BindingType.Style, BindingKind.StyleProperty],
24682
+ [BindingType.LegacyAnimation, BindingKind.LegacyAnimation],
24371
24683
  [BindingType.Animation, BindingKind.Animation]
24372
24684
  ]);
24373
24685
  function isPlainTemplate(tmpl) {
@@ -24403,11 +24715,13 @@ function ingestElementBindings(unit, op, element2) {
24403
24715
  unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
24404
24716
  unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
24405
24717
  for (const output of element2.outputs) {
24406
- if (output.type === ParsedEventType.Animation && output.phase === null) {
24718
+ if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
24407
24719
  throw Error("Animation listener should have a phase");
24408
24720
  }
24409
24721
  if (output.type === ParsedEventType.TwoWay) {
24410
24722
  unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));
24723
+ } else if (output.type === ParsedEventType.Animation) {
24724
+ unit.create.push(createAnimationListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.name.endsWith("enter") ? "enter" : "leave", output.target, false, output.sourceSpan));
24411
24725
  } else {
24412
24726
  unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
24413
24727
  }
@@ -24437,7 +24751,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
24437
24751
  unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
24438
24752
  unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
24439
24753
  for (const output of template2.outputs) {
24440
- if (output.type === ParsedEventType.Animation && output.phase === null) {
24754
+ if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
24441
24755
  throw Error("Animation listener should have a phase");
24442
24756
  }
24443
24757
  if (templateKind === TemplateKind.NgTemplate) {
@@ -24447,7 +24761,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
24447
24761
  unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
24448
24762
  }
24449
24763
  }
24450
- if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.Animation) {
24764
+ if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.LegacyAnimation) {
24451
24765
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
24452
24766
  unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
24453
24767
  }
@@ -24470,7 +24784,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
24470
24784
  return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
24471
24785
  }
24472
24786
  }
24473
- if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.Animation)) {
24787
+ if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.LegacyAnimation || type === BindingType.Animation)) {
24474
24788
  return null;
24475
24789
  }
24476
24790
  }
@@ -24562,11 +24876,13 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
24562
24876
  }
24563
24877
  if (root !== null) {
24564
24878
  for (const attr of root.attributes) {
24565
- const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
24566
- unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
24879
+ if (!attr.name.startsWith(ANIMATE_PREFIX$1)) {
24880
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
24881
+ unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
24882
+ }
24567
24883
  }
24568
24884
  for (const attr of root.inputs) {
24569
- if (attr.type !== BindingType.Animation && attr.type !== BindingType.Attribute) {
24885
+ if (attr.type !== BindingType.LegacyAnimation && attr.type !== BindingType.Animation && attr.type !== BindingType.Attribute) {
24570
24886
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
24571
24887
  unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
24572
24888
  }
@@ -24725,10 +25041,11 @@ var HtmlParser = class extends Parser$1 {
24725
25041
  };
24726
25042
  var PROPERTY_PARTS_SEPARATOR = ".";
24727
25043
  var ATTRIBUTE_PREFIX = "attr";
25044
+ var ANIMATE_PREFIX = "animate";
24728
25045
  var CLASS_PREFIX = "class";
24729
25046
  var STYLE_PREFIX = "style";
24730
25047
  var TEMPLATE_ATTR_PREFIX$1 = "*";
24731
- var ANIMATE_PROP_PREFIX = "animate-";
25048
+ var LEGACY_ANIMATE_PROP_PREFIX = "animate-";
24732
25049
  var BindingParser = class {
24733
25050
  static {
24734
25051
  __name(this, "BindingParser");
@@ -24798,16 +25115,16 @@ var BindingParser = class {
24798
25115
  return targetEvents;
24799
25116
  }
24800
25117
  parseInterpolation(value, sourceSpan, interpolatedTokens) {
24801
- const sourceInfo = sourceSpan.start.toString();
24802
25118
  const absoluteOffset = sourceSpan.fullStart.offset;
24803
25119
  try {
24804
- const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, interpolatedTokens, this._interpolationConfig);
24805
- if (ast)
24806
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
25120
+ const ast = this._exprParser.parseInterpolation(value, sourceSpan, absoluteOffset, interpolatedTokens, this._interpolationConfig);
25121
+ if (ast) {
25122
+ this.errors.push(...ast.errors);
25123
+ }
24807
25124
  return ast;
24808
25125
  } catch (e) {
24809
25126
  this._reportError(`${e}`, sourceSpan);
24810
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
25127
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
24811
25128
  }
24812
25129
  }
24813
25130
  /**
@@ -24816,16 +25133,16 @@ var BindingParser = class {
24816
25133
  * This is used for parsing the switch expression in ICUs.
24817
25134
  */
24818
25135
  parseInterpolationExpression(expression, sourceSpan) {
24819
- const sourceInfo = sourceSpan.start.toString();
24820
25136
  const absoluteOffset = sourceSpan.start.offset;
24821
25137
  try {
24822
- const ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, absoluteOffset);
24823
- if (ast)
24824
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
25138
+ const ast = this._exprParser.parseInterpolationExpression(expression, sourceSpan, absoluteOffset);
25139
+ if (ast) {
25140
+ this.errors.push(...ast.errors);
25141
+ }
24825
25142
  return ast;
24826
25143
  } catch (e) {
24827
25144
  this._reportError(`${e}`, sourceSpan);
24828
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
25145
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
24829
25146
  }
24830
25147
  }
24831
25148
  /**
@@ -24878,10 +25195,9 @@ var BindingParser = class {
24878
25195
  * @param absoluteValueOffset start of the `tplValue`
24879
25196
  */
24880
25197
  _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {
24881
- const sourceInfo = sourceSpan.start.toString();
24882
25198
  try {
24883
- const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);
24884
- this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);
25199
+ const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);
25200
+ bindingsResult.errors.forEach((e) => this.errors.push(e));
24885
25201
  bindingsResult.warnings.forEach((warning) => {
24886
25202
  this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);
24887
25203
  });
@@ -24892,7 +25208,7 @@ var BindingParser = class {
24892
25208
  }
24893
25209
  }
24894
25210
  parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
24895
- if (isAnimationLabel(name)) {
25211
+ if (isLegacyAnimationLabel(name)) {
24896
25212
  name = name.substring(1);
24897
25213
  if (keySpan !== void 0) {
24898
25214
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
@@ -24900,7 +25216,7 @@ var BindingParser = class {
24900
25216
  if (value) {
24901
25217
  this._reportError(`Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.`, sourceSpan, ParseErrorLevel.ERROR);
24902
25218
  }
24903
- this._parseAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
25219
+ this._parseLegacyAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24904
25220
  } else {
24905
25221
  targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, "", absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
24906
25222
  }
@@ -24909,22 +25225,24 @@ var BindingParser = class {
24909
25225
  if (name.length === 0) {
24910
25226
  this._reportError(`Property name is missing in binding`, sourceSpan);
24911
25227
  }
24912
- let isAnimationProp = false;
24913
- if (name.startsWith(ANIMATE_PROP_PREFIX)) {
24914
- isAnimationProp = true;
24915
- name = name.substring(ANIMATE_PROP_PREFIX.length);
25228
+ let isLegacyAnimationProp = false;
25229
+ if (name.startsWith(LEGACY_ANIMATE_PROP_PREFIX)) {
25230
+ isLegacyAnimationProp = true;
25231
+ name = name.substring(LEGACY_ANIMATE_PROP_PREFIX.length);
24916
25232
  if (keySpan !== void 0) {
24917
- keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + ANIMATE_PROP_PREFIX.length, keySpan.end.offset));
25233
+ keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + LEGACY_ANIMATE_PROP_PREFIX.length, keySpan.end.offset));
24918
25234
  }
24919
- } else if (isAnimationLabel(name)) {
24920
- isAnimationProp = true;
25235
+ } else if (isLegacyAnimationLabel(name)) {
25236
+ isLegacyAnimationProp = true;
24921
25237
  name = name.substring(1);
24922
25238
  if (keySpan !== void 0) {
24923
25239
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
24924
25240
  }
24925
25241
  }
24926
- if (isAnimationProp) {
24927
- this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
25242
+ if (isLegacyAnimationProp) {
25243
+ this._parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
25244
+ } else if (name.startsWith(ANIMATE_PREFIX)) {
25245
+ this._parseAnimation(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24928
25246
  } else {
24929
25247
  this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24930
25248
  }
@@ -24941,29 +25259,33 @@ var BindingParser = class {
24941
25259
  targetMatchableAttrs.push([name, ast.source]);
24942
25260
  targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
24943
25261
  }
24944
- _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
25262
+ _parseAnimation(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
25263
+ targetMatchableAttrs.push([name, ast.source]);
25264
+ targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));
25265
+ }
25266
+ _parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
24945
25267
  if (name.length === 0) {
24946
25268
  this._reportError("Animation trigger is missing", sourceSpan);
24947
25269
  }
24948
25270
  const ast = this.parseBinding(expression || "undefined", false, valueSpan || sourceSpan, absoluteOffset);
24949
25271
  targetMatchableAttrs.push([name, ast.source]);
24950
- targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));
25272
+ targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.LEGACY_ANIMATION, sourceSpan, keySpan, valueSpan));
24951
25273
  }
24952
25274
  parseBinding(value, isHostBinding2, sourceSpan, absoluteOffset) {
24953
- const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown)").toString();
24954
25275
  try {
24955
- const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);
24956
- if (ast)
24957
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
25276
+ const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig);
25277
+ if (ast) {
25278
+ this.errors.push(...ast.errors);
25279
+ }
24958
25280
  return ast;
24959
25281
  } catch (e) {
24960
25282
  this._reportError(`${e}`, sourceSpan);
24961
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
25283
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
24962
25284
  }
24963
25285
  }
24964
25286
  createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {
24965
- if (boundProp.isAnimation) {
24966
- return new BoundElementProperty(boundProp.name, BindingType.Animation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
25287
+ if (boundProp.isLegacyAnimation) {
25288
+ return new BoundElementProperty(boundProp.name, BindingType.LegacyAnimation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
24967
25289
  }
24968
25290
  let unit = null;
24969
25291
  let bindingType = void 0;
@@ -24993,6 +25315,10 @@ var BindingParser = class {
24993
25315
  boundPropertyName = parts[1];
24994
25316
  bindingType = BindingType.Style;
24995
25317
  securityContexts = [SecurityContext.STYLE];
25318
+ } else if (parts[0] == ANIMATE_PREFIX) {
25319
+ boundPropertyName = boundProp.name;
25320
+ bindingType = BindingType.Animation;
25321
+ securityContexts = [SecurityContext.NONE];
24996
25322
  }
24997
25323
  }
24998
25324
  if (boundPropertyName === null) {
@@ -25006,17 +25332,16 @@ var BindingParser = class {
25006
25332
  }
25007
25333
  return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
25008
25334
  }
25009
- // TODO: keySpan should be required but was made optional to avoid changing VE parser.
25010
25335
  parseEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
25011
25336
  if (name.length === 0) {
25012
25337
  this._reportError(`Event name is missing in binding`, sourceSpan);
25013
25338
  }
25014
- if (isAnimationLabel(name)) {
25339
+ if (isLegacyAnimationLabel(name)) {
25015
25340
  name = name.slice(1);
25016
25341
  if (keySpan !== void 0) {
25017
25342
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
25018
25343
  }
25019
- this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
25344
+ this._parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
25020
25345
  } else {
25021
25346
  this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
25022
25347
  }
@@ -25029,14 +25354,14 @@ var BindingParser = class {
25029
25354
  const [target, eventName] = splitAtColon(rawName, [null, rawName]);
25030
25355
  return { eventName, target };
25031
25356
  }
25032
- parseAnimationEventName(rawName) {
25357
+ parseLegacyAnimationEventName(rawName) {
25033
25358
  const matches = splitAtPeriod(rawName, [rawName, null]);
25034
25359
  return { eventName: matches[0], phase: matches[1] === null ? null : matches[1].toLowerCase() };
25035
25360
  }
25036
- _parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
25037
- const { eventName, phase } = this.parseAnimationEventName(name);
25361
+ _parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
25362
+ const { eventName, phase } = this.parseLegacyAnimationEventName(name);
25038
25363
  const ast = this._parseAction(expression, handlerSpan);
25039
- targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.Animation, ast, sourceSpan, handlerSpan, keySpan));
25364
+ targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.LegacyAnimation, ast, sourceSpan, handlerSpan, keySpan));
25040
25365
  if (eventName.length === 0) {
25041
25366
  this._reportError(`Animation event name is missing in binding`, sourceSpan);
25042
25367
  }
@@ -25057,33 +25382,34 @@ var BindingParser = class {
25057
25382
  if (isAssignmentEvent && isValid && !this._isAllowedAssignmentEvent(ast)) {
25058
25383
  this._reportError("Unsupported expression in a two-way binding", sourceSpan);
25059
25384
  }
25060
- targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? ParsedEventType.TwoWay : ParsedEventType.Regular, ast, sourceSpan, handlerSpan, keySpan));
25385
+ let eventType = ParsedEventType.Regular;
25386
+ if (isAssignmentEvent) {
25387
+ eventType = ParsedEventType.TwoWay;
25388
+ }
25389
+ if (name.startsWith(ANIMATE_PREFIX)) {
25390
+ eventType = ParsedEventType.Animation;
25391
+ }
25392
+ targetEvents.push(new ParsedEvent(eventName, target, eventType, ast, sourceSpan, handlerSpan, keySpan));
25061
25393
  }
25062
25394
  _parseAction(value, sourceSpan) {
25063
- const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown").toString();
25064
25395
  const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
25065
25396
  try {
25066
- const ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);
25397
+ const ast = this._exprParser.parseAction(value, sourceSpan, absoluteOffset, this._interpolationConfig);
25067
25398
  if (ast) {
25068
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
25399
+ this.errors.push(...ast.errors);
25069
25400
  }
25070
25401
  if (!ast || ast.ast instanceof EmptyExpr$1) {
25071
25402
  this._reportError(`Empty expressions are not allowed`, sourceSpan);
25072
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
25403
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
25073
25404
  }
25074
25405
  return ast;
25075
25406
  } catch (e) {
25076
25407
  this._reportError(`${e}`, sourceSpan);
25077
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
25408
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
25078
25409
  }
25079
25410
  }
25080
- _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR, relatedError) {
25081
- this.errors.push(new ParseError(sourceSpan, message, level, relatedError));
25082
- }
25083
- _reportExpressionParserErrors(errors, sourceSpan) {
25084
- for (const error of errors) {
25085
- this._reportError(error.message, sourceSpan, void 0, error);
25086
- }
25411
+ _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
25412
+ this.errors.push(new ParseError(sourceSpan, message, level));
25087
25413
  }
25088
25414
  /**
25089
25415
  * @param propName the name of the property / attribute
@@ -25111,15 +25437,30 @@ var BindingParser = class {
25111
25437
  return this._isAllowedAssignmentEvent(ast.args[0]);
25112
25438
  }
25113
25439
  if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
25114
- return true;
25440
+ if (!hasRecursiveSafeReceiver(ast)) {
25441
+ return true;
25442
+ }
25115
25443
  }
25116
25444
  return false;
25117
25445
  }
25118
25446
  };
25119
- function isAnimationLabel(name) {
25447
+ function hasRecursiveSafeReceiver(ast) {
25448
+ if (ast instanceof SafePropertyRead || ast instanceof SafeKeyedRead) {
25449
+ return true;
25450
+ }
25451
+ if (ast instanceof ParenthesizedExpression) {
25452
+ return hasRecursiveSafeReceiver(ast.expression);
25453
+ }
25454
+ if (ast instanceof PropertyRead || ast instanceof KeyedRead || ast instanceof Call) {
25455
+ return hasRecursiveSafeReceiver(ast.receiver);
25456
+ }
25457
+ return false;
25458
+ }
25459
+ __name(hasRecursiveSafeReceiver, "hasRecursiveSafeReceiver");
25460
+ function isLegacyAnimationLabel(name) {
25120
25461
  return name[0] == "@";
25121
25462
  }
25122
- __name(isAnimationLabel, "isAnimationLabel");
25463
+ __name(isLegacyAnimationLabel, "isLegacyAnimationLabel");
25123
25464
  function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
25124
25465
  let ctxs;
25125
25466
  const nameToContext = /* @__PURE__ */ __name((elName) => registry.securityContext(elName, propName, isAttribute), "nameToContext");
@@ -25510,8 +25851,8 @@ function parseConditionalBlockParameters(block, errors, bindingParser) {
25510
25851
  const aliasMatch = param.expression.match(CONDITIONAL_ALIAS_PATTERN);
25511
25852
  if (aliasMatch === null) {
25512
25853
  errors.push(new ParseError(param.sourceSpan, `Unrecognized conditional parameter "${param.expression}"`));
25513
- } else if (block.name !== "if") {
25514
- errors.push(new ParseError(param.sourceSpan, '"as" expression is only allowed on the primary @if block'));
25854
+ } else if (block.name !== "if" && !ELSE_IF_PATTERN.test(block.name)) {
25855
+ errors.push(new ParseError(param.sourceSpan, '"as" expression is only allowed on `@if` and `@else if` blocks'));
25515
25856
  } else if (expressionAlias !== null) {
25516
25857
  errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one "as" expression'));
25517
25858
  } else {
@@ -26131,16 +26472,16 @@ var HtmlAstToIvyAst = class {
26131
26472
  if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
26132
26473
  const selector = preparsedElement.selectAttr;
26133
26474
  const attrs = element2.attrs.map((attr) => this.visitAttribute(attr));
26134
- parsedElement = new Content(selector, attrs, children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26475
+ parsedElement = new Content(selector, attrs, children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26135
26476
  this.ngContentSelectors.push(selector);
26136
26477
  } else if (isTemplateElement) {
26137
26478
  const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
26138
26479
  parsedElement = new Template(element2.name, attributes, attrs.bound, boundEvents, directives, [
26139
26480
  /* no template attributes */
26140
- ], children, references, variables, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26481
+ ], children, references, variables, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26141
26482
  } else {
26142
26483
  const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
26143
- parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26484
+ parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
26144
26485
  }
26145
26486
  if (elementHasInlineTemplate) {
26146
26487
  parsedElement = this.wrapInTemplate(parsedElement, templateParsedProperties, templateVariables, i18nAttrsMeta, isTemplateElement, isI18nRootElement);
@@ -26216,7 +26557,7 @@ var HtmlAstToIvyAst = class {
26216
26557
  children = visitAll(this, component.children, component.children);
26217
26558
  }
26218
26559
  const attrs = this.categorizePropertyAttributes(component.tagName, parsedProperties, i18nAttrsMeta);
26219
- let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
26560
+ let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.isSelfClosing, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
26220
26561
  if (elementHasInlineTemplate) {
26221
26562
  node = this.wrapInTemplate(node, templateParsedProperties, templateVariables, i18nAttrsMeta, false, isI18nRootElement);
26222
26563
  }
@@ -26343,11 +26684,11 @@ var HtmlAstToIvyAst = class {
26343
26684
  const templateValue = attribute2.value;
26344
26685
  const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);
26345
26686
  const parsedVariables = [];
26346
- const absoluteValueOffset = attribute2.valueSpan ? attribute2.valueSpan.start.offset : (
26687
+ const absoluteValueOffset = attribute2.valueSpan ? attribute2.valueSpan.fullStart.offset : (
26347
26688
  // If there is no value span the attribute does not have a value, like `attr` in
26348
26689
  //`<div attr></div>`. In this case, point to one character beyond the last character of
26349
26690
  // the attribute name.
26350
- attribute2.sourceSpan.start.offset + attribute2.name.length
26691
+ attribute2.sourceSpan.fullStart.offset + attribute2.name.length
26351
26692
  );
26352
26693
  this.bindingParser.parseInlineTemplateBinding(
26353
26694
  templateKey,
@@ -26384,7 +26725,7 @@ var HtmlAstToIvyAst = class {
26384
26725
  const name = normalizeAttributeName(attribute2.name);
26385
26726
  const value = attribute2.value;
26386
26727
  const srcSpan = attribute2.sourceSpan;
26387
- const absoluteOffset = attribute2.valueSpan ? attribute2.valueSpan.start.offset : srcSpan.start.offset;
26728
+ const absoluteOffset = attribute2.valueSpan ? attribute2.valueSpan.fullStart.offset : srcSpan.fullStart.offset;
26388
26729
  function createKeySpan(srcSpan2, prefix, identifier) {
26389
26730
  const normalizationAdjustment = attribute2.name.length - name.length;
26390
26731
  const keySpanStart = srcSpan2.start.moveBy(prefix.length + normalizationAdjustment);
@@ -26430,7 +26771,7 @@ var HtmlAstToIvyAst = class {
26430
26771
  const identifier = bindParts[IDENT_KW_IDX];
26431
26772
  const keySpan2 = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);
26432
26773
  this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
26433
- this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
26774
+ this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2, absoluteOffset);
26434
26775
  } else if (bindParts[KW_AT_IDX]) {
26435
26776
  const keySpan2 = createKeySpan(srcSpan, "", name);
26436
26777
  this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
@@ -26454,7 +26795,7 @@ var HtmlAstToIvyAst = class {
26454
26795
  const keySpan2 = createKeySpan(srcSpan, delims.start, identifier);
26455
26796
  if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {
26456
26797
  this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
26457
- this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
26798
+ this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2, absoluteOffset);
26458
26799
  } else if (delims.start === BINDING_DELIMS.PROPERTY.start) {
26459
26800
  this.bindingParser.parsePropertyBinding(identifier, value, false, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
26460
26801
  } else {
@@ -26545,7 +26886,7 @@ var HtmlAstToIvyAst = class {
26545
26886
  // Do not copy over the directives.
26546
26887
  ], templateAttrs, [node], [
26547
26888
  // Do not copy over the references.
26548
- ], templateVariables, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
26889
+ ], templateVariables, false, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
26549
26890
  }
26550
26891
  _visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n2) {
26551
26892
  const valueNoNgsp = replaceNgsp(value);
@@ -26570,7 +26911,7 @@ var HtmlAstToIvyAst = class {
26570
26911
  }
26571
26912
  references.push(new Reference(identifier, value, sourceSpan, keySpan, valueSpan));
26572
26913
  }
26573
- parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {
26914
+ parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan, absoluteOffset) {
26574
26915
  const events = [];
26575
26916
  this.bindingParser.parseEvent(
26576
26917
  `${name}Change`,
@@ -26626,9 +26967,11 @@ var NonBindableVisitor = class {
26626
26967
  children,
26627
26968
  /* references */
26628
26969
  [],
26970
+ ast.isSelfClosing,
26629
26971
  ast.sourceSpan,
26630
26972
  ast.startSourceSpan,
26631
- ast.endSourceSpan
26973
+ ast.endSourceSpan,
26974
+ ast.isVoid
26632
26975
  );
26633
26976
  }
26634
26977
  visitComment(comment) {
@@ -26678,9 +27021,11 @@ var NonBindableVisitor = class {
26678
27021
  children,
26679
27022
  /* references */
26680
27023
  [],
27024
+ ast.isSelfClosing,
26681
27025
  ast.sourceSpan,
26682
27026
  ast.startSourceSpan,
26683
- ast.endSourceSpan
27027
+ ast.endSourceSpan,
27028
+ false
26684
27029
  );
26685
27030
  }
26686
27031
  visitDirective(directive, context) {
@@ -26707,7 +27052,8 @@ __name(textContents, "textContents");
26707
27052
  var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
26708
27053
  function parseTemplate(template2, templateUrl, options = {}) {
26709
27054
  const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
26710
- const bindingParser = makeBindingParser(interpolationConfig);
27055
+ const selectorlessEnabled = options.enableSelectorless ?? false;
27056
+ const bindingParser = makeBindingParser(interpolationConfig, selectorlessEnabled);
26711
27057
  const htmlParser = new HtmlParser();
26712
27058
  const parseResult = htmlParser.parse(template2, templateUrl, {
26713
27059
  leadingTriviaChars: LEADING_TRIVIA_CHARS,
@@ -26715,7 +27061,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
26715
27061
  tokenizeExpansionForms: true,
26716
27062
  tokenizeBlocks: options.enableBlockSyntax ?? true,
26717
27063
  tokenizeLet: options.enableLetSyntax ?? true,
26718
- selectorlessEnabled: options.enableSelectorless ?? false
27064
+ selectorlessEnabled
26719
27065
  });
26720
27066
  if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
26721
27067
  const parsedTemplate2 = {
@@ -26803,13 +27149,166 @@ function parseTemplate(template2, templateUrl, options = {}) {
26803
27149
  }
26804
27150
  __name(parseTemplate, "parseTemplate");
26805
27151
  var elementRegistry = new DomElementSchemaRegistry();
26806
- function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
26807
- return new BindingParser(new Parser2(new Lexer()), interpolationConfig, elementRegistry, []);
27152
+ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, selectorlessEnabled = false) {
27153
+ return new BindingParser(new Parser2(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
26808
27154
  }
26809
27155
  __name(makeBindingParser, "makeBindingParser");
27156
+ var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
27157
+ static {
27158
+ __name(this, "CombinedRecursiveAstVisitor");
27159
+ }
27160
+ visit(node) {
27161
+ if (node instanceof ASTWithSource) {
27162
+ this.visit(node.ast);
27163
+ } else {
27164
+ node.visit(this);
27165
+ }
27166
+ }
27167
+ visitElement(element2) {
27168
+ this.visitAllTemplateNodes(element2.attributes);
27169
+ this.visitAllTemplateNodes(element2.inputs);
27170
+ this.visitAllTemplateNodes(element2.outputs);
27171
+ this.visitAllTemplateNodes(element2.directives);
27172
+ this.visitAllTemplateNodes(element2.references);
27173
+ this.visitAllTemplateNodes(element2.children);
27174
+ }
27175
+ visitTemplate(template2) {
27176
+ this.visitAllTemplateNodes(template2.attributes);
27177
+ this.visitAllTemplateNodes(template2.inputs);
27178
+ this.visitAllTemplateNodes(template2.outputs);
27179
+ this.visitAllTemplateNodes(template2.directives);
27180
+ this.visitAllTemplateNodes(template2.templateAttrs);
27181
+ this.visitAllTemplateNodes(template2.variables);
27182
+ this.visitAllTemplateNodes(template2.references);
27183
+ this.visitAllTemplateNodes(template2.children);
27184
+ }
27185
+ visitContent(content) {
27186
+ this.visitAllTemplateNodes(content.children);
27187
+ }
27188
+ visitBoundAttribute(attribute2) {
27189
+ this.visit(attribute2.value);
27190
+ }
27191
+ visitBoundEvent(attribute2) {
27192
+ this.visit(attribute2.handler);
27193
+ }
27194
+ visitBoundText(text2) {
27195
+ this.visit(text2.value);
27196
+ }
27197
+ visitIcu(icu) {
27198
+ Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
27199
+ Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
27200
+ }
27201
+ visitDeferredBlock(deferred) {
27202
+ deferred.visitAll(this);
27203
+ }
27204
+ visitDeferredTrigger(trigger) {
27205
+ if (trigger instanceof BoundDeferredTrigger) {
27206
+ this.visit(trigger.value);
27207
+ }
27208
+ }
27209
+ visitDeferredBlockPlaceholder(block) {
27210
+ this.visitAllTemplateNodes(block.children);
27211
+ }
27212
+ visitDeferredBlockError(block) {
27213
+ this.visitAllTemplateNodes(block.children);
27214
+ }
27215
+ visitDeferredBlockLoading(block) {
27216
+ this.visitAllTemplateNodes(block.children);
27217
+ }
27218
+ visitSwitchBlock(block) {
27219
+ this.visit(block.expression);
27220
+ this.visitAllTemplateNodes(block.cases);
27221
+ }
27222
+ visitSwitchBlockCase(block) {
27223
+ block.expression && this.visit(block.expression);
27224
+ this.visitAllTemplateNodes(block.children);
27225
+ }
27226
+ visitForLoopBlock(block) {
27227
+ block.item.visit(this);
27228
+ this.visitAllTemplateNodes(block.contextVariables);
27229
+ this.visit(block.expression);
27230
+ this.visitAllTemplateNodes(block.children);
27231
+ block.empty?.visit(this);
27232
+ }
27233
+ visitForLoopBlockEmpty(block) {
27234
+ this.visitAllTemplateNodes(block.children);
27235
+ }
27236
+ visitIfBlock(block) {
27237
+ this.visitAllTemplateNodes(block.branches);
27238
+ }
27239
+ visitIfBlockBranch(block) {
27240
+ block.expression && this.visit(block.expression);
27241
+ block.expressionAlias?.visit(this);
27242
+ this.visitAllTemplateNodes(block.children);
27243
+ }
27244
+ visitLetDeclaration(decl) {
27245
+ this.visit(decl.value);
27246
+ }
27247
+ visitComponent(component) {
27248
+ this.visitAllTemplateNodes(component.attributes);
27249
+ this.visitAllTemplateNodes(component.inputs);
27250
+ this.visitAllTemplateNodes(component.outputs);
27251
+ this.visitAllTemplateNodes(component.directives);
27252
+ this.visitAllTemplateNodes(component.references);
27253
+ this.visitAllTemplateNodes(component.children);
27254
+ }
27255
+ visitDirective(directive) {
27256
+ this.visitAllTemplateNodes(directive.attributes);
27257
+ this.visitAllTemplateNodes(directive.inputs);
27258
+ this.visitAllTemplateNodes(directive.outputs);
27259
+ this.visitAllTemplateNodes(directive.references);
27260
+ }
27261
+ visitVariable(variable2) {
27262
+ }
27263
+ visitReference(reference2) {
27264
+ }
27265
+ visitTextAttribute(attribute2) {
27266
+ }
27267
+ visitText(text2) {
27268
+ }
27269
+ visitUnknownBlock(block) {
27270
+ }
27271
+ visitAllTemplateNodes(nodes) {
27272
+ for (const node of nodes) {
27273
+ this.visit(node);
27274
+ }
27275
+ }
27276
+ };
27277
+ var ANIMATE_LEAVE$1 = `animate.leave`;
27278
+ function analyzeTemplateForAnimations(template2) {
27279
+ const analyzer = new AnimationsAnalyzer();
27280
+ visitAll$1(analyzer, template2);
27281
+ return analyzer.hasAnimations;
27282
+ }
27283
+ __name(analyzeTemplateForAnimations, "analyzeTemplateForAnimations");
27284
+ var AnimationsAnalyzer = class extends CombinedRecursiveAstVisitor {
27285
+ static {
27286
+ __name(this, "AnimationsAnalyzer");
27287
+ }
27288
+ hasAnimations = false;
27289
+ visitElement(element2) {
27290
+ for (const attr of element2.attributes) {
27291
+ if (attr.name === ANIMATE_LEAVE$1) {
27292
+ this.hasAnimations = true;
27293
+ }
27294
+ }
27295
+ for (const input of element2.inputs) {
27296
+ if (input.name === ANIMATE_LEAVE$1) {
27297
+ this.hasAnimations = true;
27298
+ }
27299
+ }
27300
+ for (const output of element2.outputs) {
27301
+ if (output.name === ANIMATE_LEAVE$1) {
27302
+ this.hasAnimations = true;
27303
+ }
27304
+ }
27305
+ super.visitElement(element2);
27306
+ }
27307
+ };
26810
27308
  var COMPONENT_VARIABLE = "%COMP%";
26811
27309
  var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
26812
27310
  var CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
27311
+ var ANIMATE_LEAVE = `animate.leave`;
26813
27312
  function baseDirectiveFields(meta, constantPool, bindingParser) {
26814
27313
  const definitionMap = new DefinitionMap();
26815
27314
  const selectors = parseSelectorToR3Selector(meta.selector);
@@ -26838,6 +27337,10 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
26838
27337
  return definitionMap;
26839
27338
  }
26840
27339
  __name(baseDirectiveFields, "baseDirectiveFields");
27340
+ function hasAnimationHostBinding(meta) {
27341
+ return meta.host.attributes[ANIMATE_LEAVE] !== void 0 || meta.host.properties[ANIMATE_LEAVE] !== void 0 || meta.host.listeners[ANIMATE_LEAVE] !== void 0;
27342
+ }
27343
+ __name(hasAnimationHostBinding, "hasAnimationHostBinding");
26841
27344
  function addFeatures(definitionMap, meta) {
26842
27345
  const features = [];
26843
27346
  const providers = meta.providers;
@@ -26865,6 +27368,12 @@ function addFeatures(definitionMap, meta) {
26865
27368
  const externalStyleNodes = meta.externalStyles.map((externalStyle) => literal(externalStyle));
26866
27369
  features.push(importExpr(Identifiers.ExternalStylesFeature).callFn([literalArr(externalStyleNodes)]));
26867
27370
  }
27371
+ const template2 = meta.template;
27372
+ if (hasAnimationHostBinding(meta) || template2 && template2.nodes.length > 0) {
27373
+ if (hasAnimationHostBinding(meta) || analyzeTemplateForAnimations(template2.nodes)) {
27374
+ features.push(importExpr(Identifiers.AnimationsFeature).callFn([]));
27375
+ }
27376
+ }
26868
27377
  if (features.length) {
26869
27378
  definitionMap.set("features", literalArr(features));
26870
27379
  }
@@ -26900,7 +27409,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
26900
27409
  constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, void 0, StmtModifier.Final));
26901
27410
  allDeferrableDepsFn = variable(fnName);
26902
27411
  }
26903
- const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, getTemplateSourceLocationsEnabled());
27412
+ const compilationMode = meta.isStandalone && !meta.hasDirectiveDependencies ? TemplateCompilationMode.DomOnly : TemplateCompilationMode.Full;
27413
+ const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, compilationMode, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, getTemplateSourceLocationsEnabled());
26904
27414
  transform(tpl, CompilationJobKind.Tmpl);
26905
27415
  const templateFn = emitTemplateFn(tpl, constantPool);
26906
27416
  if (tpl.contentSelectors !== null) {
@@ -27309,13 +27819,12 @@ var R3TargetBinder = class {
27309
27819
  if (target.template) {
27310
27820
  const scope = Scope2.apply(target.template);
27311
27821
  extractScopedNodeEntities(scope, scopedNodeEntities);
27312
- if (this.directiveMatcher !== null) {
27313
- DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
27314
- }
27822
+ DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
27315
27823
  TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
27316
27824
  }
27317
27825
  if (target.host) {
27318
- TemplateBinder.applyWithScope(target.host, Scope2.apply(target.host), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
27826
+ directives.set(target.host.node, target.host.directives);
27827
+ TemplateBinder.applyWithScope(target.host.node, Scope2.apply(target.host.node), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
27319
27828
  }
27320
27829
  return new R3BoundTarget(target, directives, eagerDirectives, missingDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
27321
27830
  }
@@ -27615,6 +28124,12 @@ var DirectiveBinder = class _DirectiveBinder {
27615
28124
  const cssSelector = createCssSelectorFromNode(node);
27616
28125
  this.directiveMatcher.match(cssSelector, (_, results) => directives.push(...results));
27617
28126
  this.trackSelectorBasedBindingsAndDirectives(node, directives);
28127
+ } else {
28128
+ node.references.forEach((ref) => {
28129
+ if (ref.value.trim() === "") {
28130
+ this.references.set(ref, node);
28131
+ }
28132
+ });
27618
28133
  }
27619
28134
  node.directives.forEach((directive) => directive.visit(this));
27620
28135
  node.children.forEach((child) => child.visit(this));
@@ -27700,7 +28215,7 @@ var DirectiveBinder = class _DirectiveBinder {
27700
28215
  visitLetDeclaration(decl) {
27701
28216
  }
27702
28217
  };
27703
- var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
28218
+ var TemplateBinder = class _TemplateBinder extends CombinedRecursiveAstVisitor {
27704
28219
  static {
27705
28220
  __name(this, "TemplateBinder");
27706
28221
  }
@@ -27713,7 +28228,7 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27713
28228
  scope;
27714
28229
  rootNode;
27715
28230
  level;
27716
- visitNode;
28231
+ visitNode = /* @__PURE__ */ __name((node) => node.visit(this), "visitNode");
27717
28232
  constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, rootNode, level) {
27718
28233
  super();
27719
28234
  this.bindings = bindings;
@@ -27725,17 +28240,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27725
28240
  this.scope = scope;
27726
28241
  this.rootNode = rootNode;
27727
28242
  this.level = level;
27728
- this.visitNode = (node) => node.visit(this);
27729
- }
27730
- // This method is defined to reconcile the type of TemplateBinder since both
27731
- // RecursiveAstVisitor and Visitor define the visit() method in their
27732
- // interfaces.
27733
- visit(node, context) {
27734
- if (node instanceof AST) {
27735
- node.visit(this, context);
27736
- } else {
27737
- node.visit(this);
27738
- }
27739
28243
  }
27740
28244
  /**
27741
28245
  * Process a template and extract metadata about expressions and symbols within.
@@ -27787,13 +28291,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27787
28291
  nodeOrNodes.forEach(this.visitNode);
27788
28292
  }
27789
28293
  }
27790
- visitElement(element2) {
27791
- element2.inputs.forEach(this.visitNode);
27792
- element2.outputs.forEach(this.visitNode);
27793
- element2.directives.forEach(this.visitNode);
27794
- element2.children.forEach(this.visitNode);
27795
- element2.references.forEach(this.visitNode);
27796
- }
27797
28294
  visitTemplate(template2) {
27798
28295
  template2.inputs.forEach(this.visitNode);
27799
28296
  template2.outputs.forEach(this.visitNode);
@@ -27812,38 +28309,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27812
28309
  this.symbols.set(reference2, this.rootNode);
27813
28310
  }
27814
28311
  }
27815
- visitComponent(component) {
27816
- component.inputs.forEach(this.visitNode);
27817
- component.outputs.forEach(this.visitNode);
27818
- component.directives.forEach(this.visitNode);
27819
- component.children.forEach(this.visitNode);
27820
- component.references.forEach(this.visitNode);
27821
- }
27822
- visitDirective(directive) {
27823
- directive.inputs.forEach(this.visitNode);
27824
- directive.outputs.forEach(this.visitNode);
27825
- directive.references.forEach(this.visitNode);
27826
- }
27827
- // Unused template visitors
27828
- visitText(text2) {
27829
- }
27830
- visitTextAttribute(attribute2) {
27831
- }
27832
- visitUnknownBlock(block) {
27833
- }
27834
- visitDeferredTrigger() {
27835
- }
27836
- visitIcu(icu) {
27837
- Object.keys(icu.vars).forEach((key) => icu.vars[key].visit(this));
27838
- Object.keys(icu.placeholders).forEach((key) => icu.placeholders[key].visit(this));
27839
- }
27840
- // The remaining visitors are concerned with processing AST expressions within template bindings
27841
- visitBoundAttribute(attribute2) {
27842
- attribute2.value.visit(this);
27843
- }
27844
- visitBoundEvent(event) {
27845
- event.handler.visit(this);
27846
- }
27847
28312
  visitDeferredBlock(deferred) {
27848
28313
  this.ingestScopedNode(deferred);
27849
28314
  deferred.triggers.when?.value.visit(this);
@@ -27863,10 +28328,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27863
28328
  visitDeferredBlockLoading(block) {
27864
28329
  this.ingestScopedNode(block);
27865
28330
  }
27866
- visitSwitchBlock(block) {
27867
- block.expression.visit(this);
27868
- block.cases.forEach(this.visitNode);
27869
- }
27870
28331
  visitSwitchBlockCase(block) {
27871
28332
  block.expression?.visit(this);
27872
28333
  this.ingestScopedNode(block);
@@ -27879,9 +28340,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27879
28340
  visitForLoopBlockEmpty(block) {
27880
28341
  this.ingestScopedNode(block);
27881
28342
  }
27882
- visitIfBlock(block) {
27883
- block.branches.forEach((node) => node.visit(this));
27884
- }
27885
28343
  visitIfBlockBranch(block) {
27886
28344
  block.expression?.visit(this);
27887
28345
  this.ingestScopedNode(block);
@@ -27889,11 +28347,8 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27889
28347
  visitContent(content) {
27890
28348
  this.ingestScopedNode(content);
27891
28349
  }
27892
- visitBoundText(text2) {
27893
- text2.value.visit(this);
27894
- }
27895
28350
  visitLetDeclaration(decl) {
27896
- decl.value.visit(this);
28351
+ super.visitLetDeclaration(decl);
27897
28352
  if (this.rootNode !== null) {
27898
28353
  this.symbols.set(decl, this.rootNode);
27899
28354
  }
@@ -27915,10 +28370,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27915
28370
  this.maybeMap(ast, ast.name);
27916
28371
  return super.visitSafePropertyRead(ast, context);
27917
28372
  }
27918
- visitPropertyWrite(ast, context) {
27919
- this.maybeMap(ast, ast.name);
27920
- return super.visitPropertyWrite(ast, context);
27921
- }
27922
28373
  ingestScopedNode(node) {
27923
28374
  const childScope = this.scope.getChildScope(node);
27924
28375
  const binder = new _TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, node, this.level + 1);
@@ -28085,7 +28536,7 @@ var R3BoundTarget = class {
28085
28536
  if (target instanceof Element$1) {
28086
28537
  return target;
28087
28538
  }
28088
- if (target instanceof Template || target.node instanceof Component$1 || target.node instanceof Directive$1) {
28539
+ if (target instanceof Template || target.node instanceof Component$1 || target.node instanceof Directive$1 || target.node instanceof HostElement) {
28089
28540
  return null;
28090
28541
  }
28091
28542
  return this.referenceTargetToElement(target.node);
@@ -28504,6 +28955,7 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
28504
28955
  decl.directives && declarations.push(...decl.directives.map((dir) => convertDirectiveDeclarationToMetadata(dir)));
28505
28956
  decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
28506
28957
  }
28958
+ const hasDirectiveDependencies = declarations.some(({ kind }) => kind === R3TemplateDependencyKind.Directive || kind === R3TemplateDependencyKind.NgModule);
28507
28959
  return {
28508
28960
  ...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),
28509
28961
  template: template2,
@@ -28518,7 +28970,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
28518
28970
  declarationListEmitMode: 2,
28519
28971
  relativeContextFilePath: "",
28520
28972
  i18nUseExternalIds: true,
28521
- relativeTemplatePath: null
28973
+ relativeTemplatePath: null,
28974
+ hasDirectiveDependencies
28522
28975
  };
28523
28976
  }
28524
28977
  __name(convertDeclareComponentFacadeToMetadata, "convertDeclareComponentFacadeToMetadata");
@@ -28881,7 +29334,7 @@ var _Visitor3 = class {
28881
29334
  merge(nodes, translations, interpolationConfig) {
28882
29335
  this._init(_VisitorMode.Merge, interpolationConfig);
28883
29336
  this._translations = translations;
28884
- const wrapper = new Element2("wrapper", [], [], nodes, void 0, void 0, void 0);
29337
+ const wrapper = new Element2("wrapper", [], [], nodes, false, void 0, void 0, void 0, false);
28885
29338
  const translatedNode = wrapper.visit(this, null);
28886
29339
  if (this._inI18nBlock) {
28887
29340
  this._reportError(nodes[nodes.length - 1], "Unclosed block");
@@ -29048,9 +29501,9 @@ var _Visitor3 = class {
29048
29501
  this._inImplicitNode = wasInImplicitNode;
29049
29502
  if (this._mode === _VisitorMode.Merge) {
29050
29503
  if (node instanceof Element2) {
29051
- return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29504
+ return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.isVoid);
29052
29505
  } else {
29053
- return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29506
+ return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29054
29507
  }
29055
29508
  }
29056
29509
  return null;
@@ -29250,7 +29703,7 @@ var _Visitor3 = class {
29250
29703
  this._msgCountAtSectionStart = void 0;
29251
29704
  }
29252
29705
  _reportError(node, msg) {
29253
- this._errors.push(new I18nError(node.sourceSpan, msg));
29706
+ this._errors.push(new ParseError(node.sourceSpan, msg));
29254
29707
  }
29255
29708
  };
29256
29709
  function _isOpeningComment(n) {
@@ -29552,7 +30005,7 @@ var XliffParser = class {
29552
30005
  visitDirective(directive, context) {
29553
30006
  }
29554
30007
  _addError(node, message) {
29555
- this._errors.push(new I18nError(node.sourceSpan, message));
30008
+ this._errors.push(new ParseError(node.sourceSpan, message));
29556
30009
  }
29557
30010
  };
29558
30011
  var XmlToI18n$2 = class XmlToI18n {
@@ -29618,7 +30071,7 @@ var XmlToI18n$2 = class XmlToI18n {
29618
30071
  this._addError(directive, "Unexpected node");
29619
30072
  }
29620
30073
  _addError(node, message) {
29621
- this._errors.push(new I18nError(node.sourceSpan, message));
30074
+ this._errors.push(new ParseError(node.sourceSpan, message));
29622
30075
  }
29623
30076
  };
29624
30077
  function getCtypeForTag(tag) {
@@ -29886,7 +30339,7 @@ var Xliff2Parser = class {
29886
30339
  visitDirective(directive, context) {
29887
30340
  }
29888
30341
  _addError(node, message) {
29889
- this._errors.push(new I18nError(node.sourceSpan, message));
30342
+ this._errors.push(new ParseError(node.sourceSpan, message));
29890
30343
  }
29891
30344
  };
29892
30345
  var XmlToI18n$1 = class XmlToI18n2 {
@@ -29967,7 +30420,7 @@ var XmlToI18n$1 = class XmlToI18n2 {
29967
30420
  this._addError(directive, "Unexpected node");
29968
30421
  }
29969
30422
  _addError(node, message) {
29970
- this._errors.push(new I18nError(node.sourceSpan, message));
30423
+ this._errors.push(new ParseError(node.sourceSpan, message));
29971
30424
  }
29972
30425
  };
29973
30426
  function getTypeForTag(tag) {
@@ -30119,7 +30572,7 @@ var XtbParser = class {
30119
30572
  this._addError(directive, "Unexpected node");
30120
30573
  }
30121
30574
  _addError(node, message) {
30122
- this._errors.push(new I18nError(node.sourceSpan, message));
30575
+ this._errors.push(new ParseError(node.sourceSpan, message));
30123
30576
  }
30124
30577
  };
30125
30578
  var XmlToI18n3 = class {
@@ -30182,7 +30635,7 @@ var XmlToI18n3 = class {
30182
30635
  this._addError(directive, "Unexpected node");
30183
30636
  }
30184
30637
  _addError(node, message) {
30185
- this._errors.push(new I18nError(node.sourceSpan, message));
30638
+ this._errors.push(new ParseError(node.sourceSpan, message));
30186
30639
  }
30187
30640
  };
30188
30641
  var TranslationBundle = class _TranslationBundle {
@@ -30330,7 +30783,7 @@ var I18nToHtmlVisitor = class {
30330
30783
  return text2;
30331
30784
  }
30332
30785
  _addError(el, msg) {
30333
- this._errors.push(new I18nError(el.sourceSpan, msg));
30786
+ this._errors.push(new ParseError(el.sourceSpan, msg));
30334
30787
  }
30335
30788
  };
30336
30789
  var I18NHtmlParser = class {
@@ -30523,7 +30976,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
30523
30976
  function compileDeclareClassMetadata(metadata) {
30524
30977
  const definitionMap = new DefinitionMap();
30525
30978
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
30526
- definitionMap.set("version", literal("20.0.6"));
30979
+ definitionMap.set("version", literal("20.2.1"));
30527
30980
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30528
30981
  definitionMap.set("type", metadata.type);
30529
30982
  definitionMap.set("decorators", metadata.decorators);
@@ -30542,7 +30995,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
30542
30995
  callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
30543
30996
  callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
30544
30997
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
30545
- definitionMap.set("version", literal("20.0.6"));
30998
+ definitionMap.set("version", literal("20.2.1"));
30546
30999
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30547
31000
  definitionMap.set("type", metadata.type);
30548
31001
  definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
@@ -30611,7 +31064,7 @@ function createDirectiveDefinitionMap(meta) {
30611
31064
  const definitionMap = new DefinitionMap();
30612
31065
  const minVersion = getMinimumVersionForPartialOutput(meta);
30613
31066
  definitionMap.set("minVersion", literal(minVersion));
30614
- definitionMap.set("version", literal("20.0.6"));
31067
+ definitionMap.set("version", literal("20.2.1"));
30615
31068
  definitionMap.set("type", meta.type.value);
30616
31069
  if (meta.isStandalone !== void 0) {
30617
31070
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -30938,7 +31391,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
30938
31391
  function compileDeclareFactoryFunction(meta) {
30939
31392
  const definitionMap = new DefinitionMap();
30940
31393
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
30941
- definitionMap.set("version", literal("20.0.6"));
31394
+ definitionMap.set("version", literal("20.2.1"));
30942
31395
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30943
31396
  definitionMap.set("type", meta.type.value);
30944
31397
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -30961,7 +31414,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
30961
31414
  function createInjectableDefinitionMap(meta) {
30962
31415
  const definitionMap = new DefinitionMap();
30963
31416
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
30964
- definitionMap.set("version", literal("20.0.6"));
31417
+ definitionMap.set("version", literal("20.2.1"));
30965
31418
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30966
31419
  definitionMap.set("type", meta.type.value);
30967
31420
  if (meta.providedIn !== void 0) {
@@ -30999,7 +31452,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
30999
31452
  function createInjectorDefinitionMap(meta) {
31000
31453
  const definitionMap = new DefinitionMap();
31001
31454
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
31002
- definitionMap.set("version", literal("20.0.6"));
31455
+ definitionMap.set("version", literal("20.2.1"));
31003
31456
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31004
31457
  definitionMap.set("type", meta.type.value);
31005
31458
  definitionMap.set("providers", meta.providers);
@@ -31023,7 +31476,7 @@ function createNgModuleDefinitionMap(meta) {
31023
31476
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
31024
31477
  }
31025
31478
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
31026
- definitionMap.set("version", literal("20.0.6"));
31479
+ definitionMap.set("version", literal("20.2.1"));
31027
31480
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31028
31481
  definitionMap.set("type", meta.type.value);
31029
31482
  if (meta.bootstrap.length > 0) {
@@ -31058,13 +31511,13 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
31058
31511
  function createPipeDefinitionMap(meta) {
31059
31512
  const definitionMap = new DefinitionMap();
31060
31513
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
31061
- definitionMap.set("version", literal("20.0.6"));
31514
+ definitionMap.set("version", literal("20.2.1"));
31062
31515
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31063
31516
  definitionMap.set("type", meta.type.value);
31064
31517
  if (meta.isStandalone !== void 0) {
31065
31518
  definitionMap.set("isStandalone", literal(meta.isStandalone));
31066
31519
  }
31067
- definitionMap.set("name", literal(meta.pipeName));
31520
+ definitionMap.set("name", literal(meta.pipeName ?? meta.name));
31068
31521
  if (meta.pure === false) {
31069
31522
  definitionMap.set("pure", literal(meta.pure));
31070
31523
  }
@@ -31155,7 +31608,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
31155
31608
  return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
31156
31609
  }
31157
31610
  __name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
31158
- var VERSION = new Version("20.0.6");
31611
+ var VERSION = new Version("20.2.1");
31159
31612
  publishFacade(_global);
31160
31613
  // Annotate the CommonJS export names for ESM import in node:
31161
31614
  0 && (module.exports = {
@@ -31170,6 +31623,7 @@ publishFacade(_global);
31170
31623
  BinaryOperator,
31171
31624
  BinaryOperatorExpr,
31172
31625
  BindingPipe,
31626
+ BindingPipeType,
31173
31627
  BindingType,
31174
31628
  Block,
31175
31629
  BlockParameter,
@@ -31180,6 +31634,7 @@ publishFacade(_global);
31180
31634
  Call,
31181
31635
  Chain,
31182
31636
  ChangeDetectionStrategy,
31637
+ CombinedRecursiveAstVisitor,
31183
31638
  CommaExpr,
31184
31639
  Comment,
31185
31640
  CompilerConfig,
@@ -31223,7 +31678,6 @@ publishFacade(_global);
31223
31678
  JSDocComment,
31224
31679
  JitEvaluator,
31225
31680
  KeyedRead,
31226
- KeyedWrite,
31227
31681
  LeadingComment,
31228
31682
  LetDeclaration,
31229
31683
  Lexer,
@@ -31256,10 +31710,8 @@ publishFacade(_global);
31256
31710
  ParsedPropertyType,
31257
31711
  ParsedVariable,
31258
31712
  Parser,
31259
- ParserError,
31260
31713
  PrefixNot,
31261
31714
  PropertyRead,
31262
- PropertyWrite,
31263
31715
  R3Identifiers,
31264
31716
  R3NgModuleMetadataKind,
31265
31717
  R3SelectorScopeMode,
@@ -31352,9 +31804,6 @@ publishFacade(_global);
31352
31804
  VoidExpr,
31353
31805
  VoidExpression,
31354
31806
  WrappedNodeExpr,
31355
- WriteKeyExpr,
31356
- WritePropExpr,
31357
- WriteVarExpr,
31358
31807
  Xliff,
31359
31808
  Xliff2,
31360
31809
  Xmb,
@@ -31423,7 +31872,7 @@ publishFacade(_global);
31423
31872
 
31424
31873
  @angular/compiler/fesm2022/compiler.mjs:
31425
31874
  (**
31426
- * @license Angular v20.0.6
31875
+ * @license Angular v20.2.1
31427
31876
  * (c) 2010-2025 Google LLC. https://angular.io/
31428
31877
  * License: MIT
31429
31878
  *)