@ionic/core 8.5.4-dev.11744052844.17c6a004 → 8.5.4-dev.11744209290.123af9eb

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 (769) hide show
  1. package/components/action-sheet.js +37 -23
  2. package/components/alert.js +41 -25
  3. package/components/animation.js +1 -1
  4. package/components/backdrop.js +11 -4
  5. package/components/button-active.js +1 -1
  6. package/components/button.js +29 -23
  7. package/components/buttons.js +14 -4
  8. package/components/capacitor.js +1 -1
  9. package/components/checkbox.js +40 -16
  10. package/components/content.js +24 -5
  11. package/components/data.js +1 -1
  12. package/components/gesture-controller.js +1 -1
  13. package/components/haptic.js +1 -1
  14. package/components/hardware-back-button.js +1 -1
  15. package/components/header.js +12 -7
  16. package/components/helpers.js +2 -5
  17. package/components/icon.js +1 -2
  18. package/components/index3.js +3 -5
  19. package/components/index4.js +1 -1
  20. package/components/index5.js +28 -3
  21. package/components/index7.js +163 -27
  22. package/components/index8.js +1 -1
  23. package/components/index9.js +3 -163
  24. package/components/input-shims.js +2 -2
  25. package/components/input.utils.js +1 -1
  26. package/components/ion-accordion-group.js +19 -6
  27. package/components/ion-accordion.js +32 -14
  28. package/components/ion-app.js +3 -4
  29. package/components/ion-avatar.js +2 -4
  30. package/components/ion-back-button.js +12 -13
  31. package/components/ion-badge.js +2 -5
  32. package/components/ion-breadcrumb.js +22 -20
  33. package/components/ion-breadcrumbs.js +14 -10
  34. package/components/ion-card-content.js +2 -4
  35. package/components/ion-card-header.js +7 -5
  36. package/components/ion-card-subtitle.js +2 -5
  37. package/components/ion-card-title.js +2 -5
  38. package/components/ion-card.js +16 -11
  39. package/components/ion-chip.js +8 -5
  40. package/components/ion-col.js +1 -26
  41. package/components/ion-datetime-button.js +15 -13
  42. package/components/ion-datetime.js +126 -53
  43. package/components/ion-fab-button.js +37 -20
  44. package/components/ion-fab-list.js +7 -2
  45. package/components/ion-fab.js +10 -4
  46. package/components/ion-footer.js +13 -8
  47. package/components/ion-grid.js +4 -2
  48. package/components/ion-img.js +1 -6
  49. package/components/ion-infinite-scroll-content.js +2 -6
  50. package/components/ion-infinite-scroll.js +27 -6
  51. package/components/ion-input-password-toggle.js +7 -9
  52. package/components/ion-input.js +69 -41
  53. package/components/ion-item-divider.js +9 -5
  54. package/components/ion-item-group.js +2 -4
  55. package/components/ion-item-option.js +14 -12
  56. package/components/ion-item-options.js +6 -4
  57. package/components/ion-item-sliding.js +4 -2
  58. package/components/ion-loading.js +36 -19
  59. package/components/ion-menu-button.js +15 -10
  60. package/components/ion-menu-toggle.js +9 -5
  61. package/components/ion-menu.js +25 -9
  62. package/components/ion-nav-link.js +6 -6
  63. package/components/ion-nav.js +7 -10
  64. package/components/ion-note.js +2 -5
  65. package/components/ion-picker-legacy.js +44 -24
  66. package/components/ion-progress-bar.js +19 -6
  67. package/components/ion-range.js +65 -25
  68. package/components/ion-refresher-content.js +1 -5
  69. package/components/ion-refresher.js +54 -6
  70. package/components/ion-reorder-group.js +6 -4
  71. package/components/ion-reorder.js +3 -5
  72. package/components/ion-route-redirect.js +0 -2
  73. package/components/ion-route.js +9 -7
  74. package/components/ion-router-link.js +7 -9
  75. package/components/ion-router-outlet.js +10 -8
  76. package/components/ion-router.js +18 -0
  77. package/components/ion-row.js +1 -2
  78. package/components/ion-searchbar.js +78 -29
  79. package/components/ion-segment-button.js +19 -10
  80. package/components/ion-segment-content.js +1 -2
  81. package/components/ion-segment-view.js +5 -5
  82. package/components/ion-segment.js +22 -11
  83. package/components/ion-select-option.js +4 -3
  84. package/components/ion-select.js +58 -32
  85. package/components/ion-skeleton-text.js +4 -2
  86. package/components/ion-split-pane.js +10 -5
  87. package/components/ion-tab-bar.js +7 -6
  88. package/components/ion-tab-button.js +10 -12
  89. package/components/ion-tab.js +2 -5
  90. package/components/ion-tabs.js +3 -4
  91. package/components/ion-text.js +1 -3
  92. package/components/ion-textarea.js +62 -34
  93. package/components/ion-thumbnail.js +1 -2
  94. package/components/ion-toast.js +55 -32
  95. package/components/ion-toggle.js +44 -20
  96. package/components/item.js +20 -14
  97. package/components/keyboard-controller.js +2 -2
  98. package/components/keyboard.js +134 -69
  99. package/components/keyboard2.js +69 -134
  100. package/components/label.js +2 -6
  101. package/components/list-header.js +2 -6
  102. package/components/list.js +5 -5
  103. package/components/modal.js +117 -39
  104. package/components/notch-controller.js +1 -1
  105. package/components/overlays.js +2 -2
  106. package/components/picker-column-option.js +18 -5
  107. package/components/picker-column.js +25 -10
  108. package/components/picker-column2.js +5 -8
  109. package/components/picker.js +2 -4
  110. package/components/popover.js +129 -37
  111. package/components/radio-group.js +10 -10
  112. package/components/radio.js +27 -13
  113. package/components/refresher.utils.js +2 -2
  114. package/components/ripple-effect.js +10 -2
  115. package/components/select-modal.js +3 -8
  116. package/components/select-popover.js +5 -8
  117. package/components/spinner.js +4 -5
  118. package/components/swipe-back.js +1 -1
  119. package/components/title.js +2 -6
  120. package/components/toolbar.js +2 -5
  121. package/css/global.bundle.css +1 -1
  122. package/css/global.bundle.css.map +1 -1
  123. package/css/ionic.bundle.css +1 -1
  124. package/css/ionic.bundle.css.map +1 -1
  125. package/css/structure.css +1 -1
  126. package/css/structure.css.map +1 -1
  127. package/dist/cjs/{animation-b4fdf128.js → animation-Bz5ImL40.js} +1 -1
  128. package/dist/cjs/{app-globals-dd592863.js → app-globals-Di9ZJzjm.js} +1 -1
  129. package/dist/cjs/{button-active-43e2b419.js → button-active-BlMN9Iyq.js} +3 -3
  130. package/dist/cjs/{capacitor-c04564bf.js → capacitor-DmA66EwP.js} +1 -1
  131. package/dist/cjs/{data-27cc2c9c.js → data-DlPf8ZXm.js} +1 -1
  132. package/dist/cjs/{framework-delegate-50a86d56.js → framework-delegate-B0-bTZ_Y.js} +1 -1
  133. package/dist/cjs/{gesture-controller-9436f482.js → gesture-controller-dtqlP_q4.js} +1 -1
  134. package/dist/cjs/{haptic-f6b37aa3.js → haptic-ClPPQ_PS.js} +1 -1
  135. package/dist/cjs/{hardware-back-button-5a99001f.js → hardware-back-button-lTgcqUpk.js} +3 -3
  136. package/dist/cjs/{helpers-3a248559.js → helpers-CLmZlPvl.js} +1 -4
  137. package/dist/cjs/{index-e36bd277.js → index-B4SdCKIQ.js} +2 -2
  138. package/dist/cjs/{index-e630fd95.js → index-BE9YH63j.js} +6 -6
  139. package/dist/cjs/{index-2e236a04.js → index-BVfbh2cJ.js} +1378 -671
  140. package/dist/cjs/{index-ee07ed59.js → index-CAvQ7Tka.js} +3 -4
  141. package/dist/cjs/{index-073c7cdc.js → index-CPbAsnJK.js} +1 -0
  142. package/dist/cjs/{index-4b70187a.js → index-CXThGkw7.js} +9 -9
  143. package/dist/cjs/{index-509ca0d3.js → index-CquwaYOd.js} +3 -3
  144. package/dist/cjs/{index-48b2a28e.js → index-rYFHa7ZR.js} +1 -1
  145. package/dist/cjs/index.cjs.js +18 -20
  146. package/dist/cjs/{input-shims-22a9973f.js → input-shims-DA_nJulF.js} +8 -8
  147. package/dist/cjs/{input.utils-e82b8ed0.js → input.utils-UHOCoNWM.js} +3 -3
  148. package/dist/cjs/ion-accordion_2.cjs.entry.js +54 -25
  149. package/dist/cjs/ion-action-sheet.cjs.entry.js +50 -38
  150. package/dist/cjs/ion-alert.cjs.entry.js +55 -41
  151. package/dist/cjs/ion-app_8.cjs.entry.js +96 -65
  152. package/dist/cjs/ion-avatar_3.cjs.entry.js +8 -16
  153. package/dist/cjs/ion-back-button.cjs.entry.js +15 -18
  154. package/dist/cjs/ion-backdrop.cjs.entry.js +13 -8
  155. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +38 -34
  156. package/dist/cjs/ion-button_2.cjs.entry.js +33 -30
  157. package/dist/cjs/ion-card_5.cjs.entry.js +32 -35
  158. package/dist/cjs/ion-checkbox.cjs.entry.js +44 -22
  159. package/dist/cjs/ion-chip.cjs.entry.js +11 -10
  160. package/dist/cjs/ion-col_3.cjs.entry.js +8 -34
  161. package/dist/cjs/ion-datetime-button.cjs.entry.js +20 -20
  162. package/dist/cjs/ion-datetime_3.cjs.entry.js +182 -94
  163. package/dist/cjs/ion-fab_3.cjs.entry.js +57 -31
  164. package/dist/cjs/ion-img.cjs.entry.js +4 -11
  165. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +35 -20
  166. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +11 -15
  167. package/dist/cjs/ion-input.cjs.entry.js +76 -50
  168. package/dist/cjs/ion-item-option_3.cjs.entry.js +32 -28
  169. package/dist/cjs/ion-item_8.cjs.entry.js +49 -52
  170. package/dist/cjs/ion-loading.cjs.entry.js +46 -31
  171. package/dist/cjs/ion-menu_3.cjs.entry.js +62 -39
  172. package/dist/cjs/ion-modal.cjs.entry.js +128 -52
  173. package/dist/cjs/ion-nav_2.cjs.entry.js +17 -22
  174. package/dist/cjs/ion-picker-column-option.cjs.entry.js +22 -11
  175. package/dist/cjs/ion-picker-column.cjs.entry.js +30 -17
  176. package/dist/cjs/ion-picker.cjs.entry.js +4 -8
  177. package/dist/cjs/ion-popover.cjs.entry.js +137 -47
  178. package/dist/cjs/ion-progress-bar.cjs.entry.js +22 -11
  179. package/dist/cjs/ion-radio_2.cjs.entry.js +42 -30
  180. package/dist/cjs/ion-range.cjs.entry.js +71 -33
  181. package/dist/cjs/ion-refresher_2.cjs.entry.js +68 -26
  182. package/dist/cjs/ion-reorder_2.cjs.entry.js +17 -19
  183. package/dist/cjs/ion-ripple-effect.cjs.entry.js +12 -6
  184. package/dist/cjs/ion-route_4.cjs.entry.js +34 -20
  185. package/dist/cjs/ion-searchbar.cjs.entry.js +83 -36
  186. package/dist/cjs/ion-segment-content.cjs.entry.js +2 -5
  187. package/dist/cjs/ion-segment-view.cjs.entry.js +6 -8
  188. package/dist/cjs/ion-segment_2.cjs.entry.js +47 -29
  189. package/dist/cjs/ion-select-modal.cjs.entry.js +13 -20
  190. package/dist/cjs/ion-select_3.cjs.entry.js +79 -57
  191. package/dist/cjs/ion-spinner.cjs.entry.js +8 -11
  192. package/dist/cjs/ion-split-pane.cjs.entry.js +12 -9
  193. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +25 -28
  194. package/dist/cjs/ion-tab_2.cjs.entry.js +8 -14
  195. package/dist/cjs/ion-text.cjs.entry.js +4 -8
  196. package/dist/cjs/ion-textarea.cjs.entry.js +69 -43
  197. package/dist/cjs/ion-toast.cjs.entry.js +65 -44
  198. package/dist/cjs/ion-toggle.cjs.entry.js +53 -31
  199. package/dist/cjs/{ionic-global-acb665ad.js → ionic-global-AdqEvgj6.js} +1 -1
  200. package/dist/cjs/ionic.cjs.js +8 -8
  201. package/dist/cjs/{ios.transition-ae7afca9.js → ios.transition-B8HcmmPx.js} +7 -7
  202. package/dist/cjs/{keyboard-0272231f.js → keyboard-UuAS4D_9.js} +1 -1
  203. package/dist/cjs/{keyboard-controller-c05e747a.js → keyboard-controller-GXBiBRKS.js} +2 -2
  204. package/dist/cjs/{keyboard-af1bb365.js → keyboard-hHzlEQpk.js} +3 -3
  205. package/dist/cjs/loader.cjs.js +4 -6
  206. package/dist/cjs/{md.transition-26003e25.js → md.transition-54O0AjJC.js} +7 -7
  207. package/dist/cjs/{notch-controller-ae03a497.js → notch-controller-DNfj7cO6.js} +2 -2
  208. package/dist/cjs/{overlays-32e1b66b.js → overlays-CSyZW4m0.js} +7 -7
  209. package/dist/cjs/{status-tap-03023755.js → status-tap-B1Kcv7yf.js} +5 -5
  210. package/dist/cjs/{swipe-back-cd0d9f77.js → swipe-back-Di-t3rsI.js} +4 -4
  211. package/dist/collection/collection-manifest.json +2 -2
  212. package/dist/collection/components/accordion/accordion.js +43 -13
  213. package/dist/collection/components/accordion-group/accordion-group.js +35 -8
  214. package/dist/collection/components/action-sheet/action-sheet.js +84 -31
  215. package/dist/collection/components/alert/alert.js +94 -34
  216. package/dist/collection/components/back-button/back-button.js +30 -14
  217. package/dist/collection/components/backdrop/backdrop.js +18 -3
  218. package/dist/collection/components/badge/badge.js +3 -4
  219. package/dist/collection/components/breadcrumb/breadcrumb.js +57 -26
  220. package/dist/collection/components/breadcrumbs/breadcrumbs.js +24 -10
  221. package/dist/collection/components/button/button.js +74 -33
  222. package/dist/collection/components/buttons/buttons.js +15 -1
  223. package/dist/collection/components/card/card.js +44 -16
  224. package/dist/collection/components/card-header/card-header.js +11 -3
  225. package/dist/collection/components/card-subtitle/card-subtitle.js +3 -4
  226. package/dist/collection/components/card-title/card-title.js +3 -4
  227. package/dist/collection/components/checkbox/checkbox.js +74 -24
  228. package/dist/collection/components/chip/chip.js +15 -4
  229. package/dist/collection/components/col/col.js +72 -50
  230. package/dist/collection/components/content/content.js +43 -9
  231. package/dist/collection/components/datetime/datetime.js +211 -72
  232. package/dist/collection/components/datetime-button/datetime-button.js +21 -11
  233. package/dist/collection/components/fab/fab.js +21 -6
  234. package/dist/collection/components/fab-button/fab-button.js +76 -28
  235. package/dist/collection/components/fab-list/fab-list.js +12 -2
  236. package/dist/collection/components/footer/footer.js +16 -5
  237. package/dist/collection/components/grid/grid.js +6 -1
  238. package/dist/collection/components/header/header.js +15 -4
  239. package/dist/collection/components/img/img.js +6 -6
  240. package/dist/collection/components/infinite-scroll/infinite-scroll.js +35 -7
  241. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +6 -4
  242. package/dist/collection/components/input/input.js +168 -69
  243. package/dist/collection/components/input-password-toggle/input-password-toggle.js +16 -8
  244. package/dist/collection/components/item/item.js +56 -21
  245. package/dist/collection/components/item-divider/item-divider.js +13 -3
  246. package/dist/collection/components/item-option/item-option.js +36 -16
  247. package/dist/collection/components/item-options/item-options.js +7 -1
  248. package/dist/collection/components/item-sliding/item-sliding.js +6 -1
  249. package/dist/collection/components/label/label.js +6 -4
  250. package/dist/collection/components/list/list.js +9 -3
  251. package/dist/collection/components/list-header/list-header.js +6 -6
  252. package/dist/collection/components/loading/loading.js +86 -29
  253. package/dist/collection/components/menu/menu.js +42 -10
  254. package/dist/collection/components/menu-button/menu-button.js +27 -10
  255. package/dist/collection/components/menu-toggle/menu-toggle.js +14 -5
  256. package/dist/collection/components/modal/modal.js +188 -51
  257. package/dist/collection/components/nav/nav.js +24 -11
  258. package/dist/collection/components/nav-link/nav-link.js +18 -8
  259. package/dist/collection/components/note/note.js +3 -4
  260. package/dist/collection/components/picker-column/picker-column.js +34 -10
  261. package/dist/collection/components/picker-column-option/picker-column-option.js +25 -4
  262. package/dist/collection/components/picker-legacy/picker.js +91 -31
  263. package/dist/collection/components/picker-legacy-column/picker-column.js +4 -2
  264. package/dist/collection/components/popover/popover.js +208 -55
  265. package/dist/collection/components/progress-bar/progress-bar.js +31 -6
  266. package/dist/collection/components/radio/radio.js +46 -16
  267. package/dist/collection/components/radio-group/radio-group.js +26 -12
  268. package/dist/collection/components/range/range.js +109 -34
  269. package/dist/collection/components/refresher/refresher.js +68 -6
  270. package/dist/collection/components/refresher-content/refresher-content.js +12 -8
  271. package/dist/collection/components/reorder-group/reorder-group.js +6 -1
  272. package/dist/collection/components/ripple-effect/ripple-effect.js +12 -1
  273. package/dist/collection/components/route/route.js +24 -9
  274. package/dist/collection/components/route-redirect/route-redirect.js +6 -6
  275. package/dist/collection/components/router/router.js +24 -2
  276. package/dist/collection/components/router-link/router-link.js +24 -12
  277. package/dist/collection/components/router-outlet/router-outlet.js +24 -8
  278. package/dist/collection/components/searchbar/searchbar.js +141 -46
  279. package/dist/collection/components/segment/segment.js +38 -13
  280. package/dist/collection/components/segment-button/segment-button.js +32 -11
  281. package/dist/collection/components/segment-view/segment-view.js +6 -2
  282. package/dist/collection/components/select/select.ios.css +3 -5
  283. package/dist/collection/components/select/select.js +117 -45
  284. package/dist/collection/components/select/select.md.css +15 -51
  285. package/dist/collection/components/select-modal/select-modal.js +9 -4
  286. package/dist/collection/components/select-option/select-option.js +9 -3
  287. package/dist/collection/components/select-popover/select-popover.js +18 -8
  288. package/dist/collection/components/skeleton-text/skeleton-text.js +6 -1
  289. package/dist/collection/components/spinner/spinner.js +15 -7
  290. package/dist/collection/components/split-pane/split-pane.js +17 -4
  291. package/dist/collection/components/tab/tab.js +14 -7
  292. package/dist/collection/components/tab-bar/tab-bar.js +14 -5
  293. package/dist/collection/components/tab-button/tab-button.js +32 -16
  294. package/dist/collection/components/tabs/tabs.js +5 -3
  295. package/dist/collection/components/text/text.js +3 -4
  296. package/dist/collection/components/textarea/textarea.js +144 -57
  297. package/dist/collection/components/title/title.js +6 -6
  298. package/dist/collection/components/toast/toast.js +119 -45
  299. package/dist/collection/components/toggle/toggle.js +75 -25
  300. package/dist/collection/components/toolbar/toolbar.js +3 -2
  301. package/dist/docs.d.ts +8 -0
  302. package/dist/docs.json +1799 -584
  303. package/dist/esm/{animation-eab5a4ca.js → animation-CCtpQcsN.js} +1 -1
  304. package/dist/esm/{app-globals-7b6cbf1a.js → app-globals-CispSZgz.js} +1 -1
  305. package/dist/esm/{button-active-90f1dbc4.js → button-active-D92yWoWC.js} +3 -3
  306. package/dist/esm/{capacitor-59395cbd.js → capacitor-CFERIeaU.js} +1 -1
  307. package/dist/esm/{data-174ad5e0.js → data-Dq3-TN9Z.js} +2 -2
  308. package/dist/esm/{framework-delegate-2eea1763.js → framework-delegate-D3CI7y6x.js} +1 -1
  309. package/dist/esm/{gesture-controller-314a54f6.js → gesture-controller-BTEOs1at.js} +1 -1
  310. package/dist/esm/{haptic-ac164e4c.js → haptic-DzAMWJuk.js} +2 -2
  311. package/dist/esm/{hardware-back-button-864101a3.js → hardware-back-button-CRemSDoj.js} +3 -3
  312. package/dist/esm/{helpers-78efeec3.js → helpers-Di6ciXLG.js} +2 -5
  313. package/dist/esm/{index-40894f4b.js → index-B2_fY2up.js} +2 -2
  314. package/dist/esm/{index-e2cf2ceb.js → index-BLV6ykCk.js} +2 -1
  315. package/dist/esm/{index-527b9e34.js → index-C5UXyyFe.js} +1378 -651
  316. package/dist/esm/{index-39782642.js → index-CfgBF1SE.js} +4 -6
  317. package/dist/esm/{index-e919e353.js → index-DWiwgv23.js} +3 -3
  318. package/dist/esm/{index-ecb55b8d.js → index-DYJvRcE0.js} +6 -6
  319. package/dist/esm/{index-f9f5d018.js → index-DZLiflRE.js} +6 -6
  320. package/dist/esm/{index-738d7504.js → index-PfJyigSK.js} +2 -2
  321. package/dist/esm/index.js +18 -18
  322. package/dist/esm/{input-shims-7dc1f6dc.js → input-shims-BL_oixbH.js} +8 -8
  323. package/dist/esm/{input.utils-28bf4ef0.js → input.utils-Bd73EHpQ.js} +3 -3
  324. package/dist/esm/ion-accordion_2.entry.js +54 -23
  325. package/dist/esm/ion-action-sheet.entry.js +50 -36
  326. package/dist/esm/ion-alert.entry.js +55 -39
  327. package/dist/esm/ion-app_8.entry.js +96 -63
  328. package/dist/esm/ion-avatar_3.entry.js +8 -14
  329. package/dist/esm/ion-back-button.entry.js +15 -16
  330. package/dist/esm/ion-backdrop.entry.js +13 -6
  331. package/dist/esm/ion-breadcrumb_2.entry.js +38 -32
  332. package/dist/esm/ion-button_2.entry.js +33 -28
  333. package/dist/esm/ion-card_5.entry.js +32 -33
  334. package/dist/esm/ion-checkbox.entry.js +44 -20
  335. package/dist/esm/ion-chip.entry.js +11 -8
  336. package/dist/esm/ion-col_3.entry.js +8 -32
  337. package/dist/esm/ion-datetime-button.entry.js +20 -18
  338. package/dist/esm/ion-datetime_3.entry.js +182 -92
  339. package/dist/esm/ion-fab_3.entry.js +57 -29
  340. package/dist/esm/ion-img.entry.js +4 -9
  341. package/dist/esm/ion-infinite-scroll_2.entry.js +35 -18
  342. package/dist/esm/ion-input-password-toggle.entry.js +11 -13
  343. package/dist/esm/ion-input.entry.js +76 -48
  344. package/dist/esm/ion-item-option_3.entry.js +32 -26
  345. package/dist/esm/ion-item_8.entry.js +49 -50
  346. package/dist/esm/ion-loading.entry.js +46 -29
  347. package/dist/esm/ion-menu_3.entry.js +62 -37
  348. package/dist/esm/ion-modal.entry.js +128 -50
  349. package/dist/esm/ion-nav_2.entry.js +17 -20
  350. package/dist/esm/ion-picker-column-option.entry.js +22 -9
  351. package/dist/esm/ion-picker-column.entry.js +30 -15
  352. package/dist/esm/ion-picker.entry.js +4 -6
  353. package/dist/esm/ion-popover.entry.js +137 -45
  354. package/dist/esm/ion-progress-bar.entry.js +22 -9
  355. package/dist/esm/ion-radio_2.entry.js +42 -28
  356. package/dist/esm/ion-range.entry.js +71 -31
  357. package/dist/esm/ion-refresher_2.entry.js +68 -24
  358. package/dist/esm/ion-reorder_2.entry.js +17 -17
  359. package/dist/esm/ion-ripple-effect.entry.js +12 -4
  360. package/dist/esm/ion-route_4.entry.js +34 -18
  361. package/dist/esm/ion-searchbar.entry.js +83 -34
  362. package/dist/esm/ion-segment-content.entry.js +2 -3
  363. package/dist/esm/ion-segment-view.entry.js +6 -6
  364. package/dist/esm/ion-segment_2.entry.js +47 -27
  365. package/dist/esm/ion-select-modal.entry.js +13 -18
  366. package/dist/esm/ion-select_3.entry.js +79 -55
  367. package/dist/esm/ion-spinner.entry.js +8 -9
  368. package/dist/esm/ion-split-pane.entry.js +12 -7
  369. package/dist/esm/ion-tab-bar_2.entry.js +25 -26
  370. package/dist/esm/ion-tab_2.entry.js +8 -12
  371. package/dist/esm/ion-text.entry.js +4 -6
  372. package/dist/esm/ion-textarea.entry.js +69 -41
  373. package/dist/esm/ion-toast.entry.js +65 -42
  374. package/dist/esm/ion-toggle.entry.js +53 -29
  375. package/dist/esm/{ionic-global-ca86cf32.js → ionic-global-GkM1xiqt.js} +1 -1
  376. package/dist/esm/ionic.js +7 -6
  377. package/dist/esm/{ios.transition-7fe5dbea.js → ios.transition-BcTzvx5_.js} +7 -7
  378. package/dist/esm/{keyboard-73175e24.js → keyboard-CUw4ekVy.js} +1 -1
  379. package/dist/esm/{keyboard-controller-ec5c2bfa.js → keyboard-controller-BaaVITYt.js} +2 -2
  380. package/dist/esm/{keyboard-52278bd7.js → keyboard-ywgs5efA.js} +3 -3
  381. package/dist/esm/loader.js +5 -5
  382. package/dist/esm/{md.transition-8dc58b46.js → md.transition-DYGWIgPE.js} +7 -7
  383. package/dist/esm/{notch-controller-00d92e89.js → notch-controller-PoOhjO4o.js} +2 -2
  384. package/dist/esm/{overlays-41a5d51b.js → overlays-BuSzwtlC.js} +7 -7
  385. package/dist/esm/{status-tap-f6d08e9e.js → status-tap-BPk7Ddsi.js} +5 -5
  386. package/dist/esm/{swipe-back-07df2095.js → swipe-back-Df75PJ2J.js} +4 -4
  387. package/dist/html.html-data.json +212 -0
  388. package/dist/index.js +1 -1
  389. package/dist/ionic/index.esm.js +1 -1
  390. package/dist/ionic/ionic.esm.js +1 -1
  391. package/dist/ionic/p-06d06c2f.entry.js +4 -0
  392. package/dist/ionic/p-10e11b67.entry.js +4 -0
  393. package/dist/ionic/p-10f11601.entry.js +4 -0
  394. package/dist/ionic/p-171d5d3e.entry.js +4 -0
  395. package/dist/ionic/p-210385cd.entry.js +4 -0
  396. package/dist/ionic/p-2469206a.entry.js +4 -0
  397. package/dist/ionic/p-261e3a47.entry.js +4 -0
  398. package/dist/ionic/p-2a2ab89d.entry.js +4 -0
  399. package/dist/ionic/p-2f416d26.entry.js +4 -0
  400. package/dist/ionic/p-3628b1f7.entry.js +4 -0
  401. package/dist/ionic/p-3bd766ca.entry.js +4 -0
  402. package/dist/ionic/p-414f60f0.entry.js +4 -0
  403. package/dist/ionic/p-49419ffd.entry.js +4 -0
  404. package/dist/ionic/p-49b72347.entry.js +4 -0
  405. package/dist/ionic/p-52eca165.entry.js +4 -0
  406. package/dist/ionic/p-6a8928b1.entry.js +4 -0
  407. package/dist/ionic/p-6d4f1c6e.entry.js +4 -0
  408. package/dist/ionic/{p-e8245753.entry.js → p-6f5d9223.entry.js} +1 -1
  409. package/dist/ionic/p-72d7dd7c.entry.js +4 -0
  410. package/dist/ionic/p-75959e43.entry.js +4 -0
  411. package/dist/ionic/p-76878c5f.entry.js +4 -0
  412. package/dist/ionic/p-7deacfed.entry.js +4 -0
  413. package/dist/ionic/p-841761ee.entry.js +4 -0
  414. package/dist/ionic/p-85d22d84.entry.js +4 -0
  415. package/dist/ionic/{p-c005cc37.entry.js → p-879a7b00.entry.js} +1 -1
  416. package/dist/ionic/p-8ca2b22c.entry.js +4 -0
  417. package/dist/ionic/p-8e57bbf1.entry.js +4 -0
  418. package/dist/ionic/p-92aed080.entry.js +4 -0
  419. package/dist/ionic/p-930ec949.entry.js +4 -0
  420. package/dist/ionic/p-9ca05f27.entry.js +4 -0
  421. package/dist/ionic/p-9d7d6758.entry.js +4 -0
  422. package/dist/ionic/p-9d8be89a.entry.js +4 -0
  423. package/dist/ionic/p-9eeaBrnk.js +4 -0
  424. package/dist/ionic/p-B1sP_kPm.js +4 -0
  425. package/dist/ionic/{p-f53ee2e7.js → p-B3UoCFcu.js} +1 -1
  426. package/dist/ionic/p-B61pJgh5.js +4 -0
  427. package/dist/ionic/p-B8iLKNde.js +4 -0
  428. package/dist/ionic/p-BBmUb2In.js +4 -0
  429. package/dist/ionic/{p-da2b833b.js → p-BLV6ykCk.js} +1 -1
  430. package/dist/ionic/p-BTEIaRld.js +4 -0
  431. package/dist/ionic/p-BwAZiDRk.js +4 -0
  432. package/dist/ionic/{p-624ecf03.js → p-C3eOXAUO.js} +1 -1
  433. package/dist/ionic/p-C5UXyyFe.js +5 -0
  434. package/dist/ionic/p-CIGNaXM1.js +4 -0
  435. package/dist/ionic/{p-89b61afc.js → p-CKvCXMs9.js} +1 -1
  436. package/dist/ionic/{p-f7ce606e.js → p-CdKu7oC9.js} +1 -1
  437. package/dist/ionic/{p-22bc235f.js → p-CdWpy93z.js} +1 -1
  438. package/dist/ionic/{p-3f4327f7.js → p-CeCT60rb.js} +1 -1
  439. package/dist/ionic/p-CiN6q3Lh.js +4 -0
  440. package/dist/ionic/p-Cl0B-RWe.js +4 -0
  441. package/dist/ionic/p-CtWGkNnJ.js +4 -0
  442. package/dist/ionic/{p-27281edd.js → p-D13Eaw-8.js} +1 -1
  443. package/dist/ionic/p-DFllLYu2.js +4 -0
  444. package/dist/ionic/p-DYo1kLGy.js +4 -0
  445. package/dist/ionic/p-Di6ciXLG.js +4 -0
  446. package/dist/ionic/{p-597ff9af.js → p-XWSYNdC9.js} +1 -1
  447. package/dist/ionic/p-a1581941.entry.js +4 -0
  448. package/dist/ionic/p-a1767652.entry.js +4 -0
  449. package/dist/ionic/p-a3ec5708.entry.js +4 -0
  450. package/dist/ionic/p-a8506291.entry.js +4 -0
  451. package/dist/ionic/p-a951373a.entry.js +4 -0
  452. package/dist/ionic/p-b3485dee.entry.js +4 -0
  453. package/dist/ionic/{p-2567237c.entry.js → p-b8a159eb.entry.js} +1 -1
  454. package/dist/ionic/p-bb3cf0f1.entry.js +4 -0
  455. package/dist/ionic/p-c0634ff3.entry.js +4 -0
  456. package/dist/ionic/p-ccbc5737.entry.js +4 -0
  457. package/dist/ionic/{p-9b069739.entry.js → p-d3ee5846.entry.js} +1 -1
  458. package/dist/ionic/p-d6a3361a.entry.js +4 -0
  459. package/dist/ionic/p-d7a76cd0.entry.js +4 -0
  460. package/dist/ionic/p-d85dfc51.entry.js +4 -0
  461. package/dist/ionic/{p-b87a9f1d.entry.js → p-dcf2e017.entry.js} +1 -1
  462. package/dist/ionic/p-ddc1c497.entry.js +4 -0
  463. package/dist/ionic/p-e01503b2.entry.js +4 -0
  464. package/dist/ionic/p-f9c55d46.entry.js +4 -0
  465. package/dist/ionic/p-fc3eb210.entry.js +4 -0
  466. package/dist/ionic/{p-756e4559.js → p-lw61HGQ-.js} +1 -1
  467. package/dist/ionic/{p-b9fa7882.js → p-mxKP5hf-.js} +1 -1
  468. package/dist/ionic/p-umtghMQY.js +4 -0
  469. package/dist/ionic/p-yluxF5qo.js +4 -0
  470. package/dist/ionic/p-zEz12j4K.js +4 -0
  471. package/dist/types/index.d.ts +1 -0
  472. package/dist/types/stencil-public-runtime.d.ts +9 -0
  473. package/hydrate/index.d.ts +40 -5
  474. package/hydrate/index.js +4540 -2180
  475. package/hydrate/index.mjs +4539 -2179
  476. package/loader/cdn.js +1 -2
  477. package/loader/index.cjs.js +1 -2
  478. package/loader/index.es2017.js +0 -1
  479. package/loader/index.js +1 -2
  480. package/package.json +2 -2
  481. package/dist/esm/polyfills/core-js.js +0 -11
  482. package/dist/esm/polyfills/dom.js +0 -79
  483. package/dist/esm/polyfills/es5-html-element.js +0 -1
  484. package/dist/esm/polyfills/index.js +0 -34
  485. package/dist/esm/polyfills/system.js +0 -6
  486. package/dist/esm-es5/animation-eab5a4ca.js +0 -4
  487. package/dist/esm-es5/app-globals-7b6cbf1a.js +0 -4
  488. package/dist/esm-es5/button-active-90f1dbc4.js +0 -4
  489. package/dist/esm-es5/capacitor-59395cbd.js +0 -4
  490. package/dist/esm-es5/compare-with-utils-a96ff2ea.js +0 -4
  491. package/dist/esm-es5/config-49c88215.js +0 -4
  492. package/dist/esm-es5/cubic-bezier-fe2083dc.js +0 -4
  493. package/dist/esm-es5/data-174ad5e0.js +0 -4
  494. package/dist/esm-es5/dir-babeabeb.js +0 -4
  495. package/dist/esm-es5/focus-visible-dd40d69f.js +0 -4
  496. package/dist/esm-es5/framework-delegate-2eea1763.js +0 -4
  497. package/dist/esm-es5/gesture-controller-314a54f6.js +0 -4
  498. package/dist/esm-es5/haptic-ac164e4c.js +0 -4
  499. package/dist/esm-es5/hardware-back-button-864101a3.js +0 -4
  500. package/dist/esm-es5/helpers-78efeec3.js +0 -4
  501. package/dist/esm-es5/index-39782642.js +0 -4
  502. package/dist/esm-es5/index-40894f4b.js +0 -4
  503. package/dist/esm-es5/index-527b9e34.js +0 -5
  504. package/dist/esm-es5/index-738d7504.js +0 -4
  505. package/dist/esm-es5/index-a5d50daf.js +0 -4
  506. package/dist/esm-es5/index-e2cf2ceb.js +0 -4
  507. package/dist/esm-es5/index-e919e353.js +0 -4
  508. package/dist/esm-es5/index-ecb55b8d.js +0 -4
  509. package/dist/esm-es5/index-f9f5d018.js +0 -4
  510. package/dist/esm-es5/index.js +0 -4
  511. package/dist/esm-es5/input-shims-7dc1f6dc.js +0 -4
  512. package/dist/esm-es5/input.utils-28bf4ef0.js +0 -4
  513. package/dist/esm-es5/ion-accordion_2.entry.js +0 -4
  514. package/dist/esm-es5/ion-action-sheet.entry.js +0 -4
  515. package/dist/esm-es5/ion-alert.entry.js +0 -4
  516. package/dist/esm-es5/ion-app_8.entry.js +0 -4
  517. package/dist/esm-es5/ion-avatar_3.entry.js +0 -4
  518. package/dist/esm-es5/ion-back-button.entry.js +0 -4
  519. package/dist/esm-es5/ion-backdrop.entry.js +0 -4
  520. package/dist/esm-es5/ion-breadcrumb_2.entry.js +0 -4
  521. package/dist/esm-es5/ion-button_2.entry.js +0 -4
  522. package/dist/esm-es5/ion-card_5.entry.js +0 -4
  523. package/dist/esm-es5/ion-checkbox.entry.js +0 -4
  524. package/dist/esm-es5/ion-chip.entry.js +0 -4
  525. package/dist/esm-es5/ion-col_3.entry.js +0 -4
  526. package/dist/esm-es5/ion-datetime-button.entry.js +0 -4
  527. package/dist/esm-es5/ion-datetime_3.entry.js +0 -4
  528. package/dist/esm-es5/ion-fab_3.entry.js +0 -4
  529. package/dist/esm-es5/ion-img.entry.js +0 -4
  530. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +0 -4
  531. package/dist/esm-es5/ion-input-password-toggle.entry.js +0 -4
  532. package/dist/esm-es5/ion-input.entry.js +0 -4
  533. package/dist/esm-es5/ion-item-option_3.entry.js +0 -4
  534. package/dist/esm-es5/ion-item_8.entry.js +0 -4
  535. package/dist/esm-es5/ion-loading.entry.js +0 -4
  536. package/dist/esm-es5/ion-menu_3.entry.js +0 -4
  537. package/dist/esm-es5/ion-modal.entry.js +0 -4
  538. package/dist/esm-es5/ion-nav_2.entry.js +0 -4
  539. package/dist/esm-es5/ion-picker-column-option.entry.js +0 -4
  540. package/dist/esm-es5/ion-picker-column.entry.js +0 -4
  541. package/dist/esm-es5/ion-picker.entry.js +0 -4
  542. package/dist/esm-es5/ion-popover.entry.js +0 -4
  543. package/dist/esm-es5/ion-progress-bar.entry.js +0 -4
  544. package/dist/esm-es5/ion-radio_2.entry.js +0 -4
  545. package/dist/esm-es5/ion-range.entry.js +0 -4
  546. package/dist/esm-es5/ion-refresher_2.entry.js +0 -4
  547. package/dist/esm-es5/ion-reorder_2.entry.js +0 -4
  548. package/dist/esm-es5/ion-ripple-effect.entry.js +0 -4
  549. package/dist/esm-es5/ion-route_4.entry.js +0 -4
  550. package/dist/esm-es5/ion-searchbar.entry.js +0 -4
  551. package/dist/esm-es5/ion-segment-content.entry.js +0 -4
  552. package/dist/esm-es5/ion-segment-view.entry.js +0 -4
  553. package/dist/esm-es5/ion-segment_2.entry.js +0 -4
  554. package/dist/esm-es5/ion-select-modal.entry.js +0 -4
  555. package/dist/esm-es5/ion-select_3.entry.js +0 -4
  556. package/dist/esm-es5/ion-spinner.entry.js +0 -4
  557. package/dist/esm-es5/ion-split-pane.entry.js +0 -4
  558. package/dist/esm-es5/ion-tab-bar_2.entry.js +0 -4
  559. package/dist/esm-es5/ion-tab_2.entry.js +0 -4
  560. package/dist/esm-es5/ion-text.entry.js +0 -4
  561. package/dist/esm-es5/ion-textarea.entry.js +0 -4
  562. package/dist/esm-es5/ion-toast.entry.js +0 -4
  563. package/dist/esm-es5/ion-toggle.entry.js +0 -4
  564. package/dist/esm-es5/ionic-global-ca86cf32.js +0 -4
  565. package/dist/esm-es5/ionic.js +0 -4
  566. package/dist/esm-es5/ios.transition-7fe5dbea.js +0 -4
  567. package/dist/esm-es5/keyboard-52278bd7.js +0 -4
  568. package/dist/esm-es5/keyboard-73175e24.js +0 -4
  569. package/dist/esm-es5/keyboard-controller-ec5c2bfa.js +0 -4
  570. package/dist/esm-es5/loader.js +0 -4
  571. package/dist/esm-es5/lock-controller-316928be.js +0 -4
  572. package/dist/esm-es5/md.transition-8dc58b46.js +0 -4
  573. package/dist/esm-es5/notch-controller-00d92e89.js +0 -4
  574. package/dist/esm-es5/overlays-41a5d51b.js +0 -4
  575. package/dist/esm-es5/spinner-configs-964f7cf3.js +0 -4
  576. package/dist/esm-es5/status-tap-f6d08e9e.js +0 -4
  577. package/dist/esm-es5/swipe-back-07df2095.js +0 -4
  578. package/dist/esm-es5/theme-01f3f29c.js +0 -4
  579. package/dist/esm-es5/watch-options-c2911ace.js +0 -4
  580. package/dist/ionic/ionic.js +0 -127
  581. package/dist/ionic/p-012c3ceb.system.js +0 -4
  582. package/dist/ionic/p-027a48f1.entry.js +0 -4
  583. package/dist/ionic/p-058b7f35.js +0 -4
  584. package/dist/ionic/p-05b65d7a.entry.js +0 -4
  585. package/dist/ionic/p-08e01816.system.js +0 -4
  586. package/dist/ionic/p-09d185ff.system.js +0 -4
  587. package/dist/ionic/p-0a456b7f.entry.js +0 -4
  588. package/dist/ionic/p-0adb6909.system.entry.js +0 -4
  589. package/dist/ionic/p-0bedc891.system.entry.js +0 -4
  590. package/dist/ionic/p-0d1be7c9.system.entry.js +0 -4
  591. package/dist/ionic/p-0ec5b7cf.system.js +0 -4
  592. package/dist/ionic/p-14114a59.system.entry.js +0 -4
  593. package/dist/ionic/p-15bb1dde.system.js +0 -4
  594. package/dist/ionic/p-180b4f9a.entry.js +0 -4
  595. package/dist/ionic/p-19c32a76.entry.js +0 -4
  596. package/dist/ionic/p-1b0b2210.entry.js +0 -4
  597. package/dist/ionic/p-1bf5ec17.system.js +0 -4
  598. package/dist/ionic/p-1c1d781d.system.entry.js +0 -4
  599. package/dist/ionic/p-1c8b3ac9.entry.js +0 -4
  600. package/dist/ionic/p-1de5dfcd.system.entry.js +0 -4
  601. package/dist/ionic/p-1dfc11b3.system.js +0 -4
  602. package/dist/ionic/p-1e4371bd.js +0 -4
  603. package/dist/ionic/p-1e955a45.system.js +0 -4
  604. package/dist/ionic/p-20d469d0.system.js +0 -4
  605. package/dist/ionic/p-21891ead.js +0 -4
  606. package/dist/ionic/p-28c81576.entry.js +0 -4
  607. package/dist/ionic/p-29a5b4e4.entry.js +0 -4
  608. package/dist/ionic/p-29da3dcd.entry.js +0 -4
  609. package/dist/ionic/p-2a2c6bf4.system.entry.js +0 -4
  610. package/dist/ionic/p-2b7827c7.js +0 -4
  611. package/dist/ionic/p-33518a04.entry.js +0 -4
  612. package/dist/ionic/p-35f14792.entry.js +0 -4
  613. package/dist/ionic/p-383a6058.entry.js +0 -4
  614. package/dist/ionic/p-3855fef7.system.js +0 -4
  615. package/dist/ionic/p-38eaf9cf.system.entry.js +0 -4
  616. package/dist/ionic/p-3ba2a2cd.system.js +0 -4
  617. package/dist/ionic/p-3e1e14d9.system.js +0 -4
  618. package/dist/ionic/p-41e70fa2.entry.js +0 -4
  619. package/dist/ionic/p-44fde7d5.system.entry.js +0 -4
  620. package/dist/ionic/p-44ff75ea.js +0 -4
  621. package/dist/ionic/p-455cd7cc.system.js +0 -4
  622. package/dist/ionic/p-4609d030.system.js +0 -4
  623. package/dist/ionic/p-4630688e.system.entry.js +0 -4
  624. package/dist/ionic/p-4662a25c.system.entry.js +0 -4
  625. package/dist/ionic/p-48ded460.entry.js +0 -4
  626. package/dist/ionic/p-49d53551.system.entry.js +0 -4
  627. package/dist/ionic/p-4b07c60a.system.js +0 -4
  628. package/dist/ionic/p-4c7e6fec.system.entry.js +0 -4
  629. package/dist/ionic/p-4ea4c73a.system.entry.js +0 -4
  630. package/dist/ionic/p-4eeca839.system.entry.js +0 -4
  631. package/dist/ionic/p-4f255d5a.system.js +0 -4
  632. package/dist/ionic/p-50e0ce13.entry.js +0 -4
  633. package/dist/ionic/p-51479be0.system.entry.js +0 -4
  634. package/dist/ionic/p-5578033e.system.entry.js +0 -4
  635. package/dist/ionic/p-5fb1321f.entry.js +0 -4
  636. package/dist/ionic/p-607aa181.entry.js +0 -4
  637. package/dist/ionic/p-61373098.js +0 -4
  638. package/dist/ionic/p-6155027f.system.entry.js +0 -4
  639. package/dist/ionic/p-61e794fb.entry.js +0 -4
  640. package/dist/ionic/p-64d8ac48.js +0 -4
  641. package/dist/ionic/p-657ada6a.entry.js +0 -4
  642. package/dist/ionic/p-65943bec.system.entry.js +0 -4
  643. package/dist/ionic/p-65e732b9.entry.js +0 -4
  644. package/dist/ionic/p-66a5d6a8.js +0 -5
  645. package/dist/ionic/p-69a96be9.system.entry.js +0 -4
  646. package/dist/ionic/p-6c044a1d.system.js +0 -4
  647. package/dist/ionic/p-7058a5e4.system.entry.js +0 -4
  648. package/dist/ionic/p-705fda69.system.js +0 -4
  649. package/dist/ionic/p-707408c5.system.entry.js +0 -4
  650. package/dist/ionic/p-70abb1f2.system.entry.js +0 -4
  651. package/dist/ionic/p-747f9517.entry.js +0 -4
  652. package/dist/ionic/p-772d1657.system.js +0 -4
  653. package/dist/ionic/p-77aa5fef.system.entry.js +0 -4
  654. package/dist/ionic/p-792919fd.system.js +0 -4
  655. package/dist/ionic/p-7b886108.system.entry.js +0 -4
  656. package/dist/ionic/p-7c9daa6f.entry.js +0 -4
  657. package/dist/ionic/p-7cc33a9a.system.js +0 -4
  658. package/dist/ionic/p-7e3b5638.system.entry.js +0 -4
  659. package/dist/ionic/p-7f49a9c4.entry.js +0 -4
  660. package/dist/ionic/p-843ac05d.system.entry.js +0 -4
  661. package/dist/ionic/p-87b0d2c9.entry.js +0 -4
  662. package/dist/ionic/p-8985cdb6.system.js +0 -4
  663. package/dist/ionic/p-8b1c1fd7.entry.js +0 -4
  664. package/dist/ionic/p-8b22be32.system.entry.js +0 -4
  665. package/dist/ionic/p-8d98e2bb.entry.js +0 -4
  666. package/dist/ionic/p-8ededb41.js +0 -4
  667. package/dist/ionic/p-9146695e.system.js +0 -4
  668. package/dist/ionic/p-959cf042.system.entry.js +0 -4
  669. package/dist/ionic/p-96eec056.entry.js +0 -4
  670. package/dist/ionic/p-978bdf4c.system.js +0 -4
  671. package/dist/ionic/p-979d4f5c.system.js +0 -4
  672. package/dist/ionic/p-9870728f.js +0 -4
  673. package/dist/ionic/p-99803283.entry.js +0 -4
  674. package/dist/ionic/p-9af7f110.js +0 -4
  675. package/dist/ionic/p-9e45532a.system.js +0 -4
  676. package/dist/ionic/p-a26d7667.system.entry.js +0 -4
  677. package/dist/ionic/p-a3c931ad.system.js +0 -4
  678. package/dist/ionic/p-a4866e3e.system.js +0 -4
  679. package/dist/ionic/p-a520973b.entry.js +0 -4
  680. package/dist/ionic/p-a6625de8.system.js +0 -4
  681. package/dist/ionic/p-a75a9e5a.system.entry.js +0 -4
  682. package/dist/ionic/p-a768ae50.entry.js +0 -4
  683. package/dist/ionic/p-a7830ff8.entry.js +0 -4
  684. package/dist/ionic/p-a9198501.system.entry.js +0 -4
  685. package/dist/ionic/p-a93873de.system.js +0 -4
  686. package/dist/ionic/p-ab7337e1.entry.js +0 -4
  687. package/dist/ionic/p-abe101da.system.js +0 -4
  688. package/dist/ionic/p-ac09b6e9.system.entry.js +0 -4
  689. package/dist/ionic/p-ac58d726.system.entry.js +0 -4
  690. package/dist/ionic/p-b06ac4a5.system.js +0 -4
  691. package/dist/ionic/p-b1673667.entry.js +0 -4
  692. package/dist/ionic/p-b1f9fbe8.system.entry.js +0 -4
  693. package/dist/ionic/p-b2ee0628.system.entry.js +0 -4
  694. package/dist/ionic/p-b8a461f5.system.entry.js +0 -4
  695. package/dist/ionic/p-bf64af90.system.js +0 -4
  696. package/dist/ionic/p-c095b902.entry.js +0 -4
  697. package/dist/ionic/p-c27c57ea.system.entry.js +0 -4
  698. package/dist/ionic/p-c3f9d9fe.js +0 -4
  699. package/dist/ionic/p-c468af8a.system.js +0 -4
  700. package/dist/ionic/p-c53c414d.system.entry.js +0 -4
  701. package/dist/ionic/p-c61cc894.js +0 -4
  702. package/dist/ionic/p-c63d8dc1.js +0 -4
  703. package/dist/ionic/p-c7e16491.js +0 -4
  704. package/dist/ionic/p-ccb740ea.entry.js +0 -4
  705. package/dist/ionic/p-cec54707.system.entry.js +0 -4
  706. package/dist/ionic/p-cfc08422.entry.js +0 -4
  707. package/dist/ionic/p-cff4f96c.entry.js +0 -4
  708. package/dist/ionic/p-d40f2b7a.js +0 -4
  709. package/dist/ionic/p-d70a9e6d.system.js +0 -4
  710. package/dist/ionic/p-d823e7b6.system.entry.js +0 -4
  711. package/dist/ionic/p-d882f1e2.system.entry.js +0 -4
  712. package/dist/ionic/p-d8d84afa.system.js +0 -4
  713. package/dist/ionic/p-db3b409e.system.entry.js +0 -4
  714. package/dist/ionic/p-e11ff516.entry.js +0 -4
  715. package/dist/ionic/p-e29c5aab.system.entry.js +0 -4
  716. package/dist/ionic/p-e2ce5f8b.entry.js +0 -4
  717. package/dist/ionic/p-e3284879.system.entry.js +0 -4
  718. package/dist/ionic/p-e3e4eed7.entry.js +0 -4
  719. package/dist/ionic/p-e4683bfd.system.entry.js +0 -4
  720. package/dist/ionic/p-e4d2c281.entry.js +0 -4
  721. package/dist/ionic/p-e65b8460.entry.js +0 -4
  722. package/dist/ionic/p-e673a0a2.system.js +0 -4
  723. package/dist/ionic/p-e6cdfa96.system.entry.js +0 -4
  724. package/dist/ionic/p-ece78e7b.js +0 -4
  725. package/dist/ionic/p-ee86cfff.system.js +0 -4
  726. package/dist/ionic/p-f11a9436.system.js +0 -5
  727. package/dist/ionic/p-f201b53a.system.js +0 -4
  728. package/dist/ionic/p-f23124c4.system.js +0 -4
  729. package/dist/ionic/p-f233f1e0.system.js +0 -4
  730. package/dist/ionic/p-f387b3c6.system.entry.js +0 -4
  731. package/dist/ionic/p-f5a04e5e.system.entry.js +0 -4
  732. package/dist/ionic/p-f6bb9be7.system.entry.js +0 -4
  733. package/dist/ionic/p-f70fc14a.entry.js +0 -4
  734. package/dist/ionic/p-f834322a.entry.js +0 -4
  735. package/dist/ionic/p-f896194a.system.entry.js +0 -4
  736. package/dist/ionic/p-fa70eaab.entry.js +0 -4
  737. package/dist/ionic/p-ffa3ba3c.js +0 -4
  738. package/loader/package.json +0 -11
  739. /package/dist/cjs/{compare-with-utils-df1001d7.js → compare-with-utils-DSicavqM.js} +0 -0
  740. /package/dist/cjs/{config-4f60b98a.js → config-BHiHGeHc.js} +0 -0
  741. /package/dist/cjs/{cubic-bezier-f2dccc53.js → cubic-bezier-DAjy1V-e.js} +0 -0
  742. /package/dist/cjs/{dir-94c21456.js → dir-Cn0z1rJH.js} +0 -0
  743. /package/dist/cjs/{focus-visible-7a0ce04f.js → focus-visible-CCvKiLh3.js} +0 -0
  744. /package/dist/cjs/{index-c8d52405.js → index-DkNv4J_i.js} +0 -0
  745. /package/dist/cjs/{lock-controller-6585a42a.js → lock-controller-aDB9wrEf.js} +0 -0
  746. /package/dist/cjs/{spinner-configs-282fd50a.js → spinner-configs-DxHKnd3-.js} +0 -0
  747. /package/dist/cjs/{theme-d1c573d2.js → theme-CeDs6Hcv.js} +0 -0
  748. /package/dist/cjs/{watch-options-f5f3e158.js → watch-options-CviOsrTS.js} +0 -0
  749. /package/dist/esm/{compare-with-utils-a96ff2ea.js → compare-with-utils-sObYyvOy.js} +0 -0
  750. /package/dist/esm/{config-49c88215.js → config-O8NobGs3.js} +0 -0
  751. /package/dist/esm/{cubic-bezier-fe2083dc.js → cubic-bezier-hHmYLOfE.js} +0 -0
  752. /package/dist/esm/{dir-babeabeb.js → dir-C53feagD.js} +0 -0
  753. /package/dist/esm/{focus-visible-dd40d69f.js → focus-visible-BmVRXR1y.js} +0 -0
  754. /package/dist/esm/{index-a5d50daf.js → index-ZjP4CjeZ.js} +0 -0
  755. /package/dist/esm/{lock-controller-316928be.js → lock-controller-B-hirT0v.js} +0 -0
  756. /package/dist/esm/{spinner-configs-964f7cf3.js → spinner-configs-D4RIp70E.js} +0 -0
  757. /package/dist/esm/{theme-01f3f29c.js → theme-DiVJyqlX.js} +0 -0
  758. /package/dist/esm/{watch-options-c2911ace.js → watch-options-Dtdm8lKC.js} +0 -0
  759. /package/dist/ionic/{p-ccd02320.js → p-B-hirT0v.js} +0 -0
  760. /package/dist/ionic/{p-9b97df10.js → p-BTEOs1at.js} +0 -0
  761. /package/dist/ionic/{p-d47265c8.js → p-BmVRXR1y.js} +0 -0
  762. /package/dist/ionic/{p-fb813dab.js → p-C53feagD.js} +0 -0
  763. /package/dist/ionic/{p-f0c2a614.js → p-D4RIp70E.js} +0 -0
  764. /package/dist/ionic/{p-47794def.js → p-DiVJyqlX.js} +0 -0
  765. /package/dist/ionic/{p-459d13d5.js → p-Dtdm8lKC.js} +0 -0
  766. /package/dist/ionic/{p-41d5544e.js → p-O8NobGs3.js} +0 -0
  767. /package/dist/ionic/{p-7b30edcc.js → p-ZjP4CjeZ.js} +0 -0
  768. /package/dist/ionic/{p-2408c236.js → p-hHmYLOfE.js} +0 -0
  769. /package/dist/ionic/{p-de756e5c.js → p-sObYyvOy.js} +0 -0
