@sellmate/design-system 0.0.6 → 0.0.7

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 (114) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/{index-eJV9DRUN.js → index-D3QUS1Eb.js} +647 -9
  3. package/dist/cjs/index-D3QUS1Eb.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sd-button_4.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
  7. package/dist/cjs/sd-date-box_2.cjs.entry.js +1 -1
  8. package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/sd-date-range-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-pagination_2.cjs.entry.js +2 -2
  11. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  12. package/dist/cjs/sd-select-option.cjs.entry.js +1 -1
  13. package/dist/cjs/sd-select.cjs.entry.js +1 -1
  14. package/dist/cjs/sd-table.cjs.entry.js +1 -1
  15. package/dist/cjs/sd-tag.cjs.entry.js +1 -1
  16. package/dist/cjs/sd-tooltip-portal.cjs.entry.js +1 -1
  17. package/dist/cjs/{tooltipArrow-nBURRjhe.js → tooltipArrow-DKQk16So.js} +3 -3
  18. package/dist/cjs/{tooltipArrow-nBURRjhe.js.map → tooltipArrow-DKQk16So.js.map} +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/components/{p-BMMcpjI2.js → p-BBcRxAHQ.js} +3 -3
  21. package/dist/components/{p-BMMcpjI2.js.map → p-BBcRxAHQ.js.map} +1 -1
  22. package/dist/components/{p-1fnLZFBF.js → p-BJe9kiv9.js} +4 -4
  23. package/dist/components/{p-1fnLZFBF.js.map → p-BJe9kiv9.js.map} +1 -1
  24. package/dist/components/{p-CMr_MjLT.js → p-BKNkY07K.js} +4 -4
  25. package/dist/components/{p-CMr_MjLT.js.map → p-BKNkY07K.js.map} +1 -1
  26. package/dist/components/{p-CCUdSU7s.js → p-CIPoof7_.js} +4 -4
  27. package/dist/components/{p-CCUdSU7s.js.map → p-CIPoof7_.js.map} +1 -1
  28. package/dist/components/{p-bMRGc2ya.js → p-CR_d0Wrj.js} +7 -7
  29. package/dist/components/{p-bMRGc2ya.js.map → p-CR_d0Wrj.js.map} +1 -1
  30. package/dist/components/{p-_COe-BX-.js → p-C_ZLFIzZ.js} +644 -9
  31. package/dist/components/p-C_ZLFIzZ.js.map +1 -0
  32. package/dist/components/{p-7h5r3_Oi.js → p-CcIaxZWu.js} +3 -3
  33. package/dist/components/{p-7h5r3_Oi.js.map → p-CcIaxZWu.js.map} +1 -1
  34. package/dist/components/{p-ZmqQTYnw.js → p-D7GkmGX3.js} +4 -4
  35. package/dist/components/{p-ZmqQTYnw.js.map → p-D7GkmGX3.js.map} +1 -1
  36. package/dist/components/{p-BTFW7ae2.js → p-DeANT-RC.js} +3 -3
  37. package/dist/components/{p-BTFW7ae2.js.map → p-DeANT-RC.js.map} +1 -1
  38. package/dist/components/{p-DDCjT-Wn.js → p-Dk7pK8T6.js} +3 -3
  39. package/dist/components/{p-DDCjT-Wn.js.map → p-Dk7pK8T6.js.map} +1 -1
  40. package/dist/components/{p-BFDQPvRY.js → p-DmNaQwtz.js} +5 -5
  41. package/dist/components/{p-BFDQPvRY.js.map → p-DmNaQwtz.js.map} +1 -1
  42. package/dist/components/{p-BTvDxJlL.js → p-DqOQpFv5.js} +3 -3
  43. package/dist/components/{p-BTvDxJlL.js.map → p-DqOQpFv5.js.map} +1 -1
  44. package/dist/components/sd-button.js +1 -1
  45. package/dist/components/sd-checkbox.js +1 -1
  46. package/dist/components/sd-date-box.js +1 -1
  47. package/dist/components/sd-date-picker.js +5 -5
  48. package/dist/components/sd-date-range-picker.js +5 -5
  49. package/dist/components/sd-guide.js +4 -4
  50. package/dist/components/sd-icon.js +1 -1
  51. package/dist/components/sd-input.js +1 -1
  52. package/dist/components/sd-pagination.js +1 -1
  53. package/dist/components/sd-popover.js +5 -5
  54. package/dist/components/sd-portal.js +1 -1
  55. package/dist/components/sd-select-option.js +1 -1
  56. package/dist/components/sd-select.js +6 -6
  57. package/dist/components/sd-table.js +7 -7
  58. package/dist/components/sd-tag.js +1 -1
  59. package/dist/components/sd-tooltip-portal.js +1 -1
  60. package/dist/components/sd-tooltip.js +1 -1
  61. package/dist/design-system/design-system.esm.js +1 -1
  62. package/dist/design-system/{p-48b56d5a.entry.js → p-0366ba33.entry.js} +2 -2
  63. package/dist/design-system/{p-7d7eed25.entry.js → p-0bdf567e.entry.js} +2 -2
  64. package/dist/design-system/{p-978b5165.entry.js → p-10264e8e.entry.js} +2 -2
  65. package/dist/design-system/{p-7353d0bb.entry.js → p-24f6b072.entry.js} +2 -2
  66. package/dist/design-system/{p-6d7ade66.entry.js → p-329d3532.entry.js} +2 -2
  67. package/dist/design-system/{p-5b9b8671.entry.js → p-764e14ea.entry.js} +2 -2
  68. package/dist/design-system/{p-0f158e53.entry.js → p-8844ec3b.entry.js} +2 -2
  69. package/dist/design-system/{p-4bc173bc.entry.js → p-94f7e066.entry.js} +2 -2
  70. package/dist/design-system/p-B9LQNxjd.js +2 -0
  71. package/dist/design-system/{p-Di8dUbCh.js.map → p-B9LQNxjd.js.map} +1 -1
  72. package/dist/design-system/p-DzM-iWij.js +3 -0
  73. package/dist/design-system/p-DzM-iWij.js.map +1 -0
  74. package/dist/design-system/{p-6f114a26.entry.js → p-a24a9772.entry.js} +2 -2
  75. package/dist/design-system/{p-a8ff23ce.entry.js → p-a9713309.entry.js} +2 -2
  76. package/dist/design-system/{p-21022434.entry.js → p-bc64ffa7.entry.js} +2 -2
  77. package/dist/design-system/{p-1959dd61.entry.js → p-df03331a.entry.js} +2 -2
  78. package/dist/esm/design-system.js +2 -2
  79. package/dist/esm/{index-KauK5hO3.js → index-DzM-iWij.js} +647 -9
  80. package/dist/esm/index-DzM-iWij.js.map +1 -0
  81. package/dist/esm/loader.js +2 -2
  82. package/dist/esm/sd-button_4.entry.js +1 -1
  83. package/dist/esm/sd-checkbox.entry.js +1 -1
  84. package/dist/esm/sd-date-box_2.entry.js +1 -1
  85. package/dist/esm/sd-date-picker.entry.js +1 -1
  86. package/dist/esm/sd-date-range-picker.entry.js +1 -1
  87. package/dist/esm/sd-pagination_2.entry.js +2 -2
  88. package/dist/esm/sd-popover.entry.js +2 -2
  89. package/dist/esm/sd-select-option.entry.js +1 -1
  90. package/dist/esm/sd-select.entry.js +1 -1
  91. package/dist/esm/sd-table.entry.js +1 -1
  92. package/dist/esm/sd-tag.entry.js +1 -1
  93. package/dist/esm/sd-tooltip-portal.entry.js +1 -1
  94. package/dist/esm/{tooltipArrow-BlfIbijp.js → tooltipArrow-Dybd-1up.js} +3 -3
  95. package/dist/esm/{tooltipArrow-BlfIbijp.js.map → tooltipArrow-Dybd-1up.js.map} +1 -1
  96. package/package.json +2 -2
  97. package/dist/cjs/index-eJV9DRUN.js.map +0 -1
  98. package/dist/components/p-_COe-BX-.js.map +0 -1
  99. package/dist/design-system/p-Di8dUbCh.js +0 -2
  100. package/dist/design-system/p-KauK5hO3.js +0 -3
  101. package/dist/design-system/p-KauK5hO3.js.map +0 -1
  102. package/dist/esm/index-KauK5hO3.js.map +0 -1
  103. /package/dist/design-system/{p-48b56d5a.entry.js.map → p-0366ba33.entry.js.map} +0 -0
  104. /package/dist/design-system/{p-7d7eed25.entry.js.map → p-0bdf567e.entry.js.map} +0 -0
  105. /package/dist/design-system/{p-978b5165.entry.js.map → p-10264e8e.entry.js.map} +0 -0
  106. /package/dist/design-system/{p-7353d0bb.entry.js.map → p-24f6b072.entry.js.map} +0 -0
  107. /package/dist/design-system/{p-6d7ade66.entry.js.map → p-329d3532.entry.js.map} +0 -0
  108. /package/dist/design-system/{p-5b9b8671.entry.js.map → p-764e14ea.entry.js.map} +0 -0
  109. /package/dist/design-system/{p-0f158e53.entry.js.map → p-8844ec3b.entry.js.map} +0 -0
  110. /package/dist/design-system/{p-4bc173bc.entry.js.map → p-94f7e066.entry.js.map} +0 -0
  111. /package/dist/design-system/{p-6f114a26.entry.js.map → p-a24a9772.entry.js.map} +0 -0
  112. /package/dist/design-system/{p-a8ff23ce.entry.js.map → p-a9713309.entry.js.map} +0 -0
  113. /package/dist/design-system/{p-21022434.entry.js.map → p-bc64ffa7.entry.js.map} +0 -0
  114. /package/dist/design-system/{p-1959dd61.entry.js.map → p-df03331a.entry.js.map} +0 -0
