@lmvz-ds/components 0.16.0 → 0.17.1

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 (248) hide show
  1. package/dist/cjs/{icons-BOM23oli.js → Effect-DdYOHaR4.js} +153 -889
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
  3. package/dist/cjs/aria-loader-BRxRUIyi.js +121 -0
  4. package/dist/cjs/{assets-XY-cBmal.js → assets-OvQ-WUwR.js} +2 -5
  5. package/dist/cjs/component-Csg9MtNK.js +140 -0
  6. package/dist/cjs/element-activation-controller-DC_6T0Rt.js +31 -0
  7. package/dist/cjs/icons-EHBLbidD.js +653 -0
  8. package/dist/cjs/{index-ww_DCXU7.js → index-BBqtydE-.js} +426 -431
  9. package/dist/cjs/index-Bp6Dd2i1.js +94 -0
  10. package/dist/cjs/{index-B1Puzu82.js → index-CH-YLRgg.js} +650 -10
  11. package/dist/cjs/index.cjs.js +12 -13
  12. package/dist/cjs/lmvz-action.cjs.entry.js +2 -5
  13. package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
  14. package/dist/cjs/lmvz-card.cjs.entry.js +3 -6
  15. package/dist/cjs/lmvz-chip.cjs.entry.js +2 -5
  16. package/dist/cjs/lmvz-components.cjs.js +2 -5
  17. package/dist/cjs/lmvz-header_2.cjs.entry.js +153 -0
  18. package/dist/cjs/lmvz-icon.cjs.entry.js +87 -0
  19. package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
  20. package/dist/cjs/lmvz-menuitem.cjs.entry.js +36 -0
  21. package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
  22. package/dist/cjs/loader.cjs.js +2 -5
  23. package/dist/cjs/reactive-controller-host-vy1TIIXv.js +189 -0
  24. package/dist/collection/api/ds.constants.js +0 -1
  25. package/dist/collection/api/index.js +0 -1
  26. package/dist/collection/collection-manifest.json +13 -1
  27. package/dist/collection/components/lmvz-action/lmvz-action.js +1 -2
  28. package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
  29. package/dist/collection/components/lmvz-button/lmvz-button.js +1 -2
  30. package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
  31. package/dist/collection/components/lmvz-card/lmvz-card.js +1 -2
  32. package/dist/collection/components/lmvz-chip/lmvz-chip.js +1 -2
  33. package/dist/collection/components/lmvz-header/lmvz-header.js +1 -2
  34. package/dist/collection/components/lmvz-icon/icons.js +0 -1
  35. package/dist/collection/components/lmvz-icon/lmvz-icon.js +1 -2
  36. package/dist/collection/components/lmvz-icon/public.js +0 -1
  37. package/dist/collection/components/lmvz-icon/test/icons.unit.js +0 -1
  38. package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
  39. package/dist/collection/components/lmvz-input/lmvz-input.js +2 -3
  40. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
  41. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -2
  42. package/dist/collection/components/lmvz-select/lmvz-select.css +2 -24
  43. package/dist/collection/components/lmvz-select/lmvz-select.js +1 -2
  44. package/dist/collection/index.js +0 -1
  45. package/dist/collection/integration/header-integration.js +1 -2
  46. package/dist/collection/utils/aria/aria-validation-controller.js +0 -1
  47. package/dist/collection/utils/aria/element-activation-controller.js +0 -1
  48. package/dist/collection/utils/aria/list-keyboard-controller.js +0 -1
  49. package/dist/collection/utils/assets.js +0 -1
  50. package/dist/collection/utils/component.js +0 -1
  51. package/dist/collection/utils/effect.js +0 -1
  52. package/dist/collection/utils/environment.js +0 -1
  53. package/dist/collection/utils/http.js +0 -1
  54. package/dist/collection/utils/http.unit.js +0 -1
  55. package/dist/collection/utils/public.js +0 -1
  56. package/dist/collection/utils/reactive-controller-host.js +0 -1
  57. package/dist/collection/utils/validation/svg.js +0 -1
  58. package/dist/components/index.d.ts +0 -2
  59. package/dist/components/index.js +1 -2
  60. package/dist/components/lmvz-action.js +1 -2
  61. package/dist/components/lmvz-button.js +1 -2
  62. package/dist/components/lmvz-card.js +1 -2
  63. package/dist/components/lmvz-chip.js +1 -2
  64. package/dist/components/lmvz-header.js +1 -2
  65. package/dist/components/lmvz-icon.js +1 -2
  66. package/dist/components/lmvz-input.js +1 -2
  67. package/dist/components/lmvz-menuitem.js +1 -2
  68. package/dist/components/lmvz-select.js +1 -2
  69. package/dist/components/p-BfTCfPZ1.js +2 -3
  70. package/dist/components/p-BsHYIl56.js +1 -2
  71. package/dist/components/p-CKtksB0G.js +1 -0
  72. package/dist/components/p-CN0JX9-m.js +1 -2
  73. package/dist/components/p-CahBdGGN.js +1 -0
  74. package/dist/components/p-DQEkWkMh.js +1 -2
  75. package/dist/components/p-GKEnURpp.js +1 -0
  76. package/dist/components/p-vIq2biqy.js +2 -3
  77. package/dist/esm/{icons-D1lxdRXP.js → Effect-9SROYpxM.js} +91 -854
  78. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  79. package/dist/esm/aria-loader-JxXwTAe5.js +114 -0
  80. package/dist/esm/{assets-BD98wsl7.js → assets-CNHv_WMG.js} +1 -4
  81. package/dist/esm/component-DIrAQ4IB.js +134 -0
  82. package/dist/esm/element-activation-controller-CN0JX9-m.js +29 -0
  83. package/dist/esm/icons-B255FOe4.js +649 -0
  84. package/dist/esm/{index-DoNkkDv1.js → index-BW1YMEA3.js} +1 -6
  85. package/dist/esm/index-BfTCfPZ1.js +92 -0
  86. package/dist/esm/{index-WeqgWisK.js → index-CQb-mBBB.js} +650 -10
  87. package/dist/esm/index.js +5 -7
  88. package/dist/esm/lmvz-action.entry.js +2 -5
  89. package/dist/esm/lmvz-button.entry.js +71 -0
  90. package/dist/esm/lmvz-card.entry.js +3 -6
  91. package/dist/esm/lmvz-chip.entry.js +2 -5
  92. package/dist/esm/lmvz-components.js +3 -6
  93. package/dist/esm/lmvz-header_2.entry.js +150 -0
  94. package/dist/esm/lmvz-icon.entry.js +85 -0
  95. package/dist/esm/lmvz-input.entry.js +181 -0
  96. package/dist/esm/lmvz-menuitem.entry.js +34 -0
  97. package/dist/esm/lmvz-select.entry.js +69 -0
  98. package/dist/esm/loader.js +3 -6
  99. package/dist/esm/reactive-controller-host-OhKYwMvP.js +186 -0
  100. package/dist/lmvz-components/index.esm.js +1 -2
  101. package/dist/lmvz-components/lmvz-components.esm.js +1 -2
  102. package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
  103. package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
  104. package/dist/lmvz-components/p-4530f088.entry.js +1 -0
  105. package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
  106. package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
  107. package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
  108. package/dist/lmvz-components/p-9SROYpxM.js +1 -0
  109. package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
  110. package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
  111. package/dist/lmvz-components/p-CN0JX9-m.js +1 -0
  112. package/dist/lmvz-components/p-CQb-mBBB.js +2 -0
  113. package/dist/lmvz-components/p-Cp76bcGb.js +1 -0
  114. package/dist/lmvz-components/p-Cp7cp10e.js +12 -0
  115. package/dist/lmvz-components/p-DIrAQ4IB.js +1 -0
  116. package/dist/lmvz-components/p-DQuL1Twl.js +1 -2
  117. package/dist/lmvz-components/p-DyO6wO4l.js +1 -0
  118. package/dist/lmvz-components/p-b8926640.entry.js +1 -0
  119. package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
  120. package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
  121. package/dist/lmvz-components/p-i2508Ct1.js +1 -0
  122. package/dist/manifest.json +11 -47
  123. package/dist/stencil.config.base.js +0 -1
  124. package/dist/stencil.config.dev.js +0 -1
  125. package/dist/stencil.config.integration.js +0 -1
  126. package/dist/stencil.config.js +0 -1
  127. package/dist/stencil.config.prod.js +0 -1
  128. package/dist/types/components.d.ts +0 -18
  129. package/hydrate/index.js +11 -11
  130. package/hydrate/index.mjs +11 -11
  131. package/package.json +4 -4
  132. package/readme.md +1 -1
  133. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  134. package/dist/cjs/assets-XY-cBmal.js.map +0 -1
  135. package/dist/cjs/header-integration_7.cjs.entry.js +0 -1024
  136. package/dist/cjs/header-integration_7.cjs.entry.js.map +0 -1
  137. package/dist/cjs/icons-BOM23oli.js.map +0 -1
  138. package/dist/cjs/index-B1Puzu82.js.map +0 -1
  139. package/dist/cjs/index-ww_DCXU7.js.map +0 -1
  140. package/dist/cjs/index.cjs.js.map +0 -1
  141. package/dist/cjs/lmvz-action.cjs.entry.js.map +0 -1
  142. package/dist/cjs/lmvz-card.cjs.entry.js.map +0 -1
  143. package/dist/cjs/lmvz-chip.cjs.entry.js.map +0 -1
  144. package/dist/cjs/lmvz-components.cjs.js.map +0 -1
  145. package/dist/cjs/loader.cjs.js.map +0 -1
  146. package/dist/collection/api/ds.constants.js.map +0 -1
  147. package/dist/collection/api/index.js.map +0 -1
  148. package/dist/collection/components/lmvz-action/lmvz-action.js.map +0 -1
  149. package/dist/collection/components/lmvz-button/lmvz-button.js.map +0 -1
  150. package/dist/collection/components/lmvz-card/lmvz-card.js.map +0 -1
  151. package/dist/collection/components/lmvz-chip/lmvz-chip.js.map +0 -1
  152. package/dist/collection/components/lmvz-header/lmvz-header.js.map +0 -1
  153. package/dist/collection/components/lmvz-icon/icons.js.map +0 -1
  154. package/dist/collection/components/lmvz-icon/lmvz-icon.js.map +0 -1
  155. package/dist/collection/components/lmvz-icon/public.js.map +0 -1
  156. package/dist/collection/components/lmvz-icon/test/icons.unit.js.map +0 -1
  157. package/dist/collection/components/lmvz-input/lmvz-input.js.map +0 -1
  158. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js.map +0 -1
  159. package/dist/collection/components/lmvz-select/lmvz-select.js.map +0 -1
  160. package/dist/collection/index.js.map +0 -1
  161. package/dist/collection/integration/header-integration.js.map +0 -1
  162. package/dist/collection/utils/aria/aria-validation-controller.js.map +0 -1
  163. package/dist/collection/utils/aria/element-activation-controller.js.map +0 -1
  164. package/dist/collection/utils/aria/list-keyboard-controller.js.map +0 -1
  165. package/dist/collection/utils/assets.js.map +0 -1
  166. package/dist/collection/utils/component.js.map +0 -1
  167. package/dist/collection/utils/effect.js.map +0 -1
  168. package/dist/collection/utils/environment.js.map +0 -1
  169. package/dist/collection/utils/http.js.map +0 -1
  170. package/dist/collection/utils/http.unit.js.map +0 -1
  171. package/dist/collection/utils/public.js.map +0 -1
  172. package/dist/collection/utils/reactive-controller-host.js.map +0 -1
  173. package/dist/collection/utils/validation/svg.js.map +0 -1
  174. package/dist/components/header-integration.d.ts +0 -11
  175. package/dist/components/header-integration.js +0 -2
  176. package/dist/components/header-integration.js.map +0 -1
  177. package/dist/components/index.js.map +0 -1
  178. package/dist/components/lmvz-action.js.map +0 -1
  179. package/dist/components/lmvz-button.js.map +0 -1
  180. package/dist/components/lmvz-card.js.map +0 -1
  181. package/dist/components/lmvz-chip.js.map +0 -1
  182. package/dist/components/lmvz-header.js.map +0 -1
  183. package/dist/components/lmvz-icon.js.map +0 -1
  184. package/dist/components/lmvz-input.js.map +0 -1
  185. package/dist/components/lmvz-menuitem.js.map +0 -1
  186. package/dist/components/lmvz-select.js.map +0 -1
  187. package/dist/components/p-B2g3aN-E.js +0 -2
  188. package/dist/components/p-B2g3aN-E.js.map +0 -1
  189. package/dist/components/p-BXdOuZTp.js +0 -2
  190. package/dist/components/p-BXdOuZTp.js.map +0 -1
  191. package/dist/components/p-BfTCfPZ1.js.map +0 -1
  192. package/dist/components/p-BpCjj39Z.js +0 -2
  193. package/dist/components/p-BpCjj39Z.js.map +0 -1
  194. package/dist/components/p-BsHYIl56.js.map +0 -1
  195. package/dist/components/p-C5rqq3bf.js +0 -2
  196. package/dist/components/p-C5rqq3bf.js.map +0 -1
  197. package/dist/components/p-CI0tffvo.js +0 -2
  198. package/dist/components/p-CI0tffvo.js.map +0 -1
  199. package/dist/components/p-CN0JX9-m.js.map +0 -1
  200. package/dist/components/p-ClmDNIy4.js +0 -2
  201. package/dist/components/p-ClmDNIy4.js.map +0 -1
  202. package/dist/components/p-DQEkWkMh.js.map +0 -1
  203. package/dist/components/p-X5fEFT9T.js +0 -2
  204. package/dist/components/p-X5fEFT9T.js.map +0 -1
  205. package/dist/components/p-vIq2biqy.js.map +0 -1
  206. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  207. package/dist/esm/assets-BD98wsl7.js.map +0 -1
  208. package/dist/esm/header-integration_7.entry.js +0 -1016
  209. package/dist/esm/header-integration_7.entry.js.map +0 -1
  210. package/dist/esm/icons-D1lxdRXP.js.map +0 -1
  211. package/dist/esm/index-DoNkkDv1.js.map +0 -1
  212. package/dist/esm/index-WeqgWisK.js.map +0 -1
  213. package/dist/esm/index.js.map +0 -1
  214. package/dist/esm/lmvz-action.entry.js.map +0 -1
  215. package/dist/esm/lmvz-card.entry.js.map +0 -1
  216. package/dist/esm/lmvz-chip.entry.js.map +0 -1
  217. package/dist/esm/lmvz-components.js.map +0 -1
  218. package/dist/esm/loader.js.map +0 -1
  219. package/dist/lmvz-components/index.esm.js.map +0 -1
  220. package/dist/lmvz-components/lmvz-components.esm.js.map +0 -1
  221. package/dist/lmvz-components/p-33485219.entry.js +0 -2
  222. package/dist/lmvz-components/p-33485219.entry.js.map +0 -1
  223. package/dist/lmvz-components/p-76032c32.entry.js +0 -2
  224. package/dist/lmvz-components/p-76032c32.entry.js.map +0 -1
  225. package/dist/lmvz-components/p-7aeec9a8.entry.js +0 -7
  226. package/dist/lmvz-components/p-7aeec9a8.entry.js.map +0 -1
  227. package/dist/lmvz-components/p-84e0a9dd.entry.js +0 -2
  228. package/dist/lmvz-components/p-84e0a9dd.entry.js.map +0 -1
  229. package/dist/lmvz-components/p-CkJb8WVZ.js +0 -2
  230. package/dist/lmvz-components/p-CkJb8WVZ.js.map +0 -1
  231. package/dist/lmvz-components/p-DQuL1Twl.js.map +0 -1
  232. package/dist/lmvz-components/p-WeqgWisK.js +0 -3
  233. package/dist/lmvz-components/p-WeqgWisK.js.map +0 -1
  234. package/dist/lmvz-components/p-Z9X0_ik0.js +0 -2
  235. package/dist/lmvz-components/p-Z9X0_ik0.js.map +0 -1
  236. package/dist/lmvz-components/p-eP0oxQ44.js +0 -13
  237. package/dist/lmvz-components/p-eP0oxQ44.js.map +0 -1
  238. package/dist/stencil.config.base.js.map +0 -1
  239. package/dist/stencil.config.dev.js.map +0 -1
  240. package/dist/stencil.config.integration.js.map +0 -1
  241. package/dist/stencil.config.js.map +0 -1
  242. package/dist/stencil.config.prod.js.map +0 -1
  243. package/dist/types/integration/header-integration.d.ts +0 -5
  244. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.base.d.ts +0 -0
  245. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.d.ts +0 -0
  246. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.dev.d.ts +0 -0
  247. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.integration.d.ts +0 -0
  248. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
