react-semaphor 0.1.239 → 0.1.241

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 (38) hide show
  1. package/dist/chunks/{dashboard-controls-DIFPVHkq.js → dashboard-controls-Bbjg39W1.js} +1 -1
  2. package/dist/chunks/{dashboard-controls-m-rn9O15.js → dashboard-controls-CydTgB8b.js} +5 -5
  3. package/dist/chunks/{dashboard-json-CJ1HKDT6.js → dashboard-json-BqhlPxCk.js} +1 -1
  4. package/dist/chunks/{dashboard-json-HWBQuWn2.js → dashboard-json-Dh0BCAEU.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-DlwLS77e.js → dashboard-summary-settings-dialog-DMGeFM9N.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-DvLyjGhq.js → dashboard-summary-settings-dialog-DXEx7VYT.js} +1 -1
  7. package/dist/chunks/date-formatter-BeFtqSQ2.js +1978 -0
  8. package/dist/chunks/date-formatter-CZ8p6ngp.js +1 -0
  9. package/dist/chunks/{edit-dashboard-visual-BVlA_vRb.js → edit-dashboard-visual-BSHC5QiP.js} +3332 -3316
  10. package/dist/chunks/{edit-dashboard-visual-B5jatJ2M.js → edit-dashboard-visual-DcLZThas.js} +12 -12
  11. package/dist/chunks/{editor-action-buttons-Bq-ENC_B.js → editor-action-buttons-C_zLw3Aj.js} +1 -1
  12. package/dist/chunks/{editor-action-buttons-d64iA8wP.js → editor-action-buttons-lDMI1SQ2.js} +2 -2
  13. package/dist/chunks/{index-0u2X3G_x.js → index-C1qXov_Z.js} +29107 -28684
  14. package/dist/chunks/index-CYQV2kbT.js +1103 -0
  15. package/dist/chunks/{notification-bell-Cu4JA2Rs.js → notification-bell-CfYK7Cx6.js} +1 -1
  16. package/dist/chunks/{notification-bell-DpxVIL-E.js → notification-bell-CuEbhFaL.js} +18 -18
  17. package/dist/chunks/{resource-management-panel-CJXupZdG.js → resource-management-panel-G3XJbfPx.js} +2 -2
  18. package/dist/chunks/{resource-management-panel-JiF_3jpj.js → resource-management-panel-xwPhr6Lm.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-yUJHf_h7.js → use-visual-utils-Cdm8jbGc.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-C8_xz-xH.js → use-visual-utils-Du-m-SYb.js} +1 -1
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/format-utils/index.cjs +5 -5
  24. package/dist/format-utils/index.js +171 -305
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +5 -5
  27. package/dist/surfboard/index.cjs +1 -1
  28. package/dist/surfboard/index.js +2 -2
  29. package/dist/types/dashboard.d.ts +54 -0
  30. package/dist/types/format-utils.d.ts +5 -0
  31. package/dist/types/main.d.ts +50 -4
  32. package/dist/types/shared.d.ts +49 -0
  33. package/dist/types/surfboard.d.ts +54 -0
  34. package/dist/types/types.d.ts +54 -0
  35. package/package.json +1 -1
  36. package/dist/chunks/date-formatter-Sz6QDaM8.js +0 -1
  37. package/dist/chunks/date-formatter-Y8Za1ib3.js +0 -1813
  38. package/dist/chunks/index-CyHBRhlz.js +0 -1103
