@ionic/core 8.4.2-dev.11734462711.1a2281e0 → 8.4.2-dev.11736265112.120bf7af

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 (430) hide show
  1. package/dist/cjs/{app-globals-21afee77.js → app-globals-16893c1e.js} +1 -1
  2. package/dist/cjs/{button-active-3f2f60b4.js → button-active-ec3d9ca2.js} +1 -1
  3. package/dist/cjs/{hardware-back-button-9e8a2c4f.js → hardware-back-button-5a19da86.js} +2 -2
  4. package/dist/cjs/{index-f05acd21.js → index-29ad8b24.js} +4 -4
  5. package/dist/cjs/{index-8e789962.js → index-2b28acc8.js} +2 -2
  6. package/dist/cjs/{index-73f75efb.js → index-55b6245a.js} +1117 -744
  7. package/dist/cjs/index.cjs.js +8 -8
  8. package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
  9. package/dist/cjs/ion-action-sheet.cjs.entry.js +5 -5
  10. package/dist/cjs/ion-alert.cjs.entry.js +5 -5
  11. package/dist/cjs/ion-app_8.cjs.entry.js +6 -6
  12. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  13. package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
  14. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  15. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
  16. package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
  17. package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
  18. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  19. package/dist/cjs/ion-chip.cjs.entry.js +2 -2
  20. package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
  21. package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
  22. package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
  23. package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
  24. package/dist/cjs/ion-img.cjs.entry.js +2 -2
  25. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  26. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
  27. package/dist/cjs/ion-input.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-loading.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
  32. package/dist/cjs/ion-modal.cjs.entry.js +5 -5
  33. package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
  34. package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
  35. package/dist/cjs/ion-picker-column.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-popover.cjs.entry.js +5 -5
  38. package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-range.cjs.entry.js +2 -2
  41. package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
  42. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  43. package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
  44. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
  46. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  47. package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
  48. package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
  49. package/dist/cjs/ion-select-modal.cjs.entry.js +4 -4
  50. package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
  51. package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
  52. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  53. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
  54. package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
  55. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  56. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  57. package/dist/cjs/ion-toast.cjs.entry.js +4 -4
  58. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  59. package/dist/cjs/{ionic-global-d9a8bb5b.js → ionic-global-aa46b97c.js} +1 -1
  60. package/dist/cjs/ionic.cjs.js +4 -4
  61. package/dist/cjs/{ios.transition-cf40433b.js → ios.transition-9820d3dc.js} +3 -3
  62. package/dist/cjs/loader.cjs.js +3 -3
  63. package/dist/cjs/{md.transition-ededf99f.js → md.transition-a35e0839.js} +3 -3
  64. package/dist/cjs/{overlays-aa669eb8.js → overlays-43ae7e1d.js} +2 -2
  65. package/dist/cjs/{status-tap-37681226.js → status-tap-f98e43a0.js} +1 -1
  66. package/dist/collection/collection-manifest.json +2 -2
  67. package/dist/collection/components/accordion/accordion.js +10 -0
  68. package/dist/collection/components/accordion-group/accordion-group.js +12 -0
  69. package/dist/collection/components/action-sheet/action-sheet.js +36 -4
  70. package/dist/collection/components/alert/alert.js +40 -4
  71. package/dist/collection/components/back-button/back-button.js +15 -1
  72. package/dist/collection/components/backdrop/backdrop.js +6 -0
  73. package/dist/collection/components/badge/badge.js +2 -0
  74. package/dist/collection/components/breadcrumb/breadcrumb.js +27 -1
  75. package/dist/collection/components/breadcrumbs/breadcrumbs.js +8 -0
  76. package/dist/collection/components/button/button.js +33 -1
  77. package/dist/collection/components/buttons/buttons.js +2 -0
  78. package/dist/collection/components/card/card.js +21 -1
  79. package/dist/collection/components/card-header/card-header.js +4 -0
  80. package/dist/collection/components/card-subtitle/card-subtitle.js +2 -0
  81. package/dist/collection/components/card-title/card-title.js +2 -0
  82. package/dist/collection/components/checkbox/checkbox.js +18 -0
  83. package/dist/collection/components/chip/chip.js +6 -0
  84. package/dist/collection/components/col/col.js +48 -0
  85. package/dist/collection/components/content/content.js +14 -0
  86. package/dist/collection/components/datetime/datetime.js +64 -4
  87. package/dist/collection/components/datetime-button/datetime-button.js +6 -0
  88. package/dist/collection/components/fab/fab.js +8 -0
  89. package/dist/collection/components/fab-button/fab-button.js +29 -1
  90. package/dist/collection/components/fab-list/fab-list.js +4 -0
  91. package/dist/collection/components/footer/footer.js +4 -0
  92. package/dist/collection/components/grid/grid.js +2 -0
  93. package/dist/collection/components/header/header.js +4 -0
  94. package/dist/collection/components/img/img.js +4 -0
  95. package/dist/collection/components/infinite-scroll/infinite-scroll.js +6 -0
  96. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -0
  97. package/dist/collection/components/input/input.js +69 -1
  98. package/dist/collection/components/input-password-toggle/input-password-toggle.js +8 -0
  99. package/dist/collection/components/item/item.js +27 -1
  100. package/dist/collection/components/item-divider/item-divider.js +4 -0
  101. package/dist/collection/components/item-option/item-option.js +16 -0
  102. package/dist/collection/components/item-options/item-options.js +2 -0
  103. package/dist/collection/components/item-sliding/item-sliding.js +2 -0
  104. package/dist/collection/components/label/label.js +4 -0
  105. package/dist/collection/components/list/list.js +4 -0
  106. package/dist/collection/components/list-header/list-header.js +4 -0
  107. package/dist/collection/components/loading/loading.js +38 -4
  108. package/dist/collection/components/menu/menu.js +14 -0
  109. package/dist/collection/components/menu-button/menu-button.js +10 -0
  110. package/dist/collection/components/menu-toggle/menu-toggle.js +4 -0
  111. package/dist/collection/components/modal/modal.js +55 -7
  112. package/dist/collection/components/nav/nav.js +15 -3
  113. package/dist/collection/components/nav-link/nav-link.js +10 -2
  114. package/dist/collection/components/note/note.js +2 -0
  115. package/dist/collection/components/picker-column/picker-column.js +8 -0
  116. package/dist/collection/components/picker-column-option/picker-column-option.js +6 -0
  117. package/dist/collection/components/picker-legacy/picker.js +36 -4
  118. package/dist/collection/components/picker-legacy-column/picker-column.js +3 -1
  119. package/dist/collection/components/popover/popover.js +59 -5
  120. package/dist/collection/components/progress-bar/progress-bar.js +10 -0
  121. package/dist/collection/components/radio/radio.js +14 -0
  122. package/dist/collection/components/radio-group/radio-group.js +8 -0
  123. package/dist/collection/components/range/range.js +32 -0
  124. package/dist/collection/components/refresher/refresher.js +12 -0
  125. package/dist/collection/components/refresher-content/refresher-content.js +8 -0
  126. package/dist/collection/components/reorder-group/reorder-group.js +2 -0
  127. package/dist/collection/components/ripple-effect/ripple-effect.js +2 -0
  128. package/dist/collection/components/route/route.js +13 -3
  129. package/dist/collection/components/route-redirect/route-redirect.js +4 -0
  130. package/dist/collection/components/router/router.js +4 -0
  131. package/dist/collection/components/router-link/router-link.js +13 -1
  132. package/dist/collection/components/router-outlet/router-outlet.js +13 -3
  133. package/dist/collection/components/searchbar/searchbar.js +44 -0
  134. package/dist/collection/components/segment/segment.js +12 -0
  135. package/dist/collection/components/segment-button/segment-button.js +10 -0
  136. package/dist/collection/components/segment-view/segment-view.js +2 -0
  137. package/dist/collection/components/select/select.js +38 -0
  138. package/dist/collection/components/select-modal/select-modal.js +6 -0
  139. package/dist/collection/components/select-option/select-option.js +4 -0
  140. package/dist/collection/components/select-popover/select-popover.js +10 -0
  141. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -0
  142. package/dist/collection/components/spinner/spinner.js +8 -0
  143. package/dist/collection/components/split-pane/split-pane.js +6 -0
  144. package/dist/collection/components/tab/tab.js +9 -1
  145. package/dist/collection/components/tab-bar/tab-bar.js +6 -0
  146. package/dist/collection/components/tab-button/tab-button.js +16 -0
  147. package/dist/collection/components/tabs/tabs.js +2 -0
  148. package/dist/collection/components/text/text.js +2 -0
  149. package/dist/collection/components/textarea/textarea.js +57 -1
  150. package/dist/collection/components/title/title.js +4 -0
  151. package/dist/collection/components/toast/toast.js +49 -5
  152. package/dist/collection/components/toggle/toggle.js +18 -0
  153. package/dist/collection/components/toolbar/toolbar.js +2 -0
  154. package/dist/docs.d.ts +8 -0
  155. package/dist/docs.json +1710 -572
  156. package/dist/esm/{app-globals-5dbb61a5.js → app-globals-32740a0d.js} +1 -1
  157. package/dist/esm/{button-active-f6503382.js → button-active-0e590bc4.js} +1 -1
  158. package/dist/esm/{hardware-back-button-06ef3c3e.js → hardware-back-button-18d38325.js} +2 -2
  159. package/dist/esm/{index-28849c61.js → index-0f61352c.js} +1117 -744
  160. package/dist/esm/{index-3ad7f18b.js → index-4f0570f4.js} +4 -4
  161. package/dist/esm/{index-24b48b06.js → index-7bdf1ee6.js} +2 -2
  162. package/dist/esm/index.js +8 -8
  163. package/dist/esm/ion-accordion_2.entry.js +2 -2
  164. package/dist/esm/ion-action-sheet.entry.js +5 -5
  165. package/dist/esm/ion-alert.entry.js +5 -5
  166. package/dist/esm/ion-app_8.entry.js +6 -6
  167. package/dist/esm/ion-avatar_3.entry.js +2 -2
  168. package/dist/esm/ion-back-button.entry.js +2 -2
  169. package/dist/esm/ion-backdrop.entry.js +2 -2
  170. package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
  171. package/dist/esm/ion-button_2.entry.js +2 -2
  172. package/dist/esm/ion-card_5.entry.js +2 -2
  173. package/dist/esm/ion-checkbox.entry.js +2 -2
  174. package/dist/esm/ion-chip.entry.js +2 -2
  175. package/dist/esm/ion-col_3.entry.js +2 -2
  176. package/dist/esm/ion-datetime-button.entry.js +2 -2
  177. package/dist/esm/ion-datetime_3.entry.js +4 -4
  178. package/dist/esm/ion-fab_3.entry.js +2 -2
  179. package/dist/esm/ion-img.entry.js +2 -2
  180. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  181. package/dist/esm/ion-input-password-toggle.entry.js +2 -2
  182. package/dist/esm/ion-input.entry.js +2 -2
  183. package/dist/esm/ion-item-option_3.entry.js +2 -2
  184. package/dist/esm/ion-item_8.entry.js +2 -2
  185. package/dist/esm/ion-loading.entry.js +4 -4
  186. package/dist/esm/ion-menu_3.entry.js +5 -5
  187. package/dist/esm/ion-modal.entry.js +5 -5
  188. package/dist/esm/ion-nav_2.entry.js +3 -3
  189. package/dist/esm/ion-picker-column-option.entry.js +2 -2
  190. package/dist/esm/ion-picker-column.entry.js +2 -2
  191. package/dist/esm/ion-picker.entry.js +1 -1
  192. package/dist/esm/ion-popover.entry.js +5 -5
  193. package/dist/esm/ion-progress-bar.entry.js +2 -2
  194. package/dist/esm/ion-radio_2.entry.js +2 -2
  195. package/dist/esm/ion-range.entry.js +2 -2
  196. package/dist/esm/ion-refresher_2.entry.js +2 -2
  197. package/dist/esm/ion-reorder_2.entry.js +2 -2
  198. package/dist/esm/ion-ripple-effect.entry.js +2 -2
  199. package/dist/esm/ion-route_4.entry.js +2 -2
  200. package/dist/esm/ion-searchbar.entry.js +2 -2
  201. package/dist/esm/ion-segment-content.entry.js +1 -1
  202. package/dist/esm/ion-segment-view.entry.js +1 -1
  203. package/dist/esm/ion-segment_2.entry.js +2 -2
  204. package/dist/esm/ion-select-modal.entry.js +4 -4
  205. package/dist/esm/ion-select_3.entry.js +4 -4
  206. package/dist/esm/ion-spinner.entry.js +2 -2
  207. package/dist/esm/ion-split-pane.entry.js +2 -2
  208. package/dist/esm/ion-tab-bar_2.entry.js +2 -2
  209. package/dist/esm/ion-tab_2.entry.js +1 -1
  210. package/dist/esm/ion-text.entry.js +2 -2
  211. package/dist/esm/ion-textarea.entry.js +2 -2
  212. package/dist/esm/ion-toast.entry.js +4 -4
  213. package/dist/esm/ion-toggle.entry.js +2 -2
  214. package/dist/esm/{ionic-global-c81d82ab.js → ionic-global-35cabcff.js} +1 -1
  215. package/dist/esm/ionic.js +5 -5
  216. package/dist/esm/{ios.transition-4ee1a3af.js → ios.transition-72ec83a8.js} +3 -3
  217. package/dist/esm/loader.js +4 -4
  218. package/dist/esm/{md.transition-5106a0d2.js → md.transition-1f612b9f.js} +3 -3
  219. package/dist/esm/{overlays-e7b9d6d9.js → overlays-cba25d39.js} +2 -2
  220. package/dist/esm/{status-tap-f472b09f.js → status-tap-a7026a46.js} +1 -1
  221. package/dist/esm-es5/app-globals-32740a0d.js +4 -0
  222. package/dist/esm-es5/{button-active-f6503382.js → button-active-0e590bc4.js} +1 -1
  223. package/dist/esm-es5/{hardware-back-button-06ef3c3e.js → hardware-back-button-18d38325.js} +1 -1
  224. package/dist/esm-es5/index-0f61352c.js +5 -0
  225. package/dist/esm-es5/{index-3ad7f18b.js → index-4f0570f4.js} +1 -1
  226. package/dist/esm-es5/{index-24b48b06.js → index-7bdf1ee6.js} +1 -1
  227. package/dist/esm-es5/index.js +1 -1
  228. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  229. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  230. package/dist/esm-es5/ion-alert.entry.js +1 -1
  231. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  232. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  233. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  234. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  235. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  236. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  237. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  238. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  239. package/dist/esm-es5/ion-chip.entry.js +1 -1
  240. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  241. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  242. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  243. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  244. package/dist/esm-es5/ion-img.entry.js +1 -1
  245. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  246. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  247. package/dist/esm-es5/ion-input.entry.js +1 -1
  248. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  249. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  250. package/dist/esm-es5/ion-loading.entry.js +1 -1
  251. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  252. package/dist/esm-es5/ion-modal.entry.js +1 -1
  253. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  254. package/dist/esm-es5/ion-picker-column-option.entry.js +1 -1
  255. package/dist/esm-es5/ion-picker-column.entry.js +1 -1
  256. package/dist/esm-es5/ion-picker.entry.js +1 -1
  257. package/dist/esm-es5/ion-popover.entry.js +1 -1
  258. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  259. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  260. package/dist/esm-es5/ion-range.entry.js +1 -1
  261. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  262. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  263. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  264. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  265. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  266. package/dist/esm-es5/ion-segment-content.entry.js +1 -1
  267. package/dist/esm-es5/ion-segment-view.entry.js +1 -1
  268. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  269. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  270. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  271. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  272. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  273. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  274. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  275. package/dist/esm-es5/ion-text.entry.js +1 -1
  276. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  277. package/dist/esm-es5/ion-toast.entry.js +1 -1
  278. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  279. package/dist/esm-es5/{ionic-global-c81d82ab.js → ionic-global-35cabcff.js} +1 -1
  280. package/dist/esm-es5/ionic.js +1 -1
  281. package/dist/esm-es5/{ios.transition-4ee1a3af.js → ios.transition-72ec83a8.js} +1 -1
  282. package/dist/esm-es5/loader.js +1 -1
  283. package/dist/esm-es5/{md.transition-5106a0d2.js → md.transition-1f612b9f.js} +1 -1
  284. package/dist/esm-es5/{overlays-e7b9d6d9.js → overlays-cba25d39.js} +1 -1
  285. package/dist/esm-es5/{status-tap-f472b09f.js → status-tap-a7026a46.js} +1 -1
  286. package/dist/ionic/index.esm.js +1 -1
  287. package/dist/ionic/ionic.esm.js +1 -1
  288. package/dist/ionic/ionic.js +1 -1
  289. package/dist/ionic/{p-ed75fcfb.system.entry.js → p-00751c2a.system.entry.js} +1 -1
  290. package/dist/ionic/p-024da823.js +4 -0
  291. package/dist/ionic/{p-16188af7.entry.js → p-047eabc5.entry.js} +1 -1
  292. package/dist/ionic/{p-372ae7f4.system.js → p-04f14c79.system.js} +1 -1
  293. package/dist/ionic/{p-fec61c32.entry.js → p-05562a80.entry.js} +1 -1
  294. package/dist/ionic/{p-d18ab582.system.entry.js → p-07d1dbe2.system.entry.js} +2 -2
  295. package/dist/ionic/{p-58d5df0c.system.entry.js → p-085dbcb4.system.entry.js} +1 -1
  296. package/dist/ionic/{p-7ed1657c.system.entry.js → p-08c16f05.system.entry.js} +1 -1
  297. package/dist/ionic/{p-7ddc46c3.system.entry.js → p-0ba102ec.system.entry.js} +1 -1
  298. package/dist/ionic/{p-fca6ef5f.system.entry.js → p-0c093fae.system.entry.js} +1 -1
  299. package/dist/ionic/{p-de930745.entry.js → p-0c64a077.entry.js} +1 -1
  300. package/dist/ionic/{p-937a7e21.entry.js → p-11330967.entry.js} +1 -1
  301. package/dist/ionic/{p-b9d7015f.entry.js → p-1179c304.entry.js} +1 -1
  302. package/dist/ionic/{p-66640ff7.system.entry.js → p-12f711f4.system.entry.js} +1 -1
  303. package/dist/ionic/{p-c9f3a539.entry.js → p-17290742.entry.js} +1 -1
  304. package/dist/ionic/p-18094a7c.system.entry.js +4 -0
  305. package/dist/ionic/{p-88e63c7d.js → p-19bfac92.js} +1 -1
  306. package/dist/ionic/{p-01186920.system.entry.js → p-255d9087.system.entry.js} +1 -1
  307. package/dist/ionic/{p-3c8e5c23.system.js → p-2564d9b9.system.js} +1 -1
  308. package/dist/ionic/{p-9ee1e8a6.entry.js → p-265d65cb.entry.js} +1 -1
  309. package/dist/ionic/{p-f3102647.system.entry.js → p-27e81076.system.entry.js} +1 -1
  310. package/dist/ionic/{p-bc36ad98.system.entry.js → p-2e396991.system.entry.js} +1 -1
  311. package/dist/ionic/{p-c41ac815.entry.js → p-2e520289.entry.js} +1 -1
  312. package/dist/ionic/p-2e78561b.js +5 -0
  313. package/dist/ionic/{p-5da94421.system.js → p-2f9f5bea.system.js} +1 -1
  314. package/dist/ionic/p-30019f0b.system.js +4 -0
  315. package/dist/ionic/{p-a43467d8.entry.js → p-32e1825e.entry.js} +1 -1
  316. package/dist/ionic/{p-4ec778aa.entry.js → p-35f02a74.entry.js} +1 -1
  317. package/dist/ionic/{p-37cb43bd.system.entry.js → p-38dac839.system.entry.js} +1 -1
  318. package/dist/ionic/{p-ecceeb90.js → p-39539749.js} +1 -1
  319. package/dist/ionic/{p-942b5e13.entry.js → p-3e2c05a8.entry.js} +1 -1
  320. package/dist/ionic/{p-98ff6b32.entry.js → p-41cabce4.entry.js} +1 -1
  321. package/dist/ionic/{p-afecb188.entry.js → p-43679a42.entry.js} +1 -1
  322. package/dist/ionic/{p-2172893e.system.entry.js → p-43febc77.system.entry.js} +1 -1
  323. package/dist/ionic/{p-2b838f86.system.entry.js → p-45e4a1e3.system.entry.js} +1 -1
  324. package/dist/ionic/{p-45693d7e.entry.js → p-4a57dd17.entry.js} +1 -1
  325. package/dist/ionic/{p-9fa07aec.entry.js → p-4ab93cfa.entry.js} +1 -1
  326. package/dist/ionic/{p-b2272f51.system.entry.js → p-52f6a5cc.system.entry.js} +1 -1
  327. package/dist/ionic/{p-6499df44.system.entry.js → p-53ad8ff4.system.entry.js} +1 -1
  328. package/dist/ionic/{p-2bd0ae94.system.entry.js → p-56667886.system.entry.js} +2 -2
  329. package/dist/ionic/{p-a61cba41.entry.js → p-57f92640.entry.js} +1 -1
  330. package/dist/ionic/{p-6d6cedc5.entry.js → p-5ae14e75.entry.js} +1 -1
  331. package/dist/ionic/{p-19a5be0a.entry.js → p-64b0068b.entry.js} +1 -1
  332. package/dist/ionic/{p-e4f69534.system.entry.js → p-65774bef.system.entry.js} +1 -1
  333. package/dist/ionic/{p-e4ee80be.system.entry.js → p-67d3729b.system.entry.js} +1 -1
  334. package/dist/ionic/{p-eba29931.entry.js → p-6828136c.entry.js} +1 -1
  335. package/dist/ionic/{p-1046866e.system.entry.js → p-6a131e4b.system.entry.js} +1 -1
  336. package/dist/ionic/{p-982315a6.entry.js → p-6b6ccc63.entry.js} +1 -1
  337. package/dist/ionic/{p-73dc4950.entry.js → p-6c29e51f.entry.js} +1 -1
  338. package/dist/ionic/{p-6b280620.entry.js → p-6d350e1f.entry.js} +1 -1
  339. package/dist/ionic/p-6d7a98cc.system.entry.js +4 -0
  340. package/dist/ionic/{p-e85d901b.system.entry.js → p-6d9fa95e.system.entry.js} +1 -1
  341. package/dist/ionic/{p-cac0e0b3.system.entry.js → p-6e1c1cf1.system.entry.js} +1 -1
  342. package/dist/ionic/{p-17474161.system.js → p-6f04bf2f.system.js} +1 -1
  343. package/dist/ionic/p-711fd7fc.js +4 -0
  344. package/dist/ionic/{p-5fce0c0b.system.entry.js → p-735f093b.system.entry.js} +1 -1
  345. package/dist/ionic/{p-15e76dd1.entry.js → p-75be4567.entry.js} +1 -1
  346. package/dist/ionic/p-779acec8.entry.js +4 -0
  347. package/dist/ionic/{p-a4565eb5.system.js → p-78067282.system.js} +1 -1
  348. package/dist/ionic/{p-d7aa6b00.entry.js → p-78841a31.entry.js} +1 -1
  349. package/dist/ionic/{p-508d024a.entry.js → p-7fa854a7.entry.js} +1 -1
  350. package/dist/ionic/{p-1e67b266.system.entry.js → p-81494564.system.entry.js} +1 -1
  351. package/dist/ionic/{p-424eb140.system.entry.js → p-84827719.system.entry.js} +1 -1
  352. package/dist/ionic/{p-797eeea8.system.entry.js → p-84a6d0da.system.entry.js} +1 -1
  353. package/dist/ionic/{p-cdc83025.entry.js → p-86bc3e6f.entry.js} +1 -1
  354. package/dist/ionic/{p-2fc0dafe.entry.js → p-876d7e0d.entry.js} +1 -1
  355. package/dist/ionic/{p-c29f8157.system.entry.js → p-89b075f4.system.entry.js} +1 -1
  356. package/dist/ionic/{p-0aa833fb.system.js → p-8b2d8ddb.system.js} +1 -1
  357. package/dist/ionic/{p-b79ba17c.entry.js → p-8c9954a1.entry.js} +1 -1
  358. package/dist/ionic/{p-322c5fb4.system.js → p-8ceead8f.system.js} +1 -1
  359. package/dist/ionic/p-8e8839c4.system.js +5 -0
  360. package/dist/ionic/{p-e6635685.js → p-938a029f.js} +1 -1
  361. package/dist/ionic/{p-2b9b78c7.entry.js → p-93bc2080.entry.js} +1 -1
  362. package/dist/ionic/{p-ddaa748a.system.entry.js → p-979f352d.system.entry.js} +1 -1
  363. package/dist/ionic/{p-33a8a71b.entry.js → p-99658fa2.entry.js} +1 -1
  364. package/dist/ionic/{p-7b9a2b23.entry.js → p-99c5a3a0.entry.js} +1 -1
  365. package/dist/ionic/{p-5823babc.system.entry.js → p-9c4f4367.system.entry.js} +1 -1
  366. package/dist/ionic/{p-ca065903.system.entry.js → p-a2e5c294.system.entry.js} +1 -1
  367. package/dist/ionic/{p-2799c6d3.system.entry.js → p-a3bea030.system.entry.js} +1 -1
  368. package/dist/ionic/{p-a49378bb.system.entry.js → p-a64f199d.system.entry.js} +1 -1
  369. package/dist/ionic/{p-0303d0f8.js → p-a772be95.js} +1 -1
  370. package/dist/ionic/{p-2abae1cc.system.entry.js → p-a8cf7e93.system.entry.js} +1 -1
  371. package/dist/ionic/{p-98231c01.system.entry.js → p-a915830c.system.entry.js} +1 -1
  372. package/dist/ionic/{p-985a7e17.system.entry.js → p-add1b61c.system.entry.js} +1 -1
  373. package/dist/ionic/{p-6d32975a.entry.js → p-ae2e0f50.entry.js} +1 -1
  374. package/dist/ionic/{p-1e010627.system.entry.js → p-afe932a1.system.entry.js} +1 -1
  375. package/dist/ionic/{p-62af944c.entry.js → p-b2ef1bb0.entry.js} +1 -1
  376. package/dist/ionic/{p-f1acf541.system.entry.js → p-b2f788b9.system.entry.js} +1 -1
  377. package/dist/ionic/{p-1fe02220.system.entry.js → p-b50c6cd6.system.entry.js} +1 -1
  378. package/dist/ionic/{p-b335ffed.system.entry.js → p-b52ddc18.system.entry.js} +1 -1
  379. package/dist/ionic/{p-c449820c.system.js → p-b6c8f5dc.system.js} +1 -1
  380. package/dist/ionic/{p-95775830.entry.js → p-b7027235.entry.js} +1 -1
  381. package/dist/ionic/{p-e7ed4a7f.system.js → p-bb750ac0.system.js} +1 -1
  382. package/dist/ionic/{p-63b0abde.system.entry.js → p-bf9210c7.system.entry.js} +1 -1
  383. package/dist/ionic/{p-7458862e.system.entry.js → p-c2496925.system.entry.js} +1 -1
  384. package/dist/ionic/{p-69666e8a.system.entry.js → p-c4dc27a0.system.entry.js} +1 -1
  385. package/dist/ionic/{p-c4b53b16.system.entry.js → p-c505bde7.system.entry.js} +1 -1
  386. package/dist/ionic/{p-bb0db172.entry.js → p-c60e41c7.entry.js} +1 -1
  387. package/dist/ionic/{p-bdad26e3.entry.js → p-cb37f97d.entry.js} +1 -1
  388. package/dist/ionic/{p-ebf042e0.system.entry.js → p-ce32a54b.system.entry.js} +1 -1
  389. package/dist/ionic/{p-a69b9fc5.system.js → p-cf110b0b.system.js} +1 -1
  390. package/dist/ionic/{p-626fd66d.system.entry.js → p-d09b25f9.system.entry.js} +1 -1
  391. package/dist/ionic/{p-9df2c6fb.entry.js → p-d18dc399.entry.js} +1 -1
  392. package/dist/ionic/{p-f9a53abb.system.js → p-d37524be.system.js} +1 -1
  393. package/dist/ionic/{p-9e33104d.entry.js → p-d737a7d9.entry.js} +1 -1
  394. package/dist/ionic/{p-2e46590d.system.entry.js → p-d83d0d32.system.entry.js} +1 -1
  395. package/dist/ionic/{p-081a4ce4.entry.js → p-d8d37758.entry.js} +1 -1
  396. package/dist/ionic/{p-567de071.system.entry.js → p-dcad1a3d.system.entry.js} +1 -1
  397. package/dist/ionic/{p-5b932840.entry.js → p-dddb317f.entry.js} +1 -1
  398. package/dist/ionic/{p-d743e981.js → p-de758235.js} +1 -1
  399. package/dist/ionic/{p-908d6080.entry.js → p-e11ef2b7.entry.js} +1 -1
  400. package/dist/ionic/{p-14be4015.entry.js → p-e3c8fb01.entry.js} +1 -1
  401. package/dist/ionic/{p-14e159ea.system.entry.js → p-e3f626ea.system.entry.js} +1 -1
  402. package/dist/ionic/{p-0574e87e.js → p-e46ba5cd.js} +1 -1
  403. package/dist/ionic/{p-52d7a191.entry.js → p-e4966716.entry.js} +1 -1
  404. package/dist/ionic/{p-5ab1b709.entry.js → p-e5c69948.entry.js} +1 -1
  405. package/dist/ionic/{p-4439fc2a.entry.js → p-e837530a.entry.js} +1 -1
  406. package/dist/ionic/p-e85e6e02.js +4 -0
  407. package/dist/ionic/{p-8b8be2fd.entry.js → p-e8784b73.entry.js} +1 -1
  408. package/dist/ionic/{p-12a722b8.system.entry.js → p-e896891b.system.entry.js} +1 -1
  409. package/dist/ionic/{p-d6841eac.js → p-e9bd3df9.js} +1 -1
  410. package/dist/ionic/{p-e563a35c.entry.js → p-ea2ee20f.entry.js} +1 -1
  411. package/dist/ionic/{p-efaffe74.entry.js → p-eb717568.entry.js} +1 -1
  412. package/dist/ionic/{p-da074ff7.entry.js → p-f2986b60.entry.js} +1 -1
  413. package/dist/ionic/{p-2507278c.system.entry.js → p-f8a8295c.system.entry.js} +1 -1
  414. package/dist/ionic/{p-19ec4f42.entry.js → p-fb7b7319.entry.js} +1 -1
  415. package/dist/types/stencil-public-runtime.d.ts +6 -0
  416. package/hydrate/index.d.ts +10 -4
  417. package/hydrate/index.js +1354 -742
  418. package/hydrate/index.mjs +1354 -742
  419. package/package.json +2 -2
  420. package/dist/esm-es5/app-globals-5dbb61a5.js +0 -4
  421. package/dist/esm-es5/index-28849c61.js +0 -5
  422. package/dist/ionic/p-16799667.system.entry.js +0 -4
  423. package/dist/ionic/p-16bfb979.system.entry.js +0 -4
  424. package/dist/ionic/p-21e5e7e4.js +0 -4
  425. package/dist/ionic/p-25180df3.system.js +0 -5
  426. package/dist/ionic/p-49a0e74c.entry.js +0 -4
  427. package/dist/ionic/p-69066a53.js +0 -4
  428. package/dist/ionic/p-9f3008d4.system.js +0 -4
  429. package/dist/ionic/p-b82d4cab.js +0 -4
  430. package/dist/ionic/p-d836d43e.js +0 -5