@@ -16,6 +16,30 @@ var __export = (target, all) => {
16
16
  // src/utils/constants.ts
17
17
  var SVG_NS = "http://www.w3.org/2000/svg";
18
18
  var HTML_NS = "http://www.w3.org/1999/xhtml";
19
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
20
+ PrimitiveType2["Undefined"] = "undefined";
21
+ PrimitiveType2["Null"] = "null";
22
+ PrimitiveType2["String"] = "string";
23
+ PrimitiveType2["Number"] = "number";
24
+ PrimitiveType2["SpecialNumber"] = "number";
25
+ PrimitiveType2["Boolean"] = "boolean";
26
+ PrimitiveType2["BigInt"] = "bigint";
27
+ return PrimitiveType2;
28
+ })(PrimitiveType || {});
29
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
30
+ NonPrimitiveType2["Array"] = "array";
31
+ NonPrimitiveType2["Date"] = "date";
32
+ NonPrimitiveType2["Map"] = "map";
33
+ NonPrimitiveType2["Object"] = "object";
34
+ NonPrimitiveType2["RegularExpression"] = "regexp";
35
+ NonPrimitiveType2["Set"] = "set";
36
+ NonPrimitiveType2["Channel"] = "channel";
37
+ NonPrimitiveType2["Symbol"] = "symbol";
38
+ return NonPrimitiveType2;
39
+ })(NonPrimitiveType || {});
40
+ var TYPE_CONSTANT = "type";
41
+ var VALUE_CONSTANT = "value";
42
+ var SERIALIZED_PREFIX = "serialized:";
19
43
 
