@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
package/hydrate/index.mjs CHANGED
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import { Readable } from 'stream';
5
5
 
6
+ const modeResolutionChain = [];
7
+
6
8
  function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve) {
7
9
  var globalThis = $stencilWindow;
8
10
  var self = $stencilWindow;
@@ -34,6 +36,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
34
36
  var CSS = $stencilWindow.CSS;
35
37
  var CustomEvent = $stencilWindow.CustomEvent;
36
38
  var Document = $stencilWindow.Document;
39
+ var ShadowRoot = $stencilWindow.ShadowRoot;
37
40
  var DocumentFragment = $stencilWindow.DocumentFragment;
38
41
  var DocumentType = $stencilWindow.DocumentType;
39
42
  var DOMTokenList = $stencilWindow.DOMTokenList;
@@ -54,6 +57,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
54
57
  var HTMLTemplateElement = $stencilWindow.HTMLTemplateElement;
55
58
  var HTMLTitleElement = $stencilWindow.HTMLTitleElement;
56
59
  var IntersectionObserver = $stencilWindow.IntersectionObserver;
60
+ var ResizeObserver = $stencilWindow.ResizeObserver;
57
61
  var KeyboardEvent = $stencilWindow.KeyboardEvent;
58
62
  var MouseEvent = $stencilWindow.MouseEvent;
59
63
  var Node = $stencilWindow.Node;
@@ -125,8 +129,235 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
125
129
  const NAMESPACE = 'ionic';
126
130
  const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", 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, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, 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 };
127
131
 
132
+ // TODO(FW-2832): types
133
+ class Config {
134
+ constructor() {
135
+ this.m = new Map();
136
+ }
137
+ reset(configObj) {
138
+ this.m = new Map(Object.entries(configObj));
139
+ }
140
+ get(key, fallback) {
141
+ const value = this.m.get(key);
142
+ return value !== undefined ? value : fallback;
143
+ }
144
+ getBoolean(key, fallback = false) {
145
+ const val = this.m.get(key);
146
+ if (val === undefined) {
147
+ return fallback;
148
+ }
149
+ if (typeof val === 'string') {
150
+ return val === 'true';
151
+ }
152
+ return !!val;
153
+ }
154
+ getNumber(key, fallback) {
155
+ const val = parseFloat(this.m.get(key));
156
+ return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
157
+ }
158
+ set(key, value) {
159
+ this.m.set(key, value);
160
+ }
161
+ }
162
+ const config = /*@__PURE__*/ new Config();
163
+ const configFromSession = (win) => {
164
+ try {
165
+ const configStr = win.sessionStorage.getItem(IONIC_SESSION_KEY);
166
+ return configStr !== null ? JSON.parse(configStr) : {};
167
+ }
168
+ catch (e) {
169
+ return {};
170
+ }
171
+ };
172
+ const saveConfig = (win, c) => {
173
+ try {
174
+ win.sessionStorage.setItem(IONIC_SESSION_KEY, JSON.stringify(c));
175
+ }
176
+ catch (e) {
177
+ return;
178
+ }
179
+ };
180
+ const configFromURL = (win) => {
181
+ const configObj = {};
182
+ win.location.search
183
+ .slice(1)
184
+ .split('&')
185
+ .map((entry) => entry.split('='))
186
+ .map(([key, value]) => {
187
+ try {
188
+ return [decodeURIComponent(key), decodeURIComponent(value)];
189
+ }
190
+ catch (e) {
191
+ return ['', ''];
192
+ }
193
+ })
194
+ .filter(([key]) => startsWith(key, IONIC_PREFIX))
195
+ .map(([key, value]) => [key.slice(IONIC_PREFIX.length), value])
196
+ .forEach(([key, value]) => {
197
+ configObj[key] = value;
198
+ });
199
+ return configObj;
200
+ };
201
+ const startsWith = (input, search) => {
202
+ return input.substr(0, search.length) === search;
203
+ };
204
+ const IONIC_PREFIX = 'ionic:';
205
+ const IONIC_SESSION_KEY = 'ionic-persist-config';
206
+
207
+ const getPlatforms = (win) => setupPlatforms(win);
208
+ const isPlatform = (winOrPlatform, platform) => {
209
+ if (typeof winOrPlatform === 'string') {
210
+ platform = winOrPlatform;
211
+ winOrPlatform = undefined;
212
+ }
213
+ return getPlatforms(winOrPlatform).includes(platform);
214
+ };
215
+ const setupPlatforms = (win = window) => {
216
+ if (typeof win === 'undefined') {
217
+ return [];
218
+ }
219
+ win.Ionic = win.Ionic || {};
220
+ let platforms = win.Ionic.platforms;
221
+ if (platforms == null) {
222
+ platforms = win.Ionic.platforms = detectPlatforms(win);
223
+ platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`));
224
+ }
225
+ return platforms;
226
+ };
227
+ const detectPlatforms = (win) => {
228
+ const customPlatformMethods = config.get('platform');
229
+ return Object.keys(PLATFORMS_MAP).filter((p) => {
230
+ const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
231
+ return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
232
+ });
233
+ };
234
+ const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
235
+ const isIpad = (win) => {
236
+ // iOS 12 and below
237
+ if (testUserAgent(win, /iPad/i)) {
238
+ return true;
239
+ }
240
+ // iOS 13+
241
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
242
+ return true;
243
+ }
244
+ return false;
245
+ };
246
+ const isIphone = (win) => testUserAgent(win, /iPhone/i);
247
+ const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
248
+ const isAndroid = (win) => testUserAgent(win, /android|sink/i);
249
+ const isAndroidTablet = (win) => {
250
+ return isAndroid(win) && !testUserAgent(win, /mobile/i);
251
+ };
252
+ const isPhablet = (win) => {
253
+ const width = win.innerWidth;
254
+ const height = win.innerHeight;
255
+ const smallest = Math.min(width, height);
256
+ const largest = Math.max(width, height);
257
+ return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
258
+ };
259
+ const isTablet = (win) => {
260
+ const width = win.innerWidth;
261
+ const height = win.innerHeight;
262
+ const smallest = Math.min(width, height);
263
+ const largest = Math.max(width, height);
264
+ return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
265
+ };
266
+ const isMobile = (win) => matchMedia$1(win, '(any-pointer:coarse)');
267
+ const isDesktop = (win) => !isMobile(win);
268
+ const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
269
+ const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
270
+ const isCapacitorNative = (win) => {
271
+ const capacitor = win['Capacitor'];
272
+ return !!(capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative);
273
+ };
274
+ const isElectron = (win) => testUserAgent(win, /electron/i);
275
+ const isPWA = (win) => { var _a; return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone); };
276
+ const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
277
+ const matchMedia$1 = (win, query) => { var _a; return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches; };
278
+ const PLATFORMS_MAP = {
279
+ ipad: isIpad,
280
+ iphone: isIphone,
281
+ ios: isIOS,
282
+ android: isAndroid,
283
+ phablet: isPhablet,
284
+ tablet: isTablet,
285
+ cordova: isCordova,
286
+ capacitor: isCapacitorNative,
287
+ electron: isElectron,
288
+ pwa: isPWA,
289
+ mobile: isMobile,
290
+ mobileweb: isMobileWeb,
291
+ desktop: isDesktop,
292
+ hybrid: isHybrid,
293
+ };
294
+
295
+ // TODO(FW-2832): types
296
+ let defaultMode;
297
+ const getIonMode$1 = (ref) => {
298
+ return (ref && getMode(ref)) || defaultMode;
299
+ };
300
+ const initialize = (userConfig = {}) => {
301
+ if (typeof window === 'undefined') {
302
+ return;
303
+ }
304
+ const doc = window.document;
305
+ const win = window;
306
+ const Ionic = (win.Ionic = win.Ionic || {});
307
+ const platformHelpers = {};
308
+ if (userConfig._ael) {
309
+ platformHelpers.ael = userConfig._ael;
310
+ }
311
+ if (userConfig._rel) {
312
+ platformHelpers.rel = userConfig._rel;
313
+ }
314
+ if (userConfig._ce) {
315
+ platformHelpers.ce = userConfig._ce;
316
+ }
317
+ setPlatformHelpers(platformHelpers);
318
+ // create the Ionic.config from raw config object (if it exists)
319
+ // and convert Ionic.config into a ConfigApi that has a get() fn
320
+ const configObj = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), { persistConfig: false }), Ionic.config), configFromURL(win)), userConfig);
321
+ config.reset(configObj);
322
+ if (config.getBoolean('persistConfig')) {
323
+ saveConfig(win, configObj);
324
+ }
325
+ // Setup platforms
326
+ setupPlatforms(win);
327
+ // first see if the mode was set as an attribute on <html>
328
+ // which could have been set by the user, or by pre-rendering
329
+ // otherwise get the mode via config settings, and fallback to md
330
+ Ionic.config = config;
331
+ Ionic.mode = defaultMode = config.get('mode', doc.documentElement.getAttribute('mode') || (isPlatform(win, 'ios') ? 'ios' : 'md'));
332
+ config.set('mode', defaultMode);
333
+ doc.documentElement.setAttribute('mode', defaultMode);
334
+ doc.documentElement.classList.add(defaultMode);
335
+ if (config.getBoolean('_testing')) {
336
+ config.set('animated', false);
337
+ }
338
+ const isIonicElement = (elm) => { var _a; return (_a = elm.tagName) === null || _a === void 0 ? void 0 : _a.startsWith('ION-'); };
339
+ const isAllowedIonicModeValue = (elmMode) => ['ios', 'md'].includes(elmMode);
340
+ setMode((elm) => {
341
+ while (elm) {
342
+ const elmMode = elm.mode || elm.getAttribute('mode');
343
+ if (elmMode) {
344
+ if (isAllowedIonicModeValue(elmMode)) {
345
+ return elmMode;
346
+ }
347
+ else if (isIonicElement(elm)) {
348
+ console.warn('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
349
+ }
350
+ }
351
+ elm = elm.parentElement;
352
+ }
353
+ return defaultMode;
354
+ });
355
+ };
356
+
357
+ const globalScripts = initialize;
358
+
128
359
  /*
129
- Stencil Hydrate Platform v4.20.0 | MIT Licensed | https://stenciljs.com
360
+ Stencil Hydrate Platform v4.23.0-dev.1735628762.fb8335e | MIT Licensed | https://stenciljs.com
130
361
  */
131
362
  var __defProp = Object.defineProperty;
132
363
  var __export = (target, all) => {
@@ -200,29 +431,22 @@ var unwrapErr = (result) => {
200
431
  throw result.value;
201
432
  }
202
433
  };
203
- var createTime = (fnName, tagName = "") => {
204
- {
205
- return () => {
206
- return;
207
- };
208
- }
209
- };
210
- var uniqueTime = (key, measureText) => {
211
- {
212
- return () => {
213
- return;
214
- };
215
- }
216
- };
217
434
 
218
435
  // src/runtime/runtime-constants.ts
219
436
  var CONTENT_REF_ID = "r";
220
437
  var ORG_LOCATION_ID = "o";
221
438
  var SLOT_NODE_ID = "s";
222
439
  var TEXT_NODE_ID = "t";
440
+ var COMMENT_NODE_ID = "c";
223
441
  var HYDRATE_ID = "s-id";
224
442
  var HYDRATED_STYLE_ID = "sty-id";
225
443
  var HYDRATE_CHILD_ID = "c-id";
444
+ var STENCIL_DOC_DATA = "_stencilDocData";
445
+ var DEFAULT_DOC_DATA = {
446
+ hostIds: 0,
447
+ rootLevelIds: 0,
448
+ staticComponents: /* @__PURE__ */ new Set()
449
+ };
226
450
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
227
451
  var XLINK_NS = "http://www.w3.org/1999/xlink";
228
452
  var h = (nodeName, vnodeData, ...children) => {
@@ -336,318 +560,6 @@ var convertToPrivate = (node) => {
336
560
  vnode.$name$ = node.vname;
337
561
  return vnode;
338
562
  };
339
-
340
- // src/runtime/client-hydrate.ts
341
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
342
- const endHydrate = createTime("hydrateClient", tagName);
343
- const shadowRoot = hostElm.shadowRoot;
344
- const childRenderNodes = [];
345
- const slotNodes = [];
346
- const shadowRootNodes = shadowRoot ? [] : null;
347
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
348
- if (!plt.$orgLocNodes$) {
349
- initializeDocumentHydrate(doc$1.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
350
- }
351
- hostElm[HYDRATE_ID] = hostId;
352
- hostElm.removeAttribute(HYDRATE_ID);
353
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
354
- childRenderNodes.map((c) => {
355
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
356
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
357
- const node = c.$elm$;
358
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
359
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
360
- }
361
- if (!shadowRoot) {
362
- node["s-hn"] = tagName;
363
- if (orgLocationNode) {
364
- node["s-ol"] = orgLocationNode;
365
- node["s-ol"]["s-nr"] = node;
366
- }
367
- }
368
- plt.$orgLocNodes$.delete(orgLocationId);
369
- });
370
- if (shadowRoot) {
371
- shadowRootNodes.map((shadowRootNode) => {
372
- if (shadowRootNode) {
373
- shadowRoot.appendChild(shadowRootNode);
374
- }
375
- });
376
- }
377
- endHydrate();
378
- };
379
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
380
- let childNodeType;
381
- let childIdSplt;
382
- let childVNode;
383
- let i2;
384
- if (node.nodeType === 1 /* ElementNode */) {
385
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
386
- if (childNodeType) {
387
- childIdSplt = childNodeType.split(".");
388
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
389
- childVNode = {
390
- $flags$: 0,
391
- $hostId$: childIdSplt[0],
392
- $nodeId$: childIdSplt[1],
393
- $depth$: childIdSplt[2],
394
- $index$: childIdSplt[3],
395
- $tag$: node.tagName.toLowerCase(),
396
- $elm$: node,
397
- $attrs$: null,
398
- $children$: null,
399
- $key$: null,
400
- $name$: null,
401
- $text$: null
402
- };
403
- childRenderNodes.push(childVNode);
404
- node.removeAttribute(HYDRATE_CHILD_ID);
405
- if (!parentVNode.$children$) {
406
- parentVNode.$children$ = [];
407
- }
408
- parentVNode.$children$[childVNode.$index$] = childVNode;
409
- parentVNode = childVNode;
410
- if (shadowRootNodes && childVNode.$depth$ === "0") {
411
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
412
- }
413
- }
414
- }
415
- if (node.shadowRoot) {
416
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
417
- clientHydrate(
418
- parentVNode,
419
- childRenderNodes,
420
- slotNodes,
421
- shadowRootNodes,
422
- hostElm,
423
- node.shadowRoot.childNodes[i2],
424
- hostId
425
- );
426
- }
427
- }
428
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
429
- clientHydrate(
430
- parentVNode,
431
- childRenderNodes,
432
- slotNodes,
433
- shadowRootNodes,
434
- hostElm,
435
- node.childNodes[i2],
436
- hostId
437
- );
438
- }
439
- } else if (node.nodeType === 8 /* CommentNode */) {
440
- childIdSplt = node.nodeValue.split(".");
441
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
442
- childNodeType = childIdSplt[0];
443
- childVNode = {
444
- $flags$: 0,
445
- $hostId$: childIdSplt[1],
446
- $nodeId$: childIdSplt[2],
447
- $depth$: childIdSplt[3],
448
- $index$: childIdSplt[4],
449
- $elm$: node,
450
- $attrs$: null,
451
- $children$: null,
452
- $key$: null,
453
- $name$: null,
454
- $tag$: null,
455
- $text$: null
456
- };
457
- if (childNodeType === TEXT_NODE_ID) {
458
- childVNode.$elm$ = node.nextSibling;
459
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
460
- childVNode.$text$ = childVNode.$elm$.textContent;
461
- childRenderNodes.push(childVNode);
462
- node.remove();
463
- if (!parentVNode.$children$) {
464
- parentVNode.$children$ = [];
465
- }
466
- parentVNode.$children$[childVNode.$index$] = childVNode;
467
- if (shadowRootNodes && childVNode.$depth$ === "0") {
468
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
469
- }
470
- }
471
- } else if (childVNode.$hostId$ === hostId) {
472
- if (childNodeType === SLOT_NODE_ID) {
473
- childVNode.$tag$ = "slot";
474
- if (childIdSplt[5]) {
475
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
476
- } else {
477
- node["s-sn"] = "";
478
- }
479
- node["s-sr"] = true;
480
- if (shadowRootNodes) {
481
- childVNode.$elm$ = doc$1.createElement(childVNode.$tag$);
482
- if (childVNode.$name$) {
483
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
484
- }
485
- node.parentNode.insertBefore(childVNode.$elm$, node);
486
- node.remove();
487
- if (childVNode.$depth$ === "0") {
488
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
489
- }
490
- }
491
- slotNodes.push(childVNode);
492
- if (!parentVNode.$children$) {
493
- parentVNode.$children$ = [];
494
- }
495
- parentVNode.$children$[childVNode.$index$] = childVNode;
496
- } else if (childNodeType === CONTENT_REF_ID) {
497
- if (shadowRootNodes) {
498
- node.remove();
499
- } else {
500
- hostElm["s-cr"] = node;
501
- node["s-cn"] = true;
502
- }
503
- }
504
- }
505
- }
506
- } else if (parentVNode && parentVNode.$tag$ === "style") {
507
- const vnode = newVNode(null, node.textContent);
508
- vnode.$elm$ = node;
509
- vnode.$index$ = "0";
510
- parentVNode.$children$ = [vnode];
511
- }
512
- };
513
- var initializeDocumentHydrate = (node, orgLocNodes) => {
514
- if (node.nodeType === 1 /* ElementNode */) {
515
- let i2 = 0;
516
- if (node.shadowRoot) {
517
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
518
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
519
- }
520
- }
521
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
522
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
523
- }
524
- } else if (node.nodeType === 8 /* CommentNode */) {
525
- const childIdSplt = node.nodeValue.split(".");
526
- if (childIdSplt[0] === ORG_LOCATION_ID) {
527
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
528
- node.nodeValue = "";
529
- node["s-en"] = childIdSplt[3];
530
- }
531
- }
532
- };
533
-
534
- // src/runtime/mode.ts
535
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
536
- var getMode = (ref) => getHostRef(ref).$modeName$;
537
- var parsePropertyValue = (propValue, propType) => {
538
- if (propValue != null && !isComplexType(propValue)) {
539
- if (propType & 4 /* Boolean */) {
540
- return propValue === "false" ? false : propValue === "" || !!propValue;
541
- }
542
- if (propType & 2 /* Number */) {
543
- return parseFloat(propValue);
544
- }
545
- if (propType & 1 /* String */) {
546
- return String(propValue);
547
- }
548
- return propValue;
549
- }
550
- return propValue;
551
- };
552
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
553
-
554
- // src/runtime/event-emitter.ts
555
- var createEvent = (ref, name, flags) => {
556
- const elm = getElement(ref);
557
- return {
558
- emit: (detail) => {
559
- return emitEvent(elm, name, {
560
- bubbles: !!(flags & 4 /* Bubbles */),
561
- composed: !!(flags & 2 /* Composed */),
562
- cancelable: !!(flags & 1 /* Cancellable */),
563
- detail
564
- });
565
- }
566
- };
567
- };
568
- var emitEvent = (elm, name, opts) => {
569
- const ev = plt.ce(name, opts);
570
- elm.dispatchEvent(ev);
571
- return ev;
572
- };
573
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
574
- var registerStyle = (scopeId2, cssText, allowCS) => {
575
- let style = styles.get(scopeId2);
576
- {
577
- style = cssText;
578
- }
579
- styles.set(scopeId2, style);
580
- };
581
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
582
- var _a;
583
- const scopeId2 = getScopeId(cmpMeta, mode);
584
- const style = styles.get(scopeId2);
585
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc$1;
586
- if (style) {
587
- if (typeof style === "string") {
588
- styleContainerNode = styleContainerNode.head || styleContainerNode;
589
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
590
- let styleElm;
591
- if (!appliedStyles) {
592
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
593
- }
594
- if (!appliedStyles.has(scopeId2)) {
595
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
596
- styleElm.innerHTML = style;
597
- } else {
598
- styleElm = doc$1.createElement("style");
599
- styleElm.innerHTML = style;
600
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc$1);
601
- if (nonce != null) {
602
- styleElm.setAttribute("nonce", nonce);
603
- }
604
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
605
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
606
- }
607
- const injectStyle = (
608
- /**
609
- * we render a scoped component
610
- */
611
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
612
- * we are using shadow dom and render the style tag within the shadowRoot
613
- */
614
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
615
- );
616
- if (injectStyle) {
617
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
618
- }
619
- }
620
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
621
- styleElm.innerHTML += SLOT_FB_CSS;
622
- }
623
- if (appliedStyles) {
624
- appliedStyles.add(scopeId2);
625
- }
626
- }
627
- }
628
- }
629
- return scopeId2;
630
- };
631
- var attachStyles = (hostRef) => {
632
- const cmpMeta = hostRef.$cmpMeta$;
633
- const elm = hostRef.$hostElement$;
634
- const flags = cmpMeta.$flags$;
635
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
636
- const scopeId2 = addStyle(
637
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
638
- cmpMeta,
639
- hostRef.$modeName$
640
- );
641
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
642
- elm["s-sc"] = scopeId2;
643
- elm.classList.add(scopeId2 + "-h");
644
- if (flags & 2 /* scopedCssEncapsulation */) {
645
- elm.classList.add(scopeId2 + "-s");
646
- }
647
- }
648
- endAttachStyles();
649
- };
650
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
651
563
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
652
564
  if (oldValue !== newValue) {
653
565
  let isProp = isMemberInElement(elm, memberName);
@@ -656,6 +568,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
656
568
  const classList = elm.classList;
657
569
  const oldClasses = parseClassList(oldValue);
658
570
  const newClasses = parseClassList(newValue);
571
+ if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
572
+ newClasses.push(elm["s-si"]);
573
+ }
659
574
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
660
575
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
661
576
  } else if (memberName === "style") {
@@ -706,7 +621,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
706
621
  if (memberName === "list") {
707
622
  isProp = false;
708
623
  } else if (oldValue == null || elm[memberName] != n) {
709
- elm[memberName] = n;
624
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
625
+ elm[memberName] = n;
626
+ } else {
627
+ elm.setAttribute(memberName, n);
628
+ }
710
629
  }
711
630
  } else {
712
631
  elm[memberName] = newValue;
@@ -741,7 +660,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
741
660
  }
742
661
  };
743
662
  var parseClassListRegex = /\s/;
744
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
663
+ var parseClassList = (value) => {
664
+ if (typeof value === "object" && "baseVal" in value) {
665
+ value = value.baseVal;
666
+ }
667
+ if (!value) {
668
+ return [];
669
+ }
670
+ return value.split(parseClassListRegex);
671
+ };
745
672
  var CAPTURE_EVENT_SUFFIX = "Capture";
746
673
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
747
674
 
@@ -865,7 +792,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
865
792
  };
866
793
  var putBackInOriginalLocation = (parentElm, recursive) => {
867
794
  plt.$flags$ |= 1 /* isTmpDisconnected */;
868
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
795
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
869
796
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
870
797
  let node = parentElm;
871
798
  while (node = node.nextSibling) {
@@ -1079,7 +1006,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1079
1006
  }
1080
1007
  };
1081
1008
  var updateFallbackSlotVisibility = (elm) => {
1082
- const childNodes = elm.childNodes;
1009
+ const childNodes = elm.__childNodes || elm.childNodes;
1083
1010
  for (const childNode of childNodes) {
1084
1011
  if (childNode.nodeType === 1 /* ElementNode */) {
1085
1012
  if (childNode["s-sr"]) {
@@ -1092,7 +1019,7 @@ var updateFallbackSlotVisibility = (elm) => {
1092
1019
  childNode.hidden = true;
1093
1020
  break;
1094
1021
  }
1095
- } else {
1022
+ } else if (slotName === siblingNode["s-sn"]) {
1096
1023
  if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1097
1024
  childNode.hidden = true;
1098
1025
  break;
@@ -1110,9 +1037,10 @@ var markSlotContentForRelocation = (elm) => {
1110
1037
  let node;
1111
1038
  let hostContentNodes;
1112
1039
  let j;
1113
- for (const childNode of elm.childNodes) {
1040
+ const children = elm.__childNodes || elm.childNodes;
1041
+ for (const childNode of children) {
1114
1042
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1115
- hostContentNodes = node.parentNode.childNodes;
1043
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1116
1044
  const slotName = childNode["s-sn"];
1117
1045
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1118
1046
  node = hostContentNodes[j];
@@ -1199,9 +1127,9 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1199
1127
  if (element && parent && element.nodeType === 1 /* ElementNode */) {
1200
1128
  const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1201
1129
  if (scopeIds.size) {
1202
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1130
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1203
1131
  if (element["s-ol"] || iterateChildNodes) {
1204
- for (const childNode of Array.from(element.childNodes)) {
1132
+ for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1205
1133
  updateElementScopeIds(childNode, element, true);
1206
1134
  }
1207
1135
  }
@@ -1312,6 +1240,519 @@ var slotReferenceDebugNode = (slotVNode) => doc$1.createComment(
1312
1240
  var originalLocationDebugNode = (nodeToRelocate) => doc$1.createComment(
1313
1241
  `org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
1314
1242
  );
1243
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1244
+ let slottedNodeLocation;
1245
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1246
+ slottedNodeLocation = newChild["s-ol"];
1247
+ } else {
1248
+ slottedNodeLocation = document.createTextNode("");
1249
+ slottedNodeLocation["s-nr"] = newChild;
1250
+ }
1251
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1252
+ const parent = slotNode["s-cr"].parentNode;
1253
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1254
+ if (typeof position !== "undefined") {
1255
+ {
1256
+ slottedNodeLocation["s-oo"] = position;
1257
+ const childNodes = parent.__childNodes || parent.childNodes;
1258
+ const slotRelocateNodes = [slottedNodeLocation];
1259
+ childNodes.forEach((n) => {
1260
+ if (n["s-nr"]) slotRelocateNodes.push(n);
1261
+ });
1262
+ slotRelocateNodes.sort((a, b) => {
1263
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1264
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1265
+ return 0;
1266
+ });
1267
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1268
+ }
1269
+ } else {
1270
+ appendMethod.call(parent, slottedNodeLocation);
1271
+ }
1272
+ newChild["s-ol"] = slottedNodeLocation;
1273
+ newChild["s-sh"] = slotNode["s-hn"];
1274
+ };
1275
+ var createTime = (fnName, tagName = "") => {
1276
+ {
1277
+ return () => {
1278
+ return;
1279
+ };
1280
+ }
1281
+ };
1282
+ var uniqueTime = (key, measureText) => {
1283
+ {
1284
+ return () => {
1285
+ return;
1286
+ };
1287
+ }
1288
+ };
1289
+
1290
+ // src/runtime/client-hydrate.ts
1291
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1292
+ const endHydrate = createTime("hydrateClient", tagName);
1293
+ const shadowRoot = hostElm.shadowRoot;
1294
+ const childRenderNodes = [];
1295
+ const slotNodes = [];
1296
+ const slottedNodes = [];
1297
+ const shadowRootNodes = shadowRoot ? [] : null;
1298
+ const vnode = newVNode(tagName, null);
1299
+ vnode.$elm$ = hostElm;
1300
+ if (!plt.$orgLocNodes$) {
1301
+ initializeDocumentHydrate(doc$1.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1302
+ }
1303
+ hostElm[HYDRATE_ID] = hostId;
1304
+ hostElm.removeAttribute(HYDRATE_ID);
1305
+ hostRef.$vnode$ = clientHydrate(
1306
+ vnode,
1307
+ childRenderNodes,
1308
+ slotNodes,
1309
+ shadowRootNodes,
1310
+ hostElm,
1311
+ hostElm,
1312
+ hostId,
1313
+ slottedNodes
1314
+ );
1315
+ let crIndex = 0;
1316
+ const crLength = childRenderNodes.length;
1317
+ let childRenderNode;
1318
+ for (crIndex; crIndex < crLength; crIndex++) {
1319
+ childRenderNode = childRenderNodes[crIndex];
1320
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1321
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1322
+ const node = childRenderNode.$elm$;
1323
+ if (!shadowRoot) {
1324
+ node["s-hn"] = tagName.toUpperCase();
1325
+ if (childRenderNode.$tag$ === "slot") {
1326
+ node["s-cr"] = hostElm["s-cr"];
1327
+ }
1328
+ }
1329
+ if (orgLocationNode && orgLocationNode.isConnected) {
1330
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1331
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1332
+ }
1333
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1334
+ if (!shadowRoot) {
1335
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1336
+ }
1337
+ }
1338
+ plt.$orgLocNodes$.delete(orgLocationId);
1339
+ }
1340
+ const hosts = [];
1341
+ let snIndex = 0;
1342
+ const snLen = slottedNodes.length;
1343
+ let slotGroup;
1344
+ let snGroupIdx;
1345
+ let snGroupLen;
1346
+ let slottedItem;
1347
+ for (snIndex; snIndex < snLen; snIndex++) {
1348
+ slotGroup = slottedNodes[snIndex];
1349
+ if (!slotGroup || !slotGroup.length) continue;
1350
+ snGroupLen = slotGroup.length;
1351
+ snGroupIdx = 0;
1352
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1353
+ slottedItem = slotGroup[snGroupIdx];
1354
+ if (!hosts[slottedItem.hostId]) {
1355
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1356
+ }
1357
+ if (!hosts[slottedItem.hostId]) continue;
1358
+ const hostEle = hosts[slottedItem.hostId];
1359
+ if (!hostEle.shadowRoot || !shadowRoot) {
1360
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1361
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1362
+ slottedItem.slot["s-cr"] = hostEle;
1363
+ } else {
1364
+ const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1365
+ slottedItem.slot["s-cr"] = hostChildren[0];
1366
+ }
1367
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1368
+ }
1369
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1370
+ hostEle.appendChild(slottedItem.node);
1371
+ }
1372
+ }
1373
+ }
1374
+ if (shadowRoot) {
1375
+ let rnIdex = 0;
1376
+ const rnLen = shadowRootNodes.length;
1377
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1378
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1379
+ }
1380
+ Array.from(hostElm.childNodes).forEach((node) => {
1381
+ if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1382
+ node.parentNode.removeChild(node);
1383
+ }
1384
+ });
1385
+ }
1386
+ hostRef.$hostElement$ = hostElm;
1387
+ endHydrate();
1388
+ };
1389
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1390
+ let childNodeType;
1391
+ let childIdSplt;
1392
+ let childVNode;
1393
+ let i2;
1394
+ const scopeId2 = hostElm["s-sc"];
1395
+ if (node.nodeType === 1 /* ElementNode */) {
1396
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1397
+ if (childNodeType) {
1398
+ childIdSplt = childNodeType.split(".");
1399
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1400
+ childVNode = createSimpleVNode({
1401
+ $flags$: 0,
1402
+ $hostId$: childIdSplt[0],
1403
+ $nodeId$: childIdSplt[1],
1404
+ $depth$: childIdSplt[2],
1405
+ $index$: childIdSplt[3],
1406
+ $tag$: node.tagName.toLowerCase(),
1407
+ $elm$: node,
1408
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1409
+ // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1410
+ $attrs$: { class: node.className }
1411
+ });
1412
+ childRenderNodes.push(childVNode);
1413
+ node.removeAttribute(HYDRATE_CHILD_ID);
1414
+ if (!parentVNode.$children$) {
1415
+ parentVNode.$children$ = [];
1416
+ }
1417
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1418
+ if (typeof slotName === "string") {
1419
+ if (childVNode.$tag$ === "slot-fb") {
1420
+ addSlot(
1421
+ slotName,
1422
+ childIdSplt[2],
1423
+ childVNode,
1424
+ node,
1425
+ parentVNode,
1426
+ childRenderNodes,
1427
+ slotNodes,
1428
+ shadowRootNodes,
1429
+ slottedNodes
1430
+ );
1431
+ }
1432
+ childVNode.$elm$["s-sn"] = slotName;
1433
+ childVNode.$elm$.removeAttribute("s-sn");
1434
+ }
1435
+ if (childVNode.$index$ !== void 0) {
1436
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1437
+ }
1438
+ if (scopeId2) node["s-si"] = scopeId2;
1439
+ parentVNode = childVNode;
1440
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1441
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1442
+ }
1443
+ }
1444
+ }
1445
+ if (node.shadowRoot) {
1446
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1447
+ clientHydrate(
1448
+ parentVNode,
1449
+ childRenderNodes,
1450
+ slotNodes,
1451
+ shadowRootNodes,
1452
+ hostElm,
1453
+ node.shadowRoot.childNodes[i2],
1454
+ hostId,
1455
+ slottedNodes
1456
+ );
1457
+ }
1458
+ }
1459
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1460
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1461
+ clientHydrate(
1462
+ parentVNode,
1463
+ childRenderNodes,
1464
+ slotNodes,
1465
+ shadowRootNodes,
1466
+ hostElm,
1467
+ nonShadowNodes[i2],
1468
+ hostId,
1469
+ slottedNodes
1470
+ );
1471
+ }
1472
+ } else if (node.nodeType === 8 /* CommentNode */) {
1473
+ childIdSplt = node.nodeValue.split(".");
1474
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1475
+ childNodeType = childIdSplt[0];
1476
+ childVNode = createSimpleVNode({
1477
+ $hostId$: childIdSplt[1],
1478
+ $nodeId$: childIdSplt[2],
1479
+ $depth$: childIdSplt[3],
1480
+ $index$: childIdSplt[4] || "0",
1481
+ $elm$: node,
1482
+ $attrs$: null,
1483
+ $children$: null,
1484
+ $key$: null,
1485
+ $name$: null,
1486
+ $tag$: null,
1487
+ $text$: null
1488
+ });
1489
+ if (childNodeType === TEXT_NODE_ID) {
1490
+ childVNode.$elm$ = node.nextSibling;
1491
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1492
+ childVNode.$text$ = childVNode.$elm$.textContent;
1493
+ childRenderNodes.push(childVNode);
1494
+ node.remove();
1495
+ if (hostId === childVNode.$hostId$) {
1496
+ if (!parentVNode.$children$) {
1497
+ parentVNode.$children$ = [];
1498
+ }
1499
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1500
+ }
1501
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1502
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1503
+ }
1504
+ }
1505
+ } else if (childNodeType === COMMENT_NODE_ID) {
1506
+ childVNode.$elm$ = node.nextSibling;
1507
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1508
+ childRenderNodes.push(childVNode);
1509
+ node.remove();
1510
+ }
1511
+ } else if (childVNode.$hostId$ === hostId) {
1512
+ if (childNodeType === SLOT_NODE_ID) {
1513
+ childVNode.$tag$ = "slot";
1514
+ const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1515
+ addSlot(
1516
+ slotName,
1517
+ childIdSplt[2],
1518
+ childVNode,
1519
+ node,
1520
+ parentVNode,
1521
+ childRenderNodes,
1522
+ slotNodes,
1523
+ shadowRootNodes,
1524
+ slottedNodes
1525
+ );
1526
+ } else if (childNodeType === CONTENT_REF_ID) {
1527
+ if (shadowRootNodes) {
1528
+ node.remove();
1529
+ } else {
1530
+ hostElm["s-cr"] = node;
1531
+ node["s-cn"] = true;
1532
+ }
1533
+ }
1534
+ }
1535
+ }
1536
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1537
+ const vnode = newVNode(null, node.textContent);
1538
+ vnode.$elm$ = node;
1539
+ vnode.$index$ = "0";
1540
+ parentVNode.$children$ = [vnode];
1541
+ }
1542
+ return parentVNode;
1543
+ };
1544
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1545
+ if (node.nodeType === 1 /* ElementNode */) {
1546
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1547
+ if (componentId) {
1548
+ orgLocNodes.set(componentId, node);
1549
+ }
1550
+ let i2 = 0;
1551
+ if (node.shadowRoot) {
1552
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1553
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1554
+ }
1555
+ }
1556
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1557
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1558
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1559
+ }
1560
+ } else if (node.nodeType === 8 /* CommentNode */) {
1561
+ const childIdSplt = node.nodeValue.split(".");
1562
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1563
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1564
+ node.nodeValue = "";
1565
+ node["s-en"] = childIdSplt[3];
1566
+ }
1567
+ }
1568
+ };
1569
+ var createSimpleVNode = (vnode) => {
1570
+ const defaultVNode = {
1571
+ $flags$: 0,
1572
+ $hostId$: null,
1573
+ $nodeId$: null,
1574
+ $depth$: null,
1575
+ $index$: "0",
1576
+ $elm$: null,
1577
+ $attrs$: null,
1578
+ $children$: null,
1579
+ $key$: null,
1580
+ $name$: null,
1581
+ $tag$: null,
1582
+ $text$: null
1583
+ };
1584
+ return { ...defaultVNode, ...vnode };
1585
+ };
1586
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1587
+ node["s-sr"] = true;
1588
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1589
+ if (shadowRootNodes) {
1590
+ const slot = childVNode.$elm$ = doc$1.createElement(childVNode.$tag$);
1591
+ if (childVNode.$name$) {
1592
+ childVNode.$elm$.setAttribute("name", slotName);
1593
+ }
1594
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1595
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1596
+ } else {
1597
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1598
+ }
1599
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1600
+ node.remove();
1601
+ if (childVNode.$depth$ === "0") {
1602
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1603
+ }
1604
+ } else {
1605
+ const slot = childVNode.$elm$;
1606
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1607
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1608
+ if (shouldMove) {
1609
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1610
+ }
1611
+ childRenderNodes.push(childVNode);
1612
+ }
1613
+ slotNodes.push(childVNode);
1614
+ if (!parentVNode.$children$) {
1615
+ parentVNode.$children$ = [];
1616
+ }
1617
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1618
+ }
1619
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1620
+ let slottedNode = slotNode.nextSibling;
1621
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1622
+ 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 */))) {
1623
+ slottedNode["s-sn"] = slotName;
1624
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1625
+ slottedNode = slottedNode.nextSibling;
1626
+ }
1627
+ };
1628
+
1629
+ // src/runtime/mode.ts
1630
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1631
+ var setMode = (handler) => modeResolutionChain.push(handler);
1632
+ var getMode = (ref) => getHostRef(ref).$modeName$;
1633
+ var parsePropertyValue = (propValue, propType) => {
1634
+ if (propValue != null && !isComplexType(propValue)) {
1635
+ if (propType & 4 /* Boolean */) {
1636
+ return propValue === "false" ? false : propValue === "" || !!propValue;
1637
+ }
1638
+ if (propType & 2 /* Number */) {
1639
+ return parseFloat(propValue);
1640
+ }
1641
+ if (propType & 1 /* String */) {
1642
+ return String(propValue);
1643
+ }
1644
+ return propValue;
1645
+ }
1646
+ return propValue;
1647
+ };
1648
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1649
+
1650
+ // src/runtime/event-emitter.ts
1651
+ var createEvent = (ref, name, flags) => {
1652
+ const elm = getElement(ref);
1653
+ return {
1654
+ emit: (detail) => {
1655
+ return emitEvent(elm, name, {
1656
+ bubbles: !!(flags & 4 /* Bubbles */),
1657
+ composed: !!(flags & 2 /* Composed */),
1658
+ cancelable: !!(flags & 1 /* Cancellable */),
1659
+ detail
1660
+ });
1661
+ }
1662
+ };
1663
+ };
1664
+ var emitEvent = (elm, name, opts) => {
1665
+ const ev = plt.ce(name, opts);
1666
+ elm.dispatchEvent(ev);
1667
+ return ev;
1668
+ };
1669
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1670
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1671
+ let style = styles.get(scopeId2);
1672
+ {
1673
+ style = cssText;
1674
+ }
1675
+ styles.set(scopeId2, style);
1676
+ };
1677
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1678
+ var _a;
1679
+ const scopeId2 = getScopeId(cmpMeta, mode);
1680
+ const style = styles.get(scopeId2);
1681
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc$1;
1682
+ if (style) {
1683
+ if (typeof style === "string") {
1684
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1685
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1686
+ let styleElm;
1687
+ if (!appliedStyles) {
1688
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1689
+ }
1690
+ if (!appliedStyles.has(scopeId2)) {
1691
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1692
+ styleElm.innerHTML = style;
1693
+ } else {
1694
+ styleElm = doc$1.createElement("style");
1695
+ styleElm.innerHTML = style;
1696
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc$1);
1697
+ if (nonce != null) {
1698
+ styleElm.setAttribute("nonce", nonce);
1699
+ }
1700
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1701
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1702
+ }
1703
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1704
+ if (styleContainerNode.nodeName === "HEAD") {
1705
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1706
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1707
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1708
+ } else if ("host" in styleContainerNode) {
1709
+ {
1710
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1711
+ if (existingStyleContainer) {
1712
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1713
+ } else {
1714
+ styleContainerNode.prepend(styleElm);
1715
+ }
1716
+ }
1717
+ } else {
1718
+ styleContainerNode.append(styleElm);
1719
+ }
1720
+ }
1721
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1722
+ styleContainerNode.insertBefore(styleElm, null);
1723
+ }
1724
+ }
1725
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1726
+ styleElm.innerHTML += SLOT_FB_CSS;
1727
+ }
1728
+ if (appliedStyles) {
1729
+ appliedStyles.add(scopeId2);
1730
+ }
1731
+ }
1732
+ }
1733
+ }
1734
+ return scopeId2;
1735
+ };
1736
+ var attachStyles = (hostRef) => {
1737
+ const cmpMeta = hostRef.$cmpMeta$;
1738
+ const elm = hostRef.$hostElement$;
1739
+ const flags = cmpMeta.$flags$;
1740
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1741
+ const scopeId2 = addStyle(
1742
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1743
+ cmpMeta,
1744
+ hostRef.$modeName$
1745
+ );
1746
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1747
+ elm["s-sc"] = scopeId2;
1748
+ elm.classList.add(scopeId2 + "-h");
1749
+ if (flags & 2 /* scopedCssEncapsulation */) {
1750
+ elm.classList.add(scopeId2 + "-s");
1751
+ }
1752
+ }
1753
+ endAttachStyles();
1754
+ };
1755
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1315
1756
 
