@everymatrix/bonus-elevate-levels 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 (23) hide show
  1. package/dist/bonus-elevate-levels/bonus-elevate-levels.esm.js +1 -1
  2. package/dist/bonus-elevate-levels/p-acf9e8e9.entry.js +1 -0
  3. package/dist/bonus-elevate-levels/p-e968fbf0.js +2 -0
  4. package/dist/cjs/bonus-elevate-levels.cjs.js +2 -2
  5. package/dist/cjs/bonus-elevate-levels_5.cjs.entry.js +40 -28
  6. package/dist/cjs/{index-477d45bd.js → index-a3684a30.js} +245 -141
  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-levels/bonus-elevate-levels.js +29 -6
  10. package/dist/collection/components/elevate-level-list/elevate-level-list.js +9 -8
  11. package/dist/collection/components/elevate-level-presentation/elevate-level-presentation.js +3 -4
  12. package/dist/collection/components/elevate-levels-data/elevate-levels-data.js +2 -3
  13. package/dist/esm/bonus-elevate-levels.js +3 -3
  14. package/dist/esm/bonus-elevate-levels_5.entry.js +40 -28
  15. package/dist/esm/{index-e50c1ed9.js → index-e72850a0.js} +245 -141
  16. package/dist/esm/loader.js +2 -2
  17. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.d.ts +2 -0
  18. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.dev.d.ts +2 -0
  19. package/package.json +1 -1
  20. package/dist/bonus-elevate-levels/p-9016df9e.js +0 -2
  21. package/dist/bonus-elevate-levels/p-f071199b.entry.js +0 -1
  22. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.d.ts +0 -2
  23. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.dev.d.ts +0 -2
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'bonus-elevate-levels';
24
- const BUILD = /* bonus-elevate-levels */ { 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: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* bonus-elevate-levels */ { 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: false, 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);
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
83
92
  /* webpackExclude: /\.system\.entry\.js$/ */
84
93
  /* webpackMode: "lazy" */
85
94
  `./${bundleId}.entry.js${""}`
86
- )); }).then((importedModule) => {
87
- {
88
- cmpModules.set(bundleId, importedModule);
95
+ )); }).then(
96
+ (importedModule) => {
97
+ {
98
+ cmpModules.set(bundleId, importedModule);
99
+ }
100
+ return importedModule[exportName];
101
+ },
102
+ (e) => {
103
+ consoleError(e, hostRef.$hostElement$);
89
104
  }
90
- return importedModule[exportName];
91
- }, consoleError);
105
+ );
92
106
  };
93
107
 
94
108
  // src/client/client-style.ts
95
109
  var styles = /* @__PURE__ */ new Map();
110
+ var HYDRATED_STYLE_ID = "sty-id";
96
111
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
97
112
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
98
113
  var win = typeof window !== "undefined" ? window : {};
@@ -166,14 +181,6 @@ var flush = () => {
166
181
  };
167
182
  var nextTick = (cb) => promiseResolve().then(cb);
168
183
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
169
-
170
- // src/utils/constants.ts
171
- var EMPTY_OBJ = {};
172
- var SVG_NS = "http://www.w3.org/2000/svg";
173
- var HTML_NS = "http://www.w3.org/1999/xhtml";
174
-
175
- // src/utils/helpers.ts
176
- var isDef = (v) => v != null;
177
184
  var isComplexType = (o) => {
178
185
  o = typeof o;
179
186
  return o === "object" || o === "function";
@@ -233,6 +240,63 @@ var unwrapErr = (result) => {
233
240
  throw result.value;
234
241
  }
235
242
  };