20
44
  // src/utils/es2022-rewire-class-members.ts
21
45
  var reWireGetterSetter = (instance, hostRef) => {
@@ -126,6 +150,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
126
150
 
127
151
  // src/client/client-style.ts
128
152
  var styles = /* @__PURE__ */ new Map();
153
+
154
+ // src/runtime/runtime-constants.ts
155
+ var CONTENT_REF_ID = "r";
156
+ var ORG_LOCATION_ID = "o";
157
+ var SLOT_NODE_ID = "s";
158
+ var TEXT_NODE_ID = "t";
159
+ var COMMENT_NODE_ID = "c";
160
+ var HYDRATE_ID = "s-id";
161
+ var HYDRATED_STYLE_ID = "sty-id";
162
+ var HYDRATE_CHILD_ID = "c-id";
129
163
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
130
164
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
131
165
  var XLINK_NS = "http://www.w3.org/1999/xlink";
@@ -220,6 +254,101 @@ var escapeRegExpSpecialCharacters = (text) => {
220
254
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
221
255
  };
222
256
 
257
+ // src/utils/remote-value.ts
258
+ var RemoteValue = class _RemoteValue {
259
+ /**
260
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
261
+ *
262
+ * @param serialized The serialized LocalValue object
263
+ * @returns The original JavaScript value/object
264
+ */
265
+ static fromLocalValue(serialized) {
266
+ const type = serialized[TYPE_CONSTANT];
267
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
268
+ switch (type) {
269
+ case "string" /* String */:
270
+ return value;
271
+ case "boolean" /* Boolean */:
272
+ return value;
273
+ case "bigint" /* BigInt */:
274
+ return BigInt(value);
275
+ case "undefined" /* Undefined */:
276
+ return void 0;
277
+ case "null" /* Null */:
278
+ return null;
279
+ case "number" /* Number */:
280
+ if (value === "NaN") return NaN;
281
+ if (value === "-0") return -0;
282
+ if (value === "Infinity") return Infinity;
283
+ if (value === "-Infinity") return -Infinity;
284
+ return value;
285
+ case "array" /* Array */:
286
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
287
+ case "date" /* Date */:
288
+ return new Date(value);
289
+ case "map" /* Map */:
290
+ const map2 = /* @__PURE__ */ new Map();
291
+ for (const [key, val] of value) {
292
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
293
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
294
+ map2.set(deserializedKey, deserializedValue);
295
+ }
296
+ return map2;
297
+ case "object" /* Object */:
298
+ const obj = {};
299
+ for (const [key, val] of value) {
300
+ obj[key] = _RemoteValue.fromLocalValue(val);
301
+ }
302
+ return obj;
303
+ case "regexp" /* RegularExpression */:
304
+ const { pattern, flags } = value;
305
+ return new RegExp(pattern, flags);
306
+ case "set" /* Set */:
307
+ const set = /* @__PURE__ */ new Set();
308
+ for (const item of value) {
309
+ set.add(_RemoteValue.fromLocalValue(item));
310
+ }
311
+ return set;
312
+ case "symbol" /* Symbol */:
313
+ return Symbol(value);
314
+ default:
315
+ throw new Error(`Unsupported type: ${type}`);
316
+ }
317
+ }
318
+ /**
319
+ * Utility method to deserialize multiple LocalValues at once
320
+ *
321
+ * @param serializedValues Array of serialized LocalValue objects
322
+ * @returns Array of deserialized JavaScript values
323
+ */
324
+ static fromLocalValueArray(serializedValues) {
325
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
326
+ }
327
+ /**
328
+ * Verifies if the given object matches the structure of a serialized LocalValue
329
+ *
330
+ * @param obj Object to verify
331
+ * @returns boolean indicating if the object has LocalValue structure
332
+ */
333
+ static isLocalValueObject(obj) {
334
+ if (typeof obj !== "object" || obj === null) {
335
+ return false;
336
+ }
337
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
338
+ return false;
339
+ }
340
+ const type = obj[TYPE_CONSTANT];
341
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
342
+ if (!hasTypeProperty) {
343
+ return false;
344
+ }
345
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
346
+ return obj.hasOwnProperty(VALUE_CONSTANT);
347
+ }
348
+ return true;
349
+ }
350
+ };
351
+
223
352
  // src/utils/result.ts
