prlg-ui 1.8.313 → 1.8.314

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 (36) hide show
  1. package/dist/DateFormatter-BHT1a2Uj.js +1837 -0
  2. package/dist/DateFormatter-K5-0YX5v.cjs +1 -0
  3. package/dist/Image-bZf6ZaIG.js +200 -0
  4. package/dist/Image-kzSjYHy-.cjs +1 -0
  5. package/dist/blocks/index.cjs.js +1 -1
  6. package/dist/blocks/index.es.js +74 -74
  7. package/dist/{dayjs.util-CjzwpJrv.js → dayjs.util-DSjkslnJ.js} +1 -1
  8. package/dist/{dayjs.util-BwrUD5bd.cjs → dayjs.util-DVNMZ0pw.cjs} +1 -1
  9. package/dist/eventBus.util-K9Yq6hZm.cjs +1 -0
  10. package/dist/{eventBus.util-DjOylFpN.js → eventBus.util-msbJpg6N.js} +24 -24
  11. package/dist/fonts/Inter/.DS_Store +0 -0
  12. package/dist/icons/index.cjs.js +1 -1
  13. package/dist/icons/index.es.js +382 -339
  14. package/dist/icons.d.ts +4 -0
  15. package/dist/{index-DAoqDSY3.cjs → index-Bart793F.cjs} +20 -2
  16. package/dist/{index-BPZa5uFL.js → index-NJFcTcwk.js} +26 -6
  17. package/dist/parseFileSize.util-BAG-MLFl.js +756 -0
  18. package/dist/parseFileSize.util-zKz6zjwq.cjs +1 -0
  19. package/dist/prlg-ui.cjs.js +1 -1
  20. package/dist/prlg-ui.css +1 -1
  21. package/dist/prlg-ui.es.js +2765 -2765
  22. package/dist/reka-ui/index.cjs.js +5 -5
  23. package/dist/reka-ui/index.es.js +6120 -7674
  24. package/dist/rekaUI.d.ts +2 -2
  25. package/dist/{uploadFile.util-DAZ85cUN.cjs → uploadFile.util-C-KPiLD9.cjs} +1 -1
  26. package/dist/{uploadFile.util-COEVam78.js → uploadFile.util-CaG3C2Ri.js} +1 -1
  27. package/dist/utils/index.cjs.js +1 -1
  28. package/dist/utils/index.es.js +402 -338
  29. package/dist/utils/internationalized.utils.ts +1 -0
  30. package/dist/utils.d.ts +3 -0
  31. package/package.json +1 -1
  32. package/dist/Image-A6kr2Mp0.js +0 -200
  33. package/dist/Image-MDiNezjY.cjs +0 -1
  34. package/dist/eventBus.util-DHkO4j-V.cjs +0 -1
  35. package/dist/parseFileSize.util-B7mr_w32.js +0 -639
  36. package/dist/parseFileSize.util-DgxaYqGV.cjs +0 -1
