@stencil/core 4.23.0-dev.1735794112.5d29255 → 4.23.0-dev.1736139708.13ee704

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.
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var platform_exports = {};
32
32
  __export(platform_exports, {
33
33
  Build: () => Build,
34
- Env: () => import_app_data21.Env,
34
+ Env: () => import_app_data22.Env,
35
35
  Fragment: () => Fragment,
36
36
  Host: () => Host,
37
37
  addHostEventListeners: () => addHostEventListeners,
@@ -380,7 +380,7 @@ var isMemberInElement = (elm, memberName) => {
380
380
  };
381
381
 
382
382
  // src/testing/platform/index.ts
383
- var import_app_data21 = require("@stencil/core/internal/app-data");
383
+ var import_app_data22 = require("@stencil/core/internal/app-data");
384
384
 
385
385
  // src/runtime/asset-path.ts
386
386
  var getAssetPath = (path) => {
@@ -390,7 +390,7 @@ var getAssetPath = (path) => {
390
390
  var setAssetPath = (path) => plt.$resourcesUrl$ = path;
391
391
 
392
392
  // src/runtime/bootstrap-custom-element.ts
393
- var import_app_data18 = require("@stencil/core/internal/app-data");
393
+ var import_app_data19 = require("@stencil/core/internal/app-data");
394
394
 
395
395
  // src/utils/constants.ts
396
396
  var EMPTY_OBJ = {};
@@ -398,7 +398,7 @@ var SVG_NS = "http://www.w3.org/2000/svg";
398
398
  var HTML_NS = "http://www.w3.org/1999/xhtml";
399
399
 
400
400
  // src/utils/helpers.ts
401
- var isDef = (v) => v != null;
401
+ var isDef = (v) => v != null && v !== void 0;
402
402
  var isComplexType = (o) => {
403
403
  o = typeof o;
404
404
  return o === "object" || o === "function";
@@ -460,13 +460,13 @@ var unwrapErr = (result) => {
460
460
  };
461
461
 
462
462
  // src/runtime/connected-callback.ts
463
- var import_app_data16 = require("@stencil/core/internal/app-data");
463
+ var import_app_data17 = require("@stencil/core/internal/app-data");
464
464
 
465
465
  // src/runtime/client-hydrate.ts
466
- var import_app_data7 = require("@stencil/core/internal/app-data");
466
+ var import_app_data8 = require("@stencil/core/internal/app-data");
467
467
 
468
468
  // src/runtime/dom-extras.ts
469
- var import_app_data5 = require("@stencil/core/internal/app-data");
469
+ var import_app_data6 = require("@stencil/core/internal/app-data");
470
470
 
471
471
  // src/runtime/runtime-constants.ts
472
472
  var CONTENT_REF_ID = "r";
@@ -493,11 +493,114 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
493
493
  "formStateRestoreCallback"
494
494
  ];
495
495
 
496
+ // src/runtime/slot-polyfill-utils.ts
497
+ var import_app_data = require("@stencil/core/internal/app-data");
498
+ var updateFallbackSlotVisibility = (elm) => {
499
+ const childNodes = elm.__childNodes || elm.childNodes;
500
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
501
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
502
+ var _a;
503
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
504
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
505
+ slotNode.hidden = true;
506
+ } else {
507
+ slotNode.hidden = false;
508
+ }
509
+ }
510
+ });
511
+ }
512
+ for (const childNode of childNodes) {
513
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
514
+ updateFallbackSlotVisibility(childNode);
515
+ }
516
+ }
517
+ };
518
+ var getSlottedChildNodes = (childNodes) => {
519
+ const result = [];
520
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
521
+ const slottedNode = childNodes[i2]["s-nr"];
522
+ if (slottedNode && slottedNode.isConnected) {
523
+ result.push(slottedNode);
524
+ }
525
+ }
526
+ return result;
527
+ };
528
+ var getHostSlotNodes = (childNodes, hostName, slotName) => {
529
+ let i2 = 0;
530
+ let slottedNodes = [];
531
+ let childNode;
532
+ for (; i2 < childNodes.length; i2++) {
533
+ childNode = childNodes[i2];
534
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
535
+ slottedNodes.push(childNode);
536
+ if (typeof slotName !== "undefined") return slottedNodes;
537
+ }
538
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
539
+ }
540
+ return slottedNodes;
541
+ };
542
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
543
+ const childNodes = [];
544
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
545
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
546
+ childNodes.push(node);
547
+ }
548
+ return childNodes;
549
+ };
550
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
551
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
552
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
553
+ return true;
554
+ }
555
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
556
+ return true;
557
+ }
558
+ return false;
559
+ }
560
+ if (nodeToRelocate["s-sn"] === slotName) {
561
+ return true;
562
+ }
563
+ return slotName === "";
564
+ };
565
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
566
+ let slottedNodeLocation;
567
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
568
+ slottedNodeLocation = newChild["s-ol"];
569
+ } else {
570
+ slottedNodeLocation = document.createTextNode("");
571
+ slottedNodeLocation["s-nr"] = newChild;
572
+ }
573
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
574
+ const parent = slotNode["s-cr"].parentNode;
575
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
576
+ if (typeof position !== "undefined") {
577
+ if (import_app_data.BUILD.hydrateClientSide) {
578
+ slottedNodeLocation["s-oo"] = position;
579
+ const childNodes = parent.__childNodes || parent.childNodes;
580
+ const slotRelocateNodes = [slottedNodeLocation];
581
+ childNodes.forEach((n) => {
582
+ if (n["s-nr"]) slotRelocateNodes.push(n);
583
+ });
584
+ slotRelocateNodes.sort((a, b) => {
585
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
586
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
587
+ return 0;
588
+ });
589
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
590
+ }
591
+ } else {
592
+ appendMethod.call(parent, slottedNodeLocation);
593
+ }
594
+ newChild["s-ol"] = slottedNodeLocation;
595
+ newChild["s-sh"] = slotNode["s-hn"];
596
+ };
597
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
598
+
496
599
  // src/runtime/vdom/vdom-render.ts
497
- var import_app_data4 = require("@stencil/core/internal/app-data");
600
+ var import_app_data5 = require("@stencil/core/internal/app-data");
498
601
 
499
602
  // src/runtime/vdom/h.ts
