@everymatrix/player-elevate-level 1.52.6 → 1.53.10

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 (27) hide show
  1. package/dist/cjs/bonus-elevate-levels_8.cjs.entry.js +72 -45
  2. package/dist/cjs/{index-7984d0a5.js → index-7564f052.js} +245 -141
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{player-elevate-card-items-7b2739c6.js → player-elevate-card-items-b95a3496.js} +1 -1
  5. package/dist/cjs/player-elevate-card.cjs.entry.js +21 -9
  6. package/dist/cjs/player-elevate-level.cjs.js +2 -2
  7. package/dist/cjs/player-elevate-pointcard.cjs.entry.js +29 -12
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/player-elevate-level/player-elevate-level.js +30 -6
  10. package/dist/esm/bonus-elevate-levels_8.entry.js +72 -45
  11. package/dist/esm/{index-84dc1f3a.js → index-b51bd4e1.js} +245 -141
  12. package/dist/esm/loader.js +2 -2
  13. package/dist/esm/{player-elevate-card-items-44f42400.js → player-elevate-card-items-b70c97e7.js} +1 -1
  14. package/dist/esm/player-elevate-card.entry.js +21 -9
  15. package/dist/esm/player-elevate-level.js +3 -3
  16. package/dist/esm/player-elevate-pointcard.entry.js +29 -12
  17. package/dist/player-elevate-level/p-07a5c101.entry.js +1 -0
  18. package/dist/player-elevate-level/p-27717591.js +2 -0
  19. package/dist/player-elevate-level/p-39b77d79.entry.js +1 -0
  20. package/dist/player-elevate-level/{p-7db7d79d.js → p-9bb64bc8.js} +1 -1
  21. package/dist/player-elevate-level/p-c5fe4eed.entry.js +1 -0
  22. package/dist/player-elevate-level/player-elevate-level.esm.js +1 -1
  23. package/package.json +1 -1
  24. package/dist/player-elevate-level/p-424fb7ca.entry.js +0 -1
  25. package/dist/player-elevate-level/p-694f2995.entry.js +0 -1
  26. package/dist/player-elevate-level/p-91129d4d.js +0 -2
  27. package/dist/player-elevate-level/p-bf99f38c.entry.js +0 -1
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'player-elevate-level';
24
- const BUILD = /* player-elevate-level */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, 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: true };
24
+ const BUILD = /* player-elevate-level */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, 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: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+
35
+ // src/utils/constants.ts
36
+ var SVG_NS = "http://www.w3.org/2000/svg";
37
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
38
+
39
+ // src/client/client-host-ref.ts
34
40
  var hostRefs = /* @__PURE__ */ new WeakMap();
35
41
  var getHostRef = (ref) => hostRefs.get(ref);
36
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
42
+ var registerInstance = (lazyInstance, hostRef) => {
43
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
44
+ };
37
45
  var registerHost = (hostElement, cmpMeta) => {
38
46
  const hostRef = {
39
47
  $flags$: 0,
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
46
54
  hostElement["s-p"] = [];
47
55
  hostElement["s-rc"] = [];
48
56
  }
49
- return hostRefs.set(hostElement, hostRef);
57
+ const ref = hostRefs.set(hostElement, hostRef);
58
+ return ref;
50
59
  };
51
60
  var isMemberInElement = (elm, memberName) => memberName in elm;
52
61
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -91,16 +100,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
91
100
  /* webpackExclude: /\.system\.entry\.js$/ */
92
101
  /* webpackMode: "lazy" */
93
102
  `./${bundleId}.entry.js${""}`
94
- )); }).then((importedModule) => {
95
- {
96
- cmpModules.set(bundleId, importedModule);
103
+ )); }).then(
104
+ (importedModule) => {
105
+ {
106
+ cmpModules.set(bundleId, importedModule);
107
+ }
108
+ return importedModule[exportName];
109
+ },
110
+ (e) => {
111
+ consoleError(e, hostRef.$hostElement$);
97
112
  }
98
- return importedModule[exportName];
99
- }, consoleError);
113
+ );
100
114
  };
101
115
 
102
116
  // src/client/client-style.ts
103
117
  var styles = /* @__PURE__ */ new Map();
118
+ var HYDRATED_STYLE_ID = "sty-id";
104
119
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
105
120
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
106
121
  var win = typeof window !== "undefined" ? window : {};