@@ -3,31 +3,11 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- function _interopNamespace(e) {
7
- if (e && e.__esModule) return e;
8
- var n = Object.create(null);
9
- if (e) {
10
- Object.keys(e).forEach(function (k) {
11
- if (k !== 'default') {
12
- var d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: function () {
16
- return e[k];
17
- }
18
- });
19
- }
20
- });
21
- }
22
- n['default'] = e;
23
- return Object.freeze(n);
24
- }
25
-
26
6
  const NAMESPACE = 'ionic';
27
- const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: true, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
7
+ const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
28
8
 
29
9
  /*
30
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
10
+ Stencil Client Platform v4.29.2 | MIT Licensed | https://stenciljs.com
31
11
  */
32
12
  var __defProp = Object.defineProperty;
33
13
  var __export = (target, all) => {
@@ -35,14 +15,47 @@ var __export = (target, all) => {
35
15
  __defProp(target, name, { get: all[name], enumerable: true });
36
16
  };
37
17
  var Build = {
38
- isDev: false,
39
- isBrowser: true,
40
- isServer: false,
41
- isTesting: false
42
- };
43
- var hostRefs = /* @__PURE__ */ new WeakMap();
44
- var getHostRef = (ref) => hostRefs.get(ref);
45
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
18
+ isBrowser: true};
19
+
20
+ // src/utils/constants.ts
21
+ var SVG_NS = "http://www.w3.org/2000/svg";
22
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
23
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
24
+ PrimitiveType2["Undefined"] = "undefined";
25
+ PrimitiveType2["Null"] = "null";
26
+ PrimitiveType2["String"] = "string";
27
+ PrimitiveType2["Number"] = "number";
28
+ PrimitiveType2["SpecialNumber"] = "number";
29
+ PrimitiveType2["Boolean"] = "boolean";
30
+ PrimitiveType2["BigInt"] = "bigint";
31
+ return PrimitiveType2;
32
+ })(PrimitiveType || {});
33
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
34
+ NonPrimitiveType2["Array"] = "array";
35
+ NonPrimitiveType2["Date"] = "date";
36
+ NonPrimitiveType2["Map"] = "map";
37
+ NonPrimitiveType2["Object"] = "object";
38
+ NonPrimitiveType2["RegularExpression"] = "regexp";
39
+ NonPrimitiveType2["Set"] = "set";
40
+ NonPrimitiveType2["Channel"] = "channel";
41
+ NonPrimitiveType2["Symbol"] = "symbol";
42
+ return NonPrimitiveType2;
43
+ })(NonPrimitiveType || {});
44
+ var TYPE_CONSTANT = "type";
45
+ var VALUE_CONSTANT = "value";
46
+ var SERIALIZED_PREFIX = "serialized:";
47
+
48
+ // src/client/client-host-ref.ts
49
+ var getHostRef = (ref) => {
50
+ if (ref.__stencil__getHostRef) {
51
+ return ref.__stencil__getHostRef();
52
+ }
53
+ return void 0;
54
+ };
55
+ var registerInstance = (lazyInstance, hostRef) => {
56
+ lazyInstance.__stencil__getHostRef = () => hostRef;
57
+ hostRef.$lazyInstance$ = lazyInstance;
58
+ };
46
59
  var registerHost = (hostElement, cmpMeta) => {
47
60
  const hostRef = {
48
61
  $flags$: 0,
@@ -58,7 +71,9 @@ var registerHost = (hostElement, cmpMeta) => {
58
71
  hostElement["s-p"] = [];
59
72
  hostElement["s-rc"] = [];
60
73
  }
61
- return hostRefs.set(hostElement, hostRef);
74
+ const ref = hostRef;
75
+ hostElement.__stencil__getHostRef = () => ref;
76
+ return ref;
62
77
  };
63
78
  var isMemberInElement = (elm, memberName) => memberName in elm;
64
79
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -76,18 +91,23 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
76
91
  return module[exportName];
77
92
  }
