@angular/compiler-cli 19.0.0-next.1 → 19.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/bundles/{chunk-XNL3EK5H.js → chunk-3W345P4E.js} +7 -7
  2. package/bundles/{chunk-CNPXFKGI.js → chunk-5EC5IVIP.js} +3 -3
  3. package/bundles/{chunk-QJ5A7O7J.js → chunk-5LDY2XWV.js} +306 -173
  4. package/bundles/chunk-5LDY2XWV.js.map +6 -0
  5. package/bundles/{chunk-B4ZOGV3N.js → chunk-A6N6CPYP.js} +31 -31
  6. package/bundles/{chunk-UWZBW4E4.js → chunk-DAD6G43L.js} +5 -5
  7. package/bundles/{chunk-THQF5ZZE.js → chunk-ERN7RQQ7.js} +5 -5
  8. package/bundles/{chunk-VNKFV2MZ.js → chunk-IYQOLQCE.js} +147 -156
  9. package/bundles/chunk-IYQOLQCE.js.map +6 -0
  10. package/bundles/{chunk-SBDNBITT.js → chunk-LYJKWJUC.js} +3 -3
  11. package/bundles/{chunk-WR7TUJ7M.js → chunk-QYV344EV.js} +7 -7
  12. package/bundles/{chunk-DK2K5DIA.js → chunk-RRBD35GS.js} +12 -12
  13. package/bundles/{chunk-5DVL3S3Z.js → chunk-XHCHVVK2.js} +47 -45
  14. package/bundles/chunk-XHCHVVK2.js.map +6 -0
  15. package/bundles/index.js +12 -12
  16. package/bundles/linker/babel/index.js +12 -12
  17. package/bundles/linker/index.js +4 -4
  18. package/bundles/ngcc/index.js +1 -1
  19. package/bundles/private/bazel.js +1 -1
  20. package/bundles/private/localize.js +3 -3
  21. package/bundles/private/migrations.js +4 -4
  22. package/bundles/private/tooling.js +6 -6
  23. package/bundles/src/bin/ng_xi18n.js +10 -10
  24. package/bundles/src/bin/ngc.js +8 -8
  25. package/bundles_metadata.json +1 -1
  26. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  27. package/package.json +3 -3
  28. package/src/ngtsc/annotations/component/src/handler.d.ts +2 -1
  29. package/src/ngtsc/annotations/component/src/resources.d.ts +4 -3
  30. package/src/ngtsc/core/api/src/public_options.d.ts +7 -0
  31. package/src/ngtsc/core/src/compiler.d.ts +6 -1
  32. package/src/ngtsc/diagnostics/src/error.d.ts +1 -1
  33. package/src/ngtsc/diagnostics/src/error_code.d.ts +4 -0
  34. package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +2 -1
  35. package/src/ngtsc/docs/src/entities.d.ts +9 -0
  36. package/src/ngtsc/docs/src/extractor.d.ts +4 -1
  37. package/src/ngtsc/docs/src/import_extractor.d.ts +14 -0
  38. package/src/ngtsc/metadata/src/api.d.ts +4 -0
  39. package/src/ngtsc/program.d.ts +4 -1
  40. package/src/ngtsc/typecheck/api/api.d.ts +6 -0
  41. package/src/ngtsc/validation/src/config.d.ts +12 -0
  42. package/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.d.ts +23 -0
  43. package/src/ngtsc/validation/src/source_file_validator.d.ts +2 -1
  44. package/bundles/chunk-5DVL3S3Z.js.map +0 -6
  45. package/bundles/chunk-QJ5A7O7J.js.map +0 -6
  46. package/bundles/chunk-VNKFV2MZ.js.map +0 -6
  47. /package/bundles/{chunk-XNL3EK5H.js.map → chunk-3W345P4E.js.map} +0 -0
  48. /package/bundles/{chunk-CNPXFKGI.js.map → chunk-5EC5IVIP.js.map} +0 -0
  49. /package/bundles/{chunk-B4ZOGV3N.js.map → chunk-A6N6CPYP.js.map} +0 -0
  50. /package/bundles/{chunk-UWZBW4E4.js.map → chunk-DAD6G43L.js.map} +0 -0
  51. /package/bundles/{chunk-THQF5ZZE.js.map → chunk-ERN7RQQ7.js.map} +0 -0
  52. /package/bundles/{chunk-SBDNBITT.js.map → chunk-LYJKWJUC.js.map} +0 -0
  53. /package/bundles/{chunk-WR7TUJ7M.js.map → chunk-QYV344EV.js.map} +0 -0
  54. /package/bundles/{chunk-DK2K5DIA.js.map → chunk-RRBD35GS.js.map} +0 -0
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "./chunk-DK2K5DIA.js";
7
+ } from "./chunk-RRBD35GS.js";
8
8
  import {
9
9
  CompilationMode,
10
10
  ComponentDecoratorHandler,
@@ -51,7 +51,7 @@ import {
51
51
  retagAllTsFiles,
52
52
  tryParseInitializerApi,
53
53
  untagAllTsFiles
54
- } from "./chunk-VNKFV2MZ.js";
54
+ } from "./chunk-IYQOLQCE.js";
55
55
  import {
56
56
  AbsoluteModuleStrategy,
57
57
  AliasStrategy,
@@ -82,19 +82,20 @@ import {
82
82
  isNamedClassDeclaration,
83
83
  isNonDeclarationTsPath,
84
84
  makeDiagnostic,
85
+ makeRelatedInformation,
85
86
  ngErrorCode,
86
87
  normalizeSeparators,
87
88
  relativePathBetween,
88
89
  replaceTsWithNgInErrors,
89
90
  toUnredirectedSourceFile
90
- } from "./chunk-5DVL3S3Z.js";
91
+ } from "./chunk-XHCHVVK2.js";
91
92
  import {
92
93
  ActivePerfRecorder,
93
94
  DelegatingPerfRecorder,
94
95
  PerfCheckpoint,
95
96
  PerfEvent,
96
97
  PerfPhase
97
- } from "./chunk-THQF5ZZE.js";
98
+ } from "./chunk-ERN7RQQ7.js";
98
99
  import {
99
100
  LogicalFileSystem,
100
101
  absoluteFrom,
@@ -103,9 +104,9 @@ import {
103
104
  getFileSystem,
104
105
  join,
105
106
  resolve
106
- } from "./chunk-XNL3EK5H.js";
107
+ } from "./chunk-3W345P4E.js";
107
108
 
108
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
109
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
109
110
  var DEFAULT_ERROR_CODE = 100;
110
111
  var UNKNOWN_ERROR_CODE = 500;
111
112
  var SOURCE = "angular";
@@ -123,7 +124,7 @@ var EmitFlags;
123
124
  EmitFlags2[EmitFlags2["All"] = 31] = "All";
124
125
  })(EmitFlags || (EmitFlags = {}));
125
126
 
126
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
127
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
127
128
  import ts from "typescript";
128
129
  var wrapHostForTest = null;
129
130
  function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, true) }) {
@@ -133,7 +134,7 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
133
134
  return tsHost;
134
135
  }
135
136
 
136
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/entities.mjs
137
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/entities.mjs
137
138
  var EntryType;
