@everymatrix/bonus-elevate-shop-item 1.53.0 → 1.53.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/dist/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
  2. package/dist/bonus-elevate-shop-item/p-3fdabb21.entry.js +1 -0
  3. package/dist/bonus-elevate-shop-item/p-edff3a91.js +2 -0
  4. package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +47 -16
  5. package/dist/cjs/bonus-elevate-shop-item.cjs.js +2 -2
  6. package/dist/cjs/{index-791389e8.js → index-51d505be.js} +251 -147
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.js +22 -5
  10. package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +41 -7
  11. package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +47 -16
  12. package/dist/esm/bonus-elevate-shop-item.js +3 -3
  13. package/dist/esm/{index-3fe56209.js → index-8304d884.js} +251 -147
  14. package/dist/esm/loader.js +2 -2
  15. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.d.ts +2 -0
  16. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.dev.d.ts +2 -0
  17. package/package.json +1 -1
  18. package/dist/bonus-elevate-shop-item/p-11ccf3d4.entry.js +0 -1
  19. package/dist/bonus-elevate-shop-item/p-8ebd9aab.js +0 -2
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.d.ts +0 -2
  21. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.dev.d.ts +0 -2
@@ -1,17 +1,25 @@
1
1
  const NAMESPACE = 'bonus-elevate-shop-item';
2
- const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
+
13
+ // src/utils/constants.ts
14
+ var SVG_NS = "http://www.w3.org/2000/svg";
15
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
16
+
17
+ // src/client/client-host-ref.ts
12
18
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
19
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
20
+ var registerInstance = (lazyInstance, hostRef) => {
21
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
22
+ };
15
23
  var registerHost = (hostElement, cmpMeta) => {
16
24
  const hostRef = {
17
25
  $flags$: 0,
@@ -24,7 +32,8 @@ var registerHost = (hostElement, cmpMeta) => {
24
32
  hostElement["s-p"] = [];
25
33
  hostElement["s-rc"] = [];
26
34
  }
27
- return hostRefs.set(hostElement, hostRef);
35
+ const ref = hostRefs.set(hostElement, hostRef);
36
+ return ref;
28
37
  };
29
38
  var isMemberInElement = (elm, memberName) => memberName in elm;
30
39
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -61,16 +70,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
61
70
  /* webpackExclude: /\.system\.entry\.js$/ */
62
71
  /* webpackMode: "lazy" */
63
72
  `./${bundleId}.entry.js${""}`
64
- ).then((importedModule) => {
65
- {
66
- cmpModules.set(bundleId, importedModule);
73
+ ).then(
74
+ (importedModule) => {
75
+ {
76
+ cmpModules.set(bundleId, importedModule);
77
+ }
78
+ return importedModule[exportName];
79
+ },
80
+ (e) => {
81
+ consoleError(e, hostRef.$hostElement$);
67
82
  }
68
- return importedModule[exportName];
69
- }, consoleError);
83
+ );
70
84
  };
71
85
 
72
86
  // src/client/client-style.ts
73
87
  var styles = /* @__PURE__ */ new Map();
88
+ var HYDRATED_STYLE_ID = "sty-id";
74
89
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
75
90
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
76
91
  var win = typeof window !== "undefined" ? window : {};
@@ -128,14 +143,6 @@ var flush = () => {
128
143
  };
129
144
  var nextTick = (cb) => promiseResolve().then(cb);
130
145
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
-
132
- // src/utils/constants.ts
133
- var EMPTY_OBJ = {};
134
- var SVG_NS = "http://www.w3.org/2000/svg";
135
- var HTML_NS = "http://www.w3.org/1999/xhtml";
136
-
137
- // src/utils/helpers.ts
138
- var isDef = (v) => v != null;
139
146
  var isComplexType = (o) => {
140
147
  o = typeof o;
141
148
  return o === "object" || o === "function";
@@ -195,6 +202,63 @@ var unwrapErr = (result) => {
195
202
  throw result.value;
196
203
  }
197
204
  };
