@angular/core 17.0.0-next.5 → 17.0.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/esm2022/rxjs-interop/src/to_signal.mjs +13 -11
  2. package/esm2022/src/application_init.mjs +3 -3
  3. package/esm2022/src/application_module.mjs +3 -3
  4. package/esm2022/src/application_ref.mjs +23 -6
  5. package/esm2022/src/change_detection/differs/default_iterable_differ.mjs +1 -2
  6. package/esm2022/src/console.mjs +2 -2
  7. package/esm2022/src/core_private_export.mjs +2 -2
  8. package/esm2022/src/hydration/api.mjs +7 -8
  9. package/esm2022/src/hydration/views.mjs +3 -3
  10. package/esm2022/src/initial_render_pending_tasks.mjs +2 -2
  11. package/esm2022/src/linker/compiler.mjs +2 -2
  12. package/esm2022/src/linker/query_list.mjs +7 -10
  13. package/esm2022/src/linker/view_container_ref.mjs +12 -10
  14. package/esm2022/src/render3/deps_tracker/deps_tracker.mjs +4 -8
  15. package/esm2022/src/render3/instructions/control_flow.mjs +6 -4
  16. package/esm2022/src/render3/instructions/defer.mjs +381 -79
  17. package/esm2022/src/render3/instructions/defer_events.mjs +154 -0
  18. package/esm2022/src/render3/instructions/shared.mjs +1 -1
  19. package/esm2022/src/render3/instructions/template.mjs +9 -2
  20. package/esm2022/src/render3/interfaces/defer.mjs +9 -11
  21. package/esm2022/src/render3/metadata.mjs +2 -2
  22. package/esm2022/src/render3/state.mjs +2 -11
  23. package/esm2022/src/render3/util/view_utils.mjs +17 -3
  24. package/esm2022/src/testability/testability.mjs +5 -5
  25. package/esm2022/src/util/assert.mjs +6 -1
  26. package/esm2022/src/version.mjs +1 -1
  27. package/esm2022/testing/src/component_fixture.mjs +4 -2
  28. package/esm2022/testing/src/defer.mjs +3 -3
  29. package/esm2022/testing/src/logger.mjs +4 -4
  30. package/fesm2022/core.mjs +1095 -617
  31. package/fesm2022/core.mjs.map +1 -1
  32. package/fesm2022/rxjs-interop.mjs +13 -11
  33. package/fesm2022/rxjs-interop.mjs.map +1 -1
  34. package/fesm2022/testing.mjs +6 -4
  35. package/fesm2022/testing.mjs.map +1 -1
  36. package/index.d.ts +82 -46
  37. package/package.json +1 -1
  38. package/rxjs-interop/index.d.ts +1 -1
  39. package/schematics/migrations/block-template-entities/bundle.js +23249 -0
  40. package/schematics/migrations/block-template-entities/bundle.js.map +7 -0
  41. package/schematics/migrations.json +4 -9
  42. package/schematics/ng-generate/standalone-migration/bundle.js +2147 -2036
  43. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  44. package/testing/index.d.ts +5 -3
  45. package/schematics/migrations/guard-and-resolve-interfaces/bundle.js +0 -694
  46. package/schematics/migrations/guard-and-resolve-interfaces/bundle.js.map +0 -7
  47. package/schematics/migrations/remove-module-id/bundle.js +0 -368
  48. package/schematics/migrations/remove-module-id/bundle.js.map +0 -7
package/fesm2022/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.5
2
+ * @license Angular v17.0.0-next.6
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -333,6 +333,11 @@ function assertDomNode(node) {
333
333
  throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);
334
334
  }
335
335
  }
336
+ function assertElement(node) {
337
+ if (!(node instanceof Element)) {
338
+ throwError(`The provided value must be an element but got ${stringify(node)}`);
339
+ }
340
+ }
336
341
  function assertIndexInRange(arr, index) {
337
342
  assertDefined(arr, 'Array must be defined.');
338
343
  const maxLen = arr.length;
@@ -3125,6 +3130,20 @@ function clearViewRefreshFlag(lView) {
3125
3130
  updateViewsToRefresh(lView, -1);
3126
3131
  }
3127
3132
  }
3133
+ /**
3134
+ * Walks up the LView hierarchy.
3135
+ * @param nestingLevel Number of times to walk up in hierarchy.
3136
+ * @param currentView View from which to start the lookup.
3137
+ */
3138
+ function walkUpViews(nestingLevel, currentView) {
3139
+ while (nestingLevel > 0) {
3140
+ ngDevMode &&
3141
+ assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');
3142
+ currentView = currentView[DECLARATION_VIEW];
3143
+ nestingLevel--;
3144
+ }
3145
+ return currentView;
3146
+ }
3128
3147
  /**
3129
3148
  * Updates the `DESCENDANT_VIEWS_TO_REFRESH` counter on the parents of the `LView` as well as the
3130
3149
  * parents above that whose
@@ -3626,15 +3645,6 @@ function nextContextImpl(level) {
3626
3645
  walkUpViews(level, instructionState.lFrame.contextLView);
3627
3646
  return contextLView[CONTEXT];
3628
3647
  }
3629
- function walkUpViews(nestingLevel, currentView) {
3630
- while (nestingLevel > 0) {
3631
- ngDevMode &&
3632
- assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');
3633
- currentView = currentView[DECLARATION_VIEW];
3634
- nestingLevel--;
3635
- }
3636
- return currentView;
3637
- }
3638
3648
  /**
3639
3649
  * Gets the currently selected element index.
3640
3650
  *
@@ -7315,7 +7325,7 @@ function isPlatformBrowser(injector) {
7315
7325
  *
7316
7326
  * @deprecated For migration purposes only, to be removed soon.
7317
7327
  */
7318
- const USE_RUNTIME_DEPS_TRACKER_FOR_JIT = false;
7328
+ const USE_RUNTIME_DEPS_TRACKER_FOR_JIT = true;
7319
7329
  /**
7320
7330
  * An implementation of DepsTrackerApi which will be used for JIT and local compilation.
7321
7331
  */
@@ -7397,12 +7407,8 @@ class DepsTracker {
7397
7407
  }
7398
7408
  /** @override */
7399
7409
  clearScopeCacheFor(type) {
7400
- if (isNgModule(type)) {
7401
- this.ngModulesScopeCache.delete(type);
7402
- }
7403
- else if (isComponent(type)) {
7404
- this.standaloneComponentsScopeCache.delete(type);
7405
- }
7410
+ this.ngModulesScopeCache.delete(type);
7411
+ this.standaloneComponentsScopeCache.delete(type);
7406
7412
  }
7407
7413
  /** @override */
7408
7414
  getNgModuleScope(type) {
@@ -10901,7 +10907,7 @@ class Version {
10901
10907
  /**
10902
10908
  * @publicApi
10903
10909
  */
10904
- const VERSION = new Version('17.0.0-next.5');
10910
+ const VERSION = new Version('17.0.0-next.6');
10905
10911
 
10906
10912
  // This default value is when checking the hierarchy for a token.
10907
10913
  //
@@ -17775,7 +17781,6 @@ class DefaultIterableDiffer {
17775
17781
  this.length = index;
17776
17782
  }
17777
17783
  this._truncate(record);
17778
- // @ts-expect-error overwriting a readonly member
17779
17784
  this.collection = collection;
17780
17785
  return this.isDirty;
17781
17786
  }
@@ -18723,67 +18728,6 @@ const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
18723
18728
  * Change detection enables data binding in Angular.
18724
18729
  */
18725
18730
 
18726
- function createAndRenderEmbeddedLView(declarationLView, templateTNode, context, options) {
18727
- const embeddedTView = templateTNode.tView;
18728
- ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');
18729
- ngDevMode && assertTNodeForLView(templateTNode, declarationLView);
18730
- // Embedded views follow the change detection strategy of the view they're declared in.
18731
- const isSignalView = declarationLView[FLAGS] & 4096 /* LViewFlags.SignalView */;
18732
- const viewFlags = isSignalView ? 4096 /* LViewFlags.SignalView */ : 16 /* LViewFlags.CheckAlways */;
18733
- const embeddedLView = createLView(declarationLView, embeddedTView, context, viewFlags, null, templateTNode, null, null, null, options?.injector ?? null, options?.dehydratedView ?? null);
18734
- const declarationLContainer = declarationLView[templateTNode.index];
18735
- ngDevMode && assertLContainer(declarationLContainer);
18736
- embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
18737
- const declarationViewLQueries = declarationLView[QUERIES];
18738
- if (declarationViewLQueries !== null) {
18739
- embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
18740
- }
18741
- // execute creation mode of a view
18742
- renderView(embeddedTView, embeddedLView, context);
18743
- return embeddedLView;
18744
- }
18745
- function getLViewFromLContainer(lContainer, index) {
18746
- const adjustedIndex = CONTAINER_HEADER_OFFSET + index;
18747
- // avoid reading past the array boundaries
18748
- if (adjustedIndex < lContainer.length) {
18749
- const lView = lContainer[adjustedIndex];
18750
- ngDevMode && assertLView(lView);
18751
- return lView;
18752
- }
18753
- return undefined;
18754
- }
18755
- /**
18756
- * Returns whether an elements that belong to a view should be
18757
- * inserted into the DOM. For client-only cases, DOM elements are
18758
- * always inserted. For hydration cases, we check whether serialized
18759
- * info is available for a view and the view is not in a "skip hydration"
18760
- * block (in which case view contents was re-created, thus needing insertion).
18761
- */
18762
- function shouldAddViewToDom(tNode, dehydratedView) {
18763
- return !dehydratedView || hasInSkipHydrationBlockFlag(tNode);
18764
- }
18765
- function addLViewToLContainer(lContainer, lView, index, addToDOM = true) {
18766
- const tView = lView[TVIEW];
18767
- // insert to the view tree so the new view can be change-detected
18768
- insertView(tView, lView, lContainer, index);
18769
- // insert to the view to the DOM tree
18770
- if (addToDOM) {
18771
- const beforeNode = getBeforeNodeForView(index, lContainer);
18772
- const renderer = lView[RENDERER];
18773
- const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);
18774
- if (parentRNode !== null) {
18775
- addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
18776
- }
18777
- }
18778
- }
18779
- function removeLViewFromLContainer(lContainer, index) {
18780
- const lView = detachView(lContainer, index);
18781
- if (lView !== undefined) {
18782
- destroyLView(lView[TVIEW], lView);
18783
- }
18784
- return lView;
18785
- }
18786
-
18787
18731
  const AT_THIS_LOCATION = '<-- AT THIS LOCATION';
