react-semaphor 0.1.540 → 0.1.542

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 (118) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +50 -45
  5. package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
  6. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-oHF5lTjA.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
  12. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-CIn22Qgp.js} +69 -70
  13. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  14. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-ZUYsIExq.js} +4 -4
  15. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-s5WJBcK8.js} +1 -1
  16. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-C6MJVyoI.js} +2357 -4948
  17. package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-DLdereA7.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/index-CV5rHq5D.js +2673 -0
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-DjPqgFly.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-BWSpRsPj.js} +38555 -40449
  37. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +399 -380
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -238
  53. package/dist/index.js +174 -175
  54. package/dist/pdf-export-policy/index.js +20 -10
  55. package/dist/report-runtime-context/index.js +1 -1
  56. package/dist/surfboard/index.js +2 -2
  57. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  58. package/dist/types/briefings/attachments.d.ts +17 -1
  59. package/dist/types/briefings/index.d.ts +6 -3
  60. package/dist/types/index.js +48 -48
  61. package/dist/types/lib/api/exports-api.d.ts +11 -65
  62. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  63. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  64. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  65. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  66. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  67. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  68. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  69. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  70. package/dist/types/lib/types/common-types.d.ts +7 -0
  71. package/dist/types/lib/types/explorer-types.d.ts +8 -2
  72. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  73. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  74. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  75. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  76. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  77. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  78. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  79. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  80. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  81. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  82. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  83. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  84. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  85. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  86. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  87. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  88. package/dist/types/shared/format-utils/index.d.ts +3 -0
  89. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  90. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  91. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  92. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  93. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  94. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  95. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  96. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  97. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  98. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  99. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  100. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  101. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  102. package/package.json +2 -1
  103. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +0 -979
  104. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  105. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  106. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  107. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  108. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  109. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  110. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  111. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  112. package/dist/chunks/index-CqMiAkay.js +0 -3164
  113. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  114. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  115. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  116. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  117. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  118. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,42 +1,41 @@
1
- import { aD as he, w as j, l as ge, a4 as ye } from "./validators-Ej1DdCXa.js";
2
- import "./matrix-operation-contract-B8PBF1Gd.js";
3
- import { j as we } from "./analytics-base-schemas-BFAoRlkU.js";
1
+ import { aC as ge, w as U, l as ye, a2 as we } from "./validators-DMHTpf7a.js";
2
+ import "./matrix-operation-contract-8OIO4gob.js";
3
+ import { j as be } from "./analytics-base-schemas-BFAoRlkU.js";
4
4
  import "zod";