78
93
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
79
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
94
+ return import(
80
95
  /* @vite-ignore */
81
96
  /* webpackInclude: /\.entry\.js$/ */
82
97
  /* webpackExclude: /\.system\.entry\.js$/ */
83
98
  /* webpackMode: "lazy" */
84
99
  `./${bundleId}.entry.js${""}`
85
- )); }).then((importedModule) => {
86
- {
87
- cmpModules.set(bundleId, importedModule);
100
+ ).then(
101
+ (importedModule) => {
102
+ {
103
+ cmpModules.set(bundleId, importedModule);
104
+ }
105
+ return importedModule[exportName];
106
+ },
107
+ (e) => {
108
+ consoleError(e, hostRef.$hostElement$);
88
109
  }
89
- return importedModule[exportName];
90
- }, consoleError);
110
+ );
91
111
  };
92
112
 
93
113
  // src/client/client-style.ts
@@ -99,6 +119,7 @@ var CONTENT_REF_ID = "r";
99
119
  var ORG_LOCATION_ID = "o";
100
120
  var SLOT_NODE_ID = "s";
101
121
  var TEXT_NODE_ID = "t";
122
+ var COMMENT_NODE_ID = "c";
102
123
  var HYDRATE_ID = "s-id";
103
124
  var HYDRATED_STYLE_ID = "sty-id";
