@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.57

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 (443) hide show
  1. package/dist/{components/react/p-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
  2. package/dist/cjs/debounce-BsIBi_-2.js +13 -0
  3. package/dist/cjs/environment-BQE9Unf_.js +52 -0
  4. package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
  5. package/dist/cjs/fade-CPQhl1fP.js +26 -0
  6. package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
  7. package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
  8. package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
  9. package/dist/cjs/{index-B4gYpuJF.js → index-B4rc1pqu.js} +2150 -292
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{package-DkJrv93P.js → package-uQ5oiSiN.js} +1 -1
  12. package/dist/cjs/post-accordion_2.cjs.entry.js +19 -15
  13. package/dist/cjs/post-avatar.cjs.entry.js +27 -17
  14. package/dist/cjs/post-back-to-top.cjs.entry.js +23 -43
  15. package/dist/cjs/post-banner.cjs.entry.js +15 -12
  16. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +14 -12
  17. package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
  18. package/dist/cjs/post-card-control.cjs.entry.js +42 -26
  19. package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +618 -531
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +41 -37
  21. package/dist/cjs/post-components.cjs.js +3 -3
  22. package/dist/cjs/post-env-test.cjs.entry.js +15 -0
  23. package/dist/cjs/post-footer.cjs.entry.js +24 -20
  24. package/dist/cjs/post-linkarea.cjs.entry.js +5 -5
  25. package/dist/cjs/post-pagination.cjs.entry.js +615 -0
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +54 -34
  27. package/dist/cjs/post-popover.cjs.entry.js +26 -17
  28. package/dist/cjs/post-rating.cjs.entry.js +24 -18
  29. package/dist/cjs/post-stepper-item.cjs.entry.js +5 -5
  30. package/dist/cjs/post-stepper.cjs.entry.js +40 -29
  31. package/dist/cjs/post-tab-item.cjs.entry.js +51 -0
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +13 -11
  33. package/dist/cjs/post-tabs.cjs.entry.js +195 -40
  34. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -11
  35. package/dist/cjs/post-tooltip.cjs.entry.js +14 -12
  36. package/dist/cjs/utils-s05L2ulk.js +26 -0
  37. package/dist/collection/animations/collapse.js +3 -3
  38. package/dist/collection/animations/fade-slide.js +33 -0
  39. package/dist/collection/animations/fade.js +19 -7
  40. package/dist/collection/animations/index.js +2 -0
  41. package/dist/collection/animations/slide.js +25 -21
  42. package/dist/collection/animations/types.js +14 -0
  43. package/dist/collection/animations/utils.js +8 -0
  44. package/dist/collection/collection-manifest.json +8 -8
  45. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  46. package/dist/collection/components/post-accordion/post-accordion.js +5 -4
  47. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  48. package/dist/collection/components/post-accordion-item/post-accordion-item.js +9 -8
  49. package/dist/collection/components/post-avatar/post-avatar.js +11 -11
  50. package/dist/collection/components/post-back-to-top/post-back-to-top.js +15 -15
  51. package/dist/collection/components/post-banner/post-banner.css +4 -1
  52. package/dist/collection/components/post-banner/post-banner.js +6 -5
  53. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +3 -3
  54. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -29
  55. package/dist/collection/components/post-card-control/post-card-control.js +18 -18
  56. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  57. package/dist/collection/components/post-closebutton/post-closebutton.js +4 -3
  58. package/dist/collection/components/post-collapsible/post-collapsible.js +28 -28
  59. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +3 -3
  60. package/dist/collection/components/post-footer/post-footer.css +1 -1
  61. package/dist/collection/components/post-footer/post-footer.js +18 -16
  62. package/dist/collection/components/post-header/post-header.css +1 -1
  63. package/dist/collection/components/post-header/post-header.js +144 -82
  64. package/dist/collection/components/post-icon/post-icon.js +18 -16
  65. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
  66. package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +45 -36
  67. package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
  68. package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +24 -23
  69. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  70. package/dist/collection/components/post-logo/post-logo.css +3 -1
  71. package/dist/collection/components/post-logo/post-logo.js +3 -3
  72. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  73. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
  74. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  75. package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
  76. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
  77. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +81 -75
  78. package/dist/collection/components/post-menu/post-menu.css +1 -1
  79. package/dist/collection/components/post-menu/post-menu.js +39 -38
  80. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  81. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
  82. package/dist/collection/components/post-pagination/post-pagination.css +1 -0
  83. package/dist/collection/components/post-pagination/post-pagination.js +838 -0
  84. package/dist/collection/components/post-popover/post-popover.js +22 -16
  85. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +45 -29
  86. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  87. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +82 -131
  88. package/dist/collection/components/post-rating/post-rating.js +7 -7
  89. package/dist/collection/components/post-stepper/post-stepper.js +38 -35
  90. package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
  91. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  92. package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
  93. package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
  94. package/dist/collection/components/post-tab-panel/post-tab-panel.js +10 -10
  95. package/dist/collection/components/post-tabs/post-tabs.js +232 -59
  96. package/dist/collection/components/post-togglebutton/post-togglebutton.js +2 -2
  97. package/dist/collection/components/post-tooltip/post-tooltip.js +9 -27
  98. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +4 -4
  99. package/dist/collection/utils/environment.js +47 -2
  100. package/dist/collection/utils/event-from.js +2 -2
  101. package/dist/collection/utils/get-focusable-children.js +29 -21
  102. package/dist/collection/utils/is-motion-reduced.js +1 -1
  103. package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
  104. package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
  105. package/dist/component-names.json +4 -5
  106. package/dist/components/breakpoints.js +1 -178
  107. package/dist/components/debounce.js +1 -0
  108. package/dist/components/environment.js +1 -0
  109. package/dist/components/event-from.js +1 -119
  110. package/dist/components/fade-slide.js +1 -0
  111. package/dist/components/fade.js +1 -11
  112. package/dist/components/focusable.js +1 -5018
  113. package/dist/components/get-focusable-children.js +1 -64
  114. package/dist/components/get-root.js +1 -15
  115. package/dist/components/heading-levels.js +1 -3
  116. package/dist/components/index.browser.js +1 -14
  117. package/dist/components/index.d.ts +11 -10
  118. package/dist/components/index.js +1 -39
  119. package/dist/components/long-press-event.js +1 -257
  120. package/dist/components/package.js +1 -3
  121. package/dist/components/post-accordion-item.js +1 -6
  122. package/dist/components/post-accordion-item2.js +1 -113
  123. package/dist/components/post-accordion.js +1 -6
  124. package/dist/components/post-accordion2.js +1 -138
  125. package/dist/components/post-avatar.js +1 -217
  126. package/dist/components/post-back-to-top.js +1 -144
  127. package/dist/components/post-banner.js +1 -98
  128. package/dist/components/post-breadcrumb-item.js +1 -6
  129. package/dist/components/post-breadcrumb-item2.js +1 -79
  130. package/dist/components/post-breadcrumbs.js +1 -196
  131. package/dist/components/post-card-control.js +1 -326
  132. package/dist/components/post-closebutton.js +1 -6
  133. package/dist/components/post-closebutton2.js +1 -77
  134. package/dist/components/post-collapsible-trigger.js +1 -6
  135. package/dist/components/post-collapsible-trigger2.js +1 -136
  136. package/dist/components/post-collapsible.js +1 -6
  137. package/dist/components/post-collapsible2.js +1 -110
  138. package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
  139. package/dist/components/post-env-test.js +1 -0
  140. package/dist/components/post-footer.js +1 -116
  141. package/dist/components/post-header.js +1 -372
  142. package/dist/components/post-icon.js +1 -6
  143. package/dist/components/post-icon2.js +1 -159
  144. package/dist/components/post-language-menu-item.d.ts +11 -0
  145. package/dist/components/post-language-menu-item.js +1 -0
  146. package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
  147. package/dist/components/post-language-menu.js +1 -0
  148. package/dist/components/post-linkarea.js +1 -58
  149. package/dist/components/post-logo.js +1 -58
  150. package/dist/components/post-mainnavigation.js +1 -180
  151. package/dist/components/post-megadropdown-trigger.js +1 -136
  152. package/dist/components/post-megadropdown.js +1 -267
  153. package/dist/components/post-menu-item.js +1 -6
  154. package/dist/components/post-menu-item2.js +1 -30
  155. package/dist/components/post-menu-trigger.js +1 -6
  156. package/dist/components/post-menu-trigger2.js +1 -110
  157. package/dist/components/post-menu.js +1 -6
  158. package/dist/components/post-menu2.js +1 -242
  159. package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  160. package/dist/components/post-pagination.js +1 -0
  161. package/dist/components/post-popover-trigger.js +1 -132
  162. package/dist/components/post-popover.js +1 -118
  163. package/dist/components/post-popovercontainer.js +1 -6
  164. package/dist/components/post-popovercontainer2.js +1 -3127
  165. package/dist/components/post-rating.js +1 -148
  166. package/dist/components/post-stepper-item.js +1 -33
  167. package/dist/components/post-stepper.js +1 -134
  168. package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  169. package/dist/components/post-tab-item.js +1 -0
  170. package/dist/components/post-tab-panel.js +1 -54
  171. package/dist/components/post-tabs.js +1 -196
  172. package/dist/components/post-togglebutton.js +1 -56
  173. package/dist/components/post-togglebutton2.js +1 -0
  174. package/dist/components/post-tooltip-trigger.js +1 -206
  175. package/dist/components/post-tooltip.js +1 -114
  176. package/dist/components/react/index.d.ts +2 -0
  177. package/dist/components/react/index.js +1 -2315
  178. package/dist/components/react/p-B8YiQ3mz.js +1 -0
  179. package/dist/components/react/p-BC5nlBvn.js +1 -0
  180. package/dist/components/react/p-BLchVpF6.js +1 -14
  181. package/dist/components/react/p-BVCjnh6Q.js +1 -0
  182. package/dist/{post-components/p-CBFgkSgY.js → components/react/p-BVGcVycs.js} +1 -1
  183. package/dist/components/react/p-B_XPj2c8.js +1 -0
  184. package/dist/components/react/p-BllOMLDs.js +1 -0
  185. package/dist/components/react/p-BmRNjQUZ.js +1 -0
  186. package/dist/components/react/p-ByFh05IW.js +1 -0
  187. package/dist/components/react/p-C9hMpmsD.js +1 -0
  188. package/dist/components/react/p-CJ13r5fi.js +1 -0
  189. package/dist/components/react/p-CZvbetqX.js +1 -0
  190. package/dist/components/react/p-C_2k3G1c.js +1 -257
  191. package/dist/components/react/p-CoDiS_Ik.js +1 -0
  192. package/dist/components/react/p-Cou17ld8.js +1 -0
  193. package/dist/components/react/p-D5knoiyy.js +1 -0
  194. package/dist/components/react/p-D9DDtvFM.js +1 -0
  195. package/dist/components/react/p-DY2U5CQt.js +1 -0
  196. package/dist/components/react/p-DjIHLduJ.js +1 -3
  197. package/dist/components/react/p-DpATRD2W.js +1 -0
  198. package/dist/components/react/p-FxUVQ4Tx.js +1 -0
  199. package/dist/components/react/p-HygIVKXC.js +1 -5018
  200. package/dist/components/react/p-YR7U0Z_g.js +1 -0
  201. package/dist/components/react/p-ZeKXASQs.js +1 -0
  202. package/dist/components/react/p-r4txK0AC.js +1 -3
  203. package/dist/components/react/p-sSn0kXFi.js +1 -0
  204. package/dist/components/react/post-accordion-item.js +1 -6
  205. package/dist/components/react/post-accordion.js +1 -6
  206. package/dist/components/react/post-avatar.js +1 -218
  207. package/dist/components/react/post-back-to-top.js +1 -145
  208. package/dist/components/react/post-banner.js +1 -99
  209. package/dist/components/react/post-breadcrumb-item.js +1 -6
  210. package/dist/components/react/post-breadcrumbs.js +1 -197
  211. package/dist/components/react/post-card-control.js +1 -327
  212. package/dist/components/react/post-closebutton.js +1 -6
  213. package/dist/components/react/post-collapsible-trigger.js +1 -6
  214. package/dist/components/react/post-collapsible.js +1 -6
  215. package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
  216. package/dist/components/react/post-env-test.js +1 -0
  217. package/dist/components/react/post-footer.js +1 -117
  218. package/dist/components/react/post-header.js +1 -373
  219. package/dist/components/react/post-icon.js +1 -6
  220. package/dist/components/react/post-language-menu-item.d.ts +11 -0
  221. package/dist/components/react/post-language-menu-item.js +1 -0
  222. package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
  223. package/dist/components/react/post-language-menu.js +1 -0
  224. package/dist/components/react/post-linkarea.js +1 -59
  225. package/dist/components/react/post-logo.js +1 -59
  226. package/dist/components/react/post-mainnavigation.js +1 -181
  227. package/dist/components/react/post-megadropdown-trigger.js +1 -137
  228. package/dist/components/react/post-megadropdown.js +1 -268
  229. package/dist/components/react/post-menu-item.js +1 -6
  230. package/dist/components/react/post-menu-trigger.js +1 -6
  231. package/dist/components/react/post-menu.js +1 -6
  232. package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  233. package/dist/components/react/post-pagination.js +1 -0
  234. package/dist/components/react/post-popover-trigger.js +1 -133
  235. package/dist/components/react/post-popover.js +1 -119
  236. package/dist/components/react/post-popovercontainer.js +1 -6
  237. package/dist/components/react/post-rating.js +1 -149
  238. package/dist/components/react/post-stepper-item.js +1 -34
  239. package/dist/components/react/post-stepper.js +1 -135
  240. package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  241. package/dist/components/react/post-tab-item.js +1 -0
  242. package/dist/components/react/post-tab-panel.js +1 -55
  243. package/dist/components/react/post-tabs.js +1 -197
  244. package/dist/components/react/post-togglebutton.js +1 -57
  245. package/dist/components/react/post-tooltip-trigger.js +1 -207
  246. package/dist/components/react/post-tooltip.js +1 -115
  247. package/dist/components/switch-variants.js +1 -3
  248. package/dist/components/utils.js +1 -0
  249. package/dist/docs.d.ts +11 -0
  250. package/dist/docs.json +873 -631
  251. package/dist/{cjs/breakpoints-CEkeixld.js → esm/breakpoints-DYoSKGHO.js} +89 -6
  252. package/dist/esm/debounce-C9hMpmsD.js +11 -0
  253. package/dist/esm/environment-CEmnRoA6.js +49 -0
  254. package/dist/{components/react/p-CzIKqBrS.js → esm/event-from-rEfV4v4a.js} +2 -2
  255. package/dist/esm/fade-DsgPYmAa.js +24 -0
  256. package/dist/esm/fade-slide-CvOvauo9.js +36 -0
  257. package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
  258. package/dist/{components/react/p-CBFgkSgY.js → esm/get-root-CXfAA093.js} +1 -1
  259. package/dist/esm/{index-wEFJ-c34.js → index-CDZBzSdV.js} +2150 -292
  260. package/dist/esm/loader.js +3 -3
  261. package/dist/esm/package-CZvbetqX.js +3 -0
  262. package/dist/esm/post-accordion_2.entry.js +17 -13
  263. package/dist/esm/post-avatar.entry.js +22 -12
  264. package/dist/esm/post-back-to-top.entry.js +23 -43
  265. package/dist/esm/post-banner.entry.js +14 -11
  266. package/dist/esm/post-breadcrumb-item_2.entry.js +13 -11
  267. package/dist/esm/post-breadcrumbs.entry.js +31 -32
  268. package/dist/esm/post-card-control.entry.js +32 -16
  269. package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +599 -510
  270. package/dist/esm/post-collapsible_2.entry.js +38 -34
  271. package/dist/esm/post-components.js +4 -4
  272. package/dist/esm/post-env-test.entry.js +13 -0
  273. package/dist/esm/post-footer.entry.js +21 -17
  274. package/dist/esm/post-linkarea.entry.js +5 -5
  275. package/dist/esm/post-pagination.entry.js +613 -0
  276. package/dist/esm/post-popover-trigger.entry.js +52 -32
  277. package/dist/esm/post-popover.entry.js +25 -16
  278. package/dist/esm/post-rating.entry.js +16 -10
  279. package/dist/esm/post-stepper-item.entry.js +5 -5
  280. package/dist/esm/post-stepper.entry.js +39 -28
  281. package/dist/esm/post-tab-item.entry.js +49 -0
  282. package/dist/esm/post-tab-panel.entry.js +13 -11
  283. package/dist/esm/post-tabs.entry.js +195 -40
  284. package/dist/esm/post-tooltip-trigger.entry.js +10 -8
  285. package/dist/esm/post-tooltip.entry.js +13 -11
  286. package/dist/esm/utils-CoDiS_Ik.js +24 -0
  287. package/dist/post-components/p-09ba7cf9.entry.js +1 -0
  288. package/dist/post-components/p-0c091898.entry.js +1 -0
  289. package/dist/post-components/{p-cd03e6f2.entry.js → p-0e97fcfd.entry.js} +1 -1
  290. package/dist/post-components/p-296f1dd5.entry.js +1 -0
  291. package/dist/post-components/p-32ad2b21.entry.js +1 -0
  292. package/dist/post-components/p-366c28cb.entry.js +1 -0
  293. package/dist/post-components/p-41ae68d5.entry.js +1 -0
  294. package/dist/post-components/p-448e7265.entry.js +1 -0
  295. package/dist/post-components/p-554da188.entry.js +1 -0
  296. package/dist/post-components/p-5912f8f1.entry.js +1 -0
  297. package/dist/post-components/p-790f300d.entry.js +1 -0
  298. package/dist/post-components/p-7ed5a493.entry.js +1 -0
  299. package/dist/post-components/p-85bea1b6.entry.js +1 -0
  300. package/dist/post-components/p-8bcff4d2.entry.js +1 -0
  301. package/dist/post-components/p-9dc9c245.entry.js +1 -0
  302. package/dist/post-components/p-B7ebLhHc.js +1 -0
  303. package/dist/post-components/p-BVCjnh6Q.js +1 -0
  304. package/dist/post-components/p-BXNs2_sw.js +1 -0
  305. package/dist/post-components/p-C9hMpmsD.js +1 -0
  306. package/dist/post-components/p-CDZBzSdV.js +2 -0
  307. package/dist/post-components/p-CEmnRoA6.js +1 -0
  308. package/dist/post-components/p-CZvbetqX.js +1 -0
  309. package/dist/post-components/p-CoDiS_Ik.js +1 -0
  310. package/dist/post-components/p-D5knoiyy.js +1 -0
  311. package/dist/post-components/p-DI-h_mEL.js +1 -0
  312. package/dist/post-components/p-a06f9695.entry.js +1 -0
  313. package/dist/post-components/p-a191f1df.entry.js +1 -0
  314. package/dist/post-components/p-c5d19d62.entry.js +1 -0
  315. package/dist/post-components/{p-24dc54d1.entry.js → p-c8c4d05b.entry.js} +1 -1
  316. package/dist/post-components/{p-57288cb2.entry.js → p-d1a5c980.entry.js} +1 -1
  317. package/dist/post-components/p-d4e2c556.entry.js +1 -0
  318. package/dist/post-components/p-f96a310c.entry.js +1 -0
  319. package/dist/post-components/p-fab2327d.entry.js +1 -0
  320. package/dist/post-components/p-rEfV4v4a.js +1 -0
  321. package/dist/post-components/post-components.css +1 -1
  322. package/dist/post-components/post-components.esm.js +1 -1
  323. package/dist/prebuild.js +46 -0
  324. package/dist/types/animations/collapse.d.ts +1 -0
  325. package/dist/types/animations/fade-slide.d.ts +11 -0
  326. package/dist/types/animations/fade.d.ts +2 -2
  327. package/dist/types/animations/index.d.ts +2 -0
  328. package/dist/types/animations/slide.d.ts +9 -2
  329. package/dist/types/animations/types.d.ts +13 -0
  330. package/dist/types/animations/utils.d.ts +2 -0
  331. package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
  332. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
  333. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
  334. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
  335. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
  336. package/dist/types/components/post-footer/post-footer.d.ts +4 -4
  337. package/dist/types/components/post-header/post-header.d.ts +23 -13
  338. package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +12 -11
  339. package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
  340. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
  341. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
  342. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
  343. package/dist/types/components/post-menu/post-menu.d.ts +4 -4
  344. package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
  345. package/dist/types/components/post-popover/post-popover.d.ts +4 -3
  346. package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
  347. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -21
  348. package/dist/types/components/post-rating/post-rating.d.ts +1 -1
  349. package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
  350. package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
  351. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
  352. package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
  353. package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -5
  354. package/dist/types/components.d.ts +322 -219
  355. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
  356. package/dist/types/stencil-public-runtime.d.ts +147 -10
  357. package/dist/types/types/heading-levels.d.ts +1 -1
  358. package/dist/types/utils/environment.d.ts +25 -1
  359. package/dist/types/utils/get-focusable-children.d.ts +2 -2
  360. package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
  361. package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
  362. package/hydrate/index.d.ts +14 -0
  363. package/hydrate/index.js +7494 -2714
  364. package/hydrate/index.mjs +7493 -2715
  365. package/package.json +7 -8
  366. package/dist/cjs/fade-nS5zzDQS.js +0 -14
  367. package/dist/cjs/index-UFKR6Ok0.js +0 -98
  368. package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
  369. package/dist/collection/animations/slide-and-fade.js +0 -25
  370. package/dist/collection/components/post-language-option/post-language-option.css +0 -1
  371. package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
  372. package/dist/collection/components/post-list/post-list.css +0 -1
  373. package/dist/collection/components/post-list/post-list.js +0 -97
  374. package/dist/collection/components/post-list-item/post-list-item.css +0 -1
  375. package/dist/collection/components/post-list-item/post-list-item.js +0 -26
  376. package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
  377. package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
  378. package/dist/components/index2.js +0 -89
  379. package/dist/components/post-language-option.d.ts +0 -11
  380. package/dist/components/post-language-option.js +0 -99
  381. package/dist/components/post-language-switch.js +0 -157
  382. package/dist/components/post-list-item.js +0 -38
  383. package/dist/components/post-list.js +0 -61
  384. package/dist/components/post-tab-header.js +0 -52
  385. package/dist/components/react/p-BVXiQdHq.js +0 -64
  386. package/dist/components/react/p-BhxZzOEC.js +0 -3
  387. package/dist/components/react/p-CSAMO7iJ.js +0 -243
  388. package/dist/components/react/p-CYkf_7Y5.js +0 -89
  389. package/dist/components/react/p-Ccrl2AQn.js +0 -111
  390. package/dist/components/react/p-CewRvBtg.js +0 -139
  391. package/dist/components/react/p-Cwiv86_f.js +0 -111
  392. package/dist/components/react/p-D2waO0Zc.js +0 -31
  393. package/dist/components/react/p-DBPOV12C.js +0 -160
  394. package/dist/components/react/p-DVGEExot.js +0 -3128
  395. package/dist/components/react/p-Djvj8fd2.js +0 -80
  396. package/dist/components/react/p-LtiDhYis.js +0 -137
  397. package/dist/components/react/p-SbIC4aZX.js +0 -11
  398. package/dist/components/react/p-XrZzCOKT.js +0 -78
  399. package/dist/components/react/p-v3pOrMNQ.js +0 -114
  400. package/dist/components/react/post-language-option.js +0 -100
  401. package/dist/components/react/post-language-switch.d.ts +0 -11
  402. package/dist/components/react/post-language-switch.js +0 -158
  403. package/dist/components/react/post-list-item.js +0 -39
  404. package/dist/components/react/post-list.js +0 -62
  405. package/dist/components/react/post-tab-header.js +0 -53
  406. package/dist/esm/breakpoints-CJ80BZ06.js +0 -178
  407. package/dist/esm/event-from-CzIKqBrS.js +0 -119
  408. package/dist/esm/fade-SbIC4aZX.js +0 -11
  409. package/dist/esm/get-root-BkQ3CrLq.js +0 -15
  410. package/dist/esm/index-Beaz8wEe.js +0 -89
  411. package/dist/esm/package-BhxZzOEC.js +0 -3
  412. package/dist/esm/post-tab-header.entry.js +0 -29
  413. package/dist/post-components/p-01e678c9.entry.js +0 -1
  414. package/dist/post-components/p-034a453f.entry.js +0 -1
  415. package/dist/post-components/p-15a4cdbf.entry.js +0 -1
  416. package/dist/post-components/p-2a2030bf.entry.js +0 -1
  417. package/dist/post-components/p-2ed84cc3.entry.js +0 -1
  418. package/dist/post-components/p-3228968f.entry.js +0 -1
  419. package/dist/post-components/p-3c01ddfe.entry.js +0 -1
  420. package/dist/post-components/p-748b1f01.entry.js +0 -1
  421. package/dist/post-components/p-7745e46e.entry.js +0 -1
  422. package/dist/post-components/p-7f635728.entry.js +0 -1
  423. package/dist/post-components/p-82c178a3.entry.js +0 -1
  424. package/dist/post-components/p-9b5f8319.entry.js +0 -1
  425. package/dist/post-components/p-Beaz8wEe.js +0 -1
  426. package/dist/post-components/p-BhxZzOEC.js +0 -1
  427. package/dist/post-components/p-CJ80BZ06.js +0 -1
  428. package/dist/post-components/p-D9ZHp2FP.js +0 -1
  429. package/dist/post-components/p-SbIC4aZX.js +0 -1
  430. package/dist/post-components/p-a9644e54.entry.js +0 -1
  431. package/dist/post-components/p-af030a3a.entry.js +0 -1
  432. package/dist/post-components/p-b8ba8139.entry.js +0 -1
  433. package/dist/post-components/p-db935e8e.entry.js +0 -1
  434. package/dist/post-components/p-e62e1f57.entry.js +0 -1
  435. package/dist/post-components/p-fb4b1641.entry.js +0 -1
  436. package/dist/post-components/p-wEFJ-c34.js +0 -2
  437. package/dist/types/animations/slide-and-fade.d.ts +0 -2
  438. package/dist/types/components/post-list/post-list.d.ts +0 -24
  439. package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
  440. package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
  441. /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
  442. /package/dist/{post-components/p-CzIKqBrS.js → components/react/p-rEfV4v4a.js} +0 -0
  443. /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
@@ -1,2315 +1 @@
1
- const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-option,post-language-switch,post-linkarea,post-list,post-list-item,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-header,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
2
-
3
- const NAMESPACE = 'post-components';
4
- const BUILD = /* post-components */ { hydratedSelectorName: "data-hydrated", lazyLoad: false, slotRelocation: true, updatable: true};
5
-
6
- /*
7
- Stencil Client Platform v4.35.0 | MIT Licensed | https://stenciljs.com
8
- */
9
- var __defProp = Object.defineProperty;
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
-
15
- // src/utils/constants.ts
16
- var SVG_NS = "http://www.w3.org/2000/svg";
17
- var HTML_NS = "http://www.w3.org/1999/xhtml";
18
- var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
19
- PrimitiveType2["Undefined"] = "undefined";
20
- PrimitiveType2["Null"] = "null";
21
- PrimitiveType2["String"] = "string";
22
- PrimitiveType2["Number"] = "number";
23
- PrimitiveType2["SpecialNumber"] = "number";
24
- PrimitiveType2["Boolean"] = "boolean";
25
- PrimitiveType2["BigInt"] = "bigint";
26
- return PrimitiveType2;
27
- })(PrimitiveType || {});
28
- var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
29
- NonPrimitiveType2["Array"] = "array";
30
- NonPrimitiveType2["Date"] = "date";
31
- NonPrimitiveType2["Map"] = "map";
32
- NonPrimitiveType2["Object"] = "object";
33
- NonPrimitiveType2["RegularExpression"] = "regexp";
34
- NonPrimitiveType2["Set"] = "set";
35
- NonPrimitiveType2["Channel"] = "channel";
36
- NonPrimitiveType2["Symbol"] = "symbol";
37
- return NonPrimitiveType2;
38
- })(NonPrimitiveType || {});
39
- var TYPE_CONSTANT = "type";
40
- var VALUE_CONSTANT = "value";
41
- var SERIALIZED_PREFIX = "serialized:";
42
-
43
- // src/client/client-host-ref.ts
44
- var getHostRef = (ref) => {
45
- if (ref.__stencil__getHostRef) {
46
- return ref.__stencil__getHostRef();
47
- }
48
- return void 0;
49
- };
50
- var registerHost = (hostElement, cmpMeta) => {
51
- const hostRef = {
52
- $flags$: 0,
53
- $hostElement$: hostElement,
54
- $cmpMeta$: cmpMeta,
55
- $instanceValues$: /* @__PURE__ */ new Map()
56
- };
57
- {
58
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
59
- hostElement["s-p"] = [];
60
- hostElement["s-rc"] = [];
61
- }
62
- const ref = hostRef;
63
- hostElement.__stencil__getHostRef = () => ref;
64
- return ref;
65
- };
66
- var isMemberInElement = (elm, memberName) => memberName in elm;
67
- var consoleError = (e, el) => (0, console.error)(e, el);
68
-
69
- // src/client/client-style.ts
70
- var styles = /* @__PURE__ */ new Map();
71
-
72
- // src/runtime/runtime-constants.ts
73
- var CONTENT_REF_ID = "r";
74
- var ORG_LOCATION_ID = "o";
75
- var SLOT_NODE_ID = "s";
76
- var TEXT_NODE_ID = "t";
77
- var COMMENT_NODE_ID = "c";
78
- var HYDRATE_ID = "s-id";
79
- var HYDRATED_STYLE_ID = "sty-id";
80
- var HYDRATE_CHILD_ID = "c-id";
81
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
82
- var XLINK_NS = "http://www.w3.org/1999/xlink";
83
- var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
84
- "formAssociatedCallback",
85
- "formResetCallback",
86
- "formDisabledCallback",
87
- "formStateRestoreCallback"
88
- ];
89
- var win = typeof window !== "undefined" ? window : {};
90
- var H = win.HTMLElement || class {
91
- };
92
- var plt = {
93
- $flags$: 0,
94
- $resourcesUrl$: "",
95
- jmp: (h2) => h2(),
96
- raf: (h2) => requestAnimationFrame(h2),
97
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
98
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
99
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
100
- };
101
- var supportsListenerOptions = /* @__PURE__ */ (() => {
102
- var _a;
103
- let supportsListenerOptions2 = false;
104
- try {
105
- (_a = win.document) == null ? void 0 : _a.addEventListener(
106
- "e",
107
- null,
108
- Object.defineProperty({}, "passive", {
109
- get() {
110
- supportsListenerOptions2 = true;
111
- }
112
- })
113
- );
114
- } catch (e) {
115
- }
116
- return supportsListenerOptions2;
117
- })();
118
- var promiseResolve = (v) => Promise.resolve(v);
119
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
120
- try {
121
- new CSSStyleSheet();
122
- return typeof new CSSStyleSheet().replaceSync === "function";
123
- } catch (e) {
124
- }
125
- return false;
126
- })() ;
127
- var queuePending = false;
128
- var queueDomReads = [];
129
- var queueDomWrites = [];
130
- var queueTask = (queue, write) => (cb) => {
131
- queue.push(cb);
132
- if (!queuePending) {
133
- queuePending = true;
134
- if (write && plt.$flags$ & 4 /* queueSync */) {
135
- nextTick(flush);
136
- } else {
137
- plt.raf(flush);
138
- }
139
- }
140
- };
141
- var consume = (queue) => {
142
- for (let i2 = 0; i2 < queue.length; i2++) {
143
- try {
144
- queue[i2](performance.now());
145
- } catch (e) {
146
- consoleError(e);
147
- }
148
- }
149
- queue.length = 0;
150
- };
151
- var flush = () => {
152
- consume(queueDomReads);
153
- {
154
- consume(queueDomWrites);
155
- if (queuePending = queueDomReads.length > 0) {
156
- plt.raf(flush);
157
- }
158
- }
159
- };
160
- var nextTick = (cb) => promiseResolve().then(cb);
161
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
162
-
163
- // src/runtime/asset-path.ts
164
- var getAssetPath = (path) => {
165
- const assetUrl = new URL(path, plt.$resourcesUrl$);
166
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
167
- };
168
- var setAssetPath = (path) => plt.$resourcesUrl$ = path;
169
- var isComplexType = (o) => {
170
- o = typeof o;
171
- return o === "object" || o === "function";
172
- };
173
-
174
- // src/utils/query-nonce-meta-tag-content.ts
175
- function queryNonceMetaTagContent(doc) {
176
- var _a, _b, _c;
177
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
178
- }
179
-
180
- // src/utils/regular-expression.ts
181
- var escapeRegExpSpecialCharacters = (text) => {
182
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
183
- };
184
-
185
- // src/utils/remote-value.ts
186
- var RemoteValue = class _RemoteValue {
187
- /**
188
- * Deserializes a LocalValue serialized object back to its original JavaScript representation
189
- *
190
- * @param serialized The serialized LocalValue object
191
- * @returns The original JavaScript value/object
192
- */
193
- static fromLocalValue(serialized) {
194
- const type = serialized[TYPE_CONSTANT];
195
- const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
196
- switch (type) {
197
- case "string" /* String */:
198
- return value;
199
- case "boolean" /* Boolean */:
200
- return value;
201
- case "bigint" /* BigInt */:
202
- return BigInt(value);
203
- case "undefined" /* Undefined */:
204
- return void 0;
205
- case "null" /* Null */:
206
- return null;
207
- case "number" /* Number */:
208
- if (value === "NaN") return NaN;
209
- if (value === "-0") return -0;
210
- if (value === "Infinity") return Infinity;
211
- if (value === "-Infinity") return -Infinity;
212
- return value;
213
- case "array" /* Array */:
214
- return value.map((item) => _RemoteValue.fromLocalValue(item));
215
- case "date" /* Date */:
216
- return new Date(value);
217
- case "map" /* Map */:
218
- const map2 = /* @__PURE__ */ new Map();
219
- for (const [key, val] of value) {
220
- const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
221
- const deserializedValue = _RemoteValue.fromLocalValue(val);
222
- map2.set(deserializedKey, deserializedValue);
223
- }
224
- return map2;
225
- case "object" /* Object */:
226
- const obj = {};
227
- for (const [key, val] of value) {
228
- obj[key] = _RemoteValue.fromLocalValue(val);
229
- }
230
- return obj;
231
- case "regexp" /* RegularExpression */:
232
- const { pattern, flags } = value;
233
- return new RegExp(pattern, flags);
234
- case "set" /* Set */:
235
- const set = /* @__PURE__ */ new Set();
236
- for (const item of value) {
237
- set.add(_RemoteValue.fromLocalValue(item));
238
- }
239
- return set;
240
- case "symbol" /* Symbol */:
241
- return Symbol(value);
242
- default:
243
- throw new Error(`Unsupported type: ${type}`);
244
- }
245
- }
246
- /**
247
- * Utility method to deserialize multiple LocalValues at once
248
- *
249
- * @param serializedValues Array of serialized LocalValue objects
250
- * @returns Array of deserialized JavaScript values
251
- */
252
- static fromLocalValueArray(serializedValues) {
253
- return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
254
- }
255
- /**
256
- * Verifies if the given object matches the structure of a serialized LocalValue
257
- *
258
- * @param obj Object to verify
259
- * @returns boolean indicating if the object has LocalValue structure
260
- */
261
- static isLocalValueObject(obj) {
262
- if (typeof obj !== "object" || obj === null) {
263
- return false;
264
- }
265
- if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
266
- return false;
267
- }
268
- const type = obj[TYPE_CONSTANT];
269
- const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
270
- if (!hasTypeProperty) {
271
- return false;
272
- }
273
- if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
274
- return obj.hasOwnProperty(VALUE_CONSTANT);
275
- }
276
- return true;
277
- }
278
- };
279
-
280
- // src/utils/result.ts
281
- var result_exports = {};
282
- __export(result_exports, {
283
- err: () => err,
284
- map: () => map,
285
- ok: () => ok,
286
- unwrap: () => unwrap,
287
- unwrapErr: () => unwrapErr
288
- });
289
- var ok = (value) => ({
290
- isOk: true,
291
- isErr: false,
292
- value
293
- });
294
- var err = (value) => ({
295
- isOk: false,
296
- isErr: true,
297
- value
298
- });
299
- function map(result, fn) {
300
- if (result.isOk) {
301
- const val = fn(result.value);
302
- if (val instanceof Promise) {
303
- return val.then((newVal) => ok(newVal));
304
- } else {
305
- return ok(val);
306
- }
307
- }
308
- if (result.isErr) {
309
- const value = result.value;
310
- return err(value);
311
- }
312
- throw "should never get here";
313
- }
314
- var unwrap = (result) => {
315
- if (result.isOk) {
316
- return result.value;
317
- } else {
318
- throw result.value;
319
- }
320
- };
321
- var unwrapErr = (result) => {
322
- if (result.isErr) {
323
- return result.value;
324
- } else {
325
- throw result.value;
326
- }
327
- };
328
-
329
- // src/utils/serialize.ts
330
- function deserializeProperty(value) {
331
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
332
- return value;
333
- }
334
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
335
- }
336
- function createShadowRoot(cmpMeta) {
337
- const shadowRoot = this.attachShadow({ mode: "open" });
338
- if (supportsConstructableStylesheets) {
339
- const sheet = new CSSStyleSheet();
340
- sheet.replaceSync(globalStyles);
341
- shadowRoot.adoptedStyleSheets.push(sheet);
342
- }
343
- }
344
- var updateFallbackSlotVisibility = (elm) => {
345
- const childNodes = internalCall(elm, "childNodes");
346
- if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
347
- getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
348
- if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
349
- if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
350
- slotNode.hidden = true;
351
- } else {
352
- slotNode.hidden = false;
353
- }
354
- }
355
- });
356
- }
357
- let i2 = 0;
358
- for (i2 = 0; i2 < childNodes.length; i2++) {
359
- const childNode = childNodes[i2];
360
- if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
361
- updateFallbackSlotVisibility(childNode);
362
- }
363
- }
364
- };
365
- var getSlottedChildNodes = (childNodes) => {
366
- const result = [];
367
- for (let i2 = 0; i2 < childNodes.length; i2++) {
368
- const slottedNode = childNodes[i2]["s-nr"] || void 0;
369
- if (slottedNode && slottedNode.isConnected) {
370
- result.push(slottedNode);
371
- }
372
- }
373
- return result;
374
- };
375
- function getHostSlotNodes(childNodes, hostName, slotName) {
376
- let i2 = 0;
377
- let slottedNodes = [];
378
- let childNode;
379
- for (; i2 < childNodes.length; i2++) {
380
- childNode = childNodes[i2];
381
- if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
382
- slottedNodes.push(childNode);
383
- }
384
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
385
- }
386
- return slottedNodes;
387
- }
388
- var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
389
- const childNodes = [];
390
- if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
391
- let node = slot;
392
- while (node = node.nextSibling) {
393
- if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
394
- }
395
- return childNodes;
396
- };
397
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
398
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
399
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
400
- return true;
401
- }
402
- if (nodeToRelocate.getAttribute("slot") === slotName) {
403
- return true;
404
- }
405
- return false;
406
- }
407
- if (nodeToRelocate["s-sn"] === slotName) {
408
- return true;
409
- }
410
- return slotName === "";
411
- };
412
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
413
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
414
- return;
415
- }
416
- const slottedNodeLocation = document.createTextNode("");
417
- slottedNodeLocation["s-nr"] = newChild;
418
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
419
- const parent = slotNode["s-cr"].parentNode;
420
- const appendMethod = internalCall(parent, "appendChild");
421
- if (typeof position !== "undefined") {
422
- slottedNodeLocation["s-oo"] = position;
423
- const childNodes = internalCall(parent, "childNodes");
424
- const slotRelocateNodes = [slottedNodeLocation];
425
- childNodes.forEach((n) => {
426
- if (n["s-nr"]) slotRelocateNodes.push(n);
427
- });
428
- slotRelocateNodes.sort((a, b) => {
429
- if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
430
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
431
- return 0;
432
- });
433
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
434
- } else {
435
- appendMethod.call(parent, slottedNodeLocation);
436
- }
437
- newChild["s-ol"] = slottedNodeLocation;
438
- newChild["s-sh"] = slotNode["s-hn"];
439
- };
440
- var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
441
- function patchSlotNode(node) {
442
- if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
443
- const assignedFactory = (elementsOnly) => (function(opts) {
444
- const toReturn = [];
445
- const slotName = this["s-sn"];
446
- if (opts == null ? void 0 : opts.flatten) {
447
- console.error(`
448
- Flattening is not supported for Stencil non-shadow slots.
449
- You can use \`.childNodes\` to nested slot fallback content.
450
- If you have a particular use case, please open an issue on the Stencil repo.
451
- `);
452
- }
453
- const parent = this["s-cr"].parentElement;
454
- const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
455
- slottedNodes.forEach((n) => {
456
- if (slotName === getSlotName(n)) {
457
- toReturn.push(n);
458
- }
459
- });
460
- if (elementsOnly) {
461
- return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
462
- }
463
- return toReturn;
464
- }).bind(node);
465
- node.assignedElements = assignedFactory(true);
466
- node.assignedNodes = assignedFactory(false);
467
- }
468
- function internalCall(node, method) {
469
- if ("__" + method in node) {
470
- const toReturn = node["__" + method];
471
- if (typeof toReturn !== "function") return toReturn;
472
- return toReturn.bind(node);
473
- } else {
474
- if (typeof node[method] !== "function") return node[method];
475
- return node[method].bind(node);
476
- }
477
- }
478
- var createTime = (fnName, tagName = "") => {
479
- {
480
- return () => {
481
- return;
482
- };
483
- }
484
- };
485
- var h = (nodeName, vnodeData, ...children) => {
486
- let child = null;
487
- let key = null;
488
- let slotName = null;
489
- let simple = false;
490
- let lastSimple = false;
491
- const vNodeChildren = [];
492
- const walk = (c) => {
493
- for (let i2 = 0; i2 < c.length; i2++) {
494
- child = c[i2];
495
- if (Array.isArray(child)) {
496
- walk(child);
497
- } else if (child != null && typeof child !== "boolean") {
498
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
499
- child = String(child);
500
- }
501
- if (simple && lastSimple) {
502
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
503
- } else {
504
- vNodeChildren.push(simple ? newVNode(null, child) : child);
505
- }
506
- lastSimple = simple;
507
- }
508
- }
509
- };
510
- walk(children);
511
- if (vnodeData) {
512
- if (vnodeData.key) {
513
- key = vnodeData.key;
514
- }
515
- if (vnodeData.name) {
516
- slotName = vnodeData.name;
517
- }
518
- {
519
- const classData = vnodeData.className || vnodeData.class;
520
- if (classData) {
521
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
522
- }
523
- }
524
- }
525
- if (typeof nodeName === "function") {
526
- return nodeName(
527
- vnodeData === null ? {} : vnodeData,
528
- vNodeChildren,
529
- vdomFnUtils
530
- );
531
- }
532
- const vnode = newVNode(nodeName, null);
533
- vnode.$attrs$ = vnodeData;
534
- if (vNodeChildren.length > 0) {
535
- vnode.$children$ = vNodeChildren;
536
- }
537
- {
538
- vnode.$key$ = key;
539
- }
540
- {
541
- vnode.$name$ = slotName;
542
- }
543
- return vnode;
544
- };
545
- var newVNode = (tag, text) => {
546
- const vnode = {
547
- $flags$: 0,
548
- $tag$: tag,
549
- $text$: text,
550
- $elm$: null,
551
- $children$: null
552
- };
553
- {
554
- vnode.$attrs$ = null;
555
- }
556
- {
557
- vnode.$key$ = null;
558
- }
559
- {
560
- vnode.$name$ = null;
561
- }
562
- return vnode;
563
- };
564
- var Host = {};
565
- var isHost = (node) => node && node.$tag$ === Host;
566
- var vdomFnUtils = {
567
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
568
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
569
- };
570
- var convertToPublic = (node) => ({
571
- vattrs: node.$attrs$,
572
- vchildren: node.$children$,
573
- vkey: node.$key$,
574
- vname: node.$name$,
575
- vtag: node.$tag$,
576
- vtext: node.$text$
577
- });
578
- var convertToPrivate = (node) => {
579
- if (typeof node.vtag === "function") {
580
- const vnodeData = { ...node.vattrs };
581
- if (node.vkey) {
582
- vnodeData.key = node.vkey;
583
- }
584
- if (node.vname) {
585
- vnodeData.name = node.vname;
586
- }
587
- return h(node.vtag, vnodeData, ...node.vchildren || []);
588
- }
589
- const vnode = newVNode(node.vtag, node.vtext);
590
- vnode.$attrs$ = node.vattrs;
591
- vnode.$children$ = node.vchildren;
592
- vnode.$key$ = node.vkey;
593
- vnode.$name$ = node.vname;
594
- return vnode;
595
- };
596
-
597
- // src/runtime/client-hydrate.ts
598
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
599
- var _a;
600
- const endHydrate = createTime("hydrateClient", tagName);
601
- const shadowRoot = hostElm.shadowRoot;
602
- const childRenderNodes = [];
603
- const slotNodes = [];
604
- const slottedNodes = [];
605
- const shadowRootNodes = shadowRoot ? [] : null;
606
- const vnode = newVNode(tagName, null);
607
- vnode.$elm$ = hostElm;
608
- const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
609
- members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
610
- var _a2, _b;
611
- if (!(memberFlags & 31 /* Prop */)) {
612
- return;
613
- }
614
- const attributeName = metaAttributeName || memberName;
615
- const attrVal = hostElm.getAttribute(attributeName);
616
- if (attrVal !== null) {
617
- const attrPropVal = parsePropertyValue(
618
- attrVal,
619
- memberFlags,
620
- !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
621
- );
622
- (_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
623
- }
624
- });
625
- if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
626
- initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
627
- }
628
- hostElm[HYDRATE_ID] = hostId;
629
- hostElm.removeAttribute(HYDRATE_ID);
630
- hostRef.$vnode$ = clientHydrate(
631
- vnode,
632
- childRenderNodes,
633
- slotNodes,
634
- shadowRootNodes,
635
- hostElm,
636
- hostElm,
637
- hostId,
638
- slottedNodes
639
- );
640
- let crIndex = 0;
641
- const crLength = childRenderNodes.length;
642
- let childRenderNode;
643
- for (crIndex; crIndex < crLength; crIndex++) {
644
- childRenderNode = childRenderNodes[crIndex];
645
- const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
646
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
647
- const node = childRenderNode.$elm$;
648
- if (!shadowRoot) {
649
- node["s-hn"] = tagName.toUpperCase();
650
- if (childRenderNode.$tag$ === "slot") {
651
- node["s-cr"] = hostElm["s-cr"];
652
- }
653
- }
654
- if (childRenderNode.$tag$ === "slot") {
655
- childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
656
- if (childRenderNode.$children$) {
657
- childRenderNode.$flags$ |= 2 /* isSlotFallback */;
658
- if (!childRenderNode.$elm$.childNodes.length) {
659
- childRenderNode.$children$.forEach((c) => {
660
- childRenderNode.$elm$.appendChild(c.$elm$);
661
- });
662
- }
663
- } else {
664
- childRenderNode.$flags$ |= 1 /* isSlotReference */;
665
- }
666
- }
667
- if (orgLocationNode && orgLocationNode.isConnected) {
668
- if (shadowRoot && orgLocationNode["s-en"] === "") {
669
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
670
- }
671
- orgLocationNode.parentNode.removeChild(orgLocationNode);
672
- if (!shadowRoot) {
673
- node["s-oo"] = parseInt(childRenderNode.$nodeId$);
674
- }
675
- }
676
- plt.$orgLocNodes$.delete(orgLocationId);
677
- }
678
- const hosts = [];
679
- const snLen = slottedNodes.length;
680
- let snIndex = 0;
681
- let slotGroup;
682
- let snGroupIdx;
683
- let snGroupLen;
684
- let slottedItem;
685
- for (snIndex; snIndex < snLen; snIndex++) {
686
- slotGroup = slottedNodes[snIndex];
687
- if (!slotGroup || !slotGroup.length) continue;
688
- snGroupLen = slotGroup.length;
689
- snGroupIdx = 0;
690
- for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
691
- slottedItem = slotGroup[snGroupIdx];
692
- if (!hosts[slottedItem.hostId]) {
693
- hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
694
- }
695
- if (!hosts[slottedItem.hostId]) continue;
696
- const hostEle = hosts[slottedItem.hostId];
697
- if (!hostEle.shadowRoot || !shadowRoot) {
698
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
699
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
700
- slottedItem.slot["s-cr"] = hostEle;
701
- } else {
702
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
703
- }
704
- addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
705
- }
706
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
707
- hostEle.appendChild(slottedItem.node);
708
- }
709
- }
710
- }
711
- if (shadowRoot && !shadowRoot.childNodes.length) {
712
- let rnIdex = 0;
713
- const rnLen = shadowRootNodes.length;
714
- if (rnLen) {
715
- for (rnIdex; rnIdex < rnLen; rnIdex++) {
716
- shadowRoot.appendChild(shadowRootNodes[rnIdex]);
717
- }
718
- Array.from(hostElm.childNodes).forEach((node) => {
719
- if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
720
- if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
721
- node.removeAttribute("hidden");
722
- } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
723
- node.parentNode.removeChild(node);
724
- }
725
- }
726
- });
727
- }
728
- }
729
- plt.$orgLocNodes$.delete(hostElm["s-id"]);
730
- hostRef.$hostElement$ = hostElm;
731
- endHydrate();
732
- };
733
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
734
- let childNodeType;
735
- let childIdSplt;
736
- let childVNode;
737
- let i2;
738
- if (node.nodeType === 1 /* ElementNode */) {
739
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
740
- if (childNodeType) {
741
- childIdSplt = childNodeType.split(".");
742
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
743
- childVNode = createSimpleVNode({
744
- $flags$: 0,
745
- $hostId$: childIdSplt[0],
746
- $nodeId$: childIdSplt[1],
747
- $depth$: childIdSplt[2],
748
- $index$: childIdSplt[3],
749
- $tag$: node.tagName.toLowerCase(),
750
- $elm$: node,
751
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
752
- // won't try to reconcile them. Classes set on the node will be blown away.
753
- $attrs$: { class: node.className || "" }
754
- });
755
- childRenderNodes.push(childVNode);
756
- node.removeAttribute(HYDRATE_CHILD_ID);
757
- if (!parentVNode.$children$) {
758
- parentVNode.$children$ = [];
759
- }
760
- const slotName = childVNode.$elm$.getAttribute("s-sn");
761
- if (typeof slotName === "string") {
762
- if (childVNode.$tag$ === "slot-fb") {
763
- addSlot(
764
- slotName,
765
- childIdSplt[2],
766
- childVNode,
767
- node,
768
- parentVNode,
769
- childRenderNodes,
770
- slotNodes,
771
- shadowRootNodes,
772
- slottedNodes
773
- );
774
- }
775
- childVNode.$elm$["s-sn"] = slotName;
776
- childVNode.$elm$.removeAttribute("s-sn");
777
- }
778
- if (childVNode.$index$ !== void 0) {
779
- parentVNode.$children$[childVNode.$index$] = childVNode;
780
- }
781
- parentVNode = childVNode;
782
- if (shadowRootNodes && childVNode.$depth$ === "0") {
783
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
784
- }
785
- }
786
- }
787
- if (node.shadowRoot) {
788
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
789
- clientHydrate(
790
- parentVNode,
791
- childRenderNodes,
792
- slotNodes,
793
- shadowRootNodes,
794
- hostElm,
795
- node.shadowRoot.childNodes[i2],
796
- hostId,
797
- slottedNodes
798
- );
799
- }
800
- }
801
- const nonShadowNodes = node.__childNodes || node.childNodes;
802
- for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
803
- clientHydrate(
804
- parentVNode,
805
- childRenderNodes,
806
- slotNodes,
807
- shadowRootNodes,
808
- hostElm,
809
- nonShadowNodes[i2],
810
- hostId,
811
- slottedNodes
812
- );
813
- }
814
- } else if (node.nodeType === 8 /* CommentNode */) {
815
- childIdSplt = node.nodeValue.split(".");
816
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
817
- childNodeType = childIdSplt[0];
818
- childVNode = createSimpleVNode({
819
- $hostId$: childIdSplt[1],
820
- $nodeId$: childIdSplt[2],
821
- $depth$: childIdSplt[3],
822
- $index$: childIdSplt[4] || "0",
823
- $elm$: node,
824
- $attrs$: null,
825
- $children$: null,
826
- $key$: null,
827
- $name$: null,
828
- $tag$: null,
829
- $text$: null
830
- });
831
- if (childNodeType === TEXT_NODE_ID) {
832
- childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
833
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
834
- childVNode.$text$ = childVNode.$elm$.textContent;
835
- childRenderNodes.push(childVNode);
836
- node.remove();
837
- if (hostId === childVNode.$hostId$) {
838
- if (!parentVNode.$children$) {
839
- parentVNode.$children$ = [];
840
- }
841
- parentVNode.$children$[childVNode.$index$] = childVNode;
842
- }
843
- if (shadowRootNodes && childVNode.$depth$ === "0") {
844
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
845
- }
846
- }
847
- } else if (childNodeType === COMMENT_NODE_ID) {
848
- childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
849
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
850
- childRenderNodes.push(childVNode);
851
- node.remove();
852
- }
853
- } else if (childVNode.$hostId$ === hostId) {
854
- if (childNodeType === SLOT_NODE_ID) {
855
- const slotName = node["s-sn"] = childIdSplt[5] || "";
856
- addSlot(
857
- slotName,
858
- childIdSplt[2],
859
- childVNode,
860
- node,
861
- parentVNode,
862
- childRenderNodes,
863
- slotNodes,
864
- shadowRootNodes,
865
- slottedNodes
866
- );
867
- } else if (childNodeType === CONTENT_REF_ID) {
868
- if (shadowRootNodes) {
869
- node.remove();
870
- } else {
871
- hostElm["s-cr"] = node;
872
- node["s-cn"] = true;
873
- }
874
- }
875
- }
876
- }
877
- } else if (parentVNode && parentVNode.$tag$ === "style") {
878
- const vnode = newVNode(null, node.textContent);
879
- vnode.$elm$ = node;
880
- vnode.$index$ = "0";
881
- parentVNode.$children$ = [vnode];
882
- } else {
883
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
884
- node.remove();
885
- }
886
- }
887
- return parentVNode;
888
- };
889
- var initializeDocumentHydrate = (node, orgLocNodes) => {
890
- if (node.nodeType === 1 /* ElementNode */) {
891
- const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
892
- if (componentId) {
893
- orgLocNodes.set(componentId, node);
894
- }
895
- let i2 = 0;
896
- if (node.shadowRoot) {
897
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
898
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
899
- }
900
- }
901
- const nonShadowNodes = node.__childNodes || node.childNodes;
902
- for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
903
- initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
904
- }
905
- } else if (node.nodeType === 8 /* CommentNode */) {
906
- const childIdSplt = node.nodeValue.split(".");
907
- if (childIdSplt[0] === ORG_LOCATION_ID) {
908
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
909
- node.nodeValue = "";
910
- node["s-en"] = childIdSplt[3];
911
- }
912
- }
913
- };
914
- var createSimpleVNode = (vnode) => {
915
- const defaultVNode = {
916
- $flags$: 0,
917
- $hostId$: null,
918
- $nodeId$: null,
919
- $depth$: null,
920
- $index$: "0",
921
- $elm$: null,
922
- $attrs$: null,
923
- $children$: null,
924
- $key$: null,
925
- $name$: null,
926
- $tag$: null,
927
- $text$: null
928
- };
929
- return { ...defaultVNode, ...vnode };
930
- };
931
- function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
932
- node["s-sr"] = true;
933
- childVNode.$name$ = slotName || null;
934
- childVNode.$tag$ = "slot";
935
- const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
936
- if (shadowRootNodes && win.document) {
937
- const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
938
- if (childVNode.$name$) {
939
- childVNode.$elm$.setAttribute("name", slotName);
940
- }
941
- if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
942
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
943
- } else {
944
- node.parentNode.insertBefore(childVNode.$elm$, node);
945
- }
946
- addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
947
- node.remove();
948
- if (childVNode.$depth$ === "0") {
949
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
950
- }
951
- } else {
952
- const slot = childVNode.$elm$;
953
- const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
954
- addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
955
- patchSlotNode(node);
956
- if (shouldMove) {
957
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
958
- }
959
- childRenderNodes.push(childVNode);
960
- }
961
- slotNodes.push(childVNode);
962
- if (!parentVNode.$children$) {
963
- parentVNode.$children$ = [];
964
- }
965
- parentVNode.$children$[childVNode.$index$] = childVNode;
966
- }
967
- var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
968
- let slottedNode = slotNode.nextSibling;
969
- slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
970
- while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
971
- slottedNode["s-sn"] = slotName;
972
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
973
- slottedNode = slottedNode.nextSibling;
974
- }
975
- };
976
- var findCorrespondingNode = (node, type) => {
977
- let sibling = node;
978
- do {
979
- sibling = sibling.nextSibling;
980
- } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
981
- return sibling;
982
- };
983
- var createSupportsRuleRe = (selector) => {
984
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
985
- return new RegExp(
986
- // First capture group: match any context before the selector that's not inside @supports selector()
987
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
988
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
989
- "g"
990
- );
991
- };
992
- createSupportsRuleRe("::slotted");
993
- createSupportsRuleRe(":host");
994
- createSupportsRuleRe(":host-context");
995
- var parsePropertyValue = (propValue, propType, isFormAssociated) => {
996
- if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
997
- try {
998
- propValue = JSON.parse(propValue);
999
- return propValue;
1000
- } catch (e) {
1001
- }
1002
- }
1003
- if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1004
- propValue = deserializeProperty(propValue);
1005
- return propValue;
1006
- }
1007
- if (propValue != null && !isComplexType(propValue)) {
1008
- if (propType & 4 /* Boolean */) {
1009
- if (isFormAssociated && typeof propValue === "string") {
1010
- return propValue === "" || !!propValue;
1011
- } else {
1012
- return propValue === "false" ? false : propValue === "" || !!propValue;
1013
- }
1014
- }
1015
- if (propType & 2 /* Number */) {
1016
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
1017
- }
1018
- if (propType & 1 /* String */) {
1019
- return String(propValue);
1020
- }
1021
- return propValue;
1022
- }
1023
- return propValue;
1024
- };
1025
- var getElement = (ref) => ref;
1026
-
1027
- // src/runtime/event-emitter.ts
1028
- var createEvent = (ref, name, flags) => {
1029
- const elm = getElement(ref);
1030
- return {
1031
- emit: (detail) => {
1032
- return emitEvent(elm, name, {
1033
- bubbles: true,
1034
- composed: true,
1035
- cancelable: true,
1036
- detail
1037
- });
1038
- }
1039
- };
1040
- };
1041
- var emitEvent = (elm, name, opts) => {
1042
- const ev = plt.ce(name, opts);
1043
- elm.dispatchEvent(ev);
1044
- return ev;
1045
- };
1046
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1047
- var registerStyle = (scopeId2, cssText, allowCS) => {
1048
- let style = styles.get(scopeId2);
1049
- if (supportsConstructableStylesheets && allowCS) {
1050
- style = style || new CSSStyleSheet();
1051
- if (typeof style === "string") {
1052
- style = cssText;
1053
- } else {
1054
- style.replaceSync(cssText);
1055
- }
1056
- } else {
1057
- style = cssText;
1058
- }
1059
- styles.set(scopeId2, style);
1060
- };
1061
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
1062
- var _a;
1063
- const scopeId2 = getScopeId(cmpMeta);
1064
- const style = styles.get(scopeId2);
1065
- if (!win.document) {
1066
- return scopeId2;
1067
- }
1068
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
1069
- if (style) {
1070
- if (typeof style === "string") {
1071
- styleContainerNode = styleContainerNode.head || styleContainerNode;
1072
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1073
- let styleElm;
1074
- if (!appliedStyles) {
1075
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1076
- }
1077
- if (!appliedStyles.has(scopeId2)) {
1078
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1079
- styleElm.innerHTML = style;
1080
- } else {
1081
- styleElm = win.document.createElement("style");
1082
- styleElm.innerHTML = style;
1083
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1084
- if (nonce != null) {
1085
- styleElm.setAttribute("nonce", nonce);
1086
- }
1087
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1088
- if (styleContainerNode.nodeName === "HEAD") {
1089
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1090
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1091
- styleContainerNode.insertBefore(
1092
- styleElm,
1093
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1094
- );
1095
- } else if ("host" in styleContainerNode) {
1096
- if (supportsConstructableStylesheets) {
1097
- const stylesheet = new CSSStyleSheet();
1098
- stylesheet.replaceSync(style);
1099
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1100
- } else {
1101
- const existingStyleContainer = styleContainerNode.querySelector("style");
1102
- if (existingStyleContainer) {
1103
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1104
- } else {
1105
- styleContainerNode.prepend(styleElm);
1106
- }
1107
- }
1108
- } else {
1109
- styleContainerNode.append(styleElm);
1110
- }
1111
- }
1112
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1113
- styleContainerNode.insertBefore(styleElm, null);
1114
- }
1115
- }
1116
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1117
- styleElm.innerHTML += SLOT_FB_CSS;
1118
- }
1119
- if (appliedStyles) {
1120
- appliedStyles.add(scopeId2);
1121
- }
1122
- }
1123
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1124
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1125
- }
1126
- }
1127
- return scopeId2;
1128
- };
1129
- var attachStyles = (hostRef) => {
1130
- const cmpMeta = hostRef.$cmpMeta$;
1131
- const elm = hostRef.$hostElement$;
1132
- const flags = cmpMeta.$flags$;
1133
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1134
- const scopeId2 = addStyle(
1135
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1136
- cmpMeta);
1137
- if (flags & 10 /* needsScopedEncapsulation */) {
1138
- elm["s-sc"] = scopeId2;
1139
- elm.classList.add(scopeId2 + "-h");
1140
- }
1141
- endAttachStyles();
1142
- };
1143
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
1144
- var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1145
- var hydrateScopedToShadow = () => {
1146
- if (!win.document) {
1147
- return;
1148
- }
1149
- const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1150
- let i2 = 0;
1151
- for (; i2 < styles2.length; i2++) {
1152
- registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1153
- }
1154
- };
1155
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1156
- if (oldValue === newValue) {
1157
- return;
1158
- }
1159
- let isProp = isMemberInElement(elm, memberName);
1160
- let ln = memberName.toLowerCase();
1161
- if (memberName === "class") {
1162
- const classList = elm.classList;
1163
- const oldClasses = parseClassList(oldValue);
1164
- let newClasses = parseClassList(newValue);
1165
- if (elm["s-si"] && initialRender) {
1166
- newClasses.push(elm["s-si"]);
1167
- oldClasses.forEach((c) => {
1168
- if (c.startsWith(elm["s-si"])) newClasses.push(c);
1169
- });
1170
- newClasses = [...new Set(newClasses)];
1171
- classList.add(...newClasses);
1172
- } else {
1173
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
1174
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
1175
- }
1176
- } else if (memberName === "style") {
1177
- {
1178
- for (const prop in oldValue) {
1179
- if (!newValue || newValue[prop] == null) {
1180
- if (prop.includes("-")) {
1181
- elm.style.removeProperty(prop);
1182
- } else {
1183
- elm.style[prop] = "";
1184
- }
1185
- }
1186
- }
1187
- }
1188
- for (const prop in newValue) {
1189
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
1190
- if (prop.includes("-")) {
1191
- elm.style.setProperty(prop, newValue[prop]);
1192
- } else {
1193
- elm.style[prop] = newValue[prop];
1194
- }
1195
- }
1196
- }
1197
- } else if (memberName === "key") ; else if (memberName === "ref") {
1198
- if (newValue) {
1199
- newValue(elm);
1200
- }
1201
- } else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
1202
- if (memberName[2] === "-") {
1203
- memberName = memberName.slice(3);
1204
- } else if (isMemberInElement(win, ln)) {
1205
- memberName = ln.slice(2);
1206
- } else {
1207
- memberName = ln[2] + memberName.slice(3);
1208
- }
1209
- if (oldValue || newValue) {
1210
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1211
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1212
- if (oldValue) {
1213
- plt.rel(elm, memberName, oldValue, capture);
1214
- }
1215
- if (newValue) {
1216
- plt.ael(elm, memberName, newValue, capture);
1217
- }
1218
- }
1219
- } else {
1220
- const isComplex = isComplexType(newValue);
1221
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
1222
- try {
1223
- if (!elm.tagName.includes("-")) {
1224
- const n = newValue == null ? "" : newValue;
1225
- if (memberName === "list") {
1226
- isProp = false;
1227
- } else if (oldValue == null || elm[memberName] != n) {
1228
- if (typeof elm.__lookupSetter__(memberName) === "function") {
1229
- elm[memberName] = n;
1230
- } else {
1231
- elm.setAttribute(memberName, n);
1232
- }
1233
- }
1234
- } else if (elm[memberName] !== newValue) {
1235
- elm[memberName] = newValue;
1236
- }
1237
- } catch (e) {
1238
- }
1239
- }
1240
- let xlink = false;
1241
- {
1242
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1243
- memberName = ln;
1244
- xlink = true;
1245
- }
1246
- }
1247
- if (newValue == null || newValue === false) {
1248
- if (newValue !== false || elm.getAttribute(memberName) === "") {
1249
- if (xlink) {
1250
- elm.removeAttributeNS(XLINK_NS, memberName);
1251
- } else {
1252
- elm.removeAttribute(memberName);
1253
- }
1254
- }
1255
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
1256
- newValue = newValue === true ? "" : newValue;
1257
- if (xlink) {
1258
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
1259
- } else {
1260
- elm.setAttribute(memberName, newValue);
1261
- }
1262
- }
1263
- }
1264
- };
1265
- var parseClassListRegex = /\s/;
1266
- var parseClassList = (value) => {
1267
- if (typeof value === "object" && value && "baseVal" in value) {
1268
- value = value.baseVal;
1269
- }
1270
- if (!value || typeof value !== "string") {
1271
- return [];
1272
- }
1273
- return value.split(parseClassListRegex);
1274
- };
1275
- var CAPTURE_EVENT_SUFFIX = "Capture";
1276
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1277
-
1278
- // src/runtime/vdom/update-element.ts
1279
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
1280
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
1281
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
1282
- const newVnodeAttrs = newVnode.$attrs$ || {};
1283
- {
1284
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
1285
- if (!(memberName in newVnodeAttrs)) {
1286
- setAccessor(
1287
- elm,
1288
- memberName,
1289
- oldVnodeAttrs[memberName],
1290
- void 0,
1291
- isSvgMode2,
1292
- newVnode.$flags$,
1293
- isInitialRender
1294
- );
1295
- }
1296
- }
1297
- }
1298
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
1299
- setAccessor(
1300
- elm,
1301
- memberName,
1302
- oldVnodeAttrs[memberName],
1303
- newVnodeAttrs[memberName],
1304
- isSvgMode2,
1305
- newVnode.$flags$,
1306
- isInitialRender
1307
- );
1308
- }
1309
- };
1310
- function sortedAttrNames(attrNames) {
1311
- return attrNames.includes("ref") ? (
1312
- // we need to sort these to ensure that `'ref'` is the last attr
1313
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
1314
- ) : (
1315
- // no need to sort, return the original array
1316
- attrNames
1317
- );
1318
- }
1319
- var contentRef;
1320
- var hostTagName;
1321
- var useNativeShadowDom = false;
1322
- var checkSlotFallbackVisibility = false;
1323
- var checkSlotRelocate = false;
1324
- var isSvgMode = false;
1325
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1326
- var _a;
1327
- const newVNode2 = newParentVNode.$children$[childIndex];
1328
- let i2 = 0;
1329
- let elm;
1330
- let childNode;
1331
- let oldVNode;
1332
- if (!useNativeShadowDom) {
1333
- checkSlotRelocate = true;
1334
- if (newVNode2.$tag$ === "slot") {
1335
- newVNode2.$flags$ |= newVNode2.$children$ ? (
1336
- // slot element has fallback content
1337
- // still create an element that "mocks" the slot element
1338
- 2 /* isSlotFallback */
1339
- ) : (
1340
- // slot element does not have fallback content
1341
- // create an html comment we'll use to always reference
1342
- // where actual slot content should sit next to
1343
- 1 /* isSlotReference */
1344
- );
1345
- }
1346
- }
1347
- if (newVNode2.$text$ !== null) {
1348
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
1349
- } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
1350
- elm = newVNode2.$elm$ = win.document.createTextNode("");
1351
- {
1352
- updateElement(null, newVNode2, isSvgMode);
1353
- }
1354
- } else {
1355
- if (!isSvgMode) {
1356
- isSvgMode = newVNode2.$tag$ === "svg";
1357
- }
1358
- if (!win.document) {
1359
- throw new Error(
1360
- "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
1361
- );
1362
- }
1363
- elm = newVNode2.$elm$ = win.document.createElementNS(
1364
- isSvgMode ? SVG_NS : HTML_NS,
1365
- !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
1366
- ) ;
1367
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
1368
- isSvgMode = false;
1369
- }
1370
- {
1371
- updateElement(null, newVNode2, isSvgMode);
1372
- }
1373
- if (newVNode2.$children$) {
1374
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
1375
- childNode = createElm(oldParentVNode, newVNode2, i2);
1376
- if (childNode) {
1377
- elm.appendChild(childNode);
1378
- }
1379
- }
1380
- }
1381
- {
1382
- if (newVNode2.$tag$ === "svg") {
1383
- isSvgMode = false;
1384
- } else if (elm.tagName === "foreignObject") {
1385
- isSvgMode = true;
1386
- }
1387
- }
1388
- }
1389
- elm["s-hn"] = hostTagName;
1390
- {
1391
- if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
1392
- elm["s-sr"] = true;
1393
- elm["s-cr"] = contentRef;
1394
- elm["s-sn"] = newVNode2.$name$ || "";
1395
- elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1396
- patchSlotNode(elm);
1397
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
1398
- if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
1399
- {
1400
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
1401
- }
1402
- }
1403
- }
1404
- }
1405
- return elm;
1406
- };
1407
- var putBackInOriginalLocation = (parentElm, recursive) => {
1408
- plt.$flags$ |= 1 /* isTmpDisconnected */;
1409
- const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
1410
- for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
1411
- const childNode = oldSlotChildNodes[i2];
1412
- if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
1413
- insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
1414
- childNode["s-ol"].remove();
1415
- childNode["s-ol"] = void 0;
1416
- childNode["s-sh"] = void 0;
1417
- checkSlotRelocate = true;
1418
- }
1419
- if (recursive) {
1420
- putBackInOriginalLocation(childNode, recursive);
1421
- }
1422
- }
1423
- plt.$flags$ &= -2 /* isTmpDisconnected */;
1424
- };
1425
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1426
- let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
1427
- let childNode;
1428
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1429
- containerElm = containerElm.shadowRoot;
1430
- }
1431
- for (; startIdx <= endIdx; ++startIdx) {
1432
- if (vnodes[startIdx]) {
1433
- childNode = createElm(null, parentVNode, startIdx);
1434
- if (childNode) {
1435
- vnodes[startIdx].$elm$ = childNode;
1436
- insertBefore(containerElm, childNode, referenceNode(before) );
1437
- }
1438
- }
1439
- }
1440
- };
1441
- var removeVnodes = (vnodes, startIdx, endIdx) => {
1442
- for (let index = startIdx; index <= endIdx; ++index) {
1443
- const vnode = vnodes[index];
1444
- if (vnode) {
1445
- const elm = vnode.$elm$;
1446
- nullifyVNodeRefs(vnode);
1447
- if (elm) {
1448
- {
1449
- checkSlotFallbackVisibility = true;
1450
- if (elm["s-ol"]) {
1451
- elm["s-ol"].remove();
1452
- } else {
1453
- putBackInOriginalLocation(elm, true);
1454
- }
1455
- }
1456
- elm.remove();
1457
- }
1458
- }
1459
- }
1460
- };
1461
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
1462
- let oldStartIdx = 0;
1463
- let newStartIdx = 0;
1464
- let idxInOld = 0;
1465
- let i2 = 0;
1466
- let oldEndIdx = oldCh.length - 1;
1467
- let oldStartVnode = oldCh[0];
1468
- let oldEndVnode = oldCh[oldEndIdx];
1469
- let newEndIdx = newCh.length - 1;
1470
- let newStartVnode = newCh[0];
1471
- let newEndVnode = newCh[newEndIdx];
1472
- let node;
1473
- let elmToMove;
1474
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
1475
- if (oldStartVnode == null) {
1476
- oldStartVnode = oldCh[++oldStartIdx];
1477
- } else if (oldEndVnode == null) {
1478
- oldEndVnode = oldCh[--oldEndIdx];
1479
- } else if (newStartVnode == null) {
1480
- newStartVnode = newCh[++newStartIdx];
1481
- } else if (newEndVnode == null) {
1482
- newEndVnode = newCh[--newEndIdx];
1483
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
1484
- patch(oldStartVnode, newStartVnode, isInitialRender);
1485
- oldStartVnode = oldCh[++oldStartIdx];
1486
- newStartVnode = newCh[++newStartIdx];
1487
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
1488
- patch(oldEndVnode, newEndVnode, isInitialRender);
1489
- oldEndVnode = oldCh[--oldEndIdx];
1490
- newEndVnode = newCh[--newEndIdx];
1491
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1492
- if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1493
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1494
- }
1495
- patch(oldStartVnode, newEndVnode, isInitialRender);
1496
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1497
- oldStartVnode = oldCh[++oldStartIdx];
1498
- newEndVnode = newCh[--newEndIdx];
1499
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1500
- if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1501
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1502
- }
1503
- patch(oldEndVnode, newStartVnode, isInitialRender);
1504
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
1505
- oldEndVnode = oldCh[--oldEndIdx];
1506
- newStartVnode = newCh[++newStartIdx];
1507
- } else {
1508
- idxInOld = -1;
1509
- {
1510
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
1511
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
1512
- idxInOld = i2;
1513
- break;
1514
- }
1515
- }
1516
- }
1517
- if (idxInOld >= 0) {
1518
- elmToMove = oldCh[idxInOld];
1519
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1520
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1521
- } else {
1522
- patch(elmToMove, newStartVnode, isInitialRender);
1523
- oldCh[idxInOld] = void 0;
1524
- node = elmToMove.$elm$;
1525
- }
1526
- newStartVnode = newCh[++newStartIdx];
1527
- } else {
1528
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1529
- newStartVnode = newCh[++newStartIdx];
1530
- }
1531
- if (node) {
1532
- {
1533
- insertBefore(
1534
- referenceNode(oldStartVnode.$elm$).parentNode,
1535
- node,
1536
- referenceNode(oldStartVnode.$elm$)
1537
- );
1538
- }
1539
- }
1540
- }
1541
- }
1542
- if (oldStartIdx > oldEndIdx) {
1543
- addVnodes(
1544
- parentElm,
1545
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
1546
- newVNode2,
1547
- newCh,
1548
- newStartIdx,
1549
- newEndIdx
1550
- );
1551
- } else if (newStartIdx > newEndIdx) {
1552
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1553
- }
1554
- };
1555
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1556
- if (leftVNode.$tag$ === rightVNode.$tag$) {
1557
- if (leftVNode.$tag$ === "slot") {
1558
- return leftVNode.$name$ === rightVNode.$name$;
1559
- }
1560
- if (!isInitialRender) {
1561
- return leftVNode.$key$ === rightVNode.$key$;
1562
- }
1563
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1564
- leftVNode.$key$ = rightVNode.$key$;
1565
- }
1566
- return true;
1567
- }
1568
- return false;
1569
- };
1570
- var referenceNode = (node) => node && node["s-ol"] || node;
1571
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1572
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
1573
- const oldChildren = oldVNode.$children$;
1574
- const newChildren = newVNode2.$children$;
1575
- const tag = newVNode2.$tag$;
1576
- const text = newVNode2.$text$;
1577
- let defaultHolder;
1578
- if (text === null) {
1579
- {
1580
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1581
- }
1582
- {
1583
- updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1584
- }
1585
- if (oldChildren !== null && newChildren !== null) {
1586
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
1587
- } else if (newChildren !== null) {
1588
- if (oldVNode.$text$ !== null) {
1589
- elm.textContent = "";
1590
- }
1591
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
1592
- } else if (
1593
- // don't do this on initial render as it can cause non-hydrated content to be removed
1594
- !isInitialRender && BUILD.updatable && oldChildren !== null
1595
- ) {
1596
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1597
- }
1598
- if (isSvgMode && tag === "svg") {
1599
- isSvgMode = false;
1600
- }
1601
- } else if ((defaultHolder = elm["s-cr"])) {
1602
- defaultHolder.parentNode.textContent = text;
1603
- } else if (oldVNode.$text$ !== text) {
1604
- elm.data = text;
1605
- }
1606
- };
1607
- var relocateNodes = [];
1608
- var markSlotContentForRelocation = (elm) => {
1609
- let node;
1610
- let hostContentNodes;
1611
- let j;
1612
- const children = elm.__childNodes || elm.childNodes;
1613
- for (const childNode of children) {
1614
- if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1615
- hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1616
- const slotName = childNode["s-sn"];
1617
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
1618
- node = hostContentNodes[j];
1619
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
1620
- if (isNodeLocatedInSlot(node, slotName)) {
1621
- let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1622
- checkSlotFallbackVisibility = true;
1623
- node["s-sn"] = node["s-sn"] || slotName;
1624
- if (relocateNodeData) {
1625
- relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
1626
- relocateNodeData.$slotRefNode$ = childNode;
1627
- } else {
1628
- node["s-sh"] = childNode["s-hn"];
1629
- relocateNodes.push({
1630
- $slotRefNode$: childNode,
1631
- $nodeToRelocate$: node
1632
- });
1633
- }
1634
- if (node["s-sr"]) {
1635
- relocateNodes.map((relocateNode) => {
1636
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
1637
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1638
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
1639
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1640
- }
1641
- }
1642
- });
1643
- }
1644
- } else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1645
- relocateNodes.push({
1646
- $nodeToRelocate$: node
1647
- });
1648
- }
1649
- }
1650
- }
1651
- }
1652
- if (childNode.nodeType === 1 /* ElementNode */) {
1653
- markSlotContentForRelocation(childNode);
1654
- }
1655
- }
1656
- };
1657
- var nullifyVNodeRefs = (vNode) => {
1658
- {
1659
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1660
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1661
- }
1662
- };
1663
- var insertBefore = (parent, newNode, reference) => {
1664
- {
1665
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1666
- }
1667
- };
1668
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1669
- var _a, _b, _c, _d;
1670
- const hostElm = hostRef.$hostElement$;
1671
- const cmpMeta = hostRef.$cmpMeta$;
1672
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1673
- const isHostElement = isHost(renderFnResults);
1674
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1675
- hostTagName = hostElm.tagName;
1676
- if (cmpMeta.$attrsToReflect$) {
1677
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1678
- cmpMeta.$attrsToReflect$.map(
1679
- ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
1680
- );
1681
- }
1682
- if (isInitialLoad && rootVnode.$attrs$) {
1683
- for (const key of Object.keys(rootVnode.$attrs$)) {
1684
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
1685
- rootVnode.$attrs$[key] = hostElm[key];
1686
- }
1687
- }
1688
- }
1689
- rootVnode.$tag$ = null;
1690
- rootVnode.$flags$ |= 4 /* isHost */;
1691
- hostRef.$vnode$ = rootVnode;
1692
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1693
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1694
- {
1695
- contentRef = hostElm["s-cr"];
1696
- checkSlotFallbackVisibility = false;
1697
- }
1698
- patch(oldVNode, rootVnode, isInitialLoad);
1699
- {
1700
- plt.$flags$ |= 1 /* isTmpDisconnected */;
1701
- if (checkSlotRelocate) {
1702
- markSlotContentForRelocation(rootVnode.$elm$);
1703
- for (const relocateData of relocateNodes) {
1704
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1705
- if (!nodeToRelocate["s-ol"] && win.document) {
1706
- const orgLocationNode = win.document.createTextNode("");
1707
- orgLocationNode["s-nr"] = nodeToRelocate;
1708
- insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1709
- }
1710
- }
1711
- for (const relocateData of relocateNodes) {
1712
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1713
- const slotRefNode = relocateData.$slotRefNode$;
1714
- if (slotRefNode) {
1715
- const parentNodeRef = slotRefNode.parentNode;
1716
- let insertBeforeNode = slotRefNode.nextSibling;
1717
- {
1718
- let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1719
- while (orgLocationNode) {
1720
- let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1721
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1722
- refNode = refNode.nextSibling;
1723
- while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1724
- refNode = refNode == null ? void 0 : refNode.nextSibling;
1725
- }
1726
- if (!refNode || !refNode["s-nr"]) {
1727
- insertBeforeNode = refNode;
1728
- break;
1729
- }
1730
- }
1731
- orgLocationNode = orgLocationNode.previousSibling;
1732
- }
1733
- }
1734
- const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1735
- const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1736
- if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1737
- if (nodeToRelocate !== insertBeforeNode) {
1738
- if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1739
- nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1740
- }
1741
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1742
- if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1743
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1744
- }
1745
- }
1746
- }
1747
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1748
- } else {
1749
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1750
- if (isInitialLoad) {
1751
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1752
- }
1753
- nodeToRelocate.hidden = true;
1754
- }
1755
- }
1756
- }
1757
- }
1758
- if (checkSlotFallbackVisibility) {
1759
- updateFallbackSlotVisibility(rootVnode.$elm$);
1760
- }
1761
- plt.$flags$ &= -2 /* isTmpDisconnected */;
1762
- relocateNodes.length = 0;
1763
- }
1764
- contentRef = void 0;
1765
- };
1766
-
1767
- // src/runtime/update-component.ts
1768
- var attachToAncestor = (hostRef, ancestorComponent) => {
1769
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1770
- const index = ancestorComponent["s-p"].push(
1771
- new Promise(
1772
- (r) => hostRef.$onRenderResolve$ = () => {
1773
- ancestorComponent["s-p"].splice(index - 1, 1);
1774
- r();
1775
- }
1776
- )
1777
- );
1778
- }
1779
- };
1780
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1781
- {
1782
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1783
- }
1784
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1785
- hostRef.$flags$ |= 512 /* needsRerender */;
1786
- return;
1787
- }
1788
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1789
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1790
- return writeTask(dispatch) ;
1791
- };
1792
- var dispatchHooks = (hostRef, isInitialLoad) => {
1793
- const elm = hostRef.$hostElement$;
1794
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1795
- const instance = elm;
1796
- if (!instance) {
1797
- throw new Error(
1798
- `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
1799
- );
1800
- }
1801
- let maybePromise;
1802
- if (isInitialLoad) {
1803
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1804
- } else {
1805
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1806
- }
1807
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1808
- endSchedule();
1809
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1810
- };
1811
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1812
- console.error(err2);
1813
- fn();
1814
- }) : fn();
1815
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1816
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1817
- var _a;
1818
- const elm = hostRef.$hostElement$;
1819
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1820
- const rc = elm["s-rc"];
1821
- if (isInitialLoad) {
1822
- attachStyles(hostRef);
1823
- }
1824
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1825
- {
1826
- callRender(hostRef, instance, elm, isInitialLoad);
1827
- }
1828
- if (rc) {
1829
- rc.map((cb) => cb());
1830
- elm["s-rc"] = void 0;
1831
- }
1832
- endRender();
1833
- endUpdate();
1834
- {
1835
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1836
- const postUpdate = () => postUpdateComponent(hostRef);
1837
- if (childrenPromises.length === 0) {
1838
- postUpdate();
1839
- } else {
1840
- Promise.all(childrenPromises).then(postUpdate);
1841
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1842
- childrenPromises.length = 0;
1843
- }
1844
- }
1845
- };
1846
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1847
- try {
1848
- instance = instance.render() ;
1849
- {
1850
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1851
- }
1852
- {
1853
- hostRef.$flags$ |= 2 /* hasRendered */;
1854
- }
1855
- {
1856
- {
1857
- {
1858
- renderVdom(hostRef, instance, isInitialLoad);
1859
- }
1860
- }
1861
- }
1862
- } catch (e) {
1863
- consoleError(e, hostRef.$hostElement$);
1864
- }
1865
- return null;
1866
- };
1867
- var postUpdateComponent = (hostRef) => {
1868
- const tagName = hostRef.$cmpMeta$.$tagName$;
1869
- const elm = hostRef.$hostElement$;
1870
- const endPostUpdate = createTime("postUpdate", tagName);
1871
- const instance = elm;
1872
- const ancestorComponent = hostRef.$ancestorComponent$;
1873
- safeCall(instance, "componentDidRender", void 0, elm);
1874
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1875
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1876
- {
1877
- addHydratedFlag(elm);
1878
- }
1879
- safeCall(instance, "componentDidLoad", void 0, elm);
1880
- endPostUpdate();
1881
- {
1882
- hostRef.$onReadyResolve$(elm);
1883
- if (!ancestorComponent) {
1884
- appDidLoad();
1885
- }
1886
- }
1887
- } else {
1888
- safeCall(instance, "componentDidUpdate", void 0, elm);
1889
- endPostUpdate();
1890
- }
1891
- {
1892
- if (hostRef.$onRenderResolve$) {
1893
- hostRef.$onRenderResolve$();
1894
- hostRef.$onRenderResolve$ = void 0;
1895
- }
1896
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1897
- nextTick(() => scheduleUpdate(hostRef, false));
1898
- }
1899
- hostRef.$flags$ &= -517;
1900
- }
1901
- };
1902
- var appDidLoad = (who) => {
1903
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1904
- };
1905
- var safeCall = (instance, method, arg, elm) => {
1906
- if (instance && instance[method]) {
1907
- try {
1908
- return instance[method](arg);
1909
- } catch (e) {
1910
- consoleError(e, elm);
1911
- }
1912
- }
1913
- return void 0;
1914
- };
1915
- var addHydratedFlag = (elm) => {
1916
- var _b;
1917
- return elm.setAttribute((_b = BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") ;
1918
- };
1919
-
1920
- // src/runtime/set-value.ts
1921
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1922
- var setValue = (ref, propName, newVal, cmpMeta) => {
1923
- const hostRef = getHostRef(ref);
1924
- const elm = ref;
1925
- const oldVal = hostRef.$instanceValues$.get(propName);
1926
- const flags = hostRef.$flags$;
1927
- const instance = elm;
1928
- newVal = parsePropertyValue(
1929
- newVal,
1930
- cmpMeta.$members$[propName][0],
1931
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1932
- );
1933
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1934
- const didValueChange = newVal !== oldVal && !areBothNaN;
1935
- if (didValueChange) {
1936
- hostRef.$instanceValues$.set(propName, newVal);
1937
- {
1938
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1939
- const watchMethods = cmpMeta.$watchers$[propName];
1940
- if (watchMethods) {
1941
- watchMethods.map((watchMethodName) => {
1942
- try {
1943
- instance[watchMethodName](newVal, oldVal, propName);
1944
- } catch (e) {
1945
- consoleError(e, elm);
1946
- }
1947
- });
1948
- }
1949
- }
1950
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1951
- if (instance.componentShouldUpdate) {
1952
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1953
- return;
1954
- }
1955
- }
1956
- scheduleUpdate(hostRef, false);
1957
- }
1958
- }
1959
- }
1960
- };
1961
-
1962
- // src/runtime/proxy-component.ts
1963
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1964
- var _a, _b;
1965
- const prototype = Cstr.prototype;
1966
- if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1967
- FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
1968
- const originalFormAssociatedCallback = prototype[cbName];
1969
- Object.defineProperty(prototype, cbName, {
1970
- value(...args) {
1971
- const hostRef = getHostRef(this);
1972
- const instance = this;
1973
- if (!instance) {
1974
- hostRef.$onReadyPromise$.then((asyncInstance) => {
1975
- const cb = asyncInstance[cbName];
1976
- typeof cb === "function" && cb.call(asyncInstance, ...args);
1977
- });
1978
- } else {
1979
- const cb = originalFormAssociatedCallback;
1980
- typeof cb === "function" && cb.call(instance, ...args);
1981
- }
1982
- }
1983
- });
1984
- });
1985
- }
1986
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1987
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1988
- cmpMeta.$watchers$ = Cstr.watchers;
1989
- }
1990
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1991
- members.map(([memberName, [memberFlags]]) => {
1992
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
1993
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1994
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1995
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1996
- {
1997
- Object.defineProperty(prototype, memberName, {
1998
- get() {
1999
- {
2000
- return origGetter ? origGetter.apply(this) : getValue(this, memberName);
2001
- }
2002
- },
2003
- configurable: true,
2004
- enumerable: true
2005
- });
2006
- }
2007
- Object.defineProperty(prototype, memberName, {
2008
- set(newValue) {
2009
- const ref = getHostRef(this);
2010
- if (origSetter) {
2011
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2012
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
2013
- newValue = ref.$instanceValues$.get(memberName);
2014
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
2015
- ref.$instanceValues$.set(memberName, currentValue);
2016
- }
2017
- origSetter.apply(this, [
2018
- parsePropertyValue(
2019
- newValue,
2020
- memberFlags,
2021
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
2022
- )
2023
- ]);
2024
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2025
- setValue(this, memberName, newValue, cmpMeta);
2026
- return;
2027
- }
2028
- {
2029
- setValue(this, memberName, newValue, cmpMeta);
2030
- return;
2031
- }
2032
- }
2033
- });
2034
- }
2035
- });
2036
- {
2037
- const attrNameToPropName = /* @__PURE__ */ new Map();
2038
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
2039
- plt.jmp(() => {
2040
- var _a2;
2041
- const propName = attrNameToPropName.get(attrName);
2042
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ; else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
2043
- this[propName] == newValue) {
2044
- return;
2045
- } else if (propName == null) {
2046
- const hostRef = getHostRef(this);
2047
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
2048
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
2049
- const elm = this;
2050
- const instance = elm;
2051
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2052
- entry == null ? void 0 : entry.forEach((callbackName) => {
2053
- if (instance[callbackName] != null) {
2054
- instance[callbackName].call(instance, newValue, oldValue, attrName);
2055
- }
2056
- });
2057
- }
2058
- return;
2059
- }
2060
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2061
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2062
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
2063
- this[propName] = newValue;
2064
- }
2065
- });
2066
- };
2067
- Cstr.observedAttributes = Array.from(
2068
- /* @__PURE__ */ new Set([
2069
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
2070
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
2071
- var _a2;
2072
- const attrName = m[1] || propName;
2073
- attrNameToPropName.set(attrName, propName);
2074
- if (m[0] & 512 /* ReflectAttr */) {
2075
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
2076
- }
2077
- return attrName;
2078
- })
2079
- ])
2080
- );
2081
- }
2082
- }
2083
- return Cstr;
2084
- };
2085
-
2086
- // src/runtime/initialize-component.ts
2087
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2088
- let Cstr;
2089
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2090
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2091
- {
2092
- Cstr = elm.constructor;
2093
- const cmpTag = elm.localName;
2094
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2095
- }
2096
- if (Cstr && Cstr.style) {
2097
- let style;
2098
- if (typeof Cstr.style === "string") {
2099
- style = Cstr.style;
2100
- }
2101
- const scopeId2 = getScopeId(cmpMeta);
2102
- if (!styles.has(scopeId2)) {
2103
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2104
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2105
- endRegisterStyles();
2106
- }
2107
- }
2108
- }
2109
- const ancestorComponent = hostRef.$ancestorComponent$;
2110
- const schedule = () => scheduleUpdate(hostRef, true);
2111
- if (ancestorComponent && ancestorComponent["s-rc"]) {
2112
- ancestorComponent["s-rc"].push(schedule);
2113
- } else {
2114
- schedule();
2115
- }
2116
- };
2117
- var fireConnectedCallback = (instance, elm) => {
2118
- };
2119
-
2120
- // src/runtime/connected-callback.ts
2121
- var connectedCallback = (elm) => {
2122
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2123
- const hostRef = getHostRef(elm);
2124
- const cmpMeta = hostRef.$cmpMeta$;
2125
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2126
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
2127
- hostRef.$flags$ |= 1 /* hasConnected */;
2128
- let hostId;
2129
- {
2130
- hostId = elm.getAttribute(HYDRATE_ID);
2131
- if (hostId) {
2132
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2133
- const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
2134
- elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2135
- }
2136
- initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2137
- }
2138
- }
2139
- if (!hostId) {
2140
- if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2141
- cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
2142
- setContentReference(elm);
2143
- }
2144
- }
2145
- {
2146
- let ancestorComponent = elm;
2147
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
2148
- if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2149
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
2150
- break;
2151
- }
2152
- }
2153
- }
2154
- if (cmpMeta.$members$) {
2155
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2156
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2157
- const value = elm[memberName];
2158
- delete elm[memberName];
2159
- elm[memberName] = value;
2160
- }
2161
- });
2162
- }
2163
- if (BUILD.initializeNextTick) {
2164
- nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
2165
- } else {
2166
- initializeComponent(elm, hostRef, cmpMeta);
2167
- }
2168
- } else {
2169
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2170
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2171
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
2172
- }
2173
- }
2174
- endConnected();
2175
- }
2176
- };
2177
- var setContentReference = (elm) => {
2178
- if (!win.document) {
2179
- return;
2180
- }
2181
- const contentRefElm = elm["s-cr"] = win.document.createComment(
2182
- ""
2183
- );
2184
- contentRefElm["s-cn"] = true;
2185
- insertBefore(elm, contentRefElm, elm.firstChild);
2186
- };
2187
- var disconnectedCallback = async (elm) => {
2188
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2189
- const hostRef = getHostRef(elm);
2190
- {
2191
- if (hostRef.$rmListeners$) {
2192
- hostRef.$rmListeners$.map((rmListener) => rmListener());
2193
- hostRef.$rmListeners$ = void 0;
2194
- }
2195
- }
2196
- }
2197
- if (rootAppliedStyles.has(elm)) {
2198
- rootAppliedStyles.delete(elm);
2199
- }
2200
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2201
- rootAppliedStyles.delete(elm.shadowRoot);
2202
- }
2203
- };
2204
- var proxyCustomElement = (Cstr, compactMeta) => {
2205
- const cmpMeta = {
2206
- $flags$: compactMeta[0],
2207
- $tagName$: compactMeta[1]
2208
- };
2209
- {
2210
- cmpMeta.$members$ = compactMeta[2];
2211
- }
2212
- {
2213
- cmpMeta.$listeners$ = compactMeta[3];
2214
- }
2215
- {
2216
- cmpMeta.$watchers$ = Cstr.$watchers$;
2217
- }
2218
- {
2219
- cmpMeta.$attrsToReflect$ = [];
2220
- }
2221
- {
2222
- hydrateScopedToShadow();
2223
- }
2224
- const originalConnectedCallback = Cstr.prototype.connectedCallback;
2225
- const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
2226
- Object.assign(Cstr.prototype, {
2227
- __hasHostListenerAttached: false,
2228
- __registerHost() {
2229
- registerHost(this, cmpMeta);
2230
- },
2231
- connectedCallback() {
2232
- if (!this.__hasHostListenerAttached) {
2233
- const hostRef = getHostRef(this);
2234
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
2235
- this.__hasHostListenerAttached = true;
2236
- }
2237
- connectedCallback(this);
2238
- if (originalConnectedCallback) {
2239
- originalConnectedCallback.call(this);
2240
- }
2241
- },
2242
- disconnectedCallback() {
2243
- disconnectedCallback(this);
2244
- if (originalDisconnectedCallback) {
2245
- originalDisconnectedCallback.call(this);
2246
- }
2247
- },
2248
- __attachShadow() {
2249
- {
2250
- if (!this.shadowRoot) {
2251
- createShadowRoot.call(this, cmpMeta);
2252
- } else {
2253
- if (this.shadowRoot.mode !== "open") {
2254
- throw new Error(
2255
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
2256
- );
2257
- }
2258
- }
2259
- }
2260
- }
2261
- });
2262
- Cstr.is = cmpMeta.$tagName$;
2263
- return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
2264
- };
2265
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2266
- if (listeners && win.document) {
2267
- listeners.map(([flags, name, method]) => {
2268
- const target = getHostListenerTarget(win.document, elm, flags) ;
2269
- const handler = hostListenerProxy(hostRef, method);
2270
- const opts = hostListenerOpts(flags);
2271
- plt.ael(target, name, handler, opts);
2272
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
2273
- });
2274
- }
2275
- };
2276
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
2277
- try {
2278
- {
2279
- hostRef.$hostElement$[methodName](ev);
2280
- }
2281
- } catch (e) {
2282
- consoleError(e, hostRef.$hostElement$);
2283
- }
2284
- };
2285
- var getHostListenerTarget = (doc, elm, flags) => {
2286
- if (flags & 8 /* TargetWindow */) {
2287
- return win;
2288
- }
2289
- return elm;
2290
- };
2291
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
2292
- passive: (flags & 1 /* Passive */) !== 0,
2293
- capture: (flags & 2 /* Capture */) !== 0
2294
- } : (flags & 2 /* Capture */) !== 0;
2295
-
2296
- // src/runtime/nonce.ts
2297
- var setNonce = (nonce) => plt.$nonce$ = nonce;
2298
-
2299
- // src/runtime/platform-options.ts
2300
- var setPlatformOptions = (opts) => Object.assign(plt, opts);
2301
-
2302
- // src/runtime/render.ts
2303
- function render(vnode, container) {
2304
- const cmpMeta = {
2305
- $flags$: 0,
2306
- $tagName$: container.tagName
2307
- };
2308
- const ref = {
2309
- $cmpMeta$: cmpMeta,
2310
- $hostElement$: container
2311
- };
2312
- renderVdom(ref, vnode);
2313
- }
2314
-
2315
- export { H, Host as a, createEvent as c, getAssetPath, h, proxyCustomElement as p, render, setAssetPath, setNonce, setPlatformOptions };
1
+ const t=":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";var e,n,s,i,o,r,l,c,f,a,u,h,p,d,v,$,g,b=Object.create,m=Object.defineProperty,w=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,O=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},k=(t,e)=>function(){return e||(0,t[y(t)[0]])((e={exports:{}}).exports,e),e.exports},x=(t,e,n)=>e.has(t)||j("Cannot "+n),M=(t,e,n)=>(x(t,e,"read from private field"),n?n.call(t):e.get(t)),E=(t,e,n)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),N=(t,e,n)=>(x(t,e,"write to private field"),e.set(t,n),n),R=(t,e,n)=>(x(t,e,"access private method"),n),A=k({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var o=i(t,e,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+t.length,o[1]),post:n.slice(o[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function i(t,e,n){var s,i,o,r,l,c=n.indexOf(t),f=n.indexOf(e,c+1),a=c;if(c>=0&&f>0){if(t===e)return[c,f];for(s=[],o=n.length;a>=0&&!l;)a==c?(s.push(a),c=n.indexOf(t,a+1)):1==s.length?l=[s.pop(),f]:((i=s.pop())<o&&(o=i,r=f),f=n.indexOf(e,a+1)),a=c<f&&c>=0?c:f;s.length&&(l=[o,r])}return l}e.exports=n,n.range=i}}),C=k({"node_modules/brace-expansion/index.js"(t,e){var n=A();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(o).split("\\,").join(r).split("\\.").join(l)}(t),!0).map(f)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",r="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(s).join("\\").split(i).join("{").split(o).join("}").split(r).join(",").split(l).join(".")}function a(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var i=s.body,o=s.post,r=s.pre.split(",");r[r.length-1]+="{"+i+"}";var l=a(o);return o.length&&(r[r.length-1]+=l.shift(),r.push.apply(r,l)),e.push.apply(e,r),e}function u(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function v(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var r=i.pre,l=i.post.length?v(i.post,!1):[""];if(/\$$/.test(i.pre))for(var f=0;f<l.length;f++)s.push(P=r+"{"+i.body+"}"+l[f]);else{var $,g,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=b||m,y=i.body.indexOf(",")>=0;if(!w&&!y)return i.post.match(/,(?!,).*\}/)?v(t=i.pre+"{"+i.body+o+i.post):[t];if(w)$=i.body.split(/\.\./);else if(1===($=a(i.body)).length&&1===($=v($[0],!1).map(u)).length)return l.map((function(t){return i.pre+$[0]+t}));if(w){var O=c($[0]),S=c($[1]),j=Math.max($[0].length,$[1].length),k=3==$.length?Math.abs(c($[2])):1,x=p;S<O&&(k*=-1,x=d);var M=$.some(h);g=[];for(var E=O;x(E,S);E+=k){var N;if(m)"\\"===(N=String.fromCharCode(E))&&(N="");else if(N=E+"",M){var R=j-N.length;if(R>0){var A=Array(R+1).join("0");N=E<0?"-"+A+N.slice(1):A+N}}g.push(N)}}else{g=[];for(var C=0;C<$.length;C++)g.push.apply(g,v($[C],!1))}for(C=0;C<g.length;C++)for(f=0;f<l.length;f++){var P=r+g[C]+l[f];(!e||w||P)&&s.push(P)}}return s}}}),P=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(P||{}),L=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(L||{}),W="type",I="value",z="serialized:",_=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],i=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(t,n,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):s}}))},T=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},F=(t,e)=>e in t,B=(t,e)=>(0,console.error)(t,e),D=new Map,U="s-id",V="sty-id",G="c-id",Z="http://www.w3.org/1999/xlink",H=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],q="undefined"!=typeof window?window:{},J=q.HTMLElement||class{},Y={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},K=(()=>{try{return!!q.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),Q=!!K&&(()=>!!q.document&&Object.getOwnPropertyDescriptor(q.document.adoptedStyleSheets,"length").writable)(),X=!1,tt=[],et=[],nt=(t,e)=>n=>{t.push(n),X||(X=!0,e&&4&Y.l?ot(it):Y.raf(it))},st=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){B(t)}t.length=0},it=()=>{st(tt),st(et),(X=tt.length>0)&&Y.raf(it)},ot=t=>Promise.resolve(void 0).then(t),rt=nt(et,!0),lt=t=>{const e=new URL(t,Y.u);return e.origin!==q.location.origin?e.href:e.pathname},ct=t=>Y.u=t,ft=t=>"object"==(t=typeof t)||"function"===t,at=((t,e,n)=>(n=null!=t?b(O(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of y(e))S.call(t,n)||undefined===n||m(t,n,{get:()=>e[n],enumerable:!(s=w(e,n))||s.enumerable});return t})(m(n,"default",{value:t,enumerable:!0}),t)))(C()),ut=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ht={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},pt=t=>t.replace(/[[\]\\-]/g,"\\$&"),dt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),vt=t=>t.join(""),$t=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],i=[];let o=n+1,r=!1,l=!1,c=!1,f=!1,a=n,u="";t:for(;o<t.length;){const e=t.charAt(o);if("!"!==e&&"^"!==e||o!==n+1){if("]"===e&&r&&!c){a=o+1;break}if(r=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[r,c,f]]of Object.entries(ht))if(t.startsWith(e,o)){if(u)return["$.",!1,t.length-n,!0];o+=e.length,f?i.push(r):s.push(r),l=l||c;continue t}c=!1,u?(e>u?s.push(pt(u)+"-"+pt(e)):e===u&&s.push(pt(e)),u="",o++):t.startsWith("-]",o+1)?(s.push(pt(e+"-")),o+=2):t.startsWith("-",o+1)?(u=e,o+=2):(s.push(pt(e)),o++)}else c=!0,o++}else f=!0,o++}if(a<o)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===s.length&&/^\\?.$/.test(s[0])&&!f){const t=2===s[0].length?s[0].slice(-1):s[0];return[dt(t),!1,a-n,!1]}const h="["+(f?"^":"")+vt(s)+"]",p="["+(f?"":"^")+vt(i)+"]";return[s.length&&i.length?"("+h+"|"+p+")":s.length?h:p,l,a-n,!0]},gt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),bt=new Set(["!","?","+","*","@"]),mt=t=>bt.has(t),wt="(?!\\.)",yt=new Set(["[","."]),Ot=new Set(["..","."]),St=new Set("().*{}+?[]^$\\!"),jt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),kt="[^/]",xt=kt+"*?",Mt=kt+"+?",Et=class t{constructor(t,p,d={}){E(this,h),((t,e,n)=>{((t,e,n)=>{e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),E(this,e),E(this,n),E(this,s,!1),E(this,i,[]),E(this,o),E(this,r),E(this,l),E(this,c,!1),E(this,f),E(this,a),E(this,u,!1),this.type=t,t&&N(this,n,!0),N(this,o,p),N(this,e,M(this,o)?M(M(this,o),e):this),N(this,f,M(this,e)===this?d:M(M(this,e),f)),N(this,l,M(this,e)===this?[]:M(M(this,e),l)),"!"!==t||M(M(this,e),c)||M(this,l).push(this),N(this,r,M(this,o)?M(M(this,o),i).length:0)}get hasMagic(){if(void 0!==M(this,n))return M(this,n);for(const t of M(this,i))if("string"!=typeof t&&(t.type||t.hasMagic))return N(this,n,!0);return M(this,n)}toString(){return void 0!==M(this,a)?M(this,a):N(this,a,this.type?this.type+"("+M(this,i).map((t=>t+"")).join("|")+")":M(this,i).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&M(n,o)===this))throw Error("invalid part: "+n);M(this,i).push(n)}}toJSON(){var t;const n=null===this.type?M(this,i).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...M(this,i).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===M(this,e)||M(M(this,e),c)&&"!"===(null==(t=M(this,o))?void 0:t.type))&&n.push({}),n}isStart(){var n;if(M(this,e)===this)return!0;if(!(null==(n=M(this,o))?void 0:n.isStart()))return!1;if(0===M(this,r))return!0;const s=M(this,o);for(let e=0;e<M(this,r);e++){const n=M(s,i)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,n,s;if(M(this,e)===this)return!0;if("!"===(null==(t=M(this,o))?void 0:t.type))return!0;if(!(null==(n=M(this,o))?void 0:n.isEnd()))return!1;if(!this.type)return null==(s=M(this,o))?void 0:s.isEnd();const l=M(this,o)?M(M(this,o),i).length:0;return M(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of M(this,i))n.copyIn(t);return n}static fromGlob(e,n={}){var s;const i=new t(null,void 0,n);return R(s=t,d,v).call(s,e,i,0,n),i}toMMPattern(){if(this!==M(this,e))return M(this,e).toMMPattern();const t=""+this,[s,i,o,r]=this.toRegExpSource();if(!(o||M(this,n)||M(this,f).nocase&&!M(this,f).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const l=(M(this,f).nocase?"i":"")+(r?"u":"");return Object.assign(RegExp(`^${s}$`,l),{_src:s,_glob:t})}get options(){return M(this,f)}toRegExpSource(r){var l;const a=null!=r?r:!!M(this,f).dot;if(M(this,e)===this&&R(this,h,p).call(this),!this.type){const f=this.isStart()&&this.isEnd(),u=M(this,i).map((e=>{var i;const[o,l,c,a]="string"==typeof e?R(i=t,d,g).call(i,e,M(this,n),f):e.toRegExpSource(r);return N(this,n,M(this,n)||c),N(this,s,M(this,s)||a),o})).join("");let h="";if(this.isStart()&&"string"==typeof M(this,i)[0]&&(1!==M(this,i).length||!Ot.has(M(this,i)[0]))){const t=yt,e=a&&t.has(u.charAt(0))||u.startsWith("\\.")&&t.has(u.charAt(2))||u.startsWith("\\.\\.")&&t.has(u.charAt(4)),n=!a&&!r&&t.has(u.charAt(0));h=e?"(?!(?:^|/)\\.\\.?(?:$|/))":n?wt:""}let p="";return this.isEnd()&&M(M(this,e),c)&&"!"===(null==(l=M(this,o))?void 0:l.type)&&(p="(?:$|\\/)"),[h+u+p,gt(u),N(this,n,!!M(this,n)),M(this,s)]}const v="*"===this.type||"+"===this.type,b="!"===this.type?"(?:(?!(?:":"(?:";let m=R(this,h,$).call(this,a);if(this.isStart()&&this.isEnd()&&!m&&"!"!==this.type){const t=""+this;return N(this,i,[t]),this.type=null,N(this,n,void 0),[t,gt(""+this),!1,!1]}let w=!v||r||a?"":R(this,h,$).call(this,!0);w===m&&(w=""),w&&(m=`(?:${m})(?:${w})*?`);let y="";return y="!"===this.type&&M(this,u)?(this.isStart()&&!a?wt:"")+Mt:b+m+("!"===this.type?"))"+(!this.isStart()||a||r?"":wt)+xt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&w?")":"*"===this.type&&w?")?":")"+this.type),[y,gt(m),N(this,n,!!M(this,n)),M(this,s)]}};e=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,a=new WeakMap,u=new WeakMap,h=new WeakSet,p=function(){if(this!==M(this,e))throw Error("should only call on root");if(M(this,c))return this;let t;for(N(this,c,!0);t=M(this,l).pop();){if("!"!==t.type)continue;let e=t,n=M(e,o);for(;n;){for(let s=M(e,r)+1;!n.type&&s<M(n,i).length;s++)for(const e of M(t,i)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(M(n,i)[s])}e=n,n=M(e,o)}}return this},d=new WeakSet,v=function(t,e,s,o){var r,l;let c=!1,f=!1,a=-1,h=!1;if(null===e.type){let n=s,i="";for(;n<t.length;){const s=t.charAt(n++);if(c||"\\"===s)c=!c,i+=s;else if(f)n===a+1?"^"!==s&&"!"!==s||(h=!0):"]"!==s||n===a+2&&h||(f=!1),i+=s;else if("["!==s)if(o.noext||!mt(s)||"("!==t.charAt(n))i+=s;else{e.push(i),i="";const l=new Et(s,e);n=R(r=Et,d,v).call(r,t,l,n,o),e.push(l)}else f=!0,a=n,h=!1,i+=s}return e.push(i),n}let p=s+1,$=new Et(null,e);const g=[];let b="";for(;p<t.length;){const n=t.charAt(p++);if(c||"\\"===n)c=!c,b+=n;else if(f)p===a+1?"^"!==n&&"!"!==n||(h=!0):"]"!==n||p===a+2&&h||(f=!1),b+=n;else if("["!==n)if(mt(n)&&"("===t.charAt(p)){$.push(b),b="";const e=new Et(n,$);$.push(e),p=R(l=Et,d,v).call(l,t,e,p,o)}else if("|"!==n){if(")"===n)return""===b&&0===M(e,i).length&&N(e,u,!0),$.push(b),b="",e.push(...g,$),p;b+=n}else $.push(b),b="",g.push($),$=new Et(null,e);else f=!0,a=p,h=!1,b+=n}return e.type=null,N(e,n,void 0),N(e,i,[t.substring(s-1)]),p},$=function(t){return M(this,i).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,i,o,r]=e.toRegExpSource(t);return N(this,s,M(this,s)||r),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},g=function(t,e,n=!1){let s=!1,i="",o=!1;for(let r=0;r<t.length;r++){const l=t.charAt(r);if(s)s=!1,i+=(St.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,c]=$t(t,r);if(l){i+=n,o=o||s,r+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?i+=jt(l):(i+=kt,e=!0):(i+=n&&"*"===t?Mt:xt,e=!0)}else r===t.length-1?i+="\\\\":s=!0}return[i,gt(t),!!e,o]},E(Et,d);var Nt=Et,Rt=(t,e,n={})=>(ut(e),!(!n.nocomment&&"#"===e.charAt(0))&&new ne(e,n).match(t)),At=/^\*+([^+@!?\*\[\(]*)$/,Ct=t=>e=>!e.startsWith(".")&&e.endsWith(t),Pt=t=>e=>e.endsWith(t),Lt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Wt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),It=/^\*+\.\*+$/,zt=t=>!t.startsWith(".")&&t.includes("."),_t=t=>"."!==t&&".."!==t&&t.includes("."),Tt=/^\.\*+$/,Ft=t=>"."!==t&&".."!==t&&t.startsWith("."),Bt=/^\*+$/,Dt=t=>0!==t.length&&!t.startsWith("."),Ut=t=>0!==t.length&&"."!==t&&".."!==t,Vt=/^\?+([^+@!?\*\[\(]*)?$/,Gt=([t,e=""])=>{const n=Jt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Zt=([t,e=""])=>{const n=Yt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ht=([t,e=""])=>{const n=Yt([t]);return e?t=>n(t)&&t.endsWith(e):n},qt=([t,e=""])=>{const n=Jt([t]);return e?t=>n(t)&&t.endsWith(e):n},Jt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Yt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Kt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Rt.sep="win32"===Kt?"\\":"/";var Qt=Symbol("globstar **");Rt.GLOBSTAR=Qt,Rt.filter=(t,e={})=>n=>Rt(n,t,e);var Xt=(t,e={})=>Object.assign({},t,e);Rt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Rt;const e=Rt;return Object.assign(((n,s,i={})=>e(n,s,Xt(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Xt(t,n))}static defaults(n){return e.defaults(Xt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Xt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Xt(t,s))}},unescape:(n,s={})=>e.unescape(n,Xt(t,s)),escape:(n,s={})=>e.escape(n,Xt(t,s)),filter:(n,s={})=>e.filter(n,Xt(t,s)),defaults:n=>e.defaults(Xt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Xt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Xt(t,s)),match:(n,s,i={})=>e.match(n,s,Xt(t,i)),sep:e.sep,GLOBSTAR:Qt})};var te=(t,e={})=>(ut(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,at.default)(t));Rt.braceExpand=te,Rt.makeRe=(t,e={})=>new ne(t,e).makeRe(),Rt.match=(t,e,n={})=>{const s=new ne(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var ee=/[?*]|[+@!]\(.*?\)|\[|\]/,ne=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ut(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Kt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&ee.test(t[2])||ee.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let i=s;for(;"**"===n[i+1];)i++;i>s&&n.splice(s+1,i-s);const o=n[s+2],r=n[s+3];if(".."!==n[s+1])continue;if(!o||"."===o||".."===o||!r||"."===r||".."===r)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(i-1,2,...1===i&&"**"===n[i+1]?["."]:[]),0===n.length&&n.push(""),i-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,i=0,o=[],r="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])o.push("b"===r?e[i]:t[s]),s++,i++;else if(n&&"**"===t[s]&&e[i]===t[s+1])o.push(t[s]),s++;else if(n&&"**"===e[i]&&t[s]===e[i+1])o.push(e[i]),i++;else if("*"!==t[s]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===r)return!1;r="b",o.push(e[i]),s++,i++}else{if("b"===r)return!1;r="a",o.push(t[s]),s++,i++}return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=s?3:n?0:void 0,r=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof o&&"number"==typeof r){const[n,s]=[t[o],e[r]];n.toLowerCase()===s.toLowerCase()&&(e[r]=n,r>o?e=e.slice(r):o>r&&(t=t.slice(o)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,r=0,l=t.length,c=e.length;o<l&&r<c;o++,r++){this.debug("matchOne loop");var f=e[r],a=t[o];if(this.debug(e,f,a),!1===f)return!1;if(f===Qt){this.debug("GLOBSTAR",[e,f,a]);var u=o,h=r+1;if(h===c){for(this.debug("** at the end");o<l;o++)if("."===t[o]||".."===t[o]||!s.dot&&"."===t[o].charAt(0))return!1;return!0}for(;u<l;){var p=t[u];if(this.debug("\nglobstar while",t,u,e,h,p),this.matchOne(t.slice(u),e.slice(h),n))return this.debug("globstar found match!",u,l,p),!0;if("."===p||".."===p||!s.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,u,e,h);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!n||(this.debug("\n>>> no match, partial?",t,u,e,h),u!==l))}let i;if("string"==typeof f?(i=a===f,this.debug("string match",f,a,i)):(i=f.test(a),this.debug("pattern match",f,a,i)),!i)return!1}if(o===l&&r===c)return!0;if(o===l)return n;if(r===c)return o===l-1&&""===t[o];throw Error("wtf?")}braceExpand(){return te(this.pattern,this.options)}parse(t){ut(t);const e=this.options;if("**"===t)return Qt;if(""===t)return"";let n,s=null;(n=t.match(Bt))?s=e.dot?Ut:Dt:(n=t.match(At))?s=(e.nocase?e.dot?Wt:Lt:e.dot?Pt:Ct)(n[1]):(n=t.match(Vt))?s=(e.nocase?e.dot?Zt:Gt:e.dot?Ht:qt)(n):(n=t.match(It))?s=e.dot?_t:zt:(n=t.match(Tt))&&(s=Ft);const i=Nt.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Qt?Qt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],o=e[s-1];t===Qt&&o!==Qt&&(void 0===o?void 0!==i&&i!==Qt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=o+"(?:\\/|"+n+")?":i!==Qt&&(e[s-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Qt))})),e.filter((t=>t!==Qt)).join("/")})).join("|");const[o,r]=t.length>1?["(?:",")"]:["",""];i="^"+o+i+r+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=RegExp(i,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let o=s[s.length-1];if(!o)for(let t=s.length-2;!o&&t>=0;t--)o=s[t];for(let t=0;t<i.length;t++){const r=i[t];let l=s;if(n.matchBase&&1===r.length&&(l=[o]),this.matchOne(l,r,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Rt.defaults(t).Minimatch}};Rt.AST=Nt,Rt.Minimatch=ne,Rt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Rt.unescape=gt;var se=class t{static fromLocalValue(e){const n=e[W],s=I in e?e[I]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,i]of s){const s="object"==typeof n&&null!==n?t.fromLocalValue(n):n,o=t.fromLocalValue(i);e.set(s,o)}return e;case"object":const i={};for(const[e,n]of s)i[e]=t.fromLocalValue(n);return i;case"regexp":const{pattern:o,flags:r}=s;return RegExp(o,r);case"set":const l=new Set;for(const e of s)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(W))return!1;const e=t[W];return!!Object.values({...P,...L}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(I))}};((t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})})({},{err:()=>oe,map:()=>re,ok:()=>ie,unwrap:()=>ce,unwrapErr:()=>fe});var ie=t=>({isOk:!0,isErr:!1,value:t}),oe=t=>({isOk:!1,isErr:!0,value:t});function re(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ie(t))):ie(n)}if(t.isErr)return oe(t.value);throw"should never get here"}var le,ce=t=>{if(t.isOk)return t.value;throw t.value},fe=t=>{if(t.isErr)return t.value;throw t.value};function ae(){var e;const n=this.attachShadow({mode:"open"});if(void 0===le&&(le=null!=(e=function(t){if(!K)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(t))?e:null),le)Q?n.adoptedStyleSheets.push(le):n.adoptedStyleSheets=[...n.adoptedStyleSheets,le];else if(!K){const e=document.createElement("style");e.innerHTML=t,n.prepend(e)}}var ue=t=>{const e=be(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&he(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!pe(t,$e(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&be(t,"childNodes").length&&ue(t)}};function he(t,e,n){let s,i=0,o=[];for(;i<t.length;i++){if(s=t[i],s["s-sr"]&&(!e||s["s-hn"]===e)&&(void 0===n||$e(s)===n)&&(o.push(s),void 0!==n))return o;o=[...o,...he(s.childNodes,e,n)]}return o}var pe=(t,e,n=!0)=>{const s=[];(n&&t["s-sr"]||!t["s-sr"])&&s.push(t);let i=t;for(;i=i.nextSibling;)$e(i)!==e||!n&&i["s-sr"]||s.push(i);return s},de=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,ve=(t,e,n,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const i=document.createTextNode("");if(i["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const o=e["s-cr"].parentNode,r=be(o,"appendChild");if(void 0!==s){i["s-oo"]=s;const t=be(o,"childNodes"),e=[i];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>r.call(o,t)))}else r.call(o,i);t["s-ol"]=i,t["s-sh"]=e["s-hn"]},$e=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function ge(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e})(i.childNodes)).forEach((t=>{s===$e(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}function be(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var me=new WeakMap,we=(t,e,n)=>{let s=D.get(t);K&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,D.set(t,s)},ye=(t,e)=>{var n,s,i;const o=Oe(e),r=D.get(o);if(!q.document)return o;if(t=11===t.nodeType?t:q.document,r)if("string"==typeof r){let i,l=me.get(t=t.head||t);l||me.set(t,l=new Set);const c=t.querySelector(`[${V}="${o}"]`);if(c)c.innerHTML=r;else if(!l.has(o)){i=q.document.createElement("style"),i.innerHTML=r;const c=null!=(n=Y.h)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=q.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=c&&i.setAttribute("nonce",c),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(K){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),Q?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=r+e.innerHTML:t.prepend(i)}else t.append(i);1&e.l&&t.insertBefore(i,null),4&e.l&&(i.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(o)}}else{let e=me.get(t);if(e||me.set(t,e=new Set),!e.has(o)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(r.constructor===n.CSSStyleSheet)s=r;else{s=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)s.insertRule(r.cssRules[t].cssText,t)}Q?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(o)}}return o},Oe=t=>"sc-"+t.p,Se=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),je=(t,e,...n)=>{let s=null,i=null,o=null,r=!1,l=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?f(s):null!=s&&"boolean"!=typeof s&&((r="function"!=typeof t&&!ft(s))&&(s+=""),r&&l?c[c.length-1].v+=s:c.push(r?ke(null,s):s),l=r)};if(f(n),e){e.key&&(i=e.key),e.name&&(o=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,Me);const a=ke(t,null);return a.$=e,c.length>0&&(a.m=c),a.O=i,a.S=o,a},ke=(t,e)=>({l:0,j:t,v:e,k:null,m:null,$:null,O:null,S:null}),xe={},Me={forEach:(t,e)=>t.map(Ee).forEach(e),map:(t,e)=>t.map(Ee).map(e).map(Ne)},Ee=t=>({vattrs:t.$,vchildren:t.m,vkey:t.O,vname:t.S,vtag:t.j,vtext:t.v}),Ne=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),je(t.vtag,e,...t.vchildren||[])}const e=ke(t.vtag,t.vtext);return e.$=t.vattrs,e.m=t.vchildren,e.O=t.vkey,e.S=t.vname,e},Re=(t,e,n,s,i,o,r,l=[])=>{let c,f,a,u;if(1===o.nodeType){if(c=o.getAttribute(G),c&&(f=c.split("."),f[0]===r||"0"===f[0])){a=Ce({l:0,M:f[0],N:f[1],R:f[2],A:f[3],j:o.tagName.toLowerCase(),k:o,$:{class:o.className||""}}),e.push(a),o.removeAttribute(G),t.m||(t.m=[]);const i=a.k.getAttribute("s-sn");"string"==typeof i&&("slot-fb"===a.j&&Pe(i,f[2],a,o,t,e,n,s,l),a.k["s-sn"]=i,a.k.removeAttribute("s-sn")),void 0!==a.A&&(t.m[a.A]=a),t=a,s&&"0"===a.R&&(s[a.A]=a.k)}if(o.shadowRoot)for(u=o.shadowRoot.childNodes.length-1;u>=0;u--)Re(t,e,n,s,i,o.shadowRoot.childNodes[u],r,l);const h=o.__childNodes||o.childNodes;for(u=h.length-1;u>=0;u--)Re(t,e,n,s,i,h[u],r,l)}else if(8===o.nodeType)f=o.nodeValue.split("."),(f[1]===r||"0"===f[1])&&(c=f[0],a=Ce({M:f[1],N:f[2],R:f[3],A:f[4]||"0",k:o,$:null,m:null,O:null,S:null,j:null,v:null}),"t"===c?(a.k=We(o,3),a.k&&3===a.k.nodeType&&(a.v=a.k.textContent,e.push(a),o.remove(),r===a.M&&(t.m||(t.m=[]),t.m[a.A]=a),s&&"0"===a.R&&(s[a.A]=a.k))):"c"===c?(a.k=We(o,8),a.k&&8===a.k.nodeType&&(e.push(a),o.remove())):a.M===r&&("s"===c?Pe(o["s-sn"]=f[5]||"",f[2],a,o,t,e,n,s,l):"r"===c&&(s?o.remove():(i["s-cr"]=o,o["s-cn"]=!0))));else if(t&&"style"===t.j){const e=ke(null,o.textContent);e.k=o,e.A="0",t.m=[e]}return t},Ae=(t,e)=>{if(1===t.nodeType){const n=t[U]||t.getAttribute(U);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)Ae(t.shadowRoot.childNodes[s],e);const i=t.__childNodes||t.childNodes;for(s=0;s<i.length;s++)Ae(i[s],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},Ce=t=>({l:0,M:null,N:null,R:null,A:"0",k:null,$:null,m:null,O:null,S:null,j:null,v:null,...t});function Pe(t,e,n,s,i,o,r,l,c){s["s-sr"]=!0,n.S=t||null,n.j="slot";const f=(null==i?void 0:i.k)?i.k["s-id"]||i.k.getAttribute("s-id"):"";if(l&&q.document){const o=n.k=q.document.createElement(n.j);n.S&&n.k.setAttribute("name",t),i.k.shadowRoot&&f&&f!==n.M?be(i.k,"insertBefore")(o,be(i.k,"children")[0]):be(be(s,"parentNode"),"insertBefore")(o,s),Le(c,e,t,s,n.M),s.remove(),"0"===n.R&&(l[n.A]=n.k)}else{const o=n.k,r=f&&f!==n.M&&i.k.shadowRoot;Le(c,e,t,s,r?f:n.M),ge(s),r&&i.k.insertBefore(o,i.k.children[0])}o.push(n),r.push(n),i.m||(i.m=[]),i.m[n.A]=n}var Le=(t,e,n,s,i)=>{var o,r;let l=s.nextSibling;if(t[e]=t[e]||[],l&&!(null==(o=l.nodeValue)?void 0:o.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:s,node:l,hostId:i})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))},We=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},Ie=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};Ie("::slotted"),Ie(":host"),Ie(":host-context");var ze,_e,Te=(t,e,n)=>"string"==typeof t&&t.startsWith(z)?t=function(t){return"string"==typeof t&&t.startsWith(z)?se.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||ft(t)?t:4&e?(n&&"string"==typeof t||"false"!==t)&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,Fe=(t,e)=>{const n=t;return{emit:t=>Be(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Be=(t,e,n)=>{const s=Y.ce(e,n);return t.dispatchEvent(s),s},De=(t,e,n,s,i,o,r)=>{if(n===s)return;let l=F(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=Ve(n);let o=Ve(s);if((t["s-si"]||t["s-sc"])&&r){const n=t["s-sc"]||t["s-si"];o.push(n),i.forEach((t=>{t.startsWith(n)&&o.push(t)})),o=[...new Set(o)].filter((t=>t)),e.add(...o)}else e.remove(...i.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!i.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&s(t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const r=ft(s);if((l||r&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const i=null==s?"":s;"list"===e?l=!1:null!=n&&t[e]==i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,f=!0),null==s||!1===s?!1===s&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(Z,e):t.removeAttribute(e)):(!l||4&o||i)&&!r&&1===t.nodeType&&(s=!0===s?"":s,f?t.setAttributeNS(Z,e,s):t.setAttribute(e,s))}else if(e="-"===e[2]?e.slice(3):F(q,c)?c.slice(2):c[2]+e.slice(3),n||s){const i=e.endsWith(Ge);e=e.replace(Ze,""),n&&Y.rel(t,e,n,i),s&&Y.ael(t,e,s,i)}},Ue=/\s/,Ve=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Ue):[]),Ge="Capture",Ze=RegExp(Ge+"$"),He=(t,e,n,s)=>{const i=11===e.k.nodeType&&e.k.host?e.k.host:e.k,o=t&&t.$||{},r=e.$||{};for(const t of qe(Object.keys(o)))t in r||De(i,t,o[t],void 0,n,e.l,s);for(const t of qe(Object.keys(r)))De(i,t,o[t],r[t],n,e.l,s)};function qe(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Je=!1,Ye=!1,Ke=!1,Qe=!1,Xe=(t,e,n)=>{var s;const i=e.m[n];let o,r,l,c=0;if(Je||(Ke=!0,"slot"===i.j&&(i.l|=i.m?2:1)),null!==i.v)o=i.k=q.document.createTextNode(i.v);else if(1&i.l)o=i.k=q.document.createTextNode(""),He(null,i,Qe);else{if(Qe||(Qe="svg"===i.j),!q.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=i.k=q.document.createElementNS(Qe?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Je&&2&i.l?"slot-fb":i.j),Qe&&"foreignObject"===i.j&&(Qe=!1),He(null,i,Qe),i.m){const e="template"===i.j?o.content:o;for(c=0;c<i.m.length;++c)r=Xe(t,i,c),r&&e.appendChild(r)}"svg"===i.j?Qe=!1:"foreignObject"===o.tagName&&(Qe=!0)}return o["s-hn"]=_e,3&i.l&&(o["s-sr"]=!0,o["s-cr"]=ze,o["s-sn"]=i.S||"",o["s-rf"]=null==(s=i.$)?void 0:s.ref,ge(o),l=t&&t.m&&t.m[n],l&&l.j===i.j&&t.k&&tn(t.k)),o},tn=t=>{Y.l|=1;const e=t.closest(_e.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),s=Array.from(t.__childNodes||t.childNodes);for(const t of n?s.reverse():s)null!=t["s-sh"]&&(un(e,t,null!=n?n:null),t["s-sh"]=void 0,Ke=!0)}Y.l&=-2},en=(t,e)=>{Y.l|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===_e&&n.push(e)}for(let t=n.length-1;t>=0;t--){const s=n[t];s["s-hn"]!==_e&&s["s-ol"]&&(un(rn(s).parentNode,s,rn(s)),s["s-ol"].remove(),s["s-ol"]=void 0,s["s-sh"]=void 0,Ke=!0),e&&en(s,e)}Y.l&=-2},nn=(t,e,n,s,i,o)=>{let r,l=t["s-cr"]&&t["s-cr"].parentNode||t;for(l.shadowRoot&&l.tagName===_e&&(l=l.shadowRoot),"template"===n.j&&(l=l.content);i<=o;++i)s[i]&&(r=Xe(null,n,i),r&&(s[i].k=r,un(l,r,rn(e))))},sn=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.k;an(e),t&&(Ye=!0,t["s-ol"]?t["s-ol"].remove():en(t,!0),t.remove())}}},on=(t,e,n=!1)=>t.j===e.j&&("slot"===t.j?t.S===e.S:n?(n&&!t.O&&e.O&&(t.O=e.O),!0):t.O===e.O),rn=t=>t&&t["s-ol"]||t,ln=(t,e,n=!1)=>{const s=e.k=t.k,i=t.m,o=e.m,r=e.j,l=e.v;let c;null===l?(Qe="svg"===r||"foreignObject"!==r&&Qe,"slot"!==r||Je||t.S!==e.S&&(e.k["s-sn"]=e.S||"",tn(e.k.parentElement)),He(t,e,Qe,n),null!==i&&null!==o?((t,e,n,s,i=!1)=>{let o,r,l=0,c=0,f=0,a=0,u=e.length-1,h=e[0],p=e[u],d=s.length-1,v=s[0],$=s[d];const g="template"===n.j?t.content:t;for(;l<=u&&c<=d;)if(null==h)h=e[++l];else if(null==p)p=e[--u];else if(null==v)v=s[++c];else if(null==$)$=s[--d];else if(on(h,v,i))ln(h,v,i),h=e[++l],v=s[++c];else if(on(p,$,i))ln(p,$,i),p=e[--u],$=s[--d];else if(on(h,$,i))"slot"!==h.j&&"slot"!==$.j||en(h.k.parentNode,!1),ln(h,$,i),un(g,h.k,p.k.nextSibling),h=e[++l],$=s[--d];else if(on(p,v,i))"slot"!==h.j&&"slot"!==$.j||en(p.k.parentNode,!1),ln(p,v,i),un(g,p.k,h.k),p=e[--u],v=s[++c];else{for(f=-1,a=l;a<=u;++a)if(e[a]&&null!==e[a].O&&e[a].O===v.O){f=a;break}f>=0?(r=e[f],r.j!==v.j?o=Xe(e&&e[c],n,f):(ln(r,v,i),e[f]=void 0,o=r.k),v=s[++c]):(o=Xe(e&&e[c],n,c),v=s[++c]),o&&un(rn(h.k).parentNode,o,rn(h.k))}l>u?nn(t,null==s[d+1]?null:s[d+1].k,n,s,c,d):c>d&&sn(e,l,u)})(s,i,e,o,n):null!==o?(null!==t.v&&(s.textContent=""),nn(s,null,e,o,0,o.length-1)):n||null===i?n&&null!==i&&null===o&&(e.m=i):sn(i,0,i.length-1),Qe&&"svg"===r&&(Qe=!1)):(c=s["s-cr"])?c.parentNode.textContent=l:t.v!==l&&(s.data=l)},cn=[],fn=t=>{let e,n,s;const i=t.__childNodes||t.childNodes;for(const t of i){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const i=t["s-sn"];for(s=n.length-1;s>=0;s--)if(e=n[s],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(de(e,i)){let n=cn.find((t=>t.C===e));Ye=!0,e["s-sn"]=e["s-sn"]||i,n?(n.C["s-sh"]=t["s-hn"],n.P=t):(e["s-sh"]=t["s-hn"],cn.push({P:t,C:e})),e["s-sr"]&&cn.map((t=>{de(t.C,e["s-sn"])&&(n=cn.find((t=>t.C===e)),n&&!t.P&&(t.P=n.P))}))}else cn.some((t=>t.C===e))||cn.push({C:e})}1===t.nodeType&&fn(t)}},an=t=>{t.$&&t.$.ref&&t.$.ref(null),t.m&&t.m.map(an)},un=(t,e,n,s)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:i}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const s=t["s-sn"]=$e(t)||"";return{slotNode:he(be(e,"childNodes"),e.tagName,s)[0],slotName:s}}(e);return i&&!s&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(i),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},hn=(t,e,n=!1)=>{var s,i,o,r,l;const c=t.$hostElement$,f=t.i,a=t.L||ke(null,null),u=(t=>t&&t.j===xe)(e)?e:je(null,null,e);if(_e=c.tagName,f.W&&(u.$=u.$||{},f.W.forEach((([t,e])=>{u.$[e]=c[t]}))),n&&u.$)for(const t of Object.keys(u.$))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(u.$[t]=c[t]);if(u.j=null,u.l|=4,t.L=u,u.k=a.k=c.shadowRoot||c,Je=!(!(1&f.l)||128&f.l),ze=c["s-cr"],Ye=!1,ln(a,u,n),Y.l|=1,Ke){fn(u.k);for(const t of cn){const e=t.C;if(!e["s-ol"]&&q.document){const t=q.document.createTextNode("");t["s-nr"]=e,un(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of cn){const e=t.C,l=t.P;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(s=e.hidden)&&s),l){const t=l.parentNode;let s=l.nextSibling;if(s&&1===s.nodeType){let n=null==(i=e["s-ol"])?void 0:i.previousSibling;for(;n;){let i=null!=(o=n["s-nr"])?o:null;if(i&&i["s-sn"]===e["s-sn"]&&t===(i.__parentNode||i.parentNode)){for(i=i.nextSibling;i===e||(null==i?void 0:i["s-sr"]);)i=null==i?void 0:i.nextSibling;if(!i||!i["s-nr"]){s=i;break}}n=n.previousSibling}}if((!s&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==s)&&e!==s){if(un(t,e,s,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=q.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,un(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(r=e["s-ih"])&&r)}e&&"function"==typeof l["s-rf"]&&l["s-rf"](l)}else 1===e.nodeType&&(e.hidden=!0)}}if(Ye&&ue(u.k),Y.l&=-2,cn.length=0,!Je&&!(1&f.l)&&c["s-cr"]){const t=u.k.__childNodes||u.k.childNodes;for(const e of t)if(e["s-hn"]!==_e&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(l=e.hidden)&&l),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=q.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],un(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}ze=void 0},pn=(t,e)=>{if(e&&!t.I&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.I=()=>{e["s-p"].splice(n-1,1),s()})))}},dn=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);pn(t,t._);const n=()=>vn(t,e);if(!e)return rt(n);queueMicrotask((()=>{n()}))},vn=(t,e)=>{const n=t.$hostElement$,s=n;if(!s)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return i=On(s,e?"componentWillLoad":"componentWillUpdate",void 0,n),i=$n(i,(()=>On(s,"componentWillRender",void 0,n))),$n(i,(()=>bn(t,s,e)))},$n=(t,e)=>gn(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),gn=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,bn=async(t,e,n)=>{var s;const i=t.$hostElement$,o=i["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,s=e.l,i=ye(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);mn(t,e,i,n),o&&(o.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>wn(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},mn=(t,e,n,s)=>{try{e=e.render(),t.l&=-17,t.l|=2,hn(t,e,s)}catch(e){B(e,t.$hostElement$)}return null},wn=t=>{const e=t.$hostElement$,n=e,s=t._;On(n,"componentDidRender",void 0,e),64&t.l?On(n,"componentDidUpdate",void 0,e):(t.l|=64,Sn(e),On(n,"componentDidLoad",void 0,e),t.T(e),s||yn()),t.I&&(t.I(),t.I=void 0),512&t.l&&ot((()=>dn(t,!1))),t.l&=-517},yn=()=>{var t;ot((()=>Be(q,"appload",{detail:{namespace:"post-components"}}))),(null==(t=Y.F)?void 0:t.size)&&Y.F.clear()},On=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){B(t,s)}},Sn=t=>t.setAttribute(null!="data-hydrated"?"data-hydrated":"hydrated",""),jn=(t,e,n,s)=>{const i=T(t);if(!i)return;const o=t,r=i.o.get(e),l=i.l,c=o;if(!((n=Te(n,s.t[e][0],!!(64&s.l)))===r||Number.isNaN(r)&&Number.isNaN(n))){if(i.o.set(e,n),s.B){const t=s.B[e];t&&t.map((t=>{try{const[[s,o]]=Object.entries(t);(128&l||1&o)&&(c?c[s](n,r,e):i.D.push((()=>{i.U[s](n,r,e)})))}catch(t){B(t,o)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,r,e))return;dn(i,!1)}}},kn=(t,e,n)=>{var s,i;const o=t.prototype;64&e.l&&1&n&&H.forEach((t=>{const e=o[t];Object.defineProperty(o,t,{value(...n){var s;const i=T(this),o=this;o?"function"==typeof e&&e.call(o,...n):null==(s=null==i?void 0:i.V)||s.then((e=>{const s=e[t];"function"==typeof s&&s.call(e,...n)}))}})}));{t.watchers&&!e.B&&(e.B=t.watchers),t.deserializers&&!e.G&&(e.G=t.deserializers),t.serializers&&!e.Z&&(e.Z=t.serializers);const n=Object.entries(null!=(s=e.t)?s:{});n.map((([t,[n]])=>{if(31&n||32&n){const{get:s,set:i}=Object.getOwnPropertyDescriptor(o,t)||{};s&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return s?s.apply(this):((t,e)=>T(this).o.get(e))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(s){const o=T(this);if(o){if(i)return void 0===(32&n?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(s=o.o.get(t)),i.call(this,Te(s,n,!!(64&e.l))),void jn(this,t,s=32&n?this[t]:o.$hostElement$[t],e);jn(this,t,s,e)}}})}}));{const s=new Map;o.attributeChangedCallback=function(t,i,r){Y.jmp((()=>{var l;const c=s.get(t),f=T(this);if(this.hasOwnProperty(c),o.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const n=null==f?void 0:f.l;if(f&&n&&!(8&n)&&r!==i){const s=this,o=null==(l=e.B)?void 0:l[t];null==o||o.forEach((e=>{const[[o,l]]=Object.entries(e);null!=s[o]&&(128&n||1&l)&&s[o].call(s,r,i,t)}))}return}const a=n.find((([t])=>t===c));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const u=Object.getOwnPropertyDescriptor(o,c);r==this[c]||u.get&&!u.set||(this[c]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.B)?i:{}),...n.filter((([t,e])=>31&e[0])).map((([t,n])=>{var i;const o=n[1]||t;return s.set(o,t),512&n[0]&&(null==(i=e.W)||i.push([t,o])),o}))]))}}return t},xn=t=>{if(!q.document)return;const e=t["s-cr"]=q.document.createComment("");e["s-cn"]=!0,un(t,e,t.firstChild)},Mn=(t,e)=>{const n={l:e[0],p:e[1]};n.t=e[2],n.H=e[3],n.B=t.B,n.G=t.G,n.Z=t.Z,n.W=[],(()=>{if(!q.document)return;const t=q.document.querySelectorAll(`[${V}]`);let e=0;for(;e<t.length;e++)we(t[e].getAttribute(V),Se(t[e].innerHTML),!0)})();const s=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={l:0,$hostElement$:t,i:e,o:new Map,q:new Map};n.V=new Promise((t=>n.T=t)),t["s-p"]=[],t["s-rc"]=[];const s=n;t.__stencil__getHostRef=()=>s,512&e.l&&_(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=T(this);if(!t)return;En(this,t,n.H),this.__hasHostListenerAttached=!0}(t=>{if(!(1&Y.l)){const e=T(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.l)En(t,e,n.H),(null==e?void 0:e.U)||(null==e?void 0:e.V)&&e.V.then((()=>{}));else{let s;if(e.l|=1,s=t.getAttribute(U),s){if(1&n.l){const e=ye(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var i,o,r,l;const c=t.shadowRoot,f=[],a=[],u=c?[]:null,h=ke(e,null);h.k=t,!q.document||Y.F&&Y.F.size||Ae(q.document.body,Y.F=new Map),t[U]=n,t.removeAttribute(U),s.L=Re(h,f,[],u,t,t,n,a);let p=0;const d=f.length;let v;for(;p<d;p++){v=f[p];const n=v.M+"."+v.N,s=Y.F.get(n),o=v.k;if(c){if((null==(i=v.j)?void 0:(""+i).includes("-"))&&"slot-fb"!==v.j&&!v.k.shadowRoot){const e=T(v.k);if(e){const n=Oe(e.i),s=q.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else o["s-hn"]=e.toUpperCase(),"slot"===v.j&&(o["s-cr"]=t["s-cr"]);"slot"===v.j&&(v.S=v.k["s-sn"]||v.k.name||null,v.m?(v.l|=2,v.k.childNodes.length||v.m.forEach((t=>{v.k.appendChild(t.k)}))):v.l|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(o,s.nextSibling),s.parentNode.removeChild(s),c||(o["s-oo"]=parseInt(v.N))),s&&!s["s-id"]&&Y.F.delete(n)}const $=[],g=a.length;let b,m,w,y,O=0,S=0;for(;O<g;O++)if(b=a[O],b&&b.length)for(w=b.length,m=0;m<w;m++){if(y=b[m],$[y.hostId]||($[y.hostId]=Y.F.get(y.hostId)),!$[y.hostId])continue;const t=$[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(r=null==(o=b[m-1])?void 0:o.node)?void 0:r.nextSibling),t.shadowRoot&&c||(y.slot["s-cr"]||(y.slot["s-cr"]=t["s-cr"],y.slot["s-cr"]=!y.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),ve(y.node,y.slot,0,y.node["s-oo"]||S),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),S=(y.node["s-oo"]||S)+1}if(c){let e=0;const n=u.length;if(n){for(;e<n;e++){const t=u[e];t&&c.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t})(t,n.p,s,e)}s||12&n.l&&xn(t);{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){pn(e,e._=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.l)&&(e.l|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=Oe(n);if(!D.has(e)){const s=()=>{};we(e,t,!!(1&n.l)),s()}}const i=e._,o=()=>dn(e,!0);i&&i["s-rc"]?i["s-rc"].push(o):o()})(t,e,n)}s()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{if(!(1&Y.l)){const e=T(t);(null==e?void 0:e.J)&&(e.J.map((t=>t())),e.J=void 0)}me.has(t)&&me.delete(t),t.shadowRoot&&me.has(t.shadowRoot)&&me.delete(t.shadowRoot)})(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ae.call(this,n)}}),t.is=n.p,kn(t,n,3)},En=(t,e,n)=>{n&&q.document&&n.map((([n,s,i])=>{const o=Rn(q.document,t,n),r=Nn(e,i),l=An(n);Y.ael(o,s,r,l),(e.J=e.J||[]).push((()=>Y.rel(o,s,r,l)))}))},Nn=(t,e)=>n=>{try{t.$hostElement$[e](n)}catch(e){B(e,t.$hostElement$)}},Rn=(t,e,n)=>8&n?q:e,An=t=>({passive:!!(1&t),capture:!!(2&t)}),Cn=t=>Y.h=t,Pn=t=>Object.assign(Y,t);function Ln(t,e){hn({i:{l:0,p:e.tagName},$hostElement$:e},t)}function Wn(t){return t}export{J as H,xe as a,Fe as c,lt as getAssetPath,je as h,Mn as p,Ln as render,ct as setAssetPath,Cn as setNonce,Pn as setPlatformOptions,Wn as t}