@@ -9,6 +9,30 @@ const BUILD = /* lmvz-components */ { hotModuleReplacement: false, hydratedSelec
9
9
 
10
10
  var Build = {
11
11
  isDev: false};
12
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
13
+ PrimitiveType2["Undefined"] = "undefined";
14
+ PrimitiveType2["Null"] = "null";
15
+ PrimitiveType2["String"] = "string";
16
+ PrimitiveType2["Number"] = "number";
17
+ PrimitiveType2["SpecialNumber"] = "number";
18
+ PrimitiveType2["Boolean"] = "boolean";
19
+ PrimitiveType2["BigInt"] = "bigint";
20
+ return PrimitiveType2;
21
+ })(PrimitiveType || {});
22
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
23
+ NonPrimitiveType2["Array"] = "array";
24
+ NonPrimitiveType2["Date"] = "date";
25
+ NonPrimitiveType2["Map"] = "map";
26
+ NonPrimitiveType2["Object"] = "object";
27
+ NonPrimitiveType2["RegularExpression"] = "regexp";
28
+ NonPrimitiveType2["Set"] = "set";
29
+ NonPrimitiveType2["Channel"] = "channel";
30
+ NonPrimitiveType2["Symbol"] = "symbol";
31
+ return NonPrimitiveType2;
32
+ })(NonPrimitiveType || {});
33
+ var TYPE_CONSTANT = "type";
34
+ var VALUE_CONSTANT = "value";
35
+ var SERIALIZED_PREFIX = "serialized:";
12
36
 
