@gobolt/genesis 0.0.7 → 0.0.9

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 (254) hide show
  1. package/README.md +18 -2
  2. package/dist/{AntdIcon-Bsnbyy6g.js → AntdIcon-BoLh1dP8.js} +37 -35
  3. package/dist/CheckOutlined-CeTKr6II.js +13 -0
  4. package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-DXCxlIQL.js} +2 -2
  5. package/dist/CloseOutlined-ClXDNn82.js +13 -0
  6. package/dist/{Compact-CJBo3f0u.js → Compact-CGY560JF.js} +45 -53
  7. package/dist/{ContextIsolator-CGkdKtc3.js → ContextIsolator-D5x2Ih51.js} +2 -2
  8. package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-C0Kj5KQV.js} +2 -2
  9. package/dist/{CheckOutlined-DAynWe12.js → KeyCode-DM2sFh3-.js} +10 -20
  10. package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
  11. package/dist/Overflow-PBZD-PFm.js +360 -0
  12. package/dist/PurePanel-BqPLRtc2.js +203 -0
  13. package/dist/SearchOutlined-BP3Z2K6j.js +13 -0
  14. package/dist/{TextArea-3MOYYuAQ.js → TextArea-DKwCct3i.js} +26 -16
  15. package/dist/Typography-aGoDUl4R.js +710 -0
  16. package/dist/bundle.css +1204 -0
  17. package/dist/{button-BNV2qdrP.js → button-CDQgO1OK.js} +200 -197
  18. package/dist/collapse-Dtpt-6W_.js +20 -0
  19. package/dist/components/Badge/Badge.d.ts +6 -0
  20. package/dist/components/Badge/Badge.js +103 -0
  21. package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
  22. package/dist/components/Badge/__tests__/Badge.test.js +18 -0
  23. package/dist/components/Badge/icons/ASN.d.ts +2 -0
  24. package/dist/components/Badge/icons/ASN.js +23 -0
  25. package/dist/components/Badge/icons/Appointment.d.ts +2 -0
  26. package/dist/components/Badge/icons/Appointment.js +23 -0
  27. package/dist/components/Badge/icons/Inventory.d.ts +2 -0
  28. package/dist/components/Badge/icons/Inventory.js +23 -0
  29. package/dist/components/Badge/icons/Parcel.d.ts +2 -0
  30. package/dist/components/Badge/icons/Parcel.js +23 -0
  31. package/dist/components/Badge/icons/Product.d.ts +2 -0
  32. package/dist/components/Badge/icons/Product.js +23 -0
  33. package/dist/components/Badge/icons/Route.d.ts +2 -0
  34. package/dist/components/Badge/icons/Route.js +23 -0
  35. package/dist/components/Badge/icons/Shipment.d.ts +2 -0
  36. package/dist/components/Badge/icons/Shipment.js +23 -0
  37. package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
  38. package/dist/components/Badge/icons/ShoppingCart.js +23 -0
  39. package/dist/components/Badge/icons/System.d.ts +2 -0
  40. package/dist/components/Badge/icons/System.js +23 -0
  41. package/dist/components/Badge/index.d.ts +2 -0
  42. package/dist/components/Badge/index.js +4 -0
  43. package/dist/components/Badge/styles.d.ts +3 -0
  44. package/dist/components/Badge/styles.js +34 -0
  45. package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
  46. package/dist/components/Breadcrumb/Breadcrumb.js +11 -0
  47. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +22 -0
  48. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  49. package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
  50. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +23 -0
  51. package/dist/components/Breadcrumb/index.d.ts +3 -0
  52. package/dist/components/Breadcrumb/index.js +4 -0
  53. package/dist/components/Breadcrumb/styles.d.ts +27 -0
  54. package/dist/components/Breadcrumb/styles.js +2436 -0
  55. package/dist/components/Button/Button.d.ts +14 -0
  56. package/dist/components/Button/Button.js +22 -0
  57. package/dist/components/Button/__tests__/Button.test.js +16 -0
  58. package/dist/components/Button/styles.d.ts +16 -0
  59. package/dist/components/{atoms/button → Button}/styles.js +12 -12
  60. package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
  61. package/dist/components/Checkbox/Checkbox.js +40 -0
  62. package/dist/components/{atoms/checkbox → Checkbox}/__tests__/Checkbox.test.js +1 -1
  63. package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +5 -0
  64. package/dist/components/{atoms/checkbox → Checkbox}/styles.js +97 -96
  65. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +8 -0
  66. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +40 -0
  67. package/dist/components/ErrorBoundaryFallback/index.d.ts +2 -0
  68. package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +22 -21
  69. package/dist/components/Form/Form.d.ts +26 -0
  70. package/dist/components/Form/Form.js +8 -0
  71. package/dist/components/Form/__stories__/FormStory.js +93 -0
  72. package/dist/components/Form/__tests__/form.test.d.ts +1 -0
  73. package/dist/components/Form/__tests__/form.test.js +18 -0
  74. package/dist/components/Form/index.js +4 -0
  75. package/dist/components/Form/styles.d.ts +3 -0
  76. package/dist/components/Form/styles.js +5 -0
  77. package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
  78. package/dist/components/Input/Input.js +19 -0
  79. package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
  80. package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
  81. package/dist/components/Input/__tests__/Input.test.js +24 -0
  82. package/dist/components/{atoms/input → Input}/styles.d.ts +2 -0
  83. package/dist/components/Input/styles.js +529 -0
  84. package/dist/components/Message/Message.d.ts +13 -0
  85. package/dist/components/Message/Message.js +78 -0
  86. package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
  87. package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
  88. package/dist/components/Message/__tests__/Message.test.js +42 -0
  89. package/dist/components/Message/index.d.ts +2 -0
  90. package/dist/components/Message/index.js +4 -0
  91. package/dist/components/Message/styles.d.ts +8 -0
  92. package/dist/components/Message/styles.js +41 -0
  93. package/dist/components/Notification/Notification.d.ts +17 -0
  94. package/dist/components/Notification/Notification.js +1370 -0
  95. package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
  96. package/dist/components/Notification/NotificationRightChevron.js +23 -0
  97. package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
  98. package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
  99. package/dist/components/Notification/__tests__/Notification.test.js +15 -0
  100. package/dist/components/Notification/index.d.ts +2 -0
  101. package/dist/components/Notification/index.js +4 -0
  102. package/dist/components/Notification/styles.d.ts +16 -0
  103. package/dist/components/Notification/styles.js +65 -0
  104. package/dist/components/Radio/Radio.d.ts +14 -0
  105. package/dist/components/Radio/Radio.js +28 -0
  106. package/dist/components/Radio/RadioGroup.d.ts +12 -0
  107. package/dist/components/Radio/RadioGroup.js +33 -0
  108. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
  109. package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
  110. package/dist/components/Radio/__tests__/RadioGroup.test.js +30 -0
  111. package/dist/components/Radio/index.d.ts +2 -0
  112. package/dist/components/Radio/index.js +4 -0
  113. package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
  114. package/dist/components/Radio/states/RadioChecked.js +18 -0
  115. package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
  116. package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
  117. package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
  118. package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
  119. package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
  120. package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
  121. package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
  122. package/dist/components/Radio/states/RadioUnchecked.js +15 -0
  123. package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
  124. package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
  125. package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
  126. package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
  127. package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
  128. package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
  129. package/dist/components/Select/DropdownChevron.d.ts +2 -0
  130. package/dist/components/Select/DropdownChevron.js +23 -0
  131. package/dist/components/Select/Select.d.ts +16 -0
  132. package/dist/components/Select/Select.js +36 -0
  133. package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
  134. package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
  135. package/dist/components/{atoms/select → Select}/__tests__/Select.test.js +1165 -1140
  136. package/dist/components/Select/styles.d.ts +32 -0
  137. package/dist/components/{atoms/select → Select}/styles.js +1517 -1651
  138. package/dist/components/Toast/Toast.d.ts +14 -0
  139. package/dist/components/Toast/Toast.js +19 -0
  140. package/dist/components/Toast/__stories__/Toast.stories.d.ts +16 -0
  141. package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
  142. package/dist/components/Toast/__tests__/Toast.test.js +18 -0
  143. package/dist/components/Toast/index.d.ts +2 -0
  144. package/dist/components/Toast/index.js +4 -0
  145. package/dist/components/Toast/styles.d.ts +10 -0
  146. package/dist/components/Toast/styles.js +54 -0
  147. package/dist/components/Typography/Typography.d.ts +15 -0
  148. package/dist/components/Typography/Typography.js +8 -0
  149. package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +1 -0
  150. package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
  151. package/dist/components/Typography/__tests__/Typography.test.js +23 -0
  152. package/dist/components/Typography/index.js +4 -0
  153. package/dist/components/Typography/styles.d.ts +21 -0
  154. package/dist/components/Typography/styles.js +48 -0
  155. package/dist/components/index.d.ts +26 -14
  156. package/dist/components/index.js +23 -13
  157. package/dist/constants/index.d.ts +104 -0
  158. package/dist/constants/index.js +41 -7
  159. package/dist/{context-CZsFJmh6.js → context-BMW3aJEf.js} +162 -161
  160. package/dist/genesis/GenesisThemeBreakdown.js +54 -24
  161. package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
  162. package/dist/genesis/GenesisThemeDemo.js +3 -4
  163. package/dist/genesis/styles.js +1095 -2186
  164. package/dist/{index-C7kFNqp2.js → index-1CBpubM3.js} +36 -36
  165. package/dist/{index-3MWkSVA1.js → index-BZAhCB_K.js} +6 -5
  166. package/dist/{index-D1v_7IIx.js → index-C0SmxWLS.js} +95 -94
  167. package/dist/index-C8haFnXI.js +1112 -0
  168. package/dist/{index-VDH3iLaC.js → index-CfDY25LP.js} +298 -309
  169. package/dist/{index-SAAXFt-P.js → index-DPW8XdWj.js} +255 -249
  170. package/dist/{index-BQO27mgE.js → index-bKlRxQp4.js} +52 -51
  171. package/dist/index-oK7z6jnz.js +22795 -0
  172. package/dist/index.d.ts +2 -0
  173. package/dist/index.js +31 -18
  174. package/dist/{isVisible-CNQjrJPN.js → isVisible-A-IfeFoT.js} +34 -33
  175. package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-D2FWSwU3.js} +1 -1
  176. package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-B0YTfcV1.js} +16 -26
  177. package/dist/providers/GenesisProvider.js +9 -5
  178. package/dist/providers/ThemeProvider.d.ts +2 -2
  179. package/dist/providers/ThemeProvider.js +4 -1
  180. package/dist/providers/ToastProvider.d.ts +13 -0
  181. package/dist/providers/ToastProvider.js +20 -0
  182. package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
  183. package/dist/providers/index.d.ts +1 -1
  184. package/dist/providers/index.js +4 -4
  185. package/dist/providers/useGenesis.d.ts +7 -0
  186. package/dist/providers/useGenesis.js +6 -0
  187. package/dist/{setup-CMYVZCPF.js → setup-BvfREoHl.js} +6948 -6940
  188. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +22 -16
  189. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +21 -15
  190. package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
  191. package/dist/styles/design-tokens/variables.d.ts +17 -17
  192. package/dist/styles/design-tokens/variables.js +48 -48
  193. package/dist/styles/global-styles.d.ts +1 -0
  194. package/dist/styles/global-styles.js +13 -29
  195. package/dist/styles/theme/genesis-theme.d.ts +3 -0
  196. package/dist/styles/theme/genesis-theme.js +461 -277
  197. package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
  198. package/dist/{Form-Cylpi4M4.js → styles-CT_fyXBd.js} +417 -424
  199. package/dist/test/setup.js +2 -1
  200. package/dist/useLocale-DT-z_vQ6.js +16 -0
  201. package/dist/{useVariants-CEpw6Ww6.js → useVariants-DvhXfgJY.js} +9 -8
  202. package/dist/warning-C63HNL9U.js +789 -0
  203. package/package.json +10 -4
  204. package/dist/Overflow-CP1M4Z0s.js +0 -369
  205. package/dist/components/atoms/button/Button.d.ts +0 -12
  206. package/dist/components/atoms/button/Button.js +0 -27
  207. package/dist/components/atoms/button/styles.d.ts +0 -12
  208. package/dist/components/atoms/checkbox/Checkbox.js +0 -13
  209. package/dist/components/atoms/index.d.ts +0 -1
  210. package/dist/components/atoms/index.js +0 -3
  211. package/dist/components/atoms/input/Input.js +0 -12
  212. package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
  213. package/dist/components/atoms/input/styles.js +0 -415
  214. package/dist/components/atoms/select/Select.d.ts +0 -11
  215. package/dist/components/atoms/select/Select.js +0 -24
  216. package/dist/components/atoms/select/styles.d.ts +0 -15
  217. package/dist/components/atoms/typography/Typography.d.ts +0 -11
  218. package/dist/components/atoms/typography/Typography.js +0 -44
  219. package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
  220. package/dist/components/atoms/typography/index.js +0 -4
  221. package/dist/components/atoms/typography/styles.d.ts +0 -11
  222. package/dist/components/atoms/typography/styles.js +0 -28
  223. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +0 -10
  224. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
  225. package/dist/components/molecules/error-boundary-fallback/index.d.ts +0 -1
  226. package/dist/components/molecules/form/Form.d.ts +0 -15
  227. package/dist/components/molecules/form/Form.js +0 -7
  228. package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
  229. package/dist/components/molecules/form/index.js +0 -4
  230. package/dist/index-BPtFqhcp.js +0 -19110
  231. package/dist/index-BWys7dkb.js +0 -4462
  232. package/dist/styles/theme/global-styles.d.ts +0 -1
  233. package/dist/styles/theme/global-styles.js +0 -35
  234. /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
  235. /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
  236. /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
  237. /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
  238. /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
  239. /package/dist/components/{atoms/button → Button}/index.js +0 -0
  240. /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
  241. /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
  242. /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
  243. /package/dist/components/{atoms/checkbox → Checkbox}/index.js +0 -0
  244. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
  245. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.js +0 -0
  246. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.d.ts +0 -0
  247. /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
  248. /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
  249. /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
  250. /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
  251. /package/dist/components/{atoms/input → Input}/index.js +0 -0
  252. /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
  253. /package/dist/components/{atoms/select → Select}/index.js +0 -0
  254. /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
