@biggive/components 202401021213.0.0 → 202401021340.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/biggive/biggive.esm.js +1 -1
  2. package/dist/biggive/biggive.esm.js.map +1 -1
  3. package/dist/biggive/p-00eb2e50.entry.js +2 -0
  4. package/dist/biggive/{p-b034ff29.entry.js → p-02eace20.entry.js} +2 -2
  5. package/dist/biggive/{p-ac8d8b74.entry.js → p-074c34fd.entry.js} +2 -2
  6. package/dist/biggive/{p-6618d001.entry.js → p-32fefae2.entry.js} +2 -2
  7. package/dist/biggive/{p-20e56ec8.entry.js → p-5778a304.entry.js} +2 -2
  8. package/dist/biggive/{p-08d69498.entry.js → p-5fe4d38a.entry.js} +2 -2
  9. package/dist/biggive/p-8814b5ee.js +3 -0
  10. package/dist/biggive/p-8814b5ee.js.map +1 -0
  11. package/dist/biggive/p-89950399.entry.js +2 -0
  12. package/dist/biggive/{p-e87dac29.entry.js → p-9a6b2534.entry.js} +2 -2
  13. package/dist/biggive/{p-2b7bde3a.entry.js → p-a02ae381.entry.js} +2 -2
  14. package/dist/biggive/{p-874d954b.entry.js → p-a14dec9d.entry.js} +2 -2
  15. package/dist/biggive/{p-9cf0778e.entry.js → p-b2c85e66.entry.js} +2 -2
  16. package/dist/biggive/{p-56928b75.entry.js → p-be942b9a.entry.js} +2 -2
  17. package/dist/biggive/{p-fb7284fa.entry.js → p-faa0dd62.entry.js} +2 -2
  18. package/dist/cjs/biggive-accordion_42.cjs.entry.js +1 -1
  19. package/dist/cjs/biggive-basic-card.cjs.entry.js +1 -1
  20. package/dist/cjs/biggive-beneficiary-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/biggive-boxed-content.cjs.entry.js +1 -1
  22. package/dist/cjs/biggive-category-icon.cjs.entry.js +1 -1
  23. package/dist/cjs/biggive-cookie-banner.cjs.entry.js +1 -1
  24. package/dist/cjs/biggive-form.cjs.entry.js +1 -1
  25. package/dist/cjs/biggive-icon-group.cjs.entry.js +1 -1
  26. package/dist/cjs/biggive-image-card.cjs.entry.js +1 -1
  27. package/dist/cjs/biggive-nav-group.cjs.entry.js +1 -1
  28. package/dist/cjs/biggive-nav-item.cjs.entry.js +1 -1
  29. package/dist/cjs/biggive-table.cjs.entry.js +1 -1
  30. package/dist/cjs/biggive-video.cjs.entry.js +1 -1
  31. package/dist/cjs/biggive.cjs.js +24 -1
  32. package/dist/cjs/biggive.cjs.js.map +1 -1
  33. package/dist/cjs/{index-91417d6c.js → index-1ad082b4.js} +298 -10
  34. package/dist/cjs/index-1ad082b4.js.map +1 -0
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/esm/biggive-accordion_42.entry.js +1 -1
  37. package/dist/esm/biggive-basic-card.entry.js +1 -1
  38. package/dist/esm/biggive-beneficiary-icon.entry.js +1 -1
  39. package/dist/esm/biggive-boxed-content.entry.js +1 -1
  40. package/dist/esm/biggive-category-icon.entry.js +1 -1
  41. package/dist/esm/biggive-cookie-banner.entry.js +1 -1
  42. package/dist/esm/biggive-form.entry.js +1 -1
  43. package/dist/esm/biggive-icon-group.entry.js +1 -1
  44. package/dist/esm/biggive-image-card.entry.js +1 -1
  45. package/dist/esm/biggive-nav-group.entry.js +1 -1
  46. package/dist/esm/biggive-nav-item.entry.js +1 -1
  47. package/dist/esm/biggive-table.entry.js +1 -1
  48. package/dist/esm/biggive-video.entry.js +1 -1
  49. package/dist/esm/biggive.js +25 -2
  50. package/dist/esm/biggive.js.map +1 -1
  51. package/dist/esm/{index-3ced6448.js → index-3eee9238.js} +298 -11
  52. package/dist/esm/index-3eee9238.js.map +1 -0
  53. package/dist/esm/loader.js +2 -2
  54. package/package.json +1 -1
  55. package/dist/biggive/p-15e42d9a.entry.js +0 -2
  56. package/dist/biggive/p-59f7c74d.entry.js +0 -2
  57. package/dist/biggive/p-f985f9ed.js +0 -3
  58. package/dist/biggive/p-f985f9ed.js.map +0 -1
  59. package/dist/cjs/index-91417d6c.js.map +0 -1
  60. package/dist/esm/index-3ced6448.js.map +0 -1
  61. /package/dist/biggive/{p-59f7c74d.entry.js.map → p-00eb2e50.entry.js.map} +0 -0
  62. /package/dist/biggive/{p-b034ff29.entry.js.map → p-02eace20.entry.js.map} +0 -0
  63. /package/dist/biggive/{p-ac8d8b74.entry.js.map → p-074c34fd.entry.js.map} +0 -0
  64. /package/dist/biggive/{p-6618d001.entry.js.map → p-32fefae2.entry.js.map} +0 -0
  65. /package/dist/biggive/{p-20e56ec8.entry.js.map → p-5778a304.entry.js.map} +0 -0
  66. /package/dist/biggive/{p-08d69498.entry.js.map → p-5fe4d38a.entry.js.map} +0 -0
  67. /package/dist/biggive/{p-15e42d9a.entry.js.map → p-89950399.entry.js.map} +0 -0
  68. /package/dist/biggive/{p-e87dac29.entry.js.map → p-9a6b2534.entry.js.map} +0 -0
  69. /package/dist/biggive/{p-2b7bde3a.entry.js.map → p-a02ae381.entry.js.map} +0 -0
  70. /package/dist/biggive/{p-874d954b.entry.js.map → p-a14dec9d.entry.js.map} +0 -0
  71. /package/dist/biggive/{p-9cf0778e.entry.js.map → p-b2c85e66.entry.js.map} +0 -0
  72. /package/dist/biggive/{p-56928b75.entry.js.map → p-be942b9a.entry.js.map} +0 -0
  73. /package/dist/biggive/{p-fb7284fa.entry.js.map → p-faa0dd62.entry.js.map} +0 -0