18788
18732
  /**
18789
18733
  * Retrieves a user friendly string for a given TNodeType for use in
@@ -19144,6 +19088,95 @@ function shorten(input, maxLength = 50) {
19144
19088
  return input.length > maxLength ? `${input.substring(0, maxLength - 1)}…` : input;
19145
19089
  }
19146
19090
 
19091
+ /**
19092
+ * Removes all dehydrated views from a given LContainer:
19093
+ * both in internal data structure, as well as removing
19094
+ * corresponding DOM nodes that belong to that dehydrated view.
19095
+ */
19096
+ function removeDehydratedViews(lContainer) {
19097
+ const views = lContainer[DEHYDRATED_VIEWS] ?? [];
19098
+ const parentLView = lContainer[PARENT];
19099
+ const renderer = parentLView[RENDERER];
19100
+ for (const view of views) {
19101
+ removeDehydratedView(view, renderer);
19102
+ ngDevMode && ngDevMode.dehydratedViewsRemoved++;
19103
+ }
19104
+ // Reset the value to an empty array to indicate that no
19105
+ // further processing of dehydrated views is needed for
19106
+ // this view container (i.e. do not trigger the lookup process
19107
+ // once again in case a `ViewContainerRef` is created later).
19108
+ lContainer[DEHYDRATED_VIEWS] = EMPTY_ARRAY;
19109
+ }
19110
+ /**
19111
+ * Helper function to remove all nodes from a dehydrated view.
19112
+ */
19113
+ function removeDehydratedView(dehydratedView, renderer) {
19114
+ let nodesRemoved = 0;
19115
+ let currentRNode = dehydratedView.firstChild;
19116
+ if (currentRNode) {
19117
+ const numNodes = dehydratedView.data[NUM_ROOT_NODES];
19118
+ while (nodesRemoved < numNodes) {
19119
+ ngDevMode && validateSiblingNodeExists(currentRNode);
19120
+ const nextSibling = currentRNode.nextSibling;
19121
+ nativeRemoveNode(renderer, currentRNode, false);
19122
+ currentRNode = nextSibling;
19123
+ nodesRemoved++;
19124
+ }
19125
+ }
19126
+ }
19127
+ /**
19128
+ * Walks over all views within this LContainer invokes dehydrated views
19129
+ * cleanup function for each one.
19130
+ */
19131
+ function cleanupLContainer(lContainer) {
19132
+ removeDehydratedViews(lContainer);
19133
+ for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
19134
+ cleanupLView(lContainer[i]);
19135
+ }
19136
+ }
19137
+ /**
19138
+ * Walks over `LContainer`s and components registered within
19139
+ * this LView and invokes dehydrated views cleanup function for each one.
19140
+ */
19141
+ function cleanupLView(lView) {
19142
+ const tView = lView[TVIEW];
19143
+ for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
19144
+ if (isLContainer(lView[i])) {
19145
+ const lContainer = lView[i];
19146
+ cleanupLContainer(lContainer);
19147
+ }
19148
+ else if (isLView(lView[i])) {
19149
+ // This is a component, enter the `cleanupLView` recursively.
19150
+ cleanupLView(lView[i]);
19151
+ }
19152
+ }
19153
+ }
19154
+ /**
19155
+ * Walks over all views registered within the ApplicationRef and removes
19156
+ * all dehydrated views from all `LContainer`s along the way.
19157
+ */
19158
+ function cleanupDehydratedViews(appRef) {
19159
+ const viewRefs = appRef._views;
19160
+ for (const viewRef of viewRefs) {
19161
+ const lNode = getLNodeForHydration(viewRef);
19162
+ // An `lView` might be `null` if a `ViewRef` represents
19163
+ // an embedded view (not a component view).
19164
+ if (lNode !== null && lNode[HOST] !== null) {
19165
+ if (isLView(lNode)) {
19166
+ cleanupLView(lNode);
19167
+ }
19168
+ else {
19169
+ // Cleanup in the root component view
19170
+ const componentLView = lNode[HOST];
19171
+ cleanupLView(componentLView);
19172
+ // Cleanup in all views within this view container
19173
+ cleanupLContainer(lNode);
19174
+ }
19175
+ ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;
19176
+ }
19177
+ }
19178
+ }
19179
+
19147
19180
  /**
19148
19181
  * Regexp that extracts a reference node information from the compressed node location.
19149
19182
  * The reference node is represented as either:
@@ -19466,420 +19499,6 @@ function calcPathForNode(tNode, lView) {
19466
19499
  return path;
19467
19500
  }
19468
19501
 
19469
- function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {
19470
- ngDevMode && assertFirstCreatePass(tView);
19471
- ngDevMode && ngDevMode.firstCreatePass++;
19472
- const tViewConsts = tView.consts;
19473
- // TODO(pk): refactor getOrCreateTNode to have the "create" only version
19474
- const tNode = getOrCreateTNode(tView, index, 4 /* TNodeType.Container */, tagName || null, getConstant(tViewConsts, attrsIndex));
19475
- resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
19476
- registerPostOrderHooks(tView, tNode);
19477
- const embeddedTView = tNode.tView = createTView(2 /* TViewType.Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts, null /* ssrId */);
19478
- if (tView.queries !== null) {
19479
- tView.queries.template(tView, tNode);
19480
- embeddedTView.queries = tView.queries.embeddedTView(tNode);
19481
- }
19482
- return tNode;
19483
- }
19484
- /**
19485
- * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
19486
- *
19487
- * <ng-template #foo>
19488
- * <div></div>
19489
- * </ng-template>
19490
- *
19491
- * @param index The index of the container in the data array
19492
- * @param templateFn Inline template
19493
- * @param decls The number of nodes, local refs, and pipes for this template
19494
- * @param vars The number of bindings for this template
19495
- * @param tagName The name of the container element, if applicable
19496
- * @param attrsIndex Index of template attributes in the `consts` array.
19497
- * @param localRefs Index of the local references in the `consts` array.
19498
- * @param localRefExtractor A function which extracts local-refs values from the template.
19499
- * Defaults to the current element associated with the local-ref.
19500
- *
19501
- * @codeGenApi
19502
- */
19503
- function ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
19504
- const lView = getLView();
19505
- const tView = getTView();
19506
- const adjustedIndex = index + HEADER_OFFSET;
19507
- const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :
19508
- tView.data[adjustedIndex];
19509
- setCurrentTNode(tNode, false);
19510
- const comment = _locateOrCreateContainerAnchor(tView, lView, tNode, index);
19511
- if (wasLastNodeCreated()) {
19512
- appendChild(tView, lView, comment, tNode);
19513
- }
19514
- attachPatchData(comment, lView);
19515
- addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));
19516
- if (isDirectiveHost(tNode)) {
19517
- createDirectivesInstances(tView, lView, tNode);
19518
- }
19519
- if (localRefsIndex != null) {
19520
- saveResolvedLocalsInData(lView, tNode, localRefExtractor);
19521
- }
19522
- return ɵɵtemplate;
19523
- }
19524
- let _locateOrCreateContainerAnchor = createContainerAnchorImpl;
19525
- /**
19526
- * Regular creation mode for LContainers and their anchor (comment) nodes.
19527
- */
19528
- function createContainerAnchorImpl(tView, lView, tNode, index) {
19529
- lastNodeWasCreated(true);
19530
- return lView[RENDERER].createComment(ngDevMode ? 'container' : '');
19531
- }
19532
- /**
19533
- * Enables hydration code path (to lookup existing elements in DOM)
19534
- * in addition to the regular creation mode for LContainers and their
19535
- * anchor (comment) nodes.
19536
- */
19537
- function locateOrCreateContainerAnchorImpl(tView, lView, tNode, index) {
19538
- const hydrationInfo = lView[HYDRATION];
19539
- const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock$1() || isDisconnectedNode$1(hydrationInfo, index);
19540
- lastNodeWasCreated(isNodeCreationMode);
19541
- // Regular creation mode.
19542
- if (isNodeCreationMode) {
19543
- return createContainerAnchorImpl(tView, lView, tNode, index);
19544
- }
19545
- const ssrId = hydrationInfo.data[TEMPLATES]?.[index] ?? null;
19546
- // Apply `ssrId` value to the underlying TView if it was not previously set.
19547
- //
19548
- // There might be situations when the same component is present in a template
19549
- // multiple times and some instances are opted-out of using hydration via
19550
- // `ngSkipHydration` attribute. In this scenario, at the time a TView is created,
19551
- // the `ssrId` might be `null` (if the first component is opted-out of hydration).
19552
- // The code below makes sure that the `ssrId` is applied to the TView if it's still
19553
- // `null` and verifies we never try to override it with a different value.
19554
- if (ssrId !== null && tNode.tView !== null) {
19555
- if (tNode.tView.ssrId === null) {
19556
- tNode.tView.ssrId = ssrId;
19557
- }
19558
- else {
19559
- ngDevMode &&
19560
- assertEqual(tNode.tView.ssrId, ssrId, 'Unexpected value of the `ssrId` for this TView');
19561
- }
19562
- }
19563
- // Hydration mode, looking up existing elements in DOM.
19564
- const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode);
19565
- ngDevMode && validateNodeExists(currentRNode, lView, tNode);
19566
- setSegmentHead(hydrationInfo, index, currentRNode);
19567
- const viewContainerSize = calcSerializedContainerSize(hydrationInfo, index);
19568
- const comment = siblingAfter(viewContainerSize, currentRNode);
19569
- if (ngDevMode) {
19570
- validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);
19571
- markRNodeAsClaimedByHydration(comment);
19572
- }
19573
- return comment;
19574
- }
19575
- function enableLocateOrCreateContainerAnchorImpl() {
19576
- _locateOrCreateContainerAnchor = locateOrCreateContainerAnchorImpl;
19577
- }
19578
-
19579
- /**
19580
- * The conditional instruction represents the basic building block on the runtime side to support
19581
- * built-in "if" and "switch". On the high level this instruction is responsible for adding and
19582
- * removing views selected by a conditional expression.
19583
- *
19584
- * @param containerIndex index of a container in a host view (indexed from HEADER_OFFSET) where
19585
- * conditional views should be inserted.
19586
- * @param matchingTemplateIndex index of a template TNode representing a conditional view to be
19587
- * inserted; -1 represents a special case when there is no view to insert.
19588
- * @codeGenApi
19589
- */
19590
- function ɵɵconditional(containerIndex, matchingTemplateIndex, value) {
19591
- const hostLView = getLView();
19592
- const bindingIndex = nextBindingIndex();
19593
- const lContainer = getLContainer(hostLView, HEADER_OFFSET + containerIndex);
19594
- const viewInContainerIdx = 0;
19595
- if (bindingUpdated(hostLView, bindingIndex, matchingTemplateIndex)) {
19596
- // The index of the view to show changed - remove the previously displayed one
19597
- // (it is a noop if there are no active views in a container).
19598
- removeLViewFromLContainer(lContainer, viewInContainerIdx);
19599
- // Index -1 is a special case where none of the conditions evaluates to
19600
- // a truthy value and as the consequence we've got no view to show.
19601
- if (matchingTemplateIndex !== -1) {
19602
- const templateTNode = getExistingTNode(hostLView[TVIEW], matchingTemplateIndex);
19603
- const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, value);
19604
- addLViewToLContainer(lContainer, embeddedLView, viewInContainerIdx);
19605
- }
19606
- }
19607
- else {
19608
- // We might keep displaying the same template but the actual value of the expression could have
19609
- // changed - re-bind in context.
19610
- const lView = getLViewFromLContainer(lContainer, viewInContainerIdx);
19611
- if (lView !== undefined) {
19612
- lView[CONTEXT] = value;
19613
- }
19614
- }
19615
- }
19616
- class RepeaterContext {
19617
- constructor(lContainer, $implicit, $index) {
19618
- this.lContainer = lContainer;
19619
- this.$implicit = $implicit;
19620
- this.$index = $index;
19621
- }
19622
- get $count() {
19623
- return this.lContainer.length - CONTAINER_HEADER_OFFSET;
19624
- }
19625
- }
19626
- /**
19627
- * A built-in trackBy function used for situations where users specified collection index as a
19628
- * tracking expression. Having this function body in the runtime avoids unnecessary code generation.
19629
- *
19630
- * @param index
19631
- * @returns
19632
- */
19633
- function ɵɵrepeaterTrackByIndex(index) {
19634
- return index;
19635
- }
19636
- /**
19637
- * A built-in trackBy function used for situations where users specified collection item reference
19638
- * as a tracking expression. Having this function body in the runtime avoids unnecessary code
19639
- * generation.
19640
- *
19641
- * @param index
19642
- * @returns
19643
- */
19644
- function ɵɵrepeaterTrackByIdentity(_, value) {
19645
- return value;
19646
- }
19647
- class RepeaterMetadata {
19648
- constructor(hasEmptyBlock, differ) {
19649
- this.hasEmptyBlock = hasEmptyBlock;
19650
- this.differ = differ;
19651
- }
19652
- }
19653
- /**
19654
- * The repeaterCreate instruction runs in the creation part of the template pass and initializes
19655
- * internal data structures required by the update pass of the built-in repeater logic. Repeater
19656
- * metadata are allocated in the data part of LView with the following layout:
19657
- * - LView[HEADER_OFFSET + index] - metadata
19658
- * - LView[HEADER_OFFSET + index + 1] - reference to a template function rendering an item
19659
- * - LView[HEADER_OFFSET + index + 2] - optional reference to a template function rendering an empty
19660
- * block
19661
- *
19662
- * @param index Index at which to store the metadata of the repeater.
19663
- * @param templateFn Reference to the template of the main repeater block.
19664
- * @param decls The number of nodes, local refs, and pipes for the main block.
19665
- * @param vars The number of bindings for the main block.
19666
- * @param trackByFn Reference to the tracking function.
19667
- * @param trackByUsesComponentInstance Whether the tracking function has any references to the
19668
- * component instance. If it doesn't, we can avoid rebinding it.
19669
- * @param emptyTemplateFn Reference to the template function of the empty block.
19670
- * @param emptyDecls The number of nodes, local refs, and pipes for the empty block.
19671
- * @param emptyVars The number of bindings for the empty block.
19672
- *
19673
- * @codeGenApi
19674
- */
19675
- function ɵɵrepeaterCreate(index, templateFn, decls, vars, trackByFn, trackByUsesComponentInstance, emptyTemplateFn, emptyDecls, emptyVars) {
19676
- const hasEmptyBlock = emptyTemplateFn !== undefined;
19677
- const hostLView = getLView();
19678
- const boundTrackBy = trackByUsesComponentInstance ?
19679
- // We only want to bind when necessary, because it produces a
19680
- // new function. For pure functions it's not necessary.
19681
- trackByFn.bind(hostLView[DECLARATION_COMPONENT_VIEW][CONTEXT]) :
19682
- trackByFn;
19683
- const metadata = new RepeaterMetadata(hasEmptyBlock, new DefaultIterableDiffer(boundTrackBy));
19684
- hostLView[HEADER_OFFSET + index] = metadata;
19685
- ɵɵtemplate(index + 1, templateFn, decls, vars);
19686
- if (hasEmptyBlock) {
19687
- ngDevMode &&
19688
- assertDefined(emptyDecls, 'Missing number of declarations for the empty repeater block.');
19689
- ngDevMode &&
19690
- assertDefined(emptyVars, 'Missing number of bindings for the empty repeater block.');
19691
- ɵɵtemplate(index + 2, emptyTemplateFn, emptyDecls, emptyVars);
19692
- }
19693
- }
19694
- /**
19695
- * The repeater instruction does update-time diffing of a provided collection (against the
19696
- * collection seen previously) and maps changes in the collection to views structure (by adding,
19697
- * removing or moving views as needed).
19698
- * @param metadataSlotIdx - index in data where we can find an instance of RepeaterMetadata with
19699
- * additional information (ex. differ) needed to process collection diffing and view
19700
- * manipulation
19701
- * @param collection - the collection instance to be checked for changes
19702
- * @codeGenApi
19703
- */
19704
- function ɵɵrepeater(metadataSlotIdx, collection) {
19705
- const hostLView = getLView();
19706
- const hostTView = hostLView[TVIEW];
19707
- const metadata = hostLView[HEADER_OFFSET + metadataSlotIdx];
19708
- const differ = metadata.differ;
19709
- const changes = differ.diff(collection);
19710
- // handle repeater changes
19711
- if (changes !== null) {
19712
- const containerIndex = metadataSlotIdx + 1;
19713
- const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);
19714
- const lContainer = getLContainer(hostLView, HEADER_OFFSET + containerIndex);
19715
- let needsIndexUpdate = false;
19716
- changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {
19717
- if (item.previousIndex === null) {
19718
- // add
19719
- const newViewIdx = adjustToLastLContainerIndex(lContainer, currentIndex);
19720
- const embeddedLView = createAndRenderEmbeddedLView(hostLView, itemTemplateTNode, new RepeaterContext(lContainer, item.item, newViewIdx));
19721
- addLViewToLContainer(lContainer, embeddedLView, newViewIdx);
19722
- needsIndexUpdate = true;
19723
- }
19724
- else if (currentIndex === null) {
19725
- // remove
19726
- adjustedPreviousIndex = adjustToLastLContainerIndex(lContainer, adjustedPreviousIndex);
19727
- removeLViewFromLContainer(lContainer, adjustedPreviousIndex);
19728
- needsIndexUpdate = true;
19729
- }
19730
- else if (adjustedPreviousIndex !== null) {
19731
- // move
19732
- const existingLView = detachExistingView(lContainer, adjustedPreviousIndex);
19733
- addLViewToLContainer(lContainer, existingLView, currentIndex);
19734
- needsIndexUpdate = true;
19735
- }
19736
- });
19737
- // A trackBy function might return the same value even if the underlying item changed - re-bind
19738
- // it in the context.
19739
- changes.forEachIdentityChange((record) => {
19740
- const viewIdx = adjustToLastLContainerIndex(lContainer, record.currentIndex);
19741
- const lView = getExistingLViewFromLContainer(lContainer, viewIdx);
19742
- lView[CONTEXT].$implicit = record.item;
19743
- });
19744
- // moves in the container might caused context's index to get out of order, re-adjust
19745
- if (needsIndexUpdate) {
19746
- for (let i = 0; i < lContainer.length - CONTAINER_HEADER_OFFSET; i++) {
19747
- const lView = getExistingLViewFromLContainer(lContainer, i);
19748
- lView[CONTEXT].$index = i;
19749
- }
19750
- }
19751
- }
19752
- // handle empty blocks
19753
- const bindingIndex = nextBindingIndex();
19754
- if (metadata.hasEmptyBlock) {
19755
- const hasItemsInCollection = differ.length > 0;
19756
- if (bindingUpdated(hostLView, bindingIndex, hasItemsInCollection)) {
19757
- const emptyTemplateIndex = metadataSlotIdx + 2;
19758
- const lContainer = getLContainer(hostLView, HEADER_OFFSET + emptyTemplateIndex);
19759
- if (hasItemsInCollection) {
19760
- removeLViewFromLContainer(lContainer, 0);
19761
- }
19762
- else {
19763
- const emptyTemplateTNode = getExistingTNode(hostTView, emptyTemplateIndex);
19764
- const embeddedLView = createAndRenderEmbeddedLView(hostLView, emptyTemplateTNode, undefined);
19765
- addLViewToLContainer(lContainer, embeddedLView, 0);
19766
- }
19767
- }
19768
- }
19769
- }
19770
- function getLContainer(lView, index) {
19771
- const lContainer = lView[index];
19772
- ngDevMode && assertLContainer(lContainer);
19773
- return lContainer;
19774
- }
19775
- function adjustToLastLContainerIndex(lContainer, index) {
19776
- return index !== null ? index : lContainer.length - CONTAINER_HEADER_OFFSET;
19777
- }
19778
- function detachExistingView(lContainer, index) {
19779
- const existingLView = detachView(lContainer, index);
19780
- ngDevMode && assertLView(existingLView);
19781
- return existingLView;
19782
- }
19783
- function getExistingLViewFromLContainer(lContainer, index) {
19784
- const existingLView = getLViewFromLContainer(lContainer, index);
19785
- ngDevMode && assertLView(existingLView);
19786
- return existingLView;
19787
- }
19788
- function getExistingTNode(tView, index) {
19789
- const tNode = getTNode(tView, index + HEADER_OFFSET);
19790
- ngDevMode && assertTNode(tNode);
19791
- return tNode;
19792
- }
19793
-
19794
- /**
19795
- * Removes all dehydrated views from a given LContainer:
19796
- * both in internal data structure, as well as removing
19797
- * corresponding DOM nodes that belong to that dehydrated view.
19798
- */
19799
- function removeDehydratedViews(lContainer) {
19800
- const views = lContainer[DEHYDRATED_VIEWS] ?? [];
19801
- const parentLView = lContainer[PARENT];
19802
- const renderer = parentLView[RENDERER];
19803
- for (const view of views) {
19804
- removeDehydratedView(view, renderer);
19805
- ngDevMode && ngDevMode.dehydratedViewsRemoved++;
19806
- }
19807
- // Reset the value to an empty array to indicate that no
19808
- // further processing of dehydrated views is needed for
19809
- // this view container (i.e. do not trigger the lookup process
19810
- // once again in case a `ViewContainerRef` is created later).
19811
- lContainer[DEHYDRATED_VIEWS] = EMPTY_ARRAY;
19812
- }
19813
- /**
19814
- * Helper function to remove all nodes from a dehydrated view.
19815
- */
19816
- function removeDehydratedView(dehydratedView, renderer) {
19817
- let nodesRemoved = 0;
19818
- let currentRNode = dehydratedView.firstChild;
19819
- if (currentRNode) {
19820
- const numNodes = dehydratedView.data[NUM_ROOT_NODES];
19821
- while (nodesRemoved < numNodes) {
19822
- ngDevMode && validateSiblingNodeExists(currentRNode);
19823
- const nextSibling = currentRNode.nextSibling;
19824
- nativeRemoveNode(renderer, currentRNode, false);
19825
- currentRNode = nextSibling;
19826
- nodesRemoved++;
19827
- }
19828
- }
19829
- }
19830
- /**
19831
- * Walks over all views within this LContainer invokes dehydrated views
19832
- * cleanup function for each one.
19833
- */
19834
- function cleanupLContainer(lContainer) {
19835
- removeDehydratedViews(lContainer);
19836
- for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
19837
- cleanupLView(lContainer[i]);
19838
- }
19839
- }
19840
- /**
19841
- * Walks over `LContainer`s and components registered within
19842
- * this LView and invokes dehydrated views cleanup function for each one.
19843
- */
19844
- function cleanupLView(lView) {
19845
- const tView = lView[TVIEW];
19846
- for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
19847
- if (isLContainer(lView[i])) {
19848
- const lContainer = lView[i];
19849
- cleanupLContainer(lContainer);
19850
- }
19851
- else if (isLView(lView[i])) {
19852
- // This is a component, enter the `cleanupLView` recursively.
19853
- cleanupLView(lView[i]);
19854
- }
19855
- }
19856
- }
19857
- /**
19858
- * Walks over all views registered within the ApplicationRef and removes
19859
- * all dehydrated views from all `LContainer`s along the way.
19860
- */
19861
- function cleanupDehydratedViews(appRef) {
19862
- const viewRefs = appRef._views;
19863
- for (const viewRef of viewRefs) {
19864
- const lNode = getLNodeForHydration(viewRef);
19865
- // An `lView` might be `null` if a `ViewRef` represents
19866
- // an embedded view (not a component view).
19867
- if (lNode !== null && lNode[HOST] !== null) {
19868
- if (isLView(lNode)) {
19869
- cleanupLView(lNode);
19870
- }
19871
- else {
19872
- // Cleanup in the root component view
19873
- const componentLView = lNode[HOST];
19874
- cleanupLView(componentLView);
19875
- // Cleanup in all views within this view container
19876
- cleanupLContainer(lNode);
19877
- }
19878
- ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;
19879
- }
19880
- }
19881
- }
19882
-
19883
19502
  /**
19884
19503
  * Given a current DOM node and a serialized information about the views
19885
19504
  * in a container, walks over the DOM structure, collecting the list of
@@ -19925,8 +19544,8 @@ let _findMatchingDehydratedViewImpl = (lContainer, template) => null;
19925
19544
  * in this container.
19926
19545
  */