@@ -0,0 +1,1978 @@
1
+ const Ye = {
2
+ lessThanXSeconds: {
3
+ one: "less than a second",
4
+ other: "less than {{count}} seconds"
5
+ },
6
+ xSeconds: {
7
+ one: "1 second",
8
+ other: "{{count}} seconds"
9
+ },
10
+ halfAMinute: "half a minute",
11
+ lessThanXMinutes: {
12
+ one: "less than a minute",
13
+ other: "less than {{count}} minutes"
14
+ },
15
+ xMinutes: {
16
+ one: "1 minute",
17
+ other: "{{count}} minutes"
18
+ },
19
+ aboutXHours: {
20
+ one: "about 1 hour",
21
+ other: "about {{count}} hours"
22
+ },
23
+ xHours: {
24
+ one: "1 hour",
25
+ other: "{{count}} hours"
26
+ },
27
+ xDays: {
28
+ one: "1 day",
29
+ other: "{{count}} days"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "about 1 week",
33
+ other: "about {{count}} weeks"
34
+ },
35
+ xWeeks: {
36
+ one: "1 week",
37
+ other: "{{count}} weeks"
38
+ },
39
+ aboutXMonths: {
40
+ one: "about 1 month",
41
+ other: "about {{count}} months"
42
+ },
43
+ xMonths: {
44
+ one: "1 month",
45
+ other: "{{count}} months"
46
+ },
47
+ aboutXYears: {
48
+ one: "about 1 year",
49
+ other: "about {{count}} years"
50
+ },
51
+ xYears: {
52
+ one: "1 year",
53
+ other: "{{count}} years"
54
+ },
55
+ overXYears: {
56
+ one: "over 1 year",
57
+ other: "over {{count}} years"
58
+ },
59
+ almostXYears: {
60
+ one: "almost 1 year",
61
+ other: "almost {{count}} years"
62
+ }
63
+ }, Pe = (t, e, n) => {
64
+ let r;
65
+ const a = Ye[t];
66
+ 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;
67
+ };
68
+ function X(t) {
69
+ return (e = {}) => {
70
+ const n = e.width ? String(e.width) : t.defaultWidth;
71
+ return t.formats[n] || t.formats[t.defaultWidth];
72
+ };
73
+ }
74
+ const Ie = {
75
+ full: "EEEE, MMMM do, y",
76
+ long: "MMMM do, y",
77
+ medium: "MMM d, y",
78
+ short: "MM/dd/yyyy"
79
+ }, ke = {
80
+ full: "h:mm:ss a zzzz",
81
+ long: "h:mm:ss a z",
82
+ medium: "h:mm:ss a",
83
+ short: "h:mm a"
84
+ }, Se = {
85
+ full: "{{date}} 'at' {{time}}",
86
+ long: "{{date}} 'at' {{time}}",
87
+ medium: "{{date}}, {{time}}",
88
+ short: "{{date}}, {{time}}"
89
+ }, We = {
90
+ date: X({
91
+ formats: Ie,
92
+ defaultWidth: "full"
93
+ }),
94
+ time: X({
95
+ formats: ke,
96
+ defaultWidth: "full"
97
+ }),
98
+ dateTime: X({
99
+ formats: Se,
100
+ defaultWidth: "full"
101
+ })
102
+ }, ve = {
103
+ lastWeek: "'last' eeee 'at' p",
104
+ yesterday: "'yesterday at' p",
105
+ today: "'today at' p",
106
+ tomorrow: "'tomorrow at' p",
107
+ nextWeek: "eeee 'at' p",
108
+ other: "P"
109
+ }, Ce = (t, e, n, r) => ve[t];
110
+ function k(t) {
111
+ return (e, n) => {
112
+ const r = n != null && n.context ? String(n.context) : "standalone";
113
+ let a;
114
+ if (r === "formatting" && t.formattingValues) {
115
+ const c = t.defaultFormattingWidth || t.defaultWidth, u = n != null && n.width ? String(n.width) : c;
116
+ a = t.formattingValues[u] || t.formattingValues[c];
117
+ } else {
118
+ const c = t.defaultWidth, u = n != null && n.width ? String(n.width) : t.defaultWidth;
119
+ a = t.values[u] || t.values[c];
120
+ }
121
+ const i = t.argumentCallback ? t.argumentCallback(e) : e;
122
+ return a[i];
123
+ };
124
+ }
125
+ const Fe = {
126
+ narrow: ["B", "A"],
127
+ abbreviated: ["BC", "AD"],
128
+ wide: ["Before Christ", "Anno Domini"]
129
+ }, Ee = {
130
+ narrow: ["1", "2", "3", "4"],
131
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
132
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
133
+ }, $e = {
134
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
135
+ abbreviated: [
136
+ "Jan",
137
+ "Feb",
138
+ "Mar",
139
+ "Apr",
140
+ "May",
141
+ "Jun",
142
+ "Jul",
143
+ "Aug",
144
+ "Sep",
145
+ "Oct",
146
+ "Nov",
147
+ "Dec"
148
+ ],
149
+ wide: [
150
+ "January",
151
+ "February",
152
+ "March",
153
+ "April",
154
+ "May",
155
+ "June",
156
+ "July",
157
+ "August",
158
+ "September",
159
+ "October",
160
+ "November",
161
+ "December"
162
+ ]
163
+ }, He = {
164
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
165
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
166
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
167
+ wide: [
168
+ "Sunday",
169
+ "Monday",
170
+ "Tuesday",
171
+ "Wednesday",
172
+ "Thursday",
173
+ "Friday",
174
+ "Saturday"
175
+ ]
176
+ }, Le = {
177
+ narrow: {
178
+ am: "a",
179
+ pm: "p",
180
+ midnight: "mi",
181
+ noon: "n",
182
+ morning: "morning",
183
+ afternoon: "afternoon",
184
+ evening: "evening",
185
+ night: "night"
186
+ },
187
+ abbreviated: {
188
+ am: "AM",
189
+ pm: "PM",
190
+ midnight: "midnight",
191
+ noon: "noon",
192
+ morning: "morning",
193
+ afternoon: "afternoon",
194
+ evening: "evening",
195
+ night: "night"
196
+ },
197
+ wide: {
198
+ am: "a.m.",
199
+ pm: "p.m.",
200
+ midnight: "midnight",
201
+ noon: "noon",
202
+ morning: "morning",
203
+ afternoon: "afternoon",
204
+ evening: "evening",
205
+ night: "night"
206
+ }
207
+ }, _e = {
208
+ narrow: {
209
+ am: "a",
210
+ pm: "p",
211
+ midnight: "mi",
212
+ noon: "n",
213
+ morning: "in the morning",
214
+ afternoon: "in the afternoon",
215
+ evening: "in the evening",
216
+ night: "at night"
217
+ },
218
+ abbreviated: {
219
+ am: "AM",
220
+ pm: "PM",
221
+ midnight: "midnight",
222
+ noon: "noon",
223
+ morning: "in the morning",
224
+ afternoon: "in the afternoon",
225
+ evening: "in the evening",
226
+ night: "at night"
227
+ },
228
+ wide: {
229
+ am: "a.m.",
230
+ pm: "p.m.",
231
+ midnight: "midnight",
232
+ noon: "noon",
233
+ morning: "in the morning",
234
+ afternoon: "in the afternoon",
235
+ evening: "in the evening",
236
+ night: "at night"
237
+ }
238
+ }, Xe = (t, e) => {
239
+ const n = Number(t), r = n % 100;
240
+ if (r > 20 || r < 10)
241
+ switch (r % 10) {
242
+ case 1:
243
+ return n + "st";
244
+ case 2:
245
+ return n + "nd";
246
+ case 3:
247
+ return n + "rd";
248
+ }
249
+ return n + "th";
250
+ }, Ue = {
251
+ ordinalNumber: Xe,
252
+ era: k({
253
+ values: Fe,
254
+ defaultWidth: "wide"
255
+ }),
256
+ quarter: k({
257
+ values: Ee,
258
+ defaultWidth: "wide",
259
+ argumentCallback: (t) => t - 1
260
+ }),
261
+ month: k({
262
+ values: $e,
263
+ defaultWidth: "wide"
264
+ }),
265
+ day: k({
266
+ values: He,
267
+ defaultWidth: "wide"
268
+ }),
269
+ dayPeriod: k({
270
+ values: Le,
271
+ defaultWidth: "wide",
272
+ formattingValues: _e,
273
+ defaultFormattingWidth: "wide"
274
+ })
275
+ };
276
+ function S(t) {
277
+ return (e, n = {}) => {
278
+ const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
279
+ if (!i)
280
+ return null;
281
+ const c = i[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], s = Array.isArray(u) ? Ge(u, (D) => D.test(c)) : (
282
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
283
+ Ze(u, (D) => D.test(c))
284
+ );
285
+ let f;
286
+ f = t.valueCallback ? t.valueCallback(s) : s, f = n.valueCallback ? (
287
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
288
+ n.valueCallback(f)
289
+ ) : f;
290
+ const d = e.slice(c.length);
291
+ return { value: f, rest: d };
292
+ };
293
+ }
294
+ function Ze(t, e) {
295
+ for (const n in t)
296
+ if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
297
+ return n;
298
+ }
299
+ function Ge(t, e) {
300
+ for (let n = 0; n < t.length; n++)
301
+ if (e(t[n]))
302
+ return n;
303
+ }
304
+ function Ae(t) {
305
+ return (e, n = {}) => {
306
+ const r = e.match(t.matchPattern);
307
+ if (!r) return null;
308
+ const a = r[0], i = e.match(t.parsePattern);
309
+ if (!i) return null;
310
+ let c = t.valueCallback ? t.valueCallback(i[0]) : i[0];
311
+ c = n.valueCallback ? n.valueCallback(c) : c;
312
+ const u = e.slice(a.length);
313
+ return { value: c, rest: u };
314
+ };
315
+ }
316
+ const qe = /^(\d+)(th|st|nd|rd)?/i, Re = /\d+/i, je = {
317
+ narrow: /^(b|a)/i,
318
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
319
+ wide: /^(before christ|before common era|anno domini|common era)/i
320
+ }, ze = {
321
+ any: [/^b/i, /^(a|c)/i]
322
+ }, Be = {
323
+ narrow: /^[1234]/i,
324
+ abbreviated: /^q[1234]/i,
325
+ wide: /^[1234](th|st|nd|rd)? quarter/i
326
+ }, Qe = {
327
+ any: [/1/i, /2/i, /3/i, /4/i]
328
+ }, Ve = {
329
+ narrow: /^[jfmasond]/i,
330
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
331
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
332
+ }, Je = {
333
+ narrow: [
334
+ /^j/i,
335
+ /^f/i,
336
+ /^m/i,
337
+ /^a/i,
338
+ /^m/i,
339
+ /^j/i,
340
+ /^j/i,
341
+ /^a/i,
342
+ /^s/i,
343
+ /^o/i,
344
+ /^n/i,
345
+ /^d/i
346
+ ],
347
+ any: [
348
+ /^ja/i,
349
+ /^f/i,
350
+ /^mar/i,
351
+ /^ap/i,
352
+ /^may/i,
353
+ /^jun/i,
354
+ /^jul/i,
355
+ /^au/i,
356
+ /^s/i,
357
+ /^o/i,
358
+ /^n/i,
359
+ /^d/i
360
+ ]
361
+ }, Ke = {
362
+ narrow: /^[smtwf]/i,
363
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
364
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
365
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
366
+ }, pe = {
367
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
368
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
369
+ }, et = {
370
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
371
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
372
+ }, tt = {
373
+ any: {
374
+ am: /^a/i,
375
+ pm: /^p/i,
376
+ midnight: /^mi/i,
377
+ noon: /^no/i,
378
+ morning: /morning/i,
379
+ afternoon: /afternoon/i,
380
+ evening: /evening/i,
381
+ night: /night/i
382
+ }
383
+ }, nt = {
384
+ ordinalNumber: Ae({
385
+ matchPattern: qe,
386
+ parsePattern: Re,
387
+ valueCallback: (t) => parseInt(t, 10)
388
+ }),
389
+ era: S({
390
+ matchPatterns: je,
391
+ defaultMatchWidth: "wide",
392
+ parsePatterns: ze,
393
+ defaultParseWidth: "any"
394
+ }),
395
+ quarter: S({
396
+ matchPatterns: Be,
397
+ defaultMatchWidth: "wide",
398
+ parsePatterns: Qe,
399
+ defaultParseWidth: "any",
400
+ valueCallback: (t) => t + 1
401
+ }),
402
+ month: S({
403
+ matchPatterns: Ve,
404
+ defaultMatchWidth: "wide",
405
+ parsePatterns: Je,
406
+ defaultParseWidth: "any"
407
+ }),
408
+ day: S({
409
+ matchPatterns: Ke,
410
+ defaultMatchWidth: "wide",
411
+ parsePatterns: pe,
412
+ defaultParseWidth: "any"
413
+ }),
414
+ dayPeriod: S({
415
+ matchPatterns: et,
416
+ defaultMatchWidth: "any",
417
+ parsePatterns: tt,
418
+ defaultParseWidth: "any"
419
+ })
420
+ }, ge = {
421
+ code: "en-US",
422
+ formatDistance: Pe,
423
+ formatLong: We,
424
+ formatRelative: Ce,
425
+ localize: Ue,
426
+ match: nt,
427
+ options: {
428
+ weekStartsOn: 0,
429
+ firstWeekContainsDate: 1
430
+ }
431
+ };
432
+ let rt = {};
433
+ function P() {
434
+ return rt;
435
+ }
436
+ const we = 6048e5, at = 864e5, On = 6e4, Nn = 36e5, v = 43200, V = 1440;
437
+ function l(t) {
438
+ const e = Object.prototype.toString.call(t);
439
+ 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);
440
+ }
441
+ function J(t) {
442
+ const e = l(t);
443
+ return e.setHours(0, 0, 0, 0), e;
444
+ }
445
+ function F(t) {
446
+ const e = l(t), n = new Date(
447
+ Date.UTC(
448
+ e.getFullYear(),
449
+ e.getMonth(),
450
+ e.getDate(),
451
+ e.getHours(),
452
+ e.getMinutes(),
453
+ e.getSeconds(),
454
+ e.getMilliseconds()
455
+ )
456
+ );
457
+ return n.setUTCFullYear(e.getFullYear()), +t - +n;
458
+ }
459
+ function it(t, e) {
460
+ const n = J(t), r = J(e), a = +n - F(n), i = +r - F(r);
461
+ return Math.round((a - i) / at);
462
+ }
463
+ function T(t, e) {
464
+ return t instanceof Date ? new t.constructor(e) : new Date(e);
465
+ }
466
+ function ct(t) {
467
+ const e = l(t), n = T(t, 0);
468
+ return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
469
+ }
470
+ function ut(t) {
471
+ const e = l(t);
472
+ return it(e, ct(e)) + 1;
473
+ }
474
+ function W(t, e) {
475
+ var u, s, f, d;
476
+ const n = P(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((s = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : s.weekStartsOn) ?? n.weekStartsOn ?? ((d = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : d.weekStartsOn) ?? 0, a = l(t), i = a.getDay(), c = (i < r ? 7 : 0) + i - r;
477
+ return a.setDate(a.getDate() - c), a.setHours(0, 0, 0, 0), a;
478
+ }
479
+ function E(t) {
480
+ return W(t, { weekStartsOn: 1 });
481
+ }
482
+ function De(t) {
483
+ const e = l(t), n = e.getFullYear(), r = T(t, 0);
484
+ r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
485
+ const a = E(r), i = T(t, 0);
486
+ i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
487
+ const c = E(i);
488
+ return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= c.getTime() ? n : n - 1;
489
+ }
490
+ function st(t) {
491
+ const e = De(t), n = T(t, 0);
492
+ return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), E(n);
493
+ }
494
+ function ft(t) {
495
+ const e = l(t), n = +E(e) - +st(e);
496
+ return Math.round(n / we) + 1;
497
+ }
498
+ function ye(t, e) {
499
+ var d, D, m, y;
500
+ const n = l(t), r = n.getFullYear(), a = P(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((D = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : D.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((y = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : y.firstWeekContainsDate) ?? 1, c = T(t, 0);
501
+ c.setFullYear(r + 1, 0, i), c.setHours(0, 0, 0, 0);
502
+ const u = W(c, e), s = T(t, 0);
503
+ s.setFullYear(r, 0, i), s.setHours(0, 0, 0, 0);
504
+ const f = W(s, e);
505
+ return n.getTime() >= u.getTime() ? r + 1 : n.getTime() >= f.getTime() ? r : r - 1;
506
+ }
507
+ function ot(t, e) {
508
+ var u, s, f, d;
509
+ const n = P(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((s = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : s.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, a = ye(t, e), i = T(t, 0);
510
+ return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, e);
511
+ }
512
+ function lt(t, e) {
513
+ const n = l(t), r = +W(n, e) - +ot(n, e);
514
+ return Math.round(r / we) + 1;
515
+ }
516
+ function o(t, e) {
517
+ const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
518
+ return n + r;
519
+ }
520
+ const x = {
521
+ // Year
522
+ y(t, e) {
523
+ const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
524
+ return o(e === "yy" ? r % 100 : r, e.length);
525
+ },
526
+ // Month
527
+ M(t, e) {
528
+ const n = t.getMonth();
529
+ return e === "M" ? String(n + 1) : o(n + 1, 2);
530
+ },
531
+ // Day of the month
532
+ d(t, e) {
533
+ return o(t.getDate(), e.length);
534
+ },
535
+ // AM or PM
536
+ a(t, e) {
537
+ const n = t.getHours() / 12 >= 1 ? "pm" : "am";
538
+ switch (e) {
539
+ case "a":
540
+ case "aa":
541
+ return n.toUpperCase();
542
+ case "aaa":
543
+ return n;
544
+ case "aaaaa":
545
+ return n[0];
546
+ case "aaaa":
547
+ default:
548
+ return n === "am" ? "a.m." : "p.m.";
549
+ }
550
+ },
551
+ // Hour [1-12]
552
+ h(t, e) {
553
+ return o(t.getHours() % 12 || 12, e.length);
554
+ },
555
+ // Hour [0-23]
556
+ H(t, e) {
557
+ return o(t.getHours(), e.length);
558
+ },
559
+ // Minute
560
+ m(t, e) {
561
+ return o(t.getMinutes(), e.length);
562
+ },
563
+ // Second
564
+ s(t, e) {
565
+ return o(t.getSeconds(), e.length);
566
+ },
567
+ // Fraction of second
568
+ S(t, e) {
569
+ const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
570
+ r * Math.pow(10, n - 3)
571
+ );
572
+ return o(a, e.length);
573
+ }
574
+ }, b = {
575
+ midnight: "midnight",
576
+ noon: "noon",
577
+ morning: "morning",
578
+ afternoon: "afternoon",
579
+ evening: "evening",
580
+ night: "night"
581
+ }, K = {
582
+ // Era
583
+ G: function(t, e, n) {
584
+ const r = t.getFullYear() > 0 ? 1 : 0;
585
+ switch (e) {
586
+ case "G":
587
+ case "GG":
588
+ case "GGG":
589
+ return n.era(r, { width: "abbreviated" });
590
+ case "GGGGG":
591
+ return n.era(r, { width: "narrow" });
592
+ case "GGGG":
593
+ default:
594
+ return n.era(r, { width: "wide" });
595
+ }
596
+ },
597
+ // Year
598
+ y: function(t, e, n) {
599
+ if (e === "yo") {
600
+ const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
601
+ return n.ordinalNumber(a, { unit: "year" });
602
+ }
603
+ return x.y(t, e);
604
+ },
605
+ // Local week-numbering year
606
+ Y: function(t, e, n, r) {
607
+ const a = ye(t, r), i = a > 0 ? a : 1 - a;
608
+ if (e === "YY") {
609
+ const c = i % 100;
610
+ return o(c, 2);
611
+ }
612
+ return e === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : o(i, e.length);
613
+ },
614
+ // ISO week-numbering year
615
+ R: function(t, e) {
616
+ const n = De(t);
617
+ return o(n, e.length);
618
+ },
619
+ // Extended year. This is a single number designating the year of this calendar system.
620
+ // The main difference between `y` and `u` localizers are B.C. years:
621
+ // | Year | `y` | `u` |
622
+ // |------|-----|-----|
623
+ // | AC 1 | 1 | 1 |
624
+ // | BC 1 | 1 | 0 |
625
+ // | BC 2 | 2 | -1 |
626
+ // Also `yy` always returns the last two digits of a year,
627
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
628
+ u: function(t, e) {
629
+ const n = t.getFullYear();
630
+ return o(n, e.length);
631
+ },
632
+ // Quarter
633
+ Q: function(t, e, n) {
634
+ const r = Math.ceil((t.getMonth() + 1) / 3);
635
+ switch (e) {
636
+ case "Q":
637
+ return String(r);
638
+ case "QQ":
639
+ return o(r, 2);
640
+ case "Qo":
641
+ return n.ordinalNumber(r, { unit: "quarter" });
642
+ case "QQQ":
643
+ return n.quarter(r, {
644
+ width: "abbreviated",
645
+ context: "formatting"
646
+ });
647
+ case "QQQQQ":
648
+ return n.quarter(r, {
649
+ width: "narrow",
650
+ context: "formatting"
651
+ });
652
+ case "QQQQ":
653
+ default:
654
+ return n.quarter(r, {
655
+ width: "wide",
656
+ context: "formatting"
657
+ });
658
+ }
659
+ },
660
+ // Stand-alone quarter
661
+ q: function(t, e, n) {
662
+ const r = Math.ceil((t.getMonth() + 1) / 3);
663
+ switch (e) {
664
+ case "q":
665
+ return String(r);
666
+ case "qq":
667
+ return o(r, 2);
668
+ case "qo":
669
+ return n.ordinalNumber(r, { unit: "quarter" });
670
+ case "qqq":
671
+ return n.quarter(r, {
672
+ width: "abbreviated",
673
+ context: "standalone"
674
+ });
675
+ case "qqqqq":
676
+ return n.quarter(r, {
677
+ width: "narrow",
678
+ context: "standalone"
679
+ });
680
+ case "qqqq":
681
+ default:
682
+ return n.quarter(r, {
683
+ width: "wide",
684
+ context: "standalone"
685
+ });
686
+ }
687
+ },
688
+ // Month
689
+ M: function(t, e, n) {
690
+ const r = t.getMonth();
691
+ switch (e) {
692
+ case "M":
693
+ case "MM":
694
+ return x.M(t, e);
695
+ case "Mo":
696
+ return n.ordinalNumber(r + 1, { unit: "month" });
697
+ case "MMM":
698
+ return n.month(r, {
699
+ width: "abbreviated",
700
+ context: "formatting"
701
+ });
702
+ case "MMMMM":
703
+ return n.month(r, {
704
+ width: "narrow",
705
+ context: "formatting"
706
+ });
707
+ case "MMMM":
708
+ default:
709
+ return n.month(r, { width: "wide", context: "formatting" });
710
+ }
711
+ },
712
+ // Stand-alone month
713
+ L: function(t, e, n) {
714
+ const r = t.getMonth();
715
+ switch (e) {
716
+ case "L":
717
+ return String(r + 1);
718
+ case "LL":
719
+ return o(r + 1, 2);
720
+ case "Lo":
721
+ return n.ordinalNumber(r + 1, { unit: "month" });
722
+ case "LLL":
723
+ return n.month(r, {
724
+ width: "abbreviated",
725
+ context: "standalone"
726
+ });
727
+ case "LLLLL":
728
+ return n.month(r, {
729
+ width: "narrow",
730
+ context: "standalone"
731
+ });
732
+ case "LLLL":
733
+ default:
734
+ return n.month(r, { width: "wide", context: "standalone" });
735
+ }
736
+ },
737
+ // Local week of year
738
+ w: function(t, e, n, r) {
739
+ const a = lt(t, r);
740
+ return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : o(a, e.length);
741
+ },
742
+ // ISO week of year
743
+ I: function(t, e, n) {
744
+ const r = ft(t);
745
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : o(r, e.length);
746
+ },
747
+ // Day of the month
748
+ d: function(t, e, n) {
749
+ return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : x.d(t, e);
750
+ },
751
+ // Day of year
752
+ D: function(t, e, n) {
753
+ const r = ut(t);
754
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : o(r, e.length);
755
+ },
756
+ // Day of week
757
+ E: function(t, e, n) {
758
+ const r = t.getDay();
759
+ switch (e) {
760
+ case "E":
761
+ case "EE":
762
+ case "EEE":
763
+ return n.day(r, {
764
+ width: "abbreviated",
765
+ context: "formatting"
766
+ });
767
+ case "EEEEE":
768
+ return n.day(r, {
769
+ width: "narrow",
770
+ context: "formatting"
771
+ });
772
+ case "EEEEEE":
773
+ return n.day(r, {
774
+ width: "short",
775
+ context: "formatting"
776
+ });
777
+ case "EEEE":
778
+ default:
779
+ return n.day(r, {
780
+ width: "wide",
781
+ context: "formatting"
782
+ });
783
+ }
784
+ },
785
+ // Local day of week
786
+ e: function(t, e, n, r) {
787
+ const a = t.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
788
+ switch (e) {
789
+ case "e":
790
+ return String(i);
791
+ case "ee":
792
+ return o(i, 2);
793
+ case "eo":
794
+ return n.ordinalNumber(i, { unit: "day" });
795
+ case "eee":
796
+ return n.day(a, {
797
+ width: "abbreviated",
798
+ context: "formatting"
799
+ });
800
+ case "eeeee":
801
+ return n.day(a, {
802
+ width: "narrow",
803
+ context: "formatting"
804
+ });
805
+ case "eeeeee":
806
+ return n.day(a, {
807
+ width: "short",
808
+ context: "formatting"
809
+ });
810
+ case "eeee":
811
+ default:
812
+ return n.day(a, {
813
+ width: "wide",
814
+ context: "formatting"
815
+ });
816
+ }
817
+ },
818
+ // Stand-alone local day of week
819
+ c: function(t, e, n, r) {
820
+ const a = t.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
821
+ switch (e) {
822
+ case "c":
823
+ return String(i);
824
+ case "cc":
825
+ return o(i, e.length);
826
+ case "co":
827
+ return n.ordinalNumber(i, { unit: "day" });
828
+ case "ccc":
829
+ return n.day(a, {
830
+ width: "abbreviated",
831
+ context: "standalone"
832
+ });
833
+ case "ccccc":
834
+ return n.day(a, {
835
+ width: "narrow",
836
+ context: "standalone"
837
+ });
838
+ case "cccccc":
839
+ return n.day(a, {
840
+ width: "short",
841
+ context: "standalone"
842
+ });
843
+ case "cccc":
844
+ default:
845
+ return n.day(a, {
846
+ width: "wide",
847
+ context: "standalone"
848
+ });
849
+ }
850
+ },
851
+ // ISO day of week
852
+ i: function(t, e, n) {
853
+ const r = t.getDay(), a = r === 0 ? 7 : r;
854
+ switch (e) {
855
+ case "i":
856
+ return String(a);
857
+ case "ii":
858
+ return o(a, e.length);
859
+ case "io":
860
+ return n.ordinalNumber(a, { unit: "day" });
861
+ case "iii":
862
+ return n.day(r, {
863
+ width: "abbreviated",
864
+ context: "formatting"
865
+ });
866
+ case "iiiii":
867
+ return n.day(r, {
868
+ width: "narrow",
869
+ context: "formatting"
870
+ });
871
+ case "iiiiii":
872
+ return n.day(r, {
873
+ width: "short",
874
+ context: "formatting"
875
+ });
876
+ case "iiii":
877
+ default:
878
+ return n.day(r, {
879
+ width: "wide",
880
+ context: "formatting"
881
+ });
882
+ }
883
+ },
884
+ // AM or PM
885
+ a: function(t, e, n) {
886
+ const a = t.getHours() / 12 >= 1 ? "pm" : "am";
887
+ switch (e) {
888
+ case "a":
889
+ case "aa":
890
+ return n.dayPeriod(a, {
891
+ width: "abbreviated",
892
+ context: "formatting"
893
+ });
894
+ case "aaa":
895
+ return n.dayPeriod(a, {
896
+ width: "abbreviated",
897
+ context: "formatting"
898
+ }).toLowerCase();
899
+ case "aaaaa":
900
+ return n.dayPeriod(a, {
901
+ width: "narrow",
902
+ context: "formatting"
903
+ });
904
+ case "aaaa":
905
+ default:
906
+ return n.dayPeriod(a, {
907
+ width: "wide",
908
+ context: "formatting"
909
+ });
910
+ }
911
+ },
912
+ // AM, PM, midnight, noon
913
+ b: function(t, e, n) {
914
+ const r = t.getHours();
915
+ let a;
916
+ switch (r === 12 ? a = b.noon : r === 0 ? a = b.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
917
+ case "b":
918
+ case "bb":
919
+ return n.dayPeriod(a, {
920
+ width: "abbreviated",
921
+ context: "formatting"
922
+ });
923
+ case "bbb":
924
+ return n.dayPeriod(a, {
925
+ width: "abbreviated",
926
+ context: "formatting"
927
+ }).toLowerCase();
928
+ case "bbbbb":
929
+ return n.dayPeriod(a, {
930
+ width: "narrow",
931
+ context: "formatting"
932
+ });
933
+ case "bbbb":
934
+ default:
935
+ return n.dayPeriod(a, {
936
+ width: "wide",
937
+ context: "formatting"
938
+ });
939
+ }
940
+ },
941
+ // in the morning, in the afternoon, in the evening, at night
942
+ B: function(t, e, n) {
943
+ const r = t.getHours();
944
+ let a;
945
+ switch (r >= 17 ? a = b.evening : r >= 12 ? a = b.afternoon : r >= 4 ? a = b.morning : a = b.night, e) {
946
+ case "B":
947
+ case "BB":
948
+ case "BBB":
949
+ return n.dayPeriod(a, {
950
+ width: "abbreviated",
951
+ context: "formatting"
952
+ });
953
+ case "BBBBB":
954
+ return n.dayPeriod(a, {
955
+ width: "narrow",
956
+ context: "formatting"
957
+ });
958
+ case "BBBB":
959
+ default:
960
+ return n.dayPeriod(a, {
961
+ width: "wide",
962
+ context: "formatting"
963
+ });
964
+ }
965
+ },
966
+ // Hour [1-12]
967
+ h: function(t, e, n) {
968
+ if (e === "ho") {
969
+ let r = t.getHours() % 12;
970
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
971
+ }
972
+ return x.h(t, e);
973
+ },
974
+ // Hour [0-23]
975
+ H: function(t, e, n) {
976
+ return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : x.H(t, e);
977
+ },
978
+ // Hour [0-11]
979
+ K: function(t, e, n) {
980
+ const r = t.getHours() % 12;
981
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : o(r, e.length);
982
+ },
983
+ // Hour [1-24]
984
+ k: function(t, e, n) {
985
+ let r = t.getHours();
986
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : o(r, e.length);
987
+ },
988
+ // Minute
989
+ m: function(t, e, n) {
990
+ return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : x.m(t, e);
991
+ },
992
+ // Second
993
+ s: function(t, e, n) {
994
+ return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : x.s(t, e);
995
+ },
996
+ // Fraction of second
997
+ S: function(t, e) {
998
+ return x.S(t, e);
999
+ },
1000
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1001
+ X: function(t, e, n) {
1002
+ const r = t.getTimezoneOffset();
1003
+ if (r === 0)
1004
+ return "Z";
1005
+ switch (e) {
1006
+ case "X":
1007
+ return ee(r);
1008
+ case "XXXX":
1009
+ case "XX":
1010
+ return O(r);
1011
+ case "XXXXX":
1012
+ case "XXX":
1013
+ default:
1014
+ return O(r, ":");
1015
+ }
1016
+ },
1017
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1018
+ x: function(t, e, n) {
1019
+ const r = t.getTimezoneOffset();
1020
+ switch (e) {
1021
+ case "x":
1022
+ return ee(r);
1023
+ case "xxxx":
1024
+ case "xx":
1025
+ return O(r);
1026
+ case "xxxxx":
1027
+ case "xxx":
1028
+ default:
1029
+ return O(r, ":");
1030
+ }
1031
+ },
1032
+ // Timezone (GMT)
1033
+ O: function(t, e, n) {
1034
+ const r = t.getTimezoneOffset();
1035
+ switch (e) {
1036
+ case "O":
1037
+ case "OO":
1038
+ case "OOO":
1039
+ return "GMT" + p(r, ":");
1040
+ case "OOOO":
1041
+ default:
1042
+ return "GMT" + O(r, ":");
1043
+ }
1044
+ },
1045
+ // Timezone (specific non-location)
1046
+ z: function(t, e, n) {
1047
+ const r = t.getTimezoneOffset();
1048
+ switch (e) {
1049
+ case "z":
1050
+ case "zz":
1051
+ case "zzz":
1052
+ return "GMT" + p(r, ":");
1053
+ case "zzzz":
1054
+ default:
1055
+ return "GMT" + O(r, ":");
1056
+ }
1057
+ },
1058
+ // Seconds timestamp
1059
+ t: function(t, e, n) {
1060
+ const r = Math.trunc(t.getTime() / 1e3);
1061
+ return o(r, e.length);
1062
+ },
1063
+ // Milliseconds timestamp
1064
+ T: function(t, e, n) {
1065
+ const r = t.getTime();
1066
+ return o(r, e.length);
1067
+ }
1068
+ };
1069
+ function p(t, e = "") {
1070
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), i = r % 60;
1071
+ return i === 0 ? n + String(a) : n + String(a) + e + o(i, 2);
1072
+ }
1073
+ function ee(t, e) {
1074
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + o(Math.abs(t) / 60, 2) : O(t, e);
1075
+ }
1076
+ function O(t, e = "") {
1077
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = o(Math.trunc(r / 60), 2), i = o(r % 60, 2);
1078
+ return n + a + e + i;
1079
+ }
1080
+ const te = (t, e) => {
1081
+ switch (t) {
1082
+ case "P":
1083
+ return e.date({ width: "short" });
1084
+ case "PP":
1085
+ return e.date({ width: "medium" });
1086
+ case "PPP":
1087
+ return e.date({ width: "long" });
1088
+ case "PPPP":
1089
+ default:
1090
+ return e.date({ width: "full" });
1091
+ }
1092
+ }, Me = (t, e) => {
1093
+ switch (t) {
1094
+ case "p":
1095
+ return e.time({ width: "short" });
1096
+ case "pp":
1097
+ return e.time({ width: "medium" });
1098
+ case "ppp":
1099
+ return e.time({ width: "long" });
1100
+ case "pppp":
1101
+ default:
1102
+ return e.time({ width: "full" });
1103
+ }
1104
+ }, dt = (t, e) => {
1105
+ const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1106
+ if (!a)
1107
+ return te(t, e);
1108
+ let i;
1109
+ switch (r) {
1110
+ case "P":
1111
+ i = e.dateTime({ width: "short" });
1112
+ break;
1113
+ case "PP":
1114
+ i = e.dateTime({ width: "medium" });
1115
+ break;
1116
+ case "PPP":
1117
+ i = e.dateTime({ width: "long" });
1118
+ break;
1119
+ case "PPPP":
1120
+ default:
1121
+ i = e.dateTime({ width: "full" });
1122
+ break;
1123
+ }
1124
+ return i.replace("{{date}}", te(r, e)).replace("{{time}}", Me(a, e));
1125
+ }, mt = {
1126
+ p: Me,
1127
+ P: dt
1128
+ }, ht = /^D+$/, gt = /^Y+$/, wt = ["D", "DD", "YY", "YYYY"];
1129
+ function Dt(t) {
1130
+ return ht.test(t);
1131
+ }
1132
+ function yt(t) {
1133
+ return gt.test(t);
1134
+ }
1135
+ function Mt(t, e, n) {
1136
+ const r = xt(t, e, n);
1137
+ if (console.warn(r), wt.includes(t)) throw new RangeError(r);
1138
+ }
1139
+ function xt(t, e, n) {
1140
+ const r = t[0] === "Y" ? "years" : "days of the month";
1141
+ 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`;
1142
+ }
1143
+ function Tt(t) {
1144
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
1145
+ }
1146
+ function Ot(t) {
1147
+ if (!Tt(t) && typeof t != "number")
1148
+ return !1;
1149
+ const e = l(t);
1150
+ return !isNaN(Number(e));
1151
+ }
1152
+ const Nt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Yt = /^'([^]*?)'?$/, Pt = /''/g, It = /[a-zA-Z]/;
1153
+ function xe(t, e, n) {
1154
+ var d, D, m, y, M, N, B, Q;
1155
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? ge, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((D = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : D.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((y = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : y.firstWeekContainsDate) ?? 1, c = (n == null ? void 0 : n.weekStartsOn) ?? ((N = (M = n == null ? void 0 : n.locale) == null ? void 0 : M.options) == null ? void 0 : N.weekStartsOn) ?? r.weekStartsOn ?? ((Q = (B = r.locale) == null ? void 0 : B.options) == null ? void 0 : Q.weekStartsOn) ?? 0, u = l(t);
1156
+ if (!Ot(u))
1157
+ throw new RangeError("Invalid time value");
1158
+ let s = e.match(bt).map((w) => {
1159
+ const g = w[0];
1160
+ if (g === "p" || g === "P") {
1161
+ const _ = mt[g];
1162
+ return _(w, a.formatLong);
1163
+ }
1164
+ return w;
1165
+ }).join("").match(Nt).map((w) => {
1166
+ if (w === "''")
1167
+ return { isToken: !1, value: "'" };
1168
+ const g = w[0];
1169
+ if (g === "'")
1170
+ return { isToken: !1, value: kt(w) };
1171
+ if (K[g])
1172
+ return { isToken: !0, value: w };
1173
+ if (g.match(It))
1174
+ throw new RangeError(
1175
+ "Format string contains an unescaped latin alphabet character `" + g + "`"
1176
+ );
1177
+ return { isToken: !1, value: w };
1178
+ });
1179
+ a.localize.preprocessor && (s = a.localize.preprocessor(u, s));
1180
+ const f = {
1181
+ firstWeekContainsDate: i,
1182
+ weekStartsOn: c,
1183
+ locale: a
1184
+ };
1185
+ return s.map((w) => {
1186
+ if (!w.isToken) return w.value;
1187
+ const g = w.value;
1188
+ (!(n != null && n.useAdditionalWeekYearTokens) && yt(g) || !(n != null && n.useAdditionalDayOfYearTokens) && Dt(g)) && Mt(g, e, String(t));
1189
+ const _ = K[g[0]];
1190
+ return _(u, g, a.localize, f);
1191
+ }).join("");
1192
+ }
1193
+ function kt(t) {
1194
+ const e = t.match(Yt);
1195
+ return e ? e[1].replace(Pt, "'") : t;
1196
+ }
1197
+ function C(t, e) {
1198
+ const n = l(t), r = l(e), a = n.getTime() - r.getTime();
1199
+ return a < 0 ? -1 : a > 0 ? 1 : a;
1200
+ }
1201
+ function St(t) {
1202
+ return T(t, Date.now());
1203
+ }
1204
+ function Wt(t, e) {
1205
+ const n = l(t), r = l(e), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
1206
+ return a * 12 + i;
1207
+ }
1208
+ function vt(t) {
1209
+ return (e) => {
1210
+ const r = (t ? Math[t] : Math.trunc)(e);
1211
+ return r === 0 ? 0 : r;
1212
+ };
1213
+ }
1214
+ function Ct(t, e) {
1215
+ return +l(t) - +l(e);
1216
+ }
1217
+ function Ft(t) {
1218
+ const e = l(t);
1219
+ return e.setHours(23, 59, 59, 999), e;
1220
+ }
1221
+ function Et(t) {
1222
+ const e = l(t), n = e.getMonth();
1223
+ return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
1224
+ }
1225
+ function $t(t) {
1226
+ const e = l(t);
1227
+ return +Ft(e) == +Et(e);
1228
+ }
1229
+ function Ht(t, e) {
1230
+ const n = l(t), r = l(e), a = C(n, r), i = Math.abs(
1231
+ Wt(n, r)
1232
+ );
1233
+ let c;
1234
+ if (i < 1)
1235
+ c = 0;
1236
+ else {
1237
+ n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
1238
+ let u = C(n, r) === -a;
1239
+ $t(l(t)) && i === 1 && C(t, r) === 1 && (u = !1), c = a * (i - Number(u));
1240
+ }
1241
+ return c === 0 ? 0 : c;
1242
+ }
1243
+ function Lt(t, e, n) {
1244
+ const r = Ct(t, e) / 1e3;
1245
+ return vt(n == null ? void 0 : n.roundingMethod)(r);
1246
+ }
1247
+ function _t(t, e, n) {
1248
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? ge, i = 2520, c = C(t, e);
1249
+ if (isNaN(c))
1250
+ throw new RangeError("Invalid time value");
1251
+ const u = Object.assign({}, n, {
1252
+ addSuffix: n == null ? void 0 : n.addSuffix,
1253
+ comparison: c
1254
+ });
1255
+ let s, f;
1256
+ c > 0 ? (s = l(e), f = l(t)) : (s = l(t), f = l(e));
1257
+ const d = Lt(f, s), D = (F(f) - F(s)) / 1e3, m = Math.round((d - D) / 60);
1258
+ let y;
1259
+ if (m < 2)
1260
+ return n != null && n.includeSeconds ? d < 5 ? a.formatDistance("lessThanXSeconds", 5, u) : d < 10 ? a.formatDistance("lessThanXSeconds", 10, u) : d < 20 ? a.formatDistance("lessThanXSeconds", 20, u) : d < 40 ? a.formatDistance("halfAMinute", 0, u) : d < 60 ? a.formatDistance("lessThanXMinutes", 1, u) : a.formatDistance("xMinutes", 1, u) : m === 0 ? a.formatDistance("lessThanXMinutes", 1, u) : a.formatDistance("xMinutes", m, u);
1261
+ if (m < 45)
1262
+ return a.formatDistance("xMinutes", m, u);
1263
+ if (m < 90)
1264
+ return a.formatDistance("aboutXHours", 1, u);
1265
+ if (m < V) {
1266
+ const M = Math.round(m / 60);
1267
+ return a.formatDistance("aboutXHours", M, u);
1268
+ } else {
1269
+ if (m < i)
1270
+ return a.formatDistance("xDays", 1, u);
1271
+ if (m < v) {
1272
+ const M = Math.round(m / V);
1273
+ return a.formatDistance("xDays", M, u);
1274
+ } else if (m < v * 2)
1275
+ return y = Math.round(m / v), a.formatDistance("aboutXMonths", y, u);
1276
+ }
1277
+ if (y = Ht(f, s), y < 12) {
1278
+ const M = Math.round(m / v);
1279
+ return a.formatDistance("xMonths", M, u);
1280
+ } else {
1281
+ const M = y % 12, N = Math.trunc(y / 12);
1282
+ return M < 3 ? a.formatDistance("aboutXYears", N, u) : M < 9 ? a.formatDistance("overXYears", N, u) : a.formatDistance("almostXYears", N + 1, u);
1283
+ }
1284
+ }
1285
+ function Xt(t, e) {
1286
+ return _t(t, St(t), e);
1287
+ }
1288
+ function Ut() {
1289
+ return Object.assign({}, P());
1290
+ }
1291
+ function ne(t, e, n) {
1292
+ const r = Ut(), a = At(t, n.timeZone, n.locale ?? r.locale);
1293
+ return "formatToParts" in a ? Zt(a, e) : Gt(a, e);
1294
+ }
1295
+ function Zt(t, e) {
1296
+ const n = t.formatToParts(e);
1297
+ for (let r = n.length - 1; r >= 0; --r)
1298
+ if (n[r].type === "timeZoneName")
1299
+ return n[r].value;
1300
+ }
1301
+ function Gt(t, e) {
1302
+ const n = t.format(e).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1303
+ return r ? r[0].substr(1) : "";
1304
+ }
1305
+ function At(t, e, n) {
1306
+ return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1307
+ timeZone: e,
1308
+ timeZoneName: t
1309
+ });
1310
+ }
1311
+ function qt(t, e) {
1312
+ const n = Qt(e);
1313
+ return "formatToParts" in n ? jt(n, t) : zt(n, t);
1314
+ }
1315
+ const Rt = {
1316
+ year: 0,
1317
+ month: 1,
1318
+ day: 2,
1319
+ hour: 3,
1320
+ minute: 4,
1321
+ second: 5
1322
+ };
1323
+ function jt(t, e) {
1324
+ try {
1325
+ const n = t.formatToParts(e), r = [];
1326
+ for (let a = 0; a < n.length; a++) {
1327
+ const i = Rt[n[a].type];
1328
+ i !== void 0 && (r[i] = parseInt(n[a].value, 10));
1329
+ }
1330
+ return r;
1331
+ } catch (n) {
1332
+ if (n instanceof RangeError)
1333
+ return [NaN];
1334
+ throw n;
1335
+ }
1336
+ }
1337
+ function zt(t, e) {
1338
+ const n = t.format(e), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
1339
+ return [
1340
+ parseInt(r[3], 10),
1341
+ parseInt(r[1], 10),
1342
+ parseInt(r[2], 10),
1343
+ parseInt(r[4], 10),
1344
+ parseInt(r[5], 10),
1345
+ parseInt(r[6], 10)
1346
+ ];
1347
+ }
1348
+ const U = {}, re = new Intl.DateTimeFormat("en-US", {
1349
+ hourCycle: "h23",
1350
+ timeZone: "America/New_York",
1351
+ year: "numeric",
1352
+ month: "2-digit",
1353
+ day: "2-digit",
1354
+ hour: "2-digit",
1355
+ minute: "2-digit",
1356
+ second: "2-digit"
1357
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), Bt = re === "06/25/2014, 00:00:00" || re === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
1358
+ function Qt(t) {
1359
+ return U[t] || (U[t] = Bt ? new Intl.DateTimeFormat("en-US", {
1360
+ hourCycle: "h23",
1361
+ timeZone: t,
1362
+ year: "numeric",
1363
+ month: "numeric",
1364
+ day: "2-digit",
1365
+ hour: "2-digit",
1366
+ minute: "2-digit",
1367
+ second: "2-digit"
1368
+ }) : new Intl.DateTimeFormat("en-US", {
1369
+ hour12: !1,
1370
+ timeZone: t,
1371
+ year: "numeric",
1372
+ month: "numeric",
1373
+ day: "2-digit",
1374
+ hour: "2-digit",
1375
+ minute: "2-digit",
1376
+ second: "2-digit"
1377
+ })), U[t];
1378
+ }
1379
+ function z(t, e, n, r, a, i, c) {
1380
+ const u = /* @__PURE__ */ new Date(0);
1381
+ return u.setUTCFullYear(t, e, n), u.setUTCHours(r, a, i, c), u;
1382
+ }
1383
+ const ae = 36e5, Vt = 6e4, Z = {
1384
+ timezoneZ: /^(Z)$/,
1385
+ timezoneHH: /^([+-]\d{2})$/,
1386
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
1387
+ };
1388
+ function L(t, e, n) {
1389
+ if (!t)
1390
+ return 0;
1391
+ let r = Z.timezoneZ.exec(t);
1392
+ if (r)
1393
+ return 0;
1394
+ let a, i;
1395
+ if (r = Z.timezoneHH.exec(t), r)
1396
+ return a = parseInt(r[1], 10), ie(a) ? -(a * ae) : NaN;
1397
+ if (r = Z.timezoneHHMM.exec(t), r) {
1398
+ a = parseInt(r[2], 10);
1399
+ const c = parseInt(r[3], 10);
1400
+ return ie(a, c) ? (i = Math.abs(a) * ae + c * Vt, r[1] === "+" ? -i : i) : NaN;
1401
+ }
1402
+ if (pt(t)) {
1403
+ e = new Date(e || Date.now());
1404
+ const c = n ? e : Jt(e), u = R(c, t);
1405
+ return -(n ? u : Kt(e, u, t));
1406
+ }
1407
+ return NaN;
1408
+ }
1409
+ function Jt(t) {
1410
+ return z(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds());
1411
+ }
1412
+ function R(t, e) {
1413
+ const n = qt(t, e), r = z(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
1414
+ let a = t.getTime();
1415
+ const i = a % 1e3;
1416
+ return a -= i >= 0 ? i : 1e3 + i, r - a;
1417
+ }
1418
+ function Kt(t, e, n) {
1419
+ let a = t.getTime() - e;
1420
+ const i = R(new Date(a), n);
1421
+ if (e === i)
1422
+ return e;
1423
+ a -= i - e;
1424
+ const c = R(new Date(a), n);
1425
+ return i === c ? i : Math.max(i, c);
1426
+ }
1427
+ function ie(t, e) {
1428
+ return -23 <= t && t <= 23 && (e == null || 0 <= e && e <= 59);
1429
+ }
1430
+ const ce = {};
1431
+ function pt(t) {
1432
+ if (ce[t])
1433
+ return !0;
1434
+ try {
1435
+ return new Intl.DateTimeFormat(void 0, { timeZone: t }), ce[t] = !0, !0;
1436
+ } catch {
1437
+ return !1;
1438
+ }
1439
+ }
1440
+ const en = 60 * 1e3, tn = {
1441
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1442
+ X: function(t, e, n) {
1443
+ const r = G(n.timeZone, t);
1444
+ if (r === 0)
1445
+ return "Z";
1446
+ switch (e) {
1447
+ case "X":
1448
+ return ue(r);
1449
+ case "XXXX":
1450
+ case "XX":
1451
+ return Y(r);
1452
+ case "XXXXX":
1453
+ case "XXX":
1454
+ default:
1455
+ return Y(r, ":");
1456
+ }
1457
+ },
1458
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1459
+ x: function(t, e, n) {
1460
+ const r = G(n.timeZone, t);
1461
+ switch (e) {
1462
+ case "x":
1463
+ return ue(r);
1464
+ case "xxxx":
1465
+ case "xx":
1466
+ return Y(r);
1467
+ case "xxxxx":
1468
+ case "xxx":
1469
+ default:
1470
+ return Y(r, ":");
1471
+ }
1472
+ },
1473
+ // Timezone (GMT)
1474
+ O: function(t, e, n) {
1475
+ const r = G(n.timeZone, t);
1476
+ switch (e) {
1477
+ case "O":
1478
+ case "OO":
1479
+ case "OOO":
1480
+ return "GMT" + nn(r, ":");
1481
+ case "OOOO":
1482
+ default:
1483
+ return "GMT" + Y(r, ":");
1484
+ }
1485
+ },
1486
+ // Timezone (specific non-location)
1487
+ z: function(t, e, n) {
1488
+ switch (e) {
1489
+ case "z":
1490
+ case "zz":
1491
+ case "zzz":
1492
+ return ne("short", t, n);
1493
+ case "zzzz":
1494
+ default:
1495
+ return ne("long", t, n);
1496
+ }
1497
+ }
1498
+ };
1499
+ function G(t, e) {
1500
+ const n = t ? L(t, e, !0) / en : (e == null ? void 0 : e.getTimezoneOffset()) ?? 0;
1501
+ if (Number.isNaN(n))
1502
+ throw new RangeError("Invalid time zone specified: " + t);
1503
+ return n;
1504
+ }
1505
+ function $(t, e) {
1506
+ const n = t < 0 ? "-" : "";
1507
+ let r = Math.abs(t).toString();
1508
+ for (; r.length < e; )
1509
+ r = "0" + r;
1510
+ return n + r;
1511
+ }
1512
+ function Y(t, e = "") {
1513
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = $(Math.floor(r / 60), 2), i = $(Math.floor(r % 60), 2);
1514
+ return n + a + e + i;
1515
+ }
1516
+ function ue(t, e) {
1517
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + $(Math.abs(t) / 60, 2) : Y(t, e);
1518
+ }
1519
+ function nn(t, e = "") {
1520
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.floor(r / 60), i = r % 60;
1521
+ return i === 0 ? n + String(a) : n + String(a) + e + $(i, 2);
1522
+ }
1523
+ function se(t) {
1524
+ const e = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
1525
+ return e.setUTCFullYear(t.getFullYear()), +t - +e;
1526
+ }
1527
+ const Te = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, A = 36e5, fe = 6e4, rn = 2, h = {
1528
+ dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
1529
+ datePattern: /^([0-9W+-]+)(.*)/,
1530
+ // year tokens
1531
+ YY: /^(\d{2})$/,
1532
+ YYY: [
1533
+ /^([+-]\d{2})$/,
1534
+ // 0 additional digits
1535
+ /^([+-]\d{3})$/,
1536
+ // 1 additional digit
1537
+ /^([+-]\d{4})$/
1538
+ // 2 additional digits
1539
+ ],
1540
+ YYYY: /^(\d{4})/,
1541
+ YYYYY: [
1542
+ /^([+-]\d{4})/,
1543
+ // 0 additional digits
1544
+ /^([+-]\d{5})/,
1545
+ // 1 additional digit
1546
+ /^([+-]\d{6})/
1547
+ // 2 additional digits
1548
+ ],
1549
+ // date tokens
1550
+ MM: /^-(\d{2})$/,
1551
+ DDD: /^-?(\d{3})$/,
1552
+ MMDD: /^-?(\d{2})-?(\d{2})$/,
1553
+ Www: /^-?W(\d{2})$/,
1554
+ WwwD: /^-?W(\d{2})-?(\d{1})$/,
1555
+ HH: /^(\d{2}([.,]\d*)?)$/,
1556
+ HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
1557
+ HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
1558
+ // time zone tokens (to identify the presence of a tz)
1559
+ timeZone: Te
1560
+ };
1561
+ function H(t, e = {}) {
1562
+ if (arguments.length < 1)
1563
+ throw new TypeError("1 argument required, but only " + arguments.length + " present");
1564
+ if (t === null)
1565
+ return /* @__PURE__ */ new Date(NaN);
1566
+ const n = e.additionalDigits == null ? rn : Number(e.additionalDigits);
1567
+ if (n !== 2 && n !== 1 && n !== 0)
1568
+ throw new RangeError("additionalDigits must be 0, 1 or 2");
1569
+ if (t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]")
1570
+ return new Date(t.getTime());
1571
+ if (typeof t == "number" || Object.prototype.toString.call(t) === "[object Number]")
1572
+ return new Date(t);
1573
+ if (Object.prototype.toString.call(t) !== "[object String]")
1574
+ return /* @__PURE__ */ new Date(NaN);
1575
+ const r = an(t), { year: a, restDateString: i } = cn(r.date, n), c = un(i, a);
1576
+ if (c === null || isNaN(c.getTime()))
1577
+ return /* @__PURE__ */ new Date(NaN);
1578
+ if (c) {
1579
+ const u = c.getTime();
1580
+ let s = 0, f;
1581
+ if (r.time && (s = sn(r.time), s === null || isNaN(s)))
1582
+ return /* @__PURE__ */ new Date(NaN);
1583
+ if (r.timeZone || e.timeZone) {
1584
+ if (f = L(r.timeZone || e.timeZone, new Date(u + s)), isNaN(f))
1585
+ return /* @__PURE__ */ new Date(NaN);
1586
+ } else
1587
+ f = se(new Date(u + s)), f = se(new Date(u + s + f));
1588
+ return new Date(u + s + f);
1589
+ } else
1590
+ return /* @__PURE__ */ new Date(NaN);
1591
+ }
1592
+ function an(t) {
1593
+ const e = {};
1594
+ let n = h.dateTimePattern.exec(t), r;
1595
+ if (n ? (e.date = n[1], r = n[3]) : (n = h.datePattern.exec(t), n ? (e.date = n[1], r = n[2]) : (e.date = null, r = t)), r) {
1596
+ const a = h.timeZone.exec(r);
1597
+ a ? (e.time = r.replace(a[1], ""), e.timeZone = a[1].trim()) : e.time = r;
1598
+ }
1599
+ return e;
1600
+ }
1601
+ function cn(t, e) {
1602
+ if (t) {
1603
+ const n = h.YYY[e], r = h.YYYYY[e];
1604
+ let a = h.YYYY.exec(t) || r.exec(t);
1605
+ if (a) {
1606
+ const i = a[1];
1607
+ return {
1608
+ year: parseInt(i, 10),
1609
+ restDateString: t.slice(i.length)
1610
+ };
1611
+ }
1612
+ if (a = h.YY.exec(t) || n.exec(t), a) {
1613
+ const i = a[1];
1614
+ return {
1615
+ year: parseInt(i, 10) * 100,
1616
+ restDateString: t.slice(i.length)
1617
+ };
1618
+ }
1619
+ }
1620
+ return {
1621
+ year: null
1622
+ };
1623
+ }
1624
+ function un(t, e) {
1625
+ if (e === null)
1626
+ return null;
1627
+ let n, r, a;
1628
+ if (!t || !t.length)
1629
+ return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(e), n;
1630
+ let i = h.MM.exec(t);
1631
+ if (i)
1632
+ return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1, le(e, r) ? (n.setUTCFullYear(e, r), n) : /* @__PURE__ */ new Date(NaN);
1633
+ if (i = h.DDD.exec(t), i) {
1634
+ n = /* @__PURE__ */ new Date(0);
1635
+ const c = parseInt(i[1], 10);
1636
+ return ln(e, c) ? (n.setUTCFullYear(e, 0, c), n) : /* @__PURE__ */ new Date(NaN);
1637
+ }
1638
+ if (i = h.MMDD.exec(t), i) {
1639
+ n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1;
1640
+ const c = parseInt(i[2], 10);
1641
+ return le(e, r, c) ? (n.setUTCFullYear(e, r, c), n) : /* @__PURE__ */ new Date(NaN);
1642
+ }
1643
+ if (i = h.Www.exec(t), i)
1644
+ return a = parseInt(i[1], 10) - 1, de(a) ? oe(e, a) : /* @__PURE__ */ new Date(NaN);
1645
+ if (i = h.WwwD.exec(t), i) {
1646
+ a = parseInt(i[1], 10) - 1;
1647
+ const c = parseInt(i[2], 10) - 1;
1648
+ return de(a, c) ? oe(e, a, c) : /* @__PURE__ */ new Date(NaN);
1649
+ }
1650
+ return null;
1651
+ }
1652
+ function sn(t) {
1653
+ let e, n, r = h.HH.exec(t);
1654
+ if (r)
1655
+ return e = parseFloat(r[1].replace(",", ".")), q(e) ? e % 24 * A : NaN;
1656
+ if (r = h.HHMM.exec(t), r)
1657
+ return e = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), q(e, n) ? e % 24 * A + n * fe : NaN;
1658
+ if (r = h.HHMMSS.exec(t), r) {
1659
+ e = parseInt(r[1], 10), n = parseInt(r[2], 10);
1660
+ const a = parseFloat(r[3].replace(",", "."));
1661
+ return q(e, n, a) ? e % 24 * A + n * fe + a * 1e3 : NaN;
1662
+ }
1663
+ return null;
1664
+ }
1665
+ function oe(t, e, n) {
1666
+ e = e || 0, n = n || 0;
1667
+ const r = /* @__PURE__ */ new Date(0);
1668
+ r.setUTCFullYear(t, 0, 4);
1669
+ const a = r.getUTCDay() || 7, i = e * 7 + n + 1 - a;
1670
+ return r.setUTCDate(r.getUTCDate() + i), r;
1671
+ }
1672
+ const fn = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], on = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1673
+ function Oe(t) {
1674
+ return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
1675
+ }
1676
+ function le(t, e, n) {
1677
+ if (e < 0 || e > 11)
1678
+ return !1;
1679
+ if (n != null) {
1680
+ if (n < 1)
1681
+ return !1;
1682
+ const r = Oe(t);
1683
+ if (r && n > on[e] || !r && n > fn[e])
1684
+ return !1;
1685
+ }
1686
+ return !0;
1687
+ }
1688
+ function ln(t, e) {
1689
+ if (e < 1)
1690
+ return !1;
1691
+ const n = Oe(t);
1692
+ return !(n && e > 366 || !n && e > 365);
1693
+ }
1694
+ function de(t, e) {
1695
+ return !(t < 0 || t > 52 || e != null && (e < 0 || e > 6));
1696
+ }
1697
+ function q(t, e, n) {
1698
+ return !(t < 0 || t >= 25 || e != null && (e < 0 || e >= 60) || n != null && (n < 0 || n >= 60));
1699
+ }
1700
+ const dn = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1701
+ function mn(t, e, n = {}) {
1702
+ e = String(e);
1703
+ const r = e.match(dn);
1704
+ if (r) {
1705
+ const a = H(n.originalDate || t, n);
1706
+ e = r.reduce(function(i, c) {
1707
+ if (c[0] === "'")
1708
+ return i;
1709
+ const u = i.indexOf(c), s = i[u - 1] === "'", f = i.replace(c, "'" + tn[c[0]](a, c, n) + "'");
1710
+ return s ? f.substring(0, u - 1) + f.substring(u + 1) : f;
1711
+ }, e);
1712
+ }
1713
+ return xe(t, e, n);
1714
+ }
1715
+ function hn(t, e, n) {
1716
+ t = H(t, n);
1717
+ const r = L(e, t, !0), a = new Date(t.getTime() - r), i = /* @__PURE__ */ new Date(0);
1718
+ return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
1719
+ }
1720
+ function gn(t, e, n, r) {
1721
+ return r = {
1722
+ ...r,
1723
+ timeZone: e,
1724
+ originalDate: t
1725
+ }, mn(hn(t, e, { timeZone: r.timeZone }), n, r);
1726
+ }
1727
+ function wn(t, e, n) {
1728
+ if (typeof t == "string" && !t.match(Te))
1729
+ return H(t, { ...n, timeZone: e });
1730
+ t = H(t, n);
1731
+ const r = z(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()).getTime(), a = L(e, new Date(r));
1732
+ return new Date(r + a);
1733
+ }
1734
+ function me(t) {
1735
+ if (!t) return !1;
1736
+ const e = t.toLowerCase().replace("_", "-");
1737
+ return e === "en-in" || e.startsWith("en-in-");
1738
+ }
1739
+ function he(t, e) {
1740
+ const n = Math.abs(t);
1741
+ return n >= 1e12 ? { divisor: 1e12, suffix: "T" } : n >= 1e9 ? { divisor: 1e9, suffix: "B" } : me(e) && n >= 1e7 ? { divisor: 1e7, suffix: "Cr" } : n >= 1e6 ? { divisor: 1e6, suffix: "M" } : me(e) && n >= 1e5 ? { divisor: 1e5, suffix: "L" } : n >= 1e3 ? { divisor: 1e3, suffix: "K" } : { divisor: 1, suffix: "" };
1742
+ }
1743
+ function j(t, e) {
1744
+ try {
1745
+ const n = I(e);
1746
+ return he(t, n);
1747
+ } catch {
1748
+ return he(t, "en-US");
1749
+ }
1750
+ }
1751
+ function Dn(t) {
1752
+ try {
1753
+ return new Intl.NumberFormat(t), !0;
1754
+ } catch {
1755
+ return !1;
1756
+ }
1757
+ }
1758
+ function I(t) {
1759
+ return t && Dn(t) ? t : "en-US";
1760
+ }
1761
+ function Ne(t, e) {
1762
+ if (t == null || isNaN(t))
1763
+ return "";
1764
+ const n = I(e == null ? void 0 : e.locale);
1765
+ let r = t;
1766
+ if (e != null && e.multiplyBy && (r *= e.multiplyBy), e != null && e.useSuffix) {
1767
+ const { divisor: i, suffix: c } = j(r, n);
1768
+ r = r / i;
1769
+ const u = new Intl.NumberFormat(n, {
1770
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1771
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1772
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1773
+ }).format(r);
1774
+ return `${(e == null ? void 0 : e.prefix) ?? ""}${u}${c}${(e == null ? void 0 : e.suffix) ?? ""}`;
1775
+ }
1776
+ const a = new Intl.NumberFormat(n, {
1777
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1778
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1779
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1780
+ }).format(r);
1781
+ if (e != null && e.negativeInParentheses && r < 0) {
1782
+ const i = a.replace("-", "");
1783
+ return `(${(e == null ? void 0 : e.prefix) ?? ""}${i}${(e == null ? void 0 : e.suffix) ?? ""})`;
1784
+ }
1785
+ return `${(e == null ? void 0 : e.prefix) ?? ""}${a}${(e == null ? void 0 : e.suffix) ?? ""}`;
1786
+ }
1787
+ function yn(t, e) {
1788
+ if (t == null || isNaN(t))
1789
+ return "";
1790
+ const n = I(e == null ? void 0 : e.locale), r = (e == null ? void 0 : e.currency) || "USD", a = t < 0, i = !!(e != null && e.negativeInParentheses && a), c = i ? Math.abs(t) : t;
1791
+ try {
1792
+ if (e != null && e.useSuffix) {
1793
+ const { divisor: s, suffix: f } = j(c, n), d = c / s, m = `${new Intl.NumberFormat(n, {
1794
+ style: "currency",
1795
+ currency: r,
1796
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1797
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1798
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1799
+ }).format(d)}${f}`;
1800
+ return i ? `(${m})` : m;
1801
+ }
1802
+ const u = new Intl.NumberFormat(n, {
1803
+ style: "currency",
1804
+ currency: r,
1805
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1806
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1807
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1808
+ }).format(c);
1809
+ return i ? `(${u})` : u;
1810
+ } catch {
1811
+ const u = Math.abs(t), s = e != null && e.useSuffix ? j(u, n) : { divisor: 1, suffix: "" }, f = Ne(
1812
+ u / s.divisor,
1813
+ {
1814
+ locale: n,
1815
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1816
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1817
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1818
+ }
1819
+ ), d = `${r} ${f}${s.suffix}`;
1820
+ return a ? e != null && e.negativeInParentheses ? `(${d})` : `-${d}` : d;
1821
+ }
1822
+ }
1823
+ function Mn(t, e) {
1824
+ if (t == null || isNaN(t))
1825
+ return "";
1826
+ const n = I(e == null ? void 0 : e.locale), a = (e == null ? void 0 : e.alreadyPercent) ?? (e == null ? void 0 : e.percentValueMode) === "whole" ? t / 100 : t;
1827
+ return new Intl.NumberFormat(n, {
1828
+ style: "percent",
1829
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1830
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1831
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1832
+ }).format(a);
1833
+ }
1834
+ function xn(t, e) {
1835
+ if (t == null || isNaN(t))
1836
+ return "";
1837
+ const n = I(e == null ? void 0 : e.locale);
1838
+ return new Intl.NumberFormat(n, {
1839
+ notation: "scientific",
1840
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1841
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2
1842
+ }).format(t);
1843
+ }
1844
+ function bn(t, e, n = "en-US") {
1845
+ if (t == null || isNaN(t))
1846
+ return "";
1847
+ const r = I((e == null ? void 0 : e.locale) || n), a = (e == null ? void 0 : e.style) || "decimal";
1848
+ if (a === "percent") {
1849
+ const c = ((e == null ? void 0 : e.percentValueMode) ?? "whole") === "whole" ? t / 100 : t;
1850
+ return new Intl.NumberFormat(r, {
1851
+ style: "percent",
1852
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1853
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1854
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1855
+ }).format(c);
1856
+ }
1857
+ return a === "currency" ? new Intl.NumberFormat(r, {
1858
+ style: "currency",
1859
+ currency: (e == null ? void 0 : e.currency) || "USD",
1860
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1861
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1862
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1863
+ }).format(t) : new Intl.NumberFormat(r, {
1864
+ minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
1865
+ maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
1866
+ useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
1867
+ }).format(t);
1868
+ }
1869
+ function Yn(t, e, n) {
1870
+ const r = {
1871
+ style: e === "currency" ? "currency" : e === "percent" ? "percent" : "decimal",
1872
+ locale: n == null ? void 0 : n.locale,
1873
+ currency: n == null ? void 0 : n.currency,
1874
+ minimumFractionDigits: n == null ? void 0 : n.decimalPlaces,
1875
+ maximumFractionDigits: n == null ? void 0 : n.decimalPlaces,
1876
+ useSuffix: n == null ? void 0 : n.useSuffix,
1877
+ prefix: n == null ? void 0 : n.prefix,
1878
+ suffix: n == null ? void 0 : n.suffix,
1879
+ negativeInParentheses: n == null ? void 0 : n.negativeInParentheses,
1880
+ multiplyBy: n == null ? void 0 : n.multiplyBy
1881
+ };
1882
+ switch (e) {
1883
+ case "currency":
1884
+ return yn(t, r);
1885
+ case "percent":
1886
+ return Mn(t, r);
1887
+ case "scientific":
1888
+ return xn(t, r);
1889
+ default:
1890
+ return Ne(t, r);
1891
+ }
1892
+ }
1893
+ function Pn(t, e) {
1894
+ return t && t !== "auto" ? t : e;
1895
+ }
1896
+ function In(t, e = /* @__PURE__ */ new Date()) {
1897
+ try {
1898
+ const n = {
1899
+ timeZone: t,
1900
+ timeZoneName: "short"
1901
+ }, a = new Intl.DateTimeFormat("en-US", n).formatToParts(e).find((i) => i.type === "timeZoneName");
1902
+ return (a == null ? void 0 : a.value) || t;
1903
+ } catch {
1904
+ return t;
1905
+ }
1906
+ }
1907
+ function kn(t) {
1908
+ try {
1909
+ const e = {
1910
+ timeZone: t,
1911
+ timeZoneName: "long"
1912
+ }, r = new Intl.DateTimeFormat("en-US", e).formatToParts(
1913
+ /* @__PURE__ */ new Date()
1914
+ ).find((a) => a.type === "timeZoneName");
1915
+ return (r == null ? void 0 : r.value) || t;
1916
+ } catch {
1917
+ return t;
1918
+ }
1919
+ }
1920
+ function be(t, e = "auto") {
1921
+ if (!t)
1922
+ return /* @__PURE__ */ new Date(NaN);
1923
+ const n = t.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(t), a = /\([A-Z]{3,4}\)$/.test(t);
1924
+ if (e === "auto")
1925
+ return n || r || a ? new Date(t) : /* @__PURE__ */ new Date(t + "Z");
1926
+ if (e === "local") {
1927
+ if (n || r) {
1928
+ const i = t.replace(/Z$/, "").replace(/[+-]\d{2}:?\d{2}$/, "");
1929
+ return new Date(i);
1930
+ }
1931
+ return new Date(t);
1932
+ } else return e === "UTC" ? n ? new Date(t) : r ? new Date(t) : /* @__PURE__ */ new Date(t + "Z") : n || r || a ? new Date(t) : wn(t, e);
1933
+ }
1934
+ const Tn = "MM/dd/yyyy", Sn = (t, e, n, r = "auto") => {
1935
+ if (!t)
1936
+ return "";
1937
+ try {
1938
+ const a = be(t, r);
1939
+ if (isNaN(a.getTime()))
1940
+ return t;
1941
+ const c = (e && e.trim() ? e : Tn).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1942
+ return n && n !== "auto" ? gn(a, n, c) : xe(a, c);
1943
+ } catch (a) {
1944
+ return console.error("Date formatting error:", a), t;
1945
+ }
1946
+ }, Wn = (t, e = "auto") => {
1947
+ if (!t)
1948
+ return "";
1949
+ try {
1950
+ const n = be(t, e);
1951
+ return isNaN(n.getTime()) ? t : Xt(n, { addSuffix: !0 });
1952
+ } catch (n) {
1953
+ return console.error("Relative time formatting error:", n), t;
1954
+ }
1955
+ };
1956
+ export {
1957
+ Wn as a,
1958
+ Sn as b,
1959
+ Ne as c,
1960
+ yn as d,
1961
+ Mn as e,
1962
+ bn as f,
1963
+ xn as g,
1964
+ Yn as h,
1965
+ In as i,
1966
+ kn as j,
1967
+ Xt as k,
1968
+ xe as l,
1969
+ T as m,
1970
+ Nn as n,
1971
+ On as o,
1972
+ be as p,
1973
+ gn as q,
1974
+ Pn as r,
1975
+ wn as s,
1976
+ l as t,
1977
+ hn as u
1978
+ };