@everymatrix/general-styling-wrapper 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 (20) hide show
  1. package/dist/cjs/general-styling-wrapper.cjs.entry.js +13 -5
  2. package/dist/cjs/general-styling-wrapper.cjs.js +2 -2
  3. package/dist/cjs/{index-d32e7de6.js → index-f0e7abd2.js} +234 -126
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.js +21 -5
  7. package/dist/esm/general-styling-wrapper.entry.js +13 -5
  8. package/dist/esm/general-styling-wrapper.js +3 -3
  9. package/dist/esm/{index-1d219aa0.js → index-0db5543a.js} +234 -126
  10. package/dist/esm/loader.js +2 -2
  11. package/dist/general-styling-wrapper/general-styling-wrapper.esm.js +1 -1
  12. package/dist/general-styling-wrapper/p-00b2d409.js +2 -0
  13. package/dist/general-styling-wrapper/p-88c9c348.entry.js +1 -0
  14. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.d.ts +2 -0
  15. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.dev.d.ts +2 -0
  16. package/package.json +1 -1
  17. package/dist/general-styling-wrapper/p-0dd4160b.js +0 -2
  18. package/dist/general-styling-wrapper/p-ac93b3a6.entry.js +0 -1
  19. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.d.ts +0 -2
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.dev.d.ts +0 -2
@@ -1,17 +1,21 @@
1
1
  const NAMESPACE = 'general-styling-wrapper';
2
- const BUILD = /* general-styling-wrapper */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* general-styling-wrapper */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, 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/client/client-host-ref.ts
12
14
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
15
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
16
+ var registerInstance = (lazyInstance, hostRef) => {
17
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
18
+ };
15
19
  var registerHost = (hostElement, cmpMeta) => {
16
20
  const hostRef = {
17
21
  $flags$: 0,
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
24
28
  hostElement["s-p"] = [];
25
29
  hostElement["s-rc"] = [];
26
30
  }
27
- return hostRefs.set(hostElement, hostRef);
31
+ const ref = hostRefs.set(hostElement, hostRef);
32
+ return ref;
28
33
  };
29
34
  var isMemberInElement = (elm, memberName) => memberName in elm;
30
35
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -61,16 +66,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
61
66
  /* webpackExclude: /\.system\.entry\.js$/ */
62
67
  /* webpackMode: "lazy" */
63
68
  `./${bundleId}.entry.js${""}`
64
- ).then((importedModule) => {
65
- {
66
- cmpModules.set(bundleId, importedModule);
69
+ ).then(
70
+ (importedModule) => {
71
+ {
72
+ cmpModules.set(bundleId, importedModule);
73
+ }
74
+ return importedModule[exportName];
75
+ },
76
+ (e) => {
77
+ consoleError(e, hostRef.$hostElement$);
67
78
  }
68
- return importedModule[exportName];
69
- }, consoleError);
79
+ );
70
80
  };
71
81
 
72
82
  // src/client/client-style.ts
73
83
  var styles = /* @__PURE__ */ new Map();
84
+ var HYDRATED_STYLE_ID = "sty-id";
74
85
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
75
86
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
76
87
  var win = typeof window !== "undefined" ? window : {};
@@ -129,12 +140,6 @@ var flush = () => {
129
140
  };
130
141
  var nextTick = (cb) => promiseResolve().then(cb);
131
142
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
132
-
133
- // src/utils/constants.ts
134
- var EMPTY_OBJ = {};
135
-
136
- // src/utils/helpers.ts
137
- var isDef = (v) => v != null;
138
143
  var isComplexType = (o) => {
139
144
  o = typeof o;
140
145
  return o === "object" || o === "function";
@@ -194,6 +199,63 @@ var unwrapErr = (result) => {
194
199
  throw result.value;
195
200
  }
196
201
  };