19927
19546
  function findMatchingDehydratedViewImpl(lContainer, template) {
19928
- const views = lContainer[DEHYDRATED_VIEWS] ?? [];
19929
- if (!template || views.length === 0) {
19547
+ const views = lContainer[DEHYDRATED_VIEWS];
19548
+ if (!template || views === null || views.length === 0) {
19930
19549
  return null;
19931
19550
  }
19932
19551
  const view = views[0];
@@ -19953,6 +19572,67 @@ function findMatchingDehydratedView(lContainer, template) {
19953
19572
  return _findMatchingDehydratedViewImpl(lContainer, template);
19954
19573
  }
19955
19574
 
19575
+ function createAndRenderEmbeddedLView(declarationLView, templateTNode, context, options) {
19576
+ const embeddedTView = templateTNode.tView;
19577
+ ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');
19578
+ ngDevMode && assertTNodeForLView(templateTNode, declarationLView);
19579
+ // Embedded views follow the change detection strategy of the view they're declared in.
19580
+ const isSignalView = declarationLView[FLAGS] & 4096 /* LViewFlags.SignalView */;
19581
+ const viewFlags = isSignalView ? 4096 /* LViewFlags.SignalView */ : 16 /* LViewFlags.CheckAlways */;
19582
+ const embeddedLView = createLView(declarationLView, embeddedTView, context, viewFlags, null, templateTNode, null, null, null, options?.injector ?? null, options?.dehydratedView ?? null);
19583
+ const declarationLContainer = declarationLView[templateTNode.index];
19584
+ ngDevMode && assertLContainer(declarationLContainer);
19585
+ embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
19586
+ const declarationViewLQueries = declarationLView[QUERIES];
19587
+ if (declarationViewLQueries !== null) {
19588
+ embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
19589
+ }
19590
+ // execute creation mode of a view
19591
+ renderView(embeddedTView, embeddedLView, context);
19592
+ return embeddedLView;
19593
+ }
19594
+ function getLViewFromLContainer(lContainer, index) {
19595
+ const adjustedIndex = CONTAINER_HEADER_OFFSET + index;
19596
+ // avoid reading past the array boundaries
19597
+ if (adjustedIndex < lContainer.length) {
19598
+ const lView = lContainer[adjustedIndex];
19599
+ ngDevMode && assertLView(lView);
19600
+ return lView;
19601
+ }
19602
+ return undefined;
19603
+ }
19604
+ /**
19605
+ * Returns whether an elements that belong to a view should be
19606
+ * inserted into the DOM. For client-only cases, DOM elements are
19607
+ * always inserted. For hydration cases, we check whether serialized
19608
+ * info is available for a view and the view is not in a "skip hydration"
19609
+ * block (in which case view contents was re-created, thus needing insertion).
19610
+ */
19611
+ function shouldAddViewToDom(tNode, dehydratedView) {
19612
+ return !dehydratedView || hasInSkipHydrationBlockFlag(tNode);
19613
+ }
19614
+ function addLViewToLContainer(lContainer, lView, index, addToDOM = true) {
19615
+ const tView = lView[TVIEW];
19616
+ // insert to the view tree so the new view can be change-detected
19617
+ insertView(tView, lView, lContainer, index);
19618
+ // insert to the view to the DOM tree
19619
+ if (addToDOM) {
19620
+ const beforeNode = getBeforeNodeForView(index, lContainer);
19621
+ const renderer = lView[RENDERER];
19622
+ const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);
19623
+ if (parentRNode !== null) {
19624
+ addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
19625
+ }
19626
+ }
19627
+ }
19628
+ function removeLViewFromLContainer(lContainer, index) {
19629
+ const lView = detachView(lContainer, index);
19630
+ if (lView !== undefined) {
19631
+ destroyLView(lView[TVIEW], lView);
19632
+ }
19633
+ return lView;
19634
+ }
19635
+
19956
19636
  /**
19957
19637
  * Represents a container where one or more views can be attached to a component.
19958
19638
  *
@@ -20277,20 +19957,22 @@ function insertAnchorNode(hostLView, hostTNode) {
20277
19957
  return commentNode;
20278
19958
  }
20279
19959
  let _locateOrCreateAnchorNode = createAnchorNode;
20280
- let _populateDehydratedViewsInContainer = (lContainer, lView, tNode) => false; // noop by default
19960
+ let _populateDehydratedViewsInLContainer = (lContainer, tNode, hostLView) => false; // noop by default
20281
19961
  /**
20282
19962
  * Looks up dehydrated views that belong to a given LContainer and populates
20283
19963
  * this information into the `LContainer[DEHYDRATED_VIEWS]` slot. When running
20284
19964
  * in client-only mode, this function is a noop.
20285
19965
  *
20286
19966
  * @param lContainer LContainer that should be populated.
19967
+ * @param tNode Corresponding TNode.
19968
+ * @param hostLView LView that hosts LContainer.
20287
19969
  * @returns a boolean flag that indicates whether a populating operation
20288
19970
  * was successful. The operation might be unsuccessful in case is has completed
20289
19971
  * previously, we are rendering in client-only mode or this content is located
20290
19972
  * in a skip hydration section.
20291
19973
  */
20292
- function populateDehydratedViewsInContainer(lContainer) {
20293
- return _populateDehydratedViewsInContainer(lContainer, getLView(), getCurrentTNode());
19974
+ function populateDehydratedViewsInLContainer(lContainer, tNode, hostLView) {
19975
+ return _populateDehydratedViewsInLContainer(lContainer, tNode, hostLView);
20294
19976
  }
20295
19977
  /**
20296
19978
  * Regular creation mode: an anchor is created and
@@ -20322,7 +20004,7 @@ function createAnchorNode(lContainer, hostLView, hostTNode, slotValue) {
20322
20004
  * previously, we are rendering in client-only mode or this content is located
20323
20005
  * in a skip hydration section.
20324
20006
  */
20325
- function populateDehydratedViewsInContainerImpl(lContainer, hostLView, hostTNode) {
20007
+ function populateDehydratedViewsInLContainerImpl(lContainer, tNode, hostLView) {
20326
20008
  // We already have a native element (anchor) set and the process
20327
20009
  // of finding dehydrated views happened (so the `lContainer[DEHYDRATED_VIEWS]`
20328
20010
  // is not null), exit early.
@@ -20330,10 +20012,10 @@ function populateDehydratedViewsInContainerImpl(lContainer, hostLView, hostTNode
20330
20012
  return true;
20331
20013
  }
20332
20014
  const hydrationInfo = hostLView[HYDRATION];
20333
- const noOffsetIndex = hostTNode.index - HEADER_OFFSET;
20015
+ const noOffsetIndex = tNode.index - HEADER_OFFSET;
20334
20016
  // TODO(akushnir): this should really be a single condition, refactor the code
20335
20017
  // to use `hasInSkipHydrationBlockFlag` logic inside `isInSkipHydrationBlock`.
20336
- const skipHydration = isInSkipHydrationBlock(hostTNode) || hasInSkipHydrationBlockFlag(hostTNode);
20018
+ const skipHydration = isInSkipHydrationBlock(tNode) || hasInSkipHydrationBlockFlag(tNode);
20337
20019
  const isNodeCreationMode = !hydrationInfo || skipHydration || isDisconnectedNode$1(hydrationInfo, noOffsetIndex);
20338
20020
  // Regular creation mode.
20339
20021
  if (isNodeCreationMode) {
@@ -20347,7 +20029,7 @@ function populateDehydratedViewsInContainerImpl(lContainer, hostLView, hostTNode
20347
20029
  'which represents a view container.');
20348
20030
  const [commentNode, dehydratedViews] = locateDehydratedViewsInContainer(currentRNode, serializedViews);
20349
20031
  if (ngDevMode) {
20350
- validateMatchingNode(commentNode, Node.COMMENT_NODE, null, hostLView, hostTNode, true);
20032
+ validateMatchingNode(commentNode, Node.COMMENT_NODE, null, hostLView, tNode, true);
20351
20033
  // Do not throw in case this node is already claimed (thus `false` as a second
20352
20034
  // argument). If this container is created based on an `<ng-template>`, the comment
20353
20035
  // node would be already claimed from the `template` instruction. If an element acts
@@ -20360,7 +20042,7 @@ function populateDehydratedViewsInContainerImpl(lContainer, hostLView, hostTNode
20360
20042
  return true;
20361
20043
  }
20362
20044
  function locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue) {
20363
- if (!_populateDehydratedViewsInContainer(lContainer, hostLView, hostTNode)) {
20045
+ if (!_populateDehydratedViewsInLContainer(lContainer, hostTNode, hostLView)) {
20364
20046
  // Populating dehydrated views operation returned `false`, which indicates
20365
20047
  // that the logic was running in client-only mode, this an anchor comment
20366
20048
  // node should be created for this container.
@@ -20369,7 +20051,339 @@ function locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue) {
20369
20051
  }
20370
20052
  function enableLocateOrCreateContainerRefImpl() {
20371
20053
  _locateOrCreateAnchorNode = locateOrCreateAnchorNode;
20372
- _populateDehydratedViewsInContainer = populateDehydratedViewsInContainerImpl;
20054
+ _populateDehydratedViewsInLContainer = populateDehydratedViewsInLContainerImpl;
20055
+ }
20056
+
20057
+ function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {
20058
+ ngDevMode && assertFirstCreatePass(tView);
20059
+ ngDevMode && ngDevMode.firstCreatePass++;
20060
+ const tViewConsts = tView.consts;
20061
+ // TODO(pk): refactor getOrCreateTNode to have the "create" only version
20062
+ const tNode = getOrCreateTNode(tView, index, 4 /* TNodeType.Container */, tagName || null, getConstant(tViewConsts, attrsIndex));
20063
+ resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
20064
+ registerPostOrderHooks(tView, tNode);
20065
+ const embeddedTView = tNode.tView = createTView(2 /* TViewType.Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts, null /* ssrId */);
20066
+ if (tView.queries !== null) {
20067
+ tView.queries.template(tView, tNode);
20068
+ embeddedTView.queries = tView.queries.embeddedTView(tNode);
20069
+ }
20070
+ return tNode;
20071
+ }
20072
+ /**
20073
+ * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
20074
+ *
20075
+ * <ng-template #foo>
20076
+ * <div></div>
20077
+ * </ng-template>
20078
+ *
20079
+ * @param index The index of the container in the data array
20080
+ * @param templateFn Inline template
20081
+ * @param decls The number of nodes, local refs, and pipes for this template
20082
+ * @param vars The number of bindings for this template
20083
+ * @param tagName The name of the container element, if applicable
20084
+ * @param attrsIndex Index of template attributes in the `consts` array.
20085
+ * @param localRefs Index of the local references in the `consts` array.
20086
+ * @param localRefExtractor A function which extracts local-refs values from the template.
20087
+ * Defaults to the current element associated with the local-ref.
20088
+ *
20089
+ * @codeGenApi
20090
+ */
20091
+ function ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
20092
+ const lView = getLView();
20093
+ const tView = getTView();
20094
+ const adjustedIndex = index + HEADER_OFFSET;
20095
+ const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :
20096
+ tView.data[adjustedIndex];
20097
+ setCurrentTNode(tNode, false);
20098
+ const comment = _locateOrCreateContainerAnchor(tView, lView, tNode, index);
20099
+ if (wasLastNodeCreated()) {
20100
+ appendChild(tView, lView, comment, tNode);
20101
+ }
20102
+ attachPatchData(comment, lView);
20103
+ const lContainer = createLContainer(comment, lView, comment, tNode);
20104
+ lView[adjustedIndex] = lContainer;
20105
+ addToViewTree(lView, lContainer);
20106
+ // If hydration is enabled, looks up dehydrated views in the DOM
20107
+ // using hydration annotation info and stores those views on LContainer.
20108
+ // In client-only mode, this function is a noop.
20109
+ populateDehydratedViewsInLContainer(lContainer, tNode, lView);
20110
+ if (isDirectiveHost(tNode)) {
20111
+ createDirectivesInstances(tView, lView, tNode);
20112
+ }
20113
+ if (localRefsIndex != null) {
20114
+ saveResolvedLocalsInData(lView, tNode, localRefExtractor);
20115
+ }
20116
+ return ɵɵtemplate;
20117
+ }
20118
+ let _locateOrCreateContainerAnchor = createContainerAnchorImpl;
20119
+ /**
20120
+ * Regular creation mode for LContainers and their anchor (comment) nodes.
20121
+ */
20122
+ function createContainerAnchorImpl(tView, lView, tNode, index) {
20123
+ lastNodeWasCreated(true);
20124
+ return lView[RENDERER].createComment(ngDevMode ? 'container' : '');
20125
+ }
20126
+ /**
20127
+ * Enables hydration code path (to lookup existing elements in DOM)
20128
+ * in addition to the regular creation mode for LContainers and their
20129
+ * anchor (comment) nodes.
20130
+ */
20131
+ function locateOrCreateContainerAnchorImpl(tView, lView, tNode, index) {
20132
+ const hydrationInfo = lView[HYDRATION];
20133
+ const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock$1() || isDisconnectedNode$1(hydrationInfo, index);
20134
+ lastNodeWasCreated(isNodeCreationMode);
20135
+ // Regular creation mode.
20136
+ if (isNodeCreationMode) {
20137
+ return createContainerAnchorImpl(tView, lView, tNode, index);
20138
+ }
20139
+ const ssrId = hydrationInfo.data[TEMPLATES]?.[index] ?? null;
20140
+ // Apply `ssrId` value to the underlying TView if it was not previously set.
20141
+ //
20142
+ // There might be situations when the same component is present in a template
20143
+ // multiple times and some instances are opted-out of using hydration via
20144
+ // `ngSkipHydration` attribute. In this scenario, at the time a TView is created,
20145
+ // the `ssrId` might be `null` (if the first component is opted-out of hydration).
20146
+ // The code below makes sure that the `ssrId` is applied to the TView if it's still
20147
+ // `null` and verifies we never try to override it with a different value.
20148
+ if (ssrId !== null && tNode.tView !== null) {
20149
+ if (tNode.tView.ssrId === null) {
20150
+ tNode.tView.ssrId = ssrId;
20151
+ }
20152
+ else {
20153
+ ngDevMode &&
20154
+ assertEqual(tNode.tView.ssrId, ssrId, 'Unexpected value of the `ssrId` for this TView');
20155
+ }
20156
+ }
20157
+ // Hydration mode, looking up existing elements in DOM.
20158
+ const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode);
20159
+ ngDevMode && validateNodeExists(currentRNode, lView, tNode);
20160
+ setSegmentHead(hydrationInfo, index, currentRNode);
20161
+ const viewContainerSize = calcSerializedContainerSize(hydrationInfo, index);
20162
+ const comment = siblingAfter(viewContainerSize, currentRNode);
20163
+ if (ngDevMode) {
20164
+ validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);
20165
+ markRNodeAsClaimedByHydration(comment);
20166
+ }
20167
+ return comment;
20168
+ }
20169
+ function enableLocateOrCreateContainerAnchorImpl() {
20170
+ _locateOrCreateContainerAnchor = locateOrCreateContainerAnchorImpl;
20171
+ }
20172
+
20173
+ /**
20174
+ * The conditional instruction represents the basic building block on the runtime side to support
20175
+ * built-in "if" and "switch". On the high level this instruction is responsible for adding and
20176
+ * removing views selected by a conditional expression.
20177
+ *
20178
+ * @param containerIndex index of a container in a host view (indexed from HEADER_OFFSET) where
20179
+ * conditional views should be inserted.
20180
+ * @param matchingTemplateIndex index of a template TNode representing a conditional view to be
20181
+ * inserted; -1 represents a special case when there is no view to insert.
20182
+ * @codeGenApi
20183
+ */
20184
+ function ɵɵconditional(containerIndex, matchingTemplateIndex, value) {
20185
+ const hostLView = getLView();
20186
+ const bindingIndex = nextBindingIndex();
20187
+ const lContainer = getLContainer(hostLView, HEADER_OFFSET + containerIndex);
20188
+ const viewInContainerIdx = 0;
20189
+ if (bindingUpdated(hostLView, bindingIndex, matchingTemplateIndex)) {
20190
+ // The index of the view to show changed - remove the previously displayed one
20191
+ // (it is a noop if there are no active views in a container).
20192
+ removeLViewFromLContainer(lContainer, viewInContainerIdx);
20193
+ // Index -1 is a special case where none of the conditions evaluates to
20194
+ // a truthy value and as the consequence we've got no view to show.
20195
+ if (matchingTemplateIndex !== -1) {
20196
+ const templateTNode = getExistingTNode(hostLView[TVIEW], matchingTemplateIndex);
20197
+ const dehydratedView = findMatchingDehydratedView(lContainer, templateTNode.tView.ssrId);
20198
+ const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, value, { dehydratedView });
20199
+ addLViewToLContainer(lContainer, embeddedLView, viewInContainerIdx, shouldAddViewToDom(templateTNode, dehydratedView));
20200
+ }
20201
+ }
20202
+ else {
20203
+ // We might keep displaying the same template but the actual value of the expression could have
20204
+ // changed - re-bind in context.
20205
+ const lView = getLViewFromLContainer(lContainer, viewInContainerIdx);
20206
+ if (lView !== undefined) {
20207
+ lView[CONTEXT] = value;
20208
+ }
20209
+ }
20210
+ }
20211
+ class RepeaterContext {
20212
+ constructor(lContainer, $implicit, $index) {
20213
+ this.lContainer = lContainer;
20214
+ this.$implicit = $implicit;
20215
+ this.$index = $index;
20216
+ }
20217
+ get $count() {
20218
+ return this.lContainer.length - CONTAINER_HEADER_OFFSET;
20219
+ }
20220
+ }
20221
+ /**
20222
+ * A built-in trackBy function used for situations where users specified collection index as a
20223
+ * tracking expression. Having this function body in the runtime avoids unnecessary code generation.
20224
+ *
20225
+ * @param index
20226
+ * @returns
20227
+ */
20228
+ function ɵɵrepeaterTrackByIndex(index) {
20229
+ return index;
20230
+ }
20231
+ /**
20232
+ * A built-in trackBy function used for situations where users specified collection item reference
20233
+ * as a tracking expression. Having this function body in the runtime avoids unnecessary code
20234
+ * generation.
20235
+ *
20236
+ * @param index
20237
+ * @returns
20238
+ */
20239
+ function ɵɵrepeaterTrackByIdentity(_, value) {
20240
+ return value;
20241
+ }
20242
+ class RepeaterMetadata {
20243
+ constructor(hasEmptyBlock, differ) {
20244
+ this.hasEmptyBlock = hasEmptyBlock;
20245
+ this.differ = differ;
20246
+ }
20247
+ }
20248
+ /**
20249
+ * The repeaterCreate instruction runs in the creation part of the template pass and initializes
20250
+ * internal data structures required by the update pass of the built-in repeater logic. Repeater
20251
+ * metadata are allocated in the data part of LView with the following layout:
20252
+ * - LView[HEADER_OFFSET + index] - metadata
20253
+ * - LView[HEADER_OFFSET + index + 1] - reference to a template function rendering an item
20254
+ * - LView[HEADER_OFFSET + index + 2] - optional reference to a template function rendering an empty
20255
+ * block
20256
+ *
20257
+ * @param index Index at which to store the metadata of the repeater.
20258
+ * @param templateFn Reference to the template of the main repeater block.
20259
+ * @param decls The number of nodes, local refs, and pipes for the main block.
20260
+ * @param vars The number of bindings for the main block.
20261
+ * @param trackByFn Reference to the tracking function.
20262
+ * @param trackByUsesComponentInstance Whether the tracking function has any references to the
20263
+ * component instance. If it doesn't, we can avoid rebinding it.
20264
+ * @param emptyTemplateFn Reference to the template function of the empty block.
20265
+ * @param emptyDecls The number of nodes, local refs, and pipes for the empty block.
20266
+ * @param emptyVars The number of bindings for the empty block.
20267
+ *
20268
+ * @codeGenApi
20269
+ */
20270
+ function ɵɵrepeaterCreate(index, templateFn, decls, vars, trackByFn, trackByUsesComponentInstance, emptyTemplateFn, emptyDecls, emptyVars) {
20271
+ const hasEmptyBlock = emptyTemplateFn !== undefined;
20272
+ const hostLView = getLView();
20273
+ const boundTrackBy = trackByUsesComponentInstance ?
20274
+ // We only want to bind when necessary, because it produces a
20275
+ // new function. For pure functions it's not necessary.
20276
+ trackByFn.bind(hostLView[DECLARATION_COMPONENT_VIEW][CONTEXT]) :
20277
+ trackByFn;
20278
+ const metadata = new RepeaterMetadata(hasEmptyBlock, new DefaultIterableDiffer(boundTrackBy));
20279
+ hostLView[HEADER_OFFSET + index] = metadata;
20280
+ ɵɵtemplate(index + 1, templateFn, decls, vars);
20281
+ if (hasEmptyBlock) {
20282
+ ngDevMode &&
20283
+ assertDefined(emptyDecls, 'Missing number of declarations for the empty repeater block.');
20284
+ ngDevMode &&
20285
+ assertDefined(emptyVars, 'Missing number of bindings for the empty repeater block.');
20286
+ ɵɵtemplate(index + 2, emptyTemplateFn, emptyDecls, emptyVars);
20287
+ }
20288
+ }
20289
+ /**
20290
+ * The repeater instruction does update-time diffing of a provided collection (against the
20291
+ * collection seen previously) and maps changes in the collection to views structure (by adding,
20292
+ * removing or moving views as needed).
20293
+ * @param metadataSlotIdx - index in data where we can find an instance of RepeaterMetadata with
20294
+ * additional information (ex. differ) needed to process collection diffing and view
20295
+ * manipulation
20296
+ * @param collection - the collection instance to be checked for changes
20297
+ * @codeGenApi
20298
+ */
20299
+ function ɵɵrepeater(metadataSlotIdx, collection) {
20300
+ const hostLView = getLView();
20301
+ const hostTView = hostLView[TVIEW];
20302
+ const metadata = hostLView[HEADER_OFFSET + metadataSlotIdx];
20303
+ const differ = metadata.differ;
20304
+ const changes = differ.diff(collection);
20305
+ // handle repeater changes
20306
+ if (changes !== null) {
20307
+ const containerIndex = metadataSlotIdx + 1;
20308
+ const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);
20309
+ const lContainer = getLContainer(hostLView, HEADER_OFFSET + containerIndex);
20310
+ let needsIndexUpdate = false;
20311
+ changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {
20312
+ if (item.previousIndex === null) {
20313
+ // add
20314
+ const newViewIdx = adjustToLastLContainerIndex(lContainer, currentIndex);
20315
+ const embeddedLView = createAndRenderEmbeddedLView(hostLView, itemTemplateTNode, new RepeaterContext(lContainer, item.item, newViewIdx));
20316
+ addLViewToLContainer(lContainer, embeddedLView, newViewIdx);
20317
+ needsIndexUpdate = true;
20318
+ }
20319
+ else if (currentIndex === null) {
20320
+ // remove
20321
+ adjustedPreviousIndex = adjustToLastLContainerIndex(lContainer, adjustedPreviousIndex);
20322
+ removeLViewFromLContainer(lContainer, adjustedPreviousIndex);
20323
+ needsIndexUpdate = true;
20324
+ }
20325
+ else if (adjustedPreviousIndex !== null) {
20326
+ // move
20327
+ const existingLView = detachExistingView(lContainer, adjustedPreviousIndex);
20328
+ addLViewToLContainer(lContainer, existingLView, currentIndex);
20329
+ needsIndexUpdate = true;
20330
+ }
20331
+ });
20332
+ // A trackBy function might return the same value even if the underlying item changed - re-bind
20333
+ // it in the context.
20334
+ changes.forEachIdentityChange((record) => {
20335
+ const viewIdx = adjustToLastLContainerIndex(lContainer, record.currentIndex);
20336
+ const lView = getExistingLViewFromLContainer(lContainer, viewIdx);
20337
+ lView[CONTEXT].$implicit = record.item;
20338
+ });
20339
+ // moves in the container might caused context's index to get out of order, re-adjust
20340
+ if (needsIndexUpdate) {
20341
+ for (let i = 0; i < lContainer.length - CONTAINER_HEADER_OFFSET; i++) {
20342
+ const lView = getExistingLViewFromLContainer(lContainer, i);
20343
+ lView[CONTEXT].$index = i;
20344
+ }
20345
+ }
20346
+ }
20347
+ // handle empty blocks
20348
+ const bindingIndex = nextBindingIndex();
20349
+ if (metadata.hasEmptyBlock) {
20350
+ const hasItemsInCollection = differ.length > 0;
20351
+ if (bindingUpdated(hostLView, bindingIndex, hasItemsInCollection)) {
20352
+ const emptyTemplateIndex = metadataSlotIdx + 2;
20353
+ const lContainer = getLContainer(hostLView, HEADER_OFFSET + emptyTemplateIndex);
20354
+ if (hasItemsInCollection) {
20355
+ removeLViewFromLContainer(lContainer, 0);
20356
+ }
20357
+ else {
20358
+ const emptyTemplateTNode = getExistingTNode(hostTView, emptyTemplateIndex);
20359
+ const embeddedLView = createAndRenderEmbeddedLView(hostLView, emptyTemplateTNode, undefined);
20360
+ addLViewToLContainer(lContainer, embeddedLView, 0);
20361
+ }
20362
+ }
20363
+ }
20364
+ }
20365
+ function getLContainer(lView, index) {
20366
+ const lContainer = lView[index];
20367
+ ngDevMode && assertLContainer(lContainer);
20368
+ return lContainer;
20369
+ }
20370
+ function adjustToLastLContainerIndex(lContainer, index) {
20371
+ return index !== null ? index : lContainer.length - CONTAINER_HEADER_OFFSET;
20372
+ }
20373
+ function detachExistingView(lContainer, index) {
20374
+ const existingLView = detachView(lContainer, index);
20375
+ ngDevMode && assertLView(existingLView);
20376
+ return existingLView;
20377
+ }
20378
+ function getExistingLViewFromLContainer(lContainer, index) {
20379
+ const existingLView = getLViewFromLContainer(lContainer, index);
20380
+ ngDevMode && assertLView(existingLView);
20381
+ return existingLView;
20382
+ }
20383
+ function getExistingTNode(tView, index) {
20384
+ const tNode = getTNode(tView, index + HEADER_OFFSET);
20385
+ ngDevMode && assertTNode(tNode);
20386
+ return tNode;
20373
20387
  }
20374
20388
 
20375
20389
  /**
@@ -20379,34 +20393,32 @@ var DeferDependenciesLoadingState;
20379
20393
  (function (DeferDependenciesLoadingState) {
20380
20394
  /** Initial state, dependency loading is not yet triggered */
20381
20395
  DeferDependenciesLoadingState[DeferDependenciesLoadingState["NOT_STARTED"] = 0] = "NOT_STARTED";
20382
- /** Dependency loading was scheduled (e.g. `on idle`), but has not started yet */
20383
- DeferDependenciesLoadingState[DeferDependenciesLoadingState["SCHEDULED"] = 1] = "SCHEDULED";
20384
20396
  /** Dependency loading is in progress */
20385
- DeferDependenciesLoadingState[DeferDependenciesLoadingState["IN_PROGRESS"] = 2] = "IN_PROGRESS";
20397
+ DeferDependenciesLoadingState[DeferDependenciesLoadingState["IN_PROGRESS"] = 1] = "IN_PROGRESS";
20386
20398
  /** Dependency loading has completed successfully */
20387
- DeferDependenciesLoadingState[DeferDependenciesLoadingState["COMPLETE"] = 3] = "COMPLETE";
20399
+ DeferDependenciesLoadingState[DeferDependenciesLoadingState["COMPLETE"] = 2] = "COMPLETE";
20388
20400
  /** Dependency loading has failed */
20389
- DeferDependenciesLoadingState[DeferDependenciesLoadingState["FAILED"] = 4] = "FAILED";
20401
+ DeferDependenciesLoadingState[DeferDependenciesLoadingState["FAILED"] = 3] = "FAILED";
20390
20402
  })(DeferDependenciesLoadingState || (DeferDependenciesLoadingState = {}));