104
125
  var HYDRATE_CHILD_ID = "c-id";
@@ -106,7 +127,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
106
127
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
107
128
  var XLINK_NS = "http://www.w3.org/1999/xlink";
108
129
  var win = typeof window !== "undefined" ? window : {};
109
- var doc = win.document || { head: {} };
110
130
  var H = win.HTMLElement || class {
111
131
  };
112
132
  var plt = {
@@ -120,9 +140,10 @@ var plt = {
120
140
  };
121
141
  var supportsShadow = BUILD.shadowDom;
122
142
  var supportsListenerOptions = /* @__PURE__ */ (() => {
143
+ var _a;
123
144
  let supportsListenerOptions2 = false;
124
145
  try {
125
- doc.addEventListener(
146
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
126
147
  "e",
127
148
  null,
128
149
  Object.defineProperty({}, "passive", {
@@ -187,24 +208,114 @@ var getAssetPath = (path) => {
187
208
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
188
209
  };
189
210
 
190
- // src/utils/constants.ts
191
- var EMPTY_OBJ = {};
192
- var SVG_NS = "http://www.w3.org/2000/svg";
193
- var HTML_NS = "http://www.w3.org/1999/xhtml";
194
-
195
211
  // src/utils/helpers.ts
196
- var isDef = (v) => v != null;
212
+ var isDef = (v) => v != null && v !== void 0;
197
213
  var isComplexType = (o) => {
198
214
  o = typeof o;
199
215
  return o === "object" || o === "function";
200
216
  };
201
217
 
202
218
  // src/utils/query-nonce-meta-tag-content.ts
203
- function queryNonceMetaTagContent(doc2) {
219
+ function queryNonceMetaTagContent(doc) {
204
220
  var _a, _b, _c;
205
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
221
+ 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;
206
222
  }
207
223
 
224
+ // src/utils/remote-value.ts
225
+ var RemoteValue = class _RemoteValue {
226
+ /**
227
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
228
+ *
229
+ * @param serialized The serialized LocalValue object
230
+ * @returns The original JavaScript value/object
231
+ */
232
+ static fromLocalValue(serialized) {
233
+ const type = serialized[TYPE_CONSTANT];
234
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
235
+ switch (type) {
236
+ case "string" /* String */:
237
+ return value;
238
+ case "boolean" /* Boolean */:
239
+ return value;
240
+ case "bigint" /* BigInt */:
241
+ return BigInt(value);
242
+ case "undefined" /* Undefined */:
243
+ return void 0;
244
+ case "null" /* Null */:
245
+ return null;
246
+ case "number" /* Number */:
247
+ if (value === "NaN") return NaN;
248
+ if (value === "-0") return -0;
249
+ if (value === "Infinity") return Infinity;
250
+ if (value === "-Infinity") return -Infinity;
251
+ return value;
252
+ case "array" /* Array */:
253
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
254
+ case "date" /* Date */:
255
+ return new Date(value);
256
+ case "map" /* Map */:
257
+ const map2 = /* @__PURE__ */ new Map();
258
+ for (const [key, val] of value) {
259
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
260
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
261
+ map2.set(deserializedKey, deserializedValue);
262
+ }
263
+ return map2;
264
+ case "object" /* Object */:
265
+ const obj = {};
266
+ for (const [key, val] of value) {
267
+ obj[key] = _RemoteValue.fromLocalValue(val);
268
+ }
269
+ return obj;
270
+ case "regexp" /* RegularExpression */:
271
+ const { pattern, flags } = value;
272
+ return new RegExp(pattern, flags);
273
+ case "set" /* Set */:
274
+ const set = /* @__PURE__ */ new Set();
275
+ for (const item of value) {
276
+ set.add(_RemoteValue.fromLocalValue(item));
277
+ }
278
+ return set;
279
+ case "symbol" /* Symbol */:
280
+ return Symbol(value);
281
+ default:
282
+ throw new Error(`Unsupported type: ${type}`);
283
+ }
284
+ }
285
+ /**
286
+ * Utility method to deserialize multiple LocalValues at once
287
+ *
288
+ * @param serializedValues Array of serialized LocalValue objects
289
+ * @returns Array of deserialized JavaScript values
290
+ */
291
+ static fromLocalValueArray(serializedValues) {
292
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
293
+ }
294
+ /**
295
+ * Verifies if the given object matches the structure of a serialized LocalValue
296
+ *
297
+ * @param obj Object to verify
298
+ * @returns boolean indicating if the object has LocalValue structure
299
+ */
300
+ static isLocalValueObject(obj) {
301
+ if (typeof obj !== "object" || obj === null) {
302
+ return false;
303
+ }
304
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
305
+ return false;
306
+ }
307
+ const type = obj[TYPE_CONSTANT];
308
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
309
+ if (!hasTypeProperty) {
310
+ return false;
311
+ }
312
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
313
+ return obj.hasOwnProperty(VALUE_CONSTANT);
314
+ }
315
+ return true;
316
+ }
317
+ };
318
+
208
319
  // src/utils/result.ts
209
320
  var result_exports = {};
210
321
  __export(result_exports, {
@@ -253,6 +364,527 @@ var unwrapErr = (result) => {
253
364
  throw result.value;
254
365
  }
255
366
  };
367
+
368
+ // src/utils/serialize.ts
369
+ function deserializeProperty(value) {
370
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
371
+ return value;
372
+ }
373
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
374
+ }
375
+ var updateFallbackSlotVisibility = (elm) => {
376
+ const childNodes = internalCall(elm, "childNodes");
377
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
378
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
379
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
380
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
381
+ slotNode.hidden = true;
382
+ } else {
383
+ slotNode.hidden = false;
384
+ }
385
+ }
386
+ });
387
+ }
388
+ let i2 = 0;
389
+ for (i2 = 0; i2 < childNodes.length; i2++) {
390
+ const childNode = childNodes[i2];
391
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
392
+ updateFallbackSlotVisibility(childNode);
393
+ }
394
+ }
395
+ };
396
+ var getSlottedChildNodes = (childNodes) => {
397
+ const result = [];
398
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
399
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
400
+ if (slottedNode && slottedNode.isConnected) {
401
+ result.push(slottedNode);
402
+ }
403
+ }
404
+ return result;
405
+ };
406
+ function getHostSlotNodes(childNodes, hostName, slotName) {
407
+ let i2 = 0;
408
+ let slottedNodes = [];
409
+ let childNode;
410
+ for (; i2 < childNodes.length; i2++) {
411
+ childNode = childNodes[i2];
412
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
413
+ slottedNodes.push(childNode);
414
+ if (typeof slotName !== "undefined") return slottedNodes;
415
+ }
416
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
417
+ }
418
+ return slottedNodes;
419
+ }
420
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
421
+ const childNodes = [];
422
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
423
+ let node = slot;
424
+ while (node = node.nextSibling) {
425
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
426
+ }
427
+ return childNodes;
428
+ };
429
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
430
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
431
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
432
+ return true;
433
+ }
434
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
435
+ return true;
436
+ }
437
+ return false;
438
+ }
439
+ if (nodeToRelocate["s-sn"] === slotName) {
440
+ return true;
441
+ }
442
+ return slotName === "";
443
+ };
444
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
445
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
446
+ return;
447
+ }
448
+ const slottedNodeLocation = document.createTextNode("");
449
+ slottedNodeLocation["s-nr"] = newChild;
450
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
451
+ const parent = slotNode["s-cr"].parentNode;
452
+ const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
453
+ if (typeof position !== "undefined") {
454
+ slottedNodeLocation["s-oo"] = position;
455
+ const childNodes = internalCall(parent, "childNodes");
456
+ const slotRelocateNodes = [slottedNodeLocation];
457
+ childNodes.forEach((n) => {
458
+ if (n["s-nr"]) slotRelocateNodes.push(n);
459
+ });
460
+ slotRelocateNodes.sort((a, b) => {
461
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
462
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
463
+ return 0;
464
+ });
465
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
466
+ } else {
467
+ appendMethod.call(parent, slottedNodeLocation);
468
+ }
469
+ newChild["s-ol"] = slottedNodeLocation;
470
+ newChild["s-sh"] = slotNode["s-hn"];
471
+ };
472
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
473
+ function patchSlotNode(node) {
474
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
475
+ const assignedFactory = (elementsOnly) => (function(opts) {
476
+ const toReturn = [];
477
+ const slotName = this["s-sn"];
478
+ if (opts == null ? void 0 : opts.flatten) {
479
+ console.error(`
480
+ Flattening is not supported for Stencil non-shadow slots.
481
+ You can use \`.childNodes\` to nested slot fallback content.
482
+ If you have a particular use case, please open an issue on the Stencil repo.
483
+ `);
484
+ }
485
+ const parent = this["s-cr"].parentElement;
486
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
487
+ slottedNodes.forEach((n) => {
488
+ if (slotName === getSlotName(n)) {
489
+ toReturn.push(n);
490
+ }
491
+ });
492
+ if (elementsOnly) {
493
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
494
+ }
495
+ return toReturn;
496
+ }).bind(node);
497
+ node.assignedElements = assignedFactory(true);
498
+ node.assignedNodes = assignedFactory(false);
499
+ }
500
+ function dispatchSlotChangeEvent(elm) {
501
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
502
+ }
503
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
504
+ var _a;
505
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
506
+ if (!parentHost) return { slotNode: null, slotName: "" };
507
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
508
+ const childNodes = internalCall(parentHost, "childNodes");
509
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
510
+ return { slotNode, slotName };
511
+ }
512
+
513
+ // src/runtime/dom-extras.ts
514
+ var patchPseudoShadowDom = (hostElementPrototype) => {
515
+ patchCloneNode(hostElementPrototype);
516
+ patchSlotAppendChild(hostElementPrototype);
517
+ patchSlotAppend(hostElementPrototype);
518
+ patchSlotPrepend(hostElementPrototype);
519
+ patchSlotInsertAdjacentElement(hostElementPrototype);
520
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
521
+ patchSlotInsertAdjacentText(hostElementPrototype);
522
+ patchInsertBefore(hostElementPrototype);
523
+ patchTextContent(hostElementPrototype);
524
+ patchChildSlotNodes(hostElementPrototype);
525
+ patchSlotRemoveChild(hostElementPrototype);
526
+ };
527
+ var patchCloneNode = (HostElementPrototype) => {
528
+ const orgCloneNode = HostElementPrototype.cloneNode;
529
+ HostElementPrototype.cloneNode = function(deep) {
530
+ const srcNode = this;
531
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
532
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
533
+ if (!isShadowDom && deep) {
534
+ let i2 = 0;
535
+ let slotted, nonStencilNode;
536
+ const stencilPrivates = [
537
+ "s-id",
538
+ "s-cr",
539
+ "s-lr",
540
+ "s-rc",
541
+ "s-sc",
542
+ "s-p",
543
+ "s-cn",
544
+ "s-sr",
545
+ "s-sn",
546
+ "s-hn",
547
+ "s-ol",
548
+ "s-nr",
549
+ "s-si",
550
+ "s-rf",
551
+ "s-scs"
552
+ ];
553
+ const childNodes = this.__childNodes || this.childNodes;
554
+ for (; i2 < childNodes.length; i2++) {
555
+ slotted = childNodes[i2]["s-nr"];
556
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
557
+ if (slotted) {
558
+ if (clonedNode.__appendChild) {
559
+ clonedNode.__appendChild(slotted.cloneNode(true));
560
+ } else {
561
+ clonedNode.appendChild(slotted.cloneNode(true));
562
+ }
563
+ }
564
+ if (nonStencilNode) {
565
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
566
+ }
567
+ }
568
+ }
569
+ return clonedNode;
570
+ };
571
+ };
572
+ var patchSlotAppendChild = (HostElementPrototype) => {
573
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
574
+ HostElementPrototype.appendChild = function(newChild) {
575
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
576
+ if (slotNode) {
577
+ addSlotRelocateNode(newChild, slotNode);
578
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
579
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
580
+ const parent = internalCall(appendAfter, "parentNode");
581
+ const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
582
+ dispatchSlotChangeEvent(slotNode);
583
+ updateFallbackSlotVisibility(this);
584
+ return insertedNode;
585
+ }
586
+ return this.__appendChild(newChild);
587
+ };
588
+ };
589
+ var patchSlotRemoveChild = (ElementPrototype) => {
590
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
591
+ ElementPrototype.removeChild = function(toRemove) {
592
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
593
+ const childNodes = this.__childNodes || this.childNodes;
594
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
595
+ if (slotNode && toRemove.isConnected) {
596
+ toRemove.remove();
597
+ updateFallbackSlotVisibility(this);
598
+ return;
599
+ }
600
+ }
601
+ return this.__removeChild(toRemove);
602
+ };
603
+ };
604
+ var patchSlotPrepend = (HostElementPrototype) => {
605
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
606
+ HostElementPrototype.prepend = function(...newChildren) {
607
+ newChildren.forEach((newChild) => {
608
+ if (typeof newChild === "string") {
609
+ newChild = this.ownerDocument.createTextNode(newChild);
610
+ }
611
+ const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
612
+ const childNodes = internalCall(this, "childNodes");
613
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
614
+ if (slotNode) {
615
+ addSlotRelocateNode(newChild, slotNode, true);
616
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
617
+ const appendAfter = slotChildNodes[0];
618
+ const parent = internalCall(appendAfter, "parentNode");
619
+ const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
620
+ dispatchSlotChangeEvent(slotNode);
621
+ return toReturn;
622
+ }
623
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
624
+ newChild.hidden = true;
625
+ }
626
+ return HostElementPrototype.__prepend(newChild);
627
+ });
628
+ };
629
+ };
630
+ var patchSlotAppend = (HostElementPrototype) => {
631
+ HostElementPrototype.__append = HostElementPrototype.append;
632
+ HostElementPrototype.append = function(...newChildren) {
633
+ newChildren.forEach((newChild) => {
634
+ if (typeof newChild === "string") {
635
+ newChild = this.ownerDocument.createTextNode(newChild);
636
+ }
637
+ this.appendChild(newChild);
638
+ });
639
+ };
640
+ };
641
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
642
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
643
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
644
+ if (position !== "afterbegin" && position !== "beforeend") {
645
+ return originalInsertAdjacentHtml.call(this, position, text);
646
+ }
647
+ const container = this.ownerDocument.createElement("_");
648
+ let node;
649
+ container.innerHTML = text;
650
+ if (position === "afterbegin") {
651
+ while (node = container.firstChild) {
652
+ this.prepend(node);
653
+ }
654
+ } else if (position === "beforeend") {
655
+ while (node = container.firstChild) {
656
+ this.append(node);
657
+ }
658
+ }
659
+ };
660
+ };
661
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
662
+ HostElementPrototype.insertAdjacentText = function(position, text) {
663
+ this.insertAdjacentHTML(position, text);
664
+ };
665
+ };
666
+ var patchInsertBefore = (HostElementPrototype) => {
667
+ const eleProto = HostElementPrototype;
668
+ if (eleProto.__insertBefore) return;
669
+ eleProto.__insertBefore = HostElementPrototype.insertBefore;
670
+ HostElementPrototype.insertBefore = function(newChild, currentChild) {
671
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
672
+ const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
673
+ if (slotNode) {
674
+ let found = false;
675
+ slottedNodes.forEach((childNode) => {
676
+ if (childNode === currentChild || currentChild === null) {
677
+ found = true;
678
+ if (currentChild === null || slotName !== currentChild["s-sn"]) {
679
+ this.appendChild(newChild);
680
+ return;
681
+ }
682
+ if (slotName === currentChild["s-sn"]) {
683
+ addSlotRelocateNode(newChild, slotNode);
684
+ const parent = internalCall(currentChild, "parentNode");
685
+ internalCall(parent, "insertBefore")(newChild, currentChild);
686
+ dispatchSlotChangeEvent(slotNode);
687
+ }
688
+ return;
689
+ }
690
+ });
691
+ if (found) return newChild;
692
+ }
693
+ const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
694
+ if (parentNode && !this.isSameNode(parentNode)) {
695
+ return this.appendChild(newChild);
696
+ }
697
+ return this.__insertBefore(newChild, currentChild);
698
+ };
699
+ };
700
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
701
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
702
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
703
+ if (position !== "afterbegin" && position !== "beforeend") {
704
+ return originalInsertAdjacentElement.call(this, position, element);
705
+ }
706
+ if (position === "afterbegin") {
707
+ this.prepend(element);
708
+ return element;
709
+ } else if (position === "beforeend") {
710
+ this.append(element);
711
+ return element;
712
+ }
713
+ return element;
714
+ };
715
+ };
716
+ var patchTextContent = (hostElementPrototype) => {
717
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
718
+ Object.defineProperty(hostElementPrototype, "textContent", {
719
+ get: function() {
720
+ let text = "";
721
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
722
+ childNodes.forEach((node) => text += node.textContent || "");
723
+ return text;
724
+ },
725
+ set: function(value) {
726
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
727
+ childNodes.forEach((node) => {
728
+ if (node["s-ol"]) node["s-ol"].remove();
729
+ node.remove();
730
+ });
731
+ this.insertAdjacentHTML("beforeend", value);
732
+ }
733
+ });
734
+ };
735
+ var patchChildSlotNodes = (elm) => {
736
+ class FakeNodeList extends Array {
737
+ item(n) {
738
+ return this[n];
739
+ }
740
+ }
741
+ patchHostOriginalAccessor("children", elm);
742
+ Object.defineProperty(elm, "children", {
743
+ get() {
744
+ return this.childNodes.filter((n) => n.nodeType === 1);
745
+ }
746
+ });
747
+ Object.defineProperty(elm, "childElementCount", {
748
+ get() {
749
+ return this.children.length;
750
+ }
751
+ });
752
+ patchHostOriginalAccessor("firstChild", elm);
753
+ Object.defineProperty(elm, "firstChild", {
754
+ get() {
755
+ return this.childNodes[0];
756
+ }
757
+ });
758
+ patchHostOriginalAccessor("lastChild", elm);
759
+ Object.defineProperty(elm, "lastChild", {
760
+ get() {
761
+ return this.childNodes[this.childNodes.length - 1];
762
+ }
763
+ });
764
+ patchHostOriginalAccessor("childNodes", elm);
765
+ Object.defineProperty(elm, "childNodes", {
766
+ get() {
767
+ const result = new FakeNodeList();
768
+ result.push(...getSlottedChildNodes(this.__childNodes));
769
+ return result;
770
+ }
771
+ });
772
+ };
773
+ var patchSlottedNode = (node) => {
774
+ if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
775
+ patchNextSibling(node);
776
+ patchPreviousSibling(node);
777
+ patchParentNode(node);
778
+ if (node.nodeType === Node.ELEMENT_NODE) {
779
+ patchNextElementSibling(node);
780
+ patchPreviousElementSibling(node);
781
+ }
782
+ };
783
+ var patchNextSibling = (node) => {
784
+ if (!node || node.__nextSibling) return;
785
+ patchHostOriginalAccessor("nextSibling", node);
786
+ Object.defineProperty(node, "nextSibling", {
787
+ get: function() {
788
+ var _a;
789
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
790
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
791
+ if (parentNodes && index > -1) {
792
+ return parentNodes[index + 1];
793
+ }
794
+ return this.__nextSibling;
795
+ }
796
+ });
797
+ };
798
+ var patchNextElementSibling = (element) => {
799
+ if (!element || element.__nextElementSibling) return;
800
+ patchHostOriginalAccessor("nextElementSibling", element);
801
+ Object.defineProperty(element, "nextElementSibling", {
802
+ get: function() {
803
+ var _a;
804
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
805
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
806
+ if (parentEles && index > -1) {
807
+ return parentEles[index + 1];
808
+ }
809
+ return this.__nextElementSibling;
810
+ }
811
+ });
812
+ };
813
+ var patchPreviousSibling = (node) => {
814
+ if (!node || node.__previousSibling) return;
815
+ patchHostOriginalAccessor("previousSibling", node);
816
+ Object.defineProperty(node, "previousSibling", {
817
+ get: function() {
818
+ var _a;
819
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
820
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
821
+ if (parentNodes && index > -1) {
822
+ return parentNodes[index - 1];
823
+ }
824
+ return this.__previousSibling;
825
+ }
826
+ });
827
+ };
828
+ var patchPreviousElementSibling = (element) => {
829
+ if (!element || element.__previousElementSibling) return;
830
+ patchHostOriginalAccessor("previousElementSibling", element);
831
+ Object.defineProperty(element, "previousElementSibling", {
832
+ get: function() {
833
+ var _a;
834
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
835
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
836
+ if (parentNodes && index > -1) {
837
+ return parentNodes[index - 1];
838
+ }
839
+ return this.__previousElementSibling;
840
+ }
841
+ });
842
+ };
843
+ var patchParentNode = (node) => {
844
+ if (!node || node.__parentNode) return;
845
+ patchHostOriginalAccessor("parentNode", node);
846
+ Object.defineProperty(node, "parentNode", {
847
+ get: function() {
848
+ var _a;
849
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
850
+ },
851
+ set: function(value) {
852
+ this.__parentNode = value;
853
+ }
854
+ });
855
+ };
856
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
857
+ var validNodesPatches = [
858
+ "childNodes",
859
+ "firstChild",
860
+ "lastChild",
861
+ "nextSibling",
862
+ "previousSibling",
863
+ "textContent",
864
+ "parentNode"
865
+ ];
866
+ function patchHostOriginalAccessor(accessorName, node) {
867
+ let accessor;
868
+ if (validElementPatches.includes(accessorName)) {
869
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
870
+ } else if (validNodesPatches.includes(accessorName)) {
871
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
872
+ }
873
+ if (!accessor) {
874
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
875
+ }
876
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
877
+ }
878
+ function internalCall(node, method) {
879
+ if ("__" + method in node) {
880
+ const toReturn = node["__" + method];
881
+ if (typeof toReturn !== "function") return toReturn;
882
+ return toReturn.bind(node);
883
+ } else {
884
+ if (typeof node[method] !== "function") return node[method];
885
+ return node[method].bind(node);
886
+ }
887
+ }
256
888
  var createTime = (fnName, tagName = "") => {
257
889
  {
258
890
  return () => {
@@ -381,54 +1013,166 @@ var convertToPrivate = (node) => {
381
1013
 
382
1014
  // src/runtime/client-hydrate.ts
383
1015
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1016
+ var _a;
384
1017
  const endHydrate = createTime("hydrateClient", tagName);
385
1018
  const shadowRoot = hostElm.shadowRoot;
386
1019
  const childRenderNodes = [];
387
1020
  const slotNodes = [];
1021
+ const slottedNodes = [];
388
1022
  const shadowRootNodes = shadowRoot ? [] : null;
389
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
390
- if (!plt.$orgLocNodes$) {
391
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1023
+ const vnode = newVNode(tagName, null);
1024
+ vnode.$elm$ = hostElm;
1025
+ const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1026
+ members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1027
+ var _a2;
1028
+ if (!(memberFlags & 31 /* Prop */)) {
1029
+ return;
1030
+ }
1031
+ const attributeName = metaAttributeName || memberName;
1032
+ const attrVal = hostElm.getAttribute(attributeName);
1033
+ if (attrVal !== null) {
1034
+ const attrPropVal = parsePropertyValue(attrVal, memberFlags);
1035
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1036
+ }
1037
+ });
1038
+ let scopeId2;
1039
+ {
1040
+ const cmpMeta = hostRef.$cmpMeta$;
1041
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1042
+ scopeId2 = hostElm["s-sc"];
1043
+ hostElm.classList.add(scopeId2 + "-h");
1044
+ } else if (hostElm["s-sc"]) {
1045
+ delete hostElm["s-sc"];
1046
+ }
1047
+ }
1048
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
1049
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
392
1050
  }
393
1051
  hostElm[HYDRATE_ID] = hostId;
394
1052
  hostElm.removeAttribute(HYDRATE_ID);
395
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
396
- childRenderNodes.map((c) => {
397
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
1053
+ hostRef.$vnode$ = clientHydrate(
1054
+ vnode,
1055
+ childRenderNodes,
1056
+ slotNodes,
1057
+ shadowRootNodes,
1058
+ hostElm,
1059
+ hostElm,
1060
+ hostId,
1061
+ slottedNodes
1062
+ );
1063
+ let crIndex = 0;
1064
+ const crLength = childRenderNodes.length;
1065
+ let childRenderNode;
1066
+ for (crIndex; crIndex < crLength; crIndex++) {
1067
+ childRenderNode = childRenderNodes[crIndex];
1068
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
398
1069
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
399
- const node = c.$elm$;
400
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
401
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
402
- }
1070
+ const node = childRenderNode.$elm$;
403
1071
  if (!shadowRoot) {
404
- node["s-hn"] = tagName;
405
- if (orgLocationNode) {
406
- node["s-ol"] = orgLocationNode;
407
- node["s-ol"]["s-nr"] = node;
1072
+ node["s-hn"] = tagName.toUpperCase();
1073
+ if (childRenderNode.$tag$ === "slot") {
1074
+ node["s-cr"] = hostElm["s-cr"];
1075
+ }
1076
+ }
1077
+ if (childRenderNode.$tag$ === "slot") {
1078
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
1079
+ if (childRenderNode.$children$) {
1080
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1081
+ if (!childRenderNode.$elm$.childNodes.length) {
1082
+ childRenderNode.$children$.forEach((c) => {
1083
+ childRenderNode.$elm$.appendChild(c.$elm$);
1084
+ });
1085
+ }
1086
+ } else {
1087
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1088
+ }
1089
+ }
1090
+ if (orgLocationNode && orgLocationNode.isConnected) {
1091
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1092
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1093
+ }
1094
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1095
+ if (!shadowRoot) {
1096
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
408
1097
  }
409
1098
  }
410
1099
  plt.$orgLocNodes$.delete(orgLocationId);
411
- });
412
- if (shadowRoot) {
413
- shadowRootNodes.map((shadowRootNode) => {
414
- if (shadowRootNode) {
415
- shadowRoot.appendChild(shadowRootNode);
1100
+ }
1101
+ const hosts = [];
1102
+ const snLen = slottedNodes.length;
1103
+ let snIndex = 0;
1104
+ let slotGroup;
1105
+ let snGroupIdx;
1106
+ let snGroupLen;
1107
+ let slottedItem;
1108
+ for (snIndex; snIndex < snLen; snIndex++) {
1109
+ slotGroup = slottedNodes[snIndex];
1110
+ if (!slotGroup || !slotGroup.length) continue;
1111
+ snGroupLen = slotGroup.length;
1112
+ snGroupIdx = 0;
1113
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1114
+ slottedItem = slotGroup[snGroupIdx];
1115
+ if (!hosts[slottedItem.hostId]) {
1116
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1117
+ }
1118
+ if (!hosts[slottedItem.hostId]) continue;
1119
+ const hostEle = hosts[slottedItem.hostId];
1120
+ if (!hostEle.shadowRoot || !shadowRoot) {
1121
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1122
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1123
+ slottedItem.slot["s-cr"] = hostEle;
1124
+ } else {
1125
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1126
+ }
1127
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1128
+ {
1129
+ patchSlottedNode(slottedItem.node);
1130
+ }
416
1131
  }
1132
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1133
+ hostEle.appendChild(slottedItem.node);
1134
+ }
1135
+ }
1136
+ }
1137
+ if (scopeId2 && slotNodes.length) {
1138
+ slotNodes.forEach((slot) => {
1139
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
417
1140
  });
418
1141
  }
1142
+ if (shadowRoot && !shadowRoot.childNodes.length) {
1143
+ let rnIdex = 0;
1144
+ const rnLen = shadowRootNodes.length;
1145
+ if (rnLen) {
1146
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1147
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1148
+ }
1149
+ Array.from(hostElm.childNodes).forEach((node) => {
1150
+ if (typeof node["s-sn"] !== "string") {
1151
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1152
+ node.removeAttribute("hidden");
1153
+ } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1154
+ node.parentNode.removeChild(node);
1155
+ }
1156
+ }
1157
+ });
1158
+ }
1159
+ }
1160
+ plt.$orgLocNodes$.delete(hostElm["s-id"]);
1161
+ hostRef.$hostElement$ = hostElm;
419
1162
  endHydrate();