202
+ var updateFallbackSlotVisibility = (elm) => {
203
+ const childNodes = elm.__childNodes || elm.childNodes;
204
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
205
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
206
+ var _a;
207
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
208
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
209
+ slotNode.hidden = true;
210
+ } else {
211
+ slotNode.hidden = false;
212
+ }
213
+ }
214
+ });
215
+ }
216
+ for (const childNode of childNodes) {
217
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
218
+ updateFallbackSlotVisibility(childNode);
219
+ }
220
+ }
221
+ };
222
+ function getHostSlotNodes(childNodes, hostName, slotName) {
223
+ let i2 = 0;
224
+ let slottedNodes = [];
225
+ let childNode;
226
+ for (; i2 < childNodes.length; i2++) {
227
+ childNode = childNodes[i2];
228
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
229
+ slottedNodes.push(childNode);
230
+ if (typeof slotName !== "undefined") return slottedNodes;
231
+ }
232
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
233
+ }
234
+ return slottedNodes;
235
+ }
236
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
237
+ const childNodes = [];
238
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
239
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
240
+ childNodes.push(node);
241
+ }
242
+ return childNodes;
243
+ };
244
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
245
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
246
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
247
+ return true;
248
+ }
249
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
250
+ return true;
251
+ }
252
+ return false;
253
+ }
254
+ if (nodeToRelocate["s-sn"] === slotName) {
255
+ return true;
256
+ }
257
+ return slotName === "";
258
+ };
197
259
  var createTime = (fnName, tagName = "") => {
198
260
  {
199
261
  return () => {
@@ -327,7 +389,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
327
389
  }
328
390
  if (!appliedStyles.has(scopeId2)) {
329
391
  {
330
- styleElm = doc.createElement("style");
392
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
331
393
  styleElm.innerHTML = style;
332
394
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
333
395
  if (nonce != null) {
@@ -337,7 +399,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
337
399
  if (styleContainerNode.nodeName === "HEAD") {
338
400
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
339
401
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
340
- styleContainerNode.insertBefore(styleElm, referenceNode2);
402
+ styleContainerNode.insertBefore(
403
+ styleElm,
404
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
405
+ );
341
406
  } else if ("host" in styleContainerNode) {
342
407
  if (supportsConstructableStylesheets) {
343
408
  const stylesheet = new CSSStyleSheet();
@@ -382,16 +447,18 @@ var attachStyles = (hostRef) => {
382
447
  endAttachStyles();
383
448
  };
384
449
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
385
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
450
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
386
451
  if (oldValue !== newValue) {
387
452
  let isProp = isMemberInElement(elm, memberName);
388
453
  memberName.toLowerCase();
389
454
  if (memberName === "class") {
390
455
  const classList = elm.classList;
391
456
  const oldClasses = parseClassList(oldValue);
392
- const newClasses = parseClassList(newValue);
393
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
394
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
457
+ let newClasses = parseClassList(newValue);
458
+ {
459
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
460
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
461
+ }
395
462
  } else if (memberName === "key") ; else {
396
463
  const isComplex = isComplexType(newValue);
397
464
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
@@ -407,7 +474,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
407
474
  elm.setAttribute(memberName, n);
408
475
  }
409
476
  }
410
- } else {
477
+ } else if (elm[memberName] !== newValue) {
411
478
  elm[memberName] = newValue;
412
479
  }
413
480
  } catch (e) {
@@ -429,22 +496,42 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
429
496
  }
430
497
  };
431
498
  var parseClassListRegex = /\s/;
432
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
499
+ var parseClassList = (value) => {
500
+ if (typeof value === "object" && value && "baseVal" in value) {
501
+ value = value.baseVal;
502
+ }
503
+ if (!value || typeof value !== "string") {
504
+ return [];
505
+ }
506
+ return value.split(parseClassListRegex);
507
+ };
433
508
 
434
509
  // src/runtime/vdom/update-element.ts
435
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
510
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
436
511
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
437
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
438
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
512
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
513
+ const newVnodeAttrs = newVnode.$attrs$ || {};
439
514
  {
440
515
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
441
516
  if (!(memberName in newVnodeAttrs)) {
442
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
517
+ setAccessor(
518
+ elm,
519
+ memberName,
520
+ oldVnodeAttrs[memberName],
521
+ void 0,
522
+ isSvgMode2,
523
+ newVnode.$flags$);
443
524
  }
444
525
  }
445
526
  }
446
527
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
447
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
528
+ setAccessor(
529
+ elm,
530
+ memberName,
531
+ oldVnodeAttrs[memberName],
532
+ newVnodeAttrs[memberName],
533
+ isSvgMode2,
534
+ newVnode.$flags$);
448
535
  }
449
536
  };
450
537
  function sortedAttrNames(attrNames) {
@@ -456,16 +543,13 @@ function sortedAttrNames(attrNames) {
456
543
  attrNames
457
544
  );
458
545
  }
459
-
460
- // src/runtime/vdom/vdom-render.ts
461
- var scopeId;
462
546
  var contentRef;
463
547
  var hostTagName;
464
548
  var useNativeShadowDom = false;
465
549
  var checkSlotFallbackVisibility = false;
466
550
  var checkSlotRelocate = false;
467
551
  var isSvgMode = false;
468
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
552
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
469
553
  var _a;
470
554
  const newVNode2 = newParentVNode.$children$[childIndex];
471
555
  let i2 = 0;
@@ -496,11 +580,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
496
580
  {
497
581
  updateElement(null, newVNode2, isSvgMode);
498
582
  }
499
- const rootNode = elm.getRootNode();
500
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
501
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
502
- elm.classList.add(elm["s-si"] = scopeId);
503
- }
504
583
  if (newVNode2.$children$) {
505
584
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
506
585
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -529,7 +608,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
529
608
  };
