@burdenoff/microfe-bigconsole 2026.1113.1 → 2026.1115.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/datasink/DataSinkCard.js +60 -58
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +383 -380
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +123 -121
- package/dist/bigconsole/context/BigConsoleContext.d.ts +2 -0
- package/dist/bigconsole/context/BigConsoleContext.js +14 -12
- package/dist/bigconsole/pages/DashboardViewPage.js +241 -239
- package/dist/bigconsole/pages/DashboardsPage.js +265 -262
- package/dist/bigconsole/pages/DataSinkViewPage.js +253 -251
- package/dist/bigconsole/pages/DataSinksPage.js +162 -160
- package/dist/bigconsole/pages/SettingsPage.js +127 -123
- package/dist/bigconsole/proactive/actions.d.ts +16 -0
- package/dist/bigconsole/proactive/actions.js +34 -0
- package/dist/bigconsole/proactive/activityEntity.d.ts +5 -0
- package/dist/bigconsole/proactive/activityEntity.js +27 -0
- package/dist/bigconsole/proactive/entities.d.ts +16 -0
- package/dist/bigconsole/proactive/entities.js +20 -0
- package/dist/bigconsole/proactive/index.d.ts +15 -0
- package/dist/bigconsole/proactive/index.js +5 -0
- package/dist/bigconsole/proactive/routes.d.ts +11 -0
- package/dist/bigconsole/proactive/routes.js +6 -0
- package/dist/bigconsole/types/index.d.ts +7 -0
- package/dist/bigconsole/utils/widgetPanelPosition.d.ts +24 -0
- package/dist/bigconsole/utils/widgetPanelPosition.js +24 -0
- package/dist/generated/wspace-operations.js +213 -19
- package/dist/node_modules/zod/v4/classic/errors.js +42 -0
- package/dist/node_modules/zod/v4/classic/parse.js +5 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +622 -0
- package/dist/node_modules/zod/v4/core/api.js +427 -0
- package/dist/node_modules/zod/v4/core/checks.js +141 -0
- package/dist/node_modules/zod/v4/core/core.js +82 -0
- package/dist/node_modules/zod/v4/core/doc.js +27 -0
- package/dist/node_modules/zod/v4/core/errors.js +88 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +190 -0
- package/dist/node_modules/zod/v4/core/memoizer.js +186 -0
- package/dist/node_modules/zod/v4/core/parse.js +157 -0
- package/dist/node_modules/zod/v4/core/regexes.js +32 -0
- package/dist/node_modules/zod/v4/core/registries.js +39 -0
- package/dist/node_modules/zod/v4/core/schemas.js +856 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +328 -0
- package/dist/node_modules/zod/v4/core/util.js +415 -0
- package/dist/node_modules/zod/v4/core/versions.js +7 -0
- package/dist/node_modules/zod/v4/locales/en.js +94 -0
- package/package.json +8 -4
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
import { $ZodCheck as e, $ZodCheckStringFormat as t } from "./checks.js";
|
|
2
|
+
import { $ZodAsyncError as n, $ZodEncodeError as r, $constructor as i, config as a, globalConfig as o } from "./core.js";
|
|
3
|
+
import { Doc as s } from "./doc.js";
|
|
4
|
+
import { anyString as c, cidrv4 as l, cidrv6 as u, cuid as d, cuid2 as f, date as p, datetime as ee, duration as te, e164 as ne, email as re, emoji as ie, guid as ae, httpProtocol as oe, ipv4 as se, ipv6 as ce, ksuid as le, nanoid as ue, nanoidOfLength as de, time as fe, ulid as pe, uuid as m, xid as me } from "./regexes.js";
|
|
5
|
+
import { aborted as h, allowsEval as he, assignProp as ge, attachSchema as g, cached as _, cleanRegex as v, defineLazyInternal as y, esc as _e, escapeRegex as ve, explicitlyAborted as ye, finalizeIssue as b, getEnumValues as x, hide as be, isObject as S, isPlainObject as C, issue as xe, optionalKeys as Se, own as Ce, prefixIssues as w, propertyKeyTypes as we, sizeCaps as T } from "./util.js";
|
|
6
|
+
import { version as Te } from "./versions.js";
|
|
7
|
+
// node_modules/zod/v4/core/schemas.js
|
|
8
|
+
var E = /*@__PURE__*/ i("$ZodType", (e, t) => {
|
|
9
|
+
var r;
|
|
10
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Te;
|
|
11
|
+
let i = e._zod.def.checks, a = e._zod.traits.has("$ZodCheck") ? [e, ...i ?? []] : i?.length ? [...i] : [];
|
|
12
|
+
for (let t of a) for (let n of t._zod.onattach) n(e);
|
|
13
|
+
if (a.length === 0) (r = e._zod).deferred ?? (r.deferred = []), e._zod.deferred?.push(() => {
|
|
14
|
+
e._zod.run = e._zod.parse;
|
|
15
|
+
});
|
|
16
|
+
else {
|
|
17
|
+
let t = (t, r, i) => {
|
|
18
|
+
if (t.memo) return t;
|
|
19
|
+
let a = h(t), o;
|
|
20
|
+
for (let s of r) {
|
|
21
|
+
if (s._zod.def.when) {
|
|
22
|
+
if (ye(t) || !s._zod.def.when(t)) continue;
|
|
23
|
+
} else if (a) continue;
|
|
24
|
+
let r = t.issues.length, c = s._zod.check(t);
|
|
25
|
+
if (c instanceof Promise && i?.async === !1) throw new n();
|
|
26
|
+
if (o || c instanceof Promise) o = (o ?? Promise.resolve()).then(async () => {
|
|
27
|
+
await c, t.issues.length !== r && (g(t.issues, r, e), a ||= h(t, r));
|
|
28
|
+
});
|
|
29
|
+
else {
|
|
30
|
+
if (t.issues.length === r) continue;
|
|
31
|
+
g(t.issues, r, e), a ||= h(t, r);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return o ? o.then(() => t) : t;
|
|
35
|
+
}, r = (r, i, o) => {
|
|
36
|
+
if (h(r)) return r.aborted = !0, r;
|
|
37
|
+
let s = t(i, a, o);
|
|
38
|
+
if (s instanceof Promise) {
|
|
39
|
+
if (o.async === !1) throw new n();
|
|
40
|
+
return s.then((t) => e._zod.parse(t, o));
|
|
41
|
+
}
|
|
42
|
+
return e._zod.parse(s, o);
|
|
43
|
+
};
|
|
44
|
+
e._zod.run = (i, o) => {
|
|
45
|
+
if (o.skipChecks) return e._zod.parse(i, o);
|
|
46
|
+
if (o.direction === "backward") {
|
|
47
|
+
let t = e._zod.parse({
|
|
48
|
+
value: i.value,
|
|
49
|
+
issues: []
|
|
50
|
+
}, {
|
|
51
|
+
...o,
|
|
52
|
+
skipChecks: !0
|
|
53
|
+
});
|
|
54
|
+
return t instanceof Promise ? t.then((e) => r(e, i, o)) : r(t, i, o);
|
|
55
|
+
}
|
|
56
|
+
let s = e._zod.parse(i, o);
|
|
57
|
+
if (s instanceof Promise) {
|
|
58
|
+
if (o.async === !1) throw new n();
|
|
59
|
+
return s.then((e) => t(e, a, o));
|
|
60
|
+
}
|
|
61
|
+
return t(s, a, o);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
get "~standard"() {
|
|
66
|
+
return be(this, "~standard", O(this));
|
|
67
|
+
},
|
|
68
|
+
set "~standard"(e) {
|
|
69
|
+
Ce(this, "~standard", e);
|
|
70
|
+
}
|
|
71
|
+
}), D = (e, t) => e.issues.length ? { issues: e.issues.map((e) => b(e, t, a())) } : { value: e.value };
|
|
72
|
+
async function Ee(e, t) {
|
|
73
|
+
let n = { async: !0 };
|
|
74
|
+
return D(await e._zod.run({
|
|
75
|
+
value: t,
|
|
76
|
+
issues: []
|
|
77
|
+
}, n), n);
|
|
78
|
+
}
|
|
79
|
+
function O(e) {
|
|
80
|
+
return {
|
|
81
|
+
validate: (t) => {
|
|
82
|
+
let n = { async: !1 };
|
|
83
|
+
try {
|
|
84
|
+
let r = e._zod.run({
|
|
85
|
+
value: t,
|
|
86
|
+
issues: []
|
|
87
|
+
}, n);
|
|
88
|
+
if (!(r instanceof Promise)) return D(r, n);
|
|
89
|
+
} catch {}
|
|
90
|
+
return Ee(e, t);
|
|
91
|
+
},
|
|
92
|
+
vendor: "zod",
|
|
93
|
+
version: 1
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
var k = /*@__PURE__*/ i("$ZodString", (e, t) => {
|
|
97
|
+
E.init(e, t), e._zod.pattern = t.pattern ?? c, e._zod.parse = (n, r) => {
|
|
98
|
+
if (t.coerce) try {
|
|
99
|
+
n.value = String(n.value);
|
|
100
|
+
} catch {}
|
|
101
|
+
return typeof n.value == "string" || n.issues.push({
|
|
102
|
+
expected: "string",
|
|
103
|
+
code: "invalid_type",
|
|
104
|
+
input: n.value,
|
|
105
|
+
inst: e
|
|
106
|
+
}), n;
|
|
107
|
+
};
|
|
108
|
+
}), A = /*@__PURE__*/ i("$ZodStringFormat", (e, n) => {
|
|
109
|
+
t.init(e, n), k.init(e, n);
|
|
110
|
+
}), De = /*@__PURE__*/ i("$ZodGUID", (e, t) => {
|
|
111
|
+
t.pattern ??= ae, A.init(e, t);
|
|
112
|
+
}), Oe = /*@__PURE__*/ i("$ZodUUID", (e, t) => {
|
|
113
|
+
if (t.version) {
|
|
114
|
+
let e = {
|
|
115
|
+
v1: 1,
|
|
116
|
+
v2: 2,
|
|
117
|
+
v3: 3,
|
|
118
|
+
v4: 4,
|
|
119
|
+
v5: 5,
|
|
120
|
+
v6: 6,
|
|
121
|
+
v7: 7,
|
|
122
|
+
v8: 8
|
|
123
|
+
}[t.version];
|
|
124
|
+
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
125
|
+
t.pattern ??= m(e);
|
|
126
|
+
} else t.pattern ??= m();
|
|
127
|
+
A.init(e, t);
|
|
128
|
+
}), ke = /*@__PURE__*/ i("$ZodEmail", (e, t) => {
|
|
129
|
+
t.pattern ??= re, A.init(e, t);
|
|
130
|
+
});
|
|
131
|
+
function j(e) {
|
|
132
|
+
try {
|
|
133
|
+
return typeof URL < "u" && typeof URL.canParse == "function" ? URL.canParse(e) : (new URL(e), !0);
|
|
134
|
+
} catch {
|
|
135
|
+
return !1;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function M(e, t) {
|
|
139
|
+
return !("normalize" in t) && !("hostname" in t) && !("protocol" in t) ? j(e) || 2 : N(e, t);
|
|
140
|
+
}
|
|
141
|
+
function N(e, t) {
|
|
142
|
+
if (!t.normalize && t.protocol?.source === oe.source && !/^https?:\/\//i.test(e)) return 1;
|
|
143
|
+
try {
|
|
144
|
+
if (typeof URL < "u") {
|
|
145
|
+
let t = URL;
|
|
146
|
+
if (typeof t.parse == "function") return t.parse(e) ?? 2;
|
|
147
|
+
}
|
|
148
|
+
return new URL(e);
|
|
149
|
+
} catch {
|
|
150
|
+
return 2;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
var Ae = /[\t\n\r]/g;
|
|
154
|
+
function P(e) {
|
|
155
|
+
return e.replace(Ae, "");
|
|
156
|
+
}
|
|
157
|
+
function F(e, t) {
|
|
158
|
+
return t.lastIndex = 0, t.test(e.hostname);
|
|
159
|
+
}
|
|
160
|
+
function I(e, t) {
|
|
161
|
+
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
162
|
+
}
|
|
163
|
+
var je = /*@__PURE__*/ i("$ZodURL", (e, t) => {
|
|
164
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
165
|
+
try {
|
|
166
|
+
let r = n.value.trim(), i = M(r, t);
|
|
167
|
+
if (i === 1) {
|
|
168
|
+
n.issues.push({
|
|
169
|
+
code: "invalid_format",
|
|
170
|
+
format: "url",
|
|
171
|
+
note: "Invalid URL format",
|
|
172
|
+
input: n.value,
|
|
173
|
+
inst: e,
|
|
174
|
+
continue: !t.abort
|
|
175
|
+
});
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (i === 2) {
|
|
179
|
+
n.issues.push({
|
|
180
|
+
code: "invalid_format",
|
|
181
|
+
format: "url",
|
|
182
|
+
input: n.value,
|
|
183
|
+
inst: e,
|
|
184
|
+
continue: !t.abort
|
|
185
|
+
});
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (i === !0) {
|
|
189
|
+
n.value = P(r);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
t.hostname && !F(i, t.hostname) && n.issues.push({
|
|
193
|
+
code: "invalid_format",
|
|
194
|
+
format: "url",
|
|
195
|
+
note: "Invalid hostname",
|
|
196
|
+
pattern: t.hostname.source,
|
|
197
|
+
input: n.value,
|
|
198
|
+
inst: e,
|
|
199
|
+
continue: !t.abort
|
|
200
|
+
}), t.protocol && !I(i, t.protocol) && n.issues.push({
|
|
201
|
+
code: "invalid_format",
|
|
202
|
+
format: "url",
|
|
203
|
+
note: "Invalid protocol",
|
|
204
|
+
pattern: t.protocol.source,
|
|
205
|
+
input: n.value,
|
|
206
|
+
inst: e,
|
|
207
|
+
continue: !t.abort
|
|
208
|
+
}), n.value = t.normalize ? i.href : P(r);
|
|
209
|
+
return;
|
|
210
|
+
} catch {
|
|
211
|
+
n.issues.push({
|
|
212
|
+
code: "invalid_format",
|
|
213
|
+
format: "url",
|
|
214
|
+
input: n.value,
|
|
215
|
+
inst: e,
|
|
216
|
+
continue: !t.abort
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}), Me = /*@__PURE__*/ i("$ZodEmoji", (e, t) => {
|
|
221
|
+
t.pattern ??= ie(), A.init(e, t);
|
|
222
|
+
}), Ne = /*@__PURE__*/ i("$ZodNanoID", (e, t) => {
|
|
223
|
+
if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
|
|
224
|
+
t.pattern ??= t.length === void 0 ? ue : de(t.length), A.init(e, t);
|
|
225
|
+
}), Pe = /*@__PURE__*/ i("$ZodCUID", (e, t) => {
|
|
226
|
+
t.pattern ??= d, A.init(e, t);
|
|
227
|
+
}), Fe = /*@__PURE__*/ i("$ZodCUID2", (e, t) => {
|
|
228
|
+
t.pattern ??= f, A.init(e, t);
|
|
229
|
+
}), Ie = /*@__PURE__*/ i("$ZodULID", (e, t) => {
|
|
230
|
+
t.pattern ??= pe, A.init(e, t);
|
|
231
|
+
}), Le = /*@__PURE__*/ i("$ZodXID", (e, t) => {
|
|
232
|
+
t.pattern ??= me, A.init(e, t);
|
|
233
|
+
}), Re = /*@__PURE__*/ i("$ZodKSUID", (e, t) => {
|
|
234
|
+
t.pattern ??= le, A.init(e, t);
|
|
235
|
+
}), ze = /*@__PURE__*/ i("$ZodISODateTime", (e, t) => {
|
|
236
|
+
t.pattern ??= ee(t), A.init(e, t);
|
|
237
|
+
}), Be = /*@__PURE__*/ i("$ZodISODate", (e, t) => {
|
|
238
|
+
t.pattern ??= p, A.init(e, t);
|
|
239
|
+
}), Ve = /*@__PURE__*/ i("$ZodISOTime", (e, t) => {
|
|
240
|
+
t.pattern ??= fe(t), A.init(e, t);
|
|
241
|
+
}), He = /*@__PURE__*/ i("$ZodISODuration", (e, t) => {
|
|
242
|
+
t.pattern ??= te, A.init(e, t);
|
|
243
|
+
}), Ue = /*@__PURE__*/ i("$ZodIPv4", (e, t) => {
|
|
244
|
+
t.pattern ??= se, A.init(e, t);
|
|
245
|
+
}), We = /^[0-9a-fA-F:.]+$/;
|
|
246
|
+
function L(e) {
|
|
247
|
+
return We.test(e) ? j(`http://[${e}]`) : !1;
|
|
248
|
+
}
|
|
249
|
+
var Ge = /*@__PURE__*/ i("$ZodIPv6", (e, t) => {
|
|
250
|
+
t.pattern ??= ce, A.init(e, t), e._zod.check = (n) => {
|
|
251
|
+
L(n.value) || n.issues.push({
|
|
252
|
+
code: "invalid_format",
|
|
253
|
+
format: "ipv6",
|
|
254
|
+
input: n.value,
|
|
255
|
+
inst: e,
|
|
256
|
+
continue: !t.abort
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
}), Ke = /*@__PURE__*/ i("$ZodCIDRv4", (e, t) => {
|
|
260
|
+
t.pattern ??= l, A.init(e, t);
|
|
261
|
+
});
|
|
262
|
+
function R(e) {
|
|
263
|
+
let t = e.split("/");
|
|
264
|
+
if (t.length !== 2) return !1;
|
|
265
|
+
let [n, r] = t;
|
|
266
|
+
if (!r) return !1;
|
|
267
|
+
let i = Number(r);
|
|
268
|
+
return `${i}` !== r || i < 0 || i > 128 ? !1 : L(n);
|
|
269
|
+
}
|
|
270
|
+
var qe = /*@__PURE__*/ i("$ZodCIDRv6", (e, t) => {
|
|
271
|
+
t.pattern ??= u, A.init(e, t), e._zod.check = (n) => {
|
|
272
|
+
R(n.value) || n.issues.push({
|
|
273
|
+
code: "invalid_format",
|
|
274
|
+
format: "cidrv6",
|
|
275
|
+
input: n.value,
|
|
276
|
+
inst: e,
|
|
277
|
+
continue: !t.abort
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
function z(e) {
|
|
282
|
+
if (e === "") return !0;
|
|
283
|
+
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
284
|
+
try {
|
|
285
|
+
return atob(e), !0;
|
|
286
|
+
} catch {
|
|
287
|
+
return !1;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
var B = /^[0-9a-zA-Z+/]*={0,2}$/, Je = /*@__PURE__*/ i("$ZodBase64", (e, t) => {
|
|
291
|
+
t.pattern ??= B, A.init(e, t), e._zod.check = (n) => {
|
|
292
|
+
z(n.value) || n.issues.push({
|
|
293
|
+
code: "invalid_format",
|
|
294
|
+
format: "base64",
|
|
295
|
+
input: n.value,
|
|
296
|
+
inst: e,
|
|
297
|
+
continue: !t.abort
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
}), V = /^[A-Za-z0-9_-]*$/;
|
|
301
|
+
function H(e) {
|
|
302
|
+
if (!V.test(e)) return !1;
|
|
303
|
+
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
304
|
+
return z(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
305
|
+
}
|
|
306
|
+
var Ye = /*@__PURE__*/ i("$ZodBase64URL", (e, t) => {
|
|
307
|
+
t.pattern ??= V, A.init(e, t), e._zod.check = (n) => {
|
|
308
|
+
H(n.value) || n.issues.push({
|
|
309
|
+
code: "invalid_format",
|
|
310
|
+
format: "base64url",
|
|
311
|
+
input: n.value,
|
|
312
|
+
inst: e,
|
|
313
|
+
continue: !t.abort
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
}), Xe = /*@__PURE__*/ i("$ZodE164", (e, t) => {
|
|
317
|
+
t.pattern ??= ne, A.init(e, t);
|
|
318
|
+
});
|
|
319
|
+
function U(e, t = null) {
|
|
320
|
+
try {
|
|
321
|
+
let n = e.split(".");
|
|
322
|
+
if (n.length !== 3) return !1;
|
|
323
|
+
let [r] = n;
|
|
324
|
+
if (!r) return !1;
|
|
325
|
+
let i = JSON.parse(atob(r));
|
|
326
|
+
return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
|
|
327
|
+
} catch {
|
|
328
|
+
return !1;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
var Ze = /*@__PURE__*/ i("$ZodJWT", (e, t) => {
|
|
332
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
333
|
+
U(n.value, t.alg) || n.issues.push({
|
|
334
|
+
code: "invalid_format",
|
|
335
|
+
format: "jwt",
|
|
336
|
+
input: n.value,
|
|
337
|
+
inst: e,
|
|
338
|
+
continue: !t.abort
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
}), Qe = /*@__PURE__*/ i("$ZodUnknown", (e, t) => {
|
|
342
|
+
E.init(e, t), e._zod.parse = (e) => e;
|
|
343
|
+
}), $e = /*@__PURE__*/ i("$ZodNever", (e, t) => {
|
|
344
|
+
E.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
345
|
+
expected: "never",
|
|
346
|
+
code: "invalid_type",
|
|
347
|
+
input: t.value,
|
|
348
|
+
inst: e
|
|
349
|
+
}), t);
|
|
350
|
+
});
|
|
351
|
+
function et(e, t) {
|
|
352
|
+
let n = T(e._zod.def.checks);
|
|
353
|
+
if (!n.length) return;
|
|
354
|
+
let r = Math.min(...n.map((e) => e[0])), i = e._zod.parse;
|
|
355
|
+
e._zod.parse = (n, a) => {
|
|
356
|
+
let o = t(n.value);
|
|
357
|
+
if (o > r && !a?.skipChecks && a?.direction !== "backward") {
|
|
358
|
+
for (let [t, r] of T(e._zod.def.checks)) if (o > t && r._zod.def.when(n)) {
|
|
359
|
+
let t = n.issues.length;
|
|
360
|
+
return r._zod.check(n), n.issues[t].continue = !1, g(n.issues, t, e), n;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return i(n, a);
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
var tt = (e) => Array.isArray(e) ? e.length : -1;
|
|
367
|
+
function W(e, t, n) {
|
|
368
|
+
e.issues.length && t.issues.push(...w(n, e.issues)), t.value[n] = e.value;
|
|
369
|
+
}
|
|
370
|
+
var nt = /*@__PURE__*/ i("$ZodArray", (e, t) => {
|
|
371
|
+
E.init(e, t);
|
|
372
|
+
let n = o.memoizer;
|
|
373
|
+
n?.attach(e), e._zod.parse = (r, i) => {
|
|
374
|
+
let a = r.value;
|
|
375
|
+
if (!Array.isArray(a)) return r.issues.push({
|
|
376
|
+
expected: "array",
|
|
377
|
+
code: "invalid_type",
|
|
378
|
+
input: a,
|
|
379
|
+
inst: e
|
|
380
|
+
}), r;
|
|
381
|
+
r.value = n ? n.alloc(e, r, Array(a.length), i) : Array(a.length);
|
|
382
|
+
let o = [], s = i?.abortEarly;
|
|
383
|
+
for (let e = 0; e < a.length; e++) {
|
|
384
|
+
let n = a[e], c = t.element._zod.run({
|
|
385
|
+
value: n,
|
|
386
|
+
issues: []
|
|
387
|
+
}, i);
|
|
388
|
+
if (c instanceof Promise) o.push(c.then((t) => W(t, r, e)));
|
|
389
|
+
else if (W(c, r, e), s && c.issues.length !== 0 && h(c)) break;
|
|
390
|
+
}
|
|
391
|
+
return o.length ? Promise.all(o).then(() => r) : r;
|
|
392
|
+
}, et(e, tt);
|
|
393
|
+
});
|
|
394
|
+
function G(e, t, n, r, i, a) {
|
|
395
|
+
let o = n in r, s = a === "optional";
|
|
396
|
+
if (o || !s || i !== "optional") {
|
|
397
|
+
if (e.issues.length) {
|
|
398
|
+
if (i !== void 0 && s && !o) return;
|
|
399
|
+
t.issues.push(...w(n, e.issues));
|
|
400
|
+
}
|
|
401
|
+
!o && i === void 0 ? e.issues.length || t.issues.push({
|
|
402
|
+
code: "invalid_type",
|
|
403
|
+
expected: "nonoptional",
|
|
404
|
+
input: void 0,
|
|
405
|
+
path: [n]
|
|
406
|
+
}) : e.value === void 0 ? (o || i === "defaulted" && !s) && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
var rt = [];
|
|
410
|
+
function K(e) {
|
|
411
|
+
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : rt, i = r.length ? [...t, ...r] : t;
|
|
412
|
+
for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
|
|
413
|
+
let a = Se(e.shape);
|
|
414
|
+
return {
|
|
415
|
+
...e,
|
|
416
|
+
allKeys: i,
|
|
417
|
+
symbolKeys: r,
|
|
418
|
+
keySet: new Set(t),
|
|
419
|
+
numKeys: t.length,
|
|
420
|
+
optionalKeys: new Set(a)
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function q(e, t, n, r, i, a, o) {
|
|
424
|
+
let s = [], c = i.keySet, l = i.catchall._zod, u = l.def.type, d = l.optin, f = l.optout, p = 0;
|
|
425
|
+
for (let i in t) {
|
|
426
|
+
if (o && n.issues.length !== p) {
|
|
427
|
+
if (h(n, p)) break;
|
|
428
|
+
p = n.issues.length;
|
|
429
|
+
}
|
|
430
|
+
if (c.has(i)) continue;
|
|
431
|
+
if (i === "__proto__") {
|
|
432
|
+
u === "never" && s.push(i);
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
if (u === "never") {
|
|
436
|
+
s.push(i);
|
|
437
|
+
continue;
|
|
438
|
+
}
|
|
439
|
+
let a = l.run({
|
|
440
|
+
value: t[i],
|
|
441
|
+
issues: []
|
|
442
|
+
}, r);
|
|
443
|
+
a instanceof Promise ? e.push(a.then((e) => G(e, n, i, t, d, f))) : G(a, n, i, t, d, f);
|
|
444
|
+
}
|
|
445
|
+
return s.length && n.issues.push({
|
|
446
|
+
code: "unrecognized_keys",
|
|
447
|
+
keys: s,
|
|
448
|
+
input: t,
|
|
449
|
+
inst: a,
|
|
450
|
+
continue: !0
|
|
451
|
+
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
452
|
+
}
|
|
453
|
+
var J = /*@__PURE__*/ i("$ZodObject", (e, t) => {
|
|
454
|
+
E.init(e, t);
|
|
455
|
+
let n = Object.getOwnPropertyDescriptor(t, "shape"), r = n?.get ? n.get.raw : t.shape ?? {};
|
|
456
|
+
if (r) {
|
|
457
|
+
let e = () => {
|
|
458
|
+
let n = { ...r };
|
|
459
|
+
return Object.defineProperty(t, "shape", { value: n }), e.raw = n, n;
|
|
460
|
+
};
|
|
461
|
+
e.raw = r, Object.defineProperty(t, "shape", { get: e });
|
|
462
|
+
}
|
|
463
|
+
let i = _(() => K(t));
|
|
464
|
+
y(e, "propValues", (e) => {
|
|
465
|
+
let t = e.def.shape, n = {};
|
|
466
|
+
for (let e in t) {
|
|
467
|
+
let r = t[e]._zod;
|
|
468
|
+
if (r.values) {
|
|
469
|
+
Object.prototype.hasOwnProperty.call(n, e) || ge(n, e, /* @__PURE__ */ new Set());
|
|
470
|
+
for (let t of r.values) n[e].add(t);
|
|
471
|
+
r.optin !== void 0 && n[e].add(void 0);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
return n;
|
|
475
|
+
});
|
|
476
|
+
let a = S, s = t.catchall, c, l = o.memoizer;
|
|
477
|
+
l?.attach(e), e._zod.parse = (t, n) => {
|
|
478
|
+
c ??= i.value;
|
|
479
|
+
let r = t.value;
|
|
480
|
+
if (!a(r)) return t.issues.push({
|
|
481
|
+
expected: "object",
|
|
482
|
+
code: "invalid_type",
|
|
483
|
+
input: r,
|
|
484
|
+
inst: e
|
|
485
|
+
}), t;
|
|
486
|
+
t.value = l ? l.alloc(e, t, {}, n) : {};
|
|
487
|
+
let o = [], u = c.shape, d = n?.abortEarly, f = t.issues.length;
|
|
488
|
+
for (let e of c.allKeys) {
|
|
489
|
+
if (d && t.issues.length !== f) {
|
|
490
|
+
if (h(t, f)) break;
|
|
491
|
+
f = t.issues.length;
|
|
492
|
+
}
|
|
493
|
+
if (e === "__proto__") continue;
|
|
494
|
+
let i = u[e], a = i._zod.optin, s = i._zod.optout, c = i._zod.run({
|
|
495
|
+
value: r[e],
|
|
496
|
+
issues: []
|
|
497
|
+
}, n);
|
|
498
|
+
c instanceof Promise ? o.push(c.then((n) => G(n, t, e, r, a, s))) : G(c, t, e, r, a, s);
|
|
499
|
+
}
|
|
500
|
+
return s ? q(o, r, t, n, i.value, e, d === !0) : o.length ? Promise.all(o).then(() => t) : t;
|
|
501
|
+
};
|
|
502
|
+
}), it = /*@__PURE__*/ i("$ZodObjectJIT", (e, t) => {
|
|
503
|
+
J.init(e, t);
|
|
504
|
+
let n = e._zod.parse, r = _(() => K(t)), i = o.memoizer, a = (t) => {
|
|
505
|
+
let n = r.value, a = n.symbolKeys, o = new s(["payload", "ctx"], {
|
|
506
|
+
shape: t,
|
|
507
|
+
inst: e,
|
|
508
|
+
memo: i,
|
|
509
|
+
syms: a
|
|
510
|
+
}), c = (e) => `shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`, l = (e, t) => `
|
|
511
|
+
let ${e}_ab = false;
|
|
512
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
513
|
+
const iss = ${e}.issues[i];
|
|
514
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
515
|
+
payload.issues.push(iss);
|
|
516
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
517
|
+
}
|
|
518
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
519
|
+
payload.value = newResult;
|
|
520
|
+
return payload;
|
|
521
|
+
}`;
|
|
522
|
+
o.write("const input = payload.value;");
|
|
523
|
+
let u = Object.create(null), d = 0;
|
|
524
|
+
for (let e of n.allKeys) u[e] = `key_${d++}`;
|
|
525
|
+
o.write(i ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
|
|
526
|
+
for (let e of n.allKeys) {
|
|
527
|
+
if (e === "__proto__") continue;
|
|
528
|
+
let n = u[e], r = typeof e == "symbol" ? `syms[${a.indexOf(e)}]` : _e(e), i = `${r} in input`, s = t[e], d = s?._zod?.optin, f = d !== void 0, p = s?._zod?.optout === "optional";
|
|
529
|
+
if (o.write(`const ${n} = ${c(r)};`), f && p) {
|
|
530
|
+
let e = d === "optional" ? `${n}_present` : `${n}.value !== undefined || ${n}_present`;
|
|
531
|
+
o.write(`
|
|
532
|
+
const ${n}_present = ${i};
|
|
533
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
534
|
+
if (${n}.issues.length) {${l(n, r)}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if (${e}) {
|
|
538
|
+
newResult[${r}] = ${n}.value;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
`);
|
|
543
|
+
} else f ? (o.write(`
|
|
544
|
+
if (${n}.issues.length) {${l(n, r)}
|
|
545
|
+
}
|
|
546
|
+
`), d === "defaulted" ? o.write(`newResult[${r}] = ${n}.value;`) : o.write(`
|
|
547
|
+
if (${n}.value !== undefined || ${i}) {
|
|
548
|
+
newResult[${r}] = ${n}.value;
|
|
549
|
+
}
|
|
550
|
+
`)) : o.write(`
|
|
551
|
+
const ${n}_present = ${i};
|
|
552
|
+
if (${n}.issues.length) {${l(n, r)}
|
|
553
|
+
}
|
|
554
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
555
|
+
payload.issues.push({
|
|
556
|
+
code: "invalid_type",
|
|
557
|
+
expected: "nonoptional",
|
|
558
|
+
input: undefined,
|
|
559
|
+
path: [${r}]
|
|
560
|
+
});
|
|
561
|
+
if (ctx && ctx.abortEarly) {
|
|
562
|
+
payload.value = newResult;
|
|
563
|
+
return payload;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
if (${n}_present) {
|
|
568
|
+
newResult[${r}] = ${n}.value;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
`);
|
|
572
|
+
}
|
|
573
|
+
return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
|
|
574
|
+
}, c, l = S, u = !o.jitless, d = u && he.value, f = t.catchall, p;
|
|
575
|
+
e._zod.parse = (i, o) => {
|
|
576
|
+
p ??= r.value;
|
|
577
|
+
let s = i.value;
|
|
578
|
+
return l(s) ? u && d && o?.async === !1 && o.jitless !== !0 ? (c ||= a(t.shape), i = c(i, o), f ? q([], s, i, o, p, e, o?.abortEarly === !0) : i) : n(i, o) : (i.issues.push({
|
|
579
|
+
expected: "object",
|
|
580
|
+
code: "invalid_type",
|
|
581
|
+
input: s,
|
|
582
|
+
inst: e
|
|
583
|
+
}), i);
|
|
584
|
+
};
|
|
585
|
+
});
|
|
586
|
+
function Y(e, t, n, r) {
|
|
587
|
+
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
588
|
+
let i = e.filter((e) => !h(e));
|
|
589
|
+
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
590
|
+
code: "invalid_union",
|
|
591
|
+
input: t.value,
|
|
592
|
+
inst: n,
|
|
593
|
+
errors: e.map((e) => e.issues.map((e) => b(e, r, a())))
|
|
594
|
+
}), t);
|
|
595
|
+
}
|
|
596
|
+
var at = /*@__PURE__*/ i("$ZodUnion", (e, t) => {
|
|
597
|
+
E.init(e, t), y(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), y(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), y(e, "values", (e) => {
|
|
598
|
+
if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
|
|
599
|
+
}), y(e, "pattern", (e) => {
|
|
600
|
+
if (e.def.options.every((e) => e._zod.pattern)) {
|
|
601
|
+
let t = e.def.options.map((e) => e._zod.pattern);
|
|
602
|
+
return RegExp(`^(${t.map((e) => v(e.source)).join("|")})$`);
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
606
|
+
e._zod.parse = (r, i) => {
|
|
607
|
+
if (n) return n(r, i);
|
|
608
|
+
let a = !1, o = [];
|
|
609
|
+
for (let e of t.options) {
|
|
610
|
+
let t = e._zod.run({
|
|
611
|
+
value: r.value,
|
|
612
|
+
issues: []
|
|
613
|
+
}, i);
|
|
614
|
+
if (t instanceof Promise) o.push(t), a = !0;
|
|
615
|
+
else {
|
|
616
|
+
if (t.issues.length === 0) return t;
|
|
617
|
+
o.push(t);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return a ? Promise.all(o).then((t) => Y(t, r, e, i)) : Y(o, r, e, i);
|
|
621
|
+
};
|
|
622
|
+
}), ot = /*@__PURE__*/ i("$ZodIntersection", (e, t) => {
|
|
623
|
+
E.init(e, t), e._zod.parse = (e, n) => {
|
|
624
|
+
let r = e.value, i = t.left._zod.run({
|
|
625
|
+
value: r,
|
|
626
|
+
issues: []
|
|
627
|
+
}, n), a = t.right._zod.run({
|
|
628
|
+
value: r,
|
|
629
|
+
issues: []
|
|
630
|
+
}, n);
|
|
631
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Z(e, t, n)) : Z(e, i, a);
|
|
632
|
+
};
|
|
633
|
+
});
|
|
634
|
+
function X(e, t) {
|
|
635
|
+
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
636
|
+
valid: !0,
|
|
637
|
+
data: e
|
|
638
|
+
};
|
|
639
|
+
if (C(e) && C(t)) {
|
|
640
|
+
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
641
|
+
...e,
|
|
642
|
+
...t
|
|
643
|
+
};
|
|
644
|
+
Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
|
|
645
|
+
for (let n of r) {
|
|
646
|
+
if (n === "__proto__") continue;
|
|
647
|
+
let r = X(e[n], t[n]);
|
|
648
|
+
if (!r.valid) return {
|
|
649
|
+
valid: !1,
|
|
650
|
+
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
651
|
+
};
|
|
652
|
+
i[n] = r.data;
|
|
653
|
+
}
|
|
654
|
+
return {
|
|
655
|
+
valid: !0,
|
|
656
|
+
data: i
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
if (Array.isArray(e) && Array.isArray(t)) {
|
|
660
|
+
if (e.length !== t.length) return {
|
|
661
|
+
valid: !1,
|
|
662
|
+
mergeErrorPath: []
|
|
663
|
+
};
|
|
664
|
+
let n = [];
|
|
665
|
+
for (let r = 0; r < e.length; r++) {
|
|
666
|
+
let i = e[r], a = t[r], o = X(i, a);
|
|
667
|
+
if (!o.valid) return {
|
|
668
|
+
valid: !1,
|
|
669
|
+
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
670
|
+
};
|
|
671
|
+
n.push(o.data);
|
|
672
|
+
}
|
|
673
|
+
return {
|
|
674
|
+
valid: !0,
|
|
675
|
+
data: n
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
return {
|
|
679
|
+
valid: !1,
|
|
680
|
+
mergeErrorPath: []
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
function Z(e, t, n) {
|
|
684
|
+
let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
685
|
+
let n;
|
|
686
|
+
if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
|
|
687
|
+
else if (e.code === "invalid_key" && e.origin === "record" && e.path?.length === 1) {
|
|
688
|
+
let t = String(e.path[0]);
|
|
689
|
+
a.has(t) || a.set(t, e), n = [t];
|
|
690
|
+
} else return !1;
|
|
691
|
+
for (let e of n) r.has(e) || r.set(e, {}), r.get(e)[t] = !0;
|
|
692
|
+
return !0;
|
|
693
|
+
};
|
|
694
|
+
for (let n of t.issues) o(n, "l") || e.issues.push(n);
|
|
695
|
+
for (let t of n.issues) o(t, "r") || e.issues.push(t);
|
|
696
|
+
let s = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
|
|
697
|
+
if (s.length) {
|
|
698
|
+
let t = i ? s.filter((e) => i.keys.includes(e)) : [];
|
|
699
|
+
t.length && e.issues.push({
|
|
700
|
+
...i,
|
|
701
|
+
keys: t
|
|
702
|
+
});
|
|
703
|
+
for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
|
|
704
|
+
}
|
|
705
|
+
let c = X(t.value, n.value);
|
|
706
|
+
if (!c.valid) {
|
|
707
|
+
if (h(e)) return e;
|
|
708
|
+
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
709
|
+
}
|
|
710
|
+
return e.value = c.data, e;
|
|
711
|
+
}
|
|
712
|
+
var st = /*@__PURE__*/ i("$ZodEnum", (e, t) => {
|
|
713
|
+
E.init(e, t);
|
|
714
|
+
let n = x(t.entries), r = new Set(n);
|
|
715
|
+
e._zod.values = r, y(e, "pattern", (e) => {
|
|
716
|
+
let t = x(e.def.entries).filter((e) => we.has(typeof e));
|
|
717
|
+
return RegExp(t.length ? `^(${t.map((e) => ve(e.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
718
|
+
}), e._zod.parse = (t, i) => {
|
|
719
|
+
let a = t.value;
|
|
720
|
+
return r.has(a) || t.issues.push({
|
|
721
|
+
code: "invalid_value",
|
|
722
|
+
values: n,
|
|
723
|
+
input: a,
|
|
724
|
+
inst: e
|
|
725
|
+
}), t;
|
|
726
|
+
};
|
|
727
|
+
}), ct = /*@__PURE__*/ i("$ZodTransform", (e, t) => {
|
|
728
|
+
E.init(e, t), e._zod.optin = "optional", o.memoizer?.guard(e), e._zod.parse = (i, a) => {
|
|
729
|
+
if (a.direction === "backward") throw new r(e.constructor.name);
|
|
730
|
+
let o = t.transform(i.value, i);
|
|
731
|
+
if (a.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((e) => (i.value = e, i));
|
|
732
|
+
if (o instanceof Promise) throw new n();
|
|
733
|
+
return i.value = o, i;
|
|
734
|
+
};
|
|
735
|
+
});
|
|
736
|
+
function lt(e, t) {
|
|
737
|
+
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
738
|
+
}
|
|
739
|
+
var ut = /*@__PURE__*/ i("$ZodOptional", (e, t) => {
|
|
740
|
+
E.init(e, t), y(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", y(e, "values", (e) => {
|
|
741
|
+
let t = e.def.innerType._zod.values;
|
|
742
|
+
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
743
|
+
}), y(e, "pattern", (e) => {
|
|
744
|
+
let t = e.def.innerType._zod.pattern;
|
|
745
|
+
return t ? RegExp(`^(${v(t.source)})?$`) : void 0;
|
|
746
|
+
}), e._zod.parse = (e, n) => {
|
|
747
|
+
if (e.value === void 0) {
|
|
748
|
+
if (t.innerType._zod.optin !== "defaulted") return e;
|
|
749
|
+
let r = t.innerType._zod.run({
|
|
750
|
+
value: e.value,
|
|
751
|
+
issues: []
|
|
752
|
+
}, n);
|
|
753
|
+
return r instanceof Promise ? r.then((t) => lt(e, t)) : lt(e, r);
|
|
754
|
+
}
|
|
755
|
+
return t.innerType._zod.run(e, n);
|
|
756
|
+
};
|
|
757
|
+
}), dt = /*@__PURE__*/ i("$ZodExactOptional", (e, t) => {
|
|
758
|
+
ut.init(e, t), y(e, "values", (e) => e.def.innerType._zod.values), y(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
759
|
+
}), ft = /*@__PURE__*/ i("$ZodNullable", (e, t) => {
|
|
760
|
+
E.init(e, t), y(e, "optin", (e) => e.def.innerType._zod.optin), y(e, "optout", (e) => e.def.innerType._zod.optout), y(e, "pattern", (e) => {
|
|
761
|
+
let t = e.def.innerType._zod.pattern;
|
|
762
|
+
return t ? RegExp(`^(${v(t.source)}|null)$`) : void 0;
|
|
763
|
+
}), y(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
764
|
+
}), pt = /*@__PURE__*/ i("$ZodDefault", (e, t) => {
|
|
765
|
+
E.init(e, t), e._zod.optin = "defaulted", y(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
766
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
767
|
+
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
768
|
+
let r = t.innerType._zod.run(e, n);
|
|
769
|
+
return r instanceof Promise ? r.then((e) => mt(e, t)) : mt(r, t);
|
|
770
|
+
};
|
|
771
|
+
});
|
|
772
|
+
function mt(e, t) {
|
|
773
|
+
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
774
|
+
}
|
|
775
|
+
var ht = /*@__PURE__*/ i("$ZodPrefault", (e, t) => {
|
|
776
|
+
E.init(e, t), e._zod.optin = "defaulted", y(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
777
|
+
}), gt = /*@__PURE__*/ i("$ZodNonOptional", (e, t) => {
|
|
778
|
+
E.init(e, t), y(e, "values", (e) => {
|
|
779
|
+
let t = e.def.innerType._zod.values;
|
|
780
|
+
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
781
|
+
}), e._zod.parse = (n, r) => {
|
|
782
|
+
let i = t.innerType._zod.run(n, r);
|
|
783
|
+
return i instanceof Promise ? i.then((t) => _t(t, e)) : _t(i, e);
|
|
784
|
+
};
|
|
785
|
+
});
|
|
786
|
+
function _t(e, t) {
|
|
787
|
+
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
788
|
+
code: "invalid_type",
|
|
789
|
+
expected: "nonoptional",
|
|
790
|
+
input: e.value,
|
|
791
|
+
inst: t
|
|
792
|
+
}), e;
|
|
793
|
+
}
|
|
794
|
+
function vt(e, t, n, r) {
|
|
795
|
+
return t.issues.length ? (e.value = n.catchValue({
|
|
796
|
+
...t,
|
|
797
|
+
value: e.value,
|
|
798
|
+
error: { issues: t.issues.map((e) => b(e, r, a())) },
|
|
799
|
+
input: e.value
|
|
800
|
+
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
801
|
+
}
|
|
802
|
+
var yt = /*@__PURE__*/ i("$ZodCatch", (e, t) => {
|
|
803
|
+
E.init(e, t), y(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), y(e, "optout", (e) => e.def.innerType._zod.optout), y(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
804
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
805
|
+
let r = t.innerType._zod.run({
|
|
806
|
+
value: e.value,
|
|
807
|
+
issues: []
|
|
808
|
+
}, n);
|
|
809
|
+
return r instanceof Promise ? r.then((r) => vt(e, r, t, n)) : vt(e, r, t, n);
|
|
810
|
+
};
|
|
811
|
+
}), bt = /*@__PURE__*/ i("$ZodPipe", (e, t) => {
|
|
812
|
+
E.init(e, t), y(e, "values", (e) => e.def.in._zod.values), y(e, "optin", (e) => e.def.in._zod.optin), y(e, "optout", (e) => e.def.out._zod.optout), y(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
813
|
+
if (n.direction === "backward") {
|
|
814
|
+
let r = t.out._zod.run(e, n);
|
|
815
|
+
return r instanceof Promise ? r.then((e) => Q(e, t.in, n)) : Q(r, t.in, n);
|
|
816
|
+
}
|
|
817
|
+
let r = t.in._zod.run(e, n);
|
|
818
|
+
return r instanceof Promise ? r.then((e) => Q(e, t.out, n)) : Q(r, t.out, n);
|
|
819
|
+
};
|
|
820
|
+
});
|
|
821
|
+
function Q(e, t, n) {
|
|
822
|
+
return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
|
|
823
|
+
value: e.value,
|
|
824
|
+
issues: e.issues
|
|
825
|
+
}, n);
|
|
826
|
+
}
|
|
827
|
+
var xt = /*@__PURE__*/ i("$ZodReadonly", (e, t) => {
|
|
828
|
+
E.init(e, t), y(e, "propValues", (e) => e.def.innerType._zod.propValues), y(e, "values", (e) => e.def.innerType._zod.values), y(e, "optin", (e) => e.def.innerType?._zod?.optin), y(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
829
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
830
|
+
let r = t.innerType._zod.run(e, n);
|
|
831
|
+
return r instanceof Promise ? r.then(St) : St(r);
|
|
832
|
+
};
|
|
833
|
+
});
|
|
834
|
+
function St(e) {
|
|
835
|
+
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
836
|
+
}
|
|
837
|
+
var Ct = /*@__PURE__*/ i("$ZodCustom", (t, n) => {
|
|
838
|
+
e.init(t, n), E.init(t, n), t._zod.parse = (e, t) => e, t._zod.check = (e) => {
|
|
839
|
+
let r = e.value, i = n.fn(r);
|
|
840
|
+
if (i instanceof Promise) return i.then((n) => $(n, e, r, t));
|
|
841
|
+
$(i, e, r, t);
|
|
842
|
+
};
|
|
843
|
+
});
|
|
844
|
+
function $(e, t, n, r) {
|
|
845
|
+
if (!e) {
|
|
846
|
+
let e = {
|
|
847
|
+
code: "custom",
|
|
848
|
+
input: n,
|
|
849
|
+
inst: r,
|
|
850
|
+
path: [...r._zod.def.path ?? []],
|
|
851
|
+
continue: !r._zod.def.abort
|
|
852
|
+
};
|
|
853
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(xe(e));
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
export { nt as $ZodArray, Je as $ZodBase64, Ye as $ZodBase64URL, Ke as $ZodCIDRv4, qe as $ZodCIDRv6, Pe as $ZodCUID, Fe as $ZodCUID2, yt as $ZodCatch, Ct as $ZodCustom, pt as $ZodDefault, Xe as $ZodE164, ke as $ZodEmail, Me as $ZodEmoji, st as $ZodEnum, dt as $ZodExactOptional, De as $ZodGUID, Ue as $ZodIPv4, Ge as $ZodIPv6, Be as $ZodISODate, ze as $ZodISODateTime, He as $ZodISODuration, Ve as $ZodISOTime, ot as $ZodIntersection, Ze as $ZodJWT, Re as $ZodKSUID, Ne as $ZodNanoID, $e as $ZodNever, gt as $ZodNonOptional, ft as $ZodNullable, J as $ZodObject, it as $ZodObjectJIT, ut as $ZodOptional, bt as $ZodPipe, ht as $ZodPrefault, xt as $ZodReadonly, k as $ZodString, A as $ZodStringFormat, ct as $ZodTransform, E as $ZodType, Ie as $ZodULID, je as $ZodURL, Oe as $ZodUUID, at as $ZodUnion, Qe as $ZodUnknown, Le as $ZodXID, B as base64Charset, V as base64urlCharset, j as canParseURL, z as isValidBase64, H as isValidBase64URL, R as isValidCIDRv6, L as isValidIPv6, U as isValidJWT, X as mergeValues, N as parseURLObject, O as standardProps, P as stripTabAndNewline, F as urlHostnameOk, I as urlProtocolOk, M as validateURL };
|