@alfadocs/ui-kit 0.25.1 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/_chunks/{agenda-card-BmpaUG1h.js → agenda-card-CznB7K8e.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-DiInnVqk.js → agenda-tray-C_bha7oK.js} +4 -4
  3. package/dist/_chunks/{ai-prompt-input-B5MdixzR.js → ai-prompt-input-Bka3jX3i.js} +2 -2
  4. package/dist/_chunks/{alia-sidebar-CUi2UCbY.js → alia-sidebar-CnvXq95r.js} +92 -109
  5. package/dist/_chunks/{audio-recorder-D4xM3H5i.js → audio-recorder-OB6IV9B1.js} +2 -2
  6. package/dist/_chunks/{autocomplete-C7xq06bP.js → autocomplete-CUh0f7Dj.js} +2 -2
  7. package/dist/_chunks/{avatar-BpFohgWG.js → avatar-D_H4emLo.js} +7 -7
  8. package/dist/_chunks/{benefit-card-DXmrAyfn.js → benefit-card-CjYM8vNr.js} +29 -29
  9. package/dist/_chunks/booking-CXngC-1u.js +1743 -0
  10. package/dist/_chunks/{calendar-zy0tUUVG.js → calendar-9eOXumpH.js} +113 -142
  11. package/dist/_chunks/{card-C353dU-H.js → card-DKTMLVrw.js} +11 -11
  12. package/dist/_chunks/{carousel.agent-DnPiqijR.js → carousel.agent-C9swH-Uf.js} +2 -2
  13. package/dist/_chunks/{chat-input-B3XmFGDw.js → chat-input-BfDcz1Yi.js} +2 -2
  14. package/dist/_chunks/{chat-message-W3k8rLOA.js → chat-message-fg221-yx.js} +2 -2
  15. package/dist/_chunks/{command-palette-DkL-aW4O.js → command-palette-11BieSNq.js} +2 -2
  16. package/dist/_chunks/{contact-card-CjG7c-1q.js → contact-card-CeEfEAxh.js} +2 -2
  17. package/dist/_chunks/{date-picker-BIoSLRly.js → date-picker-D0Ry1dMz.js} +26 -27
  18. package/dist/_chunks/{date-range-picker-9gANFNG9.js → date-range-picker-DYgHzMOo.js} +19 -20
  19. package/dist/_chunks/{date-time-picker-DG7BiGdb.js → date-time-picker-CGmGtcyc.js} +10 -11
  20. package/dist/_chunks/{description-list-Bsga4IW8.js → description-list-yl3y3QKg.js} +34 -24
  21. package/dist/_chunks/{dialog-DUomPCRS.js → dialog-BBXqpZIt.js} +2 -2
  22. package/dist/_chunks/{editable-currency-cell-renderer-DJB5MxAI.js → editable-currency-cell-renderer-DSReCae7.js} +7 -7
  23. package/dist/_chunks/{empty-state-3CLJIXSj.js → empty-state-BLy7tigq.js} +13 -33
  24. package/dist/_chunks/eye-LHlSU38h.js +21 -0
  25. package/dist/_chunks/{freemium-paywall-CM6V1zNf.js → freemium-paywall-B9c8Ylww.js} +11 -11
  26. package/dist/_chunks/{header-DqmKROIY.js → header-B8V_sNPy.js} +2 -2
  27. package/dist/_chunks/icon-button-BRHSSFmZ.js +70 -0
  28. package/dist/_chunks/{isSameDay-ecuM8PBB.js → isSameDay-DHG8Xade.js} +4 -4
  29. package/dist/_chunks/{key-value-pair-DBuOCtIc.js → key-value-pair-CqeKiP__.js} +2 -2
  30. package/dist/_chunks/{locale-picker-BxEUUPW7.js → locale-picker-BHxbTNmR.js} +297 -208
  31. package/dist/_chunks/{map-view-CcwycFQX.js → map-view-DyB8tr6c.js} +9 -9
  32. package/dist/_chunks/{matrix-rain-CRPMXcVx.js → matrix-rain-sDOUUwZp.js} +35 -35
  33. package/dist/_chunks/{message-card-i61k1TGc.js → message-card-DjRtA8GG.js} +3 -3
  34. package/dist/_chunks/{message-tray-DrV7G-wR.js → message-tray-DfsAMncP.js} +3 -3
  35. package/dist/_chunks/monitor-D-SFdbrU.js +16 -0
  36. package/dist/_chunks/{notification-card-ejOw5g6g.js → notification-card-B_847w5g.js} +3 -3
  37. package/dist/_chunks/{notification-tray-D_69dXFY.js → notification-tray-6f7smmT1.js} +22 -19
  38. package/dist/_chunks/patient-shell-Bq8CjRYF.js +173 -0
  39. package/dist/_chunks/{payment-form-F7uh0Rqr.js → payment-form-Ds3rxvad.js} +2 -2
  40. package/dist/_chunks/{pdf-viewer-CuYaVR1I.js → pdf-viewer-CIuaocnq.js} +2 -2
  41. package/dist/_chunks/{popover--derJ_wq.js → popover-D0slaBB9.js} +17 -13
  42. package/dist/_chunks/{privacy-lock-BKsI6ReN.js → privacy-lock-BI4vi9Ud.js} +2 -2
  43. package/dist/_chunks/{public-header.agent-BQ3r6Hgq.js → public-header.agent-5U3S9QiC.js} +49 -41
  44. package/dist/_chunks/react-day-picker-D3yzgvDB.js +3127 -0
  45. package/dist/_chunks/{recaptcha-widget-Kp1XntuE.js → recaptcha-widget-BtBNb6tB.js} +2 -2
  46. package/dist/_chunks/{search-bar-DORSAzNt.js → search-bar-BRMW1-WG.js} +2 -2
  47. package/dist/_chunks/{search-input-BtEJAJHa.js → search-input-CIA6pPfn.js} +2 -2
  48. package/dist/_chunks/{sheet-BT0izeoI.js → sheet-D8M8hf8B.js} +2 -2
  49. package/dist/_chunks/{sign-in-with-alfadocs-button-4zZC-I6y.js → sign-in-with-alfadocs-button-BI0fVonM.js} +2 -2
  50. package/dist/_chunks/{slot-grid-CgpYgBkW.js → slot-grid-DoodeQGZ.js} +4 -4
  51. package/dist/_chunks/sparkles-CuYXqQLg.js +23 -0
  52. package/dist/_chunks/{spinner-DirtWZNG.js → spinner-CCByyvcb.js} +2 -2
  53. package/dist/_chunks/stepper-accordion-BfS6lUB9.js +257 -0
  54. package/dist/_chunks/stepper-accordion.agent-C4quJ-MD.js +71 -0
  55. package/dist/_chunks/stethoscope-B8kpbtjh.js +35 -0
  56. package/dist/_chunks/{sun-Eweh5fvi.js → sun-BuXE0xUS.js} +3 -15
  57. package/dist/_chunks/{task-tray-B3A2fRGR.js → task-tray-Bcmrrs8m.js} +3 -3
  58. package/dist/_chunks/{theme-toggle-FrotC2VI.js → theme-toggle-nPzb378f.js} +37 -36
  59. package/dist/_chunks/{timeline-jmd7lfDf.js → timeline-CR7HjZCK.js} +3 -3
  60. package/dist/_chunks/{toast.agent-32WNQ-_x.js → toast.agent-CTF6nIj5.js} +2 -2
  61. package/dist/_chunks/{transcript-panel-DUrjx5sa.js → transcript-panel-QUQ9XJmf.js} +2 -2
  62. package/dist/_chunks/{use-password-requirements-C9vKBSVn.js → use-password-requirements-E0sSfx5X.js} +38 -53
  63. package/dist/_chunks/use-theme-C2dHKUAN.js +145 -0
  64. package/dist/_chunks/{workflow-map-BR6txfFX.js → workflow-map-BKsKdYvZ.js} +5 -5
  65. package/dist/agent-catalog.json +56 -51
  66. package/dist/components/agenda-card/index.js +1 -1
  67. package/dist/components/agenda-tray/index.js +1 -1
  68. package/dist/components/ai-prompt-input/index.js +1 -1
  69. package/dist/components/audio-recorder/index.js +1 -1
  70. package/dist/components/autocomplete/index.js +1 -1
  71. package/dist/components/avatar/index.js +1 -1
  72. package/dist/components/benefit-card/index.js +1 -1
  73. package/dist/components/booking/booking.agent.d.ts +4 -0
  74. package/dist/components/booking/booking.d.ts +91 -0
  75. package/dist/components/booking/index.d.ts +4 -0
  76. package/dist/components/booking/index.js +6 -0
  77. package/dist/components/button/index.js +1 -1
  78. package/dist/components/calendar/index.js +1 -1
  79. package/dist/components/card/index.js +1 -1
  80. package/dist/components/carousel/index.js +1 -1
  81. package/dist/components/chat-input/index.js +1 -1
  82. package/dist/components/chat-message/index.js +1 -1
  83. package/dist/components/command-palette/index.js +1 -1
  84. package/dist/components/contact-card/index.js +1 -1
  85. package/dist/components/data-table/index.js +1 -1
  86. package/dist/components/date-picker/index.js +1 -1
  87. package/dist/components/date-range-picker/index.js +1 -1
  88. package/dist/components/date-time-picker/index.js +1 -1
  89. package/dist/components/description-list/index.js +1 -1
  90. package/dist/components/dialog/index.js +1 -1
  91. package/dist/components/empty-state/index.js +1 -1
  92. package/dist/components/freemium-paywall/index.js +1 -1
  93. package/dist/components/header/index.js +1 -1
  94. package/dist/components/header-settings/index.js +16 -15
  95. package/dist/components/icon-button/index.js +1 -1
  96. package/dist/components/index.d.ts +1 -1
  97. package/dist/components/key-value-pair/index.js +1 -1
  98. package/dist/components/locale-picker/index.js +1 -1
  99. package/dist/components/map-view/index.js +1 -1
  100. package/dist/components/matrix-rain/index.js +1 -1
  101. package/dist/components/message-card/index.js +1 -1
  102. package/dist/components/message-tray/index.js +1 -1
  103. package/dist/components/notification-card/index.js +1 -1
  104. package/dist/components/notification-tray/index.js +1 -1
  105. package/dist/components/password-input/index.js +1 -1
  106. package/dist/components/payment-form/index.js +1 -1
  107. package/dist/components/pdf-viewer/index.js +1 -1
  108. package/dist/components/popover/index.js +1 -1
  109. package/dist/components/privacy-lock/index.js +1 -1
  110. package/dist/components/public-header/index.js +1 -1
  111. package/dist/components/recaptcha-widget/index.js +1 -1
  112. package/dist/components/search-bar/index.js +1 -1
  113. package/dist/components/search-input/index.js +1 -1
  114. package/dist/components/sheet/index.js +1 -1
  115. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  116. package/dist/components/slot-grid/index.js +1 -1
  117. package/dist/components/spinner/index.js +1 -1
  118. package/dist/components/stepper-accordion/index.js +4 -3
  119. package/dist/components/task-tray/index.js +1 -1
  120. package/dist/components/theme-toggle/index.js +1 -1
  121. package/dist/components/timeline/index.js +1 -1
  122. package/dist/components/toast/index.js +1 -1
  123. package/dist/components/transcript-panel/index.js +1 -1
  124. package/dist/components/workflow/index.js +1 -1
  125. package/dist/hooks/index.js +1 -1
  126. package/dist/i18n/config.js +1090 -46
  127. package/dist/i18n/locales/ar.d.ts +58 -0
  128. package/dist/i18n/locales/de.d.ts +58 -0
  129. package/dist/i18n/locales/el.d.ts +58 -0
  130. package/dist/i18n/locales/es.d.ts +58 -0
  131. package/dist/i18n/locales/fr.d.ts +58 -0
  132. package/dist/i18n/locales/hi.d.ts +58 -0
  133. package/dist/i18n/locales/ja.d.ts +58 -0
  134. package/dist/i18n/locales/nl.d.ts +58 -0
  135. package/dist/i18n/locales/pl.d.ts +58 -0
  136. package/dist/i18n/locales/pt.d.ts +58 -0
  137. package/dist/i18n/locales/ro.d.ts +58 -0
  138. package/dist/i18n/locales/ru.d.ts +58 -0
  139. package/dist/i18n/locales/sq.d.ts +58 -0
  140. package/dist/i18n/locales/sv.d.ts +58 -0
  141. package/dist/i18n/locales/tr.d.ts +58 -0
  142. package/dist/i18n/locales/zh.d.ts +58 -0
  143. package/dist/i18n/resources.d.ts +116 -0
  144. package/dist/index.js +270 -269
  145. package/dist/locales/ar.json +59 -1
  146. package/dist/locales/de.json +59 -1
  147. package/dist/locales/el.json +59 -1
  148. package/dist/locales/en.json +59 -1
  149. package/dist/locales/es.json +59 -1
  150. package/dist/locales/fr.json +59 -1
  151. package/dist/locales/hi.json +59 -1
  152. package/dist/locales/it.json +59 -1
  153. package/dist/locales/ja.json +59 -1
  154. package/dist/locales/nl.json +59 -1
  155. package/dist/locales/pl.json +59 -1
  156. package/dist/locales/pt.json +59 -1
  157. package/dist/locales/ro.json +59 -1
  158. package/dist/locales/ru.json +59 -1
  159. package/dist/locales/sq.json +59 -1
  160. package/dist/locales/sv.json +59 -1
  161. package/dist/locales/tr.json +59 -1
  162. package/dist/locales/zh.json +59 -1
  163. package/dist/patterns/alia-assistant/index.js +1 -1
  164. package/dist/patterns/patient-shell/index.js +1 -1
  165. package/dist/tokens.css +1 -1
  166. package/package.json +5 -1
  167. package/dist/_chunks/icon-button-C4CGcYuz.js +0 -54
  168. package/dist/_chunks/isSameMonth-5wNF2f4I.js +0 -1307
  169. package/dist/_chunks/patient-shell-B164drIa.js +0 -173
  170. package/dist/_chunks/react-day-picker-C5F3-TTX.js +0 -1827
  171. package/dist/_chunks/stepper-C-sIpRRU.js +0 -7
  172. package/dist/_chunks/stepper-accordion.agent-ckKYZCIP.js +0 -322
  173. package/dist/_chunks/stepper-calendar-BLOJUE0-.js +0 -648
  174. package/dist/_chunks/use-theme-B1cwAXJR.js +0 -145
  175. package/dist/components/stepper-calendar/index.d.ts +0 -4
  176. package/dist/components/stepper-calendar/index.js +0 -6
  177. package/dist/components/stepper-calendar/stepper-calendar.agent.d.ts +0 -4
  178. package/dist/components/stepper-calendar/stepper-calendar.d.ts +0 -62