5
- import { C as ae, D as ie, B as be, h as Me, i as I, z as De, q as xe, n as pe, g as Oe, k as Te } from "./raw-temporal-D61lr48Y.js";
6
- import { l as ve, n as se, h as H, j as C, c as Pe, f as Se } from "./temporal-bucket-D8JF7zKz.js";
7
- function h(e) {
5
+ import { W as Me, X as se, S as Z, U as C, Y as oe, Z as ue, Q as xe, k as De, i as I, F as pe, f as Oe, p as Te, r as ve, u as Pe, j as Se, m as ke } from "./temporal-bucket-D7NBrrtL.js";
6
+ function d(e) {
8
7
  const t = Object.prototype.toString.call(e);
9
8
  return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
10
9
  }
11
- function D(e, t) {
10
+ function x(e, t) {
12
11
  return e instanceof Date ? new e.constructor(t) : new Date(t);
13
12
  }
14
- let ke = {};
13
+ let We = {};
15
14
  function P() {
16
- return ke;
15
+ return We;
17
16
  }
18
17
  function W(e, t) {
19
- var s, c, u, m;
20
- const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((m = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : m.weekStartsOn) ?? 0, a = h(e), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
21
- return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
18
+ var o, f, l, u;
19
+ const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((f = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, a = d(e), i = a.getDay(), s = (i < r ? 7 : 0) + i - r;
20
+ return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
22
21
  }
23
- function N(e) {
22
+ function Y(e) {
24
23
  return W(e, { weekStartsOn: 1 });
25
24
  }
26
- function oe(e) {
27
- const t = h(e), n = t.getFullYear(), r = D(e, 0);
25
+ function ce(e) {
26
+ const t = d(e), n = t.getFullYear(), r = x(e, 0);
28
27
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
29
- const a = N(r), i = D(e, 0);
28
+ const a = Y(r), i = x(e, 0);
30
29
  i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
31
- const o = N(i);
32
- return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= o.getTime() ? n : n - 1;
30
+ const s = Y(i);
31
+ return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= s.getTime() ? n : n - 1;
33
32
  }
34
- function U(e) {
35
- const t = h(e);
33
+ function V(e) {
34
+ const t = d(e);
36
35
  return t.setHours(0, 0, 0, 0), t;
37
36
  }
38
37
  function E(e) {
39
- const t = h(e), n = new Date(
38
+ const t = d(e), n = new Date(
40
39
  Date.UTC(
41
40
  t.getFullYear(),
42
41
  t.getMonth(),
@@ -49,32 +48,32 @@ function E(e) {
49
48
  );
50
49
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
51
50
  }
52
- function We(e, t) {
53
- const n = U(e), r = U(t), a = +n - E(n), i = +r - E(r);
54
- return Math.round((a - i) / ve);
51
+ function Ce(e, t) {
52
+ const n = V(e), r = V(t), a = +n - E(n), i = +r - E(r);
53
+ return Math.round((a - i) / Me);
55
54
  }
56
- function Ce(e) {
57
- const t = oe(e), n = D(e, 0);
58
- return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), N(n);
55
+ function Fe(e) {
56
+ const t = ce(e), n = x(e, 0);
57
+ return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), Y(n);
59
58
  }
60
- function Y(e, t) {
61
- const n = h(e), r = h(t), a = n.getTime() - r.getTime();
59
+ function F(e, t) {
60
+ const n = d(e), r = d(t), a = n.getTime() - r.getTime();
62
61
  return a < 0 ? -1 : a > 0 ? 1 : a;
63
62
  }
64
- function Ye(e) {
65
- return D(e, Date.now());
63
+ function Ne(e) {
64
+ return x(e, Date.now());
66
65
  }
67
- function Fe(e) {
66
+ function Ye(e) {
68
67
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
69
68
  }
70
- function Ne(e) {
71
- if (!Fe(e) && typeof e != "number")
69
+ function Ee(e) {
70
+ if (!Ye(e) && typeof e != "number")
72
71
  return !1;
73
- const t = h(e);
72
+ const t = d(e);
74
73
  return !isNaN(Number(t));
75
74
  }
76
- function Ee(e, t) {
77
- const n = h(e), r = h(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
75
+ function Le(e, t) {
76
+ const n = d(e), r = d(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
78
77
  return a * 12 + i;
79
78
  }
80
79
  function ze(e) {
@@ -83,41 +82,41 @@ function ze(e) {
83
82
  return r === 0 ? 0 : r;
84
83
  };
85
84
  }
86
- function Le(e, t) {
87
- return +h(e) - +h(t);
85
+ function Xe(e, t) {
86
+ return +d(e) - +d(t);
88
87
  }
89
- function Xe(e) {
90
- const t = h(e);
88
+ function _e(e) {
89
+ const t = d(e);
91
90
  return t.setHours(23, 59, 59, 999), t;
92
91
  }
93
- function _e(e) {
94
- const t = h(e), n = t.getMonth();
92
+ function qe(e) {
93
+ const t = d(e), n = t.getMonth();
95
94
  return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
96
95
  }
97
- function qe(e) {
98
- const t = h(e);
99
- return +Xe(t) == +_e(t);
96
+ function Ie(e) {
97
+ const t = d(e);
98
+ return +_e(t) == +qe(t);
100
99
  }
101
- function Ie(e, t) {
102
- const n = h(e), r = h(t), a = Y(n, r), i = Math.abs(
103
- Ee(n, r)
100
+ function Re(e, t) {
101
+ const n = d(e), r = d(t), a = F(n, r), i = Math.abs(
102
+ Le(n, r)
104
103
  );
105
- let o;
104
+ let s;
106
105
  if (i < 1)
107
- o = 0;
106
+ s = 0;
108
107
  else {
109
108
  n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
110
- let s = Y(n, r) === -a;
111
- qe(h(e)) && i === 1 && Y(e, r) === 1 && (s = !1), o = a * (i - Number(s));
109
+ let o = F(n, r) === -a;
110
+ Ie(d(e)) && i === 1 && F(e, r) === 1 && (o = !1), s = a * (i - Number(o));
112
111
  }
113
- return o === 0 ? 0 : o;
112
+ return s === 0 ? 0 : s;
114
113
  }
115
- function Re(e, t, n) {
116
- const r = Le(e, t) / 1e3;
114
+ function Ae(e, t, n) {
115
+ const r = Xe(e, t) / 1e3;
117
116
  return ze(n == null ? void 0 : n.roundingMethod)(r);
118
117
  }
119
- function Ae(e) {
120
- const t = h(e), n = D(e, 0);
118
+ function He(e) {
119
+ const t = d(e), n = x(e, 0);
121
120
  return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
122
121
  }
123
122
  const je = {
@@ -182,7 +181,7 @@ const je = {
182
181
  one: "almost 1 year",
183
182
  other: "almost {{count}} years"
184
183
  }
185
- }, He = (e, t, n) => {
184
+ }, Ue = (e, t, n) => {
186
185
  let r;
187
186
  const a = je[e];
188
187
  return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
@@ -193,66 +192,66 @@ function X(e) {
193
192
  return e.formats[n] || e.formats[e.defaultWidth];
194
193
  };
195
194
  }
196
- const Ue = {
195
+ const Ze = {
197
196
  full: "EEEE, MMMM do, y",
198
197
  long: "MMMM do, y",
199
198
  medium: "MMM d, y",
200
199
  short: "MM/dd/yyyy"
201
- }, Be = {
200
+ }, Ve = {
202
201
  full: "h:mm:ss a zzzz",
203
202
  long: "h:mm:ss a z",
204
203
  medium: "h:mm:ss a",
205
204
  short: "h:mm a"
206
- }, Ve = {
205
+ }, Be = {
207
206
  full: "{{date}} 'at' {{time}}",
208
207
  long: "{{date}} 'at' {{time}}",
209
208
  medium: "{{date}}, {{time}}",
210
209
  short: "{{date}}, {{time}}"
211
- }, Ze = {
210
+ }, $e = {
212
211
  date: X({
213
- formats: Ue,
212
+ formats: Ze,
214
213
  defaultWidth: "full"
215
214
  }),
216
215
  time: X({
217
- formats: Be,
216
+ formats: Ve,
218
217
  defaultWidth: "full"
219
218
  }),
220
219
  dateTime: X({
221
- formats: Ve,
220
+ formats: Be,
222
221
  defaultWidth: "full"
223
222
  })
224
- }, $e = {
223
+ }, Ge = {
225
224
  lastWeek: "'last' eeee 'at' p",
226
225
  yesterday: "'yesterday at' p",
227
226
  today: "'today at' p",
228
227
  tomorrow: "'tomorrow at' p",
229
228
  nextWeek: "eeee 'at' p",
230
229
  other: "P"
231
- }, Ge = (e, t, n, r) => $e[e];
230
+ }, Qe = (e, t, n, r) => Ge[e];
232
231
  function S(e) {
233
232
  return (t, n) => {
234
233
  const r = n != null && n.context ? String(n.context) : "standalone";
235
234
  let a;
236
235
  if (r === "formatting" && e.formattingValues) {
237
- const o = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : o;
238
- a = e.formattingValues[s] || e.formattingValues[o];
236
+ const s = e.defaultFormattingWidth || e.defaultWidth, o = n != null && n.width ? String(n.width) : s;
237
+ a = e.formattingValues[o] || e.formattingValues[s];
239
238
  } else {
240
- const o = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth;
241
- a = e.values[s] || e.values[o];
239
+ const s = e.defaultWidth, o = n != null && n.width ? String(n.width) : e.defaultWidth;
240
+ a = e.values[o] || e.values[s];
242
241
  }
243
242
  const i = e.argumentCallback ? e.argumentCallback(t) : t;
244
243
  return a[i];
245
244
  };
246
245
  }
247
- const Qe = {
246
+ const Je = {
248
247
  narrow: ["B", "A"],
249
248
  abbreviated: ["BC", "AD"],
250
249
  wide: ["Before Christ", "Anno Domini"]
251
- }, Je = {
250
+ }, Ke = {
252
251
  narrow: ["1", "2", "3", "4"],
253
252
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
254
253
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
255
- }, Ke = {
254
+ }, et = {
256
255
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
257
256
  abbreviated: [
258
257
  "Jan",
@@ -282,7 +281,7 @@ const Qe = {
282
281
  "November",
283
282
  "December"
284
283
  ]
285
- }, et = {
284
+ }, tt = {
286
285
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
287
286
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
288
287
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -295,7 +294,7 @@ const Qe = {
295
294
  "Friday",
296
295
  "Saturday"
297
296
  ]
298
- }, tt = {
297
+ }, nt = {
299
298
  narrow: {
300
299
  am: "a",
301
300
  pm: "p",
@@ -326,7 +325,7 @@ const Qe = {
326
325
  evening: "evening",
327
326
  night: "night"
328
327
  }
329
- }, nt = {
328
+ }, rt = {
330
329
  narrow: {
331
330
  am: "a",
332
331
  pm: "p",
@@ -357,7 +356,7 @@ const Qe = {
357
356
  evening: "in the evening",
358
357
  night: "at night"
359
358
  }
360
- }, rt = (e, t) => {
359
+ }, at = (e, t) => {
361
360
  const n = Number(e), r = n % 100;
362
361
  if (r > 20 || r < 10)
363
362
  switch (r % 10) {
@@ -369,29 +368,29 @@ const Qe = {
369
368
  return n + "rd";
370
369
  }
371
370
  return n + "th";
372
- }, at = {
373
- ordinalNumber: rt,
371
+ }, it = {
372
+ ordinalNumber: at,
374
373
  era: S({
375
- values: Qe,
374
+ values: Je,
376
375
  defaultWidth: "wide"
377
376
  }),
378
377
  quarter: S({
379
- values: Je,
378
+ values: Ke,
380
379
  defaultWidth: "wide",
381
380
  argumentCallback: (e) => e - 1
382
381
  }),
383
382
  month: S({
384
- values: Ke,
383
+ values: et,
385
384
  defaultWidth: "wide"
386
385
  }),
387
386
  day: S({
388
- values: et,
387
+ values: tt,
389
388
  defaultWidth: "wide"
390
389
  }),
391
390
  dayPeriod: S({
392
- values: tt,
391
+ values: nt,
393
392
  defaultWidth: "wide",
394
- formattingValues: nt,
393
+ formattingValues: rt,
395
394
  defaultFormattingWidth: "wide"
396
395
  })
397
396
  };
@@ -400,58 +399,58 @@ function k(e) {
400
399
  const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
401
400
  if (!i)
402
401
  return null;
403
- const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? st(s, (f) => f.test(o)) : (
402
+ const s = i[0], o = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(o) ? ot(o, (g) => g.test(s)) : (
404
403
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
405
- it(s, (f) => f.test(o))
404
+ st(o, (g) => g.test(s))
406
405
  );
407
- let u;
408
- u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
406
+ let l;
407
+ l = e.valueCallback ? e.valueCallback(f) : f, l = n.valueCallback ? (
409
408
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
410
- n.valueCallback(u)
411
- ) : u;
412
- const m = t.slice(o.length);
413
- return { value: u, rest: m };
409
+ n.valueCallback(l)
410
+ ) : l;
411
+ const u = t.slice(s.length);
412
+ return { value: l, rest: u };
414
413
  };
415
414
  }
416
- function it(e, t) {
415
+ function st(e, t) {
417
416
  for (const n in e)
418
417
  if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
419
418
  return n;
420
419
  }
421
- function st(e, t) {
420
+ function ot(e, t) {
422
421
  for (let n = 0; n < e.length; n++)
423
422
  if (t(e[n]))
424
423
  return n;
425
424
  }
426
- function ot(e) {
425
+ function ut(e) {
427
426
  return (t, n = {}) => {
428
427
  const r = t.match(e.matchPattern);
429
428
  if (!r) return null;
430
429
  const a = r[0], i = t.match(e.parsePattern);
431
430
  if (!i) return null;
432
- let o = e.valueCallback ? e.valueCallback(i[0]) : i[0];
433
- o = n.valueCallback ? n.valueCallback(o) : o;
434
- const s = t.slice(a.length);
435
- return { value: o, rest: s };
431
+ let s = e.valueCallback ? e.valueCallback(i[0]) : i[0];
432
+ s = n.valueCallback ? n.valueCallback(s) : s;
433
+ const o = t.slice(a.length);
434
+ return { value: s, rest: o };
436
435
  };
437
436
  }
438
- const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
437
+ const ct = /^(\d+)(th|st|nd|rd)?/i, ft = /\d+/i, lt = {
439
438
  narrow: /^(b|a)/i,
440
439
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
441
440
  wide: /^(before christ|before common era|anno domini|common era)/i
442
- }, lt = {
443
- any: [/^b/i, /^(a|c)/i]
444
441
  }, mt = {
442
+ any: [/^b/i, /^(a|c)/i]
443
+ }, dt = {
445
444
  narrow: /^[1234]/i,
446
445
  abbreviated: /^q[1234]/i,
447
446
  wide: /^[1234](th|st|nd|rd)? quarter/i
448
- }, dt = {
449
- any: [/1/i, /2/i, /3/i, /4/i]
450
447
  }, ht = {
448
+ any: [/1/i, /2/i, /3/i, /4/i]
449
+ }, gt = {
451
450
  narrow: /^[jfmasond]/i,
452
451
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
453
452
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
454
- }, gt = {
453
+ }, yt = {
455
454
  narrow: [
456
455
  /^j/i,
457
456
  /^f/i,
@@ -480,18 +479,18 @@ const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
480
479
  /^n/i,
481
480
  /^d/i
482
481
  ]
483
- }, yt = {
482
+ }, wt = {
484
483
  narrow: /^[smtwf]/i,
485
484
  short: /^(su|mo|tu|we|th|fr|sa)/i,
486
485
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
487
486
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
488
- }, wt = {
487
+ }, bt = {
489
488
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
490
489
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
491
- }, bt = {
490
+ }, Mt = {
492
491
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
493
492
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
494
- }, Mt = {
493
+ }, xt = {
495
494
  any: {
496
495
  am: /^a/i,
497
496
  pm: /^p/i,
@@ -503,81 +502,81 @@ const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
503
502
  night: /night/i
504
503
  }
505
504
  }, Dt = {
506
- ordinalNumber: ot({
507
- matchPattern: ut,
508
- parsePattern: ct,
505
+ ordinalNumber: ut({
506
+ matchPattern: ct,
507
+ parsePattern: ft,
509
508
  valueCallback: (e) => parseInt(e, 10)
510
509
  }),
511
510
  era: k({
512
- matchPatterns: ft,
511
+ matchPatterns: lt,
513
512
  defaultMatchWidth: "wide",
514
- parsePatterns: lt,
513
+ parsePatterns: mt,
515
514
  defaultParseWidth: "any"
516
515
  }),
517
516
  quarter: k({
518
- matchPatterns: mt,
517
+ matchPatterns: dt,
519
518
  defaultMatchWidth: "wide",
520
- parsePatterns: dt,
519
+ parsePatterns: ht,
521
520
  defaultParseWidth: "any",
522
521
  valueCallback: (e) => e + 1
523
522
  }),
524
523
  month: k({
525
- matchPatterns: ht,
524
+ matchPatterns: gt,
526
525
  defaultMatchWidth: "wide",
527
- parsePatterns: gt,
526
+ parsePatterns: yt,
528
527
  defaultParseWidth: "any"
529
528
  }),
530
529
  day: k({
531
- matchPatterns: yt,
530
+ matchPatterns: wt,
532
531
  defaultMatchWidth: "wide",
533
- parsePatterns: wt,
532
+ parsePatterns: bt,
534
533
  defaultParseWidth: "any"
535
534
  }),
536
535
  dayPeriod: k({
537
- matchPatterns: bt,
536
+ matchPatterns: Mt,
538
537
  defaultMatchWidth: "any",
539
- parsePatterns: Mt,
538
+ parsePatterns: xt,
540
539
  defaultParseWidth: "any"
541
540
  })
542
- }, ue = {
541
+ }, fe = {
543
542
  code: "en-US",
544
- formatDistance: He,
545
- formatLong: Ze,
546
- formatRelative: Ge,
547
- localize: at,
543
+ formatDistance: Ue,
544
+ formatLong: $e,
545
+ formatRelative: Qe,
546
+ localize: it,
548
547
  match: Dt,
549
548
  options: {
550
549
  weekStartsOn: 0,
551
550
  firstWeekContainsDate: 1
552
551
  }
553
552
  };
554
- function xt(e) {
555
- const t = h(e);
556
- return We(t, Ae(t)) + 1;
557
- }
558
553
  function pt(e) {
559
- const t = h(e), n = +N(t) - +Ce(t);
554
+ const t = d(e);
555
+ return Ce(t, He(t)) + 1;
556
+ }
557
+ function Ot(e) {
558
+ const t = d(e), n = +Y(t) - +Fe(t);
560
559
  return Math.round(n / se) + 1;
561
560
  }
562
- function ce(e, t) {
563
- var m, f, l, g;
564
- const n = h(e), r = n.getFullYear(), a = P(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (m = t == null ? void 0 : t.locale) == null ? void 0 : m.options) == null ? void 0 : f.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((g = (l = a.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, o = D(e, 0);
565
- o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
566
- const s = W(o, t), c = D(e, 0);
567
- c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
568
- const u = W(c, t);
569
- return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
570
- }
571
- function Ot(e, t) {
572
- var s, c, u, m;
573
- const n = P(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((m = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, a = ce(e, t), i = D(e, 0);
574
- return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, t);
561
+ function le(e, t) {
562
+ var u, g, c, h;
563
+ const n = d(e), r = n.getFullYear(), a = P(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (u = t == null ? void 0 : t.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((h = (c = a.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, s = x(e, 0);
564
+ s.setFullYear(r + 1, 0, i), s.setHours(0, 0, 0, 0);
565
+ const o = W(s, t), f = x(e, 0);
566
+ f.setFullYear(r, 0, i), f.setHours(0, 0, 0, 0);
567
+ const l = W(f, t);
568
+ return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= l.getTime() ? r : r - 1;
575
569
  }
576
570
  function Tt(e, t) {
577
- const n = h(e), r = +W(n, t) - +Ot(n, t);
571
+ var o, f, l, u;
572
+ const n = P(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, a = le(e, t), i = x(e, 0);
573
+ return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, t);
574
+ }
575
+ function vt(e, t) {
576
+ const n = d(e), r = +W(n, t) - +Tt(n, t);
578
577
  return Math.round(r / se) + 1;
579
578
  }
580
- function d(e, t) {
579
+ function m(e, t) {
581
580
  const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
582
581
  return n + r;
583
582
  }
@@ -585,16 +584,16 @@ const M = {
585
584
  // Year
586
585
  y(e, t) {
587
586
  const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
588
- return d(t === "yy" ? r % 100 : r, t.length);
587
+ return m(t === "yy" ? r % 100 : r, t.length);
589
588
  },
590
589
  // Month
591
590
  M(e, t) {
592
591
  const n = e.getMonth();
593
- return t === "M" ? String(n + 1) : d(n + 1, 2);
592
+ return t === "M" ? String(n + 1) : m(n + 1, 2);
594
593
  },
595
594
  // Day of the month
596
595
  d(e, t) {
597
- return d(e.getDate(), t.length);
596
+ return m(e.getDate(), t.length);
598
597
  },
599
598
  // AM or PM
600
599
  a(e, t) {
@@ -614,26 +613,26 @@ const M = {
614
613
  },
615
614
  // Hour [1-12]
616
615
  h(e, t) {
617
- return d(e.getHours() % 12 || 12, t.length);
616
+ return m(e.getHours() % 12 || 12, t.length);
618
617
  },
619
618
  // Hour [0-23]
620
619
  H(e, t) {
621
- return d(e.getHours(), t.length);
620
+ return m(e.getHours(), t.length);
622
621
  },
623
622
  // Minute
624
623
  m(e, t) {
625
- return d(e.getMinutes(), t.length);
624
+ return m(e.getMinutes(), t.length);
626
625
  },
627
626
  // Second
628
627
  s(e, t) {
629
- return d(e.getSeconds(), t.length);
628
+ return m(e.getSeconds(), t.length);
630
629
  },
631
630
  // Fraction of second
632
631
  S(e, t) {
633
632
  const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
634
633
  r * Math.pow(10, n - 3)
635
634
  );
636
- return d(a, t.length);
635
+ return m(a, t.length);
637
636
  }
638
637
  }, T = {
639
638
  midnight: "midnight",
@@ -668,17 +667,17 @@ const M = {
668
667
  },
669
668
  // Local week-numbering year
670
669
  Y: function(e, t, n, r) {
671
- const a = ce(e, r), i = a > 0 ? a : 1 - a;
670
+ const a = le(e, r), i = a > 0 ? a : 1 - a;
672
671
  if (t === "YY") {
673
- const o = i % 100;
674
- return d(o, 2);
672
+ const s = i % 100;
673
+ return m(s, 2);
675
674
  }
676
- return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : d(i, t.length);
675
+ return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : m(i, t.length);
677
676
  },
678
677
  // ISO week-numbering year
679
678
  R: function(e, t) {
680
- const n = oe(e);
681
- return d(n, t.length);
679
+ const n = ce(e);
680
+ return m(n, t.length);
682
681
  },
683
682
  // Extended year. This is a single number designating the year of this calendar system.
684
683
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -691,7 +690,7 @@ const M = {
691
690
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
692
691
  u: function(e, t) {
693
692
  const n = e.getFullYear();
694
- return d(n, t.length);
693
+ return m(n, t.length);
695
694
  },
696
695
  // Quarter
697
696
  Q: function(e, t, n) {
@@ -700,7 +699,7 @@ const M = {
700
699
  case "Q":
701
700
  return String(r);
702
701
  case "QQ":
703
- return d(r, 2);
702
+ return m(r, 2);
704
703
  case "Qo":
705
704
  return n.ordinalNumber(r, { unit: "quarter" });
706
705
  case "QQQ":
@@ -728,7 +727,7 @@ const M = {
728
727
  case "q":
729
728
  return String(r);
730
729
  case "qq":
731
- return d(r, 2);
730
+ return m(r, 2);
732
731
  case "qo":
733
732
  return n.ordinalNumber(r, { unit: "quarter" });
734
733
  case "qqq":
@@ -780,7 +779,7 @@ const M = {
780
779
  case "L":
781
780
  return String(r + 1);
782
781
  case "LL":
783
- return d(r + 1, 2);
782
+ return m(r + 1, 2);
784
783
  case "Lo":
785
784
  return n.ordinalNumber(r + 1, { unit: "month" });
786
785
  case "LLL":
@@ -800,13 +799,13 @@ const M = {
800
799
  },
801
800
  // Local week of year
802
801
  w: function(e, t, n, r) {
803
- const a = Tt(e, r);
804
- return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : d(a, t.length);
802
+ const a = vt(e, r);
803
+ return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : m(a, t.length);
805
804
  },
806
805
  // ISO week of year
807
806
  I: function(e, t, n) {
808
- const r = pt(e);
809
- return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : d(r, t.length);
807
+ const r = Ot(e);
808
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : m(r, t.length);
810
809
  },
811
810
  // Day of the month
812
811
  d: function(e, t, n) {
@@ -814,8 +813,8 @@ const M = {
814
813
  },
815
814
  // Day of year
816
815
  D: function(e, t, n) {
817
- const r = xt(e);
818
- return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : d(r, t.length);
816
+ const r = pt(e);
817
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : m(r, t.length);
819
818
  },
820
819
  // Day of week
821
820
  E: function(e, t, n) {
@@ -853,7 +852,7 @@ const M = {
853
852
  case "e":
854
853
  return String(i);
855
854
  case "ee":
856
- return d(i, 2);
855
+ return m(i, 2);
857
856
  case "eo":
858
857
  return n.ordinalNumber(i, { unit: "day" });
859
858
  case "eee":
@@ -886,7 +885,7 @@ const M = {
886
885
  case "c":
887
886
  return String(i);
888
887
  case "cc":
889
- return d(i, t.length);
888
+ return m(i, t.length);
890
889
  case "co":
891
890
  return n.ordinalNumber(i, { unit: "day" });
892
891
  case "ccc":
@@ -919,7 +918,7 @@ const M = {
919
918
  case "i":
920
919
  return String(a);
921
920
  case "ii":
922
- return d(a, t.length);
921
+ return m(a, t.length);
923
922
  case "io":
924
923
  return n.ordinalNumber(a, { unit: "day" });
925
924
  case "iii":
@@ -1042,12 +1041,12 @@ const M = {
1042
1041
  // Hour [0-11]
1043
1042
  K: function(e, t, n) {
1044
1043
  const r = e.getHours() % 12;
1045
- return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, t.length);
1044
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
1046
1045
  },
1047
1046
  // Hour [1-24]
1048
1047
  k: function(e, t, n) {
1049
1048
  let r = e.getHours();
1050
- return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, t.length);
1049
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
1051
1050
  },
1052
1051
  // Minute
1053
1052
  m: function(e, t, n) {
@@ -1068,7 +1067,7 @@ const M = {
1068
1067
  return "Z";
1069
1068
  switch (t) {
1070
1069
  case "X":
1071
- return Z(r);
1070
+ return G(r);
1072
1071
  case "XXXX":
1073
1072
  case "XX":
1074
1073
  return p(r);
@@ -1083,7 +1082,7 @@ const M = {
1083
1082
  const r = e.getTimezoneOffset();
1084
1083
  switch (t) {
1085
1084
  case "x":
1086
- return Z(r);
1085
+ return G(r);
1087
1086
  case "xxxx":
1088
1087
  case "xx":
1089
1088
  return p(r);
@@ -1100,7 +1099,7 @@ const M = {
1100
1099
  case "O":
1101
1100
  case "OO":
1102
1101
  case "OOO":
1103
- return "GMT" + V(r, ":");
1102
+ return "GMT" + $(r, ":");
1104
1103
  case "OOOO":
1105
1104
  default:
1106
1105
  return "GMT" + p(r, ":");
@@ -1113,7 +1112,7 @@ const M = {
1113
1112
  case "z":
1114
1113
  case "zz":
1115
1114
  case "zzz":
1116
- return "GMT" + V(r, ":");
1115
+ return "GMT" + $(r, ":");
1117
1116
  case "zzzz":
1118
1117
  default:
1119
1118
  return "GMT" + p(r, ":");
@@ -1122,26 +1121,26 @@ const M = {
1122
1121
  // Seconds timestamp
1123
1122
  t: function(e, t, n) {
1124
1123
  const r = Math.trunc(e.getTime() / 1e3);
1125
- return d(r, t.length);
1124
+ return m(r, t.length);
1126
1125
  },
1127
1126
  // Milliseconds timestamp
1128
1127
  T: function(e, t, n) {
1129
1128
  const r = e.getTime();
1130
- return d(r, t.length);
1129
+ return m(r, t.length);
1131
1130
  }
1132
1131
  };
1133
- function V(e, t = "") {
1132
+ function $(e, t = "") {
1134
1133
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
1135
- return i === 0 ? n + String(a) : n + String(a) + t + d(i, 2);
1134
+ return i === 0 ? n + String(a) : n + String(a) + t + m(i, 2);
1136
1135
  }
1137
- function Z(e, t) {
1138
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + d(Math.abs(e) / 60, 2) : p(e, t);
1136
+ function G(e, t) {
1137
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + m(Math.abs(e) / 60, 2) : p(e, t);
1139
1138
  }
1140
1139
  function p(e, t = "") {
1141
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = d(Math.trunc(r / 60), 2), i = d(r % 60, 2);
1140
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = m(Math.trunc(r / 60), 2), i = m(r % 60, 2);
1142
1141
  return n + a + t + i;
1143
1142
  }
1144
- const $ = (e, t) => {
1143
+ const Q = (e, t) => {
1145
1144
  switch (e) {
1146
1145
  case "P":
1147
1146
  return t.date({ width: "short" });
@@ -1153,7 +1152,7 @@ const $ = (e, t) => {
1153
1152
  default:
1154
1153
  return t.date({ width: "full" });
1155
1154
  }
1156
- }, fe = (e, t) => {
1155
+ }, me = (e, t) => {
1157
1156
  switch (e) {
1158
1157
  case "p":
1159
1158
  return t.time({ width: "short" });
@@ -1165,10 +1164,10 @@ const $ = (e, t) => {
1165
1164
  default:
1166
1165
  return t.time({ width: "full" });
1167
1166
  }
1168
- }, vt = (e, t) => {
1167
+ }, Pt = (e, t) => {
1169
1168
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1170
1169
  if (!a)
1171
- return $(e, t);
1170
+ return Q(e, t);
1172
1171
  let i;
1173
1172
  switch (r) {
1174
1173
  case "P":
@@ -1185,117 +1184,117 @@ const $ = (e, t) => {
1185
1184
  i = t.dateTime({ width: "full" });
1186
1185
  break;
1187
1186
  }
1188
- return i.replace("{{date}}", $(r, t)).replace("{{time}}", fe(a, t));
1189
- }, Pt = {
1190
- p: fe,
1191
- P: vt
1192
- }, St = /^D+$/, kt = /^Y+$/, Wt = ["D", "DD", "YY", "YYYY"];
1193
- function Ct(e) {
1194
- return St.test(e);
1195
- }
1196
- function Yt(e) {
1187
+ return i.replace("{{date}}", Q(r, t)).replace("{{time}}", me(a, t));
1188
+ }, St = {
1189
+ p: me,
1190
+ P: Pt
1191
+ }, kt = /^D+$/, Wt = /^Y+$/, Ct = ["D", "DD", "YY", "YYYY"];
1192
+ function Ft(e) {
1197
1193
  return kt.test(e);
1198
1194
  }
1199
- function Ft(e, t, n) {
1200
- const r = Nt(e, t, n);
1201
- if (console.warn(r), Wt.includes(e)) throw new RangeError(r);
1195
+ function Nt(e) {
1196
+ return Wt.test(e);
1197
+ }
1198
+ function Yt(e, t, n) {
1199
+ const r = Et(e, t, n);
1200
+ if (console.warn(r), Ct.includes(e)) throw new RangeError(r);
1202
1201
  }
1203
- function Nt(e, t, n) {
1202
+ function Et(e, t, n) {
1204
1203
  const r = e[0] === "Y" ? "years" : "days of the month";
1205
1204
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1206
1205
  }
1207
- const Et = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Lt = /^'([^]*?)'?$/, Xt = /''/g, _t = /[a-zA-Z]/;
1208
- function le(e, t, n) {
1209
- var m, f, l, g, b, O, R, A;
1210
- const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? ue, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (m = n == null ? void 0 : n.locale) == null ? void 0 : m.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((A = (R = r.locale) == null ? void 0 : R.options) == null ? void 0 : A.weekStartsOn) ?? 0, s = h(e);
1211
- if (!Ne(s))
1206
+ const Lt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xt = /^'([^]*?)'?$/, _t = /''/g, qt = /[a-zA-Z]/;
1207
+ function R(e, t, n) {
1208
+ var u, g, c, h, y, O, H, j;
1209
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? fe, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((g = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (c = r.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, s = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (y = n == null ? void 0 : n.locale) == null ? void 0 : y.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((j = (H = r.locale) == null ? void 0 : H.options) == null ? void 0 : j.weekStartsOn) ?? 0, o = d(e);
1210
+ if (!Ee(o))
1212
1211
  throw new RangeError("Invalid time value");
1213
- let c = t.match(zt).map((w) => {
1214
- const y = w[0];
1215
- if (y === "p" || y === "P") {
1216
- const L = Pt[y];
1217
- return L(w, a.formatLong);
1212
+ let f = t.match(zt).map((b) => {
1213
+ const w = b[0];
1214
+ if (w === "p" || w === "P") {
1215
+ const z = St[w];
1216
+ return z(b, a.formatLong);
1218
1217
  }
1219
- return w;
1220
- }).join("").match(Et).map((w) => {
1221
- if (w === "''")
1218
+ return b;
1219
+ }).join("").match(Lt).map((b) => {
1220
+ if (b === "''")
1222
1221
  return { isToken: !1, value: "'" };
1223
- const y = w[0];
1224
- if (y === "'")
1225
- return { isToken: !1, value: qt(w) };
1226
- if (B[y])
1227
- return { isToken: !0, value: w };
1228
- if (y.match(_t))
1222
+ const w = b[0];
1223
+ if (w === "'")
1224
+ return { isToken: !1, value: It(b) };
1225
+ if (B[w])
1226
+ return { isToken: !0, value: b };
1227
+ if (w.match(qt))
1229
1228
  throw new RangeError(
1230
- "Format string contains an unescaped latin alphabet character `" + y + "`"
1229
+ "Format string contains an unescaped latin alphabet character `" + w + "`"
1231
1230
  );
1232
- return { isToken: !1, value: w };
1231
+ return { isToken: !1, value: b };
1233
1232
  });
1234
- a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1235
- const u = {
1233
+ a.localize.preprocessor && (f = a.localize.preprocessor(o, f));
1234
+ const l = {
1236
1235
  firstWeekContainsDate: i,
1237
- weekStartsOn: o,
1236
+ weekStartsOn: s,
1238
1237
  locale: a
1239
1238
  };
1240
- return c.map((w) => {
1241
- if (!w.isToken) return w.value;
1242
- const y = w.value;
1243
- (!(n != null && n.useAdditionalWeekYearTokens) && Yt(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Ct(y)) && Ft(y, t, String(e));
1244
- const L = B[y[0]];
1245
- return L(s, y, a.localize, u);
1239
+ return f.map((b) => {
1240
+ if (!b.isToken) return b.value;
1241
+ const w = b.value;
1242
+ (!(n != null && n.useAdditionalWeekYearTokens) && Nt(w) || !(n != null && n.useAdditionalDayOfYearTokens) && Ft(w)) && Yt(w, t, String(e));
1243
+ const z = B[w[0]];
1244
+ return z(o, w, a.localize, l);
1246
1245
  }).join("");
1247
1246
  }
1248
- function qt(e) {
1249
- const t = e.match(Lt);
1250
- return t ? t[1].replace(Xt, "'") : e;
1247
+ function It(e) {
1248
+ const t = e.match(Xt);
1249
+ return t ? t[1].replace(_t, "'") : e;
1251
1250
  }
1252
- function It(e, t, n) {
1253
- const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? ue, i = 2520, o = Y(e, t);
1254
- if (isNaN(o))
1251
+ function Rt(e, t, n) {
1252
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? fe, i = 2520, s = F(e, t);
1253
+ if (isNaN(s))
1255
1254
  throw new RangeError("Invalid time value");
1256
- const s = Object.assign({}, n, {
1255
+ const o = Object.assign({}, n, {
1257
1256
  addSuffix: n == null ? void 0 : n.addSuffix,
1258
- comparison: o
1257
+ comparison: s
1259
1258
  });
1260
- let c, u;
1261
- o > 0 ? (c = h(t), u = h(e)) : (c = h(e), u = h(t));
1262
- const m = Re(u, c), f = (E(u) - E(c)) / 1e3, l = Math.round((m - f) / 60);
1263
- let g;
1264
- if (l < 2)
1265
- return n != null && n.includeSeconds ? m < 5 ? a.formatDistance("lessThanXSeconds", 5, s) : m < 10 ? a.formatDistance("lessThanXSeconds", 10, s) : m < 20 ? a.formatDistance("lessThanXSeconds", 20, s) : m < 40 ? a.formatDistance("halfAMinute", 0, s) : m < 60 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", 1, s) : l === 0 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", l, s);
1266
- if (l < 45)
1267
- return a.formatDistance("xMinutes", l, s);
1268
- if (l < 90)
1269
- return a.formatDistance("aboutXHours", 1, s);
1270
- if (l < H) {
1271
- const b = Math.round(l / 60);
1272
- return a.formatDistance("aboutXHours", b, s);
1259
+ let f, l;
1260
+ s > 0 ? (f = d(t), l = d(e)) : (f = d(e), l = d(t));
1261
+ const u = Ae(l, f), g = (E(l) - E(f)) / 1e3, c = Math.round((u - g) / 60);
1262
+ let h;
1263
+ if (c < 2)
1264
+ return n != null && n.includeSeconds ? u < 5 ? a.formatDistance("lessThanXSeconds", 5, o) : u < 10 ? a.formatDistance("lessThanXSeconds", 10, o) : u < 20 ? a.formatDistance("lessThanXSeconds", 20, o) : u < 40 ? a.formatDistance("halfAMinute", 0, o) : u < 60 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", 1, o) : c === 0 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", c, o);
1265
+ if (c < 45)
1266
+ return a.formatDistance("xMinutes", c, o);
1267
+ if (c < 90)
1268
+ return a.formatDistance("aboutXHours", 1, o);
1269
+ if (c < Z) {
1270
+ const y = Math.round(c / 60);
1271
+ return a.formatDistance("aboutXHours", y, o);
1273
1272
  } else {
1274
- if (l < i)
1275
- return a.formatDistance("xDays", 1, s);
1276
- if (l < C) {
1277
- const b = Math.round(l / H);
1278
- return a.formatDistance("xDays", b, s);
1279
- } else if (l < C * 2)
1280
- return g = Math.round(l / C), a.formatDistance("aboutXMonths", g, s);
1273
+ if (c < i)
1274
+ return a.formatDistance("xDays", 1, o);
1275
+ if (c < C) {
1276
+ const y = Math.round(c / Z);
1277
+ return a.formatDistance("xDays", y, o);
1278
+ } else if (c < C * 2)
1279
+ return h = Math.round(c / C), a.formatDistance("aboutXMonths", h, o);
1281
1280
  }
1282
- if (g = Ie(u, c), g < 12) {
1283
- const b = Math.round(l / C);
1284
- return a.formatDistance("xMonths", b, s);
1281
+ if (h = Re(l, f), h < 12) {
1282
+ const y = Math.round(c / C);
1283
+ return a.formatDistance("xMonths", y, o);
1285
1284
  } else {
1286
- const b = g % 12, O = Math.trunc(g / 12);
1287
- return b < 3 ? a.formatDistance("aboutXYears", O, s) : b < 9 ? a.formatDistance("overXYears", O, s) : a.formatDistance("almostXYears", O + 1, s);
1285
+ const y = h % 12, O = Math.trunc(h / 12);
1286
+ return y < 3 ? a.formatDistance("aboutXYears", O, o) : y < 9 ? a.formatDistance("overXYears", O, o) : a.formatDistance("almostXYears", O + 1, o);
1288
1287
  }
1289
1288
  }
1290
- function Rt(e, t) {
1291
- return It(e, Ye(e), t);
1289
+ function At(e, t) {
1290
+ return Rt(e, Ne(e), t);
1292
1291
  }
1293
- function At() {
1292
+ function Ht() {
1294
1293
  return Object.assign({}, P());
1295
1294
  }
1296
- function G(e, t, n) {
1297
- const r = At(), a = Ut(e, n.timeZone, n.locale ?? r.locale);
1298
- return "formatToParts" in a ? jt(a, t) : Ht(a, t);
1295
+ function J(e, t, n) {
1296
+ const r = Ht(), a = Zt(e, n.timeZone, n.locale ?? r.locale);
1297
+ return "formatToParts" in a ? jt(a, t) : Ut(a, t);
1299
1298
  }
1300
1299
  function jt(e, t) {
1301
1300
  const n = e.formatToParts(t);
@@ -1303,17 +1302,17 @@ function jt(e, t) {
1303
1302
  if (n[r].type === "timeZoneName")
1304
1303
  return n[r].value;
1305
1304
  }
1306
- function Ht(e, t) {
1305
+ function Ut(e, t) {
1307
1306
  const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1308
1307
  return r ? r[0].substr(1) : "";
1309
1308
  }
1310
- function Ut(e, t, n) {
1309
+ function Zt(e, t, n) {
1311
1310
  return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1312
1311
  timeZone: t,
1313
1312
  timeZoneName: e
1314
1313
  });
1315
1314
  }
1316
- const Bt = 60 * 1e3, Vt = {
1315
+ const Vt = 60 * 1e3, Bt = {
1317
1316
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1318
1317
  X: function(e, t, n) {
1319
1318
  const r = _(n.timeZone, e);
@@ -1321,7 +1320,7 @@ const Bt = 60 * 1e3, Vt = {
1321
1320
  return "Z";
1322
1321
  switch (t) {
1323
1322
  case "X":
1324
- return Q(r);
1323
+ return K(r);
1325
1324
  case "XXXX":
1326
1325
  case "XX":
1327
1326
  return v(r);
@@ -1336,7 +1335,7 @@ const Bt = 60 * 1e3, Vt = {
1336
1335
  const r = _(n.timeZone, e);
1337
1336
  switch (t) {
1338
1337
  case "x":
1339
- return Q(r);
1338
+ return K(r);
1340
1339
  case "xxxx":
1341
1340
  case "xx":
1342
1341
  return v(r);
@@ -1353,7 +1352,7 @@ const Bt = 60 * 1e3, Vt = {
1353
1352
  case "O":
1354
1353
  case "OO":
1355
1354
  case "OOO":
1356
- return "GMT" + Zt(r, ":");
1355
+ return "GMT" + $t(r, ":");
1357
1356
  case "OOOO":
1358
1357
  default:
1359
1358
  return "GMT" + v(r, ":");
@@ -1365,20 +1364,20 @@ const Bt = 60 * 1e3, Vt = {
1365
1364
  case "z":
1366
1365
  case "zz":
1367
1366
  case "zzz":
1368
- return G("short", e, n);
1367
+ return J("short", e, n);
1369
1368
  case "zzzz":
1370
1369
  default:
1371
- return G("long", e, n);
1370
+ return J("long", e, n);
1372
1371
  }
1373
1372
  }
1374
1373
  };
1375
1374
  function _(e, t) {
1376
- const n = e ? ae(e, t, !0) / Bt : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1375
+ const n = e ? oe(e, t, !0) / Vt : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1377
1376
  if (Number.isNaN(n))
1378
1377
  throw new RangeError("Invalid time zone specified: " + e);
1379
1378
  return n;
1380
1379
  }
1381
- function z(e, t) {
1380
+ function L(e, t) {
1382
1381
  const n = e < 0 ? "-" : "";
1383
1382
  let r = Math.abs(e).toString();
1384
1383
  for (; r.length < t; )
@@ -1386,47 +1385,47 @@ function z(e, t) {
1386
1385
  return n + r;
1387
1386
  }
1388
1387
  function v(e, t = "") {
1389
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = z(Math.floor(r / 60), 2), i = z(Math.floor(r % 60), 2);
1388
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = L(Math.floor(r / 60), 2), i = L(Math.floor(r % 60), 2);
1390
1389
  return n + a + t + i;
1391
1390
  }
1392
- function Q(e, t) {
1393
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + z(Math.abs(e) / 60, 2) : v(e, t);
1391
+ function K(e, t) {
1392
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + L(Math.abs(e) / 60, 2) : v(e, t);
1394
1393
  }
1395
- function Zt(e, t = "") {
1394
+ function $t(e, t = "") {
1396
1395
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
1397
- return i === 0 ? n + String(a) : n + String(a) + t + z(i, 2);
1396
+ return i === 0 ? n + String(a) : n + String(a) + t + L(i, 2);
1398
1397
  }
1399
- const $t = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1400
- function Gt(e, t, n = {}) {
1398
+ const Gt = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1399
+ function Qt(e, t, n = {}) {
1401
1400
  t = String(t);
1402
- const r = t.match($t);
1401
+ const r = t.match(Gt);
1403
1402
  if (r) {
1404
- const a = ie(n.originalDate || e, n);
1405
- t = r.reduce(function(i, o) {
1406
- if (o[0] === "'")
1403
+ const a = ue(n.originalDate || e, n);
1404
+ t = r.reduce(function(i, s) {
1405
+ if (s[0] === "'")
1407
1406
  return i;
1408
- const s = i.indexOf(o), c = i[s - 1] === "'", u = i.replace(o, "'" + Vt[o[0]](a, o, n) + "'");
1409
- return c ? u.substring(0, s - 1) + u.substring(s + 1) : u;
1407
+ const o = i.indexOf(s), f = i[o - 1] === "'", l = i.replace(s, "'" + Bt[s[0]](a, s, n) + "'");
1408
+ return f ? l.substring(0, o - 1) + l.substring(o + 1) : l;
1410
1409
  }, t);
1411
1410
  }
1412
- return le(e, t, n);
1411
+ return R(e, t, n);
1413
1412
  }
1414
- function Qt(e, t, n) {
1415
- e = ie(e, n);
1416
- const r = ae(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
1413
+ function Jt(e, t, n) {
1414
+ e = ue(e, n);
1415
+ const r = oe(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
1417
1416
  return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
1418
1417
  }
1419
- function Jt(e, t, n, r) {
1418
+ function de(e, t, n, r) {
1420
1419
  return r = {
1421
1420
  ...r,
1422
1421
  timeZone: t,
1423
1422
  originalDate: e
1424
- }, Gt(Qt(e, t, { timeZone: r.timeZone }), n, r);
1423
+ }, Qt(Jt(e, t, { timeZone: r.timeZone }), n, r);
1425
1424
  }
1426
- function Mn(e, t) {
1425
+ function bn(e, t) {
1427
1426
  return e && e !== "auto" ? e : t;
1428
1427
  }
1429
- function Dn(e, t = /* @__PURE__ */ new Date()) {
1428
+ function Mn(e, t = /* @__PURE__ */ new Date()) {
1430
1429
  try {
1431
1430
  const n = {
1432
1431
  timeZone: e,
@@ -1450,7 +1449,7 @@ function xn(e) {
1450
1449
  return e;
1451
1450
  }
1452
1451
  }
1453
- function me(e, t = "auto") {
1452
+ function A(e, t = "auto") {
1454
1453
  if (!e)
1455
1454
  return /* @__PURE__ */ new Date(NaN);
1456
1455
  const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
@@ -1462,55 +1461,67 @@ function me(e, t = "auto") {
1462
1461
  return new Date(i);
1463
1462
  }
1464
1463
  return new Date(e);
1465
- } else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : be(e, t);
1464
+ } else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : xe(e, t);
1466
1465
  }
1467
1466
  const Kt = "MM/dd/yyyy", en = (e, t, n, r = "auto") => {
1468
1467
  if (!e)
1469
1468
  return "";
1470
1469
  try {
1471
- const a = me(e, r);
1470
+ const a = A(e, r);
1472
1471
  if (isNaN(a.getTime()))
1473
1472
  return e;
1474
- const o = (t && t.trim() ? t : Kt).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1475
- return n && n !== "auto" ? Jt(a, n, o) : le(a, o);
1473
+ const s = (t && t.trim() ? t : Kt).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1474
+ return n && n !== "auto" ? de(a, n, s) : R(a, s);
1476
1475
  } catch (a) {
1477
1476
  return console.error("Date formatting error:", a), e;
1478
1477
  }
1479
- }, tn = (e, t = "auto") => {
1478
+ };
1479
+ function Dn(e, t, n = "auto") {
1480
+ if (e)
1481
+ try {
1482
+ const r = A(e, n);
1483
+ if (isNaN(r.getTime())) return;
1484
+ const a = "yyyy M d H m s", i = t && t !== "auto" ? de(r, t, a) : R(r, a), [s, o, f, l, u, g] = i.split(" ").map(Number);
1485
+ return { year: s, month: o, day: f, hour: l, minute: u, second: g };
1486
+ } catch {
1487
+ return;
1488
+ }
1489
+ }
1490
+ const tn = (e, t = "auto") => {
1480
1491
  if (!e)
1481
1492
  return "";
1482
1493
  try {
1483
- const n = me(e, t);
1484
- return isNaN(n.getTime()) ? e : Rt(n, { addSuffix: !0 });
1494
+ const n = A(e, t);
1495
+ return isNaN(n.getTime()) ? e : At(n, { addSuffix: !0 });
1485
1496
  } catch (n) {
1486
1497
  return console.error("Relative time formatting error:", n), e;
1487
1498
  }
1488
1499
  };
1489
1500
  function nn(e, t, n, r) {
1490
- const a = e instanceof Date ? e.toISOString() : String(e), i = (r == null ? void 0 : r.browserTimezone) || n, o = (r == null ? void 0 : r.isSqlCard) ?? !1;
1501
+ const a = e instanceof Date ? e.toISOString() : String(e), i = (r == null ? void 0 : r.browserTimezone) || n, s = (r == null ? void 0 : r.isSqlCard) ?? !1;
1491
1502
  if (t != null && t.useRelativeTime)
1492
1503
  return tn(
1493
1504
  a,
1494
1505
  (t == null ? void 0 : t.sourceTimezone) || "auto"
1495
1506
  );
1496
- const s = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
1507
+ const o = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
1497
1508
  return en(
1498
1509
  a,
1499
- s,
1500
- t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : o ? i : n,
1510
+ o,
1511
+ t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : s ? i : n,
1501
1512
  (t == null ? void 0 : t.sourceTimezone) || "auto"
1502
1513
  );
1503
1514
  }
1504
- function de(e, t, n) {
1505
- var o, s;
1515
+ function he(e, t, n) {
1516
+ var s, o;
1506
1517
  if (e == null)
1507
- return e === null ? ((o = n.absence) == null ? void 0 : o.nullText) ?? "" : ((s = n.absence) == null ? void 0 : s.emptyText) ?? "";
1508
- const r = he(e) ? e : void 0, a = r ? r.value : e, i = r ?? (typeof e == "number" ? e : void 0);
1518
+ return e === null ? ((s = n.absence) == null ? void 0 : s.nullText) ?? "" : ((o = n.absence) == null ? void 0 : o.emptyText) ?? "";
1519
+ const r = ge(e) ? e : void 0, a = r ? r.value : e, i = r ?? (typeof e == "number" ? e : void 0);
1509
1520
  if (!n.useFormattedValues || !t)
1510
1521
  return String(a);
1511
1522
  switch (t.type) {
1512
1523
  case "number":
1513
- return i !== void 0 ? Me(
1524
+ return i !== void 0 ? De(
1514
1525
  i,
1515
1526
  t.numberFormat,
1516
1527
  n.locale
@@ -1538,14 +1549,14 @@ function de(e, t, n) {
1538
1549
  function pn(e, t) {
1539
1550
  return t.visibleColumns.map((n) => {
1540
1551
  const r = e[n], a = t.columnSettings[n];
1541
- return de(r, a, {
1552
+ return he(r, a, {
1542
1553
  useFormattedValues: t.useFormattedValues,
1543
1554
  timezone: t.timezone,
1544
1555
  locale: t.locale
1545
1556
  });
1546
1557
  });
1547
1558
  }
1548
- const rn = "en-US", J = [
1559
+ const rn = "en-US", ee = [
1549
1560
  "compact",
1550
1561
  "maximumFractionDigits",
1551
1562
  "minimumFractionDigits",
@@ -1557,18 +1568,18 @@ function an(e) {
1557
1568
  if (e.type !== "currency" || Object.prototype.hasOwnProperty.call(e, "currency") || Object.prototype.hasOwnProperty.call(e, "locale"))
1558
1569
  return !1;
1559
1570
  const t = Object.keys(e).sort();
1560
- return t.length === J.length && J.every(
1571
+ return t.length === ee.length && ee.every(
1561
1572
  (n, r) => t[r] === n
1562
1573
  ) && typeof e.minimumFractionDigits == "number" && typeof e.maximumFractionDigits == "number" && e.useGrouping === !0 && e.negativeStyle === "minus" && typeof e.compact == "boolean";
1563
1574
  }
1564
- function K(e) {
1575
+ function te(e) {
1565
1576
  if (typeof e != "string")
1566
1577
  return;
1567
1578
  const t = e.trim();
1568
1579
  if (!(!t || t.toLowerCase() === "none"))
1569
1580
  return t;
1570
1581
  }
1571
- function F(e) {
1582
+ function N(e) {
1572
1583
  if (!(typeof e != "number" || !Number.isFinite(e)))
1573
1584
  return Math.max(0, Math.min(10, Math.trunc(e)));
1574
1585
  }
@@ -1576,15 +1587,15 @@ function sn(e) {
1576
1587
  return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
1577
1588
  }
1578
1589
  function on(e, t, n) {
1579
- const r = F(t.minimumFractionDigits), a = F(t.maximumFractionDigits);
1590
+ const r = N(t.minimumFractionDigits), a = N(t.maximumFractionDigits);
1580
1591
  if (typeof r == "number" || typeof a == "number") {
1581
- const s = r ?? 0, c = a ?? Math.max(s, 2);
1592
+ const o = r ?? 0, f = a ?? Math.max(o, 2);
1582
1593
  return {
1583
- minimumFractionDigits: Math.min(s, c),
1584
- maximumFractionDigits: Math.max(s, c)
1594
+ minimumFractionDigits: Math.min(o, f),
1595
+ maximumFractionDigits: Math.max(o, f)
1585
1596
  };
1586
1597
  }
1587
- const i = F(t.decimals);
1598
+ const i = N(t.decimals);
1588
1599
  if (typeof i == "number")
1589
1600
  return {
1590
1601
  minimumFractionDigits: i,
@@ -1592,18 +1603,18 @@ function on(e, t, n) {
1592
1603
  };
1593
1604
  if (n != null && n.preserveOmittedProperties)
1594
1605
  return {};
1595
- const o = sn(e);
1606
+ const s = sn(e);
1596
1607
  return {
1597
- minimumFractionDigits: o,
1598
- maximumFractionDigits: o
1608
+ minimumFractionDigits: s,
1609
+ maximumFractionDigits: s
1599
1610
  };
1600
1611
  }
1601
1612
  function un(e, t) {
1602
1613
  if (!(typeof t != "string" || e === "percent" && t === "%"))
1603
1614
  return t;
1604
1615
  }
1605
- function ee(e) {
1606
- const t = K(e.locale), n = K(e.currency), r = un(e.type, e.suffix);
1616
+ function ne(e) {
1617
+ const t = te(e.locale), n = te(e.currency), r = un(e.type, e.suffix);
1607
1618
  return {
1608
1619
  ...e,
1609
1620
  ...t !== e.locale ? { locale: t } : {},
@@ -1611,11 +1622,11 @@ function ee(e) {
1611
1622
  ...r !== e.suffix ? { suffix: r } : {}
1612
1623
  };
1613
1624
  }
1614
- function x(e, t, n) {
1625
+ function D(e, t, n) {
1615
1626
  const r = { ...t, type: e };
1616
1627
  if ((n == null ? void 0 : n.numericInput) === "canonical" && I(r))
1617
- return ee(r);
1618
- const a = on(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, o = {
1628
+ return ne(r);
1629
+ const a = on(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, s = {
1619
1630
  type: e,
1620
1631
  locale: t.locale,
1621
1632
  minimumFractionDigits: a.minimumFractionDigits,
@@ -1627,9 +1638,9 @@ function x(e, t, n) {
1627
1638
  compact: !!t.compact,
1628
1639
  scale: typeof t.scale == "number" ? t.scale : void 0
1629
1640
  };
1630
- return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"), ee(o);
1641
+ return e === "currency" && t.currency && (s.currency = t.currency), e === "percent" && (s.percentValueMode = t.percentValueMode || "fraction"), ne(s);
1631
1642
  }
1632
- function te(e) {
1643
+ function re(e) {
1633
1644
  return {
1634
1645
  type: "date",
1635
1646
  locale: e.locale || rn,
@@ -1644,8 +1655,8 @@ function te(e) {
1644
1655
  function q(e) {
1645
1656
  return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
1646
1657
  }
1647
- function ne(e) {
1648
- const t = F(e.maxUnits);
1658
+ function ae(e) {
1659
+ const t = N(e.maxUnits);
1649
1660
  return {
1650
1661
  type: "duration",
1651
1662
  inputUnit: q(e.inputUnit) ? e.inputUnit : "second",
@@ -1658,7 +1669,7 @@ function ne(e) {
1658
1669
  negativeStyle: e.negativeStyle || "minus"
1659
1670
  };
1660
1671
  }
1661
- function re(e) {
1672
+ function ie(e) {
1662
1673
  return {
1663
1674
  type: "string",
1664
1675
  prefix: e.prefix,
@@ -1670,39 +1681,39 @@ function cn(e, t) {
1670
1681
  return;
1671
1682
  if (typeof e == "string") {
1672
1683
  const r = e.trim().toLowerCase();
1673
- return r === "currency" ? x(
1684
+ return r === "currency" ? D(
1674
1685
  "currency",
1675
1686
  { type: "currency" },
1676
1687
  t
1677
- ) : r === "percentage" || r === "percent" ? x(
1688
+ ) : r === "percentage" || r === "percent" ? D(
1678
1689
  "percent",
1679
1690
  {
1680
1691
  type: "percentage",
1681
1692
  percentValueMode: "fraction"
1682
1693
  },
1683
1694
  t
1684
- ) : r === "scientific" ? x(
1695
+ ) : r === "scientific" ? D(
1685
1696
  "scientific",
1686
1697
  { type: "scientific" },
1687
1698
  t
1688
- ) : r === "date" ? te({}) : r === "duration" ? ne({}) : r === "string" ? re({}) : r === "number" ? x(
1699
+ ) : r === "date" ? re({}) : r === "duration" ? ae({}) : r === "string" ? ie({}) : r === "number" ? D(
1689
1700
  "number",
1690
1701
  { type: "number" },
1691
1702
  t
1692
1703
  ) : void 0;
1693
1704
  }
1694
1705
  if ("type" in e && e.type === "temporal_bucket") {
1695
- const r = we.safeParse(e);
1706
+ const r = be.safeParse(e);
1696
1707
  return r.success ? r.data : void 0;
1697
1708
  }
1698
1709
  const n = e;
1699
1710
  if ((t == null ? void 0 : t.numericInput) === "canonical") {
1700
1711
  const r = n.type === "percentage" ? { ...n, type: "percent" } : n;
1701
1712
  if (I(r))
1702
- return x(r.type, r, t);
1713
+ return D(r.type, r, t);
1703
1714
  }
1704
1715
  if (n.type === "percentage")
1705
- return x(
1716
+ return D(
1706
1717
  "percent",
1707
1718
  {
1708
1719
  ...n,
@@ -1711,7 +1722,7 @@ function cn(e, t) {
1711
1722
  t
1712
1723
  );
1713
1724
  if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific") {
1714
- const r = x(
1725
+ const r = D(
1715
1726
  n.type,
1716
1727
  n,
1717
1728
  t
@@ -1719,11 +1730,11 @@ function cn(e, t) {
1719
1730
  return an(n) ? { ...r, currency: "USD" } : r;
1720
1731
  }
1721
1732
  if (n.type === "date")
1722
- return te(n);
1733
+ return re(n);
1723
1734
  if (n.type === "duration")
1724
- return ne(n);
1735
+ return ae(n);
1725
1736
  if (n.type === "string")
1726
- return re(n);
1737
+ return ie(n);
1727
1738
  }
1728
1739
  function fn(e, t) {
1729
1740
  var a;
@@ -1734,11 +1745,11 @@ function fn(e, t) {
1734
1745
  return r === null ? "(Blank)" : ((a = t == null ? void 0 : t.get(n.levelId)) == null ? void 0 : a(r)) ?? (typeof r == "object" ? r.value : String(r));
1735
1746
  }
1736
1747
  function ln(e, t, n) {
1737
- return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(ye).join(t)) ?? `${t} Total` : t;
1748
+ return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(we).join(t)) ?? `${t} Total` : t;
1738
1749
  }
1739
1750
  function On(e, t, n, r) {
1740
- var o;
1741
- const a = e[e.length - 1], i = t === "grand_total" ? n.grand.label : a ? (o = n.levels[a.levelId]) == null ? void 0 : o.label : void 0;
1751
+ var s;
1752
+ const a = e[e.length - 1], i = t === "grand_total" ? n.grand.label : a ? (s = n.levels[a.levelId]) == null ? void 0 : s.label : void 0;
1742
1753
  return ln(t, fn(e, r), i);
1743
1754
  }
1744
1755
  function Tn(e, t, n) {
@@ -1746,12 +1757,12 @@ function Tn(e, t, n) {
1746
1757
  }
1747
1758
  function vn(e) {
1748
1759
  const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: i } = e;
1749
- return Array.from({ length: i }, (o, s) => {
1750
- const c = t.slice(0, s + 1), u = r === "grand_total" ? s === 0 : r === "subtotal" && s === t.length - 1, m = n && n.length > s && j(n.slice(0, s + 1)) === j(c);
1760
+ return Array.from({ length: i }, (s, o) => {
1761
+ const f = t.slice(0, o + 1), l = r === "grand_total" ? o === 0 : r === "subtotal" && o === t.length - 1, u = n && n.length > o && U(n.slice(0, o + 1)) === U(f);
1751
1762
  return {
1752
- path: c,
1753
- total: u,
1754
- visible: u || t.length > s && (a || !m || s === t.length - 1)
1763
+ path: f,
1764
+ total: l,
1765
+ visible: l || t.length > o && (a || !u || o === t.length - 1)
1755
1766
  };
1756
1767
  });
1757
1768
  }
@@ -1762,33 +1773,33 @@ function mn(e, t) {
1762
1773
  });
1763
1774
  }
1764
1775
  function Pn(e, t, n) {
1765
- const r = /* @__PURE__ */ new Map(), a = (i, o) => {
1766
- const s = (o === "levels" ? t.levelFormats : t.measureFormats)[i.id], c = i.semanticFormat, u = mn(s, c);
1767
- o === "measures" && r.set(i.id, {
1768
- isNumeric: ge(i.column.dataType) === "number",
1776
+ const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = (s, o) => {
1777
+ const f = (o === "levels" ? t.levelFormats : t.measureFormats)[s.id], l = s.semanticFormat, u = mn(f, l);
1778
+ o === "measures" && r.set(s.id, {
1779
+ isNumeric: ye(s.column.dataType) === "number",
1769
1780
  // Use normalized affixes: a redundant percent suffix is already removed.
1770
1781
  hasTextAffixes: !!u && !!("prefix" in u && u.prefix || "suffix" in u && u.suffix)
1771
1782
  });
1772
- const m = (f) => de(f, void 0, {
1783
+ const g = (c) => he(c, void 0, {
1773
1784
  useFormattedValues: !0,
1774
1785
  timezone: n.calendar.tz,
1775
1786
  locale: n.valueFormat.locale,
1776
1787
  absence: t.absence
1777
1788
  });
1778
- if (i.column.temporalBucket) {
1779
- const f = i.column.temporalBucket, l = Pe({
1780
- metadata: f,
1781
- cardFormat: (s == null ? void 0 : s.type) === "temporal_bucket" ? s : void 0,
1782
- semanticFormat: (c == null ? void 0 : c.type) === "temporal_bucket" ? { granularity: f.granularity, format: c } : void 0,
1789
+ if (s.column.temporalBucket) {
1790
+ const c = s.column.temporalBucket, h = pe({
1791
+ metadata: c,
1792
+ cardFormat: (f == null ? void 0 : f.type) === "temporal_bucket" ? f : void 0,
1793
+ semanticFormat: (l == null ? void 0 : l.type) === "temporal_bucket" ? { granularity: c.granularity, format: l } : void 0,
1783
1794
  locale: n.valueFormat.locale,
1784
1795
  styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
1785
1796
  });
1786
- return (g) => typeof g == "string" ? Se({ value: g, metadata: f, format: l.format }) : m(g);
1797
+ return (y) => typeof y == "string" ? Oe({ value: y, metadata: c, format: h.format }) : g(y);
1787
1798
  }
1788
- if (i.column.rawTemporal) {
1789
- const f = De({
1790
- metadata: i.column.rawTemporal,
1791
- format: xe({
1799
+ if (s.column.rawTemporal) {
1800
+ const c = Te({
1801
+ metadata: s.column.rawTemporal,
1802
+ format: ve({
1792
1803
  format: (u == null ? void 0 : u.type) === "date" ? {
1793
1804
  type: "raw_temporal",
1794
1805
  timezone: u.timezone,
@@ -1803,62 +1814,64 @@ function Pn(e, t, n) {
1803
1814
  calendar: n.calendar
1804
1815
  })
1805
1816
  });
1806
- return (l) => {
1807
- if (typeof l != "string") return m(l);
1808
- const g = f(l);
1809
- return g.ok ? g.text : m(l);
1817
+ return (h) => {
1818
+ if (typeof h != "string") return g(h);
1819
+ const y = c(h);
1820
+ return y.ok ? y.text : g(h);
1810
1821
  };
1811
1822
  }
1812
1823
  if (I(u)) {
1813
- const f = pe(u, n.valueFormat);
1814
- return (l) => typeof l == "number" || typeof l == "object" && l !== null ? Oe(l, f) : m(l);
1824
+ const c = Pe(u, n.valueFormat);
1825
+ return o === "measures" && a.set(s.id, c), (h) => typeof h == "number" || typeof h == "object" && h !== null ? Se(h, c) : g(h);
1815
1826
  }
1816
- return (u == null ? void 0 : u.type) === "duration" ? (f) => typeof f == "number" || typeof f == "string" || typeof f == "object" && f !== null ? Te(
1817
- typeof f == "object" ? f.value : f,
1827
+ return (u == null ? void 0 : u.type) === "duration" && o === "measures" && a.set(s.id, u), (u == null ? void 0 : u.type) === "duration" ? (c) => typeof c == "number" || typeof c == "string" || typeof c == "object" && c !== null ? ke(
1828
+ typeof c == "object" ? c.value : c,
1818
1829
  u
1819
- ) : m(f) : (u == null ? void 0 : u.type) === "string" ? (f) => f === null ? m(f) : `${u.prefix ?? ""}${m(f)}${u.suffix ?? ""}` : m;
1830
+ ) : g(c) : (u == null ? void 0 : u.type) === "string" ? (c) => c === null ? g(c) : `${u.prefix ?? ""}${g(c)}${u.suffix ?? ""}` : g;
1820
1831
  };
1821
1832
  return {
1822
1833
  levels: new Map(
1823
- e.levels.map((i) => [i.id, a(i, "levels")])
1834
+ e.levels.map((s) => [s.id, i(s, "levels")])
1824
1835
  ),
1825
1836
  measures: new Map(
1826
- e.measures.map((i) => [i.id, a(i, "measures")])
1837
+ e.measures.map((s) => [s.id, i(s, "measures")])
1827
1838
  ),
1828
1839
  measureSemantics: r,
1840
+ measureFormats: a,
1829
1841
  absence: t.absence
1830
1842
  };
1831
1843
  }
1832
1844
  export {
1833
- x as A,
1834
- K as B,
1835
- mn as C,
1845
+ d as A,
1846
+ ze as B,
1847
+ E as C,
1836
1848
  rn as D,
1837
- ln as E,
1849
+ Ne as E,
1850
+ ln as F,
1838
1851
  en as a,
1839
1852
  tn as b,
1840
1853
  xn as c,
1841
- de as d,
1842
- pn as e,
1854
+ Dn as d,
1855
+ he as e,
1843
1856
  cn as f,
1844
- Dn as g,
1845
- Pn as h,
1846
- On as i,
1847
- vn as j,
1848
- Tn as k,
1849
- Jt as l,
1857
+ Mn as g,
1858
+ pn as h,
1859
+ Pn as i,
1860
+ On as j,
1861
+ vn as k,
1862
+ Tn as l,
1850
1863
  fn as m,
1851
- le as n,
1852
- Rt as o,
1853
- me as p,
1854
- P as q,
1855
- Mn as r,
1856
- ue as s,
1857
- Y as t,
1858
- h as u,
1859
- ze as v,
1860
- E as w,
1861
- Ye as x,
1862
- te as y,
1863
- ne as z
1864
+ de as n,
1865
+ R as o,
1866
+ A as p,
1867
+ re as q,
1868
+ bn as r,
1869
+ ae as s,
1870
+ D as t,
1871
+ te as u,
1872
+ mn as v,
1873
+ At as w,
1874
+ P as x,
1875
+ fe as y,
1876
+ F as z
1864
1877
  };