530
609
  var putBackInOriginalLocation = (parentElm, recursive) => {
531
610
  plt.$flags$ |= 1 /* isTmpDisconnected */;
532
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
611
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
533
612
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
534
613
  let node = parentElm;
535
614
  while (node = node.nextSibling) {
@@ -541,7 +620,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
541
620
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
542
621
  const childNode = oldSlotChildNodes[i2];
543
622
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
544
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
623
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
545
624
  childNode["s-ol"].remove();
546
625
  childNode["s-ol"] = void 0;
547
626
  childNode["s-sh"] = void 0;
@@ -657,7 +736,11 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
657
736
  }
658
737
  if (node) {
659
738
  {
660
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
739
+ insertBefore(
740
+ referenceNode(oldStartVnode.$elm$).parentNode,
741
+ node,
742
+ referenceNode(oldStartVnode.$elm$)
743
+ );
661
744
  }
662
745
  }
663
746
  }
@@ -678,28 +761,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
678
761
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
679
762
  if (leftVNode.$tag$ === rightVNode.$tag$) {
680
763
  if (leftVNode.$tag$ === "slot") {
681
- if (
682
- // The component gets hydrated and no VDOM has been initialized.
683
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
684
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
685
- // hydration comments to be removed
686
- leftVNode.$elm$.nodeType !== 8
687
- ) {
688
- return false;
689
- }
690
764
  return leftVNode.$name$ === rightVNode.$name$;
691
765
  }
692
766
  if (!isInitialRender) {
693
767
  return leftVNode.$key$ === rightVNode.$key$;
694
768
  }
769
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
770
+ leftVNode.$key$ = rightVNode.$key$;
771
+ }
695
772
  return true;
696
773
  }
697
774
  return false;
698
775
  };
699
- var referenceNode = (node) => {
700
- return node && node["s-ol"] || node;
701
- };
702
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
776
+ var referenceNode = (node) => node && node["s-ol"] || node;
703
777
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
704
778
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
705
779
  const oldChildren = oldVNode.$children$;
@@ -723,41 +797,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
723
797
  }
724
798
  }
725
799
  };
726
- var updateFallbackSlotVisibility = (elm) => {
727
- const childNodes = elm.childNodes;
728
- for (const childNode of childNodes) {
729
- if (childNode.nodeType === 1 /* ElementNode */) {
730
- if (childNode["s-sr"]) {
731
- const slotName = childNode["s-sn"];
732
- childNode.hidden = false;
733
- for (const siblingNode of childNodes) {
734
- if (siblingNode !== childNode) {
735
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
736
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
737
- childNode.hidden = true;
738
- break;
739
- }
740
- } else {
741
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
742
- childNode.hidden = true;
743
- break;
744
- }
745
- }
746
- }
747
- }
748
- }
749
- updateFallbackSlotVisibility(childNode);
750
- }
751
- }
752
- };
753
800
  var relocateNodes = [];
754
801
  var markSlotContentForRelocation = (elm) => {
755
802
  let node;
756
803
  let hostContentNodes;
757
804
  let j;
758
- for (const childNode of elm.childNodes) {
805
+ const children = elm.__childNodes || elm.childNodes;
806
+ for (const childNode of children) {
759
807
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
760
- hostContentNodes = node.parentNode.childNodes;
808
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
761
809
  const slotName = childNode["s-sn"];
762
810
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
763
811
  node = hostContentNodes[j];
@@ -799,24 +847,10 @@ var markSlotContentForRelocation = (elm) => {
799
847
  }
800
848
  }
801
849
  };
802
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
803
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
804
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
805
- return true;
806
- }
807
- if (nodeToRelocate.getAttribute("slot") === slotName) {
808
- return true;
809
- }
810
- return false;
811
- }
812
- if (nodeToRelocate["s-sn"] === slotName) {
813
- return true;
814
- }
815
- return slotName === "";
816
- };
817
850
  var insertBefore = (parent, newNode, reference) => {
818
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
819
- return inserted;
851
+ {
852
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
853
+ }
820
854
  };
821
855
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
822
856
  var _a, _b, _c, _d;