13
37
  // src/utils/get-prop-descriptor.ts
14
38
  function getPropertyDescriptor(obj, memberName, getOnly) {
@@ -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";
@@ -292,6 +326,34 @@ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
292
326
  }
293
327
  return slotName === "";
294
328
  };
329
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
330
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
331
+ return;
332
+ }
333
+ const slottedNodeLocation = document.createTextNode("");
334
+ slottedNodeLocation["s-nr"] = newChild;
335
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
336
+ const parent = slotNode["s-cr"].parentNode;
337
+ const appendMethod = internalCall(parent, "appendChild");
338
+ if (typeof position !== "undefined") {
339
+ slottedNodeLocation["s-oo"] = position;
340
+ const childNodes = internalCall(parent, "childNodes");
341
+ const slotRelocateNodes = [slottedNodeLocation];
342
+ childNodes.forEach((n) => {
343
+ if (n["s-nr"]) slotRelocateNodes.push(n);
344
+ });
345
+ slotRelocateNodes.sort((a, b) => {
346
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
347
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
348
+ return 0;
349
+ });
350
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
351
+ } else {
352
+ appendMethod.call(parent, slottedNodeLocation);
353
+ }
354
+ newChild["s-ol"] = slottedNodeLocation;
355
+ newChild["s-sh"] = slotNode["s-hn"];
356
+ };
295
357
  var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
