temporal-polyfill-lite 0.4.3 → 1.0.1
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.
- package/CHANGELOG.md +45 -24
- package/README.md +2 -2
- package/dist/calendars/global.js +1 -1
- package/dist/calendars/index.js +1 -2
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-BU-7y4gA.js → src-BZzXXJ4p.js} +250 -266
- package/dist/global.js +1 -1
- package/dist/index.js +1 -2
- package/dist/shim.js +1 -1
- package/dist/{src-sQY-gZ2P.js → src-BWXhKwwe.js} +60 -73
- package/package.json +1 -1
|
@@ -191,8 +191,8 @@ function divideTimeDurationToFloatingPoint(e, t) {
|
|
|
191
191
|
function interpretISODateTimeOffset(e, t, o, n, r, a, i, c) {
|
|
192
192
|
if (!t) return getStartOfDay(r, e);
|
|
193
193
|
const s = combineIsoDateAndTimeRecord(e, t);
|
|
194
|
-
if (o === ne || o === te && "ignore"
|
|
195
|
-
if (o === oe || o === te && "use"
|
|
194
|
+
if (o === ne || o === te && "ignore" === i) return getEpochNanosecondsFor(r, s, a);
|
|
195
|
+
if (o === oe || o === te && "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)));
|
|
196
196
|
((e) => {
|
|
197
197
|
Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(P);
|
|
198
198
|
})(e);
|
|
@@ -213,19 +213,19 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
213
213
|
}
|
|
214
214
|
i = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
215
215
|
const l = prepareCalendarFields(i, e, [
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
], [
|
|
216
|
+
wt.t,
|
|
217
|
+
wt.u,
|
|
218
|
+
wt.v,
|
|
219
|
+
wt.T,
|
|
220
|
+
wt.D,
|
|
221
|
+
wt.I,
|
|
222
|
+
wt.O,
|
|
223
|
+
wt.F,
|
|
224
|
+
wt.S,
|
|
225
|
+
wt.$,
|
|
226
|
+
wt.M,
|
|
227
|
+
wt.P
|
|
228
|
+
], [wt.P]);
|
|
229
229
|
o = l.timeZone, n = l.offset;
|
|
230
230
|
const d = getOptionsObject(t);
|
|
231
231
|
r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d, X);
|
|
@@ -267,7 +267,7 @@ function differenceZonedDateTime(e, t, o) {
|
|
|
267
267
|
const r = getIsoDateTimeForZonedDateTimeSlot(e), a = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
268
268
|
if (!compareIsoDate(r.o, a.o)) return combineDateAndTimeDuration(zeroDateDuration(), timeDurationFromEpochNanosecondsDifference(t.U, e.U));
|
|
269
269
|
let i, c = differenceTime(r.p, a.p);
|
|
270
|
-
for (let o =
|
|
270
|
+
for (let o = bt(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)), bt(c) === n); o++);
|
|
271
271
|
return combineDateAndTimeDuration(calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, d)), c);
|
|
272
272
|
}
|
|
273
273
|
function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
|
|
@@ -350,7 +350,7 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
|
350
350
|
return n || a.B(r, s), s;
|
|
351
351
|
}
|
|
352
352
|
function getFormatterForTimeZone(e) {
|
|
353
|
-
return Re[e] ||= new
|
|
353
|
+
return Re[e] ||= new Zt("en-u-hc-h23", {
|
|
354
354
|
timeZone: e,
|
|
355
355
|
year: "numeric",
|
|
356
356
|
month: "numeric",
|
|
@@ -369,17 +369,17 @@ function bisectOffsetTransition(e, t, o) {
|
|
|
369
369
|
}
|
|
370
370
|
return a;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
return e < -85e7 ?
|
|
372
|
+
function windowDaysForEpoch(e) {
|
|
373
|
+
return e < -85e7 ? 21 : isWithin(e, -77e7, 96e7) ? 16 : isWithin(e, 129e7, 179e7) ? 27 : 6.5;
|
|
374
374
|
}
|
|
375
|
-
function searchTimeZoneTransition(e, t, o,
|
|
375
|
+
function searchTimeZoneTransition(e, t, o, r) {
|
|
376
376
|
o = clamp(o, -864e10, 864e10);
|
|
377
|
-
for (let
|
|
377
|
+
for (let a = 172800 * r, i = t, c = t + a; (o - c) * r > 0; a = windowDaysForEpoch(i) * n * r, i = c, c = clamp(c + a, -864e10, 864e10)) if (getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, i, !0) !== getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, c, !0)) return createEpochNanosecondsFromEpochSeconds(r > 0 ? bisectOffsetTransition(e, i, c) : bisectOffsetTransition(e, c, i));
|
|
378
378
|
return null;
|
|
379
379
|
}
|
|
380
380
|
function getAvailableNamedTimeZoneIdentifier(e) {
|
|
381
381
|
return ((e) => {
|
|
382
|
-
/^(?![cemw]et|[emh]st|prc|ro[ck]|uct|utc|gmt)
|
|
382
|
+
/^(?![cemw]et|[emh]st|prc|ro[ck]|uct|utc|gmt)...$|systemv|^u.*w$|^c.*-/i.test(e) && throwRangeError(invalidTimeZone(e));
|
|
383
383
|
})(e = asciiLowerCase(e).replace(/[^/]+/g, (e) => /^(?!etc|yap).{1,3}$|\d/.test(e) ? asciiUpperCase(e) : e.replace(/baja|mc|comod|[a-z]+/g, (e) => {
|
|
384
384
|
return /^(su|gb|nz|in|chat)$/.test(e) ? asciiUpperCase(e) : /^(of|au|es)$/.test(e) ? e : (t = e, t.replace(/^[a-z]/, (e) => e.toUpperCase())).replace(/du(?=r)|n(?=or)|i(?=slan)/, asciiUpperCase);
|
|
385
385
|
var t;
|
|
@@ -444,10 +444,8 @@ function getNamedTimeZoneEpochCandidates(e, t) {
|
|
|
444
444
|
return n === r ? [a] : [a, i].sort(compareEpochNanoseconds);
|
|
445
445
|
}
|
|
446
446
|
function getIsoDateTimeFromOffsetNanoseconds(e, t) {
|
|
447
|
-
return ((e)
|
|
448
|
-
|
|
449
|
-
return combineIsoDateAndTimeRecord(epochDaysToIsoDate(t[0]), balanceTime(0, 0, 0, 0, 0, t[1]));
|
|
450
|
-
})(addNanosecondsToEpochSeconds(e, t));
|
|
447
|
+
return combineIsoDateAndTimeRecord(epochDaysToIsoDate((o = addNanosecondsToEpochSeconds(e, t))[0]), balanceTime(0, 0, 0, 0, 0, o[1]));
|
|
448
|
+
var o;
|
|
451
449
|
}
|
|
452
450
|
function combineIsoDateAndTimeRecord(e, t) {
|
|
453
451
|
return {
|
|
@@ -456,7 +454,7 @@ function combineIsoDateAndTimeRecord(e, t) {
|
|
|
456
454
|
};
|
|
457
455
|
}
|
|
458
456
|
function interpretTemporalDateTimeFields(e, t, o) {
|
|
459
|
-
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[
|
|
457
|
+
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[wt.D], t[wt.I], t[wt.O], t[wt.F], t[wt.S], t[wt.$], o));
|
|
460
458
|
}
|
|
461
459
|
function toTemporalDateTime(e, t) {
|
|
462
460
|
if (isObject(e)) {
|
|
@@ -476,16 +474,16 @@ function toTemporalDateTime(e, t) {
|
|
|
476
474
|
}
|
|
477
475
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
478
476
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o, prepareCalendarFields(o, e, [
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
477
|
+
wt.t,
|
|
478
|
+
wt.u,
|
|
479
|
+
wt.v,
|
|
480
|
+
wt.T,
|
|
481
|
+
wt.D,
|
|
482
|
+
wt.I,
|
|
483
|
+
wt.O,
|
|
484
|
+
wt.F,
|
|
485
|
+
wt.S,
|
|
486
|
+
wt.$
|
|
489
487
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
490
488
|
}
|
|
491
489
|
validateString(e);
|
|
@@ -514,7 +512,7 @@ function roundIsoDateTime(e, t, o, n) {
|
|
|
514
512
|
}
|
|
515
513
|
function differenceISODateTime(e, t, o, n) {
|
|
516
514
|
let r = differenceTime(e.p, t.p);
|
|
517
|
-
const a =
|
|
515
|
+
const a = bt(r);
|
|
518
516
|
let i = t.o;
|
|
519
517
|
a === compareIsoDate(e.o, t.o) && (i = addDaysToIsoDate(i, a), r = add24HourDaysToTimeDuration(r, -a));
|
|
520
518
|
const c = largerOfTwoTemporalUnits(d, n), s = calendarDateUntil(o, e.o, i, c);
|
|
@@ -610,26 +608,22 @@ function createTemporalTime(e, t = Object.create(Ye.prototype)) {
|
|
|
610
608
|
return Ce.set(t, e), t;
|
|
611
609
|
}
|
|
612
610
|
function toTemporalTimeRecord(e, t = !1) {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const r = e[n];
|
|
623
|
-
return void 0 !== r ? (o = !0, toIntegerWithTruncation(r)) : t ? void 0 : 0;
|
|
624
|
-
});
|
|
625
|
-
return o || throwTypeError(U), [
|
|
611
|
+
const o = [
|
|
612
|
+
wt.D,
|
|
613
|
+
wt.S,
|
|
614
|
+
wt.F,
|
|
615
|
+
wt.I,
|
|
616
|
+
wt.$,
|
|
617
|
+
wt.O
|
|
618
|
+
].map((t) => mapUnlessUndefined(e[t], toIntegerWithTruncation));
|
|
619
|
+
return o.some((e) => void 0 !== e) || throwTypeError(U), [
|
|
626
620
|
0,
|
|
627
621
|
3,
|
|
628
622
|
5,
|
|
629
623
|
2,
|
|
630
624
|
1,
|
|
631
625
|
4
|
|
632
|
-
].map((e) =>
|
|
626
|
+
].map((e) => t ? o[e] : o[e] || 0);
|
|
633
627
|
}
|
|
634
628
|
function timeRecordToString(e, t) {
|
|
635
629
|
return formatTimeString(e.D, e.I, e.O, 1e6 * e.F + 1e3 * e.S + e.$, t);
|
|
@@ -638,8 +632,8 @@ function compareTimeRecord(e, t) {
|
|
|
638
632
|
return compare(e.D, t.D) || compare(e.I, t.I) || compare(e.O, t.O) || compare(e.F, t.F) || compare(e.S, t.S) || compare(e.$, t.$);
|
|
639
633
|
}
|
|
640
634
|
function addTime(e, t) {
|
|
641
|
-
const o =
|
|
642
|
-
return
|
|
635
|
+
const o = balanceTime(e.D, e.I, e.O, e.F, e.S, e.$ + t[1]);
|
|
636
|
+
return o.X += t[0], o;
|
|
643
637
|
}
|
|
644
638
|
function roundTime(e, n, r, a) {
|
|
645
639
|
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.$;
|
|
@@ -716,10 +710,10 @@ function toTemporalMonthDay(e, t) {
|
|
|
716
710
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay(o.o, o.Y);
|
|
717
711
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
718
712
|
return createTemporalMonthDay(calendarMonthDayFromFields(n, prepareCalendarFields(n, e, [
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
713
|
+
wt.t,
|
|
714
|
+
wt.u,
|
|
715
|
+
wt.v,
|
|
716
|
+
wt.T
|
|
723
717
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
724
718
|
}
|
|
725
719
|
validateString(e);
|
|
@@ -750,9 +744,9 @@ function toTemporalYearMonth(e, t) {
|
|
|
750
744
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(o.o, o.Y);
|
|
751
745
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
752
746
|
return createTemporalYearMonth(calendarYearMonthFromFields(n, prepareCalendarFields(n, e, [
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
747
|
+
wt.t,
|
|
748
|
+
wt.u,
|
|
749
|
+
wt.v
|
|
756
750
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
757
751
|
}
|
|
758
752
|
validateString(e);
|
|
@@ -792,10 +786,10 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
|
|
|
792
786
|
]));
|
|
793
787
|
const i = calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
794
788
|
...isoDateToFields(t.Y, t.o, H),
|
|
795
|
-
[
|
|
789
|
+
[wt.T]: 1
|
|
796
790
|
}), _), m = calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
797
791
|
...isoDateToFields(t.Y, r.o, H),
|
|
798
|
-
[
|
|
792
|
+
[wt.T]: 1
|
|
799
793
|
}), _);
|
|
800
794
|
let u = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.Y, i, m, a.L), 0, 0), ve);
|
|
801
795
|
if (a.H !== s || 1 !== a.V) {
|
|
@@ -808,7 +802,7 @@ function addDurationToYearMonth(e, t, o, n) {
|
|
|
808
802
|
const r = toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), a = getTemporalOverflowOption(getOptionsObject(n));
|
|
809
803
|
return (r.A.ee || r.A.X || signTimeDuration(r.p)) && throwRangeError("duration can contain only years and months"), createTemporalYearMonth(calendarYearMonthFromFields(t.Y, isoDateToFields(t.Y, calendarDateAdd(t.Y, calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
810
804
|
...isoDateToFields(t.Y, t.o, H),
|
|
811
|
-
[
|
|
805
|
+
[wt.T]: 1
|
|
812
806
|
}), _), r.A, a), H), a), t.Y);
|
|
813
807
|
}
|
|
814
808
|
function validateIsoYearMonth(e) {
|
|
@@ -859,10 +853,10 @@ function toTemporalDate(e, t) {
|
|
|
859
853
|
}
|
|
860
854
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
861
855
|
return createTemporalDate(calendarDateFromFields(o, prepareCalendarFields(o, e, [
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
856
|
+
wt.t,
|
|
857
|
+
wt.u,
|
|
858
|
+
wt.v,
|
|
859
|
+
wt.T
|
|
866
860
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
867
861
|
}
|
|
868
862
|
validateString(e);
|
|
@@ -933,7 +927,7 @@ function calendarDateForPlainDate(e) {
|
|
|
933
927
|
return calendarIsoToDate(t.Y, t.o);
|
|
934
928
|
}
|
|
935
929
|
function formatToParts(e, t) {
|
|
936
|
-
return (pt[e] ||= new
|
|
930
|
+
return (pt[e] ||= new Zt("en", {
|
|
937
931
|
year: "numeric",
|
|
938
932
|
month: "numeric",
|
|
939
933
|
day: "numeric",
|
|
@@ -1009,8 +1003,7 @@ function epochDaysToDate$6(e, t) {
|
|
|
1009
1003
|
},
|
|
1010
1004
|
ae: isoDayOfWeek(epochDaysToIsoDate(t)),
|
|
1011
1005
|
get ie() {
|
|
1012
|
-
|
|
1013
|
-
return t - getNewYear(e, o) + 1;
|
|
1006
|
+
return t - getNewYear(e, yearMonthDay(e, t).t) + 1;
|
|
1014
1007
|
},
|
|
1015
1008
|
ce: {
|
|
1016
1009
|
se: void 0,
|
|
@@ -1158,7 +1151,7 @@ function daysInMonth(e, t) {
|
|
|
1158
1151
|
return t <= 6 ? 31 : 12 !== t || isLeapYear(e) ? 30 : 29;
|
|
1159
1152
|
}
|
|
1160
1153
|
function canonicalizeCalendar(e) {
|
|
1161
|
-
return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" :
|
|
1154
|
+
return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" : yt[e] ? e : throwRangeError(((e) => `unsupported calendar: ${e}`)(e));
|
|
1162
1155
|
}
|
|
1163
1156
|
function calendarDateAdd(e, t, o, n) {
|
|
1164
1157
|
if (isIsoLikeCalendar(e) || !o.te && !o.oe) return ((e, t, o) => {
|
|
@@ -1210,8 +1203,8 @@ function calendarDateUntil(e, t, o, n) {
|
|
|
1210
1203
|
return createDateDurationRecord(m, u, 0, isoDateRecordToEpochDays(o) - isoDateRecordToEpochDays(calendarIntegersToIso(e, h.t, h.u, constrainDay(e, h.t, h.u, a.T, _))));
|
|
1211
1204
|
}
|
|
1212
1205
|
function calendarDateToIso(e, t, o) {
|
|
1213
|
-
const n = t[
|
|
1214
|
-
if (isIsoLikeCalendar(e)) return ((e, t) => regulateIsoDate(e[
|
|
1206
|
+
const n = t[wt.t], r = t[wt.u], a = mapUnlessUndefined(t[wt.v], parseMonthCode), i = t[wt.T];
|
|
1207
|
+
if (isIsoLikeCalendar(e)) return ((e, t) => regulateIsoDate(e[wt.t], e[wt.u], e[wt.T], t))({
|
|
1215
1208
|
...t,
|
|
1216
1209
|
year: n + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0)
|
|
1217
1210
|
}, o);
|
|
@@ -1228,7 +1221,7 @@ function nonIsoCalendarIsoToDate(e, t) {
|
|
|
1228
1221
|
}
|
|
1229
1222
|
};
|
|
1230
1223
|
if ("japanese" === e) {
|
|
1231
|
-
const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a =
|
|
1224
|
+
const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a = yt[e].get(r);
|
|
1232
1225
|
return {
|
|
1233
1226
|
ne: r,
|
|
1234
1227
|
re: "bce" === r ? 1 - t.t : t.t - a + 1,
|
|
@@ -1400,19 +1393,18 @@ function nonIsoCalendarIsoToDate(e, t) {
|
|
|
1400
1393
|
})(o) : epochDaysToDate$2(e, o);
|
|
1401
1394
|
}
|
|
1402
1395
|
function calendarSupportsEra(e) {
|
|
1403
|
-
return !!
|
|
1396
|
+
return !!yt[e].size;
|
|
1404
1397
|
}
|
|
1405
1398
|
function canonicalizeEraInCalendar(e, t) {
|
|
1406
1399
|
const o = "ad" === t ? "ce" : "bc" === t ? "bce" : t;
|
|
1407
|
-
return
|
|
1400
|
+
return yt[e].has(o) ? o : throwRangeError(((e) => `invalid era: ${e}`)(t));
|
|
1408
1401
|
}
|
|
1409
1402
|
function constrainMonthCode(e, t, o, n) {
|
|
1410
|
-
if ("hebrew" === e) return o[1] && !isLeapYear$2(t) ? "reject" === n ? throwRangeError(b) : [6, !1] : o;
|
|
1411
1403
|
if (isChineseDangi(e)) {
|
|
1412
1404
|
const r = ((e, t, o) => o[1] && ordinalMonthToMonthCode(e, t, o[0] + 1) !== createMonthCode(...o) ? [o[0], !1] : o)(e, t, o);
|
|
1413
1405
|
return o !== r && "reject" === n ? throwRangeError(b) : r;
|
|
1414
1406
|
}
|
|
1415
|
-
return o;
|
|
1407
|
+
return "hebrew" === e && o[1] && !isLeapYear$2(t) ? "reject" === n ? throwRangeError(b) : [6, !1] : o;
|
|
1416
1408
|
}
|
|
1417
1409
|
function monthCodeToOrdinal(e, t, o) {
|
|
1418
1410
|
return "hebrew" === e ? ((e, t) => t[0] + +(isLeapYear$2(e) && t[0] + +t[1] >= 6))(t, o) : isChineseDangi(e) ? ((e, t, o) => o[1] || ordinalMonthToMonthCode(e, t, o[0]) !== createMonthCode(...o) ? o[0] + 1 : o[0])(e, t, o) : o[0];
|
|
@@ -1486,16 +1478,16 @@ function prepareCalendarFields(e, t, o, n) {
|
|
|
1486
1478
|
let a = !1;
|
|
1487
1479
|
for (const e of o) {
|
|
1488
1480
|
const o = t[e];
|
|
1489
|
-
void 0 !== o ? (a = !0, r[e] =
|
|
1481
|
+
void 0 !== o ? (a = !0, r[e] = Et[e][0](o)) : n && (n.includes(e) && throwTypeError(missingField(e)), r[e] = Et[e][1]);
|
|
1490
1482
|
}
|
|
1491
1483
|
return n || a || throwTypeError(U), r;
|
|
1492
1484
|
}
|
|
1493
1485
|
function calendarMergeFields(e, t, o) {
|
|
1494
1486
|
const n = ((e, t) => {
|
|
1495
1487
|
const o = [];
|
|
1496
|
-
return void 0 !== t[
|
|
1488
|
+
return void 0 !== t[wt.u] && o.push(wt.v), void 0 !== t[wt.v] && o.push(wt.u), !calendarSupportsEra(e) || void 0 === t[wt.ne] && void 0 === t[wt.re] && void 0 === t[wt.t] || o.push(wt.ne, wt.re, wt.t), !((e) => "japanese" === e)(e) || void 0 === t[wt.T] && void 0 === t[wt.u] && void 0 === t[wt.v] || o.push(wt.ne, wt.re), o;
|
|
1497
1489
|
})(e, o), r = createEmptyCalendarFieldsRecord();
|
|
1498
|
-
for (const e of
|
|
1490
|
+
for (const e of vt) void 0 === t[e] || n.includes(e) || (r[e] = t[e]), void 0 !== o[e] && (r[e] = o[e]);
|
|
1499
1491
|
return r;
|
|
1500
1492
|
}
|
|
1501
1493
|
function toTemporalCalendarIdentifier(e) {
|
|
@@ -1528,43 +1520,23 @@ function calendarYearMonthFromFields(e, t, o) {
|
|
|
1528
1520
|
function calendarMonthDayFromFields(e, t, o) {
|
|
1529
1521
|
return calendarResolveFields(e, t, q), (function(e, t, o) {
|
|
1530
1522
|
if (isIsoLikeCalendar(e)) return ((e, t, o) => {
|
|
1531
|
-
const n = regulateIsoDate(e[
|
|
1523
|
+
const n = regulateIsoDate(e[wt.t] ?? 1972, e[wt.u], e[wt.T], t);
|
|
1532
1524
|
return o || validateIsoDate(n), createIsoDateRecord(1972, n.u, n.T);
|
|
1533
1525
|
})({
|
|
1534
1526
|
...t,
|
|
1535
1527
|
year: mapUnlessUndefined(t.year, (t) => t + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0))
|
|
1536
1528
|
}, o, "iso8601" === e);
|
|
1537
|
-
const n = t[
|
|
1538
|
-
let r = t[
|
|
1529
|
+
const n = t[wt.t];
|
|
1530
|
+
let r = t[wt.u], a = mapUnlessUndefined(t[wt.v], parseMonthCode), i = t[wt.T];
|
|
1539
1531
|
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) => {
|
|
1540
1532
|
if (isChineseDangi(e) || "islamic-umalqura" === e || "persian" === e) {
|
|
1541
1533
|
const r = clamp(o, 1, "persian" === e && t[0] <= 6 ? 31 : 30);
|
|
1542
1534
|
return o !== r && "reject" === n ? throwRangeError(b) : r;
|
|
1543
1535
|
}
|
|
1544
1536
|
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);
|
|
1545
|
-
})(e, a, i, o), isChineseDangi(e)
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
}
|
|
1549
|
-
const o = calendarIntegersToEpochDays(1351, e, t);
|
|
1550
|
-
return o <= 1095 ? o : calendarIntegersToEpochDays(1350, e, t);
|
|
1551
|
-
})(a[0], i)) : "islamic-umalqura" === e ? epochDaysToIsoDate(((e, t) => {
|
|
1552
|
-
for (let o = 1392;; o--) if (constrainDay$2(o, e, t) === t) {
|
|
1553
|
-
const n = calendarIntegersToEpochDays$1(o, e, t);
|
|
1554
|
-
if (n <= 1095) return n;
|
|
1555
|
-
}
|
|
1556
|
-
})(a[0], i)) : "hebrew" === e ? epochDaysToIsoDate(((e, t, o) => {
|
|
1557
|
-
if (t) return calendarIntegersToEpochDays$4(5730, 6, o);
|
|
1558
|
-
if ((2 === e || 3 === e) && 30 === o) return calendarIntegersToEpochDays$4(5732, e, o);
|
|
1559
|
-
const n = calendarIntegersToEpochDays$4(5733, e, o);
|
|
1560
|
-
return n <= 1095 ? n : calendarIntegersToEpochDays$4(5732, e, o);
|
|
1561
|
-
})(a[0], a[1], i)) : isChineseDangi(e) ? epochDaysToIsoDate(((e, t, o, n) => {
|
|
1562
|
-
const r = o || 30 === n && (6 === t || 8 === t) || 12 === t ? t + 1 : t;
|
|
1563
|
-
if (11 === t && !o) {
|
|
1564
|
-
const t = calendarIntegersToEpochDays$6(e, 30 === n ? 1969 : 1972, 11, n);
|
|
1565
|
-
return t <= 1095 ? t : calendarIntegersToEpochDays$6(e, 1971, 12, n);
|
|
1566
|
-
}
|
|
1567
|
-
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 ? [
|
|
1537
|
+
})(e, a, i, o), isChineseDangi(e) ? epochDaysToIsoDate(((e, t, o, n, r) => {
|
|
1538
|
+
o && (1 === t || 12 === t || 30 === n && (2 === t || isWithin(t, 8, 11))) && ("reject" === r && throwRangeError(b), o = !1);
|
|
1539
|
+
const a = ((e, t, o, n) => !o && n < 30 ? 30 * t + n > 356 ? 1971 : 1972 : o ? [
|
|
1568
1540
|
1947,
|
|
1569
1541
|
30 === n ? 1955 : 1966,
|
|
1570
1542
|
30 === n ? 1944 : 1963,
|
|
@@ -1575,8 +1547,27 @@ function calendarMonthDayFromFields(e, t, o) {
|
|
|
1575
1547
|
2014,
|
|
1576
1548
|
1984,
|
|
1577
1549
|
2033
|
|
1578
|
-
][t - 2] :
|
|
1579
|
-
|
|
1550
|
+
][t - 2] : [
|
|
1551
|
+
1970,
|
|
1552
|
+
1972,
|
|
1553
|
+
"chinese" === e ? 1966 : 1968,
|
|
1554
|
+
1970,
|
|
1555
|
+
1972,
|
|
1556
|
+
1971,
|
|
1557
|
+
1972,
|
|
1558
|
+
1971,
|
|
1559
|
+
1972,
|
|
1560
|
+
1972,
|
|
1561
|
+
1969,
|
|
1562
|
+
1971
|
|
1563
|
+
][t - 1])(e, t, o, n);
|
|
1564
|
+
return calendarIntegersToEpochDays$6(e, a, o || 1971 === a ? t + 1 : t, n);
|
|
1565
|
+
})(e, a[0], a[1], i, o)) : isCopticOrEthiopic(e) ? epochDaysToIsoDate(((e, t) => 13 === e && 6 === t ? 618 : (30 * (e - 1) + t + 252) % 365 + 731)(a[0], i)) : epochDaysToIsoDate("indian" === e ? ((e, t) => calendarIntegersToEpochDays$3(30 * e + t <= 310 ? 1894 : 1893, e, t))(a[0], i) : "persian" === e ? ((e, t) => calendarIntegersToEpochDays(31 * e + t < 321 ? 1351 : 1350, e, t))(a[0], i) : "islamic-umalqura" === e ? ((e, t) => {
|
|
1566
|
+
for (let o = 1392;; o--) if (constrainDay$2(o, e, t) === t) {
|
|
1567
|
+
const n = calendarIntegersToEpochDays$1(o, e, t);
|
|
1568
|
+
if (n <= 1095) return n;
|
|
1569
|
+
}
|
|
1570
|
+
})(a[0], i) : "hebrew" === e ? ((e, t, o) => t ? calendarIntegersToEpochDays$4(5730, 6, o) : calendarIntegersToEpochDays$4((2 !== e && 3 !== e || 30 !== o) && 30 * e + o < 147 ? 5733 : 5732, e, o))(a[0], a[1], i) : ((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
1571
|
})(e, t, o);
|
|
1581
1572
|
}
|
|
1582
1573
|
function formatCalendarAnnotation(e, t) {
|
|
@@ -1634,30 +1625,28 @@ function calendarExtraFields(e, t) {
|
|
|
1634
1625
|
return calendarSupportsEra(e) && t.includes("year") ? ["era", "eraYear"] : [];
|
|
1635
1626
|
}
|
|
1636
1627
|
function isoResolveFields(e, t) {
|
|
1637
|
-
t !== q && void 0 === e[
|
|
1638
|
-
const o = mapUnlessUndefined(e[
|
|
1639
|
-
o && ((o[0] > 12 || o[1] || void 0 !== e[
|
|
1628
|
+
t !== q && void 0 === e[wt.t] && throwTypeError(missingField(wt.t)), t !== H && void 0 === e[wt.T] && throwTypeError(missingField(wt.T)), void 0 === e[wt.v] && void 0 === e[wt.u] && throwTypeError(missingField("month, monthCode"));
|
|
1629
|
+
const o = mapUnlessUndefined(e[wt.v], parseMonthCode);
|
|
1630
|
+
o && ((o[0] > 12 || o[1] || void 0 !== e[wt.u] && o[0] !== e[wt.u]) && throwRangeError(C), e[wt.u] = o[0]);
|
|
1640
1631
|
}
|
|
1641
1632
|
function calendarResolveFields(e, t, o = z) {
|
|
1642
1633
|
"iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = z) {
|
|
1643
|
-
const n = t[
|
|
1644
|
-
let a = t[yt.t];
|
|
1645
|
-
const i = t[yt.v], c = t[yt.u], s = t[yt.T];
|
|
1634
|
+
const n = t[wt.ne], r = t[wt.re], a = t[wt.t], i = t[wt.v], c = t[wt.u], s = t[wt.T];
|
|
1646
1635
|
if (o === q && 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 !== H && void 0 === s && throwTypeError(missingField("day")), c === i && throwTypeError(missingField("month, monthCode")), calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r) {
|
|
1647
1636
|
const o = ((e, t, o) => {
|
|
1648
|
-
const n = canonicalizeEraInCalendar(e, t)
|
|
1649
|
-
return !1 ===
|
|
1637
|
+
const n = yt[e].get(canonicalizeEraInCalendar(e, t));
|
|
1638
|
+
return !1 === n ? 1 - o : n + o - 1;
|
|
1650
1639
|
})(e, canonicalizeEraInCalendar(e, n), r);
|
|
1651
|
-
void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[
|
|
1640
|
+
void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[wt.t] = o;
|
|
1652
1641
|
}
|
|
1653
|
-
if (t[
|
|
1642
|
+
if (t[wt.ne] = t[wt.re] = void 0, isIsoLikeCalendar(e)) isoResolveFields(t, o);
|
|
1654
1643
|
else if (i) {
|
|
1655
1644
|
const o = parseMonthCode(i);
|
|
1656
1645
|
((e, t) => isWithin(t[0], 1, 12) && !t[1] || isChineseDangi(e) && isWithin(t[0], 1, 12) || isCopticOrEthiopic(e) && 13 === t[0] && !t[1] || "hebrew" === e && 5 === t[0] && t[1])(e, o) || throwRangeError(invalidMonthCode(i));
|
|
1657
|
-
const n = t[
|
|
1646
|
+
const n = t[wt.t];
|
|
1658
1647
|
if (void 0 !== n) {
|
|
1659
1648
|
const r = monthCodeToOrdinal(e, n, constrainMonthCode(e, n, o, _));
|
|
1660
|
-
void 0 !== c && c !== r && throwRangeError(C), t[
|
|
1649
|
+
void 0 !== c && c !== r && throwRangeError(C), t[wt.u] = r;
|
|
1661
1650
|
}
|
|
1662
1651
|
}
|
|
1663
1652
|
})(e, t, o);
|
|
@@ -1702,7 +1691,7 @@ function combineDateAndTimeDuration(e, t) {
|
|
|
1702
1691
|
};
|
|
1703
1692
|
}
|
|
1704
1693
|
function toTemporalDuration(e) {
|
|
1705
|
-
return
|
|
1694
|
+
return Mt.get(e) || (isObject(e) ? createTemporalDurationSlot(toTemporalPartialDurationRecord(e).map((e) => e || 0)) : (validateString(e), ((e) => {
|
|
1706
1695
|
const t = e.match(/^([+-]?)p(?:(\d+)y)?(?:(\d+)m)?(?:(\d+)w)?(?:(\d+)d)?(?:t(?:(\d+)(?:[.,](\d{1,9}))?h)?(?:(\d+)(?:[.,](\d{1,9}))?m)?(?:(\d+)(?:[.,](\d{1,9}))?s)?)?$/i);
|
|
1707
1696
|
t && !/[pt]$|[.,](\d{1,9})[hms]./i.test(e) || throwRangeError(parseError(e));
|
|
1708
1697
|
const o = balanceTime(0, 0, 0, 0, 0, 3600 * toIntegerWithTruncation((t[7] || "").padEnd(9, "0")) + 60 * toIntegerWithTruncation((t[9] || "").padEnd(9, "0")) + toIntegerWithTruncation((t[11] || "").padEnd(9, "0")));
|
|
@@ -1727,7 +1716,7 @@ function dateDurationSign(e) {
|
|
|
1727
1716
|
return sign(e.te || e.oe || e.ee || e.X);
|
|
1728
1717
|
}
|
|
1729
1718
|
function internalDurationSign(e) {
|
|
1730
|
-
return dateDurationSign(e.A) ||
|
|
1719
|
+
return dateDurationSign(e.A) || bt(e.p);
|
|
1731
1720
|
}
|
|
1732
1721
|
function validateDuration(...e) {
|
|
1733
1722
|
e.some((e) => e < 0) && e.some((e) => e > 0) && throwRangeError("invalid duration"), (e.some((e) => Math.abs(e) > 1e25) || [
|
|
@@ -1769,8 +1758,8 @@ function toTemporalPartialDurationRecord(e) {
|
|
|
1769
1758
|
function createTemporalDurationSlot(e) {
|
|
1770
1759
|
return validateDuration(...e), e;
|
|
1771
1760
|
}
|
|
1772
|
-
function createTemporalDuration(e, t = Object.create(
|
|
1773
|
-
return
|
|
1761
|
+
function createTemporalDuration(e, t = Object.create(Pt.prototype)) {
|
|
1762
|
+
return Mt.set(t, e), t;
|
|
1774
1763
|
}
|
|
1775
1764
|
function timeDurationFromComponents(e, t, o, n, r, a) {
|
|
1776
1765
|
return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromUnit(3600 * e + 60 * t + o, 1e9), createTimeDurationFromUnit(n, 1e6)), createTimeDurationFromUnit(r, 1e3)), createTimeDurationFromUnit(a, 1));
|
|
@@ -1821,7 +1810,7 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
|
|
|
1821
1810
|
compareEpochNanoseconds(m.ge, n) * compareEpochNanoseconds(m.fe, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, i, c, s, !0), d = !0);
|
|
1822
1811
|
const u = differenceEpochNanoseconds(m.ge, n), T = differenceEpochNanoseconds(m.ge, m.fe);
|
|
1823
1812
|
let D = m.Ie, h = m.ge;
|
|
1824
|
-
return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? Ee(e, t) ? Ee(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.pe && (d = !0, D = m.Oe, h = m.fe), {
|
|
1813
|
+
return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? Ee(e, t) ? Ee(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.pe && (d = !0, D = m.Oe, h = m.fe), signTimeDuration(T) || throwRangeError("internal error"), {
|
|
1825
1814
|
Fe: {
|
|
1826
1815
|
ye: combineDateAndTimeDuration(D, ve),
|
|
1827
1816
|
Se: h,
|
|
@@ -1836,7 +1825,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
|
1836
1825
|
let h = roundTimeDurationToIncrement(t.p, a * D, c);
|
|
1837
1826
|
const p = addTimeDuration(h, negateTimeDuration(T));
|
|
1838
1827
|
let g = !1, f = 0;
|
|
1839
|
-
return
|
|
1828
|
+
return bt(p) !== -e && (g = !0, f = e, h = roundTimeDurationToIncrement(p, a * D, c)), {
|
|
1840
1829
|
ye: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.X + f), h),
|
|
1841
1830
|
Se: addTimeDurationToEpochNanoseconds(u, h),
|
|
1842
1831
|
we: g
|
|
@@ -1846,7 +1835,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
|
1846
1835
|
return {
|
|
1847
1836
|
ye: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, isDateUnit(o) ? s : 0), isDateUnit(o) ? addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0)) : c),
|
|
1848
1837
|
Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
|
|
1849
|
-
we: sign(s - i[0]) ===
|
|
1838
|
+
we: sign(s - i[0]) === bt(i)
|
|
1850
1839
|
};
|
|
1851
1840
|
})(e, o, i, c, s, m);
|
|
1852
1841
|
return T.we && s !== l ? ((e, t, o, n, r, a, i, c) => {
|
|
@@ -1856,7 +1845,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
|
1856
1845
|
for (let m = c - 1; m >= s; m--) if (m !== g || i === l) {
|
|
1857
1846
|
d = m === h ? createDateDurationRecord(t.A.te + e, 0, 0, 0) : m === p ? adjustDateDurationRecord(t.A, 0, 0, t.A.oe + e) : adjustDateDurationRecord(t.A, 0, t.A.ee + e);
|
|
1858
1847
|
const i = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, d, _), n.p), c = r ? getEpochNanosecondsFor(r, i, G) : getUtcEpochNanoseconds(i);
|
|
1859
|
-
if (
|
|
1848
|
+
if (bt(differenceEpochNanoseconds(c, o)) === -e) break;
|
|
1860
1849
|
t = combineDateAndTimeDuration(d, ve);
|
|
1861
1850
|
}
|
|
1862
1851
|
return t;
|
|
@@ -1873,7 +1862,7 @@ function temporalDurationToString(e, t) {
|
|
|
1873
1862
|
"D",
|
|
1874
1863
|
"H",
|
|
1875
1864
|
"M"
|
|
1876
|
-
].map((t, o) => e[o] ? `${e[o]}${t}` : ""), h = `${u}${D}${
|
|
1865
|
+
].map((t, o) => e[o] ? `${e[o]}${t}` : ""), h = `${u}${D}${bt(n) || defaultTemporalLargestUnit(e) >= T || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + c, t)}S` : ""}`;
|
|
1877
1866
|
return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${h && `T${h}`}`;
|
|
1878
1867
|
}
|
|
1879
1868
|
function addDurations(e, t, o) {
|
|
@@ -1881,7 +1870,7 @@ function addDurations(e, t, o) {
|
|
|
1881
1870
|
return isCalendarUnit(r) && throwRangeError(durationWithDateUnit(r)), createTemporalDuration(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), addTimeDuration(toInternalDurationRecordWith24HourDays(t).p, toInternalDurationRecordWith24HourDays(n).p)), r));
|
|
1882
1871
|
}
|
|
1883
1872
|
function getInternalSlotOrThrowForDuration(e) {
|
|
1884
|
-
return getInternalSlotOrThrow(
|
|
1873
|
+
return getInternalSlotOrThrow(Mt, e);
|
|
1885
1874
|
}
|
|
1886
1875
|
function applySignToDurationSlot(e, t) {
|
|
1887
1876
|
return createTemporalDurationSlot(e.map((e) => e * t + 0));
|
|
@@ -2012,18 +2001,18 @@ function getTemporalRelativeToOption(e) {
|
|
|
2012
2001
|
if (e) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForPlainDate(createTemporalDate(e.K.o, e.Y)) });
|
|
2013
2002
|
r = getTemporalCalendarIdentifierWithIsoDefault(t);
|
|
2014
2003
|
const c = prepareCalendarFields(r, t, [
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2004
|
+
wt.t,
|
|
2005
|
+
wt.u,
|
|
2006
|
+
wt.v,
|
|
2007
|
+
wt.T,
|
|
2008
|
+
wt.D,
|
|
2009
|
+
wt.I,
|
|
2010
|
+
wt.O,
|
|
2011
|
+
wt.F,
|
|
2012
|
+
wt.S,
|
|
2013
|
+
wt.$,
|
|
2014
|
+
wt.M,
|
|
2015
|
+
wt.P
|
|
2027
2016
|
], []), l = interpretTemporalDateTimeFields(r, c, _);
|
|
2028
2017
|
a = l.o, i = l.p, o = c.timeZone, n = c.offset, s = n ? te : ne;
|
|
2029
2018
|
} else {
|
|
@@ -2060,7 +2049,7 @@ function formatTimeString(e, t, o, n, r) {
|
|
|
2060
2049
|
return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r === J ? "" : `:${toZeroPaddedDecimalString(o, 2)}${formatFractionalSeconds(n, r)}`}`;
|
|
2061
2050
|
}
|
|
2062
2051
|
function roundNumberToIncrement(e, t, o) {
|
|
2063
|
-
return
|
|
2052
|
+
return Rt[o](e / t) * t;
|
|
2064
2053
|
}
|
|
2065
2054
|
function getRoundingModeOption(e, t) {
|
|
2066
2055
|
return getOption(e, "roundingMode", [
|
|
@@ -2082,9 +2071,9 @@ function getRoundingIncrementOption(e) {
|
|
|
2082
2071
|
function isoDateToFields(e, t, o) {
|
|
2083
2072
|
const n = calendarIsoToDate(e, t);
|
|
2084
2073
|
return createNullPrototypeObject({
|
|
2085
|
-
[
|
|
2086
|
-
[
|
|
2087
|
-
[
|
|
2074
|
+
[wt.t]: o === q ? void 0 : n.t,
|
|
2075
|
+
[wt.v]: n.v,
|
|
2076
|
+
[wt.T]: o === H ? void 0 : n.T
|
|
2088
2077
|
});
|
|
2089
2078
|
}
|
|
2090
2079
|
function getDifferenceSettings(e, t, o, n, r, a) {
|
|
@@ -2111,16 +2100,16 @@ function epochDaysToIsoDate(e) {
|
|
|
2111
2100
|
function isoDateTimeToFields(e, t) {
|
|
2112
2101
|
return createNullPrototypeObject({
|
|
2113
2102
|
...isoDateToFields(e, t.o, z),
|
|
2114
|
-
[
|
|
2115
|
-
[
|
|
2116
|
-
[
|
|
2117
|
-
[
|
|
2118
|
-
[
|
|
2119
|
-
[
|
|
2103
|
+
[wt.D]: t.p.D,
|
|
2104
|
+
[wt.I]: t.p.I,
|
|
2105
|
+
[wt.O]: t.p.O,
|
|
2106
|
+
[wt.F]: t.p.F,
|
|
2107
|
+
[wt.S]: t.p.S,
|
|
2108
|
+
[wt.$]: t.p.$
|
|
2120
2109
|
});
|
|
2121
2110
|
}
|
|
2122
2111
|
function getInternalSlotOrThrowForDateTimeFormat(e) {
|
|
2123
|
-
return getInternalSlotOrThrow(
|
|
2112
|
+
return getInternalSlotOrThrow($t, e);
|
|
2124
2113
|
}
|
|
2125
2114
|
function formatDateTime(e, t) {
|
|
2126
2115
|
const [o, n] = handleDateTimeValue(e, t);
|
|
@@ -2134,19 +2123,19 @@ function dateStyleToMonthStyle(e) {
|
|
|
2134
2123
|
}
|
|
2135
2124
|
function amendOptionsForPlainDate(e) {
|
|
2136
2125
|
const t = createNullPrototypeObject(e);
|
|
2137
|
-
return hasAnyOptions(e,
|
|
2126
|
+
return hasAnyOptions(e, Ct) || (hasAnyOptions(e, Yt) && throwTypeError(N), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Yt, "timeZoneName"]), t.timeZone = "UTC", t;
|
|
2138
2127
|
}
|
|
2139
2128
|
function amendOptionsForPlainTime(e) {
|
|
2140
2129
|
const t = createNullPrototypeObject(e);
|
|
2141
|
-
return hasAnyOptions(e,
|
|
2142
|
-
|
|
2130
|
+
return hasAnyOptions(e, Yt) || (hasAnyOptions(e, Ct) && throwTypeError(N), 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, [
|
|
2131
|
+
...Ct,
|
|
2143
2132
|
"era",
|
|
2144
2133
|
"timeZoneName"
|
|
2145
2134
|
]), t.timeZone = "UTC", t;
|
|
2146
2135
|
}
|
|
2147
2136
|
function amendOptionsForPlainDateTime(e) {
|
|
2148
2137
|
const t = createNullPrototypeObject(e);
|
|
2149
|
-
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, [
|
|
2138
|
+
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, [...Ct, ...Yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
|
|
2150
2139
|
}
|
|
2151
2140
|
function amendOptionsForPlainYearMonth(e) {
|
|
2152
2141
|
const t = createNullPrototypeObject(e);
|
|
@@ -2154,8 +2143,8 @@ function amendOptionsForPlainYearMonth(e) {
|
|
|
2154
2143
|
"year",
|
|
2155
2144
|
"month",
|
|
2156
2145
|
"dateStyle"
|
|
2157
|
-
]) || (hasAnyOptions(e, [
|
|
2158
|
-
...
|
|
2146
|
+
]) || (hasAnyOptions(e, [...Ct, ...Yt]) && throwTypeError(N), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2147
|
+
...Yt,
|
|
2159
2148
|
"day",
|
|
2160
2149
|
"weekday",
|
|
2161
2150
|
"timeZoneName"
|
|
@@ -2167,8 +2156,8 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2167
2156
|
"month",
|
|
2168
2157
|
"day",
|
|
2169
2158
|
"dateStyle"
|
|
2170
|
-
]) || (hasAnyOptions(e, [
|
|
2171
|
-
...
|
|
2159
|
+
]) || (hasAnyOptions(e, [...Ct, ...Yt]) && throwTypeError(N), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2160
|
+
...Yt,
|
|
2172
2161
|
"era",
|
|
2173
2162
|
"year",
|
|
2174
2163
|
"weekday",
|
|
@@ -2177,7 +2166,7 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2177
2166
|
}
|
|
2178
2167
|
function amendOptionsForInstant(e) {
|
|
2179
2168
|
const t = createNullPrototypeObject(e);
|
|
2180
|
-
return hasAnyOptions(e, [
|
|
2169
|
+
return hasAnyOptions(e, [...Ct, ...Yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
|
|
2181
2170
|
}
|
|
2182
2171
|
function hasAnyOptions(e, t) {
|
|
2183
2172
|
return t.some((t) => void 0 !== e[t]);
|
|
@@ -2185,15 +2174,15 @@ function hasAnyOptions(e, t) {
|
|
|
2185
2174
|
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n) {
|
|
2186
2175
|
null === t && throwTypeError(N);
|
|
2187
2176
|
const r = createNullPrototypeObject();
|
|
2188
|
-
let a = new
|
|
2177
|
+
let a = new Zt(e, new Proxy({}, { get(e, o) {
|
|
2189
2178
|
const a = t[o];
|
|
2190
2179
|
return "timeZone" === o && void 0 !== n ? (void 0 !== a && throwTypeError("disallowed field: timeZone"), r[o] = n) : void 0 === a ? a : r[o] = "hour12" === o ? ((e) => !!e)(a) : "fractionalSecondDigits" === o ? Se(a) : toString(a);
|
|
2191
2180
|
} }));
|
|
2192
2181
|
return (o === z && r.timeStyle || o === V && r.dateStyle) && throwTypeError(N), r.calendar = a.resolvedOptions().calendar, void 0 === n || hasAnyOptions(r, [
|
|
2193
|
-
...$t,
|
|
2194
2182
|
...Ct,
|
|
2183
|
+
...Yt,
|
|
2195
2184
|
"timeZoneName"
|
|
2196
|
-
]) || (r.timeZoneName = "short", a = new
|
|
2185
|
+
]) || (r.timeZoneName = "short", a = new Zt(a.resolvedOptions().locale, r)), createNullPrototypeObject({
|
|
2197
2186
|
Re: a,
|
|
2198
2187
|
Ne: r,
|
|
2199
2188
|
Ze: a.resolvedOptions().locale
|
|
@@ -2215,7 +2204,7 @@ function toDateTimeFormattable(e) {
|
|
|
2215
2204
|
}
|
|
2216
2205
|
function handleDateTimeValue(e, t) {
|
|
2217
2206
|
const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
|
|
2218
|
-
return isPlainTime(t) ? [e.Ye ||= new
|
|
2207
|
+
return isPlainTime(t) ? [e.Ye ||= new Zt(e.Ze, amendOptionsForPlainTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.Y !== e.Ne.calendar && "iso8601" !== o.Y && throwRangeError(Z), [e.Ce ||= new Zt(e.Ze, amendOptionsForPlainDate(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.Y !== e.Ne.calendar && "iso8601" !== n.Y && throwRangeError(Z), [e.Ue ||= new Zt(e.Ze, amendOptionsForPlainDateTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(n.K))]) : r ? (r.Y !== e.Ne.calendar && throwRangeError(Z), [e.je ||= new Zt(e.Ze, amendOptionsForPlainYearMonth(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.Y !== e.Ne.calendar && throwRangeError(Z), [e.We ||= new Zt(e.Ze, amendOptionsForPlainMonthDay(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.ke ||= new Zt(e.Ze, amendOptionsForInstant(e.Ne)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).U)] : (isZonedDateTime(t) && throwTypeError(Y), [e.Re, t]);
|
|
2219
2208
|
}
|
|
2220
2209
|
function DateTimeFormat(e, t) {
|
|
2221
2210
|
return new Ut(e, t);
|
|
@@ -2242,7 +2231,7 @@ function differenceInstant(e, t, o, n, r) {
|
|
|
2242
2231
|
}
|
|
2243
2232
|
function roundTemporalInstant(e, t, o, n) {
|
|
2244
2233
|
return (function(e, t, o) {
|
|
2245
|
-
return normalizeEpochNanoseconds(e[0], ((e, t, o) =>
|
|
2234
|
+
return normalizeEpochNanoseconds(e[0], ((e, t, o) => Nt[o](e / t) * t)(e[1], t, o));
|
|
2246
2235
|
})(e, t * nanosecondsForTimeUnit(o), n);
|
|
2247
2236
|
}
|
|
2248
2237
|
function temporalInstantToString(e, t, o) {
|
|
@@ -2270,7 +2259,7 @@ function clampEpochNanoseconds(e) {
|
|
|
2270
2259
|
return compareEpochNanoseconds(e, we) > 0 ? we : compareEpochNanoseconds(e, ye) < 0 ? ye : e;
|
|
2271
2260
|
}
|
|
2272
2261
|
function systemTimeZoneIdentifier() {
|
|
2273
|
-
return Ht && qt + Ht > Date.now() && xt ? xt : (qt = Date.now(), xt = new
|
|
2262
|
+
return Ht && qt + Ht > Date.now() && xt ? xt : (qt = Date.now(), xt = new Zt().resolvedOptions().timeZone);
|
|
2274
2263
|
}
|
|
2275
2264
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
2276
2265
|
Ht = e, e || (xt = void 0, qt = -1 / 0);
|
|
@@ -2423,21 +2412,21 @@ var be = class {
|
|
|
2423
2412
|
validatePartialTemporalObject(e);
|
|
2424
2413
|
const n = getOffsetNanosecondsForZonedDateTimeSlot(o), r = getIsoDateTimeForZonedDateTimeSlot(o), a = calendarMergeFields(o.Y, createNullPrototypeObject({
|
|
2425
2414
|
...isoDateTimeToFields(o.Y, r),
|
|
2426
|
-
[
|
|
2415
|
+
[wt.M]: formatUtcOffsetNanoseconds(n)
|
|
2427
2416
|
}), prepareCalendarFields(o.Y, e, [
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2417
|
+
wt.t,
|
|
2418
|
+
wt.u,
|
|
2419
|
+
wt.v,
|
|
2420
|
+
wt.T,
|
|
2421
|
+
wt.D,
|
|
2422
|
+
wt.I,
|
|
2423
|
+
wt.O,
|
|
2424
|
+
wt.F,
|
|
2425
|
+
wt.S,
|
|
2426
|
+
wt.$,
|
|
2427
|
+
wt.M
|
|
2439
2428
|
])), i = getOptionsObject(t), c = getTemporalDisambiguationOption(i), s = getTemporalOffsetOption(i, Q), l = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.Y, a, l);
|
|
2440
|
-
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, te, parseDateTimeUtcOffset(a[
|
|
2429
|
+
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, te, parseDateTimeUtcOffset(a[wt.M]), o.P, c, s, !0), o.P, o.Y);
|
|
2441
2430
|
}
|
|
2442
2431
|
withPlainTime(e = void 0) {
|
|
2443
2432
|
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
@@ -2506,9 +2495,8 @@ var be = class {
|
|
|
2506
2495
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
2507
2496
|
void 0 === e && throwTypeError(W);
|
|
2508
2497
|
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"], B), n = ((e, t, o) => {
|
|
2509
|
-
if ("UTC" === e || isOffsetTimeZoneIdentifier(e)) return null;
|
|
2510
2498
|
const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, 1 / 0);
|
|
2511
|
-
return -1 === o ? a === n ? null : a > r ? searchTimeZoneTransition(e, a, a - 31536e3, o) || searchTimeZoneTransition(e, r, n, o) : searchTimeZoneTransition(e, a, n, o) : searchTimeZoneTransition(e, a, a
|
|
2499
|
+
return "UTC" === e || isOffsetTimeZoneIdentifier(e) ? null : -1 === o ? a === n ? null : a > r ? searchTimeZoneTransition(e, a, a - 31536e3, o) || searchTimeZoneTransition(e, r, n, o) : searchTimeZoneTransition(e, a, n, o) : searchTimeZoneTransition(e, a, Math.max(a + 31536e3, r), o);
|
|
2512
2500
|
})(t.P, t.U, "next" === o ? 1 : -1);
|
|
2513
2501
|
return null === n ? null : createTemporalZonedDateTime(n, t.P, t.Y);
|
|
2514
2502
|
}
|
|
@@ -2623,16 +2611,16 @@ var $e = class {
|
|
|
2623
2611
|
const o = getInternalSlotOrThrowForPlainDateTime(this);
|
|
2624
2612
|
validatePartialTemporalObject(e);
|
|
2625
2613
|
const n = calendarMergeFields(o.Y, isoDateTimeToFields(o.Y, o.K), prepareCalendarFields(o.Y, e, [
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2614
|
+
wt.t,
|
|
2615
|
+
wt.u,
|
|
2616
|
+
wt.v,
|
|
2617
|
+
wt.T,
|
|
2618
|
+
wt.D,
|
|
2619
|
+
wt.I,
|
|
2620
|
+
wt.O,
|
|
2621
|
+
wt.F,
|
|
2622
|
+
wt.S,
|
|
2623
|
+
wt.$
|
|
2636
2624
|
]));
|
|
2637
2625
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2638
2626
|
}
|
|
@@ -2818,10 +2806,10 @@ var mt = class {
|
|
|
2818
2806
|
with(e, t = void 0) {
|
|
2819
2807
|
const o = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2820
2808
|
return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.Y, calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, q), prepareCalendarFields(o.Y, e, [
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2809
|
+
wt.t,
|
|
2810
|
+
wt.u,
|
|
2811
|
+
wt.v,
|
|
2812
|
+
wt.T
|
|
2825
2813
|
])), getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2826
2814
|
}
|
|
2827
2815
|
equals(e) {
|
|
@@ -2842,7 +2830,7 @@ var mt = class {
|
|
|
2842
2830
|
}
|
|
2843
2831
|
toPlainDate(e) {
|
|
2844
2832
|
const t = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2845
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, q), prepareCalendarFields(t.Y, e, [
|
|
2833
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, q), prepareCalendarFields(t.Y, e, [wt.t], [])), _), t.Y);
|
|
2846
2834
|
}
|
|
2847
2835
|
};
|
|
2848
2836
|
defineStringTag(mt.prototype, "Temporal.PlainMonthDay"), renameFunction(mt, "PlainMonthDay");
|
|
@@ -2894,9 +2882,9 @@ var Tt = class {
|
|
|
2894
2882
|
const o = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2895
2883
|
validatePartialTemporalObject(e);
|
|
2896
2884
|
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, H), prepareCalendarFields(o.Y, e, [
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2885
|
+
wt.t,
|
|
2886
|
+
wt.u,
|
|
2887
|
+
wt.v
|
|
2900
2888
|
]));
|
|
2901
2889
|
return createTemporalYearMonth(calendarYearMonthFromFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2902
2890
|
}
|
|
@@ -2930,7 +2918,7 @@ var Tt = class {
|
|
|
2930
2918
|
}
|
|
2931
2919
|
toPlainDate(e) {
|
|
2932
2920
|
const t = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2933
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, H), prepareCalendarFields(t.Y, e, [
|
|
2921
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, H), prepareCalendarFields(t.Y, e, [wt.T], [])), _), t.Y);
|
|
2934
2922
|
}
|
|
2935
2923
|
};
|
|
2936
2924
|
defineStringTag(Tt.prototype, "Temporal.PlainYearMonth"), renameFunction(Tt, "PlainYearMonth");
|
|
@@ -3014,10 +3002,10 @@ var ht = class {
|
|
|
3014
3002
|
const o = getInternalSlotOrThrowForPlainDate(this);
|
|
3015
3003
|
validatePartialTemporalObject(e);
|
|
3016
3004
|
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, z), prepareCalendarFields(o.Y, e, [
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3005
|
+
wt.t,
|
|
3006
|
+
wt.u,
|
|
3007
|
+
wt.v,
|
|
3008
|
+
wt.T
|
|
3021
3009
|
])), r = getTemporalOverflowOption(getOptionsObject(t));
|
|
3022
3010
|
return createTemporalDate(calendarDateFromFields(o.Y, n, r), o.Y);
|
|
3023
3011
|
}
|
|
@@ -3067,12 +3055,12 @@ const pt = createNullPrototypeObject(), gt = {
|
|
|
3067
3055
|
}, ft = {
|
|
3068
3056
|
chinese: createLruCache(1e4),
|
|
3069
3057
|
dangi: createLruCache(1e4)
|
|
3070
|
-
}, It = createLruCache(5e3), Ot = createLruCache(1e3), Ft = /* @__PURE__ */ new Map([["ah", 1], ["bh", !1]]), St = createNullPrototypeObject({
|
|
3071
|
-
iso8601:
|
|
3058
|
+
}, It = createLruCache(5e3), Ot = createLruCache(1e3), Ft = /* @__PURE__ */ new Map([["ah", 1], ["bh", !1]]), St = /* @__PURE__ */ new Map(), yt = createNullPrototypeObject({
|
|
3059
|
+
iso8601: St,
|
|
3072
3060
|
buddhist: /* @__PURE__ */ new Map([["be", 1]]),
|
|
3073
|
-
chinese:
|
|
3061
|
+
chinese: St,
|
|
3074
3062
|
coptic: /* @__PURE__ */ new Map([["am", 1]]),
|
|
3075
|
-
dangi:
|
|
3063
|
+
dangi: St,
|
|
3076
3064
|
ethioaa: /* @__PURE__ */ new Map([["aa", 1]]),
|
|
3077
3065
|
ethiopic: /* @__PURE__ */ new Map([["am", 1], ["aa", -5499]]),
|
|
3078
3066
|
gregory: /* @__PURE__ */ new Map([["ce", 1], ["bce", !1]]),
|
|
@@ -3092,7 +3080,7 @@ const pt = createNullPrototypeObject(), gt = {
|
|
|
3092
3080
|
]),
|
|
3093
3081
|
persian: /* @__PURE__ */ new Map([["ap", 1]]),
|
|
3094
3082
|
roc: /* @__PURE__ */ new Map([["roc", 1], ["broc", !1]])
|
|
3095
|
-
}),
|
|
3083
|
+
}), wt = {
|
|
3096
3084
|
ne: "era",
|
|
3097
3085
|
re: "eraYear",
|
|
3098
3086
|
t: "year",
|
|
@@ -3107,41 +3095,41 @@ const pt = createNullPrototypeObject(), gt = {
|
|
|
3107
3095
|
$: "nanosecond",
|
|
3108
3096
|
M: "offset",
|
|
3109
3097
|
P: "timeZone"
|
|
3110
|
-
},
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
],
|
|
3126
|
-
[
|
|
3127
|
-
[
|
|
3128
|
-
[
|
|
3129
|
-
[
|
|
3130
|
-
[
|
|
3131
|
-
[
|
|
3132
|
-
[
|
|
3133
|
-
[
|
|
3134
|
-
[
|
|
3135
|
-
[
|
|
3136
|
-
[
|
|
3137
|
-
[
|
|
3138
|
-
[
|
|
3098
|
+
}, vt = [
|
|
3099
|
+
wt.ne,
|
|
3100
|
+
wt.re,
|
|
3101
|
+
wt.t,
|
|
3102
|
+
wt.u,
|
|
3103
|
+
wt.v,
|
|
3104
|
+
wt.T,
|
|
3105
|
+
wt.D,
|
|
3106
|
+
wt.I,
|
|
3107
|
+
wt.O,
|
|
3108
|
+
wt.F,
|
|
3109
|
+
wt.S,
|
|
3110
|
+
wt.$,
|
|
3111
|
+
wt.M,
|
|
3112
|
+
wt.P
|
|
3113
|
+
], Et = {
|
|
3114
|
+
[wt.ne]: [toString],
|
|
3115
|
+
[wt.re]: [toIntegerWithTruncation],
|
|
3116
|
+
[wt.t]: [toIntegerWithTruncation],
|
|
3117
|
+
[wt.u]: [toPositiveIntegerWithTruncation],
|
|
3118
|
+
[wt.v]: [(e) => createMonthCode(...parseMonthCode(e))],
|
|
3119
|
+
[wt.T]: [toPositiveIntegerWithTruncation],
|
|
3120
|
+
[wt.D]: [toIntegerWithTruncation, 0],
|
|
3121
|
+
[wt.I]: [toIntegerWithTruncation, 0],
|
|
3122
|
+
[wt.O]: [toIntegerWithTruncation, 0],
|
|
3123
|
+
[wt.F]: [toIntegerWithTruncation, 0],
|
|
3124
|
+
[wt.S]: [toIntegerWithTruncation, 0],
|
|
3125
|
+
[wt.$]: [toIntegerWithTruncation, 0],
|
|
3126
|
+
[wt.M]: [(e) => {
|
|
3139
3127
|
const t = toPrimitive(e);
|
|
3140
3128
|
return validateString(t), parseDateTimeUtcOffset(t), t;
|
|
3141
3129
|
}],
|
|
3142
|
-
[
|
|
3143
|
-
},
|
|
3144
|
-
var
|
|
3130
|
+
[wt.P]: [toTemporalTimeZoneIdentifier]
|
|
3131
|
+
}, Mt = /* @__PURE__ */ new WeakMap(), bt = signTimeDuration;
|
|
3132
|
+
var Pt = class {
|
|
3145
3133
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = 0) {
|
|
3146
3134
|
createTemporalDuration(createTemporalDurationSlot([
|
|
3147
3135
|
e,
|
|
@@ -3263,8 +3251,8 @@ var bt = class {
|
|
|
3263
3251
|
throwTypeError(j);
|
|
3264
3252
|
}
|
|
3265
3253
|
};
|
|
3266
|
-
defineStringTag(
|
|
3267
|
-
const
|
|
3254
|
+
defineStringTag(Pt.prototype, "Temporal.Duration"), renameFunction(Pt, "Duration");
|
|
3255
|
+
const Rt = {
|
|
3268
3256
|
[re]: Math.ceil,
|
|
3269
3257
|
[ae]: Math.floor,
|
|
3270
3258
|
[ie]: roundExpand,
|
|
@@ -3274,7 +3262,7 @@ const Pt = {
|
|
|
3274
3262
|
[de]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
|
|
3275
3263
|
[me]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
|
|
3276
3264
|
[ue]: roundHalfEven
|
|
3277
|
-
},
|
|
3265
|
+
}, Nt = {
|
|
3278
3266
|
[re]: Math.ceil,
|
|
3279
3267
|
[ae]: Math.floor,
|
|
3280
3268
|
[ie]: Math.ceil,
|
|
@@ -3284,13 +3272,13 @@ const Pt = {
|
|
|
3284
3272
|
[de]: roundHalfCeil,
|
|
3285
3273
|
[me]: roundHalfFloor,
|
|
3286
3274
|
[ue]: roundHalfEven
|
|
3287
|
-
},
|
|
3275
|
+
}, Zt = globalThis.Intl.DateTimeFormat, $t = /* @__PURE__ */ new WeakMap(), Ct = [
|
|
3288
3276
|
"year",
|
|
3289
3277
|
"month",
|
|
3290
3278
|
"day",
|
|
3291
3279
|
"weekday",
|
|
3292
3280
|
"dateStyle"
|
|
3293
|
-
],
|
|
3281
|
+
], Yt = [
|
|
3294
3282
|
"hour",
|
|
3295
3283
|
"minute",
|
|
3296
3284
|
"second",
|
|
@@ -3298,16 +3286,14 @@ const Pt = {
|
|
|
3298
3286
|
"dayPeriod",
|
|
3299
3287
|
"timeStyle"
|
|
3300
3288
|
];
|
|
3301
|
-
var
|
|
3302
|
-
Le(e) {
|
|
3303
|
-
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
3304
|
-
}
|
|
3305
|
-
}, Ut = class {
|
|
3289
|
+
var Ut = class {
|
|
3306
3290
|
constructor(e, t) {
|
|
3307
|
-
|
|
3291
|
+
$t.set(this, createDateTimeFormat(e, t, x, void 0));
|
|
3308
3292
|
}
|
|
3309
3293
|
get format() {
|
|
3310
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).
|
|
3294
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).Le ||= { ze(e) {
|
|
3295
|
+
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
3296
|
+
} }.ze.bind(this), "name", { value: "" });
|
|
3311
3297
|
}
|
|
3312
3298
|
formatToParts(e) {
|
|
3313
3299
|
return ((e, t) => {
|
|
@@ -3333,9 +3319,9 @@ var Yt = class {
|
|
|
3333
3319
|
return getInternalSlotOrThrowForDateTimeFormat(this).Re.resolvedOptions();
|
|
3334
3320
|
}
|
|
3335
3321
|
};
|
|
3336
|
-
const jt = Object.getOwnPropertyDescriptors(
|
|
3322
|
+
const jt = Object.getOwnPropertyDescriptors(Zt), Wt = Ut.prototype;
|
|
3337
3323
|
jt.prototype.value = Wt;
|
|
3338
|
-
for (const e of ["formatRange", "formatRangeToParts"])
|
|
3324
|
+
for (const e of ["formatRange", "formatRangeToParts"]) Zt.prototype[e] || delete Wt[e];
|
|
3339
3325
|
Object.defineProperties(DateTimeFormat, jt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
3340
3326
|
const At = /* @__PURE__ */ new WeakMap();
|
|
3341
3327
|
var Lt = class {
|
|
@@ -3399,12 +3385,10 @@ var Lt = class {
|
|
|
3399
3385
|
}
|
|
3400
3386
|
};
|
|
3401
3387
|
defineStringTag(Lt.prototype, "Temporal.Instant"), renameFunction(Lt, "Instant");
|
|
3402
|
-
const kt =
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
}
|
|
3407
|
-
}.prototype.toTemporalInstant, zt = {}, Vt = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
3388
|
+
const kt = { toTemporalInstant() {
|
|
3389
|
+
const e = Date.prototype.valueOf.call(this);
|
|
3390
|
+
return e != e && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
3391
|
+
} }.toTemporalInstant, zt = {}, Vt = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
3408
3392
|
Vt.DateTimeFormat.value = DateTimeFormat, Vt.DurationFormat && (Vt.DurationFormat.value = k), Object.defineProperties(zt, Vt);
|
|
3409
3393
|
let xt, Ht = 0, qt = -1 / 0;
|
|
3410
3394
|
const Bt = {
|
|
@@ -3423,7 +3407,7 @@ const Jt = {
|
|
|
3423
3407
|
PlainTime: Ye,
|
|
3424
3408
|
PlainYearMonth: Tt,
|
|
3425
3409
|
PlainMonthDay: mt,
|
|
3426
|
-
Duration:
|
|
3410
|
+
Duration: Pt,
|
|
3427
3411
|
ZonedDateTime: be,
|
|
3428
3412
|
Now: Bt
|
|
3429
3413
|
};
|