243
+ var updateFallbackSlotVisibility = (elm) => {
244
+ const childNodes = elm.__childNodes || elm.childNodes;
245
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
246
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
247
+ var _a;
248
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
249
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
250
+ slotNode.hidden = true;
251
+ } else {
252
+ slotNode.hidden = false;
253
+ }
254
+ }
255
+ });
256
+ }
257
+ for (const childNode of childNodes) {
258
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
259
+ updateFallbackSlotVisibility(childNode);
260
+ }
261
+ }
262
+ };
263
+ function getHostSlotNodes(childNodes, hostName, slotName) {
264
+ let i2 = 0;
265
+ let slottedNodes = [];
266
+ let childNode;
267
+ for (; i2 < childNodes.length; i2++) {
268
+ childNode = childNodes[i2];
269
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
270
+ slottedNodes.push(childNode);
271
+ if (typeof slotName !== "undefined") return slottedNodes;
272
+ }
273
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
274
+ }
275
+ return slottedNodes;
276
+ }
277
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
278
+ const childNodes = [];
279
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
280
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
281
+ childNodes.push(node);
282
+ }
283
+ return childNodes;
284
+ };
285
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
286
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
287
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
288
+ return true;
289
+ }
290
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
291
+ return true;
292
+ }
293
+ return false;
294
+ }
295
+ if (nodeToRelocate["s-sn"] === slotName) {
296
+ return true;
297
+ }
298
+ return slotName === "";
299
+ };
236
300
  var createTime = (fnName, tagName = "") => {
237
301
  {
238
302
  return () => {
@@ -384,7 +448,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
384
448
  }
385
449
  if (!appliedStyles.has(scopeId2)) {
386
450
  {
387
- styleElm = doc.createElement("style");
451
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
388
452
  styleElm.innerHTML = style;
389
453
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
390
454
  if (nonce != null) {
@@ -394,7 +458,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
394
458
  if (styleContainerNode.nodeName === "HEAD") {
395
459
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
396
460
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
397
- styleContainerNode.insertBefore(styleElm, referenceNode2);
461
+ styleContainerNode.insertBefore(
462
+ styleElm,
463
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
464
+ );
398
465
  } else if ("host" in styleContainerNode) {
399
466
  if (supportsConstructableStylesheets) {
400
467
  const stylesheet = new CSSStyleSheet();
@@ -444,16 +511,18 @@ var attachStyles = (hostRef) => {
444
511
  endAttachStyles();
445
512
  };
446
513
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
447
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
514
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
448
515
  if (oldValue !== newValue) {
449
516
  let isProp = isMemberInElement(elm, memberName);
450
517
  let ln = memberName.toLowerCase();
451
518
  if (memberName === "class") {
452
519
  const classList = elm.classList;
453
520
  const oldClasses = parseClassList(oldValue);
454
- const newClasses = parseClassList(newValue);
455
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
456
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
521
+ let newClasses = parseClassList(newValue);
522
+ {
523
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
524
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
525
+ }
457
526
  } else if (memberName === "style") {
458
527
  {
459
528
  for (const prop in oldValue) {
@@ -512,7 +581,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
512
581
  elm.setAttribute(memberName, n);
513
582
  }
514
583
  }
515
- } else {
584
+ } else if (elm[memberName] !== newValue) {
516
585
  elm[memberName] = newValue;
517
586
  }
518
587
  } catch (e) {
@@ -534,24 +603,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
534
603
  }
535
604
  };
536
605
  var parseClassListRegex = /\s/;
537
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
606
+ var parseClassList = (value) => {
607
+ if (typeof value === "object" && value && "baseVal" in value) {
608
+ value = value.baseVal;
609
+ }
610
+ if (!value || typeof value !== "string") {
611
+ return [];
612
+ }
613
+ return value.split(parseClassListRegex);
614
+ };
538
615
  var CAPTURE_EVENT_SUFFIX = "Capture";
539
616
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
540
617
 
541
618
  // src/runtime/vdom/update-element.ts
542
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
619
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
543
620
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
544
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
545
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
621
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
622
+ const newVnodeAttrs = newVnode.$attrs$ || {};
546
623
  {
547
624
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
548
625
  if (!(memberName in newVnodeAttrs)) {
549
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
626
+ setAccessor(
627
+ elm,
628
+ memberName,
629
+ oldVnodeAttrs[memberName],
630
+ void 0,
631
+ isSvgMode2,
632
+ newVnode.$flags$);
550
633
  }
551
634
  }
552
635
  }
553
636
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
554
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
637
+ setAccessor(
638
+ elm,
639
+ memberName,
640
+ oldVnodeAttrs[memberName],
641
+ newVnodeAttrs[memberName],
642
+ isSvgMode2,
643
+ newVnode.$flags$);
555
644
  }
556
645
  };
557
646
  function sortedAttrNames(attrNames) {
@@ -563,16 +652,13 @@ function sortedAttrNames(attrNames) {
563
652
  attrNames
564
653
  );
565
654
  }
566
-
567
- // src/runtime/vdom/vdom-render.ts
568
- var scopeId;
569
655
  var contentRef;
570
656
  var hostTagName;
571
657
  var useNativeShadowDom = false;
572
658
  var checkSlotFallbackVisibility = false;
573
659
  var checkSlotRelocate = false;
574
660
  var isSvgMode = false;
575
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
661
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
576
662
  var _a;
577
663
  const newVNode2 = newParentVNode.$children$[childIndex];
578
664
  let i2 = 0;
@@ -582,9 +668,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
582
668
  if (!useNativeShadowDom) {
583
669
  checkSlotRelocate = true;
584
670
  if (newVNode2.$tag$ === "slot") {
585
- if (scopeId) {
586
- parentElm.classList.add(scopeId + "-s");
587
- }
588
671
  newVNode2.$flags$ |= newVNode2.$children$ ? (
589
672
  // slot element has fallback content
590
673
  // still create an element that "mocks" the slot element
@@ -615,14 +698,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
615
698
  {
616
699
  updateElement(null, newVNode2, isSvgMode);
617
700
  }
618
- const rootNode = elm.getRootNode();
619
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
620
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
621
- elm.classList.add(elm["s-si"] = scopeId);
622
- }
623
701
  if (newVNode2.$children$) {
624
702
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
625
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
703
+ childNode = createElm(oldParentVNode, newVNode2, i2);
626
704
  if (childNode) {
627
705
  elm.appendChild(childNode);
628
706
  }
@@ -655,7 +733,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
655
733
  };
656
734
  var putBackInOriginalLocation = (parentElm, recursive) => {
657
735
  plt.$flags$ |= 1 /* isTmpDisconnected */;
658
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
736
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
659
737
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
660
738
  let node = parentElm;
661
739
  while (node = node.nextSibling) {
@@ -667,7 +745,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
667
745
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
668
746
  const childNode = oldSlotChildNodes[i2];
669
747
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
670
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
748
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
671
749
  childNode["s-ol"].remove();
672
750
  childNode["s-ol"] = void 0;
673
751
  childNode["s-sh"] = void 0;
@@ -687,7 +765,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
687
765
  }
688
766
  for (; startIdx <= endIdx; ++startIdx) {
689
767
  if (vnodes[startIdx]) {
690
- childNode = createElm(null, parentVNode, startIdx, parentElm);
768
+ childNode = createElm(null, parentVNode, startIdx);
691
769
  if (childNode) {
692
770
  vnodes[startIdx].$elm$ = childNode;
693
771
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -774,7 +852,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
774
852
  if (idxInOld >= 0) {
775
853
  elmToMove = oldCh[idxInOld];
776
854
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
777
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
855
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
778
856
  } else {
779
857
  patch(elmToMove, newStartVnode, isInitialRender);
780
858
  oldCh[idxInOld] = void 0;
@@ -782,12 +860,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
782
860
  }
783
861
  newStartVnode = newCh[++newStartIdx];
784
862
  } else {
785
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
863
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
786
864
  newStartVnode = newCh[++newStartIdx];
787
865
  }
788
866
  if (node) {
789
867
  {
790
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
868
+ insertBefore(
869
+ referenceNode(oldStartVnode.$elm$).parentNode,
870
+ node,
871
+ referenceNode(oldStartVnode.$elm$)
872
+ );
791
873
  }
792
874
  }
793
875
  }
@@ -808,28 +890,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
808
890
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
809
891
  if (leftVNode.$tag$ === rightVNode.$tag$) {
810
892
  if (leftVNode.$tag$ === "slot") {
811
- if (
812
- // The component gets hydrated and no VDOM has been initialized.
813
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
814
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
815
- // hydration comments to be removed
816
- leftVNode.$elm$.nodeType !== 8
817
- ) {
818
- return false;
819
- }
820
893
  return leftVNode.$name$ === rightVNode.$name$;
821
894
  }
822
895
  if (!isInitialRender) {
823
896
  return leftVNode.$key$ === rightVNode.$key$;
824
897
  }
898
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
899
+ leftVNode.$key$ = rightVNode.$key$;
900
+ }
825
901
  return true;
826
902
  }
827
903
  return false;
828
904
  };
829
- var referenceNode = (node) => {
830
- return node && node["s-ol"] || node;
831
- };
832
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
905
+ var referenceNode = (node) => node && node["s-ol"] || node;
833
906
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
834
907
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
835
908
  const oldChildren = oldVNode.$children$;
@@ -868,41 +941,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
868
941
  elm.data = text;
869
942
  }
870
943
  };
871
- var updateFallbackSlotVisibility = (elm) => {
872
- const childNodes = elm.childNodes;
873
- for (const childNode of childNodes) {
874
- if (childNode.nodeType === 1 /* ElementNode */) {
875
- if (childNode["s-sr"]) {
876
- const slotName = childNode["s-sn"];
877
- childNode.hidden = false;
878
- for (const siblingNode of childNodes) {
879
- if (siblingNode !== childNode) {
880
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
881
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
882
- childNode.hidden = true;
883
- break;
884
- }
885
- } else {
886
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
887
- childNode.hidden = true;
888
- break;
889
- }
890
- }
891
- }
892
- }
893
- }
894
- updateFallbackSlotVisibility(childNode);
895
- }
896
- }
897
- };
898
944
  var relocateNodes = [];