@@ -27,7 +27,7 @@ const NAMESPACE = 'ionic';
27
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 };
28
28
 
29
29
  /*
30
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
30
+ Stencil Client Platform v4.23.0-dev.1735628762.fb8335e | MIT Licensed | https://stenciljs.com
31
31
  */
32
32
  var __defProp = Object.defineProperty;
33
33
  var __export = (target, all) => {
@@ -41,8 +41,13 @@ var Build = {
41
41
  isTesting: false
42
42
  };
43
43
  var hostRefs = /* @__PURE__ */ new WeakMap();
44
+ var hostRefKeys = [];
44
45
  var getHostRef = (ref) => hostRefs.get(ref);
45
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
46
+ var registerInstance = (lazyInstance, hostRef) => {
47
+ hostRef.$lazyInstance$ = lazyInstance;
48
+ hostRefKeys.push(lazyInstance);
49
+ return hostRefs.set(lazyInstance, hostRef);
50
+ };
46
51
  var registerHost = (hostElement, cmpMeta) => {
47
52
  const hostRef = {
48
53
  $flags$: 0,
@@ -58,9 +63,29 @@ var registerHost = (hostElement, cmpMeta) => {
58
63
  hostElement["s-p"] = [];
59
64
  hostElement["s-rc"] = [];
60
65
  }
66
+ hostRefKeys.push(hostElement);
61
67
  return hostRefs.set(hostElement, hostRef);
62
68
  };
63
69
  var isMemberInElement = (elm, memberName) => memberName in elm;
70
+ function isNodeAttached(node) {
71
+ return node === document || node === document.documentElement || document.contains(node);
72
+ }
73
+ var hostRefCleanup = () => {
74
+ const keysToRemove = [];
75
+ for (const key of hostRefKeys) {
76
+ if (key instanceof Node && !isNodeAttached(key)) {
77
+ keysToRemove.push(key);
78
+ }
79
+ const elem = hostRefs.get(key);
80
+ if (elem && (elem.$hostElement$ && !isNodeAttached(elem.$hostElement$) || elem.$ancestorComponent$ && !isNodeAttached(elem.$ancestorComponent$))) {
81
+ keysToRemove.push(key);
82
+ }
83
+ }
84
+ for (const key of keysToRemove) {
85
+ hostRefs.delete(key);
86
+ hostRefKeys.splice(hostRefKeys.indexOf(key), 1);
87
+ }
88
+ };
64
89
  var consoleError = (e, el) => (0, console.error)(e, el);
65
90
 
66
91
  // src/client/client-load-module.ts
@@ -99,6 +124,7 @@ var CONTENT_REF_ID = "r";
99
124
  var ORG_LOCATION_ID = "o";
100
125
  var SLOT_NODE_ID = "s";
101
126
  var TEXT_NODE_ID = "t";
127
+ var COMMENT_NODE_ID = "c";
102
128
  var HYDRATE_ID = "s-id";
103
129
  var HYDRATED_STYLE_ID = "sty-id";
104
130
  var HYDRATE_CHILD_ID = "c-id";
@@ -256,20 +282,6 @@ var unwrapErr = (result) => {
256
282
  throw result.value;
257
283
  }
258
284
  };
259
- var createTime = (fnName, tagName = "") => {
260
- {
261
- return () => {
262
- return;
263
- };
264
- }
265
- };
266
- var uniqueTime = (key, measureText) => {
267
- {
268
- return () => {
269
- return;
270
- };
271
- }
272
- };
273
285
  var h = (nodeName, vnodeData, ...children) => {
274
286
  let child = null;
275
287
  let key = null;
@@ -381,436 +393,132 @@ var convertToPrivate = (node) => {
381
393
  vnode.$name$ = node.vname;
382
394
  return vnode;
383
395
  };
384
-
385
- // src/runtime/client-hydrate.ts
386
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
387
- const endHydrate = createTime("hydrateClient", tagName);
388
- const shadowRoot = hostElm.shadowRoot;
389
- const childRenderNodes = [];
390
- const slotNodes = [];
391
- const shadowRootNodes = shadowRoot ? [] : null;
392
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
393
- if (!plt.$orgLocNodes$) {
394
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
395
- }
396
- hostElm[HYDRATE_ID] = hostId;
397
- hostElm.removeAttribute(HYDRATE_ID);
398
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
399
- childRenderNodes.map((c) => {
400
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
401
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
402
- const node = c.$elm$;
403
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
404
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
405
- }
406
- if (!shadowRoot) {
407
- node["s-hn"] = tagName;
408
- if (orgLocationNode) {
409
- node["s-ol"] = orgLocationNode;
410
- node["s-ol"]["s-nr"] = node;
411
- }
412
- }
413
- plt.$orgLocNodes$.delete(orgLocationId);
414
- });
415
- if (shadowRoot) {
416
- shadowRootNodes.map((shadowRootNode) => {
417
- if (shadowRootNode) {
418
- shadowRoot.appendChild(shadowRootNode);
396
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
397
+ if (oldValue !== newValue) {
398
+ let isProp = isMemberInElement(elm, memberName);
399
+ let ln = memberName.toLowerCase();
400
+ if (memberName === "class") {
401
+ const classList = elm.classList;
402
+ const oldClasses = parseClassList(oldValue);
403
+ const newClasses = parseClassList(newValue);
404
+ if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
405
+ newClasses.push(elm["s-si"]);
419
406
  }
420
- });
421
- }
422
- endHydrate();
423
- };
424
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
425
- let childNodeType;
426
- let childIdSplt;
427
- let childVNode;
428
- let i2;
429
- if (node.nodeType === 1 /* ElementNode */) {
430
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
431
- if (childNodeType) {
432
- childIdSplt = childNodeType.split(".");
433
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
434
- childVNode = {
435
- $flags$: 0,
436
- $hostId$: childIdSplt[0],
437
- $nodeId$: childIdSplt[1],
438
- $depth$: childIdSplt[2],
439
- $index$: childIdSplt[3],
440
- $tag$: node.tagName.toLowerCase(),
441
- $elm$: node,
442
- $attrs$: null,
443
- $children$: null,
444
- $key$: null,
445
- $name$: null,
446
- $text$: null
447
- };
448
- childRenderNodes.push(childVNode);
449
- node.removeAttribute(HYDRATE_CHILD_ID);
450
- if (!parentVNode.$children$) {
451
- parentVNode.$children$ = [];
407
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
408
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
409
+ } else if (memberName === "style") {
410
+ {
411
+ for (const prop in oldValue) {
412
+ if (!newValue || newValue[prop] == null) {
413
+ if (prop.includes("-")) {
414
+ elm.style.removeProperty(prop);
415
+ } else {
416
+ elm.style[prop] = "";
417
+ }
418
+ }
452
419
  }
453
- parentVNode.$children$[childVNode.$index$] = childVNode;
454
- parentVNode = childVNode;
455
- if (shadowRootNodes && childVNode.$depth$ === "0") {
456
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
420
+ }
421
+ for (const prop in newValue) {
422
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
423
+ if (prop.includes("-")) {
424
+ elm.style.setProperty(prop, newValue[prop]);
425
+ } else {
426
+ elm.style[prop] = newValue[prop];
427
+ }
457
428
  }
458
429
  }
459
- }
460
- if (node.shadowRoot) {
461
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
462
- clientHydrate(
463
- parentVNode,
464
- childRenderNodes,
465
- slotNodes,
466
- shadowRootNodes,
467
- hostElm,
468
- node.shadowRoot.childNodes[i2],
469
- hostId
470
- );
430
+ } else if (memberName === "key") ; else if (memberName === "ref") {
431
+ if (newValue) {
432
+ newValue(elm);
471
433
  }
472
- }
473
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
474
- clientHydrate(
475
- parentVNode,
476
- childRenderNodes,
477
- slotNodes,
478
- shadowRootNodes,
479
- hostElm,
480
- node.childNodes[i2],
481
- hostId
482
- );
483
- }
484
- } else if (node.nodeType === 8 /* CommentNode */) {
485
- childIdSplt = node.nodeValue.split(".");
486
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
487
- childNodeType = childIdSplt[0];
488
- childVNode = {
489
- $flags$: 0,
490
- $hostId$: childIdSplt[1],
491
- $nodeId$: childIdSplt[2],
492
- $depth$: childIdSplt[3],
493
- $index$: childIdSplt[4],
494
- $elm$: node,
495
- $attrs$: null,
496
- $children$: null,
497
- $key$: null,
498
- $name$: null,
499
- $tag$: null,
500
- $text$: null
501
- };
502
- if (childNodeType === TEXT_NODE_ID) {
503
- childVNode.$elm$ = node.nextSibling;
504
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
505
- childVNode.$text$ = childVNode.$elm$.textContent;
506
- childRenderNodes.push(childVNode);
507
- node.remove();
508
- if (!parentVNode.$children$) {
509
- parentVNode.$children$ = [];
510
- }
511
- parentVNode.$children$[childVNode.$index$] = childVNode;
512
- if (shadowRootNodes && childVNode.$depth$ === "0") {
513
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
514
- }
434
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
435
+ if (memberName[2] === "-") {
436
+ memberName = memberName.slice(3);
437
+ } else if (isMemberInElement(win, ln)) {
438
+ memberName = ln.slice(2);
439
+ } else {
440
+ memberName = ln[2] + memberName.slice(3);
441
+ }
442
+ if (oldValue || newValue) {
443
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
444
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
445
+ if (oldValue) {
446
+ plt.rel(elm, memberName, oldValue, capture);
515
447
  }
516
- } else if (childVNode.$hostId$ === hostId) {
517
- if (childNodeType === SLOT_NODE_ID) {
518
- childVNode.$tag$ = "slot";
519
- if (childIdSplt[5]) {
520
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
521
- } else {
522
- node["s-sn"] = "";
523
- }
524
- node["s-sr"] = true;
525
- if (shadowRootNodes) {
526
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
527
- if (childVNode.$name$) {
528
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
529
- }
530
- node.parentNode.insertBefore(childVNode.$elm$, node);
531
- node.remove();
532
- if (childVNode.$depth$ === "0") {
533
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
448
+ if (newValue) {
449
+ plt.ael(elm, memberName, newValue, capture);
450
+ }
451
+ }
452
+ } else {
453
+ const isComplex = isComplexType(newValue);
454
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
455
+ try {
456
+ if (!elm.tagName.includes("-")) {
457
+ const n = newValue == null ? "" : newValue;
458
+ if (memberName === "list") {
459
+ isProp = false;
460
+ } else if (oldValue == null || elm[memberName] != n) {
461
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
462
+ elm[memberName] = n;
463
+ } else {
464
+ elm.setAttribute(memberName, n);
465
+ }
534
466
  }
467
+ } else {
468
+ elm[memberName] = newValue;
535
469
  }
536
- slotNodes.push(childVNode);
537
- if (!parentVNode.$children$) {
538
- parentVNode.$children$ = [];
539
- }
540
- parentVNode.$children$[childVNode.$index$] = childVNode;
541
- } else if (childNodeType === CONTENT_REF_ID) {
542
- if (shadowRootNodes) {
543
- node.remove();
470
+ } catch (e) {
471
+ }
472
+ }
473
+ let xlink = false;
474
+ {
475
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
476
+ memberName = ln;
477
+ xlink = true;
478
+ }
479
+ }
480
+ if (newValue == null || newValue === false) {
481
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
482
+ if (xlink) {
483
+ elm.removeAttributeNS(XLINK_NS, memberName);
544
484
  } else {
545
- hostElm["s-cr"] = node;
546
- node["s-cn"] = true;
485
+ elm.removeAttribute(memberName);
547
486
  }
548
487
  }
488
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
489
+ newValue = newValue === true ? "" : newValue;
490
+ if (xlink) {
491
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
492
+ } else {
493
+ elm.setAttribute(memberName, newValue);
494
+ }
549
495
  }
550
496
  }
551
- } else if (parentVNode && parentVNode.$tag$ === "style") {
552
- const vnode = newVNode(null, node.textContent);
553
- vnode.$elm$ = node;
554
- vnode.$index$ = "0";
555
- parentVNode.$children$ = [vnode];
556
497
  }
557
498
  };
558
- var initializeDocumentHydrate = (node, orgLocNodes) => {
559
- if (node.nodeType === 1 /* ElementNode */) {
560
- let i2 = 0;
561
- if (node.shadowRoot) {
562
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
563
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
564
- }
565
- }
566
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
567
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
568
- }
569
- } else if (node.nodeType === 8 /* CommentNode */) {
570
- const childIdSplt = node.nodeValue.split(".");
571
- if (childIdSplt[0] === ORG_LOCATION_ID) {
572
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
573
- node.nodeValue = "";
574
- node["s-en"] = childIdSplt[3];
575
- }
499
+ var parseClassListRegex = /\s/;
500
+ var parseClassList = (value) => {
501
+ if (typeof value === "object" && "baseVal" in value) {
502
+ value = value.baseVal;
503
+ }
504
+ if (!value) {
505
+ return [];
576
506
  }
507
+ return value.split(parseClassListRegex);
577
508
  };
509
+ var CAPTURE_EVENT_SUFFIX = "Capture";
510
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
578
511
 
579
- // src/runtime/mode.ts
580
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
581
- var setMode = (handler) => modeResolutionChain.push(handler);
582
- var getMode = (ref) => getHostRef(ref).$modeName$;
583
- var parsePropertyValue = (propValue, propType) => {
584
- if (propValue != null && !isComplexType(propValue)) {
585
- if (propType & 4 /* Boolean */) {
586
- return propValue === "false" ? false : propValue === "" || !!propValue;
587
- }
588
- if (propType & 2 /* Number */) {
589
- return parseFloat(propValue);
590
- }
591
- if (propType & 1 /* String */) {
592
- return String(propValue);
593
- }
594
- return propValue;
595
- }
596
- return propValue;
597
- };
598
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
599
-
600
- // src/runtime/event-emitter.ts
601
- var createEvent = (ref, name, flags) => {
602
- const elm = getElement(ref);
603
- return {
604
- emit: (detail) => {
605
- return emitEvent(elm, name, {
606
- bubbles: !!(flags & 4 /* Bubbles */),
607
- composed: !!(flags & 2 /* Composed */),
608
- cancelable: !!(flags & 1 /* Cancellable */),
609
- detail
610
- });
611
- }
612
- };
613
- };
614
- var emitEvent = (elm, name, opts) => {
615
- const ev = plt.ce(name, opts);
616
- elm.dispatchEvent(ev);
617
- return ev;
618
- };
619
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
620
- var registerStyle = (scopeId2, cssText, allowCS) => {
621
- let style = styles.get(scopeId2);
622
- if (supportsConstructableStylesheets && allowCS) {
623
- style = style || new CSSStyleSheet();
624
- if (typeof style === "string") {
625
- style = cssText;
626
- } else {
627
- style.replaceSync(cssText);
628
- }
629
- } else {
630
- style = cssText;
631
- }
632
- styles.set(scopeId2, style);
633
- };
634
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
635
- var _a;
636
- const scopeId2 = getScopeId(cmpMeta, mode);
637
- const style = styles.get(scopeId2);
638
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
639
- if (style) {
640
- if (typeof style === "string") {
641
- styleContainerNode = styleContainerNode.head || styleContainerNode;
642
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
643
- let styleElm;
644
- if (!appliedStyles) {
645
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
646
- }
647
- if (!appliedStyles.has(scopeId2)) {
648
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
649
- styleElm.innerHTML = style;
650
- } else {
651
- styleElm = doc.createElement("style");
652
- styleElm.innerHTML = style;
653
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
654
- if (nonce != null) {
655
- styleElm.setAttribute("nonce", nonce);
656
- }
657
- const injectStyle = (
658
- /**
659
- * we render a scoped component
660
- */
661
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
662
- * we are using shadow dom and render the style tag within the shadowRoot
663
- */
664
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
665
- );
666
- if (injectStyle) {
667
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
668
- }
669
- }
670
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
671
- styleElm.innerHTML += SLOT_FB_CSS;
672
- }
673
- if (appliedStyles) {
674
- appliedStyles.add(scopeId2);
675
- }
676
- }
677
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
678
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
679
- }
680
- }
681
- return scopeId2;
682
- };
683
- var attachStyles = (hostRef) => {
684
- const cmpMeta = hostRef.$cmpMeta$;
685
- const elm = hostRef.$hostElement$;
686
- const flags = cmpMeta.$flags$;
687
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
688
- const scopeId2 = addStyle(
689
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
690
- cmpMeta,
691
- hostRef.$modeName$
692
- );
693
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
694
- elm["s-sc"] = scopeId2;
695
- elm.classList.add(scopeId2 + "-h");
696
- if (flags & 2 /* scopedCssEncapsulation */) {
697
- elm.classList.add(scopeId2 + "-s");
698
- }
699
- }
700
- endAttachStyles();
701
- };
702
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
703
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
704
- if (oldValue !== newValue) {
705
- let isProp = isMemberInElement(elm, memberName);
706
- let ln = memberName.toLowerCase();
707
- if (memberName === "class") {
708
- const classList = elm.classList;
709
- const oldClasses = parseClassList(oldValue);
710
- const newClasses = parseClassList(newValue);
711
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
712
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
713
- } else if (memberName === "style") {
714
- {
715
- for (const prop in oldValue) {
716
- if (!newValue || newValue[prop] == null) {
717
- if (prop.includes("-")) {
718
- elm.style.removeProperty(prop);
719
- } else {
720
- elm.style[prop] = "";
721
- }
722
- }
723
- }
724
- }
725
- for (const prop in newValue) {
726
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
727
- if (prop.includes("-")) {
728
- elm.style.setProperty(prop, newValue[prop]);
729
- } else {
730
- elm.style[prop] = newValue[prop];
731
- }
732
- }
733
- }
734
- } else if (memberName === "key") ; else if (memberName === "ref") {
735
- if (newValue) {
736
- newValue(elm);
737
- }
738
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
739
- if (memberName[2] === "-") {
740
- memberName = memberName.slice(3);
741
- } else if (isMemberInElement(win, ln)) {
742
- memberName = ln.slice(2);
743
- } else {
744
- memberName = ln[2] + memberName.slice(3);
745
- }
746
- if (oldValue || newValue) {
747
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
748
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
749
- if (oldValue) {
750
- plt.rel(elm, memberName, oldValue, capture);
751
- }
752
- if (newValue) {
753
- plt.ael(elm, memberName, newValue, capture);
754
- }
755
- }
756
- } else {
757
- const isComplex = isComplexType(newValue);
758
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
759
- try {
760
- if (!elm.tagName.includes("-")) {
761
- const n = newValue == null ? "" : newValue;
762
- if (memberName === "list") {
763
- isProp = false;
764
- } else if (oldValue == null || elm[memberName] != n) {
765
- elm[memberName] = n;
766
- }
767
- } else {
768
- elm[memberName] = newValue;
769
- }
770
- } catch (e) {
771
- }
772
- }
773
- let xlink = false;
774
- {
775
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
776
- memberName = ln;
777
- xlink = true;
778
- }
779
- }
780
- if (newValue == null || newValue === false) {
781
- if (newValue !== false || elm.getAttribute(memberName) === "") {
782
- if (xlink) {
783
- elm.removeAttributeNS(XLINK_NS, memberName);
784
- } else {
785
- elm.removeAttribute(memberName);
786
- }
787
- }
788
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
789
- newValue = newValue === true ? "" : newValue;
790
- if (xlink) {
791
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
792
- } else {
793
- elm.setAttribute(memberName, newValue);
794
- }
795
- }
796
- }
797
- }
798
- };
799
- var parseClassListRegex = /\s/;
800
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
801
- var CAPTURE_EVENT_SUFFIX = "Capture";
802
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
803
-
804
- // src/runtime/vdom/update-element.ts
805
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
806
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
807
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
808
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
809
- {
810
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
811
- if (!(memberName in newVnodeAttrs)) {
812
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
813
- }
512
+ // src/runtime/vdom/update-element.ts
513
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
514
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
515
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
516
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
517
+ {
518
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
519
+ if (!(memberName in newVnodeAttrs)) {
520
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
521
+ }
814
522
  }
815
523
  }