20391
20403
  /**
20392
- * Describes the current state of this {#defer} block instance.
20404
+ * Describes the current state of this defer block instance.
20393
20405
  *
20394
20406
  * @publicApi
20395
20407
  * @developerPreview
20396
20408
  */
20397
20409
  var DeferBlockState;
20398
20410
  (function (DeferBlockState) {
20399
- /** The {:placeholder} block content is rendered */
20411
+ /** The placeholder block content is rendered */
20400
20412
  DeferBlockState[DeferBlockState["Placeholder"] = 0] = "Placeholder";
20401
- /** The {:loading} block content is rendered */
20413
+ /** The loading block content is rendered */
20402
20414
  DeferBlockState[DeferBlockState["Loading"] = 1] = "Loading";
20403
20415
  /** The main content block content is rendered */
20404
20416
  DeferBlockState[DeferBlockState["Complete"] = 2] = "Complete";
20405
- /** The {:error} block content is rendered */
20417
+ /** The error block content is rendered */
20406
20418
  DeferBlockState[DeferBlockState["Error"] = 3] = "Error";
20407
20419
  })(DeferBlockState || (DeferBlockState = {}));
20408
20420
  /**
20409
- * Describes the initial state of this {#defer} block instance.
20421
+ * Describes the initial state of this defer block instance.
20410
20422
  *
20411
20423
  * Note: this state is internal only and *must* be represented
20412
20424
  * with a number lower than any value in the `DeferBlockState` enum.
@@ -20439,6 +20451,158 @@ var DeferBlockBehavior;
20439
20451
  DeferBlockBehavior[DeferBlockBehavior["Playthrough"] = 1] = "Playthrough";
20440
20452
  })(DeferBlockBehavior || (DeferBlockBehavior = {}));
20441
20453
 
20454
+ /*!
20455
+ * @license
20456
+ * Copyright Google LLC All Rights Reserved.
20457
+ *
20458
+ * Use of this source code is governed by an MIT-style license that can be
20459
+ * found in the LICENSE file at https://angular.io/license
20460
+ */
20461
+ /** Configuration object used to register passive and capturing events. */
20462
+ const eventListenerOptions = {
20463
+ passive: true,
20464
+ capture: true
20465
+ };
20466
+ /** Keeps track of the currently-registered `on hover` triggers. */
20467
+ const hoverTriggers = new WeakMap();
20468
+ /** Keeps track of the currently-registered `on interaction` triggers. */
20469
+ const interactionTriggers = new WeakMap();
20470
+ /** Names of the events considered as interaction events. */
20471
+ const interactionEventNames = ['click', 'keydown'];
20472
+ /** Object keeping track of registered callbacks for a deferred block trigger. */
20473
+ class DeferEventEntry {
20474
+ constructor() {
20475
+ this.callbacks = new Set();
20476
+ this.listener = () => {
20477
+ for (const callback of this.callbacks) {
20478
+ callback();
20479
+ }
20480
+ };
20481
+ }
20482
+ }
20483
+ /**
20484
+ * Registers an interaction trigger.
20485
+ * @param trigger Element that is the trigger.
20486
+ * @param callback Callback to be invoked when the trigger is interacted with.
20487
+ */
20488
+ function onInteraction(trigger, callback) {
20489
+ let entry = interactionTriggers.get(trigger);
20490
+ // If this is the first entry for this element, add the listeners.
20491
+ if (!entry) {
20492
+ // Note that using managing events centrally like this lends itself well to using global
20493
+ // event delegation. It currently does delegation at the element level, rather than the
20494
+ // document level, because:
20495
+ // 1. Global delegation is the most effective when there are a lot of events being registered
20496
+ // at the same time. Deferred blocks are unlikely to be used in such a way.
20497
+ // 2. Matching events to their target isn't free. For each `click` and `keydown` event we
20498
+ // would have look through all the triggers and check if the target either is the element
20499
+ // itself or it's contained within the element. Given that `click` and `keydown` are some
20500
+ // of the most common events, this may end up introducing a lot of runtime overhead.
20501
+ // 3. We're still registering only two events per element, no matter how many deferred blocks
20502
+ // are referencing it.
20503
+ entry = new DeferEventEntry();
20504
+ interactionTriggers.set(trigger, entry);
20505
+ for (const name of interactionEventNames) {
20506
+ trigger.addEventListener(name, entry.listener, eventListenerOptions);
20507
+ }
20508
+ }
20509
+ entry.callbacks.add(callback);
20510
+ return () => {
20511
+ const { callbacks, listener } = entry;
20512
+ callbacks.delete(callback);
20513
+ if (callbacks.size === 0) {
20514
+ interactionTriggers.delete(trigger);
20515
+ for (const name of interactionEventNames) {
20516
+ trigger.removeEventListener(name, listener, eventListenerOptions);
20517
+ }
20518
+ }
20519
+ };
20520
+ }
20521
+ /**
20522
+ * Registers a hover trigger.
20523
+ * @param trigger Element that is the trigger.
20524
+ * @param callback Callback to be invoked when the trigger is hovered over.
20525
+ */
20526
+ function onHover(trigger, callback) {
20527
+ let entry = hoverTriggers.get(trigger);
20528
+ // If this is the first entry for this element, add the listener.
20529
+ if (!entry) {
20530
+ entry = new DeferEventEntry();
20531
+ trigger.addEventListener('mouseenter', entry.listener, eventListenerOptions);
20532
+ hoverTriggers.set(trigger, entry);
20533
+ }
20534
+ entry.callbacks.add(callback);
20535
+ return () => {
20536
+ const { callbacks, listener } = entry;
20537
+ callbacks.delete(callback);
20538
+ if (callbacks.size === 0) {
20539
+ trigger.removeEventListener('mouseenter', listener, eventListenerOptions);
20540
+ hoverTriggers.delete(trigger);
20541
+ }
20542
+ };
20543
+ }
20544
+ /**
20545
+ * Registers a viewport trigger.
20546
+ * @param trigger Element that is the trigger.
20547
+ * @param callback Callback to be invoked when the trigger comes into the viewport.
20548
+ * @param injector Injector that can be used by the trigger to resolve DI tokens.
20549
+ */
20550
+ function onViewport(trigger, callback, injector) {
20551
+ return injector.get(DeferIntersectionManager).register(trigger, callback);
20552
+ }
20553
+ /** Keeps track of the registered `viewport` triggers. */
20554
+ class DeferIntersectionManager {
20555
+ /** @nocollapse */
20556
+ static { this.ɵprov = ɵɵdefineInjectable({
20557
+ token: DeferIntersectionManager,
20558
+ providedIn: 'root',
20559
+ factory: () => new DeferIntersectionManager(inject(NgZone)),
20560
+ }); }
20561
+ constructor(ngZone) {
20562
+ this.ngZone = ngZone;
20563
+ /** `IntersectionObserver` used to observe `viewport` triggers. */
20564
+ this.intersectionObserver = null;
20565
+ /** Number of elements currently observed with `viewport` triggers. */
20566
+ this.observedViewportElements = 0;
20567
+ /** Currently-registered `viewport` triggers. */
20568
+ this.viewportTriggers = new WeakMap();
20569
+ this.intersectionCallback = entries => {
20570
+ for (const current of entries) {
20571
+ // Only invoke the callbacks if the specific element is intersecting.
20572
+ if (current.isIntersecting && this.viewportTriggers.has(current.target)) {
20573
+ this.ngZone.run(this.viewportTriggers.get(current.target).listener);
20574
+ }
20575
+ }
20576
+ };
20577
+ }
20578
+ register(trigger, callback) {
20579
+ let entry = this.viewportTriggers.get(trigger);
20580
+ if (!this.intersectionObserver) {
20581
+ this.intersectionObserver =
20582
+ this.ngZone.runOutsideAngular(() => new IntersectionObserver(this.intersectionCallback));
20583
+ }
20584
+ if (!entry) {
20585
+ entry = new DeferEventEntry();
20586
+ this.ngZone.runOutsideAngular(() => this.intersectionObserver.observe(trigger));
20587
+ this.viewportTriggers.set(trigger, entry);
20588
+ this.observedViewportElements++;
20589
+ }
20590
+ entry.callbacks.add(callback);
20591
+ return () => {
20592
+ entry.callbacks.delete(callback);
20593
+ if (entry.callbacks.size === 0) {
20594
+ this.intersectionObserver?.unobserve(trigger);
20595
+ this.viewportTriggers.delete(trigger);
20596
+ this.observedViewportElements--;
20597
+ }
20598
+ if (this.observedViewportElements === 0) {
20599
+ this.intersectionObserver?.disconnect();
20600
+ this.intersectionObserver = null;
20601
+ }
20602
+ };
20603
+ }
20604
+ }
20605
+
20442
20606
  /**
20443
20607
  * Returns whether defer blocks should be triggered.
20444
20608
  *
@@ -20446,31 +20610,25 @@ var DeferBlockBehavior;
20446
20610
  * only placeholder content is rendered (if provided).
20447
20611
  */
