@angular/compiler-cli 13.1.1 → 13.1.2

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 (85) hide show
  1. package/bundles/{chunk-KWZNY2SK.js → chunk-5TY44ZS3.js} +96 -98
  2. package/bundles/chunk-5TY44ZS3.js.map +6 -0
  3. package/bundles/{chunk-TI3THPMZ.js → chunk-676MI6WZ.js} +39 -60
  4. package/bundles/chunk-676MI6WZ.js.map +6 -0
  5. package/bundles/{chunk-DJRTTRF3.js → chunk-6VRWTEQB.js} +61 -63
  6. package/bundles/chunk-6VRWTEQB.js.map +6 -0
  7. package/bundles/{chunk-X46CEINM.js → chunk-7PY7XEFH.js} +9 -9
  8. package/bundles/chunk-7PY7XEFH.js.map +6 -0
  9. package/bundles/{chunk-AUFNJGZ6.js → chunk-A5PL3TE6.js} +9 -9
  10. package/bundles/chunk-A5PL3TE6.js.map +6 -0
  11. package/bundles/{chunk-PF3ZPGF5.js → chunk-ADHVDA4A.js} +12 -12
  12. package/bundles/{chunk-PF3ZPGF5.js.map → chunk-ADHVDA4A.js.map} +1 -1
  13. package/bundles/{chunk-FXVUPJ6A.js → chunk-FUZ3CSDO.js} +330 -434
  14. package/bundles/chunk-FUZ3CSDO.js.map +6 -0
  15. package/bundles/{chunk-J6CW3T62.js → chunk-GLCRIILX.js} +5 -5
  16. package/bundles/{chunk-J6CW3T62.js.map → chunk-GLCRIILX.js.map} +0 -0
  17. package/bundles/{chunk-W5CGOJQ4.js → chunk-JOLPJ2E4.js} +16 -20
  18. package/bundles/chunk-JOLPJ2E4.js.map +6 -0
  19. package/bundles/{chunk-QFB4WK55.js → chunk-O4XVCXRT.js} +4 -4
  20. package/bundles/{chunk-QFB4WK55.js.map → chunk-O4XVCXRT.js.map} +0 -0
  21. package/bundles/{chunk-O5ZEI3UY.js → chunk-QBU7RUKB.js} +270 -100
  22. package/bundles/chunk-QBU7RUKB.js.map +6 -0
  23. package/bundles/{chunk-BPCUCINV.js → chunk-QDWL7SZJ.js} +2 -2
  24. package/bundles/{chunk-BPCUCINV.js.map → chunk-QDWL7SZJ.js.map} +0 -0
  25. package/bundles/{chunk-JTYUTYS2.js → chunk-SKBLJA43.js} +3 -3
  26. package/bundles/{chunk-JTYUTYS2.js.map → chunk-SKBLJA43.js.map} +0 -0
  27. package/bundles/{chunk-P5ZW5MI4.js → chunk-TUNE6DP3.js} +485 -350
  28. package/bundles/chunk-TUNE6DP3.js.map +6 -0
  29. package/bundles/{chunk-OOIW53QX.js → chunk-UESD6FVI.js} +39 -41
  30. package/bundles/chunk-UESD6FVI.js.map +6 -0
  31. package/bundles/{chunk-XA5IZLLC.js → chunk-WQ3TNYTD.js} +6 -6
  32. package/bundles/{chunk-XA5IZLLC.js.map → chunk-WQ3TNYTD.js.map} +0 -0
  33. package/bundles/index.js +14 -14
  34. package/bundles/index.js.map +1 -1
  35. package/bundles/linker/babel/index.js +85 -85
  36. package/bundles/linker/babel/index.js.map +1 -1
  37. package/bundles/linker/index.js +5 -5
  38. package/bundles/ngcc/index.js +13 -13
  39. package/bundles/ngcc/main-ngcc.js +14 -14
  40. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +14 -14
  41. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +5 -5
  42. package/bundles/private/bazel.js +2 -2
  43. package/bundles/private/localize.js +4 -4
  44. package/bundles/private/migrations.js +6 -6
  45. package/bundles/private/tooling.js +3 -3
  46. package/bundles/src/bin/ng_xi18n.js +11 -11
  47. package/bundles/src/bin/ngc.js +11 -11
  48. package/bundles/src/bin/ngc.js.map +1 -1
  49. package/bundles_metadata.json +1 -1
  50. package/index.d.ts +2 -0
  51. package/ngcc/src/packages/build_marker.d.ts +1 -1
  52. package/package.json +2 -2
  53. package/src/ngtsc/annotations/src/util.d.ts +1 -1
  54. package/src/ngtsc/core/api/src/options.d.ts +3 -2
  55. package/src/ngtsc/core/api/src/public_options.d.ts +38 -0
  56. package/src/ngtsc/diagnostics/index.d.ts +2 -1
  57. package/src/ngtsc/diagnostics/src/error.d.ts +1 -0
  58. package/src/ngtsc/diagnostics/src/error_code.d.ts +7 -0
  59. package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
  60. package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +21 -0
  61. package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -0
  62. package/src/ngtsc/imports/index.d.ts +1 -1
  63. package/src/ngtsc/imports/src/emitter.d.ts +40 -8
  64. package/src/ngtsc/translator/src/translator.d.ts +0 -5
  65. package/src/ngtsc/translator/src/type_translator.d.ts +0 -2
  66. package/src/ngtsc/typecheck/extended/api/api.d.ts +30 -10
  67. package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +3 -14
  68. package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +3 -15
  69. package/src/ngtsc/typecheck/extended/index.d.ts +3 -0
  70. package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +5 -4
  71. package/src/ngtsc/typecheck/src/environment.d.ts +3 -1
  72. package/src/ngtsc/typecheck/src/tcb_util.d.ts +10 -2
  73. package/src/ngtsc/typecheck/src/type_constructor.d.ts +3 -2
  74. package/src/ngtsc/typecheck/src/type_emitter.d.ts +7 -21
  75. package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +2 -2
  76. package/bundles/chunk-AUFNJGZ6.js.map +0 -6
  77. package/bundles/chunk-DJRTTRF3.js.map +0 -6
  78. package/bundles/chunk-FXVUPJ6A.js.map +0 -6
  79. package/bundles/chunk-KWZNY2SK.js.map +0 -6
  80. package/bundles/chunk-O5ZEI3UY.js.map +0 -6
  81. package/bundles/chunk-OOIW53QX.js.map +0 -6
  82. package/bundles/chunk-P5ZW5MI4.js.map +0 -6
  83. package/bundles/chunk-TI3THPMZ.js.map +0 -6
  84. package/bundles/chunk-W5CGOJQ4.js.map +0 -6
  85. package/bundles/chunk-X46CEINM.js.map +0 -6
@@ -4,7 +4,6 @@
4
4
  const __ESM_IMPORT_META_URL__ = import.meta.url;
5
5
 
6
6
  import {
7
- COMPILER_ERRORS_WITH_GUIDES,
8
7
  CompilationMode,
9
8
  ComponentDecoratorHandler,
10
9
  CompoundMetadataReader,
@@ -12,8 +11,6 @@ import {
12
11
  DirectiveDecoratorHandler,
13
12
  DtsMetadataReader,
14
13
  DtsTransformRegistry,
15
- ERROR_DETAILS_PAGE_BASE_URL,
16
- ErrorCode,
17
14
  InjectableClassRegistry,
18
15
  InjectableDecoratorHandler,
19
16
  LocalMetadataRegistry,
@@ -27,20 +24,20 @@ import {
27
24
  aliasTransformFactory,
28
25
  declarationTransformFactory,
29
26
  flattenInheritedDirectiveMetadata,
30
- ivyTransformFactory,
31
- makeDiagnostic,
32
- makeRelatedInformation,
33
- ngErrorCode,
34
- replaceTsWithNgInErrors
35
- } from "./chunk-FXVUPJ6A.js";
27
+ ivyTransformFactory
28
+ } from "./chunk-FUZ3CSDO.js";
36
29
  import {
37
30
  TypeScriptReflectionHost,
38
31
  isNamedClassDeclaration
39
- } from "./chunk-X46CEINM.js";
32
+ } from "./chunk-7PY7XEFH.js";
40
33
  import {
41
34
  AbsoluteModuleStrategy,
42
35
  AliasStrategy,
36
+ COMPILER_ERRORS_WITH_GUIDES,
43
37
  DefaultImportTracker,
38
+ ERROR_DETAILS_PAGE_BASE_URL,
39
+ ErrorCode,
40
+ ExtendedTemplateDiagnosticName,
44
41
  ImportFlags,
45
42
  ImportManager,
46
43
  LocalIdentifierStrategy,
@@ -54,6 +51,7 @@ import {
54
51
  RelativePathStrategy,
55
52
  UnifiedModulesAliasingHost,
56
53
  UnifiedModulesStrategy,
54
+ assertSuccessfulReferenceEmit,
57
55
  getRootDirs,
58
56
  getSourceFileOrNull,
59
57
  getTokenAtPosition,
@@ -62,13 +60,17 @@ import {
62
60
  isDtsPath,
63
61
  isNonDeclarationTsPath,
64
62
  isSymbolWithValueDeclaration,
63
+ makeDiagnostic,
64
+ makeRelatedInformation,
65
+ ngErrorCode,
65
66
  nodeNameForError,
66
67
  normalizeSeparators,
67
68
  relativePathBetween,
69
+ replaceTsWithNgInErrors,
68
70
  toUnredirectedSourceFile,
69
71
  translateExpression,
70
72
  translateType
71
- } from "./chunk-O5ZEI3UY.js";
73
+ } from "./chunk-QBU7RUKB.js";
72
74
  import {
73
75
  LogicalFileSystem,
74
76
  absoluteFrom,
@@ -79,20 +81,20 @@ import {
79
81
  getSourceFileOrError,
80
82
  join,
81
83
  resolve
82
- } from "./chunk-TI3THPMZ.js";
84
+ } from "./chunk-676MI6WZ.js";
83
85
  import {
84
86
  ActivePerfRecorder,
85
87
  DelegatingPerfRecorder,
86
88
  PerfCheckpoint,
87
89
  PerfEvent,
88
90
  PerfPhase
89
- } from "./chunk-J6CW3T62.js";
91
+ } from "./chunk-GLCRIILX.js";
90
92
  import {
91
93
  __spreadProps,
92
94
  __spreadValues
93
- } from "./chunk-XA5IZLLC.js";
95
+ } from "./chunk-WQ3TNYTD.js";
94
96
 
95
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
97
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
96
98
  var DEFAULT_ERROR_CODE = 100;
97
99
  var UNKNOWN_ERROR_CODE = 500;
98
100
  var SOURCE = "angular";
@@ -110,7 +112,7 @@ var EmitFlags;
110
112
  EmitFlags2[EmitFlags2["All"] = 31] = "All";
111
113
  })(EmitFlags || (EmitFlags = {}));
112
114
 
113
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
115
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
114
116
  import ts from "typescript";
115
117
  var wrapHostForTest = null;
116
118
  function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, true) }) {
@@ -120,21 +122,21 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
120
122
  return tsHost;
121
123
  }
122
124
 
123
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
125
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
124
126
  var OptimizeFor;
125
127
  (function(OptimizeFor2) {
126
128
  OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
127
129
  OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
128
130
  })(OptimizeFor || (OptimizeFor = {}));
129
131
 
130
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
132
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
131
133
  var CompletionKind;
132
134
  (function(CompletionKind2) {
133
135
  CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
134
136
  CompletionKind2[CompletionKind2["Variable"] = 1] = "Variable";
135
137
  })(CompletionKind || (CompletionKind = {}));
136
138
 
137
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
139
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
138
140
  var SymbolKind;
139
141
  (function(SymbolKind2) {
140
142
  SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
@@ -150,17 +152,13 @@ var SymbolKind;
150
152
  SymbolKind2[SymbolKind2["Pipe"] = 10] = "Pipe";
151
153
  })(SymbolKind || (SymbolKind = {}));
152
154
 
153
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
155
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
154
156
  import { HtmlParser, MessageBundle } from "@angular/compiler";
155
- import ts35 from "typescript";
157
+ import ts34 from "typescript";
156
158
 
157
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
159
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
158
160
  import { Xliff, Xliff2, Xmb } from "@angular/compiler";