296
358
  function patchSlotNode(node) {
297
359
  if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
@@ -395,7 +457,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
395
457
  if (!appliedStyles) {
396
458
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
397
459
  }
398
- if (!appliedStyles.has(scopeId2)) {
460
+ const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
461
+ if (existingStyleElm) {
462
+ existingStyleElm.textContent = style;
463
+ } else if (!appliedStyles.has(scopeId2)) {
399
464
  styleElm = win.document.createElement("style");
400
465
  styleElm.textContent = style;
401
466
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
@@ -464,6 +529,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
464
529
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
465
530
  }
466
531
  appliedStyles.add(scopeId2);
532
+ if ("host" in styleContainerNode) {
533
+ const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
534
+ if (ssrStyleElm) {
535
+ writeTask(() => ssrStyleElm.remove());
536
+ }
537
+ }
467
538
  }
468
539
  }
469
540
  }
@@ -484,6 +555,17 @@ var attachStyles = (hostRef) => {
484
555
  endAttachStyles();
485
556
  };
486
557
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
558
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
559
+ var hydrateScopedToShadow = () => {
560
+ if (!win.document) {
561
+ return;
562
+ }
563
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
564
+ let i2 = 0;
565
+ for (; i2 < styles2.length; i2++) {
566
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
567
+ }
568
+ };
487
569
 
488
570
  // src/utils/helpers.ts
489
571
  var isDef = (v) => v != null && v !== void 0;
