@ozdao/martyrs 0.2.489 → 0.2.491

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 (366) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/auth.server.cjs +2 -51
  6. package/dist/auth.server.js +1 -50
  7. package/dist/builder.cjs +90 -4
  8. package/dist/builder.js +90 -4
  9. package/dist/main-BhCqlPMQ.cjs +11 -0
  10. package/dist/{main-IVRL6IjM.js → main-YBlKbx0g.js} +1308 -1285
  11. package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
  12. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  13. package/dist/martyrs/src/components/Button/Button.vue2.cjs +48 -21
  14. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -1
  15. package/dist/martyrs/src/components/Button/Button.vue2.js +49 -22
  16. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
  17. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  18. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  19. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  20. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  21. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
  22. package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
  23. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
  24. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
  25. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +1 -1
  26. package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
  27. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -2
  28. package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
  29. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  30. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  31. package/dist/martyrs/src/components/Loader/{Loader.vue2.cjs → Loader.vue.cjs} +3 -3
  32. package/dist/martyrs/src/components/Loader/Loader.vue.cjs.map +1 -0
  33. package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +3 -3
  34. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
  35. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  36. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
  37. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.cjs → Tooltip.vue.cjs} +2 -2
  38. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js.map → Tooltip.vue.cjs.map} +1 -1
  39. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
  40. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
  41. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  42. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  44. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  45. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  47. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
  48. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  49. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  51. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  53. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  55. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +3 -3
  56. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
  57. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
  59. package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
  61. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  63. package/dist/martyrs/src/modules/globals/globals.client.cjs +1 -2
  64. package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/globals/globals.client.js +1 -2
  66. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  67. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  68. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  69. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
  70. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
  71. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  72. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  73. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +10 -1
  74. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +10 -1
  76. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  77. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
  79. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
  81. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  83. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +2 -2
  84. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +2 -2
  85. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
  86. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
  87. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  88. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  89. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
  90. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
  91. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  93. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
  94. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
  95. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  97. package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.cjs +22 -8
  98. package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.cjs.map +1 -1
  99. package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.js +23 -9
  100. package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.js.map +1 -1
  101. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs +13 -15
  102. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs.map +1 -1
  103. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js +14 -16
  104. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js.map +1 -1
  105. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.cjs +2 -2
  106. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.cjs.map +1 -1
  107. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +2 -2
  108. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
  109. package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.cjs +2 -2
  110. package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.cjs.map +1 -1
  111. package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.js +2 -2
  112. package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.js.map +1 -1
  113. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +1 -1
  114. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  115. package/dist/martyrs/src/modules/notifications/notifications.client.js +7 -7
  116. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  117. package/dist/martyrs/src/modules/notifications/router/notifications.router.js +4 -4
  118. package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +1 -1
  119. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs +7 -10
  120. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/notifications/store/notifications.store.js +7 -10
  122. package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
  123. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
  125. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  127. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs +0 -1
  128. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
  129. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +0 -1
  130. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -2
  132. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  133. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  134. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  135. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  136. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  137. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  138. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  139. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  140. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  141. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  142. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  143. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  144. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  145. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  146. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  147. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  148. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  149. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +2 -2
  150. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +2 -2
  151. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.cjs +1 -1
  152. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
  153. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  154. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  155. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  156. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  157. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  159. package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  161. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  162. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  163. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  164. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  165. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  166. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  167. package/dist/martyrs.cjs.js +1 -1
  168. package/dist/martyrs.css +1 -1
  169. package/dist/martyrs.es.js +1 -1
  170. package/dist/notifications.server.cjs +142 -44
  171. package/dist/notifications.server.js +142 -44
  172. package/dist/orders.server.cjs +155 -102
  173. package/dist/orders.server.js +155 -102
  174. package/dist/products.server.cjs +4 -0
  175. package/dist/products.server.js +4 -0
  176. package/dist/profile.schema-BGAe5VN5.js +92 -0
  177. package/dist/profile.schema-pidHrksV.cjs +91 -0
  178. package/dist/style.css +65 -247
  179. package/dist/{web-BXhlxo6M.cjs → web-BBmMBRv-.cjs} +1 -1
  180. package/dist/{web-Czi05iGG.js → web-Dqu-aCL5.js} +1 -1
  181. package/package.json +1 -1
  182. package/src/builder/rspack/rspack.config.spa.client.js +46 -1
  183. package/src/builder/rspack/rspack.config.ssr.client.js +43 -0
  184. package/src/builder/templates/page.js +1 -1
  185. package/src/components/Button/Button.vue +230 -196
  186. package/src/components/Loader/Loader.vue +1 -1
  187. package/src/modules/auth/controllers/middlewares/visitor.logger.js +22 -0
  188. package/src/modules/globals/globals.client.js +1 -1
  189. package/src/modules/globals/views/components/layouts/Client.vue +10 -9
  190. package/src/modules/notifications/FIXES.md +4 -0
  191. package/src/modules/notifications/components/layouts/NotificationsLayout.vue +33 -32
  192. package/src/modules/notifications/components/pages/Notifications.vue +10 -51
  193. package/src/modules/notifications/components/sections/NotificationPreferences.vue +1 -11
  194. package/src/modules/notifications/components/sections/NotificationsList.vue +1 -1
  195. package/src/modules/notifications/controllers/notifications.controller.js +50 -4
  196. package/src/modules/notifications/notifications.client.js +1 -1
  197. package/src/modules/notifications/notifications.server.js +18 -7
  198. package/src/modules/notifications/routes/notifications.routes.js +4 -2
  199. package/src/modules/notifications/services/notification.service.js +109 -38
  200. package/src/modules/notifications/services/telegram.service.js +1 -0
  201. package/src/modules/notifications/services/whatsapp.service.js +1 -0
  202. package/src/modules/notifications/store/notifications.store.js +25 -16
  203. package/src/modules/orders/components/partials/ShopCart.vue +0 -1
  204. package/src/modules/orders/controllers/orders.controller.js +195 -85
  205. package/src/modules/products/controllers/products.controller.js +4 -0
  206. package/dist/main-CmuUC0tl.cjs +0 -11
  207. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  208. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  209. package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
  210. package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +0 -1
  211. package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
  212. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
  213. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.cjs +0 -200
  214. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.cjs.map +0 -1
  215. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.js +0 -200
  216. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/StoreDebugger.vue.js.map +0 -1
  217. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.cjs +0 -21
  218. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.cjs.map +0 -1
  219. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.js +0 -21
  220. package/dist/martyrs/src/modules/globals/views/plugins/store-debugger/store-debugger.plugin.js.map +0 -1
  221. package/dist/node_modules/date-fns/_lib/addLeadingZeros.cjs +0 -9
  222. package/dist/node_modules/date-fns/_lib/addLeadingZeros.cjs.map +0 -1
  223. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -9
  224. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
  225. package/dist/node_modules/date-fns/_lib/defaultOptions.cjs +0 -8
  226. package/dist/node_modules/date-fns/_lib/defaultOptions.cjs.map +0 -1
  227. package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -8
  228. package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
  229. package/dist/node_modules/date-fns/_lib/format/formatters.cjs +0 -653
  230. package/dist/node_modules/date-fns/_lib/format/formatters.cjs.map +0 -1
  231. package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -653
  232. package/dist/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
  233. package/dist/node_modules/date-fns/_lib/format/lightFormatters.cjs +0 -63
  234. package/dist/node_modules/date-fns/_lib/format/lightFormatters.cjs.map +0 -1
  235. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -63
  236. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
  237. package/dist/node_modules/date-fns/_lib/format/longFormatters.cjs +0 -59
  238. package/dist/node_modules/date-fns/_lib/format/longFormatters.cjs.map +0 -1
  239. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -59
  240. package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
  241. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +0 -21
  242. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs.map +0 -1
  243. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -21
  244. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
  245. package/dist/node_modules/date-fns/_lib/normalizeDates.cjs +0 -12
  246. package/dist/node_modules/date-fns/_lib/normalizeDates.cjs.map +0 -1
  247. package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -12
  248. package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
  249. package/dist/node_modules/date-fns/_lib/protectedTokens.cjs +0 -24
  250. package/dist/node_modules/date-fns/_lib/protectedTokens.cjs.map +0 -1
  251. package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -24
  252. package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
  253. package/dist/node_modules/date-fns/constants.cjs +0 -9
  254. package/dist/node_modules/date-fns/constants.cjs.map +0 -1
  255. package/dist/node_modules/date-fns/constants.js +0 -9
  256. package/dist/node_modules/date-fns/constants.js.map +0 -1
  257. package/dist/node_modules/date-fns/constructFrom.cjs +0 -13
  258. package/dist/node_modules/date-fns/constructFrom.cjs.map +0 -1
  259. package/dist/node_modules/date-fns/constructFrom.js +0 -13
  260. package/dist/node_modules/date-fns/constructFrom.js.map +0 -1
  261. package/dist/node_modules/date-fns/differenceInCalendarDays.cjs +0 -21
  262. package/dist/node_modules/date-fns/differenceInCalendarDays.cjs.map +0 -1
  263. package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -21
  264. package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
  265. package/dist/node_modules/date-fns/format.cjs +0 -80
  266. package/dist/node_modules/date-fns/format.cjs.map +0 -1
  267. package/dist/node_modules/date-fns/format.js +0 -80
  268. package/dist/node_modules/date-fns/format.js.map +0 -1
  269. package/dist/node_modules/date-fns/getDayOfYear.cjs +0 -14
  270. package/dist/node_modules/date-fns/getDayOfYear.cjs.map +0 -1
  271. package/dist/node_modules/date-fns/getDayOfYear.js +0 -14
  272. package/dist/node_modules/date-fns/getDayOfYear.js.map +0 -1
  273. package/dist/node_modules/date-fns/getISOWeek.cjs +0 -14
  274. package/dist/node_modules/date-fns/getISOWeek.cjs.map +0 -1
  275. package/dist/node_modules/date-fns/getISOWeek.js +0 -14
  276. package/dist/node_modules/date-fns/getISOWeek.js.map +0 -1
  277. package/dist/node_modules/date-fns/getISOWeekYear.cjs +0 -27
  278. package/dist/node_modules/date-fns/getISOWeekYear.cjs.map +0 -1
  279. package/dist/node_modules/date-fns/getISOWeekYear.js +0 -27
  280. package/dist/node_modules/date-fns/getISOWeekYear.js.map +0 -1
  281. package/dist/node_modules/date-fns/getWeek.cjs +0 -14
  282. package/dist/node_modules/date-fns/getWeek.cjs.map +0 -1
  283. package/dist/node_modules/date-fns/getWeek.js +0 -14
  284. package/dist/node_modules/date-fns/getWeek.js.map +0 -1
  285. package/dist/node_modules/date-fns/getWeekYear.cjs +0 -31
  286. package/dist/node_modules/date-fns/getWeekYear.cjs.map +0 -1
  287. package/dist/node_modules/date-fns/getWeekYear.js +0 -31
  288. package/dist/node_modules/date-fns/getWeekYear.js.map +0 -1
  289. package/dist/node_modules/date-fns/isDate.cjs +0 -8
  290. package/dist/node_modules/date-fns/isDate.cjs.map +0 -1
  291. package/dist/node_modules/date-fns/isDate.js +0 -8
  292. package/dist/node_modules/date-fns/isDate.js.map +0 -1
  293. package/dist/node_modules/date-fns/isValid.cjs +0 -10
  294. package/dist/node_modules/date-fns/isValid.cjs.map +0 -1
  295. package/dist/node_modules/date-fns/isValid.js +0 -10
  296. package/dist/node_modules/date-fns/isValid.js.map +0 -1
  297. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +0 -11
  298. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs.map +0 -1
  299. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -11
  300. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
  301. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +0 -21
  302. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs.map +0 -1
  303. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -21
  304. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
  305. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +0 -44
  306. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.cjs.map +0 -1
  307. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -44
  308. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
  309. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +0 -17
  310. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs.map +0 -1
  311. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -17
  312. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
  313. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +0 -86
  314. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs.map +0 -1
  315. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -86
  316. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
  317. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +0 -37
  318. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs.map +0 -1
  319. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -37
  320. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
  321. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +0 -13
  322. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs.map +0 -1
  323. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -13
  324. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
  325. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.cjs +0 -165
  326. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.cjs.map +0 -1
  327. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -165
  328. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
  329. package/dist/node_modules/date-fns/locale/en-US/_lib/match.cjs +0 -123
  330. package/dist/node_modules/date-fns/locale/en-US/_lib/match.cjs.map +0 -1
  331. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -123
  332. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
  333. package/dist/node_modules/date-fns/locale/en-US.cjs +0 -22
  334. package/dist/node_modules/date-fns/locale/en-US.cjs.map +0 -1
  335. package/dist/node_modules/date-fns/locale/en-US.js +0 -22
  336. package/dist/node_modules/date-fns/locale/en-US.js.map +0 -1
  337. package/dist/node_modules/date-fns/startOfDay.cjs +0 -11
  338. package/dist/node_modules/date-fns/startOfDay.cjs.map +0 -1
  339. package/dist/node_modules/date-fns/startOfDay.js +0 -11
  340. package/dist/node_modules/date-fns/startOfDay.js.map +0 -1
  341. package/dist/node_modules/date-fns/startOfISOWeek.cjs +0 -9
  342. package/dist/node_modules/date-fns/startOfISOWeek.cjs.map +0 -1
  343. package/dist/node_modules/date-fns/startOfISOWeek.js +0 -9
  344. package/dist/node_modules/date-fns/startOfISOWeek.js.map +0 -1
  345. package/dist/node_modules/date-fns/startOfISOWeekYear.cjs +0 -15
  346. package/dist/node_modules/date-fns/startOfISOWeekYear.cjs.map +0 -1
  347. package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -15
  348. package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
  349. package/dist/node_modules/date-fns/startOfWeek.cjs +0 -18
  350. package/dist/node_modules/date-fns/startOfWeek.cjs.map +0 -1
  351. package/dist/node_modules/date-fns/startOfWeek.js +0 -18
  352. package/dist/node_modules/date-fns/startOfWeek.js.map +0 -1
  353. package/dist/node_modules/date-fns/startOfWeekYear.cjs +0 -20
  354. package/dist/node_modules/date-fns/startOfWeekYear.cjs.map +0 -1
  355. package/dist/node_modules/date-fns/startOfWeekYear.js +0 -20
  356. package/dist/node_modules/date-fns/startOfWeekYear.js.map +0 -1
  357. package/dist/node_modules/date-fns/startOfYear.cjs +0 -12
  358. package/dist/node_modules/date-fns/startOfYear.cjs.map +0 -1
  359. package/dist/node_modules/date-fns/startOfYear.js +0 -12
  360. package/dist/node_modules/date-fns/startOfYear.js.map +0 -1
  361. package/dist/node_modules/date-fns/toDate.cjs +0 -9
  362. package/dist/node_modules/date-fns/toDate.cjs.map +0 -1
  363. package/dist/node_modules/date-fns/toDate.js +0 -9
  364. package/dist/node_modules/date-fns/toDate.js.map +0 -1
  365. package/dist/profile.schema-DchVS-Jr.js +0 -21
  366. package/dist/profile.schema-yQuIzngl.cjs +0 -20
