@angular/core 14.0.0-next.1 → 14.0.0-next.12

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 (88) hide show
  1. package/core.d.ts +172 -126
  2. package/esm2020/src/application_init.mjs +4 -3
  3. package/esm2020/src/application_module.mjs +5 -104
  4. package/esm2020/src/application_ref.mjs +6 -24
  5. package/esm2020/src/application_tokens.mjs +14 -2
  6. package/esm2020/src/change_detection/change_detection.mjs +2 -3
  7. package/esm2020/src/compiler/compiler_facade_interface.mjs +1 -1
  8. package/esm2020/src/core.mjs +2 -2
  9. package/esm2020/src/core_private_export.mjs +2 -1
  10. package/esm2020/src/core_render3_private_export.mjs +4 -3
  11. package/esm2020/src/debug/debug_node.mjs +137 -53
  12. package/esm2020/src/di/injector_compatibility.mjs +2 -2
  13. package/esm2020/src/di/reflective_provider.mjs +4 -4
  14. package/esm2020/src/i18n/tokens.mjs +39 -3
  15. package/esm2020/src/linker/compiler.mjs +4 -3
  16. package/esm2020/src/linker/ng_module_factory_loader.mjs +2 -2
  17. package/esm2020/src/linker/ng_module_registration.mjs +55 -0
  18. package/esm2020/src/linker/template_ref.mjs +3 -3
  19. package/esm2020/src/linker/view_container_ref.mjs +35 -8
  20. package/esm2020/src/reflection/platform_reflection_capabilities.mjs +1 -1
  21. package/esm2020/src/reflection/reflection_capabilities.mjs +1 -37
  22. package/esm2020/src/render3/component.mjs +3 -3
  23. package/esm2020/src/render3/component_ref.mjs +22 -26
  24. package/esm2020/src/render3/context_discovery.mjs +34 -30
  25. package/esm2020/src/render3/definition.mjs +3 -1
  26. package/esm2020/src/render3/di.mjs +177 -97
  27. package/esm2020/src/render3/hooks.mjs +3 -3
  28. package/esm2020/src/render3/i18n/i18n_parse.mjs +3 -3
  29. package/esm2020/src/render3/index.mjs +2 -2
  30. package/esm2020/src/render3/instructions/element.mjs +28 -7
  31. package/esm2020/src/render3/instructions/element_container.mjs +7 -1
  32. package/esm2020/src/render3/instructions/lview_debug.mjs +7 -4
  33. package/esm2020/src/render3/instructions/shared.mjs +50 -21
  34. package/esm2020/src/render3/interfaces/context.mjs +35 -2
  35. package/esm2020/src/render3/interfaces/definition.mjs +1 -1
  36. package/esm2020/src/render3/interfaces/injector.mjs +1 -1
  37. package/esm2020/src/render3/interfaces/lview_tracking.mjs +33 -0
  38. package/esm2020/src/render3/interfaces/renderer_dom.mjs +1 -1
  39. package/esm2020/src/render3/interfaces/view.mjs +4 -2
  40. package/esm2020/src/render3/jit/directive.mjs +5 -2
  41. package/esm2020/src/render3/jit/environment.mjs +4 -1
  42. package/esm2020/src/render3/jit/module.mjs +7 -1
  43. package/esm2020/src/render3/jit/module_patch.mjs +11 -0
  44. package/esm2020/src/render3/jit/pipe.mjs +5 -2
  45. package/esm2020/src/render3/ng_module_ref.mjs +1 -29
  46. package/esm2020/src/render3/node_manipulation.mjs +12 -3
  47. package/esm2020/src/render3/state.mjs +16 -2
  48. package/esm2020/src/render3/styling/styling_parser.mjs +2 -2
  49. package/esm2020/src/render3/util/discovery_utils.mjs +33 -22
  50. package/esm2020/src/util/coercion.mjs +12 -0
  51. package/esm2020/src/version.mjs +1 -1
  52. package/esm2020/testing/src/fake_async.mjs +3 -2
  53. package/esm2020/testing/src/logger.mjs +3 -3
  54. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  55. package/esm2020/testing/src/r3_test_bed.mjs +8 -2
  56. package/fesm2015/core.mjs +784 -591
  57. package/fesm2015/core.mjs.map +1 -1
  58. package/fesm2015/testing.mjs +10 -3
  59. package/fesm2015/testing.mjs.map +1 -1
  60. package/fesm2020/core.mjs +784 -584
  61. package/fesm2020/core.mjs.map +1 -1
  62. package/fesm2020/testing.mjs +10 -3
  63. package/fesm2020/testing.mjs.map +1 -1
  64. package/package.json +2 -2
  65. package/schematics/migrations/entry-components/util.js +2 -2
  66. package/schematics/migrations/path-match-type/index.d.ts +11 -0
  67. package/schematics/migrations/path-match-type/index.js +95 -0
  68. package/schematics/migrations/path-match-type/transform.d.ts +19 -0
  69. package/schematics/migrations/path-match-type/transform.js +48 -0
  70. package/schematics/migrations/path-match-type/update_recorder.d.ts +18 -0
  71. package/schematics/migrations/path-match-type/update_recorder.js +20 -0
  72. package/schematics/migrations/path-match-type/util.d.ts +11 -0
  73. package/schematics/migrations/path-match-type/util.js +106 -0
  74. package/schematics/migrations/typed-forms/index.d.ts +1 -5
  75. package/schematics/migrations/typed-forms/index.js +12 -34
  76. package/schematics/migrations/typed-forms/util.d.ts +8 -10
  77. package/schematics/migrations/typed-forms/util.js +99 -47
  78. package/schematics/migrations.json +8 -3
  79. package/schematics/utils/import_manager.js +11 -22
  80. package/schematics/utils/typescript/imports.js +5 -9
  81. package/schematics/utils/typescript/parse_tsconfig.js +6 -2
  82. package/schematics/utils/typescript/symbol.js +4 -3
  83. package/testing/testing.d.ts +3 -2
  84. package/esm2020/src/di/util.mjs +0 -51
  85. package/esm2020/src/linker/ng_module_factory_registration.mjs +0 -59
  86. package/esm2020/src/reflection/reflection.mjs +0 -16
  87. package/esm2020/src/reflection/reflector.mjs +0 -56
  88. package/esm2020/src/reflection/types.mjs +0 -9
package/fesm2020/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.1
2
+ * @license Angular v14.0.0-next.12
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -905,6 +905,7 @@ function ɵɵdefineComponent(componentDefinition) {
905
905
  onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
906
906
  directiveDefs: null,
907
907
  pipeDefs: null,
908
+ standalone: componentDefinition.standalone === true,
908
909
  selectors: componentDefinition.selectors || EMPTY_ARRAY,
909
910
  viewQuery: componentDefinition.viewQuery || null,
910
911
  features: componentDefinition.features || null,
@@ -1116,6 +1117,7 @@ function ɵɵdefinePipe(pipeDef) {
1116
1117
  name: pipeDef.name,
1117
1118
  factory: null,
1118
1119
  pure: pipeDef.pure !== false,
1120
+ standalone: pipeDef.standalone === true,
1119
1121
  onDestroy: pipeDef.type.prototype.ngOnDestroy || null
1120
1122
  };
1121
1123
  }
@@ -1172,6 +1174,8 @@ const DECLARATION_COMPONENT_VIEW = 16;
1172
1174
  const DECLARATION_LCONTAINER = 17;
1173
1175
  const PREORDER_HOOK_FLAGS = 18;
1174
1176
  const QUERIES = 19;
1177
+ const ID = 20;
1178
+ const EMBEDDED_VIEW_INJECTOR = 21;
1175
1179
  /**
1176
1180
  * Size of LView's header. Necessary to adjust for it when setting slots.
1177
1181
  *
@@ -1179,7 +1183,7 @@ const QUERIES = 19;
1179
1183
  * instruction index into `LView` index. All other indexes should be in the `LView` index space and
1180
1184
  * there should be no need to refer to `HEADER_OFFSET` anywhere else.
1181
1185
  */
1182
- const HEADER_OFFSET = 20;
1186
+ const HEADER_OFFSET = 22;
1183
1187
  /**
1184
1188
  * Converts `TViewType` into human readable text.
1185
1189
  * Make sure this matches with `TViewType`
@@ -1928,6 +1932,7 @@ function getLView() {
1928
1932
  function getTView() {
1929
1933
  return instructionState.lFrame.tView;
1930
1934
  }
1935
+ // TODO(crisbeto): revert the @noinline once Closure issue is resolved.
1931
1936
  /**
1932
1937
  * Restores `contextViewData` to the given OpaqueViewState instance.
1933
1938
  *
@@ -1939,11 +1944,22 @@ function getTView() {
1939
1944
  * @returns Context of the restored OpaqueViewState instance.
1940
1945
  *
1941
1946
  * @codeGenApi
1947
+ * @noinline Disable inlining due to issue with Closure in listeners inside embedded views.
1942
1948
  */
1943
1949
  function ɵɵrestoreView(viewToRestore) {
1944
1950
  instructionState.lFrame.contextLView = viewToRestore;
1945
1951
  return viewToRestore[CONTEXT];
1946
1952
  }