224
353
  var result_exports = {};
225
354
  __export(result_exports, {
@@ -269,6 +398,14 @@ var unwrapErr = (result) => {
269
398
  }
270
399
  };
271
400
 
401
+ // src/utils/serialize.ts
402
+ function deserializeProperty(value) {
403
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
404
+ return value;
405
+ }
406
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
407
+ }
408
+
272
409
  // src/utils/style.ts
273
410
  function createStyleSheetIfNeededAndSupported(styles2) {
274
411
  if (!supportsConstructableStylesheets) return void 0;
@@ -359,6 +496,34 @@ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
359
496
  }
360
497
  return slotName === "";
361
498
  };
499
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
500
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
501
+ return;
502
+ }
503
+ const slottedNodeLocation = document.createTextNode("");
504
+ slottedNodeLocation["s-nr"] = newChild;
505
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
506
+ const parent = slotNode["s-cr"].parentNode;
507
+ const appendMethod = internalCall(parent, "appendChild");
508
+ if (typeof position !== "undefined") {
509
+ slottedNodeLocation["s-oo"] = position;
510
+ const childNodes = internalCall(parent, "childNodes");
511
+ const slotRelocateNodes = [slottedNodeLocation];
512
+ childNodes.forEach((n) => {
513
+ if (n["s-nr"]) slotRelocateNodes.push(n);
514
+ });
515
+ slotRelocateNodes.sort((a, b) => {
516
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
517
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
518
+ return 0;
519
+ });
520
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
521
+ } else {
522
+ appendMethod.call(parent, slottedNodeLocation);
523
+ }
524
+ newChild["s-ol"] = slottedNodeLocation;
525
+ newChild["s-sh"] = slotNode["s-hn"];
526
+ };
362
527
  var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
363
528
  function patchSlotNode(node) {
364
529
  if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
@@ -443,7 +608,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
443
608
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
444
609
  }
