@feedmepos/mf-connect 0.1.0-beta.64 → 0.1.0-beta.65
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/{Analytic-B325EvdK.js → Analytic-BykZRzDs.js} +11 -11
- package/dist/{App-Cm-p4GBZ.js → App-DlJhQ-d7.js} +6 -6
- package/dist/{AuditLogs-Da6jqw_l.js → AuditLogs-D_Tj-hN5.js} +8 -8
- package/dist/{Bin-Cgxr39me.js → Bin-B9DIsHlV.js} +8 -8
- package/dist/{Broadcast-CR3YdMim.js → Broadcast-HujD0CH6.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJDw0QLZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B9KbyT0Z.js} +6 -6
- package/dist/{Card-CIlXJesR.js → Card-dEGuVh8Y.js} +15 -15
- package/dist/{Collections-Dkp13T6I.js → Collections-DLU_r242.js} +5 -5
- package/dist/{Credit-BL7s3TmG.js → Credit-DPxRywNS.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgKNPE7p.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BO7Zjzjn.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BTXLeEQV.js → EffectSheet.vue_vue_type_style_index_0_lang-CDCnlwRw.js} +6 -6
- package/dist/{Experience-Cr7c9Dmr.js → Experience-DbeeaSny.js} +9 -9
- package/dist/Game-DF-tRQmA.js +278 -0
- package/dist/{Index-D1DjHCn6.js → Index-D-Gl4vEU.js} +10 -10
- package/dist/{Marketing-RKv-hDji.js → Marketing-BVUn9m1D.js} +6 -6
- package/dist/{Member-BpE1hEHn.js → Member-DeAQPJ5c.js} +5 -5
- package/dist/{MemberList-D7LB9fXz.js → MemberList-CK3ItLYd.js} +24 -24
- package/dist/{MemberTransactions-BWHZqhcv.js → MemberTransactions-ChvkxttB.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DPnmbxWD.js → MessageInput.vue_vue_type_script_setup_true_lang-DJjiapX-.js} +8 -8
- package/dist/{Mission-CPNWKX0I.js → Mission-af0CLDdi.js} +117 -96
- package/dist/{Overview-DJels2bf.js → Overview-bE-CxDyW.js} +52 -52
- package/dist/{Point-PXjurF_w.js → Point-DMUJXRIW.js} +9 -9
- package/dist/{Promotion-CFFuDmX9.js → Promotion-C72ZIHQC.js} +10 -10
- package/dist/{Queue-C-0R9noT.js → Queue-BxVMOXfX.js} +19 -19
- package/dist/{Record-Cg3Uk_e0.js → Record-BTXkLR-X.js} +7 -7
- package/dist/{Reward-q3OH71kA.js → Reward-UtZnwyhC.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CTDa510y.js → RewardGroup.vue_vue_type_script_setup_true_lang-BBSqJfeS.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D6y3fXbd.js → RuleGroup.vue_vue_type_script_setup_true_lang-u9z-Uco-.js} +244 -241
- package/dist/{Segment-BUxi24U7.js → Segment-CsCYYgLL.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-xA3_GoYK.js → SelectItems.vue_vue_type_script_setup_true_lang-B7jbLxek.js} +2 -2
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-kBXjyEyt.js +186 -0
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKPEsDLl.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BVE_boAC.js} +3 -3
- package/dist/{Setting-Y3cUXNMQ.js → Setting-B1W1sMAI.js} +10 -10
- package/dist/{Store-DhwEmp-R.js → Store-DC3YkCuT.js} +18 -18
- package/dist/{StoreRewards-BWOMVEzb.js → StoreRewards-BLSf4yL5.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B7BAEEiB.js → StoreTransactions.vue_vue_type_script_setup_true_lang-7JAwsa6H.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C3K5UV1O.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bj7An5CY.js} +1 -1
- package/dist/{Tier-5sRNLSO1.js → Tier-DoGYPOK2.js} +19 -19
- package/dist/{Title-BwGfSgM4.js → Title-Dcg5_aiJ.js} +19 -19
- package/dist/{Transaction-BbIdqQsD.js → Transaction-DjzGqSTu.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-qNeUH0Gf.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CWv6o4xN.js} +6 -6
- package/dist/{Voucher-BvOxoMrH.js → Voucher-COtfsGvM.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BtazBTn_.js → VoucherEditor.vue_vue_type_script_setup_true_lang-tl9RMCof.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BWcX9cJf.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6abwK-T.js} +1 -1
- package/dist/{app-33F7lJW2.js → app-CTeqEkoa.js} +1 -1
- package/dist/{app-CoVaAkSk.js → app-SUKcprMq.js} +463 -453
- package/dist/app.js +1 -1
- package/dist/{business-BtgsuI9Z.js → business-DcFWQWQ_.js} +1 -1
- package/dist/{campaign-D6PH5eQ_.js → campaign-9l1-4E18.js} +9 -9
- package/dist/{campaign-GRjeK1WI.js → campaign-B1xMjgeN.js} +2 -2
- package/dist/{campaign.enum-KcUV41Ki.js → campaign.enum-BoBKGas3.js} +1 -1
- package/dist/{campaign.fn-DlaQfCnQ.js → campaign.fn-BuJQp7OR.js} +41 -41
- package/dist/{collectible.enum-D8QbCobD.js → collectible.enum-CBU_rAz2.js} +1 -1
- package/dist/{collection.fn-By3YQRv8.js → collection.fn-BzmzHuiA.js} +2 -2
- package/dist/{dto-CuPBd2H3.js → dto-BIamKujn.js} +4 -4
- package/dist/{effect-BokWNg14.js → effect-B-4TI9VM.js} +1 -1
- package/dist/{email-addresses-DE4qV3Eh.js → email-addresses-DEv8LE3V.js} +1 -1
- package/dist/{export-B8kx1Nmt.js → export-FypV374Y.js} +3 -3
- package/dist/{helper-COmipb68.js → helper-ByX6M5s_.js} +1 -1
- package/dist/{index-DKqP75Bm.js → index--ljh_arC.js} +1 -1
- package/dist/{index-DiTg_x8h.js → index-B0wqzS6z.js} +1 -1
- package/dist/{index-BNKBRRdT.js → index-BsGmEByl.js} +1 -1
- package/dist/{index-BtjSlXEc.js → index-C3R1PpLs.js} +1 -1
- package/dist/{index-BtzXDz7E.js → index-COs3r3yx.js} +1 -1
- package/dist/{index-Bk9xhO-D.js → index-CcJqawSD.js} +1 -1
- package/dist/{index-DHw_2WuP.js → index-CdMXuKzu.js} +3 -3
- package/dist/{index-SzOkDo2y.js → index-DHt_xUTS.js} +3 -3
- package/dist/index-DgkJMGFX.js +73912 -0
- package/dist/{index-8CMfJmg3.js → index-YmukhZFD.js} +82 -76
- package/dist/{index-CQct2DL8.js → index-uf-Xzbbb.js} +1 -1
- package/dist/{index-esK00bm6.js → index-wKj9Jq_Y.js} +2 -2
- package/dist/{index.esm2017-IwuN8acP.js → index.esm2017-D2ty8PoZ.js} +1 -1
- package/dist/{loading-BWW2Z1X0.js → loading-BkexxRvP.js} +1 -1
- package/dist/{membership-CJK6mxff.js → membership-DSvm3lCf.js} +3 -3
- package/dist/{money-DDs_MtN7.js → money-BWtCy3GX.js} +1 -1
- package/dist/{number-pF7bUUUj.js → number-DeIIxnKB.js} +1 -1
- package/dist/{objectid-Bjt4ojTL.js → objectid-5Cs5ddrm.js} +1 -1
- package/dist/{plugins-BsO39OJE.js → plugins-BovoaCMv.js} +6 -4
- package/dist/{reward-2pJnAigN.js → reward-C3FKPfvO.js} +1 -1
- package/dist/{rule-builder-DlCdj9oR.js → rule-builder-_n-2bDtG.js} +1 -1
- package/dist/{rule-DxWfHg0z.js → rule-bx6kGPEY.js} +8 -4
- package/dist/{template-DDGHUxfa.js → template-DCacwacU.js} +4 -4
- package/dist/{trigger-DQxt8ZNb.js → trigger-DkTKCHNq.js} +11 -11
- package/dist/{user-C0hkkvCd.js → user-yXVKLZVM.js} +1 -1
- package/dist/{vue-i18n-BrZbqfu6.js → vue-i18n-bpwKTYQc.js} +248 -248
- package/dist/{xlsx-CzvLdaX-.js → xlsx-CyCSR0F9.js} +1 -1
- package/package.json +1 -1
- package/dist/Game-qBiDfoX8.js +0 -257
- package/dist/index-DBqFcTrv.js +0 -2179
|
@@ -82,6 +82,7 @@ const Pe = {
|
|
|
82
82
|
},
|
|
83
83
|
campaign: {
|
|
84
84
|
common: {
|
|
85
|
+
campaign: "Campaign",
|
|
85
86
|
createCampaign: "Create campaign",
|
|
86
87
|
search: "search",
|
|
87
88
|
location: "Location: ",
|
|
@@ -893,6 +894,15 @@ const Pe = {
|
|
|
893
894
|
},
|
|
894
895
|
queue: {
|
|
895
896
|
title: "Queue"
|
|
897
|
+
},
|
|
898
|
+
sendCollectionSheet: {
|
|
899
|
+
title: "Send {type}",
|
|
900
|
+
select_members: "Select member",
|
|
901
|
+
amount: "Amount",
|
|
902
|
+
reference: "Reference",
|
|
903
|
+
confirmation_message: "Are you sure you want to send {amount} {type} to {memberName}? This action cannot be reversed.",
|
|
904
|
+
stamp: "Stamp",
|
|
905
|
+
game_token: "Game Token"
|
|
896
906
|
}
|
|
897
907
|
}, Le = {
|
|
898
908
|
invalid_type: "Expected {{expected}}, received {{received}}",
|
|
@@ -3811,44 +3821,44 @@ const Pe = {
|
|
|
3811
3821
|
connectZodCustom: We
|
|
3812
3822
|
};
|
|
3813
3823
|
var x;
|
|
3814
|
-
(function(
|
|
3815
|
-
|
|
3824
|
+
(function(n) {
|
|
3825
|
+
n.assertEqual = (a) => a;
|
|
3816
3826
|
function e(a) {
|
|
3817
3827
|
}
|
|
3818
|
-
|
|
3828
|
+
n.assertIs = e;
|
|
3819
3829
|
function t(a) {
|
|
3820
3830
|
throw new Error();
|
|
3821
3831
|
}
|
|
3822
|
-
|
|
3832
|
+
n.assertNever = t, n.arrayToEnum = (a) => {
|
|
3823
3833
|
const r = {};
|
|
3824
3834
|
for (const s of a)
|
|
3825
3835
|
r[s] = s;
|
|
3826
3836
|
return r;
|
|
3827
|
-
},
|
|
3828
|
-
const r =
|
|
3837
|
+
}, n.getValidEnumValues = (a) => {
|
|
3838
|
+
const r = n.objectKeys(a).filter((o) => typeof a[a[o]] != "number"), s = {};
|
|
3829
3839
|
for (const o of r)
|
|
3830
3840
|
s[o] = a[o];
|
|
3831
|
-
return
|
|
3832
|
-
},
|
|
3841
|
+
return n.objectValues(s);
|
|
3842
|
+
}, n.objectValues = (a) => n.objectKeys(a).map(function(r) {
|
|
3833
3843
|
return a[r];
|
|
3834
|
-
}),
|
|
3844
|
+
}), n.objectKeys = typeof Object.keys == "function" ? (a) => Object.keys(a) : (a) => {
|
|
3835
3845
|
const r = [];
|
|
3836
3846
|
for (const s in a)
|
|
3837
3847
|
Object.prototype.hasOwnProperty.call(a, s) && r.push(s);
|
|
3838
3848
|
return r;
|
|
3839
|
-
},
|
|
3849
|
+
}, n.find = (a, r) => {
|
|
3840
3850
|
for (const s of a)
|
|
3841
3851
|
if (r(s))
|
|
3842
3852
|
return s;
|
|
3843
|
-
},
|
|
3844
|
-
function
|
|
3853
|
+
}, n.isInteger = typeof Number.isInteger == "function" ? (a) => Number.isInteger(a) : (a) => typeof a == "number" && isFinite(a) && Math.floor(a) === a;
|
|
3854
|
+
function i(a, r = " | ") {
|
|
3845
3855
|
return a.map((s) => typeof s == "string" ? `'${s}'` : s).join(r);
|
|
3846
3856
|
}
|
|
3847
|
-
|
|
3857
|
+
n.joinValues = i, n.jsonStringifyReplacer = (a, r) => typeof r == "bigint" ? r.toString() : r;
|
|
3848
3858
|
})(x || (x = {}));
|
|
3849
3859
|
var be;
|
|
3850
|
-
(function(
|
|
3851
|
-
|
|
3860
|
+
(function(n) {
|
|
3861
|
+
n.mergeShapes = (e, t) => ({
|
|
3852
3862
|
...e,
|
|
3853
3863
|
...t
|
|
3854
3864
|
// second overwrites first
|
|
@@ -3875,14 +3885,14 @@ const l = x.arrayToEnum([
|
|
|
3875
3885
|
"never",
|
|
3876
3886
|
"map",
|
|
3877
3887
|
"set"
|
|
3878
|
-
]), j = (
|
|
3879
|
-
switch (typeof
|
|
3888
|
+
]), j = (n) => {
|
|
3889
|
+
switch (typeof n) {
|
|
3880
3890
|
case "undefined":
|
|
3881
3891
|
return l.undefined;
|
|
3882
3892
|
case "string":
|
|
3883
3893
|
return l.string;
|
|
3884
3894
|
case "number":
|
|
3885
|
-
return isNaN(
|
|
3895
|
+
return isNaN(n) ? l.nan : l.number;
|
|
3886
3896
|
case "boolean":
|
|
3887
3897
|
return l.boolean;
|
|
3888
3898
|
case "function":
|
|
@@ -3892,7 +3902,7 @@ const l = x.arrayToEnum([
|
|
|
3892
3902
|
case "symbol":
|
|
3893
3903
|
return l.symbol;
|
|
3894
3904
|
case "object":
|
|
3895
|
-
return Array.isArray(
|
|
3905
|
+
return Array.isArray(n) ? l.array : n === null ? l.null : n.then && typeof n.then == "function" && n.catch && typeof n.catch == "function" ? l.promise : typeof Map < "u" && n instanceof Map ? l.map : typeof Set < "u" && n instanceof Set ? l.set : typeof Date < "u" && n instanceof Date ? l.date : l.object;
|
|
3896
3906
|
default:
|
|
3897
3907
|
return l.unknown;
|
|
3898
3908
|
}
|
|
@@ -3913,13 +3923,13 @@ const l = x.arrayToEnum([
|
|
|
3913
3923
|
"invalid_intersection_types",
|
|
3914
3924
|
"not_multiple_of",
|
|
3915
3925
|
"not_finite"
|
|
3916
|
-
]), Fe = (
|
|
3926
|
+
]), Fe = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
3917
3927
|
class E extends Error {
|
|
3918
3928
|
constructor(e) {
|
|
3919
|
-
super(), this.issues = [], this.addIssue = (
|
|
3920
|
-
this.issues = [...this.issues,
|
|
3921
|
-
}, this.addIssues = (
|
|
3922
|
-
this.issues = [...this.issues, ...
|
|
3929
|
+
super(), this.issues = [], this.addIssue = (i) => {
|
|
3930
|
+
this.issues = [...this.issues, i];
|
|
3931
|
+
}, this.addIssues = (i = []) => {
|
|
3932
|
+
this.issues = [...this.issues, ...i];
|
|
3923
3933
|
};
|
|
3924
3934
|
const t = new.target.prototype;
|
|
3925
3935
|
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
@@ -3930,7 +3940,7 @@ class E extends Error {
|
|
|
3930
3940
|
format(e) {
|
|
3931
3941
|
const t = e || function(r) {
|
|
3932
3942
|
return r.message;
|
|
3933
|
-
},
|
|
3943
|
+
}, i = { _errors: [] }, a = (r) => {
|
|
3934
3944
|
for (const s of r.issues)
|
|
3935
3945
|
if (s.code === "invalid_union")
|
|
3936
3946
|
s.unionErrors.map(a);
|
|
@@ -3939,16 +3949,16 @@ class E extends Error {
|
|
|
3939
3949
|
else if (s.code === "invalid_arguments")
|
|
3940
3950
|
a(s.argumentsError);
|
|
3941
3951
|
else if (s.path.length === 0)
|
|
3942
|
-
|
|
3952
|
+
i._errors.push(t(s));
|
|
3943
3953
|
else {
|
|
3944
|
-
let o =
|
|
3954
|
+
let o = i, m = 0;
|
|
3945
3955
|
for (; m < s.path.length; ) {
|
|
3946
3956
|
const d = s.path[m];
|
|
3947
3957
|
m === s.path.length - 1 ? (o[d] = o[d] || { _errors: [] }, o[d]._errors.push(t(s))) : o[d] = o[d] || { _errors: [] }, o = o[d], m++;
|
|
3948
3958
|
}
|
|
3949
3959
|
}
|
|
3950
3960
|
};
|
|
3951
|
-
return a(this),
|
|
3961
|
+
return a(this), i;
|
|
3952
3962
|
}
|
|
3953
3963
|
toString() {
|
|
3954
3964
|
return this.message;
|
|
@@ -3960,36 +3970,36 @@ class E extends Error {
|
|
|
3960
3970
|
return this.issues.length === 0;
|
|
3961
3971
|
}
|
|
3962
3972
|
flatten(e = (t) => t.message) {
|
|
3963
|
-
const t = {},
|
|
3973
|
+
const t = {}, i = [];
|
|
3964
3974
|
for (const a of this.issues)
|
|
3965
|
-
a.path.length > 0 ? (t[a.path[0]] = t[a.path[0]] || [], t[a.path[0]].push(e(a))) :
|
|
3966
|
-
return { formErrors:
|
|
3975
|
+
a.path.length > 0 ? (t[a.path[0]] = t[a.path[0]] || [], t[a.path[0]].push(e(a))) : i.push(e(a));
|
|
3976
|
+
return { formErrors: i, fieldErrors: t };
|
|
3967
3977
|
}
|
|
3968
3978
|
get formErrors() {
|
|
3969
3979
|
return this.flatten();
|
|
3970
3980
|
}
|
|
3971
3981
|
}
|
|
3972
|
-
E.create = (
|
|
3973
|
-
const F = (
|
|
3982
|
+
E.create = (n) => new E(n);
|
|
3983
|
+
const F = (n, e) => {
|
|
3974
3984
|
let t;
|
|
3975
|
-
switch (
|
|
3985
|
+
switch (n.code) {
|
|
3976
3986
|
case c.invalid_type:
|
|
3977
|
-
|
|
3987
|
+
n.received === l.undefined ? t = "Required" : t = `Expected ${n.expected}, received ${n.received}`;
|
|
3978
3988
|
break;
|
|
3979
3989
|
case c.invalid_literal:
|
|
3980
|
-
t = `Invalid literal value, expected ${JSON.stringify(
|
|
3990
|
+
t = `Invalid literal value, expected ${JSON.stringify(n.expected, x.jsonStringifyReplacer)}`;
|
|
3981
3991
|
break;
|
|
3982
3992
|
case c.unrecognized_keys:
|
|
3983
|
-
t = `Unrecognized key(s) in object: ${x.joinValues(
|
|
3993
|
+
t = `Unrecognized key(s) in object: ${x.joinValues(n.keys, ", ")}`;
|
|
3984
3994
|
break;
|
|
3985
3995
|
case c.invalid_union:
|
|
3986
3996
|
t = "Invalid input";
|
|
3987
3997
|
break;
|
|
3988
3998
|
case c.invalid_union_discriminator:
|
|
3989
|
-
t = `Invalid discriminator value. Expected ${x.joinValues(
|
|
3999
|
+
t = `Invalid discriminator value. Expected ${x.joinValues(n.options)}`;
|
|
3990
4000
|
break;
|
|
3991
4001
|
case c.invalid_enum_value:
|
|
3992
|
-
t = `Invalid enum value. Expected ${x.joinValues(
|
|
4002
|
+
t = `Invalid enum value. Expected ${x.joinValues(n.options)}, received '${n.received}'`;
|
|
3993
4003
|
break;
|
|
3994
4004
|
case c.invalid_arguments:
|
|
3995
4005
|
t = "Invalid function arguments";
|
|
@@ -4001,13 +4011,13 @@ const F = (i, e) => {
|
|
|
4001
4011
|
t = "Invalid date";
|
|
4002
4012
|
break;
|
|
4003
4013
|
case c.invalid_string:
|
|
4004
|
-
typeof
|
|
4014
|
+
typeof n.validation == "object" ? "includes" in n.validation ? (t = `Invalid input: must include "${n.validation.includes}"`, typeof n.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${n.validation.position}`)) : "startsWith" in n.validation ? t = `Invalid input: must start with "${n.validation.startsWith}"` : "endsWith" in n.validation ? t = `Invalid input: must end with "${n.validation.endsWith}"` : x.assertNever(n.validation) : n.validation !== "regex" ? t = `Invalid ${n.validation}` : t = "Invalid";
|
|
4005
4015
|
break;
|
|
4006
4016
|
case c.too_small:
|
|
4007
|
-
|
|
4017
|
+
n.type === "array" ? t = `Array must contain ${n.exact ? "exactly" : n.inclusive ? "at least" : "more than"} ${n.minimum} element(s)` : n.type === "string" ? t = `String must contain ${n.exact ? "exactly" : n.inclusive ? "at least" : "over"} ${n.minimum} character(s)` : n.type === "number" ? t = `Number must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${n.minimum}` : n.type === "date" ? t = `Date must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(n.minimum))}` : t = "Invalid input";
|
|
4008
4018
|
break;
|
|
4009
4019
|
case c.too_big:
|
|
4010
|
-
|
|
4020
|
+
n.type === "array" ? t = `Array must contain ${n.exact ? "exactly" : n.inclusive ? "at most" : "less than"} ${n.maximum} element(s)` : n.type === "string" ? t = `String must contain ${n.exact ? "exactly" : n.inclusive ? "at most" : "under"} ${n.maximum} character(s)` : n.type === "number" ? t = `Number must be ${n.exact ? "exactly" : n.inclusive ? "less than or equal to" : "less than"} ${n.maximum}` : n.type === "bigint" ? t = `BigInt must be ${n.exact ? "exactly" : n.inclusive ? "less than or equal to" : "less than"} ${n.maximum}` : n.type === "date" ? t = `Date must be ${n.exact ? "exactly" : n.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(n.maximum))}` : t = "Invalid input";
|
|
4011
4021
|
break;
|
|
4012
4022
|
case c.custom:
|
|
4013
4023
|
t = "Invalid input";
|
|
@@ -4016,30 +4026,30 @@ const F = (i, e) => {
|
|
|
4016
4026
|
t = "Intersection results could not be merged";
|
|
4017
4027
|
break;
|
|
4018
4028
|
case c.not_multiple_of:
|
|
4019
|
-
t = `Number must be a multiple of ${
|
|
4029
|
+
t = `Number must be a multiple of ${n.multipleOf}`;
|
|
4020
4030
|
break;
|
|
4021
4031
|
case c.not_finite:
|
|
4022
4032
|
t = "Number must be finite";
|
|
4023
4033
|
break;
|
|
4024
4034
|
default:
|
|
4025
|
-
t = e.defaultError, x.assertNever(
|
|
4035
|
+
t = e.defaultError, x.assertNever(n);
|
|
4026
4036
|
}
|
|
4027
4037
|
return { message: t };
|
|
4028
4038
|
};
|
|
4029
4039
|
let ke = F;
|
|
4030
|
-
function He(
|
|
4031
|
-
ke =
|
|
4040
|
+
function He(n) {
|
|
4041
|
+
ke = n;
|
|
4032
4042
|
}
|
|
4033
4043
|
function ce() {
|
|
4034
4044
|
return ke;
|
|
4035
4045
|
}
|
|
4036
|
-
const de = (
|
|
4037
|
-
const { data: e, path: t, errorMaps:
|
|
4046
|
+
const de = (n) => {
|
|
4047
|
+
const { data: e, path: t, errorMaps: i, issueData: a } = n, r = [...t, ...a.path || []], s = {
|
|
4038
4048
|
...a,
|
|
4039
4049
|
path: r
|
|
4040
4050
|
};
|
|
4041
4051
|
let o = "";
|
|
4042
|
-
const m =
|
|
4052
|
+
const m = i.filter((d) => !!d).slice().reverse();
|
|
4043
4053
|
for (const d of m)
|
|
4044
4054
|
o = d(s, { data: e, defaultError: o }).message;
|
|
4045
4055
|
return {
|
|
@@ -4048,20 +4058,20 @@ const de = (i) => {
|
|
|
4048
4058
|
message: a.message || o
|
|
4049
4059
|
};
|
|
4050
4060
|
}, Je = [];
|
|
4051
|
-
function u(
|
|
4061
|
+
function u(n, e) {
|
|
4052
4062
|
const t = de({
|
|
4053
4063
|
issueData: e,
|
|
4054
|
-
data:
|
|
4055
|
-
path:
|
|
4064
|
+
data: n.data,
|
|
4065
|
+
path: n.path,
|
|
4056
4066
|
errorMaps: [
|
|
4057
|
-
|
|
4058
|
-
|
|
4067
|
+
n.common.contextualErrorMap,
|
|
4068
|
+
n.schemaErrorMap,
|
|
4059
4069
|
ce(),
|
|
4060
4070
|
F
|
|
4061
4071
|
// then global default map
|
|
4062
|
-
].filter((
|
|
4072
|
+
].filter((i) => !!i)
|
|
4063
4073
|
});
|
|
4064
|
-
|
|
4074
|
+
n.common.issues.push(t);
|
|
4065
4075
|
}
|
|
4066
4076
|
class R {
|
|
4067
4077
|
constructor() {
|
|
@@ -4074,71 +4084,71 @@ class R {
|
|
|
4074
4084
|
this.value !== "aborted" && (this.value = "aborted");
|
|
4075
4085
|
}
|
|
4076
4086
|
static mergeArray(e, t) {
|
|
4077
|
-
const
|
|
4087
|
+
const i = [];
|
|
4078
4088
|
for (const a of t) {
|
|
4079
4089
|
if (a.status === "aborted")
|
|
4080
4090
|
return _;
|
|
4081
|
-
a.status === "dirty" && e.dirty(),
|
|
4091
|
+
a.status === "dirty" && e.dirty(), i.push(a.value);
|
|
4082
4092
|
}
|
|
4083
|
-
return { status: e.value, value:
|
|
4093
|
+
return { status: e.value, value: i };
|
|
4084
4094
|
}
|
|
4085
4095
|
static async mergeObjectAsync(e, t) {
|
|
4086
|
-
const
|
|
4096
|
+
const i = [];
|
|
4087
4097
|
for (const a of t)
|
|
4088
|
-
|
|
4098
|
+
i.push({
|
|
4089
4099
|
key: await a.key,
|
|
4090
4100
|
value: await a.value
|
|
4091
4101
|
});
|
|
4092
|
-
return R.mergeObjectSync(e,
|
|
4102
|
+
return R.mergeObjectSync(e, i);
|
|
4093
4103
|
}
|
|
4094
4104
|
static mergeObjectSync(e, t) {
|
|
4095
|
-
const
|
|
4105
|
+
const i = {};
|
|
4096
4106
|
for (const a of t) {
|
|
4097
4107
|
const { key: r, value: s } = a;
|
|
4098
4108
|
if (r.status === "aborted" || s.status === "aborted")
|
|
4099
4109
|
return _;
|
|
4100
|
-
r.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof s.value < "u" || a.alwaysSet) && (
|
|
4110
|
+
r.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof s.value < "u" || a.alwaysSet) && (i[r.value] = s.value);
|
|
4101
4111
|
}
|
|
4102
|
-
return { status: e.value, value:
|
|
4112
|
+
return { status: e.value, value: i };
|
|
4103
4113
|
}
|
|
4104
4114
|
}
|
|
4105
4115
|
const _ = Object.freeze({
|
|
4106
4116
|
status: "aborted"
|
|
4107
|
-
}), Se = (
|
|
4117
|
+
}), Se = (n) => ({ status: "dirty", value: n }), k = (n) => ({ status: "valid", value: n }), xe = (n) => n.status === "aborted", we = (n) => n.status === "dirty", H = (n) => n.status === "valid", le = (n) => typeof Promise < "u" && n instanceof Promise;
|
|
4108
4118
|
var p;
|
|
4109
|
-
(function(
|
|
4110
|
-
|
|
4119
|
+
(function(n) {
|
|
4120
|
+
n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
4111
4121
|
})(p || (p = {}));
|
|
4112
4122
|
class M {
|
|
4113
|
-
constructor(e, t,
|
|
4114
|
-
this._cachedPath = [], this.parent = e, this.data = t, this._path =
|
|
4123
|
+
constructor(e, t, i, a) {
|
|
4124
|
+
this._cachedPath = [], this.parent = e, this.data = t, this._path = i, this._key = a;
|
|
4115
4125
|
}
|
|
4116
4126
|
get path() {
|
|
4117
4127
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
4118
4128
|
}
|
|
4119
4129
|
}
|
|
4120
|
-
const Ce = (
|
|
4130
|
+
const Ce = (n, e) => {
|
|
4121
4131
|
if (H(e))
|
|
4122
4132
|
return { success: !0, data: e.value };
|
|
4123
|
-
if (!
|
|
4133
|
+
if (!n.common.issues.length)
|
|
4124
4134
|
throw new Error("Validation failed but no issues detected.");
|
|
4125
4135
|
return {
|
|
4126
4136
|
success: !1,
|
|
4127
4137
|
get error() {
|
|
4128
4138
|
if (this._error)
|
|
4129
4139
|
return this._error;
|
|
4130
|
-
const t = new E(
|
|
4140
|
+
const t = new E(n.common.issues);
|
|
4131
4141
|
return this._error = t, this._error;
|
|
4132
4142
|
}
|
|
4133
4143
|
};
|
|
4134
4144
|
};
|
|
4135
|
-
function g(
|
|
4136
|
-
if (!
|
|
4145
|
+
function g(n) {
|
|
4146
|
+
if (!n)
|
|
4137
4147
|
return {};
|
|
4138
|
-
const { errorMap: e, invalid_type_error: t, required_error:
|
|
4139
|
-
if (e && (t ||
|
|
4148
|
+
const { errorMap: e, invalid_type_error: t, required_error: i, description: a } = n;
|
|
4149
|
+
if (e && (t || i))
|
|
4140
4150
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
4141
|
-
return e ? { errorMap: e, description: a } : { errorMap: (s, o) => s.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message:
|
|
4151
|
+
return e ? { errorMap: e, description: a } : { errorMap: (s, o) => s.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message: i ?? o.defaultError } : { message: t ?? o.defaultError }, description: a };
|
|
4142
4152
|
}
|
|
4143
4153
|
class v {
|
|
4144
4154
|
constructor(e) {
|
|
@@ -4184,17 +4194,17 @@ class v {
|
|
|
4184
4194
|
return Promise.resolve(t);
|
|
4185
4195
|
}
|
|
4186
4196
|
parse(e, t) {
|
|
4187
|
-
const
|
|
4188
|
-
if (
|
|
4189
|
-
return
|
|
4190
|
-
throw
|
|
4197
|
+
const i = this.safeParse(e, t);
|
|
4198
|
+
if (i.success)
|
|
4199
|
+
return i.data;
|
|
4200
|
+
throw i.error;
|
|
4191
4201
|
}
|
|
4192
4202
|
safeParse(e, t) {
|
|
4193
|
-
var
|
|
4203
|
+
var i;
|
|
4194
4204
|
const a = {
|
|
4195
4205
|
common: {
|
|
4196
4206
|
issues: [],
|
|
4197
|
-
async: (
|
|
4207
|
+
async: (i = t == null ? void 0 : t.async) !== null && i !== void 0 ? i : !1,
|
|
4198
4208
|
contextualErrorMap: t == null ? void 0 : t.errorMap
|
|
4199
4209
|
},
|
|
4200
4210
|
path: (t == null ? void 0 : t.path) || [],
|
|
@@ -4206,13 +4216,13 @@ class v {
|
|
|
4206
4216
|
return Ce(a, r);
|
|
4207
4217
|
}
|
|
4208
4218
|
async parseAsync(e, t) {
|
|
4209
|
-
const
|
|
4210
|
-
if (
|
|
4211
|
-
return
|
|
4212
|
-
throw
|
|
4219
|
+
const i = await this.safeParseAsync(e, t);
|
|
4220
|
+
if (i.success)
|
|
4221
|
+
return i.data;
|
|
4222
|
+
throw i.error;
|
|
4213
4223
|
}
|
|
4214
4224
|
async safeParseAsync(e, t) {
|
|
4215
|
-
const
|
|
4225
|
+
const i = {
|
|
4216
4226
|
common: {
|
|
4217
4227
|
issues: [],
|
|
4218
4228
|
contextualErrorMap: t == null ? void 0 : t.errorMap,
|
|
@@ -4223,21 +4233,21 @@ class v {
|
|
|
4223
4233
|
parent: null,
|
|
4224
4234
|
data: e,
|
|
4225
4235
|
parsedType: j(e)
|
|
4226
|
-
}, a = this._parse({ data: e, path:
|
|
4227
|
-
return Ce(
|
|
4236
|
+
}, a = this._parse({ data: e, path: i.path, parent: i }), r = await (le(a) ? a : Promise.resolve(a));
|
|
4237
|
+
return Ce(i, r);
|
|
4228
4238
|
}
|
|
4229
4239
|
refine(e, t) {
|
|
4230
|
-
const
|
|
4240
|
+
const i = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
|
|
4231
4241
|
return this._refinement((a, r) => {
|
|
4232
4242
|
const s = e(a), o = () => r.addIssue({
|
|
4233
4243
|
code: c.custom,
|
|
4234
|
-
...
|
|
4244
|
+
...i(a)
|
|
4235
4245
|
});
|
|
4236
4246
|
return typeof Promise < "u" && s instanceof Promise ? s.then((m) => m ? !0 : (o(), !1)) : s ? !0 : (o(), !1);
|
|
4237
4247
|
});
|
|
4238
4248
|
}
|
|
4239
4249
|
refinement(e, t) {
|
|
4240
|
-
return this._refinement((
|
|
4250
|
+
return this._refinement((i, a) => e(i) ? !0 : (a.addIssue(typeof t == "function" ? t(i, a) : t), !1));
|
|
4241
4251
|
}
|
|
4242
4252
|
_refinement(e) {
|
|
4243
4253
|
return new I({
|
|
@@ -4323,11 +4333,11 @@ class v {
|
|
|
4323
4333
|
return this.safeParse(null).success;
|
|
4324
4334
|
}
|
|
4325
4335
|
}
|
|
4326
|
-
const Qe = /^c[^\s-]{8,}$/i, Xe = /^[a-z][a-z0-9]*$/, Ke = /^[0-9A-HJKMNP-TV-Z]{26}$/, et = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, tt = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,
|
|
4336
|
+
const Qe = /^c[^\s-]{8,}$/i, Xe = /^[a-z][a-z0-9]*$/, Ke = /^[0-9A-HJKMNP-TV-Z]{26}$/, et = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, tt = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, nt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
4327
4337
|
let ye;
|
|
4328
|
-
const
|
|
4329
|
-
function st(
|
|
4330
|
-
return !!((e === "v4" || !e) &&
|
|
4338
|
+
const it = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, at = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, rt = (n) => n.precision ? n.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}Z$`) : n.precision === 0 ? n.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : n.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
4339
|
+
function st(n, e) {
|
|
4340
|
+
return !!((e === "v4" || !e) && it.test(n) || (e === "v6" || !e) && at.test(n));
|
|
4331
4341
|
}
|
|
4332
4342
|
class A extends v {
|
|
4333
4343
|
_parse(e) {
|
|
@@ -4343,7 +4353,7 @@ class A extends v {
|
|
|
4343
4353
|
//
|
|
4344
4354
|
), _;
|
|
4345
4355
|
}
|
|
4346
|
-
const
|
|
4356
|
+
const i = new R();
|
|
4347
4357
|
let a;
|
|
4348
4358
|
for (const r of this._def.checks)
|
|
4349
4359
|
if (r.kind === "min")
|
|
@@ -4354,7 +4364,7 @@ class A extends v {
|
|
|
4354
4364
|
inclusive: !0,
|
|
4355
4365
|
exact: !1,
|
|
4356
4366
|
message: r.message
|
|
4357
|
-
}),
|
|
4367
|
+
}), i.dirty());
|
|
4358
4368
|
else if (r.kind === "max")
|
|
4359
4369
|
e.data.length > r.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4360
4370
|
code: c.too_big,
|
|
@@ -4363,7 +4373,7 @@ class A extends v {
|
|
|
4363
4373
|
inclusive: !0,
|
|
4364
4374
|
exact: !1,
|
|
4365
4375
|
message: r.message
|
|
4366
|
-
}),
|
|
4376
|
+
}), i.dirty());
|
|
4367
4377
|
else if (r.kind === "length") {
|
|
4368
4378
|
const s = e.data.length > r.value, o = e.data.length < r.value;
|
|
4369
4379
|
(s || o) && (a = this._getOrReturnCtx(e, a), s ? u(a, {
|
|
@@ -4380,43 +4390,43 @@ class A extends v {
|
|
|
4380
4390
|
inclusive: !0,
|
|
4381
4391
|
exact: !0,
|
|
4382
4392
|
message: r.message
|
|
4383
|
-
}),
|
|
4393
|
+
}), i.dirty());
|
|
4384
4394
|
} else if (r.kind === "email")
|
|
4385
4395
|
tt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4386
4396
|
validation: "email",
|
|
4387
4397
|
code: c.invalid_string,
|
|
4388
4398
|
message: r.message
|
|
4389
|
-
}),
|
|
4399
|
+
}), i.dirty());
|
|
4390
4400
|
else if (r.kind === "emoji")
|
|
4391
|
-
ye || (ye = new RegExp(
|
|
4401
|
+
ye || (ye = new RegExp(nt, "u")), ye.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4392
4402
|
validation: "emoji",
|
|
4393
4403
|
code: c.invalid_string,
|
|
4394
4404
|
message: r.message
|
|
4395
|
-
}),
|
|
4405
|
+
}), i.dirty());
|
|
4396
4406
|
else if (r.kind === "uuid")
|
|
4397
4407
|
et.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4398
4408
|
validation: "uuid",
|
|
4399
4409
|
code: c.invalid_string,
|
|
4400
4410
|
message: r.message
|
|
4401
|
-
}),
|
|
4411
|
+
}), i.dirty());
|
|
4402
4412
|
else if (r.kind === "cuid")
|
|
4403
4413
|
Qe.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4404
4414
|
validation: "cuid",
|
|
4405
4415
|
code: c.invalid_string,
|
|
4406
4416
|
message: r.message
|
|
4407
|
-
}),
|
|
4417
|
+
}), i.dirty());
|
|
4408
4418
|
else if (r.kind === "cuid2")
|
|
4409
4419
|
Xe.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4410
4420
|
validation: "cuid2",
|
|
4411
4421
|
code: c.invalid_string,
|
|
4412
4422
|
message: r.message
|
|
4413
|
-
}),
|
|
4423
|
+
}), i.dirty());
|
|
4414
4424
|
else if (r.kind === "ulid")
|
|
4415
4425
|
Ke.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4416
4426
|
validation: "ulid",
|
|
4417
4427
|
code: c.invalid_string,
|
|
4418
4428
|
message: r.message
|
|
4419
|
-
}),
|
|
4429
|
+
}), i.dirty());
|
|
4420
4430
|
else if (r.kind === "url")
|
|
4421
4431
|
try {
|
|
4422
4432
|
new URL(e.data);
|
|
@@ -4425,40 +4435,40 @@ class A extends v {
|
|
|
4425
4435
|
validation: "url",
|
|
4426
4436
|
code: c.invalid_string,
|
|
4427
4437
|
message: r.message
|
|
4428
|
-
}),
|
|
4438
|
+
}), i.dirty();
|
|
4429
4439
|
}
|
|
4430
4440
|
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4431
4441
|
validation: "regex",
|
|
4432
4442
|
code: c.invalid_string,
|
|
4433
4443
|
message: r.message
|
|
4434
|
-
}),
|
|
4444
|
+
}), i.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4435
4445
|
code: c.invalid_string,
|
|
4436
4446
|
validation: { includes: r.value, position: r.position },
|
|
4437
4447
|
message: r.message
|
|
4438
|
-
}),
|
|
4448
|
+
}), i.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4439
4449
|
code: c.invalid_string,
|
|
4440
4450
|
validation: { startsWith: r.value },
|
|
4441
4451
|
message: r.message
|
|
4442
|
-
}),
|
|
4452
|
+
}), i.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4443
4453
|
code: c.invalid_string,
|
|
4444
4454
|
validation: { endsWith: r.value },
|
|
4445
4455
|
message: r.message
|
|
4446
|
-
}),
|
|
4456
|
+
}), i.dirty()) : r.kind === "datetime" ? rt(r).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4447
4457
|
code: c.invalid_string,
|
|
4448
4458
|
validation: "datetime",
|
|
4449
4459
|
message: r.message
|
|
4450
|
-
}),
|
|
4460
|
+
}), i.dirty()) : r.kind === "ip" ? st(e.data, r.version) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4451
4461
|
validation: "ip",
|
|
4452
4462
|
code: c.invalid_string,
|
|
4453
4463
|
message: r.message
|
|
4454
|
-
}),
|
|
4455
|
-
return { status:
|
|
4464
|
+
}), i.dirty()) : x.assertNever(r);
|
|
4465
|
+
return { status: i.value, value: e.data };
|
|
4456
4466
|
}
|
|
4457
|
-
_regex(e, t,
|
|
4467
|
+
_regex(e, t, i) {
|
|
4458
4468
|
return this.refinement((a) => e.test(a), {
|
|
4459
4469
|
validation: t,
|
|
4460
4470
|
code: c.invalid_string,
|
|
4461
|
-
...p.errToObj(
|
|
4471
|
+
...p.errToObj(i)
|
|
4462
4472
|
});
|
|
4463
4473
|
}
|
|
4464
4474
|
_addCheck(e) {
|
|
@@ -4620,17 +4630,17 @@ class A extends v {
|
|
|
4620
4630
|
return e;
|
|
4621
4631
|
}
|
|
4622
4632
|
}
|
|
4623
|
-
A.create = (
|
|
4633
|
+
A.create = (n) => {
|
|
4624
4634
|
var e;
|
|
4625
4635
|
return new A({
|
|
4626
4636
|
checks: [],
|
|
4627
4637
|
typeName: f.ZodString,
|
|
4628
|
-
coerce: (e =
|
|
4629
|
-
...g(
|
|
4638
|
+
coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
|
|
4639
|
+
...g(n)
|
|
4630
4640
|
});
|
|
4631
4641
|
};
|
|
4632
|
-
function ot(
|
|
4633
|
-
const t = (
|
|
4642
|
+
function ot(n, e) {
|
|
4643
|
+
const t = (n.toString().split(".")[1] || "").length, i = (e.toString().split(".")[1] || "").length, a = t > i ? t : i, r = parseInt(n.toFixed(a).replace(".", "")), s = parseInt(e.toFixed(a).replace(".", ""));
|
|
4634
4644
|
return r % s / Math.pow(10, a);
|
|
4635
4645
|
}
|
|
4636
4646
|
class D extends v {
|
|
@@ -4646,33 +4656,33 @@ class D extends v {
|
|
|
4646
4656
|
received: r.parsedType
|
|
4647
4657
|
}), _;
|
|
4648
4658
|
}
|
|
4649
|
-
let
|
|
4659
|
+
let i;
|
|
4650
4660
|
const a = new R();
|
|
4651
4661
|
for (const r of this._def.checks)
|
|
4652
|
-
r.kind === "int" ? x.isInteger(e.data) || (
|
|
4662
|
+
r.kind === "int" ? x.isInteger(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4653
4663
|
code: c.invalid_type,
|
|
4654
4664
|
expected: "integer",
|
|
4655
4665
|
received: "float",
|
|
4656
4666
|
message: r.message
|
|
4657
|
-
}), a.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (
|
|
4667
|
+
}), a.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4658
4668
|
code: c.too_small,
|
|
4659
4669
|
minimum: r.value,
|
|
4660
4670
|
type: "number",
|
|
4661
4671
|
inclusive: r.inclusive,
|
|
4662
4672
|
exact: !1,
|
|
4663
4673
|
message: r.message
|
|
4664
|
-
}), a.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (
|
|
4674
|
+
}), a.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4665
4675
|
code: c.too_big,
|
|
4666
4676
|
maximum: r.value,
|
|
4667
4677
|
type: "number",
|
|
4668
4678
|
inclusive: r.inclusive,
|
|
4669
4679
|
exact: !1,
|
|
4670
4680
|
message: r.message
|
|
4671
|
-
}), a.dirty()) : r.kind === "multipleOf" ? ot(e.data, r.value) !== 0 && (
|
|
4681
|
+
}), a.dirty()) : r.kind === "multipleOf" ? ot(e.data, r.value) !== 0 && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4672
4682
|
code: c.not_multiple_of,
|
|
4673
4683
|
multipleOf: r.value,
|
|
4674
4684
|
message: r.message
|
|
4675
|
-
}), a.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (
|
|
4685
|
+
}), a.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4676
4686
|
code: c.not_finite,
|
|
4677
4687
|
message: r.message
|
|
4678
4688
|
}), a.dirty()) : x.assertNever(r);
|
|
@@ -4690,7 +4700,7 @@ class D extends v {
|
|
|
4690
4700
|
lt(e, t) {
|
|
4691
4701
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
4692
4702
|
}
|
|
4693
|
-
setLimit(e, t,
|
|
4703
|
+
setLimit(e, t, i, a) {
|
|
4694
4704
|
return new D({
|
|
4695
4705
|
...this._def,
|
|
4696
4706
|
checks: [
|
|
@@ -4698,7 +4708,7 @@ class D extends v {
|
|
|
4698
4708
|
{
|
|
4699
4709
|
kind: e,
|
|
4700
4710
|
value: t,
|
|
4701
|
-
inclusive:
|
|
4711
|
+
inclusive: i,
|
|
4702
4712
|
message: p.toString(a)
|
|
4703
4713
|
}
|
|
4704
4714
|
]
|
|
@@ -4791,19 +4801,19 @@ class D extends v {
|
|
|
4791
4801
|
}
|
|
4792
4802
|
get isFinite() {
|
|
4793
4803
|
let e = null, t = null;
|
|
4794
|
-
for (const
|
|
4795
|
-
if (
|
|
4804
|
+
for (const i of this._def.checks) {
|
|
4805
|
+
if (i.kind === "finite" || i.kind === "int" || i.kind === "multipleOf")
|
|
4796
4806
|
return !0;
|
|
4797
|
-
|
|
4807
|
+
i.kind === "min" ? (t === null || i.value > t) && (t = i.value) : i.kind === "max" && (e === null || i.value < e) && (e = i.value);
|
|
4798
4808
|
}
|
|
4799
4809
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
4800
4810
|
}
|
|
4801
4811
|
}
|
|
4802
|
-
D.create = (
|
|
4812
|
+
D.create = (n) => new D({
|
|
4803
4813
|
checks: [],
|
|
4804
4814
|
typeName: f.ZodNumber,
|
|
4805
|
-
coerce: (
|
|
4806
|
-
...g(
|
|
4815
|
+
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
4816
|
+
...g(n)
|
|
4807
4817
|
});
|
|
4808
4818
|
class B extends v {
|
|
4809
4819
|
constructor() {
|
|
@@ -4818,22 +4828,22 @@ class B extends v {
|
|
|
4818
4828
|
received: r.parsedType
|
|
4819
4829
|
}), _;
|
|
4820
4830
|
}
|
|
4821
|
-
let
|
|
4831
|
+
let i;
|
|
4822
4832
|
const a = new R();
|
|
4823
4833
|
for (const r of this._def.checks)
|
|
4824
|
-
r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (
|
|
4834
|
+
r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4825
4835
|
code: c.too_small,
|
|
4826
4836
|
type: "bigint",
|
|
4827
4837
|
minimum: r.value,
|
|
4828
4838
|
inclusive: r.inclusive,
|
|
4829
4839
|
message: r.message
|
|
4830
|
-
}), a.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (
|
|
4840
|
+
}), a.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4831
4841
|
code: c.too_big,
|
|
4832
4842
|
type: "bigint",
|
|
4833
4843
|
maximum: r.value,
|
|
4834
4844
|
inclusive: r.inclusive,
|
|
4835
4845
|
message: r.message
|
|
4836
|
-
}), a.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (
|
|
4846
|
+
}), a.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (i = this._getOrReturnCtx(e, i), u(i, {
|
|
4837
4847
|
code: c.not_multiple_of,
|
|
4838
4848
|
multipleOf: r.value,
|
|
4839
4849
|
message: r.message
|
|
@@ -4852,7 +4862,7 @@ class B extends v {
|
|
|
4852
4862
|
lt(e, t) {
|
|
4853
4863
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
4854
4864
|
}
|
|
4855
|
-
setLimit(e, t,
|
|
4865
|
+
setLimit(e, t, i, a) {
|
|
4856
4866
|
return new B({
|
|
4857
4867
|
...this._def,
|
|
4858
4868
|
checks: [
|
|
@@ -4860,7 +4870,7 @@ class B extends v {
|
|
|
4860
4870
|
{
|
|
4861
4871
|
kind: e,
|
|
4862
4872
|
value: t,
|
|
4863
|
-
inclusive:
|
|
4873
|
+
inclusive: i,
|
|
4864
4874
|
message: p.toString(a)
|
|
4865
4875
|
}
|
|
4866
4876
|
]
|
|
@@ -4924,32 +4934,32 @@ class B extends v {
|
|
|
4924
4934
|
return e;
|
|
4925
4935
|
}
|
|
4926
4936
|
}
|
|
4927
|
-
B.create = (
|
|
4937
|
+
B.create = (n) => {
|
|
4928
4938
|
var e;
|
|
4929
4939
|
return new B({
|
|
4930
4940
|
checks: [],
|
|
4931
4941
|
typeName: f.ZodBigInt,
|
|
4932
|
-
coerce: (e =
|
|
4933
|
-
...g(
|
|
4942
|
+
coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
|
|
4943
|
+
...g(n)
|
|
4934
4944
|
});
|
|
4935
4945
|
};
|
|
4936
4946
|
class J extends v {
|
|
4937
4947
|
_parse(e) {
|
|
4938
4948
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== l.boolean) {
|
|
4939
|
-
const
|
|
4940
|
-
return u(
|
|
4949
|
+
const i = this._getOrReturnCtx(e);
|
|
4950
|
+
return u(i, {
|
|
4941
4951
|
code: c.invalid_type,
|
|
4942
4952
|
expected: l.boolean,
|
|
4943
|
-
received:
|
|
4953
|
+
received: i.parsedType
|
|
4944
4954
|
}), _;
|
|
4945
4955
|
}
|
|
4946
4956
|
return k(e.data);
|
|
4947
4957
|
}
|
|
4948
4958
|
}
|
|
4949
|
-
J.create = (
|
|
4959
|
+
J.create = (n) => new J({
|
|
4950
4960
|
typeName: f.ZodBoolean,
|
|
4951
|
-
coerce: (
|
|
4952
|
-
...g(
|
|
4961
|
+
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
4962
|
+
...g(n)
|
|
4953
4963
|
});
|
|
4954
4964
|
class $ extends v {
|
|
4955
4965
|
_parse(e) {
|
|
@@ -4967,7 +4977,7 @@ class $ extends v {
|
|
|
4967
4977
|
code: c.invalid_date
|
|
4968
4978
|
}), _;
|
|
4969
4979
|
}
|
|
4970
|
-
const
|
|
4980
|
+
const i = new R();
|
|
4971
4981
|
let a;
|
|
4972
4982
|
for (const r of this._def.checks)
|
|
4973
4983
|
r.kind === "min" ? e.data.getTime() < r.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
@@ -4977,16 +4987,16 @@ class $ extends v {
|
|
|
4977
4987
|
exact: !1,
|
|
4978
4988
|
minimum: r.value,
|
|
4979
4989
|
type: "date"
|
|
4980
|
-
}),
|
|
4990
|
+
}), i.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4981
4991
|
code: c.too_big,
|
|
4982
4992
|
message: r.message,
|
|
4983
4993
|
inclusive: !0,
|
|
4984
4994
|
exact: !1,
|
|
4985
4995
|
maximum: r.value,
|
|
4986
4996
|
type: "date"
|
|
4987
|
-
}),
|
|
4997
|
+
}), i.dirty()) : x.assertNever(r);
|
|
4988
4998
|
return {
|
|
4989
|
-
status:
|
|
4999
|
+
status: i.value,
|
|
4990
5000
|
value: new Date(e.data.getTime())
|
|
4991
5001
|
};
|
|
4992
5002
|
}
|
|
@@ -5023,62 +5033,62 @@ class $ extends v {
|
|
|
5023
5033
|
return e != null ? new Date(e) : null;
|
|
5024
5034
|
}
|
|
5025
5035
|
}
|
|
5026
|
-
$.create = (
|
|
5036
|
+
$.create = (n) => new $({
|
|
5027
5037
|
checks: [],
|
|
5028
|
-
coerce: (
|
|
5038
|
+
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
5029
5039
|
typeName: f.ZodDate,
|
|
5030
|
-
...g(
|
|
5040
|
+
...g(n)
|
|
5031
5041
|
});
|
|
5032
5042
|
class ue extends v {
|
|
5033
5043
|
_parse(e) {
|
|
5034
5044
|
if (this._getType(e) !== l.symbol) {
|
|
5035
|
-
const
|
|
5036
|
-
return u(
|
|
5045
|
+
const i = this._getOrReturnCtx(e);
|
|
5046
|
+
return u(i, {
|
|
5037
5047
|
code: c.invalid_type,
|
|
5038
5048
|
expected: l.symbol,
|
|
5039
|
-
received:
|
|
5049
|
+
received: i.parsedType
|
|
5040
5050
|
}), _;
|
|
5041
5051
|
}
|
|
5042
5052
|
return k(e.data);
|
|
5043
5053
|
}
|
|
5044
5054
|
}
|
|
5045
|
-
ue.create = (
|
|
5055
|
+
ue.create = (n) => new ue({
|
|
5046
5056
|
typeName: f.ZodSymbol,
|
|
5047
|
-
...g(
|
|
5057
|
+
...g(n)
|
|
5048
5058
|
});
|
|
5049
5059
|
class Q extends v {
|
|
5050
5060
|
_parse(e) {
|
|
5051
5061
|
if (this._getType(e) !== l.undefined) {
|
|
5052
|
-
const
|
|
5053
|
-
return u(
|
|
5062
|
+
const i = this._getOrReturnCtx(e);
|
|
5063
|
+
return u(i, {
|
|
5054
5064
|
code: c.invalid_type,
|
|
5055
5065
|
expected: l.undefined,
|
|
5056
|
-
received:
|
|
5066
|
+
received: i.parsedType
|
|
5057
5067
|
}), _;
|
|
5058
5068
|
}
|
|
5059
5069
|
return k(e.data);
|
|
5060
5070
|
}
|
|
5061
5071
|
}
|
|
5062
|
-
Q.create = (
|
|
5072
|
+
Q.create = (n) => new Q({
|
|
5063
5073
|
typeName: f.ZodUndefined,
|
|
5064
|
-
...g(
|
|
5074
|
+
...g(n)
|
|
5065
5075
|
});
|
|
5066
5076
|
class X extends v {
|
|
5067
5077
|
_parse(e) {
|
|
5068
5078
|
if (this._getType(e) !== l.null) {
|
|
5069
|
-
const
|
|
5070
|
-
return u(
|
|
5079
|
+
const i = this._getOrReturnCtx(e);
|
|
5080
|
+
return u(i, {
|
|
5071
5081
|
code: c.invalid_type,
|
|
5072
5082
|
expected: l.null,
|
|
5073
|
-
received:
|
|
5083
|
+
received: i.parsedType
|
|
5074
5084
|
}), _;
|
|
5075
5085
|
}
|
|
5076
5086
|
return k(e.data);
|
|
5077
5087
|
}
|
|
5078
5088
|
}
|
|
5079
|
-
X.create = (
|
|
5089
|
+
X.create = (n) => new X({
|
|
5080
5090
|
typeName: f.ZodNull,
|
|
5081
|
-
...g(
|
|
5091
|
+
...g(n)
|
|
5082
5092
|
});
|
|
5083
5093
|
class W extends v {
|
|
5084
5094
|
constructor() {
|
|
@@ -5088,9 +5098,9 @@ class W extends v {
|
|
|
5088
5098
|
return k(e.data);
|
|
5089
5099
|
}
|
|
5090
5100
|
}
|
|
5091
|
-
W.create = (
|
|
5101
|
+
W.create = (n) => new W({
|
|
5092
5102
|
typeName: f.ZodAny,
|
|
5093
|
-
...g(
|
|
5103
|
+
...g(n)
|
|
5094
5104
|
});
|
|
5095
5105
|
class V extends v {
|
|
5096
5106
|
constructor() {
|
|
@@ -5100,9 +5110,9 @@ class V extends v {
|
|
|
5100
5110
|
return k(e.data);
|
|
5101
5111
|
}
|
|
5102
5112
|
}
|
|
5103
|
-
V.create = (
|
|
5113
|
+
V.create = (n) => new V({
|
|
5104
5114
|
typeName: f.ZodUnknown,
|
|
5105
|
-
...g(
|
|
5115
|
+
...g(n)
|
|
5106
5116
|
});
|
|
5107
5117
|
class L extends v {
|
|
5108
5118
|
_parse(e) {
|
|
@@ -5114,30 +5124,30 @@ class L extends v {
|
|
|
5114
5124
|
}), _;
|
|
5115
5125
|
}
|
|
5116
5126
|
}
|
|
5117
|
-
L.create = (
|
|
5127
|
+
L.create = (n) => new L({
|
|
5118
5128
|
typeName: f.ZodNever,
|
|
5119
|
-
...g(
|
|
5129
|
+
...g(n)
|
|
5120
5130
|
});
|
|
5121
5131
|
class me extends v {
|
|
5122
5132
|
_parse(e) {
|
|
5123
5133
|
if (this._getType(e) !== l.undefined) {
|
|
5124
|
-
const
|
|
5125
|
-
return u(
|
|
5134
|
+
const i = this._getOrReturnCtx(e);
|
|
5135
|
+
return u(i, {
|
|
5126
5136
|
code: c.invalid_type,
|
|
5127
5137
|
expected: l.void,
|
|
5128
|
-
received:
|
|
5138
|
+
received: i.parsedType
|
|
5129
5139
|
}), _;
|
|
5130
5140
|
}
|
|
5131
5141
|
return k(e.data);
|
|
5132
5142
|
}
|
|
5133
5143
|
}
|
|
5134
|
-
me.create = (
|
|
5144
|
+
me.create = (n) => new me({
|
|
5135
5145
|
typeName: f.ZodVoid,
|
|
5136
|
-
...g(
|
|
5146
|
+
...g(n)
|
|
5137
5147
|
});
|
|
5138
5148
|
class O extends v {
|
|
5139
5149
|
_parse(e) {
|
|
5140
|
-
const { ctx: t, status:
|
|
5150
|
+
const { ctx: t, status: i } = this._processInputParams(e), a = this._def;
|
|
5141
5151
|
if (t.parsedType !== l.array)
|
|
5142
5152
|
return u(t, {
|
|
5143
5153
|
code: c.invalid_type,
|
|
@@ -5154,7 +5164,7 @@ class O extends v {
|
|
|
5154
5164
|
inclusive: !0,
|
|
5155
5165
|
exact: !0,
|
|
5156
5166
|
message: a.exactLength.message
|
|
5157
|
-
}),
|
|
5167
|
+
}), i.dirty());
|
|
5158
5168
|
}
|
|
5159
5169
|
if (a.minLength !== null && t.data.length < a.minLength.value && (u(t, {
|
|
5160
5170
|
code: c.too_small,
|
|
@@ -5163,17 +5173,17 @@ class O extends v {
|
|
|
5163
5173
|
inclusive: !0,
|
|
5164
5174
|
exact: !1,
|
|
5165
5175
|
message: a.minLength.message
|
|
5166
|
-
}),
|
|
5176
|
+
}), i.dirty()), a.maxLength !== null && t.data.length > a.maxLength.value && (u(t, {
|
|
5167
5177
|
code: c.too_big,
|
|
5168
5178
|
maximum: a.maxLength.value,
|
|
5169
5179
|
type: "array",
|
|
5170
5180
|
inclusive: !0,
|
|
5171
5181
|
exact: !1,
|
|
5172
5182
|
message: a.maxLength.message
|
|
5173
|
-
}),
|
|
5174
|
-
return Promise.all([...t.data].map((s, o) => a.type._parseAsync(new M(t, s, t.path, o)))).then((s) => R.mergeArray(
|
|
5183
|
+
}), i.dirty()), t.common.async)
|
|
5184
|
+
return Promise.all([...t.data].map((s, o) => a.type._parseAsync(new M(t, s, t.path, o)))).then((s) => R.mergeArray(i, s));
|
|
5175
5185
|
const r = [...t.data].map((s, o) => a.type._parseSync(new M(t, s, t.path, o)));
|
|
5176
|
-
return R.mergeArray(
|
|
5186
|
+
return R.mergeArray(i, r);
|
|
5177
5187
|
}
|
|
5178
5188
|
get element() {
|
|
5179
5189
|
return this._def.type;
|
|
@@ -5200,29 +5210,29 @@ class O extends v {
|
|
|
5200
5210
|
return this.min(1, e);
|
|
5201
5211
|
}
|
|
5202
5212
|
}
|
|
5203
|
-
O.create = (
|
|
5204
|
-
type:
|
|
5213
|
+
O.create = (n, e) => new O({
|
|
5214
|
+
type: n,
|
|
5205
5215
|
minLength: null,
|
|
5206
5216
|
maxLength: null,
|
|
5207
5217
|
exactLength: null,
|
|
5208
5218
|
typeName: f.ZodArray,
|
|
5209
5219
|
...g(e)
|
|
5210
5220
|
});
|
|
5211
|
-
function G(
|
|
5212
|
-
if (
|
|
5221
|
+
function G(n) {
|
|
5222
|
+
if (n instanceof w) {
|
|
5213
5223
|
const e = {};
|
|
5214
|
-
for (const t in
|
|
5215
|
-
const
|
|
5216
|
-
e[t] = P.create(G(
|
|
5224
|
+
for (const t in n.shape) {
|
|
5225
|
+
const i = n.shape[t];
|
|
5226
|
+
e[t] = P.create(G(i));
|
|
5217
5227
|
}
|
|
5218
5228
|
return new w({
|
|
5219
|
-
...
|
|
5229
|
+
...n._def,
|
|
5220
5230
|
shape: () => e
|
|
5221
5231
|
});
|
|
5222
|
-
} else return
|
|
5223
|
-
...
|
|
5224
|
-
type: G(
|
|
5225
|
-
}) :
|
|
5232
|
+
} else return n instanceof O ? new O({
|
|
5233
|
+
...n._def,
|
|
5234
|
+
type: G(n.element)
|
|
5235
|
+
}) : n instanceof P ? P.create(G(n.unwrap())) : n instanceof q ? q.create(G(n.unwrap())) : n instanceof N ? N.create(n.items.map((e) => G(e))) : n;
|
|
5226
5236
|
}
|
|
5227
5237
|
class w extends v {
|
|
5228
5238
|
constructor() {
|
|
@@ -5243,7 +5253,7 @@ class w extends v {
|
|
|
5243
5253
|
received: d.parsedType
|
|
5244
5254
|
}), _;
|
|
5245
5255
|
}
|
|
5246
|
-
const { status:
|
|
5256
|
+
const { status: i, ctx: a } = this._processInputParams(e), { shape: r, keys: s } = this._getCached(), o = [];
|
|
5247
5257
|
if (!(this._def.catchall instanceof L && this._def.unknownKeys === "strip"))
|
|
5248
5258
|
for (const d in a.data)
|
|
5249
5259
|
s.includes(d) || o.push(d);
|
|
@@ -5268,7 +5278,7 @@ class w extends v {
|
|
|
5268
5278
|
o.length > 0 && (u(a, {
|
|
5269
5279
|
code: c.unrecognized_keys,
|
|
5270
5280
|
keys: o
|
|
5271
|
-
}),
|
|
5281
|
+
}), i.dirty());
|
|
5272
5282
|
else if (d !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
5273
5283
|
} else {
|
|
5274
5284
|
const d = this._def.catchall;
|
|
@@ -5295,7 +5305,7 @@ class w extends v {
|
|
|
5295
5305
|
});
|
|
5296
5306
|
}
|
|
5297
5307
|
return d;
|
|
5298
|
-
}).then((d) => R.mergeObjectSync(
|
|
5308
|
+
}).then((d) => R.mergeObjectSync(i, d)) : R.mergeObjectSync(i, m);
|
|
5299
5309
|
}
|
|
5300
5310
|
get shape() {
|
|
5301
5311
|
return this._def.shape();
|
|
@@ -5305,9 +5315,9 @@ class w extends v {
|
|
|
5305
5315
|
...this._def,
|
|
5306
5316
|
unknownKeys: "strict",
|
|
5307
5317
|
...e !== void 0 ? {
|
|
5308
|
-
errorMap: (t,
|
|
5318
|
+
errorMap: (t, i) => {
|
|
5309
5319
|
var a, r, s, o;
|
|
5310
|
-
const m = (s = (r = (a = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(a, t,
|
|
5320
|
+
const m = (s = (r = (a = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(a, t, i).message) !== null && s !== void 0 ? s : i.defaultError;
|
|
5311
5321
|
return t.code === "unrecognized_keys" ? {
|
|
5312
5322
|
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : m
|
|
5313
5323
|
} : {
|
|
@@ -5438,8 +5448,8 @@ class w extends v {
|
|
|
5438
5448
|
}
|
|
5439
5449
|
pick(e) {
|
|
5440
5450
|
const t = {};
|
|
5441
|
-
return x.objectKeys(e).forEach((
|
|
5442
|
-
e[
|
|
5451
|
+
return x.objectKeys(e).forEach((i) => {
|
|
5452
|
+
e[i] && this.shape[i] && (t[i] = this.shape[i]);
|
|
5443
5453
|
}), new w({
|
|
5444
5454
|
...this._def,
|
|
5445
5455
|
shape: () => t
|
|
@@ -5447,8 +5457,8 @@ class w extends v {
|
|
|
5447
5457
|
}
|
|
5448
5458
|
omit(e) {
|
|
5449
5459
|
const t = {};
|
|
5450
|
-
return x.objectKeys(this.shape).forEach((
|
|
5451
|
-
e[
|
|
5460
|
+
return x.objectKeys(this.shape).forEach((i) => {
|
|
5461
|
+
e[i] || (t[i] = this.shape[i]);
|
|
5452
5462
|
}), new w({
|
|
5453
5463
|
...this._def,
|
|
5454
5464
|
shape: () => t
|
|
@@ -5462,9 +5472,9 @@ class w extends v {
|
|
|
5462
5472
|
}
|
|
5463
5473
|
partial(e) {
|
|
5464
5474
|
const t = {};
|
|
5465
|
-
return x.objectKeys(this.shape).forEach((
|
|
5466
|
-
const a = this.shape[
|
|
5467
|
-
e && !e[
|
|
5475
|
+
return x.objectKeys(this.shape).forEach((i) => {
|
|
5476
|
+
const a = this.shape[i];
|
|
5477
|
+
e && !e[i] ? t[i] = a : t[i] = a.optional();
|
|
5468
5478
|
}), new w({
|
|
5469
5479
|
...this._def,
|
|
5470
5480
|
shape: () => t
|
|
@@ -5472,14 +5482,14 @@ class w extends v {
|
|
|
5472
5482
|
}
|
|
5473
5483
|
required(e) {
|
|
5474
5484
|
const t = {};
|
|
5475
|
-
return x.objectKeys(this.shape).forEach((
|
|
5476
|
-
if (e && !e[
|
|
5477
|
-
t[
|
|
5485
|
+
return x.objectKeys(this.shape).forEach((i) => {
|
|
5486
|
+
if (e && !e[i])
|
|
5487
|
+
t[i] = this.shape[i];
|
|
5478
5488
|
else {
|
|
5479
|
-
let r = this.shape[
|
|
5489
|
+
let r = this.shape[i];
|
|
5480
5490
|
for (; r instanceof P; )
|
|
5481
5491
|
r = r._def.innerType;
|
|
5482
|
-
t[
|
|
5492
|
+
t[i] = r;
|
|
5483
5493
|
}
|
|
5484
5494
|
}), new w({
|
|
5485
5495
|
...this._def,
|
|
@@ -5490,22 +5500,22 @@ class w extends v {
|
|
|
5490
5500
|
return Ae(x.objectKeys(this.shape));
|
|
5491
5501
|
}
|
|
5492
5502
|
}
|
|
5493
|
-
w.create = (
|
|
5494
|
-
shape: () =>
|
|
5503
|
+
w.create = (n, e) => new w({
|
|
5504
|
+
shape: () => n,
|
|
5495
5505
|
unknownKeys: "strip",
|
|
5496
5506
|
catchall: L.create(),
|
|
5497
5507
|
typeName: f.ZodObject,
|
|
5498
5508
|
...g(e)
|
|
5499
5509
|
});
|
|
5500
|
-
w.strictCreate = (
|
|
5501
|
-
shape: () =>
|
|
5510
|
+
w.strictCreate = (n, e) => new w({
|
|
5511
|
+
shape: () => n,
|
|
5502
5512
|
unknownKeys: "strict",
|
|
5503
5513
|
catchall: L.create(),
|
|
5504
5514
|
typeName: f.ZodObject,
|
|
5505
5515
|
...g(e)
|
|
5506
5516
|
});
|
|
5507
|
-
w.lazycreate = (
|
|
5508
|
-
shape:
|
|
5517
|
+
w.lazycreate = (n, e) => new w({
|
|
5518
|
+
shape: n,
|
|
5509
5519
|
unknownKeys: "strip",
|
|
5510
5520
|
catchall: L.create(),
|
|
5511
5521
|
typeName: f.ZodObject,
|
|
@@ -5513,7 +5523,7 @@ w.lazycreate = (i, e) => new w({
|
|
|
5513
5523
|
});
|
|
5514
5524
|
class K extends v {
|
|
5515
5525
|
_parse(e) {
|
|
5516
|
-
const { ctx: t } = this._processInputParams(e),
|
|
5526
|
+
const { ctx: t } = this._processInputParams(e), i = this._def.options;
|
|
5517
5527
|
function a(r) {
|
|
5518
5528
|
for (const o of r)
|
|
5519
5529
|
if (o.result.status === "valid")
|
|
@@ -5528,7 +5538,7 @@ class K extends v {
|
|
|
5528
5538
|
}), _;
|
|
5529
5539
|
}
|
|
5530
5540
|
if (t.common.async)
|
|
5531
|
-
return Promise.all(
|
|
5541
|
+
return Promise.all(i.map(async (r) => {
|
|
5532
5542
|
const s = {
|
|
5533
5543
|
...t,
|
|
5534
5544
|
common: {
|
|
@@ -5549,7 +5559,7 @@ class K extends v {
|
|
|
5549
5559
|
{
|
|
5550
5560
|
let r;
|
|
5551
5561
|
const s = [];
|
|
5552
|
-
for (const m of
|
|
5562
|
+
for (const m of i) {
|
|
5553
5563
|
const d = {
|
|
5554
5564
|
...t,
|
|
5555
5565
|
common: {
|
|
@@ -5579,12 +5589,12 @@ class K extends v {
|
|
|
5579
5589
|
return this._def.options;
|
|
5580
5590
|
}
|
|
5581
5591
|
}
|
|
5582
|
-
K.create = (
|
|
5583
|
-
options:
|
|
5592
|
+
K.create = (n, e) => new K({
|
|
5593
|
+
options: n,
|
|
5584
5594
|
typeName: f.ZodUnion,
|
|
5585
5595
|
...g(e)
|
|
5586
5596
|
});
|
|
5587
|
-
const oe = (
|
|
5597
|
+
const oe = (n) => n instanceof ne ? oe(n.schema) : n instanceof I ? oe(n.innerType()) : n instanceof ie ? [n.value] : n instanceof Z ? n.options : n instanceof ae ? Object.keys(n.enum) : n instanceof re ? oe(n._def.innerType) : n instanceof Q ? [void 0] : n instanceof X ? [null] : null;
|
|
5588
5598
|
class ge extends v {
|
|
5589
5599
|
_parse(e) {
|
|
5590
5600
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -5594,7 +5604,7 @@ class ge extends v {
|
|
|
5594
5604
|
expected: l.object,
|
|
5595
5605
|
received: t.parsedType
|
|
5596
5606
|
}), _;
|
|
5597
|
-
const
|
|
5607
|
+
const i = this.discriminator, a = t.data[i], r = this.optionsMap.get(a);
|
|
5598
5608
|
return r ? t.common.async ? r._parseAsync({
|
|
5599
5609
|
data: t.data,
|
|
5600
5610
|
path: t.path,
|
|
@@ -5606,7 +5616,7 @@ class ge extends v {
|
|
|
5606
5616
|
}) : (u(t, {
|
|
5607
5617
|
code: c.invalid_union_discriminator,
|
|
5608
5618
|
options: Array.from(this.optionsMap.keys()),
|
|
5609
|
-
path: [
|
|
5619
|
+
path: [i]
|
|
5610
5620
|
}), _);
|
|
5611
5621
|
}
|
|
5612
5622
|
get discriminator() {
|
|
@@ -5626,7 +5636,7 @@ class ge extends v {
|
|
|
5626
5636
|
* @param types an array of object schemas
|
|
5627
5637
|
* @param params
|
|
5628
5638
|
*/
|
|
5629
|
-
static create(e, t,
|
|
5639
|
+
static create(e, t, i) {
|
|
5630
5640
|
const a = /* @__PURE__ */ new Map();
|
|
5631
5641
|
for (const r of t) {
|
|
5632
5642
|
const s = oe(r.shape[e]);
|
|
@@ -5643,103 +5653,103 @@ class ge extends v {
|
|
|
5643
5653
|
discriminator: e,
|
|
5644
5654
|
options: t,
|
|
5645
5655
|
optionsMap: a,
|
|
5646
|
-
...g(
|
|
5656
|
+
...g(i)
|
|
5647
5657
|
});
|
|
5648
5658
|
}
|
|
5649
5659
|
}
|
|
5650
|
-
function Te(
|
|
5651
|
-
const t = j(
|
|
5652
|
-
if (
|
|
5653
|
-
return { valid: !0, data:
|
|
5654
|
-
if (t === l.object &&
|
|
5655
|
-
const a = x.objectKeys(e), r = x.objectKeys(
|
|
5660
|
+
function Te(n, e) {
|
|
5661
|
+
const t = j(n), i = j(e);
|
|
5662
|
+
if (n === e)
|
|
5663
|
+
return { valid: !0, data: n };
|
|
5664
|
+
if (t === l.object && i === l.object) {
|
|
5665
|
+
const a = x.objectKeys(e), r = x.objectKeys(n).filter((o) => a.indexOf(o) !== -1), s = { ...n, ...e };
|
|
5656
5666
|
for (const o of r) {
|
|
5657
|
-
const m = Te(
|
|
5667
|
+
const m = Te(n[o], e[o]);
|
|
5658
5668
|
if (!m.valid)
|
|
5659
5669
|
return { valid: !1 };
|
|
5660
5670
|
s[o] = m.data;
|
|
5661
5671
|
}
|
|
5662
5672
|
return { valid: !0, data: s };
|
|
5663
|
-
} else if (t === l.array &&
|
|
5664
|
-
if (
|
|
5673
|
+
} else if (t === l.array && i === l.array) {
|
|
5674
|
+
if (n.length !== e.length)
|
|
5665
5675
|
return { valid: !1 };
|
|
5666
5676
|
const a = [];
|
|
5667
|
-
for (let r = 0; r <
|
|
5668
|
-
const s =
|
|
5677
|
+
for (let r = 0; r < n.length; r++) {
|
|
5678
|
+
const s = n[r], o = e[r], m = Te(s, o);
|
|
5669
5679
|
if (!m.valid)
|
|
5670
5680
|
return { valid: !1 };
|
|
5671
5681
|
a.push(m.data);
|
|
5672
5682
|
}
|
|
5673
5683
|
return { valid: !0, data: a };
|
|
5674
|
-
} else return t === l.date &&
|
|
5684
|
+
} else return t === l.date && i === l.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
|
|
5675
5685
|
}
|
|
5676
5686
|
class ee extends v {
|
|
5677
5687
|
_parse(e) {
|
|
5678
|
-
const { status: t, ctx:
|
|
5688
|
+
const { status: t, ctx: i } = this._processInputParams(e), a = (r, s) => {
|
|
5679
5689
|
if (xe(r) || xe(s))
|
|
5680
5690
|
return _;
|
|
5681
5691
|
const o = Te(r.value, s.value);
|
|
5682
|
-
return o.valid ? ((we(r) || we(s)) && t.dirty(), { status: t.value, value: o.data }) : (u(
|
|
5692
|
+
return o.valid ? ((we(r) || we(s)) && t.dirty(), { status: t.value, value: o.data }) : (u(i, {
|
|
5683
5693
|
code: c.invalid_intersection_types
|
|
5684
5694
|
}), _);
|
|
5685
5695
|
};
|
|
5686
|
-
return
|
|
5696
|
+
return i.common.async ? Promise.all([
|
|
5687
5697
|
this._def.left._parseAsync({
|
|
5688
|
-
data:
|
|
5689
|
-
path:
|
|
5690
|
-
parent:
|
|
5698
|
+
data: i.data,
|
|
5699
|
+
path: i.path,
|
|
5700
|
+
parent: i
|
|
5691
5701
|
}),
|
|
5692
5702
|
this._def.right._parseAsync({
|
|
5693
|
-
data:
|
|
5694
|
-
path:
|
|
5695
|
-
parent:
|
|
5703
|
+
data: i.data,
|
|
5704
|
+
path: i.path,
|
|
5705
|
+
parent: i
|
|
5696
5706
|
})
|
|
5697
5707
|
]).then(([r, s]) => a(r, s)) : a(this._def.left._parseSync({
|
|
5698
|
-
data:
|
|
5699
|
-
path:
|
|
5700
|
-
parent:
|
|
5708
|
+
data: i.data,
|
|
5709
|
+
path: i.path,
|
|
5710
|
+
parent: i
|
|
5701
5711
|
}), this._def.right._parseSync({
|
|
5702
|
-
data:
|
|
5703
|
-
path:
|
|
5704
|
-
parent:
|
|
5712
|
+
data: i.data,
|
|
5713
|
+
path: i.path,
|
|
5714
|
+
parent: i
|
|
5705
5715
|
}));
|
|
5706
5716
|
}
|
|
5707
5717
|
}
|
|
5708
|
-
ee.create = (
|
|
5709
|
-
left:
|
|
5718
|
+
ee.create = (n, e, t) => new ee({
|
|
5719
|
+
left: n,
|
|
5710
5720
|
right: e,
|
|
5711
5721
|
typeName: f.ZodIntersection,
|
|
5712
5722
|
...g(t)
|
|
5713
5723
|
});
|
|
5714
5724
|
class N extends v {
|
|
5715
5725
|
_parse(e) {
|
|
5716
|
-
const { status: t, ctx:
|
|
5717
|
-
if (
|
|
5718
|
-
return u(
|
|
5726
|
+
const { status: t, ctx: i } = this._processInputParams(e);
|
|
5727
|
+
if (i.parsedType !== l.array)
|
|
5728
|
+
return u(i, {
|
|
5719
5729
|
code: c.invalid_type,
|
|
5720
5730
|
expected: l.array,
|
|
5721
|
-
received:
|
|
5731
|
+
received: i.parsedType
|
|
5722
5732
|
}), _;
|
|
5723
|
-
if (
|
|
5724
|
-
return u(
|
|
5733
|
+
if (i.data.length < this._def.items.length)
|
|
5734
|
+
return u(i, {
|
|
5725
5735
|
code: c.too_small,
|
|
5726
5736
|
minimum: this._def.items.length,
|
|
5727
5737
|
inclusive: !0,
|
|
5728
5738
|
exact: !1,
|
|
5729
5739
|
type: "array"
|
|
5730
5740
|
}), _;
|
|
5731
|
-
!this._def.rest &&
|
|
5741
|
+
!this._def.rest && i.data.length > this._def.items.length && (u(i, {
|
|
5732
5742
|
code: c.too_big,
|
|
5733
5743
|
maximum: this._def.items.length,
|
|
5734
5744
|
inclusive: !0,
|
|
5735
5745
|
exact: !1,
|
|
5736
5746
|
type: "array"
|
|
5737
5747
|
}), t.dirty());
|
|
5738
|
-
const r = [...
|
|
5748
|
+
const r = [...i.data].map((s, o) => {
|
|
5739
5749
|
const m = this._def.items[o] || this._def.rest;
|
|
5740
|
-
return m ? m._parse(new M(
|
|
5750
|
+
return m ? m._parse(new M(i, s, i.path, o)) : null;
|
|
5741
5751
|
}).filter((s) => !!s);
|
|
5742
|
-
return
|
|
5752
|
+
return i.common.async ? Promise.all(r).then((s) => R.mergeArray(t, s)) : R.mergeArray(t, r);
|
|
5743
5753
|
}
|
|
5744
5754
|
get items() {
|
|
5745
5755
|
return this._def.items;
|
|
@@ -5751,11 +5761,11 @@ class N extends v {
|
|
|
5751
5761
|
});
|
|
5752
5762
|
}
|
|
5753
5763
|
}
|
|
5754
|
-
N.create = (
|
|
5755
|
-
if (!Array.isArray(
|
|
5764
|
+
N.create = (n, e) => {
|
|
5765
|
+
if (!Array.isArray(n))
|
|
5756
5766
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
5757
5767
|
return new N({
|
|
5758
|
-
items:
|
|
5768
|
+
items: n,
|
|
5759
5769
|
typeName: f.ZodTuple,
|
|
5760
5770
|
rest: null,
|
|
5761
5771
|
...g(e)
|
|
@@ -5769,30 +5779,30 @@ class te extends v {
|
|
|
5769
5779
|
return this._def.valueType;
|
|
5770
5780
|
}
|
|
5771
5781
|
_parse(e) {
|
|
5772
|
-
const { status: t, ctx:
|
|
5773
|
-
if (
|
|
5774
|
-
return u(
|
|
5782
|
+
const { status: t, ctx: i } = this._processInputParams(e);
|
|
5783
|
+
if (i.parsedType !== l.object)
|
|
5784
|
+
return u(i, {
|
|
5775
5785
|
code: c.invalid_type,
|
|
5776
5786
|
expected: l.object,
|
|
5777
|
-
received:
|
|
5787
|
+
received: i.parsedType
|
|
5778
5788
|
}), _;
|
|
5779
5789
|
const a = [], r = this._def.keyType, s = this._def.valueType;
|
|
5780
|
-
for (const o in
|
|
5790
|
+
for (const o in i.data)
|
|
5781
5791
|
a.push({
|
|
5782
|
-
key: r._parse(new M(
|
|
5783
|
-
value: s._parse(new M(
|
|
5792
|
+
key: r._parse(new M(i, o, i.path, o)),
|
|
5793
|
+
value: s._parse(new M(i, i.data[o], i.path, o))
|
|
5784
5794
|
});
|
|
5785
|
-
return
|
|
5795
|
+
return i.common.async ? R.mergeObjectAsync(t, a) : R.mergeObjectSync(t, a);
|
|
5786
5796
|
}
|
|
5787
5797
|
get element() {
|
|
5788
5798
|
return this._def.valueType;
|
|
5789
5799
|
}
|
|
5790
|
-
static create(e, t,
|
|
5800
|
+
static create(e, t, i) {
|
|
5791
5801
|
return t instanceof v ? new te({
|
|
5792
5802
|
keyType: e,
|
|
5793
5803
|
valueType: t,
|
|
5794
5804
|
typeName: f.ZodRecord,
|
|
5795
|
-
...g(
|
|
5805
|
+
...g(i)
|
|
5796
5806
|
}) : new te({
|
|
5797
5807
|
keyType: A.create(),
|
|
5798
5808
|
valueType: e,
|
|
@@ -5809,18 +5819,18 @@ class pe extends v {
|
|
|
5809
5819
|
return this._def.valueType;
|
|
5810
5820
|
}
|
|
5811
5821
|
_parse(e) {
|
|
5812
|
-
const { status: t, ctx:
|
|
5813
|
-
if (
|
|
5814
|
-
return u(
|
|
5822
|
+
const { status: t, ctx: i } = this._processInputParams(e);
|
|
5823
|
+
if (i.parsedType !== l.map)
|
|
5824
|
+
return u(i, {
|
|
5815
5825
|
code: c.invalid_type,
|
|
5816
5826
|
expected: l.map,
|
|
5817
|
-
received:
|
|
5827
|
+
received: i.parsedType
|
|
5818
5828
|
}), _;
|
|
5819
|
-
const a = this._def.keyType, r = this._def.valueType, s = [...
|
|
5820
|
-
key: a._parse(new M(
|
|
5821
|
-
value: r._parse(new M(
|
|
5829
|
+
const a = this._def.keyType, r = this._def.valueType, s = [...i.data.entries()].map(([o, m], d) => ({
|
|
5830
|
+
key: a._parse(new M(i, o, i.path, [d, "key"])),
|
|
5831
|
+
value: r._parse(new M(i, m, i.path, [d, "value"]))
|
|
5822
5832
|
}));
|
|
5823
|
-
if (
|
|
5833
|
+
if (i.common.async) {
|
|
5824
5834
|
const o = /* @__PURE__ */ new Map();
|
|
5825
5835
|
return Promise.resolve().then(async () => {
|
|
5826
5836
|
for (const m of s) {
|
|
@@ -5843,30 +5853,30 @@ class pe extends v {
|
|
|
5843
5853
|
}
|
|
5844
5854
|
}
|
|
5845
5855
|
}
|
|
5846
|
-
pe.create = (
|
|
5856
|
+
pe.create = (n, e, t) => new pe({
|
|
5847
5857
|
valueType: e,
|
|
5848
|
-
keyType:
|
|
5858
|
+
keyType: n,
|
|
5849
5859
|
typeName: f.ZodMap,
|
|
5850
5860
|
...g(t)
|
|
5851
5861
|
});
|
|
5852
5862
|
class U extends v {
|
|
5853
5863
|
_parse(e) {
|
|
5854
|
-
const { status: t, ctx:
|
|
5855
|
-
if (
|
|
5856
|
-
return u(
|
|
5864
|
+
const { status: t, ctx: i } = this._processInputParams(e);
|
|
5865
|
+
if (i.parsedType !== l.set)
|
|
5866
|
+
return u(i, {
|
|
5857
5867
|
code: c.invalid_type,
|
|
5858
5868
|
expected: l.set,
|
|
5859
|
-
received:
|
|
5869
|
+
received: i.parsedType
|
|
5860
5870
|
}), _;
|
|
5861
5871
|
const a = this._def;
|
|
5862
|
-
a.minSize !== null &&
|
|
5872
|
+
a.minSize !== null && i.data.size < a.minSize.value && (u(i, {
|
|
5863
5873
|
code: c.too_small,
|
|
5864
5874
|
minimum: a.minSize.value,
|
|
5865
5875
|
type: "set",
|
|
5866
5876
|
inclusive: !0,
|
|
5867
5877
|
exact: !1,
|
|
5868
5878
|
message: a.minSize.message
|
|
5869
|
-
}), t.dirty()), a.maxSize !== null &&
|
|
5879
|
+
}), t.dirty()), a.maxSize !== null && i.data.size > a.maxSize.value && (u(i, {
|
|
5870
5880
|
code: c.too_big,
|
|
5871
5881
|
maximum: a.maxSize.value,
|
|
5872
5882
|
type: "set",
|
|
@@ -5884,8 +5894,8 @@ class U extends v {
|
|
|
5884
5894
|
}
|
|
5885
5895
|
return { status: t.value, value: d };
|
|
5886
5896
|
}
|
|
5887
|
-
const o = [...
|
|
5888
|
-
return
|
|
5897
|
+
const o = [...i.data.values()].map((m, d) => r._parse(new M(i, m, i.path, d)));
|
|
5898
|
+
return i.common.async ? Promise.all(o).then((m) => s(m)) : s(o);
|
|
5889
5899
|
}
|
|
5890
5900
|
min(e, t) {
|
|
5891
5901
|
return new U({
|
|
@@ -5906,8 +5916,8 @@ class U extends v {
|
|
|
5906
5916
|
return this.min(1, e);
|
|
5907
5917
|
}
|
|
5908
5918
|
}
|
|
5909
|
-
U.create = (
|
|
5910
|
-
valueType:
|
|
5919
|
+
U.create = (n, e) => new U({
|
|
5920
|
+
valueType: n,
|
|
5911
5921
|
minSize: null,
|
|
5912
5922
|
maxSize: null,
|
|
5913
5923
|
typeName: f.ZodSet,
|
|
@@ -5925,7 +5935,7 @@ class z extends v {
|
|
|
5925
5935
|
expected: l.function,
|
|
5926
5936
|
received: t.parsedType
|
|
5927
5937
|
}), _;
|
|
5928
|
-
function
|
|
5938
|
+
function i(o, m) {
|
|
5929
5939
|
return de({
|
|
5930
5940
|
data: o,
|
|
5931
5941
|
path: t.path,
|
|
@@ -5962,7 +5972,7 @@ class z extends v {
|
|
|
5962
5972
|
const o = this;
|
|
5963
5973
|
return k(async function(...m) {
|
|
5964
5974
|
const d = new E([]), y = await o._def.args.parseAsync(m, r).catch((ve) => {
|
|
5965
|
-
throw d.addIssue(
|
|
5975
|
+
throw d.addIssue(i(m, ve)), d;
|
|
5966
5976
|
}), S = await Reflect.apply(s, this, y);
|
|
5967
5977
|
return await o._def.returns._def.type.parseAsync(S, r).catch((ve) => {
|
|
5968
5978
|
throw d.addIssue(a(S, ve)), d;
|
|
@@ -5973,7 +5983,7 @@ class z extends v {
|
|
|
5973
5983
|
return k(function(...m) {
|
|
5974
5984
|
const d = o._def.args.safeParse(m, r);
|
|
5975
5985
|
if (!d.success)
|
|
5976
|
-
throw new E([
|
|
5986
|
+
throw new E([i(m, d.error)]);
|
|
5977
5987
|
const y = Reflect.apply(s, this, d.data), S = o._def.returns.safeParse(y, r);
|
|
5978
5988
|
if (!S.success)
|
|
5979
5989
|
throw new E([a(y, S.error)]);
|
|
@@ -6005,16 +6015,16 @@ class z extends v {
|
|
|
6005
6015
|
strictImplement(e) {
|
|
6006
6016
|
return this.parse(e);
|
|
6007
6017
|
}
|
|
6008
|
-
static create(e, t,
|
|
6018
|
+
static create(e, t, i) {
|
|
6009
6019
|
return new z({
|
|
6010
6020
|
args: e || N.create([]).rest(V.create()),
|
|
6011
6021
|
returns: t || V.create(),
|
|
6012
6022
|
typeName: f.ZodFunction,
|
|
6013
|
-
...g(
|
|
6023
|
+
...g(i)
|
|
6014
6024
|
});
|
|
6015
6025
|
}
|
|
6016
6026
|
}
|
|
6017
|
-
class
|
|
6027
|
+
class ne extends v {
|
|
6018
6028
|
get schema() {
|
|
6019
6029
|
return this._def.getter();
|
|
6020
6030
|
}
|
|
@@ -6023,12 +6033,12 @@ class ie extends v {
|
|
|
6023
6033
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
6024
6034
|
}
|
|
6025
6035
|
}
|
|
6026
|
-
|
|
6027
|
-
getter:
|
|
6036
|
+
ne.create = (n, e) => new ne({
|
|
6037
|
+
getter: n,
|
|
6028
6038
|
typeName: f.ZodLazy,
|
|
6029
6039
|
...g(e)
|
|
6030
6040
|
});
|
|
6031
|
-
class
|
|
6041
|
+
class ie extends v {
|
|
6032
6042
|
_parse(e) {
|
|
6033
6043
|
if (e.data !== this._def.value) {
|
|
6034
6044
|
const t = this._getOrReturnCtx(e);
|
|
@@ -6044,14 +6054,14 @@ class ne extends v {
|
|
|
6044
6054
|
return this._def.value;
|
|
6045
6055
|
}
|
|
6046
6056
|
}
|
|
6047
|
-
|
|
6048
|
-
value:
|
|
6057
|
+
ie.create = (n, e) => new ie({
|
|
6058
|
+
value: n,
|
|
6049
6059
|
typeName: f.ZodLiteral,
|
|
6050
6060
|
...g(e)
|
|
6051
6061
|
});
|
|
6052
|
-
function Ae(
|
|
6062
|
+
function Ae(n, e) {
|
|
6053
6063
|
return new Z({
|
|
6054
|
-
values:
|
|
6064
|
+
values: n,
|
|
6055
6065
|
typeName: f.ZodEnum,
|
|
6056
6066
|
...g(e)
|
|
6057
6067
|
});
|
|
@@ -6059,19 +6069,19 @@ function Ae(i, e) {
|
|
|
6059
6069
|
class Z extends v {
|
|
6060
6070
|
_parse(e) {
|
|
6061
6071
|
if (typeof e.data != "string") {
|
|
6062
|
-
const t = this._getOrReturnCtx(e),
|
|
6072
|
+
const t = this._getOrReturnCtx(e), i = this._def.values;
|
|
6063
6073
|
return u(t, {
|
|
6064
|
-
expected: x.joinValues(
|
|
6074
|
+
expected: x.joinValues(i),
|
|
6065
6075
|
received: t.parsedType,
|
|
6066
6076
|
code: c.invalid_type
|
|
6067
6077
|
}), _;
|
|
6068
6078
|
}
|
|
6069
6079
|
if (this._def.values.indexOf(e.data) === -1) {
|
|
6070
|
-
const t = this._getOrReturnCtx(e),
|
|
6080
|
+
const t = this._getOrReturnCtx(e), i = this._def.values;
|
|
6071
6081
|
return u(t, {
|
|
6072
6082
|
received: t.data,
|
|
6073
6083
|
code: c.invalid_enum_value,
|
|
6074
|
-
options:
|
|
6084
|
+
options: i
|
|
6075
6085
|
}), _;
|
|
6076
6086
|
}
|
|
6077
6087
|
return k(e.data);
|
|
@@ -6107,19 +6117,19 @@ class Z extends v {
|
|
|
6107
6117
|
Z.create = Ae;
|
|
6108
6118
|
class ae extends v {
|
|
6109
6119
|
_parse(e) {
|
|
6110
|
-
const t = x.getValidEnumValues(this._def.values),
|
|
6111
|
-
if (
|
|
6120
|
+
const t = x.getValidEnumValues(this._def.values), i = this._getOrReturnCtx(e);
|
|
6121
|
+
if (i.parsedType !== l.string && i.parsedType !== l.number) {
|
|
6112
6122
|
const a = x.objectValues(t);
|
|
6113
|
-
return u(
|
|
6123
|
+
return u(i, {
|
|
6114
6124
|
expected: x.joinValues(a),
|
|
6115
|
-
received:
|
|
6125
|
+
received: i.parsedType,
|
|
6116
6126
|
code: c.invalid_type
|
|
6117
6127
|
}), _;
|
|
6118
6128
|
}
|
|
6119
6129
|
if (t.indexOf(e.data) === -1) {
|
|
6120
6130
|
const a = x.objectValues(t);
|
|
6121
|
-
return u(
|
|
6122
|
-
received:
|
|
6131
|
+
return u(i, {
|
|
6132
|
+
received: i.data,
|
|
6123
6133
|
code: c.invalid_enum_value,
|
|
6124
6134
|
options: a
|
|
6125
6135
|
}), _;
|
|
@@ -6130,8 +6140,8 @@ class ae extends v {
|
|
|
6130
6140
|
return this._def.values;
|
|
6131
6141
|
}
|
|
6132
6142
|
}
|
|
6133
|
-
ae.create = (
|
|
6134
|
-
values:
|
|
6143
|
+
ae.create = (n, e) => new ae({
|
|
6144
|
+
values: n,
|
|
6135
6145
|
typeName: f.ZodNativeEnum,
|
|
6136
6146
|
...g(e)
|
|
6137
6147
|
});
|
|
@@ -6147,15 +6157,15 @@ class Y extends v {
|
|
|
6147
6157
|
expected: l.promise,
|
|
6148
6158
|
received: t.parsedType
|
|
6149
6159
|
}), _;
|
|
6150
|
-
const
|
|
6151
|
-
return k(
|
|
6160
|
+
const i = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
|
|
6161
|
+
return k(i.then((a) => this._def.type.parseAsync(a, {
|
|
6152
6162
|
path: t.path,
|
|
6153
6163
|
errorMap: t.common.contextualErrorMap
|
|
6154
6164
|
})));
|
|
6155
6165
|
}
|
|
6156
6166
|
}
|
|
6157
|
-
Y.create = (
|
|
6158
|
-
type:
|
|
6167
|
+
Y.create = (n, e) => new Y({
|
|
6168
|
+
type: n,
|
|
6159
6169
|
typeName: f.ZodPromise,
|
|
6160
6170
|
...g(e)
|
|
6161
6171
|
});
|
|
@@ -6167,54 +6177,54 @@ class I extends v {
|
|
|
6167
6177
|
return this._def.schema._def.typeName === f.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
6168
6178
|
}
|
|
6169
6179
|
_parse(e) {
|
|
6170
|
-
const { status: t, ctx:
|
|
6180
|
+
const { status: t, ctx: i } = this._processInputParams(e), a = this._def.effect || null, r = {
|
|
6171
6181
|
addIssue: (s) => {
|
|
6172
|
-
u(
|
|
6182
|
+
u(i, s), s.fatal ? t.abort() : t.dirty();
|
|
6173
6183
|
},
|
|
6174
6184
|
get path() {
|
|
6175
|
-
return
|
|
6185
|
+
return i.path;
|
|
6176
6186
|
}
|
|
6177
6187
|
};
|
|
6178
6188
|
if (r.addIssue = r.addIssue.bind(r), a.type === "preprocess") {
|
|
6179
|
-
const s = a.transform(
|
|
6180
|
-
return
|
|
6189
|
+
const s = a.transform(i.data, r);
|
|
6190
|
+
return i.common.issues.length ? {
|
|
6181
6191
|
status: "dirty",
|
|
6182
|
-
value:
|
|
6183
|
-
} :
|
|
6192
|
+
value: i.data
|
|
6193
|
+
} : i.common.async ? Promise.resolve(s).then((o) => this._def.schema._parseAsync({
|
|
6184
6194
|
data: o,
|
|
6185
|
-
path:
|
|
6186
|
-
parent:
|
|
6195
|
+
path: i.path,
|
|
6196
|
+
parent: i
|
|
6187
6197
|
})) : this._def.schema._parseSync({
|
|
6188
6198
|
data: s,
|
|
6189
|
-
path:
|
|
6190
|
-
parent:
|
|
6199
|
+
path: i.path,
|
|
6200
|
+
parent: i
|
|
6191
6201
|
});
|
|
6192
6202
|
}
|
|
6193
6203
|
if (a.type === "refinement") {
|
|
6194
6204
|
const s = (o) => {
|
|
6195
6205
|
const m = a.refinement(o, r);
|
|
6196
|
-
if (
|
|
6206
|
+
if (i.common.async)
|
|
6197
6207
|
return Promise.resolve(m);
|
|
6198
6208
|
if (m instanceof Promise)
|
|
6199
6209
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
6200
6210
|
return o;
|
|
6201
6211
|
};
|
|
6202
|
-
if (
|
|
6212
|
+
if (i.common.async === !1) {
|
|
6203
6213
|
const o = this._def.schema._parseSync({
|
|
6204
|
-
data:
|
|
6205
|
-
path:
|
|
6206
|
-
parent:
|
|
6214
|
+
data: i.data,
|
|
6215
|
+
path: i.path,
|
|
6216
|
+
parent: i
|
|
6207
6217
|
});
|
|
6208
6218
|
return o.status === "aborted" ? _ : (o.status === "dirty" && t.dirty(), s(o.value), { status: t.value, value: o.value });
|
|
6209
6219
|
} else
|
|
6210
|
-
return this._def.schema._parseAsync({ data:
|
|
6220
|
+
return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((o) => o.status === "aborted" ? _ : (o.status === "dirty" && t.dirty(), s(o.value).then(() => ({ status: t.value, value: o.value }))));
|
|
6211
6221
|
}
|
|
6212
6222
|
if (a.type === "transform")
|
|
6213
|
-
if (
|
|
6223
|
+
if (i.common.async === !1) {
|
|
6214
6224
|
const s = this._def.schema._parseSync({
|
|
6215
|
-
data:
|
|
6216
|
-
path:
|
|
6217
|
-
parent:
|
|
6225
|
+
data: i.data,
|
|
6226
|
+
path: i.path,
|
|
6227
|
+
parent: i
|
|
6218
6228
|
});
|
|
6219
6229
|
if (!H(s))
|
|
6220
6230
|
return s;
|
|
@@ -6223,19 +6233,19 @@ class I extends v {
|
|
|
6223
6233
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
6224
6234
|
return { status: t.value, value: o };
|
|
6225
6235
|
} else
|
|
6226
|
-
return this._def.schema._parseAsync({ data:
|
|
6236
|
+
return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((s) => H(s) ? Promise.resolve(a.transform(s.value, r)).then((o) => ({ status: t.value, value: o })) : s);
|
|
6227
6237
|
x.assertNever(a);
|
|
6228
6238
|
}
|
|
6229
6239
|
}
|
|
6230
|
-
I.create = (
|
|
6231
|
-
schema:
|
|
6240
|
+
I.create = (n, e, t) => new I({
|
|
6241
|
+
schema: n,
|
|
6232
6242
|
typeName: f.ZodEffects,
|
|
6233
6243
|
effect: e,
|
|
6234
6244
|
...g(t)
|
|
6235
6245
|
});
|
|
6236
|
-
I.createWithPreprocess = (
|
|
6246
|
+
I.createWithPreprocess = (n, e, t) => new I({
|
|
6237
6247
|
schema: e,
|
|
6238
|
-
effect: { type: "preprocess", transform:
|
|
6248
|
+
effect: { type: "preprocess", transform: n },
|
|
6239
6249
|
typeName: f.ZodEffects,
|
|
6240
6250
|
...g(t)
|
|
6241
6251
|
});
|
|
@@ -6247,8 +6257,8 @@ class P extends v {
|
|
|
6247
6257
|
return this._def.innerType;
|
|
6248
6258
|
}
|
|
6249
6259
|
}
|
|
6250
|
-
P.create = (
|
|
6251
|
-
innerType:
|
|
6260
|
+
P.create = (n, e) => new P({
|
|
6261
|
+
innerType: n,
|
|
6252
6262
|
typeName: f.ZodOptional,
|
|
6253
6263
|
...g(e)
|
|
6254
6264
|
});
|
|
@@ -6260,17 +6270,17 @@ class q extends v {
|
|
|
6260
6270
|
return this._def.innerType;
|
|
6261
6271
|
}
|
|
6262
6272
|
}
|
|
6263
|
-
q.create = (
|
|
6264
|
-
innerType:
|
|
6273
|
+
q.create = (n, e) => new q({
|
|
6274
|
+
innerType: n,
|
|
6265
6275
|
typeName: f.ZodNullable,
|
|
6266
6276
|
...g(e)
|
|
6267
6277
|
});
|
|
6268
6278
|
class re extends v {
|
|
6269
6279
|
_parse(e) {
|
|
6270
6280
|
const { ctx: t } = this._processInputParams(e);
|
|
6271
|
-
let
|
|
6272
|
-
return t.parsedType === l.undefined && (
|
|
6273
|
-
data:
|
|
6281
|
+
let i = t.data;
|
|
6282
|
+
return t.parsedType === l.undefined && (i = this._def.defaultValue()), this._def.innerType._parse({
|
|
6283
|
+
data: i,
|
|
6274
6284
|
path: t.path,
|
|
6275
6285
|
parent: t
|
|
6276
6286
|
});
|
|
@@ -6279,42 +6289,42 @@ class re extends v {
|
|
|
6279
6289
|
return this._def.innerType;
|
|
6280
6290
|
}
|
|
6281
6291
|
}
|
|
6282
|
-
re.create = (
|
|
6283
|
-
innerType:
|
|
6292
|
+
re.create = (n, e) => new re({
|
|
6293
|
+
innerType: n,
|
|
6284
6294
|
typeName: f.ZodDefault,
|
|
6285
6295
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
6286
6296
|
...g(e)
|
|
6287
6297
|
});
|
|
6288
6298
|
class fe extends v {
|
|
6289
6299
|
_parse(e) {
|
|
6290
|
-
const { ctx: t } = this._processInputParams(e),
|
|
6300
|
+
const { ctx: t } = this._processInputParams(e), i = {
|
|
6291
6301
|
...t,
|
|
6292
6302
|
common: {
|
|
6293
6303
|
...t.common,
|
|
6294
6304
|
issues: []
|
|
6295
6305
|
}
|
|
6296
6306
|
}, a = this._def.innerType._parse({
|
|
6297
|
-
data:
|
|
6298
|
-
path:
|
|
6307
|
+
data: i.data,
|
|
6308
|
+
path: i.path,
|
|
6299
6309
|
parent: {
|
|
6300
|
-
...
|
|
6310
|
+
...i
|
|
6301
6311
|
}
|
|
6302
6312
|
});
|
|
6303
6313
|
return le(a) ? a.then((r) => ({
|
|
6304
6314
|
status: "valid",
|
|
6305
6315
|
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
6306
6316
|
get error() {
|
|
6307
|
-
return new E(
|
|
6317
|
+
return new E(i.common.issues);
|
|
6308
6318
|
},
|
|
6309
|
-
input:
|
|
6319
|
+
input: i.data
|
|
6310
6320
|
})
|
|
6311
6321
|
})) : {
|
|
6312
6322
|
status: "valid",
|
|
6313
6323
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
6314
6324
|
get error() {
|
|
6315
|
-
return new E(
|
|
6325
|
+
return new E(i.common.issues);
|
|
6316
6326
|
},
|
|
6317
|
-
input:
|
|
6327
|
+
input: i.data
|
|
6318
6328
|
})
|
|
6319
6329
|
};
|
|
6320
6330
|
}
|
|
@@ -6322,8 +6332,8 @@ class fe extends v {
|
|
|
6322
6332
|
return this._def.innerType;
|
|
6323
6333
|
}
|
|
6324
6334
|
}
|
|
6325
|
-
fe.create = (
|
|
6326
|
-
innerType:
|
|
6335
|
+
fe.create = (n, e) => new fe({
|
|
6336
|
+
innerType: n,
|
|
6327
6337
|
typeName: f.ZodCatch,
|
|
6328
6338
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
6329
6339
|
...g(e)
|
|
@@ -6331,26 +6341,26 @@ fe.create = (i, e) => new fe({
|
|
|
6331
6341
|
class he extends v {
|
|
6332
6342
|
_parse(e) {
|
|
6333
6343
|
if (this._getType(e) !== l.nan) {
|
|
6334
|
-
const
|
|
6335
|
-
return u(
|
|
6344
|
+
const i = this._getOrReturnCtx(e);
|
|
6345
|
+
return u(i, {
|
|
6336
6346
|
code: c.invalid_type,
|
|
6337
6347
|
expected: l.nan,
|
|
6338
|
-
received:
|
|
6348
|
+
received: i.parsedType
|
|
6339
6349
|
}), _;
|
|
6340
6350
|
}
|
|
6341
6351
|
return { status: "valid", value: e.data };
|
|
6342
6352
|
}
|
|
6343
6353
|
}
|
|
6344
|
-
he.create = (
|
|
6354
|
+
he.create = (n) => new he({
|
|
6345
6355
|
typeName: f.ZodNaN,
|
|
6346
|
-
...g(
|
|
6356
|
+
...g(n)
|
|
6347
6357
|
});
|
|
6348
6358
|
const ct = Symbol("zod_brand");
|
|
6349
6359
|
class Ee extends v {
|
|
6350
6360
|
_parse(e) {
|
|
6351
|
-
const { ctx: t } = this._processInputParams(e),
|
|
6361
|
+
const { ctx: t } = this._processInputParams(e), i = t.data;
|
|
6352
6362
|
return this._def.type._parse({
|
|
6353
|
-
data:
|
|
6363
|
+
data: i,
|
|
6354
6364
|
path: t.path,
|
|
6355
6365
|
parent: t
|
|
6356
6366
|
});
|
|
@@ -6361,33 +6371,33 @@ class Ee extends v {
|
|
|
6361
6371
|
}
|
|
6362
6372
|
class se extends v {
|
|
6363
6373
|
_parse(e) {
|
|
6364
|
-
const { status: t, ctx:
|
|
6365
|
-
if (
|
|
6374
|
+
const { status: t, ctx: i } = this._processInputParams(e);
|
|
6375
|
+
if (i.common.async)
|
|
6366
6376
|
return (async () => {
|
|
6367
6377
|
const r = await this._def.in._parseAsync({
|
|
6368
|
-
data:
|
|
6369
|
-
path:
|
|
6370
|
-
parent:
|
|
6378
|
+
data: i.data,
|
|
6379
|
+
path: i.path,
|
|
6380
|
+
parent: i
|
|
6371
6381
|
});
|
|
6372
6382
|
return r.status === "aborted" ? _ : r.status === "dirty" ? (t.dirty(), Se(r.value)) : this._def.out._parseAsync({
|
|
6373
6383
|
data: r.value,
|
|
6374
|
-
path:
|
|
6375
|
-
parent:
|
|
6384
|
+
path: i.path,
|
|
6385
|
+
parent: i
|
|
6376
6386
|
});
|
|
6377
6387
|
})();
|
|
6378
6388
|
{
|
|
6379
6389
|
const a = this._def.in._parseSync({
|
|
6380
|
-
data:
|
|
6381
|
-
path:
|
|
6382
|
-
parent:
|
|
6390
|
+
data: i.data,
|
|
6391
|
+
path: i.path,
|
|
6392
|
+
parent: i
|
|
6383
6393
|
});
|
|
6384
6394
|
return a.status === "aborted" ? _ : a.status === "dirty" ? (t.dirty(), {
|
|
6385
6395
|
status: "dirty",
|
|
6386
6396
|
value: a.value
|
|
6387
6397
|
}) : this._def.out._parseSync({
|
|
6388
6398
|
data: a.value,
|
|
6389
|
-
path:
|
|
6390
|
-
parent:
|
|
6399
|
+
path: i.path,
|
|
6400
|
+
parent: i
|
|
6391
6401
|
});
|
|
6392
6402
|
}
|
|
6393
6403
|
}
|
|
@@ -6405,35 +6415,35 @@ class _e extends v {
|
|
|
6405
6415
|
return H(t) && (t.value = Object.freeze(t.value)), t;
|
|
6406
6416
|
}
|
|
6407
6417
|
}
|
|
6408
|
-
_e.create = (
|
|
6409
|
-
innerType:
|
|
6418
|
+
_e.create = (n, e) => new _e({
|
|
6419
|
+
innerType: n,
|
|
6410
6420
|
typeName: f.ZodReadonly,
|
|
6411
6421
|
...g(e)
|
|
6412
6422
|
});
|
|
6413
|
-
const Oe = (
|
|
6423
|
+
const Oe = (n, e = {}, t) => n ? W.create().superRefine((i, a) => {
|
|
6414
6424
|
var r, s;
|
|
6415
|
-
if (!i
|
|
6416
|
-
const o = typeof e == "function" ? e(
|
|
6425
|
+
if (!n(i)) {
|
|
6426
|
+
const o = typeof e == "function" ? e(i) : typeof e == "string" ? { message: e } : e, m = (s = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && s !== void 0 ? s : !0, d = typeof o == "string" ? { message: o } : o;
|
|
6417
6427
|
a.addIssue({ code: "custom", ...d, fatal: m });
|
|
6418
6428
|
}
|
|
6419
6429
|
}) : W.create(), dt = {
|
|
6420
6430
|
object: w.lazycreate
|
|
6421
6431
|
};
|
|
6422
6432
|
var f;
|
|
6423
|
-
(function(
|
|
6424
|
-
|
|
6433
|
+
(function(n) {
|
|
6434
|
+
n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
|
|
6425
6435
|
})(f || (f = {}));
|
|
6426
|
-
const lt = (
|
|
6427
|
-
message: `Input not instance of ${
|
|
6428
|
-
}) => Oe((t) => t instanceof
|
|
6429
|
-
string: (
|
|
6430
|
-
number: (
|
|
6431
|
-
boolean: (
|
|
6432
|
-
...
|
|
6436
|
+
const lt = (n, e = {
|
|
6437
|
+
message: `Input not instance of ${n.name}`
|
|
6438
|
+
}) => Oe((t) => t instanceof n, e), Ie = A.create, Me = D.create, ut = he.create, mt = B.create, Ne = J.create, pt = $.create, ft = ue.create, ht = Q.create, _t = X.create, gt = W.create, vt = V.create, yt = L.create, bt = me.create, xt = O.create, wt = w.create, Tt = w.strictCreate, Ct = K.create, Rt = ge.create, kt = ee.create, St = N.create, At = te.create, Et = pe.create, Ot = U.create, It = z.create, Mt = ne.create, Nt = ie.create, Pt = Z.create, Lt = ae.create, jt = Y.create, Re = I.create, Dt = P.create, Bt = q.create, Zt = I.createWithPreprocess, Vt = se.create, $t = () => Ie().optional(), Ut = () => Me().optional(), qt = () => Ne().optional(), Gt = {
|
|
6439
|
+
string: (n) => A.create({ ...n, coerce: !0 }),
|
|
6440
|
+
number: (n) => D.create({ ...n, coerce: !0 }),
|
|
6441
|
+
boolean: (n) => J.create({
|
|
6442
|
+
...n,
|
|
6433
6443
|
coerce: !0
|
|
6434
6444
|
}),
|
|
6435
|
-
bigint: (
|
|
6436
|
-
date: (
|
|
6445
|
+
bigint: (n) => B.create({ ...n, coerce: !0 }),
|
|
6446
|
+
date: (n) => $.create({ ...n, coerce: !0 })
|
|
6437
6447
|
}, zt = _;
|
|
6438
6448
|
var Wt = /* @__PURE__ */ Object.freeze({
|
|
6439
6449
|
__proto__: null,
|
|
@@ -6482,8 +6492,8 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6482
6492
|
ZodMap: pe,
|
|
6483
6493
|
ZodSet: U,
|
|
6484
6494
|
ZodFunction: z,
|
|
6485
|
-
ZodLazy:
|
|
6486
|
-
ZodLiteral:
|
|
6495
|
+
ZodLazy: ne,
|
|
6496
|
+
ZodLiteral: ie,
|
|
6487
6497
|
ZodEnum: Z,
|
|
6488
6498
|
ZodNativeEnum: ae,
|
|
6489
6499
|
ZodPromise: Y,
|
|
@@ -6587,7 +6597,7 @@ const Yt = [
|
|
|
6587
6597
|
"BIN",
|
|
6588
6598
|
,
|
|
6589
6599
|
"QUEUE"
|
|
6590
|
-
].map((
|
|
6600
|
+
].map((n) => `$connect-${n}`), Ft = Wt.enum(Yt), h = Ft.Enum, Xt = [
|
|
6591
6601
|
{
|
|
6592
6602
|
path: "",
|
|
6593
6603
|
name: h["$connect-DASHBOARD"],
|
|
@@ -6602,7 +6612,7 @@ const Yt = [
|
|
|
6602
6612
|
path: "/analytic",
|
|
6603
6613
|
name: h["$connect-ANALYTIC"],
|
|
6604
6614
|
component: C(
|
|
6605
|
-
T(() => import("./Analytic-
|
|
6615
|
+
T(() => import("./Analytic-BykZRzDs.js"))
|
|
6606
6616
|
),
|
|
6607
6617
|
meta: {
|
|
6608
6618
|
validationManifest: {
|
|
@@ -6627,7 +6637,7 @@ const Yt = [
|
|
|
6627
6637
|
path: "/campaign/promotion",
|
|
6628
6638
|
name: h["$connect-CAMPAIGN_PROMOTION"],
|
|
6629
6639
|
component: C(
|
|
6630
|
-
T(() => import("./Promotion-
|
|
6640
|
+
T(() => import("./Promotion-C72ZIHQC.js"))
|
|
6631
6641
|
),
|
|
6632
6642
|
meta: {
|
|
6633
6643
|
validationManifest: {
|
|
@@ -6648,7 +6658,7 @@ const Yt = [
|
|
|
6648
6658
|
path: "/campaign/voucher",
|
|
6649
6659
|
name: h["$connect-CAMPAIGN_VOUCHER"],
|
|
6650
6660
|
component: C(
|
|
6651
|
-
T(() => import("./Voucher-
|
|
6661
|
+
T(() => import("./Voucher-COtfsGvM.js"))
|
|
6652
6662
|
),
|
|
6653
6663
|
meta: {
|
|
6654
6664
|
validationManifest: {
|
|
@@ -6666,7 +6676,7 @@ const Yt = [
|
|
|
6666
6676
|
name: h["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
6667
6677
|
component: C(
|
|
6668
6678
|
T(
|
|
6669
|
-
() => import("./Collections-
|
|
6679
|
+
() => import("./Collections-DLU_r242.js")
|
|
6670
6680
|
)
|
|
6671
6681
|
),
|
|
6672
6682
|
meta: {
|
|
@@ -6686,7 +6696,7 @@ const Yt = [
|
|
|
6686
6696
|
path: "/campaign/broadcast",
|
|
6687
6697
|
name: h["$connect-CAMPAIGN_BROADCAST"],
|
|
6688
6698
|
component: C(
|
|
6689
|
-
T(() => import("./Broadcast-
|
|
6699
|
+
T(() => import("./Broadcast-HujD0CH6.js"))
|
|
6690
6700
|
),
|
|
6691
6701
|
meta: {
|
|
6692
6702
|
validationManifest: {
|
|
@@ -6723,37 +6733,37 @@ const Yt = [
|
|
|
6723
6733
|
{
|
|
6724
6734
|
path: "/program/tier",
|
|
6725
6735
|
name: h["$connect-PROGRAM_TIER"],
|
|
6726
|
-
component: () => import("./Tier-
|
|
6736
|
+
component: () => import("./Tier-DoGYPOK2.js")
|
|
6727
6737
|
},
|
|
6728
6738
|
{
|
|
6729
6739
|
path: "/program/title",
|
|
6730
6740
|
name: h["$connect-PROGRAM_TITLE"],
|
|
6731
|
-
component: () => import("./Title-
|
|
6741
|
+
component: () => import("./Title-Dcg5_aiJ.js")
|
|
6732
6742
|
},
|
|
6733
6743
|
{
|
|
6734
6744
|
path: "/program/experience",
|
|
6735
6745
|
name: h["$connect-PROGRAM_EXPERIENCE"],
|
|
6736
|
-
component: () => import("./Experience-
|
|
6746
|
+
component: () => import("./Experience-DbeeaSny.js")
|
|
6737
6747
|
},
|
|
6738
6748
|
{
|
|
6739
6749
|
path: "/program/point",
|
|
6740
6750
|
name: h["$connect-PROGRAM_POINT"],
|
|
6741
|
-
component: () => import("./Point-
|
|
6751
|
+
component: () => import("./Point-DMUJXRIW.js")
|
|
6742
6752
|
},
|
|
6743
6753
|
{
|
|
6744
6754
|
path: "/program/credit",
|
|
6745
6755
|
name: h["$connect-PROGRAM_CREDIT"],
|
|
6746
|
-
component: () => import("./Credit-
|
|
6756
|
+
component: () => import("./Credit-DPxRywNS.js")
|
|
6747
6757
|
},
|
|
6748
6758
|
{
|
|
6749
6759
|
path: "/program/game",
|
|
6750
6760
|
name: h["$connect-PROGRAM_GAME"],
|
|
6751
|
-
component: () => import("./Game-
|
|
6761
|
+
component: () => import("./Game-DF-tRQmA.js")
|
|
6752
6762
|
},
|
|
6753
6763
|
{
|
|
6754
6764
|
path: "/program/mission",
|
|
6755
6765
|
name: h["$connect-PROGRAM_MISSION"],
|
|
6756
|
-
component: () => import("./Mission-
|
|
6766
|
+
component: () => import("./Mission-af0CLDdi.js")
|
|
6757
6767
|
}
|
|
6758
6768
|
]
|
|
6759
6769
|
},
|
|
@@ -6778,7 +6788,7 @@ const Yt = [
|
|
|
6778
6788
|
{
|
|
6779
6789
|
path: "/loyalty/member",
|
|
6780
6790
|
name: h["$connect-LOYALTY_MEMBER"],
|
|
6781
|
-
component: () => import("./Member-
|
|
6791
|
+
component: () => import("./Member-DeAQPJ5c.js"),
|
|
6782
6792
|
redirect: {
|
|
6783
6793
|
name: h["$connect-LOYALTY_MEMBER_OVERVIEW"]
|
|
6784
6794
|
},
|
|
@@ -6791,24 +6801,24 @@ const Yt = [
|
|
|
6791
6801
|
{
|
|
6792
6802
|
path: "/loyalty/member/list",
|
|
6793
6803
|
name: h["$connect-LOYALTY_MEMBER_LIST"],
|
|
6794
|
-
component: () => import("./MemberList-
|
|
6804
|
+
component: () => import("./MemberList-CK3ItLYd.js")
|
|
6795
6805
|
},
|
|
6796
6806
|
{
|
|
6797
6807
|
path: "/loyalty/member/transactions/:id",
|
|
6798
6808
|
name: h["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
6799
|
-
component: () => import("./MemberTransactions-
|
|
6809
|
+
component: () => import("./MemberTransactions-ChvkxttB.js")
|
|
6800
6810
|
}
|
|
6801
6811
|
]
|
|
6802
6812
|
},
|
|
6803
6813
|
{
|
|
6804
6814
|
path: "/loyalty/segment",
|
|
6805
6815
|
name: h["$connect-LOYALTY_SEGMENT"],
|
|
6806
|
-
component: () => import("./Segment-
|
|
6816
|
+
component: () => import("./Segment-CsCYYgLL.js")
|
|
6807
6817
|
},
|
|
6808
6818
|
{
|
|
6809
6819
|
path: "/loyalty/card",
|
|
6810
6820
|
name: h["$connect-LOYALTY_CARD"],
|
|
6811
|
-
component: () => import("./Card-
|
|
6821
|
+
component: () => import("./Card-dEGuVh8Y.js")
|
|
6812
6822
|
}
|
|
6813
6823
|
]
|
|
6814
6824
|
},
|
|
@@ -6832,7 +6842,7 @@ const Yt = [
|
|
|
6832
6842
|
{
|
|
6833
6843
|
path: "/referral",
|
|
6834
6844
|
name: h["$connect-REFERRAL"],
|
|
6835
|
-
component: () => import("./Index-
|
|
6845
|
+
component: () => import("./Index-D-Gl4vEU.js"),
|
|
6836
6846
|
redirect: {
|
|
6837
6847
|
name: h["$connect-REFERRAL_OVERVIEW"]
|
|
6838
6848
|
},
|
|
@@ -6840,12 +6850,12 @@ const Yt = [
|
|
|
6840
6850
|
{
|
|
6841
6851
|
path: "/referral",
|
|
6842
6852
|
name: h["$connect-REFERRAL_OVERVIEW"],
|
|
6843
|
-
component: () => import("./Overview-
|
|
6853
|
+
component: () => import("./Overview-bE-CxDyW.js")
|
|
6844
6854
|
},
|
|
6845
6855
|
{
|
|
6846
6856
|
path: "/referral/record",
|
|
6847
6857
|
name: h["$connect-REFERRAL_RECORD"],
|
|
6848
|
-
component: () => import("./Record-
|
|
6858
|
+
component: () => import("./Record-BTXkLR-X.js")
|
|
6849
6859
|
}
|
|
6850
6860
|
]
|
|
6851
6861
|
}
|
|
@@ -6870,7 +6880,7 @@ const Yt = [
|
|
|
6870
6880
|
{
|
|
6871
6881
|
path: "/store",
|
|
6872
6882
|
name: h["$connect-STORE"],
|
|
6873
|
-
component: () => import("./Store-
|
|
6883
|
+
component: () => import("./Store-DC3YkCuT.js")
|
|
6874
6884
|
},
|
|
6875
6885
|
{
|
|
6876
6886
|
path: "/store/rewards",
|
|
@@ -6879,12 +6889,12 @@ const Yt = [
|
|
|
6879
6889
|
{
|
|
6880
6890
|
path: "/store/rewards",
|
|
6881
6891
|
name: h["$connect-STORE_REWARDS"],
|
|
6882
|
-
component: () => import("./StoreRewards-
|
|
6892
|
+
component: () => import("./StoreRewards-BLSf4yL5.js")
|
|
6883
6893
|
},
|
|
6884
6894
|
{
|
|
6885
6895
|
path: "/store/rewards/:id/collections",
|
|
6886
6896
|
name: h["$connect-STORE_REWARD_COLLECTIONS"],
|
|
6887
|
-
component: () => import("./Collections-
|
|
6897
|
+
component: () => import("./Collections-DLU_r242.js")
|
|
6888
6898
|
}
|
|
6889
6899
|
]
|
|
6890
6900
|
}
|
|
@@ -6909,7 +6919,7 @@ const Yt = [
|
|
|
6909
6919
|
{
|
|
6910
6920
|
path: "/transaction",
|
|
6911
6921
|
name: h["$connect-TRANSACTION"],
|
|
6912
|
-
component: () => import("./Transaction-
|
|
6922
|
+
component: () => import("./Transaction-DjzGqSTu.js")
|
|
6913
6923
|
}
|
|
6914
6924
|
]
|
|
6915
6925
|
},
|
|
@@ -6932,7 +6942,7 @@ const Yt = [
|
|
|
6932
6942
|
{
|
|
6933
6943
|
path: "/marketing",
|
|
6934
6944
|
name: h["$connect-MARKETING"],
|
|
6935
|
-
component: () => import("./Marketing-
|
|
6945
|
+
component: () => import("./Marketing-BVUn9m1D.js")
|
|
6936
6946
|
}
|
|
6937
6947
|
]
|
|
6938
6948
|
},
|
|
@@ -6955,7 +6965,7 @@ const Yt = [
|
|
|
6955
6965
|
{
|
|
6956
6966
|
path: "/reward",
|
|
6957
6967
|
name: h["$connect-REWARD_TEMPLATE"],
|
|
6958
|
-
component: () => import("./Reward-
|
|
6968
|
+
component: () => import("./Reward-UtZnwyhC.js")
|
|
6959
6969
|
}
|
|
6960
6970
|
]
|
|
6961
6971
|
},
|
|
@@ -6978,7 +6988,7 @@ const Yt = [
|
|
|
6978
6988
|
{
|
|
6979
6989
|
path: "/audit-logs",
|
|
6980
6990
|
name: h["$connect-AUDIT_LOGS"],
|
|
6981
|
-
component: () => import("./AuditLogs-
|
|
6991
|
+
component: () => import("./AuditLogs-D_Tj-hN5.js")
|
|
6982
6992
|
}
|
|
6983
6993
|
]
|
|
6984
6994
|
},
|
|
@@ -7001,7 +7011,7 @@ const Yt = [
|
|
|
7001
7011
|
{
|
|
7002
7012
|
path: "/setting",
|
|
7003
7013
|
name: h["$connect-SETTING"],
|
|
7004
|
-
component: () => import("./Setting-
|
|
7014
|
+
component: () => import("./Setting-B1W1sMAI.js")
|
|
7005
7015
|
}
|
|
7006
7016
|
]
|
|
7007
7017
|
},
|
|
@@ -7022,7 +7032,7 @@ const Yt = [
|
|
|
7022
7032
|
{
|
|
7023
7033
|
path: "/bin",
|
|
7024
7034
|
name: h["$connect-BIN"],
|
|
7025
|
-
component: () => import("./Bin-
|
|
7035
|
+
component: () => import("./Bin-B9DIsHlV.js")
|
|
7026
7036
|
}
|
|
7027
7037
|
]
|
|
7028
7038
|
},
|
|
@@ -7045,7 +7055,7 @@ const Yt = [
|
|
|
7045
7055
|
{
|
|
7046
7056
|
path: "/queue",
|
|
7047
7057
|
name: h["$connect-QUEUE"],
|
|
7048
|
-
component: () => import("./Queue-
|
|
7058
|
+
component: () => import("./Queue-BxVMOXfX.js")
|
|
7049
7059
|
}
|
|
7050
7060
|
]
|
|
7051
7061
|
}
|
|
@@ -7054,9 +7064,9 @@ const Yt = [
|
|
|
7054
7064
|
"zh-CN": $e,
|
|
7055
7065
|
"th-TH": qe,
|
|
7056
7066
|
"zh-Hant": Ye
|
|
7057
|
-
},
|
|
7067
|
+
}, en = T(() => import("./App-DlJhQ-d7.js"));
|
|
7058
7068
|
export {
|
|
7059
|
-
|
|
7069
|
+
en as F,
|
|
7060
7070
|
h as R,
|
|
7061
7071
|
c as Z,
|
|
7062
7072
|
l as a,
|