20448
20612
  function shouldTriggerDeferBlock(injector) {
20449
- const config = injector.get(DEFER_BLOCK_CONFIG, { optional: true });
20613
+ const config = injector.get(DEFER_BLOCK_CONFIG, null, { optional: true });
20450
20614
  if (config?.behavior === DeferBlockBehavior.Manual) {
20451
20615
  return false;
20452
20616
  }
20453
20617
  return isPlatformBrowser(injector);
20454
20618
  }
20455
20619
  /**
20456
- * Shims for the `requestIdleCallback` and `cancelIdleCallback` functions for environments
20457
- * where those functions are not available (e.g. Node.js).
20458
- */
20459
- const _requestIdleCallback = typeof requestIdleCallback !== 'undefined' ? requestIdleCallback : setTimeout;
20460
- const _cancelIdleCallback = typeof requestIdleCallback !== 'undefined' ? cancelIdleCallback : clearTimeout;
20461
- /**
20462
- * Creates runtime data structures for `{#defer}` blocks.
20620
+ * Creates runtime data structures for defer blocks.
20463
20621
  *
20464
20622
  * @param index Index of the `defer` instruction.
20465
20623
  * @param primaryTmplIndex Index of the template with the primary block content.
20466
20624
  * @param dependencyResolverFn Function that contains dependencies for this defer block.
20467
- * @param loadingTmplIndex Index of the template with the `{:loading}` block content.
20468
- * @param placeholderTmplIndex Index of the template with the `{:placeholder}` block content.
20469
- * @param errorTmplIndex Index of the template with the `{:error}` block content.
20470
- * @param loadingConfigIndex Index in the constants array of the configuration of the `{:loading}`.
20625
+ * @param loadingTmplIndex Index of the template with the loading block content.
20626
+ * @param placeholderTmplIndex Index of the template with the placeholder block content.
20627
+ * @param errorTmplIndex Index of the template with the error block content.
20628
+ * @param loadingConfigIndex Index in the constants array of the configuration of the loading.
20471
20629
  * block.
20472
20630
  * @param placeholderConfigIndexIndex in the constants array of the configuration of the
20473
- * `{:placeholder}` block.
20631
+ * placeholder block.
20474
20632
  *
20475
20633
  * @codeGenApi
20476
20634
  */