816
524
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
@@ -923,8 +631,12 @@ var relocateToHostRoot = (parentElm) => {
923
631
  plt.$flags$ |= 1 /* isTmpDisconnected */;
924
632
  const host = parentElm.closest(hostTagName.toLowerCase());
925
633
  if (host != null) {
926
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
927
- const childNodeArray = Array.from(parentElm.childNodes);
634
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
635
+ (ref) => ref["s-cr"]
636
+ );
637
+ const childNodeArray = Array.from(
638
+ parentElm.__childNodes || parentElm.childNodes
639
+ );
928
640
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
929
641
  if (childNode["s-sh"] != null) {
930
642
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -937,7 +649,7 @@ var relocateToHostRoot = (parentElm) => {
937
649
  };
938
650
  var putBackInOriginalLocation = (parentElm, recursive) => {
939
651
  plt.$flags$ |= 1 /* isTmpDisconnected */;
940
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
652
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
941
653
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
942
654
  let node = parentElm;
943
655
  while (node = node.nextSibling) {
@@ -1156,7 +868,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1156
868
  }
1157
869
  };
1158
870
  var updateFallbackSlotVisibility = (elm) => {
1159
- const childNodes = elm.childNodes;
871
+ const childNodes = elm.__childNodes || elm.childNodes;
1160
872
  for (const childNode of childNodes) {
1161
873
  if (childNode.nodeType === 1 /* ElementNode */) {
1162
874
  if (childNode["s-sr"]) {
@@ -1169,7 +881,7 @@ var updateFallbackSlotVisibility = (elm) => {
1169
881
  childNode.hidden = true;
1170
882
  break;
1171
883
  }
1172
- } else {
884
+ } else if (slotName === siblingNode["s-sn"]) {
1173
885
  if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1174
886
  childNode.hidden = true;
1175
887
  break;
@@ -1187,9 +899,10 @@ var markSlotContentForRelocation = (elm) => {
1187
899
  let node;
1188
900
  let hostContentNodes;
1189
901
  let j;
1190
- for (const childNode of elm.childNodes) {
902
+ const children = elm.__childNodes || elm.childNodes;
903
+ for (const childNode of children) {
1191
904
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1192
- hostContentNodes = node.parentNode.childNodes;
905
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1193
906
  const slotName = childNode["s-sn"];
1194
907
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1195
908
  node = hostContentNodes[j];
@@ -1276,9 +989,9 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1276
989
  if (element && parent && element.nodeType === 1 /* ElementNode */) {
1277
990
  const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1278
991
  if (scopeIds.size) {
1279
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
992
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1280
993
  if (element["s-ol"] || iterateChildNodes) {
1281
- for (const childNode of Array.from(element.childNodes)) {
994
+ for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1282
995
  updateElementScopeIds(childNode, element, true);
1283
996
  }
1284
997
  }
@@ -1367,29 +1080,906 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1367
1080
  if (isInitialLoad) {
1368
1081
  nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1369
1082
  }
1370
- nodeToRelocate.hidden = true;
1083
+ nodeToRelocate.hidden = true;
1084
+ }
1085
+ }
1086
+ }
1087
+ }
1088
+ if (checkSlotFallbackVisibility) {
1089
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1090
+ }
1091
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1092
+ relocateNodes.length = 0;
1093
+ }
1094
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1095
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1096
+ for (const childNode of children) {
1097
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1098
+ if (isInitialLoad && childNode["s-ih"] == null) {
1099
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1100
+ }
1101
+ childNode.hidden = true;
1102
+ }
1103
+ }
1104
+ }
1105
+ contentRef = void 0;
1106
+ };
1107
+
1108
+ // src/runtime/dom-extras.ts
1109
+ var patchPseudoShadowDom = (hostElementPrototype) => {
1110
+ patchCloneNode(hostElementPrototype);
1111
+ patchSlotAppendChild(hostElementPrototype);
1112
+ patchSlotAppend(hostElementPrototype);
1113
+ patchSlotPrepend(hostElementPrototype);
1114
+ patchSlotInsertAdjacentElement(hostElementPrototype);
1115
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
1116
+ patchSlotInsertAdjacentText(hostElementPrototype);
1117
+ patchTextContent(hostElementPrototype);
1118
+ patchChildSlotNodes(hostElementPrototype);
1119
+ patchSlotRemoveChild(hostElementPrototype);
1120
+ };
1121
+ var patchCloneNode = (HostElementPrototype) => {
1122
+ const orgCloneNode = HostElementPrototype.cloneNode;
1123
+ HostElementPrototype.cloneNode = function(deep) {
1124
+ const srcNode = this;
1125
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1126
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1127
+ if (!isShadowDom && deep) {
1128
+ let i2 = 0;
1129
+ let slotted, nonStencilNode;
1130
+ const stencilPrivates = [
1131
+ "s-id",
1132
+ "s-cr",
1133
+ "s-lr",
1134
+ "s-rc",
1135
+ "s-sc",
1136
+ "s-p",
1137
+ "s-cn",
1138
+ "s-sr",
1139
+ "s-sn",
1140
+ "s-hn",
1141
+ "s-ol",
1142
+ "s-nr",
1143
+ "s-si",
1144
+ "s-rf",
1145
+ "s-scs"
1146
+ ];
1147
+ const childNodes = this.__childNodes || this.childNodes;
1148
+ for (; i2 < childNodes.length; i2++) {
1149
+ slotted = childNodes[i2]["s-nr"];
1150
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1151
+ if (slotted) {
1152
+ if (clonedNode.__appendChild) {
1153
+ clonedNode.__appendChild(slotted.cloneNode(true));
1154
+ } else {
1155
+ clonedNode.appendChild(slotted.cloneNode(true));
1156
+ }
1157
+ }
1158
+ if (nonStencilNode) {
1159
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
1160
+ }
1161
+ }
1162
+ }
1163
+ return clonedNode;
1164
+ };
1165
+ };
1166
+ var patchSlotAppendChild = (HostElementPrototype) => {
1167
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1168
+ HostElementPrototype.appendChild = function(newChild) {
1169
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1170
+ const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
1171
+ if (slotNode) {
1172
+ addSlotRelocateNode(newChild, slotNode);
1173
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1174
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1175
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1176
+ updateFallbackSlotVisibility(this);
1177
+ return insertedNode;
1178
+ }
1179
+ return this.__appendChild(newChild);
1180
+ };
1181
+ };
1182
+ var patchSlotRemoveChild = (ElementPrototype) => {
1183
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
1184
+ ElementPrototype.removeChild = function(toRemove) {
1185
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1186
+ const childNodes = this.__childNodes || this.childNodes;
1187
+ const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
1188
+ if (slotNode && toRemove.isConnected) {
1189
+ toRemove.remove();
1190
+ updateFallbackSlotVisibility(this);
1191
+ return;
1192
+ }
1193
+ }
1194
+ return this.__removeChild(toRemove);
1195
+ };
1196
+ };
1197
+ var patchSlotPrepend = (HostElementPrototype) => {
1198
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
1199
+ HostElementPrototype.prepend = function(...newChildren) {
1200
+ newChildren.forEach((newChild) => {
1201
+ if (typeof newChild === "string") {
1202
+ newChild = this.ownerDocument.createTextNode(newChild);
1203
+ }
1204
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1205
+ const childNodes = this.__childNodes || this.childNodes;
1206
+ const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
1207
+ if (slotNode) {
1208
+ addSlotRelocateNode(newChild, slotNode, true);
1209
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1210
+ const appendAfter = slotChildNodes[0];
1211
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1212
+ }
1213
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1214
+ newChild.hidden = true;
1215
+ }
1216
+ return HostElementPrototype.__prepend(newChild);
1217
+ });
1218
+ };
1219
+ };
1220
+ var patchSlotAppend = (HostElementPrototype) => {
1221
+ HostElementPrototype.__append = HostElementPrototype.append;
1222
+ HostElementPrototype.append = function(...newChildren) {
1223
+ newChildren.forEach((newChild) => {
1224
+ if (typeof newChild === "string") {
1225
+ newChild = this.ownerDocument.createTextNode(newChild);
1226
+ }
1227
+ this.appendChild(newChild);
1228
+ });
1229
+ };
1230
+ };
1231
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1232
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1233
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
1234
+ if (position !== "afterbegin" && position !== "beforeend") {
1235
+ return originalInsertAdjacentHtml.call(this, position, text);
1236
+ }
1237
+ const container = this.ownerDocument.createElement("_");
1238
+ let node;
1239
+ container.innerHTML = text;
1240
+ if (position === "afterbegin") {
1241
+ while (node = container.firstChild) {
1242
+ this.prepend(node);
1243
+ }
1244
+ } else if (position === "beforeend") {
1245
+ while (node = container.firstChild) {
1246
+ this.append(node);
1247
+ }
1248
+ }
1249
+ };
1250
+ };
1251
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1252
+ HostElementPrototype.insertAdjacentText = function(position, text) {
1253
+ this.insertAdjacentHTML(position, text);
1254
+ };
1255
+ };
1256
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1257
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1258
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
1259
+ if (position !== "afterbegin" && position !== "beforeend") {
1260
+ return originalInsertAdjacentElement.call(this, position, element);
1261
+ }
1262
+ if (position === "afterbegin") {
1263
+ this.prepend(element);
1264
+ return element;
1265
+ } else if (position === "beforeend") {
1266
+ this.append(element);
1267
+ return element;
1268
+ }
1269
+ return element;
1270
+ };
1271
+ };
1272
+ var patchTextContent = (hostElementPrototype) => {
1273
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1274
+ Object.defineProperty(hostElementPrototype, "textContent", {
1275
+ get: function() {
1276
+ let text = "";
1277
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1278
+ childNodes.forEach((node) => text += node.textContent || "");
1279
+ return text;
1280
+ },
1281
+ set: function(value) {
1282
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1283
+ childNodes.forEach((node) => {
1284
+ if (node["s-ol"]) node["s-ol"].remove();
1285
+ node.remove();
1286
+ });
1287
+ this.insertAdjacentHTML("beforeend", value);
1288
+ }
1289
+ });
1290
+ };
1291
+ var patchChildSlotNodes = (elm) => {
1292
+ class FakeNodeList extends Array {
1293
+ item(n) {
1294
+ return this[n];
1295
+ }
1296
+ }
1297
+ patchHostOriginalAccessor("children", elm);
1298
+ Object.defineProperty(elm, "children", {
1299
+ get() {
1300
+ return this.childNodes.filter((n) => n.nodeType === 1);
1301
+ }
1302
+ });
1303
+ Object.defineProperty(elm, "childElementCount", {
1304
+ get() {
1305
+ return this.children.length;
1306
+ }
1307
+ });
1308
+ patchHostOriginalAccessor("firstChild", elm);
1309
+ Object.defineProperty(elm, "firstChild", {
1310
+ get() {
1311
+ return this.childNodes[0];
1312
+ }
1313
+ });
1314
+ patchHostOriginalAccessor("lastChild", elm);
1315
+ Object.defineProperty(elm, "lastChild", {
1316
+ get() {
1317
+ return this.childNodes[this.childNodes.length - 1];
1318
+ }
1319
+ });
1320
+ patchHostOriginalAccessor("childNodes", elm);
1321
+ Object.defineProperty(elm, "childNodes", {
1322
+ get() {
1323
+ var _a, _b;
1324
+ if (!plt.$flags$ || !((_a = getHostRef(this)) == null ? void 0 : _a.$flags$) || (plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && ((_b = getHostRef(this)) == null ? void 0 : _b.$flags$) & 2 /* hasRendered */) {
1325
+ const result = new FakeNodeList();
1326
+ const nodes = getSlottedChildNodes(this.__childNodes);
1327
+ result.push(...nodes);
1328
+ return result;
1329
+ }
1330
+ return FakeNodeList.from(this.__childNodes);
1331
+ }
1332
+ });
1333
+ };
1334
+ var patchNextPrev = (node) => {
1335
+ if (!node || node.__nextSibling || !globalThis.Node) return;
1336
+ patchNextSibling(node);
1337
+ patchPreviousSibling(node);
1338
+ if (node.nodeType === Node.ELEMENT_NODE) {
1339
+ patchNextElementSibling(node);
1340
+ patchPreviousElementSibling(node);
1341
+ }
1342
+ };
1343
+ var patchNextSibling = (node) => {
1344
+ if (!node || node.__nextSibling) return;
1345
+ patchHostOriginalAccessor("nextSibling", node);
1346
+ Object.defineProperty(node, "nextSibling", {
1347
+ get: function() {
1348
+ var _a;
1349
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1350
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1351
+ if (parentNodes && index > -1) {
1352
+ return parentNodes[index + 1];
1353
+ }
1354
+ return this.__nextSibling;
1355
+ }
1356
+ });
1357
+ };
1358
+ var patchNextElementSibling = (element) => {
1359
+ if (!element || element.__nextElementSibling) return;
1360
+ patchHostOriginalAccessor("nextElementSibling", element);
1361
+ Object.defineProperty(element, "nextElementSibling", {
1362
+ get: function() {
1363
+ var _a;
1364
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1365
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1366
+ if (parentEles && index > -1) {
1367
+ return parentEles[index + 1];
1368
+ }
1369
+ return this.__nextElementSibling;
1370
+ }
1371
+ });
1372
+ };
1373
+ var patchPreviousSibling = (node) => {
1374
+ if (!node || node.__previousSibling) return;
1375
+ patchHostOriginalAccessor("previousSibling", node);
1376
+ Object.defineProperty(node, "previousSibling", {
1377
+ get: function() {
1378
+ var _a;
1379
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1380
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1381
+ if (parentNodes && index > -1) {
1382
+ return parentNodes[index - 1];
1383
+ }
1384
+ return this.__previousSibling;
1385
+ }
1386
+ });
1387
+ };
1388
+ var patchPreviousElementSibling = (element) => {
1389
+ if (!element || element.__previousElementSibling) return;
1390
+ patchHostOriginalAccessor("previousElementSibling", element);
1391
+ Object.defineProperty(element, "previousElementSibling", {
1392
+ get: function() {
1393
+ var _a;
1394
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1395
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1396
+ if (parentNodes && index > -1) {
1397
+ return parentNodes[index - 1];
1398
+ }
1399
+ return this.__previousElementSibling;
1400
+ }
1401
+ });
1402
+ };
1403
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1404
+ var validNodesPatches = [
1405
+ "childNodes",
1406
+ "firstChild",
1407
+ "lastChild",
1408
+ "nextSibling",
1409
+ "previousSibling",
1410
+ "textContent"
1411
+ ];
1412
+ function patchHostOriginalAccessor(accessorName, node) {
1413
+ let accessor;
1414
+ if (validElementPatches.includes(accessorName)) {
1415
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1416
+ } else if (validNodesPatches.includes(accessorName)) {
1417
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1418
+ }
1419
+ if (!accessor) {
1420
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1421
+ }
1422
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1423
+ }
1424
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1425
+ let slottedNodeLocation;
1426
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1427
+ slottedNodeLocation = newChild["s-ol"];
1428
+ } else {
1429
+ slottedNodeLocation = document.createTextNode("");
1430
+ slottedNodeLocation["s-nr"] = newChild;
1431
+ }
1432
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1433
+ const parent = slotNode["s-cr"].parentNode;
1434
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1435
+ if (typeof position !== "undefined") {
1436
+ {
1437
+ slottedNodeLocation["s-oo"] = position;
1438
+ const childNodes = parent.__childNodes || parent.childNodes;
1439
+ const slotRelocateNodes = [slottedNodeLocation];
1440
+ childNodes.forEach((n) => {
1441
+ if (n["s-nr"]) slotRelocateNodes.push(n);
1442
+ });
1443
+ slotRelocateNodes.sort((a, b) => {
1444
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1445
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1446
+ return 0;
1447
+ });
1448
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1449
+ }
1450
+ } else {
1451
+ appendMethod.call(parent, slottedNodeLocation);
1452
+ }
1453
+ newChild["s-ol"] = slottedNodeLocation;
1454
+ newChild["s-sh"] = slotNode["s-hn"];
1455
+ };
1456
+ var getSlottedChildNodes = (childNodes) => {
1457
+ const result = [];
1458
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
1459
+ const slottedNode = childNodes[i2]["s-nr"];
1460
+ if (slottedNode && slottedNode.isConnected) {
1461
+ result.push(slottedNode);
1462
+ }
1463
+ }
1464
+ return result;
1465
+ };
1466
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
1467
+ var getHostSlotNode = (childNodes, slotName, hostName) => {
1468
+ let i2 = 0;
1469
+ let childNode;
1470
+ for (; i2 < childNodes.length; i2++) {
1471
+ childNode = childNodes[i2];
1472
+ if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
1473
+ return childNode;
1474
+ }
1475
+ childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
1476
+ if (childNode) {
1477
+ return childNode;
1478
+ }
1479
+ }
1480
+ return null;
1481
+ };
1482
+ var getHostSlotChildNodes = (n, slotName) => {
1483
+ const childNodes = [n];
1484
+ while ((n = n.nextSibling) && n["s-sn"] === slotName) {
1485
+ childNodes.push(n);
1486
+ }
1487
+ return childNodes;
1488
+ };
1489
+ var createTime = (fnName, tagName = "") => {
1490
+ {
1491
+ return () => {
1492
+ return;
1493
+ };
1494
+ }
1495
+ };
1496
+ var uniqueTime = (key, measureText) => {
1497
+ {
1498
+ return () => {
1499
+ return;
1500
+ };
1501
+ }
1502
+ };
1503
+
1504
+ // src/runtime/client-hydrate.ts
1505
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1506
+ const endHydrate = createTime("hydrateClient", tagName);
1507
+ const shadowRoot = hostElm.shadowRoot;
1508
+ const childRenderNodes = [];
1509
+ const slotNodes = [];
1510
+ const slottedNodes = [];
1511
+ const shadowRootNodes = shadowRoot ? [] : null;
1512
+ const vnode = newVNode(tagName, null);
1513
+ vnode.$elm$ = hostElm;
1514
+ if (!plt.$orgLocNodes$) {
1515
+ initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1516
+ }
1517
+ hostElm[HYDRATE_ID] = hostId;
1518
+ hostElm.removeAttribute(HYDRATE_ID);
1519
+ hostRef.$vnode$ = clientHydrate(
1520
+ vnode,
1521
+ childRenderNodes,
1522
+ slotNodes,
1523
+ shadowRootNodes,
1524
+ hostElm,
1525
+ hostElm,
1526
+ hostId,
1527
+ slottedNodes
1528
+ );
1529
+ let crIndex = 0;
1530
+ const crLength = childRenderNodes.length;
1531
+ let childRenderNode;
1532
+ for (crIndex; crIndex < crLength; crIndex++) {
1533
+ childRenderNode = childRenderNodes[crIndex];
1534
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1535
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1536
+ const node = childRenderNode.$elm$;
1537
+ if (!shadowRoot) {
1538
+ node["s-hn"] = tagName.toUpperCase();
1539
+ if (childRenderNode.$tag$ === "slot") {
1540
+ node["s-cr"] = hostElm["s-cr"];
1541
+ }
1542
+ }
1543
+ if (orgLocationNode && orgLocationNode.isConnected) {
1544
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1545
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1546
+ }
1547
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1548
+ if (!shadowRoot) {
1549
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1550
+ }
1551
+ }
1552
+ plt.$orgLocNodes$.delete(orgLocationId);
1553
+ }
1554
+ const hosts = [];
1555
+ let snIndex = 0;
1556
+ const snLen = slottedNodes.length;
1557
+ let slotGroup;
1558
+ let snGroupIdx;
1559
+ let snGroupLen;
1560
+ let slottedItem;
1561
+ for (snIndex; snIndex < snLen; snIndex++) {
1562
+ slotGroup = slottedNodes[snIndex];
1563
+ if (!slotGroup || !slotGroup.length) continue;
1564
+ snGroupLen = slotGroup.length;
1565
+ snGroupIdx = 0;
1566
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1567
+ slottedItem = slotGroup[snGroupIdx];
1568
+ if (!hosts[slottedItem.hostId]) {
1569
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1570
+ }
1571
+ if (!hosts[slottedItem.hostId]) continue;
1572
+ const hostEle = hosts[slottedItem.hostId];
1573
+ if (!hostEle.shadowRoot || !shadowRoot) {
1574
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1575
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1576
+ slottedItem.slot["s-cr"] = hostEle;
1577
+ } else {
1578
+ const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1579
+ slottedItem.slot["s-cr"] = hostChildren[0];
1580
+ }
1581
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1582
+ {
1583
+ patchNextPrev(slottedItem.node);
1584
+ }
1585
+ }
1586
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1587
+ hostEle.appendChild(slottedItem.node);
1588
+ }
1589
+ }
1590
+ }
1591
+ if (shadowRoot) {
1592
+ let rnIdex = 0;
1593
+ const rnLen = shadowRootNodes.length;
1594
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1595
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1596
+ }
1597
+ Array.from(hostElm.childNodes).forEach((node) => {
1598
+ if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1599
+ node.parentNode.removeChild(node);
1600
+ }
1601
+ });
1602
+ }
1603
+ hostRef.$hostElement$ = hostElm;
1604
+ endHydrate();
1605
+ };
1606
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1607
+ let childNodeType;
1608
+ let childIdSplt;
1609
+ let childVNode;
1610
+ let i2;
1611
+ const scopeId2 = hostElm["s-sc"];
1612
+ if (node.nodeType === 1 /* ElementNode */) {
1613
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1614
+ if (childNodeType) {
1615
+ childIdSplt = childNodeType.split(".");
1616
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1617
+ childVNode = createSimpleVNode({
1618
+ $flags$: 0,
1619
+ $hostId$: childIdSplt[0],
1620
+ $nodeId$: childIdSplt[1],
1621
+ $depth$: childIdSplt[2],
1622
+ $index$: childIdSplt[3],
1623
+ $tag$: node.tagName.toLowerCase(),
1624
+ $elm$: node,
1625
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1626
+ // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1627
+ $attrs$: { class: node.className }
1628
+ });
1629
+ childRenderNodes.push(childVNode);
1630
+ node.removeAttribute(HYDRATE_CHILD_ID);
1631
+ if (!parentVNode.$children$) {
1632
+ parentVNode.$children$ = [];
1633
+ }
1634
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1635
+ if (typeof slotName === "string") {
1636
+ if (childVNode.$tag$ === "slot-fb") {
1637
+ addSlot(
1638
+ slotName,
1639
+ childIdSplt[2],
1640
+ childVNode,
1641
+ node,
1642
+ parentVNode,
1643
+ childRenderNodes,
1644
+ slotNodes,
1645
+ shadowRootNodes,
1646
+ slottedNodes
1647
+ );
1648
+ }
1649
+ childVNode.$elm$["s-sn"] = slotName;
1650
+ childVNode.$elm$.removeAttribute("s-sn");
1651
+ }
1652
+ if (childVNode.$index$ !== void 0) {
1653
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1654
+ }
1655
+ if (scopeId2) node["s-si"] = scopeId2;
1656
+ parentVNode = childVNode;
1657
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1658
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1659
+ }
1660
+ }
1661
+ }
1662
+ if (node.shadowRoot) {
1663
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1664
+ clientHydrate(
1665
+ parentVNode,
1666
+ childRenderNodes,
1667
+ slotNodes,
1668
+ shadowRootNodes,
1669
+ hostElm,
1670
+ node.shadowRoot.childNodes[i2],
1671
+ hostId,
1672
+ slottedNodes
1673
+ );
1674
+ }
1675
+ }
1676
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1677
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1678
+ clientHydrate(
1679
+ parentVNode,
1680
+ childRenderNodes,
1681
+ slotNodes,
1682
+ shadowRootNodes,
1683
+ hostElm,
1684
+ nonShadowNodes[i2],
1685
+ hostId,
1686
+ slottedNodes
1687
+ );
1688
+ }
1689
+ } else if (node.nodeType === 8 /* CommentNode */) {
1690
+ childIdSplt = node.nodeValue.split(".");
1691
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1692
+ childNodeType = childIdSplt[0];
1693
+ childVNode = createSimpleVNode({
1694
+ $hostId$: childIdSplt[1],
1695
+ $nodeId$: childIdSplt[2],
1696
+ $depth$: childIdSplt[3],
1697
+ $index$: childIdSplt[4] || "0",
1698
+ $elm$: node,
1699
+ $attrs$: null,
1700
+ $children$: null,
1701
+ $key$: null,
1702
+ $name$: null,
1703
+ $tag$: null,
1704
+ $text$: null
1705
+ });
1706
+ if (childNodeType === TEXT_NODE_ID) {
1707
+ childVNode.$elm$ = node.nextSibling;
1708
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1709
+ childVNode.$text$ = childVNode.$elm$.textContent;
1710
+ childRenderNodes.push(childVNode);
1711
+ node.remove();
1712
+ if (hostId === childVNode.$hostId$) {
1713
+ if (!parentVNode.$children$) {
1714
+ parentVNode.$children$ = [];
1715
+ }
1716
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1717
+ }
1718
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1719
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1720
+ }
1721
+ }
1722
+ } else if (childNodeType === COMMENT_NODE_ID) {
1723
+ childVNode.$elm$ = node.nextSibling;
1724
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1725
+ childRenderNodes.push(childVNode);
1726
+ node.remove();
1727
+ }
1728
+ } else if (childVNode.$hostId$ === hostId) {
1729
+ if (childNodeType === SLOT_NODE_ID) {
1730
+ childVNode.$tag$ = "slot";
1731
+ const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1732
+ addSlot(
1733
+ slotName,
1734
+ childIdSplt[2],
1735
+ childVNode,
1736
+ node,
1737
+ parentVNode,
1738
+ childRenderNodes,
1739
+ slotNodes,
1740
+ shadowRootNodes,
1741
+ slottedNodes
1742
+ );
1743
+ } else if (childNodeType === CONTENT_REF_ID) {
1744
+ if (shadowRootNodes) {
1745
+ node.remove();
1746
+ } else {
1747
+ hostElm["s-cr"] = node;
1748
+ node["s-cn"] = true;
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1753
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1754
+ const vnode = newVNode(null, node.textContent);
1755
+ vnode.$elm$ = node;
1756
+ vnode.$index$ = "0";
1757
+ parentVNode.$children$ = [vnode];
1758
+ }
1759
+ return parentVNode;
1760
+ };
1761
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1762
+ if (node.nodeType === 1 /* ElementNode */) {
1763
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1764
+ if (componentId) {
1765
+ orgLocNodes.set(componentId, node);
1766
+ }
1767
+ let i2 = 0;
1768
+ if (node.shadowRoot) {
1769
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1770
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1771
+ }
1772
+ }
1773
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1774
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1775
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1776
+ }
1777
+ } else if (node.nodeType === 8 /* CommentNode */) {
1778
+ const childIdSplt = node.nodeValue.split(".");
1779
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1780
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1781
+ node.nodeValue = "";
1782
+ node["s-en"] = childIdSplt[3];
1783
+ }
1784
+ }
1785
+ };
1786
+ var createSimpleVNode = (vnode) => {
1787
+ const defaultVNode = {
1788
+ $flags$: 0,
1789
+ $hostId$: null,
1790
+ $nodeId$: null,
1791
+ $depth$: null,
1792
+ $index$: "0",
1793
+ $elm$: null,
1794
+ $attrs$: null,
1795
+ $children$: null,
1796
+ $key$: null,
1797
+ $name$: null,
1798
+ $tag$: null,
1799
+ $text$: null
1800
+ };
1801
+ return { ...defaultVNode, ...vnode };
1802
+ };
1803
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1804
+ node["s-sr"] = true;
1805
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1806
+ if (shadowRootNodes) {
1807
+ const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1808
+ if (childVNode.$name$) {
1809
+ childVNode.$elm$.setAttribute("name", slotName);
1810
+ }
1811
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1812
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1813
+ } else {
1814
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1815
+ }
1816
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1817
+ node.remove();
1818
+ if (childVNode.$depth$ === "0") {
1819
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1820
+ }
1821
+ } else {
1822
+ const slot = childVNode.$elm$;
1823
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1824
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1825
+ if (shouldMove) {
1826
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1827
+ }
1828
+ childRenderNodes.push(childVNode);
1829
+ }
1830
+ slotNodes.push(childVNode);
1831
+ if (!parentVNode.$children$) {
1832
+ parentVNode.$children$ = [];
1833
+ }
1834
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1835
+ }
1836
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1837
+ let slottedNode = slotNode.nextSibling;
1838
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1839
+ 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 */))) {
1840
+ slottedNode["s-sn"] = slotName;
1841
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1842
+ slottedNode = slottedNode.nextSibling;
1843
+ }
1844
+ };
1845
+
1846
+ // src/runtime/mode.ts
1847
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1848
+ var setMode = (handler) => modeResolutionChain.push(handler);
1849
+ var getMode = (ref) => getHostRef(ref).$modeName$;
1850
+ var parsePropertyValue = (propValue, propType) => {
1851
+ if (propValue != null && !isComplexType(propValue)) {
1852
+ if (propType & 4 /* Boolean */) {
1853
+ return propValue === "false" ? false : propValue === "" || !!propValue;
1854
+ }
1855
+ if (propType & 2 /* Number */) {
1856
+ return parseFloat(propValue);
1857
+ }
1858
+ if (propType & 1 /* String */) {
1859
+ return String(propValue);
1860
+ }
1861
+ return propValue;
1862
+ }
1863
+ return propValue;
1864
+ };
1865
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1866
+
1867
+ // src/runtime/event-emitter.ts
1868
+ var createEvent = (ref, name, flags) => {
1869
+ const elm = getElement(ref);
1870
+ return {
1871
+ emit: (detail) => {
1872
+ return emitEvent(elm, name, {
1873
+ bubbles: !!(flags & 4 /* Bubbles */),
1874
+ composed: !!(flags & 2 /* Composed */),
1875
+ cancelable: !!(flags & 1 /* Cancellable */),
1876
+ detail
1877
+ });
1878
+ }
1879
+ };
1880
+ };
1881
+ var emitEvent = (elm, name, opts) => {
1882
+ const ev = plt.ce(name, opts);
1883
+ elm.dispatchEvent(ev);
1884
+ return ev;
1885
+ };
1886
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1887
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1888
+ let style = styles.get(scopeId2);
1889
+ if (supportsConstructableStylesheets && allowCS) {
1890
+ style = style || new CSSStyleSheet();
1891
+ if (typeof style === "string") {
1892
+ style = cssText;
1893
+ } else {
1894
+ style.replaceSync(cssText);
1895
+ }
1896
+ } else {
1897
+ style = cssText;
1898
+ }
1899
+ styles.set(scopeId2, style);
1900
+ };
1901
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1902
+ var _a;
1903
+ const scopeId2 = getScopeId(cmpMeta, mode);
1904
+ const style = styles.get(scopeId2);
1905
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1906
+ if (style) {
1907
+ if (typeof style === "string") {
1908
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1909
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1910
+ let styleElm;
1911
+ if (!appliedStyles) {
1912
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1913
+ }
1914
+ if (!appliedStyles.has(scopeId2)) {
1915
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1916
+ styleElm.innerHTML = style;
1917
+ } else {
1918
+ styleElm = doc.createElement("style");
1919
+ styleElm.innerHTML = style;
1920
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1921
+ if (nonce != null) {
1922
+ styleElm.setAttribute("nonce", nonce);
1923
+ }
1924
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1925
+ if (styleContainerNode.nodeName === "HEAD") {
1926
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1927
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1928
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1929
+ } else if ("host" in styleContainerNode) {
1930
+ if (supportsConstructableStylesheets) {
1931
+ const stylesheet = new CSSStyleSheet();
1932
+ stylesheet.replaceSync(style);
1933
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1934
+ } else {
1935
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1936
+ if (existingStyleContainer) {
1937
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1938
+ } else {
1939
+ styleContainerNode.prepend(styleElm);
1940
+ }
1941
+ }
1942
+ } else {
1943
+ styleContainerNode.append(styleElm);
1944
+ }
1945
+ }
1946
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1947
+ styleContainerNode.insertBefore(styleElm, null);
1371
1948
  }
1372
1949
  }