1316
1757
  // src/runtime/update-component.ts
1317
1758
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1558,16 +1999,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1558
1999
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1559
2000
  members.map(([memberName, [memberFlags]]) => {
1560
2001
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1561
- Object.defineProperty(prototype, memberName, {
1562
- get() {
1563
- return getValue(this, memberName);
1564
- },
1565
- set(newValue) {
1566
- setValue(this, memberName, newValue, cmpMeta);
1567
- },
1568
- configurable: true,
1569
- enumerable: true
1570
- });
2002
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2003
+ Object.defineProperty(prototype, memberName, {
2004
+ get() {
2005
+ return getValue(this, memberName);
2006
+ },
2007
+ set(newValue) {
2008
+ setValue(this, memberName, newValue, cmpMeta);
2009
+ },
2010
+ configurable: true,
2011
+ enumerable: true
2012
+ });
2013
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2014
+ {
2015
+ Object.defineProperty(prototype, memberName, {
2016
+ get() {
2017
+ const ref = getHostRef(this);
2018
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2019
+ if (!instance) return;
2020
+ return instance[memberName];
2021
+ },
2022
+ configurable: true,
2023
+ enumerable: true
2024
+ });
2025
+ }
2026
+ if (memberFlags & 4096 /* Setter */) {
2027
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2028
+ Object.defineProperty(prototype, memberName, {
2029
+ set(newValue) {
2030
+ const ref = getHostRef(this);
2031
+ if (origSetter) {
2032
+ const currentValue = ref.$hostElement$[memberName];
2033
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2034
+ ref.$instanceValues$.set(memberName, currentValue);
2035
+ }
2036
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2037
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2038
+ return;
2039
+ }
2040
+ if (!ref) return;
2041
+ const setterSetVal = () => {
2042
+ const currentValue = ref.$lazyInstance$[memberName];
2043
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2044
+ ref.$instanceValues$.set(memberName, currentValue);
2045
+ }
2046
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2047
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2048
+ };
2049
+ if (ref.$lazyInstance$) {
2050
+ setterSetVal();
2051
+ } else {
2052
+ ref.$onReadyPromise$.then(() => setterSetVal());
2053
+ }
2054
+ }
2055
+ });
2056
+ }
2057
+ }
1571
2058
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1572
2059
  Object.defineProperty(prototype, memberName, {
1573
2060
  value(...args) {
@@ -1607,7 +2094,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1607
2094
  }
1608
2095
  return;
1609
2096
  }
1610
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2097
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2098
+ if (!propDesc.get || !!propDesc.set) {
2099
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2100
+ }
1611
2101
  });