@@ -20498,10 +20656,12 @@ function ɵɵdefer(index, primaryTmplIndex, dependencyResolverFn, loadingTmplInd
20498
20656
  };
20499
20657
  setTDeferBlockDetails(tView, adjustedIndex, deferBlockConfig);
20500
20658
  }
20501
- // Lookup dehydrated views that belong to this LContainer.
20502
- // In client-only mode, this operation is noop.
20659
+ const tNode = getCurrentTNode();
20503
20660
  const lContainer = lView[adjustedIndex];
20504
- populateDehydratedViewsInContainer(lContainer);
20661
+ // If hydration is enabled, looks up dehydrated views in the DOM
20662
+ // using hydration annotation info and stores those views on LContainer.
20663
+ // In client-only mode, this function is a noop.
20664
+ populateDehydratedViewsInLContainer(lContainer, tNode, lView);
20505
20665
  // Init instance-specific defer details and store it.
20506
20666
  const lDetails = [];
20507
20667
  lDetails[DEFER_BLOCK_STATE] = DeferBlockInternalState.Initial;
@@ -20552,20 +20712,17 @@ function ɵɵdeferPrefetchWhen(rawValue) {
20552
20712
  }
20553
20713
  }
20554
20714
  /**
20555
- * Sets up handlers that represent `on idle` deferred trigger.
20715
+ * Sets up logic to handle the `on idle` deferred trigger.
20556
20716
  * @codeGenApi
20557
20717
  */
20558
20718
  function ɵɵdeferOnIdle() {
20559
20719
  const lView = getLView();
20560
20720
  const tNode = getCurrentTNode();
20561
20721
  renderPlaceholder(lView, tNode);
20562
- // Note: we pass an `lView` as a second argument to cancel an `idle`
20563
- // callback in case an LView got destroyed before an `idle` callback
20564
- // is invoked.
20565
- onIdle(() => triggerDeferBlock(lView, tNode), lView);
20722
+ onIdle(() => triggerDeferBlock(lView, tNode), lView, true /* withLViewCleanup */);
20566
20723
  }
20567
20724
  /**
20568
- * Creates runtime data structures for the `prefetch on idle` deferred trigger.
20725
+ * Sets up logic to handle the `prefetch on idle` deferred trigger.
20569
20726
  * @codeGenApi
20570
20727
  */
20571
20728
  function ɵɵdeferPrefetchOnIdle() {
@@ -20574,25 +20731,53 @@ function ɵɵdeferPrefetchOnIdle() {
20574
20731
  const tView = lView[TVIEW];
20575
20732
  const tDetails = getTDeferBlockDetails(tView, tNode);
20576
20733
  if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
20577
- // Set loading to the scheduled state, so that we don't register it again.
20578
- tDetails.loadingState = DeferDependenciesLoadingState.SCHEDULED;
20579
- // In case of prefetching, we intentionally avoid cancelling prefetching if
20580
- // an underlying LView get destroyed (thus passing `null` as a second argument),
20581
- // because there might be other LViews (that represent embedded views) that
20582
- // depend on resource loading.
20583
- onIdle(() => triggerPrefetching(tDetails, lView), null /* LView */);
20734
+ // Prevent scheduling more than one `requestIdleCallback` call
20735
+ // for each defer block. For this reason we use only a trigger
20736
+ // identifier in a key, so all instances would use the same key.
20737
+ const key = String(0 /* DeferBlockTriggers.OnIdle */);
20738
+ const injector = lView[INJECTOR$1];
20739
+ const manager = injector.get(DeferBlockCleanupManager);
20740
+ if (!manager.has(tDetails, key)) {
20741
+ // In case of prefetching, we intentionally avoid cancelling resource loading if
20742
+ // an underlying LView get destroyed (thus passing `null` as a second argument),
20743
+ // because there might be other LViews (that represent embedded views) that
20744
+ // depend on resource loading.
20745
+ const prefetch = () => triggerPrefetching(tDetails, lView);
20746
+ const cleanupFn = onIdle(prefetch, lView, false /* withLViewCleanup */);
20747
+ registerTDetailsCleanup(injector, tDetails, key, cleanupFn);
20748
+ }
20584
20749
  }
20585
20750
  }
20586
20751
  /**
20587
- * Creates runtime data structures for the `on immediate` deferred trigger.
20752
+ * Sets up logic to handle the `on immediate` deferred trigger.
20588
20753
  * @codeGenApi
20589
20754
  */
20590
- function ɵɵdeferOnImmediate() { } // TODO: implement runtime logic.
20755
+ function ɵɵdeferOnImmediate() {
20756
+ const lView = getLView();
20757
+ const tNode = getCurrentTNode();
20758
+ const tView = lView[TVIEW];
20759
+ const tDetails = getTDeferBlockDetails(tView, tNode);
20760
+ // Render placeholder block only if loading template is not present
20761
+ // to avoid content flickering, since it would be immediately replaced
20762
+ // by the loading block.
20763
+ if (tDetails.loadingTmplIndex === null) {
20764
+ renderPlaceholder(lView, tNode);
20765
+ }
20766
+ triggerDeferBlock(lView, tNode);
20767
+ }
20591
20768
  /**
20592
- * Creates runtime data structures for the `prefetch on immediate` deferred trigger.
20769
+ * Sets up logic to handle the `prefetch on immediate` deferred trigger.
20593
20770
  * @codeGenApi
20594
20771
  */
20595
- function ɵɵdeferPrefetchOnImmediate() { } // TODO: implement runtime logic.
20772
+ function ɵɵdeferPrefetchOnImmediate() {
20773
+ const lView = getLView();
20774
+ const tNode = getCurrentTNode();
20775
+ const tView = lView[TVIEW];
20776
+ const tDetails = getTDeferBlockDetails(tView, tNode);
20777
+ if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
20778
+ triggerResourceLoading(tDetails, lView);
20779
+ }
20780
+ }
20596
20781
  /**
20597
20782
  * Creates runtime data structures for the `on timer` deferred trigger.
20598
20783
  * @param delay Amount of time to wait before loading the content.
@@ -20607,67 +20792,207 @@ function ɵɵdeferOnTimer(delay) { } // TODO: implement runtime logic.
20607
20792
  function ɵɵdeferPrefetchOnTimer(delay) { } // TODO: implement runtime logic.
20608
20793
  /**
20609
20794
  * Creates runtime data structures for the `on hover` deferred trigger.
20795
+ * @param triggerIndex Index at which to find the trigger element.
20796
+ * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.
20610
20797
  * @codeGenApi
20611
20798
  */
20612
- function ɵɵdeferOnHover() { } // TODO: implement runtime logic.
20799
+ function ɵɵdeferOnHover(triggerIndex, walkUpTimes) {
20800
+ const lView = getLView();
20801
+ const tNode = getCurrentTNode();
20802
+ renderPlaceholder(lView, tNode);
20803
+ registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onHover, () => triggerDeferBlock(lView, tNode));
20804
+ }
20613
20805
  /**
20614
20806
  * Creates runtime data structures for the `prefetch on hover` deferred trigger.
20807
+ * @param triggerIndex Index at which to find the trigger element.
20808
+ * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.
20615
20809
  * @codeGenApi
20616
20810
  */
20617
- function ɵɵdeferPrefetchOnHover() { } // TODO: implement runtime logic.
20811
+ function ɵɵdeferPrefetchOnHover(triggerIndex, walkUpTimes) {
20812
+ const lView = getLView();
20813
+ const tNode = getCurrentTNode();
20814
+ const tView = lView[TVIEW];
20815
+ const tDetails = getTDeferBlockDetails(tView, tNode);
20816
+ if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
20817
+ registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onHover, () => triggerPrefetching(tDetails, lView));
20818
+ }
20819
+ }
20618
20820
  /**
20619
20821
  * Creates runtime data structures for the `on interaction` deferred trigger.
20620
- * @param target Optional element on which to listen for hover events.
20822
+ * @param triggerIndex Index at which to find the trigger element.
20823
+ * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.
20621
20824
  * @codeGenApi
20622
20825
  */
20623
- function ɵɵdeferOnInteraction(target) { } // TODO: implement runtime logic.
20826
+ function ɵɵdeferOnInteraction(triggerIndex, walkUpTimes) {
20827
+ const lView = getLView();
20828
+ const tNode = getCurrentTNode();
20829
+ renderPlaceholder(lView, tNode);
20830
+ registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onInteraction, () => triggerDeferBlock(lView, tNode));
20831
+ }
20624
20832
  /**
20625
20833
  * Creates runtime data structures for the `prefetch on interaction` deferred trigger.
20626
- * @param target Optional element on which to listen for hover events.
20834
+ * @param triggerIndex Index at which to find the trigger element.
20835
+ * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.
20627
20836
  * @codeGenApi
20628
20837
  */
20629
- function ɵɵdeferPrefetchOnInteraction(target) { } // TODO: implement runtime logic.
20838
+ function ɵɵdeferPrefetchOnInteraction(triggerIndex, walkUpTimes) {
20839
+ const lView = getLView();
20840
+ const tNode = getCurrentTNode();
20841
+ const tView = lView[TVIEW];
20842
+ const tDetails = getTDeferBlockDetails(tView, tNode);
20843
+ if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
20844
+ registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onInteraction, () => triggerPrefetching(tDetails, lView));
20845
+ }
20846
+ }
20630
20847
  /**
20631
20848
  * Creates runtime data structures for the `on viewport` deferred trigger.
20632
- * @param target Optional element on which to listen for hover events.
20849
+ * @param triggerIndex Index at which to find the trigger element.
20850
+ * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.
20633
20851
  * @codeGenApi
20634
20852
  */
20635
- function ɵɵdeferOnViewport(target) { } // TODO: implement runtime logic.
20853
+ function ɵɵdeferOnViewport(triggerIndex, walkUpTimes) {
20854
+ const lView = getLView();
20855
+ const tNode = getCurrentTNode();
20856
+ renderPlaceholder(lView, tNode);
20857
+ registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onViewport, () => triggerDeferBlock(lView, tNode));
20858
+ }
20636
20859
  /**
20637
20860
  * Creates runtime data structures for the `prefetch on viewport` deferred trigger.
20638
- * @param target Optional element on which to listen for hover events.
20861
+ * @param triggerIndex Index at which to find the trigger element.
20862
+ * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.
20639
20863
  * @codeGenApi
20640
20864
  */
20641
- function ɵɵdeferPrefetchOnViewport(target) { } // TODO: implement runtime logic.
20865
+ function ɵɵdeferPrefetchOnViewport(triggerIndex, walkUpTimes) {
20866
+ const lView = getLView();
20867
+ const tNode = getCurrentTNode();
20868
+ const tView = lView[TVIEW];
20869
+ const tDetails = getTDeferBlockDetails(tView, tNode);
20870
+ if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
20871
+ registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onViewport, () => triggerPrefetching(tDetails, lView));
20872
+ }
20873
+ }
20642
20874
  /********** Helper functions **********/
