@angular/compiler-cli 15.2.0-next.4 → 15.2.0

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 (48) hide show
  1. package/bundles/{chunk-HYFCMILZ.js → chunk-2OF2AI57.js} +11 -9
  2. package/bundles/chunk-2OF2AI57.js.map +6 -0
  3. package/bundles/{chunk-64X67E3N.js → chunk-2PLRZDNU.js} +4 -4
  4. package/bundles/{chunk-Q6W3UCXI.js → chunk-J3L7WZP3.js} +91 -124
  5. package/bundles/chunk-J3L7WZP3.js.map +6 -0
  6. package/bundles/{chunk-BEXFRTBC.js → chunk-MLCT4AWL.js} +3 -3
  7. package/bundles/{chunk-OAZD7RII.js → chunk-NXCQCU6C.js} +9 -7
  8. package/bundles/chunk-NXCQCU6C.js.map +6 -0
  9. package/bundles/{chunk-ZB4CDKOH.js → chunk-P6SWFK2U.js} +2 -2
  10. package/bundles/{chunk-JYL7IHZC.js → chunk-PKSKJEUS.js} +10 -8
  11. package/bundles/chunk-PKSKJEUS.js.map +6 -0
  12. package/bundles/chunk-QRHWLC7U.js +714 -0
  13. package/bundles/chunk-QRHWLC7U.js.map +6 -0
  14. package/bundles/chunk-ZCBRXUPO.js +877 -0
  15. package/bundles/chunk-ZCBRXUPO.js.map +6 -0
  16. package/bundles/index.js +6 -5
  17. package/bundles/index.js.map +1 -1
  18. package/bundles/linker/babel/index.js +3 -2
  19. package/bundles/linker/babel/index.js.map +1 -1
  20. package/bundles/linker/index.js +3 -2
  21. package/bundles/ngcc/index.js +6 -5
  22. package/bundles/ngcc/index.js.map +1 -1
  23. package/bundles/ngcc/main-ngcc.js +6 -5
  24. package/bundles/ngcc/main-ngcc.js.map +1 -1
  25. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +5 -4
  26. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
  27. package/bundles/private/migrations.js +3 -2
  28. package/bundles/private/tooling.js +3 -1
  29. package/bundles/src/bin/ng_xi18n.js +5 -4
  30. package/bundles/src/bin/ng_xi18n.js.map +1 -1
  31. package/bundles/src/bin/ngc.js +5 -4
  32. package/bundles/src/bin/ngc.js.map +1 -1
  33. package/bundles_metadata.json +1 -1
  34. package/ngcc/src/packages/build_marker.d.ts +1 -1
  35. package/package.json +2 -2
  36. package/src/ngtsc/imports/index.d.ts +1 -0
  37. package/src/ngtsc/imports/src/default.d.ts +6 -10
  38. package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +61 -0
  39. package/bundles/chunk-HYFCMILZ.js.map +0 -6
  40. package/bundles/chunk-JYL7IHZC.js.map +0 -6
  41. package/bundles/chunk-OAZD7RII.js.map +0 -6
  42. package/bundles/chunk-Q6W3UCXI.js.map +0 -6
  43. package/bundles/chunk-Z534TW2O.js +0 -1540
  44. package/bundles/chunk-Z534TW2O.js.map +0 -6
  45. package/src/transformers/downlevel_decorators_transform/patch_alias_reference_resolution.d.ts +0 -14
  46. /package/bundles/{chunk-64X67E3N.js.map → chunk-2PLRZDNU.js.map} +0 -0
  47. /package/bundles/{chunk-BEXFRTBC.js.map → chunk-MLCT4AWL.js.map} +0 -0
  48. /package/bundles/{chunk-ZB4CDKOH.js.map → chunk-P6SWFK2U.js.map} +0 -0