@@ -180,14 +195,6 @@ var getAssetPath = (path) => {
180
195
  const assetUrl = new URL(path, plt.$resourcesUrl$);
181
196
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
182
197
  };
183
-
184
- // src/utils/constants.ts
185
- var EMPTY_OBJ = {};
186
- var SVG_NS = "http://www.w3.org/2000/svg";
187
- var HTML_NS = "http://www.w3.org/1999/xhtml";
188
-
189
- // src/utils/helpers.ts
190
- var isDef = (v) => v != null;
191
198
  var isComplexType = (o) => {
192
199
  o = typeof o;
193
200
  return o === "object" || o === "function";
@@ -247,6 +254,63 @@ var unwrapErr = (result) => {
247
254
  throw result.value;
248
255
  }
249
256
  };
257
+ var updateFallbackSlotVisibility = (elm) => {
258
+ const childNodes = elm.__childNodes || elm.childNodes;
259
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
260
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
261
+ var _a;
262
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
263
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
264
+ slotNode.hidden = true;
265
+ } else {
266
+ slotNode.hidden = false;
267
+ }
268
+ }
269
+ });
270
+ }
271
+ for (const childNode of childNodes) {
272
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
273
+ updateFallbackSlotVisibility(childNode);
274
+ }
275
+ }
276
+ };
277
+ function getHostSlotNodes(childNodes, hostName, slotName) {
278
+ let i2 = 0;
279
+ let slottedNodes = [];
280
+ let childNode;
281
+ for (; i2 < childNodes.length; i2++) {
282
+ childNode = childNodes[i2];
283
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
284
+ slottedNodes.push(childNode);
285
+ if (typeof slotName !== "undefined") return slottedNodes;
286
+ }
287
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
288
+ }
289
+ return slottedNodes;
290
+ }
291
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
292
+ const childNodes = [];
293
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
294
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
295
+ childNodes.push(node);
296
+ }
297
+ return childNodes;
298
+ };
299
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
300
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
301
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
302
+ return true;
303
+ }
304
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
305
+ return true;
306
+ }
307
+ return false;
308
+ }
309
+ if (nodeToRelocate["s-sn"] === slotName) {
310
+ return true;
311
+ }
312
+ return slotName === "";
313
+ };
250
314
  var createTime = (fnName, tagName = "") => {
251
315
  {
252
316
  return () => {
@@ -435,7 +499,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
435
499
  }
436
500
  if (!appliedStyles.has(scopeId2)) {
437
501
  {
438
- styleElm = doc.createElement("style");
502
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
439
503
  styleElm.innerHTML = style;
440
504
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
441
505
  if (nonce != null) {
@@ -445,7 +509,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
445
509
  if (styleContainerNode.nodeName === "HEAD") {
446
510
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
447
511
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
448
- styleContainerNode.insertBefore(styleElm, referenceNode2);
512
+ styleContainerNode.insertBefore(
513
+ styleElm,
514
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
515
+ );
449
516
  } else if ("host" in styleContainerNode) {
450
517
  if (supportsConstructableStylesheets) {
451
518
  const stylesheet = new CSSStyleSheet();
@@ -495,16 +562,18 @@ var attachStyles = (hostRef) => {
495
562
  endAttachStyles();
496
563
  };
497
564
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
498
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
565
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
499
566
  if (oldValue !== newValue) {
500
567
  let isProp = isMemberInElement(elm, memberName);
501
568
  let ln = memberName.toLowerCase();
502
569
  if (memberName === "class") {
503
570
  const classList = elm.classList;
504
571
  const oldClasses = parseClassList(oldValue);
505
- const newClasses = parseClassList(newValue);
506
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
507
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
572
+ let newClasses = parseClassList(newValue);
573
+ {
574
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
575
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
576
+ }
508
577
  } else if (memberName === "style") {
509
578
  {
510
579
  for (const prop in oldValue) {
@@ -563,7 +632,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
563
632
  elm.setAttribute(memberName, n);
564
633
  }
565
634
  }
566
- } else {
635
+ } else if (elm[memberName] !== newValue) {
567
636
  elm[memberName] = newValue;
568
637
  }
569
638
  } catch (e) {
@@ -585,24 +654,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
585
654
  }
586
655
  };
587
656
  var parseClassListRegex = /\s/;
588
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
657
+ var parseClassList = (value) => {
658
+ if (typeof value === "object" && value && "baseVal" in value) {
659
+ value = value.baseVal;
660
+ }
661
+ if (!value || typeof value !== "string") {
662
+ return [];
663
+ }
664
+ return value.split(parseClassListRegex);
665
+ };
589
666
  var CAPTURE_EVENT_SUFFIX = "Capture";
590
667
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
591
668
 
592
669
  // src/runtime/vdom/update-element.ts
593
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
670
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
594
671
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
595
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
596
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
672
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
673
+ const newVnodeAttrs = newVnode.$attrs$ || {};
597
674
  {
598
675
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
599
676
  if (!(memberName in newVnodeAttrs)) {
600
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
677
+ setAccessor(
678
+ elm,
679
+ memberName,
680
+ oldVnodeAttrs[memberName],
681
+ void 0,
682
+ isSvgMode2,
683
+ newVnode.$flags$);
601
684
  }
602
685
  }
603
686
  }
604
687
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
605
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
688
+ setAccessor(
689
+ elm,
690
+ memberName,
691
+ oldVnodeAttrs[memberName],
692
+ newVnodeAttrs[memberName],
693
+ isSvgMode2,
694
+ newVnode.$flags$);
606
695
  }
607
696
  };
608
697
  function sortedAttrNames(attrNames) {
@@ -614,16 +703,13 @@ function sortedAttrNames(attrNames) {
614
703
  attrNames
615
704
  );
616
705
  }
617
-
618
- // src/runtime/vdom/vdom-render.ts
619
- var scopeId;
620
706
  var contentRef;
621
707
  var hostTagName;
622
708
  var useNativeShadowDom = false;
623
709
  var checkSlotFallbackVisibility = false;
624
710
  var checkSlotRelocate = false;
625
711
  var isSvgMode = false;
626
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
712
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
627
713
  var _a;
628
714
  const newVNode2 = newParentVNode.$children$[childIndex];
629
715
  let i2 = 0;
@@ -633,9 +719,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
633
719
  if (!useNativeShadowDom) {
634
720
  checkSlotRelocate = true;
635
721
  if (newVNode2.$tag$ === "slot") {
636
- if (scopeId) {
637
- parentElm.classList.add(scopeId + "-s");
638
- }
639
722
  newVNode2.$flags$ |= newVNode2.$children$ ? (
640
723
  // slot element has fallback content
641
724
  // still create an element that "mocks" the slot element
@@ -666,14 +749,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
666
749
  {
667
750
  updateElement(null, newVNode2, isSvgMode);
668
751
  }
669
- const rootNode = elm.getRootNode();
670
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
671
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
672
- elm.classList.add(elm["s-si"] = scopeId);
673
- }
674
752
  if (newVNode2.$children$) {
675
753
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
676
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
754
+ childNode = createElm(oldParentVNode, newVNode2, i2);
677
755
  if (childNode) {
678
756
  elm.appendChild(childNode);
679
757
  }
@@ -706,7 +784,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
706
784
  };
707
785
  var putBackInOriginalLocation = (parentElm, recursive) => {
708
786
  plt.$flags$ |= 1 /* isTmpDisconnected */;
709
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
787
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
710
788
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
711
789
  let node = parentElm;
712
790
  while (node = node.nextSibling) {
@@ -718,7 +796,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
718
796
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
719
797
  const childNode = oldSlotChildNodes[i2];
720
798
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
721
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
799
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
722
800
  childNode["s-ol"].remove();
723
801
  childNode["s-ol"] = void 0;
724
802
  childNode["s-sh"] = void 0;
@@ -738,7 +816,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
738
816
  }
739
817
  for (; startIdx <= endIdx; ++startIdx) {
740
818
  if (vnodes[startIdx]) {
741
- childNode = createElm(null, parentVNode, startIdx, parentElm);
819
+ childNode = createElm(null, parentVNode, startIdx);
742
820
  if (childNode) {
743
821
  vnodes[startIdx].$elm$ = childNode;
744
822
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -825,7 +903,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
825
903
  if (idxInOld >= 0) {
826
904
  elmToMove = oldCh[idxInOld];
827
905
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
828
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
906
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
829
907
  } else {
830
908
  patch(elmToMove, newStartVnode, isInitialRender);
831
909
  oldCh[idxInOld] = void 0;
@@ -833,12 +911,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
833
911
  }
834
912
  newStartVnode = newCh[++newStartIdx];
835
913
  } else {
836
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
914
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
837
915
  newStartVnode = newCh[++newStartIdx];
838
916
  }
839
917
  if (node) {
840
918
  {
841
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
919
+ insertBefore(
920
+ referenceNode(oldStartVnode.$elm$).parentNode,
921
+ node,
922
+ referenceNode(oldStartVnode.$elm$)
923
+ );
842
924
  }
843
925
  }
844
926
  }
@@ -859,28 +941,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
859
941
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
860
942
  if (leftVNode.$tag$ === rightVNode.$tag$) {
861
943
  if (leftVNode.$tag$ === "slot") {
862
- if (
863
- // The component gets hydrated and no VDOM has been initialized.
864
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
865
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
866
- // hydration comments to be removed
867
- leftVNode.$elm$.nodeType !== 8
868
- ) {
869
- return false;
870
- }
871
944
  return leftVNode.$name$ === rightVNode.$name$;
872
945
  }
873
946
  if (!isInitialRender) {
874
947
  return leftVNode.$key$ === rightVNode.$key$;
875
948
  }
949
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
950
+ leftVNode.$key$ = rightVNode.$key$;
951
+ }
876
952
  return true;
877
953
  }
878
954
  return false;
879
955
  };
880
- var referenceNode = (node) => {
881
- return node && node["s-ol"] || node;
882
- };
883
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
956
+ var referenceNode = (node) => node && node["s-ol"] || node;
884
957
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
885
958
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
886
959
  const oldChildren = oldVNode.$children$;
@@ -919,41 +992,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
919
992
  elm.data = text;
920
993
  }
921
994
  };
922
- var updateFallbackSlotVisibility = (elm) => {
923
- const childNodes = elm.childNodes;
924
- for (const childNode of childNodes) {
925
- if (childNode.nodeType === 1 /* ElementNode */) {
926
- if (childNode["s-sr"]) {
927
- const slotName = childNode["s-sn"];
928
- childNode.hidden = false;
929
- for (const siblingNode of childNodes) {
930
- if (siblingNode !== childNode) {
931
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
932
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
933
- childNode.hidden = true;
934
- break;
935
- }
936
- } else {
937
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
938
- childNode.hidden = true;
939
- break;
940
- }
941
- }
942
- }
943
- }
944
- }
945
- updateFallbackSlotVisibility(childNode);
946
- }
947
- }
948
- };
949
995
  var relocateNodes = [];