1953
+ /**
1954
+ * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
1955
+ * value so that it can be used as a return value of an instruction.
1956
+ *
1957
+ * @codeGenApi
1958
+ */
1959
+ function ɵɵresetView(value) {
1960
+ instructionState.lFrame.contextLView = null;
1961
+ return value;
1962
+ }
1947
1963
  function getCurrentTNode() {
1948
1964
  let currentTNode = getCurrentTNodePlaceholderOk();
1949
1965
  while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) {
@@ -1975,7 +1991,9 @@ function setCurrentTNodeAsParent() {
1975
1991
  instructionState.lFrame.isParent = true;
1976
1992
  }
1977
1993
  function getContextLView() {
1978
- return instructionState.lFrame.contextLView;
1994
+ const contextLView = instructionState.lFrame.contextLView;
1995
+ ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
1996
+ return contextLView;
1979
1997
  }
1980
1998
  function isInCheckNoChangesMode() {
1981
1999
  // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
@@ -2474,7 +2492,7 @@ function incrementInitPhaseFlags(lView, initPhase) {
2474
2492
  assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');
2475
2493
  let flags = lView[FLAGS];
2476
2494
  if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {
2477
- flags &= 2047 /* IndexWithinInitPhaseReset */;
2495
+ flags &= 4095 /* IndexWithinInitPhaseReset */;
2478
2496
  flags += 1 /* InitPhaseStateIncrementer */;
2479
2497
  lView[FLAGS] = flags;
2480
2498
  }
@@ -2538,12 +2556,12 @@ function callHook(currentView, initPhase, arr, i) {
2538
2556
  const directiveIndex = isInitHook ? -arr[i] : arr[i];
2539
2557
  const directive = currentView[directiveIndex];
2540
2558
  if (isInitHook) {
2541
- const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */;
2559
+ const indexWithintInitPhase = currentView[FLAGS] >> 12 /* IndexWithinInitPhaseShift */;
2542
2560
  // The init phase state must be always checked here as it may have been recursively updated.
2543
2561
  if (indexWithintInitPhase <
2544
2562
  (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&
2545
2563
  (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {
2546
- currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */;
2564
+ currentView[FLAGS] += 4096 /* IndexWithinInitPhaseIncrementer */;
2547
2565
  profiler(4 /* LifecycleHookStart */, directive, hook);
2548
2566
  try {
2549
2567
  hook.call(directive);
@@ -3104,6 +3122,8 @@ const BLOOM_MASK = BLOOM_SIZE - 1;
3104
3122
  const BLOOM_BUCKET_BITS = 5;
3105
3123
  /** Counter used to generate unique IDs for directives. */
3106
3124
  let nextNgElementId = 0;
3125
+ /** Value used when something wasn't found by an injector. */
3126
+ const NOT_FOUND = {};
3107
3127
  /**
3108
3128
  * Registers this directive as present in its node's injector by flipping the directive's
3109
3129
  * corresponding bit in the injector's bloom filter.
@@ -3215,23 +3235,7 @@ function getParentInjectorLocation(tNode, lView) {
3215
3235
  // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent
3216
3236
  // `NodeInjector`.
3217
3237
  while (lViewCursor !== null) {
3218
- // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.
3219
- const tView = lViewCursor[TVIEW];
3220
- const tViewType = tView.type;
3221
- if (tViewType === 2 /* Embedded */) {
3222
- ngDevMode &&
3223
- assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
3224
- parentTNode = tView.declTNode;
3225
- }
3226
- else if (tViewType === 1 /* Component */) {
3227
- // Components don't have `TView.declTNode` because each instance of component could be
3228
- // inserted in different location, hence `TView.declTNode` is meaningless.
3229
- parentTNode = lViewCursor[T_HOST];
3230
- }
3231
- else {
3232
- ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');
3233
- parentTNode = null;
3234
- }
3238
+ parentTNode = getTNodeFromLView(lViewCursor);
3235
3239
  if (parentTNode === null) {
3236
3240
  // If we have no parent, than we are done.
3237
3241
  return NO_PARENT_INJECTOR;
@@ -3392,93 +3396,116 @@ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
3392
3396
  */
3393
3397
  function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {
3394
3398
  if (tNode !== null) {
3395
- const bloomHash = bloomHashBitOrFactory(token);
3396
- // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
3397
- // so just call the factory function to create it.
3398
- if (typeof bloomHash === 'function') {
3399
- if (!enterDI(lView, tNode, flags)) {
3400
- // Failed to enter DI, try module injector instead. If a token is injected with the @Host
3401
- // flag, the module injector is not searched for that token in Ivy.
3402
- return (flags & InjectFlags.Host) ?
3403
- notFoundValueOrThrow(notFoundValue, token, flags) :
3404
- lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3399
+ // If the view or any of its ancestors have an embedded
3400
+ // view injector, we have to look it up there first.
3401
+ if (lView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) {
3402
+ const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);
3403
+ if (embeddedInjectorValue !== NOT_FOUND) {
3404
+ return embeddedInjectorValue;
3405
3405
  }
3406
- try {
3407
- const value = bloomHash(flags);
3408
- if (value == null && !(flags & InjectFlags.Optional)) {
3409
- throwProviderNotFoundError(token);
3410
- }
3411
- else {
3412
- return value;
3413
- }
3406
+ }
3407
+ // Otherwise try the node injector.
3408
+ const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);
3409
+ if (value !== NOT_FOUND) {
3410
+ return value;
3411
+ }
3412
+ }
3413
+ // Finally, fall back to the module injector.
3414
+ return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3415
+ }
3416
+ /**
3417
+ * Returns the value associated to the given token from the node injector.
3418
+ *
3419
+ * @param tNode The Node where the search for the injector should start
3420
+ * @param lView The `LView` that contains the `tNode`
3421
+ * @param token The token to look for
3422
+ * @param flags Injection flags
3423
+ * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
3424
+ * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
3425
+ */
3426
+ function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
3427
+ const bloomHash = bloomHashBitOrFactory(token);
3428
+ // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
3429
+ // so just call the factory function to create it.
3430
+ if (typeof bloomHash === 'function') {
3431
+ if (!enterDI(lView, tNode, flags)) {
3432
+ // Failed to enter DI, try module injector instead. If a token is injected with the @Host
3433
+ // flag, the module injector is not searched for that token in Ivy.
3434
+ return (flags & InjectFlags.Host) ?
3435
+ notFoundValueOrThrow(notFoundValue, token, flags) :
3436
+ lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3437
+ }
3438
+ try {
3439
+ const value = bloomHash(flags);
3440
+ if (value == null && !(flags & InjectFlags.Optional)) {
3441
+ throwProviderNotFoundError(token);
3414
3442
  }
3415
- finally {
3416
- leaveDI();
3417
- }
3418
- }
3419
- else if (typeof bloomHash === 'number') {
3420
- // A reference to the previous injector TView that was found while climbing the element
3421
- // injector tree. This is used to know if viewProviders can be accessed on the current
3422
- // injector.
3423
- let previousTView = null;
3424
- let injectorIndex = getInjectorIndex(tNode, lView);
3425
- let parentLocation = NO_PARENT_INJECTOR;
3426
- let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
3427
- // If we should skip this injector, or if there is no injector on this node, start by
3428
- // searching the parent injector.
3429
- if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
3430
- parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
3431
- lView[injectorIndex + 8 /* PARENT */];
3432
- if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
3433
- injectorIndex = -1;
3434
- }
3435
- else {
3436
- previousTView = lView[TVIEW];
3437
- injectorIndex = getParentInjectorIndex(parentLocation);
3438
- lView = getParentInjectorView(parentLocation, lView);
3439
- }
3443
+ else {
3444
+ return value;
3440
3445
  }
3441
- // Traverse up the injector tree until we find a potential match or until we know there
3442
- // *isn't* a match.
3443
- while (injectorIndex !== -1) {
3444
- ngDevMode && assertNodeInjector(lView, injectorIndex);
3445
- // Check the current injector. If it matches, see if it contains token.
3446
- const tView = lView[TVIEW];
3447
- ngDevMode &&
3448
- assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
3449
- if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
3450
- // At this point, we have an injector which *may* contain the token, so we step through
3451
- // the providers and directives associated with the injector's corresponding node to get
3452
- // the instance.
3453
- const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
3454
- if (instance !== NOT_FOUND) {
3455
- return instance;
3456
- }
3457
- }
3458
- parentLocation = lView[injectorIndex + 8 /* PARENT */];
3459
- if (parentLocation !== NO_PARENT_INJECTOR &&
3460
- shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
3461
- bloomHasToken(bloomHash, injectorIndex, lView)) {
3462
- // The def wasn't found anywhere on this node, so it was a false positive.
3463
- // Traverse up the tree and continue searching.
3464
- previousTView = tView;
3465
- injectorIndex = getParentInjectorIndex(parentLocation);
3466
- lView = getParentInjectorView(parentLocation, lView);
3467
- }
3468
- else {
3469
- // If we should not search parent OR If the ancestor bloom filter value does not have the
3470
- // bit corresponding to the directive we can give up on traversing up to find the specific
3471
- // injector.
3472
- injectorIndex = -1;
3446
+ }
3447
+ finally {
3448
+ leaveDI();
3449
+ }
3450
+ }
3451
+ else if (typeof bloomHash === 'number') {
3452
+ // A reference to the previous injector TView that was found while climbing the element
3453
+ // injector tree. This is used to know if viewProviders can be accessed on the current
3454
+ // injector.
3455
+ let previousTView = null;
3456
+ let injectorIndex = getInjectorIndex(tNode, lView);
3457
+ let parentLocation = NO_PARENT_INJECTOR;
3458
+ let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
3459
+ // If we should skip this injector, or if there is no injector on this node, start by
3460
+ // searching the parent injector.
3461
+ if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
3462
+ parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
3463
+ lView[injectorIndex + 8 /* PARENT */];
3464
+ if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
3465
+ injectorIndex = -1;
3466
+ }
3467
+ else {
3468
+ previousTView = lView[TVIEW];
3469
+ injectorIndex = getParentInjectorIndex(parentLocation);
3470
+ lView = getParentInjectorView(parentLocation, lView);
3471
+ }
3472
+ }
3473
+ // Traverse up the injector tree until we find a potential match or until we know there
3474
+ // *isn't* a match.
3475
+ while (injectorIndex !== -1) {
3476
+ ngDevMode && assertNodeInjector(lView, injectorIndex);
3477
+ // Check the current injector. If it matches, see if it contains token.
3478
+ const tView = lView[TVIEW];
3479
+ ngDevMode &&
3480
+ assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
3481
+ if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
3482
+ // At this point, we have an injector which *may* contain the token, so we step through
3483
+ // the providers and directives associated with the injector's corresponding node to get
3484
+ // the instance.
3485
+ const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
3486
+ if (instance !== NOT_FOUND) {
3487
+ return instance;
3473
3488
  }
3474
3489
  }
3490
+ parentLocation = lView[injectorIndex + 8 /* PARENT */];
3491
+ if (parentLocation !== NO_PARENT_INJECTOR &&
3492
+ shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
3493
+ bloomHasToken(bloomHash, injectorIndex, lView)) {
3494
+ // The def wasn't found anywhere on this node, so it was a false positive.
3495
+ // Traverse up the tree and continue searching.
3496
+ previousTView = tView;
3497
+ injectorIndex = getParentInjectorIndex(parentLocation);
3498
+ lView = getParentInjectorView(parentLocation, lView);
3499
+ }
3500
+ else {
3501
+ // If we should not search parent OR If the ancestor bloom filter value does not have the
3502
+ // bit corresponding to the directive we can give up on traversing up to find the specific
3503
+ // injector.
3504
+ injectorIndex = -1;
3505
+ }
3475
3506
  }
3476
3507
  }
3477
- return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3478
- }
3479
- const NOT_FOUND = {};
3480
- function createNodeInjector() {
3481
- return new NodeInjector(getCurrentTNode(), getLView());
3508
+ return notFoundValue;
3482
3509
  }
3483
3510
  function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
3484
3511
  const currentTView = lView[TVIEW];
@@ -3652,6 +3679,10 @@ class NodeInjector {
3652
3679
  return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);
3653
3680
  }
3654
3681
  }
3682
+ /** Creates a `NodeInjector` for the current node. */
3683
+ function createNodeInjector() {
3684
+ return new NodeInjector(getCurrentTNode(), getLView());
3685
+ }
3655
3686
  /**
3656
3687
  * @codeGenApi
3657
3688
  */
@@ -3690,6 +3721,73 @@ function getFactoryOf(type) {
3690
3721
  }
3691
3722
  return getFactoryDef(type);
3692
3723
  }
3724
+ /**
3725
+ * Returns a value from the closest embedded or node injector.
3726
+ *
3727
+ * @param tNode The Node where the search for the injector should start
3728
+ * @param lView The `LView` that contains the `tNode`
3729
+ * @param token The token to look for
3730
+ * @param flags Injection flags
3731
+ * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
3732
+ * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
3733
+ */
3734
+ function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
3735
+ let currentTNode = tNode;
3736
+ let currentLView = lView;
3737
+ // When an LView with an embedded view injector is inserted, it'll likely be interlaced with
3738
+ // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).
3739
+ // Since the bloom filters for the node injectors have already been constructed and we don't
3740
+ // have a way of extracting the records from an injector, the only way to maintain the correct
3741
+ // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve
3742
+ // the token at each level.
3743
+ while (currentTNode !== null && currentLView !== null &&
3744
+ (currentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) &&
3745
+ !(currentLView[FLAGS] & 512 /* IsRoot */)) {
3746
+ ngDevMode && assertTNodeForLView(currentTNode, currentLView);
3747
+ // Note that this lookup on the node injector is using the `Self` flag, because
3748
+ // we don't want the node injector to look at any parent injectors since we
3749
+ // may hit the embedded view injector first.
3750
+ const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);
3751
+ if (nodeInjectorValue !== NOT_FOUND) {
3752
+ return nodeInjectorValue;
3753
+ }
3754
+ // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191
3755
+ let parentTNode = currentTNode.parent;
3756
+ // `TNode.parent` includes the parent within the current view only. If it doesn't exist,
3757
+ // it means that we've hit the view boundary and we need to go up to the next view.
3758
+ if (!parentTNode) {
3759
+ // Before we go to the next LView, check if the token exists on the current embedded injector.
3760
+ const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
3761
+ if (embeddedViewInjector) {
3762
+ const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);
3763
+ if (embeddedViewInjectorValue !== NOT_FOUND) {
3764
+ return embeddedViewInjectorValue;
3765
+ }
3766
+ }
3767
+ // Otherwise keep going up the tree.
3768
+ parentTNode = getTNodeFromLView(currentLView);
3769
+ currentLView = currentLView[DECLARATION_VIEW];
3770
+ }
3771
+ currentTNode = parentTNode;
3772
+ }
3773
+ return notFoundValue;
3774
+ }
3775
+ /** Gets the TNode associated with an LView inside of the declaration view. */
3776
+ function getTNodeFromLView(lView) {
3777
+ const tView = lView[TVIEW];
3778
+ const tViewType = tView.type;
3779
+ // The parent pointer differs based on `TView.type`.
3780
+ if (tViewType === 2 /* Embedded */) {
3781
+ ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
3782
+ return tView.declTNode;
3783
+ }
3784
+ else if (tViewType === 1 /* Component */) {
3785
+ // Components don't have `TView.declTNode` because each instance of component could be
3786
+ // inserted in different location, hence `TView.declTNode` is meaningless.
3787
+ return lView[T_HOST];
3788
+ }
3789
+ return null;
3790
+ }
3693
3791
 
3694
3792
  /**
3695
3793
  * @license
@@ -4513,9 +4611,6 @@ class ReflectionCapabilities {
4513
4611
  constructor(reflect) {
4514
4612
  this._reflect = reflect || _global['Reflect'];
4515
4613
  }
4516
- isReflectionEnabled() {
4517
- return true;
4518
- }
4519
4614
  factory(t) {
4520
4615
  return (...args) => new t(...args);
4521
4616
  }
@@ -4687,38 +4782,6 @@ class ReflectionCapabilities {
4687
4782
  hasLifecycleHook(type, lcProperty) {
4688
4783
  return type instanceof Type && lcProperty in type.prototype;
4689
4784
  }
4690
- guards(type) {
4691
- return {};
4692
- }
4693
- getter(name) {
4694
- return new Function('o', 'return o.' + name + ';');
4695
- }
4696
- setter(name) {
4697
- return new Function('o', 'v', 'return o.' + name + ' = v;');
4698
- }
4699
- method(name) {
4700
- const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined');
4701
- return o.${name}.apply(o, args);`;
4702
- return new Function('o', 'args', functionBody);
4703
- }
4704
- // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
4705
- importUri(type) {
4706
- // StaticSymbol
4707
- if (typeof type === 'object' && type['filePath']) {
4708
- return type['filePath'];
4709
- }
4710
- // Runtime type
4711
- return `./${stringify(type)}`;
4712
- }
4713
- resourceUri(type) {
4714
- return `./${stringify(type)}`;
4715
- }
4716
- resolveIdentifier(name, moduleUrl, members, runtime) {
4717
- return runtime;
4718
- }
4719
- resolveEnum(enumIdentifier, name) {
4720
- return enumIdentifier[name];
4721
- }
4722
4785
  }
4723
4786
  function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
4724
4787
  if (!decoratorInvocations) {
@@ -4906,7 +4969,7 @@ function catchInjectorError(e, token, injectorErrorName, source) {
4906
4969
  throw e;
4907
4970
  }
4908
4971
  function formatError(text, obj, injectorErrorName, source = null) {
4909
- text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;
4972
+ text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;
4910
4973
  let context = stringify(obj);
4911
4974
  if (Array.isArray(obj)) {
4912
4975
  context = obj.map(stringify).join(' -> ');
@@ -5165,6 +5228,60 @@ function componentDefResolved(type) {
5165
5228
  componentDefPendingResolution.delete(type);
5166
5229
  }
5167
5230
 
5231
+ /**
5232
+ * @license
5233
+ * Copyright Google LLC All Rights Reserved.
5234
+ *
5235
+ * Use of this source code is governed by an MIT-style license that can be
5236
+ * found in the LICENSE file at https://angular.io/license
5237
+ */
5238
+ /**
5239
+ * Map of module-id to the corresponding NgModule.
5240
+ */
5241
+ const modules = new Map();
5242
+ /**
5243
+ * Whether to check for duplicate NgModule registrations.
5244
+ *
5245
+ * This can be disabled for testing.
5246
+ */
5247
+ let checkForDuplicateNgModules = true;
5248
+ function assertSameOrNotExisting(id, type, incoming) {
5249
+ if (type && type !== incoming && checkForDuplicateNgModules) {
5250
+ throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
5251
+ }
5252
+ }
5253
+ /**
5254
+ * Adds the given NgModule type to Angular's NgModule registry.
5255
+ *
5256
+ * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in
5257
+ * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a
5258
+ * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be
5259
+ * fully resolved when it's registered.
5260
+ *
5261
+ * @codeGenApi
5262
+ */
5263
+ function registerNgModuleType(ngModuleType, id) {
5264
+ const existing = modules.get(id) || null;
5265
+ assertSameOrNotExisting(id, existing, ngModuleType);
5266
+ modules.set(id, ngModuleType);
5267
+ }
5268
+ function clearModulesForTest() {
5269
+ modules.clear();
5270
+ }
5271
+ function getRegisteredNgModuleType(id) {
5272
+ return modules.get(id);
5273
+ }
5274
+ /**
5275
+ * Control whether the NgModule registration system enforces that each NgModule type registered has
5276
+ * a unique id.
5277
+ *
5278
+ * This is useful for testing as the NgModule registry cannot be properly reset between tests with
5279
+ * Angular's current API.
5280
+ */
5281
+ function setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {
5282
+ checkForDuplicateNgModules = !allowDuplicates;
5283
+ }
5284
+
5168
5285
  /**
5169
5286
  * @license
5170
5287
  * Copyright Google LLC All Rights Reserved.
@@ -6170,6 +6287,78 @@ function getSanitizer() {
6170
6287
  return lView && lView[SANITIZER];
6171
6288
  }
6172
6289
 
6290
+ /**
6291
+ * @license
6292
+ * Copyright Google LLC All Rights Reserved.
6293
+ *
6294
+ * Use of this source code is governed by an MIT-style license that can be
6295
+ * found in the LICENSE file at https://angular.io/license
6296
+ */
6297
+ // Keeps track of the currently-active LViews.
6298
+ const TRACKED_LVIEWS = new Map();
6299
+ // Used for generating unique IDs for LViews.
6300
+ let uniqueIdCounter = 0;
6301
+ /** Gets a unique ID that can be assigned to an LView. */
6302
+ function getUniqueLViewId() {
6303
+ return uniqueIdCounter++;
6304
+ }
6305
+ /** Starts tracking an LView. */
6306
+ function registerLView(lView) {
6307
+ ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');
6308
+ TRACKED_LVIEWS.set(lView[ID], lView);
6309
+ }
6310
+ /** Gets an LView by its unique ID. */
6311
+ function getLViewById(id) {
6312
+ ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');
6313
+ return TRACKED_LVIEWS.get(id) || null;
6314
+ }
6315
+ /** Stops tracking an LView. */
6316
+ function unregisterLView(lView) {
6317
+ ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');
6318
+ TRACKED_LVIEWS.delete(lView[ID]);
6319
+ }
6320
+
6321
+ /**
6322
+ * @license
6323
+ * Copyright Google LLC All Rights Reserved.
6324
+ *
6325
+ * Use of this source code is governed by an MIT-style license that can be
6326
+ * found in the LICENSE file at https://angular.io/license
6327
+ */
6328
+ /**
6329
+ * The internal view context which is specific to a given DOM element, directive or
6330
+ * component instance. Each value in here (besides the LView and element node details)
6331
+ * can be present, null or undefined. If undefined then it implies the value has not been
6332
+ * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
6333
+ *
6334
+ * Each value will get filled when the respective value is examined within the getContext
6335
+ * function. The component, element and each directive instance will share the same instance
6336
+ * of the context.
6337
+ */
6338
+ class LContext {
6339
+ constructor(
6340
+ /**
6341
+ * ID of the component's parent view data.
6342
+ */
6343
+ lViewId,
6344
+ /**
6345
+ * The index instance of the node.
6346
+ */
6347
+ nodeIndex,
6348
+ /**
6349
+ * The instance of the DOM node that is attached to the lNode.
6350
+ */
6351
+ native) {
6352
+ this.lViewId = lViewId;
6353
+ this.nodeIndex = nodeIndex;
6354
+ this.native = native;
6355
+ }
6356
+ /** Component's parent view data. */
6357
+ get lView() {
6358
+ return getLViewById(this.lViewId);
6359
+ }
6360
+ }
6361
+
6173
6362
  /**
6174
6363
  * @license
6175
6364
  * Copyright Google LLC All Rights Reserved.
@@ -6202,7 +6391,7 @@ function getLContext(target) {
6202
6391
  if (mpValue) {
6203
6392
  // only when it's an array is it considered an LView instance
6204
6393
  // ... otherwise it's an already constructed LContext instance
6205
- if (Array.isArray(mpValue)) {
6394
+ if (isLView(mpValue)) {
6206
6395
  const lView = mpValue;
6207
6396
  let nodeIndex;
6208
6397
  let component = undefined;
@@ -6261,13 +6450,7 @@ function getLContext(target) {
6261
6450
  while (parent = parent.parentNode) {
6262
6451
  const parentContext = readPatchedData(parent);
6263
6452
  if (parentContext) {
6264
- let lView;
6265
- if (Array.isArray(parentContext)) {
6266
- lView = parentContext;
6267
- }
6268
- else {
6269
- lView = parentContext.lView;
6270
- }
6453
+ const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;
6271
6454
  // the edge of the app was also reached here through another means
6272
6455
  // (maybe because the DOM was changed manually).
6273
6456
  if (!lView) {
@@ -6290,14 +6473,7 @@ function getLContext(target) {
6290
6473
  * Creates an empty instance of a `LContext` context
6291
6474
  */
6292
6475
  function createLContext(lView, nodeIndex, native) {
6293
- return {
6294
- lView,
6295
- nodeIndex,
6296
- native,
6297
- component: undefined,
6298
- directives: undefined,
6299
- localRefs: undefined,
6300
- };
6476
+ return new LContext(lView[ID], nodeIndex, native);
6301
6477
  }
6302
6478
  /**
6303
6479
  * Takes a component instance and returns the view for that component.
@@ -6306,21 +6482,24 @@ function createLContext(lView, nodeIndex, native) {
6306
6482
  * @returns The component's view
6307
6483
  */
6308
6484
  function getComponentViewByInstance(componentInstance) {
6309
- let lView = readPatchedData(componentInstance);
6310
- let view;
6311
- if (Array.isArray(lView)) {
6312
- const nodeIndex = findViaComponent(lView, componentInstance);
6313
- view = getComponentLViewByIndex(nodeIndex, lView);
6314
- const context = createLContext(lView, nodeIndex, view[HOST]);
6485
+ let patchedData = readPatchedData(componentInstance);
6486
+ let lView;
6487
+ if (isLView(patchedData)) {
6488
+ const contextLView = patchedData;
6489
+ const nodeIndex = findViaComponent(contextLView, componentInstance);
6490
+ lView = getComponentLViewByIndex(nodeIndex, contextLView);
6491
+ const context = createLContext(contextLView, nodeIndex, lView[HOST]);
6315
6492
  context.component = componentInstance;
6316
6493
  attachPatchData(componentInstance, context);
6317
6494
  attachPatchData(context.native, context);
6318
6495
  }
6319
6496
  else {
6320
- const context = lView;
6321
- view = getComponentLViewByIndex(context.nodeIndex, context.lView);
6497
+ const context = patchedData;
6498
+ const contextLView = context.lView;
6499
+ ngDevMode && assertLView(contextLView);
6500
+ lView = getComponentLViewByIndex(context.nodeIndex, contextLView);
6322
6501
  }
6323
- return view;
6502
+ return lView;
6324
6503
  }
6325
6504
  /**
6326
6505
  * This property will be monkey-patched on elements, components and directives.
@@ -6332,7 +6511,16 @@ const MONKEY_PATCH_KEY_NAME = '__ngContext__';
6332
6511
  */
6333
6512
  function attachPatchData(target, data) {
6334
6513
  ngDevMode && assertDefined(target, 'Target expected');
6335
- target[MONKEY_PATCH_KEY_NAME] = data;
6514
+ // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this
6515
+ // for `LView`, because we have control over when an `LView` is created and destroyed, whereas
6516
+ // we can't know when to remove an `LContext`.
6517
+ if (isLView(data)) {
6518
+ target[MONKEY_PATCH_KEY_NAME] = data[ID];
6519
+ registerLView(data);
6520
+ }
6521
+ else {
6522
+ target[MONKEY_PATCH_KEY_NAME] = data;
6523
+ }
6336
6524
  }
6337
6525
  /**
6338
6526
  * Returns the monkey-patch value data present on the target (which could be
@@ -6340,12 +6528,13 @@ function attachPatchData(target, data) {
6340
6528
  */
6341
6529
  function readPatchedData(target) {
6342
6530
  ngDevMode && assertDefined(target, 'Target expected');
6343
- return target[MONKEY_PATCH_KEY_NAME] || null;
6531
+ const data = target[MONKEY_PATCH_KEY_NAME];
6532
+ return (typeof data === 'number') ? getLViewById(data) : data || null;
6344
6533
  }
6345
6534
  function readPatchedLView(target) {
6346
6535
  const value = readPatchedData(target);
6347
6536
  if (value) {
6348
- return Array.isArray(value) ? value : value.lView;
6537
+ return isLView(value) ? value : value.lView;
6349
6538
  }
6350
6539
  return null;
6351
6540
  }
@@ -7292,6 +7481,8 @@ function cleanUpView(tView, lView) {
7292
7481
  lQueries.detachView(tView);
7293
7482
  }
7294
7483
  }
7484
+ // Unregister the view once everything else has been cleaned up.
7485
+ unregisterLView(lView);
7295
7486
  }
