@angular/core 18.0.0-next.1 → 18.0.0-next.3

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 (78) hide show
  1. package/esm2022/rxjs-interop/src/to_signal.mjs +2 -2
  2. package/esm2022/src/application/application_init.mjs +2 -2
  3. package/esm2022/src/application/application_ref.mjs +10 -15
  4. package/esm2022/src/application/application_tokens.mjs +3 -3
  5. package/esm2022/src/authoring/input/input.mjs +37 -14
  6. package/esm2022/src/authoring/input/input_signal.mjs +1 -1
  7. package/esm2022/src/authoring/input/input_signal_node.mjs +1 -1
  8. package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
  9. package/esm2022/src/authoring/model/model.mjs +35 -15
  10. package/esm2022/src/authoring/output/output.mjs +32 -10
  11. package/esm2022/src/authoring/queries.mjs +11 -1
  12. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +38 -4
  13. package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +5 -1
  14. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +91 -22
  15. package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
  16. package/esm2022/src/core_private_export.mjs +4 -4
  17. package/esm2022/src/core_render3_private_export.mjs +2 -2
  18. package/esm2022/src/defer/instructions.mjs +23 -9
  19. package/esm2022/src/di/interface/provider.mjs +1 -1
  20. package/esm2022/src/di/metadata.mjs +1 -1
  21. package/esm2022/src/hydration/annotate.mjs +35 -49
  22. package/esm2022/src/hydration/api.mjs +36 -13
  23. package/esm2022/src/hydration/cleanup.mjs +4 -18
  24. package/esm2022/src/hydration/i18n.mjs +378 -0
  25. package/esm2022/src/hydration/interfaces.mjs +2 -1
  26. package/esm2022/src/hydration/node_lookup_utils.mjs +24 -10
  27. package/esm2022/src/hydration/utils.mjs +61 -2
  28. package/esm2022/src/linker/component_factory.mjs +1 -1
  29. package/esm2022/src/linker/view_container_ref.mjs +2 -2
  30. package/esm2022/src/linker/view_ref.mjs +4 -4
  31. package/esm2022/src/metadata/directives.mjs +1 -1
  32. package/esm2022/src/metadata/ng_module.mjs +1 -1
  33. package/esm2022/src/platform/platform_ref.mjs +3 -2
  34. package/esm2022/src/render3/component_ref.mjs +1 -1
  35. package/esm2022/src/render3/debug/framework_injector_profiler.mjs +2 -2
  36. package/esm2022/src/render3/i18n/i18n_apply.mjs +28 -6
  37. package/esm2022/src/render3/i18n/i18n_parse.mjs +2 -5
  38. package/esm2022/src/render3/i18n/i18n_util.mjs +6 -1
  39. package/esm2022/src/render3/instructions/control_flow.mjs +24 -15
  40. package/esm2022/src/render3/instructions/i18n.mjs +3 -1
  41. package/esm2022/src/render3/instructions/projection.mjs +35 -9
  42. package/esm2022/src/render3/instructions/template.mjs +45 -24
  43. package/esm2022/src/render3/jit/partial.mjs +13 -2
  44. package/esm2022/src/render3/util/injector_discovery_utils.mjs +13 -9
  45. package/esm2022/src/render3/util/view_utils.mjs +4 -14
  46. package/esm2022/src/util/callback_scheduler.mjs +25 -30
  47. package/esm2022/src/version.mjs +1 -1
  48. package/esm2022/src/zone/ng_zone.mjs +3 -3
  49. package/esm2022/testing/src/component_fixture.mjs +24 -59
  50. package/esm2022/testing/src/fake_async.mjs +6 -1
  51. package/esm2022/testing/src/logger.mjs +3 -3
  52. package/esm2022/testing/src/private_export.mjs +9 -0
  53. package/esm2022/testing/src/test_bed.mjs +4 -4
  54. package/esm2022/testing/src/test_hooks.mjs +3 -3
  55. package/esm2022/testing/src/testing.mjs +3 -2
  56. package/fesm2022/core.mjs +1499 -823
  57. package/fesm2022/core.mjs.map +1 -1
  58. package/fesm2022/primitives/signals.mjs +1 -1
  59. package/fesm2022/rxjs-interop.mjs +2 -2
  60. package/fesm2022/rxjs-interop.mjs.map +1 -1
  61. package/fesm2022/testing.mjs +64 -94
  62. package/fesm2022/testing.mjs.map +1 -1
  63. package/index.d.ts +269 -149
  64. package/package.json +1 -1
  65. package/primitives/signals/index.d.ts +1 -1
  66. package/rxjs-interop/index.d.ts +2 -2
  67. package/schematics/migrations/block-template-entities/bundle.js +313 -255
  68. package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
  69. package/schematics/migrations/compiler-options/bundle.js +13 -13
  70. package/schematics/migrations/invalid-two-way-bindings/bundle.js +316 -257
  71. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
  72. package/schematics/migrations/transfer-state/bundle.js +13 -13
  73. package/schematics/ng-generate/control-flow-migration/bundle.js +349 -276
  74. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  75. package/schematics/ng-generate/standalone-migration/bundle.js +1811 -1330
  76. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  77. package/testing/index.d.ts +10 -3
  78. package/esm2022/src/change_detection/flags.mjs +0 -17
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
63
63
  });
64
64
  };
65
65
 
66
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
66
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
67
67
  var block_template_entities_exports = {};