950
996
  var markSlotContentForRelocation = (elm) => {
951
997
  let node;
952
998
  let hostContentNodes;
953
999
  let j;
954
- for (const childNode of elm.childNodes) {
1000
+ const children = elm.__childNodes || elm.childNodes;
1001
+ for (const childNode of children) {
955
1002
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
956
- hostContentNodes = node.parentNode.childNodes;
1003
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
957
1004
  const slotName = childNode["s-sn"];
958
1005
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
959
1006
  node = hostContentNodes[j];
@@ -995,21 +1042,6 @@ var markSlotContentForRelocation = (elm) => {
995
1042
  }
996
1043
  }
997
1044
  };
998
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
999
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1000
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1001
- return true;
1002
- }
1003
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1004
- return true;
1005
- }
1006
- return false;
1007
- }
1008
- if (nodeToRelocate["s-sn"] === slotName) {
1009
- return true;
1010
- }
1011
- return slotName === "";
1012
- };
1013
1045
  var nullifyVNodeRefs = (vNode) => {
1014
1046
  {
1015
1047
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1017,8 +1049,9 @@ var nullifyVNodeRefs = (vNode) => {
1017
1049
  }
1018
1050
  };
1019
1051
  var insertBefore = (parent, newNode, reference) => {
1020
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1021
- return inserted;
1052
+ {
1053
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1054
+ }
1022
1055
  };
1023
1056
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1024
1057
  var _a, _b, _c, _d;
@@ -1044,9 +1077,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1044
1077
  rootVnode.$flags$ |= 4 /* isHost */;
1045
1078
  hostRef.$vnode$ = rootVnode;
1046
1079
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1047
- {
1048
- scopeId = hostElm["s-sc"];
1049
- }
1050
1080
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1051
1081
  {
1052
1082
  contentRef = hostElm["s-cr"];
@@ -1075,7 +1105,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1075
1105
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1076
1106
  while (orgLocationNode) {
1077
1107
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1078
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1108
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1079
1109
  refNode = refNode.nextSibling;
1080
1110
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1081
1111
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1088,13 +1118,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1088
1118
  orgLocationNode = orgLocationNode.previousSibling;
1089
1119
  }
1090
1120
  }
1091
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1121
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1122
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1123
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1092
1124
  if (nodeToRelocate !== insertBeforeNode) {
1093
1125
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1094
1126
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1095
1127
  }
1096
1128
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1097
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1129
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1098
1130
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1099
1131
  }
