@angular/compiler-cli 17.0.0-next.3 → 17.0.0-next.5

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 (55) hide show
  1. package/bundles/{chunk-QYCH2357.js → chunk-7QICZXP3.js} +8 -8
  2. package/bundles/{chunk-BK7TBDB4.js → chunk-7QTF7U4J.js} +4 -4
  3. package/bundles/{chunk-PCMLSPQF.js → chunk-CSOLWS7O.js} +7 -7
  4. package/bundles/{chunk-EKTJ7622.js → chunk-GYHDNUIK.js} +7 -7
  5. package/bundles/{chunk-7PCPPTTO.js → chunk-HJOPJLIM.js} +5 -5
  6. package/bundles/{chunk-42ADUVYG.js → chunk-KV7WQARZ.js} +31 -31
  7. package/bundles/{chunk-JXVNXZIV.js → chunk-OADA63HC.js} +5 -5
  8. package/bundles/{chunk-I7GHEGCH.js → chunk-RVITQ7TS.js} +1033 -498
  9. package/bundles/chunk-RVITQ7TS.js.map +6 -0
  10. package/bundles/{chunk-LYJKWJUC.js → chunk-SBDNBITT.js} +3 -3
  11. package/bundles/{chunk-I2HNYMSV.js → chunk-TX6LIB73.js} +29 -27
  12. package/bundles/{chunk-I2HNYMSV.js.map → chunk-TX6LIB73.js.map} +1 -1
  13. package/bundles/{chunk-JZC4T2RR.js → chunk-UHYH6BYB.js} +1 -1
  14. package/bundles/{chunk-Y4VU3VP2.js → chunk-YWV5CDS7.js} +142 -101
  15. package/bundles/chunk-YWV5CDS7.js.map +6 -0
  16. package/bundles/index.js +19 -13
  17. package/bundles/index.js.map +1 -1
  18. package/bundles/linker/babel/index.js +13 -13
  19. package/bundles/linker/index.js +5 -5
  20. package/bundles/ngcc/index.js +1 -1
  21. package/bundles/private/bazel.js +1 -1
  22. package/bundles/private/localize.js +3 -3
  23. package/bundles/private/migrations.js +6 -6
  24. package/bundles/private/tooling.js +4 -4
  25. package/bundles/src/bin/ng_xi18n.js +11 -11
  26. package/bundles/src/bin/ngc.js +9 -9
  27. package/bundles_metadata.json +1 -1
  28. package/index.d.ts +1 -0
  29. package/package.json +5 -5
  30. package/src/ngtsc/annotations/component/src/handler.d.ts +1 -1
  31. package/src/ngtsc/core/src/compiler.d.ts +10 -0
  32. package/src/ngtsc/diagnostics/src/error_code.d.ts +13 -0
  33. package/src/ngtsc/docs/index.d.ts +9 -0
  34. package/src/ngtsc/docs/src/class_extractor.d.ts +13 -0
  35. package/src/ngtsc/docs/src/constant_extractor.d.ts +13 -0
  36. package/src/ngtsc/docs/src/entities.d.ts +107 -0
  37. package/src/ngtsc/docs/src/enum_extractor.d.ts +11 -0
  38. package/src/ngtsc/docs/src/extractor.d.ts +26 -0
  39. package/src/ngtsc/docs/src/function_extractor.d.ts +16 -0
  40. package/src/ngtsc/docs/src/jsdoc_extractor.d.ts +21 -0
  41. package/src/ngtsc/docs/src/type_extractor.d.ts +10 -0
  42. package/src/ngtsc/program.d.ts +10 -0
  43. package/src/ngtsc/typecheck/src/oob.d.ts +6 -1
  44. package/src/ngtsc/typecheck/src/type_check_block.d.ts +5 -3
  45. package/bundles/chunk-I7GHEGCH.js.map +0 -6
  46. package/bundles/chunk-Y4VU3VP2.js.map +0 -6
  47. /package/bundles/{chunk-QYCH2357.js.map → chunk-7QICZXP3.js.map} +0 -0
  48. /package/bundles/{chunk-BK7TBDB4.js.map → chunk-7QTF7U4J.js.map} +0 -0
  49. /package/bundles/{chunk-PCMLSPQF.js.map → chunk-CSOLWS7O.js.map} +0 -0
  50. /package/bundles/{chunk-EKTJ7622.js.map → chunk-GYHDNUIK.js.map} +0 -0
  51. /package/bundles/{chunk-7PCPPTTO.js.map → chunk-HJOPJLIM.js.map} +0 -0
  52. /package/bundles/{chunk-42ADUVYG.js.map → chunk-KV7WQARZ.js.map} +0 -0
  53. /package/bundles/{chunk-JXVNXZIV.js.map → chunk-OADA63HC.js.map} +0 -0
  54. /package/bundles/{chunk-LYJKWJUC.js.map → chunk-SBDNBITT.js.map} +0 -0
  55. /package/bundles/{chunk-JZC4T2RR.js.map → chunk-UHYH6BYB.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  translateExpression,
8
8
  translateStatement,
9
9
  translateType
10
- } from "./chunk-QYCH2357.js";
10
+ } from "./chunk-7QICZXP3.js";
11
11
  import {
12
12
  ClassMemberKind,
13
13
  ErrorCode,
@@ -30,18 +30,18 @@ import {
30
30
  reflectObjectLiteral,
31
31
  reflectTypeEntityToDeclaration,
32
32
  typeNodeToValueExpr
33
- } from "./chunk-I2HNYMSV.js";
33
+ } from "./chunk-TX6LIB73.js";
34
34
  import {
35
35
  PerfEvent,
36
36
  PerfPhase
37
- } from "./chunk-7PCPPTTO.js";
37
+ } from "./chunk-HJOPJLIM.js";
38
38
  import {
39
39
  absoluteFrom,
40
40
  absoluteFromSourceFile,
41
41
  relative
42
- } from "./chunk-PCMLSPQF.js";
42
+ } from "./chunk-CSOLWS7O.js";
43
43
 