1950
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1951
+ styleElm.innerHTML += SLOT_FB_CSS;
1952
+ }
1953
+ if (appliedStyles) {
1954
+ appliedStyles.add(scopeId2);
1955
+ }
1373
1956
  }
1957
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1958
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1374
1959
  }
1375
- if (checkSlotFallbackVisibility) {
1376
- updateFallbackSlotVisibility(rootVnode.$elm$);
1377
- }
1378
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1379
- relocateNodes.length = 0;
1380
1960
  }
1381
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1382
- for (const childNode of rootVnode.$elm$.childNodes) {
1383
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1384
- if (isInitialLoad && childNode["s-ih"] == null) {
1385
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1386
- }
1387
- childNode.hidden = true;
1388
- }
1961
+ return scopeId2;
1962
+ };
1963
+ var attachStyles = (hostRef) => {
1964
+ const cmpMeta = hostRef.$cmpMeta$;
1965
+ const elm = hostRef.$hostElement$;
1966
+ const flags = cmpMeta.$flags$;
1967
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1968
+ const scopeId2 = addStyle(
1969
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1970
+ cmpMeta,
1971
+ hostRef.$modeName$
1972
+ );
1973
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1974
+ elm["s-sc"] = scopeId2;
1975
+ elm.classList.add(scopeId2 + "-h");
1976
+ if (flags & 2 /* scopedCssEncapsulation */) {
1977
+ elm.classList.add(scopeId2 + "-s");
1389
1978
  }
1390
1979
  }
