@angular/compiler-cli 17.3.1 → 17.3.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 (65) hide show
  1. package/bundles/{chunk-6X7GQ6BQ.js → chunk-6IQBXGRH.js} +591 -245
  2. package/bundles/chunk-6IQBXGRH.js.map +6 -0
  3. package/bundles/{chunk-3ESFLGKJ.js → chunk-7OQMTKOE.js} +254 -233
  4. package/bundles/chunk-7OQMTKOE.js.map +6 -0
  5. package/bundles/{chunk-OXIOYWLB.js → chunk-KP3UXB5C.js} +59 -57
  6. package/bundles/{chunk-OXIOYWLB.js.map → chunk-KP3UXB5C.js.map} +1 -1
  7. package/bundles/{chunk-VH6EDOMC.js → chunk-LHQ7WPU2.js} +2038 -858
  8. package/bundles/chunk-LHQ7WPU2.js.map +6 -0
  9. package/bundles/{chunk-F2QV65AH.js → chunk-VXEF7SDM.js} +2 -2
  10. package/bundles/{chunk-E5DF5SRS.js → chunk-ZS3FJJVW.js} +16 -16
  11. package/bundles/chunk-ZS3FJJVW.js.map +6 -0
  12. package/bundles/index.js +7 -5
  13. package/bundles/index.js.map +1 -1
  14. package/bundles/linker/babel/index.js +2 -2
  15. package/bundles/linker/index.js +2 -2
  16. package/bundles/private/migrations.js +2 -2
  17. package/bundles/private/tooling.js +3 -3
  18. package/bundles/src/bin/ng_xi18n.js +4 -4
  19. package/bundles/src/bin/ngc.js +4 -4
  20. package/bundles_metadata.json +1 -1
  21. package/index.d.ts +1 -0
  22. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  23. package/linker/src/file_linker/translator.d.ts +2 -2
  24. package/linker/src/linker_import_generator.d.ts +5 -5
  25. package/package.json +2 -2
  26. package/src/ngtsc/annotations/directive/index.d.ts +1 -0
  27. package/src/ngtsc/annotations/directive/src/initializer_function_access.d.ts +17 -0
  28. package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +10 -6
  29. package/src/ngtsc/annotations/directive/src/input_function.d.ts +1 -1
  30. package/src/ngtsc/annotations/directive/src/model_function.d.ts +1 -1
  31. package/src/ngtsc/annotations/directive/src/output_function.d.ts +1 -1
  32. package/src/ngtsc/annotations/directive/src/query_functions.d.ts +1 -1
  33. package/src/ngtsc/annotations/index.d.ts +1 -1
  34. package/src/ngtsc/diagnostics/src/error_code.d.ts +5 -0
  35. package/src/ngtsc/docs/src/entities.d.ts +36 -1
  36. package/src/ngtsc/docs/src/function_extractor.d.ts +3 -2
  37. package/src/ngtsc/docs/src/initializer_api_function_extractor.d.ts +24 -0
  38. package/src/ngtsc/imports/index.d.ts +1 -1
  39. package/src/ngtsc/imports/src/core.d.ts +0 -9
  40. package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +3 -1
  41. package/src/ngtsc/reflection/src/host.d.ts +13 -3
  42. package/src/ngtsc/reflection/src/typescript.d.ts +8 -1
  43. package/src/ngtsc/reflection/src/util.d.ts +6 -1
  44. package/src/ngtsc/transform/index.d.ts +0 -1
  45. package/src/ngtsc/transform/src/declaration.d.ts +1 -1
  46. package/src/ngtsc/translator/index.d.ts +2 -2
  47. package/src/ngtsc/translator/src/api/import_generator.d.ts +22 -10
  48. package/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.d.ts +13 -0
  49. package/src/ngtsc/translator/src/import_manager/import_manager.d.ts +94 -0
  50. package/src/ngtsc/translator/src/import_manager/import_typescript_transform.d.ts +17 -0
  51. package/src/ngtsc/translator/src/import_manager/reuse_generated_imports.d.ts +32 -0
  52. package/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.d.ts +38 -0
  53. package/src/ngtsc/translator/src/translator.d.ts +3 -2
  54. package/src/ngtsc/translator/src/type_translator.d.ts +1 -1
  55. package/src/ngtsc/translator/src/typescript_translator.d.ts +2 -2
  56. package/src/ngtsc/typecheck/src/reference_emit_environment.d.ts +1 -1
  57. package/src/ngtsc/typecheck/src/ts_util.d.ts +0 -2
  58. package/src/transformers/jit_transforms/initializer_api_transforms/transform_api.d.ts +4 -4
  59. package/bundles/chunk-3ESFLGKJ.js.map +0 -6
  60. package/bundles/chunk-6X7GQ6BQ.js.map +0 -6
  61. package/bundles/chunk-E5DF5SRS.js.map +0 -6
  62. package/bundles/chunk-VH6EDOMC.js.map +0 -6
  63. package/src/ngtsc/transform/src/utils.d.ts +0 -15
  64. package/src/ngtsc/translator/src/import_manager.d.ts +0 -47
  65. /package/bundles/{chunk-F2QV65AH.js.map → chunk-VXEF7SDM.js.map} +0 -0
@@ -4,6 +4,7 @@
4
4
 
