temporal-polyfill-lite 0.3.4 → 0.3.6

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.
@@ -2,7 +2,7 @@ function getNameFromUnit(e) {
2
2
  return ie[e];
3
3
  }
4
4
  function nanosecondsForTimeUnit(e) {
5
- return se[e - 3];
5
+ return ce[e - 3];
6
6
  }
7
7
  function isObject(e) {
8
8
  return ("object" == typeof e || "function" == typeof e) && null !== e;
@@ -35,9 +35,6 @@ function toPrimitive(e) {
35
35
  function toString(e) {
36
36
  return `${e}`;
37
37
  }
38
- function toBoolean(e) {
39
- return !!e;
40
- }
41
38
  function toBigInt(e) {
42
39
  return isObject(e) || "number" == typeof e ? BigInt.asIntN(2 ** 53 - 1, e) : BigInt(e);
43
40
  }
@@ -53,7 +50,7 @@ function toPositiveIntegerWithTruncation(e) {
53
50
  const t = toIntegerWithTruncation(e);
54
51
  return t <= 0 && throwRangeError(invalidNumber(t)), t;
55
52
  }
56
- function getOptionsObject(e = createNullPrototypeObject({})) {
53
+ function getOptionsObject(e = createNullPrototypeObject()) {
57
54
  return isObject(e) || throwTypeError("invalid options object"), e;
58
55
  }
59
56
  function getOption(e, t, o, n) {
@@ -178,24 +175,24 @@ function roundTimeDurationByDays(e, t, o) {
178
175
  function divideTimeDurationToFloatingPoint(e, t) {
179
176
  return t <= 1e9 ? timeDurationToSubsecondsNumber(e, -9 + Math.log10(t), !0) : i / t * e[0] + e[1] / t;
180
177
  }
181
- function interpretISODateTimeOffset(e, t, o, n, r, a, i, c) {
178
+ function interpretISODateTimeOffset(e, t, o, n, r, a, i, s) {
182
179
  if (!t) return getStartOfDay(r, e);
183
- const s = combineIsoDateAndTimeRecord(e, t);
184
- if (o === y || o === F && "ignore" == i) return getEpochNanosecondsFor(r, s, a);
185
- if (o === S || o === F && "use" == i) return validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(s.o.t, s.o.u, s.o.T, s.p.D, s.p.I, s.p.O, s.p.F, s.p.S, s.p.$ - n)));
180
+ const c = combineIsoDateAndTimeRecord(e, t);
181
+ if (o === y || o === F && "ignore" == i) return getEpochNanosecondsFor(r, c, a);
182
+ if (o === S || o === F && "use" == i) return validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(c.o.t, c.o.u, c.o.T, c.p.D, c.p.I, c.p.O, c.p.F, c.p.S, c.p.$ - n)));
186
183
  ((e) => {
187
184
  Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(me);
188
185
  })(e);
189
- const l = getPossibleEpochNanoseconds(r, s);
186
+ const l = getPossibleEpochNanoseconds(r, c);
190
187
  for (const e of l) {
191
188
  const t = getOffsetNanosecondsFor(r, e);
192
189
  if (t === n) return e;
193
- if (!c && roundNumberToIncrement(t, 6e10, "halfExpand") === n) return e;
190
+ if (!s && roundNumberToIncrement(t, 6e10, "halfExpand") === n) return e;
194
191
  }
195
- return "reject" === i && throwRangeError("time zone offset mismatch"), disambiguatePossibleEpochNanoseconds(l, r, s, a);
192
+ return "reject" === i && throwRangeError("time zone offset mismatch"), disambiguatePossibleEpochNanoseconds(l, r, c, a);
196
193
  }
197
194
  function toTemporalZonedDateTime(e, t) {
198
- let o, n, r, a, i, c, s, l = !1, d = !0;
195
+ let o, n, r, a, i, s, c, l = !1, d = !0;
199
196
  if (isObject(e)) {
200
197
  if (isZonedDateTime(e)) {
201
198
  const o = getOptionsObject(t);
@@ -220,16 +217,16 @@ function toTemporalZonedDateTime(e, t) {
220
217
  const d = getOptionsObject(t);
221
218
  r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d, p);
222
219
  const m = interpretTemporalDateTimeFields(i, l, getTemporalOverflowOption(d));
223
- c = m.o, s = m.p;
220
+ s = m.o, c = m.p;
224
221
  } else {
225
222
  validateString(e);
226
223
  const m = parseIsoDateTime(e, [Xe]);
227
224
  o = toTemporalTimeZoneIdentifier(m.P.R), n = m.P.N, l = m.P.Z, i = canonicalizeCalendar(m.Y || "iso8601"), d = !1, n && (d = hasUtcOffsetSubMinuteParts(n));
228
225
  const u = getOptionsObject(t);
229
- r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u, p), getTemporalOverflowOption(u), c = createIsoDateRecord(m.t, m.u, m.T), s = m.p;
226
+ r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u, p), getTemporalOverflowOption(u), s = createIsoDateRecord(m.t, m.u, m.T), c = m.p;
230
227
  }
231
228
  const m = l ? S : n ? F : y;
232
- return createZonedDateTimeSlot(interpretISODateTimeOffset(c, s, m, m === F ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
229
+ return createZonedDateTimeSlot(interpretISODateTimeOffset(s, c, m, m === F ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
233
230
  }
234
231
  function createTemporalZonedDateTime(e, t, o, n) {
235
232
  return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => Pe[e] && Pe[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
@@ -242,9 +239,9 @@ function createZonedDateTimeSlot(e, t, o, n) {
242
239
  W: n
243
240
  };
244
241
  }
245
- function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = G, c = M) {
246
- const s = roundTemporalInstant(e.U, a, i, c), l = epochSeconds(s) === epochSeconds(e.U) ? getOffsetNanosecondsForZonedDateTimeSlot(e) : getOffsetNanosecondsFor(e.P, s);
247
- return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(s, l), "iso8601", t, Y)}${r === W ? "" : formatDateTimeUtcOffsetRounded(l)}${n === L ? "" : `[${n === k ? "!" : ""}${e.P}]`}${formatCalendarAnnotation(e.Y, o)}`;
242
+ function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = G, s = M) {
243
+ const c = roundTemporalInstant(e.U, a, i, s), l = epochSeconds(c) === epochSeconds(e.U) ? getOffsetNanosecondsForZonedDateTimeSlot(e) : getOffsetNanosecondsFor(e.P, c);
244
+ return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(c, l), "iso8601", t, Y)}${r === W ? "" : formatDateTimeUtcOffsetRounded(l)}${n === L ? "" : `[${n === k ? "!" : ""}${e.P}]`}${formatCalendarAnnotation(e.Y, o)}`;
248
245
  }
249
246
  function addZonedDateTime(e, t, o) {
250
247
  if (0 === dateDurationSign(t.A)) return addInstant(e.U, t.p);
@@ -256,9 +253,9 @@ function differenceZonedDateTime(e, t, o) {
256
253
  if (!n) return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
257
254
  const r = getIsoDateTimeForZonedDateTimeSlot(e), a = getIsoDateTimeForZonedDateTimeSlot(t);
258
255
  if (!compareIsoDate(r.o, a.o)) return combineDateAndTimeDuration(zeroDateDuration(), timeDurationFromEpochNanosecondsDifference(t.U, e.U));
259
- let i, c = differenceTime(r.p, a.p);
260
- for (let o = vt(c) === n ? 1 : 0; o <= (3 - n) / 2 && (i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p), c = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, g)), vt(c) === n); o++);
261
- return combineDateAndTimeDuration(calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, H)), c);
256
+ let i, s = differenceTime(r.p, a.p);
257
+ for (let o = vt(s) === n ? 1 : 0; o <= (3 - n) / 2 && (i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p), s = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, g)), vt(s) === n); o++);
258
+ return combineDateAndTimeDuration(calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, H)), s);
262
259
  }
263
260
  function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
264
261
  if (!isDateUnit(o)) return differenceInstant(e.U, t.U, n, r, a);
@@ -321,8 +318,8 @@ function createLruCache(e) {
321
318
  }
322
319
  };
323
320
  }
324
- function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, c = 0) {
325
- return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, c);
321
+ function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, s = 0) {
322
+ return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, s);
326
323
  }
327
324
  function clampEpochSecond(e) {
328
325
  return clamp(e, -1e10, Infinity);
@@ -331,15 +328,15 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
331
328
  if ("UTC" === t) return 0;
332
329
  const r = clampEpochSecond(o), a = Pe[t] ||= createLruCache(5e3), i = a.C(r);
333
330
  if (void 0 !== i) return i;
334
- const c = getFormatterForTimeZone(t).formatToParts(1e3 * r), s = (utcEpochMilliseconds(...[
331
+ const s = getFormatterForTimeZone(t).formatToParts(1e3 * r), c = (utcEpochMilliseconds(...[
335
332
  "year",
336
333
  "month",
337
334
  "day",
338
335
  "hour",
339
336
  "minute",
340
337
  "second"
341
- ].map((e) => toIntegerIfIntegral(c.find((t) => t.type === e).value))) - 1e3 * r) * e;
342
- return n || a.B(r, s), s;
338
+ ].map((e) => toIntegerIfIntegral(s.find((t) => t.type === e).value))) - 1e3 * r) * e;
339
+ return n || a.B(r, c), c;
343
340
  }
344
341
  function getFormatterForTimeZone(e) {
345
342
  return be[e] ||= new Pt("en-u-hc-h23", {
@@ -484,8 +481,8 @@ function toTemporalDateTime(e, t) {
484
481
  const o = parseIsoDateTime(e, [Qe]), n = canonicalizeCalendar(o.Y || "iso8601");
485
482
  return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(o.t, o.u, o.T), o.p || midnightTimeRecord()), n);
486
483
  }
487
- function balanceIsoDateTime(e, t, o, n, r, a, i, c, s) {
488
- const l = balanceTime(n, r, a, i, c, s);
484
+ function balanceIsoDateTime(e, t, o, n, r, a, i, s, c) {
485
+ const l = balanceTime(n, r, a, i, s, c);
489
486
  return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), l.K), l);
490
487
  }
491
488
  function createTemporalDateTime(e, t, o = Object.create(Ne.prototype)) {
@@ -509,14 +506,14 @@ function differenceISODateTime(e, t, o, n) {
509
506
  const a = vt(r);
510
507
  let i = t.o;
511
508
  a === compareIsoDate(e.o, t.o) && (i = addDaysToIsoDate(i, a), r = add24HourDaysToTimeDuration(r, -a));
512
- const c = largerOfTwoTemporalUnits(H, n), s = calendarDateUntil(o, e.o, i, c);
513
- return n !== c && (r = add24HourDaysToTimeDuration(r, s.K), s.K = 0), combineDateAndTimeDuration(s, r);
509
+ const s = largerOfTwoTemporalUnits(H, n), c = calendarDateUntil(o, e.o, i, s);
510
+ return n !== s && (r = add24HourDaysToTimeDuration(r, c.K), c.K = 0), combineDateAndTimeDuration(c, r);
514
511
  }
515
512
  function differencePlainDateTimeWithRounding(e, t, o, n, r, a, i) {
516
513
  if (!compareIsoDateTime(e, t)) return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
517
514
  validateIsoDateTime(e), validateIsoDateTime(t);
518
- const c = differenceISODateTime(e, t, o, n);
519
- return a === G && 1 === r ? c : roundRelativeDuration(c, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n, r, a, i);
515
+ const s = differenceISODateTime(e, t, o, n);
516
+ return a === G && 1 === r ? s : roundRelativeDuration(s, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n, r, a, i);
520
517
  }
521
518
  function differenceTemporalPlainDateTime(e, t, o, n) {
522
519
  const r = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(o));
@@ -536,8 +533,8 @@ function differenceTemporalPlainDateTime(e, t, o, n) {
536
533
  ]));
537
534
  }
538
535
  function addDurationToDateTime(e, t, o, n) {
539
- const r = applySignToDurationSlot(toTemporalDuration(o), e), a = getTemporalOverflowOption(getOptionsObject(n)), i = toInternalDurationRecordWith24HourDays(r), c = addTime(t._.p, i.p);
540
- return createTemporalDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(t.Y, t._.o, adjustDateDurationRecord(i.A, c.K), a), c), t.Y);
536
+ const r = applySignToDurationSlot(toTemporalDuration(o), e), a = getTemporalOverflowOption(getOptionsObject(n)), i = toInternalDurationRecordWith24HourDays(r), s = addTime(t._.p, i.p);
537
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(t.Y, t._.o, adjustDateDurationRecord(i.A, s.K), a), s), t.Y);
541
538
  }