1391
- contentRef = void 0;
1980
+ endAttachStyles();
1392
1981
  };
1982
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1393
1983
 
1394
1984
  // src/runtime/update-component.ts
1395
1985
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1617,16 +2207,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1617
2207
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1618
2208
  members.map(([memberName, [memberFlags]]) => {
1619
2209
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1620
- Object.defineProperty(prototype, memberName, {
1621
- get() {
1622
- return getValue(this, memberName);
1623
- },
1624
- set(newValue) {
1625
- setValue(this, memberName, newValue, cmpMeta);
1626
- },
1627
- configurable: true,
1628
- enumerable: true
1629
- });
2210
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2211
+ Object.defineProperty(prototype, memberName, {
2212
+ get() {
2213
+ return getValue(this, memberName);
2214
+ },
2215
+ set(newValue) {
2216
+ setValue(this, memberName, newValue, cmpMeta);
2217
+ },
2218
+ configurable: true,
2219
+ enumerable: true
2220
+ });
2221
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2222
+ {
2223
+ Object.defineProperty(prototype, memberName, {
2224
+ get() {
2225
+ const ref = getHostRef(this);
2226
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2227
+ if (!instance) return;
2228
+ return instance[memberName];
2229
+ },
2230
+ configurable: true,
2231
+ enumerable: true
2232
+ });
2233
+ }
2234
+ if (memberFlags & 4096 /* Setter */) {
2235
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2236
+ Object.defineProperty(prototype, memberName, {
2237
+ set(newValue) {
2238
+ const ref = getHostRef(this);
2239
+ if (origSetter) {
2240
+ const currentValue = ref.$hostElement$[memberName];
2241
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2242
+ ref.$instanceValues$.set(memberName, currentValue);
2243
+ }
2244
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2245
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2246
+ return;
2247
+ }
2248
+ if (!ref) return;
2249
+ const setterSetVal = () => {
2250
+ const currentValue = ref.$lazyInstance$[memberName];
2251
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2252
+ ref.$instanceValues$.set(memberName, currentValue);
2253
+ }
2254
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2255
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2256
+ };
2257
+ if (ref.$lazyInstance$) {
2258
+ setterSetVal();
2259
+ } else {
2260
+ ref.$onReadyPromise$.then(() => setterSetVal());
2261
+ }
2262
+ }
2263
+ });
2264
+ }
2265
+ }
1630
2266
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1631
2267
  Object.defineProperty(prototype, memberName, {
1632
2268
  value(...args) {
@@ -1666,7 +2302,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1666
2302
  }
1667
2303
  return;
1668
2304
  }
1669
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2305
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2306
+ if (!propDesc.get || !!propDesc.set) {
2307
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2308
+ }
1670
2309
  });