899
945
  var markSlotContentForRelocation = (elm) => {
900
946
  let node;
901
947
  let hostContentNodes;
902
948
  let j;
903
- for (const childNode of elm.childNodes) {
949
+ const children = elm.__childNodes || elm.childNodes;
950
+ for (const childNode of children) {
904
951
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
905
- hostContentNodes = node.parentNode.childNodes;
952
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
906
953
  const slotName = childNode["s-sn"];
907
954
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
908
955
  node = hostContentNodes[j];
@@ -944,21 +991,6 @@ var markSlotContentForRelocation = (elm) => {
944
991
  }
945
992
  }
946
993
  };
947
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
948
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
949
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
950
- return true;
951
- }
952
- if (nodeToRelocate.getAttribute("slot") === slotName) {
953
- return true;
954
- }
955
- return false;
956
- }
957
- if (nodeToRelocate["s-sn"] === slotName) {
958
- return true;
959
- }
960
- return slotName === "";
961
- };
962
994
  var nullifyVNodeRefs = (vNode) => {
963
995
  {
964
996
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -966,8 +998,9 @@ var nullifyVNodeRefs = (vNode) => {
966
998
  }
967
999
  };
968
1000
  var insertBefore = (parent, newNode, reference) => {
969
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
970
- return inserted;
1001
+ {
1002
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1003
+ }
971
1004
  };
972
1005
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
973
1006
  var _a, _b, _c, _d;
@@ -993,9 +1026,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
993
1026
  rootVnode.$flags$ |= 4 /* isHost */;
994
1027
  hostRef.$vnode$ = rootVnode;
995
1028
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
996
- {
997
- scopeId = hostElm["s-sc"];
998
- }
999
1029
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1000
1030
  {
1001
1031
  contentRef = hostElm["s-cr"];
@@ -1024,7 +1054,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1024
1054
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1025
1055
  while (orgLocationNode) {
1026
1056
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1027
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1057
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1028
1058
  refNode = refNode.nextSibling;
1029
1059
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1030
1060
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1037,13 +1067,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1037
1067
  orgLocationNode = orgLocationNode.previousSibling;
1038
1068
  }
1039
1069
  }
1040
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1070
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1071
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1072
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1041
1073
  if (nodeToRelocate !== insertBeforeNode) {
1042
1074
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1043
1075
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1044
1076
  }
1045
1077
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1046
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1078
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1047
1079
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1048
1080
  }