@@ -0,0 +1,1370 @@
1
+ import { jsxs as X, jsx as b } from "react/jsx-runtime";
2
+ import { SIZE as _, TYPOGRAPHY_VARIANT as S, STATE as x } from "../../constants/index.js";
3
+ import J from "../Badge/Badge.js";
4
+ import "../Breadcrumb/styles.js";
5
+ import "../../providers/ThemeProvider.js";
6
+ import { a as C } from "../../Typography-aGoDUl4R.js";
7
+ import { n as U } from "../../styled-components.browser.esm-CZ1XM4o4.js";
8
+ import "../Button/styles.js";
9
+ import "../Checkbox/styles.js";
10
+ import "../ErrorBoundaryFallback/styles.js";
11
+ import "../Input/styles.js";
12
+ import "../Message/styles.js";
13
+ import "react";
14
+ import "../Select/styles.js";
15
+ import "../Toast/styles.js";
16
+ import { NotificationRow as K, NotificationUnread as Z, NotificationContent as z, NotificationActionButton as tt, ChevronButton as et } from "./styles.js";
17
+ import nt from "./NotificationRightChevron.js";
18
+ function d(t) {
19
+ const e = Object.prototype.toString.call(t);
20
+ return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
21
+ }
22
+ function D(t, e) {
23
+ return t instanceof Date ? new t.constructor(e) : new Date(e);
24
+ }
25
+ const A = 6048e5, rt = 864e5, W = 43200, H = 1440;
26
+ let at = {};
27
+ function T() {
28
+ return at;
29
+ }
30
+ function p(t, e) {
31
+ var i, u, f, h;
32
+ const n = T(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((u = (i = e == null ? void 0 : e.locale) == null ? void 0 : i.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((h = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : h.weekStartsOn) ?? 0, a = d(t), o = a.getDay(), s = (o < r ? 7 : 0) + o - r;
33
+ return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
34
+ }
35
+ function F(t) {
36
+ return p(t, { weekStartsOn: 1 });
37
+ }
38
+ function B(t) {
39
+ const e = d(t), n = e.getFullYear(), r = D(t, 0);
40
+ r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
41
+ const a = F(r), o = D(t, 0);
42
+ o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0);
43
+ const s = F(o);
44
+ return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= s.getTime() ? n : n - 1;
45
+ }
46
+ function R(t) {
47
+ const e = d(t);
48
+ return e.setHours(0, 0, 0, 0), e;
49
+ }
50
+ function N(t) {
51
+ const e = d(t), n = new Date(
52
+ Date.UTC(
53
+ e.getFullYear(),
54
+ e.getMonth(),
55
+ e.getDate(),
56
+ e.getHours(),
57
+ e.getMinutes(),
58
+ e.getSeconds(),
59
+ e.getMilliseconds()
60
+ )
61
+ );
62
+ return n.setUTCFullYear(e.getFullYear()), +t - +n;
63
+ }
64
+ function ot(t, e) {
65
+ const n = R(t), r = R(e), a = +n - N(n), o = +r - N(r);
66
+ return Math.round((a - o) / rt);
67
+ }
68
+ function it(t) {
69
+ const e = B(t), n = D(t, 0);
70
+ return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), F(n);
71
+ }
72
+ function Y(t, e) {
73
+ const n = d(t), r = d(e), a = n.getTime() - r.getTime();
74
+ return a < 0 ? -1 : a > 0 ? 1 : a;
75
+ }
76
+ function st(t) {
77
+ return D(t, Date.now());
78
+ }
79
+ function ct(t) {
80
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
81
+ }
82
+ function ut(t) {
83
+ if (!ct(t) && typeof t != "number")
84
+ return !1;
85
+ const e = d(t);
86
+ return !isNaN(Number(e));
87
+ }
88
+ function dt(t, e) {
89
+ const n = d(t), r = d(e), a = n.getFullYear() - r.getFullYear(), o = n.getMonth() - r.getMonth();
90
+ return a * 12 + o;
91
+ }
92
+ function ft(t) {
93
+ return (e) => {
94
+ const r = (t ? Math[t] : Math.trunc)(e);
95
+ return r === 0 ? 0 : r;
96
+ };
97
+ }
98
+ function ht(t, e) {
99
+ return +d(t) - +d(e);
100
+ }
101
+ function lt(t) {
102
+ const e = d(t);
103
+ return e.setHours(23, 59, 59, 999), e;
104
+ }
105
+ function mt(t) {
106
+ const e = d(t), n = e.getMonth();
107
+ return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
108
+ }
109
+ function gt(t) {
110
+ const e = d(t);
111
+ return +lt(e) == +mt(e);
112
+ }
113
+ function wt(t, e) {
114
+ const n = d(t), r = d(e), a = Y(n, r), o = Math.abs(
115
+ dt(n, r)
116
+ );
117
+ let s;
118
+ if (o < 1)
119
+ s = 0;
120
+ else {
121
+ n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * o);
122
+ let i = Y(n, r) === -a;
123
+ gt(d(t)) && o === 1 && Y(t, r) === 1 && (i = !1), s = a * (o - Number(i));
124
+ }
125
+ return s === 0 ? 0 : s;
126
+ }
127
+ function yt(t, e, n) {
128
+ const r = ht(t, e) / 1e3;
129
+ return ft(n == null ? void 0 : n.roundingMethod)(r);
130
+ }
131
+ function bt(t) {
132
+ const e = d(t), n = D(t, 0);
133
+ return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
134
+ }
135
+ const Mt = {
136
+ lessThanXSeconds: {
137
+ one: "less than a second",
138
+ other: "less than {{count}} seconds"
139
+ },
140
+ xSeconds: {
141
+ one: "1 second",
142
+ other: "{{count}} seconds"
143
+ },
144
+ halfAMinute: "half a minute",
145
+ lessThanXMinutes: {
146
+ one: "less than a minute",
147
+ other: "less than {{count}} minutes"
148
+ },
149
+ xMinutes: {
150
+ one: "1 minute",
151
+ other: "{{count}} minutes"
152
+ },
153
+ aboutXHours: {
154
+ one: "about 1 hour",
155
+ other: "about {{count}} hours"
156
+ },
157
+ xHours: {
158
+ one: "1 hour",
159
+ other: "{{count}} hours"
160
+ },
161
+ xDays: {
162
+ one: "1 day",
163
+ other: "{{count}} days"
164
+ },
165
+ aboutXWeeks: {
166
+ one: "about 1 week",
167
+ other: "about {{count}} weeks"
168
+ },
169
+ xWeeks: {
170
+ one: "1 week",
171
+ other: "{{count}} weeks"
172
+ },
173
+ aboutXMonths: {
174
+ one: "about 1 month",
175
+ other: "about {{count}} months"
176
+ },
177
+ xMonths: {
178
+ one: "1 month",
179
+ other: "{{count}} months"
180
+ },
181
+ aboutXYears: {
182
+ one: "about 1 year",
183
+ other: "about {{count}} years"
184
+ },
185
+ xYears: {
186
+ one: "1 year",
187
+ other: "{{count}} years"
188
+ },
189
+ overXYears: {
190
+ one: "over 1 year",
191
+ other: "over {{count}} years"
192
+ },
193
+ almostXYears: {
194
+ one: "almost 1 year",
195
+ other: "almost {{count}} years"
196
+ }
197
+ }, Dt = (t, e, n) => {
198
+ let r;
199
+ const a = Mt[t];
200
+ return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
201
+ };
202
+ function q(t) {
203
+ return (e = {}) => {
204
+ const n = e.width ? String(e.width) : t.defaultWidth;
205
+ return t.formats[n] || t.formats[t.defaultWidth];
206
+ };
207
+ }
208
+ const Ot = {
209
+ full: "EEEE, MMMM do, y",
210
+ long: "MMMM do, y",
211
+ medium: "MMM d, y",
212
+ short: "MM/dd/yyyy"
213
+ }, Pt = {
214
+ full: "h:mm:ss a zzzz",
215
+ long: "h:mm:ss a z",
216
+ medium: "h:mm:ss a",
217
+ short: "h:mm a"
218
+ }, xt = {
219
+ full: "{{date}} 'at' {{time}}",
220
+ long: "{{date}} 'at' {{time}}",
221
+ medium: "{{date}}, {{time}}",
222
+ short: "{{date}}, {{time}}"
223
+ }, vt = {
224
+ date: q({
225
+ formats: Ot,
226
+ defaultWidth: "full"
227
+ }),
228
+ time: q({
229
+ formats: Pt,
230
+ defaultWidth: "full"
231
+ }),
232
+ dateTime: q({
233
+ formats: xt,
234
+ defaultWidth: "full"
235
+ })
236
+ }, kt = {
237
+ lastWeek: "'last' eeee 'at' p",
238
+ yesterday: "'yesterday at' p",
239
+ today: "'today at' p",
240
+ tomorrow: "'tomorrow at' p",
241
+ nextWeek: "eeee 'at' p",
242
+ other: "P"
243
+ }, pt = (t, e, n, r) => kt[t];
244
+ function v(t) {
245
+ return (e, n) => {
246
+ const r = n != null && n.context ? String(n.context) : "standalone";
247
+ let a;
248
+ if (r === "formatting" && t.formattingValues) {
249
+ const s = t.defaultFormattingWidth || t.defaultWidth, i = n != null && n.width ? String(n.width) : s;
250
+ a = t.formattingValues[i] || t.formattingValues[s];
251
+ } else {
252
+ const s = t.defaultWidth, i = n != null && n.width ? String(n.width) : t.defaultWidth;
253
+ a = t.values[i] || t.values[s];
254
+ }
255
+ const o = t.argumentCallback ? t.argumentCallback(e) : e;
256
+ return a[o];
257
+ };
258
+ }
259
+ const Tt = {
260
+ narrow: ["B", "A"],
261
+ abbreviated: ["BC", "AD"],
262
+ wide: ["Before Christ", "Anno Domini"]
263
+ }, St = {
264
+ narrow: ["1", "2", "3", "4"],
265
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
266
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
267
+ }, Wt = {
268
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
269
+ abbreviated: [
270
+ "Jan",
271
+ "Feb",
272
+ "Mar",
273
+ "Apr",
274
+ "May",
275
+ "Jun",
276
+ "Jul",
277
+ "Aug",
278
+ "Sep",
279
+ "Oct",
280
+ "Nov",
281
+ "Dec"
282
+ ],
283
+ wide: [
284
+ "January",
285
+ "February",
286
+ "March",
287
+ "April",
288
+ "May",
289
+ "June",
290
+ "July",
291
+ "August",
292
+ "September",
293
+ "October",
294
+ "November",
295
+ "December"
296
+ ]
297
+ }, Yt = {
298
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
299
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
300
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
301
+ wide: [
302
+ "Sunday",
303
+ "Monday",
304
+ "Tuesday",
305
+ "Wednesday",
306
+ "Thursday",
307
+ "Friday",
308
+ "Saturday"
309
+ ]
310
+ }, Ft = {
311
+ narrow: {
312
+ am: "a",
313
+ pm: "p",
314
+ midnight: "mi",
315
+ noon: "n",
316
+ morning: "morning",
317
+ afternoon: "afternoon",
318
+ evening: "evening",
319
+ night: "night"
320
+ },
321
+ abbreviated: {
322
+ am: "AM",
323
+ pm: "PM",
324
+ midnight: "midnight",
325
+ noon: "noon",
326
+ morning: "morning",
327
+ afternoon: "afternoon",
328
+ evening: "evening",
329
+ night: "night"
330
+ },
331
+ wide: {
332
+ am: "a.m.",
333
+ pm: "p.m.",
334
+ midnight: "midnight",
335
+ noon: "noon",
336
+ morning: "morning",
337
+ afternoon: "afternoon",
338
+ evening: "evening",
339
+ night: "night"
340
+ }
341
+ }, Nt = {
342
+ narrow: {
343
+ am: "a",
344
+ pm: "p",
345
+ midnight: "mi",
346
+ noon: "n",
347
+ morning: "in the morning",
348
+ afternoon: "in the afternoon",
349
+ evening: "in the evening",
350
+ night: "at night"
351
+ },
352
+ abbreviated: {
353
+ am: "AM",
354
+ pm: "PM",
355
+ midnight: "midnight",
356
+ noon: "noon",
357
+ morning: "in the morning",
358
+ afternoon: "in the afternoon",
359
+ evening: "in the evening",
360
+ night: "at night"
361
+ },
362
+ wide: {
363
+ am: "a.m.",
364
+ pm: "p.m.",
365
+ midnight: "midnight",
366
+ noon: "noon",
367
+ morning: "in the morning",
368
+ afternoon: "in the afternoon",
369
+ evening: "in the evening",
370
+ night: "at night"
371
+ }
372
+ }, Et = (t, e) => {
373
+ const n = Number(t), r = n % 100;
374
+ if (r > 20 || r < 10)
375
+ switch (r % 10) {
376
+ case 1:
377
+ return n + "st";
378
+ case 2:
379
+ return n + "nd";
380
+ case 3:
381
+ return n + "rd";
382
+ }
383
+ return n + "th";
384
+ }, Ct = {
385
+ ordinalNumber: Et,
386
+ era: v({
387
+ values: Tt,
388
+ defaultWidth: "wide"
389
+ }),
390
+ quarter: v({
391
+ values: St,
392
+ defaultWidth: "wide",
393
+ argumentCallback: (t) => t - 1
394
+ }),
395
+ month: v({
396
+ values: Wt,
397
+ defaultWidth: "wide"
398
+ }),
399
+ day: v({
400
+ values: Yt,
401
+ defaultWidth: "wide"
402
+ }),
403
+ dayPeriod: v({
404
+ values: Ft,
405
+ defaultWidth: "wide",
406
+ formattingValues: Nt,
407
+ defaultFormattingWidth: "wide"
408
+ })
409
+ };
410
+ function k(t) {
411
+ return (e, n = {}) => {
412
+ const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], o = e.match(a);
413
+ if (!o)
414
+ return null;
415
+ const s = o[0], i = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], u = Array.isArray(i) ? Xt(i, (w) => w.test(s)) : (
416
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
417
+ qt(i, (w) => w.test(s))
418
+ );
419
+ let f;
420
+ f = t.valueCallback ? t.valueCallback(u) : u, f = n.valueCallback ? (
421
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
422
+ n.valueCallback(f)
423
+ ) : f;
424
+ const h = e.slice(s.length);
425
+ return { value: f, rest: h };
426
+ };
427
+ }
428
+ function qt(t, e) {
429
+ for (const n in t)
430
+ if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
431
+ return n;
432
+ }
433
+ function Xt(t, e) {
434
+ for (let n = 0; n < t.length; n++)
435
+ if (e(t[n]))
436
+ return n;
437
+ }
438
+ function _t(t) {
439
+ return (e, n = {}) => {
440
+ const r = e.match(t.matchPattern);
441
+ if (!r) return null;
442
+ const a = r[0], o = e.match(t.parsePattern);
443
+ if (!o) return null;
444
+ let s = t.valueCallback ? t.valueCallback(o[0]) : o[0];
445
+ s = n.valueCallback ? n.valueCallback(s) : s;
446
+ const i = e.slice(a.length);
447
+ return { value: s, rest: i };
448
+ };
449
+ }
450
+ const Ht = /^(\d+)(th|st|nd|rd)?/i, Rt = /\d+/i, Lt = {
451
+ narrow: /^(b|a)/i,
452
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
453
+ wide: /^(before christ|before common era|anno domini|common era)/i
454
+ }, jt = {
455
+ any: [/^b/i, /^(a|c)/i]
456
+ }, It = {
457
+ narrow: /^[1234]/i,
458
+ abbreviated: /^q[1234]/i,
459
+ wide: /^[1234](th|st|nd|rd)? quarter/i
460
+ }, Qt = {
461
+ any: [/1/i, /2/i, /3/i, /4/i]
462
+ }, At = {
463
+ narrow: /^[jfmasond]/i,
464
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
465
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
466
+ }, Bt = {
467
+ narrow: [
468
+ /^j/i,
469
+ /^f/i,
470
+ /^m/i,
471
+ /^a/i,
472
+ /^m/i,
473
+ /^j/i,
474
+ /^j/i,
475
+ /^a/i,
476
+ /^s/i,
477
+ /^o/i,
478
+ /^n/i,
479
+ /^d/i
480
+ ],
481
+ any: [
482
+ /^ja/i,
483
+ /^f/i,
484
+ /^mar/i,
485
+ /^ap/i,
486
+ /^may/i,
487
+ /^jun/i,
488
+ /^jul/i,
489
+ /^au/i,
490
+ /^s/i,
491
+ /^o/i,
492
+ /^n/i,
493
+ /^d/i
494
+ ]
495
+ }, Gt = {
496
+ narrow: /^[smtwf]/i,
497
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
498
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
499
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
500
+ }, Vt = {
501
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
502
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
503
+ }, $t = {
504
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
505
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
506
+ }, Jt = {
507
+ any: {
508
+ am: /^a/i,
509
+ pm: /^p/i,
510
+ midnight: /^mi/i,
511
+ noon: /^no/i,
512
+ morning: /morning/i,
513
+ afternoon: /afternoon/i,
514
+ evening: /evening/i,
515
+ night: /night/i
516
+ }
517
+ }, Ut = {
518
+ ordinalNumber: _t({
519
+ matchPattern: Ht,
520
+ parsePattern: Rt,
521
+ valueCallback: (t) => parseInt(t, 10)
522
+ }),
523
+ era: k({
524
+ matchPatterns: Lt,
525
+ defaultMatchWidth: "wide",
526
+ parsePatterns: jt,
527
+ defaultParseWidth: "any"
528
+ }),
529
+ quarter: k({
530
+ matchPatterns: It,
531
+ defaultMatchWidth: "wide",
532
+ parsePatterns: Qt,
533
+ defaultParseWidth: "any",
534
+ valueCallback: (t) => t + 1
535
+ }),
536
+ month: k({
537
+ matchPatterns: At,
538
+ defaultMatchWidth: "wide",
539
+ parsePatterns: Bt,
540
+ defaultParseWidth: "any"
541
+ }),
542
+ day: k({
543
+ matchPatterns: Gt,
544
+ defaultMatchWidth: "wide",
545
+ parsePatterns: Vt,
546
+ defaultParseWidth: "any"
547
+ }),
548
+ dayPeriod: k({
549
+ matchPatterns: $t,
550
+ defaultMatchWidth: "any",
551
+ parsePatterns: Jt,
552
+ defaultParseWidth: "any"
553
+ })
554
+ }, G = {
555
+ code: "en-US",
556
+ formatDistance: Dt,
557
+ formatLong: vt,
558
+ formatRelative: pt,
559
+ localize: Ct,
560
+ match: Ut,
561
+ options: {
562
+ weekStartsOn: 0,
563
+ firstWeekContainsDate: 1
564
+ }
565
+ };
566
+ function Kt(t) {
567
+ const e = d(t);
568
+ return ot(e, bt(e)) + 1;
569
+ }
570
+ function Zt(t) {
571
+ const e = d(t), n = +F(e) - +it(e);
572
+ return Math.round(n / A) + 1;
573
+ }
574
+ function V(t, e) {
575
+ var h, w, l, y;
576
+ const n = d(t), r = n.getFullYear(), a = T(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((w = (h = e == null ? void 0 : e.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((y = (l = a.locale) == null ? void 0 : l.options) == null ? void 0 : y.firstWeekContainsDate) ?? 1, s = D(t, 0);
577
+ s.setFullYear(r + 1, 0, o), s.setHours(0, 0, 0, 0);
578
+ const i = p(s, e), u = D(t, 0);
579
+ u.setFullYear(r, 0, o), u.setHours(0, 0, 0, 0);
580
+ const f = p(u, e);
581
+ return n.getTime() >= i.getTime() ? r + 1 : n.getTime() >= f.getTime() ? r : r - 1;
582
+ }
583
+ function zt(t, e) {
584
+ var i, u, f, h;
585
+ const n = T(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((u = (i = e == null ? void 0 : e.locale) == null ? void 0 : i.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((h = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, a = V(t, e), o = D(t, 0);
586
+ return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), p(o, e);
587
+ }
588
+ function te(t, e) {
589
+ const n = d(t), r = +p(n, e) - +zt(n, e);
590
+ return Math.round(r / A) + 1;
591
+ }
592
+ function c(t, e) {
593
+ const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
594
+ return n + r;
595
+ }
596
+ const M = {
597
+ // Year
598
+ y(t, e) {
599
+ const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
600
+ return c(e === "yy" ? r % 100 : r, e.length);
601
+ },
602
+ // Month
603
+ M(t, e) {
604
+ const n = t.getMonth();
605
+ return e === "M" ? String(n + 1) : c(n + 1, 2);
606
+ },
607
+ // Day of the month
608
+ d(t, e) {
609
+ return c(t.getDate(), e.length);
610
+ },
611
+ // AM or PM
612
+ a(t, e) {
613
+ const n = t.getHours() / 12 >= 1 ? "pm" : "am";
614
+ switch (e) {
615
+ case "a":
616
+ case "aa":
617
+ return n.toUpperCase();
618
+ case "aaa":
619
+ return n;
620
+ case "aaaaa":
621
+ return n[0];
622
+ case "aaaa":
623
+ default:
624
+ return n === "am" ? "a.m." : "p.m.";
625
+ }
626
+ },
627
+ // Hour [1-12]
628
+ h(t, e) {
629
+ return c(t.getHours() % 12 || 12, e.length);
630
+ },
631
+ // Hour [0-23]
632
+ H(t, e) {
633
+ return c(t.getHours(), e.length);
634
+ },
635
+ // Minute
636
+ m(t, e) {
637
+ return c(t.getMinutes(), e.length);
638
+ },
639
+ // Second
640
+ s(t, e) {
641
+ return c(t.getSeconds(), e.length);
642
+ },
643
+ // Fraction of second
644
+ S(t, e) {
645
+ const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
646
+ r * Math.pow(10, n - 3)
647
+ );
648
+ return c(a, e.length);
649
+ }
650
+ }, P = {
651
+ am: "am",
652
+ pm: "pm",
653
+ midnight: "midnight",
654
+ noon: "noon",
655
+ morning: "morning",
656
+ afternoon: "afternoon",
657
+ evening: "evening",
658
+ night: "night"
659
+ }, L = {
660
+ // Era
661
+ G: function(t, e, n) {
662
+ const r = t.getFullYear() > 0 ? 1 : 0;
663
+ switch (e) {
664
+ case "G":
665
+ case "GG":
666
+ case "GGG":
667
+ return n.era(r, { width: "abbreviated" });
668
+ case "GGGGG":
669
+ return n.era(r, { width: "narrow" });
670
+ case "GGGG":
671
+ default:
672
+ return n.era(r, { width: "wide" });
673
+ }
674
+ },
675
+ // Year
676
+ y: function(t, e, n) {
677
+ if (e === "yo") {
678
+ const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
679
+ return n.ordinalNumber(a, { unit: "year" });
680
+ }
681
+ return M.y(t, e);
682
+ },
683
+ // Local week-numbering year
684
+ Y: function(t, e, n, r) {
685
+ const a = V(t, r), o = a > 0 ? a : 1 - a;
686
+ if (e === "YY") {
687
+ const s = o % 100;
688
+ return c(s, 2);
689
+ }
690
+ return e === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : c(o, e.length);
691
+ },
692
+ // ISO week-numbering year
693
+ R: function(t, e) {
694
+ const n = B(t);
695
+ return c(n, e.length);
696
+ },
697
+ // Extended year. This is a single number designating the year of this calendar system.
698
+ // The main difference between `y` and `u` localizers are B.C. years:
699
+ // | Year | `y` | `u` |
700
+ // |------|-----|-----|
701
+ // | AC 1 | 1 | 1 |
702
+ // | BC 1 | 1 | 0 |
703
+ // | BC 2 | 2 | -1 |
704
+ // Also `yy` always returns the last two digits of a year,
705
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
706
+ u: function(t, e) {
707
+ const n = t.getFullYear();
708
+ return c(n, e.length);
709
+ },
710
+ // Quarter
711
+ Q: function(t, e, n) {
712
+ const r = Math.ceil((t.getMonth() + 1) / 3);
713
+ switch (e) {
714
+ case "Q":
715
+ return String(r);
716
+ case "QQ":
717
+ return c(r, 2);
718
+ case "Qo":
719
+ return n.ordinalNumber(r, { unit: "quarter" });
720
+ case "QQQ":
721
+ return n.quarter(r, {
722
+ width: "abbreviated",
723
+ context: "formatting"
724
+ });
725
+ case "QQQQQ":
726
+ return n.quarter(r, {
727
+ width: "narrow",
728
+ context: "formatting"
729
+ });
730
+ case "QQQQ":
731
+ default:
732
+ return n.quarter(r, {
733
+ width: "wide",
734
+ context: "formatting"
735
+ });
736
+ }
737
+ },
738
+ // Stand-alone quarter
739
+ q: function(t, e, n) {
740
+ const r = Math.ceil((t.getMonth() + 1) / 3);
741
+ switch (e) {
742
+ case "q":
743
+ return String(r);
744
+ case "qq":
745
+ return c(r, 2);
746
+ case "qo":
747
+ return n.ordinalNumber(r, { unit: "quarter" });
748
+ case "qqq":
749
+ return n.quarter(r, {
750
+ width: "abbreviated",
751
+ context: "standalone"
752
+ });
753
+ case "qqqqq":
754
+ return n.quarter(r, {
755
+ width: "narrow",
756
+ context: "standalone"
757
+ });
758
+ case "qqqq":
759
+ default:
760
+ return n.quarter(r, {
761
+ width: "wide",
762
+ context: "standalone"
763
+ });
764
+ }
765
+ },
766
+ // Month
767
+ M: function(t, e, n) {
768
+ const r = t.getMonth();
769
+ switch (e) {
770
+ case "M":
771
+ case "MM":
772
+ return M.M(t, e);
773
+ case "Mo":
774
+ return n.ordinalNumber(r + 1, { unit: "month" });
775
+ case "MMM":
776
+ return n.month(r, {
777
+ width: "abbreviated",
778
+ context: "formatting"
779
+ });
780
+ case "MMMMM":
781
+ return n.month(r, {
782
+ width: "narrow",
783
+ context: "formatting"
784
+ });
785
+ case "MMMM":
786
+ default:
787
+ return n.month(r, { width: "wide", context: "formatting" });
788
+ }
789
+ },
790
+ // Stand-alone month
791
+ L: function(t, e, n) {
792
+ const r = t.getMonth();
793
+ switch (e) {
794
+ case "L":
795
+ return String(r + 1);
796
+ case "LL":
797
+ return c(r + 1, 2);
798
+ case "Lo":
799
+ return n.ordinalNumber(r + 1, { unit: "month" });
800
+ case "LLL":
801
+ return n.month(r, {
802
+ width: "abbreviated",
803
+ context: "standalone"
804
+ });
805
+ case "LLLLL":
806
+ return n.month(r, {
807
+ width: "narrow",
808
+ context: "standalone"
809
+ });
810
+ case "LLLL":
811
+ default:
812
+ return n.month(r, { width: "wide", context: "standalone" });
813
+ }
814
+ },
815
+ // Local week of year
816
+ w: function(t, e, n, r) {
817
+ const a = te(t, r);
818
+ return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : c(a, e.length);
819
+ },
820
+ // ISO week of year
821
+ I: function(t, e, n) {
822
+ const r = Zt(t);
823
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : c(r, e.length);
824
+ },
825
+ // Day of the month
826
+ d: function(t, e, n) {
827
+ return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : M.d(t, e);
828
+ },
829
+ // Day of year
830
+ D: function(t, e, n) {
831
+ const r = Kt(t);
832
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : c(r, e.length);
833
+ },
834
+ // Day of week
835
+ E: function(t, e, n) {
836
+ const r = t.getDay();
837
+ switch (e) {
838
+ case "E":
839
+ case "EE":
840
+ case "EEE":
841
+ return n.day(r, {
842
+ width: "abbreviated",
843
+ context: "formatting"
844
+ });
845
+ case "EEEEE":
846
+ return n.day(r, {
847
+ width: "narrow",
848
+ context: "formatting"
849
+ });
850
+ case "EEEEEE":
851
+ return n.day(r, {
852
+ width: "short",
853
+ context: "formatting"
854
+ });
855
+ case "EEEE":
856
+ default:
857
+ return n.day(r, {
858
+ width: "wide",
859
+ context: "formatting"
860
+ });
861
+ }
862
+ },
863
+ // Local day of week
864
+ e: function(t, e, n, r) {
865
+ const a = t.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
866
+ switch (e) {
867
+ case "e":
868
+ return String(o);
869
+ case "ee":
870
+ return c(o, 2);
871
+ case "eo":
872
+ return n.ordinalNumber(o, { unit: "day" });
873
+ case "eee":
874
+ return n.day(a, {
875
+ width: "abbreviated",
876
+ context: "formatting"
877
+ });
878
+ case "eeeee":
879
+ return n.day(a, {
880
+ width: "narrow",
881
+ context: "formatting"
882
+ });
883
+ case "eeeeee":
884
+ return n.day(a, {
885
+ width: "short",
886
+ context: "formatting"
887
+ });
888
+ case "eeee":
889
+ default:
890
+ return n.day(a, {
891
+ width: "wide",
892
+ context: "formatting"
893
+ });
894
+ }
895
+ },
896
+ // Stand-alone local day of week
897
+ c: function(t, e, n, r) {
898
+ const a = t.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7;
899
+ switch (e) {
900
+ case "c":
901
+ return String(o);
902
+ case "cc":
903
+ return c(o, e.length);
904
+ case "co":
905
+ return n.ordinalNumber(o, { unit: "day" });
906
+ case "ccc":
907
+ return n.day(a, {
908
+ width: "abbreviated",
909
+ context: "standalone"
910
+ });
911
+ case "ccccc":
912
+ return n.day(a, {
913
+ width: "narrow",
914
+ context: "standalone"
915
+ });
916
+ case "cccccc":
917
+ return n.day(a, {
918
+ width: "short",
919
+ context: "standalone"
920
+ });
921
+ case "cccc":
922
+ default:
923
+ return n.day(a, {
924
+ width: "wide",
925
+ context: "standalone"
926
+ });
927
+ }
928
+ },
929
+ // ISO day of week
930
+ i: function(t, e, n) {
931
+ const r = t.getDay(), a = r === 0 ? 7 : r;
932
+ switch (e) {
933
+ case "i":
934
+ return String(a);
935
+ case "ii":
936
+ return c(a, e.length);
937
+ case "io":
938
+ return n.ordinalNumber(a, { unit: "day" });
939
+ case "iii":
940
+ return n.day(r, {
941
+ width: "abbreviated",
942
+ context: "formatting"
943
+ });
944
+ case "iiiii":
945
+ return n.day(r, {
946
+ width: "narrow",
947
+ context: "formatting"
948
+ });
949
+ case "iiiiii":
950
+ return n.day(r, {
951
+ width: "short",
952
+ context: "formatting"
953
+ });
954
+ case "iiii":
955
+ default:
956
+ return n.day(r, {
957
+ width: "wide",
958
+ context: "formatting"
959
+ });
960
+ }
961
+ },
962
+ // AM or PM
963
+ a: function(t, e, n) {
964
+ const a = t.getHours() / 12 >= 1 ? "pm" : "am";
965
+ switch (e) {
966
+ case "a":
967
+ case "aa":
968
+ return n.dayPeriod(a, {
969
+ width: "abbreviated",
970
+ context: "formatting"
971
+ });
972
+ case "aaa":
973
+ return n.dayPeriod(a, {
974
+ width: "abbreviated",
975
+ context: "formatting"
976
+ }).toLowerCase();
977
+ case "aaaaa":
978
+ return n.dayPeriod(a, {
979
+ width: "narrow",
980
+ context: "formatting"
981
+ });
982
+ case "aaaa":
983
+ default:
984
+ return n.dayPeriod(a, {
985
+ width: "wide",
986
+ context: "formatting"
987
+ });
988
+ }
989
+ },
990
+ // AM, PM, midnight, noon
991
+ b: function(t, e, n) {
992
+ const r = t.getHours();
993
+ let a;
994
+ switch (r === 12 ? a = P.noon : r === 0 ? a = P.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
995
+ case "b":
996
+ case "bb":
997
+ return n.dayPeriod(a, {
998
+ width: "abbreviated",
999
+ context: "formatting"
1000
+ });
1001
+ case "bbb":
1002
+ return n.dayPeriod(a, {
1003
+ width: "abbreviated",
1004
+ context: "formatting"
1005
+ }).toLowerCase();
1006
+ case "bbbbb":
1007
+ return n.dayPeriod(a, {
1008
+ width: "narrow",
1009
+ context: "formatting"
1010
+ });
1011
+ case "bbbb":
1012
+ default:
1013
+ return n.dayPeriod(a, {
1014
+ width: "wide",
1015
+ context: "formatting"
1016
+ });
1017
+ }
1018
+ },
1019
+ // in the morning, in the afternoon, in the evening, at night
1020
+ B: function(t, e, n) {
1021
+ const r = t.getHours();
1022
+ let a;
1023
+ switch (r >= 17 ? a = P.evening : r >= 12 ? a = P.afternoon : r >= 4 ? a = P.morning : a = P.night, e) {
1024
+ case "B":
1025
+ case "BB":
1026
+ case "BBB":
1027
+ return n.dayPeriod(a, {
1028
+ width: "abbreviated",
1029
+ context: "formatting"
1030
+ });
1031
+ case "BBBBB":
1032
+ return n.dayPeriod(a, {
1033
+ width: "narrow",
1034
+ context: "formatting"
1035
+ });
1036
+ case "BBBB":
1037
+ default:
1038
+ return n.dayPeriod(a, {
1039
+ width: "wide",
1040
+ context: "formatting"
1041
+ });
1042
+ }
1043
+ },
1044
+ // Hour [1-12]
1045
+ h: function(t, e, n) {
1046
+ if (e === "ho") {
1047
+ let r = t.getHours() % 12;
1048
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1049
+ }
1050
+ return M.h(t, e);
1051
+ },
1052
+ // Hour [0-23]
1053
+ H: function(t, e, n) {
1054
+ return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : M.H(t, e);
1055
+ },
1056
+ // Hour [0-11]
1057
+ K: function(t, e, n) {
1058
+ const r = t.getHours() % 12;
1059
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : c(r, e.length);
1060
+ },
1061
+ // Hour [1-24]
1062
+ k: function(t, e, n) {
1063
+ let r = t.getHours();
1064
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : c(r, e.length);
1065
+ },
1066
+ // Minute
1067
+ m: function(t, e, n) {
1068
+ return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : M.m(t, e);
1069
+ },
1070
+ // Second
1071
+ s: function(t, e, n) {
1072
+ return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : M.s(t, e);
1073
+ },
1074
+ // Fraction of second
1075
+ S: function(t, e) {
1076
+ return M.S(t, e);
1077
+ },
1078
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1079
+ X: function(t, e, n) {
1080
+ const r = t.getTimezoneOffset();
1081
+ if (r === 0)
1082
+ return "Z";
1083
+ switch (e) {
1084
+ case "X":
1085
+ return I(r);
1086
+ case "XXXX":
1087
+ case "XX":
1088
+ return O(r);
1089
+ case "XXXXX":
1090
+ case "XXX":
1091
+ default:
1092
+ return O(r, ":");
1093
+ }
1094
+ },
1095
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1096
+ x: function(t, e, n) {
1097
+ const r = t.getTimezoneOffset();
1098
+ switch (e) {
1099
+ case "x":
1100
+ return I(r);
1101
+ case "xxxx":
1102
+ case "xx":
1103
+ return O(r);
1104
+ case "xxxxx":
1105
+ case "xxx":
1106
+ default:
1107
+ return O(r, ":");
1108
+ }
1109
+ },
1110
+ // Timezone (GMT)
1111
+ O: function(t, e, n) {
1112
+ const r = t.getTimezoneOffset();
1113
+ switch (e) {
1114
+ case "O":
1115
+ case "OO":
1116
+ case "OOO":
1117
+ return "GMT" + j(r, ":");
1118
+ case "OOOO":
1119
+ default:
1120
+ return "GMT" + O(r, ":");
1121
+ }
1122
+ },
1123
+ // Timezone (specific non-location)
1124
+ z: function(t, e, n) {
1125
+ const r = t.getTimezoneOffset();
1126
+ switch (e) {
1127
+ case "z":
1128
+ case "zz":
1129
+ case "zzz":
1130
+ return "GMT" + j(r, ":");
1131
+ case "zzzz":
1132
+ default:
1133
+ return "GMT" + O(r, ":");
1134
+ }
1135
+ },
1136
+ // Seconds timestamp
1137
+ t: function(t, e, n) {
1138
+ const r = Math.trunc(t.getTime() / 1e3);
1139
+ return c(r, e.length);
1140
+ },
1141
+ // Milliseconds timestamp
1142
+ T: function(t, e, n) {
1143
+ const r = t.getTime();
1144
+ return c(r, e.length);
1145
+ }
1146
+ };
1147
+ function j(t, e = "") {
1148
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), o = r % 60;
1149
+ return o === 0 ? n + String(a) : n + String(a) + e + c(o, 2);
1150
+ }
1151
+ function I(t, e) {
1152
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + c(Math.abs(t) / 60, 2) : O(t, e);
1153
+ }
1154
+ function O(t, e = "") {
1155
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = c(Math.trunc(r / 60), 2), o = c(r % 60, 2);
1156
+ return n + a + e + o;
1157
+ }
1158
+ const Q = (t, e) => {
1159
+ switch (t) {
1160
+ case "P":
1161
+ return e.date({ width: "short" });
1162
+ case "PP":
1163
+ return e.date({ width: "medium" });
1164
+ case "PPP":
1165
+ return e.date({ width: "long" });
1166
+ case "PPPP":
1167
+ default:
1168
+ return e.date({ width: "full" });
1169
+ }
1170
+ }, $ = (t, e) => {
1171
+ switch (t) {
1172
+ case "p":
1173
+ return e.time({ width: "short" });
1174
+ case "pp":
1175
+ return e.time({ width: "medium" });
1176
+ case "ppp":
1177
+ return e.time({ width: "long" });
1178
+ case "pppp":
1179
+ default:
1180
+ return e.time({ width: "full" });
1181
+ }
1182
+ }, ee = (t, e) => {
1183
+ const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1184
+ if (!a)
1185
+ return Q(t, e);
1186
+ let o;
1187
+ switch (r) {
1188
+ case "P":
1189
+ o = e.dateTime({ width: "short" });
1190
+ break;
1191
+ case "PP":
1192
+ o = e.dateTime({ width: "medium" });
1193
+ break;
1194
+ case "PPP":
1195
+ o = e.dateTime({ width: "long" });
1196
+ break;
1197
+ case "PPPP":
1198
+ default:
1199
+ o = e.dateTime({ width: "full" });
1200
+ break;
1201
+ }
1202
+ return o.replace("{{date}}", Q(r, e)).replace("{{time}}", $(a, e));
1203
+ }, ne = {
1204
+ p: $,
1205
+ P: ee
1206
+ }, re = /^D+$/, ae = /^Y+$/, oe = ["D", "DD", "YY", "YYYY"];
1207
+ function ie(t) {
1208
+ return re.test(t);
1209
+ }
1210
+ function se(t) {
1211
+ return ae.test(t);
1212
+ }
1213
+ function ce(t, e, n) {
1214
+ const r = ue(t, e, n);
1215
+ if (console.warn(r), oe.includes(t)) throw new RangeError(r);
1216
+ }
1217
+ function ue(t, e, n) {
1218
+ const r = t[0] === "Y" ? "years" : "days of the month";
1219
+ return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1220
+ }
1221
+ const de = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fe = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, he = /^'([^]*?)'?$/, le = /''/g, me = /[a-zA-Z]/;
1222
+ function ge(t, e, n) {
1223
+ var h, w, l, y;
1224
+ const r = T(), a = r.locale ?? G, o = r.firstWeekContainsDate ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, s = r.weekStartsOn ?? ((y = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : y.weekStartsOn) ?? 0, i = d(t);
1225
+ if (!ut(i))
1226
+ throw new RangeError("Invalid time value");
1227
+ let u = e.match(fe).map((m) => {
1228
+ const g = m[0];
1229
+ if (g === "p" || g === "P") {
1230
+ const E = ne[g];
1231
+ return E(m, a.formatLong);
1232
+ }
1233
+ return m;
1234
+ }).join("").match(de).map((m) => {
1235
+ if (m === "''")
1236
+ return { isToken: !1, value: "'" };
1237
+ const g = m[0];
1238
+ if (g === "'")
1239
+ return { isToken: !1, value: we(m) };
1240
+ if (L[g])
1241
+ return { isToken: !0, value: m };
1242
+ if (g.match(me))
1243
+ throw new RangeError(
1244
+ "Format string contains an unescaped latin alphabet character `" + g + "`"
1245
+ );
1246
+ return { isToken: !1, value: m };
1247
+ });
1248
+ a.localize.preprocessor && (u = a.localize.preprocessor(i, u));
1249
+ const f = {
1250
+ firstWeekContainsDate: o,
1251
+ weekStartsOn: s,
1252
+ locale: a
1253
+ };
1254
+ return u.map((m) => {
1255
+ if (!m.isToken) return m.value;
1256
+ const g = m.value;
1257
+ (se(g) || ie(g)) && ce(g, e, String(t));
1258
+ const E = L[g[0]];
1259
+ return E(i, g, a.localize, f);
1260
+ }).join("");
1261
+ }
1262
+ function we(t) {
1263
+ const e = t.match(he);
1264
+ return e ? e[1].replace(le, "'") : t;
1265
+ }
1266
+ function ye(t, e, n) {
1267
+ const r = T(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? G, o = 2520, s = Y(t, e);
1268
+ if (isNaN(s))
1269
+ throw new RangeError("Invalid time value");
1270
+ const i = Object.assign({}, n, {
1271
+ addSuffix: n == null ? void 0 : n.addSuffix,
1272
+ comparison: s
1273
+ });
1274
+ let u, f;
1275
+ s > 0 ? (u = d(e), f = d(t)) : (u = d(t), f = d(e));
1276
+ const h = yt(f, u), w = (N(f) - N(u)) / 1e3, l = Math.round((h - w) / 60);
1277
+ let y;
1278
+ if (l < 2)
1279
+ return n != null && n.includeSeconds ? h < 5 ? a.formatDistance("lessThanXSeconds", 5, i) : h < 10 ? a.formatDistance("lessThanXSeconds", 10, i) : h < 20 ? a.formatDistance("lessThanXSeconds", 20, i) : h < 40 ? a.formatDistance("halfAMinute", 0, i) : h < 60 ? a.formatDistance("lessThanXMinutes", 1, i) : a.formatDistance("xMinutes", 1, i) : l === 0 ? a.formatDistance("lessThanXMinutes", 1, i) : a.formatDistance("xMinutes", l, i);
1280
+ if (l < 45)
1281
+ return a.formatDistance("xMinutes", l, i);
1282
+ if (l < 90)
1283
+ return a.formatDistance("aboutXHours", 1, i);
1284
+ if (l < H) {
1285
+ const m = Math.round(l / 60);
1286
+ return a.formatDistance("aboutXHours", m, i);
1287
+ } else {
1288
+ if (l < o)
1289
+ return a.formatDistance("xDays", 1, i);
1290
+ if (l < W) {
1291
+ const m = Math.round(l / H);
1292
+ return a.formatDistance("xDays", m, i);
1293
+ } else if (l < W * 2)
1294
+ return y = Math.round(l / W), a.formatDistance("aboutXMonths", y, i);
1295
+ }
1296
+ if (y = wt(f, u), y < 12) {
1297
+ const m = Math.round(l / W);
1298
+ return a.formatDistance("xMonths", m, i);
1299
+ } else {
1300
+ const m = y % 12, g = Math.trunc(y / 12);
1301
+ return m < 3 ? a.formatDistance("aboutXYears", g, i) : m < 9 ? a.formatDistance("overXYears", g, i) : a.formatDistance("almostXYears", g + 1, i);
1302
+ }
1303
+ }
1304
+ function be(t, e) {
1305
+ return ye(t, st(t), e);
1306
+ }
1307
+ const Me = (t, e) => {
1308
+ switch (t) {
1309
+ case x.warning:
1310
+ return e.colors.status.warning.onsurface;
1311
+ case x.error:
1312
+ return e.colors.status.error.onsurface;
1313
+ case x.success:
1314
+ return e.colors.status.success.onsurface;
1315
+ case x.generic:
1316
+ return e.colors.status.generic.onsurface;
1317
+ case x.info:
1318
+ default:
1319
+ return e.colors.status.info.onsurface;
1320
+ }
1321
+ }, _e = ({
1322
+ message: t,
1323
+ state: e = x.info,
1324
+ date: n,
1325
+ action: r,
1326
+ onArrowClick: a,
1327
+ size: o = _.standard,
1328
+ isUnread: s = !0,
1329
+ hasFormattedDate: i = !1
1330
+ }) => {
1331
+ const u = U();
1332
+ Me(e, u), u.colors.interactive.utility.border, u.colors.interactive.utility.onsurface;
1333
+ const f = " • ", h = n ? ge(new Date(n), "MMM d, h:mma") : "", w = n ? be(new Date(n), { addSuffix: !0 }) : "", l = i ? `${w}${f}${h}` : w, y = o === _.small ? S.body1 : S.body2;
1334
+ return /* @__PURE__ */ X(K, { state: e, size: o, isUnread: s, children: [
1335
+ s ? /* @__PURE__ */ b(Z, { state: e, size: o }) : /* @__PURE__ */ b("div", { style: { width: 8 } }),
1336
+ /* @__PURE__ */ b(J, { state: e }),
1337
+ /* @__PURE__ */ b(z, { size: o, children: /* @__PURE__ */ X("div", { children: [
1338
+ /* @__PURE__ */ b(
1339
+ C,
1340
+ {
1341
+ variant: S.body3,
1342
+ color: u.colors.onsurface["copy-dark"],
1343
+ isText: !0,
1344
+ children: t
1345
+ }
1346
+ ),
1347
+ /* @__PURE__ */ b("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ b(
1348
+ C,
1349
+ {
1350
+ variant: y,
1351
+ color: u.colors.onsurface["copy-light"],
1352
+ isText: !0,
1353
+ children: l
1354
+ }
1355
+ ) })
1356
+ ] }) }),
1357
+ r ? /* @__PURE__ */ b(tt, { onClick: r.onClick, children: /* @__PURE__ */ b(
1358
+ C,
1359
+ {
1360
+ variant: S.body1,
1361
+ isText: !0,
1362
+ children: r.label
1363
+ }
1364
+ ) }) : null,
1365
+ a ? /* @__PURE__ */ b(et, { onClick: a, children: /* @__PURE__ */ b(nt, {}) }) : null
1366
+ ] });
1367
+ };
1368
+ export {
1369
+ _e as default
1370
+ };