20875
+ /**
20876
+ * Helper function to get the LView in which a deferred block's trigger is rendered.
20877
+ * @param deferredHostLView LView in which the deferred block is defined.
20878
+ * @param deferredTNode TNode defining the deferred block.
20879
+ * @param walkUpTimes Number of times to go up in the view hierarchy to find the trigger's view.
20880
+ * A negative value means that the trigger is inside the block's placeholder, while an undefined
20881
+ * value means that the trigger is in the same LView as the deferred block.
20882
+ */
20883
+ function getTriggerLView(deferredHostLView, deferredTNode, walkUpTimes) {
20884
+ // The trigger is in the same view, we don't need to traverse.
20885
+ if (walkUpTimes == null) {
20886
+ return deferredHostLView;
20887
+ }
20888
+ // A positive value or zero means that the trigger is in a parent view.
20889
+ if (walkUpTimes >= 0) {
20890
+ return walkUpViews(walkUpTimes, deferredHostLView);
20891
+ }
20892
+ // If the value is negative, it means that the trigger is inside the placeholder.
20893
+ const deferredContainer = deferredHostLView[deferredTNode.index];
20894
+ ngDevMode && assertLContainer(deferredContainer);
20895
+ const triggerLView = deferredContainer[CONTAINER_HEADER_OFFSET] ?? null;
20896
+ // We need to null check, because the placeholder might not have been rendered yet.
20897
+ if (ngDevMode && triggerLView !== null) {
20898
+ const lDetails = getLDeferBlockDetails(deferredHostLView, deferredTNode);
20899
+ const renderedState = lDetails[DEFER_BLOCK_STATE];
20900
+ assertEqual(renderedState, DeferBlockState.Placeholder, 'Expected a placeholder to be rendered in this defer block.');
20901
+ assertLView(triggerLView);
20902
+ }
20903
+ return triggerLView;
20904
+ }
20905
+ /**
20906
+ * Gets the element that a deferred block's trigger is pointing to.
20907
+ * @param triggerLView LView in which the trigger is defined.
20908
+ * @param triggerIndex Index at which the trigger element should've been rendered.
20909
+ */
20910
+ function getTriggerElement(triggerLView, triggerIndex) {
20911
+ const element = getNativeByIndex(HEADER_OFFSET + triggerIndex, triggerLView);
20912
+ ngDevMode && assertElement(element);
20913
+ return element;
20914
+ }
20915
+ /**
20916
+ * Registers a DOM-node based trigger.
20917
+ * @param initialLView LView in which the defer block is rendered.
20918
+ * @param tNode TNode representing the defer block.
20919
+ * @param triggerIndex Index at which to find the trigger element.
20920
+ * @param walkUpTimes Number of times to go up/down in the view hierarchy to find the trigger.
20921
+ * @param registerFn Function that will register the DOM events.
20922
+ * @param callback Callback to be invoked when the trigger receives the event that should render
20923
+ * the deferred block.
20924
+ */
20925
+ function registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, registerFn, callback) {
20926
+ const injector = initialLView[INJECTOR$1];
20927
+ // Assumption: the `afterRender` reference should be destroyed
20928
+ // automatically so we don't need to keep track of it.
20929
+ const afterRenderRef = afterRender(() => {
20930
+ const lDetails = getLDeferBlockDetails(initialLView, tNode);
20931
+ const renderedState = lDetails[DEFER_BLOCK_STATE];
20932
+ // If the block was loaded before the trigger was resolved, we don't need to do anything.
20933
+ if (renderedState !== DeferBlockInternalState.Initial &&
20934
+ renderedState !== DeferBlockState.Placeholder) {
20935
+ afterRenderRef.destroy();
20936
+ return;
20937
+ }
20938
+ const triggerLView = getTriggerLView(initialLView, tNode, walkUpTimes);
20939
+ // Keep polling until we resolve the trigger's LView.
20940
+ // `afterRender` should stop automatically if the view is destroyed.
20941
+ if (!triggerLView) {
20942
+ return;
20943
+ }
20944
+ // It's possible that the trigger's view was destroyed before we resolved the trigger element.
20945
+ if (triggerLView[FLAGS] & 256 /* LViewFlags.Destroyed */) {
20946
+ afterRenderRef.destroy();
20947
+ return;
20948
+ }
20949
+ // TODO: add integration with `DeferBlockCleanupManager`.
20950
+ const element = getTriggerElement(triggerLView, triggerIndex);
20951
+ const cleanup = registerFn(element, () => {
20952
+ callback();
20953
+ removeLViewOnDestroy(triggerLView, cleanup);
20954
+ if (initialLView !== triggerLView) {
20955
+ removeLViewOnDestroy(initialLView, cleanup);
20956
+ }
20957
+ cleanup();
20958
+ }, injector);
20959
+ afterRenderRef.destroy();
20960
+ storeLViewOnDestroy(triggerLView, cleanup);
20961
+ // Since the trigger and deferred block might be in different
20962
+ // views, we have to register the callback in both locations.
20963
+ if (initialLView !== triggerLView) {
20964
+ storeLViewOnDestroy(initialLView, cleanup);
20965
+ }
20966
+ }, { injector });
20967
+ }
20643
20968
  /**
20644
20969
  * Helper function to schedule a callback to be invoked when a browser becomes idle.
20645
20970
  *
20646
20971
  * @param callback A function to be invoked when a browser becomes idle.
20647
- * @param lView An optional LView that hosts an instance of a defer block. LView is
20648
- * used to register a cleanup callback in case that LView got destroyed before
20649
- * callback was invoked. In this case, an `idle` callback is never invoked. This is
20650
- * helpful for cases when a defer block has scheduled rendering, but an underlying
20651
- * LView got destroyed prior to th block rendering.
20972
+ * @param lView LView that hosts an instance of a defer block.
20973
+ * @param withLViewCleanup A flag that indicates whether a scheduled callback
20974
+ * should be cancelled in case an LView is destroyed before a callback
20975
+ * was invoked.
20652
20976
  */