445
610
  if (!appliedStyles.has(scopeId2)) {
446
- {
611
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
612
+ styleElm.innerHTML = style;
613
+ } else {
447
614
  styleElm = win.document.createElement("style");
448
615
  styleElm.innerHTML = style;
449
616
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
@@ -515,6 +682,17 @@ var attachStyles = (hostRef) => {
515
682
  endAttachStyles();
516
683
  };
517
684
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
685
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
686
+ var hydrateScopedToShadow = () => {
687
+ if (!win.document) {
688
+ return;
689
+ }
690
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
691
+ let i2 = 0;
692
+ for (; i2 < styles2.length; i2++) {
693
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
694
+ }
695
+ };
518
696
  var h = (nodeName, vnodeData, ...children) => {
519
697
  let child = null;
520
698
  let key = null;
@@ -626,6 +804,422 @@ var convertToPrivate = (node) => {
626
804
  vnode.$name$ = node.vname;
627
805
  return vnode;
628
806
  };
807
+
808
+ // src/runtime/client-hydrate.ts
809
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
810
+ var _a, _b;
811
+ const endHydrate = createTime("hydrateClient", tagName);
812
+ const shadowRoot = hostElm.shadowRoot;
813
+ const childRenderNodes = [];
814
+ const slotNodes = [];
815
+ const slottedNodes = [];
816
+ const shadowRootNodes = shadowRoot ? [] : null;
817
+ const vnode = newVNode(tagName, null);
818
+ vnode.$elm$ = hostElm;
819
+ let scopeId2;
820
+ {
821
+ const cmpMeta = hostRef.$cmpMeta$;
822
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
823
+ scopeId2 = hostElm["s-sc"];
824
+ hostElm.classList.add(scopeId2 + "-h");
825
+ } else if (hostElm["s-sc"]) {
826
+ delete hostElm["s-sc"];
827
+ }
828
+ }
829
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
830
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
831
+ }
832
+ hostElm[HYDRATE_ID] = hostId;
833
+ hostElm.removeAttribute(HYDRATE_ID);
834
+ hostRef.$vnode$ = clientHydrate(
835
+ vnode,
836
+ childRenderNodes,
837
+ slotNodes,
838
+ shadowRootNodes,
839
+ hostElm,
840
+ hostElm,
841
+ hostId,
842
+ slottedNodes
843
+ );
844
+ let crIndex = 0;
845
+ const crLength = childRenderNodes.length;
846
+ let childRenderNode;
847
+ for (crIndex; crIndex < crLength; crIndex++) {
848
+ childRenderNode = childRenderNodes[crIndex];
849
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
850
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
851
+ const node = childRenderNode.$elm$;
852
+ if (!shadowRoot) {
853
+ node["s-hn"] = tagName.toUpperCase();
854
+ if (childRenderNode.$tag$ === "slot") {
855
+ node["s-cr"] = hostElm["s-cr"];
856
+ }
857
+ } else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
858
+ const cmpMeta = getHostRef(childRenderNode.$elm$);
859
+ if (cmpMeta) {
860
+ const scopeId3 = getScopeId(
861
+ cmpMeta.$cmpMeta$);
862
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
863
+ if (styleSheet) {
864
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
865
+ }
866
+ }
867
+ }
868
+ if (childRenderNode.$tag$ === "slot") {
869
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
870
+ if (childRenderNode.$children$) {
871
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
872
+ if (!childRenderNode.$elm$.childNodes.length) {
873
+ childRenderNode.$children$.forEach((c) => {
874
+ childRenderNode.$elm$.appendChild(c.$elm$);
875
+ });
876
+ }
877
+ } else {
878
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
879
+ }
880
+ }
881
+ if (orgLocationNode && orgLocationNode.isConnected) {
882
+ if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
883
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
884
+ }
885
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
886
+ if (!shadowRoot) {
887
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
888
+ }
889
+ }
890
+ if (orgLocationNode && !orgLocationNode["s-id"]) {
891
+ plt.$orgLocNodes$.delete(orgLocationId);
892
+ }
893
+ }
894
+ const hosts = [];
895
+ const snLen = slottedNodes.length;
896
+ let snIndex = 0;
897
+ let slotGroup;
898
+ let snGroupIdx;
899
+ let snGroupLen;
900
+ let slottedItem;
901
+ for (snIndex; snIndex < snLen; snIndex++) {
902
+ slotGroup = slottedNodes[snIndex];
903
+ if (!slotGroup || !slotGroup.length) continue;
904
+ snGroupLen = slotGroup.length;
905
+ snGroupIdx = 0;
906
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
907
+ slottedItem = slotGroup[snGroupIdx];
908
+ if (!hosts[slottedItem.hostId]) {
909
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
910
+ }
911
+ if (!hosts[slottedItem.hostId]) continue;
912
+ const hostEle = hosts[slottedItem.hostId];
913
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
914
+ hostEle.appendChild(slottedItem.node);
915
+ }
916
+ if (!hostEle.shadowRoot || !shadowRoot) {
917
+ if (!slottedItem.slot["s-cr"]) {
918
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
919
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
920
+ slottedItem.slot["s-cr"] = hostEle;
921
+ } else {
922
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
923
+ }
924
+ }
925
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
926
+ if (((_b = slottedItem.node.parentElement) == null ? void 0 : _b.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
927
+ slottedItem.node.removeAttribute("slot");
928
+ }
929
+ }
930
+ }
931
+ }
932
+ if (scopeId2 && slotNodes.length) {
933
+ slotNodes.forEach((slot) => {
934
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
935
+ });
936
+ }
937
+ if (shadowRoot) {
938
+ let rnIdex = 0;
939
+ const rnLen = shadowRootNodes.length;
940
+ if (rnLen) {
941
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
942
+ const node = shadowRootNodes[rnIdex];
943
+ if (node) {
944
+ shadowRoot.appendChild(node);
945
+ }
946
+ }
947
+ Array.from(hostElm.childNodes).forEach((node) => {
948
+ if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
949
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
950
+ node.removeAttribute("hidden");
951
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
952
+ node.parentNode.removeChild(node);
953
+ }
954
+ }
955
+ });
956
+ }
957
+ }
958
+ hostRef.$hostElement$ = hostElm;
959
+ endHydrate();
960
+ };
961
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
962
+ let childNodeType;
963
+ let childIdSplt;
964
+ let childVNode;
965
+ let i2;
966
+ const scopeId2 = hostElm["s-sc"];
967
+ if (node.nodeType === 1 /* ElementNode */) {
968
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
969
+ if (childNodeType) {
970
+ childIdSplt = childNodeType.split(".");
971
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
972
+ childVNode = createSimpleVNode({
973
+ $flags$: 0,
974
+ $hostId$: childIdSplt[0],
975
+ $nodeId$: childIdSplt[1],
976
+ $depth$: childIdSplt[2],
977
+ $index$: childIdSplt[3],
978
+ $tag$: node.tagName.toLowerCase(),
979
+ $elm$: node,
980
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
981
+ // won't try to reconcile them. Classes set on the node will be blown away.
982
+ $attrs$: { class: node.className || "" }
983
+ });
984
+ childRenderNodes.push(childVNode);
985
+ node.removeAttribute(HYDRATE_CHILD_ID);
986
+ if (!parentVNode.$children$) {
987
+ parentVNode.$children$ = [];
988
+ }
989
+ if (scopeId2 && childIdSplt[0] === hostId) {
990
+ node["s-si"] = scopeId2;
991
+ childVNode.$attrs$.class += " " + scopeId2;
992
+ }
993
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
994
+ if (typeof slotName === "string") {
995
+ if (childVNode.$tag$ === "slot-fb") {
996
+ addSlot(
997
+ slotName,
998
+ childIdSplt[2],
999
+ childVNode,
1000
+ node,
1001
+ parentVNode,
1002
+ childRenderNodes,
1003
+ slotNodes,
1004
+ shadowRootNodes,
1005
+ slottedNodes
1006
+ );
1007
+ if (scopeId2) {
1008
+ node.classList.add(scopeId2);
1009
+ }
1010
+ }
1011
+ childVNode.$elm$["s-sn"] = slotName;
1012
+ childVNode.$elm$.removeAttribute("s-sn");
1013
+ }
1014
+ if (childVNode.$index$ !== void 0) {
1015
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1016
+ }
1017
+ parentVNode = childVNode;
1018
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1019
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1020
+ }
1021
+ }
1022
+ }
1023
+ if (node.shadowRoot) {
1024
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1025
+ clientHydrate(
1026
+ parentVNode,
1027
+ childRenderNodes,
1028
+ slotNodes,
1029
+ shadowRootNodes,
1030
+ hostElm,
1031
+ node.shadowRoot.childNodes[i2],
1032
+ hostId,
1033
+ slottedNodes
1034
+ );
1035
+ }
1036
+ }
1037
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1038
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1039
+ clientHydrate(
1040
+ parentVNode,
1041
+ childRenderNodes,
1042
+ slotNodes,
1043
+ shadowRootNodes,
1044
+ hostElm,
1045
+ nonShadowNodes[i2],
1046
+ hostId,
1047
+ slottedNodes
1048
+ );
1049
+ }
1050
+ } else if (node.nodeType === 8 /* CommentNode */) {
1051
+ childIdSplt = node.nodeValue.split(".");
1052
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1053
+ childNodeType = childIdSplt[0];
1054
+ childVNode = createSimpleVNode({
1055
+ $hostId$: childIdSplt[1],
1056
+ $nodeId$: childIdSplt[2],
1057
+ $depth$: childIdSplt[3],
1058
+ $index$: childIdSplt[4] || "0",
1059
+ $elm$: node,
1060
+ $attrs$: null,
1061
+ $children$: null,
1062
+ $key$: null,
1063
+ $name$: null,
1064
+ $tag$: null,
1065
+ $text$: null
1066
+ });
1067
+ if (childNodeType === TEXT_NODE_ID) {
1068
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
1069
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1070
+ childVNode.$text$ = childVNode.$elm$.textContent;
1071
+ childRenderNodes.push(childVNode);
1072
+ node.remove();
1073
+ if (hostId === childVNode.$hostId$) {
1074
+ if (!parentVNode.$children$) {
1075
+ parentVNode.$children$ = [];
1076
+ }
1077
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1078
+ }
1079
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1080
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1081
+ }
1082
+ }
1083
+ } else if (childNodeType === COMMENT_NODE_ID) {
1084
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
1085
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1086
+ childRenderNodes.push(childVNode);
1087
+ node.remove();
1088
+ }
1089
+ } else if (childVNode.$hostId$ === hostId) {
1090
+ if (childNodeType === SLOT_NODE_ID) {
1091
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1092
+ addSlot(
1093
+ slotName,
1094
+ childIdSplt[2],
1095
+ childVNode,
1096
+ node,
1097
+ parentVNode,
1098
+ childRenderNodes,
1099
+ slotNodes,
1100
+ shadowRootNodes,
1101
+ slottedNodes
1102
+ );
1103
+ } else if (childNodeType === CONTENT_REF_ID) {
1104
+ if (shadowRootNodes) {
1105
+ node.remove();
1106
+ } else {
1107
+ hostElm["s-cr"] = node;
1108
+ node["s-cn"] = true;
1109
+ }
1110
+ }
1111
+ }
1112
+ }
1113
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1114
+ const vnode = newVNode(null, node.textContent);
1115
+ vnode.$elm$ = node;
1116
+ vnode.$index$ = "0";
1117
+ parentVNode.$children$ = [vnode];
1118
+ } else {
1119
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim() && !node["s-nr"]) {
1120
+ node.remove();
1121
+ }
1122
+ }
1123
+ return parentVNode;
1124
+ };
1125
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1126
+ if (node.nodeType === 1 /* ElementNode */) {
1127
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1128
+ if (componentId) {
1129
+ orgLocNodes.set(componentId, node);
1130
+ }
1131
+ let i2 = 0;
1132
+ if (node.shadowRoot) {
1133
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1134
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1135
+ }
1136
+ }
1137
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1138
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1139
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1140
+ }
1141
+ } else if (node.nodeType === 8 /* CommentNode */) {
1142
+ const childIdSplt = node.nodeValue.split(".");
1143
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1144
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1145
+ node.nodeValue = "";
1146
+ node["s-en"] = childIdSplt[3];
1147
+ }
1148
+ }
1149
+ };
1150
+ var createSimpleVNode = (vnode) => {
1151
+ const defaultVNode = {
1152
+ $flags$: 0,
1153
+ $hostId$: null,
1154
+ $nodeId$: null,
1155
+ $depth$: null,
1156
+ $index$: "0",
1157
+ $elm$: null,
1158
+ $attrs$: null,
1159
+ $children$: null,
1160
+ $key$: null,
1161
+ $name$: null,
1162
+ $tag$: null,
1163
+ $text$: null
1164
+ };
1165
+ return { ...defaultVNode, ...vnode };
1166
+ };
1167
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1168
+ node["s-sr"] = true;
1169
+ childVNode.$name$ = slotName || null;
1170
+ childVNode.$tag$ = "slot";
1171
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1172
+ if (shadowRootNodes && win.document) {
1173
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1174
+ if (childVNode.$name$) {
1175
+ childVNode.$elm$.setAttribute("name", slotName);
1176
+ }
1177
+ if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1178
+ internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1179
+ } else {
1180
+ internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1181
+ }
1182
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1183
+ node.remove();
1184
+ if (childVNode.$depth$ === "0") {
1185
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1186
+ }
1187
+ } else {
1188
+ const slot = childVNode.$elm$;
1189
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1190
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1191
+ patchSlotNode(node);
1192
+ if (shouldMove) {
1193
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1194
+ }
1195
+ }
1196
+ childRenderNodes.push(childVNode);
1197
+ slotNodes.push(childVNode);
1198
+ if (!parentVNode.$children$) {
1199
+ parentVNode.$children$ = [];
1200
+ }
1201
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1202
+ }
1203
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1204
+ var _a, _b;
1205
+ let slottedNode = slotNode.nextSibling;
1206
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1207
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1208
+ do {
1209
+ if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
1210
+ slottedNode["s-sn"] = slotName;
1211
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1212
+ }
1213
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
1214
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1215
+ };
1216
+ var findCorrespondingNode = (node, type) => {
1217
+ let sibling = node;
1218
+ do {
1219
+ sibling = sibling.nextSibling;
1220
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1221
+ return sibling;
1222
+ };
629
1223
  var createSupportsRuleRe = (selector) => {
630
1224
  const safeSelector2 = escapeRegExpSpecialCharacters(selector);
631
1225
  return new RegExp(
@@ -639,6 +1233,10 @@ createSupportsRuleRe("::slotted");
639
1233
  createSupportsRuleRe(":host");
640
1234
  createSupportsRuleRe(":host-context");
641
1235
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1236
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1237
+ propValue = deserializeProperty(propValue);
1238
+ return propValue;
1239
+ }
642
1240
  if (propValue != null && !isComplexType(propValue)) {
643
1241
  if (propType & 4 /* Boolean */) {
644
1242
  {
@@ -689,7 +1287,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
689
1287
  const classList = elm.classList;
690
1288
  const oldClasses = parseClassList(oldValue);
691
1289
  let newClasses = parseClassList(newValue);
692
- {
1290
+ if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
1291
+ const scopeId2 = elm["s-sc"] || elm["s-si"];
1292
+ newClasses.push(scopeId2);
1293
+ oldClasses.forEach((c) => {
1294
+ if (c.startsWith(scopeId2)) newClasses.push(c);
1295
+ });
1296
+ newClasses = [...new Set(newClasses)].filter((c) => c);
1297
+ classList.add(...newClasses);
1298
+ } else {
693
1299
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
694
1300
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
695
1301
  }
@@ -809,7 +1415,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
809
1415
  oldVnodeAttrs[memberName],
810
1416
  void 0,
811
1417
  isSvgMode2,
812
- newVnode.$flags$);
1418
+ newVnode.$flags$,
1419
+ isInitialRender
1420
+ );
813
1421
  }
814
1422
  }
815
1423
  }