@@ -572,8 +654,529 @@ var newVNode = (tag, text) => {
572
654
  var Host = {};
573
655
  var isHost = (node) => node && node.$tag$ === Host;
574
656
 
657
+ // src/runtime/client-hydrate.ts
658
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
659
+ var _a, _b, _c, _d;
660
+ const endHydrate = createTime("hydrateClient", tagName);
661
+ const shadowRoot = hostElm.shadowRoot;
662
+ const childRenderNodes = [];
663
+ const slotNodes = [];
664
+ const slottedNodes = [];
665
+ const shadowRootNodes = shadowRoot ? [] : null;
666
+ const vnode = newVNode(tagName, null);
667
+ vnode.$elm$ = hostElm;
668
+ let scopeId2;
669
+ {
670
+ const cmpMeta = hostRef.$cmpMeta$;
671
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
672
+ scopeId2 = hostElm["s-sc"];
673
+ hostElm.classList.add(scopeId2 + "-h");
674
+ } else if (hostElm["s-sc"]) {
675
+ delete hostElm["s-sc"];
676
+ }
677
+ }
678
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
679
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
680
+ }
681
+ hostElm[HYDRATE_ID] = hostId;
682
+ hostElm.removeAttribute(HYDRATE_ID);
683
+ hostRef.$vnode$ = clientHydrate(
684
+ vnode,
685
+ childRenderNodes,
686
+ slotNodes,
687
+ shadowRootNodes,
688
+ hostElm,
689
+ hostElm,
690
+ hostId,
691
+ slottedNodes
692
+ );
693
+ let crIndex = 0;
694
+ const crLength = childRenderNodes.length;
695
+ let childRenderNode;
696
+ for (crIndex; crIndex < crLength; crIndex++) {
697
+ childRenderNode = childRenderNodes[crIndex];
698
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
699
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
700
+ const node = childRenderNode.$elm$;
701
+ if (!shadowRoot) {
702
+ node["s-hn"] = transformTag(tagName).toUpperCase();
703
+ if (childRenderNode.$tag$ === "slot") {
704
+ node["s-cr"] = hostElm["s-cr"];
705
+ }
706
+ } else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
707
+ const cmpMeta = getHostRef(childRenderNode.$elm$);
708
+ if (cmpMeta) {
709
+ const scopeId3 = getScopeId(
710
+ cmpMeta.$cmpMeta$);
711
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
712
+ if (styleSheet) {
713
+ shadowRootNodes.unshift(styleSheet.cloneNode(true));
714
+ }
715
+ }
716
+ }
717
+ if (childRenderNode.$tag$ === "slot") {
718
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
719
+ if (childRenderNode.$children$) {
720
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
721
+ if (!childRenderNode.$elm$.childNodes.length) {
722
+ childRenderNode.$children$.forEach((c) => {
723
+ childRenderNode.$elm$.appendChild(c.$elm$);
724
+ });
725
+ }
726
+ } else {
727
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
728
+ }
729
+ }
730
+ if (orgLocationNode && orgLocationNode.isConnected) {
731
+ if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
732
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
733
+ }
734
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
735
+ if (!shadowRoot) {
736
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
737
+ }
738
+ }
739
+ if (orgLocationNode && !orgLocationNode["s-id"]) {
740
+ plt.$orgLocNodes$.delete(orgLocationId);
741
+ }
742
+ }
743
+ const hosts = [];
744
+ const snLen = slottedNodes.length;
745
+ let snIndex = 0;
746
+ let slotGroup;
747
+ let snGroupIdx;
748
+ let snGroupLen;
749
+ let slottedItem;
750
+ let currentPos = 0;
751
+ for (snIndex; snIndex < snLen; snIndex++) {
752
+ slotGroup = slottedNodes[snIndex];
753
+ if (!slotGroup || !slotGroup.length) continue;
754
+ snGroupLen = slotGroup.length;
755
+ snGroupIdx = 0;
756
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
757
+ slottedItem = slotGroup[snGroupIdx];
758
+ if (!hosts[slottedItem.hostId]) {
759
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
760
+ }
761
+ if (!hosts[slottedItem.hostId]) continue;
762
+ const hostEle = hosts[slottedItem.hostId];
763
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
764
+ hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
765
+ }
766
+ if (!hostEle.shadowRoot || !shadowRoot) {
767
+ if (!slottedItem.slot["s-cr"]) {
768
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
769
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
770
+ slottedItem.slot["s-cr"] = hostEle;
771
+ } else {
772
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
773
+ }
774
+ }
775
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
776
+ if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
777
+ slottedItem.node.removeAttribute("slot");
778
+ }
779
+ }
780
+ currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
781
+ }
782
+ }
783
+ if (scopeId2 && slotNodes.length) {
784
+ slotNodes.forEach((slot) => {
785
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
786
+ });
787
+ }
788
+ if (shadowRoot && !shadowRoot.childNodes.length) {
789
+ let rnIdex = 0;
790
+ const rnLen = shadowRootNodes.length;
791
+ if (rnLen) {
792
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
793
+ const node = shadowRootNodes[rnIdex];
794
+ if (node) {
795
+ shadowRoot.appendChild(node);
796
+ }
797
+ }
798
+ Array.from(hostElm.childNodes).forEach((node) => {
799
+ if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
800
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
801
+ node.removeAttribute("hidden");
802
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
803
+ node.parentNode.removeChild(node);
804
+ }
805
+ }
806
+ });
807
+ }
808
+ }
809
+ hostRef.$hostElement$ = hostElm;
810
+ endHydrate();
811
+ };
812
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
813
+ let childNodeType;
814
+ let childIdSplt;
815
+ let childVNode;
816
+ let i2;
817
+ const scopeId2 = hostElm["s-sc"];
818
+ if (node.nodeType === 1 /* ElementNode */) {
819
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
820
+ if (childNodeType) {
821
+ childIdSplt = childNodeType.split(".");
822
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
823
+ childVNode = createSimpleVNode({
824
+ $flags$: 0,
825
+ $hostId$: childIdSplt[0],
826
+ $nodeId$: childIdSplt[1],
827
+ $depth$: childIdSplt[2],
828
+ $index$: childIdSplt[3],
829
+ $tag$: node.tagName.toLowerCase(),
830
+ $elm$: node,
831
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
832
+ // won't try to reconcile them. Classes set on the node will be blown away.
833
+ $attrs$: { class: node.className || "" }
834
+ });
835
+ childRenderNodes.push(childVNode);
836
+ node.removeAttribute(HYDRATE_CHILD_ID);
837
+ if (!parentVNode.$children$) {
838
+ parentVNode.$children$ = [];
839
+ }
840
+ if (scopeId2 && childIdSplt[0] === hostId) {
841
+ node["s-si"] = scopeId2;
842
+ childVNode.$attrs$.class += " " + scopeId2;
843
+ }
844
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
845
+ if (typeof slotName === "string") {
846
+ if (childVNode.$tag$ === "slot-fb") {
847
+ addSlot(
848
+ slotName,
849
+ childIdSplt[2],
850
+ childVNode,
851
+ node,
852
+ parentVNode,
853
+ childRenderNodes,
854
+ slotNodes,
855
+ shadowRootNodes,
856
+ slottedNodes
857
+ );
858
+ if (scopeId2) {
859
+ node.classList.add(scopeId2);
860
+ }
861
+ }
862
+ childVNode.$elm$["s-sn"] = slotName;
863
+ childVNode.$elm$.removeAttribute("s-sn");
864
+ }
865
+ if (childVNode.$index$ !== void 0) {
866
+ parentVNode.$children$[childVNode.$index$] = childVNode;
867
+ }
868
+ parentVNode = childVNode;
869
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
870
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
871
+ }
872
+ }
873
+ }
874
+ if (node.shadowRoot) {
875
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
876
+ clientHydrate(
877
+ parentVNode,
878
+ childRenderNodes,
879
+ slotNodes,
880
+ shadowRootNodes,
881
+ hostElm,
882
+ node.shadowRoot.childNodes[i2],
883
+ hostId,
884
+ slottedNodes
885
+ );
886
+ }
887
+ }
888
+ const nonShadowNodes = node.__childNodes || node.childNodes;
889
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
890
+ clientHydrate(
891
+ parentVNode,
892
+ childRenderNodes,
893
+ slotNodes,
894
+ shadowRootNodes,
895
+ hostElm,
896
+ nonShadowNodes[i2],
897
+ hostId,
898
+ slottedNodes
899
+ );
900
+ }
901
+ } else if (node.nodeType === 8 /* CommentNode */) {
902
+ childIdSplt = node.nodeValue.split(".");
903
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
904
+ childNodeType = childIdSplt[0];
905
+ childVNode = createSimpleVNode({
906
+ $hostId$: childIdSplt[1],
907
+ $nodeId$: childIdSplt[2],
908
+ $depth$: childIdSplt[3],
909
+ $index$: childIdSplt[4] || "0",
910
+ $elm$: node,
911
+ $attrs$: null,
912
+ $children$: null,
913
+ $key$: null,
914
+ $name$: null,
915
+ $tag$: null,
916
+ $text$: null
917
+ });
918
+ if (childNodeType === TEXT_NODE_ID) {
919
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
920
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
921
+ childVNode.$text$ = childVNode.$elm$.textContent;
922
+ childRenderNodes.push(childVNode);
923
+ node.remove();
924
+ if (hostId === childVNode.$hostId$) {
925
+ if (!parentVNode.$children$) {
926
+ parentVNode.$children$ = [];
927
+ }
928
+ parentVNode.$children$[childVNode.$index$] = childVNode;
929
+ }
930
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
931
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
932
+ }
933
+ }
934
+ } else if (childNodeType === COMMENT_NODE_ID) {
935
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
936
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
937
+ childRenderNodes.push(childVNode);
938
+ node.remove();
939
+ }
940
+ } else if (childVNode.$hostId$ === hostId) {
941
+ if (childNodeType === SLOT_NODE_ID) {
942
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
943
+ addSlot(
944
+ slotName,
945
+ childIdSplt[2],
946
+ childVNode,
947
+ node,
948
+ parentVNode,
949
+ childRenderNodes,
950
+ slotNodes,
951
+ shadowRootNodes,
952
+ slottedNodes
953
+ );
954
+ } else if (childNodeType === CONTENT_REF_ID) {
955
+ if (shadowRootNodes) {
956
+ node.remove();
957
+ } else {
958
+ hostElm["s-cr"] = node;
959
+ node["s-cn"] = true;
960
+ }
961
+ }
962
+ }
963
+ }
964
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
965
+ const vnode = newVNode(null, node.textContent);
966
+ vnode.$elm$ = node;
967
+ vnode.$index$ = "0";
968
+ parentVNode.$children$ = [vnode];
969
+ }
970
+ return parentVNode;
971
+ };
972
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
973
+ if (node.nodeType === 1 /* ElementNode */) {
974
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
975
+ if (componentId) {
976
+ orgLocNodes.set(componentId, node);
977
+ }
978
+ let i2 = 0;
979
+ if (node.shadowRoot) {
980
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
981
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
982
+ }
983
+ }
984
+ const nonShadowNodes = node.__childNodes || node.childNodes;
985
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
986
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
987
+ }
988
+ } else if (node.nodeType === 8 /* CommentNode */) {
989
+ const childIdSplt = node.nodeValue.split(".");
990
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
991
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
992
+ node.nodeValue = "";
993
+ node["s-en"] = childIdSplt[3];
994
+ }
995
+ }
996
+ };
997
+ var createSimpleVNode = (vnode) => {
998
+ const defaultVNode = {
999
+ $flags$: 0,
1000
+ $hostId$: null,
1001
+ $nodeId$: null,
1002
+ $depth$: null,
1003
+ $index$: "0",
1004
+ $elm$: null,
1005
+ $attrs$: null,
1006
+ $children$: null,
1007
+ $key$: null,
1008
+ $name$: null,
1009
+ $tag$: null,
1010
+ $text$: null
1011
+ };
1012
+ return { ...defaultVNode, ...vnode };
1013
+ };
1014
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1015
+ node["s-sr"] = true;
1016
+ childVNode.$name$ = slotName || null;
1017
+ childVNode.$tag$ = "slot";
1018
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1019
+ if (shadowRootNodes && win.document) {
1020
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1021
+ if (childVNode.$name$) {
1022
+ childVNode.$elm$.setAttribute("name", slotName);
1023
+ }
1024
+ if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1025
+ internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1026
+ } else {
1027
+ internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1028
+ }
1029
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1030
+ node.remove();
1031
+ if (childVNode.$depth$ === "0") {
1032
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1033
+ }
1034
+ } else {
1035
+ const slot = childVNode.$elm$;
1036
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1037
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1038
+ patchSlotNode(node);
1039
+ if (shouldMove) {
1040
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1041
+ }
1042
+ }
1043
+ childRenderNodes.push(childVNode);
1044
+ slotNodes.push(childVNode);
1045
+ if (!parentVNode.$children$) {
1046
+ parentVNode.$children$ = [];
1047
+ }
1048
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1049
+ }
1050
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1051
+ var _a, _b;
1052
+ let slottedNode = slotNode.nextSibling;
1053
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1054
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1055
+ do {
1056
+ 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 */))) {
1057
+ slottedNode["s-sn"] = slotName;
1058
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1059
+ }
1060
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
1061
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1062
+ };
1063
+ var findCorrespondingNode = (node, type) => {
1064
+ let sibling = node;
1065
+ do {
1066
+ sibling = sibling.nextSibling;
1067
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1068
+ return sibling;
1069
+ };
1070
+
1071
+ // src/utils/remote-value.ts
1072
+ var RemoteValue = class _RemoteValue {
1073
+ /**
1074
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
1075
+ *
1076
+ * @param serialized The serialized LocalValue object
1077
+ * @returns The original JavaScript value/object
1078
+ */
1079
+ static fromLocalValue(serialized) {
1080
+ const type = serialized[TYPE_CONSTANT];
1081
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
1082
+ switch (type) {
1083
+ case "string" /* String */:
1084
+ return value;
1085
+ case "boolean" /* Boolean */:
1086
+ return value;
1087
+ case "bigint" /* BigInt */:
1088
+ return BigInt(value);
1089
+ case "undefined" /* Undefined */:
1090
+ return void 0;
1091
+ case "null" /* Null */:
1092
+ return null;
1093
+ case "number" /* Number */:
1094
+ if (value === "NaN") return NaN;
1095
+ if (value === "-0") return -0;
1096
+ if (value === "Infinity") return Infinity;
1097
+ if (value === "-Infinity") return -Infinity;
1098
+ return value;
1099
+ case "array" /* Array */:
1100
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
1101
+ case "date" /* Date */:
1102
+ return new Date(value);
1103
+ case "map" /* Map */:
1104
+ const map = /* @__PURE__ */ new Map();
1105
+ for (const [key, val] of value) {
1106
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
1107
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
1108
+ map.set(deserializedKey, deserializedValue);
1109
+ }
1110
+ return map;
1111
+ case "object" /* Object */:
1112
+ const obj = {};
1113
+ for (const [key, val] of value) {
1114
+ obj[key] = _RemoteValue.fromLocalValue(val);
1115
+ }
1116
+ return obj;
1117
+ case "regexp" /* RegularExpression */:
1118
+ const { pattern, flags } = value;
1119
+ return new RegExp(pattern, flags);
1120
+ case "set" /* Set */:
1121
+ const set = /* @__PURE__ */ new Set();
1122
+ for (const item of value) {
1123
+ set.add(_RemoteValue.fromLocalValue(item));
1124
+ }
1125
+ return set;
1126
+ case "symbol" /* Symbol */:
1127
+ return Symbol(value);
1128
+ default:
1129
+ throw new Error(`Unsupported type: ${type}`);
1130
+ }
1131
+ }
1132
+ /**
1133
+ * Utility method to deserialize multiple LocalValues at once
1134
+ *
1135
+ * @param serializedValues Array of serialized LocalValue objects
1136
+ * @returns Array of deserialized JavaScript values
1137
+ */
1138
+ static fromLocalValueArray(serializedValues) {
1139
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
1140
+ }
1141
+ /**
1142
+ * Verifies if the given object matches the structure of a serialized LocalValue
1143
+ *
1144
+ * @param obj Object to verify
1145
+ * @returns boolean indicating if the object has LocalValue structure
1146
+ */
1147
+ static isLocalValueObject(obj) {
1148
+ if (typeof obj !== "object" || obj === null) {
1149
+ return false;
1150
+ }
1151
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
1152
+ return false;
1153
+ }
1154
+ const type = obj[TYPE_CONSTANT];
1155
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
1156
+ if (!hasTypeProperty) {
1157
+ return false;
1158
+ }
1159
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
1160
+ return obj.hasOwnProperty(VALUE_CONSTANT);
1161
+ }
1162
+ return true;
1163
+ }
1164
+ };
1165
+
1166
+ // src/utils/serialize.ts
1167
+ function deserializeProperty(value) {
1168
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
1169
+ return value;
1170
+ }
1171
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
1172
+ }
1173
+
575
1174
  // src/runtime/parse-property-value.ts