@@ -863,7 +897,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
863
897
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
864
898
  while (orgLocationNode) {
865
899
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
866
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
900
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
867
901
  refNode = refNode.nextSibling;
868
902
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
869
903
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -876,13 +910,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
876
910
  orgLocationNode = orgLocationNode.previousSibling;
877
911
  }
878
912
  }
879
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
913
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
914
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
915
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
880
916
  if (nodeToRelocate !== insertBeforeNode) {
881
917
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
882
918
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
883
919
  }
884
920
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
885
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
921
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
886
922
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
887
923
  }
888
924
  }
@@ -910,7 +946,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
910
946
  // src/runtime/update-component.ts
911
947
  var attachToAncestor = (hostRef, ancestorComponent) => {
912
948
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
913
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
949
+ const index = ancestorComponent["s-p"].push(
950
+ new Promise(
951
+ (r) => hostRef.$onRenderResolve$ = () => {
952
+ ancestorComponent["s-p"].splice(index - 1, 1);
953
+ r();
954
+ }
955
+ )
956
+ );
914
957
  }
915
958
  };
916
959
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -937,7 +980,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
937
980
  let maybePromise;
938
981
  if (isInitialLoad) {
939
982
  {
940
- maybePromise = safeCall(instance, "componentWillLoad");
983
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
941
984
  }
942
985
  }
943
986
  endSchedule();
@@ -1006,7 +1049,7 @@ var postUpdateComponent = (hostRef) => {
1006
1049
  const instance = hostRef.$lazyInstance$ ;
1007
1050
  const ancestorComponent = hostRef.$ancestorComponent$;
1008
1051
  {
1009
- safeCall(instance, "componentDidRender");
1052
+ safeCall(instance, "componentDidRender", void 0, elm);
1010
1053
  }
1011
1054
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1012
1055
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1040,12 +1083,12 @@ var appDidLoad = (who) => {
1040
1083
  }
1041
1084
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1042
1085
  };
1043
- var safeCall = (instance, method, arg) => {
1086
+ var safeCall = (instance, method, arg, elm) => {
1044
1087
  if (instance && instance[method]) {
1045
1088
  try {
1046
1089
  return instance[method](arg);
1047
1090
  } catch (e) {
1048
- consoleError(e);
1091
+ consoleError(e, elm);
1049
1092
  }
1050
1093
  }
1051
1094
  return void 0;
@@ -1088,15 +1131,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1088
1131
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1089
1132
  members.map(([memberName, [memberFlags]]) => {
1090
1133
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1134
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1135
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1136
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1137
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1138
+ Object.defineProperty(prototype, memberName, {
1139
+ get() {
1140
+ {
1141
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1142
+ return getValue(this, memberName);
1143
+ }
1144
+ const ref = getHostRef(this);
1145
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1146
+ if (!instance) return;
1147
+ return instance[memberName];
1148
+ }
1149
+ },
1150
+ configurable: true,
1151
+ enumerable: true
1152
+ });
1153
+ }
1091
1154
  Object.defineProperty(prototype, memberName, {
1092
- get() {
1093
- return getValue(this, memberName);
1094
- },
1095
1155
  set(newValue) {
1096
- setValue(this, memberName, newValue, cmpMeta);
1097
- },
1098
- configurable: true,
1099
- enumerable: true
1156
+ const ref = getHostRef(this);
1157
+ if (origSetter) {
1158
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1159
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1160
+ newValue = ref.$instanceValues$.get(memberName);
1161
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1162
+ ref.$instanceValues$.set(memberName, currentValue);
1163
+ }
1164
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1165
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1166
+ setValue(this, memberName, newValue, cmpMeta);
1167
+ return;
1168
+ }
1169
+ {
1170
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1171
+ setValue(this, memberName, newValue, cmpMeta);
1172
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1173
+ ref.$onReadyPromise$.then(() => {
1174
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1175
+ ref.$lazyInstance$[memberName] = newValue;
1176
+ }
1177
+ });
1178
+ }
1179
+ return;
1180
+ }
1181
+ const setterSetVal = () => {
1182
+ const currentValue = ref.$lazyInstance$[memberName];
1183
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1184
+ ref.$instanceValues$.set(memberName, currentValue);
1185
+ }
1186
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1187
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1188
+ };
1189
+ if (ref.$lazyInstance$) {
1190
+ setterSetVal();
1191
+ } else {
1192
+ ref.$onReadyPromise$.then(() => setterSetVal());
1193
+ }
1194
+ }
1195
+ }
1100
1196
  });
1101
1197
  }
1102
1198
  });