420
1163
  };
421
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
1164
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
422
1165
  let childNodeType;
423
1166
  let childIdSplt;
424
1167
  let childVNode;
425
1168
  let i2;
1169
+ const scopeId2 = hostElm["s-sc"];
426
1170
  if (node.nodeType === 1 /* ElementNode */) {
427
1171
  childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
428
1172
  if (childNodeType) {
429
1173
  childIdSplt = childNodeType.split(".");
430
1174
  if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
431
- childVNode = {
1175
+ childVNode = createSimpleVNode({
432
1176
  $flags$: 0,
433
1177
  $hostId$: childIdSplt[0],
434
1178
  $nodeId$: childIdSplt[1],
@@ -436,18 +1180,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
436
1180
  $index$: childIdSplt[3],
437
1181
  $tag$: node.tagName.toLowerCase(),
438
1182
  $elm$: node,
439
- $attrs$: null,
440
- $children$: null,
441
- $key$: null,
442
- $name$: null,
443
- $text$: null
444
- };
1183
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1184
+ // won't try to reconcile them. Classes set on the node will be blown away.
1185
+ $attrs$: { class: node.className || "" }
1186
+ });
445
1187
  childRenderNodes.push(childVNode);
446
1188
  node.removeAttribute(HYDRATE_CHILD_ID);
447
1189
  if (!parentVNode.$children$) {
448
1190
  parentVNode.$children$ = [];
449
1191
  }
450
- parentVNode.$children$[childVNode.$index$] = childVNode;
1192
+ if (scopeId2) {
1193
+ node["s-si"] = scopeId2;
1194
+ childVNode.$attrs$.class += " " + scopeId2;
1195
+ }
1196
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1197
+ if (typeof slotName === "string") {
1198
+ if (childVNode.$tag$ === "slot-fb") {
1199
+ addSlot(
1200
+ slotName,
1201
+ childIdSplt[2],
1202
+ childVNode,
1203
+ node,
1204
+ parentVNode,
1205
+ childRenderNodes,
1206
+ slotNodes,
1207
+ shadowRootNodes,
1208
+ slottedNodes
1209
+ );
1210
+ if (scopeId2) {
1211
+ node.classList.add(scopeId2);
1212
+ }
1213
+ }
1214
+ childVNode.$elm$["s-sn"] = slotName;
1215
+ childVNode.$elm$.removeAttribute("s-sn");
1216
+ }
1217
+ if (childVNode.$index$ !== void 0) {
1218
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1219
+ }
451
1220
  parentVNode = childVNode;
452
1221
  if (shadowRootNodes && childVNode.$depth$ === "0") {
453
1222
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -463,31 +1232,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
463
1232
  shadowRootNodes,
464
1233
  hostElm,
465
1234
  node.shadowRoot.childNodes[i2],
466
- hostId
1235
+ hostId,
1236
+ slottedNodes
467
1237
  );
468
1238
  }
469
1239
  }