576
1175
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1176
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1177
+ propValue = deserializeProperty(propValue);
1178
+ return propValue;
1179
+ }
577
1180
  if (propValue != null && !isComplexType(propValue)) {
578
1181
  if (propType & 4 /* Boolean */) {
579
1182
  if (isFormAssociated && typeof propValue === "string") {
@@ -626,7 +1229,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
626
1229
  const classList = elm.classList;
627
1230
  const oldClasses = parseClassList(oldValue);
628
1231
  let newClasses = parseClassList(newValue);
629
- {
1232
+ if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
1233
+ const scopeId2 = elm["s-sc"] || elm["s-si"];
1234
+ newClasses.push(scopeId2);
1235
+ oldClasses.forEach((c) => {
1236
+ if (c.startsWith(scopeId2)) newClasses.push(c);
1237
+ });
1238
+ newClasses = [...new Set(newClasses)].filter((c) => c);
1239
+ classList.add(...newClasses);
1240
+ } else {
630
1241
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
631
1242
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
632
1243
  }
@@ -776,7 +1387,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
776
1387
  oldVnodeAttrs[memberName],
777
1388
  void 0,
778
1389
  isSvgMode2,
779
- newVnode.$flags$);
1390
+ newVnode.$flags$,
1391
+ isInitialRender
1392
+ );
780
1393
  }