205
+ var updateFallbackSlotVisibility = (elm) => {
206
+ const childNodes = elm.__childNodes || elm.childNodes;
207
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
208
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
209
+ var _a;
210
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
211
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
212
+ slotNode.hidden = true;
213
+ } else {
214
+ slotNode.hidden = false;
215
+ }
216
+ }
217
+ });
218
+ }
219
+ for (const childNode of childNodes) {
220
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
221
+ updateFallbackSlotVisibility(childNode);
222
+ }
223
+ }
224
+ };
225
+ function getHostSlotNodes(childNodes, hostName, slotName) {
226
+ let i2 = 0;
227
+ let slottedNodes = [];
228
+ let childNode;
229
+ for (; i2 < childNodes.length; i2++) {
230
+ childNode = childNodes[i2];
231
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
232
+ slottedNodes.push(childNode);
233
+ if (typeof slotName !== "undefined") return slottedNodes;
234
+ }
235
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
236
+ }
237
+ return slottedNodes;
238
+ }
239
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
240
+ const childNodes = [];
241
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
242
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
243
+ childNodes.push(node);
244
+ }
245
+ return childNodes;
246
+ };
247
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
248
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
249
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
250
+ return true;
251
+ }
252
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
253
+ return true;
254
+ }
255
+ return false;
256
+ }
257
+ if (nodeToRelocate["s-sn"] === slotName) {
258
+ return true;
259
+ }
260
+ return slotName === "";
261
+ };
198
262
  var createTime = (fnName, tagName = "") => {
199
263
  {
200
264
  return () => {
@@ -386,7 +450,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
386
450
  }
387
451
  if (!appliedStyles.has(scopeId2)) {
388
452
  {
389
- styleElm = doc.createElement("style");
453
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
390
454
  styleElm.innerHTML = style;
391
455
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
392
456
  if (nonce != null) {
@@ -396,7 +460,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
396
460
  if (styleContainerNode.nodeName === "HEAD") {
397
461
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
398
462
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
399
- styleContainerNode.insertBefore(styleElm, referenceNode2);
463
+ styleContainerNode.insertBefore(
464
+ styleElm,
465
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
466
+ );
400
467
  } else if ("host" in styleContainerNode) {
401
468
  if (supportsConstructableStylesheets) {
402
469
  const stylesheet = new CSSStyleSheet();
@@ -446,16 +513,18 @@ var attachStyles = (hostRef) => {
446
513
  endAttachStyles();
447
514
  };
448
515
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
449
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
516
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
450
517
  if (oldValue !== newValue) {
451
518
  let isProp = isMemberInElement(elm, memberName);
452
519
  let ln = memberName.toLowerCase();
453
520
  if (memberName === "class") {
454
521
  const classList = elm.classList;
455
522
  const oldClasses = parseClassList(oldValue);
456
- const newClasses = parseClassList(newValue);
457
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
458
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
523
+ let newClasses = parseClassList(newValue);
524
+ {
525
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
526
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
527
+ }
459
528
  } else if (memberName === "style") {
460
529
  {
461
530
  for (const prop in oldValue) {
@@ -514,7 +583,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
514
583
  elm.setAttribute(memberName, n);
515
584
  }
516
585
  }
517
- } else {
586
+ } else if (elm[memberName] !== newValue) {
518
587
  elm[memberName] = newValue;
519
588
  }
520
589
  } catch (e) {
@@ -536,24 +605,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
536
605
  }
537
606
  };
538
607
  var parseClassListRegex = /\s/;
539
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
608
+ var parseClassList = (value) => {
609
+ if (typeof value === "object" && value && "baseVal" in value) {
610
+ value = value.baseVal;
611
+ }
612
+ if (!value || typeof value !== "string") {
613
+ return [];
614
+ }
615
+ return value.split(parseClassListRegex);
616
+ };
540
617
  var CAPTURE_EVENT_SUFFIX = "Capture";
541
618
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
542
619
 
543
620
  // src/runtime/vdom/update-element.ts
544
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
621
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
545
622
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
546
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
547
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
623
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
624
+ const newVnodeAttrs = newVnode.$attrs$ || {};
548
625
  {
549
626
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
550
627
  if (!(memberName in newVnodeAttrs)) {
551
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
628
+ setAccessor(
629
+ elm,
630
+ memberName,
631
+ oldVnodeAttrs[memberName],
632
+ void 0,
633
+ isSvgMode2,
634
+ newVnode.$flags$);
552
635
  }
553
636
  }
554
637
  }
555
638
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
556
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
639
+ setAccessor(
640
+ elm,
641
+ memberName,
642
+ oldVnodeAttrs[memberName],
643
+ newVnodeAttrs[memberName],
644
+ isSvgMode2,
645
+ newVnode.$flags$);
557
646
  }
558
647
  };
559
648
  function sortedAttrNames(attrNames) {
@@ -565,16 +654,13 @@ function sortedAttrNames(attrNames) {
565
654
  attrNames
566
655
  );
567
656
  }
568
-
569
- // src/runtime/vdom/vdom-render.ts
570
- var scopeId;
571
657
  var contentRef;
572
658
  var hostTagName;
573
659
  var useNativeShadowDom = false;
574
660
  var checkSlotFallbackVisibility = false;
575
661
  var checkSlotRelocate = false;
576
662
  var isSvgMode = false;
577
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
663
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
578
664
  var _a;
579
665
  const newVNode2 = newParentVNode.$children$[childIndex];
580
666
  let i2 = 0;
@@ -584,9 +670,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
584
670
  if (!useNativeShadowDom) {
585
671
  checkSlotRelocate = true;
586
672
  if (newVNode2.$tag$ === "slot") {
587
- if (scopeId) {
588
- parentElm.classList.add(scopeId + "-s");
589
- }
590
673
  newVNode2.$flags$ |= newVNode2.$children$ ? (
591
674
  // slot element has fallback content
592
675
  // still create an element that "mocks" the slot element
@@ -617,14 +700,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
617
700
  {
618
701
  updateElement(null, newVNode2, isSvgMode);
619
702
  }
620
- const rootNode = elm.getRootNode();
621
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
622
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
623
- elm.classList.add(elm["s-si"] = scopeId);
624
- }
625
703
  if (newVNode2.$children$) {
626
704
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
627
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
705
+ childNode = createElm(oldParentVNode, newVNode2, i2);
628
706
  if (childNode) {
629
707
  elm.appendChild(childNode);
630
708
  }
@@ -657,7 +735,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
657
735
  };
658
736
  var putBackInOriginalLocation = (parentElm, recursive) => {
659
737
  plt.$flags$ |= 1 /* isTmpDisconnected */;
660
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
738
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
661
739
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
662
740
  let node = parentElm;
663
741
  while (node = node.nextSibling) {
@@ -669,7 +747,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
669
747
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
670
748
  const childNode = oldSlotChildNodes[i2];
671
749
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
672
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
750
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
673
751
  childNode["s-ol"].remove();
674
752
  childNode["s-ol"] = void 0;
675
753
  childNode["s-sh"] = void 0;
@@ -689,7 +767,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
689
767
  }
690
768
  for (; startIdx <= endIdx; ++startIdx) {
691
769
  if (vnodes[startIdx]) {
692
- childNode = createElm(null, parentVNode, startIdx, parentElm);
770
+ childNode = createElm(null, parentVNode, startIdx);
693
771
  if (childNode) {
694
772
  vnodes[startIdx].$elm$ = childNode;
695
773
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -776,7 +854,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
776
854
  if (idxInOld >= 0) {
777
855
  elmToMove = oldCh[idxInOld];
778
856
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
779
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
857
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
780
858
  } else {
781
859
  patch(elmToMove, newStartVnode, isInitialRender);
782
860
  oldCh[idxInOld] = void 0;
@@ -784,12 +862,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
784
862
  }
785
863
  newStartVnode = newCh[++newStartIdx];
786
864
  } else {
787
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
865
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
788
866
  newStartVnode = newCh[++newStartIdx];
789
867
  }
790
868
  if (node) {
791
869
  {
792
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
870
+ insertBefore(
871
+ referenceNode(oldStartVnode.$elm$).parentNode,
872
+ node,
873
+ referenceNode(oldStartVnode.$elm$)
874
+ );
793
875
  }
794
876
  }
795
877
  }
@@ -810,28 +892,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
810
892
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
811
893
  if (leftVNode.$tag$ === rightVNode.$tag$) {
812
894
  if (leftVNode.$tag$ === "slot") {
813
- if (
814
- // The component gets hydrated and no VDOM has been initialized.
815
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
816
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
817
- // hydration comments to be removed
818
- leftVNode.$elm$.nodeType !== 8
819
- ) {
820
- return false;
821
- }
822
895
  return leftVNode.$name$ === rightVNode.$name$;
823
896
  }
824
897
  if (!isInitialRender) {
825
898
  return leftVNode.$key$ === rightVNode.$key$;
826
899
  }
900
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
901
+ leftVNode.$key$ = rightVNode.$key$;
902
+ }
827
903
  return true;
828
904
  }
829
905
  return false;
830
906
  };
831
- var referenceNode = (node) => {
832
- return node && node["s-ol"] || node;
833
- };
834
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
907
+ var referenceNode = (node) => node && node["s-ol"] || node;
835
908
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
836
909
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
837
910
  const oldChildren = oldVNode.$children$;
@@ -870,41 +943,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
870
943
  elm.data = text;
871
944
  }
872
945
  };
873
- var updateFallbackSlotVisibility = (elm) => {
874
- const childNodes = elm.childNodes;
875
- for (const childNode of childNodes) {
876
- if (childNode.nodeType === 1 /* ElementNode */) {
877
- if (childNode["s-sr"]) {
878
- const slotName = childNode["s-sn"];
879
- childNode.hidden = false;
880
- for (const siblingNode of childNodes) {
881
- if (siblingNode !== childNode) {
882
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
883
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
884
- childNode.hidden = true;
885
- break;
886
- }
887
- } else {
888
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
889
- childNode.hidden = true;
890
- break;
891
- }
892
- }
893
- }
894
- }
895
- }
896
- updateFallbackSlotVisibility(childNode);
897
- }
898
- }
899
- };
900
946
  var relocateNodes = [];
