@sparkle-learning/core 0.0.57 → 0.0.58

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 (1100) hide show
  1. package/dist/cjs/PrivateRoute-f97245ce.js +217 -0
  2. package/dist/cjs/active-router-f9e18bd8.js +75 -0
  3. package/dist/cjs/animation-ee586546.js +986 -0
  4. package/dist/cjs/app-globals-33c9f31b.js +9 -0
  5. package/dist/cjs/appdata.service-c8d71e05.js +73 -0
  6. package/dist/cjs/assets.service-bfa75092.js +50 -0
  7. package/dist/cjs/assignment.service-690fb59c.js +19 -0
  8. package/dist/cjs/auth.store-1e630a7d.js +3392 -0
  9. package/dist/cjs/compass-svg.cjs.entry.js +132 -0
  10. package/dist/cjs/context-consumer.cjs.entry.js +29 -0
  11. package/dist/cjs/course-select.cjs.entry.js +30 -0
  12. package/dist/cjs/cubic-bezier-53d26d05.js +93 -0
  13. package/dist/cjs/dir-5af5259a.js +20 -0
  14. package/dist/cjs/environment-config.service-c8ff1f3d.js +28 -0
  15. package/dist/cjs/facilitator.service-ff0e1659.js +95 -0
  16. package/dist/cjs/feed.service-8eca4de6.js +57 -0
  17. package/dist/cjs/focus-visible-b0b07ba6.js +76 -0
  18. package/dist/cjs/framework-delegate-59a98abd.js +111 -0
  19. package/dist/cjs/gesture-controller-0eb5579e.js +196 -0
  20. package/dist/cjs/haptic-780f33c4.js +116 -0
  21. package/dist/cjs/hardware-back-button-92d97ff8.js +76 -0
  22. package/dist/cjs/header-mobile-collapse_61.cjs.entry.js +15124 -0
  23. package/dist/cjs/helpers-c2496722.js +425 -0
  24. package/dist/cjs/httpService-d2e7bf8f.js +687 -0
  25. package/dist/cjs/icons-fda820af.js +26 -0
  26. package/dist/cjs/index-12082cba.js +465 -0
  27. package/dist/cjs/index-15ea05f5.js +314 -0
  28. package/dist/cjs/index-51e8292e.js +1928 -0
  29. package/dist/cjs/index-787d4498.js +232 -0
  30. package/dist/cjs/index-8b5629a6.js +186 -0
  31. package/dist/cjs/index-975586fd.js +48 -0
  32. package/dist/cjs/index-9c7b27e4.js +140 -0
  33. package/dist/cjs/index-af080b50.js +139 -0
  34. package/dist/cjs/index-e56e09b8.js +38 -0
  35. package/dist/cjs/index.cjs.js +26 -0
  36. package/dist/cjs/index.es-38cbcdbe.js +10666 -0
  37. package/dist/cjs/input-shims-eff63b88.js +418 -0
  38. package/dist/cjs/ion-accordion-group.cjs.entry.js +205 -0
  39. package/dist/cjs/ion-accordion.cjs.entry.js +336 -0
  40. package/dist/cjs/ion-action-sheet_7.cjs.entry.js +2935 -0
  41. package/dist/cjs/ion-app.cjs.entry.js +79 -0
  42. package/dist/cjs/ion-back-button.cjs.entry.js +94 -0
  43. package/dist/cjs/ion-backdrop.cjs.entry.js +67 -0
  44. package/dist/cjs/ion-badge.cjs.entry.js +29 -0
  45. package/dist/cjs/ion-breadcrumb.cjs.entry.js +95 -0
  46. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +133 -0
  47. package/dist/cjs/ion-buttons_3.cjs.entry.js +153 -0
  48. package/dist/cjs/ion-card-header.cjs.entry.js +37 -0
  49. package/dist/cjs/ion-card-subtitle.cjs.entry.js +30 -0
  50. package/dist/cjs/ion-card-title.cjs.entry.js +30 -0
  51. package/dist/cjs/ion-chip.cjs.entry.js +40 -0
  52. package/dist/cjs/ion-content_2.cjs.entry.js +659 -0
  53. package/dist/cjs/ion-datetime-button.cjs.entry.js +312 -0
  54. package/dist/cjs/ion-datetime.cjs.entry.js +1623 -0
  55. package/dist/cjs/ion-fab-button.cjs.entry.js +108 -0
  56. package/dist/cjs/ion-fab-list.cjs.entry.js +45 -0
  57. package/dist/cjs/ion-fab.cjs.entry.js +76 -0
  58. package/dist/cjs/ion-footer.cjs.entry.js +120 -0
  59. package/dist/cjs/ion-img.cjs.entry.js +101 -0
  60. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +37 -0
  61. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +206 -0
  62. package/dist/cjs/ion-item-divider.cjs.entry.js +40 -0
  63. package/dist/cjs/ion-item-group.cjs.entry.js +31 -0
  64. package/dist/cjs/ion-item-option.cjs.entry.js +60 -0
  65. package/dist/cjs/ion-item-options.cjs.entry.js +47 -0
  66. package/dist/cjs/ion-item-sliding.cjs.entry.js +398 -0
  67. package/dist/cjs/ion-loading.cjs.entry.js +215 -0
  68. package/dist/cjs/ion-menu-button.cjs.entry.js +76 -0
  69. package/dist/cjs/ion-menu-toggle.cjs.entry.js +47 -0
  70. package/dist/cjs/ion-menu.cjs.entry.js +575 -0
  71. package/dist/cjs/ion-modal.cjs.entry.js +1711 -0
  72. package/dist/cjs/ion-nav-link.cjs.entry.js +47 -0
  73. package/dist/cjs/ion-nav.cjs.entry.js +872 -0
  74. package/dist/cjs/ion-picker-column-internal_2.cjs.entry.js +808 -0
  75. package/dist/cjs/ion-picker-column.cjs.entry.js +331 -0
  76. package/dist/cjs/ion-picker.cjs.entry.js +221 -0
  77. package/dist/cjs/ion-progress-bar.cjs.entry.js +74 -0
  78. package/dist/cjs/ion-refresher-content.cjs.entry.js +35 -0
  79. package/dist/cjs/ion-refresher.cjs.entry.js +802 -0
  80. package/dist/cjs/ion-reorder-group.cjs.entry.js +281 -0
  81. package/dist/cjs/ion-reorder.cjs.entry.js +38 -0
  82. package/dist/cjs/ion-route-redirect.cjs.entry.js +24 -0
  83. package/dist/cjs/ion-route.cjs.entry.js +49 -0
  84. package/dist/cjs/ion-router-link.cjs.entry.js +38 -0
  85. package/dist/cjs/ion-router-outlet.cjs.entry.js +200 -0
  86. package/dist/cjs/ion-router.cjs.entry.js +831 -0
  87. package/dist/cjs/ion-searchbar.cjs.entry.js +370 -0
  88. package/dist/cjs/ion-segment-button.cjs.entry.js +102 -0
  89. package/dist/cjs/ion-segment.cjs.entry.js +417 -0
  90. package/dist/cjs/ion-skeleton-text.cjs.entry.js +33 -0
  91. package/dist/cjs/ion-slide.cjs.entry.js +25 -0
  92. package/dist/cjs/ion-slides.cjs.entry.js +391 -0
  93. package/dist/cjs/ion-split-pane.cjs.entry.js +154 -0
  94. package/dist/cjs/ion-tab-bar.cjs.entry.js +75 -0
  95. package/dist/cjs/ion-tab-button.cjs.entry.js +103 -0
  96. package/dist/cjs/ion-tab.cjs.entry.js +59 -0
  97. package/dist/cjs/ion-tabs.cjs.entry.js +154 -0
  98. package/dist/cjs/ion-thumbnail.cjs.entry.js +20 -0
  99. package/dist/cjs/ion-toast.cjs.entry.js +272 -0
  100. package/dist/cjs/ion-toggle.cjs.entry.js +177 -0
  101. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +555 -0
  102. package/dist/cjs/ionic-global-2cde9d3a.js +231 -0
  103. package/dist/cjs/ios.transition-da235483.js +482 -0
  104. package/dist/cjs/keyboard-91096619.js +140 -0
  105. package/dist/cjs/loader.cjs.js +24 -0
  106. package/dist/cjs/localstorage.service-6346a41d.js +40 -0
  107. package/dist/cjs/md.transition-be429e07.js +57 -0
  108. package/dist/cjs/media.service-8a1b9bc5.js +40 -0
  109. package/dist/cjs/menu-toggle-util-7a01448c.js +14 -0
  110. package/dist/cjs/overlays-32df265a.js +507 -0
  111. package/dist/cjs/parse-d0071120.js +1237 -0
  112. package/dist/cjs/purify-fb9c107e.js +1468 -0
  113. package/dist/cjs/signalR.service-bd6b42f9.js +2985 -0
  114. package/dist/cjs/sparkle-animation-player.cjs.entry.js +515 -0
  115. package/dist/cjs/sparkle-assignment.cjs.entry.js +110 -0
  116. package/dist/cjs/sparkle-character-intro.cjs.entry.js +26 -0
  117. package/dist/cjs/sparkle-code.cjs.entry.js +43 -0
  118. package/dist/cjs/sparkle-compass-post.cjs.entry.js +133 -0
  119. package/dist/cjs/sparkle-compass.cjs.entry.js +126 -0
  120. package/dist/cjs/sparkle-core.cjs.js +22 -0
  121. package/dist/cjs/sparkle-discussion-questions_2.cjs.entry.js +281 -0
  122. package/dist/cjs/sparkle-discussion.cjs.entry.js +42 -0
  123. package/dist/cjs/sparkle-emoji.cjs.entry.js +80 -0
  124. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +121 -0
  125. package/dist/cjs/sparkle-feed-post.cjs.entry.js +122 -0
  126. package/dist/cjs/sparkle-feedback.cjs.entry.js +101 -0
  127. package/dist/cjs/sparkle-file-upload.cjs.entry.js +53 -0
  128. package/dist/cjs/sparkle-goal-form.cjs.entry.js +179 -0
  129. package/dist/cjs/sparkle-gww-comment-list.cjs.entry.js +26 -0
  130. package/dist/cjs/sparkle-gww-graph.cjs.entry.js +19 -0
  131. package/dist/cjs/sparkle-input.cjs.entry.js +56 -0
  132. package/dist/cjs/sparkle-intro.cjs.entry.js +26 -0
  133. package/dist/cjs/sparkle-lower-content-nav.cjs.entry.js +22 -0
  134. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +46 -0
  135. package/dist/cjs/sparkle-modal-image.cjs.entry.js +34 -0
  136. package/dist/cjs/sparkle-notfound-page.cjs.entry.js +25 -0
  137. package/dist/cjs/sparkle-overlay.cjs.entry.js +92 -0
  138. package/dist/cjs/sparkle-poll.cjs.entry.js +19 -0
  139. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +47 -0
  140. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +117 -0
  141. package/dist/cjs/sparkle-quiz-old.cjs.entry.js +120 -0
  142. package/dist/cjs/sparkle-quiz.cjs.entry.js +103 -0
  143. package/dist/cjs/sparkle-select.cjs.entry.js +61 -0
  144. package/dist/cjs/sparkle-sidebar.cjs.entry.js +43 -0
  145. package/dist/cjs/sparkle-tab.cjs.entry.js +26 -0
  146. package/dist/cjs/sparkle-table-of-contents.cjs.entry.js +71 -0
  147. package/dist/cjs/sparkle-tabs.cjs.entry.js +66 -0
  148. package/dist/cjs/sparkle-video-player.cjs.entry.js +22 -0
  149. package/dist/cjs/sparkle-youtube.cjs.entry.js +39 -0
  150. package/dist/cjs/spinner-configs-0ac05f2d.js +147 -0
  151. package/dist/cjs/status-tap-033befa2.js +42 -0
  152. package/dist/cjs/stencil-async-content.cjs.entry.js +32 -0
  153. package/dist/cjs/stencil-route-title.cjs.entry.js +32 -0
  154. package/dist/cjs/stencil-router-prompt.cjs.entry.js +59 -0
  155. package/dist/cjs/student.service-7e5385be.js +78 -0
  156. package/dist/cjs/swipe-back-4a826f9b.js +76 -0
  157. package/dist/cjs/swiper.bundle-8c897c07.js +6420 -0
  158. package/dist/cjs/theme-b0b295c1.js +48 -0
  159. package/dist/cjs/token.service-7a41953d.js +97 -0
  160. package/dist/cjs/util-47e320b2.js +2462 -0
  161. package/dist/collection/PrivateRoute.js +27 -0
  162. package/dist/collection/appconst.js +13 -0
  163. package/dist/collection/assets/img/forward.svg +5 -0
  164. package/dist/collection/assets/img/help/fitt-logo.svg +1 -0
  165. package/dist/collection/assets/img/home/big-white-wall.svg +15 -0
  166. package/dist/collection/assets/img/home/find-help.svg +23 -0
  167. package/dist/collection/assets/img/home/lessons.svg +26 -0
  168. package/dist/collection/assets/img/home/my-goals.svg +19 -0
  169. package/dist/collection/assets/img/home/my-health.svg +17 -0
  170. package/dist/collection/assets/img/home/my-mood.svg +26 -0
  171. package/dist/collection/assets/img/pause.svg +5 -0
  172. package/dist/collection/assets/img/play-symbol.svg +8 -0
  173. package/dist/collection/assets/img/play.svg +4 -0
  174. package/dist/collection/assets/img/rewind.svg +5 -0
  175. package/dist/collection/assets/lib/SignalRAspNetCoreHelper.js +17 -0
  176. package/dist/collection/assets/lib/sparkleUtility.js +8 -0
  177. package/dist/collection/assets/svg/profile.svg +2 -0
  178. package/dist/collection/collection-manifest.json +219 -0
  179. package/dist/collection/components/compass-svg/compass-svg.css +15 -0
  180. package/dist/collection/components/compass-svg/compass-svg.js +156 -0
  181. package/dist/collection/components/layout/facilitator/export-lessons/export-lessons.css +7 -0
  182. package/dist/collection/components/layout/facilitator/export-lessons/export-lessons.js +110 -0
  183. package/dist/collection/components/layout/facilitator/facilitator-dashboard/facilitator-dashboard.css +3 -0
  184. package/dist/collection/components/layout/facilitator/facilitator-dashboard/facilitator-dashboard.js +214 -0
  185. package/dist/collection/components/layout/facilitator/facilitator-header/facilitator-header-mobile-collapse/facilitator-header-mobile-collapse.js +0 -0
  186. package/dist/collection/components/layout/facilitator/facilitator-header/facilitator-header.css +172 -0
  187. package/dist/collection/components/layout/facilitator/facilitator-header/facilitator-header.js +104 -0
  188. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes-form/facilitator-notes-form.css +3 -0
  189. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes-form/facilitator-notes-form.js +144 -0
  190. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes.css +14 -0
  191. package/dist/collection/components/layout/facilitator/facilitator-notes/facilitator-notes.js +64 -0
  192. package/dist/collection/components/layout/facilitator/facilitator-page.css +196 -0
  193. package/dist/collection/components/layout/facilitator/facilitator-page.js +281 -0
  194. package/dist/collection/components/layout/facilitator/online-students/online-students.css +0 -0
  195. package/dist/collection/components/layout/facilitator/online-students/online-students.js +70 -0
  196. package/dist/collection/components/layout/page/page.css +183 -0
  197. package/dist/collection/components/layout/page/page.js +321 -0
  198. package/dist/collection/components/layout/page/templates/default.js +9 -0
  199. package/dist/collection/components/layout/page/templates/error.js +33 -0
  200. package/dist/collection/components/layout/page/templates/index.js +8 -0
  201. package/dist/collection/components/layout/page/templates/pdf.js +8 -0
  202. package/dist/collection/components/layout/page/to-hypertext.js +27 -0
  203. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-form/sparkle-goal-form.css +3 -0
  204. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-form/sparkle-goal-form.js +252 -0
  205. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-item/sparkle-goal-item.css +12 -0
  206. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-item/sparkle-goal-item.js +59 -0
  207. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-progress/sparkle-goal-progress.css +33 -0
  208. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goal-progress/sparkle-goal-progress.js +37 -0
  209. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goals.css +8 -0
  210. package/dist/collection/components/mini-apps/sparkle-goals/sparkle-goals.js +40 -0
  211. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-comment-list/sparkle-gww-comment-list.css +7 -0
  212. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-comment-list/sparkle-gww-comment-list.js +52 -0
  213. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-graph/sparkle-gww-graph.css +3 -0
  214. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-graph/sparkle-gww-graph.js +14 -0
  215. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-item/sparkle-gww-item.css +30 -0
  216. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww-item/sparkle-gww-item.js +187 -0
  217. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww.css +3 -0
  218. package/dist/collection/components/mini-apps/sparkle-gww/sparkle-gww.js +43 -0
  219. package/dist/collection/components/mini-apps/sparkle-health/sparkle-health.css +10 -0
  220. package/dist/collection/components/mini-apps/sparkle-health/sparkle-health.js +111 -0
  221. package/dist/collection/components/mini-apps/sparkle-mood/sparkle-mood.css +11 -0
  222. package/dist/collection/components/mini-apps/sparkle-mood/sparkle-mood.js +127 -0
  223. package/dist/collection/components/modal-image/modal-image.css +61 -0
  224. package/dist/collection/components/modal-image/modal-image.js +159 -0
  225. package/dist/collection/components/sparkle-animation-player/assets/play-button-disabled-overlay.png +0 -0
  226. package/dist/collection/components/sparkle-animation-player/assets/play-button-overlay.png +0 -0
  227. package/dist/collection/components/sparkle-animation-player/caption-parser.js +94 -0
  228. package/dist/collection/components/sparkle-animation-player/sparkle-animation-player.css +157 -0
  229. package/dist/collection/components/sparkle-animation-player/sparkle-animation-player.js +598 -0
  230. package/dist/collection/components/sparkle-assignment/sparkle-assignment.css +30 -0
  231. package/dist/collection/components/sparkle-assignment/sparkle-assignment.js +159 -0
  232. package/dist/collection/components/sparkle-character-intro/assets/characters/character-img.jpg +0 -0
  233. package/dist/collection/components/sparkle-character-intro/assets/characters/jen.png +0 -0
  234. package/dist/collection/components/sparkle-character-intro/assets/characters/kimberly.png +0 -0
  235. package/dist/collection/components/sparkle-character-intro/assets/characters/valeria.png +0 -0
  236. package/dist/collection/components/sparkle-character-intro/assets/characters/yuna.png +0 -0
  237. package/dist/collection/components/sparkle-character-intro/assets/characters/zynab.png +0 -0
  238. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.css +74 -0
  239. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.js +68 -0
  240. package/dist/collection/components/sparkle-compass/sparkle-compass-post/sparkle-compass-post.css +35 -0
  241. package/dist/collection/components/sparkle-compass/sparkle-compass-post/sparkle-compass-post.js +171 -0
  242. package/dist/collection/components/sparkle-compass/sparkle-compass.css +25 -0
  243. package/dist/collection/components/sparkle-compass/sparkle-compass.js +283 -0
  244. package/dist/collection/components/sparkle-course-root/sparkle-course-root.css +3 -0
  245. package/dist/collection/components/sparkle-course-root/sparkle-course-root.js +196 -0
  246. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.css +157 -0
  247. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.js +232 -0
  248. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.css +158 -0
  249. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.js +274 -0
  250. package/dist/collection/components/sparkle-discussion/sparkle-discussion.css +5 -0
  251. package/dist/collection/components/sparkle-discussion/sparkle-discussion.js +112 -0
  252. package/dist/collection/components/sparkle-emoji/sparkle-emoji.css +16 -0
  253. package/dist/collection/components/sparkle-emoji/sparkle-emoji.js +116 -0
  254. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.css +35 -0
  255. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +199 -0
  256. package/dist/collection/components/sparkle-feedback/sparkle-feedback.css +3 -0
  257. package/dist/collection/components/sparkle-feedback/sparkle-feedback.js +118 -0
  258. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.css +0 -0
  259. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.js +105 -0
  260. package/dist/collection/components/sparkle-forgot-password/sparkle-forgot-password.css +4 -0
  261. package/dist/collection/components/sparkle-forgot-password/sparkle-forgot-password.js +107 -0
  262. package/dist/collection/components/sparkle-input/sparkle-input.css +0 -0
  263. package/dist/collection/components/sparkle-input/sparkle-input.js +212 -0
  264. package/dist/collection/components/sparkle-intro/sparkle-intro.css +15 -0
  265. package/dist/collection/components/sparkle-intro/sparkle-intro.js +35 -0
  266. package/dist/collection/components/sparkle-login/sparkle-login.css +4 -0
  267. package/dist/collection/components/sparkle-login/sparkle-login.js +173 -0
  268. package/dist/collection/components/sparkle-poll/sparkle-poll.css +3 -0
  269. package/dist/collection/components/sparkle-poll/sparkle-poll.js +15 -0
  270. package/dist/collection/components/sparkle-quiz/sparkle-quiz-feedback/sparkle-quiz-feedback.css +3 -0
  271. package/dist/collection/components/sparkle-quiz/sparkle-quiz-feedback/sparkle-quiz-feedback.js +69 -0
  272. package/dist/collection/components/sparkle-quiz/sparkle-quiz-input/sparkle-quiz-input.css +3 -0
  273. package/dist/collection/components/sparkle-quiz/sparkle-quiz-input/sparkle-quiz-input.js +59 -0
  274. package/dist/collection/components/sparkle-quiz/sparkle-quiz-old/sparkle-quiz-old.css +48 -0
  275. package/dist/collection/components/sparkle-quiz/sparkle-quiz-old/sparkle-quiz-old.js +327 -0
  276. package/dist/collection/components/sparkle-quiz/sparkle-quiz-opinion/sparkle-quiz-opinion.css +18 -0
  277. package/dist/collection/components/sparkle-quiz/sparkle-quiz-opinion/sparkle-quiz-opinion.js +106 -0
  278. package/dist/collection/components/sparkle-quiz/sparkle-quiz-poll/sparkle-quiz-poll.css +3 -0
  279. package/dist/collection/components/sparkle-quiz/sparkle-quiz-poll/sparkle-quiz-poll.js +59 -0
  280. package/dist/collection/components/sparkle-quiz/sparkle-quiz-select/sparkle-quiz-select.css +3 -0
  281. package/dist/collection/components/sparkle-quiz/sparkle-quiz-select/sparkle-quiz-select.js +100 -0
  282. package/dist/collection/components/sparkle-quiz/sparkle-quiz.css +48 -0
  283. package/dist/collection/components/sparkle-quiz/sparkle-quiz.js +221 -0
  284. package/dist/collection/components/sparkle-quiz-container/sparkle-quiz-container.css +3 -0
  285. package/dist/collection/components/sparkle-quiz-container/sparkle-quiz-container.js +98 -0
  286. package/dist/collection/components/sparkle-reset-password/sparkle-reset-password.css +3 -0
  287. package/dist/collection/components/sparkle-reset-password/sparkle-reset-password.js +126 -0
  288. package/dist/collection/components/sparkle-root/sparkle-root.css +61 -0
  289. package/dist/collection/components/sparkle-root/sparkle-root.js +86 -0
  290. package/dist/collection/components/sparkle-signup/sparkle-signup.css +6 -0
  291. package/dist/collection/components/sparkle-signup/sparkle-signup.js +197 -0
  292. package/dist/collection/components/sparkle-unauthorized/sparkle-unauthorized.css +13 -0
  293. package/dist/collection/components/sparkle-unauthorized/sparkle-unauthorized.js +18 -0
  294. package/dist/collection/components/sparkle-user-enrollment/sparkle-user-enrollment.css +3 -0
  295. package/dist/collection/components/sparkle-user-enrollment/sparkle-user-enrollment.js +93 -0
  296. package/dist/collection/components/sparkle-user-profile/sparkle-user-profile.css +54 -0
  297. package/dist/collection/components/sparkle-user-profile/sparkle-user-profile.js +151 -0
  298. package/dist/collection/components/sparkle-validation-error/sparkle-validation-error.css +11 -0
  299. package/dist/collection/components/sparkle-validation-error/sparkle-validation-error.js +44 -0
  300. package/dist/collection/components/sparkle-video-player/sparkle-video-player.css +0 -0
  301. package/dist/collection/components/sparkle-video-player/sparkle-video-player.js +92 -0
  302. package/dist/collection/components/sparkle-youtube/sparkle-youtube.css +24 -0
  303. package/dist/collection/components/sparkle-youtube/sparkle-youtube.js +99 -0
  304. package/dist/collection/global/app.js +4 -0
  305. package/dist/collection/helpers/utils.js +3 -0
  306. package/dist/collection/icons.js +36 -0
  307. package/dist/collection/index.js +3 -0
  308. package/dist/collection/l10n.js +18 -0
  309. package/dist/collection/models/api.model.js +7 -0
  310. package/dist/collection/models/assets.model.js +1 -0
  311. package/dist/collection/models/auth/auth.user.js +1 -0
  312. package/dist/collection/models/class.model.js +5 -0
  313. package/dist/collection/models/course.model.js +10 -0
  314. package/dist/collection/models/definitions.js +1 -0
  315. package/dist/collection/models/facilitator-dashboard.model.js +5 -0
  316. package/dist/collection/models/goal.model.js +1 -0
  317. package/dist/collection/models/index.js +1 -0
  318. package/dist/collection/models/markdown.model.js +1 -0
  319. package/dist/collection/models/page.model.js +1 -0
  320. package/dist/collection/models/quiz.model.js +3 -0
  321. package/dist/collection/models/user.model.js +1 -0
  322. package/dist/collection/pages/course/welcome-to-mind-body/introduction/animation/m4l1p1_part1.js +2727 -0
  323. package/dist/collection/pages/course/welcome-to-mind-body/introduction/animation/m4l1p1_part2.js +2042 -0
  324. package/dist/collection/services/account.service.js +61 -0
  325. package/dist/collection/services/appdata.service.js +60 -0
  326. package/dist/collection/services/assignment.service.js +14 -0
  327. package/dist/collection/services/auth/auth.service.js +64 -0
  328. package/dist/collection/services/core/assets.service.js +45 -0
  329. package/dist/collection/services/core/localstorage.service.js +34 -0
  330. package/dist/collection/services/environment/environment-config.js +24 -0
  331. package/dist/collection/services/environment/environment-config.service.js +24 -0
  332. package/dist/collection/services/facilitator.service.js +76 -0
  333. package/dist/collection/services/feed.service.js +43 -0
  334. package/dist/collection/services/httpService.js +103 -0
  335. package/dist/collection/services/index.js +4 -0
  336. package/dist/collection/services/media.service.js +29 -0
  337. package/dist/collection/services/signalR.service.js +83 -0
  338. package/dist/collection/services/store.service.js +13 -0
  339. package/dist/collection/services/student.service.js +56 -0
  340. package/dist/collection/services/token.service.js +79 -0
  341. package/dist/collection/stores/auth.store.js +12 -0
  342. package/dist/collection/stores/class.store.js +5 -0
  343. package/dist/collection/stores/error.store.js +5 -0
  344. package/dist/collection/stores/facilitator.store.js +15 -0
  345. package/dist/collection/stores/feed.store.js +8 -0
  346. package/dist/collection/stores/goal.store.js +7 -0
  347. package/dist/collection/stores/index.js +1 -0
  348. package/dist/collection/stores/media.store.js +5 -0
  349. package/dist/collection/stores/mood.store.js +5 -0
  350. package/dist/collection/stores/nav.store.js +11 -0
  351. package/dist/collection/stores/signalR.store.js +6 -0
  352. package/dist/collection/stores/theme.store.js +9 -0
  353. package/dist/collection/stores/toc.store.js +5 -0
  354. package/dist/collection/stores/user.store.js +16 -0
  355. package/dist/collection/util.js +55 -0
  356. package/dist/collection/utils.js +92 -0
  357. package/dist/esm/PrivateRoute-90ac95b8.js +212 -0
  358. package/dist/esm/active-router-fc9e4e06.js +73 -0
  359. package/dist/esm/animation-12377cb3.js +984 -0
  360. package/dist/esm/app-globals-3f0347b0.js +7 -0
  361. package/dist/esm/appdata.service-2e84e167.js +70 -0
  362. package/dist/esm/assets.service-def1d63c.js +48 -0
  363. package/dist/esm/assignment.service-8d31f141.js +17 -0
  364. package/dist/esm/auth.store-dba2c2da.js +3381 -0
  365. package/dist/esm/compass-svg.entry.js +128 -0
  366. package/dist/esm/context-consumer.entry.js +25 -0
  367. package/dist/esm/course-select.entry.js +26 -0
  368. package/dist/esm/dir-03012648.js +18 -0
  369. package/dist/esm/environment-config.service-b191f276.js +26 -0
  370. package/dist/esm/facilitator.service-18c47bdf.js +92 -0
  371. package/dist/esm/feed.service-b4f3cae4.js +54 -0
  372. package/dist/esm/framework-delegate-3e634a5c.js +107 -0
  373. package/dist/esm/gesture-controller-7be18351.js +194 -0
  374. package/dist/esm/haptic-522f76f2.js +110 -0
  375. package/dist/esm/header-mobile-collapse_61.entry.js +15060 -0
  376. package/dist/esm/helpers-bf0e23d6.js +403 -0
  377. package/dist/esm/httpService-7986aeed.js +685 -0
  378. package/dist/esm/icons-1c794c74.js +18 -0
  379. package/dist/esm/index-21661af2.js +463 -0
  380. package/dist/esm/index-2b84cad2.js +223 -0
  381. package/dist/esm/index-4044fde9.js +25 -0
  382. package/dist/esm/index-45fec1e7.js +184 -0
  383. package/dist/esm/index-5e8971ae.js +128 -0
  384. package/dist/esm/index-c04b9ed5.js +1888 -0
  385. package/dist/esm/index-cded2d87.js +312 -0
  386. package/dist/esm/index-dad75b83.js +34 -0
  387. package/dist/esm/index.es-e0c0f891.js +10580 -0
  388. package/dist/esm/index.js +12 -0
  389. package/dist/esm/input-shims-671d8d9f.js +416 -0
  390. package/dist/esm/ion-accordion-group.entry.js +201 -0
  391. package/dist/esm/ion-accordion.entry.js +332 -0
  392. package/dist/esm/ion-action-sheet_7.entry.js +2925 -0
  393. package/dist/esm/ion-app.entry.js +75 -0
  394. package/dist/esm/ion-back-button.entry.js +90 -0
  395. package/dist/esm/ion-backdrop.entry.js +63 -0
  396. package/dist/esm/ion-badge.entry.js +25 -0
  397. package/dist/esm/ion-breadcrumb.entry.js +91 -0
  398. package/dist/esm/ion-breadcrumbs.entry.js +129 -0
  399. package/dist/esm/ion-buttons_3.entry.js +147 -0
  400. package/dist/esm/ion-card-header.entry.js +33 -0
  401. package/dist/esm/ion-card-subtitle.entry.js +26 -0
  402. package/dist/esm/ion-card-title.entry.js +26 -0
  403. package/dist/esm/ion-chip.entry.js +36 -0
  404. package/dist/esm/ion-content_2.entry.js +654 -0
  405. package/dist/esm/ion-datetime-button.entry.js +308 -0
  406. package/dist/esm/ion-datetime.entry.js +1619 -0
  407. package/dist/esm/ion-fab-button.entry.js +104 -0
  408. package/dist/esm/ion-fab-list.entry.js +41 -0
  409. package/dist/esm/ion-fab.entry.js +72 -0
  410. package/dist/esm/ion-footer.entry.js +116 -0
  411. package/dist/esm/ion-img.entry.js +97 -0
  412. package/dist/esm/ion-infinite-scroll-content.entry.js +33 -0
  413. package/dist/esm/ion-infinite-scroll.entry.js +202 -0
  414. package/dist/esm/ion-item-divider.entry.js +36 -0
  415. package/dist/esm/ion-item-group.entry.js +27 -0
  416. package/dist/esm/ion-item-option.entry.js +56 -0
  417. package/dist/esm/ion-item-options.entry.js +43 -0
  418. package/dist/esm/ion-item-sliding.entry.js +394 -0
  419. package/dist/esm/ion-loading.entry.js +211 -0
  420. package/dist/esm/ion-menu-button.entry.js +72 -0
  421. package/dist/esm/ion-menu-toggle.entry.js +43 -0
  422. package/dist/esm/ion-menu.entry.js +571 -0
  423. package/dist/esm/ion-modal.entry.js +1707 -0
  424. package/dist/esm/ion-nav-link.entry.js +43 -0
  425. package/dist/esm/ion-nav.entry.js +868 -0
  426. package/dist/esm/ion-picker-column-internal_2.entry.js +803 -0
  427. package/dist/esm/ion-picker-column.entry.js +327 -0
  428. package/dist/esm/ion-picker.entry.js +217 -0
  429. package/dist/esm/ion-progress-bar.entry.js +70 -0
  430. package/dist/esm/ion-refresher-content.entry.js +31 -0
  431. package/dist/esm/ion-refresher.entry.js +798 -0
  432. package/dist/esm/ion-reorder-group.entry.js +277 -0
  433. package/dist/esm/ion-reorder.entry.js +34 -0
  434. package/dist/esm/ion-route-redirect.entry.js +20 -0
  435. package/dist/esm/ion-route.entry.js +45 -0
  436. package/dist/esm/ion-router-link.entry.js +34 -0
  437. package/dist/esm/ion-router-outlet.entry.js +196 -0
  438. package/dist/esm/ion-router.entry.js +827 -0
  439. package/dist/esm/ion-searchbar.entry.js +366 -0
  440. package/dist/esm/ion-segment-button.entry.js +98 -0
  441. package/dist/esm/ion-segment.entry.js +413 -0
  442. package/dist/esm/ion-skeleton-text.entry.js +29 -0
  443. package/dist/esm/ion-slide.entry.js +21 -0
  444. package/dist/esm/ion-slides.entry.js +387 -0
  445. package/dist/esm/ion-split-pane.entry.js +150 -0
  446. package/dist/esm/ion-tab-bar.entry.js +71 -0
  447. package/dist/esm/ion-tab-button.entry.js +99 -0
  448. package/dist/esm/ion-tab.entry.js +55 -0
  449. package/dist/esm/ion-tabs.entry.js +150 -0
  450. package/dist/esm/ion-thumbnail.entry.js +16 -0
  451. package/dist/esm/ion-toast.entry.js +268 -0
  452. package/dist/esm/ion-toggle.entry.js +173 -0
  453. package/dist/esm/ion-virtual-scroll.entry.js +551 -0
  454. package/dist/esm/ionic-global-4903e23e.js +226 -0
  455. package/dist/esm/ios.transition-131d64fe.js +479 -0
  456. package/dist/esm/loader.js +20 -0
  457. package/dist/esm/md.transition-f6126011.js +55 -0
  458. package/dist/esm/media.service-6e90bc41.js +37 -0
  459. package/dist/esm/menu-toggle-util-bace8ae6.js +12 -0
  460. package/dist/esm/overlays-4233a39d.js +491 -0
  461. package/dist/esm/parse-1ae3a9bb.js +1196 -0
  462. package/dist/esm/polyfills/core-js.js +11 -0
  463. package/dist/esm/polyfills/css-shim.js +1 -0
  464. package/dist/esm/polyfills/dom.js +79 -0
  465. package/dist/esm/polyfills/es5-html-element.js +1 -0
  466. package/dist/esm/polyfills/index.js +34 -0
  467. package/dist/esm/polyfills/system.js +6 -0
  468. package/dist/esm/purify-85bfcc69.js +1466 -0
  469. package/dist/esm/signalR.service-c33fba50.js +2982 -0
  470. package/dist/esm/sparkle-animation-player.entry.js +511 -0
  471. package/dist/esm/sparkle-assignment.entry.js +106 -0
  472. package/dist/esm/sparkle-character-intro.entry.js +22 -0
  473. package/dist/esm/sparkle-code.entry.js +39 -0
  474. package/dist/esm/sparkle-compass-post.entry.js +129 -0
  475. package/dist/esm/sparkle-compass.entry.js +122 -0
  476. package/dist/esm/sparkle-core.js +20 -0
  477. package/dist/esm/sparkle-discussion-questions_2.entry.js +276 -0
  478. package/dist/esm/sparkle-discussion.entry.js +38 -0
  479. package/dist/esm/sparkle-emoji.entry.js +76 -0
  480. package/dist/esm/sparkle-facilitator-notes-form.entry.js +117 -0
  481. package/dist/esm/sparkle-feed-post.entry.js +118 -0
  482. package/dist/esm/sparkle-feedback.entry.js +97 -0
  483. package/dist/esm/sparkle-file-upload.entry.js +49 -0
  484. package/dist/esm/sparkle-goal-form.entry.js +175 -0
  485. package/dist/esm/sparkle-gww-comment-list.entry.js +22 -0
  486. package/dist/esm/sparkle-gww-graph.entry.js +15 -0
  487. package/dist/esm/sparkle-input.entry.js +52 -0
  488. package/dist/esm/sparkle-intro.entry.js +22 -0
  489. package/dist/esm/sparkle-lower-content-nav.entry.js +18 -0
  490. package/dist/esm/sparkle-menu-collapsible.entry.js +42 -0
  491. package/dist/esm/sparkle-modal-image.entry.js +30 -0
  492. package/dist/esm/sparkle-notfound-page.entry.js +21 -0
  493. package/dist/esm/sparkle-overlay.entry.js +88 -0
  494. package/dist/esm/sparkle-poll.entry.js +15 -0
  495. package/dist/esm/sparkle-quiz-container.entry.js +43 -0
  496. package/dist/esm/sparkle-quiz-feedback_5.entry.js +109 -0
  497. package/dist/esm/sparkle-quiz-old.entry.js +116 -0
  498. package/dist/esm/sparkle-quiz.entry.js +99 -0
  499. package/dist/esm/sparkle-select.entry.js +57 -0
  500. package/dist/esm/sparkle-sidebar.entry.js +39 -0
  501. package/dist/esm/sparkle-tab.entry.js +22 -0
  502. package/dist/esm/sparkle-table-of-contents.entry.js +67 -0
  503. package/dist/esm/sparkle-tabs.entry.js +62 -0
  504. package/dist/esm/sparkle-video-player.entry.js +18 -0
  505. package/dist/esm/sparkle-youtube.entry.js +35 -0
  506. package/dist/esm/status-tap-dde52787.js +40 -0
  507. package/dist/esm/stencil-async-content.entry.js +28 -0
  508. package/dist/esm/stencil-route-title.entry.js +28 -0
  509. package/dist/esm/stencil-router-prompt.entry.js +55 -0
  510. package/dist/esm/student.service-08af124f.js +75 -0
  511. package/dist/esm/swipe-back-7847a0c1.js +74 -0
  512. package/dist/esm/swiper.bundle-b6a959de.js +6418 -0
  513. package/dist/esm/token.service-71a5d33f.js +94 -0
  514. package/dist/esm/util-57cc8006.js +2451 -0
  515. package/dist/index.cjs.js +1 -0
  516. package/dist/index.js +1 -0
  517. package/dist/loader/cdn.js +3 -0
  518. package/dist/loader/index.cjs.js +3 -0
  519. package/dist/loader/index.d.ts +12 -0
  520. package/dist/loader/index.es2017.js +3 -0
  521. package/dist/loader/index.js +4 -0
  522. package/dist/loader/package.json +10 -0
  523. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +75 -0
  524. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +72 -0
  525. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +25 -0
  526. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +59 -0
  527. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +357 -0
  528. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +290 -0
  529. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +494 -0
  530. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +502 -0
  531. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
  532. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +22 -0
  533. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +22 -0
  534. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +281 -0
  535. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +309 -0
  536. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +26 -0
  537. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +26 -0
  538. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +58 -0
  539. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +62 -0
  540. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +234 -0
  541. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +237 -0
  542. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +38 -0
  543. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +37 -0
  544. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +439 -0
  545. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +428 -0
  546. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +128 -0
  547. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +151 -0
  548. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +101 -0
  549. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +95 -0
  550. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +61 -0
  551. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +63 -0
  552. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +37 -0
  553. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +35 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +28 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +26 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +27 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +27 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +169 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +172 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +200 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +200 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +108 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +237 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +648 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +637 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +60 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +61 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +338 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +307 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +116 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +37 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +37 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +151 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +108 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +40 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +54 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +54 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +185 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +185 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +669 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +928 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +204 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +297 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +3 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +3 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +186 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +180 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +88 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +85 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +42 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +156 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +250 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +91 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +114 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +118 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +94 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +109 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +100 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +127 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +123 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +175 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +178 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +250 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +177 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +10 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +16 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +17 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +217 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +204 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +122 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +123 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +82 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +85 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +126 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +122 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +201 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +132 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +206 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +206 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +177 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +178 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +275 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +320 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +189 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +210 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +15 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +15 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +33 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +58 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +29 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/route-outlet.css +10 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +4 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +348 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +279 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +65 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +36 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +446 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +424 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +145 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +177 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +14 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +37 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +53 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/slide/slide.css +31 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.ios.css +764 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.md.css +764 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +167 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +108 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +108 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +97 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +82 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +308 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +331 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +19 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +3 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +175 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +179 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +21 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +122 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +55 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +262 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +295 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +286 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +261 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +175 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +168 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/virtual-scroll/virtual-scroll.css +21 -0
  673. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/button/button.css +49 -0
  674. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/card/card.css +208 -0
  675. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/cards.css +31 -0
  676. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/code/code.css +245 -0
  677. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/dropdown/dropdown.css +115 -0
  678. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header-mobile-collapse/header-mobile-collapse.css +255 -0
  679. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header.css +232 -0
  680. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/collapsible/collapsible.css +3 -0
  681. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu-toggle/menu-toggle.css +25 -0
  682. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu.css +71 -0
  683. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/nav/nav.css +194 -0
  684. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/notfound-page/notfound-page.css +4 -0
  685. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/overlay/overlay.css +67 -0
  686. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/page-footer/page-footer.css +25 -0
  687. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/pagination/pagination.css +93 -0
  688. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/select/select.css +52 -0
  689. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sidebar/sidebar.css +98 -0
  690. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sparkle-lower-content-nav/sparkle-lower-content-nav.css +8 -0
  691. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/table-of-contents/table-of-contents.css +37 -0
  692. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/tabs/tabs.css +64 -0
  693. package/dist/node_modules/@stencil/router/dist/collection/components/route/route.css +3 -0
  694. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +101 -0
  695. package/dist/sparkle-core/index.esm.js +1 -19
  696. package/dist/sparkle-core/p-00d10dc9.js +4 -0
  697. package/dist/sparkle-core/p-0147266a.js +1 -0
  698. package/dist/sparkle-core/p-04c7b276.entry.js +1 -0
  699. package/dist/sparkle-core/p-05c032dd.js +4 -0
  700. package/dist/sparkle-core/p-06642405.entry.js +1 -0
  701. package/dist/sparkle-core/p-0664370b.entry.js +1 -0
  702. package/dist/sparkle-core/p-06c7d0f2.entry.js +1 -0
  703. package/dist/sparkle-core/p-076f0239.js +4 -0
  704. package/dist/sparkle-core/p-077c732b.js +4 -0
  705. package/dist/sparkle-core/p-08420531.entry.js +1 -0
  706. package/dist/sparkle-core/p-0ad5c123.entry.js +1 -0
  707. package/dist/sparkle-core/p-0afa3a4d.entry.js +1 -0
  708. package/dist/sparkle-core/p-0c3f3ea6.entry.js +1 -0
  709. package/dist/sparkle-core/p-0e4de1d0.js +4 -0
  710. package/dist/sparkle-core/p-0e8e539f.entry.js +1 -0
  711. package/dist/sparkle-core/p-11356b03.entry.js +1 -0
  712. package/dist/sparkle-core/p-11a6c175.entry.js +1 -0
  713. package/dist/sparkle-core/p-12dd96d7.js +4 -0
  714. package/dist/sparkle-core/p-13ec39db.entry.js +1 -0
  715. package/dist/sparkle-core/p-1adc98f6.js +1 -0
  716. package/dist/sparkle-core/p-1b1ba156.entry.js +1 -0
  717. package/dist/sparkle-core/p-1e125ca5.entry.js +1 -0
  718. package/dist/sparkle-core/p-1e4782af.entry.js +1 -0
  719. package/dist/sparkle-core/p-2033cd86.js +7 -0
  720. package/dist/sparkle-core/p-214d1229.entry.js +1 -0
  721. package/dist/sparkle-core/p-23aca7ca.js +4 -0
  722. package/dist/sparkle-core/p-24cb9a33.entry.js +1 -0
  723. package/dist/sparkle-core/p-27fbabc3.entry.js +1 -0
  724. package/dist/sparkle-core/p-2ba70507.entry.js +1 -0
  725. package/dist/sparkle-core/p-2c1ca854.entry.js +1 -0
  726. package/dist/sparkle-core/p-2caed39f.entry.js +1 -0
  727. package/dist/sparkle-core/p-2d9659e2.entry.js +1 -0
  728. package/dist/sparkle-core/p-2f569553.js +1 -0
  729. package/dist/sparkle-core/p-30b810d1.entry.js +4 -0
  730. package/dist/sparkle-core/p-32f4e565.entry.js +1 -0
  731. package/dist/sparkle-core/p-352677e6.entry.js +1 -0
  732. package/dist/sparkle-core/p-38b7cf68.entry.js +1 -0
  733. package/dist/sparkle-core/p-38c842d5.entry.js +1 -0
  734. package/dist/sparkle-core/p-3963e02b.entry.js +1 -0
  735. package/dist/sparkle-core/p-39712c56.entry.js +4 -0
  736. package/dist/sparkle-core/p-39a31e43.js +1 -0
  737. package/dist/sparkle-core/p-3daf2915.entry.js +352 -0
  738. package/dist/sparkle-core/p-3de0e00c.js +4 -0
  739. package/dist/sparkle-core/p-4053ecdb.entry.js +1 -0
  740. package/dist/sparkle-core/p-408176ba.js +1 -0
  741. package/dist/sparkle-core/p-42ed7d5f.entry.js +1 -0
  742. package/dist/sparkle-core/p-48f72e63.js +4 -0
  743. package/dist/sparkle-core/p-4b4a8703.js +1 -0
  744. package/dist/sparkle-core/p-4c6a7e52.js +1 -0
  745. package/dist/sparkle-core/p-4d1cfcbe.entry.js +1 -0
  746. package/dist/sparkle-core/p-4d4077ea.js +4 -0
  747. package/dist/sparkle-core/p-4fba3e4c.js +1 -0
  748. package/dist/sparkle-core/p-506221fe.js +4 -0
  749. package/dist/sparkle-core/p-5096739e.entry.js +1 -0
  750. package/dist/sparkle-core/p-5322c920.entry.js +1 -0
  751. package/dist/sparkle-core/p-5893bbe5.entry.js +1 -0
  752. package/dist/sparkle-core/p-594a6982.entry.js +1 -0
  753. package/dist/sparkle-core/p-5c435d5a.entry.js +1 -0
  754. package/dist/sparkle-core/p-5cad23f1.js +3 -0
  755. package/dist/sparkle-core/p-5d409601.js +1 -0
  756. package/dist/sparkle-core/p-601397df.entry.js +1 -0
  757. package/dist/sparkle-core/p-604a7987.js +4 -0
  758. package/dist/sparkle-core/p-616941c6.entry.js +1 -0
  759. package/dist/sparkle-core/p-6316d124.entry.js +1 -0
  760. package/dist/sparkle-core/p-63f71ada.entry.js +1 -0
  761. package/dist/sparkle-core/p-69487d90.entry.js +1 -0
  762. package/dist/sparkle-core/p-6bde0192.entry.js +7 -0
  763. package/dist/sparkle-core/p-6d2f4093.entry.js +7 -0
  764. package/dist/sparkle-core/p-6ffd2420.entry.js +1 -0
  765. package/dist/sparkle-core/p-72053ae0.entry.js +1 -0
  766. package/dist/sparkle-core/p-73721c84.js +4 -0
  767. package/dist/sparkle-core/p-74864276.entry.js +1 -0
  768. package/dist/sparkle-core/p-7d8427eb.js +4 -0
  769. package/dist/sparkle-core/p-7dae0f0e.js +1 -0
  770. package/dist/sparkle-core/p-7dbfc316.js +1 -0
  771. package/dist/sparkle-core/p-7e7ce516.js +4 -0
  772. package/dist/sparkle-core/p-81714d94.entry.js +1 -0
  773. package/dist/sparkle-core/p-8492a765.entry.js +1 -0
  774. package/dist/sparkle-core/p-859563db.entry.js +1 -0
  775. package/dist/sparkle-core/p-85d4cd5c.entry.js +1 -0
  776. package/dist/sparkle-core/p-865f36a8.entry.js +1 -0
  777. package/dist/sparkle-core/p-86ed13f0.js +5 -0
  778. package/dist/sparkle-core/p-871106e0.js +4 -0
  779. package/dist/sparkle-core/p-894ff7e6.entry.js +1 -0
  780. package/dist/sparkle-core/p-8a41b502.entry.js +1 -0
  781. package/dist/sparkle-core/p-8b56f734.js +1 -0
  782. package/dist/sparkle-core/p-8c74cbb6.entry.js +1 -0
  783. package/dist/sparkle-core/p-924b2917.js +4 -0
  784. package/dist/sparkle-core/p-9289cdbc.entry.js +1 -0
  785. package/dist/sparkle-core/p-957715c5.entry.js +1 -0
  786. package/dist/sparkle-core/p-973fe404.entry.js +22 -0
  787. package/dist/sparkle-core/p-975b99ee.entry.js +1 -0
  788. package/dist/sparkle-core/p-98daeddb.entry.js +1 -0
  789. package/dist/sparkle-core/p-99ee9919.js +1 -0
  790. package/dist/sparkle-core/p-9abbd715.entry.js +1 -0
  791. package/dist/sparkle-core/p-9d894ed4.js +4 -0
  792. package/dist/sparkle-core/p-9e309b3e.entry.js +1 -0
  793. package/dist/sparkle-core/p-9e7fee8f.entry.js +1 -0
  794. package/dist/sparkle-core/p-9ebf0537.entry.js +1 -0
  795. package/dist/sparkle-core/p-a208ab2d.js +4 -0
  796. package/dist/sparkle-core/p-a2638250.entry.js +1 -0
  797. package/dist/sparkle-core/p-a2ebcf0a.entry.js +1 -0
  798. package/dist/sparkle-core/p-a98d7ebe.entry.js +1 -0
  799. package/dist/sparkle-core/p-add30d46.js +4 -0
  800. package/dist/sparkle-core/p-b0603d19.js +16 -0
  801. package/dist/sparkle-core/p-b06e2bef.js +1 -0
  802. package/dist/sparkle-core/p-b3f375fb.entry.js +1 -0
  803. package/dist/sparkle-core/p-b5f3e1bf.entry.js +1 -0
  804. package/dist/sparkle-core/p-b6fec622.entry.js +1 -0
  805. package/dist/sparkle-core/p-b8d71ff4.js +1 -0
  806. package/dist/sparkle-core/p-b96f3c84.entry.js +7 -0
  807. package/dist/sparkle-core/p-bd80ff43.js +4 -0
  808. package/dist/sparkle-core/p-bd90903e.js +1 -0
  809. package/dist/sparkle-core/p-be64105c.entry.js +1 -0
  810. package/dist/sparkle-core/p-c0533c23.entry.js +1 -0
  811. package/dist/sparkle-core/p-c2990b24.entry.js +1 -0
  812. package/dist/sparkle-core/p-c3cadfc6.entry.js +1 -0
  813. package/dist/sparkle-core/p-c60b29bd.entry.js +4 -0
  814. package/dist/sparkle-core/p-c64a34cd.entry.js +1 -0
  815. package/dist/sparkle-core/p-c7e21070.entry.js +1 -0
  816. package/dist/sparkle-core/p-c9f753a4.js +1 -0
  817. package/dist/sparkle-core/p-cabe9139.js +1 -0
  818. package/dist/sparkle-core/p-cabfbf22.entry.js +1 -0
  819. package/dist/sparkle-core/p-cc518c36.entry.js +1 -0
  820. package/dist/sparkle-core/p-cffd4817.entry.js +1 -0
  821. package/dist/sparkle-core/p-d0adf726.entry.js +1 -0
  822. package/dist/sparkle-core/p-d20e4fcf.entry.js +1 -0
  823. package/dist/sparkle-core/p-d24e53ab.entry.js +1 -0
  824. package/dist/sparkle-core/p-d288e6c1.entry.js +1 -0
  825. package/dist/sparkle-core/p-d601810e.entry.js +1 -0
  826. package/dist/sparkle-core/p-d68092b7.js +4 -0
  827. package/dist/sparkle-core/p-da391f3f.js +1 -0
  828. package/dist/sparkle-core/p-de4deb61.entry.js +1 -0
  829. package/dist/sparkle-core/p-e0cad1bb.js +1 -0
  830. package/dist/sparkle-core/p-e249aebf.entry.js +1 -0
  831. package/dist/sparkle-core/p-e3e36ce9.entry.js +1 -0
  832. package/dist/sparkle-core/p-e421d638.entry.js +1 -0
  833. package/dist/sparkle-core/p-e686d8b5.entry.js +4 -0
  834. package/dist/sparkle-core/p-e8988989.entry.js +1 -0
  835. package/dist/sparkle-core/p-e9431eeb.js +7 -0
  836. package/dist/sparkle-core/p-ea962e1b.entry.js +1 -0
  837. package/dist/sparkle-core/p-eaa8bbee.js +4 -0
  838. package/dist/sparkle-core/p-ebd4354b.entry.js +1 -0
  839. package/dist/sparkle-core/p-ee1e0eb4.js +2 -0
  840. package/dist/sparkle-core/p-ef4edc48.entry.js +4 -0
  841. package/dist/sparkle-core/p-f196c124.entry.js +7 -0
  842. package/dist/sparkle-core/p-f3cba72a.js +4 -0
  843. package/dist/sparkle-core/p-f47fe1fe.entry.js +1 -0
  844. package/dist/sparkle-core/p-f714f77a.entry.js +1 -0
  845. package/dist/sparkle-core/p-f891c79a.entry.js +1 -0
  846. package/dist/sparkle-core/p-fb0ca75e.entry.js +5 -0
  847. package/dist/sparkle-core/p-fb757951.entry.js +1 -0
  848. package/dist/sparkle-core/p-fd8d0738.entry.js +4 -0
  849. package/dist/sparkle-core/p-fda95b6e.entry.js +1 -0
  850. package/dist/sparkle-core/p-fe6dc976.entry.js +1 -0
  851. package/dist/sparkle-core/p-ff080f82.entry.js +10 -0
  852. package/dist/sparkle-core/p-ff7a8a71.js +4 -0
  853. package/dist/sparkle-core/sparkle-core.css +1 -2660
  854. package/dist/sparkle-core/sparkle-core.esm.js +1 -130
  855. package/package.json +1 -1
  856. package/dist/sparkle-core/PrivateRoute-a12e7ee5.js +0 -37
  857. package/dist/sparkle-core/account.service-e711795d.js +0 -63
  858. package/dist/sparkle-core/active-router-af86c9b4.js +0 -73
  859. package/dist/sparkle-core/animation-676a644d.js +0 -984
  860. package/dist/sparkle-core/app-globals-9ffa9ec3.js +0 -10
  861. package/dist/sparkle-core/appdata.service-703dff70.js +0 -69
  862. package/dist/sparkle-core/assets/user.png +0 -0
  863. package/dist/sparkle-core/assets.service-6508aae6.js +0 -71
  864. package/dist/sparkle-core/assignment.service-e42e9368.js +0 -17
  865. package/dist/sparkle-core/button-active-d68c5eb7.js +0 -67
  866. package/dist/sparkle-core/compass-svg.entry.js +0 -128
  867. package/dist/sparkle-core/context-consumer.entry.js +0 -25
  868. package/dist/sparkle-core/course-select.entry.js +0 -26
  869. package/dist/sparkle-core/css-shim-04165e59.js +0 -4
  870. package/dist/sparkle-core/dom-26e7cb2c.js +0 -73
  871. package/dist/sparkle-core/dom-utils-8e73e88b.js +0 -55
  872. package/dist/sparkle-core/facilitator.service-00a88935.js +0 -79
  873. package/dist/sparkle-core/facilitator.store-01be0386.js +0 -18
  874. package/dist/sparkle-core/feed.service-d495f3e1.js +0 -53
  875. package/dist/sparkle-core/framework-delegate-d3fa493f.js +0 -107
  876. package/dist/sparkle-core/haptic-a9e94599.js +0 -124
  877. package/dist/sparkle-core/header-mobile-collapse.entry.js +0 -86
  878. package/dist/sparkle-core/helpers-f11f0674.js +0 -406
  879. package/dist/sparkle-core/icons-758d1417.js +0 -41
  880. package/dist/sparkle-core/index-05b398c2.js +0 -34
  881. package/dist/sparkle-core/index-0af0deac.js +0 -312
  882. package/dist/sparkle-core/index-0df264ee.js +0 -4518
  883. package/dist/sparkle-core/index-183cda39.js +0 -223
  884. package/dist/sparkle-core/index-18a69883.js +0 -1336
  885. package/dist/sparkle-core/index-1d7a6fa0.js +0 -269
  886. package/dist/sparkle-core/index-1dec9544.js +0 -3064
  887. package/dist/sparkle-core/index-81dab78f.js +0 -85
  888. package/dist/sparkle-core/index-9b5bcea1.js +0 -22
  889. package/dist/sparkle-core/index-bb469fe3.js +0 -128
  890. package/dist/sparkle-core/index-d2990a48.js +0 -184
  891. package/dist/sparkle-core/index-dd414b33.js +0 -653
  892. package/dist/sparkle-core/index-faeec85a.js +0 -8
  893. package/dist/sparkle-core/index.es-1f6eedc5.js +0 -11066
  894. package/dist/sparkle-core/input-shims-0b2f5522.js +0 -418
  895. package/dist/sparkle-core/ion-accordion-group.entry.js +0 -201
  896. package/dist/sparkle-core/ion-accordion.entry.js +0 -332
  897. package/dist/sparkle-core/ion-action-sheet.entry.js +0 -263
  898. package/dist/sparkle-core/ion-alert.entry.js +0 -448
  899. package/dist/sparkle-core/ion-app.entry.js +0 -75
  900. package/dist/sparkle-core/ion-avatar.entry.js +0 -21
  901. package/dist/sparkle-core/ion-back-button.entry.js +0 -90
  902. package/dist/sparkle-core/ion-backdrop.entry.js +0 -63
  903. package/dist/sparkle-core/ion-badge.entry.js +0 -25
  904. package/dist/sparkle-core/ion-breadcrumb.entry.js +0 -91
  905. package/dist/sparkle-core/ion-breadcrumbs.entry.js +0 -129
  906. package/dist/sparkle-core/ion-button.entry.js +0 -125
  907. package/dist/sparkle-core/ion-buttons.entry.js +0 -38
  908. package/dist/sparkle-core/ion-card-content.entry.js +0 -26
  909. package/dist/sparkle-core/ion-card-header.entry.js +0 -33
  910. package/dist/sparkle-core/ion-card-subtitle.entry.js +0 -26
  911. package/dist/sparkle-core/ion-card-title.entry.js +0 -26
  912. package/dist/sparkle-core/ion-card.entry.js +0 -64
  913. package/dist/sparkle-core/ion-checkbox.entry.js +0 -109
  914. package/dist/sparkle-core/ion-chip.entry.js +0 -36
  915. package/dist/sparkle-core/ion-col.entry.js +0 -121
  916. package/dist/sparkle-core/ion-content.entry.js +0 -319
  917. package/dist/sparkle-core/ion-datetime-button.entry.js +0 -308
  918. package/dist/sparkle-core/ion-datetime.entry.js +0 -1619
  919. package/dist/sparkle-core/ion-fab-button.entry.js +0 -104
  920. package/dist/sparkle-core/ion-fab-list.entry.js +0 -41
  921. package/dist/sparkle-core/ion-fab.entry.js +0 -72
  922. package/dist/sparkle-core/ion-footer.entry.js +0 -116
  923. package/dist/sparkle-core/ion-grid.entry.js +0 -24
  924. package/dist/sparkle-core/ion-header.entry.js +0 -341
  925. package/dist/sparkle-core/ion-icon.entry.js +0 -200
  926. package/dist/sparkle-core/ion-img.entry.js +0 -97
  927. package/dist/sparkle-core/ion-infinite-scroll-content.entry.js +0 -33
  928. package/dist/sparkle-core/ion-infinite-scroll.entry.js +0 -202
  929. package/dist/sparkle-core/ion-input.entry.js +0 -293
  930. package/dist/sparkle-core/ion-item-divider.entry.js +0 -36
  931. package/dist/sparkle-core/ion-item-group.entry.js +0 -27
  932. package/dist/sparkle-core/ion-item-option.entry.js +0 -56
  933. package/dist/sparkle-core/ion-item-options.entry.js +0 -43
  934. package/dist/sparkle-core/ion-item-sliding.entry.js +0 -394
  935. package/dist/sparkle-core/ion-item.entry.js +0 -267
  936. package/dist/sparkle-core/ion-label.entry.js +0 -77
  937. package/dist/sparkle-core/ion-list-header.entry.js +0 -27
  938. package/dist/sparkle-core/ion-list.entry.js +0 -48
  939. package/dist/sparkle-core/ion-loading.entry.js +0 -211
  940. package/dist/sparkle-core/ion-menu-button.entry.js +0 -72
  941. package/dist/sparkle-core/ion-menu-toggle.entry.js +0 -43
  942. package/dist/sparkle-core/ion-menu.entry.js +0 -575
  943. package/dist/sparkle-core/ion-modal.entry.js +0 -1706
  944. package/dist/sparkle-core/ion-nav-link.entry.js +0 -43
  945. package/dist/sparkle-core/ion-nav.entry.js +0 -872
  946. package/dist/sparkle-core/ion-note.entry.js +0 -25
  947. package/dist/sparkle-core/ion-picker-column-internal.entry.js +0 -363
  948. package/dist/sparkle-core/ion-picker-column.entry.js +0 -327
  949. package/dist/sparkle-core/ion-picker-internal.entry.js +0 -454
  950. package/dist/sparkle-core/ion-picker.entry.js +0 -217
  951. package/dist/sparkle-core/ion-popover.entry.js +0 -1362
  952. package/dist/sparkle-core/ion-progress-bar.entry.js +0 -70
  953. package/dist/sparkle-core/ion-radio-group.entry.js +0 -121
  954. package/dist/sparkle-core/ion-radio.entry.js +0 -111
  955. package/dist/sparkle-core/ion-range.entry.js +0 -511
  956. package/dist/sparkle-core/ion-refresher-content.entry.js +0 -31
  957. package/dist/sparkle-core/ion-refresher.entry.js +0 -798
  958. package/dist/sparkle-core/ion-reorder-group.entry.js +0 -277
  959. package/dist/sparkle-core/ion-reorder.entry.js +0 -34
  960. package/dist/sparkle-core/ion-ripple-effect.entry.js +0 -89
  961. package/dist/sparkle-core/ion-route-redirect.entry.js +0 -20
  962. package/dist/sparkle-core/ion-route.entry.js +0 -45
  963. package/dist/sparkle-core/ion-router-link.entry.js +0 -34
  964. package/dist/sparkle-core/ion-router-outlet.entry.js +0 -196
  965. package/dist/sparkle-core/ion-router.entry.js +0 -827
  966. package/dist/sparkle-core/ion-row.entry.js +0 -16
  967. package/dist/sparkle-core/ion-searchbar.entry.js +0 -366
  968. package/dist/sparkle-core/ion-segment-button.entry.js +0 -98
  969. package/dist/sparkle-core/ion-segment.entry.js +0 -415
  970. package/dist/sparkle-core/ion-select-option.entry.js +0 -23
  971. package/dist/sparkle-core/ion-select-popover.entry.js +0 -96
  972. package/dist/sparkle-core/ion-select.entry.js +0 -510
  973. package/dist/sparkle-core/ion-skeleton-text.entry.js +0 -29
  974. package/dist/sparkle-core/ion-slide.entry.js +0 -21
  975. package/dist/sparkle-core/ion-slides.entry.js +0 -387
  976. package/dist/sparkle-core/ion-spinner.entry.js +0 -60
  977. package/dist/sparkle-core/ion-split-pane.entry.js +0 -156
  978. package/dist/sparkle-core/ion-tab-bar.entry.js +0 -71
  979. package/dist/sparkle-core/ion-tab-button.entry.js +0 -99
  980. package/dist/sparkle-core/ion-tab.entry.js +0 -63
  981. package/dist/sparkle-core/ion-tabs.entry.js +0 -150
  982. package/dist/sparkle-core/ion-text.entry.js +0 -20
  983. package/dist/sparkle-core/ion-textarea.entry.js +0 -244
  984. package/dist/sparkle-core/ion-thumbnail.entry.js +0 -16
  985. package/dist/sparkle-core/ion-title.entry.js +0 -48
  986. package/dist/sparkle-core/ion-toast.entry.js +0 -268
  987. package/dist/sparkle-core/ion-toggle.entry.js +0 -173
  988. package/dist/sparkle-core/ion-toolbar.entry.js +0 -70
  989. package/dist/sparkle-core/ion-virtual-scroll.entry.js +0 -551
  990. package/dist/sparkle-core/ionic-global-127576f6.js +0 -226
  991. package/dist/sparkle-core/ios.transition-02531dda.js +0 -479
  992. package/dist/sparkle-core/location-utils-fea12957.js +0 -229
  993. package/dist/sparkle-core/match-path-760e1797.js +0 -343
  994. package/dist/sparkle-core/md.transition-f8765467.js +0 -55
  995. package/dist/sparkle-core/media.service-2609406e.js +0 -36
  996. package/dist/sparkle-core/menu-toggle-util-6cc13cbd.js +0 -12
  997. package/dist/sparkle-core/overlays-fd3cfa13.js +0 -493
  998. package/dist/sparkle-core/parse-60474840.js +0 -1196
  999. package/dist/sparkle-core/purify-d9093094.js +0 -1469
  1000. package/dist/sparkle-core/quiz.model-1cff62e4.js +0 -5
  1001. package/dist/sparkle-core/shadow-css-1257b266.js +0 -387
  1002. package/dist/sparkle-core/signalR.service-2b7645c1.js +0 -2983
  1003. package/dist/sparkle-core/sparkle-animation-player.entry.js +0 -513
  1004. package/dist/sparkle-core/sparkle-assignment.entry.js +0 -114
  1005. package/dist/sparkle-core/sparkle-button.entry.js +0 -24
  1006. package/dist/sparkle-core/sparkle-card.entry.js +0 -61
  1007. package/dist/sparkle-core/sparkle-cards.entry.js +0 -15
  1008. package/dist/sparkle-core/sparkle-character-intro.entry.js +0 -22
  1009. package/dist/sparkle-core/sparkle-code.entry.js +0 -39
  1010. package/dist/sparkle-core/sparkle-compass-post.entry.js +0 -129
  1011. package/dist/sparkle-core/sparkle-compass.entry.js +0 -122
  1012. package/dist/sparkle-core/sparkle-course-root.entry.js +0 -155
  1013. package/dist/sparkle-core/sparkle-discussion-questions.entry.js +0 -122
  1014. package/dist/sparkle-core/sparkle-discussion-results.entry.js +0 -189
  1015. package/dist/sparkle-core/sparkle-discussion.entry.js +0 -52
  1016. package/dist/sparkle-core/sparkle-dropdown.entry.js +0 -57
  1017. package/dist/sparkle-core/sparkle-emoji.entry.js +0 -77
  1018. package/dist/sparkle-core/sparkle-export-lessons.entry.js +0 -10081
  1019. package/dist/sparkle-core/sparkle-facilitator-dashboard.entry.js +0 -93
  1020. package/dist/sparkle-core/sparkle-facilitator-header.entry.js +0 -60
  1021. package/dist/sparkle-core/sparkle-facilitator-notes-form.entry.js +0 -160
  1022. package/dist/sparkle-core/sparkle-facilitator-notes.entry.js +0 -65
  1023. package/dist/sparkle-core/sparkle-facilitator-page.entry.js +0 -198
  1024. package/dist/sparkle-core/sparkle-feed-post.entry.js +0 -131
  1025. package/dist/sparkle-core/sparkle-feedback.entry.js +0 -106
  1026. package/dist/sparkle-core/sparkle-file-upload.entry.js +0 -57
  1027. package/dist/sparkle-core/sparkle-forgot-password.entry.js +0 -80
  1028. package/dist/sparkle-core/sparkle-goal-form.entry.js +0 -182
  1029. package/dist/sparkle-core/sparkle-goal-item.entry.js +0 -15
  1030. package/dist/sparkle-core/sparkle-goal-progress.entry.js +0 -15
  1031. package/dist/sparkle-core/sparkle-goals.entry.js +0 -47
  1032. package/dist/sparkle-core/sparkle-gww-comment-list.entry.js +0 -22
  1033. package/dist/sparkle-core/sparkle-gww-graph.entry.js +0 -15
  1034. package/dist/sparkle-core/sparkle-gww-item.entry.js +0 -80
  1035. package/dist/sparkle-core/sparkle-gww.entry.js +0 -44
  1036. package/dist/sparkle-core/sparkle-header.entry.js +0 -97
  1037. package/dist/sparkle-core/sparkle-health.entry.js +0 -70
  1038. package/dist/sparkle-core/sparkle-input.entry.js +0 -52
  1039. package/dist/sparkle-core/sparkle-intro.entry.js +0 -22
  1040. package/dist/sparkle-core/sparkle-login.entry.js +0 -116
  1041. package/dist/sparkle-core/sparkle-lower-content-nav.entry.js +0 -18
  1042. package/dist/sparkle-core/sparkle-menu-collapsible.entry.js +0 -42
  1043. package/dist/sparkle-core/sparkle-menu-toggle.entry.js +0 -24
  1044. package/dist/sparkle-core/sparkle-menu.entry.js +0 -26
  1045. package/dist/sparkle-core/sparkle-modal-image.entry.js +0 -33
  1046. package/dist/sparkle-core/sparkle-mood.entry.js +0 -76
  1047. package/dist/sparkle-core/sparkle-nav.entry.js +0 -113
  1048. package/dist/sparkle-core/sparkle-notfound-page.entry.js +0 -25
  1049. package/dist/sparkle-core/sparkle-online-students.entry.js +0 -55
  1050. package/dist/sparkle-core/sparkle-overlay.entry.js +0 -90
  1051. package/dist/sparkle-core/sparkle-page-footer.entry.js +0 -24
  1052. package/dist/sparkle-core/sparkle-page.entry.js +0 -245
  1053. package/dist/sparkle-core/sparkle-pagination.entry.js +0 -67
  1054. package/dist/sparkle-core/sparkle-poll.entry.js +0 -15
  1055. package/dist/sparkle-core/sparkle-quiz-container.entry.js +0 -43
  1056. package/dist/sparkle-core/sparkle-quiz-feedback.entry.js +0 -18
  1057. package/dist/sparkle-core/sparkle-quiz-input.entry.js +0 -16
  1058. package/dist/sparkle-core/sparkle-quiz-old.entry.js +0 -116
  1059. package/dist/sparkle-core/sparkle-quiz-opinion.entry.js +0 -41
  1060. package/dist/sparkle-core/sparkle-quiz-poll.entry.js +0 -16
  1061. package/dist/sparkle-core/sparkle-quiz-select.entry.js +0 -29
  1062. package/dist/sparkle-core/sparkle-quiz.entry.js +0 -98
  1063. package/dist/sparkle-core/sparkle-reset-password.entry.js +0 -96
  1064. package/dist/sparkle-core/sparkle-root.entry.js +0 -79
  1065. package/dist/sparkle-core/sparkle-select.entry.js +0 -57
  1066. package/dist/sparkle-core/sparkle-sidebar.entry.js +0 -39
  1067. package/dist/sparkle-core/sparkle-signup.entry.js +0 -144
  1068. package/dist/sparkle-core/sparkle-tab.entry.js +0 -22
  1069. package/dist/sparkle-core/sparkle-table-of-contents.entry.js +0 -67
  1070. package/dist/sparkle-core/sparkle-tabs.entry.js +0 -62
  1071. package/dist/sparkle-core/sparkle-unauthorized.entry.js +0 -17
  1072. package/dist/sparkle-core/sparkle-user-enrollment.entry.js +0 -85
  1073. package/dist/sparkle-core/sparkle-user-profile.entry.js +0 -129
  1074. package/dist/sparkle-core/sparkle-validation-error.entry.js +0 -17
  1075. package/dist/sparkle-core/sparkle-video-player.entry.js +0 -18
  1076. package/dist/sparkle-core/sparkle-youtube.entry.js +0 -35
  1077. package/dist/sparkle-core/status-tap-52feb1b1.js +0 -40
  1078. package/dist/sparkle-core/stencil-async-content.entry.js +0 -28
  1079. package/dist/sparkle-core/stencil-route-link.entry.js +0 -74
  1080. package/dist/sparkle-core/stencil-route-switch.entry.js +0 -100
  1081. package/dist/sparkle-core/stencil-route-title.entry.js +0 -28
  1082. package/dist/sparkle-core/stencil-route.entry.js +0 -93
  1083. package/dist/sparkle-core/stencil-router-prompt.entry.js +0 -55
  1084. package/dist/sparkle-core/stencil-router-redirect.entry.js +0 -28
  1085. package/dist/sparkle-core/stencil-router.entry.js +0 -636
  1086. package/dist/sparkle-core/store.service-0f7d998b.js +0 -16
  1087. package/dist/sparkle-core/student.service-f0375229.js +0 -59
  1088. package/dist/sparkle-core/swipe-back-9a614189.js +0 -73
  1089. package/dist/sparkle-core/swiper.bundle-4274e115.js +0 -6418
  1090. package/dist/sparkle-core/user.store-3d052406.js +0 -19
  1091. package/dist/sparkle-core/util-ba470e54.js +0 -14683
  1092. package/dist/sparkle-core/utils-cae23bce.js +0 -114
  1093. /package/dist/{sparkle-core → esm}/cubic-bezier-4c0db14f.js +0 -0
  1094. /package/dist/{sparkle-core → esm}/focus-visible-4e9a0764.js +0 -0
  1095. /package/dist/{sparkle-core → esm}/hardware-back-button-fa04d6e9.js +0 -0
  1096. /package/dist/{sparkle-core → esm}/index-be6112f8.js +0 -0
  1097. /package/dist/{sparkle-core → esm}/keyboard-7e8329b3.js +0 -0
  1098. /package/dist/{sparkle-core → esm}/localstorage.service-4bf408c8.js +0 -0
  1099. /package/dist/{sparkle-core → esm}/spinner-configs-a37e628a.js +0 -0
  1100. /package/dist/{sparkle-core → esm}/theme-7ef00c83.js +0 -0