44
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
44
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
45
45
  import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
46
46
  import ts from "typescript";
47
47
  function valueReferenceToExpression(valueRef) {
@@ -283,7 +283,7 @@ function isAbstractClassDeclaration(clazz) {
283
283
  return ts.canHaveModifiers(clazz) && clazz.modifiers !== void 0 ? clazz.modifiers.some((mod) => mod.kind === ts.SyntaxKind.AbstractKeyword) : false;
284
284
  }
285
285
 
286
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
286
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
287
287
  var DynamicValue = class {
288
288
  constructor(node, reason, code) {
289
289
  this.node = node;
@@ -373,10 +373,10 @@ var DynamicValue = class {
373
373
  }
374
374
  };
375
375
 
376
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
376
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
377
377
  import ts2 from "typescript";
378
378
 
379
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
379
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
380
380
  var ResolvedModule = class {
381
381
  constructor(exports, evaluate) {
382
382
  this.exports = exports;
@@ -406,7 +406,7 @@ var EnumValue = class {
406
406
  var KnownFn = class {
407
407
  };
408
408
 
409
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
409
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
410
410
  var ArraySliceBuiltinFn = class extends KnownFn {
411
411
  constructor(lhs) {
412
412
  super();
@@ -458,14 +458,14 @@ var StringConcatBuiltinFn = class extends KnownFn {
458
458
  }
459
459
  };
460
460
 
461
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
461
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
462
462
  var SyntheticValue = class {
463
463
  constructor(value) {
464
464
  this.value = value;
465
465
  }
466
466
  };
467
467
 
468
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
468
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
469
469
  function literalBinaryOp(op) {
470
470
  return { op, literal: true };
471
471
  }
@@ -1046,7 +1046,7 @@ function getOriginalKeywordKind(identifier) {
1046
1046
  return typeof ts2.identifierToKeywordKind === "function" ? ts2.identifierToKeywordKind(identifier) : identifier.originalKeywordKind;
1047
1047
  }
1048
1048
 
1049
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1049
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1050
1050
  var PartialEvaluator = class {
1051
1051
  constructor(host, checker, dependencyTracker) {
1052
1052
  this.host = host;
@@ -1066,7 +1066,7 @@ var PartialEvaluator = class {
1066
1066
  }
1067
1067
  };
1068
1068
 
1069
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1069
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1070
1070
  import ts3 from "typescript";
1071
1071
  function describeResolvedType(value, maxDepth = 1) {
1072
1072
  var _a, _b;
@@ -1196,11 +1196,11 @@ function getContainerNode(node) {
1196
1196
  return node.getSourceFile();
1197
1197
  }
1198
1198
 
1199
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1199
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1200
1200
  import { LiteralExpr, ReadPropExpr as ReadPropExpr2, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
1201
1201
  import ts10 from "typescript";
1202
1202
 
1203
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
1203
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
1204
1204
  var CompilationMode;
1205
1205
  (function(CompilationMode2) {
1206
1206
  CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
@@ -1214,7 +1214,7 @@ var HandlerPrecedence;
1214
1214
  HandlerPrecedence2[HandlerPrecedence2["WEAK"] = 2] = "WEAK";
1215
1215
  })(HandlerPrecedence || (HandlerPrecedence = {}));
1216
1216
 
1217
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
1217
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
1218
1218
  import ts4 from "typescript";
1219
1219
  function aliasTransformFactory(exportStatements) {
1220
1220
  return () => {
@@ -1237,10 +1237,10 @@ function aliasTransformFactory(exportStatements) {
1237
1237
  };
1238
1238
  }
1239
1239
 
1240
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
1240
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
1241
1241
  import ts5 from "typescript";
1242
1242
 
1243
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
1243
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
1244
1244
  var TraitState;
1245
1245
  (function(TraitState2) {
1246
1246
  TraitState2[TraitState2["Pending"] = 0] = "Pending";
@@ -1297,7 +1297,7 @@ var TraitImpl = class {
1297
1297
  }
1298
1298
  };
1299
1299
 
1300
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
1300
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
1301
1301
  var TraitCompiler = class {
1302
1302
  constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
1303
1303
  this.handlers = handlers;
@@ -1745,10 +1745,10 @@ function containsErrors(diagnostics) {
1745
1745
  return diagnostics !== null && diagnostics.some((diag) => diag.category === ts5.DiagnosticCategory.Error);
1746
1746
  }
1747
1747
 
1748
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
1748
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
1749
1749
  import ts7 from "typescript";
1750
1750
 
1751
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
1751
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
1752
1752
  import ts6 from "typescript";
1753
1753
  function addImports(importManager, sf, extraStatements = []) {
1754
1754
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
@@ -1784,7 +1784,7 @@ function isImportStatement(stmt) {
1784
1784
  return ts6.isImportDeclaration(stmt) || ts6.isImportEqualsDeclaration(stmt) || ts6.isNamespaceImport(stmt);
1785
1785
  }
1786
1786
 
1787
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
1787
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
1788
1788
  var DtsTransformRegistry = class {
1789
1789
  constructor() {
1790
1790
  this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
@@ -1931,11 +1931,11 @@ function markForEmitAsSingleLine(node) {
1931
1931
  ts7.forEachChild(node, markForEmitAsSingleLine);
1932
1932
  }
1933
1933
 
1934
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
1934
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
1935
1935
  import { ConstantPool } from "@angular/compiler";
1936
1936
  import ts9 from "typescript";
1937
1937
 
1938
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
1938
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
1939
1939
  import ts8 from "typescript";
1940
1940
  function visit(node, visitor, context) {
1941
1941
  return visitor._visit(node, context);
@@ -1996,7 +1996,7 @@ var Visitor = class {
1996
1996
  }
1997
1997
  };
1998
1998
 
1999
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
1999
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
2000
2000
  var NO_DECORATORS = /* @__PURE__ */ new Set();
2001
2001
  var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
2002
2002
  function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, perf, isCore, isClosureCompilerEnabled) {
@@ -2220,7 +2220,7 @@ function nodeArrayFromDecoratorsArray(decorators) {
2220
2220
  return array;
2221
2221
  }
2222
2222
 
2223
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
2223
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
2224
2224
  function getConstructorDependencies(clazz, reflector, isCore, compilationMode) {
2225
2225
  const deps = [];
2226
2226
  const errors = [];
@@ -2377,10 +2377,10 @@ function createUnsuitableInjectionTokenError(clazz, error) {
2377
2377
  return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
2378
2378
  }
2379
2379
 
2380
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
2380
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
2381
2381
  import ts13 from "typescript";
2382
2382
 
2383
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
2383
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
2384
2384
  var MetaKind;
2385
2385
  (function(MetaKind2) {
2386
2386
  MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
@@ -2393,10 +2393,10 @@ var MatchSource;
2393
2393
  MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
2394
2394
  })(MatchSource || (MatchSource = {}));
2395
2395
 
2396
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
2396
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
2397
2397
  import ts12 from "typescript";
2398
2398
 
2399
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
2399
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
2400
2400
  var ClassPropertyMapping = class {
2401
2401
  constructor(forwardMap) {
2402
2402
  this.forwardMap = forwardMap;
@@ -2474,7 +2474,7 @@ function reverseMapFromForwardMap(forwardMap) {
2474
2474
  return reverseMap;
2475
2475
  }
2476
2476
 
2477
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
2477
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
2478
2478
  import ts11 from "typescript";
2479
2479
  function extractReferencesFromType(checker, def, bestGuessOwningModule) {
2480
2480
  if (!ts11.isTupleTypeNode(def)) {
@@ -2527,10 +2527,9 @@ function readMapType(type, valueTransform) {
2527
2527
  return;
2528
2528
  }
2529
2529
  const value = valueTransform(member.type);
2530
- if (value === null) {
2531
- return null;
2530
+ if (value !== null) {
2531
+ obj[member.name.text] = value;
2532
2532
  }
2533
- obj[member.name.text] = value;
2534
2533
  });
2535
2534
  return obj;
2536
2535
  }
@@ -2659,7 +2658,7 @@ function hasInjectableFields(clazz, host) {
2659
2658
  return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
2660
2659
  }
2661
2660
 
2662
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
2661
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
2663
2662
  var DtsMetadataReader = class {
2664
2663
  constructor(checker, reflector) {
2665
2664
  this.checker = checker;
@@ -2834,7 +2833,7 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
2834
2833
  return result.length > 0 ? result : null;
2835
2834
  }
2836
2835
 
2837
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
2836
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
2838
2837
  function flattenInheritedDirectiveMetadata(reader, dir) {
2839
2838
  const topMeta = reader.getDirectiveMetadata(dir);
2840
2839
  if (topMeta === null) {
@@ -2892,7 +2891,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
2892
2891
  };
2893
2892
  }
2894
2893
 
2895
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
2894
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
2896
2895
  var LocalMetadataRegistry = class {
2897
2896
  constructor() {
2898
2897
  this.directives = /* @__PURE__ */ new Map();
@@ -2949,7 +2948,7 @@ var CompoundMetadataRegistry = class {
2949
2948
  }
2950
2949
  };
2951
2950
 
2952
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
2951
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
2953
2952
  var ResourceRegistry = class {
2954
2953
  constructor() {
2955
2954
  this.externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
@@ -3014,7 +3013,7 @@ var ResourceRegistry = class {
3014
3013
  }
3015
3014
  };
3016
3015
 
3017
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
3016
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
3018
3017
  var ExportedProviderStatusResolver = class {
3019
3018
  constructor(metaReader) {
3020
3019
  this.metaReader = metaReader;
@@ -3058,7 +3057,7 @@ var ExportedProviderStatusResolver = class {
3058
3057
  }
3059
3058
  };
3060
3059
 
3061
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
3060
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
3062
3061
  var EMPTY_ARRAY = [];
3063
3062
  var HostDirectivesResolver = class {
3064
3063
  constructor(metaReader) {
@@ -3120,7 +3119,7 @@ function resolveOutput(bindingName) {
3120
3119
  return bindingName;
3121
3120
  }
3122
3121
 
3123
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
3122
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
3124
3123
  function makeDuplicateDeclarationError(node, data, kind) {
3125
3124
  const context = [];
3126
3125
  for (const decl of data) {
@@ -3316,7 +3315,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, kind) {
3316
3315
  return makeDiagnostic(ErrorCode.DIRECTIVE_INHERITS_UNDECORATED_CTOR, node.name, `The ${kind.toLowerCase()} ${node.name.text} inherits its constructor from ${baseClassName}, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of ${baseClassName}'s constructor. Either add a @${baseNeedsDecorator} decorator to ${baseClassName}, or add an explicit constructor to ${node.name.text}.`);
3317
3316
  }
3318
3317
 
3319
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
3318
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
3320
3319
  import ts14 from "typescript";
3321
3320
  function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
3322
3321
  let resolved = null;
@@ -3349,7 +3348,7 @@ function resolveLiteral(decorator, literalCache) {
3349
3348
  return meta;
3350
3349
  }
3351
3350
 
3352
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
3351
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
3353
3352
  import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
3354
3353
  function compileNgFactoryDefField(metadata) {
3355
3354
  const res = compileFactoryFunction(metadata);
@@ -3372,7 +3371,7 @@ function compileDeclareFactory(metadata) {
3372
3371
  };
3373
3372
  }
3374
3373
 
3375
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
3374
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
3376
3375
  var InjectableClassRegistry = class {
3377
3376
  constructor(host, isCore) {
3378
3377
  this.host = host;
@@ -3398,7 +3397,7 @@ var InjectableClassRegistry = class {
3398
3397
  }
3399
3398
  };
3400
3399
 
3401
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
3400
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
3402
3401
  import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
3403
3402
  import ts15 from "typescript";
3404
3403
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
@@ -3485,13 +3484,13 @@ function removeIdentifierReferences(node, names) {
3485
3484
  return result.transformed[0];
3486
3485
  }
3487
3486
 
3488
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
3487
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
3489
3488
  var NoopReferencesRegistry = class {
3490
3489
  add(source, ...references) {
3491
3490
  }
3492
3491
  };
3493
3492
 
3494
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
3493
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
3495
3494
  import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
3496
3495
  function extractSchemas(rawExpr, evaluator, context) {
3497
3496
  const schemas = [];
@@ -3521,7 +3520,7 @@ function extractSchemas(rawExpr, evaluator, context) {
3521
3520
  return schemas;
3522
3521
  }
3523
3522
 
3524
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
3523
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
3525
3524
  import { outputAst } from "@angular/compiler";
3526
3525
  function compileInputTransformFields(inputs) {
3527
3526
  const extraFields = [];
@@ -3539,11 +3538,11 @@ function compileInputTransformFields(inputs) {
3539
3538
  return extraFields;
3540
3539
  }
3541
3540
 
3542
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
3541
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
3543
3542
  import { compileClassMetadata as compileClassMetadata3, compileComponentClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
3544
3543
  import ts24 from "typescript";
3545
3544
 
3546
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
3545
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
3547
3546
  import ts16 from "typescript";
3548
3547
  var SemanticSymbol = class {
3549
3548
  constructor(decl) {
@@ -3559,7 +3558,7 @@ function getSymbolIdentifier(decl) {
3559
3558
  return decl.name.text;
3560
3559
  }
3561
3560
 
3562
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
3561
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
3563
3562
  import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
3564
3563
  var OpaqueSymbol = class extends SemanticSymbol {
3565
3564
  isPublicApiAffected() {
@@ -3702,10 +3701,10 @@ function getImportPath(expr) {
3702
3701
  }
3703
3702
  }
3704
3703
 
3705
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3704
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3706
3705
  import ts17 from "typescript";
3707
3706
 
3708
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
3707
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
3709
3708
  function isSymbolEqual(a, b) {
3710
3709
  if (a.decl === b.decl) {
3711
3710
  return true;
@@ -3755,7 +3754,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
3755
3754
  return true;
3756
3755
  }
3757
3756
 
3758
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3757
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3759
3758
  function extractSemanticTypeParameters(node) {
3760
3759
  if (!ts17.isClassDeclaration(node) || node.typeParameters === void 0) {
3761
3760
  return null;
@@ -3775,14 +3774,14 @@ function isTypeParameterEqual(a, b) {
3775
3774
  return a.hasGenericTypeBound === b.hasGenericTypeBound;
3776
3775
  }
3777
3776
 
3778
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
3777
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
3779
3778
  var ComponentScopeKind;
3780
3779
  (function(ComponentScopeKind2) {
3781
3780
  ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
3782
3781
  ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
3783
3782
  })(ComponentScopeKind || (ComponentScopeKind = {}));
3784
3783
 
3785
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
3784
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
3786
3785
  var CompoundComponentScopeReader = class {
3787
3786
  constructor(readers) {
3788
3787
  this.readers = readers;
@@ -3807,7 +3806,7 @@ var CompoundComponentScopeReader = class {
3807
3806
  }
3808
3807
  };
3809
3808
 
3810
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
3809
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
3811
3810
  var MetadataDtsModuleScopeResolver = class {
3812
3811
  constructor(dtsMetaReader, aliasingHost) {
3813
3812
  this.dtsMetaReader = dtsMetaReader;
@@ -3883,11 +3882,11 @@ var MetadataDtsModuleScopeResolver = class {
3883
3882
  }
3884
3883
  };
3885
3884
 
3886
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
3885
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
3887
3886
  import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
3888
3887
  import ts18 from "typescript";
3889
3888
 
3890
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
3889
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
3891
3890
  function getDiagnosticNode(ref, rawExpr) {
3892
3891
  return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
3893
3892
  }
@@ -3910,7 +3909,7 @@ function makeUnknownComponentImportDiagnostic(ref, rawExpr) {
3910
3909
  return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_IMPORT, getDiagnosticNode(ref, rawExpr), `Component imports must be standalone components, directives, pipes, or must be NgModules.`);
3911
3910
  }
3912
3911
 
3913
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
3912
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
3914
3913
  var LocalModuleScopeRegistry = class {
3915
3914
  constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
3916
3915
  this.localReader = localReader;
@@ -4249,7 +4248,7 @@ function reexportCollision(module, refA, refB) {
4249
4248
  ]);
4250
4249
  }
4251
4250
 
4252
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
4251
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
4253
4252
  import { CssSelector, SelectorMatcher } from "@angular/compiler";
4254
4253
  import ts19 from "typescript";
4255
4254
  var TypeCheckScopeRegistry = class {
@@ -4318,10 +4317,10 @@ var TypeCheckScopeRegistry = class {
4318
4317
  }
4319
4318
  };
4320
4319
 
4321
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4320
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4322
4321
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4323
4322
 
4324
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4323
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4325
4324
  import { createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
4326
4325
  import ts20 from "typescript";
4327
4326
  var EMPTY_OBJECT = {};
@@ -4602,13 +4601,14 @@ function parseDirectiveStyles(directive, evaluator, compilationMode) {
4602
4601
  if (!expression) {
4603
4602
  return null;
4604
4603
  }
4605
- const value = evaluator.evaluate(expression);
4604
+ const evaluated = evaluator.evaluate(expression);
4605
+ const value = typeof evaluated === "string" ? [evaluated] : evaluated;
4606
4606
  if (compilationMode === CompilationMode.LOCAL && Array.isArray(value)) {
4607
4607
  for (const entry of value) {
4608
4608
  if (entry instanceof DynamicValue && entry.isFromUnknownIdentifier()) {
4609
4609
  const relatedInformation = traceDynamicValue(expression, entry);
4610
4610
  const chain = {
4611
- messageText: `Unknown identifier used as styles string: ${entry.node.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using'styleUrls')`,
4611
+ messageText: `Unknown identifier used as styles string: ${entry.node.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using 'styleUrl')`,
4612
4612
  category: ts20.DiagnosticCategory.Error,
4613
4613
  code: 0
4614
4614
  };
@@ -4617,7 +4617,7 @@ function parseDirectiveStyles(directive, evaluator, compilationMode) {
4617
4617
  }
4618
4618
  }
4619
4619
  if (!isStringArrayOrDie(value, "styles", expression)) {
4620
- throw createValueHasWrongTypeError(expression, value, `Failed to resolve @Directive.styles to a string array`);
4620
+ throw createValueHasWrongTypeError(expression, value, `Failed to resolve @Component.styles to a string or an array of strings`);
4621
4621
  }
4622
4622
  return value;
4623
4623
  }
@@ -4909,7 +4909,7 @@ function toR3InputMetadata(mapping) {
4909
4909
  };
4910
4910
  }
4911
4911
 
4912
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
4912
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
4913
4913
  var DirectiveSymbol = class extends SemanticSymbol {
4914
4914
  constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
4915
4915
  super(decl);
@@ -4989,7 +4989,7 @@ function isBaseClassEqual(current, previous) {
4989
4989
  return isSymbolEqual(current, previous);
4990
4990
  }
4991
4991
 
4992
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4992
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4993
4993
  var FIELD_DECORATORS = [
4994
4994
  "Input",
4995
4995
  "Output",
@@ -5161,11 +5161,11 @@ var DirectiveDecoratorHandler = class {
5161
5161
  }
5162
5162
  };
5163
5163
 
5164
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5164
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5165
5165
  import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr as FunctionExpr2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement as ReturnStatement2, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
5166
5166
  import ts22 from "typescript";
5167
5167
 
5168
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5168
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5169
5169
  import ts21 from "typescript";
5170
5170
  function createModuleWithProvidersResolver(reflector, isCore) {
5171
5171
  function _reflectModuleFromTypeParam(type, node) {
@@ -5232,7 +5232,7 @@ function isResolvedModuleWithProviders(sv) {
5232
5232
  return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
5233
5233
  }
5234
5234
 
5235
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5235
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5236
5236
  var NgModuleSymbol = class extends SemanticSymbol {
5237
5237
  constructor(decl, hasProviders) {
5238
5238
  super(decl);
@@ -5492,11 +5492,17 @@ var NgModuleDecoratorHandler = class {
5492
5492
  imports: []
5493
5493
  };
5494
5494
  if (this.compilationMode === CompilationMode.LOCAL) {
5495
- if (rawImports !== null && ts22.isArrayLiteralExpression(rawImports) && rawImports.elements) {
5496
- injectorMetadata.imports.push(...rawImports.elements.map((n) => new WrappedNodeExpr6(n)));
5497
- }
5498
- if (rawExports !== null && ts22.isArrayLiteralExpression(rawExports) && rawExports.elements) {
5499
- injectorMetadata.imports.push(...rawExports.elements.map((n) => new WrappedNodeExpr6(n)));
5495
+ for (const exp of [rawImports, rawExports]) {
5496
+ if (exp === null) {
5497
+ continue;
5498
+ }
5499
+ if (ts22.isArrayLiteralExpression(exp)) {
5500
+ if (exp.elements) {
5501
+ injectorMetadata.imports.push(...exp.elements.map((n) => new WrappedNodeExpr6(n)));
5502
+ }
5503
+ } else {
5504
+ injectorMetadata.imports.push(new WrappedNodeExpr6(exp));
5505
+ }
5500
5506
  }
5501
5507
  }
5502
5508
  const factoryMetadata = {
@@ -5795,7 +5801,7 @@ function isSyntheticReference(ref) {
5795
5801
  return ref.synthetic;
5796
5802
  }
5797
5803
 
5798
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
5804
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
5799
5805
  function makeCyclicImportInfo(ref, type, cycle) {
5800
5806
  const name = ref.debugName || "(unknown)";
5801
5807
  const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
@@ -5818,7 +5824,7 @@ function checkCustomElementSelectorForErrors(selector) {
5818
5824
  return null;
5819
5825
  }
5820
5826
 
5821
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
5827
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
5822
5828
  import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
5823
5829
  import ts23 from "typescript";
5824
5830
  function getTemplateDeclarationNodeForError(declaration) {
@@ -6044,7 +6050,7 @@ function transformDecoratorResources(dec, component, styles, template) {
6044
6050
  if (dec.name !== "Component") {
6045
6051
  return dec;
6046
6052
  }
6047
- if (!component.has("templateUrl") && !component.has("styleUrls") && !component.has("styles")) {
6053
+ if (!component.has("templateUrl") && !component.has("styleUrls") && !component.has("styleUrl") && !component.has("styles")) {
6048
6054
  return dec;
6049
6055
  }
6050
6056
  const metadata = new Map(component);
@@ -6052,9 +6058,10 @@ function transformDecoratorResources(dec, component, styles, template) {
6052
6058
  metadata.delete("templateUrl");
6053
6059
  metadata.set("template", ts23.factory.createStringLiteral(template.content));
6054
6060
  }
6055
- if (metadata.has("styleUrls") || metadata.has("styles")) {
6061
+ if (metadata.has("styleUrls") || metadata.has("styleUrl") || metadata.has("styles")) {
6056
6062
  metadata.delete("styles");
6057
6063
  metadata.delete("styleUrls");
6064
+ metadata.delete("styleUrl");
6058
6065
  if (styles.length > 0) {
6059
6066
  const styleNodes = styles.reduce((result, style) => {
6060
6067
  if (style.trim().length > 0) {
@@ -6074,10 +6081,26 @@ function transformDecoratorResources(dec, component, styles, template) {
6074
6081
  return { ...dec, args: [ts23.factory.createObjectLiteralExpression(newMetadataFields)] };
6075
6082
  }
6076
6083
  function extractComponentStyleUrls(evaluator, component) {
6077
- if (!component.has("styleUrls")) {
6078
- return [];
6084
+ const styleUrlsExpr = component.get("styleUrls");
6085
+ const styleUrlExpr = component.get("styleUrl");
6086
+ if (styleUrlsExpr !== void 0 && styleUrlExpr !== void 0) {
6087
+ throw new FatalDiagnosticError(ErrorCode.COMPONENT_INVALID_STYLE_URLS, styleUrlExpr, "@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");
6079
6088
  }
6080
- return extractStyleUrlsFromExpression(evaluator, component.get("styleUrls"));
6089
+ if (styleUrlsExpr !== void 0) {
6090
+ return extractStyleUrlsFromExpression(evaluator, component.get("styleUrls"));
6091
+ }
6092
+ if (styleUrlExpr !== void 0) {
6093
+ const styleUrl = evaluator.evaluate(styleUrlExpr);
6094
+ if (typeof styleUrl !== "string") {
6095
+ throw createValueHasWrongTypeError(styleUrlExpr, styleUrl, "styleUrl must be a string");
6096
+ }
6097
+ return [{
6098
+ url: styleUrl,
6099
+ source: 2,
6100
+ nodeForError: styleUrlExpr
6101
+ }];
6102
+ }
6103
+ return [];
6081
6104
  }
6082
6105
  function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6083
6106
  const styleUrls = [];
@@ -6117,24 +6140,41 @@ function extractStyleResources(resourceLoader, component, containingFile) {
6117
6140
  function stringLiteralElements(array) {
6118
6141
  return array.elements.filter((e) => ts23.isStringLiteralLike(e));
6119
6142
  }
6143
+ const styleUrlExpr = component.get("styleUrl");
6120
6144
  const styleUrlsExpr = component.get("styleUrls");
6121
6145
  if (styleUrlsExpr !== void 0 && ts23.isArrayLiteralExpression(styleUrlsExpr)) {
6122
6146
  for (const expression of stringLiteralElements(styleUrlsExpr)) {
6123
- try {
6124
- const resourceUrl = resourceLoader.resolve(expression.text, containingFile);
6125
- styles.add({ path: absoluteFrom(resourceUrl), expression });
6126
- } catch {
6147
+ const resource = stringLiteralUrlToResource(resourceLoader, expression, containingFile);
6148
+ if (resource !== null) {
6149
+ styles.add(resource);
6127
6150
  }
6128
6151
  }
6152
+ } else if (styleUrlExpr !== void 0 && ts23.isStringLiteralLike(styleUrlExpr)) {
6153
+ const resource = stringLiteralUrlToResource(resourceLoader, styleUrlExpr, containingFile);
6154
+ if (resource !== null) {
6155
+ styles.add(resource);
6156
+ }
6129
6157
  }
6130
6158
  const stylesExpr = component.get("styles");
6131
- if (stylesExpr !== void 0 && ts23.isArrayLiteralExpression(stylesExpr)) {
6132
- for (const expression of stringLiteralElements(stylesExpr)) {
6133
- styles.add({ path: null, expression });
6159
+ if (stylesExpr !== void 0) {
6160
+ if (ts23.isArrayLiteralExpression(stylesExpr)) {
6161
+ for (const expression of stringLiteralElements(stylesExpr)) {
6162
+ styles.add({ path: null, expression });
6163
+ }
6164
+ } else if (ts23.isStringLiteralLike(stylesExpr)) {
6165
+ styles.add({ path: null, expression: stylesExpr });
6134
6166
  }
6135
6167
  }
6136
6168
  return styles;
6137
6169
  }
6170
+ function stringLiteralUrlToResource(resourceLoader, expression, containingFile) {
6171
+ try {
6172
+ const resourceUrl = resourceLoader.resolve(expression.text, containingFile);
6173
+ return { path: absoluteFrom(resourceUrl), expression };
6174
+ } catch {
6175
+ return null;
6176
+ }
6177
+ }
6138
6178
  function _extractTemplateStyleUrls(template) {
6139
6179
  if (template.styleUrls === null) {
6140
6180
  return [];
@@ -6143,7 +6183,7 @@ function _extractTemplateStyleUrls(template) {
6143
6183
  return template.styleUrls.map((url) => ({ url, source: 1, nodeForError }));
6144
6184
  }
6145
6185
 
6146
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
6186
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
6147
6187
  var ComponentSymbol = class extends DirectiveSymbol {
6148
6188
  constructor() {
6149
6189
  super(...arguments);
@@ -6178,7 +6218,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
6178
6218
  }
6179
6219
  };
6180
6220
 
6181
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
6221
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
6182
6222
  function collectAnimationNames(value, animationTriggerNames) {
6183
6223
  if (value instanceof Map) {
6184
6224
  const name = value.get("name");
@@ -6254,7 +6294,7 @@ function isLikelyModuleWithProviders(value) {
6254
6294
  return false;
6255
6295
  }
6256
6296
 
6257
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6297
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6258
6298
  var EMPTY_ARRAY2 = [];
6259
6299
  var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
6260
6300
  var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
@@ -6535,7 +6575,7 @@ var ComponentDecoratorHandler = class {
6535
6575
  viewProviders: wrappedViewProviders,
6536
6576
  i18nUseExternalIds: this.i18nUseExternalIds,
6537
6577
  relativeContextFilePath,
6538
- rawImports: rawImports !== null && ts24.isArrayLiteralExpression(rawImports) && rawImports.elements.length > 0 ? new WrappedNodeExpr7(rawImports) : void 0
6578
+ rawImports: rawImports !== null ? new WrappedNodeExpr7(rawImports) : void 0
6539
6579
  },
6540
6580
  typeCheckMeta: extractDirectiveTypeCheckMeta(node, inputs, this.reflector),
6541
6581
  classMetadata: this.includeClassMetadata ? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template)) : null,
@@ -6626,6 +6666,7 @@ var ComponentDecoratorHandler = class {
6626
6666
  file: analysis.template.file
6627
6667
  }
6628
6668
  });
6669
+ return null;
6629
6670
  }
6630
6671
  typeCheck(ctx, node, meta) {
6631
6672
  if (this.typeCheckScopeRegistry === null || !ts24.isClassDeclaration(node)) {
@@ -7033,7 +7074,7 @@ function validateStandaloneImports(importRefs, importExpr, metaReader, scopeRead
7033
7074
  return diagnostics;
7034
7075
  }
7035
7076
 
7036
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
7077
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
7037
7078
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
7038
7079
  import ts25 from "typescript";
7039
7080
  var InjectableDecoratorHandler = class {
@@ -7259,7 +7300,7 @@ function getDep(dep, reflector) {
7259
7300
  return meta;
7260
7301
  }
7261
7302
 
7262
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7303
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7263
7304
  import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
7264
7305
  import ts26 from "typescript";
7265
7306
  var PipeSymbol = class extends SemanticSymbol {
@@ -7411,14 +7452,14 @@ var PipeDecoratorHandler = class {
7411
7452
  }
7412
7453
  };
7413
7454
 
7414
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
7455
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
7415
7456
  var OptimizeFor;
7416
7457
  (function(OptimizeFor2) {
7417
7458
  OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
7418
7459
  OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
7419
7460
  })(OptimizeFor || (OptimizeFor = {}));
7420
7461
 
7421
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
7462
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
7422
7463
  var PotentialImportKind;
7423
7464
  (function(PotentialImportKind2) {
7424
7465
  PotentialImportKind2[PotentialImportKind2["NgModule"] = 0] = "NgModule";
@@ -7430,14 +7471,14 @@ var PotentialImportMode;
7430
7471
  PotentialImportMode2[PotentialImportMode2["ForceDirect"] = 1] = "ForceDirect";
7431
7472
  })(PotentialImportMode || (PotentialImportMode = {}));
7432
7473
 
7433
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
7474
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
7434
7475
  var CompletionKind;
7435
7476
  (function(CompletionKind2) {
7436
7477
  CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
7437
7478
  CompletionKind2[CompletionKind2["Variable"] = 1] = "Variable";
7438
7479
  })(CompletionKind || (CompletionKind = {}));
7439
7480
 
7440
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
7481
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
7441
7482
  var SymbolKind;
7442
7483
  (function(SymbolKind2) {
7443
7484
  SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
@@ -7505,4 +7546,4 @@ export {
7505
7546
  * Use of this source code is governed by an MIT-style license that can be
7506
7547
  * found in the LICENSE file at https://angular.io/license
7507
7548
  */
7508
- //# sourceMappingURL=chunk-Y4VU3VP2.js.map
7549
+ //# sourceMappingURL=chunk-YWV5CDS7.js.map