@@ -820,7 +1428,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
820
1428
  oldVnodeAttrs[memberName],
821
1429
  newVnodeAttrs[memberName],
822
1430
  isSvgMode2,
823
- newVnode.$flags$);
1431
+ newVnode.$flags$,
1432
+ isInitialRender
1433
+ );
824
1434
  }
825
1435
  };
826
1436
  function sortedAttrNames(attrNames) {
@@ -1105,7 +1715,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1105
1715
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1106
1716
  }
1107
1717
  {
1108
- updateElement(oldVNode, newVNode2, isSvgMode);
1718
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1109
1719
  }
1110
1720
  if (oldChildren !== null && newChildren !== null) {
1111
1721
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1119,7 +1729,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1119
1729
  !isInitialRender && BUILD.updatable && oldChildren !== null
1120
1730
  ) {
1121
1731
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
1122
- } else ;
1732
+ } else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
1733
+ newVNode2.$children$ = oldChildren;
1734
+ }
1123
1735
  if (isSvgMode && tag === "svg") {
1124
1736
  isSvgMode = false;
1125
1737
  }
@@ -1475,7 +2087,13 @@ var postUpdateComponent = (hostRef) => {
1475
2087
  }
1476
2088
  };
1477
2089
  var appDidLoad = (who) => {
2090
+ var _a;
1478
2091
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2092
+ {
2093
+ if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
2094
+ plt.$orgLocNodes$.clear();
2095
+ }
2096
+ }
1479
2097
  };