138
139
  (function(EntryType2) {
139
140
  EntryType2["Block"] = "block";
@@ -180,23 +181,23 @@ function isDocEntryWithSourceInfo(entry) {
180
181
  return "source" in entry;
181
182
  }
182
183
 
183
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
184
- import ts10 from "typescript";
184
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
185
+ import ts11 from "typescript";
185
186
 
186
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
187
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
187
188
  import ts5 from "typescript";
188
189
 
189
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/filters.mjs
190
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/filters.mjs
190
191
  function isAngularPrivateName(name) {
191
192
  var _a;
192
193
  const firstChar = (_a = name[0]) != null ? _a : "";
193
194
  return firstChar === "\u0275" || firstChar === "_";
194
195
  }
195
196
 
196
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
197
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
197
198
  import ts3 from "typescript";
198
199
 
199
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.mjs
200
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.mjs
200
201
  function extractGenerics(declaration) {
201
202
  var _a, _b;
202
203
  return (_b = (_a = declaration.typeParameters) == null ? void 0 : _a.map((typeParam) => {
@@ -209,7 +210,7 @@ function extractGenerics(declaration) {
209
210
  })) != null ? _b : [];
210
211
  }
211
212
 
212
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.mjs
213
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.mjs
213
214
  import ts2 from "typescript";
214
215
  var decoratorExpression = /@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf|ViewChild|ViewChildren|ContentChild|ContentChildren))/g;
215
216
  function extractJsDocTags(node) {
@@ -253,12 +254,12 @@ function unescapeAngularDecorators(comment) {
253
254
  return comment.replace(/_NG_AT_/g, "@");
254
255
  }
255
256
 
256
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.mjs
257
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.mjs
257
258
  function extractResolvedTypeString(node, checker) {
258
259
  return checker.typeToString(checker.getTypeAtLocation(node));
259
260
  }
260
261
 
261
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
262
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
262
263
  var FunctionExtractor = class {
263
264
  constructor(name, exportDeclaration, typeChecker) {
264
265
  this.name = name;
@@ -346,7 +347,7 @@ function findImplementationOfFunction(node, typeChecker) {
346
347
  return implementation;
347
348
  }
348
349
 
349
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/internal.mjs
350
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/internal.mjs
350
351
  import ts4 from "typescript";
351
352
  function isInternal(member) {
352
353
  return extractJsDocTags(member).some((tag) => tag.name === "internal") || hasLeadingInternalComment(member);
@@ -365,7 +366,7 @@ function hasLeadingInternalComment(member) {
365
366
  )) != null ? _a : false;
366
367
  }
367
368
 
368
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
369
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
369
370
  var ClassExtractor = class {
370
371
  constructor(declaration, typeChecker) {
371
372
  this.declaration = declaration;
@@ -380,7 +381,9 @@ var ClassExtractor = class {
380
381
  generics: extractGenerics(this.declaration),
381
382
  description: extractJsDocDescription(this.declaration),
382
383
  jsdocTags: extractJsDocTags(this.declaration),
383
- rawComment: extractRawJsDoc(this.declaration)
384
+ rawComment: extractRawJsDoc(this.declaration),
385
+ extends: this.extractInheritance(this.declaration),
386
+ implements: this.extractInterfaceConformance(this.declaration)
384
387
  };
385
388
  }
386
389
  extractAllClassMembers() {
@@ -440,6 +443,26 @@ var ClassExtractor = class {
440
443
  memberType: ts5.isGetAccessor(accessor) ? MemberType.Getter : MemberType.Setter
441
444
  };
442
445
  }
446
+ extractInheritance(declaration) {
447
+ if (!declaration.heritageClauses) {
448
+ return void 0;
449
+ }
450
+ for (const clause of declaration.heritageClauses) {
451
+ if (clause.token === ts5.SyntaxKind.ExtendsKeyword) {
452
+ const types = clause.types;
453
+ if (types.length > 0) {
454
+ const baseClass = types[0];
455
+ return baseClass.getText();
456
+ }
457
+ }
458
+ }
459
+ return void 0;
460
+ }
461
+ extractInterfaceConformance(declaration) {
462
+ var _a, _b;
463
+ const implementClause = (_a = declaration.heritageClauses) == null ? void 0 : _a.find((clause) => clause.token === ts5.SyntaxKind.ImplementsKeyword);
464
+ return (_b = implementClause == null ? void 0 : implementClause.types.map((m) => m.getText())) != null ? _b : [];
465
+ }
443
466
  getMemberTags(member) {
444
467
  var _a;
445
468
  const tags = this.getMemberTagsFromModifiers((_a = member.modifiers) != null ? _a : []);
@@ -631,7 +654,7 @@ function extractInterface(declaration, typeChecker) {
631
654
  return extractor.extract();
632
655
  }
633
656
 
634
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/constant_extractor.mjs
657
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/constant_extractor.mjs
635
658
  import ts6 from "typescript";
636
659
  var LITERAL_AS_ENUM_TAG = "object-literal-as-enum";
637
660
  function extractConstant(declaration, typeChecker) {
@@ -689,7 +712,7 @@ function extractLiteralPropertiesAsEnumMembers(declaration) {
689
712
  });
690
713
  }
691
714
 
692
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.mjs
715
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.mjs
693
716
  import ts7 from "typescript";
694
717
  function extractorDecorator(declaration, typeChecker) {
695
718
  const documentedNode = getDecoratorJsDocNode(declaration);
@@ -762,7 +785,7 @@ function getDecoratorJsDocNode(declaration) {
762
785
  return callSignature;
763
786
  }
764
787
 
765
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.mjs
788
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.mjs
766
789
  import ts8 from "typescript";
767
790
  function extractEnum(declaration, typeChecker) {
768
791
  return {
@@ -793,7 +816,7 @@ function getEnumMemberValue(memberNode) {
793
816
  return (_a = literal == null ? void 0 : literal.getText()) != null ? _a : "";
794
817
  }
795
818
 
796
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/initializer_api_function_extractor.mjs
819
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/initializer_api_function_extractor.mjs
797
820
  import ts9 from "typescript";
798
821
  var initializerApiTag = "initializerApiFunction";
799
822
  function isInitializerApiFunction(node, typeChecker) {
@@ -902,7 +925,7 @@ function extractFunctionWithOverloads(name, type, typeChecker) {
902
925
  };
903
926
  }
904
927
 
905
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.mjs
928
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.mjs
906
929
  function extractTypeAlias(declaration) {
907
930
  return {
908
931
  name: declaration.name.getText(),
@@ -914,7 +937,32 @@ function extractTypeAlias(declaration) {
914
937
  };
915
938
  }
916
939
 
917
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
940
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/import_extractor.mjs
941
+ import ts10 from "typescript";
942
+ function getImportedSymbols(sourceFile) {
943
+ const importSpecifiers = /* @__PURE__ */ new Map();
944
+ function visit(node) {
945
+ var _a;
946
+ if (ts10.isImportDeclaration(node)) {
947
+ let moduleSpecifier = node.moduleSpecifier.getText(sourceFile).replace(/['"]/g, "");
948
+ if (moduleSpecifier.startsWith("@angular/")) {
949
+ const namedBindings = (_a = node.importClause) == null ? void 0 : _a.namedBindings;
950
+ if (namedBindings && ts10.isNamedImports(namedBindings)) {
951
+ namedBindings.elements.forEach((importSpecifier) => {
952
+ const importName = importSpecifier.name.text;
953
+ const importAlias = importSpecifier.propertyName ? importSpecifier.propertyName.text : void 0;
954
+ importSpecifiers.set(importAlias != null ? importAlias : importName, moduleSpecifier);
955
+ });
956
+ }
957
+ }
958
+ }
959
+ ts10.forEachChild(node, visit);
960
+ }
961
+ visit(sourceFile);
962
+ return importSpecifiers;
963
+ }
964
+
965
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
918
966
  var DocsExtractor = class {
919
967
  constructor(typeChecker, metadataReader) {
920
968
  this.typeChecker = typeChecker;
@@ -922,6 +970,7 @@ var DocsExtractor = class {
922
970
  }
923
971
  extractAll(sourceFile, rootDir) {
924
972
  const entries = [];
973
+ const symbols = /* @__PURE__ */ new Map();
925
974
  const exportedDeclarations = this.getExportedDeclarations(sourceFile);
926
975
  for (const [exportName, node] of exportedDeclarations) {
927
976
  if (isAngularPrivateName(exportName)) {
@@ -930,15 +979,25 @@ var DocsExtractor = class {
930
979
  const entry = this.extractDeclaration(node);
931
980
  if (entry && !isIgnoredDocEntry(entry)) {
932
981
  const realSourceFile = node.getSourceFile();
982
+ const importedSymbols = getImportedSymbols(realSourceFile);
983
+ importedSymbols.forEach((moduleName, symbolName) => {
984
+ if (symbolName.startsWith("\u0275")) {
985
+ return;
986
+ }
987
+ if (symbols.has(symbolName) && symbols.get(symbolName) !== moduleName) {
988
+ throw new Error(`Ambigous symbol \`${symbolName}\` exported by both ${symbols.get(symbolName)} & ${moduleName}`);
989
+ }
990
+ symbols.set(symbolName, moduleName);
991
+ });
933
992
  entry.source = {
934
993
  filePath: getRelativeFilePath(realSourceFile, rootDir),
935
- startLine: ts10.getLineAndCharacterOfPosition(realSourceFile, node.getStart()).line + 1,
936
- endLine: ts10.getLineAndCharacterOfPosition(realSourceFile, node.getEnd()).line + 1
994
+ startLine: ts11.getLineAndCharacterOfPosition(realSourceFile, node.getStart()).line + 1,
995
+ endLine: ts11.getLineAndCharacterOfPosition(realSourceFile, node.getEnd()).line + 1
937
996
  };
938
997
  entries.push({ ...entry, name: exportName });
939
998
  }
940
999
  }
941
- return entries;
1000
+ return { entries, symbols };
942
1001
  }
943
1002
  extractDeclaration(node) {
944
1003
  if (isNamedClassDeclaration(node)) {
@@ -947,20 +1006,20 @@ var DocsExtractor = class {
947
1006
  if (isInitializerApiFunction(node, this.typeChecker)) {
948
1007
  return extractInitializerApiFunction(node, this.typeChecker);
949
1008
  }
950
- if (ts10.isInterfaceDeclaration(node) && !isIgnoredInterface(node)) {
1009
+ if (ts11.isInterfaceDeclaration(node) && !isIgnoredInterface(node)) {
951
1010
  return extractInterface(node, this.typeChecker);
952
1011
  }
953
- if (ts10.isFunctionDeclaration(node)) {
1012
+ if (ts11.isFunctionDeclaration(node)) {
954
1013
  const functionExtractor = new FunctionExtractor(node.name.getText(), node, this.typeChecker);
955
1014
  return functionExtractor.extract();
956
1015
  }
957
- if (ts10.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
1016
+ if (ts11.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
958
1017
  return isDecoratorDeclaration(node) ? extractorDecorator(node, this.typeChecker) : extractConstant(node, this.typeChecker);
959
1018
  }
960
- if (ts10.isTypeAliasDeclaration(node)) {
1019
+ if (ts11.isTypeAliasDeclaration(node)) {
961
1020
  return extractTypeAlias(node);
962
1021
  }
963
- if (ts10.isEnumDeclaration(node)) {
1022
+ if (ts11.isEnumDeclaration(node)) {
964
1023
  return extractEnum(node, this.typeChecker);
965
1024
  }
966
1025
  return null;
@@ -989,11 +1048,11 @@ function getRelativeFilePath(sourceFile, rootDir) {
989
1048
  return relativePath;
990
1049
  }
991
1050
 
992
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
1051
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
993
1052
  import { HtmlParser, MessageBundle } from "@angular/compiler";
994
- import ts24 from "typescript";
1053
+ import ts26 from "typescript";
995
1054
 
996
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
1055
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
997
1056
  import { Xliff, Xliff2, Xmb } from "@angular/compiler";
998
1057
  import * as path from "path";
999
1058
  function i18nGetExtension(formatName) {
@@ -1024,7 +1083,9 @@ function i18nSerialize(bundle, formatName, options) {
1024
1083
  let serializer;
1025
1084
  switch (format) {
1026
1085
  case "xmb":
1027
- serializer = new Xmb();
1086
+ serializer = new Xmb(
1087
+ options.i18nPreserveWhitespaceForLegacyExtraction
1088
+ );
1028
1089
  break;
1029
1090
  case "xliff2":
1030
1091
  case "xlf2":
@@ -1044,10 +1105,10 @@ function getPathNormalizer(basePath) {
1044
1105
  };
1045
1106
  }
1046
1107
 
1047
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
1048
- import ts11 from "typescript";
1108
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
1109
+ import ts12 from "typescript";
1049
1110
 
1050
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
1111
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
1051
1112
  function toNumbers(value) {
1052
1113
  const suffixIndex = value.lastIndexOf("-");
1053
1114
  return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
@@ -1082,10 +1143,10 @@ function compareVersions(v1, v2) {
1082
1143
  return compareNumbers(toNumbers(v1), toNumbers(v2));
1083
1144
  }
1084
1145
 
1085
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
1086
- var MIN_TS_VERSION = "5.4.0";
1146
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
1147
+ var MIN_TS_VERSION = "5.5.0";
1087
1148
  var MAX_TS_VERSION = "5.7.0";
1088
- var tsVersion = ts11.version;
1149
+ var tsVersion = ts12.version;
1089
1150
  function checkVersion(version, minVersion, maxVersion) {
1090
1151
  if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
1091
1152
  throw new Error(`The Angular Compiler requires TypeScript >=${minVersion} and <${maxVersion} but ${version} was found instead.`);
@@ -1095,11 +1156,11 @@ function verifySupportedTypeScriptVersion() {
1095
1156
  checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
1096
1157
  }
1097
1158
 
1098
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
1159
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
1099
1160
  import { R3Identifiers } from "@angular/compiler";
1100
- import ts22 from "typescript";
1161
+ import ts24 from "typescript";
1101
1162
 
1102
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
1163
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
1103
1164
  var CycleAnalyzer = class {
1104
1165
  constructor(importGraph) {
1105
1166
  this.importGraph = importGraph;
@@ -1170,8 +1231,8 @@ var Cycle = class {
1170
1231
  }
1171
1232
  };
1172
1233
 
1173
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
1174
- import ts12 from "typescript";
1234
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
1235
+ import ts13 from "typescript";
1175
1236
  var ImportGraph = class {
1176
1237
  constructor(checker, perf) {
1177
1238
  this.checker = checker;
@@ -1215,10 +1276,10 @@ var ImportGraph = class {
1215
1276
  return this.perf.inPhase(PerfPhase.CycleDetection, () => {
1216
1277
  const imports = /* @__PURE__ */ new Set();
1217
1278
  for (const stmt of sf.statements) {
1218
- if (!ts12.isImportDeclaration(stmt) && !ts12.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
1279
+ if (!ts13.isImportDeclaration(stmt) && !ts13.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
1219
1280
  continue;
1220
1281
  }
1221
- if (ts12.isImportDeclaration(stmt) && stmt.importClause !== void 0 && isTypeOnlyImportClause(stmt.importClause)) {
1282
+ if (ts13.isImportDeclaration(stmt) && stmt.importClause !== void 0 && isTypeOnlyImportClause(stmt.importClause)) {
1222
1283
  continue;
1223
1284
  }
1224
1285
  const symbol = this.checker.getSymbolAtLocation(stmt.moduleSpecifier);
@@ -1226,7 +1287,7 @@ var ImportGraph = class {
1226
1287
  continue;
1227
1288
  }
1228
1289
  const moduleFile = symbol.valueDeclaration;
1229
- if (ts12.isSourceFile(moduleFile) && isLocalFile(moduleFile)) {
1290
+ if (ts13.isSourceFile(moduleFile) && isLocalFile(moduleFile)) {
1230
1291
  imports.add(moduleFile);
1231
1292
  }
1232
1293
  }
@@ -1241,7 +1302,7 @@ function isTypeOnlyImportClause(node) {
1241
1302
  if (node.isTypeOnly) {
1242
1303
  return true;
1243
1304
  }
1244
- if (node.namedBindings !== void 0 && ts12.isNamedImports(node.namedBindings) && node.namedBindings.elements.every((specifier) => specifier.isTypeOnly)) {
1305
+ if (node.namedBindings !== void 0 && ts13.isNamedImports(node.namedBindings) && node.namedBindings.elements.every((specifier) => specifier.isTypeOnly)) {
1245
1306
  return true;
1246
1307
  }
1247
1308
  return false;
@@ -1262,8 +1323,8 @@ var Found = class {
1262
1323
  }
1263
1324
  };
1264
1325
 
1265
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
1266
- import ts13 from "typescript";
1326
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
1327
+ import ts14 from "typescript";
1267
1328
  var FlatIndexGenerator = class {
1268
1329
  constructor(entryPoint, relativeFlatIndexPath, moduleName) {
1269
1330
  this.entryPoint = entryPoint;
@@ -1279,7 +1340,7 @@ var FlatIndexGenerator = class {
1279
1340
 
1280
1341
  export * from '${relativeEntryPoint}';
1281
1342
  `;
1282
- const genFile = ts13.createSourceFile(this.flatIndexPath, contents, ts13.ScriptTarget.ES2015, true, ts13.ScriptKind.TS);
1343
+ const genFile = ts14.createSourceFile(this.flatIndexPath, contents, ts14.ScriptTarget.ES2015, true, ts14.ScriptKind.TS);
1283
1344
  if (this.moduleName !== null) {
1284
1345
  genFile.moduleName = this.moduleName;
1285
1346
  }
@@ -1287,7 +1348,7 @@ export * from '${relativeEntryPoint}';
1287
1348
  }
1288
1349
  };
1289
1350
 
1290
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
1351
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
1291
1352
  function findFlatIndexEntryPoint(rootFiles) {
1292
1353
  const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
1293
1354
  let resolvedEntryPoint = null;
@@ -1303,8 +1364,8 @@ function findFlatIndexEntryPoint(rootFiles) {
1303
1364
  return resolvedEntryPoint;
1304
1365
  }
1305
1366
 
1306
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
1307
- import ts14 from "typescript";
1367
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
1368
+ import ts15 from "typescript";
1308
1369
  function checkForPrivateExports(entryPoint, checker, refGraph) {
1309
1370
  const diagnostics = [];
1310
1371
  const topLevelExports = /* @__PURE__ */ new Set();
@@ -1314,7 +1375,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
1314
1375
  }
1315
1376
  const exportedSymbols = checker.getExportsOfModule(moduleSymbol);
1316
1377
  exportedSymbols.forEach((symbol) => {
1317
- if (symbol.flags & ts14.SymbolFlags.Alias) {
1378
+ if (symbol.flags & ts15.SymbolFlags.Alias) {
1318
1379
  symbol = checker.getAliasedSymbol(symbol);
1319
1380
  }
1320
1381
  const decl = symbol.valueDeclaration;
@@ -1338,7 +1399,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
1338
1399
  visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
1339
1400
  }
1340
1401
  const diagnostic = {
1341
- category: ts14.DiagnosticCategory.Error,
1402
+ category: ts15.DiagnosticCategory.Error,
1342
1403
  code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
1343
1404
  file: transitiveReference.getSourceFile(),
1344
1405
  ...getPosOfDeclaration(transitiveReference),
@@ -1358,7 +1419,7 @@ function getPosOfDeclaration(decl) {
1358
1419
  };
1359
1420
  }
1360
1421
  function getIdentifierOfDeclaration(decl) {
1361
- if ((ts14.isClassDeclaration(decl) || ts14.isVariableDeclaration(decl) || ts14.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts14.isIdentifier(decl.name)) {
1422
+ if ((ts15.isClassDeclaration(decl) || ts15.isVariableDeclaration(decl) || ts15.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts15.isIdentifier(decl.name)) {
1362
1423
  return decl.name;
1363
1424
  } else {
1364
1425
  return null;
@@ -1370,20 +1431,20 @@ function getNameOfDeclaration(decl) {
1370
1431
  }
1371
1432
  function getDescriptorOfDeclaration(decl) {
1372
1433
  switch (decl.kind) {
1373
- case ts14.SyntaxKind.ClassDeclaration:
1434
+ case ts15.SyntaxKind.ClassDeclaration:
1374
1435
  return "class";
1375
- case ts14.SyntaxKind.FunctionDeclaration:
1436
+ case ts15.SyntaxKind.FunctionDeclaration:
1376
1437
  return "function";
1377
- case ts14.SyntaxKind.VariableDeclaration:
1438
+ case ts15.SyntaxKind.VariableDeclaration:
1378
1439
  return "variable";
1379
- case ts14.SyntaxKind.EnumDeclaration:
1440
+ case ts15.SyntaxKind.EnumDeclaration:
1380
1441
  return "enum";
1381
1442
  default:
1382
1443
  return "declaration";
1383
1444
  }
1384
1445
  }
1385
1446
 
1386
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
1447
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
1387
1448
  var ReferenceGraph = class {
1388
1449
  constructor() {
1389
1450
  this.references = /* @__PURE__ */ new Map();
@@ -1437,7 +1498,7 @@ var ReferenceGraph = class {
1437
1498
  }
1438
1499
  };
1439
1500
 
1440
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
1501
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
1441
1502
  var FileDependencyGraph = class {
1442
1503
  constructor() {
1443
1504
  this.nodes = /* @__PURE__ */ new Map();
@@ -1504,7 +1565,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
1504
1565
  return false;
1505
1566
  }
1506
1567
 
1507
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
1568
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
1508
1569
  var IncrementalStateKind;
1509
1570
  (function(IncrementalStateKind2) {
1510
1571
  IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
@@ -1512,7 +1573,7 @@ var IncrementalStateKind;
1512
1573
  IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
1513
1574
  })(IncrementalStateKind || (IncrementalStateKind = {}));
1514
1575
 
1515
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
1576
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
1516
1577
  var PhaseKind;
1517
1578
  (function(PhaseKind2) {
1518
1579
  PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
@@ -1713,7 +1774,7 @@ function toOriginalSourceFile(sf) {
1713
1774
  }
1714
1775
  }
1715
1776
 
1716
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
1777
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
1717
1778
  var TrackedIncrementalBuildStrategy = class {
1718
1779
  constructor() {
1719
1780
  this.state = null;
@@ -1749,7 +1810,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
1749
1810
  };
1750
1811
  var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
1751
1812
 
1752
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
1813
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
1753
1814
  var IdentifierKind;
1754
1815
  (function(IdentifierKind2) {
1755
1816
  IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
@@ -1768,7 +1829,7 @@ var AbsoluteSourceSpan = class {
1768
1829
  }
1769
1830
  };
1770
1831
 
1771
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
1832
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
1772
1833
  var IndexingContext = class {
1773
1834
  constructor() {
1774
1835
  this.components = /* @__PURE__ */ new Set();
@@ -1778,10 +1839,10 @@ var IndexingContext = class {
1778
1839
  }
1779
1840
  };
1780
1841
 
1781
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
1842
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
1782
1843
  import { ParseSourceFile } from "@angular/compiler";
1783
1844
 
1784
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
1845
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
1785
1846
  import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstBoundDeferredTrigger, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate, TmplAstVariable } from "@angular/compiler";
1786
1847
  var ExpressionVisitor = class extends RecursiveAstVisitor {
1787
1848
  constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
@@ -2076,7 +2137,7 @@ function getTemplateIdentifiers(boundTemplate) {
2076
2137
  return { identifiers: visitor.identifiers, errors: visitor.errors };
2077
2138
  }
2078
2139
 
2079
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
2140
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
2080
2141
  function generateAnalysis(context) {
2081
2142
  const analysis = /* @__PURE__ */ new Map();
2082
2143
  context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
@@ -2112,7 +2173,7 @@ function generateAnalysis(context) {
2112
2173
  return analysis;
2113
2174
  }
2114
2175
 
2115
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.mjs
2176
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.mjs
2116
2177
  var NgModuleIndexImpl = class {
2117
2178
  constructor(metaReader, localReader) {
2118
2179
  this.metaReader = metaReader;
@@ -2201,8 +2262,8 @@ var NgModuleIndexImpl = class {
2201
2262
  }
2202
2263
  };
2203
2264
 
2204
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
2205
- import ts15 from "typescript";
2265
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
2266
+ import ts16 from "typescript";
2206
2267
  var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
2207
2268
  var RESOURCE_MARKER = ".$ngresource$";
2208
2269
  var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
@@ -2316,7 +2377,7 @@ var AdapterResourceLoader = class {
2316
2377
  return this.adapter.rootDirs.map((rootDir) => join(rootDir, segment));
2317
2378
  }
2318
2379
  getResolvedCandidateLocations(url, fromFile) {
2319
- const failedLookup = ts15.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
2380
+ const failedLookup = ts16.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
2320
2381
  if (failedLookup.failedLookupLocations === void 0) {
2321
2382
  throw new Error(`Internal error: expected to find failedLookupLocations during resolution of resource '${url}' in context of ${fromFile}`);
2322
2383
  }
@@ -2351,7 +2412,7 @@ function createLookupResolutionHost(adapter) {
2351
2412
  };
2352
2413
  }
2353
2414
 
2354
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
2415
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
2355
2416
  var StandaloneComponentScopeReader = class {
2356
2417
  constructor(metaReader, localModuleReader, dtsModuleReader) {
2357
2418
  this.metaReader = metaReader;
@@ -2447,11 +2508,11 @@ var StandaloneComponentScopeReader = class {
2447
2508
  }
2448
2509
  };
2449
2510
 
2450
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
2511
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
2451
2512
  import { ASTWithSource as ASTWithSource3, BindingType, Interpolation, PropertyRead as PropertyRead2, TmplAstBoundAttribute } from "@angular/compiler";
2452
2513
 
2453
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
2454
- import ts16 from "typescript";
2514
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
2515
+ import ts17 from "typescript";
2455
2516
  var SIGNAL_FNS = /* @__PURE__ */ new Set([
2456
2517
  "WritableSignal",
2457
2518
  "Signal",
@@ -2466,11 +2527,11 @@ function isSignalSymbol(symbol) {
2466
2527
  const declarations = symbol.getDeclarations();
2467
2528
  return declarations !== void 0 && declarations.some((decl) => {
2468
2529
  const fileName = decl.getSourceFile().fileName;
2469
- return (ts16.isInterfaceDeclaration(decl) || ts16.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
2530
+ return (ts17.isInterfaceDeclaration(decl) || ts17.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
2470
2531
  });
2471
2532
  }
2472
2533
 
2473
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
2534
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
2474
2535
  import { ASTWithSource as ASTWithSource2, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
2475
2536
  var TemplateCheckWithVisitor = class {
2476
2537
  constructor() {
@@ -2604,7 +2665,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
2604
2665
  }
2605
2666
  };
2606
2667
 
2607
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
2668
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
2608
2669
  var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
2609
2670
  var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
2610
2671
  var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
@@ -2656,7 +2717,7 @@ var factory = {
2656
2717
  create: () => new InterpolatedSignalCheck()
2657
2718
  };
2658
2719
 
2659
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
2720
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
2660
2721
  import { TmplAstBoundEvent } from "@angular/compiler";
2661
2722
  var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
2662
2723
  constructor() {
@@ -2682,7 +2743,7 @@ var factory2 = {
2682
2743
  create: () => new InvalidBananaInBoxCheck()
2683
2744
  };
2684
2745
 
2685
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
2746
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
2686
2747
  import { TmplAstTemplate as TmplAstTemplate2 } from "@angular/compiler";
2687
2748
  var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
2688
2749
  ["ngIf", { directive: "NgIf", builtIn: "@if" }],
@@ -2727,7 +2788,7 @@ var factory3 = {
2727
2788
  }
2728
2789
  };
2729
2790
 
2730
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
2791
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
2731
2792
  import { TmplAstTemplate as TmplAstTemplate3 } from "@angular/compiler";
2732
2793
  var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
2733
2794
  constructor() {
@@ -2760,9 +2821,9 @@ var factory4 = {
2760
2821
  create: () => new MissingNgForOfLetCheck()
2761
2822
  };
2762
2823
 
2763
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
2824
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
2764
2825
  import { Binary } from "@angular/compiler";
2765
- import ts17 from "typescript";
2826
+ import ts18 from "typescript";
2766
2827
  var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
2767
2828
  constructor() {
2768
2829
  super(...arguments);
@@ -2777,7 +2838,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
2777
2838
  return [];
2778
2839
  }
2779
2840
  const typeLeft = symbolLeft.tsType;
2780
- if (typeLeft.flags & (ts17.TypeFlags.Any | ts17.TypeFlags.Unknown)) {
2841
+ if (typeLeft.flags & (ts18.TypeFlags.Any | ts18.TypeFlags.Unknown)) {
2781
2842
  return [];
2782
2843
  }
2783
2844
  if (typeLeft.getNonNullableType() !== typeLeft)
@@ -2806,9 +2867,9 @@ var factory5 = {
2806
2867
  }
2807
2868
  };
2808
2869
 
2809
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
2870
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
2810
2871
  import { SafeCall, SafeKeyedRead, SafePropertyRead } from "@angular/compiler";
2811
- import ts18 from "typescript";
2872
+ import ts19 from "typescript";
2812
2873
  var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
2813
2874
  constructor() {
2814
2875
  super(...arguments);
@@ -2823,7 +2884,7 @@ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
2823
2884
  return [];
2824
2885
  }
2825
2886
  const typeLeft = symbolLeft.tsType;
2826
- if (typeLeft.flags & (ts18.TypeFlags.Any | ts18.TypeFlags.Unknown)) {
2887
+ if (typeLeft.flags & (ts19.TypeFlags.Any | ts19.TypeFlags.Unknown)) {
2827
2888
  return [];
2828
2889
  }
2829
2890
  if (typeLeft.getNonNullableType() !== typeLeft)
@@ -2853,7 +2914,7 @@ var factory6 = {
2853
2914
  }
2854
2915
  };
2855
2916
 
2856
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
2917
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
2857
2918
  import { TmplAstBoundAttribute as TmplAstBoundAttribute2 } from "@angular/compiler";
2858
2919
  var STYLE_SUFFIXES = ["px", "%", "em"];
2859
2920
  var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
@@ -2877,7 +2938,7 @@ var factory7 = {
2877
2938
  create: () => new SuffixNotSupportedCheck()
2878
2939
  };
2879
2940
 
2880
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
2941
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
2881
2942
  import { TmplAstTextAttribute } from "@angular/compiler";
2882
2943
  var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
2883
2944
  constructor() {
@@ -2916,7 +2977,7 @@ var factory8 = {
2916
2977
  create: () => new TextAttributeNotBindingSpec()
2917
2978
  };
2918
2979
 
2919
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.mjs
2980
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.mjs
2920
2981
  import { ASTWithSource as ASTWithSource4, Call, Chain, Conditional, ParsedEventType, PropertyRead as PropertyRead3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead2, TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
2921
2982
  var UninvokedFunctionInEventBindingSpec = class extends TemplateCheckWithVisitor {
2922
2983
  constructor() {
@@ -2968,7 +3029,7 @@ var factory9 = {
2968
3029
  create: () => new UninvokedFunctionInEventBindingSpec()
2969
3030
  };
2970
3031
 
2971
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.mjs
3032
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.mjs
2972
3033
  import { AST, ASTWithSource as ASTWithSource5, TmplAstLetDeclaration } from "@angular/compiler";
2973
3034
  var UnusedLetDeclarationCheck = class extends TemplateCheckWithVisitor {
2974
3035
  constructor() {
@@ -3013,10 +3074,10 @@ var factory10 = {
3013
3074
  create: () => new UnusedLetDeclarationCheck()
3014
3075
  };
3015
3076
 
3016
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
3017
- import ts19 from "typescript";
3077
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
3078
+ import ts20 from "typescript";
3018
3079
 
3019
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
3080
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
3020
3081
  var DiagnosticCategoryLabel;
3021
3082
  (function(DiagnosticCategoryLabel2) {
3022
3083
  DiagnosticCategoryLabel2["Warning"] = "warning";
@@ -3024,7 +3085,7 @@ var DiagnosticCategoryLabel;
3024
3085
  DiagnosticCategoryLabel2["Suppress"] = "suppress";
3025
3086
  })(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
3026
3087
 
3027
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
3088
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
3028
3089
  var ExtendedTemplateCheckerImpl = class {
3029
3090
  constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
3030
3091
  var _a, _b, _c, _d, _e;
@@ -3063,9 +3124,9 @@ var ExtendedTemplateCheckerImpl = class {
3063
3124
  function diagnosticLabelToCategory(label) {
3064
3125
  switch (label) {
3065
3126
  case DiagnosticCategoryLabel.Warning:
3066
- return ts19.DiagnosticCategory.Warning;
3127
+ return ts20.DiagnosticCategory.Warning;
3067
3128
  case DiagnosticCategoryLabel.Error:
3068
- return ts19.DiagnosticCategory.Error;
3129
+ return ts20.DiagnosticCategory.Error;
3069
3130
  case DiagnosticCategoryLabel.Suppress:
3070
3131
  return null;
3071
3132
  default:
@@ -3077,7 +3138,7 @@ function assertNever(value) {
3077
3138
  ${value}`);
3078
3139
  }
3079
3140
 
3080
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
3141
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
3081
3142
  var ALL_DIAGNOSTIC_FACTORIES = [
3082
3143
  factory2,
3083
3144
  factory5,
@@ -3092,12 +3153,13 @@ var ALL_DIAGNOSTIC_FACTORIES = [
3092
3153
  ];
3093
3154
  var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
3094
3155
  ExtendedTemplateDiagnosticName.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION,
3156
+ ExtendedTemplateDiagnosticName.UNUSED_STANDALONE_IMPORTS,
3095
3157
  ...ALL_DIAGNOSTIC_FACTORIES.map((factory11) => factory11.name)
3096
3158
  ]);
3097
3159
 
3098
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
3160
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
3099
3161
  import { ASTWithSource as ASTWithSource6, ImplicitReceiver as ImplicitReceiver2, ParsedEventType as ParsedEventType2, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundEvent as TmplAstBoundEvent3, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstRecursiveVisitor as TmplAstRecursiveVisitor2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
3100
- import ts20 from "typescript";
3162
+ import ts21 from "typescript";
3101
3163
  var TemplateSemanticsCheckerImpl = class {
3102
3164
  constructor(templateTypeChecker) {
3103
3165
  this.templateTypeChecker = templateTypeChecker;
@@ -3172,7 +3234,7 @@ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
3172
3234
  }
3173
3235
  makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
3174
3236
  const span = target instanceof TmplAstVariable2 ? target.valueSpan || target.sourceSpan : target.sourceSpan;
3175
- return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts20.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
3237
+ return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts21.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
3176
3238
  {
3177
3239
  text: `'${target.name}' is declared here.`,
3178
3240
  start: span.start.offset,
@@ -3186,8 +3248,8 @@ function unwrapAstWithSource(ast) {
3186
3248
  return ast instanceof ASTWithSource6 ? ast.ast : ast;
3187
3249
  }
3188
3250
 
3189
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/initializer_api_usage_rule.mjs
3190
- import ts21 from "typescript";
3251
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/initializer_api_usage_rule.mjs
3252
+ import ts22 from "typescript";
3191
3253
  var APIS_TO_CHECK = [
3192
3254
  INPUT_INITIALIZER_FN,
3193
3255
  MODEL_INITIALIZER_FN,
@@ -3205,13 +3267,13 @@ var InitializerApiUsageRule = class {
3205
3267
  });
3206
3268
  }
3207
3269
  checkNode(node) {
3208
- if (!ts21.isCallExpression(node)) {
3270
+ if (!ts22.isCallExpression(node)) {
3209
3271
  return null;
3210
3272
  }
3211
- while (node.parent && (ts21.isParenthesizedExpression(node.parent) || ts21.isAsExpression(node.parent))) {
3273
+ while (node.parent && (ts22.isParenthesizedExpression(node.parent) || ts22.isAsExpression(node.parent))) {
3212
3274
  node = node.parent;
3213
3275
  }
3214
- if (!node.parent || !ts21.isCallExpression(node)) {
3276
+ if (!node.parent || !ts22.isCallExpression(node)) {
3215
3277
  return null;
3216
3278
  }
3217
3279
  const identifiedInitializer = tryParseInitializerApi(APIS_TO_CHECK, node, this.reflector, this.importedSymbolsTracker);
@@ -3219,12 +3281,12 @@ var InitializerApiUsageRule = class {
3219
3281
  return null;
3220
3282
  }
3221
3283
  const functionName = identifiedInitializer.api.functionName + (identifiedInitializer.isRequired ? ".required" : "");
3222
- if (ts21.isPropertyDeclaration(node.parent) && node.parent.initializer === node) {
3284
+ if (ts22.isPropertyDeclaration(node.parent) && node.parent.initializer === node) {
3223
3285
  let closestClass = node.parent;
3224
- while (closestClass && !ts21.isClassDeclaration(closestClass)) {
3286
+ while (closestClass && !ts22.isClassDeclaration(closestClass)) {
3225
3287
  closestClass = closestClass.parent;
3226
3288
  }
3227
- if (closestClass && ts21.isClassDeclaration(closestClass)) {
3289
+ if (closestClass && ts22.isClassDeclaration(closestClass)) {
3228
3290
  const decorators = this.reflector.getDecoratorsOfDeclaration(closestClass);
3229
3291
  const isComponentOrDirective = decorators !== null && decorators.some((decorator) => {
3230
3292
  var _a;
@@ -3237,10 +3299,75 @@ var InitializerApiUsageRule = class {
3237
3299
  }
3238
3300
  };
3239
3301
 
3240
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
3302
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.mjs
3303
+ import ts23 from "typescript";
3304
+ var UnusedStandaloneImportsRule = class {
3305
+ constructor(templateTypeChecker, typeCheckingConfig, importedSymbolsTracker) {
3306
+ this.templateTypeChecker = templateTypeChecker;
3307
+ this.typeCheckingConfig = typeCheckingConfig;
3308
+ this.importedSymbolsTracker = importedSymbolsTracker;
3309
+ }
3310
+ shouldCheck(sourceFile) {
3311
+ return this.typeCheckingConfig.unusedStandaloneImports !== "suppress" && (this.importedSymbolsTracker.hasNamedImport(sourceFile, "Component", "@angular/core") || this.importedSymbolsTracker.hasNamespaceImport(sourceFile, "@angular/core"));
3312
+ }
3313
+ checkNode(node) {
3314
+ if (!ts23.isClassDeclaration(node)) {
3315
+ return null;
3316
+ }
3317
+ const metadata = this.templateTypeChecker.getDirectiveMetadata(node);
3318
+ if (!metadata || !metadata.isStandalone || metadata.rawImports === null || metadata.imports === null || metadata.imports.length === 0) {
3319
+ return null;
3320
+ }
3321
+ const usedDirectives = this.templateTypeChecker.getUsedDirectives(node);
3322
+ const usedPipes = this.templateTypeChecker.getUsedPipes(node);
3323
+ if (!usedDirectives || !usedPipes) {
3324
+ return null;
3325
+ }
3326
+ const unused = this.getUnusedSymbols(metadata, new Set(usedDirectives.map((dir) => dir.ref.node)), new Set(usedPipes));
3327
+ if (unused === null) {
3328
+ return null;
3329
+ }
3330
+ const category = this.typeCheckingConfig.unusedStandaloneImports === "error" ? ts23.DiagnosticCategory.Error : ts23.DiagnosticCategory.Warning;
3331
+ if (unused.length === metadata.imports.length) {
3332
+ return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, metadata.rawImports, "All imports are unused", void 0, category);
3333
+ }
3334
+ return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, metadata.rawImports, "Imports array contains unused imports", unused.map(([ref, type, name]) => makeRelatedInformation(ref.getOriginForDiagnostics(metadata.rawImports), `${type} "${name}" is not used within the template`)), category);
3335
+ }
3336
+ getUnusedSymbols(metadata, usedDirectives, usedPipes) {
3337
+ if (metadata.imports === null || metadata.rawImports === null) {
3338
+ return null;
3339
+ }
3340
+ let unused = null;
3341
+ for (const current of metadata.imports) {
3342
+ const currentNode = current.node;
3343
+ const dirMeta = this.templateTypeChecker.getDirectiveMetadata(currentNode);
3344
+ if (dirMeta !== null) {
3345
+ if (dirMeta.isStandalone && (usedDirectives === null || !usedDirectives.has(currentNode))) {
3346
+ unused != null ? unused : unused = [];
3347
+ unused.push([current, dirMeta.isComponent ? "Component" : "Directive", dirMeta.name]);
3348
+ }
3349
+ continue;
3350
+ }
3351
+ const pipeMeta = this.templateTypeChecker.getPipeMetadata(currentNode);
3352
+ if (pipeMeta !== null && pipeMeta.isStandalone && (usedPipes === null || !usedPipes.has(pipeMeta.name))) {
3353
+ unused != null ? unused : unused = [];
3354
+ unused.push([current, "Pipe", pipeMeta.ref.node.name.text]);
3355
+ }
3356
+ }
3357
+ return unused;
3358
+ }
3359
+ };
3360
+
3361
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/config.mjs
3362
+ var UNUSED_STANDALONE_IMPORTS_RULE_ENABLED = true;
3363
+
3364
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
3241
3365
  var SourceFileValidator = class {
3242
- constructor(reflector, importedSymbolsTracker) {
3366
+ constructor(reflector, importedSymbolsTracker, templateTypeChecker, typeCheckingConfig) {
3243
3367
  this.rules = [new InitializerApiUsageRule(reflector, importedSymbolsTracker)];
3368
+ if (UNUSED_STANDALONE_IMPORTS_RULE_ENABLED) {
3369
+ this.rules.push(new UnusedStandaloneImportsRule(templateTypeChecker, typeCheckingConfig, importedSymbolsTracker));
3370
+ }
3244
3371
  }
3245
3372
  getDiagnosticsForFile(sourceFile) {
3246
3373
  if (sourceFile.isDeclarationFile || sourceFile.fileName.endsWith(".ngtypecheck.ts")) {
@@ -3275,7 +3402,7 @@ var SourceFileValidator = class {
3275
3402
  }
3276
3403
  };
3277
3404
 
3278
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/core_version.mjs
3405
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/core_version.mjs
3279
3406
  function coreHasSymbol(program, symbol) {
3280
3407
  const checker = program.getTypeChecker();
3281
3408
  for (const sf of program.getSourceFiles().filter(isMaybeCore)) {
@@ -3294,7 +3421,7 @@ function isMaybeCore(sf) {
3294
3421
  return sf.isDeclarationFile && sf.fileName.includes("@angular/core") && sf.fileName.endsWith("index.d.ts");
3295
3422
  }
3296
3423
 
3297
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
3424
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
3298
3425
  import semver from "semver";
3299
3426
  function coreVersionSupportsFeature(coreVersion, minVersion) {
3300
3427
  if (coreVersion === `0.0.0-${"PLACEHOLDER"}`) {
@@ -3303,7 +3430,7 @@ function coreVersionSupportsFeature(coreVersion, minVersion) {
3303
3430
  return semver.satisfies(coreVersion, minVersion);
3304
3431
  }
3305
3432
 
3306
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
3433
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
3307
3434
  var CompilationTicketKind;
3308
3435
  (function(CompilationTicketKind2) {
3309
3436
  CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
@@ -3397,7 +3524,7 @@ var NgCompiler = class {
3397
3524
  this.currentProgram = inputProgram;
3398
3525
  this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
3399
3526
  this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
3400
- const moduleResolutionCache = ts22.createModuleResolutionCache(
3527
+ const moduleResolutionCache = ts24.createModuleResolutionCache(
3401
3528
  this.adapter.getCurrentDirectory(),
3402
3529
  this.adapter.getCanonicalFileName.bind(this.adapter)
3403
3530
  );
@@ -3441,7 +3568,7 @@ var NgCompiler = class {
3441
3568
  }
3442
3569
  for (const clazz of classesToUpdate) {
3443
3570
  this.compilation.traitCompiler.updateResources(clazz);
3444
- if (!ts22.isClassDeclaration(clazz)) {
3571
+ if (!ts24.isClassDeclaration(clazz)) {
3445
3572
  continue;
3446
3573
  }
3447
3574
  this.compilation.templateTypeChecker.invalidateClass(clazz);
@@ -3595,12 +3722,12 @@ var NgCompiler = class {
3595
3722
  if (compilation.supportJitMode && compilation.jitDeclarationRegistry.jitDeclarations.size > 0) {
3596
3723
  const { jitDeclarations } = compilation.jitDeclarationRegistry;
3597
3724
  const jitDeclarationsArray = Array.from(jitDeclarations);
3598
- const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => ts22.getOriginalNode(d)));
3725
+ const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => ts24.getOriginalNode(d)));
3599
3726
  const sourceFilesWithJit = new Set(jitDeclarationsArray.map((d) => d.getSourceFile().fileName));
3600
3727
  before.push((ctx) => {
3601
3728
  const reflectionHost = new TypeScriptReflectionHost(this.inputProgram.getTypeChecker());
3602
3729
  const jitTransform = angularJitApplicationTransform(this.inputProgram, compilation.isCore, (node) => {
3603
- node = ts22.getOriginalNode(node, ts22.isClassDeclaration);
3730
+ node = ts24.getOriginalNode(node, ts24.isClassDeclaration);
3604
3731
  return reflectionHost.isClass(node) && jitDeclarationOriginalNodes.has(node);
3605
3732
  })(ctx);
3606
3733
  return (sourceFile) => {
@@ -3674,7 +3801,7 @@ var NgCompiler = class {
3674
3801
  return strictTemplates || !!this.options.fullTemplateTypeCheck;
3675
3802
  }
3676
3803
  getTypeCheckingConfig() {
3677
- var _a, _b, _c, _d, _e;
3804
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
3678
3805
  const strictTemplates = !!this.options.strictTemplates;
3679
3806
  const useInlineTypeConstructors = this.programDriver.supportsInlineOperations;
3680
3807
  let allowSignalsInTwoWayBindings = (_a = coreHasSymbol(this.inputProgram, R3Identifiers.unwrapWritableSignal)) != null ? _a : this.angularCoreVersion === null || coreVersionSupportsFeature(this.angularCoreVersion, ">= 17.2.0-0");
@@ -3704,6 +3831,7 @@ var NgCompiler = class {
3704
3831
  useInlineTypeConstructors,
3705
3832
  suggestionsForSuboptimalTypeInference: this.enableTemplateTypeChecker && !strictTemplates,
3706
3833
  controlFlowPreventingContentProjection: ((_b = this.options.extendedDiagnostics) == null ? void 0 : _b.defaultCategory) || DiagnosticCategoryLabel.Warning,
3834
+ unusedStandaloneImports: ((_c = this.options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) || DiagnosticCategoryLabel.Warning,
3707
3835
  allowSignalsInTwoWayBindings
3708
3836
  };
3709
3837
  } else {
@@ -3730,7 +3858,8 @@ var NgCompiler = class {
3730
3858
  enableTemplateTypeChecker: this.enableTemplateTypeChecker,
3731
3859
  useInlineTypeConstructors,
3732
3860
  suggestionsForSuboptimalTypeInference: false,
3733
- controlFlowPreventingContentProjection: ((_c = this.options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) || DiagnosticCategoryLabel.Warning,
3861
+ controlFlowPreventingContentProjection: ((_d = this.options.extendedDiagnostics) == null ? void 0 : _d.defaultCategory) || DiagnosticCategoryLabel.Warning,
3862
+ unusedStandaloneImports: ((_e = this.options.extendedDiagnostics) == null ? void 0 : _e.defaultCategory) || DiagnosticCategoryLabel.Warning,
3734
3863
  allowSignalsInTwoWayBindings
3735
3864
  };
3736
3865
  }
@@ -3766,9 +3895,12 @@ var NgCompiler = class {
3766
3895
  if (this.options.strictLiteralTypes !== void 0) {
3767
3896
  typeCheckingConfig.strictLiteralTypes = this.options.strictLiteralTypes;
3768
3897
  }
3769
- if (((_e = (_d = this.options.extendedDiagnostics) == null ? void 0 : _d.checks) == null ? void 0 : _e.controlFlowPreventingContentProjection) !== void 0) {
3898
+ if (((_g = (_f = this.options.extendedDiagnostics) == null ? void 0 : _f.checks) == null ? void 0 : _g.controlFlowPreventingContentProjection) !== void 0) {
3770
3899
  typeCheckingConfig.controlFlowPreventingContentProjection = this.options.extendedDiagnostics.checks.controlFlowPreventingContentProjection;
3771
3900
  }
3901
+ if (((_i = (_h = this.options.extendedDiagnostics) == null ? void 0 : _h.checks) == null ? void 0 : _i.unusedStandaloneImports) !== void 0) {
3902
+ typeCheckingConfig.unusedStandaloneImports = this.options.extendedDiagnostics.checks.unusedStandaloneImports;
3903
+ }
3772
3904
  return typeCheckingConfig;
3773
3905
  }
3774
3906
  getTemplateDiagnostics() {
@@ -3834,7 +3966,7 @@ var NgCompiler = class {
3834
3966
  return diagnostics;
3835
3967
  }
3836
3968
  makeCompilation() {
3837
- var _a, _b, _c, _d;
3969
+ var _a, _b, _c, _d, _e;
3838
3970
  const isCore = isAngularCorePackage(this.inputProgram);
3839
3971
  let compilationMode = CompilationMode.FULL;
3840
3972
  if (!isCore) {
@@ -3929,21 +4061,22 @@ var NgCompiler = class {
3929
4061
  }
3930
4062
  const jitDeclarationRegistry = new JitDeclarationRegistry();
3931
4063
  const handlers = [
3932
- new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry),
4064
+ new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry, (_d = this.options.i18nPreserveWhitespaceForLegacyExtraction) != null ? _d : true),
3933
4065
  new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry),
3934
4066
  new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
3935
4067
  new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
3936
- new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_d = this.options.onlyPublishPublicTypingsForNgModules) != null ? _d : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry)
4068
+ new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_e = this.options.onlyPublishPublicTypingsForNgModules) != null ? _e : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry)
3937
4069
  ];
3938
4070
  const traitCompiler = new TraitCompiler(handlers, reflector, this.delegatingPerfRecorder, this.incrementalCompilation, this.options.compileNonExportedClasses !== false, compilationMode, dtsTransforms, semanticDepGraphUpdater, this.adapter);
3939
4071
  const notifyingDriver = new NotifyingProgramDriverWrapper(this.programDriver, (program) => {
3940
4072
  this.incrementalStrategy.setIncrementalState(this.incrementalCompilation.state, program);
3941
4073
  this.currentProgram = program;
3942
4074
  });
3943
- const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, this.getTypeCheckingConfig(), refEmitter, reflector, this.adapter, this.incrementalCompilation, metaReader, localMetaReader, ngModuleIndex, scopeReader, typeCheckScopeRegistry, this.delegatingPerfRecorder);
4075
+ const typeCheckingConfig = this.getTypeCheckingConfig();
4076
+ const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, typeCheckingConfig, refEmitter, reflector, this.adapter, this.incrementalCompilation, metaReader, localMetaReader, ngModuleIndex, scopeReader, typeCheckScopeRegistry, this.delegatingPerfRecorder);
3944
4077
  const extendedTemplateChecker = this.constructionDiagnostics.length === 0 ? new ExtendedTemplateCheckerImpl(templateTypeChecker, checker, ALL_DIAGNOSTIC_FACTORIES, this.options) : null;
3945
4078
  const templateSemanticsChecker = this.constructionDiagnostics.length === 0 ? new TemplateSemanticsCheckerImpl(templateTypeChecker) : null;
3946
- const sourceFileValidator = this.constructionDiagnostics.length === 0 ? new SourceFileValidator(reflector, importTracker) : null;
4079
+ const sourceFileValidator = this.constructionDiagnostics.length === 0 ? new SourceFileValidator(reflector, importTracker, templateTypeChecker, typeCheckingConfig) : null;
3947
4080
  return {
3948
4081
  isCore,
3949
4082
  traitCompiler,
@@ -3972,18 +4105,18 @@ function isAngularCorePackage(program) {
3972
4105
  return false;
3973
4106
  }
3974
4107
  return r3Symbols.statements.some((stmt) => {
3975
- if (!ts22.isVariableStatement(stmt)) {
4108
+ if (!ts24.isVariableStatement(stmt)) {
3976
4109
  return false;
3977
4110
  }
3978
- const modifiers = ts22.getModifiers(stmt);
3979
- if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts22.SyntaxKind.ExportKeyword)) {
4111
+ const modifiers = ts24.getModifiers(stmt);
4112
+ if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts24.SyntaxKind.ExportKeyword)) {
3980
4113
  return false;
3981
4114
  }
3982
4115
  return stmt.declarationList.declarations.some((decl) => {
3983
- if (!ts22.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
4116
+ if (!ts24.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
3984
4117
  return false;
3985
4118
  }
3986
- if (decl.initializer === void 0 || decl.initializer.kind !== ts22.SyntaxKind.TrueKeyword) {
4119
+ if (decl.initializer === void 0 || decl.initializer.kind !== ts24.SyntaxKind.TrueKeyword) {
3987
4120
  return false;
3988
4121
  }
3989
4122
  return true;
@@ -3997,7 +4130,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
3997
4130
  var _a, _b, _c;
3998
4131
  if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
3999
4132
  yield makeConfigDiagnostic({
4000
- category: ts22.DiagnosticCategory.Error,
4133
+ category: ts24.DiagnosticCategory.Error,
4001
4134
  code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
4002
4135
  messageText: `
4003
4136
  Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
@@ -4016,7 +4149,7 @@ https://angular.dev/tools/cli/template-typecheck
4016
4149
  }
4017
4150
  if (options.extendedDiagnostics && options.strictTemplates === false) {
4018
4151
  yield makeConfigDiagnostic({
4019
- category: ts22.DiagnosticCategory.Error,
4152
+ category: ts24.DiagnosticCategory.Error,
4020
4153
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
4021
4154
  messageText: `
4022
4155
  Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
@@ -4033,7 +4166,7 @@ One of the following actions is required:
4033
4166
  const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
4034
4167
  if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
4035
4168
  yield makeConfigDiagnostic({
4036
- category: ts22.DiagnosticCategory.Error,
4169
+ category: ts24.DiagnosticCategory.Error,
4037
4170
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
4038
4171
  messageText: `
4039
4172
  Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
@@ -4046,7 +4179,7 @@ ${allowedCategoryLabels.join("\n")}
4046
4179
  for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
4047
4180
  if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
4048
4181
  yield makeConfigDiagnostic({
4049
- category: ts22.DiagnosticCategory.Error,
4182
+ category: ts24.DiagnosticCategory.Error,
4050
4183
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
4051
4184
  messageText: `
4052
4185
  Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
@@ -4058,7 +4191,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
4058
4191
  }
4059
4192
  if (!allowedCategoryLabels.includes(category)) {
4060
4193
  yield makeConfigDiagnostic({
4061
- category: ts22.DiagnosticCategory.Error,
4194
+ category: ts24.DiagnosticCategory.Error,
4062
4195
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
4063
4196
  messageText: `
4064
4197
  Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
@@ -4088,7 +4221,7 @@ var ReferenceGraphAdapter = class {
4088
4221
  for (const { node } of references) {
4089
4222
  let sourceFile = node.getSourceFile();
4090
4223
  if (sourceFile === void 0) {
4091
- sourceFile = ts22.getOriginalNode(node).getSourceFile();
4224
+ sourceFile = ts24.getOriginalNode(node).getSourceFile();
4092
4225
  }
4093
4226
  if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
4094
4227
  this.graph.add(source, node);
@@ -4126,8 +4259,8 @@ function versionMapFromProgram(program, driver) {
4126
4259
  return versions;
4127
4260
  }
4128
4261
 
4129
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
4130
- import ts23 from "typescript";
4262
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
4263
+ import ts25 from "typescript";
4131
4264
  var DelegatingCompilerHost = class {
4132
4265
  get jsDocParsingMode() {
4133
4266
  return this.delegate.jsDocParsingMode;
@@ -4212,7 +4345,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
4212
4345
  entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
4213
4346
  if (entryPoint === null) {
4214
4347
  diagnostics.push({
4215
- category: ts23.DiagnosticCategory.Error,
4348
+ category: ts25.DiagnosticCategory.Error,
4216
4349
  code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
4217
4350
  file: void 0,
4218
4351
  start: void 0,
@@ -4255,17 +4388,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
4255
4388
  return this.fileNameToModuleName !== void 0 ? this : null;
4256
4389
  }
4257
4390
  createCachedResolveModuleNamesFunction() {
4258
- const moduleResolutionCache = ts23.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
4391
+ const moduleResolutionCache = ts25.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
4259
4392
  return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
4260
4393
  return moduleNames.map((moduleName) => {
4261
- const module = ts23.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
4394
+ const module = ts25.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
4262
4395
  return module.resolvedModule;
4263
4396
  });
4264
4397
  };
4265
4398
  }
4266
4399
  };
4267
4400
 
4268
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
4401
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
4269
4402
  var NgtscProgram = class {
4270
4403
  constructor(rootNames, options, delegateHost, oldProgram) {
4271
4404
  this.options = options;
@@ -4282,7 +4415,7 @@ var NgtscProgram = class {
4282
4415
  if (reuseProgram !== void 0) {
4283
4416
  retagAllTsFiles(reuseProgram);
4284
4417
  }
4285
- this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts24.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
4418
+ this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts26.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
4286
4419
  perfRecorder.phase(PerfPhase.Unaccounted);
4287
4420
  perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
4288
4421
  this.host.postProgramCreationCleanup();
@@ -4395,7 +4528,7 @@ var NgtscProgram = class {
4395
4528
  }
4396
4529
  emitXi18n() {
4397
4530
  var _a, _b, _c;
4398
- const ctx = new MessageBundle(new HtmlParser(), [], {}, (_a = this.options.i18nOutLocale) != null ? _a : null);
4531
+ const ctx = new MessageBundle(new HtmlParser(), [], {}, (_a = this.options.i18nOutLocale) != null ? _a : null, this.options.i18nPreserveWhitespaceForLegacyExtraction);
4399
4532
  this.compiler.xi18n(ctx);
4400
4533
  i18nExtract((_b = this.options.i18nOutFormat) != null ? _b : null, (_c = this.options.i18nOutFile) != null ? _c : null, this.host, this.options, ctx, resolve);
4401
4534
  }
@@ -4491,37 +4624,37 @@ function mergeEmitResults(emitResults) {
4491
4624
  return { diagnostics, emitSkipped, emittedFiles };
4492
4625
  }
4493
4626
 
4494
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
4627
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
4495
4628
  function createProgram({ rootNames, options, host, oldProgram }) {
4496
4629
  return new NgtscProgram(rootNames, options, host, oldProgram);
4497
4630
  }
4498
4631
 
4499
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
4500
- import ts26 from "typescript";
4632
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
4633
+ import ts28 from "typescript";
4501
4634
 
4502
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
4503
- import ts25 from "typescript";
4635
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
4636
+ import ts27 from "typescript";
4504
4637
  function createMessageDiagnostic(messageText) {
4505
4638
  return {
4506
4639
  file: void 0,
4507
4640
  start: void 0,
4508
4641
  length: void 0,
4509
- category: ts25.DiagnosticCategory.Message,
4642
+ category: ts27.DiagnosticCategory.Message,
4510
4643
  messageText,
4511
4644
  code: DEFAULT_ERROR_CODE,
4512
4645
  source: SOURCE
4513
4646
  };
4514
4647
  }
4515
4648
 
4516
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
4649
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
4517
4650
  var defaultFormatHost = {
4518
- getCurrentDirectory: () => ts26.sys.getCurrentDirectory(),
4651
+ getCurrentDirectory: () => ts28.sys.getCurrentDirectory(),
4519
4652
  getCanonicalFileName: (fileName) => fileName,
4520
- getNewLine: () => ts26.sys.newLine
4653
+ getNewLine: () => ts28.sys.newLine
4521
4654
  };
4522
4655
  function formatDiagnostics(diags, host = defaultFormatHost) {
4523
4656
  if (diags && diags.length) {
4524
- return diags.map((diagnostic) => replaceTsWithNgInErrors(ts26.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
4657
+ return diags.map((diagnostic) => replaceTsWithNgInErrors(ts28.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
4525
4658
  } else {
4526
4659
  return "";
4527
4660
  }
@@ -4538,7 +4671,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
4538
4671
  var _a;
4539
4672
  try {
4540
4673
  const fs = getFileSystem();
4541
- const readConfigFile = (configFile) => ts26.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
4674
+ const readConfigFile = (configFile) => ts28.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
4542
4675
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
4543
4676
  const { config: config2, error: error2 } = readConfigFile(configFile);
4544
4677
  if (error2) {
@@ -4573,7 +4706,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
4573
4706
  ...existingOptions
4574
4707
  };
4575
4708
  const parseConfigHost = createParseConfigHost(host, fs);
4576
- const { options, errors, fileNames: rootNames, projectReferences } = ts26.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
4709
+ const { options, errors, fileNames: rootNames, projectReferences } = ts28.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
4577
4710
  let emitFlags = EmitFlags.Default;
4578
4711
  if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
4579
4712
  emitFlags |= EmitFlags.Metadata;
@@ -4585,7 +4718,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
4585
4718
  } catch (e) {
4586
4719
  const errors = [
4587
4720
  {
4588
- category: ts26.DiagnosticCategory.Error,
4721
+ category: ts28.DiagnosticCategory.Error,
4589
4722
  messageText: (_a = e.stack) != null ? _a : e.message,
4590
4723
  file: void 0,
4591
4724
  start: void 0,
@@ -4600,7 +4733,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
4600
4733
  function createParseConfigHost(host, fs = getFileSystem()) {
4601
4734
  return {
4602
4735
  fileExists: host.exists.bind(host),
4603
- readDirectory: ts26.sys.readDirectory,
4736
+ readDirectory: ts28.sys.readDirectory,
4604
4737
  readFile: host.readFile.bind(host),
4605
4738
  useCaseSensitiveFileNames: fs.isCaseSensitive()
4606
4739
  };
@@ -4620,7 +4753,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
4620
4753
  }
4621
4754
  } else {
4622
4755
  const parseConfigHost = createParseConfigHost(host, fs);
4623
- const { resolvedModule } = ts26.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts26.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
4756
+ const { resolvedModule } = ts28.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts28.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
4624
4757
  if (resolvedModule) {
4625
4758
  return absoluteFrom(resolvedModule.resolvedFileName);
4626
4759
  }
@@ -4630,7 +4763,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
4630
4763
  function exitCodeFromResult(diags) {
4631
4764
  if (!diags)
4632
4765
  return 0;
4633
- if (diags.every((diag) => diag.category !== ts26.DiagnosticCategory.Error)) {
4766
+ if (diags.every((diag) => diag.category !== ts28.DiagnosticCategory.Error)) {
4634
4767
  return 0;
4635
4768
  }
4636
4769
  return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
@@ -4669,7 +4802,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
4669
4802
  } catch (e) {
4670
4803
  program = void 0;
4671
4804
  allDiagnostics.push({
4672
- category: ts26.DiagnosticCategory.Error,
4805
+ category: ts28.DiagnosticCategory.Error,
4673
4806
  messageText: (_a = e.stack) != null ? _a : e.message,
4674
4807
  code: UNKNOWN_ERROR_CODE,
4675
4808
  file: void 0,
@@ -4699,7 +4832,7 @@ function defaultGatherDiagnostics(program) {
4699
4832
  return allDiagnostics;
4700
4833
  }
4701
4834
  function hasErrors(diags) {
4702
- return diags.some((d) => d.category === ts26.DiagnosticCategory.Error);
4835
+ return diags.some((d) => d.category === ts28.DiagnosticCategory.Error);
4703
4836
  }
4704
4837
 
4705
4838
  export {
@@ -4744,4 +4877,4 @@ export {
4744
4877
  * Use of this source code is governed by an MIT-style license that can be
4745
4878
  * found in the LICENSE file at https://angular.io/license
4746
4879
  */
4747
- //# sourceMappingURL=chunk-QJ5A7O7J.js.map
4880
+ //# sourceMappingURL=chunk-5LDY2XWV.js.map