7296
7487
  }
7297
7488
  /** Removes listeners and unsubscribes from output subscriptions */
@@ -7459,7 +7650,8 @@ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
7459
7650
  renderer.insertBefore(parent, child, beforeNode, isMove);
7460
7651
  }
7461
7652
  else {
7462
- parent.insertBefore(child, beforeNode, isMove);
7653
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7654
+ targetParent.insertBefore(child, beforeNode, isMove);
7463
7655
  }
7464
7656
  }
7465
7657
  function nativeAppendChild(renderer, parent, child) {
@@ -7469,7 +7661,8 @@ function nativeAppendChild(renderer, parent, child) {
7469
7661
  renderer.appendChild(parent, child);
7470
7662
  }
7471
7663
  else {
7472
- parent.appendChild(child);
7664
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7665
+ targetParent.appendChild(child);
7473
7666
  }
7474
7667
  }
7475
7668
  function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
@@ -7489,6 +7682,10 @@ function nativeRemoveChild(renderer, parent, child, isHostElement) {
7489
7682
  parent.removeChild(child);
7490
7683
  }
7491
7684
  }
7685
+ /** Checks if an element is a `<template>` node. */
7686
+ function isTemplateNode(node) {
7687
+ return node.tagName === 'TEMPLATE' && node.content !== undefined;
7688
+ }
7492
7689
  /**
7493
7690
  * Returns a native parent of a given native node.
7494
7691
  */
@@ -8658,7 +8855,7 @@ function nameSuffix(text) {
8658
8855
  if (text == null)
8659
8856
  return '';
8660
8857
  const index = text.lastIndexOf('_Template');
8661
- return '_' + (index === -1 ? text : text.substr(0, index));
8858
+ return '_' + (index === -1 ? text : text.slice(0, index));
8662
8859
  }
8663
8860
  /**
8664
8861
  * This class is a debug version of Object literal so that we can have constructor name show up
@@ -9009,7 +9206,7 @@ class LViewDebug {
9009
9206
  attached: !!(flags & 128 /* Attached */),
9010
9207
  destroyed: !!(flags & 256 /* Destroyed */),
9011
9208
  isRoot: !!(flags & 512 /* IsRoot */),
9012
- indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */,
9209
+ indexWithinInitPhase: flags >> 12 /* IndexWithinInitPhaseShift */,
9013
9210
  };
9014
9211
  }