1049
1081
  }
@@ -1071,7 +1103,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1071
1103
  // src/runtime/update-component.ts
1072
1104
  var attachToAncestor = (hostRef, ancestorComponent) => {
1073
1105
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1074
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1106
+ const index = ancestorComponent["s-p"].push(
1107
+ new Promise(
1108
+ (r) => hostRef.$onRenderResolve$ = () => {
1109
+ ancestorComponent["s-p"].splice(index - 1, 1);
1110
+ r();
1111
+ }
1112
+ )
1113
+ );
1075
1114
  }
1076
1115
  };
1077
1116
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1100,16 +1139,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1100
1139
  {
1101
1140
  hostRef.$flags$ |= 256 /* isListenReady */;
1102
1141
  if (hostRef.$queuedListeners$) {
1103
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1142
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1104
1143
  hostRef.$queuedListeners$ = void 0;
1105
1144
  }
1106
1145
  }
1107
1146
  {
1108
- maybePromise = safeCall(instance, "componentWillLoad");
1147
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1109
1148
  }
1110
1149
  }
1111
1150
  {
1112
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
1151
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1113
1152
  }
1114
1153
  endSchedule();
1115
1154
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -1177,7 +1216,7 @@ var postUpdateComponent = (hostRef) => {
1177
1216
  const instance = hostRef.$lazyInstance$ ;
1178
1217
  const ancestorComponent = hostRef.$ancestorComponent$;
1179
1218
  {
1180
- safeCall(instance, "componentDidRender");
1219
+ safeCall(instance, "componentDidRender", void 0, elm);
1181
1220
  }
1182
1221
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1183
1222
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1211,12 +1250,12 @@ var appDidLoad = (who) => {
1211
1250
  }
1212
1251
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1213
1252
  };
