react-semaphor 0.1.449 → 0.1.454

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