@datapos/datapos-shared 0.3.260 → 0.3.262

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.
@@ -1,2654 +1,103 @@
1
- const _c = ["createObject", "dropObject", "removeRecords", "upsertRecords"], vc = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
- function a(e, t, n) {
3
- function r(u, l) {
4
- var d;
5
- Object.defineProperty(u, "_zod", {
6
- value: u._zod ?? {},
7
- enumerable: !1
8
- }), (d = u._zod).traits ?? (d.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, l);
9
- for (const h in c.prototype)
10
- h in u || Object.defineProperty(u, h, { value: c.prototype[h].bind(u) });
11
- u._zod.constr = c, u._zod.def = l;
12
- }
13
- const o = n?.Parent ?? Object;
14
- class i extends o {
15
- }
16
- Object.defineProperty(i, "name", { value: e });
17
- function c(u) {
18
- var l;
19
- const d = n?.Parent ? new i() : this;
20
- r(d, u), (l = d._zod).deferred ?? (l.deferred = []);
21
- for (const h of d._zod.deferred)
22
- h();
23
- return d;
24
- }
25
- return Object.defineProperty(c, "init", { value: r }), Object.defineProperty(c, Symbol.hasInstance, {
26
- value: (u) => n?.Parent && u instanceof n.Parent ? !0 : u?._zod?.traits?.has(e)
27
- }), Object.defineProperty(c, "name", { value: e }), c;
28
- }
29
- class L extends Error {
30
- constructor() {
31
- super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
32
- }
33
- }
34
- class Be extends Error {
35
- constructor(t) {
36
- super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
37
- }
38
- }
39
- const We = {};
40
- function C(e) {
41
- return We;
42
- }
43
- function bt(e) {
44
- const t = Object.values(e).filter((r) => typeof r == "number");
45
- return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
46
- }
47
- function le(e, t) {
48
- return typeof t == "bigint" ? t.toString() : t;
49
- }
50
- function fe(e) {
51
- return {
52
- get value() {
53
- {
54
- const t = e();
55
- return Object.defineProperty(this, "value", { value: t }), t;
56
- }
57
- }
58
- };
59
- }
60
- function he(e) {
61
- return e == null;
62
- }
63
- function me(e) {
64
- const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
65
- return e.slice(t, n);
66
- }
67
- function wt(e, t) {
68
- const n = (e.toString().split(".")[1] || "").length, r = t.toString();
69
- let o = (r.split(".")[1] || "").length;
70
- if (o === 0 && /\d?e-\d?/.test(r)) {
71
- const l = r.match(/\d?e-(\d?)/);
72
- l?.[1] && (o = Number.parseInt(l[1]));
73
- }
74
- const i = n > o ? n : o, c = Number.parseInt(e.toFixed(i).replace(".", "")), u = Number.parseInt(t.toFixed(i).replace(".", ""));
75
- return c % u / 10 ** i;
76
- }
77
- const ke = Symbol("evaluating");
78
- function m(e, t, n) {
79
- let r;
80
- Object.defineProperty(e, t, {
81
- get() {
82
- if (r !== ke)
83
- return r === void 0 && (r = ke, r = n()), r;
84
- },
85
- set(o) {
86
- Object.defineProperty(e, t, {
87
- value: o
88
- // configurable: true,
89
- });
90
- },
91
- configurable: !0
92
- });
93
- }
94
- function j(e, t, n) {
95
- Object.defineProperty(e, t, {
96
- value: n,
97
- writable: !0,
98
- enumerable: !0,
99
- configurable: !0
100
- });
101
- }
102
- function M(...e) {
103
- const t = {};
104
- for (const n of e) {
105
- const r = Object.getOwnPropertyDescriptors(n);
106
- Object.assign(t, r);
107
- }
108
- return Object.defineProperties({}, t);
109
- }
110
- function $e(e) {
111
- return JSON.stringify(e);
112
- }
113
- const Je = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
114
- };
115
- function Q(e) {
116
- return typeof e == "object" && e !== null && !Array.isArray(e);
117
- }
118
- const zt = fe(() => {
119
- if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
120
- return !1;
121
- try {
122
- const e = Function;
123
- return new e(""), !0;
124
- } catch {
125
- return !1;
126
- }
127
- });
128
- function V(e) {
129
- if (Q(e) === !1)
130
- return !1;
131
- const t = e.constructor;
132
- if (t === void 0)
133
- return !0;
134
- const n = t.prototype;
135
- return !(Q(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
136
- }
137
- function Ke(e) {
138
- return V(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
139
- }
140
- const kt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
141
- function G(e) {
142
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
143
- }
144
- function R(e, t, n) {
145
- const r = new e._zod.constr(t ?? e._zod.def);
146
- return (!t || n?.parent) && (r._zod.parent = e), r;
147
- }
148
- function f(e) {
149
- const t = e;
150
- if (!t)
151
- return {};
152
- if (typeof t == "string")
153
- return { error: () => t };
154
- if (t?.message !== void 0) {
155
- if (t?.error !== void 0)
156
- throw new Error("Cannot specify both `message` and `error` params");
157
- t.error = t.message;
158
- }
159
- return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
160
- }
161
- function $t(e) {
162
- return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
163
- }
164
- const yt = {
165
- safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
166
- int32: [-2147483648, 2147483647],
167
- uint32: [0, 4294967295],
168
- float32: [-34028234663852886e22, 34028234663852886e22],
169
- float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
170
- };
171
- function Zt(e, t) {
172
- const n = e._zod.def, r = M(e._zod.def, {
173
- get shape() {
174
- const o = {};
175
- for (const i in t) {
176
- if (!(i in n.shape))
177
- throw new Error(`Unrecognized key: "${i}"`);
178
- t[i] && (o[i] = n.shape[i]);
179
- }
180
- return j(this, "shape", o), o;
181
- },
182
- checks: []
183
- });
184
- return R(e, r);
185
- }
186
- function Et(e, t) {
187
- const n = e._zod.def, r = M(e._zod.def, {
188
- get shape() {
189
- const o = { ...e._zod.def.shape };
190
- for (const i in t) {
191
- if (!(i in n.shape))
192
- throw new Error(`Unrecognized key: "${i}"`);
193
- t[i] && delete o[i];
194
- }
195
- return j(this, "shape", o), o;
196
- },
197
- checks: []
198
- });
199
- return R(e, r);
200
- }
201
- function It(e, t) {
202
- if (!V(t))
203
- throw new Error("Invalid input to extend: expected a plain object");
204
- const n = e._zod.def.checks;
205
- if (n && n.length > 0)
206
- throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
207
- const o = M(e._zod.def, {
208
- get shape() {
209
- const i = { ...e._zod.def.shape, ...t };
210
- return j(this, "shape", i), i;
211
- },
212
- checks: []
213
- });
214
- return R(e, o);
215
- }
216
- function St(e, t) {
217
- if (!V(t))
218
- throw new Error("Invalid input to safeExtend: expected a plain object");
219
- const n = {
220
- ...e._zod.def,
221
- get shape() {
222
- const r = { ...e._zod.def.shape, ...t };
223
- return j(this, "shape", r), r;
224
- },
225
- checks: e._zod.def.checks
226
- };
227
- return R(e, n);
228
- }
229
- function xt(e, t) {
230
- const n = M(e._zod.def, {
231
- get shape() {
232
- const r = { ...e._zod.def.shape, ...t._zod.def.shape };
233
- return j(this, "shape", r), r;
234
- },
235
- get catchall() {
236
- return t._zod.def.catchall;
237
- },
238
- checks: []
239
- // delete existing checks
240
- });
241
- return R(e, n);
242
- }
243
- function At(e, t, n) {
244
- const r = M(t._zod.def, {
245
- get shape() {
246
- const o = t._zod.def.shape, i = { ...o };
247
- if (n)
248
- for (const c in n) {
249
- if (!(c in o))
250
- throw new Error(`Unrecognized key: "${c}"`);
251
- n[c] && (i[c] = e ? new e({
252
- type: "optional",
253
- innerType: o[c]
254
- }) : o[c]);
255
- }
256
- else
257
- for (const c in o)
258
- i[c] = e ? new e({
259
- type: "optional",
260
- innerType: o[c]
261
- }) : o[c];
262
- return j(this, "shape", i), i;
263
- },
264
- checks: []
265
- });
266
- return R(t, r);
267
- }
268
- function Tt(e, t, n) {
269
- const r = M(t._zod.def, {
270
- get shape() {
271
- const o = t._zod.def.shape, i = { ...o };
272
- if (n)
273
- for (const c in n) {
274
- if (!(c in i))
275
- throw new Error(`Unrecognized key: "${c}"`);
276
- n[c] && (i[c] = new e({
277
- type: "nonoptional",
278
- innerType: o[c]
279
- }));
280
- }
281
- else
282
- for (const c in o)
283
- i[c] = new e({
284
- type: "nonoptional",
285
- innerType: o[c]
286
- });
287
- return j(this, "shape", i), i;
288
- },
289
- checks: []
290
- });
291
- return R(t, r);
292
- }
293
- function F(e, t = 0) {
294
- if (e.aborted === !0)
295
- return !0;
296
- for (let n = t; n < e.issues.length; n++)
297
- if (e.issues[n]?.continue !== !0)
298
- return !0;
299
- return !1;
300
- }
301
- function U(e, t) {
302
- return t.map((n) => {
303
- var r;
304
- return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
305
- });
306
- }
307
- function X(e) {
308
- return typeof e == "string" ? e : e?.message;
309
- }
310
- function N(e, t, n) {
311
- const r = { ...e, path: e.path ?? [] };
312
- if (!e.message) {
313
- const o = X(e.inst?._zod.def?.error?.(e)) ?? X(t?.error?.(e)) ?? X(n.customError?.(e)) ?? X(n.localeError?.(e)) ?? "Invalid input";
314
- r.message = o;
315
- }
316
- return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
317
- }
318
- function ge(e) {
319
- return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
320
- }
321
- function J(...e) {
322
- const [t, n, r] = e;
323
- return typeof t == "string" ? {
324
- message: t,
325
- code: "custom",
326
- input: n,
327
- inst: r
328
- } : { ...t };
329
- }
330
- const Xe = (e, t) => {
331
- e.name = "$ZodError", Object.defineProperty(e, "_zod", {
332
- value: e._zod,
333
- enumerable: !1
334
- }), Object.defineProperty(e, "issues", {
335
- value: t,
336
- enumerable: !1
337
- }), e.message = JSON.stringify(t, le, 2), Object.defineProperty(e, "toString", {
338
- value: () => e.message,
339
- enumerable: !1
340
- });
341
- }, He = a("$ZodError", Xe), Ye = a("$ZodError", Xe, { Parent: Error });
342
- function Ot(e, t = (n) => n.message) {
343
- const n = {}, r = [];
344
- for (const o of e.issues)
345
- o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
346
- return { formErrors: r, fieldErrors: n };
347
- }
348
- function Ct(e, t = (n) => n.message) {
349
- const n = { _errors: [] }, r = (o) => {
350
- for (const i of o.issues)
351
- if (i.code === "invalid_union" && i.errors.length)
352
- i.errors.map((c) => r({ issues: c }));
353
- else if (i.code === "invalid_key")
354
- r({ issues: i.issues });
355
- else if (i.code === "invalid_element")
356
- r({ issues: i.issues });
357
- else if (i.path.length === 0)
358
- n._errors.push(t(i));
359
- else {
360
- let c = n, u = 0;
361
- for (; u < i.path.length; ) {
362
- const l = i.path[u];
363
- u === i.path.length - 1 ? (c[l] = c[l] || { _errors: [] }, c[l]._errors.push(t(i))) : c[l] = c[l] || { _errors: [] }, c = c[l], u++;
364
- }
365
- }
366
- };
367
- return r(e), n;
368
- }
369
- const _e = (e) => (t, n, r, o) => {
370
- const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, c = t._zod.run({ value: n, issues: [] }, i);
371
- if (c instanceof Promise)
372
- throw new L();
373
- if (c.issues.length) {
374
- const u = new (o?.Err ?? e)(c.issues.map((l) => N(l, i, C())));
375
- throw Je(u, o?.callee), u;
376
- }
377
- return c.value;
378
- }, ve = (e) => async (t, n, r, o) => {
379
- const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
380
- let c = t._zod.run({ value: n, issues: [] }, i);
381
- if (c instanceof Promise && (c = await c), c.issues.length) {
382
- const u = new (o?.Err ?? e)(c.issues.map((l) => N(l, i, C())));
383
- throw Je(u, o?.callee), u;
384
- }
385
- return c.value;
386
- }, oe = (e) => (t, n, r) => {
387
- const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
388
- if (i instanceof Promise)
389
- throw new L();
390
- return i.issues.length ? {
391
- success: !1,
392
- error: new (e ?? He)(i.issues.map((c) => N(c, o, C())))
393
- } : { success: !0, data: i.value };
394
- }, Nt = /* @__PURE__ */ oe(Ye), ie = (e) => async (t, n, r) => {
395
- const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
396
- let i = t._zod.run({ value: n, issues: [] }, o);
397
- return i instanceof Promise && (i = await i), i.issues.length ? {
398
- success: !1,
399
- error: new e(i.issues.map((c) => N(c, o, C())))
400
- } : { success: !0, data: i.value };
401
- }, Dt = /* @__PURE__ */ ie(Ye), Pt = (e) => (t, n, r) => {
402
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
403
- return _e(e)(t, n, o);
404
- }, Rt = (e) => (t, n, r) => _e(e)(t, n, r), jt = (e) => async (t, n, r) => {
405
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
406
- return ve(e)(t, n, o);
407
- }, Mt = (e) => async (t, n, r) => ve(e)(t, n, r), Ft = (e) => (t, n, r) => {
408
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
409
- return oe(e)(t, n, o);
410
- }, Ut = (e) => (t, n, r) => oe(e)(t, n, r), Lt = (e) => async (t, n, r) => {
411
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
412
- return ie(e)(t, n, o);
413
- }, Vt = (e) => async (t, n, r) => ie(e)(t, n, r), Gt = /^[cC][^\s-]{8,}$/, Bt = /^[0-9a-z]+$/, Wt = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Jt = /^[0-9a-vA-V]{20}$/, Kt = /^[A-Za-z0-9]{27}$/, Xt = /^[a-zA-Z0-9_-]{21}$/, Ht = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Yt = /^([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})$/, ye = (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)$/, qt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Qt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
414
- function en() {
415
- return new RegExp(Qt, "u");
416
- }
417
- const tn = /^(?:(?: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])$/, nn = /^(([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}|:))$/, rn = /^((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])$/, on = /^(([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])$/, cn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, qe = /^[A-Za-z0-9_-]*$/, sn = /^(?=.{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])?)*\.?$/, an = /^\+(?:[0-9]){6,14}[0-9]$/, Qe = "(?:(?:\\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])))", un = /* @__PURE__ */ new RegExp(`^${Qe}$`);
418
- function et(e) {
419
- const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
420
- 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+)?)?`;
421
- }
422
- function ln(e) {
423
- return new RegExp(`^${et(e)}$`);
424
- }
425
- function dn(e) {
426
- const t = et({ precision: e.precision }), n = ["Z"];
427
- e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
428
- const r = `${t}(?:${n.join("|")})`;
429
- return new RegExp(`^${Qe}T(?:${r})$`);
430
- }
431
- const pn = (e) => {
432
- const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
433
- return new RegExp(`^${t}$`);
434
- }, fn = /^-?\d+$/, hn = /^-?\d+(?:\.\d+)?/, mn = /^(?:true|false)$/i, gn = /^[^A-Z]*$/, _n = /^[^a-z]*$/, y = /* @__PURE__ */ a("$ZodCheck", (e, t) => {
435
- var n;
436
- e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
437
- }), tt = {
438
- number: "number",
439
- bigint: "bigint",
440
- object: "date"
441
- }, nt = /* @__PURE__ */ a("$ZodCheckLessThan", (e, t) => {
442
- y.init(e, t);
443
- const n = tt[typeof t.value];
444
- e._zod.onattach.push((r) => {
445
- const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
446
- t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
447
- }), e._zod.check = (r) => {
448
- (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
449
- origin: n,
450
- code: "too_big",
451
- maximum: t.value,
452
- input: r.value,
453
- inclusive: t.inclusive,
454
- inst: e,
455
- continue: !t.abort
456
- });
457
- };
458
- }), rt = /* @__PURE__ */ a("$ZodCheckGreaterThan", (e, t) => {
459
- y.init(e, t);
460
- const n = tt[typeof t.value];
461
- e._zod.onattach.push((r) => {
462
- const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
463
- t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
464
- }), e._zod.check = (r) => {
465
- (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
466
- origin: n,
467
- code: "too_small",
468
- minimum: t.value,
469
- input: r.value,
470
- inclusive: t.inclusive,
471
- inst: e,
472
- continue: !t.abort
473
- });
474
- };
475
- }), vn = /* @__PURE__ */ a("$ZodCheckMultipleOf", (e, t) => {
476
- y.init(e, t), e._zod.onattach.push((n) => {
477
- var r;
478
- (r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
479
- }), e._zod.check = (n) => {
480
- if (typeof n.value != typeof t.value)
481
- throw new Error("Cannot mix number and bigint in multiple_of check.");
482
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : wt(n.value, t.value) === 0) || n.issues.push({
483
- origin: typeof n.value,
484
- code: "not_multiple_of",
485
- divisor: t.value,
486
- input: n.value,
487
- inst: e,
488
- continue: !t.abort
489
- });
490
- };
491
- }), bn = /* @__PURE__ */ a("$ZodCheckNumberFormat", (e, t) => {
492
- y.init(e, t), t.format = t.format || "float64";
493
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = yt[t.format];
494
- e._zod.onattach.push((c) => {
495
- const u = c._zod.bag;
496
- u.format = t.format, u.minimum = o, u.maximum = i, n && (u.pattern = fn);
497
- }), e._zod.check = (c) => {
498
- const u = c.value;
499
- if (n) {
500
- if (!Number.isInteger(u)) {
501
- c.issues.push({
502
- expected: r,
503
- format: t.format,
504
- code: "invalid_type",
505
- continue: !1,
506
- input: u,
507
- inst: e
508
- });
509
- return;
510
- }
511
- if (!Number.isSafeInteger(u)) {
512
- u > 0 ? c.issues.push({
513
- input: u,
514
- code: "too_big",
515
- maximum: Number.MAX_SAFE_INTEGER,
516
- note: "Integers must be within the safe integer range.",
517
- inst: e,
518
- origin: r,
519
- continue: !t.abort
520
- }) : c.issues.push({
521
- input: u,
522
- code: "too_small",
523
- minimum: Number.MIN_SAFE_INTEGER,
524
- note: "Integers must be within the safe integer range.",
525
- inst: e,
526
- origin: r,
527
- continue: !t.abort
528
- });
529
- return;
530
- }
531
- }
532
- u < o && c.issues.push({
533
- origin: "number",
534
- input: u,
535
- code: "too_small",
536
- minimum: o,
537
- inclusive: !0,
538
- inst: e,
539
- continue: !t.abort
540
- }), u > i && c.issues.push({
541
- origin: "number",
542
- input: u,
543
- code: "too_big",
544
- maximum: i,
545
- inst: e
546
- });
547
- };
548
- }), wn = /* @__PURE__ */ a("$ZodCheckMaxLength", (e, t) => {
549
- var n;
550
- y.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
551
- const o = r.value;
552
- return !he(o) && o.length !== void 0;
553
- }), e._zod.onattach.push((r) => {
554
- const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
555
- t.maximum < o && (r._zod.bag.maximum = t.maximum);
556
- }), e._zod.check = (r) => {
557
- const o = r.value;
558
- if (o.length <= t.maximum)
559
- return;
560
- const c = ge(o);
561
- r.issues.push({
562
- origin: c,
563
- code: "too_big",
564
- maximum: t.maximum,
565
- inclusive: !0,
566
- input: o,
567
- inst: e,
568
- continue: !t.abort
569
- });
570
- };
571
- }), zn = /* @__PURE__ */ a("$ZodCheckMinLength", (e, t) => {
572
- var n;
573
- y.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
574
- const o = r.value;
575
- return !he(o) && o.length !== void 0;
576
- }), e._zod.onattach.push((r) => {
577
- const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
578
- t.minimum > o && (r._zod.bag.minimum = t.minimum);
579
- }), e._zod.check = (r) => {
580
- const o = r.value;
581
- if (o.length >= t.minimum)
582
- return;
583
- const c = ge(o);
584
- r.issues.push({
585
- origin: c,
586
- code: "too_small",
587
- minimum: t.minimum,
588
- inclusive: !0,
589
- input: o,
590
- inst: e,
591
- continue: !t.abort
592
- });
593
- };
594
- }), kn = /* @__PURE__ */ a("$ZodCheckLengthEquals", (e, t) => {
595
- var n;
596
- y.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
597
- const o = r.value;
598
- return !he(o) && o.length !== void 0;
599
- }), e._zod.onattach.push((r) => {
600
- const o = r._zod.bag;
601
- o.minimum = t.length, o.maximum = t.length, o.length = t.length;
602
- }), e._zod.check = (r) => {
603
- const o = r.value, i = o.length;
604
- if (i === t.length)
605
- return;
606
- const c = ge(o), u = i > t.length;
607
- r.issues.push({
608
- origin: c,
609
- ...u ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
610
- inclusive: !0,
611
- exact: !0,
612
- input: r.value,
613
- inst: e,
614
- continue: !t.abort
615
- });
616
- };
617
- }), ce = /* @__PURE__ */ a("$ZodCheckStringFormat", (e, t) => {
618
- var n, r;
619
- y.init(e, t), e._zod.onattach.push((o) => {
620
- const i = o._zod.bag;
621
- i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
622
- }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
623
- t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
624
- origin: "string",
625
- code: "invalid_format",
626
- format: t.format,
627
- input: o.value,
628
- ...t.pattern ? { pattern: t.pattern.toString() } : {},
629
- inst: e,
630
- continue: !t.abort
631
- });
632
- }) : (r = e._zod).check ?? (r.check = () => {
633
- });
634
- }), $n = /* @__PURE__ */ a("$ZodCheckRegex", (e, t) => {
635
- ce.init(e, t), e._zod.check = (n) => {
636
- t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
637
- origin: "string",
638
- code: "invalid_format",
639
- format: "regex",
640
- input: n.value,
641
- pattern: t.pattern.toString(),
642
- inst: e,
643
- continue: !t.abort
644
- });
645
- };
646
- }), yn = /* @__PURE__ */ a("$ZodCheckLowerCase", (e, t) => {
647
- t.pattern ?? (t.pattern = gn), ce.init(e, t);
648
- }), Zn = /* @__PURE__ */ a("$ZodCheckUpperCase", (e, t) => {
649
- t.pattern ?? (t.pattern = _n), ce.init(e, t);
650
- }), En = /* @__PURE__ */ a("$ZodCheckIncludes", (e, t) => {
651
- y.init(e, t);
652
- const n = G(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
653
- t.pattern = r, e._zod.onattach.push((o) => {
654
- const i = o._zod.bag;
655
- i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
656
- }), e._zod.check = (o) => {
657
- o.value.includes(t.includes, t.position) || o.issues.push({
658
- origin: "string",
659
- code: "invalid_format",
660
- format: "includes",
661
- includes: t.includes,
662
- input: o.value,
663
- inst: e,
664
- continue: !t.abort
665
- });
666
- };
667
- }), In = /* @__PURE__ */ a("$ZodCheckStartsWith", (e, t) => {
668
- y.init(e, t);
669
- const n = new RegExp(`^${G(t.prefix)}.*`);
670
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
671
- const o = r._zod.bag;
672
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
673
- }), e._zod.check = (r) => {
674
- r.value.startsWith(t.prefix) || r.issues.push({
675
- origin: "string",
676
- code: "invalid_format",
677
- format: "starts_with",
678
- prefix: t.prefix,
679
- input: r.value,
680
- inst: e,
681
- continue: !t.abort
682
- });
683
- };
684
- }), Sn = /* @__PURE__ */ a("$ZodCheckEndsWith", (e, t) => {
685
- y.init(e, t);
686
- const n = new RegExp(`.*${G(t.suffix)}$`);
687
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
688
- const o = r._zod.bag;
689
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
690
- }), e._zod.check = (r) => {
691
- r.value.endsWith(t.suffix) || r.issues.push({
692
- origin: "string",
693
- code: "invalid_format",
694
- format: "ends_with",
695
- suffix: t.suffix,
696
- input: r.value,
697
- inst: e,
698
- continue: !t.abort
699
- });
700
- };
701
- }), xn = /* @__PURE__ */ a("$ZodCheckOverwrite", (e, t) => {
702
- y.init(e, t), e._zod.check = (n) => {
703
- n.value = t.tx(n.value);
704
- };
705
- });
706
- class An {
707
- constructor(t = []) {
708
- this.content = [], this.indent = 0, this && (this.args = t);
709
- }
710
- indented(t) {
711
- this.indent += 1, t(this), this.indent -= 1;
712
- }
713
- write(t) {
714
- if (typeof t == "function") {
715
- t(this, { execution: "sync" }), t(this, { execution: "async" });
716
- return;
717
- }
718
- const r = t.split(`
719
- `).filter((c) => c), o = Math.min(...r.map((c) => c.length - c.trimStart().length)), i = r.map((c) => c.slice(o)).map((c) => " ".repeat(this.indent * 2) + c);
720
- for (const c of i)
721
- this.content.push(c);
722
- }
723
- compile() {
724
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
725
- return new t(...n, o.join(`
726
- `));
727
- }
728
- }
729
- const Tn = {
730
- major: 4,
731
- minor: 1,
732
- patch: 12
733
- }, _ = /* @__PURE__ */ a("$ZodType", (e, t) => {
734
- var n;
735
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Tn;
736
- const r = [...e._zod.def.checks ?? []];
737
- e._zod.traits.has("$ZodCheck") && r.unshift(e);
738
- for (const o of r)
739
- for (const i of o._zod.onattach)
740
- i(e);
741
- if (r.length === 0)
742
- (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
743
- e._zod.run = e._zod.parse;
744
- });
745
- else {
746
- const o = (c, u, l) => {
747
- let d = F(c), h;
748
- for (const $ of u) {
749
- if ($._zod.def.when) {
750
- if (!$._zod.def.when(c))
751
- continue;
752
- } else if (d)
753
- continue;
754
- const b = c.issues.length, k = $._zod.check(c);
755
- if (k instanceof Promise && l?.async === !1)
756
- throw new L();
757
- if (h || k instanceof Promise)
758
- h = (h ?? Promise.resolve()).then(async () => {
759
- await k, c.issues.length !== b && (d || (d = F(c, b)));
760
- });
761
- else {
762
- if (c.issues.length === b)
763
- continue;
764
- d || (d = F(c, b));
765
- }
766
- }
767
- return h ? h.then(() => c) : c;
768
- }, i = (c, u, l) => {
769
- if (F(c))
770
- return c.aborted = !0, c;
771
- const d = o(u, r, l);
772
- if (d instanceof Promise) {
773
- if (l.async === !1)
774
- throw new L();
775
- return d.then((h) => e._zod.parse(h, l));
776
- }
777
- return e._zod.parse(d, l);
778
- };
779
- e._zod.run = (c, u) => {
780
- if (u.skipChecks)
781
- return e._zod.parse(c, u);
782
- if (u.direction === "backward") {
783
- const d = e._zod.parse({ value: c.value, issues: [] }, { ...u, skipChecks: !0 });
784
- return d instanceof Promise ? d.then((h) => i(h, c, u)) : i(d, c, u);
785
- }
786
- const l = e._zod.parse(c, u);
787
- if (l instanceof Promise) {
788
- if (u.async === !1)
789
- throw new L();
790
- return l.then((d) => o(d, r, u));
791
- }
792
- return o(l, r, u);
793
- };
794
- }
795
- e["~standard"] = {
796
- validate: (o) => {
797
- try {
798
- const i = Nt(e, o);
799
- return i.success ? { value: i.data } : { issues: i.error?.issues };
800
- } catch {
801
- return Dt(e, o).then((c) => c.success ? { value: c.data } : { issues: c.error?.issues });
802
- }
803
- },
804
- vendor: "zod",
805
- version: 1
806
- };
807
- }), be = /* @__PURE__ */ a("$ZodString", (e, t) => {
808
- _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? pn(e._zod.bag), e._zod.parse = (n, r) => {
809
- if (t.coerce)
810
- try {
811
- n.value = String(n.value);
812
- } catch {
813
- }
814
- return typeof n.value == "string" || n.issues.push({
815
- expected: "string",
816
- code: "invalid_type",
817
- input: n.value,
818
- inst: e
819
- }), n;
820
- };
821
- }), g = /* @__PURE__ */ a("$ZodStringFormat", (e, t) => {
822
- ce.init(e, t), be.init(e, t);
823
- }), On = /* @__PURE__ */ a("$ZodGUID", (e, t) => {
824
- t.pattern ?? (t.pattern = Yt), g.init(e, t);
825
- }), Cn = /* @__PURE__ */ a("$ZodUUID", (e, t) => {
826
- if (t.version) {
827
- const r = {
828
- v1: 1,
829
- v2: 2,
830
- v3: 3,
831
- v4: 4,
832
- v5: 5,
833
- v6: 6,
834
- v7: 7,
835
- v8: 8
836
- }[t.version];
837
- if (r === void 0)
838
- throw new Error(`Invalid UUID version: "${t.version}"`);
839
- t.pattern ?? (t.pattern = ye(r));
840
- } else
841
- t.pattern ?? (t.pattern = ye());
842
- g.init(e, t);
843
- }), Nn = /* @__PURE__ */ a("$ZodEmail", (e, t) => {
844
- t.pattern ?? (t.pattern = qt), g.init(e, t);
845
- }), Dn = /* @__PURE__ */ a("$ZodURL", (e, t) => {
846
- g.init(e, t), e._zod.check = (n) => {
847
- try {
848
- const r = n.value.trim(), o = new URL(r);
849
- t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
850
- code: "invalid_format",
851
- format: "url",
852
- note: "Invalid hostname",
853
- pattern: sn.source,
854
- input: n.value,
855
- inst: e,
856
- continue: !t.abort
857
- })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || n.issues.push({
858
- code: "invalid_format",
859
- format: "url",
860
- note: "Invalid protocol",
861
- pattern: t.protocol.source,
862
- input: n.value,
863
- inst: e,
864
- continue: !t.abort
865
- })), t.normalize ? n.value = o.href : n.value = r;
866
- return;
867
- } catch {
868
- n.issues.push({
869
- code: "invalid_format",
870
- format: "url",
871
- input: n.value,
872
- inst: e,
873
- continue: !t.abort
874
- });
875
- }
876
- };
877
- }), Pn = /* @__PURE__ */ a("$ZodEmoji", (e, t) => {
878
- t.pattern ?? (t.pattern = en()), g.init(e, t);
879
- }), Rn = /* @__PURE__ */ a("$ZodNanoID", (e, t) => {
880
- t.pattern ?? (t.pattern = Xt), g.init(e, t);
881
- }), jn = /* @__PURE__ */ a("$ZodCUID", (e, t) => {
882
- t.pattern ?? (t.pattern = Gt), g.init(e, t);
883
- }), Mn = /* @__PURE__ */ a("$ZodCUID2", (e, t) => {
884
- t.pattern ?? (t.pattern = Bt), g.init(e, t);
885
- }), Fn = /* @__PURE__ */ a("$ZodULID", (e, t) => {
886
- t.pattern ?? (t.pattern = Wt), g.init(e, t);
887
- }), Un = /* @__PURE__ */ a("$ZodXID", (e, t) => {
888
- t.pattern ?? (t.pattern = Jt), g.init(e, t);
889
- }), Ln = /* @__PURE__ */ a("$ZodKSUID", (e, t) => {
890
- t.pattern ?? (t.pattern = Kt), g.init(e, t);
891
- }), Vn = /* @__PURE__ */ a("$ZodISODateTime", (e, t) => {
892
- t.pattern ?? (t.pattern = dn(t)), g.init(e, t);
893
- }), Gn = /* @__PURE__ */ a("$ZodISODate", (e, t) => {
894
- t.pattern ?? (t.pattern = un), g.init(e, t);
895
- }), Bn = /* @__PURE__ */ a("$ZodISOTime", (e, t) => {
896
- t.pattern ?? (t.pattern = ln(t)), g.init(e, t);
897
- }), Wn = /* @__PURE__ */ a("$ZodISODuration", (e, t) => {
898
- t.pattern ?? (t.pattern = Ht), g.init(e, t);
899
- }), Jn = /* @__PURE__ */ a("$ZodIPv4", (e, t) => {
900
- t.pattern ?? (t.pattern = tn), g.init(e, t), e._zod.onattach.push((n) => {
901
- const r = n._zod.bag;
902
- r.format = "ipv4";
903
- });
904
- }), Kn = /* @__PURE__ */ a("$ZodIPv6", (e, t) => {
905
- t.pattern ?? (t.pattern = nn), g.init(e, t), e._zod.onattach.push((n) => {
906
- const r = n._zod.bag;
907
- r.format = "ipv6";
908
- }), e._zod.check = (n) => {
909
- try {
910
- new URL(`http://[${n.value}]`);
911
- } catch {
912
- n.issues.push({
913
- code: "invalid_format",
914
- format: "ipv6",
915
- input: n.value,
916
- inst: e,
917
- continue: !t.abort
918
- });
919
- }
920
- };
921
- }), Xn = /* @__PURE__ */ a("$ZodCIDRv4", (e, t) => {
922
- t.pattern ?? (t.pattern = rn), g.init(e, t);
923
- }), Hn = /* @__PURE__ */ a("$ZodCIDRv6", (e, t) => {
924
- t.pattern ?? (t.pattern = on), g.init(e, t), e._zod.check = (n) => {
925
- const r = n.value.split("/");
926
- try {
927
- if (r.length !== 2)
928
- throw new Error();
929
- const [o, i] = r;
930
- if (!i)
931
- throw new Error();
932
- const c = Number(i);
933
- if (`${c}` !== i)
934
- throw new Error();
935
- if (c < 0 || c > 128)
936
- throw new Error();
937
- new URL(`http://[${o}]`);
938
- } catch {
939
- n.issues.push({
940
- code: "invalid_format",
941
- format: "cidrv6",
942
- input: n.value,
943
- inst: e,
944
- continue: !t.abort
945
- });
946
- }
947
- };
948
- });
949
- function ot(e) {
950
- if (e === "")
951
- return !0;
952
- if (e.length % 4 !== 0)
953
- return !1;
954
- try {
955
- return atob(e), !0;
956
- } catch {
957
- return !1;
958
- }
959
- }
960
- const Yn = /* @__PURE__ */ a("$ZodBase64", (e, t) => {
961
- t.pattern ?? (t.pattern = cn), g.init(e, t), e._zod.onattach.push((n) => {
962
- n._zod.bag.contentEncoding = "base64";
963
- }), e._zod.check = (n) => {
964
- ot(n.value) || n.issues.push({
965
- code: "invalid_format",
966
- format: "base64",
967
- input: n.value,
968
- inst: e,
969
- continue: !t.abort
970
- });
971
- };
972
- });
973
- function qn(e) {
974
- if (!qe.test(e))
975
- return !1;
976
- const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
977
- return ot(n);
978
- }
979
- const Qn = /* @__PURE__ */ a("$ZodBase64URL", (e, t) => {
980
- t.pattern ?? (t.pattern = qe), g.init(e, t), e._zod.onattach.push((n) => {
981
- n._zod.bag.contentEncoding = "base64url";
982
- }), e._zod.check = (n) => {
983
- qn(n.value) || n.issues.push({
984
- code: "invalid_format",
985
- format: "base64url",
986
- input: n.value,
987
- inst: e,
988
- continue: !t.abort
989
- });
990
- };
991
- }), er = /* @__PURE__ */ a("$ZodE164", (e, t) => {
992
- t.pattern ?? (t.pattern = an), g.init(e, t);
993
- });
994
- function tr(e, t = null) {
995
- try {
996
- const n = e.split(".");
997
- if (n.length !== 3)
998
- return !1;
999
- const [r] = n;
1000
- if (!r)
1001
- return !1;
1002
- const o = JSON.parse(atob(r));
1003
- return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1004
- } catch {
1005
- return !1;
1006
- }
1007
- }
1008
- const nr = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1009
- g.init(e, t), e._zod.check = (n) => {
1010
- tr(n.value, t.alg) || n.issues.push({
1011
- code: "invalid_format",
1012
- format: "jwt",
1013
- input: n.value,
1014
- inst: e,
1015
- continue: !t.abort
1016
- });
1017
- };
1018
- }), it = /* @__PURE__ */ a("$ZodNumber", (e, t) => {
1019
- _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? hn, e._zod.parse = (n, r) => {
1020
- if (t.coerce)
1021
- try {
1022
- n.value = Number(n.value);
1023
- } catch {
1024
- }
1025
- const o = n.value;
1026
- if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
1027
- return n;
1028
- const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
1029
- return n.issues.push({
1030
- expected: "number",
1031
- code: "invalid_type",
1032
- input: o,
1033
- inst: e,
1034
- ...i ? { received: i } : {}
1035
- }), n;
1036
- };
1037
- }), rr = /* @__PURE__ */ a("$ZodNumber", (e, t) => {
1038
- bn.init(e, t), it.init(e, t);
1039
- }), or = /* @__PURE__ */ a("$ZodBoolean", (e, t) => {
1040
- _.init(e, t), e._zod.pattern = mn, e._zod.parse = (n, r) => {
1041
- if (t.coerce)
1042
- try {
1043
- n.value = !!n.value;
1044
- } catch {
1045
- }
1046
- const o = n.value;
1047
- return typeof o == "boolean" || n.issues.push({
1048
- expected: "boolean",
1049
- code: "invalid_type",
1050
- input: o,
1051
- inst: e
1052
- }), n;
1053
- };
1054
- }), ir = /* @__PURE__ */ a("$ZodUnknown", (e, t) => {
1055
- _.init(e, t), e._zod.parse = (n) => n;
1056
- }), cr = /* @__PURE__ */ a("$ZodNever", (e, t) => {
1057
- _.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1058
- expected: "never",
1059
- code: "invalid_type",
1060
- input: n.value,
1061
- inst: e
1062
- }), n);
1063
- });
1064
- function Ze(e, t, n) {
1065
- e.issues.length && t.issues.push(...U(n, e.issues)), t.value[n] = e.value;
1066
- }
1067
- const sr = /* @__PURE__ */ a("$ZodArray", (e, t) => {
1068
- _.init(e, t), e._zod.parse = (n, r) => {
1069
- const o = n.value;
1070
- if (!Array.isArray(o))
1071
- return n.issues.push({
1072
- expected: "array",
1073
- code: "invalid_type",
1074
- input: o,
1075
- inst: e
1076
- }), n;
1077
- n.value = Array(o.length);
1078
- const i = [];
1079
- for (let c = 0; c < o.length; c++) {
1080
- const u = o[c], l = t.element._zod.run({
1081
- value: u,
1082
- issues: []
1083
- }, r);
1084
- l instanceof Promise ? i.push(l.then((d) => Ze(d, n, c))) : Ze(l, n, c);
1085
- }
1086
- return i.length ? Promise.all(i).then(() => n) : n;
1087
- };
1088
- });
1089
- function ee(e, t, n, r) {
1090
- e.issues.length && t.issues.push(...U(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1091
- }
1092
- function ct(e) {
1093
- const t = Object.keys(e.shape);
1094
- for (const r of t)
1095
- if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1096
- throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1097
- const n = $t(e.shape);
1098
- return {
1099
- ...e,
1100
- keys: t,
1101
- keySet: new Set(t),
1102
- numKeys: t.length,
1103
- optionalKeys: new Set(n)
1104
- };
1105
- }
1106
- function st(e, t, n, r, o, i) {
1107
- const c = [], u = o.keySet, l = o.catchall._zod, d = l.def.type;
1108
- for (const h of Object.keys(t)) {
1109
- if (u.has(h))
1110
- continue;
1111
- if (d === "never") {
1112
- c.push(h);
1113
- continue;
1114
- }
1115
- const $ = l.run({ value: t[h], issues: [] }, r);
1116
- $ instanceof Promise ? e.push($.then((b) => ee(b, n, h, t))) : ee($, n, h, t);
1117
- }
1118
- return c.length && n.issues.push({
1119
- code: "unrecognized_keys",
1120
- keys: c,
1121
- input: t,
1122
- inst: i
1123
- }), e.length ? Promise.all(e).then(() => n) : n;
1124
- }
1125
- const ar = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1126
- if (_.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1127
- const u = t.shape;
1128
- Object.defineProperty(t, "shape", {
1129
- get: () => {
1130
- const l = { ...u };
1131
- return Object.defineProperty(t, "shape", {
1132
- value: l
1133
- }), l;
1134
- }
1135
- });
1136
- }
1137
- const r = fe(() => ct(t));
1138
- m(e._zod, "propValues", () => {
1139
- const u = t.shape, l = {};
1140
- for (const d in u) {
1141
- const h = u[d]._zod;
1142
- if (h.values) {
1143
- l[d] ?? (l[d] = /* @__PURE__ */ new Set());
1144
- for (const $ of h.values)
1145
- l[d].add($);
1146
- }
1147
- }
1148
- return l;
1149
- });
1150
- const o = Q, i = t.catchall;
1151
- let c;
1152
- e._zod.parse = (u, l) => {
1153
- c ?? (c = r.value);
1154
- const d = u.value;
1155
- if (!o(d))
1156
- return u.issues.push({
1157
- expected: "object",
1158
- code: "invalid_type",
1159
- input: d,
1160
- inst: e
1161
- }), u;
1162
- u.value = {};
1163
- const h = [], $ = c.shape;
1164
- for (const b of c.keys) {
1165
- const Z = $[b]._zod.run({ value: d[b], issues: [] }, l);
1166
- Z instanceof Promise ? h.push(Z.then((se) => ee(se, u, b, d))) : ee(Z, u, b, d);
1167
- }
1168
- return i ? st(h, d, u, l, r.value, e) : h.length ? Promise.all(h).then(() => u) : u;
1169
- };
1170
- }), ur = /* @__PURE__ */ a("$ZodObjectJIT", (e, t) => {
1171
- ar.init(e, t);
1172
- const n = e._zod.parse, r = fe(() => ct(t)), o = (b) => {
1173
- const k = new An(["shape", "payload", "ctx"]), Z = r.value, se = (T) => {
1174
- const x = $e(T);
1175
- return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
1176
- };
1177
- k.write("const input = payload.value;");
1178
- const ze = /* @__PURE__ */ Object.create(null);
1179
- let _t = 0;
1180
- for (const T of Z.keys)
1181
- ze[T] = `key_${_t++}`;
1182
- k.write("const newResult = {};");
1183
- for (const T of Z.keys) {
1184
- const x = ze[T], W = $e(T);
1185
- k.write(`const ${x} = ${se(T)};`), k.write(`
1186
- if (${x}.issues.length) {
1187
- payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1188
- ...iss,
1189
- path: iss.path ? [${W}, ...iss.path] : [${W}]
1190
- })));
1191
- }
1192
-
1193
-
1194
- if (${x}.value === undefined) {
1195
- if (${W} in input) {
1196
- newResult[${W}] = undefined;
1197
- }
1198
- } else {
1199
- newResult[${W}] = ${x}.value;
1200
- }
1201
-
1202
- `);
1203
- }
1204
- k.write("payload.value = newResult;"), k.write("return payload;");
1205
- const vt = k.compile();
1206
- return (T, x) => vt(b, T, x);
1207
- };
1208
- let i;
1209
- const c = Q, u = !We.jitless, d = u && zt.value, h = t.catchall;
1210
- let $;
1211
- e._zod.parse = (b, k) => {
1212
- $ ?? ($ = r.value);
1213
- const Z = b.value;
1214
- return c(Z) ? u && d && k?.async === !1 && k.jitless !== !0 ? (i || (i = o(t.shape)), b = i(b, k), h ? st([], Z, b, k, $, e) : b) : n(b, k) : (b.issues.push({
1215
- expected: "object",
1216
- code: "invalid_type",
1217
- input: Z,
1218
- inst: e
1219
- }), b);
1220
- };
1221
- });
1222
- function Ee(e, t, n, r) {
1223
- for (const i of e)
1224
- if (i.issues.length === 0)
1225
- return t.value = i.value, t;
1226
- const o = e.filter((i) => !F(i));
1227
- return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1228
- code: "invalid_union",
1229
- input: t.value,
1230
- inst: n,
1231
- errors: e.map((i) => i.issues.map((c) => N(c, r, C())))
1232
- }), t);
1233
- }
1234
- const lr = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1235
- _.init(e, t), m(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), m(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), m(e._zod, "values", () => {
1236
- if (t.options.every((o) => o._zod.values))
1237
- return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1238
- }), m(e._zod, "pattern", () => {
1239
- if (t.options.every((o) => o._zod.pattern)) {
1240
- const o = t.options.map((i) => i._zod.pattern);
1241
- return new RegExp(`^(${o.map((i) => me(i.source)).join("|")})$`);
1242
- }
1243
- });
1244
- const n = t.options.length === 1, r = t.options[0]._zod.run;
1245
- e._zod.parse = (o, i) => {
1246
- if (n)
1247
- return r(o, i);
1248
- let c = !1;
1249
- const u = [];
1250
- for (const l of t.options) {
1251
- const d = l._zod.run({
1252
- value: o.value,
1253
- issues: []
1254
- }, i);
1255
- if (d instanceof Promise)
1256
- u.push(d), c = !0;
1257
- else {
1258
- if (d.issues.length === 0)
1259
- return d;
1260
- u.push(d);
1261
- }
1262
- }
1263
- return c ? Promise.all(u).then((l) => Ee(l, o, e, i)) : Ee(u, o, e, i);
1264
- };
1265
- }), dr = /* @__PURE__ */ a("$ZodIntersection", (e, t) => {
1266
- _.init(e, t), e._zod.parse = (n, r) => {
1267
- const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), c = t.right._zod.run({ value: o, issues: [] }, r);
1268
- return i instanceof Promise || c instanceof Promise ? Promise.all([i, c]).then(([l, d]) => Ie(n, l, d)) : Ie(n, i, c);
1269
- };
1270
- });
1271
- function de(e, t) {
1272
- if (e === t)
1273
- return { valid: !0, data: e };
1274
- if (e instanceof Date && t instanceof Date && +e == +t)
1275
- return { valid: !0, data: e };
1276
- if (V(e) && V(t)) {
1277
- const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1278
- for (const i of r) {
1279
- const c = de(e[i], t[i]);
1280
- if (!c.valid)
1281
- return {
1282
- valid: !1,
1283
- mergeErrorPath: [i, ...c.mergeErrorPath]
1284
- };
1285
- o[i] = c.data;
1286
- }
1287
- return { valid: !0, data: o };
1288
- }
1289
- if (Array.isArray(e) && Array.isArray(t)) {
1290
- if (e.length !== t.length)
1291
- return { valid: !1, mergeErrorPath: [] };
1292
- const n = [];
1293
- for (let r = 0; r < e.length; r++) {
1294
- const o = e[r], i = t[r], c = de(o, i);
1295
- if (!c.valid)
1296
- return {
1297
- valid: !1,
1298
- mergeErrorPath: [r, ...c.mergeErrorPath]
1299
- };
1300
- n.push(c.data);
1301
- }
1302
- return { valid: !0, data: n };
1303
- }
1304
- return { valid: !1, mergeErrorPath: [] };
1305
- }
1306
- function Ie(e, t, n) {
1307
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), F(e))
1308
- return e;
1309
- const r = de(t.value, n.value);
1310
- if (!r.valid)
1311
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1312
- return e.value = r.data, e;
1313
- }
1314
- const pr = /* @__PURE__ */ a("$ZodRecord", (e, t) => {
1315
- _.init(e, t), e._zod.parse = (n, r) => {
1316
- const o = n.value;
1317
- if (!V(o))
1318
- return n.issues.push({
1319
- expected: "record",
1320
- code: "invalid_type",
1321
- input: o,
1322
- inst: e
1323
- }), n;
1324
- const i = [];
1325
- if (t.keyType._zod.values) {
1326
- const c = t.keyType._zod.values;
1327
- n.value = {};
1328
- for (const l of c)
1329
- if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
1330
- const d = t.valueType._zod.run({ value: o[l], issues: [] }, r);
1331
- d instanceof Promise ? i.push(d.then((h) => {
1332
- h.issues.length && n.issues.push(...U(l, h.issues)), n.value[l] = h.value;
1333
- })) : (d.issues.length && n.issues.push(...U(l, d.issues)), n.value[l] = d.value);
1334
- }
1335
- let u;
1336
- for (const l in o)
1337
- c.has(l) || (u = u ?? [], u.push(l));
1338
- u && u.length > 0 && n.issues.push({
1339
- code: "unrecognized_keys",
1340
- input: o,
1341
- inst: e,
1342
- keys: u
1343
- });
1344
- } else {
1345
- n.value = {};
1346
- for (const c of Reflect.ownKeys(o)) {
1347
- if (c === "__proto__")
1348
- continue;
1349
- const u = t.keyType._zod.run({ value: c, issues: [] }, r);
1350
- if (u instanceof Promise)
1351
- throw new Error("Async schemas not supported in object keys currently");
1352
- if (u.issues.length) {
1353
- n.issues.push({
1354
- code: "invalid_key",
1355
- origin: "record",
1356
- issues: u.issues.map((d) => N(d, r, C())),
1357
- input: c,
1358
- path: [c],
1359
- inst: e
1360
- }), n.value[u.value] = u.value;
1361
- continue;
1362
- }
1363
- const l = t.valueType._zod.run({ value: o[c], issues: [] }, r);
1364
- l instanceof Promise ? i.push(l.then((d) => {
1365
- d.issues.length && n.issues.push(...U(c, d.issues)), n.value[u.value] = d.value;
1366
- })) : (l.issues.length && n.issues.push(...U(c, l.issues)), n.value[u.value] = l.value);
1367
- }
1368
- }
1369
- return i.length ? Promise.all(i).then(() => n) : n;
1370
- };
1371
- }), fr = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1372
- _.init(e, t);
1373
- const n = bt(t.entries), r = new Set(n);
1374
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => kt.has(typeof o)).map((o) => typeof o == "string" ? G(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1375
- const c = o.value;
1376
- return r.has(c) || o.issues.push({
1377
- code: "invalid_value",
1378
- values: n,
1379
- input: c,
1380
- inst: e
1381
- }), o;
1382
- };
1383
- }), hr = /* @__PURE__ */ a("$ZodLiteral", (e, t) => {
1384
- if (_.init(e, t), t.values.length === 0)
1385
- throw new Error("Cannot create literal schema with no valid values");
1386
- e._zod.values = new Set(t.values), e._zod.pattern = new RegExp(`^(${t.values.map((n) => typeof n == "string" ? G(n) : n ? G(n.toString()) : String(n)).join("|")})$`), e._zod.parse = (n, r) => {
1387
- const o = n.value;
1388
- return e._zod.values.has(o) || n.issues.push({
1389
- code: "invalid_value",
1390
- values: t.values,
1391
- input: o,
1392
- inst: e
1393
- }), n;
1394
- };
1395
- }), mr = /* @__PURE__ */ a("$ZodTransform", (e, t) => {
1396
- _.init(e, t), e._zod.parse = (n, r) => {
1397
- if (r.direction === "backward")
1398
- throw new Be(e.constructor.name);
1399
- const o = t.transform(n.value, n);
1400
- if (r.async)
1401
- return (o instanceof Promise ? o : Promise.resolve(o)).then((c) => (n.value = c, n));
1402
- if (o instanceof Promise)
1403
- throw new L();
1404
- return n.value = o, n;
1405
- };
1406
- });
1407
- function Se(e, t) {
1408
- return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1409
- }
1410
- const gr = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1411
- _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", m(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), m(e._zod, "pattern", () => {
1412
- const n = t.innerType._zod.pattern;
1413
- return n ? new RegExp(`^(${me(n.source)})?$`) : void 0;
1414
- }), e._zod.parse = (n, r) => {
1415
- if (t.innerType._zod.optin === "optional") {
1416
- const o = t.innerType._zod.run(n, r);
1417
- return o instanceof Promise ? o.then((i) => Se(i, n.value)) : Se(o, n.value);
1418
- }
1419
- return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1420
- };
1421
- }), _r = /* @__PURE__ */ a("$ZodNullable", (e, t) => {
1422
- _.init(e, t), m(e._zod, "optin", () => t.innerType._zod.optin), m(e._zod, "optout", () => t.innerType._zod.optout), m(e._zod, "pattern", () => {
1423
- const n = t.innerType._zod.pattern;
1424
- return n ? new RegExp(`^(${me(n.source)}|null)$`) : void 0;
1425
- }), m(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);
1426
- }), vr = /* @__PURE__ */ a("$ZodDefault", (e, t) => {
1427
- _.init(e, t), e._zod.optin = "optional", m(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1428
- if (r.direction === "backward")
1429
- return t.innerType._zod.run(n, r);
1430
- if (n.value === void 0)
1431
- return n.value = t.defaultValue, n;
1432
- const o = t.innerType._zod.run(n, r);
1433
- return o instanceof Promise ? o.then((i) => xe(i, t)) : xe(o, t);
1434
- };
1435
- });
1436
- function xe(e, t) {
1437
- return e.value === void 0 && (e.value = t.defaultValue), e;
1438
- }
1439
- const br = /* @__PURE__ */ a("$ZodPrefault", (e, t) => {
1440
- _.init(e, t), e._zod.optin = "optional", m(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));
1441
- }), wr = /* @__PURE__ */ a("$ZodNonOptional", (e, t) => {
1442
- _.init(e, t), m(e._zod, "values", () => {
1443
- const n = t.innerType._zod.values;
1444
- return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1445
- }), e._zod.parse = (n, r) => {
1446
- const o = t.innerType._zod.run(n, r);
1447
- return o instanceof Promise ? o.then((i) => Ae(i, e)) : Ae(o, e);
1448
- };
1449
- });
1450
- function Ae(e, t) {
1451
- return !e.issues.length && e.value === void 0 && e.issues.push({
1452
- code: "invalid_type",
1453
- expected: "nonoptional",
1454
- input: e.value,
1455
- inst: t
1456
- }), e;
1457
- }
1458
- const zr = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
1459
- _.init(e, t), m(e._zod, "optin", () => t.innerType._zod.optin), m(e._zod, "optout", () => t.innerType._zod.optout), m(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1460
- if (r.direction === "backward")
1461
- return t.innerType._zod.run(n, r);
1462
- const o = t.innerType._zod.run(n, r);
1463
- return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1464
- ...n,
1465
- error: {
1466
- issues: i.issues.map((c) => N(c, r, C()))
1467
- },
1468
- input: n.value
1469
- }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1470
- ...n,
1471
- error: {
1472
- issues: o.issues.map((i) => N(i, r, C()))
1473
- },
1474
- input: n.value
1475
- }), n.issues = []), n);
1476
- };
1477
- }), kr = /* @__PURE__ */ a("$ZodPipe", (e, t) => {
1478
- _.init(e, t), m(e._zod, "values", () => t.in._zod.values), m(e._zod, "optin", () => t.in._zod.optin), m(e._zod, "optout", () => t.out._zod.optout), m(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1479
- if (r.direction === "backward") {
1480
- const i = t.out._zod.run(n, r);
1481
- return i instanceof Promise ? i.then((c) => H(c, t.in, r)) : H(i, t.in, r);
1482
- }
1483
- const o = t.in._zod.run(n, r);
1484
- return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
1485
- };
1486
- });
1487
- function H(e, t, n) {
1488
- return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1489
- }
1490
- const $r = /* @__PURE__ */ a("$ZodReadonly", (e, t) => {
1491
- _.init(e, t), m(e._zod, "propValues", () => t.innerType._zod.propValues), m(e._zod, "values", () => t.innerType._zod.values), m(e._zod, "optin", () => t.innerType._zod.optin), m(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
1492
- if (r.direction === "backward")
1493
- return t.innerType._zod.run(n, r);
1494
- const o = t.innerType._zod.run(n, r);
1495
- return o instanceof Promise ? o.then(Te) : Te(o);
1496
- };
1497
- });
1498
- function Te(e) {
1499
- return e.value = Object.freeze(e.value), e;
1500
- }
1501
- const yr = /* @__PURE__ */ a("$ZodCustom", (e, t) => {
1502
- y.init(e, t), _.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1503
- const r = n.value, o = t.fn(r);
1504
- if (o instanceof Promise)
1505
- return o.then((i) => Oe(i, n, r, e));
1506
- Oe(o, n, r, e);
1507
- };
1508
- });
1509
- function Oe(e, t, n, r) {
1510
- if (!e) {
1511
- const o = {
1512
- code: "custom",
1513
- input: n,
1514
- inst: r,
1515
- // incorporates params.error into issue reporting
1516
- path: [...r._zod.def.path ?? []],
1517
- // incorporates params.error into issue reporting
1518
- continue: !r._zod.def.abort
1519
- // params: inst._zod.def.params,
1520
- };
1521
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(J(o));
1522
- }
1523
- }
1524
- class Zr {
1525
- constructor() {
1526
- this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1527
- }
1528
- add(t, ...n) {
1529
- const r = n[0];
1530
- if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
1531
- if (this._idmap.has(r.id))
1532
- throw new Error(`ID ${r.id} already exists in the registry`);
1533
- this._idmap.set(r.id, t);
1534
- }
1535
- return this;
1536
- }
1537
- clear() {
1538
- return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1539
- }
1540
- remove(t) {
1541
- const n = this._map.get(t);
1542
- return n && typeof n == "object" && "id" in n && this._idmap.delete(n.id), this._map.delete(t), this;
1543
- }
1544
- get(t) {
1545
- const n = t._zod.parent;
1546
- if (n) {
1547
- const r = { ...this.get(n) ?? {} };
1548
- delete r.id;
1549
- const o = { ...r, ...this._map.get(t) };
1550
- return Object.keys(o).length ? o : void 0;
1551
- }
1552
- return this._map.get(t);
1553
- }
1554
- has(t) {
1555
- return this._map.has(t);
1556
- }
1557
- }
1558
- function Er() {
1559
- return new Zr();
1560
- }
1561
- const Y = /* @__PURE__ */ Er();
1562
- function Ir(e, t) {
1563
- return new e({
1564
- type: "string",
1565
- ...f(t)
1566
- });
1567
- }
1568
- function Sr(e, t) {
1569
- return new e({
1570
- type: "string",
1571
- format: "email",
1572
- check: "string_format",
1573
- abort: !1,
1574
- ...f(t)
1575
- });
1576
- }
1577
- function Ce(e, t) {
1578
- return new e({
1579
- type: "string",
1580
- format: "guid",
1581
- check: "string_format",
1582
- abort: !1,
1583
- ...f(t)
1584
- });
1585
- }
1586
- function xr(e, t) {
1587
- return new e({
1588
- type: "string",
1589
- format: "uuid",
1590
- check: "string_format",
1591
- abort: !1,
1592
- ...f(t)
1593
- });
1594
- }
1595
- function Ar(e, t) {
1596
- return new e({
1597
- type: "string",
1598
- format: "uuid",
1599
- check: "string_format",
1600
- abort: !1,
1601
- version: "v4",
1602
- ...f(t)
1603
- });
1604
- }
1605
- function Tr(e, t) {
1606
- return new e({
1607
- type: "string",
1608
- format: "uuid",
1609
- check: "string_format",
1610
- abort: !1,
1611
- version: "v6",
1612
- ...f(t)
1613
- });
1614
- }
1615
- function Or(e, t) {
1616
- return new e({
1617
- type: "string",
1618
- format: "uuid",
1619
- check: "string_format",
1620
- abort: !1,
1621
- version: "v7",
1622
- ...f(t)
1623
- });
1624
- }
1625
- function Cr(e, t) {
1626
- return new e({
1627
- type: "string",
1628
- format: "url",
1629
- check: "string_format",
1630
- abort: !1,
1631
- ...f(t)
1632
- });
1633
- }
1634
- function Nr(e, t) {
1635
- return new e({
1636
- type: "string",
1637
- format: "emoji",
1638
- check: "string_format",
1639
- abort: !1,
1640
- ...f(t)
1641
- });
1642
- }
1643
- function Dr(e, t) {
1644
- return new e({
1645
- type: "string",
1646
- format: "nanoid",
1647
- check: "string_format",
1648
- abort: !1,
1649
- ...f(t)
1650
- });
1651
- }
1652
- function Pr(e, t) {
1653
- return new e({
1654
- type: "string",
1655
- format: "cuid",
1656
- check: "string_format",
1657
- abort: !1,
1658
- ...f(t)
1659
- });
1660
- }
1661
- function Rr(e, t) {
1662
- return new e({
1663
- type: "string",
1664
- format: "cuid2",
1665
- check: "string_format",
1666
- abort: !1,
1667
- ...f(t)
1668
- });
1669
- }
1670
- function jr(e, t) {
1671
- return new e({
1672
- type: "string",
1673
- format: "ulid",
1674
- check: "string_format",
1675
- abort: !1,
1676
- ...f(t)
1677
- });
1678
- }
1679
- function Mr(e, t) {
1680
- return new e({
1681
- type: "string",
1682
- format: "xid",
1683
- check: "string_format",
1684
- abort: !1,
1685
- ...f(t)
1686
- });
1687
- }
1688
- function Fr(e, t) {
1689
- return new e({
1690
- type: "string",
1691
- format: "ksuid",
1692
- check: "string_format",
1693
- abort: !1,
1694
- ...f(t)
1695
- });
1696
- }
1697
- function Ur(e, t) {
1698
- return new e({
1699
- type: "string",
1700
- format: "ipv4",
1701
- check: "string_format",
1702
- abort: !1,
1703
- ...f(t)
1704
- });
1705
- }
1706
- function Lr(e, t) {
1707
- return new e({
1708
- type: "string",
1709
- format: "ipv6",
1710
- check: "string_format",
1711
- abort: !1,
1712
- ...f(t)
1713
- });
1714
- }
1715
- function Vr(e, t) {
1716
- return new e({
1717
- type: "string",
1718
- format: "cidrv4",
1719
- check: "string_format",
1720
- abort: !1,
1721
- ...f(t)
1722
- });
1723
- }
1724
- function Gr(e, t) {
1725
- return new e({
1726
- type: "string",
1727
- format: "cidrv6",
1728
- check: "string_format",
1729
- abort: !1,
1730
- ...f(t)
1731
- });
1732
- }
1733
- function Br(e, t) {
1734
- return new e({
1735
- type: "string",
1736
- format: "base64",
1737
- check: "string_format",
1738
- abort: !1,
1739
- ...f(t)
1740
- });
1741
- }
1742
- function Wr(e, t) {
1743
- return new e({
1744
- type: "string",
1745
- format: "base64url",
1746
- check: "string_format",
1747
- abort: !1,
1748
- ...f(t)
1749
- });
1750
- }
1751
- function Jr(e, t) {
1752
- return new e({
1753
- type: "string",
1754
- format: "e164",
1755
- check: "string_format",
1756
- abort: !1,
1757
- ...f(t)
1758
- });
1759
- }
1760
- function Kr(e, t) {
1761
- return new e({
1762
- type: "string",
1763
- format: "jwt",
1764
- check: "string_format",
1765
- abort: !1,
1766
- ...f(t)
1767
- });
1768
- }
1769
- function Xr(e, t) {
1770
- return new e({
1771
- type: "string",
1772
- format: "datetime",
1773
- check: "string_format",
1774
- offset: !1,
1775
- local: !1,
1776
- precision: null,
1777
- ...f(t)
1778
- });
1779
- }
1780
- function Hr(e, t) {
1781
- return new e({
1782
- type: "string",
1783
- format: "date",
1784
- check: "string_format",
1785
- ...f(t)
1786
- });
1787
- }
1788
- function Yr(e, t) {
1789
- return new e({
1790
- type: "string",
1791
- format: "time",
1792
- check: "string_format",
1793
- precision: null,
1794
- ...f(t)
1795
- });
1796
- }
1797
- function qr(e, t) {
1798
- return new e({
1799
- type: "string",
1800
- format: "duration",
1801
- check: "string_format",
1802
- ...f(t)
1803
- });
1804
- }
1805
- function Qr(e, t) {
1806
- return new e({
1807
- type: "number",
1808
- checks: [],
1809
- ...f(t)
1810
- });
1811
- }
1812
- function eo(e, t) {
1813
- return new e({
1814
- type: "number",
1815
- check: "number_format",
1816
- abort: !1,
1817
- format: "safeint",
1818
- ...f(t)
1819
- });
1820
- }
1821
- function to(e, t) {
1822
- return new e({
1823
- type: "boolean",
1824
- ...f(t)
1825
- });
1826
- }
1827
- function no(e) {
1828
- return new e({
1829
- type: "unknown"
1830
- });
1831
- }
1832
- function ro(e, t) {
1833
- return new e({
1834
- type: "never",
1835
- ...f(t)
1836
- });
1837
- }
1838
- function Ne(e, t) {
1839
- return new nt({
1840
- check: "less_than",
1841
- ...f(t),
1842
- value: e,
1843
- inclusive: !1
1844
- });
1845
- }
1846
- function ae(e, t) {
1847
- return new nt({
1848
- check: "less_than",
1849
- ...f(t),
1850
- value: e,
1851
- inclusive: !0
1852
- });
1853
- }
1854
- function De(e, t) {
1855
- return new rt({
1856
- check: "greater_than",
1857
- ...f(t),
1858
- value: e,
1859
- inclusive: !1
1860
- });
1861
- }
1862
- function ue(e, t) {
1863
- return new rt({
1864
- check: "greater_than",
1865
- ...f(t),
1866
- value: e,
1867
- inclusive: !0
1868
- });
1869
- }
1870
- function Pe(e, t) {
1871
- return new vn({
1872
- check: "multiple_of",
1873
- ...f(t),
1874
- value: e
1875
- });
1876
- }
1877
- function at(e, t) {
1878
- return new wn({
1879
- check: "max_length",
1880
- ...f(t),
1881
- maximum: e
1882
- });
1883
- }
1884
- function te(e, t) {
1885
- return new zn({
1886
- check: "min_length",
1887
- ...f(t),
1888
- minimum: e
1889
- });
1890
- }
1891
- function ut(e, t) {
1892
- return new kn({
1893
- check: "length_equals",
1894
- ...f(t),
1895
- length: e
1896
- });
1897
- }
1898
- function oo(e, t) {
1899
- return new $n({
1900
- check: "string_format",
1901
- format: "regex",
1902
- ...f(t),
1903
- pattern: e
1904
- });
1905
- }
1906
- function io(e) {
1907
- return new yn({
1908
- check: "string_format",
1909
- format: "lowercase",
1910
- ...f(e)
1911
- });
1912
- }
1913
- function co(e) {
1914
- return new Zn({
1915
- check: "string_format",
1916
- format: "uppercase",
1917
- ...f(e)
1918
- });
1919
- }
1920
- function so(e, t) {
1921
- return new En({
1922
- check: "string_format",
1923
- format: "includes",
1924
- ...f(t),
1925
- includes: e
1926
- });
1927
- }
1928
- function ao(e, t) {
1929
- return new In({
1930
- check: "string_format",
1931
- format: "starts_with",
1932
- ...f(t),
1933
- prefix: e
1934
- });
1935
- }
1936
- function uo(e, t) {
1937
- return new Sn({
1938
- check: "string_format",
1939
- format: "ends_with",
1940
- ...f(t),
1941
- suffix: e
1942
- });
1943
- }
1944
- function K(e) {
1945
- return new xn({
1946
- check: "overwrite",
1947
- tx: e
1948
- });
1949
- }
1950
- function lo(e) {
1951
- return K((t) => t.normalize(e));
1952
- }
1953
- function po() {
1954
- return K((e) => e.trim());
1955
- }
1956
- function fo() {
1957
- return K((e) => e.toLowerCase());
1958
- }
1959
- function ho() {
1960
- return K((e) => e.toUpperCase());
1961
- }
1962
- function mo(e, t, n) {
1963
- return new e({
1964
- type: "array",
1965
- element: t,
1966
- // get element() {
1967
- // return element;
1968
- // },
1969
- ...f(n)
1970
- });
1971
- }
1972
- function go(e, t, n) {
1973
- return new e({
1974
- type: "custom",
1975
- check: "custom",
1976
- fn: t,
1977
- ...f(n)
1978
- });
1979
- }
1980
- function _o(e) {
1981
- const t = vo((n) => (n.addIssue = (r) => {
1982
- if (typeof r == "string")
1983
- n.issues.push(J(r, n.value, t._zod.def));
1984
- else {
1985
- const o = r;
1986
- 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(J(o));
1987
- }
1988
- }, e(n.value, n)));
1989
- return t;
1990
- }
1991
- function vo(e, t) {
1992
- const n = new y({
1993
- check: "custom",
1994
- ...f(t)
1995
- });
1996
- return n._zod.check = e, n;
1997
- }
1998
- const bo = /* @__PURE__ */ a("ZodISODateTime", (e, t) => {
1999
- Vn.init(e, t), v.init(e, t);
2000
- });
2001
- function wo(e) {
2002
- return Xr(bo, e);
2003
- }
2004
- const zo = /* @__PURE__ */ a("ZodISODate", (e, t) => {
2005
- Gn.init(e, t), v.init(e, t);
2006
- });
2007
- function ko(e) {
2008
- return Hr(zo, e);
2009
- }
2010
- const $o = /* @__PURE__ */ a("ZodISOTime", (e, t) => {
2011
- Bn.init(e, t), v.init(e, t);
2012
- });
2013
- function yo(e) {
2014
- return Yr($o, e);
2015
- }
2016
- const Zo = /* @__PURE__ */ a("ZodISODuration", (e, t) => {
2017
- Wn.init(e, t), v.init(e, t);
2018
- });
2019
- function Eo(e) {
2020
- return qr(Zo, e);
2021
- }
2022
- const Io = (e, t) => {
2023
- He.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2024
- format: {
2025
- value: (n) => Ct(e, n)
2026
- // enumerable: false,
2027
- },
2028
- flatten: {
2029
- value: (n) => Ot(e, n)
2030
- // enumerable: false,
2031
- },
2032
- addIssue: {
2033
- value: (n) => {
2034
- e.issues.push(n), e.message = JSON.stringify(e.issues, le, 2);
2035
- }
2036
- // enumerable: false,
2037
- },
2038
- addIssues: {
2039
- value: (n) => {
2040
- e.issues.push(...n), e.message = JSON.stringify(e.issues, le, 2);
2041
- }
2042
- // enumerable: false,
2043
- },
2044
- isEmpty: {
2045
- get() {
2046
- return e.issues.length === 0;
2047
- }
2048
- // enumerable: false,
2049
- }
2050
- });
2051
- }, S = a("ZodError", Io, {
2052
- Parent: Error
2053
- }), So = /* @__PURE__ */ _e(S), xo = /* @__PURE__ */ ve(S), Ao = /* @__PURE__ */ oe(S), To = /* @__PURE__ */ ie(S), Oo = /* @__PURE__ */ Pt(S), Co = /* @__PURE__ */ Rt(S), No = /* @__PURE__ */ jt(S), Do = /* @__PURE__ */ Mt(S), Po = /* @__PURE__ */ Ft(S), Ro = /* @__PURE__ */ Ut(S), jo = /* @__PURE__ */ Lt(S), Mo = /* @__PURE__ */ Vt(S), w = /* @__PURE__ */ a("ZodType", (e, t) => (_.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(M(t, {
2054
- checks: [
2055
- ...t.checks ?? [],
2056
- ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2057
- ]
2058
- })), e.clone = (n, r) => R(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) => Ao(e, n, r), e.parseAsync = async (n, r) => xo(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => To(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Oo(e, n, r), e.decode = (n, r) => Co(e, n, r), e.encodeAsync = async (n, r) => No(e, n, r), e.decodeAsync = async (n, r) => Do(e, n, r), e.safeEncode = (n, r) => Po(e, n, r), e.safeDecode = (n, r) => Ro(e, n, r), e.safeEncodeAsync = async (n, r) => jo(e, n, r), e.safeDecodeAsync = async (n, r) => Mo(e, n, r), e.refine = (n, r) => e.check(Oi(n, r)), e.superRefine = (n) => e.check(Ci(n)), e.overwrite = (n) => e.check(K(n)), e.optional = () => Fe(e), e.nullable = () => Ue(e), e.nullish = () => Fe(Ue(e)), e.nonoptional = (n) => Zi(e, n), e.array = () => D(e), e.or = (n) => z([e, n]), e.and = (n) => hi(e, n), e.transform = (n) => Le(e, bi(n)), e.default = (n) => ki(e, n), e.prefault = (n) => yi(e, n), e.catch = (n) => Ii(e, n), e.pipe = (n) => Le(e, n), e.readonly = () => Ai(e), e.describe = (n) => {
2059
- const r = e.clone();
2060
- return Y.add(r, { description: n }), r;
2061
- }, Object.defineProperty(e, "description", {
2062
- get() {
2063
- return Y.get(e)?.description;
2064
- },
2065
- configurable: !0
2066
- }), e.meta = (...n) => {
2067
- if (n.length === 0)
2068
- return Y.get(e);
2069
- const r = e.clone();
2070
- return Y.add(r, n[0]), r;
2071
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), lt = /* @__PURE__ */ a("_ZodString", (e, t) => {
2072
- be.init(e, t), w.init(e, t);
2073
- const n = e._zod.bag;
2074
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(oo(...r)), e.includes = (...r) => e.check(so(...r)), e.startsWith = (...r) => e.check(ao(...r)), e.endsWith = (...r) => e.check(uo(...r)), e.min = (...r) => e.check(te(...r)), e.max = (...r) => e.check(at(...r)), e.length = (...r) => e.check(ut(...r)), e.nonempty = (...r) => e.check(te(1, ...r)), e.lowercase = (r) => e.check(io(r)), e.uppercase = (r) => e.check(co(r)), e.trim = () => e.check(po()), e.normalize = (...r) => e.check(lo(...r)), e.toLowerCase = () => e.check(fo()), e.toUpperCase = () => e.check(ho());
2075
- }), Fo = /* @__PURE__ */ a("ZodString", (e, t) => {
2076
- be.init(e, t), lt.init(e, t), e.email = (n) => e.check(Sr(Uo, n)), e.url = (n) => e.check(Cr(Lo, n)), e.jwt = (n) => e.check(Kr(ri, n)), e.emoji = (n) => e.check(Nr(Vo, n)), e.guid = (n) => e.check(Ce(Re, n)), e.uuid = (n) => e.check(xr(q, n)), e.uuidv4 = (n) => e.check(Ar(q, n)), e.uuidv6 = (n) => e.check(Tr(q, n)), e.uuidv7 = (n) => e.check(Or(q, n)), e.nanoid = (n) => e.check(Dr(Go, n)), e.guid = (n) => e.check(Ce(Re, n)), e.cuid = (n) => e.check(Pr(Bo, n)), e.cuid2 = (n) => e.check(Rr(Wo, n)), e.ulid = (n) => e.check(jr(Jo, n)), e.base64 = (n) => e.check(Br(ei, n)), e.base64url = (n) => e.check(Wr(ti, n)), e.xid = (n) => e.check(Mr(Ko, n)), e.ksuid = (n) => e.check(Fr(Xo, n)), e.ipv4 = (n) => e.check(Ur(Ho, n)), e.ipv6 = (n) => e.check(Lr(Yo, n)), e.cidrv4 = (n) => e.check(Vr(qo, n)), e.cidrv6 = (n) => e.check(Gr(Qo, n)), e.e164 = (n) => e.check(Jr(ni, n)), e.datetime = (n) => e.check(wo(n)), e.date = (n) => e.check(ko(n)), e.time = (n) => e.check(yo(n)), e.duration = (n) => e.check(Eo(n));
2077
- });
2078
- function p(e) {
2079
- return Ir(Fo, e);
2080
- }
2081
- const v = /* @__PURE__ */ a("ZodStringFormat", (e, t) => {
2082
- g.init(e, t), lt.init(e, t);
2083
- }), Uo = /* @__PURE__ */ a("ZodEmail", (e, t) => {
2084
- Nn.init(e, t), v.init(e, t);
2085
- }), Re = /* @__PURE__ */ a("ZodGUID", (e, t) => {
2086
- On.init(e, t), v.init(e, t);
2087
- }), q = /* @__PURE__ */ a("ZodUUID", (e, t) => {
2088
- Cn.init(e, t), v.init(e, t);
2089
- }), Lo = /* @__PURE__ */ a("ZodURL", (e, t) => {
2090
- Dn.init(e, t), v.init(e, t);
2091
- }), Vo = /* @__PURE__ */ a("ZodEmoji", (e, t) => {
2092
- Pn.init(e, t), v.init(e, t);
2093
- }), Go = /* @__PURE__ */ a("ZodNanoID", (e, t) => {
2094
- Rn.init(e, t), v.init(e, t);
2095
- }), Bo = /* @__PURE__ */ a("ZodCUID", (e, t) => {
2096
- jn.init(e, t), v.init(e, t);
2097
- }), Wo = /* @__PURE__ */ a("ZodCUID2", (e, t) => {
2098
- Mn.init(e, t), v.init(e, t);
2099
- }), Jo = /* @__PURE__ */ a("ZodULID", (e, t) => {
2100
- Fn.init(e, t), v.init(e, t);
2101
- }), Ko = /* @__PURE__ */ a("ZodXID", (e, t) => {
2102
- Un.init(e, t), v.init(e, t);
2103
- }), Xo = /* @__PURE__ */ a("ZodKSUID", (e, t) => {
2104
- Ln.init(e, t), v.init(e, t);
2105
- }), Ho = /* @__PURE__ */ a("ZodIPv4", (e, t) => {
2106
- Jn.init(e, t), v.init(e, t);
2107
- }), Yo = /* @__PURE__ */ a("ZodIPv6", (e, t) => {
2108
- Kn.init(e, t), v.init(e, t);
2109
- }), qo = /* @__PURE__ */ a("ZodCIDRv4", (e, t) => {
2110
- Xn.init(e, t), v.init(e, t);
2111
- }), Qo = /* @__PURE__ */ a("ZodCIDRv6", (e, t) => {
2112
- Hn.init(e, t), v.init(e, t);
2113
- }), ei = /* @__PURE__ */ a("ZodBase64", (e, t) => {
2114
- Yn.init(e, t), v.init(e, t);
2115
- }), ti = /* @__PURE__ */ a("ZodBase64URL", (e, t) => {
2116
- Qn.init(e, t), v.init(e, t);
2117
- }), ni = /* @__PURE__ */ a("ZodE164", (e, t) => {
2118
- er.init(e, t), v.init(e, t);
2119
- }), ri = /* @__PURE__ */ a("ZodJWT", (e, t) => {
2120
- nr.init(e, t), v.init(e, t);
2121
- }), dt = /* @__PURE__ */ a("ZodNumber", (e, t) => {
2122
- it.init(e, t), w.init(e, t), e.gt = (r, o) => e.check(De(r, o)), e.gte = (r, o) => e.check(ue(r, o)), e.min = (r, o) => e.check(ue(r, o)), e.lt = (r, o) => e.check(Ne(r, o)), e.lte = (r, o) => e.check(ae(r, o)), e.max = (r, o) => e.check(ae(r, o)), e.int = (r) => e.check(je(r)), e.safe = (r) => e.check(je(r)), e.positive = (r) => e.check(De(0, r)), e.nonnegative = (r) => e.check(ue(0, r)), e.negative = (r) => e.check(Ne(0, r)), e.nonpositive = (r) => e.check(ae(0, r)), e.multipleOf = (r, o) => e.check(Pe(r, o)), e.step = (r, o) => e.check(Pe(r, o)), e.finite = () => e;
2123
- const n = e._zod.bag;
2124
- e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2125
- });
2126
- function O(e) {
2127
- return Qr(dt, e);
2128
- }
2129
- const oi = /* @__PURE__ */ a("ZodNumberFormat", (e, t) => {
2130
- rr.init(e, t), dt.init(e, t);
2131
- });
2132
- function je(e) {
2133
- return eo(oi, e);
2134
- }
2135
- const ii = /* @__PURE__ */ a("ZodBoolean", (e, t) => {
2136
- or.init(e, t), w.init(e, t);
2137
- });
2138
- function ci(e) {
2139
- return to(ii, e);
2140
- }
2141
- const si = /* @__PURE__ */ a("ZodUnknown", (e, t) => {
2142
- ir.init(e, t), w.init(e, t);
2143
- });
2144
- function Me() {
2145
- return no(si);
2146
- }
2147
- const ai = /* @__PURE__ */ a("ZodNever", (e, t) => {
2148
- cr.init(e, t), w.init(e, t);
2149
- });
2150
- function ui(e) {
2151
- return ro(ai, e);
2152
- }
2153
- const li = /* @__PURE__ */ a("ZodArray", (e, t) => {
2154
- sr.init(e, t), w.init(e, t), e.element = t.element, e.min = (n, r) => e.check(te(n, r)), e.nonempty = (n) => e.check(te(1, n)), e.max = (n, r) => e.check(at(n, r)), e.length = (n, r) => e.check(ut(n, r)), e.unwrap = () => e.element;
2155
- });
2156
- function D(e, t) {
2157
- return mo(li, e, t);
2158
- }
2159
- const di = /* @__PURE__ */ a("ZodObject", (e, t) => {
2160
- ur.init(e, t), w.init(e, t), m(e, "shape", () => t.shape), e.keyof = () => gi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Me() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Me() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ui() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => It(e, n), e.safeExtend = (n) => St(e, n), e.merge = (n) => xt(e, n), e.pick = (n) => Zt(e, n), e.omit = (n) => Et(e, n), e.partial = (...n) => At(pt, e, n[0]), e.required = (...n) => Tt(ft, e, n[0]);
2161
- });
2162
- function A(e, t) {
2163
- const n = {
2164
- type: "object",
2165
- shape: e ?? {},
2166
- ...f(t)
2167
- };
2168
- return new di(n);
2169
- }
2170
- const pi = /* @__PURE__ */ a("ZodUnion", (e, t) => {
2171
- lr.init(e, t), w.init(e, t), e.options = t.options;
2172
- });
2173
- function z(e, t) {
2174
- return new pi({
2175
- type: "union",
2176
- options: e,
2177
- ...f(t)
2178
- });
2179
- }
2180
- const fi = /* @__PURE__ */ a("ZodIntersection", (e, t) => {
2181
- dr.init(e, t), w.init(e, t);
2182
- });
2183
- function hi(e, t) {
2184
- return new fi({
2185
- type: "intersection",
2186
- left: e,
2187
- right: t
2188
- });
2189
- }
2190
- const mi = /* @__PURE__ */ a("ZodRecord", (e, t) => {
2191
- pr.init(e, t), w.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
2192
- });
2193
- function E(e, t, n) {
2194
- return new mi({
2195
- type: "record",
2196
- keyType: e,
2197
- valueType: t,
2198
- ...f(n)
2199
- });
2200
- }
2201
- const pe = /* @__PURE__ */ a("ZodEnum", (e, t) => {
2202
- fr.init(e, t), w.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2203
- const n = new Set(Object.keys(t.entries));
2204
- e.extract = (r, o) => {
2205
- const i = {};
2206
- for (const c of r)
2207
- if (n.has(c))
2208
- i[c] = t.entries[c];
2209
- else
2210
- throw new Error(`Key ${c} not found in enum`);
2211
- return new pe({
2212
- ...t,
2213
- checks: [],
2214
- ...f(o),
2215
- entries: i
2216
- });
2217
- }, e.exclude = (r, o) => {
2218
- const i = { ...t.entries };
2219
- for (const c of r)
2220
- if (n.has(c))
2221
- delete i[c];
2222
- else
2223
- throw new Error(`Key ${c} not found in enum`);
2224
- return new pe({
2225
- ...t,
2226
- checks: [],
2227
- ...f(o),
2228
- entries: i
2229
- });
2230
- };
2231
- });
2232
- function gi(e, t) {
2233
- const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2234
- return new pe({
2235
- type: "enum",
2236
- entries: n,
2237
- ...f(t)
2238
- });
2239
- }
2240
- const _i = /* @__PURE__ */ a("ZodLiteral", (e, t) => {
2241
- hr.init(e, t), w.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
2242
- get() {
2243
- if (t.values.length > 1)
2244
- throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
2245
- return t.values[0];
2246
- }
2247
- });
2248
- });
2249
- function s(e, t) {
2250
- return new _i({
2251
- type: "literal",
2252
- values: Array.isArray(e) ? e : [e],
2253
- ...f(t)
2254
- });
2255
- }
2256
- const vi = /* @__PURE__ */ a("ZodTransform", (e, t) => {
2257
- mr.init(e, t), w.init(e, t), e._zod.parse = (n, r) => {
2258
- if (r.direction === "backward")
2259
- throw new Be(e.constructor.name);
2260
- n.addIssue = (i) => {
2261
- if (typeof i == "string")
2262
- n.issues.push(J(i, n.value, t));
2263
- else {
2264
- const c = i;
2265
- c.fatal && (c.continue = !1), c.code ?? (c.code = "custom"), c.input ?? (c.input = n.value), c.inst ?? (c.inst = e), n.issues.push(J(c));
2266
- }
2267
- };
2268
- const o = t.transform(n.value, n);
2269
- return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2270
- };
2271
- });
2272
- function bi(e) {
2273
- return new vi({
2274
- type: "transform",
2275
- transform: e
2276
- });
2277
- }
2278
- const pt = /* @__PURE__ */ a("ZodOptional", (e, t) => {
2279
- gr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
2280
- });
2281
- function Fe(e) {
2282
- return new pt({
2283
- type: "optional",
2284
- innerType: e
2285
- });
2286
- }
2287
- const wi = /* @__PURE__ */ a("ZodNullable", (e, t) => {
2288
- _r.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
2289
- });
2290
- function Ue(e) {
2291
- return new wi({
2292
- type: "nullable",
2293
- innerType: e
2294
- });
2295
- }
2296
- const zi = /* @__PURE__ */ a("ZodDefault", (e, t) => {
2297
- vr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2298
- });
2299
- function ki(e, t) {
2300
- return new zi({
2301
- type: "default",
2302
- innerType: e,
2303
- get defaultValue() {
2304
- return typeof t == "function" ? t() : Ke(t);
2305
- }
2306
- });
2307
- }
2308
- const $i = /* @__PURE__ */ a("ZodPrefault", (e, t) => {
2309
- br.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
2310
- });
2311
- function yi(e, t) {
2312
- return new $i({
2313
- type: "prefault",
2314
- innerType: e,
2315
- get defaultValue() {
2316
- return typeof t == "function" ? t() : Ke(t);
2317
- }
2318
- });
2319
- }
2320
- const ft = /* @__PURE__ */ a("ZodNonOptional", (e, t) => {
2321
- wr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
2322
- });
2323
- function Zi(e, t) {
2324
- return new ft({
2325
- type: "nonoptional",
2326
- innerType: e,
2327
- ...f(t)
2328
- });
2329
- }
2330
- const Ei = /* @__PURE__ */ a("ZodCatch", (e, t) => {
2331
- zr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2332
- });
2333
- function Ii(e, t) {
2334
- return new Ei({
2335
- type: "catch",
2336
- innerType: e,
2337
- catchValue: typeof t == "function" ? t : () => t
2338
- });
2339
- }
2340
- const Si = /* @__PURE__ */ a("ZodPipe", (e, t) => {
2341
- kr.init(e, t), w.init(e, t), e.in = t.in, e.out = t.out;
2342
- });
2343
- function Le(e, t) {
2344
- return new Si({
2345
- type: "pipe",
2346
- in: e,
2347
- out: t
2348
- // ...util.normalizeParams(params),
2349
- });
2350
- }
2351
- const xi = /* @__PURE__ */ a("ZodReadonly", (e, t) => {
2352
- $r.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
2353
- });
2354
- function Ai(e) {
2355
- return new xi({
2356
- type: "readonly",
2357
- innerType: e
2358
- });
2359
- }
2360
- const Ti = /* @__PURE__ */ a("ZodCustom", (e, t) => {
2361
- yr.init(e, t), w.init(e, t);
2362
- });
2363
- function Oi(e, t = {}) {
2364
- return go(Ti, e, t);
2365
- }
2366
- function Ci(e) {
2367
- return _o(e);
2368
- }
2369
- const Ni = z([s("amber"), s("green"), s("red"), s("other")]), Di = z([
2370
- s("alpha"),
2371
- s("beta"),
2372
- s("generalAvailability"),
2373
- s("notApplicable"),
2374
- s("preAlpha"),
2375
- s("proposed"),
2376
- s("releaseCandidate"),
2377
- s("unavailable"),
2378
- s("underReview")
2379
- ]), Pi = z([
2380
- s("app"),
2381
- s("connector"),
2382
- s("connectorConnection"),
2383
- s("context"),
2384
- s("contextModelGroup"),
2385
- s("contextModel"),
2386
- s("contextModelDimensionGroup"),
2387
- s("contextModelDimension"),
2388
- s("contextModelDimensionHierarchy"),
2389
- s("contextModelEntityGroup"),
2390
- s("contextModelEntity"),
2391
- s("contextModelEntityDataItem"),
2392
- s("contextModelEntityEvent"),
2393
- s("contextModelEntityPrimaryMeasure"),
2394
- s("contextModelSecondaryMeasureGroup"),
2395
- s("contextModelSecondaryMeasure"),
2396
- s("dataView"),
2397
- s("dimension"),
2398
- s("engine"),
2399
- s("eventQuery"),
2400
- s("presenter"),
2401
- s("presenterPresentation"),
2402
- s("tool")
2403
- ]), Ri = z([s("en-au"), s("en-gb"), s("en-us"), s("es-es")]), ji = E(Ri, p()), Mi = A({
2404
- id: p(),
2405
- color: Ni,
2406
- label: p()
2407
- }), Fi = A({
2408
- id: p(),
2409
- label: E(p(), p()),
2410
- description: E(p(), p()),
2411
- firstCreatedAt: O().optional(),
2412
- icon: p().optional(),
2413
- iconDark: p().optional(),
2414
- lastUpdatedAt: O().optional(),
2415
- status: Mi.nullable().optional(),
2416
- statusId: Di,
2417
- typeId: Pi
2418
- }), Ui = z([s("app"), s("engine"), s("connector"), s("context"), s("presenter"), s("tool")]), Li = A({
2419
- id: p(),
2420
- label: p()
2421
- }), Vi = A({
2422
- activeConnectionCount: O().optional(),
2423
- canDescribe: ci().optional(),
2424
- id: p().optional(),
2425
- authMethodId: z([s("apiKey"), s("disabled"), s("oAuth2"), s("none")]),
2426
- label: ji.optional(),
2427
- maxConnectionCount: O().optional(),
2428
- params: D(E(p(), p())).optional()
2429
- }), Gi = z([s("application"), s("curatedDataset"), s("database"), s("fileStore")]), Bi = z([
2430
- s("abortOperation"),
2431
- s("authenticateConnection"),
2432
- s("createObject"),
2433
- s("describeConnection"),
2434
- s("dropObject"),
2435
- s("findObject"),
2436
- s("getRecord"),
2437
- s("listNodes"),
2438
- s("previewObject"),
2439
- s("removeRecords"),
2440
- s("retrieveRecords"),
2441
- s("upsertRecords")
2442
- ]), Wi = z([s("bidirectional"), s("destination"), s("source"), s("unknown")]), Ji = Fi.extend({
2443
- typeId: Ui,
2444
- version: p()
2445
- }), bc = Ji.extend({
2446
- category: Li.optional(),
2447
- categoryId: Gi,
2448
- implementations: E(p(), Vi),
2449
- operations: D(Bi),
2450
- typeId: s("connector"),
2451
- usageId: Wi,
2452
- vendorAccountURL: p().nullable().optional(),
2453
- vendorDocumentationURL: p().nullable().optional(),
2454
- vendorHomeURL: p().nullable().optional()
2455
- }), Ki = z([s("amber"), s("green"), s("red"), s("other")]), Xi = z([
2456
- s("alpha"),
2457
- s("beta"),
2458
- s("generalAvailability"),
2459
- s("notApplicable"),
2460
- s("preAlpha"),
2461
- s("proposed"),
2462
- s("releaseCandidate"),
2463
- s("unavailable"),
2464
- s("underReview")
2465
- ]), Hi = z([
2466
- s("app"),
2467
- s("connector"),
2468
- s("connectorConnection"),
2469
- s("context"),
2470
- s("contextModelGroup"),
2471
- s("contextModel"),
2472
- s("contextModelDimensionGroup"),
2473
- s("contextModelDimension"),
2474
- s("contextModelDimensionHierarchy"),
2475
- s("contextModelEntityGroup"),
2476
- s("contextModelEntity"),
2477
- s("contextModelEntityDataItem"),
2478
- s("contextModelEntityEvent"),
2479
- s("contextModelEntityPrimaryMeasure"),
2480
- s("contextModelSecondaryMeasureGroup"),
2481
- s("contextModelSecondaryMeasure"),
2482
- s("dataView"),
2483
- s("dimension"),
2484
- s("engine"),
2485
- s("eventQuery"),
2486
- s("presenter"),
2487
- s("presenterPresentation"),
2488
- s("tool")
2489
- ]), Ve = O(), Yi = A({
2490
- id: p(),
2491
- color: Ki,
2492
- label: p()
2493
- }), qi = A({
2494
- id: p(),
2495
- label: E(p(), p()),
2496
- description: E(p(), p()),
2497
- icon: p().optional(),
2498
- iconDark: p().optional(),
2499
- order: O(),
2500
- path: p()
2501
- }), ht = A({
2502
- id: p(),
2503
- label: E(p(), p()),
2504
- description: E(p(), p()),
2505
- firstCreatedAt: Ve.optional(),
2506
- icon: p().optional(),
2507
- iconDark: p().optional(),
2508
- lastUpdatedAt: Ve.optional(),
2509
- status: Yi.optional(),
2510
- statusId: Xi,
2511
- typeId: Hi
2512
- }), Qi = z([s("app"), s("engine"), s("connector"), s("context"), s("presenter"), s("tool")]), ec = ht.extend({
2513
- typeId: Qi,
2514
- version: p()
2515
- }), tc = ht.extend({
2516
- modelRefs: D(qi),
2517
- order: O()
2518
- }), nc = s("list"), wc = ec.extend({
2519
- models: D(tc),
2520
- operations: D(nc),
2521
- typeId: s("context")
2522
- }), rc = z([s("amber"), s("green"), s("red"), s("other")]), oc = z([s("alpha"), s("beta"), s("generalAvailability"), s("notApplicable"), s("preAlpha"), s("proposed"), s("releaseCandidate"), s("unavailable"), s("underReview")]), ic = z([s("app"), s("connector"), s("connectorConnection"), s("context"), s("contextModelGroup"), s("contextModel"), s("contextModelDimensionGroup"), s("contextModelDimension"), s("contextModelDimensionHierarchy"), s("contextModelEntityGroup"), s("contextModelEntity"), s("contextModelEntityDataItem"), s("contextModelEntityEvent"), s("contextModelEntityPrimaryMeasure"), s("contextModelSecondaryMeasureGroup"), s("contextModelSecondaryMeasure"), s("dataView"), s("dimension"), s("engine"), s("eventQuery"), s("presenter"), s("presenterPresentation"), s("tool")]), Ge = O(), cc = A({
2523
- id: p(),
2524
- color: rc,
2525
- label: p()
2526
- }), sc = A({
2527
- id: p(),
2528
- label: E(p(), p()),
2529
- description: E(p(), p()),
2530
- icon: p().optional(),
2531
- iconDark: p().optional(),
2532
- order: O(),
2533
- path: p()
2534
- }), ac = A({
2535
- id: p(),
2536
- label: E(p(), p()),
2537
- description: E(p(), p()),
2538
- firstCreatedAt: Ge.optional(),
2539
- icon: p().optional(),
2540
- iconDark: p().optional(),
2541
- lastUpdatedAt: Ge.optional(),
2542
- status: cc.optional(),
2543
- statusId: oc,
2544
- typeId: ic
2545
- }), uc = z([s("app"), s("engine"), s("connector"), s("context"), s("presenter"), s("tool")]), lc = ac.extend({
2546
- typeId: uc,
2547
- version: p()
2548
- }), dc = z([s("list"), s("render"), s("setColorMode")]), zc = lc.extend({
2549
- presentations: D(sc),
2550
- operations: D(dc),
2551
- typeId: s("presenter")
2552
- });
2553
- function kc() {
2554
- function e(t, n, r) {
1
+ const x = ["createObject", "dropObject", "removeRecords", "upsertRecords"], N = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
+ function w() {
3
+ function e(n, t, r) {
2555
4
  r.textContent = "Cytoscape.js diagram goes here...";
2556
5
  }
2557
6
  return { render: e };
2558
7
  }
2559
- function $c() {
2560
- function e(t, n) {
2561
- console.log(1111, t), console.log(2222, n), console.log(3333, n.childNodes), console.log(4444, n.children);
8
+ function S() {
9
+ function e(n, t) {
10
+ console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
2562
11
  }
2563
12
  return { render: e };
2564
13
  }
2565
- const yc = 0, Zc = (e) => e, Ec = () => Date.now();
2566
- class we extends Error {
14
+ const T = 0, y = (e) => e, D = () => Date.now();
15
+ class u extends Error {
2567
16
  locator;
2568
- constructor(t, n, r) {
2569
- super(t, r), this.name = "DataPosError", this.locator = n, Error.captureStackTrace?.(this, new.target);
17
+ constructor(n, t, r) {
18
+ super(n, r), this.name = "DataPosError", this.locator = t, Error.captureStackTrace?.(this, new.target);
2570
19
  }
2571
20
  }
2572
- class B extends we {
2573
- constructor(t, n, r) {
2574
- super(t, n, r), this.name = "ApplicationError";
21
+ class l extends u {
22
+ constructor(n, t, r) {
23
+ super(n, t, r), this.name = "ApplicationError";
2575
24
  }
2576
25
  }
2577
- class Ic extends B {
2578
- constructor(t, n, r) {
2579
- super(t, n, r), this.name = "APIError";
26
+ class v extends l {
27
+ constructor(n, t, r) {
28
+ super(n, t, r), this.name = "APIError";
2580
29
  }
2581
30
  }
2582
- class Sc extends B {
2583
- constructor(t, n, r) {
2584
- super(t, n, r), this.name = "EngineError";
31
+ class O extends l {
32
+ constructor(n, t, r) {
33
+ super(n, t, r), this.name = "EngineError";
2585
34
  }
2586
35
  }
2587
- class mt extends B {
36
+ class m extends l {
2588
37
  body;
2589
- constructor(t, n, r, o) {
2590
- super(t, n, o), this.name = "FetchError", this.body = r;
38
+ constructor(n, t, r, o) {
39
+ super(n, t, o), this.name = "FetchError", this.body = r;
2591
40
  }
2592
41
  }
2593
- class pc extends B {
42
+ class g extends l {
2594
43
  componentName;
2595
44
  info;
2596
- constructor(t, n, r, o, i) {
2597
- super(t, n, i), this.name = "VueHandledError", this.info = r, this.componentName = o;
45
+ constructor(n, t, r, o, s) {
46
+ super(n, t, s), this.name = "VueHandledError", this.info = r, this.componentName = o;
2598
47
  }
2599
48
  }
2600
- class xc extends B {
2601
- constructor(t, n, r) {
2602
- super(t, n, r), this.name = "WindowHandledRuntimeError";
49
+ class $ extends l {
50
+ constructor(n, t, r) {
51
+ super(n, t, r), this.name = "WindowHandledRuntimeError";
2603
52
  }
2604
53
  }
2605
- class Ac extends B {
2606
- constructor(t, n, r) {
2607
- super(t, n, r), this.name = "WindowHandledPromiseRejectionError";
54
+ class I extends l {
55
+ constructor(n, t, r) {
56
+ super(n, t, r), this.name = "WindowHandledPromiseRejectionError";
2608
57
  }
2609
58
  }
2610
- class Tc extends we {
2611
- constructor(t, n, r) {
2612
- super(t, n, r), this.name = "OperationalError";
59
+ class A extends u {
60
+ constructor(n, t, r) {
61
+ super(n, t, r), this.name = "OperationalError";
2613
62
  }
2614
63
  }
2615
- async function Oc(e, t, n) {
2616
- const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
2617
- return new mt(r, n, o);
64
+ async function C(e, n, t) {
65
+ const r = `${n} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
66
+ return new m(r, t, o);
2618
67
  }
2619
- function Cc(e) {
2620
- return e.map((t) => t.message).join(" ");
68
+ function F(e) {
69
+ return e.map((n) => n.message).join(" ");
2621
70
  }
2622
- function Nc(e, t = "Unknown error.") {
71
+ function R(e, n = "Unknown error.") {
2623
72
  if (e instanceof Error) return e;
2624
73
  if (typeof e == "string") return new Error(e);
2625
74
  try {
2626
- return new Error(JSON.stringify(e ?? t));
75
+ return new Error(JSON.stringify(e ?? n));
2627
76
  } catch {
2628
- return new Error(t);
77
+ return new Error(n);
2629
78
  }
2630
79
  }
2631
- function Dc(e) {
2632
- const t = /* @__PURE__ */ new Set(), n = [];
80
+ function k(e) {
81
+ const n = /* @__PURE__ */ new Set(), t = [];
2633
82
  let r = e;
2634
- for (; r && !t.has(r); ) {
2635
- t.add(r);
83
+ for (; r && !n.has(r); ) {
84
+ n.add(r);
2636
85
  let o;
2637
- if (r instanceof mt)
86
+ if (r instanceof m)
2638
87
  o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
2639
- else if (r instanceof pc)
88
+ else if (r instanceof g)
2640
89
  o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
2641
- else if (r instanceof we)
90
+ else if (r instanceof u)
2642
91
  o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
2643
92
  else if (r instanceof Error) {
2644
- const i = r;
2645
- o = { locator: "", message: i.message, name: i.name, stack: i.stack }, r = i.cause;
93
+ const s = r;
94
+ o = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
2646
95
  } else r ? (o = { locator: "", message: String(r), name: "Error" }, r = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
2647
- /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), n.push(o);
96
+ /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), t.push(o);
2648
97
  }
2649
- return n;
98
+ return t;
2650
99
  }
2651
- const gt = "en-US", ne = {}, Pc = (e) => {
100
+ const f = "en-US", c = {}, B = (e) => {
2652
101
  switch (e) {
2653
102
  case "Edm.Binary":
2654
103
  return "unknown";
@@ -2687,41 +136,41 @@ const gt = "en-US", ne = {}, Pc = (e) => {
2687
136
  default:
2688
137
  return "unknown";
2689
138
  }
2690
- }, Rc = (e) => {
139
+ }, M = (e) => {
2691
140
  if (e) {
2692
- const t = e.lastIndexOf("/"), n = e.lastIndexOf(".", t > -1 ? t : e.length);
2693
- return n > -1 ? e.substring(0, n) : e;
141
+ const n = e.lastIndexOf("/"), t = e.lastIndexOf(".", n > -1 ? n : e.length);
142
+ return t > -1 ? e.substring(0, t) : e;
2694
143
  }
2695
- }, jc = (e) => {
144
+ }, j = (e) => {
2696
145
  if (e) {
2697
- const t = e.lastIndexOf(".");
2698
- if (t > -1) return e.substring(t + 1);
146
+ const n = e.lastIndexOf(".");
147
+ if (n > -1) return e.substring(n + 1);
2699
148
  }
2700
- }, I = (e, t = 2, n = t, r = gt) => {
149
+ }, a = (e, n = 2, t = n, r = f) => {
2701
150
  if (e == null) return "";
2702
- const o = `${r}decimal${t}.${n}`;
2703
- let i = ne[o];
2704
- return i || (i = new Intl.NumberFormat(r, {
151
+ const o = `${r}decimal${n}.${t}`;
152
+ let s = c[o];
153
+ return s || (s = new Intl.NumberFormat(r, {
2705
154
  localeMatcher: "best fit",
2706
- maximumFractionDigits: t,
2707
- minimumFractionDigits: n,
155
+ maximumFractionDigits: n,
156
+ minimumFractionDigits: t,
2708
157
  minimumIntegerDigits: 1,
2709
158
  style: "decimal",
2710
159
  useGrouping: !0
2711
- }), ne[o] = i), i.format(e);
2712
- }, Mc = (e) => e == null ? "" : e < 1e3 ? re(e) : e < 1e6 ? `${I(e / 1e3, 2, 0)}K` : e < 1e9 ? `${I(e / 1e6, 2, 0)}M` : e < 1e12 ? `${I(e / 1e9, 2, 0)}B` : `${I(e / 1e12, 2, 0)}T`, Fc = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${re(e)} bytes` : e < 1048576 ? `${I(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${I(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${I(e / 1073741824, 2, 0)} GB` : `${I(e / 1099511627776, 2, 0)} TB`, Uc = (e) => e == null ? "" : e < 1e3 ? `${re(e)} ms` : e === 1e3 ? `${re(e)} sec` : e < 6e4 ? `${I(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${I(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${I(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${I(e / 864e5, 2, 0)} days`, re = (e, t = gt) => {
160
+ }), c[o] = s), s.format(e);
161
+ }, U = (e) => e == null ? "" : e < 1e3 ? d(e) : e < 1e6 ? `${a(e / 1e3, 2, 0)}K` : e < 1e9 ? `${a(e / 1e6, 2, 0)}M` : e < 1e12 ? `${a(e / 1e9, 2, 0)}B` : `${a(e / 1e12, 2, 0)}T`, L = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${d(e)} bytes` : e < 1048576 ? `${a(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${a(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${a(e / 1073741824, 2, 0)} GB` : `${a(e / 1099511627776, 2, 0)} TB`, _ = (e) => e == null ? "" : e < 1e3 ? `${d(e)} ms` : e === 1e3 ? `${d(e)} sec` : e < 6e4 ? `${a(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${a(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${a(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${a(e / 864e5, 2, 0)} days`, d = (e, n = f) => {
2713
162
  if (e == null) return "";
2714
- const n = `${t}decimal0.0`;
2715
- let r = ne[n];
2716
- return r || (r = new Intl.NumberFormat(t, {
163
+ const t = `${n}decimal0.0`;
164
+ let r = c[t];
165
+ return r || (r = new Intl.NumberFormat(n, {
2717
166
  localeMatcher: "best fit",
2718
167
  maximumFractionDigits: 0,
2719
168
  minimumFractionDigits: 0,
2720
169
  minimumIntegerDigits: 1,
2721
170
  style: "decimal",
2722
171
  useGrouping: !0
2723
- }), ne[n] = r), r.format(e);
2724
- }, Lc = (e) => {
172
+ }), c[t] = r), r.format(e);
173
+ }, W = (e) => {
2725
174
  switch (e) {
2726
175
  case "csv":
2727
176
  return "text/csv";
@@ -2735,7 +184,7 @@ const gt = "en-US", ne = {}, Pc = (e) => {
2735
184
  default:
2736
185
  return "application/octet-stream";
2737
186
  }
2738
- }, fc = [
187
+ }, b = [
2739
188
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
2740
189
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
2741
190
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -2743,22 +192,22 @@ const gt = "en-US", ne = {}, Pc = (e) => {
2743
192
  { id: "xls", label: { "en-gb": "XLS" } },
2744
193
  { id: "xlsx", label: { "en-gb": "XLSX" } },
2745
194
  { id: "xml", label: { "en-gb": "XML" } }
2746
- ], Vc = (e = P) => {
2747
- const t = [];
2748
- for (const n of fc) t.push({ ...n, label: n.label[e] || n.label[P] || n.id });
2749
- return t;
2750
- }, hc = [
195
+ ], G = (e = i) => {
196
+ const n = [];
197
+ for (const t of b) n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
198
+ return n;
199
+ }, p = [
2751
200
  { id: `
2752
201
  `, label: { "en-gb": "Newline" } },
2753
202
  { id: "\r", label: { "en-gb": "Carriage Return" } },
2754
203
  { id: `\r
2755
204
  `, label: { "en-gb": "Carriage Return/Newline" } }
2756
- ], Gc = (e = P) => {
2757
- const t = [];
2758
- for (const n of hc)
2759
- t.push({ ...n, label: n.label[e] || n.label[P] || n.id });
2760
- return t;
2761
- }, mc = [
205
+ ], V = (e = i) => {
206
+ const n = [];
207
+ for (const t of p)
208
+ n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
209
+ return n;
210
+ }, E = [
2762
211
  { id: ":", label: { "en-gb": "Colon" } },
2763
212
  { id: ",", label: { "en-gb": "Comma" } },
2764
213
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -2770,12 +219,12 @@ const gt = "en-US", ne = {}, Pc = (e) => {
2770
219
  { id: "_", label: { "en-gb": "Underscore" } },
2771
220
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
2772
221
  { id: "|", label: { "en-gb": "Vertical Bar" } }
2773
- ], Bc = (e = P) => {
2774
- const t = [];
2775
- for (const n of mc)
2776
- t.push({ ...n, label: n.label[e] || n.label[P] || n.id });
2777
- return t;
2778
- }, gc = [
222
+ ], X = (e = i) => {
223
+ const n = [];
224
+ for (const t of E)
225
+ n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
226
+ return n;
227
+ }, h = [
2779
228
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
2780
229
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
2781
230
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -2785,45 +234,42 @@ const gt = "en-US", ne = {}, Pc = (e) => {
2785
234
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
2786
235
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
2787
236
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
2788
- ], Wc = (e, t = P) => {
2789
- const n = gc.find((r) => r.id === e);
2790
- return n ? { ...n, label: n.label[t] || n.label[P] || e } : { id: e, color: "other", label: e };
2791
- }, P = "en-gb";
237
+ ], z = (e, n = i) => {
238
+ const t = h.find((r) => r.id === e);
239
+ return t ? { ...t, label: t.label[n] || t.label[i] || e } : { id: e, color: "other", label: e };
240
+ }, i = "en-gb";
2792
241
  export {
2793
- Ic as APIError,
2794
- B as ApplicationError,
2795
- _c as CONNECTOR_DESTINATION_OPERATIONS,
2796
- vc as CONNECTOR_SOURCE_OPERATIONS,
2797
- P as DEFAULT_LOCALE_CODE,
2798
- yc as DefaultTimestamp,
2799
- Sc as EngineError,
2800
- mt as FetchError,
2801
- Tc as OperationalError,
2802
- pc as VueError,
2803
- Ac as WindowPromiseRejectionError,
2804
- xc as WindowRuntimeError,
2805
- Oc as buildFetchError,
2806
- Cc as concatenateSerialisedErrorMessages,
2807
- bc as connectorConfigSchema,
2808
- wc as contextConfigSchema,
2809
- Zc as convertMillisecondsToTimestamp,
2810
- Pc as convertODataTypeIdToUsageTypeId,
2811
- jc as extractExtensionFromPath,
2812
- Rc as extractNameFromPath,
2813
- I as formatNumberAsDecimalNumber,
2814
- Uc as formatNumberAsDuration,
2815
- Mc as formatNumberAsSize,
2816
- Fc as formatNumberAsStorageSize,
2817
- re as formatNumberAsWholeNumber,
2818
- Wc as getComponentStatus,
2819
- Ec as getCurrentTimestamp,
2820
- Vc as getDataFormats,
2821
- Gc as getRecordDelimiters,
2822
- Bc as getValueDelimiters,
2823
- Lc as lookupMimeTypeForExtension,
2824
- Nc as normalizeToError,
2825
- zc as presenterConfigSchema,
2826
- Dc as serialiseError,
2827
- kc as useCytoscapeJS,
2828
- $c as useDataTable
242
+ v as APIError,
243
+ l as ApplicationError,
244
+ x as CONNECTOR_DESTINATION_OPERATIONS,
245
+ N as CONNECTOR_SOURCE_OPERATIONS,
246
+ i as DEFAULT_LOCALE_CODE,
247
+ T as DefaultTimestamp,
248
+ O as EngineError,
249
+ m as FetchError,
250
+ A as OperationalError,
251
+ g as VueError,
252
+ I as WindowPromiseRejectionError,
253
+ $ as WindowRuntimeError,
254
+ C as buildFetchError,
255
+ F as concatenateSerialisedErrorMessages,
256
+ y as convertMillisecondsToTimestamp,
257
+ B as convertODataTypeIdToUsageTypeId,
258
+ j as extractExtensionFromPath,
259
+ M as extractNameFromPath,
260
+ a as formatNumberAsDecimalNumber,
261
+ _ as formatNumberAsDuration,
262
+ U as formatNumberAsSize,
263
+ L as formatNumberAsStorageSize,
264
+ d as formatNumberAsWholeNumber,
265
+ z as getComponentStatus,
266
+ D as getCurrentTimestamp,
267
+ G as getDataFormats,
268
+ V as getRecordDelimiters,
269
+ X as getValueDelimiters,
270
+ W as lookupMimeTypeForExtension,
271
+ R as normalizeToError,
272
+ k as serialiseError,
273
+ w as useCytoscapeJS,
274
+ S as useDataTable
2829
275
  };