1671
2310
  };
1672
2311
  Cstr.observedAttributes = Array.from(
@@ -1782,6 +2421,9 @@ var connectedCallback = (elm) => {
1782
2421
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1783
2422
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1784
2423
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2424
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2425
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2426
+ elm["s-sc"] = scopeId2;
1785
2427
  }
1786
2428
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1787
2429
  }
@@ -1832,9 +2474,13 @@ var setContentReference = (elm) => {
1832
2474
  insertBefore(elm, contentRefElm, elm.firstChild);
1833
2475
  };
1834
2476
  var disconnectInstance = (instance) => {
2477
+ const callbackResult = [];
1835
2478
  {
1836
- safeCall(instance, "disconnectedCallback");
2479
+ callbackResult.push(safeCall(instance, "disconnectedCallback"));
1837
2480
  }
2481
+ Promise.all(
2482
+ callbackResult.filter((item) => typeof item === "object").filter((promise) => "then" in promise && typeof promise.then === "function")
2483
+ ).finally(() => setTimeout(() => hostRefCleanup()));
1838
2484
  };
1839
2485
  var disconnectedCallback = async (elm) => {
1840
2486
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1849,289 +2495,16 @@ var disconnectedCallback = async (elm) => {
1849
2495
  disconnectInstance(hostRef.$lazyInstance$);
1850
2496
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1851
2497
  hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
2498
+ } else {
2499
+ setTimeout(() => hostRefCleanup());
1852
2500
  }
1853
2501
  }
