@paperless/core 0.1.0-alpha.99 → 1.3.0

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 (1097) hide show
  1. package/CHANGELOG.md +3838 -0
  2. package/README.md +9 -1
  3. package/dist/assets/i18n/page-size-select.i18n.en.json +4 -0
  4. package/dist/assets/i18n/page-size-select.i18n.nl.json +4 -0
  5. package/dist/assets/i18n/table-footer.i18n.en.json +3 -0
  6. package/dist/assets/i18n/table-footer.i18n.nl.json +3 -0
  7. package/dist/assets/i18n/table-header.i18n.en.json +6 -0
  8. package/dist/assets/i18n/table-header.i18n.nl.json +6 -0
  9. package/dist/assets/i18n/table.i18n.en.json +13 -0
  10. package/dist/assets/i18n/table.i18n.nl.json +13 -0
  11. package/dist/assets/icons/bread.svg +5 -12
  12. package/dist/assets/icons/camera.svg +10 -0
  13. package/dist/assets/icons/car.svg +5 -12
  14. package/dist/assets/icons/fa/building.svg +3 -0
  15. package/dist/assets/icons/fa/buildings.svg +3 -0
  16. package/dist/assets/icons/fa/piggy.svg +3 -0
  17. package/dist/assets/icons/filter.svg +6 -13
  18. package/dist/assets/icons/notification.svg +10 -0
  19. package/dist/assets/icons/reload.svg +10 -0
  20. package/dist/assets/icons/search.svg +5 -12
  21. package/dist/assets/illustrations/empty-state-add.svg +65 -0
  22. package/dist/assets/illustrations/empty-state-overview.svg +58 -0
  23. package/dist/assets/illustrations/empty-state-search.svg +88 -0
  24. package/dist/assets/images/helper/helper-hover.svg +6 -6
  25. package/dist/assets/images/helper/helper.svg +2 -2
  26. package/dist/build/index.esm.js +2 -0
  27. package/dist/build/index.esm.js.map +1 -0
  28. package/dist/build/p-07259c61.entry.js +2 -0
  29. package/dist/build/p-07259c61.entry.js.map +1 -0
  30. package/dist/build/p-11f5c8c7.entry.js +2 -0
  31. package/dist/build/p-11f5c8c7.entry.js.map +1 -0
  32. package/dist/build/p-12171df4.entry.js +2 -0
  33. package/dist/build/p-12171df4.entry.js.map +1 -0
  34. package/dist/build/p-1630e39b.entry.js +2 -0
  35. package/dist/build/p-1630e39b.entry.js.map +1 -0
  36. package/dist/build/p-18c0dd17.entry.js +2 -0
  37. package/dist/build/p-18c0dd17.entry.js.map +1 -0
  38. package/dist/build/p-195632a8.entry.js +2 -0
  39. package/dist/build/p-195632a8.entry.js.map +1 -0
  40. package/dist/build/p-1f55126f.entry.js +2 -0
  41. package/dist/build/p-1f55126f.entry.js.map +1 -0
  42. package/dist/build/p-26da620b.entry.js +2 -0
  43. package/dist/build/p-26da620b.entry.js.map +1 -0
  44. package/dist/build/p-2a668e75.entry.js +2 -0
  45. package/dist/build/p-2a668e75.entry.js.map +1 -0
  46. package/dist/build/p-350d452b.entry.js +2 -0
  47. package/dist/build/p-350d452b.entry.js.map +1 -0
  48. package/dist/build/p-36967a97.entry.js +2 -0
  49. package/dist/build/p-36967a97.entry.js.map +1 -0
  50. package/dist/build/p-3d8b2178.entry.js +2 -0
  51. package/dist/build/p-3d8b2178.entry.js.map +1 -0
  52. package/dist/build/p-47bcc23e.entry.js +2 -0
  53. package/dist/build/p-47bcc23e.entry.js.map +1 -0
  54. package/dist/build/p-47e461b7.entry.js +2 -0
  55. package/dist/build/p-47e461b7.entry.js.map +1 -0
  56. package/dist/build/p-4c51a801.entry.js +2 -0
  57. package/dist/build/p-4c51a801.entry.js.map +1 -0
  58. package/dist/build/p-4e650fe4.js +2 -0
  59. package/dist/build/p-4e650fe4.js.map +1 -0
  60. package/dist/build/p-51408aca.entry.js +2 -0
  61. package/dist/build/p-51408aca.entry.js.map +1 -0
  62. package/dist/build/p-594b28a7.entry.js +2 -0
  63. package/dist/build/p-594b28a7.entry.js.map +1 -0
  64. package/dist/build/p-5c7b20a3.entry.js +2 -0
  65. package/dist/build/p-5c7b20a3.entry.js.map +1 -0
  66. package/dist/build/p-6124f388.entry.js +2 -0
  67. package/dist/build/p-6124f388.entry.js.map +1 -0
  68. package/dist/build/p-6c60fd3d.js +2 -0
  69. package/dist/build/p-6c60fd3d.js.map +1 -0
  70. package/dist/build/p-6ccf5cdd.js +3 -0
  71. package/dist/build/p-6ccf5cdd.js.map +1 -0
  72. package/dist/build/p-6d5aa646.entry.js +2 -0
  73. package/dist/build/p-6d5aa646.entry.js.map +1 -0
  74. package/dist/build/p-6f1352e0.entry.js +2 -0
  75. package/dist/build/p-6f1352e0.entry.js.map +1 -0
  76. package/dist/build/p-8a6728d5.js +2 -0
  77. package/dist/build/p-8a6728d5.js.map +1 -0
  78. package/dist/build/p-910bd6bc.entry.js +2 -0
  79. package/dist/build/p-910bd6bc.entry.js.map +1 -0
  80. package/dist/build/p-91725831.entry.js +2 -0
  81. package/dist/build/p-91725831.entry.js.map +1 -0
  82. package/dist/build/p-946286e2.entry.js +2 -0
  83. package/dist/build/p-946286e2.entry.js.map +1 -0
  84. package/dist/build/p-a1c1d95b.entry.js +2 -0
  85. package/dist/build/p-a1c1d95b.entry.js.map +1 -0
  86. package/dist/build/p-a23ea8fe.entry.js +2 -0
  87. package/dist/build/p-a23ea8fe.entry.js.map +1 -0
  88. package/dist/build/p-abcd80e9.entry.js +2 -0
  89. package/dist/build/p-abcd80e9.entry.js.map +1 -0
  90. package/dist/build/p-ae248aef.js +2 -0
  91. package/dist/build/p-ae248aef.js.map +1 -0
  92. package/dist/build/p-b0398d3b.entry.js +2 -0
  93. package/dist/build/p-b0398d3b.entry.js.map +1 -0
  94. package/dist/build/p-b2bc1d2a.entry.js +2 -0
  95. package/dist/build/p-b2bc1d2a.entry.js.map +1 -0
  96. package/dist/build/p-b5ce8cd4.entry.js +2 -0
  97. package/dist/build/p-b5ce8cd4.entry.js.map +1 -0
  98. package/dist/build/p-b92dd098.entry.js +2 -0
  99. package/dist/build/p-b92dd098.entry.js.map +1 -0
  100. package/dist/build/p-b9f742e0.entry.js +2 -0
  101. package/dist/build/p-b9f742e0.entry.js.map +1 -0
  102. package/dist/build/p-bf0eca4f.entry.js +2 -0
  103. package/dist/build/p-bf0eca4f.entry.js.map +1 -0
  104. package/dist/build/p-ce1abd74.entry.js +2 -0
  105. package/dist/build/p-ce1abd74.entry.js.map +1 -0
  106. package/dist/build/p-ce443f5b.entry.js +2 -0
  107. package/dist/build/p-ce443f5b.entry.js.map +1 -0
  108. package/dist/build/p-da2426c7.js +2 -0
  109. package/dist/build/p-da2426c7.js.map +1 -0
  110. package/dist/build/p-da6e5abd.entry.js +2 -0
  111. package/dist/build/p-da6e5abd.entry.js.map +1 -0
  112. package/dist/build/p-e17560e6.entry.js +2 -0
  113. package/dist/build/p-e17560e6.entry.js.map +1 -0
  114. package/dist/build/p-e1da7376.entry.js +2 -0
  115. package/dist/build/p-e1da7376.entry.js.map +1 -0
  116. package/dist/build/p-e9a1b51e.entry.js +2 -0
  117. package/dist/build/p-e9a1b51e.entry.js.map +1 -0
  118. package/dist/build/p-ec850aca.entry.js +2 -0
  119. package/dist/build/p-ec850aca.entry.js.map +1 -0
  120. package/dist/build/p-ed6edf0a.entry.js +2 -0
  121. package/dist/build/p-ed6edf0a.entry.js.map +1 -0
  122. package/dist/build/p-f47247a6.entry.js +2 -0
  123. package/dist/build/p-f47247a6.entry.js.map +1 -0
  124. package/dist/build/p-fef32402.js +2 -0
  125. package/dist/build/p-fef32402.js.map +1 -0
  126. package/dist/build/paperless.css +1 -253
  127. package/dist/build/paperless.esm.js +2 -1
  128. package/dist/build/paperless.esm.js.map +1 -0
  129. package/dist/cjs/child-of-e472f812.js +11 -0
  130. package/dist/cjs/child-of-e472f812.js.map +1 -0
  131. package/dist/cjs/constants-a4459ec9.js +9 -0
  132. package/dist/cjs/constants-a4459ec9.js.map +1 -0
  133. package/dist/cjs/floating-ui.dom.esm-62336770.js +1334 -0
  134. package/dist/cjs/floating-ui.dom.esm-62336770.js.map +1 -0
  135. package/dist/cjs/index-b59a0544.js +2324 -0
  136. package/dist/cjs/index-b59a0544.js.map +1 -0
  137. package/dist/cjs/{index-9d3b51c9.js → index-dfc4dfec.js} +980 -339
  138. package/dist/cjs/index-dfc4dfec.js.map +1 -0
  139. package/dist/cjs/index.cjs.js +20 -0
  140. package/dist/cjs/index.cjs.js.map +1 -0
  141. package/dist/cjs/loader.cjs.js +6 -3
  142. package/dist/cjs/loader.cjs.js.map +1 -0
  143. package/dist/cjs/localization-9e2ac7f3.js +62 -0
  144. package/dist/cjs/localization-9e2ac7f3.js.map +1 -0
  145. package/dist/cjs/object-get-by-path-ee5540a5.js +19 -0
  146. package/dist/cjs/object-get-by-path-ee5540a5.js.map +1 -0
  147. package/dist/cjs/p-accordion.cjs.entry.js +5 -11
  148. package/dist/cjs/p-accordion.cjs.entry.js.map +1 -0
  149. package/dist/cjs/p-attachment.cjs.entry.js +39 -0
  150. package/dist/cjs/p-attachment.cjs.entry.js.map +1 -0
  151. package/dist/cjs/p-avatar-group.cjs.entry.js +5 -2
  152. package/dist/cjs/p-avatar-group.cjs.entry.js.map +1 -0
  153. package/dist/cjs/p-avatar.cjs.entry.js +45 -0
  154. package/dist/cjs/p-avatar.cjs.entry.js.map +1 -0
  155. package/dist/cjs/p-backdrop.cjs.entry.js +43 -0
  156. package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -0
  157. package/dist/cjs/p-button_3.cjs.entry.js +142 -148
  158. package/dist/cjs/p-button_3.cjs.entry.js.map +1 -0
  159. package/dist/cjs/p-calendar.cjs.entry.js +703 -0
  160. package/dist/cjs/p-calendar.cjs.entry.js.map +1 -0
  161. package/dist/cjs/p-card-body.cjs.entry.js +4 -5
  162. package/dist/cjs/p-card-body.cjs.entry.js.map +1 -0
  163. package/dist/cjs/p-card-container.cjs.entry.js +4 -8
  164. package/dist/cjs/p-card-container.cjs.entry.js.map +1 -0
  165. package/dist/cjs/p-card-header.cjs.entry.js +5 -5
  166. package/dist/cjs/p-card-header.cjs.entry.js.map +1 -0
  167. package/dist/cjs/p-content-slider.cjs.entry.js +115 -56
  168. package/dist/cjs/p-content-slider.cjs.entry.js.map +1 -0
  169. package/dist/cjs/p-counter.cjs.entry.js +4 -8
  170. package/dist/cjs/p-counter.cjs.entry.js.map +1 -0
  171. package/dist/cjs/p-datepicker.cjs.entry.js +3043 -0
  172. package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -0
  173. package/dist/cjs/p-divider.cjs.entry.js +4 -2
  174. package/dist/cjs/p-divider.cjs.entry.js.map +1 -0
  175. package/dist/cjs/p-drawer-body_3.cjs.entry.js +51 -0
  176. package/dist/cjs/p-drawer-body_3.cjs.entry.js.map +1 -0
  177. package/dist/cjs/p-drawer.cjs.entry.js +65 -0
  178. package/dist/cjs/p-drawer.cjs.entry.js.map +1 -0
  179. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +7 -3
  180. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +1 -0
  181. package/dist/cjs/p-dropdown_2.cjs.entry.js +163 -0
  182. package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -0
  183. package/dist/cjs/p-helper_3.cjs.entry.js +150 -0
  184. package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -0
  185. package/dist/cjs/p-illustration_6.cjs.entry.js +2840 -0
  186. package/dist/cjs/p-illustration_6.cjs.entry.js.map +1 -0
  187. package/dist/cjs/p-info-panel.cjs.entry.js +6 -8
  188. package/dist/cjs/p-info-panel.cjs.entry.js.map +1 -0
  189. package/dist/cjs/p-label_3.cjs.entry.js +65 -0
  190. package/dist/cjs/p-label_3.cjs.entry.js.map +1 -0
  191. package/dist/cjs/p-layout.cjs.entry.js +4 -5
  192. package/dist/cjs/p-layout.cjs.entry.js.map +1 -0
  193. package/dist/cjs/p-modal-body_4.cjs.entry.js +79 -0
  194. package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -0
  195. package/dist/cjs/p-modal.cjs.entry.js +34 -21
  196. package/dist/cjs/p-modal.cjs.entry.js.map +1 -0
  197. package/dist/cjs/p-navbar.cjs.entry.js +5 -9
  198. package/dist/cjs/p-navbar.cjs.entry.js.map +1 -0
  199. package/dist/cjs/p-navigation-item.cjs.entry.js +8 -5
  200. package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -0
  201. package/dist/cjs/p-page-size-select_3.cjs.entry.js +224 -0
  202. package/dist/cjs/p-page-size-select_3.cjs.entry.js.map +1 -0
  203. package/dist/cjs/p-profile.cjs.entry.js +14 -15
  204. package/dist/cjs/p-profile.cjs.entry.js.map +1 -0
  205. package/dist/cjs/p-select.cjs.entry.js +245 -0
  206. package/dist/cjs/p-select.cjs.entry.js.map +1 -0
  207. package/dist/cjs/p-slider-indicator.cjs.entry.js +4 -5
  208. package/dist/cjs/p-slider-indicator.cjs.entry.js.map +1 -0
  209. package/dist/cjs/p-status.cjs.entry.js +7 -5
  210. package/dist/cjs/p-status.cjs.entry.js.map +1 -0
  211. package/dist/cjs/p-stepper-item.cjs.entry.js +26 -0
  212. package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -0
  213. package/dist/cjs/p-stepper-line.cjs.entry.js +23 -0
  214. package/dist/cjs/p-stepper-line.cjs.entry.js.map +1 -0
  215. package/dist/cjs/p-stepper.cjs.entry.js +53 -44
  216. package/dist/cjs/p-stepper.cjs.entry.js.map +1 -0
  217. package/dist/cjs/p-tab-group.cjs.entry.js +11 -10
  218. package/dist/cjs/p-tab-group.cjs.entry.js.map +1 -0
  219. package/dist/cjs/p-tab-item.cjs.entry.js +4 -5
  220. package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -0
  221. package/dist/cjs/p-table-column.cjs.entry.js +30 -0
  222. package/dist/cjs/p-table-column.cjs.entry.js.map +1 -0
  223. package/dist/cjs/p-table.cjs.entry.js +360 -0
  224. package/dist/cjs/p-table.cjs.entry.js.map +1 -0
  225. package/dist/cjs/p-toast-container.cjs.entry.js +22 -0
  226. package/dist/cjs/p-toast-container.cjs.entry.js.map +1 -0
  227. package/dist/cjs/p-toast.cjs.entry.js +35 -0
  228. package/dist/cjs/p-toast.cjs.entry.js.map +1 -0
  229. package/dist/cjs/p-tooltip.cjs.entry.js +59 -61
  230. package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -0
  231. package/dist/cjs/paperless.cjs.js +12 -3
  232. package/dist/cjs/paperless.cjs.js.map +1 -0
  233. package/dist/collection/assets/icons/bread.svg +5 -12
  234. package/dist/collection/assets/icons/camera.svg +10 -0
  235. package/dist/collection/assets/icons/car.svg +5 -12
  236. package/dist/collection/assets/icons/fa/building.svg +3 -0
  237. package/dist/collection/assets/icons/fa/buildings.svg +3 -0
  238. package/dist/collection/assets/icons/fa/piggy.svg +3 -0
  239. package/dist/collection/assets/icons/filter.svg +6 -13
  240. package/dist/collection/assets/icons/notification.svg +10 -0
  241. package/dist/collection/assets/icons/reload.svg +10 -0
  242. package/dist/collection/assets/icons/search.svg +5 -12
  243. package/dist/collection/assets/illustrations/empty-state-add.svg +65 -0
  244. package/dist/collection/assets/illustrations/empty-state-overview.svg +58 -0
  245. package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
  246. package/dist/collection/assets/images/helper/helper-hover.svg +6 -6
  247. package/dist/collection/assets/images/helper/helper.svg +2 -2
  248. package/dist/collection/collection-manifest.json +23 -4
  249. package/dist/collection/components/atoms/avatar/avatar.component.css +1 -24
  250. package/dist/collection/components/atoms/avatar/avatar.component.js +105 -89
  251. package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -0
  252. package/dist/collection/components/atoms/avatar-group/avatar-group.component.css +1 -18
  253. package/dist/collection/components/atoms/avatar-group/avatar-group.component.js +37 -31
  254. package/dist/collection/components/atoms/avatar-group/avatar-group.component.js.map +1 -0
  255. package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -0
  256. package/dist/collection/components/atoms/backdrop/backdrop.component.js +149 -0
  257. package/dist/collection/components/atoms/backdrop/backdrop.component.js.map +1 -0
  258. package/dist/collection/components/atoms/button/button.component.css +1 -95
  259. package/dist/collection/components/atoms/button/button.component.js +305 -319
  260. package/dist/collection/components/atoms/button/button.component.js.map +1 -0
  261. package/dist/collection/components/atoms/card-body/card-body.component.css +1 -9
  262. package/dist/collection/components/atoms/card-body/card-body.component.js +35 -32
  263. package/dist/collection/components/atoms/card-body/card-body.component.js.map +1 -0
  264. package/dist/collection/components/atoms/card-container/card-container.component.css +1 -17
  265. package/dist/collection/components/atoms/card-container/card-container.component.js +52 -52
  266. package/dist/collection/components/atoms/card-container/card-container.component.js.map +1 -0
  267. package/dist/collection/components/atoms/card-header/card-header.component.css +1 -17
  268. package/dist/collection/components/atoms/card-header/card-header.component.js +52 -51
  269. package/dist/collection/components/atoms/card-header/card-header.component.js.map +1 -0
  270. package/dist/collection/components/atoms/counter/counter.component.css +1 -30
  271. package/dist/collection/components/atoms/counter/counter.component.js +52 -52
  272. package/dist/collection/components/atoms/counter/counter.component.js.map +1 -0
  273. package/dist/collection/components/atoms/divider/divider.component.css +1 -10
  274. package/dist/collection/components/atoms/divider/divider.component.js +13 -11
  275. package/dist/collection/components/atoms/divider/divider.component.js.map +1 -0
  276. package/dist/collection/components/atoms/drawer-body/drawer-body.component.css +1 -0
  277. package/dist/collection/components/atoms/drawer-body/drawer-body.component.js +44 -0
  278. package/dist/collection/components/atoms/drawer-body/drawer-body.component.js.map +1 -0
  279. package/dist/collection/components/atoms/drawer-container/drawer-container.component.css +1 -0
  280. package/dist/collection/components/atoms/drawer-container/drawer-container.component.js +48 -0
  281. package/dist/collection/components/atoms/drawer-container/drawer-container.component.js.map +1 -0
  282. package/dist/collection/components/atoms/drawer-header/drawer-header.component.css +1 -0
  283. package/dist/collection/components/atoms/drawer-header/drawer-header.component.js +66 -0
  284. package/dist/collection/components/atoms/drawer-header/drawer-header.component.js.map +1 -0
  285. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -6
  286. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +57 -9
  287. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js.map +1 -0
  288. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -13
  289. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +74 -52
  290. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -0
  291. package/dist/collection/components/atoms/helper/helper.component.css +1 -7
  292. package/dist/collection/components/atoms/helper/helper.component.js +39 -39
  293. package/dist/collection/components/atoms/helper/helper.component.js.map +1 -0
  294. package/dist/collection/components/atoms/icon/icon.component.css +1 -1
  295. package/dist/collection/components/atoms/icon/icon.component.js +101 -100
  296. package/dist/collection/components/atoms/icon/icon.component.js.map +1 -0
  297. package/dist/collection/components/atoms/illustration/illustration.component.js +30 -23
  298. package/dist/collection/components/atoms/illustration/illustration.component.js.map +1 -0
  299. package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -28
  300. package/dist/collection/components/atoms/info-panel/info-panel.component.js +86 -89
  301. package/dist/collection/components/atoms/info-panel/info-panel.component.js.map +1 -0
  302. package/dist/collection/components/atoms/label/label.component.css +1 -0
  303. package/dist/collection/components/atoms/label/label.component.js +171 -0
  304. package/dist/collection/components/atoms/label/label.component.js.map +1 -0
  305. package/dist/collection/components/atoms/layout/layout.component.css +1 -73
  306. package/dist/collection/components/atoms/layout/layout.component.js +35 -38
  307. package/dist/collection/components/atoms/layout/layout.component.js.map +1 -0
  308. package/dist/collection/components/atoms/loader/loader.component.css +1 -26
  309. package/dist/collection/components/atoms/loader/loader.component.js +113 -114
  310. package/dist/collection/components/atoms/loader/loader.component.js.map +1 -0
  311. package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -7
  312. package/dist/collection/components/atoms/modal-body/modal-body.component.js +53 -31
  313. package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -0
  314. package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -6
  315. package/dist/collection/components/atoms/modal-container/modal-container.component.js +53 -31
  316. package/dist/collection/components/atoms/modal-container/modal-container.component.js.map +1 -0
  317. package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -8
  318. package/dist/collection/components/atoms/modal-footer/modal-footer.component.js +13 -36
  319. package/dist/collection/components/atoms/modal-footer/modal-footer.component.js.map +1 -0
  320. package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -16
  321. package/dist/collection/components/atoms/modal-header/modal-header.component.js +56 -54
  322. package/dist/collection/components/atoms/modal-header/modal-header.component.js.map +1 -0
  323. package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -16
  324. package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +35 -32
  325. package/dist/collection/components/atoms/pagination-item/pagination-item.component.js.map +1 -0
  326. package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -5
  327. package/dist/collection/components/atoms/segment-container/segment-container.component.js +13 -9
  328. package/dist/collection/components/atoms/segment-container/segment-container.component.js.map +1 -0
  329. package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -21
  330. package/dist/collection/components/atoms/segment-item/segment-item.component.js +97 -90
  331. package/dist/collection/components/atoms/segment-item/segment-item.component.js.map +1 -0
  332. package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -7
  333. package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js +34 -30
  334. package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js.map +1 -0
  335. package/dist/collection/components/atoms/status/status.component.css +1 -16
  336. package/dist/collection/components/atoms/status/status.component.js +98 -93
  337. package/dist/collection/components/atoms/status/status.component.js.map +1 -0
  338. package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -59
  339. package/dist/collection/components/atoms/stepper-item/stepper-item.component.js +104 -93
  340. package/dist/collection/components/atoms/stepper-item/stepper-item.component.js.map +1 -0
  341. package/dist/collection/components/atoms/stepper-line/stepper-line.component.css +1 -18
  342. package/dist/collection/components/atoms/stepper-line/stepper-line.component.js +51 -50
  343. package/dist/collection/components/atoms/stepper-line/stepper-line.component.js.map +1 -0
  344. package/dist/collection/components/atoms/tab-group/tab-group.component.js +3 -11
  345. package/dist/collection/components/atoms/tab-group/tab-group.component.js.map +1 -0
  346. package/dist/collection/components/atoms/tab-item/tab-item.component.css +1 -10
  347. package/dist/collection/components/atoms/tab-item/tab-item.component.js +35 -32
  348. package/dist/collection/components/atoms/tab-item/tab-item.component.js.map +1 -0
  349. package/dist/collection/components/atoms/table-container/table-container.component.css +1 -0
  350. package/dist/collection/components/atoms/table-container/table-container.component.js +19 -0
  351. package/dist/collection/components/atoms/table-container/table-container.component.js.map +1 -0
  352. package/dist/collection/components/atoms/toast-container/toast-container.component.css +1 -0
  353. package/dist/collection/components/atoms/toast-container/toast-container.component.js +44 -0
  354. package/dist/collection/components/atoms/toast-container/toast-container.component.js.map +1 -0
  355. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -43
  356. package/dist/collection/components/atoms/tooltip/tooltip.component.js +255 -235
  357. package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -0
  358. package/dist/collection/components/helpers/table-column/table-column.component.js +189 -0
  359. package/dist/collection/components/helpers/table-column/table-column.component.js.map +1 -0
  360. package/dist/collection/components/molecules/accordion/accordion.component.css +1 -3
  361. package/dist/collection/components/molecules/accordion/accordion.component.js +103 -108
  362. package/dist/collection/components/molecules/accordion/accordion.component.js.map +1 -0
  363. package/dist/collection/components/molecules/attachment/attachment.component.css +1 -0
  364. package/dist/collection/components/molecules/attachment/attachment.component.js +145 -0
  365. package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -0
  366. package/dist/collection/components/molecules/calendar/calendar.component.css +1 -0
  367. package/dist/collection/components/molecules/calendar/calendar.component.js +515 -0
  368. package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -0
  369. package/dist/collection/components/molecules/content-slider/content-slider.component.css +1 -26
  370. package/dist/collection/components/molecules/content-slider/content-slider.component.js +227 -139
  371. package/dist/collection/components/molecules/content-slider/content-slider.component.js.map +1 -0
  372. package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -0
  373. package/dist/collection/components/molecules/datepicker/datepicker.component.js +527 -0
  374. package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -0
  375. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -12
  376. package/dist/collection/components/molecules/dropdown/dropdown.component.js +289 -187
  377. package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -0
  378. package/dist/collection/components/molecules/input-error/input-error.component.js +60 -0
  379. package/dist/collection/components/molecules/input-error/input-error.component.js.map +1 -0
  380. package/dist/collection/components/molecules/input-group/input-group.component.css +1 -204
  381. package/dist/collection/components/molecules/input-group/input-group.component.js +366 -227
  382. package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -0
  383. package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +1 -22
  384. package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +107 -104
  385. package/dist/collection/components/molecules/navigation-item/navigation-item.component.js.map +1 -0
  386. package/dist/collection/components/molecules/page-size-select/constants.js +3 -0
  387. package/dist/collection/components/molecules/page-size-select/constants.js.map +1 -0
  388. package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +207 -0
  389. package/dist/collection/components/molecules/page-size-select/page-size-select.component.js.map +1 -0
  390. package/dist/collection/components/molecules/pagination/pagination.component.css +1 -3
  391. package/dist/collection/components/molecules/pagination/pagination.component.js +119 -94
  392. package/dist/collection/components/molecules/pagination/pagination.component.js.map +1 -0
  393. package/dist/collection/components/molecules/profile/profile.component.css +1 -36
  394. package/dist/collection/components/molecules/profile/profile.component.js +66 -68
  395. package/dist/collection/components/molecules/profile/profile.component.js.map +1 -0
  396. package/dist/collection/components/molecules/select/select.component.css +1 -0
  397. package/dist/collection/components/molecules/select/select.component.js +739 -0
  398. package/dist/collection/components/molecules/select/select.component.js.map +1 -0
  399. package/dist/collection/components/molecules/stepper/stepper.component.css +1 -12
  400. package/dist/collection/components/molecules/stepper/stepper.component.js +120 -85
  401. package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -0
  402. package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -0
  403. package/dist/collection/components/molecules/table-cell/table-cell.component.js +306 -0
  404. package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -0
  405. package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -0
  406. package/dist/collection/components/molecules/table-footer/table-footer.component.js +276 -0
  407. package/dist/collection/components/molecules/table-footer/table-footer.component.js.map +1 -0
  408. package/dist/collection/components/molecules/table-header/table-header.component.css +1 -0
  409. package/dist/collection/components/molecules/table-header/table-header.component.js +452 -0
  410. package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -0
  411. package/dist/collection/components/molecules/table-row/table-row.component.css +1 -0
  412. package/dist/collection/components/molecules/table-row/table-row.component.js +65 -0
  413. package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -0
  414. package/dist/collection/components/molecules/toast/toast.component.css +1 -0
  415. package/dist/collection/components/molecules/toast/toast.component.js +197 -0
  416. package/dist/collection/components/molecules/toast/toast.component.js.map +1 -0
  417. package/dist/collection/components/organisms/drawer/drawer.component.css +1 -0
  418. package/dist/collection/components/organisms/drawer/drawer.component.js +234 -0
  419. package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -0
  420. package/dist/collection/components/organisms/modal/modal.component.js +228 -144
  421. package/dist/collection/components/organisms/modal/modal.component.js.map +1 -0
  422. package/dist/collection/components/organisms/navbar/navbar.component.css +1 -56
  423. package/dist/collection/components/organisms/navbar/navbar.component.js +72 -81
  424. package/dist/collection/components/organisms/navbar/navbar.component.js.map +1 -0
  425. package/dist/collection/components/organisms/table/table.component.css +1 -0
  426. package/dist/collection/components/organisms/table/table.component.js +1300 -0
  427. package/dist/collection/components/organisms/table/table.component.js.map +1 -0
  428. package/dist/collection/index.js +3 -1
  429. package/dist/collection/index.js.map +1 -0
  430. package/dist/collection/tailwind/animation.js +72 -2
  431. package/dist/collection/tailwind/border-radius.js +1 -0
  432. package/dist/collection/tailwind/height.js +5 -0
  433. package/dist/collection/tailwind/plugins/safe-area.js +98 -0
  434. package/dist/collection/tailwind/screens.js +6 -6
  435. package/dist/collection/tailwind/shadows.js +2 -0
  436. package/dist/collection/tailwind/width.js +19 -13
  437. package/dist/collection/tailwind/z-index.js +15 -1
  438. package/dist/collection/tailwind.config.js +9 -2
  439. package/dist/collection/types/index.js +3 -0
  440. package/dist/collection/types/index.js.map +1 -0
  441. package/dist/collection/types/table.js +4 -0
  442. package/dist/collection/types/table.js.map +1 -0
  443. package/dist/collection/types/tailwind.js +2 -0
  444. package/dist/collection/types/tailwind.js.map +1 -0
  445. package/dist/collection/utils/child-of.js +1 -0
  446. package/dist/collection/utils/child-of.js.map +1 -0
  447. package/dist/collection/utils/icons.js +13 -0
  448. package/dist/collection/utils/icons.js.map +1 -0
  449. package/dist/collection/utils/illustrations.js +7 -0
  450. package/dist/collection/utils/illustrations.js.map +1 -0
  451. package/dist/collection/utils/index.js +7 -0
  452. package/dist/collection/utils/index.js.map +1 -0
  453. package/dist/collection/utils/localization.js +56 -0
  454. package/dist/collection/utils/localization.js.map +1 -0
  455. package/dist/collection/utils/object-get-by-path.js +9 -0
  456. package/dist/collection/utils/object-get-by-path.js.map +1 -0
  457. package/dist/collection/utils/transformers.js +5 -0
  458. package/dist/collection/utils/transformers.js.map +1 -0
  459. package/dist/components/backdrop.component.js +59 -0
  460. package/dist/components/backdrop.component.js.map +1 -0
  461. package/dist/components/button.component.js +16 -33
  462. package/dist/components/button.component.js.map +1 -0
  463. package/dist/components/calendar.component.js +3031 -0
  464. package/dist/components/calendar.component.js.map +1 -0
  465. package/dist/components/child-of.js +9 -0
  466. package/dist/components/child-of.js.map +1 -0
  467. package/dist/components/counter.component.js +4 -8
  468. package/dist/components/counter.component.js.map +1 -0
  469. package/dist/components/divider.component.js +4 -2
  470. package/dist/components/divider.component.js.map +1 -0
  471. package/dist/components/drawer-body.component.js +35 -0
  472. package/dist/components/drawer-body.component.js.map +1 -0
  473. package/dist/components/drawer-container.component.js +34 -0
  474. package/dist/components/drawer-container.component.js.map +1 -0
  475. package/dist/components/drawer-header.component.js +54 -0
  476. package/dist/components/drawer-header.component.js.map +1 -0
  477. package/dist/components/dropdown-menu-container.component.js +11 -4
  478. package/dist/components/dropdown-menu-container.component.js.map +1 -0
  479. package/dist/components/dropdown-menu-item.component.js +45 -0
  480. package/dist/components/dropdown-menu-item.component.js.map +1 -0
  481. package/dist/components/dropdown.component.js +77 -72
  482. package/dist/components/dropdown.component.js.map +1 -0
  483. package/dist/components/floating-ui.dom.esm.js +1327 -0
  484. package/dist/components/floating-ui.dom.esm.js.map +1 -0
  485. package/dist/components/helper.component.js +4 -5
  486. package/dist/components/helper.component.js.map +1 -0
  487. package/dist/components/icon.component.js +77 -60
  488. package/dist/components/icon.component.js.map +1 -0
  489. package/dist/{cjs/p-illustration.cjs.entry.js → components/illustration.component.js} +247 -16
  490. package/dist/components/illustration.component.js.map +1 -0
  491. package/dist/components/index.d.ts +9 -45
  492. package/dist/components/index.js +13 -43
  493. package/dist/components/index.js.map +1 -0
  494. package/dist/components/input-error.component.js +50 -0
  495. package/dist/components/input-error.component.js.map +1 -0
  496. package/dist/components/input-group.component.js +172 -0
  497. package/dist/components/input-group.component.js.map +1 -0
  498. package/dist/components/label.component.js +54 -0
  499. package/dist/components/label.component.js.map +1 -0
  500. package/dist/components/loader.component.js +12 -14
  501. package/dist/components/loader.component.js.map +1 -0
  502. package/dist/components/localization.js +59 -0
  503. package/dist/components/localization.js.map +1 -0
  504. package/dist/components/modal-body.component.js +8 -7
  505. package/dist/components/modal-body.component.js.map +1 -0
  506. package/dist/components/modal-container.component.js +8 -7
  507. package/dist/components/modal-container.component.js.map +1 -0
  508. package/dist/components/modal-footer.component.js +6 -10
  509. package/dist/components/modal-footer.component.js.map +1 -0
  510. package/dist/components/modal-header.component.js +21 -10
  511. package/dist/components/modal-header.component.js.map +1 -0
  512. package/dist/components/object-get-by-path.js +16 -0
  513. package/dist/components/object-get-by-path.js.map +1 -0
  514. package/dist/components/p-accordion.js +5 -11
  515. package/dist/components/p-accordion.js.map +1 -0
  516. package/dist/components/{p-modal-backdrop.d.ts → p-attachment.d.ts} +4 -4
  517. package/dist/components/p-attachment.js +88 -0
  518. package/dist/components/p-attachment.js.map +1 -0
  519. package/dist/components/p-avatar-group.js +5 -2
  520. package/dist/components/p-avatar-group.js.map +1 -0
  521. package/dist/components/p-avatar.js +59 -1
  522. package/dist/components/p-avatar.js.map +1 -0
  523. package/dist/components/p-backdrop.d.ts +11 -0
  524. package/dist/components/p-backdrop.js +8 -0
  525. package/dist/components/p-backdrop.js.map +1 -0
  526. package/dist/components/p-button.js +2 -0
  527. package/dist/components/p-button.js.map +1 -0
  528. package/dist/components/p-calendar.d.ts +11 -0
  529. package/dist/components/p-calendar.js +8 -0
  530. package/dist/components/p-calendar.js.map +1 -0
  531. package/dist/components/p-card-body.js +4 -5
  532. package/dist/components/p-card-body.js.map +1 -0
  533. package/dist/components/p-card-container.js +4 -8
  534. package/dist/components/p-card-container.js.map +1 -0
  535. package/dist/components/p-card-header.js +5 -5
  536. package/dist/components/p-card-header.js.map +1 -0
  537. package/dist/components/p-content-slider.js +117 -57
  538. package/dist/components/p-content-slider.js.map +1 -0
  539. package/dist/components/p-counter.js +2 -0
  540. package/dist/components/p-counter.js.map +1 -0
  541. package/dist/components/p-datepicker.d.ts +11 -0
  542. package/dist/components/p-datepicker.js +3125 -0
  543. package/dist/components/p-datepicker.js.map +1 -0
  544. package/dist/components/p-divider.js +2 -0
  545. package/dist/components/p-divider.js.map +1 -0
  546. package/dist/components/p-drawer-body.d.ts +11 -0
  547. package/dist/components/p-drawer-body.js +8 -0
  548. package/dist/components/p-drawer-body.js.map +1 -0
  549. package/dist/components/p-drawer-container.d.ts +11 -0
  550. package/dist/components/p-drawer-container.js +8 -0
  551. package/dist/components/p-drawer-container.js.map +1 -0
  552. package/dist/components/p-drawer-header.d.ts +11 -0
  553. package/dist/components/p-drawer-header.js +8 -0
  554. package/dist/components/p-drawer-header.js.map +1 -0
  555. package/dist/components/p-drawer.d.ts +11 -0
  556. package/dist/components/p-drawer.js +130 -0
  557. package/dist/components/p-drawer.js.map +1 -0
  558. package/dist/components/p-dropdown-menu-container.js +2 -0
  559. package/dist/components/p-dropdown-menu-container.js.map +1 -0
  560. package/dist/components/p-dropdown-menu-item.js +3 -41
  561. package/dist/components/p-dropdown-menu-item.js.map +1 -0
  562. package/dist/components/p-dropdown.js +2 -0
  563. package/dist/components/p-dropdown.js.map +1 -0
  564. package/dist/components/p-helper.js +2 -0
  565. package/dist/components/p-helper.js.map +1 -0
  566. package/dist/components/p-icon.js +2 -0
  567. package/dist/components/p-icon.js.map +1 -0
  568. package/dist/components/p-illustration.js +3 -1435
  569. package/dist/components/p-illustration.js.map +1 -0
  570. package/dist/components/p-info-panel.js +6 -8
  571. package/dist/components/p-info-panel.js.map +1 -0
  572. package/dist/components/p-input-error.d.ts +11 -0
  573. package/dist/components/p-input-error.js +8 -0
  574. package/dist/components/p-input-error.js.map +1 -0
  575. package/dist/components/p-input-group.js +3 -91
  576. package/dist/components/p-input-group.js.map +1 -0
  577. package/dist/components/{p-tag.d.ts → p-label.d.ts} +4 -4
  578. package/dist/components/p-label.js +8 -0
  579. package/dist/components/p-label.js.map +1 -0
  580. package/dist/components/p-layout.js +4 -5
  581. package/dist/components/p-layout.js.map +1 -0
  582. package/dist/components/p-loader.js +2 -0
  583. package/dist/components/p-loader.js.map +1 -0
  584. package/dist/components/p-modal-body.js +2 -0
  585. package/dist/components/p-modal-body.js.map +1 -0
  586. package/dist/components/p-modal-container.js +2 -0
  587. package/dist/components/p-modal-container.js.map +1 -0
  588. package/dist/components/p-modal-footer.js +2 -0
  589. package/dist/components/p-modal-footer.js.map +1 -0
  590. package/dist/components/p-modal-header.js +2 -0
  591. package/dist/components/p-modal-header.js.map +1 -0
  592. package/dist/components/p-modal.js +55 -26
  593. package/dist/components/p-modal.js.map +1 -0
  594. package/dist/components/p-navbar.js +12 -10
  595. package/dist/components/p-navbar.js.map +1 -0
  596. package/dist/components/p-navigation-item.js +8 -5
  597. package/dist/components/p-navigation-item.js.map +1 -0
  598. package/dist/components/p-page-size-select.d.ts +11 -0
  599. package/dist/components/p-page-size-select.js +8 -0
  600. package/dist/components/p-page-size-select.js.map +1 -0
  601. package/dist/components/p-pagination-item.js +2 -0
  602. package/dist/components/p-pagination-item.js.map +1 -0
  603. package/dist/components/p-pagination.js +3 -195
  604. package/dist/components/p-pagination.js.map +1 -0
  605. package/dist/components/p-profile.js +15 -22
  606. package/dist/components/p-profile.js.map +1 -0
  607. package/dist/components/p-segment-container.js +3 -27
  608. package/dist/components/p-segment-container.js.map +1 -0
  609. package/dist/components/p-segment-item.js +3 -49
  610. package/dist/components/p-segment-item.js.map +1 -0
  611. package/dist/components/p-select.d.ts +11 -0
  612. package/dist/components/p-select.js +340 -0
  613. package/dist/components/p-select.js.map +1 -0
  614. package/dist/components/p-slider-indicator.js +2 -0
  615. package/dist/components/p-slider-indicator.js.map +1 -0
  616. package/dist/components/p-status.js +7 -5
  617. package/dist/components/p-status.js.map +1 -0
  618. package/dist/components/p-stepper-item.js +47 -1
  619. package/dist/components/p-stepper-item.js.map +1 -0
  620. package/dist/components/p-stepper-line.js +2 -0
  621. package/dist/components/p-stepper-line.js.map +1 -0
  622. package/dist/components/p-stepper.js +56 -58
  623. package/dist/components/p-stepper.js.map +1 -0
  624. package/dist/components/p-tab-group.js +4 -5
  625. package/dist/components/p-tab-group.js.map +1 -0
  626. package/dist/components/p-tab-item.js +4 -5
  627. package/dist/components/p-tab-item.js.map +1 -0
  628. package/dist/components/p-table-cell.d.ts +11 -0
  629. package/dist/components/p-table-cell.js +8 -0
  630. package/dist/components/p-table-cell.js.map +1 -0
  631. package/dist/components/p-table-column.d.ts +11 -0
  632. package/dist/components/p-table-column.js +52 -0
  633. package/dist/components/p-table-column.js.map +1 -0
  634. package/dist/components/p-table-container.d.ts +11 -0
  635. package/dist/components/p-table-container.js +8 -0
  636. package/dist/components/p-table-container.js.map +1 -0
  637. package/dist/components/p-table-footer.d.ts +11 -0
  638. package/dist/components/p-table-footer.js +8 -0
  639. package/dist/components/p-table-footer.js.map +1 -0
  640. package/dist/components/p-table-header.d.ts +11 -0
  641. package/dist/components/p-table-header.js +8 -0
  642. package/dist/components/p-table-header.js.map +1 -0
  643. package/dist/components/p-table-row.d.ts +11 -0
  644. package/dist/components/p-table-row.js +8 -0
  645. package/dist/components/p-table-row.js.map +1 -0
  646. package/dist/components/p-table.d.ts +11 -0
  647. package/dist/components/p-table.js +552 -0
  648. package/dist/components/p-table.js.map +1 -0
  649. package/dist/components/p-toast-container.d.ts +11 -0
  650. package/dist/components/p-toast-container.js +38 -0
  651. package/dist/components/p-toast-container.js.map +1 -0
  652. package/dist/components/p-toast.d.ts +11 -0
  653. package/dist/components/p-toast.js +75 -0
  654. package/dist/components/p-toast.js.map +1 -0
  655. package/dist/components/p-tooltip.js +2 -0
  656. package/dist/components/p-tooltip.js.map +1 -0
  657. package/dist/components/page-size-select.component.js +107 -0
  658. package/dist/components/page-size-select.component.js.map +1 -0
  659. package/dist/components/pagination-item.component.js +4 -5
  660. package/dist/components/pagination-item.component.js.map +1 -0
  661. package/dist/components/pagination.component.js +196 -0
  662. package/dist/components/pagination.component.js.map +1 -0
  663. package/dist/components/segment-container.component.js +31 -0
  664. package/dist/components/segment-container.component.js.map +1 -0
  665. package/dist/components/segment-item.component.js +53 -0
  666. package/dist/components/segment-item.component.js.map +1 -0
  667. package/dist/components/slider-indicator.component.js +4 -5
  668. package/dist/components/slider-indicator.component.js.map +1 -0
  669. package/dist/components/stepper-line.component.js +4 -8
  670. package/dist/components/stepper-line.component.js.map +1 -0
  671. package/dist/components/table-cell.component.js +179 -0
  672. package/dist/components/table-cell.component.js.map +1 -0
  673. package/dist/components/table-container.component.js +32 -0
  674. package/dist/components/table-container.component.js.map +1 -0
  675. package/dist/components/table-footer.component.js +129 -0
  676. package/dist/components/table-footer.component.js.map +1 -0
  677. package/dist/components/table-header.component.js +1070 -0
  678. package/dist/components/table-header.component.js.map +1 -0
  679. package/dist/components/table-row.component.js +45 -0
  680. package/dist/components/table-row.component.js.map +1 -0
  681. package/dist/components/tooltip.component.js +60 -61
  682. package/dist/components/tooltip.component.js.map +1 -0
  683. package/dist/esm/child-of-90a8c4b5.js +9 -0
  684. package/dist/esm/child-of-90a8c4b5.js.map +1 -0
  685. package/dist/esm/constants-826f9460.js +6 -0
  686. package/dist/esm/constants-826f9460.js.map +1 -0
  687. package/dist/esm/floating-ui.dom.esm-314a52b2.js +1327 -0
  688. package/dist/esm/floating-ui.dom.esm-314a52b2.js.map +1 -0
  689. package/dist/esm/{index-9062156b.js → index-2c1bdb40.js} +980 -340
  690. package/dist/esm/index-2c1bdb40.js.map +1 -0
  691. package/dist/esm/index-934ac6da.js +2300 -0
  692. package/dist/esm/index-934ac6da.js.map +1 -0
  693. package/dist/esm/index.js +11 -0
  694. package/dist/esm/index.js.map +1 -0
  695. package/dist/esm/loader.js +6 -3
  696. package/dist/esm/loader.js.map +1 -0
  697. package/dist/esm/localization-901dc2d3.js +59 -0
  698. package/dist/esm/localization-901dc2d3.js.map +1 -0
  699. package/dist/esm/object-get-by-path-8f4f94b8.js +16 -0
  700. package/dist/esm/object-get-by-path-8f4f94b8.js.map +1 -0
  701. package/dist/esm/p-accordion.entry.js +5 -11
  702. package/dist/esm/p-accordion.entry.js.map +1 -0
  703. package/dist/esm/p-attachment.entry.js +35 -0
  704. package/dist/esm/p-attachment.entry.js.map +1 -0
  705. package/dist/esm/p-avatar-group.entry.js +5 -2
  706. package/dist/esm/p-avatar-group.entry.js.map +1 -0
  707. package/dist/esm/p-avatar.entry.js +41 -0
  708. package/dist/esm/p-avatar.entry.js.map +1 -0
  709. package/dist/esm/p-backdrop.entry.js +39 -0
  710. package/dist/esm/p-backdrop.entry.js.map +1 -0
  711. package/dist/esm/p-button_3.entry.js +142 -148
  712. package/dist/esm/p-button_3.entry.js.map +1 -0
  713. package/dist/esm/p-calendar.entry.js +699 -0
  714. package/dist/esm/p-calendar.entry.js.map +1 -0
  715. package/dist/esm/p-card-body.entry.js +4 -5
  716. package/dist/esm/p-card-body.entry.js.map +1 -0
  717. package/dist/esm/p-card-container.entry.js +4 -8
  718. package/dist/esm/p-card-container.entry.js.map +1 -0
  719. package/dist/esm/p-card-header.entry.js +5 -5
  720. package/dist/esm/p-card-header.entry.js.map +1 -0
  721. package/dist/esm/p-content-slider.entry.js +115 -56
  722. package/dist/esm/p-content-slider.entry.js.map +1 -0
  723. package/dist/esm/p-counter.entry.js +4 -8
  724. package/dist/esm/p-counter.entry.js.map +1 -0
  725. package/dist/esm/p-datepicker.entry.js +3039 -0
  726. package/dist/esm/p-datepicker.entry.js.map +1 -0
  727. package/dist/esm/p-divider.entry.js +4 -2
  728. package/dist/esm/p-divider.entry.js.map +1 -0
  729. package/dist/esm/p-drawer-body_3.entry.js +45 -0
  730. package/dist/esm/p-drawer-body_3.entry.js.map +1 -0
  731. package/dist/esm/p-drawer.entry.js +61 -0
  732. package/dist/esm/p-drawer.entry.js.map +1 -0
  733. package/dist/esm/p-dropdown-menu-container.entry.js +7 -3
  734. package/dist/esm/p-dropdown-menu-container.entry.js.map +1 -0
  735. package/dist/esm/p-dropdown_2.entry.js +158 -0
  736. package/dist/esm/p-dropdown_2.entry.js.map +1 -0
  737. package/dist/esm/p-helper_3.entry.js +144 -0
  738. package/dist/esm/p-helper_3.entry.js.map +1 -0
  739. package/dist/esm/{p-illustration.entry.js → p-illustration_6.entry.js} +1417 -8
  740. package/dist/esm/p-illustration_6.entry.js.map +1 -0
  741. package/dist/esm/p-info-panel.entry.js +6 -8
  742. package/dist/esm/p-info-panel.entry.js.map +1 -0
  743. package/dist/esm/p-label_3.entry.js +59 -0
  744. package/dist/esm/p-label_3.entry.js.map +1 -0
  745. package/dist/esm/p-layout.entry.js +4 -5
  746. package/dist/esm/p-layout.entry.js.map +1 -0
  747. package/dist/esm/p-modal-body_4.entry.js +72 -0
  748. package/dist/esm/p-modal-body_4.entry.js.map +1 -0
  749. package/dist/esm/p-modal.entry.js +34 -21
  750. package/dist/esm/p-modal.entry.js.map +1 -0
  751. package/dist/esm/p-navbar.entry.js +5 -9
  752. package/dist/esm/p-navbar.entry.js.map +1 -0
  753. package/dist/esm/p-navigation-item.entry.js +8 -5
  754. package/dist/esm/p-navigation-item.entry.js.map +1 -0
  755. package/dist/esm/p-page-size-select_3.entry.js +218 -0
  756. package/dist/esm/p-page-size-select_3.entry.js.map +1 -0
  757. package/dist/esm/p-profile.entry.js +14 -15
  758. package/dist/esm/p-profile.entry.js.map +1 -0
  759. package/dist/esm/p-select.entry.js +241 -0
  760. package/dist/esm/p-select.entry.js.map +1 -0
  761. package/dist/esm/p-slider-indicator.entry.js +4 -5
  762. package/dist/esm/p-slider-indicator.entry.js.map +1 -0
  763. package/dist/esm/p-status.entry.js +7 -5
  764. package/dist/esm/p-status.entry.js.map +1 -0
  765. package/dist/esm/p-stepper-item.entry.js +22 -0
  766. package/dist/esm/p-stepper-item.entry.js.map +1 -0
  767. package/dist/esm/p-stepper-line.entry.js +19 -0
  768. package/dist/esm/p-stepper-line.entry.js.map +1 -0
  769. package/dist/esm/p-stepper.entry.js +53 -44
  770. package/dist/esm/p-stepper.entry.js.map +1 -0
  771. package/dist/esm/p-tab-group.entry.js +11 -10
  772. package/dist/esm/p-tab-group.entry.js.map +1 -0
  773. package/dist/esm/p-tab-item.entry.js +4 -5
  774. package/dist/esm/p-tab-item.entry.js.map +1 -0
  775. package/dist/esm/p-table-column.entry.js +26 -0
  776. package/dist/esm/p-table-column.entry.js.map +1 -0
  777. package/dist/esm/p-table.entry.js +356 -0
  778. package/dist/esm/p-table.entry.js.map +1 -0
  779. package/dist/esm/p-toast-container.entry.js +18 -0
  780. package/dist/esm/p-toast-container.entry.js.map +1 -0
  781. package/dist/esm/p-toast.entry.js +31 -0
  782. package/dist/esm/p-toast.entry.js.map +1 -0
  783. package/dist/esm/p-tooltip.entry.js +59 -61
  784. package/dist/esm/p-tooltip.entry.js.map +1 -0
  785. package/dist/esm/paperless.js +9 -3
  786. package/dist/esm/paperless.js.map +1 -0
  787. package/dist/esm/polyfills/css-shim.js +1 -1
  788. package/dist/index.html +1 -1
  789. package/dist/paperless/index.esm.js +2 -0
  790. package/dist/paperless/index.esm.js.map +1 -0
  791. package/dist/paperless/p-07259c61.entry.js +2 -0
  792. package/dist/paperless/p-07259c61.entry.js.map +1 -0
  793. package/dist/paperless/p-11f5c8c7.entry.js +2 -0
  794. package/dist/paperless/p-11f5c8c7.entry.js.map +1 -0
  795. package/dist/paperless/p-12171df4.entry.js +2 -0
  796. package/dist/paperless/p-12171df4.entry.js.map +1 -0
  797. package/dist/paperless/p-1630e39b.entry.js +2 -0
  798. package/dist/paperless/p-1630e39b.entry.js.map +1 -0
  799. package/dist/paperless/p-18c0dd17.entry.js +2 -0
  800. package/dist/paperless/p-18c0dd17.entry.js.map +1 -0
  801. package/dist/paperless/p-195632a8.entry.js +2 -0
  802. package/dist/paperless/p-195632a8.entry.js.map +1 -0
  803. package/dist/paperless/p-1f55126f.entry.js +2 -0
  804. package/dist/paperless/p-1f55126f.entry.js.map +1 -0
  805. package/dist/paperless/p-26da620b.entry.js +2 -0
  806. package/dist/paperless/p-26da620b.entry.js.map +1 -0
  807. package/dist/paperless/p-2a668e75.entry.js +2 -0
  808. package/dist/paperless/p-2a668e75.entry.js.map +1 -0
  809. package/dist/paperless/p-350d452b.entry.js +2 -0
  810. package/dist/paperless/p-350d452b.entry.js.map +1 -0
  811. package/dist/paperless/p-36967a97.entry.js +2 -0
  812. package/dist/paperless/p-36967a97.entry.js.map +1 -0
  813. package/dist/paperless/p-3d8b2178.entry.js +2 -0
  814. package/dist/paperless/p-3d8b2178.entry.js.map +1 -0
  815. package/dist/paperless/p-47bcc23e.entry.js +2 -0
  816. package/dist/paperless/p-47bcc23e.entry.js.map +1 -0
  817. package/dist/paperless/p-47e461b7.entry.js +2 -0
  818. package/dist/paperless/p-47e461b7.entry.js.map +1 -0
  819. package/dist/paperless/p-4c51a801.entry.js +2 -0
  820. package/dist/paperless/p-4c51a801.entry.js.map +1 -0
  821. package/dist/paperless/p-4e650fe4.js +2 -0
  822. package/dist/paperless/p-4e650fe4.js.map +1 -0
  823. package/dist/paperless/p-51408aca.entry.js +2 -0
  824. package/dist/paperless/p-51408aca.entry.js.map +1 -0
  825. package/dist/paperless/p-594b28a7.entry.js +2 -0
  826. package/dist/paperless/p-594b28a7.entry.js.map +1 -0
  827. package/dist/paperless/p-5c7b20a3.entry.js +2 -0
  828. package/dist/paperless/p-5c7b20a3.entry.js.map +1 -0
  829. package/dist/paperless/p-6124f388.entry.js +2 -0
  830. package/dist/paperless/p-6124f388.entry.js.map +1 -0
  831. package/dist/paperless/p-6c60fd3d.js +2 -0
  832. package/dist/paperless/p-6c60fd3d.js.map +1 -0
  833. package/dist/paperless/p-6ccf5cdd.js +3 -0
  834. package/dist/paperless/p-6ccf5cdd.js.map +1 -0
  835. package/dist/paperless/p-6d5aa646.entry.js +2 -0
  836. package/dist/paperless/p-6d5aa646.entry.js.map +1 -0
  837. package/dist/paperless/p-6f1352e0.entry.js +2 -0
  838. package/dist/paperless/p-6f1352e0.entry.js.map +1 -0
  839. package/dist/paperless/p-8a6728d5.js +2 -0
  840. package/dist/paperless/p-8a6728d5.js.map +1 -0
  841. package/dist/paperless/p-910bd6bc.entry.js +2 -0
  842. package/dist/paperless/p-910bd6bc.entry.js.map +1 -0
  843. package/dist/paperless/p-91725831.entry.js +2 -0
  844. package/dist/paperless/p-91725831.entry.js.map +1 -0
  845. package/dist/paperless/p-946286e2.entry.js +2 -0
  846. package/dist/paperless/p-946286e2.entry.js.map +1 -0
  847. package/dist/paperless/p-a1c1d95b.entry.js +2 -0
  848. package/dist/paperless/p-a1c1d95b.entry.js.map +1 -0
  849. package/dist/paperless/p-a23ea8fe.entry.js +2 -0
  850. package/dist/paperless/p-a23ea8fe.entry.js.map +1 -0
  851. package/dist/paperless/p-abcd80e9.entry.js +2 -0
  852. package/dist/paperless/p-abcd80e9.entry.js.map +1 -0
  853. package/dist/paperless/p-ae248aef.js +2 -0
  854. package/dist/paperless/p-ae248aef.js.map +1 -0
  855. package/dist/paperless/p-b0398d3b.entry.js +2 -0
  856. package/dist/paperless/p-b0398d3b.entry.js.map +1 -0
  857. package/dist/paperless/p-b2bc1d2a.entry.js +2 -0
  858. package/dist/paperless/p-b2bc1d2a.entry.js.map +1 -0
  859. package/dist/paperless/p-b5ce8cd4.entry.js +2 -0
  860. package/dist/paperless/p-b5ce8cd4.entry.js.map +1 -0
  861. package/dist/paperless/p-b92dd098.entry.js +2 -0
  862. package/dist/paperless/p-b92dd098.entry.js.map +1 -0
  863. package/dist/paperless/p-b9f742e0.entry.js +2 -0
  864. package/dist/paperless/p-b9f742e0.entry.js.map +1 -0
  865. package/dist/paperless/p-bf0eca4f.entry.js +2 -0
  866. package/dist/paperless/p-bf0eca4f.entry.js.map +1 -0
  867. package/dist/paperless/p-ce1abd74.entry.js +2 -0
  868. package/dist/paperless/p-ce1abd74.entry.js.map +1 -0
  869. package/dist/paperless/p-ce443f5b.entry.js +2 -0
  870. package/dist/paperless/p-ce443f5b.entry.js.map +1 -0
  871. package/dist/paperless/p-da2426c7.js +2 -0
  872. package/dist/paperless/p-da2426c7.js.map +1 -0
  873. package/dist/paperless/p-da6e5abd.entry.js +2 -0
  874. package/dist/paperless/p-da6e5abd.entry.js.map +1 -0
  875. package/dist/paperless/p-e17560e6.entry.js +2 -0
  876. package/dist/paperless/p-e17560e6.entry.js.map +1 -0
  877. package/dist/paperless/p-e1da7376.entry.js +2 -0
  878. package/dist/paperless/p-e1da7376.entry.js.map +1 -0
  879. package/dist/paperless/p-e9a1b51e.entry.js +2 -0
  880. package/dist/paperless/p-e9a1b51e.entry.js.map +1 -0
  881. package/dist/paperless/p-ec850aca.entry.js +2 -0
  882. package/dist/paperless/p-ec850aca.entry.js.map +1 -0
  883. package/dist/paperless/p-ed6edf0a.entry.js +2 -0
  884. package/dist/paperless/p-ed6edf0a.entry.js.map +1 -0
  885. package/dist/paperless/p-f47247a6.entry.js +2 -0
  886. package/dist/paperless/p-f47247a6.entry.js.map +1 -0
  887. package/dist/paperless/p-fef32402.js +2 -0
  888. package/dist/paperless/p-fef32402.js.map +1 -0
  889. package/dist/paperless/paperless.css +1003 -801
  890. package/dist/paperless/paperless.esm.js +2 -1
  891. package/dist/paperless/paperless.esm.js.map +1 -0
  892. package/dist/style/_fonts.scss +70 -0
  893. package/dist/style/_helpers.scss +5 -0
  894. package/dist/style/_mixins.scss +1 -0
  895. package/dist/style/_reset.scss +30 -0
  896. package/dist/style/_tailwind.scss +3 -0
  897. package/dist/style/_typograhpy.scss +29 -0
  898. package/dist/style/_variables.scss +2 -0
  899. package/dist/style/form/_checkbox.scss +111 -0
  900. package/dist/style/form/_input.scss +31 -0
  901. package/dist/style/form/_mixins.scss +114 -0
  902. package/dist/style/form/_radio.scss +58 -0
  903. package/dist/style/form/_textarea.scss +18 -0
  904. package/dist/style/form/index.scss +4 -0
  905. package/dist/style/mixins/_scrollbar.scss +32 -0
  906. package/dist/style/paperless.scss +12 -0
  907. package/dist/sw.js +1 -1
  908. package/dist/sw.js.map +1 -1
  909. package/dist/tailwind/animation.js +72 -2
  910. package/dist/tailwind/border-radius.js +1 -0
  911. package/dist/tailwind/height.js +5 -0
  912. package/dist/tailwind/plugins/safe-area.js +98 -0
  913. package/dist/tailwind/screens.js +6 -6
  914. package/dist/tailwind/shadows.js +2 -0
  915. package/dist/tailwind/width.js +19 -13
  916. package/dist/tailwind/z-index.js +15 -1
  917. package/dist/tailwind.config.js +9 -2
  918. package/dist/types/components/atoms/avatar/avatar.component.d.ts +3 -1
  919. package/dist/types/components/atoms/backdrop/backdrop.component.d.ts +31 -0
  920. package/dist/types/components/atoms/button/button.component.d.ts +5 -5
  921. package/dist/types/components/atoms/drawer-body/drawer-body.component.d.ts +7 -0
  922. package/dist/types/components/atoms/drawer-container/drawer-container.component.d.ts +7 -0
  923. package/dist/types/components/atoms/drawer-header/drawer-header.component.d.ts +12 -0
  924. package/dist/types/components/atoms/dropdown-menu-container/dropdown-menu-container.component.d.ts +8 -0
  925. package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +4 -0
  926. package/dist/types/components/atoms/helper/helper.component.d.ts +1 -1
  927. package/dist/types/components/atoms/icon/icon.component.d.ts +3 -3
  928. package/dist/types/components/atoms/illustration/illustration.component.d.ts +1 -1
  929. package/dist/types/components/atoms/label/label.component.d.ts +33 -0
  930. package/dist/types/components/atoms/layout/layout.component.d.ts +1 -1
  931. package/dist/types/components/atoms/loader/loader.component.d.ts +1 -1
  932. package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +4 -0
  933. package/dist/types/components/atoms/modal-container/modal-container.component.d.ts +4 -0
  934. package/dist/types/components/atoms/modal-footer/modal-footer.component.d.ts +0 -4
  935. package/dist/types/components/atoms/modal-header/modal-header.component.d.ts +1 -1
  936. package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +1 -1
  937. package/dist/types/components/atoms/status/status.component.d.ts +1 -1
  938. package/dist/types/components/atoms/stepper-item/stepper-item.component.d.ts +4 -0
  939. package/dist/types/components/atoms/table-container/table-container.component.d.ts +3 -0
  940. package/dist/types/components/atoms/toast-container/toast-container.component.d.ts +7 -0
  941. package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +10 -5
  942. package/dist/types/components/helpers/table-column/table-column.component.d.ts +42 -0
  943. package/dist/types/components/molecules/attachment/attachment.component.d.ts +28 -0
  944. package/dist/types/components/molecules/calendar/calendar.component.d.ts +76 -0
  945. package/dist/types/components/molecules/content-slider/content-slider.component.d.ts +14 -5
  946. package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +97 -0
  947. package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +29 -6
  948. package/dist/types/components/molecules/input-error/input-error.component.d.ts +12 -0
  949. package/dist/types/components/molecules/input-group/input-group.component.d.ts +22 -3
  950. package/dist/types/components/molecules/page-size-select/constants.d.ts +2 -0
  951. package/dist/types/components/molecules/page-size-select/page-size-select.component.d.ts +50 -0
  952. package/dist/types/components/molecules/pagination/pagination.component.d.ts +7 -0
  953. package/dist/types/components/molecules/profile/profile.component.d.ts +2 -1
  954. package/dist/types/components/molecules/select/select.component.d.ts +141 -0
  955. package/dist/types/components/molecules/stepper/stepper.component.d.ts +5 -2
  956. package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +42 -0
  957. package/dist/types/components/molecules/table-footer/table-footer.component.d.ts +63 -0
  958. package/dist/types/components/molecules/table-header/table-header.component.d.ts +101 -0
  959. package/dist/types/components/molecules/table-row/table-row.component.d.ts +11 -0
  960. package/dist/types/components/molecules/toast/toast.component.d.ts +39 -0
  961. package/dist/types/components/organisms/drawer/drawer.component.d.ts +52 -0
  962. package/dist/types/components/organisms/modal/modal.component.d.ts +24 -4
  963. package/dist/types/components/organisms/table/table.component.d.ts +240 -0
  964. package/dist/types/components.d.ts +2508 -535
  965. package/dist/types/index.d.ts +2 -0
  966. package/dist/types/stencil-public-runtime.d.ts +92 -19
  967. package/dist/types/types/index.d.ts +2 -0
  968. package/dist/types/types/table.d.ts +29 -0
  969. package/dist/types/types/tailwind.d.ts +2 -0
  970. package/dist/types/utils/icons.d.ts +6 -0
  971. package/dist/types/utils/illustrations.d.ts +3 -0
  972. package/dist/types/utils/index.d.ts +6 -0
  973. package/dist/types/utils/localization.d.ts +2 -0
  974. package/dist/types/utils/object-get-by-path.d.ts +1 -0
  975. package/dist/types/utils/transformers.d.ts +2 -0
  976. package/dist/{workbox-5fe694da.js → workbox-bc53c9ad.js} +2 -2
  977. package/dist/workbox-bc53c9ad.js.map +1 -0
  978. package/hydrate/index.d.ts +218 -0
  979. package/hydrate/index.js +21136 -0
  980. package/hydrate/package.json +6 -0
  981. package/loader/index.d.ts +9 -0
  982. package/loader/package.json +1 -0
  983. package/package.json +24 -18
  984. package/dist/build/p-113baa35.entry.js +0 -1
  985. package/dist/build/p-1e7d45e4.entry.js +0 -1
  986. package/dist/build/p-1ef22f4e.entry.js +0 -1
  987. package/dist/build/p-2672f14b.entry.js +0 -1
  988. package/dist/build/p-2beaf0e8.entry.js +0 -1
  989. package/dist/build/p-3f6c9d44.entry.js +0 -1
  990. package/dist/build/p-4336cbbc.entry.js +0 -1
  991. package/dist/build/p-58ce5668.entry.js +0 -1
  992. package/dist/build/p-6088647a.entry.js +0 -1
  993. package/dist/build/p-6835a9e3.entry.js +0 -1
  994. package/dist/build/p-6e778574.entry.js +0 -1
  995. package/dist/build/p-79d3258f.entry.js +0 -1
  996. package/dist/build/p-801d05b6.entry.js +0 -1
  997. package/dist/build/p-829c4101.entry.js +0 -1
  998. package/dist/build/p-89fda3a8.entry.js +0 -1
  999. package/dist/build/p-8ac8a69d.entry.js +0 -1
  1000. package/dist/build/p-8b743795.entry.js +0 -1
  1001. package/dist/build/p-92b6c76c.entry.js +0 -1
  1002. package/dist/build/p-938f52ee.entry.js +0 -1
  1003. package/dist/build/p-9d98d0d9.entry.js +0 -1
  1004. package/dist/build/p-a5ebbd0c.entry.js +0 -1
  1005. package/dist/build/p-a6127c75.entry.js +0 -1
  1006. package/dist/build/p-a7086ffa.js +0 -1
  1007. package/dist/build/p-aa14483b.entry.js +0 -1
  1008. package/dist/build/p-bc7e8cc4.js +0 -2
  1009. package/dist/build/p-bd50db3d.entry.js +0 -1
  1010. package/dist/build/p-c27046e6.entry.js +0 -1
  1011. package/dist/build/p-c59d9fc2.entry.js +0 -1
  1012. package/dist/build/p-cc177072.entry.js +0 -1
  1013. package/dist/build/p-d32f2578.entry.js +0 -1
  1014. package/dist/build/p-e20a1842.entry.js +0 -1
  1015. package/dist/build/p-e2a98d53.entry.js +0 -1
  1016. package/dist/build/p-e934ef94.entry.js +0 -1
  1017. package/dist/build/p-e9e20ac3.entry.js +0 -1
  1018. package/dist/build/p-ec2a5f95.entry.js +0 -1
  1019. package/dist/build/p-ede5e914.entry.js +0 -1
  1020. package/dist/cjs/p-avatar_2.cjs.entry.js +0 -179
  1021. package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +0 -23
  1022. package/dist/cjs/p-helper.cjs.entry.js +0 -23
  1023. package/dist/cjs/p-input-group.cjs.entry.js +0 -51
  1024. package/dist/cjs/p-modal-backdrop_5.cjs.entry.js +0 -101
  1025. package/dist/cjs/p-pagination-item.cjs.entry.js +0 -23
  1026. package/dist/cjs/p-pagination.cjs.entry.js +0 -171
  1027. package/dist/cjs/p-segment-container.cjs.entry.js +0 -19
  1028. package/dist/cjs/p-segment-item.cjs.entry.js +0 -29
  1029. package/dist/cjs/p-stepper-item_2.cjs.entry.js +0 -56
  1030. package/dist/cjs/p-tag.cjs.entry.js +0 -27
  1031. package/dist/cjs/popper-e0c4ed4c.js +0 -1790
  1032. package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.css +0 -7
  1033. package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.js +0 -15
  1034. package/dist/collection/components/atoms/tab-group/tab-group.component.css +0 -9
  1035. package/dist/collection/components/atoms/tag/tag.component.css +0 -51
  1036. package/dist/collection/components/atoms/tag/tag.component.js +0 -64
  1037. package/dist/collection/utils/types.js +0 -1
  1038. package/dist/collection/utils/utils.js +0 -3
  1039. package/dist/components/avatar.component.js +0 -54
  1040. package/dist/components/modal-backdrop.component.js +0 -30
  1041. package/dist/components/p-modal-backdrop.js +0 -6
  1042. package/dist/components/p-tag.js +0 -44
  1043. package/dist/components/popper.js +0 -1788
  1044. package/dist/components/stepper-item.component.js +0 -57
  1045. package/dist/esm/p-avatar_2.entry.js +0 -174
  1046. package/dist/esm/p-dropdown-menu-item.entry.js +0 -19
  1047. package/dist/esm/p-helper.entry.js +0 -19
  1048. package/dist/esm/p-input-group.entry.js +0 -47
  1049. package/dist/esm/p-modal-backdrop_5.entry.js +0 -93
  1050. package/dist/esm/p-pagination-item.entry.js +0 -19
  1051. package/dist/esm/p-pagination.entry.js +0 -167
  1052. package/dist/esm/p-segment-container.entry.js +0 -15
  1053. package/dist/esm/p-segment-item.entry.js +0 -25
  1054. package/dist/esm/p-stepper-item_2.entry.js +0 -51
  1055. package/dist/esm/p-tag.entry.js +0 -23
  1056. package/dist/esm/popper-41c6f9cd.js +0 -1788
  1057. package/dist/paperless/p-113baa35.entry.js +0 -1
  1058. package/dist/paperless/p-1e7d45e4.entry.js +0 -1
  1059. package/dist/paperless/p-1ef22f4e.entry.js +0 -1
  1060. package/dist/paperless/p-2672f14b.entry.js +0 -1
  1061. package/dist/paperless/p-2beaf0e8.entry.js +0 -1
  1062. package/dist/paperless/p-3f6c9d44.entry.js +0 -1
  1063. package/dist/paperless/p-4336cbbc.entry.js +0 -1
  1064. package/dist/paperless/p-58ce5668.entry.js +0 -1
  1065. package/dist/paperless/p-6088647a.entry.js +0 -1
  1066. package/dist/paperless/p-6835a9e3.entry.js +0 -1
  1067. package/dist/paperless/p-6e778574.entry.js +0 -1
  1068. package/dist/paperless/p-79d3258f.entry.js +0 -1
  1069. package/dist/paperless/p-801d05b6.entry.js +0 -1
  1070. package/dist/paperless/p-829c4101.entry.js +0 -1
  1071. package/dist/paperless/p-89fda3a8.entry.js +0 -1
  1072. package/dist/paperless/p-8ac8a69d.entry.js +0 -1
  1073. package/dist/paperless/p-8b743795.entry.js +0 -1
  1074. package/dist/paperless/p-92b6c76c.entry.js +0 -1
  1075. package/dist/paperless/p-938f52ee.entry.js +0 -1
  1076. package/dist/paperless/p-9d98d0d9.entry.js +0 -1
  1077. package/dist/paperless/p-a5ebbd0c.entry.js +0 -1
  1078. package/dist/paperless/p-a6127c75.entry.js +0 -1
  1079. package/dist/paperless/p-a7086ffa.js +0 -1
  1080. package/dist/paperless/p-aa14483b.entry.js +0 -1
  1081. package/dist/paperless/p-bc7e8cc4.js +0 -2
  1082. package/dist/paperless/p-bd50db3d.entry.js +0 -1
  1083. package/dist/paperless/p-c27046e6.entry.js +0 -1
  1084. package/dist/paperless/p-c59d9fc2.entry.js +0 -1
  1085. package/dist/paperless/p-cc177072.entry.js +0 -1
  1086. package/dist/paperless/p-d32f2578.entry.js +0 -1
  1087. package/dist/paperless/p-e20a1842.entry.js +0 -1
  1088. package/dist/paperless/p-e2a98d53.entry.js +0 -1
  1089. package/dist/paperless/p-e934ef94.entry.js +0 -1
  1090. package/dist/paperless/p-e9e20ac3.entry.js +0 -1
  1091. package/dist/paperless/p-ec2a5f95.entry.js +0 -1
  1092. package/dist/paperless/p-ede5e914.entry.js +0 -1
  1093. package/dist/types/components/atoms/modal-backdrop/modal-backdrop.component.d.ts +0 -3
  1094. package/dist/types/components/atoms/tag/tag.component.d.ts +0 -11
  1095. package/dist/types/utils/types.d.ts +0 -2
  1096. package/dist/types/utils/utils.d.ts +0 -1
  1097. package/dist/workbox-5fe694da.js.map +0 -1