68
68
  __export(block_template_entities_exports, {
69
69
  default: () => block_template_entities_default
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(block_template_entities_exports);
72
72
  var import_schematics = require("@angular-devkit/schematics");
73
73
  var import_path3 = require("path");
74
74
 
75
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
75
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
76
76
  var import_core = require("@angular-devkit/core");
77
77
  function getProjectTsConfigPaths(tree) {
78
78
  return __async(this, null, function* () {
@@ -152,11 +152,11 @@ function getWorkspace(tree) {
152
152
  });
153
153
  }
154
154
 
155
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
155
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
156
156
  var import_path = require("path");
157
157
  var import_typescript2 = __toESM(require("typescript"), 1);
158
158
 
159
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
159
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
160
160
  var path = __toESM(require("path"), 1);
161
161
  var import_typescript = __toESM(require("typescript"), 1);
162
162
  function parseTsconfigFile(tsconfigPath, basePath) {
@@ -173,7 +173,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
173
173
  return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
174
174
  }
175
175
 
176
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
176
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
177
177
  function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
178
178
  const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
179
179
  return import_typescript2.default.createProgram(rootNames, options, host);
@@ -206,7 +206,7 @@ function canMigrateFile(basePath, sourceFile, program) {
206
206
  return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
207
207
  }
208
208
 
209
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
209
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/selector.mjs
210
210
  var _SELECTOR_REGEXP = new RegExp(
211
211
  `(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
212
212
  "g"
@@ -514,7 +514,7 @@ var SelectorContext = class {
514
514
  }
515
515
  };
516
516
 
517
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
517
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/core.mjs
518
518
  var ViewEncapsulation;
519
519
  (function(ViewEncapsulation2) {
520
520
  ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
@@ -582,7 +582,7 @@ function parseSelectorToR3Selector(selector) {
582
582
  return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
583
583
  }
584
584
 
585
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
585
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
586
586
  var textEncoder;
587
587
  function computeDigest(message) {
588
588
  return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
@@ -822,7 +822,7 @@ function wordAt(bytes, index, endian) {
822
822
  return word;
823
823
  }
824
824
 
825
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
825
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
826
826
  var TypeModifier;
827
827
  (function(TypeModifier2) {
828
828
  TypeModifier2[TypeModifier2["None"] = 0] = "None";
@@ -1760,7 +1760,7 @@ function serializeTags(tags) {
1760
1760
  return out;
1761
1761
  }
1762
1762
 
1763
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
1763
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/constant_pool.mjs
1764
1764
  var CONSTANT_PREFIX = "_c";
1765
1765
  var UNKNOWN_VALUE_KEY = variable("<unknown>");
1766
1766
  var KEY_CONTEXT = {};
@@ -1871,12 +1871,12 @@ var ConstantPool = class {
1871
1871
  if (isArrow && current instanceof DeclareVarStmt && ((_a2 = current.value) == null ? void 0 : _a2.isEquivalent(fn2))) {
1872
1872
  return variable(current.name);
1873
1873
  }
1874
- if (!isArrow && current instanceof DeclareFunctionStmt && fn2.isEquivalent(current)) {
1874
+ if (!isArrow && current instanceof DeclareFunctionStmt && fn2 instanceof FunctionExpr && fn2.isEquivalent(current)) {
1875
1875
  return variable(current.name);
1876
1876
  }
1877
1877
  }
1878
1878
  const name = useUniqueName ? this.uniqueName(prefix) : prefix;
1879
- this.statements.push(fn2.toDeclStmt(name, StmtModifier.Final));
1879
+ this.statements.push(fn2 instanceof FunctionExpr ? fn2.toDeclStmt(name, StmtModifier.Final) : new DeclareVarStmt(name, fn2, INFERRED_TYPE, StmtModifier.Final, fn2.sourceSpan));
1880
1880
  return variable(name);
1881
1881
  }
1882
1882
  _getLiteralFactory(key, values, resultMap) {
@@ -1948,7 +1948,7 @@ function isLongStringLiteral(expr) {
1948
1948
  return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
1949
1949
  }
1950
1950
 
1951
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
1951
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
1952
1952
  var CORE = "@angular/core";
1953
1953
  var _Identifiers = class {
1954
1954
  };
@@ -2502,6 +2502,9 @@ var Identifiers = _Identifiers;
2502
2502
  (() => {
2503
2503
  _Identifiers.declareClassMetadata = { name: "\u0275\u0275ngDeclareClassMetadata", moduleName: CORE };
2504
2504
  })();
2505
+ (() => {
2506
+ _Identifiers.declareClassMetadataAsync = { name: "\u0275\u0275ngDeclareClassMetadataAsync", moduleName: CORE };
2507
+ })();
2505
2508
  (() => {
2506
2509
  _Identifiers.setClassMetadata = { name: "\u0275setClassMetadata", moduleName: CORE };
2507
2510
  })();
@@ -2614,7 +2617,7 @@ var Identifiers = _Identifiers;
2614
2617
  _Identifiers.unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: CORE };
2615
2618
  })();
2616
2619
 
2617
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
2620
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/util.mjs
2618
2621
  var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
2619
2622
  function dashCaseToCamelCase(input) {
2620
2623
  return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
@@ -2691,7 +2694,7 @@ var Version = class {
2691
2694
  };
2692
2695
  var _global = globalThis;
2693
2696
 
2694
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
2697
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/source_map.mjs
2695
2698
  var VERSION = 3;
2696
2699
  var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
2697
2700
  var SourceMapGenerator = class {
@@ -2820,7 +2823,7 @@ function toBase64Digit(value) {
2820
2823
  return B64_DIGITS[value];
2821
2824
  }
2822
2825
 
2823
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
2826
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
2824
2827
  var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
2825
2828
  var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
2826
2829
  var _INDENT_WITH = " ";
@@ -3308,7 +3311,7 @@ function _createIndent(count) {
3308
3311
  return res;
3309
3312
  }
3310
3313
 
3311
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
3314
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/util.mjs
3312
3315
  function typeWithParameters(type, numParams) {
3313
3316
  if (numParams === 0) {
3314
3317
  return expressionType(type);
@@ -3363,7 +3366,7 @@ function generateForwardRef(expr) {
3363
3366
  return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
3364
3367
  }
3365
3368
 
3366
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
3369
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
3367
3370
  var R3FactoryDelegateType;
3368
3371
  (function(R3FactoryDelegateType2) {
3369
3372
  R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
@@ -3508,7 +3511,7 @@ function getInjectFn(target) {
3508
3511
  }
3509
3512
  }
3510
3513
 
3511
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
3514
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
3512
3515
  var ParserError = class {
3513
3516
  constructor(message, input, errLocation, ctxLocation) {
3514
3517
  this.input = input;
@@ -3946,7 +3949,7 @@ var BoundElementProperty = class {
3946
3949
  }
3947
3950
  };
3948
3951
 
3949
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
3952
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
3950
3953
  var TagContentType;
3951
3954
  (function(TagContentType2) {
3952
3955
  TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
@@ -3983,7 +3986,7 @@ function mergeNsAndName(prefix, localName) {
3983
3986
  return prefix ? `:${prefix}:${localName}` : localName;
3984
3987
  }
3985
3988
 
3986
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
3989
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
3987
3990
  var Comment = class {
3988
3991
  constructor(value, sourceSpan) {
3989
3992
  this.value = value;
@@ -4301,9 +4304,10 @@ var Template = class {
4301
4304
  }
4302
4305
  };
4303
4306
  var Content = class {
4304
- constructor(selector, attributes, sourceSpan, i18n2) {
4307
+ constructor(selector, attributes, children, sourceSpan, i18n2) {
4305
4308
  this.selector = selector;
4306
4309
  this.attributes = attributes;
4310
+ this.children = children;
4307
4311
  this.sourceSpan = sourceSpan;
4308
4312
  this.i18n = i18n2;
4309
4313
  this.name = "ng-content";
@@ -4364,7 +4368,7 @@ function visitAll(visitor, nodes) {
4364
4368
  return result;
4365
4369
  }
4366
4370
 
4367
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
4371
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
4368
4372
  var Message = class {
4369
4373
  constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
4370
4374
  this.nodes = nodes;
@@ -4502,7 +4506,7 @@ var LocalizeMessageStringVisitor = class {
4502
4506
  }
4503
4507
  };
4504
4508
 
4505
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
4509
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
4506
4510
  var _Visitor = class {
4507
4511
  visitTag(tag) {
4508
4512
  const strAttrs = this._serializeAttributes(tag.attrs);
@@ -4530,12 +4534,12 @@ ${doctype.dtd}
4530
4534
  };
4531
4535
  var _visitor = new _Visitor();
4532
4536
 
4533
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
4537
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
4534
4538
  function toPublicName(internalName) {
4535
4539
  return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
4536
4540
  }
4537
4541
 
4538
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
4542
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
4539
4543
  var I18N_ATTR = "i18n";
4540
4544
  var I18N_ATTR_PREFIX = "i18n-";
4541
4545
  var I18N_ICU_VAR_PREFIX = "VAR_";
@@ -4575,7 +4579,7 @@ function formatI18nPlaceholderName(name, useCamelCase = true) {
4575
4579
  return postfix ? `${raw}_${postfix}` : raw;
4576
4580
  }
4577
4581
 
4578
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
4582
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
4579
4583
  var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
4580
4584
  var TEMPORARY_NAME = "_t";
4581
4585
  var CONTEXT_NAME = "ctx";
@@ -4712,7 +4716,7 @@ function getAttrsForDirectiveMatching(elOrTpl) {
4712
4716
  return attributesMap;
4713
4717
  }
4714
4718
 
4715
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
4719
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
4716
4720
  function compileInjectable(meta, resolveForwardRefs) {
4717
4721
  let result = null;
4718
4722
  const factoryMeta = {
@@ -4797,7 +4801,7 @@ function createFactoryFunction(type) {
4797
4801
  return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
4798
4802
  }
4799
4803
 
4800
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
4804
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/assertions.mjs
4801
4805
  var UNUSABLE_INTERPOLATION_REGEXPS = [
4802
4806
  /^\s*$/,
4803
4807
  /[<>]/,
@@ -4819,7 +4823,7 @@ function assertInterpolationSymbols(identifier, value) {
4819
4823
  }
4820
4824
  }
4821
4825
 
4822
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
4826
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
4823
4827
  var InterpolationConfig = class {
4824
4828
  static fromArray(markers) {
4825
4829
  if (!markers) {
@@ -4836,7 +4840,7 @@ var InterpolationConfig = class {
4836
4840
  var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
4837
4841
  var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
4838
4842
 
4839
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
4843
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/chars.mjs
4840
4844
  var $EOF = 0;
4841
4845
  var $BSPACE = 8;
4842
4846
  var $TAB = 9;
@@ -4918,7 +4922,7 @@ function isQuote(code) {
4918
4922
  return code === $SQ || code === $DQ || code === $BT;
4919
4923
  }
4920
4924
 
4921
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
4925
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/parse_util.mjs
4922
4926
  var ParseLocation = class {
4923
4927
  constructor(file, offset, line, col) {
4924
4928
  this.file = file;
@@ -5065,7 +5069,7 @@ function sanitizeIdentifier(name) {
5065
5069
  return name.replace(/\W/g, "_");
5066
5070
  }
5067
5071
 
5068
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
5072
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
5069
5073
  var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
5070
5074
  var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
5071
5075
  constructor() {
@@ -5158,7 +5162,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
5158
5162
  }
5159
5163
  };
5160
5164
 
5161
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
5165
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
5162
5166
  var policy;
5163
5167
  function getPolicy() {
5164
5168
  if (policy === void 0) {
@@ -5196,7 +5200,7 @@ function newTrustedFunctionForJIT(...args) {
5196
5200
  return fn2.bind(_global);
5197
5201
  }
5198
5202
 
5199
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
5203
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
5200
5204
  var JitEvaluator = class {
5201
5205
  evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
5202
5206
  const converter = new JitEmitterVisitor(refResolver);
@@ -5287,7 +5291,7 @@ function isUseStrictStatement(statement) {
5287
5291
  return statement.isEquivalent(literal("use strict").toStmt());
5288
5292
  }
5289
5293
 
5290
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
5294
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
5291
5295
  function compileInjector(meta) {
5292
5296
  const definitionMap = new DefinitionMap();
5293
5297
  if (meta.providers !== null) {
@@ -5304,7 +5308,7 @@ function createInjectorType(meta) {
5304
5308
  return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
5305
5309
  }
5306
5310
 
5307
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
5311
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
5308
5312
  var R3JitReflector = class {
5309
5313
  constructor(context) {
5310
5314
  this.context = context;
@@ -5320,7 +5324,7 @@ var R3JitReflector = class {
5320
5324
  }
5321
5325
  };
5322
5326
 
5323
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
5327
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
5324
5328
  var R3SelectorScopeMode;
5325
5329
  (function(R3SelectorScopeMode2) {
5326
5330
  R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
@@ -5461,7 +5465,7 @@ function tupleOfTypes(types) {
5461
5465
  return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
5462
5466
  }
5463
5467
 
5464
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
5468
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
5465
5469
  function compilePipeFromMetadata(metadata) {
5466
5470
  const definitionMapValues = [];
5467
5471
  definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
@@ -5482,7 +5486,7 @@ function createPipeType(metadata) {
5482
5486
  ]));
5483
5487
  }
5484
5488
 
5485
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
5489
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
5486
5490
  var R3TemplateDependencyKind;
5487
5491
  (function(R3TemplateDependencyKind2) {
5488
5492
  R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
@@ -5490,7 +5494,7 @@ var R3TemplateDependencyKind;
5490
5494
  R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
5491
5495
  })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
5492
5496
 
5493
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
5497
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/shadow_css.mjs
5494
5498
  var animationKeywords = /* @__PURE__ */ new Set([
5495
5499
  "inherit",
5496
5500
  "initial",
@@ -5962,7 +5966,7 @@ function repeatGroups(groups, multiples) {
5962
5966
  }
5963
5967
  }
5964
5968
 
5965
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
5969
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
5966
5970
  var OpKind;
5967
5971
  (function(OpKind2) {
5968
5972
  OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
@@ -6116,7 +6120,7 @@ var TemplateKind;
6116
6120
  TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
6117
6121
  })(TemplateKind || (TemplateKind = {}));
6118
6122
 
6119
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
6123
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
6120
6124
  var ConsumesSlot = Symbol("ConsumesSlot");
6121
6125
  var DependsOnSlotContext = Symbol("DependsOnSlotContext");
6122
6126
  var ConsumesVarsTrait = Symbol("ConsumesVars");
@@ -6144,7 +6148,7 @@ function hasUsesVarOffsetTrait(expr) {
6144
6148
  return expr[UsesVarOffset] === true;
6145
6149
  }
6146
6150
 
6147
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
6151
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
6148
6152
  function createStatementOp(statement) {
6149
6153
  return __spreadValues({
6150
6154
  kind: OpKind.Statement,
@@ -6166,7 +6170,7 @@ var NEW_OP = {
6166
6170
  next: null
6167
6171
  };
6168
6172
 
6169
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
6173
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
6170
6174
  function createInterpolateTextOp(xref, interpolation, sourceSpan) {
6171
6175
  return __spreadValues(__spreadValues(__spreadValues({
6172
6176
  kind: OpKind.InterpolateText,
@@ -6347,7 +6351,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
6347
6351
  }, NEW_OP);
6348
6352
  }
6349
6353
 
6350
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
6354
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
6351
6355
  var _a;
6352
6356
  var _b;
6353
6357
  var _c;
@@ -7209,7 +7213,7 @@ function isStringLiteral(expr) {
7209
7213
  return expr instanceof LiteralExpr && typeof expr.value === "string";
7210
7214
  }
7211
7215
 
7212
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
7216
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
7213
7217
  var _OpList = class {
7214
7218
  constructor() {
7215
7219
  this.debugListId = _OpList.nextListId++;
@@ -7400,14 +7404,14 @@ var OpList = _OpList;
7400
7404
  _OpList.nextListId = 0;
7401
7405
  })();
7402
7406
 
7403
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
7407
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
7404
7408
  var SlotHandle = class {
7405
7409
  constructor() {
7406
7410
  this.slot = null;
7407
7411
  }
7408
7412
  };
7409
7413
 
7410
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
7414
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
7411
7415
  var elementContainerOpKinds = /* @__PURE__ */ new Set([
7412
7416
  OpKind.Element,
7413
7417
  OpKind.ElementStart,
@@ -7563,18 +7567,21 @@ function createProjectionDefOp(def) {
7563
7567
  def
7564
7568
  }, NEW_OP);
7565
7569
  }
7566
- function createProjectionOp(xref, selector, i18nPlaceholder, sourceSpan) {
7567
- return __spreadValues(__spreadValues({
7570
+ function createProjectionOp(xref, selector, i18nPlaceholder, fallbackView, sourceSpan) {
7571
+ return __spreadProps(__spreadValues(__spreadValues({
7568
7572
  kind: OpKind.Projection,
7569
7573
  xref,
7570
7574
  handle: new SlotHandle(),
7571
7575
  selector,
7572
7576
  i18nPlaceholder,
7577
+ fallbackView,
7573
7578
  projectionSlotIndex: 0,
7574
7579
  attributes: null,
7575
7580
  localRefs: [],
7576
7581
  sourceSpan
7577
- }, NEW_OP), TRAIT_CONSUMES_SLOT);
7582
+ }, NEW_OP), TRAIT_CONSUMES_SLOT), {
7583
+ numSlotsUsed: fallbackView === null ? 1 : 2
7584
+ });
7578
7585
  }
7579
7586
  function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
7580
7587
  return __spreadValues({
@@ -7708,7 +7715,7 @@ function createI18nAttributesOp(xref, handle, target) {
7708
7715
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
7709
7716
  }
7710
7717
 
7711
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
7718
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
7712
7719
  function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
7713
7720
  return __spreadValues(__spreadValues({
7714
7721
  kind: OpKind.HostProperty,
@@ -7722,10 +7729,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext,
7722
7729
  }, TRAIT_CONSUMES_VARS), NEW_OP);
7723
7730
  }
7724
7731
 
7725
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
7732
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
7726
7733
  var CTX_REF = "CTX_REF_MARKER";
7727
7734
 
7728
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
7735
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
7729
7736
  var CompilationJobKind;
7730
7737
  (function(CompilationJobKind2) {
7731
7738
  CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
@@ -7833,7 +7840,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
7833
7840
  }
7834
7841
  };
7835
7842
 
7836
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
7843
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
7837
7844
  function deleteAnyCasts(job) {
7838
7845
  for (const unit of job.units) {
7839
7846
  for (const op of unit.ops()) {
@@ -7851,7 +7858,7 @@ function removeAnys(e) {
7851
7858
  return e;
7852
7859
  }
7853
7860
 
7854
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
7861
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
7855
7862
  function applyI18nExpressions(job) {
7856
7863
  const i18nContexts = /* @__PURE__ */ new Map();
7857
7864
  for (const unit of job.units) {
@@ -7894,7 +7901,7 @@ function needsApplication(i18nContexts, op) {
7894
7901
  return false;
7895
7902
  }
7896
7903
 
7897
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
7904
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
7898
7905
  function assignI18nSlotDependencies(job) {
7899
7906
  for (const unit of job.units) {
7900
7907
  let updateOp = unit.update.head;
@@ -7939,7 +7946,7 @@ function assignI18nSlotDependencies(job) {
7939
7946
  }
7940
7947
  }
7941
7948
 
7942
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
7949
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
7943
7950
  function createOpXrefMap(unit) {
7944
7951
  const map = /* @__PURE__ */ new Map();
7945
7952
  for (const op of unit.create) {
@@ -7954,7 +7961,7 @@ function createOpXrefMap(unit) {
7954
7961
  return map;
7955
7962
  }
7956
7963
 
7957
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
7964
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
7958
7965
  function extractAttributes(job) {
7959
7966
  for (const unit of job.units) {
7960
7967
  const elements = createOpXrefMap(unit);
@@ -8083,7 +8090,7 @@ function extractAttributeOp(unit, op, elements) {
8083
8090
  }
8084
8091
  }
8085
8092
 
8086
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
8093
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
8087
8094
  function lookupElement2(elements, xref) {
8088
8095
  const el = elements.get(xref);
8089
8096
  if (el === void 0) {
@@ -8140,7 +8147,7 @@ function specializeBindings(job) {
8140
8147
  }
8141
8148
  }
8142
8149
 
8143
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
8150
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
8144
8151
  var CHAINABLE = /* @__PURE__ */ new Set([
8145
8152
  Identifiers.attribute,
8146
8153
  Identifiers.classProp,
@@ -8208,7 +8215,7 @@ function chainOperationsInList(opList) {
8208
8215
  }
8209
8216
  }
8210
8217
 
8211
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
8218
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
8212
8219
  function collapseSingletonInterpolations(job) {
8213
8220
  for (const unit of job.units) {
8214
8221
  for (const op of unit.update) {
@@ -8220,7 +8227,7 @@ function collapseSingletonInterpolations(job) {
8220
8227
  }
8221
8228
  }
8222
8229
 
8223
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
8230
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
8224
8231
  function generateConditionalExpressions(job) {
8225
8232
  for (const unit of job.units) {
8226
8233
  for (const op of unit.ops()) {
@@ -8257,7 +8264,7 @@ function generateConditionalExpressions(job) {
8257
8264
  }
8258
8265
  }
8259
8266
 
8260
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
8267
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
8261
8268
  var BINARY_OPERATORS = /* @__PURE__ */ new Map([
8262
8269
  ["&&", BinaryOperator.And],
8263
8270
  [">", BinaryOperator.Bigger],
@@ -8308,7 +8315,7 @@ function literalOrArrayLiteral(value) {
8308
8315
  return literal(value);
8309
8316
  }
8310
8317
 
8311
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
8318
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
8312
8319
  function collectElementConsts(job) {
8313
8320
  const allElementAttributes = /* @__PURE__ */ new Map();
8314
8321
  for (const unit of job.units) {
@@ -8477,7 +8484,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
8477
8484
  return literalArr(attrArray);
8478
8485
  }
8479
8486
 
8480
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
8487
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
8481
8488
  function convertI18nBindings(job) {
8482
8489
  const i18nAttributesByElem = /* @__PURE__ */ new Map();
8483
8490
  for (const unit of job.units) {
@@ -8518,7 +8525,7 @@ function convertI18nBindings(job) {
8518
8525
  }
8519
8526
  }
8520
8527
 
8521
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_defer_deps_fns.mjs
8528
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_defer_deps_fns.mjs
8522
8529
  function resolveDeferDepsFns(job) {
8523
8530
  var _a2;
8524
8531
  for (const unit of job.units) {
@@ -8543,7 +8550,7 @@ function resolveDeferDepsFns(job) {
8543
8550
  }
8544
8551
  }
8545
8552
 
8546
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
8553
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
8547
8554
  function createI18nContexts(job) {
8548
8555
  const attrContextByMessage = /* @__PURE__ */ new Map();
8549
8556
  for (const unit of job.units) {
@@ -8621,7 +8628,7 @@ function createI18nContexts(job) {
8621
8628
  }
8622
8629
  }
8623
8630
 
8624
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
8631
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
8625
8632
  function deduplicateTextBindings(job) {
8626
8633
  const seen = /* @__PURE__ */ new Map();
8627
8634
  for (const unit of job.units) {
@@ -8643,7 +8650,7 @@ function deduplicateTextBindings(job) {
8643
8650
  }
8644
8651
  }
8645
8652
 
8646
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
8653
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
8647
8654
  function configureDeferInstructions(job) {
8648
8655
  for (const unit of job.units) {
8649
8656
  for (const op of unit.create) {
@@ -8660,7 +8667,7 @@ function configureDeferInstructions(job) {
8660
8667
  }
8661
8668
  }
8662
8669
 
8663
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
8670
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
8664
8671
  function resolveDeferTargetNames(job) {
8665
8672
  const scopes = /* @__PURE__ */ new Map();
8666
8673
  function getScopeForView2(view) {
@@ -8754,7 +8761,7 @@ var Scope = class {
8754
8761
  }
8755
8762
  };
8756
8763
 
8757
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
8764
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
8758
8765
  var REPLACEMENTS = /* @__PURE__ */ new Map([
8759
8766
  [OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
8760
8767
  [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
@@ -8781,7 +8788,7 @@ function collapseEmptyInstructions(job) {
8781
8788
  }
8782
8789
  }
8783
8790
 
8784
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
8791
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
8785
8792
  function expandSafeReads(job) {
8786
8793
  for (const unit of job.units) {
8787
8794
  for (const op of unit.ops()) {
@@ -8917,7 +8924,7 @@ function ternaryTransform(e) {
8917
8924
  return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
8918
8925
  }
8919
8926
 
8920
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
8927
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
8921
8928
  var ESCAPE = "\uFFFD";
8922
8929
  var ELEMENT_MARKER = "#";
8923
8930
  var TEMPLATE_MARKER = "*";
@@ -9053,7 +9060,7 @@ function formatValue(value) {
9053
9060
  return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
9054
9061
  }
9055
9062
 
9056
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
9063
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
9057
9064
  function generateAdvance(job) {
9058
9065
  for (const unit of job.units) {
9059
9066
  const slotMap = /* @__PURE__ */ new Map();
@@ -9085,7 +9092,7 @@ function generateAdvance(job) {
9085
9092
  }
9086
9093
  }
9087
9094
 
9088
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
9095
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
9089
9096
  function generateProjectionDefs(job) {
9090
9097
  const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
9091
9098
  const selectors = [];
@@ -9109,7 +9116,7 @@ function generateProjectionDefs(job) {
9109
9116
  }
9110
9117
  }
9111
9118
 
9112
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
9119
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
9113
9120
  function generateVariables(job) {
9114
9121
  recursivelyProcessView(job.root, null);
9115
9122
  }
@@ -9120,6 +9127,11 @@ function recursivelyProcessView(view, parentScope) {
9120
9127
  case OpKind.Template:
9121
9128
  recursivelyProcessView(view.job.views.get(op.xref), scope);
9122
9129
  break;
9130
+ case OpKind.Projection:
9131
+ if (op.fallbackView !== null) {
9132
+ recursivelyProcessView(view.job.views.get(op.fallbackView), scope);
9133
+ }
9134
+ break;
9123
9135
  case OpKind.RepeaterCreate:
9124
9136
  recursivelyProcessView(view.job.views.get(op.xref), scope);
9125
9137
  if (op.emptyView) {
@@ -9203,7 +9215,7 @@ function generateVariablesInScopeForView(view, scope) {
9203
9215
  return newOps;
9204
9216
  }
9205
9217
 
9206
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
9218
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
9207
9219
  function collectConstExpressions(job) {
9208
9220
  for (const unit of job.units) {
9209
9221
  for (const op of unit.ops()) {
@@ -9217,7 +9229,7 @@ function collectConstExpressions(job) {
9217
9229
  }
9218
9230
  }
9219
9231
 
9220
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
9232
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
9221
9233
  var STYLE_DOT = "style.";
9222
9234
  var CLASS_DOT = "class.";
9223
9235
  var STYLE_BANG = "style!";
@@ -9275,7 +9287,7 @@ function parseProperty(name) {
9275
9287
  return { property: property2, suffix };
9276
9288
  }
9277
9289
 
9278
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
9290
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/output/map_util.mjs
9279
9291
  function mapLiteral(obj, quoted = false) {
9280
9292
  return literalMap(Object.keys(obj).map((key) => ({
9281
9293
  key,
@@ -9284,7 +9296,7 @@ function mapLiteral(obj, quoted = false) {
9284
9296
  })));
9285
9297
  }
9286
9298
 
9287
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
9299
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
9288
9300
  var IcuSerializerVisitor = class {
9289
9301
  visitText(text2) {
9290
9302
  return text2.value;
@@ -9318,7 +9330,7 @@ function serializeIcuNode(icu) {
9318
9330
  return icu.visit(serializer);
9319
9331
  }
9320
9332
 
9321
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
9333
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
9322
9334
  var TokenType;
9323
9335
  (function(TokenType2) {
9324
9336
  TokenType2[TokenType2["Character"] = 0] = "Character";
@@ -9679,7 +9691,7 @@ function parseIntAutoRadix(text2) {
9679
9691
  return result;
9680
9692
  }
9681
9693
 
9682
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
9694
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
9683
9695
  var SplitInterpolation = class {
9684
9696
  constructor(strings, expressions, offsets) {
9685
9697
  this.strings = strings;
@@ -10561,7 +10573,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
10561
10573
  return offsetMap;
10562
10574
  }
10563
10575
 
10564
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
10576
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
10565
10577
  var NodeWithI18n = class {
10566
10578
  constructor(sourceSpan, i18n2) {
10567
10579
  this.sourceSpan = sourceSpan;
@@ -10713,7 +10725,7 @@ var RecursiveVisitor = class {
10713
10725
  }
10714
10726
  };
10715
10727
 
10716
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
10728
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
10717
10729
  var _SECURITY_SCHEMA;
10718
10730
  function SECURITY_SCHEMA() {
10719
10731
  if (!_SECURITY_SCHEMA) {
@@ -10771,11 +10783,11 @@ function isIframeSecuritySensitiveAttr(attrName) {
10771
10783
  return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
10772
10784
  }
10773
10785
 
10774
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
10786
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
10775
10787
  var ElementSchemaRegistry = class {
10776
10788
  };
10777
10789
 
10778
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
10790
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
10779
10791
  var BOOLEAN = "boolean";
10780
10792
  var NUMBER = "number";
10781
10793
  var STRING = "string";
@@ -11128,7 +11140,7 @@ function _isPixelDimensionStyle(prop) {
11128
11140
  }
11129
11141
  }
11130
11142
 
11131
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
11143
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
11132
11144
  var HtmlTagDefinition = class {
11133
11145
  constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
11134
11146
  this.closedByChildren = {};
@@ -11246,7 +11258,7 @@ function getHtmlTagDefinition(tagName) {
11246
11258
  return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
11247
11259
  }
11248
11260
 
11249
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
11261
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
11250
11262
  var TAG_TO_PLACEHOLDER_NAMES = {
11251
11263
  "A": "LINK",
11252
11264
  "B": "BOLD_TEXT",
@@ -11368,7 +11380,7 @@ var PlaceholderRegistry = class {
11368
11380
  }
11369
11381
  };
11370
11382
 
11371
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
11383
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
11372
11384
  var _expParser = new Parser(new Lexer());
11373
11385
  function createI18nMessageFactory(interpolationConfig, containerBlocks) {
11374
11386
  const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
@@ -11547,14 +11559,14 @@ function extractPlaceholderName(input) {
11547
11559
  return input.split(_CUSTOM_PH_EXP)[2];
11548
11560
  }
11549
11561
 
11550
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
11562
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
11551
11563
  var I18nError = class extends ParseError {
11552
11564
  constructor(span, msg) {
11553
11565
  super(span, msg);
11554
11566
  }
11555
11567
  };
11556
11568
 
11557
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
11569
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
11558
11570
  var NAMED_ENTITIES = {
11559
11571
  "AElig": "\xC6",
11560
11572
  "AMP": "&",
@@ -13685,7 +13697,7 @@ var NAMED_ENTITIES = {
13685
13697
  var NGSP_UNICODE = "\uE500";
13686
13698
  NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
13687
13699
 
13688
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
13700
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
13689
13701
  var TokenError = class extends ParseError {
13690
13702
  constructor(errorMsg, tokenType, span) {
13691
13703
  super(span, errorMsg);
@@ -14606,7 +14618,7 @@ var CursorError = class {
14606
14618
  }
14607
14619
  };
14608
14620
 
14609
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
14621
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
14610
14622
  var TreeError = class extends ParseError {
14611
14623
  static create(elementName, span, msg) {
14612
14624
  return new TreeError(elementName, span, msg);
@@ -14990,7 +15002,7 @@ function decodeEntity(match, entity) {
14990
15002
  return match;
14991
15003
  }
14992
15004
 
14993
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
15005
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
14994
15006
  var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
14995
15007
  "iframe|srcdoc",
14996
15008
  "*|innerhtml",
@@ -15005,7 +15017,7 @@ function isTrustedTypesSink(tagName, propName) {
15005
15017
  return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
15006
15018
  }
15007
15019
 
15008
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
15020
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
15009
15021
  var setI18nRefs = (htmlNode, i18nNode) => {
15010
15022
  if (htmlNode instanceof NodeWithI18n) {
15011
15023
  if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
@@ -15162,7 +15174,7 @@ function i18nMetaToJSDoc(meta) {
15162
15174
  return jsDocComment(tags);
15163
15175
  }
15164
15176
 
15165
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
15177
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
15166
15178
  var GOOG_GET_MSG = "goog.getMsg";
15167
15179
  function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
15168
15180
  const messageString = serializeI18nMessageForGetMsg(message);
@@ -15213,7 +15225,7 @@ function serializeI18nMessageForGetMsg(message) {
15213
15225
  return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
15214
15226
  }
15215
15227
 
15216
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
15228
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
15217
15229
  function createLocalizeStatements(variable2, message, params) {
15218
15230
  const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
15219
15231
  const sourceSpan = getSourceSpan(message);
@@ -15302,7 +15314,7 @@ function createEmptyMessagePart(location) {
15302
15314
  return new LiteralPiece("", new ParseSourceSpan(location, location));
15303
15315
  }
15304
15316
 
15305
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
15317
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
15306
15318
  var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
15307
15319
  var TRANSLATION_VAR_PREFIX = "i18n_";
15308
15320
  var I18N_ICU_MAPPING_PREFIX = "I18N_EXP_";
@@ -15470,7 +15482,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
15470
15482
  return variable(name);
15471
15483
  }
15472
15484
 
15473
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
15485
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
15474
15486
  function convertI18nText(job) {
15475
15487
  var _a2, _b2, _c2;
15476
15488
  for (const unit of job.units) {
@@ -15540,7 +15552,7 @@ function convertI18nText(job) {
15540
15552
  }
15541
15553
  }
15542
15554
 
15543
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
15555
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
15544
15556
  function liftLocalRefs(job) {
15545
15557
  for (const unit of job.units) {
15546
15558
  for (const op of unit.create) {
@@ -15570,7 +15582,7 @@ function serializeLocalRefs(refs) {
15570
15582
  return literalArr(constRefs);
15571
15583
  }
15572
15584
 
15573
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
15585
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
15574
15586
  function emitNamespaceChanges(job) {
15575
15587
  for (const unit of job.units) {
15576
15588
  let activeNamespace = Namespace.HTML;
@@ -15586,7 +15598,7 @@ function emitNamespaceChanges(job) {
15586
15598
  }
15587
15599
  }
15588
15600
 
15589
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
15601
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
15590
15602
  function parse(value) {
15591
15603
  const styles = [];
15592
15604
  let i = 0;
@@ -15680,7 +15692,7 @@ function parseExtractedStyles(job) {
15680
15692
  }
15681
15693
  }
15682
15694
 
15683
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
15695
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
15684
15696
  function nameFunctionsAndVariables(job) {
15685
15697
  addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
15686
15698
  }
@@ -15741,6 +15753,18 @@ function addNamesToView(unit, baseName, state, compatibility) {
15741
15753
  }
15742
15754
  addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);
15743
15755
  break;
15756
+ case OpKind.Projection:
15757
+ if (!(unit instanceof ViewCompilationUnit)) {
15758
+ throw new Error(`AssertionError: must be compiling a component`);
15759
+ }
15760
+ if (op.handle.slot === null) {
15761
+ throw new Error(`Expected slot to be assigned`);
15762
+ }
15763
+ if (op.fallbackView !== null) {
15764
+ const fallbackView = unit.job.views.get(op.fallbackView);
15765
+ addNamesToView(fallbackView, `${baseName}_ProjectionFallback_${op.handle.slot}`, state, compatibility);
15766
+ }
15767
+ break;
15744
15768
  case OpKind.Template:
15745
15769
  if (!(unit instanceof ViewCompilationUnit)) {
15746
15770
  throw new Error(`AssertionError: must be compiling a component`);
@@ -15809,7 +15833,7 @@ function stripImportant(name) {
15809
15833
  return name;
15810
15834
  }
15811
15835
 
15812
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
15836
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
15813
15837
  function mergeNextContextExpressions(job) {
15814
15838
  for (const unit of job.units) {
15815
15839
  for (const op of unit.create) {
@@ -15855,7 +15879,7 @@ function mergeNextContextsInOps(ops) {
15855
15879
  }
15856
15880
  }
15857
15881
 
15858
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
15882
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
15859
15883
  var CONTAINER_TAG = "ng-container";
15860
15884
  function generateNgContainerOps(job) {
15861
15885
  for (const unit of job.units) {
@@ -15872,7 +15896,7 @@ function generateNgContainerOps(job) {
15872
15896
  }
15873
15897
  }
15874
15898
 
15875
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
15899
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
15876
15900
  function lookupElement3(elements, xref) {
15877
15901
  const el = elements.get(xref);
15878
15902
  if (el === void 0) {
@@ -15902,7 +15926,7 @@ function disableBindings(job) {
15902
15926
  }
15903
15927
  }
15904
15928
 
15905
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
15929
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
15906
15930
  function generateNullishCoalesceExpressions(job) {
15907
15931
  for (const unit of job.units) {
15908
15932
  for (const op of unit.ops()) {
@@ -15918,7 +15942,7 @@ function generateNullishCoalesceExpressions(job) {
15918
15942
  }
15919
15943
  }
15920
15944
 
15921
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
15945
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
15922
15946
  function kindTest(kind) {
15923
15947
  return (op) => op.kind === kind;
15924
15948
  }
@@ -16008,7 +16032,7 @@ function keepLast(ops) {
16008
16032
  return ops.slice(ops.length - 1);
16009
16033
  }
16010
16034
 
16011
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
16035
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
16012
16036
  function removeContentSelectors(job) {
16013
16037
  for (const unit of job.units) {
16014
16038
  const elements = createOpXrefMap(unit);
@@ -16035,7 +16059,7 @@ function lookupInXrefMap(map, xref) {
16035
16059
  return el;
16036
16060
  }
16037
16061
 
16038
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
16062
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
16039
16063
  function createPipes(job) {
16040
16064
  for (const unit of job.units) {
16041
16065
  processPipeBindingsInView(unit);
@@ -16083,7 +16107,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
16083
16107
  throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
16084
16108
  }
16085
16109
 
16086
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
16110
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
16087
16111
  function createVariadicPipes(job) {
16088
16112
  for (const unit of job.units) {
16089
16113
  for (const op of unit.update) {
@@ -16100,7 +16124,7 @@ function createVariadicPipes(job) {
16100
16124
  }
16101
16125
  }
16102
16126
 
16103
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
16127
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
16104
16128
  function propagateI18nBlocks(job) {
16105
16129
  propagateI18nBlocksToTemplates(job.root, 0);
16106
16130
  }
@@ -16154,7 +16178,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
16154
16178
  }
16155
16179
  }
16156
16180
 
16157
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
16181
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
16158
16182
  function extractPureFunctions(job) {
16159
16183
  for (const view of job.units) {
16160
16184
  for (const op of view.ops()) {
@@ -16196,7 +16220,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
16196
16220
  }
16197
16221
  };
16198
16222
 
16199
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
16223
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
16200
16224
  function generatePureLiteralStructures(job) {
16201
16225
  for (const unit of job.units) {
16202
16226
  for (const op of unit.update) {
@@ -16243,7 +16267,7 @@ function transformLiteralMap(expr) {
16243
16267
  return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
16244
16268
  }
16245
16269
 
16246
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
16270
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
16247
16271
  function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
16248
16272
  return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
16249
16273
  }
@@ -16407,13 +16431,19 @@ function deferOn(trigger, args, prefetch, sourceSpan) {
16407
16431
  function projectionDef(def) {
16408
16432
  return call(Identifiers.projectionDef, def ? [def] : [], null);
16409
16433
  }
16410
- function projection(slot, projectionSlotIndex, attributes, sourceSpan) {
16434
+ function projection(slot, projectionSlotIndex, attributes, fallbackFnName, fallbackDecls, fallbackVars, sourceSpan) {
16411
16435
  const args = [literal(slot)];
16412
- if (projectionSlotIndex !== 0 || attributes !== null) {
16436
+ if (projectionSlotIndex !== 0 || attributes !== null || fallbackFnName !== null) {
16413
16437
  args.push(literal(projectionSlotIndex));
16414
16438
  if (attributes !== null) {
16415
16439
  args.push(attributes);
16416
16440
  }
16441
+ if (fallbackFnName !== null) {
16442
+ if (attributes === null) {
16443
+ args.push(literal(null));
16444
+ }
16445
+ args.push(variable(fallbackFnName), literal(fallbackDecls), literal(fallbackVars));
16446
+ }
16417
16447
  }
16418
16448
  return call(Identifiers.projection, args, sourceSpan);
16419
16449
  }
@@ -16778,7 +16808,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
16778
16808
  return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
16779
16809
  }
16780
16810
 
16781
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
16811
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
16782
16812
  var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
16783
16813
  ["window", Identifiers.resolveWindow],
16784
16814
  ["document", Identifiers.resolveDocument],
@@ -16916,7 +16946,25 @@ function reifyCreateOperations(unit, ops) {
16916
16946
  if (op.handle.slot === null) {
16917
16947
  throw new Error("No slot was assigned for project instruction");
16918
16948
  }
16919
- OpList.replace(op, projection(op.handle.slot, op.projectionSlotIndex, op.attributes, op.sourceSpan));
16949
+ let fallbackViewFnName = null;
16950
+ let fallbackDecls = null;
16951
+ let fallbackVars = null;
16952
+ if (op.fallbackView !== null) {
16953
+ if (!(unit instanceof ViewCompilationUnit)) {
16954
+ throw new Error(`AssertionError: must be compiling a component`);
16955
+ }
16956
+ const fallbackView = unit.job.views.get(op.fallbackView);
16957
+ if (fallbackView === void 0) {
16958
+ throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");
16959
+ }
16960
+ if (fallbackView.fnName === null || fallbackView.decls === null || fallbackView.vars === null) {
16961
+ throw new Error(`AssertionError: expected projection fallback view to have been named and counted`);
16962
+ }
16963
+ fallbackViewFnName = fallbackView.fnName;
16964
+ fallbackDecls = fallbackView.decls;
16965
+ fallbackVars = fallbackView.vars;
16966
+ }
16967
+ OpList.replace(op, projection(op.handle.slot, op.projectionSlotIndex, op.attributes, fallbackViewFnName, fallbackDecls, fallbackVars, op.sourceSpan));
16920
16968
  break;
16921
16969
  case OpKind.RepeaterCreate:
16922
16970
  if (op.handle.slot === null) {
@@ -17119,7 +17167,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
17119
17167
  return fn(params, handlerStmts, void 0, void 0, name);
17120
17168
  }
17121
17169
 
17122
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
17170
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
17123
17171
  function removeEmptyBindings(job) {
17124
17172
  for (const unit of job.units) {
17125
17173
  for (const op of unit.update) {
@@ -17140,7 +17188,7 @@ function removeEmptyBindings(job) {
17140
17188
  }
17141
17189
  }
17142
17190
 
17143
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
17191
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
17144
17192
  function removeI18nContexts(job) {
17145
17193
  for (const unit of job.units) {
17146
17194
  for (const op of unit.create) {
@@ -17156,7 +17204,7 @@ function removeI18nContexts(job) {
17156
17204
  }
17157
17205
  }
17158
17206
 
17159
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
17207
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
17160
17208
  function removeUnusedI18nAttributesOps(job) {
17161
17209
  for (const unit of job.units) {
17162
17210
  const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
@@ -17178,7 +17226,7 @@ function removeUnusedI18nAttributesOps(job) {
17178
17226
  }
17179
17227
  }
17180
17228
 
17181
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
17229
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
17182
17230
  function resolveContexts(job) {
17183
17231
  for (const unit of job.units) {
17184
17232
  processLexicalScope(unit, unit.create);
@@ -17220,7 +17268,7 @@ function processLexicalScope(view, ops) {
17220
17268
  }
17221
17269
  }
17222
17270
 
17223
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
17271
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
17224
17272
  function resolveDollarEvent(job) {
17225
17273
  for (const unit of job.units) {
17226
17274
  transformDollarEvent(unit.create);
@@ -17243,7 +17291,7 @@ function transformDollarEvent(ops) {
17243
17291
  }
17244
17292
  }
17245
17293
 
17246
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
17294
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
17247
17295
  function resolveI18nElementPlaceholders(job) {
17248
17296
  const i18nContexts = /* @__PURE__ */ new Map();
17249
17297
  const elements = /* @__PURE__ */ new Map();
@@ -17422,7 +17470,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
17422
17470
  params.set(placeholder, values);
17423
17471
  }
17424
17472
 
17425
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
17473
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
17426
17474
  function resolveI18nExpressionPlaceholders(job) {
17427
17475
  var _a2;
17428
17476
  const subTemplateIndices = /* @__PURE__ */ new Map();
@@ -17475,7 +17523,7 @@ function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
17475
17523
  }
17476
17524
  }
17477
17525
 
17478
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
17526
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
17479
17527
  function resolveNames(job) {
17480
17528
  for (const unit of job.units) {
17481
17529
  processLexicalScope2(unit, unit.create, null);
@@ -17540,7 +17588,7 @@ function processLexicalScope2(unit, ops, savedView) {
17540
17588
  }
17541
17589
  }
17542
17590
 
17543
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
17591
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
17544
17592
  var sanitizerFns = /* @__PURE__ */ new Map([
17545
17593
  [SecurityContext.HTML, Identifiers.sanitizeHtml],
17546
17594
  [SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
@@ -17610,7 +17658,7 @@ function getOnlySecurityContext(securityContext) {
17610
17658
  return securityContext;
17611
17659
  }
17612
17660
 
17613
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/transform_two_way_binding_set.mjs
17661
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/transform_two_way_binding_set.mjs
17614
17662
  function transformTwoWayBindingSet(job) {
17615
17663
  for (const unit of job.units) {
17616
17664
  for (const op of unit.create) {
@@ -17660,7 +17708,7 @@ function wrapAction(target, value) {
17660
17708
  throw new Error(`Unsupported expression in two-way action binding.`);
17661
17709
  }
17662
17710
 
17663
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
17711
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
17664
17712
  function saveAndRestoreView(job) {
17665
17713
  for (const unit of job.units) {
17666
17714
  unit.create.prepend([
@@ -17705,7 +17753,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
17705
17753
  }
17706
17754
  }
17707
17755
 
17708
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
17756
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
17709
17757
  function allocateSlots(job) {
17710
17758
  const slotMap = /* @__PURE__ */ new Map();
17711
17759
  for (const unit of job.units) {
@@ -17730,7 +17778,7 @@ function allocateSlots(job) {
17730
17778
  }
17731
17779
  }
17732
17780
 
17733
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
17781
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
17734
17782
  function specializeStyleBindings(job) {
17735
17783
  for (const unit of job.units) {
17736
17784
  for (const op of unit.update) {
@@ -17760,7 +17808,7 @@ function specializeStyleBindings(job) {
17760
17808
  }
17761
17809
  }
17762
17810
 
17763
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
17811
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
17764
17812
  function generateTemporaryVariables(job) {
17765
17813
  for (const unit of job.units) {
17766
17814
  unit.create.prepend(generateTemporaries(unit.create));
@@ -17818,7 +17866,7 @@ function assignName(names, expr) {
17818
17866
  expr.name = name;
17819
17867
  }
17820
17868
 
17821
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
17869
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
17822
17870
  function generateTrackFns(job) {
17823
17871
  for (const unit of job.units) {
17824
17872
  for (const op of unit.create) {
@@ -17851,7 +17899,7 @@ function generateTrackFns(job) {
17851
17899
  }
17852
17900
  }
17853
17901
 
17854
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
17902
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
17855
17903
  function optimizeTrackFns(job) {
17856
17904
  for (const unit of job.units) {
17857
17905
  for (const op of unit.create) {
@@ -17863,6 +17911,7 @@ function optimizeTrackFns(job) {
17863
17911
  } else if (op.track instanceof ReadVarExpr && op.track.name === "$item") {
17864
17912
  op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);
17865
17913
  } else if (isTrackByFunctionCall(job.root.xref, op.track)) {
17914
+ op.usesComponentInstance = true;
17866
17915
  if (op.track.receiver.receiver.view === unit.xref) {
17867
17916
  op.trackByFn = op.track.receiver;
17868
17917
  } else {
@@ -17898,7 +17947,7 @@ function isTrackByFunctionCall(rootView, expr) {
17898
17947
  return true;
17899
17948
  }
17900
17949
 
17901
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
17950
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
17902
17951
  function generateTrackVariables(job) {
17903
17952
  for (const unit of job.units) {
17904
17953
  for (const op of unit.create) {
@@ -17907,7 +17956,7 @@ function generateTrackVariables(job) {
17907
17956
  }
17908
17957
  op.track = transformExpressionsInExpression(op.track, (expr) => {
17909
17958
  if (expr instanceof LexicalReadExpr) {
17910
- if (expr.name === op.varNames.$index) {
17959
+ if (op.varNames.$index.has(expr.name)) {
17911
17960
  return variable("$index");
17912
17961
  } else if (expr.name === op.varNames.$implicit) {
17913
17962
  return variable("$item");
@@ -17919,7 +17968,7 @@ function generateTrackVariables(job) {
17919
17968
  }
17920
17969
  }
17921
17970
 
17922
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
17971
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
17923
17972
  function countVariables(job) {
17924
17973
  for (const unit of job.units) {
17925
17974
  let varCount = 0;
@@ -18029,7 +18078,7 @@ function isSingletonInterpolation(expr) {
18029
18078
  return true;
18030
18079
  }
18031
18080
 
18032
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
18081
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
18033
18082
  function optimizeVariables(job) {
18034
18083
  for (const unit of job.units) {
18035
18084
  inlineAlwaysInlineVariables(unit.create);
@@ -18278,7 +18327,7 @@ function allowConservativeInlining(decl, target) {
18278
18327
  }
18279
18328
  }
18280
18329
 
18281
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
18330
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
18282
18331
  function wrapI18nIcus(job) {
18283
18332
  for (const unit of job.units) {
18284
18333
  let currentI18nOp = null;
@@ -18308,7 +18357,7 @@ function wrapI18nIcus(job) {
18308
18357
  }
18309
18358
  }
18310
18359
 
18311
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
18360
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
18312
18361
  var phases = [
18313
18362
  { kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
18314
18363
  { kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
@@ -18474,7 +18523,7 @@ function emitHostBindingFunction(job) {
18474
18523
  );
18475
18524
  }
18476
18525
 
18477
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
18526
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
18478
18527
  var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
18479
18528
  var domSchema = new DomElementSchemaRegistry();
18480
18529
  var NG_TEMPLATE_TAG_NAME = "ng-template";
@@ -18624,10 +18673,17 @@ function ingestTemplate(unit, tmpl) {
18624
18673
  }
18625
18674
  }
18626
18675
  function ingestContent(unit, content) {
18676
+ var _a2;
18627
18677
  if (content.i18n !== void 0 && !(content.i18n instanceof TagPlaceholder)) {
18628
18678
  throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);
18629
18679
  }
18630
- const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, content.sourceSpan);
18680
+ const id = unit.job.allocateXrefId();
18681
+ let fallbackView = null;
18682
+ if (content.children.some((child) => !(child instanceof Comment) && (!(child instanceof Text) || child.value.trim().length > 0))) {
18683
+ fallbackView = unit.job.allocateView(unit.xref);
18684
+ ingestNodes(fallbackView, content.children);
18685
+ }
18686
+ const op = createProjectionOp(id, content.selector, content.i18n, (_a2 = fallbackView == null ? void 0 : fallbackView.xref) != null ? _a2 : null, content.sourceSpan);
18631
18687
  for (const attr of content.attributes) {
18632
18688
  const securityContext = domSchema.securityContext(content.name, attr.name, true);
18633
18689
  unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
@@ -18666,10 +18722,7 @@ function ingestIfBlock(unit, ifBlock) {
18666
18722
  for (let i = 0; i < ifBlock.branches.length; i++) {
18667
18723
  const ifCase = ifBlock.branches[i];
18668
18724
  const cView = unit.job.allocateView(unit.xref);
18669
- let tagName = null;
18670
- if (i === 0) {
18671
- tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);
18672
- }
18725
+ const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);
18673
18726
  if (ifCase.expressionAlias !== null) {
18674
18727
  cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);
18675
18728
  }
@@ -18704,6 +18757,7 @@ function ingestSwitchBlock(unit, switchBlock) {
18704
18757
  let conditions = [];
18705
18758
  for (const switchCase of switchBlock.cases) {
18706
18759
  const cView = unit.job.allocateView(unit.xref);
18760
+ const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, switchCase);
18707
18761
  let switchCaseI18nMeta = void 0;
18708
18762
  if (switchCase.i18n !== void 0) {
18709
18763
  if (!(switchCase.i18n instanceof BlockPlaceholder)) {
@@ -18711,7 +18765,7 @@ function ingestSwitchBlock(unit, switchBlock) {
18711
18765
  }
18712
18766
  switchCaseI18nMeta = switchCase.i18n;
18713
18767
  }
18714
- const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);
18768
+ const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);
18715
18769
  unit.create.push(templateOp);
18716
18770
  if (firstXref === null) {
18717
18771
  firstXref = cView.xref;
@@ -18845,37 +18899,27 @@ function ingestIcu(unit, icu) {
18845
18899
  function ingestForBlock(unit, forBlock) {
18846
18900
  var _a2, _b2, _c2;
18847
18901
  const repeaterView = unit.job.allocateView(unit.xref);
18902
+ const indexName = `\u0275$index_${repeaterView.xref}`;
18903
+ const countName = `\u0275$count_${repeaterView.xref}`;
18904
+ const indexVarNames = /* @__PURE__ */ new Set();
18848
18905
  repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
18849
- repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
18850
- repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
18851
- const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
18852
- const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
18853
- repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
18854
- repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
18855
- repeaterView.aliases.add({
18856
- kind: SemanticVariableKind.Alias,
18857
- name: null,
18858
- identifier: forBlock.contextVariables.$first.name,
18859
- expression: new LexicalReadExpr(indexName).identical(literal(0))
18860
- });
18861
- repeaterView.aliases.add({
18862
- kind: SemanticVariableKind.Alias,
18863
- name: null,
18864
- identifier: forBlock.contextVariables.$last.name,
18865
- expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
18866
- });
18867
- repeaterView.aliases.add({
18868
- kind: SemanticVariableKind.Alias,
18869
- name: null,
18870
- identifier: forBlock.contextVariables.$even.name,
18871
- expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
18872
- });
18873
- repeaterView.aliases.add({
18874
- kind: SemanticVariableKind.Alias,
18875
- name: null,
18876
- identifier: forBlock.contextVariables.$odd.name,
18877
- expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
18878
- });
18906
+ for (const variable2 of forBlock.contextVariables) {
18907
+ if (variable2.value === "$index") {
18908
+ indexVarNames.add(variable2.name);
18909
+ }
18910
+ if (variable2.name === "$index") {
18911
+ repeaterView.contextVariables.set("$index", variable2.value).set(indexName, variable2.value);
18912
+ } else if (variable2.name === "$count") {
18913
+ repeaterView.contextVariables.set("$count", variable2.value).set(countName, variable2.value);
18914
+ } else {
18915
+ repeaterView.aliases.add({
18916
+ kind: SemanticVariableKind.Alias,
18917
+ name: null,
18918
+ identifier: variable2.name,
18919
+ expression: getComputedForLoopVariableExpression(variable2, indexName, countName)
18920
+ });
18921
+ }
18922
+ }
18879
18923
  const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
18880
18924
  const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
18881
18925
  ingestNodes(repeaterView, forBlock.children);
@@ -18887,12 +18931,7 @@ function ingestForBlock(unit, forBlock) {
18887
18931
  emptyTagName = ingestControlFlowInsertionPoint(unit, emptyView.xref, forBlock.empty);
18888
18932
  }
18889
18933
  const varNames = {
18890
- $index: forBlock.contextVariables.$index.name,
18891
- $count: forBlock.contextVariables.$count.name,
18892
- $first: forBlock.contextVariables.$first.name,
18893
- $last: forBlock.contextVariables.$last.name,
18894
- $even: forBlock.contextVariables.$even.name,
18895
- $odd: forBlock.contextVariables.$odd.name,
18934
+ $index: indexVarNames,
18896
18935
  $implicit: forBlock.item.name
18897
18936
  };
18898
18937
  if (forBlock.i18n !== void 0 && !(forBlock.i18n instanceof BlockPlaceholder)) {
@@ -18910,6 +18949,24 @@ function ingestForBlock(unit, forBlock) {
18910
18949
  const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
18911
18950
  unit.update.push(repeater2);
18912
18951
  }
18952
+ function getComputedForLoopVariableExpression(variable2, indexName, countName) {
18953
+ switch (variable2.value) {
18954
+ case "$index":
18955
+ return new LexicalReadExpr(indexName);
18956
+ case "$count":
18957
+ return new LexicalReadExpr(countName);
18958
+ case "$first":
18959
+ return new LexicalReadExpr(indexName).identical(literal(0));
18960
+ case "$last":
18961
+ return new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)));
18962
+ case "$even":
18963
+ return new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0));
18964
+ case "$odd":
18965
+ return new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0));
18966
+ default:
18967
+ throw new Error(`AssertionError: unknown @for loop variable ${variable2.value}`);
18968
+ }
18969
+ }
18913
18970
  function convertAst(ast, job, baseSourceSpan) {
18914
18971
  if (ast instanceof ASTWithSource) {
18915
18972
  return convertAst(ast.ast, job, baseSourceSpan);
@@ -19211,7 +19268,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
19211
19268
  return null;
19212
19269
  }
19213
19270
 
19214
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
19271
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
19215
19272
  function renderFlagCheckIfStmt(flags, statements) {
19216
19273
  return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
19217
19274
  }
@@ -19331,7 +19388,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
19331
19388
  ], INFERRED_TYPE, null, contentQueriesFnName);
19332
19389
  }
19333
19390
 
19334
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
19391
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
19335
19392
  var HtmlParser = class extends Parser2 {
19336
19393
  constructor() {
19337
19394
  super(getHtmlTagDefinition);
@@ -19341,7 +19398,7 @@ var HtmlParser = class extends Parser2 {
19341
19398
  }
19342
19399
  };
19343
19400
 
19344
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
19401
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
19345
19402
  var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
19346
19403
  var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
19347
19404
  var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
@@ -19407,7 +19464,7 @@ function visitAllWithSiblings(visitor, nodes) {
19407
19464
  return result;
19408
19465
  }
19409
19466
 
19410
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
19467
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
19411
19468
  var PROPERTY_PARTS_SEPARATOR = ".";
19412
19469
  var ATTRIBUTE_PREFIX = "attr";
19413
19470
  var CLASS_PREFIX = "class";
@@ -19748,7 +19805,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
19748
19805
  return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
19749
19806
  }
19750
19807
 
19751
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
19808
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
19752
19809
  function isStyleUrlResolvable(url) {
19753
19810
  if (url == null || url.length === 0 || url[0] == "/")
19754
19811
  return false;
@@ -19757,7 +19814,7 @@ function isStyleUrlResolvable(url) {
19757
19814
  }
19758
19815
  var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
19759
19816
 
19760
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
19817
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
19761
19818
  var NG_CONTENT_SELECT_ATTR = "select";
19762
19819
  var LINK_ELEMENT = "link";
19763
19820
  var LINK_STYLE_REL_ATTR = "rel";
@@ -19827,7 +19884,7 @@ function normalizeNgContentSelect(selectAttr) {
19827
19884
  return selectAttr;
19828
19885
  }
19829
19886
 
19830
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
19887
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
19831
19888
  var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
19832
19889
  var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
19833
19890
  var CONDITIONAL_ALIAS_PATTERN = /^(as\s)+(.*)/;
@@ -19945,19 +20002,25 @@ function parseForLoopParameters(block, errors, bindingParser) {
19945
20002
  return null;
19946
20003
  }
19947
20004
  const [, itemName, rawExpression] = match;
20005
+ if (ALLOWED_FOR_LOOP_LET_VARIABLES.has(itemName)) {
20006
+ errors.push(new ParseError(expressionParam.sourceSpan, `@for loop item name cannot be one of ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(", ")}.`));
20007
+ }
19948
20008
  const variableName = expressionParam.expression.split(" ")[0];
19949
20009
  const variableSpan = new ParseSourceSpan(expressionParam.sourceSpan.start, expressionParam.sourceSpan.start.moveBy(variableName.length));
19950
20010
  const result = {
19951
20011
  itemName: new Variable(itemName, "$implicit", variableSpan, variableSpan),
19952
20012
  trackBy: null,
19953
20013
  expression: parseBlockParameterToBinding(expressionParam, bindingParser, rawExpression),
19954
- context: {}
20014
+ context: Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES, (variableName2) => {
20015
+ const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);
20016
+ return new Variable(variableName2, variableName2, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);
20017
+ })
19955
20018
  };
19956
20019
  for (const param of secondaryParams) {
19957
20020
  const letMatch = param.expression.match(FOR_LOOP_LET_PATTERN);
19958
20021
  if (letMatch !== null) {
19959
20022
  const variablesSpan = new ParseSourceSpan(param.sourceSpan.start.moveBy(letMatch[0].length - letMatch[1].length), param.sourceSpan.end);
19960
- parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, result.context, errors);
20023
+ parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, itemName, result.context, errors);
19961
20024
  continue;
19962
20025
  }
19963
20026
  const trackMatch = param.expression.match(FOR_LOOP_TRACK_PATTERN);
@@ -19976,15 +20039,9 @@ function parseForLoopParameters(block, errors, bindingParser) {
19976
20039
  }
19977
20040
  errors.push(new ParseError(param.sourceSpan, `Unrecognized @for loop paramater "${param.expression}"`));
19978
20041
  }
19979
- for (const variableName2 of ALLOWED_FOR_LOOP_LET_VARIABLES) {
19980
- if (!result.context.hasOwnProperty(variableName2)) {
19981
- const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);
19982
- result.context[variableName2] = new Variable(variableName2, variableName2, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);
19983
- }
19984
- }
19985
20042
  return result;
19986
20043
  }
19987
- function parseLetParameter(sourceSpan, expression, span, context, errors) {
20044
+ function parseLetParameter(sourceSpan, expression, span, loopItemName, context, errors) {
19988
20045
  var _a2, _b2, _c2;
19989
20046
  const parts = expression.split(",");
19990
20047
  let startSpan = span.start;
@@ -19996,7 +20053,9 @@ function parseLetParameter(sourceSpan, expression, span, context, errors) {
19996
20053
  errors.push(new ParseError(sourceSpan, `Invalid @for loop "let" parameter. Parameter should match the pattern "<name> = <variable name>"`));
19997
20054
  } else if (!ALLOWED_FOR_LOOP_LET_VARIABLES.has(variableName)) {
19998
20055
  errors.push(new ParseError(sourceSpan, `Unknown "let" parameter variable "${variableName}". The allowed variables are: ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(", ")}`));
19999
- } else if (context.hasOwnProperty(variableName)) {
20056
+ } else if (name === loopItemName) {
20057
+ errors.push(new ParseError(sourceSpan, `Invalid @for loop "let" parameter. Variable cannot be called "${loopItemName}"`));
20058
+ } else if (context.some((v) => v.name === name)) {
20000
20059
  errors.push(new ParseError(sourceSpan, `Duplicate "let" parameter variable "${variableName}"`));
20001
20060
  } else {
20002
20061
  const [, keyLeadingWhitespace, keyName] = (_a2 = expressionParts[0].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN)) != null ? _a2 : [];
@@ -20010,7 +20069,7 @@ function parseLetParameter(sourceSpan, expression, span, context, errors) {
20010
20069
  valueSpan = valueLeadingWhitespace !== void 0 ? new ParseSourceSpan(startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length), startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length + implicit.length)) : void 0;
20011
20070
  }
20012
20071
  const sourceSpan2 = new ParseSourceSpan(keySpan.start, (_c2 = valueSpan == null ? void 0 : valueSpan.end) != null ? _c2 : keySpan.end);
20013
- context[variableName] = new Variable(name, variableName, sourceSpan2, keySpan, valueSpan);
20072
+ context.push(new Variable(name, variableName, sourceSpan2, keySpan, valueSpan));
20014
20073
  }
20015
20074
  startSpan = startSpan.moveBy(part.length + 1);
20016
20075
  }
@@ -20141,7 +20200,7 @@ function stripOptionalParentheses(param, errors) {
20141
20200
  return expression.slice(start, end);
20142
20201
  }
20143
20202
 
20144
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
20203
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
20145
20204
  var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
20146
20205
  var SEPARATOR_PATTERN = /^\s$/;
20147
20206
  var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
@@ -20405,7 +20464,7 @@ function parseDeferredTime(value) {
20405
20464
  return parseFloat(time) * (units === "s" ? 1e3 : 1);
20406
20465
  }
20407
20466
 
20408
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
20467
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
20409
20468
  var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
20410
20469
  var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
20411
20470
  var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
@@ -20540,7 +20599,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
20540
20599
  return { triggers, prefetchTriggers };
20541
20600
  }
20542
20601
 
20543
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
20602
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
20544
20603
  var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
20545
20604
  var KW_BIND_IDX = 1;
20546
20605
  var KW_LET_IDX = 2;
@@ -20648,12 +20707,9 @@ var HtmlAstToIvyAst = class {
20648
20707
  }
20649
20708
  let parsedElement;
20650
20709
  if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
20651
- if (element2.children && !element2.children.every((node) => isEmptyTextNode(node) || isCommentNode(node))) {
20652
- this.reportError(`<ng-content> element cannot have content.`, element2.sourceSpan);
20653
- }
20654
20710
  const selector = preparsedElement.selectAttr;
20655
20711
  const attrs = element2.attrs.map((attr) => this.visitAttribute(attr));
20656
- parsedElement = new Content(selector, attrs, element2.sourceSpan, element2.i18n);
20712
+ parsedElement = new Content(selector, attrs, children, element2.sourceSpan, element2.i18n);
20657
20713
  this.ngContentSelectors.push(selector);
20658
20714
  } else if (isTemplateElement) {
20659
20715
  const attrs = this.extractAttributes(element2.name, parsedProperties, i18nAttrsMeta);
@@ -20957,12 +21013,6 @@ function normalizeAttributeName(attrName) {
20957
21013
  function addEvents(events, boundEvents) {
20958
21014
  boundEvents.push(...events.map((e) => BoundEvent.fromParsedEvent(e)));
20959
21015
  }
20960
- function isEmptyTextNode(node) {
20961
- return node instanceof Text4 && node.value.trim().length == 0;
20962
- }
20963
- function isCommentNode(node) {
20964
- return node instanceof Comment2;
20965
- }
20966
21016
  function textContents(node) {
20967
21017
  if (node.children.length !== 1 || !(node.children[0] instanceof Text4)) {
20968
21018
  return null;
@@ -20971,7 +21021,7 @@ function textContents(node) {
20971
21021
  }
20972
21022
  }
20973
21023
 
20974
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
21024
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
20975
21025
  var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
20976
21026
  function parseTemplate(template2, templateUrl, options = {}) {
20977
21027
  var _a2;
@@ -21045,7 +21095,7 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
21045
21095
  return new BindingParser(new Parser(new Lexer()), interpolationConfig, elementRegistry, []);
21046
21096
  }
21047
21097
 
21048
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
21098
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
21049
21099
  var COMPONENT_VARIABLE = "%COMP%";
21050
21100
  var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
21051
21101
  var CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
@@ -21139,7 +21189,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
21139
21189
  let allDeferrableDepsFn = null;
21140
21190
  if (meta.defer.mode === 1 && meta.defer.dependenciesFn !== null) {
21141
21191
  const fnName = `${templateTypeName}_DeferFn`;
21142
- constantPool.statements.push(meta.defer.dependenciesFn.toDeclStmt(fnName, StmtModifier.Final));
21192
+ constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, void 0, StmtModifier.Final));
21143
21193
  allDeferrableDepsFn = variable(fnName);
21144
21194
  }
21145
21195
  const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn);
@@ -21407,7 +21457,7 @@ function createHostDirectivesMappingArray(mapping) {
21407
21457
  return elements.length > 0 ? literalArr(elements) : null;
21408
21458
  }
21409
21459
 
21410
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
21460
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
21411
21461
  var R3TargetBinder = class {
21412
21462
  constructor(directiveMatcher) {
21413
21463
  this.directiveMatcher = directiveMatcher;
@@ -21451,9 +21501,9 @@ var Scope2 = class {
21451
21501
  nodeOrNodes.children.forEach((node) => node.visit(this));
21452
21502
  } else if (nodeOrNodes instanceof ForLoopBlock) {
21453
21503
  this.visitVariable(nodeOrNodes.item);
21454
- Object.values(nodeOrNodes.contextVariables).forEach((v) => this.visitVariable(v));
21504
+ nodeOrNodes.contextVariables.forEach((v) => this.visitVariable(v));
21455
21505
  nodeOrNodes.children.forEach((node) => node.visit(this));
21456
- } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading) {
21506
+ } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
21457
21507
  nodeOrNodes.children.forEach((node) => node.visit(this));
21458
21508
  } else {
21459
21509
  nodeOrNodes.forEach((node) => node.visit(this));
@@ -21511,6 +21561,7 @@ var Scope2 = class {
21511
21561
  this.ingestScopedNode(block);
21512
21562
  }
21513
21563
  visitContent(content) {
21564
+ this.ingestScopedNode(content);
21514
21565
  }
21515
21566
  visitBoundAttribute(attr) {
21516
21567
  }
@@ -21649,7 +21700,7 @@ var DirectiveBinder = class {
21649
21700
  visitForLoopBlock(block) {
21650
21701
  var _a2;
21651
21702
  block.item.visit(this);
21652
- Object.values(block.contextVariables).forEach((v) => v.visit(this));
21703
+ block.contextVariables.forEach((v) => v.visit(this));
21653
21704
  block.children.forEach((node) => node.visit(this));
21654
21705
  (_a2 = block.empty) == null ? void 0 : _a2.visit(this);
21655
21706
  }
@@ -21665,6 +21716,7 @@ var DirectiveBinder = class {
21665
21716
  block.children.forEach((node) => node.visit(this));
21666
21717
  }
21667
21718
  visitContent(content) {
21719
+ content.children.forEach((child) => child.visit(this));
21668
21720
  }
21669
21721
  visitVariable(variable2) {
21670
21722
  }
@@ -21717,7 +21769,7 @@ var TemplateBinder = class extends RecursiveAstVisitor {
21717
21769
  const usedPipes = /* @__PURE__ */ new Set();
21718
21770
  const eagerPipes = /* @__PURE__ */ new Set();
21719
21771
  const template2 = nodes instanceof Template ? nodes : null;
21720
- const deferBlocks = /* @__PURE__ */ new Map();
21772
+ const deferBlocks = [];
21721
21773
  const binder = new TemplateBinder(expressions, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template2, 0);
21722
21774
  binder.ingest(nodes);
21723
21775
  return { expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks };
@@ -21735,7 +21787,7 @@ var TemplateBinder = class extends RecursiveAstVisitor {
21735
21787
  this.nestingLevel.set(nodeOrNodes, this.level);
21736
21788
  } else if (nodeOrNodes instanceof ForLoopBlock) {
21737
21789
  this.visitNode(nodeOrNodes.item);
21738
- Object.values(nodeOrNodes.contextVariables).forEach((v) => this.visitNode(v));
21790
+ nodeOrNodes.contextVariables.forEach((v) => this.visitNode(v));
21739
21791
  nodeOrNodes.trackBy.visit(this);
21740
21792
  nodeOrNodes.children.forEach(this.visitNode);
21741
21793
  this.nestingLevel.set(nodeOrNodes, this.level);
@@ -21743,10 +21795,10 @@ var TemplateBinder = class extends RecursiveAstVisitor {
21743
21795
  if (this.scope.rootNode !== nodeOrNodes) {
21744
21796
  throw new Error(`Assertion error: resolved incorrect scope for deferred block ${nodeOrNodes}`);
21745
21797
  }
21746
- this.deferBlocks.set(nodeOrNodes, this.scope);
21798
+ this.deferBlocks.push([nodeOrNodes, this.scope]);
21747
21799
  nodeOrNodes.children.forEach((node) => node.visit(this));
21748
21800
  this.nestingLevel.set(nodeOrNodes, this.level);
21749
- } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading) {
21801
+ } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
21750
21802
  nodeOrNodes.children.forEach((node) => node.visit(this));
21751
21803
  this.nestingLevel.set(nodeOrNodes, this.level);
21752
21804
  } else {
@@ -21778,8 +21830,6 @@ var TemplateBinder = class extends RecursiveAstVisitor {
21778
21830
  }
21779
21831
  visitText(text2) {
21780
21832
  }
21781
- visitContent(content) {
21782
- }
21783
21833
  visitTextAttribute(attribute2) {
21784
21834
  }
21785
21835
  visitUnknownBlock(block) {
@@ -21840,6 +21890,9 @@ var TemplateBinder = class extends RecursiveAstVisitor {
21840
21890
  (_a2 = block.expression) == null ? void 0 : _a2.visit(this);
21841
21891
  this.ingestScopedNode(block);
21842
21892
  }
21893
+ visitContent(content) {
21894
+ this.ingestScopedNode(content);
21895
+ }
21843
21896
  visitBoundText(text2) {
21844
21897
  text2.value.visit(this);
21845
21898
  }
@@ -21878,7 +21931,7 @@ var TemplateBinder = class extends RecursiveAstVisitor {
21878
21931
  }
21879
21932
  };
21880
21933
  var R3BoundTarget = class {
21881
- constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks) {
21934
+ constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {
21882
21935
  this.target = target;
21883
21936
  this.directives = directives;
21884
21937
  this.eagerDirectives = eagerDirectives;
@@ -21890,7 +21943,8 @@ var R3BoundTarget = class {
21890
21943
  this.scopedNodeEntities = scopedNodeEntities;
21891
21944
  this.usedPipes = usedPipes;
21892
21945
  this.eagerPipes = eagerPipes;
21893
- this.deferBlocks = deferBlocks;
21946
+ this.deferredBlocks = rawDeferred.map((current) => current[0]);
21947
+ this.deferredScopes = new Map(rawDeferred);
21894
21948
  }
21895
21949
  getEntitiesInScope(node) {
21896
21950
  var _a2;
@@ -21930,7 +21984,7 @@ var R3BoundTarget = class {
21930
21984
  return Array.from(this.eagerPipes);
21931
21985
  }
21932
21986
  getDeferBlocks() {
21933
- return Array.from(this.deferBlocks.keys());
21987
+ return this.deferredBlocks;
21934
21988
  }
21935
21989
  getDeferredTriggerTarget(block, trigger) {
21936
21990
  if (!(trigger instanceof InteractionDeferredTrigger) && !(trigger instanceof ViewportDeferredTrigger) && !(trigger instanceof HoverDeferredTrigger)) {
@@ -21971,8 +22025,11 @@ var R3BoundTarget = class {
21971
22025
  return null;
21972
22026
  }
21973
22027
  isDeferred(element2) {
21974
- for (const deferredScope of this.deferBlocks.values()) {
21975
- const stack = [deferredScope];
22028
+ for (const block of this.deferredBlocks) {
22029
+ if (!this.deferredScopes.has(block)) {
22030
+ continue;
22031
+ }
22032
+ const stack = [this.deferredScopes.get(block)];
21976
22033
  while (stack.length > 0) {
21977
22034
  const current = stack.pop();
21978
22035
  if (current.elementsInScope.has(element2)) {
@@ -21985,9 +22042,9 @@ var R3BoundTarget = class {
21985
22042
  }
21986
22043
  findEntityInScope(rootNode, name) {
21987
22044
  const entities = this.getEntitiesInScope(rootNode);
21988
- for (const entitity of entities) {
21989
- if (entitity.name === name) {
21990
- return entitity;
22045
+ for (const entity of entities) {
22046
+ if (entity.name === name) {
22047
+ return entity;
21991
22048
  }
21992
22049
  }
21993
22050
  return null;
@@ -22033,11 +22090,11 @@ function extractScopedNodeEntities(rootScope) {
22033
22090
  return templateEntities;
22034
22091
  }
22035
22092
 
22036
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
22093
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/resource_loader.mjs
22037
22094
  var ResourceLoader = class {
22038
22095
  };
22039
22096
 
22040
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
22097
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
22041
22098
  var CompilerFacadeImpl = class {
22042
22099
  constructor(jitEvaluator = new JitEvaluator()) {
22043
22100
  this.jitEvaluator = jitEvaluator;
@@ -22153,7 +22210,7 @@ var CompilerFacadeImpl = class {
22153
22210
  }
22154
22211
  compileComponent(angularCoreEnv, sourceMapUrl, facade) {
22155
22212
  var _a2;
22156
- const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);
22213
+ const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation, void 0);
22157
22214
  const meta = __spreadProps(__spreadValues(__spreadValues({}, facade), convertDirectiveFacadeToMetadata(facade)), {
22158
22215
  selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),
22159
22216
  template: template2,
@@ -22342,7 +22399,7 @@ function convertOpaqueValuesToExpressions(obj) {
22342
22399
  }
22343
22400
  function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {
22344
22401
  var _a2, _b2, _c2, _d2;
22345
- const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, (_a2 = decl.preserveWhitespaces) != null ? _a2 : false, decl.interpolation);
22402
+ const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, (_a2 = decl.preserveWhitespaces) != null ? _a2 : false, decl.interpolation, decl.deferBlockDependencies);
22346
22403
  const declarations = [];
22347
22404
  if (decl.dependencies) {
22348
22405
  for (const innerDep of decl.dependencies) {
@@ -22412,7 +22469,7 @@ function convertPipeDeclarationToMetadata(pipe2) {
22412
22469
  type: new WrappedNodeExpr(pipe2.type)
22413
22470
  };
22414
22471
  }
22415
- function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
22472
+ function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation, deferBlockDependencies) {
22416
22473
  const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
22417
22474
  const parsed = parseTemplate(template2, sourceMapUrl, { preserveWhitespaces, interpolationConfig });
22418
22475
  if (parsed.errors !== null) {
@@ -22424,7 +22481,7 @@ function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces
22424
22481
  return {
22425
22482
  template: parsed,
22426
22483
  interpolation: interpolationConfig,
22427
- defer: createR3ComponentDeferMetadata(boundTarget)
22484
+ defer: createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies)
22428
22485
  };
22429
22486
  }
22430
22487
  function convertToProviderExpression(obj, property2) {
@@ -22464,11 +22521,12 @@ function createR3DependencyMetadata(token, isAttributeDep, host, optional, self,
22464
22521
  const attributeNameType = isAttributeDep ? literal("unknown") : null;
22465
22522
  return { token, attributeNameType, host, optional, self, skipSelf };
22466
22523
  }
22467
- function createR3ComponentDeferMetadata(boundTarget) {
22524
+ function createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies) {
22468
22525
  const deferredBlocks = boundTarget.getDeferBlocks();
22469
22526
  const blocks = /* @__PURE__ */ new Map();
22470
- for (const block of deferredBlocks) {
22471
- blocks.set(block, null);
22527
+ for (let i = 0; i < deferredBlocks.length; i++) {
22528
+ const dependencyFn = deferBlockDependencies == null ? void 0 : deferBlockDependencies[i];
22529
+ blocks.set(deferredBlocks[i], dependencyFn ? new WrappedNodeExpr(dependencyFn) : null);
22472
22530
  }
22473
22531
  return { mode: 0, blocks };
22474
22532
  }
@@ -22597,17 +22655,17 @@ function publishFacade(global) {
22597
22655
  ng.\u0275compilerFacade = new CompilerFacadeImpl();
22598
22656
  }
22599
22657
 
22600
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
22601
- var VERSION2 = new Version("18.0.0-next.1");
22658
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
22659
+ var VERSION2 = new Version("18.0.0-next.3");
22602
22660
 
22603
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
22661
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
22604
22662
  var _VisitorMode;
22605
22663
  (function(_VisitorMode2) {
22606
22664
  _VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
22607
22665
  _VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
22608
22666
  })(_VisitorMode || (_VisitorMode = {}));
22609
22667
 
22610
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
22668
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
22611
22669
  var XmlTagDefinition = class {
22612
22670
  constructor() {
22613
22671
  this.closedByParent = false;
@@ -22629,7 +22687,7 @@ var XmlTagDefinition = class {
22629
22687
  };
22630
22688
  var _TAG_DEFINITION = new XmlTagDefinition();
22631
22689
 
22632
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
22690
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
22633
22691
  var FactoryTarget2;
22634
22692
  (function(FactoryTarget3) {
22635
22693
  FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
@@ -22639,10 +22697,10 @@ var FactoryTarget2;
22639
22697
  FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
22640
22698
  })(FactoryTarget2 || (FactoryTarget2 = {}));
22641
22699
 
22642
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
22700
+ // bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler.mjs
22643
22701
  publishFacade(_global);
22644
22702
 
22645
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
22703
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
22646
22704
  var import_path2 = require("path");
22647
22705
  var import_typescript3 = __toESM(require("typescript"), 1);
22648
22706
  var REPLACEMENTS2 = {
@@ -22750,7 +22808,7 @@ function forEachClass(sourceFile, callback) {
22750
22808
  });
22751
22809
  }
22752
22810
 
22753
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
22811
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
22754
22812
  function block_template_entities_default() {
22755
22813
  return (tree) => __async(this, null, function* () {
22756
22814
  const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);