500
- var import_app_data = require("@stencil/core/internal/app-data");
603
+ var import_app_data2 = require("@stencil/core/internal/app-data");
501
604
  var h = (nodeName, vnodeData, ...children) => {
502
605
  let child = null;
503
606
  let key = null;
@@ -513,7 +616,7 @@ var h = (nodeName, vnodeData, ...children) => {
513
616
  } else if (child != null && typeof child !== "boolean") {
514
617
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
515
618
  child = String(child);
516
- } else if (import_app_data.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
619
+ } else if (import_app_data2.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
517
620
  consoleDevError(`vNode passed as children has unexpected type.
518
621
  Make sure it's using the correct h() function.
519
622
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -529,28 +632,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
529
632
  };
530
633
  walk(children);
531
634
  if (vnodeData) {
532
- if (import_app_data.BUILD.isDev && nodeName === "input") {
635
+ if (import_app_data2.BUILD.isDev && nodeName === "input") {
533
636
  validateInputProperties(vnodeData);
534
637
  }
535
- if (import_app_data.BUILD.vdomKey && vnodeData.key) {
638
+ if (import_app_data2.BUILD.vdomKey && vnodeData.key) {
536
639
  key = vnodeData.key;
537
640
  }
538
- if (import_app_data.BUILD.slotRelocation && vnodeData.name) {
641
+ if (import_app_data2.BUILD.slotRelocation && vnodeData.name) {
539
642
  slotName = vnodeData.name;
540
643
  }
541
- if (import_app_data.BUILD.vdomClass) {
644
+ if (import_app_data2.BUILD.vdomClass) {
542
645
  const classData = vnodeData.className || vnodeData.class;
543
646
  if (classData) {
544
647
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
545
648
  }
546
649
  }
547
650
  }
548
- if (import_app_data.BUILD.isDev && vNodeChildren.some(isHost)) {
651
+ if (import_app_data2.BUILD.isDev && vNodeChildren.some(isHost)) {
549
652
  consoleDevError(`The <Host> must be the single root component. Make sure:
550
653
  - You are NOT using hostData() and <Host> in the same component.
551
654
  - <Host> is used once, and it's the single root component of the render() function.`);
552
655
  }
553
- if (import_app_data.BUILD.vdomFunctional && typeof nodeName === "function") {
656
+ if (import_app_data2.BUILD.vdomFunctional && typeof nodeName === "function") {
554
657
  return nodeName(
555
658
  vnodeData === null ? {} : vnodeData,
556
659
  vNodeChildren,
@@ -562,10 +665,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
562
665
  if (vNodeChildren.length > 0) {
563
666
  vnode.$children$ = vNodeChildren;
564
667
  }
565
- if (import_app_data.BUILD.vdomKey) {
668
+ if (import_app_data2.BUILD.vdomKey) {
566
669
  vnode.$key$ = key;
567
670
  }
568
- if (import_app_data.BUILD.slotRelocation) {
671
+ if (import_app_data2.BUILD.slotRelocation) {
569
672
  vnode.$name$ = slotName;
570
673
  }
571
674
  return vnode;
@@ -578,13 +681,13 @@ var newVNode = (tag, text) => {
578
681
  $elm$: null,
579
682
  $children$: null
580
683
  };
581
- if (import_app_data.BUILD.vdomAttribute) {
684
+ if (import_app_data2.BUILD.vdomAttribute) {
582
685
  vnode.$attrs$ = null;
583
686
  }
584
- if (import_app_data.BUILD.vdomKey) {
687
+ if (import_app_data2.BUILD.vdomKey) {
585
688
  vnode.$key$ = null;
586
689
  }
587
- if (import_app_data.BUILD.slotRelocation) {
690
+ if (import_app_data2.BUILD.slotRelocation) {
588
691
  vnode.$name$ = null;
589
692
  }
590
693
  return vnode;
@@ -637,28 +740,35 @@ var validateInputProperties = (inputElm) => {
637
740
  };
638
741
 
639
742
  // src/runtime/vdom/update-element.ts
640
- var import_app_data3 = require("@stencil/core/internal/app-data");
743
+ var import_app_data4 = require("@stencil/core/internal/app-data");
641
744
 
642
745
  // src/runtime/vdom/set-accessor.ts
643
- var import_app_data2 = require("@stencil/core/internal/app-data");
746
+ var import_app_data3 = require("@stencil/core/internal/app-data");
644
747
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
645
748
  if (oldValue !== newValue) {
646
749
  let isProp = isMemberInElement(elm, memberName);
647
750
  let ln = memberName.toLowerCase();
648
- if (import_app_data2.BUILD.vdomClass && memberName === "class") {
751
+ if (import_app_data3.BUILD.vdomClass && memberName === "class") {
649
752
  const classList = elm.classList;
650
753
  const oldClasses = parseClassList(oldValue);
651
- const newClasses = parseClassList(newValue);
652
- if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
754
+ let newClasses = parseClassList(newValue);
755
+ if (elm["s-si"]) {
653
756
  newClasses.push(elm["s-si"]);
757
+ oldClasses.forEach((c) => {
758
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
759
+ });
760
+ newClasses = [...new Set(newClasses)];
761
+ classList.add(...newClasses);
762
+ delete elm["s-si"];
763
+ } else {
764
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
765
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
654
766
  }
655
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
656
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
657
- } else if (import_app_data2.BUILD.vdomStyle && memberName === "style") {
658
- if (import_app_data2.BUILD.updatable) {
767
+ } else if (import_app_data3.BUILD.vdomStyle && memberName === "style") {
768
+ if (import_app_data3.BUILD.updatable) {
659
769
  for (const prop in oldValue) {
660
770
  if (!newValue || newValue[prop] == null) {
661
- if (!import_app_data2.BUILD.hydrateServerSide && prop.includes("-")) {
771
+ if (!import_app_data3.BUILD.hydrateServerSide && prop.includes("-")) {
662
772
  elm.style.removeProperty(prop);
663
773
  } else {
664
774
  elm.style[prop] = "";
@@ -668,19 +778,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
668
778
  }
669
779
  for (const prop in newValue) {
670
780
  if (!oldValue || newValue[prop] !== oldValue[prop]) {
671
- if (!import_app_data2.BUILD.hydrateServerSide && prop.includes("-")) {
781
+ if (!import_app_data3.BUILD.hydrateServerSide && prop.includes("-")) {
672
782
  elm.style.setProperty(prop, newValue[prop]);
673
783
  } else {
674
784
  elm.style[prop] = newValue[prop];
675
785
  }
676
786
  }
677
787
  }
678
- } else if (import_app_data2.BUILD.vdomKey && memberName === "key") {
679
- } else if (import_app_data2.BUILD.vdomRef && memberName === "ref") {
788
+ } else if (import_app_data3.BUILD.vdomKey && memberName === "key") {
789
+ } else if (import_app_data3.BUILD.vdomRef && memberName === "ref") {
680
790
  if (newValue) {
681
791
  newValue(elm);
682
792
  }
683
- } else if (import_app_data2.BUILD.vdomListener && (import_app_data2.BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
793
+ } else if (import_app_data3.BUILD.vdomListener && (import_app_data3.BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
684
794
  if (memberName[2] === "-") {
685
795
  memberName = memberName.slice(3);
686
796
  } else if (isMemberInElement(win, ln)) {
@@ -698,7 +808,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
698
808
  plt.ael(elm, memberName, newValue, capture);
699
809
  }
700
810
  }
701
- } else if (import_app_data2.BUILD.vdomPropOrAttr) {
811
+ } else if (import_app_data3.BUILD.vdomPropOrAttr) {
702
812
  const isComplex = isComplexType(newValue);
703
813
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
704
814
  try {
@@ -720,7 +830,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
720
830
  }
721
831
  }
722
832
  let xlink = false;
723
- if (import_app_data2.BUILD.vdomXlink) {
833
+ if (import_app_data3.BUILD.vdomXlink) {
724
834
  if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
725
835
  memberName = ln;
726
836
  xlink = true;
@@ -728,7 +838,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
728
838
  }
729
839
  if (newValue == null || newValue === false) {
730
840
  if (newValue !== false || elm.getAttribute(memberName) === "") {
731
- if (import_app_data2.BUILD.vdomXlink && xlink) {
841
+ if (import_app_data3.BUILD.vdomXlink && xlink) {
732
842
  elm.removeAttributeNS(XLINK_NS, memberName);
733
843
  } else {
734
844
  elm.removeAttribute(memberName);
@@ -736,7 +846,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
736
846
  }
737
847
  } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
738
848
  newValue = newValue === true ? "" : newValue;
739
- if (import_app_data2.BUILD.vdomXlink && xlink) {
849
+ if (import_app_data3.BUILD.vdomXlink && xlink) {
740
850
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
741
851
  } else {
742
852
  elm.setAttribute(memberName, newValue);
@@ -763,7 +873,7 @@ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
763
873
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
764
874
  const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
765
875
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
766
- if (import_app_data3.BUILD.updatable) {
876
+ if (import_app_data4.BUILD.updatable) {
767
877
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
768
878
  if (!(memberName in newVnodeAttrs)) {
769
879
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
@@ -792,19 +902,16 @@ var useNativeShadowDom = false;
792
902
  var checkSlotFallbackVisibility = false;
793
903
  var checkSlotRelocate = false;
794
904
  var isSvgMode = false;
795
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
905
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
796
906
  var _a;
797
907
  const newVNode2 = newParentVNode.$children$[childIndex];
798
908
  let i2 = 0;
799
909
  let elm;
800
910
  let childNode;
801
911
  let oldVNode;
802
- if (import_app_data4.BUILD.slotRelocation && !useNativeShadowDom) {
912
+ if (import_app_data5.BUILD.slotRelocation && !useNativeShadowDom) {
803
913
  checkSlotRelocate = true;
804
914
  if (newVNode2.$tag$ === "slot") {
805
- if (scopeId) {
806
- parentElm.classList.add(scopeId + "-s");
807
- }
808
915
  newVNode2.$flags$ |= newVNode2.$children$ ? (
809
916
  // slot element has fallback content
810
917
  // still create an element that "mocks" the slot element
@@ -817,48 +924,43 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
817
924
  );
818
925
  }
819
926
  }
820
- if (import_app_data4.BUILD.isDev && newVNode2.$elm$) {
927
+ if (import_app_data5.BUILD.isDev && newVNode2.$elm$) {
821
928
  consoleDevError(
822
929
  `The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
823
930
  );
824
931
  }
825
- if (import_app_data4.BUILD.vdomText && newVNode2.$text$ !== null) {
932
+ if (import_app_data5.BUILD.vdomText && newVNode2.$text$ !== null) {
826
933
  elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
827
- } else if (import_app_data4.BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
828
- elm = newVNode2.$elm$ = import_app_data4.BUILD.isDebug || import_app_data4.BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
934
+ } else if (import_app_data5.BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
935
+ elm = newVNode2.$elm$ = import_app_data5.BUILD.isDebug || import_app_data5.BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
829
936
  } else {
830
- if (import_app_data4.BUILD.svg && !isSvgMode) {
937
+ if (import_app_data5.BUILD.svg && !isSvgMode) {
831
938
  isSvgMode = newVNode2.$tag$ === "svg";
832
939
  }
833
- elm = newVNode2.$elm$ = import_app_data4.BUILD.svg ? doc.createElementNS(
940
+ elm = newVNode2.$elm$ = import_app_data5.BUILD.svg ? doc.createElementNS(
834
941
  isSvgMode ? SVG_NS : HTML_NS,
835
- !useNativeShadowDom && import_app_data4.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
942
+ !useNativeShadowDom && import_app_data5.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
836
943
  ) : doc.createElement(
837
- !useNativeShadowDom && import_app_data4.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
944
+ !useNativeShadowDom && import_app_data5.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
838
945
  );
839
- if (import_app_data4.BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
946
+ if (import_app_data5.BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
840
947
  isSvgMode = false;
841
948
  }
842
- if (import_app_data4.BUILD.vdomAttribute) {
949
+ if (import_app_data5.BUILD.vdomAttribute) {
843
950
  updateElement(null, newVNode2, isSvgMode);
844
951
  }
845
- const rootNode = elm.getRootNode();
846
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
847
- if (!isElementWithinShadowRoot && import_app_data4.BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
952
+ if (import_app_data5.BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
848
953
  elm.classList.add(elm["s-si"] = scopeId);
849
954
  }
850
- if (import_app_data4.BUILD.scoped) {
851
- updateElementScopeIds(elm, parentElm);
852
- }
853
955
  if (newVNode2.$children$) {
854
956
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
855
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
957
+ childNode = createElm(oldParentVNode, newVNode2, i2);
856
958
  if (childNode) {
857
959
  elm.appendChild(childNode);
858
960
  }
859
961
  }
860
962
  }
861
- if (import_app_data4.BUILD.svg) {
963
+ if (import_app_data5.BUILD.svg) {
862
964
  if (newVNode2.$tag$ === "svg") {
863
965
  isSvgMode = false;
864
966
  } else if (elm.tagName === "foreignObject") {
@@ -867,7 +969,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
867
969
  }
868
970
  }
869
971
  elm["s-hn"] = hostTagName;
870
- if (import_app_data4.BUILD.slotRelocation) {
972
+ if (import_app_data5.BUILD.slotRelocation) {
871
973
  if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
872
974
  elm["s-sr"] = true;
873
975
  elm["s-cr"] = contentRef;
@@ -875,12 +977,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
875
977
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
876
978
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
877
979
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
878
- if (import_app_data4.BUILD.experimentalSlotFixes) {
980
+ if (import_app_data5.BUILD.experimentalSlotFixes) {
879
981
  relocateToHostRoot(oldParentVNode.$elm$);
880
982
  } else {
881
983
  putBackInOriginalLocation(oldParentVNode.$elm$, false);
882
984
  }
883
985
  }
986
+ if (import_app_data5.BUILD.scoped) {
987
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
988
+ }
884
989
  }
885
990
  }
886
991
  return elm;
@@ -908,7 +1013,7 @@ var relocateToHostRoot = (parentElm) => {
908
1013
  var putBackInOriginalLocation = (parentElm, recursive) => {
909
1014
  plt.$flags$ |= 1 /* isTmpDisconnected */;
910
1015
  const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
911
- if (parentElm["s-sr"] && import_app_data4.BUILD.experimentalSlotFixes) {
1016
+ if (parentElm["s-sr"] && import_app_data5.BUILD.experimentalSlotFixes) {
912
1017
  let node = parentElm;
913
1018
  while (node = node.nextSibling) {
914
1019
  if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
@@ -919,7 +1024,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
919
1024
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
920
1025
  const childNode = oldSlotChildNodes[i2];
921
1026
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
922
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1027
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
923
1028
  childNode["s-ol"].remove();
924
1029
  childNode["s-ol"] = void 0;
925
1030
  childNode["s-sh"] = void 0;
@@ -932,17 +1037,17 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
932
1037
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
933
1038
  };
934
1039
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
935
- let containerElm = import_app_data4.BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
1040
+ let containerElm = import_app_data5.BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
936
1041
  let childNode;
937
- if (import_app_data4.BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1042
+ if (import_app_data5.BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
938
1043
  containerElm = containerElm.shadowRoot;
939
1044
  }
940
1045
  for (; startIdx <= endIdx; ++startIdx) {
941
1046
  if (vnodes[startIdx]) {
942
- childNode = createElm(null, parentVNode, startIdx, parentElm);
1047
+ childNode = createElm(null, parentVNode, startIdx);
943
1048
  if (childNode) {
944
1049
  vnodes[startIdx].$elm$ = childNode;
945
- insertBefore(containerElm, childNode, import_app_data4.BUILD.slotRelocation ? referenceNode(before) : before);
1050
+ insertBefore(containerElm, childNode, import_app_data5.BUILD.slotRelocation ? referenceNode(before) : before);
946
1051
  }
947
1052
  }
948
1053
  }
@@ -954,7 +1059,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
954
1059
  const elm = vnode.$elm$;
955
1060
  nullifyVNodeRefs(vnode);
956
1061
  if (elm) {
957
- if (import_app_data4.BUILD.slotRelocation) {
1062
+ if (import_app_data5.BUILD.slotRelocation) {
958
1063
  checkSlotFallbackVisibility = true;
959
1064
  if (elm["s-ol"]) {
960
1065
  elm["s-ol"].remove();
@@ -998,7 +1103,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
998
1103
  oldEndVnode = oldCh[--oldEndIdx];
999
1104
  newEndVnode = newCh[--newEndIdx];
1000
1105
  } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1001
- if (import_app_data4.BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1106
+ if (import_app_data5.BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1002
1107
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1003
1108
  }
1004
1109
  patch(oldStartVnode, newEndVnode, isInitialRender);
@@ -1006,7 +1111,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1006
1111
  oldStartVnode = oldCh[++oldStartIdx];
1007
1112
  newEndVnode = newCh[--newEndIdx];
1008
1113
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1009
- if (import_app_data4.BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1114
+ if (import_app_data5.BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1010
1115
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1011
1116
  }
1012
1117
  patch(oldEndVnode, newStartVnode, isInitialRender);
@@ -1015,7 +1120,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1015
1120
  newStartVnode = newCh[++newStartIdx];
1016
1121
  } else {
1017
1122
  idxInOld = -1;
1018
- if (import_app_data4.BUILD.vdomKey) {
1123
+ if (import_app_data5.BUILD.vdomKey) {
1019
1124
  for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
1020
1125
  if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
1021
1126
  idxInOld = i2;
@@ -1023,10 +1128,10 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1023
1128
  }
1024
1129
  }
1025
1130
  }
1026
- if (import_app_data4.BUILD.vdomKey && idxInOld >= 0) {
1131
+ if (import_app_data5.BUILD.vdomKey && idxInOld >= 0) {
1027
1132
  elmToMove = oldCh[idxInOld];
1028
1133
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1029
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1134
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1030
1135
  } else {
1031
1136
  patch(elmToMove, newStartVnode, isInitialRender);
1032
1137
  oldCh[idxInOld] = void 0;
@@ -1034,12 +1139,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1034
1139
  }
1035
1140
  newStartVnode = newCh[++newStartIdx];
1036
1141
  } else {
1037
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1142
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1038
1143
  newStartVnode = newCh[++newStartIdx];
1039
1144
  }
1040
1145
  if (node) {
1041
- if (import_app_data4.BUILD.slotRelocation) {
1042
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1146
+ if (import_app_data5.BUILD.slotRelocation) {
1147
+ insertBefore(
1148
+ referenceNode(oldStartVnode.$elm$).parentNode,
1149
+ node,
1150
+ referenceNode(oldStartVnode.$elm$)
1151
+ );
1043
1152
  } else {
1044
1153
  insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1045
1154
  }
@@ -1055,35 +1164,26 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1055
1164
  newStartIdx,
1056
1165
  newEndIdx
1057
1166
  );
1058
- } else if (import_app_data4.BUILD.updatable && newStartIdx > newEndIdx) {
1167
+ } else if (import_app_data5.BUILD.updatable && newStartIdx > newEndIdx) {
1059
1168
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1060
1169
  }
1061
1170
  };
1062
1171
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1063
1172
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1064
- if (import_app_data4.BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
1065
- if (
1066
- // The component gets hydrated and no VDOM has been initialized.
1067
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1068
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1069
- // hydration comments to be removed
1070
- leftVNode.$elm$.nodeType !== 8
1071
- ) {
1072
- return false;
1073
- }
1173
+ if (import_app_data5.BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
1074
1174
  return leftVNode.$name$ === rightVNode.$name$;
1075
1175
  }
1076
- if (import_app_data4.BUILD.vdomKey && !isInitialRender) {
1176
+ if (import_app_data5.BUILD.vdomKey && !isInitialRender) {
1077
1177
  return leftVNode.$key$ === rightVNode.$key$;
1078
1178
  }
1179
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1180
+ leftVNode.$key$ = rightVNode.$key$;
1181
+ }
1079
1182
  return true;
1080
1183
  }
1081
1184
  return false;
1082
1185
  };
1083
- var referenceNode = (node) => {
1084
- return node && node["s-ol"] || node;
1085
- };
1086
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
1186
+ var referenceNode = (node) => node && node["s-ol"] || node;
1087
1187
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1088
1188
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1089
1189
  const oldChildren = oldVNode.$children$;
@@ -1091,13 +1191,13 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1091
1191
  const tag = newVNode2.$tag$;
1092
1192
  const text = newVNode2.$text$;
1093
1193
  let defaultHolder;
1094
- if (!import_app_data4.BUILD.vdomText || text === null) {
1095
- if (import_app_data4.BUILD.svg) {
1194
+ if (!import_app_data5.BUILD.vdomText || text === null) {
1195
+ if (import_app_data5.BUILD.svg) {
1096
1196
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1097
1197
  }
1098
- if (import_app_data4.BUILD.vdomAttribute || import_app_data4.BUILD.reflect) {
1099
- if (import_app_data4.BUILD.slot && tag === "slot" && !useNativeShadowDom) {
1100
- if (import_app_data4.BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
1198
+ if (import_app_data5.BUILD.vdomAttribute || import_app_data5.BUILD.reflect) {
1199
+ if (import_app_data5.BUILD.slot && tag === "slot" && !useNativeShadowDom) {
1200
+ if (import_app_data5.BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
1101
1201
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1102
1202
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1103
1203
  }
@@ -1105,55 +1205,28 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1105
1205
  updateElement(oldVNode, newVNode2, isSvgMode);
1106
1206
  }
1107
1207
  }
1108
- if (import_app_data4.BUILD.updatable && oldChildren !== null && newChildren !== null) {
1208
+ if (import_app_data5.BUILD.updatable && oldChildren !== null && newChildren !== null) {
1109
1209
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
1110
1210
  } else if (newChildren !== null) {
1111
- if (import_app_data4.BUILD.updatable && import_app_data4.BUILD.vdomText && oldVNode.$text$ !== null) {
1211
+ if (import_app_data5.BUILD.updatable && import_app_data5.BUILD.vdomText && oldVNode.$text$ !== null) {
1112
1212
  elm.textContent = "";
1113
1213
  }
1114
1214
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
1115
1215
  } else if (
1116
1216
  // don't do this on initial render as it can cause non-hydrated content to be removed
1117
- !isInitialRender && import_app_data4.BUILD.updatable && oldChildren !== null
1217
+ !isInitialRender && import_app_data5.BUILD.updatable && oldChildren !== null
1118
1218
  ) {
1119
1219
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
1120
1220
  }
1121
- if (import_app_data4.BUILD.svg && isSvgMode && tag === "svg") {
1221
+ if (import_app_data5.BUILD.svg && isSvgMode && tag === "svg") {
1122
1222
  isSvgMode = false;
1123
1223
  }
1124
- } else if (import_app_data4.BUILD.vdomText && import_app_data4.BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) {
1224
+ } else if (import_app_data5.BUILD.vdomText && import_app_data5.BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) {
1125
1225
  defaultHolder.parentNode.textContent = text;
1126
- } else if (import_app_data4.BUILD.vdomText && oldVNode.$text$ !== text) {
1226
+ } else if (import_app_data5.BUILD.vdomText && oldVNode.$text$ !== text) {
1127
1227
  elm.data = text;
1128
1228
  }
1129
1229
  };
1130
- var updateFallbackSlotVisibility = (elm) => {
1131
- const childNodes = elm.__childNodes || elm.childNodes;
1132
- for (const childNode of childNodes) {
1133
- if (childNode.nodeType === 1 /* ElementNode */) {
1134
- if (childNode["s-sr"]) {
1135
- const slotName = childNode["s-sn"];
1136
- childNode.hidden = false;
1137
- for (const siblingNode of childNodes) {
1138
- if (siblingNode !== childNode) {
1139
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1140
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1141
- childNode.hidden = true;
1142
- break;
1143
- }
1144
- } else if (slotName === siblingNode["s-sn"]) {
1145
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1146
- childNode.hidden = true;
1147
- break;
1148
- }
1149
- }
1150
- }
1151
- }
1152
- }
1153
- updateFallbackSlotVisibility(childNode);
1154
- }
1155
- }
1156
- };
1157
1230
  var relocateNodes = [];
1158
1231
  var markSlotContentForRelocation = (elm) => {
1159
1232
  let node;
@@ -1166,7 +1239,7 @@ var markSlotContentForRelocation = (elm) => {
1166
1239
  const slotName = childNode["s-sn"];
1167
1240
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1168
1241
  node = hostContentNodes[j];
1169
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!import_app_data4.BUILD.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1242
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!import_app_data5.BUILD.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1170
1243
  if (isNodeLocatedInSlot(node, slotName)) {
1171
1244
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1172
1245
  checkSlotFallbackVisibility = true;
@@ -1204,60 +1277,40 @@ var markSlotContentForRelocation = (elm) => {
1204
1277
  }
1205
1278
  }
1206
1279
  };
1207
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1208
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1209
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1210
- return true;
1211
- }
1212
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1213
- return true;
1214
- }
1215
- return false;
1216
- }
1217
- if (nodeToRelocate["s-sn"] === slotName) {
1218
- return true;
1219
- }
1220
- return slotName === "";
1221
- };
1222
1280
  var nullifyVNodeRefs = (vNode) => {
1223
- if (import_app_data4.BUILD.vdomRef) {
1281
+ if (import_app_data5.BUILD.vdomRef) {
1224
1282
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1225
1283
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1226
1284
  }
1227
1285
  };
1228
1286
  var insertBefore = (parent, newNode, reference) => {
1229
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1230
- if (import_app_data4.BUILD.scoped) {
1231
- updateElementScopeIds(newNode, parent);
1287
+ if (import_app_data5.BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1288
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1232
1289
  }
1290
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1233
1291
  return inserted;
1234
1292
  };
1235
- var findScopeIds = (element) => {
1236
- const scopeIds = [];
1237
- if (element) {
1238
- scopeIds.push(
1239
- ...element["s-scs"] || [],
1240
- element["s-si"],
1241
- element["s-sc"],
1242
- ...findScopeIds(element.parentElement)
1243
- );
1244
- }
1245
- return scopeIds;
1246
- };
1247
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1293
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1248
1294
  var _a;
1249
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1250
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1251
- if (scopeIds.size) {
1252
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1253
- if (element["s-ol"] || iterateChildNodes) {
1254
- for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1255
- updateElementScopeIds(childNode, element, true);
1295
+ let scopeId2;
1296
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
1297
+ const scopeName = slotNode["s-sn"];
1298
+ const hostName = slotNode["s-hn"];
1299
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
1300
+ if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
1301
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
1302
+ let found = false;
1303
+ while (child) {
1304
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
1305
+ found = true;
1306
+ break;
1256
1307
  }
1308
+ child = child.nextSibling;
1257
1309
  }
1310
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1258
1311
  }
1259
1312
  }
1260
- };
1313
+ }
1261
1314
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1262
1315
  var _a, _b, _c, _d, _e;
1263
1316
  const hostElm = hostRef.$hostElement$;
@@ -1265,7 +1318,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1265
1318
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1266
1319
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1267
1320
  hostTagName = hostElm.tagName;
1268
- if (import_app_data4.BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1321
+ if (import_app_data5.BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1269
1322
  throw new Error(`The <Host> must be the single root component.
1270
1323
  Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
1271
1324
 
@@ -1279,7 +1332,7 @@ render() {
1279
1332
  }
1280
1333
  `);
1281
1334
  }
1282
- if (import_app_data4.BUILD.reflect && cmpMeta.$attrsToReflect$) {
1335
+ if (import_app_data5.BUILD.reflect && cmpMeta.$attrsToReflect$) {
1283
1336
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1284
1337
  cmpMeta.$attrsToReflect$.map(
1285
1338
  ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
@@ -1295,24 +1348,24 @@ render() {
1295
1348
  rootVnode.$tag$ = null;
1296
1349
  rootVnode.$flags$ |= 4 /* isHost */;
1297
1350
  hostRef.$vnode$ = rootVnode;
1298
- rootVnode.$elm$ = oldVNode.$elm$ = import_app_data4.BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1299
- if (import_app_data4.BUILD.scoped || import_app_data4.BUILD.shadowDom) {
1351
+ rootVnode.$elm$ = oldVNode.$elm$ = import_app_data5.BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1352
+ if (import_app_data5.BUILD.scoped || import_app_data5.BUILD.shadowDom) {
1300
1353
  scopeId = hostElm["s-sc"];
1301
1354
  }
1302
1355
  useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1303
- if (import_app_data4.BUILD.slotRelocation) {
1356
+ if (import_app_data5.BUILD.slotRelocation) {
1304
1357
  contentRef = hostElm["s-cr"];
1305
1358
  checkSlotFallbackVisibility = false;
1306
1359
  }
1307
1360
  patch(oldVNode, rootVnode, isInitialLoad);
1308
- if (import_app_data4.BUILD.slotRelocation) {
1361
+ if (import_app_data5.BUILD.slotRelocation) {
1309
1362
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1310
1363
  if (checkSlotRelocate) {
1311
1364
  markSlotContentForRelocation(rootVnode.$elm$);
1312
1365
  for (const relocateData of relocateNodes) {
1313
1366
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1314
1367
  if (!nodeToRelocate["s-ol"]) {
1315
- const orgLocationNode = import_app_data4.BUILD.isDebug || import_app_data4.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1368
+ const orgLocationNode = import_app_data5.BUILD.isDebug || import_app_data5.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1316
1369
  orgLocationNode["s-nr"] = nodeToRelocate;
1317
1370
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1318
1371
  }
@@ -1323,7 +1376,7 @@ render() {
1323
1376
  if (slotRefNode) {
1324
1377
  const parentNodeRef = slotRefNode.parentNode;
1325
1378
  let insertBeforeNode = slotRefNode.nextSibling;
1326
- if (!import_app_data4.BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1379
+ if (!import_app_data5.BUILD.hydrateServerSide && (!import_app_data5.BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1327
1380
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1328
1381
  while (orgLocationNode) {
1329
1382
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1342,11 +1395,11 @@ render() {
1342
1395
  }
1343
1396
  if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1344
1397
  if (nodeToRelocate !== insertBeforeNode) {
1345
- if (!import_app_data4.BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1398
+ if (!import_app_data5.BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1346
1399
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1347
1400
  }
1348
1401
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1349
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1402
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1350
1403
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1351
1404
  }
1352
1405
  }
@@ -1368,7 +1421,7 @@ render() {
1368
1421
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
1369
1422
  relocateNodes.length = 0;
1370
1423
  }
1371
- if (import_app_data4.BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1424
+ if (import_app_data5.BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1372
1425
  const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1373
1426
  for (const childNode of children) {
1374
1427
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
@@ -1405,9 +1458,9 @@ var patchCloneNode = (HostElementPrototype) => {
1405
1458
  const orgCloneNode = HostElementPrototype.cloneNode;
1406
1459
  HostElementPrototype.cloneNode = function(deep) {
1407
1460
  const srcNode = this;
1408
- const isShadowDom = import_app_data5.BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1461
+ const isShadowDom = import_app_data6.BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1409
1462
  const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1410
- if (import_app_data5.BUILD.slot && !isShadowDom && deep) {
1463
+ if (import_app_data6.BUILD.slot && !isShadowDom && deep) {
1411
1464
  let i2 = 0;
1412
1465
  let slotted, nonStencilNode;
1413
1466
  const stencilPrivates = [
@@ -1432,7 +1485,7 @@ var patchCloneNode = (HostElementPrototype) => {
1432
1485
  slotted = childNodes[i2]["s-nr"];
1433
1486
  nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1434
1487
  if (slotted) {
1435
- if (import_app_data5.BUILD.appendChildSlotFix && clonedNode.__appendChild) {
1488
+ if (import_app_data6.BUILD.appendChildSlotFix && clonedNode.__appendChild) {
1436
1489
  clonedNode.__appendChild(slotted.cloneNode(true));
1437
1490
  } else {
1438
1491
  clonedNode.appendChild(slotted.cloneNode(true));
@@ -1450,7 +1503,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
1450
1503
  HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1451
1504
  HostElementPrototype.appendChild = function(newChild) {
1452
1505
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1453
- const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
1506
+ const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1454
1507
  if (slotNode) {
1455
1508
  addSlotRelocateNode(newChild, slotNode);
1456
1509
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1467,7 +1520,7 @@ var patchSlotRemoveChild = (ElementPrototype) => {
1467
1520
  ElementPrototype.removeChild = function(toRemove) {
1468
1521
  if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1469
1522
  const childNodes = this.__childNodes || this.childNodes;
1470
- const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
1523
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1471
1524
  if (slotNode && toRemove.isConnected) {
1472
1525
  toRemove.remove();
1473
1526
  updateFallbackSlotVisibility(this);
@@ -1486,7 +1539,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
1486
1539
  }
1487
1540
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1488
1541
  const childNodes = this.__childNodes || this.childNodes;
1489
- const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
1542
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1490
1543
  if (slotNode) {
1491
1544
  addSlotRelocateNode(newChild, slotNode, true);
1492
1545
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1704,77 +1757,12 @@ function patchHostOriginalAccessor(accessorName, node) {
1704
1757
  }
1705
1758
  if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1706
1759
  }
1707
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1708
- let slottedNodeLocation;
1709
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1710
- slottedNodeLocation = newChild["s-ol"];
1711
- } else {
1712
- slottedNodeLocation = document.createTextNode("");
1713
- slottedNodeLocation["s-nr"] = newChild;
1714
- }
1715
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1716
- const parent = slotNode["s-cr"].parentNode;
1717
- const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1718
- if (typeof position !== "undefined") {
1719
- if (import_app_data5.BUILD.hydrateClientSide) {
1720
- slottedNodeLocation["s-oo"] = position;
1721
- const childNodes = parent.__childNodes || parent.childNodes;
1722
- const slotRelocateNodes = [slottedNodeLocation];
1723
- childNodes.forEach((n) => {
1724
- if (n["s-nr"]) slotRelocateNodes.push(n);
1725
- });
1726
- slotRelocateNodes.sort((a, b) => {
1727
- if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1728
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1729
- return 0;
1730
- });
1731
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1732
- }
1733
- } else {
1734
- appendMethod.call(parent, slottedNodeLocation);
1735
- }
1736
- newChild["s-ol"] = slottedNodeLocation;
1737
- newChild["s-sh"] = slotNode["s-hn"];
1738
- };
1739
- var getSlottedChildNodes = (childNodes) => {
1740
- const result = [];
1741
- for (let i2 = 0; i2 < childNodes.length; i2++) {
1742
- const slottedNode = childNodes[i2]["s-nr"];
1743
- if (slottedNode && slottedNode.isConnected) {
1744
- result.push(slottedNode);
1745
- }
1746
- }
1747
- return result;
1748
- };
1749
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
1750
- var getHostSlotNode = (childNodes, slotName, hostName) => {
1751
- let i2 = 0;
1752
- let childNode;
1753
- for (; i2 < childNodes.length; i2++) {
1754
- childNode = childNodes[i2];
1755
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
1756
- return childNode;
1757
- }
1758
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
1759
- if (childNode) {
1760
- return childNode;
1761
- }
1762
- }
1763
- return null;
1764
- };
1765
- var getHostSlotChildNodes = (n, slotName) => {
1766
- const childNodes = [n];
1767
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
1768
- childNodes.push(n);
1769
- }
1770
- return childNodes;
1771
- };
1772
1760
 
1773
1761
  // src/runtime/profile.ts
1774
- var import_app_data6 = require("@stencil/core/internal/app-data");
1762
+ var import_app_data7 = require("@stencil/core/internal/app-data");
1775
1763
  var i = 0;
1776
1764
  var createTime = (fnName, tagName = "") => {
1777
- if (import_app_data6.BUILD.profile && performance.mark) {
1765
+ if (import_app_data7.BUILD.profile && performance.mark) {
1778
1766
  const key = `st:${fnName}:${tagName}:${i++}`;
1779
1767
  performance.mark(key);
1780
1768
  return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
@@ -1785,7 +1773,7 @@ var createTime = (fnName, tagName = "") => {
1785
1773
  }
1786
1774
  };
1787
1775
  var uniqueTime = (key, measureText) => {
1788
- if (import_app_data6.BUILD.profile && performance.mark) {
1776
+ if (import_app_data7.BUILD.profile && performance.mark) {
1789
1777
  if (performance.getEntriesByName(key, "mark").length === 0) {
1790
1778
  performance.mark(key);
1791
1779
  }
@@ -1843,7 +1831,7 @@ var inspect = (ref) => {
1843
1831
  };
1844
1832
  };
1845
1833
  var installDevTools = () => {
1846
- if (import_app_data6.BUILD.devTools) {
1834
+ if (import_app_data7.BUILD.devTools) {
1847
1835
  const stencil = win.stencil = win.stencil || {};
1848
1836
  const originalInspect = stencil.inspect;
1849
1837
  stencil.inspect = (ref) => {
@@ -1863,9 +1851,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1863
1851
  const childRenderNodes = [];
1864
1852
  const slotNodes = [];
1865
1853
  const slottedNodes = [];
1866
- const shadowRootNodes = import_app_data7.BUILD.shadowDom && shadowRoot ? [] : null;
1854
+ const shadowRootNodes = import_app_data8.BUILD.shadowDom && shadowRoot ? [] : null;
1867
1855
  const vnode = newVNode(tagName, null);
1868
1856
  vnode.$elm$ = hostElm;
1857
+ let scopeId2;
1858
+ if (import_app_data8.BUILD.scoped) {
1859
+ const cmpMeta = hostRef.$cmpMeta$;
1860
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1861
+ scopeId2 = hostElm["s-sc"];
1862
+ hostElm.classList.add(scopeId2 + "-h");
1863
+ } else if (hostElm["s-sc"]) {
1864
+ delete hostElm["s-sc"];
1865
+ }
1866
+ }
1869
1867
  if (!plt.$orgLocNodes$) {
1870
1868
  initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1871
1869
  }
@@ -1895,6 +1893,18 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1895
1893
  node["s-cr"] = hostElm["s-cr"];
1896
1894
  }
1897
1895
  }
1896
+ if (childRenderNode.$tag$ === "slot") {
1897
+ if (childRenderNode.$children$) {
1898
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1899
+ if (!childRenderNode.$elm$.childNodes.length) {
1900
+ childRenderNode.$children$.forEach((c) => {
1901
+ childRenderNode.$elm$.appendChild(c.$elm$);
1902
+ });
1903
+ }
1904
+ } else {
1905
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1906
+ }
1907
+ }
1898
1908
  if (orgLocationNode && orgLocationNode.isConnected) {
1899
1909
  if (shadowRoot && orgLocationNode["s-en"] === "") {
1900
1910
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
@@ -1907,8 +1917,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1907
1917
  plt.$orgLocNodes$.delete(orgLocationId);
1908
1918
  }
1909
1919
  const hosts = [];
1910
- let snIndex = 0;
1911
1920
  const snLen = slottedNodes.length;
1921
+ let snIndex = 0;
1912
1922
  let slotGroup;
1913
1923
  let snGroupIdx;
1914
1924
  let snGroupLen;
@@ -1930,11 +1940,10 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1930
1940
  if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1931
1941
  slottedItem.slot["s-cr"] = hostEle;
1932
1942
  } else {
1933
- const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1934
- slottedItem.slot["s-cr"] = hostChildren[0];
1943
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1935
1944
  }
1936
1945
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1937
- if (import_app_data7.BUILD.experimentalSlotFixes) {
1946
+ if (import_app_data8.BUILD.experimentalSlotFixes) {
1938
1947
  patchNextPrev(slottedItem.node);
1939
1948
  }
1940
1949
  }
@@ -1943,7 +1952,12 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1943
1952
  }
1944
1953
  }
1945
1954
  }
1946
- if (import_app_data7.BUILD.shadowDom && shadowRoot) {
1955
+ if (import_app_data8.BUILD.scoped && scopeId2 && slotNodes.length) {
1956
+ slotNodes.forEach((slot) => {
1957
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1958
+ });
1959
+ }
1960
+ if (import_app_data8.BUILD.shadowDom && shadowRoot) {
1947
1961
  let rnIdex = 0;
1948
1962
  const rnLen = shadowRootNodes.length;
1949
1963
  for (rnIdex; rnIdex < rnLen; rnIdex++) {
@@ -1977,15 +1991,19 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1977
1991
  $index$: childIdSplt[3],
1978
1992
  $tag$: node.tagName.toLowerCase(),
1979
1993
  $elm$: node,
1980
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1981
- // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1982
- $attrs$: { class: node.className }
1994
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1995
+ // won't try to reconcile them. Classes set on the node will be blown away.
1996
+ $attrs$: { class: node.className || "" }
1983
1997
  });
1984
1998
  childRenderNodes.push(childVNode);
1985
1999
  node.removeAttribute(HYDRATE_CHILD_ID);
1986
2000
  if (!parentVNode.$children$) {
1987
2001
  parentVNode.$children$ = [];
1988
2002
  }
2003
+ if (import_app_data8.BUILD.scoped && scopeId2) {
2004
+ node["s-si"] = scopeId2;
2005
+ childVNode.$attrs$.class += " " + scopeId2;
2006
+ }
1989
2007
  const slotName = childVNode.$elm$.getAttribute("s-sn");
1990
2008
  if (typeof slotName === "string") {
1991
2009
  if (childVNode.$tag$ === "slot-fb") {
@@ -2000,6 +2018,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
2000
2018
  shadowRootNodes,
2001
2019
  slottedNodes
2002
2020
  );
2021
+ if (import_app_data8.BUILD.scoped && scopeId2) {
2022
+ node.classList.add(scopeId2);
2023
+ }
2003
2024
  }
2004
2025
  childVNode.$elm$["s-sn"] = slotName;
2005
2026
  childVNode.$elm$.removeAttribute("s-sn");
@@ -2007,7 +2028,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
2007
2028
  if (childVNode.$index$ !== void 0) {
2008
2029
  parentVNode.$children$[childVNode.$index$] = childVNode;
2009
2030
  }
2010
- if (scopeId2) node["s-si"] = scopeId2;
2011
2031
  parentVNode = childVNode;
2012
2032
  if (shadowRootNodes && childVNode.$depth$ === "0") {
2013
2033
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -2082,8 +2102,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
2082
2102
  }
2083
2103
  } else if (childVNode.$hostId$ === hostId) {
2084
2104
  if (childNodeType === SLOT_NODE_ID) {
2085
- childVNode.$tag$ = "slot";
2086
- const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
2105
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
2087
2106
  addSlot(
2088
2107
  slotName,
2089
2108
  childIdSplt[2],
@@ -2096,9 +2115,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
2096
2115
  slottedNodes
2097
2116
  );
2098
2117
  } else if (childNodeType === CONTENT_REF_ID) {
2099
- if (import_app_data7.BUILD.shadowDom && shadowRootNodes) {
2118
+ if (import_app_data8.BUILD.shadowDom && shadowRootNodes) {
2100
2119
  node.remove();
2101
- } else if (import_app_data7.BUILD.slotRelocation) {
2120
+ } else if (import_app_data8.BUILD.slotRelocation) {
2102
2121
  hostElm["s-cr"] = node;
2103
2122
  node["s-cn"] = true;
2104
2123
  }
@@ -2157,8 +2176,10 @@ var createSimpleVNode = (vnode) => {
2157
2176
  };
2158
2177
  function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
2159
2178
  node["s-sr"] = true;
2179
+ childVNode.$name$ = slotName || null;
2180
+ childVNode.$tag$ = "slot";
2160
2181
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
2161
- if (import_app_data7.BUILD.shadowDom && shadowRootNodes) {
2182
+ if (import_app_data8.BUILD.shadowDom && shadowRootNodes) {
2162
2183
  const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
2163
2184
  if (childVNode.$name$) {
2164
2185
  childVNode.$elm$.setAttribute("name", slotName);
@@ -2199,7 +2220,7 @@ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =>
2199
2220
  };
2200
2221
 
2201
2222
  // src/runtime/initialize-component.ts
2202
- var import_app_data15 = require("@stencil/core/internal/app-data");
2223
+ var import_app_data16 = require("@stencil/core/internal/app-data");
2203
2224
 
2204
2225
  // src/runtime/mode.ts
2205
2226
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
@@ -2207,22 +2228,22 @@ var setMode = (handler) => modeResolutionChain.push(handler);
2207
2228
  var getMode = (ref) => getHostRef(ref).$modeName$;
2208
2229
 
2209
2230
  // src/runtime/proxy-component.ts
2210
- var import_app_data14 = require("@stencil/core/internal/app-data");
2231
+ var import_app_data15 = require("@stencil/core/internal/app-data");
2211
2232
 
2212
2233
  // src/runtime/set-value.ts
2213
- var import_app_data13 = require("@stencil/core/internal/app-data");
2234
+ var import_app_data14 = require("@stencil/core/internal/app-data");
2214
2235
 
2215
2236
  // src/runtime/parse-property-value.ts
2216
- var import_app_data8 = require("@stencil/core/internal/app-data");
2237
+ var import_app_data9 = require("@stencil/core/internal/app-data");
2217
2238
  var parsePropertyValue = (propValue, propType) => {
2218
2239
  if (propValue != null && !isComplexType(propValue)) {
2219
- if (import_app_data8.BUILD.propBoolean && propType & 4 /* Boolean */) {
2240
+ if (import_app_data9.BUILD.propBoolean && propType & 4 /* Boolean */) {
2220
2241
  return propValue === "false" ? false : propValue === "" || !!propValue;
2221
2242
  }
2222
- if (import_app_data8.BUILD.propNumber && propType & 2 /* Number */) {
2243
+ if (import_app_data9.BUILD.propNumber && propType & 2 /* Number */) {
2223
2244
  return parseFloat(propValue);
2224
2245
  }
2225
- if (import_app_data8.BUILD.propString && propType & 1 /* String */) {
2246
+ if (import_app_data9.BUILD.propString && propType & 1 /* String */) {
2226
2247
  return String(propValue);
2227
2248
  }
2228
2249
  return propValue;
@@ -2231,21 +2252,21 @@ var parsePropertyValue = (propValue, propType) => {
2231
2252
  };
2232
2253
 
2233
2254
  // src/runtime/update-component.ts
2234
- var import_app_data12 = require("@stencil/core/internal/app-data");
2255
+ var import_app_data13 = require("@stencil/core/internal/app-data");
2235
2256
 
2236
2257
  // src/runtime/event-emitter.ts
2237
- var import_app_data10 = require("@stencil/core/internal/app-data");
2258
+ var import_app_data11 = require("@stencil/core/internal/app-data");
2238
2259
 
2239
2260
  // src/runtime/element.ts
2240
- var import_app_data9 = require("@stencil/core/internal/app-data");
2241
- var getElement = (ref) => import_app_data9.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2261
+ var import_app_data10 = require("@stencil/core/internal/app-data");
2262
+ var getElement = (ref) => import_app_data10.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2242
2263
 
2243
2264
  // src/runtime/event-emitter.ts
2244
2265
  var createEvent = (ref, name, flags) => {
2245
2266
  const elm = getElement(ref);
2246
2267
  return {
2247
2268
  emit: (detail) => {
2248
- if (import_app_data10.BUILD.isDev && !elm.isConnected) {
2269
+ if (import_app_data11.BUILD.isDev && !elm.isConnected) {
2249
2270
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
2250
2271
  }
2251
2272
  return emitEvent(elm, name, {
@@ -2264,7 +2285,7 @@ var emitEvent = (elm, name, opts) => {
2264
2285
  };
2265
2286
 
2266
2287
  // src/runtime/styles.ts
2267
- var import_app_data11 = require("@stencil/core/internal/app-data");
2288
+ var import_app_data12 = require("@stencil/core/internal/app-data");
2268
2289
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2269
2290
  var registerStyle = (scopeId2, cssText, allowCS) => {
2270
2291
  let style = styles.get(scopeId2);
@@ -2284,7 +2305,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2284
2305
  var _a;
2285
2306
  const scopeId2 = getScopeId(cmpMeta, mode);
2286
2307
  const style = styles.get(scopeId2);
2287
- if (!import_app_data11.BUILD.attachStyles) {
2308
+ if (!import_app_data12.BUILD.attachStyles) {
2288
2309
  return scopeId2;
2289
2310
  }
2290
2311
  styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
@@ -2297,16 +2318,16 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2297
2318
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2298
2319
  }
2299
2320
  if (!appliedStyles.has(scopeId2)) {
2300
- if (import_app_data11.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2321
+ if (import_app_data12.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2301
2322
  styleElm.innerHTML = style;
2302
2323
  } else {
2303
- styleElm = doc.createElement("style");
2324
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
2304
2325
  styleElm.innerHTML = style;
2305
2326
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2306
2327
  if (nonce != null) {
2307
2328
  styleElm.setAttribute("nonce", nonce);
2308
2329
  }
2309
- if ((import_app_data11.BUILD.hydrateServerSide || import_app_data11.BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2330
+ if ((import_app_data12.BUILD.hydrateServerSide || import_app_data12.BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2310
2331
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2311
2332
  }
2312
2333
  if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
@@ -2342,7 +2363,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2342
2363
  appliedStyles.add(scopeId2);
2343
2364
  }
2344
2365
  }
2345
- } else if (import_app_data11.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2366
+ } else if (import_app_data12.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2346
2367
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2347
2368
  }
2348
2369
  }
@@ -2354,43 +2375,40 @@ var attachStyles = (hostRef) => {
2354
2375
  const flags = cmpMeta.$flags$;
2355
2376
  const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2356
2377
  const scopeId2 = addStyle(
2357
- import_app_data11.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2378
+ import_app_data12.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2358
2379
  cmpMeta,
2359
2380
  hostRef.$modeName$
2360
2381
  );
2361
- if ((import_app_data11.BUILD.shadowDom || import_app_data11.BUILD.scoped) && import_app_data11.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2382
+ if ((import_app_data12.BUILD.shadowDom || import_app_data12.BUILD.scoped) && import_app_data12.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2362
2383
  elm["s-sc"] = scopeId2;
2363
2384
  elm.classList.add(scopeId2 + "-h");
2364
- if (import_app_data11.BUILD.scoped && flags & 2 /* scopedCssEncapsulation */) {
2365
- elm.classList.add(scopeId2 + "-s");
2366
- }
2367
2385
  }
2368
2386
  endAttachStyles();
2369
2387
  };
2370
- var getScopeId = (cmp, mode) => "sc-" + (import_app_data11.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2388
+ var getScopeId = (cmp, mode) => "sc-" + (import_app_data12.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2371
2389
 
2372
2390
  // src/runtime/update-component.ts
2373
2391
  var attachToAncestor = (hostRef, ancestorComponent) => {
2374
- if (import_app_data12.BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2392
+ if (import_app_data13.BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2375
2393
  ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2376
2394
  }
2377
2395
  };
2378
2396
  var scheduleUpdate = (hostRef, isInitialLoad) => {
2379
- if (import_app_data12.BUILD.taskQueue && import_app_data12.BUILD.updatable) {
2397
+ if (import_app_data13.BUILD.taskQueue && import_app_data13.BUILD.updatable) {
2380
2398
  hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
2381
2399
  }
2382
- if (import_app_data12.BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2400
+ if (import_app_data13.BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2383
2401
  hostRef.$flags$ |= 512 /* needsRerender */;
2384
2402
  return;
2385
2403
  }
2386
2404
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
2387
2405
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
2388
- return import_app_data12.BUILD.taskQueue ? writeTask(dispatch) : dispatch();
2406
+ return import_app_data13.BUILD.taskQueue ? writeTask(dispatch) : dispatch();
2389
2407
  };
2390
2408
  var dispatchHooks = (hostRef, isInitialLoad) => {
2391
2409
  const elm = hostRef.$hostElement$;
2392
2410
  const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
2393
- const instance = import_app_data12.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2411
+ const instance = import_app_data13.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2394
2412
  if (!instance) {
2395
2413
  throw new Error(
2396
2414
  `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
@@ -2398,7 +2416,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2398
2416
  }
2399
2417
  let maybePromise;
2400
2418
  if (isInitialLoad) {
2401
- if (import_app_data12.BUILD.lazyLoad && import_app_data12.BUILD.hostListener) {
2419
+ if (import_app_data13.BUILD.lazyLoad && import_app_data13.BUILD.hostListener) {
2402
2420
  hostRef.$flags$ |= 256 /* isListenReady */;
2403
2421
  if (hostRef.$queuedListeners$) {
2404
2422
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
@@ -2406,17 +2424,17 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2406
2424
  }
2407
2425
  }
2408
2426
  emitLifecycleEvent(elm, "componentWillLoad");
2409
- if (import_app_data12.BUILD.cmpWillLoad) {
2427
+ if (import_app_data13.BUILD.cmpWillLoad) {
2410
2428
  maybePromise = safeCall(instance, "componentWillLoad");
2411
2429
  }
2412
2430
  } else {
2413
2431
  emitLifecycleEvent(elm, "componentWillUpdate");
2414
- if (import_app_data12.BUILD.cmpWillUpdate) {
2432
+ if (import_app_data13.BUILD.cmpWillUpdate) {
2415
2433
  maybePromise = safeCall(instance, "componentWillUpdate");
2416
2434
  }
2417
2435
  }
2418
2436
  emitLifecycleEvent(elm, "componentWillRender");
2419
- if (import_app_data12.BUILD.cmpWillRender) {
2437
+ if (import_app_data13.BUILD.cmpWillRender) {
2420
2438
  maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2421
2439
  }
2422
2440
  endSchedule();
@@ -2432,23 +2450,23 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2432
2450
  const elm = hostRef.$hostElement$;
2433
2451
  const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
2434
2452
  const rc = elm["s-rc"];
2435
- if (import_app_data12.BUILD.style && isInitialLoad) {
2453
+ if (import_app_data13.BUILD.style && isInitialLoad) {
2436
2454
  attachStyles(hostRef);
2437
2455
  }
2438
2456
  const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
2439
- if (import_app_data12.BUILD.isDev) {
2457
+ if (import_app_data13.BUILD.isDev) {
2440
2458
  hostRef.$flags$ |= 1024 /* devOnRender */;
2441
2459
  }
2442
- if (import_app_data12.BUILD.hydrateServerSide) {
2460
+ if (import_app_data13.BUILD.hydrateServerSide) {
2443
2461
  await callRender(hostRef, instance, elm, isInitialLoad);
2444
2462
  } else {
2445
2463
  callRender(hostRef, instance, elm, isInitialLoad);
2446
2464
  }
2447
- if (import_app_data12.BUILD.isDev) {
2465
+ if (import_app_data13.BUILD.isDev) {
2448
2466
  hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
2449
2467
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2450
2468
  }
2451
- if (import_app_data12.BUILD.hydrateServerSide) {
2469
+ if (import_app_data13.BUILD.hydrateServerSide) {
2452
2470
  try {
2453
2471
  serverSideConnected(elm);
2454
2472
  if (isInitialLoad) {
@@ -2462,13 +2480,13 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2462
2480
  consoleError(e, elm);
2463
2481
  }
2464
2482
  }
2465
- if (import_app_data12.BUILD.asyncLoading && rc) {
2483
+ if (import_app_data13.BUILD.asyncLoading && rc) {
2466
2484
  rc.map((cb) => cb());
2467
2485
  elm["s-rc"] = void 0;
2468
2486
  }
2469
2487
  endRender();
2470
2488
  endUpdate();
2471
- if (import_app_data12.BUILD.asyncLoading) {
2489
+ if (import_app_data13.BUILD.asyncLoading) {
2472
2490
  const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
2473
2491
  const postUpdate = () => postUpdateComponent(hostRef);
2474
2492
  if (childrenPromises.length === 0) {
@@ -2484,10 +2502,10 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2484
2502
  };
2485
2503
  var renderingRef = null;
2486
2504
  var callRender = (hostRef, instance, elm, isInitialLoad) => {
2487
- const allRenderFn = import_app_data12.BUILD.allRenderFn ? true : false;
2488
- const lazyLoad = import_app_data12.BUILD.lazyLoad ? true : false;
2489
- const taskQueue = import_app_data12.BUILD.taskQueue ? true : false;
2490
- const updatable = import_app_data12.BUILD.updatable ? true : false;
2505
+ const allRenderFn = import_app_data13.BUILD.allRenderFn ? true : false;
2506
+ const lazyLoad = import_app_data13.BUILD.lazyLoad ? true : false;
2507
+ const taskQueue = import_app_data13.BUILD.taskQueue ? true : false;
2508
+ const updatable = import_app_data13.BUILD.updatable ? true : false;
2491
2509
  try {
2492
2510
  renderingRef = instance;
2493
2511
  instance = allRenderFn ? instance.render() : instance.render && instance.render();
@@ -2497,9 +2515,9 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
2497
2515
  if (updatable || lazyLoad) {
2498
2516
  hostRef.$flags$ |= 2 /* hasRendered */;
2499
2517
  }
2500
- if (import_app_data12.BUILD.hasRenderFn || import_app_data12.BUILD.reflect) {
2501
- if (import_app_data12.BUILD.vdomRender || import_app_data12.BUILD.reflect) {
2502
- if (import_app_data12.BUILD.hydrateServerSide) {
2518
+ if (import_app_data13.BUILD.hasRenderFn || import_app_data13.BUILD.reflect) {
2519
+ if (import_app_data13.BUILD.vdomRender || import_app_data13.BUILD.reflect) {
2520
+ if (import_app_data13.BUILD.hydrateServerSide) {
2503
2521
  return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
2504
2522
  } else {
2505
2523
  renderVdom(hostRef, instance, isInitialLoad);
@@ -2524,57 +2542,57 @@ var postUpdateComponent = (hostRef) => {
2524
2542
  const tagName = hostRef.$cmpMeta$.$tagName$;
2525
2543
  const elm = hostRef.$hostElement$;
2526
2544
  const endPostUpdate = createTime("postUpdate", tagName);
2527
- const instance = import_app_data12.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2545
+ const instance = import_app_data13.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2528
2546
  const ancestorComponent = hostRef.$ancestorComponent$;
2529
- if (import_app_data12.BUILD.cmpDidRender) {
2530
- if (import_app_data12.BUILD.isDev) {
2547
+ if (import_app_data13.BUILD.cmpDidRender) {
2548
+ if (import_app_data13.BUILD.isDev) {
2531
2549
  hostRef.$flags$ |= 1024 /* devOnRender */;
2532
2550
  }
2533
2551
  safeCall(instance, "componentDidRender");
2534
- if (import_app_data12.BUILD.isDev) {
2552
+ if (import_app_data13.BUILD.isDev) {
2535
2553
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2536
2554
  }
2537
2555
  }
2538
2556
  emitLifecycleEvent(elm, "componentDidRender");
2539
2557
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
2540
2558
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
2541
- if (import_app_data12.BUILD.asyncLoading && import_app_data12.BUILD.cssAnnotations) {
2559
+ if (import_app_data13.BUILD.asyncLoading && import_app_data13.BUILD.cssAnnotations) {
2542
2560
  addHydratedFlag(elm);
2543
2561
  }
2544
- if (import_app_data12.BUILD.cmpDidLoad) {
2545
- if (import_app_data12.BUILD.isDev) {
2562
+ if (import_app_data13.BUILD.cmpDidLoad) {
2563
+ if (import_app_data13.BUILD.isDev) {
2546
2564
  hostRef.$flags$ |= 2048 /* devOnDidLoad */;
2547
2565
  }
2548
2566
  safeCall(instance, "componentDidLoad");
2549
- if (import_app_data12.BUILD.isDev) {
2567
+ if (import_app_data13.BUILD.isDev) {
2550
2568
  hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
2551
2569
  }
2552
2570
  }
2553
2571
  emitLifecycleEvent(elm, "componentDidLoad");
2554
2572
  endPostUpdate();
2555
- if (import_app_data12.BUILD.asyncLoading) {
2573
+ if (import_app_data13.BUILD.asyncLoading) {
2556
2574
  hostRef.$onReadyResolve$(elm);
2557
2575
  if (!ancestorComponent) {
2558
2576
  appDidLoad(tagName);
2559
2577
  }
2560
2578
  }
2561
2579
  } else {
2562
- if (import_app_data12.BUILD.cmpDidUpdate) {
2563
- if (import_app_data12.BUILD.isDev) {
2580
+ if (import_app_data13.BUILD.cmpDidUpdate) {
2581
+ if (import_app_data13.BUILD.isDev) {
2564
2582
  hostRef.$flags$ |= 1024 /* devOnRender */;
2565
2583
  }
2566
2584
  safeCall(instance, "componentDidUpdate");
2567
- if (import_app_data12.BUILD.isDev) {
2585
+ if (import_app_data13.BUILD.isDev) {
2568
2586
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2569
2587
  }
2570
2588
  }
2571
2589
  emitLifecycleEvent(elm, "componentDidUpdate");
2572
2590
  endPostUpdate();
2573
2591
  }
2574
- if (import_app_data12.BUILD.method && import_app_data12.BUILD.lazyLoad) {
2592
+ if (import_app_data13.BUILD.method && import_app_data13.BUILD.lazyLoad) {
2575
2593
  hostRef.$onInstanceResolve$(elm);
2576
2594
  }
2577
- if (import_app_data12.BUILD.asyncLoading) {
2595
+ if (import_app_data13.BUILD.asyncLoading) {
2578
2596
  if (hostRef.$onRenderResolve$) {
2579
2597
  hostRef.$onRenderResolve$();
2580
2598
  hostRef.$onRenderResolve$ = void 0;
@@ -2586,7 +2604,7 @@ var postUpdateComponent = (hostRef) => {
2586
2604
  }
2587
2605
  };
2588
2606
  var forceUpdate = (ref) => {
2589
- if (import_app_data12.BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
2607
+ if (import_app_data13.BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
2590
2608
  const hostRef = getHostRef(ref);
2591
2609
  const isConnected = hostRef.$hostElement$.isConnected;
2592
2610
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
@@ -2597,15 +2615,15 @@ var forceUpdate = (ref) => {
2597
2615
  return false;
2598
2616
  };
2599
2617
  var appDidLoad = (who) => {
2600
- if (import_app_data12.BUILD.cssAnnotations) {
2618
+ if (import_app_data13.BUILD.cssAnnotations) {
2601
2619
  addHydratedFlag(doc.documentElement);
2602
2620
  }
2603
- if (import_app_data12.BUILD.asyncQueue) {
2621
+ if (import_app_data13.BUILD.asyncQueue) {
2604
2622
  plt.$flags$ |= 2 /* appLoaded */;
2605
2623
  }
2606
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: import_app_data12.NAMESPACE } }));
2607
- if (import_app_data12.BUILD.profile && performance.measure) {
2608
- performance.measure(`[Stencil] ${import_app_data12.NAMESPACE} initial load (by ${who})`, "st:app:start");
2624
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: import_app_data13.NAMESPACE } }));
2625
+ if (import_app_data13.BUILD.profile && performance.measure) {
2626
+ performance.measure(`[Stencil] ${import_app_data13.NAMESPACE} initial load (by ${who})`, "st:app:start");
2609
2627
  }
2610
2628
  };
2611
2629
  var safeCall = (instance, method, arg) => {
@@ -2619,19 +2637,19 @@ var safeCall = (instance, method, arg) => {
2619
2637
  return void 0;
2620
2638
  };
2621
2639
  var emitLifecycleEvent = (elm, lifecycleName) => {
2622
- if (import_app_data12.BUILD.lifecycleDOMEvents) {
2640
+ if (import_app_data13.BUILD.lifecycleDOMEvents) {
2623
2641
  emitEvent(elm, "stencil_" + lifecycleName, {
2624
2642
  bubbles: true,
2625
2643
  composed: true,
2626
2644
  detail: {
2627
- namespace: import_app_data12.NAMESPACE
2645
+ namespace: import_app_data13.NAMESPACE
2628
2646
  }
2629
2647
  });
2630
2648
  }
2631
2649
  };
2632
2650
  var addHydratedFlag = (elm) => {
2633
2651
  var _a, _b;
2634
- return import_app_data12.BUILD.hydratedClass ? elm.classList.add((_a = import_app_data12.BUILD.hydratedSelectorName) != null ? _a : "hydrated") : import_app_data12.BUILD.hydratedAttribute ? elm.setAttribute((_b = import_app_data12.BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2652
+ return import_app_data13.BUILD.hydratedClass ? elm.classList.add((_a = import_app_data13.BUILD.hydratedSelectorName) != null ? _a : "hydrated") : import_app_data13.BUILD.hydratedAttribute ? elm.setAttribute((_b = import_app_data13.BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2635
2653
  };
2636
2654
  var serverSideConnected = (elm) => {
2637
2655
  const children = elm.children;
@@ -2650,21 +2668,21 @@ var serverSideConnected = (elm) => {
2650
2668
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2651
2669
  var setValue = (ref, propName, newVal, cmpMeta) => {
2652
2670
  const hostRef = getHostRef(ref);
2653
- if (import_app_data13.BUILD.lazyLoad && !hostRef) {
2671
+ if (import_app_data14.BUILD.lazyLoad && !hostRef) {
2654
2672
  throw new Error(
2655
2673
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
2656
2674
  );
2657
2675
  }
2658
- const elm = import_app_data13.BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
2676
+ const elm = import_app_data14.BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
2659
2677
  const oldVal = hostRef.$instanceValues$.get(propName);
2660
2678
  const flags = hostRef.$flags$;
2661
- const instance = import_app_data13.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2679
+ const instance = import_app_data14.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2662
2680
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
2663
2681
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
2664
2682
  const didValueChange = newVal !== oldVal && !areBothNaN;
2665
- if ((!import_app_data13.BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2683
+ if ((!import_app_data14.BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2666
2684
  hostRef.$instanceValues$.set(propName, newVal);
2667
- if (import_app_data13.BUILD.isDev) {
2685
+ if (import_app_data14.BUILD.isDev) {
2668
2686
  if (hostRef.$flags$ & 1024 /* devOnRender */) {
2669
2687
  consoleDevWarn(
2670
2688
  `The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
@@ -2687,8 +2705,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2687
2705
  );
2688
2706
  }
2689
2707
  }
2690
- if (!import_app_data13.BUILD.lazyLoad || instance) {
2691
- if (import_app_data13.BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2708
+ if (!import_app_data14.BUILD.lazyLoad || instance) {
2709
+ if (import_app_data14.BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2692
2710
  const watchMethods = cmpMeta.$watchers$[propName];
2693
2711
  if (watchMethods) {
2694
2712
  watchMethods.map((watchMethodName) => {
@@ -2700,8 +2718,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2700
2718
  });
2701
2719
  }
2702
2720
  }
2703
- if (import_app_data13.BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2704
- if (import_app_data13.BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
2721
+ if (import_app_data14.BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2722
+ if (import_app_data14.BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
2705
2723
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2706
2724
  return;
2707
2725
  }
@@ -2716,40 +2734,40 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2716
2734
  var proxyComponent = (Cstr, cmpMeta, flags) => {
2717
2735
  var _a, _b;
2718
2736
  const prototype = Cstr.prototype;
2719
- if (import_app_data14.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2737
+ if (import_app_data15.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2720
2738
  FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
2721
2739
  const originalFormAssociatedCallback = prototype[cbName];
2722
2740
  Object.defineProperty(prototype, cbName, {
2723
2741
  value(...args) {
2724
2742
  const hostRef = getHostRef(this);
2725
- const instance = import_app_data14.BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
2743
+ const instance = import_app_data15.BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
2726
2744
  if (!instance) {
2727
2745
  hostRef.$onReadyPromise$.then((asyncInstance) => {
2728
2746
  const cb = asyncInstance[cbName];
2729
2747
  typeof cb === "function" && cb.call(asyncInstance, ...args);
2730
2748
  });
2731
2749
  } else {
2732
- const cb = import_app_data14.BUILD.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2750
+ const cb = import_app_data15.BUILD.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2733
2751
  typeof cb === "function" && cb.call(instance, ...args);
2734
2752
  }
2735
2753
  }
2736
2754
  });
2737
2755
  });
2738
2756
  }
2739
- if (import_app_data14.BUILD.member && cmpMeta.$members$ || import_app_data14.BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2740
- if (import_app_data14.BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2757
+ if (import_app_data15.BUILD.member && cmpMeta.$members$ || import_app_data15.BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2758
+ if (import_app_data15.BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2741
2759
  cmpMeta.$watchers$ = Cstr.watchers;
2742
2760
  }
2743
2761
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2744
2762
  members.map(([memberName, [memberFlags]]) => {
2745
- if ((import_app_data14.BUILD.prop || import_app_data14.BUILD.state) && (memberFlags & 31 /* Prop */ || (!import_app_data14.BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2763
+ if ((import_app_data15.BUILD.prop || import_app_data15.BUILD.state) && (memberFlags & 31 /* Prop */ || (!import_app_data15.BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2746
2764
  if ((memberFlags & 2048 /* Getter */) === 0) {
2747
2765
  Object.defineProperty(prototype, memberName, {
2748
2766
  get() {
2749
2767
  return getValue(this, memberName);
2750
2768
  },
2751
2769
  set(newValue) {
2752
- if (import_app_data14.BUILD.isDev) {
2770
+ if (import_app_data15.BUILD.isDev) {
2753
2771
  const ref = getHostRef(this);
2754
2772
  if (
2755
2773
  // we are proxying the instance (not element)
@@ -2770,11 +2788,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2770
2788
  enumerable: true
2771
2789
  });
2772
2790
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2773
- if (import_app_data14.BUILD.lazyLoad) {
2791
+ if (import_app_data15.BUILD.lazyLoad) {
2774
2792
  Object.defineProperty(prototype, memberName, {
2775
2793
  get() {
2776
2794
  const ref = getHostRef(this);
2777
- const instance = import_app_data14.BUILD.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2795
+ const instance = import_app_data15.BUILD.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2778
2796
  if (!instance) return;
2779
2797
  return instance[memberName];
2780
2798
  },
@@ -2814,7 +2832,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2814
2832
  });
2815
2833
  }
2816
2834
  }
2817
- } else if (import_app_data14.BUILD.lazyLoad && import_app_data14.BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2835
+ } else if (import_app_data15.BUILD.lazyLoad && import_app_data15.BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2818
2836
  Object.defineProperty(prototype, memberName, {
2819
2837
  value(...args) {
2820
2838
  var _a2;
@@ -2827,13 +2845,13 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2827
2845
  });
2828
2846
  }
2829
2847
  });
2830
- if (import_app_data14.BUILD.observeAttribute && (!import_app_data14.BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) {
2848
+ if (import_app_data15.BUILD.observeAttribute && (!import_app_data15.BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) {
2831
2849
  const attrNameToPropName = /* @__PURE__ */ new Map();
2832
2850
  prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
2833
2851
  plt.jmp(() => {
2834
2852
  var _a2;
2835
2853
  const propName = attrNameToPropName.get(attrName);
2836
- if (this.hasOwnProperty(propName)) {
2854
+ if (this.hasOwnProperty(propName) && import_app_data15.BUILD.lazyLoad) {
2837
2855
  newValue = this[propName];
2838
2856
  delete this[propName];
2839
2857
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2843,8 +2861,8 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2843
2861
  const hostRef = getHostRef(this);
2844
2862
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
2845
2863
  if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
2846
- const elm = import_app_data14.BUILD.lazyLoad ? hostRef.$hostElement$ : this;
2847
- const instance = import_app_data14.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2864
+ const elm = import_app_data15.BUILD.lazyLoad ? hostRef.$hostElement$ : this;
2865
+ const instance = import_app_data15.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2848
2866
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2849
2867
  entry == null ? void 0 : entry.forEach((callbackName) => {
2850
2868
  if (instance[callbackName] != null) {
@@ -2867,7 +2885,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2867
2885
  var _a2;
2868
2886
  const attrName = m[1] || propName;
2869
2887
  attrNameToPropName.set(attrName, propName);
2870
- if (import_app_data14.BUILD.reflect && m[0] & 512 /* ReflectAttr */) {
2888
+ if (import_app_data15.BUILD.reflect && m[0] & 512 /* ReflectAttr */) {
2871
2889
  (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
2872
2890
  }
2873
2891
  return attrName;
@@ -2885,7 +2903,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2885
2903
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2886
2904
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2887
2905
  const bundleId = cmpMeta.$lazyBundleId$;
2888
- if ((import_app_data15.BUILD.lazyLoad || import_app_data15.BUILD.hydrateClientSide) && bundleId) {
2906
+ if ((import_app_data16.BUILD.lazyLoad || import_app_data16.BUILD.hydrateClientSide) && bundleId) {
2889
2907
  const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
2890
2908
  if (CstrImport && "then" in CstrImport) {
2891
2909
  const endLoad = uniqueTime(
@@ -2900,15 +2918,15 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2900
2918
  if (!Cstr) {
2901
2919
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2902
2920
  }
2903
- if (import_app_data15.BUILD.member && !Cstr.isProxied) {
2904
- if (import_app_data15.BUILD.watchCallback) {
2921
+ if (import_app_data16.BUILD.member && !Cstr.isProxied) {
2922
+ if (import_app_data16.BUILD.watchCallback) {
2905
2923
  cmpMeta.$watchers$ = Cstr.watchers;
2906
2924
  }
2907
2925
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2908
2926
  Cstr.isProxied = true;
2909
2927
  }
2910
2928
  const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
2911
- if (import_app_data15.BUILD.member) {
2929
+ if (import_app_data16.BUILD.member) {
2912
2930
  hostRef.$flags$ |= 8 /* isConstructingInstance */;
2913
2931
  }
2914
2932
  try {
@@ -2916,10 +2934,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2916
2934
  } catch (e) {
2917
2935
  consoleError(e);
2918
2936
  }
2919
- if (import_app_data15.BUILD.member) {
2937
+ if (import_app_data16.BUILD.member) {
2920
2938
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2921
2939
  }
2922
- if (import_app_data15.BUILD.watchCallback) {
2940
+ if (import_app_data16.BUILD.watchCallback) {
2923
2941
  hostRef.$flags$ |= 128 /* isWatchReady */;
2924
2942
  }
2925
2943
  endNewInstance();
@@ -2929,24 +2947,24 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2929
2947
  const cmpTag = elm.localName;
2930
2948
  customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2931
2949
  }
2932
- if (import_app_data15.BUILD.style && Cstr && Cstr.style) {
2950
+ if (import_app_data16.BUILD.style && Cstr && Cstr.style) {
2933
2951
  let style;
2934
2952
  if (typeof Cstr.style === "string") {
2935
2953
  style = Cstr.style;
2936
- } else if (import_app_data15.BUILD.mode && typeof Cstr.style !== "string") {
2954
+ } else if (import_app_data16.BUILD.mode && typeof Cstr.style !== "string") {
2937
2955
  hostRef.$modeName$ = computeMode(elm);
2938
2956
  if (hostRef.$modeName$) {
2939
2957
  style = Cstr.style[hostRef.$modeName$];
2940
2958
  }
2941
- if (import_app_data15.BUILD.hydrateServerSide && hostRef.$modeName$) {
2959
+ if (import_app_data16.BUILD.hydrateServerSide && hostRef.$modeName$) {
2942
2960
  elm.setAttribute("s-mode", hostRef.$modeName$);
2943
2961
  }
2944
2962
  }
2945
2963
  const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
2946
2964
  if (!styles.has(scopeId2)) {
2947
2965
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2948
- if (!import_app_data15.BUILD.hydrateServerSide && import_app_data15.BUILD.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2949
- import_app_data15.BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2966
+ if (!import_app_data16.BUILD.hydrateServerSide && import_app_data16.BUILD.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2967
+ import_app_data16.BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2950
2968
  style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
2951
2969
  }
2952
2970
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
@@ -2956,14 +2974,14 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2956
2974
  }
2957
2975
  const ancestorComponent = hostRef.$ancestorComponent$;
2958
2976
  const schedule = () => scheduleUpdate(hostRef, true);
2959
- if (import_app_data15.BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2977
+ if (import_app_data16.BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2960
2978
  ancestorComponent["s-rc"].push(schedule);
2961
2979
  } else {
2962
2980
  schedule();
2963
2981
  }
2964
2982
  };
2965
2983
  var fireConnectedCallback = (instance) => {
2966
- if (import_app_data15.BUILD.lazyLoad && import_app_data15.BUILD.connectedCallback) {
2984
+ if (import_app_data16.BUILD.lazyLoad && import_app_data16.BUILD.connectedCallback) {
2967
2985
  safeCall(instance, "connectedCallback");
2968
2986
  }
2969
2987
  };
@@ -2974,41 +2992,41 @@ var connectedCallback = (elm) => {
2974
2992
  const hostRef = getHostRef(elm);
2975
2993
  const cmpMeta = hostRef.$cmpMeta$;
2976
2994
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2977
- if (import_app_data16.BUILD.hostListenerTargetParent) {
2995
+ if (import_app_data17.BUILD.hostListenerTargetParent) {
2978
2996
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
2979
2997
  }
2980
2998
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
2981
2999
  hostRef.$flags$ |= 1 /* hasConnected */;
2982
3000
  let hostId;
2983
- if (import_app_data16.BUILD.hydrateClientSide) {
3001
+ if (import_app_data17.BUILD.hydrateClientSide) {
2984
3002
  hostId = elm.getAttribute(HYDRATE_ID);
2985
3003
  if (hostId) {
2986
- if (import_app_data16.BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2987
- const scopeId2 = import_app_data16.BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
3004
+ if (import_app_data17.BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3005
+ const scopeId2 = import_app_data17.BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2988
3006
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2989
- } else if (import_app_data16.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2990
- const scopeId2 = getScopeId(cmpMeta, import_app_data16.BUILD.mode ? elm.getAttribute("s-mode") : void 0);
3007
+ } else if (import_app_data17.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3008
+ const scopeId2 = getScopeId(cmpMeta, import_app_data17.BUILD.mode ? elm.getAttribute("s-mode") : void 0);
2991
3009
  elm["s-sc"] = scopeId2;
2992
3010
  }
2993
3011
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2994
3012
  }
2995
3013
  }
2996
- if (import_app_data16.BUILD.slotRelocation && !hostId) {
2997
- if (import_app_data16.BUILD.hydrateServerSide || (import_app_data16.BUILD.slot || import_app_data16.BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3014
+ if (import_app_data17.BUILD.slotRelocation && !hostId) {
3015
+ if (import_app_data17.BUILD.hydrateServerSide || (import_app_data17.BUILD.slot || import_app_data17.BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2998
3016
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
2999
3017
  setContentReference(elm);
3000
3018
  }
3001
3019
  }
3002
- if (import_app_data16.BUILD.asyncLoading) {
3020
+ if (import_app_data17.BUILD.asyncLoading) {
3003
3021
  let ancestorComponent = elm;
3004
3022
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
3005
- if (import_app_data16.BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
3023
+ if (import_app_data17.BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
3006
3024
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
3007
3025
  break;
3008
3026
  }
3009
3027
  }
3010
3028
  }
3011
- if (import_app_data16.BUILD.prop && !import_app_data16.BUILD.hydrateServerSide && cmpMeta.$members$) {
3029
+ if (import_app_data17.BUILD.prop && !import_app_data17.BUILD.hydrateServerSide && cmpMeta.$members$) {
3012
3030
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
3013
3031
  if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
3014
3032
  const value = elm[memberName];
@@ -3017,7 +3035,7 @@ var connectedCallback = (elm) => {
3017
3035
  }
3018
3036
  });
3019
3037
  }
3020
- if (import_app_data16.BUILD.initializeNextTick) {
3038
+ if (import_app_data17.BUILD.initializeNextTick) {
3021
3039
  nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
3022
3040
  } else {
3023
3041
  initializeComponent(elm, hostRef, cmpMeta);
@@ -3035,32 +3053,32 @@ var connectedCallback = (elm) => {
3035
3053
  };
3036
3054
  var setContentReference = (elm) => {
3037
3055
  const contentRefElm = elm["s-cr"] = doc.createComment(
3038
- import_app_data16.BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
3056
+ import_app_data17.BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
3039
3057
  );
3040
3058
  contentRefElm["s-cn"] = true;
3041
3059
  insertBefore(elm, contentRefElm, elm.firstChild);
3042
3060
  };
3043
3061
 
3044
3062
  // src/runtime/disconnected-callback.ts
3045
- var import_app_data17 = require("@stencil/core/internal/app-data");
3063
+ var import_app_data18 = require("@stencil/core/internal/app-data");
3046
3064
  var disconnectInstance = (instance) => {
3047
- if (import_app_data17.BUILD.lazyLoad && import_app_data17.BUILD.disconnectedCallback) {
3065
+ if (import_app_data18.BUILD.lazyLoad && import_app_data18.BUILD.disconnectedCallback) {
3048
3066
  safeCall(instance, "disconnectedCallback");
3049
3067
  }
3050
- if (import_app_data17.BUILD.cmpDidUnload) {
3068
+ if (import_app_data18.BUILD.cmpDidUnload) {
3051
3069
  safeCall(instance, "componentDidUnload");
3052
3070
  }
3053
3071
  };
3054
3072
  var disconnectedCallback = async (elm) => {
3055
3073
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3056
3074
  const hostRef = getHostRef(elm);
3057
- if (import_app_data17.BUILD.hostListener) {
3075
+ if (import_app_data18.BUILD.hostListener) {
3058
3076
  if (hostRef.$rmListeners$) {
3059
3077
  hostRef.$rmListeners$.map((rmListener) => rmListener());
3060
3078
  hostRef.$rmListeners$ = void 0;
3061
3079
  }
3062
3080
  }
3063
- if (!import_app_data17.BUILD.lazyLoad) {
3081
+ if (!import_app_data18.BUILD.lazyLoad) {
3064
3082
  disconnectInstance(elm);
3065
3083
  } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
3066
3084
  disconnectInstance(hostRef.$lazyInstance$);
@@ -3079,36 +3097,36 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3079
3097
  $flags$: compactMeta[0],
3080
3098
  $tagName$: compactMeta[1]
3081
3099
  };
3082
- if (import_app_data18.BUILD.member) {
3100
+ if (import_app_data19.BUILD.member) {
3083
3101
  cmpMeta.$members$ = compactMeta[2];
3084
3102
  }
3085
- if (import_app_data18.BUILD.hostListener) {
3103
+ if (import_app_data19.BUILD.hostListener) {
3086
3104
  cmpMeta.$listeners$ = compactMeta[3];
3087
3105
  }
3088
- if (import_app_data18.BUILD.watchCallback) {
3106
+ if (import_app_data19.BUILD.watchCallback) {
3089
3107
  cmpMeta.$watchers$ = Cstr.$watchers$;
3090
3108
  }
3091
- if (import_app_data18.BUILD.reflect) {
3109
+ if (import_app_data19.BUILD.reflect) {
3092
3110
  cmpMeta.$attrsToReflect$ = [];
3093
3111
  }
3094
- if (import_app_data18.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3112
+ if (import_app_data19.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3095
3113
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3096
3114
  }
3097
- if (import_app_data18.BUILD.experimentalSlotFixes) {
3098
- if (import_app_data18.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3115
+ if (import_app_data19.BUILD.experimentalSlotFixes) {
3116
+ if (import_app_data19.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3099
3117
  patchPseudoShadowDom(Cstr.prototype);
3100
3118
  }
3101
3119
  } else {
3102
- if (import_app_data18.BUILD.slotChildNodesFix) {
3120
+ if (import_app_data19.BUILD.slotChildNodesFix) {
3103
3121
  patchChildSlotNodes(Cstr.prototype);
3104
3122
  }
3105
- if (import_app_data18.BUILD.cloneNodeFix) {
3123
+ if (import_app_data19.BUILD.cloneNodeFix) {
3106
3124
  patchCloneNode(Cstr.prototype);
3107
3125
  }
3108
- if (import_app_data18.BUILD.appendChildSlotFix) {
3126
+ if (import_app_data19.BUILD.appendChildSlotFix) {
3109
3127
  patchSlotAppendChild(Cstr.prototype);
3110
3128
  }
3111
- if (import_app_data18.BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3129
+ if (import_app_data19.BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3112
3130
  patchTextContent(Cstr.prototype);
3113
3131
  }
3114
3132
  }
@@ -3126,20 +3144,20 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3126
3144
  this.__hasHostListenerAttached = true;
3127
3145
  }
3128
3146
  connectedCallback(this);
3129
- if (import_app_data18.BUILD.connectedCallback && originalConnectedCallback) {
3147
+ if (import_app_data19.BUILD.connectedCallback && originalConnectedCallback) {
3130
3148
  originalConnectedCallback.call(this);
3131
3149
  }
3132
3150
  },
3133
3151
  disconnectedCallback() {
3134
3152
  disconnectedCallback(this);
3135
- if (import_app_data18.BUILD.disconnectedCallback && originalDisconnectedCallback) {
3153
+ if (import_app_data19.BUILD.disconnectedCallback && originalDisconnectedCallback) {
3136
3154
  originalDisconnectedCallback.call(this);
3137
3155
  }
3138
3156
  },
3139
3157
  __attachShadow() {
3140
3158
  if (supportsShadow) {
3141
3159
  if (!this.shadowRoot) {
3142
- if (import_app_data18.BUILD.shadowDelegatesFocus) {
3160
+ if (import_app_data19.BUILD.shadowDelegatesFocus) {
3143
3161
  this.attachShadow({
3144
3162
  mode: "open",
3145
3163
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -3163,7 +3181,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3163
3181
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
3164
3182
  };
3165
3183
  var forceModeUpdate = (elm) => {
3166
- if (import_app_data18.BUILD.style && import_app_data18.BUILD.mode && !import_app_data18.BUILD.lazyLoad) {
3184
+ if (import_app_data19.BUILD.style && import_app_data19.BUILD.mode && !import_app_data19.BUILD.lazyLoad) {
3167
3185
  const mode = computeMode(elm);
3168
3186
  const hostRef = getHostRef(elm);
3169
3187
  if (hostRef.$modeName$ !== mode) {
@@ -3186,7 +3204,7 @@ var forceModeUpdate = (elm) => {
3186
3204
  };
3187
3205
 
3188
3206
  // src/runtime/bootstrap-lazy.ts
3189
- var import_app_data19 = require("@stencil/core/internal/app-data");
3207
+ var import_app_data20 = require("@stencil/core/internal/app-data");
3190
3208
 
3191
3209
  // src/runtime/hmr-component.ts
3192
3210
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
@@ -3198,7 +3216,7 @@ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3198
3216
  // src/runtime/bootstrap-lazy.ts
3199
3217
  var bootstrapLazy = (lazyBundles, options = {}) => {
3200
3218
  var _a;
3201
- if (import_app_data19.BUILD.profile && performance.mark) {
3219
+ if (import_app_data20.BUILD.profile && performance.mark) {
3202
3220
  performance.mark("st:app:start");
3203
3221
  }
3204
3222
  installDevTools();
@@ -3214,12 +3232,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3214
3232
  let isBootstrapping = true;
3215
3233
  Object.assign(plt, options);
3216
3234
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
3217
- if (import_app_data19.BUILD.asyncQueue) {
3235
+ if (import_app_data20.BUILD.asyncQueue) {
3218
3236
  if (options.syncQueue) {
3219
3237
  plt.$flags$ |= 4 /* queueSync */;
3220
3238
  }
3221
3239
  }
3222
- if (import_app_data19.BUILD.hydrateClientSide) {
3240
+ if (import_app_data20.BUILD.hydrateClientSide) {
3223
3241
  plt.$flags$ |= 2 /* appLoaded */;
3224
3242
  }
3225
3243
  let hasSlotRelocation = false;
@@ -3235,22 +3253,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3235
3253
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
3236
3254
  hasSlotRelocation = true;
3237
3255
  }
3238
- if (import_app_data19.BUILD.member) {
3256
+ if (import_app_data20.BUILD.member) {
3239
3257
  cmpMeta.$members$ = compactMeta[2];
3240
3258
  }
3241
- if (import_app_data19.BUILD.hostListener) {
3259
+ if (import_app_data20.BUILD.hostListener) {
3242
3260
  cmpMeta.$listeners$ = compactMeta[3];
3243
3261
  }
3244
- if (import_app_data19.BUILD.reflect) {
3262
+ if (import_app_data20.BUILD.reflect) {
3245
3263
  cmpMeta.$attrsToReflect$ = [];
3246
3264
  }
3247
- if (import_app_data19.BUILD.watchCallback) {
3265
+ if (import_app_data20.BUILD.watchCallback) {
3248
3266
  cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
3249
3267
  }
3250
- if (import_app_data19.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3268
+ if (import_app_data20.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3251
3269
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3252
3270
  }
3253
- const tagName = import_app_data19.BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3271
+ const tagName = import_app_data20.BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3254
3272
  const HostElement = class extends HTMLElement {
3255
3273
  // StencilLazyHost
3256
3274
  constructor(self) {
@@ -3258,10 +3276,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3258
3276
  this.hasRegisteredEventListeners = false;
3259
3277
  self = this;
3260
3278
  registerHost(self, cmpMeta);
3261
- if (import_app_data19.BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3279
+ if (import_app_data20.BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3262
3280
  if (supportsShadow) {
3263
3281
  if (!self.shadowRoot) {
3264
- if (import_app_data19.BUILD.shadowDelegatesFocus) {
3282
+ if (import_app_data20.BUILD.shadowDelegatesFocus) {
3265
3283
  self.attachShadow({
3266
3284
  mode: "open",
3267
3285
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -3276,7 +3294,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3276
3294
  );
3277
3295
  }
3278
3296
  }
3279
- } else if (!import_app_data19.BUILD.hydrateServerSide && !("shadowRoot" in self)) {
3297
+ } else if (!import_app_data20.BUILD.hydrateServerSide && !("shadowRoot" in self)) {
3280
3298
  self.shadowRoot = self;
3281
3299
  }
3282
3300
  }
@@ -3304,28 +3322,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3304
3322
  return getHostRef(this).$onReadyPromise$;
3305
3323
  }
3306
3324
  };
3307
- if (import_app_data19.BUILD.experimentalSlotFixes) {
3308
- if (import_app_data19.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3325
+ if (import_app_data20.BUILD.experimentalSlotFixes) {
3326
+ if (import_app_data20.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3309
3327
  patchPseudoShadowDom(HostElement.prototype);
3310
3328
  }
3311
3329
  } else {
3312
- if (import_app_data19.BUILD.slotChildNodesFix) {
3330
+ if (import_app_data20.BUILD.slotChildNodesFix) {
3313
3331
  patchChildSlotNodes(HostElement.prototype);
3314
3332
  }
3315
- if (import_app_data19.BUILD.cloneNodeFix) {
3333
+ if (import_app_data20.BUILD.cloneNodeFix) {
3316
3334
  patchCloneNode(HostElement.prototype);
3317
3335
  }
3318
- if (import_app_data19.BUILD.appendChildSlotFix) {
3336
+ if (import_app_data20.BUILD.appendChildSlotFix) {
3319
3337
  patchSlotAppendChild(HostElement.prototype);
3320
3338
  }
3321
- if (import_app_data19.BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3339
+ if (import_app_data20.BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3322
3340
  patchTextContent(HostElement.prototype);
3323
3341
  }
3324
3342
  }
3325
- if (import_app_data19.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3343
+ if (import_app_data20.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3326
3344
  HostElement.formAssociated = true;
3327
3345
  }
3328
- if (import_app_data19.BUILD.hotModuleReplacement) {
3346
+ if (import_app_data20.BUILD.hotModuleReplacement) {
3329
3347
  HostElement.prototype["s-hmr"] = function(hmrVersionId) {
3330
3348
  hmrStart(this, cmpMeta, hmrVersionId);
3331
3349
  };
@@ -3344,7 +3362,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3344
3362
  if (hasSlotRelocation) {
3345
3363
  dataStyles.textContent += SLOT_FB_CSS;
3346
3364
  }
3347
- if (import_app_data19.BUILD.invisiblePrehydration && (import_app_data19.BUILD.hydratedClass || import_app_data19.BUILD.hydratedAttribute)) {
3365
+ if (import_app_data20.BUILD.invisiblePrehydration && (import_app_data20.BUILD.hydratedClass || import_app_data20.BUILD.hydratedAttribute)) {
3348
3366
  dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
3349
3367
  }
3350
3368
  if (dataStyles.innerHTML.length) {
@@ -3360,7 +3378,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3360
3378
  if (deferredConnectedCallbacks.length) {
3361
3379
  deferredConnectedCallbacks.map((host) => host.connectedCallback());
3362
3380
  } else {
3363
- if (import_app_data19.BUILD.profile) {
3381
+ if (import_app_data20.BUILD.profile) {
3364
3382
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
3365
3383
  } else {
3366
3384
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
@@ -3373,10 +3391,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3373
3391
  var Fragment = (_, children) => children;
3374
3392
 
3375
3393
  // src/runtime/host-listener.ts
3376
- var import_app_data20 = require("@stencil/core/internal/app-data");
3394
+ var import_app_data21 = require("@stencil/core/internal/app-data");
3377
3395
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
3378
- if (import_app_data20.BUILD.hostListener && listeners) {
3379
- if (import_app_data20.BUILD.hostListenerTargetParent) {
3396
+ if (import_app_data21.BUILD.hostListener && listeners) {
3397
+ if (import_app_data21.BUILD.hostListenerTargetParent) {
3380
3398
  if (attachParentListeners) {
3381
3399
  listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
3382
3400
  } else {
@@ -3384,7 +3402,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3384
3402
  }
3385
3403
  }
3386
3404
  listeners.map(([flags, name, method]) => {
3387
- const target = import_app_data20.BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3405
+ const target = import_app_data21.BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3388
3406
  const handler = hostListenerProxy(hostRef, method);
3389
3407
  const opts = hostListenerOpts(flags);
3390
3408
  plt.ael(target, name, handler, opts);
@@ -3395,7 +3413,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3395
3413
  var hostListenerProxy = (hostRef, methodName) => (ev) => {
3396
3414
  var _a;
3397
3415
  try {
3398
- if (import_app_data20.BUILD.lazyLoad) {
3416
+ if (import_app_data21.BUILD.lazyLoad) {
3399
3417
  if (hostRef.$flags$ & 256 /* isListenReady */) {
3400
3418
  (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
3401
3419
  } else {
@@ -3409,10 +3427,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
3409
3427
  }
3410
3428
  };
3411
3429
  var getHostListenerTarget = (elm, flags) => {
3412
- if (import_app_data20.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3413
- if (import_app_data20.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3414
- if (import_app_data20.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3415
- if (import_app_data20.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3430
+ if (import_app_data21.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3431
+ if (import_app_data21.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3432
+ if (import_app_data21.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3433
+ if (import_app_data21.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3416
3434
  return elm.parentElement;
3417
3435
  return elm;
3418
3436
  };