@@ -0,0 +1,3031 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './icon.component.js';
3
+
4
+ function _typeof(obj) {
5
+ "@babel/helpers - typeof";
6
+
7
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
8
+ return typeof obj;
9
+ } : function (obj) {
10
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
11
+ }, _typeof(obj);
12
+ }
13
+
14
+ function toInteger(dirtyNumber) {
15
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
16
+ return NaN;
17
+ }
18
+ var number = Number(dirtyNumber);
19
+ if (isNaN(number)) {
20
+ return number;
21
+ }
22
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
23
+ }
24
+
25
+ function requiredArgs(required, args) {
26
+ if (args.length < required) {
27
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
28
+ }
29
+ }
30
+
31
+ /**
32
+ * @name toDate
33
+ * @category Common Helpers
34
+ * @summary Convert the given argument to an instance of Date.
35
+ *
36
+ * @description
37
+ * Convert the given argument to an instance of Date.
38
+ *
39
+ * If the argument is an instance of Date, the function returns its clone.
40
+ *
41
+ * If the argument is a number, it is treated as a timestamp.
42
+ *
43
+ * If the argument is none of the above, the function returns Invalid Date.
44
+ *
45
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
46
+ *
47
+ * @param {Date|Number} argument - the value to convert
48
+ * @returns {Date} the parsed date in the local time zone
49
+ * @throws {TypeError} 1 argument required
50
+ *
51
+ * @example
52
+ * // Clone the date:
53
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
54
+ * //=> Tue Feb 11 2014 11:30:30
55
+ *
56
+ * @example
57
+ * // Convert the timestamp to date:
58
+ * const result = toDate(1392098430000)
59
+ * //=> Tue Feb 11 2014 11:30:30
60
+ */
61
+ function toDate(argument) {
62
+ requiredArgs(1, arguments);
63
+ var argStr = Object.prototype.toString.call(argument);
64
+
65
+ // Clone the date
66
+ if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
67
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
68
+ return new Date(argument.getTime());
69
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
70
+ return new Date(argument);
71
+ } else {
72
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
73
+ // eslint-disable-next-line no-console
74
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
75
+ // eslint-disable-next-line no-console
76
+ console.warn(new Error().stack);
77
+ }
78
+ return new Date(NaN);
79
+ }
80
+ }
81
+
82
+ /**
83
+ * @name addDays
84
+ * @category Day Helpers
85
+ * @summary Add the specified number of days to the given date.
86
+ *
87
+ * @description
88
+ * Add the specified number of days to the given date.
89
+ *
90
+ * @param {Date|Number} date - the date to be changed
91
+ * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
92
+ * @returns {Date} - the new date with the days added
93
+ * @throws {TypeError} - 2 arguments required
94
+ *
95
+ * @example
96
+ * // Add 10 days to 1 September 2014:
97
+ * const result = addDays(new Date(2014, 8, 1), 10)
98
+ * //=> Thu Sep 11 2014 00:00:00
99
+ */
100
+ function addDays(dirtyDate, dirtyAmount) {
101
+ requiredArgs(2, arguments);
102
+ var date = toDate(dirtyDate);
103
+ var amount = toInteger(dirtyAmount);
104
+ if (isNaN(amount)) {
105
+ return new Date(NaN);
106
+ }
107
+ if (!amount) {
108
+ // If 0 days, no-op to avoid changing times in the hour before end of DST
109
+ return date;
110
+ }
111
+ date.setDate(date.getDate() + amount);
112
+ return date;
113
+ }
114
+
115
+ /**
116
+ * @name addMonths
117
+ * @category Month Helpers
118
+ * @summary Add the specified number of months to the given date.
119
+ *
120
+ * @description
121
+ * Add the specified number of months to the given date.
122
+ *
123
+ * @param {Date|Number} date - the date to be changed
124
+ * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
125
+ * @returns {Date} the new date with the months added
126
+ * @throws {TypeError} 2 arguments required
127
+ *
128
+ * @example
129
+ * // Add 5 months to 1 September 2014:
130
+ * const result = addMonths(new Date(2014, 8, 1), 5)
131
+ * //=> Sun Feb 01 2015 00:00:00
132
+ */
133
+ function addMonths(dirtyDate, dirtyAmount) {
134
+ requiredArgs(2, arguments);
135
+ var date = toDate(dirtyDate);
136
+ var amount = toInteger(dirtyAmount);
137
+ if (isNaN(amount)) {
138
+ return new Date(NaN);
139
+ }
140
+ if (!amount) {
141
+ // If 0 months, no-op to avoid changing times in the hour before end of DST
142
+ return date;
143
+ }
144
+ var dayOfMonth = date.getDate();
145
+
146
+ // The JS Date object supports date math by accepting out-of-bounds values for
147
+ // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
148
+ // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
149
+ // want except that dates will wrap around the end of a month, meaning that
150
+ // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
151
+ // we'll default to the end of the desired month by adding 1 to the desired
152
+ // month and using a date of 0 to back up one day to the end of the desired
153
+ // month.
154
+ var endOfDesiredMonth = new Date(date.getTime());
155
+ endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
156
+ var daysInMonth = endOfDesiredMonth.getDate();
157
+ if (dayOfMonth >= daysInMonth) {
158
+ // If we're already at the end of the month, then this is the correct date
159
+ // and we're done.
160
+ return endOfDesiredMonth;
161
+ } else {
162
+ // Otherwise, we now know that setting the original day-of-month value won't
163
+ // cause an overflow, so set the desired day-of-month. Note that we can't
164
+ // just set the date of `endOfDesiredMonth` because that object may have had
165
+ // its time changed in the unusual case where where a DST transition was on
166
+ // the last day of the month and its local time was in the hour skipped or
167
+ // repeated next to a DST transition. So we use `date` instead which is
168
+ // guaranteed to still have the original time.
169
+ date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
170
+ return date;
171
+ }
172
+ }
173
+
174
+ /**
175
+ * @name addMilliseconds
176
+ * @category Millisecond Helpers
177
+ * @summary Add the specified number of milliseconds to the given date.
178
+ *
179
+ * @description
180
+ * Add the specified number of milliseconds to the given date.
181
+ *
182
+ * @param {Date|Number} date - the date to be changed
183
+ * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
184
+ * @returns {Date} the new date with the milliseconds added
185
+ * @throws {TypeError} 2 arguments required
186
+ *
187
+ * @example
188
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
189
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
190
+ * //=> Thu Jul 10 2014 12:45:30.750
191
+ */
192
+ function addMilliseconds(dirtyDate, dirtyAmount) {
193
+ requiredArgs(2, arguments);
194
+ var timestamp = toDate(dirtyDate).getTime();
195
+ var amount = toInteger(dirtyAmount);
196
+ return new Date(timestamp + amount);
197
+ }
198
+
199
+ var defaultOptions = {};
200
+ function getDefaultOptions() {
201
+ return defaultOptions;
202
+ }
203
+
204
+ /**
205
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
206
+ * They usually appear for dates that denote time before the timezones were introduced
207
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
208
+ * and GMT+01:00:00 after that date)
209
+ *
210
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
211
+ * which would lead to incorrect calculations.
212
+ *
213
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
214
+ */
215
+ function getTimezoneOffsetInMilliseconds(date) {
216
+ var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
217
+ utcDate.setUTCFullYear(date.getFullYear());
218
+ return date.getTime() - utcDate.getTime();
219
+ }
220
+
221
+ /**
222
+ * @name startOfDay
223
+ * @category Day Helpers
224
+ * @summary Return the start of a day for the given date.
225
+ *
226
+ * @description
227
+ * Return the start of a day for the given date.
228
+ * The result will be in the local timezone.
229
+ *
230
+ * @param {Date|Number} date - the original date
231
+ * @returns {Date} the start of a day
232
+ * @throws {TypeError} 1 argument required
233
+ *
234
+ * @example
235
+ * // The start of a day for 2 September 2014 11:55:00:
236
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
237
+ * //=> Tue Sep 02 2014 00:00:00
238
+ */
239
+ function startOfDay(dirtyDate) {
240
+ requiredArgs(1, arguments);
241
+ var date = toDate(dirtyDate);
242
+ date.setHours(0, 0, 0, 0);
243
+ return date;
244
+ }
245
+
246
+ /**
247
+ * @name addYears
248
+ * @category Year Helpers
249
+ * @summary Add the specified number of years to the given date.
250
+ *
251
+ * @description
252
+ * Add the specified number of years to the given date.
253
+ *
254
+ * @param {Date|Number} date - the date to be changed
255
+ * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
256
+ * @returns {Date} the new date with the years added
257
+ * @throws {TypeError} 2 arguments required
258
+ *
259
+ * @example
260
+ * // Add 5 years to 1 September 2014:
261
+ * const result = addYears(new Date(2014, 8, 1), 5)
262
+ * //=> Sun Sep 01 2019 00:00:00
263
+ */
264
+ function addYears(dirtyDate, dirtyAmount) {
265
+ requiredArgs(2, arguments);
266
+ var amount = toInteger(dirtyAmount);
267
+ return addMonths(dirtyDate, amount * 12);
268
+ }
269
+
270
+ /**
271
+ * @name isSameDay
272
+ * @category Day Helpers
273
+ * @summary Are the given dates in the same day (and year and month)?
274
+ *
275
+ * @description
276
+ * Are the given dates in the same day (and year and month)?
277
+ *
278
+ * @param {Date|Number} dateLeft - the first date to check
279
+ * @param {Date|Number} dateRight - the second date to check
280
+ * @returns {Boolean} the dates are in the same day (and year and month)
281
+ * @throws {TypeError} 2 arguments required
282
+ *
283
+ * @example
284
+ * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
285
+ * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
286
+ * //=> true
287
+ *
288
+ * @example
289
+ * // Are 4 September and 4 October in the same day?
290
+ * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))
291
+ * //=> false
292
+ *
293
+ * @example
294
+ * // Are 4 September, 2014 and 4 September, 2015 in the same day?
295
+ * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))
296
+ * //=> false
297
+ */
298
+ function isSameDay(dirtyDateLeft, dirtyDateRight) {
299
+ requiredArgs(2, arguments);
300
+ var dateLeftStartOfDay = startOfDay(dirtyDateLeft);
301
+ var dateRightStartOfDay = startOfDay(dirtyDateRight);
302
+ return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
303
+ }
304
+
305
+ /**
306
+ * @name isDate
307
+ * @category Common Helpers
308
+ * @summary Is the given value a date?
309
+ *
310
+ * @description
311
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
312
+ *
313
+ * @param {*} value - the value to check
314
+ * @returns {boolean} true if the given value is a date
315
+ * @throws {TypeError} 1 arguments required
316
+ *
317
+ * @example
318
+ * // For a valid date:
319
+ * const result = isDate(new Date())
320
+ * //=> true
321
+ *
322
+ * @example
323
+ * // For an invalid date:
324
+ * const result = isDate(new Date(NaN))
325
+ * //=> true
326
+ *
327
+ * @example
328
+ * // For some value:
329
+ * const result = isDate('2014-02-31')
330
+ * //=> false
331
+ *
332
+ * @example
333
+ * // For an object:
334
+ * const result = isDate({})
335
+ * //=> false
336
+ */
337
+ function isDate(value) {
338
+ requiredArgs(1, arguments);
339
+ return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
340
+ }
341
+
342
+ /**
343
+ * @name isValid
344
+ * @category Common Helpers
345
+ * @summary Is the given date valid?
346
+ *
347
+ * @description
348
+ * Returns false if argument is Invalid Date and true otherwise.
349
+ * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
350
+ * Invalid Date is a Date, whose time value is NaN.
351
+ *
352
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
353
+ *
354
+ * @param {*} date - the date to check
355
+ * @returns {Boolean} the date is valid
356
+ * @throws {TypeError} 1 argument required
357
+ *
358
+ * @example
359
+ * // For the valid date:
360
+ * const result = isValid(new Date(2014, 1, 31))
361
+ * //=> true
362
+ *
363
+ * @example
364
+ * // For the value, convertable into a date:
365
+ * const result = isValid(1393804800000)
366
+ * //=> true
367
+ *
368
+ * @example
369
+ * // For the invalid date:
370
+ * const result = isValid(new Date(''))
371
+ * //=> false
372
+ */
373
+ function isValid(dirtyDate) {
374
+ requiredArgs(1, arguments);
375
+ if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
376
+ return false;
377
+ }
378
+ var date = toDate(dirtyDate);
379
+ return !isNaN(Number(date));
380
+ }
381
+
382
+ /**
383
+ * @name endOfMonth
384
+ * @category Month Helpers
385
+ * @summary Return the end of a month for the given date.
386
+ *
387
+ * @description
388
+ * Return the end of a month for the given date.
389
+ * The result will be in the local timezone.
390
+ *
391
+ * @param {Date|Number} date - the original date
392
+ * @returns {Date} the end of a month
393
+ * @throws {TypeError} 1 argument required
394
+ *
395
+ * @example
396
+ * // The end of a month for 2 September 2014 11:55:00:
397
+ * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
398
+ * //=> Tue Sep 30 2014 23:59:59.999
399
+ */
400
+ function endOfMonth(dirtyDate) {
401
+ requiredArgs(1, arguments);
402
+ var date = toDate(dirtyDate);
403
+ var month = date.getMonth();
404
+ date.setFullYear(date.getFullYear(), month + 1, 0);
405
+ date.setHours(23, 59, 59, 999);
406
+ return date;
407
+ }
408
+
409
+ /**
410
+ * @name startOfMonth
411
+ * @category Month Helpers
412
+ * @summary Return the start of a month for the given date.
413
+ *
414
+ * @description
415
+ * Return the start of a month for the given date.
416
+ * The result will be in the local timezone.
417
+ *
418
+ * @param {Date|Number} date - the original date
419
+ * @returns {Date} the start of a month
420
+ * @throws {TypeError} 1 argument required
421
+ *
422
+ * @example
423
+ * // The start of a month for 2 September 2014 11:55:00:
424
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
425
+ * //=> Mon Sep 01 2014 00:00:00
426
+ */
427
+ function startOfMonth(dirtyDate) {
428
+ requiredArgs(1, arguments);
429
+ var date = toDate(dirtyDate);
430
+ date.setDate(1);
431
+ date.setHours(0, 0, 0, 0);
432
+ return date;
433
+ }
434
+
435
+ /**
436
+ * @name subMilliseconds
437
+ * @category Millisecond Helpers
438
+ * @summary Subtract the specified number of milliseconds from the given date.
439
+ *
440
+ * @description
441
+ * Subtract the specified number of milliseconds from the given date.
442
+ *
443
+ * @param {Date|Number} date - the date to be changed
444
+ * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
445
+ * @returns {Date} the new date with the milliseconds subtracted
446
+ * @throws {TypeError} 2 arguments required
447
+ *
448
+ * @example
449
+ * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
450
+ * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
451
+ * //=> Thu Jul 10 2014 12:45:29.250
452
+ */
453
+ function subMilliseconds(dirtyDate, dirtyAmount) {
454
+ requiredArgs(2, arguments);
455
+ var amount = toInteger(dirtyAmount);
456
+ return addMilliseconds(dirtyDate, -amount);
457
+ }
458
+
459
+ var MILLISECONDS_IN_DAY = 86400000;
460
+ function getUTCDayOfYear(dirtyDate) {
461
+ requiredArgs(1, arguments);
462
+ var date = toDate(dirtyDate);
463
+ var timestamp = date.getTime();
464
+ date.setUTCMonth(0, 1);
465
+ date.setUTCHours(0, 0, 0, 0);
466
+ var startOfYearTimestamp = date.getTime();
467
+ var difference = timestamp - startOfYearTimestamp;
468
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
469
+ }
470
+
471
+ function startOfUTCISOWeek(dirtyDate) {
472
+ requiredArgs(1, arguments);
473
+ var weekStartsOn = 1;
474
+ var date = toDate(dirtyDate);
475
+ var day = date.getUTCDay();
476
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
477
+ date.setUTCDate(date.getUTCDate() - diff);
478
+ date.setUTCHours(0, 0, 0, 0);
479
+ return date;
480
+ }
481
+
482
+ function getUTCISOWeekYear(dirtyDate) {
483
+ requiredArgs(1, arguments);
484
+ var date = toDate(dirtyDate);
485
+ var year = date.getUTCFullYear();
486
+ var fourthOfJanuaryOfNextYear = new Date(0);
487
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
488
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
489
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
490
+ var fourthOfJanuaryOfThisYear = new Date(0);
491
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
492
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
493
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
494
+ if (date.getTime() >= startOfNextYear.getTime()) {
495
+ return year + 1;
496
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
497
+ return year;
498
+ } else {
499
+ return year - 1;
500
+ }
501
+ }
502
+
503
+ function startOfUTCISOWeekYear(dirtyDate) {
504
+ requiredArgs(1, arguments);
505
+ var year = getUTCISOWeekYear(dirtyDate);
506
+ var fourthOfJanuary = new Date(0);
507
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
508
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
509
+ var date = startOfUTCISOWeek(fourthOfJanuary);
510
+ return date;
511
+ }
512
+
513
+ var MILLISECONDS_IN_WEEK$1 = 604800000;
514
+ function getUTCISOWeek(dirtyDate) {
515
+ requiredArgs(1, arguments);
516
+ var date = toDate(dirtyDate);
517
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
518
+
519
+ // Round the number of days to the nearest integer
520
+ // because the number of milliseconds in a week is not constant
521
+ // (e.g. it's different in the week of the daylight saving time clock shift)
522
+ return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
523
+ }
524
+
525
+ function startOfUTCWeek(dirtyDate, options) {
526
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
527
+ requiredArgs(1, arguments);
528
+ var defaultOptions = getDefaultOptions();
529
+ var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
530
+
531
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
532
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
533
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
534
+ }
535
+ var date = toDate(dirtyDate);
536
+ var day = date.getUTCDay();
537
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
538
+ date.setUTCDate(date.getUTCDate() - diff);
539
+ date.setUTCHours(0, 0, 0, 0);
540
+ return date;
541
+ }
542
+
543
+ function getUTCWeekYear(dirtyDate, options) {
544
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
545
+ requiredArgs(1, arguments);
546
+ var date = toDate(dirtyDate);
547
+ var year = date.getUTCFullYear();
548
+ var defaultOptions = getDefaultOptions();
549
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
550
+
551
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
552
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
553
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
554
+ }
555
+ var firstWeekOfNextYear = new Date(0);
556
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
557
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
558
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
559
+ var firstWeekOfThisYear = new Date(0);
560
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
561
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
562
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
563
+ if (date.getTime() >= startOfNextYear.getTime()) {
564
+ return year + 1;
565
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
566
+ return year;
567
+ } else {
568
+ return year - 1;
569
+ }
570
+ }
571
+
572
+ function startOfUTCWeekYear(dirtyDate, options) {
573
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
574
+ requiredArgs(1, arguments);
575
+ var defaultOptions = getDefaultOptions();
576
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
577
+ var year = getUTCWeekYear(dirtyDate, options);
578
+ var firstWeek = new Date(0);
579
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
580
+ firstWeek.setUTCHours(0, 0, 0, 0);
581
+ var date = startOfUTCWeek(firstWeek, options);
582
+ return date;
583
+ }
584
+
585
+ var MILLISECONDS_IN_WEEK = 604800000;
586
+ function getUTCWeek(dirtyDate, options) {
587
+ requiredArgs(1, arguments);
588
+ var date = toDate(dirtyDate);
589
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
590
+
591
+ // Round the number of days to the nearest integer
592
+ // because the number of milliseconds in a week is not constant
593
+ // (e.g. it's different in the week of the daylight saving time clock shift)
594
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
595
+ }
596
+
597
+ function addLeadingZeros(number, targetLength) {
598
+ var sign = number < 0 ? '-' : '';
599
+ var output = Math.abs(number).toString();
600
+ while (output.length < targetLength) {
601
+ output = '0' + output;
602
+ }
603
+ return sign + output;
604
+ }
605
+
606
+ /*
607
+ * | | Unit | | Unit |
608
+ * |-----|--------------------------------|-----|--------------------------------|
609
+ * | a | AM, PM | A* | |
610
+ * | d | Day of month | D | |
611
+ * | h | Hour [1-12] | H | Hour [0-23] |
612
+ * | m | Minute | M | Month |
613
+ * | s | Second | S | Fraction of second |
614
+ * | y | Year (abs) | Y | |
615
+ *
616
+ * Letters marked by * are not implemented but reserved by Unicode standard.
617
+ */
618
+ var formatters$1 = {
619
+ // Year
620
+ y: function y(date, token) {
621
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
622
+ // | Year | y | yy | yyy | yyyy | yyyyy |
623
+ // |----------|-------|----|-------|-------|-------|
624
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
625
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
626
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
627
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
628
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
629
+
630
+ var signedYear = date.getUTCFullYear();
631
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
632
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
633
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
634
+ },
635
+ // Month
636
+ M: function M(date, token) {
637
+ var month = date.getUTCMonth();
638
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
639
+ },
640
+ // Day of the month
641
+ d: function d(date, token) {
642
+ return addLeadingZeros(date.getUTCDate(), token.length);
643
+ },
644
+ // AM or PM
645
+ a: function a(date, token) {
646
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
647
+ switch (token) {
648
+ case 'a':
649
+ case 'aa':
650
+ return dayPeriodEnumValue.toUpperCase();
651
+ case 'aaa':
652
+ return dayPeriodEnumValue;
653
+ case 'aaaaa':
654
+ return dayPeriodEnumValue[0];
655
+ case 'aaaa':
656
+ default:
657
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
658
+ }
659
+ },
660
+ // Hour [1-12]
661
+ h: function h(date, token) {
662
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
663
+ },
664
+ // Hour [0-23]
665
+ H: function H(date, token) {
666
+ return addLeadingZeros(date.getUTCHours(), token.length);
667
+ },
668
+ // Minute
669
+ m: function m(date, token) {
670
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
671
+ },
672
+ // Second
673
+ s: function s(date, token) {
674
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
675
+ },
676
+ // Fraction of second
677
+ S: function S(date, token) {
678
+ var numberOfDigits = token.length;
679
+ var milliseconds = date.getUTCMilliseconds();
680
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
681
+ return addLeadingZeros(fractionalSeconds, token.length);
682
+ }
683
+ };
684
+
685
+ var dayPeriodEnum = {
686
+ am: 'am',
687
+ pm: 'pm',
688
+ midnight: 'midnight',
689
+ noon: 'noon',
690
+ morning: 'morning',
691
+ afternoon: 'afternoon',
692
+ evening: 'evening',
693
+ night: 'night'
694
+ };
695
+ /*
696
+ * | | Unit | | Unit |
697
+ * |-----|--------------------------------|-----|--------------------------------|
698
+ * | a | AM, PM | A* | Milliseconds in day |
699
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
700
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
701
+ * | d | Day of month | D | Day of year |
702
+ * | e | Local day of week | E | Day of week |
703
+ * | f | | F* | Day of week in month |
704
+ * | g* | Modified Julian day | G | Era |
705
+ * | h | Hour [1-12] | H | Hour [0-23] |
706
+ * | i! | ISO day of week | I! | ISO week of year |
707
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
708
+ * | k | Hour [1-24] | K | Hour [0-11] |
709
+ * | l* | (deprecated) | L | Stand-alone month |
710
+ * | m | Minute | M | Month |
711
+ * | n | | N | |
712
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
713
+ * | p! | Long localized time | P! | Long localized date |
714
+ * | q | Stand-alone quarter | Q | Quarter |
715
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
716
+ * | s | Second | S | Fraction of second |
717
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
718
+ * | u | Extended year | U* | Cyclic year |
719
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
720
+ * | w | Local week of year | W* | Week of month |
721
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
722
+ * | y | Year (abs) | Y | Local week-numbering year |
723
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
724
+ *
725
+ * Letters marked by * are not implemented but reserved by Unicode standard.
726
+ *
727
+ * Letters marked by ! are non-standard, but implemented by date-fns:
728
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
729
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
730
+ * i.e. 7 for Sunday, 1 for Monday, etc.
731
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
732
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
733
+ * `R` is supposed to be used in conjunction with `I` and `i`
734
+ * for universal ISO week-numbering date, whereas
735
+ * `Y` is supposed to be used in conjunction with `w` and `e`
736
+ * for week-numbering date specific to the locale.
737
+ * - `P` is long localized date format
738
+ * - `p` is long localized time format
739
+ */
740
+
741
+ var formatters = {
742
+ // Era
743
+ G: function G(date, token, localize) {
744
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
745
+ switch (token) {
746
+ // AD, BC
747
+ case 'G':
748
+ case 'GG':
749
+ case 'GGG':
750
+ return localize.era(era, {
751
+ width: 'abbreviated'
752
+ });
753
+ // A, B
754
+ case 'GGGGG':
755
+ return localize.era(era, {
756
+ width: 'narrow'
757
+ });
758
+ // Anno Domini, Before Christ
759
+ case 'GGGG':
760
+ default:
761
+ return localize.era(era, {
762
+ width: 'wide'
763
+ });
764
+ }
765
+ },
766
+ // Year
767
+ y: function y(date, token, localize) {
768
+ // Ordinal number
769
+ if (token === 'yo') {
770
+ var signedYear = date.getUTCFullYear();
771
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
772
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
773
+ return localize.ordinalNumber(year, {
774
+ unit: 'year'
775
+ });
776
+ }
777
+ return formatters$1.y(date, token);
778
+ },
779
+ // Local week-numbering year
780
+ Y: function Y(date, token, localize, options) {
781
+ var signedWeekYear = getUTCWeekYear(date, options);
782
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
783
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
784
+
785
+ // Two digit year
786
+ if (token === 'YY') {
787
+ var twoDigitYear = weekYear % 100;
788
+ return addLeadingZeros(twoDigitYear, 2);
789
+ }
790
+
791
+ // Ordinal number
792
+ if (token === 'Yo') {
793
+ return localize.ordinalNumber(weekYear, {
794
+ unit: 'year'
795
+ });
796
+ }
797
+
798
+ // Padding
799
+ return addLeadingZeros(weekYear, token.length);
800
+ },
801
+ // ISO week-numbering year
802
+ R: function R(date, token) {
803
+ var isoWeekYear = getUTCISOWeekYear(date);
804
+
805
+ // Padding
806
+ return addLeadingZeros(isoWeekYear, token.length);
807
+ },
808
+ // Extended year. This is a single number designating the year of this calendar system.
809
+ // The main difference between `y` and `u` localizers are B.C. years:
810
+ // | Year | `y` | `u` |
811
+ // |------|-----|-----|
812
+ // | AC 1 | 1 | 1 |
813
+ // | BC 1 | 1 | 0 |
814
+ // | BC 2 | 2 | -1 |
815
+ // Also `yy` always returns the last two digits of a year,
816
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
817
+ u: function u(date, token) {
818
+ var year = date.getUTCFullYear();
819
+ return addLeadingZeros(year, token.length);
820
+ },
821
+ // Quarter
822
+ Q: function Q(date, token, localize) {
823
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
824
+ switch (token) {
825
+ // 1, 2, 3, 4
826
+ case 'Q':
827
+ return String(quarter);
828
+ // 01, 02, 03, 04
829
+ case 'QQ':
830
+ return addLeadingZeros(quarter, 2);
831
+ // 1st, 2nd, 3rd, 4th
832
+ case 'Qo':
833
+ return localize.ordinalNumber(quarter, {
834
+ unit: 'quarter'
835
+ });
836
+ // Q1, Q2, Q3, Q4
837
+ case 'QQQ':
838
+ return localize.quarter(quarter, {
839
+ width: 'abbreviated',
840
+ context: 'formatting'
841
+ });
842
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
843
+ case 'QQQQQ':
844
+ return localize.quarter(quarter, {
845
+ width: 'narrow',
846
+ context: 'formatting'
847
+ });
848
+ // 1st quarter, 2nd quarter, ...
849
+ case 'QQQQ':
850
+ default:
851
+ return localize.quarter(quarter, {
852
+ width: 'wide',
853
+ context: 'formatting'
854
+ });
855
+ }
856
+ },
857
+ // Stand-alone quarter
858
+ q: function q(date, token, localize) {
859
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
860
+ switch (token) {
861
+ // 1, 2, 3, 4
862
+ case 'q':
863
+ return String(quarter);
864
+ // 01, 02, 03, 04
865
+ case 'qq':
866
+ return addLeadingZeros(quarter, 2);
867
+ // 1st, 2nd, 3rd, 4th
868
+ case 'qo':
869
+ return localize.ordinalNumber(quarter, {
870
+ unit: 'quarter'
871
+ });
872
+ // Q1, Q2, Q3, Q4
873
+ case 'qqq':
874
+ return localize.quarter(quarter, {
875
+ width: 'abbreviated',
876
+ context: 'standalone'
877
+ });
878
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
879
+ case 'qqqqq':
880
+ return localize.quarter(quarter, {
881
+ width: 'narrow',
882
+ context: 'standalone'
883
+ });
884
+ // 1st quarter, 2nd quarter, ...
885
+ case 'qqqq':
886
+ default:
887
+ return localize.quarter(quarter, {
888
+ width: 'wide',
889
+ context: 'standalone'
890
+ });
891
+ }
892
+ },
893
+ // Month
894
+ M: function M(date, token, localize) {
895
+ var month = date.getUTCMonth();
896
+ switch (token) {
897
+ case 'M':
898
+ case 'MM':
899
+ return formatters$1.M(date, token);
900
+ // 1st, 2nd, ..., 12th
901
+ case 'Mo':
902
+ return localize.ordinalNumber(month + 1, {
903
+ unit: 'month'
904
+ });
905
+ // Jan, Feb, ..., Dec
906
+ case 'MMM':
907
+ return localize.month(month, {
908
+ width: 'abbreviated',
909
+ context: 'formatting'
910
+ });
911
+ // J, F, ..., D
912
+ case 'MMMMM':
913
+ return localize.month(month, {
914
+ width: 'narrow',
915
+ context: 'formatting'
916
+ });
917
+ // January, February, ..., December
918
+ case 'MMMM':
919
+ default:
920
+ return localize.month(month, {
921
+ width: 'wide',
922
+ context: 'formatting'
923
+ });
924
+ }
925
+ },
926
+ // Stand-alone month
927
+ L: function L(date, token, localize) {
928
+ var month = date.getUTCMonth();
929
+ switch (token) {
930
+ // 1, 2, ..., 12
931
+ case 'L':
932
+ return String(month + 1);
933
+ // 01, 02, ..., 12
934
+ case 'LL':
935
+ return addLeadingZeros(month + 1, 2);
936
+ // 1st, 2nd, ..., 12th
937
+ case 'Lo':
938
+ return localize.ordinalNumber(month + 1, {
939
+ unit: 'month'
940
+ });
941
+ // Jan, Feb, ..., Dec
942
+ case 'LLL':
943
+ return localize.month(month, {
944
+ width: 'abbreviated',
945
+ context: 'standalone'
946
+ });
947
+ // J, F, ..., D
948
+ case 'LLLLL':
949
+ return localize.month(month, {
950
+ width: 'narrow',
951
+ context: 'standalone'
952
+ });
953
+ // January, February, ..., December
954
+ case 'LLLL':
955
+ default:
956
+ return localize.month(month, {
957
+ width: 'wide',
958
+ context: 'standalone'
959
+ });
960
+ }
961
+ },
962
+ // Local week of year
963
+ w: function w(date, token, localize, options) {
964
+ var week = getUTCWeek(date, options);
965
+ if (token === 'wo') {
966
+ return localize.ordinalNumber(week, {
967
+ unit: 'week'
968
+ });
969
+ }
970
+ return addLeadingZeros(week, token.length);
971
+ },
972
+ // ISO week of year
973
+ I: function I(date, token, localize) {
974
+ var isoWeek = getUTCISOWeek(date);
975
+ if (token === 'Io') {
976
+ return localize.ordinalNumber(isoWeek, {
977
+ unit: 'week'
978
+ });
979
+ }
980
+ return addLeadingZeros(isoWeek, token.length);
981
+ },
982
+ // Day of the month
983
+ d: function d(date, token, localize) {
984
+ if (token === 'do') {
985
+ return localize.ordinalNumber(date.getUTCDate(), {
986
+ unit: 'date'
987
+ });
988
+ }
989
+ return formatters$1.d(date, token);
990
+ },
991
+ // Day of year
992
+ D: function D(date, token, localize) {
993
+ var dayOfYear = getUTCDayOfYear(date);
994
+ if (token === 'Do') {
995
+ return localize.ordinalNumber(dayOfYear, {
996
+ unit: 'dayOfYear'
997
+ });
998
+ }
999
+ return addLeadingZeros(dayOfYear, token.length);
1000
+ },
1001
+ // Day of week
1002
+ E: function E(date, token, localize) {
1003
+ var dayOfWeek = date.getUTCDay();
1004
+ switch (token) {
1005
+ // Tue
1006
+ case 'E':
1007
+ case 'EE':
1008
+ case 'EEE':
1009
+ return localize.day(dayOfWeek, {
1010
+ width: 'abbreviated',
1011
+ context: 'formatting'
1012
+ });
1013
+ // T
1014
+ case 'EEEEE':
1015
+ return localize.day(dayOfWeek, {
1016
+ width: 'narrow',
1017
+ context: 'formatting'
1018
+ });
1019
+ // Tu
1020
+ case 'EEEEEE':
1021
+ return localize.day(dayOfWeek, {
1022
+ width: 'short',
1023
+ context: 'formatting'
1024
+ });
1025
+ // Tuesday
1026
+ case 'EEEE':
1027
+ default:
1028
+ return localize.day(dayOfWeek, {
1029
+ width: 'wide',
1030
+ context: 'formatting'
1031
+ });
1032
+ }
1033
+ },
1034
+ // Local day of week
1035
+ e: function e(date, token, localize, options) {
1036
+ var dayOfWeek = date.getUTCDay();
1037
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1038
+ switch (token) {
1039
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
1040
+ case 'e':
1041
+ return String(localDayOfWeek);
1042
+ // Padded numerical value
1043
+ case 'ee':
1044
+ return addLeadingZeros(localDayOfWeek, 2);
1045
+ // 1st, 2nd, ..., 7th
1046
+ case 'eo':
1047
+ return localize.ordinalNumber(localDayOfWeek, {
1048
+ unit: 'day'
1049
+ });
1050
+ case 'eee':
1051
+ return localize.day(dayOfWeek, {
1052
+ width: 'abbreviated',
1053
+ context: 'formatting'
1054
+ });
1055
+ // T
1056
+ case 'eeeee':
1057
+ return localize.day(dayOfWeek, {
1058
+ width: 'narrow',
1059
+ context: 'formatting'
1060
+ });
1061
+ // Tu
1062
+ case 'eeeeee':
1063
+ return localize.day(dayOfWeek, {
1064
+ width: 'short',
1065
+ context: 'formatting'
1066
+ });
1067
+ // Tuesday
1068
+ case 'eeee':
1069
+ default:
1070
+ return localize.day(dayOfWeek, {
1071
+ width: 'wide',
1072
+ context: 'formatting'
1073
+ });
1074
+ }
1075
+ },
1076
+ // Stand-alone local day of week
1077
+ c: function c(date, token, localize, options) {
1078
+ var dayOfWeek = date.getUTCDay();
1079
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1080
+ switch (token) {
1081
+ // Numerical value (same as in `e`)
1082
+ case 'c':
1083
+ return String(localDayOfWeek);
1084
+ // Padded numerical value
1085
+ case 'cc':
1086
+ return addLeadingZeros(localDayOfWeek, token.length);
1087
+ // 1st, 2nd, ..., 7th
1088
+ case 'co':
1089
+ return localize.ordinalNumber(localDayOfWeek, {
1090
+ unit: 'day'
1091
+ });
1092
+ case 'ccc':
1093
+ return localize.day(dayOfWeek, {
1094
+ width: 'abbreviated',
1095
+ context: 'standalone'
1096
+ });
1097
+ // T
1098
+ case 'ccccc':
1099
+ return localize.day(dayOfWeek, {
1100
+ width: 'narrow',
1101
+ context: 'standalone'
1102
+ });
1103
+ // Tu
1104
+ case 'cccccc':
1105
+ return localize.day(dayOfWeek, {
1106
+ width: 'short',
1107
+ context: 'standalone'
1108
+ });
1109
+ // Tuesday
1110
+ case 'cccc':
1111
+ default:
1112
+ return localize.day(dayOfWeek, {
1113
+ width: 'wide',
1114
+ context: 'standalone'
1115
+ });
1116
+ }
1117
+ },
1118
+ // ISO day of week
1119
+ i: function i(date, token, localize) {
1120
+ var dayOfWeek = date.getUTCDay();
1121
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
1122
+ switch (token) {
1123
+ // 2
1124
+ case 'i':
1125
+ return String(isoDayOfWeek);
1126
+ // 02
1127
+ case 'ii':
1128
+ return addLeadingZeros(isoDayOfWeek, token.length);
1129
+ // 2nd
1130
+ case 'io':
1131
+ return localize.ordinalNumber(isoDayOfWeek, {
1132
+ unit: 'day'
1133
+ });
1134
+ // Tue
1135
+ case 'iii':
1136
+ return localize.day(dayOfWeek, {
1137
+ width: 'abbreviated',
1138
+ context: 'formatting'
1139
+ });
1140
+ // T
1141
+ case 'iiiii':
1142
+ return localize.day(dayOfWeek, {
1143
+ width: 'narrow',
1144
+ context: 'formatting'
1145
+ });
1146
+ // Tu
1147
+ case 'iiiiii':
1148
+ return localize.day(dayOfWeek, {
1149
+ width: 'short',
1150
+ context: 'formatting'
1151
+ });
1152
+ // Tuesday
1153
+ case 'iiii':
1154
+ default:
1155
+ return localize.day(dayOfWeek, {
1156
+ width: 'wide',
1157
+ context: 'formatting'
1158
+ });
1159
+ }
1160
+ },
1161
+ // AM or PM
1162
+ a: function a(date, token, localize) {
1163
+ var hours = date.getUTCHours();
1164
+ var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
1165
+ switch (token) {
1166
+ case 'a':
1167
+ case 'aa':
1168
+ return localize.dayPeriod(dayPeriodEnumValue, {
1169
+ width: 'abbreviated',
1170
+ context: 'formatting'
1171
+ });
1172
+ case 'aaa':
1173
+ return localize.dayPeriod(dayPeriodEnumValue, {
1174
+ width: 'abbreviated',
1175
+ context: 'formatting'
1176
+ }).toLowerCase();
1177
+ case 'aaaaa':
1178
+ return localize.dayPeriod(dayPeriodEnumValue, {
1179
+ width: 'narrow',
1180
+ context: 'formatting'
1181
+ });
1182
+ case 'aaaa':
1183
+ default:
1184
+ return localize.dayPeriod(dayPeriodEnumValue, {
1185
+ width: 'wide',
1186
+ context: 'formatting'
1187
+ });
1188
+ }
1189
+ },
1190
+ // AM, PM, midnight, noon
1191
+ b: function b(date, token, localize) {
1192
+ var hours = date.getUTCHours();
1193
+ var dayPeriodEnumValue;
1194
+ if (hours === 12) {
1195
+ dayPeriodEnumValue = dayPeriodEnum.noon;
1196
+ } else if (hours === 0) {
1197
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
1198
+ } else {
1199
+ dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
1200
+ }
1201
+ switch (token) {
1202
+ case 'b':
1203
+ case 'bb':
1204
+ return localize.dayPeriod(dayPeriodEnumValue, {
1205
+ width: 'abbreviated',
1206
+ context: 'formatting'
1207
+ });
1208
+ case 'bbb':
1209
+ return localize.dayPeriod(dayPeriodEnumValue, {
1210
+ width: 'abbreviated',
1211
+ context: 'formatting'
1212
+ }).toLowerCase();
1213
+ case 'bbbbb':
1214
+ return localize.dayPeriod(dayPeriodEnumValue, {
1215
+ width: 'narrow',
1216
+ context: 'formatting'
1217
+ });
1218
+ case 'bbbb':
1219
+ default:
1220
+ return localize.dayPeriod(dayPeriodEnumValue, {
1221
+ width: 'wide',
1222
+ context: 'formatting'
1223
+ });
1224
+ }
1225
+ },
1226
+ // in the morning, in the afternoon, in the evening, at night
1227
+ B: function B(date, token, localize) {
1228
+ var hours = date.getUTCHours();
1229
+ var dayPeriodEnumValue;
1230
+ if (hours >= 17) {
1231
+ dayPeriodEnumValue = dayPeriodEnum.evening;
1232
+ } else if (hours >= 12) {
1233
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
1234
+ } else if (hours >= 4) {
1235
+ dayPeriodEnumValue = dayPeriodEnum.morning;
1236
+ } else {
1237
+ dayPeriodEnumValue = dayPeriodEnum.night;
1238
+ }
1239
+ switch (token) {
1240
+ case 'B':
1241
+ case 'BB':
1242
+ case 'BBB':
1243
+ return localize.dayPeriod(dayPeriodEnumValue, {
1244
+ width: 'abbreviated',
1245
+ context: 'formatting'
1246
+ });
1247
+ case 'BBBBB':
1248
+ return localize.dayPeriod(dayPeriodEnumValue, {
1249
+ width: 'narrow',
1250
+ context: 'formatting'
1251
+ });
1252
+ case 'BBBB':
1253
+ default:
1254
+ return localize.dayPeriod(dayPeriodEnumValue, {
1255
+ width: 'wide',
1256
+ context: 'formatting'
1257
+ });
1258
+ }
1259
+ },
1260
+ // Hour [1-12]
1261
+ h: function h(date, token, localize) {
1262
+ if (token === 'ho') {
1263
+ var hours = date.getUTCHours() % 12;
1264
+ if (hours === 0) hours = 12;
1265
+ return localize.ordinalNumber(hours, {
1266
+ unit: 'hour'
1267
+ });
1268
+ }
1269
+ return formatters$1.h(date, token);
1270
+ },
1271
+ // Hour [0-23]
1272
+ H: function H(date, token, localize) {
1273
+ if (token === 'Ho') {
1274
+ return localize.ordinalNumber(date.getUTCHours(), {
1275
+ unit: 'hour'
1276
+ });
1277
+ }
1278
+ return formatters$1.H(date, token);
1279
+ },
1280
+ // Hour [0-11]
1281
+ K: function K(date, token, localize) {
1282
+ var hours = date.getUTCHours() % 12;
1283
+ if (token === 'Ko') {
1284
+ return localize.ordinalNumber(hours, {
1285
+ unit: 'hour'
1286
+ });
1287
+ }
1288
+ return addLeadingZeros(hours, token.length);
1289
+ },
1290
+ // Hour [1-24]
1291
+ k: function k(date, token, localize) {
1292
+ var hours = date.getUTCHours();
1293
+ if (hours === 0) hours = 24;
1294
+ if (token === 'ko') {
1295
+ return localize.ordinalNumber(hours, {
1296
+ unit: 'hour'
1297
+ });
1298
+ }
1299
+ return addLeadingZeros(hours, token.length);
1300
+ },
1301
+ // Minute
1302
+ m: function m(date, token, localize) {
1303
+ if (token === 'mo') {
1304
+ return localize.ordinalNumber(date.getUTCMinutes(), {
1305
+ unit: 'minute'
1306
+ });
1307
+ }
1308
+ return formatters$1.m(date, token);
1309
+ },
1310
+ // Second
1311
+ s: function s(date, token, localize) {
1312
+ if (token === 'so') {
1313
+ return localize.ordinalNumber(date.getUTCSeconds(), {
1314
+ unit: 'second'
1315
+ });
1316
+ }
1317
+ return formatters$1.s(date, token);
1318
+ },
1319
+ // Fraction of second
1320
+ S: function S(date, token) {
1321
+ return formatters$1.S(date, token);
1322
+ },
1323
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1324
+ X: function X(date, token, _localize, options) {
1325
+ var originalDate = options._originalDate || date;
1326
+ var timezoneOffset = originalDate.getTimezoneOffset();
1327
+ if (timezoneOffset === 0) {
1328
+ return 'Z';
1329
+ }
1330
+ switch (token) {
1331
+ // Hours and optional minutes
1332
+ case 'X':
1333
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1334
+
1335
+ // Hours, minutes and optional seconds without `:` delimiter
1336
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1337
+ // so this token always has the same output as `XX`
1338
+ case 'XXXX':
1339
+ case 'XX':
1340
+ // Hours and minutes without `:` delimiter
1341
+ return formatTimezone(timezoneOffset);
1342
+
1343
+ // Hours, minutes and optional seconds with `:` delimiter
1344
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1345
+ // so this token always has the same output as `XXX`
1346
+ case 'XXXXX':
1347
+ case 'XXX': // Hours and minutes with `:` delimiter
1348
+ default:
1349
+ return formatTimezone(timezoneOffset, ':');
1350
+ }
1351
+ },
1352
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1353
+ x: function x(date, token, _localize, options) {
1354
+ var originalDate = options._originalDate || date;
1355
+ var timezoneOffset = originalDate.getTimezoneOffset();
1356
+ switch (token) {
1357
+ // Hours and optional minutes
1358
+ case 'x':
1359
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1360
+
1361
+ // Hours, minutes and optional seconds without `:` delimiter
1362
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1363
+ // so this token always has the same output as `xx`
1364
+ case 'xxxx':
1365
+ case 'xx':
1366
+ // Hours and minutes without `:` delimiter
1367
+ return formatTimezone(timezoneOffset);
1368
+
1369
+ // Hours, minutes and optional seconds with `:` delimiter
1370
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1371
+ // so this token always has the same output as `xxx`
1372
+ case 'xxxxx':
1373
+ case 'xxx': // Hours and minutes with `:` delimiter
1374
+ default:
1375
+ return formatTimezone(timezoneOffset, ':');
1376
+ }
1377
+ },
1378
+ // Timezone (GMT)
1379
+ O: function O(date, token, _localize, options) {
1380
+ var originalDate = options._originalDate || date;
1381
+ var timezoneOffset = originalDate.getTimezoneOffset();
1382
+ switch (token) {
1383
+ // Short
1384
+ case 'O':
1385
+ case 'OO':
1386
+ case 'OOO':
1387
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1388
+ // Long
1389
+ case 'OOOO':
1390
+ default:
1391
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1392
+ }
1393
+ },
1394
+ // Timezone (specific non-location)
1395
+ z: function z(date, token, _localize, options) {
1396
+ var originalDate = options._originalDate || date;
1397
+ var timezoneOffset = originalDate.getTimezoneOffset();
1398
+ switch (token) {
1399
+ // Short
1400
+ case 'z':
1401
+ case 'zz':
1402
+ case 'zzz':
1403
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1404
+ // Long
1405
+ case 'zzzz':
1406
+ default:
1407
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1408
+ }
1409
+ },
1410
+ // Seconds timestamp
1411
+ t: function t(date, token, _localize, options) {
1412
+ var originalDate = options._originalDate || date;
1413
+ var timestamp = Math.floor(originalDate.getTime() / 1000);
1414
+ return addLeadingZeros(timestamp, token.length);
1415
+ },
1416
+ // Milliseconds timestamp
1417
+ T: function T(date, token, _localize, options) {
1418
+ var originalDate = options._originalDate || date;
1419
+ var timestamp = originalDate.getTime();
1420
+ return addLeadingZeros(timestamp, token.length);
1421
+ }
1422
+ };
1423
+ function formatTimezoneShort(offset, dirtyDelimiter) {
1424
+ var sign = offset > 0 ? '-' : '+';
1425
+ var absOffset = Math.abs(offset);
1426
+ var hours = Math.floor(absOffset / 60);
1427
+ var minutes = absOffset % 60;
1428
+ if (minutes === 0) {
1429
+ return sign + String(hours);
1430
+ }
1431
+ var delimiter = dirtyDelimiter || '';
1432
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1433
+ }
1434
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
1435
+ if (offset % 60 === 0) {
1436
+ var sign = offset > 0 ? '-' : '+';
1437
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
1438
+ }
1439
+ return formatTimezone(offset, dirtyDelimiter);
1440
+ }
1441
+ function formatTimezone(offset, dirtyDelimiter) {
1442
+ var delimiter = dirtyDelimiter || '';
1443
+ var sign = offset > 0 ? '-' : '+';
1444
+ var absOffset = Math.abs(offset);
1445
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
1446
+ var minutes = addLeadingZeros(absOffset % 60, 2);
1447
+ return sign + hours + delimiter + minutes;
1448
+ }
1449
+
1450
+ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
1451
+ switch (pattern) {
1452
+ case 'P':
1453
+ return formatLong.date({
1454
+ width: 'short'
1455
+ });
1456
+ case 'PP':
1457
+ return formatLong.date({
1458
+ width: 'medium'
1459
+ });
1460
+ case 'PPP':
1461
+ return formatLong.date({
1462
+ width: 'long'
1463
+ });
1464
+ case 'PPPP':
1465
+ default:
1466
+ return formatLong.date({
1467
+ width: 'full'
1468
+ });
1469
+ }
1470
+ };
1471
+ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
1472
+ switch (pattern) {
1473
+ case 'p':
1474
+ return formatLong.time({
1475
+ width: 'short'
1476
+ });
1477
+ case 'pp':
1478
+ return formatLong.time({
1479
+ width: 'medium'
1480
+ });
1481
+ case 'ppp':
1482
+ return formatLong.time({
1483
+ width: 'long'
1484
+ });
1485
+ case 'pppp':
1486
+ default:
1487
+ return formatLong.time({
1488
+ width: 'full'
1489
+ });
1490
+ }
1491
+ };
1492
+ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
1493
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
1494
+ var datePattern = matchResult[1];
1495
+ var timePattern = matchResult[2];
1496
+ if (!timePattern) {
1497
+ return dateLongFormatter(pattern, formatLong);
1498
+ }
1499
+ var dateTimeFormat;
1500
+ switch (datePattern) {
1501
+ case 'P':
1502
+ dateTimeFormat = formatLong.dateTime({
1503
+ width: 'short'
1504
+ });
1505
+ break;
1506
+ case 'PP':
1507
+ dateTimeFormat = formatLong.dateTime({
1508
+ width: 'medium'
1509
+ });
1510
+ break;
1511
+ case 'PPP':
1512
+ dateTimeFormat = formatLong.dateTime({
1513
+ width: 'long'
1514
+ });
1515
+ break;
1516
+ case 'PPPP':
1517
+ default:
1518
+ dateTimeFormat = formatLong.dateTime({
1519
+ width: 'full'
1520
+ });
1521
+ break;
1522
+ }
1523
+ return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
1524
+ };
1525
+ var longFormatters = {
1526
+ p: timeLongFormatter,
1527
+ P: dateTimeLongFormatter
1528
+ };
1529
+
1530
+ var protectedDayOfYearTokens = ['D', 'DD'];
1531
+ var protectedWeekYearTokens = ['YY', 'YYYY'];
1532
+ function isProtectedDayOfYearToken(token) {
1533
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
1534
+ }
1535
+ function isProtectedWeekYearToken(token) {
1536
+ return protectedWeekYearTokens.indexOf(token) !== -1;
1537
+ }
1538
+ function throwProtectedError(token, format, input) {
1539
+ if (token === 'YYYY') {
1540
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1541
+ } else if (token === 'YY') {
1542
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1543
+ } else if (token === 'D') {
1544
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1545
+ } else if (token === 'DD') {
1546
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1547
+ }
1548
+ }
1549
+
1550
+ var formatDistanceLocale = {
1551
+ lessThanXSeconds: {
1552
+ one: 'less than a second',
1553
+ other: 'less than {{count}} seconds'
1554
+ },
1555
+ xSeconds: {
1556
+ one: '1 second',
1557
+ other: '{{count}} seconds'
1558
+ },
1559
+ halfAMinute: 'half a minute',
1560
+ lessThanXMinutes: {
1561
+ one: 'less than a minute',
1562
+ other: 'less than {{count}} minutes'
1563
+ },
1564
+ xMinutes: {
1565
+ one: '1 minute',
1566
+ other: '{{count}} minutes'
1567
+ },
1568
+ aboutXHours: {
1569
+ one: 'about 1 hour',
1570
+ other: 'about {{count}} hours'
1571
+ },
1572
+ xHours: {
1573
+ one: '1 hour',
1574
+ other: '{{count}} hours'
1575
+ },
1576
+ xDays: {
1577
+ one: '1 day',
1578
+ other: '{{count}} days'
1579
+ },
1580
+ aboutXWeeks: {
1581
+ one: 'about 1 week',
1582
+ other: 'about {{count}} weeks'
1583
+ },
1584
+ xWeeks: {
1585
+ one: '1 week',
1586
+ other: '{{count}} weeks'
1587
+ },
1588
+ aboutXMonths: {
1589
+ one: 'about 1 month',
1590
+ other: 'about {{count}} months'
1591
+ },
1592
+ xMonths: {
1593
+ one: '1 month',
1594
+ other: '{{count}} months'
1595
+ },
1596
+ aboutXYears: {
1597
+ one: 'about 1 year',
1598
+ other: 'about {{count}} years'
1599
+ },
1600
+ xYears: {
1601
+ one: '1 year',
1602
+ other: '{{count}} years'
1603
+ },
1604
+ overXYears: {
1605
+ one: 'over 1 year',
1606
+ other: 'over {{count}} years'
1607
+ },
1608
+ almostXYears: {
1609
+ one: 'almost 1 year',
1610
+ other: 'almost {{count}} years'
1611
+ }
1612
+ };
1613
+ var formatDistance = function formatDistance(token, count, options) {
1614
+ var result;
1615
+ var tokenValue = formatDistanceLocale[token];
1616
+ if (typeof tokenValue === 'string') {
1617
+ result = tokenValue;
1618
+ } else if (count === 1) {
1619
+ result = tokenValue.one;
1620
+ } else {
1621
+ result = tokenValue.other.replace('{{count}}', count.toString());
1622
+ }
1623
+ if (options !== null && options !== void 0 && options.addSuffix) {
1624
+ if (options.comparison && options.comparison > 0) {
1625
+ return 'in ' + result;
1626
+ } else {
1627
+ return result + ' ago';
1628
+ }
1629
+ }
1630
+ return result;
1631
+ };
1632
+
1633
+ function buildFormatLongFn(args) {
1634
+ return function () {
1635
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1636
+ // TODO: Remove String()
1637
+ var width = options.width ? String(options.width) : args.defaultWidth;
1638
+ var format = args.formats[width] || args.formats[args.defaultWidth];
1639
+ return format;
1640
+ };
1641
+ }
1642
+
1643
+ var dateFormats = {
1644
+ full: 'EEEE, MMMM do, y',
1645
+ long: 'MMMM do, y',
1646
+ medium: 'MMM d, y',
1647
+ short: 'MM/dd/yyyy'
1648
+ };
1649
+ var timeFormats = {
1650
+ full: 'h:mm:ss a zzzz',
1651
+ long: 'h:mm:ss a z',
1652
+ medium: 'h:mm:ss a',
1653
+ short: 'h:mm a'
1654
+ };
1655
+ var dateTimeFormats = {
1656
+ full: "{{date}} 'at' {{time}}",
1657
+ long: "{{date}} 'at' {{time}}",
1658
+ medium: '{{date}}, {{time}}',
1659
+ short: '{{date}}, {{time}}'
1660
+ };
1661
+ var formatLong = {
1662
+ date: buildFormatLongFn({
1663
+ formats: dateFormats,
1664
+ defaultWidth: 'full'
1665
+ }),
1666
+ time: buildFormatLongFn({
1667
+ formats: timeFormats,
1668
+ defaultWidth: 'full'
1669
+ }),
1670
+ dateTime: buildFormatLongFn({
1671
+ formats: dateTimeFormats,
1672
+ defaultWidth: 'full'
1673
+ })
1674
+ };
1675
+
1676
+ var formatRelativeLocale = {
1677
+ lastWeek: "'last' eeee 'at' p",
1678
+ yesterday: "'yesterday at' p",
1679
+ today: "'today at' p",
1680
+ tomorrow: "'tomorrow at' p",
1681
+ nextWeek: "eeee 'at' p",
1682
+ other: 'P'
1683
+ };
1684
+ var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
1685
+ return formatRelativeLocale[token];
1686
+ };
1687
+
1688
+ function buildLocalizeFn(args) {
1689
+ return function (dirtyIndex, options) {
1690
+ var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
1691
+ var valuesArray;
1692
+ if (context === 'formatting' && args.formattingValues) {
1693
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1694
+ var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
1695
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1696
+ } else {
1697
+ var _defaultWidth = args.defaultWidth;
1698
+ var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
1699
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
1700
+ }
1701
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
1702
+ // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
1703
+ return valuesArray[index];
1704
+ };
1705
+ }
1706
+
1707
+ var eraValues = {
1708
+ narrow: ['B', 'A'],
1709
+ abbreviated: ['BC', 'AD'],
1710
+ wide: ['Before Christ', 'Anno Domini']
1711
+ };
1712
+ var quarterValues = {
1713
+ narrow: ['1', '2', '3', '4'],
1714
+ abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
1715
+ wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
1716
+ };
1717
+
1718
+ // Note: in English, the names of days of the week and months are capitalized.
1719
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1720
+ // Generally, formatted dates should look like they are in the middle of a sentence,
1721
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
1722
+ var monthValues = {
1723
+ narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
1724
+ abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
1725
+ wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
1726
+ };
1727
+ var dayValues = {
1728
+ narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
1729
+ short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
1730
+ abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
1731
+ wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
1732
+ };
1733
+ var dayPeriodValues = {
1734
+ narrow: {
1735
+ am: 'a',
1736
+ pm: 'p',
1737
+ midnight: 'mi',
1738
+ noon: 'n',
1739
+ morning: 'morning',
1740
+ afternoon: 'afternoon',
1741
+ evening: 'evening',
1742
+ night: 'night'
1743
+ },
1744
+ abbreviated: {
1745
+ am: 'AM',
1746
+ pm: 'PM',
1747
+ midnight: 'midnight',
1748
+ noon: 'noon',
1749
+ morning: 'morning',
1750
+ afternoon: 'afternoon',
1751
+ evening: 'evening',
1752
+ night: 'night'
1753
+ },
1754
+ wide: {
1755
+ am: 'a.m.',
1756
+ pm: 'p.m.',
1757
+ midnight: 'midnight',
1758
+ noon: 'noon',
1759
+ morning: 'morning',
1760
+ afternoon: 'afternoon',
1761
+ evening: 'evening',
1762
+ night: 'night'
1763
+ }
1764
+ };
1765
+ var formattingDayPeriodValues = {
1766
+ narrow: {
1767
+ am: 'a',
1768
+ pm: 'p',
1769
+ midnight: 'mi',
1770
+ noon: 'n',
1771
+ morning: 'in the morning',
1772
+ afternoon: 'in the afternoon',
1773
+ evening: 'in the evening',
1774
+ night: 'at night'
1775
+ },
1776
+ abbreviated: {
1777
+ am: 'AM',
1778
+ pm: 'PM',
1779
+ midnight: 'midnight',
1780
+ noon: 'noon',
1781
+ morning: 'in the morning',
1782
+ afternoon: 'in the afternoon',
1783
+ evening: 'in the evening',
1784
+ night: 'at night'
1785
+ },
1786
+ wide: {
1787
+ am: 'a.m.',
1788
+ pm: 'p.m.',
1789
+ midnight: 'midnight',
1790
+ noon: 'noon',
1791
+ morning: 'in the morning',
1792
+ afternoon: 'in the afternoon',
1793
+ evening: 'in the evening',
1794
+ night: 'at night'
1795
+ }
1796
+ };
1797
+ var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
1798
+ var number = Number(dirtyNumber);
1799
+
1800
+ // If ordinal numbers depend on context, for example,
1801
+ // if they are different for different grammatical genders,
1802
+ // use `options.unit`.
1803
+ //
1804
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
1805
+ // 'day', 'hour', 'minute', 'second'.
1806
+
1807
+ var rem100 = number % 100;
1808
+ if (rem100 > 20 || rem100 < 10) {
1809
+ switch (rem100 % 10) {
1810
+ case 1:
1811
+ return number + 'st';
1812
+ case 2:
1813
+ return number + 'nd';
1814
+ case 3:
1815
+ return number + 'rd';
1816
+ }
1817
+ }
1818
+ return number + 'th';
1819
+ };
1820
+ var localize = {
1821
+ ordinalNumber: ordinalNumber,
1822
+ era: buildLocalizeFn({
1823
+ values: eraValues,
1824
+ defaultWidth: 'wide'
1825
+ }),
1826
+ quarter: buildLocalizeFn({
1827
+ values: quarterValues,
1828
+ defaultWidth: 'wide',
1829
+ argumentCallback: function argumentCallback(quarter) {
1830
+ return quarter - 1;
1831
+ }
1832
+ }),
1833
+ month: buildLocalizeFn({
1834
+ values: monthValues,
1835
+ defaultWidth: 'wide'
1836
+ }),
1837
+ day: buildLocalizeFn({
1838
+ values: dayValues,
1839
+ defaultWidth: 'wide'
1840
+ }),
1841
+ dayPeriod: buildLocalizeFn({
1842
+ values: dayPeriodValues,
1843
+ defaultWidth: 'wide',
1844
+ formattingValues: formattingDayPeriodValues,
1845
+ defaultFormattingWidth: 'wide'
1846
+ })
1847
+ };
1848
+
1849
+ function buildMatchFn(args) {
1850
+ return function (string) {
1851
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1852
+ var width = options.width;
1853
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1854
+ var matchResult = string.match(matchPattern);
1855
+ if (!matchResult) {
1856
+ return null;
1857
+ }
1858
+ var matchedString = matchResult[0];
1859
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1860
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
1861
+ return pattern.test(matchedString);
1862
+ }) : findKey(parsePatterns, function (pattern) {
1863
+ return pattern.test(matchedString);
1864
+ });
1865
+ var value;
1866
+ value = args.valueCallback ? args.valueCallback(key) : key;
1867
+ value = options.valueCallback ? options.valueCallback(value) : value;
1868
+ var rest = string.slice(matchedString.length);
1869
+ return {
1870
+ value: value,
1871
+ rest: rest
1872
+ };
1873
+ };
1874
+ }
1875
+ function findKey(object, predicate) {
1876
+ for (var key in object) {
1877
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
1878
+ return key;
1879
+ }
1880
+ }
1881
+ return undefined;
1882
+ }
1883
+ function findIndex(array, predicate) {
1884
+ for (var key = 0; key < array.length; key++) {
1885
+ if (predicate(array[key])) {
1886
+ return key;
1887
+ }
1888
+ }
1889
+ return undefined;
1890
+ }
1891
+
1892
+ function buildMatchPatternFn(args) {
1893
+ return function (string) {
1894
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1895
+ var matchResult = string.match(args.matchPattern);
1896
+ if (!matchResult) return null;
1897
+ var matchedString = matchResult[0];
1898
+ var parseResult = string.match(args.parsePattern);
1899
+ if (!parseResult) return null;
1900
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
1901
+ value = options.valueCallback ? options.valueCallback(value) : value;
1902
+ var rest = string.slice(matchedString.length);
1903
+ return {
1904
+ value: value,
1905
+ rest: rest
1906
+ };
1907
+ };
1908
+ }
1909
+
1910
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
1911
+ var parseOrdinalNumberPattern = /\d+/i;
1912
+ var matchEraPatterns = {
1913
+ narrow: /^(b|a)/i,
1914
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1915
+ wide: /^(before christ|before common era|anno domini|common era)/i
1916
+ };
1917
+ var parseEraPatterns = {
1918
+ any: [/^b/i, /^(a|c)/i]
1919
+ };
1920
+ var matchQuarterPatterns = {
1921
+ narrow: /^[1234]/i,
1922
+ abbreviated: /^q[1234]/i,
1923
+ wide: /^[1234](th|st|nd|rd)? quarter/i
1924
+ };
1925
+ var parseQuarterPatterns = {
1926
+ any: [/1/i, /2/i, /3/i, /4/i]
1927
+ };
1928
+ var matchMonthPatterns = {
1929
+ narrow: /^[jfmasond]/i,
1930
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1931
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1932
+ };
1933
+ var parseMonthPatterns = {
1934
+ narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
1935
+ any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
1936
+ };
1937
+ var matchDayPatterns = {
1938
+ narrow: /^[smtwf]/i,
1939
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1940
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1941
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1942
+ };
1943
+ var parseDayPatterns = {
1944
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1945
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1946
+ };
1947
+ var matchDayPeriodPatterns = {
1948
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1949
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1950
+ };
1951
+ var parseDayPeriodPatterns = {
1952
+ any: {
1953
+ am: /^a/i,
1954
+ pm: /^p/i,
1955
+ midnight: /^mi/i,
1956
+ noon: /^no/i,
1957
+ morning: /morning/i,
1958
+ afternoon: /afternoon/i,
1959
+ evening: /evening/i,
1960
+ night: /night/i
1961
+ }
1962
+ };
1963
+ var match = {
1964
+ ordinalNumber: buildMatchPatternFn({
1965
+ matchPattern: matchOrdinalNumberPattern,
1966
+ parsePattern: parseOrdinalNumberPattern,
1967
+ valueCallback: function valueCallback(value) {
1968
+ return parseInt(value, 10);
1969
+ }
1970
+ }),
1971
+ era: buildMatchFn({
1972
+ matchPatterns: matchEraPatterns,
1973
+ defaultMatchWidth: 'wide',
1974
+ parsePatterns: parseEraPatterns,
1975
+ defaultParseWidth: 'any'
1976
+ }),
1977
+ quarter: buildMatchFn({
1978
+ matchPatterns: matchQuarterPatterns,
1979
+ defaultMatchWidth: 'wide',
1980
+ parsePatterns: parseQuarterPatterns,
1981
+ defaultParseWidth: 'any',
1982
+ valueCallback: function valueCallback(index) {
1983
+ return index + 1;
1984
+ }
1985
+ }),
1986
+ month: buildMatchFn({
1987
+ matchPatterns: matchMonthPatterns,
1988
+ defaultMatchWidth: 'wide',
1989
+ parsePatterns: parseMonthPatterns,
1990
+ defaultParseWidth: 'any'
1991
+ }),
1992
+ day: buildMatchFn({
1993
+ matchPatterns: matchDayPatterns,
1994
+ defaultMatchWidth: 'wide',
1995
+ parsePatterns: parseDayPatterns,
1996
+ defaultParseWidth: 'any'
1997
+ }),
1998
+ dayPeriod: buildMatchFn({
1999
+ matchPatterns: matchDayPeriodPatterns,
2000
+ defaultMatchWidth: 'any',
2001
+ parsePatterns: parseDayPeriodPatterns,
2002
+ defaultParseWidth: 'any'
2003
+ })
2004
+ };
2005
+
2006
+ /**
2007
+ * @type {Locale}
2008
+ * @category Locales
2009
+ * @summary English locale (United States).
2010
+ * @language English
2011
+ * @iso-639-2 eng
2012
+ * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
2013
+ * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
2014
+ */
2015
+ var locale = {
2016
+ code: 'en-US',
2017
+ formatDistance: formatDistance,
2018
+ formatLong: formatLong,
2019
+ formatRelative: formatRelative,
2020
+ localize: localize,
2021
+ match: match,
2022
+ options: {
2023
+ weekStartsOn: 0 /* Sunday */,
2024
+ firstWeekContainsDate: 1
2025
+ }
2026
+ };
2027
+
2028
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
2029
+ // (one of the certain letters followed by `o`)
2030
+ // - (\w)\1* matches any sequences of the same letter
2031
+ // - '' matches two quote characters in a row
2032
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
2033
+ // except a single quote symbol, which ends the sequence.
2034
+ // Two quote characters do not end the sequence.
2035
+ // If there is no matching single quote
2036
+ // then the sequence will continue until the end of the string.
2037
+ // - . matches any single character unmatched by previous parts of the RegExps
2038
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
2039
+
2040
+ // This RegExp catches symbols escaped by quotes, and also
2041
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
2042
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
2043
+ var escapedStringRegExp = /^'([^]*?)'?$/;
2044
+ var doubleQuoteRegExp = /''/g;
2045
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
2046
+
2047
+ /**
2048
+ * @name format
2049
+ * @category Common Helpers
2050
+ * @summary Format the date.
2051
+ *
2052
+ * @description
2053
+ * Return the formatted date string in the given format. The result may vary by locale.
2054
+ *
2055
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
2056
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2057
+ *
2058
+ * The characters wrapped between two single quotes characters (') are escaped.
2059
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
2060
+ * (see the last example)
2061
+ *
2062
+ * Format of the string is based on Unicode Technical Standard #35:
2063
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
2064
+ * with a few additions (see note 7 below the table).
2065
+ *
2066
+ * Accepted patterns:
2067
+ * | Unit | Pattern | Result examples | Notes |
2068
+ * |---------------------------------|---------|-----------------------------------|-------|
2069
+ * | Era | G..GGG | AD, BC | |
2070
+ * | | GGGG | Anno Domini, Before Christ | 2 |
2071
+ * | | GGGGG | A, B | |
2072
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
2073
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
2074
+ * | | yy | 44, 01, 00, 17 | 5 |
2075
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
2076
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
2077
+ * | | yyyyy | ... | 3,5 |
2078
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
2079
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
2080
+ * | | YY | 44, 01, 00, 17 | 5,8 |
2081
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
2082
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
2083
+ * | | YYYYY | ... | 3,5 |
2084
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
2085
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
2086
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
2087
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
2088
+ * | | RRRRR | ... | 3,5,7 |
2089
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
2090
+ * | | uu | -43, 01, 1900, 2017 | 5 |
2091
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
2092
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
2093
+ * | | uuuuu | ... | 3,5 |
2094
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
2095
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
2096
+ * | | QQ | 01, 02, 03, 04 | |
2097
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
2098
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
2099
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
2100
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
2101
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
2102
+ * | | qq | 01, 02, 03, 04 | |
2103
+ * | | qqq | Q1, Q2, Q3, Q4 | |
2104
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
2105
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
2106
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
2107
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
2108
+ * | | MM | 01, 02, ..., 12 | |
2109
+ * | | MMM | Jan, Feb, ..., Dec | |
2110
+ * | | MMMM | January, February, ..., December | 2 |
2111
+ * | | MMMMM | J, F, ..., D | |
2112
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
2113
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
2114
+ * | | LL | 01, 02, ..., 12 | |
2115
+ * | | LLL | Jan, Feb, ..., Dec | |
2116
+ * | | LLLL | January, February, ..., December | 2 |
2117
+ * | | LLLLL | J, F, ..., D | |
2118
+ * | Local week of year | w | 1, 2, ..., 53 | |
2119
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
2120
+ * | | ww | 01, 02, ..., 53 | |
2121
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
2122
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
2123
+ * | | II | 01, 02, ..., 53 | 7 |
2124
+ * | Day of month | d | 1, 2, ..., 31 | |
2125
+ * | | do | 1st, 2nd, ..., 31st | 7 |
2126
+ * | | dd | 01, 02, ..., 31 | |
2127
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
2128
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
2129
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
2130
+ * | | DDD | 001, 002, ..., 365, 366 | |
2131
+ * | | DDDD | ... | 3 |
2132
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
2133
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
2134
+ * | | EEEEE | M, T, W, T, F, S, S | |
2135
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
2136
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
2137
+ * | | io | 1st, 2nd, ..., 7th | 7 |
2138
+ * | | ii | 01, 02, ..., 07 | 7 |
2139
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
2140
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
2141
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
2142
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
2143
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
2144
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
2145
+ * | | ee | 02, 03, ..., 01 | |
2146
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
2147
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
2148
+ * | | eeeee | M, T, W, T, F, S, S | |
2149
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
2150
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
2151
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
2152
+ * | | cc | 02, 03, ..., 01 | |
2153
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
2154
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
2155
+ * | | ccccc | M, T, W, T, F, S, S | |
2156
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
2157
+ * | AM, PM | a..aa | AM, PM | |
2158
+ * | | aaa | am, pm | |
2159
+ * | | aaaa | a.m., p.m. | 2 |
2160
+ * | | aaaaa | a, p | |
2161
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
2162
+ * | | bbb | am, pm, noon, midnight | |
2163
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
2164
+ * | | bbbbb | a, p, n, mi | |
2165
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
2166
+ * | | BBBB | at night, in the morning, ... | 2 |
2167
+ * | | BBBBB | at night, in the morning, ... | |
2168
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
2169
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
2170
+ * | | hh | 01, 02, ..., 11, 12 | |
2171
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
2172
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
2173
+ * | | HH | 00, 01, 02, ..., 23 | |
2174
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
2175
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
2176
+ * | | KK | 01, 02, ..., 11, 00 | |
2177
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
2178
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
2179
+ * | | kk | 24, 01, 02, ..., 23 | |
2180
+ * | Minute | m | 0, 1, ..., 59 | |
2181
+ * | | mo | 0th, 1st, ..., 59th | 7 |
2182
+ * | | mm | 00, 01, ..., 59 | |
2183
+ * | Second | s | 0, 1, ..., 59 | |
2184
+ * | | so | 0th, 1st, ..., 59th | 7 |
2185
+ * | | ss | 00, 01, ..., 59 | |
2186
+ * | Fraction of second | S | 0, 1, ..., 9 | |
2187
+ * | | SS | 00, 01, ..., 99 | |
2188
+ * | | SSS | 000, 001, ..., 999 | |
2189
+ * | | SSSS | ... | 3 |
2190
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
2191
+ * | | XX | -0800, +0530, Z | |
2192
+ * | | XXX | -08:00, +05:30, Z | |
2193
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
2194
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
2195
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
2196
+ * | | xx | -0800, +0530, +0000 | |
2197
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
2198
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
2199
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
2200
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
2201
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
2202
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
2203
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
2204
+ * | Seconds timestamp | t | 512969520 | 7 |
2205
+ * | | tt | ... | 3,7 |
2206
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
2207
+ * | | TT | ... | 3,7 |
2208
+ * | Long localized date | P | 04/29/1453 | 7 |
2209
+ * | | PP | Apr 29, 1453 | 7 |
2210
+ * | | PPP | April 29th, 1453 | 7 |
2211
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
2212
+ * | Long localized time | p | 12:00 AM | 7 |
2213
+ * | | pp | 12:00:00 AM | 7 |
2214
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
2215
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
2216
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
2217
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
2218
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
2219
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
2220
+ * Notes:
2221
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
2222
+ * are the same as "stand-alone" units, but are different in some languages.
2223
+ * "Formatting" units are declined according to the rules of the language
2224
+ * in the context of a date. "Stand-alone" units are always nominative singular:
2225
+ *
2226
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
2227
+ *
2228
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
2229
+ *
2230
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
2231
+ * the single quote characters (see below).
2232
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
2233
+ * the output will be the same as default pattern for this unit, usually
2234
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
2235
+ * are marked with "2" in the last column of the table.
2236
+ *
2237
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
2238
+ *
2239
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
2240
+ *
2241
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
2242
+ *
2243
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
2244
+ *
2245
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
2246
+ *
2247
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
2248
+ * The output will be padded with zeros to match the length of the pattern.
2249
+ *
2250
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
2251
+ *
2252
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
2253
+ * These tokens represent the shortest form of the quarter.
2254
+ *
2255
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
2256
+ *
2257
+ * | Year | `y` | `u` |
2258
+ * |------|-----|-----|
2259
+ * | AC 1 | 1 | 1 |
2260
+ * | BC 1 | 1 | 0 |
2261
+ * | BC 2 | 2 | -1 |
2262
+ *
2263
+ * Also `yy` always returns the last two digits of a year,
2264
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
2265
+ *
2266
+ * | Year | `yy` | `uu` |
2267
+ * |------|------|------|
2268
+ * | 1 | 01 | 01 |
2269
+ * | 14 | 14 | 14 |
2270
+ * | 376 | 76 | 376 |
2271
+ * | 1453 | 53 | 1453 |
2272
+ *
2273
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
2274
+ * except local week-numbering years are dependent on `options.weekStartsOn`
2275
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
2276
+ * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
2277
+ *
2278
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
2279
+ * so right now these tokens fall back to GMT timezones.
2280
+ *
2281
+ * 7. These patterns are not in the Unicode Technical Standard #35:
2282
+ * - `i`: ISO day of week
2283
+ * - `I`: ISO week of year
2284
+ * - `R`: ISO week-numbering year
2285
+ * - `t`: seconds timestamp
2286
+ * - `T`: milliseconds timestamp
2287
+ * - `o`: ordinal number modifier
2288
+ * - `P`: long localized date
2289
+ * - `p`: long localized time
2290
+ *
2291
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
2292
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2293
+ *
2294
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
2295
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2296
+ *
2297
+ * @param {Date|Number} date - the original date
2298
+ * @param {String} format - the string of tokens
2299
+ * @param {Object} [options] - an object with options.
2300
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
2301
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
2302
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
2303
+ * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
2304
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2305
+ * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
2306
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2307
+ * @returns {String} the formatted date string
2308
+ * @throws {TypeError} 2 arguments required
2309
+ * @throws {RangeError} `date` must not be Invalid Date
2310
+ * @throws {RangeError} `options.locale` must contain `localize` property
2311
+ * @throws {RangeError} `options.locale` must contain `formatLong` property
2312
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
2313
+ * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
2314
+ * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2315
+ * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2316
+ * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2317
+ * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2318
+ * @throws {RangeError} format string contains an unescaped latin alphabet character
2319
+ *
2320
+ * @example
2321
+ * // Represent 11 February 2014 in middle-endian format:
2322
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
2323
+ * //=> '02/11/2014'
2324
+ *
2325
+ * @example
2326
+ * // Represent 2 July 2014 in Esperanto:
2327
+ * import { eoLocale } from 'date-fns/locale/eo'
2328
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
2329
+ * locale: eoLocale
2330
+ * })
2331
+ * //=> '2-a de julio 2014'
2332
+ *
2333
+ * @example
2334
+ * // Escape string by single quote characters:
2335
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
2336
+ * //=> "3 o'clock"
2337
+ */
2338
+
2339
+ function format(dirtyDate, dirtyFormatStr, options) {
2340
+ var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
2341
+ requiredArgs(2, arguments);
2342
+ var formatStr = String(dirtyFormatStr);
2343
+ var defaultOptions = getDefaultOptions();
2344
+ var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
2345
+ var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
2346
+
2347
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
2348
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
2349
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
2350
+ }
2351
+ var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
2352
+
2353
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
2354
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
2355
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
2356
+ }
2357
+ if (!locale$1.localize) {
2358
+ throw new RangeError('locale must contain localize property');
2359
+ }
2360
+ if (!locale$1.formatLong) {
2361
+ throw new RangeError('locale must contain formatLong property');
2362
+ }
2363
+ var originalDate = toDate(dirtyDate);
2364
+ if (!isValid(originalDate)) {
2365
+ throw new RangeError('Invalid time value');
2366
+ }
2367
+
2368
+ // Convert the date in system timezone to the same date in UTC+00:00 timezone.
2369
+ // This ensures that when UTC functions will be implemented, locales will be compatible with them.
2370
+ // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
2371
+ var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
2372
+ var utcDate = subMilliseconds(originalDate, timezoneOffset);
2373
+ var formatterOptions = {
2374
+ firstWeekContainsDate: firstWeekContainsDate,
2375
+ weekStartsOn: weekStartsOn,
2376
+ locale: locale$1,
2377
+ _originalDate: originalDate
2378
+ };
2379
+ var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
2380
+ var firstCharacter = substring[0];
2381
+ if (firstCharacter === 'p' || firstCharacter === 'P') {
2382
+ var longFormatter = longFormatters[firstCharacter];
2383
+ return longFormatter(substring, locale$1.formatLong);
2384
+ }
2385
+ return substring;
2386
+ }).join('').match(formattingTokensRegExp).map(function (substring) {
2387
+ // Replace two single quote characters with one single quote character
2388
+ if (substring === "''") {
2389
+ return "'";
2390
+ }
2391
+ var firstCharacter = substring[0];
2392
+ if (firstCharacter === "'") {
2393
+ return cleanEscapedString(substring);
2394
+ }
2395
+ var formatter = formatters[firstCharacter];
2396
+ if (formatter) {
2397
+ if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
2398
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2399
+ }
2400
+ if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
2401
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2402
+ }
2403
+ return formatter(utcDate, substring, locale$1.localize, formatterOptions);
2404
+ }
2405
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
2406
+ throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
2407
+ }
2408
+ return substring;
2409
+ }).join('');
2410
+ return result;
2411
+ }
2412
+ function cleanEscapedString(input) {
2413
+ var matched = input.match(escapedStringRegExp);
2414
+ if (!matched) {
2415
+ return input;
2416
+ }
2417
+ return matched[1].replace(doubleQuoteRegExp, "'");
2418
+ }
2419
+
2420
+ /**
2421
+ * @name getDay
2422
+ * @category Weekday Helpers
2423
+ * @summary Get the day of the week of the given date.
2424
+ *
2425
+ * @description
2426
+ * Get the day of the week of the given date.
2427
+ *
2428
+ * @param {Date|Number} date - the given date
2429
+ * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday
2430
+ * @throws {TypeError} 1 argument required
2431
+ *
2432
+ * @example
2433
+ * // Which day of the week is 29 February 2012?
2434
+ * const result = getDay(new Date(2012, 1, 29))
2435
+ * //=> 3
2436
+ */
2437
+ function getDay(dirtyDate) {
2438
+ requiredArgs(1, arguments);
2439
+ var date = toDate(dirtyDate);
2440
+ var day = date.getDay();
2441
+ return day;
2442
+ }
2443
+
2444
+ /**
2445
+ * @name getDaysInMonth
2446
+ * @category Month Helpers
2447
+ * @summary Get the number of days in a month of the given date.
2448
+ *
2449
+ * @description
2450
+ * Get the number of days in a month of the given date.
2451
+ *
2452
+ * @param {Date|Number} date - the given date
2453
+ * @returns {Number} the number of days in a month
2454
+ * @throws {TypeError} 1 argument required
2455
+ *
2456
+ * @example
2457
+ * // How many days are in February 2000?
2458
+ * const result = getDaysInMonth(new Date(2000, 1))
2459
+ * //=> 29
2460
+ */
2461
+ function getDaysInMonth(dirtyDate) {
2462
+ requiredArgs(1, arguments);
2463
+ var date = toDate(dirtyDate);
2464
+ var year = date.getFullYear();
2465
+ var monthIndex = date.getMonth();
2466
+ var lastDayOfMonth = new Date(0);
2467
+ lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
2468
+ lastDayOfMonth.setHours(0, 0, 0, 0);
2469
+ return lastDayOfMonth.getDate();
2470
+ }
2471
+
2472
+ /**
2473
+ * @name getYear
2474
+ * @category Year Helpers
2475
+ * @summary Get the year of the given date.
2476
+ *
2477
+ * @description
2478
+ * Get the year of the given date.
2479
+ *
2480
+ * @param {Date|Number} date - the given date
2481
+ * @returns {Number} the year
2482
+ * @throws {TypeError} 1 argument required
2483
+ *
2484
+ * @example
2485
+ * // Which year is 2 July 2014?
2486
+ * const result = getYear(new Date(2014, 6, 2))
2487
+ * //=> 2014
2488
+ */
2489
+ function getYear(dirtyDate) {
2490
+ requiredArgs(1, arguments);
2491
+ return toDate(dirtyDate).getFullYear();
2492
+ }
2493
+
2494
+ /**
2495
+ * @name isAfter
2496
+ * @category Common Helpers
2497
+ * @summary Is the first date after the second one?
2498
+ *
2499
+ * @description
2500
+ * Is the first date after the second one?
2501
+ *
2502
+ * @param {Date|Number} date - the date that should be after the other one to return true
2503
+ * @param {Date|Number} dateToCompare - the date to compare with
2504
+ * @returns {Boolean} the first date is after the second date
2505
+ * @throws {TypeError} 2 arguments required
2506
+ *
2507
+ * @example
2508
+ * // Is 10 July 1989 after 11 February 1987?
2509
+ * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
2510
+ * //=> true
2511
+ */
2512
+ function isAfter(dirtyDate, dirtyDateToCompare) {
2513
+ requiredArgs(2, arguments);
2514
+ var date = toDate(dirtyDate);
2515
+ var dateToCompare = toDate(dirtyDateToCompare);
2516
+ return date.getTime() > dateToCompare.getTime();
2517
+ }
2518
+
2519
+ /**
2520
+ * @name isBefore
2521
+ * @category Common Helpers
2522
+ * @summary Is the first date before the second one?
2523
+ *
2524
+ * @description
2525
+ * Is the first date before the second one?
2526
+ *
2527
+ * @param {Date|Number} date - the date that should be before the other one to return true
2528
+ * @param {Date|Number} dateToCompare - the date to compare with
2529
+ * @returns {Boolean} the first date is before the second date
2530
+ * @throws {TypeError} 2 arguments required
2531
+ *
2532
+ * @example
2533
+ * // Is 10 July 1989 before 11 February 1987?
2534
+ * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
2535
+ * //=> false
2536
+ */
2537
+ function isBefore(dirtyDate, dirtyDateToCompare) {
2538
+ requiredArgs(2, arguments);
2539
+ var date = toDate(dirtyDate);
2540
+ var dateToCompare = toDate(dirtyDateToCompare);
2541
+ return date.getTime() < dateToCompare.getTime();
2542
+ }
2543
+
2544
+ /**
2545
+ * @name isSameMonth
2546
+ * @category Month Helpers
2547
+ * @summary Are the given dates in the same month (and year)?
2548
+ *
2549
+ * @description
2550
+ * Are the given dates in the same month (and year)?
2551
+ *
2552
+ * @param {Date|Number} dateLeft - the first date to check
2553
+ * @param {Date|Number} dateRight - the second date to check
2554
+ * @returns {Boolean} the dates are in the same month (and year)
2555
+ * @throws {TypeError} 2 arguments required
2556
+ *
2557
+ * @example
2558
+ * // Are 2 September 2014 and 25 September 2014 in the same month?
2559
+ * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
2560
+ * //=> true
2561
+ *
2562
+ * @example
2563
+ * // Are 2 September 2014 and 25 September 2015 in the same month?
2564
+ * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
2565
+ * //=> false
2566
+ */
2567
+ function isSameMonth(dirtyDateLeft, dirtyDateRight) {
2568
+ requiredArgs(2, arguments);
2569
+ var dateLeft = toDate(dirtyDateLeft);
2570
+ var dateRight = toDate(dirtyDateRight);
2571
+ return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();
2572
+ }
2573
+
2574
+ /**
2575
+ * @name isSameYear
2576
+ * @category Year Helpers
2577
+ * @summary Are the given dates in the same year?
2578
+ *
2579
+ * @description
2580
+ * Are the given dates in the same year?
2581
+ *
2582
+ * @param {Date|Number} dateLeft - the first date to check
2583
+ * @param {Date|Number} dateRight - the second date to check
2584
+ * @returns {Boolean} the dates are in the same year
2585
+ * @throws {TypeError} 2 arguments required
2586
+ *
2587
+ * @example
2588
+ * // Are 2 September 2014 and 25 September 2014 in the same year?
2589
+ * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))
2590
+ * //=> true
2591
+ */
2592
+ function isSameYear(dirtyDateLeft, dirtyDateRight) {
2593
+ requiredArgs(2, arguments);
2594
+ var dateLeft = toDate(dirtyDateLeft);
2595
+ var dateRight = toDate(dirtyDateRight);
2596
+ return dateLeft.getFullYear() === dateRight.getFullYear();
2597
+ }
2598
+
2599
+ /**
2600
+ * @name setMonth
2601
+ * @category Month Helpers
2602
+ * @summary Set the month to the given date.
2603
+ *
2604
+ * @description
2605
+ * Set the month to the given date.
2606
+ *
2607
+ * @param {Date|Number} date - the date to be changed
2608
+ * @param {Number} month - the month of the new date
2609
+ * @returns {Date} the new date with the month set
2610
+ * @throws {TypeError} 2 arguments required
2611
+ *
2612
+ * @example
2613
+ * // Set February to 1 September 2014:
2614
+ * const result = setMonth(new Date(2014, 8, 1), 1)
2615
+ * //=> Sat Feb 01 2014 00:00:00
2616
+ */
2617
+ function setMonth(dirtyDate, dirtyMonth) {
2618
+ requiredArgs(2, arguments);
2619
+ var date = toDate(dirtyDate);
2620
+ var month = toInteger(dirtyMonth);
2621
+ var year = date.getFullYear();
2622
+ var day = date.getDate();
2623
+ var dateWithDesiredMonth = new Date(0);
2624
+ dateWithDesiredMonth.setFullYear(year, month, 15);
2625
+ dateWithDesiredMonth.setHours(0, 0, 0, 0);
2626
+ var daysInMonth = getDaysInMonth(dateWithDesiredMonth);
2627
+ // Set the last day of the new month
2628
+ // if the original date was the last day of the longer month
2629
+ date.setMonth(month, Math.min(day, daysInMonth));
2630
+ return date;
2631
+ }
2632
+
2633
+ /**
2634
+ * @name setDate
2635
+ * @category Day Helpers
2636
+ * @summary Set the day of the month to the given date.
2637
+ *
2638
+ * @description
2639
+ * Set the day of the month to the given date.
2640
+ *
2641
+ * @param {Date|Number} date - the date to be changed
2642
+ * @param {Number} dayOfMonth - the day of the month of the new date
2643
+ * @returns {Date} the new date with the day of the month set
2644
+ * @throws {TypeError} 2 arguments required
2645
+ *
2646
+ * @example
2647
+ * // Set the 30th day of the month to 1 September 2014:
2648
+ * const result = setDate(new Date(2014, 8, 1), 30)
2649
+ * //=> Tue Sep 30 2014 00:00:00
2650
+ */
2651
+ function setDate(dirtyDate, dirtyDayOfMonth) {
2652
+ requiredArgs(2, arguments);
2653
+ var date = toDate(dirtyDate);
2654
+ var dayOfMonth = toInteger(dirtyDayOfMonth);
2655
+ date.setDate(dayOfMonth);
2656
+ return date;
2657
+ }
2658
+
2659
+ /**
2660
+ * @name setYear
2661
+ * @category Year Helpers
2662
+ * @summary Set the year to the given date.
2663
+ *
2664
+ * @description
2665
+ * Set the year to the given date.
2666
+ *
2667
+ * @param {Date|Number} date - the date to be changed
2668
+ * @param {Number} year - the year of the new date
2669
+ * @returns {Date} the new date with the year set
2670
+ * @throws {TypeError} 2 arguments required
2671
+ *
2672
+ * @example
2673
+ * // Set year 2013 to 1 September 2014:
2674
+ * const result = setYear(new Date(2014, 8, 1), 2013)
2675
+ * //=> Sun Sep 01 2013 00:00:00
2676
+ */
2677
+ function setYear(dirtyDate, dirtyYear) {
2678
+ requiredArgs(2, arguments);
2679
+ var date = toDate(dirtyDate);
2680
+ var year = toInteger(dirtyYear);
2681
+
2682
+ // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date
2683
+ if (isNaN(date.getTime())) {
2684
+ return new Date(NaN);
2685
+ }
2686
+ date.setFullYear(year);
2687
+ return date;
2688
+ }
2689
+
2690
+ const calendarComponentCss = ".relative{position:relative!important}.block{display:block!important}.flex{display:flex!important}.grid{display:grid!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-\\[12rem\\]{height:12rem!important}.h-auto{height:auto!important}.h-full{height:100%!important}.min-h-\\[12rem\\]{min-height:12rem!important}.w-6{width:1.5rem!important}.w-\\[14rem\\]{width:14rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.self-center{align-self:center!important}.justify-self-center{justify-self:center!important}.overflow-y-auto{overflow-y:auto!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-indigo-light{--tw-border-opacity:1!important;border-color:rgb(241 246 255/var(--tw-border-opacity))!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-storm{--tw-text-opacity:1!important}.text-storm{color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-40{opacity:.4!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:.5rem;width:14rem}:host .view-day,:host .view-month,:host .view-year{display:flex;flex-direction:column;gap:.5rem;height:12rem;width:100%}:host .header{align-items:center;display:flex;font-size:1rem;gap:.25rem;justify-content:space-between;line-height:1.5rem;width:100%}:host .header span{--tw-text-opacity:1;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;height:2rem;padding-left:.5rem;padding-right:.5rem}:host .header span.disabled{cursor:default}:host .header span:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header span.year{font-weight:600}:host .header .nav{--tw-text-opacity:1;align-items:center;border-radius:100%;color:rgb(82 138 250/var(--tw-text-opacity));cursor:pointer;display:flex;height:1.5rem;justify-content:center;position:relative;text-decoration-line:none;transition-duration:.2s;width:1.5rem}:host .header .nav:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header .nav.disabled{opacity:0}:host .view-day{height:auto;min-height:12rem}:host .view-day .dates{display:grid;gap:.25rem;grid-template-columns:repeat(7,1fr)}:host .view-day .dates>span{--tw-text-opacity:1;align-self:center;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.75rem;font-weight:600;justify-self:center;line-height:1rem;text-align:center;width:1.5rem}:host .view-day .dates>time{--tw-text-opacity:1;align-items:center;align-self:center;border:1px solid transparent;border-radius:100%;box-sizing:border-box;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:1.5rem;justify-content:center;justify-self:center;line-height:1.25rem;transition-duration:.2s;width:1.5rem}:host .view-day .dates>time.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-day .dates>time.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-day .dates>time.disabled,:host .view-day .dates>time.other-month{cursor:default;opacity:.4}:host .view-day .dates>time.disabled{text-decoration-line:line-through}:host .view-day .dates>time:hover:not(.disabled):not(.active):not(.other-month){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(81 83 107/var(--tw-text-opacity))}:host .view-month .items,:host .view-year .items{align-items:center;display:grid;gap:.25rem;grid-template-columns:repeat(3,1fr);height:100%;overflow-y:auto;position:relative;width:100%}:host .view-month .items>div,:host .view-year .items>div{--tw-text-opacity:1;align-items:center;border:1px solid transparent;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:2rem;justify-content:center;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem}:host .view-month .items>div.current,:host .view-year .items>div.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-month .items>div.active,:host .view-year .items>div.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-month .items>div.disabled,:host .view-year .items>div.disabled{cursor:default;opacity:.4;text-decoration-line:line-through}:host .view-month .items>div:hover:not(.disabled):not(.active),:host .view-year .items>div:hover:not(.disabled):not(.active){--tw-bg-opacity:1;background-color:rgb(247 250 252/var(--tw-bg-opacity))}:host .view-month .items{grid-template-columns:repeat(2,1fr)}:host .view-year .header{justify-content:center}:host(.variant-default){--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.variant-embedded){padding:0}.static{position:static!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.visible{visibility:visible!important}.absolute{position:absolute!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative-light{--tw-text-opacity:1!important;color:rgb(255 204 211/var(--tw-text-opacity))!important}.hover\\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.items-end{align-items:flex-end!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border-l-0{border-left-width:0!important}.border-r-0{border-right-width:0!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.col-start-1{grid-column-start:1!important}.col-start-2{grid-column-start:2!important}.col-start-3{grid-column-start:3!important}.col-start-4{grid-column-start:4!important}.col-start-5{grid-column-start:5!important}.col-start-6{grid-column-start:6!important}.col-start-7{grid-column-start:7!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";
2691
+
2692
+ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends HTMLElement {
2693
+ constructor() {
2694
+ super();
2695
+ this.__registerHost();
2696
+ this.__attachShadow();
2697
+ this.valueChange = createEvent(this, "valueChange", 7);
2698
+ this._today = new Date();
2699
+ this._weekDays = Array.from(Array(7).keys());
2700
+ this.variant = 'default';
2701
+ this.value = undefined;
2702
+ this.preselectToday = false;
2703
+ this.disabledDates = undefined;
2704
+ this.minDate = new Date(1970, 0, 1);
2705
+ this.maxDate = this._getAutomaticMax();
2706
+ this.disableWeekends = false;
2707
+ this.mode = 'day';
2708
+ this._view = this.mode;
2709
+ this._viewDate = this._today;
2710
+ this._value = undefined;
2711
+ this._minDate = undefined;
2712
+ this._maxDate = undefined;
2713
+ this._disabledDates = [];
2714
+ }
2715
+ componentWillLoad() {
2716
+ if (this.disabledDates) {
2717
+ this._parseDisabledDates(this.disabledDates);
2718
+ }
2719
+ if (this.minDate) {
2720
+ this._parseMinDate(this.minDate);
2721
+ }
2722
+ if (this.maxDate) {
2723
+ this._parseMaxDate(this.maxDate);
2724
+ }
2725
+ this._parseValue(this.value);
2726
+ if (this._value) {
2727
+ this._viewDate = this._value;
2728
+ }
2729
+ if (isBefore(this._viewDate, this._minDate)) {
2730
+ this._viewDate = this._minDate;
2731
+ }
2732
+ if (isAfter(this._viewDate, this._maxDate)) {
2733
+ this._viewDate = this._maxDate;
2734
+ }
2735
+ }
2736
+ componentDidRender() {
2737
+ if (this._view === 'year') {
2738
+ this._scrollYearIntoView();
2739
+ }
2740
+ }
2741
+ _parseValue(value) {
2742
+ if (!value && this.preselectToday) {
2743
+ value = new Date();
2744
+ }
2745
+ if (typeof value === 'string') {
2746
+ value = new Date(value);
2747
+ }
2748
+ this._setValue(value);
2749
+ }
2750
+ _parseMinDate(minDate) {
2751
+ if (typeof minDate === 'string') {
2752
+ minDate = new Date(minDate);
2753
+ }
2754
+ if (!isValid(minDate)) {
2755
+ return;
2756
+ }
2757
+ this._minDate = minDate;
2758
+ if (isBefore(this._viewDate, this._minDate)) {
2759
+ this._viewDate = this._minDate;
2760
+ }
2761
+ }
2762
+ _parseMaxDate(maxDate) {
2763
+ if (typeof maxDate === 'string') {
2764
+ maxDate = new Date(maxDate);
2765
+ }
2766
+ if (!isValid(maxDate)) {
2767
+ return;
2768
+ }
2769
+ this._maxDate = maxDate;
2770
+ if (isAfter(this._viewDate, this._maxDate)) {
2771
+ this._viewDate = this._maxDate;
2772
+ }
2773
+ }
2774
+ _parseDisabledDates(disabledDates) {
2775
+ if (typeof disabledDates === 'string') {
2776
+ disabledDates = JSON.parse(disabledDates);
2777
+ }
2778
+ if (!disabledDates || !Array.isArray(disabledDates)) {
2779
+ return;
2780
+ }
2781
+ // normalize all to date
2782
+ this._disabledDates = disabledDates
2783
+ .map((date) => {
2784
+ if (typeof date === 'string') {
2785
+ return new Date(date);
2786
+ }
2787
+ return date;
2788
+ })
2789
+ .filter((date) => isValid(date));
2790
+ }
2791
+ render() {
2792
+ return (h(Host, { class: `p-calendar variant-${this.variant}` }, this._getView()));
2793
+ }
2794
+ _getView() {
2795
+ if (this._view === 'year') {
2796
+ return this._getYearView();
2797
+ }
2798
+ if (this._view === 'month') {
2799
+ return this._getMonthView();
2800
+ }
2801
+ return this._getDayView();
2802
+ }
2803
+ /* With this, we shall hack the system in ways no one would ever have thought.
2804
+ <div class="col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7"></div>
2805
+ */
2806
+ _getDayView() {
2807
+ const daysInMonth = this._generateDaysInMonth();
2808
+ return (h("div", { class: "view-day" }, h("div", { class: "header" }, h("div", { class: `nav ${!this._canSetAmount('month', -1) && 'disabled'}`, onClick: () => this._changeMonth(-1) }, h("p-icon", { variant: "chevron", rotate: 90 })), h("div", null, h("span", { onClick: () => this._changeView('month'), class: !this._canChangeView('month') && 'disabled' }, format(this._viewDate, 'MMMM')), h("span", { onClick: () => this._changeView('year'), class: `year ${!this._canChangeView('year') && 'disabled'}` }, getYear(this._viewDate))), h("div", { class: `nav ${!this._canSetAmount('month', 1) && 'disabled'}`, onClick: () => this._changeMonth(1) }, h("p-icon", { variant: "chevron", rotate: -90 }))), h("div", { class: "dates" }, this._weekDays.map((weekday) => (h("span", null, format(addDays(new Date(2022, 7, 1), weekday), 'eee')))), daysInMonth.map((day) => {
2809
+ return (h("time", { class: `day ${day.active && 'active'} ${day.disabled && 'disabled'} ${day.current && 'current'} ${day.offset !== false &&
2810
+ `col-start-${day.offset}`}`, onClick: () => this._setValue(day.date) }, day.day));
2811
+ }))));
2812
+ }
2813
+ _getMonthView() {
2814
+ const months = this._generateMonths();
2815
+ return (h("div", { class: "view-month" }, h("div", { class: "header" }, h("div", { class: `nav ${!this._canSetAmount('year', -1) && 'disabled'}`, onClick: () => this._changeYear(-1) }, h("p-icon", { variant: "chevron", rotate: 90 })), h("div", null, h("span", { onClick: () => this._changeView('year'), class: `year ${!this._canChangeView('year') && 'disabled'}` }, getYear(this._viewDate))), h("div", { class: `nav ${!this._canSetAmount('year', 1) && 'disabled'}`, onClick: () => this._changeYear(1) }, h("p-icon", { variant: "chevron", rotate: -90 }))), h("div", { class: "items" }, months.map((month) => (h("div", { onClick: () => this._setMonth(month.month), class: `month ${month.active && 'active'} ${month.disabled && 'disabled'} ${month.current && 'current'}` }, format(setMonth(new Date(), month.month), 'MMMM')))))));
2816
+ }
2817
+ _getYearView() {
2818
+ const years = this._generateYears();
2819
+ return (h("div", { class: "view-year" }, h("div", { class: "header" }, h("div", null, h("span", { class: "year disabled" }, years === null || years === void 0 ? void 0 :
2820
+ years[0].year, " - ", years === null || years === void 0 ? void 0 :
2821
+ years[years.length - 1].year))), h("div", { class: "items" }, years.map((year) => (h("div", { onClick: () => this._setYear(year.year), class: `year ${year.active && 'active'} ${year.current && 'current'}` }, year.year))))));
2822
+ }
2823
+ _setYear(year) {
2824
+ const date = setYear(this._viewDate, year);
2825
+ if (this.mode === 'year') {
2826
+ return this._setValue(setMonth(setDate(date, 1), 0));
2827
+ }
2828
+ this._viewDate = setYear(this._viewDate, year);
2829
+ this._view = 'month';
2830
+ }
2831
+ _setMonth(month) {
2832
+ const date = setMonth(this._viewDate, month);
2833
+ if (this.mode === 'month') {
2834
+ return this._setValue(setDate(date, 1));
2835
+ }
2836
+ this._viewDate = date;
2837
+ this._view = 'day';
2838
+ }
2839
+ _changeMonth(amount = 1) {
2840
+ const allowed = this._canSetAmount('month', amount);
2841
+ if (!allowed) {
2842
+ return;
2843
+ }
2844
+ const newDate = addMonths(this._viewDate, amount);
2845
+ this._viewDate = newDate;
2846
+ }
2847
+ _changeYear(amount = 1) {
2848
+ const allowed = this._canSetAmount('year', amount);
2849
+ if (!allowed) {
2850
+ return;
2851
+ }
2852
+ let newDate = addYears(this._viewDate, amount);
2853
+ this._viewDate = newDate;
2854
+ }
2855
+ _setValue(value) {
2856
+ if (value === null) {
2857
+ this._value = null;
2858
+ this.valueChange.emit(null);
2859
+ return;
2860
+ }
2861
+ if (!isValid(value)) {
2862
+ return;
2863
+ }
2864
+ if (this._isDisabledDay(value)) {
2865
+ return;
2866
+ }
2867
+ value = startOfDay(value);
2868
+ const isSameValue = isSameDay(value, this._value);
2869
+ if (isSameValue) {
2870
+ return;
2871
+ }
2872
+ this._value = value;
2873
+ this.valueChange.emit(value);
2874
+ }
2875
+ _generateDaysInMonth() {
2876
+ const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());
2877
+ return days.map((day) => {
2878
+ day = day + 1;
2879
+ const date = setDate(this._viewDate, day);
2880
+ const dayOfWeek = getDay(date);
2881
+ return {
2882
+ day,
2883
+ date,
2884
+ offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,
2885
+ current: isSameDay(date, this._today),
2886
+ active: isSameDay(date, this._value),
2887
+ disabled: this._isDisabledDay(date),
2888
+ };
2889
+ });
2890
+ }
2891
+ _isDisabledDay(day) {
2892
+ return (isBefore(day, this._minDate) ||
2893
+ (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||
2894
+ ((getDay(day) === 0 || getDay(day) === 6) &&
2895
+ this.disableWeekends) ||
2896
+ this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0);
2897
+ }
2898
+ _generateMonths() {
2899
+ const year = getYear(this._viewDate);
2900
+ const months = Array.from(Array(12).keys());
2901
+ return months.map((month) => {
2902
+ const date = new Date(year, month, 1);
2903
+ return {
2904
+ month,
2905
+ current: isSameMonth(this._today, date),
2906
+ active: isSameMonth(this._value, date),
2907
+ disabled: isAfter(date, this._maxDate) ||
2908
+ isBefore(endOfMonth(date), this._minDate),
2909
+ };
2910
+ });
2911
+ }
2912
+ _generateYears() {
2913
+ const maxYear = getYear(this._maxDate) + 1;
2914
+ const minYear = getYear(this._minDate);
2915
+ return Array.from(Array(maxYear - minYear).keys()).map((index) => {
2916
+ const year = minYear + index;
2917
+ return {
2918
+ year,
2919
+ current: getYear(this._today) === year,
2920
+ active: getYear(this._value) === year,
2921
+ };
2922
+ });
2923
+ }
2924
+ _scrollYearIntoView() {
2925
+ const items = this._el.shadowRoot.querySelector('.view-year .items');
2926
+ if (!items) {
2927
+ return;
2928
+ }
2929
+ const active = items.querySelector('.year.active');
2930
+ if (active) {
2931
+ return items.scrollTo({
2932
+ top: active.offsetTop,
2933
+ });
2934
+ }
2935
+ const current = items.querySelector('.year.current');
2936
+ if (current) {
2937
+ return items.scrollTo({
2938
+ top: current.offsetTop,
2939
+ });
2940
+ }
2941
+ }
2942
+ _changeView(view) {
2943
+ if (!this._canChangeView(view)) {
2944
+ return;
2945
+ }
2946
+ this._view = view;
2947
+ }
2948
+ _canChangeView(view) {
2949
+ if (view === 'year') {
2950
+ if (isSameYear(this._minDate, this._maxDate)) {
2951
+ return false;
2952
+ }
2953
+ return true;
2954
+ }
2955
+ if (isSameMonth(this._minDate, this._maxDate)) {
2956
+ return false;
2957
+ }
2958
+ return true;
2959
+ }
2960
+ _canSetAmount(type, amount = 1) {
2961
+ if (type === 'month') {
2962
+ const newDate = addMonths(this._viewDate, amount);
2963
+ const startNewDate = startOfMonth(newDate);
2964
+ if ((isBefore(startNewDate, startOfMonth(this._minDate)) &&
2965
+ !isSameDay(startNewDate, this._minDate)) ||
2966
+ isAfter(startNewDate, endOfMonth(this._maxDate))) {
2967
+ return false;
2968
+ }
2969
+ }
2970
+ if (type === 'year') {
2971
+ let newDate = addYears(this._viewDate, amount);
2972
+ const year = getYear(newDate);
2973
+ if (year < getYear(this._minDate) ||
2974
+ year > getYear(this._maxDate)) {
2975
+ return false;
2976
+ }
2977
+ }
2978
+ return true;
2979
+ }
2980
+ _getAutomaticMax() {
2981
+ const date = addYears(new Date(), 50);
2982
+ let year = getYear(date);
2983
+ year = Math.ceil(year / 10) * 10;
2984
+ return setYear(date, year);
2985
+ }
2986
+ get _el() { return this; }
2987
+ static get watchers() { return {
2988
+ "value": ["_parseValue"],
2989
+ "minDate": ["_parseMinDate"],
2990
+ "maxDate": ["_parseMaxDate"],
2991
+ "disabledDates": ["_parseDisabledDates"]
2992
+ }; }
2993
+ static get style() { return calendarComponentCss; }
2994
+ }, [1, "p-calendar", {
2995
+ "variant": [1],
2996
+ "value": [1],
2997
+ "preselectToday": [4, "preselect-today"],
2998
+ "disabledDates": [1, "disabled-dates"],
2999
+ "minDate": [1, "min-date"],
3000
+ "maxDate": [1, "max-date"],
3001
+ "disableWeekends": [4, "disable-weekends"],
3002
+ "mode": [1],
3003
+ "_view": [32],
3004
+ "_viewDate": [32],
3005
+ "_value": [32],
3006
+ "_minDate": [32],
3007
+ "_maxDate": [32],
3008
+ "_disabledDates": [32]
3009
+ }]);
3010
+ function defineCustomElement() {
3011
+ if (typeof customElements === "undefined") {
3012
+ return;
3013
+ }
3014
+ const components = ["p-calendar", "p-icon"];
3015
+ components.forEach(tagName => { switch (tagName) {
3016
+ case "p-calendar":
3017
+ if (!customElements.get(tagName)) {
3018
+ customElements.define(tagName, Calendar);
3019
+ }
3020
+ break;
3021
+ case "p-icon":
3022
+ if (!customElements.get(tagName)) {
3023
+ defineCustomElement$1();
3024
+ }
3025
+ break;
3026
+ } });
3027
+ }
3028
+
3029
+ export { Calendar as C, _typeof as _, startOfUTCISOWeek as a, getUTCWeek as b, toInteger as c, defineCustomElement as d, getUTCISOWeek as e, getDefaultOptions as f, getUTCWeekYear as g, subMilliseconds as h, getTimezoneOffsetInMilliseconds as i, locale as j, isProtectedWeekYearToken as k, longFormatters as l, throwProtectedError as m, isProtectedDayOfYearToken as n, format as o, isValid as p, isBefore as q, requiredArgs as r, startOfUTCWeek as s, toDate as t, isAfter as u, startOfDay as v, isSameDay as w };
3030
+
3031
+ //# sourceMappingURL=calendar.component.js.map