@@ -1106,7 +1202,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1106
1202
  plt.jmp(() => {
1107
1203
  var _a2;
1108
1204
  const propName = attrNameToPropName.get(attrName);
1109
- if (this.hasOwnProperty(propName)) {
1205
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1110
1206
  newValue = this[propName];
1111
1207
  delete this[propName];
1112
1208
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1126,7 +1222,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1126
1222
  }
1127
1223
  return;
1128
1224
  }
1129
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1225
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1226
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1227
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1228
+ this[propName] = newValue;
1229
+ }
1130
1230
  });
1131
1231
  };
1132
1232
  Cstr.observedAttributes = Array.from(
@@ -1149,9 +1249,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1149
1249
  let Cstr;
1150
1250
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1151
1251
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1152
- const bundleId = cmpMeta.$lazyBundleId$;
1153
- if (bundleId) {
1154
- const CstrImport = loadModule(cmpMeta);
1252
+ {
1253
+ const CstrImport = loadModule(cmpMeta, hostRef);
1155
1254
  if (CstrImport && "then" in CstrImport) {
1156
1255
  const endLoad = uniqueTime();
1157
1256
  Cstr = await CstrImport;
@@ -1173,16 +1272,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1173
1272
  try {
1174
1273
  new Cstr(hostRef);
1175
1274
  } catch (e) {
1176
- consoleError(e);
1275
+ consoleError(e, elm);
1177
1276
  }
1178
1277
  {
1179
1278
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1180
1279
  }
1181
1280
  endNewInstance();
1182
- } else {
1183
- Cstr = elm.constructor;
1184
- const cmpTag = elm.localName;
1185
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1186
1281
  }
1187
1282
  if (Cstr && Cstr.style) {
1188
1283
  let style;
@@ -1205,7 +1300,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1205
1300
  schedule();
1206
1301
  }
1207
1302
  };
1208
- var fireConnectedCallback = (instance) => {
1303
+ var fireConnectedCallback = (instance, elm) => {
1209
1304
  };
1210
1305
 
1211
1306
  // src/runtime/connected-callback.ts
@@ -1258,7 +1353,7 @@ var setContentReference = (elm) => {
1258
1353
  contentRefElm["s-cn"] = true;
1259
1354
  insertBefore(elm, contentRefElm, elm.firstChild);
1260
1355
  };
1261
- var disconnectInstance = (instance) => {
1356
+ var disconnectInstance = (instance, elm) => {
1262
1357
  };
1263
1358
  var disconnectedCallback = async (elm) => {
1264
1359
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1267,6 +1362,12 @@ var disconnectedCallback = async (elm) => {
1267
1362
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1268
1363
  }
1269
1364
  }
1365
+ if (rootAppliedStyles.has(elm)) {
1366
+ rootAppliedStyles.delete(elm);
1367
+ }
1368
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1369
+ rootAppliedStyles.delete(elm.shadowRoot);
1370
+ }
1270
1371
  };
1271
1372
 
1272
1373
  // src/runtime/bootstrap-lazy.ts
@@ -1325,6 +1426,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1325
1426
  }
1326
1427
  disconnectedCallback() {
1327
1428
  plt.jmp(() => disconnectedCallback(this));
1429
+ plt.raf(() => {
1430
+ var _a3;
1431
+ const hostRef = getHostRef(this);
1432
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1433
+ delete hostRef.$vnode$.$elm$;
1434
+ }
1435
+ });
1328
1436
  }
1329
1437
  componentOnReady() {
1330
1438
  return getHostRef(this).$onReadyPromise$;
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-1d219aa0.js';
2
- export { s as setNonce } from './index-1d219aa0.js';
1
+ import { b as bootstrapLazy } from './index-0db5543a.js';
2
+ export { s as setNonce } from './index-0db5543a.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1 +1 @@
1
- import{p as t,b as n}from"./p-0dd4160b.js";export{s as setNonce}from"./p-0dd4160b.js";import{g as r}from"./p-e1255160.js";(()=>{const n=import.meta.url,r={};return""!==n&&(r.resourcesUrl=new URL(".",n).href),t(r)})().then((async t=>(await r(),n([["p-ac93b3a6",[[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],t))));
1
+ import{p as t,b as n}from"./p-00b2d409.js";export{s as setNonce}from"./p-00b2d409.js";import{g as r}from"./p-e1255160.js";(()=>{const n=import.meta.url,r={};return""!==n&&(r.resourcesUrl=new URL(".",n).href),t(r)})().then((async t=>(await r(),n([["p-88c9c348",[[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],t))));