@@ -0,0 +1,877 @@
1
+
2
+ import {createRequire as __cjsCompatRequire} from 'module';
3
+ const require = __cjsCompatRequire(import.meta.url);
4
+
5
+ import {
6
+ LogicalProjectPath,
7
+ absoluteFrom,
8
+ absoluteFromSourceFile,
9
+ dirname,
10
+ getFileSystem,
11
+ relative,
12
+ resolve,
13
+ stripExtension,
14
+ toRelativeImport
15
+ } from "./chunk-EC5K6QPP.js";
16
+
17
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/typescript.mjs
18
+ import ts from "typescript";
19
+ var TS = /\.tsx?$/i;
20
+ var D_TS = /\.d\.ts$/i;
21
+ function isSymbolWithValueDeclaration(symbol) {
22
+ return symbol != null && symbol.valueDeclaration !== void 0 && symbol.declarations !== void 0;
23
+ }
24
+ function isDtsPath(filePath) {
25
+ return D_TS.test(filePath);
26
+ }
27
+ function isNonDeclarationTsPath(filePath) {
28
+ return TS.test(filePath) && !D_TS.test(filePath);
29
+ }
30
+ function isFromDtsFile(node) {
31
+ let sf = node.getSourceFile();
32
+ if (sf === void 0) {
33
+ sf = ts.getOriginalNode(node).getSourceFile();
34
+ }
35
+ return sf !== void 0 && sf.isDeclarationFile;
36
+ }
37
+ function nodeNameForError(node) {
38
+ if (node.name !== void 0 && ts.isIdentifier(node.name)) {
39
+ return node.name.text;
40
+ } else {
41
+ const kind = ts.SyntaxKind[node.kind];
42
+ const { line, character } = ts.getLineAndCharacterOfPosition(node.getSourceFile(), node.getStart());
43
+ return `${kind}@${line}:${character}`;
44
+ }
45
+ }
46
+ function getSourceFile(node) {
47
+ const directSf = node.getSourceFile();
48
+ return directSf !== void 0 ? directSf : ts.getOriginalNode(node).getSourceFile();
49
+ }
50
+ function getSourceFileOrNull(program, fileName) {
51
+ return program.getSourceFile(fileName) || null;
52
+ }
53
+ function getTokenAtPosition(sf, pos) {
54
+ return ts.getTokenAtPosition(sf, pos);
55
+ }
56
+ function identifierOfNode(decl) {
57
+ if (decl.name !== void 0 && ts.isIdentifier(decl.name)) {
58
+ return decl.name;
59
+ } else {
60
+ return null;
61
+ }
62
+ }
63
+ function isDeclaration(node) {
64
+ return isValueDeclaration(node) || isTypeDeclaration(node);
65
+ }
66
+ function isValueDeclaration(node) {
67
+ return ts.isClassDeclaration(node) || ts.isFunctionDeclaration(node) || ts.isVariableDeclaration(node);
68
+ }
69
+ function isTypeDeclaration(node) {
70
+ return ts.isEnumDeclaration(node) || ts.isTypeAliasDeclaration(node) || ts.isInterfaceDeclaration(node);
71
+ }
72
+ function isNamedDeclaration(node) {
73
+ const namedNode = node;
74
+ return namedNode.name !== void 0 && ts.isIdentifier(namedNode.name);
75
+ }
76
+ function getRootDirs(host, options) {
77
+ const rootDirs = [];
78
+ const cwd = host.getCurrentDirectory();
79
+ const fs = getFileSystem();
80
+ if (options.rootDirs !== void 0) {
81
+ rootDirs.push(...options.rootDirs);
82
+ } else if (options.rootDir !== void 0) {
83
+ rootDirs.push(options.rootDir);
84
+ } else {
85
+ rootDirs.push(cwd);
86
+ }
87
+ return rootDirs.map((rootDir) => fs.resolve(cwd, host.getCanonicalFileName(rootDir)));
88
+ }
89
+ function nodeDebugInfo(node) {
90
+ const sf = getSourceFile(node);
91
+ const { line, character } = ts.getLineAndCharacterOfPosition(sf, node.pos);
92
+ return `[${sf.fileName}: ${ts.SyntaxKind[node.kind]} @ ${line}:${character}]`;
93
+ }
94
+ function resolveModuleName(moduleName, containingFile, compilerOptions, compilerHost, moduleResolutionCache) {
95
+ if (compilerHost.resolveModuleNames) {
96
+ return compilerHost.resolveModuleNames(
97
+ [moduleName],
98
+ containingFile,
99
+ void 0,
100
+ void 0,
101
+ compilerOptions
102
+ )[0];
103
+ } else {
104
+ return ts.resolveModuleName(moduleName, containingFile, compilerOptions, compilerHost, moduleResolutionCache !== null ? moduleResolutionCache : void 0).resolvedModule;
105
+ }
106
+ }
107
+ function isAssignment(node) {
108
+ return ts.isBinaryExpression(node) && node.operatorToken.kind === ts.SyntaxKind.EqualsToken;
109
+ }
110
+ function toUnredirectedSourceFile(sf) {
111
+ const redirectInfo = sf.redirectInfo;
112
+ if (redirectInfo === void 0) {
113
+ return sf;
114
+ }
115
+ return redirectInfo.unredirected;
116
+ }
117
+
118
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/references.mjs
119
+ var Reference = class {
120
+ constructor(node, bestGuessOwningModule = null) {
121
+ this.node = node;
122
+ this.identifiers = [];
123
+ this.synthetic = false;
124
+ this._alias = null;
125
+ this.bestGuessOwningModule = bestGuessOwningModule;
126
+ const id = identifierOfNode(node);
127
+ if (id !== null) {
128
+ this.identifiers.push(id);
129
+ }
130
+ }
131
+ get ownedByModuleGuess() {
132
+ if (this.bestGuessOwningModule !== null) {
133
+ return this.bestGuessOwningModule.specifier;
134
+ } else {
135
+ return null;
136
+ }
137
+ }
138
+ get hasOwningModuleGuess() {
139
+ return this.bestGuessOwningModule !== null;
140
+ }
141
+ get debugName() {
142
+ const id = identifierOfNode(this.node);
143
+ return id !== null ? id.text : null;
144
+ }
145
+ get alias() {
146
+ return this._alias;
147
+ }
148
+ addIdentifier(identifier) {
149
+ this.identifiers.push(identifier);
150
+ }
151
+ getIdentityIn(context) {
152
+ return this.identifiers.find((id) => id.getSourceFile() === context) || null;
153
+ }
154
+ getIdentityInExpression(expr) {
155
+ const sf = expr.getSourceFile();
156
+ return this.identifiers.find((id) => {
157
+ if (id.getSourceFile() !== sf) {
158
+ return false;
159
+ }
160
+ return id.pos >= expr.pos && id.end <= expr.end;
161
+ }) || null;
162
+ }
163
+ getOriginForDiagnostics(container, fallback = container) {
164
+ const id = this.getIdentityInExpression(container);
165
+ return id !== null ? id : fallback;
166
+ }
167
+ cloneWithAlias(alias) {
168
+ const ref = new Reference(this.node, this.bestGuessOwningModule);
169
+ ref.identifiers = [...this.identifiers];
170
+ ref._alias = alias;
171
+ return ref;
172
+ }
173
+ cloneWithNoIdentifiers() {
174
+ const ref = new Reference(this.node, this.bestGuessOwningModule);
175
+ ref._alias = this._alias;
176
+ ref.identifiers = [];
177
+ return ref;
178
+ }
179
+ };
180
+
181
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/alias.mjs
182
+ import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
183
+
184
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
185
+ import { ExternalExpr, ExternalReference, WrappedNodeExpr } from "@angular/compiler";
186
+ import ts3 from "typescript";
187
+
188
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.mjs
189
+ var ErrorCode;
190
+ (function(ErrorCode2) {
191
+ ErrorCode2[ErrorCode2["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
192
+ ErrorCode2[ErrorCode2["DECORATOR_ARITY_WRONG"] = 1002] = "DECORATOR_ARITY_WRONG";
193
+ ErrorCode2[ErrorCode2["DECORATOR_NOT_CALLED"] = 1003] = "DECORATOR_NOT_CALLED";
194
+ ErrorCode2[ErrorCode2["DECORATOR_UNEXPECTED"] = 1005] = "DECORATOR_UNEXPECTED";
195
+ ErrorCode2[ErrorCode2["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
196
+ ErrorCode2[ErrorCode2["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
197
+ ErrorCode2[ErrorCode2["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
198
+ ErrorCode2[ErrorCode2["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
199
+ ErrorCode2[ErrorCode2["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
200
+ ErrorCode2[ErrorCode2["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
201
+ ErrorCode2[ErrorCode2["DIRECTIVE_MISSING_SELECTOR"] = 2004] = "DIRECTIVE_MISSING_SELECTOR";
202
+ ErrorCode2[ErrorCode2["UNDECORATED_PROVIDER"] = 2005] = "UNDECORATED_PROVIDER";
203
+ ErrorCode2[ErrorCode2["DIRECTIVE_INHERITS_UNDECORATED_CTOR"] = 2006] = "DIRECTIVE_INHERITS_UNDECORATED_CTOR";
204
+ ErrorCode2[ErrorCode2["UNDECORATED_CLASS_USING_ANGULAR_FEATURES"] = 2007] = "UNDECORATED_CLASS_USING_ANGULAR_FEATURES";
205
+ ErrorCode2[ErrorCode2["COMPONENT_RESOURCE_NOT_FOUND"] = 2008] = "COMPONENT_RESOURCE_NOT_FOUND";
206
+ ErrorCode2[ErrorCode2["COMPONENT_INVALID_SHADOW_DOM_SELECTOR"] = 2009] = "COMPONENT_INVALID_SHADOW_DOM_SELECTOR";
207
+ ErrorCode2[ErrorCode2["COMPONENT_NOT_STANDALONE"] = 2010] = "COMPONENT_NOT_STANDALONE";
208
+ ErrorCode2[ErrorCode2["COMPONENT_IMPORT_NOT_STANDALONE"] = 2011] = "COMPONENT_IMPORT_NOT_STANDALONE";
209
+ ErrorCode2[ErrorCode2["COMPONENT_UNKNOWN_IMPORT"] = 2012] = "COMPONENT_UNKNOWN_IMPORT";
210
+ ErrorCode2[ErrorCode2["HOST_DIRECTIVE_INVALID"] = 2013] = "HOST_DIRECTIVE_INVALID";
211
+ ErrorCode2[ErrorCode2["HOST_DIRECTIVE_NOT_STANDALONE"] = 2014] = "HOST_DIRECTIVE_NOT_STANDALONE";
212
+ ErrorCode2[ErrorCode2["HOST_DIRECTIVE_COMPONENT"] = 2015] = "HOST_DIRECTIVE_COMPONENT";
213
+ ErrorCode2[ErrorCode2["INJECTABLE_INHERITS_INVALID_CONSTRUCTOR"] = 2016] = "INJECTABLE_INHERITS_INVALID_CONSTRUCTOR";
214
+ ErrorCode2[ErrorCode2["HOST_DIRECTIVE_UNDEFINED_BINDING"] = 2017] = "HOST_DIRECTIVE_UNDEFINED_BINDING";
215
+ ErrorCode2[ErrorCode2["HOST_DIRECTIVE_CONFLICTING_ALIAS"] = 2018] = "HOST_DIRECTIVE_CONFLICTING_ALIAS";
216
+ ErrorCode2[ErrorCode2["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
217
+ ErrorCode2[ErrorCode2["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
218
+ ErrorCode2[ErrorCode2["IMPORT_GENERATION_FAILURE"] = 3004] = "IMPORT_GENERATION_FAILURE";
219
+ ErrorCode2[ErrorCode2["CONFIG_FLAT_MODULE_NO_INDEX"] = 4001] = "CONFIG_FLAT_MODULE_NO_INDEX";
220
+ ErrorCode2[ErrorCode2["CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK"] = 4002] = "CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK";
221
+ ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES"] = 4003] = "CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES";
222
+ ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL"] = 4004] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL";
223
+ ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK"] = 4005] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK";
224
+ ErrorCode2[ErrorCode2["HOST_BINDING_PARSE_ERROR"] = 5001] = "HOST_BINDING_PARSE_ERROR";
225
+ ErrorCode2[ErrorCode2["TEMPLATE_PARSE_ERROR"] = 5002] = "TEMPLATE_PARSE_ERROR";
226
+ ErrorCode2[ErrorCode2["NGMODULE_INVALID_DECLARATION"] = 6001] = "NGMODULE_INVALID_DECLARATION";
227
+ ErrorCode2[ErrorCode2["NGMODULE_INVALID_IMPORT"] = 6002] = "NGMODULE_INVALID_IMPORT";
228
+ ErrorCode2[ErrorCode2["NGMODULE_INVALID_EXPORT"] = 6003] = "NGMODULE_INVALID_EXPORT";
229
+ ErrorCode2[ErrorCode2["NGMODULE_INVALID_REEXPORT"] = 6004] = "NGMODULE_INVALID_REEXPORT";
230
+ ErrorCode2[ErrorCode2["NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC"] = 6005] = "NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC";
231
+ ErrorCode2[ErrorCode2["NGMODULE_REEXPORT_NAME_COLLISION"] = 6006] = "NGMODULE_REEXPORT_NAME_COLLISION";
232
+ ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_NOT_UNIQUE"] = 6007] = "NGMODULE_DECLARATION_NOT_UNIQUE";
233
+ ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_IS_STANDALONE"] = 6008] = "NGMODULE_DECLARATION_IS_STANDALONE";
234
+ ErrorCode2[ErrorCode2["NGMODULE_BOOTSTRAP_IS_STANDALONE"] = 6009] = "NGMODULE_BOOTSTRAP_IS_STANDALONE";
235
+ ErrorCode2[ErrorCode2["WARN_NGMODULE_ID_UNNECESSARY"] = 6100] = "WARN_NGMODULE_ID_UNNECESSARY";
236
+ ErrorCode2[ErrorCode2["NGMODULE_VE_DEPENDENCY_ON_IVY_LIB"] = 6999] = "NGMODULE_VE_DEPENDENCY_ON_IVY_LIB";
237
+ ErrorCode2[ErrorCode2["SCHEMA_INVALID_ELEMENT"] = 8001] = "SCHEMA_INVALID_ELEMENT";
238
+ ErrorCode2[ErrorCode2["SCHEMA_INVALID_ATTRIBUTE"] = 8002] = "SCHEMA_INVALID_ATTRIBUTE";
239
+ ErrorCode2[ErrorCode2["MISSING_REFERENCE_TARGET"] = 8003] = "MISSING_REFERENCE_TARGET";
240
+ ErrorCode2[ErrorCode2["MISSING_PIPE"] = 8004] = "MISSING_PIPE";
241
+ ErrorCode2[ErrorCode2["WRITE_TO_READ_ONLY_VARIABLE"] = 8005] = "WRITE_TO_READ_ONLY_VARIABLE";
242
+ ErrorCode2[ErrorCode2["DUPLICATE_VARIABLE_DECLARATION"] = 8006] = "DUPLICATE_VARIABLE_DECLARATION";
243
+ ErrorCode2[ErrorCode2["SPLIT_TWO_WAY_BINDING"] = 8007] = "SPLIT_TWO_WAY_BINDING";
244
+ ErrorCode2[ErrorCode2["INVALID_BANANA_IN_BOX"] = 8101] = "INVALID_BANANA_IN_BOX";
245
+ ErrorCode2[ErrorCode2["NULLISH_COALESCING_NOT_NULLABLE"] = 8102] = "NULLISH_COALESCING_NOT_NULLABLE";
246
+ ErrorCode2[ErrorCode2["MISSING_CONTROL_FLOW_DIRECTIVE"] = 8103] = "MISSING_CONTROL_FLOW_DIRECTIVE";
247
+ ErrorCode2[ErrorCode2["TEXT_ATTRIBUTE_NOT_BINDING"] = 8104] = "TEXT_ATTRIBUTE_NOT_BINDING";
248
+ ErrorCode2[ErrorCode2["MISSING_NGFOROF_LET"] = 8105] = "MISSING_NGFOROF_LET";
249
+ ErrorCode2[ErrorCode2["SUFFIX_NOT_SUPPORTED"] = 8106] = "SUFFIX_NOT_SUPPORTED";
250
+ ErrorCode2[ErrorCode2["OPTIONAL_CHAIN_NOT_NULLABLE"] = 8107] = "OPTIONAL_CHAIN_NOT_NULLABLE";
251
+ ErrorCode2[ErrorCode2["INLINE_TCB_REQUIRED"] = 8900] = "INLINE_TCB_REQUIRED";
252
+ ErrorCode2[ErrorCode2["INLINE_TYPE_CTOR_REQUIRED"] = 8901] = "INLINE_TYPE_CTOR_REQUIRED";
253
+ ErrorCode2[ErrorCode2["INJECTABLE_DUPLICATE_PROV"] = 9001] = "INJECTABLE_DUPLICATE_PROV";
254
+ ErrorCode2[ErrorCode2["SUGGEST_STRICT_TEMPLATES"] = 10001] = "SUGGEST_STRICT_TEMPLATES";
255
+ ErrorCode2[ErrorCode2["SUGGEST_SUBOPTIMAL_TYPE_INFERENCE"] = 10002] = "SUGGEST_SUBOPTIMAL_TYPE_INFERENCE";
256
+ })(ErrorCode || (ErrorCode = {}));
257
+
258
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.mjs
259
+ var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
260
+ ErrorCode.DECORATOR_ARG_NOT_LITERAL,
261
+ ErrorCode.IMPORT_CYCLE_DETECTED,
262
+ ErrorCode.PARAM_MISSING_TOKEN,
263
+ ErrorCode.SCHEMA_INVALID_ELEMENT,
264
+ ErrorCode.SCHEMA_INVALID_ATTRIBUTE,
265
+ ErrorCode.MISSING_REFERENCE_TARGET,
266
+ ErrorCode.COMPONENT_INVALID_SHADOW_DOM_SELECTOR,
267
+ ErrorCode.WARN_NGMODULE_ID_UNNECESSARY
268
+ ]);
269
+
270
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
271
+ import ts2 from "typescript";
272
+
273
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/util.mjs
274
+ var ERROR_CODE_MATCHER = /(\u001b\[\d+m ?)TS-99(\d+: ?\u001b\[\d+m)/g;
275
+ function replaceTsWithNgInErrors(errors) {
276
+ return errors.replace(ERROR_CODE_MATCHER, "$1NG$2");
277
+ }
278
+ function ngErrorCode(code) {
279
+ return parseInt("-99" + code);
280
+ }
281
+
282
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
283
+ var FatalDiagnosticError = class {
284
+ constructor(code, node, message, relatedInformation) {
285
+ this.code = code;
286
+ this.node = node;
287
+ this.message = message;
288
+ this.relatedInformation = relatedInformation;
289
+ this._isFatalDiagnosticError = true;
290
+ }
291
+ toDiagnostic() {
292
+ return makeDiagnostic(this.code, this.node, this.message, this.relatedInformation);
293
+ }
294
+ };
295
+ function makeDiagnostic(code, node, messageText, relatedInformation) {
296
+ node = ts2.getOriginalNode(node);
297
+ return {
298
+ category: ts2.DiagnosticCategory.Error,
299
+ code: ngErrorCode(code),
300
+ file: ts2.getOriginalNode(node).getSourceFile(),
301
+ start: node.getStart(void 0, false),
302
+ length: node.getWidth(),
303
+ messageText,
304
+ relatedInformation
305
+ };
306
+ }
307
+ function makeDiagnosticChain(messageText, next) {
308
+ return {
309
+ category: ts2.DiagnosticCategory.Message,
310
+ code: 0,
311
+ messageText,
312
+ next
313
+ };
314
+ }
315
+ function makeRelatedInformation(node, messageText) {
316
+ node = ts2.getOriginalNode(node);
317
+ return {
318
+ category: ts2.DiagnosticCategory.Message,
319
+ code: 0,
320
+ file: node.getSourceFile(),
321
+ start: node.getStart(),
322
+ length: node.getWidth(),
323
+ messageText
324
+ };
325
+ }
326
+ function addDiagnosticChain(messageText, add) {
327
+ if (typeof messageText === "string") {
328
+ return makeDiagnosticChain(messageText, add);
329
+ }
330
+ if (messageText.next === void 0) {
331
+ messageText.next = add;
332
+ } else {
333
+ messageText.next.push(...add);
334
+ }
335
+ return messageText;
336
+ }
337
+ function isFatalDiagnosticError(err) {
338
+ return err._isFatalDiagnosticError === true;
339
+ }
340
+
341
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
342
+ var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
343
+
344
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.mjs
345
+ var ExtendedTemplateDiagnosticName;
346
+ (function(ExtendedTemplateDiagnosticName2) {
347
+ ExtendedTemplateDiagnosticName2["INVALID_BANANA_IN_BOX"] = "invalidBananaInBox";
348
+ ExtendedTemplateDiagnosticName2["NULLISH_COALESCING_NOT_NULLABLE"] = "nullishCoalescingNotNullable";
349
+ ExtendedTemplateDiagnosticName2["OPTIONAL_CHAIN_NOT_NULLABLE"] = "optionalChainNotNullable";
350
+ ExtendedTemplateDiagnosticName2["MISSING_CONTROL_FLOW_DIRECTIVE"] = "missingControlFlowDirective";
351
+ ExtendedTemplateDiagnosticName2["TEXT_ATTRIBUTE_NOT_BINDING"] = "textAttributeNotBinding";
352
+ ExtendedTemplateDiagnosticName2["MISSING_NGFOROF_LET"] = "missingNgForOfLet";
353
+ ExtendedTemplateDiagnosticName2["SUFFIX_NOT_SUPPORTED"] = "suffixNotSupported";
354
+ })(ExtendedTemplateDiagnosticName || (ExtendedTemplateDiagnosticName = {}));
355
+
356
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/find_export.mjs
357
+ function findExportedNameOfNode(target, file, reflector) {
358
+ const exports = reflector.getExportsOfModule(file);
359
+ if (exports === null) {
360
+ return null;
361
+ }
362
+ const declaredName = isNamedDeclaration(target) ? target.name.text : null;
363
+ let foundExportName = null;
364
+ for (const [exportName, declaration] of exports) {
365
+ if (declaration.node !== target) {
366
+ continue;
367
+ }
368
+ if (exportName === declaredName) {
369
+ return exportName;
370
+ }
371
+ foundExportName = exportName;
372
+ }
373
+ return foundExportName;
374
+ }
375
+
376
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
377
+ var ImportFlags;
378
+ (function(ImportFlags2) {
379
+ ImportFlags2[ImportFlags2["None"] = 0] = "None";
380
+ ImportFlags2[ImportFlags2["ForceNewImport"] = 1] = "ForceNewImport";
381
+ ImportFlags2[ImportFlags2["NoAliasing"] = 2] = "NoAliasing";
382
+ ImportFlags2[ImportFlags2["AllowTypeImports"] = 4] = "AllowTypeImports";
383
+ ImportFlags2[ImportFlags2["AllowRelativeDtsImports"] = 8] = "AllowRelativeDtsImports";
384
+ })(ImportFlags || (ImportFlags = {}));
385
+ function assertSuccessfulReferenceEmit(result, origin, typeKind) {
386
+ if (result.kind === 0) {
387
+ return;
388
+ }
389
+ const message = makeDiagnosticChain(`Unable to import ${typeKind} ${nodeNameForError(result.ref.node)}.`, [makeDiagnosticChain(result.reason)]);
390
+ throw new FatalDiagnosticError(ErrorCode.IMPORT_GENERATION_FAILURE, origin, message, [makeRelatedInformation(result.ref.node, `The ${typeKind} is declared here.`)]);
391
+ }
392
+ var ReferenceEmitter = class {
393
+ constructor(strategies) {
394
+ this.strategies = strategies;
395
+ }
396
+ emit(ref, context, importFlags = ImportFlags.None) {
397
+ for (const strategy of this.strategies) {
398
+ const emitted = strategy.emit(ref, context, importFlags);
399
+ if (emitted !== null) {
400
+ return emitted;
401
+ }
402
+ }
403
+ return {
404
+ kind: 1,
405
+ ref,
406
+ context,
407
+ reason: `Unable to write a reference to ${nodeNameForError(ref.node)}.`
408
+ };
409
+ }
410
+ };
411
+ var LocalIdentifierStrategy = class {
412
+ emit(ref, context, importFlags) {
413
+ const refSf = getSourceFile(ref.node);
414
+ if (importFlags & ImportFlags.ForceNewImport && refSf !== context) {
415
+ return null;
416
+ }
417
+ if (!isDeclaration(ref.node) && refSf === context) {
418
+ return {
419
+ kind: 0,
420
+ expression: new WrappedNodeExpr(ref.node),
421
+ importedFile: null
422
+ };
423
+ }
424
+ const identifier = ref.getIdentityIn(context);
425
+ if (identifier !== null) {
426
+ return {
427
+ kind: 0,
428
+ expression: new WrappedNodeExpr(identifier),
429
+ importedFile: null
430
+ };
431
+ } else {
432
+ return null;
433
+ }
434
+ }
435
+ };
436
+ var AbsoluteModuleStrategy = class {
437
+ constructor(program, checker, moduleResolver, reflectionHost) {
438
+ this.program = program;
439
+ this.checker = checker;
440
+ this.moduleResolver = moduleResolver;
441
+ this.reflectionHost = reflectionHost;
442
+ this.moduleExportsCache = /* @__PURE__ */ new Map();
443
+ }
444
+ emit(ref, context, importFlags) {
445
+ if (ref.bestGuessOwningModule === null) {
446
+ return null;
447
+ } else if (!isDeclaration(ref.node)) {
448
+ throw new Error(`Debug assert: unable to import a Reference to non-declaration of type ${ts3.SyntaxKind[ref.node.kind]}.`);
449
+ } else if ((importFlags & ImportFlags.AllowTypeImports) === 0 && isTypeDeclaration(ref.node)) {
450
+ throw new Error(`Importing a type-only declaration of type ${ts3.SyntaxKind[ref.node.kind]} in a value position is not allowed.`);
451
+ }
452
+ const { specifier, resolutionContext } = ref.bestGuessOwningModule;
453
+ const exports = this.getExportsOfModule(specifier, resolutionContext);
454
+ if (exports.module === null) {
455
+ return {
456
+ kind: 1,
457
+ ref,
458
+ context,
459
+ reason: `The module '${specifier}' could not be found.`
460
+ };
461
+ } else if (exports.exportMap === null || !exports.exportMap.has(ref.node)) {
462
+ return {
463
+ kind: 1,
464
+ ref,
465
+ context,
466
+ reason: `The symbol is not exported from ${exports.module.fileName} (module '${specifier}').`
467
+ };
468
+ }
469
+ const symbolName = exports.exportMap.get(ref.node);
470
+ return {
471
+ kind: 0,
472
+ expression: new ExternalExpr(new ExternalReference(specifier, symbolName)),
473
+ importedFile: exports.module
474
+ };
475
+ }
476
+ getExportsOfModule(moduleName, fromFile) {
477
+ if (!this.moduleExportsCache.has(moduleName)) {
478
+ this.moduleExportsCache.set(moduleName, this.enumerateExportsOfModule(moduleName, fromFile));
479
+ }
480
+ return this.moduleExportsCache.get(moduleName);
481
+ }
482
+ enumerateExportsOfModule(specifier, fromFile) {
483
+ const entryPointFile = this.moduleResolver.resolveModule(specifier, fromFile);
484
+ if (entryPointFile === null) {
485
+ return { module: null, exportMap: null };
486
+ }
487
+ const exports = this.reflectionHost.getExportsOfModule(entryPointFile);
488
+ if (exports === null) {
489
+ return { module: entryPointFile, exportMap: null };
490
+ }
491
+ const exportMap = /* @__PURE__ */ new Map();
492
+ for (const [name, declaration] of exports) {
493
+ if (exportMap.has(declaration.node)) {
494
+ const existingExport = exportMap.get(declaration.node);
495
+ if (isNamedDeclaration(declaration.node) && declaration.node.name.text === existingExport) {
496
+ continue;
497
+ }
498
+ }
499
+ exportMap.set(declaration.node, name);
500
+ }
501
+ return { module: entryPointFile, exportMap };
502
+ }
503
+ };
504
+ var LogicalProjectStrategy = class {
505
+ constructor(reflector, logicalFs) {
506
+ this.reflector = reflector;
507
+ this.logicalFs = logicalFs;
508
+ this.relativePathStrategy = new RelativePathStrategy(this.reflector);
509
+ }
510
+ emit(ref, context, importFlags) {
511
+ const destSf = getSourceFile(ref.node);
512
+ const destPath = this.logicalFs.logicalPathOfSf(destSf);
513
+ if (destPath === null) {
514
+ if (destSf.isDeclarationFile && importFlags & ImportFlags.AllowRelativeDtsImports) {
515
+ return this.relativePathStrategy.emit(ref, context);
516
+ }
517
+ return {
518
+ kind: 1,
519
+ ref,
520
+ context,
521
+ reason: `The file ${destSf.fileName} is outside of the configured 'rootDir'.`
522
+ };
523
+ }
524
+ const originPath = this.logicalFs.logicalPathOfSf(context);
525
+ if (originPath === null) {
526
+ throw new Error(`Debug assert: attempt to import from ${context.fileName} but it's outside the program?`);
527
+ }
528
+ if (destPath === originPath) {
529
+ return null;
530
+ }
531
+ const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
532
+ if (name === null) {
533
+ return {
534
+ kind: 1,
535
+ ref,
536
+ context,
537
+ reason: `The symbol is not exported from ${destSf.fileName}.`
538
+ };
539
+ }
540
+ const moduleName = LogicalProjectPath.relativePathBetween(originPath, destPath);
541
+ return {
542
+ kind: 0,
543
+ expression: new ExternalExpr({ moduleName, name }),
544
+ importedFile: destSf
545
+ };
546
+ }
547
+ };
548
+ var RelativePathStrategy = class {
549
+ constructor(reflector) {
550
+ this.reflector = reflector;
551
+ }
552
+ emit(ref, context) {
553
+ const destSf = getSourceFile(ref.node);
554
+ const relativePath = relative(dirname(absoluteFromSourceFile(context)), absoluteFromSourceFile(destSf));
555
+ const moduleName = toRelativeImport(stripExtension(relativePath));
556
+ const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
557
+ if (name === null) {
558
+ return {
559
+ kind: 1,
560
+ ref,
561
+ context,
562
+ reason: `The symbol is not exported from ${destSf.fileName}.`
563
+ };
564
+ }
565
+ return {
566
+ kind: 0,
567
+ expression: new ExternalExpr({ moduleName, name }),
568
+ importedFile: destSf
569
+ };
570
+ }
571
+ };
572
+ var UnifiedModulesStrategy = class {
573
+ constructor(reflector, unifiedModulesHost) {
574
+ this.reflector = reflector;
575
+ this.unifiedModulesHost = unifiedModulesHost;
576
+ }
577
+ emit(ref, context) {
578
+ const destSf = getSourceFile(ref.node);
579
+ const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
580
+ if (name === null) {
581
+ return null;
582
+ }
583
+ const moduleName = this.unifiedModulesHost.fileNameToModuleName(destSf.fileName, context.fileName);
584
+ return {
585
+ kind: 0,
586
+ expression: new ExternalExpr({ moduleName, name }),
587
+ importedFile: destSf
588
+ };
589
+ }
590
+ };
591
+
592
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/alias.mjs
593
+ var CHARS_TO_ESCAPE = /[^a-zA-Z0-9/_]/g;
594
+ var UnifiedModulesAliasingHost = class {
595
+ constructor(unifiedModulesHost) {
596
+ this.unifiedModulesHost = unifiedModulesHost;
597
+ this.aliasExportsInDts = false;
598
+ }
599
+ maybeAliasSymbolAs(ref, context, ngModuleName, isReExport) {
600
+ if (!isReExport) {
601
+ return null;
602
+ }
603
+ return this.aliasName(ref.node, context);
604
+ }
605
+ getAliasIn(decl, via, isReExport) {
606
+ if (!isReExport) {
607
+ return null;
608
+ }
609
+ const moduleName = this.unifiedModulesHost.fileNameToModuleName(via.fileName, via.fileName);
610
+ return new ExternalExpr2({ moduleName, name: this.aliasName(decl, via) });
611
+ }
612
+ aliasName(decl, context) {
613
+ const declModule = this.unifiedModulesHost.fileNameToModuleName(decl.getSourceFile().fileName, context.fileName);
614
+ const replaced = declModule.replace(CHARS_TO_ESCAPE, "_").replace(/\//g, "$");
615
+ return "\u0275ng$" + replaced + "$$" + decl.name.text;
616
+ }
617
+ };
618
+ var PrivateExportAliasingHost = class {
619
+ constructor(host) {
620
+ this.host = host;
621
+ this.aliasExportsInDts = true;
622
+ }
623
+ maybeAliasSymbolAs(ref, context, ngModuleName) {
624
+ if (ref.hasOwningModuleGuess) {
625
+ return null;
626
+ }
627
+ const exports = this.host.getExportsOfModule(context);
628
+ if (exports === null) {
629
+ throw new Error(`Could not determine the exports of: ${context.fileName}`);
630
+ }
631
+ let found = false;
632
+ exports.forEach((value) => {
633
+ if (value.node === ref.node) {
634
+ found = true;
635
+ }
636
+ });
637
+ if (found) {
638
+ return null;
639
+ }
640
+ return `\u0275ngExport\u0275${ngModuleName}\u0275${ref.node.name.text}`;
641
+ }
642
+ getAliasIn() {
643
+ return null;
644
+ }
645
+ };
646
+ var AliasStrategy = class {
647
+ emit(ref, context, importMode) {
648
+ if (importMode & ImportFlags.NoAliasing || ref.alias === null) {
649
+ return null;
650
+ }
651
+ return {
652
+ kind: 0,
653
+ expression: ref.alias,
654
+ importedFile: "unknown"
655
+ };
656
+ }
657
+ };
658
+
659
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/path.mjs
660
+ function relativePathBetween(from, to) {
661
+ const relativePath = stripExtension(relative(dirname(resolve(from)), resolve(to)));
662
+ return relativePath !== "" ? toRelativeImport(relativePath) : null;
663
+ }
664
+ function normalizeSeparators(path) {
665
+ return path.replace(/\\/g, "/");
666
+ }
667
+
668
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/core.mjs
669
+ var NoopImportRewriter = class {
670
+ shouldImportSymbol(symbol, specifier) {
671
+ return true;
672
+ }
673
+ rewriteSymbol(symbol, specifier) {
674
+ return symbol;
675
+ }
676
+ rewriteSpecifier(specifier, inContextOfFile) {
677
+ return specifier;
678
+ }
679
+ };
680
+ var CORE_SUPPORTED_SYMBOLS = /* @__PURE__ */ new Map([
681
+ ["\u0275\u0275defineInjectable", "\u0275\u0275defineInjectable"],
682
+ ["\u0275\u0275defineInjector", "\u0275\u0275defineInjector"],
683
+ ["\u0275\u0275defineNgModule", "\u0275\u0275defineNgModule"],
684
+ ["\u0275\u0275setNgModuleScope", "\u0275\u0275setNgModuleScope"],
685
+ ["\u0275\u0275inject", "\u0275\u0275inject"],
686
+ ["\u0275\u0275FactoryDeclaration", "\u0275\u0275FactoryDeclaration"],
687
+ ["\u0275setClassMetadata", "setClassMetadata"],
688
+ ["\u0275\u0275InjectableDeclaration", "\u0275\u0275InjectableDeclaration"],
689
+ ["\u0275\u0275InjectorDeclaration", "\u0275\u0275InjectorDeclaration"],
690
+ ["\u0275\u0275NgModuleDeclaration", "\u0275\u0275NgModuleDeclaration"],
691
+ ["\u0275NgModuleFactory", "NgModuleFactory"],
692
+ ["\u0275noSideEffects", "\u0275noSideEffects"]
693
+ ]);
694
+ var CORE_MODULE = "@angular/core";
695
+ var R3SymbolsImportRewriter = class {
696
+ constructor(r3SymbolsPath) {
697
+ this.r3SymbolsPath = r3SymbolsPath;
698
+ }
699
+ shouldImportSymbol(symbol, specifier) {
700
+ return true;
701
+ }
702
+ rewriteSymbol(symbol, specifier) {
703
+ if (specifier !== CORE_MODULE) {
704
+ return symbol;
705
+ }
706
+ return validateAndRewriteCoreSymbol(symbol);
707
+ }
708
+ rewriteSpecifier(specifier, inContextOfFile) {
709
+ if (specifier !== CORE_MODULE) {
710
+ return specifier;
711
+ }
712
+ const relativePathToR3Symbols = relativePathBetween(inContextOfFile, this.r3SymbolsPath);
713
+ if (relativePathToR3Symbols === null) {
714
+ throw new Error(`Failed to rewrite import inside ${CORE_MODULE}: ${inContextOfFile} -> ${this.r3SymbolsPath}`);
715
+ }
716
+ return relativePathToR3Symbols;
717
+ }
718
+ };
719
+ function validateAndRewriteCoreSymbol(name) {
720
+ if (!CORE_SUPPORTED_SYMBOLS.has(name)) {
721
+ throw new Error(`Importing unexpected symbol ${name} while compiling ${CORE_MODULE}`);
722
+ }
723
+ return CORE_SUPPORTED_SYMBOLS.get(name);
724
+ }
725
+
726
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/patch_alias_reference_resolution.mjs
727
+ import ts4 from "typescript";
728
+ var patchedReferencedAliasesSymbol = Symbol("patchedReferencedAliases");
729
+ function loadIsReferencedAliasDeclarationPatch(context) {
730
+ if (!isTransformationContextWithEmitResolver(context)) {
731
+ throwIncompatibleTransformationContextError();
732
+ }
733
+ const emitResolver = context.getEmitResolver();
734
+ const existingReferencedAliases = emitResolver[patchedReferencedAliasesSymbol];
735
+ if (existingReferencedAliases !== void 0) {
736
+ return existingReferencedAliases;
737
+ }
738
+ const originalIsReferencedAliasDeclaration = emitResolver.isReferencedAliasDeclaration;
739
+ if (originalIsReferencedAliasDeclaration === void 0) {
740
+ throwIncompatibleTransformationContextError();
741
+ }
742
+ const referencedAliases = /* @__PURE__ */ new Set();
743
+ emitResolver.isReferencedAliasDeclaration = function(node, ...args) {
744
+ if (isAliasImportDeclaration(node) && referencedAliases.has(node)) {
745
+ return true;
746
+ }
747
+ return originalIsReferencedAliasDeclaration.call(emitResolver, node, ...args);
748
+ };
749
+ return emitResolver[patchedReferencedAliasesSymbol] = referencedAliases;
750
+ }
751
+ function isAliasImportDeclaration(node) {
752
+ return ts4.isImportSpecifier(node) || ts4.isNamespaceImport(node) || ts4.isImportClause(node);
753
+ }
754
+ function isTransformationContextWithEmitResolver(context) {
755
+ return context.getEmitResolver !== void 0;
756
+ }
757
+ function throwIncompatibleTransformationContextError() {
758
+ throw Error("Angular compiler is incompatible with this version of the TypeScript compiler.\n\nIf you recently updated TypeScript and this issue surfaces now, consider downgrading.\n\nPlease report an issue on the Angular repositories when this issue surfaces and you are using a supposedly compatible TypeScript version.");
759
+ }
760
+
761
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/default.mjs
762
+ var DefaultImportDeclaration = Symbol("DefaultImportDeclaration");
763
+ function attachDefaultImportDeclaration(expr, importDecl) {
764
+ expr[DefaultImportDeclaration] = importDecl;
765
+ }
766
+ function getDefaultImportDeclaration(expr) {
767
+ var _a;
768
+ return (_a = expr[DefaultImportDeclaration]) != null ? _a : null;
769
+ }
770
+ var DefaultImportTracker = class {
771
+ constructor() {
772
+ this.sourceFileToUsedImports = /* @__PURE__ */ new Map();
773
+ }
774
+ recordUsedImport(importDecl) {
775
+ if (importDecl.importClause) {
776
+ const sf = getSourceFile(importDecl);
777
+ if (!this.sourceFileToUsedImports.has(sf.fileName)) {
778
+ this.sourceFileToUsedImports.set(sf.fileName, /* @__PURE__ */ new Set());
779
+ }
780
+ this.sourceFileToUsedImports.get(sf.fileName).add(importDecl.importClause);
781
+ }
782
+ }
783
+ importPreservingTransformer() {
784
+ return (context) => {
785
+ let clausesToPreserve = null;
786
+ return (sourceFile) => {
787
+ const clausesForFile = this.sourceFileToUsedImports.get(sourceFile.fileName);
788
+ if (clausesForFile !== void 0) {
789
+ for (const clause of clausesForFile) {
790
+ if (clausesToPreserve === null) {
791
+ clausesToPreserve = loadIsReferencedAliasDeclarationPatch(context);
792
+ }
793
+ clausesToPreserve.add(clause);
794
+ }
795
+ }
796
+ return sourceFile;
797
+ };
798
+ };
799
+ }
800
+ };
801
+
802
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/resolver.mjs
803
+ var ModuleResolver = class {
804
+ constructor(program, compilerOptions, host, moduleResolutionCache) {
805
+ this.program = program;
806
+ this.compilerOptions = compilerOptions;
807
+ this.host = host;
808
+ this.moduleResolutionCache = moduleResolutionCache;
809
+ }
810
+ resolveModule(moduleName, containingFile) {
811
+ const resolved = resolveModuleName(moduleName, containingFile, this.compilerOptions, this.host, this.moduleResolutionCache);
812
+ if (resolved === void 0) {
813
+ return null;
814
+ }
815
+ return getSourceFileOrNull(this.program, absoluteFrom(resolved.resolvedFileName));
816
+ }
817
+ };
818
+
819
+ export {
820
+ ErrorCode,
821
+ COMPILER_ERRORS_WITH_GUIDES,
822
+ replaceTsWithNgInErrors,
823
+ ngErrorCode,
824
+ FatalDiagnosticError,
825
+ makeDiagnostic,
826
+ makeDiagnosticChain,
827
+ makeRelatedInformation,
828
+ addDiagnosticChain,
829
+ isFatalDiagnosticError,
830
+ ERROR_DETAILS_PAGE_BASE_URL,
831
+ ExtendedTemplateDiagnosticName,
832
+ isSymbolWithValueDeclaration,
833
+ isDtsPath,
834
+ isNonDeclarationTsPath,
835
+ isFromDtsFile,
836
+ nodeNameForError,
837
+ getSourceFile,
838
+ getSourceFileOrNull,
839
+ getTokenAtPosition,
840
+ identifierOfNode,
841
+ isDeclaration,
842
+ getRootDirs,
843
+ nodeDebugInfo,
844
+ isAssignment,
845
+ toUnredirectedSourceFile,
846
+ ImportFlags,
847
+ assertSuccessfulReferenceEmit,
848
+ ReferenceEmitter,
849
+ LocalIdentifierStrategy,
850
+ AbsoluteModuleStrategy,
851
+ LogicalProjectStrategy,
852
+ RelativePathStrategy,
853
+ UnifiedModulesStrategy,
854
+ UnifiedModulesAliasingHost,
855
+ PrivateExportAliasingHost,
856
+ AliasStrategy,
857
+ relativePathBetween,
858
+ normalizeSeparators,
859
+ NoopImportRewriter,
860
+ R3SymbolsImportRewriter,
861
+ validateAndRewriteCoreSymbol,
862
+ loadIsReferencedAliasDeclarationPatch,
863
+ isAliasImportDeclaration,
864
+ attachDefaultImportDeclaration,
865
+ getDefaultImportDeclaration,
866
+ DefaultImportTracker,
867
+ Reference,
868
+ ModuleResolver
869
+ };
870
+ /**
871
+ * @license
872
+ * Copyright Google LLC All Rights Reserved.
873
+ *
874
+ * Use of this source code is governed by an MIT-style license that can be
875
+ * found in the LICENSE file at https://angular.io/license
876
+ */
877
+ //# sourceMappingURL=chunk-ZCBRXUPO.js.map