@sparkle-learning/core 0.0.27 → 0.0.30

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 (697) hide show
  1. package/dist/cjs/{PrivateRoute-cee9b061.js → PrivateRoute-043bb7d3.js} +6 -40
  2. package/dist/cjs/{active-router-3bd7b540.js → active-router-eedb3bfe.js} +1 -1
  3. package/dist/cjs/{animation-05337433.js → animation-6132e37f.js} +28 -4
  4. package/dist/cjs/app-globals-9869bf67.js +9 -0
  5. package/dist/cjs/{auth.store-aba3d22f.js → auth.store-ff3fda09.js} +1869 -357
  6. package/dist/cjs/compass-svg.cjs.entry.js +1 -1
  7. package/dist/cjs/context-consumer.cjs.entry.js +1 -1
  8. package/dist/cjs/course-select.cjs.entry.js +1 -1
  9. package/dist/cjs/{cubic-bezier-24e309bf.js → cubic-bezier-293f4663.js} +3 -0
  10. package/dist/cjs/dir-5af5259a.js +20 -0
  11. package/dist/cjs/{facilitator.service-e1e2f719.js → facilitator.service-faac5c0c.js} +1 -1
  12. package/dist/cjs/feed.service-66405969.js +124 -0
  13. package/dist/cjs/focus-visible-ad3828a7.js +63 -0
  14. package/dist/cjs/framework-delegate-2470a246.js +113 -0
  15. package/dist/cjs/{gesture-controller-e824cfb3.js → gesture-controller-07c31f70.js} +3 -0
  16. package/dist/cjs/{haptic-415dac5b.js → haptic-91e86eb7.js} +3 -0
  17. package/dist/cjs/{hardware-back-button-ca468aae.js → hardware-back-button-f7b5d99e.js} +3 -0
  18. package/dist/cjs/header-mobile-collapse_61.cjs.entry.js +18001 -0
  19. package/dist/cjs/{helpers-26770c32.js → helpers-7e28976c.js} +122 -3
  20. package/dist/cjs/{icons-a0fef92b.js → icons-b8a2231a.js} +1 -1
  21. package/dist/cjs/{index-427d03fb.js → index-185f9c5a.js} +3 -0
  22. package/dist/cjs/{index-6eff209d.js → index-43642662.js} +24 -3
  23. package/dist/cjs/{index-7bcd36a0.js → index-459a5fa9.js} +20 -4
  24. package/dist/cjs/index-8540d72e.js +42 -0
  25. package/dist/cjs/{index-58b3ee93.js → index-b12edb26.js} +34 -5
  26. package/dist/cjs/{index-fbf4d3bf.js → index-bae2a754.js} +303 -207
  27. package/dist/cjs/index.cjs.js +8 -7
  28. package/dist/cjs/index.es-ef3efdfb.js +10671 -0
  29. package/dist/cjs/{input-shims-213e83f8.js → input-shims-6c442c9f.js} +34 -10
  30. package/dist/cjs/ion-accordion-group.cjs.entry.js +197 -0
  31. package/dist/cjs/ion-accordion.cjs.entry.js +340 -0
  32. package/dist/cjs/ion-action-sheet_4.cjs.entry.js +2203 -0
  33. package/dist/cjs/ion-app.cjs.entry.js +23 -8
  34. package/dist/cjs/ion-back-button.cjs.entry.js +14 -9
  35. package/dist/cjs/ion-backdrop.cjs.entry.js +3 -3
  36. package/dist/cjs/ion-badge.cjs.entry.js +3 -3
  37. package/dist/cjs/ion-breadcrumb.cjs.entry.js +103 -0
  38. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +135 -0
  39. package/dist/cjs/ion-buttons_3.cjs.entry.js +7 -6
  40. package/dist/cjs/ion-card-header.cjs.entry.js +3 -3
  41. package/dist/cjs/ion-card-subtitle.cjs.entry.js +3 -3
  42. package/dist/cjs/ion-card-title.cjs.entry.js +3 -3
  43. package/dist/cjs/ion-chip.cjs.entry.js +3 -3
  44. package/dist/cjs/ion-content_2.cjs.entry.js +144 -56
  45. package/dist/cjs/ion-datetime.cjs.entry.js +1902 -779
  46. package/dist/cjs/ion-fab-button.cjs.entry.js +5 -4
  47. package/dist/cjs/ion-fab-list.cjs.entry.js +2 -2
  48. package/dist/cjs/ion-fab.cjs.entry.js +2 -2
  49. package/dist/cjs/ion-footer.cjs.entry.js +79 -4
  50. package/dist/cjs/ion-img.cjs.entry.js +33 -7
  51. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +3 -3
  52. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +4 -2
  53. package/dist/cjs/ion-item-divider.cjs.entry.js +3 -3
  54. package/dist/cjs/ion-item-group.cjs.entry.js +2 -2
  55. package/dist/cjs/ion-item-option.cjs.entry.js +4 -4
  56. package/dist/cjs/ion-item-options.cjs.entry.js +3 -3
  57. package/dist/cjs/ion-item-sliding.cjs.entry.js +52 -8
  58. package/dist/cjs/ion-loading.cjs.entry.js +23 -11
  59. package/dist/cjs/ion-menu-button.cjs.entry.js +17 -11
  60. package/dist/cjs/ion-menu-toggle.cjs.entry.js +7 -7
  61. package/dist/cjs/ion-menu.cjs.entry.js +141 -29
  62. package/dist/cjs/ion-modal.cjs.entry.js +649 -75
  63. package/dist/cjs/ion-nav-link.cjs.entry.js +4 -1
  64. package/dist/cjs/ion-nav.cjs.entry.js +140 -137
  65. package/dist/cjs/ion-picker-column-internal_2.cjs.entry.js +700 -0
  66. package/dist/cjs/ion-picker-column.cjs.entry.js +5 -5
  67. package/dist/cjs/ion-picker.cjs.entry.js +18 -11
  68. package/dist/cjs/ion-progress-bar.cjs.entry.js +17 -13
  69. package/dist/cjs/ion-refresher-content.cjs.entry.js +7 -6
  70. package/dist/cjs/ion-refresher.cjs.entry.js +83 -84
  71. package/dist/cjs/ion-reorder-group.cjs.entry.js +9 -8
  72. package/dist/cjs/ion-reorder.cjs.entry.js +5 -4
  73. package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
  74. package/dist/cjs/ion-route.cjs.entry.js +1 -1
  75. package/dist/cjs/ion-router-link.cjs.entry.js +3 -3
  76. package/dist/cjs/ion-router-outlet.cjs.entry.js +50 -12
  77. package/dist/cjs/ion-router.cjs.entry.js +378 -234
  78. package/dist/cjs/ion-searchbar.cjs.entry.js +50 -17
  79. package/dist/cjs/ion-segment-button.cjs.entry.js +12 -9
  80. package/dist/cjs/ion-segment.cjs.entry.js +89 -10
  81. package/dist/cjs/ion-select_2.cjs.entry.js +64 -30
  82. package/dist/cjs/ion-skeleton-text.cjs.entry.js +4 -4
  83. package/dist/cjs/ion-slide.cjs.entry.js +2 -2
  84. package/dist/cjs/ion-slides.cjs.entry.js +19 -32
  85. package/dist/cjs/ion-split-pane.cjs.entry.js +8 -3
  86. package/dist/cjs/ion-tab-bar.cjs.entry.js +25 -12
  87. package/dist/cjs/ion-tab-button.cjs.entry.js +2 -2
  88. package/dist/cjs/ion-tab.cjs.entry.js +3 -2
  89. package/dist/cjs/ion-tabs.cjs.entry.js +1 -1
  90. package/dist/cjs/ion-textarea.cjs.entry.js +9 -8
  91. package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
  92. package/dist/cjs/ion-toast.cjs.entry.js +37 -27
  93. package/dist/cjs/ion-toggle.cjs.entry.js +15 -15
  94. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +13 -3
  95. package/dist/cjs/{ionic-global-4930d319.js → ionic-global-878073d1.js} +103 -77
  96. package/dist/cjs/{ios.transition-6e1fd3d6.js → ios.transition-c3bfb096.js} +8 -5
  97. package/dist/cjs/{keyboard-1dcbde6c.js → keyboard-dfd76ac3.js} +3 -0
  98. package/dist/cjs/loader.cjs.js +5 -5
  99. package/dist/cjs/localstorage.service-6346a41d.js +40 -0
  100. package/dist/cjs/{md.transition-3652ad78.js → md.transition-7eb9a1a7.js} +7 -4
  101. package/dist/cjs/{menu-toggle-util-a8fb4c56.js → menu-toggle-util-cb549c2c.js} +4 -1
  102. package/dist/cjs/{overlays-08a817ea.js → overlays-0a748609.js} +188 -47
  103. package/dist/cjs/{purify-596fc2d6.js → purify-d0ad2883.js} +187 -74
  104. package/dist/cjs/sparkle-animation-player.cjs.entry.js +56 -50
  105. package/dist/cjs/sparkle-character-intro.cjs.entry.js +26 -0
  106. package/dist/cjs/sparkle-code.cjs.entry.js +2 -2
  107. package/dist/cjs/sparkle-compass-post.cjs.entry.js +1 -1
  108. package/dist/cjs/sparkle-compass.cjs.entry.js +1 -1
  109. package/dist/cjs/sparkle-core.cjs.js +7 -7
  110. package/dist/cjs/sparkle-emoji.cjs.entry.js +1 -1
  111. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +7 -7
  112. package/dist/cjs/sparkle-feed-post.cjs.entry.js +1 -1
  113. package/dist/cjs/sparkle-feedback.cjs.entry.js +7 -7
  114. package/dist/cjs/sparkle-goal-form.cjs.entry.js +15 -14
  115. package/dist/cjs/sparkle-gww-comment-list.cjs.entry.js +1 -1
  116. package/dist/cjs/sparkle-gww-graph.cjs.entry.js +1 -1
  117. package/dist/cjs/sparkle-lower-content-nav.cjs.entry.js +1 -1
  118. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +2 -2
  119. package/dist/cjs/sparkle-modal-image.cjs.entry.js +1 -1
  120. package/dist/cjs/sparkle-notfound-page.cjs.entry.js +1 -1
  121. package/dist/cjs/sparkle-overlay.cjs.entry.js +1 -1
  122. package/dist/cjs/sparkle-poll.cjs.entry.js +1 -1
  123. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +1 -1
  124. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +1 -1
  125. package/dist/cjs/sparkle-quiz.cjs.entry.js +2 -2
  126. package/dist/cjs/sparkle-select.cjs.entry.js +1 -1
  127. package/dist/cjs/sparkle-sidebar.cjs.entry.js +1 -1
  128. package/dist/cjs/sparkle-tab.cjs.entry.js +1 -1
  129. package/dist/cjs/sparkle-table-of-contents.cjs.entry.js +1 -1
  130. package/dist/cjs/sparkle-tabs.cjs.entry.js +1 -1
  131. package/dist/cjs/sparkle-youtube.cjs.entry.js +2 -2
  132. package/dist/cjs/{spinner-configs-559523fd.js → spinner-configs-6f6b7ef0.js} +36 -1
  133. package/dist/cjs/status-tap-8697433c.js +40 -0
  134. package/dist/cjs/stencil-async-content.cjs.entry.js +1 -1
  135. package/dist/cjs/stencil-route-title.cjs.entry.js +2 -2
  136. package/dist/cjs/stencil-router-prompt.cjs.entry.js +2 -2
  137. package/dist/cjs/{student.service-41c7c78d.js → student.service-744c3155.js} +1 -1
  138. package/dist/cjs/{swipe-back-c1951cbd.js → swipe-back-7e08b5e0.js} +32 -8
  139. package/dist/cjs/{swiper.bundle-cbea42d8.js → swiper.bundle-8c897c07.js} +4 -4
  140. package/dist/cjs/{tap-click-cd858b48.js → tap-click-1caf1780.js} +8 -1
  141. package/dist/cjs/{theme-98ccfc24.js → theme-4252ac15.js} +3 -0
  142. package/dist/cjs/util-d383acb8.js +2462 -0
  143. package/dist/collection/collection-manifest.json +9 -2
  144. package/dist/collection/components/layout/page/page.js +1 -0
  145. package/dist/collection/components/sparkle-animation-player/sparkle-animation-player.js +78 -66
  146. package/dist/collection/components/sparkle-character-intro/assets/characters/character-img.jpg +0 -0
  147. package/dist/collection/components/sparkle-character-intro/assets/characters/jen.png +0 -0
  148. package/dist/collection/components/sparkle-character-intro/assets/characters/kimberly.png +0 -0
  149. package/dist/collection/components/sparkle-character-intro/assets/characters/valeria.png +0 -0
  150. package/dist/collection/components/sparkle-character-intro/assets/characters/yuna.png +0 -0
  151. package/dist/collection/components/sparkle-character-intro/assets/characters/zynab.png +0 -0
  152. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.css +67 -0
  153. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.js +64 -0
  154. package/dist/collection/components/sparkle-course-root/sparkle-course-root.js +48 -43
  155. package/dist/collection/components/sparkle-youtube/sparkle-youtube.js +6 -2
  156. package/dist/collection/util.js +1 -0
  157. package/dist/esm/{PrivateRoute-9f0973bb.js → PrivateRoute-b9937c45.js} +3 -37
  158. package/dist/esm/{active-router-b3ae32c7.js → active-router-909088d6.js} +1 -1
  159. package/dist/esm/{animation-72fdacfb.js → animation-b306f6c2.js} +28 -4
  160. package/dist/esm/app-globals-5c736ae5.js +7 -0
  161. package/dist/esm/auth.store-3ed2389e.js +4061 -0
  162. package/dist/esm/compass-svg.entry.js +1 -1
  163. package/dist/esm/context-consumer.entry.js +1 -1
  164. package/dist/esm/course-select.entry.js +1 -1
  165. package/dist/esm/{cubic-bezier-ed243a9b.js → cubic-bezier-a7ad9c8e.js} +3 -0
  166. package/dist/esm/dir-03012648.js +18 -0
  167. package/dist/esm/{facilitator.service-cddb2feb.js → facilitator.service-ec0a9739.js} +1 -1
  168. package/dist/esm/feed.service-33b83cb7.js +119 -0
  169. package/dist/esm/focus-visible-40cda868.js +61 -0
  170. package/dist/esm/framework-delegate-3bc58c27.js +109 -0
  171. package/dist/esm/{gesture-controller-604336b7.js → gesture-controller-686622ba.js} +3 -0
  172. package/dist/esm/{haptic-67928174.js → haptic-99c9e346.js} +4 -1
  173. package/dist/esm/{hardware-back-button-508e48cf.js → hardware-back-button-b6ccf74a.js} +3 -0
  174. package/dist/esm/header-mobile-collapse_61.entry.js +17937 -0
  175. package/dist/esm/{helpers-e7f66b2b.js → helpers-39367fe1.js} +119 -4
  176. package/dist/esm/{icons-33e5804c.js → icons-5debfbaf.js} +1 -1
  177. package/dist/esm/{index-cc97b114.js → index-435af8e6.js} +3 -0
  178. package/dist/esm/{index-55fc9f5e.js → index-5568e3fa.js} +303 -208
  179. package/dist/esm/{index-dc09784f.js → index-9594837e.js} +20 -4
  180. package/dist/esm/{index-b2ad0f1a.js → index-a12c14bd.js} +25 -4
  181. package/dist/esm/{index-a94619f9.js → index-c26d8655.js} +34 -5
  182. package/dist/esm/index-dc61f152.js +22 -0
  183. package/dist/esm/index.es-97dd8174.js +10585 -0
  184. package/dist/esm/index.js +8 -7
  185. package/dist/esm/{input-shims-3a97fa86.js → input-shims-cc98ea92.js} +34 -10
  186. package/dist/esm/ion-accordion-group.entry.js +193 -0
  187. package/dist/esm/ion-accordion.entry.js +336 -0
  188. package/dist/esm/ion-action-sheet_4.entry.js +2196 -0
  189. package/dist/esm/ion-app.entry.js +23 -8
  190. package/dist/esm/ion-back-button.entry.js +14 -9
  191. package/dist/esm/ion-backdrop.entry.js +3 -3
  192. package/dist/esm/ion-badge.entry.js +3 -3
  193. package/dist/esm/ion-breadcrumb.entry.js +99 -0
  194. package/dist/esm/ion-breadcrumbs.entry.js +131 -0
  195. package/dist/esm/ion-buttons_3.entry.js +7 -6
  196. package/dist/esm/ion-card-header.entry.js +3 -3
  197. package/dist/esm/ion-card-subtitle.entry.js +3 -3
  198. package/dist/esm/ion-card-title.entry.js +3 -3
  199. package/dist/esm/ion-chip.entry.js +3 -3
  200. package/dist/esm/ion-content_2.entry.js +144 -56
  201. package/dist/esm/ion-datetime.entry.js +1902 -779
  202. package/dist/esm/ion-fab-button.entry.js +5 -4
  203. package/dist/esm/ion-fab-list.entry.js +2 -2
  204. package/dist/esm/ion-fab.entry.js +2 -2
  205. package/dist/esm/ion-footer.entry.js +79 -4
  206. package/dist/esm/ion-img.entry.js +33 -7
  207. package/dist/esm/ion-infinite-scroll-content.entry.js +3 -3
  208. package/dist/esm/ion-infinite-scroll.entry.js +4 -2
  209. package/dist/esm/ion-item-divider.entry.js +3 -3
  210. package/dist/esm/ion-item-group.entry.js +2 -2
  211. package/dist/esm/ion-item-option.entry.js +4 -4
  212. package/dist/esm/ion-item-options.entry.js +3 -3
  213. package/dist/esm/ion-item-sliding.entry.js +52 -8
  214. package/dist/esm/ion-loading.entry.js +23 -11
  215. package/dist/esm/ion-menu-button.entry.js +17 -11
  216. package/dist/esm/ion-menu-toggle.entry.js +7 -7
  217. package/dist/esm/ion-menu.entry.js +141 -29
  218. package/dist/esm/ion-modal.entry.js +649 -75
  219. package/dist/esm/ion-nav-link.entry.js +4 -1
  220. package/dist/esm/ion-nav.entry.js +140 -137
  221. package/dist/esm/ion-picker-column-internal_2.entry.js +695 -0
  222. package/dist/esm/ion-picker-column.entry.js +5 -5
  223. package/dist/esm/ion-picker.entry.js +18 -11
  224. package/dist/esm/ion-progress-bar.entry.js +17 -13
  225. package/dist/esm/ion-refresher-content.entry.js +7 -6
  226. package/dist/esm/ion-refresher.entry.js +82 -83
  227. package/dist/esm/ion-reorder-group.entry.js +9 -8
  228. package/dist/esm/ion-reorder.entry.js +5 -4
  229. package/dist/esm/ion-route-redirect.entry.js +1 -1
  230. package/dist/esm/ion-route.entry.js +1 -1
  231. package/dist/esm/ion-router-link.entry.js +3 -3
  232. package/dist/esm/ion-router-outlet.entry.js +50 -12
  233. package/dist/esm/ion-router.entry.js +378 -234
  234. package/dist/esm/ion-searchbar.entry.js +50 -17
  235. package/dist/esm/ion-segment-button.entry.js +12 -9
  236. package/dist/esm/ion-segment.entry.js +89 -10
  237. package/dist/esm/ion-select_2.entry.js +64 -30
  238. package/dist/esm/ion-skeleton-text.entry.js +4 -4
  239. package/dist/esm/ion-slide.entry.js +2 -2
  240. package/dist/esm/ion-slides.entry.js +19 -32
  241. package/dist/esm/ion-split-pane.entry.js +8 -3
  242. package/dist/esm/ion-tab-bar.entry.js +25 -12
  243. package/dist/esm/ion-tab-button.entry.js +2 -2
  244. package/dist/esm/ion-tab.entry.js +3 -2
  245. package/dist/esm/ion-tabs.entry.js +1 -1
  246. package/dist/esm/ion-textarea.entry.js +9 -8
  247. package/dist/esm/ion-thumbnail.entry.js +2 -2
  248. package/dist/esm/ion-toast.entry.js +37 -27
  249. package/dist/esm/ion-toggle.entry.js +15 -15
  250. package/dist/esm/ion-virtual-scroll.entry.js +13 -3
  251. package/dist/esm/{ionic-global-1f9287cc.js → ionic-global-0939c477.js} +103 -77
  252. package/dist/esm/{ios.transition-d01abefd.js → ios.transition-b4ca8a33.js} +8 -5
  253. package/dist/esm/{keyboard-06906eac.js → keyboard-2503e874.js} +3 -0
  254. package/dist/esm/loader.js +5 -5
  255. package/dist/esm/localstorage.service-4bf408c8.js +36 -0
  256. package/dist/esm/{md.transition-245ffa55.js → md.transition-ca5e0322.js} +7 -4
  257. package/dist/esm/{menu-toggle-util-fe83fcf5.js → menu-toggle-util-7fa22c2f.js} +4 -1
  258. package/dist/esm/{overlays-8363621c.js → overlays-34cfa9e0.js} +187 -47
  259. package/dist/esm/polyfills/css-shim.js +1 -1
  260. package/dist/esm/polyfills/index.js +2 -2
  261. package/dist/esm/{purify-4247e2d0.js → purify-ffce2b4c.js} +185 -72
  262. package/dist/esm/sparkle-animation-player.entry.js +56 -50
  263. package/dist/esm/sparkle-character-intro.entry.js +22 -0
  264. package/dist/esm/sparkle-code.entry.js +2 -2
  265. package/dist/esm/sparkle-compass-post.entry.js +1 -1
  266. package/dist/esm/sparkle-compass.entry.js +1 -1
  267. package/dist/esm/sparkle-core.js +7 -7
  268. package/dist/esm/sparkle-emoji.entry.js +1 -1
  269. package/dist/esm/sparkle-facilitator-notes-form.entry.js +7 -7
  270. package/dist/esm/sparkle-feed-post.entry.js +1 -1
  271. package/dist/esm/sparkle-feedback.entry.js +7 -7
  272. package/dist/esm/sparkle-goal-form.entry.js +8 -7
  273. package/dist/esm/sparkle-gww-comment-list.entry.js +1 -1
  274. package/dist/esm/sparkle-gww-graph.entry.js +1 -1
  275. package/dist/esm/sparkle-lower-content-nav.entry.js +1 -1
  276. package/dist/esm/sparkle-menu-collapsible.entry.js +2 -2
  277. package/dist/esm/sparkle-modal-image.entry.js +1 -1
  278. package/dist/esm/sparkle-notfound-page.entry.js +1 -1
  279. package/dist/esm/sparkle-overlay.entry.js +1 -1
  280. package/dist/esm/sparkle-poll.entry.js +1 -1
  281. package/dist/esm/sparkle-quiz-container.entry.js +1 -1
  282. package/dist/esm/sparkle-quiz-feedback_5.entry.js +1 -1
  283. package/dist/esm/sparkle-quiz.entry.js +2 -2
  284. package/dist/esm/sparkle-select.entry.js +1 -1
  285. package/dist/esm/sparkle-sidebar.entry.js +1 -1
  286. package/dist/esm/sparkle-tab.entry.js +1 -1
  287. package/dist/esm/sparkle-table-of-contents.entry.js +1 -1
  288. package/dist/esm/sparkle-tabs.entry.js +1 -1
  289. package/dist/esm/sparkle-youtube.entry.js +2 -2
  290. package/dist/esm/{spinner-configs-9536fae2.js → spinner-configs-f609a655.js} +36 -1
  291. package/dist/esm/status-tap-6351a0cb.js +38 -0
  292. package/dist/esm/stencil-async-content.entry.js +1 -1
  293. package/dist/esm/stencil-route-title.entry.js +2 -2
  294. package/dist/esm/stencil-router-prompt.entry.js +2 -2
  295. package/dist/esm/{student.service-c36c5a75.js → student.service-29b688ba.js} +1 -1
  296. package/dist/esm/{swipe-back-21f58ecf.js → swipe-back-34251834.js} +32 -8
  297. package/dist/esm/{swiper.bundle-d4422d52.js → swiper.bundle-b6a959de.js} +4 -4
  298. package/dist/esm/{tap-click-8c728329.js → tap-click-13f1fb0d.js} +8 -1
  299. package/dist/esm/{theme-12606872.js → theme-c336c9d9.js} +3 -0
  300. package/dist/esm/util-6ef753e9.js +2451 -0
  301. package/dist/loader/index.d.ts +0 -1
  302. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +75 -0
  303. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +72 -0
  304. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +25 -0
  305. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +59 -0
  306. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +10 -19
  307. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +19 -16
  308. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +2 -2
  309. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +4 -0
  310. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +4 -0
  311. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +234 -0
  312. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +237 -0
  313. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +38 -0
  314. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +37 -0
  315. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +0 -1
  316. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +5 -5
  317. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +60 -14
  318. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +586 -68
  319. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +575 -68
  320. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +4 -0
  321. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +16 -0
  322. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +9 -0
  323. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +9 -0
  324. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +105 -17
  325. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +295 -22
  326. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +6 -6
  327. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +6 -6
  328. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +2 -2
  329. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +7 -3
  330. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +100 -18
  331. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +1 -1
  332. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +2 -2
  333. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +2 -2
  334. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +74 -11
  335. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +48 -4
  336. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +59 -0
  337. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +62 -0
  338. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +122 -0
  339. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +118 -0
  340. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +83 -0
  341. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +49 -0
  342. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +53 -38
  343. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +53 -38
  344. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +3 -3
  345. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +5 -5
  346. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +12 -0
  347. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +2 -2
  348. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +1 -1
  349. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +1 -1
  350. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +4 -0
  351. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +4 -0
  352. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +1 -1
  353. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +30 -2
  354. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/{select-popover.css → select-popover.ios.css} +4 -4
  355. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +37 -0
  356. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +4 -4
  357. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +15 -2
  358. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +2 -1
  359. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +1 -0
  360. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +9 -0
  361. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +9 -0
  362. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +4 -3
  363. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +14 -2
  364. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +14 -2
  365. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +1 -0
  366. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +1 -0
  367. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +3 -2
  368. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +2 -1
  369. package/dist/node_modules/@ionic/core/dist/collection/components/virtual-scroll/virtual-scroll.css +1 -1
  370. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/button/button.css +49 -0
  371. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/card/card.css +208 -0
  372. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/cards.css +31 -0
  373. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/code/code.css +245 -0
  374. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/dropdown/dropdown.css +115 -0
  375. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header-mobile-collapse/header-mobile-collapse.css +255 -0
  376. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header.css +232 -0
  377. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/collapsible/collapsible.css +3 -0
  378. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu-toggle/menu-toggle.css +25 -0
  379. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu.css +71 -0
  380. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/nav/nav.css +194 -0
  381. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/notfound-page/notfound-page.css +4 -0
  382. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/overlay/overlay.css +67 -0
  383. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/page-footer/page-footer.css +18 -0
  384. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/pagination/pagination.css +89 -0
  385. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/select/select.css +52 -0
  386. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sidebar/sidebar.css +98 -0
  387. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sparkle-lower-content-nav/sparkle-lower-content-nav.css +8 -0
  388. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/table-of-contents/table-of-contents.css +37 -0
  389. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/tabs/tabs.css +64 -0
  390. package/dist/sparkle-core/assets/characters/character-img.jpg +0 -0
  391. package/dist/sparkle-core/assets/characters/jen.png +0 -0
  392. package/dist/sparkle-core/assets/characters/kimberly.png +0 -0
  393. package/dist/sparkle-core/assets/characters/valeria.png +0 -0
  394. package/dist/sparkle-core/assets/characters/yuna.png +0 -0
  395. package/dist/sparkle-core/assets/characters/zynab.png +0 -0
  396. package/dist/sparkle-core/index.esm.js +1 -1
  397. package/dist/sparkle-core/p-0146afa0.entry.js +1 -0
  398. package/dist/sparkle-core/{p-52355989.entry.js → p-016a7aaf.entry.js} +1 -1
  399. package/dist/sparkle-core/p-0187adef.entry.js +1 -0
  400. package/dist/sparkle-core/p-03189863.js +1 -0
  401. package/dist/sparkle-core/{p-d4d9aa4a.entry.js → p-03ec54a8.entry.js} +1 -1
  402. package/dist/sparkle-core/p-04583c51.entry.js +1 -0
  403. package/dist/sparkle-core/{p-6d506f4e.js → p-052caa63.js} +1 -1
  404. package/dist/sparkle-core/{p-016bf847.entry.js → p-057f6a23.entry.js} +1 -1
  405. package/dist/sparkle-core/p-0580419b.entry.js +1 -0
  406. package/dist/sparkle-core/{p-c563b4de.js → p-063cd168.js} +4 -1
  407. package/dist/sparkle-core/p-081968cc.entry.js +1 -0
  408. package/dist/sparkle-core/p-0934f5dd.entry.js +1 -0
  409. package/dist/sparkle-core/{p-3f5d7a08.entry.js → p-11cf398a.entry.js} +1 -1
  410. package/dist/sparkle-core/p-1339830f.entry.js +1 -0
  411. package/dist/sparkle-core/p-145e40f5.entry.js +1 -0
  412. package/dist/sparkle-core/{p-68f3c93d.entry.js → p-1726da2f.entry.js} +1 -1
  413. package/dist/sparkle-core/p-173d5461.entry.js +7 -0
  414. package/dist/sparkle-core/p-18e62133.entry.js +1 -0
  415. package/dist/sparkle-core/p-1af044f7.js +3 -0
  416. package/dist/sparkle-core/p-1b78dea1.entry.js +1 -0
  417. package/dist/sparkle-core/p-1cef8572.js +4 -0
  418. package/dist/sparkle-core/p-1df05176.js +4 -0
  419. package/dist/sparkle-core/p-21bf4ca0.entry.js +1 -0
  420. package/dist/sparkle-core/p-21db4e8e.entry.js +1 -0
  421. package/dist/sparkle-core/p-23a9f7d1.entry.js +1 -0
  422. package/dist/sparkle-core/p-289a35ed.entry.js +1 -0
  423. package/dist/sparkle-core/p-2ee6a5f9.entry.js +1 -0
  424. package/dist/sparkle-core/p-350adbaa.entry.js +1 -0
  425. package/dist/sparkle-core/{p-bccd9036.entry.js → p-35a7bd6c.entry.js} +1 -1
  426. package/dist/sparkle-core/{p-66e3bd1c.entry.js → p-37c00e39.entry.js} +1 -1
  427. package/dist/sparkle-core/p-389500fd.js +4 -0
  428. package/dist/sparkle-core/p-39e5a90f.entry.js +1 -0
  429. package/dist/sparkle-core/{p-ac5e5308.entry.js → p-3a202a38.entry.js} +1 -1
  430. package/dist/sparkle-core/p-3defe550.entry.js +1 -0
  431. package/dist/sparkle-core/p-45e6db62.entry.js +1 -0
  432. package/dist/sparkle-core/{p-581ca370.entry.js → p-48f9b960.entry.js} +1 -1
  433. package/dist/sparkle-core/{p-0efbc0b3.entry.js → p-4dc3ef96.entry.js} +1 -1
  434. package/dist/sparkle-core/p-506221fe.js +4 -0
  435. package/dist/sparkle-core/p-50aac721.entry.js +7 -0
  436. package/dist/sparkle-core/p-513794b0.js +16 -0
  437. package/dist/sparkle-core/{p-2e4e8117.js → p-5264da79.js} +3 -0
  438. package/dist/sparkle-core/{p-40db85ac.entry.js → p-547b70c6.entry.js} +1 -1
  439. package/dist/sparkle-core/p-5598650a.entry.js +1 -0
  440. package/dist/sparkle-core/p-55ae49e1.js +4 -0
  441. package/dist/sparkle-core/p-58e98f89.entry.js +1 -0
  442. package/dist/sparkle-core/p-59f7bf6e.entry.js +1 -0
  443. package/dist/sparkle-core/p-5a3d0e6b.js +4 -0
  444. package/dist/sparkle-core/{p-85d31769.entry.js → p-5b40aae5.entry.js} +1 -1
  445. package/dist/sparkle-core/p-5c9aa1f9.entry.js +4 -0
  446. package/dist/sparkle-core/p-5d2e54ee.entry.js +1 -0
  447. package/dist/sparkle-core/p-5d409601.js +1 -0
  448. package/dist/sparkle-core/{p-afbaad64.entry.js → p-5f45d206.entry.js} +1 -1
  449. package/dist/sparkle-core/p-5ff6416d.entry.js +7 -0
  450. package/dist/sparkle-core/{p-cf2332bb.entry.js → p-62a6c96f.entry.js} +1 -1
  451. package/dist/sparkle-core/p-64e72f8f.js +4 -0
  452. package/dist/sparkle-core/p-660e0742.js +1 -0
  453. package/dist/sparkle-core/{p-d5023db0.entry.js → p-667accac.entry.js} +1 -1
  454. package/dist/sparkle-core/{p-9ca56f5d.entry.js → p-680663a2.entry.js} +1 -1
  455. package/dist/sparkle-core/{p-e975924a.entry.js → p-6823e6c1.entry.js} +1 -1
  456. package/dist/sparkle-core/p-69e7783d.js +4 -0
  457. package/dist/sparkle-core/p-6bbabb80.entry.js +1 -0
  458. package/dist/sparkle-core/p-6bf07a28.js +1 -0
  459. package/dist/sparkle-core/p-6c6145cd.js +4 -0
  460. package/dist/sparkle-core/p-6c90bde6.entry.js +5 -0
  461. package/dist/sparkle-core/p-6e88764b.entry.js +4 -0
  462. package/dist/sparkle-core/p-6ee40949.js +1 -0
  463. package/dist/sparkle-core/p-6fbe3ca3.entry.js +1 -0
  464. package/dist/sparkle-core/{p-f2660943.js → p-6fd4985d.js} +3 -0
  465. package/dist/sparkle-core/{p-8fc9298a.js → p-703ca87c.js} +3 -0
  466. package/dist/sparkle-core/{p-1bf8bed6.entry.js → p-7052c43a.entry.js} +1 -1
  467. package/dist/sparkle-core/{p-111520a0.js → p-70b2452c.js} +3 -0
  468. package/dist/sparkle-core/p-713590fc.js +5 -0
  469. package/dist/sparkle-core/p-7493ee15.entry.js +1 -0
  470. package/dist/sparkle-core/p-75572037.js +1 -0
  471. package/dist/sparkle-core/{p-eb56aa20.entry.js → p-768bcc9e.entry.js} +1 -1
  472. package/dist/sparkle-core/p-797c23ed.entry.js +1 -0
  473. package/dist/sparkle-core/{p-03eb2164.js → p-7c38a70b.js} +1 -1
  474. package/dist/sparkle-core/{p-09d43bee.entry.js → p-7d61177b.entry.js} +1 -1
  475. package/dist/sparkle-core/p-7dbfc316.js +1 -0
  476. package/dist/sparkle-core/p-7e61973d.entry.js +7 -0
  477. package/dist/sparkle-core/{p-3cd28c60.entry.js → p-82e98d07.entry.js} +1 -1
  478. package/dist/sparkle-core/p-838fa86d.entry.js +18 -0
  479. package/dist/sparkle-core/p-855ca600.js +1 -0
  480. package/dist/sparkle-core/p-857f3696.entry.js +1 -0
  481. package/dist/sparkle-core/{p-8f72be08.js → p-8c6b6038.js} +3 -0
  482. package/dist/sparkle-core/p-8fe2e51f.entry.js +4 -0
  483. package/dist/sparkle-core/{p-f72a6e6d.entry.js → p-90389886.entry.js} +1 -1
  484. package/dist/sparkle-core/p-932bfb69.entry.js +1 -0
  485. package/dist/sparkle-core/p-935e7cfc.js +1 -0
  486. package/dist/sparkle-core/{p-c70b9765.entry.js → p-941eaa3a.entry.js} +1 -1
  487. package/dist/sparkle-core/p-95004267.entry.js +1 -0
  488. package/dist/sparkle-core/p-950effe7.entry.js +1 -0
  489. package/dist/sparkle-core/{p-1ca4bf1d.entry.js → p-996361f9.entry.js} +1 -1
  490. package/dist/sparkle-core/p-9a17f2ad.js +4 -0
  491. package/dist/sparkle-core/p-9a443f51.js +1 -1
  492. package/dist/sparkle-core/p-9babd345.js +1 -0
  493. package/dist/sparkle-core/p-9cfdeb18.entry.js +1 -0
  494. package/dist/sparkle-core/p-a080e768.entry.js +1 -0
  495. package/dist/sparkle-core/p-a1cab0f3.js +4 -0
  496. package/dist/sparkle-core/p-a7cc0052.entry.js +4 -0
  497. package/dist/sparkle-core/p-a9ccb0df.js +4 -0
  498. package/dist/sparkle-core/p-a9ee3f6d.entry.js +1 -0
  499. package/dist/sparkle-core/{p-abe2676a.entry.js → p-aa87c7f0.entry.js} +1 -1
  500. package/dist/sparkle-core/{p-e818b11d.entry.js → p-aa9ebc39.entry.js} +1 -1
  501. package/dist/sparkle-core/p-ae1f145d.entry.js +1 -0
  502. package/dist/sparkle-core/{p-73a646fb.entry.js → p-b07a2cf2.entry.js} +1 -1
  503. package/dist/sparkle-core/{p-c82b05e0.entry.js → p-b3909012.entry.js} +1 -1
  504. package/dist/sparkle-core/p-b3e6427d.js +7 -0
  505. package/dist/sparkle-core/p-b49ca0ea.entry.js +1 -0
  506. package/dist/sparkle-core/p-b81e20fe.entry.js +4 -0
  507. package/dist/sparkle-core/p-bca0e465.entry.js +1 -0
  508. package/dist/sparkle-core/p-c1279cc9.entry.js +1 -0
  509. package/dist/sparkle-core/{p-82d95fcd.entry.js → p-c1376096.entry.js} +1 -1
  510. package/dist/sparkle-core/p-c3986a52.entry.js +1 -0
  511. package/dist/sparkle-core/p-c3d3d5c4.entry.js +1 -0
  512. package/dist/sparkle-core/p-c48bbc7c.entry.js +4 -0
  513. package/dist/sparkle-core/p-c5b9bdd6.entry.js +1 -0
  514. package/dist/sparkle-core/{p-15d68269.entry.js → p-c69b0a7a.entry.js} +1 -1
  515. package/dist/sparkle-core/p-cbbeed67.entry.js +1 -0
  516. package/dist/sparkle-core/p-d4a435f8.entry.js +1 -0
  517. package/dist/sparkle-core/p-d4c07aca.js +4 -0
  518. package/dist/sparkle-core/p-d5b05ece.entry.js +5 -0
  519. package/dist/sparkle-core/p-d7baf31e.entry.js +1 -0
  520. package/dist/sparkle-core/p-d8d3524a.js +1 -0
  521. package/dist/sparkle-core/p-df0070c5.entry.js +352 -0
  522. package/dist/sparkle-core/{p-22926eed.entry.js → p-e0fced48.entry.js} +1 -1
  523. package/dist/sparkle-core/p-e1cba44b.entry.js +4 -0
  524. package/dist/sparkle-core/p-e225581a.js +7 -0
  525. package/dist/sparkle-core/{p-4e28ca37.entry.js → p-e3fdd0a8.entry.js} +1 -1
  526. package/dist/sparkle-core/p-e72d4450.js +4 -0
  527. package/dist/sparkle-core/p-eb70a23c.entry.js +1 -0
  528. package/dist/sparkle-core/{p-f9143c5d.entry.js → p-ecd39170.entry.js} +1 -1
  529. package/dist/sparkle-core/{p-151afa9e.entry.js → p-ed0e9d29.entry.js} +1 -1
  530. package/dist/sparkle-core/{p-92d42c10.entry.js → p-ee0d7f19.entry.js} +1 -1
  531. package/dist/sparkle-core/p-f4001fdf.js +4 -0
  532. package/dist/sparkle-core/p-f9b73032.entry.js +1 -0
  533. package/dist/sparkle-core/p-faa912d7.entry.js +1 -0
  534. package/dist/sparkle-core/{p-a250e2ae.entry.js → p-fbd7eeca.entry.js} +1 -1
  535. package/dist/sparkle-core/p-fc933591.entry.js +1 -0
  536. package/dist/sparkle-core/p-fef04ab5.js +4 -0
  537. package/dist/sparkle-core/sparkle-core.css +1 -1
  538. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  539. package/dist/sparkle-core/svg/balloon-outline.svg +1 -0
  540. package/dist/sparkle-core/svg/balloon-sharp.svg +1 -0
  541. package/dist/sparkle-core/svg/balloon.svg +1 -0
  542. package/dist/sparkle-core/svg/bowling-ball-outline.svg +1 -0
  543. package/dist/sparkle-core/svg/bowling-ball-sharp.svg +1 -0
  544. package/dist/sparkle-core/svg/bowling-ball.svg +1 -0
  545. package/dist/sparkle-core/svg/calendar-number-outline.svg +1 -0
  546. package/dist/sparkle-core/svg/calendar-number-sharp.svg +1 -0
  547. package/dist/sparkle-core/svg/calendar-number.svg +1 -0
  548. package/dist/sparkle-core/svg/diamond-outline.svg +1 -0
  549. package/dist/sparkle-core/svg/diamond-sharp.svg +1 -0
  550. package/dist/sparkle-core/svg/diamond.svg +1 -0
  551. package/dist/sparkle-core/svg/footsteps-outline.svg +1 -0
  552. package/dist/sparkle-core/svg/footsteps-sharp.svg +1 -0
  553. package/dist/sparkle-core/svg/footsteps.svg +1 -0
  554. package/dist/sparkle-core/svg/id-card-outline.svg +1 -0
  555. package/dist/sparkle-core/svg/id-card-sharp.svg +1 -0
  556. package/dist/sparkle-core/svg/id-card.svg +1 -0
  557. package/dist/sparkle-core/svg/logo-apple-ar.svg +1 -0
  558. package/dist/sparkle-core/svg/prism-outline.svg +1 -0
  559. package/dist/sparkle-core/svg/prism-sharp.svg +1 -0
  560. package/dist/sparkle-core/svg/prism.svg +1 -0
  561. package/dist/sparkle-core/svg/scale-outline.svg +1 -0
  562. package/dist/sparkle-core/svg/scale-sharp.svg +1 -0
  563. package/dist/sparkle-core/svg/scale.svg +1 -0
  564. package/dist/sparkle-core/svg/shield-half-outline.svg +1 -0
  565. package/dist/sparkle-core/svg/shield-half-sharp.svg +1 -0
  566. package/dist/sparkle-core/svg/shield-half.svg +1 -0
  567. package/dist/sparkle-core/svg/sparkles-outline.svg +1 -0
  568. package/dist/sparkle-core/svg/sparkles-sharp.svg +1 -0
  569. package/dist/sparkle-core/svg/sparkles.svg +1 -0
  570. package/dist/sparkle-core/swiper/swiper.bundle.js +2 -2
  571. package/dist/types/components/sparkle-animation-player/sparkle-animation-player.d.ts +1 -0
  572. package/dist/types/components/sparkle-character-intro/sparkle-character-intro.d.ts +7 -0
  573. package/dist/types/components/sparkle-course-root/sparkle-course-root.d.ts +2 -2
  574. package/dist/types/components/sparkle-youtube/sparkle-youtube.d.ts +1 -1
  575. package/dist/types/components.d.ts +17 -0
  576. package/dist/types/models/definitions.d.ts +8 -0
  577. package/dist/types/stencil-public-runtime.d.ts +200 -190
  578. package/dist/types/util.d.ts +1 -0
  579. package/package.json +26 -26
  580. package/dist/cjs/app-globals-98121d6d.js +0 -9
  581. package/dist/cjs/button-active-9456fb4d.js +0 -66
  582. package/dist/cjs/feed.service-518d18fd.js +0 -5802
  583. package/dist/cjs/focus-visible-1583bc8e.js +0 -45
  584. package/dist/cjs/framework-delegate-72815681.js +0 -37
  585. package/dist/cjs/header-mobile-collapse_60.cjs.entry.js +0 -86
  586. package/dist/cjs/index.es-baef3314.js +0 -13834
  587. package/dist/cjs/ion-action-sheet.cjs.entry.js +0 -261
  588. package/dist/cjs/ion-alert.cjs.entry.js +0 -455
  589. package/dist/cjs/ion-note.cjs.entry.js +0 -29
  590. package/dist/cjs/ion-popover.cjs.entry.js +0 -365
  591. package/dist/cjs/ion-select-popover.cjs.entry.js +0 -35
  592. package/dist/cjs/status-tap-466a7c6a.js +0 -25
  593. package/dist/esm/app-globals-6451faf3.js +0 -7
  594. package/dist/esm/auth.store-dd944bc2.js +0 -2552
  595. package/dist/esm/button-active-97535443.js +0 -64
  596. package/dist/esm/feed.service-0fda1e36.js +0 -5787
  597. package/dist/esm/focus-visible-abf04ce3.js +0 -43
  598. package/dist/esm/framework-delegate-2c397da3.js +0 -34
  599. package/dist/esm/header-mobile-collapse_60.entry.js +0 -19
  600. package/dist/esm/index.es-a5bf9a49.js +0 -13748
  601. package/dist/esm/ion-action-sheet.entry.js +0 -257
  602. package/dist/esm/ion-alert.entry.js +0 -451
  603. package/dist/esm/ion-note.entry.js +0 -25
  604. package/dist/esm/ion-popover.entry.js +0 -361
  605. package/dist/esm/ion-select-popover.entry.js +0 -31
  606. package/dist/esm/status-tap-9221cd79.js +0 -23
  607. package/dist/sparkle-core/p-019d9d02.entry.js +0 -1
  608. package/dist/sparkle-core/p-02d6d899.js +0 -1
  609. package/dist/sparkle-core/p-03fd27d0.entry.js +0 -1
  610. package/dist/sparkle-core/p-07018d29.js +0 -1
  611. package/dist/sparkle-core/p-083d57a6.entry.js +0 -1
  612. package/dist/sparkle-core/p-090f2624.js +0 -1
  613. package/dist/sparkle-core/p-0e1c7c8c.js +0 -1
  614. package/dist/sparkle-core/p-101feae9.js +0 -1
  615. package/dist/sparkle-core/p-13b0cdfc.entry.js +0 -1
  616. package/dist/sparkle-core/p-13c9bf3a.entry.js +0 -1
  617. package/dist/sparkle-core/p-169920f1.js +0 -1
  618. package/dist/sparkle-core/p-1e1f5e98.entry.js +0 -1
  619. package/dist/sparkle-core/p-1e866c41.entry.js +0 -1
  620. package/dist/sparkle-core/p-2474bf60.entry.js +0 -1
  621. package/dist/sparkle-core/p-25bbf9b4.entry.js +0 -1
  622. package/dist/sparkle-core/p-2a45b732.js +0 -1
  623. package/dist/sparkle-core/p-2abf4d37.entry.js +0 -1
  624. package/dist/sparkle-core/p-2c5edb9f.entry.js +0 -1
  625. package/dist/sparkle-core/p-2d966d35.js +0 -1
  626. package/dist/sparkle-core/p-30b641a4.entry.js +0 -1
  627. package/dist/sparkle-core/p-34ea6639.entry.js +0 -1
  628. package/dist/sparkle-core/p-359422b6.entry.js +0 -1
  629. package/dist/sparkle-core/p-37bfb548.entry.js +0 -1
  630. package/dist/sparkle-core/p-38307b31.js +0 -1
  631. package/dist/sparkle-core/p-3a29a75b.entry.js +0 -1
  632. package/dist/sparkle-core/p-3bb55510.entry.js +0 -1
  633. package/dist/sparkle-core/p-3be0a218.js +0 -1
  634. package/dist/sparkle-core/p-417a8dd6.js +0 -1
  635. package/dist/sparkle-core/p-447163be.entry.js +0 -1
  636. package/dist/sparkle-core/p-49265a8e.entry.js +0 -1
  637. package/dist/sparkle-core/p-4950f841.entry.js +0 -1
  638. package/dist/sparkle-core/p-4b7db0e6.js +0 -1
  639. package/dist/sparkle-core/p-4d8cb365.entry.js +0 -1
  640. package/dist/sparkle-core/p-5073899e.entry.js +0 -1
  641. package/dist/sparkle-core/p-5b366c20.entry.js +0 -1
  642. package/dist/sparkle-core/p-5dce20b9.entry.js +0 -1
  643. package/dist/sparkle-core/p-6006beec.entry.js +0 -1
  644. package/dist/sparkle-core/p-600d04fc.entry.js +0 -1
  645. package/dist/sparkle-core/p-60828739.entry.js +0 -1
  646. package/dist/sparkle-core/p-6112b180.entry.js +0 -1
  647. package/dist/sparkle-core/p-66eb6b7a.entry.js +0 -1
  648. package/dist/sparkle-core/p-67ddec3f.entry.js +0 -1
  649. package/dist/sparkle-core/p-68cb7d41.entry.js +0 -1
  650. package/dist/sparkle-core/p-69cd49de.js +0 -1
  651. package/dist/sparkle-core/p-6edbdde5.entry.js +0 -1
  652. package/dist/sparkle-core/p-6f0ecbe3.js +0 -1
  653. package/dist/sparkle-core/p-765b8593.js +0 -1
  654. package/dist/sparkle-core/p-770128c8.js +0 -1
  655. package/dist/sparkle-core/p-7840618d.js +0 -1
  656. package/dist/sparkle-core/p-7b37d523.entry.js +0 -1
  657. package/dist/sparkle-core/p-7d83d006.entry.js +0 -1
  658. package/dist/sparkle-core/p-7f3d5344.js +0 -1
  659. package/dist/sparkle-core/p-81651f26.entry.js +0 -1
  660. package/dist/sparkle-core/p-86148067.entry.js +0 -1
  661. package/dist/sparkle-core/p-8b5bc1d6.entry.js +0 -1
  662. package/dist/sparkle-core/p-8c3ee44c.entry.js +0 -1
  663. package/dist/sparkle-core/p-9007a06b.entry.js +0 -1
  664. package/dist/sparkle-core/p-90482861.entry.js +0 -1
  665. package/dist/sparkle-core/p-a061537e.entry.js +0 -1
  666. package/dist/sparkle-core/p-a38ea475.js +0 -1
  667. package/dist/sparkle-core/p-ad1ddf1f.js +0 -483
  668. package/dist/sparkle-core/p-aef0bba0.js +0 -1
  669. package/dist/sparkle-core/p-b080c1e3.entry.js +0 -1
  670. package/dist/sparkle-core/p-b11fe0c7.js +0 -1
  671. package/dist/sparkle-core/p-bac45a26.entry.js +0 -1
  672. package/dist/sparkle-core/p-bbe5977b.entry.js +0 -1
  673. package/dist/sparkle-core/p-bc568dcb.js +0 -1
  674. package/dist/sparkle-core/p-bfb55f1d.js +0 -3
  675. package/dist/sparkle-core/p-c163c16d.entry.js +0 -1
  676. package/dist/sparkle-core/p-c3166584.entry.js +0 -1
  677. package/dist/sparkle-core/p-c34269ae.entry.js +0 -1
  678. package/dist/sparkle-core/p-c466ee32.js +0 -1
  679. package/dist/sparkle-core/p-c6710592.entry.js +0 -1
  680. package/dist/sparkle-core/p-c7022391.entry.js +0 -1
  681. package/dist/sparkle-core/p-d4ad796c.js +0 -1
  682. package/dist/sparkle-core/p-d6152660.entry.js +0 -1
  683. package/dist/sparkle-core/p-d63406d8.js +0 -1
  684. package/dist/sparkle-core/p-dba672d5.entry.js +0 -1
  685. package/dist/sparkle-core/p-dd73d01a.entry.js +0 -1
  686. package/dist/sparkle-core/p-de33872d.entry.js +0 -1
  687. package/dist/sparkle-core/p-dee2128a.entry.js +0 -1
  688. package/dist/sparkle-core/p-df07e132.entry.js +0 -1
  689. package/dist/sparkle-core/p-e5d5aaa5.js +0 -1
  690. package/dist/sparkle-core/p-e72c6d87.entry.js +0 -1
  691. package/dist/sparkle-core/p-e8df6ea6.entry.js +0 -1
  692. package/dist/sparkle-core/p-ef2a2172.js +0 -1
  693. package/dist/sparkle-core/p-f1a4ab33.entry.js +0 -1
  694. package/dist/sparkle-core/p-f43ac631.entry.js +0 -1
  695. package/dist/sparkle-core/p-f8063d7b.js +0 -1
  696. package/dist/sparkle-core/p-fd62283e.entry.js +0 -1
  697. package/dist/sparkle-core/p-fef71e0e.entry.js +0 -1