901
947
  var markSlotContentForRelocation = (elm) => {
902
948
  let node;
903
949
  let hostContentNodes;
904
950
  let j;
905
- for (const childNode of elm.childNodes) {
951
+ const children = elm.__childNodes || elm.childNodes;
952
+ for (const childNode of children) {
906
953
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
907
- hostContentNodes = node.parentNode.childNodes;
954
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
908
955
  const slotName = childNode["s-sn"];
909
956
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
910
957
  node = hostContentNodes[j];
@@ -946,21 +993,6 @@ var markSlotContentForRelocation = (elm) => {
946
993
  }
947
994
  }
948
995
  };
949
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
950
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
951
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
952
- return true;
953
- }
954
- if (nodeToRelocate.getAttribute("slot") === slotName) {
955
- return true;
956
- }
957
- return false;
958
- }
959
- if (nodeToRelocate["s-sn"] === slotName) {
960
- return true;
961
- }
962
- return slotName === "";
963
- };
964
996
  var nullifyVNodeRefs = (vNode) => {
965
997
  {
966
998
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -968,8 +1000,9 @@ var nullifyVNodeRefs = (vNode) => {
968
1000
  }
969
1001
  };
970
1002
  var insertBefore = (parent, newNode, reference) => {
971
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
972
- return inserted;
1003
+ {
1004
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1005
+ }
973
1006
  };
974
1007
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
975
1008
  var _a, _b, _c, _d;
@@ -995,9 +1028,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
995
1028
  rootVnode.$flags$ |= 4 /* isHost */;
996
1029
  hostRef.$vnode$ = rootVnode;
997
1030
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
998
- {
999
- scopeId = hostElm["s-sc"];
1000
- }
1001
1031
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1002
1032
  {
1003
1033
  contentRef = hostElm["s-cr"];
@@ -1026,7 +1056,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1026
1056
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1027
1057
  while (orgLocationNode) {
1028
1058
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1029
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1059
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1030
1060
  refNode = refNode.nextSibling;
1031
1061
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1032
1062
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1039,13 +1069,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1039
1069
  orgLocationNode = orgLocationNode.previousSibling;
1040
1070
  }
1041
1071
  }
1042
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1072
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1073
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1074
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1043
1075
  if (nodeToRelocate !== insertBeforeNode) {
1044
1076
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1045
1077
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1046
1078
  }
1047
1079
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1048
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1080
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1049
1081
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1050
1082
  }