@@ -1,1307 +0,0 @@
1
- import { t as m, c as w, n as L, s as N, b as R, d as G } from "./isSameDay-ecuM8PBB.js";
2
- function ze(n, e, t) {
3
- const a = m(n, t == null ? void 0 : t.in);
4
- return isNaN(e) ? w((t == null ? void 0 : t.in) || n, NaN) : (e && a.setDate(a.getDate() + e), a);
5
- }
6
- function Ke(n, e, t) {
7
- const a = m(n, t == null ? void 0 : t.in);
8
- if (isNaN(e)) return w(n, NaN);
9
- if (!e)
10
- return a;
11
- const r = a.getDate(), i = w(n, a.getTime());
12
- i.setMonth(a.getMonth() + e + 1, 0);
13
- const s = i.getDate();
14
- return r >= s ? i : (a.setFullYear(
15
- i.getFullYear(),
16
- i.getMonth(),
17
- r
18
- ), a);
19
- }
20
- let V = {};
21
- function W() {
22
- return V;
23
- }
24
- function x(n, e) {
25
- var c, o, d, f;
26
- const t = W(), a = (e == null ? void 0 : e.weekStartsOn) ?? ((o = (c = e == null ? void 0 : e.locale) == null ? void 0 : c.options) == null ? void 0 : o.weekStartsOn) ?? t.weekStartsOn ?? ((f = (d = t.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? 0, r = m(n, e == null ? void 0 : e.in), i = r.getDay(), s = (i < a ? 7 : 0) + i - a;
27
- return r.setDate(r.getDate() - s), r.setHours(0, 0, 0, 0), r;
28
- }
29
- function v(n, e) {
30
- return x(n, { ...e, weekStartsOn: 1 });
31
- }
32
- function j(n, e) {
33
- const t = m(n, e == null ? void 0 : e.in), a = t.getFullYear(), r = w(t, 0);
34
- r.setFullYear(a + 1, 0, 4), r.setHours(0, 0, 0, 0);
35
- const i = v(r), s = w(t, 0);
36
- s.setFullYear(a, 0, 4), s.setHours(0, 0, 0, 0);
37
- const c = v(s);
38
- return t.getTime() >= i.getTime() ? a + 1 : t.getTime() >= c.getTime() ? a : a - 1;
39
- }
40
- function q(n) {
41
- const e = m(n), t = new Date(
42
- Date.UTC(
43
- e.getFullYear(),
44
- e.getMonth(),
45
- e.getDate(),
46
- e.getHours(),
47
- e.getMinutes(),
48
- e.getSeconds(),
49
- e.getMilliseconds()
50
- )
51
- );
52
- return t.setUTCFullYear(e.getFullYear()), +n - +t;
53
- }
54
- function I(n, e, t) {
55
- const [a, r] = L(
56
- t == null ? void 0 : t.in,
57
- n,
58
- e
59
- ), i = N(a), s = N(r), c = +i - q(i), o = +s - q(s);
60
- return Math.round((c - o) / R);
61
- }
62
- function J(n, e) {
63
- const t = j(n, e), a = w(n, 0);
64
- return a.setFullYear(t, 0, 4), a.setHours(0, 0, 0, 0), v(a);
65
- }
66
- function $(n) {
67
- return n instanceof Date || typeof n == "object" && Object.prototype.toString.call(n) === "[object Date]";
68
- }
69
- function U(n) {
70
- return !(!$(n) && typeof n != "number" || isNaN(+m(n)));
71
- }
72
- function Ze(n, e) {
73
- const t = m(n, e == null ? void 0 : e.in);
74
- return t.setDate(1), t.setHours(0, 0, 0, 0), t;
75
- }
76
- function z(n, e) {
77
- const t = m(n, e == null ? void 0 : e.in);
78
- return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
79
- }
80
- const K = {
81
- lessThanXSeconds: {
82
- one: "less than a second",
83
- other: "less than {{count}} seconds"
84
- },
85
- xSeconds: {
86
- one: "1 second",
87
- other: "{{count}} seconds"
88
- },
89
- halfAMinute: "half a minute",
90
- lessThanXMinutes: {
91
- one: "less than a minute",
92
- other: "less than {{count}} minutes"
93
- },
94
- xMinutes: {
95
- one: "1 minute",
96
- other: "{{count}} minutes"
97
- },
98
- aboutXHours: {
99
- one: "about 1 hour",
100
- other: "about {{count}} hours"
101
- },
102
- xHours: {
103
- one: "1 hour",
104
- other: "{{count}} hours"
105
- },
106
- xDays: {
107
- one: "1 day",
108
- other: "{{count}} days"
109
- },
110
- aboutXWeeks: {
111
- one: "about 1 week",
112
- other: "about {{count}} weeks"
113
- },
114
- xWeeks: {
115
- one: "1 week",
116
- other: "{{count}} weeks"
117
- },
118
- aboutXMonths: {
119
- one: "about 1 month",
120
- other: "about {{count}} months"
121
- },
122
- xMonths: {
123
- one: "1 month",
124
- other: "{{count}} months"
125
- },
126
- aboutXYears: {
127
- one: "about 1 year",
128
- other: "about {{count}} years"
129
- },
130
- xYears: {
131
- one: "1 year",
132
- other: "{{count}} years"
133
- },
134
- overXYears: {
135
- one: "over 1 year",
136
- other: "over {{count}} years"
137
- },
138
- almostXYears: {
139
- one: "almost 1 year",
140
- other: "almost {{count}} years"
141
- }
142
- }, Z = (n, e, t) => {
143
- let a;
144
- const r = K[n];
145
- return typeof r == "string" ? a = r : e === 1 ? a = r.one : a = r.other.replace("{{count}}", e.toString()), t != null && t.addSuffix ? t.comparison && t.comparison > 0 ? "in " + a : a + " ago" : a;
146
- };
147
- function S(n) {
148
- return (e = {}) => {
149
- const t = e.width ? String(e.width) : n.defaultWidth;
150
- return n.formats[t] || n.formats[n.defaultWidth];
151
- };
152
- }
153
- const p = {
154
- full: "EEEE, MMMM do, y",
155
- long: "MMMM do, y",
156
- medium: "MMM d, y",
157
- short: "MM/dd/yyyy"
158
- }, ee = {
159
- full: "h:mm:ss a zzzz",
160
- long: "h:mm:ss a z",
161
- medium: "h:mm:ss a",
162
- short: "h:mm a"
163
- }, te = {
164
- full: "{{date}} 'at' {{time}}",
165
- long: "{{date}} 'at' {{time}}",
166
- medium: "{{date}}, {{time}}",
167
- short: "{{date}}, {{time}}"
168
- }, ne = {
169
- date: S({
170
- formats: p,
171
- defaultWidth: "full"
172
- }),
173
- time: S({
174
- formats: ee,
175
- defaultWidth: "full"
176
- }),
177
- dateTime: S({
178
- formats: te,
179
- defaultWidth: "full"
180
- })
181
- }, ae = {
182
- lastWeek: "'last' eeee 'at' p",
183
- yesterday: "'yesterday at' p",
184
- today: "'today at' p",
185
- tomorrow: "'tomorrow at' p",
186
- nextWeek: "eeee 'at' p",
187
- other: "P"
188
- }, re = (n, e, t, a) => ae[n];
189
- function k(n) {
190
- return (e, t) => {
191
- const a = t != null && t.context ? String(t.context) : "standalone";
192
- let r;
193
- if (a === "formatting" && n.formattingValues) {
194
- const s = n.defaultFormattingWidth || n.defaultWidth, c = t != null && t.width ? String(t.width) : s;
195
- r = n.formattingValues[c] || n.formattingValues[s];
196
- } else {
197
- const s = n.defaultWidth, c = t != null && t.width ? String(t.width) : n.defaultWidth;
198
- r = n.values[c] || n.values[s];
199
- }
200
- const i = n.argumentCallback ? n.argumentCallback(e) : e;
201
- return r[i];
202
- };
203
- }
204
- const ie = {
205
- narrow: ["B", "A"],
206
- abbreviated: ["BC", "AD"],
207
- wide: ["Before Christ", "Anno Domini"]
208
- }, se = {
209
- narrow: ["1", "2", "3", "4"],
210
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
211
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
212
- }, ue = {
213
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
214
- abbreviated: [
215
- "Jan",
216
- "Feb",
217
- "Mar",
218
- "Apr",
219
- "May",
220
- "Jun",
221
- "Jul",
222
- "Aug",
223
- "Sep",
224
- "Oct",
225
- "Nov",
226
- "Dec"
227
- ],
228
- wide: [
229
- "January",
230
- "February",
231
- "March",
232
- "April",
233
- "May",
234
- "June",
235
- "July",
236
- "August",
237
- "September",
238
- "October",
239
- "November",
240
- "December"
241
- ]
242
- }, ce = {
243
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
244
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
245
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
246
- wide: [
247
- "Sunday",
248
- "Monday",
249
- "Tuesday",
250
- "Wednesday",
251
- "Thursday",
252
- "Friday",
253
- "Saturday"
254
- ]
255
- }, oe = {
256
- narrow: {
257
- am: "a",
258
- pm: "p",
259
- midnight: "mi",
260
- noon: "n",
261
- morning: "morning",
262
- afternoon: "afternoon",
263
- evening: "evening",
264
- night: "night"
265
- },
266
- abbreviated: {
267
- am: "AM",
268
- pm: "PM",
269
- midnight: "midnight",
270
- noon: "noon",
271
- morning: "morning",
272
- afternoon: "afternoon",
273
- evening: "evening",
274
- night: "night"
275
- },
276
- wide: {
277
- am: "a.m.",
278
- pm: "p.m.",
279
- midnight: "midnight",
280
- noon: "noon",
281
- morning: "morning",
282
- afternoon: "afternoon",
283
- evening: "evening",
284
- night: "night"
285
- }
286
- }, de = {
287
- narrow: {
288
- am: "a",
289
- pm: "p",
290
- midnight: "mi",
291
- noon: "n",
292
- morning: "in the morning",
293
- afternoon: "in the afternoon",
294
- evening: "in the evening",
295
- night: "at night"
296
- },
297
- abbreviated: {
298
- am: "AM",
299
- pm: "PM",
300
- midnight: "midnight",
301
- noon: "noon",
302
- morning: "in the morning",
303
- afternoon: "in the afternoon",
304
- evening: "in the evening",
305
- night: "at night"
306
- },
307
- wide: {
308
- am: "a.m.",
309
- pm: "p.m.",
310
- midnight: "midnight",
311
- noon: "noon",
312
- morning: "in the morning",
313
- afternoon: "in the afternoon",
314
- evening: "in the evening",
315
- night: "at night"
316
- }
317
- }, he = (n, e) => {
318
- const t = Number(n), a = t % 100;
319
- if (a > 20 || a < 10)
320
- switch (a % 10) {
321
- case 1:
322
- return t + "st";
323
- case 2:
324
- return t + "nd";
325
- case 3:
326
- return t + "rd";
327
- }
328
- return t + "th";
329
- }, fe = {
330
- ordinalNumber: he,
331
- era: k({
332
- values: ie,
333
- defaultWidth: "wide"
334
- }),
335
- quarter: k({
336
- values: se,
337
- defaultWidth: "wide",
338
- argumentCallback: (n) => n - 1
339
- }),
340
- month: k({
341
- values: ue,
342
- defaultWidth: "wide"
343
- }),
344
- day: k({
345
- values: ce,
346
- defaultWidth: "wide"
347
- }),
348
- dayPeriod: k({
349
- values: oe,
350
- defaultWidth: "wide",
351
- formattingValues: de,
352
- defaultFormattingWidth: "wide"
353
- })
354
- };
355
- function D(n) {
356
- return (e, t = {}) => {
357
- const a = t.width, r = a && n.matchPatterns[a] || n.matchPatterns[n.defaultMatchWidth], i = e.match(r);
358
- if (!i)
359
- return null;
360
- const s = i[0], c = a && n.parsePatterns[a] || n.parsePatterns[n.defaultParseWidth], o = Array.isArray(c) ? me(c, (g) => g.test(s)) : (
361
- // [TODO] -- I challenge you to fix the type
362
- le(c, (g) => g.test(s))
363
- );
364
- let d;
365
- d = n.valueCallback ? n.valueCallback(o) : o, d = t.valueCallback ? (
366
- // [TODO] -- I challenge you to fix the type
367
- t.valueCallback(d)
368
- ) : d;
369
- const f = e.slice(s.length);
370
- return { value: d, rest: f };
371
- };
372
- }
373
- function le(n, e) {
374
- for (const t in n)
375
- if (Object.prototype.hasOwnProperty.call(n, t) && e(n[t]))
376
- return t;
377
- }
378
- function me(n, e) {
379
- for (let t = 0; t < n.length; t++)
380
- if (e(n[t]))
381
- return t;
382
- }
383
- function ge(n) {
384
- return (e, t = {}) => {
385
- const a = e.match(n.matchPattern);
386
- if (!a) return null;
387
- const r = a[0], i = e.match(n.parsePattern);
388
- if (!i) return null;
389
- let s = n.valueCallback ? n.valueCallback(i[0]) : i[0];
390
- s = t.valueCallback ? t.valueCallback(s) : s;
391
- const c = e.slice(r.length);
392
- return { value: s, rest: c };
393
- };
394
- }
395
- const we = /^(\d+)(th|st|nd|rd)?/i, ye = /\d+/i, be = {
396
- narrow: /^(b|a)/i,
397
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
398
- wide: /^(before christ|before common era|anno domini|common era)/i
399
- }, Me = {
400
- any: [/^b/i, /^(a|c)/i]
401
- }, Oe = {
402
- narrow: /^[1234]/i,
403
- abbreviated: /^q[1234]/i,
404
- wide: /^[1234](th|st|nd|rd)? quarter/i
405
- }, Pe = {
406
- any: [/1/i, /2/i, /3/i, /4/i]
407
- }, ke = {
408
- narrow: /^[jfmasond]/i,
409
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
410
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
411
- }, De = {
412
- narrow: [
413
- /^j/i,
414
- /^f/i,
415
- /^m/i,
416
- /^a/i,
417
- /^m/i,
418
- /^j/i,
419
- /^j/i,
420
- /^a/i,
421
- /^s/i,
422
- /^o/i,
423
- /^n/i,
424
- /^d/i
425
- ],
426
- any: [
427
- /^ja/i,
428
- /^f/i,
429
- /^mar/i,
430
- /^ap/i,
431
- /^may/i,
432
- /^jun/i,
433
- /^jul/i,
434
- /^au/i,
435
- /^s/i,
436
- /^o/i,
437
- /^n/i,
438
- /^d/i
439
- ]
440
- }, xe = {
441
- narrow: /^[smtwf]/i,
442
- short: /^(su|mo|tu|we|th|fr|sa)/i,
443
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
444
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
445
- }, ve = {
446
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
447
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
448
- }, We = {
449
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
450
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
451
- }, Ye = {
452
- any: {
453
- am: /^a/i,
454
- pm: /^p/i,
455
- midnight: /^mi/i,
456
- noon: /^no/i,
457
- morning: /morning/i,
458
- afternoon: /afternoon/i,
459
- evening: /evening/i,
460
- night: /night/i
461
- }
462
- }, Se = {
463
- ordinalNumber: ge({
464
- matchPattern: we,
465
- parsePattern: ye,
466
- valueCallback: (n) => parseInt(n, 10)
467
- }),
468
- era: D({
469
- matchPatterns: be,
470
- defaultMatchWidth: "wide",
471
- parsePatterns: Me,
472
- defaultParseWidth: "any"
473
- }),
474
- quarter: D({
475
- matchPatterns: Oe,
476
- defaultMatchWidth: "wide",
477
- parsePatterns: Pe,
478
- defaultParseWidth: "any",
479
- valueCallback: (n) => n + 1
480
- }),
481
- month: D({
482
- matchPatterns: ke,
483
- defaultMatchWidth: "wide",
484
- parsePatterns: De,
485
- defaultParseWidth: "any"
486
- }),
487
- day: D({
488
- matchPatterns: xe,
489
- defaultMatchWidth: "wide",
490
- parsePatterns: ve,
491
- defaultParseWidth: "any"
492
- }),
493
- dayPeriod: D({
494
- matchPatterns: We,
495
- defaultMatchWidth: "any",
496
- parsePatterns: Ye,
497
- defaultParseWidth: "any"
498
- })
499
- }, Te = {
500
- code: "en-US",
501
- formatDistance: Z,
502
- formatLong: ne,
503
- formatRelative: re,
504
- localize: fe,
505
- match: Se,
506
- options: {
507
- weekStartsOn: 0,
508
- firstWeekContainsDate: 1
509
- }
510
- };
511
- function Fe(n, e) {
512
- const t = m(n, e == null ? void 0 : e.in);
513
- return I(t, z(t)) + 1;
514
- }
515
- function Ee(n, e) {
516
- const t = m(n, e == null ? void 0 : e.in), a = +v(t) - +J(t);
517
- return Math.round(a / G) + 1;
518
- }
519
- function B(n, e) {
520
- var f, g, O, P;
521
- const t = m(n, e == null ? void 0 : e.in), a = t.getFullYear(), r = W(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((g = (f = e == null ? void 0 : e.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((P = (O = r.locale) == null ? void 0 : O.options) == null ? void 0 : P.firstWeekContainsDate) ?? 1, s = w((e == null ? void 0 : e.in) || n, 0);
522
- s.setFullYear(a + 1, 0, i), s.setHours(0, 0, 0, 0);
523
- const c = x(s, e), o = w((e == null ? void 0 : e.in) || n, 0);
524
- o.setFullYear(a, 0, i), o.setHours(0, 0, 0, 0);
525
- const d = x(o, e);
526
- return +t >= +c ? a + 1 : +t >= +d ? a : a - 1;
527
- }
528
- function Ce(n, e) {
529
- var c, o, d, f;
530
- const t = W(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((o = (c = e == null ? void 0 : e.locale) == null ? void 0 : c.options) == null ? void 0 : o.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((f = (d = t.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, r = B(n, e), i = w((e == null ? void 0 : e.in) || n, 0);
531
- return i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0), x(i, e);
532
- }
533
- function Ne(n, e) {
534
- const t = m(n, e == null ? void 0 : e.in), a = +x(t, e) - +Ce(t, e);
535
- return Math.round(a / G) + 1;
536
- }
537
- function u(n, e) {
538
- const t = n < 0 ? "-" : "", a = Math.abs(n).toString().padStart(e, "0");
539
- return t + a;
540
- }
541
- const y = {
542
- // Year
543
- y(n, e) {
544
- const t = n.getFullYear(), a = t > 0 ? t : 1 - t;
545
- return u(e === "yy" ? a % 100 : a, e.length);
546
- },
547
- // Month
548
- M(n, e) {
549
- const t = n.getMonth();
550
- return e === "M" ? String(t + 1) : u(t + 1, 2);
551
- },
552
- // Day of the month
553
- d(n, e) {
554
- return u(n.getDate(), e.length);
555
- },
556
- // AM or PM
557
- a(n, e) {
558
- const t = n.getHours() / 12 >= 1 ? "pm" : "am";
559
- switch (e) {
560
- case "a":
561
- case "aa":
562
- return t.toUpperCase();
563
- case "aaa":
564
- return t;
565
- case "aaaaa":
566
- return t[0];
567
- case "aaaa":
568
- default:
569
- return t === "am" ? "a.m." : "p.m.";
570
- }
571
- },
572
- // Hour [1-12]
573
- h(n, e) {
574
- return u(n.getHours() % 12 || 12, e.length);
575
- },
576
- // Hour [0-23]
577
- H(n, e) {
578
- return u(n.getHours(), e.length);
579
- },
580
- // Minute
581
- m(n, e) {
582
- return u(n.getMinutes(), e.length);
583
- },
584
- // Second
585
- s(n, e) {
586
- return u(n.getSeconds(), e.length);
587
- },
588
- // Fraction of second
589
- S(n, e) {
590
- const t = e.length, a = n.getMilliseconds(), r = Math.trunc(
591
- a * Math.pow(10, t - 3)
592
- );
593
- return u(r, e.length);
594
- }
595
- }, M = {
596
- midnight: "midnight",
597
- noon: "noon",
598
- morning: "morning",
599
- afternoon: "afternoon",
600
- evening: "evening",
601
- night: "night"
602
- }, _ = {
603
- // Era
604
- G: function(n, e, t) {
605
- const a = n.getFullYear() > 0 ? 1 : 0;
606
- switch (e) {
607
- // AD, BC
608
- case "G":
609
- case "GG":
610
- case "GGG":
611
- return t.era(a, { width: "abbreviated" });
612
- // A, B
613
- case "GGGGG":
614
- return t.era(a, { width: "narrow" });
615
- // Anno Domini, Before Christ
616
- case "GGGG":
617
- default:
618
- return t.era(a, { width: "wide" });
619
- }
620
- },
621
- // Year
622
- y: function(n, e, t) {
623
- if (e === "yo") {
624
- const a = n.getFullYear(), r = a > 0 ? a : 1 - a;
625
- return t.ordinalNumber(r, { unit: "year" });
626
- }
627
- return y.y(n, e);
628
- },
629
- // Local week-numbering year
630
- Y: function(n, e, t, a) {
631
- const r = B(n, a), i = r > 0 ? r : 1 - r;
632
- if (e === "YY") {
633
- const s = i % 100;
634
- return u(s, 2);
635
- }
636
- return e === "Yo" ? t.ordinalNumber(i, { unit: "year" }) : u(i, e.length);
637
- },
638
- // ISO week-numbering year
639
- R: function(n, e) {
640
- const t = j(n);
641
- return u(t, e.length);
642
- },
643
- // Extended year. This is a single number designating the year of this calendar system.
644
- // The main difference between `y` and `u` localizers are B.C. years:
645
- // | Year | `y` | `u` |
646
- // |------|-----|-----|
647
- // | AC 1 | 1 | 1 |
648
- // | BC 1 | 1 | 0 |
649
- // | BC 2 | 2 | -1 |
650
- // Also `yy` always returns the last two digits of a year,
651
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
652
- u: function(n, e) {
653
- const t = n.getFullYear();
654
- return u(t, e.length);
655
- },
656
- // Quarter
657
- Q: function(n, e, t) {
658
- const a = Math.ceil((n.getMonth() + 1) / 3);
659
- switch (e) {
660
- // 1, 2, 3, 4
661
- case "Q":
662
- return String(a);
663
- // 01, 02, 03, 04
664
- case "QQ":
665
- return u(a, 2);
666
- // 1st, 2nd, 3rd, 4th
667
- case "Qo":
668
- return t.ordinalNumber(a, { unit: "quarter" });
669
- // Q1, Q2, Q3, Q4
670
- case "QQQ":
671
- return t.quarter(a, {
672
- width: "abbreviated",
673
- context: "formatting"
674
- });
675
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
676
- case "QQQQQ":
677
- return t.quarter(a, {
678
- width: "narrow",
679
- context: "formatting"
680
- });
681
- // 1st quarter, 2nd quarter, ...
682
- case "QQQQ":
683
- default:
684
- return t.quarter(a, {
685
- width: "wide",
686
- context: "formatting"
687
- });
688
- }
689
- },
690
- // Stand-alone quarter
691
- q: function(n, e, t) {
692
- const a = Math.ceil((n.getMonth() + 1) / 3);
693
- switch (e) {
694
- // 1, 2, 3, 4
695
- case "q":
696
- return String(a);
697
- // 01, 02, 03, 04
698
- case "qq":
699
- return u(a, 2);
700
- // 1st, 2nd, 3rd, 4th
701
- case "qo":
702
- return t.ordinalNumber(a, { unit: "quarter" });
703
- // Q1, Q2, Q3, Q4
704
- case "qqq":
705
- return t.quarter(a, {
706
- width: "abbreviated",
707
- context: "standalone"
708
- });
709
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
710
- case "qqqqq":
711
- return t.quarter(a, {
712
- width: "narrow",
713
- context: "standalone"
714
- });
715
- // 1st quarter, 2nd quarter, ...
716
- case "qqqq":
717
- default:
718
- return t.quarter(a, {
719
- width: "wide",
720
- context: "standalone"
721
- });
722
- }
723
- },
724
- // Month
725
- M: function(n, e, t) {
726
- const a = n.getMonth();
727
- switch (e) {
728
- case "M":
729
- case "MM":
730
- return y.M(n, e);
731
- // 1st, 2nd, ..., 12th
732
- case "Mo":
733
- return t.ordinalNumber(a + 1, { unit: "month" });
734
- // Jan, Feb, ..., Dec
735
- case "MMM":
736
- return t.month(a, {
737
- width: "abbreviated",
738
- context: "formatting"
739
- });
740
- // J, F, ..., D
741
- case "MMMMM":
742
- return t.month(a, {
743
- width: "narrow",
744
- context: "formatting"
745
- });
746
- // January, February, ..., December
747
- case "MMMM":
748
- default:
749
- return t.month(a, { width: "wide", context: "formatting" });
750
- }
751
- },
752
- // Stand-alone month
753
- L: function(n, e, t) {
754
- const a = n.getMonth();
755
- switch (e) {
756
- // 1, 2, ..., 12
757
- case "L":
758
- return String(a + 1);
759
- // 01, 02, ..., 12
760
- case "LL":
761
- return u(a + 1, 2);
762
- // 1st, 2nd, ..., 12th
763
- case "Lo":
764
- return t.ordinalNumber(a + 1, { unit: "month" });
765
- // Jan, Feb, ..., Dec
766
- case "LLL":
767
- return t.month(a, {
768
- width: "abbreviated",
769
- context: "standalone"
770
- });
771
- // J, F, ..., D
772
- case "LLLLL":
773
- return t.month(a, {
774
- width: "narrow",
775
- context: "standalone"
776
- });
777
- // January, February, ..., December
778
- case "LLLL":
779
- default:
780
- return t.month(a, { width: "wide", context: "standalone" });
781
- }
782
- },
783
- // Local week of year
784
- w: function(n, e, t, a) {
785
- const r = Ne(n, a);
786
- return e === "wo" ? t.ordinalNumber(r, { unit: "week" }) : u(r, e.length);
787
- },
788
- // ISO week of year
789
- I: function(n, e, t) {
790
- const a = Ee(n);
791
- return e === "Io" ? t.ordinalNumber(a, { unit: "week" }) : u(a, e.length);
792
- },
793
- // Day of the month
794
- d: function(n, e, t) {
795
- return e === "do" ? t.ordinalNumber(n.getDate(), { unit: "date" }) : y.d(n, e);
796
- },
797
- // Day of year
798
- D: function(n, e, t) {
799
- const a = Fe(n);
800
- return e === "Do" ? t.ordinalNumber(a, { unit: "dayOfYear" }) : u(a, e.length);
801
- },
802
- // Day of week
803
- E: function(n, e, t) {
804
- const a = n.getDay();
805
- switch (e) {
806
- // Tue
807
- case "E":
808
- case "EE":
809
- case "EEE":
810
- return t.day(a, {
811
- width: "abbreviated",
812
- context: "formatting"
813
- });
814
- // T
815
- case "EEEEE":
816
- return t.day(a, {
817
- width: "narrow",
818
- context: "formatting"
819
- });
820
- // Tu
821
- case "EEEEEE":
822
- return t.day(a, {
823
- width: "short",
824
- context: "formatting"
825
- });
826
- // Tuesday
827
- case "EEEE":
828
- default:
829
- return t.day(a, {
830
- width: "wide",
831
- context: "formatting"
832
- });
833
- }
834
- },
835
- // Local day of week
836
- e: function(n, e, t, a) {
837
- const r = n.getDay(), i = (r - a.weekStartsOn + 8) % 7 || 7;
838
- switch (e) {
839
- // Numerical value (Nth day of week with current locale or weekStartsOn)
840
- case "e":
841
- return String(i);
842
- // Padded numerical value
843
- case "ee":
844
- return u(i, 2);
845
- // 1st, 2nd, ..., 7th
846
- case "eo":
847
- return t.ordinalNumber(i, { unit: "day" });
848
- case "eee":
849
- return t.day(r, {
850
- width: "abbreviated",
851
- context: "formatting"
852
- });
853
- // T
854
- case "eeeee":
855
- return t.day(r, {
856
- width: "narrow",
857
- context: "formatting"
858
- });
859
- // Tu
860
- case "eeeeee":
861
- return t.day(r, {
862
- width: "short",
863
- context: "formatting"
864
- });
865
- // Tuesday
866
- case "eeee":
867
- default:
868
- return t.day(r, {
869
- width: "wide",
870
- context: "formatting"
871
- });
872
- }
873
- },
874
- // Stand-alone local day of week
875
- c: function(n, e, t, a) {
876
- const r = n.getDay(), i = (r - a.weekStartsOn + 8) % 7 || 7;
877
- switch (e) {
878
- // Numerical value (same as in `e`)
879
- case "c":
880
- return String(i);
881
- // Padded numerical value
882
- case "cc":
883
- return u(i, e.length);
884
- // 1st, 2nd, ..., 7th
885
- case "co":
886
- return t.ordinalNumber(i, { unit: "day" });
887
- case "ccc":
888
- return t.day(r, {
889
- width: "abbreviated",
890
- context: "standalone"
891
- });
892
- // T
893
- case "ccccc":
894
- return t.day(r, {
895
- width: "narrow",
896
- context: "standalone"
897
- });
898
- // Tu
899
- case "cccccc":
900
- return t.day(r, {
901
- width: "short",
902
- context: "standalone"
903
- });
904
- // Tuesday
905
- case "cccc":
906
- default:
907
- return t.day(r, {
908
- width: "wide",
909
- context: "standalone"
910
- });
911
- }
912
- },
913
- // ISO day of week
914
- i: function(n, e, t) {
915
- const a = n.getDay(), r = a === 0 ? 7 : a;
916
- switch (e) {
917
- // 2
918
- case "i":
919
- return String(r);
920
- // 02
921
- case "ii":
922
- return u(r, e.length);
923
- // 2nd
924
- case "io":
925
- return t.ordinalNumber(r, { unit: "day" });
926
- // Tue
927
- case "iii":
928
- return t.day(a, {
929
- width: "abbreviated",
930
- context: "formatting"
931
- });
932
- // T
933
- case "iiiii":
934
- return t.day(a, {
935
- width: "narrow",
936
- context: "formatting"
937
- });
938
- // Tu
939
- case "iiiiii":
940
- return t.day(a, {
941
- width: "short",
942
- context: "formatting"
943
- });
944
- // Tuesday
945
- case "iiii":
946
- default:
947
- return t.day(a, {
948
- width: "wide",
949
- context: "formatting"
950
- });
951
- }
952
- },
953
- // AM or PM
954
- a: function(n, e, t) {
955
- const r = n.getHours() / 12 >= 1 ? "pm" : "am";
956
- switch (e) {
957
- case "a":
958
- case "aa":
959
- return t.dayPeriod(r, {
960
- width: "abbreviated",
961
- context: "formatting"
962
- });
963
- case "aaa":
964
- return t.dayPeriod(r, {
965
- width: "abbreviated",
966
- context: "formatting"
967
- }).toLowerCase();
968
- case "aaaaa":
969
- return t.dayPeriod(r, {
970
- width: "narrow",
971
- context: "formatting"
972
- });
973
- case "aaaa":
974
- default:
975
- return t.dayPeriod(r, {
976
- width: "wide",
977
- context: "formatting"
978
- });
979
- }
980
- },
981
- // AM, PM, midnight, noon
982
- b: function(n, e, t) {
983
- const a = n.getHours();
984
- let r;
985
- switch (a === 12 ? r = M.noon : a === 0 ? r = M.midnight : r = a / 12 >= 1 ? "pm" : "am", e) {
986
- case "b":
987
- case "bb":
988
- return t.dayPeriod(r, {
989
- width: "abbreviated",
990
- context: "formatting"
991
- });
992
- case "bbb":
993
- return t.dayPeriod(r, {
994
- width: "abbreviated",
995
- context: "formatting"
996
- }).toLowerCase();
997
- case "bbbbb":
998
- return t.dayPeriod(r, {
999
- width: "narrow",
1000
- context: "formatting"
1001
- });
1002
- case "bbbb":
1003
- default:
1004
- return t.dayPeriod(r, {
1005
- width: "wide",
1006
- context: "formatting"
1007
- });
1008
- }
1009
- },
1010
- // in the morning, in the afternoon, in the evening, at night
1011
- B: function(n, e, t) {
1012
- const a = n.getHours();
1013
- let r;
1014
- switch (a >= 17 ? r = M.evening : a >= 12 ? r = M.afternoon : a >= 4 ? r = M.morning : r = M.night, e) {
1015
- case "B":
1016
- case "BB":
1017
- case "BBB":
1018
- return t.dayPeriod(r, {
1019
- width: "abbreviated",
1020
- context: "formatting"
1021
- });
1022
- case "BBBBB":
1023
- return t.dayPeriod(r, {
1024
- width: "narrow",
1025
- context: "formatting"
1026
- });
1027
- case "BBBB":
1028
- default:
1029
- return t.dayPeriod(r, {
1030
- width: "wide",
1031
- context: "formatting"
1032
- });
1033
- }
1034
- },
1035
- // Hour [1-12]
1036
- h: function(n, e, t) {
1037
- if (e === "ho") {
1038
- let a = n.getHours() % 12;
1039
- return a === 0 && (a = 12), t.ordinalNumber(a, { unit: "hour" });
1040
- }
1041
- return y.h(n, e);
1042
- },
1043
- // Hour [0-23]
1044
- H: function(n, e, t) {
1045
- return e === "Ho" ? t.ordinalNumber(n.getHours(), { unit: "hour" }) : y.H(n, e);
1046
- },
1047
- // Hour [0-11]
1048
- K: function(n, e, t) {
1049
- const a = n.getHours() % 12;
1050
- return e === "Ko" ? t.ordinalNumber(a, { unit: "hour" }) : u(a, e.length);
1051
- },
1052
- // Hour [1-24]
1053
- k: function(n, e, t) {
1054
- let a = n.getHours();
1055
- return a === 0 && (a = 24), e === "ko" ? t.ordinalNumber(a, { unit: "hour" }) : u(a, e.length);
1056
- },
1057
- // Minute
1058
- m: function(n, e, t) {
1059
- return e === "mo" ? t.ordinalNumber(n.getMinutes(), { unit: "minute" }) : y.m(n, e);
1060
- },
1061
- // Second
1062
- s: function(n, e, t) {
1063
- return e === "so" ? t.ordinalNumber(n.getSeconds(), { unit: "second" }) : y.s(n, e);
1064
- },
1065
- // Fraction of second
1066
- S: function(n, e) {
1067
- return y.S(n, e);
1068
- },
1069
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1070
- X: function(n, e, t) {
1071
- const a = n.getTimezoneOffset();
1072
- if (a === 0)
1073
- return "Z";
1074
- switch (e) {
1075
- // Hours and optional minutes
1076
- case "X":
1077
- return Q(a);
1078
- // Hours, minutes and optional seconds without `:` delimiter
1079
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1080
- // so this token always has the same output as `XX`
1081
- case "XXXX":
1082
- case "XX":
1083
- return b(a);
1084
- // Hours, minutes and optional seconds with `:` delimiter
1085
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1086
- // so this token always has the same output as `XXX`
1087
- case "XXXXX":
1088
- case "XXX":
1089
- // Hours and minutes with `:` delimiter
1090
- default:
1091
- return b(a, ":");
1092
- }
1093
- },
1094
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1095
- x: function(n, e, t) {
1096
- const a = n.getTimezoneOffset();
1097
- switch (e) {
1098
- // Hours and optional minutes
1099
- case "x":
1100
- return Q(a);
1101
- // Hours, minutes and optional seconds without `:` delimiter
1102
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1103
- // so this token always has the same output as `xx`
1104
- case "xxxx":
1105
- case "xx":
1106
- return b(a);
1107
- // Hours, minutes and optional seconds with `:` delimiter
1108
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1109
- // so this token always has the same output as `xxx`
1110
- case "xxxxx":
1111
- case "xxx":
1112
- // Hours and minutes with `:` delimiter
1113
- default:
1114
- return b(a, ":");
1115
- }
1116
- },
1117
- // Timezone (GMT)
1118
- O: function(n, e, t) {
1119
- const a = n.getTimezoneOffset();
1120
- switch (e) {
1121
- // Short
1122
- case "O":
1123
- case "OO":
1124
- case "OOO":
1125
- return "GMT" + H(a, ":");
1126
- // Long
1127
- case "OOOO":
1128
- default:
1129
- return "GMT" + b(a, ":");
1130
- }
1131
- },
1132
- // Timezone (specific non-location)
1133
- z: function(n, e, t) {
1134
- const a = n.getTimezoneOffset();
1135
- switch (e) {
1136
- // Short
1137
- case "z":
1138
- case "zz":
1139
- case "zzz":
1140
- return "GMT" + H(a, ":");
1141
- // Long
1142
- case "zzzz":
1143
- default:
1144
- return "GMT" + b(a, ":");
1145
- }
1146
- },
1147
- // Seconds timestamp
1148
- t: function(n, e, t) {
1149
- const a = Math.trunc(+n / 1e3);
1150
- return u(a, e.length);
1151
- },
1152
- // Milliseconds timestamp
1153
- T: function(n, e, t) {
1154
- return u(+n, e.length);
1155
- }
1156
- };
1157
- function H(n, e = "") {
1158
- const t = n > 0 ? "-" : "+", a = Math.abs(n), r = Math.trunc(a / 60), i = a % 60;
1159
- return i === 0 ? t + String(r) : t + String(r) + e + u(i, 2);
1160
- }
1161
- function Q(n, e) {
1162
- return n % 60 === 0 ? (n > 0 ? "-" : "+") + u(Math.abs(n) / 60, 2) : b(n, e);
1163
- }
1164
- function b(n, e = "") {
1165
- const t = n > 0 ? "-" : "+", a = Math.abs(n), r = u(Math.trunc(a / 60), 2), i = u(a % 60, 2);
1166
- return t + r + e + i;
1167
- }
1168
- const X = (n, e) => {
1169
- switch (n) {
1170
- case "P":
1171
- return e.date({ width: "short" });
1172
- case "PP":
1173
- return e.date({ width: "medium" });
1174
- case "PPP":
1175
- return e.date({ width: "long" });
1176
- case "PPPP":
1177
- default:
1178
- return e.date({ width: "full" });
1179
- }
1180
- }, A = (n, e) => {
1181
- switch (n) {
1182
- case "p":
1183
- return e.time({ width: "short" });
1184
- case "pp":
1185
- return e.time({ width: "medium" });
1186
- case "ppp":
1187
- return e.time({ width: "long" });
1188
- case "pppp":
1189
- default:
1190
- return e.time({ width: "full" });
1191
- }
1192
- }, qe = (n, e) => {
1193
- const t = n.match(/(P+)(p+)?/) || [], a = t[1], r = t[2];
1194
- if (!r)
1195
- return X(n, e);
1196
- let i;
1197
- switch (a) {
1198
- case "P":
1199
- i = e.dateTime({ width: "short" });
1200
- break;
1201
- case "PP":
1202
- i = e.dateTime({ width: "medium" });
1203
- break;
1204
- case "PPP":
1205
- i = e.dateTime({ width: "long" });
1206
- break;
1207
- case "PPPP":
1208
- default:
1209
- i = e.dateTime({ width: "full" });
1210
- break;
1211
- }
1212
- return i.replace("{{date}}", X(a, e)).replace("{{time}}", A(r, e));
1213
- }, _e = {
1214
- p: A,
1215
- P: qe
1216
- }, He = /^D+$/, Qe = /^Y+$/, Xe = ["D", "DD", "YY", "YYYY"];
1217
- function Le(n) {
1218
- return He.test(n);
1219
- }
1220
- function Ge(n) {
1221
- return Qe.test(n);
1222
- }
1223
- function je(n, e, t) {
1224
- const a = Be(n, e, t);
1225
- if (console.warn(a), Xe.includes(n)) throw new RangeError(a);
1226
- }
1227
- function Be(n, e, t) {
1228
- const a = n[0] === "Y" ? "years" : "days of the month";
1229
- return `Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1230
- }
1231
- const Ae = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Re = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ve = /^'([^]*?)'?$/, Ie = /''/g, Je = /[a-zA-Z]/;
1232
- function pe(n, e, t) {
1233
- var f, g, O, P, T, F, E, C;
1234
- const a = W(), r = (t == null ? void 0 : t.locale) ?? a.locale ?? Te, i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (f = t == null ? void 0 : t.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((P = (O = a.locale) == null ? void 0 : O.options) == null ? void 0 : P.firstWeekContainsDate) ?? 1, s = (t == null ? void 0 : t.weekStartsOn) ?? ((F = (T = t == null ? void 0 : t.locale) == null ? void 0 : T.options) == null ? void 0 : F.weekStartsOn) ?? a.weekStartsOn ?? ((C = (E = a.locale) == null ? void 0 : E.options) == null ? void 0 : C.weekStartsOn) ?? 0, c = m(n, t == null ? void 0 : t.in);
1235
- if (!U(c))
1236
- throw new RangeError("Invalid time value");
1237
- let o = e.match(Re).map((l) => {
1238
- const h = l[0];
1239
- if (h === "p" || h === "P") {
1240
- const Y = _e[h];
1241
- return Y(l, r.formatLong);
1242
- }
1243
- return l;
1244
- }).join("").match(Ae).map((l) => {
1245
- if (l === "''")
1246
- return { isToken: !1, value: "'" };
1247
- const h = l[0];
1248
- if (h === "'")
1249
- return { isToken: !1, value: $e(l) };
1250
- if (_[h])
1251
- return { isToken: !0, value: l };
1252
- if (h.match(Je))
1253
- throw new RangeError(
1254
- "Format string contains an unescaped latin alphabet character `" + h + "`"
1255
- );
1256
- return { isToken: !1, value: l };
1257
- });
1258
- r.localize.preprocessor && (o = r.localize.preprocessor(c, o));
1259
- const d = {
1260
- firstWeekContainsDate: i,
1261
- weekStartsOn: s,
1262
- locale: r
1263
- };
1264
- return o.map((l) => {
1265
- if (!l.isToken) return l.value;
1266
- const h = l.value;
1267
- (!(t != null && t.useAdditionalWeekYearTokens) && Ge(h) || !(t != null && t.useAdditionalDayOfYearTokens) && Le(h)) && je(h, e, String(n));
1268
- const Y = _[h[0]];
1269
- return Y(c, h, r.localize, d);
1270
- }).join("");
1271
- }
1272
- function $e(n) {
1273
- const e = n.match(Ve);
1274
- return e ? e[1].replace(Ie, "'") : n;
1275
- }
1276
- function et(n, e, t) {
1277
- const [a, r] = L(
1278
- t == null ? void 0 : t.in,
1279
- n,
1280
- e
1281
- );
1282
- return a.getFullYear() === r.getFullYear() && a.getMonth() === r.getMonth();
1283
- }
1284
- export {
1285
- Ke as a,
1286
- x as b,
1287
- ze as c,
1288
- I as d,
1289
- B as e,
1290
- pe as f,
1291
- W as g,
1292
- v as h,
1293
- et as i,
1294
- Ne as j,
1295
- Ee as k,
1296
- q as l,
1297
- Te as m,
1298
- _e as n,
1299
- Ge as o,
1300
- Le as p,
1301
- U as q,
1302
- $ as r,
1303
- Ze as s,
1304
- z as t,
1305
- je as w
1306
- };
1307
- //# sourceMappingURL=isSameMonth-5wNF2f4I.js.map