542
539
  function validateIsoDateTime(e) {
543
540
  return ((e) => {
@@ -634,8 +631,8 @@ function addTime(e, t) {
634
631
  return n.K += o[0], n;
635
632
  }
636
633
  function roundTime(e, n, r, a) {
637
- const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)), c = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.$;
638
- return balanceTime(0, 0, 0, 0, 0, divFloor(c, i) * i + roundNumberToIncrement(modFloor(c, i), n * nanosecondsForTimeUnit(r), a));
634
+ const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)), s = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.$;
635
+ return balanceTime(0, 0, 0, 0, 0, divFloor(s, i) * i + roundNumberToIncrement(modFloor(s, i), n * nanosecondsForTimeUnit(r), a));
639
636
  }
640
637
  function differenceTemporalPlainTime(e, t, o, n) {
641
638
  const r = toTemporalTime(o), a = getDifferenceSettings(e, getOptionsObject(n), l, [], G, q);
@@ -705,11 +702,11 @@ function parseIsoDateTime(e, t) {
705
702
  throwRangeError(le);
706
703
  }
707
704
  function parseDateTimeUtcOffset(e) {
708
- const o = e.match(ct);
705
+ const o = e.match(st);
709
706
  return o || throwRangeError(le), Se(`${o[1]}1`) * (36e11 * Se(o[2]) + Se(o[4] || "") * t + 1e9 * Se(o[5] || "") + Se((o[6] || "").padEnd(9, "0")) + 0);
710
707
  }
711
708
  function hasUtcOffsetSubMinuteParts(e) {
712
- return !!e.match(ct)[5];
709
+ return !!e.match(st)[5];
713
710
  }
714
711
  function toTemporalMonthDay(e, t) {
715
712
  if (isObject(e)) {
@@ -728,7 +725,7 @@ function toTemporalMonthDay(e, t) {
728
725
  return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay("iso8601" === n ? createIsoDateRecord(1972, o.u, o.T) : calendarMonthDayFromFields(n, isoDateToFields(n, validateIsoDate(createIsoDateRecord(o.t, o.u, o.T)), u), h), n);
729
726
  }
730
727
  function createTemporalMonthDay(e, t, o = Object.create(lt.prototype)) {
731
- return st.set(o, {
728
+ return ct.set(o, {
732
729
  o: validateIsoDate(e),
733
730
  Y: t
734
731
  }), o;
@@ -737,7 +734,7 @@ function temporalMonthDayToString(e, t) {
737
734
  return `${t === C || t === U || "iso8601" !== e.Y ? `${padIsoYear(e.o.t)}-` : ""}${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.Y, t)}`;
738
735
  }
739
736
  function getInternalSlotForPlainMonthDay(e) {
740
- return st.get(e);
737
+ return ct.get(e);
741
738
  }
742
739
  function getInternalSlotOrThrowForPlainMonthDay(e) {
743
740
  const t = getInternalSlotForPlainMonthDay(e);
@@ -779,7 +776,7 @@ function temporalYearMonthToString(e, t) {
779
776
  function differenceTemporalPlainYearMonth(e, t, o, n) {
780
777
  const r = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(o));
781
778
  calendarEquals(t.Y, r.Y) || throwRangeError(De);
782
- const a = getDifferenceSettings(e, getOptionsObject(n), s, [x, H], V, z);
779
+ const a = getDifferenceSettings(e, getOptionsObject(n), c, [x, H], V, z);
783
780
  if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
784
781
  0,
785
782
  0,
@@ -795,14 +792,14 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
795
792
  const i = calendarDateFromFields(t.Y, createNullPrototypeObject({
796
793
  ...isoDateToFields(t.Y, t.o, m),
797
794
  [Ft.T]: 1
798
- }), h), c = calendarDateFromFields(t.Y, createNullPrototypeObject({
795
+ }), h), s = calendarDateFromFields(t.Y, createNullPrototypeObject({
799
796
  ...isoDateToFields(t.Y, r.o, m),
800
797
  [Ft.T]: 1
801
798
  }), h);
802
- let l = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.Y, i, c, a.L), 0, 0), createTimeDurationFromSeconds(0));
799
+ let l = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.Y, i, s, a.L), 0, 0), createTimeDurationFromSeconds(0));
803
800
  if (a.H !== V || 1 !== a.V) {
804
801
  const e = combineIsoDateAndTimeRecord(i, midnightTimeRecord());
805
- l = roundRelativeDuration(l, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(c, midnightTimeRecord())), e, void 0, t.Y, a.L, a.V, a.H, a.q);
802
+ l = roundRelativeDuration(l, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(s, midnightTimeRecord())), e, void 0, t.Y, a.L, a.V, a.H, a.q);
806
803
  }
807
804
  return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(l, H), e));
808
805
  }