@@ -0,0 +1,2935 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index$1 = require('./index-51e8292e.js');
6
+ const ionicGlobal = require('./ionic-global-2cde9d3a.js');
7
+ const haptic = require('./haptic-780f33c4.js');
8
+ const index = require('./index-12082cba.js');
9
+ const overlays = require('./overlays-32df265a.js');
10
+ const theme = require('./theme-b0b295c1.js');
11
+ const animation = require('./animation-ee586546.js');
12
+ const index$2 = require('./index-af080b50.js');
13
+ const frameworkDelegate = require('./framework-delegate-59a98abd.js');
14
+ const helpers = require('./helpers-c2496722.js');
15
+ const index$3 = require('./index-787d4498.js');
16
+ require('./gesture-controller-0eb5579e.js');
17
+ require('./hardware-back-button-92d97ff8.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.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
119
+ wrapperAnimation
120
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
121
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
122
+ return baseAnimation
123
+ .addElement(baseEl)
124
+ .easing('cubic-bezier(.36,.66,.04,1)')
125
+ .duration(450)
126
+ .addAnimation([backdropAnimation, wrapperAnimation]);
127
+ };
128
+
129
+ /*!
130
+ * (C) Ionic http://ionicframework.com - MIT License
131
+ */
132
+ /**
133
+ * MD Action Sheet Enter Animation
134
+ */
135
+ const mdEnterAnimation$2 = (baseEl) => {
136
+ const baseAnimation = animation.createAnimation();
137
+ const backdropAnimation = animation.createAnimation();
138
+ const wrapperAnimation = animation.createAnimation();
139
+ backdropAnimation
140
+ .addElement(baseEl.querySelector('ion-backdrop'))
141
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
142
+ .beforeStyles({
143
+ 'pointer-events': 'none',
144
+ })
145
+ .afterClearStyles(['pointer-events']);
146
+ wrapperAnimation
147
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
148
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
149
+ return baseAnimation
150
+ .addElement(baseEl)
151
+ .easing('cubic-bezier(.36,.66,.04,1)')
152
+ .duration(400)
153
+ .addAnimation([backdropAnimation, wrapperAnimation]);
154
+ };
155
+
156
+ /*!
157
+ * (C) Ionic http://ionicframework.com - MIT License
158
+ */
159
+ /**
160
+ * MD Action Sheet Leave Animation
161
+ */
162
+ const mdLeaveAnimation$2 = (baseEl) => {
163
+ const baseAnimation = animation.createAnimation();
164
+ const backdropAnimation = animation.createAnimation();
165
+ const wrapperAnimation = animation.createAnimation();
166
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
167
+ wrapperAnimation
168
+ .addElement(baseEl.querySelector('.action-sheet-wrapper'))
169
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
170
+ return baseAnimation
171
+ .addElement(baseEl)
172
+ .easing('cubic-bezier(.36,.66,.04,1)')
173
+ .duration(450)
174
+ .addAnimation([backdropAnimation, wrapperAnimation]);
175
+ };
176
+
177
+ 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)}}";
178
+
179
+ 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}";
180
+
181
+ const ActionSheet = class {
182
+ constructor(hostRef) {
183
+ index$1.registerInstance(this, hostRef);
184
+ this.didPresent = index$1.createEvent(this, "ionActionSheetDidPresent", 7);
185
+ this.willPresent = index$1.createEvent(this, "ionActionSheetWillPresent", 7);
186
+ this.willDismiss = index$1.createEvent(this, "ionActionSheetWillDismiss", 7);
187
+ this.didDismiss = index$1.createEvent(this, "ionActionSheetDidDismiss", 7);
188
+ this.presented = false;
189
+ /**
190
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
191
+ */
192
+ this.keyboardClose = true;
193
+ /**
194
+ * An array of buttons for the action sheet.
195
+ */
196
+ this.buttons = [];
197
+ /**
198
+ * If `true`, the action sheet will be dismissed when the backdrop is clicked.
199
+ */
200
+ this.backdropDismiss = true;
201
+ /**
202
+ * If `true`, the action sheet will be translucent.
203
+ * Only applies when the mode is `"ios"` and the device supports
204
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
205
+ */
206
+ this.translucent = false;
207
+ /**
208
+ * If `true`, the action sheet will animate.
209
+ */
210
+ this.animated = true;
211
+ this.onBackdropTap = () => {
212
+ this.dismiss(undefined, overlays.BACKDROP);
213
+ };
214
+ this.dispatchCancelHandler = (ev) => {
215
+ const role = ev.detail.role;
216
+ if (overlays.isCancel(role)) {
217
+ const cancelButton = this.getButtons().find((b) => b.role === 'cancel');
218
+ this.callButtonHandler(cancelButton);
219
+ }
220
+ };
221
+ }
222
+ /**
223
+ * Present the action sheet overlay after it has been created.
224
+ */
225
+ present() {
226
+ return overlays.present(this, 'actionSheetEnter', iosEnterAnimation$2, mdEnterAnimation$2);
227
+ }
228
+ connectedCallback() {
229
+ overlays.prepareOverlay(this.el);
230
+ }
231
+ /**
232
+ * Dismiss the action sheet overlay after it has been presented.
233
+ *
234
+ * @param data Any data to emit in the dismiss events.
235
+ * @param role The role of the element that is dismissing the action sheet.
236
+ * This can be useful in a button handler for determining which button was
237
+ * clicked to dismiss the action sheet.
238
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
239
+ */
240
+ dismiss(data, role) {
241
+ return overlays.dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$2, mdLeaveAnimation$2);
242
+ }
243
+ /**
244
+ * Returns a promise that resolves when the action sheet did dismiss.
245
+ */
246
+ onDidDismiss() {
247
+ return overlays.eventMethod(this.el, 'ionActionSheetDidDismiss');
248
+ }
249
+ /**
250
+ * Returns a promise that resolves when the action sheet will dismiss.
251
+ *
252
+ */
253
+ onWillDismiss() {
254
+ return overlays.eventMethod(this.el, 'ionActionSheetWillDismiss');
255
+ }
256
+ async buttonClick(button) {
257
+ const role = button.role;
258
+ if (overlays.isCancel(role)) {
259
+ return this.dismiss(button.data, role);
260
+ }
261
+ const shouldDismiss = await this.callButtonHandler(button);
262
+ if (shouldDismiss) {
263
+ return this.dismiss(button.data, button.role);
264
+ }
265
+ return Promise.resolve();
266
+ }
267
+ async callButtonHandler(button) {
268
+ if (button) {
269
+ // a handler has been provided, execute it
270
+ // pass the handler the values from the inputs
271
+ const rtn = await overlays.safeCall(button.handler);
272
+ if (rtn === false) {
273
+ // if the return value of the handler is false then do not dismiss
274
+ return false;
275
+ }
276
+ }
277
+ return true;
278
+ }
279
+ getButtons() {
280
+ return this.buttons.map((b) => {
281
+ return typeof b === 'string' ? { text: b } : b;
282
+ });
283
+ }
284
+ disconnectedCallback() {
285
+ if (this.gesture) {
286
+ this.gesture.destroy();
287
+ this.gesture = undefined;
288
+ }
289
+ }
290
+ componentDidLoad() {
291
+ /**
292
+ * Do not create gesture if:
293
+ * 1. A gesture already exists
294
+ * 2. App is running in MD mode
295
+ * 3. A wrapper ref does not exist
296
+ */
297
+ const { groupEl, wrapperEl } = this;
298
+ if (this.gesture || ionicGlobal.getIonMode(this) === 'md' || !wrapperEl || !groupEl) {
299
+ return;
300
+ }
301
+ index$1.readTask(() => {
302
+ const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
303
+ if (!isScrollable) {
304
+ this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
305
+ this.gesture.enable(true);
306
+ }
307
+ });
308
+ }
309
+ render() {
310
+ const { htmlAttributes } = this;
311
+ const mode = ionicGlobal.getIonMode(this);
312
+ const allButtons = this.getButtons();
313
+ const cancelButton = allButtons.find((b) => b.role === 'cancel');
314
+ const buttons = allButtons.filter((b) => b.role !== 'cancel');
315
+ return (index$1.h(index$1.Host, Object.assign({ role: "dialog", "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
316
+ zIndex: `${20000 + this.overlayIndex}`,
317
+ }, 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 && (index$1.h("div", { class: {
318
+ 'action-sheet-title': true,
319
+ 'action-sheet-has-sub-title': this.subHeader !== undefined,
320
+ } }, 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 && (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 && 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" })));
321
+ }
322
+ get el() { return index$1.getElement(this); }
323
+ };
324
+ const buttonClass$1 = (button) => {
325
+ return Object.assign({ 'action-sheet-button': true, 'ion-activatable': true, 'ion-focusable': true, [`action-sheet-${button.role}`]: button.role !== undefined }, theme.getClassMap(button.cssClass));
326
+ };
327
+ ActionSheet.style = {
328
+ ios: actionSheetIosCss,
329
+ md: actionSheetMdCss
330
+ };
331
+
332
+ /*!
333
+ * (C) Ionic http://ionicframework.com - MIT License
334
+ */
335
+ /**
336
+ * iOS Alert Enter Animation
337
+ */
338
+ const iosEnterAnimation$1 = (baseEl) => {
339
+ const baseAnimation = animation.createAnimation();
340
+ const backdropAnimation = animation.createAnimation();
341
+ const wrapperAnimation = animation.createAnimation();
342
+ backdropAnimation
343
+ .addElement(baseEl.querySelector('ion-backdrop'))
344
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
345
+ .beforeStyles({
346
+ 'pointer-events': 'none',
347
+ })
348
+ .afterClearStyles(['pointer-events']);
349
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
350
+ { offset: 0, opacity: '0.01', transform: 'scale(1.1)' },
351
+ { offset: 1, opacity: '1', transform: 'scale(1)' },
352
+ ]);
353
+ return baseAnimation
354
+ .addElement(baseEl)
355
+ .easing('ease-in-out')
356
+ .duration(200)
357
+ .addAnimation([backdropAnimation, wrapperAnimation]);
358
+ };
359
+
360
+ /*!
361
+ * (C) Ionic http://ionicframework.com - MIT License
362
+ */
363
+ /**
364
+ * iOS Alert Leave Animation
365
+ */
366
+ const iosLeaveAnimation$1 = (baseEl) => {
367
+ const baseAnimation = animation.createAnimation();
368
+ const backdropAnimation = animation.createAnimation();
369
+ const wrapperAnimation = animation.createAnimation();
370
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
371
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
372
+ { offset: 0, opacity: 0.99, transform: 'scale(1)' },
373
+ { offset: 1, opacity: 0, transform: 'scale(0.9)' },
374
+ ]);
375
+ return baseAnimation
376
+ .addElement(baseEl)
377
+ .easing('ease-in-out')
378
+ .duration(200)
379
+ .addAnimation([backdropAnimation, wrapperAnimation]);
380
+ };
381
+
382
+ /*!
383
+ * (C) Ionic http://ionicframework.com - MIT License
384
+ */
385
+ /**
386
+ * Md Alert Enter Animation
387
+ */
388
+ const mdEnterAnimation$1 = (baseEl) => {
389
+ const baseAnimation = animation.createAnimation();
390
+ const backdropAnimation = animation.createAnimation();
391
+ const wrapperAnimation = animation.createAnimation();
392
+ backdropAnimation
393
+ .addElement(baseEl.querySelector('ion-backdrop'))
394
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
395
+ .beforeStyles({
396
+ 'pointer-events': 'none',
397
+ })
398
+ .afterClearStyles(['pointer-events']);
399
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
400
+ { offset: 0, opacity: '0.01', transform: 'scale(0.9)' },
401
+ { offset: 1, opacity: '1', transform: 'scale(1)' },
402
+ ]);
403
+ return baseAnimation
404
+ .addElement(baseEl)
405
+ .easing('ease-in-out')
406
+ .duration(150)
407
+ .addAnimation([backdropAnimation, wrapperAnimation]);
408
+ };
409
+
410
+ /*!
411
+ * (C) Ionic http://ionicframework.com - MIT License
412
+ */
413
+ /**
414
+ * Md Alert Leave Animation
415
+ */
416
+ const mdLeaveAnimation$1 = (baseEl) => {
417
+ const baseAnimation = animation.createAnimation();
418
+ const backdropAnimation = animation.createAnimation();
419
+ const wrapperAnimation = animation.createAnimation();
420
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
421
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).fromTo('opacity', 0.99, 0);
422
+ return baseAnimation
423
+ .addElement(baseEl)
424
+ .easing('ease-in-out')
425
+ .duration(150)
426
+ .addAnimation([backdropAnimation, wrapperAnimation]);
427
+ };
428
+
429
+ 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)}";
430
+
431
+ 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}";
432
+
433
+ const Alert = class {
434
+ constructor(hostRef) {
435
+ index$1.registerInstance(this, hostRef);
436
+ this.didPresent = index$1.createEvent(this, "ionAlertDidPresent", 7);
437
+ this.willPresent = index$1.createEvent(this, "ionAlertWillPresent", 7);
438
+ this.willDismiss = index$1.createEvent(this, "ionAlertWillDismiss", 7);
439
+ this.didDismiss = index$1.createEvent(this, "ionAlertDidDismiss", 7);
440
+ this.processedInputs = [];
441
+ this.processedButtons = [];
442
+ this.presented = false;
443
+ /**
444
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
445
+ */
446
+ this.keyboardClose = true;
447
+ /**
448
+ * Array of buttons to be added to the alert.
449
+ */
450
+ this.buttons = [];
451
+ /**
452
+ * Array of input to show in the alert.
453
+ */
454
+ this.inputs = [];
455
+ /**
456
+ * If `true`, the alert will be dismissed when the backdrop is clicked.
457
+ */
458
+ this.backdropDismiss = true;
459
+ /**
460
+ * If `true`, the alert will be translucent.
461
+ * Only applies when the mode is `"ios"` and the device supports
462
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
463
+ */
464
+ this.translucent = false;
465
+ /**
466
+ * If `true`, the alert will animate.
467
+ */
468
+ this.animated = true;
469
+ this.onBackdropTap = () => {
470
+ this.dismiss(undefined, overlays.BACKDROP);
471
+ };
472
+ this.dispatchCancelHandler = (ev) => {
473
+ const role = ev.detail.role;
474
+ if (overlays.isCancel(role)) {
475
+ const cancelButton = this.processedButtons.find((b) => b.role === 'cancel');
476
+ this.callButtonHandler(cancelButton);
477
+ }
478
+ };
479
+ }
480
+ onKeydown(ev) {
481
+ const inputTypes = new Set(this.processedInputs.map((i) => i.type));
482
+ // The only inputs we want to navigate between using arrow keys are the radios
483
+ // ignore the keydown event if it is not on a radio button
484
+ if (!inputTypes.has('radio') ||
485
+ (ev.target && !this.el.contains(ev.target)) ||
486
+ ev.target.classList.contains('alert-button')) {
487
+ return;
488
+ }
489
+ // Get all radios inside of the radio group and then
490
+ // filter out disabled radios since we need to skip those
491
+ const query = this.el.querySelectorAll('.alert-radio');
492
+ const radios = Array.from(query).filter((radio) => !radio.disabled);
493
+ // The focused radio is the one that shares the same id as
494
+ // the event target
495
+ const index = radios.findIndex((radio) => radio.id === ev.target.id);
496
+ // We need to know what the next radio element should
497
+ // be in order to change the focus
498
+ let nextEl;
499
+ // If hitting arrow down or arrow right, move to the next radio
500
+ // If we're on the last radio, move to the first radio
501
+ if (['ArrowDown', 'ArrowRight'].includes(ev.code)) {
502
+ nextEl = index === radios.length - 1 ? radios[0] : radios[index + 1];
503
+ }
504
+ // If hitting arrow up or arrow left, move to the previous radio
505
+ // If we're on the first radio, move to the last radio
506
+ if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) {
507
+ nextEl = index === 0 ? radios[radios.length - 1] : radios[index - 1];
508
+ }
509
+ if (nextEl && radios.includes(nextEl)) {
510
+ const nextProcessed = this.processedInputs.find((input) => input.id === (nextEl === null || nextEl === void 0 ? void 0 : nextEl.id));
511
+ if (nextProcessed) {
512
+ this.rbClick(nextProcessed);
513
+ nextEl.focus();
514
+ }
515
+ }
516
+ }
517
+ buttonsChanged() {
518
+ const buttons = this.buttons;
519
+ this.processedButtons = buttons.map((btn) => {
520
+ return typeof btn === 'string' ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined } : btn;
521
+ });
522
+ }
523
+ inputsChanged() {
524
+ const inputs = this.inputs;
525
+ // Get the first input that is not disabled and the checked one
526
+ // If an enabled checked input exists, set it to be the focusable input
527
+ // otherwise we default to focus the first input
528
+ // This will only be used when the input is type radio
529
+ const first = inputs.find((input) => !input.disabled);
530
+ const checked = inputs.find((input) => input.checked && !input.disabled);
531
+ const focusable = checked || first;
532
+ // An alert can be created with several different inputs. Radios,
533
+ // checkboxes and inputs are all accepted, but they cannot be mixed.
534
+ const inputTypes = new Set(inputs.map((i) => i.type));
535
+ if (inputTypes.has('checkbox') && inputTypes.has('radio')) {
536
+ console.warn(`Alert cannot mix input types: ${Array.from(inputTypes.values()).join('/')}. Please see alert docs for more info.`);
537
+ }
538
+ this.inputType = inputTypes.values().next().value;
539
+ this.processedInputs = inputs.map((i, index) => ({
540
+ type: i.type || 'text',
541
+ name: i.name || `${index}`,
542
+ placeholder: i.placeholder || '',
543
+ value: i.value,
544
+ label: i.label,
545
+ checked: !!i.checked,
546
+ disabled: !!i.disabled,
547
+ id: i.id || `alert-input-${this.overlayIndex}-${index}`,
548
+ handler: i.handler,
549
+ min: i.min,
550
+ max: i.max,
551
+ cssClass: i.cssClass || '',
552
+ attributes: i.attributes || {},
553
+ tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
554
+ }));
555
+ }
556
+ connectedCallback() {
557
+ overlays.prepareOverlay(this.el);
558
+ }
559
+ componentWillLoad() {
560
+ this.inputsChanged();
561
+ this.buttonsChanged();
562
+ }
563
+ disconnectedCallback() {
564
+ if (this.gesture) {
565
+ this.gesture.destroy();
566
+ this.gesture = undefined;
567
+ }
568
+ }
569
+ componentDidLoad() {
570
+ /**
571
+ * Do not create gesture if:
572
+ * 1. A gesture already exists
573
+ * 2. App is running in MD mode
574
+ * 3. A wrapper ref does not exist
575
+ */
576
+ if (this.gesture || ionicGlobal.getIonMode(this) === 'md' || !this.wrapperEl) {
577
+ return;
578
+ }
579
+ this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
580
+ this.gesture.enable(true);
581
+ }
582
+ /**
583
+ * Present the alert overlay after it has been created.
584
+ */
585
+ present() {
586
+ return overlays.present(this, 'alertEnter', iosEnterAnimation$1, mdEnterAnimation$1);
587
+ }
588
+ /**
589
+ * Dismiss the alert overlay after it has been presented.
590
+ *
591
+ * @param data Any data to emit in the dismiss events.
592
+ * @param role The role of the element that is dismissing the alert.
593
+ * This can be useful in a button handler for determining which button was
594
+ * clicked to dismiss the alert.
595
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
596
+ */
597
+ dismiss(data, role) {
598
+ return overlays.dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$1, mdLeaveAnimation$1);
599
+ }
600
+ /**
601
+ * Returns a promise that resolves when the alert did dismiss.
602
+ */
603
+ onDidDismiss() {
604
+ return overlays.eventMethod(this.el, 'ionAlertDidDismiss');
605
+ }
606
+ /**
607
+ * Returns a promise that resolves when the alert will dismiss.
608
+ */
609
+ onWillDismiss() {
610
+ return overlays.eventMethod(this.el, 'ionAlertWillDismiss');
611
+ }
612
+ rbClick(selectedInput) {
613
+ for (const input of this.processedInputs) {
614
+ input.checked = input === selectedInput;
615
+ input.tabindex = input === selectedInput ? 0 : -1;
616
+ }
617
+ this.activeId = selectedInput.id;
618
+ overlays.safeCall(selectedInput.handler, selectedInput);
619
+ index$1.forceUpdate(this);
620
+ }
621
+ cbClick(selectedInput) {
622
+ selectedInput.checked = !selectedInput.checked;
623
+ overlays.safeCall(selectedInput.handler, selectedInput);
624
+ index$1.forceUpdate(this);
625
+ }
626
+ buttonClick(button) {
627
+ const role = button.role;
628
+ const values = this.getValues();
629
+ if (overlays.isCancel(role)) {
630
+ return this.dismiss({ values }, role);
631
+ }
632
+ const returnData = this.callButtonHandler(button, values);
633
+ if (returnData !== false) {
634
+ return this.dismiss(Object.assign({ values }, returnData), button.role);
635
+ }
636
+ return Promise.resolve(false);
637
+ }
638
+ callButtonHandler(button, data) {
639
+ if (button === null || button === void 0 ? void 0 : button.handler) {
640
+ // a handler has been provided, execute it
641
+ // pass the handler the values from the inputs
642
+ const returnData = overlays.safeCall(button.handler, data);
643
+ if (returnData === false) {
644
+ // if the return value of the handler is false then do not dismiss
645
+ return false;
646
+ }
647
+ if (typeof returnData === 'object') {
648
+ return returnData;
649
+ }
650
+ }
651
+ return {};
652
+ }
653
+ getValues() {
654
+ if (this.processedInputs.length === 0) {
655
+ // this is an alert without any options/inputs at all
656
+ return undefined;
657
+ }
658
+ if (this.inputType === 'radio') {
659
+ // this is an alert with radio buttons (single value select)
660
+ // return the one value which is checked, otherwise undefined
661
+ const checkedInput = this.processedInputs.find((i) => !!i.checked);
662
+ return checkedInput ? checkedInput.value : undefined;
663
+ }
664
+ if (this.inputType === 'checkbox') {
665
+ // this is an alert with checkboxes (multiple value select)
666
+ // return an array of all the checked values
667
+ return this.processedInputs.filter((i) => i.checked).map((i) => i.value);
668
+ }
669
+ // this is an alert with text inputs
670
+ // return an object of all the values with the input name as the key
671
+ const values = {};
672
+ this.processedInputs.forEach((i) => {
673
+ values[i.name] = i.value || '';
674
+ });
675
+ return values;
676
+ }
677
+ renderAlertInputs() {
678
+ switch (this.inputType) {
679
+ case 'checkbox':
680
+ return this.renderCheckbox();
681
+ case 'radio':
682
+ return this.renderRadio();
683
+ default:
684
+ return this.renderInput();
685
+ }
686
+ }
687
+ renderCheckbox() {
688
+ const inputs = this.processedInputs;
689
+ const mode = ionicGlobal.getIonMode(this);
690
+ if (inputs.length === 0) {
691
+ return null;
692
+ }
693
+ 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))))));
694
+ }
695
+ renderRadio() {
696
+ const inputs = this.processedInputs;
697
+ if (inputs.length === 0) {
698
+ return null;
699
+ }
700
+ 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)))))));
701
+ }
702
+ renderInput() {
703
+ const inputs = this.processedInputs;
704
+ if (inputs.length === 0) {
705
+ return null;
706
+ }
707
+ return (index$1.h("div", { class: "alert-input-group" }, inputs.map((i) => {
708
+ var _a, _b, _c, _d;
709
+ if (i.type === 'textarea') {
710
+ 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) => {
711
+ var _a;
712
+ i.value = e.target.value;
713
+ if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
714
+ i.attributes.onInput(e);
715
+ }
716
+ } }))));
717
+ }
718
+ else {
719
+ 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) => {
720
+ var _a;
721
+ i.value = e.target.value;
722
+ if ((_a = i.attributes) === null || _a === void 0 ? void 0 : _a.onInput) {
723
+ i.attributes.onInput(e);
724
+ }
725
+ } }))));
726
+ }
727
+ })));
728
+ }
729
+ renderAlertButtons() {
730
+ const buttons = this.processedButtons;
731
+ const mode = ionicGlobal.getIonMode(this);
732
+ const alertButtonGroupClass = {
733
+ 'alert-button-group': true,
734
+ 'alert-button-group-vertical': buttons.length > 2,
735
+ };
736
+ 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))))));
737
+ }
738
+ render() {
739
+ const { overlayIndex, header, subHeader, htmlAttributes } = this;
740
+ const mode = ionicGlobal.getIonMode(this);
741
+ const hdrId = `alert-${overlayIndex}-hdr`;
742
+ const subHdrId = `alert-${overlayIndex}-sub-hdr`;
743
+ const msgId = `alert-${overlayIndex}-msg`;
744
+ const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
745
+ return (index$1.h(index$1.Host, Object.assign({ role: role, "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
746
+ zIndex: `${20000 + overlayIndex}`,
747
+ }, 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" })));
748
+ }
749
+ get el() { return index$1.getElement(this); }
750
+ static get watchers() { return {
751
+ "buttons": ["buttonsChanged"],
752
+ "inputs": ["inputsChanged"]
753
+ }; }
754
+ };
755
+ const inputClass = (input) => {
756
+ var _a, _b, _c;
757
+ 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() : ''));
758
+ };
759
+ const buttonClass = (button) => {
760
+ return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true, [`alert-button-role-${button.role}`]: button.role !== undefined }, theme.getClassMap(button.cssClass));
761
+ };
762
+ Alert.style = {
763
+ ios: alertIosCss,
764
+ md: alertMdCss
765
+ };
766
+
767
+ /*!
768
+ * (C) Ionic http://ionicframework.com - MIT License
769
+ */
770
+ /**
771
+ * Returns the dimensions of the popover
772
+ * arrow on `ios` mode. If arrow is disabled
773
+ * returns (0, 0).
774
+ */
775
+ const getArrowDimensions = (arrowEl) => {
776
+ if (!arrowEl) {
777
+ return { arrowWidth: 0, arrowHeight: 0 };
778
+ }
779
+ const { width, height } = arrowEl.getBoundingClientRect();
780
+ return { arrowWidth: width, arrowHeight: height };
781
+ };
782
+ /**
783
+ * Returns the recommended dimensions of the popover
784
+ * that takes into account whether or not the width
785
+ * should match the trigger width.
786
+ */
787
+ const getPopoverDimensions = (size, contentEl, triggerEl) => {
788
+ const contentDimentions = contentEl.getBoundingClientRect();
789
+ const contentHeight = contentDimentions.height;
790
+ let contentWidth = contentDimentions.width;
791
+ if (size === 'cover' && triggerEl) {
792
+ const triggerDimensions = triggerEl.getBoundingClientRect();
793
+ contentWidth = triggerDimensions.width;
794
+ }
795
+ return {
796
+ contentWidth,
797
+ contentHeight,
798
+ };
799
+ };
800
+ const configureDismissInteraction = (triggerEl, triggerAction, popoverEl, parentPopoverEl) => {
801
+ let dismissCallbacks = [];
802
+ const root = helpers.getElementRoot(parentPopoverEl);
803
+ const parentContentEl = root.querySelector('.popover-content');
804
+ switch (triggerAction) {
805
+ case 'hover':
806
+ dismissCallbacks = [
807
+ {
808
+ /**
809
+ * Do not use mouseover here
810
+ * as this will causes the event to
811
+ * be dispatched on each underlying
812
+ * element rather than on the popover
813
+ * content as a whole.
814
+ */
815
+ eventName: 'mouseenter',
816
+ callback: (ev) => {
817
+ /**
818
+ * Do not dismiss the popover is we
819
+ * are hovering over its trigger.
820
+ * This would be easier if we used mouseover
821
+ * but this would cause the event to be dispatched
822
+ * more often than we would like, potentially
823
+ * causing performance issues.
824
+ */
825
+ const element = document.elementFromPoint(ev.clientX, ev.clientY);
826
+ if (element === triggerEl) {
827
+ return;
828
+ }
829
+ popoverEl.dismiss(undefined, undefined, false);
830
+ },
831
+ },
832
+ ];
833
+ break;
834
+ case 'context-menu':
835
+ case 'click':
836
+ default:
837
+ dismissCallbacks = [
838
+ {
839
+ eventName: 'click',
840
+ callback: (ev) => {
841
+ /**
842
+ * Do not dismiss the popover is we
843
+ * are hovering over its trigger.
844
+ */
845
+ const target = ev.target;
846
+ const closestTrigger = target.closest('[data-ion-popover-trigger]');
847
+ if (closestTrigger === triggerEl) {
848
+ /**
849
+ * stopPropagation here so if the
850
+ * popover has dismissOnSelect="true"
851
+ * the popover does not dismiss since
852
+ * we just clicked a trigger element.
853
+ */
854
+ ev.stopPropagation();
855
+ return;
856
+ }
857
+ popoverEl.dismiss(undefined, undefined, false);
858
+ },
859
+ },
860
+ ];
861
+ break;
862
+ }
863
+ dismissCallbacks.forEach(({ eventName, callback }) => parentContentEl.addEventListener(eventName, callback));
864
+ return () => {
865
+ dismissCallbacks.forEach(({ eventName, callback }) => parentContentEl.removeEventListener(eventName, callback));
866
+ };
867
+ };
868
+ /**
869
+ * Configures the triggerEl to respond
870
+ * to user interaction based upon the triggerAction
871
+ * prop that devs have defined.
872
+ */
873
+ const configureTriggerInteraction = (triggerEl, triggerAction, popoverEl) => {
874
+ let triggerCallbacks = [];
875
+ /**
876
+ * Based upon the kind of trigger interaction
877
+ * the user wants, we setup the correct event
878
+ * listeners.
879
+ */
880
+ switch (triggerAction) {
881
+ case 'hover':
882
+ let hoverTimeout;
883
+ triggerCallbacks = [
884
+ {
885
+ eventName: 'mouseenter',
886
+ callback: async (ev) => {
887
+ ev.stopPropagation();
888
+ if (hoverTimeout) {
889
+ clearTimeout(hoverTimeout);
890
+ }
891
+ /**
892
+ * Hovering over a trigger should not
893
+ * immediately open the next popover.
894
+ */
895
+ hoverTimeout = setTimeout(() => {
896
+ helpers.raf(() => {
897
+ popoverEl.presentFromTrigger(ev);
898
+ hoverTimeout = undefined;
899
+ });
900
+ }, 100);
901
+ },
902
+ },
903
+ {
904
+ eventName: 'mouseleave',
905
+ callback: (ev) => {
906
+ if (hoverTimeout) {
907
+ clearTimeout(hoverTimeout);
908
+ }
909
+ /**
910
+ * If mouse is over another popover
911
+ * that is not this popover then we should
912
+ * close this popover.
913
+ */
914
+ const target = ev.relatedTarget;
915
+ if (!target) {
916
+ return;
917
+ }
918
+ if (target.closest('ion-popover') !== popoverEl) {
919
+ popoverEl.dismiss(undefined, undefined, false);
920
+ }
921
+ },
922
+ },
923
+ {
924
+ /**
925
+ * stopPropagation here prevents the popover
926
+ * from dismissing when dismiss-on-select="true".
927
+ */
928
+ eventName: 'click',
929
+ callback: (ev) => ev.stopPropagation(),
930
+ },
931
+ {
932
+ eventName: 'ionPopoverActivateTrigger',
933
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true),
934
+ },
935
+ ];
936
+ break;
937
+ case 'context-menu':
938
+ triggerCallbacks = [
939
+ {
940
+ eventName: 'contextmenu',
941
+ callback: (ev) => {
942
+ /**
943
+ * Prevents the platform context
944
+ * menu from appearing.
945
+ */
946
+ ev.preventDefault();
947
+ popoverEl.presentFromTrigger(ev);
948
+ },
949
+ },
950
+ {
951
+ eventName: 'click',
952
+ callback: (ev) => ev.stopPropagation(),
953
+ },
954
+ {
955
+ eventName: 'ionPopoverActivateTrigger',
956
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true),
957
+ },
958
+ ];
959
+ break;
960
+ case 'click':
961
+ default:
962
+ triggerCallbacks = [
963
+ {
964
+ /**
965
+ * Do not do a stopPropagation() here
966
+ * because if you had two click triggers
967
+ * then clicking the first trigger and then
968
+ * clicking the second trigger would not cause
969
+ * the first popover to dismiss.
970
+ */
971
+ eventName: 'click',
972
+ callback: (ev) => popoverEl.presentFromTrigger(ev),
973
+ },
974
+ {
975
+ eventName: 'ionPopoverActivateTrigger',
976
+ callback: (ev) => popoverEl.presentFromTrigger(ev, true),
977
+ },
978
+ ];
979
+ break;
980
+ }
981
+ triggerCallbacks.forEach(({ eventName, callback }) => triggerEl.addEventListener(eventName, callback));
982
+ triggerEl.setAttribute('data-ion-popover-trigger', 'true');
983
+ return () => {
984
+ triggerCallbacks.forEach(({ eventName, callback }) => triggerEl.removeEventListener(eventName, callback));
985
+ triggerEl.removeAttribute('data-ion-popover-trigger');
986
+ };
987
+ };
988
+ /**
989
+ * Returns the index of an ion-item in an array of ion-items.
990
+ */
991
+ const getIndexOfItem = (items, item) => {
992
+ if (!item || item.tagName !== 'ION-ITEM') {
993
+ return -1;
994
+ }
995
+ return items.findIndex((el) => el === item);
996
+ };
997
+ /**
998
+ * Given an array of elements and a currently focused ion-item
999
+ * returns the next ion-item relative to the focused one or
1000
+ * undefined.
1001
+ */
1002
+ const getNextItem = (items, currentItem) => {
1003
+ const currentItemIndex = getIndexOfItem(items, currentItem);
1004
+ return items[currentItemIndex + 1];
1005
+ };
1006
+ /**
1007
+ * Given an array of elements and a currently focused ion-item
1008
+ * returns the previous ion-item relative to the focused one or
1009
+ * undefined.
1010
+ */
1011
+ const getPrevItem = (items, currentItem) => {
1012
+ const currentItemIndex = getIndexOfItem(items, currentItem);
1013
+ return items[currentItemIndex - 1];
1014
+ };
1015
+ /** Focus the internal button of the ion-item */
1016
+ const focusItem = (item) => {
1017
+ const root = helpers.getElementRoot(item);
1018
+ const button = root.querySelector('button');
1019
+ if (button) {
1020
+ helpers.raf(() => button.focus());
1021
+ }
1022
+ };
1023
+ /**
1024
+ * Returns `true` if `el` has been designated
1025
+ * as a trigger element for an ion-popover.
1026
+ */
1027
+ const isTriggerElement = (el) => el.hasAttribute('data-ion-popover-trigger');
1028
+ const configureKeyboardInteraction = (popoverEl) => {
1029
+ const callback = async (ev) => {
1030
+ var _a;
1031
+ const activeElement = document.activeElement;
1032
+ let items = [];
1033
+ const targetTagName = (_a = ev.target) === null || _a === void 0 ? void 0 : _a.tagName;
1034
+ /**
1035
+ * Only handle custom keyboard interactions for the host popover element
1036
+ * and children ion-item elements.
1037
+ */
1038
+ if (targetTagName !== 'ION-POPOVER' && targetTagName !== 'ION-ITEM') {
1039
+ return;
1040
+ }
1041
+ /**
1042
+ * Complex selectors with :not() are :not supported
1043
+ * in older versions of Chromium so we need to do a
1044
+ * try/catch here so errors are not thrown.
1045
+ */
1046
+ try {
1047
+ /**
1048
+ * Select all ion-items that are not children of child popovers.
1049
+ * i.e. only select ion-item elements that are part of this popover
1050
+ */
1051
+ items = Array.from(popoverEl.querySelectorAll('ion-item:not(ion-popover ion-popover *):not([disabled])'));
1052
+ /* eslint-disable-next-line */
1053
+ }
1054
+ catch (_b) { }
1055
+ switch (ev.key) {
1056
+ /**
1057
+ * If we are in a child popover
1058
+ * then pressing the left arrow key
1059
+ * should close this popover and move
1060
+ * focus to the popover that presented
1061
+ * this one.
1062
+ */
1063
+ case 'ArrowLeft':
1064
+ const parentPopover = await popoverEl.getParentPopover();
1065
+ if (parentPopover) {
1066
+ popoverEl.dismiss(undefined, undefined, false);
1067
+ }
1068
+ break;
1069
+ /**
1070
+ * ArrowDown should move focus to the next focusable ion-item.
1071
+ */
1072
+ case 'ArrowDown':
1073
+ // Disable movement/scroll with keyboard
1074
+ ev.preventDefault();
1075
+ const nextItem = getNextItem(items, activeElement);
1076
+ if (nextItem !== undefined) {
1077
+ focusItem(nextItem);
1078
+ }
1079
+ break;
1080
+ /**
1081
+ * ArrowUp should move focus to the previous focusable ion-item.
1082
+ */
1083
+ case 'ArrowUp':
1084
+ // Disable movement/scroll with keyboard
1085
+ ev.preventDefault();
1086
+ const prevItem = getPrevItem(items, activeElement);
1087
+ if (prevItem !== undefined) {
1088
+ focusItem(prevItem);
1089
+ }
1090
+ break;
1091
+ /**
1092
+ * Home should move focus to the first focusable ion-item.
1093
+ */
1094
+ case 'Home':
1095
+ ev.preventDefault();
1096
+ const firstItem = items[0];
1097
+ if (firstItem !== undefined) {
1098
+ focusItem(firstItem);
1099
+ }
1100
+ break;
1101
+ /**
1102
+ * End should move focus to the last focusable ion-item.
1103
+ */
1104
+ case 'End':
1105
+ ev.preventDefault();
1106
+ const lastItem = items[items.length - 1];
1107
+ if (lastItem !== undefined) {
1108
+ focusItem(lastItem);
1109
+ }
1110
+ break;
1111
+ /**
1112
+ * ArrowRight, Spacebar, or Enter should activate
1113
+ * the currently focused trigger item to open a
1114
+ * popover if the element is a trigger item.
1115
+ */
1116
+ case 'ArrowRight':
1117
+ case ' ':
1118
+ case 'Enter':
1119
+ if (activeElement && isTriggerElement(activeElement)) {
1120
+ const rightEvent = new CustomEvent('ionPopoverActivateTrigger');
1121
+ activeElement.dispatchEvent(rightEvent);
1122
+ }
1123
+ break;
1124
+ }
1125
+ };
1126
+ popoverEl.addEventListener('keydown', callback);
1127
+ return () => popoverEl.removeEventListener('keydown', callback);
1128
+ };
1129
+ /**
1130
+ * Positions a popover by taking into account
1131
+ * the reference point, preferred side, alignment
1132
+ * and viewport dimensions.
1133
+ */
1134
+ const getPopoverPosition = (isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, triggerEl, event) => {
1135
+ var _a;
1136
+ let referenceCoordinates = {
1137
+ top: 0,
1138
+ left: 0,
1139
+ width: 0,
1140
+ height: 0,
1141
+ };
1142
+ /**
1143
+ * Calculate position relative to the
1144
+ * x-y coordinates in the event that
1145
+ * was passed in
1146
+ */
1147
+ switch (reference) {
1148
+ case 'event':
1149
+ if (!event) {
1150
+ return defaultPosition;
1151
+ }
1152
+ const mouseEv = event;
1153
+ referenceCoordinates = {
1154
+ top: mouseEv.clientY,
1155
+ left: mouseEv.clientX,
1156
+ width: 1,
1157
+ height: 1,
1158
+ };
1159
+ break;
1160
+ /**
1161
+ * Calculate position relative to the bounding
1162
+ * box on either the trigger element
1163
+ * specified via the `trigger` prop or
1164
+ * the target specified on the event
1165
+ * that was passed in.
1166
+ */
1167
+ case 'trigger':
1168
+ default:
1169
+ const customEv = event;
1170
+ /**
1171
+ * ionShadowTarget is used when we need to align the
1172
+ * popover with an element inside of the shadow root
1173
+ * of an Ionic component. Ex: Presenting a popover
1174
+ * by clicking on the collapsed indicator inside
1175
+ * of `ion-breadcrumb` and centering it relative
1176
+ * to the indicator rather than `ion-breadcrumb`
1177
+ * as a whole.
1178
+ */
1179
+ const actualTriggerEl = (triggerEl ||
1180
+ ((_a = customEv === null || customEv === void 0 ? void 0 : customEv.detail) === null || _a === void 0 ? void 0 : _a.ionShadowTarget) ||
1181
+ (customEv === null || customEv === void 0 ? void 0 : customEv.target));
1182
+ if (!actualTriggerEl) {
1183
+ return defaultPosition;
1184
+ }
1185
+ const triggerBoundingBox = actualTriggerEl.getBoundingClientRect();
1186
+ referenceCoordinates = {
1187
+ top: triggerBoundingBox.top,
1188
+ left: triggerBoundingBox.left,
1189
+ width: triggerBoundingBox.width,
1190
+ height: triggerBoundingBox.height,
1191
+ };
1192
+ break;
1193
+ }
1194
+ /**
1195
+ * Get top/left offset that would allow
1196
+ * popover to be positioned on the
1197
+ * preferred side of the reference.
1198
+ */
1199
+ const coordinates = calculatePopoverSide(side, referenceCoordinates, contentWidth, contentHeight, arrowWidth, arrowHeight, isRTL);
1200
+ /**
1201
+ * Get the top/left adjustments that
1202
+ * would allow the popover content
1203
+ * to have the correct alignment.
1204
+ */
1205
+ const alignedCoordinates = calculatePopoverAlign(align, side, referenceCoordinates, contentWidth, contentHeight);
1206
+ const top = coordinates.top + alignedCoordinates.top;
1207
+ const left = coordinates.left + alignedCoordinates.left;
1208
+ const { arrowTop, arrowLeft } = calculateArrowPosition(side, arrowWidth, arrowHeight, top, left, contentWidth, contentHeight, isRTL);
1209
+ const { originX, originY } = calculatePopoverOrigin(side, align, isRTL);
1210
+ return { top, left, referenceCoordinates, arrowTop, arrowLeft, originX, originY };
1211
+ };
1212
+ /**
1213
+ * Determines the transform-origin
1214
+ * of the popover animation so that it
1215
+ * is in line with what the side and alignment
1216
+ * prop values are. Currently only used
1217
+ * with the MD animation.
1218
+ */
1219
+ const calculatePopoverOrigin = (side, align, isRTL) => {
1220
+ switch (side) {
1221
+ case 'top':
1222
+ return { originX: getOriginXAlignment(align), originY: 'bottom' };
1223
+ case 'bottom':
1224
+ return { originX: getOriginXAlignment(align), originY: 'top' };
1225
+ case 'left':
1226
+ return { originX: 'right', originY: getOriginYAlignment(align) };
1227
+ case 'right':
1228
+ return { originX: 'left', originY: getOriginYAlignment(align) };
1229
+ case 'start':
1230
+ return { originX: isRTL ? 'left' : 'right', originY: getOriginYAlignment(align) };
1231
+ case 'end':
1232
+ return { originX: isRTL ? 'right' : 'left', originY: getOriginYAlignment(align) };
1233
+ }
1234
+ };
1235
+ const getOriginXAlignment = (align) => {
1236
+ switch (align) {
1237
+ case 'start':
1238
+ return 'left';
1239
+ case 'center':
1240
+ return 'center';
1241
+ case 'end':
1242
+ return 'right';
1243
+ }
1244
+ };
1245
+ const getOriginYAlignment = (align) => {
1246
+ switch (align) {
1247
+ case 'start':
1248
+ return 'top';
1249
+ case 'center':
1250
+ return 'center';
1251
+ case 'end':
1252
+ return 'bottom';
1253
+ }
1254
+ };
1255
+ /**
1256
+ * Calculates where the arrow positioning
1257
+ * should be relative to the popover content.
1258
+ */
1259
+ const calculateArrowPosition = (side, arrowWidth, arrowHeight, top, left, contentWidth, contentHeight, isRTL) => {
1260
+ /**
1261
+ * Note: When side is left, right, start, or end, the arrow is
1262
+ * been rotated using a `transform`, so to move the arrow up or down
1263
+ * by its dimension, you need to use `arrowWidth`.
1264
+ */
1265
+ const leftPosition = {
1266
+ arrowTop: top + contentHeight / 2 - arrowWidth / 2,
1267
+ arrowLeft: left + contentWidth - arrowWidth / 2,
1268
+ };
1269
+ /**
1270
+ * Move the arrow to the left by arrowWidth and then
1271
+ * again by half of its width because we have rotated
1272
+ * the arrow using a transform.
1273
+ */
1274
+ const rightPosition = { arrowTop: top + contentHeight / 2 - arrowWidth / 2, arrowLeft: left - arrowWidth * 1.5 };
1275
+ switch (side) {
1276
+ case 'top':
1277
+ return { arrowTop: top + contentHeight, arrowLeft: left + contentWidth / 2 - arrowWidth / 2 };
1278
+ case 'bottom':
1279
+ return { arrowTop: top - arrowHeight, arrowLeft: left + contentWidth / 2 - arrowWidth / 2 };
1280
+ case 'left':
1281
+ return leftPosition;
1282
+ case 'right':
1283
+ return rightPosition;
1284
+ case 'start':
1285
+ return isRTL ? rightPosition : leftPosition;
1286
+ case 'end':
1287
+ return isRTL ? leftPosition : rightPosition;
1288
+ default:
1289
+ return { arrowTop: 0, arrowLeft: 0 };
1290
+ }
1291
+ };
1292
+ /**
1293
+ * Calculates the required top/left
1294
+ * values needed to position the popover
1295
+ * content on the side specified in the
1296
+ * `side` prop.
1297
+ */
1298
+ const calculatePopoverSide = (side, triggerBoundingBox, contentWidth, contentHeight, arrowWidth, arrowHeight, isRTL) => {
1299
+ const sideLeft = {
1300
+ top: triggerBoundingBox.top,
1301
+ left: triggerBoundingBox.left - contentWidth - arrowWidth,
1302
+ };
1303
+ const sideRight = {
1304
+ top: triggerBoundingBox.top,
1305
+ left: triggerBoundingBox.left + triggerBoundingBox.width + arrowWidth,
1306
+ };
1307
+ switch (side) {
1308
+ case 'top':
1309
+ return {
1310
+ top: triggerBoundingBox.top - contentHeight - arrowHeight,
1311
+ left: triggerBoundingBox.left,
1312
+ };
1313
+ case 'right':
1314
+ return sideRight;
1315
+ case 'bottom':
1316
+ return {
1317
+ top: triggerBoundingBox.top + triggerBoundingBox.height + arrowHeight,
1318
+ left: triggerBoundingBox.left,
1319
+ };
1320
+ case 'left':
1321
+ return sideLeft;
1322
+ case 'start':
1323
+ return isRTL ? sideRight : sideLeft;
1324
+ case 'end':
1325
+ return isRTL ? sideLeft : sideRight;
1326
+ }
1327
+ };
1328
+ /**
1329
+ * Calculates the required top/left
1330
+ * offset values needed to provide the
1331
+ * correct alignment regardless while taking
1332
+ * into account the side the popover is on.
1333
+ */
1334
+ const calculatePopoverAlign = (align, side, triggerBoundingBox, contentWidth, contentHeight) => {
1335
+ switch (align) {
1336
+ case 'center':
1337
+ return calculatePopoverCenterAlign(side, triggerBoundingBox, contentWidth, contentHeight);
1338
+ case 'end':
1339
+ return calculatePopoverEndAlign(side, triggerBoundingBox, contentWidth, contentHeight);
1340
+ case 'start':
1341
+ default:
1342
+ return { top: 0, left: 0 };
1343
+ }
1344
+ };
1345
+ /**
1346
+ * Calculate the end alignment for
1347
+ * the popover. If side is on the x-axis
1348
+ * then the align values refer to the top
1349
+ * and bottom margins of the content.
1350
+ * If side is on the y-axis then the
1351
+ * align values refer to the left and right
1352
+ * margins of the content.
1353
+ */
1354
+ const calculatePopoverEndAlign = (side, triggerBoundingBox, contentWidth, contentHeight) => {
1355
+ switch (side) {
1356
+ case 'start':
1357
+ case 'end':
1358
+ case 'left':
1359
+ case 'right':
1360
+ return {
1361
+ top: -(contentHeight - triggerBoundingBox.height),
1362
+ left: 0,
1363
+ };
1364
+ case 'top':
1365
+ case 'bottom':
1366
+ default:
1367
+ return {
1368
+ top: 0,
1369
+ left: -(contentWidth - triggerBoundingBox.width),
1370
+ };
1371
+ }
1372
+ };
1373
+ /**
1374
+ * Calculate the center alignment for
1375
+ * the popover. If side is on the x-axis
1376
+ * then the align values refer to the top
1377
+ * and bottom margins of the content.
1378
+ * If side is on the y-axis then the
1379
+ * align values refer to the left and right
1380
+ * margins of the content.
1381
+ */
1382
+ const calculatePopoverCenterAlign = (side, triggerBoundingBox, contentWidth, contentHeight) => {
1383
+ switch (side) {
1384
+ case 'start':
1385
+ case 'end':
1386
+ case 'left':
1387
+ case 'right':
1388
+ return {
1389
+ top: -(contentHeight / 2 - triggerBoundingBox.height / 2),
1390
+ left: 0,
1391
+ };
1392
+ case 'top':
1393
+ case 'bottom':
1394
+ default:
1395
+ return {
1396
+ top: 0,
1397
+ left: -(contentWidth / 2 - triggerBoundingBox.width / 2),
1398
+ };
1399
+ }
1400
+ };
1401
+ /**
1402
+ * Adjusts popover positioning coordinates
1403
+ * such that popover does not appear offscreen
1404
+ * or overlapping safe area bounds.
1405
+ */
1406
+ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyWidth, bodyHeight, contentWidth, contentHeight, safeAreaMargin, contentOriginX, contentOriginY, triggerCoordinates, coordArrowTop = 0, coordArrowLeft = 0, arrowHeight = 0) => {
1407
+ let arrowTop = coordArrowTop;
1408
+ const arrowLeft = coordArrowLeft;
1409
+ let left = coordLeft;
1410
+ let top = coordTop;
1411
+ let bottom;
1412
+ let originX = contentOriginX;
1413
+ let originY = contentOriginY;
1414
+ let checkSafeAreaLeft = false;
1415
+ let checkSafeAreaRight = false;
1416
+ const triggerTop = triggerCoordinates
1417
+ ? triggerCoordinates.top + triggerCoordinates.height
1418
+ : bodyHeight / 2 - contentHeight / 2;
1419
+ const triggerHeight = triggerCoordinates ? triggerCoordinates.height : 0;
1420
+ let addPopoverBottomClass = false;
1421
+ /**
1422
+ * Adjust popover so it does not
1423
+ * go off the left of the screen.
1424
+ */
1425
+ if (left < bodyPadding + safeAreaMargin) {
1426
+ left = bodyPadding;
1427
+ checkSafeAreaLeft = true;
1428
+ originX = 'left';
1429
+ /**
1430
+ * Adjust popover so it does not
1431
+ * go off the right of the screen.
1432
+ */
1433
+ }
1434
+ else if (contentWidth + bodyPadding + left + safeAreaMargin > bodyWidth) {
1435
+ checkSafeAreaRight = true;
1436
+ left = bodyWidth - contentWidth - bodyPadding;
1437
+ originX = 'right';
1438
+ }
1439
+ /**
1440
+ * Adjust popover so it does not
1441
+ * go off the top of the screen.
1442
+ * If popover is on the left or the right of
1443
+ * the trigger, then we should not adjust top
1444
+ * margins.
1445
+ */
1446
+ if (triggerTop + triggerHeight + contentHeight > bodyHeight && (side === 'top' || side === 'bottom')) {
1447
+ if (triggerTop - contentHeight > 0) {
1448
+ /**
1449
+ * While we strive to align the popover with the trigger
1450
+ * on smaller screens this is not always possible. As a result,
1451
+ * we adjust the popover up so that it does not hang
1452
+ * off the bottom of the screen. However, we do not want to move
1453
+ * the popover up so much that it goes off the top of the screen.
1454
+ *
1455
+ * We chose 12 here so that the popover position looks a bit nicer as
1456
+ * it is not right up against the edge of the screen.
1457
+ */
1458
+ top = Math.max(12, triggerTop - contentHeight - triggerHeight - (arrowHeight - 1));
1459
+ arrowTop = top + contentHeight;
1460
+ originY = 'bottom';
1461
+ addPopoverBottomClass = true;
1462
+ /**
1463
+ * If not enough room for popover to appear
1464
+ * above trigger, then cut it off.
1465
+ */
1466
+ }
1467
+ else {
1468
+ bottom = bodyPadding;
1469
+ }
1470
+ }
1471
+ return {
1472
+ top,
1473
+ left,
1474
+ bottom,
1475
+ originX,
1476
+ originY,
1477
+ checkSafeAreaLeft,
1478
+ checkSafeAreaRight,
1479
+ arrowTop,
1480
+ arrowLeft,
1481
+ addPopoverBottomClass,
1482
+ };
1483
+ };
1484
+ const shouldShowArrow = (side, didAdjustBounds = false, ev, trigger) => {
1485
+ /**
1486
+ * If no event provided and
1487
+ * we do not have a trigger,
1488
+ * then this popover was likely
1489
+ * presented via the popoverController
1490
+ * or users called `present` manually.
1491
+ * In this case, the arrow should not be
1492
+ * shown as we do not have a reference.
1493
+ */
1494
+ if (!ev && !trigger) {
1495
+ return false;
1496
+ }
1497
+ /**
1498
+ * If popover is on the left or the right
1499
+ * of a trigger, but we needed to adjust the
1500
+ * popover due to screen bounds, then we should
1501
+ * hide the arrow as it will never be pointing
1502
+ * at the trigger.
1503
+ */
1504
+ if (side !== 'top' && side !== 'bottom' && didAdjustBounds) {
1505
+ return false;
1506
+ }
1507
+ return true;
1508
+ };
1509
+
1510
+ /*!
1511
+ * (C) Ionic http://ionicframework.com - MIT License
1512
+ */
1513
+ const POPOVER_IOS_BODY_PADDING = 5;
1514
+ /**
1515
+ * iOS Popover Enter Animation
1516
+ */
1517
+ const iosEnterAnimation = (baseEl, opts) => {
1518
+ var _a;
1519
+ const { event: ev, size, trigger, reference, side, align } = opts;
1520
+ const doc = baseEl.ownerDocument;
1521
+ const isRTL = doc.dir === 'rtl';
1522
+ const bodyWidth = doc.defaultView.innerWidth;
1523
+ const bodyHeight = doc.defaultView.innerHeight;
1524
+ const root = helpers.getElementRoot(baseEl);
1525
+ const contentEl = root.querySelector('.popover-content');
1526
+ const arrowEl = root.querySelector('.popover-arrow');
1527
+ 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);
1528
+ const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
1529
+ const { arrowWidth, arrowHeight } = getArrowDimensions(arrowEl);
1530
+ const defaultPosition = {
1531
+ top: bodyHeight / 2 - contentHeight / 2,
1532
+ left: bodyWidth / 2 - contentWidth / 2,
1533
+ originX: isRTL ? 'right' : 'left',
1534
+ originY: 'top',
1535
+ };
1536
+ const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
1537
+ const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
1538
+ const margin = size === 'cover' ? 0 : 25;
1539
+ 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);
1540
+ const baseAnimation = animation.createAnimation();
1541
+ const backdropAnimation = animation.createAnimation();
1542
+ const wrapperAnimation = animation.createAnimation();
1543
+ backdropAnimation
1544
+ .addElement(root.querySelector('ion-backdrop'))
1545
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1546
+ .beforeStyles({
1547
+ 'pointer-events': 'none',
1548
+ })
1549
+ .afterClearStyles(['pointer-events']);
1550
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).fromTo('opacity', 0.01, 1);
1551
+ return baseAnimation
1552
+ .easing('ease')
1553
+ .duration(100)
1554
+ .beforeAddWrite(() => {
1555
+ if (size === 'cover') {
1556
+ baseEl.style.setProperty('--width', `${contentWidth}px`);
1557
+ }
1558
+ if (addPopoverBottomClass) {
1559
+ baseEl.classList.add('popover-bottom');
1560
+ }
1561
+ if (bottom !== undefined) {
1562
+ contentEl.style.setProperty('bottom', `${bottom}px`);
1563
+ }
1564
+ const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
1565
+ const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
1566
+ let leftValue = `${left}px`;
1567
+ if (checkSafeAreaLeft) {
1568
+ leftValue = `${left}px${safeAreaLeft}`;
1569
+ }
1570
+ if (checkSafeAreaRight) {
1571
+ leftValue = `${left}px${safeAreaRight}`;
1572
+ }
1573
+ contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
1574
+ contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
1575
+ contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
1576
+ if (arrowEl !== null) {
1577
+ const didAdjustBounds = results.top !== top || results.left !== left;
1578
+ const showArrow = shouldShowArrow(side, didAdjustBounds, ev, trigger);
1579
+ if (showArrow) {
1580
+ arrowEl.style.setProperty('top', `calc(${arrowTop}px + var(--offset-y, 0))`);
1581
+ arrowEl.style.setProperty('left', `calc(${arrowLeft}px + var(--offset-x, 0))`);
1582
+ }
1583
+ else {
1584
+ arrowEl.style.setProperty('display', 'none');
1585
+ }
1586
+ }
1587
+ })
1588
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1589
+ };
1590
+
1591
+ /*!
1592
+ * (C) Ionic http://ionicframework.com - MIT License
1593
+ */
1594
+ /**
1595
+ * iOS Popover Leave Animation
1596
+ */
1597
+ const iosLeaveAnimation = (baseEl) => {
1598
+ const root = helpers.getElementRoot(baseEl);
1599
+ const contentEl = root.querySelector('.popover-content');
1600
+ const arrowEl = root.querySelector('.popover-arrow');
1601
+ const baseAnimation = animation.createAnimation();
1602
+ const backdropAnimation = animation.createAnimation();
1603
+ const wrapperAnimation = animation.createAnimation();
1604
+ backdropAnimation.addElement(root.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
1605
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).fromTo('opacity', 0.99, 0);
1606
+ return baseAnimation
1607
+ .easing('ease')
1608
+ .afterAddWrite(() => {
1609
+ baseEl.style.removeProperty('--width');
1610
+ baseEl.classList.remove('popover-bottom');
1611
+ contentEl.style.removeProperty('top');
1612
+ contentEl.style.removeProperty('left');
1613
+ contentEl.style.removeProperty('bottom');
1614
+ contentEl.style.removeProperty('transform-origin');
1615
+ if (arrowEl) {
1616
+ arrowEl.style.removeProperty('top');
1617
+ arrowEl.style.removeProperty('left');
1618
+ arrowEl.style.removeProperty('display');
1619
+ }
1620
+ })
1621
+ .duration(300)
1622
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1623
+ };
1624
+
1625
+ /*!
1626
+ * (C) Ionic http://ionicframework.com - MIT License
1627
+ */
1628
+ const POPOVER_MD_BODY_PADDING = 12;
1629
+ /**
1630
+ * Md Popover Enter Animation
1631
+ */
1632
+ const mdEnterAnimation = (baseEl, opts) => {
1633
+ var _a;
1634
+ const { event: ev, size, trigger, reference, side, align } = opts;
1635
+ const doc = baseEl.ownerDocument;
1636
+ const isRTL = doc.dir === 'rtl';
1637
+ const bodyWidth = doc.defaultView.innerWidth;
1638
+ const bodyHeight = doc.defaultView.innerHeight;
1639
+ const root = helpers.getElementRoot(baseEl);
1640
+ const contentEl = root.querySelector('.popover-content');
1641
+ 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);
1642
+ const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
1643
+ const defaultPosition = {
1644
+ top: bodyHeight / 2 - contentHeight / 2,
1645
+ left: bodyWidth / 2 - contentWidth / 2,
1646
+ originX: isRTL ? 'right' : 'left',
1647
+ originY: 'top',
1648
+ };
1649
+ const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
1650
+ const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
1651
+ const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
1652
+ const baseAnimation = animation.createAnimation();
1653
+ const backdropAnimation = animation.createAnimation();
1654
+ const wrapperAnimation = animation.createAnimation();
1655
+ const contentAnimation = animation.createAnimation();
1656
+ const viewportAnimation = animation.createAnimation();
1657
+ backdropAnimation
1658
+ .addElement(root.querySelector('ion-backdrop'))
1659
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1660
+ .beforeStyles({
1661
+ 'pointer-events': 'none',
1662
+ })
1663
+ .afterClearStyles(['pointer-events']);
1664
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).duration(150).fromTo('opacity', 0.01, 1);
1665
+ contentAnimation
1666
+ .addElement(contentEl)
1667
+ .beforeStyles({
1668
+ top: `calc(${top}px + var(--offset-y, 0px))`,
1669
+ left: `calc(${left}px + var(--offset-x, 0px))`,
1670
+ 'transform-origin': `${originY} ${originX}`,
1671
+ })
1672
+ .beforeAddWrite(() => {
1673
+ if (bottom !== undefined) {
1674
+ contentEl.style.setProperty('bottom', `${bottom}px`);
1675
+ }
1676
+ })
1677
+ .fromTo('transform', 'scale(0.8)', 'scale(1)');
1678
+ viewportAnimation.addElement(root.querySelector('.popover-viewport')).fromTo('opacity', 0.01, 1);
1679
+ return baseAnimation
1680
+ .easing('cubic-bezier(0.36,0.66,0.04,1)')
1681
+ .duration(300)
1682
+ .beforeAddWrite(() => {
1683
+ if (size === 'cover') {
1684
+ baseEl.style.setProperty('--width', `${contentWidth}px`);
1685
+ }
1686
+ if (originY === 'bottom') {
1687
+ baseEl.classList.add('popover-bottom');
1688
+ }
1689
+ })
1690
+ .addAnimation([backdropAnimation, wrapperAnimation, contentAnimation, viewportAnimation]);
1691
+ };
1692
+
1693
+ /*!
1694
+ * (C) Ionic http://ionicframework.com - MIT License
1695
+ */
1696
+ /**
1697
+ * Md Popover Leave Animation
1698
+ */
1699
+ const mdLeaveAnimation = (baseEl) => {
1700
+ const root = helpers.getElementRoot(baseEl);
1701
+ const contentEl = root.querySelector('.popover-content');
1702
+ const baseAnimation = animation.createAnimation();
1703
+ const backdropAnimation = animation.createAnimation();
1704
+ const wrapperAnimation = animation.createAnimation();
1705
+ backdropAnimation.addElement(root.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
1706
+ wrapperAnimation.addElement(root.querySelector('.popover-wrapper')).fromTo('opacity', 0.99, 0);
1707
+ return baseAnimation
1708
+ .easing('ease')
1709
+ .afterAddWrite(() => {
1710
+ baseEl.style.removeProperty('--width');
1711
+ baseEl.classList.remove('popover-bottom');
1712
+ contentEl.style.removeProperty('top');
1713
+ contentEl.style.removeProperty('left');
1714
+ contentEl.style.removeProperty('bottom');
1715
+ contentEl.style.removeProperty('transform-origin');
1716
+ })
1717
+ .duration(150)
1718
+ .addAnimation([backdropAnimation, wrapperAnimation]);
1719
+ };
1720
+
1721
+ 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)}}";
1722
+
1723
+ 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}";
1724
+
1725
+ const Popover = class {
1726
+ constructor(hostRef) {
1727
+ index$1.registerInstance(this, hostRef);
1728
+ this.didPresent = index$1.createEvent(this, "ionPopoverDidPresent", 7);
1729
+ this.willPresent = index$1.createEvent(this, "ionPopoverWillPresent", 7);
1730
+ this.willDismiss = index$1.createEvent(this, "ionPopoverWillDismiss", 7);
1731
+ this.didDismiss = index$1.createEvent(this, "ionPopoverDidDismiss", 7);
1732
+ this.didPresentShorthand = index$1.createEvent(this, "didPresent", 7);
1733
+ this.willPresentShorthand = index$1.createEvent(this, "willPresent", 7);
1734
+ this.willDismissShorthand = index$1.createEvent(this, "willDismiss", 7);
1735
+ this.didDismissShorthand = index$1.createEvent(this, "didDismiss", 7);
1736
+ this.parentPopover = null;
1737
+ this.popoverIndex = popoverIds++;
1738
+ this.coreDelegate = frameworkDelegate.CoreDelegate();
1739
+ this.inline = false;
1740
+ this.focusDescendantOnPresent = false;
1741
+ this.presented = false;
1742
+ /** @internal */
1743
+ this.hasController = false;
1744
+ /**
1745
+ * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
1746
+ */
1747
+ this.keyboardClose = true;
1748
+ /**
1749
+ * If `true`, the popover will be dismissed when the backdrop is clicked.
1750
+ */
1751
+ this.backdropDismiss = true;
1752
+ /**
1753
+ * If `true`, a backdrop will be displayed behind the popover.
1754
+ * This property controls whether or not the backdrop
1755
+ * darkens the screen when the popover is presented.
1756
+ * It does not control whether or not the backdrop
1757
+ * is active or present in the DOM.
1758
+ */
1759
+ this.showBackdrop = true;
1760
+ /**
1761
+ * If `true`, the popover will be translucent.
1762
+ * Only applies when the mode is `"ios"` and the device supports
1763
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
1764
+ */
1765
+ this.translucent = false;
1766
+ /**
1767
+ * If `true`, the popover will animate.
1768
+ */
1769
+ this.animated = true;
1770
+ /**
1771
+ * Describes what kind of interaction with the trigger that
1772
+ * should cause the popover to open. Does not apply when the `trigger`
1773
+ * property is `undefined`.
1774
+ * If `'click'`, the popover will be presented when the trigger is left clicked.
1775
+ * If `'hover'`, the popover will be presented when a pointer hovers over the trigger.
1776
+ * If `'context-menu'`, the popover will be presented when the trigger is right
1777
+ * clicked on desktop and long pressed on mobile. This will also prevent your
1778
+ * device's normal context menu from appearing.
1779
+ */
1780
+ this.triggerAction = 'click';
1781
+ /**
1782
+ * Describes how to calculate the popover width.
1783
+ * If `'cover'`, the popover width will match the width of the trigger.
1784
+ * If `'auto'`, the popover width will be determined by the content in
1785
+ * the popover.
1786
+ */
1787
+ this.size = 'auto';
1788
+ /**
1789
+ * If `true`, the popover will be automatically
1790
+ * dismissed when the content has been clicked.
1791
+ */
1792
+ this.dismissOnSelect = false;
1793
+ /**
1794
+ * Describes what to position the popover relative to.
1795
+ * If `'trigger'`, the popover will be positioned relative
1796
+ * to the trigger button. If passing in an event, this is
1797
+ * determined via event.target.
1798
+ * If `'event'`, the popover will be positioned relative
1799
+ * to the x/y coordinates of the trigger action. If passing
1800
+ * in an event, this is determined via event.clientX and event.clientY.
1801
+ */
1802
+ this.reference = 'trigger';
1803
+ /**
1804
+ * Describes which side of the `reference` point to position
1805
+ * the popover on. The `'start'` and `'end'` values are RTL-aware,
1806
+ * and the `'left'` and `'right'` values are not.
1807
+ */
1808
+ this.side = 'bottom';
1809
+ /**
1810
+ * If `true`, the popover will display an arrow that points at the
1811
+ * `reference` when running in `ios` mode. Does not apply in `md` mode.
1812
+ */
1813
+ this.arrow = true;
1814
+ /**
1815
+ * If `true`, the popover will open. If `false`, the popover will close.
1816
+ * Use this if you need finer grained control over presentation, otherwise
1817
+ * just use the popoverController or the `trigger` property.
1818
+ * Note: `isOpen` will not automatically be set back to `false` when
1819
+ * the popover dismisses. You will need to do that in your code.
1820
+ */
1821
+ this.isOpen = false;
1822
+ /**
1823
+ * @internal
1824
+ *
1825
+ * If `true` the popover will not register its own keyboard event handlers.
1826
+ * This allows the contents of the popover to handle their own keyboard interactions.
1827
+ *
1828
+ * If `false`, the popover will register its own keyboard event handlers for
1829
+ * navigating `ion-list` items within a popover (up/down/home/end/etc.).
1830
+ * This will also cancel browser keyboard event bindings to prevent scroll
1831
+ * behavior in a popover using a list of items.
1832
+ */
1833
+ this.keyboardEvents = false;
1834
+ /**
1835
+ * If `true`, the component passed into `ion-popover` will
1836
+ * automatically be mounted when the popover is created. The
1837
+ * component will remain mounted even when the popover is dismissed.
1838
+ * However, the component will be destroyed when the popover is
1839
+ * destroyed. This property is not reactive and should only be
1840
+ * used when initially creating a popover.
1841
+ *
1842
+ * Note: This feature only applies to inline popovers in JavaScript
1843
+ * frameworks such as Angular, React, and Vue.
1844
+ */
1845
+ this.keepContentsMounted = false;
1846
+ this.onBackdropTap = () => {
1847
+ this.dismiss(undefined, overlays.BACKDROP);
1848
+ };
1849
+ this.onLifecycle = (modalEvent) => {
1850
+ const el = this.usersElement;
1851
+ const name = LIFECYCLE_MAP[modalEvent.type];
1852
+ if (el && name) {
1853
+ const event = new CustomEvent(name, {
1854
+ bubbles: false,
1855
+ cancelable: false,
1856
+ detail: modalEvent.detail,
1857
+ });
1858
+ el.dispatchEvent(event);
1859
+ }
1860
+ };
1861
+ this.configureTriggerInteraction = () => {
1862
+ const { trigger, triggerAction, el, destroyTriggerInteraction } = this;
1863
+ if (destroyTriggerInteraction) {
1864
+ destroyTriggerInteraction();
1865
+ }
1866
+ const triggerEl = (this.triggerEl = trigger !== undefined ? document.getElementById(trigger) : null);
1867
+ if (!triggerEl) {
1868
+ return;
1869
+ }
1870
+ this.destroyTriggerInteraction = configureTriggerInteraction(triggerEl, triggerAction, el);
1871
+ };
1872
+ this.configureKeyboardInteraction = () => {
1873
+ const { destroyKeyboardInteraction, el } = this;
1874
+ if (destroyKeyboardInteraction) {
1875
+ destroyKeyboardInteraction();
1876
+ }
1877
+ this.destroyKeyboardInteraction = configureKeyboardInteraction(el);
1878
+ };
1879
+ this.configureDismissInteraction = () => {
1880
+ const { destroyDismissInteraction, parentPopover, triggerAction, triggerEl, el } = this;
1881
+ if (!parentPopover || !triggerEl) {
1882
+ return;
1883
+ }
1884
+ if (destroyDismissInteraction) {
1885
+ destroyDismissInteraction();
1886
+ }
1887
+ this.destroyDismissInteraction = configureDismissInteraction(triggerEl, triggerAction, el, parentPopover);
1888
+ };
1889
+ }
1890
+ onTriggerChange() {
1891
+ this.configureTriggerInteraction();
1892
+ }
1893
+ onIsOpenChange(newValue, oldValue) {
1894
+ if (newValue === true && oldValue === false) {
1895
+ this.present();
1896
+ }
1897
+ else if (newValue === false && oldValue === true) {
1898
+ this.dismiss();
1899
+ }
1900
+ }
1901
+ connectedCallback() {
1902
+ overlays.prepareOverlay(this.el);
1903
+ }
1904
+ componentWillLoad() {
1905
+ /**
1906
+ * If user has custom ID set then we should
1907
+ * not assign the default incrementing ID.
1908
+ */
1909
+ this.popoverId = this.el.hasAttribute('id') ? this.el.getAttribute('id') : `ion-popover-${this.popoverIndex}`;
1910
+ this.parentPopover = this.el.closest(`ion-popover:not(#${this.popoverId})`);
1911
+ if (this.alignment === undefined) {
1912
+ this.alignment = ionicGlobal.getIonMode(this) === 'ios' ? 'center' : 'start';
1913
+ }
1914
+ }
1915
+ componentDidLoad() {
1916
+ const { parentPopover, isOpen } = this;
1917
+ /**
1918
+ * If popover was rendered with isOpen="true"
1919
+ * then we should open popover immediately.
1920
+ */
1921
+ if (isOpen === true) {
1922
+ helpers.raf(() => this.present());
1923
+ }
1924
+ if (parentPopover) {
1925
+ helpers.addEventListener(parentPopover, 'ionPopoverWillDismiss', () => {
1926
+ this.dismiss(undefined, undefined, false);
1927
+ });
1928
+ }
1929
+ this.configureTriggerInteraction();
1930
+ }
1931
+ /**
1932
+ * When opening a popover from a trigger, we should not be
1933
+ * modifying the `event` prop from inside the component.
1934
+ * Additionally, when pressing the "Right" arrow key, we need
1935
+ * to shift focus to the first descendant in the newly presented
1936
+ * popover.
1937
+ *
1938
+ * @internal
1939
+ */
1940
+ async presentFromTrigger(event, focusDescendant = false) {
1941
+ this.focusDescendantOnPresent = focusDescendant;
1942
+ await this.present(event);
1943
+ this.focusDescendantOnPresent = false;
1944
+ }
1945
+ /**
1946
+ * Determines whether or not an overlay
1947
+ * is being used inline or via a controller/JS
1948
+ * and returns the correct delegate.
1949
+ * By default, subsequent calls to getDelegate
1950
+ * will use a cached version of the delegate.
1951
+ * This is useful for calling dismiss after
1952
+ * present so that the correct delegate is given.
1953
+ */
1954
+ getDelegate(force = false) {
1955
+ if (this.workingDelegate && !force) {
1956
+ return {
1957
+ delegate: this.workingDelegate,
1958
+ inline: this.inline,
1959
+ };
1960
+ }
1961
+ /**
1962
+ * If using overlay inline
1963
+ * we potentially need to use the coreDelegate
1964
+ * so that this works in vanilla JS apps.
1965
+ * If a developer has presented this component
1966
+ * via a controller, then we can assume
1967
+ * the component is already in the
1968
+ * correct place.
1969
+ */
1970
+ const parentEl = this.el.parentNode;
1971
+ const inline = (this.inline = parentEl !== null && !this.hasController);
1972
+ const delegate = (this.workingDelegate = inline ? this.delegate || this.coreDelegate : this.delegate);
1973
+ return { inline, delegate };
1974
+ }
1975
+ /**
1976
+ * Present the popover overlay after it has been created.
1977
+ * Developers can pass a mouse, touch, or pointer event
1978
+ * to position the popover relative to where that event
1979
+ * was dispatched.
1980
+ */
1981
+ async present(event) {
1982
+ if (this.presented) {
1983
+ return;
1984
+ }
1985
+ /**
1986
+ * When using an inline popover
1987
+ * and dismissing a popover it is possible to
1988
+ * quickly present the popover while it is
1989
+ * dismissing. We need to await any current
1990
+ * transition to allow the dismiss to finish
1991
+ * before presenting again.
1992
+ */
1993
+ if (this.currentTransition !== undefined) {
1994
+ await this.currentTransition;
1995
+ }
1996
+ const data = Object.assign(Object.assign({}, this.componentProps), { popover: this.el });
1997
+ const { inline, delegate } = this.getDelegate(true);
1998
+ this.usersElement = await frameworkDelegate.attachComponent(delegate, this.el, this.component, ['popover-viewport'], data, inline);
1999
+ await index$3.deepReady(this.usersElement);
2000
+ if (!this.keyboardEvents) {
2001
+ this.configureKeyboardInteraction();
2002
+ }
2003
+ this.configureDismissInteraction();
2004
+ this.currentTransition = overlays.present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, {
2005
+ event: event || this.event,
2006
+ size: this.size,
2007
+ trigger: this.triggerEl,
2008
+ reference: this.reference,
2009
+ side: this.side,
2010
+ align: this.alignment,
2011
+ });
2012
+ await this.currentTransition;
2013
+ this.currentTransition = undefined;
2014
+ /**
2015
+ * If popover is nested and was
2016
+ * presented using the "Right" arrow key,
2017
+ * we need to move focus to the first
2018
+ * descendant inside of the popover.
2019
+ */
2020
+ if (this.focusDescendantOnPresent) {
2021
+ overlays.focusFirstDescendant(this.el, this.el);
2022
+ }
2023
+ }
2024
+ /**
2025
+ * Dismiss the popover overlay after it has been presented.
2026
+ *
2027
+ * @param data Any data to emit in the dismiss events.
2028
+ * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
2029
+ * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
2030
+ * a parent popover if this popover is nested. Defaults to `true`.
2031
+ */
2032
+ async dismiss(data, role, dismissParentPopover = true) {
2033
+ /**
2034
+ * When using an inline popover
2035
+ * and presenting a popover it is possible to
2036
+ * quickly dismiss the popover while it is
2037
+ * presenting. We need to await any current
2038
+ * transition to allow the present to finish
2039
+ * before dismissing again.
2040
+ */
2041
+ if (this.currentTransition !== undefined) {
2042
+ await this.currentTransition;
2043
+ }
2044
+ const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
2045
+ if (dismissParentPopover && this.parentPopover) {
2046
+ this.parentPopover.dismiss(data, role, dismissParentPopover);
2047
+ }
2048
+ this.currentTransition = overlays.dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
2049
+ const shouldDismiss = await this.currentTransition;
2050
+ if (shouldDismiss) {
2051
+ if (destroyKeyboardInteraction) {
2052
+ destroyKeyboardInteraction();
2053
+ this.destroyKeyboardInteraction = undefined;
2054
+ }
2055
+ if (destroyDismissInteraction) {
2056
+ destroyDismissInteraction();
2057
+ this.destroyDismissInteraction = undefined;
2058
+ }
2059
+ /**
2060
+ * If using popover inline
2061
+ * we potentially need to use the coreDelegate
2062
+ * so that this works in vanilla JS apps
2063
+ */
2064
+ const { delegate } = this.getDelegate();
2065
+ await frameworkDelegate.detachComponent(delegate, this.usersElement);
2066
+ }
2067
+ this.currentTransition = undefined;
2068
+ return shouldDismiss;
2069
+ }
2070
+ /**
2071
+ * @internal
2072
+ */
2073
+ async getParentPopover() {
2074
+ return this.parentPopover;
2075
+ }
2076
+ /**
2077
+ * Returns a promise that resolves when the popover did dismiss.
2078
+ */
2079
+ onDidDismiss() {
2080
+ return overlays.eventMethod(this.el, 'ionPopoverDidDismiss');
2081
+ }
2082
+ /**
2083
+ * Returns a promise that resolves when the popover will dismiss.
2084
+ */
2085
+ onWillDismiss() {
2086
+ return overlays.eventMethod(this.el, 'ionPopoverWillDismiss');
2087
+ }
2088
+ render() {
2089
+ const mode = ionicGlobal.getIonMode(this);
2090
+ const { onLifecycle, popoverId, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
2091
+ const desktop = ionicGlobal.isPlatform('desktop');
2092
+ const enableArrow = arrow && !parentPopover;
2093
+ return (index$1.h(index$1.Host, Object.assign({ "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
2094
+ zIndex: `${20000 + this.overlayIndex}`,
2095
+ }, 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, 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)))));
2096
+ }
2097
+ get el() { return index$1.getElement(this); }
2098
+ static get watchers() { return {
2099
+ "trigger": ["onTriggerChange"],
2100
+ "triggerAction": ["onTriggerChange"],
2101
+ "isOpen": ["onIsOpenChange"]
2102
+ }; }
2103
+ };
2104
+ const LIFECYCLE_MAP = {
2105
+ ionPopoverDidPresent: 'ionViewDidEnter',
2106
+ ionPopoverWillPresent: 'ionViewWillEnter',
2107
+ ionPopoverWillDismiss: 'ionViewWillLeave',
2108
+ ionPopoverDidDismiss: 'ionViewDidLeave',
2109
+ };
2110
+ let popoverIds = 0;
2111
+ Popover.style = {
2112
+ ios: popoverIosCss,
2113
+ md: popoverMdCss
2114
+ };
2115
+
2116
+ /*!
2117
+ * (C) Ionic http://ionicframework.com - MIT License
2118
+ */
2119
+ const watchForOptions = (containerEl, tagName, onChange) => {
2120
+ if (typeof MutationObserver === 'undefined') {
2121
+ return;
2122
+ }
2123
+ const mutation = new MutationObserver((mutationList) => {
2124
+ onChange(getSelectedOption(mutationList, tagName));
2125
+ });
2126
+ mutation.observe(containerEl, {
2127
+ childList: true,
2128
+ subtree: true,
2129
+ });
2130
+ return mutation;
2131
+ };
2132
+ const getSelectedOption = (mutationList, tagName) => {
2133
+ let newOption;
2134
+ mutationList.forEach((mut) => {
2135
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
2136
+ for (let i = 0; i < mut.addedNodes.length; i++) {
2137
+ newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;
2138
+ }
2139
+ });
2140
+ return newOption;
2141
+ };
2142
+ const findCheckedOption = (el, tagName) => {
2143
+ if (el.nodeType !== 1) {
2144
+ return undefined;
2145
+ }
2146
+ const options = el.tagName === tagName.toUpperCase() ? [el] : Array.from(el.querySelectorAll(tagName));
2147
+ return options.find((o) => o.value === el.value);
2148
+ };
2149
+
2150
+ const selectIosCss = ":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px;opacity:0.33}";
2151
+
2152
+ const selectMdCss = ":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:16px}.select-icon{width:19px;height:19px;transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:0.55}:host-context(.item-label-stacked) .select-icon,:host-context(.item-label-floating:not(.item-fill-outline)) .select-icon,:host-context(.item-label-floating.item-fill-outline){transform:translate3d(0, -9px, 0)}:host-context(.item-has-focus) .select-icon{transform:rotate(180deg)}:host-context(.item-has-focus.item-label-stacked) .select-icon,:host-context(.item-has-focus.item-label-floating:not(.item-fill-outline)) .select-icon{transform:translate3d(0, -9px, 0) rotate(180deg)}:host-context(ion-item.ion-focused) .select-icon,:host-context(.item-has-focus) .select-icon{color:var(--highlight-color-focused);opacity:1}";
2153
+
2154
+ const Select = class {
2155
+ constructor(hostRef) {
2156
+ index$1.registerInstance(this, hostRef);
2157
+ this.ionChange = index$1.createEvent(this, "ionChange", 7);
2158
+ this.ionCancel = index$1.createEvent(this, "ionCancel", 7);
2159
+ this.ionDismiss = index$1.createEvent(this, "ionDismiss", 7);
2160
+ this.ionFocus = index$1.createEvent(this, "ionFocus", 7);
2161
+ this.ionBlur = index$1.createEvent(this, "ionBlur", 7);
2162
+ this.ionStyle = index$1.createEvent(this, "ionStyle", 7);
2163
+ this.inputId = `ion-sel-${selectIds++}`;
2164
+ this.didInit = false;
2165
+ this.isExpanded = false;
2166
+ /**
2167
+ * If `true`, the user cannot interact with the select.
2168
+ */
2169
+ this.disabled = false;
2170
+ /**
2171
+ * The text to display on the cancel button.
2172
+ */
2173
+ this.cancelText = 'Cancel';
2174
+ /**
2175
+ * The text to display on the ok button.
2176
+ */
2177
+ this.okText = 'OK';
2178
+ /**
2179
+ * The name of the control, which is submitted with the form data.
2180
+ */
2181
+ this.name = this.inputId;
2182
+ /**
2183
+ * If `true`, the select can accept multiple values.
2184
+ */
2185
+ this.multiple = false;
2186
+ /**
2187
+ * The interface the select should use: `action-sheet`, `popover` or `alert`.
2188
+ */
2189
+ this.interface = 'alert';
2190
+ /**
2191
+ * Any additional options that the `alert`, `action-sheet` or `popover` interface
2192
+ * can take. See the [ion-alert docs](./alert), the
2193
+ * [ion-action-sheet docs](./action-sheet) and the
2194
+ * [ion-popover docs](./popover) for the
2195
+ * create options for each interface.
2196
+ *
2197
+ * Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.
2198
+ */
2199
+ this.interfaceOptions = {};
2200
+ this.onClick = (ev) => {
2201
+ this.setFocus();
2202
+ this.open(ev);
2203
+ };
2204
+ this.onFocus = () => {
2205
+ this.ionFocus.emit();
2206
+ };
2207
+ this.onBlur = () => {
2208
+ this.ionBlur.emit();
2209
+ };
2210
+ }
2211
+ styleChanged() {
2212
+ this.emitStyle();
2213
+ }
2214
+ valueChanged() {
2215
+ this.emitStyle();
2216
+ // TODO: FW-1160 - Remove the `didInit` property when ionChange behavior is changed in v7.
2217
+ if (this.didInit) {
2218
+ this.ionChange.emit({
2219
+ value: this.value,
2220
+ });
2221
+ }
2222
+ }
2223
+ async connectedCallback() {
2224
+ this.updateOverlayOptions();
2225
+ this.emitStyle();
2226
+ this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {
2227
+ this.updateOverlayOptions();
2228
+ });
2229
+ }
2230
+ disconnectedCallback() {
2231
+ if (this.mutationO) {
2232
+ this.mutationO.disconnect();
2233
+ this.mutationO = undefined;
2234
+ }
2235
+ }
2236
+ componentDidLoad() {
2237
+ this.didInit = true;
2238
+ }
2239
+ /**
2240
+ * Open the select overlay. The overlay is either an alert, action sheet, or popover,
2241
+ * depending on the `interface` property on the `ion-select`.
2242
+ *
2243
+ * @param event The user interface event that called the open.
2244
+ */
2245
+ async open(event) {
2246
+ if (this.disabled || this.isExpanded) {
2247
+ return undefined;
2248
+ }
2249
+ this.isExpanded = true;
2250
+ const overlay = (this.overlay = await this.createOverlay(event));
2251
+ overlay.onDidDismiss().then(() => {
2252
+ this.overlay = undefined;
2253
+ this.isExpanded = false;
2254
+ this.ionDismiss.emit();
2255
+ this.setFocus();
2256
+ });
2257
+ await overlay.present();
2258
+ // focus selected option for popovers
2259
+ if (this.interface === 'popover') {
2260
+ let indexOfSelected = this.childOpts.map((o) => o.value).indexOf(this.value);
2261
+ indexOfSelected = indexOfSelected > -1 ? indexOfSelected : 0; // default to first option if nothing selected
2262
+ const selectedEl = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);
2263
+ if (selectedEl) {
2264
+ helpers.focusElement(selectedEl);
2265
+ }
2266
+ }
2267
+ return overlay;
2268
+ }
2269
+ createOverlay(ev) {
2270
+ let selectInterface = this.interface;
2271
+ if (selectInterface === 'action-sheet' && this.multiple) {
2272
+ console.warn(`Select interface cannot be "${selectInterface}" with a multi-value select. Using the "alert" interface instead.`);
2273
+ selectInterface = 'alert';
2274
+ }
2275
+ if (selectInterface === 'popover' && !ev) {
2276
+ console.warn(`Select interface cannot be a "${selectInterface}" without passing an event. Using the "alert" interface instead.`);
2277
+ selectInterface = 'alert';
2278
+ }
2279
+ if (selectInterface === 'action-sheet') {
2280
+ return this.openActionSheet();
2281
+ }
2282
+ if (selectInterface === 'popover') {
2283
+ return this.openPopover(ev);
2284
+ }
2285
+ return this.openAlert();
2286
+ }
2287
+ updateOverlayOptions() {
2288
+ const overlay = this.overlay;
2289
+ if (!overlay) {
2290
+ return;
2291
+ }
2292
+ const childOpts = this.childOpts;
2293
+ const value = this.value;
2294
+ switch (this.interface) {
2295
+ case 'action-sheet':
2296
+ overlay.buttons = this.createActionSheetButtons(childOpts, value);
2297
+ break;
2298
+ case 'popover':
2299
+ const popover = overlay.querySelector('ion-select-popover');
2300
+ if (popover) {
2301
+ popover.options = this.createPopoverOptions(childOpts, value);
2302
+ }
2303
+ break;
2304
+ case 'alert':
2305
+ const inputType = this.multiple ? 'checkbox' : 'radio';
2306
+ overlay.inputs = this.createAlertInputs(childOpts, inputType, value);
2307
+ break;
2308
+ }
2309
+ }
2310
+ createActionSheetButtons(data, selectValue) {
2311
+ const actionSheetButtons = data.map((option) => {
2312
+ const value = getOptionValue(option);
2313
+ // Remove hydrated before copying over classes
2314
+ const copyClasses = Array.from(option.classList)
2315
+ .filter((cls) => cls !== 'hydrated')
2316
+ .join(' ');
2317
+ const optClass = `${OPTION_CLASS} ${copyClasses}`;
2318
+ return {
2319
+ role: isOptionSelected(selectValue, value, this.compareWith) ? 'selected' : '',
2320
+ text: option.textContent,
2321
+ cssClass: optClass,
2322
+ handler: () => {
2323
+ this.value = value;
2324
+ },
2325
+ };
2326
+ });
2327
+ // Add "cancel" button
2328
+ actionSheetButtons.push({
2329
+ text: this.cancelText,
2330
+ role: 'cancel',
2331
+ handler: () => {
2332
+ this.ionCancel.emit();
2333
+ },
2334
+ });
2335
+ return actionSheetButtons;
2336
+ }
2337
+ createAlertInputs(data, inputType, selectValue) {
2338
+ const alertInputs = data.map((option) => {
2339
+ const value = getOptionValue(option);
2340
+ // Remove hydrated before copying over classes
2341
+ const copyClasses = Array.from(option.classList)
2342
+ .filter((cls) => cls !== 'hydrated')
2343
+ .join(' ');
2344
+ const optClass = `${OPTION_CLASS} ${copyClasses}`;
2345
+ return {
2346
+ type: inputType,
2347
+ cssClass: optClass,
2348
+ label: option.textContent || '',
2349
+ value,
2350
+ checked: isOptionSelected(selectValue, value, this.compareWith),
2351
+ disabled: option.disabled,
2352
+ };
2353
+ });
2354
+ return alertInputs;
2355
+ }
2356
+ createPopoverOptions(data, selectValue) {
2357
+ const popoverOptions = data.map((option) => {
2358
+ const value = getOptionValue(option);
2359
+ // Remove hydrated before copying over classes
2360
+ const copyClasses = Array.from(option.classList)
2361
+ .filter((cls) => cls !== 'hydrated')
2362
+ .join(' ');
2363
+ const optClass = `${OPTION_CLASS} ${copyClasses}`;
2364
+ return {
2365
+ text: option.textContent || '',
2366
+ cssClass: optClass,
2367
+ value,
2368
+ checked: isOptionSelected(selectValue, value, this.compareWith),
2369
+ disabled: option.disabled,
2370
+ handler: (selected) => {
2371
+ this.value = selected;
2372
+ if (!this.multiple) {
2373
+ this.close();
2374
+ }
2375
+ },
2376
+ };
2377
+ });
2378
+ return popoverOptions;
2379
+ }
2380
+ async openPopover(ev) {
2381
+ const interfaceOptions = this.interfaceOptions;
2382
+ const mode = ionicGlobal.getIonMode(this);
2383
+ const showBackdrop = mode === 'md' ? false : true;
2384
+ const multiple = this.multiple;
2385
+ const value = this.value;
2386
+ let event = ev;
2387
+ let size = 'auto';
2388
+ const item = this.el.closest('ion-item');
2389
+ // If the select is inside of an item containing a floating
2390
+ // or stacked label then the popover should take up the
2391
+ // full width of the item when it presents
2392
+ if (item && (item.classList.contains('item-label-floating') || item.classList.contains('item-label-stacked'))) {
2393
+ event = Object.assign(Object.assign({}, ev), { detail: {
2394
+ ionShadowTarget: item,
2395
+ } });
2396
+ size = 'cover';
2397
+ }
2398
+ const popoverOpts = Object.assign(Object.assign({ mode,
2399
+ event, alignment: 'center', size,
2400
+ showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: ['select-popover', interfaceOptions.cssClass], componentProps: {
2401
+ header: interfaceOptions.header,
2402
+ subHeader: interfaceOptions.subHeader,
2403
+ message: interfaceOptions.message,
2404
+ multiple,
2405
+ value,
2406
+ options: this.createPopoverOptions(this.childOpts, value),
2407
+ } });
2408
+ return overlays.popoverController.create(popoverOpts);
2409
+ }
2410
+ async openActionSheet() {
2411
+ const mode = ionicGlobal.getIonMode(this);
2412
+ const interfaceOptions = this.interfaceOptions;
2413
+ const actionSheetOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { buttons: this.createActionSheetButtons(this.childOpts, this.value), cssClass: ['select-action-sheet', interfaceOptions.cssClass] });
2414
+ return overlays.actionSheetController.create(actionSheetOpts);
2415
+ }
2416
+ async openAlert() {
2417
+ const label = this.getLabel();
2418
+ const labelText = label ? label.textContent : null;
2419
+ const interfaceOptions = this.interfaceOptions;
2420
+ const inputType = this.multiple ? 'checkbox' : 'radio';
2421
+ const mode = ionicGlobal.getIonMode(this);
2422
+ const alertOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { header: interfaceOptions.header ? interfaceOptions.header : labelText, inputs: this.createAlertInputs(this.childOpts, inputType, this.value), buttons: [
2423
+ {
2424
+ text: this.cancelText,
2425
+ role: 'cancel',
2426
+ handler: () => {
2427
+ this.ionCancel.emit();
2428
+ },
2429
+ },
2430
+ {
2431
+ text: this.okText,
2432
+ handler: (selectedValues) => {
2433
+ this.value = selectedValues;
2434
+ },
2435
+ },
2436
+ ], cssClass: [
2437
+ 'select-alert',
2438
+ interfaceOptions.cssClass,
2439
+ this.multiple ? 'multiple-select-alert' : 'single-select-alert',
2440
+ ] });
2441
+ return overlays.alertController.create(alertOpts);
2442
+ }
2443
+ /**
2444
+ * Close the select interface.
2445
+ */
2446
+ close() {
2447
+ // TODO check !this.overlay || !this.isFocus()
2448
+ if (!this.overlay) {
2449
+ return Promise.resolve(false);
2450
+ }
2451
+ return this.overlay.dismiss();
2452
+ }
2453
+ getLabel() {
2454
+ return helpers.findItemLabel(this.el);
2455
+ }
2456
+ hasValue() {
2457
+ return this.getText() !== '';
2458
+ }
2459
+ get childOpts() {
2460
+ return Array.from(this.el.querySelectorAll('ion-select-option'));
2461
+ }
2462
+ getText() {
2463
+ const selectedText = this.selectedText;
2464
+ if (selectedText != null && selectedText !== '') {
2465
+ return selectedText;
2466
+ }
2467
+ return generateText(this.childOpts, this.value, this.compareWith);
2468
+ }
2469
+ setFocus() {
2470
+ if (this.focusEl) {
2471
+ this.focusEl.focus();
2472
+ }
2473
+ }
2474
+ emitStyle() {
2475
+ this.ionStyle.emit({
2476
+ interactive: true,
2477
+ 'interactive-disabled': this.disabled,
2478
+ select: true,
2479
+ 'select-disabled': this.disabled,
2480
+ 'has-placeholder': this.placeholder !== undefined,
2481
+ 'has-value': this.hasValue(),
2482
+ 'has-focus': this.isExpanded,
2483
+ });
2484
+ }
2485
+ render() {
2486
+ const { disabled, el, inputId, isExpanded, name, placeholder, value } = this;
2487
+ const mode = ionicGlobal.getIonMode(this);
2488
+ const { labelText, labelId } = helpers.getAriaLabel(el, inputId);
2489
+ helpers.renderHiddenInput(true, el, name, parseValue(value), disabled);
2490
+ const displayValue = this.getText();
2491
+ let addPlaceholderClass = false;
2492
+ let selectText = displayValue;
2493
+ if (selectText === '' && placeholder !== undefined) {
2494
+ selectText = placeholder;
2495
+ addPlaceholderClass = true;
2496
+ }
2497
+ const selectTextClasses = {
2498
+ 'select-text': true,
2499
+ 'select-placeholder': addPlaceholderClass,
2500
+ };
2501
+ const textPart = addPlaceholderClass ? 'placeholder' : 'text';
2502
+ // If there is a label then we need to concatenate it with the
2503
+ // current value (or placeholder) and a comma so it separates
2504
+ // nicely when the screen reader announces it, otherwise just
2505
+ // announce the value / placeholder
2506
+ const displayLabel = labelText !== undefined ? (selectText !== '' ? `${selectText}, ${labelText}` : labelText) : selectText;
2507
+ return (index$1.h(index$1.Host, { onClick: this.onClick, role: "button", "aria-haspopup": "listbox", "aria-disabled": disabled ? 'true' : null, "aria-label": displayLabel, class: {
2508
+ [mode]: true,
2509
+ 'in-item': theme.hostContext('ion-item', el),
2510
+ 'select-disabled': disabled,
2511
+ 'select-expanded': isExpanded,
2512
+ } }, index$1.h("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart }, selectText), index$1.h("div", { class: "select-icon", role: "presentation", part: "icon" }, index$1.h("div", { class: "select-icon-inner" })), index$1.h("label", { id: labelId }, displayLabel), index$1.h("button", { type: "button", disabled: disabled, id: inputId, "aria-labelledby": labelId, "aria-haspopup": "listbox", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) })));
2513
+ }
2514
+ get el() { return index$1.getElement(this); }
2515
+ static get watchers() { return {
2516
+ "disabled": ["styleChanged"],
2517
+ "placeholder": ["styleChanged"],
2518
+ "isExpanded": ["styleChanged"],
2519
+ "value": ["valueChanged"]
2520
+ }; }
2521
+ };
2522
+ const isOptionSelected = (currentValue, compareValue, compareWith) => {
2523
+ if (currentValue === undefined) {
2524
+ return false;
2525
+ }
2526
+ if (Array.isArray(currentValue)) {
2527
+ return currentValue.some((val) => compareOptions(val, compareValue, compareWith));
2528
+ }
2529
+ else {
2530
+ return compareOptions(currentValue, compareValue, compareWith);
2531
+ }
2532
+ };
2533
+ const getOptionValue = (el) => {
2534
+ const value = el.value;
2535
+ return value === undefined ? el.textContent || '' : value;
2536
+ };
2537
+ const parseValue = (value) => {
2538
+ if (value == null) {
2539
+ return undefined;
2540
+ }
2541
+ if (Array.isArray(value)) {
2542
+ return value.join(',');
2543
+ }
2544
+ return value.toString();
2545
+ };
2546
+ const compareOptions = (currentValue, compareValue, compareWith) => {
2547
+ if (typeof compareWith === 'function') {
2548
+ return compareWith(currentValue, compareValue);
2549
+ }
2550
+ else if (typeof compareWith === 'string') {
2551
+ return currentValue[compareWith] === compareValue[compareWith];
2552
+ }
2553
+ else {
2554
+ return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;
2555
+ }
2556
+ };
2557
+ const generateText = (opts, value, compareWith) => {
2558
+ if (value === undefined) {
2559
+ return '';
2560
+ }
2561
+ if (Array.isArray(value)) {
2562
+ return value
2563
+ .map((v) => textForValue(opts, v, compareWith))
2564
+ .filter((opt) => opt !== null)
2565
+ .join(', ');
2566
+ }
2567
+ else {
2568
+ return textForValue(opts, value, compareWith) || '';
2569
+ }
2570
+ };
2571
+ const textForValue = (opts, value, compareWith) => {
2572
+ const selectOpt = opts.find((opt) => {
2573
+ return compareOptions(getOptionValue(opt), value, compareWith);
2574
+ });
2575
+ return selectOpt ? selectOpt.textContent : null;
2576
+ };
2577
+ let selectIds = 0;
2578
+ const OPTION_CLASS = 'select-interface-option';
2579
+ Select.style = {
2580
+ ios: selectIosCss,
2581
+ md: selectMdCss
2582
+ };
2583
+
2584
+ const selectOptionCss = ":host{display:none}";
2585
+
2586
+ const SelectOption = class {
2587
+ constructor(hostRef) {
2588
+ index$1.registerInstance(this, hostRef);
2589
+ this.inputId = `ion-selopt-${selectOptionIds++}`;
2590
+ /**
2591
+ * If `true`, the user cannot interact with the select option. This property does not apply when `interface="action-sheet"` as `ion-action-sheet` does not allow for disabled buttons.
2592
+ */
2593
+ this.disabled = false;
2594
+ }
2595
+ render() {
2596
+ return index$1.h(index$1.Host, { role: "option", id: this.inputId, class: ionicGlobal.getIonMode(this) });
2597
+ }
2598
+ get el() { return index$1.getElement(this); }
2599
+ };
2600
+ let selectOptionIds = 0;
2601
+ SelectOption.style = selectOptionCss;
2602
+
2603
+ 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}";
2604
+
2605
+ 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)}";
2606
+
2607
+ const SelectPopover = class {
2608
+ constructor(hostRef) {
2609
+ index$1.registerInstance(this, hostRef);
2610
+ /**
2611
+ * An array of options for the popover
2612
+ */
2613
+ this.options = [];
2614
+ }
2615
+ onSelect(ev) {
2616
+ this.setChecked(ev);
2617
+ this.callOptionHandler(ev);
2618
+ }
2619
+ findOptionFromEvent(ev) {
2620
+ const { options } = this;
2621
+ return options.find((o) => o.value === ev.target.value);
2622
+ }
2623
+ /**
2624
+ * When an option is selected we need to get the value(s)
2625
+ * of the selected option(s) and return it in the option
2626
+ * handler
2627
+ */
2628
+ callOptionHandler(ev) {
2629
+ const option = this.findOptionFromEvent(ev);
2630
+ const values = this.getValues(ev);
2631
+ if (option === null || option === void 0 ? void 0 : option.handler) {
2632
+ overlays.safeCall(option.handler, values);
2633
+ }
2634
+ }
2635
+ /**
2636
+ * This is required when selecting a radio that is already
2637
+ * selected because it will not trigger the ionChange event
2638
+ * but we still want to close the popover
2639
+ */
2640
+ rbClick(ev) {
2641
+ this.callOptionHandler(ev);
2642
+ }
2643
+ setChecked(ev) {
2644
+ const { multiple } = this;
2645
+ const option = this.findOptionFromEvent(ev);
2646
+ // this is a popover with checkboxes (multiple value select)
2647
+ // we need to set the checked value for this option
2648
+ if (multiple && option) {
2649
+ option.checked = ev.detail.checked;
2650
+ }
2651
+ }
2652
+ getValues(ev) {
2653
+ const { multiple, options } = this;
2654
+ if (multiple) {
2655
+ // this is a popover with checkboxes (multiple value select)
2656
+ // return an array of all the checked values
2657
+ return options.filter((o) => o.checked).map((o) => o.value);
2658
+ }
2659
+ // this is a popover with radio buttons (single value select)
2660
+ // return the value that was clicked, otherwise undefined
2661
+ const option = this.findOptionFromEvent(ev);
2662
+ return option ? option.value : undefined;
2663
+ }
2664
+ renderOptions(options) {
2665
+ const { multiple } = this;
2666
+ switch (multiple) {
2667
+ case true:
2668
+ return this.renderCheckboxOptions(options);
2669
+ default:
2670
+ return this.renderRadioOptions(options);
2671
+ }
2672
+ }
2673
+ renderCheckboxOptions(options) {
2674
+ 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))));
2675
+ }
2676
+ renderRadioOptions(options) {
2677
+ const checked = options.filter((o) => o.checked).map((o) => o.value)[0];
2678
+ 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) }))))));
2679
+ }
2680
+ render() {
2681
+ const { header, message, options, subHeader } = this;
2682
+ const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
2683
+ 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 && (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))));
2684
+ }
2685
+ };
2686
+ SelectPopover.style = {
2687
+ ios: selectPopoverIosCss,
2688
+ md: selectPopoverMdCss
2689
+ };
2690
+
2691
+ const textareaIosCss = ".sc-ion-textarea-ios-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-ios-h{background:initial}.ion-color.sc-ion-textarea-ios-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-ios-h,ion-item .sc-ion-textarea-ios-h{align-self:baseline}ion-item.sc-ion-textarea-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-ios-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-ios{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-ios::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-ios{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-ios::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-ios{opacity:0.4}.cloned-input.sc-ion-textarea-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-ios .cloned-input.sc-ion-textarea-ios,[dir=rtl].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios,[dir=rtl] .sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-ios-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-ios-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-ios-h,.item-label-stacked .sc-ion-textarea-ios-h,.item-label-floating.sc-ion-textarea-ios-h,.item-label-floating .sc-ion-textarea-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}";
2692
+
2693
+ const textareaMdCss = ".sc-ion-textarea-md-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-md-h{background:initial}.ion-color.sc-ion-textarea-md-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-md-h,ion-item .sc-ion-textarea-md-h{align-self:baseline}ion-item.sc-ion-textarea-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-md-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-md{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-md::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-md{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-md::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-md{opacity:0.4}.cloned-input.sc-ion-textarea-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-md .cloned-input.sc-ion-textarea-md,[dir=rtl].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md,[dir=rtl] .sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-md-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-md-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:8px;margin-left:0;margin-right:0;margin-top:8px;margin-bottom:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-md-h,.item-label-stacked .sc-ion-textarea-md-h,.item-label-floating.sc-ion-textarea-md-h,.item-label-floating .sc-ion-textarea-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}";
2694
+
2695
+ const Textarea = class {
2696
+ constructor(hostRef) {
2697
+ index$1.registerInstance(this, hostRef);
2698
+ this.ionChange = index$1.createEvent(this, "ionChange", 7);
2699
+ this.ionInput = index$1.createEvent(this, "ionInput", 7);
2700
+ this.ionStyle = index$1.createEvent(this, "ionStyle", 7);
2701
+ this.ionBlur = index$1.createEvent(this, "ionBlur", 7);
2702
+ this.ionFocus = index$1.createEvent(this, "ionFocus", 7);
2703
+ this.inputId = `ion-textarea-${textareaIds++}`;
2704
+ this.didBlurAfterEdit = false;
2705
+ this.inheritedAttributes = {};
2706
+ /**
2707
+ * This is required for a WebKit bug which requires us to
2708
+ * blur and focus an input to properly focus the input in
2709
+ * an item with delegatesFocus. It will no longer be needed
2710
+ * with iOS 14.
2711
+ *
2712
+ * @internal
2713
+ */
2714
+ this.fireFocusEvents = true;
2715
+ this.hasFocus = false;
2716
+ /**
2717
+ * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
2718
+ * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
2719
+ */
2720
+ this.autocapitalize = 'none';
2721
+ /**
2722
+ * This Boolean attribute lets you specify that a form control should have input focus when the page loads.
2723
+ */
2724
+ this.autofocus = false;
2725
+ /**
2726
+ * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
2727
+ */
2728
+ this.clearOnEdit = false;
2729
+ /**
2730
+ * Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
2731
+ */
2732
+ this.debounce = 0;
2733
+ /**
2734
+ * If `true`, the user cannot interact with the textarea.
2735
+ */
2736
+ this.disabled = false;
2737
+ /**
2738
+ * The name of the control, which is submitted with the form data.
2739
+ */
2740
+ this.name = this.inputId;
2741
+ /**
2742
+ * If `true`, the user cannot modify the value.
2743
+ */
2744
+ this.readonly = false;
2745
+ /**
2746
+ * If `true`, the user must fill in a value before submitting a form.
2747
+ */
2748
+ this.required = false;
2749
+ /**
2750
+ * If `true`, the element will have its spelling and grammar checked.
2751
+ */
2752
+ this.spellcheck = false;
2753
+ /**
2754
+ * If `true`, the textarea container will grow and shrink based
2755
+ * on the contents of the textarea.
2756
+ */
2757
+ this.autoGrow = false;
2758
+ /**
2759
+ * The value of the textarea.
2760
+ */
2761
+ this.value = '';
2762
+ this.onInput = (ev) => {
2763
+ if (this.nativeInput) {
2764
+ this.value = this.nativeInput.value;
2765
+ }
2766
+ this.emitStyle();
2767
+ this.ionInput.emit(ev);
2768
+ };
2769
+ this.onFocus = (ev) => {
2770
+ this.hasFocus = true;
2771
+ this.focusChange();
2772
+ if (this.fireFocusEvents) {
2773
+ this.ionFocus.emit(ev);
2774
+ }
2775
+ };
2776
+ this.onBlur = (ev) => {
2777
+ this.hasFocus = false;
2778
+ this.focusChange();
2779
+ if (this.fireFocusEvents) {
2780
+ this.ionBlur.emit(ev);
2781
+ }
2782
+ };
2783
+ this.onKeyDown = () => {
2784
+ this.checkClearOnEdit();
2785
+ };
2786
+ }
2787
+ debounceChanged() {
2788
+ this.ionChange = helpers.debounceEvent(this.ionChange, this.debounce);
2789
+ }
2790
+ disabledChanged() {
2791
+ this.emitStyle();
2792
+ }
2793
+ /**
2794
+ * Update the native input element when the value changes
2795
+ */
2796
+ valueChanged() {
2797
+ const nativeInput = this.nativeInput;
2798
+ const value = this.getValue();
2799
+ if (nativeInput && nativeInput.value !== value) {
2800
+ nativeInput.value = value;
2801
+ }
2802
+ this.runAutoGrow();
2803
+ this.emitStyle();
2804
+ this.ionChange.emit({ value });
2805
+ }
2806
+ connectedCallback() {
2807
+ this.emitStyle();
2808
+ this.debounceChanged();
2809
+ {
2810
+ document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
2811
+ detail: this.el,
2812
+ }));
2813
+ }
2814
+ }
2815
+ disconnectedCallback() {
2816
+ {
2817
+ document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
2818
+ detail: this.el,
2819
+ }));
2820
+ }
2821
+ }
2822
+ componentWillLoad() {
2823
+ this.inheritedAttributes = Object.assign(Object.assign({}, helpers.inheritAriaAttributes(this.el)), helpers.inheritAttributes(this.el, ['title']));
2824
+ }
2825
+ componentDidLoad() {
2826
+ this.runAutoGrow();
2827
+ }
2828
+ /**
2829
+ * Sets focus on the native `textarea` in `ion-textarea`. Use this method instead of the global
2830
+ * `textarea.focus()`.
2831
+ */
2832
+ async setFocus() {
2833
+ if (this.nativeInput) {
2834
+ this.nativeInput.focus();
2835
+ }
2836
+ }
2837
+ /**
2838
+ * Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global
2839
+ * `textarea.blur()`.
2840
+ * @internal
2841
+ */
2842
+ async setBlur() {
2843
+ if (this.nativeInput) {
2844
+ this.nativeInput.blur();
2845
+ }
2846
+ }
2847
+ /**
2848
+ * Returns the native `<textarea>` element used under the hood.
2849
+ */
2850
+ getInputElement() {
2851
+ return Promise.resolve(this.nativeInput);
2852
+ }
2853
+ emitStyle() {
2854
+ this.ionStyle.emit({
2855
+ interactive: true,
2856
+ textarea: true,
2857
+ input: true,
2858
+ 'interactive-disabled': this.disabled,
2859
+ 'has-placeholder': this.placeholder !== undefined,
2860
+ 'has-value': this.hasValue(),
2861
+ 'has-focus': this.hasFocus,
2862
+ });
2863
+ }
2864
+ runAutoGrow() {
2865
+ if (this.nativeInput && this.autoGrow) {
2866
+ index$1.writeTask(() => {
2867
+ var _a;
2868
+ if (this.textareaWrapper) {
2869
+ // Replicated value is an attribute to be used in the stylesheet
2870
+ // to set the inner contents of a pseudo element.
2871
+ this.textareaWrapper.dataset.replicatedValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
2872
+ }
2873
+ });
2874
+ }
2875
+ }
2876
+ /**
2877
+ * Check if we need to clear the text input if clearOnEdit is enabled
2878
+ */
2879
+ checkClearOnEdit() {
2880
+ if (!this.clearOnEdit) {
2881
+ return;
2882
+ }
2883
+ // Did the input value change after it was blurred and edited?
2884
+ if (this.didBlurAfterEdit && this.hasValue()) {
2885
+ // Clear the input
2886
+ this.value = '';
2887
+ }
2888
+ // Reset the flag
2889
+ this.didBlurAfterEdit = false;
2890
+ }
2891
+ focusChange() {
2892
+ // If clearOnEdit is enabled and the input blurred but has a value, set a flag
2893
+ if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
2894
+ this.didBlurAfterEdit = true;
2895
+ }
2896
+ this.emitStyle();
2897
+ }
2898
+ hasValue() {
2899
+ return this.getValue() !== '';
2900
+ }
2901
+ getValue() {
2902
+ return this.value || '';
2903
+ }
2904
+ render() {
2905
+ const mode = ionicGlobal.getIonMode(this);
2906
+ const value = this.getValue();
2907
+ const labelId = this.inputId + '-lbl';
2908
+ const label = helpers.findItemLabel(this.el);
2909
+ if (label) {
2910
+ label.id = labelId;
2911
+ }
2912
+ return (index$1.h(index$1.Host, { "aria-disabled": this.disabled ? 'true' : null, class: theme.createColorClasses(this.color, {
2913
+ [mode]: true,
2914
+ }) }, index$1.h("div", { class: "textarea-wrapper", ref: (el) => (this.textareaWrapper = el) }, index$1.h("textarea", Object.assign({ class: "native-textarea", "aria-labelledby": label ? labelId : null, ref: (el) => (this.nativeInput = el), autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value))));
2915
+ }
2916
+ get el() { return index$1.getElement(this); }
2917
+ static get watchers() { return {
2918
+ "debounce": ["debounceChanged"],
2919
+ "disabled": ["disabledChanged"],
2920
+ "value": ["valueChanged"]
2921
+ }; }
2922
+ };
2923
+ let textareaIds = 0;
2924
+ Textarea.style = {
2925
+ ios: textareaIosCss,
2926
+ md: textareaMdCss
2927
+ };
2928
+
2929
+ exports.ion_action_sheet = ActionSheet;
2930
+ exports.ion_alert = Alert;
2931
+ exports.ion_popover = Popover;
2932
+ exports.ion_select = Select;
2933
+ exports.ion_select_option = SelectOption;
2934
+ exports.ion_select_popover = SelectPopover;
2935
+ exports.ion_textarea = Textarea;