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