5
5
  import {
6
6
  AmbientImport,
7
+ ClassMemberAccessLevel,
7
8
  ClassMemberKind,
8
9
  ErrorCode,
9
10
  FatalDiagnosticError,
@@ -12,6 +13,7 @@ import {
12
13
  Reference,
13
14
  assertSuccessfulReferenceEmit,
14
15
  attachDefaultImportDeclaration,
16
+ classMemberAccessLevelToString,
15
17
  entityNameToValue,
16
18
  filterToMembersWithDecorator,
17
19
  getDefaultImportDeclaration,
@@ -21,16 +23,18 @@ import {
21
23
  isFromDtsFile,
22
24
  isNamedClassDeclaration,
23
25
  makeDiagnostic,
26
+ makeDiagnosticChain,
24
27
  makeRelatedInformation,
25
28
  nodeDebugInfo,
26
29
  nodeNameForError,
30
+ presetImportManagerForceNamespaceImports,
27
31
  reflectObjectLiteral,
28
32
  reflectTypeEntityToDeclaration,
29
33
  translateExpression,
30
34
  translateStatement,
31
35
  translateType,
32
36
  typeNodeToValueExpr
33
- } from "./chunk-6X7GQ6BQ.js";
37
+ } from "./chunk-6IQBXGRH.js";
34
38
  import {
35
39
  PerfEvent,
36
40
  PerfPhase
@@ -1352,7 +1356,7 @@ function createUnsuitableInjectionTokenError(clazz, error) {
1352
1356
  }
1353
1357
 
1354
1358
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1355
- import ts13 from "typescript";
1359
+ import ts12 from "typescript";
1356
1360
 
1357
1361
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1358
1362
  var MetaKind;
@@ -2677,53 +2681,7 @@ function containsErrors(diagnostics) {
2677
2681
  }
2678
2682
 
2679
2683
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
2680
- import ts10 from "typescript";
2681
-
2682
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
2683
2684
  import ts9 from "typescript";
2684
- function addImports(factory = ts9.factory, importManager, sf, extraStatements = []) {
2685
- const addedImports = importManager.getAllImports(sf.fileName).map((i) => i.qualifier !== null ? createNamespaceImportDecl(i, factory) : createSideEffectImportDecl(i, factory));
2686
- const existingImports = sf.statements.filter((stmt) => isImportStatement(stmt));
2687
- const body = sf.statements.filter((stmt) => !isImportStatement(stmt));
2688
- if (addedImports.length > 0) {
2689
- const fileoverviewAnchorStmt = factory.createNotEmittedStatement(sf);
2690
- return factory.updateSourceFile(sf, factory.createNodeArray([
2691
- fileoverviewAnchorStmt,
2692
- ...existingImports,
2693
- ...addedImports,
2694
- ...extraStatements,
2695
- ...body
2696
- ]));
2697
- }
2698
- return sf;
2699
- }
2700
- function createNamespaceImportDecl(i, factory) {
2701
- const qualifier = factory.createIdentifier(i.qualifier.text);
2702
- const importClause = factory.createImportClause(
2703
- false,
2704
- void 0,
2705
- factory.createNamespaceImport(qualifier)
2706
- );
2707
- const decl = factory.createImportDeclaration(
2708
- void 0,
2709
- importClause,
2710
- factory.createStringLiteral(i.specifier)
2711
- );
2712
- ts9.setOriginalNode(i.qualifier, decl);
2713
- return decl;
2714
- }
2715
- function createSideEffectImportDecl(i, factory) {
2716
- return factory.createImportDeclaration(
2717
- void 0,
2718
- void 0,
2719
- ts9.factory.createStringLiteral(i.specifier)
2720
- );
2721
- }
2722
- function isImportStatement(stmt) {
2723
- return ts9.isImportDeclaration(stmt) || ts9.isImportEqualsDeclaration(stmt) || ts9.isNamespaceImport(stmt);
2724
- }
2725
-
2726
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
2727
2685
  var DtsTransformRegistry = class {
2728
2686
  constructor() {
2729
2687
  this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
@@ -2738,7 +2696,7 @@ var DtsTransformRegistry = class {
2738
2696
  if (!sf.isDeclarationFile) {
2739
2697
  return null;
2740
2698
  }
2741
- const originalSf = ts10.getOriginalNode(sf);
2699
+ const originalSf = ts9.getOriginalNode(sf);
2742
2700
  let transforms = null;
2743
2701
  if (this.ivyDeclarationTransforms.has(originalSf)) {
2744
2702
  transforms = [];
@@ -2747,11 +2705,11 @@ var DtsTransformRegistry = class {
2747
2705
  return transforms;
2748
2706
  }
2749
2707
  };
2750
- function declarationTransformFactory(transformRegistry, reflector, refEmitter, importRewriter, importPrefix) {
2708
+ function declarationTransformFactory(transformRegistry, reflector, refEmitter, importRewriter) {
2751
2709
  return (context) => {
2752
- const transformer = new DtsTransformer(context, reflector, refEmitter, importRewriter, importPrefix);
2710
+ const transformer = new DtsTransformer(context, reflector, refEmitter, importRewriter);
2753
2711
  return (fileOrBundle) => {
2754
- if (ts10.isBundle(fileOrBundle)) {
2712
+ if (ts9.isBundle(fileOrBundle)) {
2755
2713
  return fileOrBundle;
2756
2714
  }
2757
2715
  const transforms = transformRegistry.getAllTransforms(fileOrBundle);
@@ -2763,26 +2721,25 @@ function declarationTransformFactory(transformRegistry, reflector, refEmitter, i
2763
2721
  };
2764
2722
  }
2765
2723
  var DtsTransformer = class {
2766
- constructor(ctx, reflector, refEmitter, importRewriter, importPrefix) {
2724
+ constructor(ctx, reflector, refEmitter, importRewriter) {
2767
2725
  this.ctx = ctx;
2768
2726
  this.reflector = reflector;
2769
2727
  this.refEmitter = refEmitter;
2770
2728
  this.importRewriter = importRewriter;
2771
- this.importPrefix = importPrefix;
2772
2729
  }
2773
2730
  transform(sf, transforms) {
2774
- const imports = new ImportManager(this.importRewriter, this.importPrefix);
2731
+ const imports = new ImportManager({ ...presetImportManagerForceNamespaceImports, rewriter: this.importRewriter });
2775
2732
  const visitor = (node) => {
2776
- if (ts10.isClassDeclaration(node)) {
2733
+ if (ts9.isClassDeclaration(node)) {
2777
2734
  return this.transformClassDeclaration(node, transforms, imports);
2778
- } else if (ts10.isFunctionDeclaration(node)) {
2735
+ } else if (ts9.isFunctionDeclaration(node)) {
2779
2736
  return this.transformFunctionDeclaration(node, transforms, imports);
2780
2737
  } else {
2781
- return ts10.visitEachChild(node, visitor, this.ctx);
2738
+ return ts9.visitEachChild(node, visitor, this.ctx);
2782
2739
  }
2783
2740
  };
2784
- sf = ts10.visitNode(sf, visitor, ts10.isSourceFile) || sf;
2785
- return addImports(this.ctx.factory, imports, sf);
2741
+ sf = ts9.visitNode(sf, visitor, ts9.isSourceFile) || sf;
2742
+ return imports.transformTsFile(this.ctx, sf);
2786
2743
  }
2787
2744
  transformClassDeclaration(clazz, transforms, imports) {
2788
2745
  let elements = clazz.members;
@@ -2809,7 +2766,7 @@ var DtsTransformer = class {
2809
2766
  }
2810
2767
  }
2811
2768
  if (elementsChanged && clazz === newClazz) {
2812
- newClazz = ts10.factory.updateClassDeclaration(
2769
+ newClazz = ts9.factory.updateClassDeclaration(
2813
2770
  clazz,
2814
2771
  clazz.modifiers,
2815
2772
  clazz.name,
@@ -2838,16 +2795,16 @@ var IvyDeclarationDtsTransform = class {
2838
2795
  this.declarationFields.set(decl, fields);
2839
2796
  }
2840
2797
  transformClass(clazz, members, reflector, refEmitter, imports) {
2841
- const original = ts10.getOriginalNode(clazz);
2798
+ const original = ts9.getOriginalNode(clazz);
2842
2799
  if (!this.declarationFields.has(original)) {
2843
2800
  return clazz;
2844
2801
  }
2845
2802
  const fields = this.declarationFields.get(original);
2846
2803
  const newMembers = fields.map((decl) => {
2847
- const modifiers = [ts10.factory.createModifier(ts10.SyntaxKind.StaticKeyword)];
2804
+ const modifiers = [ts9.factory.createModifier(ts9.SyntaxKind.StaticKeyword)];
2848
2805
  const typeRef = translateType(decl.type, original.getSourceFile(), reflector, refEmitter, imports);
2849
2806
  markForEmitAsSingleLine(typeRef);
2850
- return ts10.factory.createPropertyDeclaration(
2807
+ return ts9.factory.createPropertyDeclaration(
2851
2808
  modifiers,
2852
2809
  decl.name,
2853
2810
  void 0,
@@ -2855,7 +2812,7 @@ var IvyDeclarationDtsTransform = class {
2855
2812
  void 0
2856
2813
  );
2857
2814
  });
2858
- return ts10.factory.updateClassDeclaration(
2815
+ return ts9.factory.updateClassDeclaration(
2859
2816
  clazz,
2860
2817
  clazz.modifiers,
2861
2818
  clazz.name,
@@ -2866,16 +2823,16 @@ var IvyDeclarationDtsTransform = class {
2866
2823
  }
2867
2824
  };
2868
2825
  function markForEmitAsSingleLine(node) {
2869
- ts10.setEmitFlags(node, ts10.EmitFlags.SingleLine);
2870
- ts10.forEachChild(node, markForEmitAsSingleLine);
2826
+ ts9.setEmitFlags(node, ts9.EmitFlags.SingleLine);
2827
+ ts9.forEachChild(node, markForEmitAsSingleLine);
2871
2828
  }
2872
2829
 
2873
2830
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
2874
2831
  import { ConstantPool } from "@angular/compiler";
2875
- import ts12 from "typescript";
2832
+ import ts11 from "typescript";
2876
2833
 
2877
2834
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
2878
- import ts11 from "typescript";
2835
+ import ts10 from "typescript";
2879
2836
  function visit(node, visitor, context) {
2880
2837
  return visitor._visit(node, context);
2881
2838
  }
@@ -2899,13 +2856,13 @@ var Visitor = class {
2899
2856
  }
2900
2857
  _visit(node, context) {
2901
2858
  let visitedNode = null;
2902
- node = ts11.visitEachChild(node, (child) => child && this._visit(child, context), context);
2903
- if (ts11.isClassDeclaration(node)) {
2859
+ node = ts10.visitEachChild(node, (child) => child && this._visit(child, context), context);
2860
+ if (ts10.isClassDeclaration(node)) {
2904
2861
  visitedNode = this._visitListEntryNode(node, (node2) => this.visitClassDeclaration(node2));
2905
2862
  } else {
2906
2863
  visitedNode = this.visitOtherNode(node);
2907
2864
  }
2908
- if (visitedNode && (ts11.isBlock(visitedNode) || ts11.isSourceFile(visitedNode))) {
2865
+ if (visitedNode && (ts10.isBlock(visitedNode) || ts10.isSourceFile(visitedNode))) {
2909
2866
  visitedNode = this._maybeProcessStatements(visitedNode);
2910
2867
  }
2911
2868
  return visitedNode;
@@ -2926,11 +2883,11 @@ var Visitor = class {
2926
2883
  this._after.delete(stmt);
2927
2884
  }
2928
2885
  });
2929
- const statementsArray = ts11.factory.createNodeArray(newStatements, node.statements.hasTrailingComma);
2930
- if (ts11.isBlock(node)) {
2931
- return ts11.factory.updateBlock(node, statementsArray);
2886
+ const statementsArray = ts10.factory.createNodeArray(newStatements, node.statements.hasTrailingComma);
2887
+ if (ts10.isBlock(node)) {
2888
+ return ts10.factory.updateBlock(node, statementsArray);
2932
2889
  } else {
2933
- return ts11.factory.updateSourceFile(node, statementsArray, node.isDeclarationFile, node.referencedFiles, node.typeReferenceDirectives, node.hasNoDefaultLib, node.libReferenceDirectives);
2890
+ return ts10.factory.updateSourceFile(node, statementsArray, node.isDeclarationFile, node.referencedFiles, node.typeReferenceDirectives, node.hasNoDefaultLib, node.libReferenceDirectives);
2934
2891
  }
2935
2892
  }
2936
2893
  };
@@ -2989,30 +2946,31 @@ var IvyTransformationVisitor = class extends Visitor {
2989
2946
  };
2990
2947
  const statements = [];
2991
2948
  const members = [...node.members];
2949
+ const sourceFile = ts11.getOriginalNode(node).getSourceFile();
2992
2950
  for (const field of this.classCompilationMap.get(node)) {
2993
2951
  if (field.initializer === null) {
2994
2952
  continue;
2995
2953
  }
2996
- const exprNode = translateExpression(field.initializer, this.importManager, translateOptions);
2997
- const property = ts12.factory.createPropertyDeclaration([ts12.factory.createToken(ts12.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
2954
+ const exprNode = translateExpression(sourceFile, field.initializer, this.importManager, translateOptions);
2955
+ const property = ts11.factory.createPropertyDeclaration([ts11.factory.createToken(ts11.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
2998
2956
  if (this.isClosureCompilerEnabled) {
2999
- ts12.addSyntheticLeadingComment(
2957
+ ts11.addSyntheticLeadingComment(
3000
2958
  property,
3001
- ts12.SyntaxKind.MultiLineCommentTrivia,
2959
+ ts11.SyntaxKind.MultiLineCommentTrivia,
3002
2960
  "* @nocollapse ",
3003
2961
  false
3004
2962
  );
3005
2963
  }
3006
- field.statements.map((stmt) => translateStatement(stmt, this.importManager, translateOptions)).forEach((stmt) => statements.push(stmt));
2964
+ field.statements.map((stmt) => translateStatement(sourceFile, stmt, this.importManager, translateOptions)).forEach((stmt) => statements.push(stmt));
3007
2965
  members.push(property);
3008
2966
  }
3009
- const filteredDecorators = maybeFilterDecorator(ts12.getDecorators(node), this.compilation.decoratorsFor(node));
3010
- const nodeModifiers = ts12.getModifiers(node);
2967
+ const filteredDecorators = maybeFilterDecorator(ts11.getDecorators(node), this.compilation.decoratorsFor(node));
2968
+ const nodeModifiers = ts11.getModifiers(node);
3011
2969
  let updatedModifiers;
3012
2970
  if ((filteredDecorators == null ? void 0 : filteredDecorators.length) || (nodeModifiers == null ? void 0 : nodeModifiers.length)) {
3013
2971
  updatedModifiers = [...filteredDecorators || [], ...nodeModifiers || []];
3014
2972
  }
3015
- node = ts12.factory.updateClassDeclaration(
2973
+ node = ts11.factory.updateClassDeclaration(
3016
2974
  node,
3017
2975
  updatedModifiers,
3018
2976
  node.name,
@@ -3023,7 +2981,7 @@ var IvyTransformationVisitor = class extends Visitor {
3023
2981
  return { node, after: statements };
3024
2982
  }
3025
2983
  visitOtherNode(node) {
3026
- if (ts12.isImportDeclaration(node) && this.deferrableImports.has(node)) {
2984
+ if (ts11.isImportDeclaration(node) && this.deferrableImports.has(node)) {
3027
2985
  return null;
3028
2986
  }
3029
2987
  return node;
@@ -3041,7 +2999,7 @@ var IvyTransformationVisitor = class extends Visitor {
3041
2999
  }
3042
3000
  }
3043
3001
  _nonCoreDecoratorsOnly(node) {
3044
- const decorators = ts12.getDecorators(node);
3002
+ const decorators = ts11.getDecorators(node);
3045
3003
  if (decorators === void 0) {
3046
3004
  return void 0;
3047
3005
  }
@@ -3058,35 +3016,35 @@ var IvyTransformationVisitor = class extends Visitor {
3058
3016
  return nodeArrayFromDecoratorsArray(filtered);
3059
3017
  }
3060
3018
  _stripAngularDecorators(node) {
3061
- const modifiers = ts12.canHaveModifiers(node) ? ts12.getModifiers(node) : void 0;
3062
- const nonCoreDecorators = ts12.canHaveDecorators(node) ? this._nonCoreDecoratorsOnly(node) : void 0;
3019
+ const modifiers = ts11.canHaveModifiers(node) ? ts11.getModifiers(node) : void 0;
3020
+ const nonCoreDecorators = ts11.canHaveDecorators(node) ? this._nonCoreDecoratorsOnly(node) : void 0;
3063
3021
  const combinedModifiers = [...nonCoreDecorators || [], ...modifiers || []];
3064
- if (ts12.isParameter(node)) {
3065
- node = ts12.factory.updateParameterDeclaration(node, combinedModifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
3066
- } else if (ts12.isMethodDeclaration(node)) {
3067
- node = ts12.factory.updateMethodDeclaration(node, combinedModifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
3068
- } else if (ts12.isPropertyDeclaration(node)) {
3069
- node = ts12.factory.updatePropertyDeclaration(node, combinedModifiers, node.name, node.questionToken, node.type, node.initializer);
3070
- } else if (ts12.isGetAccessor(node)) {
3071
- node = ts12.factory.updateGetAccessorDeclaration(node, combinedModifiers, node.name, node.parameters, node.type, node.body);
3072
- } else if (ts12.isSetAccessor(node)) {
3073
- node = ts12.factory.updateSetAccessorDeclaration(node, combinedModifiers, node.name, node.parameters, node.body);
3074
- } else if (ts12.isConstructorDeclaration(node)) {
3022
+ if (ts11.isParameter(node)) {
3023
+ node = ts11.factory.updateParameterDeclaration(node, combinedModifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
3024
+ } else if (ts11.isMethodDeclaration(node)) {
3025
+ node = ts11.factory.updateMethodDeclaration(node, combinedModifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
3026
+ } else if (ts11.isPropertyDeclaration(node)) {
3027
+ node = ts11.factory.updatePropertyDeclaration(node, combinedModifiers, node.name, node.questionToken, node.type, node.initializer);
3028
+ } else if (ts11.isGetAccessor(node)) {
3029
+ node = ts11.factory.updateGetAccessorDeclaration(node, combinedModifiers, node.name, node.parameters, node.type, node.body);
3030
+ } else if (ts11.isSetAccessor(node)) {
3031
+ node = ts11.factory.updateSetAccessorDeclaration(node, combinedModifiers, node.name, node.parameters, node.body);
3032
+ } else if (ts11.isConstructorDeclaration(node)) {
3075
3033
  const parameters = node.parameters.map((param) => this._stripAngularDecorators(param));
3076
- node = ts12.factory.updateConstructorDeclaration(node, modifiers, parameters, node.body);
3034
+ node = ts11.factory.updateConstructorDeclaration(node, modifiers, parameters, node.body);
3077
3035
  }
3078
3036
  return node;
3079
3037
  }
3080
3038
  };
3081
3039
  function transformIvySourceFile(compilation, context, reflector, importRewriter, localCompilationExtraImportsTracker, file, isCore, isClosureCompilerEnabled, recordWrappedNode) {
3082
3040
  const constantPool = new ConstantPool(isClosureCompilerEnabled);
3083
- const importManager = new ImportManager(importRewriter);
3041
+ const importManager = new ImportManager({ ...presetImportManagerForceNamespaceImports, rewriter: importRewriter });
3084
3042
  const compilationVisitor = new IvyCompilationVisitor(compilation, constantPool);
3085
3043
  visit(file, compilationVisitor, context);
3086
3044
  const transformationVisitor = new IvyTransformationVisitor(compilation, compilationVisitor.classCompilationMap, reflector, importManager, recordWrappedNode, isClosureCompilerEnabled, isCore, compilationVisitor.deferrableImports);
3087
3045
  let sf = visit(file, transformationVisitor, context);
3088
- const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts12.ScriptTarget.ES2015;
3089
- const constants = constantPool.statements.map((stmt) => translateStatement(stmt, importManager, {
3046
+ const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts11.ScriptTarget.ES2015;
3047
+ const constants = constantPool.statements.map((stmt) => translateStatement(file, stmt, importManager, {
3090
3048
  recordWrappedNode,
3091
3049
  downlevelTaggedTemplates: downlevelTranslatedCode,
3092
3050
  downlevelVariableDeclarations: downlevelTranslatedCode,
@@ -3095,27 +3053,27 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
3095
3053
  const fileOverviewMeta = isClosureCompilerEnabled ? getFileOverviewComment(sf.statements) : null;
3096
3054
  if (localCompilationExtraImportsTracker !== null) {
3097
3055
  for (const moduleName of localCompilationExtraImportsTracker.getImportsForFile(sf)) {
3098
- importManager.generateSideEffectImport(moduleName);
3056
+ importManager.addSideEffectImport(sf, moduleName);
3099
3057
  }
3100
3058
  }
3101
- sf = addImports(context.factory, importManager, sf, constants);
3059
+ sf = importManager.transformTsFile(context, sf, constants);
3102
3060
  if (fileOverviewMeta !== null) {
3103
- setFileOverviewComment(sf, fileOverviewMeta);
3061
+ sf = insertFileOverviewComment(sf, fileOverviewMeta);
3104
3062
  }
3105
3063
  return sf;
3106
3064
  }
3107
3065
  function getLocalizeCompileTarget(context) {
3108
- const target = context.getCompilerOptions().target || ts12.ScriptTarget.ES2015;
3109
- return target !== ts12.ScriptTarget.JSON ? target : ts12.ScriptTarget.ES2015;
3066
+ const target = context.getCompilerOptions().target || ts11.ScriptTarget.ES2015;
3067
+ return target !== ts11.ScriptTarget.JSON ? target : ts11.ScriptTarget.ES2015;
3110
3068
  }
3111
3069
  function getFileOverviewComment(statements) {
3112
3070
  if (statements.length > 0) {
3113
3071
  const host = statements[0];
3114
3072
  let trailing = false;
3115
- let comments = ts12.getSyntheticLeadingComments(host);
3073
+ let comments = ts11.getSyntheticLeadingComments(host);
3116
3074
  if (!comments || comments.length === 0) {
3117
3075
  trailing = true;
3118
- comments = ts12.getSyntheticTrailingComments(host);
3076
+ comments = ts11.getSyntheticTrailingComments(host);
3119
3077
  }
3120
3078
  if (comments && comments.length > 0 && CLOSURE_FILE_OVERVIEW_REGEXP.test(comments[0].text)) {
3121
3079
  return { comments, host, trailing };
@@ -3123,26 +3081,29 @@ function getFileOverviewComment(statements) {
3123
3081
  }
3124
3082
  return null;
3125
3083
  }
3126
- function setFileOverviewComment(sf, fileoverview) {
3084
+ function insertFileOverviewComment(sf, fileoverview) {
3127
3085
  const { comments, host, trailing } = fileoverview;
3128
3086
  if (sf.statements.length > 0 && host !== sf.statements[0]) {
3129
3087
  if (trailing) {
3130
- ts12.setSyntheticTrailingComments(host, void 0);
3088
+ ts11.setSyntheticTrailingComments(host, void 0);
3131
3089
  } else {
3132
- ts12.setSyntheticLeadingComments(host, void 0);
3090
+ ts11.setSyntheticLeadingComments(host, void 0);
3133
3091
  }
3134
- ts12.setSyntheticLeadingComments(sf.statements[0], comments);
3092
+ const commentNode = ts11.factory.createNotEmittedStatement(sf);
3093
+ ts11.setSyntheticLeadingComments(commentNode, comments);
3094
+ return ts11.factory.updateSourceFile(sf, [commentNode, ...sf.statements], sf.isDeclarationFile, sf.referencedFiles, sf.typeReferenceDirectives, sf.hasNoDefaultLib, sf.libReferenceDirectives);
3135
3095
  }
3096
+ return sf;
3136
3097
  }
3137
3098
  function maybeFilterDecorator(decorators, toRemove) {
3138
3099
  if (decorators === void 0) {
3139
3100
  return void 0;
3140
3101
  }
3141
- const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts12.getOriginalNode(dec) === decToRemove) === void 0);
3102
+ const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts11.getOriginalNode(dec) === decToRemove) === void 0);
3142
3103
  if (filtered.length === 0) {
3143
3104
  return void 0;
3144
3105
  }
3145
- return ts12.factory.createNodeArray(filtered);
3106
+ return ts11.factory.createNodeArray(filtered);
3146
3107
  }
3147
3108
  function isFromAngularCore(decorator) {
3148
3109
  return decorator.import !== null && decorator.import.from === "@angular/core";
@@ -3156,7 +3117,7 @@ function createRecorderFn(defaultImportTracker) {
3156
3117
  };
3157
3118
  }
3158
3119
  function nodeArrayFromDecoratorsArray(decorators) {
3159
- const array = ts12.factory.createNodeArray(decorators);
3120
+ const array = ts11.factory.createNodeArray(decorators);
3160
3121
  if (array.length > 0) {
3161
3122
  array.pos = decorators[0].pos;
3162
3123
  array.end = decorators[decorators.length - 1].end;
@@ -3193,11 +3154,11 @@ function createValueHasWrongTypeError(node, value, messageText) {
3193
3154
  }
3194
3155
  const chain = {
3195
3156
  messageText,
3196
- category: ts13.DiagnosticCategory.Error,
3157
+ category: ts12.DiagnosticCategory.Error,
3197
3158
  code: 0,
3198
3159
  next: [{
3199
3160
  messageText: chainedMessage,
3200
- category: ts13.DiagnosticCategory.Message,
3161
+ category: ts12.DiagnosticCategory.Message,
3201
3162
  code: 0
3202
3163
  }]
3203
3164
  };
@@ -3373,7 +3334,7 @@ function assertLocalCompilationUnresolvedConst(compilationMode, value, nodeToHig
3373
3334
 
3374
3335
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
3375
3336
  import { ViewEncapsulation } from "@angular/compiler";
3376
- import ts14 from "typescript";
3337
+ import ts13 from "typescript";
3377
3338
  function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
3378
3339
  let resolved = null;
3379
3340
  if (metadata.has(field)) {
@@ -3415,7 +3376,7 @@ function resolveLiteral(decorator, literalCache) {
3415
3376
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @${decorator.name} decorator`);
3416
3377
  }
3417
3378
  const meta = unwrapExpression(decorator.args[0]);
3418
- if (!ts14.isObjectLiteralExpression(meta)) {
3379
+ if (!ts13.isObjectLiteralExpression(meta)) {
3419
3380
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `Decorator argument must be literal.`);
3420
3381
  }
3421
3382
  literalCache.set(decorator, meta);
@@ -3473,7 +3434,7 @@ var InjectableClassRegistry = class {
3473
3434
 
3474
3435
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
3475
3436
  import { ArrowFunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
3476
- import ts15 from "typescript";
3437
+ import ts14 from "typescript";
3477
3438
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
3478
3439
  if (!reflection.isClass(clazz)) {
3479
3440
  return null;
@@ -3487,7 +3448,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
3487
3448
  if (ngClassDecorators.length === 0) {
3488
3449
  return null;
3489
3450
  }
3490
- const metaDecorators = new WrappedNodeExpr3(ts15.factory.createArrayLiteralExpression(ngClassDecorators));
3451
+ const metaDecorators = new WrappedNodeExpr3(ts14.factory.createArrayLiteralExpression(ngClassDecorators));
3491
3452
  let metaCtorParameters = null;
3492
3453
  const classCtorParameters = reflection.getConstructorParameters(clazz);
3493
3454
  if (classCtorParameters !== null) {
@@ -3505,7 +3466,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
3505
3466
  return classMemberToMetadata((_a = member.nameNode) != null ? _a : member.name, member.decorators, isCore);
3506
3467
  });
3507
3468
  if (decoratedMembers.length > 0) {
3508
- metaPropDecorators = new WrappedNodeExpr3(ts15.factory.createObjectLiteralExpression(decoratedMembers));
3469
+ metaPropDecorators = new WrappedNodeExpr3(ts14.factory.createObjectLiteralExpression(decoratedMembers));
3509
3470
  }
3510
3471
  return {
3511
3472
  type: new WrappedNodeExpr3(id),
@@ -3521,37 +3482,37 @@ function ctorParameterToMetadata(param, isCore) {
3521
3482
  ];
3522
3483
  if (param.decorators !== null) {
3523
3484
  const ngDecorators = param.decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
3524
- const value = new WrappedNodeExpr3(ts15.factory.createArrayLiteralExpression(ngDecorators));
3485
+ const value = new WrappedNodeExpr3(ts14.factory.createArrayLiteralExpression(ngDecorators));
3525
3486
  mapEntries.push({ key: "decorators", value, quoted: false });
3526
3487
  }
3527
3488
  return literalMap(mapEntries);
3528
3489
  }
3529
3490
  function classMemberToMetadata(name, decorators, isCore) {
3530
3491
  const ngDecorators = decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
3531
- const decoratorMeta = ts15.factory.createArrayLiteralExpression(ngDecorators);
3532
- return ts15.factory.createPropertyAssignment(name, decoratorMeta);
3492
+ const decoratorMeta = ts14.factory.createArrayLiteralExpression(ngDecorators);
3493
+ return ts14.factory.createPropertyAssignment(name, decoratorMeta);
3533
3494
  }
3534
3495
  function decoratorToMetadata(decorator, wrapFunctionsInParens) {
3535
3496
  if (decorator.identifier === null) {
3536
3497
  throw new Error("Illegal state: synthesized decorator cannot be emitted in class metadata.");
3537
3498
  }
3538
3499
  const properties = [
3539
- ts15.factory.createPropertyAssignment("type", decorator.identifier)
3500
+ ts14.factory.createPropertyAssignment("type", decorator.identifier)
3540
3501
  ];
3541
3502
  if (decorator.args !== null && decorator.args.length > 0) {
3542
3503
  const args = decorator.args.map((arg) => {
3543
3504
  return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(arg) : arg;
3544
3505
  });
3545
- properties.push(ts15.factory.createPropertyAssignment("args", ts15.factory.createArrayLiteralExpression(args)));
3506
+ properties.push(ts14.factory.createPropertyAssignment("args", ts14.factory.createArrayLiteralExpression(args)));
3546
3507
  }
3547
- return ts15.factory.createObjectLiteralExpression(properties, true);
3508
+ return ts14.factory.createObjectLiteralExpression(properties, true);
3548
3509
  }
3549
3510
  function isAngularDecorator2(decorator, isCore) {
3550
3511
  return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
3551
3512
  }
3552
3513
  function removeIdentifierReferences(node, names) {
3553
- const result = ts15.transform(node, [(context) => (root) => ts15.visitNode(root, function walk(current) {
3554
- return ts15.isIdentifier(current) && (typeof names === "string" ? current.text === names : names.has(current.text)) ? ts15.factory.createIdentifier(current.text) : ts15.visitEachChild(current, walk, context);
3514
+ const result = ts14.transform(node, [(context) => (root) => ts14.visitNode(root, function walk(current) {
3515
+ return ts14.isIdentifier(current) && (typeof names === "string" ? current.text === names : names.has(current.text)) ? ts14.factory.createIdentifier(current.text) : ts14.visitEachChild(current, walk, context);
3555
3516
  })]);
3556
3517
  return result.transformed[0];
3557
3518
  }
@@ -3639,10 +3600,10 @@ function compileInputTransformFields(inputs) {
3639
3600
 
3640
3601
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
3641
3602
  import { compileClassDebugInfo, compileComponentClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, ExternalExpr as ExternalExpr6, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation as ViewEncapsulation2, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
3642
- import ts27 from "typescript";
3603
+ import ts26 from "typescript";
3643
3604
 
3644
3605
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
3645
- import ts16 from "typescript";
3606
+ import ts15 from "typescript";
3646
3607
  var SemanticSymbol = class {
3647
3608
  constructor(decl) {
3648
3609
  this.decl = decl;
@@ -3651,7 +3612,7 @@ var SemanticSymbol = class {
3651
3612
  }
3652
3613
  };
3653
3614
  function getSymbolIdentifier(decl) {
3654
- if (!ts16.isSourceFile(decl.parent)) {
3615
+ if (!ts15.isSourceFile(decl.parent)) {
3655
3616
  return null;
3656
3617
  }
3657
3618
  return decl.name.text;
@@ -3801,7 +3762,7 @@ function getImportPath(expr) {
3801
3762
  }
3802
3763
 
3803
3764
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3804
- import ts17 from "typescript";
3765
+ import ts16 from "typescript";
3805
3766
 
3806
3767
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
3807
3768
  function isSymbolEqual(a, b) {
@@ -3855,7 +3816,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
3855
3816
 
3856
3817
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3857
3818
  function extractSemanticTypeParameters(node) {
3858
- if (!ts17.isClassDeclaration(node) || node.typeParameters === void 0) {
3819
+ if (!ts16.isClassDeclaration(node) || node.typeParameters === void 0) {
3859
3820
  return null;
3860
3821
  }
3861
3822
  return node.typeParameters.map((typeParam) => ({ hasGenericTypeBound: typeParam.constraint !== void 0 }));
@@ -3983,7 +3944,7 @@ var MetadataDtsModuleScopeResolver = class {
3983
3944
 
3984
3945
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
3985
3946
  import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
3986
- import ts18 from "typescript";
3947
+ import ts17 from "typescript";
3987
3948
 
3988
3949
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
3989
3950
  function getDiagnosticNode(ref, rawExpr) {
@@ -4239,7 +4200,7 @@ var LocalModuleScopeRegistry = class {
4239
4200
  }
4240
4201
  getExportedScope(ref, diagnostics, ownerForErrors, type) {
4241
4202
  if (ref.node.getSourceFile().isDeclarationFile) {
4242
- if (!ts18.isClassDeclaration(ref.node)) {
4203
+ if (!ts17.isClassDeclaration(ref.node)) {
4243
4204
  const code = type === "import" ? ErrorCode.NGMODULE_INVALID_IMPORT : ErrorCode.NGMODULE_INVALID_EXPORT;
4244
4205
  diagnostics.push(makeDiagnostic(code, identifierOfNode(ref.node) || ref.node, `Appears in the NgModule.${type}s of ${nodeNameForError(ownerForErrors)}, but could not be resolved to an NgModule`));
4245
4206
  return "invalid";
@@ -4352,7 +4313,7 @@ function reexportCollision(module, refA, refB) {
4352
4313
 
4353
4314
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
4354
4315
  import { CssSelector, SelectorMatcher } from "@angular/compiler";
4355
- import ts19 from "typescript";
4316
+ import ts18 from "typescript";
4356
4317
  var TypeCheckScopeRegistry = class {
4357
4318
  constructor(scopeReader, metaReader, hostDirectivesResolver) {
4358
4319
  this.scopeReader = scopeReader;
@@ -4395,8 +4356,8 @@ var TypeCheckScopeRegistry = class {
4395
4356
  matcher.addSelectables(CssSelector.parse(meta.selector), [...this.hostDirectivesResolver.resolve(directiveMeta), directiveMeta]);
4396
4357
  directives.push(directiveMeta);
4397
4358
  } else if (meta.kind === MetaKind.Pipe) {
4398
- if (!ts19.isClassDeclaration(meta.ref.node)) {
4399
- throw new Error(`Unexpected non-class declaration ${ts19.SyntaxKind[meta.ref.node.kind]} for pipe ${meta.ref.debugName}`);
4359
+ if (!ts18.isClassDeclaration(meta.ref.node)) {
4360
+ throw new Error(`Unexpected non-class declaration ${ts18.SyntaxKind[meta.ref.node.kind]} for pipe ${meta.ref.debugName}`);
4400
4361
  }
4401
4362
  pipes.set(meta.name, meta);
4402
4363
  }
@@ -4433,32 +4394,39 @@ import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirect
4433
4394
 
4434
4395
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4435
4396
  import { createMayBeForwardRefExpression as createMayBeForwardRefExpression2, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4436
- import ts23 from "typescript";
4397
+ import ts22 from "typescript";
4398
+
4399
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.mjs
4400
+ function validateAccessOfInitializerApiMember({ api, call }, member) {
4401
+ if (!api.allowedAccessLevels.includes(member.accessLevel)) {
4402
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY, call, makeDiagnosticChain(`Cannot use "${api.functionName}" on a class member that is declared as ${classMemberAccessLevelToString(member.accessLevel)}.`, [makeDiagnosticChain(`Update the class field to be either: ` + api.allowedAccessLevels.map((l) => classMemberAccessLevelToString(l)).join(", "))]));
4403
+ }
4404
+ }
4437
4405
 
4438
4406
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
4439
- import ts20 from "typescript";
4440
- function tryParseInitializerApiMember(functions, member, reflector, importTracker) {
4441
- if (member.value === null || !ts20.isCallExpression(member.value)) {
4407
+ import ts19 from "typescript";
4408
+ function tryParseInitializerApi(functions, expression, reflector, importTracker) {
4409
+ if (!ts19.isCallExpression(expression)) {
4442
4410
  return null;
4443
4411
  }
4444
- const call = member.value;
4445
- const staticResult = parseTopLevelCall(call, functions, importTracker) || parseTopLevelRequiredCall(call, functions, importTracker) || parseTopLevelCallFromNamespace(call, functions, importTracker);
4412
+ const staticResult = parseTopLevelCall(expression, functions, importTracker) || parseTopLevelRequiredCall(expression, functions, importTracker) || parseTopLevelCallFromNamespace(expression, functions, importTracker);
4446
4413
  if (staticResult === null) {
4447
4414
  return null;
4448
4415
  }
4449
- const resolvedImport = reflector.getImportOfIdentifier(staticResult.apiReference);
4450
- if (resolvedImport === null || staticResult.api.functionName !== resolvedImport.name || staticResult.api.owningModule !== resolvedImport.from) {
4416
+ const { api, apiReference, isRequired } = staticResult;
4417
+ const resolvedImport = reflector.getImportOfIdentifier(apiReference);
4418
+ if (resolvedImport === null || api.functionName !== resolvedImport.name || api.owningModule !== resolvedImport.from) {
4451
4419
  return null;
4452
4420
  }
4453
4421
  return {
4454
- api: staticResult.api,
4455
- call,
4456
- isRequired: staticResult.isRequired
4422
+ api,
4423
+ call: expression,
4424
+ isRequired
4457
4425
  };
4458
4426
  }
4459
4427
  function parseTopLevelCall(call, functions, importTracker) {
4460
4428
  const node = call.expression;
4461
- if (!ts20.isIdentifier(node)) {
4429
+ if (!ts19.isIdentifier(node)) {
4462
4430
  return null;
4463
4431
  }
4464
4432
  const matchingApi = functions.find((fn) => importTracker.isPotentialReferenceToNamedImport(node, fn.functionName, fn.owningModule));
@@ -4469,7 +4437,7 @@ function parseTopLevelCall(call, functions, importTracker) {
4469
4437
  }
4470
4438
  function parseTopLevelRequiredCall(call, functions, importTracker) {
4471
4439
  const node = call.expression;
4472
- if (!ts20.isPropertyAccessExpression(node) || !ts20.isIdentifier(node.expression) || node.name.text !== "required") {
4440
+ if (!ts19.isPropertyAccessExpression(node) || !ts19.isIdentifier(node.expression) || node.name.text !== "required") {
4473
4441
  return null;
4474
4442
  }
4475
4443
  const expression = node.expression;
@@ -4481,17 +4449,17 @@ function parseTopLevelRequiredCall(call, functions, importTracker) {
4481
4449
  }
4482
4450
  function parseTopLevelCallFromNamespace(call, functions, importTracker) {
4483
4451
  const node = call.expression;
4484
- if (!ts20.isPropertyAccessExpression(node)) {
4452
+ if (!ts19.isPropertyAccessExpression(node)) {
4485
4453
  return null;
4486
4454
  }
4487
4455
  let apiReference = null;
4488
4456
  let matchingApi = void 0;
4489
4457
  let isRequired = false;
4490
- if (ts20.isIdentifier(node.expression) && ts20.isIdentifier(node.name)) {
4458
+ if (ts19.isIdentifier(node.expression) && ts19.isIdentifier(node.name)) {
4491
4459
  const namespaceRef = node.expression;
4492
4460
  apiReference = node.name;
4493
4461
  matchingApi = functions.find((fn) => node.name.text === fn.functionName && importTracker.isPotentialReferenceToNamespaceImport(namespaceRef, fn.owningModule));
4494
- } else if (ts20.isPropertyAccessExpression(node.expression) && ts20.isIdentifier(node.expression.expression) && ts20.isIdentifier(node.expression.name) && node.name.text === "required") {
4462
+ } else if (ts19.isPropertyAccessExpression(node.expression) && ts19.isIdentifier(node.expression.expression) && ts19.isIdentifier(node.expression.name) && node.name.text === "required") {
4495
4463
  const potentialName = node.expression.name.text;
4496
4464
  const namespaceRef = node.expression.expression;
4497
4465
  apiReference = node.expression.name;
@@ -4505,16 +4473,16 @@ function parseTopLevelCallFromNamespace(call, functions, importTracker) {
4505
4473
  }
4506
4474
 
4507
4475
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.mjs
4508
- import ts21 from "typescript";
4476
+ import ts20 from "typescript";
4509
4477
  function parseAndValidateInputAndOutputOptions(optionsNode) {
4510
- if (!ts21.isObjectLiteralExpression(optionsNode)) {
4478
+ if (!ts20.isObjectLiteralExpression(optionsNode)) {
4511
4479
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal that is statically analyzable.");
4512
4480
  }
4513
4481
  const options = reflectObjectLiteral(optionsNode);
4514
4482
  let alias = void 0;
4515
4483
  if (options.has("alias")) {
4516
4484
  const aliasExpr = options.get("alias");
4517
- if (!ts21.isStringLiteralLike(aliasExpr)) {
4485
+ if (!ts20.isStringLiteralLike(aliasExpr)) {
4518
4486
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, aliasExpr, "Alias needs to be a string that is statically analyzable.");
4519
4487
  }
4520
4488
  alias = aliasExpr.text;
@@ -4525,10 +4493,22 @@ function parseAndValidateInputAndOutputOptions(optionsNode) {
4525
4493
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4526
4494
  function tryParseSignalInputMapping(member, reflector, importTracker) {
4527
4495
  var _a;
4528
- const signalInput = tryParseInitializerApiMember([{ functionName: "input", owningModule: "@angular/core" }], member, reflector, importTracker);
4496
+ if (member.value === null) {
4497
+ return null;
4498
+ }
4499
+ const signalInput = tryParseInitializerApi([{
4500
+ functionName: "input",
4501
+ owningModule: "@angular/core",
4502
+ allowedAccessLevels: [
4503
+ ClassMemberAccessLevel.PublicWritable,
4504
+ ClassMemberAccessLevel.PublicReadonly,
4505
+ ClassMemberAccessLevel.Protected
4506
+ ]
4507
+ }], member.value, reflector, importTracker);
4529
4508
  if (signalInput === null) {
4530
4509
  return null;
4531
4510
  }
4511
+ validateAccessOfInitializerApiMember(signalInput, member);
4532
4512
  const optionsNode = signalInput.isRequired ? signalInput.call.arguments[0] : signalInput.call.arguments[1];
4533
4513
  const options = optionsNode !== void 0 ? parseAndValidateInputAndOutputOptions(optionsNode) : null;
4534
4514
  const classPropertyName = member.name;
@@ -4544,10 +4524,22 @@ function tryParseSignalInputMapping(member, reflector, importTracker) {
4544
4524
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.mjs
4545
4525
  function tryParseSignalModelMapping(member, reflector, importTracker) {
4546
4526
  var _a;
4547
- const model = tryParseInitializerApiMember([{ functionName: "model", owningModule: "@angular/core" }], member, reflector, importTracker);
4527
+ if (member.value === null) {
4528
+ return null;
4529
+ }
4530
+ const model = tryParseInitializerApi([{
4531
+ functionName: "model",
4532
+ owningModule: "@angular/core",
4533
+ allowedAccessLevels: [
4534
+ ClassMemberAccessLevel.PublicWritable,
4535
+ ClassMemberAccessLevel.PublicReadonly,
4536
+ ClassMemberAccessLevel.Protected
4537
+ ]
4538
+ }], member.value, reflector, importTracker);
4548
4539
  if (model === null) {
4549
4540
  return null;
4550
4541
  }
4542
+ validateAccessOfInitializerApiMember(model, member);
4551
4543
  const optionsNode = model.isRequired ? model.call.arguments[0] : model.call.arguments[1];
4552
4544
  const options = optionsNode !== void 0 ? parseAndValidateInputAndOutputOptions(optionsNode) : null;
4553
4545
  const classPropertyName = member.name;
@@ -4570,18 +4562,35 @@ function tryParseSignalModelMapping(member, reflector, importTracker) {
4570
4562
  }
4571
4563
 
4572
4564
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.mjs
4565
+ var allowedAccessLevels = [
4566
+ ClassMemberAccessLevel.PublicWritable,
4567
+ ClassMemberAccessLevel.PublicReadonly,
4568
+ ClassMemberAccessLevel.Protected
4569
+ ];
4573
4570
  function tryParseInitializerBasedOutput(member, reflector, importTracker) {
4574
4571
  var _a;
4575
- const output = tryParseInitializerApiMember([
4576
- { functionName: "output", owningModule: "@angular/core" },
4577
- { functionName: "outputFromObservable", owningModule: "@angular/core/rxjs-interop" }
4578
- ], member, reflector, importTracker);
4572
+ if (member.value === null) {
4573
+ return null;
4574
+ }
4575
+ const output = tryParseInitializerApi([
4576
+ {
4577
+ functionName: "output",
4578
+ owningModule: "@angular/core",
4579
+ allowedAccessLevels
4580
+ },
4581
+ {
4582
+ functionName: "outputFromObservable",
4583
+ owningModule: "@angular/core/rxjs-interop",
4584
+ allowedAccessLevels
4585
+ }
4586
+ ], member.value, reflector, importTracker);
4579
4587
  if (output === null) {
4580
4588
  return null;
4581
4589
  }
4582
4590
  if (output.isRequired) {
4583
4591
  throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_NO_REQUIRED_FUNCTION, output.call, `Output does not support ".required()".`);
4584
4592
  }
4593
+ validateAccessOfInitializerApiMember(output, member);
4585
4594
  const optionsNode = output.api.functionName === "output" ? output.call.arguments[0] : output.call.arguments[1];
4586
4595
  const options = optionsNode !== void 0 ? parseAndValidateInputAndOutputOptions(optionsNode) : null;
4587
4596
  const classPropertyName = member.name;
@@ -4597,15 +4606,28 @@ function tryParseInitializerBasedOutput(member, reflector, importTracker) {
4597
4606
 
4598
4607
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
4599
4608
  import { createMayBeForwardRefExpression, outputAst as o } from "@angular/compiler";
4600
- import ts22 from "typescript";
4609
+ import ts21 from "typescript";
4601
4610
  var queryFunctionNames = ["viewChild", "viewChildren", "contentChild", "contentChildren"];
4611
+ var initializerFns = queryFunctionNames.map((fnName) => ({
4612
+ functionName: fnName,
4613
+ owningModule: "@angular/core",
4614
+ allowedAccessLevels: [
4615
+ ClassMemberAccessLevel.PublicWritable,
4616
+ ClassMemberAccessLevel.PublicReadonly,
4617
+ ClassMemberAccessLevel.Protected,
4618
+ ClassMemberAccessLevel.Private
4619
+ ]
4620
+ }));
4602
4621
  var defaultDescendantsValue = (type) => type !== "contentChildren";
4603
4622
  function tryParseSignalQueryFromInitializer(member, reflector, importTracker) {
4604
- const initializerFns = queryFunctionNames.map((fnName) => ({ functionName: fnName, owningModule: "@angular/core" }));
4605
- const query = tryParseInitializerApiMember(initializerFns, member, reflector, importTracker);
4623
+ if (member.value === null) {
4624
+ return null;
4625
+ }
4626
+ const query = tryParseInitializerApi(initializerFns, member.value, reflector, importTracker);
4606
4627
  if (query === null) {
4607
4628
  return null;
4608
4629
  }
4630
+ validateAccessOfInitializerApiMember(query, member);
4609
4631
  const { functionName } = query.api;
4610
4632
  const isSingleQuery = functionName === "viewChild" || functionName === "contentChild";
4611
4633
  const predicateNode = query.call.arguments[0];
@@ -4613,7 +4635,7 @@ function tryParseSignalQueryFromInitializer(member, reflector, importTracker) {
4613
4635
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, query.call, "No locator specified.");
4614
4636
  }
4615
4637
  const optionsNode = query.call.arguments[1];
4616
- if (optionsNode !== void 0 && !ts22.isObjectLiteralExpression(optionsNode)) {
4638
+ if (optionsNode !== void 0 && !ts21.isObjectLiteralExpression(optionsNode)) {
4617
4639
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal.");
4618
4640
  }
4619
4641
  const options = optionsNode && reflectObjectLiteral(optionsNode);
@@ -4639,24 +4661,24 @@ function parseLocator(expression, reflector) {
4639
4661
  if (unwrappedExpression !== null) {
4640
4662
  expression = unwrappedExpression;
4641
4663
  }
4642
- if (ts22.isStringLiteralLike(expression)) {
4664
+ if (ts21.isStringLiteralLike(expression)) {
4643
4665
  return [expression.text];
4644
4666
  }
4645
4667
  return createMayBeForwardRefExpression(new o.WrappedNodeExpr(expression), unwrappedExpression !== null ? 2 : 0);
4646
4668
  }
4647
4669
  function parseReadOption(value) {
4648
- if (ts22.isExpressionWithTypeArguments(value) || ts22.isParenthesizedExpression(value) || ts22.isAsExpression(value)) {
4670
+ if (ts21.isExpressionWithTypeArguments(value) || ts21.isParenthesizedExpression(value) || ts21.isAsExpression(value)) {
4649
4671
  return parseReadOption(value.expression);
4650
4672
  }
4651
- if (ts22.isPropertyAccessExpression(value) && ts22.isIdentifier(value.expression) || ts22.isIdentifier(value)) {
4673
+ if (ts21.isPropertyAccessExpression(value) && ts21.isIdentifier(value.expression) || ts21.isIdentifier(value)) {
4652
4674
  return new o.WrappedNodeExpr(value);
4653
4675
  }
4654
4676
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, value, `Query "read" option expected a literal class reference.`);
4655
4677
  }
4656
4678
  function parseDescendantsOption(value) {
4657
- if (value.kind === ts22.SyntaxKind.TrueKeyword) {
4679
+ if (value.kind === ts21.SyntaxKind.TrueKeyword) {
4658
4680
  return true;
4659
- } else if (value.kind === ts22.SyntaxKind.FalseKeyword) {
4681
+ } else if (value.kind === ts21.SyntaxKind.FalseKeyword) {
4660
4682
  return false;
4661
4683
  }
4662
4684
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
@@ -4674,7 +4696,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
4674
4696
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @${decorator.name} decorator`);
4675
4697
  } else {
4676
4698
  const meta = unwrapExpression(decorator.args[0]);
4677
- if (!ts23.isObjectLiteralExpression(meta)) {
4699
+ if (!ts22.isObjectLiteralExpression(meta)) {
4678
4700
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `@${decorator.name} argument must be an object literal`);
4679
4701
  }
4680
4702
  directive = reflectObjectLiteral(meta);
@@ -4824,7 +4846,7 @@ function extractDecoratorQueryMetadata(exprNode, name, args, propertyName, refle
4824
4846
  let emitDistinctChangesOnly = emitDistinctChangesOnlyDefaultValue;
4825
4847
  if (args.length === 2) {
4826
4848
  const optionsExpr = unwrapExpression(args[1]);
4827
- if (!ts23.isObjectLiteralExpression(optionsExpr)) {
4849
+ if (!ts22.isObjectLiteralExpression(optionsExpr)) {
4828
4850
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, optionsExpr, `@${name} options must be an object literal`);
4829
4851
  }
4830
4852
  const options = reflectObjectLiteral(optionsExpr);
@@ -4923,16 +4945,16 @@ function extractHostBindings(members, evaluator, coreModule, compilationMode, me
4923
4945
  function extractQueriesFromDecorator(queryData, reflector, evaluator, isCore) {
4924
4946
  const content = [];
4925
4947
  const view = [];
4926
- if (!ts23.isObjectLiteralExpression(queryData)) {
4948
+ if (!ts22.isObjectLiteralExpression(queryData)) {
4927
4949
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator queries metadata must be an object literal");
4928
4950
  }
4929
4951
  reflectObjectLiteral(queryData).forEach((queryExpr, propertyName) => {
4930
4952
  queryExpr = unwrapExpression(queryExpr);
4931
- if (!ts23.isNewExpression(queryExpr)) {
4953
+ if (!ts22.isNewExpression(queryExpr)) {
4932
4954
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4933
4955
  }
4934
- const queryType = ts23.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4935
- if (!ts23.isIdentifier(queryType)) {
4956
+ const queryType = ts22.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4957
+ if (!ts22.isIdentifier(queryType)) {
4936
4958
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4937
4959
  }
4938
4960
  const type = reflector.getImportOfIdentifier(queryType);
@@ -5180,7 +5202,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
5180
5202
  }
5181
5203
  return {
5182
5204
  node: node2,
5183
- type: new Reference(ts23.factory.createKeywordTypeNode(ts23.SyntaxKind.UnknownKeyword))
5205
+ type: new Reference(ts22.factory.createKeywordTypeNode(ts22.SyntaxKind.UnknownKeyword))
5184
5206
  };
5185
5207
  }
5186
5208
  const definition = reflector.getDefinitionOfFunction(value.node);
@@ -5208,7 +5230,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
5208
5230
  if (!firstParam) {
5209
5231
  return {
5210
5232
  node,
5211
- type: new Reference(ts23.factory.createKeywordTypeNode(ts23.SyntaxKind.UnknownKeyword))
5233
+ type: new Reference(ts22.factory.createKeywordTypeNode(ts22.SyntaxKind.UnknownKeyword))
5212
5234
  };
5213
5235
  }
5214
5236
  if (!firstParam.type) {
@@ -5223,7 +5245,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
5223
5245
  }
5224
5246
  function assertEmittableInputType(type, contextFile, reflector, refEmitter) {
5225
5247
  (function walk(node) {
5226
- if (ts23.isTypeReferenceNode(node) && ts23.isIdentifier(node.typeName)) {
5248
+ if (ts22.isTypeReferenceNode(node) && ts22.isIdentifier(node.typeName)) {
5227
5249
  const declaration = reflector.getDeclarationOfIdentifier(node.typeName);
5228
5250
  if (declaration !== null) {
5229
5251
  if (declaration.node.getSourceFile() !== contextFile) {
@@ -5403,7 +5425,7 @@ function extractHostDirectives(rawHostDirectives, evaluator, compilationMode) {
5403
5425
  let directive;
5404
5426
  let nameForErrors = (fieldName) => "@Directive.hostDirectives";
5405
5427
  if (compilationMode === CompilationMode.LOCAL && hostReference instanceof DynamicValue) {
5406
- if (!ts23.isIdentifier(hostReference.node) && !ts23.isPropertyAccessExpression(hostReference.node)) {
5428
+ if (!ts22.isIdentifier(hostReference.node) && !ts22.isPropertyAccessExpression(hostReference.node)) {
5407
5429
  throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION, hostReference.node, `In local compilation mode, host directive cannot be an expression. Use an identifier instead`);
5408
5430
  }
5409
5431
  directive = new WrappedNodeExpr5(hostReference.node);
@@ -5735,16 +5757,16 @@ var DirectiveDecoratorHandler = class {
5735
5757
 
5736
5758
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5737
5759
  import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
5738
- import ts25 from "typescript";
5760
+ import ts24 from "typescript";
5739
5761
 
5740
5762
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5741
- import ts24 from "typescript";
5763
+ import ts23 from "typescript";
5742
5764
  function createModuleWithProvidersResolver(reflector, isCore) {
5743
5765
  function _reflectModuleFromTypeParam(type, node) {
5744
- if (!ts24.isTypeReferenceNode(type)) {
5766
+ if (!ts23.isTypeReferenceNode(type)) {
5745
5767
  return null;
5746
5768
  }
5747
- const typeName = type && (ts24.isIdentifier(type.typeName) && type.typeName || ts24.isQualifiedName(type.typeName) && type.typeName.right) || null;
5769
+ const typeName = type && (ts23.isIdentifier(type.typeName) && type.typeName || ts23.isQualifiedName(type.typeName) && type.typeName.right) || null;
5748
5770
  if (typeName === null) {
5749
5771
  return null;
5750
5772
  }
@@ -5756,7 +5778,7 @@ function createModuleWithProvidersResolver(reflector, isCore) {
5756
5778
  return null;
5757
5779
  }
5758
5780
  if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
5759
- const parent = ts24.isMethodDeclaration(node) && ts24.isClassDeclaration(node.parent) ? node.parent : null;
5781
+ const parent = ts23.isMethodDeclaration(node) && ts23.isClassDeclaration(node.parent) ? node.parent : null;
5760
5782
  const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
5761
5783
  throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
5762
5784
  }
@@ -5764,15 +5786,15 @@ function createModuleWithProvidersResolver(reflector, isCore) {
5764
5786
  return typeNodeToValueExpr(arg);
5765
5787
  }
5766
5788
  function _reflectModuleFromLiteralType(type) {
5767
- if (!ts24.isIntersectionTypeNode(type)) {
5789
+ if (!ts23.isIntersectionTypeNode(type)) {
5768
5790
  return null;
5769
5791
  }
5770
5792
  for (const t of type.types) {
5771
- if (ts24.isTypeLiteralNode(t)) {
5793
+ if (ts23.isTypeLiteralNode(t)) {
5772
5794
  for (const m of t.members) {
5773
- const ngModuleType = ts24.isPropertySignature(m) && ts24.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
5795
+ const ngModuleType = ts23.isPropertySignature(m) && ts23.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
5774
5796
  let ngModuleExpression = null;
5775
- if (ngModuleType !== null && ts24.isTypeQueryNode(ngModuleType)) {
5797
+ if (ngModuleType !== null && ts23.isTypeQueryNode(ngModuleType)) {
5776
5798
  ngModuleExpression = entityNameToValue(ngModuleType.exprName);
5777
5799
  } else if (ngModuleType !== null) {
5778
5800
  ngModuleExpression = typeNodeToValueExpr(ngModuleType);
@@ -5920,8 +5942,8 @@ var NgModuleDecoratorHandler = class {
5920
5942
  if (decorator.args === null || decorator.args.length > 1) {
5921
5943
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @NgModule decorator`);
5922
5944
  }
5923
- const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts25.factory.createObjectLiteralExpression([]);
5924
- if (!ts25.isObjectLiteralExpression(meta)) {
5945
+ const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts24.factory.createObjectLiteralExpression([]);
5946
+ if (!ts24.isObjectLiteralExpression(meta)) {
5925
5947
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
5926
5948
  }
5927
5949
  const ngModule = reflectObjectLiteral(meta);
@@ -5994,7 +6016,7 @@ var NgModuleDecoratorHandler = class {
5994
6016
  id = new WrappedNodeExpr7(idExpr);
5995
6017
  } else {
5996
6018
  const diag = makeDiagnostic(ErrorCode.WARN_NGMODULE_ID_UNNECESSARY, idExpr, `Using 'module.id' for NgModule.id is a common anti-pattern that is ignored by the Angular compiler.`);
5997
- diag.category = ts25.DiagnosticCategory.Warning;
6019
+ diag.category = ts24.DiagnosticCategory.Warning;
5998
6020
  diagnostics.push(diag);
5999
6021
  }
6000
6022
  }
@@ -6046,16 +6068,16 @@ var NgModuleDecoratorHandler = class {
6046
6068
  }
6047
6069
  const rawProviders = ngModule.has("providers") ? ngModule.get("providers") : null;
6048
6070
  let wrappedProviders = null;
6049
- if (rawProviders !== null && (!ts25.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
6071
+ if (rawProviders !== null && (!ts24.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
6050
6072
  wrappedProviders = new WrappedNodeExpr7(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(rawProviders) : rawProviders);
6051
6073
  }
6052
6074
  const topLevelImports = [];
6053
6075
  if (this.compilationMode !== CompilationMode.LOCAL && ngModule.has("imports")) {
6054
6076
  const rawImports2 = unwrapExpression(ngModule.get("imports"));
6055
6077
  let topLevelExpressions = [];
6056
- if (ts25.isArrayLiteralExpression(rawImports2)) {
6078
+ if (ts24.isArrayLiteralExpression(rawImports2)) {
6057
6079
  for (const element of rawImports2.elements) {
6058
- if (ts25.isSpreadElement(element)) {
6080
+ if (ts24.isSpreadElement(element)) {
6059
6081
  topLevelExpressions.push(element.expression);
6060
6082
  continue;
6061
6083
  }
@@ -6094,7 +6116,7 @@ var NgModuleDecoratorHandler = class {
6094
6116
  if (exp === null) {
6095
6117
  continue;
6096
6118
  }
6097
- if (ts25.isArrayLiteralExpression(exp)) {
6119
+ if (ts24.isArrayLiteralExpression(exp)) {
6098
6120
  if (exp.elements) {
6099
6121
  injectorMetadata.imports.push(...exp.elements.map((n) => new WrappedNodeExpr7(n)));
6100
6122
  }
@@ -6408,7 +6430,7 @@ function isNgModule(node, compilation) {
6408
6430
  return !compilation.dependencies.some((dep) => dep.ref.node === node);
6409
6431
  }
6410
6432
  function isModuleIdExpression(expr) {
6411
- return ts25.isPropertyAccessExpression(expr) && ts25.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
6433
+ return ts24.isPropertyAccessExpression(expr) && ts24.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
6412
6434
  }
6413
6435
  function makeStandaloneBootstrapDiagnostic(ngModuleClass, bootstrappedClassRef, rawBootstrapExpr) {
6414
6436
  const componentClassName = bootstrappedClassRef.node.name.text;
@@ -6445,7 +6467,7 @@ function checkCustomElementSelectorForErrors(selector) {
6445
6467
 
6446
6468
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
6447
6469
  import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
6448
- import ts26 from "typescript";
6470
+ import ts25 from "typescript";
6449
6471
  function getTemplateDeclarationNodeForError(declaration) {
6450
6472
  return declaration.isInline ? declaration.expression : declaration.templateUrlExpression;
6451
6473
  }
@@ -6457,7 +6479,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
6457
6479
  let sourceMapping;
6458
6480
  let escapedString = false;
6459
6481
  let sourceMapUrl;
6460
- if (ts26.isStringLiteral(template.expression) || ts26.isNoSubstitutionTemplateLiteral(template.expression)) {
6482
+ if (ts25.isStringLiteral(template.expression) || ts25.isNoSubstitutionTemplateLiteral(template.expression)) {
6461
6483
  sourceParseRange = getTemplateRange(template.expression);
6462
6484
  sourceStr = template.expression.getSourceFile().text;
6463
6485
  templateContent = template.expression.text;
@@ -6634,7 +6656,7 @@ function preloadAndParseTemplate(evaluator, resourceLoader, depTracker, preanaly
6634
6656
  }
6635
6657
  function getTemplateRange(templateExpr) {
6636
6658
  const startPos = templateExpr.getStart() + 1;
6637
- const { line, character } = ts26.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
6659
+ const { line, character } = ts25.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
6638
6660
  return {
6639
6661
  startPos,
6640
6662
  startLine: line,
@@ -6667,7 +6689,7 @@ function transformDecoratorResources(dec, component, styles, template) {
6667
6689
  const metadata = new Map(component);
6668
6690
  if (metadata.has("templateUrl")) {
6669
6691
  metadata.delete("templateUrl");
6670
- metadata.set("template", ts26.factory.createStringLiteral(template.content));
6692
+ metadata.set("template", ts25.factory.createStringLiteral(template.content));
6671
6693
  }
6672
6694
  if (metadata.has("styleUrls") || metadata.has("styleUrl") || metadata.has("styles")) {
6673
6695
  metadata.delete("styles");
@@ -6676,20 +6698,20 @@ function transformDecoratorResources(dec, component, styles, template) {
6676
6698
  if (styles.length > 0) {
6677
6699
  const styleNodes = styles.reduce((result, style) => {
6678
6700
  if (style.trim().length > 0) {
6679
- result.push(ts26.factory.createStringLiteral(style));
6701
+ result.push(ts25.factory.createStringLiteral(style));
6680
6702
  }
6681
6703
  return result;
6682
6704
  }, []);
6683
6705
  if (styleNodes.length > 0) {
6684
- metadata.set("styles", ts26.factory.createArrayLiteralExpression(styleNodes));
6706
+ metadata.set("styles", ts25.factory.createArrayLiteralExpression(styleNodes));
6685
6707
  }
6686
6708
  }
6687
6709
  }
6688
6710
  const newMetadataFields = [];
6689
6711
  for (const [name, value] of metadata.entries()) {
6690
- newMetadataFields.push(ts26.factory.createPropertyAssignment(name, value));
6712
+ newMetadataFields.push(ts25.factory.createPropertyAssignment(name, value));
6691
6713
  }
6692
- return { ...dec, args: [ts26.factory.createObjectLiteralExpression(newMetadataFields)] };
6714
+ return { ...dec, args: [ts25.factory.createObjectLiteralExpression(newMetadataFields)] };
6693
6715
  }
6694
6716
  function extractComponentStyleUrls(evaluator, component) {
6695
6717
  const styleUrlsExpr = component.get("styleUrls");
@@ -6715,9 +6737,9 @@ function extractComponentStyleUrls(evaluator, component) {
6715
6737
  }
6716
6738
  function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6717
6739
  const styleUrls = [];
6718
- if (ts26.isArrayLiteralExpression(styleUrlsExpr)) {
6740
+ if (ts25.isArrayLiteralExpression(styleUrlsExpr)) {
6719
6741
  for (const styleUrlExpr of styleUrlsExpr.elements) {
6720
- if (ts26.isSpreadElement(styleUrlExpr)) {
6742
+ if (ts25.isSpreadElement(styleUrlExpr)) {
6721
6743
  styleUrls.push(...extractStyleUrlsFromExpression(evaluator, styleUrlExpr.expression));
6722
6744
  } else {
6723
6745
  const styleUrl = evaluator.evaluate(styleUrlExpr);
@@ -6749,18 +6771,18 @@ function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6749
6771
  function extractStyleResources(resourceLoader, component, containingFile) {
6750
6772
  const styles = /* @__PURE__ */ new Set();
6751
6773
  function stringLiteralElements(array) {
6752
- return array.elements.filter((e) => ts26.isStringLiteralLike(e));
6774
+ return array.elements.filter((e) => ts25.isStringLiteralLike(e));
6753
6775
  }
6754
6776
  const styleUrlExpr = component.get("styleUrl");
6755
6777
  const styleUrlsExpr = component.get("styleUrls");
6756
- if (styleUrlsExpr !== void 0 && ts26.isArrayLiteralExpression(styleUrlsExpr)) {
6778
+ if (styleUrlsExpr !== void 0 && ts25.isArrayLiteralExpression(styleUrlsExpr)) {
6757
6779
  for (const expression of stringLiteralElements(styleUrlsExpr)) {
6758
6780
  const resource = stringLiteralUrlToResource(resourceLoader, expression, containingFile);
6759
6781
  if (resource !== null) {
6760
6782
  styles.add(resource);
6761
6783
  }
6762
6784
  }
6763
- } else if (styleUrlExpr !== void 0 && ts26.isStringLiteralLike(styleUrlExpr)) {
6785
+ } else if (styleUrlExpr !== void 0 && ts25.isStringLiteralLike(styleUrlExpr)) {
6764
6786
  const resource = stringLiteralUrlToResource(resourceLoader, styleUrlExpr, containingFile);
6765
6787
  if (resource !== null) {
6766
6788
  styles.add(resource);
@@ -6768,11 +6790,11 @@ function extractStyleResources(resourceLoader, component, containingFile) {
6768
6790
  }
6769
6791
  const stylesExpr = component.get("styles");
6770
6792
  if (stylesExpr !== void 0) {
6771
- if (ts26.isArrayLiteralExpression(stylesExpr)) {
6793
+ if (ts25.isArrayLiteralExpression(stylesExpr)) {
6772
6794
  for (const expression of stringLiteralElements(stylesExpr)) {
6773
6795
  styles.add({ path: null, expression });
6774
6796
  }
6775
- } else if (ts26.isStringLiteralLike(stylesExpr)) {
6797
+ } else if (ts25.isStringLiteralLike(stylesExpr)) {
6776
6798
  styles.add({ path: null, expression: stylesExpr });
6777
6799
  }
6778
6800
  }
@@ -7328,7 +7350,7 @@ var ComponentDecoratorHandler = class {
7328
7350
  }
7329
7351
  typeCheck(ctx, node, meta) {
7330
7352
  var _a;
7331
- if (this.typeCheckScopeRegistry === null || !ts27.isClassDeclaration(node)) {
7353
+ if (this.typeCheckScopeRegistry === null || !ts26.isClassDeclaration(node)) {
7332
7354
  return;
7333
7355
  }
7334
7356
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -7716,12 +7738,12 @@ var ComponentDecoratorHandler = class {
7716
7738
  }
7717
7739
  collectExplicitlyDeferredSymbols(rawDeferredImports) {
7718
7740
  const deferredTypes = /* @__PURE__ */ new Map();
7719
- if (!ts27.isArrayLiteralExpression(rawDeferredImports)) {
7741
+ if (!ts26.isArrayLiteralExpression(rawDeferredImports)) {
7720
7742
  return deferredTypes;
7721
7743
  }
7722
7744
  for (const element of rawDeferredImports.elements) {
7723
7745
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
7724
- if (!ts27.isIdentifier(node)) {
7746
+ if (!ts26.isIdentifier(node)) {
7725
7747
  continue;
7726
7748
  }
7727
7749
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -7786,12 +7808,12 @@ var ComponentDecoratorHandler = class {
7786
7808
  }
7787
7809
  }
7788
7810
  registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
7789
- if (!ts27.isArrayLiteralExpression(importsExpr)) {
7811
+ if (!ts26.isArrayLiteralExpression(importsExpr)) {
7790
7812
  return;
7791
7813
  }
7792
7814
  for (const element of importsExpr.elements) {
7793
7815
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
7794
- if (!ts27.isIdentifier(node)) {
7816
+ if (!ts26.isIdentifier(node)) {
7795
7817
  continue;
7796
7818
  }
7797
7819
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -7908,7 +7930,7 @@ function isDefaultImport(node) {
7908
7930
 
7909
7931
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
7910
7932
  import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
7911
- import ts28 from "typescript";
7933
+ import ts27 from "typescript";
7912
7934
  var InjectableDecoratorHandler = class {
7913
7935
  constructor(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, perf, includeClassMetadata, compilationMode, errorOnDuplicateProv = true) {
7914
7936
  this.reflector = reflector;
@@ -8028,7 +8050,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
8028
8050
  };
8029
8051
  } else if (decorator.args.length === 1) {
8030
8052
  const metaNode = decorator.args[0];
8031
- if (!ts28.isObjectLiteralExpression(metaNode)) {
8053
+ if (!ts27.isObjectLiteralExpression(metaNode)) {
8032
8054
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
8033
8055
  }
8034
8056
  const meta = reflectObjectLiteral(metaNode);
@@ -8036,7 +8058,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
8036
8058
  let deps = void 0;
8037
8059
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
8038
8060
  const depsExpr = meta.get("deps");
8039
- if (!ts28.isArrayLiteralExpression(depsExpr)) {
8061
+ if (!ts27.isArrayLiteralExpression(depsExpr)) {
8040
8062
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
8041
8063
  }
8042
8064
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -8121,12 +8143,12 @@ function getDep(dep, reflector) {
8121
8143
  }
8122
8144
  return true;
8123
8145
  }
8124
- if (ts28.isArrayLiteralExpression(dep)) {
8146
+ if (ts27.isArrayLiteralExpression(dep)) {
8125
8147
  dep.elements.forEach((el) => {
8126
8148
  let isDecorator = false;
8127
- if (ts28.isIdentifier(el)) {
8149
+ if (ts27.isIdentifier(el)) {
8128
8150
  isDecorator = maybeUpdateDecorator(el, reflector);
8129
- } else if (ts28.isNewExpression(el) && ts28.isIdentifier(el.expression)) {
8151
+ } else if (ts27.isNewExpression(el) && ts27.isIdentifier(el.expression)) {
8130
8152
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
8131
8153
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
8132
8154
  }
@@ -8140,7 +8162,7 @@ function getDep(dep, reflector) {
8140
8162
 
8141
8163
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
8142
8164
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
8143
- import ts29 from "typescript";
8165
+ import ts28 from "typescript";
8144
8166
  var PipeSymbol = class extends SemanticSymbol {
8145
8167
  constructor(decl, name) {
8146
8168
  super(decl);
@@ -8198,7 +8220,7 @@ var PipeDecoratorHandler = class {
8198
8220
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
8199
8221
  }
8200
8222
  const meta = unwrapExpression(decorator.args[0]);
8201
- if (!ts29.isObjectLiteralExpression(meta)) {
8223
+ if (!ts28.isObjectLiteralExpression(meta)) {
8202
8224
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
8203
8225
  }
8204
8226
  const pipe = reflectObjectLiteral(meta);
@@ -8314,7 +8336,6 @@ export {
8314
8336
  CompilationMode,
8315
8337
  aliasTransformFactory,
8316
8338
  TraitCompiler,
8317
- addImports,
8318
8339
  DtsTransformRegistry,
8319
8340
  declarationTransformFactory,
8320
8341
  ivyTransformFactory,
@@ -8351,4 +8372,4 @@ export {
8351
8372
  * Use of this source code is governed by an MIT-style license that can be
8352
8373
  * found in the LICENSE file at https://angular.io/license
8353
8374
  */
8354
- //# sourceMappingURL=chunk-3ESFLGKJ.js.map
8375
+ //# sourceMappingURL=chunk-7OQMTKOE.js.map