9015
9212
  get parent() {
@@ -9072,6 +9269,9 @@ class LViewDebug {
9072
9269
  get tHost() {
9073
9270
  return this._raw_lView[T_HOST];
9074
9271
  }
9272
+ get id() {
9273
+ return this._raw_lView[ID];
9274
+ }
9075
9275
  get decls() {
9076
9276
  return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
9077
9277
  }
@@ -9301,10 +9501,14 @@ function renderChildComponents(hostLView, components) {
9301
9501
  renderComponent$1(hostLView, components[i]);
9302
9502
  }
9303
9503
  }
9304
- function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
9504
+ function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
9305
9505
  const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
9306
9506
  lView[HOST] = host;
9307
9507
  lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;
9508
+ if (embeddedViewInjector !== null ||
9509
+ (parentLView && (parentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */))) {
9510
+ lView[FLAGS] |= 2048 /* HasEmbeddedViewInjector */;
9511
+ }
9308
9512
  resetPreOrderHookFlags(lView);
9309
9513
  ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
9310
9514
  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
@@ -9316,6 +9520,8 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
9316
9520
  lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;
9317
9521
  lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;
9318
9522
  lView[T_HOST] = tHostNode;
9523
+ lView[ID] = getUniqueLViewId();
9524
+ lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
9319
9525
  ngDevMode &&
9320
9526
  assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
9321
9527
  lView[DECLARATION_COMPONENT_VIEW] =
@@ -10046,9 +10252,9 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
10046
10252
  propName = mapPropName(propName);
10047
10253
  if (ngDevMode) {
10048
10254
  validateAgainstEventProperties(propName);
10049
- if (!validateProperty(tView, element, propName, tNode)) {
10255
+ if (!validateProperty(element, tNode.value, propName, tView.schemas)) {
10050
10256
  // Return here since we only log warnings for unknown properties.
10051
- logUnknownPropertyError(propName, tNode);
10257
+ logUnknownPropertyError(propName, tNode.value);
10052
10258
  return;
10053
10259
  }
10054
10260
  ngDevMode.rendererSetProperty++;
@@ -10067,8 +10273,8 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
10067
10273
  else if (tNode.type & 12 /* AnyContainer */) {
10068
10274
  // If the node is a container and the property didn't
10069
10275
  // match any of the inputs or schemas we should throw.
10070
- if (ngDevMode && !matchingSchemas(tView, tNode.value)) {
10071
- logUnknownPropertyError(propName, tNode);
10276
+ if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {
10277
+ logUnknownPropertyError(propName, tNode.value);
10072
10278
  }
10073
10279
  }
10074
10280
  }
@@ -10120,24 +10326,44 @@ function setNgReflectProperties(lView, element, type, dataValue, value) {
10120
10326
  }
10121
10327
  }
10122
10328
  }
10123
- function validateProperty(tView, element, propName, tNode) {
10329
+ /**
10330
+ * Validates that the property of the element is known at runtime and returns
10331
+ * false if it's not the case.
10332
+ * This check is relevant for JIT-compiled components (for AOT-compiled
10333
+ * ones this check happens at build time).
10334
+ *
10335
+ * The property is considered known if either:
10336
+ * - it's a known property of the element
10337
+ * - the element is allowed by one of the schemas
10338
+ * - the property is used for animations
10339
+ *
10340
+ * @param element Element to validate
10341
+ * @param tagName Name of the tag to check
10342
+ * @param propName Name of the property to check
10343
+ * @param schemas Array of schemas
10344
+ */
10345
+ function validateProperty(element, tagName, propName, schemas) {
10124
10346
  // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
10125
10347
  // mode where this check happens at compile time. In JIT mode, `schemas` is always present and
10126
10348
  // defined as an array (as an empty array in case `schemas` field is not defined) and we should
10127
10349
  // execute the check below.
10128
- if (tView.schemas === null)
10350
+ if (schemas === null)
10129
10351
  return true;
10130
- // The property is considered valid if the element matches the schema, it exists on the element
10352
+ // The property is considered valid if the element matches the schema, it exists on the element,
10131
10353
  // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).
10132
- if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {
10354
+ if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
10133
10355
  return true;
10134
10356
  }
10135
10357
  // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we
10136
- // need to account for both here, while being careful for `typeof null` also returning 'object'.
10358
+ // need to account for both here, while being careful with `typeof null` also returning 'object'.
10137
10359
  return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
10138
10360
  }
10139
- function matchingSchemas(tView, tagName) {
10140
- const schemas = tView.schemas;
10361
+ /**
10362
+ * Returns true if the tag name is allowed by specified schemas.
10363
+ * @param schemas Array of schemas
10364
+ * @param tagName Name of the tag
10365
+ */
10366
+ function matchingSchemas(schemas, tagName) {
10141
10367
  if (schemas !== null) {
10142
10368
  for (let i = 0; i < schemas.length; i++) {
10143
10369
  const schema = schemas[i];
@@ -10152,10 +10378,10 @@ function matchingSchemas(tView, tagName) {
10152
10378
  /**
10153
10379
  * Logs an error that a property is not supported on an element.
10154
10380
  * @param propName Name of the invalid property.
10155
- * @param tNode Node on which we encountered the property.
10381
+ * @param tagName Name of the node on which we encountered the property.
10156
10382
  */
10157
- function logUnknownPropertyError(propName, tNode) {
10158
- let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`;
10383
+ function logUnknownPropertyError(propName, tagName) {
10384
+ const message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'.`;
10159
10385
  console.error(formatRuntimeError(303 /* UNKNOWN_BINDING */, message));
10160
10386
  }
10161
10387
  /**
@@ -10324,7 +10550,6 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
10324
10550
  function invokeDirectivesHostBindings(tView, lView, tNode) {
10325
10551
  const start = tNode.directiveStart;
10326
10552
  const end = tNode.directiveEnd;
10327
- const firstCreatePass = tView.firstCreatePass;
10328
10553
  const elementIndex = tNode.index;
10329
10554
  const currentDirectiveIndex = getCurrentDirectiveIndex();
10330
10555
  try {
@@ -10471,7 +10696,7 @@ function addComponentLogic(lView, hostTNode, def) {
10471
10696
  // Only component views should be added to the view tree directly. Embedded views are
10472
10697
  // accessed through their containers because they may be removed / re-added later.
10473
10698
  const rendererFactory = lView[RENDERER_FACTORY];
10474
- const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));
10699
+ const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));
10475
10700
  // Component view will always be created before any injected LContainers,
10476
10701
  // so this is a regular element, wrap it with the component view
10477
10702
  lView[hostTNode.index] = componentView;
@@ -10840,8 +11065,11 @@ function tickRootContext(rootContext) {
10840
11065
  for (let i = 0; i < rootContext.components.length; i++) {
10841
11066
  const rootComponent = rootContext.components[i];
10842
11067
  const lView = readPatchedLView(rootComponent);
10843
- const tView = lView[TVIEW];
10844
- renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
11068
+ // We might not have an `LView` if the component was destroyed.
11069
+ if (lView !== null) {
11070
+ const tView = lView[TVIEW];
11071
+ renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
11072
+ }
10845
11073
  }
10846
11074
  }
10847
11075
  function detectChangesInternal(tView, lView, context) {
@@ -11699,12 +11927,16 @@ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */;
11699
11927
  * @globalApi ng
11700
11928
  */
11701
11929
  function getComponent$1(element) {
11702
- assertDomElement(element);
11930
+ ngDevMode && assertDomElement(element);
11703
11931
  const context = getLContext(element);
11704
11932
  if (context === null)
11705
11933
  return null;
11706
11934
  if (context.component === undefined) {
11707
- context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);
11935
+ const lView = context.lView;
11936
+ if (lView === null) {
11937
+ return null;
11938
+ }
11939
+ context.component = getComponentAtNodeIndex(context.nodeIndex, lView);
11708
11940
  }
11709
11941
  return context.component;
11710
11942
  }
@@ -11723,7 +11955,8 @@ function getComponent$1(element) {
11723
11955
  function getContext(element) {
11724
11956
  assertDomElement(element);
11725
11957
  const context = getLContext(element);
11726
- return context === null ? null : context.lView[CONTEXT];
11958
+ const lView = context ? context.lView : null;
11959
+ return lView === null ? null : lView[CONTEXT];
11727
11960
  }
11728
11961
  /**
11729
11962
  * Retrieves the component instance whose view contains the DOM element.
@@ -11742,11 +11975,10 @@ function getContext(element) {
11742
11975
  */
11743
11976
  function getOwningComponent(elementOrDir) {
11744
11977
  const context = getLContext(elementOrDir);
11745
- if (context === null)
11978
+ let lView = context ? context.lView : null;
11979
+ if (lView === null)
11746
11980
  return null;
11747
- let lView = context.lView;
11748
11981
  let parent;
11749
- ngDevMode && assertLView(lView);
11750
11982
  while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {
11751
11983
  lView = parent;
11752
11984
  }
@@ -11764,7 +11996,8 @@ function getOwningComponent(elementOrDir) {
11764
11996
  * @globalApi ng
11765
11997
  */
11766
11998
  function getRootComponents(elementOrDir) {
11767
- return [...getRootContext(elementOrDir).components];
11999
+ const lView = readPatchedLView(elementOrDir);
12000
+ return lView !== null ? [...getRootContext(lView).components] : [];
11768
12001
  }
11769
12002
  /**
11770
12003
  * Retrieves an `Injector` associated with an element, component or directive instance.
@@ -11778,10 +12011,11 @@ function getRootComponents(elementOrDir) {
11778
12011
  */
11779
12012
  function getInjector(elementOrDir) {
11780
12013
  const context = getLContext(elementOrDir);
11781
- if (context === null)
12014
+ const lView = context ? context.lView : null;
12015
+ if (lView === null)
11782
12016
  return Injector.NULL;
11783
- const tNode = context.lView[TVIEW].data[context.nodeIndex];
11784
- return new NodeInjector(tNode, context.lView);
12017
+ const tNode = lView[TVIEW].data[context.nodeIndex];
12018
+ return new NodeInjector(tNode, lView);
11785
12019
  }
11786
12020
  /**
11787
12021
  * Retrieve a set of injection tokens at a given DOM node.
@@ -11790,9 +12024,9 @@ function getInjector(elementOrDir) {
11790
12024
  */
11791
12025
  function getInjectionTokens(element) {
11792
12026
  const context = getLContext(element);
11793
- if (context === null)
12027
+ const lView = context ? context.lView : null;
12028
+ if (lView === null)
11794
12029
  return [];
11795
- const lView = context.lView;
11796
12030
  const tView = lView[TVIEW];
11797
12031
  const tNode = tView.data[context.nodeIndex];
11798
12032
  const providerTokens = [];
@@ -11842,10 +12076,10 @@ function getDirectives(node) {
11842
12076
  return [];
11843
12077
  }
11844
12078
  const context = getLContext(node);
11845
- if (context === null) {
12079
+ const lView = context ? context.lView : null;
12080
+ if (lView === null) {
11846
12081
  return [];
11847
12082
  }
11848
- const lView = context.lView;
11849
12083
  const tView = lView[TVIEW];
11850
12084
  const nodeIndex = context.nodeIndex;
11851
12085
  if (!tView?.data[nodeIndex]) {
@@ -11905,7 +12139,11 @@ function getLocalRefs(target) {
11905
12139
  if (context === null)
11906
12140
  return {};
11907
12141
  if (context.localRefs === undefined) {
11908
- context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);
12142
+ const lView = context.lView;
12143
+ if (lView === null) {
12144
+ return {};
12145
+ }
12146
+ context.localRefs = discoverLocalRefs(lView, context.nodeIndex);
11909
12147
  }
11910
12148
  return context.localRefs || {};
11911
12149
  }
@@ -11969,11 +12207,11 @@ function getRenderedText(component) {
11969
12207
  * @globalApi ng
11970
12208
  */
11971
12209
  function getListeners(element) {
11972
- assertDomElement(element);
12210
+ ngDevMode && assertDomElement(element);
11973
12211
  const lContext = getLContext(element);
11974
- if (lContext === null)
12212
+ const lView = lContext === null ? null : lContext.lView;
12213
+ if (lView === null)
11975
12214
  return [];
11976
- const lView = lContext.lView;
11977
12215
  const tView = lView[TVIEW];
11978
12216
  const lCleanup = lView[CLEANUP];
11979
12217
  const tCleanup = tView.cleanup;
@@ -12024,10 +12262,10 @@ function getDebugNode$1(element) {
12024
12262
  throw new Error('Expecting instance of DOM Element');
12025
12263
  }
12026
12264
  const lContext = getLContext(element);
12027
- if (lContext === null) {
12265
+ const lView = lContext ? lContext.lView : null;
12266
+ if (lView === null) {
12028
12267
  return null;
12029
12268
  }
12030
- const lView = lContext.lView;
12031
12269
  const nodeIndex = lContext.nodeIndex;
12032
12270
  if (nodeIndex !== -1) {
12033
12271
  const valueInLView = lView[nodeIndex];
@@ -12052,6 +12290,7 @@ function getComponentLView(target) {
12052
12290
  const lContext = getLContext(target);
12053
12291
  const nodeIndx = lContext.nodeIndex;
12054
12292
  const lView = lContext.lView;
12293
+ ngDevMode && assertLView(lView);
12055
12294
  const componentLView = lView[nodeIndx];
12056
12295
  ngDevMode && assertLView(componentLView);
12057
12296
  return componentLView;
@@ -12199,7 +12438,7 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
12199
12438
  const rootContext = createRootContext(opts.scheduler, opts.playerHandler);
12200
12439
  const renderer = rendererFactory.createRenderer(hostRNode, componentDef);
12201
12440
  const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
12202
- const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);
12441
+ const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null, null);
12203
12442
  enterView(rootView);
12204
12443
  let component;
12205
12444
  try {
@@ -12254,7 +12493,7 @@ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRend
12254
12493
  }
12255
12494
  }
12256
12495
  const viewRenderer = rendererFactory.createRenderer(rNode, def);
12257
- const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);
12496
+ const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);
12258
12497
  if (tView.firstCreatePass) {
12259
12498
  diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
12260
12499
  markAsComponentHost(tView, tNode);
@@ -13799,75 +14038,6 @@ class KeyRegistry {
13799
14038
  }
13800
14039
  const _globalKeyRegistry = new KeyRegistry();
13801
14040
 
13802
- /**
13803
- * @license
13804
- * Copyright Google LLC All Rights Reserved.
13805
- *
13806
- * Use of this source code is governed by an MIT-style license that can be
13807
- * found in the LICENSE file at https://angular.io/license
13808
- */
13809
- /**
13810
- * Provides access to reflection data about symbols. Used internally by Angular
13811
- * to power dependency injection and compilation.
13812
- */
13813
- class Reflector {
13814
- constructor(reflectionCapabilities) {
13815
- this.reflectionCapabilities = reflectionCapabilities;
13816
- }
13817
- updateCapabilities(caps) {
13818
- this.reflectionCapabilities = caps;
13819
- }
13820
- factory(type) {
13821
- return this.reflectionCapabilities.factory(type);
13822
- }
13823
- parameters(typeOrFunc) {
13824
- return this.reflectionCapabilities.parameters(typeOrFunc);
13825
- }
13826
- annotations(typeOrFunc) {
13827
- return this.reflectionCapabilities.annotations(typeOrFunc);
13828
- }
13829
- propMetadata(typeOrFunc) {
13830
- return this.reflectionCapabilities.propMetadata(typeOrFunc);
13831
- }
13832
- hasLifecycleHook(type, lcProperty) {
13833
- return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
13834
- }
13835
- getter(name) {
13836
- return this.reflectionCapabilities.getter(name);
13837
- }
13838
- setter(name) {
13839
- return this.reflectionCapabilities.setter(name);
13840
- }
13841
- method(name) {
13842
- return this.reflectionCapabilities.method(name);
13843
- }
13844
- importUri(type) {
13845
- return this.reflectionCapabilities.importUri(type);
13846
- }
13847
- resourceUri(type) {
13848
- return this.reflectionCapabilities.resourceUri(type);
13849
- }
13850
- resolveIdentifier(name, moduleUrl, members, runtime) {
13851
- return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
13852
- }
13853
- resolveEnum(identifier, name) {
13854
- return this.reflectionCapabilities.resolveEnum(identifier, name);
13855
- }
13856
- }
13857
-
13858
- /**
13859
- * @license
13860
- * Copyright Google LLC All Rights Reserved.
13861
- *
13862
- * Use of this source code is governed by an MIT-style license that can be
13863
- * found in the LICENSE file at https://angular.io/license
13864
- */
13865
- /**
13866
- * The {@link Reflector} used internally in Angular to access metadata
13867
- * about symbols.
13868
- */
13869
- const reflector = new Reflector(new ReflectionCapabilities());
13870
-
13871
14041
  /**
13872
14042
  * @license
13873
14043
  * Copyright Google LLC All Rights Reserved.
@@ -13924,7 +14094,7 @@ function resolveReflectiveFactory(provider) {
13924
14094
  let resolvedDeps;
13925
14095
  if (provider.useClass) {
13926
14096
  const useClass = resolveForwardRef(provider.useClass);
13927
- factoryFn = reflector.factory(useClass);
14097
+ factoryFn = getReflect().factory(useClass);
13928
14098
  resolvedDeps = _dependenciesFor(useClass);
13929
14099
  }
13930
14100
  else if (provider.useExisting) {
@@ -14020,7 +14190,7 @@ function constructDependencies(typeOrFunc, dependencies) {
14020
14190
  }
14021
14191
  }
14022
14192
  function _dependenciesFor(typeOrFunc) {
14023
- const params = reflector.parameters(typeOrFunc);
14193
+ const params = getReflect().parameters(typeOrFunc);
14024
14194
  if (!params)
14025
14195
  return [];
14026
14196
  if (params.some(p => p == null)) {
@@ -14487,7 +14657,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
14487
14657
  const attrs = getConstant(tViewConsts, attrsIndex);
14488
14658
  const tNode = getOrCreateTNode(tView, index, 2 /* Element */, name, attrs);
14489
14659
  const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
14490
- ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives);
14660
+ ngDevMode && validateElementIsKnown(native, tNode.value, tView.schemas, hasDirectives);
14491
14661
  if (tNode.attrs !== null) {
14492
14662
  computeStaticStyling(tNode, tNode.attrs, false);
14493
14663
  }
@@ -14506,6 +14676,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
14506
14676
  * @param name Name of the DOM Node
14507
14677
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14508
14678
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14679
+ * @returns This function returns itself so that it may be chained.
14509
14680
  *
14510
14681
  * Attributes and localRefs are passed as an array of strings where elements with an even index
14511
14682
  * hold an attribute name and elements with an odd index hold an attribute value, ex.:
@@ -14557,9 +14728,11 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
14557
14728
  if (localRefsIndex !== null) {
14558
14729
  saveResolvedLocalsInData(lView, tNode);
14559
14730
  }
14731
+ return ɵɵelementStart;
14560
14732
  }
14561
14733
  /**
14562
14734
  * Mark the end of the element.
14735
+ * @returns This function returns itself so that it may be chained.
14563
14736
  *
14564
14737
  * @codeGenApi
14565
14738
  */
@@ -14590,6 +14763,7 @@ function ɵɵelementEnd() {
14590
14763
  if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
14591
14764
  setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
14592
14765
  }
14766
+ return ɵɵelementEnd;
14593
14767
  }
14594
14768
  /**
14595
14769
  * Creates an empty element using {@link elementStart} and {@link elementEnd}
@@ -14598,25 +14772,42 @@ function ɵɵelementEnd() {
14598
14772
  * @param name Name of the DOM Node
14599
14773
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14600
14774
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14775
+ * @returns This function returns itself so that it may be chained.
14601
14776
  *
14602
14777
  * @codeGenApi
14603
14778
  */
14604
14779
  function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
14605
14780
  ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
14606
14781
  ɵɵelementEnd();
14782
+ return ɵɵelement;
14607
14783
  }
14608
- function logUnknownElementError(tView, element, tNode, hasDirectives) {
14609
- const schemas = tView.schemas;
14784
+ /**
14785
+ * Validates that the element is known at runtime and produces
14786
+ * an error if it's not the case.
14787
+ * This check is relevant for JIT-compiled components (for AOT-compiled
14788
+ * ones this check happens at build time).
14789
+ *
14790
+ * The element is considered known if either:
14791
+ * - it's a known HTML element
14792
+ * - it's a known custom element
14793
+ * - the element matches any directive
14794
+ * - the element is allowed by one of the schemas
14795
+ *
14796
+ * @param element Element to validate
14797
+ * @param tagName Name of the tag to check
14798
+ * @param schemas Array of schemas
14799
+ * @param hasDirectives Boolean indicating that the element matches any directive
14800
+ */
14801
+ function validateElementIsKnown(element, tagName, schemas, hasDirectives) {
14610
14802
  // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
14611
14803
  // mode where this check happens at compile time. In JIT mode, `schemas` is always present and
14612
14804
  // defined as an array (as an empty array in case `schemas` field is not defined) and we should
14613
14805
  // execute the check below.
14614
14806
  if (schemas === null)
14615
14807
  return;
14616
- const tagName = tNode.value;
14617
14808
  // If the element matches any directive, it's considered as valid.
14618
14809
  if (!hasDirectives && tagName !== null) {
14619
- // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered
14810
+ // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered
14620
14811
  // as a custom element. Note that unknown elements with a dash in their name won't be instances
14621
14812
  // of HTMLUnknownElement in browsers that support web components.
14622
14813
  const isUnknown =
@@ -14626,7 +14817,7 @@ function logUnknownElementError(tView, element, tNode, hasDirectives) {
14626
14817
  element instanceof HTMLUnknownElement) ||
14627
14818
  (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&
14628
14819
  !customElements.get(tagName));
14629
- if (isUnknown && !matchingSchemas(tView, tagName)) {
14820
+ if (isUnknown && !matchingSchemas(schemas, tagName)) {
14630
14821
  let message = `'${tagName}' is not a known element:\n`;
14631
14822
  message += `1. If '${tagName}' is an Angular component, then verify that it is part of this module.\n`;
14632
14823
  if (tagName && tagName.indexOf('-') > -1) {
@@ -14672,6 +14863,7 @@ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, l
14672
14863
  * @param index Index of the element in the LView array
14673
14864
  * @param attrsIndex Index of the container attributes in the `consts` array.
14674
14865
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14866
+ * @returns This function returns itself so that it may be chained.
14675
14867
  *
14676
14868
  * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
14677
14869
  * the DOM (as a comment node can't have attributes). Attributes are here only for directive
@@ -14702,9 +14894,11 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
14702
14894
  if (localRefsIndex != null) {
14703
14895
  saveResolvedLocalsInData(lView, tNode);
14704
14896
  }
14897
+ return ɵɵelementContainerStart;
14705
14898
  }
14706
14899
  /**
14707
14900
  * Mark the end of the <ng-container>.
14901
+ * @returns This function returns itself so that it may be chained.
14708
14902
  *
14709
14903
  * @codeGenApi
14710
14904
  */
@@ -14726,6 +14920,7 @@ function ɵɵelementContainerEnd() {
14726
14920
  tView.queries.elementEnd(currentTNode);
14727
14921
  }
14728
14922
  }
14923
+ return ɵɵelementContainerEnd;
14729
14924
  }
14730
14925
  /**
14731
14926
  * Creates an empty logical container using {@link elementContainerStart}
@@ -14734,12 +14929,14 @@ function ɵɵelementContainerEnd() {
14734
14929
  * @param index Index of the element in the LView array
14735
14930
  * @param attrsIndex Index of the container attributes in the `consts` array.
14736
14931
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14932
+ * @returns This function returns itself so that it may be chained.
14737
14933
  *
14738
14934
  * @codeGenApi
14739
14935
  */
14740
14936
  function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
14741
14937
  ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
14742
14938
  ɵɵelementContainerEnd();
14939
+ return ɵɵelementContainer;
14743
14940
  }
14744
14941
 
14745
14942
  /**
@@ -16308,7 +16505,7 @@ function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {
16308
16505
  function malformedStyleError(text, expecting, index) {
16309
16506
  ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');
16310
16507
  throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +
16311
- text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +
16508
+ text.substring(index, index + 1) + '<<]' + text.slice(index + 1) +
16312
16509
  `'. Expecting '${expecting}'.`);
16313
16510
  }
16314
16511
 
@@ -19993,7 +20190,7 @@ function removeInnerTemplateTranslation(message) {
19993
20190
  }
19994
20191
  ngDevMode &&
19995
20192
  assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`);
19996
- res += message.substr(index);
20193
+ res += message.slice(index);
19997
20194
  return res;
19998
20195
  }
19999
20196
  /**
@@ -20085,7 +20282,7 @@ function parseICUBlock(pattern) {
20085
20282
  else {
20086
20283
  icuType = 1 /* plural */;
20087
20284
  }
20088
- mainBinding = parseInt(binding.substr(1), 10);
20285
+ mainBinding = parseInt(binding.slice(1), 10);
20089
20286
  return '';
20090
20287
  });
20091
20288
  const parts = i18nParseTextIntoPartsAndICU(pattern);
@@ -21090,7 +21287,7 @@ class Version {
21090
21287
  /**
21091
21288
  * @publicApi
21092
21289
  */
21093
- const VERSION = new Version('14.0.0-next.1');
21290
+ const VERSION = new Version('14.0.0-next.12');
21094
21291
 
21095
21292
  /**
21096
21293
  * @license
@@ -21496,29 +21693,27 @@ function getNamespace(elementName) {
21496
21693
  return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
21497
21694
  }
21498
21695
  /**
21499
- * A change detection scheduler token for {@link RootContext}. This token is the default value used
21500
- * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
21696
+ * Injector that looks up a value using a specific injector, before falling back to the module
21697
+ * injector. Used primarily when creating components or embedded views dynamically.
21501
21698
  */
21502
- const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
21503
- providedIn: 'root',
21504
- factory: () => defaultScheduler,
21505
- });
21506
- function createChainedInjector(rootViewInjector, moduleInjector) {
21507
- return {
21508
- get: (token, notFoundValue, flags) => {
21509
- const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
21510
- if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
21511
- notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
21512
- // Return the value from the root element injector when
21513
- // - it provides it
21514
- // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21515
- // - the module injector should not be checked
21516
- // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21517
- return value;
21518
- }
21519
- return moduleInjector.get(token, notFoundValue, flags);
21699
+ class ChainedInjector {
21700
+ constructor(injector, parentInjector) {
21701
+ this.injector = injector;
21702
+ this.parentInjector = parentInjector;
21703
+ }
21704
+ get(token, notFoundValue, flags) {
21705
+ const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
21706
+ if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
21707
+ notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
21708
+ // Return the value from the root element injector when
21709
+ // - it provides it
21710
+ // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21711
+ // - the module injector should not be checked
21712
+ // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21713
+ return value;
21520
21714
  }
21521
- };
21715
+ return this.parentInjector.get(token, notFoundValue, flags);
21716
+ }
21522
21717
  }
21523
21718
  /**
21524
21719
  * Render3 implementation of {@link viewEngine_ComponentFactory}.
@@ -21546,7 +21741,7 @@ class ComponentFactory extends ComponentFactory$1 {
21546
21741
  }
21547
21742
  create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
21548
21743
  ngModule = ngModule || this.ngModule;
21549
- const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;
21744
+ const rootViewInjector = ngModule ? new ChainedInjector(injector, ngModule.injector) : injector;
21550
21745
  const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
21551
21746
  const sanitizer = rootViewInjector.get(Sanitizer, null);
21552
21747
  const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
@@ -21561,7 +21756,7 @@ class ComponentFactory extends ComponentFactory$1 {
21561
21756
  const rootContext = createRootContext();
21562
21757
  // Create the root view. Uses empty TView and ContentTemplate.
21563
21758
  const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
21564
- const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);
21759
+ const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);
21565
21760
  // rootView is the parent when bootstrapping
21566
21761
  // TODO(misko): it looks like we are entering view here but we don't really need to as
21567
21762
  // `renderView` does that. However as the code is written it is needed because
@@ -21731,62 +21926,6 @@ class NgModuleRef$1 {
21731
21926
  class NgModuleFactory$1 {
21732
21927
  }
21733
21928
 
21734
- /**
21735
- * @license
21736
- * Copyright Google LLC All Rights Reserved.
21737
- *
21738
- * Use of this source code is governed by an MIT-style license that can be
21739
- * found in the LICENSE file at https://angular.io/license
21740
- */
21741
- /**
21742
- * Map of module-id to the corresponding NgModule.
21743
- * - In pre Ivy we track NgModuleFactory,
21744
- * - In post Ivy we track the NgModuleType
21745
- */
21746
- const modules = new Map();
21747
- /**
21748
- * Registers a loaded module. Should only be called from generated NgModuleFactory code.
21749
- * @publicApi
21750
- */
21751
- function registerModuleFactory(id, factory) {
21752
- const existing = modules.get(id);
21753
- assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);
21754
- modules.set(id, factory);
21755
- }
21756
- function assertSameOrNotExisting(id, type, incoming) {
21757
- if (type && type !== incoming) {
21758
- throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
21759
- }
21760
- }
21761
- function registerNgModuleType(ngModuleType) {
21762
- const visited = new Set();
21763
- recurse(ngModuleType);
21764
- function recurse(ngModuleType) {
21765
- // The imports array of an NgModule must refer to other NgModules,
21766
- // so an error is thrown if no module definition is available.
21767
- const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);
21768
- const id = def.id;
21769
- if (id !== null) {
21770
- const existing = modules.get(id);
21771
- assertSameOrNotExisting(id, existing, ngModuleType);
21772
- modules.set(id, ngModuleType);
21773
- }
21774
- const imports = maybeUnwrapFn(def.imports);
21775
- for (const i of imports) {
21776
- if (!visited.has(i)) {
21777
- visited.add(i);
21778
- recurse(i);
21779
- }
21780
- }
21781
- }
21782
- }
21783
- function clearModulesForTest() {
21784
- modules.clear();
21785
- }
21786
- function getRegisteredNgModuleType(id) {
21787
- return (modules.get(id) || autoRegisterModuleById[id]);
21788
- }
21789
-
21790
21929
  /**
21791
21930
  * @license
21792
21931
  * Copyright Google LLC All Rights Reserved.
@@ -21857,33 +21996,6 @@ class NgModuleFactory extends NgModuleFactory$1 {
21857
21996
  constructor(moduleType) {
21858
21997
  super();
21859
21998
  this.moduleType = moduleType;
21860
- const ngModuleDef = getNgModuleDef(moduleType);
21861
- if (ngModuleDef !== null) {
21862
- // Register the NgModule with Angular's module registry. The location (and hence timing) of
21863
- // this call is critical to ensure this works correctly (modules get registered when expected)
21864
- // without bloating bundles (modules are registered when otherwise not referenced).
21865
- //
21866
- // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has
21867
- // several practical consequences:
21868
- //
21869
- // - If an .ngfactory file is not imported from, the module won't be registered (and can be
21870
- // tree shaken).
21871
- // - If an .ngfactory file is imported from, the module will be registered even if an instance
21872
- // is not actually created (via `create` below).
21873
- // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's
21874
- // imports,
21875
- //
21876
- // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are
21877
- // not a required API to use - there are other ways to obtain an NgModuleFactory for a given
21878
- // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,
21879
- // the side effect of registration is added here, in the constructor of NgModuleFactory,
21880
- // ensuring no matter how a factory is created, the module is registered correctly.
21881
- //
21882
- // An alternative would be to include the registration side effect inline following the actual
21883
- // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules
21884
- // will be registered and retained even if they're otherwise never referenced.
21885
- registerNgModuleType(moduleType);
21886
- }
21887
21999
  }
21888
22000
  create(parentInjector) {
21889
22001
  return new NgModuleRef(this.moduleType, parentInjector);
@@ -22681,9 +22793,9 @@ const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {
22681
22793
  this._declarationTContainer = _declarationTContainer;
22682
22794
  this.elementRef = elementRef;
22683
22795
  }
22684
- createEmbeddedView(context) {
22796
+ createEmbeddedView(context, injector) {
22685
22797
  const embeddedTView = this._declarationTContainer.tViews;
22686
- const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);
22798
+ const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);
22687
22799
  const declarationLContainer = this._declarationLView[this._declarationTContainer.index];
22688
22800
  ngDevMode && assertLContainer(declarationLContainer);
22689
22801
  embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
@@ -22799,8 +22911,17 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22799
22911
  get length() {
22800
22912
  return this._lContainer.length - CONTAINER_HEADER_OFFSET;
22801
22913
  }
22802
- createEmbeddedView(templateRef, context, index) {
22803
- const viewRef = templateRef.createEmbeddedView(context || {});
22914
+ createEmbeddedView(templateRef, context, indexOrOptions) {
22915
+ let index;
22916
+ let injector;
22917
+ if (typeof indexOrOptions === 'number') {
22918
+ index = indexOrOptions;
22919
+ }
22920
+ else if (indexOrOptions != null) {
22921
+ index = indexOrOptions.index;
22922
+ injector = indexOrOptions.injector;
22923
+ }
22924
+ const viewRef = templateRef.createEmbeddedView(context || {}, injector);
22804
22925
  this.insert(viewRef, index);
22805
22926
  return viewRef;
22806
22927
  }
@@ -22841,11 +22962,29 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22841
22962
  componentFactoryOrType :
22842
22963
  new ComponentFactory(getComponentDef(componentFactoryOrType));
22843
22964
  const contextInjector = injector || this.parentInjector;
22844
- if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {
22845
- // DO NOT REFACTOR. The code here used to have a `value || undefined` expression
22846
- // which seems to cause internal google apps to fail. This is documented in the
22847
- // following internal bug issue: go/b/142967802
22848
- const result = contextInjector.get(NgModuleRef$1, null);
22965
+ // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
22966
+ if (!ngModuleRef && componentFactory.ngModule == null) {
22967
+ // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
22968
+ // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
22969
+ // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
22970
+ // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try
22971
+ // using a provided injector first, then fall back to the parent injector of this
22972
+ // `ViewContainerRef` instance.
22973
+ //
22974
+ // For the factory-less case, it's critical to establish a connection with the module
22975
+ // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),
22976
+ // so that a component can use DI tokens provided in MgModules. For this reason, we can not
22977
+ // rely on the provided injector, since it might be detached from the DI tree (for example, if
22978
+ // it was created via `Injector.create` without specifying a parent injector, or if an
22979
+ // injector is retrieved from an `NgModuleRef` created via `createNgModuleRef` using an
22980
+ // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent
22981
+ // injector, which is normally connected to the DI tree, which includes module injector
22982
+ // subtree.
22983
+ const _injector = isComponentFactory ? contextInjector : this.parentInjector;
22984
+ // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
22985
+ // undefined` expression which seems to cause internal google apps to fail. This is documented
22986
+ // in the following internal bug issue: go/b/142967802
22987
+ const result = _injector.get(NgModuleRef$1, null);
22849
22988
  if (result) {
22850
22989
  ngModuleRef = result;
22851
22990
  }
@@ -23535,6 +23674,7 @@ const angularCoreEnv = (() => ({
23535
23674
  'ɵɵinvalidFactory': ɵɵinvalidFactory,
23536
23675
  'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
23537
23676
  'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
23677
+ 'ɵɵresetView': ɵɵresetView,
23538
23678
  'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
23539
23679
  'ɵɵProvidersFeature': ɵɵProvidersFeature,
23540
23680
  'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
@@ -23647,6 +23787,7 @@ const angularCoreEnv = (() => ({
23647
23787
  'ɵɵresolveBody': ɵɵresolveBody,
23648
23788
  'ɵɵsetComponentScope': ɵɵsetComponentScope,
23649
23789
  'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,
23790
+ 'ɵɵregisterNgModuleType': registerNgModuleType,
23650
23791
  'ɵɵsanitizeHtml': ɵɵsanitizeHtml,
23651
23792
  'ɵɵsanitizeStyle': ɵɵsanitizeStyle,
23652
23793
  'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,
@@ -23682,6 +23823,17 @@ function resetJitOptions() {
23682
23823
  jitOptions = null;
23683
23824
  }
23684
23825
 
23826
+ /**
23827
+ * @license
23828
+ * Copyright Google LLC All Rights Reserved.
23829
+ *
23830
+ * Use of this source code is governed by an MIT-style license that can be
23831
+ * found in the LICENSE file at https://angular.io/license
23832
+ */
23833
+ function patchModuleCompilation() {
23834
+ // Does nothing, but exists as a target for patching.
23835
+ }
23836
+
23685
23837
  /**
23686
23838
  * @license
23687
23839
  * Copyright Google LLC All Rights Reserved.
@@ -23738,7 +23890,11 @@ function isResolvedDeclaration(declaration) {
23738
23890
  * This function automatically gets called when a class has a `@NgModule` decorator.
23739
23891
  */
23740
23892
  function compileNgModule(moduleType, ngModule = {}) {
23893
+ patchModuleCompilation();
23741
23894
  compileNgModuleDefs(moduleType, ngModule);
23895
+ if (ngModule.id !== undefined) {
23896
+ registerNgModuleType(moduleType, ngModule.id);
23897
+ }
23742
23898
  // Because we don't know if all declarations have resolved yet at the moment the
23743
23899
  // NgModule decorator is executing, we're enqueueing the setting of module scope
23744
23900
  // on its declarations to be run at a later time when all declarations for the module,
@@ -24362,7 +24518,10 @@ function directiveMetadata(type, metadata) {
24362
24518
  usesInheritance: !extendsDirectlyFromObject(type),
24363
24519
  exportAs: extractExportAs(metadata.exportAs),
24364
24520
  providers: metadata.providers || null,
24365
- viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)
24521
+ viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),
24522
+ // TODO(alxhub): pass through the standalone flag from the directive metadata once standalone
24523
+ // functionality is fully rolled out.
24524
+ isStandalone: false,
24366
24525
  };
24367
24526
  }
24368
24527
  /**
@@ -24506,7 +24665,10 @@ function getPipeMetadata(type, meta) {
24506
24665
  type: type,
24507
24666
  name: type.name,
24508
24667
  pipeName: meta.name,
24509
- pure: meta.pure !== undefined ? meta.pure : true
24668
+ pure: meta.pure !== undefined ? meta.pure : true,
24669
+ // TODO(alxhub): pass through the standalone flag from the pipe metadata once standalone
24670
+ // functionality is fully rolled out.
24671
+ isStandalone: false,
24510
24672
  };
24511
24673
  }
24512
24674
 
@@ -24808,9 +24970,10 @@ class ApplicationInitStatus {
24808
24970
  }
24809
24971
  }
24810
24972
  ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
24811
- ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
24973
+ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
24812
24974
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
24813
- type: Injectable
24975
+ type: Injectable,
24976
+ args: [{ providedIn: 'root' }]
24814
24977
  }], function () { return [{ type: undefined, decorators: [{
24815
24978
  type: Inject,
24816
24979
  args: [APP_INITIALIZER]
@@ -24836,7 +24999,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
24836
24999
  *
24837
25000
  * @publicApi
24838
25001
  */
24839
- const APP_ID = new InjectionToken('AppId');
25002
+ const APP_ID = new InjectionToken('AppId', {
25003
+ providedIn: 'root',
25004
+ factory: _appIdRandomProviderFactory,
25005
+ });
24840
25006
  function _appIdRandomProviderFactory() {
24841
25007
  return `${_randomChar()}${_randomChar()}${_randomChar()}`;
24842
25008
  }
@@ -24879,6 +25045,15 @@ const APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
24879
25045
  * @publicApi
24880
25046
  */
24881
25047
  const PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
25048
+ // We keep this token here, rather than the animations package, so that modules that only care
25049
+ // about which animations module is loaded (e.g. the CDK) can retrieve it without having to
25050
+ // include extra dependencies. See #44970 for more context.
25051
+ /**
25052
+ * A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
25053
+ * module has been loaded.
25054
+ * @publicApi
25055
+ */
25056
+ const ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');
24882
25057
 
24883
25058
  /**
24884
25059
  * @license
@@ -24911,6 +25086,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24911
25086
  * Use of this source code is governed by an MIT-style license that can be
24912
25087
  * found in the LICENSE file at https://angular.io/license
24913
25088
  */
25089
+ /**
25090
+ * Work out the locale from the potential global properties.
25091
+ *
25092
+ * * Closure Compiler: use `goog.LOCALE`.
25093
+ * * Ivy enabled: use `$localize.locale`
25094
+ */
25095
+ function getGlobalLocale() {
25096
+ if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
25097
+ typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
25098
+ // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
25099
+ // * In order to preserve backwards compatibility, we use Angular default value over
25100
+ // Closure Compiler's one.
25101
+ return goog.LOCALE;
25102
+ }
25103
+ else {
25104
+ // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
25105
+ // COMPILE-TIME INLINER.
25106
+ //
25107
+ // * During compile time inlining of translations the expression will be replaced
25108
+ // with a string literal that is the current locale. Other forms of this expression are not
25109
+ // guaranteed to be replaced.
25110
+ //
25111
+ // * During runtime translation evaluation, the developer is required to set `$localize.locale`
25112
+ // if required, or just to provide their own `LOCALE_ID` provider.
25113
+ return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
25114
+ }
25115
+ }
24914
25116
  /**
24915
25117
  * Provide this token to set the locale of your application.
24916
25118
  * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
@@ -24933,7 +25135,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24933
25135
  *
24934
25136
  * @publicApi
24935
25137
  */
24936
- const LOCALE_ID = new InjectionToken('LocaleId');
25138
+ const LOCALE_ID = new InjectionToken('LocaleId', {
25139
+ providedIn: 'root',
25140
+ factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
25141
+ });
24937
25142
  /**
24938
25143
  * Provide this token to set the default currency code your application uses for
24939
25144
  * CurrencyPipe when there is no currency code passed into it. This is only used by
@@ -24972,7 +25177,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
24972
25177
  *
24973
25178
  * @publicApi
24974
25179
  */
24975
- const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');
25180
+ const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
25181
+ providedIn: 'root',
25182
+ factory: () => USD_CURRENCY_CODE,
25183
+ });
24976
25184
  /**
24977
25185
  * Use this token at bootstrap to provide the content of your translation file (`xtb`,
24978
25186
  * `xlf` or `xlf2`) when you want to translate your application in another language.
@@ -25139,9 +25347,10 @@ class Compiler {
25139
25347
  }
25140
25348
  }
25141
25349
  Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
25142
- Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
25350
+ Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
25143
25351
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
25144
- type: Injectable
25352
+ type: Injectable,
25353
+ args: [{ providedIn: 'root' }]
25145
25354
  }], null, null); })();
25146
25355
  /**
25147
25356
  * Token to provide CompilerOptions in the platform injector.
@@ -26014,26 +26223,7 @@ class PlatformRef {
26014
26223
  this._destroyed = false;
26015
26224
  }
26016
26225
  /**
26017
- * Creates an instance of an `@NgModule` for the given platform for offline compilation.
26018
- *
26019
- * @usageNotes
26020
- *
26021
- * The following example creates the NgModule for a browser platform.
26022
- *
26023
- * ```typescript
26024
- * my_module.ts:
26025
- *
26026
- * @NgModule({
26027
- * imports: [BrowserModule]
26028
- * })
26029
- * class MyModule {}
26030
- *
26031
- * main.ts:
26032
- * import {MyModuleNgFactory} from './my_module.ngfactory';
26033
- * import {platformBrowser} from '@angular/platform-browser';
26034
- *
26035
- * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
26036
- * ```
26226
+ * Creates an instance of an `@NgModule` for the given platform.
26037
26227
  *
26038
26228
  * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
26039
26229
  * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
@@ -26087,7 +26277,7 @@ class PlatformRef {
26087
26277
  });
26088
26278
  }
26089
26279
  /**
26090
- * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
26280
+ * Creates an instance of an `@NgModule` for a given platform.
26091
26281
  *
26092
26282
  * @usageNotes
26093
26283
  * ### Simple Example
@@ -26521,9 +26711,10 @@ class ApplicationRef {
26521
26711
  }
26522
26712
  }
26523
26713
  ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
26524
- ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
26714
+ ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
26525
26715
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
26526
- type: Injectable
26716
+ type: Injectable,
26717
+ args: [{ providedIn: 'root' }]
26527
26718
  }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null); })();
26528
26719
  function remove(list, el) {
26529
26720
  const index = list.indexOf(el);
@@ -26830,8 +27021,6 @@ var ng_module_factory_loader_impl = {};
26830
27021
  * Use of this source code is governed by an MIT-style license that can be
26831
27022
  * found in the LICENSE file at https://angular.io/license
26832
27023
  */