@@ -889,7 +886,7 @@ function compareIsoDate(e, t) {
889
886
  function differenceTemporalPlainDate(e, t, o, n) {
890
887
  const r = getInternalSlotOrThrowForPlainDate(toTemporalDate(o));
891
888
  calendarEquals(t.Y, r.Y) || throwRangeError(De);
892
- const a = getDifferenceSettings(e, getOptionsObject(n), s, [], H, H);
889
+ const a = getDifferenceSettings(e, getOptionsObject(n), c, [], H, H);
893
890
  if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
894
891
  0,
895
892
  0,
@@ -983,7 +980,7 @@ function calendarIntegersToEpochDays$6(e, t, o, n) {
983
980
  const r = getNewYear(e, t) + 30 * (o - 1);
984
981
  return r - yearMonthDay(e, r).T + n;
985
982
  }
986
- function daysInMonth$5(e, t, o) {
983
+ function daysInMonth$6(e, t, o) {
987
984
  return calendarIntegersToEpochDays$6(e, t, o + 1, 1) - calendarIntegersToEpochDays$6(e, t, o, 1);
988
985
  }
989
986
  function monthsInYear(e, t) {
@@ -1012,13 +1009,13 @@ function epochDaysToDate$6(e, t) {
1012
1009
  return t - getNewYear(e, o) + 1;
1013
1010
  },
1014
1011
  ie: {
1015
- ce: void 0,
1012
+ se: void 0,
1016
1013
  t: void 0
1017
1014
  },
1018
- se: 7,
1015
+ ce: 7,
1019
1016
  get le() {
1020
1017
  const o = yearMonthDay(e, t);
1021
- return daysInMonth$5(e, o.t, Math.round((t - o.T - getNewYear(e, o.t)) / 29.53) + 1);
1018
+ return daysInMonth$6(e, o.t, Math.round((t - o.T - getNewYear(e, o.t)) / 29.53) + 1);
1022
1019
  },
1023
1020
  get de() {
1024
1021
  const o = yearMonthDay(e, t).t;
@@ -1038,7 +1035,7 @@ function epoch$1(e) {
1038
1035
  function mathematicalInLeapYear$2(e) {
1039
1036
  return +!((e + 1) % 4);
1040
1037
  }
1041
- function daysInMonth$4(e, t) {
1038
+ function daysInMonth$5(e, t) {
1042
1039
  return 13 === t ? 5 + mathematicalInLeapYear$2(e) : 30;
1043
1040
  }
1044
1041
  function calendarIntegersToEpochDays$5(e, t, o, n) {
@@ -1059,7 +1056,7 @@ function calendarIntegersToEpochDays$4(e, t, o) {
1059
1056
  const n = (newYearEpochDays(e + 1) - newYearEpochDays(e)) % 30 - 24;
1060
1057
  return newYearEpochDays(e) + (isLeapYear$2(e) ? Math.round(29.53 * (t - 1) + .35) : Math.ceil(29.5 * (t - 1))) + (1 === n && t >= 3 ? 1 : -1 === n && t >= 4 ? -1 : 0) + o - 1;
1061
1058
  }
1062
- function daysInMonth$3(e, t) {
1059
+ function daysInMonth$4(e, t) {
1063
1060
  return calendarIntegersToEpochDays$4(e, t + 1, 1) - calendarIntegersToEpochDays$4(e, t, 1);
1064
1061
  }
1065
1062
  function mathematicalInLeapYear$1(e) {
@@ -1068,7 +1065,7 @@ function mathematicalInLeapYear$1(e) {
1068
1065
  function firstDayOfYear(e) {
1069
1066
  return isoDateToEpochDays(e + 78, 2, 22 - mathematicalInLeapYear$1(e));
1070
1067
  }
1071
- function daysInMonth$2(e, t) {
1068
+ function daysInMonth$3(e, t) {
1072
1069
  return t > 6 || 1 === t && !mathematicalInLeapYear$1(e) ? 30 : 31;
1073
1070
  }
1074
1071
  function calendarIntegersToEpochDays$3(e, t, o) {
@@ -1080,7 +1077,7 @@ function epoch(e) {
1080
1077
  function isLeapYear$1(e) {
1081
1078
  return modFloor(11 * (e + 4), 30) < 11;
1082
1079
  }
1083
- function daysInMonth$1(e, t) {
1080
+ function daysInMonth$2(e, t) {
1084
1081
  return 12 === t ? isLeapYear$1(e) ? 30 : 29 : 29 + t % 2;
1085
1082
  }
1086
1083
  function calendarIntegersToEpochDays$2(e, t, o, n) {
@@ -1100,11 +1097,11 @@ function epochDaysToDate$2(e, t) {
1100
1097
  re: isoDayOfWeek(epochDaysToIsoDate(t)),
1101
1098
  ae: t - calendarIntegersToEpochDays$2(e, o, 1, 1) + 1,
1102
1099
  ie: {
1103
- ce: void 0,
1100
+ se: void 0,
1104
1101
  t: void 0
1105
1102
  },
1106
- se: 7,
1107
- le: daysInMonth$1(o, n),
1103
+ ce: 7,
1104
+ le: daysInMonth$2(o, n),
1108
1105
  de: +isLeapYear$1(o) + 354,
1109
1106
  me: 12,
1110
1107
  ue: isLeapYear$1(o)
@@ -1156,6 +1153,9 @@ function getDate(e) {
1156
1153
  ae: e - n + 1
1157
1154
  };
1158
1155
  }
1156
+ function daysInMonth(e, t) {
1157
+ return t <= 6 ? 31 : 12 !== t || isLeapYear(e) ? 30 : 29;
1158
+ }
1159
1159
  function canonicalizeCalendar(e) {
1160
1160
  return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" : Ot[e] ? e : throwRangeError(((e) => `calendar not supported in this polyfill: ${e}`)(e));
1161
1161
  }
@@ -1191,22 +1191,22 @@ function calendarDateUntil(e, t, o, n) {
1191
1191
  return o === z ? createDateDurationRecord(divTrunc(r, 12), r % 12 + 0, 0, i) : createDateDurationRecord(0, r, 0, i);
1192
1192
  })(t, o, n);
1193
1193
  const a = nonIsoCalendarIsoToDate(e, t), i = nonIsoCalendarIsoToDate(e, o);
1194
- let c, s = 0;
1195
- if (n === z) for (s = i.t - a.t; (c = nonIsoDateSurpasses(e, r, a, i, s, 0)).Te; s -= r);
1196
- const l = ("hebrew" === e ? (d = (c || a).t, m = (c || a).u, monthNumber(i.t, i.u) - monthNumber(d, m)) : isChineseDangi(e) ? (function(e, t, o, n, r) {
1194
+ let s, c = 0;
1195
+ if (n === z) for (c = i.t - a.t; (s = nonIsoDateSurpasses(e, r, a, i, c, 0)).Te; c -= r);
1196
+ const l = ("hebrew" === e ? (d = (s || a).t, m = (s || a).u, monthNumber(i.t, i.u) - monthNumber(d, m)) : isChineseDangi(e) ? (function(e, t, o, n, r) {
1197
1197
  if (t === n) return r - o;
1198
- const a = calendarIntegersToEpochDays$6(e, t, o, 1), i = calendarIntegersToEpochDays$6(e, n, r, 1), c = sign(i - a);
1198
+ const a = calendarIntegersToEpochDays$6(e, t, o, 1), i = calendarIntegersToEpochDays$6(e, n, r, 1), s = sign(i - a);
1199
1199
  if (Math.abs(i - a) <= 15e6) return Math.round((i - a) / 29.5306);
1200
- let s = 0, l = a;
1201
- for (; (i - l) * c > 0;) {
1202
- let t = l + clamp(15e6, 1, Math.abs(i - l)) * c;
1203
- t -= yearMonthDay(e, t).T - 1, s += Math.round((t - l) / 29.5306), l = t;
1200
+ let c = 0, l = a;
1201
+ for (; (i - l) * s > 0;) {
1202
+ let t = l + clamp(15e6, 1, Math.abs(i - l)) * s;
1203
+ t -= yearMonthDay(e, t).T - 1, c += Math.round((t - l) / 29.5306), l = t;
1204
1204
  }
1205
- return s;
1206
- })(e, (c || a).t, (c || a).u, i.t, i.u) : (i.t - (c || a).t) * a.me + i.u - (c || a).u) - (r * (a.T - i.T) > 0 ? r : 0);
1205
+ return c;
1206
+ })(e, (s || a).t, (s || a).u, i.t, i.u) : (i.t - (s || a).t) * a.me + i.u - (s || a).u) - (r * (a.T - i.T) > 0 ? r : 0);
1207
1207
  var d, m;
1208
- const u = nonIsoDateSurpasses(e, r, a, i, s, l);
1209
- return createDateDurationRecord(s, l, 0, isoDateRecordToEpochDays(o) - isoDateRecordToEpochDays(calendarIntegersToIso(e, u.t, u.u, constrainDay(e, u.t, u.u, a.T, h))));
1208
+ const u = nonIsoDateSurpasses(e, r, a, i, c, l);
1209
+ return createDateDurationRecord(c, l, 0, isoDateRecordToEpochDays(o) - isoDateRecordToEpochDays(calendarIntegersToIso(e, u.t, u.u, constrainDay(e, u.t, u.u, a.T, h))));
1210
1210
  }
1211
1211
  function calendarDateToIso(e, t, o) {
1212
1212
  const n = t[Ft.t], r = t[Ft.u], a = mapUnlessUndefined(t[Ft.v], parseMonthCode), i = t[Ft.T];
@@ -1215,44 +1215,40 @@ function calendarDateToIso(e, t, o) {
1215
1215
  year: n + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0)
1216
1216
  }, o);
1217
1217
  a && constrainMonthCode(e, n, a, o);
1218
- const c = constrainMonth(e, n, r, o);
1219
- return calendarIntegersToIso(e, n, c, constrainDay(e, n, c, i, o));
1218
+ const s = constrainMonth(e, n, r, o);
1219
+ return calendarIntegersToIso(e, n, s, constrainDay(e, n, s, i, o));
1220
1220
  }
1221
1221
  function nonIsoCalendarIsoToDate(e, t) {
1222
- const o = isoDateRecordToEpochDays(t);
1223
- if (isIsoLikeCalendar(e)) {
1224
- const n = {
1225
- ...isoCalendarIsoToDate(t),
1226
- ie: {
1227
- t: void 0,
1228
- ce: void 0
1229
- }
1230
- };
1231
- if ("japanese" === e) {
1232
- const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a = Ot[e].get(r);
1233
- return {
1234
- oe: r,
1235
- ne: "bce" === r ? 1 - t.t : t.t - a + 1,
1236
- ...n
1237
- };
1222
+ const o = isoDateRecordToEpochDays(t), n = {
1223
+ ...isoCalendarIsoToDate(t),
1224
+ ie: {
1225
+ t: void 0,
1226
+ se: void 0
1238
1227
  }
1239
- return "gregory" === e ? {
1240
- oe: t.t > 0 ? "ce" : "bce",
1241
- ne: t.t > 0 ? t.t : 1 - t.t,
1228
+ };
1229
+ if ("japanese" === e) {
1230
+ const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a = Ot[e].get(r);
1231
+ return {
1232
+ oe: r,
1233
+ ne: "bce" === r ? 1 - t.t : t.t - a + 1,
1242
1234
  ...n
1243
- } : "buddhist" === e ? {
1244
- oe: "be",
1245
- ne: t.t + 543,
1246
- ...n,
1247
- t: t.t + 543
1248
- } : {
1249
- oe: t.t >= 1912 ? "roc" : "broc",
1250
- ne: t.t >= 1912 ? t.t - 1911 : 1912 - t.t,
1251
- ...n,
1252
- t: t.t - 1911
1253
1235
  };
1254
1236
  }
1255
- return isCopticOrEthiopic(e) ? ((e, t) => {
1237
+ return "gregory" === e ? {
1238
+ oe: t.t > 0 ? "ce" : "bce",
1239
+ ne: t.t > 0 ? t.t : 1 - t.t,
1240
+ ...n
1241
+ } : "buddhist" === e ? {
1242
+ oe: "be",
1243
+ ne: t.t + 543,
1244
+ ...n,
1245
+ t: t.t + 543
1246
+ } : "roc" === e ? {
1247
+ oe: t.t >= 1912 ? "roc" : "broc",
1248
+ ne: t.t >= 1912 ? t.t - 1911 : 1912 - t.t,
1249
+ ...n,
1250
+ t: t.t - 1911
1251
+ } : isCopticOrEthiopic(e) ? ((e, t) => {
1256
1252
  const o = divFloor(t - epoch$1(e) + 365, 365.25) - 1, n = t - calendarIntegersToEpochDays$5(e, o, 1, 1) + 1, r = divFloor(n - 1, 30) + 1;
1257
1253
  return {
1258
1254
  oe: "coptic" === e || "ethiopic" === e && o > 0 ? "am" : "aa",
@@ -1264,11 +1260,11 @@ function nonIsoCalendarIsoToDate(e, t) {
1264
1260
  re: isoDayOfWeek(epochDaysToIsoDate(t)),
1265
1261
  ae: n,
1266
1262
  ie: {
1267
- ce: void 0,
1263
+ se: void 0,
1268
1264
  t: void 0
1269
1265
  },
1270
- se: 7,
1271
- le: daysInMonth$4(o, r),
1266
+ ce: 7,
1267
+ le: daysInMonth$5(o, r),
1272
1268
  de: mathematicalInLeapYear$2(o) + 365,
1273
1269
  me: 13,
1274
1270
  ue: !!mathematicalInLeapYear$2(o)
@@ -1287,11 +1283,11 @@ function nonIsoCalendarIsoToDate(e, t) {
1287
1283
  re: isoDayOfWeek(t),
1288
1284
  ae: e - firstDayOfYear(o) + 1,
1289
1285
  ie: {
1290
- ce: void 0,
1286
+ se: void 0,
1291
1287
  t: void 0
1292
1288
  },
1293
- se: 7,
1294
- le: daysInMonth$2(o, r),
1289
+ ce: 7,
1290
+ le: daysInMonth$3(o, r),
1295
1291
  de: 365 + n,
1296
1292
  me: 12,
1297
1293
  ue: !!n
@@ -1318,13 +1314,13 @@ function nonIsoCalendarIsoToDate(e, t) {
1318
1314
  return getDate(e).ae;
1319
1315
  },
1320
1316
  ie: {
1321
- ce: void 0,
1317
+ se: void 0,
1322
1318
  t: void 0
1323
1319
  },
1324
- se: 7,
1320
+ ce: 7,
1325
1321
  get le() {
1326
1322
  const t = getDate(e);
1327
- return t.u <= 6 ? 31 : 12 !== t.u || isLeapYear(t.t) ? 30 : 29;
1323
+ return daysInMonth(t.t, t.u);
1328
1324
  },
1329
1325
  get de() {
1330
1326
  return isLeapYear(getDate(e).t) ? 366 : 365;
@@ -1357,10 +1353,10 @@ function nonIsoCalendarIsoToDate(e, t) {
1357
1353
  return e - getFirstDayOfMonth(getYearMonthDay(e).t, 1) + 1;
1358
1354
  },
1359
1355
  ie: {
1360
- ce: void 0,
1356
+ se: void 0,
1361
1357
  t: void 0
1362
1358
  },
1363
- se: 7,
1359
+ ce: 7,
1364
1360
  get le() {
1365
1361
  const t = getYearMonthDay(e);
1366
1362
  return getFirstDayOfMonth(t.t, t.u + 1) - getFirstDayOfMonth(t.t, t.u);
@@ -1391,11 +1387,11 @@ function nonIsoCalendarIsoToDate(e, t) {
1391
1387
  re: isoDayOfWeek(t),
1392
1388
  ae: e - calendarIntegersToEpochDays$4(o, 1, 1) + 1,
1393
1389
  ie: {
1394
- ce: void 0,
1390
+ se: void 0,
1395
1391
  t: void 0
1396
1392
  },
1397
- se: 7,
1398
- le: daysInMonth$3(o, n),
1393
+ ce: 7,
1394
+ le: daysInMonth$4(o, n),
1399
1395
  de: calendarIntegersToEpochDays$4(o + 1, 1, 1) - calendarIntegersToEpochDays$4(o, 1, 1),
1400
1396
  me: isLeapYear$2(o) ? 13 : 12,
1401
1397
  ue: isLeapYear$2(o)
@@ -1436,7 +1432,7 @@ function isChineseDangi(e) {
1436
1432
  return "chinese" === e || "dangi" === e;
1437
1433
  }
1438
1434
  function constrainDay(e, t, o, n, r) {
1439
- const a = "persian" === e ? ((e, t, o) => t <= 6 ? clamp(o, 1, 31) : 12 !== t ? clamp(o, 1, 30) : o < 30 ? o : clamp(o, 1, isLeapYear(e) ? 30 : 29))(t, o, n) : "islamic-umalqura" === e ? constrainDay$2(t, o, n) : isChineseDangi(e) ? ((e, t, o, n) => n <= 29 ? n : clamp(n, 1, daysInMonth$5(e, t, o)))(e, t, o, n) : clamp(n, 1, isCopticOrEthiopic(e) ? daysInMonth$4(t, o) : "indian" === e ? daysInMonth$2(t, o) : "hebrew" === e ? daysInMonth$3(t, o) : daysInMonth$1(t, o));
1435
+ const a = "persian" === e ? ((e, t, o) => o < 30 ? o : clamp(o, 1, daysInMonth(e, t)))(t, o, n) : "islamic-umalqura" === e ? constrainDay$2(t, o, n) : isChineseDangi(e) ? ((e, t, o, n) => n <= 29 ? n : clamp(n, 1, daysInMonth$6(e, t, o)))(e, t, o, n) : clamp(n, 1, isCopticOrEthiopic(e) ? daysInMonth$5(t, o) : "indian" === e ? daysInMonth$3(t, o) : "hebrew" === e ? daysInMonth$4(t, o) : daysInMonth$2(t, o));
1440
1436
  return n !== a && "reject" === r ? throwRangeError(me) : a;
1441
1437
  }
1442
1438
  function constrainMonth(e, t, o, n) {
@@ -1540,19 +1536,11 @@ function calendarMonthDayFromFields(e, t, o) {
1540
1536
  const n = t[Ft.t];
1541
1537
  let r = t[Ft.u], a = mapUnlessUndefined(t[Ft.v], parseMonthCode), i = t[Ft.T];
1542
1538
  return void 0 !== n ? (a || (r = constrainMonth(e, n, r, o)), a = a ? constrainMonthCode(e, n, a, o) : parseMonthCode(nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, 1)).v), i = constrainDay(e, n, r, i, o), validateIsoDate(calendarIntegersToIso(e, n, r, i))) : i = ((e, t, o, n) => {
1543
- if (isChineseDangi(e)) {
1544
- const e = clamp(o, 1, 30);
1545
- return o !== e && "reject" === n ? throwRangeError(me) : e;
1546
- }
1547
- if ("islamic-umalqura" === e) {
1548
- const e = clamp(o, 1, 30);
1549
- return o !== e && "reject" === n ? throwRangeError(me) : e;
1539
+ if (isChineseDangi(e) || "islamic-umalqura" === e || "persian" === e) {
1540
+ const r = clamp(o, 1, "persian" === e && t[0] <= 6 ? 31 : 30);
1541
+ return o !== r && "reject" === n ? throwRangeError(me) : r;
1550
1542
  }
1551
- if ("persian" === e) {
1552
- const e = clamp(o, 1, t[0] <= 6 ? 31 : 30);
1553
- return o !== e && "reject" === n ? throwRangeError(me) : e;
1554
- }
1555
- return "hebrew" === e ? t[1] ? constrainDay(e, 3, 6, o, n) : constrainDay(e, 1, t[0], o, n) : isCopticOrEthiopic(e) ? constrainDay(e, 3, t[0], o, n) : constrainDay(e, 2, t[0], o, n);
1543
+ return "hebrew" === e ? t[1] ? constrainDay(e, 3, 6, o, n) : constrainDay(e, 1, t[0], o, n) : constrainDay(e, isCopticOrEthiopic(e) ? 3 : 2, t[0], o, n);
1556
1544
  })(e, a, i, o), isChineseDangi(e) && a[1] && (1 === a[0] || 12 === a[0] || 30 === i && (2 === a[0] || isWithin(a[0], 8, 11))) && ("reject" === o && throwRangeError(me), a[1] = !1), isCopticOrEthiopic(e) ? epochDaysToIsoDate(((e, t) => 13 === e && 6 === t ? 618 : (30 * (e - 1) + t + 252) % 365 + 731)(a[0], i)) : "indian" === e ? epochDaysToIsoDate(((e, t) => calendarIntegersToEpochDays$3(30 * e + t <= 310 ? 1894 : 1893, e, t))(a[0], i)) : "persian" === e ? epochDaysToIsoDate(((e, t) => {
1557
1545
  if (12 === e && 30 === t) {
1558
1546
  for (let o = 1350;; o--) if (isLeapYear(o)) return calendarIntegersToEpochDays(o, e, t);
@@ -1575,7 +1563,18 @@ function calendarMonthDayFromFields(e, t, o) {
1575
1563
  const t = calendarIntegersToEpochDays$6(e, 30 === n ? 1969 : 1972, 11, n);
1576
1564
  return t <= 1095 ? t : calendarIntegersToEpochDays$6(e, 1971, 12, n);
1577
1565
  }
1578
- return calendarIntegersToEpochDays$6(e, ((e, t, o, n) => 12 === t ? 1971 : !o && (n < 30 || 2 === t || 5 === t || 7 === t || 9 === t || 10 === t) ? 1972 : o ? 2 === t ? 1947 : 3 === t ? 30 === n ? 1955 : 1966 : 4 === t ? 30 === n ? 1944 : 1963 : 5 === t ? 30 === n ? 1952 : 1971 : 6 === t ? 30 === n ? 1941 : 1960 : 7 === t ? 30 === n ? 1938 : 1968 : 8 === t ? 1957 : 9 === t ? 2014 : 10 === t ? 1984 : 2033 : 1 === t || 4 === t ? 1970 : 3 === t ? "chinese" === e ? 1966 : 1968 : 1971)(e, t, o, n), r, n);
1566
+ return calendarIntegersToEpochDays$6(e, ((e, t, o, n) => 12 === t ? 1971 : !o && (n < 30 || 2 === t || 5 === t || 7 === t || 9 === t || 10 === t) ? 1972 : o ? [
1567
+ 1947,
1568
+ 30 === n ? 1955 : 1966,
1569
+ 30 === n ? 1944 : 1963,
1570
+ 30 === n ? 1952 : 1971,
1571
+ 30 === n ? 1941 : 1960,
1572
+ 30 === n ? 1938 : 1968,
1573
+ 1957,
1574
+ 2014,
1575
+ 1984,
1576
+ 2033
1577
+ ][t - 2] : 1 === t || 4 === t ? 1970 : 3 === t ? "chinese" === e ? 1966 : 1968 : 1971)(e, t, o, n), r, n);
1579
1578
  })(e, a[0], a[1], i)) : epochDaysToIsoDate(((e, t, o) => calendarIntegersToEpochDays$2(e, 12 === t && 30 === o ? 1390 : +(30 * t + o <= 356 - +("islamic-civil" === e)) + 1391, t, o))(e, a[0], i));
1580
1579
  })(e, t, o);
1581
1580
  }
@@ -1595,13 +1594,13 @@ function isoWeekOfYear(e) {
1595
1594
  const t = e.t, o = divFloor(isoDayOfYear(e) + 10 - isoDayOfWeek(e), 7);
1596
1595
  return o < 1 ? {
1597
1596
  t: t - 1,
1598
- ce: isoWeeksInYear(t - 1)
1597
+ se: isoWeeksInYear(t - 1)
1599
1598
  } : o > isoWeeksInYear(t) ? {
1600
1599
  t: t + 1,
1601
- ce: 1
1600
+ se: 1
1602
1601
  } : {
1603
1602
  t,
1604
- ce: o
1603
+ se: o
1605
1604
  };
1606
1605
  }
1607
1606
  function isoDayOfYear(e) {
@@ -1619,7 +1618,7 @@ function isoCalendarIsoToDate(e) {
1619
1618
  re: isoDayOfWeek(e),
1620
1619
  ae: isoDayOfYear(e),
1621
1620
  ie: isoWeekOfYear(e),
1622
- se: 7,
1621
+ ce: 7,
1623
1622
  le: isoDaysInMonth(e.t, e.u),
1624
1623
  de: (t = e.t, 365 + mathematicalInLeapYear(t)),
1625
1624
  me: 12,
@@ -1638,12 +1637,12 @@ function isoResolveFields(e, t) {
1638
1637
  const o = mapUnlessUndefined(e[Ft.v], parseMonthCode);
1639
1638
  o && ((o[0] > 12 || o[1] || void 0 !== e[Ft.u] && o[0] !== e[Ft.u]) && throwRangeError(ge), e[Ft.u] = o[0]);
1640
1639
  }
1641
- function calendarResolveFields(e, t, o = s) {
1642
- "iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = s) {
1640
+ function calendarResolveFields(e, t, o = c) {
1641
+ "iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = c) {
1643
1642
  const n = t[Ft.oe], r = t[Ft.ne];
1644
1643
  let a = t[Ft.t];
1645
- const i = t[Ft.v], c = t[Ft.u], l = t[Ft.T];
1646
- if (o === u && void 0 !== i && void 0 === c || void 0 !== a || calendarSupportsEraForNonIsoCalendars(e) && void 0 !== n && void 0 !== r || throwTypeError(missingField("year, era, eraYear")), calendarSupportsEraForNonIsoCalendars(e) && void 0 === n != (void 0 === r) && throwTypeError(), o !== m && void 0 === l && throwTypeError(missingField("day")), c === i && throwTypeError(missingField("month, monthCode")), calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r) {
1644
+ const i = t[Ft.v], s = t[Ft.u], l = t[Ft.T];
1645
+ if (o === u && void 0 !== i && void 0 === s || void 0 !== a || calendarSupportsEraForNonIsoCalendars(e) && void 0 !== n && void 0 !== r || throwTypeError(missingField("year, era, eraYear")), calendarSupportsEraForNonIsoCalendars(e) && void 0 === n != (void 0 === r) && throwTypeError(), o !== m && void 0 === l && throwTypeError(missingField("day")), s === i && throwTypeError(missingField("month, monthCode")), calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r) {
1647
1646
  const o = ((e, t, o) => {
1648
1647
  const n = canonicalizeEraInCalendar(e, t), r = Ot[e].get(n);
1649
1648
  return !1 === r ? 1 - o : r + o - 1;
@@ -1657,13 +1656,13 @@ function calendarResolveFields(e, t, o = s) {
1657
1656
  const n = t[Ft.t];
1658
1657
  if (void 0 !== n) {
1659
1658
  const r = monthCodeToOrdinal(e, n, constrainMonthCode(e, n, o, h));
1660
- void 0 !== c && c !== r && throwRangeError(ge), t[Ft.u] = r;
1659
+ void 0 !== s && s !== r && throwRangeError(ge), t[Ft.u] = r;
1661
1660
  }
1662
1661
  }
1663
1662
  })(e, t, o);
1664
1663
  }
1665
1664
  function createEmptyCalendarFieldsRecord() {
1666
- return createNullPrototypeObject({});
1665
+ return createNullPrototypeObject();
1667
1666
  }
1668
1667
  function zeroDateDuration() {
1669
1668
  return createDateDurationRecord(0, 0, 0, 0);
@@ -1749,7 +1748,7 @@ function toTemporalPartialDurationRecord(e) {
1749
1748
  6,
1750
1749
  2,
1751
1750
  0
1752
- ].map((t) => mapUnlessUndefined(e[ce[t]], toIntegerIfIntegral));
1751
+ ].map((t) => mapUnlessUndefined(e[se[t]], toIntegerIfIntegral));
1753
1752
  return t.every((e) => void 0 === e) && throwTypeError(Ie), [
1754
1753
  9,
1755
1754
  5,
@@ -1769,8 +1768,8 @@ function createTemporalDurationSlot(e) {
1769
1768
  function createTemporalDuration(e, t = Object.create(Et.prototype)) {
1770
1769
  return wt.set(t, e), t;
1771
1770
  }
1772
- function timeDurationFromComponents(e, t, o, n, c, s) {
1773
- return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromSeconds(3600 * e + 60 * t + o), normalize(divTrunc(m = n, r), m % r * 1e6)), (d = c, normalize(Math.round((d - d % a) / a), d % a * 1e3))), (l = s, normalize(Math.round((l - l % i) / i), l % i)));
1771
+ function timeDurationFromComponents(e, t, o, n, s, c) {
1772
+ return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromSeconds(3600 * e + 60 * t + o), normalize(divTrunc(m = n, r), m % r * 1e6)), (d = s, normalize(Math.round((d - d % a) / a), d % a * 1e3))), (l = c, normalize(Math.round((l - l % i) / i), l % i)));
1774
1773
  var l, d, m;
1775
1774
  }
1776
1775
  function add24HourDaysToTimeDuration(e, t) {
@@ -1792,11 +1791,11 @@ function roundTimeDuration(e, t, o, n) {
1792
1791
  function totalTimeDuration(e, t) {
1793
1792
  return divideTimeDurationToFloatingPoint(e, nanosecondsForTimeUnit(t));
1794
1793
  }
1795
- function computeNudgeWindow(e, t, o, n, r, a, i, c, s) {
1794
+ function computeNudgeWindow(e, t, o, n, r, a, i, s, c) {
1796
1795
  let l, d, m, u, T;
1797
- if (c === z) l = roundNumberToIncrement(t.A.ee, i, M) + (s ? i * e : 0), d = l + i * e, m = createDateDurationRecord(l, 0, 0, 0), u = createDateDurationRecord(d, 0, 0, 0);
1798
- else if (c === V) l = roundNumberToIncrement(t.A.te, i, M) + (s ? i * e : 0), d = l + i * e, m = adjustDateDurationRecord(t.A, 0, 0, l), u = adjustDateDurationRecord(t.A, 0, 0, d);
1799
- else if (c === x) {
1796
+ if (s === z) l = roundNumberToIncrement(t.A.ee, i, M) + (c ? i * e : 0), d = l + i * e, m = createDateDurationRecord(l, 0, 0, 0), u = createDateDurationRecord(d, 0, 0, 0);
1797
+ else if (s === V) l = roundNumberToIncrement(t.A.te, i, M) + (c ? i * e : 0), d = l + i * e, m = adjustDateDurationRecord(t.A, 0, 0, l), u = adjustDateDurationRecord(t.A, 0, 0, d);
1798
+ else if (s === x) {
1800
1799
  const o = calendarDateAdd(a, n.o, adjustDateDurationRecord(t.A, 0, 0), h);
1801
1800
  l = roundNumberToIncrement(t.A.X + calendarDateUntil(a, o, addDaysToIsoDate(o, t.A.K), x).X, i, M), d = l + i * e, m = adjustDateDurationRecord(t.A, 0, l), u = adjustDateDurationRecord(t.A, 0, d);
1802
1801
  } else l = roundNumberToIncrement(t.A.K, i, M), d = l + i * e, m = adjustDateDurationRecord(t.A, l), u = adjustDateDurationRecord(t.A, d);
@@ -1815,65 +1814,65 @@ function computeNudgeWindow(e, t, o, n, r, a, i, c, s) {
1815
1814
  Ie: u
1816
1815
  };
1817
1816
  }
1818
- function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
1819
- let d = !1, m = computeNudgeWindow(e, t, o, r, a, i, c, s, !1);
1820
- compareEpochNanoseconds(m.pe, n) * compareEpochNanoseconds(m.ge, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, i, c, s, !0), d = !0);
1817
+ function nudgeToCalendarUnit(e, t, o, n, r, a, i, s, c, l) {
1818
+ let d = !1, m = computeNudgeWindow(e, t, o, r, a, i, s, c, !1);
1819
+ compareEpochNanoseconds(m.pe, n) * compareEpochNanoseconds(m.ge, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, i, s, c, !0), d = !0);
1821
1820
  const u = differenceEpochNanoseconds(m.pe, n), T = differenceEpochNanoseconds(m.pe, m.ge);
1822
1821
  let D = m.fe, h = m.pe;
1823
- return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? ve(e, t) ? ve(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.De && (d = !0, D = m.Ie, h = m.ge), {
1822
+ return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? ve(e, t) ? ve(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * s * e, s, l) === m.De && (d = !0, D = m.Ie, h = m.ge), {
1824
1823
  Oe: {
1825
1824
  Fe: combineDateAndTimeDuration(D, createTimeDurationFromSeconds(0)),
1826
- ye: h,
1827
- Se: d
1825
+ Se: h,
1826
+ ye: d
1828
1827
  },
1829
- we: m.he + divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9) * c * e
1828
+ we: m.he + divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9) * s * e
1830
1829
  };
1831
1830
  }
1832
- function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
1833
- const d = internalDurationSign(e) || 1, m = isCalendarUnit(s) || r && s === H ? nudgeToCalendarUnit(d, e, t, o, n, r, a, c, s, l).Oe : r ? ((e, t, o, n, r, a, i, c) => {
1834
- const s = calendarDateAdd(r, o.o, t.A, h), l = combineIsoDateAndTimeRecord(s, o.p), d = combineIsoDateAndTimeRecord(addDaysToIsoDate(s, e), o.p), m = getEpochNanosecondsFor(n, l, g), u = getEpochNanosecondsFor(n, d, g), T = timeDurationFromEpochNanosecondsDifference(u, m), D = nanosecondsForTimeUnit(i);
1835
- let p = roundTimeDurationToIncrement(t.p, a * D, c);
1831
+ function roundRelativeDuration(e, t, o, n, r, a, i, s, c, l) {
1832
+ const d = internalDurationSign(e) || 1, m = isCalendarUnit(c) || r && c === H ? nudgeToCalendarUnit(d, e, t, o, n, r, a, s, c, l).Oe : r ? ((e, t, o, n, r, a, i, s) => {
1833
+ const c = calendarDateAdd(r, o.o, t.A, h), l = combineIsoDateAndTimeRecord(c, o.p), d = combineIsoDateAndTimeRecord(addDaysToIsoDate(c, e), o.p), m = getEpochNanosecondsFor(n, l, g), u = getEpochNanosecondsFor(n, d, g), T = timeDurationFromEpochNanosecondsDifference(u, m), D = nanosecondsForTimeUnit(i);
1834
+ let p = roundTimeDurationToIncrement(t.p, a * D, s);
1836
1835
  const f = addTimeDuration(p, negateTimeDuration(T));
1837
1836
  let I, O = !1, F = 0;
1838
- return vt(f) !== -e ? (O = !0, F = e, p = roundTimeDurationToIncrement(f, a * D, c), I = addTimeDurationToEpochNanoseconds(u, p)) : I = addTimeDurationToEpochNanoseconds(u, p), {
1837
+ return vt(f) !== -e ? (O = !0, F = e, p = roundTimeDurationToIncrement(f, a * D, s), I = addTimeDurationToEpochNanoseconds(u, p)) : I = addTimeDurationToEpochNanoseconds(u, p), {
1839
1838
  Fe: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.K + F), p),
1840
- ye: I,
1841
- Se: O
1839
+ Se: I,
1840
+ ye: O
1842
1841
  };
1843
- })(d, e, n, r, a, c, s, l) : (function(e, t, o, n, r, a) {
1844
- const i = add24HourDaysToTimeDuration(e.p, e.A.K), c = r === H ? roundTimeDurationByDays(i, n, a) : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a), s = c[0], [l, d] = isDateUnit(o) ? [s, addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0))] : [0, c];
1842
+ })(d, e, n, r, a, s, c, l) : (function(e, t, o, n, r, a) {
1843
+ const i = add24HourDaysToTimeDuration(e.p, e.A.K), s = r === H ? roundTimeDurationByDays(i, n, a) : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a), c = s[0], [l, d] = isDateUnit(o) ? [c, addTimeDuration(s, timeDurationFromComponents(24 * -c, 0, 0, 0, 0, 0))] : [0, s];
1845
1844
  return {
1846
1845
  Fe: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, l), d),
1847
- ye: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
1848
- Se: sign(s - i[0]) === vt(i)
1846
+ Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(s, negateTimeDuration(i))),
1847
+ ye: sign(c - i[0]) === vt(i)
1849
1848
  };
1850
- })(e, o, i, c, s, l);
1851
- return m.Se && s !== x ? ((e, t, o, n, r, a, i, c) => {
1852
- if (c === i) return t;
1853
- const s = i;
1849
+ })(e, o, i, s, c, l);
1850
+ return m.ye && c !== x ? ((e, t, o, n, r, a, i, s) => {
1851
+ if (s === i) return t;
1852
+ const c = i;
1854
1853
  let l;
1855
- for (let i = c - 1; i >= s; i--) if (i !== X || s === X) {
1854
+ for (let i = s - 1; i >= c; i--) if (i !== X || c === X) {
1856
1855
  l = i === _ ? createDateDurationRecord(t.A.ee + e, 0, 0, 0) : i === K ? adjustDateDurationRecord(t.A, 0, 0, t.A.te + e) : adjustDateDurationRecord(t.A, 0, t.A.X + e);
1857
- const c = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, l, h), n.p);
1858
- if (vt(differenceEpochNanoseconds(r ? getEpochNanosecondsFor(r, c, "compatible") : getUtcEpochNanoseconds(c), o)) === -e) break;
1856
+ const s = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, l, h), n.p);
1857
+ if (vt(differenceEpochNanoseconds(r ? getEpochNanosecondsFor(r, s, "compatible") : getUtcEpochNanoseconds(s), o)) === -e) break;
1859
1858
  t = combineDateAndTimeDuration(l, createTimeDurationFromSeconds(0));
1860
1859
  }
1861
1860
  return t;
1862
- })(d, m.Fe, m.ye, n, r, a, i, largerOfTwoTemporalUnits(s, H)) : m.Fe;
1861
+ })(d, m.Fe, m.Se, n, r, a, i, largerOfTwoTemporalUnits(c, H)) : m.Fe;
1863
1862
  }
1864
1863
  function totalRelativeDuration(e, t, o, n, r, a, i) {
1865
1864
  return isCalendarUnit(i) || r && i === H ? nudgeToCalendarUnit(internalDurationSign(e) || 1, e, t, o, n, r, a, 1, i, M).we : totalTimeDuration(add24HourDaysToTimeDuration(e.p, e.A.K), i);
1866
1865
  }
1867
1866
  function temporalDurationToString(e, t) {
1868
- const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[oe], e[ne], e[re], e[ae]), [, , , r, a, i, c] = balanceTimeDuration(n, J), [s, l, d, m, u, T] = [
1867
+ const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[oe], e[ne], e[re], e[ae]), [, , , r, a, i, s] = balanceTimeDuration(n, J), [c, l, d, m, u, T] = [
1869
1868
  "Y",
1870
1869
  "M",
1871
1870
  "W",
1872
1871
  "D",
1873
1872
  "H",
1874
1873
  "M"
1875
- ].map((t, o) => e[o] ? `${e[o]}${t}` : ""), D = `${u}${T}${vt(n) || defaultTemporalLargestUnit(e) >= J || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + c, t)}S` : ""}`;
1876
- return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${D && `T${D}`}`;
1874
+ ].map((t, o) => e[o] ? `${e[o]}${t}` : ""), D = `${u}${T}${vt(n) || defaultTemporalLargestUnit(e) >= J || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + s, t)}S` : ""}`;
1875
+ return `${o < 0 ? "-" : ""}P${c}${l}${d}${m}${D && `T${D}`}`;
1877
1876
  }
1878
1877
  function addDurations(e, t, o) {
1879
1878
  const n = applySignToDurationSlot(toTemporalDuration(o), e), r = largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), defaultTemporalLargestUnit(n));
@@ -1900,7 +1899,7 @@ function balanceTimeDuration(e, t) {
1900
1899
  0,
1901
1900
  0
1902
1901
  ].slice(0, o - Q),
1903
- o > oe ? timeDurationToSubsecondsNumber(e, 18 - 3 * o) : divTrunc((r = e, r[0] * n + divTrunc(r[1], 1e9)), se[o - Q] / 1e9),
1902
+ o > oe ? timeDurationToSubsecondsNumber(e, 18 - 3 * o) : divTrunc((r = e, r[0] * n + divTrunc(r[1], 1e9)), ce[o - Q] / 1e9),
1904
1903
  ...[
1905
1904
  0,
1906
1905
  1,
@@ -1908,7 +1907,7 @@ function balanceTimeDuration(e, t) {
1908
1907
  3,
1909
1908
  4,
1910
1909
  5
1911
- ].map((t) => divTrunc(e[1], se[t + 1]) % (se[t] / se[t + 1]) + 0).slice(o - Q)
1910
+ ].map((t) => divTrunc(e[1], ce[t + 1]) % (ce[t] / ce[t + 1]) + 0).slice(o - Q)
1912
1911
  ];
1913
1912
  var r;
1914
1913
  }
@@ -1929,7 +1928,7 @@ function roundHalfEven(e) {
1929
1928
  }
1930
1929
  function isoDateToEpochDays(e, t, o) {
1931
1930
  const n = balanceIsoYearMonth(e, t + 1);
1932
- return Date.UTC(n.t % 400 - 400, n.u - 1, 0) / r + (divTrunc(n.t, 400) + 1) * c + o;
1931
+ return Date.UTC(n.t % 400 - 400, n.u - 1, 0) / r + (divTrunc(n.t, 400) + 1) * s + o;
1933
1932
  }
1934
1933
  function isoDateRecordToEpochDays(e) {
1935
1934
  return isoDateToEpochDays(e.t, e.u - 1, e.T);
@@ -1992,7 +1991,7 @@ function toSecondsStringPrecisionRecord(e, t) {
1992
1991
  function getTemporalUnitValuedOption(e, t, o) {
1993
1992
  return mapUnlessUndefined(getOption(e, t, [
1994
1993
  ...ie,
1995
- ...ce,
1994
+ ...se,
1996
1995
  "auto"
1997
1996
  ], o), (e) => {
1998
1997
  return "auto" === e ? "auto" : (t = e.replace(/s$/, ""), ie.indexOf(t));
@@ -2000,19 +1999,19 @@ function getTemporalUnitValuedOption(e, t, o) {
2000
1999
  });
2001
2000
  }
2002
2001
  function validateTemporalUnitValue(e, t, o = []) {
2003
- void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <= H && t === l || e > H && t === s) && throwRangeError(disallowedUnit(e)));
2002
+ void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <= H && t === l || e > H && t === c) && throwRangeError(disallowedUnit(e)));
2004
2003
  }
2005
2004
  function getTemporalRelativeToOption(e) {
2006
2005
  const t = e.relativeTo;
2007
- if (void 0 === t) return createNullPrototypeObject({});
2008
- let o, n, r, a, i, c = !0, s = F;
2006
+ if (void 0 === t) return createNullPrototypeObject();
2007
+ let o, n, r, a, i, s = !0, c = F;
2009
2008
  if (isObject(t)) {
2010
2009
  if (isZonedDateTime(t)) return createNullPrototypeObject({ Me: getInternalSlotOrThrowForZonedDateTime(t) });
2011
2010
  if (isPlainDate(t)) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(t) });
2012
2011
  const e = getInternalSlotForPlainDateTime(t);
2013
2012
  if (e) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.Y)) });
2014
2013
  r = getTemporalCalendarIdentifierWithIsoDefault(t);
2015
- const c = prepareCalendarFields(r, t, [
2014
+ const s = prepareCalendarFields(r, t, [
2016
2015
  Ft.t,
2017
2016
  Ft.u,
2018
2017
  Ft.v,
@@ -2025,14 +2024,14 @@ function getTemporalRelativeToOption(e) {
2025
2024
  Ft.$,
2026
2025
  Ft.M,
2027
2026
  Ft.P
2028
- ], []), l = interpretTemporalDateTimeFields(r, c, h);
2029
- a = l.o, i = l.p, o = c.timeZone, n = c.offset, s = n ? F : y;
2027
+ ], []), l = interpretTemporalDateTimeFields(r, s, h);
2028
+ a = l.o, i = l.p, o = s.timeZone, n = s.offset, c = n ? F : y;
2030
2029
  } else {
2031
2030
  validateString(t);
2032
2031
  const e = parseIsoDateTime(t, [Xe, Qe]);
2033
- n = e.P.N, e.P.R ? (o = toTemporalTimeZoneIdentifier(e.P.R), s = e.P.Z ? S : n ? F : y, c = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.Y || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
2032
+ n = e.P.N, e.P.R ? (o = toTemporalTimeZoneIdentifier(e.P.R), c = e.P.Z ? S : n ? F : y, s = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.Y || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
2034
2033
  }
2035
- return createNullPrototypeObject(o ? { Me: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, s, s === F ? parseDateTimeUtcOffset(n) : 0, o, g, O, c), o, r)) } : { be: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
2034
+ return createNullPrototypeObject(o ? { Me: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === F ? parseDateTimeUtcOffset(n) : 0, o, g, O, s), o, r)) } : { be: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
2036
2035
  }
2037
2036
  function largerOfTwoTemporalUnits(e, t) {
2038
2037
  return e < t ? e : t;
@@ -2090,28 +2089,28 @@ function isoDateToFields(e, t, o) {
2090
2089
  }
2091
2090
  function getDifferenceSettings(e, t, o, n, r, a) {
2092
2091
  let i = getTemporalUnitValuedOption(t, "largestUnit", void 0) ?? "auto";
2093
- const c = getRoundingIncrementOption(t), s = getRoundingModeOption(t, M), l = getTemporalUnitValuedOption(t, "smallestUnit", void 0) ?? r;
2094
- return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(l, o), n.includes(l) && throwRangeError(disallowedUnit(l)), "auto" === i && (i = largerOfTwoTemporalUnits(a, l)), i > l && throwRangeError(pe), isDateUnit(l) || validateTemporalRoundingIncrement(c, maximumTemporalDurationRoundingIncrement(l), !1), {
2092
+ const s = getRoundingIncrementOption(t), c = getRoundingModeOption(t, M), l = getTemporalUnitValuedOption(t, "smallestUnit", void 0) ?? r;
2093
+ return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(l, o), n.includes(l) && throwRangeError(disallowedUnit(l)), "auto" === i && (i = largerOfTwoTemporalUnits(a, l)), i > l && throwRangeError(pe), isDateUnit(l) || validateTemporalRoundingIncrement(s, maximumTemporalDurationRoundingIncrement(l), !1), {
2095
2094
  H: l,
2096
2095
  L: i,
2097
- q: -1 === e ? negateRoundingMode(s) : s,
2098
- V: c
2096
+ q: -1 === e ? negateRoundingMode(c) : c,
2097
+ V: s
2099
2098
  };
2100
2099
  }
2101
2100
  function getUtcEpochNanoseconds(e) {
2102
2101
  return addNanosecondsToEpochSeconds(createEpochNanosecondsFromEpochMilliseconds(utcEpochMilliseconds(e.o.t, e.o.u, e.o.T, e.p.D, e.p.I, e.p.O, e.p.F)), 1e3 * e.p.S + e.p.$);
2103
2102
  }
2104
2103
  function epochDaysToIsoDate(e) {
2105
- const t = new Date(modFloor(e, c) * r);
2104
+ const t = new Date(modFloor(e, s) * r);
2106
2105
  return {
2107
- t: t.getUTCFullYear() + 400 * divFloor(e, c),
2106
+ t: t.getUTCFullYear() + 400 * divFloor(e, s),
2108
2107
  u: t.getUTCMonth() + 1,
2109
2108
  T: t.getUTCDate()
2110
2109
  };
2111
2110
  }
2112
2111
  function isoDateTimeToFields(e, t) {
2113
2112
  return createNullPrototypeObject({
2114
- ...isoDateToFields(e, t.o, s),
2113
+ ...isoDateToFields(e, t.o, c),
2115
2114
  [Ft.D]: t.p.D,
2116
2115
  [Ft.I]: t.p.I,
2117
2116
  [Ft.O]: t.p.O,
@@ -2121,7 +2120,7 @@ function isoDateTimeToFields(e, t) {
2121
2120
  });
2122
2121
  }
2123
2122
  function getInternalSlotOrThrowForDateTimeFormat(e) {
2124
- const t = Nt.get(e);
2123
+ const t = Rt.get(e);
2125
2124
  return t || throwTypeError(he), t;
2126
2125
  }
2127
2126
  function formatDateTime(e, t) {
@@ -2136,19 +2135,19 @@ function dateStyleToMonthStyle(e) {
2136
2135
  }
2137
2136
  function amendOptionsForPlainDate(e) {
2138
2137
  const t = createNullPrototypeObject(e);
2139
- return hasAnyOptions(e, Zt) || (hasAnyOptions(e, $t) && throwTypeError(Te), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...$t, "timeZoneName"]), t.timeZone = "UTC", t;
2138
+ return hasAnyOptions(e, Nt) || (hasAnyOptions(e, Zt) && throwTypeError(Te), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Zt, "timeZoneName"]), t.timeZone = "UTC", t;
2140
2139
  }
2141
2140
  function amendOptionsForPlainTime(e) {
2142
2141
  const t = createNullPrototypeObject(e);
2143
- return hasAnyOptions(e, $t) || (hasAnyOptions(e, Zt) && throwTypeError(Te), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
2144
- ...Zt,
2142
+ return hasAnyOptions(e, Zt) || (hasAnyOptions(e, Nt) && throwTypeError(Te), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
2143
+ ...Nt,
2145
2144
  "era",
2146
2145
  "timeZoneName"
2147
2146
  ]), t.timeZone = "UTC", t;
2148
2147
  }
2149
2148
  function amendOptionsForPlainDateTime(e) {
2150
2149
  const t = createNullPrototypeObject(e);
2151
- return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...Zt, ...$t]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
2150
+ return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...Nt, ...Zt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
2152
2151
  }
2153
2152
  function amendOptionsForPlainYearMonth(e) {
2154
2153
  const t = createNullPrototypeObject(e);
@@ -2156,8 +2155,8 @@ function amendOptionsForPlainYearMonth(e) {
2156
2155
  "year",
2157
2156
  "month",
2158
2157
  "dateStyle"
2159
- ]) || (hasAnyOptions(e, [...Zt, ...$t]) && throwTypeError(Te), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
2160
- ...$t,
2158
+ ]) || (hasAnyOptions(e, [...Nt, ...Zt]) && throwTypeError(Te), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
2159
+ ...Zt,
2161
2160
  "day",
2162
2161
  "weekday",
2163
2162
  "timeZoneName"
@@ -2169,8 +2168,8 @@ function amendOptionsForPlainMonthDay(e) {
2169
2168
  "month",
2170
2169
  "day",
2171
2170
  "dateStyle"
2172
- ]) || (hasAnyOptions(e, [...Zt, ...$t]) && throwTypeError(Te), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
2173
- ...$t,
2171
+ ]) || (hasAnyOptions(e, [...Nt, ...Zt]) && throwTypeError(Te), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
2172
+ ...Zt,
2174
2173
  "era",
2175
2174
  "year",
2176
2175
  "weekday",
@@ -2179,48 +2178,25 @@ function amendOptionsForPlainMonthDay(e) {
2179
2178
  }
2180
2179
  function amendOptionsForInstant(e) {
2181
2180
  const t = createNullPrototypeObject(e);
2182
- return hasAnyOptions(e, [...Zt, ...$t]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
2181
+ return hasAnyOptions(e, [...Nt, ...Zt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
2183
2182
  }
2184
2183
  function hasAnyOptions(e, t) {
2185
2184
  return t.some((t) => void 0 !== e[t]);
2186
2185
  }
2187
- function createDateTimeFormat(e, t = createNullPrototypeObject({}), o, n, r = Object.create(Yt.prototype)) {
2186
+ function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n, r = Object.create(Ct.prototype)) {
2188
2187
  null === t && throwTypeError(Te);
2189
- const a = ((e, t) => {
2190
- const o = createNullPrototypeObject({});
2191
- for (const n of t) o[n] = e[n];
2192
- return o;
2193
- })(Object(t), Rt);
2194
- a.hour12 = mapUnlessUndefined(a.hour12, toBoolean);
2195
- for (const e of [
2196
- "hourCycle",
2197
- "formatMatcher",
2198
- "era",
2199
- "year",
2200
- "month",
2201
- "day",
2202
- "weekday"
2203
- ]) mapUnlessUndefined(a[e], toString);
2204
- void 0 !== n && (void 0 !== a.timeZone && throwTypeError("disallowed field: timeZone"), a.timeZone = n, hasAnyOptions(a, [
2188
+ const a = createNullPrototypeObject();
2189
+ let i = new Pt(e, new Proxy(Object(t), { get(e, t) {
2190
+ const o = e[t];
2191
+ return "timeZone" === t && void 0 !== n ? (void 0 !== o && throwTypeError("disallowed field: timeZone"), a[t] = n) : void 0 === o ? o : a[t] = "hour12" === t ? ((e) => !!e)(o) : "fractionalSecondDigits" === t ? Se(o) : toString(o);
2192
+ } }));
2193
+ return (o === c && a.timeStyle || o === l && a.dateStyle) && throwTypeError(Te), a.calendar = i.resolvedOptions().calendar, void 0 === n || hasAnyOptions(a, [
2194
+ ...Nt,
2205
2195
  ...Zt,
2206
- ...$t,
2207
2196
  "timeZoneName"
2208
- ]) || (a.timeZoneName = "short"));
2209
- const i = new Pt(e, a), c = i.resolvedOptions(), d = createNullPrototypeObject(c);
2210
- for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
2211
- for (const e of [
2212
- "hour12",
2213
- "hourCycle",
2214
- "formatMatcher",
2215
- "era",
2216
- "year",
2217
- "month",
2218
- "day",
2219
- "weekday"
2220
- ]) d[e] = a[e];
2221
- return d.timeZone = c.timeZone, d.calendar = c.calendar, (o === s && d.timeStyle || o === l && d.dateStyle) && throwTypeError(Te), Nt.set(r, createNullPrototypeObject({
2197
+ ]) || (a.timeZoneName = "short", i = new Pt(i.resolvedOptions().locale, a)), Rt.set(r, createNullPrototypeObject({
2222
2198
  Pe: i,
2223
- Re: d,
2199
+ Re: a,
2224
2200
  Ne: i.resolvedOptions().locale
2225
2201
  })), r;
2226
2202
  }
@@ -2243,7 +2219,7 @@ function handleDateTimeValue(e, t) {
2243
2219
  return isPlainTime(t) ? [e.Ze ||= new Pt(e.Ne, amendOptionsForPlainTime(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.Y !== e.Re.calendar && "iso8601" !== o.Y && throwRangeError(De), [e.Ye ||= new Pt(e.Ne, amendOptionsForPlainDate(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.Y !== e.Re.calendar && "iso8601" !== n.Y && throwRangeError(De), [e.Ce ||= new Pt(e.Ne, amendOptionsForPlainDateTime(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.Y !== e.Re.calendar && throwRangeError(De), [e.Ue ||= new Pt(e.Ne, amendOptionsForPlainYearMonth(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.Y !== e.Re.calendar && throwRangeError(De), [e.je ||= new Pt(e.Ne, amendOptionsForPlainMonthDay(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.We ||= new Pt(e.Ne, amendOptionsForInstant(e.Re)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).U)] : (isZonedDateTime(t) && throwTypeError(fe), [e.Pe, t]);
2244
2220
  }
2245
2221
  function DateTimeFormat(e, t) {
2246
- return new Yt(e, t);
2222
+ return new Ct(e, t);
2247
2223
  }
2248
2224
  function createTemporalInstant(e, t = Object.create(Wt.prototype)) {
2249
2225
  return jt.set(t, { U: e }), t;
@@ -2309,7 +2285,7 @@ function systemUtcEpochNanoseconds() {
2309
2285
  function systemDateTime(e = systemTimeZoneIdentifier()) {
2310
2286
  return getIsoDateTimeForZonedDateTimeSlot(createZonedDateTimeSlot(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"));
2311
2287
  }
2312
- const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, c = 146097, s = Symbol(), l = Symbol(), d = Symbol(), m = Symbol(), u = Symbol(), T = Symbol(), D = Symbol(), h = "constrain", p = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", F = Symbol(), S = Symbol(), y = Symbol(), w = "ceil", v = "floor", E = "expand", M = "trunc", b = "halfCeil", P = "halfFloor", R = "halfExpand", N = "halfTrunc", Z = "halfEven", $ = "auto", C = "always", Y = "never", U = "critical", j = "auto", W = "never", A = "auto", L = "never", k = "critical", z = 0, V = 1, x = 2, H = 3, q = 4, B = 5, J = 6, G = 9, _ = 0, K = 1, X = 2, Q = 3, ee = 4, te = 5, oe = 6, ne = 7, re = 8, ae = 9, ie = [
2288
+ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, s = 146097, c = Symbol(), l = Symbol(), d = Symbol(), m = Symbol(), u = Symbol(), T = Symbol(), D = Symbol(), h = "constrain", p = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", F = Symbol(), S = Symbol(), y = Symbol(), w = "ceil", v = "floor", E = "expand", M = "trunc", b = "halfCeil", P = "halfFloor", R = "halfExpand", N = "halfTrunc", Z = "halfEven", $ = "auto", C = "always", Y = "never", U = "critical", j = "auto", W = "never", A = "auto", L = "never", k = "critical", z = 0, V = 1, x = 2, H = 3, q = 4, B = 5, J = 6, G = 9, _ = 0, K = 1, X = 2, Q = 3, ee = 4, te = 5, oe = 6, ne = 7, re = 8, ae = 9, ie = [
2313
2289
  "year",
2314
2290
  "month",
2315
2291
  "week",
@@ -2320,7 +2296,7 @@ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11,
2320
2296
  "millisecond",
2321
2297
  "microsecond",
2322
2298
  "nanosecond"
2323
- ], ce = ie.map((e) => `${e}s`), se = [
2299
+ ], se = ie.map((e) => `${e}s`), ce = [
2324
2300
  i,
2325
2301
  o,
2326
2302
  t,
@@ -2397,7 +2373,7 @@ var Me = class {
2397
2373
  return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ae;
2398
2374
  }
2399
2375
  get weekOfYear() {
2400
- return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie.ce;
2376
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie.se;
2401
2377
  }
2402
2378
  get yearOfWeek() {
2403
2379
  return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie.t;
@@ -2407,7 +2383,7 @@ var Me = class {
2407
2383
  return timeDurationToSubsecondsNumber(differenceEpochNanoseconds(getStartOfDay(e.P, t), getStartOfDay(e.P, addDaysToIsoDate(t, 1))), -9) / o;
2408
2384
  }
2409
2385
  get daysInWeek() {
2410
- return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).se;
2386
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ce;
2411
2387
  }
2412
2388
  get daysInMonth() {
2413
2389
  return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).le;
@@ -2445,8 +2421,8 @@ var Me = class {
2445
2421
  Ft.S,
2446
2422
  Ft.$,
2447
2423
  Ft.M
2448
- ])), i = getOptionsObject(t), c = getTemporalDisambiguationOption(i), s = getTemporalOffsetOption(i, I), l = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.Y, a, l);
2449
- return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, F, parseDateTimeUtcOffset(a[Ft.M]), o.P, c, s, !0), o.P, o.Y);
2424
+ ])), i = getOptionsObject(t), s = getTemporalDisambiguationOption(i), c = getTemporalOffsetOption(i, I), l = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.Y, a, l);
2425
+ return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, F, parseDateTimeUtcOffset(a[Ft.M]), o.P, s, c, !0), o.P, o.Y);
2450
2426
  }
2451
2427
  withPlainTime(e = void 0) {
2452
2428
  const t = getInternalSlotOrThrowForZonedDateTime(this), o = getIsoDateTimeForZonedDateTimeSlot(t);
@@ -2480,22 +2456,22 @@ var Me = class {
2480
2456
  const e = getStartOfDay(t.P, i.o), o = getStartOfDay(t.P, addDaysToIsoDate(i.o, 1));
2481
2457
  return createTemporalZonedDateTime(addNanosecondsToEpochSeconds(e, roundNumberToIncrement(timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, t.U), -9), timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, o), -9), r)), t.P, t.Y);
2482
2458
  }
2483
- const c = roundIsoDateTime(i, n, a, r), s = getOffsetNanosecondsForZonedDateTimeSlot(t);
2484
- return createTemporalZonedDateTime(interpretISODateTimeOffset(c.o, c.p, F, s, t.P, g, I, !0), t.P, t.Y);
2459
+ const s = roundIsoDateTime(i, n, a, r), c = getOffsetNanosecondsForZonedDateTimeSlot(t);
2460
+ return createTemporalZonedDateTime(interpretISODateTimeOffset(s.o, s.p, F, c, t.P, g, I, !0), t.P, t.Y);
2485
2461
  }
2486
2462
  equals(e) {
2487
2463
  const t = getInternalSlotOrThrowForZonedDateTime(this), o = toTemporalZonedDateTime(e);
2488
2464
  return !compareEpochNanoseconds(t.U, o.U) && timeZoneEquals(t.P, o.P) && calendarEquals(t.Y, o.Y);
2489
2465
  }
2490
2466
  toString(e = void 0) {
2491
- const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [j, W], j))(o), i = getRoundingModeOption(o, M), c = getTemporalUnitValuedOption(o, "smallestUnit", void 0), s = ((e) => getOption(e, "timeZoneName", [
2467
+ const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [j, W], j))(o), i = getRoundingModeOption(o, M), s = getTemporalUnitValuedOption(o, "smallestUnit", void 0), c = ((e) => getOption(e, "timeZoneName", [
2492
2468
  A,
2493
2469
  L,
2494
2470
  k
2495
2471
  ], A))(o);
2496
- validateTemporalUnitValue(c, l), c === q && throwRangeError(invalidField("smallestUnit"));
2497
- const d = toSecondsStringPrecisionRecord(c, r);
2498
- return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.Ee, d.ve, i);
2472
+ validateTemporalUnitValue(s, l), s === q && throwRangeError(invalidField("smallestUnit"));
2473
+ const d = toSecondsStringPrecisionRecord(s, r);
2474
+ return temporalZonedDateTimeToString(t, d.$e, n, c, a, d.Ee, d.ve, i);
2499
2475
  }
2500
2476
  toLocaleString(e = void 0, t = void 0) {
2501
2477
  const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, d, o.P), r = getInternalSlotOrThrowForDateTimeFormat(n);
@@ -2537,9 +2513,9 @@ var Me = class {
2537
2513
  }
2538
2514
  };
2539
2515
  defineStringTag(Me.prototype, "Temporal.ZonedDateTime"), renameFunction(Me, "ZonedDateTime");
2540
- const be = createNullPrototypeObject({}), Pe = createNullPrototypeObject({}), Re = /* @__PURE__ */ new WeakMap();
2516
+ const be = createNullPrototypeObject(), Pe = createNullPrototypeObject(), Re = /* @__PURE__ */ new WeakMap();
2541
2517
  var Ne = class {
2542
- constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
2518
+ constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, s = 0, c = 0, l = "iso8601") {
2543
2519
  const d = [
2544
2520
  e,
2545
2521
  t,
@@ -2549,8 +2525,8 @@ var Ne = class {
2549
2525
  r,
2550
2526
  a,
2551
2527
  i,
2552
- c,
2553
- s
2528
+ s,
2529
+ c
2554
2530
  ].map(toIntegerWithTruncation);
2555
2531
  validateString(l);
2556
2532
  const u = canonicalizeCalendar(l);
@@ -2617,7 +2593,7 @@ var Ne = class {
2617
2593
  }
2618
2594
  get weekOfYear() {
2619
2595
  const e = getInternalSlotOrThrowForPlainDateTime(this);
2620
- return calendarIsoToDate(e.Y, e._.o).ie.ce;
2596
+ return calendarIsoToDate(e.Y, e._.o).ie.se;
2621
2597
  }
2622
2598
  get yearOfWeek() {
2623
2599
  const e = getInternalSlotOrThrowForPlainDateTime(this);
@@ -2625,7 +2601,7 @@ var Ne = class {
2625
2601
  }
2626
2602
  get daysInWeek() {
2627
2603
  const e = getInternalSlotOrThrowForPlainDateTime(this);
2628
- return calendarIsoToDate(e.Y, e._.o).se;
2604
+ return calendarIsoToDate(e.Y, e._.o).ce;
2629
2605
  }
2630
2606
  get daysInMonth() {
2631
2607
  const e = getInternalSlotOrThrowForPlainDateTime(this);
@@ -2690,8 +2666,8 @@ var Ne = class {
2690
2666
  toString(e = void 0) {
2691
2667
  const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, M), i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2692
2668
  validateTemporalUnitValue(i, l), i === q && throwRangeError(invalidField("smallestUnit"));
2693
- const c = toSecondsStringPrecisionRecord(i, r);
2694
- return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, c.Ee, c.ve, a)), t.Y, c.$e, n);
2669
+ const s = toSecondsStringPrecisionRecord(i, r);
2670
+ return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, s.Ee, s.ve, a)), t.Y, s.$e, n);
2695
2671
  }
2696
2672
  toLocaleString(e = void 0, t = void 0) {
2697
2673
  return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, d), this);
@@ -2818,13 +2794,13 @@ const Ce = "\\d{4}|[-+]\\d{6}", Ye = "0[1-9]|1[0-2]", Ue = "0[1-9]|[12]\\d|30|31
2818
2794
  Ae,
2819
2795
  `[ tT]${Le}`,
2820
2796
  He
2821
- ])}${Be}${_e}`), Qe = createRegExp(`${ze}(?:${Be})?${_e}`), et = createRegExp(`${Ae}[ tT]${Le}(?:${He})(?:${Be})?${_e}`), tt = createRegExp(`(${Ae}[ tT]|[tT]?)${Le}(?<h>${ke})?(?:${Be})?${_e}`), ot = createRegExp(`(${ze}|${xe})(?:${Be})?${_e}`), nt = createRegExp(`(${ze}|${Ve})(?:${Be})?${_e}`), rt = [createRegExp(`${xe}(${Be})?(${Ge})*`), createRegExp(`${Ve}(${Be})?(${Ge})*`)], at = createRegExp(qe), it = createRegExp(Je), ct = createRegExp(ke), st = /* @__PURE__ */ new WeakMap();
2797
+ ])}${Be}${_e}`), Qe = createRegExp(`${ze}(?:${Be})?${_e}`), et = createRegExp(`${Ae}[ tT]${Le}(?:${He})(?:${Be})?${_e}`), tt = createRegExp(`(${Ae}[ tT]|[tT]?)${Le}(?<h>${ke})?(?:${Be})?${_e}`), ot = createRegExp(`(${ze}|${xe})(?:${Be})?${_e}`), nt = createRegExp(`(${ze}|${Ve})(?:${Be})?${_e}`), rt = [createRegExp(`${xe}(${Be})?(${Ge})*`), createRegExp(`${Ve}(${Be})?(${Ge})*`)], at = createRegExp(qe), it = createRegExp(Je), st = createRegExp(ke), ct = /* @__PURE__ */ new WeakMap();
2822
2798
  var lt = class {
2823
2799
  constructor(e, t, o = "iso8601", n = 1972) {
2824
2800
  const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
2825
2801
  validateString(o);
2826
- const i = canonicalizeCalendar(o), c = toIntegerWithTruncation(n);
2827
- isValidIsoDate(c, r, a) || throwRangeError(de), createTemporalMonthDay(createIsoDateRecord(c, r, a), i, this);
2802
+ const i = canonicalizeCalendar(o), s = toIntegerWithTruncation(n);
2803
+ isValidIsoDate(s, r, a) || throwRangeError(de), createTemporalMonthDay(createIsoDateRecord(s, r, a), i, this);
2828
2804
  }
2829
2805
  static from(e, t = void 0) {
2830
2806
  return toTemporalMonthDay(e, t);
@@ -2857,7 +2833,7 @@ var lt = class {
2857
2833
  return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
2858
2834
  }
2859
2835
  toLocaleString(e = void 0, t = void 0) {
2860
- return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t, s), this);
2836
+ return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t, c), this);
2861
2837
  }
2862
2838
  toJSON() {
2863
2839
  return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), $);
@@ -2876,8 +2852,8 @@ var mt = class {
2876
2852
  constructor(e, t, o = "iso8601", n = 1) {
2877
2853
  const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
2878
2854
  validateString(o);
2879
- const i = canonicalizeCalendar(o), c = toIntegerWithTruncation(n);
2880
- isValidIsoDate(r, a, c) || throwRangeError(de), createTemporalYearMonth(createIsoDateRecord(r, a, c), i, this);
2855
+ const i = canonicalizeCalendar(o), s = toIntegerWithTruncation(n);
2856
+ isValidIsoDate(r, a, s) || throwRangeError(de), createTemporalYearMonth(createIsoDateRecord(r, a, s), i, this);
2881
2857
  }
2882
2858
  static from(e, t = void 0) {
2883
2859
  return toTemporalYearMonth(e, t);
@@ -2954,7 +2930,7 @@ var mt = class {
2954
2930
  return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
2955
2931
  }
2956
2932
  toLocaleString(e = void 0, t = void 0) {
2957
- return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t, s), this);
2933
+ return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t, c), this);
2958
2934
  }
2959
2935
  toJSON() {
2960
2936
  return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), $);
@@ -2973,8 +2949,8 @@ var Tt = class {
2973
2949
  constructor(e, t, o, n = "iso8601") {
2974
2950
  const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t), i = toIntegerWithTruncation(o);
2975
2951
  validateString(n);
2976
- const c = canonicalizeCalendar(n);
2977
- isValidIsoDate(r, a, i) || throwRangeError(de), createTemporalDate(createIsoDateRecord(r, a, i), c, this);
2952
+ const s = canonicalizeCalendar(n);
2953
+ isValidIsoDate(r, a, i) || throwRangeError(de), createTemporalDate(createIsoDateRecord(r, a, i), s, this);
2978
2954
  }
2979
2955
  static from(e, t = void 0) {
2980
2956
  return toTemporalDate(e, t);
@@ -3019,7 +2995,7 @@ var Tt = class {
3019
2995
  }
3020
2996
  get weekOfYear() {
3021
2997
  const e = getInternalSlotOrThrowForPlainDate(this);
3022
- return calendarIsoToDate(e.Y, e.o).ie.ce;
2998
+ return calendarIsoToDate(e.Y, e.o).ie.se;
3023
2999
  }
3024
3000
  get yearOfWeek() {
3025
3001
  const e = getInternalSlotOrThrowForPlainDate(this);
@@ -3027,7 +3003,7 @@ var Tt = class {
3027
3003
  }
3028
3004
  get daysInWeek() {
3029
3005
  const e = getInternalSlotOrThrowForPlainDate(this);
3030
- return calendarIsoToDate(e.Y, e.o).se;
3006
+ return calendarIsoToDate(e.Y, e.o).ce;
3031
3007
  }
3032
3008
  get daysInMonth() {
3033
3009
  const e = getInternalSlotOrThrowForPlainDate(this);
@@ -3047,11 +3023,11 @@ var Tt = class {
3047
3023
  }
3048
3024
  toPlainYearMonth() {
3049
3025
  const e = getInternalSlotOrThrowForPlainDate(this);
3050
- return createTemporalYearMonth(calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o, s), h), e.Y);
3026
+ return createTemporalYearMonth(calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o, c), h), e.Y);
3051
3027
  }
3052
3028
  toPlainMonthDay() {
3053
3029
  const e = getInternalSlotOrThrowForPlainDate(this);
3054
- return createTemporalMonthDay(calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o, s), h), e.Y);
3030
+ return createTemporalMonthDay(calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o, c), h), e.Y);
3055
3031
  }
3056
3032
  add(e, t = void 0) {
3057
3033
  return addDurationToDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
@@ -3062,7 +3038,7 @@ var Tt = class {
3062
3038
  with(e, t = void 0) {
3063
3039
  const o = getInternalSlotOrThrowForPlainDate(this);
3064
3040
  validatePartialTemporalObject(e);
3065
- const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, s), prepareCalendarFields(o.Y, e, [
3041
+ const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, c), prepareCalendarFields(o.Y, e, [
3066
3042
  Ft.t,
3067
3043
  Ft.u,
3068
3044
  Ft.v,
@@ -3100,7 +3076,7 @@ var Tt = class {
3100
3076
  return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
3101
3077
  }
3102
3078
  toLocaleString(e = void 0, t = void 0) {
3103
- return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, s), this);
3079
+ return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, c), this);
3104
3080
  }
3105
3081
  toJSON() {
3106
3082
  return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), $);
@@ -3110,7 +3086,7 @@ var Tt = class {
3110
3086
  }
3111
3087
  };
3112
3088
  defineStringTag(Tt.prototype, "Temporal.PlainDate"), renameFunction(Tt, "PlainDate");
3113
- const Dt = createNullPrototypeObject({}), ht = {
3089
+ const Dt = createNullPrototypeObject(), ht = {
3114
3090
  chinese: createLruCache(2e3),
3115
3091
  dangi: createLruCache(2e3)
3116
3092
  }, pt = {
@@ -3191,7 +3167,7 @@ const Dt = createNullPrototypeObject({}), ht = {
3191
3167
  [Ft.P]: [toTemporalTimeZoneIdentifier]
3192
3168
  }, wt = /* @__PURE__ */ new WeakMap(), vt = signTimeDuration;
3193
3169
  var Et = class {
3194
- constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = 0) {
3170
+ constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, s = 0, c = 0, l = 0) {
3195
3171
  createTemporalDuration(createTemporalDurationSlot([
3196
3172
  e,
3197
3173
  t,
@@ -3200,8 +3176,8 @@ var Et = class {
3200
3176
  r,
3201
3177
  a,
3202
3178
  i,
3203
- c,
3204
3179
  s,
3180
+ c,
3205
3181
  l
3206
3182
  ].map(toIntegerIfIntegral)), this);
3207
3183
  }
@@ -3211,9 +3187,9 @@ var Et = class {
3211
3187
  static compare(e, t, o = void 0) {
3212
3188
  const n = toTemporalDuration(e), r = toTemporalDuration(t), a = getTemporalRelativeToOption(getOptionsObject(o));
3213
3189
  if (n.every((e, t) => r[t] === e)) return 0;
3214
- const i = defaultTemporalLargestUnit(n), c = defaultTemporalLargestUnit(r), s = toInternalDurationRecord(n), l = toInternalDurationRecord(r);
3190
+ const i = defaultTemporalLargestUnit(n), s = defaultTemporalLargestUnit(r), c = toInternalDurationRecord(n), l = toInternalDurationRecord(r);
3215
3191
  let d, m;
3216
- return a.Me && (isDateUnit(i) || isDateUnit(c)) ? compareEpochNanoseconds(addZonedDateTime(a.Me, s, h), addZonedDateTime(a.Me, l, h)) : (isCalendarUnit(i) || isCalendarUnit(c) ? (a.be || throwRangeError(missingField("relativeTo")), d = dateDurationDays(s.A, a.be), m = dateDurationDays(l.A, a.be)) : (d = n[Q], m = r[Q]), ve(add24HourDaysToTimeDuration(s.p, d), add24HourDaysToTimeDuration(l.p, m)));
3192
+ return a.Me && (isDateUnit(i) || isDateUnit(s)) ? compareEpochNanoseconds(addZonedDateTime(a.Me, c, h), addZonedDateTime(a.Me, l, h)) : (isCalendarUnit(i) || isCalendarUnit(s) ? (a.be || throwRangeError(missingField("relativeTo")), d = dateDurationDays(c.A, a.be), m = dateDurationDays(l.A, a.be)) : (d = n[Q], m = r[Q]), ve(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(l.p, m)));
3217
3193
  }
3218
3194
  get years() {
3219
3195
  return getInternalSlotOrThrowForDuration(this)[_];
@@ -3271,19 +3247,19 @@ var Et = class {
3271
3247
  const t = getInternalSlotOrThrowForDuration(this), o = getRoundToOptionsObject(e);
3272
3248
  let n = getTemporalUnitValuedOption(o, "largestUnit", void 0);
3273
3249
  const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o, R);
3274
- let c = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3275
- validateTemporalUnitValue(c, d);
3276
- const s = void 0 !== c;
3277
- c ??= G;
3278
- const l = defaultTemporalLargestUnit(t), m = largerOfTwoTemporalUnits(l, c), u = void 0 !== n;
3279
- if (void 0 !== n && "auto" !== n || (n = m), (!s && !u || n > c) && throwRangeError(pe), isDateUnit(c) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1), a > 1 && n !== c && isDateUnit(c) && throwRangeError(pe), r.Me) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.Me, createZonedDateTimeSlot(addZonedDateTime(r.Me, toInternalDurationRecord(t), h), r.Me.P, r.Me.Y), n, a, c, i), isDateUnit(n) ? q : n));
3250
+ let s = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3251
+ validateTemporalUnitValue(s, d);
3252
+ const c = void 0 !== s;
3253
+ s ??= G;
3254
+ const l = defaultTemporalLargestUnit(t), m = largerOfTwoTemporalUnits(l, s), u = void 0 !== n;
3255
+ if (void 0 !== n && "auto" !== n || (n = m), (!c && !u || n > s) && throwRangeError(pe), isDateUnit(s) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(s), !1), a > 1 && n !== s && isDateUnit(s) && throwRangeError(pe), r.Me) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.Me, createZonedDateTimeSlot(addZonedDateTime(r.Me, toInternalDurationRecord(t), h), r.Me.P, r.Me.Y), n, a, s, i), isDateUnit(n) ? q : n));
3280
3256
  if (r.be) {
3281
3257
  const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
3282
- return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.be.Y, r.be.o, adjustDateDurationRecord(e.A, o.K), h), o), r.be.Y, n, a, c, i), n));
3258
+ return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.be.Y, r.be.o, adjustDateDurationRecord(e.A, o.K), h), o), r.be.Y, n, a, s, i), n));
3283
3259
  }
3284
3260
  (isCalendarUnit(l) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
3285
3261
  const T = toInternalDurationRecordWith24HourDays(t);
3286
- return createTemporalDuration(temporalDurationFromInternal(c === H ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(T.p, a, i)[0]), createTimeDurationFromSeconds(0)) : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(T.p, a, c, i)), n));
3262
+ return createTemporalDuration(temporalDurationFromInternal(s === H ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(T.p, a, i)[0]), createTimeDurationFromSeconds(0)) : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(T.p, a, s, i)), n));
3287
3263
  }
3288
3264
  total(e) {
3289
3265
  const t = getInternalSlotOrThrowForDuration(this);
@@ -3301,15 +3277,15 @@ var Et = class {
3301
3277
  validateTemporalUnitValue(a, l), a !== q && a !== B || throwRangeError(disallowedUnit(a));
3302
3278
  const i = toSecondsStringPrecisionRecord(a, n);
3303
3279
  if (i.ve === G && 1 === i.Ee) return temporalDurationToString(t, i.$e);
3304
- const c = toInternalDurationRecord(t);
3305
- return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.Ee, i.ve, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.$e);
3280
+ const s = toInternalDurationRecord(t);
3281
+ return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(s.A, roundTimeDuration(s.p, i.Ee, i.ve, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.$e);
3306
3282
  }
3307
3283
  toJSON() {
3308
3284
  return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
3309
3285
  }
3310
3286
  toLocaleString(e = void 0, t = void 0) {
3311
- const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject({});
3312
- return ce.map((e, t) => {
3287
+ const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject();
3288
+ return se.map((e, t) => {
3313
3289
  n[e] = o[t];
3314
3290
  }), new Intl.DurationFormat(e, t).format(n);
3315
3291
  }
@@ -3338,17 +3314,13 @@ const Mt = {
3338
3314
  [R]: roundHalfCeil,
3339
3315
  [N]: roundHalfFloor,
3340
3316
  [Z]: roundHalfEven
3341
- }, Pt = globalThis.Intl.DateTimeFormat, Rt = [];
3342
- new Pt(void 0, new Proxy({}, { get(e, t) {
3343
- Rt.push(t);
3344
- } }));
3345
- const Nt = /* @__PURE__ */ new WeakMap(), Zt = [
3317
+ }, Pt = globalThis.Intl.DateTimeFormat, Rt = /* @__PURE__ */ new WeakMap(), Nt = [
3346
3318
  "year",
3347
3319
  "month",
3348
3320
  "day",
3349
3321
  "weekday",
3350
3322
  "dateStyle"
3351
- ], $t = [
3323
+ ], Zt = [
3352
3324
  "hour",
3353
3325
  "minute",
3354
3326
  "second",
@@ -3356,16 +3328,16 @@ const Nt = /* @__PURE__ */ new WeakMap(), Zt = [
3356
3328
  "dayPeriod",
3357
3329
  "timeStyle"
3358
3330
  ];
3359
- var Ct = class {
3331
+ var $t = class {
3360
3332
  Ae(e) {
3361
3333
  return formatDateTime(this, e);
3362
3334
  }
3363
- }, Yt = class {
3335
+ }, Ct = class {
3364
3336
  constructor(e, t) {
3365
3337
  createDateTimeFormat(e, t, d, void 0, this);
3366
3338
  }
3367
3339
  get format() {
3368
- return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||= Ct.prototype.Ae.bind(this), "name", { value: "" });
3340
+ return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||= $t.prototype.Ae.bind(this), "name", { value: "" });
3369
3341
  }
3370
3342
  formatToParts(e) {
3371
3343
  return ((e, t) => {
@@ -3393,8 +3365,10 @@ var Ct = class {
3393
3365
  return getInternalSlotOrThrowForDateTimeFormat(this).Pe.resolvedOptions();
3394
3366
  }
3395
3367
  };
3396
- const Ut = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
3397
- Ut.prototype.value = Yt.prototype, Object.defineProperties(DateTimeFormat, Ut), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
3368
+ const Yt = Object.getOwnPropertyDescriptors(Pt), Ut = Ct.prototype;
3369
+ Yt.prototype.value = Ut;
3370
+ for (const e of ["formatRange", "formatRangeToParts"]) Pt.prototype[e] || delete Ut[e];
3371
+ Object.defineProperties(DateTimeFormat, Yt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
3398
3372
  const jt = /* @__PURE__ */ new WeakMap();
3399
3373
  var Wt = class {
3400
3374
  constructor(e) {
@@ -3440,8 +3414,8 @@ var Wt = class {
3440
3414
  toString(e = void 0) {
3441
3415
  const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0), i = o.timeZone;
3442
3416
  validateTemporalUnitValue(a, l), a === q && throwRangeError(invalidField("smallestUnit"));
3443
- const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), s = toSecondsStringPrecisionRecord(a, n);
3444
- return temporalInstantToString(roundTemporalInstant(t.U, s.Ee, s.ve, r), c, s.$e);
3417
+ const s = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), c = toSecondsStringPrecisionRecord(a, n);
3418
+ return temporalInstantToString(roundTemporalInstant(t.U, c.Ee, c.ve, r), s, c.$e);
3445
3419
  }
3446
3420
  toLocaleString(e = void 0, t = void 0) {
3447
3421
  return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, d), this);