1051
1083
  }
@@ -1073,7 +1105,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1073
1105
  // src/runtime/update-component.ts
1074
1106
  var attachToAncestor = (hostRef, ancestorComponent) => {
1075
1107
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1076
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1108
+ const index = ancestorComponent["s-p"].push(
1109
+ new Promise(
1110
+ (r) => hostRef.$onRenderResolve$ = () => {
1111
+ ancestorComponent["s-p"].splice(index - 1, 1);
1112
+ r();
1113
+ }
1114
+ )
1115
+ );
1077
1116
  }
1078
1117
  };
1079
1118
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1100,7 +1139,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1100
1139
  let maybePromise;
1101
1140
  if (isInitialLoad) {
1102
1141
  {
1103
- maybePromise = safeCall(instance, "componentWillLoad");
1142
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1104
1143
  }
1105
1144
  }
1106
1145
  endSchedule();
@@ -1169,7 +1208,7 @@ var postUpdateComponent = (hostRef) => {
1169
1208
  const instance = hostRef.$lazyInstance$ ;
1170
1209
  const ancestorComponent = hostRef.$ancestorComponent$;
1171
1210
  {
1172
- safeCall(instance, "componentDidRender");
1211
+ safeCall(instance, "componentDidRender", void 0, elm);
1173
1212
  }
1174
1213
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1175
1214
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1177,7 +1216,7 @@ var postUpdateComponent = (hostRef) => {
1177
1216
  addHydratedFlag(elm);
1178
1217
  }
1179
1218
  {
1180
- safeCall(instance, "componentDidLoad");
1219
+ safeCall(instance, "componentDidLoad", void 0, elm);
1181
1220
  }
1182
1221
  endPostUpdate();
1183
1222
  {
@@ -1188,7 +1227,7 @@ var postUpdateComponent = (hostRef) => {
1188
1227
  }
1189
1228
  } else {
1190
1229
  {
1191
- safeCall(instance, "componentDidUpdate");
1230
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1192
1231
  }
1193
1232
  endPostUpdate();
1194
1233
  }
@@ -1209,12 +1248,12 @@ var appDidLoad = (who) => {
1209
1248
  }
1210
1249
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1211
1250
  };
