universal-parcel-scraper 0.24.1-main.361 → 0.24.2-main.362
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/dist/browser/scraper.js +885 -884
- package/dist/core/detection/candidates.js +10 -2
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
package/dist/browser/scraper.js
CHANGED
|
@@ -83,28 +83,28 @@ var m = class extends t {
|
|
|
83
83
|
constructor(e, t, n) {
|
|
84
84
|
super("transport", e, `${e} is unreachable`, { cause: t }), this.request = n, this.name = "UpstreamNetworkError";
|
|
85
85
|
}
|
|
86
|
-
},
|
|
87
|
-
function
|
|
86
|
+
}, h = 8;
|
|
87
|
+
function g(e) {
|
|
88
88
|
let n = /* @__PURE__ */ new Set(), r = e;
|
|
89
|
-
for (let e = 0; e <
|
|
89
|
+
for (let e = 0; e < h && r instanceof Error && !n.has(r); e += 1) {
|
|
90
90
|
if (n.add(r), r instanceof t) return r.kind;
|
|
91
91
|
r = r.cause;
|
|
92
92
|
}
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function _(e) {
|
|
96
96
|
let n = /* @__PURE__ */ new Set(), r = e;
|
|
97
|
-
for (let e = 0; e <
|
|
97
|
+
for (let e = 0; e < h && r instanceof Error && !n.has(r); e += 1) {
|
|
98
98
|
if (n.add(r), r instanceof t && r.retryAfterMs !== void 0) return r.retryAfterMs;
|
|
99
99
|
r = r.cause;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function te(e) {
|
|
103
103
|
return e instanceof Error && /^(?:Error|[A-Z][A-Za-z0-9_.-]{0,80}(?:Error|Exception))$/.test(e.name.trim()) ? e.name.trim() : e instanceof Error ? "Error" : typeof e;
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region carriers/the-courier-guy/number.ts
|
|
107
|
-
function
|
|
107
|
+
function ne(e) {
|
|
108
108
|
let t = e.replace(/\s/g, "").toUpperCase(), n = /^(DD|LD)-?([A-Z0-9]{6})$/.exec(t);
|
|
109
109
|
if (n) return `${n[1]}-${n[2]}`;
|
|
110
110
|
if (!/^[A-Z0-9]{5,40}$/.test(t)) throw new u("The Courier Guy", "The Courier Guy requires a shipment tracking reference");
|
|
@@ -112,13 +112,13 @@ function ie(e) {
|
|
|
112
112
|
}
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region carriers/postlogistics/number.ts
|
|
115
|
-
function
|
|
115
|
+
function re(e) {
|
|
116
116
|
let t = e.trim();
|
|
117
117
|
return /^\d{11}$/.test(t) ? `${t.slice(0, 8)}-${t.slice(8)}` : t;
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region core/detection/mondialRelay.ts
|
|
121
|
-
function
|
|
121
|
+
function ie(e) {
|
|
122
122
|
if (!/^\d{26}$/.test(e)) return !1;
|
|
123
123
|
let t = (e) => {
|
|
124
124
|
let t = 11 - [...e].reverse().reduce((e, t, n) => e + Number(t) * (2 + n % 6), 0) % 11;
|
|
@@ -128,24 +128,24 @@ function oe(e) {
|
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region core/detection/normalize.ts
|
|
131
|
-
function
|
|
131
|
+
function v(e) {
|
|
132
132
|
return e.toUpperCase().replace(/[\s.-]/g, "");
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return /^99990\d{8}$/.test(
|
|
134
|
+
function ae(e) {
|
|
135
|
+
return /^99990\d{8}$/.test(v(e));
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (t === "postlogistics") return
|
|
139
|
-
let n =
|
|
140
|
-
return
|
|
137
|
+
function oe(e, t) {
|
|
138
|
+
if (t === "postlogistics") return re(e);
|
|
139
|
+
let n = v(e);
|
|
140
|
+
return ae(n) ? `${n.slice(0, 3)}.${n.slice(3, 5)}.${n.slice(5)}` : /^\d{18}$/.test(n) ? `${n.slice(0, 2)}.${n.slice(2, 4)}.${n.slice(4, 10)}.${n.slice(10)}` : n;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
let t =
|
|
142
|
+
function se(e) {
|
|
143
|
+
let t = v(e);
|
|
144
144
|
return t.length >= 4 && t.length <= 40 && (/^[A-Z0-9]+$/.test(t) || /^\d{4}\/\d{8}$/.test(t)) && /\d/.test(t);
|
|
145
145
|
}
|
|
146
146
|
//#endregion
|
|
147
147
|
//#region generated/catalog.ts
|
|
148
|
-
var
|
|
148
|
+
var ce = {
|
|
149
149
|
"swiss-post": {
|
|
150
150
|
displayName: "Swiss Post",
|
|
151
151
|
color: "#ffcc00",
|
|
@@ -3550,7 +3550,7 @@ var ue = {
|
|
|
3550
3550
|
confidence: "low"
|
|
3551
3551
|
}]
|
|
3552
3552
|
}
|
|
3553
|
-
},
|
|
3553
|
+
}, le = /* @__PURE__ */ "swiss-post.swiss-post-cargo.quickpac.planzer.aliexpress.sunyou.hermes.spring-gds.postlogistics.dachser.dhl.dhl-ecommerce.ups.amazon-logistics.amazon-shipping.fedex.gls-ch.dpd.dpd-fr.mondial-relay.relais-colis.la-poste.chronopost.gls-fr.colis-prive.geodis.colisweb.c-chez-vous.heppner.ciblex.paack.asendia.shipup.india-post.hermes-de.gls-de.delivengo.intl-post.unknown.royal-mail.parcelforce.evri.inpost.an-post.bpost.austrian-post.postnord.posti.correos-express.seur.mrw.nacex.ctt.ctt-express.poste-italiane.brt.ecoscooting.tipsa.ukrposhta.usps.canada-post.purolator.canpar.ontrac.speedx.uniuni.landmark-global.old-dominion.spee-dee.gofo.estafeta.correios-br.correos-chile.yunexpress.four-px.blue-dart.delhivery.nz-post.singapore-post.japan-post.sf-express.sto.yunda.yto.zto.jd-logistics.yamato.korea-post.thailand-post.dtdc.australia-post.hongkong-post.pos-malaysia.ninja-van.china-post.packeta.poczta-polska.bring-posten.aramex.tnt.correos-spain.yanwen.the-courier-guy.j-and-t.ems.cne.dhl-express.dpd-de.dpd-uk.ekart.evri-uk.intelcom.lbc-express.nova-poshta.omgo.sagawa.speedpak.spx-ph.xpressbees".split("."), ue = [
|
|
3554
3554
|
"pending",
|
|
3555
3555
|
"registered",
|
|
3556
3556
|
"accepted",
|
|
@@ -3562,16 +3562,16 @@ var ue = {
|
|
|
3562
3562
|
"ready_for_pickup",
|
|
3563
3563
|
"returned",
|
|
3564
3564
|
"exception"
|
|
3565
|
-
],
|
|
3566
|
-
function
|
|
3567
|
-
return new RegExp(
|
|
3565
|
+
], de = ce["amazon-logistics"].detectionRules[0].pattern;
|
|
3566
|
+
function fe(e) {
|
|
3567
|
+
return new RegExp(de).test(e.replace(/[\s.-]/g, "").toUpperCase());
|
|
3568
3568
|
}
|
|
3569
3569
|
//#endregion
|
|
3570
3570
|
//#region core/catalog/amazon.ts
|
|
3571
|
-
function
|
|
3572
|
-
return e !== "amazon-shipping" && (e === "amazon-logistics" ||
|
|
3571
|
+
function pe(e, t = "") {
|
|
3572
|
+
return e !== "amazon-shipping" && (e === "amazon-logistics" || fe(t));
|
|
3573
3573
|
}
|
|
3574
|
-
function
|
|
3574
|
+
function me(e) {
|
|
3575
3575
|
let t = e.replace(/[\s.-]/g, "").toUpperCase();
|
|
3576
3576
|
return t.startsWith("TBC") ? "ca" : t.startsWith("TBM") ? "com.mx" : {
|
|
3577
3577
|
FR: "fr",
|
|
@@ -3590,10 +3590,10 @@ function ge(e) {
|
|
|
3590
3590
|
TR: "com.tr"
|
|
3591
3591
|
}[t.slice(0, 2)] ?? "com";
|
|
3592
3592
|
}
|
|
3593
|
-
function
|
|
3594
|
-
return `https://www.amazon.${
|
|
3593
|
+
function he(e) {
|
|
3594
|
+
return `https://www.amazon.${me(e)}/gp/your-account/order-history`;
|
|
3595
3595
|
}
|
|
3596
|
-
function
|
|
3596
|
+
function ge(e) {
|
|
3597
3597
|
return `https://track.amazon.${{
|
|
3598
3598
|
IT: "it",
|
|
3599
3599
|
ES: "es",
|
|
@@ -3602,30 +3602,30 @@ function ve(e) {
|
|
|
3602
3602
|
TB: "com"
|
|
3603
3603
|
}[e.replace(/[\s.-]/g, "").toUpperCase().slice(0, 2)] ?? "fr"}`;
|
|
3604
3604
|
}
|
|
3605
|
-
function
|
|
3606
|
-
return `${
|
|
3605
|
+
function _e(e) {
|
|
3606
|
+
return `${ge(e)}/tracking/${encodeURIComponent(e.replace(/[\s.-]/g, "").toUpperCase())}`;
|
|
3607
3607
|
}
|
|
3608
3608
|
//#endregion
|
|
3609
3609
|
//#region core/catalog/definitions.ts
|
|
3610
|
-
var
|
|
3611
|
-
function
|
|
3612
|
-
let t =
|
|
3610
|
+
var y = ce;
|
|
3611
|
+
function b(e) {
|
|
3612
|
+
let t = y[e];
|
|
3613
3613
|
if (!t) throw RangeError(`Unknown carrier ${e}`);
|
|
3614
3614
|
return t;
|
|
3615
3615
|
}
|
|
3616
|
-
function
|
|
3617
|
-
return
|
|
3616
|
+
function ve(e) {
|
|
3617
|
+
return b(e).timezone ?? "UTC";
|
|
3618
3618
|
}
|
|
3619
|
-
function
|
|
3620
|
-
return
|
|
3619
|
+
function ye(e) {
|
|
3620
|
+
return b(e).tracking.adapter;
|
|
3621
3621
|
}
|
|
3622
|
-
function
|
|
3623
|
-
return (
|
|
3622
|
+
function be(e, t) {
|
|
3623
|
+
return (b(e).tracking.requirements ?? []).filter((e) => !e.whenTrackingNumber || RegExp(`^(?:${e.whenTrackingNumber})$`).test(t));
|
|
3624
3624
|
}
|
|
3625
|
-
function
|
|
3626
|
-
return
|
|
3625
|
+
function xe(e, t) {
|
|
3626
|
+
return be(e, t).filter((e) => e.optional !== !0);
|
|
3627
3627
|
}
|
|
3628
|
-
var
|
|
3628
|
+
var Se = new Set(Object.entries(y).filter(([, e]) => e.tracking.mode === "automatic").map(([e]) => e)), Ce = new Map(Object.entries(y).filter(([e]) => Se.has(e)).map(([e, t]) => [e, t.tracking.upstreamName ?? t.displayName])), we = Object.entries(y).flatMap(([e, t]) => t.linkRules.map((t) => ({
|
|
3629
3629
|
carrier: e,
|
|
3630
3630
|
domains: [...t.domains],
|
|
3631
3631
|
params: t.params ? [...t.params] : void 0,
|
|
@@ -3636,29 +3636,29 @@ var we = new Set(Object.entries(_).filter(([, e]) => e.tracking.mode === "automa
|
|
|
3636
3636
|
detectFromNumber: t.detectFromNumber,
|
|
3637
3637
|
keepsCapabilityUrl: t.keepsCapabilityUrl
|
|
3638
3638
|
})));
|
|
3639
|
-
function
|
|
3640
|
-
return
|
|
3639
|
+
function Te(e) {
|
|
3640
|
+
return we.filter((t) => t.carrier === e);
|
|
3641
3641
|
}
|
|
3642
|
-
function
|
|
3642
|
+
function Ee(e, t) {
|
|
3643
3643
|
return e === t || e.endsWith(`.${t}`);
|
|
3644
3644
|
}
|
|
3645
3645
|
//#endregion
|
|
3646
3646
|
//#region core/catalog/index.ts
|
|
3647
|
-
function
|
|
3648
|
-
let n =
|
|
3649
|
-
if (e === "mondial-relay" &&
|
|
3647
|
+
function De(e, t) {
|
|
3648
|
+
let n = v(t);
|
|
3649
|
+
if (e === "mondial-relay" && ie(n)) return n.slice(0, 12);
|
|
3650
3650
|
if (e === "c-chez-vous") {
|
|
3651
3651
|
let e = /^([A-Z0-9]{11})(\d{5})$/.exec(n);
|
|
3652
3652
|
if (e) return `${e[1]}--${e[2]}`;
|
|
3653
3653
|
}
|
|
3654
|
-
return e === "the-courier-guy" && /^(DD|LD)([A-Z0-9]{6})$/.exec(n) ?
|
|
3654
|
+
return e === "the-courier-guy" && /^(DD|LD)([A-Z0-9]{6})$/.exec(n) ? ne(n) : e === "postlogistics" ? re(t) : t;
|
|
3655
3655
|
}
|
|
3656
|
-
function
|
|
3657
|
-
if (e === "amazon-logistics") return
|
|
3658
|
-
if (e === "amazon-shipping") return
|
|
3659
|
-
if (t) return (n) => t.replace("{trackingNumber}", encodeURIComponent(
|
|
3656
|
+
function Oe(e, t) {
|
|
3657
|
+
if (e === "amazon-logistics") return he;
|
|
3658
|
+
if (e === "amazon-shipping") return _e;
|
|
3659
|
+
if (t) return (n) => t.replace("{trackingNumber}", encodeURIComponent(De(e, n)));
|
|
3660
3660
|
}
|
|
3661
|
-
function
|
|
3661
|
+
function ke(e, t) {
|
|
3662
3662
|
return {
|
|
3663
3663
|
id: e,
|
|
3664
3664
|
name: t.displayName,
|
|
@@ -3666,7 +3666,7 @@ function je(e, t) {
|
|
|
3666
3666
|
countries: t.countries ?? [],
|
|
3667
3667
|
trackingSiteName: t.trackingSiteName,
|
|
3668
3668
|
color: t.color,
|
|
3669
|
-
trackingUrl:
|
|
3669
|
+
trackingUrl: Oe(e, t.trackingUrlTemplate),
|
|
3670
3670
|
capabilities: {
|
|
3671
3671
|
tracking: {
|
|
3672
3672
|
mode: t.tracking.mode,
|
|
@@ -3678,27 +3678,27 @@ function je(e, t) {
|
|
|
3678
3678
|
}
|
|
3679
3679
|
};
|
|
3680
3680
|
}
|
|
3681
|
-
var
|
|
3682
|
-
function
|
|
3683
|
-
let n =
|
|
3681
|
+
var x = Object.fromEntries(Object.entries(y).map(([e, t]) => [e, ke(e, t)]));
|
|
3682
|
+
function Ae(e, t) {
|
|
3683
|
+
let n = x[e] ?? x.unknown, r = t ? y[n.id].displayNames?.[t] : void 0;
|
|
3684
3684
|
return r ? {
|
|
3685
3685
|
...n,
|
|
3686
3686
|
name: r
|
|
3687
3687
|
} : n;
|
|
3688
3688
|
}
|
|
3689
|
-
var
|
|
3690
|
-
function
|
|
3691
|
-
let n =
|
|
3692
|
-
return
|
|
3689
|
+
var je = Object.values(x).filter((e) => e.capabilities.selectable);
|
|
3690
|
+
function Me(e, t) {
|
|
3691
|
+
let n = v(t);
|
|
3692
|
+
return x[e].capabilities.tracking.requirements.filter((e) => !e.whenTrackingNumber || new RegExp(e.whenTrackingNumber).test(n));
|
|
3693
3693
|
}
|
|
3694
|
-
function
|
|
3694
|
+
function Ne(e, t) {
|
|
3695
3695
|
let n = t.trim();
|
|
3696
3696
|
return n ? !e.pattern || new RegExp(e.pattern).test(n) : e.optional === !0;
|
|
3697
3697
|
}
|
|
3698
|
-
function
|
|
3699
|
-
return
|
|
3698
|
+
function Pe(e) {
|
|
3699
|
+
return x[e].capabilities.tracking.mode === "automatic";
|
|
3700
3700
|
}
|
|
3701
|
-
function
|
|
3701
|
+
function Fe(e, t, n) {
|
|
3702
3702
|
if (!n || ![
|
|
3703
3703
|
"en",
|
|
3704
3704
|
"de",
|
|
@@ -3727,44 +3727,44 @@ function Le(e, t, n) {
|
|
|
3727
3727
|
}
|
|
3728
3728
|
//#endregion
|
|
3729
3729
|
//#region core/detection/correosSpain.ts
|
|
3730
|
-
var
|
|
3731
|
-
function
|
|
3730
|
+
var Ie = "TRWAGMYFPDXBNJZSQVHLCKE";
|
|
3731
|
+
function Le(e) {
|
|
3732
3732
|
let t = 0;
|
|
3733
3733
|
for (let n = 0; n < e.length - 1; n++) t += e.charCodeAt(n);
|
|
3734
|
-
return e.length > 1 &&
|
|
3734
|
+
return e.length > 1 && Ie[t % 23] === e.at(-1);
|
|
3735
3735
|
}
|
|
3736
3736
|
//#endregion
|
|
3737
3737
|
//#region core/detection/dpd.ts
|
|
3738
|
-
var
|
|
3739
|
-
function
|
|
3738
|
+
var Re = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
3739
|
+
function ze(e) {
|
|
3740
3740
|
let t = 36;
|
|
3741
3741
|
for (let n of e) t += Number(n), t > 36 && (t -= 36), t *= 2, t > 36 && (t -= 37);
|
|
3742
|
-
return
|
|
3742
|
+
return Re[(37 - t) % 36];
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3745
|
-
return /^\d{14}[0-9A-Z]$/.test(e) && e[14] ===
|
|
3744
|
+
function Be(e) {
|
|
3745
|
+
return /^\d{14}[0-9A-Z]$/.test(e) && e[14] === ze(e.slice(0, 14));
|
|
3746
3746
|
}
|
|
3747
3747
|
//#endregion
|
|
3748
3748
|
//#region core/detection/cttExpress.ts
|
|
3749
|
-
function
|
|
3749
|
+
function Ve(e) {
|
|
3750
3750
|
return /^00\d{20}(?:001)?$/.test(e);
|
|
3751
3751
|
}
|
|
3752
3752
|
//#endregion
|
|
3753
3753
|
//#region core/detection/gls.ts
|
|
3754
|
-
function
|
|
3754
|
+
function He(e) {
|
|
3755
3755
|
return /^\d{12}$/.test(e) ? (10 - [...e.slice(0, 11)].reverse().reduce((e, t, n) => e + Number(t) * (n % 2 == 0 ? 3 : 1), 1) % 10) % 10 === Number(e[11]) : !1;
|
|
3756
3756
|
}
|
|
3757
3757
|
//#endregion
|
|
3758
3758
|
//#region core/detection/hermes.ts
|
|
3759
|
-
function
|
|
3759
|
+
function Ue(e) {
|
|
3760
3760
|
return /^\d{14}$/.test(e) ? (10 - [...e.slice(0, 13)].reduce((e, t, n) => e + Number(t) * (n % 2 == 0 ? 3 : 1), 0) % 10) % 10 === Number(e[13]) : !1;
|
|
3761
3761
|
}
|
|
3762
3762
|
//#endregion
|
|
3763
3763
|
//#region core/detection/numericChecksums.ts
|
|
3764
|
-
function
|
|
3764
|
+
function We(e) {
|
|
3765
3765
|
return e.length === 10 && /^\d{10}$/.test(e) && Number(e.slice(0, 9)) % 7 === Number(e[9]);
|
|
3766
3766
|
}
|
|
3767
|
-
function
|
|
3767
|
+
function Ge(e) {
|
|
3768
3768
|
if (e.length !== 9 || !/^\d{9}$/.test(e)) return !1;
|
|
3769
3769
|
let t = Number(e[8]);
|
|
3770
3770
|
if (Number(e.slice(0, 8)) % 7 === t) return !0;
|
|
@@ -3780,13 +3780,13 @@ function qe(e) {
|
|
|
3780
3780
|
].reduce((t, n, r) => t + Number(e[r]) * n, 0) % 11;
|
|
3781
3781
|
return (n === 11 ? 5 : n === 10 ? 0 : n) === t;
|
|
3782
3782
|
}
|
|
3783
|
-
function
|
|
3783
|
+
function Ke(e) {
|
|
3784
3784
|
return e.length !== 20 || !/^\d{20}$/.test(e) ? !1 : (10 - [...e.slice(0, 19)].reduce((e, t, n) => e + Number(t) * (n % 2 ? 1 : 3), 0) % 10) % 10 === Number(e[19]);
|
|
3785
3785
|
}
|
|
3786
3786
|
//#endregion
|
|
3787
3787
|
//#region core/detection/s10.ts
|
|
3788
|
-
function
|
|
3789
|
-
let t =
|
|
3788
|
+
function qe(e) {
|
|
3789
|
+
let t = v(e);
|
|
3790
3790
|
if (!/^[A-Z]{2}\d{9}[A-Z]{2}$/.test(t)) return !1;
|
|
3791
3791
|
let n = 11 - [
|
|
3792
3792
|
8,
|
|
@@ -3800,17 +3800,17 @@ function Ye(e) {
|
|
|
3800
3800
|
].reduce((e, n, r) => e + Number(t[r + 2]) * n, 0) % 11, r = n === 10 ? 0 : n === 11 ? 5 : n;
|
|
3801
3801
|
return Number(t[10]) === r;
|
|
3802
3802
|
}
|
|
3803
|
-
function
|
|
3804
|
-
let t =
|
|
3805
|
-
return /^L[A-Z]\d{9}CH$/.test(t) &&
|
|
3803
|
+
function Je(e) {
|
|
3804
|
+
let t = v(e);
|
|
3805
|
+
return /^L[A-Z]\d{9}CH$/.test(t) && qe(t);
|
|
3806
3806
|
}
|
|
3807
3807
|
//#endregion
|
|
3808
3808
|
//#region core/detection/detect.ts
|
|
3809
|
-
function
|
|
3810
|
-
return e.checksum === "mondial-relay" ?
|
|
3809
|
+
function Ye(e, t) {
|
|
3810
|
+
return e.checksum === "mondial-relay" ? ie(t) : e.checksum === "s10" ? qe(t) : e.checksum === "hermes" ? Ue(t) : e.checksum === "gls" ? He(t) : e.checksum === "dhl-express" ? We(t) : e.checksum === "tnt" ? Ge(t) : e.checksum === "poczta-polska" ? Ke(t) : e.checksum === "correos-spain" ? Le(t) : e.checksum !== "dpd" || Be(t);
|
|
3811
3811
|
}
|
|
3812
|
-
function
|
|
3813
|
-
let t = e.trim().toUpperCase(), n =
|
|
3812
|
+
function S(e) {
|
|
3813
|
+
let t = e.trim().toUpperCase(), n = v(e);
|
|
3814
3814
|
if (!n) return {
|
|
3815
3815
|
carrier: "unknown",
|
|
3816
3816
|
confidence: "none",
|
|
@@ -3818,9 +3818,9 @@ function b(e) {
|
|
|
3818
3818
|
preferred: []
|
|
3819
3819
|
};
|
|
3820
3820
|
let r = [];
|
|
3821
|
-
for (let [e, i] of Object.entries(
|
|
3822
|
-
if (e === "ctt-express" && !
|
|
3823
|
-
let a = i.detectionRules.find((e) => new RegExp(e.pattern).test(n) && (!e.rawPattern || new RegExp(e.rawPattern).test(t)) &&
|
|
3821
|
+
for (let [e, i] of Object.entries(y)) {
|
|
3822
|
+
if (e === "ctt-express" && !Ve(n)) continue;
|
|
3823
|
+
let a = i.detectionRules.find((e) => new RegExp(e.pattern).test(n) && (!e.rawPattern || new RegExp(e.rawPattern).test(t)) && Ye(e, n));
|
|
3824
3824
|
a && r.push({
|
|
3825
3825
|
carrier: e,
|
|
3826
3826
|
confidence: a.confidence,
|
|
@@ -3840,13 +3840,13 @@ function b(e) {
|
|
|
3840
3840
|
preferred: o
|
|
3841
3841
|
};
|
|
3842
3842
|
}
|
|
3843
|
-
function
|
|
3844
|
-
return
|
|
3843
|
+
function Xe(e) {
|
|
3844
|
+
return S(e).carrier;
|
|
3845
3845
|
}
|
|
3846
3846
|
//#endregion
|
|
3847
3847
|
//#region core/detection/candidates.ts
|
|
3848
|
-
var
|
|
3849
|
-
RegExp(`\\b${
|
|
3848
|
+
var Ze = [
|
|
3849
|
+
RegExp(`\\b${de.slice(1, -1).replaceAll("[0-9]", "(?:[\\s.-]*[0-9])")}\\b`, "gi"),
|
|
3850
3850
|
/\b\d{4}\/\d{8}\b/g,
|
|
3851
3851
|
/\b\d{26}\b/g,
|
|
3852
3852
|
/\bH\d{15,19}\b/gi,
|
|
@@ -3857,18 +3857,19 @@ var $e = [
|
|
|
3857
3857
|
/\b\d(?:[\s.-]?\d){9,19}\b/g,
|
|
3858
3858
|
/\b[A-Z0-9]{4,40}\b/gi
|
|
3859
3859
|
];
|
|
3860
|
-
function
|
|
3861
|
-
for (let t of
|
|
3860
|
+
function Qe(e) {
|
|
3861
|
+
for (let t of Ze) {
|
|
3862
3862
|
t.lastIndex = 0;
|
|
3863
3863
|
for (let n of e.matchAll(t)) {
|
|
3864
3864
|
let e = n[0].trim();
|
|
3865
|
-
if (
|
|
3865
|
+
if (S(e).confidence === "high") return e;
|
|
3866
3866
|
}
|
|
3867
3867
|
}
|
|
3868
3868
|
}
|
|
3869
|
+
var $e = String.raw`(?:numbers?(?![A-Z])|no\.|(?:no|id)(?![A-Z0-9.]))`, et = new RegExp(String.raw`(?:track(?:ing)?(?:\s*${$e}|(?![A-Z]))` + String.raw`|(?:parcel|shipment)(?:\s+(?:tracking(?![A-Z])|${$e})|(?![A-Z])))` + String.raw`(?:\s+is(?![A-Z0-9]))?\s*[:#-]?\s*` + String.raw`((?=[A-Z0-9.-]{0,39}\d)[A-Z0-9][A-Z0-9.-]{3,39})`, "i");
|
|
3869
3870
|
function tt(e) {
|
|
3870
|
-
let t =
|
|
3871
|
-
return t &&
|
|
3871
|
+
let t = et.exec(e)?.[1]?.replace(/[.-]+$/, "");
|
|
3872
|
+
return t && se(t) ? t : void 0;
|
|
3872
3873
|
}
|
|
3873
3874
|
//#endregion
|
|
3874
3875
|
//#region core/detection/parse.ts
|
|
@@ -3884,13 +3885,13 @@ function it(e, t) {
|
|
|
3884
3885
|
}
|
|
3885
3886
|
function at(e, t) {
|
|
3886
3887
|
let n = t.params ? it(e, t.params) : void 0, r = t.query?.exec(decodeURIComponent(e.search.slice(1)))?.[1], i = t.path?.exec(e.pathname)?.[1], a = t.fragment?.exec(decodeURIComponent(e.hash.slice(1)))?.[1], o = rt(n ?? r ?? i ?? a ?? "");
|
|
3887
|
-
return
|
|
3888
|
+
return se(o) ? o : void 0;
|
|
3888
3889
|
}
|
|
3889
3890
|
function ot(e, t) {
|
|
3890
3891
|
return {
|
|
3891
3892
|
trackingNumber: e,
|
|
3892
3893
|
source: t,
|
|
3893
|
-
...
|
|
3894
|
+
...S(e)
|
|
3894
3895
|
};
|
|
3895
3896
|
}
|
|
3896
3897
|
function st(e) {
|
|
@@ -3907,12 +3908,12 @@ function st(e) {
|
|
|
3907
3908
|
for (let e of n) {
|
|
3908
3909
|
let t = nt(e);
|
|
3909
3910
|
try {
|
|
3910
|
-
let e = new URL(t), n =
|
|
3911
|
+
let e = new URL(t), n = we.filter((t) => t.domains.some((t) => Ee(e.hostname.toLowerCase(), t)) && (!t.pathPattern || t.pathPattern.test(e.pathname))), r = (t) => Math.max(...t.domains.filter((t) => Ee(e.hostname.toLowerCase(), t)).map((e) => e.length));
|
|
3911
3912
|
n.sort((e, t) => r(t) - r(e));
|
|
3912
3913
|
for (let r of n) {
|
|
3913
3914
|
let i = at(e, r);
|
|
3914
3915
|
if (i) {
|
|
3915
|
-
let e =
|
|
3916
|
+
let e = S(i), a = n.filter((t) => e.candidates.includes(t.carrier)), o = new Set(a.map((e) => e.carrier));
|
|
3916
3917
|
if (r.detectFromNumber && (e.confidence === "high" || e.confidence === "low" && o.size > 1)) return {
|
|
3917
3918
|
trackingNumber: i,
|
|
3918
3919
|
...e,
|
|
@@ -3930,14 +3931,14 @@ function st(e) {
|
|
|
3930
3931
|
};
|
|
3931
3932
|
}
|
|
3932
3933
|
}
|
|
3933
|
-
let i =
|
|
3934
|
+
let i = Qe(decodeURIComponent(e.href));
|
|
3934
3935
|
if (i) return ot(i, "link");
|
|
3935
3936
|
} catch {}
|
|
3936
3937
|
}
|
|
3937
|
-
let r =
|
|
3938
|
+
let r = Qe(t);
|
|
3938
3939
|
if (r) return ot(r, t === r ? "number" : "text");
|
|
3939
3940
|
let i = tt(t);
|
|
3940
|
-
return i ? ot(i, "text") : !t.includes("://") &&
|
|
3941
|
+
return i ? ot(i, "text") : !t.includes("://") && se(t) ? ot(t, "number") : {
|
|
3941
3942
|
trackingNumber: "",
|
|
3942
3943
|
carrier: "unknown",
|
|
3943
3944
|
confidence: "none",
|
|
@@ -3960,7 +3961,7 @@ var lt = /* @__PURE__ */ new Set([
|
|
|
3960
3961
|
"delivered",
|
|
3961
3962
|
"exception",
|
|
3962
3963
|
"unknown"
|
|
3963
|
-
]), ut = new Set(
|
|
3964
|
+
]), ut = new Set(ue), dt = [
|
|
3964
3965
|
"current_stage_source",
|
|
3965
3966
|
"last_status_text",
|
|
3966
3967
|
"last_update",
|
|
@@ -4001,7 +4002,7 @@ function mt(e) {
|
|
|
4001
4002
|
}
|
|
4002
4003
|
let n = t.weight_kg;
|
|
4003
4004
|
if (n != null && (typeof n != "number" || !Number.isFinite(n) || n < 0)) throw TypeError("The carrier adapter returned an invalid parcel weight");
|
|
4004
|
-
(t.delivery_carrier != null && (typeof t.delivery_carrier != "string" || !Object.hasOwn(
|
|
4005
|
+
(t.delivery_carrier != null && (typeof t.delivery_carrier != "string" || !Object.hasOwn(ce, t.delivery_carrier)) || t.delivery_tracking_number != null && (typeof t.delivery_tracking_number != "string" || !/^[A-Z0-9]{4,40}$/.test(t.delivery_tracking_number))) && (delete t.delivery_carrier, delete t.delivery_tracking_number), (typeof t.destination_country != "string" || !/^[A-Z]{2}$/.test(t.destination_country)) && delete t.destination_country, (typeof t.destination_country_name != "string" || t.destination_country_name.length > 80) && delete t.destination_country_name;
|
|
4005
4006
|
let r = t.events ?? [];
|
|
4006
4007
|
if (!Array.isArray(r)) throw TypeError("The carrier adapter returned invalid tracking events");
|
|
4007
4008
|
return t.events = r.map((e) => {
|
|
@@ -4215,178 +4216,178 @@ function yt(e, t = "in_transit") {
|
|
|
4215
4216
|
}
|
|
4216
4217
|
//#endregion
|
|
4217
4218
|
//#region node_modules/luxon/build/es6/luxon.mjs
|
|
4218
|
-
var
|
|
4219
|
+
var C = class extends Error {}, bt = class extends C {
|
|
4219
4220
|
constructor(e) {
|
|
4220
4221
|
super(`Invalid DateTime: ${e.toMessage()}`);
|
|
4221
4222
|
}
|
|
4222
|
-
}, xt = class extends
|
|
4223
|
+
}, xt = class extends C {
|
|
4223
4224
|
constructor(e) {
|
|
4224
4225
|
super(`Invalid Interval: ${e.toMessage()}`);
|
|
4225
4226
|
}
|
|
4226
|
-
}, St = class extends
|
|
4227
|
+
}, St = class extends C {
|
|
4227
4228
|
constructor(e) {
|
|
4228
4229
|
super(`Invalid Duration: ${e.toMessage()}`);
|
|
4229
4230
|
}
|
|
4230
|
-
},
|
|
4231
|
+
}, w = class extends C {}, Ct = class extends C {
|
|
4231
4232
|
constructor(e) {
|
|
4232
4233
|
super(`Invalid unit ${e}`);
|
|
4233
4234
|
}
|
|
4234
|
-
},
|
|
4235
|
+
}, T = class extends C {}, E = class extends C {
|
|
4235
4236
|
constructor() {
|
|
4236
4237
|
super("Zone is an abstract class");
|
|
4237
4238
|
}
|
|
4238
|
-
},
|
|
4239
|
-
year:
|
|
4240
|
-
month:
|
|
4241
|
-
day:
|
|
4239
|
+
}, D = "numeric", O = "short", k = "long", wt = {
|
|
4240
|
+
year: D,
|
|
4241
|
+
month: D,
|
|
4242
|
+
day: D
|
|
4242
4243
|
}, Tt = {
|
|
4243
|
-
year:
|
|
4244
|
-
month:
|
|
4245
|
-
day:
|
|
4244
|
+
year: D,
|
|
4245
|
+
month: O,
|
|
4246
|
+
day: D
|
|
4246
4247
|
}, Et = {
|
|
4247
|
-
year:
|
|
4248
|
-
month:
|
|
4249
|
-
day:
|
|
4250
|
-
weekday:
|
|
4248
|
+
year: D,
|
|
4249
|
+
month: O,
|
|
4250
|
+
day: D,
|
|
4251
|
+
weekday: O
|
|
4251
4252
|
}, Dt = {
|
|
4252
|
-
year:
|
|
4253
|
-
month:
|
|
4254
|
-
day:
|
|
4253
|
+
year: D,
|
|
4254
|
+
month: k,
|
|
4255
|
+
day: D
|
|
4255
4256
|
}, Ot = {
|
|
4256
|
-
year:
|
|
4257
|
-
month:
|
|
4258
|
-
day:
|
|
4259
|
-
weekday:
|
|
4257
|
+
year: D,
|
|
4258
|
+
month: k,
|
|
4259
|
+
day: D,
|
|
4260
|
+
weekday: k
|
|
4260
4261
|
}, kt = {
|
|
4261
|
-
hour:
|
|
4262
|
-
minute:
|
|
4262
|
+
hour: D,
|
|
4263
|
+
minute: D
|
|
4263
4264
|
}, At = {
|
|
4264
|
-
hour:
|
|
4265
|
-
minute:
|
|
4266
|
-
second:
|
|
4265
|
+
hour: D,
|
|
4266
|
+
minute: D,
|
|
4267
|
+
second: D
|
|
4267
4268
|
}, jt = {
|
|
4268
|
-
hour:
|
|
4269
|
-
minute:
|
|
4270
|
-
second:
|
|
4271
|
-
timeZoneName:
|
|
4269
|
+
hour: D,
|
|
4270
|
+
minute: D,
|
|
4271
|
+
second: D,
|
|
4272
|
+
timeZoneName: O
|
|
4272
4273
|
}, Mt = {
|
|
4273
|
-
hour:
|
|
4274
|
-
minute:
|
|
4275
|
-
second:
|
|
4276
|
-
timeZoneName:
|
|
4274
|
+
hour: D,
|
|
4275
|
+
minute: D,
|
|
4276
|
+
second: D,
|
|
4277
|
+
timeZoneName: k
|
|
4277
4278
|
}, Nt = {
|
|
4278
|
-
hour:
|
|
4279
|
-
minute:
|
|
4279
|
+
hour: D,
|
|
4280
|
+
minute: D,
|
|
4280
4281
|
hourCycle: "h23"
|
|
4281
4282
|
}, Pt = {
|
|
4282
|
-
hour:
|
|
4283
|
-
minute:
|
|
4284
|
-
second:
|
|
4283
|
+
hour: D,
|
|
4284
|
+
minute: D,
|
|
4285
|
+
second: D,
|
|
4285
4286
|
hourCycle: "h23"
|
|
4286
4287
|
}, Ft = {
|
|
4287
|
-
hour:
|
|
4288
|
-
minute:
|
|
4289
|
-
second:
|
|
4288
|
+
hour: D,
|
|
4289
|
+
minute: D,
|
|
4290
|
+
second: D,
|
|
4290
4291
|
hourCycle: "h23",
|
|
4291
|
-
timeZoneName:
|
|
4292
|
+
timeZoneName: O
|
|
4292
4293
|
}, It = {
|
|
4293
|
-
hour:
|
|
4294
|
-
minute:
|
|
4295
|
-
second:
|
|
4294
|
+
hour: D,
|
|
4295
|
+
minute: D,
|
|
4296
|
+
second: D,
|
|
4296
4297
|
hourCycle: "h23",
|
|
4297
|
-
timeZoneName:
|
|
4298
|
+
timeZoneName: k
|
|
4298
4299
|
}, Lt = {
|
|
4299
|
-
year:
|
|
4300
|
-
month:
|
|
4301
|
-
day:
|
|
4302
|
-
hour:
|
|
4303
|
-
minute:
|
|
4300
|
+
year: D,
|
|
4301
|
+
month: D,
|
|
4302
|
+
day: D,
|
|
4303
|
+
hour: D,
|
|
4304
|
+
minute: D
|
|
4304
4305
|
}, Rt = {
|
|
4305
|
-
year:
|
|
4306
|
-
month:
|
|
4307
|
-
day:
|
|
4308
|
-
hour:
|
|
4309
|
-
minute:
|
|
4310
|
-
second:
|
|
4306
|
+
year: D,
|
|
4307
|
+
month: D,
|
|
4308
|
+
day: D,
|
|
4309
|
+
hour: D,
|
|
4310
|
+
minute: D,
|
|
4311
|
+
second: D
|
|
4311
4312
|
}, zt = {
|
|
4312
|
-
year:
|
|
4313
|
-
month:
|
|
4314
|
-
day:
|
|
4315
|
-
hour:
|
|
4316
|
-
minute:
|
|
4313
|
+
year: D,
|
|
4314
|
+
month: O,
|
|
4315
|
+
day: D,
|
|
4316
|
+
hour: D,
|
|
4317
|
+
minute: D
|
|
4317
4318
|
}, Bt = {
|
|
4318
|
-
year:
|
|
4319
|
-
month:
|
|
4320
|
-
day:
|
|
4321
|
-
hour:
|
|
4322
|
-
minute:
|
|
4323
|
-
second:
|
|
4319
|
+
year: D,
|
|
4320
|
+
month: O,
|
|
4321
|
+
day: D,
|
|
4322
|
+
hour: D,
|
|
4323
|
+
minute: D,
|
|
4324
|
+
second: D
|
|
4324
4325
|
}, Vt = {
|
|
4325
|
-
year:
|
|
4326
|
-
month:
|
|
4327
|
-
day:
|
|
4328
|
-
weekday:
|
|
4329
|
-
hour:
|
|
4330
|
-
minute:
|
|
4326
|
+
year: D,
|
|
4327
|
+
month: O,
|
|
4328
|
+
day: D,
|
|
4329
|
+
weekday: O,
|
|
4330
|
+
hour: D,
|
|
4331
|
+
minute: D
|
|
4331
4332
|
}, Ht = {
|
|
4332
|
-
year:
|
|
4333
|
-
month:
|
|
4334
|
-
day:
|
|
4335
|
-
hour:
|
|
4336
|
-
minute:
|
|
4337
|
-
timeZoneName:
|
|
4333
|
+
year: D,
|
|
4334
|
+
month: k,
|
|
4335
|
+
day: D,
|
|
4336
|
+
hour: D,
|
|
4337
|
+
minute: D,
|
|
4338
|
+
timeZoneName: O
|
|
4338
4339
|
}, Ut = {
|
|
4339
|
-
year:
|
|
4340
|
-
month:
|
|
4341
|
-
day:
|
|
4342
|
-
hour:
|
|
4343
|
-
minute:
|
|
4344
|
-
second:
|
|
4345
|
-
timeZoneName:
|
|
4340
|
+
year: D,
|
|
4341
|
+
month: k,
|
|
4342
|
+
day: D,
|
|
4343
|
+
hour: D,
|
|
4344
|
+
minute: D,
|
|
4345
|
+
second: D,
|
|
4346
|
+
timeZoneName: O
|
|
4346
4347
|
}, Wt = {
|
|
4347
|
-
year:
|
|
4348
|
-
month:
|
|
4349
|
-
day:
|
|
4350
|
-
weekday:
|
|
4351
|
-
hour:
|
|
4352
|
-
minute:
|
|
4353
|
-
timeZoneName:
|
|
4348
|
+
year: D,
|
|
4349
|
+
month: k,
|
|
4350
|
+
day: D,
|
|
4351
|
+
weekday: k,
|
|
4352
|
+
hour: D,
|
|
4353
|
+
minute: D,
|
|
4354
|
+
timeZoneName: k
|
|
4354
4355
|
}, Gt = {
|
|
4355
|
-
year:
|
|
4356
|
-
month:
|
|
4357
|
-
day:
|
|
4358
|
-
weekday:
|
|
4359
|
-
hour:
|
|
4360
|
-
minute:
|
|
4361
|
-
second:
|
|
4362
|
-
timeZoneName:
|
|
4356
|
+
year: D,
|
|
4357
|
+
month: k,
|
|
4358
|
+
day: D,
|
|
4359
|
+
weekday: k,
|
|
4360
|
+
hour: D,
|
|
4361
|
+
minute: D,
|
|
4362
|
+
second: D,
|
|
4363
|
+
timeZoneName: k
|
|
4363
4364
|
}, Kt = class {
|
|
4364
4365
|
get type() {
|
|
4365
|
-
throw new
|
|
4366
|
+
throw new E();
|
|
4366
4367
|
}
|
|
4367
4368
|
get name() {
|
|
4368
|
-
throw new
|
|
4369
|
+
throw new E();
|
|
4369
4370
|
}
|
|
4370
4371
|
get ianaName() {
|
|
4371
4372
|
return this.name;
|
|
4372
4373
|
}
|
|
4373
4374
|
get isUniversal() {
|
|
4374
|
-
throw new
|
|
4375
|
+
throw new E();
|
|
4375
4376
|
}
|
|
4376
4377
|
offsetName(e, t) {
|
|
4377
|
-
throw new
|
|
4378
|
+
throw new E();
|
|
4378
4379
|
}
|
|
4379
4380
|
formatOffset(e, t) {
|
|
4380
|
-
throw new
|
|
4381
|
+
throw new E();
|
|
4381
4382
|
}
|
|
4382
4383
|
offset(e) {
|
|
4383
|
-
throw new
|
|
4384
|
+
throw new E();
|
|
4384
4385
|
}
|
|
4385
4386
|
equals(e) {
|
|
4386
|
-
throw new
|
|
4387
|
+
throw new E();
|
|
4387
4388
|
}
|
|
4388
4389
|
get isValid() {
|
|
4389
|
-
throw new
|
|
4390
|
+
throw new E();
|
|
4390
4391
|
}
|
|
4391
4392
|
}, qt = null, Jt = class e extends Kt {
|
|
4392
4393
|
static get instance() {
|
|
@@ -4402,10 +4403,10 @@ var x = class extends Error {}, bt = class extends x {
|
|
|
4402
4403
|
return !1;
|
|
4403
4404
|
}
|
|
4404
4405
|
offsetName(e, { format: t, locale: n }) {
|
|
4405
|
-
return
|
|
4406
|
+
return Sr(e, t, n);
|
|
4406
4407
|
}
|
|
4407
4408
|
formatOffset(e, t) {
|
|
4408
|
-
return
|
|
4409
|
+
return Er(this.offset(e), t);
|
|
4409
4410
|
}
|
|
4410
4411
|
offset(e) {
|
|
4411
4412
|
return -new Date(e).getTimezoneOffset();
|
|
@@ -4456,11 +4457,11 @@ function $t(e, t) {
|
|
|
4456
4457
|
let n = e.formatToParts(t), r = [];
|
|
4457
4458
|
for (let e = 0; e < n.length; e++) {
|
|
4458
4459
|
let { type: t, value: i } = n[e], a = Zt[t];
|
|
4459
|
-
t === "era" ? r[a] = i :
|
|
4460
|
+
t === "era" ? r[a] = i : R(a) || (r[a] = parseInt(i, 10));
|
|
4460
4461
|
}
|
|
4461
4462
|
return r;
|
|
4462
4463
|
}
|
|
4463
|
-
var en = /* @__PURE__ */ new Map(),
|
|
4464
|
+
var en = /* @__PURE__ */ new Map(), A = class e extends Kt {
|
|
4464
4465
|
static create(t) {
|
|
4465
4466
|
let n = en.get(t);
|
|
4466
4467
|
return n === void 0 && en.set(t, n = new e(t)), n;
|
|
@@ -4492,10 +4493,10 @@ var en = /* @__PURE__ */ new Map(), O = class e extends Kt {
|
|
|
4492
4493
|
return !1;
|
|
4493
4494
|
}
|
|
4494
4495
|
offsetName(e, { format: t, locale: n }) {
|
|
4495
|
-
return
|
|
4496
|
+
return Sr(e, t, n, this.name);
|
|
4496
4497
|
}
|
|
4497
4498
|
formatOffset(e, t) {
|
|
4498
|
-
return
|
|
4499
|
+
return Er(this.offset(e), t);
|
|
4499
4500
|
}
|
|
4500
4501
|
offset(e) {
|
|
4501
4502
|
if (!this.valid) return NaN;
|
|
@@ -4503,7 +4504,7 @@ var en = /* @__PURE__ */ new Map(), O = class e extends Kt {
|
|
|
4503
4504
|
if (isNaN(t)) return NaN;
|
|
4504
4505
|
let n = Xt(this.name), [r, i, a, o, s, c, l] = n.formatToParts ? $t(n, t) : Qt(n, t);
|
|
4505
4506
|
o === "BC" && (r = -Math.abs(r) + 1);
|
|
4506
|
-
let u =
|
|
4507
|
+
let u = vr({
|
|
4507
4508
|
year: r,
|
|
4508
4509
|
month: i,
|
|
4509
4510
|
day: a,
|
|
@@ -4625,7 +4626,7 @@ var Sn = class {
|
|
|
4625
4626
|
let t = this.floor ? Math.floor(e) : e;
|
|
4626
4627
|
return this.inf.format(t);
|
|
4627
4628
|
}
|
|
4628
|
-
return
|
|
4629
|
+
return H(this.floor ? Math.floor(e) : mr(e, 3), this.padTo);
|
|
4629
4630
|
}
|
|
4630
4631
|
}, Cn = class {
|
|
4631
4632
|
constructor(e, t, n) {
|
|
@@ -4634,7 +4635,7 @@ var Sn = class {
|
|
|
4634
4635
|
if (this.opts.timeZone) this.dt = e;
|
|
4635
4636
|
else if (e.zone.type === "fixed") {
|
|
4636
4637
|
let t = -1 * (e.offset / 60), n = t >= 0 ? `Etc/GMT+${t}` : `Etc/GMT${t}`;
|
|
4637
|
-
e.offset !== 0 &&
|
|
4638
|
+
e.offset !== 0 && A.create(n).valid ? (r = n, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
|
4638
4639
|
} else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
|
4639
4640
|
let i = { ...this.opts };
|
|
4640
4641
|
i.timeZone = i.timeZone || r, this.dtf = an(t, i);
|
|
@@ -4669,7 +4670,7 @@ var Sn = class {
|
|
|
4669
4670
|
}, !t && or() && (this.rtf = ln(e, n));
|
|
4670
4671
|
}
|
|
4671
4672
|
format(e, t) {
|
|
4672
|
-
return this.rtf ? this.rtf.format(e, t) :
|
|
4673
|
+
return this.rtf ? this.rtf.format(e, t) : Gr(t, e, this.opts.numeric, this.opts.style !== "long");
|
|
4673
4674
|
}
|
|
4674
4675
|
formatToParts(e, t) {
|
|
4675
4676
|
return this.rtf ? this.rtf.formatToParts(e, t) : [];
|
|
@@ -4678,12 +4679,12 @@ var Sn = class {
|
|
|
4678
4679
|
firstDay: 1,
|
|
4679
4680
|
minimalDays: 4,
|
|
4680
4681
|
weekend: [6, 7]
|
|
4681
|
-
},
|
|
4682
|
+
}, j = class e {
|
|
4682
4683
|
static fromOpts(t) {
|
|
4683
4684
|
return e.create(t.locale, t.numberingSystem, t.outputCalendar, t.weekSettings, t.defaultToEN);
|
|
4684
4685
|
}
|
|
4685
4686
|
static create(t, n, r, i, a = !1) {
|
|
4686
|
-
let o = t ||
|
|
4687
|
+
let o = t || F.defaultLocale, s = o || (a ? "en-US" : dn()), c = n || F.defaultNumberingSystem, l = r || F.defaultOutputCalendar, u = dr(i) || F.defaultWeekSettings;
|
|
4687
4688
|
return new e(s, c, l, u, o);
|
|
4688
4689
|
}
|
|
4689
4690
|
static resetCache() {
|
|
@@ -4710,7 +4711,7 @@ var Sn = class {
|
|
|
4710
4711
|
return e && t ? "en" : "intl";
|
|
4711
4712
|
}
|
|
4712
4713
|
clone(t) {
|
|
4713
|
-
return !t || Object.getOwnPropertyNames(t).length === 0 ? this : e.create(t.locale || this.specifiedLocale, t.numberingSystem || this.numberingSystem, t.outputCalendar || this.outputCalendar,
|
|
4714
|
+
return !t || Object.getOwnPropertyNames(t).length === 0 ? this : e.create(t.locale || this.specifiedLocale, t.numberingSystem || this.numberingSystem, t.outputCalendar || this.outputCalendar, dr(t.weekSettings) || this.weekSettings, t.defaultToEN || !1);
|
|
4714
4715
|
}
|
|
4715
4716
|
redefaultToEN(e = {}) {
|
|
4716
4717
|
return this.clone({
|
|
@@ -4725,7 +4726,7 @@ var Sn = class {
|
|
|
4725
4726
|
});
|
|
4726
4727
|
}
|
|
4727
4728
|
months(e, t = !1) {
|
|
4728
|
-
return bn(this, e,
|
|
4729
|
+
return bn(this, e, jr, () => {
|
|
4729
4730
|
let n = this.intl === "ja" || this.intl.startsWith("ja-");
|
|
4730
4731
|
t &= !n;
|
|
4731
4732
|
let r = t ? {
|
|
@@ -4740,7 +4741,7 @@ var Sn = class {
|
|
|
4740
4741
|
});
|
|
4741
4742
|
}
|
|
4742
4743
|
weekdays(e, t = !1) {
|
|
4743
|
-
return bn(this, e,
|
|
4744
|
+
return bn(this, e, Fr, () => {
|
|
4744
4745
|
let n = t ? {
|
|
4745
4746
|
weekday: e,
|
|
4746
4747
|
year: "numeric",
|
|
@@ -4751,7 +4752,7 @@ var Sn = class {
|
|
|
4751
4752
|
});
|
|
4752
4753
|
}
|
|
4753
4754
|
meridiems() {
|
|
4754
|
-
return bn(this, void 0, () =>
|
|
4755
|
+
return bn(this, void 0, () => Ir, () => {
|
|
4755
4756
|
if (!this.meridiemCache) {
|
|
4756
4757
|
let e = {
|
|
4757
4758
|
hour: "numeric",
|
|
@@ -4763,7 +4764,7 @@ var Sn = class {
|
|
|
4763
4764
|
});
|
|
4764
4765
|
}
|
|
4765
4766
|
eras(e) {
|
|
4766
|
-
return bn(this, e,
|
|
4767
|
+
return bn(this, e, Br, () => {
|
|
4767
4768
|
let t = { era: e };
|
|
4768
4769
|
return this.eraCache[e] || (this.eraCache[e] = [$.utc(-40, 1, 1), $.utc(2017, 1, 1)].map((e) => this.extract(e, t, "era"))), this.eraCache[e];
|
|
4769
4770
|
});
|
|
@@ -4805,7 +4806,7 @@ var Sn = class {
|
|
|
4805
4806
|
toString() {
|
|
4806
4807
|
return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;
|
|
4807
4808
|
}
|
|
4808
|
-
}, En = null,
|
|
4809
|
+
}, En = null, M = class e extends Kt {
|
|
4809
4810
|
static get utcInstance() {
|
|
4810
4811
|
return En === null && (En = new e(0)), En;
|
|
4811
4812
|
}
|
|
@@ -4815,7 +4816,7 @@ var Sn = class {
|
|
|
4815
4816
|
static parseSpecifier(t) {
|
|
4816
4817
|
if (t) {
|
|
4817
4818
|
let n = t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
|
4818
|
-
if (n) return new e(
|
|
4819
|
+
if (n) return new e(Cr(n[1], n[2]));
|
|
4819
4820
|
}
|
|
4820
4821
|
return null;
|
|
4821
4822
|
}
|
|
@@ -4826,16 +4827,16 @@ var Sn = class {
|
|
|
4826
4827
|
return "fixed";
|
|
4827
4828
|
}
|
|
4828
4829
|
get name() {
|
|
4829
|
-
return this.fixed === 0 ? "UTC" : `UTC${
|
|
4830
|
+
return this.fixed === 0 ? "UTC" : `UTC${Er(this.fixed, "narrow")}`;
|
|
4830
4831
|
}
|
|
4831
4832
|
get ianaName() {
|
|
4832
|
-
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${
|
|
4833
|
+
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${Er(-this.fixed, "narrow")}`;
|
|
4833
4834
|
}
|
|
4834
4835
|
offsetName() {
|
|
4835
4836
|
return this.name;
|
|
4836
4837
|
}
|
|
4837
4838
|
formatOffset(e, t) {
|
|
4838
|
-
return
|
|
4839
|
+
return Er(this.fixed, t);
|
|
4839
4840
|
}
|
|
4840
4841
|
get isUniversal() {
|
|
4841
4842
|
return !0;
|
|
@@ -4878,14 +4879,14 @@ var Sn = class {
|
|
|
4878
4879
|
return !1;
|
|
4879
4880
|
}
|
|
4880
4881
|
};
|
|
4881
|
-
function
|
|
4882
|
-
if (
|
|
4882
|
+
function N(e, t) {
|
|
4883
|
+
if (R(e) || e === null) return t;
|
|
4883
4884
|
if (e instanceof Kt) return e;
|
|
4884
4885
|
if (ir(e)) {
|
|
4885
4886
|
let n = e.toLowerCase();
|
|
4886
|
-
return n === "default" ? t : n === "local" || n === "system" ? Jt.instance : n === "utc" || n === "gmt" ?
|
|
4887
|
+
return n === "default" ? t : n === "local" || n === "system" ? Jt.instance : n === "utc" || n === "gmt" ? M.utcInstance : M.parseSpecifier(n) || A.create(e);
|
|
4887
4888
|
}
|
|
4888
|
-
return
|
|
4889
|
+
return z(e) ? M.instance(e) : typeof e == "object" && "offset" in e && typeof e.offset == "function" ? e : new Dn(e);
|
|
4889
4890
|
}
|
|
4890
4891
|
var On = {
|
|
4891
4892
|
arab: "[٠-٩]",
|
|
@@ -4950,13 +4951,13 @@ var Mn = /* @__PURE__ */ new Map();
|
|
|
4950
4951
|
function Nn() {
|
|
4951
4952
|
Mn.clear();
|
|
4952
4953
|
}
|
|
4953
|
-
function
|
|
4954
|
+
function P({ numberingSystem: e }, t = "") {
|
|
4954
4955
|
let n = e || "latn", r = Mn.get(n);
|
|
4955
4956
|
r === void 0 && (r = /* @__PURE__ */ new Map(), Mn.set(n, r));
|
|
4956
4957
|
let i = r.get(t);
|
|
4957
4958
|
return i === void 0 && (i = RegExp(`${On[n]}${t}`), r.set(t, i)), i;
|
|
4958
4959
|
}
|
|
4959
|
-
var Pn = () => Date.now(), Fn = "system", In = null, Ln = null, Rn = null, zn = 60, Bn, Vn = null,
|
|
4960
|
+
var Pn = () => Date.now(), Fn = "system", In = null, Ln = null, Rn = null, zn = 60, Bn, Vn = null, F = class {
|
|
4960
4961
|
static get now() {
|
|
4961
4962
|
return Pn;
|
|
4962
4963
|
}
|
|
@@ -4967,7 +4968,7 @@ var Pn = () => Date.now(), Fn = "system", In = null, Ln = null, Rn = null, zn =
|
|
|
4967
4968
|
Fn = e;
|
|
4968
4969
|
}
|
|
4969
4970
|
static get defaultZone() {
|
|
4970
|
-
return
|
|
4971
|
+
return N(Fn, Jt.instance);
|
|
4971
4972
|
}
|
|
4972
4973
|
static get defaultLocale() {
|
|
4973
4974
|
return In;
|
|
@@ -4991,7 +4992,7 @@ var Pn = () => Date.now(), Fn = "system", In = null, Ln = null, Rn = null, zn =
|
|
|
4991
4992
|
return Vn;
|
|
4992
4993
|
}
|
|
4993
4994
|
static set defaultWeekSettings(e) {
|
|
4994
|
-
Vn =
|
|
4995
|
+
Vn = dr(e);
|
|
4995
4996
|
}
|
|
4996
4997
|
static get twoDigitCutoffYear() {
|
|
4997
4998
|
return zn;
|
|
@@ -5006,9 +5007,9 @@ var Pn = () => Date.now(), Fn = "system", In = null, Ln = null, Rn = null, zn =
|
|
|
5006
5007
|
Bn = e;
|
|
5007
5008
|
}
|
|
5008
5009
|
static resetCaches() {
|
|
5009
|
-
|
|
5010
|
+
j.resetCache(), A.resetCache(), $.resetCache(), Nn();
|
|
5010
5011
|
}
|
|
5011
|
-
},
|
|
5012
|
+
}, I = class {
|
|
5012
5013
|
constructor(e, t) {
|
|
5013
5014
|
this.reason = e, this.explanation = t;
|
|
5014
5015
|
}
|
|
@@ -5042,8 +5043,8 @@ var Pn = () => Date.now(), Fn = "system", In = null, Ln = null, Rn = null, zn =
|
|
|
5042
5043
|
305,
|
|
5043
5044
|
335
|
|
5044
5045
|
];
|
|
5045
|
-
function
|
|
5046
|
-
return new
|
|
5046
|
+
function L(e, t) {
|
|
5047
|
+
return new I("unit out of range", `you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`);
|
|
5047
5048
|
}
|
|
5048
5049
|
function Wn(e, t, n) {
|
|
5049
5050
|
let r = new Date(Date.UTC(e, t - 1, n));
|
|
@@ -5052,10 +5053,10 @@ function Wn(e, t, n) {
|
|
|
5052
5053
|
return i === 0 ? 7 : i;
|
|
5053
5054
|
}
|
|
5054
5055
|
function Gn(e, t, n) {
|
|
5055
|
-
return n + (
|
|
5056
|
+
return n + (hr(e) ? Un : Hn)[t - 1];
|
|
5056
5057
|
}
|
|
5057
5058
|
function Kn(e, t) {
|
|
5058
|
-
let n =
|
|
5059
|
+
let n = hr(e) ? Un : Hn, r = n.findIndex((e) => e < t), i = t - n[r];
|
|
5059
5060
|
return {
|
|
5060
5061
|
month: r + 1,
|
|
5061
5062
|
day: i
|
|
@@ -5066,22 +5067,22 @@ function qn(e, t) {
|
|
|
5066
5067
|
}
|
|
5067
5068
|
function Jn(e, t = 4, n = 1) {
|
|
5068
5069
|
let { year: r, month: i, day: a } = e, o = Gn(r, i, a), s = qn(Wn(r, i, a), n), c = Math.floor((o - s + 14 - t) / 7), l;
|
|
5069
|
-
return c < 1 ? (l = r - 1, c =
|
|
5070
|
+
return c < 1 ? (l = r - 1, c = br(l, t, n)) : c > br(r, t, n) ? (l = r + 1, c = 1) : l = r, {
|
|
5070
5071
|
weekYear: l,
|
|
5071
5072
|
weekNumber: c,
|
|
5072
5073
|
weekday: s,
|
|
5073
|
-
...
|
|
5074
|
+
...Dr(e)
|
|
5074
5075
|
};
|
|
5075
5076
|
}
|
|
5076
5077
|
function Yn(e, t = 4, n = 1) {
|
|
5077
|
-
let { weekYear: r, weekNumber: i, weekday: a } = e, o = qn(Wn(r, 1, t), n), s =
|
|
5078
|
-
c < 1 ? (l = r - 1, c +=
|
|
5078
|
+
let { weekYear: r, weekNumber: i, weekday: a } = e, o = qn(Wn(r, 1, t), n), s = gr(r), c = i * 7 + a - o - 7 + t, l;
|
|
5079
|
+
c < 1 ? (l = r - 1, c += gr(l)) : c > s ? (l = r + 1, c -= gr(r)) : l = r;
|
|
5079
5080
|
let { month: u, day: d } = Kn(l, c);
|
|
5080
5081
|
return {
|
|
5081
5082
|
year: l,
|
|
5082
5083
|
month: u,
|
|
5083
5084
|
day: d,
|
|
5084
|
-
...
|
|
5085
|
+
...Dr(e)
|
|
5085
5086
|
};
|
|
5086
5087
|
}
|
|
5087
5088
|
function Xn(e) {
|
|
@@ -5089,7 +5090,7 @@ function Xn(e) {
|
|
|
5089
5090
|
return {
|
|
5090
5091
|
year: t,
|
|
5091
5092
|
ordinal: Gn(t, n, r),
|
|
5092
|
-
...
|
|
5093
|
+
...Dr(e)
|
|
5093
5094
|
};
|
|
5094
5095
|
}
|
|
5095
5096
|
function Zn(e) {
|
|
@@ -5098,13 +5099,13 @@ function Zn(e) {
|
|
|
5098
5099
|
year: t,
|
|
5099
5100
|
month: r,
|
|
5100
5101
|
day: i,
|
|
5101
|
-
...
|
|
5102
|
+
...Dr(e)
|
|
5102
5103
|
};
|
|
5103
5104
|
}
|
|
5104
5105
|
function Qn(e, t) {
|
|
5105
|
-
if (!
|
|
5106
|
-
if (!
|
|
5107
|
-
return
|
|
5106
|
+
if (!R(e.localWeekday) || !R(e.localWeekNumber) || !R(e.localWeekYear)) {
|
|
5107
|
+
if (!R(e.weekday) || !R(e.weekNumber) || !R(e.weekYear)) throw new w("Cannot mix locale-based week fields with ISO-based week fields");
|
|
5108
|
+
return R(e.localWeekday) || (e.weekday = e.localWeekday), R(e.localWeekNumber) || (e.weekNumber = e.localWeekNumber), R(e.localWeekYear) || (e.weekYear = e.localWeekYear), delete e.localWeekday, delete e.localWeekNumber, delete e.localWeekYear, {
|
|
5108
5109
|
minDaysInFirstWeek: t.getMinDaysInFirstWeek(),
|
|
5109
5110
|
startOfWeek: t.getStartOfWeek()
|
|
5110
5111
|
};
|
|
@@ -5115,25 +5116,25 @@ function Qn(e, t) {
|
|
|
5115
5116
|
};
|
|
5116
5117
|
}
|
|
5117
5118
|
function $n(e, t = 4, n = 1) {
|
|
5118
|
-
let r = rr(e.weekYear), i =
|
|
5119
|
-
return r ? i ? !a &&
|
|
5119
|
+
let r = rr(e.weekYear), i = V(e.weekNumber, 1, br(e.weekYear, t, n)), a = V(e.weekday, 1, 7);
|
|
5120
|
+
return r ? i ? !a && L("weekday", e.weekday) : L("week", e.weekNumber) : L("weekYear", e.weekYear);
|
|
5120
5121
|
}
|
|
5121
5122
|
function er(e) {
|
|
5122
|
-
let t = rr(e.year), n =
|
|
5123
|
-
return t ? !n &&
|
|
5123
|
+
let t = rr(e.year), n = V(e.ordinal, 1, gr(e.year));
|
|
5124
|
+
return t ? !n && L("ordinal", e.ordinal) : L("year", e.year);
|
|
5124
5125
|
}
|
|
5125
5126
|
function tr(e) {
|
|
5126
|
-
let t = rr(e.year), n =
|
|
5127
|
-
return t ? n ? !r &&
|
|
5127
|
+
let t = rr(e.year), n = V(e.month, 1, 12), r = V(e.day, 1, _r(e.year, e.month));
|
|
5128
|
+
return t ? n ? !r && L("day", e.day) : L("month", e.month) : L("year", e.year);
|
|
5128
5129
|
}
|
|
5129
5130
|
function nr(e) {
|
|
5130
|
-
let { hour: t, minute: n, second: r, millisecond: i } = e, a =
|
|
5131
|
-
return a ? o ? s ? !c &&
|
|
5131
|
+
let { hour: t, minute: n, second: r, millisecond: i } = e, a = V(t, 0, 23) || t === 24 && n === 0 && r === 0 && i === 0, o = V(n, 0, 59), s = V(r, 0, 59), c = V(i, 0, 999);
|
|
5132
|
+
return a ? o ? s ? !c && L("millisecond", i) : L("second", r) : L("minute", n) : L("hour", t);
|
|
5132
5133
|
}
|
|
5133
|
-
function
|
|
5134
|
+
function R(e) {
|
|
5134
5135
|
return e === void 0;
|
|
5135
5136
|
}
|
|
5136
|
-
function
|
|
5137
|
+
function z(e) {
|
|
5137
5138
|
return typeof e == "number";
|
|
5138
5139
|
}
|
|
5139
5140
|
function rr(e) {
|
|
@@ -5171,42 +5172,42 @@ function lr(e, t, n) {
|
|
|
5171
5172
|
function ur(e, t) {
|
|
5172
5173
|
return t.reduce((t, n) => (t[n] = e[n], t), {});
|
|
5173
5174
|
}
|
|
5174
|
-
function
|
|
5175
|
+
function B(e, t) {
|
|
5175
5176
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
5176
5177
|
}
|
|
5177
|
-
function
|
|
5178
|
+
function dr(e) {
|
|
5178
5179
|
if (e == null) return null;
|
|
5179
|
-
if (typeof e != "object") throw new
|
|
5180
|
-
if (!
|
|
5180
|
+
if (typeof e != "object") throw new T("Week settings must be an object");
|
|
5181
|
+
if (!V(e.firstDay, 1, 7) || !V(e.minimalDays, 1, 7) || !Array.isArray(e.weekend) || e.weekend.some((e) => !V(e, 1, 7))) throw new T("Invalid week settings");
|
|
5181
5182
|
return {
|
|
5182
5183
|
firstDay: e.firstDay,
|
|
5183
5184
|
minimalDays: e.minimalDays,
|
|
5184
5185
|
weekend: Array.from(e.weekend)
|
|
5185
5186
|
};
|
|
5186
5187
|
}
|
|
5187
|
-
function
|
|
5188
|
+
function V(e, t, n) {
|
|
5188
5189
|
return rr(e) && e >= t && e <= n;
|
|
5189
5190
|
}
|
|
5190
|
-
function
|
|
5191
|
+
function fr(e, t) {
|
|
5191
5192
|
return e - t * Math.floor(e / t);
|
|
5192
5193
|
}
|
|
5193
|
-
function
|
|
5194
|
+
function H(e, t = 2) {
|
|
5194
5195
|
let n = e < 0, r;
|
|
5195
5196
|
return r = n ? "-" + ("" + -e).padStart(t, "0") : ("" + e).padStart(t, "0"), r;
|
|
5196
5197
|
}
|
|
5197
|
-
function
|
|
5198
|
-
if (!(
|
|
5198
|
+
function U(e) {
|
|
5199
|
+
if (!(R(e) || e === null || e === "")) return parseInt(e, 10);
|
|
5199
5200
|
}
|
|
5200
|
-
function
|
|
5201
|
-
if (!(
|
|
5201
|
+
function W(e) {
|
|
5202
|
+
if (!(R(e) || e === null || e === "")) return parseFloat(e);
|
|
5202
5203
|
}
|
|
5203
|
-
function
|
|
5204
|
-
if (!(
|
|
5204
|
+
function pr(e) {
|
|
5205
|
+
if (!(R(e) || e === null || e === "")) {
|
|
5205
5206
|
let t = parseFloat("0." + e) * 1e3;
|
|
5206
5207
|
return Math.floor(t);
|
|
5207
5208
|
}
|
|
5208
5209
|
}
|
|
5209
|
-
function
|
|
5210
|
+
function mr(e, t, n = "round") {
|
|
5210
5211
|
let r = 10 ** t;
|
|
5211
5212
|
switch (n) {
|
|
5212
5213
|
case "expand": return e > 0 ? Math.ceil(e * r) / r : Math.floor(e * r) / r;
|
|
@@ -5217,15 +5218,15 @@ function hr(e, t, n = "round") {
|
|
|
5217
5218
|
default: throw RangeError(`Value rounding ${n} is out of range`);
|
|
5218
5219
|
}
|
|
5219
5220
|
}
|
|
5220
|
-
function
|
|
5221
|
+
function hr(e) {
|
|
5221
5222
|
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
5222
5223
|
}
|
|
5223
|
-
function
|
|
5224
|
-
return
|
|
5224
|
+
function gr(e) {
|
|
5225
|
+
return hr(e) ? 366 : 365;
|
|
5225
5226
|
}
|
|
5226
|
-
function
|
|
5227
|
-
let n =
|
|
5228
|
-
return n === 2 ?
|
|
5227
|
+
function _r(e, t) {
|
|
5228
|
+
let n = fr(t - 1, 12) + 1, r = e + (t - n) / 12;
|
|
5229
|
+
return n === 2 ? hr(r) ? 29 : 28 : [
|
|
5229
5230
|
31,
|
|
5230
5231
|
null,
|
|
5231
5232
|
31,
|
|
@@ -5240,21 +5241,21 @@ function vr(e, t) {
|
|
|
5240
5241
|
31
|
|
5241
5242
|
][n - 1];
|
|
5242
5243
|
}
|
|
5243
|
-
function
|
|
5244
|
+
function vr(e) {
|
|
5244
5245
|
let t = Date.UTC(e.year, e.month - 1, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
5245
5246
|
return e.year < 100 && e.year >= 0 && (t = new Date(t), t.setUTCFullYear(e.year, e.month - 1, e.day)), +t;
|
|
5246
5247
|
}
|
|
5247
|
-
function
|
|
5248
|
+
function yr(e, t, n) {
|
|
5248
5249
|
return -qn(Wn(e, 1, t), n) + t - 1;
|
|
5249
5250
|
}
|
|
5250
|
-
function
|
|
5251
|
-
let r =
|
|
5252
|
-
return (
|
|
5251
|
+
function br(e, t = 4, n = 1) {
|
|
5252
|
+
let r = yr(e, t, n), i = yr(e + 1, t, n);
|
|
5253
|
+
return (gr(e) - r + i) / 7;
|
|
5253
5254
|
}
|
|
5254
|
-
function
|
|
5255
|
-
return e > 99 ? e : e >
|
|
5255
|
+
function xr(e) {
|
|
5256
|
+
return e > 99 ? e : e > F.twoDigitCutoffYear ? 1900 + e : 2e3 + e;
|
|
5256
5257
|
}
|
|
5257
|
-
function
|
|
5258
|
+
function Sr(e, t, n, r = null) {
|
|
5258
5259
|
let i = new Date(e), a = {
|
|
5259
5260
|
hourCycle: "h23",
|
|
5260
5261
|
year: "numeric",
|
|
@@ -5270,36 +5271,36 @@ function Cr(e, t, n, r = null) {
|
|
|
5270
5271
|
}, s = new Intl.DateTimeFormat(n, o).formatToParts(i).find((e) => e.type.toLowerCase() === "timezonename");
|
|
5271
5272
|
return s ? s.value : null;
|
|
5272
5273
|
}
|
|
5273
|
-
function
|
|
5274
|
+
function Cr(e, t) {
|
|
5274
5275
|
let n = parseInt(e, 10);
|
|
5275
5276
|
Number.isNaN(n) && (n = 0);
|
|
5276
5277
|
let r = parseInt(t, 10) || 0, i = n < 0 || Object.is(n, -0) ? -r : r;
|
|
5277
5278
|
return n * 60 + i;
|
|
5278
5279
|
}
|
|
5279
|
-
function
|
|
5280
|
+
function wr(e) {
|
|
5280
5281
|
let t = Number(e);
|
|
5281
|
-
if (typeof e == "boolean" || e === "" || !Number.isFinite(t)) throw new
|
|
5282
|
+
if (typeof e == "boolean" || e === "" || !Number.isFinite(t)) throw new T(`Invalid unit value ${e}`);
|
|
5282
5283
|
return t;
|
|
5283
5284
|
}
|
|
5284
|
-
function
|
|
5285
|
+
function Tr(e, t) {
|
|
5285
5286
|
let n = {};
|
|
5286
|
-
for (let r in e) if (
|
|
5287
|
+
for (let r in e) if (B(e, r)) {
|
|
5287
5288
|
let i = e[r];
|
|
5288
5289
|
if (i == null) continue;
|
|
5289
|
-
n[t(r)] =
|
|
5290
|
+
n[t(r)] = wr(i);
|
|
5290
5291
|
}
|
|
5291
5292
|
return n;
|
|
5292
5293
|
}
|
|
5293
|
-
function
|
|
5294
|
+
function Er(e, t) {
|
|
5294
5295
|
let n = Math.trunc(Math.abs(e / 60)), r = Math.trunc(Math.abs(e % 60)), i = e >= 0 ? "+" : "-";
|
|
5295
5296
|
switch (t) {
|
|
5296
|
-
case "short": return `${i}${
|
|
5297
|
+
case "short": return `${i}${H(n, 2)}:${H(r, 2)}`;
|
|
5297
5298
|
case "narrow": return `${i}${n}${r > 0 ? `:${r}` : ""}`;
|
|
5298
|
-
case "techie": return `${i}${
|
|
5299
|
+
case "techie": return `${i}${H(n, 2)}${H(r, 2)}`;
|
|
5299
5300
|
default: throw RangeError(`Value format ${t} is out of range for property format`);
|
|
5300
5301
|
}
|
|
5301
5302
|
}
|
|
5302
|
-
function
|
|
5303
|
+
function Dr(e) {
|
|
5303
5304
|
return ur(e, [
|
|
5304
5305
|
"hour",
|
|
5305
5306
|
"minute",
|
|
@@ -5307,7 +5308,7 @@ function Or(e) {
|
|
|
5307
5308
|
"millisecond"
|
|
5308
5309
|
]);
|
|
5309
5310
|
}
|
|
5310
|
-
var
|
|
5311
|
+
var Or = [
|
|
5311
5312
|
"January",
|
|
5312
5313
|
"February",
|
|
5313
5314
|
"March",
|
|
@@ -5320,7 +5321,7 @@ var kr = [
|
|
|
5320
5321
|
"October",
|
|
5321
5322
|
"November",
|
|
5322
5323
|
"December"
|
|
5323
|
-
],
|
|
5324
|
+
], kr = [
|
|
5324
5325
|
"Jan",
|
|
5325
5326
|
"Feb",
|
|
5326
5327
|
"Mar",
|
|
@@ -5333,7 +5334,7 @@ var kr = [
|
|
|
5333
5334
|
"Oct",
|
|
5334
5335
|
"Nov",
|
|
5335
5336
|
"Dec"
|
|
5336
|
-
],
|
|
5337
|
+
], Ar = [
|
|
5337
5338
|
"J",
|
|
5338
5339
|
"F",
|
|
5339
5340
|
"M",
|
|
@@ -5347,11 +5348,11 @@ var kr = [
|
|
|
5347
5348
|
"N",
|
|
5348
5349
|
"D"
|
|
5349
5350
|
];
|
|
5350
|
-
function
|
|
5351
|
+
function jr(e) {
|
|
5351
5352
|
switch (e) {
|
|
5352
|
-
case "narrow": return [...
|
|
5353
|
-
case "short": return [...
|
|
5354
|
-
case "long": return [...
|
|
5353
|
+
case "narrow": return [...Ar];
|
|
5354
|
+
case "short": return [...kr];
|
|
5355
|
+
case "long": return [...Or];
|
|
5355
5356
|
case "numeric": return [
|
|
5356
5357
|
"1",
|
|
5357
5358
|
"2",
|
|
@@ -5383,7 +5384,7 @@ function Mr(e) {
|
|
|
5383
5384
|
default: return null;
|
|
5384
5385
|
}
|
|
5385
5386
|
}
|
|
5386
|
-
var
|
|
5387
|
+
var Mr = [
|
|
5387
5388
|
"Monday",
|
|
5388
5389
|
"Tuesday",
|
|
5389
5390
|
"Wednesday",
|
|
@@ -5391,7 +5392,7 @@ var Nr = [
|
|
|
5391
5392
|
"Friday",
|
|
5392
5393
|
"Saturday",
|
|
5393
5394
|
"Sunday"
|
|
5394
|
-
],
|
|
5395
|
+
], Nr = [
|
|
5395
5396
|
"Mon",
|
|
5396
5397
|
"Tue",
|
|
5397
5398
|
"Wed",
|
|
@@ -5399,7 +5400,7 @@ var Nr = [
|
|
|
5399
5400
|
"Fri",
|
|
5400
5401
|
"Sat",
|
|
5401
5402
|
"Sun"
|
|
5402
|
-
],
|
|
5403
|
+
], Pr = [
|
|
5403
5404
|
"M",
|
|
5404
5405
|
"T",
|
|
5405
5406
|
"W",
|
|
@@ -5408,11 +5409,11 @@ var Nr = [
|
|
|
5408
5409
|
"S",
|
|
5409
5410
|
"S"
|
|
5410
5411
|
];
|
|
5411
|
-
function
|
|
5412
|
+
function Fr(e) {
|
|
5412
5413
|
switch (e) {
|
|
5413
|
-
case "narrow": return [...
|
|
5414
|
-
case "short": return [...
|
|
5415
|
-
case "long": return [...
|
|
5414
|
+
case "narrow": return [...Pr];
|
|
5415
|
+
case "short": return [...Nr];
|
|
5416
|
+
case "long": return [...Mr];
|
|
5416
5417
|
case "numeric": return [
|
|
5417
5418
|
"1",
|
|
5418
5419
|
"2",
|
|
@@ -5425,28 +5426,28 @@ function Ir(e) {
|
|
|
5425
5426
|
default: return null;
|
|
5426
5427
|
}
|
|
5427
5428
|
}
|
|
5428
|
-
var
|
|
5429
|
-
function
|
|
5429
|
+
var Ir = ["AM", "PM"], Lr = ["Before Christ", "Anno Domini"], Rr = ["BC", "AD"], zr = ["B", "A"];
|
|
5430
|
+
function Br(e) {
|
|
5430
5431
|
switch (e) {
|
|
5431
|
-
case "narrow": return [...
|
|
5432
|
-
case "short": return [...
|
|
5433
|
-
case "long": return [...
|
|
5432
|
+
case "narrow": return [...zr];
|
|
5433
|
+
case "short": return [...Rr];
|
|
5434
|
+
case "long": return [...Lr];
|
|
5434
5435
|
default: return null;
|
|
5435
5436
|
}
|
|
5436
5437
|
}
|
|
5437
|
-
function
|
|
5438
|
-
return
|
|
5438
|
+
function Vr(e) {
|
|
5439
|
+
return Ir[e.hour < 12 ? 0 : 1];
|
|
5440
|
+
}
|
|
5441
|
+
function Hr(e, t) {
|
|
5442
|
+
return Fr(t)[e.weekday - 1];
|
|
5439
5443
|
}
|
|
5440
5444
|
function Ur(e, t) {
|
|
5441
|
-
return
|
|
5445
|
+
return jr(t)[e.month - 1];
|
|
5442
5446
|
}
|
|
5443
5447
|
function Wr(e, t) {
|
|
5444
|
-
return
|
|
5445
|
-
}
|
|
5446
|
-
function Gr(e, t) {
|
|
5447
|
-
return Vr(t)[e.year < 0 ? 0 : 1];
|
|
5448
|
+
return Br(t)[e.year < 0 ? 0 : 1];
|
|
5448
5449
|
}
|
|
5449
|
-
function
|
|
5450
|
+
function Gr(e, t, n = "always", r = !1) {
|
|
5450
5451
|
let i = {
|
|
5451
5452
|
years: ["year", "yr."],
|
|
5452
5453
|
quarters: ["quarter", "qtr."],
|
|
@@ -5476,12 +5477,12 @@ function Kr(e, t, n = "always", r = !1) {
|
|
|
5476
5477
|
let o = Object.is(t, -0) || t < 0, s = Math.abs(t), c = s === 1, l = i[e], u = r ? c ? l[1] : l[2] || l[1] : c ? i[e][0] : e;
|
|
5477
5478
|
return o ? `${s} ${u} ago` : `in ${s} ${u}`;
|
|
5478
5479
|
}
|
|
5479
|
-
function
|
|
5480
|
+
function Kr(e, t) {
|
|
5480
5481
|
let n = "";
|
|
5481
5482
|
for (let r of e) r.literal ? n += r.val : n += t(r.val);
|
|
5482
5483
|
return n;
|
|
5483
5484
|
}
|
|
5484
|
-
var
|
|
5485
|
+
var qr = {
|
|
5485
5486
|
D: wt,
|
|
5486
5487
|
DD: Tt,
|
|
5487
5488
|
DDD: Dt,
|
|
@@ -5502,7 +5503,7 @@ var Jr = {
|
|
|
5502
5503
|
FF: Bt,
|
|
5503
5504
|
FFF: Ut,
|
|
5504
5505
|
FFFF: Gt
|
|
5505
|
-
},
|
|
5506
|
+
}, G = class e {
|
|
5506
5507
|
static create(t, n = {}) {
|
|
5507
5508
|
return new e(t, n);
|
|
5508
5509
|
}
|
|
@@ -5524,7 +5525,7 @@ var Jr = {
|
|
|
5524
5525
|
}), i;
|
|
5525
5526
|
}
|
|
5526
5527
|
static macroTokenToFormatOpts(e) {
|
|
5527
|
-
return
|
|
5528
|
+
return qr[e];
|
|
5528
5529
|
}
|
|
5529
5530
|
constructor(e, t) {
|
|
5530
5531
|
this.opts = t, this.loc = e, this.systemLoc = null;
|
|
@@ -5554,26 +5555,26 @@ var Jr = {
|
|
|
5554
5555
|
return this.dtFormatter(e, t).resolvedOptions();
|
|
5555
5556
|
}
|
|
5556
5557
|
num(e, t = 0, n = void 0) {
|
|
5557
|
-
if (this.opts.forceSimple) return
|
|
5558
|
+
if (this.opts.forceSimple) return H(e, t);
|
|
5558
5559
|
let r = { ...this.opts };
|
|
5559
5560
|
return t > 0 && (r.padTo = t), n && (r.signDisplay = n), this.loc.numberFormatter(r).format(e);
|
|
5560
5561
|
}
|
|
5561
5562
|
formatDateTimeFromString(t, n) {
|
|
5562
|
-
let r = this.loc.listingMode() === "en", i = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (e, n) => this.loc.extract(t, e, n), o = (e) => t.isOffsetFixed && t.offset === 0 && e.allowZ ? "Z" : t.isValid ? t.zone.formatOffset(t.ts, e.format) : "", s = () => r ?
|
|
5563
|
+
let r = this.loc.listingMode() === "en", i = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (e, n) => this.loc.extract(t, e, n), o = (e) => t.isOffsetFixed && t.offset === 0 && e.allowZ ? "Z" : t.isValid ? t.zone.formatOffset(t.ts, e.format) : "", s = () => r ? Vr(t) : a({
|
|
5563
5564
|
hour: "numeric",
|
|
5564
5565
|
hourCycle: "h12"
|
|
5565
|
-
}, "dayperiod"), c = (e, n) => r ?
|
|
5566
|
+
}, "dayperiod"), c = (e, n) => r ? Ur(t, e) : a(n ? { month: e } : {
|
|
5566
5567
|
month: e,
|
|
5567
5568
|
day: "numeric"
|
|
5568
|
-
}, "month"), l = (e, n) => r ?
|
|
5569
|
+
}, "month"), l = (e, n) => r ? Hr(t, e) : a(n ? { weekday: e } : {
|
|
5569
5570
|
weekday: e,
|
|
5570
5571
|
month: "long",
|
|
5571
5572
|
day: "numeric"
|
|
5572
5573
|
}, "weekday"), u = (n) => {
|
|
5573
5574
|
let r = e.macroTokenToFormatOpts(n);
|
|
5574
5575
|
return r ? this.formatWithSystemDefault(t, r) : n;
|
|
5575
|
-
}, d = (e) => r ?
|
|
5576
|
-
return
|
|
5576
|
+
}, d = (e) => r ? Wr(t, e) : a({ era: e }, "era");
|
|
5577
|
+
return Kr(e.parseFormat(n), (e) => {
|
|
5577
5578
|
switch (e) {
|
|
5578
5579
|
case "S": return this.num(t.millisecond);
|
|
5579
5580
|
case "u":
|
|
@@ -5682,17 +5683,17 @@ var Jr = {
|
|
|
5682
5683
|
}
|
|
5683
5684
|
return n;
|
|
5684
5685
|
}, o = e.parseFormat(n), s = o.reduce((e, { literal: t, val: n }) => t ? e : e.concat(n), []), c = t.shiftTo(...s.map(i).filter((e) => e));
|
|
5685
|
-
return
|
|
5686
|
+
return Kr(o, a(c, {
|
|
5686
5687
|
isNegativeDuration: c < 0,
|
|
5687
5688
|
largestUnit: Object.keys(c.values)[0]
|
|
5688
5689
|
}));
|
|
5689
5690
|
}
|
|
5690
|
-
},
|
|
5691
|
-
function
|
|
5691
|
+
}, Jr = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
5692
|
+
function Yr(...e) {
|
|
5692
5693
|
let t = e.reduce((e, t) => e + t.source, "");
|
|
5693
5694
|
return RegExp(`^${t}$`);
|
|
5694
5695
|
}
|
|
5695
|
-
function
|
|
5696
|
+
function Xr(...e) {
|
|
5696
5697
|
return (t) => e.reduce(([e, n, r], i) => {
|
|
5697
5698
|
let [a, o, s] = i(t, r);
|
|
5698
5699
|
return [
|
|
@@ -5709,7 +5710,7 @@ function W(...e) {
|
|
|
5709
5710
|
1
|
|
5710
5711
|
]).slice(0, 2);
|
|
5711
5712
|
}
|
|
5712
|
-
function
|
|
5713
|
+
function Zr(e, ...t) {
|
|
5713
5714
|
if (e == null) return [null, null];
|
|
5714
5715
|
for (let [n, r] of t) {
|
|
5715
5716
|
let t = n.exec(e);
|
|
@@ -5717,10 +5718,10 @@ function G(e, ...t) {
|
|
|
5717
5718
|
}
|
|
5718
5719
|
return [null, null];
|
|
5719
5720
|
}
|
|
5720
|
-
function
|
|
5721
|
+
function Qr(...e) {
|
|
5721
5722
|
return (t, n) => {
|
|
5722
5723
|
let r = {}, i = 0;
|
|
5723
|
-
for (; i < e.length; i++) r[e[i]] =
|
|
5724
|
+
for (; i < e.length; i++) r[e[i]] = U(t[n + i]);
|
|
5724
5725
|
return [
|
|
5725
5726
|
r,
|
|
5726
5727
|
null,
|
|
@@ -5728,64 +5729,64 @@ function Xr(...e) {
|
|
|
5728
5729
|
];
|
|
5729
5730
|
};
|
|
5730
5731
|
}
|
|
5731
|
-
var
|
|
5732
|
-
function
|
|
5732
|
+
var $r = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, ei = `(?:${$r.source}?(?:\\[(${Jr.source})\\])?)?`, ti = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, ni = RegExp(`${ti.source}${ei}`), ri = RegExp(`(?:[Tt]${ni.source})?`), ii = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, ai = /(\d{4})-?W(\d\d)(?:-?(\d))?/, oi = /(\d{4})-?(\d{3})/, si = Qr("weekYear", "weekNumber", "weekDay"), ci = Qr("year", "ordinal"), li = /(\d{4})-(\d\d)-(\d\d)/, ui = RegExp(`${ti.source} ?(?:${$r.source}|(${Jr.source}))?`), di = RegExp(`(?: ${ui.source})?`);
|
|
5733
|
+
function fi(e, t, n) {
|
|
5733
5734
|
let r = e[t];
|
|
5734
|
-
return
|
|
5735
|
+
return R(r) ? n : U(r);
|
|
5735
5736
|
}
|
|
5736
|
-
function
|
|
5737
|
+
function pi(e, t) {
|
|
5737
5738
|
return [
|
|
5738
5739
|
{
|
|
5739
|
-
year:
|
|
5740
|
-
month:
|
|
5741
|
-
day:
|
|
5740
|
+
year: fi(e, t),
|
|
5741
|
+
month: fi(e, t + 1, 1),
|
|
5742
|
+
day: fi(e, t + 2, 1)
|
|
5742
5743
|
},
|
|
5743
5744
|
null,
|
|
5744
5745
|
t + 3
|
|
5745
5746
|
];
|
|
5746
5747
|
}
|
|
5747
|
-
function
|
|
5748
|
+
function mi(e, t) {
|
|
5748
5749
|
return [
|
|
5749
5750
|
{
|
|
5750
|
-
hours:
|
|
5751
|
-
minutes:
|
|
5752
|
-
seconds:
|
|
5753
|
-
milliseconds:
|
|
5751
|
+
hours: fi(e, t, 0),
|
|
5752
|
+
minutes: fi(e, t + 1, 0),
|
|
5753
|
+
seconds: fi(e, t + 2, 0),
|
|
5754
|
+
milliseconds: pr(e[t + 3])
|
|
5754
5755
|
},
|
|
5755
5756
|
null,
|
|
5756
5757
|
t + 4
|
|
5757
5758
|
];
|
|
5758
5759
|
}
|
|
5759
|
-
function
|
|
5760
|
-
let n = !e[t] && !e[t + 1], r =
|
|
5760
|
+
function hi(e, t) {
|
|
5761
|
+
let n = !e[t] && !e[t + 1], r = Cr(e[t + 1], e[t + 2]);
|
|
5761
5762
|
return [
|
|
5762
5763
|
{},
|
|
5763
|
-
n ? null :
|
|
5764
|
+
n ? null : M.instance(r),
|
|
5764
5765
|
t + 3
|
|
5765
5766
|
];
|
|
5766
5767
|
}
|
|
5767
|
-
function
|
|
5768
|
+
function gi(e, t) {
|
|
5768
5769
|
return [
|
|
5769
5770
|
{},
|
|
5770
|
-
e[t] ?
|
|
5771
|
+
e[t] ? A.create(e[t]) : null,
|
|
5771
5772
|
t + 1
|
|
5772
5773
|
];
|
|
5773
5774
|
}
|
|
5774
|
-
var
|
|
5775
|
-
function
|
|
5775
|
+
var _i = RegExp(`^T?${ti.source}$`), vi = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
|
5776
|
+
function yi(e) {
|
|
5776
5777
|
let [t, n, r, i, a, o, s, c, l] = e, u = t[0] === "-", d = c && c[0] === "-", f = (e, t = !1) => e !== void 0 && (t || e && u) ? -e : e;
|
|
5777
5778
|
return [{
|
|
5778
|
-
years: f(
|
|
5779
|
-
months: f(
|
|
5780
|
-
weeks: f(
|
|
5781
|
-
days: f(
|
|
5782
|
-
hours: f(
|
|
5783
|
-
minutes: f(
|
|
5784
|
-
seconds: f(
|
|
5785
|
-
milliseconds: f(
|
|
5779
|
+
years: f(W(n)),
|
|
5780
|
+
months: f(W(r)),
|
|
5781
|
+
weeks: f(W(i)),
|
|
5782
|
+
days: f(W(a)),
|
|
5783
|
+
hours: f(W(o)),
|
|
5784
|
+
minutes: f(W(s)),
|
|
5785
|
+
seconds: f(W(c), c === "-0"),
|
|
5786
|
+
milliseconds: f(pr(l), d)
|
|
5786
5787
|
}];
|
|
5787
5788
|
}
|
|
5788
|
-
var
|
|
5789
|
+
var bi = {
|
|
5789
5790
|
GMT: 0,
|
|
5790
5791
|
EDT: -240,
|
|
5791
5792
|
EST: -300,
|
|
@@ -5796,55 +5797,55 @@ var vi = {
|
|
|
5796
5797
|
PDT: -420,
|
|
5797
5798
|
PST: -480
|
|
5798
5799
|
};
|
|
5799
|
-
function
|
|
5800
|
+
function xi(e, t, n, r, i, a, o) {
|
|
5800
5801
|
let s = {
|
|
5801
|
-
year: t.length === 2 ?
|
|
5802
|
-
month:
|
|
5803
|
-
day:
|
|
5804
|
-
hour:
|
|
5805
|
-
minute:
|
|
5802
|
+
year: t.length === 2 ? xr(U(t)) : U(t),
|
|
5803
|
+
month: kr.indexOf(n) + 1,
|
|
5804
|
+
day: U(r),
|
|
5805
|
+
hour: U(i),
|
|
5806
|
+
minute: U(a)
|
|
5806
5807
|
};
|
|
5807
|
-
return o && (s.second =
|
|
5808
|
+
return o && (s.second = U(o)), e && (s.weekday = e.length > 3 ? Mr.indexOf(e) + 1 : Nr.indexOf(e) + 1), s;
|
|
5808
5809
|
}
|
|
5809
|
-
var
|
|
5810
|
-
function
|
|
5811
|
-
let [, t, n, r, i, a, o, s, c, l, u, d] = e, f =
|
|
5812
|
-
return p = c ?
|
|
5810
|
+
var Si = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
|
5811
|
+
function Ci(e) {
|
|
5812
|
+
let [, t, n, r, i, a, o, s, c, l, u, d] = e, f = xi(t, i, r, n, a, o, s), p;
|
|
5813
|
+
return p = c ? bi[c] : l ? 0 : Cr(u, d), [f, new M(p)];
|
|
5813
5814
|
}
|
|
5814
|
-
function
|
|
5815
|
+
function wi(e) {
|
|
5815
5816
|
return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
5816
5817
|
}
|
|
5817
|
-
var
|
|
5818
|
-
function
|
|
5818
|
+
var Ti = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, Ei = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, Di = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
|
5819
|
+
function Oi(e) {
|
|
5819
5820
|
let [, t, n, r, i, a, o, s] = e;
|
|
5820
|
-
return [
|
|
5821
|
+
return [xi(t, i, r, n, a, o, s), M.utcInstance];
|
|
5821
5822
|
}
|
|
5822
|
-
function
|
|
5823
|
+
function ki(e) {
|
|
5823
5824
|
let [, t, n, r, i, a, o, s] = e;
|
|
5824
|
-
return [
|
|
5825
|
-
}
|
|
5826
|
-
var Oi = U(ni, ti), ki = U(ri, ti), Ai = U(ii, ti), ji = U(ei), Mi = W(di, fi, pi, mi), Ni = W(ai, fi, pi, mi), Pi = W(oi, fi, pi, mi), Fi = W(fi, pi, mi);
|
|
5827
|
-
function Ii(e) {
|
|
5828
|
-
return G(e, [Oi, Mi], [ki, Ni], [Ai, Pi], [ji, Fi]);
|
|
5829
|
-
}
|
|
5830
|
-
function Li(e) {
|
|
5831
|
-
return G(Si(e), [bi, xi]);
|
|
5825
|
+
return [xi(t, s, n, r, i, a, o), M.utcInstance];
|
|
5832
5826
|
}
|
|
5827
|
+
var Ai = Yr(ii, ri), ji = Yr(ai, ri), Mi = Yr(oi, ri), Ni = Yr(ni), Pi = Xr(pi, mi, hi, gi), Fi = Xr(si, mi, hi, gi), Ii = Xr(ci, mi, hi, gi), Li = Xr(mi, hi, gi);
|
|
5833
5828
|
function Ri(e) {
|
|
5834
|
-
return
|
|
5829
|
+
return Zr(e, [Ai, Pi], [ji, Fi], [Mi, Ii], [Ni, Li]);
|
|
5835
5830
|
}
|
|
5836
5831
|
function zi(e) {
|
|
5837
|
-
return
|
|
5832
|
+
return Zr(wi(e), [Si, Ci]);
|
|
5833
|
+
}
|
|
5834
|
+
function Bi(e) {
|
|
5835
|
+
return Zr(e, [Ti, Oi], [Ei, Oi], [Di, ki]);
|
|
5838
5836
|
}
|
|
5839
|
-
var Bi = W(fi);
|
|
5840
5837
|
function Vi(e) {
|
|
5841
|
-
return
|
|
5838
|
+
return Zr(e, [vi, yi]);
|
|
5839
|
+
}
|
|
5840
|
+
var Hi = Xr(mi);
|
|
5841
|
+
function Ui(e) {
|
|
5842
|
+
return Zr(e, [_i, Hi]);
|
|
5842
5843
|
}
|
|
5843
|
-
var
|
|
5844
|
-
function
|
|
5845
|
-
return
|
|
5844
|
+
var Wi = Yr(li, di), Gi = Yr(ui), Ki = Xr(mi, hi, gi);
|
|
5845
|
+
function qi(e) {
|
|
5846
|
+
return Zr(e, [Wi, Pi], [Gi, Ki]);
|
|
5846
5847
|
}
|
|
5847
|
-
var
|
|
5848
|
+
var Ji = "Invalid Duration", Yi = {
|
|
5848
5849
|
weeks: {
|
|
5849
5850
|
days: 7,
|
|
5850
5851
|
hours: 168,
|
|
@@ -5868,7 +5869,7 @@ var Ki = "Invalid Duration", qi = {
|
|
|
5868
5869
|
milliseconds: 6e4
|
|
5869
5870
|
},
|
|
5870
5871
|
seconds: { milliseconds: 1e3 }
|
|
5871
|
-
},
|
|
5872
|
+
}, Xi = {
|
|
5872
5873
|
years: {
|
|
5873
5874
|
quarters: 4,
|
|
5874
5875
|
months: 12,
|
|
@@ -5896,8 +5897,8 @@ var Ki = "Invalid Duration", qi = {
|
|
|
5896
5897
|
seconds: 2592e3,
|
|
5897
5898
|
milliseconds: 2592e6
|
|
5898
5899
|
},
|
|
5899
|
-
...
|
|
5900
|
-
}, K = 146097 / 400,
|
|
5900
|
+
...Yi
|
|
5901
|
+
}, K = 146097 / 400, Zi = 146097 / 4800, Qi = {
|
|
5901
5902
|
years: {
|
|
5902
5903
|
quarters: 4,
|
|
5903
5904
|
months: 12,
|
|
@@ -5918,14 +5919,14 @@ var Ki = "Invalid Duration", qi = {
|
|
|
5918
5919
|
milliseconds: K * 24 * 60 * 60 * 1e3 / 4
|
|
5919
5920
|
},
|
|
5920
5921
|
months: {
|
|
5921
|
-
weeks:
|
|
5922
|
-
days:
|
|
5923
|
-
hours:
|
|
5924
|
-
minutes:
|
|
5925
|
-
seconds:
|
|
5926
|
-
milliseconds:
|
|
5927
|
-
},
|
|
5928
|
-
...
|
|
5922
|
+
weeks: Zi / 7,
|
|
5923
|
+
days: Zi,
|
|
5924
|
+
hours: Zi * 24,
|
|
5925
|
+
minutes: Zi * 24 * 60,
|
|
5926
|
+
seconds: Zi * 24 * 60 * 60,
|
|
5927
|
+
milliseconds: Zi * 24 * 60 * 60 * 1e3
|
|
5928
|
+
},
|
|
5929
|
+
...Yi
|
|
5929
5930
|
}, q = [
|
|
5930
5931
|
"years",
|
|
5931
5932
|
"quarters",
|
|
@@ -5936,7 +5937,7 @@ var Ki = "Invalid Duration", qi = {
|
|
|
5936
5937
|
"minutes",
|
|
5937
5938
|
"seconds",
|
|
5938
5939
|
"milliseconds"
|
|
5939
|
-
],
|
|
5940
|
+
], $i = q.slice(0).reverse();
|
|
5940
5941
|
function J(e, t, n = !1) {
|
|
5941
5942
|
return new Y({
|
|
5942
5943
|
values: n ? t.values : {
|
|
@@ -5948,22 +5949,22 @@ function J(e, t, n = !1) {
|
|
|
5948
5949
|
matrix: t.matrix || e.matrix
|
|
5949
5950
|
});
|
|
5950
5951
|
}
|
|
5951
|
-
function
|
|
5952
|
+
function ea(e, t) {
|
|
5952
5953
|
let n = t.milliseconds ?? 0;
|
|
5953
|
-
for (let r of
|
|
5954
|
+
for (let r of $i.slice(1)) t[r] && (n += t[r] * e[r].milliseconds);
|
|
5954
5955
|
return n;
|
|
5955
5956
|
}
|
|
5956
|
-
function
|
|
5957
|
-
let n =
|
|
5957
|
+
function ta(e, t) {
|
|
5958
|
+
let n = ea(e, t) < 0 ? -1 : 1;
|
|
5958
5959
|
q.reduceRight((r, i) => {
|
|
5959
|
-
if (
|
|
5960
|
+
if (R(t[i])) return r;
|
|
5960
5961
|
if (r) {
|
|
5961
5962
|
let a = t[r] * n, o = e[i][r], s = Math.floor(a / o);
|
|
5962
5963
|
t[i] += s * n, t[r] -= s * o * n;
|
|
5963
5964
|
}
|
|
5964
5965
|
return i;
|
|
5965
5966
|
}, null), q.reduce((n, r) => {
|
|
5966
|
-
if (
|
|
5967
|
+
if (R(t[r])) return n;
|
|
5967
5968
|
if (n) {
|
|
5968
5969
|
let i = t[n] % 1;
|
|
5969
5970
|
t[n] -= i, t[r] += i * e[n][r];
|
|
@@ -5971,46 +5972,46 @@ function $i(e, t) {
|
|
|
5971
5972
|
return r;
|
|
5972
5973
|
}, null);
|
|
5973
5974
|
}
|
|
5974
|
-
function
|
|
5975
|
+
function na(e) {
|
|
5975
5976
|
let t = {};
|
|
5976
5977
|
for (let [n, r] of Object.entries(e)) r !== 0 && (t[n] = r);
|
|
5977
5978
|
return t;
|
|
5978
5979
|
}
|
|
5979
5980
|
var Y = class e {
|
|
5980
5981
|
constructor(e) {
|
|
5981
|
-
let t = e.conversionAccuracy === "longterm" || !1, n = t ?
|
|
5982
|
-
e.matrix && (n = e.matrix), this.values = e.values, this.loc = e.loc ||
|
|
5982
|
+
let t = e.conversionAccuracy === "longterm" || !1, n = t ? Qi : Xi;
|
|
5983
|
+
e.matrix && (n = e.matrix), this.values = e.values, this.loc = e.loc || j.create(), this.conversionAccuracy = t ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = n, this.isLuxonDuration = !0;
|
|
5983
5984
|
}
|
|
5984
5985
|
static fromMillis(t, n) {
|
|
5985
5986
|
return e.fromObject({ milliseconds: t }, n);
|
|
5986
5987
|
}
|
|
5987
5988
|
static fromObject(t, n = {}) {
|
|
5988
|
-
if (typeof t != "object" || !t) throw new
|
|
5989
|
+
if (typeof t != "object" || !t) throw new T(`Duration.fromObject: argument expected to be an object, got ${t === null ? "null" : typeof t}`);
|
|
5989
5990
|
return new e({
|
|
5990
|
-
values:
|
|
5991
|
-
loc:
|
|
5991
|
+
values: Tr(t, e.normalizeUnit),
|
|
5992
|
+
loc: j.fromObject(n),
|
|
5992
5993
|
conversionAccuracy: n.conversionAccuracy,
|
|
5993
5994
|
matrix: n.matrix
|
|
5994
5995
|
});
|
|
5995
5996
|
}
|
|
5996
5997
|
static fromDurationLike(t) {
|
|
5997
|
-
if (
|
|
5998
|
+
if (z(t)) return e.fromMillis(t);
|
|
5998
5999
|
if (e.isDuration(t)) return t;
|
|
5999
6000
|
if (typeof t == "object") return e.fromObject(t);
|
|
6000
|
-
throw new
|
|
6001
|
+
throw new T(`Unknown duration argument ${t} of type ${typeof t}`);
|
|
6001
6002
|
}
|
|
6002
6003
|
static fromISO(t, n) {
|
|
6003
|
-
let [r] =
|
|
6004
|
+
let [r] = Vi(t);
|
|
6004
6005
|
return r ? e.fromObject(r, n) : e.invalid("unparsable", `the input "${t}" can't be parsed as ISO 8601`);
|
|
6005
6006
|
}
|
|
6006
6007
|
static fromISOTime(t, n) {
|
|
6007
|
-
let [r] =
|
|
6008
|
+
let [r] = Ui(t);
|
|
6008
6009
|
return r ? e.fromObject(r, n) : e.invalid("unparsable", `the input "${t}" can't be parsed as ISO 8601`);
|
|
6009
6010
|
}
|
|
6010
6011
|
static invalid(t, n = null) {
|
|
6011
|
-
if (!t) throw new
|
|
6012
|
-
let r = t instanceof
|
|
6013
|
-
if (
|
|
6012
|
+
if (!t) throw new T("need to specify a reason the Duration is invalid");
|
|
6013
|
+
let r = t instanceof I ? t : new I(t, n);
|
|
6014
|
+
if (F.throwOnInvalid) throw new St(r);
|
|
6014
6015
|
return new e({ invalid: r });
|
|
6015
6016
|
}
|
|
6016
6017
|
static normalizeUnit(e) {
|
|
@@ -6051,13 +6052,13 @@ var Y = class e {
|
|
|
6051
6052
|
...t,
|
|
6052
6053
|
floor: t.round !== !1 && t.floor !== !1
|
|
6053
6054
|
};
|
|
6054
|
-
return this.isValid ?
|
|
6055
|
+
return this.isValid ? G.create(this.loc, n).formatDurationFromString(this, e) : Ji;
|
|
6055
6056
|
}
|
|
6056
6057
|
toHuman(e = {}) {
|
|
6057
|
-
if (!this.isValid) return
|
|
6058
|
+
if (!this.isValid) return Ji;
|
|
6058
6059
|
let t = e.showZeros !== !1, n = q.map((n) => {
|
|
6059
6060
|
let r = this.values[n];
|
|
6060
|
-
return
|
|
6061
|
+
return R(r) || r === 0 && !t ? null : this.loc.numberFormatter({
|
|
6061
6062
|
style: "unit",
|
|
6062
6063
|
unitDisplay: "long",
|
|
6063
6064
|
...e,
|
|
@@ -6076,7 +6077,7 @@ var Y = class e {
|
|
|
6076
6077
|
toISO() {
|
|
6077
6078
|
if (!this.isValid) return null;
|
|
6078
6079
|
let e = "P";
|
|
6079
|
-
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e +=
|
|
6080
|
+
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += mr(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
|
6080
6081
|
}
|
|
6081
6082
|
toISOTime(e = {}) {
|
|
6082
6083
|
if (!this.isValid) return null;
|
|
@@ -6100,7 +6101,7 @@ var Y = class e {
|
|
|
6100
6101
|
return this.isValid ? `Duration { values: ${JSON.stringify(this.values)} }` : `Duration { Invalid, reason: ${this.invalidReason} }`;
|
|
6101
6102
|
}
|
|
6102
6103
|
toMillis() {
|
|
6103
|
-
return this.isValid ?
|
|
6104
|
+
return this.isValid ? ea(this.matrix, this.values) : NaN;
|
|
6104
6105
|
}
|
|
6105
6106
|
valueOf() {
|
|
6106
6107
|
return this.toMillis();
|
|
@@ -6108,7 +6109,7 @@ var Y = class e {
|
|
|
6108
6109
|
plus(t) {
|
|
6109
6110
|
if (!this.isValid) return this;
|
|
6110
6111
|
let n = e.fromDurationLike(t), r = {};
|
|
6111
|
-
for (let e of q) (
|
|
6112
|
+
for (let e of q) (B(n.values, e) || B(this.values, e)) && (r[e] = n.get(e) + this.get(e));
|
|
6112
6113
|
return J(this, { values: r }, !0);
|
|
6113
6114
|
}
|
|
6114
6115
|
minus(t) {
|
|
@@ -6119,7 +6120,7 @@ var Y = class e {
|
|
|
6119
6120
|
mapUnits(e) {
|
|
6120
6121
|
if (!this.isValid) return this;
|
|
6121
6122
|
let t = {};
|
|
6122
|
-
for (let n of Object.keys(this.values)) t[n] =
|
|
6123
|
+
for (let n of Object.keys(this.values)) t[n] = wr(e(this.values[n], n));
|
|
6123
6124
|
return J(this, { values: t }, !0);
|
|
6124
6125
|
}
|
|
6125
6126
|
get(t) {
|
|
@@ -6129,7 +6130,7 @@ var Y = class e {
|
|
|
6129
6130
|
if (!this.isValid) return this;
|
|
6130
6131
|
let n = {
|
|
6131
6132
|
...this.values,
|
|
6132
|
-
...
|
|
6133
|
+
...Tr(t, e.normalizeUnit)
|
|
6133
6134
|
};
|
|
6134
6135
|
return J(this, { values: n });
|
|
6135
6136
|
}
|
|
@@ -6150,11 +6151,11 @@ var Y = class e {
|
|
|
6150
6151
|
normalize() {
|
|
6151
6152
|
if (!this.isValid) return this;
|
|
6152
6153
|
let e = this.toObject();
|
|
6153
|
-
return
|
|
6154
|
+
return ta(this.matrix, e), J(this, { values: e }, !0);
|
|
6154
6155
|
}
|
|
6155
6156
|
rescale() {
|
|
6156
6157
|
if (!this.isValid) return this;
|
|
6157
|
-
let e =
|
|
6158
|
+
let e = na(this.normalize().shiftToAll().toObject());
|
|
6158
6159
|
return J(this, { values: e }, !0);
|
|
6159
6160
|
}
|
|
6160
6161
|
shiftTo(...t) {
|
|
@@ -6165,12 +6166,12 @@ var Y = class e {
|
|
|
6165
6166
|
a = e;
|
|
6166
6167
|
let t = 0;
|
|
6167
6168
|
for (let n in r) t += this.matrix[n][e] * r[n], r[n] = 0;
|
|
6168
|
-
|
|
6169
|
+
z(i[e]) && (t += i[e]);
|
|
6169
6170
|
let o = Math.trunc(t);
|
|
6170
6171
|
n[e] = o, r[e] = (t * 1e3 - o * 1e3) / 1e3;
|
|
6171
|
-
} else
|
|
6172
|
+
} else z(i[e]) && (r[e] = i[e]);
|
|
6172
6173
|
for (let e in r) r[e] !== 0 && (n[a] += e === a ? r[e] : r[e] / this.matrix[a][e]);
|
|
6173
|
-
return
|
|
6174
|
+
return ta(this.matrix, n), J(this, { values: n }, !0);
|
|
6174
6175
|
}
|
|
6175
6176
|
shiftToAll() {
|
|
6176
6177
|
return this.isValid ? this.shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") : this;
|
|
@@ -6183,7 +6184,7 @@ var Y = class e {
|
|
|
6183
6184
|
}
|
|
6184
6185
|
removeZeros() {
|
|
6185
6186
|
if (!this.isValid) return this;
|
|
6186
|
-
let e =
|
|
6187
|
+
let e = na(this.values);
|
|
6187
6188
|
return J(this, { values: e }, !0);
|
|
6188
6189
|
}
|
|
6189
6190
|
get years() {
|
|
@@ -6230,33 +6231,33 @@ var Y = class e {
|
|
|
6230
6231
|
for (let n of q) if (!t(this.values[n], e.values[n])) return !1;
|
|
6231
6232
|
return !0;
|
|
6232
6233
|
}
|
|
6233
|
-
},
|
|
6234
|
-
function
|
|
6235
|
-
return !e || !e.isValid ?
|
|
6234
|
+
}, ra = "Invalid Interval";
|
|
6235
|
+
function ia(e, t) {
|
|
6236
|
+
return !e || !e.isValid ? aa.invalid("missing or invalid start") : !t || !t.isValid ? aa.invalid("missing or invalid end") : t < e ? aa.invalid("end before start", `The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`) : null;
|
|
6236
6237
|
}
|
|
6237
|
-
var
|
|
6238
|
+
var aa = class e {
|
|
6238
6239
|
constructor(e) {
|
|
6239
6240
|
this.s = e.start, this.e = e.end, this.invalid = e.invalid || null, this.isLuxonInterval = !0;
|
|
6240
6241
|
}
|
|
6241
6242
|
static invalid(t, n = null) {
|
|
6242
|
-
if (!t) throw new
|
|
6243
|
-
let r = t instanceof
|
|
6244
|
-
if (
|
|
6243
|
+
if (!t) throw new T("need to specify a reason the Interval is invalid");
|
|
6244
|
+
let r = t instanceof I ? t : new I(t, n);
|
|
6245
|
+
if (F.throwOnInvalid) throw new xt(r);
|
|
6245
6246
|
return new e({ invalid: r });
|
|
6246
6247
|
}
|
|
6247
6248
|
static fromDateTimes(t, n) {
|
|
6248
|
-
let r =
|
|
6249
|
-
return
|
|
6249
|
+
let r = ao(t), i = ao(n);
|
|
6250
|
+
return ia(r, i) ?? new e({
|
|
6250
6251
|
start: r,
|
|
6251
6252
|
end: i
|
|
6252
6253
|
});
|
|
6253
6254
|
}
|
|
6254
6255
|
static after(t, n) {
|
|
6255
|
-
let r = Y.fromDurationLike(n), i =
|
|
6256
|
+
let r = Y.fromDurationLike(n), i = ao(t);
|
|
6256
6257
|
return e.fromDateTimes(i, i.plus(r));
|
|
6257
6258
|
}
|
|
6258
6259
|
static before(t, n) {
|
|
6259
|
-
let r = Y.fromDurationLike(n), i =
|
|
6260
|
+
let r = Y.fromDurationLike(n), i = ao(t);
|
|
6260
6261
|
return e.fromDateTimes(i.minus(r), i);
|
|
6261
6262
|
}
|
|
6262
6263
|
static fromISO(t, n) {
|
|
@@ -6334,7 +6335,7 @@ var ra = class e {
|
|
|
6334
6335
|
}
|
|
6335
6336
|
splitAt(...t) {
|
|
6336
6337
|
if (!this.isValid) return [];
|
|
6337
|
-
let n = t.map(
|
|
6338
|
+
let n = t.map(ao).filter((e) => this.contains(e)).sort((e, t) => e.toMillis() - t.toMillis()), r = [], { s: i } = this, a = 0;
|
|
6338
6339
|
for (; i < this.e;) {
|
|
6339
6340
|
let t = n[a] || this.e, o = +t > +this.e ? this.e : t;
|
|
6340
6341
|
r.push(e.fromDateTimes(i, o)), i = o, a += 1;
|
|
@@ -6398,25 +6399,25 @@ var ra = class e {
|
|
|
6398
6399
|
return e.xor([this].concat(t)).map((e) => this.intersection(e)).filter((e) => e && !e.isEmpty());
|
|
6399
6400
|
}
|
|
6400
6401
|
toString() {
|
|
6401
|
-
return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` :
|
|
6402
|
+
return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : ra;
|
|
6402
6403
|
}
|
|
6403
6404
|
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
6404
6405
|
return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`;
|
|
6405
6406
|
}
|
|
6406
6407
|
toLocaleString(e = wt, t = {}) {
|
|
6407
|
-
return this.isValid ?
|
|
6408
|
+
return this.isValid ? G.create(this.s.loc.clone(t), e).formatInterval(this) : ra;
|
|
6408
6409
|
}
|
|
6409
6410
|
toISO(e) {
|
|
6410
|
-
return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` :
|
|
6411
|
+
return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : ra;
|
|
6411
6412
|
}
|
|
6412
6413
|
toISODate() {
|
|
6413
|
-
return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` :
|
|
6414
|
+
return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : ra;
|
|
6414
6415
|
}
|
|
6415
6416
|
toISOTime(e) {
|
|
6416
|
-
return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` :
|
|
6417
|
+
return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : ra;
|
|
6417
6418
|
}
|
|
6418
6419
|
toFormat(e, { separator: t = " – " } = {}) {
|
|
6419
|
-
return this.isValid ? `${this.s.toFormat(e)}${t}${this.e.toFormat(e)}` :
|
|
6420
|
+
return this.isValid ? `${this.s.toFormat(e)}${t}${this.e.toFormat(e)}` : ra;
|
|
6420
6421
|
}
|
|
6421
6422
|
toDuration(e, t) {
|
|
6422
6423
|
return this.isValid ? this.e.diff(this.s, e, t) : Y.invalid(this.invalidReason);
|
|
@@ -6424,43 +6425,43 @@ var ra = class e {
|
|
|
6424
6425
|
mapEndpoints(t) {
|
|
6425
6426
|
return e.fromDateTimes(t(this.s), t(this.e));
|
|
6426
6427
|
}
|
|
6427
|
-
},
|
|
6428
|
-
static hasDST(e =
|
|
6428
|
+
}, oa = class {
|
|
6429
|
+
static hasDST(e = F.defaultZone) {
|
|
6429
6430
|
let t = $.now().setZone(e).set({ month: 12 });
|
|
6430
6431
|
return !e.isUniversal && t.offset !== t.set({ month: 6 }).offset;
|
|
6431
6432
|
}
|
|
6432
6433
|
static isValidIANAZone(e) {
|
|
6433
|
-
return
|
|
6434
|
+
return A.isValidZone(e);
|
|
6434
6435
|
}
|
|
6435
6436
|
static normalizeZone(e) {
|
|
6436
|
-
return
|
|
6437
|
+
return N(e, F.defaultZone);
|
|
6437
6438
|
}
|
|
6438
6439
|
static getStartOfWeek({ locale: e = null, locObj: t = null } = {}) {
|
|
6439
|
-
return (t ||
|
|
6440
|
+
return (t || j.create(e)).getStartOfWeek();
|
|
6440
6441
|
}
|
|
6441
6442
|
static getMinimumDaysInFirstWeek({ locale: e = null, locObj: t = null } = {}) {
|
|
6442
|
-
return (t ||
|
|
6443
|
+
return (t || j.create(e)).getMinDaysInFirstWeek();
|
|
6443
6444
|
}
|
|
6444
6445
|
static getWeekendWeekdays({ locale: e = null, locObj: t = null } = {}) {
|
|
6445
|
-
return (t ||
|
|
6446
|
+
return (t || j.create(e)).getWeekendDays().slice();
|
|
6446
6447
|
}
|
|
6447
6448
|
static months(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null, outputCalendar: i = "gregory" } = {}) {
|
|
6448
|
-
return (r ||
|
|
6449
|
+
return (r || j.create(t, n, i)).months(e);
|
|
6449
6450
|
}
|
|
6450
6451
|
static monthsFormat(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null, outputCalendar: i = "gregory" } = {}) {
|
|
6451
|
-
return (r ||
|
|
6452
|
+
return (r || j.create(t, n, i)).months(e, !0);
|
|
6452
6453
|
}
|
|
6453
6454
|
static weekdays(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null } = {}) {
|
|
6454
|
-
return (r ||
|
|
6455
|
+
return (r || j.create(t, n, null)).weekdays(e);
|
|
6455
6456
|
}
|
|
6456
6457
|
static weekdaysFormat(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null } = {}) {
|
|
6457
|
-
return (r ||
|
|
6458
|
+
return (r || j.create(t, n, null)).weekdays(e, !0);
|
|
6458
6459
|
}
|
|
6459
6460
|
static meridiems({ locale: e = null } = {}) {
|
|
6460
|
-
return
|
|
6461
|
+
return j.create(e).meridiems();
|
|
6461
6462
|
}
|
|
6462
6463
|
static eras(e = "short", { locale: t = null } = {}) {
|
|
6463
|
-
return
|
|
6464
|
+
return j.create(t, null, "gregory").eras(e);
|
|
6464
6465
|
}
|
|
6465
6466
|
static features() {
|
|
6466
6467
|
return {
|
|
@@ -6469,20 +6470,20 @@ var ra = class e {
|
|
|
6469
6470
|
};
|
|
6470
6471
|
}
|
|
6471
6472
|
};
|
|
6472
|
-
function
|
|
6473
|
+
function sa(e, t) {
|
|
6473
6474
|
let n = (e) => e.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), r = n(t) - n(e);
|
|
6474
6475
|
return Math.floor(Y.fromMillis(r).as("days"));
|
|
6475
6476
|
}
|
|
6476
|
-
function
|
|
6477
|
+
function ca(e, t, n) {
|
|
6477
6478
|
let r = [
|
|
6478
6479
|
["years", (e, t) => t.year - e.year],
|
|
6479
6480
|
["quarters", (e, t) => t.quarter - e.quarter + (t.year - e.year) * 4],
|
|
6480
6481
|
["months", (e, t) => t.month - e.month + (t.year - e.year) * 12],
|
|
6481
6482
|
["weeks", (e, t) => {
|
|
6482
|
-
let n =
|
|
6483
|
+
let n = sa(e, t);
|
|
6483
6484
|
return (n - n % 7) / 7;
|
|
6484
6485
|
}],
|
|
6485
|
-
["days",
|
|
6486
|
+
["days", sa]
|
|
6486
6487
|
], i = {}, a = e, o, s;
|
|
6487
6488
|
for (let [c, l] of r) n.indexOf(c) >= 0 && (o = c, i[c] = l(e, t), s = a.plus(i), s > t ? (i[c]--, e = a.plus(i), e > t && (s = e, i[c]--, e = a.plus(i))) : e = s);
|
|
6488
6489
|
return [
|
|
@@ -6492,8 +6493,8 @@ function oa(e, t, n) {
|
|
|
6492
6493
|
o
|
|
6493
6494
|
];
|
|
6494
6495
|
}
|
|
6495
|
-
function
|
|
6496
|
-
let [i, a, o, s] =
|
|
6496
|
+
function la(e, t, n, r) {
|
|
6497
|
+
let [i, a, o, s] = ca(e, t, n), c = t - i, l = n.filter((e) => [
|
|
6497
6498
|
"hours",
|
|
6498
6499
|
"minutes",
|
|
6499
6500
|
"seconds",
|
|
@@ -6503,45 +6504,45 @@ function sa(e, t, n, r) {
|
|
|
6503
6504
|
let u = Y.fromObject(a, r);
|
|
6504
6505
|
return l.length > 0 ? Y.fromMillis(c, r).shiftTo(...l).plus(u) : u;
|
|
6505
6506
|
}
|
|
6506
|
-
var
|
|
6507
|
+
var ua = "missing Intl.DateTimeFormat.formatToParts support";
|
|
6507
6508
|
function X(e, t = (e) => e) {
|
|
6508
6509
|
return {
|
|
6509
6510
|
regex: e,
|
|
6510
6511
|
deser: ([e]) => t(jn(e))
|
|
6511
6512
|
};
|
|
6512
6513
|
}
|
|
6513
|
-
var
|
|
6514
|
-
function
|
|
6515
|
-
return e.replace(/\./g, "\\.?").replace(
|
|
6514
|
+
var da = "[ \xA0]", fa = new RegExp(da, "g");
|
|
6515
|
+
function pa(e) {
|
|
6516
|
+
return e.replace(/\./g, "\\.?").replace(fa, da);
|
|
6516
6517
|
}
|
|
6517
|
-
function
|
|
6518
|
-
return e.replace(/\./g, "").replace(
|
|
6518
|
+
function ma(e) {
|
|
6519
|
+
return e.replace(/\./g, "").replace(fa, " ").toLowerCase();
|
|
6519
6520
|
}
|
|
6520
6521
|
function Z(e, t) {
|
|
6521
6522
|
return e === null ? null : {
|
|
6522
|
-
regex: RegExp(e.map(
|
|
6523
|
-
deser: ([n]) => e.findIndex((e) =>
|
|
6523
|
+
regex: RegExp(e.map(pa).join("|")),
|
|
6524
|
+
deser: ([n]) => e.findIndex((e) => ma(n) === ma(e)) + t
|
|
6524
6525
|
};
|
|
6525
6526
|
}
|
|
6526
|
-
function
|
|
6527
|
+
function ha(e, t) {
|
|
6527
6528
|
return {
|
|
6528
6529
|
regex: e,
|
|
6529
|
-
deser: ([, e, t]) =>
|
|
6530
|
+
deser: ([, e, t]) => Cr(e, t),
|
|
6530
6531
|
groups: t
|
|
6531
6532
|
};
|
|
6532
6533
|
}
|
|
6533
|
-
function
|
|
6534
|
+
function ga(e) {
|
|
6534
6535
|
return {
|
|
6535
6536
|
regex: e,
|
|
6536
6537
|
deser: ([e]) => e
|
|
6537
6538
|
};
|
|
6538
6539
|
}
|
|
6539
|
-
function
|
|
6540
|
+
function _a(e) {
|
|
6540
6541
|
return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
6541
6542
|
}
|
|
6542
|
-
function
|
|
6543
|
-
let n =
|
|
6544
|
-
regex: RegExp(
|
|
6543
|
+
function va(e, t) {
|
|
6544
|
+
let n = P(t), r = P(t, "{2}"), i = P(t, "{3}"), a = P(t, "{4}"), o = P(t, "{6}"), s = P(t, "{1,2}"), c = P(t, "{1,3}"), l = P(t, "{1,6}"), u = P(t, "{1,9}"), d = P(t, "{2,4}"), f = P(t, "{4,6}"), p = (e) => ({
|
|
6545
|
+
regex: RegExp(_a(e.val)),
|
|
6545
6546
|
deser: ([e]) => e,
|
|
6546
6547
|
literal: !0
|
|
6547
6548
|
}), m = ((m) => {
|
|
@@ -6550,7 +6551,7 @@ function ga(e, t) {
|
|
|
6550
6551
|
case "G": return Z(t.eras("short"), 0);
|
|
6551
6552
|
case "GG": return Z(t.eras("long"), 0);
|
|
6552
6553
|
case "y": return X(l);
|
|
6553
|
-
case "yy": return X(d,
|
|
6554
|
+
case "yy": return X(d, xr);
|
|
6554
6555
|
case "yyyy": return X(a);
|
|
6555
6556
|
case "yyyyy": return X(f);
|
|
6556
6557
|
case "yyyyyy": return X(o);
|
|
@@ -6578,12 +6579,12 @@ function ga(e, t) {
|
|
|
6578
6579
|
case "ss": return X(r);
|
|
6579
6580
|
case "S": return X(c);
|
|
6580
6581
|
case "SSS": return X(i);
|
|
6581
|
-
case "u": return
|
|
6582
|
-
case "uu": return
|
|
6582
|
+
case "u": return ga(u);
|
|
6583
|
+
case "uu": return ga(s);
|
|
6583
6584
|
case "uuu": return X(n);
|
|
6584
6585
|
case "a": return Z(t.meridiems(), 0);
|
|
6585
6586
|
case "kkkk": return X(a);
|
|
6586
|
-
case "kk": return X(d,
|
|
6587
|
+
case "kk": return X(d, xr);
|
|
6587
6588
|
case "W": return X(s);
|
|
6588
6589
|
case "WW": return X(r);
|
|
6589
6590
|
case "E":
|
|
@@ -6593,16 +6594,16 @@ function ga(e, t) {
|
|
|
6593
6594
|
case "ccc": return Z(t.weekdays("short", !0), 1);
|
|
6594
6595
|
case "cccc": return Z(t.weekdays("long", !0), 1);
|
|
6595
6596
|
case "Z":
|
|
6596
|
-
case "ZZ": return
|
|
6597
|
-
case "ZZZ": return
|
|
6598
|
-
case "z": return
|
|
6599
|
-
case " ": return
|
|
6597
|
+
case "ZZ": return ha(RegExp(`([+-]${s.source})(?::(${r.source}))?`), 2);
|
|
6598
|
+
case "ZZZ": return ha(RegExp(`([+-]${s.source})(${r.source})?`), 2);
|
|
6599
|
+
case "z": return ga(/[a-z_+-/]{1,256}?/i);
|
|
6600
|
+
case " ": return ga(/[^\S\n\r]/);
|
|
6600
6601
|
default: return p(m);
|
|
6601
6602
|
}
|
|
6602
|
-
})(e) || { invalidReason:
|
|
6603
|
+
})(e) || { invalidReason: ua };
|
|
6603
6604
|
return m.token = e, m;
|
|
6604
6605
|
}
|
|
6605
|
-
var
|
|
6606
|
+
var ya = {
|
|
6606
6607
|
year: {
|
|
6607
6608
|
"2-digit": "yy",
|
|
6608
6609
|
numeric: "yyyyy"
|
|
@@ -6644,7 +6645,7 @@ var _a = {
|
|
|
6644
6645
|
short: "ZZZ"
|
|
6645
6646
|
}
|
|
6646
6647
|
};
|
|
6647
|
-
function
|
|
6648
|
+
function ba(e, t, n) {
|
|
6648
6649
|
let { type: r, value: i } = e;
|
|
6649
6650
|
if (r === "literal") {
|
|
6650
6651
|
let e = /^\s+$/.test(i);
|
|
@@ -6655,20 +6656,20 @@ function va(e, t, n) {
|
|
|
6655
6656
|
}
|
|
6656
6657
|
let a = t[r], o = r;
|
|
6657
6658
|
r === "hour" && (o = t.hour12 == null ? t.hourCycle == null ? n.hour12 ? "hour12" : "hour24" : t.hourCycle === "h11" || t.hourCycle === "h12" ? "hour12" : "hour24" : t.hour12 ? "hour12" : "hour24");
|
|
6658
|
-
let s =
|
|
6659
|
+
let s = ya[o];
|
|
6659
6660
|
if (typeof s == "object" && (s = s[a]), s) return {
|
|
6660
6661
|
literal: !1,
|
|
6661
6662
|
val: s
|
|
6662
6663
|
};
|
|
6663
6664
|
}
|
|
6664
|
-
function
|
|
6665
|
+
function xa(e) {
|
|
6665
6666
|
return [`^${e.map((e) => e.regex).reduce((e, t) => `${e}(${t.source})`, "")}$`, e];
|
|
6666
6667
|
}
|
|
6667
|
-
function
|
|
6668
|
+
function Sa(e, t, n) {
|
|
6668
6669
|
let r = e.match(t);
|
|
6669
6670
|
if (r) {
|
|
6670
6671
|
let e = {}, t = 1;
|
|
6671
|
-
for (let i in n) if (
|
|
6672
|
+
for (let i in n) if (B(n, i)) {
|
|
6672
6673
|
let a = n[i], o = a.groups ? a.groups + 1 : 1;
|
|
6673
6674
|
!a.literal && a.token && (e[a.token.val[0]] = a.deser(r.slice(t, t + o))), t += o;
|
|
6674
6675
|
}
|
|
@@ -6676,7 +6677,7 @@ function ba(e, t, n) {
|
|
|
6676
6677
|
}
|
|
6677
6678
|
return [r, {}];
|
|
6678
6679
|
}
|
|
6679
|
-
function
|
|
6680
|
+
function Ca(e) {
|
|
6680
6681
|
let t = (e) => {
|
|
6681
6682
|
switch (e) {
|
|
6682
6683
|
case "S": return "millisecond";
|
|
@@ -6697,7 +6698,7 @@ function xa(e) {
|
|
|
6697
6698
|
default: return null;
|
|
6698
6699
|
}
|
|
6699
6700
|
}, n = null, r;
|
|
6700
|
-
return
|
|
6701
|
+
return R(e.z) || (n = A.create(e.z)), R(e.Z) || (n ||= new M(e.Z), r = e.Z), R(e.q) || (e.M = (e.q - 1) * 3 + 1), R(e.h) || (e.h < 12 && e.a === 1 ? e.h += 12 : e.h === 12 && e.a === 0 && (e.h = 0)), e.G === 0 && e.y && (e.y = -e.y), R(e.u) || (e.S = pr(e.u)), [
|
|
6701
6702
|
Object.keys(e).reduce((n, r) => {
|
|
6702
6703
|
let i = t(r);
|
|
6703
6704
|
return i && (n[i] = e[r]), n;
|
|
@@ -6706,33 +6707,33 @@ function xa(e) {
|
|
|
6706
6707
|
r
|
|
6707
6708
|
];
|
|
6708
6709
|
}
|
|
6709
|
-
var
|
|
6710
|
-
function
|
|
6711
|
-
return
|
|
6710
|
+
var wa = null;
|
|
6711
|
+
function Ta() {
|
|
6712
|
+
return wa ||= $.fromMillis(1555555555555), wa;
|
|
6712
6713
|
}
|
|
6713
|
-
function
|
|
6714
|
+
function Ea(e, t) {
|
|
6714
6715
|
if (e.literal) return e;
|
|
6715
|
-
let n =
|
|
6716
|
+
let n = ja(G.macroTokenToFormatOpts(e.val), t);
|
|
6716
6717
|
return n == null || n.includes(void 0) ? e : n;
|
|
6717
6718
|
}
|
|
6718
|
-
function
|
|
6719
|
-
return Array.prototype.concat(...e.map((e) =>
|
|
6719
|
+
function Da(e, t) {
|
|
6720
|
+
return Array.prototype.concat(...e.map((e) => Ea(e, t)));
|
|
6720
6721
|
}
|
|
6721
|
-
var
|
|
6722
|
+
var Oa = class {
|
|
6722
6723
|
constructor(e, t) {
|
|
6723
|
-
if (this.locale = e, this.format = t, this.tokens =
|
|
6724
|
-
let [e, t] =
|
|
6724
|
+
if (this.locale = e, this.format = t, this.tokens = Da(G.parseFormat(t), e), this.units = this.tokens.map((t) => va(t, e)), this.disqualifyingUnit = this.units.find((e) => e.invalidReason), !this.disqualifyingUnit) {
|
|
6725
|
+
let [e, t] = xa(this.units);
|
|
6725
6726
|
this.regex = RegExp(e, "i"), this.handlers = t;
|
|
6726
6727
|
}
|
|
6727
6728
|
}
|
|
6728
6729
|
explainFromTokens(e) {
|
|
6729
6730
|
if (this.isValid) {
|
|
6730
|
-
let [t, n] =
|
|
6731
|
+
let [t, n] = Sa(e, this.regex, this.handlers), [r, i, a] = n ? Ca(n) : [
|
|
6731
6732
|
null,
|
|
6732
6733
|
null,
|
|
6733
6734
|
void 0
|
|
6734
6735
|
];
|
|
6735
|
-
if (
|
|
6736
|
+
if (B(n, "a") && B(n, "H")) throw new w("Can't include meridiem when specifying 24-hour format");
|
|
6736
6737
|
return {
|
|
6737
6738
|
input: e,
|
|
6738
6739
|
tokens: this.tokens,
|
|
@@ -6757,11 +6758,11 @@ var Ea = class {
|
|
|
6757
6758
|
return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
|
|
6758
6759
|
}
|
|
6759
6760
|
};
|
|
6760
|
-
function
|
|
6761
|
-
return new
|
|
6761
|
+
function ka(e, t, n) {
|
|
6762
|
+
return new Oa(e, n).explainFromTokens(t);
|
|
6762
6763
|
}
|
|
6763
|
-
function
|
|
6764
|
-
let { result: r, zone: i, specificOffset: a, invalidReason: o } =
|
|
6764
|
+
function Aa(e, t, n) {
|
|
6765
|
+
let { result: r, zone: i, specificOffset: a, invalidReason: o } = ka(e, t, n);
|
|
6765
6766
|
return [
|
|
6766
6767
|
r,
|
|
6767
6768
|
i,
|
|
@@ -6769,19 +6770,19 @@ function Oa(e, t, n) {
|
|
|
6769
6770
|
o
|
|
6770
6771
|
];
|
|
6771
6772
|
}
|
|
6772
|
-
function
|
|
6773
|
+
function ja(e, t) {
|
|
6773
6774
|
if (!e) return null;
|
|
6774
|
-
let n =
|
|
6775
|
-
return r.map((t) =>
|
|
6775
|
+
let n = G.create(t, e).dtFormatter(Ta()), r = n.formatToParts(), i = n.resolvedOptions();
|
|
6776
|
+
return r.map((t) => ba(t, e, i));
|
|
6776
6777
|
}
|
|
6777
|
-
var
|
|
6778
|
-
function
|
|
6779
|
-
return new
|
|
6778
|
+
var Ma = "Invalid DateTime", Na = 864e13;
|
|
6779
|
+
function Pa(e) {
|
|
6780
|
+
return new I("unsupported zone", `the zone "${e.name}" is not supported`);
|
|
6780
6781
|
}
|
|
6781
|
-
function
|
|
6782
|
+
function Fa(e) {
|
|
6782
6783
|
return e.weekData === null && (e.weekData = Jn(e.c)), e.weekData;
|
|
6783
6784
|
}
|
|
6784
|
-
function
|
|
6785
|
+
function Ia(e) {
|
|
6785
6786
|
return e.localWeekData === null && (e.localWeekData = Jn(e.c, e.loc.getMinDaysInFirstWeek(), e.loc.getStartOfWeek())), e.localWeekData;
|
|
6786
6787
|
}
|
|
6787
6788
|
function Q(e, t) {
|
|
@@ -6799,14 +6800,14 @@ function Q(e, t) {
|
|
|
6799
6800
|
old: n
|
|
6800
6801
|
});
|
|
6801
6802
|
}
|
|
6802
|
-
function
|
|
6803
|
+
function La(e, t, n) {
|
|
6803
6804
|
let r = e - t * 60 * 1e3, i = n.offset(r);
|
|
6804
6805
|
if (t === i) return [r, t];
|
|
6805
6806
|
r -= (i - t) * 60 * 1e3;
|
|
6806
6807
|
let a = n.offset(r);
|
|
6807
6808
|
return i === a ? [r, i] : [e - Math.min(i, a) * 60 * 1e3, Math.max(i, a)];
|
|
6808
6809
|
}
|
|
6809
|
-
function
|
|
6810
|
+
function Ra(e, t) {
|
|
6810
6811
|
e += t * 60 * 1e3;
|
|
6811
6812
|
let n = new Date(e);
|
|
6812
6813
|
return {
|
|
@@ -6819,15 +6820,15 @@ function Ia(e, t) {
|
|
|
6819
6820
|
millisecond: n.getUTCMilliseconds()
|
|
6820
6821
|
};
|
|
6821
6822
|
}
|
|
6822
|
-
function
|
|
6823
|
-
return
|
|
6823
|
+
function za(e, t, n) {
|
|
6824
|
+
return La(vr(e), t, n);
|
|
6824
6825
|
}
|
|
6825
|
-
function
|
|
6826
|
+
function Ba(e, t) {
|
|
6826
6827
|
let n = e.o, r = e.c.year + Math.trunc(t.years), i = e.c.month + Math.trunc(t.months) + Math.trunc(t.quarters) * 3, a = {
|
|
6827
6828
|
...e.c,
|
|
6828
6829
|
year: r,
|
|
6829
6830
|
month: i,
|
|
6830
|
-
day: Math.min(e.c.day,
|
|
6831
|
+
day: Math.min(e.c.day, _r(r, i)) + Math.trunc(t.days) + Math.trunc(t.weeks) * 7
|
|
6831
6832
|
}, o = Y.fromObject({
|
|
6832
6833
|
years: t.years - Math.trunc(t.years),
|
|
6833
6834
|
quarters: t.quarters - Math.trunc(t.quarters),
|
|
@@ -6838,13 +6839,13 @@ function Ra(e, t) {
|
|
|
6838
6839
|
minutes: t.minutes,
|
|
6839
6840
|
seconds: t.seconds,
|
|
6840
6841
|
milliseconds: t.milliseconds
|
|
6841
|
-
}).as("milliseconds"), [s, c] =
|
|
6842
|
+
}).as("milliseconds"), [s, c] = La(vr(a), n, e.zone);
|
|
6842
6843
|
return o !== 0 && (s += o, c = e.zone.offset(s)), {
|
|
6843
6844
|
ts: s,
|
|
6844
6845
|
o: c
|
|
6845
6846
|
};
|
|
6846
6847
|
}
|
|
6847
|
-
function
|
|
6848
|
+
function Va(e, t, n, r, i, a) {
|
|
6848
6849
|
let { setZone: o, zone: s } = n;
|
|
6849
6850
|
if (e && Object.keys(e).length !== 0 || t) {
|
|
6850
6851
|
let r = t || s, i = $.fromObject(e, {
|
|
@@ -6854,64 +6855,64 @@ function za(e, t, n, r, i, a) {
|
|
|
6854
6855
|
});
|
|
6855
6856
|
return o ? i : i.setZone(s);
|
|
6856
6857
|
}
|
|
6857
|
-
return $.invalid(new
|
|
6858
|
+
return $.invalid(new I("unparsable", `the input "${i}" can't be parsed as ${r}`));
|
|
6858
6859
|
}
|
|
6859
|
-
function
|
|
6860
|
-
return e.isValid ?
|
|
6860
|
+
function Ha(e, t, n = !0) {
|
|
6861
|
+
return e.isValid ? G.create(j.create("en-US"), {
|
|
6861
6862
|
allowZ: n,
|
|
6862
6863
|
forceSimple: !0
|
|
6863
6864
|
}).formatDateTimeFromString(e, t) : null;
|
|
6864
6865
|
}
|
|
6865
|
-
function
|
|
6866
|
+
function Ua(e, t, n) {
|
|
6866
6867
|
let r = e.c.year > 9999 || e.c.year < 0, i = "";
|
|
6867
|
-
if (r && e.c.year >= 0 && (i += "+"), i +=
|
|
6868
|
+
if (r && e.c.year >= 0 && (i += "+"), i += H(e.c.year, r ? 6 : 4), n === "year") return i;
|
|
6868
6869
|
if (t) {
|
|
6869
|
-
if (i += "-", i +=
|
|
6870
|
+
if (i += "-", i += H(e.c.month), n === "month") return i;
|
|
6870
6871
|
i += "-";
|
|
6871
|
-
} else if (i +=
|
|
6872
|
-
return i +=
|
|
6872
|
+
} else if (i += H(e.c.month), n === "month") return i;
|
|
6873
|
+
return i += H(e.c.day), i;
|
|
6873
6874
|
}
|
|
6874
|
-
function
|
|
6875
|
+
function Wa(e, t, n, r, i, a, o) {
|
|
6875
6876
|
let s = !n || e.c.millisecond !== 0 || e.c.second !== 0, c = "";
|
|
6876
6877
|
switch (o) {
|
|
6877
6878
|
case "day":
|
|
6878
6879
|
case "month":
|
|
6879
6880
|
case "year": break;
|
|
6880
6881
|
default:
|
|
6881
|
-
if (c +=
|
|
6882
|
+
if (c += H(e.c.hour), o === "hour") break;
|
|
6882
6883
|
if (t) {
|
|
6883
|
-
if (c += ":", c +=
|
|
6884
|
-
s && (c += ":", c +=
|
|
6884
|
+
if (c += ":", c += H(e.c.minute), o === "minute") break;
|
|
6885
|
+
s && (c += ":", c += H(e.c.second));
|
|
6885
6886
|
} else {
|
|
6886
|
-
if (c +=
|
|
6887
|
-
s && (c +=
|
|
6887
|
+
if (c += H(e.c.minute), o === "minute") break;
|
|
6888
|
+
s && (c += H(e.c.second));
|
|
6888
6889
|
}
|
|
6889
6890
|
if (o === "second") break;
|
|
6890
|
-
s && (!r || e.c.millisecond !== 0) && (c += ".", c +=
|
|
6891
|
+
s && (!r || e.c.millisecond !== 0) && (c += ".", c += H(e.c.millisecond, 3));
|
|
6891
6892
|
}
|
|
6892
|
-
return i && (e.isOffsetFixed && e.offset === 0 && !a ? c += "Z" : e.o < 0 ? (c += "-", c +=
|
|
6893
|
+
return i && (e.isOffsetFixed && e.offset === 0 && !a ? c += "Z" : e.o < 0 ? (c += "-", c += H(Math.trunc(-e.o / 60)), c += ":", c += H(Math.trunc(-e.o % 60))) : (c += "+", c += H(Math.trunc(e.o / 60)), c += ":", c += H(Math.trunc(e.o % 60)))), a && (c += "[" + e.zone.ianaName + "]"), c;
|
|
6893
6894
|
}
|
|
6894
|
-
var
|
|
6895
|
+
var Ga = {
|
|
6895
6896
|
month: 1,
|
|
6896
6897
|
day: 1,
|
|
6897
6898
|
hour: 0,
|
|
6898
6899
|
minute: 0,
|
|
6899
6900
|
second: 0,
|
|
6900
6901
|
millisecond: 0
|
|
6901
|
-
},
|
|
6902
|
+
}, Ka = {
|
|
6902
6903
|
weekNumber: 1,
|
|
6903
6904
|
weekday: 1,
|
|
6904
6905
|
hour: 0,
|
|
6905
6906
|
minute: 0,
|
|
6906
6907
|
second: 0,
|
|
6907
6908
|
millisecond: 0
|
|
6908
|
-
},
|
|
6909
|
+
}, qa = {
|
|
6909
6910
|
ordinal: 1,
|
|
6910
6911
|
hour: 0,
|
|
6911
6912
|
minute: 0,
|
|
6912
6913
|
second: 0,
|
|
6913
6914
|
millisecond: 0
|
|
6914
|
-
},
|
|
6915
|
+
}, Ja = [
|
|
6915
6916
|
"year",
|
|
6916
6917
|
"month",
|
|
6917
6918
|
"day",
|
|
@@ -6919,7 +6920,7 @@ var Ua = {
|
|
|
6919
6920
|
"minute",
|
|
6920
6921
|
"second",
|
|
6921
6922
|
"millisecond"
|
|
6922
|
-
],
|
|
6923
|
+
], Ya = [
|
|
6923
6924
|
"weekYear",
|
|
6924
6925
|
"weekNumber",
|
|
6925
6926
|
"weekday",
|
|
@@ -6927,7 +6928,7 @@ var Ua = {
|
|
|
6927
6928
|
"minute",
|
|
6928
6929
|
"second",
|
|
6929
6930
|
"millisecond"
|
|
6930
|
-
],
|
|
6931
|
+
], Xa = [
|
|
6931
6932
|
"year",
|
|
6932
6933
|
"ordinal",
|
|
6933
6934
|
"hour",
|
|
@@ -6935,7 +6936,7 @@ var Ua = {
|
|
|
6935
6936
|
"second",
|
|
6936
6937
|
"millisecond"
|
|
6937
6938
|
];
|
|
6938
|
-
function
|
|
6939
|
+
function Za(e) {
|
|
6939
6940
|
let t = {
|
|
6940
6941
|
year: "year",
|
|
6941
6942
|
years: "year",
|
|
@@ -6965,7 +6966,7 @@ function Ya(e) {
|
|
|
6965
6966
|
if (!t) throw new Ct(e);
|
|
6966
6967
|
return t;
|
|
6967
6968
|
}
|
|
6968
|
-
function
|
|
6969
|
+
function Qa(e) {
|
|
6969
6970
|
switch (e.toLowerCase()) {
|
|
6970
6971
|
case "localweekday":
|
|
6971
6972
|
case "localweekdays": return "localWeekday";
|
|
@@ -6973,25 +6974,25 @@ function Xa(e) {
|
|
|
6973
6974
|
case "localweeknumbers": return "localWeekNumber";
|
|
6974
6975
|
case "localweekyear":
|
|
6975
6976
|
case "localweekyears": return "localWeekYear";
|
|
6976
|
-
default: return
|
|
6977
|
+
default: return Za(e);
|
|
6977
6978
|
}
|
|
6978
6979
|
}
|
|
6979
|
-
function
|
|
6980
|
-
if (
|
|
6981
|
-
let t = e.name, n =
|
|
6982
|
-
return n === void 0 && (n = e.offset(
|
|
6983
|
-
}
|
|
6984
|
-
function
|
|
6985
|
-
let n =
|
|
6986
|
-
if (!n.isValid) return $.invalid(
|
|
6987
|
-
let r =
|
|
6988
|
-
if (
|
|
6980
|
+
function $a(e) {
|
|
6981
|
+
if (ro === void 0 && (ro = F.now()), e.type !== "iana") return e.offset(ro);
|
|
6982
|
+
let t = e.name, n = io.get(t);
|
|
6983
|
+
return n === void 0 && (n = e.offset(ro), io.set(t, n)), n;
|
|
6984
|
+
}
|
|
6985
|
+
function eo(e, t) {
|
|
6986
|
+
let n = N(t.zone, F.defaultZone);
|
|
6987
|
+
if (!n.isValid) return $.invalid(Pa(n));
|
|
6988
|
+
let r = j.fromObject(t), i, a;
|
|
6989
|
+
if (R(e.year)) i = F.now();
|
|
6989
6990
|
else {
|
|
6990
|
-
for (let t of
|
|
6991
|
+
for (let t of Ja) R(e[t]) && (e[t] = Ga[t]);
|
|
6991
6992
|
let t = tr(e) || nr(e);
|
|
6992
6993
|
if (t) return $.invalid(t);
|
|
6993
|
-
let r =
|
|
6994
|
-
[i, a] =
|
|
6994
|
+
let r = $a(n);
|
|
6995
|
+
[i, a] = za(e, r, n);
|
|
6995
6996
|
}
|
|
6996
6997
|
return new $({
|
|
6997
6998
|
ts: i,
|
|
@@ -7000,8 +7001,8 @@ function Qa(e, t) {
|
|
|
7000
7001
|
o: a
|
|
7001
7002
|
});
|
|
7002
7003
|
}
|
|
7003
|
-
function
|
|
7004
|
-
let r =
|
|
7004
|
+
function to(e, t, n) {
|
|
7005
|
+
let r = R(n.round) ? !0 : n.round, i = R(n.rounding) ? "trunc" : n.rounding, a = (e, a) => (e = mr(e, r || n.calendary ? 0 : 2, n.calendary ? "round" : i), t.loc.clone(n).relFormatter(n).format(e, a)), o = (r) => n.calendary ? t.hasSame(e, r) ? 0 : t.startOf(r).diff(e.startOf(r), r).get(r) : t.diff(e, r).get(r);
|
|
7005
7006
|
if (n.unit) return a(o(n.unit), n.unit);
|
|
7006
7007
|
for (let e of n.units) {
|
|
7007
7008
|
let t = o(e);
|
|
@@ -7009,30 +7010,30 @@ function $a(e, t, n) {
|
|
|
7009
7010
|
}
|
|
7010
7011
|
return a(e > t ? -0 : 0, n.units[n.units.length - 1]);
|
|
7011
7012
|
}
|
|
7012
|
-
function
|
|
7013
|
+
function no(e) {
|
|
7013
7014
|
let t = {}, n;
|
|
7014
7015
|
return e.length > 0 && typeof e[e.length - 1] == "object" ? (t = e[e.length - 1], n = Array.from(e).slice(0, e.length - 1)) : n = Array.from(e), [t, n];
|
|
7015
7016
|
}
|
|
7016
|
-
var
|
|
7017
|
+
var ro, io = /* @__PURE__ */ new Map(), $ = class e {
|
|
7017
7018
|
constructor(e) {
|
|
7018
|
-
let t = e.zone ||
|
|
7019
|
-
this.ts =
|
|
7019
|
+
let t = e.zone || F.defaultZone, n = e.invalid || (Number.isNaN(e.ts) ? new I("invalid input") : null) || (t.isValid ? null : Pa(t));
|
|
7020
|
+
this.ts = R(e.ts) ? F.now() : e.ts;
|
|
7020
7021
|
let r = null, i = null;
|
|
7021
7022
|
if (!n) {
|
|
7022
7023
|
if (e.old && e.old.ts === this.ts && e.old.zone.equals(t)) [r, i] = [e.old.c, e.old.o];
|
|
7023
7024
|
else {
|
|
7024
|
-
let a =
|
|
7025
|
-
r =
|
|
7025
|
+
let a = z(e.o) && !e.old ? e.o : t.offset(this.ts);
|
|
7026
|
+
r = Ra(this.ts, a), n = Number.isNaN(r.year) ? new I("invalid input") : null, r = n ? null : r, i = n ? null : a;
|
|
7026
7027
|
}
|
|
7027
7028
|
}
|
|
7028
|
-
this._zone = t, this.loc = e.loc ||
|
|
7029
|
+
this._zone = t, this.loc = e.loc || j.create(), this.invalid = n, this.weekData = null, this.localWeekData = null, this.c = r, this.o = i, this.isLuxonDateTime = !0;
|
|
7029
7030
|
}
|
|
7030
7031
|
static now() {
|
|
7031
7032
|
return new e({});
|
|
7032
7033
|
}
|
|
7033
7034
|
static local() {
|
|
7034
|
-
let [e, t] =
|
|
7035
|
-
return
|
|
7035
|
+
let [e, t] = no(arguments), [n, r, i, a, o, s, c] = t;
|
|
7036
|
+
return eo({
|
|
7036
7037
|
year: n,
|
|
7037
7038
|
month: r,
|
|
7038
7039
|
day: i,
|
|
@@ -7043,8 +7044,8 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7043
7044
|
}, e);
|
|
7044
7045
|
}
|
|
7045
7046
|
static utc() {
|
|
7046
|
-
let [e, t] =
|
|
7047
|
-
return e.zone =
|
|
7047
|
+
let [e, t] = no(arguments), [n, r, i, a, o, s, c] = t;
|
|
7048
|
+
return e.zone = M.utcInstance, eo({
|
|
7048
7049
|
year: n,
|
|
7049
7050
|
month: r,
|
|
7050
7051
|
day: i,
|
|
@@ -7057,99 +7058,99 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7057
7058
|
static fromJSDate(t, n = {}) {
|
|
7058
7059
|
let r = ar(t) ? t.valueOf() : NaN;
|
|
7059
7060
|
if (Number.isNaN(r)) return e.invalid("invalid input");
|
|
7060
|
-
let i =
|
|
7061
|
+
let i = N(n.zone, F.defaultZone);
|
|
7061
7062
|
return i.isValid ? new e({
|
|
7062
7063
|
ts: r,
|
|
7063
7064
|
zone: i,
|
|
7064
|
-
loc:
|
|
7065
|
-
}) : e.invalid(
|
|
7065
|
+
loc: j.fromObject(n)
|
|
7066
|
+
}) : e.invalid(Pa(i));
|
|
7066
7067
|
}
|
|
7067
7068
|
static fromMillis(t, n = {}) {
|
|
7068
|
-
if (!
|
|
7069
|
-
return t < -864e13 || t >
|
|
7069
|
+
if (!z(t)) throw new T(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);
|
|
7070
|
+
return t < -864e13 || t > Na ? e.invalid("Timestamp out of range") : new e({
|
|
7070
7071
|
ts: t,
|
|
7071
|
-
zone:
|
|
7072
|
-
loc:
|
|
7072
|
+
zone: N(n.zone, F.defaultZone),
|
|
7073
|
+
loc: j.fromObject(n)
|
|
7073
7074
|
});
|
|
7074
7075
|
}
|
|
7075
7076
|
static fromSeconds(t, n = {}) {
|
|
7076
|
-
if (
|
|
7077
|
+
if (z(t)) return new e({
|
|
7077
7078
|
ts: t * 1e3,
|
|
7078
|
-
zone:
|
|
7079
|
-
loc:
|
|
7079
|
+
zone: N(n.zone, F.defaultZone),
|
|
7080
|
+
loc: j.fromObject(n)
|
|
7080
7081
|
});
|
|
7081
|
-
throw new
|
|
7082
|
+
throw new T("fromSeconds requires a numerical input");
|
|
7082
7083
|
}
|
|
7083
7084
|
static fromObject(t, n = {}) {
|
|
7084
7085
|
t ||= {};
|
|
7085
|
-
let r =
|
|
7086
|
-
if (!r.isValid) return e.invalid(
|
|
7087
|
-
let i =
|
|
7088
|
-
if ((p || u) && m) throw new
|
|
7089
|
-
if (f && u) throw new
|
|
7090
|
-
let ee = m || a.weekday && !p,
|
|
7091
|
-
ee ? (
|
|
7092
|
-
let
|
|
7093
|
-
for (let e of
|
|
7086
|
+
let r = N(n.zone, F.defaultZone);
|
|
7087
|
+
if (!r.isValid) return e.invalid(Pa(r));
|
|
7088
|
+
let i = j.fromObject(n), a = Tr(t, Qa), { minDaysInFirstWeek: o, startOfWeek: s } = Qn(a, i), c = F.now(), l = R(n.specificOffset) ? r.offset(c) : n.specificOffset, u = !R(a.ordinal), d = !R(a.year), f = !R(a.month) || !R(a.day), p = d || f, m = a.weekYear || a.weekNumber;
|
|
7089
|
+
if ((p || u) && m) throw new w("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
|
|
7090
|
+
if (f && u) throw new w("Can't mix ordinal dates with month/day");
|
|
7091
|
+
let ee = m || a.weekday && !p, h, g, _ = Ra(c, l);
|
|
7092
|
+
ee ? (h = Ya, g = Ka, _ = Jn(_, o, s)) : u ? (h = Xa, g = qa, _ = Xn(_)) : (h = Ja, g = Ga);
|
|
7093
|
+
let te = !1;
|
|
7094
|
+
for (let e of h) {
|
|
7094
7095
|
let t = a[e];
|
|
7095
|
-
|
|
7096
|
+
R(t) ? a[e] = te ? g[e] : _[e] : te = !0;
|
|
7096
7097
|
}
|
|
7097
|
-
let
|
|
7098
|
-
if (
|
|
7099
|
-
let [
|
|
7100
|
-
ts:
|
|
7098
|
+
let ne = (ee ? $n(a, o, s) : u ? er(a) : tr(a)) || nr(a);
|
|
7099
|
+
if (ne) return e.invalid(ne);
|
|
7100
|
+
let [re, ie] = za(ee ? Yn(a, o, s) : u ? Zn(a) : a, l, r), v = new e({
|
|
7101
|
+
ts: re,
|
|
7101
7102
|
zone: r,
|
|
7102
|
-
o:
|
|
7103
|
+
o: ie,
|
|
7103
7104
|
loc: i
|
|
7104
7105
|
});
|
|
7105
|
-
return a.weekday && p && t.weekday !==
|
|
7106
|
+
return a.weekday && p && t.weekday !== v.weekday ? e.invalid("mismatched weekday", `you can't specify both a weekday of ${a.weekday} and a date of ${v.toISO()}`) : v.isValid ? v : e.invalid(v.invalid);
|
|
7106
7107
|
}
|
|
7107
7108
|
static fromISO(e, t = {}) {
|
|
7108
|
-
let [n, r] =
|
|
7109
|
-
return
|
|
7109
|
+
let [n, r] = Ri(e);
|
|
7110
|
+
return Va(n, r, t, "ISO 8601", e);
|
|
7110
7111
|
}
|
|
7111
7112
|
static fromRFC2822(e, t = {}) {
|
|
7112
|
-
let [n, r] =
|
|
7113
|
-
return
|
|
7113
|
+
let [n, r] = zi(e);
|
|
7114
|
+
return Va(n, r, t, "RFC 2822", e);
|
|
7114
7115
|
}
|
|
7115
7116
|
static fromHTTP(e, t = {}) {
|
|
7116
|
-
let [n, r] =
|
|
7117
|
-
return
|
|
7117
|
+
let [n, r] = Bi(e);
|
|
7118
|
+
return Va(n, r, t, "HTTP", t);
|
|
7118
7119
|
}
|
|
7119
7120
|
static fromFormat(t, n, r = {}) {
|
|
7120
|
-
if (
|
|
7121
|
-
let { locale: i = null, numberingSystem: a = null } = r, [o, s, c, l] =
|
|
7121
|
+
if (R(t) || R(n)) throw new T("fromFormat requires an input string and a format");
|
|
7122
|
+
let { locale: i = null, numberingSystem: a = null } = r, [o, s, c, l] = Aa(j.fromOpts({
|
|
7122
7123
|
locale: i,
|
|
7123
7124
|
numberingSystem: a,
|
|
7124
7125
|
defaultToEN: !0
|
|
7125
7126
|
}), t, n);
|
|
7126
|
-
return l ? e.invalid(l) :
|
|
7127
|
+
return l ? e.invalid(l) : Va(o, s, r, `format ${n}`, t, c);
|
|
7127
7128
|
}
|
|
7128
7129
|
static fromString(t, n, r = {}) {
|
|
7129
7130
|
return e.fromFormat(t, n, r);
|
|
7130
7131
|
}
|
|
7131
7132
|
static fromSQL(e, t = {}) {
|
|
7132
|
-
let [n, r] =
|
|
7133
|
-
return
|
|
7133
|
+
let [n, r] = qi(e);
|
|
7134
|
+
return Va(n, r, t, "SQL", e);
|
|
7134
7135
|
}
|
|
7135
7136
|
static invalid(t, n = null) {
|
|
7136
|
-
if (!t) throw new
|
|
7137
|
-
let r = t instanceof
|
|
7138
|
-
if (
|
|
7137
|
+
if (!t) throw new T("need to specify a reason the DateTime is invalid");
|
|
7138
|
+
let r = t instanceof I ? t : new I(t, n);
|
|
7139
|
+
if (F.throwOnInvalid) throw new bt(r);
|
|
7139
7140
|
return new e({ invalid: r });
|
|
7140
7141
|
}
|
|
7141
7142
|
static isDateTime(e) {
|
|
7142
7143
|
return e && e.isLuxonDateTime || !1;
|
|
7143
7144
|
}
|
|
7144
7145
|
static parseFormatForOpts(e, t = {}) {
|
|
7145
|
-
let n =
|
|
7146
|
+
let n = ja(e, j.fromObject(t));
|
|
7146
7147
|
return n ? n.map((e) => e ? e.val : null).join("") : null;
|
|
7147
7148
|
}
|
|
7148
7149
|
static expandFormat(e, t = {}) {
|
|
7149
|
-
return
|
|
7150
|
+
return Da(G.parseFormat(e), j.fromObject(t)).map((e) => e.val).join("");
|
|
7150
7151
|
}
|
|
7151
7152
|
static resetCache() {
|
|
7152
|
-
|
|
7153
|
+
ro = void 0, io.clear();
|
|
7153
7154
|
}
|
|
7154
7155
|
get(e) {
|
|
7155
7156
|
return this[e];
|
|
@@ -7203,40 +7204,40 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7203
7204
|
return this.isValid ? this.c.millisecond : NaN;
|
|
7204
7205
|
}
|
|
7205
7206
|
get weekYear() {
|
|
7206
|
-
return this.isValid ?
|
|
7207
|
+
return this.isValid ? Fa(this).weekYear : NaN;
|
|
7207
7208
|
}
|
|
7208
7209
|
get weekNumber() {
|
|
7209
|
-
return this.isValid ?
|
|
7210
|
+
return this.isValid ? Fa(this).weekNumber : NaN;
|
|
7210
7211
|
}
|
|
7211
7212
|
get weekday() {
|
|
7212
|
-
return this.isValid ?
|
|
7213
|
+
return this.isValid ? Fa(this).weekday : NaN;
|
|
7213
7214
|
}
|
|
7214
7215
|
get isWeekend() {
|
|
7215
7216
|
return this.isValid && this.loc.getWeekendDays().includes(this.weekday);
|
|
7216
7217
|
}
|
|
7217
7218
|
get localWeekday() {
|
|
7218
|
-
return this.isValid ?
|
|
7219
|
+
return this.isValid ? Ia(this).weekday : NaN;
|
|
7219
7220
|
}
|
|
7220
7221
|
get localWeekNumber() {
|
|
7221
|
-
return this.isValid ?
|
|
7222
|
+
return this.isValid ? Ia(this).weekNumber : NaN;
|
|
7222
7223
|
}
|
|
7223
7224
|
get localWeekYear() {
|
|
7224
|
-
return this.isValid ?
|
|
7225
|
+
return this.isValid ? Ia(this).weekYear : NaN;
|
|
7225
7226
|
}
|
|
7226
7227
|
get ordinal() {
|
|
7227
7228
|
return this.isValid ? Xn(this.c).ordinal : NaN;
|
|
7228
7229
|
}
|
|
7229
7230
|
get monthShort() {
|
|
7230
|
-
return this.isValid ?
|
|
7231
|
+
return this.isValid ? oa.months("short", { locObj: this.loc })[this.month - 1] : null;
|
|
7231
7232
|
}
|
|
7232
7233
|
get monthLong() {
|
|
7233
|
-
return this.isValid ?
|
|
7234
|
+
return this.isValid ? oa.months("long", { locObj: this.loc })[this.month - 1] : null;
|
|
7234
7235
|
}
|
|
7235
7236
|
get weekdayShort() {
|
|
7236
|
-
return this.isValid ?
|
|
7237
|
+
return this.isValid ? oa.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
|
|
7237
7238
|
}
|
|
7238
7239
|
get weekdayLong() {
|
|
7239
|
-
return this.isValid ?
|
|
7240
|
+
return this.isValid ? oa.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
|
|
7240
7241
|
}
|
|
7241
7242
|
get offset() {
|
|
7242
7243
|
return this.isValid ? +this.o : NaN;
|
|
@@ -7264,28 +7265,28 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7264
7265
|
}
|
|
7265
7266
|
getPossibleOffsets() {
|
|
7266
7267
|
if (!this.isValid || this.isOffsetFixed) return [this];
|
|
7267
|
-
let e = 864e5, t = 6e4, n =
|
|
7268
|
+
let e = 864e5, t = 6e4, n = vr(this.c), r = this.zone.offset(n - e), i = this.zone.offset(n + e), a = this.zone.offset(n - r * t), o = this.zone.offset(n - i * t);
|
|
7268
7269
|
if (a === o) return [this];
|
|
7269
|
-
let s = n - a * t, c = n - o * t, l =
|
|
7270
|
+
let s = n - a * t, c = n - o * t, l = Ra(s, a), u = Ra(c, o);
|
|
7270
7271
|
return l.hour === u.hour && l.minute === u.minute && l.second === u.second && l.millisecond === u.millisecond ? [Q(this, { ts: s }), Q(this, { ts: c })] : [this];
|
|
7271
7272
|
}
|
|
7272
7273
|
get isInLeapYear() {
|
|
7273
|
-
return
|
|
7274
|
+
return hr(this.year);
|
|
7274
7275
|
}
|
|
7275
7276
|
get daysInMonth() {
|
|
7276
|
-
return
|
|
7277
|
+
return _r(this.year, this.month);
|
|
7277
7278
|
}
|
|
7278
7279
|
get daysInYear() {
|
|
7279
|
-
return this.isValid ?
|
|
7280
|
+
return this.isValid ? gr(this.year) : NaN;
|
|
7280
7281
|
}
|
|
7281
7282
|
get weeksInWeekYear() {
|
|
7282
|
-
return this.isValid ?
|
|
7283
|
+
return this.isValid ? br(this.weekYear) : NaN;
|
|
7283
7284
|
}
|
|
7284
7285
|
get weeksInLocalWeekYear() {
|
|
7285
|
-
return this.isValid ?
|
|
7286
|
+
return this.isValid ? br(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN;
|
|
7286
7287
|
}
|
|
7287
7288
|
resolvedLocaleOptions(e = {}) {
|
|
7288
|
-
let { locale: t, numberingSystem: n, calendar: r } =
|
|
7289
|
+
let { locale: t, numberingSystem: n, calendar: r } = G.create(this.loc.clone(e), e).resolvedOptions(this);
|
|
7289
7290
|
return {
|
|
7290
7291
|
locale: t,
|
|
7291
7292
|
numberingSystem: n,
|
|
@@ -7293,25 +7294,25 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7293
7294
|
};
|
|
7294
7295
|
}
|
|
7295
7296
|
toUTC(e = 0, t = {}) {
|
|
7296
|
-
return this.setZone(
|
|
7297
|
+
return this.setZone(M.instance(e), t);
|
|
7297
7298
|
}
|
|
7298
7299
|
toLocal() {
|
|
7299
|
-
return this.setZone(
|
|
7300
|
+
return this.setZone(F.defaultZone);
|
|
7300
7301
|
}
|
|
7301
7302
|
setZone(t, { keepLocalTime: n = !1, keepCalendarTime: r = !1 } = {}) {
|
|
7302
|
-
if (t =
|
|
7303
|
+
if (t = N(t, F.defaultZone), t.equals(this.zone)) return this;
|
|
7303
7304
|
if (t.isValid) {
|
|
7304
7305
|
let e = this.ts;
|
|
7305
7306
|
if (n || r) {
|
|
7306
7307
|
let n = t.offset(this.ts), r = this.toObject();
|
|
7307
|
-
[e] =
|
|
7308
|
+
[e] = za(r, n, t);
|
|
7308
7309
|
}
|
|
7309
7310
|
return Q(this, {
|
|
7310
7311
|
ts: e,
|
|
7311
7312
|
zone: t
|
|
7312
7313
|
});
|
|
7313
7314
|
}
|
|
7314
|
-
return e.invalid(
|
|
7315
|
+
return e.invalid(Pa(t));
|
|
7315
7316
|
}
|
|
7316
7317
|
reconfigure({ locale: e, numberingSystem: t, outputCalendar: n } = {}) {
|
|
7317
7318
|
let r = this.loc.clone({
|
|
@@ -7326,21 +7327,21 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7326
7327
|
}
|
|
7327
7328
|
set(e) {
|
|
7328
7329
|
if (!this.isValid) return this;
|
|
7329
|
-
let t =
|
|
7330
|
-
if ((c || a) && l) throw new
|
|
7331
|
-
if (s && a) throw new
|
|
7330
|
+
let t = Tr(e, Qa), { minDaysInFirstWeek: n, startOfWeek: r } = Qn(t, this.loc), i = !R(t.weekYear) || !R(t.weekNumber) || !R(t.weekday), a = !R(t.ordinal), o = !R(t.year), s = !R(t.month) || !R(t.day), c = o || s, l = t.weekYear || t.weekNumber;
|
|
7331
|
+
if ((c || a) && l) throw new w("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
|
|
7332
|
+
if (s && a) throw new w("Can't mix ordinal dates with month/day");
|
|
7332
7333
|
let u;
|
|
7333
7334
|
i ? u = Yn({
|
|
7334
7335
|
...Jn(this.c, n, r),
|
|
7335
7336
|
...t
|
|
7336
|
-
}, n, r) :
|
|
7337
|
+
}, n, r) : R(t.ordinal) ? (u = {
|
|
7337
7338
|
...this.toObject(),
|
|
7338
7339
|
...t
|
|
7339
|
-
},
|
|
7340
|
+
}, R(t.day) && (u.day = Math.min(_r(u.year, u.month), u.day))) : u = Zn({
|
|
7340
7341
|
...Xn(this.c),
|
|
7341
7342
|
...t
|
|
7342
7343
|
});
|
|
7343
|
-
let [d, f] =
|
|
7344
|
+
let [d, f] = za(u, this.o, this.zone);
|
|
7344
7345
|
return Q(this, {
|
|
7345
7346
|
ts: d,
|
|
7346
7347
|
o: f
|
|
@@ -7349,12 +7350,12 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7349
7350
|
plus(e) {
|
|
7350
7351
|
if (!this.isValid) return this;
|
|
7351
7352
|
let t = Y.fromDurationLike(e);
|
|
7352
|
-
return Q(this,
|
|
7353
|
+
return Q(this, Ba(this, t));
|
|
7353
7354
|
}
|
|
7354
7355
|
minus(e) {
|
|
7355
7356
|
if (!this.isValid) return this;
|
|
7356
7357
|
let t = Y.fromDurationLike(e).negate();
|
|
7357
|
-
return Q(this,
|
|
7358
|
+
return Q(this, Ba(this, t));
|
|
7358
7359
|
}
|
|
7359
7360
|
startOf(e, { useLocaleWeeks: t = !1 } = {}) {
|
|
7360
7361
|
if (!this.isValid) return this;
|
|
@@ -7381,47 +7382,47 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7381
7382
|
return this.isValid ? this.plus({ [e]: 1 }).startOf(e, t).minus(1) : this;
|
|
7382
7383
|
}
|
|
7383
7384
|
toFormat(e, t = {}) {
|
|
7384
|
-
return this.isValid ?
|
|
7385
|
+
return this.isValid ? G.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this, e) : Ma;
|
|
7385
7386
|
}
|
|
7386
7387
|
toLocaleString(e = wt, t = {}) {
|
|
7387
|
-
return this.isValid ?
|
|
7388
|
+
return this.isValid ? G.create(this.loc.clone(t), e).formatDateTime(this) : Ma;
|
|
7388
7389
|
}
|
|
7389
7390
|
toLocaleParts(e = {}) {
|
|
7390
|
-
return this.isValid ?
|
|
7391
|
+
return this.isValid ? G.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
|
|
7391
7392
|
}
|
|
7392
7393
|
toISO({ format: e = "extended", suppressSeconds: t = !1, suppressMilliseconds: n = !1, includeOffset: r = !0, extendedZone: i = !1, precision: a = "milliseconds" } = {}) {
|
|
7393
7394
|
if (!this.isValid) return null;
|
|
7394
|
-
a =
|
|
7395
|
-
let o = e === "extended", s =
|
|
7396
|
-
return
|
|
7395
|
+
a = Za(a);
|
|
7396
|
+
let o = e === "extended", s = Ua(this, o, a);
|
|
7397
|
+
return Ja.indexOf(a) >= 3 && (s += "T"), s += Wa(this, o, t, n, r, i, a), s;
|
|
7397
7398
|
}
|
|
7398
7399
|
toISODate({ format: e = "extended", precision: t = "day" } = {}) {
|
|
7399
|
-
return this.isValid ?
|
|
7400
|
+
return this.isValid ? Ua(this, e === "extended", Za(t)) : null;
|
|
7400
7401
|
}
|
|
7401
7402
|
toISOWeekDate() {
|
|
7402
|
-
return
|
|
7403
|
+
return Ha(this, "kkkk-'W'WW-c");
|
|
7403
7404
|
}
|
|
7404
7405
|
toISOTime({ suppressMilliseconds: e = !1, suppressSeconds: t = !1, includeOffset: n = !0, includePrefix: r = !1, extendedZone: i = !1, format: a = "extended", precision: o = "milliseconds" } = {}) {
|
|
7405
|
-
return this.isValid ? (o =
|
|
7406
|
+
return this.isValid ? (o = Za(o), (r && Ja.indexOf(o) >= 3 ? "T" : "") + Wa(this, a === "extended", t, e, n, i, o)) : null;
|
|
7406
7407
|
}
|
|
7407
7408
|
toRFC2822() {
|
|
7408
|
-
return
|
|
7409
|
+
return Ha(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
|
|
7409
7410
|
}
|
|
7410
7411
|
toHTTP() {
|
|
7411
|
-
return
|
|
7412
|
+
return Ha(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
|
|
7412
7413
|
}
|
|
7413
7414
|
toSQLDate() {
|
|
7414
|
-
return this.isValid ?
|
|
7415
|
+
return this.isValid ? Ua(this, !0) : null;
|
|
7415
7416
|
}
|
|
7416
7417
|
toSQLTime({ includeOffset: e = !0, includeZone: t = !1, includeOffsetSpace: n = !0 } = {}) {
|
|
7417
7418
|
let r = "HH:mm:ss.SSS";
|
|
7418
|
-
return (t || e) && (n && (r += " "), t ? r += "z" : e && (r += "ZZ")),
|
|
7419
|
+
return (t || e) && (n && (r += " "), t ? r += "z" : e && (r += "ZZ")), Ha(this, r, !0);
|
|
7419
7420
|
}
|
|
7420
7421
|
toSQL(e = {}) {
|
|
7421
7422
|
return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null;
|
|
7422
7423
|
}
|
|
7423
7424
|
toString() {
|
|
7424
|
-
return this.isValid ? this.toISO() :
|
|
7425
|
+
return this.isValid ? this.toISO() : Ma;
|
|
7425
7426
|
}
|
|
7426
7427
|
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
7427
7428
|
return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`;
|
|
@@ -7458,14 +7459,14 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7458
7459
|
locale: this.locale,
|
|
7459
7460
|
numberingSystem: this.numberingSystem,
|
|
7460
7461
|
...n
|
|
7461
|
-
}, i = cr(t).map(Y.normalizeUnit), a = e.valueOf() > this.valueOf(), o =
|
|
7462
|
+
}, i = cr(t).map(Y.normalizeUnit), a = e.valueOf() > this.valueOf(), o = la(a ? this : e, a ? e : this, i, r);
|
|
7462
7463
|
return a ? o.negate() : o;
|
|
7463
7464
|
}
|
|
7464
7465
|
diffNow(t = "milliseconds", n = {}) {
|
|
7465
7466
|
return this.diff(e.now(), t, n);
|
|
7466
7467
|
}
|
|
7467
7468
|
until(e) {
|
|
7468
|
-
return this.isValid ?
|
|
7469
|
+
return this.isValid ? aa.fromDateTimes(this, e) : this;
|
|
7469
7470
|
}
|
|
7470
7471
|
hasSame(e, t, n) {
|
|
7471
7472
|
if (!this.isValid) return !1;
|
|
@@ -7485,7 +7486,7 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7485
7486
|
"minutes",
|
|
7486
7487
|
"seconds"
|
|
7487
7488
|
], a = t.unit;
|
|
7488
|
-
return Array.isArray(t.unit) && (i = t.unit, a = void 0),
|
|
7489
|
+
return Array.isArray(t.unit) && (i = t.unit, a = void 0), to(n, this.plus(r), {
|
|
7489
7490
|
...t,
|
|
7490
7491
|
numeric: "always",
|
|
7491
7492
|
units: i,
|
|
@@ -7493,7 +7494,7 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7493
7494
|
});
|
|
7494
7495
|
}
|
|
7495
7496
|
toRelativeCalendar(t = {}) {
|
|
7496
|
-
return this.isValid ?
|
|
7497
|
+
return this.isValid ? to(t.base || e.fromObject({}, { zone: this.zone }), this, {
|
|
7497
7498
|
...t,
|
|
7498
7499
|
numeric: "auto",
|
|
7499
7500
|
units: [
|
|
@@ -7505,16 +7506,16 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7505
7506
|
}) : null;
|
|
7506
7507
|
}
|
|
7507
7508
|
static min(...t) {
|
|
7508
|
-
if (!t.every(e.isDateTime)) throw new
|
|
7509
|
+
if (!t.every(e.isDateTime)) throw new T("min requires all arguments be DateTimes");
|
|
7509
7510
|
return lr(t, (e) => e.valueOf(), Math.min);
|
|
7510
7511
|
}
|
|
7511
7512
|
static max(...t) {
|
|
7512
|
-
if (!t.every(e.isDateTime)) throw new
|
|
7513
|
+
if (!t.every(e.isDateTime)) throw new T("max requires all arguments be DateTimes");
|
|
7513
7514
|
return lr(t, (e) => e.valueOf(), Math.max);
|
|
7514
7515
|
}
|
|
7515
7516
|
static fromFormatExplain(e, t, n = {}) {
|
|
7516
7517
|
let { locale: r = null, numberingSystem: i = null } = n;
|
|
7517
|
-
return
|
|
7518
|
+
return ka(j.fromOpts({
|
|
7518
7519
|
locale: r,
|
|
7519
7520
|
numberingSystem: i,
|
|
7520
7521
|
defaultToEN: !0
|
|
@@ -7525,22 +7526,22 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7525
7526
|
}
|
|
7526
7527
|
static buildFormatParser(e, t = {}) {
|
|
7527
7528
|
let { locale: n = null, numberingSystem: r = null } = t;
|
|
7528
|
-
return new
|
|
7529
|
+
return new Oa(j.fromOpts({
|
|
7529
7530
|
locale: n,
|
|
7530
7531
|
numberingSystem: r,
|
|
7531
7532
|
defaultToEN: !0
|
|
7532
7533
|
}), e);
|
|
7533
7534
|
}
|
|
7534
7535
|
static fromFormatParser(t, n, r = {}) {
|
|
7535
|
-
if (
|
|
7536
|
-
let { locale: i = null, numberingSystem: a = null } = r, o =
|
|
7536
|
+
if (R(t) || R(n)) throw new T("fromFormatParser requires an input string and a format parser");
|
|
7537
|
+
let { locale: i = null, numberingSystem: a = null } = r, o = j.fromOpts({
|
|
7537
7538
|
locale: i,
|
|
7538
7539
|
numberingSystem: a,
|
|
7539
7540
|
defaultToEN: !0
|
|
7540
7541
|
});
|
|
7541
|
-
if (!o.equals(n.locale)) throw new
|
|
7542
|
+
if (!o.equals(n.locale)) throw new T(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);
|
|
7542
7543
|
let { result: s, zone: c, specificOffset: l, invalidReason: u } = n.explainFromTokens(t);
|
|
7543
|
-
return u ? e.invalid(u) :
|
|
7544
|
+
return u ? e.invalid(u) : Va(s, c, r, `format ${n.format}`, t, l);
|
|
7544
7545
|
}
|
|
7545
7546
|
static get DATE_SHORT() {
|
|
7546
7547
|
return wt;
|
|
@@ -7609,15 +7610,15 @@ var to, no = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7609
7610
|
return Gt;
|
|
7610
7611
|
}
|
|
7611
7612
|
};
|
|
7612
|
-
function
|
|
7613
|
+
function ao(e) {
|
|
7613
7614
|
if ($.isDateTime(e)) return e;
|
|
7614
|
-
if (e && e.valueOf &&
|
|
7615
|
+
if (e && e.valueOf && z(e.valueOf())) return $.fromJSDate(e);
|
|
7615
7616
|
if (e && typeof e == "object") return $.fromObject(e);
|
|
7616
|
-
throw new
|
|
7617
|
+
throw new T(`Unknown datetime argument: ${e}, of type ${typeof e}`);
|
|
7617
7618
|
}
|
|
7618
7619
|
//#endregion
|
|
7619
7620
|
//#region generated/regionTowns.ts
|
|
7620
|
-
var
|
|
7621
|
+
var oo = {
|
|
7621
7622
|
DE: "bear|bellefonte|bethanybeach|blades|bridgeville|brookside|camden|cheswold|claymont|clayton|delawarecity|delmar|dover|doverbasehousing|edgemoor|elsmere|felton|georgetown|glasgow|greenville|greenwood|harrington|highlandacres|hockessin|kentacres|laurel|lewes|longneck|middletown|milford|millsboro|milton|newark|newcastle|newport|northstar|oceanview|pikecreek|pikecreekvalley|rehobothbeach|risingsunlebanon|riverview|rodneyvillage|seaford|selbyville|smyrna|townsend|wilmington|wilmingtonmanor|woodsideeast|wyoming",
|
|
7622
7623
|
IL: "abingdon|addison|albanypark|albers|albion|aledo|algonquin|alorton|alsip|altamont|alton|amboy|andalusia|anna|antioch|arcola|arlingtonheights|arthur|ashburn|ashland|assumption|astoria|athens|atlanta|atwood|auburn|auburngresham|aurora|aviston|avondale|bannockburn|barrington|barringtonhills|barry|bartlett|bartonville|batavia|beachpark|beardstown|beckemeyer|beecher|belleville|bellevue|bellwood|belmontcragin|belvidere|bement|benld|bensenville|benton|berkeley|berwyn|bethalto|bethany|bigrock|bloomingdale|bloomington|blueisland|bluemound|bolingbrook|boulderhill|bourbonnais|bradley|braidwood|breese|bridgeport|bridgeview|brighton|brightonpark|broadview|brookfield|buffalogrove|bullvalley|bunkerhill|burbank|burnham|burrridge|bushnell|byron|cahokia|cairo|calumetcity|calumetpark|cambria|cambridge|camppoint|canton|capron|carboncliff|carbondale|carlinville|carlyle|carmi|carolstream|carpentersville|carriermills|carrollton|carterville|carthage|cary|casey|caseyville|catlin|centralcity|centralia|centreville|cerrogordo|champaign|channahon|channellake|charleston|chatham|chatsworth|chebanse|chenoa|cherryvalley|chester|chicago|chicagoheights|chicagolawn|chicagoloop|chicagoridge|chillicothe|chrisman|christopher|cicero|clarendonhills|clifton|clinton|coalcity|coalvalley|cobden|colchester|colfax|collinsville|colona|columbia|cortland|countryclubhills|countryside|crainville|cresthill|crestwood|crete|crevecoeur|crystallake|crystallawns|cuba|danvers|danville|darien|davisjunction|decatur|deerfield|deerpark|dekalb|delavan|depue|desoto|desplaines|diamond|divernon|dixmoor|dixon|dolton|douglas|downersgrove|dunlap|dupo|duquoin|durand|dwight|earlville|eastalton|eastdubuque|eastdundee|eastgarfieldpark|easthazelcrest|eastmoline|eastpeoria|eaststlouis|edgewater|edinburg|edwardsville|effingham|elburn|eldorado|elgin|elizabethtown|elkgrovevillage|elmhurst|elmwood|elmwoodpark|elpaso|elwood|energy|englewood|erie|eureka|evanston|evergreenpark|fairbury|fairfield|fairmont|fairmontcity|fairviewheights|farmercity|farmington|fisher|flanagan|flora|flossmoor|fordheights|forestlake|forestpark|forrest|forreston|forsyth|foxlake|foxlakehills|foxrivergrove|frankfort|frankfortsquare|franklinpark|freeburg|freeport|fulton|gagepark|gageslake|galena|galesburg|galva|gardner|geneseo|geneva|genoa|georgetown|germantown|germantownhills|gibsoncity|gifford|gilberts|gillespie|gilman|girard|glasford|glencarbon|glencoe|glendaleheights|glenellyn|glenview|glenwood|godfrey|golconda|goodingsgrove|goreville|grandboulevard|grandview|grandwoodpark|granitecity|grantpark|granville|grayslake|grayville|greatergrandcrossing|greenfield|greenoaks|greenrock|greenup|greenville|gridley|griggsville|gurnee|hainesville|hamilton|hampshire|hampton|hannacity|hanoverpark|hardin|harrisburg|harristown|hartford|harvard|harvey|harwoodheights|havana|hawthornwoods|hazelcrest|hebron|hennepin|henry|heritagelake|herrin|herscher|heyworth|hickoryhills|highland|highlandpark|highwood|hillcrest|hillsboro|hillside|hinckley|hinsdale|hodgkins|hoffmanestates|holidayshores|homer|homerglen|hometown|homewood|hoopeston|hudson|huntley|hydepark|ina|indianheadpark|ingallspark|inverness|irvingpark|islandlake|itasca|jacksonville|jerome|jerseyville|johnsburg|johnstoncity|joliet|jonesboro|justice|kankakee|kenilworth|kenwood|kewanee|kildeer|kincaid|kingston|kirkland|knollwood|knoxville|lacon|ladd|lagrange|lagrangepark|laharpe|lakebarrington|lakebluff|lakecamelot|lakecatherine|lakeforest|lakeholiday|lakeinthehills|lakemoor|lakeofthewoods|lakesummerset|lakevilla|lakewood|lakewoodshores|lakezurich|lanark|lansing|lasalle|lawrenceville|lebanon|lelandgrove|lemont|lena|leroy|lewistown|lexington|libertyville|lilylake|limestone|lincoln|lincolnpark|lincolnshire|lincolnsquare|lincolnwood|lindenhurst|lisle|litchfield|lockport|logansquare|lombard|longcreek|longgrove|longlake|louisville|lovespark|lovington|lowerwestside|lynwood|lyons|machesneypark|mackinaw|macomb|macon|madison|mahomet|malta|manhattan|manito|manteno|maplepark|marengo|marion|marissa|markham|maroa|marquetteheights|marseilles|marshall|martinsville|maryville|mascoutah|masoncity|matteson|mattoon|maywood|mccullomlake|mchenry|mckinleypark|mcleansboro|medinah|melrosepark|mendota|meredosia|merrionettepark|metamora|metropolis|midlothian|milan|milford|millstadt|minier|minonk|minooka|mitchell|mokena|moline|momence|monee|monmouth|montgomery|monticello|morganpark|morris|morrison|morrisonville|morton|mortongrove|moundcity|moweaqua|mtcarmel|mtcarroll|mtgreenwood|mtmorris|mtolive|mtprospect|mtpulaski|mtsterling|mtvernon|mtzion|mundelein|murphysboro|naperville|nashville|nauvoo|nearnorthside|nearsouthside|neoga|newark|newathens|newbaden|newberlin|newcity|newlenox|newton|niles|nokomis|normal|norridge|norriscity|northaurora|northbarrington|northbrook|northcenter|northchicago|northfield|northlake|northlawndale|northpekin|northpeoria|northriverside|oakbrook|oakbrookterrace|oakforest|oaklawn|oakpark|oakwood|oakwoodhills|oblong|odin|ofallon|oglesby|okawville|olney|olympiafields|onarga|oquawka|oregon|orion|orlandhills|orlandpark|oswego|ottawa|palatine|palestine|palosheights|paloshills|palospark|pana|paris|parkcity|parkforest|parkridge|parkwaygardenhomes|pawnee|paxton|payson|pecatonica|pekin|peoria|peoriaheights|peotone|peru|petersburg|philo|phoenix|pinckneyville|pingreegrove|pistakeehighlands|pittsfield|plainfield|plano|polo|pontiac|pontoonbeach|poplargrove|portagepark|portbarrington|portbyron|posen|prairiegrove|prestbury|prestonheights|princeton|princeville|prophetstown|prospectheights|quincy|ramsey|rantoul|redbud|richmond|richtonpark|riverdale|riverforest|rivergrove|riverside|riverton|riverwoods|roanoke|robbins|robinson|rochelle|rochester|rockdale|rockfalls|rockford|rockisland|rockton|rogerspark|rollingmeadows|rome|romeoville|roodhouse|roscoe|roselle|rosemont|rosewoodheights|rosiclare|rossville|roundlake|roundlakebeach|roundlakeheights|roundlakepark|roxana|royalton|rushville|salem|sandoval|sandwich|saukvillage|savanna|savoy|schaumburg|schillerpark|scottairforcebase|seneca|sesser|shawneetown|shelbyville|sheldon|sheridan|sherman|shiloh|shorewood|sidney|silvis|skokie|sleepyhollow|smithton|somonauk|southbarrington|southbeloit|southchicago|southchicagoheights|southelgin|southernview|southholland|southjacksonville|southlawndale|southpekin|southroxana|southshore|sparta|springfield|springgrove|springvalley|stanne|staunton|stcharles|steeleville|steger|stelmo|sterling|stickney|stillmanvalley|stjacob|stjoseph|stockton|stonepark|streamwood|streator|sugargrove|sullivan|summit|sumner|swansea|sycamore|taylorville|teutopolis|thegalenaterritory|thirdlake|thomasboro|thornton|tilton|tinleypark|toledo|tolono|toluca|toulon|towerlake|tremont|trenton|troy|tuscola|twingrove|ukrainianvillage|universitypark|upperalton|uptown|urbana|valmeyer|vandalia|venetianvillage|venice|vernonhills|vienna|villageofcamptonhills|villagrove|villapark|virden|virginia|volo|wadsworth|walnut|wamac|warren|warrensburg|warrenville|warsaw|wasco|washburn|washington|washingtonpark|waterloo|waterman|watseka|wauconda|waukegan|waverly|wayne|waynecity|westchester|westchicago|westdundee|westelsdon|westenglewood|westernsprings|westfrankfort|westgarfieldpark|westlawn|westmont|westpeoria|westridge|westtown|westville|wheaton|wheeling|whitehall|williamsville|willowbrook|willowsprings|wilmette|wilmington|winchester|windsor|winfield|winnebago|winnetka|winthropharbor|wonderlake|wooddale|woodlawn|woodridge|woodriver|woodstock|worden|worth|wyoming|yorkville|zeigler|zion",
|
|
7623
7624
|
IN: "aberdeen|akron|albany|albion|alexandria|anderson|andrews|angola|arcadia|argos|attica|auburn|aurora|austin|avilla|avon|bargersville|basslake|batesville|battleground|bedford|beechgrove|berne|bicknell|bloomfield|bloomington|bluffton|boonville|bourbon|brazil|bremen|bright|bristol|broadripple|brooklyn|brookston|brookville|brownsburg|brownstown|burnsharbor|butler|cambridgecity|cannelton|carmel|cayuga|cedarlake|centerville|chandler|charlestown|chesterfield|chesterton|churubusco|cicero|clarksville|clermont|clinton|cloverdale|columbiacity|columbus|connersville|converse|cordrysweetwaterlakes|corydon|countrysquirelakes|covington|crawfordsville|crothersville|crownpoint|culver|cumberland|dale|daleville|danville|darmstadt|dayton|decatur|delphi|demotte|dillsboro|dunkirk|dunlap|dyer|eastchicago|eaton|edgewood|edinburgh|elkhart|ellettsville|elwood|english|evansville|fairfieldheights|fairmount|fairviewpark|farmersburg|farmland|ferdinand|fishers|fishlake|flora|fortville|fowler|frankfort|franklin|frankton|fremont|frenchlick|ftbranch|ftwayne|galena|galveston|garrett|gary|gascity|geneva|georgetown|goodland|goshen|grabill|granger|greencastle|greendale|greenfield|greensburg|greentown|greenwood|griffith|grissomairforcebase|gulivoirepark|hagerstown|hamilton|hammond|hanover|harlan|hartfordcity|haubstadt|hebron|henryville|heritagelake|hiddenvalley|highland|hobart|hope|hudsonlake|huntertown|huntingburg|huntington|indianapolis|indianheights|ingalls|jasonville|jasper|jeffersonville|jonesboro|kendallville|kentland|kingsfordheights|knightstown|knox|kokomo|koontzlake|kouts|lafayette|lagrange|lakedalecarlia|lakesofthefourseasons|lakestation|lapel|laporte|lawrence|lawrenceburg|lebanon|leocedarville|liberty|ligonier|linton|logansport|longbeach|loogootee|lowell|lynn|madison|marion|markle|martinsville|mccordsville|melodyhill|meridianhills|merrillville|michigancity|middlebury|middletown|milan|milford|mishawaka|mitchell|monon|monroeville|monrovia|monticello|montpelier|mooresville|morocco|morristown|mtvernon|mulberry|muncie|munster|nappanee|nashville|newalbany|newburgh|newcarlisle|newcastle|newchicago|newhaven|newpalestine|newparis|newpekin|newport|newwhiteland|noblesville|northjudson|northliberty|northmadison|northmanchester|northterrehaute|northvernon|northwebster|notredame|oaklandcity|oakpark|odon|ogdendunes|oolitic|orleans|osceola|osgood|ossian|otis|otterbein|owensville|oxford|paoli|parkercity|pendleton|peru|petersburg|pierceton|pittsboro|plainfield|plymouth|portage|porter|portland|poseyville|princeslakes|princeton|redkey|remington|rensselaer|richmond|risingsun|roanoke|rochester|rockport|rockville|romecity|roselawn|rossville|rushville|russiaville|santaclaus|schererville|scottsburg|seelyville|sellersburg|seymour|shadeland|shelburn|shelbyville|sheridan|shoals|shorewoodforest|simontonlake|smithvillesanders|southbend|southhaven|southport|southwhitley|speedway|spencer|stjohn|stpaul|sullivan|sunman|sweetser|syracuse|tellcity|terrehaute|thorntown|tipton|topeka|trafalgar|trailcreek|trilakes|unioncity|upland|valparaiso|veedersburg|versailles|vevay|vincennes|wabash|wakarusa|walkerton|walton|wanatah|warren|warrenpark|warsaw|washington|waterloo|westfield|westlafayette|westport|westterrehaute|westville|whiteland|whitestown|whiting|williamsport|winamac|winchester|winfield|winonalake|wolcottville|woodburn|worthington|yorktown|zionsville",
|
|
@@ -7627,45 +7628,45 @@ var io = {
|
|
|
7627
7628
|
};
|
|
7628
7629
|
//#endregion
|
|
7629
7630
|
//#region core/transport/text.ts
|
|
7630
|
-
function
|
|
7631
|
+
function so(e, t = 500) {
|
|
7631
7632
|
return typeof e == "string" ? e.replace(/\s+/g, " ").trim().slice(0, t) : "";
|
|
7632
7633
|
}
|
|
7633
7634
|
//#endregion
|
|
7634
7635
|
//#region core/time/index.ts
|
|
7635
|
-
var
|
|
7636
|
-
function
|
|
7636
|
+
var co = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
7637
|
+
function lo(e) {
|
|
7637
7638
|
let t = e.isValid ? e.toISO({ suppressMilliseconds: !0 }) : null;
|
|
7638
7639
|
return t ? {
|
|
7639
7640
|
iso: t,
|
|
7640
7641
|
timestamp: e.toMillis()
|
|
7641
7642
|
} : null;
|
|
7642
7643
|
}
|
|
7643
|
-
function
|
|
7644
|
-
let n =
|
|
7645
|
-
return !n || !
|
|
7644
|
+
function uo(e, t = 64) {
|
|
7645
|
+
let n = so(e, t);
|
|
7646
|
+
return !n || !co.test(n) ? null : lo($.fromISO(n, { setZone: !0 }));
|
|
7646
7647
|
}
|
|
7647
|
-
function
|
|
7648
|
-
let i =
|
|
7649
|
-
return i ?
|
|
7648
|
+
function fo(e, t, n, r = {}) {
|
|
7649
|
+
let i = so(e, r.maxLength ?? 64);
|
|
7650
|
+
return i ? lo($.fromFormat(i, t, {
|
|
7650
7651
|
zone: n,
|
|
7651
7652
|
locale: r.locale
|
|
7652
7653
|
})) : null;
|
|
7653
7654
|
}
|
|
7654
|
-
function
|
|
7655
|
-
let r =
|
|
7656
|
-
return r ?
|
|
7655
|
+
function po(e, t, n = 64) {
|
|
7656
|
+
let r = so(e, n);
|
|
7657
|
+
return r ? lo(co.test(r) ? $.fromISO(r, { setZone: !0 }) : $.fromISO(r, { zone: t })) : null;
|
|
7657
7658
|
}
|
|
7658
|
-
function
|
|
7659
|
-
let n =
|
|
7659
|
+
function mo(e, t) {
|
|
7660
|
+
let n = so(e, t);
|
|
7660
7661
|
if (!n) return null;
|
|
7661
|
-
let r =
|
|
7662
|
+
let r = co.test(n) ? $.fromISO(n, { setZone: !0 }).toUTC() : $.fromISO(n, { zone: "utc" });
|
|
7662
7663
|
return r.isValid ? r : null;
|
|
7663
7664
|
}
|
|
7664
|
-
function
|
|
7665
|
-
let r =
|
|
7665
|
+
function ho(e, t, n = 64) {
|
|
7666
|
+
let r = mo(e, n);
|
|
7666
7667
|
if (!r) return null;
|
|
7667
7668
|
let { year: i, month: a, day: o, hour: s, minute: c, second: l, millisecond: u } = r;
|
|
7668
|
-
return
|
|
7669
|
+
return lo($.fromObject({
|
|
7669
7670
|
year: i,
|
|
7670
7671
|
month: a,
|
|
7671
7672
|
day: o,
|
|
@@ -7675,26 +7676,26 @@ function po(e, t, n = 64) {
|
|
|
7675
7676
|
millisecond: u
|
|
7676
7677
|
}, { zone: t }));
|
|
7677
7678
|
}
|
|
7678
|
-
function
|
|
7679
|
-
return
|
|
7679
|
+
function go(e, t = 64) {
|
|
7680
|
+
return mo(e, t)?.toISO({ includeOffset: !1 }) ?? null;
|
|
7680
7681
|
}
|
|
7681
|
-
function
|
|
7682
|
-
if (!e.length ||
|
|
7682
|
+
function _o(e, t) {
|
|
7683
|
+
if (!e.length || co.test(t)) return null;
|
|
7683
7684
|
let n = e.map((e) => $.fromISO(t, { zone: e })), r = n[0].toMillis();
|
|
7684
7685
|
return n.every((e) => e.isValid && e.toMillis() === r) ? e[0] : null;
|
|
7685
7686
|
}
|
|
7686
|
-
var
|
|
7687
|
-
function
|
|
7687
|
+
var vo = 36e5;
|
|
7688
|
+
function yo(e, t) {
|
|
7688
7689
|
let n = e.map((e) => e.known ?? null), r = (e, t) => {
|
|
7689
7690
|
for (let r = e; r >= 0 && r < n.length; r += t) if (n[r]) return n[r].timestamp;
|
|
7690
7691
|
};
|
|
7691
7692
|
return e.map((e, n) => {
|
|
7692
7693
|
if (e.known) return e.known;
|
|
7693
7694
|
let i = r(n - 1, -1), a = r(n + 1, 1);
|
|
7694
|
-
return e.guesses?.find((e) => !!e && e.timestamp <= t +
|
|
7695
|
+
return e.guesses?.find((e) => !!e && e.timestamp <= t + vo && (i === void 0 || e.timestamp <= i) && (a === void 0 || e.timestamp >= a)) ?? null;
|
|
7695
7696
|
});
|
|
7696
7697
|
}
|
|
7697
|
-
var
|
|
7698
|
+
var bo = {
|
|
7698
7699
|
AT: "Europe/Vienna",
|
|
7699
7700
|
BE: "Europe/Brussels",
|
|
7700
7701
|
BG: "Europe/Sofia",
|
|
@@ -7741,21 +7742,21 @@ var vo = {
|
|
|
7741
7742
|
TH: "Asia/Bangkok",
|
|
7742
7743
|
TW: "Asia/Taipei",
|
|
7743
7744
|
VN: "Asia/Ho_Chi_Minh"
|
|
7744
|
-
},
|
|
7745
|
-
function
|
|
7745
|
+
}, xo = new Intl.DisplayNames(["en"], { type: "region" }), So = new Map(Array.from({ length: 676 }, (e, t) => String.fromCharCode(65 + Math.floor(t / 26), 65 + t % 26)).filter((e) => xo.of(e) !== e && new Intl.Locale(`und-${e}`).region === e).map((e) => [xo.of(e).toUpperCase(), e])), Co = new Set(So.values());
|
|
7746
|
+
function wo(e) {
|
|
7746
7747
|
if (typeof e != "string") return null;
|
|
7747
7748
|
let t = e.trim().toUpperCase();
|
|
7748
|
-
return
|
|
7749
|
+
return Co.has(t) ? t : So.get(t) ?? null;
|
|
7749
7750
|
}
|
|
7750
|
-
function
|
|
7751
|
-
let t =
|
|
7752
|
-
return t && Object.hasOwn(
|
|
7751
|
+
function To(e) {
|
|
7752
|
+
let t = wo(e);
|
|
7753
|
+
return t && Object.hasOwn(bo, t) ? bo[t] : null;
|
|
7753
7754
|
}
|
|
7754
|
-
function
|
|
7755
|
-
let t = Object.keys(
|
|
7755
|
+
function Eo(e) {
|
|
7756
|
+
let t = Object.keys(bo).filter((t) => bo[t] === e);
|
|
7756
7757
|
return t.length === 1 ? t[0] : null;
|
|
7757
7758
|
}
|
|
7758
|
-
var
|
|
7759
|
+
var Do = {
|
|
7759
7760
|
AL: "America/Chicago",
|
|
7760
7761
|
AK: "America/Anchorage",
|
|
7761
7762
|
AZ: "America/Phoenix",
|
|
@@ -7813,12 +7814,12 @@ var To = {
|
|
|
7813
7814
|
AS: "Pacific/Pago_Pago",
|
|
7814
7815
|
MP: "Pacific/Saipan"
|
|
7815
7816
|
};
|
|
7816
|
-
function
|
|
7817
|
+
function Oo(e) {
|
|
7817
7818
|
if (typeof e != "string") return null;
|
|
7818
7819
|
let t = e.trim().toUpperCase();
|
|
7819
|
-
return Object.hasOwn(
|
|
7820
|
+
return Object.hasOwn(Do, t) ? Do[t] : null;
|
|
7820
7821
|
}
|
|
7821
|
-
var
|
|
7822
|
+
var ko = {
|
|
7822
7823
|
AB: "America/Edmonton",
|
|
7823
7824
|
BC: "America/Vancouver",
|
|
7824
7825
|
MB: "America/Winnipeg",
|
|
@@ -7833,27 +7834,27 @@ var Do = {
|
|
|
7833
7834
|
SK: "America/Regina",
|
|
7834
7835
|
YT: "America/Whitehorse"
|
|
7835
7836
|
};
|
|
7836
|
-
function
|
|
7837
|
+
function Ao(e) {
|
|
7837
7838
|
if (typeof e != "string") return null;
|
|
7838
7839
|
let t = e.trim().toUpperCase();
|
|
7839
|
-
return Object.hasOwn(
|
|
7840
|
+
return Object.hasOwn(ko, t) ? ko[t] : null;
|
|
7840
7841
|
}
|
|
7841
|
-
function
|
|
7842
|
+
function jo(e) {
|
|
7842
7843
|
return e.normalize("NFD").replace(/\p{Mn}/gu, "").toLowerCase().replace(/\bsaint\b/g, "st").replace(/\bsainte\b/g, "ste").replace(/\bmount\b/g, "mt").replace(/\bfort\b/g, "ft").replace(/[^a-z0-9]/g, "");
|
|
7843
7844
|
}
|
|
7844
|
-
var
|
|
7845
|
-
function
|
|
7846
|
-
return
|
|
7845
|
+
var Mo = new Map(Object.entries(oo).map(([e, t]) => [e, new Set(t.split("|"))]));
|
|
7846
|
+
function No(e, t) {
|
|
7847
|
+
return Mo.get(e.trim().toUpperCase())?.has(jo(t)) ?? !1;
|
|
7847
7848
|
}
|
|
7848
|
-
function
|
|
7849
|
+
function Po(e) {
|
|
7849
7850
|
let t = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
7850
|
-
return !Number.isFinite(t) || t <= 0 ? null :
|
|
7851
|
+
return !Number.isFinite(t) || t <= 0 ? null : lo($.fromMillis(t, { zone: "utc" }));
|
|
7851
7852
|
}
|
|
7852
|
-
function
|
|
7853
|
+
function Fo(e) {
|
|
7853
7854
|
let t = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
7854
|
-
return !Number.isFinite(t) || t <= 0 ? null :
|
|
7855
|
+
return !Number.isFinite(t) || t <= 0 ? null : Po(t * 1e3);
|
|
7855
7856
|
}
|
|
7856
|
-
function
|
|
7857
|
+
function Io(e, t, n) {
|
|
7857
7858
|
if (![
|
|
7858
7859
|
e,
|
|
7859
7860
|
t,
|
|
@@ -7868,9 +7869,9 @@ function Po(e, t, n) {
|
|
|
7868
7869
|
}
|
|
7869
7870
|
//#endregion
|
|
7870
7871
|
//#region core/result/resolve.ts
|
|
7871
|
-
var
|
|
7872
|
-
function
|
|
7873
|
-
if (
|
|
7872
|
+
var Lo = new Set(ue);
|
|
7873
|
+
function Ro(e) {
|
|
7874
|
+
if (Lo.has(e.current_stage ?? "")) return e.current_stage;
|
|
7874
7875
|
let t = {
|
|
7875
7876
|
pending: "pending",
|
|
7876
7877
|
in_transit: "in_transit",
|
|
@@ -7880,32 +7881,32 @@ function Io(e) {
|
|
|
7880
7881
|
}[e.status ?? "unknown"];
|
|
7881
7882
|
if (!t) return null;
|
|
7882
7883
|
let n = vt(e.last_status_text ?? "", t).stage, r = e.events?.[0]?.stage;
|
|
7883
|
-
return n === "pending" &&
|
|
7884
|
+
return n === "pending" && Lo.has(r ?? "") ? r : n;
|
|
7884
7885
|
}
|
|
7885
|
-
function
|
|
7886
|
-
let t =
|
|
7886
|
+
function zo(e) {
|
|
7887
|
+
let t = Ro(e);
|
|
7887
7888
|
return !!(t && t !== "pending") || (e.events ?? []).some((e) => {
|
|
7888
|
-
let t =
|
|
7889
|
+
let t = Lo.has(e.stage ?? "") ? e.stage : void 0;
|
|
7889
7890
|
return !!(t && t !== "pending") || !!(e.description && vt(e.description, "pending").stage !== "pending");
|
|
7890
7891
|
});
|
|
7891
7892
|
}
|
|
7892
|
-
function
|
|
7893
|
+
function Bo(e, t = "in_transit") {
|
|
7893
7894
|
return vt(e, t);
|
|
7894
7895
|
}
|
|
7895
|
-
function
|
|
7896
|
-
return
|
|
7896
|
+
function Vo(e, t = "in_transit") {
|
|
7897
|
+
return Bo(e, t).stage;
|
|
7897
7898
|
}
|
|
7898
|
-
function
|
|
7899
|
-
return
|
|
7899
|
+
function Ho(e, t, n) {
|
|
7900
|
+
return Lo.has(e) ? typeof n == "string" && n.length <= 100 && (n === "none" || n === "carrier_map" || /^wording:[a-z0-9_]+$/.test(n)) ? n : "carrier_map" : Bo(t).source;
|
|
7900
7901
|
}
|
|
7901
|
-
function
|
|
7902
|
-
let t = mt(e), n =
|
|
7903
|
-
let t =
|
|
7902
|
+
function Uo(e) {
|
|
7903
|
+
let t = mt(e), n = Ro(t), r = (t.events ?? []).map((e) => {
|
|
7904
|
+
let t = Lo.has(e.stage ?? "") ? e.stage : void 0, n = vt(e.description ?? "", "in_transit");
|
|
7904
7905
|
return {
|
|
7905
7906
|
...e,
|
|
7906
7907
|
stage: t ?? n.stage,
|
|
7907
|
-
stage_source: t ?
|
|
7908
|
-
instant:
|
|
7908
|
+
stage_source: t ? Ho(t, e.description ?? "", e.stage_source) : n.source,
|
|
7909
|
+
instant: uo(e.time)?.iso ?? null
|
|
7909
7910
|
};
|
|
7910
7911
|
});
|
|
7911
7912
|
return {
|
|
@@ -7916,11 +7917,11 @@ function Vo(e) {
|
|
|
7916
7917
|
}
|
|
7917
7918
|
//#endregion
|
|
7918
7919
|
//#region core/errors/hint.ts
|
|
7919
|
-
function
|
|
7920
|
-
return
|
|
7920
|
+
function Wo(e) {
|
|
7921
|
+
return g(e) ?? (e instanceof TypeError || e instanceof RangeError || e instanceof SyntaxError ? "schema" : "transport");
|
|
7921
7922
|
}
|
|
7922
|
-
function
|
|
7923
|
-
let t =
|
|
7923
|
+
function Go(e) {
|
|
7924
|
+
let t = Wo(e), n = _(e);
|
|
7924
7925
|
return {
|
|
7925
7926
|
kind: t,
|
|
7926
7927
|
...n === void 0 ? {} : { retryAfterMs: n }
|
|
@@ -7928,19 +7929,19 @@ function Uo(e) {
|
|
|
7928
7929
|
}
|
|
7929
7930
|
//#endregion
|
|
7930
7931
|
//#region core/catalog/networks.ts
|
|
7931
|
-
var
|
|
7932
|
+
var Ko = [
|
|
7932
7933
|
"dhl",
|
|
7933
7934
|
"dpd",
|
|
7934
7935
|
"gls",
|
|
7935
7936
|
"hermes",
|
|
7936
7937
|
"evri"
|
|
7937
7938
|
];
|
|
7938
|
-
function
|
|
7939
|
-
return
|
|
7939
|
+
function qo(e) {
|
|
7940
|
+
return Ko.find((t) => e === t || e.startsWith(`${t}-`));
|
|
7940
7941
|
}
|
|
7941
7942
|
//#endregion
|
|
7942
7943
|
//#region generated/recognition.ts
|
|
7943
|
-
var
|
|
7944
|
+
var Jo = {
|
|
7944
7945
|
"austrian-post": 39,
|
|
7945
7946
|
bpost: 37,
|
|
7946
7947
|
brt: 42,
|
|
@@ -7971,34 +7972,34 @@ var Ko = {
|
|
|
7971
7972
|
tipsa: 24,
|
|
7972
7973
|
tnt: 44,
|
|
7973
7974
|
uniuni: 33
|
|
7974
|
-
},
|
|
7975
|
-
function
|
|
7976
|
-
let n =
|
|
7975
|
+
}, Yo = 5;
|
|
7976
|
+
function Xo(e, t = {}) {
|
|
7977
|
+
let n = S(e), r = n.carrier === "intl-post";
|
|
7977
7978
|
if (n.confidence !== "low" && !r) return [];
|
|
7978
|
-
let i =
|
|
7979
|
+
let i = v(e), a = r ? Object.entries(y).flatMap(([t, n]) => {
|
|
7979
7980
|
let r = n.detectionRules.find((t) => t.confidence === "low" && (!t.checksum || t.checksum === "s10") && new RegExp(t.pattern).test(i) && (!t.rawPattern || new RegExp(t.rawPattern).test(e.trim().toUpperCase())));
|
|
7980
7981
|
return r ? [{
|
|
7981
7982
|
carrier: t,
|
|
7982
7983
|
preferred: r.preferred === !0
|
|
7983
7984
|
}] : [];
|
|
7984
|
-
}) : [], o = r ? a.map(({ carrier: e }) => e) : n.candidates, s = r ? a.filter((e) => e.preferred).map(({ carrier: e }) => e) : n.preferred, c = t.phase === "browser" ? Object.fromEntries(Object.entries(
|
|
7985
|
+
}) : [], o = r ? a.map(({ carrier: e }) => e) : n.candidates, s = r ? a.filter((e) => e.preferred).map(({ carrier: e }) => e) : n.preferred, c = t.phase === "browser" ? Object.fromEntries(Object.entries(y).map(([e, t]) => [e, t.tracking.browserRecognitionRank])) : Jo, l = new Set(s.filter((e) => c[e] === void 0).map((e) => qo(e)).filter(Boolean)), u = (e) => [
|
|
7985
7986
|
+(e === t.hint),
|
|
7986
7987
|
+!!s.includes(e),
|
|
7987
7988
|
c[e] ?? 0
|
|
7988
7989
|
];
|
|
7989
|
-
return o.filter((e) => c[e] !== void 0 &&
|
|
7990
|
+
return o.filter((e) => c[e] !== void 0 && Se.has(e) && ye(e) !== "universal" && !l.has(qo(e)) && !t.skip?.(e)).map((e) => ({
|
|
7990
7991
|
carrier: e,
|
|
7991
7992
|
score: u(e)
|
|
7992
7993
|
})).sort((e, t) => t.score[0] - e.score[0] || t.score[1] - e.score[1] || t.score[2] - e.score[2]).map(({ carrier: t }) => ({
|
|
7993
7994
|
carrier: t,
|
|
7994
|
-
needsInput:
|
|
7995
|
+
needsInput: xe(t, e)[0]?.field ?? null,
|
|
7995
7996
|
preferred: s.includes(t)
|
|
7996
7997
|
})).filter((e) => t.phase !== "browser" || !e.needsInput);
|
|
7997
7998
|
}
|
|
7998
7999
|
//#endregion
|
|
7999
8000
|
//#region core/recognition/index.ts
|
|
8000
|
-
var
|
|
8001
|
-
async function
|
|
8001
|
+
var Zo = 5184e6;
|
|
8002
|
+
async function Qo(e, t, n, r) {
|
|
8002
8003
|
let i = e.map((e) => ({
|
|
8003
8004
|
...e,
|
|
8004
8005
|
status: "failed",
|
|
@@ -8030,12 +8031,12 @@ async function Xo(e, t, n, r) {
|
|
|
8030
8031
|
}
|
|
8031
8032
|
return r?.throwIfAborted(), i.map((e) => ({ ...e }));
|
|
8032
8033
|
}
|
|
8033
|
-
function
|
|
8034
|
+
function $o(e, t) {
|
|
8034
8035
|
let n = Date.parse(e.lastActivityAt ?? "");
|
|
8035
|
-
return !Number.isFinite(n) || t.getTime() - n <
|
|
8036
|
+
return !Number.isFinite(n) || t.getTime() - n < Zo;
|
|
8036
8037
|
}
|
|
8037
|
-
function
|
|
8038
|
-
let n = e.filter((e) => e.status === "known" &&
|
|
8038
|
+
function es(e, t = /* @__PURE__ */ new Date()) {
|
|
8039
|
+
let n = e.filter((e) => e.status === "known" && $o(e, t));
|
|
8039
8040
|
if (n.length === 0) return { choices: [] };
|
|
8040
8041
|
if (n.length === 1) return {
|
|
8041
8042
|
carrier: n[0].carrier,
|
|
@@ -8046,8 +8047,8 @@ function Qo(e, t = /* @__PURE__ */ new Date()) {
|
|
|
8046
8047
|
carrier: r[0].carrier,
|
|
8047
8048
|
choices: []
|
|
8048
8049
|
};
|
|
8049
|
-
if (new Set(n.map((e) =>
|
|
8050
|
-
let [e] = [...n].sort((e, t) => (
|
|
8050
|
+
if (new Set(n.map((e) => qo(e.carrier) ?? e.carrier)).size === 1) {
|
|
8051
|
+
let [e] = [...n].sort((e, t) => (Jo[t.carrier] ?? 0) - (Jo[e.carrier] ?? 0));
|
|
8051
8052
|
return {
|
|
8052
8053
|
carrier: e.carrier,
|
|
8053
8054
|
choices: []
|
|
@@ -8057,14 +8058,14 @@ function Qo(e, t = /* @__PURE__ */ new Date()) {
|
|
|
8057
8058
|
}
|
|
8058
8059
|
//#endregion
|
|
8059
8060
|
//#region core/catalog/hints.ts
|
|
8060
|
-
var
|
|
8061
|
+
var ts = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), ns = [
|
|
8061
8062
|
"dhl",
|
|
8062
8063
|
"dpd",
|
|
8063
8064
|
"gls",
|
|
8064
8065
|
"hermes",
|
|
8065
8066
|
"evri",
|
|
8066
8067
|
"post"
|
|
8067
|
-
],
|
|
8068
|
+
], rs = {
|
|
8068
8069
|
ups: "ups",
|
|
8069
8070
|
swisspost: "swiss-post",
|
|
8070
8071
|
laposte: "la-poste",
|
|
@@ -8077,11 +8078,11 @@ var $o = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), es = [
|
|
|
8077
8078
|
spainpost: "correos-spain"
|
|
8078
8079
|
};
|
|
8079
8080
|
[
|
|
8080
|
-
...Object.entries(
|
|
8081
|
-
...Object.keys(
|
|
8082
|
-
...
|
|
8081
|
+
...Object.entries(y).filter(([e]) => e !== "unknown").flatMap(([, e]) => [e.displayName, ...e.aliases ?? []].map(ts)),
|
|
8082
|
+
...Object.keys(rs),
|
|
8083
|
+
...ns
|
|
8083
8084
|
];
|
|
8084
|
-
var
|
|
8085
|
+
var is = /* @__PURE__ */ new Map([
|
|
8085
8086
|
["CA", "canada-post"],
|
|
8086
8087
|
["CH", "swiss-post"],
|
|
8087
8088
|
["DE", "dhl"],
|
|
@@ -8097,44 +8098,44 @@ var ns = /* @__PURE__ */ new Map([
|
|
|
8097
8098
|
["PT", "ctt"],
|
|
8098
8099
|
["SE", "postnord"],
|
|
8099
8100
|
["US", "usps"]
|
|
8100
|
-
]),
|
|
8101
|
+
]), as = new Intl.DisplayNames(["en"], { type: "region" }), os = (e) => new Intl.Locale(`und-${e}`).region ?? e;
|
|
8101
8102
|
new Map([
|
|
8102
|
-
...Array.from({ length: 676 }, (e, t) => String.fromCharCode(65 + Math.floor(t / 26), 65 + t % 26)).map((e) => [
|
|
8103
|
+
...Array.from({ length: 676 }, (e, t) => String.fromCharCode(65 + Math.floor(t / 26), 65 + t % 26)).map((e) => [ts(as.of(e) ?? ""), os(e)]).filter(([e, t]) => e !== "" && e !== t.toLowerCase()),
|
|
8103
8104
|
["uk", "GB"],
|
|
8104
8105
|
["usa", "US"]
|
|
8105
8106
|
]);
|
|
8106
|
-
function
|
|
8107
|
+
function ss(e) {
|
|
8107
8108
|
if (typeof e != "string") return;
|
|
8108
8109
|
let t = e.trim().toUpperCase();
|
|
8109
|
-
return
|
|
8110
|
+
return is.get(t) || [...is].find(([e]) => as.of(e)?.toUpperCase() === t)?.[1];
|
|
8110
8111
|
}
|
|
8111
|
-
function
|
|
8112
|
+
function cs(e) {
|
|
8112
8113
|
let t;
|
|
8113
8114
|
try {
|
|
8114
8115
|
t = new URL(e);
|
|
8115
8116
|
} catch {
|
|
8116
8117
|
return [];
|
|
8117
8118
|
}
|
|
8118
|
-
return !["https:", "http:"].includes(t.protocol) || t.username || t.password ? [] : ["post.ch", "www.post.ch"].includes(t.hostname) ? ["swiss-post"] : Object.entries(
|
|
8119
|
+
return !["https:", "http:"].includes(t.protocol) || t.username || t.password ? [] : ["post.ch", "www.post.ch"].includes(t.hostname) ? ["swiss-post"] : Object.entries(y).filter(([, e]) => e.linkRules.some((e) => e.domains.some((e) => Ee(t.hostname, e)))).map(([e]) => e);
|
|
8119
8120
|
}
|
|
8120
|
-
function
|
|
8121
|
-
return [...new Set(e.flatMap((e) => [...String(e ?? "").matchAll(/https?:\/\/[^\s<>"')]+/gi)].flatMap(([e]) =>
|
|
8121
|
+
function ls(e, t) {
|
|
8122
|
+
return [...new Set(e.flatMap((e) => [...String(e ?? "").matchAll(/https?:\/\/[^\s<>"')]+/gi)].flatMap(([e]) => cs(e)).filter((e) => e !== t)))];
|
|
8122
8123
|
}
|
|
8123
8124
|
//#endregion
|
|
8124
8125
|
//#region core/catalog/handoff.ts
|
|
8125
|
-
function
|
|
8126
|
-
return !
|
|
8126
|
+
function us(e, t) {
|
|
8127
|
+
return !Se.has(e) || ye(e) === "universal" || xe(e, t).length > 0 ? !1 : be(e, t).length === 0 || S(t).candidates.includes(e);
|
|
8127
8128
|
}
|
|
8128
|
-
function
|
|
8129
|
+
function ds(e, t, n) {
|
|
8129
8130
|
if (n.delivery_tracking_number != null && (typeof n.delivery_tracking_number != "string" || !/^[A-Z0-9]{4,40}$/.test(n.delivery_tracking_number))) return null;
|
|
8130
|
-
let r =
|
|
8131
|
+
let r = ls([n.last_status_text, ...(n.events ?? []).map((e) => e.description)], e);
|
|
8131
8132
|
if (!n.delivery_carrier && r.length > 1) return null;
|
|
8132
8133
|
let i = n.delivery_carrier ?? r[0], a = "partner", o = n.delivery_tracking_number || t, s = typeof n.destination_country == "string" ? n.destination_country : typeof n.destination_country_name == "string" ? n.destination_country_name : void 0;
|
|
8133
|
-
if (!i &&
|
|
8134
|
-
let e =
|
|
8134
|
+
if (!i && qe(o) && (i = ss(s), i && (a = "destination")), !i && n.delivery_tracking_number) {
|
|
8135
|
+
let e = S(o);
|
|
8135
8136
|
e.confidence === "high" && (i = e.carrier, a = "reference");
|
|
8136
8137
|
}
|
|
8137
|
-
return !i && !n.delivery_tracking_number && ["aliexpress", "intl-post"].includes(e) &&
|
|
8138
|
+
return !i && !n.delivery_tracking_number && ["aliexpress", "intl-post"].includes(e) && Je(t) && (!s || ["ch", "switzerland"].includes(s.trim().toLowerCase())) && (i = "swiss-post", a = "reference"), !i || i === e || !/^[A-Z0-9]{4,40}$/.test(o) || !us(i, o) ? null : {
|
|
8138
8139
|
carrier: i,
|
|
8139
8140
|
number: o,
|
|
8140
8141
|
basis: a
|
|
@@ -8142,7 +8143,7 @@ function ls(e, t, n) {
|
|
|
8142
8143
|
}
|
|
8143
8144
|
//#endregion
|
|
8144
8145
|
//#region core/catalog/urls.ts
|
|
8145
|
-
var
|
|
8146
|
+
var fs = "trackandtrace.planzergroup.com", ps = /^\/shared\/sendungen\/([^/]+)\/?$/, ms = /^[A-Za-z0-9_-]{32,256}$/, hs = "customeriberia.dachser.com", gs = "/customerarea/utilidades/seguimiento-publico/detalle", _s = /^[A-Za-z0-9_-]{4,256}$/, vs = /[\x00-\x1f\x7f]/, ys = /* @__PURE__ */ new Set([
|
|
8146
8147
|
"hash",
|
|
8147
8148
|
"cliente",
|
|
8148
8149
|
"numeroUnico",
|
|
@@ -8157,7 +8158,7 @@ var us = "trackandtrace.planzergroup.com", ds = /^\/shared\/sendungen\/([^/]+)\/
|
|
|
8157
8158
|
"origen",
|
|
8158
8159
|
"usuario"
|
|
8159
8160
|
]);
|
|
8160
|
-
function
|
|
8161
|
+
function bs(e, t) {
|
|
8161
8162
|
let n = e.trim();
|
|
8162
8163
|
if (n.length < 1 || n.length > 4096) throw TypeError("Paste the complete Planzer tracking URL");
|
|
8163
8164
|
let r;
|
|
@@ -8166,21 +8167,21 @@ function vs(e, t) {
|
|
|
8166
8167
|
} catch (e) {
|
|
8167
8168
|
throw TypeError("Paste a valid Planzer tracking URL", { cause: e });
|
|
8168
8169
|
}
|
|
8169
|
-
if (r.protocol !== "https:" || r.hostname.toLowerCase() !==
|
|
8170
|
+
if (r.protocol !== "https:" || r.hostname.toLowerCase() !== fs || r.username || r.password || r.port && r.port !== "443" || r.hash) throw TypeError(`Planzer shared links must use https://${fs}`);
|
|
8170
8171
|
let i;
|
|
8171
8172
|
try {
|
|
8172
8173
|
i = decodeURIComponent(r.pathname);
|
|
8173
8174
|
} catch (e) {
|
|
8174
8175
|
throw TypeError("Paste a valid Planzer tracking URL", { cause: e });
|
|
8175
8176
|
}
|
|
8176
|
-
let a =
|
|
8177
|
+
let a = ps.exec(i);
|
|
8177
8178
|
if (!a) throw TypeError("Paste a Planzer shared shipment URL");
|
|
8178
|
-
if (
|
|
8179
|
+
if (v(a[1]) !== v(t)) throw TypeError("The Planzer URL belongs to a different tracking number");
|
|
8179
8180
|
let o = r.searchParams.getAll("accessKey");
|
|
8180
|
-
if (o.length !== 1 || !
|
|
8181
|
+
if (o.length !== 1 || !ms.test(o[0])) throw TypeError("The Planzer URL must include its accessKey");
|
|
8181
8182
|
return r.toString();
|
|
8182
8183
|
}
|
|
8183
|
-
function
|
|
8184
|
+
function xs(e, t) {
|
|
8184
8185
|
let n = e.trim();
|
|
8185
8186
|
if (n.length < 1 || n.length > 4096) throw TypeError("Paste the complete Dachser tracking URL");
|
|
8186
8187
|
let r;
|
|
@@ -8189,37 +8190,37 @@ function ys(e, t) {
|
|
|
8189
8190
|
} catch (e) {
|
|
8190
8191
|
throw TypeError("Paste a valid Dachser tracking URL", { cause: e });
|
|
8191
8192
|
}
|
|
8192
|
-
if (r.protocol !== "https:" || r.hostname.toLowerCase() !==
|
|
8193
|
+
if (r.protocol !== "https:" || r.hostname.toLowerCase() !== hs || r.username || r.password || r.port && r.port !== "443" || r.hash) throw TypeError(`Dachser links must use https://${hs}`);
|
|
8193
8194
|
let i;
|
|
8194
8195
|
try {
|
|
8195
8196
|
i = decodeURIComponent(r.pathname);
|
|
8196
8197
|
} catch (e) {
|
|
8197
8198
|
throw TypeError("Paste a valid Dachser tracking URL", { cause: e });
|
|
8198
8199
|
}
|
|
8199
|
-
if (i !==
|
|
8200
|
+
if (i !== gs && i !== `${gs}/`) throw TypeError("Paste a Dachser public shipment detail URL");
|
|
8200
8201
|
let a = /* @__PURE__ */ new Map();
|
|
8201
8202
|
for (let [e, t] of r.searchParams) {
|
|
8202
|
-
if (!
|
|
8203
|
+
if (!ys.has(e)) throw TypeError("The Dachser URL contains an unsupported parameter");
|
|
8203
8204
|
if (a.has(e)) throw TypeError("The Dachser URL contains a duplicate parameter");
|
|
8204
|
-
if (!t || t.length > 256 ||
|
|
8205
|
+
if (!t || t.length > 256 || vs.test(t)) throw TypeError("The Dachser URL contains an invalid parameter");
|
|
8205
8206
|
a.set(e, t);
|
|
8206
8207
|
}
|
|
8207
8208
|
let o = a.get("numeroUnico");
|
|
8208
8209
|
if (!o) throw TypeError("The Dachser URL must include its shipment number");
|
|
8209
|
-
if (
|
|
8210
|
-
let s = a.get("hash"), c = a.get("clave"), l = a.get("fecha"), u = !!(s &&
|
|
8210
|
+
if (v(o) !== v(t)) throw TypeError("The Dachser URL belongs to a different tracking number");
|
|
8211
|
+
let s = a.get("hash"), c = a.get("clave"), l = a.get("fecha"), u = !!(s && _s.test(s)), d = !!(c && l && _s.test(c) && /^\d{8}$/.test(l));
|
|
8211
8212
|
if (!u && !d) throw TypeError("The Dachser URL must include its access parameters");
|
|
8212
|
-
return r.protocol = "https:", r.hostname =
|
|
8213
|
+
return r.protocol = "https:", r.hostname = hs, r.port = "", r.toString();
|
|
8213
8214
|
}
|
|
8214
8215
|
//#endregion
|
|
8215
8216
|
//#region core/catalog/inputs.ts
|
|
8216
|
-
function
|
|
8217
|
+
function Ss(e, t, n, r) {
|
|
8217
8218
|
let i = {
|
|
8218
8219
|
trackingUrl: n.trim() || null,
|
|
8219
8220
|
postcode: r.trim() || null
|
|
8220
8221
|
}, a = e === "mondial-relay" && /^\d{26}$/.test(t);
|
|
8221
|
-
if (a && !
|
|
8222
|
-
let o = new Map(
|
|
8222
|
+
if (a && !ie(t)) throw TypeError("Invalid Mondial Relay barcode");
|
|
8223
|
+
let o = new Map(be(e, t).map((e) => [e.field, e]));
|
|
8223
8224
|
a && i.postcode && o.set("postcode", {
|
|
8224
8225
|
field: "postcode",
|
|
8225
8226
|
validator: "francePostcode"
|
|
@@ -8229,24 +8230,24 @@ function bs(e, t, n, r) {
|
|
|
8229
8230
|
let a = i[n];
|
|
8230
8231
|
if (!a) {
|
|
8231
8232
|
if (r.optional) continue;
|
|
8232
|
-
throw n === "trackingUrl" ? TypeError(`${
|
|
8233
|
+
throw n === "trackingUrl" ? TypeError(`${b(e).displayName} requires its complete tracking URL`) : r.validator === "swissPostcode" ? TypeError(`${b(e).displayName} requires the four-digit delivery postcode`) : r.validator === "francePostcode" || r.validator === "germanyPostcode" ? TypeError(`${b(e).displayName} requires the five-digit delivery postcode`) : r.validator === "swissOrFrancePostcode" ? TypeError(`${b(e).displayName} requires a four- or five-digit delivery postcode`) : r.validator === "paackPostcode" ? TypeError("Paack requires the delivery postcode") : TypeError(`${b(e).displayName} requires the delivery postcode`);
|
|
8233
8234
|
}
|
|
8234
8235
|
switch (r.validator) {
|
|
8235
8236
|
case "planzerSharedUrl":
|
|
8236
|
-
i[n] =
|
|
8237
|
+
i[n] = bs(a, t);
|
|
8237
8238
|
break;
|
|
8238
8239
|
case "dachserCapabilityUrl":
|
|
8239
|
-
i[n] =
|
|
8240
|
+
i[n] = xs(a, t);
|
|
8240
8241
|
break;
|
|
8241
8242
|
case "swissPostcode":
|
|
8242
|
-
if (!/^\d{4}$/.test(a)) throw TypeError(`${
|
|
8243
|
+
if (!/^\d{4}$/.test(a)) throw TypeError(`${b(e).displayName} requires the four-digit delivery postcode`);
|
|
8243
8244
|
break;
|
|
8244
8245
|
case "francePostcode":
|
|
8245
8246
|
case "germanyPostcode":
|
|
8246
|
-
if (!/^\d{5}$/.test(a)) throw TypeError(`${
|
|
8247
|
+
if (!/^\d{5}$/.test(a)) throw TypeError(`${b(e).displayName} requires the five-digit delivery postcode`);
|
|
8247
8248
|
break;
|
|
8248
8249
|
case "swissOrFrancePostcode":
|
|
8249
|
-
if (!/^\d{4,5}$/.test(a)) throw TypeError(`${
|
|
8250
|
+
if (!/^\d{4,5}$/.test(a)) throw TypeError(`${b(e).displayName} requires a four- or five-digit delivery postcode`);
|
|
8250
8251
|
break;
|
|
8251
8252
|
case "paackPostcode": {
|
|
8252
8253
|
let e = a.toLocaleUpperCase("en-US");
|
|
@@ -8259,12 +8260,12 @@ function bs(e, t, n, r) {
|
|
|
8259
8260
|
}
|
|
8260
8261
|
return i;
|
|
8261
8262
|
}
|
|
8262
|
-
function
|
|
8263
|
+
function Cs(e) {
|
|
8263
8264
|
let t = e.trim().toUpperCase().replace(/\s+/g, " ");
|
|
8264
8265
|
if (!/^(?=.{3,12}$)(?=.*\d)[A-Z0-9]+(?:[ -][A-Z0-9]+)*$/.test(t)) throw TypeError("A valid delivery postcode is required");
|
|
8265
8266
|
return t;
|
|
8266
8267
|
}
|
|
8267
|
-
var
|
|
8268
|
+
var ws = { carriers: [
|
|
8268
8269
|
{
|
|
8269
8270
|
carrier: "dhl",
|
|
8270
8271
|
direct: "Yes",
|
|
@@ -9973,74 +9974,74 @@ var Ss = { carriers: [
|
|
|
9973
9974
|
}
|
|
9974
9975
|
}]
|
|
9975
9976
|
}
|
|
9976
|
-
] },
|
|
9977
|
+
] }, Ts = [
|
|
9977
9978
|
"Ship24",
|
|
9978
9979
|
"ParcelsApp",
|
|
9979
9980
|
"17TRACK",
|
|
9980
9981
|
"Postal Ninja",
|
|
9981
9982
|
"UPU"
|
|
9982
|
-
],
|
|
9983
|
+
], Es = /* @__PURE__ */ new Set([
|
|
9983
9984
|
"no_history",
|
|
9984
9985
|
"summary_only",
|
|
9985
9986
|
"sign_in",
|
|
9986
9987
|
"postcode_prompt"
|
|
9987
|
-
]),
|
|
9988
|
-
function
|
|
9988
|
+
]), Ds = ws.carriers, Os = new Map(Ds.map((e) => [e.carrier, e]));
|
|
9989
|
+
function ks(e) {
|
|
9989
9990
|
return typeof e == "number" || e === "history" || typeof e == "object" && !!e;
|
|
9990
9991
|
}
|
|
9991
|
-
function
|
|
9992
|
-
let n = t.filter((t) => t.results[e] !== void 0), r = n.some((t) => !t.stale && (
|
|
9993
|
-
return n.some((t) =>
|
|
9992
|
+
function As(e, t) {
|
|
9993
|
+
let n = t.filter((t) => t.results[e] !== void 0), r = n.some((t) => !t.stale && (Es.has(t.results[e]) || t.results[e] === "wrong_carrier") && Object.entries(t.results).some(([t, n]) => t !== e && t !== "UPU" && ks(n)));
|
|
9994
|
+
return n.some((t) => ks(t.results[e])) ? n.some((t) => typeof t.results[e] == "object") || r ? "partial" : "full" : n.some((t) => ["wrong_carrier", "refused"].includes(t.results[e])) ? "excluded" : n.some((t) => !t.stale && Es.has(t.results[e])) ? "empty" : "unknown";
|
|
9994
9995
|
}
|
|
9995
|
-
function
|
|
9996
|
-
let t = e ?
|
|
9997
|
-
return t ? Object.fromEntries(
|
|
9996
|
+
function js(e) {
|
|
9997
|
+
let t = e ? Os.get(e) : void 0;
|
|
9998
|
+
return t ? Object.fromEntries(Ts.map((e) => [e, As(e, t.references)])) : null;
|
|
9998
9999
|
}
|
|
9999
10000
|
//#endregion
|
|
10000
10001
|
//#region providers/plan.ts
|
|
10001
|
-
var
|
|
10002
|
+
var Ms = [
|
|
10002
10003
|
"ParcelsApp",
|
|
10003
10004
|
"Ship24",
|
|
10004
10005
|
"17TRACK",
|
|
10005
10006
|
"UPU"
|
|
10006
|
-
],
|
|
10007
|
-
function
|
|
10007
|
+
], Ns = /* @__PURE__ */ new Set(["17TRACK", "Postal Ninja"]);
|
|
10008
|
+
function Ps(e) {
|
|
10008
10009
|
return e === "ParcelsApp" ? 45e3 : e === "UPU" ? 8e3 : 3e4;
|
|
10009
10010
|
}
|
|
10010
|
-
function
|
|
10011
|
-
return e && /^\d{10}$/.test(
|
|
10011
|
+
function Fs(e) {
|
|
10012
|
+
return e && /^\d{10}$/.test(v(e)) ? "Ship24" : e && /^[CL][A-Z]\d{9}CN$/.test(v(e)) && qe(e) ? "17TRACK" : void 0;
|
|
10012
10013
|
}
|
|
10013
|
-
var
|
|
10014
|
+
var Is = {
|
|
10014
10015
|
full: 0,
|
|
10015
10016
|
partial: 1,
|
|
10016
10017
|
unknown: 2,
|
|
10017
10018
|
empty: 3,
|
|
10018
10019
|
excluded: 4
|
|
10019
|
-
},
|
|
10020
|
-
function
|
|
10020
|
+
}, Ls = (e, t) => Is[t === "UPU" ? "unknown" : e?.[t] ?? "unknown"];
|
|
10021
|
+
function Rs(e, t) {
|
|
10021
10022
|
let n = (e) => e !== "UPU" && t?.[e] === "excluded";
|
|
10022
|
-
return (e.some((e) => e !== "UPU" && !n(e)) ? e.filter((e) => !n(e)) : [...e]).sort((n, r) => Number(n === "UPU") - Number(r === "UPU") ||
|
|
10023
|
+
return (e.some((e) => e !== "UPU" && !n(e)) ? e.filter((e) => !n(e)) : [...e]).sort((n, r) => Number(n === "UPU") - Number(r === "UPU") || Ls(t, n) - Ls(t, r) || Number(Ns.has(n)) - Number(Ns.has(r)) || e.indexOf(n) - e.indexOf(r));
|
|
10023
10024
|
}
|
|
10024
|
-
function
|
|
10025
|
+
function zs(e = {}) {
|
|
10025
10026
|
let { trackingNumber: t, enablePostalNinja: n = !1 } = e, r = (n ? [
|
|
10026
10027
|
"ParcelsApp",
|
|
10027
10028
|
"Ship24",
|
|
10028
10029
|
"Postal Ninja",
|
|
10029
10030
|
"17TRACK",
|
|
10030
10031
|
"UPU"
|
|
10031
|
-
] : [...
|
|
10032
|
+
] : [...Ms]).filter((e) => e !== "UPU" || t === void 0 || qe(t)), i = (e.carriers ?? []).find((e) => js(e)) ?? null, a = js(i), o = Rs(r, a), s = Fs(t);
|
|
10032
10033
|
return {
|
|
10033
10034
|
sources: s ? [s, ...o.filter((e) => e !== s)] : o,
|
|
10034
10035
|
carrier: i,
|
|
10035
10036
|
tier: (e) => a?.[e] ?? "unknown",
|
|
10036
|
-
rank: (e) =>
|
|
10037
|
+
rank: (e) => Ls(a, e)
|
|
10037
10038
|
};
|
|
10038
10039
|
}
|
|
10039
|
-
function
|
|
10040
|
-
return
|
|
10040
|
+
function Bs(e = !1, t) {
|
|
10041
|
+
return zs({
|
|
10041
10042
|
trackingNumber: t,
|
|
10042
10043
|
enablePostalNinja: e
|
|
10043
10044
|
}).sources;
|
|
10044
10045
|
}
|
|
10045
10046
|
//#endregion
|
|
10046
|
-
export {
|
|
10047
|
+
export { de as AMAZON_NUMBER_PATTERN, Se as AUTOMATIC_CARRIER_IDS, Ns as BROWSER_SOURCES, f as BudgetExceededError, x as CARRIERS, ce as CARRIER_CATALOG, y as CARRIER_DEFINITIONS, le as CARRIER_IDS, Ce as CARRIER_NAMES, t as CarrierError, a as ChallengeError, co as EXPLICIT_OFFSET_PATTERN, r as IndeterminateError, l as InputRequiredError, u as InvalidInputError, Yo as MAX_RECOGNITIONS, s as MaintenanceError, i as NoHistoryError, n as NotFoundError, o as RateLimitedError, je as SELECTABLE_CARRIERS, ue as STAGES, c as SchemaError, Ze as TRACKING_CANDIDATE_PATTERNS, we as TRACKING_LINK_RULES, d as TransportError, Ms as UNIVERSAL_SOURCES, m as UpstreamHttpError, ee as UpstreamNetworkError, be as activeRequirements, me as amazonMarketplace, he as amazonOrdersUrl, ge as amazonShippingOrigin, _e as amazonShippingUrl, Io as calendarDay, Ao as canadaProvinceTimeZone, ye as carrierAdapter, b as carrierDefinition, g as carrierErrorKind, Ae as carrierInfo, Te as carrierLinkRules, Me as carrierRequirements, ve as carrierTimezone, Bo as classifyStage, vt as classifyWording, wo as countryCode, To as countryTimeZone, ds as deliveryHandoff, Xe as detectCarrier, S as detectCarrierMatch, Po as epochMillisTime, Fo as epochSecondsTime, te as errorTypeOf, pt as eventPoint, uo as explicitOffsetTime, Go as failureHint, Wo as failureKind, oe as formatTrackingNumber, us as hasDirectHandoffAdapter, Vo as inferStage, fe as isAmazonTrackingNumber, ae as isPlanzerSharedTrackingNumber, Le as isValidCorreosSpainCheckLetter, We as isValidDhlExpressWaybill, Be as isValidDpdParcelNumber, He as isValidGlsParcelNumber, Ue as isValidHermesParcelNumber, ie as isValidMondialRelayBarcode, Ke as isValidPocztaPolskaBarcode, qe as isValidS10TrackingNumber, Ge as isValidTntConsignmentNumber, po as isoTime, tt as keywordNumberInText, _t as languageStageStatus, Fe as localizedCarrierUrl, Ee as matchesDomain, ho as mislabeledLocalTime, go as mislabeledWallTime, Ss as normalizeCarrierInputs, mt as normalizeCarrierResult, Cs as normalizeDeliveryPostcode, v as normalizeTrackingNumber, Rs as orderUniversalSources, st as parseTrackingInput, Fs as priorityUniversalSource, Xo as recognitionCandidates, Qo as recognizeAll, Qe as recognizedNumberInText, No as regionHasTown, xe as requiredRequirements, Ne as requirementSatisfied, pe as requiresAmazonAccount, Uo as resolveResult, zo as resultHasUpdate, Ro as resultStage, _ as retryAfterMsOf, yo as settleGuessedClocks, es as settleRecognition, _o as sharedClockZone, Ho as stageSource, Je as supportsSwissPostHandoff, Eo as timeZoneCountry, jo as townKey, gt as trackingLanguageStage, Oe as trackingLink, De as trackingNumberForLink, Pe as tracksAutomatically, zs as universalPlan, Ps as universalSourceBudget, Bs as universalSources, Oo as usStateTimeZone, se as validTrackingNumber, xs as validateDachserTrackingUrl, bs as validatePlanzerSharedUrl, yt as wordingStage, fo as zonedTime };
|