781
1394
  }
782
1395
  }
@@ -787,7 +1400,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
787
1400
  oldVnodeAttrs[memberName],
788
1401
  newVnodeAttrs[memberName],
789
1402
  isSvgMode2,
790
- newVnode.$flags$);
1403
+ newVnode.$flags$,
1404
+ isInitialRender
1405
+ );
791
1406
  }
792
1407
  };
793
1408
  function sortedAttrNames(attrNames) {
@@ -1092,7 +1707,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1092
1707
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1093
1708
  }
1094
1709
  }
1095
- updateElement(oldVNode, newVNode2, isSvgMode);
1710
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1096
1711
  }
1097
1712
  if (oldChildren !== null && newChildren !== null) {
1098
1713
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1106,7 +1721,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1106
1721
  !isInitialRender && BUILD.updatable && oldChildren !== null
1107
1722
  ) {
1108
1723
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
1109
- } else ;
1724
+ } else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
1725
+ newVNode2.$children$ = oldChildren;
1726
+ }
1110
1727
  } else if ((defaultHolder = elm["s-cr"])) {
1111
1728
  defaultHolder.parentNode.textContent = text;
1112
1729
  } else if (oldVNode.$text$ !== text) {
@@ -1510,7 +2127,13 @@ var postUpdateComponent = (hostRef) => {
1510
2127
  }
1511
2128
  };