1212
- var safeCall = (instance, method, arg) => {
1251
+ var safeCall = (instance, method, arg, elm) => {
1213
1252
  if (instance && instance[method]) {
1214
1253
  try {
1215
1254
  return instance[method](arg);
1216
1255
  } catch (e) {
1217
- consoleError(e);
1256
+ consoleError(e, elm);
1218
1257
  }
1219
1258
  }
1220
1259
  return void 0;
@@ -1257,15 +1296,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1257
1296
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1258
1297
  members.map(([memberName, [memberFlags]]) => {
1259
1298
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1299
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1300
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1301
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1302
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1303
+ Object.defineProperty(prototype, memberName, {
1304
+ get() {
1305
+ {
1306
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1307
+ return getValue(this, memberName);
1308
+ }
1309
+ const ref = getHostRef(this);
1310
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1311
+ if (!instance) return;
1312
+ return instance[memberName];
1313
+ }
1314
+ },
1315
+ configurable: true,
1316
+ enumerable: true
1317
+ });
1318
+ }
1260
1319
  Object.defineProperty(prototype, memberName, {
1261
- get() {
1262
- return getValue(this, memberName);
1263
- },
1264
1320
  set(newValue) {
1265
- setValue(this, memberName, newValue, cmpMeta);
1266
- },
1267
- configurable: true,
1268
- enumerable: true
1321
+ const ref = getHostRef(this);
1322
+ if (origSetter) {
1323
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1324
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1325
+ newValue = ref.$instanceValues$.get(memberName);
1326
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1327
+ ref.$instanceValues$.set(memberName, currentValue);
1328
+ }
1329
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1330
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1331
+ setValue(this, memberName, newValue, cmpMeta);
1332
+ return;
1333
+ }
1334
+ {
1335
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1336
+ setValue(this, memberName, newValue, cmpMeta);
1337
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1338
+ ref.$onReadyPromise$.then(() => {
1339
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1340
+ ref.$lazyInstance$[memberName] = newValue;
1341
+ }
1342
+ });
1343
+ }
1344
+ return;
1345
+ }
1346
+ const setterSetVal = () => {
1347
+ const currentValue = ref.$lazyInstance$[memberName];
1348
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1349
+ ref.$instanceValues$.set(memberName, currentValue);
1350
+ }
1351
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1352
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1353
+ };
1354
+ if (ref.$lazyInstance$) {
1355
+ setterSetVal();
1356
+ } else {
1357
+ ref.$onReadyPromise$.then(() => setterSetVal());
1358
+ }
1359
+ }
1360
+ }
1269
1361
  });
1270
1362
  }
