@amwaljs/checkout-button 0.3.1 → 0.3.2

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 (888) hide show
  1. package/README.md +1 -1
  2. package/dist/checkout/checkout.esm.js +1 -1
  3. package/dist/checkout/{p-c03b6161.entry.js → p-00045a8c.entry.js} +1 -1
  4. package/dist/checkout/p-01bbe74f.entry.js +1 -0
  5. package/dist/checkout/p-051412fa.entry.js +1 -0
  6. package/dist/checkout/p-09cbe586.entry.js +4 -0
  7. package/dist/checkout/{p-439ad699.entry.js → p-0a85a01f.entry.js} +2 -2
  8. package/dist/checkout/{p-d5652cd4.entry.js → p-0bbfeb3c.entry.js} +1 -1
  9. package/dist/checkout/{p-4ae1a390.entry.js → p-0d96b482.entry.js} +1 -1
  10. package/dist/checkout/{p-DUa_5Mmb.js → p-0f03cd28.js} +2 -2
  11. package/dist/checkout/p-104d7733.entry.js +1 -0
  12. package/dist/checkout/{p-8036cf49.entry.js → p-10ad151a.entry.js} +5 -5
  13. package/dist/checkout/p-112455b1.js +1 -0
  14. package/dist/checkout/p-11beffea.entry.js +1 -0
  15. package/dist/checkout/p-13245fd4.js +1 -0
  16. package/dist/checkout/p-13741a94.entry.js +1 -0
  17. package/dist/checkout/p-14ea2c82.entry.js +1 -0
  18. package/dist/checkout/p-167dc7a7.entry.js +4 -0
  19. package/dist/checkout/p-1a749b59.entry.js +1 -0
  20. package/dist/checkout/p-1c718939.entry.js +1 -0
  21. package/dist/checkout/{p-11205aeb.entry.js → p-1cbb13f2.entry.js} +1 -1
  22. package/dist/checkout/{p-46ff73b3.entry.js → p-20df5234.entry.js} +1 -1
  23. package/dist/checkout/p-24068b1c.entry.js +1 -0
  24. package/dist/checkout/{p-7006753a.entry.js → p-28ccecc7.entry.js} +2 -2
  25. package/dist/checkout/p-361649c3.js +4 -0
  26. package/dist/{components/p-DoR35tr_.js → checkout/p-39ad94cf.js} +2 -2
  27. package/dist/checkout/p-3b75b22a.js +5 -0
  28. package/dist/checkout/p-3b80783d.js +8 -0
  29. package/dist/checkout/p-3d3eefc3.js +4 -0
  30. package/dist/checkout/p-3e1e3453.js +4 -0
  31. package/dist/checkout/p-3e681e57.js +4 -0
  32. package/dist/checkout/{p-bf933eb6.entry.js → p-3e8da476.entry.js} +1 -1
  33. package/dist/checkout/{p-1dc08181.entry.js → p-4028c0d2.entry.js} +1 -1
  34. package/dist/checkout/p-44c91c42.entry.js +1 -0
  35. package/dist/checkout/p-464f5a60.entry.js +1 -0
  36. package/dist/checkout/p-46b7ee7f.entry.js +1 -0
  37. package/dist/checkout/p-48784250.entry.js +1 -0
  38. package/dist/{components/p-wiOwkFtc.js → checkout/p-4be20bf2.js} +1 -1
  39. package/dist/{components/p-Dl_WhQZu.js → checkout/p-4f78d3a0.js} +2 -2
  40. package/dist/checkout/{p-4da4ecc4.entry.js → p-529bce3f.entry.js} +1 -1
  41. package/dist/checkout/p-536a0294.js +4 -0
  42. package/dist/checkout/{p-eae2d3f2.entry.js → p-5eecd5ef.entry.js} +1 -1
  43. package/dist/checkout/p-64257c8d.entry.js +1 -0
  44. package/dist/checkout/{p-5903b3af.entry.js → p-64bd1dd3.entry.js} +1 -1
  45. package/dist/checkout/{p-9b7d7231.entry.js → p-68a4caba.entry.js} +1 -1
  46. package/dist/checkout/{p-978b3762.entry.js → p-69242ed6.entry.js} +1 -1
  47. package/dist/checkout/{p-62b7c8b0.entry.js → p-6d886d7e.entry.js} +1 -1
  48. package/dist/checkout/{p-ofaUly0p.js → p-6fa979e3.js} +2 -2
  49. package/dist/checkout/p-6fb474f3.entry.js +1 -0
  50. package/dist/checkout/p-77104220.js +7 -0
  51. package/dist/checkout/{p-aba43d04.entry.js → p-79ec3e4b.entry.js} +1 -1
  52. package/dist/checkout/{p-cd2c344b.entry.js → p-7b51bf67.entry.js} +2 -2
  53. package/dist/checkout/p-7f0004c9.js +4 -0
  54. package/dist/checkout/p-7fe50ab4.entry.js +1 -0
  55. package/dist/checkout/p-880b451c.entry.js +4 -0
  56. package/dist/checkout/p-886dad62.entry.js +1 -0
  57. package/dist/checkout/p-886e8746.entry.js +1 -0
  58. package/dist/checkout/p-88abdf59.js +4 -0
  59. package/dist/checkout/{p-f845e91b.entry.js → p-8a97a411.entry.js} +1 -1
  60. package/dist/checkout/p-8af3c6cc.entry.js +1 -0
  61. package/dist/checkout/{p-8b015c21.entry.js → p-8c022f5d.entry.js} +1 -1
  62. package/dist/checkout/{p-56e307eb.entry.js → p-91855eae.entry.js} +1 -1
  63. package/dist/checkout/{p-ca257d45.entry.js → p-9185e55b.entry.js} +1 -1
  64. package/dist/checkout/{p-4b34896c.entry.js → p-926eda98.entry.js} +1 -1
  65. package/dist/checkout/p-93e5b313.entry.js +4 -0
  66. package/dist/checkout/{p-4a86b731.entry.js → p-97024acb.entry.js} +1 -1
  67. package/dist/checkout/p-99e447f9.js +1 -0
  68. package/dist/{components/p-BgOwfqIY.js → checkout/p-9b519de5.js} +2 -2
  69. package/dist/checkout/{p-b8245f6a.entry.js → p-9b65a6e5.entry.js} +1 -1
  70. package/dist/checkout/{p-53ae9dd0.entry.js → p-9cc1fdfb.entry.js} +1 -1
  71. package/dist/checkout/{p-8fc1287a.entry.js → p-9f26fb71.entry.js} +1 -1
  72. package/dist/checkout/p-9f41a631.entry.js +1 -0
  73. package/dist/checkout/{p-5f005b5e.entry.js → p-a2ce8858.entry.js} +1 -1
  74. package/dist/checkout/{p-e4d0702d.entry.js → p-a3fca65c.entry.js} +1 -1
  75. package/dist/checkout/{p-d370e756.entry.js → p-a6056eb1.entry.js} +2 -2
  76. package/dist/checkout/{p-c929d6ea.entry.js → p-a7b2cbb9.entry.js} +1 -1
  77. package/dist/{components/p-Dwo-QLgs.js → checkout/p-ab16e6ce.js} +1 -1
  78. package/dist/checkout/{p-63db3363.entry.js → p-ab9a18c4.entry.js} +1 -1
  79. package/dist/checkout/p-b038db20.js +4 -0
  80. package/dist/checkout/p-b4ad8642.entry.js +1 -0
  81. package/dist/checkout/p-b4cf78ad.entry.js +1 -0
  82. package/dist/checkout/p-b7be2ec0.js +4 -0
  83. package/dist/checkout/p-b84d9e44.js +4 -0
  84. package/dist/{components/p-CwRU9ccI.js → checkout/p-b8fdd517.js} +1 -1
  85. package/dist/checkout/{p-d799009b.entry.js → p-b9d8ab12.entry.js} +1 -1
  86. package/dist/checkout/p-bb1f698e.js +4 -0
  87. package/dist/checkout/p-bd17be25.js +4 -0
  88. package/dist/checkout/p-bd4df0bc.entry.js +1 -0
  89. package/dist/checkout/p-c152bdea.js +4 -0
  90. package/dist/checkout/{p-f22v7XAM.js → p-c30e2b28.js} +2 -2
  91. package/dist/checkout/{p-c2296aa1.entry.js → p-c61a3d5d.entry.js} +1 -1
  92. package/dist/checkout/p-c6ee4bb6.entry.js +1 -0
  93. package/dist/checkout/p-c771a565.entry.js +1 -0
  94. package/dist/checkout/{p-3c9a8bee.entry.js → p-c82b2823.entry.js} +1 -1
  95. package/dist/checkout/p-c8f7d1b5.entry.js +1 -0
  96. package/dist/checkout/p-ceef30cd.entry.js +1 -0
  97. package/dist/checkout/p-d5733333.entry.js +1 -0
  98. package/dist/checkout/p-d5bba69c.entry.js +1 -0
  99. package/dist/checkout/p-d60b2328.js +4 -0
  100. package/dist/checkout/p-d60e05e2.entry.js +1 -0
  101. package/dist/checkout/p-d6b04157.entry.js +1 -0
  102. package/dist/checkout/p-d7a430bf.js +2 -0
  103. package/dist/checkout/{p-B3WORC1a.js → p-d839c693.js} +1 -1
  104. package/dist/checkout/{p-141f2eab.entry.js → p-d9dfb3ae.entry.js} +3 -3
  105. package/dist/checkout/p-dc51d318.js +5 -0
  106. package/dist/checkout/p-ddbe30b8.entry.js +1 -0
  107. package/dist/checkout/p-de418dd1.entry.js +1 -0
  108. package/dist/checkout/{p-b4000357.entry.js → p-defa5f72.entry.js} +2 -2
  109. package/dist/checkout/{p-b90c064e.entry.js → p-df0fa5e1.entry.js} +2 -2
  110. package/dist/checkout/{p-c8740acc.entry.js → p-e0f073f1.entry.js} +3 -3
  111. package/dist/checkout/p-e237d611.entry.js +1 -0
  112. package/dist/checkout/p-ea71fb8d.entry.js +1 -0
  113. package/dist/checkout/{p-95563c4c.entry.js → p-eda93a0b.entry.js} +1 -1
  114. package/dist/checkout/p-eee05053.entry.js +1 -0
  115. package/dist/checkout/{p-95431a73.entry.js → p-f8460dc4.entry.js} +1 -1
  116. package/dist/checkout/p-f875507d.entry.js +1 -0
  117. package/dist/checkout/p-faf06441.js +4 -0
  118. package/dist/checkout/p-fb147065.entry.js +1 -0
  119. package/dist/checkout/{p-af32124b.entry.js → p-fb45cdd1.entry.js} +1 -1
  120. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  121. package/dist/cjs/amwal-checkout-button_5.cjs.entry.js +1298 -2881
  122. package/dist/cjs/amwal-installments-guide.cjs.entry.js +42 -43
  123. package/dist/cjs/amwal-pos.cjs.entry.js +3180 -3452
  124. package/dist/cjs/amwal-widget-modal.cjs.entry.js +162 -175
  125. package/dist/cjs/amwal-widget.cjs.entry.js +314 -343
  126. package/dist/cjs/{animation-BhN-MT4J.js → animation-26241cb2.js} +2 -2
  127. package/dist/cjs/{app-globals-NtXImkuk.js → app-globals-42a13029.js} +1 -1
  128. package/dist/cjs/{ar-CbT6TM-Q.js → ar-3a6829a4.js} +10 -4
  129. package/dist/cjs/{capacitor-CqhugS19.js → capacitor-a9365f60.js} +1 -1
  130. package/dist/cjs/checkout.cjs.js +19 -16
  131. package/dist/cjs/{data-UgkxeXMB.js → data-19081291.js} +1 -1
  132. package/dist/cjs/{form-controller-DRf0gBOg.js → form-controller-3ffb27b1.js} +1 -1
  133. package/dist/cjs/{framework-delegate-D-6PUvOi.js → framework-delegate-ab2cc190.js} +1 -1
  134. package/dist/cjs/{gesture-controller-IMq9Cgi2.js → gesture-controller-b1c0efac.js} +1 -1
  135. package/dist/cjs/{haptic-CC9tl6g8.js → haptic-80174512.js} +1 -1
  136. package/dist/cjs/{hardware-back-button-C2D2eOk8.js → hardware-back-button-ddfefd22.js} +3 -3
  137. package/dist/cjs/{helpers-B4vhh9gt.js → helpers-72ba682d.js} +4 -1
  138. package/dist/cjs/i18n-18ad02d5.js +13 -0
  139. package/dist/cjs/{index-CKcQE8Zg.js → index-0d0b84fb.js} +4 -3
  140. package/dist/cjs/{index-6eOg4xTk.js → index-2602a653.js} +0 -1
  141. package/dist/cjs/{index-DZA7ogU0.js → index-2cd1a895.js} +4 -4
  142. package/dist/cjs/index-7522b3a9.js +2256 -0
  143. package/dist/cjs/{index-bc_r9XRf.js → index-9b7d2c31.js} +9 -9
  144. package/dist/cjs/{index-q1ImtF5k.js → index-ce06e6a3.js} +3 -3
  145. package/dist/cjs/{index-XMjUjboS.js → index-da554121.js} +3 -3
  146. package/dist/cjs/{input-shims-CCRbO2DB.js → input-shims-1a8ed779.js} +6 -6
  147. package/dist/cjs/{input.utils-CyVgmmWQ.js → input.utils-67143876.js} +3 -3
  148. package/dist/cjs/ion-accordion-group.cjs.entry.js +199 -203
  149. package/dist/cjs/ion-accordion.cjs.entry.js +305 -305
  150. package/dist/cjs/ion-action-sheet_3.cjs.entry.js +695 -705
  151. package/dist/cjs/ion-app.cjs.entry.js +95 -93
  152. package/dist/cjs/ion-avatar.cjs.entry.js +14 -12
  153. package/dist/cjs/ion-back-button.cjs.entry.js +78 -76
  154. package/dist/cjs/ion-backdrop.cjs.entry.js +44 -42
  155. package/dist/cjs/ion-badge.cjs.entry.js +19 -17
  156. package/dist/cjs/ion-breadcrumb.cjs.entry.js +86 -84
  157. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +120 -124
  158. package/dist/cjs/ion-buttons_3.cjs.entry.js +822 -822
  159. package/dist/cjs/ion-card-content.cjs.entry.js +19 -17
  160. package/dist/cjs/ion-card-header.cjs.entry.js +22 -20
  161. package/dist/cjs/ion-card-subtitle.cjs.entry.js +20 -18
  162. package/dist/cjs/ion-card-title.cjs.entry.js +20 -18
  163. package/dist/cjs/ion-card.cjs.entry.js +55 -53
  164. package/dist/cjs/ion-checkbox_7.cjs.entry.js +862 -882
  165. package/dist/cjs/ion-chip.cjs.entry.js +24 -22
  166. package/dist/cjs/ion-col.cjs.entry.js +110 -108
  167. package/dist/cjs/ion-content.cjs.entry.js +376 -374
  168. package/dist/cjs/ion-datetime-button.cjs.entry.js +330 -328
  169. package/dist/cjs/ion-datetime.cjs.entry.js +1547 -1567
  170. package/dist/cjs/ion-fab-button.cjs.entry.js +78 -76
  171. package/dist/cjs/ion-fab-list.cjs.entry.js +31 -31
  172. package/dist/cjs/ion-fab.cjs.entry.js +58 -58
  173. package/dist/cjs/ion-footer.cjs.entry.js +94 -92
  174. package/dist/cjs/ion-grid.cjs.entry.js +17 -15
  175. package/dist/cjs/ion-header.cjs.entry.js +143 -141
  176. package/dist/cjs/ion-icon.cjs.entry.js +104 -112
  177. package/dist/cjs/ion-img.cjs.entry.js +83 -83
  178. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +34 -32
  179. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +174 -176
  180. package/dist/cjs/ion-input.cjs.entry.js +447 -453
  181. package/dist/cjs/ion-item-divider.cjs.entry.js +23 -21
  182. package/dist/cjs/ion-item-group.cjs.entry.js +20 -18
  183. package/dist/cjs/ion-item-option.cjs.entry.js +45 -43
  184. package/dist/cjs/ion-item-options.cjs.entry.js +40 -38
  185. package/dist/cjs/ion-item-sliding.cjs.entry.js +391 -391
  186. package/dist/cjs/ion-loading.cjs.entry.js +162 -164
  187. package/dist/cjs/ion-menu-button.cjs.entry.js +60 -58
  188. package/dist/cjs/ion-menu-toggle.cjs.entry.js +36 -34
  189. package/dist/cjs/ion-menu.cjs.entry.js +606 -612
  190. package/dist/cjs/ion-modal.cjs.entry.js +551 -553
  191. package/dist/cjs/ion-nav-link.cjs.entry.js +17 -15
  192. package/dist/cjs/ion-nav.cjs.entry.js +823 -825
  193. package/dist/cjs/ion-note.cjs.entry.js +19 -17
  194. package/dist/cjs/ion-picker-column.cjs.entry.js +327 -327
  195. package/dist/cjs/ion-picker.cjs.entry.js +198 -200
  196. package/dist/cjs/ion-popover.cjs.entry.js +326 -330
  197. package/dist/cjs/ion-progress-bar.cjs.entry.js +44 -42
  198. package/dist/cjs/ion-range.cjs.entry.js +644 -654
  199. package/dist/cjs/ion-refresher-content.cjs.entry.js +53 -51
  200. package/dist/cjs/ion-refresher.cjs.entry.js +586 -586
  201. package/dist/cjs/ion-reorder-group.cjs.entry.js +252 -252
  202. package/dist/cjs/ion-reorder.cjs.entry.js +26 -24
  203. package/dist/cjs/ion-route-redirect.cjs.entry.js +19 -21
  204. package/dist/cjs/ion-route.cjs.entry.js +37 -41
  205. package/dist/cjs/ion-router-link.cjs.entry.js +31 -29
  206. package/dist/cjs/ion-router-outlet.cjs.entry.js +178 -178
  207. package/dist/cjs/ion-router.cjs.entry.js +266 -264
  208. package/dist/cjs/ion-row.cjs.entry.js +12 -10
  209. package/dist/cjs/ion-searchbar.cjs.entry.js +388 -396
  210. package/dist/cjs/ion-segment-button.cjs.entry.js +96 -96
  211. package/dist/cjs/ion-segment.cjs.entry.js +414 -420
  212. package/dist/cjs/ion-select-option.cjs.entry.js +16 -14
  213. package/dist/cjs/ion-select.cjs.entry.js +693 -699
  214. package/dist/cjs/ion-skeleton-text.cjs.entry.js +35 -33
  215. package/dist/cjs/ion-spinner.cjs.entry.js +50 -48
  216. package/dist/cjs/ion-split-pane.cjs.entry.js +120 -124
  217. package/dist/cjs/ion-tab-bar.cjs.entry.js +66 -66
  218. package/dist/cjs/ion-tab-button.cjs.entry.js +82 -80
  219. package/dist/cjs/ion-tab.cjs.entry.js +50 -50
  220. package/dist/cjs/ion-tabs.cjs.entry.js +134 -132
  221. package/dist/cjs/ion-textarea.cjs.entry.js +396 -400
  222. package/dist/cjs/ion-thumbnail.cjs.entry.js +12 -10
  223. package/dist/cjs/ion-title.cjs.entry.js +43 -43
  224. package/dist/cjs/ion-toast.cjs.entry.js +371 -375
  225. package/dist/cjs/ion-toggle.cjs.entry.js +230 -230
  226. package/dist/cjs/ion-toolbar.cjs.entry.js +61 -59
  227. package/dist/cjs/{ionic-global-DRLi5Iq3.js → ionic-global-3915f1f1.js} +55 -58
  228. package/dist/cjs/{ios.transition-D4vyO_a_.js → ios.transition-b9c0b967.js} +5 -5
  229. package/dist/cjs/{keyboard-iyHR2ZF4.js → keyboard-5d4b83b3.js} +3 -3
  230. package/dist/cjs/{keyboard-DuKzsHsS.js → keyboard-bc8ebbf7.js} +1 -1
  231. package/dist/cjs/{keyboard-controller-rH21qC_2.js → keyboard-controller-c6633754.js} +2 -2
  232. package/dist/cjs/loader.cjs.js +19 -8
  233. package/dist/cjs/{md.transition-Dkxy3kpE.js → md.transition-830acbb7.js} +5 -5
  234. package/dist/cjs/{menu-toggle-util-CmPuayU0.js → menu-toggle-util-315c26b3.js} +1 -1
  235. package/dist/cjs/{notch-controller-Dtpow1eD.js → notch-controller-dcf09601.js} +2 -2
  236. package/dist/cjs/{overlays-Bc8tk6t5.js → overlays-08819e3f.js} +6 -6
  237. package/dist/cjs/{refresher.utils-CPl6gciv.js → refresher.utils-e41509f7.js} +3 -3
  238. package/dist/cjs/{status-tap-XtIhF72O.js → status-tap-ec021cb4.js} +4 -4
  239. package/dist/cjs/{swipe-back-C9j0kufI.js → swipe-back-3d3a5129.js} +4 -4
  240. package/dist/collection/collection-manifest.json +8 -8
  241. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.js +1714 -1888
  242. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.stories.js +84 -84
  243. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.js +75 -80
  244. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.stories.js +25 -25
  245. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.js +506 -569
  246. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.stories.js +80 -80
  247. package/dist/collection/components/amwal-pos/amwal-pos.js +1022 -1094
  248. package/dist/collection/components/amwal-pos/amwal-pos.stories.js +209 -209
  249. package/dist/collection/components/amwal-widget/amwal-widget-modal.js +326 -350
  250. package/dist/collection/components/amwal-widget/amwal-widget.js +673 -736
  251. package/dist/collection/components/amwal-widget/amwal-widget.stories.js +184 -184
  252. package/dist/collection/lang/i18n.js +7 -7
  253. package/dist/components/amwal-checkout-button.d.ts +2 -2
  254. package/dist/components/amwal-checkout-button.js +3811 -1
  255. package/dist/components/amwal-installments-guide.d.ts +2 -2
  256. package/dist/components/amwal-installments-guide.js +75 -1
  257. package/dist/components/amwal-installments-timeline.d.ts +2 -2
  258. package/dist/components/amwal-installments-timeline.js +6 -1
  259. package/dist/components/amwal-pos.d.ts +2 -2
  260. package/dist/components/amwal-pos.js +3391 -1
  261. package/dist/components/amwal-widget-modal.d.ts +2 -2
  262. package/dist/components/amwal-widget-modal.js +6 -1
  263. package/dist/components/amwal-widget.d.ts +2 -2
  264. package/dist/components/amwal-widget.js +389 -1
  265. package/dist/components/index.d.ts +0 -6
  266. package/dist/components/index.js +6 -1
  267. package/dist/components/ion-accordion-group.js +248 -1
  268. package/dist/components/ion-accordion.js +353 -1
  269. package/dist/components/ion-action-sheet.js +6 -1
  270. package/dist/components/ion-alert.js +6 -1
  271. package/dist/components/ion-app.js +125 -1
  272. package/dist/components/ion-avatar.js +39 -1
  273. package/dist/components/ion-back-button.js +127 -1
  274. package/dist/components/ion-backdrop.js +6 -1
  275. package/dist/components/ion-badge.js +46 -1
  276. package/dist/components/ion-breadcrumb.js +131 -1
  277. package/dist/components/ion-breadcrumbs.js +152 -1
  278. package/dist/components/ion-button.js +6 -1
  279. package/dist/components/ion-buttons.js +6 -1
  280. package/dist/components/ion-card-content.js +43 -1
  281. package/dist/components/ion-card-header.js +50 -1
  282. package/dist/components/ion-card-subtitle.js +47 -1
  283. package/dist/components/ion-card-title.js +47 -1
  284. package/dist/components/ion-card.js +98 -1
  285. package/dist/components/ion-checkbox.js +6 -1
  286. package/dist/components/ion-chip.js +59 -1
  287. package/dist/components/ion-col.js +186 -2
  288. package/dist/components/ion-content.js +440 -1
  289. package/dist/components/ion-datetime-button.js +378 -1
  290. package/dist/components/ion-datetime.js +1961 -2
  291. package/dist/components/ion-fab-button.js +130 -1
  292. package/dist/components/ion-fab-list.js +56 -1
  293. package/dist/components/ion-fab.js +90 -1
  294. package/dist/components/ion-footer.js +152 -2
  295. package/dist/components/ion-grid.js +41 -1
  296. package/dist/components/ion-header.js +356 -2
  297. package/dist/components/ion-icon.js +6 -1
  298. package/dist/components/ion-img.js +124 -1
  299. package/dist/components/ion-infinite-scroll-content.js +69 -1
  300. package/dist/components/ion-infinite-scroll.js +209 -1
  301. package/dist/components/ion-input.js +564 -1
  302. package/dist/components/ion-item-divider.js +51 -1
  303. package/dist/components/ion-item-group.js +44 -1
  304. package/dist/components/ion-item-option.js +85 -1
  305. package/dist/components/ion-item-options.js +67 -1
  306. package/dist/components/ion-item-sliding.js +449 -1
  307. package/dist/components/ion-item.js +6 -1
  308. package/dist/components/ion-label.js +6 -1
  309. package/dist/components/ion-list-header.js +6 -1
  310. package/dist/components/ion-list.js +6 -1
  311. package/dist/components/ion-loading.js +325 -3
  312. package/dist/components/ion-menu-button.js +100 -1
  313. package/dist/components/ion-menu-toggle.js +57 -1
  314. package/dist/components/ion-menu.js +679 -1
  315. package/dist/components/ion-modal.js +1775 -3
  316. package/dist/components/ion-nav-link.js +63 -2
  317. package/dist/components/ion-nav.js +945 -2
  318. package/dist/components/ion-note.js +6 -1
  319. package/dist/components/ion-picker-column-internal.js +6 -1
  320. package/dist/components/ion-picker-column.js +6 -1
  321. package/dist/components/ion-picker-internal.js +6 -1
  322. package/dist/components/ion-picker.js +317 -3
  323. package/dist/components/ion-popover.js +6 -1
  324. package/dist/components/ion-progress-bar.js +79 -1
  325. package/dist/components/ion-radio-group.js +6 -1
  326. package/dist/components/ion-radio.js +6 -1
  327. package/dist/components/ion-range.js +778 -2
  328. package/dist/components/ion-refresher-content.js +90 -1
  329. package/dist/components/ion-refresher.js +652 -1
  330. package/dist/components/ion-reorder-group.js +300 -1
  331. package/dist/components/ion-reorder.js +58 -1
  332. package/dist/components/ion-ripple-effect.js +6 -1
  333. package/dist/components/ion-route-redirect.js +42 -1
  334. package/dist/components/ion-route.js +66 -1
  335. package/dist/components/ion-router-link.js +60 -1
  336. package/dist/components/ion-router-outlet.js +219 -1
  337. package/dist/components/ion-router.js +833 -3
  338. package/dist/components/ion-row.js +34 -1
  339. package/dist/components/ion-searchbar.js +472 -1
  340. package/dist/components/ion-segment-button.js +139 -1
  341. package/dist/components/ion-segment.js +472 -1
  342. package/dist/components/ion-select-option.js +42 -1
  343. package/dist/components/ion-select-popover.js +6 -1
  344. package/dist/components/ion-select.js +864 -1
  345. package/dist/components/ion-skeleton-text.js +59 -1
  346. package/dist/components/ion-spinner.js +6 -1
  347. package/dist/components/ion-split-pane.js +166 -1
  348. package/dist/components/ion-tab-bar.js +95 -1
  349. package/dist/components/ion-tab-button.js +125 -1
  350. package/dist/components/ion-tab.js +80 -1
  351. package/dist/components/ion-tabs.js +176 -1
  352. package/dist/components/ion-text.js +6 -1
  353. package/dist/components/ion-textarea.js +496 -1
  354. package/dist/components/ion-thumbnail.js +34 -1
  355. package/dist/components/ion-title.js +71 -1
  356. package/dist/components/ion-toast.js +914 -3
  357. package/dist/components/ion-toggle.js +282 -1
  358. package/dist/components/ion-toolbar.js +91 -1
  359. package/dist/components/p-01b49f83.js +269 -0
  360. package/dist/{esm/ios.transition-DMsViooj.js → components/p-02b77441.js} +2 -5
  361. package/dist/components/p-02bc6b21.js +203 -0
  362. package/dist/components/p-031ed92d.js +389 -0
  363. package/dist/components/p-03803c7d.js +369 -0
  364. package/dist/components/p-089e034e.js +234 -0
  365. package/dist/components/p-0dc7a5ff.js +512 -0
  366. package/dist/components/p-110f8490.js +566 -0
  367. package/dist/components/p-112455b1.js +17 -0
  368. package/dist/{esm/index-BMJhFU53.js → components/p-1596e301.js} +4 -4
  369. package/dist/components/p-1785e30a.js +318 -0
  370. package/dist/{esm/helpers-C6kqtbmV.js → components/p-2bb89b46.js} +5 -2
  371. package/dist/components/p-2d7d745d.js +224 -0
  372. package/dist/components/p-2fc99fef.js +262 -0
  373. package/dist/{esm/input-shims-DSFPFhb7.js → components/p-3296ebd9.js} +4 -6
  374. package/dist/{esm/data-Cl-_yBA0.js → components/p-39ad94cf.js} +2 -2
  375. package/dist/{esm/capacitor-CG3xQUND.js → components/p-3d3eefc3.js} +1 -1
  376. package/dist/{esm/form-controller-xetTxjL6.js → components/p-3e1d2896.js} +1 -1
  377. package/dist/{esm/keyboard-controller-CqGCg8tB.js → components/p-3e1e3453.js} +2 -2
  378. package/dist/{esm/md.transition-BQT2r4ED.js → components/p-503328f2.js} +2 -5
  379. package/dist/components/p-51c44f42.js +98 -0
  380. package/dist/components/p-5280b372.js +42 -0
  381. package/dist/{esm/index-DuUXGZp2.js → components/p-53e2dbe4.js} +3 -3
  382. package/dist/components/p-5441c730.js +851 -0
  383. package/dist/{esm/refresher.utils-D4tPnZsM.js → components/p-74e68924.js} +4 -4
  384. package/dist/{esm/framework-delegate-D_uGiYYw.js → components/p-76525f0f.js} +1 -1
  385. package/dist/{esm/index-CcopIPA0.js → components/p-77104220.js} +6 -4
  386. package/dist/components/p-77ccb793.js +185 -0
  387. package/dist/components/p-83e529db.js +380 -0
  388. package/dist/{esm/animation-DRf3dwMu.js → components/p-89c4c5cb.js} +2 -2
  389. package/dist/components/p-8b3d1e06.js +67 -0
  390. package/dist/components/p-901c16c5.js +210 -0
  391. package/dist/components/p-93e2a608.js +374 -0
  392. package/dist/components/p-95c79593.js +43 -0
  393. package/dist/components/p-96073863.js +82 -0
  394. package/dist/components/p-99e447f9.js +13 -0
  395. package/dist/{esm/keyboard-DgiyREKb.js → components/p-9b519de5.js} +1 -1
  396. package/dist/{esm/input.utils-BuIvhxo3.js → components/p-9d350d61.js} +3 -3
  397. package/dist/{esm/notch-controller-CQeDnZLe.js → components/p-9df67c24.js} +2 -2
  398. package/dist/components/p-a0e691dd.js +39 -0
  399. package/dist/components/p-ab10d1ae.js +47 -0
  400. package/dist/components/p-abc01c5d.js +194 -0
  401. package/dist/components/p-abd248d1.js +196 -0
  402. package/dist/{esm/haptic-D5jGzBs8.js → components/p-af073aaf.js} +2 -2
  403. package/dist/{esm/swipe-back-DE05lWQD.js → components/p-b32529b9.js} +3 -4
  404. package/dist/{esm/index-C75BfBAE.js → components/p-b8fdd517.js} +1 -2
  405. package/dist/components/p-cebc113f.js +38 -0
  406. package/dist/components/p-d25fd077.js +331 -0
  407. package/dist/{esm/menu-toggle-util-wdO31cdC.js → components/p-d3596f64.js} +1 -1
  408. package/dist/{esm/keyboard-DcbqYXj5.js → components/p-d60b2328.js} +1 -3
  409. package/dist/components/p-d69dc32f.js +97 -0
  410. package/dist/{esm/hardware-back-button-CzxcJiYO.js → components/p-d72e8d7b.js} +2 -3
  411. package/dist/{esm/ar-B3WORC1a.js → components/p-d839c693.js} +12 -5
  412. package/dist/{esm/index-D8d_89Nl.js → components/p-e187a77c.js} +1 -1
  413. package/dist/components/p-e65ea9fb.js +1379 -0
  414. package/dist/components/p-ec0e3f3f.js +2040 -0
  415. package/dist/components/p-ecb4db1c.js +64 -0
  416. package/dist/{esm/gesture-controller-CukVBo5-.js → components/p-f728a68f.js} +1 -1
  417. package/dist/components/p-f7e3c502.js +73 -0
  418. package/dist/components/p-fe463a42.js +272 -0
  419. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  420. package/dist/esm/amwal-checkout-button_5.entry.js +1296 -2881
  421. package/dist/esm/amwal-installments-guide.entry.js +40 -43
  422. package/dist/esm/amwal-pos.entry.js +3178 -3452
  423. package/dist/esm/amwal-widget-modal.entry.js +160 -175
  424. package/dist/esm/amwal-widget.entry.js +312 -343
  425. package/dist/esm/animation-a6d5c3b1.js +1063 -0
  426. package/dist/esm/{app-globals-BHnkZZiH.js → app-globals-c817b28b.js} +1 -1
  427. package/dist/esm/ar-7d2629bf.js +51 -0
  428. package/dist/esm/capacitor-ba4337da.js +13 -0
  429. package/dist/esm/checkout.js +18 -16
  430. package/dist/esm/config-8e06237c.js +171 -0
  431. package/dist/esm/cubic-bezier-874f336d.js +90 -0
  432. package/dist/esm/data-8916315d.js +1628 -0
  433. package/dist/esm/dir-1d4aa386.js +18 -0
  434. package/dist/esm/focus-visible-32968d3d.js +75 -0
  435. package/dist/esm/form-controller-b1aa7393.js +64 -0
  436. package/dist/esm/framework-delegate-de1aa369.js +140 -0
  437. package/dist/esm/gesture-controller-58ffa500.js +195 -0
  438. package/dist/esm/haptic-4d4d8eb1.js +206 -0
  439. package/dist/esm/hardware-back-button-f93acff0.js +116 -0
  440. package/dist/esm/helpers-f0dcbd72.js +418 -0
  441. package/dist/esm/i18n-53f85411.js +13 -0
  442. package/dist/esm/{index-CNcx43L8.js → index-0b560278.js} +4 -4
  443. package/dist/esm/index-5894dd63.js +196 -0
  444. package/dist/esm/{index-DUF6JAQL.js → index-5a126e54.js} +6 -6
  445. package/dist/esm/index-5e663431.js +128 -0
  446. package/dist/esm/index-8cc94b11.js +2219 -0
  447. package/dist/esm/index-afdf867c.js +26 -0
  448. package/dist/esm/index-d9b41a43.js +34 -0
  449. package/dist/esm/index-f6dce931.js +466 -0
  450. package/dist/esm/index-fb97e55c.js +7 -0
  451. package/dist/esm/input-shims-75d4750d.js +617 -0
  452. package/dist/esm/input.utils-79bde07f.js +138 -0
  453. package/dist/esm/ion-accordion-group.entry.js +197 -203
  454. package/dist/esm/ion-accordion.entry.js +303 -305
  455. package/dist/esm/ion-action-sheet_3.entry.js +693 -705
  456. package/dist/esm/ion-app.entry.js +93 -93
  457. package/dist/esm/ion-avatar.entry.js +12 -12
  458. package/dist/esm/ion-back-button.entry.js +76 -76
  459. package/dist/esm/ion-backdrop.entry.js +42 -42
  460. package/dist/esm/ion-badge.entry.js +17 -17
  461. package/dist/esm/ion-breadcrumb.entry.js +84 -84
  462. package/dist/esm/ion-breadcrumbs.entry.js +118 -124
  463. package/dist/esm/ion-buttons_3.entry.js +820 -822
  464. package/dist/esm/ion-card-content.entry.js +17 -17
  465. package/dist/esm/ion-card-header.entry.js +20 -20
  466. package/dist/esm/ion-card-subtitle.entry.js +18 -18
  467. package/dist/esm/ion-card-title.entry.js +18 -18
  468. package/dist/esm/ion-card.entry.js +53 -53
  469. package/dist/esm/ion-checkbox_7.entry.js +860 -882
  470. package/dist/esm/ion-chip.entry.js +22 -22
  471. package/dist/esm/ion-col.entry.js +108 -108
  472. package/dist/esm/ion-content.entry.js +374 -374
  473. package/dist/esm/ion-datetime-button.entry.js +328 -328
  474. package/dist/esm/ion-datetime.entry.js +1545 -1567
  475. package/dist/esm/ion-fab-button.entry.js +76 -76
  476. package/dist/esm/ion-fab-list.entry.js +29 -31
  477. package/dist/esm/ion-fab.entry.js +56 -58
  478. package/dist/esm/ion-footer.entry.js +92 -92
  479. package/dist/esm/ion-grid.entry.js +15 -15
  480. package/dist/esm/ion-header.entry.js +141 -141
  481. package/dist/esm/ion-icon.entry.js +102 -112
  482. package/dist/esm/ion-img.entry.js +81 -83
  483. package/dist/esm/ion-infinite-scroll-content.entry.js +32 -32
  484. package/dist/esm/ion-infinite-scroll.entry.js +172 -176
  485. package/dist/esm/ion-input.entry.js +445 -453
  486. package/dist/esm/ion-item-divider.entry.js +21 -21
  487. package/dist/esm/ion-item-group.entry.js +18 -18
  488. package/dist/esm/ion-item-option.entry.js +43 -43
  489. package/dist/esm/ion-item-options.entry.js +38 -38
  490. package/dist/esm/ion-item-sliding.entry.js +389 -391
  491. package/dist/esm/ion-loading.entry.js +160 -164
  492. package/dist/esm/ion-menu-button.entry.js +58 -58
  493. package/dist/esm/ion-menu-toggle.entry.js +34 -34
  494. package/dist/esm/ion-menu.entry.js +604 -612
  495. package/dist/esm/ion-modal.entry.js +549 -553
  496. package/dist/esm/ion-nav-link.entry.js +15 -15
  497. package/dist/esm/ion-nav.entry.js +821 -825
  498. package/dist/esm/ion-note.entry.js +17 -17
  499. package/dist/esm/ion-picker-column.entry.js +325 -327
  500. package/dist/esm/ion-picker.entry.js +196 -200
  501. package/dist/esm/ion-popover.entry.js +324 -330
  502. package/dist/esm/ion-progress-bar.entry.js +42 -42
  503. package/dist/esm/ion-range.entry.js +642 -654
  504. package/dist/esm/ion-refresher-content.entry.js +51 -51
  505. package/dist/esm/ion-refresher.entry.js +584 -586
  506. package/dist/esm/ion-reorder-group.entry.js +250 -252
  507. package/dist/esm/ion-reorder.entry.js +24 -24
  508. package/dist/esm/ion-route-redirect.entry.js +17 -21
  509. package/dist/esm/ion-route.entry.js +35 -41
  510. package/dist/esm/ion-router-link.entry.js +29 -29
  511. package/dist/esm/ion-router-outlet.entry.js +176 -178
  512. package/dist/esm/ion-router.entry.js +264 -264
  513. package/dist/esm/ion-row.entry.js +10 -10
  514. package/dist/esm/ion-searchbar.entry.js +386 -396
  515. package/dist/esm/ion-segment-button.entry.js +94 -96
  516. package/dist/esm/ion-segment.entry.js +412 -420
  517. package/dist/esm/ion-select-option.entry.js +14 -14
  518. package/dist/esm/ion-select.entry.js +691 -699
  519. package/dist/esm/ion-skeleton-text.entry.js +33 -33
  520. package/dist/esm/ion-spinner.entry.js +48 -48
  521. package/dist/esm/ion-split-pane.entry.js +118 -124
  522. package/dist/esm/ion-tab-bar.entry.js +64 -66
  523. package/dist/esm/ion-tab-button.entry.js +80 -80
  524. package/dist/esm/ion-tab.entry.js +48 -50
  525. package/dist/esm/ion-tabs.entry.js +132 -132
  526. package/dist/esm/ion-textarea.entry.js +394 -400
  527. package/dist/esm/ion-thumbnail.entry.js +10 -10
  528. package/dist/esm/ion-title.entry.js +41 -43
  529. package/dist/esm/ion-toast.entry.js +369 -375
  530. package/dist/esm/ion-toggle.entry.js +228 -230
  531. package/dist/esm/ion-toolbar.entry.js +59 -59
  532. package/dist/esm/{ionic-global-DXXzPLPc.js → ionic-global-0b7766cb.js} +55 -58
  533. package/dist/esm/ios.transition-22fb53bc.js +651 -0
  534. package/dist/esm/keyboard-1f073554.js +82 -0
  535. package/dist/esm/keyboard-96b6e80b.js +146 -0
  536. package/dist/esm/keyboard-controller-5a2f625f.js +165 -0
  537. package/dist/esm/loader.js +17 -8
  538. package/dist/esm/lock-controller-632e3c10.js +38 -0
  539. package/dist/esm/md.transition-f6ff9834.js +57 -0
  540. package/dist/esm/menu-toggle-util-594849ff.js +12 -0
  541. package/dist/esm/notch-controller-d511b3b3.js +153 -0
  542. package/dist/esm/{overlays-SBLrmFy6.js → overlays-642a91df.js} +7 -7
  543. package/dist/esm/polyfills/core-js.js +11 -0
  544. package/dist/esm/polyfills/css-shim.js +1 -0
  545. package/dist/esm/polyfills/dom.js +79 -0
  546. package/dist/esm/polyfills/es5-html-element.js +1 -0
  547. package/dist/esm/polyfills/index.js +34 -0
  548. package/dist/esm/polyfills/system.js +6 -0
  549. package/dist/esm/refresher.utils-19137568.js +196 -0
  550. package/dist/esm/{status-tap-CjxQA4Bj.js → status-tap-bb6959a8.js} +4 -4
  551. package/dist/esm/swipe-back-6cec4c33.js +79 -0
  552. package/dist/esm/theme-35c700b7.js +43 -0
  553. package/dist/esm/watch-options-7bf43687.js +47 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +193 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +135 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +127 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +229 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +456 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +384 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +755 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +770 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +132 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +132 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +372 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +385 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +136 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +136 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +168 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +164 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +326 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +310 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +81 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +80 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +596 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +517 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +279 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +299 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +203 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +198 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +163 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +165 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +141 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +138 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +138 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +136 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +137 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +137 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +536 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +552 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +212 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +207 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +200 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +282 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +850 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +706 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +100 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +366 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +422 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +393 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +240 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +146 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +129 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +235 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +250 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +133 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +156 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +156 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +833 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +1446 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +815 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +1187 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +351 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +417 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +114 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +114 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +242 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +236 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +287 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +284 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +121 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +334 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +421 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +242 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +287 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +285 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +266 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +205 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +196 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +378 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +374 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +279 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +282 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +357 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +272 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +64 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +127 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +127 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +367 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +354 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +255 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +246 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +196 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +262 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +258 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +366 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +266 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +261 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +261 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +557 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +580 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +660 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +819 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +321 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +316 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +77 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +77 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +89 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +113 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +84 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/router-outlet.css +64 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +136 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +477 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +456 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +224 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +214 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +520 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +506 -0
  673. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +787 -0
  674. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +1374 -0
  675. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  676. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +190 -0
  677. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +212 -0
  678. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +108 -0
  679. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +232 -0
  680. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +265 -0
  681. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +265 -0
  682. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  683. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +252 -0
  684. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +239 -0
  685. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +477 -0
  686. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +501 -0
  687. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +74 -0
  688. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +58 -0
  689. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +987 -0
  690. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +1553 -0
  691. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +76 -0
  692. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +183 -0
  693. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +102 -0
  694. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +399 -0
  695. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +429 -0
  696. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +680 -0
  697. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +625 -0
  698. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +265 -0
  699. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +244 -0
  700. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +144 -0
  701. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.d.ts +327 -327
  702. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.stories.d.ts +34 -34
  703. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.d.ts +14 -14
  704. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.stories.d.ts +17 -17
  705. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.d.ts +106 -106
  706. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.stories.d.ts +67 -67
  707. package/dist/types/components/amwal-pos/amwal-pos.d.ts +228 -228
  708. package/dist/types/components/amwal-pos/amwal-pos.stories.d.ts +185 -185
  709. package/dist/types/components/amwal-widget/amwal-widget-modal.d.ts +56 -56
  710. package/dist/types/components/amwal-widget/amwal-widget.d.ts +165 -165
  711. package/dist/types/components/amwal-widget/amwal-widget.stories.d.ts +101 -101
  712. package/dist/types/components.d.ts +0 -206
  713. package/dist/types/lang/i18n.d.ts +1 -1
  714. package/dist/types/stencil-public-runtime.d.ts +21 -191
  715. package/loader/cdn.js +3 -1
  716. package/loader/index.cjs.js +3 -1
  717. package/loader/index.d.ts +1 -4
  718. package/loader/index.es2017.js +3 -1
  719. package/loader/index.js +3 -1
  720. package/loader/package.json +11 -0
  721. package/package.json +28 -34
  722. package/dist/checkout/p-0161d109.entry.js +0 -1
  723. package/dist/checkout/p-0a8ef1ec.entry.js +0 -1
  724. package/dist/checkout/p-10a72fbe.entry.js +0 -1
  725. package/dist/checkout/p-12ed4081.entry.js +0 -1
  726. package/dist/checkout/p-13c36adc.entry.js +0 -1
  727. package/dist/checkout/p-194b17d8.entry.js +0 -1
  728. package/dist/checkout/p-272a1ffd.entry.js +0 -1
  729. package/dist/checkout/p-307af48b.entry.js +0 -1
  730. package/dist/checkout/p-3207674d.entry.js +0 -1
  731. package/dist/checkout/p-3208e56f.entry.js +0 -1
  732. package/dist/checkout/p-4426eb3b.entry.js +0 -1
  733. package/dist/checkout/p-458da59f.entry.js +0 -1
  734. package/dist/checkout/p-46e69508.entry.js +0 -1
  735. package/dist/checkout/p-49046c16.entry.js +0 -4
  736. package/dist/checkout/p-53dc0e86.entry.js +0 -1
  737. package/dist/checkout/p-5a6fc9fd.entry.js +0 -1
  738. package/dist/checkout/p-5e65653a.entry.js +0 -1
  739. package/dist/checkout/p-5f124c24.entry.js +0 -1
  740. package/dist/checkout/p-6a8ad104.entry.js +0 -1
  741. package/dist/checkout/p-76fb4325.entry.js +0 -1
  742. package/dist/checkout/p-78db60fb.entry.js +0 -1
  743. package/dist/checkout/p-8e34a1bb.entry.js +0 -1
  744. package/dist/checkout/p-91474b10.entry.js +0 -1
  745. package/dist/checkout/p-93OyAGoo.js +0 -2
  746. package/dist/checkout/p-94a57258.entry.js +0 -1
  747. package/dist/checkout/p-BEVStXwd.js +0 -7
  748. package/dist/checkout/p-BQu7QPd5.js +0 -4
  749. package/dist/checkout/p-BR7SJd-v.js +0 -4
  750. package/dist/checkout/p-BcFRJSFv.js +0 -4
  751. package/dist/checkout/p-BcUxrseY.js +0 -1
  752. package/dist/checkout/p-BdG893XR.js +0 -4
  753. package/dist/checkout/p-BgOwfqIY.js +0 -4
  754. package/dist/checkout/p-Bm9bMvCb.js +0 -4
  755. package/dist/checkout/p-C03M5ZSM.js +0 -1
  756. package/dist/checkout/p-C6kqtbmV.js +0 -4
  757. package/dist/checkout/p-C75BfBAE.js +0 -1
  758. package/dist/checkout/p-CVrvo9Qz.js +0 -4
  759. package/dist/checkout/p-ChixdDt6.js +0 -4
  760. package/dist/checkout/p-Cjnmql4G.js +0 -8
  761. package/dist/checkout/p-D0I0TqZU.js +0 -4
  762. package/dist/checkout/p-D2NxOvQ8.js +0 -4
  763. package/dist/checkout/p-D8d_89Nl.js +0 -4
  764. package/dist/checkout/p-DAhcxcAh.js +0 -4
  765. package/dist/checkout/p-DDtPO7yO.js +0 -4
  766. package/dist/checkout/p-DKg_dYcq.js +0 -4
  767. package/dist/checkout/p-DMAPbDyG.js +0 -4
  768. package/dist/checkout/p-DihS-5gH.js +0 -4
  769. package/dist/checkout/p-DkrNcwKK.js +0 -5
  770. package/dist/checkout/p-Dzj_jqIY.js +0 -4
  771. package/dist/checkout/p-E8AXUhZ3.js +0 -7
  772. package/dist/checkout/p-Ufaww5Lq.js +0 -4
  773. package/dist/checkout/p-a90efa79.entry.js +0 -1
  774. package/dist/checkout/p-abd12b84.entry.js +0 -1
  775. package/dist/checkout/p-abe1becc.entry.js +0 -1
  776. package/dist/checkout/p-b2f66c60.entry.js +0 -4
  777. package/dist/checkout/p-b45f5952.entry.js +0 -1
  778. package/dist/checkout/p-c2240d19.entry.js +0 -1
  779. package/dist/checkout/p-c28b4374.entry.js +0 -1
  780. package/dist/checkout/p-cb2db223.entry.js +0 -1
  781. package/dist/checkout/p-cb3967fc.entry.js +0 -1
  782. package/dist/checkout/p-cef16f11.entry.js +0 -1
  783. package/dist/checkout/p-df1b4347.entry.js +0 -4
  784. package/dist/checkout/p-e4bc42fb.entry.js +0 -1
  785. package/dist/checkout/p-e785fb8a.entry.js +0 -1
  786. package/dist/checkout/p-e8bd206a.entry.js +0 -1
  787. package/dist/checkout/p-ef749875.entry.js +0 -1
  788. package/dist/checkout/p-f157b6b2.entry.js +0 -4
  789. package/dist/checkout/p-f351a19a.entry.js +0 -1
  790. package/dist/checkout/p-ff2e59e3.entry.js +0 -1
  791. package/dist/checkout/p-hAETByzF.js +0 -5
  792. package/dist/checkout/p-vn1iXXUO.js +0 -9
  793. package/dist/cjs/i18n-uGNv9SLK.js +0 -13
  794. package/dist/cjs/index-DncWzXDA.js +0 -3738
  795. package/dist/components/p-55BwDerf.js +0 -8
  796. package/dist/components/p-B-M4K7iJ.js +0 -7
  797. package/dist/components/p-B-hirT0v.js +0 -4
  798. package/dist/components/p-B3WORC1a.js +0 -1
  799. package/dist/components/p-B5XH2zAk.js +0 -1
  800. package/dist/components/p-B5ZghgSh.js +0 -4
  801. package/dist/components/p-BEVStXwd.js +0 -7
  802. package/dist/components/p-BH0TCnxk.js +0 -4
  803. package/dist/components/p-BIA8A9ZO.js +0 -1
  804. package/dist/components/p-BOkYKP6F.js +0 -1
  805. package/dist/components/p-BOm0KT2x.js +0 -1
  806. package/dist/components/p-Bb_Zji0h.js +0 -4
  807. package/dist/components/p-BmVRXR1y.js +0 -4
  808. package/dist/components/p-BnQDByf2.js +0 -1
  809. package/dist/components/p-BoxjYI-Q.js +0 -4
  810. package/dist/components/p-BriBxgcM.js +0 -1
  811. package/dist/components/p-BwKjt_Dc.js +0 -4
  812. package/dist/components/p-Bx78uXfc.js +0 -5
  813. package/dist/components/p-C-20JWsp.js +0 -4
  814. package/dist/components/p-C03M5ZSM.js +0 -1
  815. package/dist/components/p-C53feagD.js +0 -4
  816. package/dist/components/p-CLrB3zV0.js +0 -4
  817. package/dist/components/p-CN34uOrj.js +0 -9
  818. package/dist/components/p-CQmcNwZM.js +0 -4
  819. package/dist/components/p-CYd0Smt1.js +0 -1
  820. package/dist/components/p-CgPXSjzI.js +0 -4
  821. package/dist/components/p-Cho32MPa.js +0 -4
  822. package/dist/components/p-ClE6rMJs.js +0 -4
  823. package/dist/components/p-Cm9b7fIl.js +0 -1
  824. package/dist/components/p-CukVBo5-.js +0 -4
  825. package/dist/components/p-D2NxOvQ8.js +0 -4
  826. package/dist/components/p-D4DqwBlW.js +0 -4
  827. package/dist/components/p-D7YY0NXg.js +0 -4
  828. package/dist/components/p-D8OVJo1v.js +0 -7
  829. package/dist/components/p-DKg_dYcq.js +0 -4
  830. package/dist/components/p-DLVYPrYs.js +0 -1
  831. package/dist/components/p-DMmSL7_l.js +0 -1
  832. package/dist/components/p-DOPF2QRF.js +0 -1
  833. package/dist/components/p-DTgJTJD6.js +0 -1
  834. package/dist/components/p-DiVJyqlX.js +0 -4
  835. package/dist/components/p-DrS88eFz.js +0 -1
  836. package/dist/components/p-Dtdm8lKC.js +0 -4
  837. package/dist/components/p-DuZ7hY1a.js +0 -4
  838. package/dist/components/p-Dx-C8Ob_.js +0 -7
  839. package/dist/components/p-DxEgz9x_.js +0 -1
  840. package/dist/components/p-DxSo4SXG.js +0 -1
  841. package/dist/components/p-HSPzo8it.js +0 -1
  842. package/dist/components/p-OrwCUtWu.js +0 -4
  843. package/dist/components/p-UgkI2Wa4.js +0 -1
  844. package/dist/components/p-VeNdmYSo.js +0 -1
  845. package/dist/components/p-YbpebnFS.js +0 -4
  846. package/dist/components/p-ZjP4CjeZ.js +0 -4
  847. package/dist/components/p-_VuKPdkD.js +0 -4
  848. package/dist/components/p-aWL6BxTN.js +0 -4
  849. package/dist/components/p-hHmYLOfE.js +0 -4
  850. package/dist/components/p-qoI-S7yk.js +0 -4
  851. package/dist/components/p-uXV7tzS3.js +0 -1
  852. package/dist/components/p-yu3xCFhr.js +0 -7
  853. package/dist/components/p-zp5f483d.js +0 -1
  854. package/dist/esm/i18n-C_AfxZ5D.js +0 -13
  855. package/dist/esm/index-93OyAGoo.js +0 -3721
  856. /package/dist/checkout/{p-B-hirT0v.js → p-01ad898f.js} +0 -0
  857. /package/dist/checkout/{p-DiVJyqlX.js → p-350e7423.js} +0 -0
  858. /package/dist/checkout/{p-sObYyvOy.js → p-52b4c112.js} +0 -0
  859. /package/dist/checkout/{p-BmVRXR1y.js → p-620fa0ec.js} +0 -0
  860. /package/dist/checkout/{p-hHmYLOfE.js → p-94286cc3.js} +0 -0
  861. /package/dist/checkout/{p-D4RIp70E.js → p-9efbca93.js} +0 -0
  862. /package/dist/checkout/{p-Dtdm8lKC.js → p-9f4ac833.js} +0 -0
  863. /package/dist/checkout/{p-yu3xCFhr.js → p-b2289937.js} +0 -0
  864. /package/dist/checkout/{p-C53feagD.js → p-d5862637.js} +0 -0
  865. /package/dist/checkout/{p-ZjP4CjeZ.js → p-d7fe59ee.js} +0 -0
  866. /package/dist/{components/p-CYPPT3AE.js → checkout/p-e187a77c.js} +0 -0
  867. /package/dist/checkout/{p-CukVBo5-.js → p-f728a68f.js} +0 -0
  868. /package/dist/cjs/{compare-with-utils-JlLIkecm.js → compare-with-utils-adbe64a6.js} +0 -0
  869. /package/dist/cjs/{config-ptk2Lf4l.js → config-e2a8c0c7.js} +0 -0
  870. /package/dist/cjs/{cubic-bezier-Bv3PvaRI.js → cubic-bezier-5ff9b04e.js} +0 -0
  871. /package/dist/cjs/{dir-Br-7_bel.js → dir-374f13f2.js} +0 -0
  872. /package/dist/cjs/{focus-visible-Da2o6bTP.js → focus-visible-b7381162.js} +0 -0
  873. /package/dist/cjs/{index-CH3IFTaK.js → index-071786b4.js} +0 -0
  874. /package/dist/cjs/{index-D3mJ1Cix.js → index-a281cac3.js} +0 -0
  875. /package/dist/cjs/{lock-controller-58TZFRHC.js → lock-controller-e2dfece6.js} +0 -0
  876. /package/dist/cjs/{spinner-configs-BN41iw42.js → spinner-configs-036ebfd8.js} +0 -0
  877. /package/dist/cjs/{theme-DbHdw1Nx.js → theme-12dec869.js} +0 -0
  878. /package/dist/cjs/{watch-options-DOFUPyuf.js → watch-options-1cccbe6a.js} +0 -0
  879. /package/dist/{esm/lock-controller-B-hirT0v.js → components/p-01ad898f.js} +0 -0
  880. /package/dist/{esm/theme-DiVJyqlX.js → components/p-350e7423.js} +0 -0
  881. /package/dist/{esm/focus-visible-BmVRXR1y.js → components/p-620fa0ec.js} +0 -0
  882. /package/dist/{esm/cubic-bezier-hHmYLOfE.js → components/p-94286cc3.js} +0 -0
  883. /package/dist/{esm/watch-options-Dtdm8lKC.js → components/p-9f4ac833.js} +0 -0
  884. /package/dist/{esm/config-yu3xCFhr.js → components/p-b2289937.js} +0 -0
  885. /package/dist/{esm/dir-C53feagD.js → components/p-d5862637.js} +0 -0
  886. /package/dist/{esm/index-ZjP4CjeZ.js → components/p-d7fe59ee.js} +0 -0
  887. /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-d58be312.js} +0 -0
  888. /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-c9fb0813.js} +0 -0