20653
- function onIdle(callback, lView) {
20654
- let id;
20655
- const removeIdleCallback = () => _cancelIdleCallback(id);
20656
- id = _requestIdleCallback(() => {
20657
- removeIdleCallback();
20658
- if (lView !== null) {
20659
- // The idle callback is invoked, we no longer need
20660
- // to retain a cleanup callback in an LView.
20661
- removeLViewOnDestroy(lView, removeIdleCallback);
20662
- }
20977
+ function onIdle(callback, lView, withLViewCleanup) {
20978
+ const injector = lView[INJECTOR$1];
20979
+ const scheduler = injector.get(OnIdleScheduler);
20980
+ const cleanupFn = () => scheduler.remove(callback);
20981
+ const wrappedCallback = withLViewCleanup ? wrapWithLViewCleanup(callback, lView, cleanupFn) : callback;
20982
+ scheduler.add(wrappedCallback);
20983
+ return cleanupFn;
20984
+ }
20985
+ /**
20986
+ * Wraps a given callback into a logic that registers a cleanup function
20987
+ * in the LView cleanup slot, to be invoked when an LView is destroyed.
20988
+ */
20989
+ function wrapWithLViewCleanup(callback, lView, cleanup) {
20990
+ const wrappedCallback = () => {
20663
20991
  callback();
20664
- });
20665
- if (lView !== null) {
20666
- // Store a cleanup function on LView, so that we cancel idle
20667
- // callback in case this LView is destroyed before a callback
20668
- // is invoked.
20669
- storeLViewOnDestroy(lView, removeIdleCallback);
20670
- }
20992
+ removeLViewOnDestroy(lView, cleanup);
20993
+ };
20994
+ storeLViewOnDestroy(lView, cleanup);
20995
+ return wrappedCallback;
20671
20996
  }
20672
20997
  /**
20673
20998
  * Calculates a data slot index for defer block info (either static or
@@ -20750,7 +21075,7 @@ function renderDeferBlockState(newState, tNode, lContainer) {
20750
21075
  const adjustedIndex = stateTmplIndex + HEADER_OFFSET;
20751
21076
  const tNode = getTNode(hostTView, adjustedIndex);
20752
21077
  // There is only 1 view that can be present in an LContainer that
20753
- // represents a `{#defer}` block, so always refer to the first one.
21078
+ // represents a defer block, so always refer to the first one.
20754
21079
  const viewIndex = 0;
20755
21080
  removeLViewFromLContainer(lContainer, viewIndex);
20756
21081
  const dehydratedView = findMatchingDehydratedView(lContainer, tNode.tView.ssrId);
@@ -20778,8 +21103,7 @@ function triggerPrefetching(tDetails, lView) {
20778
21103
  function triggerResourceLoading(tDetails, lView) {
20779
21104
  const injector = lView[INJECTOR$1];
20780
21105
  const tView = lView[TVIEW];
20781
- if (tDetails.loadingState !== DeferDependenciesLoadingState.NOT_STARTED &&
20782
- tDetails.loadingState !== DeferDependenciesLoadingState.SCHEDULED) {
21106
+ if (tDetails.loadingState !== DeferDependenciesLoadingState.NOT_STARTED) {
20783
21107
  // If the loading status is different from initial one, it means that
20784
21108
  // the loading of dependencies is in progress and there is nothing to do
20785
21109
  // in this function. All details can be obtained from the `tDetails` object.
@@ -20794,7 +21118,7 @@ function triggerResourceLoading(tDetails, lView) {
20794
21118
  deferDependencyInterceptor.intercept(tDetails.dependencyResolverFn) :
20795
21119
  tDetails.dependencyResolverFn;
20796
21120
  // The `dependenciesFn` might be `null` when all dependencies within
20797
- // a given `{#defer}` block were eagerly references elsewhere in a file,
21121
+ // a given defer block were eagerly references elsewhere in a file,
20798
21122
  // thus no dynamic `import()`s were produced.
20799
21123
  if (!dependenciesFn) {
20800
21124
  tDetails.loadingPromise = Promise.resolve().then(() => {
@@ -20802,6 +21126,9 @@ function triggerResourceLoading(tDetails, lView) {
20802
21126
  });
20803
21127
  return;
20804
21128
  }
21129
+ // Defer block may have multiple prefetch triggers. Once the loading
21130
+ // starts, invoke all clean functions, since they are no longer needed.
21131
+ invokeTDetailsCleanup(injector, tDetails);
20805
21132
  // Start downloading of defer block dependencies.
20806
21133
  tDetails.loadingPromise = Promise.allSettled(dependenciesFn()).then(results => {
20807
21134
  let failed = false;
@@ -20848,7 +21175,7 @@ function triggerResourceLoading(tDetails, lView) {
20848
21175
  }
20849
21176
  });
20850
21177
  }
20851
- /** Utility function to render `{:placeholder}` content (if present) */
21178
+ /** Utility function to render placeholder content (if present) */
20852
21179
  function renderPlaceholder(lView, tNode) {
20853
21180
  const tView = lView[TVIEW];
20854
21181
  const lContainer = lView[tNode.index];
@@ -20900,7 +21227,6 @@ function triggerDeferBlock(lView, tNode) {
20900
21227
  renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);
20901
21228
  switch (tDetails.loadingState) {
20902
21229
  case DeferDependenciesLoadingState.NOT_STARTED:
20903
- case DeferDependenciesLoadingState.SCHEDULED:
20904
21230
  triggerResourceLoading(tDetails, lView);
20905
21231
  // The `loadingState` might have changed to "loading".
20906
21232
  if (tDetails.loadingState ===
@@ -20988,6 +21314,144 @@ function getDeferBlocks(lView, deferBlocks) {
20988
21314
  }
20989
21315
  }
20990
21316
  }
21317
+ /**
21318
+ * Registers a cleanup function associated with a prefetching trigger
21319
+ * of a given defer block.
21320
+ */
21321
+ function registerTDetailsCleanup(injector, tDetails, key, cleanupFn) {
21322
+ injector.get(DeferBlockCleanupManager).add(tDetails, key, cleanupFn);
21323
+ }
21324
+ /**
21325
+ * Invokes all registered prefetch cleanup triggers
21326
+ * and removes all cleanup functions afterwards.
21327
+ */
21328
+ function invokeTDetailsCleanup(injector, tDetails) {
21329
+ injector.get(DeferBlockCleanupManager).cleanup(tDetails);
21330
+ }
21331
+ /**
21332
+ * Internal service to keep track of cleanup functions associated
21333
+ * with defer blocks. This class is used to manage cleanup functions
21334
+ * created for prefetching triggers.
21335
+ */
21336
+ class DeferBlockCleanupManager {
21337
+ constructor() {
21338
+ this.blocks = new Map();
21339
+ }
21340
+ add(tDetails, key, callback) {
21341
+ if (!this.blocks.has(tDetails)) {
21342
+ this.blocks.set(tDetails, new Map());
21343
+ }
21344
+ const block = this.blocks.get(tDetails);
21345
+ if (!block.has(key)) {
21346
+ block.set(key, []);
21347
+ }
21348
+ const callbacks = block.get(key);
21349
+ callbacks.push(callback);
21350
+ }
21351
+ has(tDetails, key) {
21352
+ return !!this.blocks.get(tDetails)?.has(key);
21353
+ }
21354
+ cleanup(tDetails) {
21355
+ const block = this.blocks.get(tDetails);
21356
+ if (block) {
21357
+ for (const callbacks of Object.values(block)) {
21358
+ for (const callback of callbacks) {
21359
+ callback();
21360
+ }
21361
+ }
21362
+ this.blocks.delete(tDetails);
21363
+ }
21364
+ }
21365
+ ngOnDestroy() {
21366
+ for (const [block] of this.blocks) {
21367
+ this.cleanup(block);
21368
+ }
21369
+ this.blocks.clear();
21370
+ }
21371
+ /** @nocollapse */
21372
+ static { this.ɵprov = ɵɵdefineInjectable({
21373
+ token: DeferBlockCleanupManager,
21374
+ providedIn: 'root',
21375
+ factory: () => new DeferBlockCleanupManager(),
21376
+ }); }
21377
+ }
21378
+ /**
21379
+ * Use shims for the `requestIdleCallback` and `cancelIdleCallback` functions for
21380
+ * environments where those functions are not available (e.g. Node.js and Safari).
21381
+ *
21382
+ * Note: we wrap the `requestIdleCallback` call into a function, so that it can be
21383
+ * overridden/mocked in test environment and picked up by the runtime code.
21384
+ */
21385
+ const _requestIdleCallback = () => typeof requestIdleCallback !== 'undefined' ? requestIdleCallback : setTimeout;
21386
+ const _cancelIdleCallback = () => typeof requestIdleCallback !== 'undefined' ? cancelIdleCallback : clearTimeout;
21387
+ /**
21388
+ * Helper service to schedule `requestIdleCallback`s for batches of defer blocks,
21389
+ * to avoid calling `requestIdleCallback` for each defer block (e.g. if
21390
+ * defer blocks are defined inside a for loop).
21391
+ */
21392
+ class OnIdleScheduler {
21393
+ constructor() {
21394
+ // Indicates whether current callbacks are being invoked.
21395
+ this.executingCallbacks = false;
21396
+ // Currently scheduled idle callback id.
21397
+ this.idleId = null;
21398
+ // Set of callbacks to be invoked next.
21399
+ this.current = new Set();
21400
+ // Set of callbacks collected while invoking current set of callbacks.
21401
+ // Those callbacks are scheduled for the next idle period.
21402
+ this.deferred = new Set();
21403
+ this.requestIdleCallback = _requestIdleCallback().bind(globalThis);
21404
+ this.cancelIdleCallback = _cancelIdleCallback().bind(globalThis);
21405
+ }
21406
+ add(callback) {
21407
+ const target = this.executingCallbacks ? this.deferred : this.current;
21408
+ target.add(callback);
21409
+ if (this.idleId === null) {
21410
+ this.scheduleIdleCallback();
21411
+ }
21412
+ }
21413
+ remove(callback) {
21414
+ this.current.delete(callback);
21415
+ this.deferred.delete(callback);
21416
+ }
21417
+ scheduleIdleCallback() {
21418
+ const callback = () => {
21419
+ this.cancelIdleCallback(this.idleId);
21420
+ this.idleId = null;
21421
+ this.executingCallbacks = true;
21422
+ for (const callback of this.current) {
21423
+ callback();
21424
+ }
21425
+ this.current.clear();
21426
+ this.executingCallbacks = false;
21427
+ // If there are any callbacks added during an invocation
21428
+ // of the current ones - make them "current" and schedule
21429
+ // a new idle callback.
21430
+ if (this.deferred.size > 0) {
21431
+ for (const callback of this.deferred) {
21432
+ this.current.add(callback);
21433
+ }
21434
+ this.deferred.clear();
21435
+ this.scheduleIdleCallback();
21436
+ }
21437
+ };
21438
+ this.idleId = this.requestIdleCallback(callback);
21439
+ }
21440
+ ngOnDestroy() {
21441
+ if (this.idleId !== null) {
21442
+ this.cancelIdleCallback(this.idleId);
21443
+ this.idleId = null;
21444
+ }
21445
+ this.current.clear();
21446
+ this.deferred.clear();
21447
+ }
21448
+ /** @nocollapse */
21449
+ static { this.ɵprov = ɵɵdefineInjectable({
21450
+ token: OnIdleScheduler,
21451
+ providedIn: 'root',
21452
+ factory: () => new OnIdleScheduler(),
21453
+ }); }
21454
+ }
20991
21455
 
20992
21456
  function elementStartFirstCreatePass(index, tView, lView, name, attrsIndex, localRefsIndex) {
20993
21457
  ngDevMode && assertFirstCreatePass(tView);
@@ -26208,7 +26672,7 @@ function getAsyncClassMetadata(type) {
26208
26672
  }
26209
26673
  /**
26210
26674
  * Handles the process of applying metadata info to a component class in case
26211
- * component template had `{#defer}` blocks (thus some dependencies became deferrable).
26675
+ * component template had defer blocks (thus some dependencies became deferrable).
26212
26676
  *
26213
26677
  * @param type Component class where metadata should be added
26214
26678
  * @param dependencyLoaderFn Function that loads dependencies
@@ -26956,16 +27420,13 @@ class QueryList {
26956
27420
  * are compared as is (without any pre-processing).
26957
27421
  */
26958
27422
  reset(resultsTree, identityAccessor) {
26959
- // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of
26960
- // QueryList (but not for QueryList itself.)
26961
- const self = this;
26962
- self.dirty = false;
27423
+ this.dirty = false;
26963
27424
  const newResultFlat = flatten(resultsTree);
26964
- if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {
26965
- self._results = newResultFlat;
26966
- self.length = newResultFlat.length;
26967
- self.last = newResultFlat[this.length - 1];
26968
- self.first = newResultFlat[0];
27425
+ if (this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor)) {
27426
+ this._results = newResultFlat;
27427
+ this.length = newResultFlat.length;
27428
+ this.last = newResultFlat[this.length - 1];
27429
+ this.first = newResultFlat[0];
26969
27430
  }
26970
27431
  }
26971
27432
  /**
@@ -29038,10 +29499,10 @@ class ApplicationInitStatus {
29038
29499
  static { this.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(); }; }
29039
29500
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' }); }
29040
29501
  }
29041
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
29502
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
29042
29503
  type: Injectable,
29043
29504
  args: [{ providedIn: 'root' }]
29044
- }], function () { return []; }, null); })();
29505
+ }], () => [], null); })();
29045
29506
 
29046
29507
  class Console {
29047
29508
  log(message) {
@@ -29056,7 +29517,7 @@ class Console {
29056
29517
  static { this.ɵfac = function Console_Factory(t) { return new (t || Console)(); }; }
29057
29518
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac, providedIn: 'platform' }); }
29058
29519
  }
29059
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{
29520
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{
29060
29521
  type: Injectable,
29061
29522
  args: [{ providedIn: 'platform' }]
29062
29523
  }], null, null); })();
@@ -29267,7 +29728,7 @@ class InitialRenderPendingTasks {
29267
29728
  static { this.ɵfac = function InitialRenderPendingTasks_Factory(t) { return new (t || InitialRenderPendingTasks)(); }; }
29268
29729
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: InitialRenderPendingTasks, factory: InitialRenderPendingTasks.ɵfac, providedIn: 'root' }); }
29269
29730
  }
29270
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(InitialRenderPendingTasks, [{
29731
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(InitialRenderPendingTasks, [{
29271
29732
  type: Injectable,
29272
29733
  args: [{ providedIn: 'root' }]
29273
29734
  }], null, null); })();
@@ -29355,7 +29816,7 @@ class Compiler {
29355
29816
  static { this.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); }; }
29356
29817
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' }); }
29357
29818
  }
29358
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
29819
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
29359
29820
  type: Injectable,
29360
29821
  args: [{ providedIn: 'root' }]
29361
29822
  }], null, null); })();
@@ -30319,12 +30780,12 @@ class Testability {
30319
30780
  static { this.ɵfac = function Testability_Factory(t) { return new (t || Testability)(ɵɵinject(NgZone), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER)); }; }
30320
30781
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac }); }
30321
30782
  }
30322
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Testability, [{
30783
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Testability, [{
30323
30784
  type: Injectable
30324
- }], function () { return [{ type: NgZone }, { type: TestabilityRegistry }, { type: undefined, decorators: [{
30785
+ }], () => [{ type: NgZone }, { type: TestabilityRegistry }, { type: undefined, decorators: [{
30325
30786
  type: Inject,
30326
30787
  args: [TESTABILITY_GETTER]
30327
- }] }]; }, null); })();
30788
+ }] }], null); })();
30328
30789
  /**
30329
30790
  * A global registry of {@link Testability} instances for specific elements.
30330
30791
  * @publicApi
@@ -30386,7 +30847,7 @@ class TestabilityRegistry {
30386
30847
  static { this.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); }; }
30387
30848
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac, providedIn: 'platform' }); }
30388
30849
  }
30389
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{
30850
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{
30390
30851
  type: Injectable,
30391
30852
  args: [{ providedIn: 'platform' }]
30392
30853
  }], null, null); })();
@@ -30829,10 +31290,10 @@ class PlatformRef {
30829
31290
  static { this.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); }; }
30830
31291
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' }); }
30831
31292
  }
30832
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
31293
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
30833
31294
  type: Injectable,
30834
31295
  args: [{ providedIn: 'platform' }]
30835
- }], function () { return [{ type: Injector }]; }, null); })();
31296
+ }], () => [{ type: Injector }], null); })();
30836
31297
  // Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->
30837
31298
  // `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in
30838
31299
  // a set of default options returned.
@@ -31212,7 +31673,7 @@ class ApplicationRef {
31212
31673
  static { this.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(); }; }
31213
31674
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' }); }
31214
31675
  }
31215
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
31676
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
31216
31677
  type: Injectable,
31217
31678
  args: [{ providedIn: 'root' }]
31218
31679
  }], null, null); })();
@@ -31271,7 +31732,7 @@ class NgZoneChangeDetectionScheduler {
31271
31732
  static { this.ɵfac = function NgZoneChangeDetectionScheduler_Factory(t) { return new (t || NgZoneChangeDetectionScheduler)(); }; }
31272
31733
  static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: NgZoneChangeDetectionScheduler, factory: NgZoneChangeDetectionScheduler.ɵfac, providedIn: 'root' }); }
31273
31734
  }
31274
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
31735
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
31275
31736
  type: Injectable,
31276
31737
  args: [{ providedIn: 'root' }]
31277
31738
  }], null, null); })();
@@ -31328,6 +31789,23 @@ function provideZoneChangeDetection(options) {
31328
31789
  zoneProviders,
31329
31790
  ]);
31330
31791
  }
31792
+ let whenStableStore;
31793
+ /**
31794
+ * Returns a Promise that resolves when the application becomes stable after this method is called
31795
+ * the first time.
31796
+ */
31797
+ function whenStable(applicationRef) {
31798
+ whenStableStore ??= new WeakMap();
31799
+ const cachedWhenStable = whenStableStore.get(applicationRef);
31800
+ if (cachedWhenStable) {
31801
+ return cachedWhenStable;
31802
+ }
31803
+ const whenStablePromise = applicationRef.isStable.pipe(first((isStable) => isStable)).toPromise().then(() => void 0);
31804
+ whenStableStore.set(applicationRef, whenStablePromise);
31805
+ // Be a good citizen and clean the store `onDestroy` even though we are using `WeakMap`.
31806
+ applicationRef.onDestroy(() => whenStableStore?.delete(applicationRef));
31807
+ return whenStablePromise;
31808
+ }
31331
31809
 
31332
31810
  /**
31333
31811
  * Returns whether Angular is in development mode.
@@ -32047,9 +32525,9 @@ class ApplicationModule {
32047
32525
  static { this.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule }); }
32048
32526
  static { this.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({}); }
32049
32527
  }
32050
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
32528
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
32051
32529
  type: NgModule
32052
- }], function () { return [{ type: ApplicationRef }]; }, null); })();
32530
+ }], () => [{ type: ApplicationRef }], null); })();
32053
32531
 
32054
32532
  /**
32055
32533
  * A collection that tracks all serialized views (`ngh` DOM annotations)
@@ -32595,8 +33073,8 @@ function printHydrationStats(injector) {
32595
33073
  /**
32596
33074
  * Returns a Promise that is resolved when an application becomes stable.
32597
33075
  */
32598
- function whenStable(appRef, injector) {
32599
- const isStablePromise = appRef.isStable.pipe(first((isStable) => isStable)).toPromise();
33076
+ function whenStableWithTimeout(appRef, injector) {
33077
+ const whenStablePromise = whenStable(appRef);
32600
33078
  if (typeof ngDevMode !== 'undefined' && ngDevMode) {
32601
33079
  const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;
32602
33080
  const console = injector.get(Console);
@@ -32607,9 +33085,9 @@ function whenStable(appRef, injector) {
32607
33085
  const timeoutId = ngZone.runOutsideAngular(() => {
32608
33086
  return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);
32609
33087
  });
32610
- isStablePromise.finally(() => clearTimeout(timeoutId));
33088
+ whenStablePromise.finally(() => clearTimeout(timeoutId));
32611
33089
  }
32612
- return isStablePromise.then(() => { });
33090
+ return whenStablePromise;
32613
33091
  }
32614
33092
  /**
32615
33093
  * Returns a set of providers required to setup hydration support
@@ -32688,7 +33166,7 @@ function withDomHydration() {
32688
33166
  //
32689
33167
  // Note: the cleanup task *MUST* be scheduled within the Angular zone
32690
33168
  // to ensure that change detection is properly run afterward.
32691
- whenStable(appRef, injector).then(() => {
33169
+ whenStableWithTimeout(appRef, injector).then(() => {
32692
33170
  NgZone.assertInAngularZone();
32693
33171
  cleanupDehydratedViews(appRef);
32694
33172
  if (typeof ngDevMode !== 'undefined' && ngDevMode) {
@@ -33218,5 +33696,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
33218
33696
  * Generated bundle index. Do not edit.
33219
33697
  */
33220
33698
 
33221
- export { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, 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, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, 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, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterNextRender, afterRender, asNativeElements, assertInInjectionContext, assertPlatform, booleanAttribute, computed, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, isDevMode, isSignal, isStandalone, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, numberAttribute, platformCore, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, runInInjectionContext, setTestabilityGetter, signal, untracked, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderEventManager as ɵAfterRenderEventManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, ENABLED_SSR_FEATURES as ɵENABLED_SSR_FEATURES, EffectScheduler as ɵEffectScheduler, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, InitialRenderPendingTasks as ɵInitialRenderPendingTasks, 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, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZoneAwareQueueingScheduler as ɵZoneAwareQueueingScheduler, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, 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, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadata as ɵgetAsyncClassMetadata, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, withDomHydration as ɵwithDomHydration, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵdefer, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵ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, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵ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, ɵɵvalidateIframeAttribute, ɵɵviewQuery };
33699
+ export { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, 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, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, 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, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterNextRender, afterRender, asNativeElements, assertInInjectionContext, assertPlatform, booleanAttribute, computed, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, isDevMode, isSignal, isStandalone, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, numberAttribute, platformCore, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, runInInjectionContext, setTestabilityGetter, signal, untracked, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderEventManager as ɵAfterRenderEventManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, ENABLED_SSR_FEATURES as ɵENABLED_SSR_FEATURES, EffectScheduler as ɵEffectScheduler, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, InitialRenderPendingTasks as ɵInitialRenderPendingTasks, 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, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZoneAwareQueueingScheduler as ɵZoneAwareQueueingScheduler, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, 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, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadata as ɵgetAsyncClassMetadata, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenStable as ɵwhenStable, withDomHydration as ɵwithDomHydration, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵdefer, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵ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, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵ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, ɵɵvalidateIframeAttribute, ɵɵviewQuery };
33222
33700
  //# sourceMappingURL=core.mjs.map