1271
1363
  });
@@ -1275,7 +1367,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1275
1367
  plt.jmp(() => {
1276
1368
  var _a2;
1277
1369
  const propName = attrNameToPropName.get(attrName);
1278
- if (this.hasOwnProperty(propName)) {
1370
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1279
1371
  newValue = this[propName];
1280
1372
  delete this[propName];
1281
1373
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1295,7 +1387,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1295
1387
  }
1296
1388
  return;
1297
1389
  }
1298
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1390
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1391
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1392
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1393
+ this[propName] = newValue;
1394
+ }
1299
1395
  });
1300
1396
  };
1301
1397
  Cstr.observedAttributes = Array.from(
@@ -1322,9 +1418,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1322
1418
  let Cstr;
1323
1419
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1324
1420
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1325
- const bundleId = cmpMeta.$lazyBundleId$;
1326
- if (bundleId) {
1327
- const CstrImport = loadModule(cmpMeta);
1421
+ {
1422
+ const CstrImport = loadModule(cmpMeta, hostRef);
1328
1423
  if (CstrImport && "then" in CstrImport) {
1329
1424
  const endLoad = uniqueTime();
1330
1425
  Cstr = await CstrImport;
@@ -1346,17 +1441,13 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1346
1441
  try {
1347
1442
  new Cstr(hostRef);
1348
1443
  } catch (e) {
1349
- consoleError(e);
1444
+ consoleError(e, elm);
1350
1445
  }
1351
1446
  {
1352
1447
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1353
1448
  }
1354
1449
  endNewInstance();
1355
- fireConnectedCallback(hostRef.$lazyInstance$);
1356
- } else {
1357
- Cstr = elm.constructor;
1358
- const cmpTag = elm.localName;
1359
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1450
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1360
1451
  }
1361
1452
  if (Cstr && Cstr.style) {
1362
1453
  let style;
@@ -1379,9 +1470,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1379
1470
  schedule();
1380
1471
  }
1381
1472
  };
1382
- var fireConnectedCallback = (instance) => {
1473
+ var fireConnectedCallback = (instance, elm) => {
1383
1474
  {
1384
- safeCall(instance, "connectedCallback");
1475
+ safeCall(instance, "connectedCallback", void 0, elm);
1385
1476
  }
1386
1477
  };
1387
1478
 
@@ -1422,9 +1513,9 @@ var connectedCallback = (elm) => {
1422
1513
  }
1423
1514
  } else {
1424
1515
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1425
- fireConnectedCallback(hostRef.$lazyInstance$);
1516
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1426
1517
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1427
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1518
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1428
1519
  }
1429
1520
  }
1430
1521
  endConnected();
@@ -1437,20 +1528,26 @@ var setContentReference = (elm) => {
1437
1528
  contentRefElm["s-cn"] = true;
1438
1529
  insertBefore(elm, contentRefElm, elm.firstChild);
1439
1530
  };
1440
- var disconnectInstance = (instance) => {
1531
+ var disconnectInstance = (instance, elm) => {
1441
1532
  {
1442
- safeCall(instance, "disconnectedCallback");
1533
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1443
1534
  }
1444
1535
  };
1445
1536
  var disconnectedCallback = async (elm) => {
1446
1537
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1447
1538
  const hostRef = getHostRef(elm);
1448
1539
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1449
- disconnectInstance(hostRef.$lazyInstance$);
1540
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1450
1541
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1451
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1542
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1452
1543
  }
1453
1544
  }
1545
+ if (rootAppliedStyles.has(elm)) {
1546
+ rootAppliedStyles.delete(elm);
1547
+ }
1548
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1549
+ rootAppliedStyles.delete(elm.shadowRoot);
1550
+ }
1454
1551
  };
1455
1552
 
1456
1553
  // src/runtime/bootstrap-lazy.ts
@@ -1527,6 +1624,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1527
1624
  }
1528
1625
  disconnectedCallback() {
1529
1626
  plt.jmp(() => disconnectedCallback(this));
1627
+ plt.raf(() => {
1628
+ var _a3;
1629
+ const hostRef = getHostRef(this);
1630
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1631
+ delete hostRef.$vnode$.$elm$;
1632
+ }
1633
+ });
1530
1634
  }
1531
1635
  componentOnReady() {
1532
1636
  return getHostRef(this).$onReadyPromise$;