@@ -21,7 +21,6 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'biggive';
24
- const BUILD = /* biggive */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
25
24
 
26
25
  /**
27
26
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -950,14 +949,46 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
950
949
  if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
951
950
  {
952
951
  // we've got an old slot vnode and the wrapper is being replaced
953
- // so let's move the old slot content back to its original location
954
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
952
+ // so let's move the old slot content to the root of the element currently being rendered
953
+ relocateToHostRoot(oldParentVNode.$elm$);
955
954
  }
956
955
  }
957
956
  }
958
957
  }
959
958
  return elm;
960
959
  };
960
+ /**
961
+ * Relocates all child nodes of an element that were a part of a previous slot relocation
962
+ * to the root of the Stencil component currently being rendered. This happens when a parent
963
+ * element of a slot reference node dynamically changes and triggers a re-render. We cannot use
964
+ * `putBackInOriginalLocation()` because that may relocate nodes to elements that will not be re-rendered
965
+ * and so they will not be relocated again.
966
+ *
967
+ * @param parentElm The element potentially containing relocated nodes.
968
+ */
969
+ const relocateToHostRoot = (parentElm) => {
970
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
971
+ const host = parentElm.closest(hostTagName.toLowerCase());
972
+ if (host != null) {
973
+ for (const childNode of Array.from(parentElm.childNodes)) {
974
+ // Only relocate nodes that were slotted in
975
+ if (childNode['s-sh'] != null) {
976
+ host.insertBefore(childNode, null);
977
+ // Reset so we can correctly move the node around again.
978
+ childNode['s-sh'] = undefined;
979
+ // When putting an element node back in its original location,
980
+ // we need to reset the `slot` attribute back to the value it originally had
981
+ // so we can correctly relocate it again in the future
982
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */ && !!childNode['s-sn']) {
983
+ childNode.setAttribute('slot', childNode['s-sn']);
984
+ }
985
+ // Need to tell the render pipeline to check to relocate slot content again
986
+ checkSlotRelocate = true;
987
+ }
988
+ }
989
+ }
990
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
991
+ };
961
992
  const putBackInOriginalLocation = (parentElm, recursive) => {
962
993
  var _a;
963
994
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
@@ -1461,7 +1492,7 @@ const markSlotContentForRelocation = (elm) => {
1461
1492
  if (!node['s-cn'] &&
1462
1493
  !node['s-nr'] &&
1463
1494
  node['s-hn'] !== childNode['s-hn'] &&
1464
- (!BUILD.experimentalSlotFixes )) {
1495
+ (!node['s-sh'] || node['s-sh'] !== childNode['s-hn'])) {
1465
1496
  // if `node` is located in the slot that `childNode` refers to (via the
1466
1497
  // `'s-sn'` property) then we need to relocate it from it's current spot
1467
1498
  // (under the host element parent) to the right slot location
@@ -1570,7 +1601,7 @@ const nullifyVNodeRefs = (vNode) => {
1570
1601
  * @param isInitialLoad whether or not this is the first call after page load
1571
1602
  */
1572
1603
  const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1573
- var _a, _b, _c, _d;
1604
+ var _a, _b, _c, _d, _e;
1574
1605
  const hostElm = hostRef.$hostElement$;
1575
1606
  const cmpMeta = hostRef.$cmpMeta$;
1576
1607
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1652,7 +1683,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1652
1683
  // to make sure they get inserted into their new how in the same order they were declared in their original location.
1653
1684
  //
1654
1685
  // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1655
- {
1686
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* NODE_TYPE.ElementNode */)) {
1656
1687
  let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1657
1688
  while (orgLocationNode) {
1658
1689
  let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
@@ -1672,9 +1703,22 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1672
1703
  // since that the node to relocate
1673
1704
  // has a different next sibling or parent relocated
1674
1705
  if (nodeToRelocate !== insertBeforeNode) {
1675
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1676
- // probably a component in the index.html that doesn't have its hostname set
1677
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1706
+ // Handle a use-case where we relocate a slot where
1707
+ // the slot name changes along the way (for instance, a default to a named slot).
1708
+ // In this case, we need to update the relocated node's slot attribute to match
1709
+ // the slot name it is being relocated into.
1710
+ //
1711
+ // There is a very niche use case where we may be relocating a text node. For now,
1712
+ // we ignore anything that is not an element node since non-element nodes cannot have
1713
+ // attributes to specify the slot. We'll deal with this if it becomes a problem... but super edge-case-y
1714
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1715
+ slotRefNode['s-fs'] !== nodeToRelocate.getAttribute('slot')) {
1716
+ if (!slotRefNode['s-fs']) {
1717
+ nodeToRelocate.removeAttribute('slot');
1718
+ }
1719
+ else {
1720
+ nodeToRelocate.setAttribute('slot', slotRefNode['s-fs']);
1721
+ }
1678
1722
  }
1679
1723
  // Add it back to the dom but in its new home
1680
1724
  // If we get to this point and `insertBeforeNode` is `null`, that means
@@ -1713,6 +1757,21 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1713
1757
  // always reset
1714
1758
  relocateNodes.length = 0;
1715
1759
  }
1760
+ // Hide any elements that were projected through, but don't have a slot to go to.
1761
+ // Only an issue if there were no "slots" rendered. Otherwise, nodes are hidden correctly.
1762
+ // This _only_ happens for `scoped` components!
1763
+ if (cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
1764
+ for (const childNode of rootVnode.$elm$.childNodes) {
1765
+ if (childNode['s-hn'] !== hostTagName && !childNode['s-sh']) {
1766
+ // Store the initial value of `hidden` so we can reset it later when
1767
+ // moving nodes around.
1768
+ if (isInitialLoad && childNode['s-ih'] == null) {
1769
+ childNode['s-ih'] = (_e = childNode.hidden) !== null && _e !== void 0 ? _e : false;
1770
+ }
1771
+ childNode.hidden = true;
1772
+ }
1773
+ }
1774
+ }
1716
1775
  };
1717
1776
  const attachToAncestor = (hostRef, ancestorComponent) => {
1718
1777
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -2313,6 +2372,217 @@ const disconnectedCallback = async (elm) => {
2313
2372
  }
2314
2373
  }
2315
2374
  };
2375
+ const patchCloneNode = (HostElementPrototype) => {
2376
+ const orgCloneNode = HostElementPrototype.cloneNode;
2377
+ HostElementPrototype.cloneNode = function (deep) {
2378
+ const srcNode = this;
2379
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
2380
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
2381
+ if (!isShadowDom && deep) {
2382
+ let i = 0;
2383
+ let slotted, nonStencilNode;
2384
+ const stencilPrivates = [
2385
+ 's-id',
2386
+ 's-cr',
2387
+ 's-lr',
2388
+ 's-rc',
2389
+ 's-sc',
2390
+ 's-p',
2391
+ 's-cn',
2392
+ 's-sr',
2393
+ 's-sn',
2394
+ 's-hn',
2395
+ 's-ol',
2396
+ 's-nr',
2397
+ 's-si',
2398
+ ];
2399
+ for (; i < srcNode.childNodes.length; i++) {
2400
+ slotted = srcNode.childNodes[i]['s-nr'];
2401
+ nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
2402
+ if (slotted) {
2403
+ if (clonedNode.__appendChild) {
2404
+ clonedNode.__appendChild(slotted.cloneNode(true));
2405
+ }
2406
+ else {
2407
+ clonedNode.appendChild(slotted.cloneNode(true));
2408
+ }
2409
+ }
2410
+ if (nonStencilNode) {
2411
+ clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));
2412
+ }
2413
+ }
2414
+ }
2415
+ return clonedNode;
2416
+ };
2417
+ };
2418
+ /**
2419
+ * Patches the `appendChild` method on a `scoped` Stencil component.
2420
+ * The patch will attempt to find a slot with the same name as the node being appended
2421
+ * and insert it into the slot reference if found. Otherwise, it falls-back to the original
2422
+ * `appendChild` method.
2423
+ *
2424
+ * @param HostElementPrototype The Stencil component to be patched
2425
+ */
2426
+ const patchSlotAppendChild = (HostElementPrototype) => {
2427
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
2428
+ HostElementPrototype.appendChild = function (newChild) {
2429
+ const slotName = (newChild['s-sn'] = getSlotName(newChild));
2430
+ const slotNode = getHostSlotNode(this.childNodes, slotName);
2431
+ if (slotNode) {
2432
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2433
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
2434
+ appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
2435
+ // Check if there is fallback content that should be hidden
2436
+ updateFallbackSlotVisibility(this);
2437
+ return;
2438
+ }
2439
+ return this.__appendChild(newChild);
2440
+ };
2441
+ };
2442
+ /**
2443
+ * Patches the text content of an unnamed slotted node inside a scoped component
2444
+ * @param hostElementPrototype the `Element` to be patched
2445
+ */
2446
+ const patchTextContent = (hostElementPrototype) => {
2447
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
2448
+ Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
2449
+ {
2450
+ // Patch `textContent` to mimic shadow root behavior
2451
+ Object.defineProperty(hostElementPrototype, 'textContent', {
2452
+ // To mimic shadow root behavior, we need to return the text content of all
2453
+ // nodes in a slot reference node
2454
+ get() {
2455
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2456
+ const textContent = slotRefNodes
2457
+ .map((node) => {
2458
+ var _a, _b;
2459
+ const text = [];
2460
+ // Need to get the text content of all nodes in the slot reference node
2461
+ let slotContent = node.nextSibling;
2462
+ while (slotContent && slotContent['s-sn'] === node['s-sn']) {
2463
+ if (slotContent.nodeType === 3 /* NODE_TYPES.TEXT_NODE */ || slotContent.nodeType === 1 /* NODE_TYPES.ELEMENT_NODE */) {
2464
+ text.push((_b = (_a = slotContent.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '');
2465
+ }
2466
+ slotContent = slotContent.nextSibling;
2467
+ }
2468
+ return text.filter((ref) => ref !== '').join(' ');
2469
+ })
2470
+ .filter((text) => text !== '')
2471
+ .join(' ');
2472
+ // Pad the string to return
2473
+ return ' ' + textContent + ' ';
2474
+ },
2475
+ // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2476
+ // reference node. If a default slot reference node exists, the text content will be
2477
+ // placed there. Otherwise, the new text node will be hidden
2478
+ set(value) {
2479
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2480
+ slotRefNodes.forEach((node) => {
2481
+ // Remove the existing content of the slot
2482
+ let slotContent = node.nextSibling;
2483
+ while (slotContent && slotContent['s-sn'] === node['s-sn']) {
2484
+ const tmp = slotContent;
2485
+ slotContent = slotContent.nextSibling;
2486
+ tmp.remove();
2487
+ }
2488
+ // If this is a default slot, add the text node in the slot location.
2489
+ // Otherwise, destroy the slot reference node
2490
+ if (node['s-sn'] === '') {
2491
+ const textNode = this.ownerDocument.createTextNode(value);
2492
+ textNode['s-sn'] = '';
2493
+ node.parentElement.insertBefore(textNode, node.nextSibling);
2494
+ }
2495
+ else {
2496
+ node.remove();
2497
+ }
2498
+ });
2499
+ },
2500
+ });
2501
+ }
2502
+ };
2503
+ const patchChildSlotNodes = (elm, cmpMeta) => {
2504
+ class FakeNodeList extends Array {
2505
+ item(n) {
2506
+ return this[n];
2507
+ }
2508
+ }
2509
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2510
+ if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
2511
+ const childNodesFn = elm.__lookupGetter__('childNodes');
2512
+ Object.defineProperty(elm, 'children', {
2513
+ get() {
2514
+ return this.childNodes.map((n) => n.nodeType === 1);
2515
+ },
2516
+ });
2517
+ Object.defineProperty(elm, 'childElementCount', {
2518
+ get() {
2519
+ return elm.children.length;
2520
+ },
2521
+ });
2522
+ Object.defineProperty(elm, 'childNodes', {
2523
+ get() {
2524
+ const childNodes = childNodesFn.call(this);
2525
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&
2526
+ getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {
2527
+ const result = new FakeNodeList();
2528
+ for (let i = 0; i < childNodes.length; i++) {
2529
+ const slot = childNodes[i]['s-nr'];
2530
+ if (slot) {
2531
+ result.push(slot);
2532
+ }
2533
+ }
2534
+ return result;
2535
+ }
2536
+ return FakeNodeList.from(childNodes);
2537
+ },
2538
+ });
2539
+ }
2540
+ };
2541
+ /**
2542
+ * Recursively finds all slot reference nodes ('s-sr') in a series of child nodes.
2543
+ *
2544
+ * @param childNodes The set of child nodes to search for slot reference nodes.
2545
+ * @returns An array of slot reference nodes.
2546
+ */
2547
+ const getAllChildSlotNodes = (childNodes) => {
2548
+ const slotRefNodes = [];
2549
+ for (const childNode of Array.from(childNodes)) {
2550
+ if (childNode['s-sr']) {
2551
+ slotRefNodes.push(childNode);
2552
+ }
2553
+ slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2554
+ }
2555
+ return slotRefNodes;
2556
+ };
2557
+ const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
2558
+ /**
2559
+ * Recursively searches a series of child nodes for a slot with the provided name.
2560
+ * @param childNodes the nodes to search for a slot with a specific name.
2561
+ * @param slotName the name of the slot to match on.
2562
+ * @returns a reference to the slot node that matches the provided name, `null` otherwise
2563
+ */
2564
+ const getHostSlotNode = (childNodes, slotName) => {
2565
+ let i = 0;
2566
+ let childNode;
2567
+ for (; i < childNodes.length; i++) {
2568
+ childNode = childNodes[i];
2569
+ if (childNode['s-sr'] && childNode['s-sn'] === slotName) {
2570
+ return childNode;
2571
+ }
2572
+ childNode = getHostSlotNode(childNode.childNodes, slotName);
2573
+ if (childNode) {
2574
+ return childNode;
2575
+ }
2576
+ }
2577
+ return null;
2578
+ };
2579
+ const getHostSlotChildNodes = (n, slotName) => {
2580
+ const childNodes = [n];
2581
+ while ((n = n.nextSibling) && n['s-sn'] === slotName) {
2582
+ childNodes.push(n);
2583
+ }
2584
+ return childNodes;
2585
+ };
2316
2586
  const bootstrapLazy = (lazyBundles, options = {}) => {
2317
2587
  var _a;
2318
2588
  const endBootstrap = createTime();
@@ -2396,6 +2666,21 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2396
2666
  return getHostRef(this).$onReadyPromise$;
2397
2667
  }
2398
2668
  };