26833
- // TODO(alxhub): recombine the interfaces and implementations here and move the docs back onto the
26834
- // original classes.
26835
27024
  /**
26836
27025
  * @publicApi
26837
27026
  */
@@ -26847,47 +27036,92 @@ class DebugEventListener {
26847
27036
  function asNativeElements(debugEls) {
26848
27037
  return debugEls.map((el) => el.nativeElement);
26849
27038
  }
26850
- class DebugNode__POST_R3__ {
27039
+ /**
27040
+ * @publicApi
27041
+ */
27042
+ class DebugNode {
26851
27043
  constructor(nativeNode) {
26852
27044
  this.nativeNode = nativeNode;
26853
27045
  }
27046
+ /**
27047
+ * The `DebugElement` parent. Will be `null` if this is the root element.
27048
+ */
26854
27049
  get parent() {
26855
27050
  const parent = this.nativeNode.parentNode;
26856
- return parent ? new DebugElement__POST_R3__(parent) : null;
27051
+ return parent ? new DebugElement(parent) : null;
26857
27052
  }
27053
+ /**
27054
+ * The host dependency injector. For example, the root element's component instance injector.
27055
+ */
26858
27056
  get injector() {
26859
27057
  return getInjector(this.nativeNode);
26860
27058
  }
27059
+ /**
27060
+ * The element's own component instance, if it has one.
27061
+ */
26861
27062
  get componentInstance() {
26862
27063
  const nativeElement = this.nativeNode;
26863
27064
  return nativeElement &&
26864
27065
  (getComponent$1(nativeElement) || getOwningComponent(nativeElement));
26865
27066
  }
27067
+ /**
27068
+ * An object that provides parent context for this element. Often an ancestor component instance
27069
+ * that governs this element.
27070
+ *
27071
+ * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
27072
+ * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
27073
+ * of heroes"`.
27074
+ */
26866
27075
  get context() {
26867
27076
  return getComponent$1(this.nativeNode) || getContext(this.nativeNode);
26868
27077
  }
27078
+ /**
27079
+ * The callbacks attached to the component's @Output properties and/or the element's event
27080
+ * properties.
27081
+ */
26869
27082
  get listeners() {
26870
27083
  return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');
26871
27084
  }
27085
+ /**
27086
+ * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
27087
+ * variable name.
27088
+ */
26872
27089
  get references() {
26873
27090
  return getLocalRefs(this.nativeNode);
26874
27091
  }
27092
+ /**
27093
+ * This component's injector lookup tokens. Includes the component itself plus the tokens that the
27094
+ * component lists in its providers metadata.
27095
+ */
26875
27096
  get providerTokens() {
26876
27097
  return getInjectionTokens(this.nativeNode);
26877
27098
  }
26878
27099
  }
26879
- class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
27100
+ /**
27101
+ * @publicApi
27102
+ *
27103
+ * @see [Component testing scenarios](guide/testing-components-scenarios)
27104
+ * @see [Basics of testing components](guide/testing-components-basics)
27105
+ * @see [Testing utility APIs](guide/testing-utility-apis)
27106
+ */
27107
+ class DebugElement extends DebugNode {
26880
27108
  constructor(nativeNode) {
26881
27109
  ngDevMode && assertDomNode(nativeNode);
26882
27110
  super(nativeNode);
26883
27111
  }
27112
+ /**
27113
+ * The underlying DOM element at the root of the component.
27114
+ */
26884
27115
  get nativeElement() {
26885
27116
  return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
26886
27117
  }
27118
+ /**
27119
+ * The element tag name, if it is an element.
27120
+ */
26887
27121
  get name() {
26888
27122
  const context = getLContext(this.nativeNode);
26889
- if (context !== null) {
26890
- const lView = context.lView;
27123
+ const lView = context ? context.lView : null;
27124
+ if (lView !== null) {
26891
27125
  const tData = lView[TVIEW].data;
26892
27126
  const tNode = tData[context.nodeIndex];
26893
27127
  return tNode.value;
@@ -26910,10 +27144,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26910
27144
  */
26911
27145
  get properties() {
26912
27146
  const context = getLContext(this.nativeNode);
26913
- if (context === null) {
27147
+ const lView = context ? context.lView : null;
27148
+ if (lView === null) {
26914
27149
  return {};
26915
27150
  }
26916
- const lView = context.lView;
26917
27151
  const tData = lView[TVIEW].data;
26918
27152
  const tNode = tData[context.nodeIndex];
26919
27153
  const properties = {};
@@ -26924,6 +27158,9 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26924
27158
  collectPropertyBindings(properties, tNode, lView, tData);
26925
27159
  return properties;
26926
27160
  }
27161
+ /**
27162
+ * A map of attribute names to attribute values for an element.
27163
+ */
26927
27164
  get attributes() {
26928
27165
  const attributes = {};
26929
27166
  const element = this.nativeElement;
@@ -26931,10 +27168,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26931
27168
  return attributes;
26932
27169
  }
26933
27170
  const context = getLContext(element);
26934
- if (context === null) {
27171
+ const lView = context ? context.lView : null;
27172
+ if (lView === null) {
26935
27173
  return {};
26936
27174
  }
26937
- const lView = context.lView;
26938
27175
  const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;
26939
27176
  const lowercaseTNodeAttrs = [];
26940
27177
  // For debug nodes we take the element's attribute directly from the DOM since it allows us
@@ -26972,12 +27209,29 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26972
27209
  }
26973
27210
  return attributes;
26974
27211
  }
27212
+ /**
27213
+ * The inline styles of the DOM element.
27214
+ *
27215
+ * Will be `null` if there is no `style` property on the underlying DOM element.
27216
+ *
27217
+ * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
27218
+ */
26975
27219
  get styles() {
26976
27220
  if (this.nativeElement && this.nativeElement.style) {
26977
27221
  return this.nativeElement.style;
26978
27222
  }
26979
27223
  return {};
26980
27224
  }
27225
+ /**
27226
+ * A map containing the class names on the element as keys.
27227
+ *
27228
+ * This map is derived from the `className` property of the DOM element.
27229
+ *
27230
+ * Note: The values of this object will always be `true`. The class key will not appear in the KV
27231
+ * object if it does not exist on the element.
27232
+ *
27233
+ * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
27234
+ */
26981
27235
  get classes() {
26982
27236
  const result = {};
26983
27237
  const element = this.nativeElement;
@@ -26987,15 +27241,23 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26987
27241
  classes.forEach((value) => result[value] = true);
26988
27242
  return result;
26989
27243
  }
27244
+ /**
27245
+ * The `childNodes` of the DOM element as a `DebugNode` array.
27246
+ *
27247
+ * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
27248
+ */
26990
27249
  get childNodes() {
26991
27250
  const childNodes = this.nativeNode.childNodes;
26992
27251
  const children = [];
26993
27252
  for (let i = 0; i < childNodes.length; i++) {
26994
27253
  const element = childNodes[i];
26995
- children.push(getDebugNode__POST_R3__(element));
27254
+ children.push(getDebugNode(element));
26996
27255
  }
26997
27256
  return children;
26998
27257
  }
27258
+ /**
27259
+ * The immediate `DebugElement` children. Walk the tree by descending through `children`.
27260
+ */
26999
27261
  get children() {
27000
27262
  const nativeElement = this.nativeElement;
27001
27263
  if (!nativeElement)
@@ -27004,24 +27266,45 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
27004
27266
  const children = [];
27005
27267
  for (let i = 0; i < childNodes.length; i++) {
27006
27268
  const element = childNodes[i];
27007
- children.push(getDebugNode__POST_R3__(element));
27269
+ children.push(getDebugNode(element));
27008
27270
  }
27009
27271
  return children;
27010
27272
  }
27273
+ /**
27274
+ * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
27275
+ */
27011
27276
  query(predicate) {
27012
27277
  const results = this.queryAll(predicate);
27013
27278
  return results[0] || null;
27014
27279
  }
27280
+ /**
27281
+ * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
27282
+ */
27015
27283
  queryAll(predicate) {
27016
27284
  const matches = [];
27017
- _queryAllR3(this, predicate, matches, true);
27285
+ _queryAll(this, predicate, matches, true);
27018
27286
  return matches;
27019
27287
  }
27288
+ /**
27289
+ * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
27290
+ */
27020
27291
  queryAllNodes(predicate) {
27021
27292
  const matches = [];
27022
- _queryAllR3(this, predicate, matches, false);
27293
+ _queryAll(this, predicate, matches, false);
27023
27294
  return matches;
27024
27295
  }
27296
+ /**
27297
+ * Triggers the event by its name if there is a corresponding listener in the element's
27298
+ * `listeners` collection.
27299
+ *
27300
+ * If the event lacks a listener or there's some other problem, consider
27301
+ * calling `nativeElement.dispatchEvent(eventObject)`.
27302
+ *
27303
+ * @param eventName The name of the event to trigger
27304
+ * @param eventObj The _event object_ expected by the handler
27305
+ *
27306
+ * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
27307
+ */
27025
27308
  triggerEventHandler(eventName, eventObj) {
27026
27309
  const node = this.nativeNode;
27027
27310
  const invokedListeners = [];
@@ -27080,11 +27363,12 @@ function isPrimitiveValue(value) {
27080
27363
  return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||
27081
27364
  value === null;
27082
27365
  }
27083
- function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27366
+ function _queryAll(parentElement, predicate, matches, elementsOnly) {
27084
27367
  const context = getLContext(parentElement.nativeNode);
27085
- if (context !== null) {
27086
- const parentTNode = context.lView[TVIEW].data[context.nodeIndex];
27087
- _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27368
+ const lView = context ? context.lView : null;
27369
+ if (lView !== null) {
27370
+ const parentTNode = lView[TVIEW].data[context.nodeIndex];
27371
+ _queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27088
27372
  }
27089
27373
  else {
27090
27374
  // If the context is null, then `parentElement` was either created with Renderer2 or native DOM
@@ -27102,26 +27386,26 @@ function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27102
27386
  * @param elementsOnly whether only elements should be searched
27103
27387
  * @param rootNativeNode the root native node on which predicate should not be matched
27104
27388
  */
27105
- function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27389
+ function _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27106
27390
  ngDevMode && assertTNodeForLView(tNode, lView);
27107
27391
  const nativeNode = getNativeByTNodeOrNull(tNode, lView);
27108
27392
  // For each type of TNode, specific logic is executed.
27109
27393
  if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {
27110
27394
  // Case 1: the TNode is an element
27111
27395
  // The native node has to be checked.
27112
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27396
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27113
27397
  if (isComponentHost(tNode)) {
27114
27398
  // If the element is the host of a component, then all nodes in its view have to be processed.
27115
27399
  // Note: the component's content (tNode.child) will be processed from the insertion points.
27116
27400
  const componentView = getComponentLViewByIndex(tNode.index, lView);
27117
27401
  if (componentView && componentView[TVIEW].firstChild) {
27118
- _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27402
+ _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27119
27403
  }
27120
27404
  }
27121
27405
  else {
27122
27406
  if (tNode.child) {
27123
27407
  // Otherwise, its children have to be processed.
27124
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27408
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27125
27409
  }
27126
27410
  // We also have to query the DOM directly in order to catch elements inserted through
27127
27411
  // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
@@ -27137,16 +27421,16 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27137
27421
  // processed.
27138
27422
  const nodeOrContainer = lView[tNode.index];
27139
27423
  if (isLContainer(nodeOrContainer)) {
27140
- _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27424
+ _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27141
27425
  }
27142
27426
  }
27143
27427
  else if (tNode.type & 4 /* Container */) {
27144
27428
  // Case 2: the TNode is a container
27145
27429
  // The native node has to be checked.
27146
27430
  const lContainer = lView[tNode.index];
27147
- _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27431
+ _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27148
27432
  // Each view inside the container has to be processed.
27149
- _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27433
+ _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27150
27434
  }
27151
27435
  else if (tNode.type & 16 /* Projection */) {
27152
27436
  // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
@@ -27156,18 +27440,18 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27156
27440
  const head = componentHost.projection[tNode.projection];
27157
27441
  if (Array.isArray(head)) {
27158
27442
  for (let nativeNode of head) {
27159
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27443
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27160
27444
  }
27161
27445
  }
27162
27446
  else if (head) {
27163
27447
  const nextLView = componentView[PARENT];
27164
27448
  const nextTNode = nextLView[TVIEW].data[head.index];
27165
- _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27449
+ _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27166
27450
  }
27167
27451
  }
27168
27452
  else if (tNode.child) {
27169
27453
  // Case 4: the TNode is a view.
27170
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27454
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27171
27455
  }
27172
27456
  // We don't want to go to the next sibling of the root node.
27173
27457
  if (rootNativeNode !== nativeNode) {
@@ -27175,7 +27459,7 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27175
27459
  // link, depending on whether the current node has been projected.
27176
27460
  const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;
27177
27461
  if (nextTNode) {
27178
- _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27462
+ _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27179
27463
  }
27180
27464
  }
27181
27465
  }
@@ -27188,12 +27472,12 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27188
27472
  * @param elementsOnly whether only elements should be searched
27189
27473
  * @param rootNativeNode the root native node on which predicate should not be matched
27190
27474
  */
27191
- function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27475
+ function _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27192
27476
  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
27193
27477
  const childView = lContainer[i];
27194
27478
  const firstChild = childView[TVIEW].firstChild;
27195
27479
  if (firstChild) {
27196
- _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27480
+ _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27197
27481
  }
27198
27482
  }
27199
27483
  }
@@ -27206,7 +27490,7 @@ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, element
27206
27490
  * @param elementsOnly whether only elements should be searched
27207
27491
  * @param rootNativeNode the root native node on which predicate should not be matched
27208
27492
  */
27209
- function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27493
+ function _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27210
27494
  if (rootNativeNode !== nativeNode) {
27211
27495
  const debugNode = getDebugNode(nativeNode);
27212
27496
  if (!debugNode) {
@@ -27215,7 +27499,7 @@ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNati
27215
27499
  // Type of the "predicate and "matches" array are set based on the value of
27216
27500
  // the "elementsOnly" parameter. TypeScript is not able to properly infer these
27217
27501
  // types with generics, so we manually cast the parameters accordingly.
27218
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27502
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27219
27503
  matches.indexOf(debugNode) === -1) {
27220
27504
  matches.push(debugNode);
27221
27505
  }
@@ -27240,7 +27524,7 @@ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnl
27240
27524
  const node = nodes[i];
27241
27525
  const debugNode = getDebugNode(node);
27242
27526
  if (debugNode) {
27243
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27527
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27244
27528
  matches.indexOf(debugNode) === -1) {
27245
27529
  matches.push(debugNode);
27246
27530
  }
@@ -27281,25 +27565,24 @@ function collectPropertyBindings(properties, tNode, lView, tData) {
27281
27565
  // Need to keep the nodes in a global Map so that multiple angular apps are supported.
27282
27566
  const _nativeNodeToDebugNode = new Map();
27283
27567
  const NG_DEBUG_PROPERTY = '__ng_debug__';
27284
- function getDebugNode__POST_R3__(nativeNode) {
27568
+ /**
27569
+ * @publicApi
27570
+ */
27571
+ function getDebugNode(nativeNode) {
27285
27572
  if (nativeNode instanceof Node) {
27286
27573
  if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {
27287
27574
  nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?
27288
- new DebugElement__POST_R3__(nativeNode) :
27289
- new DebugNode__POST_R3__(nativeNode);
27575
+ new DebugElement(nativeNode) :
27576
+ new DebugNode(nativeNode);
27290
27577
  }
27291
27578
  return nativeNode[NG_DEBUG_PROPERTY];
27292
27579
  }
27293
27580
  return null;
27294
27581
  }
27295
- /**
27296
- * @publicApi
27297
- */
27298
- const getDebugNode = getDebugNode__POST_R3__;
27299
- function getDebugNodeR2__POST_R3__(_nativeNode) {
27582
+ // TODO: cleanup all references to this function and remove it.
27583
+ function getDebugNodeR2(_nativeNode) {
27300
27584
  return null;
27301
27585
  }
27302
- const getDebugNodeR2 = getDebugNodeR2__POST_R3__;
27303
27586
  function getAllDebugNodes() {
27304
27587
  return Array.from(_nativeNodeToDebugNode.values());
27305
27588
  }
@@ -27309,14 +27592,6 @@ function indexDebugNode(node) {
27309
27592
  function removeDebugNodeFromIndex(node) {
27310
27593
  _nativeNodeToDebugNode.delete(node.nativeNode);
27311
27594
  }
27312
- /**
27313
- * @publicApi
27314
- */
27315
- const DebugNode = DebugNode__POST_R3__;
27316
- /**
27317
- * @publicApi
27318
- */
27319
- const DebugElement = DebugElement__POST_R3__;
27320
27595
 
27321
27596
  /**
27322
27597
  * @license
@@ -28444,96 +28719,10 @@ const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDER
28444
28719
  * Use of this source code is governed by an MIT-style license that can be
28445
28720
  * found in the LICENSE file at https://angular.io/license
28446
28721
  */
28447
- function _iterableDiffersFactory() {
28448
- return defaultIterableDiffers;
28449
- }
28450
- function _keyValueDiffersFactory() {
28451
- return defaultKeyValueDiffers;
28452
- }
28453
- function _localeFactory(locale) {
28454
- return locale || getGlobalLocale();
28455
- }
28456
28722
  /**
28457
- * Work out the locale from the potential global properties.
28458
- *
28459
- * * Closure Compiler: use `goog.getLocale()`.
28460
- * * Ivy enabled: use `$localize.locale`
28461
- */
28462
- function getGlobalLocale() {
28463
- if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
28464
- typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
28465
- // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
28466
- // * In order to preserve backwards compatibility, we use Angular default value over
28467
- // Closure Compiler's one.
28468
- return goog.getLocale();
28469
- }
28470
- else {
28471
- // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
28472
- // COMPILE-TIME INLINER.
28473
- //
28474
- // * During compile time inlining of translations the expression will be replaced
28475
- // with a string literal that is the current locale. Other forms of this expression are not
28476
- // guaranteed to be replaced.
28477
- //
28478
- // * During runtime translation evaluation, the developer is required to set `$localize.locale`
28479
- // if required, or just to provide their own `LOCALE_ID` provider.
28480
- return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
28481
- }
28482
- }
28483
- /**
28484
- * A built-in [dependency injection token](guide/glossary#di-token)
28485
- * that is used to configure the root injector for bootstrapping.
28486
- */
28487
- const APPLICATION_MODULE_PROVIDERS = [
28488
- {
28489
- provide: ApplicationRef,
28490
- useClass: ApplicationRef,
28491
- deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
28492
- },
28493
- { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
28494
- {
28495
- provide: ApplicationInitStatus,
28496
- useClass: ApplicationInitStatus,
28497
- deps: [[new Optional(), APP_INITIALIZER]]
28498
- },
28499
- { provide: Compiler, useClass: Compiler, deps: [] },
28500
- APP_ID_RANDOM_PROVIDER,
28501
- { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },
28502
- { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },
28503
- {
28504
- provide: LOCALE_ID,
28505
- useFactory: _localeFactory,
28506
- deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
28507
- },
28508
- { provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
28509
- ];
28510
- /**
28511
- * Schedule work at next available slot.
28512
- *
28513
- * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
28514
- * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
28515
- * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
28516
- *
28517
- * @param ngZone NgZone to use for scheduling.
28518
- */
28519
- function zoneSchedulerFactory(ngZone) {
28520
- let queue = [];
28521
- ngZone.onStable.subscribe(() => {
28522
- while (queue.length) {
28523
- queue.pop()();
28524
- }
28525
- });
28526
- return function (fn) {
28527
- queue.push(fn);
28528
- };
28529
- }
28530
- /**
28531
- * Configures the root injector for an app with
28532
- * providers of `@angular/core` dependencies that `ApplicationRef` needs
28533
- * to bootstrap components.
28534
- *
28535
28723
  * Re-exported by `BrowserModule`, which is included automatically in the root
28536
- * `AppModule` when you create a new app with the CLI `new` command.
28724
+ * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
28725
+ * `ApplicationRef` to instantiate it.
28537
28726
  *
28538
28727
  * @publicApi
28539
28728
  */
@@ -28543,12 +28732,23 @@ class ApplicationModule {
28543
28732
  }
28544
28733
  ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
28545
28734
  ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
28546
- ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS });
28735
+ ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
28547
28736
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
28548
- type: NgModule,
28549
- args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
28737
+ type: NgModule
28550
28738
  }], function () { return [{ type: ApplicationRef }]; }, null); })();
28551
28739
 
28740
+ /**
28741
+ * @license
28742
+ * Copyright Google LLC All Rights Reserved.
28743
+ *
28744
+ * Use of this source code is governed by an MIT-style license that can be
28745
+ * found in the LICENSE file at https://angular.io/license
28746
+ */
28747
+ /** Coerces a value (typically a string) to a boolean. */
28748
+ function coerceToBoolean(value) {
28749
+ return typeof value === 'boolean' ? value : (value != null && value !== 'false');
28750
+ }
28751
+
28552
28752
  /**
28553
28753
  * @license
28554
28754
  * Copyright Google LLC All Rights Reserved.
@@ -28706,5 +28906,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
28706
28906
  * Generated bundle index. Do not edit.
28707
28907
  */
28708
28908
 
28709
- export { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, registerNgModuleType as ɵregisterNgModuleType, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };
28909
+ export { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };
28710
28910
  //# sourceMappingURL=core.mjs.map