1214
- var safeCall = (instance, method, arg) => {
1253
+ var safeCall = (instance, method, arg, elm) => {
1215
1254
  if (instance && instance[method]) {
1216
1255
  try {
1217
1256
  return instance[method](arg);
1218
1257
  } catch (e) {
1219
- consoleError(e);
1258
+ consoleError(e, elm);
1220
1259
  }
1221
1260
  }
1222
1261
  return void 0;
@@ -1275,15 +1314,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1275
1314
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1276
1315
  members.map(([memberName, [memberFlags]]) => {
1277
1316
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1317
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1318
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1319
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1320
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1321
+ Object.defineProperty(prototype, memberName, {
1322
+ get() {
1323
+ {
1324
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1325
+ return getValue(this, memberName);
1326
+ }
1327
+ const ref = getHostRef(this);
1328
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1329
+ if (!instance) return;
1330
+ return instance[memberName];
1331
+ }
1332
+ },
1333
+ configurable: true,
1334
+ enumerable: true
1335
+ });
1336
+ }
1278
1337
  Object.defineProperty(prototype, memberName, {
1279
- get() {
1280
- return getValue(this, memberName);
1281
- },
1282
1338
  set(newValue) {
1283
- setValue(this, memberName, newValue, cmpMeta);
1284
- },
1285
- configurable: true,
1286
- enumerable: true
1339
+ const ref = getHostRef(this);
1340
+ if (origSetter) {
1341
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1342
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1343
+ newValue = ref.$instanceValues$.get(memberName);
1344
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1345
+ ref.$instanceValues$.set(memberName, currentValue);
1346
+ }
1347
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1348
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1349
+ setValue(this, memberName, newValue, cmpMeta);
1350
+ return;
1351
+ }
1352
+ {
1353
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1354
+ setValue(this, memberName, newValue, cmpMeta);
1355
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1356
+ ref.$onReadyPromise$.then(() => {
1357
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1358
+ ref.$lazyInstance$[memberName] = newValue;
1359
+ }
1360
+ });
1361
+ }
1362
+ return;
1363
+ }
1364
+ const setterSetVal = () => {
1365
+ const currentValue = ref.$lazyInstance$[memberName];
1366
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1367
+ ref.$instanceValues$.set(memberName, currentValue);
1368
+ }
1369
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1370
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1371
+ };
1372
+ if (ref.$lazyInstance$) {
1373
+ setterSetVal();
1374
+ } else {
1375
+ ref.$onReadyPromise$.then(() => setterSetVal());
1376
+ }
1377
+ }
1378
+ }
1287
1379
  });