@@ -1,653 +0,0 @@
1
- import { getDayOfYear } from "../../getDayOfYear.js";
2
- import { getISOWeek } from "../../getISOWeek.js";
3
- import { getISOWeekYear } from "../../getISOWeekYear.js";
4
- import { getWeek } from "../../getWeek.js";
5
- import { getWeekYear } from "../../getWeekYear.js";
6
- import { addLeadingZeros } from "../addLeadingZeros.js";
7
- import { lightFormatters } from "./lightFormatters.js";
8
- const dayPeriodEnum = {
9
- midnight: "midnight",
10
- noon: "noon",
11
- morning: "morning",
12
- afternoon: "afternoon",
13
- evening: "evening",
14
- night: "night"
15
- };
16
- const formatters = {
17
- // Era
18
- G: function(date, token, localize) {
19
- const era = date.getFullYear() > 0 ? 1 : 0;
20
- switch (token) {
21
- // AD, BC
22
- case "G":
23
- case "GG":
24
- case "GGG":
25
- return localize.era(era, { width: "abbreviated" });
26
- // A, B
27
- case "GGGGG":
28
- return localize.era(era, { width: "narrow" });
29
- // Anno Domini, Before Christ
30
- case "GGGG":
31
- default:
32
- return localize.era(era, { width: "wide" });
33
- }
34
- },
35
- // Year
36
- y: function(date, token, localize) {
37
- if (token === "yo") {
38
- const signedYear = date.getFullYear();
39
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
40
- return localize.ordinalNumber(year, { unit: "year" });
41
- }
42
- return lightFormatters.y(date, token);
43
- },
44
- // Local week-numbering year
45
- Y: function(date, token, localize, options) {
46
- const signedWeekYear = getWeekYear(date, options);
47
- const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
48
- if (token === "YY") {
49
- const twoDigitYear = weekYear % 100;
50
- return addLeadingZeros(twoDigitYear, 2);
51
- }
52
- if (token === "Yo") {
53
- return localize.ordinalNumber(weekYear, { unit: "year" });
54
- }
55
- return addLeadingZeros(weekYear, token.length);
56
- },
57
- // ISO week-numbering year
58
- R: function(date, token) {
59
- const isoWeekYear = getISOWeekYear(date);
60
- return addLeadingZeros(isoWeekYear, token.length);
61
- },
62
- // Extended year. This is a single number designating the year of this calendar system.
63
- // The main difference between `y` and `u` localizers are B.C. years:
64
- // | Year | `y` | `u` |
65
- // |------|-----|-----|
66
- // | AC 1 | 1 | 1 |
67
- // | BC 1 | 1 | 0 |
68
- // | BC 2 | 2 | -1 |
69
- // Also `yy` always returns the last two digits of a year,
70
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
71
- u: function(date, token) {
72
- const year = date.getFullYear();
73
- return addLeadingZeros(year, token.length);
74
- },
75
- // Quarter
76
- Q: function(date, token, localize) {
77
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
78
- switch (token) {
79
- // 1, 2, 3, 4
80
- case "Q":
81
- return String(quarter);
82
- // 01, 02, 03, 04
83
- case "QQ":
84
- return addLeadingZeros(quarter, 2);
85
- // 1st, 2nd, 3rd, 4th
86
- case "Qo":
87
- return localize.ordinalNumber(quarter, { unit: "quarter" });
88
- // Q1, Q2, Q3, Q4
89
- case "QQQ":
90
- return localize.quarter(quarter, {
91
- width: "abbreviated",
92
- context: "formatting"
93
- });
94
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
95
- case "QQQQQ":
96
- return localize.quarter(quarter, {
97
- width: "narrow",
98
- context: "formatting"
99
- });
100
- // 1st quarter, 2nd quarter, ...
101
- case "QQQQ":
102
- default:
103
- return localize.quarter(quarter, {
104
- width: "wide",
105
- context: "formatting"
106
- });
107
- }
108
- },
109
- // Stand-alone quarter
110
- q: function(date, token, localize) {
111
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
112
- switch (token) {
113
- // 1, 2, 3, 4
114
- case "q":
115
- return String(quarter);
116
- // 01, 02, 03, 04
117
- case "qq":
118
- return addLeadingZeros(quarter, 2);
119
- // 1st, 2nd, 3rd, 4th
120
- case "qo":
121
- return localize.ordinalNumber(quarter, { unit: "quarter" });
122
- // Q1, Q2, Q3, Q4
123
- case "qqq":
124
- return localize.quarter(quarter, {
125
- width: "abbreviated",
126
- context: "standalone"
127
- });
128
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
129
- case "qqqqq":
130
- return localize.quarter(quarter, {
131
- width: "narrow",
132
- context: "standalone"
133
- });
134
- // 1st quarter, 2nd quarter, ...
135
- case "qqqq":
136
- default:
137
- return localize.quarter(quarter, {
138
- width: "wide",
139
- context: "standalone"
140
- });
141
- }
142
- },
143
- // Month
144
- M: function(date, token, localize) {
145
- const month = date.getMonth();
146
- switch (token) {
147
- case "M":
148
- case "MM":
149
- return lightFormatters.M(date, token);
150
- // 1st, 2nd, ..., 12th
151
- case "Mo":
152
- return localize.ordinalNumber(month + 1, { unit: "month" });
153
- // Jan, Feb, ..., Dec
154
- case "MMM":
155
- return localize.month(month, {
156
- width: "abbreviated",
157
- context: "formatting"
158
- });
159
- // J, F, ..., D
160
- case "MMMMM":
161
- return localize.month(month, {
162
- width: "narrow",
163
- context: "formatting"
164
- });
165
- // January, February, ..., December
166
- case "MMMM":
167
- default:
168
- return localize.month(month, { width: "wide", context: "formatting" });
169
- }
170
- },
171
- // Stand-alone month
172
- L: function(date, token, localize) {
173
- const month = date.getMonth();
174
- switch (token) {
175
- // 1, 2, ..., 12
176
- case "L":
177
- return String(month + 1);
178
- // 01, 02, ..., 12
179
- case "LL":
180
- return addLeadingZeros(month + 1, 2);
181
- // 1st, 2nd, ..., 12th
182
- case "Lo":
183
- return localize.ordinalNumber(month + 1, { unit: "month" });
184
- // Jan, Feb, ..., Dec
185
- case "LLL":
186
- return localize.month(month, {
187
- width: "abbreviated",
188
- context: "standalone"
189
- });
190
- // J, F, ..., D
191
- case "LLLLL":
192
- return localize.month(month, {
193
- width: "narrow",
194
- context: "standalone"
195
- });
196
- // January, February, ..., December
197
- case "LLLL":
198
- default:
199
- return localize.month(month, { width: "wide", context: "standalone" });
200
- }
201
- },
202
- // Local week of year
203
- w: function(date, token, localize, options) {
204
- const week = getWeek(date, options);
205
- if (token === "wo") {
206
- return localize.ordinalNumber(week, { unit: "week" });
207
- }
208
- return addLeadingZeros(week, token.length);
209
- },
210
- // ISO week of year
211
- I: function(date, token, localize) {
212
- const isoWeek = getISOWeek(date);
213
- if (token === "Io") {
214
- return localize.ordinalNumber(isoWeek, { unit: "week" });
215
- }
216
- return addLeadingZeros(isoWeek, token.length);
217
- },
218
- // Day of the month
219
- d: function(date, token, localize) {
220
- if (token === "do") {
221
- return localize.ordinalNumber(date.getDate(), { unit: "date" });
222
- }
223
- return lightFormatters.d(date, token);
224
- },
225
- // Day of year
226
- D: function(date, token, localize) {
227
- const dayOfYear = getDayOfYear(date);
228
- if (token === "Do") {
229
- return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
230
- }
231
- return addLeadingZeros(dayOfYear, token.length);
232
- },
233
- // Day of week
234
- E: function(date, token, localize) {
235
- const dayOfWeek = date.getDay();
236
- switch (token) {
237
- // Tue
238
- case "E":
239
- case "EE":
240
- case "EEE":
241
- return localize.day(dayOfWeek, {
242
- width: "abbreviated",
243
- context: "formatting"
244
- });
245
- // T
246
- case "EEEEE":
247
- return localize.day(dayOfWeek, {
248
- width: "narrow",
249
- context: "formatting"
250
- });
251
- // Tu
252
- case "EEEEEE":
253
- return localize.day(dayOfWeek, {
254
- width: "short",
255
- context: "formatting"
256
- });
257
- // Tuesday
258
- case "EEEE":
259
- default:
260
- return localize.day(dayOfWeek, {
261
- width: "wide",
262
- context: "formatting"
263
- });
264
- }
265
- },
266
- // Local day of week
267
- e: function(date, token, localize, options) {
268
- const dayOfWeek = date.getDay();
269
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
270
- switch (token) {
271
- // Numerical value (Nth day of week with current locale or weekStartsOn)
272
- case "e":
273
- return String(localDayOfWeek);
274
- // Padded numerical value
275
- case "ee":
276
- return addLeadingZeros(localDayOfWeek, 2);
277
- // 1st, 2nd, ..., 7th
278
- case "eo":
279
- return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
280
- case "eee":
281
- return localize.day(dayOfWeek, {
282
- width: "abbreviated",
283
- context: "formatting"
284
- });
285
- // T
286
- case "eeeee":
287
- return localize.day(dayOfWeek, {
288
- width: "narrow",
289
- context: "formatting"
290
- });
291
- // Tu
292
- case "eeeeee":
293
- return localize.day(dayOfWeek, {
294
- width: "short",
295
- context: "formatting"
296
- });
297
- // Tuesday
298
- case "eeee":
299
- default:
300
- return localize.day(dayOfWeek, {
301
- width: "wide",
302
- context: "formatting"
303
- });
304
- }
305
- },
306
- // Stand-alone local day of week
307
- c: function(date, token, localize, options) {
308
- const dayOfWeek = date.getDay();
309
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
310
- switch (token) {
311
- // Numerical value (same as in `e`)
312
- case "c":
313
- return String(localDayOfWeek);
314
- // Padded numerical value
315
- case "cc":
316
- return addLeadingZeros(localDayOfWeek, token.length);
317
- // 1st, 2nd, ..., 7th
318
- case "co":
319
- return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
320
- case "ccc":
321
- return localize.day(dayOfWeek, {
322
- width: "abbreviated",
323
- context: "standalone"
324
- });
325
- // T
326
- case "ccccc":
327
- return localize.day(dayOfWeek, {
328
- width: "narrow",
329
- context: "standalone"
330
- });
331
- // Tu
332
- case "cccccc":
333
- return localize.day(dayOfWeek, {
334
- width: "short",
335
- context: "standalone"
336
- });
337
- // Tuesday
338
- case "cccc":
339
- default:
340
- return localize.day(dayOfWeek, {
341
- width: "wide",
342
- context: "standalone"
343
- });
344
- }
345
- },
346
- // ISO day of week
347
- i: function(date, token, localize) {
348
- const dayOfWeek = date.getDay();
349
- const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
350
- switch (token) {
351
- // 2
352
- case "i":
353
- return String(isoDayOfWeek);
354
- // 02
355
- case "ii":
356
- return addLeadingZeros(isoDayOfWeek, token.length);
357
- // 2nd
358
- case "io":
359
- return localize.ordinalNumber(isoDayOfWeek, { unit: "day" });
360
- // Tue
361
- case "iii":
362
- return localize.day(dayOfWeek, {
363
- width: "abbreviated",
364
- context: "formatting"
365
- });
366
- // T
367
- case "iiiii":
368
- return localize.day(dayOfWeek, {
369
- width: "narrow",
370
- context: "formatting"
371
- });
372
- // Tu
373
- case "iiiiii":
374
- return localize.day(dayOfWeek, {
375
- width: "short",
376
- context: "formatting"
377
- });
378
- // Tuesday
379
- case "iiii":
380
- default:
381
- return localize.day(dayOfWeek, {
382
- width: "wide",
383
- context: "formatting"
384
- });
385
- }
386
- },
387
- // AM or PM
388
- a: function(date, token, localize) {
389
- const hours = date.getHours();
390
- const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
391
- switch (token) {
392
- case "a":
393
- case "aa":
394
- return localize.dayPeriod(dayPeriodEnumValue, {
395
- width: "abbreviated",
396
- context: "formatting"
397
- });
398
- case "aaa":
399
- return localize.dayPeriod(dayPeriodEnumValue, {
400
- width: "abbreviated",
401
- context: "formatting"
402
- }).toLowerCase();
403
- case "aaaaa":
404
- return localize.dayPeriod(dayPeriodEnumValue, {
405
- width: "narrow",
406
- context: "formatting"
407
- });
408
- case "aaaa":
409
- default:
410
- return localize.dayPeriod(dayPeriodEnumValue, {
411
- width: "wide",
412
- context: "formatting"
413
- });
414
- }
415
- },
416
- // AM, PM, midnight, noon
417
- b: function(date, token, localize) {
418
- const hours = date.getHours();
419
- let dayPeriodEnumValue;
420
- if (hours === 12) {
421
- dayPeriodEnumValue = dayPeriodEnum.noon;
422
- } else if (hours === 0) {
423
- dayPeriodEnumValue = dayPeriodEnum.midnight;
424
- } else {
425
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
426
- }
427
- switch (token) {
428
- case "b":
429
- case "bb":
430
- return localize.dayPeriod(dayPeriodEnumValue, {
431
- width: "abbreviated",
432
- context: "formatting"
433
- });
434
- case "bbb":
435
- return localize.dayPeriod(dayPeriodEnumValue, {
436
- width: "abbreviated",
437
- context: "formatting"
438
- }).toLowerCase();
439
- case "bbbbb":
440
- return localize.dayPeriod(dayPeriodEnumValue, {
441
- width: "narrow",
442
- context: "formatting"
443
- });
444
- case "bbbb":
445
- default:
446
- return localize.dayPeriod(dayPeriodEnumValue, {
447
- width: "wide",
448
- context: "formatting"
449
- });
450
- }
451
- },
452
- // in the morning, in the afternoon, in the evening, at night
453
- B: function(date, token, localize) {
454
- const hours = date.getHours();
455
- let dayPeriodEnumValue;
456
- if (hours >= 17) {
457
- dayPeriodEnumValue = dayPeriodEnum.evening;
458
- } else if (hours >= 12) {
459
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
460
- } else if (hours >= 4) {
461
- dayPeriodEnumValue = dayPeriodEnum.morning;
462
- } else {
463
- dayPeriodEnumValue = dayPeriodEnum.night;
464
- }
465
- switch (token) {
466
- case "B":
467
- case "BB":
468
- case "BBB":
469
- return localize.dayPeriod(dayPeriodEnumValue, {
470
- width: "abbreviated",
471
- context: "formatting"
472
- });
473
- case "BBBBB":
474
- return localize.dayPeriod(dayPeriodEnumValue, {
475
- width: "narrow",
476
- context: "formatting"
477
- });
478
- case "BBBB":
479
- default:
480
- return localize.dayPeriod(dayPeriodEnumValue, {
481
- width: "wide",
482
- context: "formatting"
483
- });
484
- }
485
- },
486
- // Hour [1-12]
487
- h: function(date, token, localize) {
488
- if (token === "ho") {
489
- let hours = date.getHours() % 12;
490
- if (hours === 0) hours = 12;
491
- return localize.ordinalNumber(hours, { unit: "hour" });
492
- }
493
- return lightFormatters.h(date, token);
494
- },
495
- // Hour [0-23]
496
- H: function(date, token, localize) {
497
- if (token === "Ho") {
498
- return localize.ordinalNumber(date.getHours(), { unit: "hour" });
499
- }
500
- return lightFormatters.H(date, token);
501
- },
502
- // Hour [0-11]
503
- K: function(date, token, localize) {
504
- const hours = date.getHours() % 12;
505
- if (token === "Ko") {
506
- return localize.ordinalNumber(hours, { unit: "hour" });
507
- }
508
- return addLeadingZeros(hours, token.length);
509
- },
510
- // Hour [1-24]
511
- k: function(date, token, localize) {
512
- let hours = date.getHours();
513
- if (hours === 0) hours = 24;
514
- if (token === "ko") {
515
- return localize.ordinalNumber(hours, { unit: "hour" });
516
- }
517
- return addLeadingZeros(hours, token.length);
518
- },
519
- // Minute
520
- m: function(date, token, localize) {
521
- if (token === "mo") {
522
- return localize.ordinalNumber(date.getMinutes(), { unit: "minute" });
523
- }
524
- return lightFormatters.m(date, token);
525
- },
526
- // Second
527
- s: function(date, token, localize) {
528
- if (token === "so") {
529
- return localize.ordinalNumber(date.getSeconds(), { unit: "second" });
530
- }
531
- return lightFormatters.s(date, token);
532
- },
533
- // Fraction of second
534
- S: function(date, token) {
535
- return lightFormatters.S(date, token);
536
- },
537
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
538
- X: function(date, token, _localize) {
539
- const timezoneOffset = date.getTimezoneOffset();
540
- if (timezoneOffset === 0) {
541
- return "Z";
542
- }
543
- switch (token) {
544
- // Hours and optional minutes
545
- case "X":
546
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
547
- // Hours, minutes and optional seconds without `:` delimiter
548
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
549
- // so this token always has the same output as `XX`
550
- case "XXXX":
551
- case "XX":
552
- return formatTimezone(timezoneOffset);
553
- // Hours, minutes and optional seconds with `:` delimiter
554
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
555
- // so this token always has the same output as `XXX`
556
- case "XXXXX":
557
- case "XXX":
558
- // Hours and minutes with `:` delimiter
559
- default:
560
- return formatTimezone(timezoneOffset, ":");
561
- }
562
- },
563
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
564
- x: function(date, token, _localize) {
565
- const timezoneOffset = date.getTimezoneOffset();
566
- switch (token) {
567
- // Hours and optional minutes
568
- case "x":
569
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
570
- // Hours, minutes and optional seconds without `:` delimiter
571
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
572
- // so this token always has the same output as `xx`
573
- case "xxxx":
574
- case "xx":
575
- return formatTimezone(timezoneOffset);
576
- // Hours, minutes and optional seconds with `:` delimiter
577
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
578
- // so this token always has the same output as `xxx`
579
- case "xxxxx":
580
- case "xxx":
581
- // Hours and minutes with `:` delimiter
582
- default:
583
- return formatTimezone(timezoneOffset, ":");
584
- }
585
- },
586
- // Timezone (GMT)
587
- O: function(date, token, _localize) {
588
- const timezoneOffset = date.getTimezoneOffset();
589
- switch (token) {
590
- // Short
591
- case "O":
592
- case "OO":
593
- case "OOO":
594
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
595
- // Long
596
- case "OOOO":
597
- default:
598
- return "GMT" + formatTimezone(timezoneOffset, ":");
599
- }
600
- },
601
- // Timezone (specific non-location)
602
- z: function(date, token, _localize) {
603
- const timezoneOffset = date.getTimezoneOffset();
604
- switch (token) {
605
- // Short
606
- case "z":
607
- case "zz":
608
- case "zzz":
609
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
610
- // Long
611
- case "zzzz":
612
- default:
613
- return "GMT" + formatTimezone(timezoneOffset, ":");
614
- }
615
- },
616
- // Seconds timestamp
617
- t: function(date, token, _localize) {
618
- const timestamp = Math.trunc(+date / 1e3);
619
- return addLeadingZeros(timestamp, token.length);
620
- },
621
- // Milliseconds timestamp
622
- T: function(date, token, _localize) {
623
- return addLeadingZeros(+date, token.length);
624
- }
625
- };
626
- function formatTimezoneShort(offset, delimiter = "") {
627
- const sign = offset > 0 ? "-" : "+";
628
- const absOffset = Math.abs(offset);
629
- const hours = Math.trunc(absOffset / 60);
630
- const minutes = absOffset % 60;
631
- if (minutes === 0) {
632
- return sign + String(hours);
633
- }
634
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
635
- }
636
- function formatTimezoneWithOptionalMinutes(offset, delimiter) {
637
- if (offset % 60 === 0) {
638
- const sign = offset > 0 ? "-" : "+";
639
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
640
- }
641
- return formatTimezone(offset, delimiter);
642
- }
643
- function formatTimezone(offset, delimiter = "") {
644
- const sign = offset > 0 ? "-" : "+";
645
- const absOffset = Math.abs(offset);
646
- const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
647
- const minutes = addLeadingZeros(absOffset % 60, 2);
648
- return sign + hours + delimiter + minutes;
649
- }
650
- export {
651
- formatters
652
- };
653
- //# sourceMappingURL=formatters.js.map