1854
- };
1855
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1856
- patchCloneNode(hostElementPrototype);
1857
- patchSlotAppendChild(hostElementPrototype);
1858
- patchSlotAppend(hostElementPrototype);
1859
- patchSlotPrepend(hostElementPrototype);
1860
- patchSlotInsertAdjacentElement(hostElementPrototype);
1861
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1862
- patchSlotInsertAdjacentText(hostElementPrototype);
1863
- patchTextContent(hostElementPrototype);
1864
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1865
- patchSlotRemoveChild(hostElementPrototype);
1866
- };
1867
- var patchCloneNode = (HostElementPrototype) => {
1868
- const orgCloneNode = HostElementPrototype.cloneNode;
1869
- HostElementPrototype.cloneNode = function(deep) {
1870
- const srcNode = this;
1871
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1872
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1873
- if (!isShadowDom && deep) {
1874
- let i2 = 0;
1875
- let slotted, nonStencilNode;
1876
- const stencilPrivates = [
1877
- "s-id",
1878
- "s-cr",
1879
- "s-lr",
1880
- "s-rc",
1881
- "s-sc",
1882
- "s-p",
1883
- "s-cn",
1884
- "s-sr",
1885
- "s-sn",
1886
- "s-hn",
1887
- "s-ol",
1888
- "s-nr",
1889
- "s-si",
1890
- "s-rf",
1891
- "s-scs"
1892
- ];
1893
- for (; i2 < srcNode.childNodes.length; i2++) {
1894
- slotted = srcNode.childNodes[i2]["s-nr"];
1895
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1896
- if (slotted) {
1897
- if (clonedNode.__appendChild) {
1898
- clonedNode.__appendChild(slotted.cloneNode(true));
1899
- } else {
1900
- clonedNode.appendChild(slotted.cloneNode(true));
1901
- }
1902
- }
1903
- if (nonStencilNode) {
1904
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1905
- }
1906
- }
1907
- }
1908
- return clonedNode;
1909
- };
1910
- };
1911
- var patchSlotAppendChild = (HostElementPrototype) => {
1912
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1913
- HostElementPrototype.appendChild = function(newChild) {
1914
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1915
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1916
- if (slotNode) {
1917
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1918
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1919
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1920
- updateFallbackSlotVisibility(this);
1921
- return insertedNode;
1922
- }
1923
- return this.__appendChild(newChild);
1924
- };
1925
- };
1926
- var patchSlotRemoveChild = (ElementPrototype) => {
1927
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1928
- ElementPrototype.removeChild = function(toRemove) {
1929
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1930
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1931
- if (slotNode) {
1932
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1933
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1934
- if (existingNode) {
1935
- existingNode.remove();
1936
- updateFallbackSlotVisibility(this);
1937
- return;
1938
- }
1939
- }
1940
- }
1941
- return this.__removeChild(toRemove);
1942
- };
1943
- };
1944
- var patchSlotPrepend = (HostElementPrototype) => {
1945
- const originalPrepend = HostElementPrototype.prepend;
1946
- HostElementPrototype.prepend = function(...newChildren) {
1947
- newChildren.forEach((newChild) => {
1948
- if (typeof newChild === "string") {
1949
- newChild = this.ownerDocument.createTextNode(newChild);
1950
- }
1951
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1952
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1953
- if (slotNode) {
1954
- const slotPlaceholder = document.createTextNode("");
1955
- slotPlaceholder["s-nr"] = newChild;
1956
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1957
- newChild["s-ol"] = slotPlaceholder;
1958
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1959
- const appendAfter = slotChildNodes[0];
1960
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1961
- }
1962
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1963
- newChild.hidden = true;
1964
- }
1965
- return originalPrepend.call(this, newChild);
1966
- });
1967
- };
1968
- };
1969
- var patchSlotAppend = (HostElementPrototype) => {
1970
- HostElementPrototype.append = function(...newChildren) {
1971
- newChildren.forEach((newChild) => {
1972
- if (typeof newChild === "string") {
1973
- newChild = this.ownerDocument.createTextNode(newChild);
1974
- }
1975
- this.appendChild(newChild);
1976
- });
1977
- };
1978
- };
1979
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1980
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1981
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1982
- if (position !== "afterbegin" && position !== "beforeend") {
1983
- return originalInsertAdjacentHtml.call(this, position, text);
1984
- }
1985
- const container = this.ownerDocument.createElement("_");
1986
- let node;
1987
- container.innerHTML = text;
1988
- if (position === "afterbegin") {
1989
- while (node = container.firstChild) {
1990
- this.prepend(node);
1991
- }
1992
- } else if (position === "beforeend") {
1993
- while (node = container.firstChild) {
1994
- this.append(node);
1995
- }
1996
- }
1997
- };
1998
- };
1999
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
2000
- HostElementPrototype.insertAdjacentText = function(position, text) {
2001
- this.insertAdjacentHTML(position, text);
2002
- };
2003
- };
2004
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2005
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2006
- HostElementPrototype.insertAdjacentElement = function(position, element) {
2007
- if (position !== "afterbegin" && position !== "beforeend") {
2008
- return originalInsertAdjacentElement.call(this, position, element);
2009
- }
2010
- if (position === "afterbegin") {
2011
- this.prepend(element);
2012
- return element;
2013
- } else if (position === "beforeend") {
2014
- this.append(element);
2015
- return element;
2016
- }
2017
- return element;
2018
- };
2019
- };
2020
- var patchTextContent = (hostElementPrototype) => {
2021
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2022
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2023
- {
2024
- Object.defineProperty(hostElementPrototype, "textContent", {
2025
- // To mimic shadow root behavior, we need to return the text content of all
2026
- // nodes in a slot reference node
2027
- get() {
2028
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2029
- const textContent = slotRefNodes.map((node) => {
2030
- var _a, _b;
2031
- const text = [];
2032
- let slotContent = node.nextSibling;
2033
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2034
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2035
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2036
- }
2037
- slotContent = slotContent.nextSibling;
2038
- }
2039
- return text.filter((ref) => ref !== "").join(" ");
2040
- }).filter((text) => text !== "").join(" ");
2041
- return " " + textContent + " ";
2042
- },
2043
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2044
- // reference node. If a default slot reference node exists, the text content will be
2045
- // placed there. Otherwise, the new text node will be hidden
2046
- set(value) {
2047
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2048
- slotRefNodes.forEach((node) => {
2049
- let slotContent = node.nextSibling;
2050
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2051
- const tmp = slotContent;
2052
- slotContent = slotContent.nextSibling;
2053
- tmp.remove();
2054
- }
2055
- if (node["s-sn"] === "") {
2056
- const textNode = this.ownerDocument.createTextNode(value);
2057
- textNode["s-sn"] = "";
2058
- insertBefore(node.parentElement, textNode, node.nextSibling);
2059
- } else {
2060
- node.remove();
2061
- }
2062
- });
2063
- }
2064
- });
2065
- }
2066
- };
2067
- var patchChildSlotNodes = (elm, cmpMeta) => {
2068
- class FakeNodeList extends Array {
2069
- item(n) {
2070
- return this[n];
2071
- }
2072
- }
2073
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2074
- const childNodesFn = elm.__lookupGetter__("childNodes");
2075
- Object.defineProperty(elm, "children", {
2076
- get() {
2077
- return this.childNodes.map((n) => n.nodeType === 1);
2078
- }
2079
- });
2080
- Object.defineProperty(elm, "childElementCount", {
2081
- get() {
2082
- return elm.children.length;
2083
- }
2084
- });
2085
- Object.defineProperty(elm, "childNodes", {
2086
- get() {
2087
- const childNodes = childNodesFn.call(this);
2088
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2089
- const result = new FakeNodeList();
2090
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2091
- const slot = childNodes[i2]["s-nr"];
2092
- if (slot) {
2093
- result.push(slot);
2094
- }
2095
- }
2096
- return result;
2097
- }
2098
- return FakeNodeList.from(childNodes);
2099
- }
2100
- });
2101
- }
2102
- };
2103
- var getAllChildSlotNodes = (childNodes) => {
2104
- const slotRefNodes = [];
2105
- for (const childNode of Array.from(childNodes)) {
2106
- if (childNode["s-sr"]) {
2107
- slotRefNodes.push(childNode);
2108
- }
2109
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2110
- }
2111
- return slotRefNodes;
2112
- };
2113
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2114
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2115
- let i2 = 0;
2116
- let childNode;
2117
- for (; i2 < childNodes.length; i2++) {
2118
- childNode = childNodes[i2];
2119
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2120
- return childNode;
2121
- }
2122
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2123
- if (childNode) {
2124
- return childNode;
2125
- }
2502
+ if (rootAppliedStyles.has(elm)) {
2503
+ rootAppliedStyles.delete(elm);
2126
2504
  }
2127
- return null;
2128
- };
2129
- var getHostSlotChildNodes = (n, slotName) => {
2130
- const childNodes = [n];
2131
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2132
- childNodes.push(n);
2505
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2506
+ rootAppliedStyles.delete(elm.shadowRoot);
2133
2507
  }
2134
- return childNodes;
2135
2508
  };
2136
2509
 
2137
2510
  // src/runtime/bootstrap-lazy.ts
@@ -2229,7 +2602,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2229
2602
  };
2230
2603
  {
2231
2604
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2232
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2605
+ patchPseudoShadowDom(HostElement.prototype);
2233
2606
  }
2234
2607
  }
2235
2608
  cmpMeta.$lazyBundleId$ = lazyBundle[0];