twenty-sdk 0.2.4 → 0.3.0-alpha
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/ObjectRecordGroupByDateGranularity-CtpRADP1-Bft-VMSh.mjs +3151 -0
- package/dist/ObjectRecordGroupByDateGranularity-CtpRADP1-Duv5iOeZ.js +20 -0
- package/dist/application/define-app.d.ts +18 -0
- package/dist/application/functions/define-function.d.ts +28 -0
- package/dist/application/functions/function-config.d.ts +2 -0
- package/dist/application/functions/triggers/cron-payload-type.d.ts +1 -1
- package/dist/application/index.d.ts +5 -1
- package/dist/application/objects/define-object.d.ts +35 -0
- package/dist/application/roles/define-role.d.ts +26 -0
- package/dist/cli/commands/app-add.command.d.ts +2 -1
- package/dist/cli/utils/config-loader.d.ts +43 -0
- package/dist/cli/utils/display-entity-summary.d.ts +2 -0
- package/dist/cli/utils/display-errors.d.ts +2 -0
- package/dist/cli/utils/display-warnings.d.ts +2 -0
- package/dist/cli/utils/get-new-object-file-content.d.ts +9 -0
- package/dist/cli/utils/get-role-base-file.d.ts +4 -0
- package/dist/cli/utils/load-manifest.d.ts +37 -6
- package/dist/cli/utils/validate-manifest.d.ts +22 -0
- package/dist/cli.cjs +133 -79
- package/dist/cli.mjs +3317 -3162
- package/dist/index.cjs +2 -21
- package/dist/index.mjs +237 -3283
- package/dist/vendor/twenty-shared/ObjectRecordGroupByDateGranularity-BwpmSE4s.js +1 -0
- package/dist/vendor/twenty-shared/{FieldMetadataDefaultValue-CJU0Y2Fi.mjs → ObjectRecordGroupByDateGranularity-CtpRADP1.mjs} +219 -217
- package/dist/vendor/twenty-shared/RatingValues-B_wgYyso.js +1 -0
- package/dist/vendor/twenty-shared/{RatingValues-4GPp8aN_.mjs → RatingValues-DNSj7xKA.mjs} +63 -5
- package/dist/vendor/twenty-shared/application/fieldManifestType.d.ts +1 -0
- package/dist/vendor/twenty-shared/application/fieldManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/index.d.ts +1 -1
- package/dist/vendor/twenty-shared/application/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/objectManifestType.d.ts +1 -1
- package/dist/vendor/twenty-shared/application/objectManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/serverlessFunctionManifestType.d.ts +12 -1
- package/dist/vendor/twenty-shared/application/serverlessFunctionManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/constants/GroupByDateGranularityThatRequireTimeZone.d.ts +4 -0
- package/dist/vendor/twenty-shared/constants/GroupByDateGranularityThatRequireTimeZone.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/ViewGroupVisibleOptionsMax.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/ViewGroupVisibleOptionsMax.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/index.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/constants.cjs +1 -1
- package/dist/vendor/twenty-shared/constants.mjs +34 -33
- package/dist/vendor/twenty-shared/index.cjs +1 -1
- package/dist/vendor/twenty-shared/index.d.ts +0 -1
- package/dist/vendor/twenty-shared/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/index.mjs +2 -5
- package/dist/vendor/twenty-shared/isValidCountryCode-DKpNbkXA.mjs +8533 -0
- package/dist/vendor/twenty-shared/isValidCountryCode-DgPRUhSL.js +4 -0
- package/dist/vendor/twenty-shared/metadata/MetadataValidationError.d.ts +2 -2
- package/dist/vendor/twenty-shared/metadata/MetadataValidationError.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata/all-metadata-name.constant.d.ts +4 -0
- package/dist/vendor/twenty-shared/metadata/all-metadata-name.constant.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata.cjs +1 -1
- package/dist/vendor/twenty-shared/metadata.mjs +12 -8
- package/dist/vendor/twenty-shared/types/ArraySortDirection.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/ArraySortDirection.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/CrudOperationType.d.ts +8 -0
- package/dist/vendor/twenty-shared/types/CrudOperationType.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/ExtractPropertiesThatEndsWithIds.d.ts +4 -0
- package/dist/vendor/twenty-shared/types/ExtractPropertiesThatEndsWithIds.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordFilterValueDependencies.d.ts +1 -0
- package/dist/vendor/twenty-shared/types/RecordFilterValueDependencies.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts +3 -1
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/ViewFilterOperand.d.ts +1 -1
- package/dist/vendor/twenty-shared/types/ViewFilterOperand.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/index.d.ts +3 -0
- package/dist/vendor/twenty-shared/types/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types.cjs +1 -1
- package/dist/vendor/twenty-shared/types.mjs +60 -59
- package/dist/vendor/twenty-shared/utils/array/{upsertIntoArrayOfObjectComparingId.d.ts → upsertIntoArrayOfObjectsComparingId.d.ts} +1 -1
- package/dist/vendor/twenty-shared/utils/array/upsertIntoArrayOfObjectsComparingId.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/array/upsertPropertiesOfItemIntoArrayOfObjectsComparingId.d.ts +6 -0
- package/dist/vendor/twenty-shared/utils/array/upsertPropertiesOfItemIntoArrayOfObjectsComparingId.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateAfter.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateAfter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBefore.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBefore.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBeforeOrEqual.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBeforeOrEqual.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInSameMonth.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInSameMonth.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInWeekend.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInWeekend.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isSamePlainDate.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isSamePlainDate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/parseToPlainDateOrThrow.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/parseToPlainDateOrThrow.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/sortPlainDate.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/date/sortPlainDate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/turnJSDateToPlainDate.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/turnJSDateToPlainDate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateIntoUserTimeZoneInstantString.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateIntoUserTimeZoneInstantString.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateToShiftedDateInSystemTimeZone.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateToShiftedDateInSystemTimeZone.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/index.d.ts +3 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataNumericKind.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataNumericKind.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataSelectKind.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataSelectKind.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataTextKind.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataTextKind.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/types/DateTimePeriod.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/types/DateTimePeriod.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToDateTime.d.ts +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToDateTime.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToZonedDateTime.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToZonedDateTime.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertCalendarStartDayNonIsoNumberToFirstDayOfTheWeek.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertCalendarStartDayNonIsoNumberToFirstDayOfTheWeek.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertFirstDayOfTheWeekToCalendarStartDayNumber.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertFirstDayOfTheWeekToCalendarStartDayNumber.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getFirstDayOfTheWeekAsISONumber.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getFirstDayOfTheWeekAsISONumber.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getNextPeriodStart.d.ts +8 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getNextPeriodStart.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPeriodStart.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPeriodStart.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/relativeDateFilterStringifiedSchema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveDateTimeFilter.d.ts +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveDateTimeFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateFilter.d.ts +2 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateFilterStringified.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilter.d.ts +4 -3
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilterStringified.d.ts +5 -3
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilterStringified.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/subUnitFromZonedDateTime.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/subUnitFromZonedDateTime.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/turnRecordFilterIntoGqlOperationFilter.d.ts +1 -1
- package/dist/vendor/twenty-shared/utils/filter/turnRecordFilterIntoGqlOperationFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/index.d.ts +24 -7
- package/dist/vendor/twenty-shared/utils/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/url/lowercaseUrlOriginAndRemoveTrailingSlash.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils.cjs +2 -3
- package/dist/vendor/twenty-shared/utils.mjs +774 -2484
- package/dist/vendor/twenty-shared/workflow/constants/IfElseBranchPositionOffsets.d.ts +11 -0
- package/dist/vendor/twenty-shared/workflow/constants/IfElseBranchPositionOffsets.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/index.d.ts +6 -0
- package/dist/vendor/twenty-shared/workflow/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/filter-action-settings-schema.d.ts +2 -5
- package/dist/vendor/twenty-shared/workflow/schemas/filter-action-settings-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/http-request-action-schema.d.ts +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/http-request-action-settings-schema.d.ts +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-schema.d.ts +49 -0
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-settings-schema.d.ts +43 -0
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-settings-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-group-schema.d.ts +10 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-group-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-schema.d.ts +16 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-action-schema.d.ts +46 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-action-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-schema.d.ts +46 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-state-schema.d.ts +46 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-state-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/types/StepIfElseBranch.d.ts +6 -0
- package/dist/vendor/twenty-shared/workflow/types/StepIfElseBranch.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow.cjs +3 -3
- package/dist/vendor/twenty-shared/workflow.mjs +199 -174
- package/package.json +3 -1
- package/dist/_commonjsHelpers-DKOUU3wS.js +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.mjs +0 -8
- package/dist/cli/utils/get-object-decorated-class.d.ts +0 -4
- package/dist/vendor/twenty-shared/FieldMetadataDefaultValue-CmL_eyqR.js +0 -1
- package/dist/vendor/twenty-shared/LabelIdentifierFieldMetadataTypes-BaWEb4k0.js +0 -1
- package/dist/vendor/twenty-shared/LabelIdentifierFieldMetadataTypes-BzzhC1dx.mjs +0 -55
- package/dist/vendor/twenty-shared/RatingValues-CBa057Mi.js +0 -1
- package/dist/vendor/twenty-shared/isValidCountryCode-DNOavXY6.js +0 -4
- package/dist/vendor/twenty-shared/isValidCountryCode-QjE8dukS.mjs +0 -6850
- package/dist/vendor/twenty-shared/utils/array/upsertIntoArrayOfObjectComparingId.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getDateFromPlainDate.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getDateFromPlainDate.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getEndUnitOfDateTime.d.ts +0 -6
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getEndUnitOfDateTime.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPlainDateFromDate.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPlainDateFromDate.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getStartUnitOfDateTime.d.ts +0 -6
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getStartUnitOfDateTime.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/shiftPointInTimeFromTimezoneDifferenceInMinutesWithSystemTimezone.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/shiftPointInTimeFromTimezoneDifferenceInMinutesWithSystemTimezone.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/utils/computeTimezoneDifferenceInMinutes.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/utils/computeTimezoneDifferenceInMinutes.d.ts.map +0 -1
|
@@ -0,0 +1,3151 @@
|
|
|
1
|
+
function u(e, t, n) {
|
|
2
|
+
function r(s, c) {
|
|
3
|
+
var l;
|
|
4
|
+
Object.defineProperty(s, "_zod", {
|
|
5
|
+
value: s._zod ?? {},
|
|
6
|
+
enumerable: !1
|
|
7
|
+
}), (l = s._zod).traits ?? (l.traits = /* @__PURE__ */ new Set()), s._zod.traits.add(e), t(s, c);
|
|
8
|
+
for (const m in a.prototype)
|
|
9
|
+
m in s || Object.defineProperty(s, m, { value: a.prototype[m].bind(s) });
|
|
10
|
+
s._zod.constr = a, s._zod.def = c;
|
|
11
|
+
}
|
|
12
|
+
const o = n?.Parent ?? Object;
|
|
13
|
+
class i extends o {
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(i, "name", { value: e });
|
|
16
|
+
function a(s) {
|
|
17
|
+
var c;
|
|
18
|
+
const l = n?.Parent ? new i() : this;
|
|
19
|
+
r(l, s), (c = l._zod).deferred ?? (c.deferred = []);
|
|
20
|
+
for (const m of l._zod.deferred)
|
|
21
|
+
m();
|
|
22
|
+
return l;
|
|
23
|
+
}
|
|
24
|
+
return Object.defineProperty(a, "init", { value: r }), Object.defineProperty(a, Symbol.hasInstance, {
|
|
25
|
+
value: (s) => n?.Parent && s instanceof n.Parent ? !0 : s?._zod?.traits?.has(e)
|
|
26
|
+
}), Object.defineProperty(a, "name", { value: e }), a;
|
|
27
|
+
}
|
|
28
|
+
class K extends Error {
|
|
29
|
+
constructor() {
|
|
30
|
+
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
class at extends Error {
|
|
34
|
+
constructor(t) {
|
|
35
|
+
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const st = {};
|
|
39
|
+
function x(e) {
|
|
40
|
+
return st;
|
|
41
|
+
}
|
|
42
|
+
function Ct(e) {
|
|
43
|
+
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
44
|
+
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
45
|
+
}
|
|
46
|
+
function ge(e, t) {
|
|
47
|
+
return typeof t == "bigint" ? t.toString() : t;
|
|
48
|
+
}
|
|
49
|
+
function $e(e) {
|
|
50
|
+
return {
|
|
51
|
+
get value() {
|
|
52
|
+
{
|
|
53
|
+
const t = e();
|
|
54
|
+
return Object.defineProperty(this, "value", { value: t }), t;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function we(e) {
|
|
60
|
+
return e == null;
|
|
61
|
+
}
|
|
62
|
+
function be(e) {
|
|
63
|
+
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
64
|
+
return e.slice(t, n);
|
|
65
|
+
}
|
|
66
|
+
const Pe = Symbol("evaluating");
|
|
67
|
+
function y(e, t, n) {
|
|
68
|
+
let r;
|
|
69
|
+
Object.defineProperty(e, t, {
|
|
70
|
+
get() {
|
|
71
|
+
if (r !== Pe)
|
|
72
|
+
return r === void 0 && (r = Pe, r = n()), r;
|
|
73
|
+
},
|
|
74
|
+
set(o) {
|
|
75
|
+
Object.defineProperty(e, t, {
|
|
76
|
+
value: o
|
|
77
|
+
// configurable: true,
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
configurable: !0
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function B(e, t, n) {
|
|
84
|
+
Object.defineProperty(e, t, {
|
|
85
|
+
value: n,
|
|
86
|
+
writable: !0,
|
|
87
|
+
enumerable: !0,
|
|
88
|
+
configurable: !0
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function q(...e) {
|
|
92
|
+
const t = {};
|
|
93
|
+
for (const n of e) {
|
|
94
|
+
const r = Object.getOwnPropertyDescriptors(n);
|
|
95
|
+
Object.assign(t, r);
|
|
96
|
+
}
|
|
97
|
+
return Object.defineProperties({}, t);
|
|
98
|
+
}
|
|
99
|
+
function Ue(e) {
|
|
100
|
+
return JSON.stringify(e);
|
|
101
|
+
}
|
|
102
|
+
const ut = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
103
|
+
};
|
|
104
|
+
function ae(e) {
|
|
105
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
106
|
+
}
|
|
107
|
+
const Ft = $e(() => {
|
|
108
|
+
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
109
|
+
return !1;
|
|
110
|
+
try {
|
|
111
|
+
const e = Function;
|
|
112
|
+
return new e(""), !0;
|
|
113
|
+
} catch {
|
|
114
|
+
return !1;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
function H(e) {
|
|
118
|
+
if (ae(e) === !1)
|
|
119
|
+
return !1;
|
|
120
|
+
const t = e.constructor;
|
|
121
|
+
if (t === void 0)
|
|
122
|
+
return !0;
|
|
123
|
+
const n = t.prototype;
|
|
124
|
+
return !(ae(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
125
|
+
}
|
|
126
|
+
function ct(e) {
|
|
127
|
+
return H(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
128
|
+
}
|
|
129
|
+
const Mt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
130
|
+
function fe(e) {
|
|
131
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
132
|
+
}
|
|
133
|
+
function C(e, t, n) {
|
|
134
|
+
const r = new e._zod.constr(t ?? e._zod.def);
|
|
135
|
+
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
136
|
+
}
|
|
137
|
+
function f(e) {
|
|
138
|
+
const t = e;
|
|
139
|
+
if (!t)
|
|
140
|
+
return {};
|
|
141
|
+
if (typeof t == "string")
|
|
142
|
+
return { error: () => t };
|
|
143
|
+
if (t?.message !== void 0) {
|
|
144
|
+
if (t?.error !== void 0)
|
|
145
|
+
throw new Error("Cannot specify both `message` and `error` params");
|
|
146
|
+
t.error = t.message;
|
|
147
|
+
}
|
|
148
|
+
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
149
|
+
}
|
|
150
|
+
function Lt(e) {
|
|
151
|
+
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
152
|
+
}
|
|
153
|
+
function jt(e, t) {
|
|
154
|
+
const n = e._zod.def, r = q(e._zod.def, {
|
|
155
|
+
get shape() {
|
|
156
|
+
const o = {};
|
|
157
|
+
for (const i in t) {
|
|
158
|
+
if (!(i in n.shape))
|
|
159
|
+
throw new Error(`Unrecognized key: "${i}"`);
|
|
160
|
+
t[i] && (o[i] = n.shape[i]);
|
|
161
|
+
}
|
|
162
|
+
return B(this, "shape", o), o;
|
|
163
|
+
},
|
|
164
|
+
checks: []
|
|
165
|
+
});
|
|
166
|
+
return C(e, r);
|
|
167
|
+
}
|
|
168
|
+
function xt(e, t) {
|
|
169
|
+
const n = e._zod.def, r = q(e._zod.def, {
|
|
170
|
+
get shape() {
|
|
171
|
+
const o = { ...e._zod.def.shape };
|
|
172
|
+
for (const i in t) {
|
|
173
|
+
if (!(i in n.shape))
|
|
174
|
+
throw new Error(`Unrecognized key: "${i}"`);
|
|
175
|
+
t[i] && delete o[i];
|
|
176
|
+
}
|
|
177
|
+
return B(this, "shape", o), o;
|
|
178
|
+
},
|
|
179
|
+
checks: []
|
|
180
|
+
});
|
|
181
|
+
return C(e, r);
|
|
182
|
+
}
|
|
183
|
+
function Vt(e, t) {
|
|
184
|
+
if (!H(t))
|
|
185
|
+
throw new Error("Invalid input to extend: expected a plain object");
|
|
186
|
+
const n = e._zod.def.checks;
|
|
187
|
+
if (n && n.length > 0)
|
|
188
|
+
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
189
|
+
const o = q(e._zod.def, {
|
|
190
|
+
get shape() {
|
|
191
|
+
const i = { ...e._zod.def.shape, ...t };
|
|
192
|
+
return B(this, "shape", i), i;
|
|
193
|
+
},
|
|
194
|
+
checks: []
|
|
195
|
+
});
|
|
196
|
+
return C(e, o);
|
|
197
|
+
}
|
|
198
|
+
function Bt(e, t) {
|
|
199
|
+
if (!H(t))
|
|
200
|
+
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
201
|
+
const n = {
|
|
202
|
+
...e._zod.def,
|
|
203
|
+
get shape() {
|
|
204
|
+
const r = { ...e._zod.def.shape, ...t };
|
|
205
|
+
return B(this, "shape", r), r;
|
|
206
|
+
},
|
|
207
|
+
checks: e._zod.def.checks
|
|
208
|
+
};
|
|
209
|
+
return C(e, n);
|
|
210
|
+
}
|
|
211
|
+
function qt(e, t) {
|
|
212
|
+
const n = q(e._zod.def, {
|
|
213
|
+
get shape() {
|
|
214
|
+
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
215
|
+
return B(this, "shape", r), r;
|
|
216
|
+
},
|
|
217
|
+
get catchall() {
|
|
218
|
+
return t._zod.def.catchall;
|
|
219
|
+
},
|
|
220
|
+
checks: []
|
|
221
|
+
// delete existing checks
|
|
222
|
+
});
|
|
223
|
+
return C(e, n);
|
|
224
|
+
}
|
|
225
|
+
function Wt(e, t, n) {
|
|
226
|
+
const r = q(t._zod.def, {
|
|
227
|
+
get shape() {
|
|
228
|
+
const o = t._zod.def.shape, i = { ...o };
|
|
229
|
+
if (n)
|
|
230
|
+
for (const a in n) {
|
|
231
|
+
if (!(a in o))
|
|
232
|
+
throw new Error(`Unrecognized key: "${a}"`);
|
|
233
|
+
n[a] && (i[a] = e ? new e({
|
|
234
|
+
type: "optional",
|
|
235
|
+
innerType: o[a]
|
|
236
|
+
}) : o[a]);
|
|
237
|
+
}
|
|
238
|
+
else
|
|
239
|
+
for (const a in o)
|
|
240
|
+
i[a] = e ? new e({
|
|
241
|
+
type: "optional",
|
|
242
|
+
innerType: o[a]
|
|
243
|
+
}) : o[a];
|
|
244
|
+
return B(this, "shape", i), i;
|
|
245
|
+
},
|
|
246
|
+
checks: []
|
|
247
|
+
});
|
|
248
|
+
return C(t, r);
|
|
249
|
+
}
|
|
250
|
+
function Kt(e, t, n) {
|
|
251
|
+
const r = q(t._zod.def, {
|
|
252
|
+
get shape() {
|
|
253
|
+
const o = t._zod.def.shape, i = { ...o };
|
|
254
|
+
if (n)
|
|
255
|
+
for (const a in n) {
|
|
256
|
+
if (!(a in i))
|
|
257
|
+
throw new Error(`Unrecognized key: "${a}"`);
|
|
258
|
+
n[a] && (i[a] = new e({
|
|
259
|
+
type: "nonoptional",
|
|
260
|
+
innerType: o[a]
|
|
261
|
+
}));
|
|
262
|
+
}
|
|
263
|
+
else
|
|
264
|
+
for (const a in o)
|
|
265
|
+
i[a] = new e({
|
|
266
|
+
type: "nonoptional",
|
|
267
|
+
innerType: o[a]
|
|
268
|
+
});
|
|
269
|
+
return B(this, "shape", i), i;
|
|
270
|
+
},
|
|
271
|
+
checks: []
|
|
272
|
+
});
|
|
273
|
+
return C(t, r);
|
|
274
|
+
}
|
|
275
|
+
function W(e, t = 0) {
|
|
276
|
+
if (e.aborted === !0)
|
|
277
|
+
return !0;
|
|
278
|
+
for (let n = t; n < e.issues.length; n++)
|
|
279
|
+
if (e.issues[n]?.continue !== !0)
|
|
280
|
+
return !0;
|
|
281
|
+
return !1;
|
|
282
|
+
}
|
|
283
|
+
function lt(e, t) {
|
|
284
|
+
return t.map((n) => {
|
|
285
|
+
var r;
|
|
286
|
+
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function J(e) {
|
|
290
|
+
return typeof e == "string" ? e : e?.message;
|
|
291
|
+
}
|
|
292
|
+
function V(e, t, n) {
|
|
293
|
+
const r = { ...e, path: e.path ?? [] };
|
|
294
|
+
if (!e.message) {
|
|
295
|
+
const o = J(e.inst?._zod.def?.error?.(e)) ?? J(t?.error?.(e)) ?? J(n.customError?.(e)) ?? J(n.localeError?.(e)) ?? "Invalid input";
|
|
296
|
+
r.message = o;
|
|
297
|
+
}
|
|
298
|
+
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
299
|
+
}
|
|
300
|
+
function Ze(e) {
|
|
301
|
+
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
302
|
+
}
|
|
303
|
+
function X(...e) {
|
|
304
|
+
const [t, n, r] = e;
|
|
305
|
+
return typeof t == "string" ? {
|
|
306
|
+
message: t,
|
|
307
|
+
code: "custom",
|
|
308
|
+
input: n,
|
|
309
|
+
inst: r
|
|
310
|
+
} : { ...t };
|
|
311
|
+
}
|
|
312
|
+
const ft = (e, t) => {
|
|
313
|
+
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
314
|
+
value: e._zod,
|
|
315
|
+
enumerable: !1
|
|
316
|
+
}), Object.defineProperty(e, "issues", {
|
|
317
|
+
value: t,
|
|
318
|
+
enumerable: !1
|
|
319
|
+
}), e.message = JSON.stringify(t, ge, 2), Object.defineProperty(e, "toString", {
|
|
320
|
+
value: () => e.message,
|
|
321
|
+
enumerable: !1
|
|
322
|
+
});
|
|
323
|
+
}, dt = u("$ZodError", ft), pt = u("$ZodError", ft, { Parent: Error });
|
|
324
|
+
function Ht(e, t = (n) => n.message) {
|
|
325
|
+
const n = {}, r = [];
|
|
326
|
+
for (const o of e.issues)
|
|
327
|
+
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
328
|
+
return { formErrors: r, fieldErrors: n };
|
|
329
|
+
}
|
|
330
|
+
function Xt(e, t) {
|
|
331
|
+
const n = t || function(i) {
|
|
332
|
+
return i.message;
|
|
333
|
+
}, r = { _errors: [] }, o = (i) => {
|
|
334
|
+
for (const a of i.issues)
|
|
335
|
+
if (a.code === "invalid_union" && a.errors.length)
|
|
336
|
+
a.errors.map((s) => o({ issues: s }));
|
|
337
|
+
else if (a.code === "invalid_key")
|
|
338
|
+
o({ issues: a.issues });
|
|
339
|
+
else if (a.code === "invalid_element")
|
|
340
|
+
o({ issues: a.issues });
|
|
341
|
+
else if (a.path.length === 0)
|
|
342
|
+
r._errors.push(n(a));
|
|
343
|
+
else {
|
|
344
|
+
let s = r, c = 0;
|
|
345
|
+
for (; c < a.path.length; ) {
|
|
346
|
+
const l = a.path[c];
|
|
347
|
+
c === a.path.length - 1 ? (s[l] = s[l] || { _errors: [] }, s[l]._errors.push(n(a))) : s[l] = s[l] || { _errors: [] }, s = s[l], c++;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
return o(e), r;
|
|
352
|
+
}
|
|
353
|
+
const Ee = (e) => (t, n, r, o) => {
|
|
354
|
+
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i);
|
|
355
|
+
if (a instanceof Promise)
|
|
356
|
+
throw new K();
|
|
357
|
+
if (a.issues.length) {
|
|
358
|
+
const s = new (o?.Err ?? e)(a.issues.map((c) => V(c, i, x())));
|
|
359
|
+
throw ut(s, o?.callee), s;
|
|
360
|
+
}
|
|
361
|
+
return a.value;
|
|
362
|
+
}, ze = (e) => async (t, n, r, o) => {
|
|
363
|
+
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
364
|
+
let a = t._zod.run({ value: n, issues: [] }, i);
|
|
365
|
+
if (a instanceof Promise && (a = await a), a.issues.length) {
|
|
366
|
+
const s = new (o?.Err ?? e)(a.issues.map((c) => V(c, i, x())));
|
|
367
|
+
throw ut(s, o?.callee), s;
|
|
368
|
+
}
|
|
369
|
+
return a.value;
|
|
370
|
+
}, de = (e) => (t, n, r) => {
|
|
371
|
+
const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
|
|
372
|
+
if (i instanceof Promise)
|
|
373
|
+
throw new K();
|
|
374
|
+
return i.issues.length ? {
|
|
375
|
+
success: !1,
|
|
376
|
+
error: new (e ?? dt)(i.issues.map((a) => V(a, o, x())))
|
|
377
|
+
} : { success: !0, data: i.value };
|
|
378
|
+
}, Yt = /* @__PURE__ */ de(pt), pe = (e) => async (t, n, r) => {
|
|
379
|
+
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
380
|
+
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
381
|
+
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
382
|
+
success: !1,
|
|
383
|
+
error: new e(i.issues.map((a) => V(a, o, x())))
|
|
384
|
+
} : { success: !0, data: i.value };
|
|
385
|
+
}, Jt = /* @__PURE__ */ pe(pt), Gt = (e) => (t, n, r) => {
|
|
386
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
387
|
+
return Ee(e)(t, n, o);
|
|
388
|
+
}, Qt = (e) => (t, n, r) => Ee(e)(t, n, r), en = (e) => async (t, n, r) => {
|
|
389
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
390
|
+
return ze(e)(t, n, o);
|
|
391
|
+
}, tn = (e) => async (t, n, r) => ze(e)(t, n, r), nn = (e) => (t, n, r) => {
|
|
392
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
393
|
+
return de(e)(t, n, o);
|
|
394
|
+
}, rn = (e) => (t, n, r) => de(e)(t, n, r), on = (e) => async (t, n, r) => {
|
|
395
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
396
|
+
return pe(e)(t, n, o);
|
|
397
|
+
}, an = (e) => async (t, n, r) => pe(e)(t, n, r), sn = /^[cC][^\s-]{8,}$/, un = /^[0-9a-z]+$/, cn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, ln = /^[0-9a-vA-V]{20}$/, fn = /^[A-Za-z0-9]{27}$/, dn = /^[a-zA-Z0-9_-]{21}$/, pn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, hn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Ce = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, mn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, _n = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
398
|
+
function gn() {
|
|
399
|
+
return new RegExp(_n, "u");
|
|
400
|
+
}
|
|
401
|
+
const vn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, yn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, An = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, $n = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, wn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ht = /^[A-Za-z0-9_-]*$/, bn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Zn = /^\+(?:[0-9]){6,14}[0-9]$/, mt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", En = /* @__PURE__ */ new RegExp(`^${mt}$`);
|
|
402
|
+
function _t(e) {
|
|
403
|
+
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
404
|
+
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
405
|
+
}
|
|
406
|
+
function zn(e) {
|
|
407
|
+
return new RegExp(`^${_t(e)}$`);
|
|
408
|
+
}
|
|
409
|
+
function In(e) {
|
|
410
|
+
const t = _t({ precision: e.precision }), n = ["Z"];
|
|
411
|
+
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
412
|
+
const r = `${t}(?:${n.join("|")})`;
|
|
413
|
+
return new RegExp(`^${mt}T(?:${r})$`);
|
|
414
|
+
}
|
|
415
|
+
const kn = (e) => {
|
|
416
|
+
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
417
|
+
return new RegExp(`^${t}$`);
|
|
418
|
+
}, Tn = /^[^A-Z]*$/, On = /^[^a-z]*$/, N = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
419
|
+
var n;
|
|
420
|
+
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
421
|
+
}), Rn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
|
|
422
|
+
var n;
|
|
423
|
+
N.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
424
|
+
const o = r.value;
|
|
425
|
+
return !we(o) && o.length !== void 0;
|
|
426
|
+
}), e._zod.onattach.push((r) => {
|
|
427
|
+
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
428
|
+
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
429
|
+
}), e._zod.check = (r) => {
|
|
430
|
+
const o = r.value;
|
|
431
|
+
if (o.length <= t.maximum)
|
|
432
|
+
return;
|
|
433
|
+
const a = Ze(o);
|
|
434
|
+
r.issues.push({
|
|
435
|
+
origin: a,
|
|
436
|
+
code: "too_big",
|
|
437
|
+
maximum: t.maximum,
|
|
438
|
+
inclusive: !0,
|
|
439
|
+
input: o,
|
|
440
|
+
inst: e,
|
|
441
|
+
continue: !t.abort
|
|
442
|
+
});
|
|
443
|
+
};
|
|
444
|
+
}), Sn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
445
|
+
var n;
|
|
446
|
+
N.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
447
|
+
const o = r.value;
|
|
448
|
+
return !we(o) && o.length !== void 0;
|
|
449
|
+
}), e._zod.onattach.push((r) => {
|
|
450
|
+
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
451
|
+
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
452
|
+
}), e._zod.check = (r) => {
|
|
453
|
+
const o = r.value;
|
|
454
|
+
if (o.length >= t.minimum)
|
|
455
|
+
return;
|
|
456
|
+
const a = Ze(o);
|
|
457
|
+
r.issues.push({
|
|
458
|
+
origin: a,
|
|
459
|
+
code: "too_small",
|
|
460
|
+
minimum: t.minimum,
|
|
461
|
+
inclusive: !0,
|
|
462
|
+
input: o,
|
|
463
|
+
inst: e,
|
|
464
|
+
continue: !t.abort
|
|
465
|
+
});
|
|
466
|
+
};
|
|
467
|
+
}), Nn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
468
|
+
var n;
|
|
469
|
+
N.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
470
|
+
const o = r.value;
|
|
471
|
+
return !we(o) && o.length !== void 0;
|
|
472
|
+
}), e._zod.onattach.push((r) => {
|
|
473
|
+
const o = r._zod.bag;
|
|
474
|
+
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
475
|
+
}), e._zod.check = (r) => {
|
|
476
|
+
const o = r.value, i = o.length;
|
|
477
|
+
if (i === t.length)
|
|
478
|
+
return;
|
|
479
|
+
const a = Ze(o), s = i > t.length;
|
|
480
|
+
r.issues.push({
|
|
481
|
+
origin: a,
|
|
482
|
+
...s ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
483
|
+
inclusive: !0,
|
|
484
|
+
exact: !0,
|
|
485
|
+
input: r.value,
|
|
486
|
+
inst: e,
|
|
487
|
+
continue: !t.abort
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
}), he = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
|
|
491
|
+
var n, r;
|
|
492
|
+
N.init(e, t), e._zod.onattach.push((o) => {
|
|
493
|
+
const i = o._zod.bag;
|
|
494
|
+
i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
|
|
495
|
+
}), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
496
|
+
t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
|
|
497
|
+
origin: "string",
|
|
498
|
+
code: "invalid_format",
|
|
499
|
+
format: t.format,
|
|
500
|
+
input: o.value,
|
|
501
|
+
...t.pattern ? { pattern: t.pattern.toString() } : {},
|
|
502
|
+
inst: e,
|
|
503
|
+
continue: !t.abort
|
|
504
|
+
});
|
|
505
|
+
}) : (r = e._zod).check ?? (r.check = () => {
|
|
506
|
+
});
|
|
507
|
+
}), Dn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
|
|
508
|
+
he.init(e, t), e._zod.check = (n) => {
|
|
509
|
+
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
510
|
+
origin: "string",
|
|
511
|
+
code: "invalid_format",
|
|
512
|
+
format: "regex",
|
|
513
|
+
input: n.value,
|
|
514
|
+
pattern: t.pattern.toString(),
|
|
515
|
+
inst: e,
|
|
516
|
+
continue: !t.abort
|
|
517
|
+
});
|
|
518
|
+
};
|
|
519
|
+
}), Pn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
|
|
520
|
+
t.pattern ?? (t.pattern = Tn), he.init(e, t);
|
|
521
|
+
}), Un = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
522
|
+
t.pattern ?? (t.pattern = On), he.init(e, t);
|
|
523
|
+
}), Cn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
524
|
+
N.init(e, t);
|
|
525
|
+
const n = fe(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
526
|
+
t.pattern = r, e._zod.onattach.push((o) => {
|
|
527
|
+
const i = o._zod.bag;
|
|
528
|
+
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
|
|
529
|
+
}), e._zod.check = (o) => {
|
|
530
|
+
o.value.includes(t.includes, t.position) || o.issues.push({
|
|
531
|
+
origin: "string",
|
|
532
|
+
code: "invalid_format",
|
|
533
|
+
format: "includes",
|
|
534
|
+
includes: t.includes,
|
|
535
|
+
input: o.value,
|
|
536
|
+
inst: e,
|
|
537
|
+
continue: !t.abort
|
|
538
|
+
});
|
|
539
|
+
};
|
|
540
|
+
}), Fn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
|
|
541
|
+
N.init(e, t);
|
|
542
|
+
const n = new RegExp(`^${fe(t.prefix)}.*`);
|
|
543
|
+
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
544
|
+
const o = r._zod.bag;
|
|
545
|
+
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
546
|
+
}), e._zod.check = (r) => {
|
|
547
|
+
r.value.startsWith(t.prefix) || r.issues.push({
|
|
548
|
+
origin: "string",
|
|
549
|
+
code: "invalid_format",
|
|
550
|
+
format: "starts_with",
|
|
551
|
+
prefix: t.prefix,
|
|
552
|
+
input: r.value,
|
|
553
|
+
inst: e,
|
|
554
|
+
continue: !t.abort
|
|
555
|
+
});
|
|
556
|
+
};
|
|
557
|
+
}), Mn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
|
|
558
|
+
N.init(e, t);
|
|
559
|
+
const n = new RegExp(`.*${fe(t.suffix)}$`);
|
|
560
|
+
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
561
|
+
const o = r._zod.bag;
|
|
562
|
+
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
563
|
+
}), e._zod.check = (r) => {
|
|
564
|
+
r.value.endsWith(t.suffix) || r.issues.push({
|
|
565
|
+
origin: "string",
|
|
566
|
+
code: "invalid_format",
|
|
567
|
+
format: "ends_with",
|
|
568
|
+
suffix: t.suffix,
|
|
569
|
+
input: r.value,
|
|
570
|
+
inst: e,
|
|
571
|
+
continue: !t.abort
|
|
572
|
+
});
|
|
573
|
+
};
|
|
574
|
+
}), Ln = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
|
|
575
|
+
N.init(e, t), e._zod.check = (n) => {
|
|
576
|
+
n.value = t.tx(n.value);
|
|
577
|
+
};
|
|
578
|
+
});
|
|
579
|
+
class jn {
|
|
580
|
+
constructor(t = []) {
|
|
581
|
+
this.content = [], this.indent = 0, this && (this.args = t);
|
|
582
|
+
}
|
|
583
|
+
indented(t) {
|
|
584
|
+
this.indent += 1, t(this), this.indent -= 1;
|
|
585
|
+
}
|
|
586
|
+
write(t) {
|
|
587
|
+
if (typeof t == "function") {
|
|
588
|
+
t(this, { execution: "sync" }), t(this, { execution: "async" });
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
const r = t.split(`
|
|
592
|
+
`).filter((a) => a), o = Math.min(...r.map((a) => a.length - a.trimStart().length)), i = r.map((a) => a.slice(o)).map((a) => " ".repeat(this.indent * 2) + a);
|
|
593
|
+
for (const a of i)
|
|
594
|
+
this.content.push(a);
|
|
595
|
+
}
|
|
596
|
+
compile() {
|
|
597
|
+
const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
|
|
598
|
+
return new t(...n, o.join(`
|
|
599
|
+
`));
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
const xn = {
|
|
603
|
+
major: 4,
|
|
604
|
+
minor: 1,
|
|
605
|
+
patch: 11
|
|
606
|
+
}, E = /* @__PURE__ */ u("$ZodType", (e, t) => {
|
|
607
|
+
var n;
|
|
608
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = xn;
|
|
609
|
+
const r = [...e._zod.def.checks ?? []];
|
|
610
|
+
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
611
|
+
for (const o of r)
|
|
612
|
+
for (const i of o._zod.onattach)
|
|
613
|
+
i(e);
|
|
614
|
+
if (r.length === 0)
|
|
615
|
+
(n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
616
|
+
e._zod.run = e._zod.parse;
|
|
617
|
+
});
|
|
618
|
+
else {
|
|
619
|
+
const o = (a, s, c) => {
|
|
620
|
+
let l = W(a), m;
|
|
621
|
+
for (const b of s) {
|
|
622
|
+
if (b._zod.def.when) {
|
|
623
|
+
if (!b._zod.def.when(a))
|
|
624
|
+
continue;
|
|
625
|
+
} else if (l)
|
|
626
|
+
continue;
|
|
627
|
+
const g = a.issues.length, v = b._zod.check(a);
|
|
628
|
+
if (v instanceof Promise && c?.async === !1)
|
|
629
|
+
throw new K();
|
|
630
|
+
if (m || v instanceof Promise)
|
|
631
|
+
m = (m ?? Promise.resolve()).then(async () => {
|
|
632
|
+
await v, a.issues.length !== g && (l || (l = W(a, g)));
|
|
633
|
+
});
|
|
634
|
+
else {
|
|
635
|
+
if (a.issues.length === g)
|
|
636
|
+
continue;
|
|
637
|
+
l || (l = W(a, g));
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
return m ? m.then(() => a) : a;
|
|
641
|
+
}, i = (a, s, c) => {
|
|
642
|
+
if (W(a))
|
|
643
|
+
return a.aborted = !0, a;
|
|
644
|
+
const l = o(s, r, c);
|
|
645
|
+
if (l instanceof Promise) {
|
|
646
|
+
if (c.async === !1)
|
|
647
|
+
throw new K();
|
|
648
|
+
return l.then((m) => e._zod.parse(m, c));
|
|
649
|
+
}
|
|
650
|
+
return e._zod.parse(l, c);
|
|
651
|
+
};
|
|
652
|
+
e._zod.run = (a, s) => {
|
|
653
|
+
if (s.skipChecks)
|
|
654
|
+
return e._zod.parse(a, s);
|
|
655
|
+
if (s.direction === "backward") {
|
|
656
|
+
const l = e._zod.parse({ value: a.value, issues: [] }, { ...s, skipChecks: !0 });
|
|
657
|
+
return l instanceof Promise ? l.then((m) => i(m, a, s)) : i(l, a, s);
|
|
658
|
+
}
|
|
659
|
+
const c = e._zod.parse(a, s);
|
|
660
|
+
if (c instanceof Promise) {
|
|
661
|
+
if (s.async === !1)
|
|
662
|
+
throw new K();
|
|
663
|
+
return c.then((l) => o(l, r, s));
|
|
664
|
+
}
|
|
665
|
+
return o(c, r, s);
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
e["~standard"] = {
|
|
669
|
+
validate: (o) => {
|
|
670
|
+
try {
|
|
671
|
+
const i = Yt(e, o);
|
|
672
|
+
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
673
|
+
} catch {
|
|
674
|
+
return Jt(e, o).then((a) => a.success ? { value: a.data } : { issues: a.error?.issues });
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
vendor: "zod",
|
|
678
|
+
version: 1
|
|
679
|
+
};
|
|
680
|
+
}), Ie = /* @__PURE__ */ u("$ZodString", (e, t) => {
|
|
681
|
+
E.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? kn(e._zod.bag), e._zod.parse = (n, r) => {
|
|
682
|
+
if (t.coerce)
|
|
683
|
+
try {
|
|
684
|
+
n.value = String(n.value);
|
|
685
|
+
} catch {
|
|
686
|
+
}
|
|
687
|
+
return typeof n.value == "string" || n.issues.push({
|
|
688
|
+
expected: "string",
|
|
689
|
+
code: "invalid_type",
|
|
690
|
+
input: n.value,
|
|
691
|
+
inst: e
|
|
692
|
+
}), n;
|
|
693
|
+
};
|
|
694
|
+
}), A = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
|
|
695
|
+
he.init(e, t), Ie.init(e, t);
|
|
696
|
+
}), Vn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
|
|
697
|
+
t.pattern ?? (t.pattern = hn), A.init(e, t);
|
|
698
|
+
}), Bn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
|
|
699
|
+
if (t.version) {
|
|
700
|
+
const r = {
|
|
701
|
+
v1: 1,
|
|
702
|
+
v2: 2,
|
|
703
|
+
v3: 3,
|
|
704
|
+
v4: 4,
|
|
705
|
+
v5: 5,
|
|
706
|
+
v6: 6,
|
|
707
|
+
v7: 7,
|
|
708
|
+
v8: 8
|
|
709
|
+
}[t.version];
|
|
710
|
+
if (r === void 0)
|
|
711
|
+
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
712
|
+
t.pattern ?? (t.pattern = Ce(r));
|
|
713
|
+
} else
|
|
714
|
+
t.pattern ?? (t.pattern = Ce());
|
|
715
|
+
A.init(e, t);
|
|
716
|
+
}), qn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
|
|
717
|
+
t.pattern ?? (t.pattern = mn), A.init(e, t);
|
|
718
|
+
}), Wn = /* @__PURE__ */ u("$ZodURL", (e, t) => {
|
|
719
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
720
|
+
try {
|
|
721
|
+
const r = n.value.trim(), o = new URL(r);
|
|
722
|
+
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
|
|
723
|
+
code: "invalid_format",
|
|
724
|
+
format: "url",
|
|
725
|
+
note: "Invalid hostname",
|
|
726
|
+
pattern: bn.source,
|
|
727
|
+
input: n.value,
|
|
728
|
+
inst: e,
|
|
729
|
+
continue: !t.abort
|
|
730
|
+
})), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || n.issues.push({
|
|
731
|
+
code: "invalid_format",
|
|
732
|
+
format: "url",
|
|
733
|
+
note: "Invalid protocol",
|
|
734
|
+
pattern: t.protocol.source,
|
|
735
|
+
input: n.value,
|
|
736
|
+
inst: e,
|
|
737
|
+
continue: !t.abort
|
|
738
|
+
})), t.normalize ? n.value = o.href : n.value = r;
|
|
739
|
+
return;
|
|
740
|
+
} catch {
|
|
741
|
+
n.issues.push({
|
|
742
|
+
code: "invalid_format",
|
|
743
|
+
format: "url",
|
|
744
|
+
input: n.value,
|
|
745
|
+
inst: e,
|
|
746
|
+
continue: !t.abort
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
}), Kn = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
|
|
751
|
+
t.pattern ?? (t.pattern = gn()), A.init(e, t);
|
|
752
|
+
}), Hn = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
|
|
753
|
+
t.pattern ?? (t.pattern = dn), A.init(e, t);
|
|
754
|
+
}), Xn = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
|
|
755
|
+
t.pattern ?? (t.pattern = sn), A.init(e, t);
|
|
756
|
+
}), Yn = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
757
|
+
t.pattern ?? (t.pattern = un), A.init(e, t);
|
|
758
|
+
}), Jn = /* @__PURE__ */ u("$ZodULID", (e, t) => {
|
|
759
|
+
t.pattern ?? (t.pattern = cn), A.init(e, t);
|
|
760
|
+
}), Gn = /* @__PURE__ */ u("$ZodXID", (e, t) => {
|
|
761
|
+
t.pattern ?? (t.pattern = ln), A.init(e, t);
|
|
762
|
+
}), Qn = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
|
|
763
|
+
t.pattern ?? (t.pattern = fn), A.init(e, t);
|
|
764
|
+
}), er = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
|
|
765
|
+
t.pattern ?? (t.pattern = In(t)), A.init(e, t);
|
|
766
|
+
}), tr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
|
|
767
|
+
t.pattern ?? (t.pattern = En), A.init(e, t);
|
|
768
|
+
}), nr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
|
|
769
|
+
t.pattern ?? (t.pattern = zn(t)), A.init(e, t);
|
|
770
|
+
}), rr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
771
|
+
t.pattern ?? (t.pattern = pn), A.init(e, t);
|
|
772
|
+
}), or = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
|
|
773
|
+
t.pattern ?? (t.pattern = vn), A.init(e, t), e._zod.onattach.push((n) => {
|
|
774
|
+
const r = n._zod.bag;
|
|
775
|
+
r.format = "ipv4";
|
|
776
|
+
});
|
|
777
|
+
}), ir = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
|
|
778
|
+
t.pattern ?? (t.pattern = yn), A.init(e, t), e._zod.onattach.push((n) => {
|
|
779
|
+
const r = n._zod.bag;
|
|
780
|
+
r.format = "ipv6";
|
|
781
|
+
}), e._zod.check = (n) => {
|
|
782
|
+
try {
|
|
783
|
+
new URL(`http://[${n.value}]`);
|
|
784
|
+
} catch {
|
|
785
|
+
n.issues.push({
|
|
786
|
+
code: "invalid_format",
|
|
787
|
+
format: "ipv6",
|
|
788
|
+
input: n.value,
|
|
789
|
+
inst: e,
|
|
790
|
+
continue: !t.abort
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
}), ar = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
|
|
795
|
+
t.pattern ?? (t.pattern = An), A.init(e, t);
|
|
796
|
+
}), sr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
|
|
797
|
+
t.pattern ?? (t.pattern = $n), A.init(e, t), e._zod.check = (n) => {
|
|
798
|
+
const r = n.value.split("/");
|
|
799
|
+
try {
|
|
800
|
+
if (r.length !== 2)
|
|
801
|
+
throw new Error();
|
|
802
|
+
const [o, i] = r;
|
|
803
|
+
if (!i)
|
|
804
|
+
throw new Error();
|
|
805
|
+
const a = Number(i);
|
|
806
|
+
if (`${a}` !== i)
|
|
807
|
+
throw new Error();
|
|
808
|
+
if (a < 0 || a > 128)
|
|
809
|
+
throw new Error();
|
|
810
|
+
new URL(`http://[${o}]`);
|
|
811
|
+
} catch {
|
|
812
|
+
n.issues.push({
|
|
813
|
+
code: "invalid_format",
|
|
814
|
+
format: "cidrv6",
|
|
815
|
+
input: n.value,
|
|
816
|
+
inst: e,
|
|
817
|
+
continue: !t.abort
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
});
|
|
822
|
+
function gt(e) {
|
|
823
|
+
if (e === "")
|
|
824
|
+
return !0;
|
|
825
|
+
if (e.length % 4 !== 0)
|
|
826
|
+
return !1;
|
|
827
|
+
try {
|
|
828
|
+
return atob(e), !0;
|
|
829
|
+
} catch {
|
|
830
|
+
return !1;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
const ur = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
834
|
+
t.pattern ?? (t.pattern = wn), A.init(e, t), e._zod.onattach.push((n) => {
|
|
835
|
+
n._zod.bag.contentEncoding = "base64";
|
|
836
|
+
}), e._zod.check = (n) => {
|
|
837
|
+
gt(n.value) || n.issues.push({
|
|
838
|
+
code: "invalid_format",
|
|
839
|
+
format: "base64",
|
|
840
|
+
input: n.value,
|
|
841
|
+
inst: e,
|
|
842
|
+
continue: !t.abort
|
|
843
|
+
});
|
|
844
|
+
};
|
|
845
|
+
});
|
|
846
|
+
function cr(e) {
|
|
847
|
+
if (!ht.test(e))
|
|
848
|
+
return !1;
|
|
849
|
+
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
850
|
+
return gt(n);
|
|
851
|
+
}
|
|
852
|
+
const lr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
853
|
+
t.pattern ?? (t.pattern = ht), A.init(e, t), e._zod.onattach.push((n) => {
|
|
854
|
+
n._zod.bag.contentEncoding = "base64url";
|
|
855
|
+
}), e._zod.check = (n) => {
|
|
856
|
+
cr(n.value) || n.issues.push({
|
|
857
|
+
code: "invalid_format",
|
|
858
|
+
format: "base64url",
|
|
859
|
+
input: n.value,
|
|
860
|
+
inst: e,
|
|
861
|
+
continue: !t.abort
|
|
862
|
+
});
|
|
863
|
+
};
|
|
864
|
+
}), fr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
|
|
865
|
+
t.pattern ?? (t.pattern = Zn), A.init(e, t);
|
|
866
|
+
});
|
|
867
|
+
function dr(e, t = null) {
|
|
868
|
+
try {
|
|
869
|
+
const n = e.split(".");
|
|
870
|
+
if (n.length !== 3)
|
|
871
|
+
return !1;
|
|
872
|
+
const [r] = n;
|
|
873
|
+
if (!r)
|
|
874
|
+
return !1;
|
|
875
|
+
const o = JSON.parse(atob(r));
|
|
876
|
+
return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
|
|
877
|
+
} catch {
|
|
878
|
+
return !1;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
const pr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
882
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
883
|
+
dr(n.value, t.alg) || n.issues.push({
|
|
884
|
+
code: "invalid_format",
|
|
885
|
+
format: "jwt",
|
|
886
|
+
input: n.value,
|
|
887
|
+
inst: e,
|
|
888
|
+
continue: !t.abort
|
|
889
|
+
});
|
|
890
|
+
};
|
|
891
|
+
}), hr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
|
|
892
|
+
E.init(e, t), e._zod.parse = (n) => n;
|
|
893
|
+
}), mr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
|
|
894
|
+
E.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
895
|
+
expected: "never",
|
|
896
|
+
code: "invalid_type",
|
|
897
|
+
input: n.value,
|
|
898
|
+
inst: e
|
|
899
|
+
}), n);
|
|
900
|
+
});
|
|
901
|
+
function Fe(e, t, n) {
|
|
902
|
+
e.issues.length && t.issues.push(...lt(n, e.issues)), t.value[n] = e.value;
|
|
903
|
+
}
|
|
904
|
+
const _r = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
905
|
+
E.init(e, t), e._zod.parse = (n, r) => {
|
|
906
|
+
const o = n.value;
|
|
907
|
+
if (!Array.isArray(o))
|
|
908
|
+
return n.issues.push({
|
|
909
|
+
expected: "array",
|
|
910
|
+
code: "invalid_type",
|
|
911
|
+
input: o,
|
|
912
|
+
inst: e
|
|
913
|
+
}), n;
|
|
914
|
+
n.value = Array(o.length);
|
|
915
|
+
const i = [];
|
|
916
|
+
for (let a = 0; a < o.length; a++) {
|
|
917
|
+
const s = o[a], c = t.element._zod.run({
|
|
918
|
+
value: s,
|
|
919
|
+
issues: []
|
|
920
|
+
}, r);
|
|
921
|
+
c instanceof Promise ? i.push(c.then((l) => Fe(l, n, a))) : Fe(c, n, a);
|
|
922
|
+
}
|
|
923
|
+
return i.length ? Promise.all(i).then(() => n) : n;
|
|
924
|
+
};
|
|
925
|
+
});
|
|
926
|
+
function se(e, t, n, r) {
|
|
927
|
+
e.issues.length && t.issues.push(...lt(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
928
|
+
}
|
|
929
|
+
function vt(e) {
|
|
930
|
+
const t = Object.keys(e.shape);
|
|
931
|
+
for (const r of t)
|
|
932
|
+
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
933
|
+
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
934
|
+
const n = Lt(e.shape);
|
|
935
|
+
return {
|
|
936
|
+
...e,
|
|
937
|
+
keys: t,
|
|
938
|
+
keySet: new Set(t),
|
|
939
|
+
numKeys: t.length,
|
|
940
|
+
optionalKeys: new Set(n)
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
function yt(e, t, n, r, o, i) {
|
|
944
|
+
const a = [], s = o.keySet, c = o.catchall._zod, l = c.def.type;
|
|
945
|
+
for (const m of Object.keys(t)) {
|
|
946
|
+
if (s.has(m))
|
|
947
|
+
continue;
|
|
948
|
+
if (l === "never") {
|
|
949
|
+
a.push(m);
|
|
950
|
+
continue;
|
|
951
|
+
}
|
|
952
|
+
const b = c.run({ value: t[m], issues: [] }, r);
|
|
953
|
+
b instanceof Promise ? e.push(b.then((g) => se(g, n, m, t))) : se(b, n, m, t);
|
|
954
|
+
}
|
|
955
|
+
return a.length && n.issues.push({
|
|
956
|
+
code: "unrecognized_keys",
|
|
957
|
+
keys: a,
|
|
958
|
+
input: t,
|
|
959
|
+
inst: i
|
|
960
|
+
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
961
|
+
}
|
|
962
|
+
const gr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
963
|
+
if (E.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
964
|
+
const s = t.shape;
|
|
965
|
+
Object.defineProperty(t, "shape", {
|
|
966
|
+
get: () => {
|
|
967
|
+
const c = { ...s };
|
|
968
|
+
return Object.defineProperty(t, "shape", {
|
|
969
|
+
value: c
|
|
970
|
+
}), c;
|
|
971
|
+
}
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
const r = $e(() => vt(t));
|
|
975
|
+
y(e._zod, "propValues", () => {
|
|
976
|
+
const s = t.shape, c = {};
|
|
977
|
+
for (const l in s) {
|
|
978
|
+
const m = s[l]._zod;
|
|
979
|
+
if (m.values) {
|
|
980
|
+
c[l] ?? (c[l] = /* @__PURE__ */ new Set());
|
|
981
|
+
for (const b of m.values)
|
|
982
|
+
c[l].add(b);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
return c;
|
|
986
|
+
});
|
|
987
|
+
const o = ae, i = t.catchall;
|
|
988
|
+
let a;
|
|
989
|
+
e._zod.parse = (s, c) => {
|
|
990
|
+
a ?? (a = r.value);
|
|
991
|
+
const l = s.value;
|
|
992
|
+
if (!o(l))
|
|
993
|
+
return s.issues.push({
|
|
994
|
+
expected: "object",
|
|
995
|
+
code: "invalid_type",
|
|
996
|
+
input: l,
|
|
997
|
+
inst: e
|
|
998
|
+
}), s;
|
|
999
|
+
s.value = {};
|
|
1000
|
+
const m = [], b = a.shape;
|
|
1001
|
+
for (const g of a.keys) {
|
|
1002
|
+
const $ = b[g]._zod.run({ value: l[g], issues: [] }, c);
|
|
1003
|
+
$ instanceof Promise ? m.push($.then((U) => se(U, s, g, l))) : se($, s, g, l);
|
|
1004
|
+
}
|
|
1005
|
+
return i ? yt(m, l, s, c, r.value, e) : m.length ? Promise.all(m).then(() => s) : s;
|
|
1006
|
+
};
|
|
1007
|
+
}), vr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
|
|
1008
|
+
gr.init(e, t);
|
|
1009
|
+
const n = e._zod.parse, r = $e(() => vt(t)), o = (g) => {
|
|
1010
|
+
const v = new jn(["shape", "payload", "ctx"]), $ = r.value, U = (R) => {
|
|
1011
|
+
const p = Ue(R);
|
|
1012
|
+
return `shape[${p}]._zod.run({ value: input[${p}], issues: [] }, ctx)`;
|
|
1013
|
+
};
|
|
1014
|
+
v.write("const input = payload.value;");
|
|
1015
|
+
const M = /* @__PURE__ */ Object.create(null);
|
|
1016
|
+
let L = 0;
|
|
1017
|
+
for (const R of $.keys)
|
|
1018
|
+
M[R] = `key_${L++}`;
|
|
1019
|
+
v.write("const newResult = {};");
|
|
1020
|
+
for (const R of $.keys) {
|
|
1021
|
+
const p = M[R], T = Ue(R);
|
|
1022
|
+
v.write(`const ${p} = ${U(R)};`), v.write(`
|
|
1023
|
+
if (${p}.issues.length) {
|
|
1024
|
+
payload.issues = payload.issues.concat(${p}.issues.map(iss => ({
|
|
1025
|
+
...iss,
|
|
1026
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
1027
|
+
})));
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
if (${p}.value === undefined) {
|
|
1032
|
+
if (${T} in input) {
|
|
1033
|
+
newResult[${T}] = undefined;
|
|
1034
|
+
}
|
|
1035
|
+
} else {
|
|
1036
|
+
newResult[${T}] = ${p}.value;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
`);
|
|
1040
|
+
}
|
|
1041
|
+
v.write("payload.value = newResult;"), v.write("return payload;");
|
|
1042
|
+
const j = v.compile();
|
|
1043
|
+
return (R, p) => j(g, R, p);
|
|
1044
|
+
};
|
|
1045
|
+
let i;
|
|
1046
|
+
const a = ae, s = !st.jitless, l = s && Ft.value, m = t.catchall;
|
|
1047
|
+
let b;
|
|
1048
|
+
e._zod.parse = (g, v) => {
|
|
1049
|
+
b ?? (b = r.value);
|
|
1050
|
+
const $ = g.value;
|
|
1051
|
+
return a($) ? s && l && v?.async === !1 && v.jitless !== !0 ? (i || (i = o(t.shape)), g = i(g, v), m ? yt([], $, g, v, b, e) : g) : n(g, v) : (g.issues.push({
|
|
1052
|
+
expected: "object",
|
|
1053
|
+
code: "invalid_type",
|
|
1054
|
+
input: $,
|
|
1055
|
+
inst: e
|
|
1056
|
+
}), g);
|
|
1057
|
+
};
|
|
1058
|
+
});
|
|
1059
|
+
function Me(e, t, n, r) {
|
|
1060
|
+
for (const i of e)
|
|
1061
|
+
if (i.issues.length === 0)
|
|
1062
|
+
return t.value = i.value, t;
|
|
1063
|
+
const o = e.filter((i) => !W(i));
|
|
1064
|
+
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
1065
|
+
code: "invalid_union",
|
|
1066
|
+
input: t.value,
|
|
1067
|
+
inst: n,
|
|
1068
|
+
errors: e.map((i) => i.issues.map((a) => V(a, r, x())))
|
|
1069
|
+
}), t);
|
|
1070
|
+
}
|
|
1071
|
+
const yr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
1072
|
+
E.init(e, t), y(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), y(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), y(e._zod, "values", () => {
|
|
1073
|
+
if (t.options.every((o) => o._zod.values))
|
|
1074
|
+
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
1075
|
+
}), y(e._zod, "pattern", () => {
|
|
1076
|
+
if (t.options.every((o) => o._zod.pattern)) {
|
|
1077
|
+
const o = t.options.map((i) => i._zod.pattern);
|
|
1078
|
+
return new RegExp(`^(${o.map((i) => be(i.source)).join("|")})$`);
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
1082
|
+
e._zod.parse = (o, i) => {
|
|
1083
|
+
if (n)
|
|
1084
|
+
return r(o, i);
|
|
1085
|
+
let a = !1;
|
|
1086
|
+
const s = [];
|
|
1087
|
+
for (const c of t.options) {
|
|
1088
|
+
const l = c._zod.run({
|
|
1089
|
+
value: o.value,
|
|
1090
|
+
issues: []
|
|
1091
|
+
}, i);
|
|
1092
|
+
if (l instanceof Promise)
|
|
1093
|
+
s.push(l), a = !0;
|
|
1094
|
+
else {
|
|
1095
|
+
if (l.issues.length === 0)
|
|
1096
|
+
return l;
|
|
1097
|
+
s.push(l);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
return a ? Promise.all(s).then((c) => Me(c, o, e, i)) : Me(s, o, e, i);
|
|
1101
|
+
};
|
|
1102
|
+
}), Ar = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1103
|
+
E.init(e, t), e._zod.parse = (n, r) => {
|
|
1104
|
+
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), a = t.right._zod.run({ value: o, issues: [] }, r);
|
|
1105
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([c, l]) => Le(n, c, l)) : Le(n, i, a);
|
|
1106
|
+
};
|
|
1107
|
+
});
|
|
1108
|
+
function ve(e, t) {
|
|
1109
|
+
if (e === t)
|
|
1110
|
+
return { valid: !0, data: e };
|
|
1111
|
+
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
1112
|
+
return { valid: !0, data: e };
|
|
1113
|
+
if (H(e) && H(t)) {
|
|
1114
|
+
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
1115
|
+
for (const i of r) {
|
|
1116
|
+
const a = ve(e[i], t[i]);
|
|
1117
|
+
if (!a.valid)
|
|
1118
|
+
return {
|
|
1119
|
+
valid: !1,
|
|
1120
|
+
mergeErrorPath: [i, ...a.mergeErrorPath]
|
|
1121
|
+
};
|
|
1122
|
+
o[i] = a.data;
|
|
1123
|
+
}
|
|
1124
|
+
return { valid: !0, data: o };
|
|
1125
|
+
}
|
|
1126
|
+
if (Array.isArray(e) && Array.isArray(t)) {
|
|
1127
|
+
if (e.length !== t.length)
|
|
1128
|
+
return { valid: !1, mergeErrorPath: [] };
|
|
1129
|
+
const n = [];
|
|
1130
|
+
for (let r = 0; r < e.length; r++) {
|
|
1131
|
+
const o = e[r], i = t[r], a = ve(o, i);
|
|
1132
|
+
if (!a.valid)
|
|
1133
|
+
return {
|
|
1134
|
+
valid: !1,
|
|
1135
|
+
mergeErrorPath: [r, ...a.mergeErrorPath]
|
|
1136
|
+
};
|
|
1137
|
+
n.push(a.data);
|
|
1138
|
+
}
|
|
1139
|
+
return { valid: !0, data: n };
|
|
1140
|
+
}
|
|
1141
|
+
return { valid: !1, mergeErrorPath: [] };
|
|
1142
|
+
}
|
|
1143
|
+
function Le(e, t, n) {
|
|
1144
|
+
if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), W(e))
|
|
1145
|
+
return e;
|
|
1146
|
+
const r = ve(t.value, n.value);
|
|
1147
|
+
if (!r.valid)
|
|
1148
|
+
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
1149
|
+
return e.value = r.data, e;
|
|
1150
|
+
}
|
|
1151
|
+
const $r = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
1152
|
+
E.init(e, t);
|
|
1153
|
+
const n = Ct(t.entries), r = new Set(n);
|
|
1154
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Mt.has(typeof o)).map((o) => typeof o == "string" ? fe(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
1155
|
+
const a = o.value;
|
|
1156
|
+
return r.has(a) || o.issues.push({
|
|
1157
|
+
code: "invalid_value",
|
|
1158
|
+
values: n,
|
|
1159
|
+
input: a,
|
|
1160
|
+
inst: e
|
|
1161
|
+
}), o;
|
|
1162
|
+
};
|
|
1163
|
+
}), wr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
|
|
1164
|
+
E.init(e, t), e._zod.parse = (n, r) => {
|
|
1165
|
+
if (r.direction === "backward")
|
|
1166
|
+
throw new at(e.constructor.name);
|
|
1167
|
+
const o = t.transform(n.value, n);
|
|
1168
|
+
if (r.async)
|
|
1169
|
+
return (o instanceof Promise ? o : Promise.resolve(o)).then((a) => (n.value = a, n));
|
|
1170
|
+
if (o instanceof Promise)
|
|
1171
|
+
throw new K();
|
|
1172
|
+
return n.value = o, n;
|
|
1173
|
+
};
|
|
1174
|
+
});
|
|
1175
|
+
function je(e, t) {
|
|
1176
|
+
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
1177
|
+
}
|
|
1178
|
+
const br = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
1179
|
+
E.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), y(e._zod, "pattern", () => {
|
|
1180
|
+
const n = t.innerType._zod.pattern;
|
|
1181
|
+
return n ? new RegExp(`^(${be(n.source)})?$`) : void 0;
|
|
1182
|
+
}), e._zod.parse = (n, r) => {
|
|
1183
|
+
if (t.innerType._zod.optin === "optional") {
|
|
1184
|
+
const o = t.innerType._zod.run(n, r);
|
|
1185
|
+
return o instanceof Promise ? o.then((i) => je(i, n.value)) : je(o, n.value);
|
|
1186
|
+
}
|
|
1187
|
+
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
1188
|
+
};
|
|
1189
|
+
}), Zr = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
1190
|
+
E.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "pattern", () => {
|
|
1191
|
+
const n = t.innerType._zod.pattern;
|
|
1192
|
+
return n ? new RegExp(`^(${be(n.source)}|null)$`) : void 0;
|
|
1193
|
+
}), y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
1194
|
+
}), Er = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
|
|
1195
|
+
E.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1196
|
+
if (r.direction === "backward")
|
|
1197
|
+
return t.innerType._zod.run(n, r);
|
|
1198
|
+
if (n.value === void 0)
|
|
1199
|
+
return n.value = t.defaultValue, n;
|
|
1200
|
+
const o = t.innerType._zod.run(n, r);
|
|
1201
|
+
return o instanceof Promise ? o.then((i) => xe(i, t)) : xe(o, t);
|
|
1202
|
+
};
|
|
1203
|
+
});
|
|
1204
|
+
function xe(e, t) {
|
|
1205
|
+
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1206
|
+
}
|
|
1207
|
+
const zr = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
1208
|
+
E.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
1209
|
+
}), Ir = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
1210
|
+
E.init(e, t), y(e._zod, "values", () => {
|
|
1211
|
+
const n = t.innerType._zod.values;
|
|
1212
|
+
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
1213
|
+
}), e._zod.parse = (n, r) => {
|
|
1214
|
+
const o = t.innerType._zod.run(n, r);
|
|
1215
|
+
return o instanceof Promise ? o.then((i) => Ve(i, e)) : Ve(o, e);
|
|
1216
|
+
};
|
|
1217
|
+
});
|
|
1218
|
+
function Ve(e, t) {
|
|
1219
|
+
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1220
|
+
code: "invalid_type",
|
|
1221
|
+
expected: "nonoptional",
|
|
1222
|
+
input: e.value,
|
|
1223
|
+
inst: t
|
|
1224
|
+
}), e;
|
|
1225
|
+
}
|
|
1226
|
+
const kr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
1227
|
+
E.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1228
|
+
if (r.direction === "backward")
|
|
1229
|
+
return t.innerType._zod.run(n, r);
|
|
1230
|
+
const o = t.innerType._zod.run(n, r);
|
|
1231
|
+
return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
|
|
1232
|
+
...n,
|
|
1233
|
+
error: {
|
|
1234
|
+
issues: i.issues.map((a) => V(a, r, x()))
|
|
1235
|
+
},
|
|
1236
|
+
input: n.value
|
|
1237
|
+
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
1238
|
+
...n,
|
|
1239
|
+
error: {
|
|
1240
|
+
issues: o.issues.map((i) => V(i, r, x()))
|
|
1241
|
+
},
|
|
1242
|
+
input: n.value
|
|
1243
|
+
}), n.issues = []), n);
|
|
1244
|
+
};
|
|
1245
|
+
}), Tr = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
1246
|
+
E.init(e, t), y(e._zod, "values", () => t.in._zod.values), y(e._zod, "optin", () => t.in._zod.optin), y(e._zod, "optout", () => t.out._zod.optout), y(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
1247
|
+
if (r.direction === "backward") {
|
|
1248
|
+
const i = t.out._zod.run(n, r);
|
|
1249
|
+
return i instanceof Promise ? i.then((a) => G(a, t.in, r)) : G(i, t.in, r);
|
|
1250
|
+
}
|
|
1251
|
+
const o = t.in._zod.run(n, r);
|
|
1252
|
+
return o instanceof Promise ? o.then((i) => G(i, t.out, r)) : G(o, t.out, r);
|
|
1253
|
+
};
|
|
1254
|
+
});
|
|
1255
|
+
function G(e, t, n) {
|
|
1256
|
+
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
1257
|
+
}
|
|
1258
|
+
const Or = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
1259
|
+
E.init(e, t), y(e._zod, "propValues", () => t.innerType._zod.propValues), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
|
|
1260
|
+
if (r.direction === "backward")
|
|
1261
|
+
return t.innerType._zod.run(n, r);
|
|
1262
|
+
const o = t.innerType._zod.run(n, r);
|
|
1263
|
+
return o instanceof Promise ? o.then(Be) : Be(o);
|
|
1264
|
+
};
|
|
1265
|
+
});
|
|
1266
|
+
function Be(e) {
|
|
1267
|
+
return e.value = Object.freeze(e.value), e;
|
|
1268
|
+
}
|
|
1269
|
+
const Rr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
1270
|
+
N.init(e, t), E.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
1271
|
+
const r = n.value, o = t.fn(r);
|
|
1272
|
+
if (o instanceof Promise)
|
|
1273
|
+
return o.then((i) => qe(i, n, r, e));
|
|
1274
|
+
qe(o, n, r, e);
|
|
1275
|
+
};
|
|
1276
|
+
});
|
|
1277
|
+
function qe(e, t, n, r) {
|
|
1278
|
+
if (!e) {
|
|
1279
|
+
const o = {
|
|
1280
|
+
code: "custom",
|
|
1281
|
+
input: n,
|
|
1282
|
+
inst: r,
|
|
1283
|
+
// incorporates params.error into issue reporting
|
|
1284
|
+
path: [...r._zod.def.path ?? []],
|
|
1285
|
+
// incorporates params.error into issue reporting
|
|
1286
|
+
continue: !r._zod.def.abort
|
|
1287
|
+
// params: inst._zod.def.params,
|
|
1288
|
+
};
|
|
1289
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(X(o));
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
class Sr {
|
|
1293
|
+
constructor() {
|
|
1294
|
+
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1295
|
+
}
|
|
1296
|
+
add(t, ...n) {
|
|
1297
|
+
const r = n[0];
|
|
1298
|
+
if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
|
|
1299
|
+
if (this._idmap.has(r.id))
|
|
1300
|
+
throw new Error(`ID ${r.id} already exists in the registry`);
|
|
1301
|
+
this._idmap.set(r.id, t);
|
|
1302
|
+
}
|
|
1303
|
+
return this;
|
|
1304
|
+
}
|
|
1305
|
+
clear() {
|
|
1306
|
+
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
1307
|
+
}
|
|
1308
|
+
remove(t) {
|
|
1309
|
+
const n = this._map.get(t);
|
|
1310
|
+
return n && typeof n == "object" && "id" in n && this._idmap.delete(n.id), this._map.delete(t), this;
|
|
1311
|
+
}
|
|
1312
|
+
get(t) {
|
|
1313
|
+
const n = t._zod.parent;
|
|
1314
|
+
if (n) {
|
|
1315
|
+
const r = { ...this.get(n) ?? {} };
|
|
1316
|
+
delete r.id;
|
|
1317
|
+
const o = { ...r, ...this._map.get(t) };
|
|
1318
|
+
return Object.keys(o).length ? o : void 0;
|
|
1319
|
+
}
|
|
1320
|
+
return this._map.get(t);
|
|
1321
|
+
}
|
|
1322
|
+
has(t) {
|
|
1323
|
+
return this._map.has(t);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
function Nr() {
|
|
1327
|
+
return new Sr();
|
|
1328
|
+
}
|
|
1329
|
+
const Q = /* @__PURE__ */ Nr();
|
|
1330
|
+
function Dr(e, t) {
|
|
1331
|
+
return new e({
|
|
1332
|
+
type: "string",
|
|
1333
|
+
...f(t)
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
function Pr(e, t) {
|
|
1337
|
+
return new e({
|
|
1338
|
+
type: "string",
|
|
1339
|
+
format: "email",
|
|
1340
|
+
check: "string_format",
|
|
1341
|
+
abort: !1,
|
|
1342
|
+
...f(t)
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
function We(e, t) {
|
|
1346
|
+
return new e({
|
|
1347
|
+
type: "string",
|
|
1348
|
+
format: "guid",
|
|
1349
|
+
check: "string_format",
|
|
1350
|
+
abort: !1,
|
|
1351
|
+
...f(t)
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
function Ur(e, t) {
|
|
1355
|
+
return new e({
|
|
1356
|
+
type: "string",
|
|
1357
|
+
format: "uuid",
|
|
1358
|
+
check: "string_format",
|
|
1359
|
+
abort: !1,
|
|
1360
|
+
...f(t)
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
function Cr(e, t) {
|
|
1364
|
+
return new e({
|
|
1365
|
+
type: "string",
|
|
1366
|
+
format: "uuid",
|
|
1367
|
+
check: "string_format",
|
|
1368
|
+
abort: !1,
|
|
1369
|
+
version: "v4",
|
|
1370
|
+
...f(t)
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
1373
|
+
function Fr(e, t) {
|
|
1374
|
+
return new e({
|
|
1375
|
+
type: "string",
|
|
1376
|
+
format: "uuid",
|
|
1377
|
+
check: "string_format",
|
|
1378
|
+
abort: !1,
|
|
1379
|
+
version: "v6",
|
|
1380
|
+
...f(t)
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
function Mr(e, t) {
|
|
1384
|
+
return new e({
|
|
1385
|
+
type: "string",
|
|
1386
|
+
format: "uuid",
|
|
1387
|
+
check: "string_format",
|
|
1388
|
+
abort: !1,
|
|
1389
|
+
version: "v7",
|
|
1390
|
+
...f(t)
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
function Lr(e, t) {
|
|
1394
|
+
return new e({
|
|
1395
|
+
type: "string",
|
|
1396
|
+
format: "url",
|
|
1397
|
+
check: "string_format",
|
|
1398
|
+
abort: !1,
|
|
1399
|
+
...f(t)
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
function jr(e, t) {
|
|
1403
|
+
return new e({
|
|
1404
|
+
type: "string",
|
|
1405
|
+
format: "emoji",
|
|
1406
|
+
check: "string_format",
|
|
1407
|
+
abort: !1,
|
|
1408
|
+
...f(t)
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
function xr(e, t) {
|
|
1412
|
+
return new e({
|
|
1413
|
+
type: "string",
|
|
1414
|
+
format: "nanoid",
|
|
1415
|
+
check: "string_format",
|
|
1416
|
+
abort: !1,
|
|
1417
|
+
...f(t)
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
function Vr(e, t) {
|
|
1421
|
+
return new e({
|
|
1422
|
+
type: "string",
|
|
1423
|
+
format: "cuid",
|
|
1424
|
+
check: "string_format",
|
|
1425
|
+
abort: !1,
|
|
1426
|
+
...f(t)
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
function Br(e, t) {
|
|
1430
|
+
return new e({
|
|
1431
|
+
type: "string",
|
|
1432
|
+
format: "cuid2",
|
|
1433
|
+
check: "string_format",
|
|
1434
|
+
abort: !1,
|
|
1435
|
+
...f(t)
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
function qr(e, t) {
|
|
1439
|
+
return new e({
|
|
1440
|
+
type: "string",
|
|
1441
|
+
format: "ulid",
|
|
1442
|
+
check: "string_format",
|
|
1443
|
+
abort: !1,
|
|
1444
|
+
...f(t)
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
function Wr(e, t) {
|
|
1448
|
+
return new e({
|
|
1449
|
+
type: "string",
|
|
1450
|
+
format: "xid",
|
|
1451
|
+
check: "string_format",
|
|
1452
|
+
abort: !1,
|
|
1453
|
+
...f(t)
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
function Kr(e, t) {
|
|
1457
|
+
return new e({
|
|
1458
|
+
type: "string",
|
|
1459
|
+
format: "ksuid",
|
|
1460
|
+
check: "string_format",
|
|
1461
|
+
abort: !1,
|
|
1462
|
+
...f(t)
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
function Hr(e, t) {
|
|
1466
|
+
return new e({
|
|
1467
|
+
type: "string",
|
|
1468
|
+
format: "ipv4",
|
|
1469
|
+
check: "string_format",
|
|
1470
|
+
abort: !1,
|
|
1471
|
+
...f(t)
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
function Xr(e, t) {
|
|
1475
|
+
return new e({
|
|
1476
|
+
type: "string",
|
|
1477
|
+
format: "ipv6",
|
|
1478
|
+
check: "string_format",
|
|
1479
|
+
abort: !1,
|
|
1480
|
+
...f(t)
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
function Yr(e, t) {
|
|
1484
|
+
return new e({
|
|
1485
|
+
type: "string",
|
|
1486
|
+
format: "cidrv4",
|
|
1487
|
+
check: "string_format",
|
|
1488
|
+
abort: !1,
|
|
1489
|
+
...f(t)
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
function Jr(e, t) {
|
|
1493
|
+
return new e({
|
|
1494
|
+
type: "string",
|
|
1495
|
+
format: "cidrv6",
|
|
1496
|
+
check: "string_format",
|
|
1497
|
+
abort: !1,
|
|
1498
|
+
...f(t)
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
function Gr(e, t) {
|
|
1502
|
+
return new e({
|
|
1503
|
+
type: "string",
|
|
1504
|
+
format: "base64",
|
|
1505
|
+
check: "string_format",
|
|
1506
|
+
abort: !1,
|
|
1507
|
+
...f(t)
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
function Qr(e, t) {
|
|
1511
|
+
return new e({
|
|
1512
|
+
type: "string",
|
|
1513
|
+
format: "base64url",
|
|
1514
|
+
check: "string_format",
|
|
1515
|
+
abort: !1,
|
|
1516
|
+
...f(t)
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
function eo(e, t) {
|
|
1520
|
+
return new e({
|
|
1521
|
+
type: "string",
|
|
1522
|
+
format: "e164",
|
|
1523
|
+
check: "string_format",
|
|
1524
|
+
abort: !1,
|
|
1525
|
+
...f(t)
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
function to(e, t) {
|
|
1529
|
+
return new e({
|
|
1530
|
+
type: "string",
|
|
1531
|
+
format: "jwt",
|
|
1532
|
+
check: "string_format",
|
|
1533
|
+
abort: !1,
|
|
1534
|
+
...f(t)
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
function no(e, t) {
|
|
1538
|
+
return new e({
|
|
1539
|
+
type: "string",
|
|
1540
|
+
format: "datetime",
|
|
1541
|
+
check: "string_format",
|
|
1542
|
+
offset: !1,
|
|
1543
|
+
local: !1,
|
|
1544
|
+
precision: null,
|
|
1545
|
+
...f(t)
|
|
1546
|
+
});
|
|
1547
|
+
}
|
|
1548
|
+
function ro(e, t) {
|
|
1549
|
+
return new e({
|
|
1550
|
+
type: "string",
|
|
1551
|
+
format: "date",
|
|
1552
|
+
check: "string_format",
|
|
1553
|
+
...f(t)
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
function oo(e, t) {
|
|
1557
|
+
return new e({
|
|
1558
|
+
type: "string",
|
|
1559
|
+
format: "time",
|
|
1560
|
+
check: "string_format",
|
|
1561
|
+
precision: null,
|
|
1562
|
+
...f(t)
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
function io(e, t) {
|
|
1566
|
+
return new e({
|
|
1567
|
+
type: "string",
|
|
1568
|
+
format: "duration",
|
|
1569
|
+
check: "string_format",
|
|
1570
|
+
...f(t)
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
function ao(e) {
|
|
1574
|
+
return new e({
|
|
1575
|
+
type: "unknown"
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
function so(e, t) {
|
|
1579
|
+
return new e({
|
|
1580
|
+
type: "never",
|
|
1581
|
+
...f(t)
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
function At(e, t) {
|
|
1585
|
+
return new Rn({
|
|
1586
|
+
check: "max_length",
|
|
1587
|
+
...f(t),
|
|
1588
|
+
maximum: e
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
function ue(e, t) {
|
|
1592
|
+
return new Sn({
|
|
1593
|
+
check: "min_length",
|
|
1594
|
+
...f(t),
|
|
1595
|
+
minimum: e
|
|
1596
|
+
});
|
|
1597
|
+
}
|
|
1598
|
+
function $t(e, t) {
|
|
1599
|
+
return new Nn({
|
|
1600
|
+
check: "length_equals",
|
|
1601
|
+
...f(t),
|
|
1602
|
+
length: e
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
function uo(e, t) {
|
|
1606
|
+
return new Dn({
|
|
1607
|
+
check: "string_format",
|
|
1608
|
+
format: "regex",
|
|
1609
|
+
...f(t),
|
|
1610
|
+
pattern: e
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
function co(e) {
|
|
1614
|
+
return new Pn({
|
|
1615
|
+
check: "string_format",
|
|
1616
|
+
format: "lowercase",
|
|
1617
|
+
...f(e)
|
|
1618
|
+
});
|
|
1619
|
+
}
|
|
1620
|
+
function lo(e) {
|
|
1621
|
+
return new Un({
|
|
1622
|
+
check: "string_format",
|
|
1623
|
+
format: "uppercase",
|
|
1624
|
+
...f(e)
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
function fo(e, t) {
|
|
1628
|
+
return new Cn({
|
|
1629
|
+
check: "string_format",
|
|
1630
|
+
format: "includes",
|
|
1631
|
+
...f(t),
|
|
1632
|
+
includes: e
|
|
1633
|
+
});
|
|
1634
|
+
}
|
|
1635
|
+
function po(e, t) {
|
|
1636
|
+
return new Fn({
|
|
1637
|
+
check: "string_format",
|
|
1638
|
+
format: "starts_with",
|
|
1639
|
+
...f(t),
|
|
1640
|
+
prefix: e
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
function ho(e, t) {
|
|
1644
|
+
return new Mn({
|
|
1645
|
+
check: "string_format",
|
|
1646
|
+
format: "ends_with",
|
|
1647
|
+
...f(t),
|
|
1648
|
+
suffix: e
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
function Y(e) {
|
|
1652
|
+
return new Ln({
|
|
1653
|
+
check: "overwrite",
|
|
1654
|
+
tx: e
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
function mo(e) {
|
|
1658
|
+
return Y((t) => t.normalize(e));
|
|
1659
|
+
}
|
|
1660
|
+
function _o() {
|
|
1661
|
+
return Y((e) => e.trim());
|
|
1662
|
+
}
|
|
1663
|
+
function go() {
|
|
1664
|
+
return Y((e) => e.toLowerCase());
|
|
1665
|
+
}
|
|
1666
|
+
function vo() {
|
|
1667
|
+
return Y((e) => e.toUpperCase());
|
|
1668
|
+
}
|
|
1669
|
+
function yo(e, t, n) {
|
|
1670
|
+
return new e({
|
|
1671
|
+
type: "array",
|
|
1672
|
+
element: t,
|
|
1673
|
+
// get element() {
|
|
1674
|
+
// return element;
|
|
1675
|
+
// },
|
|
1676
|
+
...f(n)
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
function Ao(e, t, n) {
|
|
1680
|
+
return new e({
|
|
1681
|
+
type: "custom",
|
|
1682
|
+
check: "custom",
|
|
1683
|
+
fn: t,
|
|
1684
|
+
...f(n)
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
function $o(e) {
|
|
1688
|
+
const t = wo((n) => (n.addIssue = (r) => {
|
|
1689
|
+
if (typeof r == "string")
|
|
1690
|
+
n.issues.push(X(r, n.value, t._zod.def));
|
|
1691
|
+
else {
|
|
1692
|
+
const o = r;
|
|
1693
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(X(o));
|
|
1694
|
+
}
|
|
1695
|
+
}, e(n.value, n)));
|
|
1696
|
+
return t;
|
|
1697
|
+
}
|
|
1698
|
+
function wo(e, t) {
|
|
1699
|
+
const n = new N({
|
|
1700
|
+
check: "custom",
|
|
1701
|
+
...f(t)
|
|
1702
|
+
});
|
|
1703
|
+
return n._zod.check = e, n;
|
|
1704
|
+
}
|
|
1705
|
+
const bo = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
|
|
1706
|
+
er.init(e, t), w.init(e, t);
|
|
1707
|
+
});
|
|
1708
|
+
function Zo(e) {
|
|
1709
|
+
return no(bo, e);
|
|
1710
|
+
}
|
|
1711
|
+
const Eo = /* @__PURE__ */ u("ZodISODate", (e, t) => {
|
|
1712
|
+
tr.init(e, t), w.init(e, t);
|
|
1713
|
+
});
|
|
1714
|
+
function zo(e) {
|
|
1715
|
+
return ro(Eo, e);
|
|
1716
|
+
}
|
|
1717
|
+
const Io = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
|
|
1718
|
+
nr.init(e, t), w.init(e, t);
|
|
1719
|
+
});
|
|
1720
|
+
function ko(e) {
|
|
1721
|
+
return oo(Io, e);
|
|
1722
|
+
}
|
|
1723
|
+
const To = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
|
|
1724
|
+
rr.init(e, t), w.init(e, t);
|
|
1725
|
+
});
|
|
1726
|
+
function Oo(e) {
|
|
1727
|
+
return io(To, e);
|
|
1728
|
+
}
|
|
1729
|
+
const Ro = (e, t) => {
|
|
1730
|
+
dt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
1731
|
+
format: {
|
|
1732
|
+
value: (n) => Xt(e, n)
|
|
1733
|
+
// enumerable: false,
|
|
1734
|
+
},
|
|
1735
|
+
flatten: {
|
|
1736
|
+
value: (n) => Ht(e, n)
|
|
1737
|
+
// enumerable: false,
|
|
1738
|
+
},
|
|
1739
|
+
addIssue: {
|
|
1740
|
+
value: (n) => {
|
|
1741
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, ge, 2);
|
|
1742
|
+
}
|
|
1743
|
+
// enumerable: false,
|
|
1744
|
+
},
|
|
1745
|
+
addIssues: {
|
|
1746
|
+
value: (n) => {
|
|
1747
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, ge, 2);
|
|
1748
|
+
}
|
|
1749
|
+
// enumerable: false,
|
|
1750
|
+
},
|
|
1751
|
+
isEmpty: {
|
|
1752
|
+
get() {
|
|
1753
|
+
return e.issues.length === 0;
|
|
1754
|
+
}
|
|
1755
|
+
// enumerable: false,
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
}, O = u("ZodError", Ro, {
|
|
1759
|
+
Parent: Error
|
|
1760
|
+
}), So = /* @__PURE__ */ Ee(O), No = /* @__PURE__ */ ze(O), Do = /* @__PURE__ */ de(O), Po = /* @__PURE__ */ pe(O), Uo = /* @__PURE__ */ Gt(O), Co = /* @__PURE__ */ Qt(O), Fo = /* @__PURE__ */ en(O), Mo = /* @__PURE__ */ tn(O), Lo = /* @__PURE__ */ nn(O), jo = /* @__PURE__ */ rn(O), xo = /* @__PURE__ */ on(O), Vo = /* @__PURE__ */ an(O), z = /* @__PURE__ */ u("ZodType", (e, t) => (E.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(q(t, {
|
|
1761
|
+
checks: [
|
|
1762
|
+
...t.checks ?? [],
|
|
1763
|
+
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
1764
|
+
]
|
|
1765
|
+
})), e.clone = (n, r) => C(e, n, r), e.brand = () => e, e.register = (n, r) => (n.add(e, r), e), e.parse = (n, r) => So(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Do(e, n, r), e.parseAsync = async (n, r) => No(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Po(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Uo(e, n, r), e.decode = (n, r) => Co(e, n, r), e.encodeAsync = async (n, r) => Fo(e, n, r), e.decodeAsync = async (n, r) => Mo(e, n, r), e.safeEncode = (n, r) => Lo(e, n, r), e.safeDecode = (n, r) => jo(e, n, r), e.safeEncodeAsync = async (n, r) => xo(e, n, r), e.safeDecodeAsync = async (n, r) => Vo(e, n, r), e.refine = (n, r) => e.check(Di(n, r)), e.superRefine = (n) => e.check(Pi(n)), e.overwrite = (n) => e.check(Y(n)), e.optional = () => Ye(e), e.nullable = () => Je(e), e.nullish = () => Ye(Je(e)), e.nonoptional = (n) => Ii(e, n), e.array = () => di(e), e.or = (n) => _i([e, n]), e.and = (n) => vi(e, n), e.transform = (n) => Ge(e, $i(n)), e.default = (n) => Zi(e, n), e.prefault = (n) => zi(e, n), e.catch = (n) => Ti(e, n), e.pipe = (n) => Ge(e, n), e.readonly = () => Si(e), e.describe = (n) => {
|
|
1766
|
+
const r = e.clone();
|
|
1767
|
+
return Q.add(r, { description: n }), r;
|
|
1768
|
+
}, Object.defineProperty(e, "description", {
|
|
1769
|
+
get() {
|
|
1770
|
+
return Q.get(e)?.description;
|
|
1771
|
+
},
|
|
1772
|
+
configurable: !0
|
|
1773
|
+
}), e.meta = (...n) => {
|
|
1774
|
+
if (n.length === 0)
|
|
1775
|
+
return Q.get(e);
|
|
1776
|
+
const r = e.clone();
|
|
1777
|
+
return Q.add(r, n[0]), r;
|
|
1778
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), wt = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
1779
|
+
Ie.init(e, t), z.init(e, t);
|
|
1780
|
+
const n = e._zod.bag;
|
|
1781
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(uo(...r)), e.includes = (...r) => e.check(fo(...r)), e.startsWith = (...r) => e.check(po(...r)), e.endsWith = (...r) => e.check(ho(...r)), e.min = (...r) => e.check(ue(...r)), e.max = (...r) => e.check(At(...r)), e.length = (...r) => e.check($t(...r)), e.nonempty = (...r) => e.check(ue(1, ...r)), e.lowercase = (r) => e.check(co(r)), e.uppercase = (r) => e.check(lo(r)), e.trim = () => e.check(_o()), e.normalize = (...r) => e.check(mo(...r)), e.toLowerCase = () => e.check(go()), e.toUpperCase = () => e.check(vo());
|
|
1782
|
+
}), Bo = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
1783
|
+
Ie.init(e, t), wt.init(e, t), e.email = (n) => e.check(Pr(qo, n)), e.url = (n) => e.check(Lr(Wo, n)), e.jwt = (n) => e.check(to(si, n)), e.emoji = (n) => e.check(jr(Ko, n)), e.guid = (n) => e.check(We(He, n)), e.uuid = (n) => e.check(Ur(ee, n)), e.uuidv4 = (n) => e.check(Cr(ee, n)), e.uuidv6 = (n) => e.check(Fr(ee, n)), e.uuidv7 = (n) => e.check(Mr(ee, n)), e.nanoid = (n) => e.check(xr(Ho, n)), e.guid = (n) => e.check(We(He, n)), e.cuid = (n) => e.check(Vr(Xo, n)), e.cuid2 = (n) => e.check(Br(Yo, n)), e.ulid = (n) => e.check(qr(Jo, n)), e.base64 = (n) => e.check(Gr(oi, n)), e.base64url = (n) => e.check(Qr(ii, n)), e.xid = (n) => e.check(Wr(Go, n)), e.ksuid = (n) => e.check(Kr(Qo, n)), e.ipv4 = (n) => e.check(Hr(ei, n)), e.ipv6 = (n) => e.check(Xr(ti, n)), e.cidrv4 = (n) => e.check(Yr(ni, n)), e.cidrv6 = (n) => e.check(Jr(ri, n)), e.e164 = (n) => e.check(eo(ai, n)), e.datetime = (n) => e.check(Zo(n)), e.date = (n) => e.check(zo(n)), e.time = (n) => e.check(ko(n)), e.duration = (n) => e.check(Oo(n));
|
|
1784
|
+
});
|
|
1785
|
+
function Ke(e) {
|
|
1786
|
+
return Dr(Bo, e);
|
|
1787
|
+
}
|
|
1788
|
+
const w = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
1789
|
+
A.init(e, t), wt.init(e, t);
|
|
1790
|
+
}), qo = /* @__PURE__ */ u("ZodEmail", (e, t) => {
|
|
1791
|
+
qn.init(e, t), w.init(e, t);
|
|
1792
|
+
}), He = /* @__PURE__ */ u("ZodGUID", (e, t) => {
|
|
1793
|
+
Vn.init(e, t), w.init(e, t);
|
|
1794
|
+
}), ee = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
1795
|
+
Bn.init(e, t), w.init(e, t);
|
|
1796
|
+
}), Wo = /* @__PURE__ */ u("ZodURL", (e, t) => {
|
|
1797
|
+
Wn.init(e, t), w.init(e, t);
|
|
1798
|
+
}), Ko = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
|
|
1799
|
+
Kn.init(e, t), w.init(e, t);
|
|
1800
|
+
}), Ho = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
|
|
1801
|
+
Hn.init(e, t), w.init(e, t);
|
|
1802
|
+
}), Xo = /* @__PURE__ */ u("ZodCUID", (e, t) => {
|
|
1803
|
+
Xn.init(e, t), w.init(e, t);
|
|
1804
|
+
}), Yo = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
|
|
1805
|
+
Yn.init(e, t), w.init(e, t);
|
|
1806
|
+
}), Jo = /* @__PURE__ */ u("ZodULID", (e, t) => {
|
|
1807
|
+
Jn.init(e, t), w.init(e, t);
|
|
1808
|
+
}), Go = /* @__PURE__ */ u("ZodXID", (e, t) => {
|
|
1809
|
+
Gn.init(e, t), w.init(e, t);
|
|
1810
|
+
}), Qo = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
|
|
1811
|
+
Qn.init(e, t), w.init(e, t);
|
|
1812
|
+
}), ei = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
|
|
1813
|
+
or.init(e, t), w.init(e, t);
|
|
1814
|
+
}), ti = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
1815
|
+
ir.init(e, t), w.init(e, t);
|
|
1816
|
+
}), ni = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
1817
|
+
ar.init(e, t), w.init(e, t);
|
|
1818
|
+
}), ri = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
1819
|
+
sr.init(e, t), w.init(e, t);
|
|
1820
|
+
}), oi = /* @__PURE__ */ u("ZodBase64", (e, t) => {
|
|
1821
|
+
ur.init(e, t), w.init(e, t);
|
|
1822
|
+
}), ii = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
|
|
1823
|
+
lr.init(e, t), w.init(e, t);
|
|
1824
|
+
}), ai = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
1825
|
+
fr.init(e, t), w.init(e, t);
|
|
1826
|
+
}), si = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
1827
|
+
pr.init(e, t), w.init(e, t);
|
|
1828
|
+
}), ui = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
|
|
1829
|
+
hr.init(e, t), z.init(e, t);
|
|
1830
|
+
});
|
|
1831
|
+
function Xe() {
|
|
1832
|
+
return ao(ui);
|
|
1833
|
+
}
|
|
1834
|
+
const ci = /* @__PURE__ */ u("ZodNever", (e, t) => {
|
|
1835
|
+
mr.init(e, t), z.init(e, t);
|
|
1836
|
+
});
|
|
1837
|
+
function li(e) {
|
|
1838
|
+
return so(ci, e);
|
|
1839
|
+
}
|
|
1840
|
+
const fi = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
1841
|
+
_r.init(e, t), z.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ue(n, r)), e.nonempty = (n) => e.check(ue(1, n)), e.max = (n, r) => e.check(At(n, r)), e.length = (n, r) => e.check($t(n, r)), e.unwrap = () => e.element;
|
|
1842
|
+
});
|
|
1843
|
+
function di(e, t) {
|
|
1844
|
+
return yo(fi, e, t);
|
|
1845
|
+
}
|
|
1846
|
+
const pi = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
1847
|
+
vr.init(e, t), z.init(e, t), y(e, "shape", () => t.shape), e.keyof = () => yi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Xe() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Xe() }), e.strict = () => e.clone({ ...e._zod.def, catchall: li() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Vt(e, n), e.safeExtend = (n) => Bt(e, n), e.merge = (n) => qt(e, n), e.pick = (n) => jt(e, n), e.omit = (n) => xt(e, n), e.partial = (...n) => Wt(bt, e, n[0]), e.required = (...n) => Kt(Zt, e, n[0]);
|
|
1848
|
+
});
|
|
1849
|
+
function hi(e, t) {
|
|
1850
|
+
const n = {
|
|
1851
|
+
type: "object",
|
|
1852
|
+
shape: e ?? {},
|
|
1853
|
+
...f(t)
|
|
1854
|
+
};
|
|
1855
|
+
return new pi(n);
|
|
1856
|
+
}
|
|
1857
|
+
const mi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
|
|
1858
|
+
yr.init(e, t), z.init(e, t), e.options = t.options;
|
|
1859
|
+
});
|
|
1860
|
+
function _i(e, t) {
|
|
1861
|
+
return new mi({
|
|
1862
|
+
type: "union",
|
|
1863
|
+
options: e,
|
|
1864
|
+
...f(t)
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
const gi = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
|
|
1868
|
+
Ar.init(e, t), z.init(e, t);
|
|
1869
|
+
});
|
|
1870
|
+
function vi(e, t) {
|
|
1871
|
+
return new gi({
|
|
1872
|
+
type: "intersection",
|
|
1873
|
+
left: e,
|
|
1874
|
+
right: t
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
const ye = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
1878
|
+
$r.init(e, t), z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
1879
|
+
const n = new Set(Object.keys(t.entries));
|
|
1880
|
+
e.extract = (r, o) => {
|
|
1881
|
+
const i = {};
|
|
1882
|
+
for (const a of r)
|
|
1883
|
+
if (n.has(a))
|
|
1884
|
+
i[a] = t.entries[a];
|
|
1885
|
+
else
|
|
1886
|
+
throw new Error(`Key ${a} not found in enum`);
|
|
1887
|
+
return new ye({
|
|
1888
|
+
...t,
|
|
1889
|
+
checks: [],
|
|
1890
|
+
...f(o),
|
|
1891
|
+
entries: i
|
|
1892
|
+
});
|
|
1893
|
+
}, e.exclude = (r, o) => {
|
|
1894
|
+
const i = { ...t.entries };
|
|
1895
|
+
for (const a of r)
|
|
1896
|
+
if (n.has(a))
|
|
1897
|
+
delete i[a];
|
|
1898
|
+
else
|
|
1899
|
+
throw new Error(`Key ${a} not found in enum`);
|
|
1900
|
+
return new ye({
|
|
1901
|
+
...t,
|
|
1902
|
+
checks: [],
|
|
1903
|
+
...f(o),
|
|
1904
|
+
entries: i
|
|
1905
|
+
});
|
|
1906
|
+
};
|
|
1907
|
+
});
|
|
1908
|
+
function yi(e, t) {
|
|
1909
|
+
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
1910
|
+
return new ye({
|
|
1911
|
+
type: "enum",
|
|
1912
|
+
entries: n,
|
|
1913
|
+
...f(t)
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
const Ai = /* @__PURE__ */ u("ZodTransform", (e, t) => {
|
|
1917
|
+
wr.init(e, t), z.init(e, t), e._zod.parse = (n, r) => {
|
|
1918
|
+
if (r.direction === "backward")
|
|
1919
|
+
throw new at(e.constructor.name);
|
|
1920
|
+
n.addIssue = (i) => {
|
|
1921
|
+
if (typeof i == "string")
|
|
1922
|
+
n.issues.push(X(i, n.value, t));
|
|
1923
|
+
else {
|
|
1924
|
+
const a = i;
|
|
1925
|
+
a.fatal && (a.continue = !1), a.code ?? (a.code = "custom"), a.input ?? (a.input = n.value), a.inst ?? (a.inst = e), n.issues.push(X(a));
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
const o = t.transform(n.value, n);
|
|
1929
|
+
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
1930
|
+
};
|
|
1931
|
+
});
|
|
1932
|
+
function $i(e) {
|
|
1933
|
+
return new Ai({
|
|
1934
|
+
type: "transform",
|
|
1935
|
+
transform: e
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
const bt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
|
|
1939
|
+
br.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
1940
|
+
});
|
|
1941
|
+
function Ye(e) {
|
|
1942
|
+
return new bt({
|
|
1943
|
+
type: "optional",
|
|
1944
|
+
innerType: e
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
const wi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
1948
|
+
Zr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
1949
|
+
});
|
|
1950
|
+
function Je(e) {
|
|
1951
|
+
return new wi({
|
|
1952
|
+
type: "nullable",
|
|
1953
|
+
innerType: e
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1956
|
+
const bi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
|
|
1957
|
+
Er.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
1958
|
+
});
|
|
1959
|
+
function Zi(e, t) {
|
|
1960
|
+
return new bi({
|
|
1961
|
+
type: "default",
|
|
1962
|
+
innerType: e,
|
|
1963
|
+
get defaultValue() {
|
|
1964
|
+
return typeof t == "function" ? t() : ct(t);
|
|
1965
|
+
}
|
|
1966
|
+
});
|
|
1967
|
+
}
|
|
1968
|
+
const Ei = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
|
|
1969
|
+
zr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
1970
|
+
});
|
|
1971
|
+
function zi(e, t) {
|
|
1972
|
+
return new Ei({
|
|
1973
|
+
type: "prefault",
|
|
1974
|
+
innerType: e,
|
|
1975
|
+
get defaultValue() {
|
|
1976
|
+
return typeof t == "function" ? t() : ct(t);
|
|
1977
|
+
}
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
const Zt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
|
|
1981
|
+
Ir.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
1982
|
+
});
|
|
1983
|
+
function Ii(e, t) {
|
|
1984
|
+
return new Zt({
|
|
1985
|
+
type: "nonoptional",
|
|
1986
|
+
innerType: e,
|
|
1987
|
+
...f(t)
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
const ki = /* @__PURE__ */ u("ZodCatch", (e, t) => {
|
|
1991
|
+
kr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
1992
|
+
});
|
|
1993
|
+
function Ti(e, t) {
|
|
1994
|
+
return new ki({
|
|
1995
|
+
type: "catch",
|
|
1996
|
+
innerType: e,
|
|
1997
|
+
catchValue: typeof t == "function" ? t : () => t
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
const Oi = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
2001
|
+
Tr.init(e, t), z.init(e, t), e.in = t.in, e.out = t.out;
|
|
2002
|
+
});
|
|
2003
|
+
function Ge(e, t) {
|
|
2004
|
+
return new Oi({
|
|
2005
|
+
type: "pipe",
|
|
2006
|
+
in: e,
|
|
2007
|
+
out: t
|
|
2008
|
+
// ...util.normalizeParams(params),
|
|
2009
|
+
});
|
|
2010
|
+
}
|
|
2011
|
+
const Ri = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
|
|
2012
|
+
Or.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2013
|
+
});
|
|
2014
|
+
function Si(e) {
|
|
2015
|
+
return new Ri({
|
|
2016
|
+
type: "readonly",
|
|
2017
|
+
innerType: e
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
const Ni = /* @__PURE__ */ u("ZodCustom", (e, t) => {
|
|
2021
|
+
Rr.init(e, t), z.init(e, t);
|
|
2022
|
+
});
|
|
2023
|
+
function Di(e, t = {}) {
|
|
2024
|
+
return Ao(Ni, e, t);
|
|
2025
|
+
}
|
|
2026
|
+
function Pi(e) {
|
|
2027
|
+
return $o(e);
|
|
2028
|
+
}
|
|
2029
|
+
var me = (
|
|
2030
|
+
/** @class */
|
|
2031
|
+
/* @__PURE__ */ function() {
|
|
2032
|
+
function e(t) {
|
|
2033
|
+
this.groups = [], this.each = !1, this.context = void 0, this.type = t.type, this.name = t.name, this.target = t.target, this.propertyName = t.propertyName, this.constraints = t?.constraints, this.constraintCls = t.constraintCls, this.validationTypeOptions = t.validationTypeOptions, t.validationOptions && (this.message = t.validationOptions.message, this.groups = t.validationOptions.groups, this.always = t.validationOptions.always, this.each = t.validationOptions.each, this.context = t.validationOptions.context);
|
|
2034
|
+
}
|
|
2035
|
+
return e;
|
|
2036
|
+
}()
|
|
2037
|
+
), Ui = (
|
|
2038
|
+
/** @class */
|
|
2039
|
+
function() {
|
|
2040
|
+
function e() {
|
|
2041
|
+
}
|
|
2042
|
+
return e.prototype.transform = function(t) {
|
|
2043
|
+
var n = [];
|
|
2044
|
+
return Object.keys(t.properties).forEach(function(r) {
|
|
2045
|
+
t.properties[r].forEach(function(o) {
|
|
2046
|
+
var i = {
|
|
2047
|
+
message: o.message,
|
|
2048
|
+
groups: o.groups,
|
|
2049
|
+
always: o.always,
|
|
2050
|
+
each: o.each
|
|
2051
|
+
}, a = {
|
|
2052
|
+
type: o.type,
|
|
2053
|
+
name: o.name,
|
|
2054
|
+
target: t.name,
|
|
2055
|
+
propertyName: r,
|
|
2056
|
+
constraints: o.constraints,
|
|
2057
|
+
validationTypeOptions: o.options,
|
|
2058
|
+
validationOptions: i
|
|
2059
|
+
};
|
|
2060
|
+
n.push(new me(a));
|
|
2061
|
+
});
|
|
2062
|
+
}), n;
|
|
2063
|
+
}, e;
|
|
2064
|
+
}()
|
|
2065
|
+
);
|
|
2066
|
+
function Ci() {
|
|
2067
|
+
if (typeof globalThis < "u")
|
|
2068
|
+
return globalThis;
|
|
2069
|
+
if (typeof global < "u")
|
|
2070
|
+
return global;
|
|
2071
|
+
if (typeof window < "u")
|
|
2072
|
+
return window;
|
|
2073
|
+
if (typeof self < "u")
|
|
2074
|
+
return self;
|
|
2075
|
+
}
|
|
2076
|
+
var Fi = function(e) {
|
|
2077
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
2078
|
+
if (n) return n.call(e);
|
|
2079
|
+
if (e && typeof e.length == "number") return {
|
|
2080
|
+
next: function() {
|
|
2081
|
+
return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
|
|
2082
|
+
}
|
|
2083
|
+
};
|
|
2084
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2085
|
+
}, Qe = function(e, t) {
|
|
2086
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
2087
|
+
if (!n) return e;
|
|
2088
|
+
var r = n.call(e), o, i = [], a;
|
|
2089
|
+
try {
|
|
2090
|
+
for (; (t === void 0 || t-- > 0) && !(o = r.next()).done; ) i.push(o.value);
|
|
2091
|
+
} catch (s) {
|
|
2092
|
+
a = { error: s };
|
|
2093
|
+
} finally {
|
|
2094
|
+
try {
|
|
2095
|
+
o && !o.done && (n = r.return) && n.call(r);
|
|
2096
|
+
} finally {
|
|
2097
|
+
if (a) throw a.error;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
return i;
|
|
2101
|
+
}, Mi = function(e, t, n) {
|
|
2102
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
2103
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
2104
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
2105
|
+
}, Et = (
|
|
2106
|
+
/** @class */
|
|
2107
|
+
function() {
|
|
2108
|
+
function e() {
|
|
2109
|
+
this.validationMetadatas = /* @__PURE__ */ new Map(), this.constraintMetadatas = /* @__PURE__ */ new Map();
|
|
2110
|
+
}
|
|
2111
|
+
return Object.defineProperty(e.prototype, "hasValidationMetaData", {
|
|
2112
|
+
get: function() {
|
|
2113
|
+
return !!this.validationMetadatas.size;
|
|
2114
|
+
},
|
|
2115
|
+
enumerable: !1,
|
|
2116
|
+
configurable: !0
|
|
2117
|
+
}), e.prototype.addValidationSchema = function(t) {
|
|
2118
|
+
var n = this, r = new Ui().transform(t);
|
|
2119
|
+
r.forEach(function(o) {
|
|
2120
|
+
return n.addValidationMetadata(o);
|
|
2121
|
+
});
|
|
2122
|
+
}, e.prototype.addValidationMetadata = function(t) {
|
|
2123
|
+
var n = this.validationMetadatas.get(t.target);
|
|
2124
|
+
n ? n.push(t) : this.validationMetadatas.set(t.target, [t]);
|
|
2125
|
+
}, e.prototype.addConstraintMetadata = function(t) {
|
|
2126
|
+
var n = this.constraintMetadatas.get(t.target);
|
|
2127
|
+
n ? n.push(t) : this.constraintMetadatas.set(t.target, [t]);
|
|
2128
|
+
}, e.prototype.groupByPropertyName = function(t) {
|
|
2129
|
+
var n = {};
|
|
2130
|
+
return t.forEach(function(r) {
|
|
2131
|
+
n[r.propertyName] || (n[r.propertyName] = []), n[r.propertyName].push(r);
|
|
2132
|
+
}), n;
|
|
2133
|
+
}, e.prototype.getTargetValidationMetadatas = function(t, n, r, o, i) {
|
|
2134
|
+
var a, s, c = function(p) {
|
|
2135
|
+
return typeof p.always < "u" ? p.always : p.groups && p.groups.length ? !1 : r;
|
|
2136
|
+
}, l = function(p) {
|
|
2137
|
+
return !!(o && (!i || !i.length) && p.groups && p.groups.length);
|
|
2138
|
+
}, m = this.validationMetadatas.get(t) || [], b = m.filter(function(p) {
|
|
2139
|
+
return p.target !== t && p.target !== n ? !1 : c(p) ? !0 : l(p) ? !1 : i && i.length > 0 ? p.groups && !!p.groups.find(function(T) {
|
|
2140
|
+
return i.indexOf(T) !== -1;
|
|
2141
|
+
}) : !0;
|
|
2142
|
+
}), g = [];
|
|
2143
|
+
try {
|
|
2144
|
+
for (var v = Fi(this.validationMetadatas.entries()), $ = v.next(); !$.done; $ = v.next()) {
|
|
2145
|
+
var U = Qe($.value, 2), M = U[0], L = U[1];
|
|
2146
|
+
t.prototype instanceof M && g.push.apply(g, Mi([], Qe(L), !1));
|
|
2147
|
+
}
|
|
2148
|
+
} catch (p) {
|
|
2149
|
+
a = { error: p };
|
|
2150
|
+
} finally {
|
|
2151
|
+
try {
|
|
2152
|
+
$ && !$.done && (s = v.return) && s.call(v);
|
|
2153
|
+
} finally {
|
|
2154
|
+
if (a) throw a.error;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
var j = g.filter(function(p) {
|
|
2158
|
+
return typeof p.target == "string" || p.target === t || p.target instanceof Function && !(t.prototype instanceof p.target) ? !1 : c(p) ? !0 : l(p) ? !1 : i && i.length > 0 ? p.groups && !!p.groups.find(function(T) {
|
|
2159
|
+
return i.indexOf(T) !== -1;
|
|
2160
|
+
}) : !0;
|
|
2161
|
+
}), R = j.filter(function(p) {
|
|
2162
|
+
return !b.find(function(T) {
|
|
2163
|
+
return T.propertyName === p.propertyName && T.type === p.type;
|
|
2164
|
+
});
|
|
2165
|
+
});
|
|
2166
|
+
return b.concat(R);
|
|
2167
|
+
}, e.prototype.getTargetValidatorConstraints = function(t) {
|
|
2168
|
+
return this.constraintMetadatas.get(t) || [];
|
|
2169
|
+
}, e;
|
|
2170
|
+
}()
|
|
2171
|
+
);
|
|
2172
|
+
function ce() {
|
|
2173
|
+
var e = Ci();
|
|
2174
|
+
return e.classValidatorMetadataStorage || (e.classValidatorMetadataStorage = new Et()), e.classValidatorMetadataStorage;
|
|
2175
|
+
}
|
|
2176
|
+
var le = (
|
|
2177
|
+
/** @class */
|
|
2178
|
+
function() {
|
|
2179
|
+
function e() {
|
|
2180
|
+
}
|
|
2181
|
+
return e.isValid = function(t) {
|
|
2182
|
+
var n = this;
|
|
2183
|
+
return t !== "isValid" && t !== "getMessage" && Object.keys(this).map(function(r) {
|
|
2184
|
+
return n[r];
|
|
2185
|
+
}).indexOf(t) !== -1;
|
|
2186
|
+
}, e.CUSTOM_VALIDATION = "customValidation", e.NESTED_VALIDATION = "nestedValidation", e.PROMISE_VALIDATION = "promiseValidation", e.CONDITIONAL_VALIDATION = "conditionalValidation", e.WHITELIST = "whitelistValidation", e.IS_DEFINED = "isDefined", e;
|
|
2187
|
+
}()
|
|
2188
|
+
), Li = new /** @class */
|
|
2189
|
+
(function() {
|
|
2190
|
+
function e() {
|
|
2191
|
+
this.instances = [];
|
|
2192
|
+
}
|
|
2193
|
+
return e.prototype.get = function(t) {
|
|
2194
|
+
var n = this.instances.find(function(r) {
|
|
2195
|
+
return r.type === t;
|
|
2196
|
+
});
|
|
2197
|
+
return n || (n = { type: t, object: new t() }, this.instances.push(n)), n.object;
|
|
2198
|
+
}, e;
|
|
2199
|
+
}())();
|
|
2200
|
+
function zt(e) {
|
|
2201
|
+
return Li.get(e);
|
|
2202
|
+
}
|
|
2203
|
+
var ji = (
|
|
2204
|
+
/** @class */
|
|
2205
|
+
function() {
|
|
2206
|
+
function e(t, n, r) {
|
|
2207
|
+
r === void 0 && (r = !1), this.target = t, this.name = n, this.async = r;
|
|
2208
|
+
}
|
|
2209
|
+
return Object.defineProperty(e.prototype, "instance", {
|
|
2210
|
+
// -------------------------------------------------------------------------
|
|
2211
|
+
// Accessors
|
|
2212
|
+
// -------------------------------------------------------------------------
|
|
2213
|
+
/**
|
|
2214
|
+
* Instance of the target custom validation class which performs validation.
|
|
2215
|
+
*/
|
|
2216
|
+
get: function() {
|
|
2217
|
+
return zt(this.target);
|
|
2218
|
+
},
|
|
2219
|
+
enumerable: !1,
|
|
2220
|
+
configurable: !0
|
|
2221
|
+
}), e;
|
|
2222
|
+
}()
|
|
2223
|
+
);
|
|
2224
|
+
function It(e) {
|
|
2225
|
+
var t;
|
|
2226
|
+
if (e.validator instanceof Function) {
|
|
2227
|
+
t = e.validator;
|
|
2228
|
+
var n = zt(Et).getTargetValidatorConstraints(e.validator);
|
|
2229
|
+
if (n.length > 1)
|
|
2230
|
+
throw "More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name, ":").concat(e.propertyName);
|
|
2231
|
+
} else {
|
|
2232
|
+
var r = e.validator;
|
|
2233
|
+
t = /** @class */
|
|
2234
|
+
function() {
|
|
2235
|
+
function i() {
|
|
2236
|
+
}
|
|
2237
|
+
return i.prototype.validate = function(a, s) {
|
|
2238
|
+
return r.validate(a, s);
|
|
2239
|
+
}, i.prototype.defaultMessage = function(a) {
|
|
2240
|
+
return r.defaultMessage ? r.defaultMessage(a) : "";
|
|
2241
|
+
}, i;
|
|
2242
|
+
}(), ce().addConstraintMetadata(new ji(t, e.name, e.async));
|
|
2243
|
+
}
|
|
2244
|
+
var o = {
|
|
2245
|
+
type: e.name && le.isValid(e.name) ? e.name : le.CUSTOM_VALIDATION,
|
|
2246
|
+
name: e.name,
|
|
2247
|
+
target: e.target,
|
|
2248
|
+
propertyName: e.propertyName,
|
|
2249
|
+
validationOptions: e.options,
|
|
2250
|
+
constraintCls: t,
|
|
2251
|
+
constraints: e.constraints
|
|
2252
|
+
};
|
|
2253
|
+
ce().addValidationMetadata(new me(o));
|
|
2254
|
+
}
|
|
2255
|
+
function D(e, t) {
|
|
2256
|
+
return function(n) {
|
|
2257
|
+
var r = "";
|
|
2258
|
+
return e(r, n);
|
|
2259
|
+
};
|
|
2260
|
+
}
|
|
2261
|
+
function P(e, t) {
|
|
2262
|
+
return function(n, r) {
|
|
2263
|
+
It({
|
|
2264
|
+
name: e.name,
|
|
2265
|
+
target: n.constructor,
|
|
2266
|
+
propertyName: r,
|
|
2267
|
+
options: t,
|
|
2268
|
+
constraints: e.constraints,
|
|
2269
|
+
validator: e.validator
|
|
2270
|
+
});
|
|
2271
|
+
};
|
|
2272
|
+
}
|
|
2273
|
+
var xi = "isOptional";
|
|
2274
|
+
function Vi(e) {
|
|
2275
|
+
return function(t, n) {
|
|
2276
|
+
var r = {
|
|
2277
|
+
type: le.CONDITIONAL_VALIDATION,
|
|
2278
|
+
name: xi,
|
|
2279
|
+
target: t.constructor,
|
|
2280
|
+
propertyName: n,
|
|
2281
|
+
constraints: [
|
|
2282
|
+
function(o, i) {
|
|
2283
|
+
return o[n] !== null && o[n] !== void 0;
|
|
2284
|
+
}
|
|
2285
|
+
],
|
|
2286
|
+
validationOptions: e
|
|
2287
|
+
};
|
|
2288
|
+
ce().addValidationMetadata(new me(r));
|
|
2289
|
+
};
|
|
2290
|
+
}
|
|
2291
|
+
function _(e, t) {
|
|
2292
|
+
return function(n, r) {
|
|
2293
|
+
var o = {
|
|
2294
|
+
type: le.CONDITIONAL_VALIDATION,
|
|
2295
|
+
target: n.constructor,
|
|
2296
|
+
propertyName: r,
|
|
2297
|
+
constraints: [e],
|
|
2298
|
+
validationOptions: t
|
|
2299
|
+
};
|
|
2300
|
+
ce().addValidationMetadata(new me(o));
|
|
2301
|
+
};
|
|
2302
|
+
}
|
|
2303
|
+
var Xa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2304
|
+
function ke(e) {
|
|
2305
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2306
|
+
}
|
|
2307
|
+
var te = { exports: {} }, et;
|
|
2308
|
+
function Te() {
|
|
2309
|
+
return et || (et = 1, function(e, t) {
|
|
2310
|
+
Object.defineProperty(t, "__esModule", {
|
|
2311
|
+
value: !0
|
|
2312
|
+
}), t.default = n;
|
|
2313
|
+
function n(r) {
|
|
2314
|
+
if (r == null) throw new TypeError("Expected a string but received a ".concat(r));
|
|
2315
|
+
if (r.constructor.name !== "String") throw new TypeError("Expected a string but received a ".concat(r.constructor.name));
|
|
2316
|
+
}
|
|
2317
|
+
e.exports = t.default, e.exports.default = t.default;
|
|
2318
|
+
}(te, te.exports)), te.exports;
|
|
2319
|
+
}
|
|
2320
|
+
var Bi = "isNotEmpty";
|
|
2321
|
+
function qi(e) {
|
|
2322
|
+
return e !== "" && e !== null && e !== void 0;
|
|
2323
|
+
}
|
|
2324
|
+
function kt(e) {
|
|
2325
|
+
return P({
|
|
2326
|
+
name: Bi,
|
|
2327
|
+
validator: {
|
|
2328
|
+
validate: function(t, n) {
|
|
2329
|
+
return qi(t);
|
|
2330
|
+
},
|
|
2331
|
+
defaultMessage: D(function(t) {
|
|
2332
|
+
return t + "$property should not be empty";
|
|
2333
|
+
})
|
|
2334
|
+
}
|
|
2335
|
+
}, e);
|
|
2336
|
+
}
|
|
2337
|
+
var Z = {}, tt;
|
|
2338
|
+
function Wi() {
|
|
2339
|
+
if (tt) return Z;
|
|
2340
|
+
tt = 1, Object.defineProperty(Z, "__esModule", {
|
|
2341
|
+
value: !0
|
|
2342
|
+
}), Z.farsiLocales = Z.englishLocales = Z.dotDecimal = Z.decimal = Z.commaDecimal = Z.bengaliLocales = Z.arabicLocales = Z.alphanumeric = Z.alpha = void 0;
|
|
2343
|
+
for (var e = Z.alpha = {
|
|
2344
|
+
"en-US": /^[A-Z]+$/i,
|
|
2345
|
+
"az-AZ": /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
|
2346
|
+
"bg-BG": /^[А-Я]+$/i,
|
|
2347
|
+
"cs-CZ": /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
|
2348
|
+
"da-DK": /^[A-ZÆØÅ]+$/i,
|
|
2349
|
+
"de-DE": /^[A-ZÄÖÜß]+$/i,
|
|
2350
|
+
"el-GR": /^[Α-ώ]+$/i,
|
|
2351
|
+
"es-ES": /^[A-ZÁÉÍÑÓÚÜ]+$/i,
|
|
2352
|
+
"fa-IR": /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,
|
|
2353
|
+
"fi-FI": /^[A-ZÅÄÖ]+$/i,
|
|
2354
|
+
"fr-FR": /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
|
2355
|
+
"it-IT": /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
|
2356
|
+
"ja-JP": /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
|
2357
|
+
"nb-NO": /^[A-ZÆØÅ]+$/i,
|
|
2358
|
+
"nl-NL": /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
|
|
2359
|
+
"nn-NO": /^[A-ZÆØÅ]+$/i,
|
|
2360
|
+
"hu-HU": /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
|
2361
|
+
"pl-PL": /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
|
2362
|
+
"pt-PT": /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
|
2363
|
+
"ru-RU": /^[А-ЯЁ]+$/i,
|
|
2364
|
+
"kk-KZ": /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
|
|
2365
|
+
"sl-SI": /^[A-ZČĆĐŠŽ]+$/i,
|
|
2366
|
+
"sk-SK": /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
|
2367
|
+
"sr-RS@latin": /^[A-ZČĆŽŠĐ]+$/i,
|
|
2368
|
+
"sr-RS": /^[А-ЯЂЈЉЊЋЏ]+$/i,
|
|
2369
|
+
"sv-SE": /^[A-ZÅÄÖ]+$/i,
|
|
2370
|
+
"th-TH": /^[ก-๐\s]+$/i,
|
|
2371
|
+
"tr-TR": /^[A-ZÇĞİıÖŞÜ]+$/i,
|
|
2372
|
+
"uk-UA": /^[А-ЩЬЮЯЄIЇҐі]+$/i,
|
|
2373
|
+
"vi-VN": /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
|
2374
|
+
"ko-KR": /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
|
2375
|
+
"ku-IQ": /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
|
2376
|
+
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
|
2377
|
+
he: /^[א-ת]+$/,
|
|
2378
|
+
fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,
|
|
2379
|
+
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
|
2380
|
+
eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
|
|
2381
|
+
"hi-IN": /^[\u0900-\u0961]+[\u0972-\u097F]*$/i,
|
|
2382
|
+
"si-LK": /^[\u0D80-\u0DFF]+$/,
|
|
2383
|
+
"ta-IN": /^[\u0B80-\u0BFF]+$/i,
|
|
2384
|
+
"te-IN": /^[\u0C00-\u0C7F]+$/i,
|
|
2385
|
+
"kn-IN": /^[\u0C80-\u0CFF]+$/i,
|
|
2386
|
+
"ml-IN": /^[\u0D00-\u0D7F]+$/i,
|
|
2387
|
+
"gu-IN": /^[\u0A80-\u0AFF]+$/i,
|
|
2388
|
+
"pa-IN": /^[\u0A00-\u0A7F]+$/i,
|
|
2389
|
+
"or-IN": /^[\u0B00-\u0B7F]+$/i
|
|
2390
|
+
}, t = Z.alphanumeric = {
|
|
2391
|
+
"en-US": /^[0-9A-Z]+$/i,
|
|
2392
|
+
"az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
|
2393
|
+
"bg-BG": /^[0-9А-Я]+$/i,
|
|
2394
|
+
"cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
|
2395
|
+
"da-DK": /^[0-9A-ZÆØÅ]+$/i,
|
|
2396
|
+
"de-DE": /^[0-9A-ZÄÖÜß]+$/i,
|
|
2397
|
+
"el-GR": /^[0-9Α-ω]+$/i,
|
|
2398
|
+
"es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
|
|
2399
|
+
"fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
|
|
2400
|
+
"fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
|
2401
|
+
"it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
|
2402
|
+
"ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
|
2403
|
+
"hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
|
2404
|
+
"nb-NO": /^[0-9A-ZÆØÅ]+$/i,
|
|
2405
|
+
"nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
|
|
2406
|
+
"nn-NO": /^[0-9A-ZÆØÅ]+$/i,
|
|
2407
|
+
"pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
|
2408
|
+
"pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
|
2409
|
+
"ru-RU": /^[0-9А-ЯЁ]+$/i,
|
|
2410
|
+
"kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
|
|
2411
|
+
"sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
|
|
2412
|
+
"sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
|
2413
|
+
"sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
|
|
2414
|
+
"sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
|
|
2415
|
+
"sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
|
|
2416
|
+
"th-TH": /^[ก-๙\s]+$/i,
|
|
2417
|
+
"tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
|
|
2418
|
+
"uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
|
|
2419
|
+
"ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
|
2420
|
+
"ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
|
2421
|
+
"vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
|
2422
|
+
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
|
2423
|
+
he: /^[0-9א-ת]+$/,
|
|
2424
|
+
fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
|
|
2425
|
+
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
|
2426
|
+
eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
|
|
2427
|
+
"hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
|
|
2428
|
+
"si-LK": /^[0-9\u0D80-\u0DFF]+$/,
|
|
2429
|
+
"ta-IN": /^[0-9\u0B80-\u0BFF.]+$/i,
|
|
2430
|
+
"te-IN": /^[0-9\u0C00-\u0C7F.]+$/i,
|
|
2431
|
+
"kn-IN": /^[0-9\u0C80-\u0CFF.]+$/i,
|
|
2432
|
+
"ml-IN": /^[0-9\u0D00-\u0D7F.]+$/i,
|
|
2433
|
+
"gu-IN": /^[0-9\u0A80-\u0AFF.]+$/i,
|
|
2434
|
+
"pa-IN": /^[0-9\u0A00-\u0A7F.]+$/i,
|
|
2435
|
+
"or-IN": /^[0-9\u0B00-\u0B7F.]+$/i
|
|
2436
|
+
}, n = Z.decimal = {
|
|
2437
|
+
"en-US": ".",
|
|
2438
|
+
ar: "٫"
|
|
2439
|
+
}, r = Z.englishLocales = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"], o, i = 0; i < r.length; i++)
|
|
2440
|
+
o = "en-".concat(r[i]), e[o] = e["en-US"], t[o] = t["en-US"], n[o] = n["en-US"];
|
|
2441
|
+
for (var a = Z.arabicLocales = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"], s, c = 0; c < a.length; c++)
|
|
2442
|
+
s = "ar-".concat(a[c]), e[s] = e.ar, t[s] = t.ar, n[s] = n.ar;
|
|
2443
|
+
for (var l = Z.farsiLocales = ["IR", "AF"], m, b = 0; b < l.length; b++)
|
|
2444
|
+
m = "fa-".concat(l[b]), t[m] = t.fa, n[m] = n.ar;
|
|
2445
|
+
for (var g = Z.bengaliLocales = ["BD", "IN"], v, $ = 0; $ < g.length; $++)
|
|
2446
|
+
v = "bn-".concat(g[$]), e[v] = e.bn, t[v] = t.bn, n[v] = n["en-US"];
|
|
2447
|
+
for (var U = Z.dotDecimal = ["ar-EG", "ar-LB", "ar-LY"], M = Z.commaDecimal = ["bg-BG", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-ZM", "eo", "es-ES", "fr-CA", "fr-FR", "gu-IN", "hi-IN", "hu-HU", "id-ID", "it-IT", "kk-KZ", "kn-IN", "ku-IQ", "ml-IN", "nb-NO", "nl-NL", "nn-NO", "or-IN", "pa-IN", "pl-PL", "pt-PT", "ru-RU", "si-LK", "sl-SI", "sr-RS", "sr-RS@latin", "sv-SE", "ta-IN", "te-IN", "tr-TR", "uk-UA", "vi-VN"], L = 0; L < U.length; L++)
|
|
2448
|
+
n[U[L]] = n["en-US"];
|
|
2449
|
+
for (var j = 0; j < M.length; j++)
|
|
2450
|
+
n[M[j]] = ",";
|
|
2451
|
+
return e["fr-CA"] = e["fr-FR"], t["fr-CA"] = t["fr-FR"], e["pt-BR"] = e["pt-PT"], t["pt-BR"] = t["pt-PT"], n["pt-BR"] = n["pt-PT"], e["pl-Pl"] = e["pl-PL"], t["pl-Pl"] = t["pl-PL"], n["pl-Pl"] = n["pl-PL"], e["fa-AF"] = e.fa, Z;
|
|
2452
|
+
}
|
|
2453
|
+
var ne = { exports: {} }, nt;
|
|
2454
|
+
function Ki() {
|
|
2455
|
+
return nt || (nt = 1, function(e, t) {
|
|
2456
|
+
Object.defineProperty(t, "__esModule", {
|
|
2457
|
+
value: !0
|
|
2458
|
+
}), t.default = i;
|
|
2459
|
+
var n = r(/* @__PURE__ */ Te());
|
|
2460
|
+
function r(a) {
|
|
2461
|
+
return a && a.__esModule ? a : { default: a };
|
|
2462
|
+
}
|
|
2463
|
+
var o = {
|
|
2464
|
+
1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2465
|
+
2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2466
|
+
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2467
|
+
4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2468
|
+
5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2469
|
+
6: /^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2470
|
+
7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2471
|
+
8: /^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
2472
|
+
nil: /^00000000-0000-0000-0000-000000000000$/i,
|
|
2473
|
+
max: /^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,
|
|
2474
|
+
loose: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
|
|
2475
|
+
// From https://github.com/uuidjs/uuid/blob/main/src/regex.js
|
|
2476
|
+
all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i
|
|
2477
|
+
};
|
|
2478
|
+
function i(a, s) {
|
|
2479
|
+
return (0, n.default)(a), s == null && (s = "all"), s in o ? o[s].test(a) : !1;
|
|
2480
|
+
}
|
|
2481
|
+
e.exports = t.default, e.exports.default = t.default;
|
|
2482
|
+
}(ne, ne.exports)), ne.exports;
|
|
2483
|
+
}
|
|
2484
|
+
var Hi = /* @__PURE__ */ Ki();
|
|
2485
|
+
const Xi = /* @__PURE__ */ ke(Hi);
|
|
2486
|
+
var Yi = "isUuid";
|
|
2487
|
+
function Ji(e, t) {
|
|
2488
|
+
return typeof e == "string" && Xi(e, t);
|
|
2489
|
+
}
|
|
2490
|
+
function Gi(e, t) {
|
|
2491
|
+
return P({
|
|
2492
|
+
name: Yi,
|
|
2493
|
+
constraints: [e],
|
|
2494
|
+
validator: {
|
|
2495
|
+
validate: function(n, r) {
|
|
2496
|
+
return Ji(n, r?.constraints[0]);
|
|
2497
|
+
},
|
|
2498
|
+
defaultMessage: D(function(n) {
|
|
2499
|
+
return n + "$property must be a UUID";
|
|
2500
|
+
})
|
|
2501
|
+
}
|
|
2502
|
+
}, t);
|
|
2503
|
+
}
|
|
2504
|
+
var re = { exports: {} }, rt;
|
|
2505
|
+
function Qi() {
|
|
2506
|
+
return rt || (rt = 1, function(e, t) {
|
|
2507
|
+
Object.defineProperty(t, "__esModule", {
|
|
2508
|
+
value: !0
|
|
2509
|
+
}), t.default = o;
|
|
2510
|
+
var n = r(/* @__PURE__ */ Te());
|
|
2511
|
+
function r(i) {
|
|
2512
|
+
return i && i.__esModule ? i : { default: i };
|
|
2513
|
+
}
|
|
2514
|
+
function o(i, a, s) {
|
|
2515
|
+
return (0, n.default)(i), Object.prototype.toString.call(a) !== "[object RegExp]" && (a = new RegExp(a, s)), !!i.match(a);
|
|
2516
|
+
}
|
|
2517
|
+
e.exports = t.default, e.exports.default = t.default;
|
|
2518
|
+
}(re, re.exports)), re.exports;
|
|
2519
|
+
}
|
|
2520
|
+
var ea = /* @__PURE__ */ Qi();
|
|
2521
|
+
const ta = /* @__PURE__ */ ke(ea);
|
|
2522
|
+
var na = "matches";
|
|
2523
|
+
function ra(e, t, n) {
|
|
2524
|
+
return typeof e == "string" && ta(e, t, n);
|
|
2525
|
+
}
|
|
2526
|
+
function Tt(e, t, n) {
|
|
2527
|
+
var r;
|
|
2528
|
+
return r = t, P({
|
|
2529
|
+
name: na,
|
|
2530
|
+
constraints: [e, r],
|
|
2531
|
+
validator: {
|
|
2532
|
+
validate: function(o, i) {
|
|
2533
|
+
return ra(o, i?.constraints[0], i?.constraints[1]);
|
|
2534
|
+
},
|
|
2535
|
+
defaultMessage: D(function(o, i) {
|
|
2536
|
+
return o + "$property must match $constraint1 regular expression";
|
|
2537
|
+
})
|
|
2538
|
+
}
|
|
2539
|
+
}, n);
|
|
2540
|
+
}
|
|
2541
|
+
var oe = { exports: {} }, ot;
|
|
2542
|
+
function oa() {
|
|
2543
|
+
return ot || (ot = 1, function(e, t) {
|
|
2544
|
+
Object.defineProperty(t, "__esModule", {
|
|
2545
|
+
value: !0
|
|
2546
|
+
}), t.default = a;
|
|
2547
|
+
var n = o(/* @__PURE__ */ Te()), r = /* @__PURE__ */ Wi();
|
|
2548
|
+
function o(s) {
|
|
2549
|
+
return s && s.__esModule ? s : { default: s };
|
|
2550
|
+
}
|
|
2551
|
+
var i = /^[0-9]+$/;
|
|
2552
|
+
function a(s, c) {
|
|
2553
|
+
return (0, n.default)(s), c && c.no_symbols ? i.test(s) : new RegExp("^[+-]?([0-9]*[".concat((c || {}).locale ? r.decimal[c.locale] : ".", "])?[0-9]+$")).test(s);
|
|
2554
|
+
}
|
|
2555
|
+
e.exports = t.default, e.exports.default = t.default;
|
|
2556
|
+
}(oe, oe.exports)), oe.exports;
|
|
2557
|
+
}
|
|
2558
|
+
var ia = /* @__PURE__ */ oa();
|
|
2559
|
+
const aa = /* @__PURE__ */ ke(ia);
|
|
2560
|
+
var sa = "isNumberString";
|
|
2561
|
+
function ua(e, t) {
|
|
2562
|
+
return typeof e == "string" && aa(e, t);
|
|
2563
|
+
}
|
|
2564
|
+
function ca(e, t) {
|
|
2565
|
+
return P({
|
|
2566
|
+
name: sa,
|
|
2567
|
+
constraints: [e],
|
|
2568
|
+
validator: {
|
|
2569
|
+
validate: function(n, r) {
|
|
2570
|
+
return ua(n, r?.constraints[0]);
|
|
2571
|
+
},
|
|
2572
|
+
defaultMessage: D(function(n) {
|
|
2573
|
+
return n + "$property must be a number string";
|
|
2574
|
+
})
|
|
2575
|
+
}
|
|
2576
|
+
}, t);
|
|
2577
|
+
}
|
|
2578
|
+
var la = "isBoolean";
|
|
2579
|
+
function fa(e) {
|
|
2580
|
+
return e instanceof Boolean || typeof e == "boolean";
|
|
2581
|
+
}
|
|
2582
|
+
function da(e) {
|
|
2583
|
+
return P({
|
|
2584
|
+
name: la,
|
|
2585
|
+
validator: {
|
|
2586
|
+
validate: function(t, n) {
|
|
2587
|
+
return fa(t);
|
|
2588
|
+
},
|
|
2589
|
+
defaultMessage: D(function(t) {
|
|
2590
|
+
return t + "$property must be a boolean value";
|
|
2591
|
+
})
|
|
2592
|
+
}
|
|
2593
|
+
}, e);
|
|
2594
|
+
}
|
|
2595
|
+
var pa = "isDate";
|
|
2596
|
+
function ha(e) {
|
|
2597
|
+
return e instanceof Date && !isNaN(e.getTime());
|
|
2598
|
+
}
|
|
2599
|
+
function Ot(e) {
|
|
2600
|
+
return P({
|
|
2601
|
+
name: pa,
|
|
2602
|
+
validator: {
|
|
2603
|
+
validate: function(t, n) {
|
|
2604
|
+
return ha(t);
|
|
2605
|
+
},
|
|
2606
|
+
defaultMessage: D(function(t) {
|
|
2607
|
+
return t + "$property must be a Date instance";
|
|
2608
|
+
})
|
|
2609
|
+
}
|
|
2610
|
+
}, e);
|
|
2611
|
+
}
|
|
2612
|
+
var ma = "isNumber";
|
|
2613
|
+
function _a(e, t) {
|
|
2614
|
+
if (t === void 0 && (t = {}), typeof e != "number")
|
|
2615
|
+
return !1;
|
|
2616
|
+
if (e === 1 / 0 || e === -1 / 0)
|
|
2617
|
+
return !!t.allowInfinity;
|
|
2618
|
+
if (Number.isNaN(e))
|
|
2619
|
+
return !!t.allowNaN;
|
|
2620
|
+
if (t.maxDecimalPlaces !== void 0) {
|
|
2621
|
+
var n = 0;
|
|
2622
|
+
if (e % 1 !== 0 && (n = e.toString().split(".")[1].length), n > t.maxDecimalPlaces)
|
|
2623
|
+
return !1;
|
|
2624
|
+
}
|
|
2625
|
+
return Number.isFinite(e);
|
|
2626
|
+
}
|
|
2627
|
+
function Oe(e, t) {
|
|
2628
|
+
return e === void 0 && (e = {}), P({
|
|
2629
|
+
name: ma,
|
|
2630
|
+
constraints: [e],
|
|
2631
|
+
validator: {
|
|
2632
|
+
validate: function(n, r) {
|
|
2633
|
+
return _a(n, r?.constraints[0]);
|
|
2634
|
+
},
|
|
2635
|
+
defaultMessage: D(function(n) {
|
|
2636
|
+
return n + "$property must be a number conforming to the specified constraints";
|
|
2637
|
+
})
|
|
2638
|
+
}
|
|
2639
|
+
}, t);
|
|
2640
|
+
}
|
|
2641
|
+
var ga = "isString";
|
|
2642
|
+
function va(e) {
|
|
2643
|
+
return e instanceof String || typeof e == "string";
|
|
2644
|
+
}
|
|
2645
|
+
function S(e) {
|
|
2646
|
+
return P({
|
|
2647
|
+
name: ga,
|
|
2648
|
+
validator: {
|
|
2649
|
+
validate: function(t, n) {
|
|
2650
|
+
return va(t);
|
|
2651
|
+
},
|
|
2652
|
+
defaultMessage: D(function(t) {
|
|
2653
|
+
return t + "$property must be a string";
|
|
2654
|
+
})
|
|
2655
|
+
}
|
|
2656
|
+
}, e);
|
|
2657
|
+
}
|
|
2658
|
+
var ya = "isArray";
|
|
2659
|
+
function Aa(e) {
|
|
2660
|
+
return Array.isArray(e);
|
|
2661
|
+
}
|
|
2662
|
+
function Re(e) {
|
|
2663
|
+
return P({
|
|
2664
|
+
name: ya,
|
|
2665
|
+
validator: {
|
|
2666
|
+
validate: function(t, n) {
|
|
2667
|
+
return Aa(t);
|
|
2668
|
+
},
|
|
2669
|
+
defaultMessage: D(function(t) {
|
|
2670
|
+
return t + "$property must be an array";
|
|
2671
|
+
})
|
|
2672
|
+
}
|
|
2673
|
+
}, e);
|
|
2674
|
+
}
|
|
2675
|
+
var $a = "isObject";
|
|
2676
|
+
function wa(e) {
|
|
2677
|
+
return e != null && (typeof e == "object" || typeof e == "function") && !Array.isArray(e);
|
|
2678
|
+
}
|
|
2679
|
+
function Se(e) {
|
|
2680
|
+
return P({
|
|
2681
|
+
name: $a,
|
|
2682
|
+
validator: {
|
|
2683
|
+
validate: function(t, n) {
|
|
2684
|
+
return wa(t);
|
|
2685
|
+
},
|
|
2686
|
+
defaultMessage: D(function(t) {
|
|
2687
|
+
return t + "$property must be an object";
|
|
2688
|
+
})
|
|
2689
|
+
}
|
|
2690
|
+
}, e);
|
|
2691
|
+
}
|
|
2692
|
+
let ie;
|
|
2693
|
+
const ba = new Uint8Array(16);
|
|
2694
|
+
function Za() {
|
|
2695
|
+
if (!ie && (ie = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ie))
|
|
2696
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2697
|
+
return ie(ba);
|
|
2698
|
+
}
|
|
2699
|
+
const I = [];
|
|
2700
|
+
for (let e = 0; e < 256; ++e)
|
|
2701
|
+
I.push((e + 256).toString(16).slice(1));
|
|
2702
|
+
function Ea(e, t = 0) {
|
|
2703
|
+
return I[e[t + 0]] + I[e[t + 1]] + I[e[t + 2]] + I[e[t + 3]] + "-" + I[e[t + 4]] + I[e[t + 5]] + "-" + I[e[t + 6]] + I[e[t + 7]] + "-" + I[e[t + 8]] + I[e[t + 9]] + "-" + I[e[t + 10]] + I[e[t + 11]] + I[e[t + 12]] + I[e[t + 13]] + I[e[t + 14]] + I[e[t + 15]];
|
|
2704
|
+
}
|
|
2705
|
+
const za = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), it = {
|
|
2706
|
+
randomUUID: za
|
|
2707
|
+
};
|
|
2708
|
+
function Ia(e, t, n) {
|
|
2709
|
+
if (it.randomUUID && !e)
|
|
2710
|
+
return it.randomUUID();
|
|
2711
|
+
e = e || {};
|
|
2712
|
+
const r = e.random || (e.rng || Za)();
|
|
2713
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Ea(r);
|
|
2714
|
+
}
|
|
2715
|
+
var d = /* @__PURE__ */ ((e) => (e.UUID = "UUID", e.TEXT = "TEXT", e.PHONES = "PHONES", e.EMAILS = "EMAILS", e.DATE_TIME = "DATE_TIME", e.DATE = "DATE", e.BOOLEAN = "BOOLEAN", e.NUMBER = "NUMBER", e.NUMERIC = "NUMERIC", e.LINKS = "LINKS", e.CURRENCY = "CURRENCY", e.FULL_NAME = "FULL_NAME", e.RATING = "RATING", e.SELECT = "SELECT", e.MULTI_SELECT = "MULTI_SELECT", e.RELATION = "RELATION", e.MORPH_RELATION = "MORPH_RELATION", e.POSITION = "POSITION", e.ADDRESS = "ADDRESS", e.RAW_JSON = "RAW_JSON", e.RICH_TEXT = "RICH_TEXT", e.RICH_TEXT_V2 = "RICH_TEXT_V2", e.ACTOR = "ACTOR", e.ARRAY = "ARRAY", e.TS_VECTOR = "TS_VECTOR", e))(d || {}), Ae = /* @__PURE__ */ ((e) => (e.EMAIL = "EMAIL", e.CALENDAR = "CALENDAR", e.WORKFLOW = "WORKFLOW", e.AGENT = "AGENT", e.API = "API", e.IMPORT = "IMPORT", e.MANUAL = "MANUAL", e.SYSTEM = "SYSTEM", e.WEBHOOK = "WEBHOOK", e.APPLICATION = "APPLICATION", e))(Ae || {});
|
|
2716
|
+
const ka = {
|
|
2717
|
+
type: d.ACTOR,
|
|
2718
|
+
properties: [
|
|
2719
|
+
{
|
|
2720
|
+
name: "source",
|
|
2721
|
+
type: d.SELECT,
|
|
2722
|
+
hidden: !1,
|
|
2723
|
+
isRequired: !0,
|
|
2724
|
+
options: Object.keys(Ae).map(
|
|
2725
|
+
(e, t) => ({
|
|
2726
|
+
id: Ia(),
|
|
2727
|
+
// @ts-expect-error legacy noImplicitAny
|
|
2728
|
+
label: `${Ae[e].toLowerCase()}`,
|
|
2729
|
+
value: e,
|
|
2730
|
+
position: t
|
|
2731
|
+
})
|
|
2732
|
+
)
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
name: "workspaceMemberId",
|
|
2736
|
+
type: d.UUID,
|
|
2737
|
+
hidden: "input",
|
|
2738
|
+
isRequired: !1
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
name: "name",
|
|
2742
|
+
type: d.TEXT,
|
|
2743
|
+
hidden: "input",
|
|
2744
|
+
isRequired: !0
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
name: "context",
|
|
2748
|
+
type: d.RAW_JSON,
|
|
2749
|
+
hidden: !1,
|
|
2750
|
+
isRequired: !1
|
|
2751
|
+
}
|
|
2752
|
+
]
|
|
2753
|
+
}, Ta = {
|
|
2754
|
+
type: d.ADDRESS,
|
|
2755
|
+
properties: [
|
|
2756
|
+
{
|
|
2757
|
+
name: "addressStreet1",
|
|
2758
|
+
type: d.TEXT,
|
|
2759
|
+
hidden: !1,
|
|
2760
|
+
isRequired: !1
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
name: "addressStreet2",
|
|
2764
|
+
type: d.TEXT,
|
|
2765
|
+
hidden: !1,
|
|
2766
|
+
isRequired: !1
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
name: "addressCity",
|
|
2770
|
+
type: d.TEXT,
|
|
2771
|
+
hidden: !1,
|
|
2772
|
+
isRequired: !1
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
name: "addressPostcode",
|
|
2776
|
+
type: d.TEXT,
|
|
2777
|
+
hidden: !1,
|
|
2778
|
+
isRequired: !1
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
name: "addressState",
|
|
2782
|
+
type: d.TEXT,
|
|
2783
|
+
hidden: !1,
|
|
2784
|
+
isRequired: !1
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
name: "addressCountry",
|
|
2788
|
+
type: d.TEXT,
|
|
2789
|
+
hidden: !1,
|
|
2790
|
+
isRequired: !1
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
name: "addressLat",
|
|
2794
|
+
type: d.NUMERIC,
|
|
2795
|
+
hidden: !1,
|
|
2796
|
+
isRequired: !1
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
name: "addressLng",
|
|
2800
|
+
type: d.NUMERIC,
|
|
2801
|
+
hidden: !1,
|
|
2802
|
+
isRequired: !1
|
|
2803
|
+
}
|
|
2804
|
+
]
|
|
2805
|
+
}, Oa = {
|
|
2806
|
+
type: d.CURRENCY,
|
|
2807
|
+
properties: [
|
|
2808
|
+
{
|
|
2809
|
+
name: "amountMicros",
|
|
2810
|
+
type: d.NUMERIC,
|
|
2811
|
+
hidden: !1,
|
|
2812
|
+
isRequired: !1
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
name: "currencyCode",
|
|
2816
|
+
type: d.TEXT,
|
|
2817
|
+
hidden: !1,
|
|
2818
|
+
isRequired: !1
|
|
2819
|
+
}
|
|
2820
|
+
]
|
|
2821
|
+
}, Ra = {
|
|
2822
|
+
type: d.EMAILS,
|
|
2823
|
+
properties: [
|
|
2824
|
+
{
|
|
2825
|
+
name: "primaryEmail",
|
|
2826
|
+
type: d.TEXT,
|
|
2827
|
+
hidden: !1,
|
|
2828
|
+
isRequired: !1,
|
|
2829
|
+
isIncludedInUniqueConstraint: !0
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
name: "additionalEmails",
|
|
2833
|
+
type: d.RAW_JSON,
|
|
2834
|
+
hidden: !1,
|
|
2835
|
+
isRequired: !1
|
|
2836
|
+
}
|
|
2837
|
+
]
|
|
2838
|
+
}, Sa = {
|
|
2839
|
+
type: d.FULL_NAME,
|
|
2840
|
+
properties: [
|
|
2841
|
+
{
|
|
2842
|
+
name: "firstName",
|
|
2843
|
+
type: d.TEXT,
|
|
2844
|
+
hidden: !1,
|
|
2845
|
+
isRequired: !1,
|
|
2846
|
+
isIncludedInUniqueConstraint: !1
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
name: "lastName",
|
|
2850
|
+
type: d.TEXT,
|
|
2851
|
+
hidden: !1,
|
|
2852
|
+
isRequired: !1,
|
|
2853
|
+
isIncludedInUniqueConstraint: !1
|
|
2854
|
+
}
|
|
2855
|
+
]
|
|
2856
|
+
}, Na = {
|
|
2857
|
+
type: d.LINKS,
|
|
2858
|
+
properties: [
|
|
2859
|
+
{
|
|
2860
|
+
name: "primaryLinkLabel",
|
|
2861
|
+
type: d.TEXT,
|
|
2862
|
+
hidden: !1,
|
|
2863
|
+
isRequired: !1
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
name: "primaryLinkUrl",
|
|
2867
|
+
type: d.TEXT,
|
|
2868
|
+
hidden: !1,
|
|
2869
|
+
isRequired: !1,
|
|
2870
|
+
isIncludedInUniqueConstraint: !0
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
name: "secondaryLinks",
|
|
2874
|
+
type: d.RAW_JSON,
|
|
2875
|
+
hidden: !1,
|
|
2876
|
+
isRequired: !1
|
|
2877
|
+
}
|
|
2878
|
+
]
|
|
2879
|
+
}, Da = {
|
|
2880
|
+
type: d.PHONES,
|
|
2881
|
+
properties: [
|
|
2882
|
+
{
|
|
2883
|
+
name: "primaryPhoneNumber",
|
|
2884
|
+
type: d.TEXT,
|
|
2885
|
+
hidden: !1,
|
|
2886
|
+
isRequired: !1,
|
|
2887
|
+
isIncludedInUniqueConstraint: !0
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
name: "primaryPhoneCountryCode",
|
|
2891
|
+
type: d.TEXT,
|
|
2892
|
+
hidden: !1,
|
|
2893
|
+
isRequired: !1
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
name: "primaryPhoneCallingCode",
|
|
2897
|
+
type: d.TEXT,
|
|
2898
|
+
hidden: !1,
|
|
2899
|
+
isRequired: !1
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
name: "additionalPhones",
|
|
2903
|
+
type: d.RAW_JSON,
|
|
2904
|
+
hidden: !1,
|
|
2905
|
+
isRequired: !1
|
|
2906
|
+
}
|
|
2907
|
+
]
|
|
2908
|
+
}, Pa = {
|
|
2909
|
+
type: d.RICH_TEXT_V2,
|
|
2910
|
+
properties: [
|
|
2911
|
+
{
|
|
2912
|
+
name: "blocknote",
|
|
2913
|
+
type: d.TEXT,
|
|
2914
|
+
hidden: !1,
|
|
2915
|
+
isRequired: !1
|
|
2916
|
+
},
|
|
2917
|
+
{
|
|
2918
|
+
name: "markdown",
|
|
2919
|
+
type: d.TEXT,
|
|
2920
|
+
hidden: !1,
|
|
2921
|
+
isRequired: !1
|
|
2922
|
+
}
|
|
2923
|
+
]
|
|
2924
|
+
};
|
|
2925
|
+
hi({
|
|
2926
|
+
blocknote: Ke().nullable().optional(),
|
|
2927
|
+
markdown: Ke().nullable()
|
|
2928
|
+
});
|
|
2929
|
+
d.LINKS, d.CURRENCY, d.FULL_NAME, d.ADDRESS, d.ACTOR, d.EMAILS, d.PHONES, d.RICH_TEXT_V2;
|
|
2930
|
+
var Ua = Object.defineProperty, h = (e, t, n, r) => {
|
|
2931
|
+
for (var o = void 0, i = e.length - 1, a; i >= 0; i--)
|
|
2932
|
+
(a = e[i]) && (o = a(t, n, o) || o);
|
|
2933
|
+
return o && Ua(t, n, o), o;
|
|
2934
|
+
};
|
|
2935
|
+
const k = (e) => (t, n) => {
|
|
2936
|
+
It({
|
|
2937
|
+
name: "isQuotedString",
|
|
2938
|
+
target: t.constructor,
|
|
2939
|
+
propertyName: n,
|
|
2940
|
+
options: e,
|
|
2941
|
+
validator: {
|
|
2942
|
+
validate: (r) => typeof r == "string" && /^'{1}.*'{1}$/.test(r),
|
|
2943
|
+
defaultMessage: (r) => `${r.property} must be a quoted string`
|
|
2944
|
+
}
|
|
2945
|
+
});
|
|
2946
|
+
}, Rt = {
|
|
2947
|
+
UUID: "uuid",
|
|
2948
|
+
NOW: "now"
|
|
2949
|
+
};
|
|
2950
|
+
class Ca {
|
|
2951
|
+
}
|
|
2952
|
+
h([
|
|
2953
|
+
_((e, t) => t !== null),
|
|
2954
|
+
k()
|
|
2955
|
+
], Ca.prototype, "value");
|
|
2956
|
+
class Fa {
|
|
2957
|
+
}
|
|
2958
|
+
h([
|
|
2959
|
+
_((e, t) => t !== null),
|
|
2960
|
+
Se()
|
|
2961
|
+
], Fa.prototype, "value");
|
|
2962
|
+
class St {
|
|
2963
|
+
}
|
|
2964
|
+
h([
|
|
2965
|
+
_((e, t) => t !== null),
|
|
2966
|
+
k()
|
|
2967
|
+
], St.prototype, "blocknote");
|
|
2968
|
+
h([
|
|
2969
|
+
_((e, t) => t !== null),
|
|
2970
|
+
k()
|
|
2971
|
+
], St.prototype, "markdown");
|
|
2972
|
+
class Ma {
|
|
2973
|
+
}
|
|
2974
|
+
h([
|
|
2975
|
+
_((e, t) => t !== null),
|
|
2976
|
+
S()
|
|
2977
|
+
], Ma.prototype, "value");
|
|
2978
|
+
class La {
|
|
2979
|
+
}
|
|
2980
|
+
h([
|
|
2981
|
+
_((e, t) => t !== null),
|
|
2982
|
+
Oe()
|
|
2983
|
+
], La.prototype, "value");
|
|
2984
|
+
class ja {
|
|
2985
|
+
}
|
|
2986
|
+
h([
|
|
2987
|
+
_((e, t) => t !== null),
|
|
2988
|
+
da()
|
|
2989
|
+
], ja.prototype, "value");
|
|
2990
|
+
class xa {
|
|
2991
|
+
}
|
|
2992
|
+
h([
|
|
2993
|
+
_((e, t) => t !== null),
|
|
2994
|
+
Re(),
|
|
2995
|
+
k({ each: !0 })
|
|
2996
|
+
], xa.prototype, "value");
|
|
2997
|
+
class Va {
|
|
2998
|
+
}
|
|
2999
|
+
h([
|
|
3000
|
+
_((e, t) => t !== null),
|
|
3001
|
+
Ot()
|
|
3002
|
+
], Va.prototype, "value");
|
|
3003
|
+
class Ba {
|
|
3004
|
+
}
|
|
3005
|
+
h([
|
|
3006
|
+
_((e, t) => t !== null),
|
|
3007
|
+
Ot()
|
|
3008
|
+
], Ba.prototype, "value");
|
|
3009
|
+
class Nt {
|
|
3010
|
+
}
|
|
3011
|
+
h([
|
|
3012
|
+
_((e, t) => t !== null),
|
|
3013
|
+
ca()
|
|
3014
|
+
], Nt.prototype, "amountMicros");
|
|
3015
|
+
h([
|
|
3016
|
+
_((e, t) => t !== null),
|
|
3017
|
+
k()
|
|
3018
|
+
], Nt.prototype, "currencyCode");
|
|
3019
|
+
class Dt {
|
|
3020
|
+
}
|
|
3021
|
+
h([
|
|
3022
|
+
_((e, t) => t !== null),
|
|
3023
|
+
k()
|
|
3024
|
+
], Dt.prototype, "firstName");
|
|
3025
|
+
h([
|
|
3026
|
+
_((e, t) => t !== null),
|
|
3027
|
+
k()
|
|
3028
|
+
], Dt.prototype, "lastName");
|
|
3029
|
+
class qa {
|
|
3030
|
+
}
|
|
3031
|
+
h([
|
|
3032
|
+
Tt(Rt.UUID),
|
|
3033
|
+
kt()
|
|
3034
|
+
], qa.prototype, "value");
|
|
3035
|
+
class Wa {
|
|
3036
|
+
}
|
|
3037
|
+
h([
|
|
3038
|
+
Tt(Rt.NOW),
|
|
3039
|
+
kt()
|
|
3040
|
+
], Wa.prototype, "value");
|
|
3041
|
+
class F {
|
|
3042
|
+
}
|
|
3043
|
+
h([
|
|
3044
|
+
_((e, t) => t !== null),
|
|
3045
|
+
S()
|
|
3046
|
+
], F.prototype, "addressStreet1");
|
|
3047
|
+
h([
|
|
3048
|
+
_((e, t) => t !== null),
|
|
3049
|
+
S()
|
|
3050
|
+
], F.prototype, "addressStreet2");
|
|
3051
|
+
h([
|
|
3052
|
+
_((e, t) => t !== null),
|
|
3053
|
+
S()
|
|
3054
|
+
], F.prototype, "addressCity");
|
|
3055
|
+
h([
|
|
3056
|
+
_((e, t) => t !== null),
|
|
3057
|
+
S()
|
|
3058
|
+
], F.prototype, "addressPostcode");
|
|
3059
|
+
h([
|
|
3060
|
+
_((e, t) => t !== null),
|
|
3061
|
+
S()
|
|
3062
|
+
], F.prototype, "addressState");
|
|
3063
|
+
h([
|
|
3064
|
+
_((e, t) => t !== null),
|
|
3065
|
+
S()
|
|
3066
|
+
], F.prototype, "addressCountry");
|
|
3067
|
+
h([
|
|
3068
|
+
_((e, t) => t !== null),
|
|
3069
|
+
Oe()
|
|
3070
|
+
], F.prototype, "addressLat");
|
|
3071
|
+
h([
|
|
3072
|
+
_((e, t) => t !== null),
|
|
3073
|
+
Oe()
|
|
3074
|
+
], F.prototype, "addressLng");
|
|
3075
|
+
class Pt {
|
|
3076
|
+
}
|
|
3077
|
+
h([
|
|
3078
|
+
S()
|
|
3079
|
+
], Pt.prototype, "label");
|
|
3080
|
+
h([
|
|
3081
|
+
S()
|
|
3082
|
+
], Pt.prototype, "url");
|
|
3083
|
+
class Ne {
|
|
3084
|
+
}
|
|
3085
|
+
h([
|
|
3086
|
+
_((e, t) => t !== null),
|
|
3087
|
+
k()
|
|
3088
|
+
], Ne.prototype, "primaryLinkLabel");
|
|
3089
|
+
h([
|
|
3090
|
+
_((e, t) => t !== null),
|
|
3091
|
+
k()
|
|
3092
|
+
], Ne.prototype, "primaryLinkUrl");
|
|
3093
|
+
h([
|
|
3094
|
+
_((e, t) => t !== null),
|
|
3095
|
+
Re()
|
|
3096
|
+
], Ne.prototype, "secondaryLinks");
|
|
3097
|
+
class De {
|
|
3098
|
+
}
|
|
3099
|
+
h([
|
|
3100
|
+
_((e, t) => t !== null),
|
|
3101
|
+
S()
|
|
3102
|
+
], De.prototype, "source");
|
|
3103
|
+
h([
|
|
3104
|
+
_((e, t) => t !== null),
|
|
3105
|
+
Vi(),
|
|
3106
|
+
Gi()
|
|
3107
|
+
], De.prototype, "workspaceMemberId");
|
|
3108
|
+
h([
|
|
3109
|
+
_((e, t) => t !== null),
|
|
3110
|
+
S()
|
|
3111
|
+
], De.prototype, "name");
|
|
3112
|
+
class Ut {
|
|
3113
|
+
}
|
|
3114
|
+
h([
|
|
3115
|
+
_((e, t) => t !== null),
|
|
3116
|
+
k()
|
|
3117
|
+
], Ut.prototype, "primaryEmail");
|
|
3118
|
+
h([
|
|
3119
|
+
_((e, t) => t !== null),
|
|
3120
|
+
Se()
|
|
3121
|
+
], Ut.prototype, "additionalEmails");
|
|
3122
|
+
class _e {
|
|
3123
|
+
}
|
|
3124
|
+
h([
|
|
3125
|
+
_((e, t) => t !== null),
|
|
3126
|
+
k()
|
|
3127
|
+
], _e.prototype, "primaryPhoneNumber");
|
|
3128
|
+
h([
|
|
3129
|
+
_((e, t) => t !== null),
|
|
3130
|
+
k()
|
|
3131
|
+
], _e.prototype, "primaryPhoneCountryCode");
|
|
3132
|
+
h([
|
|
3133
|
+
_((e, t) => t !== null),
|
|
3134
|
+
k()
|
|
3135
|
+
], _e.prototype, "primaryPhoneCallingCode");
|
|
3136
|
+
h([
|
|
3137
|
+
_((e, t) => t !== null),
|
|
3138
|
+
Se()
|
|
3139
|
+
], _e.prototype, "additionalPhones");
|
|
3140
|
+
class Ka {
|
|
3141
|
+
}
|
|
3142
|
+
h([
|
|
3143
|
+
_((e, t) => t !== null),
|
|
3144
|
+
Re()
|
|
3145
|
+
], Ka.prototype, "value");
|
|
3146
|
+
var Ha = /* @__PURE__ */ ((e) => (e.DAY = "DAY", e.MONTH = "MONTH", e.QUARTER = "QUARTER", e.YEAR = "YEAR", e.WEEK = "WEEK", e.DAY_OF_THE_WEEK = "DAY_OF_THE_WEEK", e.MONTH_OF_THE_YEAR = "MONTH_OF_THE_YEAR", e.QUARTER_OF_THE_YEAR = "QUARTER_OF_THE_YEAR", e.NONE = "NONE", e))(Ha || {});
|
|
3147
|
+
export {
|
|
3148
|
+
Xa as c,
|
|
3149
|
+
d as s,
|
|
3150
|
+
Ha as u
|
|
3151
|
+
};
|