1100
1132
  }
@@ -1122,7 +1154,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1122
1154
  // src/runtime/update-component.ts
1123
1155
  var attachToAncestor = (hostRef, ancestorComponent) => {
1124
1156
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1125
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1157
+ const index = ancestorComponent["s-p"].push(
1158
+ new Promise(
1159
+ (r) => hostRef.$onRenderResolve$ = () => {
1160
+ ancestorComponent["s-p"].splice(index - 1, 1);
1161
+ r();
1162
+ }
1163
+ )
1164
+ );
1126
1165
  }
1127
1166
  };
1128
1167
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1151,16 +1190,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1151
1190
  {
1152
1191
  hostRef.$flags$ |= 256 /* isListenReady */;
1153
1192
  if (hostRef.$queuedListeners$) {
1154
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1193
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1155
1194
  hostRef.$queuedListeners$ = void 0;
1156
1195
  }
1157
1196
  }
1158
1197
  {
1159
- maybePromise = safeCall(instance, "componentWillLoad");
1198
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1160
1199
  }
1161
1200
  }
1162
1201
  {
1163
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
1202
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1164
1203
  }
1165
1204
  endSchedule();
1166
1205
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -1228,7 +1267,7 @@ var postUpdateComponent = (hostRef) => {
1228
1267
  const instance = hostRef.$lazyInstance$ ;
1229
1268
  const ancestorComponent = hostRef.$ancestorComponent$;
1230
1269
  {
1231
- safeCall(instance, "componentDidRender");
1270
+ safeCall(instance, "componentDidRender", void 0, elm);
1232
1271
  }
1233
1272
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1234
1273
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1262,12 +1301,12 @@ var appDidLoad = (who) => {
1262
1301
  }
1263
1302
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1264
1303
  };