@@ -0,0 +1,2203 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index$1 = require('./index-bae2a754.js');
6
+ const ionicGlobal = require('./ionic-global-878073d1.js');
7
+ const haptic = require('./haptic-91e86eb7.js');
8
+ const index = require('./index-43642662.js');
9
+ const overlays = require('./overlays-0a748609.js');
10
+ const theme = require('./theme-4252ac15.js');
11
+ const animation = require('./animation-6132e37f.js');
12
+ const index$2 = require('./index-185f9c5a.js');
13
+ const frameworkDelegate = require('./framework-delegate-2470a246.js');
14
+ const helpers = require('./helpers-7e28976c.js');
15
+ const index$3 = require('./index-b12edb26.js');
16
+ require('./gesture-controller-07c31f70.js');
17
+ require('./hardware-back-button-f7b5d99e.js');
18
+
19
+ /*!
20
+ * (C) Ionic http://ionicframework.com - MIT License
21
+ */
22
+ const createButtonActiveGesture = (el, isButton) => {
23
+ let currentTouchedButton;
24
+ let initialTouchedButton;
25
+ const activateButtonAtPoint = (x, y, hapticFeedbackFn) => {
26
+ if (typeof document === 'undefined') {
27
+ return;
28
+ }
29
+ const target = document.elementFromPoint(x, y);
30
+ if (!target || !isButton(target)) {
31
+ clearActiveButton();
32
+ return;
33
+ }
34
+ if (target !== currentTouchedButton) {
35
+ clearActiveButton();
36
+ setActiveButton(target, hapticFeedbackFn);
37
+ }
38
+ };
39
+ const setActiveButton = (button, hapticFeedbackFn) => {
40
+ currentTouchedButton = button;
41
+ if (!initialTouchedButton) {
42
+ initialTouchedButton = currentTouchedButton;
43
+ }
44
+ const buttonToModify = currentTouchedButton;
45
+ index$1.writeTask(() => buttonToModify.classList.add('ion-activated'));
46
+ hapticFeedbackFn();
47
+ };
48
+ const clearActiveButton = (dispatchClick = false) => {
49
+ if (!currentTouchedButton) {
50
+ return;
51
+ }
52
+ const buttonToModify = currentTouchedButton;
53
+ index$1.writeTask(() => buttonToModify.classList.remove('ion-activated'));
54
+ /**
55
+ * Clicking on one button, but releasing on another button
56
+ * does not dispatch a click event in browsers, so we
57
+ * need to do it manually here. Some browsers will
58
+ * dispatch a click if clicking on one button, dragging over
59
+ * another button, and releasing on the original button. In that
60
+ * case, we need to make sure we do not cause a double click there.
61
+ */
62
+ if (dispatchClick && initialTouchedButton !== currentTouchedButton) {
63
+ currentTouchedButton.click();
64
+ }
65
+ currentTouchedButton = undefined;
66
+ };
67
+ return index.createGesture({
68
+ el,
69
+ gestureName: 'buttonActiveDrag',
70
+ threshold: 0,
71
+ onStart: ev => activateButtonAtPoint(ev.currentX, ev.currentY, haptic.hapticSelectionStart),
72
+ onMove: ev => activateButtonAtPoint(ev.currentX, ev.currentY, haptic.hapticSelectionChanged),
73
+ onEnd: () => {
74
+ clearActiveButton(true);
75
+ haptic.hapticSelectionEnd();
76
+ initialTouchedButton = undefined;
77
+ }
78
+ });
79
+ };
80
+
81
+ /*!
82
+ * (C) Ionic http://ionicframework.com - MIT License
83
+ */
84
+ /**
85
+ * iOS Action Sheet Enter Animation
86
+ */
87
+ const iosEnterAnimation$2 = (baseEl) => {
88
+ const baseAnimation = animation.createAnimation();
89
+ const backdropAnimation = animation.createAnimation();
90
+ const wrapperAnimation = animation.createAnimation();
91
+ backdropAnimation
92
+ .addElement(baseEl.querySelector('ion-backdrop'))
93
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
94
+ .beforeStyles({
95
+ 'pointer-events': 'none'
96
+ })
97
+ .afterClearStyles(['pointer-events']);
98
+ wrapperAnimation
99
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
100
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
101
+ return baseAnimation
102
+ .addElement(baseEl)
103
+ .easing('cubic-bezier(.36,.66,.04,1)')
104
+ .duration(400)
105
+ .addAnimation([backdropAnimation, wrapperAnimation]);
106
+ };
107
+
108
+ /*!
109
+ * (C) Ionic http://ionicframework.com - MIT License
110
+ */
111
+ /**
112
+ * iOS Action Sheet Leave Animation
113
+ */
114
+ const iosLeaveAnimation$2 = (baseEl) => {
115
+ const baseAnimation = animation.createAnimation();
116
+ const backdropAnimation = animation.createAnimation();
117
+ const wrapperAnimation = animation.createAnimation();
118
+ backdropAnimation
119
+ .addElement(baseEl.querySelector('ion-backdrop'))
120
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0);
121
+ wrapperAnimation
122
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
123
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
124
+ return baseAnimation
125
+ .addElement(baseEl)
126
+ .easing('cubic-bezier(.36,.66,.04,1)')
127
+ .duration(450)
128
+ .addAnimation([backdropAnimation, wrapperAnimation]);
129
+ };
130
+
131
+ /*!
132
+ * (C) Ionic http://ionicframework.com - MIT License
133
+ */
134
+ /**
135
+ * MD Action Sheet Enter Animation
136
+ */
137
+ const mdEnterAnimation$2 = (baseEl) => {
138
+ const baseAnimation = animation.createAnimation();
139
+ const backdropAnimation = animation.createAnimation();
140
+ const wrapperAnimation = animation.createAnimation();
141
+ backdropAnimation
142
+ .addElement(baseEl.querySelector('ion-backdrop'))
143
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
144
+ .beforeStyles({
145
+ 'pointer-events': 'none'
146
+ })
147
+ .afterClearStyles(['pointer-events']);
148
+ wrapperAnimation
149
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
150
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
151
+ return baseAnimation
152
+ .addElement(baseEl)
153
+ .easing('cubic-bezier(.36,.66,.04,1)')
154
+ .duration(400)
155
+ .addAnimation([backdropAnimation, wrapperAnimation]);
156
+ };
157
+
158
+ /*!
159
+ * (C) Ionic http://ionicframework.com - MIT License
160
+ */
161
+ /**
162
+ * MD Action Sheet Leave Animation
163
+ */
164
+ const mdLeaveAnimation$2 = (baseEl) => {
165
+ const baseAnimation = animation.createAnimation();
166
+ const backdropAnimation = animation.createAnimation();
167
+ const wrapperAnimation = animation.createAnimation();
168
+ backdropAnimation
169
+ .addElement(baseEl.querySelector('ion-backdrop'))
170
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0);
171
+ wrapperAnimation
172
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
173
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
174
+ return baseAnimation
175
+ .addElement(baseEl)
176
+ .easing('cubic-bezier(.36,.66,.04,1)')
177
+ .duration(450)
178
+ .addAnimation([backdropAnimation, wrapperAnimation]);
179
+ };
180
+
181
+ const actionSheetIosCss = ".sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:flex;flex-flow:column;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-ios{flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-ios{flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color, #fff));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-400, #999999);text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:var(--ion-safe-area-bottom, 0)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-container.sc-ion-action-sheet-ios{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-container.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports (backdrop-filter: blur(0)){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{padding-left:10px;padding-right:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, #999999));font-size:13px;font-weight:400;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-title.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:13px;font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{padding-left:18px;padding-right:18px;padding-top:18px;padding-bottom:18px;height:56px;font-size:20px;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:18px;padding-inline-start:18px;-webkit-padding-end:18px;padding-inline-end:18px}}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:0.3em;font-size:28px;pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #eb445a)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #eb445a)}}";
182
+
183
+ const actionSheetMdCss = ".sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-md{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:flex;flex-flow:column;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-md{flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-md{flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, #262626);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-wrapper.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-title.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:16px;text-align:start}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-title.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:14px}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:0;position:relative;height:52px;font-size:16px;text-align:start;contain:strict;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-icon.sc-ion-action-sheet-md{padding-bottom:4px;margin-left:0;margin-right:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:24px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-icon.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px}}.action-sheet-button-inner.sc-ion-action-sheet-md{justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}";
184
+
185
+ const ActionSheet = class {
186
+ constructor(hostRef) {
187
+ index$1.registerInstance(this, hostRef);
188
+ this.didPresent = index$1.createEvent(this, "ionActionSheetDidPresent", 7);
189
+ this.willPresent = index$1.createEvent(this, "ionActionSheetWillPresent", 7);
190
+ this.willDismiss = index$1.createEvent(this, "ionActionSheetWillDismiss", 7);
191
+ this.didDismiss = index$1.createEvent(this, "ionActionSheetDidDismiss", 7);
192
+ this.presented = false;
193
+ /**
194
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
195
+ */
196
+ this.keyboardClose = true;
197
+ /**
198
+ * An array of buttons for the action sheet.
199
+ */
200
+ this.buttons = [];
201
+ /**
202
+ * If `true`, the action sheet will be dismissed when the backdrop is clicked.
203
+ */
204
+ this.backdropDismiss = true;
205
+ /**
206
+ * If `true`, the action sheet will be translucent.
207
+ * Only applies when the mode is `"ios"` and the device supports
208
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
209
+ */
210
+ this.translucent = false;
211
+ /**
212
+ * If `true`, the action sheet will animate.
213
+ */
214
+ this.animated = true;
215
+ this.onBackdropTap = () => {
216
+ this.dismiss(undefined, overlays.BACKDROP);
217
+ };
218
+ this.dispatchCancelHandler = (ev) => {
219
+ const role = ev.detail.role;
220
+ if (overlays.isCancel(role)) {
221
+ const cancelButton = this.getButtons().find(b => b.role === 'cancel');
222
+ this.callButtonHandler(cancelButton);
223
+ }
224
+ };
225
+ }
226
+ /**
227
+ * Present the action sheet overlay after it has been created.
228
+ */
229
+ present() {
230
+ return overlays.present(this, 'actionSheetEnter', iosEnterAnimation$2, mdEnterAnimation$2);
231
+ }
232
+ connectedCallback() {
233
+ overlays.prepareOverlay(this.el);
234
+ }
235
+ /**
236
+ * Dismiss the action sheet overlay after it has been presented.
237
+ *
238
+ * @param data Any data to emit in the dismiss events.
239
+ * @param role The role of the element that is dismissing the action sheet.
240
+ * This can be useful in a button handler for determining which button was
241
+ * clicked to dismiss the action sheet.
242
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
243
+ */
244
+ dismiss(data, role) {
245
+ return overlays.dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$2, mdLeaveAnimation$2);
246
+ }
247
+ /**
248
+ * Returns a promise that resolves when the action sheet did dismiss.
249
+ */
250
+ onDidDismiss() {
251
+ return overlays.eventMethod(this.el, 'ionActionSheetDidDismiss');
252
+ }
253
+ /**
254
+ * Returns a promise that resolves when the action sheet will dismiss.
255
+ *
256
+ */
257
+ onWillDismiss() {
258
+ return overlays.eventMethod(this.el, 'ionActionSheetWillDismiss');
259
+ }
260
+ async buttonClick(button) {
261
+ const role = button.role;
262
+ if (overlays.isCancel(role)) {
263
+ return this.dismiss(button.data, role);
264
+ }
265
+ const shouldDismiss = await this.callButtonHandler(button);
266
+ if (shouldDismiss) {
267
+ return this.dismiss(button.data, button.role);
268
+ }
269
+ return Promise.resolve();
270
+ }
271
+ async callButtonHandler(button) {
272
+ if (button) {
273
+ // a handler has been provided, execute it
274
+ // pass the handler the values from the inputs
275
+ const rtn = await overlays.safeCall(button.handler);
276
+ if (rtn === false) {
277
+ // if the return value of the handler is false then do not dismiss
278
+ return false;
279
+ }
280
+ }
281
+ return true;
282
+ }
283
+ getButtons() {
284
+ return this.buttons.map(b => {
285
+ return (typeof b === 'string')
286
+ ? { text: b }
287
+ : b;
288
+ });
289
+ }
290
+ disconnectedCallback() {
291
+ if (this.gesture) {
292
+ this.gesture.destroy();
293
+ this.gesture = undefined;
294
+ }
295
+ }
296
+ componentDidLoad() {
297
+ /**
298
+ * Do not create gesture if:
299
+ * 1. A gesture already exists
300
+ * 2. App is running in MD mode
301
+ * 3. A wrapper ref does not exist
302
+ */
303
+ const { groupEl, wrapperEl } = this;
304
+ if (this.gesture || ionicGlobal.getIonMode(this) === 'md' || !wrapperEl || !groupEl) {
305
+ return;
306
+ }
307
+ index$1.readTask(() => {
308
+ const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
309
+ if (!isScrollable) {
310
+ this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
311
+ this.gesture.enable(true);
312
+ }
313
+ });
314
+ }
315
+ render() {
316
+ const { htmlAttributes } = this;
317
+ const mode = ionicGlobal.getIonMode(this);
318
+ const allButtons = this.getButtons();
319
+ const cancelButton = allButtons.find(b => b.role === 'cancel');
320
+ const buttons = allButtons.filter(b => b.role !== 'cancel');
321
+ return (index$1.h(index$1.Host, Object.assign({ role: "dialog", "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
322
+ zIndex: `${20000 + this.overlayIndex}`,
323
+ }, class: Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index$1.h("ion-backdrop", { tappable: this.backdropDismiss }), index$1.h("div", { tabindex: "0" }), index$1.h("div", { class: "action-sheet-wrapper ion-overlay-wrapper", role: "dialog", ref: el => this.wrapperEl = el }, index$1.h("div", { class: "action-sheet-container" }, index$1.h("div", { class: "action-sheet-group", ref: el => this.groupEl = el }, this.header !== undefined &&
324
+ index$1.h("div", { class: {
325
+ 'action-sheet-title': true,
326
+ 'action-sheet-has-sub-title': this.subHeader !== undefined
327
+ } }, this.header, this.subHeader && index$1.h("div", { class: "action-sheet-sub-title" }, this.subHeader)), buttons.map(b => index$1.h("button", { type: "button", id: b.id, class: buttonClass$1(b), onClick: () => this.buttonClick(b) }, index$1.h("span", { class: "action-sheet-button-inner" }, b.icon && index$1.h("ion-icon", { icon: b.icon, lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && index$1.h("ion-ripple-effect", null)))), cancelButton &&
328
+ index$1.h("div", { class: "action-sheet-group action-sheet-group-cancel" }, index$1.h("button", { type: "button", class: buttonClass$1(cancelButton), onClick: () => this.buttonClick(cancelButton) }, index$1.h("span", { class: "action-sheet-button-inner" }, cancelButton.icon &&
329
+ index$1.h("ion-icon", { icon: cancelButton.icon, lazy: false, class: "action-sheet-icon" }), cancelButton.text), mode === 'md' && index$1.h("ion-ripple-effect", null))))), index$1.h("div", { tabindex: "0" })));
330
+ }
331
+ get el() { return index$1.getElement(this); }
332
+ };
333
+ const buttonClass$1 = (button) => {
334
+ return Object.assign({ 'action-sheet-button': true, 'ion-activatable': true, 'ion-focusable': true, [`action-sheet-${button.role}`]: button.role !== undefined }, theme.getClassMap(button.cssClass));
335
+ };
336
+ ActionSheet.style = {
337
+ ios: actionSheetIosCss,
338
+ md: actionSheetMdCss
339
+ };
340
+
341
+ /*!
342
+ * (C) Ionic http://ionicframework.com - MIT License
343
+ */
344
+ /**
345
+ * iOS Alert Enter Animation
346
+ */
347
+ const iosEnterAnimation$1 = (baseEl) => {
348
+ const baseAnimation = animation.createAnimation();
349
+ const backdropAnimation = animation.createAnimation();
350
+ const wrapperAnimation = animation.createAnimation();
351
+ backdropAnimation
352
+ .addElement(baseEl.querySelector('ion-backdrop'))
353
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
354
+ .beforeStyles({
355
+ 'pointer-events': 'none'
356
+ })
357
+ .afterClearStyles(['pointer-events']);
358
+ wrapperAnimation
359
+ .addElement(baseEl.querySelector('.alert-wrapper'))
360
+ .keyframes([
361
+ { offset: 0, opacity: '0.01', transform: 'scale(1.1)' },
362
+ { offset: 1, opacity: '1', transform: 'scale(1)' }
363
+ ]);
364
+ return baseAnimation
365
+ .addElement(baseEl)
366
+ .easing('ease-in-out')
367
+ .duration(200)
368
+ .addAnimation([backdropAnimation, wrapperAnimation]);
369
+ };
370
+
371
+ /*!
372
+ * (C) Ionic http://ionicframework.com - MIT License
373
+ */
374
+ /**
375
+ * iOS Alert Leave Animation
376
+ */
377
+ const iosLeaveAnimation$1 = (baseEl) => {
378
+ const baseAnimation = animation.createAnimation();
379
+ const backdropAnimation = animation.createAnimation();
380
+ const wrapperAnimation = animation.createAnimation();
381
+ backdropAnimation
382
+ .addElement(baseEl.querySelector('ion-backdrop'))
383
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0);
384
+ wrapperAnimation
385
+ .addElement(baseEl.querySelector('.alert-wrapper'))
386
+ .keyframes([
387
+ { offset: 0, opacity: 0.99, transform: 'scale(1)' },
388
+ { offset: 1, opacity: 0, transform: 'scale(0.9)' }
389
+ ]);
390
+ return baseAnimation
391
+ .addElement(baseEl)
392
+ .easing('ease-in-out')
393
+ .duration(200)
394
+ .addAnimation([backdropAnimation, wrapperAnimation]);
395
+ };
396
+
397
+ /*!
398
+ * (C) Ionic http://ionicframework.com - MIT License
399
+ */
400
+ /**
401
+ * Md Alert Enter Animation
402
+ */
403
+ const mdEnterAnimation$1 = (baseEl) => {
404
+ const baseAnimation = animation.createAnimation();
405
+ const backdropAnimation = animation.createAnimation();
406
+ const wrapperAnimation = animation.createAnimation();
407
+ backdropAnimation
408
+ .addElement(baseEl.querySelector('ion-backdrop'))
409
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
410
+ .beforeStyles({
411
+ 'pointer-events': 'none'
412
+ })
413
+ .afterClearStyles(['pointer-events']);
414
+ wrapperAnimation
415
+ .addElement(baseEl.querySelector('.alert-wrapper'))
416
+ .keyframes([
417
+ { offset: 0, opacity: '0.01', transform: 'scale(0.9)' },
418
+ { offset: 1, opacity: '1', transform: 'scale(1)' }
419
+ ]);
420
+ return baseAnimation
421
+ .addElement(baseEl)
422
+ .easing('ease-in-out')
423
+ .duration(150)
424
+ .addAnimation([backdropAnimation, wrapperAnimation]);
425
+ };
426
+
427
+ /*!
428
+ * (C) Ionic http://ionicframework.com - MIT License
429
+ */
430
+ /**
431
+ * Md Alert Leave Animation
432
+ */
433
+ const mdLeaveAnimation$1 = (baseEl) => {
434
+ const baseAnimation = animation.createAnimation();
435
+ const backdropAnimation = animation.createAnimation();
436
+ const wrapperAnimation = animation.createAnimation();
437
+ backdropAnimation
438
+ .addElement(baseEl.querySelector('ion-backdrop'))
439
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0);
440
+ wrapperAnimation
441
+ .addElement(baseEl.querySelector('.alert-wrapper'))
442
+ .fromTo('opacity', 0.99, 0);
443
+ return baseAnimation
444
+ .addElement(baseEl)
445
+ .easing('ease-in-out')
446
+ .duration(150)
447
+ .addAnimation([backdropAnimation, wrapperAnimation]);
448
+ };
449
+
450
+ const alertIosCss = ".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:flex;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios{box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:flex;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{flex-direction:column;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-ios{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;appearance:none;contain:strict}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--max-width:270px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:14px}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports (backdrop-filter: blur(0)){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:7px;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-head.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:17px;font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, #666666);font-size:14px}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:13px;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:4px;margin-top:10px;padding-left:6px;padding-right:6px;padding-top:6px;padding-bottom:6px;border:0.55px solid var(--ion-color-step-250, #bfbfbf);background-color:var(--ion-background-color, #fff);appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-input.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:6px;padding-inline-start:6px;-webkit-padding-end:6px;padding-inline-end:6px}}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{height:44px}.alert-radio-label.sc-ion-alert-ios{padding-left:13px;padding-right:13px;padding-top:13px;padding-bottom:13px;flex:1;order:0;color:var(--ion-text-color, #000);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-radio-label.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px}}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #3880ff)}.alert-radio-icon.sc-ion-alert-ios{position:relative;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:7px;top:-7px;position:absolute;width:6px;height:12px;transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #3880ff)}[dir=rtl].sc-ion-alert-ios [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios,[dir=rtl].sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios,[dir=rtl] .sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:unset;right:unset;right:7px}.alert-checkbox-label.sc-ion-alert-ios{padding-left:13px;padding-right:13px;padding-top:13px;padding-bottom:13px;flex:1;color:var(--ion-text-color, #000);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-checkbox-label.sc-ion-alert-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px}}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;margin-left:16px;margin-right:6px;margin-top:10px;margin-bottom:10px;position:relative;width:24px;height:24px;border-width:1px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-checkbox-icon.sc-ion-alert-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px}}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #3880ff);background-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:9px;top:4px;position:absolute;width:5px;height:12px;transform:rotate(45deg);border-width:1px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[dir=rtl].sc-ion-alert-ios [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios,[dir=rtl].sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios,[dir=rtl] .sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:unset;right:unset;right:9px}.alert-button-group.sc-ion-alert-ios{margin-right:-0.55px;flex-wrap:wrap}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button-group.sc-ion-alert-ios{margin-right:unset;-webkit-margin-end:-0.55px;margin-inline-end:-0.55px}}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;flex:1 1 auto;min-width:50%;height:44px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #3880ff);font-size:17px;overflow:hidden}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child,[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #eb445a)}";
451
+
452
+ const alertMdCss = ".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:flex;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md{box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:flex;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{flex-direction:column;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-md{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;appearance:none;contain:strict}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:14px}.alert-wrapper.sc-ion-alert-md{border-radius:4px;box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{padding-left:23px;padding-right:23px;padding-top:20px;padding-bottom:15px;text-align:start}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-head.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px}}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:20px;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:16px}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{padding-left:24px;padding-right:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, #737373)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px}}.alert-message.sc-ion-alert-md{max-height:266px;font-size:16px}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, #d9d9d9);color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #3880ff)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;max-height:266px;border-top:1px solid var(--ion-color-step-150, #d9d9d9);border-bottom:1px solid var(--ion-color-step-150, #d9d9d9);overflow:auto}.alert-tappable.sc-ion-alert-md{position:relative;height:48px;overflow:hidden}.alert-radio-label.sc-ion-alert-md{padding-left:52px;padding-right:26px;padding-top:13px;padding-bottom:13px;flex:1;color:var(--ion-color-step-850, #262626);font-size:16px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-radio-label.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px}}.alert-radio-icon.sc-ion-alert-md{left:26px;top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, #737373)}[dir=rtl].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}.alert-radio-inner.sc-ion-alert-md{left:3px;top:3px;border-radius:50%;position:absolute;width:10px;height:10px;transform:scale3d(0, 0, 0);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #3880ff)}[dir=rtl].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, #262626)}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{padding-left:53px;padding-right:26px;padding-top:13px;padding-bottom:13px;flex:1;color:var(--ion-color-step-850, #262626);font-size:16px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-checkbox-label.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px}}.alert-checkbox-icon.sc-ion-alert-md{left:26px;top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, #737373);contain:strict}[dir=rtl].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #3880ff);background-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:3px;top:0;position:absolute;width:6px;height:10px;transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[dir=rtl].sc-ion-alert-md [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md,[dir=rtl].sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}.alert-button-group.sc-ion-alert-md{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;box-sizing:border-box;flex-wrap:wrap-reverse;justify-content:flex-end}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button-group.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.alert-button.sc-ion-alert-md{border-radius:2px;margin-left:0;margin-right:8px;margin-top:0;margin-bottom:0;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #3880ff);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button.sc-ion-alert-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.alert-button.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.alert-button-inner.sc-ion-alert-md{justify-content:flex-end}";
453
+
454
+ const Alert = class {
455
+ constructor(hostRef) {
456
+ index$1.registerInstance(this, hostRef);
457
+ this.didPresent = index$1.createEvent(this, "ionAlertDidPresent", 7);
458
+ this.willPresent = index$1.createEvent(this, "ionAlertWillPresent", 7);
459
+ this.willDismiss = index$1.createEvent(this, "ionAlertWillDismiss", 7);
460
+ this.didDismiss = index$1.createEvent(this, "ionAlertDidDismiss", 7);
461
+ this.processedInputs = [];
462
+ this.processedButtons = [];
463
+ this.presented = false;
464
+ /**
465
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
466
+ */
467
+ this.keyboardClose = true;
468
+ /**
469
+ * Array of buttons to be added to the alert.
470
+ */
471
+ this.buttons = [];
472
+ /**
473
+ * Array of input to show in the alert.
474
+ */
475
+ this.inputs = [];
476
+ /**
477
+ * If `true`, the alert will be dismissed when the backdrop is clicked.
478
+ */
479
+ this.backdropDismiss = true;
480
+ /**
481
+ * If `true`, the alert will be translucent.
482
+ * Only applies when the mode is `"ios"` and the device supports
483
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
484
+ */
485
+ this.translucent = false;
486
+ /**
487
+ * If `true`, the alert will animate.
488
+ */
489
+ this.animated = true;
490
+ this.onBackdropTap = () => {
491
+ this.dismiss(undefined, overlays.BACKDROP);
492
+ };
493
+ this.dispatchCancelHandler = (ev) => {
494
+ const role = ev.detail.role;
495
+ if (overlays.isCancel(role)) {
496
+ const cancelButton = this.processedButtons.find(b => b.role === 'cancel');
497
+ this.callButtonHandler(cancelButton);
498
+ }
499
+ };
500
+ }
501
+ onKeydown(ev) {
502
+ const inputTypes = new Set(this.processedInputs.map(i => i.type));
503
+ // The only inputs we want to navigate between using arrow keys are the radios
504
+ // ignore the keydown event if it is not on a radio button
505
+ if (!inputTypes.has('radio')
506
+ || (ev.target && !this.el.contains(ev.target))
507
+ || ev.target.classList.contains('alert-button')) {
508
+ return;
509
+ }
510
+ // Get all radios inside of the radio group and then
511
+ // filter out disabled radios since we need to skip those
512
+ const query = this.el.querySelectorAll('.alert-radio');
513
+ const radios = Array.from(query).filter(radio => !radio.disabled);
514
+ // The focused radio is the one that shares the same id as
515
+ // the event target
516
+ const index = radios.findIndex(radio => radio.id === ev.target.id);
517
+ // We need to know what the next radio element should
518
+ // be in order to change the focus
519
+ let nextEl;
520
+ // If hitting arrow down or arrow right, move to the next radio
521
+ // If we're on the last radio, move to the first radio
522
+ if (['ArrowDown', 'ArrowRight'].includes(ev.code)) {
523
+ nextEl = (index === radios.length - 1)
524
+ ? radios[0]
525
+ : radios[index + 1];
526
+ }
527
+ // If hitting arrow up or arrow left, move to the previous radio
528
+ // If we're on the first radio, move to the last radio
529
+ if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) {
530
+ nextEl = (index === 0)
531
+ ? radios[radios.length - 1]
532
+ : radios[index - 1];
533
+ }
534
+ if (nextEl && radios.includes(nextEl)) {
535
+ const nextProcessed = this.processedInputs.find(input => input.id === (nextEl === null || nextEl === void 0 ? void 0 : nextEl.id));
536
+ if (nextProcessed) {
537
+ this.rbClick(nextProcessed);
538
+ nextEl.focus();
539
+ }
540
+ }
541
+ }
542
+ buttonsChanged() {
543
+ const buttons = this.buttons;
544
+ this.processedButtons = buttons.map(btn => {
545
+ return (typeof btn === 'string')
546
+ ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined }
547
+ : btn;
548
+ });
549
+ }
550
+ inputsChanged() {
551
+ const inputs = this.inputs;
552
+ // Get the first input that is not disabled and the checked one
553
+ // If an enabled checked input exists, set it to be the focusable input
554
+ // otherwise we default to focus the first input
555
+ // This will only be used when the input is type radio
556
+ const first = inputs.find(input => !input.disabled);
557
+ const checked = inputs.find(input => input.checked && !input.disabled);
558
+ const focusable = checked || first;
559
+ // An alert can be created with several different inputs. Radios,
560
+ // checkboxes and inputs are all accepted, but they cannot be mixed.
561
+ const inputTypes = new Set(inputs.map(i => i.type));
562
+ if (inputTypes.has('checkbox') && inputTypes.has('radio')) {
563
+ console.warn(`Alert cannot mix input types: ${(Array.from(inputTypes.values()).join('/'))}. Please see alert docs for more info.`);
564
+ }
565
+ this.inputType = inputTypes.values().next().value;
566
+ this.processedInputs = inputs.map((i, index) => ({
567
+ type: i.type || 'text',
568
+ name: i.name || `${index}`,
569
+ placeholder: i.placeholder || '',
570
+ value: i.value,
571
+ label: i.label,
572
+ checked: !!i.checked,
573
+ disabled: !!i.disabled,
574
+ id: i.id || `alert-input-${this.overlayIndex}-${index}`,
575
+ handler: i.handler,
576
+ min: i.min,
577
+ max: i.max,
578
+ cssClass: i.cssClass || '',
579
+ attributes: i.attributes || {},
580
+ tabindex: (i.type === 'radio' && i !== focusable) ? -1 : 0
581
+ }));
582
+ }
583
+ connectedCallback() {
584
+ overlays.prepareOverlay(this.el);
585
+ }
586
+ componentWillLoad() {
587
+ this.inputsChanged();
588
+ this.buttonsChanged();
589
+ }
590
+ disconnectedCallback() {
591
+ if (this.gesture) {
592
+ this.gesture.destroy();
593
+ this.gesture = undefined;
594
+ }
595
+ }
596
+ componentDidLoad() {
597
+ /**
598
+ * Do not create gesture if:
599
+ * 1. A gesture already exists
600
+ * 2. App is running in MD mode
601
+ * 3. A wrapper ref does not exist
602
+ */
603
+ if (this.gesture || ionicGlobal.getIonMode(this) === 'md' || !this.wrapperEl) {
604
+ return;
605
+ }
606
+ this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
607
+ this.gesture.enable(true);
608
+ }
609
+ /**
610
+ * Present the alert overlay after it has been created.
611
+ */
612
+ present() {
613
+ return overlays.present(this, 'alertEnter', iosEnterAnimation$1, mdEnterAnimation$1);
614
+ }
615
+ /**
616
+ * Dismiss the alert overlay after it has been presented.
617
+ *
618
+ * @param data Any data to emit in the dismiss events.
619
+ * @param role The role of the element that is dismissing the alert.
620
+ * This can be useful in a button handler for determining which button was
621
+ * clicked to dismiss the alert.
622
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
623
+ */
624
+ dismiss(data, role) {
625
+ return overlays.dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$1, mdLeaveAnimation$1);
626
+ }
627
+ /**
628
+ * Returns a promise that resolves when the alert did dismiss.
629
+ */
630
+ onDidDismiss() {
631
+ return overlays.eventMethod(this.el, 'ionAlertDidDismiss');
632
+ }
633
+ /**
634
+ * Returns a promise that resolves when the alert will dismiss.
635
+ */
636
+ onWillDismiss() {
637
+ return overlays.eventMethod(this.el, 'ionAlertWillDismiss');
638
+ }
639
+ rbClick(selectedInput) {
640
+ for (const input of this.processedInputs) {
641
+ input.checked = input === selectedInput;
642
+ input.tabindex = input === selectedInput ? 0 : -1;
643
+ }
644
+ this.activeId = selectedInput.id;
645
+ overlays.safeCall(selectedInput.handler, selectedInput);
646
+ index$1.forceUpdate(this);
647
+ }
648
+ cbClick(selectedInput) {
649
+ selectedInput.checked = !selectedInput.checked;
650
+ overlays.safeCall(selectedInput.handler, selectedInput);
651
+ index$1.forceUpdate(this);
652
+ }
653
+ buttonClick(button) {
654
+ const role = button.role;
655
+ const values = this.getValues();
656
+ if (overlays.isCancel(role)) {
657
+ return this.dismiss({ values }, role);
658
+ }
659
+ const returnData = this.callButtonHandler(button, values);
660
+ if (returnData !== false) {
661
+ return this.dismiss(Object.assign({ values }, returnData), button.role);
662
+ }
663
+ return Promise.resolve(false);
664
+ }
665
+ callButtonHandler(button, data) {
666
+ if (button && button.handler) {
667
+ // a handler has been provided, execute it
668
+ // pass the handler the values from the inputs
669
+ const returnData = overlays.safeCall(button.handler, data);
670
+ if (returnData === false) {
671
+ // if the return value of the handler is false then do not dismiss
672
+ return false;
673
+ }
674
+ if (typeof returnData === 'object') {
675
+ return returnData;
676
+ }
677
+ }
678
+ return {};
679
+ }
680
+ getValues() {
681
+ if (this.processedInputs.length === 0) {
682
+ // this is an alert without any options/inputs at all
683
+ return undefined;
684
+ }
685
+ if (this.inputType === 'radio') {
686
+ // this is an alert with radio buttons (single value select)
687
+ // return the one value which is checked, otherwise undefined
688
+ const checkedInput = this.processedInputs.find(i => !!i.checked);
689
+ return checkedInput ? checkedInput.value : undefined;
690
+ }
691
+ if (this.inputType === 'checkbox') {
692
+ // this is an alert with checkboxes (multiple value select)
693
+ // return an array of all the checked values
694
+ return this.processedInputs.filter(i => i.checked).map(i => i.value);
695
+ }
696
+ // this is an alert with text inputs
697
+ // return an object of all the values with the input name as the key
698
+ const values = {};
699
+ this.processedInputs.forEach(i => {
700
+ values[i.name] = i.value || '';
701
+ });
702
+ return values;
703
+ }
704
+ renderAlertInputs() {
705
+ switch (this.inputType) {
706
+ case 'checkbox': return this.renderCheckbox();
707
+ case 'radio': return this.renderRadio();
708
+ default: return this.renderInput();
709
+ }
710
+ }
711
+ renderCheckbox() {
712
+ const inputs = this.processedInputs;
713
+ const mode = ionicGlobal.getIonMode(this);
714
+ if (inputs.length === 0) {
715
+ return null;
716
+ }
717
+ return (index$1.h("div", { class: "alert-checkbox-group" }, inputs.map(i => (index$1.h("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, theme.getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, index$1.h("div", { class: "alert-button-inner" }, index$1.h("div", { class: "alert-checkbox-icon" }, index$1.h("div", { class: "alert-checkbox-inner" })), index$1.h("div", { class: "alert-checkbox-label" }, i.label)), mode === 'md' && index$1.h("ion-ripple-effect", null))))));
718
+ }
719
+ renderRadio() {
720
+ const inputs = this.processedInputs;
721
+ if (inputs.length === 0) {
722
+ return null;
723
+ }
724
+ return (index$1.h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map(i => (index$1.h("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, theme.getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, index$1.h("div", { class: "alert-button-inner" }, index$1.h("div", { class: "alert-radio-icon" }, index$1.h("div", { class: "alert-radio-inner" })), index$1.h("div", { class: "alert-radio-label" }, i.label)))))));
725
+ }
726
+ renderInput() {
727
+ const inputs = this.processedInputs;
728
+ if (inputs.length === 0) {
729
+ return null;
730
+ }
731
+ return (index$1.h("div", { class: "alert-input-group" }, inputs.map(i => {
732
+ var _a, _b, _c, _d;
733
+ if (i.type === 'textarea') {
734
+ return (index$1.h("div", { class: "alert-input-wrapper" }, index$1.h("textarea", Object.assign({ placeholder: i.placeholder, value: i.value, id: i.id, tabIndex: i.tabindex }, i.attributes, { disabled: (_b = (_a = i.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : i.disabled, class: inputClass(i), onInput: e => {
735
+ var _a;
736
+ i.value = e.target.value;
737
+ if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
738
+ i.attributes.onInput(e);
739
+ }
740
+ } }))));
741
+ }
742
+ else {
743
+ return (index$1.h("div", { class: "alert-input-wrapper" }, index$1.h("input", Object.assign({ placeholder: i.placeholder, type: i.type, min: i.min, max: i.max, value: i.value, id: i.id, tabIndex: i.tabindex }, i.attributes, { disabled: (_d = (_c = i.attributes) === null || _c === void 0 ? void 0 : _c.disabled) !== null && _d !== void 0 ? _d : i.disabled, class: inputClass(i), onInput: e => {
744
+ var _a;
745
+ i.value = e.target.value;
746
+ if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
747
+ i.attributes.onInput(e);
748
+ }
749
+ } }))));
750
+ }
751
+ })));
752
+ }
753
+ renderAlertButtons() {
754
+ const buttons = this.processedButtons;
755
+ const mode = ionicGlobal.getIonMode(this);
756
+ const alertButtonGroupClass = {
757
+ 'alert-button-group': true,
758
+ 'alert-button-group-vertical': buttons.length > 2
759
+ };
760
+ return (index$1.h("div", { class: alertButtonGroupClass }, buttons.map(button => index$1.h("button", { type: "button", id: button.id, class: buttonClass(button), tabIndex: 0, onClick: () => this.buttonClick(button) }, index$1.h("span", { class: "alert-button-inner" }, button.text), mode === 'md' && index$1.h("ion-ripple-effect", null)))));
761
+ }
762
+ render() {
763
+ const { overlayIndex, header, subHeader, htmlAttributes } = this;
764
+ const mode = ionicGlobal.getIonMode(this);
765
+ const hdrId = `alert-${overlayIndex}-hdr`;
766
+ const subHdrId = `alert-${overlayIndex}-sub-hdr`;
767
+ const msgId = `alert-${overlayIndex}-msg`;
768
+ const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
769
+ return (index$1.h(index$1.Host, Object.assign({ role: role, "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
770
+ zIndex: `${20000 + overlayIndex}`,
771
+ }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index$1.h("ion-backdrop", { tappable: this.backdropDismiss }), index$1.h("div", { tabindex: "0" }), index$1.h("div", { class: "alert-wrapper ion-overlay-wrapper", ref: el => this.wrapperEl = el }, index$1.h("div", { class: "alert-head" }, header && index$1.h("h2", { id: hdrId, class: "alert-title" }, header), subHeader && index$1.h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader)), index$1.h("div", { id: msgId, class: "alert-message", innerHTML: index$2.sanitizeDOMString(this.message) }), this.renderAlertInputs(), this.renderAlertButtons()), index$1.h("div", { tabindex: "0" })));
772
+ }
773
+ get el() { return index$1.getElement(this); }
774
+ static get watchers() { return {
775
+ "buttons": ["buttonsChanged"],
776
+ "inputs": ["inputsChanged"]
777
+ }; }
778
+ };
779
+ const inputClass = (input) => {
780
+ var _a, _b, _c;
781
+ return Object.assign(Object.assign({ 'alert-input': true, 'alert-input-disabled': ((_b = (_a = input.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : input.disabled) || false }, theme.getClassMap(input.cssClass)), theme.getClassMap(input.attributes ? (_c = input.attributes.class) === null || _c === void 0 ? void 0 : _c.toString() : ''));
782
+ };
783
+ const buttonClass = (button) => {
784
+ return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true, [`alert-button-role-${button.role}`]: button.role !== undefined }, theme.getClassMap(button.cssClass));
785
+ };
786
+ Alert.style = {
787
+ ios: alertIosCss,
788
+ md: alertMdCss
789
+ };
790
+
791
+ /*!
792
+ * (C) Ionic http://ionicframework.com - MIT License
793
+ */
794
+ /**
795
+ * Returns the dimensions of the popover
796
+ * arrow on `ios` mode. If arrow is disabled
797
+ * returns (0, 0).
798
+ */
799
+ const getArrowDimensions = (arrowEl) => {
800
+ if (!arrowEl) {
801
+ return { arrowWidth: 0, arrowHeight: 0 };
802
+ }
803
+ const { width, height } = arrowEl.getBoundingClientRect();
804
+ return { arrowWidth: width, arrowHeight: height };
805
+ };
806
+ /**
807
+ * Returns the recommended dimensions of the popover
808
+ * that takes into account whether or not the width
809
+ * should match the trigger width.
810
+ */
811
+ const getPopoverDimensions = (size, contentEl, triggerEl) => {
812
+ const contentDimentions = contentEl.getBoundingClientRect();
813
+ const contentHeight = contentDimentions.height;
814
+ let contentWidth = contentDimentions.width;
815
+ if (size === 'cover' && triggerEl) {
816
+ const triggerDimensions = triggerEl.getBoundingClientRect();
817
+ contentWidth = triggerDimensions.width;
818
+ }
819
+ return {
820
+ contentWidth,
821
+ contentHeight
822
+ };
823
+ };
824
+ const configureDismissInteraction = (triggerEl, triggerAction, popoverEl, parentPopoverEl) => {
825
+ let dismissCallbacks = [];
826
+ const root = helpers.getElementRoot(parentPopoverEl);
827
+ const parentContentEl = root.querySelector('.popover-content');
828
+ switch (triggerAction) {
829
+ case 'hover':
830
+ dismissCallbacks = [
831
+ {
832
+ /**
833
+ * Do not use mouseover here
834
+ * as this will causes the event to
835
+ * be dispatched on each underlying
836
+ * element rather than on the popover
837
+ * content as a whole.
838
+ */
839
+ eventName: 'mouseenter',
840
+ callback: (ev) => {
841
+ /**
842
+ * Do not dismiss the popover is we
843
+ * are hovering over its trigger.
844
+ * This would be easier if we used mouseover
845
+ * but this would cause the event to be dispatched
846
+ * more often than we would like, potentially
847
+ * causing performance issues.
848
+ */
849
+ const element = document.elementFromPoint(ev.clientX, ev.clientY);
850
+ if (element === triggerEl) {
851
+ return;
852
+ }
853
+ popoverEl.dismiss(undefined, undefined, false);
854
+ }
855
+ }
856
+ ];
857
+ break;
858
+ case 'context-menu':
859
+ case 'click':
860
+ default:
861
+ dismissCallbacks = [
862
+ {
863
+ eventName: 'click',
864
+ callback: (ev) => {
865
+ /**
866
+ * Do not dismiss the popover is we
867
+ * are hovering over its trigger.
868
+ */
869
+ const target = ev.target;
870
+ const closestTrigger = target.closest('[data-ion-popover-trigger]');
871
+ if (closestTrigger === triggerEl) {
872
+ /**
873
+ * stopPropagation here so if the
874
+ * popover has dismissOnSelect="true"
875
+ * the popover does not dismiss since
876
+ * we just clicked a trigger element.
877
+ */
878
+ ev.stopPropagation();
879
+ return;
880
+ }
881
+ popoverEl.dismiss(undefined, undefined, false);
882
+ }
883
+ }
884
+ ];
885
+ break;
886
+ }
887
+ dismissCallbacks.forEach(({ eventName, callback }) => parentContentEl.addEventListener(eventName, callback));
888
+ return () => {
889
+ dismissCallbacks.forEach(({ eventName, callback }) => parentContentEl.removeEventListener(eventName, callback));
890
+ };
891
+ };
892
+ /**
893
+ * Configures the triggerEl to respond
894
+ * to user interaction based upon the triggerAction
895
+ * prop that devs have defined.
896
+ */
897
+ const configureTriggerInteraction = (triggerEl, triggerAction, popoverEl) => {
898
+ let triggerCallbacks = [];
899
+ /**
900
+ * Based upon the kind of trigger interaction
901
+ * the user wants, we setup the correct event
902
+ * listeners.
903
+ */
904
+ switch (triggerAction) {
905
+ case 'hover':
906
+ let hoverTimeout;
907
+ triggerCallbacks = [
908
+ {
909
+ eventName: 'mouseenter',
910
+ callback: async (ev) => {
911
+ ev.stopPropagation();
912
+ if (hoverTimeout) {
913
+ clearTimeout(hoverTimeout);
914
+ }
915
+ /**
916
+ * Hovering over a trigger should not
917
+ * immediately open the next popover.
918
+ */
919
+ hoverTimeout = setTimeout(() => {
920
+ helpers.raf(() => {
921
+ popoverEl.presentFromTrigger(ev);
922
+ hoverTimeout = undefined;
923
+ });
924
+ }, 100);
925
+ }
926
+ },
927
+ {
928
+ eventName: 'mouseleave',
929
+ callback: (ev) => {
930
+ if (hoverTimeout) {
931
+ clearTimeout(hoverTimeout);
932
+ }
933
+ /**
934
+ * If mouse is over another popover
935
+ * that is not this popover then we should
936
+ * close this popover.
937
+ */
938
+ const target = ev.relatedTarget;
939
+ if (!target) {
940
+ return;
941
+ }
942
+ if (target.closest('ion-popover') !== popoverEl) {
943
+ popoverEl.dismiss(undefined, undefined, false);
944
+ }
945
+ }
946
+ },
947
+ {
948
+ /**
949
+ * stopPropagation here prevents the popover
950
+ * from dismissing when dismiss-on-select="true".
951
+ */
952
+ eventName: 'click',
953
+ callback: (ev) => ev.stopPropagation()
954
+ },
955
+ {
956
+ eventName: 'ionPopoverActivateTrigger',
957
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true)
958
+ }
959
+ ];
960
+ break;
961
+ case 'context-menu':
962
+ triggerCallbacks = [
963
+ {
964
+ eventName: 'contextmenu',
965
+ callback: (ev) => {
966
+ /**
967
+ * Prevents the platform context
968
+ * menu from appearing.
969
+ */
970
+ ev.preventDefault();
971
+ popoverEl.presentFromTrigger(ev);
972
+ }
973
+ },
974
+ {
975
+ eventName: 'click',
976
+ callback: (ev) => ev.stopPropagation()
977
+ },
978
+ {
979
+ eventName: 'ionPopoverActivateTrigger',
980
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true)
981
+ }
982
+ ];
983
+ break;
984
+ case 'click':
985
+ default:
986
+ triggerCallbacks = [
987
+ {
988
+ /**
989
+ * Do not do a stopPropagation() here
990
+ * because if you had two click triggers
991
+ * then clicking the first trigger and then
992
+ * clicking the second trigger would not cause
993
+ * the first popover to dismiss.
994
+ */
995
+ eventName: 'click',
996
+ callback: (ev) => popoverEl.presentFromTrigger(ev)
997
+ },
998
+ {
999
+ eventName: 'ionPopoverActivateTrigger',
1000
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true)
1001
+ }
1002
+ ];
1003
+ break;
1004
+ }
1005
+ triggerCallbacks.forEach(({ eventName, callback }) => triggerEl.addEventListener(eventName, callback));
1006
+ triggerEl.setAttribute('data-ion-popover-trigger', 'true');
1007
+ return () => {
1008
+ triggerCallbacks.forEach(({ eventName, callback }) => triggerEl.removeEventListener(eventName, callback));
1009
+ triggerEl.removeAttribute('data-ion-popover-trigger');
1010
+ };
1011
+ };
1012
+ /**
1013
+ * Returns the index of an ion-item in an array of ion-items.
1014
+ */
1015
+ const getIndexOfItem = (items, item) => {
1016
+ if (!item || item.tagName !== 'ION-ITEM') {
1017
+ return -1;
1018
+ }
1019
+ return items.findIndex(el => el === item);
1020
+ };
1021
+ /**
1022
+ * Given an array of elements and a currently focused ion-item
1023
+ * returns the next ion-item relative to the focused one or
1024
+ * undefined.
1025
+ */
1026
+ const getNextItem = (items, currentItem) => {
1027
+ const currentItemIndex = getIndexOfItem(items, currentItem);
1028
+ return items[currentItemIndex + 1];
1029
+ };
1030
+ /**
1031
+ * Given an array of elements and a currently focused ion-item
1032
+ * returns the previous ion-item relative to the focused one or
1033
+ * undefined.
1034
+ */
1035
+ const getPrevItem = (items, currentItem) => {
1036
+ const currentItemIndex = getIndexOfItem(items, currentItem);
1037
+ return items[currentItemIndex - 1];
1038
+ };
1039
+ /** Focus the internal button of the ion-item */
1040
+ const focusItem = (item) => {
1041
+ const root = helpers.getElementRoot(item);
1042
+ const button = root.querySelector('button');
1043
+ if (button) {
1044
+ helpers.raf(() => button.focus());
1045
+ }
1046
+ };
1047
+ /**
1048
+ * Returns `true` if `el` has been designated
1049
+ * as a trigger element for an ion-popover.
1050
+ */
1051
+ const isTriggerElement = (el) => el.hasAttribute('data-ion-popover-trigger');
1052
+ const configureKeyboardInteraction = (popoverEl) => {
1053
+ const callback = async (ev) => {
1054
+ const activeElement = document.activeElement;
1055
+ let items = [];
1056
+ /**
1057
+ * Complex selectors with :not() are :not supported
1058
+ * in older versions of Chromium so we need to do a
1059
+ * try/catch here so errors are not thrown.
1060
+ */
1061
+ try {
1062
+ /**
1063
+ * Select all ion-items that are not children of child popovers.
1064
+ * i.e. only select ion-item elements that are part of this popover
1065
+ */
1066
+ items = Array.from(popoverEl.querySelectorAll('ion-item:not(ion-popover ion-popover *):not([disabled])'));
1067
+ /* tslint:disable-next-line */
1068
+ }
1069
+ catch (_a) { }
1070
+ switch (ev.key) {
1071
+ /**
1072
+ * If we are in a child popover
1073
+ * then pressing the left arrow key
1074
+ * should close this popover and move
1075
+ * focus to the popover that presented
1076
+ * this one.
1077
+ */
1078
+ case 'ArrowLeft':
1079
+ const parentPopover = await popoverEl.getParentPopover();
1080
+ if (parentPopover) {
1081
+ popoverEl.dismiss(undefined, undefined, false);
1082
+ }
1083
+ break;
1084
+ /**
1085
+ * ArrowDown should move focus to the next focusable ion-item.
1086
+ */
1087
+ case 'ArrowDown':
1088
+ // Disable movement/scroll with keyboard
1089
+ ev.preventDefault();
1090
+ const nextItem = getNextItem(items, activeElement);
1091
+ // tslint:disable-next-line:strict-type-predicates
1092
+ if (nextItem !== undefined) {
1093
+ focusItem(nextItem);
1094
+ }
1095
+ break;
1096
+ /**
1097
+ * ArrowUp should move focus to the previous focusable ion-item.
1098
+ */
1099
+ case 'ArrowUp':
1100
+ // Disable movement/scroll with keyboard
1101
+ ev.preventDefault();
1102
+ const prevItem = getPrevItem(items, activeElement);
1103
+ // tslint:disable-next-line:strict-type-predicates
1104
+ if (prevItem !== undefined) {
1105
+ focusItem(prevItem);
1106
+ }
1107
+ break;
1108
+ /**
1109
+ * Home should move focus to the first focusable ion-item.
1110
+ */
1111
+ case 'Home':
1112
+ ev.preventDefault();
1113
+ const firstItem = items[0];
1114
+ // tslint:disable-next-line:strict-type-predicates
1115
+ if (firstItem !== undefined) {
1116
+ focusItem(firstItem);
1117
+ }
1118
+ break;
1119
+ /**
1120
+ * End should move focus to the last focusable ion-item.
1121
+ */
1122
+ case 'End':
1123
+ ev.preventDefault();
1124
+ const lastItem = items[items.length - 1];
1125
+ // tslint:disable-next-line:strict-type-predicates
1126
+ if (lastItem !== undefined) {
1127
+ focusItem(lastItem);
1128
+ }
1129
+ break;
1130
+ /**
1131
+ * ArrowRight, Spacebar, or Enter should activate
1132
+ * the currently focused trigger item to open a
1133
+ * popover if the element is a trigger item.
1134
+ */
1135
+ case 'ArrowRight':
1136
+ case ' ':
1137
+ case 'Enter':
1138
+ if (activeElement && isTriggerElement(activeElement)) {
1139
+ const rightEvent = new CustomEvent('ionPopoverActivateTrigger');
1140
+ activeElement.dispatchEvent(rightEvent);
1141
+ }
1142
+ break;
1143
+ }
1144
+ };
1145
+ popoverEl.addEventListener('keydown', callback);
1146
+ return () => popoverEl.removeEventListener('keydown', callback);
1147
+ };
1148
+ /**
1149
+ * Positions a popover by taking into account
1150
+ * the reference point, preferred side, alignment
1151
+ * and viewport dimensions.
1152
+ */
1153
+ const getPopoverPosition = (isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, triggerEl, event) => {
1154
+ var _a;
1155
+ let referenceCoordinates = {
1156
+ top: 0,
1157
+ left: 0,
1158
+ width: 0,
1159
+ height: 0
1160
+ };
1161
+ /**
1162
+ * Calculate position relative to the
1163
+ * x-y coordinates in the event that
1164
+ * was passed in
1165
+ */
1166
+ switch (reference) {
1167
+ case 'event':
1168
+ if (!event) {
1169
+ return defaultPosition;
1170
+ }
1171
+ const mouseEv = event;
1172
+ referenceCoordinates = {
1173
+ top: mouseEv.clientY,
1174
+ left: mouseEv.clientX,
1175
+ width: 1,
1176
+ height: 1
1177
+ };
1178
+ break;
1179
+ /**
1180
+ * Calculate position relative to the bounding
1181
+ * box on either the trigger element
1182
+ * specified via the `trigger` prop or
1183
+ * the target specified on the event
1184
+ * that was passed in.
1185
+ */
1186
+ case 'trigger':
1187
+ default:
1188
+ const customEv = event;
1189
+ /**
1190
+ * ionShadowTarget is used when we need to align the
1191
+ * popover with an element inside of the shadow root
1192
+ * of an Ionic component. Ex: Presenting a popover
1193
+ * by clicking on the collapsed indicator inside
1194
+ * of `ion-breadcrumb` and centering it relative
1195
+ * to the indicator rather than `ion-breadcrumb`
1196
+ * as a whole.
1197
+ */
1198
+ const actualTriggerEl = (triggerEl || ((_a = customEv === null || customEv === void 0 ? void 0 : customEv.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) || (customEv === null || customEv === void 0 ? void 0 : customEv.target));
1199
+ if (!actualTriggerEl) {
1200
+ return defaultPosition;
1201
+ }
1202
+ const triggerBoundingBox = actualTriggerEl.getBoundingClientRect();
1203
+ referenceCoordinates = {
1204
+ top: triggerBoundingBox.top,
1205
+ left: triggerBoundingBox.left,
1206
+ width: triggerBoundingBox.width,
1207
+ height: triggerBoundingBox.height
1208
+ };
1209
+ break;
1210
+ }
1211
+ /**
1212
+ * Get top/left offset that would allow
1213
+ * popover to be positioned on the
1214
+ * preferred side of the reference.
1215
+ */
1216
+ const coordinates = calculatePopoverSide(side, referenceCoordinates, contentWidth, contentHeight, arrowWidth, arrowHeight, isRTL);
1217
+ /**
1218
+ * Get the top/left adjustments that
1219
+ * would allow the popover content
1220
+ * to have the correct alignment.
1221
+ */
1222
+ const alignedCoordinates = calculatePopoverAlign(align, side, referenceCoordinates, contentWidth, contentHeight);
1223
+ const top = coordinates.top + alignedCoordinates.top;
1224
+ const left = coordinates.left + alignedCoordinates.left;
1225
+ const { arrowTop, arrowLeft } = calculateArrowPosition(side, arrowWidth, arrowHeight, top, left, contentWidth, contentHeight, isRTL);
1226
+ const { originX, originY } = calculatePopoverOrigin(side, align, isRTL);
1227
+ return { top, left, referenceCoordinates, arrowTop, arrowLeft, originX, originY };
1228
+ };
1229
+ /**
1230
+ * Determines the transform-origin
1231
+ * of the popover animation so that it
1232
+ * is in line with what the side and alignment
1233
+ * prop values are. Currently only used
1234
+ * with the MD animation.
1235
+ */
1236
+ const calculatePopoverOrigin = (side, align, isRTL) => {
1237
+ switch (side) {
1238
+ case 'top':
1239
+ return { originX: getOriginXAlignment(align), originY: 'bottom' };
1240
+ case 'bottom':
1241
+ return { originX: getOriginXAlignment(align), originY: 'top' };
1242
+ case 'left':
1243
+ return { originX: 'right', originY: getOriginYAlignment(align) };
1244
+ case 'right':
1245
+ return { originX: 'left', originY: getOriginYAlignment(align) };
1246
+ case 'start':
1247
+ return { originX: (isRTL) ? 'left' : 'right', originY: getOriginYAlignment(align) };
1248
+ case 'end':
1249
+ return { originX: (isRTL) ? 'right' : 'left', originY: getOriginYAlignment(align) };
1250
+ }
1251
+ };
1252
+ const getOriginXAlignment = (align) => {
1253
+ switch (align) {
1254
+ case 'start':
1255
+ return 'left';
1256
+ case 'center':
1257
+ return 'center';
1258
+ case 'end':
1259
+ return 'right';
1260
+ }
1261
+ };
1262
+ const getOriginYAlignment = (align) => {
1263
+ switch (align) {
1264
+ case 'start':
1265
+ return 'top';
1266
+ case 'center':
1267
+ return 'center';
1268
+ case 'end':
1269
+ return 'bottom';
1270
+ }
1271
+ };
1272
+ /**
1273
+ * Calculates where the arrow positioning
1274
+ * should be relative to the popover content.
1275
+ */
1276
+ const calculateArrowPosition = (side, arrowWidth, arrowHeight, top, left, contentWidth, contentHeight, isRTL) => {
1277
+ /**
1278
+ * Note: When side is left, right, start, or end, the arrow is
1279
+ * been rotated using a `transform`, so to move the arrow up or down
1280
+ * by its dimension, you need to use `arrowWidth`.
1281
+ */
1282
+ const leftPosition = { arrowTop: top + (contentHeight / 2) - (arrowWidth / 2), arrowLeft: left + contentWidth - (arrowWidth / 2) };
1283
+ /**
1284
+ * Move the arrow to the left by arrowWidth and then
1285
+ * again by half of its width because we have rotated
1286
+ * the arrow using a transform.
1287
+ */
1288
+ const rightPosition = { arrowTop: top + (contentHeight / 2) - (arrowWidth / 2), arrowLeft: left - (arrowWidth * 1.5) };
1289
+ switch (side) {
1290
+ case 'top':
1291
+ return { arrowTop: top + contentHeight, arrowLeft: left + (contentWidth / 2) - (arrowWidth / 2) };
1292
+ case 'bottom':
1293
+ return { arrowTop: top - arrowHeight, arrowLeft: left + (contentWidth / 2) - (arrowWidth / 2) };
1294
+ case 'left':
1295
+ return leftPosition;
1296
+ case 'right':
1297
+ return rightPosition;
1298
+ case 'start':
1299
+ return (isRTL) ? rightPosition : leftPosition;
1300
+ case 'end':
1301
+ return (isRTL) ? leftPosition : rightPosition;
1302
+ default:
1303
+ return { arrowTop: 0, arrowLeft: 0 };
1304
+ }
1305
+ };
1306
+ /**
1307
+ * Calculates the required top/left
1308
+ * values needed to position the popover
1309
+ * content on the side specified in the
1310
+ * `side` prop.
1311
+ */
1312
+ const calculatePopoverSide = (side, triggerBoundingBox, contentWidth, contentHeight, arrowWidth, arrowHeight, isRTL) => {
1313
+ const sideLeft = {
1314
+ top: triggerBoundingBox.top,
1315
+ left: triggerBoundingBox.left - contentWidth - arrowWidth
1316
+ };
1317
+ const sideRight = {
1318
+ top: triggerBoundingBox.top,
1319
+ left: triggerBoundingBox.left + triggerBoundingBox.width + arrowWidth
1320
+ };
1321
+ switch (side) {
1322
+ case 'top':
1323
+ return {
1324
+ top: triggerBoundingBox.top - contentHeight - arrowHeight,
1325
+ left: triggerBoundingBox.left
1326
+ };
1327
+ case 'right':
1328
+ return sideRight;
1329
+ case 'bottom':
1330
+ return {
1331
+ top: triggerBoundingBox.top + triggerBoundingBox.height + arrowHeight,
1332
+ left: triggerBoundingBox.left
1333
+ };
1334
+ case 'left':
1335
+ return sideLeft;
1336
+ case 'start':
1337
+ return (isRTL) ? sideRight : sideLeft;
1338
+ case 'end':
1339
+ return (isRTL) ? sideLeft : sideRight;
1340
+ }
1341
+ };
1342
+ /**
1343
+ * Calculates the required top/left
1344
+ * offset values needed to provide the
1345
+ * correct alignment regardless while taking
1346
+ * into account the side the popover is on.
1347
+ */
1348
+ const calculatePopoverAlign = (align, side, triggerBoundingBox, contentWidth, contentHeight) => {
1349
+ switch (align) {
1350
+ case 'center':
1351
+ return calculatePopoverCenterAlign(side, triggerBoundingBox, contentWidth, contentHeight);
1352
+ case 'end':
1353
+ return calculatePopoverEndAlign(side, triggerBoundingBox, contentWidth, contentHeight);
1354
+ case 'start':
1355
+ default:
1356
+ return { top: 0, left: 0 };
1357
+ }
1358
+ };
1359
+ /**
1360
+ * Calculate the end alignment for
1361
+ * the popover. If side is on the x-axis
1362
+ * then the align values refer to the top
1363
+ * and bottom margins of the content.
1364
+ * If side is on the y-axis then the
1365
+ * align values refer to the left and right
1366
+ * margins of the content.
1367
+ */
1368
+ const calculatePopoverEndAlign = (side, triggerBoundingBox, contentWidth, contentHeight) => {
1369
+ switch (side) {
1370
+ case 'start':
1371
+ case 'end':
1372
+ case 'left':
1373
+ case 'right':
1374
+ return {
1375
+ top: -(contentHeight - triggerBoundingBox.height),
1376
+ left: 0
1377
+ };
1378
+ case 'top':
1379
+ case 'bottom':
1380
+ default:
1381
+ return {
1382
+ top: 0,
1383
+ left: -(contentWidth - triggerBoundingBox.width)
1384
+ };
1385
+ }
1386
+ };
1387
+ /**
1388
+ * Calculate the center alignment for
1389
+ * the popover. If side is on the x-axis
1390
+ * then the align values refer to the top
1391
+ * and bottom margins of the content.
1392
+ * If side is on the y-axis then the
1393
+ * align values refer to the left and right
1394
+ * margins of the content.
1395
+ */
1396
+ const calculatePopoverCenterAlign = (side, triggerBoundingBox, contentWidth, contentHeight) => {
1397
+ switch (side) {
1398
+ case 'start':
1399
+ case 'end':
1400
+ case 'left':
1401
+ case 'right':
1402
+ return {
1403
+ top: -((contentHeight / 2) - (triggerBoundingBox.height / 2)),
1404
+ left: 0
1405
+ };
1406
+ case 'top':
1407
+ case 'bottom':
1408
+ default:
1409
+ return {
1410
+ top: 0,
1411
+ left: -((contentWidth / 2) - (triggerBoundingBox.width / 2))
1412
+ };
1413
+ }
1414
+ };
1415
+ /**
1416
+ * Adjusts popover positioning coordinates
1417
+ * such that popover does not appear offscreen
1418
+ * or overlapping safe area bounds.
1419
+ */
1420
+ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeAreaMargin, contentOriginX, contentOriginY, triggerCoordinates, coordArrowTop = 0, coordArrowLeft = 0, arrowHeight = 0) => {
1421
+ let arrowTop = coordArrowTop;
1422
+ const arrowLeft = coordArrowLeft;
1423
+ let left = coordLeft;
1424
+ let top = coordTop;
1425
+ let bottom;
1426
+ let originX = contentOriginX;
1427
+ let originY = contentOriginY;
1428
+ let checkSafeAreaLeft = false;
1429
+ let checkSafeAreaRight = false;
1430
+ const triggerTop = triggerCoordinates ? triggerCoordinates.top + triggerCoordinates.height : bodyHeight / 2 - contentHeight / 2;
1431
+ const triggerHeight = triggerCoordinates ? triggerCoordinates.height : 0;
1432
+ let addPopoverBottomClass = false;
1433
+ /**
1434
+ * Adjust popover so it does not
1435
+ * go off the left of the screen.
1436
+ */
1437
+ if (left < bodyPadding + safeAreaMargin) {
1438
+ left = bodyPadding;
1439
+ checkSafeAreaLeft = true;
1440
+ originX = 'left';
1441
+ /**
1442
+ * Adjust popover so it does not
1443
+ * go off the right of the screen.
1444
+ */
1445
+ }
1446
+ else if (contentWidth + bodyPadding + left + safeAreaMargin > bodyWidth) {
1447
+ checkSafeAreaRight = true;
1448
+ left = bodyWidth - contentWidth - bodyPadding;
1449
+ originX = 'right';
1450
+ }
1451
+ /**
1452
+ * Adjust popover so it does not
1453
+ * go off the top of the screen.
1454
+ * If popover is on the left or the right of
1455
+ * the trigger, then we should not adjust top
1456
+ * margins.
1457
+ */
1458
+ if (triggerTop + triggerHeight + contentHeight > bodyHeight &&
1459
+ (side === 'top' || side === 'bottom')) {
1460
+ if (triggerTop - contentHeight > 0) {
1461
+ top = triggerTop - contentHeight - triggerHeight - (arrowHeight - 1);
1462
+ arrowTop = top + contentHeight;
1463
+ originY = 'bottom';
1464
+ addPopoverBottomClass = true;
1465
+ /**
1466
+ * If not enough room for popover to appear
1467
+ * above trigger, then cut it off.
1468
+ */
1469
+ }
1470
+ else {
1471
+ bottom = bodyPadding;
1472
+ }
1473
+ }
1474
+ return { top, left, bottom, originX, originY, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass };
1475
+ };
1476
+ const shouldShowArrow = (side, didAdjustBounds = false, ev, trigger) => {
1477
+ /**
1478
+ * If no event provided and
1479
+ * we do not have a trigger,
1480
+ * then this popover was likely
1481
+ * presented via the popoverController
1482
+ * or users called `present` manually.
1483
+ * In this case, the arrow should not be
1484
+ * shown as we do not have a reference.
1485
+ */
1486
+ if (!ev && !trigger) {
1487
+ return false;
1488
+ }
1489
+ /**
1490
+ * If popover is on the left or the right
1491
+ * of a trigger, but we needed to adjust the
1492
+ * popover due to screen bounds, then we should
1493
+ * hide the arrow as it will never be pointing
1494
+ * at the trigger.
1495
+ */
1496
+ if (side !== 'top' && side !== 'bottom' && didAdjustBounds) {
1497
+ return false;
1498
+ }
1499
+ return true;
1500
+ };
1501
+
1502
+ /*!
1503
+ * (C) Ionic http://ionicframework.com - MIT License
1504
+ */
1505
+ const POPOVER_IOS_BODY_PADDING = 5;
1506
+ /**
1507
+ * iOS Popover Enter Animation
1508
+ */
1509
+ const iosEnterAnimation = (baseEl, opts) => {
1510
+ var _a;
1511
+ const { event: ev, size, trigger, reference, side, align } = opts;
1512
+ const doc = baseEl.ownerDocument;
1513
+ const isRTL = doc.dir === 'rtl';
1514
+ const bodyWidth = doc.defaultView.innerWidth;
1515
+ const bodyHeight = doc.defaultView.innerHeight;
1516
+ const root = helpers.getElementRoot(baseEl);
1517
+ const contentEl = root.querySelector('.popover-content');
1518
+ const arrowEl = root.querySelector('.popover-arrow');
1519
+ const referenceSizeEl = trigger || ((_a = ev === null || ev === void 0 ? void 0 : ev.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) || (ev === null || ev === void 0 ? void 0 : ev.target);
1520
+ const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
1521
+ const { arrowWidth, arrowHeight } = getArrowDimensions(arrowEl);
1522
+ const defaultPosition = {
1523
+ top: bodyHeight / 2 - contentHeight / 2,
1524
+ left: bodyWidth / 2 - contentWidth / 2,
1525
+ originX: isRTL ? 'right' : 'left',
1526
+ originY: 'top'
1527
+ };
1528
+ const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
1529
+ const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
1530
+ const margin = size === 'cover' ? 0 : 25;
1531
+ const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
1532
+ const baseAnimation = animation.createAnimation();
1533
+ const backdropAnimation = animation.createAnimation();
1534
+ const wrapperAnimation = animation.createAnimation();
1535
+ backdropAnimation
1536
+ .addElement(root.querySelector('ion-backdrop'))
1537
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1538
+ .beforeStyles({
1539
+ 'pointer-events': 'none'
1540
+ })
1541
+ .afterClearStyles(['pointer-events']);
1542
+ wrapperAnimation
1543
+ .addElement(root.querySelector('.popover-wrapper'))
1544
+ .fromTo('opacity', 0.01, 1);
1545
+ return baseAnimation
1546
+ .easing('ease')
1547
+ .duration(100)
1548
+ .beforeAddWrite(() => {
1549
+ if (size === 'cover') {
1550
+ baseEl.style.setProperty('--width', `${contentWidth}px`);
1551
+ }
1552
+ if (addPopoverBottomClass) {
1553
+ baseEl.classList.add('popover-bottom');
1554
+ }
1555
+ if (bottom !== undefined) {
1556
+ contentEl.style.setProperty('bottom', `${bottom}px`);
1557
+ }
1558
+ const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
1559
+ const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
1560
+ let leftValue = `${left}px`;
1561
+ if (checkSafeAreaLeft) {
1562
+ leftValue = `${left}px${safeAreaLeft}`;
1563
+ }
1564
+ if (checkSafeAreaRight) {
1565
+ leftValue = `${left}px${safeAreaRight}`;
1566
+ }
1567
+ contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
1568
+ contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
1569
+ contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
1570
+ if (arrowEl !== null) {
1571
+ const didAdjustBounds = results.top !== top || results.left !== left;
1572
+ const showArrow = shouldShowArrow(side, didAdjustBounds, ev, trigger);
1573
+ if (showArrow) {
1574
+ arrowEl.style.setProperty('top', `calc(${arrowTop}px + var(--offset-y, 0))`);
1575
+ arrowEl.style.setProperty('left', `calc(${arrowLeft}px + var(--offset-x, 0))`);
1576
+ }
1577
+ else {
1578
+ arrowEl.style.setProperty('display', 'none');
1579
+ }
1580
+ }
1581
+ })
1582
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1583
+ };
1584
+
1585
+ /*!
1586
+ * (C) Ionic http://ionicframework.com - MIT License
1587
+ */
1588
+ /**
1589
+ * iOS Popover Leave Animation
1590
+ */
1591
+ const iosLeaveAnimation = (baseEl) => {
1592
+ const root = helpers.getElementRoot(baseEl);
1593
+ const contentEl = root.querySelector('.popover-content');
1594
+ const arrowEl = root.querySelector('.popover-arrow');
1595
+ const baseAnimation = animation.createAnimation();
1596
+ const backdropAnimation = animation.createAnimation();
1597
+ const wrapperAnimation = animation.createAnimation();
1598
+ backdropAnimation
1599
+ .addElement(root.querySelector('ion-backdrop'))
1600
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0);
1601
+ wrapperAnimation
1602
+ .addElement(root.querySelector('.popover-wrapper'))
1603
+ .fromTo('opacity', 0.99, 0);
1604
+ return baseAnimation
1605
+ .easing('ease')
1606
+ .afterAddWrite(() => {
1607
+ baseEl.style.removeProperty('--width');
1608
+ baseEl.classList.remove('popover-bottom');
1609
+ contentEl.style.removeProperty('top');
1610
+ contentEl.style.removeProperty('left');
1611
+ contentEl.style.removeProperty('bottom');
1612
+ contentEl.style.removeProperty('transform-origin');
1613
+ if (arrowEl) {
1614
+ arrowEl.style.removeProperty('top');
1615
+ arrowEl.style.removeProperty('left');
1616
+ arrowEl.style.removeProperty('display');
1617
+ }
1618
+ })
1619
+ .duration(300)
1620
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1621
+ };
1622
+
1623
+ /*!
1624
+ * (C) Ionic http://ionicframework.com - MIT License
1625
+ */
1626
+ const POPOVER_MD_BODY_PADDING = 12;
1627
+ /**
1628
+ * Md Popover Enter Animation
1629
+ */
1630
+ const mdEnterAnimation = (baseEl, opts) => {
1631
+ var _a;
1632
+ const { event: ev, size, trigger, reference, side, align } = opts;
1633
+ const doc = baseEl.ownerDocument;
1634
+ const isRTL = doc.dir === 'rtl';
1635
+ const bodyWidth = doc.defaultView.innerWidth;
1636
+ const bodyHeight = doc.defaultView.innerHeight;
1637
+ const root = helpers.getElementRoot(baseEl);
1638
+ const contentEl = root.querySelector('.popover-content');
1639
+ const referenceSizeEl = trigger || ((_a = ev === null || ev === void 0 ? void 0 : ev.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) || (ev === null || ev === void 0 ? void 0 : ev.target);
1640
+ const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
1641
+ const defaultPosition = {
1642
+ top: bodyHeight / 2 - contentHeight / 2,
1643
+ left: bodyWidth / 2 - contentWidth / 2,
1644
+ originX: isRTL ? 'right' : 'left',
1645
+ originY: 'top'
1646
+ };
1647
+ const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
1648
+ const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
1649
+ const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
1650
+ const baseAnimation = animation.createAnimation();
1651
+ const backdropAnimation = animation.createAnimation();
1652
+ const wrapperAnimation = animation.createAnimation();
1653
+ const contentAnimation = animation.createAnimation();
1654
+ const viewportAnimation = animation.createAnimation();
1655
+ backdropAnimation
1656
+ .addElement(root.querySelector('ion-backdrop'))
1657
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1658
+ .beforeStyles({
1659
+ 'pointer-events': 'none'
1660
+ })
1661
+ .afterClearStyles(['pointer-events']);
1662
+ wrapperAnimation
1663
+ .addElement(root.querySelector('.popover-wrapper'))
1664
+ .duration(150)
1665
+ .fromTo('opacity', 0.01, 1);
1666
+ contentAnimation
1667
+ .addElement(contentEl)
1668
+ .beforeStyles({
1669
+ 'top': `calc(${top}px + var(--offset-y, 0px))`,
1670
+ 'left': `calc(${left}px + var(--offset-x, 0px))`,
1671
+ 'transform-origin': `${originY} ${originX}`
1672
+ })
1673
+ .beforeAddWrite(() => {
1674
+ if (bottom !== undefined) {
1675
+ contentEl.style.setProperty('bottom', `${bottom}px`);
1676
+ }
1677
+ })
1678
+ .fromTo('transform', 'scale(0.8)', 'scale(1)');
1679
+ viewportAnimation
1680
+ .addElement(root.querySelector('.popover-viewport'))
1681
+ .fromTo('opacity', 0.01, 1);
1682
+ return baseAnimation
1683
+ .easing('cubic-bezier(0.36,0.66,0.04,1)')
1684
+ .duration(300)
1685
+ .beforeAddWrite(() => {
1686
+ if (size === 'cover') {
1687
+ baseEl.style.setProperty('--width', `${contentWidth}px`);
1688
+ }
1689
+ if (originY === 'bottom') {
1690
+ baseEl.classList.add('popover-bottom');
1691
+ }
1692
+ })
1693
+ .addAnimation([backdropAnimation, wrapperAnimation, contentAnimation, viewportAnimation]);
1694
+ };
1695
+
1696
+ /*!
1697
+ * (C) Ionic http://ionicframework.com - MIT License
1698
+ */
1699
+ /**
1700
+ * Md Popover Leave Animation
1701
+ */
1702
+ const mdLeaveAnimation = (baseEl) => {
1703
+ const root = helpers.getElementRoot(baseEl);
1704
+ const contentEl = root.querySelector('.popover-content');
1705
+ const baseAnimation = animation.createAnimation();
1706
+ const backdropAnimation = animation.createAnimation();
1707
+ const wrapperAnimation = animation.createAnimation();
1708
+ backdropAnimation
1709
+ .addElement(root.querySelector('ion-backdrop'))
1710
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0);
1711
+ wrapperAnimation
1712
+ .addElement(root.querySelector('.popover-wrapper'))
1713
+ .fromTo('opacity', 0.99, 0);
1714
+ return baseAnimation
1715
+ .easing('ease')
1716
+ .afterAddWrite(() => {
1717
+ baseEl.style.removeProperty('--width');
1718
+ baseEl.classList.remove('popover-bottom');
1719
+ contentEl.style.removeProperty('top');
1720
+ contentEl.style.removeProperty('left');
1721
+ contentEl.style.removeProperty('bottom');
1722
+ contentEl.style.removeProperty('transform-origin');
1723
+ })
1724
+ .duration(150)
1725
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1726
+ };
1727
+
1728
+ const popoverIosCss = ":host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:flex;position:fixed;align-items:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{opacity:0;z-index:10}.popover-content{display:flex;position:absolute;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);box-shadow:var(--box-shadow);overflow:auto;z-index:10}.popover-viewport{--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:flex;flex-direction:column;overflow:hidden}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}:host{--width:200px;--max-height:90%;--box-shadow:none;--backdrop-opacity:var(--ion-backdrop-opacity, 0.08)}:host(.popover-desktop){--box-shadow:0px 4px 16px 0px rgba(0, 0, 0, 0.12)}.popover-content{border-radius:10px}:host(.popover-desktop) .popover-content{border:0.5px solid var(--ion-color-step-100, #e6e6e6)}.popover-arrow{display:block;position:absolute;width:20px;height:10px;overflow:hidden}.popover-arrow::after{left:3px;top:3px;border-radius:3px;position:absolute;width:14px;height:14px;transform:rotate(45deg);background:var(--background);content:\"\";z-index:10}[dir=rtl] .popover-arrow::after,:host-context([dir=rtl]) .popover-arrow::after{left:unset;right:unset;right:3px}:host(.popover-bottom) .popover-arrow{top:auto;bottom:-10px}:host(.popover-bottom) .popover-arrow::after{top:-6px}:host(.popover-side-left) .popover-arrow{transform:rotate(90deg)}:host(.popover-side-right) .popover-arrow{transform:rotate(-90deg)}:host(.popover-side-top) .popover-arrow{transform:rotate(180deg)}:host(.popover-side-start) .popover-arrow{transform:rotate(90deg)}:host-context([dir=rtl]):host(.popover-side-start) .popover-arrow,:host-context([dir=rtl]).popover-side-start .popover-arrow{transform:rotate(-90deg)}:host(.popover-side-end) .popover-arrow{transform:rotate(-90deg)}:host-context([dir=rtl]):host(.popover-side-end) .popover-arrow,:host-context([dir=rtl]).popover-side-end .popover-arrow{transform:rotate(90deg)}@supports (backdrop-filter: blur(0)){:host(.popover-translucent) .popover-content,:host(.popover-translucent) .popover-arrow::after{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);backdrop-filter:saturate(180%) blur(20px)}}";
1729
+
1730
+ const popoverMdCss = ":host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:flex;position:fixed;align-items:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{opacity:0;z-index:10}.popover-content{display:flex;position:absolute;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);box-shadow:var(--box-shadow);overflow:auto;z-index:10}.popover-viewport{--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:flex;flex-direction:column;overflow:hidden}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}:host{--width:250px;--max-height:90%;--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}.popover-content{border-radius:4px;transform-origin:left top}[dir=rtl] .popover-content,:host-context([dir=rtl]) .popover-content{transform-origin:right top}.popover-viewport{transition-delay:100ms}";
1731
+
1732
+ const Popover = class {
1733
+ constructor(hostRef) {
1734
+ index$1.registerInstance(this, hostRef);
1735
+ this.didPresent = index$1.createEvent(this, "ionPopoverDidPresent", 7);
1736
+ this.willPresent = index$1.createEvent(this, "ionPopoverWillPresent", 7);
1737
+ this.willDismiss = index$1.createEvent(this, "ionPopoverWillDismiss", 7);
1738
+ this.didDismiss = index$1.createEvent(this, "ionPopoverDidDismiss", 7);
1739
+ this.didPresentShorthand = index$1.createEvent(this, "didPresent", 7);
1740
+ this.willPresentShorthand = index$1.createEvent(this, "willPresent", 7);
1741
+ this.willDismissShorthand = index$1.createEvent(this, "willDismiss", 7);
1742
+ this.didDismissShorthand = index$1.createEvent(this, "didDismiss", 7);
1743
+ this.parentPopover = null;
1744
+ this.popoverIndex = popoverIds++;
1745
+ this.coreDelegate = frameworkDelegate.CoreDelegate();
1746
+ this.inline = false;
1747
+ this.focusDescendantOnPresent = false;
1748
+ this.presented = false;
1749
+ /** @internal */
1750
+ this.hasController = false;
1751
+ /**
1752
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
1753
+ */
1754
+ this.keyboardClose = true;
1755
+ /**
1756
+ * If `true`, the popover will be dismissed when the backdrop is clicked.
1757
+ */
1758
+ this.backdropDismiss = true;
1759
+ /**
1760
+ * If `true`, a backdrop will be displayed behind the popover.
1761
+ */
1762
+ this.showBackdrop = true;
1763
+ /**
1764
+ * If `true`, the popover will be translucent.
1765
+ * Only applies when the mode is `"ios"` and the device supports
1766
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
1767
+ */
1768
+ this.translucent = false;
1769
+ /**
1770
+ * If `true`, the popover will animate.
1771
+ */
1772
+ this.animated = true;
1773
+ /**
1774
+ * Describes what kind of interaction with the trigger that
1775
+ * should cause the popover to open. Does not apply when the `trigger`
1776
+ * property is `undefined`.
1777
+ * If `'click'`, the popover will be presented when the trigger is left clicked.
1778
+ * If `'hover'`, the popover will be presented when a pointer hovers over the trigger.
1779
+ * If `'context-menu'`, the popover will be presented when the trigger is right
1780
+ * clicked on desktop and long pressed on mobile. This will also prevent your
1781
+ * device's normal context menu from appearing.
1782
+ */
1783
+ this.triggerAction = 'click';
1784
+ /**
1785
+ * Describes how to calculate the popover width.
1786
+ * If `'cover'`, the popover width will match the width of the trigger.
1787
+ * If `'auto'`, the popover width will be determined by the content in
1788
+ * the popover.
1789
+ */
1790
+ this.size = 'auto';
1791
+ /**
1792
+ * If `true`, the popover will be automatically
1793
+ * dismissed when the content has been clicked.
1794
+ */
1795
+ this.dismissOnSelect = false;
1796
+ /**
1797
+ * Describes what to position the popover relative to.
1798
+ * If `'trigger'`, the popover will be positioned relative
1799
+ * to the trigger button. If passing in an event, this is
1800
+ * determined via event.target.
1801
+ * If `'event'`, the popover will be positioned relative
1802
+ * to the x/y coordinates of the trigger action. If passing
1803
+ * in an event, this is determined via event.clientX and event.clientY.
1804
+ */
1805
+ this.reference = 'trigger';
1806
+ /**
1807
+ * Describes which side of the `reference` point to position
1808
+ * the popover on. The `'start'` and `'end'` values are RTL-aware,
1809
+ * and the `'left'` and `'right'` values are not.
1810
+ */
1811
+ this.side = 'bottom';
1812
+ /**
1813
+ * If `true`, the popover will display an arrow
1814
+ * that points at the `reference` when running in `ios` mode
1815
+ * on mobile. Does not apply in `md` mode or on desktop.
1816
+ */
1817
+ this.arrow = true;
1818
+ /**
1819
+ * If `true`, the popover will open. If `false`, the popover will close.
1820
+ * Use this if you need finer grained control over presentation, otherwise
1821
+ * just use the popoverController or the `trigger` property.
1822
+ * Note: `isOpen` will not automatically be set back to `false` when
1823
+ * the popover dismisses. You will need to do that in your code.
1824
+ */
1825
+ this.isOpen = false;
1826
+ /**
1827
+ * @internal
1828
+ *
1829
+ * If `true` the popover will not register its own keyboard event handlers.
1830
+ * This allows the contents of the popover to handle their own keyboard interactions.
1831
+ *
1832
+ * If `false`, the popover will register its own keyboard event handlers for
1833
+ * navigating `ion-list` items within a popover (up/down/home/end/etc.).
1834
+ * This will also cancel browser keyboard event bindings to prevent scroll
1835
+ * behavior in a popover using a list of items.
1836
+ */
1837
+ this.keyboardEvents = false;
1838
+ this.onDismiss = (ev) => {
1839
+ ev.stopPropagation();
1840
+ ev.preventDefault();
1841
+ this.dismiss();
1842
+ };
1843
+ this.onBackdropTap = () => {
1844
+ this.dismiss(undefined, overlays.BACKDROP);
1845
+ };
1846
+ this.onLifecycle = (modalEvent) => {
1847
+ const el = this.usersElement;
1848
+ const name = LIFECYCLE_MAP[modalEvent.type];
1849
+ if (el && name) {
1850
+ const event = new CustomEvent(name, {
1851
+ bubbles: false,
1852
+ cancelable: false,
1853
+ detail: modalEvent.detail
1854
+ });
1855
+ el.dispatchEvent(event);
1856
+ }
1857
+ };
1858
+ this.configureTriggerInteraction = () => {
1859
+ const { trigger, triggerAction, el, destroyTriggerInteraction } = this;
1860
+ if (destroyTriggerInteraction) {
1861
+ destroyTriggerInteraction();
1862
+ }
1863
+ const triggerEl = this.triggerEl = (trigger !== undefined) ? document.getElementById(trigger) : null;
1864
+ if (!triggerEl) {
1865
+ return;
1866
+ }
1867
+ this.destroyTriggerInteraction = configureTriggerInteraction(triggerEl, triggerAction, el);
1868
+ };
1869
+ this.configureKeyboardInteraction = () => {
1870
+ const { destroyKeyboardInteraction, el } = this;
1871
+ if (destroyKeyboardInteraction) {
1872
+ destroyKeyboardInteraction();
1873
+ }
1874
+ this.destroyKeyboardInteraction = configureKeyboardInteraction(el);
1875
+ };
1876
+ this.configureDismissInteraction = () => {
1877
+ const { destroyDismissInteraction, parentPopover, triggerAction, triggerEl, el } = this;
1878
+ if (!parentPopover || !triggerEl) {
1879
+ return;
1880
+ }
1881
+ if (destroyDismissInteraction) {
1882
+ destroyDismissInteraction();
1883
+ }
1884
+ this.destroyDismissInteraction = configureDismissInteraction(triggerEl, triggerAction, el, parentPopover);
1885
+ };
1886
+ }
1887
+ onTriggerChange() {
1888
+ this.configureTriggerInteraction();
1889
+ }
1890
+ onIsOpenChange(newValue, oldValue) {
1891
+ if (newValue === true && oldValue === false) {
1892
+ this.present();
1893
+ }
1894
+ else if (newValue === false && oldValue === true) {
1895
+ this.dismiss();
1896
+ }
1897
+ }
1898
+ connectedCallback() {
1899
+ overlays.prepareOverlay(this.el);
1900
+ }
1901
+ componentWillLoad() {
1902
+ /**
1903
+ * If user has custom ID set then we should
1904
+ * not assign the default incrementing ID.
1905
+ */
1906
+ this.popoverId = (this.el.hasAttribute('id')) ? this.el.getAttribute('id') : `ion-popover-${this.popoverIndex}`;
1907
+ this.parentPopover = this.el.closest(`ion-popover:not(#${this.popoverId})`);
1908
+ if (this.alignment === undefined) {
1909
+ this.alignment = ionicGlobal.getIonMode(this) === 'ios' ? 'center' : 'start';
1910
+ }
1911
+ }
1912
+ componentDidLoad() {
1913
+ const { parentPopover, isOpen } = this;
1914
+ /**
1915
+ * If popover was rendered with isOpen="true"
1916
+ * then we should open popover immediately.
1917
+ */
1918
+ if (isOpen === true) {
1919
+ helpers.raf(() => this.present());
1920
+ }
1921
+ if (parentPopover) {
1922
+ helpers.addEventListener(parentPopover, 'ionPopoverWillDismiss', () => {
1923
+ this.dismiss(undefined, undefined, false);
1924
+ });
1925
+ }
1926
+ this.configureTriggerInteraction();
1927
+ }
1928
+ /**
1929
+ * When opening a popover from a trigger, we should not be
1930
+ * modifying the `event` prop from inside the component.
1931
+ * Additionally, when pressing the "Right" arrow key, we need
1932
+ * to shift focus to the first descendant in the newly presented
1933
+ * popover.
1934
+ *
1935
+ * @internal
1936
+ */
1937
+ async presentFromTrigger(event, focusDescendant = false) {
1938
+ this.focusDescendantOnPresent = focusDescendant;
1939
+ await this.present(event);
1940
+ this.focusDescendantOnPresent = false;
1941
+ }
1942
+ /**
1943
+ * Determines whether or not an overlay
1944
+ * is being used inline or via a controller/JS
1945
+ * and returns the correct delegate.
1946
+ * By default, subsequent calls to getDelegate
1947
+ * will use a cached version of the delegate.
1948
+ * This is useful for calling dismiss after
1949
+ * present so that the correct delegate is given.
1950
+ */
1951
+ getDelegate(force = false) {
1952
+ if (this.workingDelegate && !force) {
1953
+ return {
1954
+ delegate: this.workingDelegate,
1955
+ inline: this.inline
1956
+ };
1957
+ }
1958
+ /**
1959
+ * If using overlay inline
1960
+ * we potentially need to use the coreDelegate
1961
+ * so that this works in vanilla JS apps.
1962
+ * If a developer has presented this component
1963
+ * via a controller, then we can assume
1964
+ * the component is already in the
1965
+ * correct place.
1966
+ */
1967
+ const parentEl = this.el.parentNode;
1968
+ const inline = this.inline = parentEl !== null && !this.hasController;
1969
+ const delegate = this.workingDelegate = (inline) ? this.delegate || this.coreDelegate : this.delegate;
1970
+ return { inline, delegate };
1971
+ }
1972
+ /**
1973
+ * Present the popover overlay after it has been created.
1974
+ * Developers can pass a mouse, touch, or pointer event
1975
+ * to position the popover relative to where that event
1976
+ * was dispatched.
1977
+ */
1978
+ async present(event) {
1979
+ if (this.presented) {
1980
+ return;
1981
+ }
1982
+ /**
1983
+ * When using an inline popover
1984
+ * and dismissing a popover it is possible to
1985
+ * quickly present the popover while it is
1986
+ * dismissing. We need to await any current
1987
+ * transition to allow the dismiss to finish
1988
+ * before presenting again.
1989
+ */
1990
+ if (this.currentTransition !== undefined) {
1991
+ await this.currentTransition;
1992
+ }
1993
+ const data = Object.assign(Object.assign({}, this.componentProps), { popover: this.el });
1994
+ const { inline, delegate } = this.getDelegate(true);
1995
+ this.usersElement = await frameworkDelegate.attachComponent(delegate, this.el, this.component, ['popover-viewport'], data, inline);
1996
+ await index$3.deepReady(this.usersElement);
1997
+ if (!this.keyboardEvents) {
1998
+ this.configureKeyboardInteraction();
1999
+ }
2000
+ this.configureDismissInteraction();
2001
+ this.currentTransition = overlays.present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, {
2002
+ event: event || this.event,
2003
+ size: this.size,
2004
+ trigger: this.triggerEl,
2005
+ reference: this.reference,
2006
+ side: this.side,
2007
+ align: this.alignment
2008
+ });
2009
+ await this.currentTransition;
2010
+ this.currentTransition = undefined;
2011
+ /**
2012
+ * If popover is nested and was
2013
+ * presented using the "Right" arrow key,
2014
+ * we need to move focus to the first
2015
+ * descendant inside of the popover.
2016
+ */
2017
+ if (this.focusDescendantOnPresent) {
2018
+ overlays.focusFirstDescendant(this.el, this.el);
2019
+ }
2020
+ }
2021
+ /**
2022
+ * Dismiss the popover overlay after it has been presented.
2023
+ *
2024
+ * @param data Any data to emit in the dismiss events.
2025
+ * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
2026
+ * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
2027
+ * a parent popover if this popover is nested. Defaults to `true`.
2028
+ */
2029
+ async dismiss(data, role, dismissParentPopover = true) {
2030
+ /**
2031
+ * When using an inline popover
2032
+ * and presenting a popover it is possible to
2033
+ * quickly dismiss the popover while it is
2034
+ * presenting. We need to await any current
2035
+ * transition to allow the present to finish
2036
+ * before dismissing again.
2037
+ */
2038
+ if (this.currentTransition !== undefined) {
2039
+ await this.currentTransition;
2040
+ }
2041
+ const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
2042
+ if (dismissParentPopover && this.parentPopover) {
2043
+ this.parentPopover.dismiss(data, role, dismissParentPopover);
2044
+ }
2045
+ this.currentTransition = overlays.dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
2046
+ const shouldDismiss = await this.currentTransition;
2047
+ if (shouldDismiss) {
2048
+ if (destroyKeyboardInteraction) {
2049
+ destroyKeyboardInteraction();
2050
+ this.destroyKeyboardInteraction = undefined;
2051
+ }
2052
+ if (destroyDismissInteraction) {
2053
+ destroyDismissInteraction();
2054
+ this.destroyDismissInteraction = undefined;
2055
+ }
2056
+ /**
2057
+ * If using popover inline
2058
+ * we potentially need to use the coreDelegate
2059
+ * so that this works in vanilla JS apps
2060
+ */
2061
+ const { delegate } = this.getDelegate();
2062
+ await frameworkDelegate.detachComponent(delegate, this.usersElement);
2063
+ }
2064
+ this.currentTransition = undefined;
2065
+ return shouldDismiss;
2066
+ }
2067
+ /**
2068
+ * @internal
2069
+ */
2070
+ async getParentPopover() {
2071
+ return this.parentPopover;
2072
+ }
2073
+ /**
2074
+ * Returns a promise that resolves when the popover did dismiss.
2075
+ */
2076
+ onDidDismiss() {
2077
+ return overlays.eventMethod(this.el, 'ionPopoverDidDismiss');
2078
+ }
2079
+ /**
2080
+ * Returns a promise that resolves when the popover will dismiss.
2081
+ */
2082
+ onWillDismiss() {
2083
+ return overlays.eventMethod(this.el, 'ionPopoverWillDismiss');
2084
+ }
2085
+ render() {
2086
+ const mode = ionicGlobal.getIonMode(this);
2087
+ const { onLifecycle, popoverId, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
2088
+ const desktop = ionicGlobal.isPlatform('desktop');
2089
+ const enableArrow = arrow && !parentPopover && !desktop;
2090
+ return (index$1.h(index$1.Host, Object.assign({ "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
2091
+ zIndex: `${20000 + this.overlayIndex}`,
2092
+ }, id: popoverId, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonDismiss: this.onDismiss, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index$1.h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index$1.h("div", { class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index$1.h("div", { class: "popover-arrow", part: "arrow" }), index$1.h("div", { class: "popover-content", part: "content" }, index$1.h("slot", null)))));
2093
+ }
2094
+ get el() { return index$1.getElement(this); }
2095
+ static get watchers() { return {
2096
+ "trigger": ["onTriggerChange"],
2097
+ "triggerAction": ["onTriggerChange"],
2098
+ "isOpen": ["onIsOpenChange"]
2099
+ }; }
2100
+ };
2101
+ const LIFECYCLE_MAP = {
2102
+ 'ionPopoverDidPresent': 'ionViewDidEnter',
2103
+ 'ionPopoverWillPresent': 'ionViewWillEnter',
2104
+ 'ionPopoverWillDismiss': 'ionViewWillLeave',
2105
+ 'ionPopoverDidDismiss': 'ionViewDidLeave',
2106
+ };
2107
+ let popoverIds = 0;
2108
+ Popover.style = {
2109
+ ios: popoverIosCss,
2110
+ md: popoverMdCss
2111
+ };
2112
+
2113
+ const selectPopoverIosCss = ".sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}";
2114
+
2115
+ const selectPopoverMdCss = ".sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md{opacity:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08);--background-focused:var(--ion-color-primary, #3880ff);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #3880ff);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #3880ff)}";
2116
+
2117
+ const SelectPopover = class {
2118
+ constructor(hostRef) {
2119
+ index$1.registerInstance(this, hostRef);
2120
+ /**
2121
+ * An array of options for the popover
2122
+ */
2123
+ this.options = [];
2124
+ }
2125
+ onSelect(ev) {
2126
+ this.setChecked(ev);
2127
+ this.callOptionHandler(ev);
2128
+ }
2129
+ findOptionFromEvent(ev) {
2130
+ const { options } = this;
2131
+ return options.find(o => o.value === ev.target.value);
2132
+ }
2133
+ /**
2134
+ * When an option is selected we need to get the value(s)
2135
+ * of the selected option(s) and return it in the option
2136
+ * handler
2137
+ */
2138
+ callOptionHandler(ev) {
2139
+ const option = this.findOptionFromEvent(ev);
2140
+ const values = this.getValues(ev);
2141
+ if (option && option.handler) {
2142
+ overlays.safeCall(option.handler, values);
2143
+ }
2144
+ }
2145
+ /**
2146
+ * This is required when selecting a radio that is already
2147
+ * selected because it will not trigger the ionChange event
2148
+ * but we still want to close the popover
2149
+ */
2150
+ rbClick(ev) {
2151
+ this.callOptionHandler(ev);
2152
+ }
2153
+ setChecked(ev) {
2154
+ const { multiple } = this;
2155
+ const option = this.findOptionFromEvent(ev);
2156
+ // this is a popover with checkboxes (multiple value select)
2157
+ // we need to set the checked value for this option
2158
+ if (multiple && option) {
2159
+ option.checked = ev.detail.checked;
2160
+ }
2161
+ }
2162
+ getValues(ev) {
2163
+ const { multiple, options } = this;
2164
+ if (multiple) {
2165
+ // this is a popover with checkboxes (multiple value select)
2166
+ // return an array of all the checked values
2167
+ return options.filter(o => o.checked).map(o => o.value);
2168
+ }
2169
+ // this is a popover with radio buttons (single value select)
2170
+ // return the value that was clicked, otherwise undefined
2171
+ const option = this.findOptionFromEvent(ev);
2172
+ return option ? option.value : undefined;
2173
+ }
2174
+ renderOptions(options) {
2175
+ const { multiple } = this;
2176
+ switch (multiple) {
2177
+ case true: return this.renderCheckboxOptions(options);
2178
+ default: return this.renderRadioOptions(options);
2179
+ }
2180
+ }
2181
+ renderCheckboxOptions(options) {
2182
+ return (options.map(option => index$1.h("ion-item", { class: theme.getClassMap(option.cssClass) }, index$1.h("ion-checkbox", { slot: "start", value: option.value, disabled: option.disabled, checked: option.checked }), index$1.h("ion-label", null, option.text))));
2183
+ }
2184
+ renderRadioOptions(options) {
2185
+ const checked = options.filter(o => o.checked).map(o => o.value)[0];
2186
+ return (index$1.h("ion-radio-group", { value: checked }, options.map(option => index$1.h("ion-item", { class: theme.getClassMap(option.cssClass) }, index$1.h("ion-label", null, option.text), index$1.h("ion-radio", { value: option.value, disabled: option.disabled, onClick: ev => this.rbClick(ev) })))));
2187
+ }
2188
+ render() {
2189
+ const { header, message, options, subHeader } = this;
2190
+ const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
2191
+ return (index$1.h(index$1.Host, { class: ionicGlobal.getIonMode(this) }, index$1.h("ion-list", null, header !== undefined && index$1.h("ion-list-header", null, header), hasSubHeaderOrMessage &&
2192
+ index$1.h("ion-item", null, index$1.h("ion-label", { class: "ion-text-wrap" }, subHeader !== undefined && index$1.h("h3", null, subHeader), message !== undefined && index$1.h("p", null, message))), this.renderOptions(options))));
2193
+ }
2194
+ };
2195
+ SelectPopover.style = {
2196
+ ios: selectPopoverIosCss,
2197
+ md: selectPopoverMdCss
2198
+ };
2199
+
2200
+ exports.ion_action_sheet = ActionSheet;
2201
+ exports.ion_alert = Alert;
2202
+ exports.ion_popover = Popover;
2203
+ exports.ion_select_popover = SelectPopover;