470
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
1240
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1241
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
471
1242
  clientHydrate(
472
1243
  parentVNode,
473
1244
  childRenderNodes,
474
1245
  slotNodes,
475
1246
  shadowRootNodes,
476
1247
  hostElm,
477
- node.childNodes[i2],
478
- hostId
1248
+ nonShadowNodes[i2],
1249
+ hostId,
1250
+ slottedNodes
479
1251
  );
480
1252
  }
481
1253
  } else if (node.nodeType === 8 /* CommentNode */) {
482
1254
  childIdSplt = node.nodeValue.split(".");
483
1255
  if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
484
1256
  childNodeType = childIdSplt[0];
485
- childVNode = {
486
- $flags$: 0,
1257
+ childVNode = createSimpleVNode({
487
1258
  $hostId$: childIdSplt[1],
488
1259
  $nodeId$: childIdSplt[2],
489
1260
  $depth$: childIdSplt[3],
490
- $index$: childIdSplt[4],
1261
+ $index$: childIdSplt[4] || "0",
491
1262
  $elm$: node,
492
1263
  $attrs$: null,
493
1264
  $children$: null,
@@ -495,46 +1266,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
495
1266
  $name$: null,
496
1267
  $tag$: null,
497
1268
  $text$: null
498
- };
1269
+ });
499
1270
  if (childNodeType === TEXT_NODE_ID) {
500
- childVNode.$elm$ = node.nextSibling;
1271
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
501
1272
  if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
502
1273
  childVNode.$text$ = childVNode.$elm$.textContent;
503
1274
  childRenderNodes.push(childVNode);
504
1275
  node.remove();
505
- if (!parentVNode.$children$) {
506
- parentVNode.$children$ = [];
1276
+ if (hostId === childVNode.$hostId$) {
1277
+ if (!parentVNode.$children$) {
1278
+ parentVNode.$children$ = [];
1279
+ }
1280
+ parentVNode.$children$[childVNode.$index$] = childVNode;
507
1281
  }
508
- parentVNode.$children$[childVNode.$index$] = childVNode;
509
1282
  if (shadowRootNodes && childVNode.$depth$ === "0") {
510
1283
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
511
1284
  }
512
1285
  }
1286
+ } else if (childNodeType === COMMENT_NODE_ID) {
1287
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
1288
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1289
+ childRenderNodes.push(childVNode);
1290
+ node.remove();
1291
+ }
513
1292
  } else if (childVNode.$hostId$ === hostId) {
514
1293
  if (childNodeType === SLOT_NODE_ID) {
515
- childVNode.$tag$ = "slot";
516
- if (childIdSplt[5]) {
517
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
518
- } else {
519
- node["s-sn"] = "";
520
- }
521
- node["s-sr"] = true;
522
- if (shadowRootNodes) {
523
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
524
- if (childVNode.$name$) {
525
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
526
- }
527
- node.parentNode.insertBefore(childVNode.$elm$, node);
528
- node.remove();
529
- if (childVNode.$depth$ === "0") {
530
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
531
- }
532
- }
533
- slotNodes.push(childVNode);
534
- if (!parentVNode.$children$) {
535
- parentVNode.$children$ = [];
536
- }
537
- parentVNode.$children$[childVNode.$index$] = childVNode;
1294
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1295
+ addSlot(
1296
+ slotName,
1297
+ childIdSplt[2],
1298
+ childVNode,
1299
+ node,
1300
+ parentVNode,
1301
+ childRenderNodes,
1302
+ slotNodes,
1303
+ shadowRootNodes,
1304
+ slottedNodes
1305
+ );
538
1306
  } else if (childNodeType === CONTENT_REF_ID) {
539
1307
  if (shadowRootNodes) {
540
1308
  node.remove();
@@ -550,18 +1318,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
550
1318
  vnode.$elm$ = node;
551
1319
  vnode.$index$ = "0";
552
1320
  parentVNode.$children$ = [vnode];
1321
+ } else {
1322
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1323
+ node.remove();
1324
+ }
553
1325
  }
1326
+ return parentVNode;
554
1327
  };
555
1328
  var initializeDocumentHydrate = (node, orgLocNodes) => {
556
1329
  if (node.nodeType === 1 /* ElementNode */) {
1330
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1331
+ if (componentId) {
1332
+ orgLocNodes.set(componentId, node);
1333
+ }
557
1334
  let i2 = 0;
558
1335
  if (node.shadowRoot) {
559
1336
  for (; i2 < node.shadowRoot.childNodes.length; i2++) {
560
1337
  initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
561
1338
  }
562
1339
  }
563
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
564
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
1340
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1341
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1342
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
565
1343
  }
566
1344
  } else if (node.nodeType === 8 /* CommentNode */) {
567
1345
  const childIdSplt = node.nodeValue.split(".");
@@ -572,18 +1350,98 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
572
1350
  }
573
1351
  }
574
1352
  };
1353
+ var createSimpleVNode = (vnode) => {
1354
+ const defaultVNode = {
1355
+ $flags$: 0,
1356
+ $hostId$: null,
1357
+ $nodeId$: null,
1358
+ $depth$: null,
1359
+ $index$: "0",
1360
+ $elm$: null,
1361
+ $attrs$: null,
1362
+ $children$: null,
1363
+ $key$: null,
1364
+ $name$: null,
1365
+ $tag$: null,
1366
+ $text$: null
1367
+ };
1368
+ return { ...defaultVNode, ...vnode };
1369
+ };
1370
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1371
+ node["s-sr"] = true;
1372
+ childVNode.$name$ = slotName || null;
1373
+ childVNode.$tag$ = "slot";
1374
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1375
+ if (shadowRootNodes && win.document) {
1376
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1377
+ if (childVNode.$name$) {
1378
+ childVNode.$elm$.setAttribute("name", slotName);
1379
+ }
1380
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1381
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1382
+ } else {
1383
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1384
+ }
1385
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1386
+ node.remove();
1387
+ if (childVNode.$depth$ === "0") {
1388
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1389
+ }
1390
+ } else {
1391
+ const slot = childVNode.$elm$;
1392
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1393
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1394
+ patchSlotNode(node);
1395
+ if (shouldMove) {
1396
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1397
+ }
1398
+ childRenderNodes.push(childVNode);
1399
+ }
1400
+ slotNodes.push(childVNode);
1401
+ if (!parentVNode.$children$) {
1402
+ parentVNode.$children$ = [];
1403
+ }
1404
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1405
+ }
1406
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1407
+ let slottedNode = slotNode.nextSibling;
1408
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1409
+ 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 */))) {
1410
+ slottedNode["s-sn"] = slotName;
1411
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1412
+ slottedNode = slottedNode.nextSibling;
1413
+ }
1414
+ };
1415
+ var findCorrespondingNode = (node, type) => {
1416
+ let sibling = node;
1417
+ do {
1418
+ sibling = sibling.nextSibling;
1419
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1420
+ return sibling;
1421
+ };
575
1422
 
576
1423
  // src/runtime/mode.ts
577
1424
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
578
1425
  var setMode = (handler) => modeResolutionChain.push(handler);
579
1426
  var getMode = (ref) => getHostRef(ref).$modeName$;
580
1427
  var parsePropertyValue = (propValue, propType) => {
1428
+ if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
1429
+ try {
1430
+ propValue = JSON.parse(propValue);
1431
+ return propValue;
1432
+ } catch (e) {
1433
+ }
1434
+ }
1435
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1436
+ propValue = deserializeProperty(propValue);
1437
+ return propValue;
1438
+ }
581
1439
  if (propValue != null && !isComplexType(propValue)) {
582
1440
  if (propType & 4 /* Boolean */) {
583
1441
  return propValue === "false" ? false : propValue === "" || !!propValue;
584
1442
  }
585
1443
  if (propType & 2 /* Number */) {
586
- return parseFloat(propValue);
1444
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
587
1445
  }
588
1446
  if (propType & 1 /* String */) {
589
1447
  return String(propValue);
@@ -632,7 +1490,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
632
1490
  var _a;
633
1491
  const scopeId2 = getScopeId(cmpMeta, mode);
634
1492
  const style = styles.get(scopeId2);
635
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1493
+ if (!win.document) {
1494
+ return scopeId2;
1495
+ }
1496
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
636
1497
  if (style) {
637
1498
  if (typeof style === "string") {
638
1499
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -645,23 +1506,39 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
645
1506
  if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
646
1507
  styleElm.innerHTML = style;
647
1508
  } else {
648
- styleElm = doc.createElement("style");
1509
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
649
1510
  styleElm.innerHTML = style;
650
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1511
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
651
1512
  if (nonce != null) {
652
1513
  styleElm.setAttribute("nonce", nonce);
653
1514
  }
654
- const injectStyle = (
655
- /**
656
- * we render a scoped component
657
- */
658
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
659
- * we are using shadow dom and render the style tag within the shadowRoot
660
- */
661
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
662
- );
663
- if (injectStyle) {
664
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1515
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1516
+ if (styleContainerNode.nodeName === "HEAD") {
1517
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1518
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1519
+ styleContainerNode.insertBefore(
1520
+ styleElm,
1521
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1522
+ );
1523
+ } else if ("host" in styleContainerNode) {
1524
+ if (supportsConstructableStylesheets) {
1525
+ const stylesheet = new CSSStyleSheet();
1526
+ stylesheet.replaceSync(style);
1527
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1528
+ } else {
1529
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1530
+ if (existingStyleContainer) {
1531
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1532
+ } else {
1533
+ styleContainerNode.prepend(styleElm);
1534
+ }
1535
+ }
1536
+ } else {
1537
+ styleContainerNode.append(styleElm);
1538
+ }
1539
+ }
1540
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1541
+ styleContainerNode.insertBefore(styleElm, null);
665
1542
  }
666
1543
  }
667
1544
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
@@ -687,131 +1564,177 @@ var attachStyles = (hostRef) => {
687
1564
  cmpMeta,
688
1565
  hostRef.$modeName$
689
1566
  );
690
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1567
+ if (flags & 10 /* needsScopedEncapsulation */) {
691
1568
  elm["s-sc"] = scopeId2;
692
1569
  elm.classList.add(scopeId2 + "-h");
693
- if (flags & 2 /* scopedCssEncapsulation */) {
694
- elm.classList.add(scopeId2 + "-s");
695
- }
696
1570
  }
697
1571
  endAttachStyles();
698
1572
  };
699
1573
  var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
700
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
701
- if (oldValue !== newValue) {
702
- let isProp = isMemberInElement(elm, memberName);
703
- let ln = memberName.toLowerCase();
704
- if (memberName === "class") {
705
- const classList = elm.classList;
706
- const oldClasses = parseClassList(oldValue);
707
- const newClasses = parseClassList(newValue);
1574
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1575
+ var hydrateScopedToShadow = () => {
1576
+ if (!win.document) {
1577
+ return;
1578
+ }
1579
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1580
+ let i2 = 0;
1581
+ for (; i2 < styles2.length; i2++) {
1582
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1583
+ }
1584
+ };
1585
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1586
+ if (oldValue === newValue) {
1587
+ return;
1588
+ }
1589
+ let isProp = isMemberInElement(elm, memberName);
1590
+ let ln = memberName.toLowerCase();
1591
+ if (memberName === "class") {
1592
+ const classList = elm.classList;
1593
+ const oldClasses = parseClassList(oldValue);
1594
+ let newClasses = parseClassList(newValue);
1595
+ if (elm["s-si"] && initialRender) {
1596
+ newClasses.push(elm["s-si"]);
1597
+ oldClasses.forEach((c) => {
1598
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
1599
+ });
1600
+ newClasses = [...new Set(newClasses)];
1601
+ classList.add(...newClasses);
1602
+ } else {
708
1603
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
709
1604
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
710
- } else if (memberName === "style") {
711
- {
712
- for (const prop in oldValue) {
713
- if (!newValue || newValue[prop] == null) {
714
- if (prop.includes("-")) {
715
- elm.style.removeProperty(prop);
716
- } else {
717
- elm.style[prop] = "";
718
- }
719
- }
720
- }
721
- }
722
- for (const prop in newValue) {
723
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
1605
+ }
1606
+ } else if (memberName === "style") {
1607
+ {
1608
+ for (const prop in oldValue) {
1609
+ if (!newValue || newValue[prop] == null) {
724
1610
  if (prop.includes("-")) {
725
- elm.style.setProperty(prop, newValue[prop]);
1611
+ elm.style.removeProperty(prop);
726
1612
  } else {
727
- elm.style[prop] = newValue[prop];
1613
+ elm.style[prop] = "";
728
1614
  }
729
1615
  }
730
1616
  }
731
- } else if (memberName === "key") ; else if (memberName === "ref") {
732
- if (newValue) {
733
- newValue(elm);
734
- }
735
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
736
- if (memberName[2] === "-") {
737
- memberName = memberName.slice(3);
738
- } else if (isMemberInElement(win, ln)) {
739
- memberName = ln.slice(2);
740
- } else {
741
- memberName = ln[2] + memberName.slice(3);
742
- }
743
- if (oldValue || newValue) {
744
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
745
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
746
- if (oldValue) {
747
- plt.rel(elm, memberName, oldValue, capture);
748
- }
749
- if (newValue) {
750
- plt.ael(elm, memberName, newValue, capture);
1617
+ }
1618
+ for (const prop in newValue) {
1619
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
1620
+ if (prop.includes("-")) {
1621
+ elm.style.setProperty(prop, newValue[prop]);
1622
+ } else {
1623
+ elm.style[prop] = newValue[prop];
751
1624
  }
752
1625
  }
1626
+ }
1627
+ } else if (memberName === "key") ; else if (memberName === "ref") {
1628
+ if (newValue) {
1629
+ newValue(elm);
1630
+ }
1631
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1632
+ if (memberName[2] === "-") {
1633
+ memberName = memberName.slice(3);
1634
+ } else if (isMemberInElement(win, ln)) {
1635
+ memberName = ln.slice(2);
753
1636
  } else {
754
- const isComplex = isComplexType(newValue);
755
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
756
- try {
757
- if (!elm.tagName.includes("-")) {
758
- const n = newValue == null ? "" : newValue;
759
- if (memberName === "list") {
760
- isProp = false;
761
- } else if (oldValue == null || elm[memberName] != n) {
1637
+ memberName = ln[2] + memberName.slice(3);
1638
+ }
1639
+ if (oldValue || newValue) {
1640
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1641
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1642
+ if (oldValue) {
1643
+ plt.rel(elm, memberName, oldValue, capture);
1644
+ }
1645
+ if (newValue) {
1646
+ plt.ael(elm, memberName, newValue, capture);
1647
+ }
1648
+ }
1649
+ } else {
1650
+ const isComplex = isComplexType(newValue);
1651
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
1652
+ try {
1653
+ if (!elm.tagName.includes("-")) {
1654
+ const n = newValue == null ? "" : newValue;
1655
+ if (memberName === "list") {
1656
+ isProp = false;
1657
+ } else if (oldValue == null || elm[memberName] != n) {
1658
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
762
1659
  elm[memberName] = n;
1660
+ } else {
1661
+ elm.setAttribute(memberName, n);
763
1662
  }
764
- } else {
765
- elm[memberName] = newValue;
766
1663
  }
767
- } catch (e) {
1664
+ } else if (elm[memberName] !== newValue) {
1665
+ elm[memberName] = newValue;
768
1666
  }
1667
+ } catch (e) {
769
1668
  }
770
- let xlink = false;
771
- {
772
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
773
- memberName = ln;
774
- xlink = true;
775
- }
1669
+ }
1670
+ let xlink = false;
1671
+ {
1672
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1673
+ memberName = ln;
1674
+ xlink = true;
776
1675
  }
777
- if (newValue == null || newValue === false) {
778
- if (newValue !== false || elm.getAttribute(memberName) === "") {
779
- if (xlink) {
780
- elm.removeAttributeNS(XLINK_NS, memberName);
781
- } else {
782
- elm.removeAttribute(memberName);
783
- }
784
- }
785
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
786
- newValue = newValue === true ? "" : newValue;
1676
+ }
1677
+ if (newValue == null || newValue === false) {
1678
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
787
1679
  if (xlink) {
788
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
1680
+ elm.removeAttributeNS(XLINK_NS, memberName);
789
1681
  } else {
790
- elm.setAttribute(memberName, newValue);
1682
+ elm.removeAttribute(memberName);
791
1683
  }
792
1684
  }
1685
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
1686
+ newValue = newValue === true ? "" : newValue;
1687
+ if (xlink) {
1688
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
1689
+ } else {
1690
+ elm.setAttribute(memberName, newValue);
1691
+ }
793
1692
  }
794
1693
  }
795
1694
  };
796
1695
  var parseClassListRegex = /\s/;
797
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
1696
+ var parseClassList = (value) => {
1697
+ if (typeof value === "object" && value && "baseVal" in value) {
1698
+ value = value.baseVal;
1699
+ }
1700
+ if (!value || typeof value !== "string") {
1701
+ return [];
1702
+ }
1703
+ return value.split(parseClassListRegex);
1704
+ };
798
1705
  var CAPTURE_EVENT_SUFFIX = "Capture";
799
1706
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
800
1707
 
801
1708
  // src/runtime/vdom/update-element.ts
802
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
1709
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
803
1710
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
804
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
805
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
1711
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
1712
+ const newVnodeAttrs = newVnode.$attrs$ || {};
806
1713
  {
807
1714
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
808
1715
  if (!(memberName in newVnodeAttrs)) {
809
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
1716
+ setAccessor(
1717
+ elm,
1718
+ memberName,
1719
+ oldVnodeAttrs[memberName],
1720
+ void 0,
1721
+ isSvgMode2,
1722
+ newVnode.$flags$,
1723
+ isInitialRender
1724
+ );
810
1725
  }
811
1726
  }
812
1727
  }
813
1728
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
814
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
1729
+ setAccessor(
1730
+ elm,
1731
+ memberName,
1732
+ oldVnodeAttrs[memberName],
1733
+ newVnodeAttrs[memberName],
1734
+ isSvgMode2,
1735
+ newVnode.$flags$,
1736
+ isInitialRender
1737
+ );
815
1738
  }
816
1739
  };
817
1740
  function sortedAttrNames(attrNames) {
@@ -832,7 +1755,7 @@ var useNativeShadowDom = false;
832
1755
  var checkSlotFallbackVisibility = false;
833
1756
  var checkSlotRelocate = false;
834
1757
  var isSvgMode = false;
835
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1758
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
836
1759
  var _a;
837
1760
  const newVNode2 = newParentVNode.$children$[childIndex];
838
1761
  let i2 = 0;
@@ -842,9 +1765,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
842
1765
  if (!useNativeShadowDom) {
843
1766
  checkSlotRelocate = true;
844
1767
  if (newVNode2.$tag$ === "slot") {
845
- if (scopeId) {
846
- parentElm.classList.add(scopeId + "-s");
847
- }
848
1768
  newVNode2.$flags$ |= newVNode2.$children$ ? (
849
1769
  // slot element has fallback content
850
1770
  // still create an element that "mocks" the slot element
@@ -858,14 +1778,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
858
1778
  }
859
1779
  }
860
1780
  if (newVNode2.$text$ !== null) {
861
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
1781
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
862
1782
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
863
- elm = newVNode2.$elm$ = doc.createTextNode("");
1783
+ elm = newVNode2.$elm$ = win.document.createTextNode("");
1784
+ {
1785
+ updateElement(null, newVNode2, isSvgMode);
1786
+ }
864
1787
  } else {
865
1788
  if (!isSvgMode) {
866
1789
  isSvgMode = newVNode2.$tag$ === "svg";
867
1790
  }
868
- elm = newVNode2.$elm$ = doc.createElementNS(
1791
+ if (!win.document) {
1792
+ throw new Error(
1793
+ "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."
1794
+ );
1795
+ }
1796
+ elm = newVNode2.$elm$ = win.document.createElementNS(
869
1797
  isSvgMode ? SVG_NS : HTML_NS,
870
1798
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
871
1799
  ) ;
@@ -875,17 +1803,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
875
1803
  {
876
1804
  updateElement(null, newVNode2, isSvgMode);
877
1805
  }
878
- const rootNode = elm.getRootNode();
879
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
880
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
1806
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
881
1807
  elm.classList.add(elm["s-si"] = scopeId);
882
1808
  }
883
- {
884
- updateElementScopeIds(elm, parentElm);
885
- }
886
1809
  if (newVNode2.$children$) {
887
1810
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
888
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
1811
+ childNode = createElm(oldParentVNode, newVNode2, i2);
889
1812
  if (childNode) {
890
1813
  elm.appendChild(childNode);
891
1814
  }
@@ -906,12 +1829,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
906
1829
  elm["s-cr"] = contentRef;
907
1830
  elm["s-sn"] = newVNode2.$name$ || "";
908
1831
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1832
+ patchSlotNode(elm);
909
1833
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
910
1834
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
911
1835
  {
912
1836
  relocateToHostRoot(oldParentVNode.$elm$);
913
1837
  }
914
1838
  }
1839
+ {
1840
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
1841
+ }
915
1842
  }
916
1843
  }
917
1844
  return elm;
@@ -920,8 +1847,12 @@ var relocateToHostRoot = (parentElm) => {
920
1847
  plt.$flags$ |= 1 /* isTmpDisconnected */;
921
1848
  const host = parentElm.closest(hostTagName.toLowerCase());
922
1849
  if (host != null) {
923
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
924
- const childNodeArray = Array.from(parentElm.childNodes);
1850
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
1851
+ (ref) => ref["s-cr"]
1852
+ );
1853
+ const childNodeArray = Array.from(
1854
+ parentElm.__childNodes || parentElm.childNodes
1855
+ );
925
1856
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
926
1857
  if (childNode["s-sh"] != null) {
927
1858
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -930,11 +1861,11 @@ var relocateToHostRoot = (parentElm) => {
930
1861
  }
931
1862
  }
932
1863
  }
933
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1864
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
934
1865
  };
935
1866
  var putBackInOriginalLocation = (parentElm, recursive) => {
936
1867
  plt.$flags$ |= 1 /* isTmpDisconnected */;
937
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
1868
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
938
1869
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
939
1870
  let node = parentElm;
940
1871
  while (node = node.nextSibling) {
@@ -946,7 +1877,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
946
1877
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
947
1878
  const childNode = oldSlotChildNodes[i2];
948
1879
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
949
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1880
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
950
1881
  childNode["s-ol"].remove();
951
1882
  childNode["s-ol"] = void 0;
952
1883
  childNode["s-sh"] = void 0;
@@ -956,7 +1887,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
956
1887
  putBackInOriginalLocation(childNode, recursive);
957
1888
  }
958
1889
  }
959
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1890
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
960
1891
  };