1265
- var safeCall = (instance, method, arg) => {
1304
+ var safeCall = (instance, method, arg, elm) => {
1266
1305
  if (instance && instance[method]) {
1267
1306
  try {
1268
1307
  return instance[method](arg);
1269
1308
  } catch (e) {
1270
- consoleError(e);
1309
+ consoleError(e, elm);
1271
1310
  }
1272
1311
  }
1273
1312
  return void 0;
@@ -1326,15 +1365,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1326
1365
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1327
1366
  members.map(([memberName, [memberFlags]]) => {
1328
1367
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1368
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1369
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1370
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1371
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1372
+ Object.defineProperty(prototype, memberName, {
1373
+ get() {
1374
+ {
1375
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1376
+ return getValue(this, memberName);
1377
+ }
1378
+ const ref = getHostRef(this);
1379
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1380
+ if (!instance) return;
1381
+ return instance[memberName];
1382
+ }
1383
+ },
1384
+ configurable: true,
1385
+ enumerable: true
1386
+ });
1387
+ }
1329
1388
  Object.defineProperty(prototype, memberName, {
1330
- get() {
1331
- return getValue(this, memberName);
1332
- },
1333
1389
  set(newValue) {
1334
- setValue(this, memberName, newValue, cmpMeta);
1335
- },
1336
- configurable: true,
1337
- enumerable: true
1390
+ const ref = getHostRef(this);
1391
+ if (origSetter) {
1392
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1393
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1394
+ newValue = ref.$instanceValues$.get(memberName);
1395
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1396
+ ref.$instanceValues$.set(memberName, currentValue);
1397
+ }
1398
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1399
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1400
+ setValue(this, memberName, newValue, cmpMeta);
1401
+ return;
1402
+ }
1403
+ {
1404
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1405
+ setValue(this, memberName, newValue, cmpMeta);
1406
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1407
+ ref.$onReadyPromise$.then(() => {
1408
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1409
+ ref.$lazyInstance$[memberName] = newValue;
1410
+ }
1411
+ });
1412
+ }
1413
+ return;
1414
+ }
1415
+ const setterSetVal = () => {
1416
+ const currentValue = ref.$lazyInstance$[memberName];
1417
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1418
+ ref.$instanceValues$.set(memberName, currentValue);
1419
+ }
1420
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1421
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1422
+ };
1423
+ if (ref.$lazyInstance$) {
1424
+ setterSetVal();
1425
+ } else {
1426
+ ref.$onReadyPromise$.then(() => setterSetVal());
1427
+ }
1428
+ }
1429
+ }
1338
1430
  });
