@har-analyzer/components 0.0.18 → 0.0.20

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.
@@ -1,20 +1,19 @@
1
- import { jsx as m, jsxs as ve } from "react/jsx-runtime";
2
- import Ke from "@cloudscape-design/components/header";
1
+ import { jsx as m, jsxs as te } from "react/jsx-runtime";
2
+ import at from "@cloudscape-design/components/header";
3
3
  import z from "@cloudscape-design/components/status-indicator";
4
- import { useMemo as y, use as Fe, useState as ae, useCallback as B, useEffect as Ee, createContext as et } from "react";
5
- import { useCollection as tt } from "@cloudscape-design/collection-hooks";
6
- import nt from "@cloudscape-design/components/collection-preferences";
7
- import rt from "@cloudscape-design/components/property-filter";
8
- import at from "@cloudscape-design/components/table";
9
- import { o as I, C as ot } from "./content-type.js";
10
- import it from "@cloudscape-design/components/space-between";
11
- import { c as oe, b as st, a as ct, d as ut, i as lt } from "./har.js";
12
- import ft from "@cloudscape-design/components/spinner";
13
- import { U as dt } from "./context.js";
14
- import mt from "@cloudscape-design/components/toggle";
15
- import ht from "@cloudscape-design/components/multiselect";
16
- import gt from "@cloudscape-design/components/segmented-control";
17
- const pt = [
4
+ import { useMemo as w, use as Ie, useState as ie, useCallback as B, useEffect as ke, createContext as ot } from "react";
5
+ import { useCollection as it } from "@cloudscape-design/collection-hooks";
6
+ import st from "@cloudscape-design/components/collection-preferences";
7
+ import ct from "@cloudscape-design/components/property-filter";
8
+ import ut from "@cloudscape-design/components/table";
9
+ import { o as W, C as lt } from "./content-type.js";
10
+ import ft from "@cloudscape-design/components/space-between";
11
+ import { c as se, b as dt, a as mt, d as ht, i as gt } from "./har.js";
12
+ import pt from "@cloudscape-design/components/spinner";
13
+ import { U as wt } from "./context.js";
14
+ import We from "@cloudscape-design/components/segmented-control";
15
+ import yt from "@cloudscape-design/components/multiselect";
16
+ const bt = [
18
17
  "B",
19
18
  "kB",
20
19
  "MB",
@@ -24,7 +23,7 @@ const pt = [
24
23
  "EB",
25
24
  "ZB",
26
25
  "YB"
27
- ], wt = [
26
+ ], Tt = [
28
27
  "B",
29
28
  "KiB",
30
29
  "MiB",
@@ -34,7 +33,7 @@ const pt = [
34
33
  "EiB",
35
34
  "ZiB",
36
35
  "YiB"
37
- ], yt = [
36
+ ], Dt = [
38
37
  "b",
39
38
  "kbit",
40
39
  "Mbit",
@@ -44,7 +43,7 @@ const pt = [
44
43
  "Ebit",
45
44
  "Zbit",
46
45
  "Ybit"
47
- ], bt = [
46
+ ], Pt = [
48
47
  "b",
49
48
  "kibit",
50
49
  "Mibit",
@@ -54,21 +53,21 @@ const pt = [
54
53
  "Eibit",
55
54
  "Zibit",
56
55
  "Yibit"
57
- ], ie = (e, t, n) => {
56
+ ], ce = (e, t, n) => {
58
57
  let r = e;
59
58
  return typeof t == "string" || Array.isArray(t) ? r = e.toLocaleString(t, n) : (t === !0 || n !== void 0) && (r = e.toLocaleString(void 0, n)), r;
60
- }, ke = (e) => {
59
+ }, _e = (e) => {
61
60
  if (typeof e == "number")
62
61
  return Math.log10(e);
63
62
  const t = e.toString(10);
64
63
  return t.length + Math.log10("0." + t.slice(0, 15));
65
- }, Tt = (e) => typeof e == "number" ? Math.log(e) : ke(e) * Math.log(10), Dt = (e, t) => {
64
+ }, Mt = (e) => typeof e == "number" ? Math.log(e) : _e(e) * Math.log(10), Ot = (e, t) => {
66
65
  if (typeof e == "number")
67
66
  return e / t;
68
67
  const n = e / BigInt(t), r = e % BigInt(t);
69
68
  return Number(n) + Number(r) / t;
70
69
  };
71
- function Pt(e, t) {
70
+ function xt(e, t) {
72
71
  if (typeof e != "bigint" && !Number.isFinite(e))
73
72
  throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);
74
73
  t = {
@@ -77,24 +76,24 @@ function Pt(e, t) {
77
76
  space: !0,
78
77
  ...t
79
78
  };
80
- const n = t.bits ? t.binary ? bt : yt : t.binary ? wt : pt, r = t.space ? " " : "";
79
+ const n = t.bits ? t.binary ? Pt : Dt : t.binary ? Tt : bt, r = t.space ? " " : "";
81
80
  if (t.signed && (typeof e == "number" ? e === 0 : e === 0n))
82
81
  return ` 0${r}${n[0]}`;
83
82
  const a = e < 0, o = a ? "-" : t.signed ? "+" : "";
84
83
  a && (e = -e);
85
84
  let i;
86
85
  if (t.minimumFractionDigits !== void 0 && (i = { minimumFractionDigits: t.minimumFractionDigits }), t.maximumFractionDigits !== void 0 && (i = { maximumFractionDigits: t.maximumFractionDigits, ...i }), e < 1) {
87
- const d = ie(e, t.locale, i);
88
- return o + d + r + n[0];
86
+ const f = ce(e, t.locale, i);
87
+ return o + f + r + n[0];
89
88
  }
90
- const s = Math.min(Math.floor(t.binary ? Tt(e) / Math.log(1024) : ke(e) / 3), n.length - 1);
91
- e = Dt(e, (t.binary ? 1024 : 1e3) ** s), i || (e = e.toPrecision(3));
92
- const c = ie(Number(e), t.locale, i), u = n[s];
89
+ const s = Math.min(Math.floor(t.binary ? Mt(e) / Math.log(1024) : _e(e) / 3), n.length - 1);
90
+ e = Ot(e, (t.binary ? 1024 : 1e3) ** s), i || (e = e.toPrecision(3));
91
+ const c = ce(Number(e), t.locale, i), u = n[s];
93
92
  return o + c + r + u;
94
93
  }
95
- function Mt(e, t) {
94
+ function St(e, t) {
96
95
  return e.map((n) => ({
97
- ...I(t).reduce(
96
+ ...W(t).reduce(
98
97
  (a, [o, { cell: i }]) => {
99
98
  const { value: s } = i(n);
100
99
  return a[o] = s, a;
@@ -104,8 +103,8 @@ function Mt(e, t) {
104
103
  __originalItem__: n
105
104
  }));
106
105
  }
107
- function Ot(e) {
108
- return I(e).map(([t, { header: n, type: r }]) => {
106
+ function Nt(e) {
107
+ return W(e).map(([t, { header: n, type: r }]) => {
109
108
  const a = {
110
109
  key: t,
111
110
  groupValuesLabel: `${n} values`,
@@ -131,8 +130,8 @@ function Ot(e) {
131
130
  } : a;
132
131
  });
133
132
  }
134
- function xt(e) {
135
- return I(e).map(([t, {
133
+ function Ct(e) {
134
+ return W(e).map(([t, {
136
135
  header: n,
137
136
  width: r,
138
137
  isSortable: a = !0,
@@ -148,14 +147,14 @@ function xt(e) {
148
147
  }
149
148
  }));
150
149
  }
151
- function St(e) {
152
- return I(e).map(([t, { header: n, isVisibleByDefault: r = !0 }]) => ({
150
+ function Yt(e) {
151
+ return W(e).map(([t, { header: n, isVisibleByDefault: r = !0 }]) => ({
153
152
  id: t,
154
153
  label: n,
155
154
  visible: r
156
155
  }));
157
156
  }
158
- function Nt(e, t) {
157
+ function vt(e, t) {
159
158
  return e.map((n) => {
160
159
  const r = t.find((a) => a.id === n.id)?.width;
161
160
  return {
@@ -164,7 +163,7 @@ function Nt(e, t) {
164
163
  };
165
164
  });
166
165
  }
167
- function Yt(e, t) {
166
+ function Et(e, t) {
168
167
  if (!e.contentDisplay)
169
168
  return e;
170
169
  const n = t.map(({ id: a }) => a), r = e.contentDisplay.filter(({ id: a }) => n.includes(a));
@@ -173,7 +172,7 @@ function Yt(e, t) {
173
172
  contentDisplay: r
174
173
  };
175
174
  }
176
- function Ct({
175
+ function Ft({
177
176
  items: e,
178
177
  getRowId: t,
179
178
  columnsDefinition: n,
@@ -184,42 +183,43 @@ function Ct({
184
183
  selectedItems: s = [],
185
184
  onSelectionChange: c,
186
185
  contentDensity: u = "comfortable",
187
- header: d
186
+ header: f,
187
+ variant: d = "borderless"
188
188
  }) {
189
- const f = y(
190
- () => Mt(e, n),
189
+ const p = w(
190
+ () => St(e, n),
191
191
  [e, n]
192
- ), p = y(() => xt(n), [n]), S = y(
192
+ ), D = w(() => Ct(n), [n]), y = w(
193
193
  () => {
194
194
  const h = new Set(s.map((b) => t(b)));
195
- return f.filter(
195
+ return p.filter(
196
196
  (b) => h.has(t(b.__originalItem__))
197
197
  );
198
198
  },
199
- [s, f, t]
200
- ), w = y(
201
- () => St(n),
199
+ [s, p, t]
200
+ ), O = w(
201
+ () => Yt(n),
202
202
  [n]
203
- ), N = y(() => ({
204
- contentDisplay: w,
203
+ ), Ge = w(() => ({
204
+ contentDisplay: O,
205
205
  wrapLines: !1
206
- }), [w]), [{ collectionPreferences: U = N, preferredColumnWidths: L }, te] = r(), $ = y(
207
- () => Yt(U, p),
208
- [U, p]
209
- ), qe = y(
210
- () => Nt(p, L),
211
- [p, L]
212
- ), Xe = (h) => {
213
- te({
206
+ }), [O]), [{ collectionPreferences: U = Ge, preferredColumnWidths: L }, re] = r(), $ = w(
207
+ () => Et(U, D),
208
+ [U, D]
209
+ ), Qe = w(
210
+ () => vt(D, L),
211
+ [D, L]
212
+ ), Ve = (h) => {
213
+ re({
214
214
  collectionPreferences: h,
215
215
  preferredColumnWidths: L
216
216
  });
217
- }, Ze = (h) => {
218
- te({
217
+ }, Je = (h) => {
218
+ re({
219
219
  collectionPreferences: U,
220
220
  preferredColumnWidths: h
221
221
  });
222
- }, je = ({ detail: { item: h } }) => {
222
+ }, Ke = ({ detail: { item: h } }) => {
223
223
  if (!c || !o)
224
224
  return;
225
225
  const b = h.__originalItem__;
@@ -227,77 +227,85 @@ function Ct({
227
227
  c([b]);
228
228
  return;
229
229
  }
230
- const E = t(b), A = s.some((R) => t(R) === E);
231
- c(A ? s.filter((R) => t(R) !== E) : [...s, b]);
232
- }, ne = (h) => t(h.__originalItem__), Ge = y(
233
- () => Ot(n),
230
+ const F = t(b), A = s.some((R) => t(R) === F);
231
+ c(A ? s.filter((R) => t(R) !== F) : [...s, b]);
232
+ }, ae = (h) => t(h.__originalItem__), et = w(
233
+ () => Nt(n),
234
234
  [n]
235
235
  ), {
236
- items: Qe,
237
- collectionProps: Ve,
238
- propertyFilterProps: Je,
239
- filteredItemsCount: re
240
- } = tt(f, {
236
+ items: tt,
237
+ collectionProps: nt,
238
+ propertyFilterProps: rt,
239
+ filteredItemsCount: oe
240
+ } = it(p, {
241
241
  propertyFiltering: {
242
- filteringProperties: Ge
242
+ filteringProperties: et
243
243
  },
244
244
  sorting: {},
245
- selection: { keepSelection: !0, trackBy: ne }
245
+ selection: { keepSelection: !0, trackBy: ae }
246
246
  });
247
247
  return /* @__PURE__ */ m(
248
- at,
248
+ ut,
249
249
  {
250
- ...Ve,
251
- header: d,
252
- variant: "full-page",
250
+ ...nt,
251
+ header: f,
252
+ variant: d,
253
253
  contentDensity: u,
254
254
  resizableColumns: !0,
255
255
  stripedRows: !0,
256
256
  stickyHeader: !0,
257
257
  wrapLines: $.wrapLines,
258
- columnDefinitions: qe,
258
+ columnDefinitions: Qe,
259
259
  columnDisplay: $.contentDisplay,
260
260
  onColumnWidthsChange: ({ detail: h }) => {
261
- const b = p.map(({ id: E }, A) => ({
262
- id: E,
261
+ const b = D.map(({ id: F }, A) => ({
262
+ id: F,
263
263
  width: h.widths[A]
264
264
  }));
265
- Ze(b);
265
+ Je(b);
266
266
  },
267
- items: Qe,
268
- trackBy: ne,
267
+ items: tt,
268
+ trackBy: ae,
269
269
  empty: a,
270
270
  selectionType: o,
271
- onRowClick: i ? je : void 0,
272
- selectedItems: S,
271
+ onRowClick: i ? Ke : void 0,
272
+ selectedItems: y,
273
273
  onSelectionChange: (h) => {
274
274
  c && c(h.detail.selectedItems.map((b) => b.__originalItem__));
275
275
  },
276
276
  filter: /* @__PURE__ */ m(
277
- rt,
277
+ ct,
278
278
  {
279
- countText: re ? `${re} matches` : void 0,
280
- ...Je
279
+ countText: oe ? `${oe} matches` : void 0,
280
+ ...rt
281
281
  }
282
282
  ),
283
283
  preferences: /* @__PURE__ */ m(
284
- nt,
284
+ st,
285
285
  {
286
286
  wrapLinesPreference: {},
287
- contentDisplayPreference: { options: w, enableColumnFiltering: !0 },
287
+ contentDisplayPreference: { options: O, enableColumnFiltering: !0 },
288
288
  preferences: $,
289
289
  onConfirm: ({ detail: h }) => {
290
- Xe(h);
290
+ Ve(h);
291
291
  }
292
292
  }
293
293
  )
294
294
  }
295
295
  );
296
296
  }
297
- function vt({ children: e, ...t }) {
298
- return /* @__PURE__ */ m(it, { direction: "horizontal", size: "s", ...t, children: e });
297
+ function He({ children: e, ...t }) {
298
+ return /* @__PURE__ */ m(
299
+ ft,
300
+ {
301
+ direction: "horizontal",
302
+ size: "s",
303
+ ...t,
304
+ children: e
305
+ }
306
+ );
299
307
  }
300
- const Ft = {
308
+ const It = {
301
309
  lessThanXSeconds: {
302
310
  one: "less than a second",
303
311
  other: "less than {{count}} seconds"
@@ -359,9 +367,9 @@ const Ft = {
359
367
  one: "almost 1 year",
360
368
  other: "almost {{count}} years"
361
369
  }
362
- }, Et = (e, t, n) => {
370
+ }, kt = (e, t, n) => {
363
371
  let r;
364
- const a = Ft[e];
372
+ const a = It[e];
365
373
  return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
366
374
  };
367
375
  function q(e) {
@@ -370,43 +378,43 @@ function q(e) {
370
378
  return e.formats[n] || e.formats[e.defaultWidth];
371
379
  };
372
380
  }
373
- const kt = {
381
+ const Wt = {
374
382
  full: "EEEE, MMMM do, y",
375
383
  long: "MMMM do, y",
376
384
  medium: "MMM d, y",
377
385
  short: "MM/dd/yyyy"
378
- }, Wt = {
386
+ }, _t = {
379
387
  full: "h:mm:ss a zzzz",
380
388
  long: "h:mm:ss a z",
381
389
  medium: "h:mm:ss a",
382
390
  short: "h:mm a"
383
- }, It = {
391
+ }, Ht = {
384
392
  full: "{{date}} 'at' {{time}}",
385
393
  long: "{{date}} 'at' {{time}}",
386
394
  medium: "{{date}}, {{time}}",
387
395
  short: "{{date}}, {{time}}"
388
- }, _t = {
396
+ }, Ut = {
389
397
  date: q({
390
- formats: kt,
398
+ formats: Wt,
391
399
  defaultWidth: "full"
392
400
  }),
393
401
  time: q({
394
- formats: Wt,
402
+ formats: _t,
395
403
  defaultWidth: "full"
396
404
  }),
397
405
  dateTime: q({
398
- formats: It,
406
+ formats: Ht,
399
407
  defaultWidth: "full"
400
408
  })
401
- }, Ht = {
409
+ }, Lt = {
402
410
  lastWeek: "'last' eeee 'at' p",
403
411
  yesterday: "'yesterday at' p",
404
412
  today: "'today at' p",
405
413
  tomorrow: "'tomorrow at' p",
406
414
  nextWeek: "eeee 'at' p",
407
415
  other: "P"
408
- }, Ut = (e, t, n, r) => Ht[e];
409
- function Y(e) {
416
+ }, $t = (e, t, n, r) => Lt[e];
417
+ function C(e) {
410
418
  return (t, n) => {
411
419
  const r = n?.context ? String(n.context) : "standalone";
412
420
  let a;
@@ -421,15 +429,15 @@ function Y(e) {
421
429
  return a[o];
422
430
  };
423
431
  }
424
- const Lt = {
432
+ const At = {
425
433
  narrow: ["B", "A"],
426
434
  abbreviated: ["BC", "AD"],
427
435
  wide: ["Before Christ", "Anno Domini"]
428
- }, $t = {
436
+ }, Rt = {
429
437
  narrow: ["1", "2", "3", "4"],
430
438
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
431
439
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
432
- }, At = {
440
+ }, zt = {
433
441
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
434
442
  abbreviated: [
435
443
  "Jan",
@@ -459,7 +467,7 @@ const Lt = {
459
467
  "November",
460
468
  "December"
461
469
  ]
462
- }, Rt = {
470
+ }, Bt = {
463
471
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
464
472
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
465
473
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -472,7 +480,7 @@ const Lt = {
472
480
  "Friday",
473
481
  "Saturday"
474
482
  ]
475
- }, zt = {
483
+ }, qt = {
476
484
  narrow: {
477
485
  am: "a",
478
486
  pm: "p",
@@ -503,7 +511,7 @@ const Lt = {
503
511
  evening: "evening",
504
512
  night: "night"
505
513
  }
506
- }, Bt = {
514
+ }, Xt = {
507
515
  narrow: {
508
516
  am: "a",
509
517
  pm: "p",
@@ -534,7 +542,7 @@ const Lt = {
534
542
  evening: "in the evening",
535
543
  night: "at night"
536
544
  }
537
- }, qt = (e, t) => {
545
+ }, Zt = (e, t) => {
538
546
  const n = Number(e), r = n % 100;
539
547
  if (r > 20 || r < 10)
540
548
  switch (r % 10) {
@@ -546,61 +554,61 @@ const Lt = {
546
554
  return n + "rd";
547
555
  }
548
556
  return n + "th";
549
- }, Xt = {
550
- ordinalNumber: qt,
551
- era: Y({
552
- values: Lt,
557
+ }, jt = {
558
+ ordinalNumber: Zt,
559
+ era: C({
560
+ values: At,
553
561
  defaultWidth: "wide"
554
562
  }),
555
- quarter: Y({
556
- values: $t,
563
+ quarter: C({
564
+ values: Rt,
557
565
  defaultWidth: "wide",
558
566
  argumentCallback: (e) => e - 1
559
567
  }),
560
- month: Y({
561
- values: At,
568
+ month: C({
569
+ values: zt,
562
570
  defaultWidth: "wide"
563
571
  }),
564
- day: Y({
565
- values: Rt,
572
+ day: C({
573
+ values: Bt,
566
574
  defaultWidth: "wide"
567
575
  }),
568
- dayPeriod: Y({
569
- values: zt,
576
+ dayPeriod: C({
577
+ values: qt,
570
578
  defaultWidth: "wide",
571
- formattingValues: Bt,
579
+ formattingValues: Xt,
572
580
  defaultFormattingWidth: "wide"
573
581
  })
574
582
  };
575
- function C(e) {
583
+ function Y(e) {
576
584
  return (t, n = {}) => {
577
585
  const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], o = t.match(a);
578
586
  if (!o)
579
587
  return null;
580
- const i = o[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? jt(s, (f) => f.test(i)) : (
588
+ const i = o[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Qt(s, (d) => d.test(i)) : (
581
589
  // [TODO] -- I challenge you to fix the type
582
- Zt(s, (f) => f.test(i))
590
+ Gt(s, (d) => d.test(i))
583
591
  );
584
592
  let u;
585
593
  u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
586
594
  // [TODO] -- I challenge you to fix the type
587
595
  n.valueCallback(u)
588
596
  ) : u;
589
- const d = t.slice(i.length);
590
- return { value: u, rest: d };
597
+ const f = t.slice(i.length);
598
+ return { value: u, rest: f };
591
599
  };
592
600
  }
593
- function Zt(e, t) {
601
+ function Gt(e, t) {
594
602
  for (const n in e)
595
603
  if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
596
604
  return n;
597
605
  }
598
- function jt(e, t) {
606
+ function Qt(e, t) {
599
607
  for (let n = 0; n < e.length; n++)
600
608
  if (t(e[n]))
601
609
  return n;
602
610
  }
603
- function Gt(e) {
611
+ function Vt(e) {
604
612
  return (t, n = {}) => {
605
613
  const r = t.match(e.matchPattern);
606
614
  if (!r) return null;
@@ -612,23 +620,23 @@ function Gt(e) {
612
620
  return { value: i, rest: s };
613
621
  };
614
622
  }
615
- const Qt = /^(\d+)(th|st|nd|rd)?/i, Vt = /\d+/i, Jt = {
623
+ const Jt = /^(\d+)(th|st|nd|rd)?/i, Kt = /\d+/i, en = {
616
624
  narrow: /^(b|a)/i,
617
625
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
618
626
  wide: /^(before christ|before common era|anno domini|common era)/i
619
- }, Kt = {
627
+ }, tn = {
620
628
  any: [/^b/i, /^(a|c)/i]
621
- }, en = {
629
+ }, nn = {
622
630
  narrow: /^[1234]/i,
623
631
  abbreviated: /^q[1234]/i,
624
632
  wide: /^[1234](th|st|nd|rd)? quarter/i
625
- }, tn = {
633
+ }, rn = {
626
634
  any: [/1/i, /2/i, /3/i, /4/i]
627
- }, nn = {
635
+ }, an = {
628
636
  narrow: /^[jfmasond]/i,
629
637
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
630
638
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
631
- }, rn = {
639
+ }, on = {
632
640
  narrow: [
633
641
  /^j/i,
634
642
  /^f/i,
@@ -657,18 +665,18 @@ const Qt = /^(\d+)(th|st|nd|rd)?/i, Vt = /\d+/i, Jt = {
657
665
  /^n/i,
658
666
  /^d/i
659
667
  ]
660
- }, an = {
668
+ }, sn = {
661
669
  narrow: /^[smtwf]/i,
662
670
  short: /^(su|mo|tu|we|th|fr|sa)/i,
663
671
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
664
672
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
665
- }, on = {
673
+ }, cn = {
666
674
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
667
675
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
668
- }, sn = {
676
+ }, un = {
669
677
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
670
678
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
671
- }, cn = {
679
+ }, ln = {
672
680
  any: {
673
681
  am: /^a/i,
674
682
  pm: /^p/i,
@@ -679,67 +687,67 @@ const Qt = /^(\d+)(th|st|nd|rd)?/i, Vt = /\d+/i, Jt = {
679
687
  evening: /evening/i,
680
688
  night: /night/i
681
689
  }
682
- }, un = {
683
- ordinalNumber: Gt({
684
- matchPattern: Qt,
685
- parsePattern: Vt,
690
+ }, fn = {
691
+ ordinalNumber: Vt({
692
+ matchPattern: Jt,
693
+ parsePattern: Kt,
686
694
  valueCallback: (e) => parseInt(e, 10)
687
695
  }),
688
- era: C({
689
- matchPatterns: Jt,
690
- defaultMatchWidth: "wide",
691
- parsePatterns: Kt,
692
- defaultParseWidth: "any"
693
- }),
694
- quarter: C({
696
+ era: Y({
695
697
  matchPatterns: en,
696
698
  defaultMatchWidth: "wide",
697
699
  parsePatterns: tn,
698
- defaultParseWidth: "any",
699
- valueCallback: (e) => e + 1
700
+ defaultParseWidth: "any"
700
701
  }),
701
- month: C({
702
+ quarter: Y({
702
703
  matchPatterns: nn,
703
704
  defaultMatchWidth: "wide",
704
705
  parsePatterns: rn,
705
- defaultParseWidth: "any"
706
+ defaultParseWidth: "any",
707
+ valueCallback: (e) => e + 1
706
708
  }),
707
- day: C({
709
+ month: Y({
708
710
  matchPatterns: an,
709
711
  defaultMatchWidth: "wide",
710
712
  parsePatterns: on,
711
713
  defaultParseWidth: "any"
712
714
  }),
713
- dayPeriod: C({
715
+ day: Y({
714
716
  matchPatterns: sn,
715
- defaultMatchWidth: "any",
717
+ defaultMatchWidth: "wide",
716
718
  parsePatterns: cn,
717
719
  defaultParseWidth: "any"
720
+ }),
721
+ dayPeriod: Y({
722
+ matchPatterns: un,
723
+ defaultMatchWidth: "any",
724
+ parsePatterns: ln,
725
+ defaultParseWidth: "any"
718
726
  })
719
- }, ln = {
727
+ }, dn = {
720
728
  code: "en-US",
721
- formatDistance: Et,
722
- formatLong: _t,
723
- formatRelative: Ut,
724
- localize: Xt,
725
- match: un,
729
+ formatDistance: kt,
730
+ formatLong: Ut,
731
+ formatRelative: $t,
732
+ localize: jt,
733
+ match: fn,
726
734
  options: {
727
735
  weekStartsOn: 0,
728
736
  firstWeekContainsDate: 1
729
737
  }
730
738
  };
731
- let fn = {};
732
- function F() {
733
- return fn;
739
+ let mn = {};
740
+ function E() {
741
+ return mn;
734
742
  }
735
- const We = 6048e5, dn = 864e5, se = Symbol.for("constructDateFrom");
736
- function P(e, t) {
737
- return typeof e == "function" ? e(t) : e && typeof e == "object" && se in e ? e[se](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
743
+ const Ue = 6048e5, hn = 864e5, ue = Symbol.for("constructDateFrom");
744
+ function M(e, t) {
745
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && ue in e ? e[ue](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
738
746
  }
739
747
  function T(e, t) {
740
- return P(t || e, e);
748
+ return M(t || e, e);
741
749
  }
742
- function ce(e) {
750
+ function le(e) {
743
751
  const t = T(e), n = new Date(
744
752
  Date.UTC(
745
753
  t.getFullYear(),
@@ -753,77 +761,77 @@ function ce(e) {
753
761
  );
754
762
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
755
763
  }
756
- function mn(e, ...t) {
757
- const n = P.bind(
764
+ function gn(e, ...t) {
765
+ const n = M.bind(
758
766
  null,
759
767
  t.find((r) => typeof r == "object")
760
768
  );
761
769
  return t.map(n);
762
770
  }
763
- function ue(e, t) {
771
+ function fe(e, t) {
764
772
  const n = T(e, t?.in);
765
773
  return n.setHours(0, 0, 0, 0), n;
766
774
  }
767
- function hn(e, t, n) {
768
- const [r, a] = mn(
775
+ function pn(e, t, n) {
776
+ const [r, a] = gn(
769
777
  n?.in,
770
778
  e,
771
779
  t
772
- ), o = ue(r), i = ue(a), s = +o - ce(o), c = +i - ce(i);
773
- return Math.round((s - c) / dn);
780
+ ), o = fe(r), i = fe(a), s = +o - le(o), c = +i - le(i);
781
+ return Math.round((s - c) / hn);
774
782
  }
775
- function gn(e, t) {
783
+ function wn(e, t) {
776
784
  const n = T(e, t?.in);
777
785
  return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
778
786
  }
779
- function pn(e, t) {
787
+ function yn(e, t) {
780
788
  const n = T(e, t?.in);
781
- return hn(n, gn(n)) + 1;
789
+ return pn(n, wn(n)) + 1;
782
790
  }
783
791
  function v(e, t) {
784
- const n = F(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = T(e, t?.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
792
+ const n = E(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = T(e, t?.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
785
793
  return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a;
786
794
  }
787
- function k(e, t) {
795
+ function I(e, t) {
788
796
  return v(e, { ...t, weekStartsOn: 1 });
789
797
  }
790
- function Ie(e, t) {
791
- const n = T(e, t?.in), r = n.getFullYear(), a = P(n, 0);
798
+ function Le(e, t) {
799
+ const n = T(e, t?.in), r = n.getFullYear(), a = M(n, 0);
792
800
  a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
793
- const o = k(a), i = P(n, 0);
801
+ const o = I(a), i = M(n, 0);
794
802
  i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
795
- const s = k(i);
803
+ const s = I(i);
796
804
  return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
797
805
  }
798
- function wn(e, t) {
799
- const n = Ie(e, t), r = P(e, 0);
800
- return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), k(r);
806
+ function bn(e, t) {
807
+ const n = Le(e, t), r = M(e, 0);
808
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), I(r);
801
809
  }
802
- function yn(e, t) {
803
- const n = T(e, t?.in), r = +k(n) - +wn(n);
804
- return Math.round(r / We) + 1;
810
+ function Tn(e, t) {
811
+ const n = T(e, t?.in), r = +I(n) - +bn(n);
812
+ return Math.round(r / Ue) + 1;
805
813
  }
806
- function _e(e, t) {
807
- const n = T(e, t?.in), r = n.getFullYear(), a = F(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, i = P(t?.in || e, 0);
814
+ function $e(e, t) {
815
+ const n = T(e, t?.in), r = n.getFullYear(), a = E(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, i = M(t?.in || e, 0);
808
816
  i.setFullYear(r + 1, 0, o), i.setHours(0, 0, 0, 0);
809
- const s = v(i, t), c = P(t?.in || e, 0);
817
+ const s = v(i, t), c = M(t?.in || e, 0);
810
818
  c.setFullYear(r, 0, o), c.setHours(0, 0, 0, 0);
811
819
  const u = v(c, t);
812
820
  return +n >= +s ? r + 1 : +n >= +u ? r : r - 1;
813
821
  }
814
- function bn(e, t) {
815
- const n = F(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = _e(e, t), o = P(t?.in || e, 0);
822
+ function Dn(e, t) {
823
+ const n = E(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = $e(e, t), o = M(t?.in || e, 0);
816
824
  return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), v(o, t);
817
825
  }
818
- function Tn(e, t) {
819
- const n = T(e, t?.in), r = +v(n, t) - +bn(n, t);
820
- return Math.round(r / We) + 1;
826
+ function Pn(e, t) {
827
+ const n = T(e, t?.in), r = +v(n, t) - +Dn(n, t);
828
+ return Math.round(r / Ue) + 1;
821
829
  }
822
830
  function l(e, t) {
823
831
  const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
824
832
  return n + r;
825
833
  }
826
- const D = {
834
+ const P = {
827
835
  // Year
828
836
  y(e, t) {
829
837
  const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
@@ -877,14 +885,14 @@ const D = {
877
885
  );
878
886
  return l(a, t.length);
879
887
  }
880
- }, O = {
888
+ }, S = {
881
889
  midnight: "midnight",
882
890
  noon: "noon",
883
891
  morning: "morning",
884
892
  afternoon: "afternoon",
885
893
  evening: "evening",
886
894
  night: "night"
887
- }, le = {
895
+ }, de = {
888
896
  // Era
889
897
  G: function(e, t, n) {
890
898
  const r = e.getFullYear() > 0 ? 1 : 0;
@@ -909,11 +917,11 @@ const D = {
909
917
  const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
910
918
  return n.ordinalNumber(a, { unit: "year" });
911
919
  }
912
- return D.y(e, t);
920
+ return P.y(e, t);
913
921
  },
914
922
  // Local week-numbering year
915
923
  Y: function(e, t, n, r) {
916
- const a = _e(e, r), o = a > 0 ? a : 1 - a;
924
+ const a = $e(e, r), o = a > 0 ? a : 1 - a;
917
925
  if (t === "YY") {
918
926
  const i = o % 100;
919
927
  return l(i, 2);
@@ -922,7 +930,7 @@ const D = {
922
930
  },
923
931
  // ISO week-numbering year
924
932
  R: function(e, t) {
925
- const n = Ie(e);
933
+ const n = Le(e);
926
934
  return l(n, t.length);
927
935
  },
928
936
  // Extended year. This is a single number designating the year of this calendar system.
@@ -1012,7 +1020,7 @@ const D = {
1012
1020
  switch (t) {
1013
1021
  case "M":
1014
1022
  case "MM":
1015
- return D.M(e, t);
1023
+ return P.M(e, t);
1016
1024
  // 1st, 2nd, ..., 12th
1017
1025
  case "Mo":
1018
1026
  return n.ordinalNumber(r + 1, { unit: "month" });
@@ -1067,21 +1075,21 @@ const D = {
1067
1075
  },
1068
1076
  // Local week of year
1069
1077
  w: function(e, t, n, r) {
1070
- const a = Tn(e, r);
1078
+ const a = Pn(e, r);
1071
1079
  return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : l(a, t.length);
1072
1080
  },
1073
1081
  // ISO week of year
1074
1082
  I: function(e, t, n) {
1075
- const r = yn(e);
1083
+ const r = Tn(e);
1076
1084
  return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : l(r, t.length);
1077
1085
  },
1078
1086
  // Day of the month
1079
1087
  d: function(e, t, n) {
1080
- return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : D.d(e, t);
1088
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : P.d(e, t);
1081
1089
  },
1082
1090
  // Day of year
1083
1091
  D: function(e, t, n) {
1084
- const r = pn(e);
1092
+ const r = yn(e);
1085
1093
  return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : l(r, t.length);
1086
1094
  },
1087
1095
  // Day of week
@@ -1267,7 +1275,7 @@ const D = {
1267
1275
  b: function(e, t, n) {
1268
1276
  const r = e.getHours();
1269
1277
  let a;
1270
- switch (r === 12 ? a = O.noon : r === 0 ? a = O.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
1278
+ switch (r === 12 ? a = S.noon : r === 0 ? a = S.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
1271
1279
  case "b":
1272
1280
  case "bb":
1273
1281
  return n.dayPeriod(a, {
@@ -1296,7 +1304,7 @@ const D = {
1296
1304
  B: function(e, t, n) {
1297
1305
  const r = e.getHours();
1298
1306
  let a;
1299
- switch (r >= 17 ? a = O.evening : r >= 12 ? a = O.afternoon : r >= 4 ? a = O.morning : a = O.night, t) {
1307
+ switch (r >= 17 ? a = S.evening : r >= 12 ? a = S.afternoon : r >= 4 ? a = S.morning : a = S.night, t) {
1300
1308
  case "B":
1301
1309
  case "BB":
1302
1310
  case "BBB":
@@ -1323,11 +1331,11 @@ const D = {
1323
1331
  let r = e.getHours() % 12;
1324
1332
  return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1325
1333
  }
1326
- return D.h(e, t);
1334
+ return P.h(e, t);
1327
1335
  },
1328
1336
  // Hour [0-23]
1329
1337
  H: function(e, t, n) {
1330
- return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : D.H(e, t);
1338
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : P.H(e, t);
1331
1339
  },
1332
1340
  // Hour [0-11]
1333
1341
  K: function(e, t, n) {
@@ -1341,15 +1349,15 @@ const D = {
1341
1349
  },
1342
1350
  // Minute
1343
1351
  m: function(e, t, n) {
1344
- return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : D.m(e, t);
1352
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : P.m(e, t);
1345
1353
  },
1346
1354
  // Second
1347
1355
  s: function(e, t, n) {
1348
- return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : D.s(e, t);
1356
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : P.s(e, t);
1349
1357
  },
1350
1358
  // Fraction of second
1351
1359
  S: function(e, t) {
1352
- return D.S(e, t);
1360
+ return P.S(e, t);
1353
1361
  },
1354
1362
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1355
1363
  X: function(e, t, n) {
@@ -1359,13 +1367,13 @@ const D = {
1359
1367
  switch (t) {
1360
1368
  // Hours and optional minutes
1361
1369
  case "X":
1362
- return de(r);
1370
+ return he(r);
1363
1371
  // Hours, minutes and optional seconds without `:` delimiter
1364
1372
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1365
1373
  // so this token always has the same output as `XX`
1366
1374
  case "XXXX":
1367
1375
  case "XX":
1368
- return M(r);
1376
+ return x(r);
1369
1377
  // Hours, minutes and optional seconds with `:` delimiter
1370
1378
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1371
1379
  // so this token always has the same output as `XXX`
@@ -1373,7 +1381,7 @@ const D = {
1373
1381
  case "XXX":
1374
1382
  // Hours and minutes with `:` delimiter
1375
1383
  default:
1376
- return M(r, ":");
1384
+ return x(r, ":");
1377
1385
  }
1378
1386
  },
1379
1387
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1382,13 +1390,13 @@ const D = {
1382
1390
  switch (t) {
1383
1391
  // Hours and optional minutes
1384
1392
  case "x":
1385
- return de(r);
1393
+ return he(r);
1386
1394
  // Hours, minutes and optional seconds without `:` delimiter
1387
1395
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1388
1396
  // so this token always has the same output as `xx`
1389
1397
  case "xxxx":
1390
1398
  case "xx":
1391
- return M(r);
1399
+ return x(r);
1392
1400
  // Hours, minutes and optional seconds with `:` delimiter
1393
1401
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1394
1402
  // so this token always has the same output as `xxx`
@@ -1396,7 +1404,7 @@ const D = {
1396
1404
  case "xxx":
1397
1405
  // Hours and minutes with `:` delimiter
1398
1406
  default:
1399
- return M(r, ":");
1407
+ return x(r, ":");
1400
1408
  }
1401
1409
  },
1402
1410
  // Timezone (GMT)
@@ -1407,11 +1415,11 @@ const D = {
1407
1415
  case "O":
1408
1416
  case "OO":
1409
1417
  case "OOO":
1410
- return "GMT" + fe(r, ":");
1418
+ return "GMT" + me(r, ":");
1411
1419
  // Long
1412
1420
  case "OOOO":
1413
1421
  default:
1414
- return "GMT" + M(r, ":");
1422
+ return "GMT" + x(r, ":");
1415
1423
  }
1416
1424
  },
1417
1425
  // Timezone (specific non-location)
@@ -1422,11 +1430,11 @@ const D = {
1422
1430
  case "z":
1423
1431
  case "zz":
1424
1432
  case "zzz":
1425
- return "GMT" + fe(r, ":");
1433
+ return "GMT" + me(r, ":");
1426
1434
  // Long
1427
1435
  case "zzzz":
1428
1436
  default:
1429
- return "GMT" + M(r, ":");
1437
+ return "GMT" + x(r, ":");
1430
1438
  }
1431
1439
  },
1432
1440
  // Seconds timestamp
@@ -1439,18 +1447,18 @@ const D = {
1439
1447
  return l(+e, t.length);
1440
1448
  }
1441
1449
  };
1442
- function fe(e, t = "") {
1450
+ function me(e, t = "") {
1443
1451
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), o = r % 60;
1444
1452
  return o === 0 ? n + String(a) : n + String(a) + t + l(o, 2);
1445
1453
  }
1446
- function de(e, t) {
1447
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + l(Math.abs(e) / 60, 2) : M(e, t);
1454
+ function he(e, t) {
1455
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + l(Math.abs(e) / 60, 2) : x(e, t);
1448
1456
  }
1449
- function M(e, t = "") {
1457
+ function x(e, t = "") {
1450
1458
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = l(Math.trunc(r / 60), 2), o = l(r % 60, 2);
1451
1459
  return n + a + t + o;
1452
1460
  }
1453
- const me = (e, t) => {
1461
+ const ge = (e, t) => {
1454
1462
  switch (e) {
1455
1463
  case "P":
1456
1464
  return t.date({ width: "short" });
@@ -1462,7 +1470,7 @@ const me = (e, t) => {
1462
1470
  default:
1463
1471
  return t.date({ width: "full" });
1464
1472
  }
1465
- }, He = (e, t) => {
1473
+ }, Ae = (e, t) => {
1466
1474
  switch (e) {
1467
1475
  case "p":
1468
1476
  return t.time({ width: "short" });
@@ -1474,10 +1482,10 @@ const me = (e, t) => {
1474
1482
  default:
1475
1483
  return t.time({ width: "full" });
1476
1484
  }
1477
- }, Dn = (e, t) => {
1485
+ }, Mn = (e, t) => {
1478
1486
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1479
1487
  if (!a)
1480
- return me(e, t);
1488
+ return ge(e, t);
1481
1489
  let o;
1482
1490
  switch (r) {
1483
1491
  case "P":
@@ -1494,56 +1502,56 @@ const me = (e, t) => {
1494
1502
  o = t.dateTime({ width: "full" });
1495
1503
  break;
1496
1504
  }
1497
- return o.replace("{{date}}", me(r, t)).replace("{{time}}", He(a, t));
1498
- }, Pn = {
1499
- p: He,
1500
- P: Dn
1501
- }, Mn = /^D+$/, On = /^Y+$/, xn = ["D", "DD", "YY", "YYYY"];
1502
- function Sn(e) {
1503
- return Mn.test(e);
1504
- }
1505
- function Nn(e) {
1506
- return On.test(e);
1507
- }
1508
- function Yn(e, t, n) {
1509
- const r = Cn(e, t, n);
1510
- if (console.warn(r), xn.includes(e)) throw new RangeError(r);
1511
- }
1512
- function Cn(e, t, n) {
1505
+ return o.replace("{{date}}", ge(r, t)).replace("{{time}}", Ae(a, t));
1506
+ }, On = {
1507
+ p: Ae,
1508
+ P: Mn
1509
+ }, xn = /^D+$/, Sn = /^Y+$/, Nn = ["D", "DD", "YY", "YYYY"];
1510
+ function Cn(e) {
1511
+ return xn.test(e);
1512
+ }
1513
+ function Yn(e) {
1514
+ return Sn.test(e);
1515
+ }
1516
+ function vn(e, t, n) {
1517
+ const r = En(e, t, n);
1518
+ if (console.warn(r), Nn.includes(e)) throw new RangeError(r);
1519
+ }
1520
+ function En(e, t, n) {
1513
1521
  const r = e[0] === "Y" ? "years" : "days of the month";
1514
1522
  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`;
1515
1523
  }
1516
- function vn(e) {
1524
+ function Fn(e) {
1517
1525
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
1518
1526
  }
1519
- function Fn(e) {
1520
- return !(!vn(e) && typeof e != "number" || isNaN(+T(e)));
1527
+ function In(e) {
1528
+ return !(!Fn(e) && typeof e != "number" || isNaN(+T(e)));
1521
1529
  }
1522
- const En = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, kn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Wn = /^'([^]*?)'?$/, In = /''/g, _n = /[a-zA-Z]/;
1523
- function Hn(e, t, n) {
1524
- const r = F(), a = n?.locale ?? r.locale ?? ln, o = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = T(e, n?.in);
1525
- if (!Fn(s))
1530
+ const kn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Wn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, _n = /^'([^]*?)'?$/, Hn = /''/g, Un = /[a-zA-Z]/;
1531
+ function Ln(e, t, n) {
1532
+ const r = E(), a = n?.locale ?? r.locale ?? dn, o = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = T(e, n?.in);
1533
+ if (!In(s))
1526
1534
  throw new RangeError("Invalid time value");
1527
- let c = t.match(kn).map((d) => {
1528
- const f = d[0];
1529
- if (f === "p" || f === "P") {
1530
- const p = Pn[f];
1531
- return p(d, a.formatLong);
1535
+ let c = t.match(Wn).map((f) => {
1536
+ const d = f[0];
1537
+ if (d === "p" || d === "P") {
1538
+ const p = On[d];
1539
+ return p(f, a.formatLong);
1532
1540
  }
1533
- return d;
1534
- }).join("").match(En).map((d) => {
1535
- if (d === "''")
1541
+ return f;
1542
+ }).join("").match(kn).map((f) => {
1543
+ if (f === "''")
1536
1544
  return { isToken: !1, value: "'" };
1537
- const f = d[0];
1538
- if (f === "'")
1539
- return { isToken: !1, value: Un(d) };
1540
- if (le[f])
1541
- return { isToken: !0, value: d };
1542
- if (f.match(_n))
1545
+ const d = f[0];
1546
+ if (d === "'")
1547
+ return { isToken: !1, value: $n(f) };
1548
+ if (de[d])
1549
+ return { isToken: !0, value: f };
1550
+ if (d.match(Un))
1543
1551
  throw new RangeError(
1544
- "Format string contains an unescaped latin alphabet character `" + f + "`"
1552
+ "Format string contains an unescaped latin alphabet character `" + d + "`"
1545
1553
  );
1546
- return { isToken: !1, value: d };
1554
+ return { isToken: !1, value: f };
1547
1555
  });
1548
1556
  a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1549
1557
  const u = {
@@ -1551,46 +1559,46 @@ function Hn(e, t, n) {
1551
1559
  weekStartsOn: i,
1552
1560
  locale: a
1553
1561
  };
1554
- return c.map((d) => {
1555
- if (!d.isToken) return d.value;
1556
- const f = d.value;
1557
- (!n?.useAdditionalWeekYearTokens && Nn(f) || !n?.useAdditionalDayOfYearTokens && Sn(f)) && Yn(f, t, String(e));
1558
- const p = le[f[0]];
1559
- return p(s, f, a.localize, u);
1562
+ return c.map((f) => {
1563
+ if (!f.isToken) return f.value;
1564
+ const d = f.value;
1565
+ (!n?.useAdditionalWeekYearTokens && Yn(d) || !n?.useAdditionalDayOfYearTokens && Cn(d)) && vn(d, t, String(e));
1566
+ const p = de[d[0]];
1567
+ return p(s, d, a.localize, u);
1560
1568
  }).join("");
1561
1569
  }
1562
- function Un(e) {
1563
- const t = e.match(Wn);
1564
- return t ? t[1].replace(In, "'") : e;
1570
+ function $n(e) {
1571
+ const t = e.match(_n);
1572
+ return t ? t[1].replace(Hn, "'") : e;
1565
1573
  }
1566
- function Ln() {
1567
- return Object.assign({}, F());
1574
+ function An() {
1575
+ return Object.assign({}, E());
1568
1576
  }
1569
- function he(e, t, n) {
1570
- const r = Ln(), a = Rn(e, n.timeZone, n.locale ?? r.locale);
1571
- return "formatToParts" in a ? $n(a, t) : An(a, t);
1577
+ function pe(e, t, n) {
1578
+ const r = An(), a = Bn(e, n.timeZone, n.locale ?? r.locale);
1579
+ return "formatToParts" in a ? Rn(a, t) : zn(a, t);
1572
1580
  }
1573
- function $n(e, t) {
1581
+ function Rn(e, t) {
1574
1582
  const n = e.formatToParts(t);
1575
1583
  for (let r = n.length - 1; r >= 0; --r)
1576
1584
  if (n[r].type === "timeZoneName")
1577
1585
  return n[r].value;
1578
1586
  }
1579
- function An(e, t) {
1587
+ function zn(e, t) {
1580
1588
  const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1581
1589
  return r ? r[0].substr(1) : "";
1582
1590
  }
1583
- function Rn(e, t, n) {
1591
+ function Bn(e, t, n) {
1584
1592
  return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1585
1593
  timeZone: t,
1586
1594
  timeZoneName: e
1587
1595
  });
1588
1596
  }
1589
- function zn(e, t) {
1590
- const n = jn(t);
1591
- return "formatToParts" in n ? qn(n, e) : Xn(n, e);
1597
+ function qn(e, t) {
1598
+ const n = Qn(t);
1599
+ return "formatToParts" in n ? Zn(n, e) : jn(n, e);
1592
1600
  }
1593
- const Bn = {
1601
+ const Xn = {
1594
1602
  year: 0,
1595
1603
  month: 1,
1596
1604
  day: 2,
@@ -1598,11 +1606,11 @@ const Bn = {
1598
1606
  minute: 4,
1599
1607
  second: 5
1600
1608
  };
1601
- function qn(e, t) {
1609
+ function Zn(e, t) {
1602
1610
  try {
1603
1611
  const n = e.formatToParts(t), r = [];
1604
1612
  for (let a = 0; a < n.length; a++) {
1605
- const o = Bn[n[a].type];
1613
+ const o = Xn[n[a].type];
1606
1614
  o !== void 0 && (r[o] = parseInt(n[a].value, 10));
1607
1615
  }
1608
1616
  return r;
@@ -1612,7 +1620,7 @@ function qn(e, t) {
1612
1620
  throw n;
1613
1621
  }
1614
1622
  }
1615
- function Xn(e, t) {
1623
+ function jn(e, t) {
1616
1624
  const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
1617
1625
  return [
1618
1626
  parseInt(r[3], 10),
@@ -1623,7 +1631,7 @@ function Xn(e, t) {
1623
1631
  parseInt(r[6], 10)
1624
1632
  ];
1625
1633
  }
1626
- const X = {}, ge = new Intl.DateTimeFormat("en-US", {
1634
+ const X = {}, we = new Intl.DateTimeFormat("en-US", {
1627
1635
  hourCycle: "h23",
1628
1636
  timeZone: "America/New_York",
1629
1637
  year: "numeric",
@@ -1632,9 +1640,9 @@ const X = {}, ge = new Intl.DateTimeFormat("en-US", {
1632
1640
  hour: "2-digit",
1633
1641
  minute: "2-digit",
1634
1642
  second: "2-digit"
1635
- }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), Zn = ge === "06/25/2014, 00:00:00" || ge === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
1636
- function jn(e) {
1637
- return X[e] || (X[e] = Zn ? new Intl.DateTimeFormat("en-US", {
1643
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), Gn = we === "06/25/2014, 00:00:00" || we === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
1644
+ function Qn(e) {
1645
+ return X[e] || (X[e] = Gn ? new Intl.DateTimeFormat("en-US", {
1638
1646
  hourCycle: "h23",
1639
1647
  timeZone: e,
1640
1648
  year: "numeric",
@@ -1654,16 +1662,16 @@ function jn(e) {
1654
1662
  second: "2-digit"
1655
1663
  })), X[e];
1656
1664
  }
1657
- function Ue(e, t, n, r, a, o, i) {
1665
+ function Re(e, t, n, r, a, o, i) {
1658
1666
  const s = /* @__PURE__ */ new Date(0);
1659
1667
  return s.setUTCFullYear(e, t, n), s.setUTCHours(r, a, o, i), s;
1660
1668
  }
1661
- const pe = 36e5, Gn = 6e4, Z = {
1669
+ const ye = 36e5, Vn = 6e4, Z = {
1662
1670
  timezoneZ: /^(Z)$/,
1663
1671
  timezoneHH: /^([+-]\d{2})$/,
1664
1672
  timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
1665
1673
  };
1666
- function ee(e, t, n) {
1674
+ function ne(e, t, n) {
1667
1675
  if (!e)
1668
1676
  return 0;
1669
1677
  let r = Z.timezoneZ.exec(e);
@@ -1671,51 +1679,51 @@ function ee(e, t, n) {
1671
1679
  return 0;
1672
1680
  let a, o;
1673
1681
  if (r = Z.timezoneHH.exec(e), r)
1674
- return a = parseInt(r[1], 10), we(a) ? -(a * pe) : NaN;
1682
+ return a = parseInt(r[1], 10), be(a) ? -(a * ye) : NaN;
1675
1683
  if (r = Z.timezoneHHMM.exec(e), r) {
1676
1684
  a = parseInt(r[2], 10);
1677
1685
  const i = parseInt(r[3], 10);
1678
- return we(a, i) ? (o = Math.abs(a) * pe + i * Gn, r[1] === "+" ? -o : o) : NaN;
1686
+ return be(a, i) ? (o = Math.abs(a) * ye + i * Vn, r[1] === "+" ? -o : o) : NaN;
1679
1687
  }
1680
- if (Jn(e)) {
1688
+ if (er(e)) {
1681
1689
  t = new Date(t || Date.now());
1682
- const i = n ? t : Qn(t), s = J(i, e);
1683
- return -(n ? s : Vn(t, s, e));
1690
+ const i = n ? t : Jn(t), s = K(i, e);
1691
+ return -(n ? s : Kn(t, s, e));
1684
1692
  }
1685
1693
  return NaN;
1686
1694
  }
1687
- function Qn(e) {
1688
- return Ue(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
1695
+ function Jn(e) {
1696
+ return Re(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
1689
1697
  }
1690
- function J(e, t) {
1691
- const n = zn(e, t), r = Ue(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
1698
+ function K(e, t) {
1699
+ const n = qn(e, t), r = Re(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
1692
1700
  let a = e.getTime();
1693
1701
  const o = a % 1e3;
1694
1702
  return a -= o >= 0 ? o : 1e3 + o, r - a;
1695
1703
  }
1696
- function Vn(e, t, n) {
1704
+ function Kn(e, t, n) {
1697
1705
  let a = e.getTime() - t;
1698
- const o = J(new Date(a), n);
1706
+ const o = K(new Date(a), n);
1699
1707
  if (t === o)
1700
1708
  return t;
1701
1709
  a -= o - t;
1702
- const i = J(new Date(a), n);
1710
+ const i = K(new Date(a), n);
1703
1711
  return o === i ? o : Math.max(o, i);
1704
1712
  }
1705
- function we(e, t) {
1713
+ function be(e, t) {
1706
1714
  return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
1707
1715
  }
1708
- const ye = {};
1709
- function Jn(e) {
1710
- if (ye[e])
1716
+ const Te = {};
1717
+ function er(e) {
1718
+ if (Te[e])
1711
1719
  return !0;
1712
1720
  try {
1713
- return new Intl.DateTimeFormat(void 0, { timeZone: e }), ye[e] = !0, !0;
1721
+ return new Intl.DateTimeFormat(void 0, { timeZone: e }), Te[e] = !0, !0;
1714
1722
  } catch {
1715
1723
  return !1;
1716
1724
  }
1717
1725
  }
1718
- const Kn = 60 * 1e3, er = {
1726
+ const tr = 60 * 1e3, nr = {
1719
1727
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1720
1728
  X: function(e, t, n) {
1721
1729
  const r = j(n.timeZone, e);
@@ -1724,13 +1732,13 @@ const Kn = 60 * 1e3, er = {
1724
1732
  switch (t) {
1725
1733
  // Hours and optional minutes
1726
1734
  case "X":
1727
- return be(r);
1735
+ return De(r);
1728
1736
  // Hours, minutes and optional seconds without `:` delimeter
1729
1737
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1730
1738
  // so this token always has the same output as `XX`
1731
1739
  case "XXXX":
1732
1740
  case "XX":
1733
- return x(r);
1741
+ return N(r);
1734
1742
  // Hours, minutes and optional seconds with `:` delimeter
1735
1743
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1736
1744
  // so this token always has the same output as `XXX`
@@ -1738,7 +1746,7 @@ const Kn = 60 * 1e3, er = {
1738
1746
  case "XXX":
1739
1747
  // Hours and minutes with `:` delimeter
1740
1748
  default:
1741
- return x(r, ":");
1749
+ return N(r, ":");
1742
1750
  }
1743
1751
  },
1744
1752
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1747,13 +1755,13 @@ const Kn = 60 * 1e3, er = {
1747
1755
  switch (t) {
1748
1756
  // Hours and optional minutes
1749
1757
  case "x":
1750
- return be(r);
1758
+ return De(r);
1751
1759
  // Hours, minutes and optional seconds without `:` delimeter
1752
1760
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1753
1761
  // so this token always has the same output as `xx`
1754
1762
  case "xxxx":
1755
1763
  case "xx":
1756
- return x(r);
1764
+ return N(r);
1757
1765
  // Hours, minutes and optional seconds with `:` delimeter
1758
1766
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1759
1767
  // so this token always has the same output as `xxx`
@@ -1761,7 +1769,7 @@ const Kn = 60 * 1e3, er = {
1761
1769
  case "xxx":
1762
1770
  // Hours and minutes with `:` delimeter
1763
1771
  default:
1764
- return x(r, ":");
1772
+ return N(r, ":");
1765
1773
  }
1766
1774
  },
1767
1775
  // Timezone (GMT)
@@ -1772,11 +1780,11 @@ const Kn = 60 * 1e3, er = {
1772
1780
  case "O":
1773
1781
  case "OO":
1774
1782
  case "OOO":
1775
- return "GMT" + tr(r, ":");
1783
+ return "GMT" + rr(r, ":");
1776
1784
  // Long
1777
1785
  case "OOOO":
1778
1786
  default:
1779
- return "GMT" + x(r, ":");
1787
+ return "GMT" + N(r, ":");
1780
1788
  }
1781
1789
  },
1782
1790
  // Timezone (specific non-location)
@@ -1786,43 +1794,43 @@ const Kn = 60 * 1e3, er = {
1786
1794
  case "z":
1787
1795
  case "zz":
1788
1796
  case "zzz":
1789
- return he("short", e, n);
1797
+ return pe("short", e, n);
1790
1798
  // Long
1791
1799
  case "zzzz":
1792
1800
  default:
1793
- return he("long", e, n);
1801
+ return pe("long", e, n);
1794
1802
  }
1795
1803
  }
1796
1804
  };
1797
1805
  function j(e, t) {
1798
- const n = e ? ee(e, t, !0) / Kn : t?.getTimezoneOffset() ?? 0;
1806
+ const n = e ? ne(e, t, !0) / tr : t?.getTimezoneOffset() ?? 0;
1799
1807
  if (Number.isNaN(n))
1800
1808
  throw new RangeError("Invalid time zone specified: " + e);
1801
1809
  return n;
1802
1810
  }
1803
- function W(e, t) {
1811
+ function k(e, t) {
1804
1812
  const n = e < 0 ? "-" : "";
1805
1813
  let r = Math.abs(e).toString();
1806
1814
  for (; r.length < t; )
1807
1815
  r = "0" + r;
1808
1816
  return n + r;
1809
1817
  }
1810
- function x(e, t = "") {
1811
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = W(Math.floor(r / 60), 2), o = W(Math.floor(r % 60), 2);
1818
+ function N(e, t = "") {
1819
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = k(Math.floor(r / 60), 2), o = k(Math.floor(r % 60), 2);
1812
1820
  return n + a + t + o;
1813
1821
  }
1814
- function be(e, t) {
1815
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + W(Math.abs(e) / 60, 2) : x(e, t);
1822
+ function De(e, t) {
1823
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + k(Math.abs(e) / 60, 2) : N(e, t);
1816
1824
  }
1817
- function tr(e, t = "") {
1825
+ function rr(e, t = "") {
1818
1826
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), o = r % 60;
1819
- return o === 0 ? n + String(a) : n + String(a) + t + W(o, 2);
1827
+ return o === 0 ? n + String(a) : n + String(a) + t + k(o, 2);
1820
1828
  }
1821
- function Te(e) {
1829
+ function Pe(e) {
1822
1830
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
1823
1831
  return t.setUTCFullYear(e.getFullYear()), +e - +t;
1824
1832
  }
1825
- const nr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, G = 36e5, De = 6e4, rr = 2, g = {
1833
+ const ar = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, G = 36e5, Me = 6e4, or = 2, g = {
1826
1834
  dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
1827
1835
  datePattern: /^([0-9W+-]+)(.*)/,
1828
1836
  // year tokens
@@ -1854,14 +1862,14 @@ const nr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)
1854
1862
  HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
1855
1863
  HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
1856
1864
  // time zone tokens (to identify the presence of a tz)
1857
- timeZone: nr
1865
+ timeZone: ar
1858
1866
  };
1859
- function Le(e, t = {}) {
1867
+ function ze(e, t = {}) {
1860
1868
  if (arguments.length < 1)
1861
1869
  throw new TypeError("1 argument required, but only " + arguments.length + " present");
1862
1870
  if (e === null)
1863
1871
  return /* @__PURE__ */ new Date(NaN);
1864
- const n = t.additionalDigits == null ? rr : Number(t.additionalDigits);
1872
+ const n = t.additionalDigits == null ? or : Number(t.additionalDigits);
1865
1873
  if (n !== 2 && n !== 1 && n !== 0)
1866
1874
  throw new RangeError("additionalDigits must be 0, 1 or 2");
1867
1875
  if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
@@ -1870,24 +1878,24 @@ function Le(e, t = {}) {
1870
1878
  return new Date(e);
1871
1879
  if (Object.prototype.toString.call(e) !== "[object String]")
1872
1880
  return /* @__PURE__ */ new Date(NaN);
1873
- const r = ar(e), { year: a, restDateString: o } = or(r.date, n), i = ir(o, a);
1881
+ const r = ir(e), { year: a, restDateString: o } = sr(r.date, n), i = cr(o, a);
1874
1882
  if (i === null || isNaN(i.getTime()))
1875
1883
  return /* @__PURE__ */ new Date(NaN);
1876
1884
  if (i) {
1877
1885
  const s = i.getTime();
1878
1886
  let c = 0, u;
1879
- if (r.time && (c = sr(r.time), c === null || isNaN(c)))
1887
+ if (r.time && (c = ur(r.time), c === null || isNaN(c)))
1880
1888
  return /* @__PURE__ */ new Date(NaN);
1881
1889
  if (r.timeZone || t.timeZone) {
1882
- if (u = ee(r.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
1890
+ if (u = ne(r.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
1883
1891
  return /* @__PURE__ */ new Date(NaN);
1884
1892
  } else
1885
- u = Te(new Date(s + c)), u = Te(new Date(s + c + u));
1893
+ u = Pe(new Date(s + c)), u = Pe(new Date(s + c + u));
1886
1894
  return new Date(s + c + u);
1887
1895
  } else
1888
1896
  return /* @__PURE__ */ new Date(NaN);
1889
1897
  }
1890
- function ar(e) {
1898
+ function ir(e) {
1891
1899
  const t = {};
1892
1900
  let n = g.dateTimePattern.exec(e), r;
1893
1901
  if (n ? (t.date = n[1], r = n[3]) : (n = g.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
@@ -1896,7 +1904,7 @@ function ar(e) {
1896
1904
  }
1897
1905
  return t;
1898
1906
  }
1899
- function or(e, t) {
1907
+ function sr(e, t) {
1900
1908
  if (e) {
1901
1909
  const n = g.YYY[t], r = g.YYYYY[t];
1902
1910
  let a = g.YYYY.exec(e) || r.exec(e);
@@ -1919,7 +1927,7 @@ function or(e, t) {
1919
1927
  year: null
1920
1928
  };
1921
1929
  }
1922
- function ir(e, t) {
1930
+ function cr(e, t) {
1923
1931
  if (t === null)
1924
1932
  return null;
1925
1933
  let n, r, a;
@@ -1927,163 +1935,163 @@ function ir(e, t) {
1927
1935
  return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
1928
1936
  let o = g.MM.exec(e);
1929
1937
  if (o)
1930
- return n = /* @__PURE__ */ new Date(0), r = parseInt(o[1], 10) - 1, Me(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
1938
+ return n = /* @__PURE__ */ new Date(0), r = parseInt(o[1], 10) - 1, xe(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
1931
1939
  if (o = g.DDD.exec(e), o) {
1932
1940
  n = /* @__PURE__ */ new Date(0);
1933
1941
  const i = parseInt(o[1], 10);
1934
- return lr(t, i) ? (n.setUTCFullYear(t, 0, i), n) : /* @__PURE__ */ new Date(NaN);
1942
+ return dr(t, i) ? (n.setUTCFullYear(t, 0, i), n) : /* @__PURE__ */ new Date(NaN);
1935
1943
  }
1936
1944
  if (o = g.MMDD.exec(e), o) {
1937
1945
  n = /* @__PURE__ */ new Date(0), r = parseInt(o[1], 10) - 1;
1938
1946
  const i = parseInt(o[2], 10);
1939
- return Me(t, r, i) ? (n.setUTCFullYear(t, r, i), n) : /* @__PURE__ */ new Date(NaN);
1947
+ return xe(t, r, i) ? (n.setUTCFullYear(t, r, i), n) : /* @__PURE__ */ new Date(NaN);
1940
1948
  }
1941
1949
  if (o = g.Www.exec(e), o)
1942
- return a = parseInt(o[1], 10) - 1, Oe(a) ? Pe(t, a) : /* @__PURE__ */ new Date(NaN);
1950
+ return a = parseInt(o[1], 10) - 1, Se(a) ? Oe(t, a) : /* @__PURE__ */ new Date(NaN);
1943
1951
  if (o = g.WwwD.exec(e), o) {
1944
1952
  a = parseInt(o[1], 10) - 1;
1945
1953
  const i = parseInt(o[2], 10) - 1;
1946
- return Oe(a, i) ? Pe(t, a, i) : /* @__PURE__ */ new Date(NaN);
1954
+ return Se(a, i) ? Oe(t, a, i) : /* @__PURE__ */ new Date(NaN);
1947
1955
  }
1948
1956
  return null;
1949
1957
  }
1950
- function sr(e) {
1958
+ function ur(e) {
1951
1959
  let t, n, r = g.HH.exec(e);
1952
1960
  if (r)
1953
1961
  return t = parseFloat(r[1].replace(",", ".")), Q(t) ? t % 24 * G : NaN;
1954
1962
  if (r = g.HHMM.exec(e), r)
1955
- return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Q(t, n) ? t % 24 * G + n * De : NaN;
1963
+ return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Q(t, n) ? t % 24 * G + n * Me : NaN;
1956
1964
  if (r = g.HHMMSS.exec(e), r) {
1957
1965
  t = parseInt(r[1], 10), n = parseInt(r[2], 10);
1958
1966
  const a = parseFloat(r[3].replace(",", "."));
1959
- return Q(t, n, a) ? t % 24 * G + n * De + a * 1e3 : NaN;
1967
+ return Q(t, n, a) ? t % 24 * G + n * Me + a * 1e3 : NaN;
1960
1968
  }
1961
1969
  return null;
1962
1970
  }
1963
- function Pe(e, t, n) {
1971
+ function Oe(e, t, n) {
1964
1972
  t = t || 0, n = n || 0;
1965
1973
  const r = /* @__PURE__ */ new Date(0);
1966
1974
  r.setUTCFullYear(e, 0, 4);
1967
1975
  const a = r.getUTCDay() || 7, o = t * 7 + n + 1 - a;
1968
1976
  return r.setUTCDate(r.getUTCDate() + o), r;
1969
1977
  }
1970
- const cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ur = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1971
- function $e(e) {
1978
+ const lr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], fr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1979
+ function Be(e) {
1972
1980
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
1973
1981
  }
1974
- function Me(e, t, n) {
1982
+ function xe(e, t, n) {
1975
1983
  if (t < 0 || t > 11)
1976
1984
  return !1;
1977
1985
  if (n != null) {
1978
1986
  if (n < 1)
1979
1987
  return !1;
1980
- const r = $e(e);
1981
- if (r && n > ur[t] || !r && n > cr[t])
1988
+ const r = Be(e);
1989
+ if (r && n > fr[t] || !r && n > lr[t])
1982
1990
  return !1;
1983
1991
  }
1984
1992
  return !0;
1985
1993
  }
1986
- function lr(e, t) {
1994
+ function dr(e, t) {
1987
1995
  if (t < 1)
1988
1996
  return !1;
1989
- const n = $e(e);
1997
+ const n = Be(e);
1990
1998
  return !(n && t > 366 || !n && t > 365);
1991
1999
  }
1992
- function Oe(e, t) {
2000
+ function Se(e, t) {
1993
2001
  return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
1994
2002
  }
1995
2003
  function Q(e, t, n) {
1996
2004
  return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
1997
2005
  }
1998
- const fr = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1999
- function dr(e, t, n = {}) {
2006
+ const mr = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
2007
+ function hr(e, t, n = {}) {
2000
2008
  t = String(t);
2001
- const r = t.match(fr);
2009
+ const r = t.match(mr);
2002
2010
  if (r) {
2003
- const a = Le(n.originalDate || e, n);
2011
+ const a = ze(n.originalDate || e, n);
2004
2012
  t = r.reduce(function(o, i) {
2005
2013
  if (i[0] === "'")
2006
2014
  return o;
2007
- const s = o.indexOf(i), c = o[s - 1] === "'", u = o.replace(i, "'" + er[i[0]](a, i, n) + "'");
2015
+ const s = o.indexOf(i), c = o[s - 1] === "'", u = o.replace(i, "'" + nr[i[0]](a, i, n) + "'");
2008
2016
  return c ? u.substring(0, s - 1) + u.substring(s + 1) : u;
2009
2017
  }, t);
2010
2018
  }
2011
- return Hn(e, t, n);
2019
+ return Ln(e, t, n);
2012
2020
  }
2013
- function mr(e, t, n) {
2014
- e = Le(e, n);
2015
- const r = ee(t, e, !0), a = new Date(e.getTime() - r), o = /* @__PURE__ */ new Date(0);
2021
+ function gr(e, t, n) {
2022
+ e = ze(e, n);
2023
+ const r = ne(t, e, !0), a = new Date(e.getTime() - r), o = /* @__PURE__ */ new Date(0);
2016
2024
  return o.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), o.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), o;
2017
2025
  }
2018
- function K(e, t, n, r) {
2026
+ function ee(e, t, n, r) {
2019
2027
  return r = {
2020
2028
  ...r,
2021
2029
  timeZone: t,
2022
2030
  originalDate: e
2023
- }, dr(mr(e, t, { timeZone: r.timeZone }), n, r);
2031
+ }, hr(gr(e, t, { timeZone: r.timeZone }), n, r);
2024
2032
  }
2025
- const xe = "yyyy-MM-dd HH:mm:ss:SSS a";
2026
- function Ae() {
2033
+ const Ne = "yyyy-MM-dd HH:mm:ss:SSS a";
2034
+ function qe() {
2027
2035
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
2028
2036
  }
2029
- function hr() {
2030
- return K(/* @__PURE__ */ new Date(), Ae(), "zzz");
2037
+ function pr() {
2038
+ return ee(/* @__PURE__ */ new Date(), qe(), "zzz");
2031
2039
  }
2032
- function Se(e, t) {
2040
+ function Ce(e, t) {
2033
2041
  try {
2034
2042
  if (t)
2035
- return K(new Date(e), "UTC", xe);
2036
- const n = Ae();
2037
- return K(new Date(e), n, xe);
2043
+ return ee(new Date(e), "UTC", Ne);
2044
+ const n = qe();
2045
+ return ee(new Date(e), n, Ne);
2038
2046
  } catch (n) {
2039
2047
  return console.warn("Error formatting date:", n), e;
2040
2048
  }
2041
2049
  }
2042
- function gr() {
2043
- return Fe(dt);
2050
+ function wr() {
2051
+ return Ie(wt);
2044
2052
  }
2045
- function pr(e) {
2053
+ function yr(e) {
2046
2054
  const {
2047
2055
  context: t,
2048
2056
  preferenceKey: n,
2049
2057
  defaultPreferenceValue: r,
2050
2058
  children: a
2051
- } = e, [o, i] = ae(!1), [s, c] = ae(r), u = gr(), d = B(async () => {
2059
+ } = e, [o, i] = ie(!1), [s, c] = ie(r), u = wr(), f = B(async () => {
2052
2060
  if (u) {
2053
2061
  i(!0);
2054
2062
  try {
2055
- const w = await u.getPreference(n);
2056
- if (!w)
2063
+ const y = await u.getPreference(n);
2064
+ if (!y)
2057
2065
  return;
2058
- const N = JSON.parse(w);
2059
- c(N);
2060
- } catch (w) {
2061
- console.error("Failed to load theme preference:", w);
2066
+ const O = JSON.parse(y);
2067
+ c(O);
2068
+ } catch (y) {
2069
+ console.error("Failed to load theme preference:", y);
2062
2070
  } finally {
2063
2071
  i(!1);
2064
2072
  }
2065
2073
  }
2066
2074
  }, [u, n]);
2067
- Ee(() => {
2068
- d();
2069
- }, [d]);
2070
- const f = B(async (w) => {
2075
+ ke(() => {
2076
+ f();
2077
+ }, [f]);
2078
+ const d = B(async (y) => {
2071
2079
  if (u)
2072
2080
  try {
2073
- await u.setPreference(n, JSON.stringify(w));
2074
- } catch (N) {
2075
- console.error("Failed to save theme preference:", N);
2081
+ await u.setPreference(n, JSON.stringify(y));
2082
+ } catch (O) {
2083
+ console.error("Failed to save theme preference:", O);
2076
2084
  }
2077
- }, [u, n]), p = B((w) => {
2078
- c(w), f(w);
2079
- }, [f]), S = y(() => [s, p], [s, p]);
2080
- return o ? /* @__PURE__ */ m(ft, { size: "large" }) : /* @__PURE__ */ m(t, { value: S, children: a });
2085
+ }, [u, n]), p = B((y) => {
2086
+ c(y), d(y);
2087
+ }, [d]), D = w(() => [s, p], [s, p]);
2088
+ return o ? /* @__PURE__ */ m(pt, { size: "large" }) : /* @__PURE__ */ m(t, { value: D, children: a });
2081
2089
  }
2082
2090
  function _(e, t) {
2083
- const n = et([t, () => {
2091
+ const n = ot([t, () => {
2084
2092
  }]);
2085
- return { useUserPreferences: () => Fe(n), Provider: ({ children: o }) => /* @__PURE__ */ m(
2086
- pr,
2093
+ return { useUserPreferences: () => Ie(n), Provider: ({ children: o }) => /* @__PURE__ */ m(
2094
+ yr,
2087
2095
  {
2088
2096
  context: n,
2089
2097
  preferenceKey: e,
@@ -2092,44 +2100,55 @@ function _(e, t) {
2092
2100
  }
2093
2101
  ) };
2094
2102
  }
2095
- const wr = {
2103
+ const br = {
2096
2104
  collectionPreferences: void 0,
2097
2105
  preferredColumnWidths: []
2098
2106
  }, H = "list-har-entries", {
2099
- useUserPreferences: yr,
2100
- Provider: br
2101
- } = _(`${H}.harEntriesTablePreferences`, wr), {
2102
- useUserPreferences: Re,
2103
- Provider: Tr
2104
- } = _(`${H}.isCompareMode`, !1), {
2105
- useUserPreferences: ze,
2107
+ useUserPreferences: Tr,
2106
2108
  Provider: Dr
2107
- } = _(`${H}.shouldFilterErrors`, !1), Pr = [], {
2108
- useUserPreferences: Be,
2109
+ } = _(`${H}.harEntriesTablePreferences`, br), {
2110
+ useUserPreferences: Xe,
2111
+ Provider: Pr
2112
+ } = _(`${H}.isCompareMode`, !1), {
2113
+ useUserPreferences: Ze,
2109
2114
  Provider: Mr
2110
- } = _(`${H}.contentTypeFilters`, Pr);
2111
- function Or() {
2112
- const [e, t] = Re();
2113
- return /* @__PURE__ */ m(mt, { onChange: ({ detail: n }) => {
2114
- t(n.checked);
2115
- }, checked: e, children: "Enable comparison mode?" });
2116
- }
2117
- const Ne = ot.map((e) => ({
2115
+ } = _(`${H}.shouldFilterErrors`, !1), Or = [], {
2116
+ useUserPreferences: je,
2117
+ Provider: xr
2118
+ } = _(`${H}.contentTypeFilters`, Or), Ye = "Single", V = "Compare";
2119
+ function Sr() {
2120
+ const [e, t] = Xe();
2121
+ return /* @__PURE__ */ te(He, { alignItems: "center", size: "xs", children: [
2122
+ "Mode:",
2123
+ /* @__PURE__ */ m(
2124
+ We,
2125
+ {
2126
+ options: [Ye, V].map((n) => ({ text: n, id: n })),
2127
+ selectedId: e ? V : Ye,
2128
+ onChange: ({ detail: n }) => {
2129
+ const r = n.selectedId === V;
2130
+ t(r);
2131
+ }
2132
+ }
2133
+ )
2134
+ ] });
2135
+ }
2136
+ const ve = lt.map((e) => ({
2118
2137
  value: e,
2119
2138
  label: e
2120
2139
  }));
2121
- function xr() {
2122
- const [e, t] = Be(), n = Ne.filter(
2140
+ function Nr() {
2141
+ const [e, t] = je(), n = ve.filter(
2123
2142
  ({ value: a }) => e.includes(a)
2124
2143
  ), r = (a) => {
2125
2144
  const o = a.map(({ value: i }) => i);
2126
2145
  t(o);
2127
2146
  };
2128
2147
  return /* @__PURE__ */ m(
2129
- ht,
2148
+ yt,
2130
2149
  {
2131
2150
  placeholder: "Filter by content type",
2132
- options: Ne,
2151
+ options: ve,
2133
2152
  selectedOptions: n,
2134
2153
  onChange: ({ detail: a }) => {
2135
2154
  r(a.selectedOptions);
@@ -2137,25 +2156,25 @@ function xr() {
2137
2156
  }
2138
2157
  );
2139
2158
  }
2140
- const Ye = "ALL", V = "ERRORS";
2141
- function Sr() {
2142
- const [e, t] = ze();
2159
+ const Ee = "ALL", J = "ERRORS";
2160
+ function Cr() {
2161
+ const [e, t] = Ze();
2143
2162
  return /* @__PURE__ */ m(
2144
- gt,
2163
+ We,
2145
2164
  {
2146
2165
  options: [
2147
- { text: "All", id: Ye },
2148
- { text: "Errors", id: V }
2166
+ { text: "All", id: Ee },
2167
+ { text: "Errors", id: J }
2149
2168
  ],
2150
- selectedId: e ? V : Ye,
2169
+ selectedId: e ? J : Ee,
2151
2170
  onChange: ({ detail: n }) => {
2152
- const r = n.selectedId === V;
2171
+ const r = n.selectedId === J;
2153
2172
  t(r);
2154
2173
  }
2155
2174
  }
2156
2175
  );
2157
2176
  }
2158
- const Nr = {
2177
+ const Yr = {
2159
2178
  shortUrl: {
2160
2179
  header: "Short URL",
2161
2180
  cell: (e) => {
@@ -2178,12 +2197,12 @@ const Nr = {
2178
2197
  type: "number",
2179
2198
  width: 120,
2180
2199
  cell: (e) => {
2181
- const t = e.response.status, n = e.response._error, r = /* @__PURE__ */ ve(z, { type: "error", children: [
2200
+ const t = e.response.status, n = e.response._error, r = /* @__PURE__ */ te(z, { type: "error", children: [
2182
2201
  t,
2183
2202
  " ",
2184
2203
  n && `(${n})`
2185
2204
  ] });
2186
- return lt(e) ? {
2205
+ return gt(e) ? {
2187
2206
  value: t,
2188
2207
  content: r
2189
2208
  } : t >= 300 ? {
@@ -2214,16 +2233,16 @@ const Nr = {
2214
2233
  type: "number",
2215
2234
  width: 120,
2216
2235
  cell: (e) => {
2217
- const t = e.response.content.size, n = Pt(t);
2236
+ const t = e.response.content.size, n = xt(t);
2218
2237
  return { value: t, content: n };
2219
2238
  }
2220
2239
  },
2221
2240
  localStartTime: {
2222
- header: `Started on (${hr()})`,
2241
+ header: `Started on (${pr()})`,
2223
2242
  type: "date",
2224
2243
  width: 280,
2225
2244
  cell: ({ startedDateTime: e }) => {
2226
- const t = new Date(e), n = Se(e);
2245
+ const t = new Date(e), n = Ce(e);
2227
2246
  return { value: t, content: n };
2228
2247
  }
2229
2248
  },
@@ -2233,12 +2252,12 @@ const Nr = {
2233
2252
  width: 280,
2234
2253
  isVisibleByDefault: !1,
2235
2254
  cell: ({ startedDateTime: e }) => {
2236
- const t = new Date(e), n = Se(e, "UTC");
2255
+ const t = new Date(e), n = Ce(e, "UTC");
2237
2256
  return { value: t, content: n };
2238
2257
  }
2239
2258
  }
2240
2259
  };
2241
- function Ce(e, t) {
2260
+ function Fe(e, t) {
2242
2261
  return e.reduce((n, r) => (n[`${t}_${r}`] = {
2243
2262
  header: `${t}.${r}`,
2244
2263
  width: 200,
@@ -2247,43 +2266,43 @@ function Ce(e, t) {
2247
2266
  cell: (a) => ({ value: a[t].headers.filter(({ name: i }) => i === r).map(({ value: i }) => i) })
2248
2267
  }, n), {});
2249
2268
  }
2250
- function Yr({
2269
+ function vr({
2251
2270
  title: e = "HAR Entries",
2252
2271
  harEntries: t,
2253
2272
  selectedHAREntries: n,
2254
2273
  onSelectionChange: r
2255
2274
  }) {
2256
- const a = y(() => {
2257
- const d = oe(t, "request"), f = oe(t, "response"), p = Ce(d, "request"), S = Ce(f, "response");
2275
+ const a = w(() => {
2276
+ const f = se(t, "request"), d = se(t, "response"), p = Fe(f, "request"), D = Fe(d, "response");
2258
2277
  return {
2259
- ...Nr,
2278
+ ...Yr,
2260
2279
  ...p,
2261
- ...S
2280
+ ...D
2262
2281
  };
2263
- }, [t]), o = y(() => st(t), [t]), [i] = Be(), [s] = ze(), c = y(() => ct(s ? o : t, i), [s, o, t, i]), [u] = Re();
2264
- return Ee(() => {
2282
+ }, [t]), o = w(() => dt(t), [t]), [i] = je(), [s] = Ze(), c = w(() => mt(s ? o : t, i), [s, o, t, i]), [u] = Xe();
2283
+ return ke(() => {
2265
2284
  !u && n.length > 1 && r([]);
2266
- }, [u, n.length, r]), /* @__PURE__ */ m(br, { children: /* @__PURE__ */ m(
2267
- Ct,
2285
+ }, [u, n.length, r]), /* @__PURE__ */ m(Dr, { children: /* @__PURE__ */ m(
2286
+ Ft,
2268
2287
  {
2269
- useTablePreferences: yr,
2288
+ useTablePreferences: Tr,
2270
2289
  contentDensity: "compact",
2271
2290
  columnsDefinition: a,
2272
2291
  items: c,
2273
- getRowId: ut,
2292
+ getRowId: ht,
2274
2293
  empty: "No HAR entries found",
2275
2294
  selectionType: u ? "multi" : "single",
2276
2295
  isEntireRowSelectable: !0,
2277
2296
  selectedItems: n,
2278
2297
  onSelectionChange: r,
2279
2298
  header: /* @__PURE__ */ m(
2280
- Ke,
2299
+ at,
2281
2300
  {
2282
- description: /* @__PURE__ */ m(Or, {}),
2283
2301
  counter: `(${c.length}/${t.length})`,
2284
- actions: /* @__PURE__ */ ve(vt, { children: [
2285
- /* @__PURE__ */ m(xr, {}),
2286
- /* @__PURE__ */ m(Sr, {})
2302
+ actions: /* @__PURE__ */ te(He, { children: [
2303
+ /* @__PURE__ */ m(Sr, {}),
2304
+ /* @__PURE__ */ m(Cr, {}),
2305
+ /* @__PURE__ */ m(Nr, {})
2287
2306
  ] }),
2288
2307
  children: e
2289
2308
  }
@@ -2291,11 +2310,11 @@ function Yr({
2291
2310
  }
2292
2311
  ) });
2293
2312
  }
2294
- function qr(e) {
2295
- return /* @__PURE__ */ m(Tr, { children: /* @__PURE__ */ m(Mr, { children: /* @__PURE__ */ m(Dr, { children: /* @__PURE__ */ m(Yr, { ...e }) }) }) });
2313
+ function Xr(e) {
2314
+ return /* @__PURE__ */ m(Pr, { children: /* @__PURE__ */ m(xr, { children: /* @__PURE__ */ m(Mr, { children: /* @__PURE__ */ m(vr, { ...e }) }) }) });
2296
2315
  }
2297
2316
  export {
2298
- vt as H,
2299
- qr as L,
2317
+ He as H,
2318
+ Xr as L,
2300
2319
  _ as c
2301
2320
  };