961
1892
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
962
1893
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
@@ -966,7 +1897,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
966
1897
  }
967
1898
  for (; startIdx <= endIdx; ++startIdx) {
968
1899
  if (vnodes[startIdx]) {
969
- childNode = createElm(null, parentVNode, startIdx, parentElm);
1900
+ childNode = createElm(null, parentVNode, startIdx);
970
1901
  if (childNode) {
971
1902
  vnodes[startIdx].$elm$ = childNode;
972
1903
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -1053,7 +1984,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1053
1984
  if (idxInOld >= 0) {
1054
1985
  elmToMove = oldCh[idxInOld];
1055
1986
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1056
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1987
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1057
1988
  } else {
1058
1989
  patch(elmToMove, newStartVnode, isInitialRender);
1059
1990
  oldCh[idxInOld] = void 0;
@@ -1061,12 +1992,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1061
1992
  }
1062
1993
  newStartVnode = newCh[++newStartIdx];
1063
1994
  } else {
1064
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1995
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1065
1996
  newStartVnode = newCh[++newStartIdx];
1066
1997
  }
1067
1998
  if (node) {
1068
1999
  {
1069
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
2000
+ insertBefore(
2001
+ referenceNode(oldStartVnode.$elm$).parentNode,
2002
+ node,
2003
+ referenceNode(oldStartVnode.$elm$)
2004
+ );
1070
2005
  }
1071
2006
  }
1072
2007
  }
@@ -1087,28 +2022,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1087
2022
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1088
2023
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1089
2024
  if (leftVNode.$tag$ === "slot") {
1090
- if (
1091
- // The component gets hydrated and no VDOM has been initialized.
1092
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1093
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1094
- // hydration comments to be removed
1095
- leftVNode.$elm$.nodeType !== 8
1096
- ) {
1097
- return false;
1098
- }
1099
2025
  return leftVNode.$name$ === rightVNode.$name$;
1100
2026
  }
1101
2027
  if (!isInitialRender) {
1102
2028
  return leftVNode.$key$ === rightVNode.$key$;
1103
2029
  }
2030
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
2031
+ leftVNode.$key$ = rightVNode.$key$;
2032
+ }
1104
2033
  return true;
1105
2034
  }
1106
2035
  return false;
1107
2036
  };
1108
- var referenceNode = (node) => {
1109
- return node && node["s-ol"] || node;
1110
- };
1111
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
2037
+ var referenceNode = (node) => node && node["s-ol"] || node;
1112
2038
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1113
2039
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1114
2040
  const oldChildren = oldVNode.$children$;
@@ -1126,9 +2052,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1126
2052
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1127
2053
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1128
2054
  }
1129
- } else {
1130
- updateElement(oldVNode, newVNode2, isSvgMode);
1131
2055
  }
2056
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1132
2057
  }
1133
2058
  if (oldChildren !== null && newChildren !== null) {
1134
2059
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1147,36 +2072,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1147
2072
  isSvgMode = false;
1148
2073
  }
1149
2074
  } else if ((defaultHolder = elm["s-cr"])) {
1150
- defaultHolder.parentNode.textContent = text;
1151
- } else if (oldVNode.$text$ !== text) {
1152
- elm.data = text;
1153
- }
1154
- };
1155
- var updateFallbackSlotVisibility = (elm) => {
1156
- const childNodes = elm.childNodes;
1157
- for (const childNode of childNodes) {
1158
- if (childNode.nodeType === 1 /* ElementNode */) {
1159
- if (childNode["s-sr"]) {
1160
- const slotName = childNode["s-sn"];
1161
- childNode.hidden = false;
1162
- for (const siblingNode of childNodes) {
1163
- if (siblingNode !== childNode) {
1164
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1165
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1166
- childNode.hidden = true;
1167
- break;
1168
- }
1169
- } else {
1170
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1171
- childNode.hidden = true;
1172
- break;
1173
- }
1174
- }
1175
- }
1176
- }
1177
- }
1178
- updateFallbackSlotVisibility(childNode);
1179
- }
2075
+ defaultHolder.parentNode.textContent = text;
2076
+ } else if (oldVNode.$text$ !== text) {
2077
+ elm.data = text;
1180
2078
  }
1181
2079
  };
1182
2080
  var relocateNodes = [];
@@ -1184,9 +2082,10 @@ var markSlotContentForRelocation = (elm) => {
1184
2082
  let node;
1185
2083
  let hostContentNodes;
1186
2084
  let j;
1187
- for (const childNode of elm.childNodes) {
2085
+ const children = elm.__childNodes || elm.childNodes;
2086
+ for (const childNode of children) {
1188
2087
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1189
- hostContentNodes = node.parentNode.childNodes;
2088
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1190
2089
  const slotName = childNode["s-sn"];
1191
2090
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1192
2091
  node = hostContentNodes[j];
@@ -1228,21 +2127,6 @@ var markSlotContentForRelocation = (elm) => {
1228
2127
  }
1229
2128
  }
1230
2129
  };
1231
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1232
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1233
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1234
- return true;
1235
- }
1236
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1237
- return true;
1238
- }
1239
- return false;
1240
- }
1241
- if (nodeToRelocate["s-sn"] === slotName) {
1242
- return true;
1243
- }
1244
- return slotName === "";
1245
- };
1246
2130
  var nullifyVNodeRefs = (vNode) => {
1247
2131
  {
1248
2132
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1250,44 +2134,51 @@ var nullifyVNodeRefs = (vNode) => {
1250
2134
  }
1251
2135
  };
1252
2136
  var insertBefore = (parent, newNode, reference) => {
1253
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1254
- {
1255
- updateElementScopeIds(newNode, parent);
1256
- }
1257
- return inserted;
1258
- };
1259
- var findScopeIds = (element) => {
1260
- const scopeIds = [];
1261
- if (element) {
1262
- scopeIds.push(
1263
- ...element["s-scs"] || [],
1264
- element["s-si"],
1265
- element["s-sc"],
1266
- ...findScopeIds(element.parentElement)
1267
- );
2137
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
2138
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
2139
+ } else if (typeof newNode["s-sn"] === "string") {
2140
+ if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
2141
+ patchParentNode(newNode);
2142
+ }
2143
+ parent.insertBefore(newNode, reference);
2144
+ const { slotNode } = findSlotFromSlottedNode(newNode);
2145
+ if (slotNode) dispatchSlotChangeEvent(slotNode);
2146
+ return newNode;
2147
+ }
2148
+ if (parent.__insertBefore) {
2149
+ return parent.__insertBefore(newNode, reference);
2150
+ } else {
2151
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1268
2152
  }
1269
- return scopeIds;
1270
2153
  };
1271
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1272
- var _a;
1273
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1274
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1275
- if (scopeIds.size) {
1276
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1277
- if (element["s-ol"] || iterateChildNodes) {
1278
- for (const childNode of Array.from(element.childNodes)) {
1279
- updateElementScopeIds(childNode, element, true);
2154
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2155
+ var _a, _b;
2156
+ let scopeId2;
2157
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
2158
+ const scopeName = slotNode["s-sn"];
2159
+ const hostName = slotNode["s-hn"];
2160
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
2161
+ if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
2162
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
2163
+ let found = false;
2164
+ while (child) {
2165
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
2166
+ found = true;
2167
+ break;
1280
2168
  }
2169
+ child = child.nextSibling;
1281
2170
  }
2171
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1282
2172
  }
1283
2173
  }
1284
- };
2174
+ }
1285
2175
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1286
2176
  var _a, _b, _c, _d, _e;
1287
2177
  const hostElm = hostRef.$hostElement$;
1288
2178
  const cmpMeta = hostRef.$cmpMeta$;
1289
2179
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1290
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2180
+ const isHostElement = isHost(renderFnResults);
2181
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1291
2182
  hostTagName = hostElm.tagName;
1292
2183
  if (cmpMeta.$attrsToReflect$) {
1293
2184
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
@@ -1309,7 +2200,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1309
2200
  {
1310
2201
  scopeId = hostElm["s-sc"];
1311
2202
  }
1312
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
2203
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1313
2204
  {
1314
2205
  contentRef = hostElm["s-cr"];
1315
2206
  checkSlotFallbackVisibility = false;
@@ -1321,8 +2212,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1321
2212
  markSlotContentForRelocation(rootVnode.$elm$);
1322
2213
  for (const relocateData of relocateNodes) {
1323
2214
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1324
- if (!nodeToRelocate["s-ol"]) {
1325
- const orgLocationNode = doc.createTextNode("");
2215
+ if (!nodeToRelocate["s-ol"] && win.document) {
2216
+ const orgLocationNode = win.document.createTextNode("");
1326
2217
  orgLocationNode["s-nr"] = nodeToRelocate;
1327
2218
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1328
2219
  }
@@ -1333,11 +2224,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1333
2224
  if (slotRefNode) {
1334
2225
  const parentNodeRef = slotRefNode.parentNode;
1335
2226
  let insertBeforeNode = slotRefNode.nextSibling;
1336
- if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
2227
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1337
2228
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1338
2229
  while (orgLocationNode) {
1339
2230
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1340
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
2231
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1341
2232
  refNode = refNode.nextSibling;
1342
2233
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1343
2234
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1350,15 +2241,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1350
2241
  orgLocationNode = orgLocationNode.previousSibling;
1351
2242
  }
1352
2243
  }
1353
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
2244
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
2245
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
2246
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1354
2247
  if (nodeToRelocate !== insertBeforeNode) {
1355
2248
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1356
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2249
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1357
2250
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1358
2251
  }
1359
2252
  }
1360
2253
  }
1361
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
2254
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1362
2255
  } else {
1363
2256
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1364
2257
  if (isInitialLoad) {
@@ -1372,11 +2265,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1372
2265
  if (checkSlotFallbackVisibility) {
1373
2266
  updateFallbackSlotVisibility(rootVnode.$elm$);
1374
2267
  }
1375
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2268
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1376
2269
  relocateNodes.length = 0;
1377
2270
  }
1378
2271
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1379
- for (const childNode of rootVnode.$elm$.childNodes) {
2272
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
2273
+ for (const childNode of children) {
1380
2274
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1381
2275
  if (isInitialLoad && childNode["s-ih"] == null) {
1382
2276
  childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
@@ -1391,7 +2285,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1391
2285
  // src/runtime/update-component.ts
1392
2286
  var attachToAncestor = (hostRef, ancestorComponent) => {
1393
2287
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1394
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2288
+ const index = ancestorComponent["s-p"].push(
2289
+ new Promise(
2290
+ (r) => hostRef.$onRenderResolve$ = () => {
2291
+ ancestorComponent["s-p"].splice(index - 1, 1);
2292
+ r();
2293
+ }
2294
+ )
2295
+ );
1395
2296
  }
1396
2297
  };
1397
2298
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1420,17 +2321,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1420
2321
  {
1421
2322
  hostRef.$flags$ |= 256 /* isListenReady */;
1422
2323
  if (hostRef.$queuedListeners$) {
1423
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
2324
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1424
2325
  hostRef.$queuedListeners$ = void 0;
1425
2326
  }
1426
2327
  }
1427
- {
1428
- maybePromise = safeCall(instance, "componentWillLoad");
1429
- }
1430
- }
1431
- {
1432
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2328
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
2329
+ } else {
2330
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1433
2331
  }
2332
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1434
2333
  endSchedule();
1435
2334
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1436
2335
  };
@@ -1473,7 +2372,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1473
2372
  try {
1474
2373
  instance = instance.render && instance.render();
1475
2374
  {
1476
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
2375
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1477
2376
  }
1478
2377
  {
1479
2378
  hostRef.$flags$ |= 2 /* hasRendered */;
@@ -1496,17 +2395,13 @@ var postUpdateComponent = (hostRef) => {
1496
2395
  const endPostUpdate = createTime("postUpdate", tagName);
1497
2396
  const instance = hostRef.$lazyInstance$ ;
1498
2397
  const ancestorComponent = hostRef.$ancestorComponent$;
1499
- {
1500
- safeCall(instance, "componentDidRender");
1501
- }
2398
+ safeCall(instance, "componentDidRender", void 0, elm);
1502
2399
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1503
2400
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1504
2401
  {
1505
2402
  addHydratedFlag(elm);
1506
2403
  }
1507
- {
1508
- safeCall(instance, "componentDidLoad");
1509
- }
2404
+ safeCall(instance, "componentDidLoad", void 0, elm);
1510
2405
  endPostUpdate();
1511
2406
  {
1512
2407
  hostRef.$onReadyResolve$(elm);
@@ -1515,9 +2410,7 @@ var postUpdateComponent = (hostRef) => {
1515
2410
  }
1516
2411
  }
1517
2412
  } else {
1518
- {
1519
- safeCall(instance, "componentDidUpdate");
1520
- }
2413
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1521
2414
  endPostUpdate();
1522
2415
  }
1523
2416
  {
@@ -1531,7 +2424,7 @@ var postUpdateComponent = (hostRef) => {
1531
2424
  if (hostRef.$flags$ & 512 /* needsRerender */) {
1532
2425
  nextTick(() => scheduleUpdate(hostRef, false));
1533
2426
  }
1534
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
2427
+ hostRef.$flags$ &= -517;
1535
2428
  }
1536
2429
  };
1537
2430
  var forceUpdate = (ref) => {
@@ -1545,17 +2438,14 @@ var forceUpdate = (ref) => {
1545
2438
  }
1546
2439
  };
1547
2440
  var appDidLoad = (who) => {
1548
- {
1549
- addHydratedFlag(doc.documentElement);
1550
- }
1551
2441
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1552
2442
  };
1553
- var safeCall = (instance, method, arg) => {
2443
+ var safeCall = (instance, method, arg, elm) => {
1554
2444
  if (instance && instance[method]) {
1555
2445
  try {
1556
2446
  return instance[method](arg);
1557
2447
  } catch (e) {
1558
- consoleError(e);
2448
+ consoleError(e, elm);
1559
2449
  }
1560
2450
  }
1561
2451
  return void 0;
@@ -1571,7 +2461,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1571
2461
  const hostRef = getHostRef(ref);
1572
2462
  if (!hostRef) {
1573
2463
  throw new Error(
1574
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
2464
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1575
2465
  );
1576
2466
  }
1577
2467
  const elm = hostRef.$hostElement$ ;
@@ -1597,6 +2487,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1597
2487
  }
1598
2488
  }
1599
2489
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2490
+ if (instance.componentShouldUpdate) {
2491
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2492
+ return;
2493
+ }
2494
+ }
1600
2495
  scheduleUpdate(hostRef, false);
1601
2496
  }
1602
2497
  }
@@ -1614,15 +2509,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1614
2509
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1615
2510
  members.map(([memberName, [memberFlags]]) => {
1616
2511
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2512
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
2513
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
2514
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
2515
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
2516
+ Object.defineProperty(prototype, memberName, {
2517
+ get() {
2518
+ {
2519
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
2520
+ return getValue(this, memberName);
2521
+ }
2522
+ const ref = getHostRef(this);
2523
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2524
+ if (!instance) return;
2525
+ return instance[memberName];
2526
+ }
2527
+ },
2528
+ configurable: true,
2529
+ enumerable: true
2530
+ });
2531
+ }
1617
2532
  Object.defineProperty(prototype, memberName, {
1618
- get() {
1619
- return getValue(this, memberName);
1620
- },
1621
2533
  set(newValue) {
1622
- setValue(this, memberName, newValue, cmpMeta);
1623
- },
1624
- configurable: true,
1625
- enumerable: true
2534
+ const ref = getHostRef(this);
2535
+ if (origSetter) {
2536
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2537
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
2538
+ newValue = ref.$instanceValues$.get(memberName);
2539
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
2540
+ ref.$instanceValues$.set(memberName, currentValue);
2541
+ }
2542
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
2543
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2544
+ setValue(this, memberName, newValue, cmpMeta);
2545
+ return;
2546
+ }
2547
+ {
2548
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
2549
+ setValue(this, memberName, newValue, cmpMeta);
2550
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
2551
+ ref.$onReadyPromise$.then(() => {
2552
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
2553
+ ref.$lazyInstance$[memberName] = newValue;
2554
+ }
2555
+ });
2556
+ }
2557
+ return;
2558
+ }
2559
+ const setterSetVal = () => {
2560
+ const currentValue = ref.$lazyInstance$[memberName];
2561
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2562
+ ref.$instanceValues$.set(memberName, currentValue);
2563
+ }
2564
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
2565
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2566
+ };
2567
+ if (ref.$lazyInstance$) {
2568
+ setterSetVal();
2569
+ } else {
2570
+ ref.$onReadyPromise$.then(() => setterSetVal());
2571
+ }
2572
+ }
2573
+ }
1626
2574
  });