@@ -0,0 +1,1837 @@
1
+ function U(r, e) {
2
+ return r - e * Math.floor(r / e);
3
+ }
4
+ const Ve = 1721426;
5
+ function Y(r, e, t, n) {
6
+ e = P(r, e);
7
+ let a = e - 1, o = -2;
8
+ return t <= 2 ? o = 0 : x(e) && (o = -1), Ve - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * t - 362) / 12 + o + n);
9
+ }
10
+ function x(r) {
11
+ return r % 4 === 0 && (r % 100 !== 0 || r % 400 === 0);
12
+ }
13
+ function P(r, e) {
14
+ return r === "BC" ? 1 - e : e;
15
+ }
16
+ function ae(r) {
17
+ let e = "AD";
18
+ return r <= 0 && (e = "BC", r = 1 - r), [
19
+ e,
20
+ r
21
+ ];
22
+ }
23
+ const Ir = {
24
+ standard: [
25
+ 31,
26
+ 28,
27
+ 31,
28
+ 30,
29
+ 31,
30
+ 30,
31
+ 31,
32
+ 31,
33
+ 30,
34
+ 31,
35
+ 30,
36
+ 31
37
+ ],
38
+ leapyear: [
39
+ 31,
40
+ 29,
41
+ 31,
42
+ 30,
43
+ 31,
44
+ 30,
45
+ 31,
46
+ 31,
47
+ 30,
48
+ 31,
49
+ 30,
50
+ 31
51
+ ]
52
+ };
53
+ class D {
54
+ fromJulianDay(e) {
55
+ let t = e, n = t - Ve, a = Math.floor(n / 146097), o = U(n, 146097), i = Math.floor(o / 36524), s = U(o, 36524), f = Math.floor(s / 1461), u = U(s, 1461), l = Math.floor(u / 365), d = a * 400 + i * 100 + f * 4 + l + (i !== 4 && l !== 4 ? 1 : 0), [$, I] = ae(d), M = t - Y($, I, 1, 1), m = 2;
56
+ t < Y($, I, 3, 1) ? m = 0 : x(I) && (m = 1);
57
+ let E = Math.floor(((M + m) * 12 + 373) / 367), w = t - Y($, I, E, 1) + 1;
58
+ return new h($, I, E, w);
59
+ }
60
+ toJulianDay(e) {
61
+ return Y(e.era, e.year, e.month, e.day);
62
+ }
63
+ getDaysInMonth(e) {
64
+ return Ir[x(e.year) ? "leapyear" : "standard"][e.month - 1];
65
+ }
66
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
+ getMonthsInYear(e) {
68
+ return 12;
69
+ }
70
+ getDaysInYear(e) {
71
+ return x(e.year) ? 366 : 365;
72
+ }
73
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
74
+ getYearsInEra(e) {
75
+ return 9999;
76
+ }
77
+ getEras() {
78
+ return [
79
+ "BC",
80
+ "AD"
81
+ ];
82
+ }
83
+ isInverseEra(e) {
84
+ return e.era === "BC";
85
+ }
86
+ balanceDate(e) {
87
+ e.year <= 0 && (e.era = e.era === "BC" ? "AD" : "BC", e.year = 1 - e.year);
88
+ }
89
+ constructor() {
90
+ this.identifier = "gregory";
91
+ }
92
+ }
93
+ const Er = {
94
+ "001": 1,
95
+ AD: 1,
96
+ AE: 6,
97
+ AF: 6,
98
+ AI: 1,
99
+ AL: 1,
100
+ AM: 1,
101
+ AN: 1,
102
+ AR: 1,
103
+ AT: 1,
104
+ AU: 1,
105
+ AX: 1,
106
+ AZ: 1,
107
+ BA: 1,
108
+ BE: 1,
109
+ BG: 1,
110
+ BH: 6,
111
+ BM: 1,
112
+ BN: 1,
113
+ BY: 1,
114
+ CH: 1,
115
+ CL: 1,
116
+ CM: 1,
117
+ CN: 1,
118
+ CR: 1,
119
+ CY: 1,
120
+ CZ: 1,
121
+ DE: 1,
122
+ DJ: 6,
123
+ DK: 1,
124
+ DZ: 6,
125
+ EC: 1,
126
+ EE: 1,
127
+ EG: 6,
128
+ ES: 1,
129
+ FI: 1,
130
+ FJ: 1,
131
+ FO: 1,
132
+ FR: 1,
133
+ GB: 1,
134
+ GE: 1,
135
+ GF: 1,
136
+ GP: 1,
137
+ GR: 1,
138
+ HR: 1,
139
+ HU: 1,
140
+ IE: 1,
141
+ IQ: 6,
142
+ IR: 6,
143
+ IS: 1,
144
+ IT: 1,
145
+ JO: 6,
146
+ KG: 1,
147
+ KW: 6,
148
+ KZ: 1,
149
+ LB: 1,
150
+ LI: 1,
151
+ LK: 1,
152
+ LT: 1,
153
+ LU: 1,
154
+ LV: 1,
155
+ LY: 6,
156
+ MC: 1,
157
+ MD: 1,
158
+ ME: 1,
159
+ MK: 1,
160
+ MN: 1,
161
+ MQ: 1,
162
+ MV: 5,
163
+ MY: 1,
164
+ NL: 1,
165
+ NO: 1,
166
+ NZ: 1,
167
+ OM: 6,
168
+ PL: 1,
169
+ QA: 6,
170
+ RE: 1,
171
+ RO: 1,
172
+ RS: 1,
173
+ RU: 1,
174
+ SD: 6,
175
+ SE: 1,
176
+ SI: 1,
177
+ SK: 1,
178
+ SM: 1,
179
+ SY: 6,
180
+ TJ: 1,
181
+ TM: 1,
182
+ TR: 1,
183
+ UA: 1,
184
+ UY: 1,
185
+ UZ: 1,
186
+ VA: 1,
187
+ VN: 1,
188
+ XK: 1
189
+ };
190
+ function Ke(r, e) {
191
+ return e = y(e, r.calendar), r.era === e.era && r.year === e.year && r.month === e.month && r.day === e.day;
192
+ }
193
+ function Ar(r, e) {
194
+ return e = y(e, r.calendar), r = X(r), e = X(e), r.era === e.era && r.year === e.year && r.month === e.month;
195
+ }
196
+ function xr(r, e) {
197
+ return e = y(e, r.calendar), r = Re(r), e = Re(e), r.era === e.era && r.year === e.year;
198
+ }
199
+ function St(r, e) {
200
+ return oe(r.calendar, e.calendar) && Ke(r, e);
201
+ }
202
+ function Tt(r, e) {
203
+ return oe(r.calendar, e.calendar) && Ar(r, e);
204
+ }
205
+ function Yt(r, e) {
206
+ return oe(r.calendar, e.calendar) && xr(r, e);
207
+ }
208
+ function oe(r, e) {
209
+ var t, n, a, o;
210
+ return (o = (a = (t = r.isEqual) === null || t === void 0 ? void 0 : t.call(r, e)) !== null && a !== void 0 ? a : (n = e.isEqual) === null || n === void 0 ? void 0 : n.call(e, r)) !== null && o !== void 0 ? o : r.identifier === e.identifier;
211
+ }
212
+ function Rt(r, e) {
213
+ return Ke(r, Tr(e));
214
+ }
215
+ const Cr = {
216
+ sun: 0,
217
+ mon: 1,
218
+ tue: 2,
219
+ wed: 3,
220
+ thu: 4,
221
+ fri: 5,
222
+ sat: 6
223
+ };
224
+ function je(r, e, t) {
225
+ let n = r.calendar.toJulianDay(r), a = t ? Cr[t] : Br(e), o = Math.ceil(n + 1 - a) % 7;
226
+ return o < 0 && (o += 7), o;
227
+ }
228
+ function Sr(r) {
229
+ return p(Date.now(), r);
230
+ }
231
+ function Tr(r) {
232
+ return Lr(Sr(r));
233
+ }
234
+ function Xe(r, e) {
235
+ return r.calendar.toJulianDay(r) - e.calendar.toJulianDay(e);
236
+ }
237
+ function ze(r, e) {
238
+ return Ye(r) - Ye(e);
239
+ }
240
+ function Ye(r) {
241
+ return r.hour * 36e5 + r.minute * 6e4 + r.second * 1e3 + r.millisecond;
242
+ }
243
+ function Bt(r, e) {
244
+ let t = b(r, e), n = r.add({
245
+ days: 1
246
+ });
247
+ return (b(n, e) - t) / 36e5;
248
+ }
249
+ let Q = null;
250
+ function ie() {
251
+ return Q == null && (Q = new Intl.DateTimeFormat().resolvedOptions().timeZone), Q;
252
+ }
253
+ function _t(r) {
254
+ Q = r;
255
+ }
256
+ function Ut() {
257
+ Q = null;
258
+ }
259
+ function X(r) {
260
+ return r.subtract({
261
+ days: r.day - 1
262
+ });
263
+ }
264
+ function Yr(r) {
265
+ return r.add({
266
+ days: r.calendar.getDaysInMonth(r) - r.day
267
+ });
268
+ }
269
+ function Re(r) {
270
+ return X(r.subtract({
271
+ months: r.month - 1
272
+ }));
273
+ }
274
+ function Jt(r) {
275
+ return Yr(r.add({
276
+ months: r.calendar.getMonthsInYear(r) - r.month
277
+ }));
278
+ }
279
+ function Ot(r) {
280
+ return r.calendar.getMinimumMonthInYear ? r.calendar.getMinimumMonthInYear(r) : 1;
281
+ }
282
+ function Lt(r) {
283
+ return r.calendar.getMinimumDayInMonth ? r.calendar.getMinimumDayInMonth(r) : 1;
284
+ }
285
+ function Rr(r, e, t) {
286
+ let n = je(r, e, t);
287
+ return r.subtract({
288
+ days: n
289
+ });
290
+ }
291
+ function kt(r, e, t) {
292
+ return Rr(r, e, t).add({
293
+ days: 6
294
+ });
295
+ }
296
+ const Be = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Map();
297
+ function er(r) {
298
+ if (Intl.Locale) {
299
+ let t = Be.get(r);
300
+ return t || (t = new Intl.Locale(r).maximize().region, t && Be.set(r, t)), t;
301
+ }
302
+ let e = r.split("-")[1];
303
+ return e === "u" ? void 0 : e;
304
+ }
305
+ function Br(r) {
306
+ let e = ue.get(r);
307
+ if (!e) {
308
+ if (Intl.Locale) {
309
+ let n = new Intl.Locale(r);
310
+ if ("getWeekInfo" in n && (e = n.getWeekInfo(), e))
311
+ return ue.set(r, e), e.firstDay;
312
+ }
313
+ let t = er(r);
314
+ if (r.includes("-fw-")) {
315
+ let n = r.split("-fw-")[1].split("-")[0];
316
+ n === "mon" ? e = {
317
+ firstDay: 1
318
+ } : n === "tue" ? e = {
319
+ firstDay: 2
320
+ } : n === "wed" ? e = {
321
+ firstDay: 3
322
+ } : n === "thu" ? e = {
323
+ firstDay: 4
324
+ } : n === "fri" ? e = {
325
+ firstDay: 5
326
+ } : n === "sat" ? e = {
327
+ firstDay: 6
328
+ } : e = {
329
+ firstDay: 0
330
+ };
331
+ } else r.includes("-ca-iso8601") ? e = {
332
+ firstDay: 1
333
+ } : e = {
334
+ firstDay: t && Er[t] || 0
335
+ };
336
+ ue.set(r, e);
337
+ }
338
+ return e.firstDay;
339
+ }
340
+ function Qt(r, e, t) {
341
+ let n = r.calendar.getDaysInMonth(r);
342
+ return Math.ceil((je(X(r), e, t) + n) / 7);
343
+ }
344
+ function Ft(r, e) {
345
+ return r && e ? r.compare(e) <= 0 ? r : e : r || e;
346
+ }
347
+ function Nt(r, e) {
348
+ return r && e ? r.compare(e) >= 0 ? r : e : r || e;
349
+ }
350
+ const _r = {
351
+ AF: [
352
+ 4,
353
+ 5
354
+ ],
355
+ AE: [
356
+ 5,
357
+ 6
358
+ ],
359
+ BH: [
360
+ 5,
361
+ 6
362
+ ],
363
+ DZ: [
364
+ 5,
365
+ 6
366
+ ],
367
+ EG: [
368
+ 5,
369
+ 6
370
+ ],
371
+ IL: [
372
+ 5,
373
+ 6
374
+ ],
375
+ IQ: [
376
+ 5,
377
+ 6
378
+ ],
379
+ IR: [
380
+ 5,
381
+ 5
382
+ ],
383
+ JO: [
384
+ 5,
385
+ 6
386
+ ],
387
+ KW: [
388
+ 5,
389
+ 6
390
+ ],
391
+ LY: [
392
+ 5,
393
+ 6
394
+ ],
395
+ OM: [
396
+ 5,
397
+ 6
398
+ ],
399
+ QA: [
400
+ 5,
401
+ 6
402
+ ],
403
+ SA: [
404
+ 5,
405
+ 6
406
+ ],
407
+ SD: [
408
+ 5,
409
+ 6
410
+ ],
411
+ SY: [
412
+ 5,
413
+ 6
414
+ ],
415
+ YE: [
416
+ 5,
417
+ 6
418
+ ]
419
+ };
420
+ function Ur(r, e) {
421
+ let t = r.calendar.toJulianDay(r), n = Math.ceil(t + 1) % 7;
422
+ n < 0 && (n += 7);
423
+ let a = er(e), [o, i] = _r[a] || [
424
+ 6,
425
+ 0
426
+ ];
427
+ return n === o || n === i;
428
+ }
429
+ function qt(r, e) {
430
+ return !Ur(r, e);
431
+ }
432
+ function C(r) {
433
+ r = y(r, new D());
434
+ let e = P(r.era, r.year);
435
+ return rr(e, r.month, r.day, r.hour, r.minute, r.second, r.millisecond);
436
+ }
437
+ function rr(r, e, t, n, a, o, i) {
438
+ let s = /* @__PURE__ */ new Date();
439
+ return s.setUTCHours(n, a, o, i), s.setUTCFullYear(r, e - 1, t), s.getTime();
440
+ }
441
+ function N(r, e) {
442
+ if (e === "UTC") return 0;
443
+ if (r > 0 && e === ie()) return new Date(r).getTimezoneOffset() * -6e4;
444
+ let { year: t, month: n, day: a, hour: o, minute: i, second: s } = tr(r, e);
445
+ return rr(t, n, a, o, i, s, 0) - Math.floor(r / 1e3) * 1e3;
446
+ }
447
+ const _e = /* @__PURE__ */ new Map();
448
+ function tr(r, e) {
449
+ let t = _e.get(e);
450
+ t || (t = new Intl.DateTimeFormat("en-US", {
451
+ timeZone: e,
452
+ hour12: !1,
453
+ era: "short",
454
+ year: "numeric",
455
+ month: "numeric",
456
+ day: "numeric",
457
+ hour: "numeric",
458
+ minute: "numeric",
459
+ second: "numeric"
460
+ }), _e.set(e, t));
461
+ let n = t.formatToParts(new Date(r)), a = {};
462
+ for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
463
+ return {
464
+ // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
465
+ year: a.era === "BC" || a.era === "B" ? -a.year + 1 : +a.year,
466
+ month: +a.month,
467
+ day: +a.day,
468
+ hour: a.hour === "24" ? 0 : +a.hour,
469
+ minute: +a.minute,
470
+ second: +a.second
471
+ };
472
+ }
473
+ const z = 864e5;
474
+ function Jr(r, e) {
475
+ let t = C(r), n = t - N(t - z, e), a = t - N(t + z, e);
476
+ return nr(r, e, n, a);
477
+ }
478
+ function nr(r, e, t, n) {
479
+ return (t === n ? [
480
+ t
481
+ ] : [
482
+ t,
483
+ n
484
+ ]).filter((o) => Or(r, e, o));
485
+ }
486
+ function Or(r, e, t) {
487
+ let n = tr(t, e);
488
+ return r.year === n.year && r.month === n.month && r.day === n.day && r.hour === n.hour && r.minute === n.minute && r.second === n.second;
489
+ }
490
+ function b(r, e, t = "compatible") {
491
+ let n = S(r);
492
+ if (e === "UTC") return C(n);
493
+ if (e === ie() && t === "compatible") {
494
+ n = y(n, new D());
495
+ let f = /* @__PURE__ */ new Date(), u = P(n.era, n.year);
496
+ return f.setFullYear(u, n.month - 1, n.day), f.setHours(n.hour, n.minute, n.second, n.millisecond), f.getTime();
497
+ }
498
+ let a = C(n), o = N(a - z, e), i = N(a + z, e), s = nr(n, e, a - o, a - i);
499
+ if (s.length === 1) return s[0];
500
+ if (s.length > 1) switch (t) {
501
+ // 'compatible' means 'earlier' for "fall back" transitions
502
+ case "compatible":
503
+ case "earlier":
504
+ return s[0];
505
+ case "later":
506
+ return s[s.length - 1];
507
+ case "reject":
508
+ throw new RangeError("Multiple possible absolute times found");
509
+ }
510
+ switch (t) {
511
+ case "earlier":
512
+ return Math.min(a - o, a - i);
513
+ // 'compatible' means 'later' for "spring forward" transitions
514
+ case "compatible":
515
+ case "later":
516
+ return Math.max(a - o, a - i);
517
+ case "reject":
518
+ throw new RangeError("No such absolute time found");
519
+ }
520
+ }
521
+ function ar(r, e, t = "compatible") {
522
+ return new Date(b(r, e, t));
523
+ }
524
+ function p(r, e) {
525
+ let t = N(r, e), n = new Date(r + t), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, i = n.getUTCDate(), s = n.getUTCHours(), f = n.getUTCMinutes(), u = n.getUTCSeconds(), l = n.getUTCMilliseconds();
526
+ return new B(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, e, t, s, f, u, l);
527
+ }
528
+ function Ht(r, e) {
529
+ return p(r.getTime(), e);
530
+ }
531
+ function Lr(r) {
532
+ return new h(r.calendar, r.era, r.year, r.month, r.day);
533
+ }
534
+ function S(r, e) {
535
+ let t = 0, n = 0, a = 0, o = 0;
536
+ if ("timeZone" in r) ({ hour: t, minute: n, second: a, millisecond: o } = r);
537
+ else if ("hour" in r && !e) return r;
538
+ return e && ({ hour: t, minute: n, second: a, millisecond: o } = e), new H(r.calendar, r.era, r.year, r.month, r.day, t, n, a, o);
539
+ }
540
+ function Pt(r) {
541
+ return new ce(r.hour, r.minute, r.second, r.millisecond);
542
+ }
543
+ function y(r, e) {
544
+ if (oe(r.calendar, e)) return r;
545
+ let t = e.fromJulianDay(r.calendar.toJulianDay(r)), n = r.copy();
546
+ return n.calendar = e, n.era = t.era, n.year = t.year, n.month = t.month, n.day = t.day, R(n), n;
547
+ }
548
+ function kr(r, e, t) {
549
+ if (r instanceof B)
550
+ return r.timeZone === e ? r : Me(r, e);
551
+ let n = b(r, e, t);
552
+ return p(n, e);
553
+ }
554
+ function Qr(r) {
555
+ let e = C(r) - r.offset;
556
+ return new Date(e);
557
+ }
558
+ function Me(r, e) {
559
+ let t = C(r) - r.offset;
560
+ return y(p(t, e), r.calendar);
561
+ }
562
+ function Wt(r) {
563
+ return Me(r, ie());
564
+ }
565
+ const L = 36e5;
566
+ function se(r, e) {
567
+ let t = r.copy(), n = "hour" in t ? fr(t, e) : 0;
568
+ me(t, e.years || 0), t.calendar.balanceYearMonth && t.calendar.balanceYearMonth(t, r), t.month += e.months || 0, ge(t), or(t), t.day += (e.weeks || 0) * 7, t.day += e.days || 0, t.day += n, Fr(t), t.calendar.balanceDate && t.calendar.balanceDate(t), t.year < 1 && (t.year = 1, t.month = 1, t.day = 1);
569
+ let a = t.calendar.getYearsInEra(t);
570
+ if (t.year > a) {
571
+ var o, i;
572
+ let f = (o = (i = t.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(i, t);
573
+ t.year = a, t.month = f ? 1 : t.calendar.getMonthsInYear(t), t.day = f ? 1 : t.calendar.getDaysInMonth(t);
574
+ }
575
+ t.month < 1 && (t.month = 1, t.day = 1);
576
+ let s = t.calendar.getMonthsInYear(t);
577
+ return t.month > s && (t.month = s, t.day = t.calendar.getDaysInMonth(t)), t.day = Math.max(1, Math.min(t.calendar.getDaysInMonth(t), t.day)), t;
578
+ }
579
+ function me(r, e) {
580
+ var t, n;
581
+ !((t = (n = r.calendar).isInverseEra) === null || t === void 0) && t.call(n, r) && (e = -e), r.year += e;
582
+ }
583
+ function ge(r) {
584
+ for (; r.month < 1; )
585
+ me(r, -1), r.month += r.calendar.getMonthsInYear(r);
586
+ let e = 0;
587
+ for (; r.month > (e = r.calendar.getMonthsInYear(r)); )
588
+ r.month -= e, me(r, 1);
589
+ }
590
+ function Fr(r) {
591
+ for (; r.day < 1; )
592
+ r.month--, ge(r), r.day += r.calendar.getDaysInMonth(r);
593
+ for (; r.day > r.calendar.getDaysInMonth(r); )
594
+ r.day -= r.calendar.getDaysInMonth(r), r.month++, ge(r);
595
+ }
596
+ function or(r) {
597
+ r.month = Math.max(1, Math.min(r.calendar.getMonthsInYear(r), r.month)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day));
598
+ }
599
+ function R(r) {
600
+ r.calendar.constrainDate && r.calendar.constrainDate(r), r.year = Math.max(1, Math.min(r.calendar.getYearsInEra(r), r.year)), or(r);
601
+ }
602
+ function we(r) {
603
+ let e = {};
604
+ for (let t in r) typeof r[t] == "number" && (e[t] = -r[t]);
605
+ return e;
606
+ }
607
+ function ir(r, e) {
608
+ return se(r, we(e));
609
+ }
610
+ function ve(r, e) {
611
+ let t = r.copy();
612
+ return e.era != null && (t.era = e.era), e.year != null && (t.year = e.year), e.month != null && (t.month = e.month), e.day != null && (t.day = e.day), R(t), t;
613
+ }
614
+ function q(r, e) {
615
+ let t = r.copy();
616
+ return e.hour != null && (t.hour = e.hour), e.minute != null && (t.minute = e.minute), e.second != null && (t.second = e.second), e.millisecond != null && (t.millisecond = e.millisecond), sr(t), t;
617
+ }
618
+ function Nr(r) {
619
+ r.second += Math.floor(r.millisecond / 1e3), r.millisecond = Z(r.millisecond, 1e3), r.minute += Math.floor(r.second / 60), r.second = Z(r.second, 60), r.hour += Math.floor(r.minute / 60), r.minute = Z(r.minute, 60);
620
+ let e = Math.floor(r.hour / 24);
621
+ return r.hour = Z(r.hour, 24), e;
622
+ }
623
+ function sr(r) {
624
+ r.millisecond = Math.max(0, Math.min(r.millisecond, 1e3)), r.second = Math.max(0, Math.min(r.second, 59)), r.minute = Math.max(0, Math.min(r.minute, 59)), r.hour = Math.max(0, Math.min(r.hour, 23));
625
+ }
626
+ function Z(r, e) {
627
+ let t = r % e;
628
+ return t < 0 && (t += e), t;
629
+ }
630
+ function fr(r, e) {
631
+ return r.hour += e.hours || 0, r.minute += e.minutes || 0, r.second += e.seconds || 0, r.millisecond += e.milliseconds || 0, Nr(r);
632
+ }
633
+ function cr(r, e) {
634
+ let t = r.copy();
635
+ return fr(t, e), t;
636
+ }
637
+ function qr(r, e) {
638
+ return cr(r, we(e));
639
+ }
640
+ function Ie(r, e, t, n) {
641
+ let a = r.copy();
642
+ switch (e) {
643
+ case "era": {
644
+ let s = r.calendar.getEras(), f = s.indexOf(r.era);
645
+ if (f < 0) throw new Error("Invalid era: " + r.era);
646
+ f = v(f, t, 0, s.length - 1, n?.round), a.era = s[f], R(a);
647
+ break;
648
+ }
649
+ case "year":
650
+ var o, i;
651
+ !((o = (i = a.calendar).isInverseEra) === null || o === void 0) && o.call(i, a) && (t = -t), a.year = v(r.year, t, -1 / 0, 9999, n?.round), a.year === -1 / 0 && (a.year = 1), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, r);
652
+ break;
653
+ case "month":
654
+ a.month = v(r.month, t, 1, r.calendar.getMonthsInYear(r), n?.round);
655
+ break;
656
+ case "day":
657
+ a.day = v(r.day, t, 1, r.calendar.getDaysInMonth(r), n?.round);
658
+ break;
659
+ default:
660
+ throw new Error("Unsupported field " + e);
661
+ }
662
+ return r.calendar.balanceDate && r.calendar.balanceDate(a), R(a), a;
663
+ }
664
+ function Ee(r, e, t, n) {
665
+ let a = r.copy();
666
+ switch (e) {
667
+ case "hour": {
668
+ let o = r.hour, i = 0, s = 23;
669
+ if (n?.hourCycle === 12) {
670
+ let f = o >= 12;
671
+ i = f ? 12 : 0, s = f ? 23 : 11;
672
+ }
673
+ a.hour = v(o, t, i, s, n?.round);
674
+ break;
675
+ }
676
+ case "minute":
677
+ a.minute = v(r.minute, t, 0, 59, n?.round);
678
+ break;
679
+ case "second":
680
+ a.second = v(r.second, t, 0, 59, n?.round);
681
+ break;
682
+ case "millisecond":
683
+ a.millisecond = v(r.millisecond, t, 0, 999, n?.round);
684
+ break;
685
+ default:
686
+ throw new Error("Unsupported field " + e);
687
+ }
688
+ return a;
689
+ }
690
+ function v(r, e, t, n, a = !1) {
691
+ if (a) {
692
+ r += Math.sign(e), r < t && (r = n);
693
+ let o = Math.abs(e);
694
+ e > 0 ? r = Math.ceil(r / o) * o : r = Math.floor(r / o) * o, r > n && (r = t);
695
+ } else
696
+ r += e, r < t ? r = n - (t - r - 1) : r > n && (r = t + (r - n - 1));
697
+ return r;
698
+ }
699
+ function ur(r, e) {
700
+ let t;
701
+ if (e.years != null && e.years !== 0 || e.months != null && e.months !== 0 || e.weeks != null && e.weeks !== 0 || e.days != null && e.days !== 0) {
702
+ let a = se(S(r), {
703
+ years: e.years,
704
+ months: e.months,
705
+ weeks: e.weeks,
706
+ days: e.days
707
+ });
708
+ t = b(a, r.timeZone);
709
+ } else
710
+ t = C(r) - r.offset;
711
+ t += e.milliseconds || 0, t += (e.seconds || 0) * 1e3, t += (e.minutes || 0) * 6e4, t += (e.hours || 0) * 36e5;
712
+ let n = p(t, r.timeZone);
713
+ return y(n, r.calendar);
714
+ }
715
+ function Hr(r, e) {
716
+ return ur(r, we(e));
717
+ }
718
+ function Pr(r, e, t, n) {
719
+ switch (e) {
720
+ case "hour": {
721
+ let a = 0, o = 23;
722
+ if (n?.hourCycle === 12) {
723
+ let M = r.hour >= 12;
724
+ a = M ? 12 : 0, o = M ? 23 : 11;
725
+ }
726
+ let i = S(r), s = y(q(i, {
727
+ hour: a
728
+ }), new D()), f = [
729
+ b(s, r.timeZone, "earlier"),
730
+ b(s, r.timeZone, "later")
731
+ ].filter((M) => p(M, r.timeZone).day === s.day)[0], u = y(q(i, {
732
+ hour: o
733
+ }), new D()), l = [
734
+ b(u, r.timeZone, "earlier"),
735
+ b(u, r.timeZone, "later")
736
+ ].filter((M) => p(M, r.timeZone).day === u.day).pop(), d = C(r) - r.offset, $ = Math.floor(d / L), I = d % L;
737
+ return d = v($, t, Math.floor(f / L), Math.floor(l / L), n?.round) * L + I, y(p(d, r.timeZone), r.calendar);
738
+ }
739
+ case "minute":
740
+ case "second":
741
+ case "millisecond":
742
+ return Ee(r, e, t, n);
743
+ case "era":
744
+ case "year":
745
+ case "month":
746
+ case "day": {
747
+ let a = Ie(S(r), e, t, n), o = b(a, r.timeZone);
748
+ return y(p(o, r.timeZone), r.calendar);
749
+ }
750
+ default:
751
+ throw new Error("Unsupported field " + e);
752
+ }
753
+ }
754
+ function Wr(r, e, t) {
755
+ let n = S(r), a = q(ve(n, e), e);
756
+ if (a.compare(n) === 0) return r;
757
+ let o = b(a, r.timeZone, t);
758
+ return y(p(o, r.timeZone), r.calendar);
759
+ }
760
+ const Zr = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, Gr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Vr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, Kr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/, jr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/, Xr = /^((?<negative>-)|\+)?P((?<years>\d*)Y)?((?<months>\d*)M)?((?<weeks>\d*)W)?((?<days>\d*)D)?((?<time>T)((?<hours>\d*[.,]?\d{1,9})H)?((?<minutes>\d*[.,]?\d{1,9})M)?((?<seconds>\d*[.,]?\d{1,9})S)?)?$/, lr = [
761
+ "hours",
762
+ "minutes",
763
+ "seconds"
764
+ ], zr = [
765
+ "years",
766
+ "months",
767
+ "weeks",
768
+ "days",
769
+ ...lr
770
+ ];
771
+ function Zt(r) {
772
+ let e = r.match(Zr);
773
+ if (!e) throw new Error("Invalid ISO 8601 time string: " + r);
774
+ return new ce(c(e[1], 0, 23), e[2] ? c(e[2], 0, 59) : 0, e[3] ? c(e[3], 0, 59) : 0, e[4] ? c(e[4], 0, 1 / 0) * 1e3 : 0);
775
+ }
776
+ function Gt(r) {
777
+ let e = r.match(Gr);
778
+ if (!e) throw new Error("Invalid ISO 8601 date string: " + r);
779
+ let t = new h(c(e[1], 0, 9999), c(e[2], 1, 12), 1);
780
+ return t.day = c(e[3], 1, t.calendar.getDaysInMonth(t)), t;
781
+ }
782
+ function Vt(r) {
783
+ let e = r.match(Vr);
784
+ if (!e) throw new Error("Invalid ISO 8601 date time string: " + r);
785
+ let t = c(e[1], -9999, 9999), n = t < 1 ? "BC" : "AD", a = new H(n, t < 1 ? -t + 1 : t, c(e[2], 1, 12), 1, e[4] ? c(e[4], 0, 23) : 0, e[5] ? c(e[5], 0, 59) : 0, e[6] ? c(e[6], 0, 59) : 0, e[7] ? c(e[7], 0, 1 / 0) * 1e3 : 0);
786
+ return a.day = c(e[3], 0, a.calendar.getDaysInMonth(a)), a;
787
+ }
788
+ function Kt(r, e) {
789
+ let t = r.match(Kr);
790
+ if (!t) throw new Error("Invalid ISO 8601 date time string: " + r);
791
+ let n = c(t[1], -9999, 9999), a = n < 1 ? "BC" : "AD", o = new B(a, n < 1 ? -n + 1 : n, c(t[2], 1, 12), 1, t[11], 0, t[4] ? c(t[4], 0, 23) : 0, t[5] ? c(t[5], 0, 59) : 0, t[6] ? c(t[6], 0, 59) : 0, t[7] ? c(t[7], 0, 1 / 0) * 1e3 : 0);
792
+ o.day = c(t[3], 0, o.calendar.getDaysInMonth(o));
793
+ let i = S(o), s;
794
+ if (t[8]) {
795
+ let l = c(t[8], -23, 23);
796
+ var f, u;
797
+ if (o.offset = Math.sign(l) * (Math.abs(l) * 36e5 + c((f = t[9]) !== null && f !== void 0 ? f : "0", 0, 59) * 6e4 + c((u = t[10]) !== null && u !== void 0 ? u : "0", 0, 59) * 1e3), s = C(o) - o.offset, !Jr(i, o.timeZone).includes(s)) throw new Error(`Offset ${$r(o.offset)} is invalid for ${Ae(o)} in ${o.timeZone}`);
798
+ } else
799
+ s = b(S(i), o.timeZone, e);
800
+ return p(s, o.timeZone);
801
+ }
802
+ function et(r, e) {
803
+ let t = r.match(jr);
804
+ if (!t) throw new Error("Invalid ISO 8601 date time string: " + r);
805
+ let n = c(t[1], -9999, 9999), a = n < 1 ? "BC" : "AD", o = new B(a, n < 1 ? -n + 1 : n, c(t[2], 1, 12), 1, e, 0, t[4] ? c(t[4], 0, 23) : 0, t[5] ? c(t[5], 0, 59) : 0, t[6] ? c(t[6], 0, 59) : 0, t[7] ? c(t[7], 0, 1 / 0) * 1e3 : 0);
806
+ o.day = c(t[3], 0, o.calendar.getDaysInMonth(o));
807
+ var i;
808
+ return t[8] && (o.offset = c(t[8], -23, 23) * 36e5 + c((i = t[9]) !== null && i !== void 0 ? i : "0", 0, 59) * 6e4), Me(o, e);
809
+ }
810
+ function jt(r) {
811
+ return et(r, ie());
812
+ }
813
+ function c(r, e, t) {
814
+ let n = Number(r);
815
+ if (n < e || n > t) throw new RangeError(`Value out of range: ${e} <= ${n} <= ${t}`);
816
+ return n;
817
+ }
818
+ function hr(r) {
819
+ return `${String(r.hour).padStart(2, "0")}:${String(r.minute).padStart(2, "0")}:${String(r.second).padStart(2, "0")}${r.millisecond ? String(r.millisecond / 1e3).slice(1) : ""}`;
820
+ }
821
+ function dr(r) {
822
+ let e = y(r, new D()), t;
823
+ return e.era === "BC" ? t = e.year === 1 ? "0000" : "-" + String(Math.abs(1 - e.year)).padStart(6, "00") : t = String(e.year).padStart(4, "0"), `${t}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
824
+ }
825
+ function Ae(r) {
826
+ return `${dr(r)}T${hr(r)}`;
827
+ }
828
+ function $r(r) {
829
+ let e = Math.sign(r) < 0 ? "-" : "+";
830
+ r = Math.abs(r);
831
+ let t = Math.floor(r / 36e5), n = Math.floor(r % 36e5 / 6e4), a = Math.floor(r % 36e5 % 6e4 / 1e3), o = `${e}${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
832
+ return a !== 0 && (o += `:${String(a).padStart(2, "0")}`), o;
833
+ }
834
+ function rt(r) {
835
+ return `${Ae(r)}${$r(r.offset)}[${r.timeZone}]`;
836
+ }
837
+ function Xt(r) {
838
+ var e, t, n, a, o, i, s, f, u;
839
+ const l = r.match(Xr);
840
+ if (!l) throw new Error(`Invalid ISO 8601 Duration string: ${r}`);
841
+ const d = (E, w) => {
842
+ if (!E) return 0;
843
+ try {
844
+ return (w ? -1 : 1) * Number(E.replace(",", "."));
845
+ } catch {
846
+ throw new Error(`Invalid ISO 8601 Duration string: ${r}`);
847
+ }
848
+ }, $ = !!(!((e = l.groups) === null || e === void 0) && e.negative);
849
+ if (!zr.some((E) => {
850
+ var w;
851
+ return (w = l.groups) === null || w === void 0 ? void 0 : w[E];
852
+ })) throw new Error(`Invalid ISO 8601 Duration string: ${r}`);
853
+ if (((t = l.groups) === null || t === void 0 ? void 0 : t.time) && !lr.some((w) => {
854
+ var W;
855
+ return (W = l.groups) === null || W === void 0 ? void 0 : W[w];
856
+ }))
857
+ throw new Error(`Invalid ISO 8601 Duration string: ${r}`);
858
+ const m = {
859
+ years: d((n = l.groups) === null || n === void 0 ? void 0 : n.years, $),
860
+ months: d((a = l.groups) === null || a === void 0 ? void 0 : a.months, $),
861
+ weeks: d((o = l.groups) === null || o === void 0 ? void 0 : o.weeks, $),
862
+ days: d((i = l.groups) === null || i === void 0 ? void 0 : i.days, $),
863
+ hours: d((s = l.groups) === null || s === void 0 ? void 0 : s.hours, $),
864
+ minutes: d((f = l.groups) === null || f === void 0 ? void 0 : f.minutes, $),
865
+ seconds: d((u = l.groups) === null || u === void 0 ? void 0 : u.seconds, $)
866
+ };
867
+ if (m.hours !== void 0 && m.hours % 1 !== 0 && (m.minutes || m.seconds)) throw new Error(`Invalid ISO 8601 Duration string: ${r} - only the smallest unit can be fractional`);
868
+ if (m.minutes !== void 0 && m.minutes % 1 !== 0 && m.seconds) throw new Error(`Invalid ISO 8601 Duration string: ${r} - only the smallest unit can be fractional`);
869
+ return m;
870
+ }
871
+ function tt(r, e) {
872
+ if (e.has(r))
873
+ throw new TypeError("Cannot initialize the same private elements twice on an object");
874
+ }
875
+ function fe(r, e, t) {
876
+ tt(r, e), e.set(r, t);
877
+ }
878
+ function xe(r) {
879
+ let e = typeof r[0] == "object" ? r.shift() : new D(), t;
880
+ if (typeof r[0] == "string") t = r.shift();
881
+ else {
882
+ let i = e.getEras();
883
+ t = i[i.length - 1];
884
+ }
885
+ let n = r.shift(), a = r.shift(), o = r.shift();
886
+ return [
887
+ e,
888
+ t,
889
+ n,
890
+ a,
891
+ o
892
+ ];
893
+ }
894
+ var nt = /* @__PURE__ */ new WeakMap();
895
+ class h {
896
+ /** Returns a copy of this date. */
897
+ copy() {
898
+ return this.era ? new h(this.calendar, this.era, this.year, this.month, this.day) : new h(this.calendar, this.year, this.month, this.day);
899
+ }
900
+ /** Returns a new `CalendarDate` with the given duration added to it. */
901
+ add(e) {
902
+ return se(this, e);
903
+ }
904
+ /** Returns a new `CalendarDate` with the given duration subtracted from it. */
905
+ subtract(e) {
906
+ return ir(this, e);
907
+ }
908
+ /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
909
+ set(e) {
910
+ return ve(this, e);
911
+ }
912
+ /**
913
+ * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
914
+ * When the resulting value reaches the limits of the field, it wraps around.
915
+ */
916
+ cycle(e, t, n) {
917
+ return Ie(this, e, t, n);
918
+ }
919
+ /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
920
+ toDate(e) {
921
+ return ar(this, e);
922
+ }
923
+ /** Converts the date to an ISO 8601 formatted string. */
924
+ toString() {
925
+ return dr(this);
926
+ }
927
+ /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
928
+ compare(e) {
929
+ return Xe(this, e);
930
+ }
931
+ constructor(...e) {
932
+ fe(this, nt, {
933
+ writable: !0,
934
+ value: void 0
935
+ });
936
+ let [t, n, a, o, i] = xe(e);
937
+ this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, R(this);
938
+ }
939
+ }
940
+ var at = /* @__PURE__ */ new WeakMap();
941
+ class ce {
942
+ /** Returns a copy of this time. */
943
+ copy() {
944
+ return new ce(this.hour, this.minute, this.second, this.millisecond);
945
+ }
946
+ /** Returns a new `Time` with the given duration added to it. */
947
+ add(e) {
948
+ return cr(this, e);
949
+ }
950
+ /** Returns a new `Time` with the given duration subtracted from it. */
951
+ subtract(e) {
952
+ return qr(this, e);
953
+ }
954
+ /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */
955
+ set(e) {
956
+ return q(this, e);
957
+ }
958
+ /**
959
+ * Returns a new `Time` with the given field adjusted by a specified amount.
960
+ * When the resulting value reaches the limits of the field, it wraps around.
961
+ */
962
+ cycle(e, t, n) {
963
+ return Ee(this, e, t, n);
964
+ }
965
+ /** Converts the time to an ISO 8601 formatted string. */
966
+ toString() {
967
+ return hr(this);
968
+ }
969
+ /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */
970
+ compare(e) {
971
+ return ze(this, e);
972
+ }
973
+ constructor(e = 0, t = 0, n = 0, a = 0) {
974
+ fe(this, at, {
975
+ writable: !0,
976
+ value: void 0
977
+ }), this.hour = e, this.minute = t, this.second = n, this.millisecond = a, sr(this);
978
+ }
979
+ }
980
+ var ot = /* @__PURE__ */ new WeakMap();
981
+ class H {
982
+ /** Returns a copy of this date. */
983
+ copy() {
984
+ return this.era ? new H(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new H(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
985
+ }
986
+ /** Returns a new `CalendarDateTime` with the given duration added to it. */
987
+ add(e) {
988
+ return se(this, e);
989
+ }
990
+ /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
991
+ subtract(e) {
992
+ return ir(this, e);
993
+ }
994
+ /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
995
+ set(e) {
996
+ return ve(q(this, e), e);
997
+ }
998
+ /**
999
+ * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
1000
+ * When the resulting value reaches the limits of the field, it wraps around.
1001
+ */
1002
+ cycle(e, t, n) {
1003
+ switch (e) {
1004
+ case "era":
1005
+ case "year":
1006
+ case "month":
1007
+ case "day":
1008
+ return Ie(this, e, t, n);
1009
+ default:
1010
+ return Ee(this, e, t, n);
1011
+ }
1012
+ }
1013
+ /** Converts the date to a native JavaScript Date object in the given time zone. */
1014
+ toDate(e, t) {
1015
+ return ar(this, e, t);
1016
+ }
1017
+ /** Converts the date to an ISO 8601 formatted string. */
1018
+ toString() {
1019
+ return Ae(this);
1020
+ }
1021
+ /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
1022
+ compare(e) {
1023
+ let t = Xe(this, e);
1024
+ return t === 0 ? ze(this, S(e)) : t;
1025
+ }
1026
+ constructor(...e) {
1027
+ fe(this, ot, {
1028
+ writable: !0,
1029
+ value: void 0
1030
+ });
1031
+ let [t, n, a, o, i] = xe(e);
1032
+ this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, R(this);
1033
+ }
1034
+ }
1035
+ var it = /* @__PURE__ */ new WeakMap();
1036
+ class B {
1037
+ /** Returns a copy of this date. */
1038
+ copy() {
1039
+ return this.era ? new B(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new B(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
1040
+ }
1041
+ /** Returns a new `ZonedDateTime` with the given duration added to it. */
1042
+ add(e) {
1043
+ return ur(this, e);
1044
+ }
1045
+ /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
1046
+ subtract(e) {
1047
+ return Hr(this, e);
1048
+ }
1049
+ /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
1050
+ set(e, t) {
1051
+ return Wr(this, e, t);
1052
+ }
1053
+ /**
1054
+ * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
1055
+ * When the resulting value reaches the limits of the field, it wraps around.
1056
+ */
1057
+ cycle(e, t, n) {
1058
+ return Pr(this, e, t, n);
1059
+ }
1060
+ /** Converts the date to a native JavaScript Date object. */
1061
+ toDate() {
1062
+ return Qr(this);
1063
+ }
1064
+ /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
1065
+ toString() {
1066
+ return rt(this);
1067
+ }
1068
+ /** Converts the date to an ISO 8601 formatted string in UTC. */
1069
+ toAbsoluteString() {
1070
+ return this.toDate().toISOString();
1071
+ }
1072
+ /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
1073
+ compare(e) {
1074
+ return this.toDate().getTime() - kr(e, this.timeZone).toDate().getTime();
1075
+ }
1076
+ constructor(...e) {
1077
+ fe(this, it, {
1078
+ writable: !0,
1079
+ value: void 0
1080
+ });
1081
+ let [t, n, a, o, i] = xe(e), s = e.shift(), f = e.shift();
1082
+ this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = s, this.offset = f, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, R(this);
1083
+ }
1084
+ }
1085
+ const J = [
1086
+ [
1087
+ 1868,
1088
+ 9,
1089
+ 8
1090
+ ],
1091
+ [
1092
+ 1912,
1093
+ 7,
1094
+ 30
1095
+ ],
1096
+ [
1097
+ 1926,
1098
+ 12,
1099
+ 25
1100
+ ],
1101
+ [
1102
+ 1989,
1103
+ 1,
1104
+ 8
1105
+ ],
1106
+ [
1107
+ 2019,
1108
+ 5,
1109
+ 1
1110
+ ]
1111
+ ], st = [
1112
+ [
1113
+ 1912,
1114
+ 7,
1115
+ 29
1116
+ ],
1117
+ [
1118
+ 1926,
1119
+ 12,
1120
+ 24
1121
+ ],
1122
+ [
1123
+ 1989,
1124
+ 1,
1125
+ 7
1126
+ ],
1127
+ [
1128
+ 2019,
1129
+ 4,
1130
+ 30
1131
+ ]
1132
+ ], V = [
1133
+ 1867,
1134
+ 1911,
1135
+ 1925,
1136
+ 1988,
1137
+ 2018
1138
+ ], A = [
1139
+ "meiji",
1140
+ "taisho",
1141
+ "showa",
1142
+ "heisei",
1143
+ "reiwa"
1144
+ ];
1145
+ function Ue(r) {
1146
+ const e = J.findIndex(([t, n, a]) => r.year < t || r.year === t && r.month < n || r.year === t && r.month === n && r.day < a);
1147
+ return e === -1 ? J.length - 1 : e === 0 ? 0 : e - 1;
1148
+ }
1149
+ function le(r) {
1150
+ let e = V[A.indexOf(r.era)];
1151
+ if (!e) throw new Error("Unknown era: " + r.era);
1152
+ return new h(r.year + e, r.month, r.day);
1153
+ }
1154
+ class ft extends D {
1155
+ fromJulianDay(e) {
1156
+ let t = super.fromJulianDay(e), n = Ue(t);
1157
+ return new h(this, A[n], t.year - V[n], t.month, t.day);
1158
+ }
1159
+ toJulianDay(e) {
1160
+ return super.toJulianDay(le(e));
1161
+ }
1162
+ balanceDate(e) {
1163
+ let t = le(e), n = Ue(t);
1164
+ A[n] !== e.era && (e.era = A[n], e.year = t.year - V[n]), this.constrainDate(e);
1165
+ }
1166
+ constrainDate(e) {
1167
+ let t = A.indexOf(e.era), n = st[t];
1168
+ if (n != null) {
1169
+ let [a, o, i] = n, s = a - V[t];
1170
+ e.year = Math.max(1, Math.min(s, e.year)), e.year === s && (e.month = Math.min(o, e.month), e.month === o && (e.day = Math.min(i, e.day)));
1171
+ }
1172
+ if (e.year === 1 && t >= 0) {
1173
+ let [, a, o] = J[t];
1174
+ e.month = Math.max(a, e.month), e.month === a && (e.day = Math.max(o, e.day));
1175
+ }
1176
+ }
1177
+ getEras() {
1178
+ return A;
1179
+ }
1180
+ getYearsInEra(e) {
1181
+ let t = A.indexOf(e.era), n = J[t], a = J[t + 1];
1182
+ if (a == null)
1183
+ return 9999 - n[0] + 1;
1184
+ let o = a[0] - n[0];
1185
+ return (e.month < a[1] || e.month === a[1] && e.day < a[2]) && o++, o;
1186
+ }
1187
+ getDaysInMonth(e) {
1188
+ return super.getDaysInMonth(le(e));
1189
+ }
1190
+ getMinimumMonthInYear(e) {
1191
+ let t = Je(e);
1192
+ return t ? t[1] : 1;
1193
+ }
1194
+ getMinimumDayInMonth(e) {
1195
+ let t = Je(e);
1196
+ return t && e.month === t[1] ? t[2] : 1;
1197
+ }
1198
+ constructor(...e) {
1199
+ super(...e), this.identifier = "japanese";
1200
+ }
1201
+ }
1202
+ function Je(r) {
1203
+ if (r.year === 1) {
1204
+ let e = A.indexOf(r.era);
1205
+ return J[e];
1206
+ }
1207
+ }
1208
+ const yr = -543;
1209
+ class ct extends D {
1210
+ fromJulianDay(e) {
1211
+ let t = super.fromJulianDay(e), n = P(t.era, t.year);
1212
+ return new h(this, n - yr, t.month, t.day);
1213
+ }
1214
+ toJulianDay(e) {
1215
+ return super.toJulianDay(Oe(e));
1216
+ }
1217
+ getEras() {
1218
+ return [
1219
+ "BE"
1220
+ ];
1221
+ }
1222
+ getDaysInMonth(e) {
1223
+ return super.getDaysInMonth(Oe(e));
1224
+ }
1225
+ balanceDate() {
1226
+ }
1227
+ constructor(...e) {
1228
+ super(...e), this.identifier = "buddhist";
1229
+ }
1230
+ }
1231
+ function Oe(r) {
1232
+ let [e, t] = ae(r.year + yr);
1233
+ return new h(e, t, r.month, r.day);
1234
+ }
1235
+ const ee = 1911;
1236
+ function mr(r) {
1237
+ return r.era === "minguo" ? r.year + ee : 1 - r.year + ee;
1238
+ }
1239
+ function Le(r) {
1240
+ let e = r - ee;
1241
+ return e > 0 ? [
1242
+ "minguo",
1243
+ e
1244
+ ] : [
1245
+ "before_minguo",
1246
+ 1 - e
1247
+ ];
1248
+ }
1249
+ class ut extends D {
1250
+ fromJulianDay(e) {
1251
+ let t = super.fromJulianDay(e), n = P(t.era, t.year), [a, o] = Le(n);
1252
+ return new h(this, a, o, t.month, t.day);
1253
+ }
1254
+ toJulianDay(e) {
1255
+ return super.toJulianDay(ke(e));
1256
+ }
1257
+ getEras() {
1258
+ return [
1259
+ "before_minguo",
1260
+ "minguo"
1261
+ ];
1262
+ }
1263
+ balanceDate(e) {
1264
+ let [t, n] = Le(mr(e));
1265
+ e.era = t, e.year = n;
1266
+ }
1267
+ isInverseEra(e) {
1268
+ return e.era === "before_minguo";
1269
+ }
1270
+ getDaysInMonth(e) {
1271
+ return super.getDaysInMonth(ke(e));
1272
+ }
1273
+ getYearsInEra(e) {
1274
+ return e.era === "before_minguo" ? 9999 : 9999 - ee;
1275
+ }
1276
+ constructor(...e) {
1277
+ super(...e), this.identifier = "roc";
1278
+ }
1279
+ }
1280
+ function ke(r) {
1281
+ let [e, t] = ae(mr(r));
1282
+ return new h(e, t, r.month, r.day);
1283
+ }
1284
+ const Qe = 1948320, Fe = [
1285
+ 0,
1286
+ 31,
1287
+ 62,
1288
+ 93,
1289
+ 124,
1290
+ 155,
1291
+ 186,
1292
+ 216,
1293
+ 246,
1294
+ 276,
1295
+ 306,
1296
+ 336
1297
+ // Esfand
1298
+ ];
1299
+ class lt {
1300
+ fromJulianDay(e) {
1301
+ let t = e - Qe, n = 1 + Math.floor((33 * t + 3) / 12053), a = 365 * (n - 1) + Math.floor((8 * n + 21) / 33), o = t - a, i = o < 216 ? Math.floor(o / 31) : Math.floor((o - 6) / 30), s = o - Fe[i] + 1;
1302
+ return new h(this, n, i + 1, s);
1303
+ }
1304
+ toJulianDay(e) {
1305
+ let t = Qe - 1 + 365 * (e.year - 1) + Math.floor((8 * e.year + 21) / 33);
1306
+ return t += Fe[e.month - 1], t += e.day, t;
1307
+ }
1308
+ getMonthsInYear() {
1309
+ return 12;
1310
+ }
1311
+ getDaysInMonth(e) {
1312
+ return e.month <= 6 ? 31 : e.month <= 11 || U(25 * e.year + 11, 33) < 8 ? 30 : 29;
1313
+ }
1314
+ getEras() {
1315
+ return [
1316
+ "AP"
1317
+ ];
1318
+ }
1319
+ getYearsInEra() {
1320
+ return 9377;
1321
+ }
1322
+ constructor() {
1323
+ this.identifier = "persian";
1324
+ }
1325
+ }
1326
+ const he = 78, Ne = 80;
1327
+ class ht extends D {
1328
+ fromJulianDay(e) {
1329
+ let t = super.fromJulianDay(e), n = t.year - he, a = e - Y(t.era, t.year, 1, 1), o;
1330
+ a < Ne ? (n--, o = x(t.year - 1) ? 31 : 30, a += o + 155 + 90 + 10) : (o = x(t.year) ? 31 : 30, a -= Ne);
1331
+ let i, s;
1332
+ if (a < o)
1333
+ i = 1, s = a + 1;
1334
+ else {
1335
+ let f = a - o;
1336
+ f < 155 ? (i = Math.floor(f / 31) + 2, s = f % 31 + 1) : (f -= 155, i = Math.floor(f / 30) + 7, s = f % 30 + 1);
1337
+ }
1338
+ return new h(this, n, i, s);
1339
+ }
1340
+ toJulianDay(e) {
1341
+ let t = e.year + he, [n, a] = ae(t), o, i;
1342
+ return x(a) ? (o = 31, i = Y(n, a, 3, 21)) : (o = 30, i = Y(n, a, 3, 22)), e.month === 1 ? i + e.day - 1 : (i += o + Math.min(e.month - 2, 5) * 31, e.month >= 8 && (i += (e.month - 7) * 30), i += e.day - 1, i);
1343
+ }
1344
+ getDaysInMonth(e) {
1345
+ return e.month === 1 && x(e.year + he) || e.month >= 2 && e.month <= 6 ? 31 : 30;
1346
+ }
1347
+ getYearsInEra() {
1348
+ return 9919;
1349
+ }
1350
+ getEras() {
1351
+ return [
1352
+ "saka"
1353
+ ];
1354
+ }
1355
+ balanceDate() {
1356
+ }
1357
+ constructor(...e) {
1358
+ super(...e), this.identifier = "indian";
1359
+ }
1360
+ }
1361
+ const re = 1948440, qe = 1948439, g = 1300, _ = 1600, dt = 460322;
1362
+ function te(r, e, t, n) {
1363
+ return n + Math.ceil(29.5 * (t - 1)) + (e - 1) * 354 + Math.floor((3 + 11 * e) / 30) + r - 1;
1364
+ }
1365
+ function gr(r, e, t) {
1366
+ let n = Math.floor((30 * (t - e) + 10646) / 10631), a = Math.min(12, Math.ceil((t - (29 + te(e, n, 1, 1))) / 29.5) + 1), o = t - te(e, n, a, 1) + 1;
1367
+ return new h(r, n, a, o);
1368
+ }
1369
+ function He(r) {
1370
+ return (14 + 11 * r) % 30 < 11;
1371
+ }
1372
+ class Ce {
1373
+ fromJulianDay(e) {
1374
+ return gr(this, re, e);
1375
+ }
1376
+ toJulianDay(e) {
1377
+ return te(re, e.year, e.month, e.day);
1378
+ }
1379
+ getDaysInMonth(e) {
1380
+ let t = 29 + e.month % 2;
1381
+ return e.month === 12 && He(e.year) && t++, t;
1382
+ }
1383
+ getMonthsInYear() {
1384
+ return 12;
1385
+ }
1386
+ getDaysInYear(e) {
1387
+ return He(e.year) ? 355 : 354;
1388
+ }
1389
+ getYearsInEra() {
1390
+ return 9665;
1391
+ }
1392
+ getEras() {
1393
+ return [
1394
+ "AH"
1395
+ ];
1396
+ }
1397
+ constructor() {
1398
+ this.identifier = "islamic-civil";
1399
+ }
1400
+ }
1401
+ class $t extends Ce {
1402
+ fromJulianDay(e) {
1403
+ return gr(this, qe, e);
1404
+ }
1405
+ toJulianDay(e) {
1406
+ return te(qe, e.year, e.month, e.day);
1407
+ }
1408
+ constructor(...e) {
1409
+ super(...e), this.identifier = "islamic-tbla";
1410
+ }
1411
+ }
1412
+ const yt = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";
1413
+ let be, O;
1414
+ function K(r) {
1415
+ return dt + O[r - g];
1416
+ }
1417
+ function k(r, e) {
1418
+ let t = r - g, n = 1 << 11 - (e - 1);
1419
+ return (be[t] & n) === 0 ? 29 : 30;
1420
+ }
1421
+ function Pe(r, e) {
1422
+ let t = K(r);
1423
+ for (let n = 1; n < e; n++) t += k(r, n);
1424
+ return t;
1425
+ }
1426
+ function We(r) {
1427
+ return O[r + 1 - g] - O[r - g];
1428
+ }
1429
+ class mt extends Ce {
1430
+ fromJulianDay(e) {
1431
+ let t = e - re, n = K(g), a = K(_);
1432
+ if (t < n || t > a) return super.fromJulianDay(e);
1433
+ {
1434
+ let o = g - 1, i = 1, s = 1;
1435
+ for (; s > 0; ) {
1436
+ o++, s = t - K(o) + 1;
1437
+ let f = We(o);
1438
+ if (s === f) {
1439
+ i = 12;
1440
+ break;
1441
+ } else if (s < f) {
1442
+ let u = k(o, i);
1443
+ for (i = 1; s > u; )
1444
+ s -= u, i++, u = k(o, i);
1445
+ break;
1446
+ }
1447
+ }
1448
+ return new h(this, o, i, t - Pe(o, i) + 1);
1449
+ }
1450
+ }
1451
+ toJulianDay(e) {
1452
+ return e.year < g || e.year > _ ? super.toJulianDay(e) : re + Pe(e.year, e.month) + (e.day - 1);
1453
+ }
1454
+ getDaysInMonth(e) {
1455
+ return e.year < g || e.year > _ ? super.getDaysInMonth(e) : k(e.year, e.month);
1456
+ }
1457
+ getDaysInYear(e) {
1458
+ return e.year < g || e.year > _ ? super.getDaysInYear(e) : We(e.year);
1459
+ }
1460
+ constructor() {
1461
+ if (super(), this.identifier = "islamic-umalqura", be || (be = new Uint16Array(Uint8Array.from(atob(yt), (e) => e.charCodeAt(0)).buffer)), !O) {
1462
+ O = new Uint32Array(_ - g + 1);
1463
+ let e = 0;
1464
+ for (let t = g; t <= _; t++) {
1465
+ O[t - g] = e;
1466
+ for (let n = 1; n <= 12; n++) e += k(t, n);
1467
+ }
1468
+ }
1469
+ }
1470
+ }
1471
+ const Ze = 347997, br = 1080, pr = 24 * br, gt = 29, bt = 12 * br + 793, pt = gt * pr + bt;
1472
+ function T(r) {
1473
+ return U(r * 7 + 1, 19) < 7;
1474
+ }
1475
+ function j(r) {
1476
+ let e = Math.floor((235 * r - 234) / 19), t = 12084 + 13753 * e, n = e * 29 + Math.floor(t / 25920);
1477
+ return U(3 * (n + 1), 7) < 3 && (n += 1), n;
1478
+ }
1479
+ function Dt(r) {
1480
+ let e = j(r - 1), t = j(r);
1481
+ return j(r + 1) - t === 356 ? 2 : t - e === 382 ? 1 : 0;
1482
+ }
1483
+ function F(r) {
1484
+ return j(r) + Dt(r);
1485
+ }
1486
+ function Dr(r) {
1487
+ return F(r + 1) - F(r);
1488
+ }
1489
+ function Mt(r) {
1490
+ let e = Dr(r);
1491
+ switch (e > 380 && (e -= 30), e) {
1492
+ case 353:
1493
+ return 0;
1494
+ // deficient
1495
+ case 354:
1496
+ return 1;
1497
+ // normal
1498
+ case 355:
1499
+ return 2;
1500
+ }
1501
+ }
1502
+ function G(r, e) {
1503
+ if (e >= 6 && !T(r) && e++, e === 4 || e === 7 || e === 9 || e === 11 || e === 13) return 29;
1504
+ let t = Mt(r);
1505
+ return e === 2 ? t === 2 ? 30 : 29 : e === 3 ? t === 0 ? 29 : 30 : e === 6 ? T(r) ? 30 : 0 : 30;
1506
+ }
1507
+ class wt {
1508
+ fromJulianDay(e) {
1509
+ let t = e - Ze, n = t * pr / pt, a = Math.floor((19 * n + 234) / 235) + 1, o = F(a), i = Math.floor(t - o);
1510
+ for (; i < 1; )
1511
+ a--, o = F(a), i = Math.floor(t - o);
1512
+ let s = 1, f = 0;
1513
+ for (; f < i; )
1514
+ f += G(a, s), s++;
1515
+ s--, f -= G(a, s);
1516
+ let u = i - f;
1517
+ return new h(this, a, s, u);
1518
+ }
1519
+ toJulianDay(e) {
1520
+ let t = F(e.year);
1521
+ for (let n = 1; n < e.month; n++) t += G(e.year, n);
1522
+ return t + e.day + Ze;
1523
+ }
1524
+ getDaysInMonth(e) {
1525
+ return G(e.year, e.month);
1526
+ }
1527
+ getMonthsInYear(e) {
1528
+ return T(e.year) ? 13 : 12;
1529
+ }
1530
+ getDaysInYear(e) {
1531
+ return Dr(e.year);
1532
+ }
1533
+ getYearsInEra() {
1534
+ return 9999;
1535
+ }
1536
+ getEras() {
1537
+ return [
1538
+ "AM"
1539
+ ];
1540
+ }
1541
+ balanceYearMonth(e, t) {
1542
+ t.year !== e.year && (T(t.year) && !T(e.year) && t.month > 6 ? e.month-- : !T(t.year) && T(e.year) && t.month > 6 && e.month++);
1543
+ }
1544
+ constructor() {
1545
+ this.identifier = "hebrew";
1546
+ }
1547
+ }
1548
+ const pe = 1723856, Ge = 1824665, De = 5500;
1549
+ function ne(r, e, t, n) {
1550
+ return r + 365 * e + Math.floor(e / 4) + 30 * (t - 1) + n - 1;
1551
+ }
1552
+ function Se(r, e) {
1553
+ let t = Math.floor(4 * (e - r) / 1461), n = 1 + Math.floor((e - ne(r, t, 1, 1)) / 30), a = e + 1 - ne(r, t, n, 1);
1554
+ return [
1555
+ t,
1556
+ n,
1557
+ a
1558
+ ];
1559
+ }
1560
+ function Mr(r) {
1561
+ return Math.floor(r % 4 / 3);
1562
+ }
1563
+ function wr(r, e) {
1564
+ return e % 13 !== 0 ? 30 : Mr(r) + 5;
1565
+ }
1566
+ class Te {
1567
+ fromJulianDay(e) {
1568
+ let [t, n, a] = Se(pe, e), o = "AM";
1569
+ return t <= 0 && (o = "AA", t += De), new h(this, o, t, n, a);
1570
+ }
1571
+ toJulianDay(e) {
1572
+ let t = e.year;
1573
+ return e.era === "AA" && (t -= De), ne(pe, t, e.month, e.day);
1574
+ }
1575
+ getDaysInMonth(e) {
1576
+ return wr(e.year, e.month);
1577
+ }
1578
+ getMonthsInYear() {
1579
+ return 13;
1580
+ }
1581
+ getDaysInYear(e) {
1582
+ return 365 + Mr(e.year);
1583
+ }
1584
+ getYearsInEra(e) {
1585
+ return e.era === "AA" ? 9999 : 9991;
1586
+ }
1587
+ getEras() {
1588
+ return [
1589
+ "AA",
1590
+ "AM"
1591
+ ];
1592
+ }
1593
+ constructor() {
1594
+ this.identifier = "ethiopic";
1595
+ }
1596
+ }
1597
+ class vt extends Te {
1598
+ fromJulianDay(e) {
1599
+ let [t, n, a] = Se(pe, e);
1600
+ return t += De, new h(this, "AA", t, n, a);
1601
+ }
1602
+ getEras() {
1603
+ return [
1604
+ "AA"
1605
+ ];
1606
+ }
1607
+ getYearsInEra() {
1608
+ return 9999;
1609
+ }
1610
+ constructor(...e) {
1611
+ super(...e), this.identifier = "ethioaa";
1612
+ }
1613
+ }
1614
+ class It extends Te {
1615
+ fromJulianDay(e) {
1616
+ let [t, n, a] = Se(Ge, e), o = "CE";
1617
+ return t <= 0 && (o = "BCE", t = 1 - t), new h(this, o, t, n, a);
1618
+ }
1619
+ toJulianDay(e) {
1620
+ let t = e.year;
1621
+ return e.era === "BCE" && (t = 1 - t), ne(Ge, t, e.month, e.day);
1622
+ }
1623
+ getDaysInMonth(e) {
1624
+ let t = e.year;
1625
+ return e.era === "BCE" && (t = 1 - t), wr(t, e.month);
1626
+ }
1627
+ isInverseEra(e) {
1628
+ return e.era === "BCE";
1629
+ }
1630
+ balanceDate(e) {
1631
+ e.year <= 0 && (e.era = e.era === "BCE" ? "CE" : "BCE", e.year = 1 - e.year);
1632
+ }
1633
+ getEras() {
1634
+ return [
1635
+ "BCE",
1636
+ "CE"
1637
+ ];
1638
+ }
1639
+ getYearsInEra(e) {
1640
+ return e.era === "BCE" ? 9999 : 9715;
1641
+ }
1642
+ constructor(...e) {
1643
+ super(...e), this.identifier = "coptic";
1644
+ }
1645
+ }
1646
+ function zt(r) {
1647
+ switch (r) {
1648
+ case "buddhist":
1649
+ return new ct();
1650
+ case "ethiopic":
1651
+ return new Te();
1652
+ case "ethioaa":
1653
+ return new vt();
1654
+ case "coptic":
1655
+ return new It();
1656
+ case "hebrew":
1657
+ return new wt();
1658
+ case "indian":
1659
+ return new ht();
1660
+ case "islamic-civil":
1661
+ return new Ce();
1662
+ case "islamic-tbla":
1663
+ return new $t();
1664
+ case "islamic-umalqura":
1665
+ return new mt();
1666
+ case "japanese":
1667
+ return new ft();
1668
+ case "persian":
1669
+ return new lt();
1670
+ case "roc":
1671
+ return new ut();
1672
+ case "gregory":
1673
+ default:
1674
+ return new D();
1675
+ }
1676
+ }
1677
+ let de = /* @__PURE__ */ new Map();
1678
+ class en {
1679
+ /** Formats a date as a string according to the locale and format options passed to the constructor. */
1680
+ format(e) {
1681
+ return this.formatter.format(e);
1682
+ }
1683
+ /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
1684
+ formatToParts(e) {
1685
+ return this.formatter.formatToParts(e);
1686
+ }
1687
+ /** Formats a date range as a string. */
1688
+ formatRange(e, t) {
1689
+ if (typeof this.formatter.formatRange == "function")
1690
+ return this.formatter.formatRange(e, t);
1691
+ if (t < e) throw new RangeError("End date must be >= start date");
1692
+ return `${this.formatter.format(e)} – ${this.formatter.format(t)}`;
1693
+ }
1694
+ /** Formats a date range as an array of parts. */
1695
+ formatRangeToParts(e, t) {
1696
+ if (typeof this.formatter.formatRangeToParts == "function")
1697
+ return this.formatter.formatRangeToParts(e, t);
1698
+ if (t < e) throw new RangeError("End date must be >= start date");
1699
+ let n = this.formatter.formatToParts(e), a = this.formatter.formatToParts(t);
1700
+ return [
1701
+ ...n.map((o) => ({
1702
+ ...o,
1703
+ source: "startRange"
1704
+ })),
1705
+ {
1706
+ type: "literal",
1707
+ value: " – ",
1708
+ source: "shared"
1709
+ },
1710
+ ...a.map((o) => ({
1711
+ ...o,
1712
+ source: "endRange"
1713
+ }))
1714
+ ];
1715
+ }
1716
+ /** Returns the resolved formatting options based on the values passed to the constructor. */
1717
+ resolvedOptions() {
1718
+ let e = this.formatter.resolvedOptions();
1719
+ return xt() && (this.resolvedHourCycle || (this.resolvedHourCycle = Ct(e.locale, this.options)), e.hourCycle = this.resolvedHourCycle, e.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), e.calendar === "ethiopic-amete-alem" && (e.calendar = "ethioaa"), e;
1720
+ }
1721
+ constructor(e, t = {}) {
1722
+ this.formatter = vr(e, t), this.options = t;
1723
+ }
1724
+ }
1725
+ const Et = {
1726
+ true: {
1727
+ // Only Japanese uses the h11 style for 12 hour time. All others use h12.
1728
+ ja: "h11"
1729
+ },
1730
+ false: {}
1731
+ };
1732
+ function vr(r, e = {}) {
1733
+ if (typeof e.hour12 == "boolean" && At()) {
1734
+ e = {
1735
+ ...e
1736
+ };
1737
+ let a = Et[String(e.hour12)][r.split("-")[0]], o = e.hour12 ? "h12" : "h23";
1738
+ e.hourCycle = a ?? o, delete e.hour12;
1739
+ }
1740
+ let t = r + (e ? Object.entries(e).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
1741
+ if (de.has(t)) return de.get(t);
1742
+ let n = new Intl.DateTimeFormat(r, e);
1743
+ return de.set(t, n), n;
1744
+ }
1745
+ let $e = null;
1746
+ function At() {
1747
+ return $e == null && ($e = new Intl.DateTimeFormat("en-US", {
1748
+ hour: "numeric",
1749
+ hour12: !1
1750
+ }).format(new Date(2020, 2, 3, 0)) === "24"), $e;
1751
+ }
1752
+ let ye = null;
1753
+ function xt() {
1754
+ return ye == null && (ye = new Intl.DateTimeFormat("fr", {
1755
+ hour: "numeric",
1756
+ hour12: !1
1757
+ }).resolvedOptions().hourCycle === "h12"), ye;
1758
+ }
1759
+ function Ct(r, e) {
1760
+ if (!e.timeStyle && !e.hour) return;
1761
+ r = r.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), r += (r.includes("-u-") ? "" : "-u") + "-nu-latn";
1762
+ let t = vr(r, {
1763
+ ...e,
1764
+ timeZone: void 0
1765
+ // use local timezone
1766
+ }), n = parseInt(t.formatToParts(new Date(2020, 2, 3, 0)).find((o) => o.type === "hour").value, 10), a = parseInt(t.formatToParts(new Date(2020, 2, 3, 23)).find((o) => o.type === "hour").value, 10);
1767
+ if (n === 0 && a === 23) return "h23";
1768
+ if (n === 24 && a === 23) return "h24";
1769
+ if (n === 0 && a === 11) return "h11";
1770
+ if (n === 12 && a === 11) return "h12";
1771
+ throw new Error("Unexpected hour cycle result");
1772
+ }
1773
+ export {
1774
+ h as $,
1775
+ Ke as A,
1776
+ Ar as B,
1777
+ xr as C,
1778
+ St as D,
1779
+ Tt as E,
1780
+ Yt as F,
1781
+ Rt as G,
1782
+ je as H,
1783
+ Sr as I,
1784
+ Tr as J,
1785
+ Bt as K,
1786
+ ie as L,
1787
+ _t as M,
1788
+ Ut as N,
1789
+ X as O,
1790
+ Rr as P,
1791
+ Re as Q,
1792
+ Yr as R,
1793
+ kt as S,
1794
+ Jt as T,
1795
+ Ot as U,
1796
+ Lt as V,
1797
+ Qt as W,
1798
+ Ft as X,
1799
+ Nt as Y,
1800
+ Ur as Z,
1801
+ qt as _,
1802
+ H as a,
1803
+ oe as a0,
1804
+ Gt as a1,
1805
+ Vt as a2,
1806
+ Zt as a3,
1807
+ et as a4,
1808
+ jt as a5,
1809
+ Kt as a6,
1810
+ Xt as a7,
1811
+ en as a8,
1812
+ ce as b,
1813
+ B as c,
1814
+ D as d,
1815
+ ft as e,
1816
+ ct as f,
1817
+ ut as g,
1818
+ lt as h,
1819
+ ht as i,
1820
+ Ce as j,
1821
+ $t as k,
1822
+ mt as l,
1823
+ wt as m,
1824
+ Te as n,
1825
+ vt as o,
1826
+ It as p,
1827
+ zt as q,
1828
+ Lr as r,
1829
+ S as s,
1830
+ Pt as t,
1831
+ y as u,
1832
+ kr as v,
1833
+ Me as w,
1834
+ Wt as x,
1835
+ Ht as y,
1836
+ p as z
1837
+ };