1288
1380
  }
1289
1381
  });
@@ -1293,7 +1385,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1293
1385
  plt.jmp(() => {
1294
1386
  var _a2;
1295
1387
  const propName = attrNameToPropName.get(attrName);
1296
- if (this.hasOwnProperty(propName)) {
1388
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1297
1389
  newValue = this[propName];
1298
1390
  delete this[propName];
1299
1391
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1313,7 +1405,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1313
1405
  }
1314
1406
  return;
1315
1407
  }
1316
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1408
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1409
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1410
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1411
+ this[propName] = newValue;
1412
+ }
1317
1413
  });
1318
1414
  };
1319
1415
  Cstr.observedAttributes = Array.from(
@@ -1340,9 +1436,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1340
1436
  let Cstr;
1341
1437
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1342
1438
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1343
- const bundleId = cmpMeta.$lazyBundleId$;
1344
- if (bundleId) {
1345
- const CstrImport = loadModule(cmpMeta);
1439
+ {
1440
+ const CstrImport = loadModule(cmpMeta, hostRef);
1346
1441
  if (CstrImport && "then" in CstrImport) {
1347
1442
  const endLoad = uniqueTime();
1348
1443
  Cstr = await CstrImport;
@@ -1367,7 +1462,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1367
1462
  try {
1368
1463
  new Cstr(hostRef);
1369
1464
  } catch (e) {
1370
- consoleError(e);
1465
+ consoleError(e, elm);
1371
1466
  }
1372
1467
  {
1373
1468
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1376,10 +1471,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1376
1471
  hostRef.$flags$ |= 128 /* isWatchReady */;
1377
1472
  }
1378
1473
  endNewInstance();
1379
- } else {
1380
- Cstr = elm.constructor;
1381
- const cmpTag = elm.localName;
1382
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1383
1474
  }
1384
1475
  if (Cstr && Cstr.style) {
1385
1476
  let style;
@@ -1402,7 +1493,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1402
1493
  schedule();
1403
1494
  }
1404
1495
  };
1405
- var fireConnectedCallback = (instance) => {
1496
+ var fireConnectedCallback = (instance, elm) => {
1406
1497
  };
1407
1498
 
1408
1499
  // src/runtime/connected-callback.ts
@@ -1456,7 +1547,7 @@ var setContentReference = (elm) => {
1456
1547
  contentRefElm["s-cn"] = true;
1457
1548
  insertBefore(elm, contentRefElm, elm.firstChild);
1458
1549
  };
1459
- var disconnectInstance = (instance) => {
1550
+ var disconnectInstance = (instance, elm) => {
1460
1551
  };
1461
1552
  var disconnectedCallback = async (elm) => {
1462
1553
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1471,6 +1562,12 @@ var disconnectedCallback = async (elm) => {
1471
1562
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1472
1563
  }
1473
1564
  }
1565
+ if (rootAppliedStyles.has(elm)) {
1566
+ rootAppliedStyles.delete(elm);
1567
+ }
1568
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1569
+ rootAppliedStyles.delete(elm.shadowRoot);
1570
+ }
1474
1571
  };
1475
1572
 
1476
1573
  // src/runtime/bootstrap-lazy.ts
@@ -1555,6 +1652,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1555
1652
  }
1556
1653
  disconnectedCallback() {
1557
1654
  plt.jmp(() => disconnectedCallback(this));
1655
+ plt.raf(() => {
1656
+ var _a3;
1657
+ const hostRef = getHostRef(this);
1658
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1659
+ delete hostRef.$vnode$.$elm$;
1660
+ }
1661
+ });
1558
1662
  }
1559
1663
  componentOnReady() {
1560
1664
  return getHostRef(this).$onReadyPromise$;
@@ -1618,7 +1722,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1618
1722
  }
1619
1723
  }
1620
1724
  } catch (e) {
1621
- consoleError(e);
1725
+ consoleError(e, hostRef.$hostElement$);
1622
1726
  }
1623
1727
  };
1624
1728
  var getHostListenerTarget = (elm, flags) => {