2669
+ // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check
2670
+ {
2671
+ {
2672
+ patchChildSlotNodes(HostElement.prototype, cmpMeta);
2673
+ }
2674
+ {
2675
+ patchCloneNode(HostElement.prototype);
2676
+ }
2677
+ {
2678
+ patchSlotAppendChild(HostElement.prototype);
2679
+ }
2680
+ if (cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
2681
+ patchTextContent(HostElement.prototype);
2682
+ }
2683
+ }
2399
2684
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
2400
2685
  if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2401
2686
  cmpTags.push(tagName);
@@ -2517,6 +2802,8 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2517
2802
  const styles = /*@__PURE__*/ new Map();
2518
2803
  const win = typeof window !== 'undefined' ? window : {};
2519
2804
  const doc = win.document || { head: {} };
2805
+ const H = (win.HTMLElement || class {
2806
+ });
2520
2807
  const plt = {
2521
2808
  $flags$: 0,
2522
2809
  $resourcesUrl$: '',
@@ -2582,6 +2869,7 @@ const flush = () => {
2582
2869
  const nextTick = (cb) => promiseResolve().then(cb);
2583
2870
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2584
2871
 
2872
+ exports.H = H;
2585
2873
  exports.Host = Host;
2586
2874
  exports.bootstrapLazy = bootstrapLazy;
2587
2875
  exports.createEvent = createEvent;
@@ -2592,4 +2880,4 @@ exports.promiseResolve = promiseResolve;
2592
2880
  exports.registerInstance = registerInstance;
2593
2881
  exports.setNonce = setNonce;
2594
2882
 
2595
- //# sourceMappingURL=index-91417d6c.js.map
2883
+ //# sourceMappingURL=index-1ad082b4.js.map