1512
2129
  var appDidLoad = (who) => {
2130
+ var _a;
1513
2131
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2132
+ {
2133
+ if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
2134
+ plt.$orgLocNodes$.clear();
2135
+ }
2136
+ }
1514
2137
  };
1515
2138
  var safeCall = (instance, method, arg, elm) => {
1516
2139
  if (instance && instance[method]) {
@@ -1875,7 +2498,21 @@ var connectedCallback = (elm) => {
1875
2498
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1876
2499
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1877
2500
  hostRef.$flags$ |= 1 /* hasConnected */;
2501
+ let hostId;
1878
2502
  {
2503
+ hostId = elm.getAttribute(HYDRATE_ID);
2504
+ if (hostId) {
2505
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2506
+ const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
2507
+ elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2508
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2509
+ const scopeId2 = getScopeId(cmpMeta);
2510
+ elm["s-sc"] = scopeId2;
2511
+ }
2512
+ initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2513
+ }
2514
+ }
2515
+ if (!hostId) {
1879
2516
  if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1880
2517
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
1881
2518
  setContentReference(elm);
@@ -1884,7 +2521,7 @@ var connectedCallback = (elm) => {
1884
2521
  {
1885
2522
  let ancestorComponent = elm;
1886
2523
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1887
- if (ancestorComponent["s-p"]) {
2524
+ if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
1888
2525
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1889
2526
  break;
1890
2527
  }
@@ -1963,6 +2600,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1963
2600
  let isBootstrapping = true;
1964
2601
  Object.assign(plt, options);
1965
2602
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2603
+ {
2604
+ plt.$flags$ |= 2 /* appLoaded */;
2605
+ }
2606
+ {
2607
+ hydrateScopedToShadow();
2608
+ }
1966
2609
  let hasSlotRelocation = false;
1967
2610
  lazyBundles.map((lazyBundle) => {
1968
2611
  lazyBundle[1].map((compactMeta) => {
@@ -2107,6 +2750,3 @@ exports.h = h;
2107
2750
  exports.promiseResolve = promiseResolve;
2108
2751
  exports.registerInstance = registerInstance;
2109
2752
  exports.setNonce = setNonce;
2110
- //# sourceMappingURL=index-B1Puzu82.js.map
2111
-
2112
- //# sourceMappingURL=index-B1Puzu82.js.map