159
- import {
160
- relative,
161
- resolve as resolve2,
162
- sep
163
- } from "path";
161
+ import * as path from "path";
164
162
  function i18nGetExtension(formatName) {
165
163
  const format = formatName.toLowerCase();
166
164
  switch (format) {
@@ -175,7 +173,7 @@ function i18nGetExtension(formatName) {
175
173
  }
176
174
  throw new Error(`Unsupported format "${formatName}"`);
177
175
  }
178
- function i18nExtract(formatName, outFile, host, options, bundle, pathResolve = resolve2) {
176
+ function i18nExtract(formatName, outFile, host, options, bundle, pathResolve = path.resolve) {
179
177
  formatName = formatName || "xlf";
180
178
  const ext = i18nGetExtension(formatName);
181
179
  const content = i18nSerialize(bundle, formatName, options);
@@ -204,15 +202,15 @@ function i18nSerialize(bundle, formatName, options) {
204
202
  }
205
203
  function getPathNormalizer(basePath) {
206
204
  return (sourcePath) => {
207
- sourcePath = basePath ? relative(basePath, sourcePath) : sourcePath;
208
- return sourcePath.split(sep).join("/");
205
+ sourcePath = basePath ? path.relative(basePath, sourcePath) : sourcePath;
206
+ return sourcePath.split(path.sep).join("/");
209
207
  };
210
208
  }
211
209
 
212
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
210
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
213
211
  import ts2 from "typescript";
214
212
 
215
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
213
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
216
214
  function toNumbers(value) {
217
215
  const suffixIndex = value.lastIndexOf("-");
218
216
  return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
@@ -247,7 +245,7 @@ function compareVersions(v1, v2) {
247
245
  return compareNumbers(toNumbers(v1), toNumbers(v2));
248
246
  }
249
247
 
250
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
248
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
251
249
  var MIN_TS_VERSION = "4.4.2";
252
250
  var MAX_TS_VERSION = "4.6.0";
253
251
  var tsVersion = ts2.version;
@@ -260,10 +258,10 @@ function verifySupportedTypeScriptVersion() {
260
258
  checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
261
259
  }
262
260
 
263
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
264
- import ts33 from "typescript";
261
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
262
+ import ts32 from "typescript";
265
263
 
266
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
264
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
267
265
  var CycleAnalyzer = class {
268
266
  constructor(importGraph) {
269
267
  this.importGraph = importGraph;
@@ -334,13 +332,13 @@ var Cycle = class {
334
332
  }
335
333
  };
336
334
 
337
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
335
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
338
336
  import ts3 from "typescript";
339
337
  var ImportGraph = class {
340
338
  constructor(checker, perf) {
341
339
  this.checker = checker;
342
340
  this.perf = perf;
343
- this.imports = new Map();
341
+ this.imports = /* @__PURE__ */ new Map();
344
342
  }
345
343
  importsOf(sf) {
346
344
  if (!this.imports.has(sf)) {
@@ -352,7 +350,7 @@ var ImportGraph = class {
352
350
  if (start === end) {
353
351
  return [start];
354
352
  }
355
- const found = new Set([start]);
353
+ const found = /* @__PURE__ */ new Set([start]);
356
354
  const queue = [new Found(start, null)];
357
355
  while (queue.length > 0) {
358
356
  const current = queue.shift();
@@ -377,7 +375,7 @@ var ImportGraph = class {
377
375
  }
378
376
  scanImports(sf) {
379
377
  return this.perf.inPhase(PerfPhase.CycleDetection, () => {
380
- const imports = new Set();
378
+ const imports = /* @__PURE__ */ new Set();
381
379
  for (const stmt of sf.statements) {
382
380
  if (!ts3.isImportDeclaration(stmt) && !ts3.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
383
381
  continue;
@@ -426,7 +424,7 @@ var Found = class {
426
424
  }
427
425
  };
428
426
 
429
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
427
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
430
428
  import ts4 from "typescript";
431
429
  var FlatIndexGenerator = class {
432
430
  constructor(entryPoint, relativeFlatIndexPath, moduleName) {
@@ -451,7 +449,7 @@ export * from '${relativeEntryPoint}';
451
449
  }
452
450
  };
453
451
 
454
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
452
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
455
453
  function findFlatIndexEntryPoint(rootFiles) {
456
454
  const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
457
455
  let resolvedEntryPoint = null;
@@ -467,11 +465,11 @@ function findFlatIndexEntryPoint(rootFiles) {
467
465
  return resolvedEntryPoint;
468
466
  }
469
467
 
470
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
468
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
471
469
  import ts5 from "typescript";
472
470
  function checkForPrivateExports(entryPoint, checker, refGraph) {
473
471
  const diagnostics = [];
474
- const topLevelExports = new Set();
472
+ const topLevelExports = /* @__PURE__ */ new Set();
475
473
  const moduleSymbol = checker.getSymbolAtLocation(entryPoint);
476
474
  if (moduleSymbol === void 0) {
477
475
  throw new Error(`Internal error: failed to get symbol for entrypoint`);
@@ -486,7 +484,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
486
484
  topLevelExports.add(decl);
487
485
  }
488
486
  });
489
- const checkedSet = new Set();
487
+ const checkedSet = /* @__PURE__ */ new Set();
490
488
  topLevelExports.forEach((mainExport) => {
491
489
  refGraph.transitiveReferencesOf(mainExport).forEach((transitiveReference) => {
492
490
  if (checkedSet.has(transitiveReference)) {
@@ -547,24 +545,24 @@ function getDescriptorOfDeclaration(decl) {
547
545
  }
548
546
  }
549
547
 
550
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
548
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
551
549
  var ReferenceGraph = class {
552
550
  constructor() {
553
- this.references = new Map();
551
+ this.references = /* @__PURE__ */ new Map();
554
552
  }
555
553
  add(from, to) {
556
554
  if (!this.references.has(from)) {
557
- this.references.set(from, new Set());
555
+ this.references.set(from, /* @__PURE__ */ new Set());
558
556
  }
559
557
  this.references.get(from).add(to);
560
558
  }
561
559
  transitiveReferencesOf(target) {
562
- const set = new Set();
560
+ const set = /* @__PURE__ */ new Set();
563
561
  this.collectTransitiveReferences(set, target);
564
562
  return set;
565
563
  }
566
564
  pathFrom(source, target) {
567
- return this.collectPathFrom(source, target, new Set());
565
+ return this.collectPathFrom(source, target, /* @__PURE__ */ new Set());
568
566
  }
569
567
  collectPathFrom(source, target, seen) {
570
568
  if (source === target) {
@@ -601,7 +599,7 @@ var ReferenceGraph = class {
601
599
  }
602
600
  };
603
601
 
604
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
602
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
605
603
  var NgOriginalFile = Symbol("NgOriginalFile");
606
604
  var UpdateMode;
607
605
  (function(UpdateMode2) {
@@ -609,13 +607,13 @@ var UpdateMode;
609
607
  UpdateMode2[UpdateMode2["Incremental"] = 1] = "Incremental";
610
608
  })(UpdateMode || (UpdateMode = {}));
611
609
 
612
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
610
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
613
611
  import ts9 from "typescript";
614
612
 
615
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
613
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
616
614
  import ts6 from "typescript";
617
615
 
618
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
616
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
619
617
  var NgExtension = Symbol("NgExtension");
620
618
  function isExtended(sf) {
621
619
  return sf[NgExtension] !== void 0;
@@ -675,7 +673,7 @@ function retagTsFile(sf) {
675
673
  }
676
674
  }
677
675
 
678
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
676
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
679
677
  var TS_EXTENSIONS = /\.tsx?$/i;
680
678
  function makeShimFileName(fileName, suffix) {
681
679
  return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
@@ -690,15 +688,15 @@ function generatedModuleName(originalModuleName, originalFileName, genSuffix) {
690
688
  return moduleName;
691
689
  }
692
690
 
693
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
691
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
694
692
  var ShimAdapter = class {
695
693
  constructor(delegate, tsRootFiles, topLevelGenerators, perFileGenerators, oldProgram) {
696
694
  this.delegate = delegate;
697
- this.shims = new Map();
698
- this.priorShims = new Map();
699
- this.notShims = new Set();
695
+ this.shims = /* @__PURE__ */ new Map();
696
+ this.priorShims = /* @__PURE__ */ new Map();
697
+ this.notShims = /* @__PURE__ */ new Set();
700
698
  this.generators = [];
701
- this.ignoreForEmit = new Set();
699
+ this.ignoreForEmit = /* @__PURE__ */ new Set();
702
700
  this.extensionPrefixes = [];
703
701
  for (const gen of perFileGenerators) {
704
702
  const pattern = `^(.*)\\.${gen.extensionPrefix}\\.ts$`;
@@ -787,14 +785,14 @@ var ShimAdapter = class {
787
785
  }
788
786
  };
789
787
 
790
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.mjs
788
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.mjs
791
789
  import ts7 from "typescript";
792
790
  var TS_DTS_SUFFIX = /(\.d)?\.ts$/;
793
791
  var STRIP_NG_FACTORY = /(.*)NgFactory$/;
794
792
  var FactoryGenerator = class {
795
793
  constructor() {
796
- this.sourceInfo = new Map();
797
- this.sourceToFactorySymbols = new Map();
794
+ this.sourceInfo = /* @__PURE__ */ new Map();
795
+ this.sourceToFactorySymbols = /* @__PURE__ */ new Map();
798
796
  this.shouldEmit = true;
799
797
  this.extensionPrefix = "ngfactory";
800
798
  }
@@ -820,7 +818,7 @@ var FactoryGenerator = class {
820
818
  if (sf.moduleName !== void 0) {
821
819
  genFile.moduleName = generatedModuleName(sf.moduleName, sf.fileName, ".ngfactory");
822
820
  }
823
- const moduleSymbols = new Map();
821
+ const moduleSymbols = /* @__PURE__ */ new Map();
824
822
  this.sourceToFactorySymbols.set(absoluteSfPath, moduleSymbols);
825
823
  this.sourceInfo.set(genFilePath, {
826
824
  sourceFilePath: absoluteSfPath,
@@ -851,7 +849,7 @@ function transformFactorySourceFile(factoryMap, context, importRewriter, file) {
851
849
  const { moduleSymbols, sourceFilePath } = factoryMap.get(file.fileName);
852
850
  const transformedStatements = [];
853
851
  let nonEmptyExport = null;
854
- const coreImportIdentifiers = new Set();
852
+ const coreImportIdentifiers = /* @__PURE__ */ new Set();
855
853
  for (const stmt of file.statements) {
856
854
  if (ts7.isImportDeclaration(stmt) && ts7.isStringLiteral(stmt.moduleSpecifier) && stmt.moduleSpecifier.text === "@angular/core") {
857
855
  const rewrittenModuleSpecifier = importRewriter.rewriteSpecifier("@angular/core", sourceFilePath);
@@ -936,10 +934,10 @@ function updateInitializers(stmt, update) {
936
934
  return ts7.updateVariableStatement(stmt, stmt.modifiers, ts7.updateVariableDeclarationList(stmt.declarationList, stmt.declarationList.declarations.map((decl) => ts7.updateVariableDeclaration(decl, decl.name, decl.type, update(decl.initializer)))));
937
935
  }
938
936
 
939
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
937
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
940
938
  var ShimReferenceTagger = class {
941
939
  constructor(shimExtensions) {
942
- this.tagged = new Set();
940
+ this.tagged = /* @__PURE__ */ new Set();
943
941
  this.enabled = true;
944
942
  this.suffixes = shimExtensions.map((extension) => `.${extension}.ts`);
945
943
  }
@@ -970,7 +968,7 @@ var ShimReferenceTagger = class {
970
968
  }
971
969
  };
972
970
 
973
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/summary_generator.mjs
971
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/summary_generator.mjs
974
972
  import ts8 from "typescript";
975
973
  var SummaryGenerator = class {
976
974
  constructor() {
@@ -1010,7 +1008,7 @@ function isExported2(decl) {
1010
1008
  return decl.modifiers !== void 0 && decl.modifiers.some((mod) => mod.kind == ts8.SyntaxKind.ExportKeyword);
1011
1009
  }
1012
1010
 
1013
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
1011
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
1014
1012
  var DelegatingCompilerHost = class {
1015
1013
  constructor(delegate) {
1016
1014
  this.delegate = delegate;
@@ -1082,7 +1080,7 @@ var TsCreateProgramDriver = class {
1082
1080
  this.originalHost = originalHost;
1083
1081
  this.options = options;
1084
1082
  this.shimExtensionPrefixes = shimExtensionPrefixes;
1085
- this.sfMap = new Map();
1083
+ this.sfMap = /* @__PURE__ */ new Map();
1086
1084
  this.program = this.originalProgram;
1087
1085
  this.supportsInlineOperations = true;
1088
1086
  }
@@ -1120,10 +1118,10 @@ var TsCreateProgramDriver = class {
1120
1118
  }
1121
1119
  };
1122
1120
 
1123
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
1121
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
1124
1122
  var FileDependencyGraph = class {
1125
1123
  constructor() {
1126
- this.nodes = new Map();
1124
+ this.nodes = /* @__PURE__ */ new Map();
1127
1125
  }
1128
1126
  addDependency(from, on) {
1129
1127
  this.nodeFor(from).dependsOn.add(absoluteFromSourceFile(on));
@@ -1139,7 +1137,7 @@ var FileDependencyGraph = class {
1139
1137
  return node ? [...node.usesResources] : [];
1140
1138
  }
1141
1139
  updateWithPhysicalChanges(previous, changedTsPaths, deletedTsPaths, changedResources) {
1142
- const logicallyChanged = new Set();
1140
+ const logicallyChanged = /* @__PURE__ */ new Set();
1143
1141
  for (const sf of previous.nodes.keys()) {
1144
1142
  const sfPath = absoluteFromSourceFile(sf);
1145
1143
  const node = previous.nodeFor(sf);
@@ -1158,8 +1156,8 @@ var FileDependencyGraph = class {
1158
1156
  nodeFor(sf) {
1159
1157
  if (!this.nodes.has(sf)) {
1160
1158
  this.nodes.set(sf, {
1161
- dependsOn: new Set(),
1162
- usesResources: new Set(),
1159
+ dependsOn: /* @__PURE__ */ new Set(),
1160
+ usesResources: /* @__PURE__ */ new Set(),
1163
1161
  failedAnalysis: false
1164
1162
  });
1165
1163
  }
@@ -1187,7 +1185,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
1187
1185
  return false;
1188
1186
  }
1189
1187
 
1190
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
1188
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
1191
1189
  var IncrementalStateKind;
1192
1190
  (function(IncrementalStateKind2) {
1193
1191
  IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
@@ -1195,7 +1193,7 @@ var IncrementalStateKind;
1195
1193
  IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
1196
1194
  })(IncrementalStateKind || (IncrementalStateKind = {}));
1197
1195
 
1198
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
1196
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
1199
1197
  var PhaseKind;
1200
1198
  (function(PhaseKind2) {
1201
1199
  PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
@@ -1220,7 +1218,7 @@ var IncrementalCompilation = class {
1220
1218
  }
1221
1219
  static incremental(program, newVersions, oldProgram, oldState, modifiedResourceFiles, perf) {
1222
1220
  return perf.inPhase(PerfPhase.Reconciliation, () => {
1223
- const physicallyChangedTsFiles = new Set();
1221
+ const physicallyChangedTsFiles = /* @__PURE__ */ new Set();
1224
1222
  const changedResourceFiles = new Set(modifiedResourceFiles != null ? modifiedResourceFiles : []);
1225
1223
  let priorAnalysis;
1226
1224
  switch (oldState.kind) {
@@ -1296,7 +1294,7 @@ var IncrementalCompilation = class {
1296
1294
  const { needsEmit, needsTypeCheckEmit, newGraph } = this.phase.semanticDepGraphUpdater.finalize();
1297
1295
  let emitted;
1298
1296
  if (this.step === null) {
1299
- emitted = new Set();
1297
+ emitted = /* @__PURE__ */ new Set();
1300
1298
  } else {
1301
1299
  emitted = new Set(this.step.priorState.emitted);
1302
1300
  for (const sfPath of this.step.logicallyChangedTsFiles) {
@@ -1396,7 +1394,7 @@ function toOriginalSourceFile(sf) {
1396
1394
  }
1397
1395
  }
1398
1396
 
1399
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
1397
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
1400
1398
  var TrackedIncrementalBuildStrategy = class {
1401
1399
  constructor() {
1402
1400
  this.state = null;
@@ -1432,7 +1430,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
1432
1430
  };
1433
1431
  var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
1434
1432
 
1435
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
1433
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
1436
1434
  var IdentifierKind;
1437
1435
  (function(IdentifierKind2) {
1438
1436
  IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
@@ -1450,21 +1448,21 @@ var AbsoluteSourceSpan = class {
1450
1448
  }
1451
1449
  };
1452
1450
 
1453
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
1451
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
1454
1452
  var IndexingContext = class {
1455
1453
  constructor() {
1456
- this.components = new Set();
1454
+ this.components = /* @__PURE__ */ new Set();
1457
1455
  }
1458
1456
  addComponent(info) {
1459
1457
  this.components.add(info);
1460
1458
  }
1461
1459
  };
1462
1460
 
1463
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
1461
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
1464
1462
  import { ParseSourceFile } from "@angular/compiler";
1465
1463
 
1466
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
1467
- import { ASTWithSource, ImplicitReceiver, RecursiveAstVisitor, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate } from "@angular/compiler";
1464
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
1465
+ import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate } from "@angular/compiler";
1468
1466
  var ExpressionVisitor = class extends RecursiveAstVisitor {
1469
1467
  constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
1470
1468
  super();
@@ -1494,7 +1492,10 @@ var ExpressionVisitor = class extends RecursiveAstVisitor {
1494
1492
  if (!(ast.receiver instanceof ImplicitReceiver)) {
1495
1493
  return;
1496
1494
  }
1497
- const identifierStart = ast.sourceSpan.start - this.absoluteOffset;
1495
+ let identifierStart = ast.sourceSpan.start - this.absoluteOffset;
1496
+ if (ast instanceof PropertyRead || ast instanceof PropertyWrite) {
1497
+ identifierStart = ast.nameSpan.start - this.absoluteOffset;
1498
+ }
1498
1499
  if (!this.expressionStr.substring(identifierStart).startsWith(ast.name)) {
1499
1500
  throw new Error(`Impossible state: "${ast.name}" not found in "${this.expressionStr}" at location ${identifierStart}`);
1500
1501
  }
@@ -1515,9 +1516,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1515
1516
  constructor(boundTemplate) {
1516
1517
  super();
1517
1518
  this.boundTemplate = boundTemplate;
1518
- this.identifiers = new Set();
1519
- this.targetIdentifierCache = new Map();
1520
- this.elementAndTemplateIdentifierCache = new Map();
1519
+ this.identifiers = /* @__PURE__ */ new Set();
1520
+ this.targetIdentifierCache = /* @__PURE__ */ new Map();
1521
+ this.elementAndTemplateIdentifierCache = /* @__PURE__ */ new Map();
1521
1522
  }
1522
1523
  visit(node) {
1523
1524
  node.visit(this);
@@ -1574,7 +1575,11 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1574
1575
  name = node.tagName;
1575
1576
  kind = IdentifierKind.Template;
1576
1577
  } else {
1577
- name = node.name;
1578
+ if (node.name.startsWith(":")) {
1579
+ name = node.name.split(":").pop();
1580
+ } else {
1581
+ name = node.name;
1582
+ }
1578
1583
  kind = IdentifierKind.Element;
1579
1584
  }
1580
1585
  const sourceSpan = node.startSourceSpan;
@@ -1667,12 +1672,12 @@ function getTemplateIdentifiers(boundTemplate) {
1667
1672
  return visitor.identifiers;
1668
1673
  }
1669
1674
 
1670
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
1675
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
1671
1676
  function generateAnalysis(context) {
1672
- const analysis = new Map();
1677
+ const analysis = /* @__PURE__ */ new Map();
1673
1678
  context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
1674
1679
  const name = declaration.name.getText();
1675
- const usedComponents = new Set();
1680
+ const usedComponents = /* @__PURE__ */ new Set();
1676
1681
  const usedDirs = boundTemplate.getUsedDirectives();
1677
1682
  usedDirs.forEach((dir) => {
1678
1683
  if (dir.isComponent) {
@@ -1701,7 +1706,7 @@ function generateAnalysis(context) {
1701
1706
  return analysis;
1702
1707
  }
1703
1708
 
1704
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
1709
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
1705
1710
  import ts10 from "typescript";
1706
1711
  var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
1707
1712
  var RESOURCE_MARKER = ".$ngresource$";
@@ -1710,8 +1715,8 @@ var AdapterResourceLoader = class {
1710
1715
  constructor(adapter, options) {
1711
1716
  this.adapter = adapter;
1712
1717
  this.options = options;
1713
- this.cache = new Map();
1714
- this.fetching = new Map();
1718
+ this.cache = /* @__PURE__ */ new Map();
1719
+ this.fetching = /* @__PURE__ */ new Map();
1715
1720
  this.lookupResolutionHost = createLookupResolutionHost(this.adapter);
1716
1721
  this.canPreload = !!this.adapter.readResource;
1717
1722
  this.canPreprocess = !!this.adapter.transformResource;
@@ -1847,12 +1852,12 @@ function createLookupResolutionHost(adapter) {
1847
1852
  };
1848
1853
  }
1849
1854
 
1850
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
1855
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
1851
1856
  var MetadataDtsModuleScopeResolver = class {
1852
1857
  constructor(dtsMetaReader, aliasingHost) {
1853
1858
  this.dtsMetaReader = dtsMetaReader;
1854
1859
  this.aliasingHost = aliasingHost;
1855
- this.cache = new Map();
1860
+ this.cache = /* @__PURE__ */ new Map();
1856
1861
  }
1857
1862
  resolve(ref) {
1858
1863
  const clazz = ref.node;
@@ -1865,13 +1870,13 @@ var MetadataDtsModuleScopeResolver = class {
1865
1870
  }
1866
1871
  const directives = [];
1867
1872
  const pipes = [];
1868
- const ngModules = new Set([clazz]);
1873
+ const ngModules = /* @__PURE__ */ new Set([clazz]);
1869
1874
  const meta = this.dtsMetaReader.getNgModuleMetadata(ref);
1870
1875
  if (meta === null) {
1871
1876
  this.cache.set(clazz, null);
1872
1877
  return null;
1873
1878
  }
1874
- const declarations = new Set();
1879
+ const declarations = /* @__PURE__ */ new Set();
1875
1880
  for (const declRef of meta.declarations) {
1876
1881
  declarations.add(declRef.node);
1877
1882
  }
@@ -1933,7 +1938,7 @@ var MetadataDtsModuleScopeResolver = class {
1933
1938
  }
1934
1939
  };
1935
1940
 
1936
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
1941
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
1937
1942
  import { ExternalExpr } from "@angular/compiler";
1938
1943
  import ts11 from "typescript";
1939
1944
  var LocalModuleScopeRegistry = class {
@@ -1943,13 +1948,13 @@ var LocalModuleScopeRegistry = class {
1943
1948
  this.refEmitter = refEmitter;
1944
1949
  this.aliasingHost = aliasingHost;
1945
1950
  this.sealed = false;
1946
- this.declarationToModule = new Map();
1947
- this.duplicateDeclarations = new Map();
1948
- this.moduleToRef = new Map();
1949
- this.cache = new Map();
1950
- this.remoteScoping = new Map();
1951
- this.scopeErrors = new Map();
1952
- this.modulesWithStructuralErrors = new Set();
1951
+ this.declarationToModule = /* @__PURE__ */ new Map();
1952
+ this.duplicateDeclarations = /* @__PURE__ */ new Map();
1953
+ this.moduleToRef = /* @__PURE__ */ new Map();
1954
+ this.cache = /* @__PURE__ */ new Map();
1955
+ this.remoteScoping = /* @__PURE__ */ new Map();
1956
+ this.scopeErrors = /* @__PURE__ */ new Map();
1957
+ this.modulesWithStructuralErrors = /* @__PURE__ */ new Set();
1953
1958
  }
1954
1959
  registerNgModuleMetadata(data) {
1955
1960
  this.assertCollecting();
@@ -1993,7 +1998,7 @@ var LocalModuleScopeRegistry = class {
1993
1998
  if (this.duplicateDeclarations.has(decl.node)) {
1994
1999
  this.duplicateDeclarations.get(decl.node).set(ngModule, declData);
1995
2000
  } else if (this.declarationToModule.has(decl.node) && this.declarationToModule.get(decl.node).ngModule !== ngModule) {
1996
- const duplicateDeclMap = new Map();
2001
+ const duplicateDeclMap = /* @__PURE__ */ new Map();
1997
2002
  const firstDeclData = this.declarationToModule.get(decl.node);
1998
2003
  this.modulesWithStructuralErrors.add(firstDeclData.ngModule);
1999
2004
  this.modulesWithStructuralErrors.add(ngModule);
@@ -2015,14 +2020,14 @@ var LocalModuleScopeRegistry = class {
2015
2020
  this.cache.set(ref.node, null);
2016
2021
  return null;
2017
2022
  }
2018
- const compilationModules = new Set([ngModule.ref.node]);
2019
- const exportedModules = new Set([ngModule.ref.node]);
2023
+ const compilationModules = /* @__PURE__ */ new Set([ngModule.ref.node]);
2024
+ const exportedModules = /* @__PURE__ */ new Set([ngModule.ref.node]);
2020
2025
  const diagnostics = [];
2021
- const compilationDirectives = new Map();
2022
- const compilationPipes = new Map();
2023
- const declared = new Set();
2024
- const exportDirectives = new Map();
2025
- const exportPipes = new Map();
2026
+ const compilationDirectives = /* @__PURE__ */ new Map();
2027
+ const compilationPipes = /* @__PURE__ */ new Map();
2028
+ const declared = /* @__PURE__ */ new Set();
2029
+ const exportDirectives = /* @__PURE__ */ new Map();
2030
+ const exportPipes = /* @__PURE__ */ new Map();
2026
2031
  let isPoisoned = false;
2027
2032
  if (this.modulesWithStructuralErrors.has(ngModule.ref.node)) {
2028
2033
  isPoisoned = true;
@@ -2153,7 +2158,7 @@ var LocalModuleScopeRegistry = class {
2153
2158
  return null;
2154
2159
  }
2155
2160
  reexports = [];
2156
- const reexportMap = new Map();
2161
+ const reexportMap = /* @__PURE__ */ new Map();
2157
2162
  const ngModuleRef = ref;
2158
2163
  const addReexport = (exportRef) => {
2159
2164
  if (exportRef.node.getSourceFile() === sourceFile) {
@@ -2172,7 +2177,9 @@ var LocalModuleScopeRegistry = class {
2172
2177
  asAlias: exportName
2173
2178
  });
2174
2179
  } else {
2175
- const expr = this.refEmitter.emit(exportRef.cloneWithNoIdentifiers(), sourceFile).expression;
2180
+ const emittedRef = this.refEmitter.emit(exportRef.cloneWithNoIdentifiers(), sourceFile);
2181
+ assertSuccessfulReferenceEmit(emittedRef, ngModuleRef.node.name, "class");
2182
+ const expr = emittedRef.expression;
2176
2183
  if (!(expr instanceof ExternalExpr) || expr.value.moduleName === null || expr.value.name === null) {
2177
2184
  throw new Error("Expected ExternalExpr");
2178
2185
  }
@@ -2241,20 +2248,20 @@ function reexportCollision(module, refA, refB) {
2241
2248
  ]);
2242
2249
  }
2243
2250
 
2244
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
2251
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
2245
2252
  import { CssSelector, SelectorMatcher } from "@angular/compiler";
2246
2253
  import ts12 from "typescript";
2247
2254
  var TypeCheckScopeRegistry = class {
2248
2255
  constructor(scopeReader, metaReader) {
2249
2256
  this.scopeReader = scopeReader;
2250
2257
  this.metaReader = metaReader;
2251
- this.flattenedDirectiveMetaCache = new Map();
2252
- this.scopeCache = new Map();
2258
+ this.flattenedDirectiveMetaCache = /* @__PURE__ */ new Map();
2259
+ this.scopeCache = /* @__PURE__ */ new Map();
2253
2260
  }
2254
2261
  getTypeCheckScope(node) {
2255
2262
  const matcher = new SelectorMatcher();
2256
2263
  const directives = [];
2257
- const pipes = new Map();
2264
+ const pipes = /* @__PURE__ */ new Map();
2258
2265
  const scope = this.scopeReader.getScopeForComponent(node);
2259
2266
  if (scope === null) {
2260
2267
  return {
@@ -2302,10 +2309,10 @@ var TypeCheckScopeRegistry = class {
2302
2309
  }
2303
2310
  };
2304
2311
 
2305
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
2312
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
2306
2313
  import { CssSelector as CssSelector2, DomElementSchemaRegistry as DomElementSchemaRegistry2 } from "@angular/compiler";
2307
2314
 
2308
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
2315
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
2309
2316
  import ts13 from "typescript";
2310
2317
  function makeTemplateDiagnostic(templateId, mapping, span, category, code, messageText, relatedMessages) {
2311
2318
  if (mapping.type === "direct") {
@@ -2378,7 +2385,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
2378
2385
  }
2379
2386
  }
2380
2387
 
2381
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
2388
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
2382
2389
  var TEMPLATE_ID = Symbol("ngTemplateId");
2383
2390
  var NEXT_TEMPLATE_ID = Symbol("ngNextTemplateId");
2384
2391
  function getTemplateId(clazz) {
@@ -2395,11 +2402,11 @@ function allocateTemplateId(sf) {
2395
2402
  return `tcb${sf[NEXT_TEMPLATE_ID]++}`;
2396
2403
  }
2397
2404
 
2398
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
2399
- import { EmptyExpr, ImplicitReceiver as ImplicitReceiver2, PropertyRead, PropertyWrite, SafePropertyRead, TmplAstReference as TmplAstReference2, TmplAstTextAttribute } from "@angular/compiler";
2405
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
2406
+ import { EmptyExpr, ImplicitReceiver as ImplicitReceiver2, PropertyRead as PropertyRead2, PropertyWrite as PropertyWrite2, SafePropertyRead, TmplAstReference as TmplAstReference2, TmplAstTextAttribute } from "@angular/compiler";
2400
2407
  import ts15 from "typescript";
2401
2408
 
2402
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
2409
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
2403
2410
  import { AbsoluteSourceSpan as AbsoluteSourceSpan2 } from "@angular/compiler";
2404
2411
  import ts14 from "typescript";
2405
2412
  var parseSpanComment = /^(\d+),(\d+)$/;
@@ -2519,14 +2526,14 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
2519
2526
  }) || false;
2520
2527
  }
2521
2528
 
2522
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
2529
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
2523
2530
  var CompletionEngine = class {
2524
2531
  constructor(tcb, data, shimPath) {
2525
2532
  this.tcb = tcb;
2526
2533
  this.data = data;
2527
2534
  this.shimPath = shimPath;
2528
- this.templateContextCache = new Map();
2529
- this.expressionCompletionCache = new Map();
2535
+ this.templateContextCache = /* @__PURE__ */ new Map();
2536
+ this.expressionCompletionCache = /* @__PURE__ */ new Map();
2530
2537
  const globalRead = findFirstMatchingNode(this.tcb, {
2531
2538
  filter: ts15.isPropertyAccessExpression,
2532
2539
  withExpressionIdentifier: ExpressionIdentifier.COMPONENT_COMPLETION
@@ -2561,7 +2568,7 @@ var CompletionEngine = class {
2561
2568
  };
2562
2569
  }
2563
2570
  }
2564
- if (node instanceof PropertyRead && node.receiver instanceof ImplicitReceiver2) {
2571
+ if (node instanceof PropertyRead2 && node.receiver instanceof ImplicitReceiver2) {
2565
2572
  const nodeLocation = findFirstMatchingNode(this.tcb, {
2566
2573
  filter: ts15.isPropertyAccessExpression,
2567
2574
  withSpan: node.sourceSpan
@@ -2584,7 +2591,7 @@ var CompletionEngine = class {
2584
2591
  return this.expressionCompletionCache.get(expr);
2585
2592
  }
2586
2593
  let tsExpr = null;
2587
- if (expr instanceof PropertyRead || expr instanceof PropertyWrite) {
2594
+ if (expr instanceof PropertyRead2 || expr instanceof PropertyWrite2) {
2588
2595
  tsExpr = findFirstMatchingNode(this.tcb, {
2589
2596
  filter: ts15.isPropertyAccessExpression,
2590
2597
  withSpan: expr.nameSpan
@@ -2651,7 +2658,7 @@ var CompletionEngine = class {
2651
2658
  if (this.templateContextCache.has(context)) {
2652
2659
  return this.templateContextCache.get(context);
2653
2660
  }
2654
- const templateContext = new Map();
2661
+ const templateContext = /* @__PURE__ */ new Map();
2655
2662
  for (const node of this.data.boundTarget.getEntitiesInTemplateScope(context)) {
2656
2663
  if (node instanceof TmplAstReference2) {
2657
2664
  templateContext.set(node.name, {
@@ -2670,10 +2677,10 @@ var CompletionEngine = class {
2670
2677
  }
2671
2678
  };
2672
2679
 
2673
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
2680
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
2674
2681
  import ts29 from "typescript";
2675
2682
 
2676
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
2683
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
2677
2684
  import { DomElementSchemaRegistry } from "@angular/compiler";
2678
2685
  import ts16 from "typescript";
2679
2686
  var REGISTRY = new DomElementSchemaRegistry();
@@ -2723,13 +2730,13 @@ var RegistryDomSchemaChecker = class {
2723
2730
  }
2724
2731
  };
2725
2732
 
2726
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
2733
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
2727
2734
  import { ExpressionType, ExternalExpr as ExternalExpr2 } from "@angular/compiler";
2728
2735
  import ts22 from "typescript";
2729
2736
 
2730
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
2737
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
2731
2738
  import ts17 from "typescript";
2732
- var SAFE_TO_CAST_WITHOUT_PARENS = new Set([
2739
+ var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
2733
2740
  ts17.SyntaxKind.ParenthesizedExpression,
2734
2741
  ts17.SyntaxKind.Identifier,
2735
2742
  ts17.SyntaxKind.CallExpression,
@@ -2796,19 +2803,19 @@ function isAccessExpression(node) {
2796
2803
  return ts17.isPropertyAccessExpression(node) || ts17.isElementAccessExpression(node);
2797
2804
  }
2798
2805
 
2799
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
2806
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
2800
2807
  import ts21 from "typescript";
2801
2808
 
2802
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
2809
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
2803
2810
  import ts20 from "typescript";
2804
2811
 
2805
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
2812
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
2806
2813
  import ts19 from "typescript";
2807
2814
 
2808
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_emitter.mjs
2815
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_emitter.mjs
2809
2816
  import ts18 from "typescript";
2810
2817
  var INELIGIBLE = {};
2811
- function canEmitType(type, resolver) {
2818
+ function canEmitType(type, canEmit) {
2812
2819
  return canEmitTypeWorker(type);
2813
2820
  function canEmitTypeWorker(type2) {
2814
2821
  return visitNode(type2) !== INELIGIBLE;
@@ -2824,20 +2831,15 @@ function canEmitType(type, resolver) {
2824
2831
  }
2825
2832
  }
2826
2833
  function canEmitTypeReference(type2) {
2827
- const reference = resolver(type2);
2828
- if (reference === null) {
2834
+ if (!canEmit(type2)) {
2829
2835
  return false;
2830
2836
  }
2831
- if (reference instanceof Reference) {
2832
- return true;
2833
- }
2834
2837
  return type2.typeArguments === void 0 || type2.typeArguments.every(canEmitTypeWorker);
2835
2838
  }
2836
2839
  }
2837
2840
  var TypeEmitter = class {
2838
- constructor(resolver, emitReference) {
2839
- this.resolver = resolver;
2840
- this.emitReference = emitReference;
2841
+ constructor(translator) {
2842
+ this.translator = translator;
2841
2843
  }
2842
2844
  emitType(type) {
2843
2845
  const typeReferenceTransformer = (context) => {
@@ -2860,51 +2862,52 @@ var TypeEmitter = class {
2860
2862
  return ts18.transform(type, [typeReferenceTransformer]).transformed[0];
2861
2863
  }
2862
2864
  emitTypeReference(type) {
2863
- const reference = this.resolver(type);
2864
- if (reference === null) {
2865
+ const translatedType = this.translator(type);
2866
+ if (translatedType === null) {
2865
2867
  throw new Error("Unable to emit an unresolved reference");
2866
2868
  }
2867
2869
  let typeArguments = void 0;
2868
2870
  if (type.typeArguments !== void 0) {
2869
2871
  typeArguments = ts18.createNodeArray(type.typeArguments.map((typeArg) => this.emitType(typeArg)));
2870
2872
  }
2871
- let typeName = type.typeName;
2872
- if (reference instanceof Reference) {
2873
- const emittedType = this.emitReference(reference);
2874
- if (!ts18.isTypeReferenceNode(emittedType)) {
2875
- throw new Error(`Expected TypeReferenceNode for emitted reference, got ${ts18.SyntaxKind[emittedType.kind]}`);
2876
- }
2877
- typeName = emittedType.typeName;
2878
- }
2879
- return ts18.updateTypeReferenceNode(type, typeName, typeArguments);
2873
+ return ts18.updateTypeReferenceNode(type, translatedType.typeName, typeArguments);
2880
2874
  }
2881
2875
  };
2882
2876
 
2883
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
2877
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
2884
2878
  var TypeParameterEmitter = class {
2885
2879
  constructor(typeParameters, reflector) {
2886
2880
  this.typeParameters = typeParameters;
2887
2881
  this.reflector = reflector;
2888
2882
  }
2889
- canEmit() {
2883
+ canEmit(canEmitReference) {
2890
2884
  if (this.typeParameters === void 0) {
2891
2885
  return true;
2892
2886
  }
2893
2887
  return this.typeParameters.every((typeParam) => {
2894
- return this.canEmitType(typeParam.constraint) && this.canEmitType(typeParam.default);
2888
+ return this.canEmitType(typeParam.constraint, canEmitReference) && this.canEmitType(typeParam.default, canEmitReference);
2895
2889
  });
2896
2890
  }
2897
- canEmitType(type) {
2891
+ canEmitType(type, canEmitReference) {
2898
2892
  if (type === void 0) {
2899
2893
  return true;
2900
2894
  }
2901
- return canEmitType(type, (typeReference) => this.resolveTypeReference(typeReference));
2895
+ return canEmitType(type, (typeReference) => {
2896
+ const reference = this.resolveTypeReference(typeReference);
2897
+ if (reference === null) {
2898
+ return false;
2899
+ }
2900
+ if (reference instanceof Reference) {
2901
+ return canEmitReference(reference);
2902
+ }
2903
+ return true;
2904
+ });
2902
2905
  }
2903
2906
  emit(emitReference) {
2904
2907
  if (this.typeParameters === void 0) {
2905
2908
  return void 0;
2906
2909
  }
2907
- const emitter = new TypeEmitter((type) => this.resolveTypeReference(type), emitReference);
2910
+ const emitter = new TypeEmitter((type) => this.translateTypeReference(type, emitReference));
2908
2911
  return this.typeParameters.map((typeParam) => {
2909
2912
  const constraint = typeParam.constraint !== void 0 ? emitter.emitType(typeParam.constraint) : void 0;
2910
2913
  const defaultType = typeParam.default !== void 0 ? emitter.emitType(typeParam.default) : void 0;
@@ -2927,33 +2930,38 @@ var TypeParameterEmitter = class {
2927
2930
  resolutionContext: type.getSourceFile().fileName
2928
2931
  };
2929
2932
  }
2930
- if (!this.isTopLevelExport(declaration.node)) {
2931
- return null;
2932
- }
2933
2933
  return new Reference(declaration.node, owningModule);
2934
2934
  }
2935
- isTopLevelExport(decl) {
2936
- if (decl.parent === void 0 || !ts19.isSourceFile(decl.parent)) {
2937
- return false;
2935
+ translateTypeReference(type, emitReference) {
2936
+ const reference = this.resolveTypeReference(type);
2937
+ if (!(reference instanceof Reference)) {
2938
+ return reference;
2938
2939
  }
2939
- return this.reflector.isStaticallyExported(decl);
2940
+ const typeNode = emitReference(reference);
2941
+ if (typeNode === null) {
2942
+ return null;
2943
+ }
2944
+ if (!ts19.isTypeReferenceNode(typeNode)) {
2945
+ throw new Error(`Expected TypeReferenceNode for emitted reference, got ${ts19.SyntaxKind[typeNode.kind]}.`);
2946
+ }
2947
+ return typeNode;
2940
2948
  }
2941
2949
  isLocalTypeParameter(decl) {
2942
2950
  return this.typeParameters.some((param) => param === decl);
2943
2951
  }
2944
2952
  };
2945
2953
 
2946
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
2954
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
2947
2955
  var TcbInliningRequirement;
2948
2956
  (function(TcbInliningRequirement2) {
2949
2957
  TcbInliningRequirement2[TcbInliningRequirement2["MustInline"] = 0] = "MustInline";
2950
2958
  TcbInliningRequirement2[TcbInliningRequirement2["ShouldInlineForGenericBounds"] = 1] = "ShouldInlineForGenericBounds";
2951
2959
  TcbInliningRequirement2[TcbInliningRequirement2["None"] = 2] = "None";
2952
2960
  })(TcbInliningRequirement || (TcbInliningRequirement = {}));
2953
- function requiresInlineTypeCheckBlock(node, usedPipes, reflector) {
2961
+ function requiresInlineTypeCheckBlock(node, env, usedPipes, reflector) {
2954
2962
  if (!checkIfClassIsExported(node)) {
2955
2963
  return TcbInliningRequirement.MustInline;
2956
- } else if (!checkIfGenericTypeBoundsAreContextFree(node, reflector)) {
2964
+ } else if (!checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env)) {
2957
2965
  return TcbInliningRequirement.ShouldInlineForGenericBounds;
2958
2966
  } else if (Array.from(usedPipes.values()).some((pipeRef) => !checkIfClassIsExported(pipeRef.node))) {
2959
2967
  return TcbInliningRequirement.MustInline;
@@ -3018,15 +3026,13 @@ function getTemplateId2(node, sourceFile, isDiagnosticRequest) {
3018
3026
  return commentText;
3019
3027
  }) || null;
3020
3028
  }
3021
- function checkIfGenericTypeBoundsAreContextFree(node, reflector) {
3022
- return new TypeParameterEmitter(node.typeParameters, reflector).canEmit();
3029
+ function checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env) {
3030
+ const emitter = new TypeParameterEmitter(node.typeParameters, reflector);
3031
+ return emitter.canEmit((ref) => env.canReferenceType(ref));
3023
3032
  }
3024
3033
 
3025
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
3026
- function generateTypeCtorDeclarationFn(node, meta, nodeTypeRef, typeParams, reflector) {
3027
- if (requiresInlineTypeCtor(node, reflector)) {
3028
- throw new Error(`${node.name.text} requires an inline type constructor`);
3029
- }
3034
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
3035
+ function generateTypeCtorDeclarationFn(node, meta, nodeTypeRef, typeParams) {
3030
3036
  const rawTypeArgs = typeParams !== void 0 ? generateGenericArgs(typeParams) : void 0;
3031
3037
  const rawType = ts21.createTypeReferenceNode(nodeTypeRef, rawTypeArgs);
3032
3038
  const initParam = constructTypeCtorParameter(node, meta, rawType);
@@ -3080,8 +3086,8 @@ function constructTypeCtorParameter(node, meta, rawType) {
3080
3086
  function generateGenericArgs(params) {
3081
3087
  return params.map((param) => ts21.createTypeReferenceNode(param.name, void 0));
3082
3088
  }
3083
- function requiresInlineTypeCtor(node, host) {
3084
- return !checkIfGenericTypeBoundsAreContextFree(node, host);
3089
+ function requiresInlineTypeCtor(node, host, env) {
3090
+ return !checkIfGenericTypeBoundsCanBeEmitted(node, host, env);
3085
3091
  }
3086
3092
  function typeParametersWithDefaultTypes(params) {
3087
3093
  if (params === void 0) {
@@ -3096,7 +3102,7 @@ function typeParametersWithDefaultTypes(params) {
3096
3102
  });
3097
3103
  }
3098
3104
 
3099
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
3105
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
3100
3106
  var Environment = class {
3101
3107
  constructor(config, importManager, refEmitter, reflector, contextFile) {
3102
3108
  this.config = config;
@@ -3108,9 +3114,9 @@ var Environment = class {
3108
3114
  pipeInst: 1,
3109
3115
  typeCtor: 1
3110
3116
  };
3111
- this.typeCtors = new Map();
3117
+ this.typeCtors = /* @__PURE__ */ new Map();
3112
3118
  this.typeCtorStatements = [];
3113
- this.pipeInsts = new Map();
3119
+ this.pipeInsts = /* @__PURE__ */ new Map();
3114
3120
  this.pipeInstStatements = [];
3115
3121
  }
3116
3122
  typeCtorFor(dir) {
@@ -3119,7 +3125,7 @@ var Environment = class {
3119
3125
  if (this.typeCtors.has(node)) {
3120
3126
  return this.typeCtors.get(node);
3121
3127
  }
3122
- if (requiresInlineTypeCtor(node, this.reflector)) {
3128
+ if (requiresInlineTypeCtor(node, this.reflector, this)) {
3123
3129
  const ref = this.reference(dirRef);
3124
3130
  const typeCtorExpr = ts22.createPropertyAccess(ref, "ngTypeCtor");
3125
3131
  this.typeCtors.set(node, typeCtorExpr);
@@ -3141,7 +3147,7 @@ var Environment = class {
3141
3147
  coercedInputFields: dir.coercedInputFields
3142
3148
  };
3143
3149
  const typeParams = this.emitTypeParameters(node);
3144
- const typeCtor = generateTypeCtorDeclarationFn(node, meta, nodeTypeRef.typeName, typeParams, this.reflector);
3150
+ const typeCtor = generateTypeCtorDeclarationFn(node, meta, nodeTypeRef.typeName, typeParams);
3145
3151
  this.typeCtorStatements.push(typeCtor);
3146
3152
  const fnId = ts22.createIdentifier(fnName);
3147
3153
  this.typeCtors.set(node, fnId);
@@ -3160,10 +3166,16 @@ var Environment = class {
3160
3166
  }
3161
3167
  reference(ref) {
3162
3168
  const ngExpr = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing);
3169
+ assertSuccessfulReferenceEmit(ngExpr, this.contextFile, "class");
3163
3170
  return translateExpression(ngExpr.expression, this.importManager);
3164
3171
  }
3172
+ canReferenceType(ref) {
3173
+ const result = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports);
3174
+ return result.kind === 0;
3175
+ }
3165
3176
  referenceType(ref) {
3166
3177
  const ngExpr = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports);
3178
+ assertSuccessfulReferenceEmit(ngExpr, this.contextFile, "symbol");
3167
3179
  return translateType(new ExpressionType(ngExpr.expression), this.importManager);
3168
3180
  }
3169
3181
  emitTypeParameters(declaration) {
@@ -3182,14 +3194,14 @@ var Environment = class {
3182
3194
  }
3183
3195
  };
3184
3196
 
3185
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
3197
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
3186
3198
  import { TmplAstElement as TmplAstElement2 } from "@angular/compiler";
3187
3199
  import ts23 from "typescript";
3188
3200
  var OutOfBandDiagnosticRecorderImpl = class {
3189
3201
  constructor(resolver) {
3190
3202
  this.resolver = resolver;
3191
3203
  this._diagnostics = [];
3192
- this.recordedPipes = new Set();
3204
+ this.recordedPipes = /* @__PURE__ */ new Set();
3193
3205
  }
3194
3206
  get diagnostics() {
3195
3207
  return this._diagnostics;
@@ -3314,7 +3326,7 @@ function makeInlineDiagnostic(templateId, code, node, messageText, relatedInform
3314
3326
  });
3315
3327
  }
3316
3328
 
3317
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
3329
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
3318
3330
  import ts24 from "typescript";
3319
3331
  var TypeCheckShimGenerator = class {
3320
3332
  constructor() {
@@ -3332,11 +3344,11 @@ var TypeCheckShimGenerator = class {
3332
3344
  }
3333
3345
  };
3334
3346
 
3335
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
3336
- import { BindingPipe, Call as Call2, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver4, PropertyRead as PropertyRead2, PropertyWrite as PropertyWrite2, SafePropertyRead as SafePropertyRead3, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstElement as TmplAstElement3, TmplAstIcu, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
3347
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
3348
+ import { BindingPipe, Call as Call2, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver4, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, SafePropertyRead as SafePropertyRead3, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstElement as TmplAstElement3, TmplAstIcu, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
3337
3349
  import ts27 from "typescript";
3338
3350
 
3339
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
3351
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
3340
3352
  import { AbsoluteSourceSpan as AbsoluteSourceSpan3 } from "@angular/compiler";
3341
3353
  import ts25 from "typescript";
3342
3354
  function wrapForDiagnostics(expr) {
@@ -3382,16 +3394,16 @@ function translateDiagnostic(diagnostic, resolver) {
3382
3394
  return makeTemplateDiagnostic(sourceLocation.id, templateSourceMapping, span, diagnostic.category, diagnostic.code, diagnostic.messageText);
3383
3395
  }
3384
3396
 
3385
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
3386
- import { ASTWithSource as ASTWithSource2, Call, EmptyExpr as EmptyExpr2, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
3397
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
3398
+ import { ASTWithSource as ASTWithSource2, Call, EmptyExpr as EmptyExpr2, PropertyRead as PropertyRead3, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
3387
3399
  import ts26 from "typescript";
3388
3400
  var NULL_AS_ANY = ts26.createAsExpression(ts26.createNull(), ts26.createKeywordTypeNode(ts26.SyntaxKind.AnyKeyword));
3389
3401
  var UNDEFINED = ts26.createIdentifier("undefined");
3390
- var UNARY_OPS = new Map([
3402
+ var UNARY_OPS = /* @__PURE__ */ new Map([
3391
3403
  ["+", ts26.SyntaxKind.PlusToken],
3392
3404
  ["-", ts26.SyntaxKind.MinusToken]
3393
3405
  ]);
3394
- var BINARY_OPS = new Map([
3406
+ var BINARY_OPS = /* @__PURE__ */ new Map([
3395
3407
  ["+", ts26.SyntaxKind.PlusToken],
3396
3408
  ["-", ts26.SyntaxKind.MinusToken],
3397
3409
  ["<", ts26.SyntaxKind.LessThanToken],
@@ -3597,9 +3609,22 @@ var AstTranslator = class {
3597
3609
  }
3598
3610
  visitCall(ast) {
3599
3611
  const args = ast.args.map((expr2) => this.translate(expr2));
3600
- const expr = wrapForDiagnostics(this.translate(ast.receiver));
3612
+ let expr;
3613
+ const receiver = ast.receiver;
3614
+ if (receiver instanceof PropertyRead3) {
3615
+ const resolved = this.maybeResolve(receiver);
3616
+ if (resolved !== null) {
3617
+ expr = resolved;
3618
+ } else {
3619
+ const propertyReceiver = wrapForDiagnostics(this.translate(receiver.receiver));
3620
+ expr = ts26.createPropertyAccess(propertyReceiver, receiver.name);
3621
+ addParseSpanInfo(expr, receiver.nameSpan);
3622
+ }
3623
+ } else {
3624
+ expr = this.translate(receiver);
3625
+ }
3601
3626
  let node;
3602
- if (ast.receiver instanceof SafePropertyRead2 || ast.receiver instanceof SafeKeyedRead) {
3627
+ if (receiver instanceof SafePropertyRead2 || receiver instanceof SafeKeyedRead) {
3603
3628
  if (this.config.strictSafeNavigationTypes) {
3604
3629
  const call = ts26.createCall(ts26.createNonNullExpression(expr), void 0, args);
3605
3630
  node = ts26.createParen(ts26.createConditional(NULL_AS_ANY, call, UNDEFINED));
@@ -3686,7 +3711,7 @@ var VeSafeLhsInferenceBugDetector = class {
3686
3711
  };
3687
3712
  VeSafeLhsInferenceBugDetector.SINGLETON = new VeSafeLhsInferenceBugDetector();
3688
3713
 
3689
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_semantics.mjs
3714
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_semantics.mjs
3690
3715
  import { ImplicitReceiver as ImplicitReceiver3, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstVariable } from "@angular/compiler";
3691
3716
  var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
3692
3717
  constructor(templateId, boundTarget, oob) {
@@ -3710,7 +3735,7 @@ var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
3710
3735
  }
3711
3736
  };
3712
3737
 
3713
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
3738
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
3714
3739
  var TcbGenericContextBehavior;
3715
3740
  (function(TcbGenericContextBehavior2) {
3716
3741
  TcbGenericContextBehavior2[TcbGenericContextBehavior2["UseEmitter"] = 0] = "UseEmitter";
@@ -4002,7 +4027,7 @@ var TcbDirectiveCtorOp = class extends TcbOp {
4002
4027
  const id = this.tcb.allocateId();
4003
4028
  addExpressionIdentifier(id, ExpressionIdentifier.DIRECTIVE);
4004
4029
  addParseSpanInfo(id, this.node.startSourceSpan || this.node.sourceSpan);
4005
- const genericInputs = new Map();
4030
+ const genericInputs = /* @__PURE__ */ new Map();
4006
4031
  const inputs = getBoundInputs(this.dir, this.node, this.tcb);
4007
4032
  for (const input of inputs) {
4008
4033
  if (!this.tcb.env.config.checkTypeOfAttributes && input.attribute instanceof TmplAstTextAttribute2) {
@@ -4325,11 +4350,11 @@ var Scope = class {
4325
4350
  this.parent = parent;
4326
4351
  this.guard = guard;
4327
4352
  this.opQueue = [];
4328
- this.elementOpMap = new Map();
4329
- this.directiveOpMap = new Map();
4330
- this.referenceOpMap = new Map();
4331
- this.templateCtxOpMap = new Map();
4332
- this.varMap = new Map();
4353
+ this.elementOpMap = /* @__PURE__ */ new Map();
4354
+ this.directiveOpMap = /* @__PURE__ */ new Map();
4355
+ this.referenceOpMap = /* @__PURE__ */ new Map();
4356
+ this.templateCtxOpMap = /* @__PURE__ */ new Map();
4357
+ this.varMap = /* @__PURE__ */ new Map();
4333
4358
  this.statements = [];
4334
4359
  }
4335
4360
  static forNodes(tcb, parent, templateOrNodes, guard) {
@@ -4339,7 +4364,7 @@ var Scope = class {
4339
4364
  }
4340
4365
  let children;
4341
4366
  if (templateOrNodes instanceof TmplAstTemplate2) {
4342
- const varMap = new Map();
4367
+ const varMap = /* @__PURE__ */ new Map();
4343
4368
  for (const v of templateOrNodes.variables) {
4344
4369
  if (!varMap.has(v.name)) {
4345
4370
  varMap.set(v.name, v);
@@ -4477,7 +4502,7 @@ var Scope = class {
4477
4502
  }
4478
4503
  }
4479
4504
  appendDirectivesAndInputsOfNode(node) {
4480
- const claimedInputs = new Set();
4505
+ const claimedInputs = /* @__PURE__ */ new Set();
4481
4506
  const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
4482
4507
  if (directives === null || directives.length === 0) {
4483
4508
  if (node instanceof TmplAstElement3) {
@@ -4486,14 +4511,14 @@ var Scope = class {
4486
4511
  }
4487
4512
  return;
4488
4513
  }
4489
- const dirMap = new Map();
4514
+ const dirMap = /* @__PURE__ */ new Map();
4490
4515
  for (const dir of directives) {
4491
4516
  let directiveOp;
4492
4517
  const host = this.tcb.env.reflector;
4493
4518
  const dirRef = dir.ref;
4494
4519
  if (!dir.isGeneric) {
4495
4520
  directiveOp = new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, dir);
4496
- } else if (!requiresInlineTypeCtor(dirRef.node, host) || this.tcb.env.config.useInlineTypeConstructors) {
4521
+ } else if (!requiresInlineTypeCtor(dirRef.node, host, this.tcb.env) || this.tcb.env.config.useInlineTypeConstructors) {
4497
4522
  directiveOp = new TcbDirectiveCtorOp(this.tcb, this, node, dir);
4498
4523
  } else {
4499
4524
  directiveOp = new TcbGenericDirectiveTypeWithAnyParamsOp(this.tcb, this, node, dir);
@@ -4515,7 +4540,7 @@ var Scope = class {
4515
4540
  }
4516
4541
  }
4517
4542
  appendOutputsOfNode(node) {
4518
- const claimedOutputs = new Set();
4543
+ const claimedOutputs = /* @__PURE__ */ new Set();
4519
4544
  const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
4520
4545
  if (directives === null || directives.length === 0) {
4521
4546
  if (node instanceof TmplAstElement3) {
@@ -4541,7 +4566,7 @@ var Scope = class {
4541
4566
  continue;
4542
4567
  }
4543
4568
  if (node instanceof TmplAstElement3) {
4544
- const claimedInputs = new Set();
4569
+ const claimedInputs = /* @__PURE__ */ new Set();
4545
4570
  const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
4546
4571
  let hasDirectives;
4547
4572
  if (directives === null || directives.length === 0) {
@@ -4587,9 +4612,9 @@ var TcbExpressionTranslator = class {
4587
4612
  return astToTypescript(ast, (ast2) => this.resolve(ast2), this.tcb.env.config);
4588
4613
  }
4589
4614
  resolve(ast) {
4590
- if (ast instanceof PropertyRead2 && ast.receiver instanceof ImplicitReceiver4) {
4615
+ if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver4) {
4591
4616
  return this.resolveTarget(ast);
4592
- } else if (ast instanceof PropertyWrite2 && ast.receiver instanceof ImplicitReceiver4) {
4617
+ } else if (ast instanceof PropertyWrite3 && ast.receiver instanceof ImplicitReceiver4) {
4593
4618
  const target = this.resolveTarget(ast);
4594
4619
  if (target === null) {
4595
4620
  return null;
@@ -4619,8 +4644,8 @@ var TcbExpressionTranslator = class {
4619
4644
  const result = ts27.createCall(methodAccess, void 0, [expr, ...args]);
4620
4645
  addParseSpanInfo(result, ast.sourceSpan);
4621
4646
  return result;
4622
- } else if (ast instanceof Call2 && (ast.receiver instanceof PropertyRead2 || ast.receiver instanceof SafePropertyRead3) && !(ast.receiver.receiver instanceof ThisReceiver)) {
4623
- if (ast.receiver.name === "$any" && ast.args.length === 1) {
4647
+ } else if (ast instanceof Call2 && (ast.receiver instanceof PropertyRead4 || ast.receiver instanceof SafePropertyRead3)) {
4648
+ if (ast.receiver.receiver instanceof ImplicitReceiver4 && !(ast.receiver.receiver instanceof ThisReceiver) && ast.receiver.name === "$any" && ast.args.length === 1) {
4624
4649
  const expr = this.translate(ast.args[0]);
4625
4650
  const exprAsAny = ts27.createAsExpression(expr, ts27.createKeywordTypeNode(ts27.SyntaxKind.AnyKeyword));
4626
4651
  const result = ts27.createParen(exprAsAny);
@@ -4751,7 +4776,7 @@ function isSplitTwoWayBinding(inputName, output, inputs, tcb) {
4751
4776
  }
4752
4777
  var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
4753
4778
  resolve(ast) {
4754
- if (ast instanceof PropertyRead2 && ast.receiver instanceof ImplicitReceiver4 && !(ast.receiver instanceof ThisReceiver) && ast.name === EVENT_PARAMETER) {
4779
+ if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver4 && !(ast.receiver instanceof ThisReceiver) && ast.name === EVENT_PARAMETER) {
4755
4780
  const event = ts27.createIdentifier(EVENT_PARAMETER);
4756
4781
  addParseSpanInfo(event, ast.nameSpan);
4757
4782
  return event;
@@ -4760,7 +4785,7 @@ var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
4760
4785
  }
4761
4786
  };
4762
4787
 
4763
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
4788
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
4764
4789
  import ts28 from "typescript";
4765
4790
  var TypeCheckFile = class extends Environment {
4766
4791
  constructor(fileName, config, refEmitter, reflector, compilerHost) {
@@ -4796,7 +4821,7 @@ var TypeCheckFile = class extends Environment {
4796
4821
  }
4797
4822
  };
4798
4823
 
4799
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
4824
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
4800
4825
  var InliningMode;
4801
4826
  (function(InliningMode2) {
4802
4827
  InliningMode2[InliningMode2["InlineOps"] = 0] = "InlineOps";
@@ -4811,9 +4836,9 @@ var TypeCheckContextImpl = class {
4811
4836
  this.host = host;
4812
4837
  this.inlining = inlining;
4813
4838
  this.perf = perf;
4814
- this.fileMap = new Map();
4815
- this.opMap = new Map();
4816
- this.typeCtorPending = new Set();
4839
+ this.fileMap = /* @__PURE__ */ new Map();
4840
+ this.opMap = /* @__PURE__ */ new Map();
4841
+ this.typeCtorPending = /* @__PURE__ */ new Set();
4817
4842
  if (inlining === InliningMode.Error && config.useInlineTypeConstructors) {
4818
4843
  throw new Error(`AssertionError: invalid inlining configuration.`);
4819
4844
  }
@@ -4834,7 +4859,7 @@ var TypeCheckContextImpl = class {
4834
4859
  for (const dir of boundTarget.getUsedDirectives()) {
4835
4860
  const dirRef = dir.ref;
4836
4861
  const dirNode = dirRef.node;
4837
- if (!dir.isGeneric || !requiresInlineTypeCtor(dirNode, this.reflector)) {
4862
+ if (!dir.isGeneric || !requiresInlineTypeCtor(dirNode, this.reflector, shimData.file)) {
4838
4863
  continue;
4839
4864
  }
4840
4865
  this.addInlineTypeCtor(fileData, dirNode.getSourceFile(), dirRef, {
@@ -4854,7 +4879,7 @@ var TypeCheckContextImpl = class {
4854
4879
  boundTarget,
4855
4880
  templateDiagnostics
4856
4881
  });
4857
- const inliningRequirement = requiresInlineTypeCheckBlock(ref.node, pipes, this.reflector);
4882
+ const inliningRequirement = requiresInlineTypeCheckBlock(ref.node, shimData.file, pipes, this.reflector);
4858
4883
  if (this.inlining === InliningMode.Error && inliningRequirement === TcbInliningRequirement.MustInline) {
4859
4884
  shimData.oobRecorder.requiresInlineTcb(templateId, ref.node);
4860
4885
  this.perf.eventCount(PerfEvent.SkipGenerateTcbNoInline);
@@ -4905,7 +4930,7 @@ var TypeCheckContextImpl = class {
4905
4930
  return code;
4906
4931
  }
4907
4932
  finalize() {
4908
- const updates = new Map();
4933
+ const updates = /* @__PURE__ */ new Map();
4909
4934
  for (const originalSf of this.opMap.keys()) {
4910
4935
  const newText = this.transform(originalSf);
4911
4936
  if (newText !== null) {
@@ -4952,7 +4977,7 @@ var TypeCheckContextImpl = class {
4952
4977
  domSchemaChecker: new RegistryDomSchemaChecker(fileData.sourceManager),
4953
4978
  oobRecorder: new OutOfBandDiagnosticRecorderImpl(fileData.sourceManager),
4954
4979
  file: new TypeCheckFile(shimPath, this.config, this.refEmitter, this.reflector, this.compilerHost),
4955
- templates: new Map()
4980
+ templates: /* @__PURE__ */ new Map()
4956
4981
  });
4957
4982
  }
4958
4983
  return fileData.shimData.get(shimPath);
@@ -4963,7 +4988,7 @@ var TypeCheckContextImpl = class {
4963
4988
  const data = {
4964
4989
  hasInlines: false,
4965
4990
  sourceManager: this.host.getSourceManager(sfPath),
4966
- shimData: new Map()
4991
+ shimData: /* @__PURE__ */ new Map()
4967
4992
  };
4968
4993
  this.fileMap.set(sfPath, data);
4969
4994
  }
@@ -5026,10 +5051,10 @@ function splitStringAtPoints(str, points) {
5026
5051
  return splits;
5027
5052
  }
5028
5053
 
5029
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
5054
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
5030
5055
  import { ParseLocation, ParseSourceSpan } from "@angular/compiler";
5031
5056
 
5032
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
5057
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
5033
5058
  var LF_CHAR = 10;
5034
5059
  var CR_CHAR = 13;
5035
5060
  var LINE_SEP_CHAR = 8232;
@@ -5070,7 +5095,7 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
5070
5095
  return low - 1;
5071
5096
  }
5072
5097
 
5073
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
5098
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
5074
5099
  var TemplateSource = class {
5075
5100
  constructor(mapping, file) {
5076
5101
  this.mapping = mapping;
@@ -5096,7 +5121,7 @@ var TemplateSource = class {
5096
5121
  };
5097
5122
  var TemplateSourceManager = class {
5098
5123
  constructor() {
5099
- this.templateSources = new Map();
5124
+ this.templateSources = /* @__PURE__ */ new Map();
5100
5125
  }
5101
5126
  getTemplateId(node) {
5102
5127
  return getTemplateId(node);
@@ -5121,8 +5146,8 @@ var TemplateSourceManager = class {
5121
5146
  }
5122
5147
  };
5123
5148
 
5124
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
5125
- import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead3, PropertyWrite as PropertyWrite3, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
5149
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
5150
+ import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
5126
5151
  import ts30 from "typescript";
5127
5152
  var SymbolBuilder = class {
5128
5153
  constructor(shimPath, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
@@ -5131,7 +5156,7 @@ var SymbolBuilder = class {
5131
5156
  this.templateData = templateData;
5132
5157
  this.componentScopeReader = componentScopeReader;
5133
5158
  this.getTypeChecker = getTypeChecker;
5134
- this.symbolCache = new Map();
5159
+ this.symbolCache = /* @__PURE__ */ new Map();
5135
5160
  }
5136
5161
  getSymbol(node) {
5137
5162
  if (this.symbolCache.has(node)) {
@@ -5474,11 +5499,11 @@ var SymbolBuilder = class {
5474
5499
  return this.getSymbol(expressionTarget);
5475
5500
  }
5476
5501
  let withSpan = expression.sourceSpan;
5477
- if (expression instanceof PropertyWrite3) {
5502
+ if (expression instanceof PropertyWrite4) {
5478
5503
  withSpan = expression.nameSpan;
5479
5504
  }
5480
5505
  let node = null;
5481
- if (expression instanceof PropertyRead3) {
5506
+ if (expression instanceof PropertyRead5) {
5482
5507
  node = findFirstMatchingNode(this.typeCheckBlock, { withSpan, filter: ts30.isPropertyAccessExpression });
5483
5508
  }
5484
5509
  if (node === null) {
@@ -5546,7 +5571,7 @@ function sourceSpanEqual(a, b) {
5546
5571
  return a.start.offset === b.start.offset && a.end.offset === b.end.offset;
5547
5572
  }
5548
5573
 
5549
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
5574
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
5550
5575
  var REGISTRY2 = new DomElementSchemaRegistry2();
5551
5576
  var TemplateTypeCheckerImpl = class {
5552
5577
  constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, componentScopeReader, typeCheckScopeRegistry, perf) {
@@ -5561,11 +5586,11 @@ var TemplateTypeCheckerImpl = class {
5561
5586
  this.componentScopeReader = componentScopeReader;
5562
5587
  this.typeCheckScopeRegistry = typeCheckScopeRegistry;
5563
5588
  this.perf = perf;
5564
- this.state = new Map();
5565
- this.completionCache = new Map();
5566
- this.symbolBuilderCache = new Map();
5567
- this.scopeCache = new Map();
5568
- this.elementTagCache = new Map();
5589
+ this.state = /* @__PURE__ */ new Map();
5590
+ this.completionCache = /* @__PURE__ */ new Map();
5591
+ this.symbolBuilderCache = /* @__PURE__ */ new Map();
5592
+ this.scopeCache = /* @__PURE__ */ new Map();
5593
+ this.elementTagCache = /* @__PURE__ */ new Map();
5569
5594
  this.isComplete = false;
5570
5595
  }
5571
5596
  getTemplate(component) {
@@ -5848,7 +5873,7 @@ var TemplateTypeCheckerImpl = class {
5848
5873
  hasInlines: false,
5849
5874
  sourceManager: new TemplateSourceManager(),
5850
5875
  isComplete: false,
5851
- shimData: new Map()
5876
+ shimData: /* @__PURE__ */ new Map()
5852
5877
  });
5853
5878
  }
5854
5879
  return this.state.get(path2);
@@ -5896,7 +5921,7 @@ var TemplateTypeCheckerImpl = class {
5896
5921
  if (this.elementTagCache.has(component)) {
5897
5922
  return this.elementTagCache.get(component);
5898
5923
  }
5899
- const tagMap = new Map();
5924
+ const tagMap = /* @__PURE__ */ new Map();
5900
5925
  for (const tag of REGISTRY2.allKnownElementNames()) {
5901
5926
  tagMap.set(tag, null);
5902
5927
  }
@@ -6062,30 +6087,10 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
6062
6087
  }
6063
6088
  };
6064
6089
 
6065
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
6066
- var ExtendedTemplateCheckerImpl = class {
6067
- constructor(templateTypeChecker, typeChecker, templateChecks) {
6068
- this.templateChecks = templateChecks;
6069
- this.ctx = { templateTypeChecker, typeChecker };
6070
- }
6071
- getDiagnosticsForComponent(component) {
6072
- const template = this.ctx.templateTypeChecker.getTemplate(component);
6073
- if (template === null) {
6074
- return [];
6075
- }
6076
- const diagnostics = [];
6077
- for (const check of this.templateChecks) {
6078
- diagnostics.push(...check.run(this.ctx, component, template));
6079
- }
6080
- return diagnostics;
6081
- }
6082
- };
6083
-
6084
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
6090
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
6085
6091
  import { TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
6086
- import ts31 from "typescript";
6087
6092
 
6088
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
6093
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
6089
6094
  import { ASTWithSource as ASTWithSource4, RecursiveAstVisitor as RecursiveAstVisitor3 } from "@angular/compiler";
6090
6095
  var TemplateCheckWithVisitor = class {
6091
6096
  run(ctx, component, template) {
@@ -6162,7 +6167,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor3 {
6162
6167
  }
6163
6168
  };
6164
6169
 
6165
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
6170
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
6166
6171
  var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
6167
6172
  constructor() {
6168
6173
  super(...arguments);
@@ -6176,15 +6181,19 @@ var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
6176
6181
  return [];
6177
6182
  const boundSyntax = node.sourceSpan.toString();
6178
6183
  const expectedBoundSyntax = boundSyntax.replace(`(${name})`, `[(${name.slice(1, -1)})]`);
6179
- const diagnostic = ctx.templateTypeChecker.makeTemplateDiagnostic(component, node.sourceSpan, ts31.DiagnosticCategory.Warning, ErrorCode.INVALID_BANANA_IN_BOX, `In the two-way binding syntax the parentheses should be inside the brackets, ex. '${expectedBoundSyntax}'.
6184
+ const diagnostic = ctx.makeTemplateDiagnostic(node.sourceSpan, `In the two-way binding syntax the parentheses should be inside the brackets, ex. '${expectedBoundSyntax}'.
6180
6185
  Find more at https://angular.io/guide/two-way-binding`);
6181
6186
  return [diagnostic];
6182
6187
  }
6183
6188
  };
6189
+ var factory = {
6190
+ code: ErrorCode.INVALID_BANANA_IN_BOX,
6191
+ name: ExtendedTemplateDiagnosticName.INVALID_BANANA_IN_BOX,
6192
+ create: () => new InvalidBananaInBoxCheck()
6193
+ };
6184
6194
 
6185
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
6195
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
6186
6196
  import { Binary } from "@angular/compiler";
6187
- import ts32 from "typescript";
6188
6197
  var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
6189
6198
  constructor() {
6190
6199
  super(...arguments);
@@ -6205,12 +6214,91 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
6205
6214
  return [];
6206
6215
  }
6207
6216
  const span = ctx.templateTypeChecker.getTemplateMappingAtShimLocation(symbol.shimLocation).span;
6208
- const diagnostic = ctx.templateTypeChecker.makeTemplateDiagnostic(component, span, ts32.DiagnosticCategory.Warning, ErrorCode.NULLISH_COALESCING_NOT_NULLABLE, `The left side of this nullish coalescing operation does not include 'null' or 'undefined' in its type, therefore the '??' operator can be safely removed.`);
6217
+ const diagnostic = ctx.makeTemplateDiagnostic(span, `The left side of this nullish coalescing operation does not include 'null' or 'undefined' in its type, therefore the '??' operator can be safely removed.`);
6209
6218
  return [diagnostic];
6210
6219
  }
6211
6220
  };
6221
+ var factory2 = {
6222
+ code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
6223
+ name: ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
6224
+ create: (options) => {
6225
+ if (options.strictNullChecks === false) {
6226
+ return null;
6227
+ }
6228
+ return new NullishCoalescingNotNullableCheck();
6229
+ }
6230
+ };
6212
6231
 
6213
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
6232
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
6233
+ import ts31 from "typescript";
6234
+
6235
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
6236
+ var DiagnosticCategoryLabel;
6237
+ (function(DiagnosticCategoryLabel2) {
6238
+ DiagnosticCategoryLabel2["Warning"] = "warning";
6239
+ DiagnosticCategoryLabel2["Error"] = "error";
6240
+ DiagnosticCategoryLabel2["Suppress"] = "suppress";
6241
+ })(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
6242
+
6243
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
6244
+ var ExtendedTemplateCheckerImpl = class {
6245
+ constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
6246
+ var _a, _b, _c, _d, _e;
6247
+ this.partialCtx = { templateTypeChecker, typeChecker };
6248
+ this.templateChecks = /* @__PURE__ */ new Map();
6249
+ for (const factory3 of templateCheckFactories) {
6250
+ const category = diagnosticLabelToCategory((_e = (_d = (_b = (_a = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _a.checks) == null ? void 0 : _b[factory3.name]) != null ? _d : (_c = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) != null ? _e : DiagnosticCategoryLabel.Warning);
6251
+ if (category === null) {
6252
+ continue;
6253
+ }
6254
+ const check = factory3.create(options);
6255
+ if (check === null) {
6256
+ continue;
6257
+ }
6258
+ this.templateChecks.set(check, category);
6259
+ }
6260
+ }
6261
+ getDiagnosticsForComponent(component) {
6262
+ const template = this.partialCtx.templateTypeChecker.getTemplate(component);
6263
+ if (template === null) {
6264
+ return [];
6265
+ }
6266
+ const diagnostics = [];
6267
+ for (const [check, category] of this.templateChecks.entries()) {
6268
+ const ctx = __spreadProps(__spreadValues({}, this.partialCtx), {
6269
+ makeTemplateDiagnostic: (span, message, relatedInformation) => {
6270
+ return this.partialCtx.templateTypeChecker.makeTemplateDiagnostic(component, span, category, check.code, message, relatedInformation);
6271
+ }
6272
+ });
6273
+ diagnostics.push(...check.run(ctx, component, template));
6274
+ }
6275
+ return diagnostics;
6276
+ }
6277
+ };
6278
+ function diagnosticLabelToCategory(label) {
6279
+ switch (label) {
6280
+ case DiagnosticCategoryLabel.Warning:
6281
+ return ts31.DiagnosticCategory.Warning;
6282
+ case DiagnosticCategoryLabel.Error:
6283
+ return ts31.DiagnosticCategory.Error;
6284
+ case DiagnosticCategoryLabel.Suppress:
6285
+ return null;
6286
+ default:
6287
+ return assertNever(label);
6288
+ }
6289
+ }
6290
+ function assertNever(value) {
6291
+ throw new Error(`Unexpected call to 'assertNever()' with value:
6292
+ ${value}`);
6293
+ }
6294
+
6295
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
6296
+ var ALL_DIAGNOSTIC_FACTORIES = [
6297
+ factory,
6298
+ factory2
6299
+ ];
6300
+
6301
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
6214
6302
  var CompilationTicketKind;
6215
6303
  (function(CompilationTicketKind2) {
6216
6304
  CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
@@ -6286,15 +6374,11 @@ var NgCompiler = class {
6286
6374
  if (this.options._extendedTemplateDiagnostics === true && this.options.strictTemplates === false) {
6287
6375
  throw new Error("The '_extendedTemplateDiagnostics' option requires 'strictTemplates' to also be enabled.");
6288
6376
  }
6289
- this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics);
6290
- const incompatibleTypeCheckOptionsDiagnostic = verifyCompatibleTypeCheckOptions(this.options);
6291
- if (incompatibleTypeCheckOptionsDiagnostic !== null) {
6292
- this.constructionDiagnostics.push(incompatibleTypeCheckOptionsDiagnostic);
6293
- }
6377
+ this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
6294
6378
  this.currentProgram = inputProgram;
6295
6379
  this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
6296
6380
  this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
6297
- const moduleResolutionCache = ts33.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6381
+ const moduleResolutionCache = ts32.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6298
6382
  this.moduleResolver = new ModuleResolver(inputProgram, this.options, this.adapter, moduleResolutionCache);
6299
6383
  this.resourceManager = new AdapterResourceLoader(adapter, this.options);
6300
6384
  this.cycleAnalyzer = new CycleAnalyzer(new ImportGraph(inputProgram.getTypeChecker(), this.delegatingPerfRecorder));
@@ -6339,7 +6423,7 @@ var NgCompiler = class {
6339
6423
  return;
6340
6424
  }
6341
6425
  this.resourceManager.invalidate();
6342
- const classesToUpdate = new Set();
6426
+ const classesToUpdate = /* @__PURE__ */ new Set();
6343
6427
  for (const resourceFile of changedResources) {
6344
6428
  for (const templateClass of this.getComponentsWithTemplateFile(resourceFile)) {
6345
6429
  classesToUpdate.add(templateClass);
@@ -6350,7 +6434,7 @@ var NgCompiler = class {
6350
6434
  }
6351
6435
  for (const clazz of classesToUpdate) {
6352
6436
  this.compilation.traitCompiler.updateResources(clazz);
6353
- if (!ts33.isClassDeclaration(clazz)) {
6437
+ if (!ts32.isClassDeclaration(clazz)) {
6354
6438
  continue;
6355
6439
  }
6356
6440
  this.compilation.templateTypeChecker.invalidateClass(clazz);
@@ -6731,11 +6815,7 @@ var NgCompiler = class {
6731
6815
  this.currentProgram = program;
6732
6816
  });
6733
6817
  const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, this.getTypeCheckingConfig(), refEmitter, reflector, this.adapter, this.incrementalCompilation, scopeRegistry, typeCheckScopeRegistry, this.delegatingPerfRecorder);
6734
- const templateChecks = [new InvalidBananaInBoxCheck()];
6735
- if (this.options.strictNullChecks) {
6736
- templateChecks.push(new NullishCoalescingNotNullableCheck());
6737
- }
6738
- const extendedTemplateChecker = new ExtendedTemplateCheckerImpl(templateTypeChecker, checker, templateChecks);
6818
+ const extendedTemplateChecker = new ExtendedTemplateCheckerImpl(templateTypeChecker, checker, ALL_DIAGNOSTIC_FACTORIES, this.options);
6739
6819
  return {
6740
6820
  isCore,
6741
6821
  traitCompiler,
@@ -6759,17 +6839,17 @@ function isAngularCorePackage(program) {
6759
6839
  return false;
6760
6840
  }
6761
6841
  return r3Symbols.statements.some((stmt) => {
6762
- if (!ts33.isVariableStatement(stmt)) {
6842
+ if (!ts32.isVariableStatement(stmt)) {
6763
6843
  return false;
6764
6844
  }
6765
- if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts33.SyntaxKind.ExportKeyword)) {
6845
+ if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts32.SyntaxKind.ExportKeyword)) {
6766
6846
  return false;
6767
6847
  }
6768
6848
  return stmt.declarationList.declarations.some((decl) => {
6769
- if (!ts33.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6849
+ if (!ts32.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6770
6850
  return false;
6771
6851
  }
6772
- if (decl.initializer === void 0 || decl.initializer.kind !== ts33.SyntaxKind.TrueKeyword) {
6852
+ if (decl.initializer === void 0 || decl.initializer.kind !== ts32.SyntaxKind.TrueKeyword) {
6773
6853
  return false;
6774
6854
  }
6775
6855
  return true;
@@ -6779,15 +6859,14 @@ function isAngularCorePackage(program) {
6779
6859
  function getR3SymbolsFile(program) {
6780
6860
  return program.getSourceFiles().find((file) => file.fileName.indexOf("r3_symbols.ts") >= 0) || null;
6781
6861
  }
6782
- function verifyCompatibleTypeCheckOptions(options) {
6862
+ function* verifyCompatibleTypeCheckOptions(options) {
6863
+ var _a, _b, _c;
6783
6864
  if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
6784
- return {
6785
- category: ts33.DiagnosticCategory.Error,
6786
- code: ngErrorCode(ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK),
6787
- file: void 0,
6788
- start: void 0,
6789
- length: void 0,
6790
- messageText: `Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
6865
+ yield makeConfigDiagnostic({
6866
+ category: ts32.DiagnosticCategory.Error,
6867
+ code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
6868
+ messageText: `
6869
+ Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
6791
6870
 
6792
6871
  Having the "strictTemplates" flag enabled implies that "fullTemplateTypeCheck" is also enabled, so
6793
6872
  the latter can not be explicitly disabled.
@@ -6797,10 +6876,76 @@ One of the following actions is required:
6797
6876
  2. Remove "strictTemplates" or set it to 'false'.
6798
6877
 
6799
6878
  More information about the template type checking compiler options can be found in the documentation:
6800
- https://v9.angular.io/guide/template-typecheck#template-type-checking`
6801
- };
6879
+ https://angular.io/guide/template-typecheck
6880
+ `.trim()
6881
+ });
6802
6882
  }
6803
- return null;
6883
+ if (options.extendedDiagnostics && options.strictTemplates === false) {
6884
+ yield makeConfigDiagnostic({
6885
+ category: ts32.DiagnosticCategory.Error,
6886
+ code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
6887
+ messageText: `
6888
+ Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
6889
+
6890
+ Using "extendedDiagnostics" requires that "strictTemplates" is also enabled.
6891
+
6892
+ One of the following actions is required:
6893
+ 1. Remove "strictTemplates: false" to enable it.
6894
+ 2. Remove "extendedDiagnostics" configuration to disable them.
6895
+ `.trim()
6896
+ });
6897
+ }
6898
+ const allowedCategoryLabels = Array.from(Object.values(DiagnosticCategoryLabel));
6899
+ const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
6900
+ if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
6901
+ yield makeConfigDiagnostic({
6902
+ category: ts32.DiagnosticCategory.Error,
6903
+ code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6904
+ messageText: `
6905
+ Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
6906
+
6907
+ Allowed diagnostic categories are:
6908
+ ${allowedCategoryLabels.join("\n")}
6909
+ `.trim()
6910
+ });
6911
+ }
6912
+ const allExtendedDiagnosticNames = ALL_DIAGNOSTIC_FACTORIES.map((factory3) => factory3.name);
6913
+ for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
6914
+ if (!allExtendedDiagnosticNames.includes(checkName)) {
6915
+ yield makeConfigDiagnostic({
6916
+ category: ts32.DiagnosticCategory.Error,
6917
+ code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
6918
+ messageText: `
6919
+ Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
6920
+
6921
+ Allowed check names are:
6922
+ ${allExtendedDiagnosticNames.join("\n")}
6923
+ `.trim()
6924
+ });
6925
+ }
6926
+ if (!allowedCategoryLabels.includes(category)) {
6927
+ yield makeConfigDiagnostic({
6928
+ category: ts32.DiagnosticCategory.Error,
6929
+ code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6930
+ messageText: `
6931
+ Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
6932
+
6933
+ Allowed diagnostic categories are:
6934
+ ${allowedCategoryLabels.join("\n")}
6935
+ `.trim()
6936
+ });
6937
+ }
6938
+ }
6939
+ }
6940
+ function makeConfigDiagnostic({ category, code, messageText }) {
6941
+ return {
6942
+ category,
6943
+ code: ngErrorCode(code),
6944
+ file: void 0,
6945
+ start: void 0,
6946
+ length: void 0,
6947
+ messageText
6948
+ };
6804
6949
  }
6805
6950
  var ReferenceGraphAdapter = class {
6806
6951
  constructor(graph) {
@@ -6810,7 +6955,7 @@ var ReferenceGraphAdapter = class {
6810
6955
  for (const { node } of references) {
6811
6956
  let sourceFile = node.getSourceFile();
6812
6957
  if (sourceFile === void 0) {
6813
- sourceFile = ts33.getOriginalNode(node).getSourceFile();
6958
+ sourceFile = ts32.getOriginalNode(node).getSourceFile();
6814
6959
  }
6815
6960
  if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
6816
6961
  this.graph.add(source, node);
@@ -6840,7 +6985,7 @@ function versionMapFromProgram(program, driver) {
6840
6985
  if (driver.getSourceFileVersion === void 0) {
6841
6986
  return null;
6842
6987
  }
6843
- const versions = new Map();
6988
+ const versions = /* @__PURE__ */ new Map();
6844
6989
  for (const possiblyRedirectedSourceFile of program.getSourceFiles()) {
6845
6990
  const sf = toUnredirectedSourceFile(possiblyRedirectedSourceFile);
6846
6991
  versions.set(absoluteFromSourceFile(sf), driver.getSourceFileVersion(sf));
@@ -6848,8 +6993,8 @@ function versionMapFromProgram(program, driver) {
6848
6993
  return versions;
6849
6994
  }
6850
6995
 
6851
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
6852
- import ts34 from "typescript";
6996
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
6997
+ import ts33 from "typescript";
6853
6998
  var DelegatingCompilerHost2 = class {
6854
6999
  constructor(delegate) {
6855
7000
  this.delegate = delegate;
@@ -6939,7 +7084,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6939
7084
  entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
6940
7085
  if (entryPoint === null) {
6941
7086
  diagnostics.push({
6942
- category: ts34.DiagnosticCategory.Error,
7087
+ category: ts33.DiagnosticCategory.Error,
6943
7088
  code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
6944
7089
  file: void 0,
6945
7090
  start: void 0,
@@ -6979,17 +7124,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6979
7124
  return this.fileNameToModuleName !== void 0 ? this : null;
6980
7125
  }
6981
7126
  createCachedResolveModuleNamesFunction() {
6982
- const moduleResolutionCache = ts34.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
7127
+ const moduleResolutionCache = ts33.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
6983
7128
  return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
6984
7129
  return moduleNames.map((moduleName) => {
6985
- const module = ts34.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
7130
+ const module = ts33.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
6986
7131
  return module.resolvedModule;
6987
7132
  });
6988
7133
  };
6989
7134
  }
6990
7135
  };
6991
7136
 
6992
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
7137
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
6993
7138
  var NgtscProgram = class {
6994
7139
  constructor(rootNames, options, delegateHost, oldProgram) {
6995
7140
  this.options = options;
@@ -7003,14 +7148,14 @@ var NgtscProgram = class {
7003
7148
  if (reuseProgram !== void 0) {
7004
7149
  retagAllTsFiles(reuseProgram);
7005
7150
  }
7006
- this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts35.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
7151
+ this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts34.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
7007
7152
  perfRecorder.phase(PerfPhase.Unaccounted);
7008
7153
  perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
7009
7154
  this.host.postProgramCreationCleanup();
7010
7155
  untagAllTsFiles(this.tsProgram);
7011
7156
  const programDriver = new TsCreateProgramDriver(this.tsProgram, this.host, this.options, this.host.shimExtensionPrefixes);
7012
7157
  this.incrementalStrategy = oldProgram !== void 0 ? oldProgram.incrementalStrategy.toNextBuildStrategy() : new TrackedIncrementalBuildStrategy();
7013
- const modifiedResourceFiles = new Set();
7158
+ const modifiedResourceFiles = /* @__PURE__ */ new Set();
7014
7159
  if (this.host.getModifiedResourceFiles !== void 0) {
7015
7160
  const strings = this.host.getModifiedResourceFiles();
7016
7161
  if (strings !== void 0) {
@@ -7196,39 +7341,38 @@ function mergeEmitResults(emitResults) {
7196
7341
  return { diagnostics, emitSkipped, emittedFiles };
7197
7342
  }
7198
7343
 
7199
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
7344
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
7200
7345
  function createProgram({ rootNames, options, host, oldProgram }) {
7201
7346
  return new NgtscProgram(rootNames, options, host, oldProgram);
7202
7347
  }
7203
7348
 
7204
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
7205
- import { isSyntaxError } from "@angular/compiler";
7206
- import ts37 from "typescript";
7207
-
7208
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
7349
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
7209
7350
  import ts36 from "typescript";
7351
+
7352
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
7353
+ import ts35 from "typescript";
7210
7354
  var GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
7211
7355
  function createMessageDiagnostic(messageText) {
7212
7356
  return {
7213
7357
  file: void 0,
7214
7358
  start: void 0,
7215
7359
  length: void 0,
7216
- category: ts36.DiagnosticCategory.Message,
7360
+ category: ts35.DiagnosticCategory.Message,
7217
7361
  messageText,
7218
7362
  code: DEFAULT_ERROR_CODE,
7219
7363
  source: SOURCE
7220
7364
  };
7221
7365
  }
7222
7366
 
7223
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
7367
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
7224
7368
  var defaultFormatHost = {
7225
- getCurrentDirectory: () => ts37.sys.getCurrentDirectory(),
7369
+ getCurrentDirectory: () => ts36.sys.getCurrentDirectory(),
7226
7370
  getCanonicalFileName: (fileName) => fileName,
7227
- getNewLine: () => ts37.sys.newLine
7371
+ getNewLine: () => ts36.sys.newLine
7228
7372
  };
7229
7373
  function formatDiagnostics(diags, host = defaultFormatHost) {
7230
7374
  if (diags && diags.length) {
7231
- return diags.map((diagnostic) => replaceTsWithNgInErrors(ts37.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7375
+ return diags.map((diagnostic) => replaceTsWithNgInErrors(ts36.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7232
7376
  } else {
7233
7377
  return "";
7234
7378
  }
@@ -7245,7 +7389,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7245
7389
  var _a;
7246
7390
  try {
7247
7391
  const fs = getFileSystem();
7248
- const readConfigFile = (configFile) => ts37.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7392
+ const readConfigFile = (configFile) => ts36.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7249
7393
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
7250
7394
  const { config: config2, error: error2 } = readConfigFile(configFile);
7251
7395
  if (error2) {
@@ -7277,7 +7421,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7277
7421
  basePath
7278
7422
  }, readAngularCompilerOptions(configFileName)), existingOptions);
7279
7423
  const parseConfigHost = createParseConfigHost(host, fs);
7280
- const { options, errors, fileNames: rootNames, projectReferences } = ts37.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7424
+ const { options, errors, fileNames: rootNames, projectReferences } = ts36.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7281
7425
  options.enableIvy = !!((_a = options.enableIvy) != null ? _a : true);
7282
7426
  let emitFlags = EmitFlags.Default;
7283
7427
  if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
@@ -7289,7 +7433,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7289
7433
  return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
7290
7434
  } catch (e) {
7291
7435
  const errors = [{
7292
- category: ts37.DiagnosticCategory.Error,
7436
+ category: ts36.DiagnosticCategory.Error,
7293
7437
  messageText: e.stack,
7294
7438
  file: void 0,
7295
7439
  start: void 0,
@@ -7303,7 +7447,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7303
7447
  function createParseConfigHost(host, fs = getFileSystem()) {
7304
7448
  return {
7305
7449
  fileExists: host.exists.bind(host),
7306
- readDirectory: ts37.sys.readDirectory,
7450
+ readDirectory: ts36.sys.readDirectory,
7307
7451
  readFile: host.readFile.bind(host),
7308
7452
  useCaseSensitiveFileNames: fs.isCaseSensitive()
7309
7453
  };
@@ -7323,7 +7467,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7323
7467
  }
7324
7468
  } else {
7325
7469
  const parseConfigHost = createParseConfigHost(host, fs);
7326
- const { resolvedModule } = ts37.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts37.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7470
+ const { resolvedModule } = ts36.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts36.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7327
7471
  if (resolvedModule) {
7328
7472
  return absoluteFrom(resolvedModule.resolvedFileName);
7329
7473
  }
@@ -7333,7 +7477,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7333
7477
  function exitCodeFromResult(diags) {
7334
7478
  if (!diags)
7335
7479
  return 0;
7336
- if (diags.every((diag) => diag.category !== ts37.DiagnosticCategory.Error)) {
7480
+ if (diags.every((diag) => diag.category !== ts36.DiagnosticCategory.Error)) {
7337
7481
  return 0;
7338
7482
  }
7339
7483
  return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
@@ -7363,20 +7507,11 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
7363
7507
  }
7364
7508
  return { diagnostics: allDiagnostics, program };
7365
7509
  } catch (e) {
7366
- let errMsg;
7367
- let code;
7368
- if (isSyntaxError(e)) {
7369
- errMsg = e.message;
7370
- code = DEFAULT_ERROR_CODE;
7371
- } else {
7372
- errMsg = e.stack;
7373
- program = void 0;
7374
- code = UNKNOWN_ERROR_CODE;
7375
- }
7510
+ program = void 0;
7376
7511
  allDiagnostics.push({
7377
- category: ts37.DiagnosticCategory.Error,
7378
- messageText: errMsg,
7379
- code,
7512
+ category: ts36.DiagnosticCategory.Error,
7513
+ messageText: e.stack,
7514
+ code: UNKNOWN_ERROR_CODE,
7380
7515
  file: void 0,
7381
7516
  start: void 0,
7382
7517
  length: void 0
@@ -7401,7 +7536,7 @@ function defaultGatherDiagnostics(program) {
7401
7536
  return allDiagnostics;
7402
7537
  }
7403
7538
  function hasErrors(diags) {
7404
- return diags.some((d) => d.category === ts37.DiagnosticCategory.Error);
7539
+ return diags.some((d) => d.category === ts36.DiagnosticCategory.Error);
7405
7540
  }
7406
7541
 
7407
7542
  export {
@@ -7443,4 +7578,4 @@ export {
7443
7578
  * found in the LICENSE file at https://angular.io/license
7444
7579
  */
7445
7580
  // Closure Compiler ignores @suppress and similar if the comment contains @license.
7446
- //# sourceMappingURL=chunk-P5ZW5MI4.js.map
7581
+ //# sourceMappingURL=chunk-TUNE6DP3.js.map