@@ -1,4 +1,1963 @@
1
- import{p as t,H as e,c as a,w as i,h as n,d as o,t as s}from"./p-BnQDByf2.js";import{startFocusVisible as r}from"./p-BmVRXR1y.js";import{r as d,g as l,e as h}from"./p-BwKjt_Dc.js";import{a as c,p as m}from"./p-CYPPT3AE.js";import{i as p}from"./p-C53feagD.js";import{c as u}from"./p-DiVJyqlX.js";import{c as y,f as b,g,h as f,a as x}from"./p-CwRU9ccI.js";import{g as w}from"./p-CN34uOrj.js";import{i as v,a as k,g as j,b as C,c as O,d as P,e as D,v as V,f as z,h as E,j as T,k as A,l as S,m as I,n as B,o as R,p as $,q as M,r as W,s as L,w as F,t as H,u as Y,x as q,y as G,z as N,A as X,B as J,C as _,D as K,E as U,F as Z,G as Q,H as tt,I as et,J as at,K as it,L as nt,M as ot,N as st,O as rt,P as dt,Q as lt,R as ht}from"./p-DoR35tr_.js";import{d as ct}from"./p-BIA8A9ZO.js";import{d as mt}from"./p-Cm9b7fIl.js";import{d as pt}from"./p-uXV7tzS3.js";import{d as ut}from"./p-DMmSL7_l.js";import{d as yt}from"./p-DxSo4SXG.js";import{d as bt}from"./p-DTgJTJD6.js";import{d as gt}from"./p-DxEgz9x_.js";import{d as ft}from"./p-VeNdmYSo.js";import{d as xt}from"./p-BriBxgcM.js";import{d as wt}from"./p-Cho32MPa.js";import{d as vt}from"./p-B5XH2zAk.js";
1
+ import { p as proxyCustomElement, H, c as createEvent, w as writeTask, h, d as Host } from './p-ec0e3f3f.js';
2
+ import { startFocusVisible } from './p-620fa0ec.js';
3
+ import { b as raf, e as renderHiddenInput, g as getElementRoot } from './p-2bb89b46.js';
4
+ import { a as printIonError, p as printIonWarning } from './p-e187a77c.js';
5
+ import { i as isRTL } from './p-d5862637.js';
6
+ import { c as createColorClasses } from './p-350e7423.js';
7
+ import { a as chevronBack, f as chevronForward, c as chevronDown, g as caretUpSharp, h as caretDownSharp } from './p-b8fdd517.js';
8
+ import { g as getIonMode } from './p-901c16c5.js';
9
+ import { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getEndOfWeek, j as getStartOfWeek, k as getPreviousDay, l as getNextDay, m as getPreviousWeek, n as getNextWeek, p as parseMinParts, o as parseMaxParts, q as parseDate, w as warnIfValueOutOfBounds, r as convertToArrayOfNumbers, s as convertDataToISO, t as getToday, u as getClosestValidDate, x as getNumDaysInMonth, y as getCombinedDateColumnData, z as getMonthColumnData, A as getDayColumnData, B as getYearColumnData, C as isMonthFirstLocale, D as getTimeColumnsData, E as isLocaleDayPeriodRTL, F as getDaysOfWeek, G as getMonthAndYear, H as getDaysOfMonth, I as generateMonths, J as getHourCycle, K as getLocalizedTime, L as getLocalizedDateTime, M as formatValue, N as getNextYear, O as getPreviousYear, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './p-39ad94cf.js';
10
+ import { d as defineCustomElement$c } from './p-f7e3c502.js';
11
+ import { d as defineCustomElement$b } from './p-2fc99fef.js';
12
+ import { d as defineCustomElement$a } from './p-5280b372.js';
13
+ import { d as defineCustomElement$9 } from './p-83e529db.js';
14
+ import { d as defineCustomElement$8 } from './p-d25fd077.js';
15
+ import { d as defineCustomElement$7 } from './p-d69dc32f.js';
16
+ import { d as defineCustomElement$6 } from './p-95c79593.js';
17
+ import { d as defineCustomElement$5 } from './p-031ed92d.js';
18
+ import { d as defineCustomElement$4 } from './p-0dc7a5ff.js';
19
+ import { d as defineCustomElement$3 } from './p-e65ea9fb.js';
20
+ import { d as defineCustomElement$2 } from './p-51c44f42.js';
21
+
2
22
  /*!
3
23
  * (C) Ionic http://ionicframework.com - MIT License
4
- */const kt=(t,e,a,i)=>null===t.day||void 0!==i&&!i.includes(t.day)||!(!e||!v(t,e))||!(!a||!k(t,a)),jt=(t,e,a,i,n,o,s)=>{const r=void 0!==(Array.isArray(a)?a:[a]).find((t=>O(e,t))),d=O(e,i);return{disabled:kt(e,n,o,s),isActive:r,isToday:d,ariaSelected:r?"true":null,ariaLabel:D(t,d,e),text:null!=e.day?P(t,e):null}},Ct=(t,{minParts:e,maxParts:a})=>!!((t,e,a)=>!!(e&&e.year>t)||!!(a&&a.year<t))(t.year,e,a)||!!(e&&v(t,e)||a&&k(t,a)),Ot=(t,e)=>{var a,i,n,o;((null===(a=null==e?void 0:e.date)||void 0===a?void 0:a.timeZone)||(null===(i=null==e?void 0:e.date)||void 0===i?void 0:i.timeZoneName)||(null===(n=null==e?void 0:e.time)||void 0===n?void 0:n.timeZone)||(null===(o=null==e?void 0:e.time)||void 0===o?void 0:o.timeZoneName))&&m('Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".',t)},Pt=(t,e,a)=>{if(a)switch(e){case"date":case"month-year":case"month":case"year":void 0===a.date&&m(`Datetime: The '${e}' presentation requires a date object in formatOptions.`,t);break;case"time":void 0===a.time&&m("Datetime: The 'time' presentation requires a time object in formatOptions.",t);break;case"date-time":case"time-date":void 0===a.date&&void 0===a.time&&m(`Datetime: The '${e}' presentation requires either a date or time object (or both) in formatOptions.`,t)}},Dt=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionCancel=a(this,"ionCancel",7),this.ionChange=a(this,"ionChange",7),this.ionValueChange=a(this,"ionValueChange",7),this.ionFocus=a(this,"ionFocus",7),this.ionBlur=a(this,"ionBlur",7),this.ionStyle=a(this,"ionStyle",7),this.ionRender=a(this,"ionRender",7),this.inputId="ion-dt-"+Vt++,this.prevPresentation=null,this.warnIfIncorrectValueUsage=()=>{const{multiple:t,value:e}=this;!t&&Array.isArray(e)&&m(`ion-datetime was passed an array of values, but multiple="false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${e.map((t=>`'${t}'`)).join(", ")}]\n`,this.el)},this.setValue=t=>{this.value=t,this.ionChange.emit({value:t})},this.getActivePartsWithFallback=()=>{var t;const{defaultParts:e}=this;return null!==(t=this.getActivePart())&&void 0!==t?t:e},this.getActivePart=()=>{const{activeParts:t}=this;return Array.isArray(t)?t[0]:t},this.closeParentOverlay=()=>{const t=this.el.closest("ion-modal, ion-popover");t&&t.dismiss()},this.setWorkingParts=t=>{this.workingParts=Object.assign({},t)},this.setActiveParts=(t,e=!1)=>{if(this.readonly)return;const{multiple:a,minParts:i,maxParts:n,activeParts:o}=this,s=V(t,i,n);if(this.setWorkingParts(s),a){const t=Array.isArray(o)?o:[o];this.activeParts=e?t.filter((t=>!O(t,s))):[...t,s]}else this.activeParts=Object.assign({},s);null!==this.el.querySelector('[slot="buttons"]')||this.showDefaultButtons||this.confirm()},this.initializeKeyboardListeners=()=>{const t=this.calendarBodyRef;if(!t)return;const e=this.el.shadowRoot,a=t.querySelector(".calendar-month:nth-of-type(2)"),i=new MutationObserver((e=>{var i;!(null===(i=e[0].oldValue)||void 0===i?void 0:i.includes("ion-focused"))&&t.classList.contains("ion-focused")&&this.focusWorkingDay(a)}));i.observe(t,{attributeFilter:["class"],attributeOldValue:!0}),this.destroyKeyboardMO=()=>{null==i||i.disconnect()},t.addEventListener("keydown",(t=>{const i=e.activeElement;if(!i||!i.classList.contains("calendar-day"))return;const n=z(i);let o;switch(t.key){case"ArrowDown":t.preventDefault(),o=$(n);break;case"ArrowUp":t.preventDefault(),o=R(n);break;case"ArrowRight":t.preventDefault(),o=B(n);break;case"ArrowLeft":t.preventDefault(),o=I(n);break;case"Home":t.preventDefault(),o=S(n);break;case"End":t.preventDefault(),o=A(n);break;case"PageUp":t.preventDefault(),o=t.shiftKey?T(n):j(n);break;case"PageDown":t.preventDefault(),o=t.shiftKey?E(n):C(n);break;default:return}kt(o,this.minParts,this.maxParts)||(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),o)),requestAnimationFrame((()=>this.focusWorkingDay(a))))}))},this.focusWorkingDay=t=>{const e=t.querySelectorAll(".calendar-day-padding"),{day:a}=this.workingParts;if(null===a)return;const i=t.querySelector(`.calendar-day-wrapper:nth-of-type(${e.length+a}) .calendar-day`);i&&i.focus()},this.processMinParts=()=>{const{min:t,defaultParts:e}=this;this.minParts=void 0!==t?M(t,e):void 0},this.processMaxParts=()=>{const{max:t,defaultParts:e}=this;this.maxParts=void 0!==t?W(t,e):void 0},this.initializeCalendarListener=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelectorAll(".calendar-month"),a=e[0],n=e[1],o=e[2],s="ios"===w(this)&&"undefined"!=typeof navigator&&navigator.maxTouchPoints>1;i((()=>{t.scrollLeft=a.clientWidth*(p(this.el)?-1:1);const e=e=>{const i=t.getBoundingClientRect(),n=t.scrollLeft<=2?a:o,s=n.getBoundingClientRect();if(Math.abs(s.x-i.x)>2)return;const{forceRenderDate:r}=this;return void 0!==r?{month:r.month,year:r.year,day:r.day}:n===a?j(e):n===o?C(e):void 0},r=()=>{s&&(t.style.removeProperty("pointer-events"),l=!1);const a=e(this.workingParts);if(!a)return;const{month:o,day:r,year:d}=a;Ct({month:o,year:d,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})})||(t.style.setProperty("overflow","hidden"),i((()=>{this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),{month:o,day:r,year:d})),t.scrollLeft=n.clientWidth*(p(this.el)?-1:1),t.style.removeProperty("overflow"),this.resolveForceDateScrolling&&this.resolveForceDateScrolling()})))};let d,l=!1;const h=()=>{d&&clearTimeout(d),!l&&s&&(t.style.setProperty("pointer-events","none"),l=!0),d=setTimeout(r,50)};t.addEventListener("scroll",h),this.destroyCalendarListener=()=>{t.removeEventListener("scroll",h)}}))},this.destroyInteractionListeners=()=>{const{destroyCalendarListener:t,destroyKeyboardMO:e}=this;void 0!==t&&t(),void 0!==e&&e()},this.processValue=t=>{const e=null!=t&&(!Array.isArray(t)||t.length>0),a=e?L(t):this.defaultParts,{minParts:i,maxParts:n,workingParts:o,el:s}=this;if(this.warnIfIncorrectValueUsage(),!a)return;e&&F(a,i,n);const r=Y(Array.isArray(a)?a[0]:a,i,n),{month:d,day:l,year:h,hour:c,minute:m}=r,p=H(c);this.activeParts=e?Array.isArray(a)?[...a]:{month:d,day:l,year:h,hour:c,minute:m,ampm:p}:[];const u=void 0!==d&&d!==o.month||void 0!==h&&h!==o.year,y=s.classList.contains("datetime-ready"),{isGridStyle:b,showMonthAndYear:g}=this;let f=!0;if(Array.isArray(a)){const t=a[0].month;for(const e of a)if(e.month!==t){f=!1;break}}f&&(b&&u&&y&&!g?this.animateToDate(r):this.setWorkingParts({month:d,day:l,year:h,hour:c,minute:m,ampm:p}))},this.animateToDate=async t=>{const{workingParts:e}=this;this.forceRenderDate=t;const a=new Promise((t=>{this.resolveForceDateScrolling=t}));v(t,e)?this.prevMonth():this.nextMonth(),await a,this.resolveForceDateScrolling=void 0,this.forceRenderDate=void 0},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.hasValue=()=>null!=this.value,this.nextMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:last-of-type");e&&t.scrollTo({top:0,left:2*e.offsetWidth*(p(this.el)?-1:1),behavior:"smooth"})},this.prevMonth=()=>{const t=this.calendarBodyRef;t&&t.querySelector(".calendar-month:first-of-type")&&t.scrollTo({top:0,left:0,behavior:"smooth"})},this.toggleMonthAndYearView=()=>{this.showMonthAndYear=!this.showMonthAndYear},this.showMonthAndYear=!1,this.activeParts=[],this.workingParts={month:5,day:28,year:2021,hour:13,minute:52,ampm:"pm"},this.isTimePopoverOpen=!1,this.forceRenderDate=void 0,this.color="primary",this.name=this.inputId,this.disabled=!1,this.formatOptions=void 0,this.readonly=!1,this.isDateEnabled=void 0,this.min=void 0,this.max=void 0,this.presentation="date-time",this.cancelText="Cancel",this.doneText="Done",this.clearText="Clear",this.yearValues=void 0,this.monthValues=void 0,this.dayValues=void 0,this.hourValues=void 0,this.minuteValues=void 0,this.locale="default",this.firstDayOfWeek=0,this.titleSelectedDatesFormatter=void 0,this.multiple=!1,this.highlightedDates=void 0,this.value=void 0,this.showDefaultTitle=!1,this.showDefaultButtons=!1,this.showClearButton=!1,this.showDefaultTimeLabel=!0,this.hourCycle=void 0,this.size="fixed",this.preferWheel=!1}formatOptionsChanged(){const{el:t,formatOptions:e,presentation:a}=this;Pt(t,a,e),Ot(t,e)}disabledChanged(){this.emitStyle()}minChanged(){this.processMinParts()}maxChanged(){this.processMaxParts()}presentationChanged(){const{el:t,formatOptions:e,presentation:a}=this;Pt(t,a,e)}get isGridStyle(){const{presentation:t,preferWheel:e}=this;return("date"===t||"date-time"===t||"time-date"===t)&&!e}yearValuesChanged(){this.parsedYearValues=q(this.yearValues)}monthValuesChanged(){this.parsedMonthValues=q(this.monthValues)}dayValuesChanged(){this.parsedDayValues=q(this.dayValues)}hourValuesChanged(){this.parsedHourValues=q(this.hourValues)}minuteValuesChanged(){this.parsedMinuteValues=q(this.minuteValues)}async valueChanged(){const{value:t}=this;this.hasValue()&&this.processValue(t),this.emitStyle(),this.ionValueChange.emit({value:t})}async confirm(t=!1){const{isCalendarPicker:e,activeParts:a,preferWheel:i,workingParts:n}=this;void 0===a&&e||this.setValue(Array.isArray(a)&&0===a.length?i?G(n):void 0:G(a)),t&&this.closeParentOverlay()}async reset(t){this.processValue(t)}async cancel(t=!1){this.ionCancel.emit(),t&&this.closeParentOverlay()}get isCalendarPicker(){const{presentation:t}=this;return"date"===t||"date-time"===t||"time-date"===t}connectedCallback(){this.clearFocusVisible=r(this.el).destroy}disconnectedCallback(){this.clearFocusVisible&&(this.clearFocusVisible(),this.clearFocusVisible=void 0)}initializeListeners(){this.initializeCalendarListener(),this.initializeKeyboardListeners()}componentDidLoad(){const{el:t,intersectionTrackerRef:e}=this,a=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.initializeListeners(),i((()=>{this.el.classList.add("datetime-ready")})))}),{threshold:.01,root:t});d((()=>null==a?void 0:a.observe(e)));const n=new IntersectionObserver((t=>{t[0].isIntersecting||(this.destroyInteractionListeners(),this.showMonthAndYear=!1,i((()=>{this.el.classList.remove("datetime-ready")})))}),{threshold:0,root:t});d((()=>null==n?void 0:n.observe(e)));const o=l(this.el);o.addEventListener("ionFocus",(t=>t.stopPropagation())),o.addEventListener("ionBlur",(t=>t.stopPropagation()))}componentDidRender(){const{presentation:t,prevPresentation:e,calendarBodyRef:a,minParts:i,preferWheel:n,forceRenderDate:o}=this;if(void 0!==i&&!n&&["date-time","time-date","date"].includes(t)&&a){const t=a.querySelector(".calendar-month:nth-of-type(1)");t&&void 0===o&&(a.scrollLeft=t.clientWidth*(p(this.el)?-1:1))}null!==e?t!==e&&(this.prevPresentation=t,this.destroyInteractionListeners(),this.initializeListeners(),this.showMonthAndYear=!1,d((()=>{this.ionRender.emit()}))):this.prevPresentation=t}componentWillLoad(){const{el:t,formatOptions:e,highlightedDates:a,multiple:i,presentation:n,preferWheel:o}=this;i&&("date"!==n&&m('Multiple date selection is only supported for presentation="date".',t),o&&m('Multiple date selection is not supported with preferWheel="true".',t)),void 0!==a&&("date"!==n&&"date-time"!==n&&"time-date"!==n&&m("The highlightedDates property is only supported with the date, date-time, and time-date presentations.",t),o&&m('The highlightedDates property is not supported with preferWheel="true".',t)),e&&(Pt(t,n,e),Ot(t,e));const s=this.parsedHourValues=q(this.hourValues),r=this.parsedMinuteValues=q(this.minuteValues),d=this.parsedMonthValues=q(this.monthValues),l=this.parsedYearValues=q(this.yearValues),h=this.parsedDayValues=q(this.dayValues),c=this.todayParts=L(N());this.processMinParts(),this.processMaxParts(),this.defaultParts=X({refParts:c,monthValues:d,dayValues:h,yearValues:l,hourValues:s,minuteValues:r,minParts:this.minParts,maxParts:this.maxParts}),this.processValue(this.value),this.emitStyle()}emitStyle(){this.ionStyle.emit({interactive:!0,datetime:!0,"interactive-disabled":this.disabled})}renderFooter(){const{disabled:t,readonly:e,showDefaultButtons:a,showClearButton:i}=this,o=t||e;if(null===this.el.querySelector('[slot="buttons"]')&&!a&&!i)return;const s=()=>{this.reset(),this.setValue(void 0)};return n("div",{class:"datetime-footer"},n("div",{class:"datetime-buttons"},n("div",{class:{"datetime-action-buttons":!0,"has-clear-button":this.showClearButton}},n("slot",{name:"buttons"},n("ion-buttons",null,a&&n("ion-button",{id:"cancel-button",color:this.color,onClick:()=>this.cancel(!0),disabled:o},this.cancelText),n("div",{class:"datetime-action-buttons-container"},i&&n("ion-button",{id:"clear-button",color:this.color,onClick:()=>s(),disabled:o},this.clearText),a&&n("ion-button",{id:"confirm-button",color:this.color,onClick:()=>this.confirm(!0),disabled:o},this.doneText)))))))}renderWheelPicker(t=this.presentation){const e="time-date"===t?[this.renderTimePickerColumns(t),this.renderDatePickerColumns(t)]:[this.renderDatePickerColumns(t),this.renderTimePickerColumns(t)];return n("ion-picker-internal",null,e)}renderDatePickerColumns(t){return"date-time"===t||"time-date"===t?this.renderCombinedDatePickerColumn():this.renderIndividualDatePickerColumns(t)}renderCombinedDatePickerColumn(){const{defaultParts:t,disabled:e,workingParts:a,locale:i,minParts:o,maxParts:s,todayParts:r,isDateEnabled:d}=this,l=this.getActivePartsWithFallback(),h=J(a),m=h[h.length-1];h[0].day=1,m.day=_(m.month,m.year);const p=void 0!==o&&k(o,h[0])?o:h[0],u=void 0!==s&&v(s,m)?s:m,y=K(i,r,p,u,this.parsedDayValues,this.parsedMonthValues);let b=y.items;const g=y.parts;return d&&(b=b.map(((t,e)=>{const a=g[e];let i;try{i=!d(G(a))}catch(t){c("Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",t)}return Object.assign(Object.assign({},t),{disabled:i})}))),n("ion-picker-column-internal",{class:"date-column",color:this.color,disabled:e,items:b,value:null!==a.day?`${a.year}-${a.month}-${a.day}`:`${t.year}-${t.month}-${t.day}`,onIonChange:t=>{this.destroyCalendarListener&&this.destroyCalendarListener();const{value:e}=t.detail,i=g.find((({month:t,day:a,year:i})=>e===`${i}-${t}-${a}`));this.setWorkingParts(Object.assign(Object.assign({},a),i)),this.setActiveParts(Object.assign(Object.assign({},l),i)),this.initializeCalendarListener(),t.stopPropagation()}})}renderIndividualDatePickerColumns(t){const{workingParts:e,isDateEnabled:a}=this,i="year"!==t&&"time"!==t?U(this.locale,e,this.minParts,this.maxParts,this.parsedMonthValues):[];let n="date"===t?Z(this.locale,e,this.minParts,this.maxParts,this.parsedDayValues):[];a&&(n=n.map((t=>{const{value:i}=t,n={month:e.month,day:"string"==typeof i?parseInt(i):i,year:e.year};let o;try{o=!a(G(n))}catch(t){c("Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",t)}return Object.assign(Object.assign({},t),{disabled:o})})));const o="month"!==t&&"time"!==t?Q(this.locale,this.defaultParts,this.minParts,this.maxParts,this.parsedYearValues):[];let s=[];return s=tt(this.locale,{month:"numeric",day:"numeric"})?[this.renderMonthPickerColumn(i),this.renderDayPickerColumn(n),this.renderYearPickerColumn(o)]:[this.renderDayPickerColumn(n),this.renderMonthPickerColumn(i),this.renderYearPickerColumn(o)],s}renderDayPickerColumn(t){var e;if(0===t.length)return[];const{disabled:a,workingParts:i}=this,o=this.getActivePartsWithFallback();return n("ion-picker-column-internal",{class:"day-column",color:this.color,disabled:a,items:t,value:null!==(e=null!==i.day?i.day:this.defaultParts.day)&&void 0!==e?e:void 0,onIonChange:t=>{this.destroyCalendarListener&&this.destroyCalendarListener(),this.setWorkingParts(Object.assign(Object.assign({},i),{day:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},o),{day:t.detail.value})),this.initializeCalendarListener(),t.stopPropagation()}})}renderMonthPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this,i=this.getActivePartsWithFallback();return n("ion-picker-column-internal",{class:"month-column",color:this.color,disabled:e,items:t,value:a.month,onIonChange:t=>{this.destroyCalendarListener&&this.destroyCalendarListener(),this.setWorkingParts(Object.assign(Object.assign({},a),{month:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{month:t.detail.value})),this.initializeCalendarListener(),t.stopPropagation()}})}renderYearPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this,i=this.getActivePartsWithFallback();return n("ion-picker-column-internal",{class:"year-column",color:this.color,disabled:e,items:t,value:a.year,onIonChange:t=>{this.destroyCalendarListener&&this.destroyCalendarListener(),this.setWorkingParts(Object.assign(Object.assign({},a),{year:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{year:t.detail.value})),this.initializeCalendarListener(),t.stopPropagation()}})}renderTimePickerColumns(t){if(["date","month","month-year","year"].includes(t))return[];const e=void 0!==this.getActivePart(),{hoursData:a,minutesData:i,dayPeriodData:n}=et(this.locale,this.workingParts,this.hourCycle,e?this.minParts:void 0,e?this.maxParts:void 0,this.parsedHourValues,this.parsedMinuteValues);return[this.renderHourPickerColumn(a),this.renderMinutePickerColumn(i),this.renderDayPeriodPickerColumn(n)]}renderHourPickerColumn(t){const{disabled:e,workingParts:a}=this;if(0===t.length)return[];const i=this.getActivePartsWithFallback();return n("ion-picker-column-internal",{color:this.color,disabled:e,value:i.hour,items:t,numericInput:!0,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{hour:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{hour:t.detail.value})),t.stopPropagation()}})}renderMinutePickerColumn(t){const{disabled:e,workingParts:a}=this;if(0===t.length)return[];const i=this.getActivePartsWithFallback();return n("ion-picker-column-internal",{color:this.color,disabled:e,value:i.minute,items:t,numericInput:!0,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{minute:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{minute:t.detail.value})),t.stopPropagation()}})}renderDayPeriodPickerColumn(t){const{disabled:e,workingParts:a}=this;if(0===t.length)return[];const i=this.getActivePartsWithFallback(),o=at(this.locale);return n("ion-picker-column-internal",{style:o?{order:"-1"}:{},color:this.color,disabled:e,value:i.ampm,items:t,onIonChange:t=>{const e=ht(a,t.detail.value);this.setWorkingParts(Object.assign(Object.assign({},a),{ampm:t.detail.value,hour:e})),this.setActiveParts(Object.assign(Object.assign({},i),{ampm:t.detail.value,hour:e})),t.stopPropagation()}})}renderWheelView(t){const{locale:e}=this,a=tt(e)?"month-first":"year-first";return n("div",{class:{["wheel-order-"+a]:!0}},this.renderWheelPicker(t))}renderCalendarHeader(t){const{disabled:e}=this,a="ios"===t?y:b,i="ios"===t?g:f,o=e||((t,e,a)=>{const i=Object.assign(Object.assign({},j(this.workingParts)),{day:null});return Ct(i,{minParts:e,maxParts:a})})(0,this.minParts,this.maxParts),s=e||((t,e)=>{const a=Object.assign(Object.assign({},C(this.workingParts)),{day:null});return Ct(a,{maxParts:e})})(0,this.maxParts),r=this.el.getAttribute("dir")||void 0;return n("div",{class:"calendar-header"},n("div",{class:"calendar-action-buttons"},n("div",{class:"calendar-month-year"},n("ion-item",{part:"month-year-button",ref:t=>this.monthYearToggleItemRef=t,button:!0,"aria-label":"Show year picker",detail:!1,lines:"none",disabled:e,onClick:()=>{var t;this.toggleMonthAndYearView();const{monthYearToggleItemRef:e}=this;if(e){const a=null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector(".item-native");a&&a.setAttribute("aria-label",this.showMonthAndYear?"Hide year picker":"Show year picker")}}},n("ion-label",null,nt(this.locale,this.workingParts),n("ion-icon",{"aria-hidden":"true",icon:this.showMonthAndYear?a:i,lazy:!1,flipRtl:!0})))),n("div",{class:"calendar-next-prev"},n("ion-buttons",null,n("ion-button",{"aria-label":"Previous month",disabled:o,onClick:()=>this.prevMonth()},n("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:x,lazy:!1,flipRtl:!0})),n("ion-button",{"aria-label":"Next month",disabled:s,onClick:()=>this.nextMonth()},n("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:g,lazy:!1,flipRtl:!0}))))),n("div",{class:"calendar-days-of-week","aria-hidden":"true"},it(this.locale,t,this.firstDayOfWeek%7).map((t=>n("div",{class:"day-of-week"},t)))))}renderMonth(t,e){const{disabled:a,readonly:i}=this,o=void 0===this.parsedYearValues||this.parsedYearValues.includes(e),s=void 0===this.parsedMonthValues||this.parsedMonthValues.includes(t),r=!o||!s,d=a||i,l=a||Ct({month:t,year:e,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})}),h=this.workingParts.month===t&&this.workingParts.year===e,m=this.getActivePartsWithFallback();return n("div",{"aria-hidden":h?null:"true",class:{"calendar-month":!0,"calendar-month-disabled":!h&&l}},n("div",{class:"calendar-month-grid"},ot(t,e,this.firstDayOfWeek%7).map(((a,i)=>{const{day:o,dayOfWeek:s}=a,{el:l,highlightedDates:h,isDateEnabled:p,multiple:u}=this,y={month:t,day:o,year:e},b=null===o,{isActive:g,isToday:f,ariaLabel:x,ariaSelected:w,disabled:v,text:k}=jt(this.locale,y,this.activeParts,this.todayParts,this.minParts,this.maxParts,this.parsedDayValues),j=G(y);let C=r||v;if(!C&&void 0!==p)try{C=!p(j)}catch(t){c("Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",l,t)}const O=C&&d,P=C||d;let D,V;return void 0===h||g||null===o||(D=((t,e,a)=>{if(Array.isArray(t)){const a=e.split("T")[0],i=t.find((t=>t.date===a));if(i)return{textColor:i.textColor,backgroundColor:i.backgroundColor}}else try{return t(e)}catch(t){c("Exception thrown from provided `highlightedDates` callback. Please check your function and try again.",a,t)}})(h,j,l)),b||(V=`calendar-day${g?" active":""}${f?" today":""}${C?" disabled":""}`),n("div",{class:"calendar-day-wrapper"},n("button",{ref:t=>{t&&(t.style.setProperty("color",""+(D?D.textColor:""),"important"),t.style.setProperty("background-color",""+(D?D.backgroundColor:""),"important"))},tabindex:"-1","data-day":o,"data-month":t,"data-year":e,"data-index":i,"data-day-of-week":s,disabled:P,class:{"calendar-day-padding":b,"calendar-day":!0,"calendar-day-active":g,"calendar-day-constrained":O,"calendar-day-today":f},part:V,"aria-hidden":b?"true":null,"aria-selected":w,"aria-label":x,onClick:()=>{b||(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),{month:t,day:o,year:e})),u?this.setActiveParts({month:t,day:o,year:e},g):this.setActiveParts(Object.assign(Object.assign({},m),{month:t,day:o,year:e})))}},k))}))))}renderCalendarBody(){return n("div",{class:"calendar-body ion-focusable",ref:t=>this.calendarBodyRef=t,tabindex:"0"},J(this.workingParts,this.forceRenderDate).map((({month:t,year:e})=>this.renderMonth(t,e))))}renderCalendar(t){return n("div",{class:"datetime-calendar",key:"datetime-calendar"},this.renderCalendarHeader(t),this.renderCalendarBody())}renderTimeLabel(){if(null!==this.el.querySelector('[slot="time-label"]')||this.showDefaultTimeLabel)return n("slot",{name:"time-label"},"Time")}renderTimeOverlay(){const{disabled:t,hourCycle:e,isTimePopoverOpen:a,locale:i,formatOptions:o}=this,s=st(i,e),r=this.getActivePartsWithFallback();return[n("div",{class:"time-header"},this.renderTimeLabel()),n("button",{class:{"time-body":!0,"time-body-active":a},part:"time-button"+(a?" active":""),"aria-expanded":"false","aria-haspopup":"true",disabled:t,onClick:async t=>{const{popoverRef:e}=this;e&&(this.isTimePopoverOpen=!0,e.present(new CustomEvent("ionShadowTarget",{detail:{ionShadowTarget:t.target}})),await e.onWillDismiss(),this.isTimePopoverOpen=!1)}},rt(i,r,s,null==o?void 0:o.time)),n("ion-popover",{alignment:"center",translucent:!0,overlayIndex:1,arrow:!1,onWillPresent:t=>{t.target.querySelectorAll("ion-picker-column-internal").forEach((t=>t.scrollActiveItemIntoView()))},style:{"--offset-y":"-10px","--min-width":"fit-content"},keyboardEvents:!0,ref:t=>this.popoverRef=t},this.renderWheelPicker("time"))]}getHeaderSelectedDateText(){var t;const{activeParts:e,formatOptions:a,multiple:i,titleSelectedDatesFormatter:n}=this;let o;if(i&&Array.isArray(e)&&1!==e.length){if(o=e.length+" days",void 0!==n)try{o=n(G(e))}catch(t){c("Exception in provided `titleSelectedDatesFormatter`: ",t)}}else o=dt(this.locale,this.getActivePartsWithFallback(),null!==(t=null==a?void 0:a.date)&&void 0!==t?t:{weekday:"short",month:"short",day:"numeric"});return o}renderHeader(t=!0){if(null!==this.el.querySelector('[slot="title"]')||this.showDefaultTitle)return n("div",{class:"datetime-header"},n("div",{class:"datetime-title"},n("slot",{name:"title"},"Select Date")),t&&n("div",{class:"datetime-selected-date"},this.getHeaderSelectedDateText()))}renderTime(){const{presentation:t}=this;return n("div",{class:"datetime-time"},"time"===t?this.renderWheelPicker():this.renderTimeOverlay())}renderCalendarViewMonthYearPicker(){return n("div",{class:"datetime-year"},this.renderWheelView("month-year"))}renderDatetime(t){const{presentation:e,preferWheel:a}=this;if(a&&("date"===e||"date-time"===e||"time-date"===e))return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];switch(e){case"date-time":return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderTime(),this.renderFooter()];case"time-date":return[this.renderHeader(),this.renderTime(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()];case"time":return[this.renderHeader(!1),this.renderTime(),this.renderFooter()];case"month":case"month-year":case"year":return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];default:return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()]}}render(){const{name:t,value:e,disabled:a,el:i,color:s,readonly:r,showMonthAndYear:d,preferWheel:l,presentation:c,size:m,isGridStyle:p}=this,y=w(this),b="year"===c||"month"===c||"month-year"===c,g=d||b,f=d&&!b,x=("date"===c||"date-time"===c||"time-date"===c)&&l;return h(!0,i,t,lt(e),a),n(o,{key:"8490192beb6c5c6064ed8f2a7be2d51846f84f36","aria-disabled":a?"true":null,onFocus:this.onFocus,onBlur:this.onBlur,class:Object.assign({},u(s,{[y]:!0,"datetime-readonly":r,"datetime-disabled":a,"show-month-and-year":g,"month-year-picker-open":f,["datetime-presentation-"+c]:!0,["datetime-size-"+m]:!0,"datetime-prefer-wheel":x,"datetime-grid":p}))},n("div",{key:"a2959c07ed871f9004a2f11ab1385a5a7b5737fd",class:"intersection-tracker",ref:t=>this.intersectionTrackerRef=t}),this.renderDatetime(y))}get el(){return this}static get watchers(){return{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}}static get style(){return{ios:":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{position:absolute;visibility:hidden;pointer-events:none}@supports (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{inset-inline-start:-99999px}}@supports not (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){:host(.show-month-and-year:dir(rtl)) .calendar-next-prev,:host(.show-month-and-year:dir(rtl)) .calendar-days-of-week,:host(.show-month-and-year:dir(rtl)) .calendar-body,:host(.show-month-and-year:dir(rtl)) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:flex}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center;width:auto}:host .calendar-action-buttons ion-item ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:flex;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:flex;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:flex;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #666666)}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc);font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}:host .calendar-action-buttons ion-item{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:min(1rem, 25.6px);font-weight:600}:host .calendar-action-buttons ion-item ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:flex;align-items:center;justify-content:space-between}:host .datetime-action-buttons{width:100%}",md:":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{position:absolute;visibility:hidden;pointer-events:none}@supports (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{inset-inline-start:-99999px}}@supports not (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){:host(.show-month-and-year:dir(rtl)) .calendar-next-prev,:host(.show-month-and-year:dir(rtl)) .calendar-days-of-week,:host(.show-month-and-year:dir(rtl)) .calendar-body,:host(.show-month-and-year:dir(rtl)) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:flex}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center;width:auto}:host .calendar-action-buttons ion-item ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:flex;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:flex;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:flex;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .datetime-calendar .calendar-action-buttons ion-item{--padding-start:20px}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, #595959)}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, #595959)}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:flex;align-items:center;justify-content:flex-end}"}}},[289,"ion-datetime",{color:[1],name:[1],disabled:[4],formatOptions:[16],readonly:[4],isDateEnabled:[16],min:[1025],max:[1025],presentation:[1],cancelText:[1,"cancel-text"],doneText:[1,"done-text"],clearText:[1,"clear-text"],yearValues:[8,"year-values"],monthValues:[8,"month-values"],dayValues:[8,"day-values"],hourValues:[8,"hour-values"],minuteValues:[8,"minute-values"],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],titleSelectedDatesFormatter:[16],multiple:[4],highlightedDates:[16],value:[1025],showDefaultTitle:[4,"show-default-title"],showDefaultButtons:[4,"show-default-buttons"],showClearButton:[4,"show-clear-button"],showDefaultTimeLabel:[4,"show-default-time-label"],hourCycle:[1,"hour-cycle"],size:[1],preferWheel:[4,"prefer-wheel"],showMonthAndYear:[32],activeParts:[32],workingParts:[32],isTimePopoverOpen:[32],forceRenderDate:[32],confirm:[64],reset:[64],cancel:[64]},void 0,{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}]);let Vt=0;const zt=Dt,Et=function(){"undefined"!=typeof customElements&&["ion-datetime","ion-backdrop","ion-button","ion-buttons","ion-icon","ion-item","ion-label","ion-note","ion-picker-column-internal","ion-picker-internal","ion-popover","ion-ripple-effect"].forEach((t=>{switch(t){case"ion-datetime":customElements.get(s(t))||customElements.define(s(t),Dt);break;case"ion-backdrop":customElements.get(s(t))||ct();break;case"ion-button":customElements.get(s(t))||mt();break;case"ion-buttons":customElements.get(s(t))||pt();break;case"ion-icon":customElements.get(s(t))||ut();break;case"ion-item":customElements.get(s(t))||yt();break;case"ion-label":customElements.get(s(t))||bt();break;case"ion-note":customElements.get(s(t))||gt();break;case"ion-picker-column-internal":customElements.get(s(t))||ft();break;case"ion-picker-internal":customElements.get(s(t))||xt();break;case"ion-popover":customElements.get(s(t))||wt();break;case"ion-ripple-effect":customElements.get(s(t))||vt()}}))};export{zt as IonDatetime,Et as defineCustomElement}
24
+ */
25
+ const isYearDisabled = (refYear, minParts, maxParts) => {
26
+ if (minParts && minParts.year > refYear) {
27
+ return true;
28
+ }
29
+ if (maxParts && maxParts.year < refYear) {
30
+ return true;
31
+ }
32
+ return false;
33
+ };
34
+ /**
35
+ * Returns true if a given day should
36
+ * not be interactive according to its value,
37
+ * or the max/min dates.
38
+ */
39
+ const isDayDisabled = (refParts, minParts, maxParts, dayValues) => {
40
+ /**
41
+ * If this is a filler date (i.e. padding)
42
+ * then the date is disabled.
43
+ */
44
+ if (refParts.day === null) {
45
+ return true;
46
+ }
47
+ /**
48
+ * If user passed in a list of acceptable day values
49
+ * check to make sure that the date we are looking
50
+ * at is in this array.
51
+ */
52
+ if (dayValues !== undefined && !dayValues.includes(refParts.day)) {
53
+ return true;
54
+ }
55
+ /**
56
+ * Given a min date, perform the following
57
+ * checks. If any of them are true, then the
58
+ * day should be disabled:
59
+ * 1. Is the current year < the min allowed year?
60
+ * 2. Is the current year === min allowed year,
61
+ * but the current month < the min allowed month?
62
+ * 3. Is the current year === min allowed year, the
63
+ * current month === min allow month, but the current
64
+ * day < the min allowed day?
65
+ */
66
+ if (minParts && isBefore(refParts, minParts)) {
67
+ return true;
68
+ }
69
+ /**
70
+ * Given a max date, perform the following
71
+ * checks. If any of them are true, then the
72
+ * day should be disabled:
73
+ * 1. Is the current year > the max allowed year?
74
+ * 2. Is the current year === max allowed year,
75
+ * but the current month > the max allowed month?
76
+ * 3. Is the current year === max allowed year, the
77
+ * current month === max allow month, but the current
78
+ * day > the max allowed day?
79
+ */
80
+ if (maxParts && isAfter(refParts, maxParts)) {
81
+ return true;
82
+ }
83
+ /**
84
+ * If none of these checks
85
+ * passed then the date should
86
+ * be interactive.
87
+ */
88
+ return false;
89
+ };
90
+ /**
91
+ * Given a locale, a date, the selected date(s), and today's date,
92
+ * generate the state for a given calendar day button.
93
+ */
94
+ const getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {
95
+ /**
96
+ * activeParts signals what day(s) are currently selected in the datetime.
97
+ * If multiple="true", this will be an array, but the logic in this util
98
+ * is the same whether we have one selected day or many because we're only
99
+ * calculating the state for one button. So, we treat a single activeParts value
100
+ * the same as an array of length one.
101
+ */
102
+ const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];
103
+ /**
104
+ * The day button is active if it is selected, or in other words, if refParts
105
+ * matches at least one selected date.
106
+ */
107
+ const isActive = activePartsArray.find((parts) => isSameDay(refParts, parts)) !== undefined;
108
+ const isToday = isSameDay(refParts, todayParts);
109
+ const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);
110
+ /**
111
+ * Note that we always return one object regardless of whether activeParts
112
+ * was an array, since we pare down to one value for isActive.
113
+ */
114
+ return {
115
+ disabled,
116
+ isActive,
117
+ isToday,
118
+ ariaSelected: isActive ? 'true' : null,
119
+ ariaLabel: generateDayAriaLabel(locale, isToday, refParts),
120
+ text: refParts.day != null ? getDay(locale, refParts) : null,
121
+ };
122
+ };
123
+ /**
124
+ * Returns `true` if the month is disabled given the
125
+ * current date value and min/max date constraints.
126
+ */
127
+ const isMonthDisabled = (refParts, { minParts, maxParts, }) => {
128
+ // If the year is disabled then the month is disabled.
129
+ if (isYearDisabled(refParts.year, minParts, maxParts)) {
130
+ return true;
131
+ }
132
+ // If the date value is before the min date, then the month is disabled.
133
+ // If the date value is after the max date, then the month is disabled.
134
+ if ((minParts && isBefore(refParts, minParts)) || (maxParts && isAfter(refParts, maxParts))) {
135
+ return true;
136
+ }
137
+ return false;
138
+ };
139
+ /**
140
+ * Given a working date, an optional minimum date range,
141
+ * and an optional maximum date range; determine if the
142
+ * previous navigation button is disabled.
143
+ */
144
+ const isPrevMonthDisabled = (refParts, minParts, maxParts) => {
145
+ const prevMonth = Object.assign(Object.assign({}, getPreviousMonth(refParts)), { day: null });
146
+ return isMonthDisabled(prevMonth, {
147
+ minParts,
148
+ maxParts,
149
+ });
150
+ };
151
+ /**
152
+ * Given a working date and a maximum date range,
153
+ * determine if the next navigation button is disabled.
154
+ */
155
+ const isNextMonthDisabled = (refParts, maxParts) => {
156
+ const nextMonth = Object.assign(Object.assign({}, getNextMonth(refParts)), { day: null });
157
+ return isMonthDisabled(nextMonth, {
158
+ maxParts,
159
+ });
160
+ };
161
+ /**
162
+ * Given the value of the highlightedDates property
163
+ * and an ISO string, return the styles to use for
164
+ * that date, or undefined if none are found.
165
+ */
166
+ const getHighlightStyles = (highlightedDates, dateIsoString, el) => {
167
+ if (Array.isArray(highlightedDates)) {
168
+ const dateStringWithoutTime = dateIsoString.split('T')[0];
169
+ const matchingHighlight = highlightedDates.find((hd) => hd.date === dateStringWithoutTime);
170
+ if (matchingHighlight) {
171
+ return {
172
+ textColor: matchingHighlight.textColor,
173
+ backgroundColor: matchingHighlight.backgroundColor,
174
+ };
175
+ }
176
+ }
177
+ else {
178
+ /**
179
+ * Wrap in a try-catch to prevent exceptions in the user's function
180
+ * from interrupting the calendar's rendering.
181
+ */
182
+ try {
183
+ return highlightedDates(dateIsoString);
184
+ }
185
+ catch (e) {
186
+ printIonError('Exception thrown from provided `highlightedDates` callback. Please check your function and try again.', el, e);
187
+ }
188
+ }
189
+ return undefined;
190
+ };
191
+
192
+ /*!
193
+ * (C) Ionic http://ionicframework.com - MIT License
194
+ */
195
+ /**
196
+ * If a time zone is provided in the format options, the rendered text could
197
+ * differ from what was selected in the Datetime, which could cause
198
+ * confusion.
199
+ */
200
+ const warnIfTimeZoneProvided = (el, formatOptions) => {
201
+ var _a, _b, _c, _d;
202
+ if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) ||
203
+ ((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) ||
204
+ ((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) ||
205
+ ((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {
206
+ printIonWarning('Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".', el);
207
+ }
208
+ };
209
+ const checkForPresentationFormatMismatch = (el, presentation, formatOptions) => {
210
+ // formatOptions is not required
211
+ if (!formatOptions)
212
+ return;
213
+ // If formatOptions is provided, the date and/or time objects are required, depending on the presentation
214
+ switch (presentation) {
215
+ case 'date':
216
+ case 'month-year':
217
+ case 'month':
218
+ case 'year':
219
+ if (formatOptions.date === undefined) {
220
+ printIonWarning(`Datetime: The '${presentation}' presentation requires a date object in formatOptions.`, el);
221
+ }
222
+ break;
223
+ case 'time':
224
+ if (formatOptions.time === undefined) {
225
+ printIonWarning(`Datetime: The 'time' presentation requires a time object in formatOptions.`, el);
226
+ }
227
+ break;
228
+ case 'date-time':
229
+ case 'time-date':
230
+ if (formatOptions.date === undefined && formatOptions.time === undefined) {
231
+ printIonWarning(`Datetime: The '${presentation}' presentation requires either a date or time object (or both) in formatOptions.`, el);
232
+ }
233
+ break;
234
+ }
235
+ };
236
+
237
+ const datetimeIosCss = ":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{position:absolute;visibility:hidden;pointer-events:none}@supports (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{inset-inline-start:-99999px}}@supports not (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){:host(.show-month-and-year:dir(rtl)) .calendar-next-prev,:host(.show-month-and-year:dir(rtl)) .calendar-days-of-week,:host(.show-month-and-year:dir(rtl)) .calendar-body,:host(.show-month-and-year:dir(rtl)) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:flex}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center;width:auto}:host .calendar-action-buttons ion-item ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:flex;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:flex;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:flex;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #666666)}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc);font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}:host .calendar-action-buttons ion-item{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:min(1rem, 25.6px);font-weight:600}:host .calendar-action-buttons ion-item ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:flex;align-items:center;justify-content:space-between}:host .datetime-action-buttons{width:100%}";
238
+
239
+ const datetimeMdCss = ":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{position:absolute;visibility:hidden;pointer-events:none}@supports (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{inset-inline-start:-99999px}}@supports not (inset-inline-start: 0){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){:host(.show-month-and-year:dir(rtl)) .calendar-next-prev,:host(.show-month-and-year:dir(rtl)) .calendar-days-of-week,:host(.show-month-and-year:dir(rtl)) .calendar-body,:host(.show-month-and-year:dir(rtl)) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:flex}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center;width:auto}:host .calendar-action-buttons ion-item ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:flex;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:flex;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:flex;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .datetime-calendar .calendar-action-buttons ion-item{--padding-start:20px}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, #595959)}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, #595959)}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:flex;align-items:center;justify-content:flex-end}";
240
+
241
+ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends H {
242
+ constructor() {
243
+ super();
244
+ this.__registerHost();
245
+ this.__attachShadow();
246
+ this.ionCancel = createEvent(this, "ionCancel", 7);
247
+ this.ionChange = createEvent(this, "ionChange", 7);
248
+ this.ionValueChange = createEvent(this, "ionValueChange", 7);
249
+ this.ionFocus = createEvent(this, "ionFocus", 7);
250
+ this.ionBlur = createEvent(this, "ionBlur", 7);
251
+ this.ionStyle = createEvent(this, "ionStyle", 7);
252
+ this.ionRender = createEvent(this, "ionRender", 7);
253
+ this.inputId = `ion-dt-${datetimeIds++}`;
254
+ this.prevPresentation = null;
255
+ this.warnIfIncorrectValueUsage = () => {
256
+ const { multiple, value } = this;
257
+ if (!multiple && Array.isArray(value)) {
258
+ /**
259
+ * We do some processing on the `value` array so
260
+ * that it looks more like an array when logged to
261
+ * the console.
262
+ * Example given ['a', 'b']
263
+ * Default toString() behavior: a,b
264
+ * Custom behavior: ['a', 'b']
265
+ */
266
+ printIonWarning(`ion-datetime was passed an array of values, but multiple="false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
267
+
268
+ Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]
269
+ `, this.el);
270
+ }
271
+ };
272
+ this.setValue = (value) => {
273
+ this.value = value;
274
+ this.ionChange.emit({ value });
275
+ };
276
+ /**
277
+ * Returns the DatetimePart interface
278
+ * to use when rendering an initial set of
279
+ * data. This should be used when rendering an
280
+ * interface in an environment where the `value`
281
+ * may not be set. This function works
282
+ * by returning the first selected date and then
283
+ * falling back to defaultParts if no active date
284
+ * is selected.
285
+ */
286
+ this.getActivePartsWithFallback = () => {
287
+ var _a;
288
+ const { defaultParts } = this;
289
+ return (_a = this.getActivePart()) !== null && _a !== void 0 ? _a : defaultParts;
290
+ };
291
+ this.getActivePart = () => {
292
+ const { activeParts } = this;
293
+ return Array.isArray(activeParts) ? activeParts[0] : activeParts;
294
+ };
295
+ this.closeParentOverlay = () => {
296
+ const popoverOrModal = this.el.closest('ion-modal, ion-popover');
297
+ if (popoverOrModal) {
298
+ popoverOrModal.dismiss();
299
+ }
300
+ };
301
+ this.setWorkingParts = (parts) => {
302
+ this.workingParts = Object.assign({}, parts);
303
+ };
304
+ this.setActiveParts = (parts, removeDate = false) => {
305
+ /** if the datetime component is in readonly mode,
306
+ * allow browsing of the calendar without changing
307
+ * the set value
308
+ */
309
+ if (this.readonly) {
310
+ return;
311
+ }
312
+ const { multiple, minParts, maxParts, activeParts } = this;
313
+ /**
314
+ * When setting the active parts, it is possible
315
+ * to set invalid data. For example,
316
+ * when updating January 31 to February,
317
+ * February 31 does not exist. As a result
318
+ * we need to validate the active parts and
319
+ * ensure that we are only setting valid dates.
320
+ * Additionally, we need to update the working parts
321
+ * too in the event that the validated parts are different.
322
+ */
323
+ const validatedParts = validateParts(parts, minParts, maxParts);
324
+ this.setWorkingParts(validatedParts);
325
+ if (multiple) {
326
+ const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];
327
+ if (removeDate) {
328
+ this.activeParts = activePartsArray.filter((p) => !isSameDay(p, validatedParts));
329
+ }
330
+ else {
331
+ this.activeParts = [...activePartsArray, validatedParts];
332
+ }
333
+ }
334
+ else {
335
+ this.activeParts = Object.assign({}, validatedParts);
336
+ }
337
+ const hasSlottedButtons = this.el.querySelector('[slot="buttons"]') !== null;
338
+ if (hasSlottedButtons || this.showDefaultButtons) {
339
+ return;
340
+ }
341
+ this.confirm();
342
+ };
343
+ this.initializeKeyboardListeners = () => {
344
+ const calendarBodyRef = this.calendarBodyRef;
345
+ if (!calendarBodyRef) {
346
+ return;
347
+ }
348
+ const root = this.el.shadowRoot;
349
+ /**
350
+ * Get a reference to the month
351
+ * element we are currently viewing.
352
+ */
353
+ const currentMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(2)');
354
+ /**
355
+ * When focusing the calendar body, we want to pass focus
356
+ * to the working day, but other days should
357
+ * only be accessible using the arrow keys. Pressing
358
+ * Tab should jump between bodies of selectable content.
359
+ */
360
+ const checkCalendarBodyFocus = (ev) => {
361
+ var _a;
362
+ const record = ev[0];
363
+ /**
364
+ * If calendar body was already focused
365
+ * when this fired or if the calendar body
366
+ * if not currently focused, we should not re-focus
367
+ * the inner day.
368
+ */
369
+ if (((_a = record.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-focused')) || !calendarBodyRef.classList.contains('ion-focused')) {
370
+ return;
371
+ }
372
+ this.focusWorkingDay(currentMonth);
373
+ };
374
+ const mo = new MutationObserver(checkCalendarBodyFocus);
375
+ mo.observe(calendarBodyRef, { attributeFilter: ['class'], attributeOldValue: true });
376
+ this.destroyKeyboardMO = () => {
377
+ mo === null || mo === void 0 ? void 0 : mo.disconnect();
378
+ };
379
+ /**
380
+ * We must use keydown not keyup as we want
381
+ * to prevent scrolling when using the arrow keys.
382
+ */
383
+ calendarBodyRef.addEventListener('keydown', (ev) => {
384
+ const activeElement = root.activeElement;
385
+ if (!activeElement || !activeElement.classList.contains('calendar-day')) {
386
+ return;
387
+ }
388
+ const parts = getPartsFromCalendarDay(activeElement);
389
+ let partsToFocus;
390
+ switch (ev.key) {
391
+ case 'ArrowDown':
392
+ ev.preventDefault();
393
+ partsToFocus = getNextWeek(parts);
394
+ break;
395
+ case 'ArrowUp':
396
+ ev.preventDefault();
397
+ partsToFocus = getPreviousWeek(parts);
398
+ break;
399
+ case 'ArrowRight':
400
+ ev.preventDefault();
401
+ partsToFocus = getNextDay(parts);
402
+ break;
403
+ case 'ArrowLeft':
404
+ ev.preventDefault();
405
+ partsToFocus = getPreviousDay(parts);
406
+ break;
407
+ case 'Home':
408
+ ev.preventDefault();
409
+ partsToFocus = getStartOfWeek(parts);
410
+ break;
411
+ case 'End':
412
+ ev.preventDefault();
413
+ partsToFocus = getEndOfWeek(parts);
414
+ break;
415
+ case 'PageUp':
416
+ ev.preventDefault();
417
+ partsToFocus = ev.shiftKey ? getPreviousYear(parts) : getPreviousMonth(parts);
418
+ break;
419
+ case 'PageDown':
420
+ ev.preventDefault();
421
+ partsToFocus = ev.shiftKey ? getNextYear(parts) : getNextMonth(parts);
422
+ break;
423
+ /**
424
+ * Do not preventDefault here
425
+ * as we do not want to override other
426
+ * browser defaults such as pressing Enter/Space
427
+ * to select a day.
428
+ */
429
+ default:
430
+ return;
431
+ }
432
+ /**
433
+ * If the day we want to move focus to is
434
+ * disabled, do not do anything.
435
+ */
436
+ if (isDayDisabled(partsToFocus, this.minParts, this.maxParts)) {
437
+ return;
438
+ }
439
+ this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), partsToFocus));
440
+ /**
441
+ * Give view a chance to re-render
442
+ * then move focus to the new working day
443
+ */
444
+ requestAnimationFrame(() => this.focusWorkingDay(currentMonth));
445
+ });
446
+ };
447
+ this.focusWorkingDay = (currentMonth) => {
448
+ /**
449
+ * Get the number of padding days so
450
+ * we know how much to offset our next selector by
451
+ * to grab the correct calendar-day element.
452
+ */
453
+ const padding = currentMonth.querySelectorAll('.calendar-day-padding');
454
+ const { day } = this.workingParts;
455
+ if (day === null) {
456
+ return;
457
+ }
458
+ /**
459
+ * Get the calendar day element
460
+ * and focus it.
461
+ */
462
+ const dayEl = currentMonth.querySelector(`.calendar-day-wrapper:nth-of-type(${padding.length + day}) .calendar-day`);
463
+ if (dayEl) {
464
+ dayEl.focus();
465
+ }
466
+ };
467
+ this.processMinParts = () => {
468
+ const { min, defaultParts } = this;
469
+ if (min === undefined) {
470
+ this.minParts = undefined;
471
+ return;
472
+ }
473
+ this.minParts = parseMinParts(min, defaultParts);
474
+ };
475
+ this.processMaxParts = () => {
476
+ const { max, defaultParts } = this;
477
+ if (max === undefined) {
478
+ this.maxParts = undefined;
479
+ return;
480
+ }
481
+ this.maxParts = parseMaxParts(max, defaultParts);
482
+ };
483
+ this.initializeCalendarListener = () => {
484
+ const calendarBodyRef = this.calendarBodyRef;
485
+ if (!calendarBodyRef) {
486
+ return;
487
+ }
488
+ /**
489
+ * For performance reasons, we only render 3
490
+ * months at a time: The current month, the previous
491
+ * month, and the next month. We have a scroll listener
492
+ * on the calendar body to append/prepend new months.
493
+ *
494
+ * We can do this because Stencil is smart enough to not
495
+ * re-create the .calendar-month containers, but rather
496
+ * update the content within those containers.
497
+ *
498
+ * As an added bonus, WebKit has some troubles with
499
+ * scroll-snap-stop: always, so not rendering all of
500
+ * the months in a row allows us to mostly sidestep
501
+ * that issue.
502
+ */
503
+ const months = calendarBodyRef.querySelectorAll('.calendar-month');
504
+ const startMonth = months[0];
505
+ const workingMonth = months[1];
506
+ const endMonth = months[2];
507
+ const mode = getIonMode(this);
508
+ const needsiOSRubberBandFix = mode === 'ios' && typeof navigator !== 'undefined' && navigator.maxTouchPoints > 1;
509
+ /**
510
+ * Before setting up the scroll listener,
511
+ * scroll the middle month into view.
512
+ * scrollIntoView() will scroll entire page
513
+ * if element is not in viewport. Use scrollLeft instead.
514
+ */
515
+ writeTask(() => {
516
+ calendarBodyRef.scrollLeft = startMonth.clientWidth * (isRTL(this.el) ? -1 : 1);
517
+ const getChangedMonth = (parts) => {
518
+ const box = calendarBodyRef.getBoundingClientRect();
519
+ /**
520
+ * If the current scroll position is all the way to the left
521
+ * then we have scrolled to the previous month.
522
+ * Otherwise, assume that we have scrolled to the next
523
+ * month. We have a tolerance of 2px to account for
524
+ * sub pixel rendering.
525
+ *
526
+ * Check below the next line ensures that we did not
527
+ * swipe and abort (i.e. we swiped but we are still on the current month).
528
+ */
529
+ const month = calendarBodyRef.scrollLeft <= 2 ? startMonth : endMonth;
530
+ /**
531
+ * The edge of the month must be lined up with
532
+ * the edge of the calendar body in order for
533
+ * the component to update. Otherwise, it
534
+ * may be the case that the user has paused their
535
+ * swipe or the browser has not finished snapping yet.
536
+ * Rather than check if the x values are equal,
537
+ * we give it a tolerance of 2px to account for
538
+ * sub pixel rendering.
539
+ */
540
+ const monthBox = month.getBoundingClientRect();
541
+ if (Math.abs(monthBox.x - box.x) > 2)
542
+ return;
543
+ /**
544
+ * If we're force-rendering a month, assume we've
545
+ * scrolled to that and return it.
546
+ *
547
+ * If forceRenderDate is ever used in a context where the
548
+ * forced month is not immediately auto-scrolled to, this
549
+ * should be updated to also check whether `month` has the
550
+ * same month and year as the forced date.
551
+ */
552
+ const { forceRenderDate } = this;
553
+ if (forceRenderDate !== undefined) {
554
+ return { month: forceRenderDate.month, year: forceRenderDate.year, day: forceRenderDate.day };
555
+ }
556
+ /**
557
+ * From here, we can determine if the start
558
+ * month or the end month was scrolled into view.
559
+ * If no month was changed, then we can return from
560
+ * the scroll callback early.
561
+ */
562
+ if (month === startMonth) {
563
+ return getPreviousMonth(parts);
564
+ }
565
+ else if (month === endMonth) {
566
+ return getNextMonth(parts);
567
+ }
568
+ else {
569
+ return;
570
+ }
571
+ };
572
+ const updateActiveMonth = () => {
573
+ if (needsiOSRubberBandFix) {
574
+ calendarBodyRef.style.removeProperty('pointer-events');
575
+ appliediOSRubberBandFix = false;
576
+ }
577
+ /**
578
+ * If the month did not change
579
+ * then we can return early.
580
+ */
581
+ const newDate = getChangedMonth(this.workingParts);
582
+ if (!newDate)
583
+ return;
584
+ const { month, day, year } = newDate;
585
+ if (isMonthDisabled({ month, year, day: null }, {
586
+ minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),
587
+ maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),
588
+ })) {
589
+ return;
590
+ }
591
+ /**
592
+ * Prevent scrolling for other browsers
593
+ * to give the DOM time to update and the container
594
+ * time to properly snap.
595
+ */
596
+ calendarBodyRef.style.setProperty('overflow', 'hidden');
597
+ /**
598
+ * Use a writeTask here to ensure
599
+ * that the state is updated and the
600
+ * correct month is scrolled into view
601
+ * in the same frame. This is not
602
+ * typically a problem on newer devices
603
+ * but older/slower device may have a flicker
604
+ * if we did not do this.
605
+ */
606
+ writeTask(() => {
607
+ this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month, day: day, year }));
608
+ calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);
609
+ calendarBodyRef.style.removeProperty('overflow');
610
+ if (this.resolveForceDateScrolling) {
611
+ this.resolveForceDateScrolling();
612
+ }
613
+ });
614
+ };
615
+ /**
616
+ * When the container finishes scrolling we
617
+ * need to update the DOM with the selected month.
618
+ */
619
+ let scrollTimeout;
620
+ /**
621
+ * We do not want to attempt to set pointer-events
622
+ * multiple times within a single swipe gesture as
623
+ * that adds unnecessary work to the main thread.
624
+ */
625
+ let appliediOSRubberBandFix = false;
626
+ const scrollCallback = () => {
627
+ if (scrollTimeout) {
628
+ clearTimeout(scrollTimeout);
629
+ }
630
+ /**
631
+ * On iOS it is possible to quickly rubber band
632
+ * the scroll area before the scroll timeout has fired.
633
+ * This results in users reaching the end of the scrollable
634
+ * container before the DOM has updated.
635
+ * By setting `pointer-events: none` we can ensure that
636
+ * subsequent swipes do not happen while the container
637
+ * is snapping.
638
+ */
639
+ if (!appliediOSRubberBandFix && needsiOSRubberBandFix) {
640
+ calendarBodyRef.style.setProperty('pointer-events', 'none');
641
+ appliediOSRubberBandFix = true;
642
+ }
643
+ // Wait ~3 frames
644
+ scrollTimeout = setTimeout(updateActiveMonth, 50);
645
+ };
646
+ calendarBodyRef.addEventListener('scroll', scrollCallback);
647
+ this.destroyCalendarListener = () => {
648
+ calendarBodyRef.removeEventListener('scroll', scrollCallback);
649
+ };
650
+ });
651
+ };
652
+ /**
653
+ * Clean up all listeners except for the overlay
654
+ * listener. This is so that we can re-create the listeners
655
+ * if the datetime has been hidden/presented by a modal or popover.
656
+ */
657
+ this.destroyInteractionListeners = () => {
658
+ const { destroyCalendarListener, destroyKeyboardMO } = this;
659
+ if (destroyCalendarListener !== undefined) {
660
+ destroyCalendarListener();
661
+ }
662
+ if (destroyKeyboardMO !== undefined) {
663
+ destroyKeyboardMO();
664
+ }
665
+ };
666
+ this.processValue = (value) => {
667
+ const hasValue = value !== null && value !== undefined && (!Array.isArray(value) || value.length > 0);
668
+ const valueToProcess = hasValue ? parseDate(value) : this.defaultParts;
669
+ const { minParts, maxParts, workingParts, el } = this;
670
+ this.warnIfIncorrectValueUsage();
671
+ /**
672
+ * Return early if the value wasn't parsed correctly, such as
673
+ * if an improperly formatted date string was provided.
674
+ */
675
+ if (!valueToProcess) {
676
+ return;
677
+ }
678
+ /**
679
+ * Datetime should only warn of out of bounds values
680
+ * if set by the user. If the `value` is undefined,
681
+ * we will default to today's date which may be out
682
+ * of bounds. In this case, the warning makes it look
683
+ * like the developer did something wrong which is
684
+ * not true.
685
+ */
686
+ if (hasValue) {
687
+ warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);
688
+ }
689
+ /**
690
+ * If there are multiple values, pick an arbitrary one to clamp to. This way,
691
+ * if the values are across months, we always show at least one of them. Note
692
+ * that the values don't necessarily have to be in order.
693
+ */
694
+ const singleValue = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;
695
+ const targetValue = clampDate(singleValue, minParts, maxParts);
696
+ const { month, day, year, hour, minute } = targetValue;
697
+ const ampm = parseAmPm(hour);
698
+ /**
699
+ * Since `activeParts` indicates a value that
700
+ * been explicitly selected either by the
701
+ * user or the app, only update `activeParts`
702
+ * if the `value` property is set.
703
+ */
704
+ if (hasValue) {
705
+ if (Array.isArray(valueToProcess)) {
706
+ this.activeParts = [...valueToProcess];
707
+ }
708
+ else {
709
+ this.activeParts = {
710
+ month,
711
+ day,
712
+ year,
713
+ hour,
714
+ minute,
715
+ ampm,
716
+ };
717
+ }
718
+ }
719
+ else {
720
+ /**
721
+ * Reset the active parts if the value is not set.
722
+ * This will clear the selected calendar day when
723
+ * performing a clear action or using the reset() method.
724
+ */
725
+ this.activeParts = [];
726
+ }
727
+ /**
728
+ * Only animate if:
729
+ * 1. We're using grid style (wheel style pickers should just jump to new value)
730
+ * 2. The month and/or year actually changed, and both are defined (otherwise there's nothing to animate to)
731
+ * 3. The calendar body is visible (prevents animation when in collapsed datetime-button, for example)
732
+ * 4. The month/year picker is not open (since you wouldn't see the animation anyway)
733
+ */
734
+ const didChangeMonth = (month !== undefined && month !== workingParts.month) || (year !== undefined && year !== workingParts.year);
735
+ const bodyIsVisible = el.classList.contains('datetime-ready');
736
+ const { isGridStyle, showMonthAndYear } = this;
737
+ let areAllSelectedDatesInSameMonth = true;
738
+ if (Array.isArray(valueToProcess)) {
739
+ const firstMonth = valueToProcess[0].month;
740
+ for (const date of valueToProcess) {
741
+ if (date.month !== firstMonth) {
742
+ areAllSelectedDatesInSameMonth = false;
743
+ break;
744
+ }
745
+ }
746
+ }
747
+ /**
748
+ * If there is more than one date selected
749
+ * and the dates aren't all in the same month,
750
+ * then we should neither animate to the date
751
+ * nor update the working parts because we do
752
+ * not know which date the user wants to view.
753
+ */
754
+ if (areAllSelectedDatesInSameMonth) {
755
+ if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) {
756
+ this.animateToDate(targetValue);
757
+ }
758
+ else {
759
+ /**
760
+ * We only need to do this if we didn't just animate to a new month,
761
+ * since that calls prevMonth/nextMonth which calls setWorkingParts for us.
762
+ */
763
+ this.setWorkingParts({
764
+ month,
765
+ day,
766
+ year,
767
+ hour,
768
+ minute,
769
+ ampm,
770
+ });
771
+ }
772
+ }
773
+ };
774
+ this.animateToDate = async (targetValue) => {
775
+ const { workingParts } = this;
776
+ /**
777
+ * Tell other render functions that we need to force the
778
+ * target month to appear in place of the actual next/prev month.
779
+ * Because this is a State variable, a rerender will be triggered
780
+ * automatically, updating the rendered months.
781
+ */
782
+ this.forceRenderDate = targetValue;
783
+ /**
784
+ * Flag that we've started scrolling to the forced date.
785
+ * The resolve function will be called by the datetime's
786
+ * scroll listener when it's done updating everything.
787
+ * This is a replacement for making prev/nextMonth async,
788
+ * since the logic we're waiting on is in a listener.
789
+ */
790
+ const forceDateScrollingPromise = new Promise((resolve) => {
791
+ this.resolveForceDateScrolling = resolve;
792
+ });
793
+ /**
794
+ * Animate smoothly to the forced month. This will also update
795
+ * workingParts and correct the surrounding months for us.
796
+ */
797
+ const targetMonthIsBefore = isBefore(targetValue, workingParts);
798
+ targetMonthIsBefore ? this.prevMonth() : this.nextMonth();
799
+ await forceDateScrollingPromise;
800
+ this.resolveForceDateScrolling = undefined;
801
+ this.forceRenderDate = undefined;
802
+ };
803
+ this.onFocus = () => {
804
+ this.ionFocus.emit();
805
+ };
806
+ this.onBlur = () => {
807
+ this.ionBlur.emit();
808
+ };
809
+ this.hasValue = () => {
810
+ return this.value != null;
811
+ };
812
+ this.nextMonth = () => {
813
+ const calendarBodyRef = this.calendarBodyRef;
814
+ if (!calendarBodyRef) {
815
+ return;
816
+ }
817
+ const nextMonth = calendarBodyRef.querySelector('.calendar-month:last-of-type');
818
+ if (!nextMonth) {
819
+ return;
820
+ }
821
+ const left = nextMonth.offsetWidth * 2;
822
+ calendarBodyRef.scrollTo({
823
+ top: 0,
824
+ left: left * (isRTL(this.el) ? -1 : 1),
825
+ behavior: 'smooth',
826
+ });
827
+ };
828
+ this.prevMonth = () => {
829
+ const calendarBodyRef = this.calendarBodyRef;
830
+ if (!calendarBodyRef) {
831
+ return;
832
+ }
833
+ const prevMonth = calendarBodyRef.querySelector('.calendar-month:first-of-type');
834
+ if (!prevMonth) {
835
+ return;
836
+ }
837
+ calendarBodyRef.scrollTo({
838
+ top: 0,
839
+ left: 0,
840
+ behavior: 'smooth',
841
+ });
842
+ };
843
+ this.toggleMonthAndYearView = () => {
844
+ this.showMonthAndYear = !this.showMonthAndYear;
845
+ };
846
+ this.showMonthAndYear = false;
847
+ this.activeParts = [];
848
+ this.workingParts = {
849
+ month: 5,
850
+ day: 28,
851
+ year: 2021,
852
+ hour: 13,
853
+ minute: 52,
854
+ ampm: 'pm',
855
+ };
856
+ this.isTimePopoverOpen = false;
857
+ this.forceRenderDate = undefined;
858
+ this.color = 'primary';
859
+ this.name = this.inputId;
860
+ this.disabled = false;
861
+ this.formatOptions = undefined;
862
+ this.readonly = false;
863
+ this.isDateEnabled = undefined;
864
+ this.min = undefined;
865
+ this.max = undefined;
866
+ this.presentation = 'date-time';
867
+ this.cancelText = 'Cancel';
868
+ this.doneText = 'Done';
869
+ this.clearText = 'Clear';
870
+ this.yearValues = undefined;
871
+ this.monthValues = undefined;
872
+ this.dayValues = undefined;
873
+ this.hourValues = undefined;
874
+ this.minuteValues = undefined;
875
+ this.locale = 'default';
876
+ this.firstDayOfWeek = 0;
877
+ this.titleSelectedDatesFormatter = undefined;
878
+ this.multiple = false;
879
+ this.highlightedDates = undefined;
880
+ this.value = undefined;
881
+ this.showDefaultTitle = false;
882
+ this.showDefaultButtons = false;
883
+ this.showClearButton = false;
884
+ this.showDefaultTimeLabel = true;
885
+ this.hourCycle = undefined;
886
+ this.size = 'fixed';
887
+ this.preferWheel = false;
888
+ }
889
+ formatOptionsChanged() {
890
+ const { el, formatOptions, presentation } = this;
891
+ checkForPresentationFormatMismatch(el, presentation, formatOptions);
892
+ warnIfTimeZoneProvided(el, formatOptions);
893
+ }
894
+ disabledChanged() {
895
+ this.emitStyle();
896
+ }
897
+ minChanged() {
898
+ this.processMinParts();
899
+ }
900
+ maxChanged() {
901
+ this.processMaxParts();
902
+ }
903
+ presentationChanged() {
904
+ const { el, formatOptions, presentation } = this;
905
+ checkForPresentationFormatMismatch(el, presentation, formatOptions);
906
+ }
907
+ get isGridStyle() {
908
+ const { presentation, preferWheel } = this;
909
+ const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
910
+ return hasDatePresentation && !preferWheel;
911
+ }
912
+ yearValuesChanged() {
913
+ this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);
914
+ }
915
+ monthValuesChanged() {
916
+ this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);
917
+ }
918
+ dayValuesChanged() {
919
+ this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);
920
+ }
921
+ hourValuesChanged() {
922
+ this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);
923
+ }
924
+ minuteValuesChanged() {
925
+ this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);
926
+ }
927
+ /**
928
+ * Update the datetime value when the value changes
929
+ */
930
+ async valueChanged() {
931
+ const { value } = this;
932
+ if (this.hasValue()) {
933
+ this.processValue(value);
934
+ }
935
+ this.emitStyle();
936
+ this.ionValueChange.emit({ value });
937
+ }
938
+ /**
939
+ * Confirms the selected datetime value, updates the
940
+ * `value` property, and optionally closes the popover
941
+ * or modal that the datetime was presented in.
942
+ */
943
+ async confirm(closeOverlay = false) {
944
+ const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
945
+ /**
946
+ * We only update the value if the presentation is not a calendar picker.
947
+ */
948
+ if (activeParts !== undefined || !isCalendarPicker) {
949
+ const activePartsIsArray = Array.isArray(activeParts);
950
+ if (activePartsIsArray && activeParts.length === 0) {
951
+ if (preferWheel) {
952
+ /**
953
+ * If the datetime is using a wheel picker, but the
954
+ * active parts are empty, then the user has confirmed the
955
+ * initial value (working parts) presented to them.
956
+ */
957
+ this.setValue(convertDataToISO(workingParts));
958
+ }
959
+ else {
960
+ this.setValue(undefined);
961
+ }
962
+ }
963
+ else {
964
+ this.setValue(convertDataToISO(activeParts));
965
+ }
966
+ }
967
+ if (closeOverlay) {
968
+ this.closeParentOverlay();
969
+ }
970
+ }
971
+ /**
972
+ * Resets the internal state of the datetime but does not update the value.
973
+ * Passing a valid ISO-8601 string will reset the state of the component to the provided date.
974
+ * If no value is provided, the internal state will be reset to the clamped value of the min, max and today.
975
+ */
976
+ async reset(startDate) {
977
+ this.processValue(startDate);
978
+ }
979
+ /**
980
+ * Emits the ionCancel event and
981
+ * optionally closes the popover
982
+ * or modal that the datetime was
983
+ * presented in.
984
+ */
985
+ async cancel(closeOverlay = false) {
986
+ this.ionCancel.emit();
987
+ if (closeOverlay) {
988
+ this.closeParentOverlay();
989
+ }
990
+ }
991
+ get isCalendarPicker() {
992
+ const { presentation } = this;
993
+ return presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
994
+ }
995
+ connectedCallback() {
996
+ this.clearFocusVisible = startFocusVisible(this.el).destroy;
997
+ }
998
+ disconnectedCallback() {
999
+ if (this.clearFocusVisible) {
1000
+ this.clearFocusVisible();
1001
+ this.clearFocusVisible = undefined;
1002
+ }
1003
+ }
1004
+ initializeListeners() {
1005
+ this.initializeCalendarListener();
1006
+ this.initializeKeyboardListeners();
1007
+ }
1008
+ componentDidLoad() {
1009
+ const { el, intersectionTrackerRef } = this;
1010
+ /**
1011
+ * If a scrollable element is hidden using `display: none`,
1012
+ * it will not have a scroll height meaning we cannot scroll elements
1013
+ * into view. As a result, we will need to wait for the datetime to become
1014
+ * visible if used inside of a modal or a popover otherwise the scrollable
1015
+ * areas will not have the correct values snapped into place.
1016
+ */
1017
+ const visibleCallback = (entries) => {
1018
+ const ev = entries[0];
1019
+ if (!ev.isIntersecting) {
1020
+ return;
1021
+ }
1022
+ this.initializeListeners();
1023
+ /**
1024
+ * TODO FW-2793: Datetime needs a frame to ensure that it
1025
+ * can properly scroll contents into view. As a result
1026
+ * we hide the scrollable content until after that frame
1027
+ * so users do not see the content quickly shifting. The downside
1028
+ * is that the content will pop into view a frame after. Maybe there
1029
+ * is a better way to handle this?
1030
+ */
1031
+ writeTask(() => {
1032
+ this.el.classList.add('datetime-ready');
1033
+ });
1034
+ };
1035
+ const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });
1036
+ /**
1037
+ * Use raf to avoid a race condition between the component loading and
1038
+ * its display animation starting (such as when shown in a modal). This
1039
+ * could cause the datetime to start at a visibility of 0, erroneously
1040
+ * triggering the `hiddenIO` observer below.
1041
+ */
1042
+ raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(intersectionTrackerRef));
1043
+ /**
1044
+ * We need to clean up listeners when the datetime is hidden
1045
+ * in a popover/modal so that we can properly scroll containers
1046
+ * back into view if they are re-presented. When the datetime is hidden
1047
+ * the scroll areas have scroll widths/heights of 0px, so any snapping
1048
+ * we did originally has been lost.
1049
+ */
1050
+ const hiddenCallback = (entries) => {
1051
+ const ev = entries[0];
1052
+ if (ev.isIntersecting) {
1053
+ return;
1054
+ }
1055
+ this.destroyInteractionListeners();
1056
+ /**
1057
+ * When datetime is hidden, we need to make sure that
1058
+ * the month/year picker is closed. Otherwise,
1059
+ * it will be open when the datetime re-appears
1060
+ * and the scroll area of the calendar grid will be 0.
1061
+ * As a result, the wrong month will be shown.
1062
+ */
1063
+ this.showMonthAndYear = false;
1064
+ writeTask(() => {
1065
+ this.el.classList.remove('datetime-ready');
1066
+ });
1067
+ };
1068
+ const hiddenIO = new IntersectionObserver(hiddenCallback, { threshold: 0, root: el });
1069
+ raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(intersectionTrackerRef));
1070
+ /**
1071
+ * Datetime uses Ionic components that emit
1072
+ * ionFocus and ionBlur. These events are
1073
+ * composed meaning they will cross
1074
+ * the shadow dom boundary. We need to
1075
+ * stop propagation on these events otherwise
1076
+ * developers will see 2 ionFocus or 2 ionBlur
1077
+ * events at a time.
1078
+ */
1079
+ const root = getElementRoot(this.el);
1080
+ root.addEventListener('ionFocus', (ev) => ev.stopPropagation());
1081
+ root.addEventListener('ionBlur', (ev) => ev.stopPropagation());
1082
+ }
1083
+ /**
1084
+ * When the presentation is changed, all calendar content is recreated,
1085
+ * so we need to re-init behavior with the new elements.
1086
+ */
1087
+ componentDidRender() {
1088
+ const { presentation, prevPresentation, calendarBodyRef, minParts, preferWheel, forceRenderDate } = this;
1089
+ /**
1090
+ * TODO(FW-2165)
1091
+ * Remove this when https://bugs.webkit.org/show_bug.cgi?id=235960 is fixed.
1092
+ * When using `min`, we add `scroll-snap-align: none`
1093
+ * to the disabled month so that users cannot scroll to it.
1094
+ * This triggers a bug in WebKit where the scroll position is reset.
1095
+ * Since the month change logic is handled by a scroll listener,
1096
+ * this causes the month to change leading to `scroll-snap-align`
1097
+ * changing again, thus changing the scroll position again and causing
1098
+ * an infinite loop.
1099
+ * This issue only applies to the calendar grid, so we can disable
1100
+ * it if the calendar grid is not being used.
1101
+ */
1102
+ const hasCalendarGrid = !preferWheel && ['date-time', 'time-date', 'date'].includes(presentation);
1103
+ if (minParts !== undefined && hasCalendarGrid && calendarBodyRef) {
1104
+ const workingMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(1)');
1105
+ /**
1106
+ * We need to make sure the datetime is not in the process
1107
+ * of scrolling to a new datetime value if the value
1108
+ * is updated programmatically.
1109
+ * Otherwise, the datetime will appear to not scroll at all because
1110
+ * we are resetting the scroll position to the center of the view.
1111
+ * Prior to the datetime's value being updated programmatically,
1112
+ * the calendarBodyRef is scrolled such that the middle month is centered
1113
+ * in the view. The below code updates the scroll position so the middle
1114
+ * month is also centered in the view. Since the scroll position did not change,
1115
+ * the scroll callback in this file does not fire,
1116
+ * and the resolveForceDateScrolling promise never resolves.
1117
+ */
1118
+ if (workingMonth && forceRenderDate === undefined) {
1119
+ calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);
1120
+ }
1121
+ }
1122
+ if (prevPresentation === null) {
1123
+ this.prevPresentation = presentation;
1124
+ return;
1125
+ }
1126
+ if (presentation === prevPresentation) {
1127
+ return;
1128
+ }
1129
+ this.prevPresentation = presentation;
1130
+ this.destroyInteractionListeners();
1131
+ this.initializeListeners();
1132
+ /**
1133
+ * The month/year picker from the date interface
1134
+ * should be closed as it is not available in non-date
1135
+ * interfaces.
1136
+ */
1137
+ this.showMonthAndYear = false;
1138
+ raf(() => {
1139
+ this.ionRender.emit();
1140
+ });
1141
+ }
1142
+ componentWillLoad() {
1143
+ const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
1144
+ if (multiple) {
1145
+ if (presentation !== 'date') {
1146
+ printIonWarning('Multiple date selection is only supported for presentation="date".', el);
1147
+ }
1148
+ if (preferWheel) {
1149
+ printIonWarning('Multiple date selection is not supported with preferWheel="true".', el);
1150
+ }
1151
+ }
1152
+ if (highlightedDates !== undefined) {
1153
+ if (presentation !== 'date' && presentation !== 'date-time' && presentation !== 'time-date') {
1154
+ printIonWarning('The highlightedDates property is only supported with the date, date-time, and time-date presentations.', el);
1155
+ }
1156
+ if (preferWheel) {
1157
+ printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
1158
+ }
1159
+ }
1160
+ if (formatOptions) {
1161
+ checkForPresentationFormatMismatch(el, presentation, formatOptions);
1162
+ warnIfTimeZoneProvided(el, formatOptions);
1163
+ }
1164
+ const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
1165
+ const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));
1166
+ const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));
1167
+ const yearValues = (this.parsedYearValues = convertToArrayOfNumbers(this.yearValues));
1168
+ const dayValues = (this.parsedDayValues = convertToArrayOfNumbers(this.dayValues));
1169
+ const todayParts = (this.todayParts = parseDate(getToday()));
1170
+ this.processMinParts();
1171
+ this.processMaxParts();
1172
+ this.defaultParts = getClosestValidDate({
1173
+ refParts: todayParts,
1174
+ monthValues,
1175
+ dayValues,
1176
+ yearValues,
1177
+ hourValues,
1178
+ minuteValues,
1179
+ minParts: this.minParts,
1180
+ maxParts: this.maxParts,
1181
+ });
1182
+ this.processValue(this.value);
1183
+ this.emitStyle();
1184
+ }
1185
+ emitStyle() {
1186
+ this.ionStyle.emit({
1187
+ interactive: true,
1188
+ datetime: true,
1189
+ 'interactive-disabled': this.disabled,
1190
+ });
1191
+ }
1192
+ /**
1193
+ * Universal render methods
1194
+ * These are pieces of datetime that
1195
+ * are rendered independently of presentation.
1196
+ */
1197
+ renderFooter() {
1198
+ const { disabled, readonly, showDefaultButtons, showClearButton } = this;
1199
+ /**
1200
+ * The cancel, clear, and confirm buttons
1201
+ * should not be interactive if the datetime
1202
+ * is disabled or readonly.
1203
+ */
1204
+ const isButtonDisabled = disabled || readonly;
1205
+ const hasSlottedButtons = this.el.querySelector('[slot="buttons"]') !== null;
1206
+ if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {
1207
+ return;
1208
+ }
1209
+ const clearButtonClick = () => {
1210
+ this.reset();
1211
+ this.setValue(undefined);
1212
+ };
1213
+ /**
1214
+ * By default we render two buttons:
1215
+ * Cancel - Dismisses the datetime and
1216
+ * does not update the `value` prop.
1217
+ * OK - Dismisses the datetime and
1218
+ * updates the `value` prop.
1219
+ */
1220
+ return (h("div", { class: "datetime-footer" }, h("div", { class: "datetime-buttons" }, h("div", { class: {
1221
+ ['datetime-action-buttons']: true,
1222
+ ['has-clear-button']: this.showClearButton,
1223
+ } }, h("slot", { name: "buttons" }, h("ion-buttons", null, showDefaultButtons && (h("ion-button", { id: "cancel-button", color: this.color, onClick: () => this.cancel(true), disabled: isButtonDisabled }, this.cancelText)), h("div", { class: "datetime-action-buttons-container" }, showClearButton && (h("ion-button", { id: "clear-button", color: this.color, onClick: () => clearButtonClick(), disabled: isButtonDisabled }, this.clearText)), showDefaultButtons && (h("ion-button", { id: "confirm-button", color: this.color, onClick: () => this.confirm(true), disabled: isButtonDisabled }, this.doneText)))))))));
1224
+ }
1225
+ /**
1226
+ * Wheel picker render methods
1227
+ */
1228
+ renderWheelPicker(forcePresentation = this.presentation) {
1229
+ /**
1230
+ * If presentation="time-date" we switch the
1231
+ * order of the render array here instead of
1232
+ * manually reordering each date/time picker
1233
+ * column with CSS. This allows for additional
1234
+ * flexibility if we need to render subsets
1235
+ * of the date/time data or do additional ordering
1236
+ * within the child render functions.
1237
+ */
1238
+ const renderArray = forcePresentation === 'time-date'
1239
+ ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
1240
+ : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
1241
+ return h("ion-picker-internal", null, renderArray);
1242
+ }
1243
+ renderDatePickerColumns(forcePresentation) {
1244
+ return forcePresentation === 'date-time' || forcePresentation === 'time-date'
1245
+ ? this.renderCombinedDatePickerColumn()
1246
+ : this.renderIndividualDatePickerColumns(forcePresentation);
1247
+ }
1248
+ renderCombinedDatePickerColumn() {
1249
+ const { defaultParts, disabled, workingParts, locale, minParts, maxParts, todayParts, isDateEnabled } = this;
1250
+ const activePart = this.getActivePartsWithFallback();
1251
+ /**
1252
+ * By default, generate a range of 3 months:
1253
+ * Previous month, current month, and next month
1254
+ */
1255
+ const monthsToRender = generateMonths(workingParts);
1256
+ const lastMonth = monthsToRender[monthsToRender.length - 1];
1257
+ /**
1258
+ * Ensure that users can select the entire window of dates.
1259
+ */
1260
+ monthsToRender[0].day = 1;
1261
+ lastMonth.day = getNumDaysInMonth(lastMonth.month, lastMonth.year);
1262
+ /**
1263
+ * Narrow the dates rendered based on min/max dates (if any).
1264
+ * The `min` date is used if the min is after the generated min month.
1265
+ * The `max` date is used if the max is before the generated max month.
1266
+ * This ensures that the sliding window always stays at 3 months
1267
+ * but still allows future dates to be lazily rendered based on any min/max
1268
+ * constraints.
1269
+ */
1270
+ const min = minParts !== undefined && isAfter(minParts, monthsToRender[0]) ? minParts : monthsToRender[0];
1271
+ const max = maxParts !== undefined && isBefore(maxParts, lastMonth) ? maxParts : lastMonth;
1272
+ const result = getCombinedDateColumnData(locale, todayParts, min, max, this.parsedDayValues, this.parsedMonthValues);
1273
+ let items = result.items;
1274
+ const parts = result.parts;
1275
+ if (isDateEnabled) {
1276
+ items = items.map((itemObject, index) => {
1277
+ const referenceParts = parts[index];
1278
+ let disabled;
1279
+ try {
1280
+ /**
1281
+ * The `isDateEnabled` implementation is try-catch wrapped
1282
+ * to prevent exceptions in the user's function from
1283
+ * interrupting the calendar rendering.
1284
+ */
1285
+ disabled = !isDateEnabled(convertDataToISO(referenceParts));
1286
+ }
1287
+ catch (e) {
1288
+ printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);
1289
+ }
1290
+ return Object.assign(Object.assign({}, itemObject), { disabled });
1291
+ });
1292
+ }
1293
+ /**
1294
+ * If we have selected a day already, then default the column
1295
+ * to that value. Otherwise, set it to the default date.
1296
+ */
1297
+ const todayString = workingParts.day !== null
1298
+ ? `${workingParts.year}-${workingParts.month}-${workingParts.day}`
1299
+ : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;
1300
+ return (h("ion-picker-column-internal", { class: "date-column", color: this.color, disabled: disabled, items: items, value: todayString, onIonChange: (ev) => {
1301
+ // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1302
+ // Due to a Safari 14 issue we need to destroy
1303
+ // the scroll listener before we update state
1304
+ // and trigger a re-render.
1305
+ if (this.destroyCalendarListener) {
1306
+ this.destroyCalendarListener();
1307
+ }
1308
+ const { value } = ev.detail;
1309
+ const findPart = parts.find(({ month, day, year }) => value === `${year}-${month}-${day}`);
1310
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), findPart));
1311
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), findPart));
1312
+ // We can re-attach the scroll listener after
1313
+ // the working parts have been updated.
1314
+ this.initializeCalendarListener();
1315
+ ev.stopPropagation();
1316
+ } }));
1317
+ }
1318
+ renderIndividualDatePickerColumns(forcePresentation) {
1319
+ const { workingParts, isDateEnabled } = this;
1320
+ const shouldRenderMonths = forcePresentation !== 'year' && forcePresentation !== 'time';
1321
+ const months = shouldRenderMonths
1322
+ ? getMonthColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedMonthValues)
1323
+ : [];
1324
+ const shouldRenderDays = forcePresentation === 'date';
1325
+ let days = shouldRenderDays
1326
+ ? getDayColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedDayValues)
1327
+ : [];
1328
+ if (isDateEnabled) {
1329
+ days = days.map((dayObject) => {
1330
+ const { value } = dayObject;
1331
+ const valueNum = typeof value === 'string' ? parseInt(value) : value;
1332
+ const referenceParts = {
1333
+ month: workingParts.month,
1334
+ day: valueNum,
1335
+ year: workingParts.year,
1336
+ };
1337
+ let disabled;
1338
+ try {
1339
+ /**
1340
+ * The `isDateEnabled` implementation is try-catch wrapped
1341
+ * to prevent exceptions in the user's function from
1342
+ * interrupting the calendar rendering.
1343
+ */
1344
+ disabled = !isDateEnabled(convertDataToISO(referenceParts));
1345
+ }
1346
+ catch (e) {
1347
+ printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);
1348
+ }
1349
+ return Object.assign(Object.assign({}, dayObject), { disabled });
1350
+ });
1351
+ }
1352
+ const shouldRenderYears = forcePresentation !== 'month' && forcePresentation !== 'time';
1353
+ const years = shouldRenderYears
1354
+ ? getYearColumnData(this.locale, this.defaultParts, this.minParts, this.maxParts, this.parsedYearValues)
1355
+ : [];
1356
+ /**
1357
+ * Certain locales show the day before the month.
1358
+ */
1359
+ const showMonthFirst = isMonthFirstLocale(this.locale, { month: 'numeric', day: 'numeric' });
1360
+ let renderArray = [];
1361
+ if (showMonthFirst) {
1362
+ renderArray = [
1363
+ this.renderMonthPickerColumn(months),
1364
+ this.renderDayPickerColumn(days),
1365
+ this.renderYearPickerColumn(years),
1366
+ ];
1367
+ }
1368
+ else {
1369
+ renderArray = [
1370
+ this.renderDayPickerColumn(days),
1371
+ this.renderMonthPickerColumn(months),
1372
+ this.renderYearPickerColumn(years),
1373
+ ];
1374
+ }
1375
+ return renderArray;
1376
+ }
1377
+ renderDayPickerColumn(days) {
1378
+ var _a;
1379
+ if (days.length === 0) {
1380
+ return [];
1381
+ }
1382
+ const { disabled, workingParts } = this;
1383
+ const activePart = this.getActivePartsWithFallback();
1384
+ return (h("ion-picker-column-internal", { class: "day-column", color: this.color, disabled: disabled, items: days, value: (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined, onIonChange: (ev) => {
1385
+ // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1386
+ // Due to a Safari 14 issue we need to destroy
1387
+ // the scroll listener before we update state
1388
+ // and trigger a re-render.
1389
+ if (this.destroyCalendarListener) {
1390
+ this.destroyCalendarListener();
1391
+ }
1392
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { day: ev.detail.value }));
1393
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { day: ev.detail.value }));
1394
+ // We can re-attach the scroll listener after
1395
+ // the working parts have been updated.
1396
+ this.initializeCalendarListener();
1397
+ ev.stopPropagation();
1398
+ } }));
1399
+ }
1400
+ renderMonthPickerColumn(months) {
1401
+ if (months.length === 0) {
1402
+ return [];
1403
+ }
1404
+ const { disabled, workingParts } = this;
1405
+ const activePart = this.getActivePartsWithFallback();
1406
+ return (h("ion-picker-column-internal", { class: "month-column", color: this.color, disabled: disabled, items: months, value: workingParts.month, onIonChange: (ev) => {
1407
+ // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1408
+ // Due to a Safari 14 issue we need to destroy
1409
+ // the scroll listener before we update state
1410
+ // and trigger a re-render.
1411
+ if (this.destroyCalendarListener) {
1412
+ this.destroyCalendarListener();
1413
+ }
1414
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { month: ev.detail.value }));
1415
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { month: ev.detail.value }));
1416
+ // We can re-attach the scroll listener after
1417
+ // the working parts have been updated.
1418
+ this.initializeCalendarListener();
1419
+ ev.stopPropagation();
1420
+ } }));
1421
+ }
1422
+ renderYearPickerColumn(years) {
1423
+ if (years.length === 0) {
1424
+ return [];
1425
+ }
1426
+ const { disabled, workingParts } = this;
1427
+ const activePart = this.getActivePartsWithFallback();
1428
+ return (h("ion-picker-column-internal", { class: "year-column", color: this.color, disabled: disabled, items: years, value: workingParts.year, onIonChange: (ev) => {
1429
+ // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1430
+ // Due to a Safari 14 issue we need to destroy
1431
+ // the scroll listener before we update state
1432
+ // and trigger a re-render.
1433
+ if (this.destroyCalendarListener) {
1434
+ this.destroyCalendarListener();
1435
+ }
1436
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { year: ev.detail.value }));
1437
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { year: ev.detail.value }));
1438
+ // We can re-attach the scroll listener after
1439
+ // the working parts have been updated.
1440
+ this.initializeCalendarListener();
1441
+ ev.stopPropagation();
1442
+ } }));
1443
+ }
1444
+ renderTimePickerColumns(forcePresentation) {
1445
+ if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {
1446
+ return [];
1447
+ }
1448
+ /**
1449
+ * If a user has not selected a date,
1450
+ * then we should show all times. If the
1451
+ * user has selected a date (even if it has
1452
+ * not been confirmed yet), we should apply
1453
+ * the max and min restrictions so that the
1454
+ * time picker shows values that are
1455
+ * appropriate for the selected date.
1456
+ */
1457
+ const activePart = this.getActivePart();
1458
+ const userHasSelectedDate = activePart !== undefined;
1459
+ const { hoursData, minutesData, dayPeriodData } = getTimeColumnsData(this.locale, this.workingParts, this.hourCycle, userHasSelectedDate ? this.minParts : undefined, userHasSelectedDate ? this.maxParts : undefined, this.parsedHourValues, this.parsedMinuteValues);
1460
+ return [
1461
+ this.renderHourPickerColumn(hoursData),
1462
+ this.renderMinutePickerColumn(minutesData),
1463
+ this.renderDayPeriodPickerColumn(dayPeriodData),
1464
+ ];
1465
+ }
1466
+ renderHourPickerColumn(hoursData) {
1467
+ const { disabled, workingParts } = this;
1468
+ if (hoursData.length === 0)
1469
+ return [];
1470
+ const activePart = this.getActivePartsWithFallback();
1471
+ return (h("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.hour, items: hoursData, numericInput: true, onIonChange: (ev) => {
1472
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));
1473
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { hour: ev.detail.value }));
1474
+ ev.stopPropagation();
1475
+ } }));
1476
+ }
1477
+ renderMinutePickerColumn(minutesData) {
1478
+ const { disabled, workingParts } = this;
1479
+ if (minutesData.length === 0)
1480
+ return [];
1481
+ const activePart = this.getActivePartsWithFallback();
1482
+ return (h("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.minute, items: minutesData, numericInput: true, onIonChange: (ev) => {
1483
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));
1484
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { minute: ev.detail.value }));
1485
+ ev.stopPropagation();
1486
+ } }));
1487
+ }
1488
+ renderDayPeriodPickerColumn(dayPeriodData) {
1489
+ const { disabled, workingParts } = this;
1490
+ if (dayPeriodData.length === 0) {
1491
+ return [];
1492
+ }
1493
+ const activePart = this.getActivePartsWithFallback();
1494
+ const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);
1495
+ return (h("ion-picker-column-internal", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, items: dayPeriodData, onIonChange: (ev) => {
1496
+ const hour = calculateHourFromAMPM(workingParts, ev.detail.value);
1497
+ this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));
1498
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { ampm: ev.detail.value, hour }));
1499
+ ev.stopPropagation();
1500
+ } }));
1501
+ }
1502
+ renderWheelView(forcePresentation) {
1503
+ const { locale } = this;
1504
+ const showMonthFirst = isMonthFirstLocale(locale);
1505
+ const columnOrder = showMonthFirst ? 'month-first' : 'year-first';
1506
+ return (h("div", { class: {
1507
+ [`wheel-order-${columnOrder}`]: true,
1508
+ } }, this.renderWheelPicker(forcePresentation)));
1509
+ }
1510
+ /**
1511
+ * Grid Render Methods
1512
+ */
1513
+ renderCalendarHeader(mode) {
1514
+ const { disabled } = this;
1515
+ const expandedIcon = mode === 'ios' ? chevronDown : caretUpSharp;
1516
+ const collapsedIcon = mode === 'ios' ? chevronForward : caretDownSharp;
1517
+ const prevMonthDisabled = disabled || isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);
1518
+ const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);
1519
+ // don't use the inheritAttributes util because it removes dir from the host, and we still need that
1520
+ const hostDir = this.el.getAttribute('dir') || undefined;
1521
+ return (h("div", { class: "calendar-header" }, h("div", { class: "calendar-action-buttons" }, h("div", { class: "calendar-month-year" }, h("ion-item", { part: "month-year-button", ref: (el) => (this.monthYearToggleItemRef = el), button: true, "aria-label": "Show year picker", detail: false, lines: "none", disabled: disabled, onClick: () => {
1522
+ var _a;
1523
+ this.toggleMonthAndYearView();
1524
+ /**
1525
+ * TODO: FW-3547
1526
+ *
1527
+ * Currently there is not a way to set the aria-label on the inner button
1528
+ * on the `ion-item` and have it be reactive to changes. This is a workaround
1529
+ * until we either refactor `ion-item` to a button or Stencil adds a way to
1530
+ * have reactive props for built-in properties, such as `aria-label`.
1531
+ */
1532
+ const { monthYearToggleItemRef } = this;
1533
+ if (monthYearToggleItemRef) {
1534
+ const btn = (_a = monthYearToggleItemRef.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.item-native');
1535
+ if (btn) {
1536
+ const monthYearAriaLabel = this.showMonthAndYear ? 'Hide year picker' : 'Show year picker';
1537
+ btn.setAttribute('aria-label', monthYearAriaLabel);
1538
+ }
1539
+ }
1540
+ } }, h("ion-label", null, getMonthAndYear(this.locale, this.workingParts), h("ion-icon", { "aria-hidden": "true", icon: this.showMonthAndYear ? expandedIcon : collapsedIcon, lazy: false, flipRtl: true })))), h("div", { class: "calendar-next-prev" }, h("ion-buttons", null, h("ion-button", { "aria-label": "Previous month", disabled: prevMonthDisabled, onClick: () => this.prevMonth() }, h("ion-icon", { dir: hostDir, "aria-hidden": "true", slot: "icon-only", icon: chevronBack, lazy: false, flipRtl: true })), h("ion-button", { "aria-label": "Next month", disabled: nextMonthDisabled, onClick: () => this.nextMonth() }, h("ion-icon", { dir: hostDir, "aria-hidden": "true", slot: "icon-only", icon: chevronForward, lazy: false, flipRtl: true }))))), h("div", { class: "calendar-days-of-week", "aria-hidden": "true" }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map((d) => {
1541
+ return h("div", { class: "day-of-week" }, d);
1542
+ }))));
1543
+ }
1544
+ renderMonth(month, year) {
1545
+ const { disabled, readonly } = this;
1546
+ const yearAllowed = this.parsedYearValues === undefined || this.parsedYearValues.includes(year);
1547
+ const monthAllowed = this.parsedMonthValues === undefined || this.parsedMonthValues.includes(month);
1548
+ const isCalMonthDisabled = !yearAllowed || !monthAllowed;
1549
+ const isDatetimeDisabled = disabled || readonly;
1550
+ const swipeDisabled = disabled ||
1551
+ isMonthDisabled({
1552
+ month,
1553
+ year,
1554
+ day: null,
1555
+ }, {
1556
+ // The day is not used when checking if a month is disabled.
1557
+ // Users should be able to access the min or max month, even if the
1558
+ // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).
1559
+ minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),
1560
+ maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),
1561
+ });
1562
+ // The working month should never have swipe disabled.
1563
+ // Otherwise the CSS scroll snap will not work and the user
1564
+ // can free-scroll the calendar.
1565
+ const isWorkingMonth = this.workingParts.month === month && this.workingParts.year === year;
1566
+ const activePart = this.getActivePartsWithFallback();
1567
+ return (h("div", { "aria-hidden": !isWorkingMonth ? 'true' : null, class: {
1568
+ 'calendar-month': true,
1569
+ // Prevents scroll snap swipe gestures for months outside of the min/max bounds
1570
+ 'calendar-month-disabled': !isWorkingMonth && swipeDisabled,
1571
+ } }, h("div", { class: "calendar-month-grid" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {
1572
+ const { day, dayOfWeek } = dateObject;
1573
+ const { el, highlightedDates, isDateEnabled, multiple } = this;
1574
+ const referenceParts = { month, day, year };
1575
+ const isCalendarPadding = day === null;
1576
+ const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, text, } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
1577
+ const dateIsoString = convertDataToISO(referenceParts);
1578
+ let isCalDayDisabled = isCalMonthDisabled || isDayDisabled;
1579
+ if (!isCalDayDisabled && isDateEnabled !== undefined) {
1580
+ try {
1581
+ /**
1582
+ * The `isDateEnabled` implementation is try-catch wrapped
1583
+ * to prevent exceptions in the user's function from
1584
+ * interrupting the calendar rendering.
1585
+ */
1586
+ isCalDayDisabled = !isDateEnabled(dateIsoString);
1587
+ }
1588
+ catch (e) {
1589
+ printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', el, e);
1590
+ }
1591
+ }
1592
+ /**
1593
+ * Some days are constrained through max & min or allowed dates
1594
+ * and also disabled because the component is readonly or disabled.
1595
+ * These need to be displayed differently.
1596
+ */
1597
+ const isCalDayConstrained = isCalDayDisabled && isDatetimeDisabled;
1598
+ const isButtonDisabled = isCalDayDisabled || isDatetimeDisabled;
1599
+ let dateStyle = undefined;
1600
+ /**
1601
+ * Custom highlight styles should not override the style for selected dates,
1602
+ * nor apply to "filler days" at the start of the grid.
1603
+ */
1604
+ if (highlightedDates !== undefined && !isActive && day !== null) {
1605
+ dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);
1606
+ }
1607
+ let dateParts = undefined;
1608
+ // "Filler days" at the beginning of the grid should not get the calendar day
1609
+ // CSS parts added to them
1610
+ if (!isCalendarPadding) {
1611
+ dateParts = `calendar-day${isActive ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}`;
1612
+ }
1613
+ return (h("div", { class: "calendar-day-wrapper" }, h("button", {
1614
+ // We need to use !important for the inline styles here because
1615
+ // otherwise the CSS shadow parts will override these styles.
1616
+ // See https://github.com/WICG/webcomponents/issues/847
1617
+ // Both the CSS shadow parts and highlightedDates styles are
1618
+ // provided by the developer, but highlightedDates styles should
1619
+ // always take priority.
1620
+ ref: (el) => {
1621
+ if (el) {
1622
+ el.style.setProperty('color', `${dateStyle ? dateStyle.textColor : ''}`, 'important');
1623
+ el.style.setProperty('background-color', `${dateStyle ? dateStyle.backgroundColor : ''}`, 'important');
1624
+ }
1625
+ }, tabindex: "-1", "data-day": day, "data-month": month, "data-year": year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isButtonDisabled, class: {
1626
+ 'calendar-day-padding': isCalendarPadding,
1627
+ 'calendar-day': true,
1628
+ 'calendar-day-active': isActive,
1629
+ 'calendar-day-constrained': isCalDayConstrained,
1630
+ 'calendar-day-today': isToday,
1631
+ }, part: dateParts, "aria-hidden": isCalendarPadding ? 'true' : null, "aria-selected": ariaSelected, "aria-label": ariaLabel, onClick: () => {
1632
+ if (isCalendarPadding) {
1633
+ return;
1634
+ }
1635
+ this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month,
1636
+ day,
1637
+ year }));
1638
+ // multiple only needs date info, so we can wipe out other fields like time
1639
+ if (multiple) {
1640
+ this.setActiveParts({
1641
+ month,
1642
+ day,
1643
+ year,
1644
+ }, isActive);
1645
+ }
1646
+ else {
1647
+ this.setActiveParts(Object.assign(Object.assign({}, activePart), { month,
1648
+ day,
1649
+ year }));
1650
+ }
1651
+ }
1652
+ }, text)));
1653
+ }))));
1654
+ }
1655
+ renderCalendarBody() {
1656
+ return (h("div", { class: "calendar-body ion-focusable", ref: (el) => (this.calendarBodyRef = el), tabindex: "0" }, generateMonths(this.workingParts, this.forceRenderDate).map(({ month, year }) => {
1657
+ return this.renderMonth(month, year);
1658
+ })));
1659
+ }
1660
+ renderCalendar(mode) {
1661
+ return (h("div", { class: "datetime-calendar", key: "datetime-calendar" }, this.renderCalendarHeader(mode), this.renderCalendarBody()));
1662
+ }
1663
+ renderTimeLabel() {
1664
+ const hasSlottedTimeLabel = this.el.querySelector('[slot="time-label"]') !== null;
1665
+ if (!hasSlottedTimeLabel && !this.showDefaultTimeLabel) {
1666
+ return;
1667
+ }
1668
+ return h("slot", { name: "time-label" }, "Time");
1669
+ }
1670
+ renderTimeOverlay() {
1671
+ const { disabled, hourCycle, isTimePopoverOpen, locale, formatOptions } = this;
1672
+ const computedHourCycle = getHourCycle(locale, hourCycle);
1673
+ const activePart = this.getActivePartsWithFallback();
1674
+ return [
1675
+ h("div", { class: "time-header" }, this.renderTimeLabel()),
1676
+ h("button", { class: {
1677
+ 'time-body': true,
1678
+ 'time-body-active': isTimePopoverOpen,
1679
+ }, part: `time-button${isTimePopoverOpen ? ' active' : ''}`, "aria-expanded": "false", "aria-haspopup": "true", disabled: disabled, onClick: async (ev) => {
1680
+ const { popoverRef } = this;
1681
+ if (popoverRef) {
1682
+ this.isTimePopoverOpen = true;
1683
+ popoverRef.present(new CustomEvent('ionShadowTarget', {
1684
+ detail: {
1685
+ ionShadowTarget: ev.target,
1686
+ },
1687
+ }));
1688
+ await popoverRef.onWillDismiss();
1689
+ this.isTimePopoverOpen = false;
1690
+ }
1691
+ } }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),
1692
+ h("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
1693
+ /**
1694
+ * Intersection Observers do not consistently fire between Blink and Webkit
1695
+ * when toggling the visibility of the popover and trying to scroll the picker
1696
+ * column to the correct time value.
1697
+ *
1698
+ * This will correctly scroll the element position to the correct time value,
1699
+ * before the popover is fully presented.
1700
+ */
1701
+ const cols = ev.target.querySelectorAll('ion-picker-column-internal');
1702
+ // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column
1703
+ cols.forEach((col) => col.scrollActiveItemIntoView());
1704
+ }, style: {
1705
+ '--offset-y': '-10px',
1706
+ '--min-width': 'fit-content',
1707
+ },
1708
+ // Allow native browser keyboard events to support up/down/home/end key
1709
+ // navigation within the time picker.
1710
+ keyboardEvents: true, ref: (el) => (this.popoverRef = el) }, this.renderWheelPicker('time')),
1711
+ ];
1712
+ }
1713
+ getHeaderSelectedDateText() {
1714
+ var _a;
1715
+ const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;
1716
+ const isArray = Array.isArray(activeParts);
1717
+ let headerText;
1718
+ if (multiple && isArray && activeParts.length !== 1) {
1719
+ headerText = `${activeParts.length} days`; // default/fallback for multiple selection
1720
+ if (titleSelectedDatesFormatter !== undefined) {
1721
+ try {
1722
+ headerText = titleSelectedDatesFormatter(convertDataToISO(activeParts));
1723
+ }
1724
+ catch (e) {
1725
+ printIonError('Exception in provided `titleSelectedDatesFormatter`: ', e);
1726
+ }
1727
+ }
1728
+ }
1729
+ else {
1730
+ // for exactly 1 day selected (multiple set or not), show a formatted version of that
1731
+ headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' });
1732
+ }
1733
+ return headerText;
1734
+ }
1735
+ renderHeader(showExpandedHeader = true) {
1736
+ const hasSlottedTitle = this.el.querySelector('[slot="title"]') !== null;
1737
+ if (!hasSlottedTitle && !this.showDefaultTitle) {
1738
+ return;
1739
+ }
1740
+ return (h("div", { class: "datetime-header" }, h("div", { class: "datetime-title" }, h("slot", { name: "title" }, "Select Date")), showExpandedHeader && h("div", { class: "datetime-selected-date" }, this.getHeaderSelectedDateText())));
1741
+ }
1742
+ /**
1743
+ * Render time picker inside of datetime.
1744
+ * Do not pass color prop to segment on
1745
+ * iOS mode. MD segment has been customized and
1746
+ * should take on the color prop, but iOS
1747
+ * should just be the default segment.
1748
+ */
1749
+ renderTime() {
1750
+ const { presentation } = this;
1751
+ const timeOnlyPresentation = presentation === 'time';
1752
+ return (h("div", { class: "datetime-time" }, timeOnlyPresentation ? this.renderWheelPicker() : this.renderTimeOverlay()));
1753
+ }
1754
+ /**
1755
+ * Renders the month/year picker that is
1756
+ * displayed on the calendar grid.
1757
+ * The .datetime-year class has additional
1758
+ * styles that let us show/hide the
1759
+ * picker when the user clicks on the
1760
+ * toggle in the calendar header.
1761
+ */
1762
+ renderCalendarViewMonthYearPicker() {
1763
+ return h("div", { class: "datetime-year" }, this.renderWheelView('month-year'));
1764
+ }
1765
+ /**
1766
+ * Render entry point
1767
+ * All presentation types are rendered from here.
1768
+ */
1769
+ renderDatetime(mode) {
1770
+ const { presentation, preferWheel } = this;
1771
+ /**
1772
+ * Certain presentation types have separate grid and wheel displays.
1773
+ * If preferWheel is true then we should show a wheel picker instead.
1774
+ */
1775
+ const hasWheelVariant = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1776
+ if (preferWheel && hasWheelVariant) {
1777
+ return [this.renderHeader(false), this.renderWheelView(), this.renderFooter()];
1778
+ }
1779
+ switch (presentation) {
1780
+ case 'date-time':
1781
+ return [
1782
+ this.renderHeader(),
1783
+ this.renderCalendar(mode),
1784
+ this.renderCalendarViewMonthYearPicker(),
1785
+ this.renderTime(),
1786
+ this.renderFooter(),
1787
+ ];
1788
+ case 'time-date':
1789
+ return [
1790
+ this.renderHeader(),
1791
+ this.renderTime(),
1792
+ this.renderCalendar(mode),
1793
+ this.renderCalendarViewMonthYearPicker(),
1794
+ this.renderFooter(),
1795
+ ];
1796
+ case 'time':
1797
+ return [this.renderHeader(false), this.renderTime(), this.renderFooter()];
1798
+ case 'month':
1799
+ case 'month-year':
1800
+ case 'year':
1801
+ return [this.renderHeader(false), this.renderWheelView(), this.renderFooter()];
1802
+ default:
1803
+ return [
1804
+ this.renderHeader(),
1805
+ this.renderCalendar(mode),
1806
+ this.renderCalendarViewMonthYearPicker(),
1807
+ this.renderFooter(),
1808
+ ];
1809
+ }
1810
+ }
1811
+ render() {
1812
+ const { name, value, disabled, el, color, readonly, showMonthAndYear, preferWheel, presentation, size, isGridStyle, } = this;
1813
+ const mode = getIonMode(this);
1814
+ const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year';
1815
+ const shouldShowMonthAndYear = showMonthAndYear || isMonthAndYearPresentation;
1816
+ const monthYearPickerOpen = showMonthAndYear && !isMonthAndYearPresentation;
1817
+ const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1818
+ const hasWheelVariant = hasDatePresentation && preferWheel;
1819
+ renderHiddenInput(true, el, name, formatValue(value), disabled);
1820
+ return (h(Host, { key: '8490192beb6c5c6064ed8f2a7be2d51846f84f36', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1821
+ [mode]: true,
1822
+ ['datetime-readonly']: readonly,
1823
+ ['datetime-disabled']: disabled,
1824
+ 'show-month-and-year': shouldShowMonthAndYear,
1825
+ 'month-year-picker-open': monthYearPickerOpen,
1826
+ [`datetime-presentation-${presentation}`]: true,
1827
+ [`datetime-size-${size}`]: true,
1828
+ [`datetime-prefer-wheel`]: hasWheelVariant,
1829
+ [`datetime-grid`]: isGridStyle,
1830
+ })) }, h("div", { key: 'a2959c07ed871f9004a2f11ab1385a5a7b5737fd', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1831
+ }
1832
+ get el() { return this; }
1833
+ static get watchers() { return {
1834
+ "formatOptions": ["formatOptionsChanged"],
1835
+ "disabled": ["disabledChanged"],
1836
+ "min": ["minChanged"],
1837
+ "max": ["maxChanged"],
1838
+ "presentation": ["presentationChanged"],
1839
+ "yearValues": ["yearValuesChanged"],
1840
+ "monthValues": ["monthValuesChanged"],
1841
+ "dayValues": ["dayValuesChanged"],
1842
+ "hourValues": ["hourValuesChanged"],
1843
+ "minuteValues": ["minuteValuesChanged"],
1844
+ "value": ["valueChanged"]
1845
+ }; }
1846
+ static get style() { return {
1847
+ ios: datetimeIosCss,
1848
+ md: datetimeMdCss
1849
+ }; }
1850
+ }, [33, "ion-datetime", {
1851
+ "color": [1],
1852
+ "name": [1],
1853
+ "disabled": [4],
1854
+ "formatOptions": [16],
1855
+ "readonly": [4],
1856
+ "isDateEnabled": [16],
1857
+ "min": [1025],
1858
+ "max": [1025],
1859
+ "presentation": [1],
1860
+ "cancelText": [1, "cancel-text"],
1861
+ "doneText": [1, "done-text"],
1862
+ "clearText": [1, "clear-text"],
1863
+ "yearValues": [8, "year-values"],
1864
+ "monthValues": [8, "month-values"],
1865
+ "dayValues": [8, "day-values"],
1866
+ "hourValues": [8, "hour-values"],
1867
+ "minuteValues": [8, "minute-values"],
1868
+ "locale": [1],
1869
+ "firstDayOfWeek": [2, "first-day-of-week"],
1870
+ "titleSelectedDatesFormatter": [16],
1871
+ "multiple": [4],
1872
+ "highlightedDates": [16],
1873
+ "value": [1025],
1874
+ "showDefaultTitle": [4, "show-default-title"],
1875
+ "showDefaultButtons": [4, "show-default-buttons"],
1876
+ "showClearButton": [4, "show-clear-button"],
1877
+ "showDefaultTimeLabel": [4, "show-default-time-label"],
1878
+ "hourCycle": [1, "hour-cycle"],
1879
+ "size": [1],
1880
+ "preferWheel": [4, "prefer-wheel"],
1881
+ "showMonthAndYear": [32],
1882
+ "activeParts": [32],
1883
+ "workingParts": [32],
1884
+ "isTimePopoverOpen": [32],
1885
+ "forceRenderDate": [32],
1886
+ "confirm": [64],
1887
+ "reset": [64],
1888
+ "cancel": [64]
1889
+ }]);
1890
+ let datetimeIds = 0;
1891
+ function defineCustomElement$1() {
1892
+ if (typeof customElements === "undefined") {
1893
+ return;
1894
+ }
1895
+ const components = ["ion-datetime", "ion-backdrop", "ion-button", "ion-buttons", "ion-icon", "ion-item", "ion-label", "ion-note", "ion-picker-column-internal", "ion-picker-internal", "ion-popover", "ion-ripple-effect"];
1896
+ components.forEach(tagName => { switch (tagName) {
1897
+ case "ion-datetime":
1898
+ if (!customElements.get(tagName)) {
1899
+ customElements.define(tagName, Datetime);
1900
+ }
1901
+ break;
1902
+ case "ion-backdrop":
1903
+ if (!customElements.get(tagName)) {
1904
+ defineCustomElement$c();
1905
+ }
1906
+ break;
1907
+ case "ion-button":
1908
+ if (!customElements.get(tagName)) {
1909
+ defineCustomElement$b();
1910
+ }
1911
+ break;
1912
+ case "ion-buttons":
1913
+ if (!customElements.get(tagName)) {
1914
+ defineCustomElement$a();
1915
+ }
1916
+ break;
1917
+ case "ion-icon":
1918
+ if (!customElements.get(tagName)) {
1919
+ defineCustomElement$9();
1920
+ }
1921
+ break;
1922
+ case "ion-item":
1923
+ if (!customElements.get(tagName)) {
1924
+ defineCustomElement$8();
1925
+ }
1926
+ break;
1927
+ case "ion-label":
1928
+ if (!customElements.get(tagName)) {
1929
+ defineCustomElement$7();
1930
+ }
1931
+ break;
1932
+ case "ion-note":
1933
+ if (!customElements.get(tagName)) {
1934
+ defineCustomElement$6();
1935
+ }
1936
+ break;
1937
+ case "ion-picker-column-internal":
1938
+ if (!customElements.get(tagName)) {
1939
+ defineCustomElement$5();
1940
+ }
1941
+ break;
1942
+ case "ion-picker-internal":
1943
+ if (!customElements.get(tagName)) {
1944
+ defineCustomElement$4();
1945
+ }
1946
+ break;
1947
+ case "ion-popover":
1948
+ if (!customElements.get(tagName)) {
1949
+ defineCustomElement$3();
1950
+ }
1951
+ break;
1952
+ case "ion-ripple-effect":
1953
+ if (!customElements.get(tagName)) {
1954
+ defineCustomElement$2();
1955
+ }
1956
+ break;
1957
+ } });
1958
+ }
1959
+
1960
+ const IonDatetime = Datetime;
1961
+ const defineCustomElement = defineCustomElement$1;
1962
+
1963
+ export { IonDatetime, defineCustomElement };