1627
2575
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1628
2576
  Object.defineProperty(prototype, memberName, {
@@ -1643,7 +2591,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1643
2591
  plt.jmp(() => {
1644
2592
  var _a2;
1645
2593
  const propName = attrNameToPropName.get(attrName);
1646
- if (this.hasOwnProperty(propName)) {
2594
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1647
2595
  newValue = this[propName];
1648
2596
  delete this[propName];
1649
2597
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1663,7 +2611,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1663
2611
  }
1664
2612
  return;
1665
2613
  }
1666
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2614
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2615
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2616
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
2617
+ this[propName] = newValue;
2618
+ }
1667
2619
  });
1668
2620
  };
1669
2621
  Cstr.observedAttributes = Array.from(
@@ -1692,7 +2644,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1692
2644
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1693
2645
  const bundleId = cmpMeta.$lazyBundleId$;
1694
2646
  if (bundleId) {
1695
- const CstrImport = loadModule(cmpMeta);
2647
+ const CstrImport = loadModule(cmpMeta, hostRef);
1696
2648
  if (CstrImport && "then" in CstrImport) {
1697
2649
  const endLoad = uniqueTime();
1698
2650
  Cstr = await CstrImport;
@@ -1717,16 +2669,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1717
2669
  try {
1718
2670
  new Cstr(hostRef);
1719
2671
  } catch (e) {
1720
- consoleError(e);
2672
+ consoleError(e, elm);
1721
2673
  }
1722
2674
  {
1723
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2675
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1724
2676
  }
1725
2677
  {
1726
2678
  hostRef.$flags$ |= 128 /* isWatchReady */;
1727
2679
  }
1728
2680
  endNewInstance();
1729
- fireConnectedCallback(hostRef.$lazyInstance$);
2681
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1730
2682
  } else {
1731
2683
  Cstr = elm.constructor;
1732
2684
  const cmpTag = elm.localName;
@@ -1758,9 +2710,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1758
2710
  schedule();
1759
2711
  }
1760
2712
  };
1761
- var fireConnectedCallback = (instance) => {
2713
+ var fireConnectedCallback = (instance, elm) => {
1762
2714
  {
1763
- safeCall(instance, "connectedCallback");
2715
+ safeCall(instance, "connectedCallback", void 0, elm);
1764
2716
  }
1765
2717
  };
1766
2718
 
@@ -1779,6 +2731,9 @@ var connectedCallback = (elm) => {
1779
2731
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1780
2732
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1781
2733
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2734
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2735
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2736
+ elm["s-sc"] = scopeId2;
1782
2737
  }
1783
2738
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1784
2739
  }
@@ -1813,24 +2768,27 @@ var connectedCallback = (elm) => {
1813
2768
  } else {
1814
2769
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1815
2770
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1816
- fireConnectedCallback(hostRef.$lazyInstance$);
2771
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1817
2772
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1818
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
2773
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1819
2774
  }
1820
2775
  }
1821
2776
  endConnected();
1822
2777
  }
1823
2778
  };
1824
2779
  var setContentReference = (elm) => {
1825
- const contentRefElm = elm["s-cr"] = doc.createComment(
2780
+ if (!win.document) {
2781
+ return;
2782
+ }
2783
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
1826
2784
  ""
1827
2785
  );
1828
2786
  contentRefElm["s-cn"] = true;
1829
2787
  insertBefore(elm, contentRefElm, elm.firstChild);
1830
2788
  };
1831
- var disconnectInstance = (instance) => {
2789
+ var disconnectInstance = (instance, elm) => {
1832
2790
  {
1833
- safeCall(instance, "disconnectedCallback");
2791
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1834
2792
  }
1835
2793
  };
1836
2794
  var disconnectedCallback = async (elm) => {
@@ -1843,312 +2801,44 @@ var disconnectedCallback = async (elm) => {
1843
2801
  }
1844
2802
  }
1845
2803
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1846
- disconnectInstance(hostRef.$lazyInstance$);
2804
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1847
2805
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1848
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1849
- }
1850
- }
1851
- };
1852
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1853
- patchCloneNode(hostElementPrototype);
1854
- patchSlotAppendChild(hostElementPrototype);
1855
- patchSlotAppend(hostElementPrototype);
1856
- patchSlotPrepend(hostElementPrototype);
1857
- patchSlotInsertAdjacentElement(hostElementPrototype);
1858
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1859
- patchSlotInsertAdjacentText(hostElementPrototype);
1860
- patchTextContent(hostElementPrototype);
1861
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1862
- patchSlotRemoveChild(hostElementPrototype);
1863
- };
1864
- var patchCloneNode = (HostElementPrototype) => {
1865
- const orgCloneNode = HostElementPrototype.cloneNode;
1866
- HostElementPrototype.cloneNode = function(deep) {
1867
- const srcNode = this;
1868
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1869
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1870
- if (!isShadowDom && deep) {
1871
- let i2 = 0;
1872
- let slotted, nonStencilNode;
1873
- const stencilPrivates = [
1874
- "s-id",
1875
- "s-cr",
1876
- "s-lr",
1877
- "s-rc",
1878
- "s-sc",
1879
- "s-p",
1880
- "s-cn",
1881
- "s-sr",
1882
- "s-sn",
1883
- "s-hn",
1884
- "s-ol",
1885
- "s-nr",
1886
- "s-si",
1887
- "s-rf",
1888
- "s-scs"
1889
- ];
1890
- for (; i2 < srcNode.childNodes.length; i2++) {
1891
- slotted = srcNode.childNodes[i2]["s-nr"];
1892
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1893
- if (slotted) {
1894
- if (clonedNode.__appendChild) {
1895
- clonedNode.__appendChild(slotted.cloneNode(true));
1896
- } else {
1897
- clonedNode.appendChild(slotted.cloneNode(true));
1898
- }
1899
- }
1900
- if (nonStencilNode) {
1901
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1902
- }
1903
- }
1904
- }
1905
- return clonedNode;
1906
- };
1907
- };
1908
- var patchSlotAppendChild = (HostElementPrototype) => {
1909
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1910
- HostElementPrototype.appendChild = function(newChild) {
1911
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1912
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1913
- if (slotNode) {
1914
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1915
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1916
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1917
- updateFallbackSlotVisibility(this);
1918
- return insertedNode;
1919
- }
1920
- return this.__appendChild(newChild);
1921
- };
1922
- };
1923
- var patchSlotRemoveChild = (ElementPrototype) => {
1924
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1925
- ElementPrototype.removeChild = function(toRemove) {
1926
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1927
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1928
- if (slotNode) {
1929
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1930
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1931
- if (existingNode) {
1932
- existingNode.remove();
1933
- updateFallbackSlotVisibility(this);
1934
- return;
1935
- }
1936
- }
1937
- }
1938
- return this.__removeChild(toRemove);
1939
- };
1940
- };
1941
- var patchSlotPrepend = (HostElementPrototype) => {
1942
- const originalPrepend = HostElementPrototype.prepend;
1943
- HostElementPrototype.prepend = function(...newChildren) {
1944
- newChildren.forEach((newChild) => {
1945
- if (typeof newChild === "string") {
1946
- newChild = this.ownerDocument.createTextNode(newChild);
1947
- }
1948
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1949
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1950
- if (slotNode) {
1951
- const slotPlaceholder = document.createTextNode("");
1952
- slotPlaceholder["s-nr"] = newChild;
1953
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1954
- newChild["s-ol"] = slotPlaceholder;
1955
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1956
- const appendAfter = slotChildNodes[0];
1957
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1958
- }
1959
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1960
- newChild.hidden = true;
1961
- }
1962
- return originalPrepend.call(this, newChild);
1963
- });
1964
- };
1965
- };
1966
- var patchSlotAppend = (HostElementPrototype) => {
1967
- HostElementPrototype.append = function(...newChildren) {
1968
- newChildren.forEach((newChild) => {
1969
- if (typeof newChild === "string") {
1970
- newChild = this.ownerDocument.createTextNode(newChild);
1971
- }
1972
- this.appendChild(newChild);
1973
- });
1974
- };
1975
- };
1976
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1977
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1978
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1979
- if (position !== "afterbegin" && position !== "beforeend") {
1980
- return originalInsertAdjacentHtml.call(this, position, text);
1981
- }
1982
- const container = this.ownerDocument.createElement("_");
1983
- let node;
1984
- container.innerHTML = text;
1985
- if (position === "afterbegin") {
1986
- while (node = container.firstChild) {
1987
- this.prepend(node);
1988
- }
1989
- } else if (position === "beforeend") {
1990
- while (node = container.firstChild) {
1991
- this.append(node);
1992
- }
1993
- }
1994
- };
1995
- };
1996
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1997
- HostElementPrototype.insertAdjacentText = function(position, text) {
1998
- this.insertAdjacentHTML(position, text);
1999
- };
2000
- };
2001
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2002
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2003
- HostElementPrototype.insertAdjacentElement = function(position, element) {
2004
- if (position !== "afterbegin" && position !== "beforeend") {
2005
- return originalInsertAdjacentElement.call(this, position, element);
2006
- }
2007
- if (position === "afterbegin") {
2008
- this.prepend(element);
2009
- return element;
2010
- } else if (position === "beforeend") {
2011
- this.append(element);
2012
- return element;
2013
- }
2014
- return element;
2015
- };
2016
- };
2017
- var patchTextContent = (hostElementPrototype) => {
2018
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2019
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2020
- {
2021
- Object.defineProperty(hostElementPrototype, "textContent", {
2022
- // To mimic shadow root behavior, we need to return the text content of all
2023
- // nodes in a slot reference node
2024
- get() {
2025
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2026
- const textContent = slotRefNodes.map((node) => {
2027
- var _a, _b;
2028
- const text = [];
2029
- let slotContent = node.nextSibling;
2030
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2031
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2032
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2033
- }
2034
- slotContent = slotContent.nextSibling;
2035
- }
2036
- return text.filter((ref) => ref !== "").join(" ");
2037
- }).filter((text) => text !== "").join(" ");
2038
- return " " + textContent + " ";
2039
- },
2040
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2041
- // reference node. If a default slot reference node exists, the text content will be
2042
- // placed there. Otherwise, the new text node will be hidden
2043
- set(value) {
2044
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2045
- slotRefNodes.forEach((node) => {
2046
- let slotContent = node.nextSibling;
2047
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2048
- const tmp = slotContent;
2049
- slotContent = slotContent.nextSibling;
2050
- tmp.remove();
2051
- }
2052
- if (node["s-sn"] === "") {
2053
- const textNode = this.ownerDocument.createTextNode(value);
2054
- textNode["s-sn"] = "";
2055
- insertBefore(node.parentElement, textNode, node.nextSibling);
2056
- } else {
2057
- node.remove();
2058
- }
2059
- });
2060
- }
2061
- });
2062
- }
2063
- };
2064
- var patchChildSlotNodes = (elm, cmpMeta) => {
2065
- class FakeNodeList extends Array {
2066
- item(n) {
2067
- return this[n];
2068
- }
2069
- }
2070
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2071
- const childNodesFn = elm.__lookupGetter__("childNodes");
2072
- Object.defineProperty(elm, "children", {
2073
- get() {
2074
- return this.childNodes.map((n) => n.nodeType === 1);
2075
- }
2076
- });
2077
- Object.defineProperty(elm, "childElementCount", {
2078
- get() {
2079
- return elm.children.length;
2080
- }
2081
- });
2082
- Object.defineProperty(elm, "childNodes", {
2083
- get() {
2084
- const childNodes = childNodesFn.call(this);
2085
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2086
- const result = new FakeNodeList();
2087
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2088
- const slot = childNodes[i2]["s-nr"];
2089
- if (slot) {
2090
- result.push(slot);
2091
- }
2092
- }
2093
- return result;
2094
- }
2095
- return FakeNodeList.from(childNodes);
2096
- }
2097
- });
2098
- }
2099
- };
2100
- var getAllChildSlotNodes = (childNodes) => {
2101
- const slotRefNodes = [];
2102
- for (const childNode of Array.from(childNodes)) {
2103
- if (childNode["s-sr"]) {
2104
- slotRefNodes.push(childNode);
2806
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
2105
2807
  }
2106
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2107
2808
  }
2108
- return slotRefNodes;
2109
- };
2110
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2111
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2112
- let i2 = 0;
2113
- let childNode;
2114
- for (; i2 < childNodes.length; i2++) {
2115
- childNode = childNodes[i2];
2116
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2117
- return childNode;
2118
- }
2119
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2120
- if (childNode) {
2121
- return childNode;
2122
- }
2809
+ if (rootAppliedStyles.has(elm)) {
2810
+ rootAppliedStyles.delete(elm);
2123
2811
  }
2124
- return null;
2125
- };
2126
- var getHostSlotChildNodes = (n, slotName) => {
2127
- const childNodes = [n];
2128
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2129
- childNodes.push(n);
2812
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2813
+ rootAppliedStyles.delete(elm.shadowRoot);
2130
2814
  }
2131
- return childNodes;
2132
2815
  };
2133
2816
 
2134
2817
  // src/runtime/bootstrap-lazy.ts
2135
2818
  var bootstrapLazy = (lazyBundles, options = {}) => {
2136
2819
  var _a;
2820
+ if (!win.document) {
2821
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
2822
+ return;
2823
+ }
2137
2824
  const endBootstrap = createTime();
2138
2825
  const cmpTags = [];
2139
2826
  const exclude = options.exclude || [];
2140
2827
  const customElements2 = win.customElements;
2141
- const head = doc.head;
2828
+ const head = win.document.head;
2142
2829
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2143
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
2830
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
2144
2831
  const deferredConnectedCallbacks = [];
2145
2832
  let appLoadFallback;
2146
2833
  let isBootstrapping = true;
2147
2834
  Object.assign(plt, options);
2148
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2835
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2149
2836
  {
2150
2837
  plt.$flags$ |= 2 /* appLoaded */;
2151
2838
  }
2839
+ {
2840
+ hydrateScopedToShadow();
2841
+ }
2152
2842
  let hasSlotRelocation = false;
2153
2843
  lazyBundles.map((lazyBundle) => {
2154
2844
  lazyBundle[1].map((compactMeta) => {
@@ -2219,6 +2909,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2219
2909
  }
2220
2910
  disconnectedCallback() {
2221
2911
  plt.jmp(() => disconnectedCallback(this));
2912
+ plt.raf(() => {
2913
+ var _a3;
2914
+ const hostRef = getHostRef(this);
2915
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
2916
+ if (i2 > -1) {
2917
+ deferredConnectedCallbacks.splice(i2, 1);
2918
+ }
2919
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2920
+ delete hostRef.$vnode$.$elm$;
2921
+ }
2922
+ });
2222
2923
  }
2223
2924
  componentOnReady() {
2224
2925
  return getHostRef(this).$onReadyPromise$;
@@ -2226,7 +2927,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2226
2927
  };
2227
2928
  {
2228
2929
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2229
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2930
+ patchPseudoShadowDom(HostElement.prototype);
2230
2931
  }
2231
2932
  }
2232
2933
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -2248,7 +2949,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2248
2949
  }
2249
2950
  if (dataStyles.innerHTML.length) {
2250
2951
  dataStyles.setAttribute("data-styles", "");
2251
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2952
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2252
2953
  if (nonce != null) {
2253
2954
  dataStyles.setAttribute("nonce", nonce);
2254
2955
  }
@@ -2266,9 +2967,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2266
2967
  endBootstrap();
2267
2968
  };
2268
2969
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2269
- if (listeners) {
2970
+ if (listeners && win.document) {
2270
2971
  listeners.map(([flags, name, method]) => {
2271
- const target = getHostListenerTarget(elm, flags) ;
2972
+ const target = getHostListenerTarget(win.document, elm, flags) ;
2272
2973
  const handler = hostListenerProxy(hostRef, method);
2273
2974
  const opts = hostListenerOpts(flags);
2274
2975
  plt.ael(target, name, handler, opts);
@@ -2287,13 +2988,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2287
2988
  }
2288
2989
  }
2289
2990
  } catch (e) {
2290
- consoleError(e);
2991
+ consoleError(e, hostRef.$hostElement$);
2291
2992
  }
2292
2993
  };
2293
- var getHostListenerTarget = (elm, flags) => {
2294
- if (flags & 4 /* TargetDocument */) return doc;
2295
- if (flags & 8 /* TargetWindow */) return win;
2296
- if (flags & 16 /* TargetBody */) return doc.body;
2994
+ var getHostListenerTarget = (doc, elm, flags) => {
2995
+ if (flags & 4 /* TargetDocument */) {
2996
+ return doc;
2997
+ }
2998
+ if (flags & 8 /* TargetWindow */) {
2999
+ return win;
3000
+ }
3001
+ if (flags & 16 /* TargetBody */) {
3002
+ return doc.body;
3003
+ }
2297
3004
  return elm;
2298
3005
  };
2299
3006
  var hostListenerOpts = (flags) => supportsListenerOptions ? {