1612
2102
  };
1613
2103
  Cstr.observedAttributes = Array.from(
@@ -1726,6 +2216,9 @@ var connectedCallback = (elm) => {
1726
2216
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1727
2217
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1728
2218
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2219
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2220
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2221
+ elm["s-sc"] = scopeId2;
1729
2222
  }
1730
2223
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1731
2224
  }
@@ -1801,11 +2294,8 @@ var hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
1801
2294
  // src/runtime/vdom/vdom-annotations.ts
1802
2295
  var insertVdomAnnotations = (doc2, staticComponents) => {
1803
2296
  if (doc2 != null) {
1804
- const docData = {
1805
- hostIds: 0,
1806
- rootLevelIds: 0,
1807
- staticComponents: new Set(staticComponents)
1808
- };
2297
+ const docData = STENCIL_DOC_DATA in doc2 ? doc2[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
2298
+ docData.staticComponents = new Set(staticComponents);
1809
2299
  const orgLocationNodes = [];
1810
2300
  parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
1811
2301
  orgLocationNodes.forEach((orgLocationNode) => {
@@ -1822,6 +2312,9 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
1822
2312
  childId = `${hostId}.${nodeId}`;
1823
2313
  if (nodeRef.nodeType === 1 /* ElementNode */) {
1824
2314
  nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
2315
+ if (typeof nodeRef["s-sn"] === "string" && !nodeRef.getAttribute("slot")) {
2316
+ nodeRef.setAttribute("s-sn", nodeRef["s-sn"]);
2317
+ }
1825
2318
  } else if (nodeRef.nodeType === 3 /* TextNode */) {
1826
2319
  if (hostId === 0) {
1827
2320
  const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
@@ -1833,6 +2326,10 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
1833
2326
  const commentBeforeTextNode = doc2.createComment(childId);
1834
2327
  commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
1835
2328
  insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
2329
+ } else if (nodeRef.nodeType === 8 /* CommentNode */) {
2330
+ const commentBeforeTextNode = doc2.createComment(childId);
2331
+ commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
2332
+ nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
1836
2333
  }
1837
2334
  }
1838
2335
  let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
@@ -1913,6 +2410,9 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
1913
2410
  childElm["s-node-id"] = nodeId;
1914
2411
  if (childElm.nodeType === 1 /* ElementNode */) {
1915
2412
  childElm.setAttribute(HYDRATE_CHILD_ID, childId);
2413
+ if (typeof childElm["s-sn"] === "string" && !childElm.getAttribute("slot")) {
2414
+ childElm.setAttribute("s-sn", childElm["s-sn"]);
2415
+ }
1916
2416
  } else if (childElm.nodeType === 3 /* TextNode */) {
1917
2417
  const parentNode = childElm.parentNode;
1918
2418
  const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
@@ -2114,6 +2614,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
2114
2614
  };
2115
2615
  tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
2116
2616
  plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", doc$1.baseURI).href;
2617
+ globalScripts();
2117
2618
  patchChild2(win2.document.body);
2118
2619
  waitLoop2().then(hydratedComplete).catch(hydratedError);
2119
2620
  } catch (e) {
@@ -2337,7 +2838,9 @@ var plt = {
2337
2838
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2338
2839
  ce: (eventName, opts) => new win$2.CustomEvent(eventName, opts)
2339
2840
  };
2340
- var supportsShadow = BUILD.shadowDom;
2841
+ var setPlatformHelpers = (helpers) => {
2842
+ Object.assign(plt, helpers);
2843
+ };
2341
2844
  var hostRefs = /* @__PURE__ */ new WeakMap();
2342
2845
  var getHostRef = (ref) => hostRefs.get(ref);
2343
2846
  var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
@@ -2362,7 +2865,7 @@ var Build = {
2362
2865
  isTesting: false
2363
2866
  };
2364
2867
  var styles = /* @__PURE__ */ new Map();
2365
- var modeResolutionChain = [];
2868
+
2366
2869
 
2367
2870
  const transitionEndAsync = (el, expectedDuration = 0) => {
2368
2871
  return new Promise((resolve) => {
@@ -2734,132 +3237,6 @@ const reorderTwoSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2
2734
3237
  const searchOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z' stroke-miterlimit='10' class='ionicon-fill-none ionicon-stroke-width'/><path stroke-linecap='round' stroke-miterlimit='10' d='M338.29 338.29L448 448' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
2735
3238
  const searchSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M464 428L339.92 303.9a160.48 160.48 0 0030.72-94.58C370.64 120.37 298.27 48 209.32 48S48 120.37 48 209.32s72.37 161.32 161.32 161.32a160.48 160.48 0 0094.58-30.72L428 464zM209.32 319.69a110.38 110.38 0 11110.37-110.37 110.5 110.5 0 01-110.37 110.37z'/></svg>";
2736
3239
 
2737
- // TODO(FW-2832): types
2738
- class Config {
2739
- constructor() {
2740
- this.m = new Map();
2741
- }
2742
- reset(configObj) {
2743
- this.m = new Map(Object.entries(configObj));
2744
- }
2745
- get(key, fallback) {
2746
- const value = this.m.get(key);
2747
- return value !== undefined ? value : fallback;
2748
- }
2749
- getBoolean(key, fallback = false) {
2750
- const val = this.m.get(key);
2751
- if (val === undefined) {
2752
- return fallback;
2753
- }
2754
- if (typeof val === 'string') {
2755
- return val === 'true';
2756
- }
2757
- return !!val;
2758
- }
2759
- getNumber(key, fallback) {
2760
- const val = parseFloat(this.m.get(key));
2761
- return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
2762
- }
2763
- set(key, value) {
2764
- this.m.set(key, value);
2765
- }
2766
- }
2767
- const config = /*@__PURE__*/ new Config();
2768
-
2769
- const getPlatforms = (win) => setupPlatforms(win);
2770
- const isPlatform = (winOrPlatform, platform) => {
2771
- if (typeof winOrPlatform === 'string') {
2772
- platform = winOrPlatform;
2773
- winOrPlatform = undefined;
2774
- }
2775
- return getPlatforms(winOrPlatform).includes(platform);
2776
- };
2777
- const setupPlatforms = (win = window) => {
2778
- if (typeof win === 'undefined') {
2779
- return [];
2780
- }
2781
- win.Ionic = win.Ionic || {};
2782
- let platforms = win.Ionic.platforms;
2783
- if (platforms == null) {
2784
- platforms = win.Ionic.platforms = detectPlatforms(win);
2785
- platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`));
2786
- }
2787
- return platforms;
2788
- };
2789
- const detectPlatforms = (win) => {
2790
- const customPlatformMethods = config.get('platform');
2791
- return Object.keys(PLATFORMS_MAP).filter((p) => {
2792
- const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
2793
- return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
2794
- });
2795
- };
2796
- const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
2797
- const isIpad = (win) => {
2798
- // iOS 12 and below
2799
- if (testUserAgent(win, /iPad/i)) {
2800
- return true;
2801
- }
2802
- // iOS 13+
2803
- if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
2804
- return true;
2805
- }
2806
- return false;
2807
- };
2808
- const isIphone = (win) => testUserAgent(win, /iPhone/i);
2809
- const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
2810
- const isAndroid = (win) => testUserAgent(win, /android|sink/i);
2811
- const isAndroidTablet = (win) => {
2812
- return isAndroid(win) && !testUserAgent(win, /mobile/i);
2813
- };
2814
- const isPhablet = (win) => {
2815
- const width = win.innerWidth;
2816
- const height = win.innerHeight;
2817
- const smallest = Math.min(width, height);
2818
- const largest = Math.max(width, height);
2819
- return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
2820
- };
2821
- const isTablet = (win) => {
2822
- const width = win.innerWidth;
2823
- const height = win.innerHeight;
2824
- const smallest = Math.min(width, height);
2825
- const largest = Math.max(width, height);
2826
- return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
2827
- };
2828
- const isMobile = (win) => matchMedia$1(win, '(any-pointer:coarse)');
2829
- const isDesktop = (win) => !isMobile(win);
2830
- const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
2831
- const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
2832
- const isCapacitorNative = (win) => {
2833
- const capacitor = win['Capacitor'];
2834
- return !!(capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative);
2835
- };
2836
- const isElectron = (win) => testUserAgent(win, /electron/i);
2837
- const isPWA = (win) => { var _a; return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone); };
2838
- const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
2839
- const matchMedia$1 = (win, query) => { var _a; return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches; };
2840
- const PLATFORMS_MAP = {
2841
- ipad: isIpad,
2842
- iphone: isIphone,
2843
- ios: isIOS,
2844
- android: isAndroid,
2845
- phablet: isPhablet,
2846
- tablet: isTablet,
2847
- cordova: isCordova,
2848
- capacitor: isCapacitorNative,
2849
- electron: isElectron,
2850
- pwa: isPWA,
2851
- mobile: isMobile,
2852
- mobileweb: isMobileWeb,
2853
- desktop: isDesktop,
2854
- hybrid: isHybrid,
2855
- };
2856
-
2857
- // TODO(FW-2832): types
2858
- let defaultMode;
2859
- const getIonMode$1 = (ref) => {
2860
- return (ref && getMode(ref)) || defaultMode;
2861
- };
2862
-
2863
3240
  const accordionIosCss = ":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}";
2864
3241
  var IonAccordionIosStyle0 = accordionIosCss;
2865
3242
 
@@ -4278,9 +4655,9 @@ const now = (ev) => {
4278
4655
  };
4279
4656
 
4280
4657
  var index = /*#__PURE__*/Object.freeze({
4281
- __proto__: null,
4282
- createGesture: createGesture,
4283
- GESTURE_CONTROLLER: GESTURE_CONTROLLER
4658
+ __proto__: null,
4659
+ createGesture: createGesture,
4660
+ GESTURE_CONTROLLER: GESTURE_CONTROLLER
4284
4661
  });
4285
4662
 
4286
4663
  const createButtonActiveGesture = (el, isButton) => {
@@ -33673,9 +34050,9 @@ const iosTransitionAnimation = (navEl, opts) => {
33673
34050
  const LARGE_TITLE_SIZE_OFFSET = 10;
33674
34051
 
33675
34052
  var ios_transition = /*#__PURE__*/Object.freeze({
33676
- __proto__: null,
33677
- shadow: shadow,
33678
- iosTransitionAnimation: iosTransitionAnimation
34053
+ __proto__: null,
34054
+ shadow: shadow,
34055
+ iosTransitionAnimation: iosTransitionAnimation
33679
34056
  });
33680
34057
 
33681
34058
  const mdTransitionAnimation = (_, opts) => {
@@ -33726,8 +34103,8 @@ const mdTransitionAnimation = (_, opts) => {
33726
34103
  };
33727
34104
 
33728
34105
  var md_transition = /*#__PURE__*/Object.freeze({
33729
- __proto__: null,
33730
- mdTransitionAnimation: mdTransitionAnimation
34106
+ __proto__: null,
34107
+ mdTransitionAnimation: mdTransitionAnimation
33731
34108
  });
33732
34109
 
33733
34110
  const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {
@@ -33801,8 +34178,8 @@ const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandl
33801
34178
  };
33802
34179
 
33803
34180
  var swipeBack = /*#__PURE__*/Object.freeze({
33804
- __proto__: null,
33805
- createSwipeBackGesture: createSwipeBackGesture
34181
+ __proto__: null,
34182
+ createSwipeBackGesture: createSwipeBackGesture
33806
34183
  });
33807
34184
 
33808
34185
  exports.hydrateApp = hydrateApp;
@@ -33815,8 +34192,105 @@ exports.hydrateApp = hydrateApp;
33815
34192
  hydrateAppClosure($stencilWindow);
33816
34193
  }
33817
34194
 
34195
+ // src/app-data/index.ts
34196
+ var BUILD = {
34197
+ allRenderFn: false,
34198
+ cmpDidLoad: true,
34199
+ cmpDidUnload: false,
34200
+ cmpDidUpdate: true,
34201
+ cmpDidRender: true,
34202
+ cmpWillLoad: true,
34203
+ cmpWillUpdate: true,
34204
+ cmpWillRender: true,
34205
+ connectedCallback: true,
34206
+ disconnectedCallback: true,
34207
+ element: true,
34208
+ event: true,
34209
+ hasRenderFn: true,
34210
+ lifecycle: true,
34211
+ hostListener: true,
34212
+ hostListenerTargetWindow: true,
34213
+ hostListenerTargetDocument: true,
34214
+ hostListenerTargetBody: true,
34215
+ hostListenerTargetParent: false,
34216
+ hostListenerTarget: true,
34217
+ member: true,
34218
+ method: true,
34219
+ mode: true,
34220
+ observeAttribute: true,
34221
+ prop: true,
34222
+ propMutable: true,
34223
+ reflect: true,
34224
+ scoped: true,
34225
+ shadowDom: true,
34226
+ slot: true,
34227
+ cssAnnotations: true,
34228
+ state: true,
34229
+ style: true,
34230
+ formAssociated: false,
34231
+ svg: true,
34232
+ updatable: true,
34233
+ vdomAttribute: true,
34234
+ vdomXlink: true,
34235
+ vdomClass: true,
34236
+ vdomFunctional: true,
34237
+ vdomKey: true,
34238
+ vdomListener: true,
34239
+ vdomRef: true,
34240
+ vdomPropOrAttr: true,
34241
+ vdomRender: true,
34242
+ vdomStyle: true,
34243
+ vdomText: true,
34244
+ watchCallback: true,
34245
+ taskQueue: true,
34246
+ hotModuleReplacement: false,
34247
+ isDebug: false,
34248
+ isDev: false,
34249
+ isTesting: false,
34250
+ hydrateServerSide: false,
34251
+ hydrateClientSide: false,
34252
+ lifecycleDOMEvents: false,
34253
+ lazyLoad: false,
34254
+ profile: false,
34255
+ slotRelocation: true,
34256
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34257
+ appendChildSlotFix: false,
34258
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34259
+ cloneNodeFix: false,
34260
+ hydratedAttribute: false,
34261
+ hydratedClass: true,
34262
+ // TODO(STENCIL-1305): remove this option
34263
+ scriptDataOpts: false,
34264
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34265
+ scopedSlotTextContentFix: false,
34266
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
34267
+ shadowDomShim: false,
34268
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34269
+ slotChildNodesFix: false,
34270
+ invisiblePrehydration: true,
34271
+ propBoolean: true,
34272
+ propNumber: true,
34273
+ propString: true,
34274
+ constructableCSS: true,
34275
+ cmpShouldUpdate: true,
34276
+ devTools: false,
34277
+ shadowDelegatesFocus: true,
34278
+ initializeNextTick: false,
34279
+ asyncLoading: true,
34280
+ asyncQueue: false,
34281
+ transformTagName: false,
34282
+ attachStyles: true,
34283
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34284
+ experimentalSlotFixes: false
34285
+ };
34286
+ var Env = {};
34287
+ var NAMESPACE = (
34288
+ /* default */
34289
+ "app"
34290
+ );
34291
+
33818
34292
  /*
33819
- Stencil Hydrate Runner v4.20.0 | MIT Licensed | https://stenciljs.com
34293
+ Stencil Hydrate Runner v4.23.0-dev.1735628762.fb8335e | MIT Licensed | https://stenciljs.com
33820
34294
  */
33821
34295
  var __defProp = Object.defineProperty;
33822
34296
  var __export = (target, all) => {
@@ -33829,6 +34303,8 @@ var CONTENT_REF_ID = "r";
33829
34303
  var ORG_LOCATION_ID = "o";
33830
34304
  var SLOT_NODE_ID = "s";
33831
34305
  var TEXT_NODE_ID = "t";
34306
+ var HYDRATE_ID = "s-id";
34307
+ var STENCIL_DOC_DATA = "_stencilDocData";
33832
34308
  var XLINK_NS = "http://www.w3.org/1999/xlink";
33833
34309
 
33834
34310
  // src/mock-doc/attribute.ts
@@ -34137,8 +34613,8 @@ function jsCaseToCssCase(str) {
34137
34613
 
34138
34614
  // src/mock-doc/custom-element-registry.ts
34139
34615
  var MockCustomElementRegistry = class {
34140
- constructor(win) {
34141
- this.win = win;
34616
+ constructor(win2) {
34617
+ this.win = win2;
34142
34618
  }
34143
34619
  define(tagName, cstr, options) {
34144
34620
  if (tagName.toLowerCase() !== tagName) {
@@ -34160,19 +34636,19 @@ var MockCustomElementRegistry = class {
34160
34636
  this.__whenDefined.delete(tagName);
34161
34637
  }
34162
34638
  }
34163
- const doc = this.win.document;
34164
- if (doc != null) {
34165
- const hosts = doc.querySelectorAll(tagName);
34639
+ const doc2 = this.win.document;
34640
+ if (doc2 != null) {
34641
+ const hosts = doc2.querySelectorAll(tagName);
34166
34642
  hosts.forEach((host) => {
34167
34643
  if (upgradedElements.has(host) === false) {
34168
- tempDisableCallbacks.add(doc);
34169
- const upgradedCmp = createCustomElement(this, doc, tagName);
34644
+ tempDisableCallbacks.add(doc2);
34645
+ const upgradedCmp = createCustomElement(this, doc2, tagName);
34170
34646
  for (let i = 0; i < host.childNodes.length; i++) {
34171
34647
  const childNode = host.childNodes[i];
34172
34648
  childNode.remove();
34173
34649
  upgradedCmp.appendChild(childNode);
34174
34650
  }
34175
- tempDisableCallbacks.delete(doc);
34651
+ tempDisableCallbacks.delete(doc2);
34176
34652
  if (proxyElements.has(host)) {
34177
34653
  proxyElements.set(host, upgradedCmp);
34178
34654
  }
@@ -34226,8 +34702,8 @@ var MockCustomElementRegistry = class {
34226
34702
  });
34227
34703
  }
34228
34704
  };
34229
- function createCustomElement(customElements, ownerDocument, tagName) {
34230
- const Cstr = customElements.get(tagName);
34705
+ function createCustomElement(customElements2, ownerDocument, tagName) {
34706
+ const Cstr = customElements2.get(tagName);
34231
34707
  if (Cstr != null) {
34232
34708
  const cmp = new Cstr(ownerDocument);
34233
34709
  cmp.nodeName = tagName.toUpperCase();
@@ -34275,8 +34751,8 @@ function connectNode(ownerDocument, node) {
34275
34751
  node.ownerDocument = ownerDocument;
34276
34752
  if (node.nodeType === 1 /* ELEMENT_NODE */) {
34277
34753
  if (ownerDocument != null && node.nodeName.includes("-")) {
34278
- const win = ownerDocument.defaultView;
34279
- if (win != null && typeof node.connectedCallback === "function" && node.isConnected) {
34754
+ const win2 = ownerDocument.defaultView;
34755
+ if (win2 != null && typeof node.connectedCallback === "function" && node.isConnected) {
34280
34756
  fireConnectedCallback(node);
34281
34757
  }
34282
34758
  const shadowRoot = node.shadowRoot;
@@ -38684,7 +39160,7 @@ var OpenElementStack = class {
38684
39160
  get currentTmplContentOrNode() {
38685
39161
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
38686
39162
  }
38687
- constructor(document, treeAdapter, handler) {
39163
+ constructor(document2, treeAdapter, handler) {
38688
39164
  this.treeAdapter = treeAdapter;
38689
39165
  this.handler = handler;
38690
39166
  this.items = [];
@@ -38692,7 +39168,7 @@ var OpenElementStack = class {
38692
39168
  this.stackTop = -1;
38693
39169
  this.tmplCount = 0;
38694
39170
  this.currentTagId = TAG_ID.UNKNOWN;
38695
- this.current = document;
39171
+ this.current = document2;
38696
39172
  }
38697
39173
  //Index of element
38698
39174
  _indexOf(element) {
@@ -39109,8 +39585,8 @@ var defaultTreeAdapter = {
39109
39585
  getTemplateContent(templateElement) {
39110
39586
  return templateElement.content;
39111
39587
  },
39112
- setDocumentType(document, name, publicId, systemId) {
39113
- const doctypeNode = document.childNodes.find((node) => node.nodeName === "#documentType");
39588
+ setDocumentType(document2, name, publicId, systemId) {
39589
+ const doctypeNode = document2.childNodes.find((node) => node.nodeName === "#documentType");
39114
39590
  if (doctypeNode) {
39115
39591
  doctypeNode.name = name;
39116
39592
  doctypeNode.publicId = publicId;
@@ -39123,14 +39599,14 @@ var defaultTreeAdapter = {
39123
39599
  systemId,
39124
39600
  parentNode: null
39125
39601
  };
39126
- defaultTreeAdapter.appendChild(document, node);
39602
+ defaultTreeAdapter.appendChild(document2, node);
39127
39603
  }
39128
39604
  },
39129
- setDocumentMode(document, mode) {
39130
- document.mode = mode;
39605
+ setDocumentMode(document2, mode) {
39606
+ document2.mode = mode;
39131
39607
  },
39132
- getDocumentMode(document) {
39133
- return document.mode;
39608
+ getDocumentMode(document2) {
39609
+ return document2.mode;
39134
39610
  },
39135
39611
  detachNode(node) {
39136
39612
  if (node.parentNode) {
@@ -39611,7 +40087,7 @@ var defaultParserOptions = {
39611
40087
  onParseError: null
39612
40088
  };
39613
40089
  var Parser = class {
39614
- constructor(options, document, fragmentContext = null, scriptHandler = null) {
40090
+ constructor(options, document2, fragmentContext = null, scriptHandler = null) {
39615
40091
  this.fragmentContext = fragmentContext;
39616
40092
  this.scriptHandler = scriptHandler;
39617
40093
  this.currentToken = null;
@@ -39636,7 +40112,7 @@ var Parser = class {
39636
40112
  if (this.onParseError) {
39637
40113
  this.options.sourceCodeLocationInfo = true;
39638
40114
  }
39639
- this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();
40115
+ this.document = document2 !== null && document2 !== void 0 ? document2 : this.treeAdapter.createDocument();
39640
40116
  this.tokenizer = new Tokenizer(this.options, this);
39641
40117
  this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
39642
40118
  this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
@@ -42613,11 +43089,11 @@ function parseFragment(fragmentContext, html, options) {
42613
43089
  // src/mock-doc/parse-util.ts
42614
43090
  var docParser = /* @__PURE__ */ new WeakMap();
42615
43091
  function parseDocumentUtil(ownerDocument, html) {
42616
- const doc = parse(html.trim(), getParser(ownerDocument));
42617
- doc.documentElement = doc.firstElementChild;
42618
- doc.head = doc.documentElement.firstElementChild;
42619
- doc.body = doc.head.nextElementSibling;
42620
- return doc;
43092
+ const doc2 = parse(html.trim(), getParser(ownerDocument));
43093
+ doc2.documentElement = doc2.firstElementChild;
43094
+ doc2.head = doc2.documentElement.firstElementChild;
43095
+ doc2.body = doc2.head.nextElementSibling;
43096
+ return doc2;
42621
43097
  }
42622
43098
  function parseFragmentUtil(ownerDocument, html) {
42623
43099
  if (typeof html === "string") {
@@ -42635,9 +43111,9 @@ function getParser(ownerDocument) {
42635
43111
  }
42636
43112
  const treeAdapter = {
42637
43113
  createDocument() {
42638
- const doc = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
42639
- doc["x-mode"] = "no-quirks";
42640
- return doc;
43114
+ const doc2 = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
43115
+ doc2["x-mode"] = "no-quirks";
43116
+ return doc2;
42641
43117
  },
42642
43118
  setNodeSourceCodeLocation(node, location2) {
42643
43119
  node.sourceCodeLocation = location2;
@@ -42675,22 +43151,22 @@ function getParser(ownerDocument) {
42675
43151
  getTemplateContent(templateElement) {
42676
43152
  return templateElement.content;
42677
43153
  },
42678
- setDocumentType(doc, name, publicId, systemId) {
42679
- let doctypeNode = doc.childNodes.find((n) => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
43154
+ setDocumentType(doc2, name, publicId, systemId) {
43155
+ let doctypeNode = doc2.childNodes.find((n) => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
42680
43156
  if (doctypeNode == null) {
42681
43157
  doctypeNode = ownerDocument.createDocumentTypeNode();
42682
- doc.insertBefore(doctypeNode, doc.firstChild);
43158
+ doc2.insertBefore(doctypeNode, doc2.firstChild);
42683
43159
  }
42684
43160
  doctypeNode.nodeValue = "!DOCTYPE";
42685
43161
  doctypeNode["x-name"] = name;
42686
43162
  doctypeNode["x-publicId"] = publicId;
42687
43163
  doctypeNode["x-systemId"] = systemId;
42688
43164
  },
42689
- setDocumentMode(doc, mode) {
42690
- doc["x-mode"] = mode;
43165
+ setDocumentMode(doc2, mode) {
43166
+ doc2["x-mode"] = mode;
42691
43167
  },
42692
- getDocumentMode(doc) {
42693
- return doc["x-mode"];
43168
+ getDocumentMode(doc2) {
43169
+ return doc2["x-mode"];
42694
43170
  },
42695
43171
  detachNode(node) {
42696
43172
  node.remove();
@@ -42822,9 +43298,9 @@ var jquery_default = (
42822
43298
  nodeName: "HTML"
42823
43299
  }
42824
43300
  }
42825
- }, function(window, noGlobal) {
43301
+ }, function(window2, noGlobal) {
42826
43302
  "use strict";
42827
- if (!window.document) {
43303
+ if (!window2.document) {
42828
43304
  throw new Error("jQuery requires a window with a document");
42829
43305
  }
42830
43306
  var arr = [];
@@ -42859,16 +43335,16 @@ var jquery_default = (
42859
43335
  }
42860
43336
  return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
42861
43337
  }
42862
- var document = window.document;
43338
+ var document2 = window2.document;
42863
43339
  var preservedScriptAttributes = {
42864
43340
  type: true,
42865
43341
  src: true,
42866
43342
  nonce: true,
42867
43343
  noModule: true
42868
43344
  };
42869
- function DOMEval(code, node, doc) {
42870
- doc = doc || document;
42871
- var i2, script = doc.createElement("script");
43345
+ function DOMEval(code, node, doc2) {
43346
+ doc2 = doc2 || document2;
43347
+ var i2, script = doc2.createElement("script");
42872
43348
  script.text = code;
42873
43349
  if (node) {
42874
43350
  for (i2 in preservedScriptAttributes) {
@@ -42877,7 +43353,7 @@ var jquery_default = (
42877
43353
  }
42878
43354
  }
42879
43355
  }
42880
- doc.head.appendChild(script).parentNode.removeChild(script);
43356
+ doc2.head.appendChild(script).parentNode.removeChild(script);
42881
43357
  }
42882
43358
  const jQuery = {};
42883
43359
  var version = "4.0.0-pre+9352011a7.dirty +selector", rhtmlSuffix = /HTML$/i, jQueryOrig = function(selector, context) {
@@ -43014,8 +43490,8 @@ var jquery_default = (
43014
43490
  },
43015
43491
  // Evaluates a script in a provided context; falls back to the global one
43016
43492
  // if not specified.
43017
- globalEval: function(code, options, doc) {
43018
- DOMEval(code, { nonce: options && options.nonce }, doc);
43493
+ globalEval: function(code, options, doc2) {
43494
+ DOMEval(code, { nonce: options && options.nonce }, doc2);
43019
43495
  },
43020
43496
  each: function(obj, callback) {
43021
43497
  var length, i2 = 0;
@@ -43142,9 +43618,9 @@ var jquery_default = (
43142
43618
  }
43143
43619
  var pop = arr.pop;
43144
43620
  var whitespace = "[\\x20\\t\\r\\n\\f]";
43145
- var isIE = document.documentMode;
43621
+ var isIE = document2.documentMode;
43146
43622
  try {
43147
- document.querySelector(":has(*,:jqfake)");
43623
+ document2.querySelector(":has(*,:jqfake)");
43148
43624
  support.cssHas = false;
43149
43625
  } catch (e) {
43150
43626
  support.cssHas = true;
@@ -43176,7 +43652,7 @@ var jquery_default = (
43176
43652
  var rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*");
43177
43653
  var rdescend = new RegExp(whitespace + "|>");
43178
43654
  var rsibling = /[+~]/;
43179
- var documentElement = document.documentElement;
43655
+ var documentElement = document2.documentElement;
43180
43656
  var matches2 = documentElement.matches || documentElement.msMatchesSelector;
43181
43657
  function createCache() {
43182
43658
  var keys = [];
@@ -43345,10 +43821,10 @@ var jquery_default = (
43345
43821
  1
43346
43822
  );
43347
43823
  if (compare & 1) {
43348
- if (a == document || a.ownerDocument == document && jQuery.contains(document, a)) {
43824
+ if (a == document2 || a.ownerDocument == document2 && jQuery.contains(document2, a)) {
43349
43825
  return -1;
43350
43826
  }
43351
- if (b == document || b.ownerDocument == document && jQuery.contains(document, b)) {
43827
+ if (b == document2 || b.ownerDocument == document2 && jQuery.contains(document2, b)) {
43352
43828
  return 1;
43353
43829
  }
43354
43830
  return 0;
@@ -43504,14 +43980,14 @@ var jquery_default = (
43504
43980
  });
43505
43981
  }
43506
43982
  function setDocument(node) {
43507
- var subWindow, doc = node ? node.ownerDocument || node : document;
43508
- if (doc == document$1 || doc.nodeType !== 9) {
43983
+ var subWindow, doc2 = node ? node.ownerDocument || node : document2;
43984
+ if (doc2 == document$1 || doc2.nodeType !== 9) {
43509
43985
  return;
43510
43986
  }
43511
- document$1 = doc;
43987
+ document$1 = doc2;
43512
43988
  documentElement$1 = document$1.documentElement;
43513
43989
  documentIsHTML = !jQuery.isXMLDoc(document$1);
43514
- if (isIE && document != document$1 && (subWindow = document$1.defaultView) && subWindow.top !== subWindow) {
43990
+ if (isIE && document2 != document$1 && (subWindow = document$1.defaultView) && subWindow.top !== subWindow) {
43515
43991
  subWindow.addEventListener("unload", unloadHandler);
43516
43992
  }
43517
43993
  }
@@ -43742,7 +44218,7 @@ var jquery_default = (
43742
44218
  }),
43743
44219
  // Miscellaneous
43744
44220
  target: function(elem) {
43745
- var hash = window.location && window.location.hash;
44221
+ var hash = window2.location && window2.location.hash;
43746
44222
  return hash && hash.slice(1) === elem.id;
43747
44223
  },
43748
44224
  root: function(elem) {
@@ -44244,7 +44720,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
44244
44720
  text: []
44245
44721
  };
44246
44722
  let renderedNode = "";
44247
- const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm.childNodes);
44723
+ const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
44248
44724
  for (let i = 0, ii = children.length; i < ii; i++) {
44249
44725
  const child = children[i];
44250
44726
  const chunks = Array.from(streamToHtml(child, opts, output));
@@ -44277,7 +44753,10 @@ function* streamToHtml(node, opts, output) {
44277
44753
  const tag = tagName === shadowRootTag ? "template" : tagName;
44278
44754
  yield "<" + tag;
44279
44755
  output.currentLineWidth += tag.length + 1;
44280
- if (tag === "template") {
44756
+ if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode")) && /**
44757
+ * If the node is a shadow root, we want to add the `shadowrootmode` attribute
44758
+ */
44759
+ ("host" in node || node.nodeName.toLocaleLowerCase() === shadowRootTag)) {
44281
44760
  const mode = ` shadowrootmode="open"`;
44282
44761
  yield mode;
44283
44762
  output.currentLineWidth += mode.length;
@@ -44361,7 +44840,8 @@ style="${cssText}">`;
44361
44840
  output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
44362
44841
  yield* streamToHtml(shadowRoot, opts, output);
44363
44842
  output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
44364
- if (opts.newLines && (node.childNodes.length === 0 || node.childNodes.length === 1 && node.childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = node.childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
44843
+ const childNodes = getChildNodes(node);
44844
+ if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
44365
44845
  yield "\n";
44366
44846
  output.currentLineWidth = 0;
44367
44847
  for (let i = 0; i < output.indent; i++) {
@@ -44372,7 +44852,7 @@ style="${cssText}">`;
44372
44852
  }
44373
44853
  if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
44374
44854
  const tag = tagName === shadowRootTag ? "template" : tagName;
44375
- const childNodes = tagName === "template" ? node.content.childNodes : node.childNodes;
44855
+ const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
44376
44856
  const childNodeLength = childNodes.length;
44377
44857
  if (childNodeLength > 0) {
44378
44858
  if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
@@ -44382,6 +44862,13 @@ style="${cssText}">`;
44382
44862
  output.indent = output.indent + ((_h = opts.indentSpaces) != null ? _h : 0);
44383
44863
  }
44384
44864
  for (let i = 0; i < childNodeLength; i++) {
44865
+ const sId = node.attributes.getNamedItem(HYDRATE_ID);
44866
+ const isStencilDeclarativeShadowDOM = childNodes[i].nodeName.toLowerCase() === "template" && sId;
44867
+ if (isStencilDeclarativeShadowDOM) {
44868
+ yield `
44869
+ ${" ".repeat(output.indent)}<!--r.${sId.value}-->`;
44870
+ continue;
44871
+ }
44385
44872
  yield* streamToHtml(childNodes[i], opts, output);
44386
44873
  }
44387
44874
  if (ignoreTag === false) {
@@ -44538,6 +45025,9 @@ function isWithinWhitespaceSensitive(node) {
44538
45025
  }
44539
45026
  return false;
44540
45027
  }
45028
+ function getChildNodes(node) {
45029
+ return node.__childNodes || node.childNodes;
45030
+ }
44541
45031
  var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
44542
45032
  "STYLE",
44543
45033
  "SCRIPT",
@@ -44807,10 +45297,12 @@ var MockElement = class extends MockNode2 {
44807
45297
  attachInternals() {
44808
45298
  return new Proxy({}, {
44809
45299
  get: function(_target, prop, _receiver) {
44810
- console.error(
44811
- `NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
44812
- Testing components with ElementInternals is fully supported in e2e tests.`
44813
- );
45300
+ if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
45301
+ console.error(
45302
+ `NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
45303
+ Testing components with ElementInternals is fully supported in e2e tests.`
45304
+ );
45305
+ }
44814
45306
  }
44815
45307
  });
44816
45308
  }
@@ -45732,9 +46224,9 @@ function createElement(ownerDocument, tagName) {
45732
46224
  return new MockUListElement(ownerDocument);
45733
46225
  }
45734
46226
  if (ownerDocument != null && tagName.includes("-")) {
45735
- const win = ownerDocument.defaultView;
45736
- if (win != null && win.customElements != null) {
45737
- return createCustomElement(win.customElements, ownerDocument, tagName);
46227
+ const win2 = ownerDocument.defaultView;
46228
+ if (win2 != null && win2.customElements != null) {
46229
+ return createCustomElement(win2.customElements, ownerDocument, tagName);
45738
46230
  }
45739
46231
  }
45740
46232
  return new MockHTMLElement(ownerDocument, tagName);
@@ -45780,6 +46272,9 @@ var MockAnchorElement = class extends MockHTMLElement {
45780
46272
  this.setAttribute("href", value);
45781
46273
  }
45782
46274
  get pathname() {
46275
+ if (!this.href) {
46276
+ return "";
46277
+ }
45783
46278
  return new URL(this.href).pathname;
45784
46279
  }
45785
46280
  };
@@ -45797,6 +46292,11 @@ patchPropAttributes(
45797
46292
  type: "submit"
45798
46293
  }
45799
46294
  );
46295
+ Object.defineProperty(MockButtonElement.prototype, "form", {
46296
+ get() {
46297
+ return this.hasAttribute("form") ? this.getAttribute("form") : null;
46298
+ }
46299
+ });
45800
46300
  var MockImageElement = class extends MockHTMLElement {
45801
46301
  constructor(ownerDocument) {
45802
46302
  super(ownerDocument, "img");
@@ -46151,9 +46651,9 @@ var CanvasRenderingContext = class {
46151
46651
  }
46152
46652
  clearRect() {
46153
46653
  }
46154
- getImageData(_, __, w, h) {
46654
+ getImageData(_, __, w, h2) {
46155
46655
  return {
46156
- data: new Array(w * h * 4)
46656
+ data: new Array(w * h2 * 4)
46157
46657
  };
46158
46658
  }
46159
46659
  toDataURL() {
@@ -46215,9 +46715,9 @@ var MockCanvasElement = class extends MockHTMLElement {
46215
46715
  function fullUrl(elm, attrName) {
46216
46716
  const val = elm.getAttribute(attrName) || "";
46217
46717
  if (elm.ownerDocument != null) {
46218
- const win = elm.ownerDocument.defaultView;
46219
- if (win != null) {
46220
- const loc = win.location;
46718
+ const win2 = elm.ownerDocument.defaultView;
46719
+ if (win2 != null) {
46720
+ const loc = win2.location;
46221
46721
  if (loc != null) {
46222
46722
  try {
46223
46723
  const url = new URL(val, loc.href);
@@ -46822,6 +47322,71 @@ function resetPerformance(perf) {
46822
47322
  }
46823
47323
  }
46824
47324
 
47325
+ // src/mock-doc/resize-observer.ts
47326
+ var MockResizeObserver = class {
47327
+ constructor() {
47328
+ }
47329
+ disconnect() {
47330
+ }
47331
+ observe() {
47332
+ }
47333
+ takeRecords() {
47334
+ return [];
47335
+ }
47336
+ unobserve() {
47337
+ }
47338
+ };
47339
+
47340
+ // src/mock-doc/shadow-root.ts
47341
+ var MockShadowRoot = class extends MockDocumentFragment {
47342
+ get activeElement() {
47343
+ return null;
47344
+ }
47345
+ set adoptedStyleSheets(_adoptedStyleSheets) {
47346
+ throw new Error("Unimplemented");
47347
+ }
47348
+ get adoptedStyleSheets() {
47349
+ return [];
47350
+ }
47351
+ get cloneable() {
47352
+ return false;
47353
+ }
47354
+ get delegatesFocus() {
47355
+ return false;
47356
+ }
47357
+ get fullscreenElement() {
47358
+ return null;
47359
+ }
47360
+ get host() {
47361
+ let parent = this.parentElement();
47362
+ while (parent) {
47363
+ if (parent.nodeType === 11) {
47364
+ return parent;
47365
+ }
47366
+ parent = parent.parentElement();
47367
+ }
47368
+ return null;
47369
+ }
47370
+ get mode() {
47371
+ return "open";
47372
+ }
47373
+ get pictureInPictureElement() {
47374
+ return null;
47375
+ }
47376
+ get pointerLockElement() {
47377
+ return null;
47378
+ }
47379
+ get serializable() {
47380
+ return false;
47381
+ }
47382
+ get slotAssignment() {
47383
+ return "named";
47384
+ }
47385
+ get styleSheets() {
47386
+ return [];
47387
+ }
47388
+ };
47389
+
46825
47390
  // src/mock-doc/storage.ts
46826
47391
  var MockStorage = class {
46827
47392
  constructor() {
@@ -46851,11 +47416,11 @@ var MockStorage = class {
46851
47416
  };
46852
47417
 
46853
47418
  // src/mock-doc/window.ts
46854
- var nativeClearInterval = clearInterval;
46855
- var nativeClearTimeout = clearTimeout;
46856
- var nativeSetInterval = setInterval;
46857
- var nativeSetTimeout = setTimeout;
46858
- var nativeURL = URL;
47419
+ var nativeClearInterval = globalThis.clearInterval;
47420
+ var nativeClearTimeout = globalThis.clearTimeout;
47421
+ var nativeSetInterval = globalThis.setInterval;
47422
+ var nativeSetTimeout = globalThis.setTimeout;
47423
+ var nativeURL = globalThis.URL;
46859
47424
  var nativeWindow = globalThis.window;
46860
47425
  var MockWindow = class {
46861
47426
  constructor(html = null) {
@@ -46922,10 +47487,10 @@ var MockWindow = class {
46922
47487
  }
46923
47488
  get Document() {
46924
47489
  if (this.__docCstr == null) {
46925
- const win = this;
47490
+ const win2 = this;
46926
47491
  this.__docCstr = class extends MockDocument {
46927
47492
  constructor() {
46928
- super(false, win);
47493
+ super(false, win2);
46929
47494
  throw new Error("Illegal constructor: cannot construct Document");
46930
47495
  }
46931
47496
  };
@@ -46950,6 +47515,9 @@ var MockWindow = class {
46950
47515
  set DocumentFragment(docFragCstr) {
46951
47516
  this.__docFragCstr = docFragCstr;
46952
47517
  }
47518
+ get ShadowRoot() {
47519
+ return MockShadowRoot;
47520
+ }
46953
47521
  get DocumentType() {
46954
47522
  if (this.__docTypeCstr == null) {
46955
47523
  const ownerDocument = this.document;
@@ -47061,6 +47629,9 @@ var MockWindow = class {
47061
47629
  get IntersectionObserver() {
47062
47630
  return MockIntersectionObserver;
47063
47631
  }
47632
+ get ResizeObserver() {
47633
+ return MockResizeObserver;
47634
+ }
47064
47635
  get localStorage() {
47065
47636
  if (this.__localStorage == null) {
47066
47637
  this.__localStorage = new MockStorage();
@@ -47442,14 +48013,14 @@ var MockWindow = class {
47442
48013
  }
47443
48014
  };
47444
48015
  addGlobalsToWindowPrototype(MockWindow.prototype);
47445
- function resetWindowDefaults(win) {
47446
- win.__clearInterval = nativeClearInterval;
47447
- win.__clearTimeout = nativeClearTimeout;
47448
- win.__setInterval = nativeSetInterval;
47449
- win.__setTimeout = nativeSetTimeout;
47450
- win.__maxTimeout = 3e4;
47451
- win.__allowInterval = true;
47452
- win.URL = nativeURL;
48016
+ function resetWindowDefaults(win2) {
48017
+ win2.__clearInterval = nativeClearInterval;
48018
+ win2.__clearTimeout = nativeClearTimeout;
48019
+ win2.__setInterval = nativeSetInterval;
48020
+ win2.__setTimeout = nativeSetTimeout;
48021
+ win2.__maxTimeout = 3e4;
48022
+ win2.__allowInterval = true;
48023
+ win2.URL = nativeURL;
47453
48024
  }
47454
48025
  function cloneWindow(srcWin, opts = {}) {
47455
48026
  if (srcWin == null) {
@@ -47468,72 +48039,72 @@ function cloneWindow(srcWin, opts = {}) {
47468
48039
  }
47469
48040
  return clonedWin;
47470
48041
  }
47471
- function constrainTimeouts(win) {
47472
- win.__allowInterval = false;
47473
- win.__maxTimeout = 0;
48042
+ function constrainTimeouts(win2) {
48043
+ win2.__allowInterval = false;
48044
+ win2.__maxTimeout = 0;
47474
48045
  }
47475
- function resetWindow(win) {
47476
- if (win != null) {
47477
- if (win.__timeouts) {
47478
- win.__timeouts.forEach((timeoutId) => {
48046
+ function resetWindow(win2) {
48047
+ if (win2 != null) {
48048
+ if (win2.__timeouts) {
48049
+ win2.__timeouts.forEach((timeoutId) => {
47479
48050
  nativeClearInterval(timeoutId);
47480
48051
  nativeClearTimeout(timeoutId);
47481
48052
  });
47482
- win.__timeouts.clear();
48053
+ win2.__timeouts.clear();
47483
48054
  }
47484
- if (win.customElements && win.customElements.clear) {
47485
- win.customElements.clear();
48055
+ if (win2.customElements && win2.customElements.clear) {
48056
+ win2.customElements.clear();
47486
48057
  }
47487
- resetDocument(win.document);
47488
- resetPerformance(win.performance);
47489
- for (const key in win) {
47490
- if (win.hasOwnProperty(key) && key !== "document" && key !== "performance" && key !== "customElements") {
47491
- delete win[key];
48058
+ resetDocument(win2.document);
48059
+ resetPerformance(win2.performance);
48060
+ for (const key in win2) {
48061
+ if (win2.hasOwnProperty(key) && key !== "document" && key !== "performance" && key !== "customElements") {
48062
+ delete win2[key];
47492
48063
  }
47493
48064
  }
47494
- resetWindowDefaults(win);
47495
- resetWindowDimensions(win);
47496
- resetEventListeners(win);
47497
- if (win.document != null) {
48065
+ resetWindowDefaults(win2);
48066
+ resetWindowDimensions(win2);
48067
+ resetEventListeners(win2);
48068
+ if (win2.document != null) {
47498
48069
  try {
47499
- win.document.defaultView = win;
48070
+ win2.document.defaultView = win2;
47500
48071
  } catch (e) {
47501
48072
  }
47502
48073
  }
47503
- win.fetch = null;
47504
- win.Headers = null;
47505
- win.Request = null;
47506
- win.Response = null;
47507
- win.FetchError = null;
48074
+ win2.fetch = null;
48075
+ win2.Headers = null;
48076
+ win2.Request = null;
48077
+ win2.Response = null;
48078
+ win2.FetchError = null;
47508
48079
  }
47509
48080
  }
47510
- function resetWindowDimensions(win) {
48081
+ function resetWindowDimensions(win2) {
47511
48082
  try {
47512
- win.devicePixelRatio = 1;
47513
- win.innerHeight = 768;
47514
- win.innerWidth = 1366;
47515
- win.pageXOffset = 0;
47516
- win.pageYOffset = 0;
47517
- win.screenLeft = 0;
47518
- win.screenTop = 0;
47519
- win.screenX = 0;
47520
- win.screenY = 0;
47521
- win.scrollX = 0;
47522
- win.scrollY = 0;
47523
- win.screen = {
47524
- availHeight: win.innerHeight,
48083
+ win2.devicePixelRatio = 1;
48084
+ win2.innerHeight = 768;
48085
+ win2.innerWidth = 1366;
48086
+ win2.pageXOffset = 0;
48087
+ win2.pageYOffset = 0;
48088
+ win2.screenLeft = 0;
48089
+ win2.screenTop = 0;
48090
+ win2.screenX = 0;
48091
+ win2.screenY = 0;
48092
+ win2.scrollX = 0;
48093
+ win2.scrollY = 0;
48094
+ win2.screen = {
48095
+ availHeight: win2.innerHeight,
47525
48096
  availLeft: 0,
47526
48097
  availTop: 0,
47527
- availWidth: win.innerWidth,
48098
+ availWidth: win2.innerWidth,
47528
48099
  colorDepth: 24,
47529
- height: win.innerHeight,
48100
+ height: win2.innerHeight,
47530
48101
  keepAwake: false,
47531
48102
  orientation: {
47532
48103
  angle: 0,
47533
48104
  type: "portrait-primary"
47534
48105
  },
47535
48106
  pixelDepth: 24,
47536
- width: win.innerWidth
48107
+ width: win2.innerWidth
47537
48108
  };
47538
48109
  } catch (e) {
47539
48110
  }
@@ -47541,11 +48112,11 @@ function resetWindowDimensions(win) {
47541
48112
 
47542
48113
  // src/mock-doc/document.ts
47543
48114
  var MockDocument = class _MockDocument extends MockHTMLElement {
47544
- constructor(html = null, win = null) {
48115
+ constructor(html = null, win2 = null) {
47545
48116
  super(null, null);
47546
48117
  this.nodeName = "#document" /* DOCUMENT_NODE */;
47547
48118
  this.nodeType = 9 /* DOCUMENT_NODE */;
47548
- this.defaultView = win;
48119
+ this.defaultView = win2;
47549
48120
  this.cookie = "";
47550
48121
  this.referrer = "";
47551
48122
  this.appendChild(this.createDocumentTypeNode());
@@ -47692,10 +48263,10 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
47692
48263
  }
47693
48264
  createElement(tagName) {
47694
48265
  if (tagName === "#document" /* DOCUMENT_NODE */) {
47695
- const doc = new _MockDocument(false);
47696
- doc.nodeName = tagName;
47697
- doc.parentNode = null;
47698
- return doc;
48266
+ const doc2 = new _MockDocument(false);
48267
+ doc2.nodeName = tagName;
48268
+ doc2.parentNode = null;
48269
+ return doc2;
47699
48270
  }
47700
48271
  return createElement(this, tagName);
47701
48272
  }
@@ -47735,10 +48306,10 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
47735
48306
  title.textContent = value;
47736
48307
  }
47737
48308
  };
47738
- function resetDocument(doc) {
47739
- if (doc != null) {
47740
- resetEventListeners(doc);
47741
- const documentElement = doc.documentElement;
48309
+ function resetDocument(doc2) {
48310
+ if (doc2 != null) {
48311
+ resetEventListeners(doc2);
48312
+ const documentElement = doc2.documentElement;
47742
48313
  if (documentElement != null) {
47743
48314
  resetElement(documentElement);
47744
48315
  for (let i = 0, ii = documentElement.childNodes.length; i < ii; i++) {
@@ -47747,25 +48318,25 @@ function resetDocument(doc) {
47747
48318
  childNode.childNodes.length = 0;
47748
48319
  }
47749
48320
  }
47750
- for (const key in doc) {
47751
- if (doc.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
47752
- delete doc[key];
48321
+ for (const key in doc2) {
48322
+ if (doc2.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
48323
+ delete doc2[key];
47753
48324
  }
47754
48325
  }
47755
48326
  try {
47756
- doc.nodeName = "#document" /* DOCUMENT_NODE */;
48327
+ doc2.nodeName = "#document" /* DOCUMENT_NODE */;
47757
48328
  } catch (e) {
47758
48329
  }
47759
48330
  try {
47760
- doc.nodeType = 9 /* DOCUMENT_NODE */;
48331
+ doc2.nodeType = 9 /* DOCUMENT_NODE */;
47761
48332
  } catch (e) {
47762
48333
  }
47763
48334
  try {
47764
- doc.cookie = "";
48335
+ doc2.cookie = "";
47765
48336
  } catch (e) {
47766
48337
  }
47767
48338
  try {
47768
- doc.referrer = "";
48339
+ doc2.referrer = "";
47769
48340
  } catch (e) {
47770
48341
  }
47771
48342
  }
@@ -47821,9 +48392,33 @@ function createWindowFromHtml(templateHtml, uniqueId) {
47821
48392
  templateWindow = new MockWindow(templateHtml);
47822
48393
  templateWindows.set(uniqueId, templateWindow);
47823
48394
  }
47824
- const win = cloneWindow(templateWindow);
47825
- return win;
48395
+ const win2 = cloneWindow(templateWindow);
48396
+ return win2;
47826
48397
  }
48398
+ var Build = {
48399
+ isDev: BUILD.isDev ? true : false,
48400
+ isBrowser: true,
48401
+ isServer: false,
48402
+ isTesting: BUILD.isTesting ? true : false
48403
+ };
48404
+ var hostRefs = BUILD.hotModuleReplacement ? window.__STENCIL_HOSTREFS__ || (window.__STENCIL_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
48405
+ var STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : [
48406
+ "%cstencil",
48407
+ "color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
48408
+ ];
48409
+ var win = typeof window !== "undefined" ? window : {};
48410
+ var doc = win.document || { head: {} };
48411
+ var H = win.HTMLElement || class {
48412
+ };
48413
+ var supportsShadow = BUILD.shadowDom;
48414
+ var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
48415
+ try {
48416
+ new CSSStyleSheet();
48417
+ return typeof new CSSStyleSheet().replaceSync === "function";
48418
+ } catch (e) {
48419
+ }
48420
+ return false;
48421
+ })() : false;
47827
48422
 
47828
48423
  // src/utils/helpers.ts
47829
48424
  var isString = (v) => typeof v === "string";
@@ -47914,16 +48509,21 @@ var unwrapErr = (result) => {
47914
48509
  throw result.value;
47915
48510
  }
47916
48511
  };
48512
+ var CAPTURE_EVENT_SUFFIX = "Capture";
48513
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
48514
+
48515
+ // src/runtime/mode.ts
48516
+ var setMode = (handler) => modeResolutionChain.push(handler);
47917
48517
 
47918
48518
  // src/compiler/html/canonical-link.ts
47919
- var updateCanonicalLink = (doc, href) => {
48519
+ var updateCanonicalLink = (doc2, href) => {
47920
48520
  var _a2;
47921
- let canonicalLinkElm = doc.head.querySelector('link[rel="canonical"]');
48521
+ let canonicalLinkElm = doc2.head.querySelector('link[rel="canonical"]');
47922
48522
  if (typeof href === "string") {
47923
48523
  if (canonicalLinkElm == null) {
47924
- canonicalLinkElm = doc.createElement("link");
48524
+ canonicalLinkElm = doc2.createElement("link");
47925
48525
  canonicalLinkElm.setAttribute("rel", "canonical");
47926
- doc.head.appendChild(canonicalLinkElm);
48526
+ doc2.head.appendChild(canonicalLinkElm);
47927
48527
  }
47928
48528
  canonicalLinkElm.setAttribute("href", href);
47929
48529
  } else {
@@ -47937,11 +48537,11 @@ var updateCanonicalLink = (doc, href) => {
47937
48537
  };
47938
48538
 
47939
48539
  // src/compiler/html/relocate-meta-charset.ts
47940
- var relocateMetaCharset = (doc) => {
47941
- const head = doc.head;
48540
+ var relocateMetaCharset = (doc2) => {
48541
+ const head = doc2.head;
47942
48542
  let charsetElm = head.querySelector("meta[charset]");
47943
48543
  if (charsetElm == null) {
47944
- charsetElm = doc.createElement("meta");
48544
+ charsetElm = doc2.createElement("meta");
47945
48545
  charsetElm.setAttribute("charset", "utf-8");
47946
48546
  } else {
47947
48547
  charsetElm.remove();
@@ -48216,13 +48816,13 @@ var parseCss = (css, filePath) => {
48216
48816
  const m = match(/^@([-\w]+)?document *([^{]+)/);
48217
48817
  if (!m) return null;
48218
48818
  const vendor = trim(m[1]);
48219
- const doc = trim(m[2]);
48819
+ const doc2 = trim(m[2]);
48220
48820
  if (!open()) return error(`@document missing '{'`);
48221
48821
  const style = comments().concat(rules());
48222
48822
  if (!close()) return error(`@document missing '}'`);
48223
48823
  return pos({
48224
48824
  type: 3 /* Document */,
48225
- document: doc,
48825
+ document: doc2,
48226
48826
  vendor,
48227
48827
  rules: style
48228
48828
  });
@@ -48548,11 +49148,11 @@ var serializeCssPage = (opts, node) => {
48548
49148
  };
48549
49149
  var serializeCssDocument = (opts, node) => {
48550
49150
  const documentCss = serializeCssMapVisit(opts, node.rules);
48551
- const doc = "@" + (node.vendor || "") + "document " + node.document;
49151
+ const doc2 = "@" + (node.vendor || "") + "document " + node.document;
48552
49152
  if (documentCss === "") {
48553
49153
  return "";
48554
49154
  }
48555
- return doc + "{" + documentCss + "}";
49155
+ return doc2 + "{" + documentCss + "}";
48556
49156
  };
48557
49157
  var serializeCssMapVisit = (opts, nodes) => {
48558
49158
  let rtn = "";
@@ -48650,12 +49250,12 @@ var collectUsedSelectors = (usedSelectors, elm) => {
48650
49250
  };
48651
49251
 
48652
49252
  // src/compiler/html/remove-unused-styles.ts
48653
- var removeUnusedStyles = (doc, diagnostics) => {
49253
+ var removeUnusedStyles = (doc2, diagnostics) => {
48654
49254
  try {
48655
- const styleElms = doc.head.querySelectorAll(`style[data-styles]`);
49255
+ const styleElms = doc2.head.querySelectorAll(`style[data-styles]`);
48656
49256
  const styleLen = styleElms.length;
48657
49257
  if (styleLen > 0) {
48658
- const usedSelectors = getUsedSelectors(doc.documentElement);
49258
+ const usedSelectors = getUsedSelectors(doc2.documentElement);
48659
49259
  for (let i = 0; i < styleLen; i++) {
48660
49260
  removeUnusedStyleText(usedSelectors, diagnostics, styleElms[i]);
48661
49261
  }
@@ -48788,49 +49388,49 @@ function collectAttributes(node) {
48788
49388
  var SKIP_ATTRS = /* @__PURE__ */ new Set(["s-id", "c-id"]);
48789
49389
 
48790
49390
  // src/hydrate/runner/patch-dom-implementation.ts
48791
- function patchDomImplementation(doc, opts) {
48792
- let win;
48793
- if (doc.defaultView != null) {
49391
+ function patchDomImplementation(doc2, opts) {
49392
+ let win2;
49393
+ if (doc2.defaultView != null) {
48794
49394
  opts.destroyWindow = true;
48795
- patchWindow(doc.defaultView);
48796
- win = doc.defaultView;
49395
+ patchWindow(doc2.defaultView);
49396
+ win2 = doc2.defaultView;
48797
49397
  } else {
48798
49398
  opts.destroyWindow = true;
48799
49399
  opts.destroyDocument = false;
48800
- win = new MockWindow(false);
49400
+ win2 = new MockWindow(false);
48801
49401
  }
48802
- if (win.document !== doc) {
48803
- win.document = doc;
49402
+ if (win2.document !== doc2) {
49403
+ win2.document = doc2;
48804
49404
  }
48805
- if (doc.defaultView !== win) {
48806
- doc.defaultView = win;
49405
+ if (doc2.defaultView !== win2) {
49406
+ doc2.defaultView = win2;
48807
49407
  }
48808
- const HTMLElement = doc.documentElement.constructor.prototype;
48809
- if (typeof HTMLElement.getRootNode !== "function") {
48810
- const elm = doc.createElement("unknown-element");
49408
+ const HTMLElement2 = doc2.documentElement.constructor.prototype;
49409
+ if (typeof HTMLElement2.getRootNode !== "function") {
49410
+ const elm = doc2.createElement("unknown-element");
48811
49411
  const HTMLUnknownElement = elm.constructor.prototype;
48812
49412
  HTMLUnknownElement.getRootNode = getRootNode;
48813
49413
  }
48814
- if (typeof doc.createEvent === "function") {
48815
- const CustomEvent = doc.createEvent("CustomEvent").constructor;
48816
- if (win.CustomEvent !== CustomEvent) {
48817
- win.CustomEvent = CustomEvent;
49414
+ if (typeof doc2.createEvent === "function") {
49415
+ const CustomEvent2 = doc2.createEvent("CustomEvent").constructor;
49416
+ if (win2.CustomEvent !== CustomEvent2) {
49417
+ win2.CustomEvent = CustomEvent2;
48818
49418
  }
48819
49419
  }
48820
49420
  try {
48821
- win.__stencil_baseURI = doc.baseURI;
49421
+ win2.__stencil_baseURI = doc2.baseURI;
48822
49422
  } catch (e) {
48823
- Object.defineProperty(doc, "baseURI", {
49423
+ Object.defineProperty(doc2, "baseURI", {
48824
49424
  get() {
48825
- const baseElm = doc.querySelector("base[href]");
49425
+ const baseElm = doc2.querySelector("base[href]");
48826
49426
  if (baseElm) {
48827
- return new URL(baseElm.getAttribute("href"), win.location.href).href;
49427
+ return new URL(baseElm.getAttribute("href"), win2.location.href).href;
48828
49428
  }
48829
- return win.location.href;
49429
+ return win2.location.href;
48830
49430
  }
48831
49431
  });
48832
49432
  }
48833
- return win;
49433
+ return win2;
48834
49434
  }
48835
49435
  function getRootNode(opts) {
48836
49436
  const isComposed = opts != null && opts.composed === true;
@@ -48983,10 +49583,10 @@ function renderCatchError(results, err2) {
48983
49583
  }
48984
49584
 
48985
49585
  // src/hydrate/runner/runtime-log.ts
48986
- function runtimeLogging(win, opts, results) {
49586
+ function runtimeLogging(win2, opts, results) {
48987
49587
  try {
48988
- const pathname = win.location.pathname;
48989
- win.console.error = (...msgs) => {
49588
+ const pathname = win2.location.pathname;
49589
+ win2.console.error = (...msgs) => {
48990
49590
  const errMsg = msgs.reduce((errMsg2, m) => {
48991
49591
  if (m) {
48992
49592
  if (m.stack != null) {
@@ -49006,7 +49606,7 @@ function runtimeLogging(win, opts, results) {
49006
49606
  }
49007
49607
  }
49008
49608
  };
49009
- win.console.debug = (...msgs) => {
49609
+ win2.console.debug = (...msgs) => {
49010
49610
  renderBuildDiagnostic(results, "debug", "Hydrate Debug", [...msgs].join(", "));
49011
49611
  if (opts.runtimeLogging) {
49012
49612
  runtimeLog(pathname, "debug", msgs);
@@ -49014,7 +49614,7 @@ function runtimeLogging(win, opts, results) {
49014
49614
  };
49015
49615
  if (opts.runtimeLogging) {
49016
49616
  ["log", "warn", "assert", "info", "trace"].forEach((type) => {
49017
- win.console[type] = (...msgs) => {
49617
+ win2.console[type] = (...msgs) => {
49018
49618
  runtimeLog(pathname, type, msgs);
49019
49619
  };
49020
49620
  });
@@ -49028,58 +49628,64 @@ function runtimeLog(pathname, type, msgs) {
49028
49628
  }
49029
49629
 
49030
49630
  // src/hydrate/runner/window-initialize.ts
49031
- function initializeWindow(win, doc, opts, results) {
49631
+ var docData = {
49632
+ hostIds: 0,
49633
+ rootLevelIds: 0,
49634
+ staticComponents: /* @__PURE__ */ new Set()
49635
+ };
49636
+ function initializeWindow(win2, doc2, opts, results) {
49032
49637
  if (typeof opts.url === "string") {
49033
49638
  try {
49034
- win.location.href = opts.url;
49639
+ win2.location.href = opts.url;
49035
49640
  } catch (e) {
49036
49641
  }
49037
49642
  }
49038
49643
  if (typeof opts.userAgent === "string") {
49039
49644
  try {
49040
- win.navigator.userAgent = opts.userAgent;
49645
+ win2.navigator.userAgent = opts.userAgent;
49041
49646
  } catch (e) {
49042
49647
  }
49043
49648
  }
49044
49649
  if (typeof opts.cookie === "string") {
49045
49650
  try {
49046
- doc.cookie = opts.cookie;
49651
+ doc2.cookie = opts.cookie;
49047
49652
  } catch (e) {
49048
49653
  }
49049
49654
  }
49050
49655
  if (typeof opts.referrer === "string") {
49051
49656
  try {
49052
- doc.referrer = opts.referrer;
49657
+ doc2.referrer = opts.referrer;
49053
49658
  } catch (e) {
49054
49659
  }
49055
49660
  }
49056
49661
  if (typeof opts.direction === "string") {
49057
49662
  try {
49058
- doc.documentElement.setAttribute("dir", opts.direction);
49663
+ doc2.documentElement.setAttribute("dir", opts.direction);
49059
49664
  } catch (e) {
49060
49665
  }
49061
49666
  }
49062
49667
  if (typeof opts.language === "string") {
49063
49668
  try {
49064
- doc.documentElement.setAttribute("lang", opts.language);
49669
+ doc2.documentElement.setAttribute("lang", opts.language);
49065
49670
  } catch (e) {
49066
49671
  }
49067
49672
  }
49068
49673
  if (typeof opts.buildId === "string") {
49069
49674
  try {
49070
- doc.documentElement.setAttribute("data-stencil-build", opts.buildId);
49675
+ doc2.documentElement.setAttribute("data-stencil-build", opts.buildId);
49071
49676
  } catch (e) {
49072
49677
  }
49073
49678
  }
49074
49679
  try {
49075
- win.customElements = null;
49680
+ win2.customElements = null;
49076
49681
  } catch (e) {
49077
49682
  }
49078
49683
  if (opts.constrainTimeouts) {
49079
- constrainTimeouts(win);
49684
+ constrainTimeouts(win2);
49080
49685
  }
49081
- runtimeLogging(win, opts, results);
49082
- return win;
49686
+ runtimeLogging(win2, opts, results);
49687
+ doc2[STENCIL_DOC_DATA] = docData;
49688
+ return win2;
49083
49689
  }
49084
49690
 
49085
49691
  // src/hydrate/runner/render.ts
@@ -49096,44 +49702,44 @@ function renderToString(html, options, asStream) {
49096
49702
  opts.constrainTimeouts = false;
49097
49703
  return hydrateDocument(html, opts, asStream);
49098
49704
  }
49099
- function hydrateDocument(doc, options, asStream) {
49705
+ function hydrateDocument(doc2, options, asStream) {
49100
49706
  const opts = normalizeHydrateOptions(options);
49101
- let win = null;
49707
+ let win2 = null;
49102
49708
  const results = generateHydrateResults(opts);
49103
49709
  if (hasError(results.diagnostics)) {
49104
49710
  return Promise.resolve(results);
49105
49711
  }
49106
- if (typeof doc === "string") {
49712
+ if (typeof doc2 === "string") {
49107
49713
  try {
49108
49714
  opts.destroyWindow = true;
49109
49715
  opts.destroyDocument = true;
49110
- win = new MockWindow(doc);
49716
+ win2 = new MockWindow(doc2);
49111
49717
  if (!asStream) {
49112
- return render(win, opts, results).then(() => results);
49718
+ return render(win2, opts, results).then(() => results);
49113
49719
  }
49114
- return renderStream(win, opts, results);
49720
+ return renderStream(win2, opts, results);
49115
49721
  } catch (e) {
49116
- if (win && win.close) {
49117
- win.close();
49722
+ if (win2 && win2.close) {
49723
+ win2.close();
49118
49724
  }
49119
- win = null;
49725
+ win2 = null;
49120
49726
  renderCatchError(results, e);
49121
49727
  return Promise.resolve(results);
49122
49728
  }
49123
49729
  }
49124
- if (isValidDocument(doc)) {
49730
+ if (isValidDocument(doc2)) {
49125
49731
  try {
49126
49732
  opts.destroyDocument = false;
49127
- win = patchDomImplementation(doc, opts);
49733
+ win2 = patchDomImplementation(doc2, opts);
49128
49734
  if (!asStream) {
49129
- return render(win, opts, results).then(() => results);
49735
+ return render(win2, opts, results).then(() => results);
49130
49736
  }
49131
- return renderStream(win, opts, results);
49737
+ return renderStream(win2, opts, results);
49132
49738
  } catch (e) {
49133
- if (win && win.close) {
49134
- win.close();
49739
+ if (win2 && win2.close) {
49740
+ win2.close();
49135
49741
  }
49136
- win = null;
49742
+ win2 = null;
49137
49743
  renderCatchError(results, e);
49138
49744
  return Promise.resolve(results);
49139
49745
  }
@@ -49141,75 +49747,81 @@ function hydrateDocument(doc, options, asStream) {
49141
49747
  renderBuildError(results, `Invalid html or document. Must be either a valid "html" string, or DOM "document".`);
49142
49748
  return Promise.resolve(results);
49143
49749
  }
49144
- async function render(win, opts, results) {
49750
+ async function render(win2, opts, results) {
49145
49751
  if ("process" in globalThis && typeof process.on === "function" && !process.__stencilErrors) {
49146
49752
  process.__stencilErrors = true;
49147
49753
  process.on("unhandledRejection", (e) => {
49148
49754
  console.log("unhandledRejection", e);
49149
49755
  });
49150
49756
  }
49151
- initializeWindow(win, win.document, opts, results);
49757
+ initializeWindow(win2, win2.document, opts, results);
49152
49758
  const beforeHydrateFn = typeof opts.beforeHydrate === "function" ? opts.beforeHydrate : NOOP;
49153
49759
  try {
49154
- await Promise.resolve(beforeHydrateFn(win.document));
49155
- return new Promise((resolve) => hydrateFactory(win, opts, results, afterHydrate, resolve));
49760
+ await Promise.resolve(beforeHydrateFn(win2.document));
49761
+ return new Promise((resolve) => {
49762
+ if (Array.isArray(opts.modes)) {
49763
+ modeResolutionChain.length = 0;
49764
+ opts.modes.forEach((mode) => setMode(mode));
49765
+ }
49766
+ return hydrateFactory(win2, opts, results, afterHydrate, resolve);
49767
+ });
49156
49768
  } catch (e) {
49157
49769
  renderCatchError(results, e);
49158
- return finalizeHydrate(win, win.document, opts, results);
49770
+ return finalizeHydrate(win2, win2.document, opts, results);
49159
49771
  }
49160
49772
  }
49161
- function renderStream(win, opts, results) {
49773
+ function renderStream(win2, opts, results) {
49162
49774
  async function* processRender() {
49163
- const renderResult = await render(win, opts, results);
49775
+ const renderResult = await render(win2, opts, results);
49164
49776
  yield renderResult.html;
49165
49777
  }
49166
49778
  return Readable.from(processRender());
49167
49779
  }
49168
- async function afterHydrate(win, opts, results, resolve) {
49780
+ async function afterHydrate(win2, opts, results, resolve) {
49169
49781
  const afterHydrateFn = typeof opts.afterHydrate === "function" ? opts.afterHydrate : NOOP;
49170
49782
  try {
49171
- await Promise.resolve(afterHydrateFn(win.document));
49172
- return resolve(finalizeHydrate(win, win.document, opts, results));
49783
+ await Promise.resolve(afterHydrateFn(win2.document));
49784
+ return resolve(finalizeHydrate(win2, win2.document, opts, results));
49173
49785
  } catch (e) {
49174
49786
  renderCatchError(results, e);
49175
- return resolve(finalizeHydrate(win, win.document, opts, results));
49787
+ return resolve(finalizeHydrate(win2, win2.document, opts, results));
49176
49788
  }
49177
49789
  }
49178
- function finalizeHydrate(win, doc, opts, results) {
49790
+ function finalizeHydrate(win2, doc2, opts, results) {
49179
49791
  try {
49180
- inspectElement(results, doc.documentElement, 0);
49792
+ inspectElement(results, doc2.documentElement, 0);
49181
49793
  if (opts.removeUnusedStyles !== false) {
49182
49794
  try {
49183
- removeUnusedStyles(doc, results.diagnostics);
49795
+ removeUnusedStyles(doc2, results.diagnostics);
49184
49796
  } catch (e) {
49185
49797
  renderCatchError(results, e);
49186
49798
  }
49187
49799
  }
49188
49800
  if (typeof opts.title === "string") {
49189
49801
  try {
49190
- doc.title = opts.title;
49802
+ doc2.title = opts.title;
49191
49803
  } catch (e) {
49192
49804
  renderCatchError(results, e);
49193
49805
  }
49194
49806
  }
49195
- results.title = doc.title;
49807
+ results.title = doc2.title;
49196
49808
  if (opts.removeScripts) {
49197
- removeScripts(doc.documentElement);
49809
+ removeScripts(doc2.documentElement);
49198
49810
  }
49199
49811
  try {
49200
- updateCanonicalLink(doc, opts.canonicalUrl);
49812
+ updateCanonicalLink(doc2, opts.canonicalUrl);
49201
49813
  } catch (e) {
49202
49814
  renderCatchError(results, e);
49203
49815
  }
49204
49816
  try {
49205
- relocateMetaCharset(doc);
49817
+ relocateMetaCharset(doc2);
49206
49818
  } catch (e) {
49207
49819
  }
49208
49820
  if (!hasError(results.diagnostics)) {
49209
49821
  results.httpStatus = 200;
49210
49822
  }
49211
49823
  try {
49212
- const metaStatus = doc.head.querySelector('meta[http-equiv="status"]');
49824
+ const metaStatus = doc2.head.querySelector('meta[http-equiv="status"]');
49213
49825
  if (metaStatus != null) {
49214
49826
  const metaStatusContent = metaStatus.getAttribute("content");
49215
49827
  if (metaStatusContent && metaStatusContent.length > 0) {
@@ -49219,35 +49831,35 @@ function finalizeHydrate(win, doc, opts, results) {
49219
49831
  } catch (e) {
49220
49832
  }
49221
49833
  if (opts.clientHydrateAnnotations) {
49222
- doc.documentElement.classList.add("hydrated");
49834
+ doc2.documentElement.classList.add("hydrated");
49223
49835
  }
49224
49836
  if (opts.serializeToHtml) {
49225
- results.html = serializeDocumentToString(doc, opts);
49837
+ results.html = serializeDocumentToString(doc2, opts);
49226
49838
  }
49227
49839
  } catch (e) {
49228
49840
  renderCatchError(results, e);
49229
49841
  }
49230
- destroyWindow(win, doc, opts, results);
49842
+ destroyWindow(win2, doc2, opts, results);
49231
49843
  return results;
49232
49844
  }
49233
- function destroyWindow(win, doc, opts, results) {
49845
+ function destroyWindow(win2, doc2, opts, results) {
49234
49846
  if (!opts.destroyWindow) {
49235
49847
  return;
49236
49848
  }
49237
49849
  try {
49238
49850
  if (!opts.destroyDocument) {
49239
- win.document = null;
49240
- doc.defaultView = null;
49851
+ win2.document = null;
49852
+ doc2.defaultView = null;
49241
49853
  }
49242
- if (win.close) {
49243
- win.close();
49854
+ if (win2.close) {
49855
+ win2.close();
49244
49856
  }
49245
49857
  } catch (e) {
49246
49858
  renderCatchError(results, e);
49247
49859
  }
49248
49860
  }
49249
- function serializeDocumentToString(doc, opts) {
49250
- return serializeNodeToHtml(doc, {
49861
+ function serializeDocumentToString(doc2, opts) {
49862
+ return serializeNodeToHtml(doc2, {
49251
49863
  approximateLineWidth: opts.approximateLineWidth,
49252
49864
  outerHtml: false,
49253
49865
  prettyHtml: opts.prettyHtml,
@@ -49259,8 +49871,8 @@ function serializeDocumentToString(doc, opts) {
49259
49871
  fullDocument: opts.fullDocument
49260
49872
  });
49261
49873
  }
49262
- function isValidDocument(doc) {
49263
- return doc != null && doc.nodeType === 9 && doc.documentElement != null && doc.documentElement.nodeType === 1 && doc.body != null && doc.body.nodeType === 1;
49874
+ function isValidDocument(doc2) {
49875
+ return doc2 != null && doc2.nodeType === 9 && doc2.documentElement != null && doc2.documentElement.nodeType === 1 && doc2.body != null && doc2.body.nodeType === 1;
49264
49876
  }
49265
49877
  function removeScripts(elm) {
49266
49878
  const children = elm.children;