1480
2098
  var safeCall = (instance, method, arg, elm) => {
1481
2099
  if (instance && instance[method]) {
@@ -1787,7 +2405,21 @@ var connectedCallback = (elm) => {
1787
2405
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1788
2406
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1789
2407
  hostRef.$flags$ |= 1 /* hasConnected */;
2408
+ let hostId;
1790
2409
  {
2410
+ hostId = elm.getAttribute(HYDRATE_ID);
2411
+ if (hostId) {
2412
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2413
+ const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
2414
+ elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2415
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2416
+ const scopeId2 = getScopeId(cmpMeta);
2417
+ elm["s-sc"] = scopeId2;
2418
+ }
2419
+ initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2420
+ }
2421
+ }
2422
+ if (!hostId) {
1791
2423
  if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1792
2424
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
1793
2425
  setContentReference(elm);
@@ -1796,7 +2428,7 @@ var connectedCallback = (elm) => {
1796
2428
  {
1797
2429
  let ancestorComponent = elm;
1798
2430
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1799
- if (ancestorComponent["s-p"]) {
2431
+ if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
1800
2432
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1801
2433
  break;
1802
2434
  }
@@ -1882,6 +2514,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1882
2514
  let isBootstrapping = true;
1883
2515
  Object.assign(plt, options);
1884
2516
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2517
+ {
2518
+ plt.$flags$ |= 2 /* appLoaded */;
2519
+ }
2520
+ {
2521
+ hydrateScopedToShadow();
2522
+ }
1885
2523
  let hasSlotRelocation = false;
1886
2524
  lazyBundles.map((lazyBundle) => {
1887
2525
  lazyBundle[1].map((compactMeta) => {
@@ -2051,6 +2689,6 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
2051
2689
  var setNonce = (nonce) => plt.$nonce$ = nonce;
2052
2690
 
2053
2691
  export { Fragment as F, Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2054
- //# sourceMappingURL=index-KauK5hO3.js.map
2692
+ //# sourceMappingURL=index-DzM-iWij.js.map
2055
2693
 
2056
- //# sourceMappingURL=index-KauK5hO3.js.map
2694
+ //# sourceMappingURL=index-DzM-iWij.js.map