1339
1431
  }
1340
1432
  });
@@ -1344,7 +1436,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1344
1436
  plt.jmp(() => {
1345
1437
  var _a2;
1346
1438
  const propName = attrNameToPropName.get(attrName);
1347
- if (this.hasOwnProperty(propName)) {
1439
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1348
1440
  newValue = this[propName];
1349
1441
  delete this[propName];
1350
1442
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1364,7 +1456,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1364
1456
  }
1365
1457
  return;
1366
1458
  }
1367
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1459
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1460
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1461
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1462
+ this[propName] = newValue;
1463
+ }
1368
1464
  });
1369
1465
  };
1370
1466
  Cstr.observedAttributes = Array.from(
@@ -1391,9 +1487,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1391
1487
  let Cstr;
1392
1488
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1393
1489
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1394
- const bundleId = cmpMeta.$lazyBundleId$;
1395
- if (bundleId) {
1396
- const CstrImport = loadModule(cmpMeta);
1490
+ {
1491
+ const CstrImport = loadModule(cmpMeta, hostRef);
1397
1492
  if (CstrImport && "then" in CstrImport) {
1398
1493
  const endLoad = uniqueTime();
1399
1494
  Cstr = await CstrImport;
@@ -1418,7 +1513,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1418
1513
  try {
1419
1514
  new Cstr(hostRef);
1420
1515
  } catch (e) {
1421
- consoleError(e);
1516
+ consoleError(e, elm);
1422
1517
  }
1423
1518
  {
1424
1519
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1427,10 +1522,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1427
1522
  hostRef.$flags$ |= 128 /* isWatchReady */;
1428
1523
  }
1429
1524
  endNewInstance();
1430
- } else {
1431
- Cstr = elm.constructor;
1432
- const cmpTag = elm.localName;
1433
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1434
1525
  }
1435
1526
  if (Cstr && Cstr.style) {
1436
1527
  let style;
@@ -1453,7 +1544,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1453
1544
  schedule();
1454
1545
  }
1455
1546
  };
1456
- var fireConnectedCallback = (instance) => {
1547
+ var fireConnectedCallback = (instance, elm) => {
1457
1548
  };
1458
1549
 
1459
1550
  // src/runtime/connected-callback.ts
@@ -1507,7 +1598,7 @@ var setContentReference = (elm) => {
1507
1598
  contentRefElm["s-cn"] = true;
1508
1599
  insertBefore(elm, contentRefElm, elm.firstChild);
1509
1600
  };
1510
- var disconnectInstance = (instance) => {
1601
+ var disconnectInstance = (instance, elm) => {
1511
1602
  };
1512
1603
  var disconnectedCallback = async (elm) => {
1513
1604
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1522,6 +1613,12 @@ var disconnectedCallback = async (elm) => {
1522
1613
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1523
1614
  }
1524
1615
  }
1616
+ if (rootAppliedStyles.has(elm)) {
1617
+ rootAppliedStyles.delete(elm);
1618
+ }
1619
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1620
+ rootAppliedStyles.delete(elm.shadowRoot);
1621
+ }
1525
1622
  };
1526
1623
 
1527
1624
  // src/runtime/bootstrap-lazy.ts
@@ -1606,6 +1703,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1606
1703
  }
1607
1704
  disconnectedCallback() {
1608
1705
  plt.jmp(() => disconnectedCallback(this));
1706
+ plt.raf(() => {
1707
+ var _a3;
1708
+ const hostRef = getHostRef(this);
1709
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1710
+ delete hostRef.$vnode$.$elm$;
1711
+ }
1712
+ });
1609
1713
  }
1610
1714
  componentOnReady() {
1611
1715
  return getHostRef(this).$onReadyPromise$;
@@ -1672,7 +1776,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1672
1776
  }
1673
1777
  }
1674
1778
  } catch (e) {
1675
- consoleError(e);
1779
+ consoleError(e, hostRef.$hostElement$);
1676
1780
  }
1677
1781
  };
1678
1782
  var getHostListenerTarget = (elm, flags) => {