@object-ui/plugin-map 3.1.5 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +21 -1
- package/dist/{chunk-vKJrgz-R.js → chunk-D8eiyYIV.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1368 -998
- package/dist/index.umd.cjs +69 -52
- package/dist/{maplibre-gl-Dl-lwKEH.js → maplibre-gl-D8guyJSV.js} +6170 -6079
- package/dist/packages/plugin-map/src/ObjectMap.d.ts.map +1 -0
- package/dist/packages/plugin-map/src/index.d.ts.map +1 -0
- package/package.json +37 -14
- package/.turbo/turbo-build.log +0 -29
- package/dist/src/ObjectMap.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/src/ObjectMap.test.tsx +0 -110
- package/src/ObjectMap.tsx +0 -633
- package/src/index.test.tsx +0 -27
- package/src/index.tsx +0 -43
- package/tsconfig.json +0 -18
- package/vite.config.ts +0 -54
- package/vitest.config.ts +0 -13
- package/vitest.setup.ts +0 -78
- /package/dist/{src → packages/plugin-map/src}/ObjectMap.d.ts +0 -0
- /package/dist/{src → packages/plugin-map/src}/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./chunk-
|
|
1
|
+
import { n as e, r as t, t as n } from "./chunk-D8eiyYIV.js";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { forwardRef as i, memo as a, useContext as o, useEffect as s, useImperativeHandle as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
4
4
|
import { ComponentRegistry as p, buildExpandFields as m, extractRecords as h } from "@object-ui/core";
|
|
5
|
-
import { useNavigationOverlay as
|
|
6
|
-
import { NavigationOverlay as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
|
|
5
|
+
import { useNavigationOverlay as ee, useSchemaContext as g } from "@object-ui/react";
|
|
6
|
+
import { NavigationOverlay as _, cn as v } from "@object-ui/components";
|
|
7
|
+
import { createPortal as te } from "react-dom";
|
|
8
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
9
|
+
var y;
|
|
9
10
|
function b(e, t, n) {
|
|
10
11
|
function r(n, r) {
|
|
11
12
|
if (n._zod || Object.defineProperty(n, "_zod", {
|
|
@@ -39,24 +40,26 @@ var x = class extends Error {
|
|
|
39
40
|
constructor() {
|
|
40
41
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
41
42
|
}
|
|
42
|
-
},
|
|
43
|
+
}, ne = class extends Error {
|
|
43
44
|
constructor(e) {
|
|
44
45
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
};
|
|
48
|
+
(y = globalThis).__zod_globalConfig ?? (y.__zod_globalConfig = {});
|
|
49
|
+
var S = globalThis.__zod_globalConfig;
|
|
50
|
+
function C(e) {
|
|
51
|
+
return e && Object.assign(S, e), S;
|
|
49
52
|
}
|
|
50
53
|
//#endregion
|
|
51
|
-
//#region ../../node_modules/.pnpm/zod@4.3
|
|
52
|
-
function
|
|
54
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
55
|
+
function w(e) {
|
|
53
56
|
let t = Object.values(e).filter((e) => typeof e == "number");
|
|
54
57
|
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
55
58
|
}
|
|
56
59
|
function T(e, t) {
|
|
57
60
|
return typeof t == "bigint" ? t.toString() : t;
|
|
58
61
|
}
|
|
59
|
-
function
|
|
62
|
+
function re(e) {
|
|
60
63
|
return { get value() {
|
|
61
64
|
{
|
|
62
65
|
let t = e();
|
|
@@ -65,23 +68,18 @@ function E(e) {
|
|
|
65
68
|
throw Error("cached value already set");
|
|
66
69
|
} };
|
|
67
70
|
}
|
|
68
|
-
function
|
|
71
|
+
function E(e) {
|
|
69
72
|
return e == null;
|
|
70
73
|
}
|
|
71
74
|
function D(e) {
|
|
72
|
-
let t = e.startsWith("^")
|
|
75
|
+
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
73
76
|
return e.slice(t, n);
|
|
74
77
|
}
|
|
75
78
|
function O(e, t) {
|
|
76
|
-
let n =
|
|
77
|
-
|
|
78
|
-
let e = r.match(/\d?e-(\d?)/);
|
|
79
|
-
e?.[1] && (i = Number.parseInt(e[1]));
|
|
80
|
-
}
|
|
81
|
-
let a = n > i ? n : i;
|
|
82
|
-
return Number.parseInt(e.toFixed(a).replace(".", "")) % Number.parseInt(t.toFixed(a).replace(".", "")) / 10 ** a;
|
|
79
|
+
let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
|
|
80
|
+
return Math.abs(n - r) < i ? 0 : n - r;
|
|
83
81
|
}
|
|
84
|
-
var k = Symbol("evaluating");
|
|
82
|
+
var k = /* @__PURE__ */ Symbol("evaluating");
|
|
85
83
|
function A(e, t, n) {
|
|
86
84
|
let r;
|
|
87
85
|
Object.defineProperty(e, t, {
|
|
@@ -110,44 +108,44 @@ function M(...e) {
|
|
|
110
108
|
function N(e) {
|
|
111
109
|
return JSON.stringify(e);
|
|
112
110
|
}
|
|
113
|
-
function
|
|
111
|
+
function ie(e) {
|
|
114
112
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
115
113
|
}
|
|
116
|
-
var
|
|
114
|
+
var ae = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
117
115
|
function P(e) {
|
|
118
116
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
119
117
|
}
|
|
120
|
-
var
|
|
121
|
-
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
118
|
+
var oe = /* @__PURE__ */ re(() => {
|
|
119
|
+
if (S.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
122
120
|
try {
|
|
123
121
|
return Function(""), !0;
|
|
124
122
|
} catch {
|
|
125
123
|
return !1;
|
|
126
124
|
}
|
|
127
125
|
});
|
|
128
|
-
function
|
|
126
|
+
function F(e) {
|
|
129
127
|
if (P(e) === !1) return !1;
|
|
130
128
|
let t = e.constructor;
|
|
131
129
|
if (t === void 0 || typeof t != "function") return !0;
|
|
132
130
|
let n = t.prototype;
|
|
133
131
|
return !(P(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
134
132
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
133
|
+
function se(e) {
|
|
134
|
+
return F(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
137
135
|
}
|
|
138
|
-
var
|
|
136
|
+
var ce = /* @__PURE__ */ new Set([
|
|
139
137
|
"string",
|
|
140
138
|
"number",
|
|
141
139
|
"symbol"
|
|
142
140
|
]);
|
|
143
|
-
function
|
|
141
|
+
function le(e) {
|
|
144
142
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
145
143
|
}
|
|
146
|
-
function
|
|
144
|
+
function I(e, t, n) {
|
|
147
145
|
let r = new e._zod.constr(t ?? e._zod.def);
|
|
148
146
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
149
147
|
}
|
|
150
|
-
function
|
|
148
|
+
function L(e) {
|
|
151
149
|
let t = e;
|
|
152
150
|
if (!t) return {};
|
|
153
151
|
if (typeof t == "string") return { error: () => t };
|
|
@@ -160,20 +158,20 @@ function R(e) {
|
|
|
160
158
|
error: () => t.error
|
|
161
159
|
} : t;
|
|
162
160
|
}
|
|
163
|
-
function
|
|
161
|
+
function ue(e) {
|
|
164
162
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
165
163
|
}
|
|
166
|
-
var
|
|
164
|
+
var de = {
|
|
167
165
|
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
168
166
|
int32: [-2147483648, 2147483647],
|
|
169
167
|
uint32: [0, 4294967295],
|
|
170
168
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
171
169
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
172
170
|
};
|
|
173
|
-
function
|
|
171
|
+
function fe(e, t) {
|
|
174
172
|
let n = e._zod.def, r = n.checks;
|
|
175
173
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
176
|
-
return
|
|
174
|
+
return I(e, M(e._zod.def, {
|
|
177
175
|
get shape() {
|
|
178
176
|
let e = {};
|
|
179
177
|
for (let r in t) {
|
|
@@ -185,10 +183,10 @@ function ue(e, t) {
|
|
|
185
183
|
checks: []
|
|
186
184
|
}));
|
|
187
185
|
}
|
|
188
|
-
function
|
|
186
|
+
function pe(e, t) {
|
|
189
187
|
let n = e._zod.def, r = n.checks;
|
|
190
188
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
191
|
-
return
|
|
189
|
+
return I(e, M(e._zod.def, {
|
|
192
190
|
get shape() {
|
|
193
191
|
let r = { ...e._zod.def.shape };
|
|
194
192
|
for (let e in t) {
|
|
@@ -200,14 +198,14 @@ function de(e, t) {
|
|
|
200
198
|
checks: []
|
|
201
199
|
}));
|
|
202
200
|
}
|
|
203
|
-
function
|
|
204
|
-
if (!
|
|
201
|
+
function me(e, t) {
|
|
202
|
+
if (!F(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
205
203
|
let n = e._zod.def.checks;
|
|
206
204
|
if (n && n.length > 0) {
|
|
207
205
|
let n = e._zod.def.shape;
|
|
208
206
|
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
209
207
|
}
|
|
210
|
-
return
|
|
208
|
+
return I(e, M(e._zod.def, { get shape() {
|
|
211
209
|
let n = {
|
|
212
210
|
...e._zod.def.shape,
|
|
213
211
|
...t
|
|
@@ -215,9 +213,9 @@ function fe(e, t) {
|
|
|
215
213
|
return j(this, "shape", n), n;
|
|
216
214
|
} }));
|
|
217
215
|
}
|
|
218
|
-
function
|
|
219
|
-
if (!
|
|
220
|
-
return
|
|
216
|
+
function he(e, t) {
|
|
217
|
+
if (!F(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
218
|
+
return I(e, M(e._zod.def, { get shape() {
|
|
221
219
|
let n = {
|
|
222
220
|
...e._zod.def.shape,
|
|
223
221
|
...t
|
|
@@ -225,8 +223,9 @@ function pe(e, t) {
|
|
|
225
223
|
return j(this, "shape", n), n;
|
|
226
224
|
} }));
|
|
227
225
|
}
|
|
228
|
-
function
|
|
229
|
-
|
|
226
|
+
function ge(e, t) {
|
|
227
|
+
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
228
|
+
return I(e, M(e._zod.def, {
|
|
230
229
|
get shape() {
|
|
231
230
|
let n = {
|
|
232
231
|
...e._zod.def.shape,
|
|
@@ -237,13 +236,13 @@ function me(e, t) {
|
|
|
237
236
|
get catchall() {
|
|
238
237
|
return t._zod.def.catchall;
|
|
239
238
|
},
|
|
240
|
-
checks: []
|
|
239
|
+
checks: t._zod.def.checks ?? []
|
|
241
240
|
}));
|
|
242
241
|
}
|
|
243
|
-
function
|
|
242
|
+
function _e(e, t, n) {
|
|
244
243
|
let r = t._zod.def.checks;
|
|
245
244
|
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
246
|
-
return
|
|
245
|
+
return I(t, M(t._zod.def, {
|
|
247
246
|
get shape() {
|
|
248
247
|
let r = t._zod.def.shape, i = { ...r };
|
|
249
248
|
if (n) for (let t in n) {
|
|
@@ -262,8 +261,8 @@ function he(e, t, n) {
|
|
|
262
261
|
checks: []
|
|
263
262
|
}));
|
|
264
263
|
}
|
|
265
|
-
function
|
|
266
|
-
return
|
|
264
|
+
function ve(e, t, n) {
|
|
265
|
+
return I(t, M(t._zod.def, { get shape() {
|
|
267
266
|
let r = t._zod.def.shape, i = { ...r };
|
|
268
267
|
if (n) for (let t in n) {
|
|
269
268
|
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
@@ -279,31 +278,33 @@ function ge(e, t, n) {
|
|
|
279
278
|
return j(this, "shape", i), i;
|
|
280
279
|
} }));
|
|
281
280
|
}
|
|
282
|
-
function
|
|
281
|
+
function R(e, t = 0) {
|
|
283
282
|
if (e.aborted === !0) return !0;
|
|
284
283
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
285
284
|
return !1;
|
|
286
285
|
}
|
|
287
|
-
function
|
|
286
|
+
function ye(e, t = 0) {
|
|
287
|
+
if (e.aborted === !0) return !0;
|
|
288
|
+
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
289
|
+
return !1;
|
|
290
|
+
}
|
|
291
|
+
function be(e, t) {
|
|
288
292
|
return t.map((t) => {
|
|
289
293
|
var n;
|
|
290
294
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
291
295
|
});
|
|
292
296
|
}
|
|
293
|
-
function
|
|
297
|
+
function xe(e) {
|
|
294
298
|
return typeof e == "string" ? e : e?.message;
|
|
295
299
|
}
|
|
296
|
-
function
|
|
297
|
-
let r = {
|
|
298
|
-
|
|
299
|
-
path: e.path ?? []
|
|
300
|
-
};
|
|
301
|
-
return e.message || (r.message = ve(e.inst?._zod.def?.error?.(e)) ?? ve(t?.error?.(e)) ?? ve(n.customError?.(e)) ?? ve(n.localeError?.(e)) ?? "Invalid input"), delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
300
|
+
function z(e, t, n) {
|
|
301
|
+
let r = e.message ? e.message : xe(e.inst?._zod.def?.error?.(e)) ?? xe(t?.error?.(e)) ?? xe(n.customError?.(e)) ?? xe(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
|
|
302
|
+
return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function Se(e) {
|
|
304
305
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
305
306
|
}
|
|
306
|
-
function
|
|
307
|
+
function Ce(...e) {
|
|
307
308
|
let [t, n, r] = e;
|
|
308
309
|
return typeof t == "string" ? {
|
|
309
310
|
message: t,
|
|
@@ -313,8 +314,8 @@ function be(...e) {
|
|
|
313
314
|
} : { ...t };
|
|
314
315
|
}
|
|
315
316
|
//#endregion
|
|
316
|
-
//#region ../../node_modules/.pnpm/zod@4.3
|
|
317
|
-
var
|
|
317
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
318
|
+
var we = (e, t) => {
|
|
318
319
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
319
320
|
value: e._zod,
|
|
320
321
|
enumerable: !1
|
|
@@ -325,8 +326,8 @@ var xe = (e, t) => {
|
|
|
325
326
|
value: () => e.message,
|
|
326
327
|
enumerable: !1
|
|
327
328
|
});
|
|
328
|
-
},
|
|
329
|
-
function
|
|
329
|
+
}, Te = b("$ZodError", we), Ee = b("$ZodError", we, { Parent: Error });
|
|
330
|
+
function De(e, t = (e) => e.message) {
|
|
330
331
|
let n = {}, r = [];
|
|
331
332
|
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
332
333
|
return {
|
|
@@ -334,46 +335,55 @@ function we(e, t = (e) => e.message) {
|
|
|
334
335
|
fieldErrors: n
|
|
335
336
|
};
|
|
336
337
|
}
|
|
337
|
-
function
|
|
338
|
-
let n = { _errors: [] }, r = (e) => {
|
|
339
|
-
for (let
|
|
340
|
-
else if (
|
|
341
|
-
else if (
|
|
342
|
-
else if (i.path.length === 0) n._errors.push(t(i));
|
|
338
|
+
function Oe(e, t = (e) => e.message) {
|
|
339
|
+
let n = { _errors: [] }, r = (e, i = []) => {
|
|
340
|
+
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
341
|
+
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
342
|
+
else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
|
|
343
343
|
else {
|
|
344
|
-
let e =
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
r
|
|
344
|
+
let e = [...i, ...a.path];
|
|
345
|
+
if (e.length === 0) n._errors.push(t(a));
|
|
346
|
+
else {
|
|
347
|
+
let r = n, i = 0;
|
|
348
|
+
for (; i < e.length;) {
|
|
349
|
+
let n = e[i];
|
|
350
|
+
i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++;
|
|
351
|
+
}
|
|
348
352
|
}
|
|
349
353
|
}
|
|
350
354
|
};
|
|
351
355
|
return r(e), n;
|
|
352
356
|
}
|
|
353
357
|
//#endregion
|
|
354
|
-
//#region ../../node_modules/.pnpm/zod@4.3
|
|
355
|
-
var
|
|
356
|
-
let a = r ?
|
|
358
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
359
|
+
var ke = (e) => (t, n, r, i) => {
|
|
360
|
+
let a = r ? {
|
|
361
|
+
...r,
|
|
362
|
+
async: !1
|
|
363
|
+
} : { async: !1 }, o = t._zod.run({
|
|
357
364
|
value: n,
|
|
358
365
|
issues: []
|
|
359
366
|
}, a);
|
|
360
367
|
if (o instanceof Promise) throw new x();
|
|
361
368
|
if (o.issues.length) {
|
|
362
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
363
|
-
throw
|
|
369
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => z(e, a, C())));
|
|
370
|
+
throw ae(t, i?.callee), t;
|
|
364
371
|
}
|
|
365
372
|
return o.value;
|
|
366
|
-
},
|
|
367
|
-
let a = r ?
|
|
373
|
+
}, Ae = (e) => async (t, n, r, i) => {
|
|
374
|
+
let a = r ? {
|
|
375
|
+
...r,
|
|
376
|
+
async: !0
|
|
377
|
+
} : { async: !0 }, o = t._zod.run({
|
|
368
378
|
value: n,
|
|
369
379
|
issues: []
|
|
370
380
|
}, a);
|
|
371
381
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
372
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
373
|
-
throw
|
|
382
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => z(e, a, C())));
|
|
383
|
+
throw ae(t, i?.callee), t;
|
|
374
384
|
}
|
|
375
385
|
return o.value;
|
|
376
|
-
},
|
|
386
|
+
}, je = (e) => (t, n, r) => {
|
|
377
387
|
let i = r ? {
|
|
378
388
|
...r,
|
|
379
389
|
async: !1
|
|
@@ -384,66 +394,81 @@ var Ee = (e) => (t, n, r, i) => {
|
|
|
384
394
|
if (a instanceof Promise) throw new x();
|
|
385
395
|
return a.issues.length ? {
|
|
386
396
|
success: !1,
|
|
387
|
-
error: new (e ??
|
|
397
|
+
error: new (e ?? Te)(a.issues.map((e) => z(e, i, C())))
|
|
388
398
|
} : {
|
|
389
399
|
success: !0,
|
|
390
400
|
data: a.value
|
|
391
401
|
};
|
|
392
|
-
},
|
|
393
|
-
let i = r ?
|
|
402
|
+
}, Me = /* @__PURE__ */ je(Ee), Ne = (e) => async (t, n, r) => {
|
|
403
|
+
let i = r ? {
|
|
404
|
+
...r,
|
|
405
|
+
async: !0
|
|
406
|
+
} : { async: !0 }, a = t._zod.run({
|
|
394
407
|
value: n,
|
|
395
408
|
issues: []
|
|
396
409
|
}, i);
|
|
397
410
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
398
411
|
success: !1,
|
|
399
|
-
error: new e(a.issues.map((e) =>
|
|
412
|
+
error: new e(a.issues.map((e) => z(e, i, C())))
|
|
400
413
|
} : {
|
|
401
414
|
success: !0,
|
|
402
415
|
data: a.value
|
|
403
416
|
};
|
|
404
|
-
},
|
|
405
|
-
let i = r ?
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
return
|
|
410
|
-
},
|
|
411
|
-
let i = r ?
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
417
|
+
}, Pe = /* @__PURE__ */ Ne(Ee), Fe = (e) => (t, n, r) => {
|
|
418
|
+
let i = r ? {
|
|
419
|
+
...r,
|
|
420
|
+
direction: "backward"
|
|
421
|
+
} : { direction: "backward" };
|
|
422
|
+
return ke(e)(t, n, i);
|
|
423
|
+
}, Ie = (e) => (t, n, r) => ke(e)(t, n, r), Le = (e) => async (t, n, r) => {
|
|
424
|
+
let i = r ? {
|
|
425
|
+
...r,
|
|
426
|
+
direction: "backward"
|
|
427
|
+
} : { direction: "backward" };
|
|
415
428
|
return Ae(e)(t, n, i);
|
|
416
|
-
},
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
429
|
+
}, Re = (e) => async (t, n, r) => Ae(e)(t, n, r), ze = (e) => (t, n, r) => {
|
|
430
|
+
let i = r ? {
|
|
431
|
+
...r,
|
|
432
|
+
direction: "backward"
|
|
433
|
+
} : { direction: "backward" };
|
|
434
|
+
return je(e)(t, n, i);
|
|
435
|
+
}, Be = (e) => (t, n, r) => je(e)(t, n, r), Ve = (e) => async (t, n, r) => {
|
|
436
|
+
let i = r ? {
|
|
437
|
+
...r,
|
|
438
|
+
direction: "backward"
|
|
439
|
+
} : { direction: "backward" };
|
|
440
|
+
return Ne(e)(t, n, i);
|
|
441
|
+
}, He = (e) => async (t, n, r) => Ne(e)(t, n, r), Ue = /^[cC][0-9a-z]{6,}$/, We = /^[0-9a-z]+$/, Ge = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ke = /^[0-9a-vA-V]{20}$/, qe = /^[A-Za-z0-9]{27}$/, Je = /^[a-zA-Z0-9_-]{21}$/, Ye = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Xe = /^([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})$/, Ze = (e) => e ? 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)$/, Qe = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, $e = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
442
|
+
function et() {
|
|
443
|
+
return new RegExp($e, "u");
|
|
444
|
+
}
|
|
445
|
+
var tt = /^(?:(?: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])$/, nt = /^(([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}|:))$/, rt = /^((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])$/, it = /^(([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])$/, at = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ot = /^[A-Za-z0-9_-]*$/, st = /^https?$/, ct = /^\+[1-9]\d{6,14}$/, lt = "(?:(?:\\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])))", ut = /* @__PURE__ */ RegExp(`^${lt}$`);
|
|
446
|
+
function dt(e) {
|
|
422
447
|
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
423
448
|
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+)?)?`;
|
|
424
449
|
}
|
|
425
|
-
function
|
|
426
|
-
return RegExp(`^${
|
|
450
|
+
function ft(e) {
|
|
451
|
+
return RegExp(`^${dt(e)}$`);
|
|
427
452
|
}
|
|
428
|
-
function
|
|
429
|
-
let t =
|
|
453
|
+
function pt(e) {
|
|
454
|
+
let t = dt({ precision: e.precision }), n = ["Z"];
|
|
430
455
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
431
456
|
let r = `${t}(?:${n.join("|")})`;
|
|
432
|
-
return RegExp(`^${
|
|
457
|
+
return RegExp(`^${lt}T(?:${r})$`);
|
|
433
458
|
}
|
|
434
|
-
var
|
|
459
|
+
var mt = (e) => {
|
|
435
460
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
436
461
|
return RegExp(`^${t}$`);
|
|
437
|
-
},
|
|
462
|
+
}, ht = /^-?\d+$/, gt = /^-?\d+(?:\.\d+)?$/, _t = /^[^A-Z]*$/, vt = /^[^a-z]*$/, B = /* @__PURE__ */ b("$ZodCheck", (e, t) => {
|
|
438
463
|
var n;
|
|
439
464
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
440
|
-
}),
|
|
465
|
+
}), yt = {
|
|
441
466
|
number: "number",
|
|
442
467
|
bigint: "bigint",
|
|
443
468
|
object: "date"
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
let n =
|
|
469
|
+
}, bt = /* @__PURE__ */ b("$ZodCheckLessThan", (e, t) => {
|
|
470
|
+
B.init(e, t);
|
|
471
|
+
let n = yt[typeof t.value];
|
|
447
472
|
e._zod.onattach.push((e) => {
|
|
448
473
|
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
449
474
|
t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
@@ -458,9 +483,9 @@ var ut = (e) => {
|
|
|
458
483
|
continue: !t.abort
|
|
459
484
|
});
|
|
460
485
|
};
|
|
461
|
-
}),
|
|
462
|
-
|
|
463
|
-
let n =
|
|
486
|
+
}), xt = /* @__PURE__ */ b("$ZodCheckGreaterThan", (e, t) => {
|
|
487
|
+
B.init(e, t);
|
|
488
|
+
let n = yt[typeof t.value];
|
|
464
489
|
e._zod.onattach.push((e) => {
|
|
465
490
|
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
466
491
|
t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
@@ -475,8 +500,8 @@ var ut = (e) => {
|
|
|
475
500
|
continue: !t.abort
|
|
476
501
|
});
|
|
477
502
|
};
|
|
478
|
-
}),
|
|
479
|
-
|
|
503
|
+
}), St = /* @__PURE__ */ b("$ZodCheckMultipleOf", (e, t) => {
|
|
504
|
+
B.init(e, t), e._zod.onattach.push((e) => {
|
|
480
505
|
var n;
|
|
481
506
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
482
507
|
}), e._zod.check = (n) => {
|
|
@@ -490,12 +515,12 @@ var ut = (e) => {
|
|
|
490
515
|
continue: !t.abort
|
|
491
516
|
});
|
|
492
517
|
};
|
|
493
|
-
}),
|
|
494
|
-
|
|
495
|
-
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] =
|
|
518
|
+
}), Ct = /* @__PURE__ */ b("$ZodCheckNumberFormat", (e, t) => {
|
|
519
|
+
B.init(e, t), t.format = t.format || "float64";
|
|
520
|
+
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = de[t.format];
|
|
496
521
|
e._zod.onattach.push((e) => {
|
|
497
522
|
let r = e._zod.bag;
|
|
498
|
-
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern =
|
|
523
|
+
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = ht);
|
|
499
524
|
}), e._zod.check = (o) => {
|
|
500
525
|
let s = o.value;
|
|
501
526
|
if (n) {
|
|
@@ -551,18 +576,18 @@ var ut = (e) => {
|
|
|
551
576
|
continue: !t.abort
|
|
552
577
|
});
|
|
553
578
|
};
|
|
554
|
-
}),
|
|
579
|
+
}), wt = /* @__PURE__ */ b("$ZodCheckMaxLength", (e, t) => {
|
|
555
580
|
var n;
|
|
556
|
-
|
|
581
|
+
B.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
557
582
|
let t = e.value;
|
|
558
|
-
return !
|
|
583
|
+
return !E(t) && t.length !== void 0;
|
|
559
584
|
}), e._zod.onattach.push((e) => {
|
|
560
585
|
let n = e._zod.bag.maximum ?? Infinity;
|
|
561
586
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
562
587
|
}), e._zod.check = (n) => {
|
|
563
588
|
let r = n.value;
|
|
564
589
|
if (r.length <= t.maximum) return;
|
|
565
|
-
let i =
|
|
590
|
+
let i = Se(r);
|
|
566
591
|
n.issues.push({
|
|
567
592
|
origin: i,
|
|
568
593
|
code: "too_big",
|
|
@@ -573,18 +598,18 @@ var ut = (e) => {
|
|
|
573
598
|
continue: !t.abort
|
|
574
599
|
});
|
|
575
600
|
};
|
|
576
|
-
}),
|
|
601
|
+
}), Tt = /* @__PURE__ */ b("$ZodCheckMinLength", (e, t) => {
|
|
577
602
|
var n;
|
|
578
|
-
|
|
603
|
+
B.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
579
604
|
let t = e.value;
|
|
580
|
-
return !
|
|
605
|
+
return !E(t) && t.length !== void 0;
|
|
581
606
|
}), e._zod.onattach.push((e) => {
|
|
582
607
|
let n = e._zod.bag.minimum ?? -Infinity;
|
|
583
608
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
584
609
|
}), e._zod.check = (n) => {
|
|
585
610
|
let r = n.value;
|
|
586
611
|
if (r.length >= t.minimum) return;
|
|
587
|
-
let i =
|
|
612
|
+
let i = Se(r);
|
|
588
613
|
n.issues.push({
|
|
589
614
|
origin: i,
|
|
590
615
|
code: "too_small",
|
|
@@ -595,18 +620,18 @@ var ut = (e) => {
|
|
|
595
620
|
continue: !t.abort
|
|
596
621
|
});
|
|
597
622
|
};
|
|
598
|
-
}),
|
|
623
|
+
}), Et = /* @__PURE__ */ b("$ZodCheckLengthEquals", (e, t) => {
|
|
599
624
|
var n;
|
|
600
|
-
|
|
625
|
+
B.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
601
626
|
let t = e.value;
|
|
602
|
-
return !
|
|
627
|
+
return !E(t) && t.length !== void 0;
|
|
603
628
|
}), e._zod.onattach.push((e) => {
|
|
604
629
|
let n = e._zod.bag;
|
|
605
630
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
606
631
|
}), e._zod.check = (n) => {
|
|
607
632
|
let r = n.value, i = r.length;
|
|
608
633
|
if (i === t.length) return;
|
|
609
|
-
let a =
|
|
634
|
+
let a = Se(r), o = i > t.length;
|
|
610
635
|
n.issues.push({
|
|
611
636
|
origin: a,
|
|
612
637
|
...o ? {
|
|
@@ -623,9 +648,9 @@ var ut = (e) => {
|
|
|
623
648
|
continue: !t.abort
|
|
624
649
|
});
|
|
625
650
|
};
|
|
626
|
-
}),
|
|
651
|
+
}), Dt = /* @__PURE__ */ b("$ZodCheckStringFormat", (e, t) => {
|
|
627
652
|
var n, r;
|
|
628
|
-
|
|
653
|
+
B.init(e, t), e._zod.onattach.push((e) => {
|
|
629
654
|
let n = e._zod.bag;
|
|
630
655
|
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
631
656
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
@@ -639,8 +664,8 @@ var ut = (e) => {
|
|
|
639
664
|
continue: !t.abort
|
|
640
665
|
});
|
|
641
666
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
642
|
-
}),
|
|
643
|
-
|
|
667
|
+
}), Ot = /* @__PURE__ */ b("$ZodCheckRegex", (e, t) => {
|
|
668
|
+
Dt.init(e, t), e._zod.check = (n) => {
|
|
644
669
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
645
670
|
origin: "string",
|
|
646
671
|
code: "invalid_format",
|
|
@@ -651,13 +676,13 @@ var ut = (e) => {
|
|
|
651
676
|
continue: !t.abort
|
|
652
677
|
});
|
|
653
678
|
};
|
|
654
|
-
}),
|
|
655
|
-
t.pattern ??=
|
|
656
|
-
}),
|
|
657
|
-
t.pattern ??=
|
|
658
|
-
}),
|
|
659
|
-
|
|
660
|
-
let n =
|
|
679
|
+
}), kt = /* @__PURE__ */ b("$ZodCheckLowerCase", (e, t) => {
|
|
680
|
+
t.pattern ??= _t, Dt.init(e, t);
|
|
681
|
+
}), At = /* @__PURE__ */ b("$ZodCheckUpperCase", (e, t) => {
|
|
682
|
+
t.pattern ??= vt, Dt.init(e, t);
|
|
683
|
+
}), jt = /* @__PURE__ */ b("$ZodCheckIncludes", (e, t) => {
|
|
684
|
+
B.init(e, t);
|
|
685
|
+
let n = le(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
661
686
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
662
687
|
let t = e._zod.bag;
|
|
663
688
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
@@ -672,9 +697,9 @@ var ut = (e) => {
|
|
|
672
697
|
continue: !t.abort
|
|
673
698
|
});
|
|
674
699
|
};
|
|
675
|
-
}),
|
|
676
|
-
|
|
677
|
-
let n = RegExp(`^${
|
|
700
|
+
}), Mt = /* @__PURE__ */ b("$ZodCheckStartsWith", (e, t) => {
|
|
701
|
+
B.init(e, t);
|
|
702
|
+
let n = RegExp(`^${le(t.prefix)}.*`);
|
|
678
703
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
679
704
|
let t = e._zod.bag;
|
|
680
705
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -689,9 +714,9 @@ var ut = (e) => {
|
|
|
689
714
|
continue: !t.abort
|
|
690
715
|
});
|
|
691
716
|
};
|
|
692
|
-
}),
|
|
693
|
-
|
|
694
|
-
let n = RegExp(`.*${
|
|
717
|
+
}), Nt = /* @__PURE__ */ b("$ZodCheckEndsWith", (e, t) => {
|
|
718
|
+
B.init(e, t);
|
|
719
|
+
let n = RegExp(`.*${le(t.suffix)}$`);
|
|
695
720
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
696
721
|
let t = e._zod.bag;
|
|
697
722
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -706,11 +731,11 @@ var ut = (e) => {
|
|
|
706
731
|
continue: !t.abort
|
|
707
732
|
});
|
|
708
733
|
};
|
|
709
|
-
}),
|
|
710
|
-
|
|
734
|
+
}), Pt = /* @__PURE__ */ b("$ZodCheckOverwrite", (e, t) => {
|
|
735
|
+
B.init(e, t), e._zod.check = (e) => {
|
|
711
736
|
e.value = t.tx(e.value);
|
|
712
737
|
};
|
|
713
|
-
}),
|
|
738
|
+
}), Ft = class {
|
|
714
739
|
constructor(e = []) {
|
|
715
740
|
this.content = [], this.indent = 0, this && (this.args = e);
|
|
716
741
|
}
|
|
@@ -729,13 +754,13 @@ var ut = (e) => {
|
|
|
729
754
|
let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
|
|
730
755
|
return new e(...t, n.join("\n"));
|
|
731
756
|
}
|
|
732
|
-
},
|
|
757
|
+
}, It = {
|
|
733
758
|
major: 4,
|
|
734
|
-
minor:
|
|
735
|
-
patch:
|
|
736
|
-
},
|
|
759
|
+
minor: 4,
|
|
760
|
+
patch: 3
|
|
761
|
+
}, V = /* @__PURE__ */ b("$ZodType", (e, t) => {
|
|
737
762
|
var n;
|
|
738
|
-
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
763
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = It;
|
|
739
764
|
let r = [...e._zod.def.checks ?? []];
|
|
740
765
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
741
766
|
for (let t of r) for (let n of t._zod.onattach) n(e);
|
|
@@ -744,24 +769,24 @@ var ut = (e) => {
|
|
|
744
769
|
});
|
|
745
770
|
else {
|
|
746
771
|
let t = (e, t, n) => {
|
|
747
|
-
let r =
|
|
772
|
+
let r = R(e), i;
|
|
748
773
|
for (let a of t) {
|
|
749
774
|
if (a._zod.def.when) {
|
|
750
|
-
if (!a._zod.def.when(e)) continue;
|
|
775
|
+
if (ye(e) || !a._zod.def.when(e)) continue;
|
|
751
776
|
} else if (r) continue;
|
|
752
777
|
let t = e.issues.length, o = a._zod.check(e);
|
|
753
778
|
if (o instanceof Promise && n?.async === !1) throw new x();
|
|
754
779
|
if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
|
|
755
|
-
await o, e.issues.length !== t && (r ||=
|
|
780
|
+
await o, e.issues.length !== t && (r ||= R(e, t));
|
|
756
781
|
});
|
|
757
782
|
else {
|
|
758
783
|
if (e.issues.length === t) continue;
|
|
759
|
-
r ||=
|
|
784
|
+
r ||= R(e, t);
|
|
760
785
|
}
|
|
761
786
|
}
|
|
762
787
|
return i ? i.then(() => e) : e;
|
|
763
788
|
}, n = (n, i, a) => {
|
|
764
|
-
if (
|
|
789
|
+
if (R(n)) return n.aborted = !0, n;
|
|
765
790
|
let o = t(i, r, a);
|
|
766
791
|
if (o instanceof Promise) {
|
|
767
792
|
if (a.async === !1) throw new x();
|
|
@@ -792,17 +817,17 @@ var ut = (e) => {
|
|
|
792
817
|
A(e, "~standard", () => ({
|
|
793
818
|
validate: (t) => {
|
|
794
819
|
try {
|
|
795
|
-
let n =
|
|
820
|
+
let n = Me(e, t);
|
|
796
821
|
return n.success ? { value: n.data } : { issues: n.error?.issues };
|
|
797
822
|
} catch {
|
|
798
|
-
return
|
|
823
|
+
return Pe(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
|
|
799
824
|
}
|
|
800
825
|
},
|
|
801
826
|
vendor: "zod",
|
|
802
827
|
version: 1
|
|
803
828
|
}));
|
|
804
|
-
}),
|
|
805
|
-
|
|
829
|
+
}), Lt = /* @__PURE__ */ b("$ZodString", (e, t) => {
|
|
830
|
+
V.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? mt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
806
831
|
if (t.coerce) try {
|
|
807
832
|
n.value = String(n.value);
|
|
808
833
|
} catch {}
|
|
@@ -813,11 +838,11 @@ var ut = (e) => {
|
|
|
813
838
|
inst: e
|
|
814
839
|
}), n;
|
|
815
840
|
};
|
|
816
|
-
}),
|
|
817
|
-
|
|
818
|
-
}),
|
|
819
|
-
t.pattern ??=
|
|
820
|
-
}),
|
|
841
|
+
}), H = /* @__PURE__ */ b("$ZodStringFormat", (e, t) => {
|
|
842
|
+
Dt.init(e, t), Lt.init(e, t);
|
|
843
|
+
}), Rt = /* @__PURE__ */ b("$ZodGUID", (e, t) => {
|
|
844
|
+
t.pattern ??= Xe, H.init(e, t);
|
|
845
|
+
}), zt = /* @__PURE__ */ b("$ZodUUID", (e, t) => {
|
|
821
846
|
if (t.version) {
|
|
822
847
|
let e = {
|
|
823
848
|
v1: 1,
|
|
@@ -830,15 +855,27 @@ var ut = (e) => {
|
|
|
830
855
|
v8: 8
|
|
831
856
|
}[t.version];
|
|
832
857
|
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
833
|
-
t.pattern ??=
|
|
834
|
-
} else t.pattern ??=
|
|
835
|
-
|
|
836
|
-
}),
|
|
837
|
-
t.pattern ??=
|
|
838
|
-
}),
|
|
839
|
-
|
|
858
|
+
t.pattern ??= Ze(e);
|
|
859
|
+
} else t.pattern ??= Ze();
|
|
860
|
+
H.init(e, t);
|
|
861
|
+
}), Bt = /* @__PURE__ */ b("$ZodEmail", (e, t) => {
|
|
862
|
+
t.pattern ??= Qe, H.init(e, t);
|
|
863
|
+
}), Vt = /* @__PURE__ */ b("$ZodURL", (e, t) => {
|
|
864
|
+
H.init(e, t), e._zod.check = (n) => {
|
|
840
865
|
try {
|
|
841
|
-
let r = n.value.trim()
|
|
866
|
+
let r = n.value.trim();
|
|
867
|
+
if (!t.normalize && t.protocol?.source === st.source && !/^https?:\/\//i.test(r)) {
|
|
868
|
+
n.issues.push({
|
|
869
|
+
code: "invalid_format",
|
|
870
|
+
format: "url",
|
|
871
|
+
note: "Invalid URL format",
|
|
872
|
+
input: n.value,
|
|
873
|
+
inst: e,
|
|
874
|
+
continue: !t.abort
|
|
875
|
+
});
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
let i = new URL(r);
|
|
842
879
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
|
|
843
880
|
code: "invalid_format",
|
|
844
881
|
format: "url",
|
|
@@ -867,32 +904,32 @@ var ut = (e) => {
|
|
|
867
904
|
});
|
|
868
905
|
}
|
|
869
906
|
};
|
|
870
|
-
}),
|
|
871
|
-
t.pattern ??=
|
|
872
|
-
}),
|
|
873
|
-
t.pattern ??=
|
|
874
|
-
}),
|
|
875
|
-
t.pattern ??=
|
|
876
|
-
}),
|
|
877
|
-
t.pattern ??=
|
|
878
|
-
}),
|
|
879
|
-
t.pattern ??=
|
|
880
|
-
}),
|
|
881
|
-
t.pattern ??=
|
|
882
|
-
}),
|
|
883
|
-
t.pattern ??=
|
|
884
|
-
}),
|
|
885
|
-
t.pattern ??=
|
|
886
|
-
}),
|
|
887
|
-
t.pattern ??=
|
|
888
|
-
}),
|
|
889
|
-
t.pattern ??=
|
|
890
|
-
}),
|
|
891
|
-
t.pattern ??=
|
|
892
|
-
}),
|
|
893
|
-
t.pattern ??=
|
|
894
|
-
}),
|
|
895
|
-
t.pattern ??=
|
|
907
|
+
}), Ht = /* @__PURE__ */ b("$ZodEmoji", (e, t) => {
|
|
908
|
+
t.pattern ??= et(), H.init(e, t);
|
|
909
|
+
}), Ut = /* @__PURE__ */ b("$ZodNanoID", (e, t) => {
|
|
910
|
+
t.pattern ??= Je, H.init(e, t);
|
|
911
|
+
}), Wt = /* @__PURE__ */ b("$ZodCUID", (e, t) => {
|
|
912
|
+
t.pattern ??= Ue, H.init(e, t);
|
|
913
|
+
}), Gt = /* @__PURE__ */ b("$ZodCUID2", (e, t) => {
|
|
914
|
+
t.pattern ??= We, H.init(e, t);
|
|
915
|
+
}), Kt = /* @__PURE__ */ b("$ZodULID", (e, t) => {
|
|
916
|
+
t.pattern ??= Ge, H.init(e, t);
|
|
917
|
+
}), qt = /* @__PURE__ */ b("$ZodXID", (e, t) => {
|
|
918
|
+
t.pattern ??= Ke, H.init(e, t);
|
|
919
|
+
}), Jt = /* @__PURE__ */ b("$ZodKSUID", (e, t) => {
|
|
920
|
+
t.pattern ??= qe, H.init(e, t);
|
|
921
|
+
}), Yt = /* @__PURE__ */ b("$ZodISODateTime", (e, t) => {
|
|
922
|
+
t.pattern ??= pt(t), H.init(e, t);
|
|
923
|
+
}), Xt = /* @__PURE__ */ b("$ZodISODate", (e, t) => {
|
|
924
|
+
t.pattern ??= ut, H.init(e, t);
|
|
925
|
+
}), Zt = /* @__PURE__ */ b("$ZodISOTime", (e, t) => {
|
|
926
|
+
t.pattern ??= ft(t), H.init(e, t);
|
|
927
|
+
}), Qt = /* @__PURE__ */ b("$ZodISODuration", (e, t) => {
|
|
928
|
+
t.pattern ??= Ye, H.init(e, t);
|
|
929
|
+
}), $t = /* @__PURE__ */ b("$ZodIPv4", (e, t) => {
|
|
930
|
+
t.pattern ??= tt, H.init(e, t), e._zod.bag.format = "ipv4";
|
|
931
|
+
}), en = /* @__PURE__ */ b("$ZodIPv6", (e, t) => {
|
|
932
|
+
t.pattern ??= nt, H.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
896
933
|
try {
|
|
897
934
|
new URL(`http://[${n.value}]`);
|
|
898
935
|
} catch {
|
|
@@ -905,10 +942,10 @@ var ut = (e) => {
|
|
|
905
942
|
});
|
|
906
943
|
}
|
|
907
944
|
};
|
|
908
|
-
}),
|
|
909
|
-
t.pattern ??=
|
|
910
|
-
}),
|
|
911
|
-
t.pattern ??=
|
|
945
|
+
}), tn = /* @__PURE__ */ b("$ZodCIDRv4", (e, t) => {
|
|
946
|
+
t.pattern ??= rt, H.init(e, t);
|
|
947
|
+
}), nn = /* @__PURE__ */ b("$ZodCIDRv6", (e, t) => {
|
|
948
|
+
t.pattern ??= it, H.init(e, t), e._zod.check = (n) => {
|
|
912
949
|
let r = n.value.split("/");
|
|
913
950
|
try {
|
|
914
951
|
if (r.length !== 2) throw Error();
|
|
@@ -928,18 +965,18 @@ var ut = (e) => {
|
|
|
928
965
|
}
|
|
929
966
|
};
|
|
930
967
|
});
|
|
931
|
-
function
|
|
968
|
+
function rn(e) {
|
|
932
969
|
if (e === "") return !0;
|
|
933
|
-
if (e.length % 4 != 0) return !1;
|
|
970
|
+
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
934
971
|
try {
|
|
935
972
|
return atob(e), !0;
|
|
936
973
|
} catch {
|
|
937
974
|
return !1;
|
|
938
975
|
}
|
|
939
976
|
}
|
|
940
|
-
var
|
|
941
|
-
t.pattern ??=
|
|
942
|
-
|
|
977
|
+
var an = /* @__PURE__ */ b("$ZodBase64", (e, t) => {
|
|
978
|
+
t.pattern ??= at, H.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
979
|
+
rn(n.value) || n.issues.push({
|
|
943
980
|
code: "invalid_format",
|
|
944
981
|
format: "base64",
|
|
945
982
|
input: n.value,
|
|
@@ -948,14 +985,14 @@ var en = /* @__PURE__ */ b("$ZodBase64", (e, t) => {
|
|
|
948
985
|
});
|
|
949
986
|
};
|
|
950
987
|
});
|
|
951
|
-
function
|
|
952
|
-
if (!
|
|
988
|
+
function on(e) {
|
|
989
|
+
if (!ot.test(e)) return !1;
|
|
953
990
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
954
|
-
return
|
|
991
|
+
return rn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
955
992
|
}
|
|
956
|
-
var
|
|
957
|
-
t.pattern ??=
|
|
958
|
-
|
|
993
|
+
var sn = /* @__PURE__ */ b("$ZodBase64URL", (e, t) => {
|
|
994
|
+
t.pattern ??= ot, H.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
995
|
+
on(n.value) || n.issues.push({
|
|
959
996
|
code: "invalid_format",
|
|
960
997
|
format: "base64url",
|
|
961
998
|
input: n.value,
|
|
@@ -963,10 +1000,10 @@ var nn = /* @__PURE__ */ b("$ZodBase64URL", (e, t) => {
|
|
|
963
1000
|
continue: !t.abort
|
|
964
1001
|
});
|
|
965
1002
|
};
|
|
966
|
-
}),
|
|
967
|
-
t.pattern ??=
|
|
1003
|
+
}), cn = /* @__PURE__ */ b("$ZodE164", (e, t) => {
|
|
1004
|
+
t.pattern ??= ct, H.init(e, t);
|
|
968
1005
|
});
|
|
969
|
-
function
|
|
1006
|
+
function ln(e, t = null) {
|
|
970
1007
|
try {
|
|
971
1008
|
let n = e.split(".");
|
|
972
1009
|
if (n.length !== 3) return !1;
|
|
@@ -978,9 +1015,9 @@ function an(e, t = null) {
|
|
|
978
1015
|
return !1;
|
|
979
1016
|
}
|
|
980
1017
|
}
|
|
981
|
-
var
|
|
982
|
-
|
|
983
|
-
|
|
1018
|
+
var un = /* @__PURE__ */ b("$ZodJWT", (e, t) => {
|
|
1019
|
+
H.init(e, t), e._zod.check = (n) => {
|
|
1020
|
+
ln(n.value, t.alg) || n.issues.push({
|
|
984
1021
|
code: "invalid_format",
|
|
985
1022
|
format: "jwt",
|
|
986
1023
|
input: n.value,
|
|
@@ -988,8 +1025,8 @@ var on = /* @__PURE__ */ b("$ZodJWT", (e, t) => {
|
|
|
988
1025
|
continue: !t.abort
|
|
989
1026
|
});
|
|
990
1027
|
};
|
|
991
|
-
}),
|
|
992
|
-
|
|
1028
|
+
}), dn = /* @__PURE__ */ b("$ZodNumber", (e, t) => {
|
|
1029
|
+
V.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? gt, e._zod.parse = (n, r) => {
|
|
993
1030
|
if (t.coerce) try {
|
|
994
1031
|
n.value = Number(n.value);
|
|
995
1032
|
} catch {}
|
|
@@ -1004,23 +1041,23 @@ var on = /* @__PURE__ */ b("$ZodJWT", (e, t) => {
|
|
|
1004
1041
|
...a ? { received: a } : {}
|
|
1005
1042
|
}), n;
|
|
1006
1043
|
};
|
|
1007
|
-
}),
|
|
1008
|
-
|
|
1009
|
-
}),
|
|
1010
|
-
|
|
1011
|
-
}),
|
|
1012
|
-
|
|
1044
|
+
}), fn = /* @__PURE__ */ b("$ZodNumberFormat", (e, t) => {
|
|
1045
|
+
Ct.init(e, t), dn.init(e, t);
|
|
1046
|
+
}), pn = /* @__PURE__ */ b("$ZodUnknown", (e, t) => {
|
|
1047
|
+
V.init(e, t), e._zod.parse = (e) => e;
|
|
1048
|
+
}), mn = /* @__PURE__ */ b("$ZodNever", (e, t) => {
|
|
1049
|
+
V.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1013
1050
|
expected: "never",
|
|
1014
1051
|
code: "invalid_type",
|
|
1015
1052
|
input: t.value,
|
|
1016
1053
|
inst: e
|
|
1017
1054
|
}), t);
|
|
1018
1055
|
});
|
|
1019
|
-
function
|
|
1020
|
-
e.issues.length && t.issues.push(...
|
|
1056
|
+
function hn(e, t, n) {
|
|
1057
|
+
e.issues.length && t.issues.push(...be(n, e.issues)), t.value[n] = e.value;
|
|
1021
1058
|
}
|
|
1022
|
-
var
|
|
1023
|
-
|
|
1059
|
+
var gn = /* @__PURE__ */ b("$ZodArray", (e, t) => {
|
|
1060
|
+
V.init(e, t), e._zod.parse = (n, r) => {
|
|
1024
1061
|
let i = n.value;
|
|
1025
1062
|
if (!Array.isArray(i)) return n.issues.push({
|
|
1026
1063
|
expected: "array",
|
|
@@ -1035,22 +1072,32 @@ var fn = /* @__PURE__ */ b("$ZodArray", (e, t) => {
|
|
|
1035
1072
|
value: o,
|
|
1036
1073
|
issues: []
|
|
1037
1074
|
}, r);
|
|
1038
|
-
s instanceof Promise ? a.push(s.then((t) =>
|
|
1075
|
+
s instanceof Promise ? a.push(s.then((t) => hn(t, n, e))) : hn(s, n, e);
|
|
1039
1076
|
}
|
|
1040
1077
|
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1041
1078
|
};
|
|
1042
1079
|
});
|
|
1043
|
-
function
|
|
1080
|
+
function _n(e, t, n, r, i, a) {
|
|
1081
|
+
let o = n in r;
|
|
1044
1082
|
if (e.issues.length) {
|
|
1045
|
-
if (i &&
|
|
1046
|
-
t.issues.push(...
|
|
1083
|
+
if (i && a && !o) return;
|
|
1084
|
+
t.issues.push(...be(n, e.issues));
|
|
1085
|
+
}
|
|
1086
|
+
if (!o && !i) {
|
|
1087
|
+
e.issues.length || t.issues.push({
|
|
1088
|
+
code: "invalid_type",
|
|
1089
|
+
expected: "nonoptional",
|
|
1090
|
+
input: void 0,
|
|
1091
|
+
path: [n]
|
|
1092
|
+
});
|
|
1093
|
+
return;
|
|
1047
1094
|
}
|
|
1048
|
-
e.value === void 0 ?
|
|
1095
|
+
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1049
1096
|
}
|
|
1050
|
-
function
|
|
1097
|
+
function vn(e) {
|
|
1051
1098
|
let t = Object.keys(e.shape);
|
|
1052
1099
|
for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
|
|
1053
|
-
let n =
|
|
1100
|
+
let n = ue(e.shape);
|
|
1054
1101
|
return {
|
|
1055
1102
|
...e,
|
|
1056
1103
|
keys: t,
|
|
@@ -1059,10 +1106,10 @@ function mn(e) {
|
|
|
1059
1106
|
optionalKeys: new Set(n)
|
|
1060
1107
|
};
|
|
1061
1108
|
}
|
|
1062
|
-
function
|
|
1063
|
-
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optout === "optional";
|
|
1109
|
+
function yn(e, t, n, r, i, a) {
|
|
1110
|
+
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
|
|
1064
1111
|
for (let i in t) {
|
|
1065
|
-
if (s.has(i)) continue;
|
|
1112
|
+
if (i === "__proto__" || s.has(i)) continue;
|
|
1066
1113
|
if (l === "never") {
|
|
1067
1114
|
o.push(i);
|
|
1068
1115
|
continue;
|
|
@@ -1071,7 +1118,7 @@ function hn(e, t, n, r, i, a) {
|
|
|
1071
1118
|
value: t[i],
|
|
1072
1119
|
issues: []
|
|
1073
1120
|
}, r);
|
|
1074
|
-
a instanceof Promise ? e.push(a.then((e) =>
|
|
1121
|
+
a instanceof Promise ? e.push(a.then((e) => _n(e, n, i, t, u, d))) : _n(a, n, i, t, u, d);
|
|
1075
1122
|
}
|
|
1076
1123
|
return o.length && n.issues.push({
|
|
1077
1124
|
code: "unrecognized_keys",
|
|
@@ -1080,15 +1127,15 @@ function hn(e, t, n, r, i, a) {
|
|
|
1080
1127
|
inst: a
|
|
1081
1128
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1082
1129
|
}
|
|
1083
|
-
var
|
|
1084
|
-
if (
|
|
1130
|
+
var bn = /* @__PURE__ */ b("$ZodObject", (e, t) => {
|
|
1131
|
+
if (V.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1085
1132
|
let e = t.shape;
|
|
1086
1133
|
Object.defineProperty(t, "shape", { get: () => {
|
|
1087
1134
|
let n = { ...e };
|
|
1088
1135
|
return Object.defineProperty(t, "shape", { value: n }), n;
|
|
1089
1136
|
} });
|
|
1090
1137
|
}
|
|
1091
|
-
let n =
|
|
1138
|
+
let n = re(() => vn(t));
|
|
1092
1139
|
A(e._zod, "propValues", () => {
|
|
1093
1140
|
let e = t.shape, n = {};
|
|
1094
1141
|
for (let t in e) {
|
|
@@ -1113,18 +1160,18 @@ var gn = /* @__PURE__ */ b("$ZodObject", (e, t) => {
|
|
|
1113
1160
|
t.value = {};
|
|
1114
1161
|
let c = [], l = a.shape;
|
|
1115
1162
|
for (let e of a.keys) {
|
|
1116
|
-
let n = l[e], r = n._zod.
|
|
1163
|
+
let n = l[e], r = n._zod.optin === "optional", i = n._zod.optout === "optional", a = n._zod.run({
|
|
1117
1164
|
value: s[e],
|
|
1118
1165
|
issues: []
|
|
1119
1166
|
}, o);
|
|
1120
|
-
|
|
1167
|
+
a instanceof Promise ? c.push(a.then((n) => _n(n, t, e, s, r, i))) : _n(a, t, e, s, r, i);
|
|
1121
1168
|
}
|
|
1122
|
-
return i ?
|
|
1169
|
+
return i ? yn(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1123
1170
|
};
|
|
1124
|
-
}),
|
|
1125
|
-
|
|
1126
|
-
let n = e._zod.parse, r =
|
|
1127
|
-
let t = new
|
|
1171
|
+
}), xn = /* @__PURE__ */ b("$ZodObjectJIT", (e, t) => {
|
|
1172
|
+
bn.init(e, t);
|
|
1173
|
+
let n = e._zod.parse, r = re(() => vn(t)), i = (e) => {
|
|
1174
|
+
let t = new Ft([
|
|
1128
1175
|
"shape",
|
|
1129
1176
|
"payload",
|
|
1130
1177
|
"ctx"
|
|
@@ -1137,8 +1184,8 @@ var gn = /* @__PURE__ */ b("$ZodObject", (e, t) => {
|
|
|
1137
1184
|
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1138
1185
|
t.write("const newResult = {};");
|
|
1139
1186
|
for (let r of n.keys) {
|
|
1140
|
-
let n = a[r], o = N(r), s = e[r]?._zod?.optout === "optional";
|
|
1141
|
-
t.write(`const ${n} = ${i(r)};`),
|
|
1187
|
+
let n = a[r], o = N(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
|
|
1188
|
+
t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
|
|
1142
1189
|
if (${n}.issues.length) {
|
|
1143
1190
|
if (${o} in input) {
|
|
1144
1191
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -1156,7 +1203,7 @@ var gn = /* @__PURE__ */ b("$ZodObject", (e, t) => {
|
|
|
1156
1203
|
newResult[${o}] = ${n}.value;
|
|
1157
1204
|
}
|
|
1158
1205
|
|
|
1159
|
-
`) : t.write(`
|
|
1206
|
+
`) : c ? t.write(`
|
|
1160
1207
|
if (${n}.issues.length) {
|
|
1161
1208
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1162
1209
|
...iss,
|
|
@@ -1172,16 +1219,41 @@ var gn = /* @__PURE__ */ b("$ZodObject", (e, t) => {
|
|
|
1172
1219
|
newResult[${o}] = ${n}.value;
|
|
1173
1220
|
}
|
|
1174
1221
|
|
|
1222
|
+
`) : t.write(`
|
|
1223
|
+
const ${n}_present = ${o} in input;
|
|
1224
|
+
if (${n}.issues.length) {
|
|
1225
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1226
|
+
...iss,
|
|
1227
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1228
|
+
})));
|
|
1229
|
+
}
|
|
1230
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
1231
|
+
payload.issues.push({
|
|
1232
|
+
code: "invalid_type",
|
|
1233
|
+
expected: "nonoptional",
|
|
1234
|
+
input: undefined,
|
|
1235
|
+
path: [${o}]
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if (${n}_present) {
|
|
1240
|
+
if (${n}.value === undefined) {
|
|
1241
|
+
newResult[${o}] = undefined;
|
|
1242
|
+
} else {
|
|
1243
|
+
newResult[${o}] = ${n}.value;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1175
1247
|
`);
|
|
1176
1248
|
}
|
|
1177
1249
|
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1178
1250
|
let s = t.compile();
|
|
1179
1251
|
return (t, n) => s(e, t, n);
|
|
1180
|
-
}, a, o = P, s = !
|
|
1252
|
+
}, a, o = P, s = !S.jitless, c = s && oe.value, l = t.catchall, u;
|
|
1181
1253
|
e._zod.parse = (d, f) => {
|
|
1182
1254
|
u ??= r.value;
|
|
1183
1255
|
let p = d.value;
|
|
1184
|
-
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ?
|
|
1256
|
+
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? yn([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
|
|
1185
1257
|
expected: "object",
|
|
1186
1258
|
code: "invalid_type",
|
|
1187
1259
|
input: p,
|
|
@@ -1189,18 +1261,18 @@ var gn = /* @__PURE__ */ b("$ZodObject", (e, t) => {
|
|
|
1189
1261
|
}), d);
|
|
1190
1262
|
};
|
|
1191
1263
|
});
|
|
1192
|
-
function
|
|
1264
|
+
function Sn(e, t, n, r) {
|
|
1193
1265
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1194
|
-
let i = e.filter((e) => !
|
|
1266
|
+
let i = e.filter((e) => !R(e));
|
|
1195
1267
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1196
1268
|
code: "invalid_union",
|
|
1197
1269
|
input: t.value,
|
|
1198
1270
|
inst: n,
|
|
1199
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1271
|
+
errors: e.map((e) => e.issues.map((e) => z(e, r, C())))
|
|
1200
1272
|
}), t);
|
|
1201
1273
|
}
|
|
1202
|
-
var
|
|
1203
|
-
|
|
1274
|
+
var Cn = /* @__PURE__ */ b("$ZodUnion", (e, t) => {
|
|
1275
|
+
V.init(e, t), A(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), A(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), A(e._zod, "values", () => {
|
|
1204
1276
|
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1205
1277
|
}), A(e._zod, "pattern", () => {
|
|
1206
1278
|
if (t.options.every((e) => e._zod.pattern)) {
|
|
@@ -1208,25 +1280,25 @@ var yn = /* @__PURE__ */ b("$ZodUnion", (e, t) => {
|
|
|
1208
1280
|
return RegExp(`^(${e.map((e) => D(e.source)).join("|")})$`);
|
|
1209
1281
|
}
|
|
1210
1282
|
});
|
|
1211
|
-
let n = t.options.length === 1
|
|
1212
|
-
e._zod.parse = (
|
|
1213
|
-
if (n) return r
|
|
1214
|
-
let
|
|
1283
|
+
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
1284
|
+
e._zod.parse = (r, i) => {
|
|
1285
|
+
if (n) return n(r, i);
|
|
1286
|
+
let a = !1, o = [];
|
|
1215
1287
|
for (let e of t.options) {
|
|
1216
1288
|
let t = e._zod.run({
|
|
1217
|
-
value:
|
|
1289
|
+
value: r.value,
|
|
1218
1290
|
issues: []
|
|
1219
|
-
},
|
|
1220
|
-
if (t instanceof Promise)
|
|
1291
|
+
}, i);
|
|
1292
|
+
if (t instanceof Promise) o.push(t), a = !0;
|
|
1221
1293
|
else {
|
|
1222
1294
|
if (t.issues.length === 0) return t;
|
|
1223
|
-
|
|
1295
|
+
o.push(t);
|
|
1224
1296
|
}
|
|
1225
1297
|
}
|
|
1226
|
-
return
|
|
1298
|
+
return a ? Promise.all(o).then((t) => Sn(t, r, e, i)) : Sn(o, r, e, i);
|
|
1227
1299
|
};
|
|
1228
|
-
}),
|
|
1229
|
-
|
|
1300
|
+
}), wn = /* @__PURE__ */ b("$ZodIntersection", (e, t) => {
|
|
1301
|
+
V.init(e, t), e._zod.parse = (e, n) => {
|
|
1230
1302
|
let r = e.value, i = t.left._zod.run({
|
|
1231
1303
|
value: r,
|
|
1232
1304
|
issues: []
|
|
@@ -1234,21 +1306,21 @@ var yn = /* @__PURE__ */ b("$ZodUnion", (e, t) => {
|
|
|
1234
1306
|
value: r,
|
|
1235
1307
|
issues: []
|
|
1236
1308
|
}, n);
|
|
1237
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) =>
|
|
1309
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => En(e, t, n)) : En(e, i, a);
|
|
1238
1310
|
};
|
|
1239
1311
|
});
|
|
1240
|
-
function
|
|
1312
|
+
function Tn(e, t) {
|
|
1241
1313
|
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1242
1314
|
valid: !0,
|
|
1243
1315
|
data: e
|
|
1244
1316
|
};
|
|
1245
|
-
if (
|
|
1317
|
+
if (F(e) && F(t)) {
|
|
1246
1318
|
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1247
1319
|
...e,
|
|
1248
1320
|
...t
|
|
1249
1321
|
};
|
|
1250
1322
|
for (let n of r) {
|
|
1251
|
-
let r =
|
|
1323
|
+
let r = Tn(e[n], t[n]);
|
|
1252
1324
|
if (!r.valid) return {
|
|
1253
1325
|
valid: !1,
|
|
1254
1326
|
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
@@ -1267,7 +1339,7 @@ function xn(e, t) {
|
|
|
1267
1339
|
};
|
|
1268
1340
|
let n = [];
|
|
1269
1341
|
for (let r = 0; r < e.length; r++) {
|
|
1270
|
-
let i = e[r], a = t[r], o =
|
|
1342
|
+
let i = e[r], a = t[r], o = Tn(i, a);
|
|
1271
1343
|
if (!o.valid) return {
|
|
1272
1344
|
valid: !1,
|
|
1273
1345
|
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
@@ -1284,7 +1356,7 @@ function xn(e, t) {
|
|
|
1284
1356
|
mergeErrorPath: []
|
|
1285
1357
|
};
|
|
1286
1358
|
}
|
|
1287
|
-
function
|
|
1359
|
+
function En(e, t, n) {
|
|
1288
1360
|
let r = /* @__PURE__ */ new Map(), i;
|
|
1289
1361
|
for (let n of t.issues) if (n.code === "unrecognized_keys") {
|
|
1290
1362
|
i ??= n;
|
|
@@ -1296,13 +1368,13 @@ function Sn(e, t, n) {
|
|
|
1296
1368
|
if (a.length && i && e.issues.push({
|
|
1297
1369
|
...i,
|
|
1298
1370
|
keys: a
|
|
1299
|
-
}),
|
|
1300
|
-
let o =
|
|
1371
|
+
}), R(e)) return e;
|
|
1372
|
+
let o = Tn(t.value, n.value);
|
|
1301
1373
|
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1302
1374
|
return e.value = o.data, e;
|
|
1303
1375
|
}
|
|
1304
|
-
var
|
|
1305
|
-
|
|
1376
|
+
var Dn = /* @__PURE__ */ b("$ZodTuple", (e, t) => {
|
|
1377
|
+
V.init(e, t);
|
|
1306
1378
|
let n = t.items;
|
|
1307
1379
|
e._zod.parse = (r, i) => {
|
|
1308
1380
|
let a = r.value;
|
|
@@ -1313,53 +1385,75 @@ var Cn = /* @__PURE__ */ b("$ZodTuple", (e, t) => {
|
|
|
1313
1385
|
code: "invalid_type"
|
|
1314
1386
|
}), r;
|
|
1315
1387
|
r.value = [];
|
|
1316
|
-
let o = [], s =
|
|
1388
|
+
let o = [], s = On(n, "optin"), c = On(n, "optout");
|
|
1317
1389
|
if (!t.rest) {
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
maximum: n.length,
|
|
1323
|
-
inclusive: !0
|
|
1324
|
-
} : {
|
|
1325
|
-
code: "too_small",
|
|
1326
|
-
minimum: n.length
|
|
1327
|
-
},
|
|
1390
|
+
if (a.length < s) return r.issues.push({
|
|
1391
|
+
code: "too_small",
|
|
1392
|
+
minimum: s,
|
|
1393
|
+
inclusive: !0,
|
|
1328
1394
|
input: a,
|
|
1329
1395
|
inst: e,
|
|
1330
1396
|
origin: "array"
|
|
1331
1397
|
}), r;
|
|
1398
|
+
a.length > n.length && r.issues.push({
|
|
1399
|
+
code: "too_big",
|
|
1400
|
+
maximum: n.length,
|
|
1401
|
+
inclusive: !0,
|
|
1402
|
+
input: a,
|
|
1403
|
+
inst: e,
|
|
1404
|
+
origin: "array"
|
|
1405
|
+
});
|
|
1332
1406
|
}
|
|
1333
|
-
let l =
|
|
1334
|
-
for (let e
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
value: a[l],
|
|
1407
|
+
let l = Array(n.length);
|
|
1408
|
+
for (let e = 0; e < n.length; e++) {
|
|
1409
|
+
let t = n[e]._zod.run({
|
|
1410
|
+
value: a[e],
|
|
1338
1411
|
issues: []
|
|
1339
1412
|
}, i);
|
|
1340
|
-
t instanceof Promise ? o.push(t.then((
|
|
1413
|
+
t instanceof Promise ? o.push(t.then((t) => {
|
|
1414
|
+
l[e] = t;
|
|
1415
|
+
})) : l[e] = t;
|
|
1341
1416
|
}
|
|
1342
1417
|
if (t.rest) {
|
|
1343
|
-
let e = a.slice(n.length);
|
|
1344
|
-
for (let n of
|
|
1345
|
-
|
|
1346
|
-
let
|
|
1418
|
+
let e = n.length - 1, s = a.slice(n.length);
|
|
1419
|
+
for (let n of s) {
|
|
1420
|
+
e++;
|
|
1421
|
+
let a = t.rest._zod.run({
|
|
1347
1422
|
value: n,
|
|
1348
1423
|
issues: []
|
|
1349
1424
|
}, i);
|
|
1350
|
-
|
|
1425
|
+
a instanceof Promise ? o.push(a.then((t) => kn(t, r, e))) : kn(a, r, e);
|
|
1351
1426
|
}
|
|
1352
1427
|
}
|
|
1353
|
-
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1428
|
+
return o.length ? Promise.all(o).then(() => An(l, r, n, a, c)) : An(l, r, n, a, c);
|
|
1354
1429
|
};
|
|
1355
1430
|
});
|
|
1356
|
-
function
|
|
1357
|
-
e.
|
|
1431
|
+
function On(e, t) {
|
|
1432
|
+
for (let n = e.length - 1; n >= 0; n--) if (e[n]._zod[t] !== "optional") return n + 1;
|
|
1433
|
+
return 0;
|
|
1434
|
+
}
|
|
1435
|
+
function kn(e, t, n) {
|
|
1436
|
+
e.issues.length && t.issues.push(...be(n, e.issues)), t.value[n] = e.value;
|
|
1437
|
+
}
|
|
1438
|
+
function An(e, t, n, r, i) {
|
|
1439
|
+
for (let a = 0; a < n.length; a++) {
|
|
1440
|
+
let n = e[a], o = a < r.length;
|
|
1441
|
+
if (n.issues.length) {
|
|
1442
|
+
if (!o && a >= i) {
|
|
1443
|
+
t.value.length = a;
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
t.issues.push(...be(a, n.issues));
|
|
1447
|
+
}
|
|
1448
|
+
t.value[a] = n.value;
|
|
1449
|
+
}
|
|
1450
|
+
for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
|
|
1451
|
+
return t;
|
|
1358
1452
|
}
|
|
1359
|
-
var
|
|
1360
|
-
|
|
1361
|
-
let n =
|
|
1362
|
-
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) =>
|
|
1453
|
+
var jn = /* @__PURE__ */ b("$ZodEnum", (e, t) => {
|
|
1454
|
+
V.init(e, t);
|
|
1455
|
+
let n = w(t.entries), r = new Set(n);
|
|
1456
|
+
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ce.has(typeof e)).map((e) => typeof e == "string" ? le(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1363
1457
|
let a = t.value;
|
|
1364
1458
|
return r.has(a) || t.issues.push({
|
|
1365
1459
|
code: "invalid_value",
|
|
@@ -1368,62 +1462,62 @@ var Tn = /* @__PURE__ */ b("$ZodEnum", (e, t) => {
|
|
|
1368
1462
|
inst: e
|
|
1369
1463
|
}), t;
|
|
1370
1464
|
};
|
|
1371
|
-
}),
|
|
1372
|
-
|
|
1373
|
-
if (r.direction === "backward") throw new
|
|
1465
|
+
}), Mn = /* @__PURE__ */ b("$ZodTransform", (e, t) => {
|
|
1466
|
+
V.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
|
|
1467
|
+
if (r.direction === "backward") throw new ne(e.constructor.name);
|
|
1374
1468
|
let i = t.transform(n.value, n);
|
|
1375
|
-
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1469
|
+
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
|
|
1376
1470
|
if (i instanceof Promise) throw new x();
|
|
1377
|
-
return n.value = i, n;
|
|
1471
|
+
return n.value = i, n.fallback = !0, n;
|
|
1378
1472
|
};
|
|
1379
1473
|
});
|
|
1380
|
-
function
|
|
1381
|
-
return e.issues.length
|
|
1474
|
+
function Nn(e, t) {
|
|
1475
|
+
return t === void 0 && (e.issues.length || e.fallback) ? {
|
|
1382
1476
|
issues: [],
|
|
1383
1477
|
value: void 0
|
|
1384
1478
|
} : e;
|
|
1385
1479
|
}
|
|
1386
|
-
var
|
|
1387
|
-
|
|
1480
|
+
var Pn = /* @__PURE__ */ b("$ZodOptional", (e, t) => {
|
|
1481
|
+
V.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", A(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), A(e._zod, "pattern", () => {
|
|
1388
1482
|
let e = t.innerType._zod.pattern;
|
|
1389
1483
|
return e ? RegExp(`^(${D(e.source)})?$`) : void 0;
|
|
1390
1484
|
}), e._zod.parse = (e, n) => {
|
|
1391
1485
|
if (t.innerType._zod.optin === "optional") {
|
|
1392
|
-
let r = t.innerType._zod.run(e, n);
|
|
1393
|
-
return
|
|
1486
|
+
let r = e.value, i = t.innerType._zod.run(e, n);
|
|
1487
|
+
return i instanceof Promise ? i.then((e) => Nn(e, r)) : Nn(i, r);
|
|
1394
1488
|
}
|
|
1395
1489
|
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1396
1490
|
};
|
|
1397
|
-
}),
|
|
1398
|
-
|
|
1399
|
-
}),
|
|
1400
|
-
|
|
1491
|
+
}), Fn = /* @__PURE__ */ b("$ZodExactOptional", (e, t) => {
|
|
1492
|
+
Pn.init(e, t), A(e._zod, "values", () => t.innerType._zod.values), A(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1493
|
+
}), In = /* @__PURE__ */ b("$ZodNullable", (e, t) => {
|
|
1494
|
+
V.init(e, t), A(e._zod, "optin", () => t.innerType._zod.optin), A(e._zod, "optout", () => t.innerType._zod.optout), A(e._zod, "pattern", () => {
|
|
1401
1495
|
let e = t.innerType._zod.pattern;
|
|
1402
1496
|
return e ? RegExp(`^(${D(e.source)}|null)$`) : void 0;
|
|
1403
1497
|
}), A(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1404
|
-
}),
|
|
1405
|
-
|
|
1498
|
+
}), Ln = /* @__PURE__ */ b("$ZodDefault", (e, t) => {
|
|
1499
|
+
V.init(e, t), e._zod.optin = "optional", A(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1406
1500
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1407
1501
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1408
1502
|
let r = t.innerType._zod.run(e, n);
|
|
1409
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1503
|
+
return r instanceof Promise ? r.then((e) => Rn(e, t)) : Rn(r, t);
|
|
1410
1504
|
};
|
|
1411
1505
|
});
|
|
1412
|
-
function
|
|
1506
|
+
function Rn(e, t) {
|
|
1413
1507
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1414
1508
|
}
|
|
1415
|
-
var
|
|
1416
|
-
|
|
1417
|
-
}),
|
|
1418
|
-
|
|
1509
|
+
var zn = /* @__PURE__ */ b("$ZodPrefault", (e, t) => {
|
|
1510
|
+
V.init(e, t), e._zod.optin = "optional", A(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1511
|
+
}), Bn = /* @__PURE__ */ b("$ZodNonOptional", (e, t) => {
|
|
1512
|
+
V.init(e, t), A(e._zod, "values", () => {
|
|
1419
1513
|
let e = t.innerType._zod.values;
|
|
1420
1514
|
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
1421
1515
|
}), e._zod.parse = (n, r) => {
|
|
1422
1516
|
let i = t.innerType._zod.run(n, r);
|
|
1423
|
-
return i instanceof Promise ? i.then((t) =>
|
|
1517
|
+
return i instanceof Promise ? i.then((t) => Vn(t, e)) : Vn(i, e);
|
|
1424
1518
|
};
|
|
1425
1519
|
});
|
|
1426
|
-
function
|
|
1520
|
+
function Vn(e, t) {
|
|
1427
1521
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1428
1522
|
code: "invalid_type",
|
|
1429
1523
|
expected: "nonoptional",
|
|
@@ -1431,54 +1525,55 @@ function Fn(e, t) {
|
|
|
1431
1525
|
inst: t
|
|
1432
1526
|
}), e;
|
|
1433
1527
|
}
|
|
1434
|
-
var
|
|
1435
|
-
|
|
1528
|
+
var Hn = /* @__PURE__ */ b("$ZodCatch", (e, t) => {
|
|
1529
|
+
V.init(e, t), e._zod.optin = "optional", A(e._zod, "optout", () => t.innerType._zod.optout), A(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1436
1530
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1437
1531
|
let r = t.innerType._zod.run(e, n);
|
|
1438
1532
|
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1439
1533
|
...e,
|
|
1440
|
-
error: { issues: r.issues.map((e) =>
|
|
1534
|
+
error: { issues: r.issues.map((e) => z(e, n, C())) },
|
|
1441
1535
|
input: e.value
|
|
1442
|
-
}), e.issues = []), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1536
|
+
}), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1443
1537
|
...e,
|
|
1444
|
-
error: { issues: r.issues.map((e) =>
|
|
1538
|
+
error: { issues: r.issues.map((e) => z(e, n, C())) },
|
|
1445
1539
|
input: e.value
|
|
1446
|
-
}), e.issues = []), e);
|
|
1540
|
+
}), e.issues = [], e.fallback = !0), e);
|
|
1447
1541
|
};
|
|
1448
|
-
}),
|
|
1449
|
-
|
|
1542
|
+
}), Un = /* @__PURE__ */ b("$ZodPipe", (e, t) => {
|
|
1543
|
+
V.init(e, t), A(e._zod, "values", () => t.in._zod.values), A(e._zod, "optin", () => t.in._zod.optin), A(e._zod, "optout", () => t.out._zod.optout), A(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1450
1544
|
if (n.direction === "backward") {
|
|
1451
1545
|
let r = t.out._zod.run(e, n);
|
|
1452
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1546
|
+
return r instanceof Promise ? r.then((e) => Wn(e, t.in, n)) : Wn(r, t.in, n);
|
|
1453
1547
|
}
|
|
1454
1548
|
let r = t.in._zod.run(e, n);
|
|
1455
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1549
|
+
return r instanceof Promise ? r.then((e) => Wn(e, t.out, n)) : Wn(r, t.out, n);
|
|
1456
1550
|
};
|
|
1457
1551
|
});
|
|
1458
|
-
function
|
|
1552
|
+
function Wn(e, t, n) {
|
|
1459
1553
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
|
|
1460
1554
|
value: e.value,
|
|
1461
|
-
issues: e.issues
|
|
1555
|
+
issues: e.issues,
|
|
1556
|
+
fallback: e.fallback
|
|
1462
1557
|
}, n);
|
|
1463
1558
|
}
|
|
1464
|
-
var
|
|
1465
|
-
|
|
1559
|
+
var Gn = /* @__PURE__ */ b("$ZodReadonly", (e, t) => {
|
|
1560
|
+
V.init(e, t), A(e._zod, "propValues", () => t.innerType._zod.propValues), A(e._zod, "values", () => t.innerType._zod.values), A(e._zod, "optin", () => t.innerType?._zod?.optin), A(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1466
1561
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1467
1562
|
let r = t.innerType._zod.run(e, n);
|
|
1468
|
-
return r instanceof Promise ? r.then(
|
|
1563
|
+
return r instanceof Promise ? r.then(Kn) : Kn(r);
|
|
1469
1564
|
};
|
|
1470
1565
|
});
|
|
1471
|
-
function
|
|
1566
|
+
function Kn(e) {
|
|
1472
1567
|
return e.value = Object.freeze(e.value), e;
|
|
1473
1568
|
}
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1569
|
+
var qn = /* @__PURE__ */ b("$ZodCustom", (e, t) => {
|
|
1570
|
+
B.init(e, t), V.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1476
1571
|
let r = n.value, i = t.fn(r);
|
|
1477
|
-
if (i instanceof Promise) return i.then((t) =>
|
|
1478
|
-
|
|
1572
|
+
if (i instanceof Promise) return i.then((t) => Jn(t, n, r, e));
|
|
1573
|
+
Jn(i, n, r, e);
|
|
1479
1574
|
};
|
|
1480
1575
|
});
|
|
1481
|
-
function
|
|
1576
|
+
function Jn(e, t, n, r) {
|
|
1482
1577
|
if (!e) {
|
|
1483
1578
|
let e = {
|
|
1484
1579
|
code: "custom",
|
|
@@ -1487,12 +1582,12 @@ function Hn(e, t, n, r) {
|
|
|
1487
1582
|
path: [...r._zod.def.path ?? []],
|
|
1488
1583
|
continue: !r._zod.def.abort
|
|
1489
1584
|
};
|
|
1490
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(
|
|
1585
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Ce(e));
|
|
1491
1586
|
}
|
|
1492
1587
|
}
|
|
1493
1588
|
//#endregion
|
|
1494
|
-
//#region ../../node_modules/.pnpm/zod@4.3
|
|
1495
|
-
var
|
|
1589
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
1590
|
+
var Yn, Xn = class {
|
|
1496
1591
|
constructor() {
|
|
1497
1592
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1498
1593
|
}
|
|
@@ -1524,245 +1619,245 @@ var Un, Wn = class {
|
|
|
1524
1619
|
return this._map.has(e);
|
|
1525
1620
|
}
|
|
1526
1621
|
};
|
|
1527
|
-
function
|
|
1528
|
-
return new
|
|
1622
|
+
function Zn() {
|
|
1623
|
+
return new Xn();
|
|
1529
1624
|
}
|
|
1530
|
-
(
|
|
1531
|
-
var
|
|
1625
|
+
(Yn = globalThis).__zod_globalRegistry ?? (Yn.__zod_globalRegistry = Zn());
|
|
1626
|
+
var Qn = globalThis.__zod_globalRegistry;
|
|
1532
1627
|
//#endregion
|
|
1533
|
-
//#region ../../node_modules/.pnpm/zod@4.3
|
|
1628
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
1534
1629
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1535
|
-
function
|
|
1630
|
+
function $n(e, t) {
|
|
1536
1631
|
return new e({
|
|
1537
1632
|
type: "string",
|
|
1538
|
-
...
|
|
1633
|
+
...L(t)
|
|
1539
1634
|
});
|
|
1540
1635
|
}
|
|
1541
1636
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1542
|
-
function
|
|
1637
|
+
function er(e, t) {
|
|
1543
1638
|
return new e({
|
|
1544
1639
|
type: "string",
|
|
1545
1640
|
format: "email",
|
|
1546
1641
|
check: "string_format",
|
|
1547
1642
|
abort: !1,
|
|
1548
|
-
...
|
|
1643
|
+
...L(t)
|
|
1549
1644
|
});
|
|
1550
1645
|
}
|
|
1551
1646
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1552
|
-
function
|
|
1647
|
+
function tr(e, t) {
|
|
1553
1648
|
return new e({
|
|
1554
1649
|
type: "string",
|
|
1555
1650
|
format: "guid",
|
|
1556
1651
|
check: "string_format",
|
|
1557
1652
|
abort: !1,
|
|
1558
|
-
...
|
|
1653
|
+
...L(t)
|
|
1559
1654
|
});
|
|
1560
1655
|
}
|
|
1561
1656
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1562
|
-
function
|
|
1657
|
+
function nr(e, t) {
|
|
1563
1658
|
return new e({
|
|
1564
1659
|
type: "string",
|
|
1565
1660
|
format: "uuid",
|
|
1566
1661
|
check: "string_format",
|
|
1567
1662
|
abort: !1,
|
|
1568
|
-
...
|
|
1663
|
+
...L(t)
|
|
1569
1664
|
});
|
|
1570
1665
|
}
|
|
1571
1666
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1572
|
-
function
|
|
1667
|
+
function rr(e, t) {
|
|
1573
1668
|
return new e({
|
|
1574
1669
|
type: "string",
|
|
1575
1670
|
format: "uuid",
|
|
1576
1671
|
check: "string_format",
|
|
1577
1672
|
abort: !1,
|
|
1578
1673
|
version: "v4",
|
|
1579
|
-
...
|
|
1674
|
+
...L(t)
|
|
1580
1675
|
});
|
|
1581
1676
|
}
|
|
1582
1677
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1583
|
-
function
|
|
1678
|
+
function ir(e, t) {
|
|
1584
1679
|
return new e({
|
|
1585
1680
|
type: "string",
|
|
1586
1681
|
format: "uuid",
|
|
1587
1682
|
check: "string_format",
|
|
1588
1683
|
abort: !1,
|
|
1589
1684
|
version: "v6",
|
|
1590
|
-
...
|
|
1685
|
+
...L(t)
|
|
1591
1686
|
});
|
|
1592
1687
|
}
|
|
1593
1688
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1594
|
-
function
|
|
1689
|
+
function ar(e, t) {
|
|
1595
1690
|
return new e({
|
|
1596
1691
|
type: "string",
|
|
1597
1692
|
format: "uuid",
|
|
1598
1693
|
check: "string_format",
|
|
1599
1694
|
abort: !1,
|
|
1600
1695
|
version: "v7",
|
|
1601
|
-
...
|
|
1696
|
+
...L(t)
|
|
1602
1697
|
});
|
|
1603
1698
|
}
|
|
1604
1699
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1605
|
-
function
|
|
1700
|
+
function or(e, t) {
|
|
1606
1701
|
return new e({
|
|
1607
1702
|
type: "string",
|
|
1608
1703
|
format: "url",
|
|
1609
1704
|
check: "string_format",
|
|
1610
1705
|
abort: !1,
|
|
1611
|
-
...
|
|
1706
|
+
...L(t)
|
|
1612
1707
|
});
|
|
1613
1708
|
}
|
|
1614
1709
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1615
|
-
function
|
|
1710
|
+
function sr(e, t) {
|
|
1616
1711
|
return new e({
|
|
1617
1712
|
type: "string",
|
|
1618
1713
|
format: "emoji",
|
|
1619
1714
|
check: "string_format",
|
|
1620
1715
|
abort: !1,
|
|
1621
|
-
...
|
|
1716
|
+
...L(t)
|
|
1622
1717
|
});
|
|
1623
1718
|
}
|
|
1624
1719
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1625
|
-
function
|
|
1720
|
+
function cr(e, t) {
|
|
1626
1721
|
return new e({
|
|
1627
1722
|
type: "string",
|
|
1628
1723
|
format: "nanoid",
|
|
1629
1724
|
check: "string_format",
|
|
1630
1725
|
abort: !1,
|
|
1631
|
-
...
|
|
1726
|
+
...L(t)
|
|
1632
1727
|
});
|
|
1633
1728
|
}
|
|
1634
1729
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1635
|
-
function
|
|
1730
|
+
function lr(e, t) {
|
|
1636
1731
|
return new e({
|
|
1637
1732
|
type: "string",
|
|
1638
1733
|
format: "cuid",
|
|
1639
1734
|
check: "string_format",
|
|
1640
1735
|
abort: !1,
|
|
1641
|
-
...
|
|
1736
|
+
...L(t)
|
|
1642
1737
|
});
|
|
1643
1738
|
}
|
|
1644
1739
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1645
|
-
function
|
|
1740
|
+
function ur(e, t) {
|
|
1646
1741
|
return new e({
|
|
1647
1742
|
type: "string",
|
|
1648
1743
|
format: "cuid2",
|
|
1649
1744
|
check: "string_format",
|
|
1650
1745
|
abort: !1,
|
|
1651
|
-
...
|
|
1746
|
+
...L(t)
|
|
1652
1747
|
});
|
|
1653
1748
|
}
|
|
1654
1749
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1655
|
-
function
|
|
1750
|
+
function dr(e, t) {
|
|
1656
1751
|
return new e({
|
|
1657
1752
|
type: "string",
|
|
1658
1753
|
format: "ulid",
|
|
1659
1754
|
check: "string_format",
|
|
1660
1755
|
abort: !1,
|
|
1661
|
-
...
|
|
1756
|
+
...L(t)
|
|
1662
1757
|
});
|
|
1663
1758
|
}
|
|
1664
1759
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1665
|
-
function
|
|
1760
|
+
function fr(e, t) {
|
|
1666
1761
|
return new e({
|
|
1667
1762
|
type: "string",
|
|
1668
1763
|
format: "xid",
|
|
1669
1764
|
check: "string_format",
|
|
1670
1765
|
abort: !1,
|
|
1671
|
-
...
|
|
1766
|
+
...L(t)
|
|
1672
1767
|
});
|
|
1673
1768
|
}
|
|
1674
1769
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1675
|
-
function
|
|
1770
|
+
function pr(e, t) {
|
|
1676
1771
|
return new e({
|
|
1677
1772
|
type: "string",
|
|
1678
1773
|
format: "ksuid",
|
|
1679
1774
|
check: "string_format",
|
|
1680
1775
|
abort: !1,
|
|
1681
|
-
...
|
|
1776
|
+
...L(t)
|
|
1682
1777
|
});
|
|
1683
1778
|
}
|
|
1684
1779
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1685
|
-
function
|
|
1780
|
+
function mr(e, t) {
|
|
1686
1781
|
return new e({
|
|
1687
1782
|
type: "string",
|
|
1688
1783
|
format: "ipv4",
|
|
1689
1784
|
check: "string_format",
|
|
1690
1785
|
abort: !1,
|
|
1691
|
-
...
|
|
1786
|
+
...L(t)
|
|
1692
1787
|
});
|
|
1693
1788
|
}
|
|
1694
1789
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1695
|
-
function
|
|
1790
|
+
function hr(e, t) {
|
|
1696
1791
|
return new e({
|
|
1697
1792
|
type: "string",
|
|
1698
1793
|
format: "ipv6",
|
|
1699
1794
|
check: "string_format",
|
|
1700
1795
|
abort: !1,
|
|
1701
|
-
...
|
|
1796
|
+
...L(t)
|
|
1702
1797
|
});
|
|
1703
1798
|
}
|
|
1704
1799
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1705
|
-
function
|
|
1800
|
+
function gr(e, t) {
|
|
1706
1801
|
return new e({
|
|
1707
1802
|
type: "string",
|
|
1708
1803
|
format: "cidrv4",
|
|
1709
1804
|
check: "string_format",
|
|
1710
1805
|
abort: !1,
|
|
1711
|
-
...
|
|
1806
|
+
...L(t)
|
|
1712
1807
|
});
|
|
1713
1808
|
}
|
|
1714
1809
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1715
|
-
function
|
|
1810
|
+
function _r(e, t) {
|
|
1716
1811
|
return new e({
|
|
1717
1812
|
type: "string",
|
|
1718
1813
|
format: "cidrv6",
|
|
1719
1814
|
check: "string_format",
|
|
1720
1815
|
abort: !1,
|
|
1721
|
-
...
|
|
1816
|
+
...L(t)
|
|
1722
1817
|
});
|
|
1723
1818
|
}
|
|
1724
1819
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1725
|
-
function
|
|
1820
|
+
function vr(e, t) {
|
|
1726
1821
|
return new e({
|
|
1727
1822
|
type: "string",
|
|
1728
1823
|
format: "base64",
|
|
1729
1824
|
check: "string_format",
|
|
1730
1825
|
abort: !1,
|
|
1731
|
-
...
|
|
1826
|
+
...L(t)
|
|
1732
1827
|
});
|
|
1733
1828
|
}
|
|
1734
1829
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1735
|
-
function
|
|
1830
|
+
function yr(e, t) {
|
|
1736
1831
|
return new e({
|
|
1737
1832
|
type: "string",
|
|
1738
1833
|
format: "base64url",
|
|
1739
1834
|
check: "string_format",
|
|
1740
1835
|
abort: !1,
|
|
1741
|
-
...
|
|
1836
|
+
...L(t)
|
|
1742
1837
|
});
|
|
1743
1838
|
}
|
|
1744
1839
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1745
|
-
function
|
|
1840
|
+
function br(e, t) {
|
|
1746
1841
|
return new e({
|
|
1747
1842
|
type: "string",
|
|
1748
1843
|
format: "e164",
|
|
1749
1844
|
check: "string_format",
|
|
1750
1845
|
abort: !1,
|
|
1751
|
-
...
|
|
1846
|
+
...L(t)
|
|
1752
1847
|
});
|
|
1753
1848
|
}
|
|
1754
1849
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1755
|
-
function
|
|
1850
|
+
function xr(e, t) {
|
|
1756
1851
|
return new e({
|
|
1757
1852
|
type: "string",
|
|
1758
1853
|
format: "jwt",
|
|
1759
1854
|
check: "string_format",
|
|
1760
1855
|
abort: !1,
|
|
1761
|
-
...
|
|
1856
|
+
...L(t)
|
|
1762
1857
|
});
|
|
1763
1858
|
}
|
|
1764
1859
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1765
|
-
function
|
|
1860
|
+
function Sr(e, t) {
|
|
1766
1861
|
return new e({
|
|
1767
1862
|
type: "string",
|
|
1768
1863
|
format: "datetime",
|
|
@@ -1770,256 +1865,256 @@ function gr(e, t) {
|
|
|
1770
1865
|
offset: !1,
|
|
1771
1866
|
local: !1,
|
|
1772
1867
|
precision: null,
|
|
1773
|
-
...
|
|
1868
|
+
...L(t)
|
|
1774
1869
|
});
|
|
1775
1870
|
}
|
|
1776
1871
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1777
|
-
function
|
|
1872
|
+
function Cr(e, t) {
|
|
1778
1873
|
return new e({
|
|
1779
1874
|
type: "string",
|
|
1780
1875
|
format: "date",
|
|
1781
1876
|
check: "string_format",
|
|
1782
|
-
...
|
|
1877
|
+
...L(t)
|
|
1783
1878
|
});
|
|
1784
1879
|
}
|
|
1785
1880
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1786
|
-
function
|
|
1881
|
+
function wr(e, t) {
|
|
1787
1882
|
return new e({
|
|
1788
1883
|
type: "string",
|
|
1789
1884
|
format: "time",
|
|
1790
1885
|
check: "string_format",
|
|
1791
1886
|
precision: null,
|
|
1792
|
-
...
|
|
1887
|
+
...L(t)
|
|
1793
1888
|
});
|
|
1794
1889
|
}
|
|
1795
1890
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1796
|
-
function
|
|
1891
|
+
function Tr(e, t) {
|
|
1797
1892
|
return new e({
|
|
1798
1893
|
type: "string",
|
|
1799
1894
|
format: "duration",
|
|
1800
1895
|
check: "string_format",
|
|
1801
|
-
...
|
|
1896
|
+
...L(t)
|
|
1802
1897
|
});
|
|
1803
1898
|
}
|
|
1804
1899
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1805
|
-
function
|
|
1900
|
+
function Er(e, t) {
|
|
1806
1901
|
return new e({
|
|
1807
1902
|
type: "number",
|
|
1808
1903
|
checks: [],
|
|
1809
|
-
...
|
|
1904
|
+
...L(t)
|
|
1810
1905
|
});
|
|
1811
1906
|
}
|
|
1812
1907
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1813
|
-
function
|
|
1908
|
+
function Dr(e, t) {
|
|
1814
1909
|
return new e({
|
|
1815
1910
|
type: "number",
|
|
1816
1911
|
check: "number_format",
|
|
1817
1912
|
abort: !1,
|
|
1818
1913
|
format: "safeint",
|
|
1819
|
-
...
|
|
1914
|
+
...L(t)
|
|
1820
1915
|
});
|
|
1821
1916
|
}
|
|
1822
1917
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1823
|
-
function
|
|
1918
|
+
function Or(e) {
|
|
1824
1919
|
return new e({ type: "unknown" });
|
|
1825
1920
|
}
|
|
1826
1921
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1827
|
-
function
|
|
1922
|
+
function kr(e, t) {
|
|
1828
1923
|
return new e({
|
|
1829
1924
|
type: "never",
|
|
1830
|
-
...
|
|
1925
|
+
...L(t)
|
|
1831
1926
|
});
|
|
1832
1927
|
}
|
|
1833
1928
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1834
|
-
function
|
|
1835
|
-
return new
|
|
1929
|
+
function Ar(e, t) {
|
|
1930
|
+
return new bt({
|
|
1836
1931
|
check: "less_than",
|
|
1837
|
-
...
|
|
1932
|
+
...L(t),
|
|
1838
1933
|
value: e,
|
|
1839
1934
|
inclusive: !1
|
|
1840
1935
|
});
|
|
1841
1936
|
}
|
|
1842
1937
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1843
|
-
function
|
|
1844
|
-
return new
|
|
1938
|
+
function jr(e, t) {
|
|
1939
|
+
return new bt({
|
|
1845
1940
|
check: "less_than",
|
|
1846
|
-
...
|
|
1941
|
+
...L(t),
|
|
1847
1942
|
value: e,
|
|
1848
1943
|
inclusive: !0
|
|
1849
1944
|
});
|
|
1850
1945
|
}
|
|
1851
1946
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1852
|
-
function
|
|
1853
|
-
return new
|
|
1947
|
+
function Mr(e, t) {
|
|
1948
|
+
return new xt({
|
|
1854
1949
|
check: "greater_than",
|
|
1855
|
-
...
|
|
1950
|
+
...L(t),
|
|
1856
1951
|
value: e,
|
|
1857
1952
|
inclusive: !1
|
|
1858
1953
|
});
|
|
1859
1954
|
}
|
|
1860
1955
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1861
|
-
function
|
|
1862
|
-
return new
|
|
1956
|
+
function Nr(e, t) {
|
|
1957
|
+
return new xt({
|
|
1863
1958
|
check: "greater_than",
|
|
1864
|
-
...
|
|
1959
|
+
...L(t),
|
|
1865
1960
|
value: e,
|
|
1866
1961
|
inclusive: !0
|
|
1867
1962
|
});
|
|
1868
1963
|
}
|
|
1869
1964
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1870
|
-
function
|
|
1871
|
-
return new
|
|
1965
|
+
function Pr(e, t) {
|
|
1966
|
+
return new St({
|
|
1872
1967
|
check: "multiple_of",
|
|
1873
|
-
...
|
|
1968
|
+
...L(t),
|
|
1874
1969
|
value: e
|
|
1875
1970
|
});
|
|
1876
1971
|
}
|
|
1877
1972
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1878
|
-
function
|
|
1879
|
-
return new
|
|
1973
|
+
function Fr(e, t) {
|
|
1974
|
+
return new wt({
|
|
1880
1975
|
check: "max_length",
|
|
1881
|
-
...
|
|
1976
|
+
...L(t),
|
|
1882
1977
|
maximum: e
|
|
1883
1978
|
});
|
|
1884
1979
|
}
|
|
1885
1980
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1886
|
-
function
|
|
1887
|
-
return new
|
|
1981
|
+
function Ir(e, t) {
|
|
1982
|
+
return new Tt({
|
|
1888
1983
|
check: "min_length",
|
|
1889
|
-
...
|
|
1984
|
+
...L(t),
|
|
1890
1985
|
minimum: e
|
|
1891
1986
|
});
|
|
1892
1987
|
}
|
|
1893
1988
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1894
|
-
function
|
|
1895
|
-
return new
|
|
1989
|
+
function Lr(e, t) {
|
|
1990
|
+
return new Et({
|
|
1896
1991
|
check: "length_equals",
|
|
1897
|
-
...
|
|
1992
|
+
...L(t),
|
|
1898
1993
|
length: e
|
|
1899
1994
|
});
|
|
1900
1995
|
}
|
|
1901
1996
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1902
|
-
function
|
|
1903
|
-
return new
|
|
1997
|
+
function Rr(e, t) {
|
|
1998
|
+
return new Ot({
|
|
1904
1999
|
check: "string_format",
|
|
1905
2000
|
format: "regex",
|
|
1906
|
-
...
|
|
2001
|
+
...L(t),
|
|
1907
2002
|
pattern: e
|
|
1908
2003
|
});
|
|
1909
2004
|
}
|
|
1910
2005
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1911
|
-
function
|
|
1912
|
-
return new
|
|
2006
|
+
function zr(e) {
|
|
2007
|
+
return new kt({
|
|
1913
2008
|
check: "string_format",
|
|
1914
2009
|
format: "lowercase",
|
|
1915
|
-
...
|
|
2010
|
+
...L(e)
|
|
1916
2011
|
});
|
|
1917
2012
|
}
|
|
1918
2013
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1919
|
-
function
|
|
1920
|
-
return new
|
|
2014
|
+
function Br(e) {
|
|
2015
|
+
return new At({
|
|
1921
2016
|
check: "string_format",
|
|
1922
2017
|
format: "uppercase",
|
|
1923
|
-
...
|
|
2018
|
+
...L(e)
|
|
1924
2019
|
});
|
|
1925
2020
|
}
|
|
1926
2021
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1927
|
-
function
|
|
1928
|
-
return new
|
|
2022
|
+
function Vr(e, t) {
|
|
2023
|
+
return new jt({
|
|
1929
2024
|
check: "string_format",
|
|
1930
2025
|
format: "includes",
|
|
1931
|
-
...
|
|
2026
|
+
...L(t),
|
|
1932
2027
|
includes: e
|
|
1933
2028
|
});
|
|
1934
2029
|
}
|
|
1935
2030
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1936
|
-
function
|
|
1937
|
-
return new
|
|
2031
|
+
function Hr(e, t) {
|
|
2032
|
+
return new Mt({
|
|
1938
2033
|
check: "string_format",
|
|
1939
2034
|
format: "starts_with",
|
|
1940
|
-
...
|
|
2035
|
+
...L(t),
|
|
1941
2036
|
prefix: e
|
|
1942
2037
|
});
|
|
1943
2038
|
}
|
|
1944
2039
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1945
|
-
function
|
|
1946
|
-
return new
|
|
2040
|
+
function Ur(e, t) {
|
|
2041
|
+
return new Nt({
|
|
1947
2042
|
check: "string_format",
|
|
1948
2043
|
format: "ends_with",
|
|
1949
|
-
...
|
|
2044
|
+
...L(t),
|
|
1950
2045
|
suffix: e
|
|
1951
2046
|
});
|
|
1952
2047
|
}
|
|
1953
2048
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1954
|
-
function
|
|
1955
|
-
return new
|
|
2049
|
+
function U(e) {
|
|
2050
|
+
return new Pt({
|
|
1956
2051
|
check: "overwrite",
|
|
1957
2052
|
tx: e
|
|
1958
2053
|
});
|
|
1959
2054
|
}
|
|
1960
2055
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1961
|
-
function
|
|
1962
|
-
return /* @__PURE__ */
|
|
2056
|
+
function Wr(e) {
|
|
2057
|
+
return /* @__PURE__ */ U((t) => t.normalize(e));
|
|
1963
2058
|
}
|
|
1964
2059
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1965
|
-
function
|
|
1966
|
-
return /* @__PURE__ */
|
|
2060
|
+
function Gr() {
|
|
2061
|
+
return /* @__PURE__ */ U((e) => e.trim());
|
|
1967
2062
|
}
|
|
1968
2063
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1969
|
-
function
|
|
1970
|
-
return /* @__PURE__ */
|
|
2064
|
+
function Kr() {
|
|
2065
|
+
return /* @__PURE__ */ U((e) => e.toLowerCase());
|
|
1971
2066
|
}
|
|
1972
2067
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1973
|
-
function
|
|
1974
|
-
return /* @__PURE__ */
|
|
2068
|
+
function qr() {
|
|
2069
|
+
return /* @__PURE__ */ U((e) => e.toUpperCase());
|
|
1975
2070
|
}
|
|
1976
2071
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1977
|
-
function
|
|
1978
|
-
return /* @__PURE__ */
|
|
2072
|
+
function Jr() {
|
|
2073
|
+
return /* @__PURE__ */ U((e) => ie(e));
|
|
1979
2074
|
}
|
|
1980
2075
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1981
|
-
function
|
|
2076
|
+
function Yr(e, t, n) {
|
|
1982
2077
|
return new e({
|
|
1983
2078
|
type: "array",
|
|
1984
2079
|
element: t,
|
|
1985
|
-
...
|
|
2080
|
+
...L(n)
|
|
1986
2081
|
});
|
|
1987
2082
|
}
|
|
1988
2083
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1989
|
-
function
|
|
2084
|
+
function Xr(e, t, n) {
|
|
1990
2085
|
return new e({
|
|
1991
2086
|
type: "custom",
|
|
1992
2087
|
check: "custom",
|
|
1993
2088
|
fn: t,
|
|
1994
|
-
...
|
|
2089
|
+
...L(n)
|
|
1995
2090
|
});
|
|
1996
2091
|
}
|
|
1997
2092
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1998
|
-
function
|
|
1999
|
-
let
|
|
2000
|
-
if (typeof e == "string")
|
|
2093
|
+
function Zr(e, t) {
|
|
2094
|
+
let n = /* @__PURE__ */ Qr((t) => (t.addIssue = (e) => {
|
|
2095
|
+
if (typeof e == "string") t.issues.push(Ce(e, t.value, n._zod.def));
|
|
2001
2096
|
else {
|
|
2002
2097
|
let r = e;
|
|
2003
|
-
r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??=
|
|
2098
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(Ce(r));
|
|
2004
2099
|
}
|
|
2005
|
-
}, e(
|
|
2006
|
-
return
|
|
2100
|
+
}, e(t.value, t)), t);
|
|
2101
|
+
return n;
|
|
2007
2102
|
}
|
|
2008
2103
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2009
|
-
function
|
|
2010
|
-
let n = new
|
|
2104
|
+
function Qr(e, t) {
|
|
2105
|
+
let n = new B({
|
|
2011
2106
|
check: "custom",
|
|
2012
|
-
...
|
|
2107
|
+
...L(t)
|
|
2013
2108
|
});
|
|
2014
2109
|
return n._zod.check = e, n;
|
|
2015
2110
|
}
|
|
2016
2111
|
//#endregion
|
|
2017
|
-
//#region ../../node_modules/.pnpm/zod@4.3
|
|
2018
|
-
function
|
|
2112
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
2113
|
+
function $r(e) {
|
|
2019
2114
|
let t = e?.target ?? "draft-2020-12";
|
|
2020
2115
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2021
2116
|
processors: e.processors ?? {},
|
|
2022
|
-
metadataRegistry: e?.metadata ??
|
|
2117
|
+
metadataRegistry: e?.metadata ?? Qn,
|
|
2023
2118
|
target: t,
|
|
2024
2119
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2025
2120
|
override: e?.override ?? (() => {}),
|
|
@@ -2031,7 +2126,7 @@ function qr(e) {
|
|
|
2031
2126
|
external: e?.external ?? void 0
|
|
2032
2127
|
};
|
|
2033
2128
|
}
|
|
2034
|
-
function
|
|
2129
|
+
function W(e, t, n = {
|
|
2035
2130
|
path: [],
|
|
2036
2131
|
schemaPath: []
|
|
2037
2132
|
}) {
|
|
@@ -2060,12 +2155,12 @@ function G(e, t, n = {
|
|
|
2060
2155
|
a(e, t, n, r);
|
|
2061
2156
|
}
|
|
2062
2157
|
let a = e._zod.parent;
|
|
2063
|
-
a && (o.ref ||= a,
|
|
2158
|
+
a && (o.ref ||= a, W(a, t, r), t.seen.get(a).isParent = !0);
|
|
2064
2159
|
}
|
|
2065
2160
|
let c = t.metadataRegistry.get(e);
|
|
2066
|
-
return c && Object.assign(o.schema, c), t.io === "input" &&
|
|
2161
|
+
return c && Object.assign(o.schema, c), t.io === "input" && G(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
|
|
2067
2162
|
}
|
|
2068
|
-
function
|
|
2163
|
+
function ei(e, t) {
|
|
2069
2164
|
let n = e.seen.get(t);
|
|
2070
2165
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2071
2166
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -2135,7 +2230,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2135
2230
|
}
|
|
2136
2231
|
}
|
|
2137
2232
|
}
|
|
2138
|
-
function
|
|
2233
|
+
function ti(e, t) {
|
|
2139
2234
|
let n = e.seen.get(t);
|
|
2140
2235
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2141
2236
|
let r = (t) => {
|
|
@@ -2168,20 +2263,22 @@ function Yr(e, t) {
|
|
|
2168
2263
|
i.$id = e.external.uri(n);
|
|
2169
2264
|
}
|
|
2170
2265
|
Object.assign(i, n.def ?? n.schema);
|
|
2171
|
-
let a = e.
|
|
2266
|
+
let a = e.metadataRegistry.get(t)?.id;
|
|
2267
|
+
a !== void 0 && i.id === a && delete i.id;
|
|
2268
|
+
let o = e.external?.defs ?? {};
|
|
2172
2269
|
for (let t of e.seen.entries()) {
|
|
2173
2270
|
let e = t[1];
|
|
2174
|
-
e.def && e.defId && (
|
|
2271
|
+
e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def);
|
|
2175
2272
|
}
|
|
2176
|
-
e.external || Object.keys(
|
|
2273
|
+
e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
|
|
2177
2274
|
try {
|
|
2178
2275
|
let n = JSON.parse(JSON.stringify(i));
|
|
2179
2276
|
return Object.defineProperty(n, "~standard", {
|
|
2180
2277
|
value: {
|
|
2181
2278
|
...t["~standard"],
|
|
2182
2279
|
jsonSchema: {
|
|
2183
|
-
input:
|
|
2184
|
-
output:
|
|
2280
|
+
input: ri(t, "input", e.processors),
|
|
2281
|
+
output: ri(t, "output", e.processors)
|
|
2185
2282
|
}
|
|
2186
2283
|
},
|
|
2187
2284
|
enumerable: !1,
|
|
@@ -2191,87 +2288,89 @@ function Yr(e, t) {
|
|
|
2191
2288
|
throw Error("Error converting schema to JSON.");
|
|
2192
2289
|
}
|
|
2193
2290
|
}
|
|
2194
|
-
function
|
|
2291
|
+
function G(e, t) {
|
|
2195
2292
|
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
2196
2293
|
if (n.seen.has(e)) return !1;
|
|
2197
2294
|
n.seen.add(e);
|
|
2198
2295
|
let r = e._zod.def;
|
|
2199
2296
|
if (r.type === "transform") return !0;
|
|
2200
|
-
if (r.type === "array") return
|
|
2201
|
-
if (r.type === "set") return
|
|
2202
|
-
if (r.type === "lazy") return
|
|
2203
|
-
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return
|
|
2204
|
-
if (r.type === "intersection") return
|
|
2205
|
-
if (r.type === "record" || r.type === "map") return
|
|
2206
|
-
if (r.type === "pipe") return
|
|
2297
|
+
if (r.type === "array") return G(r.element, n);
|
|
2298
|
+
if (r.type === "set") return G(r.valueType, n);
|
|
2299
|
+
if (r.type === "lazy") return G(r.getter(), n);
|
|
2300
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return G(r.innerType, n);
|
|
2301
|
+
if (r.type === "intersection") return G(r.left, n) || G(r.right, n);
|
|
2302
|
+
if (r.type === "record" || r.type === "map") return G(r.keyType, n) || G(r.valueType, n);
|
|
2303
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : G(r.in, n) || G(r.out, n);
|
|
2207
2304
|
if (r.type === "object") {
|
|
2208
|
-
for (let e in r.shape) if (
|
|
2305
|
+
for (let e in r.shape) if (G(r.shape[e], n)) return !0;
|
|
2209
2306
|
return !1;
|
|
2210
2307
|
}
|
|
2211
2308
|
if (r.type === "union") {
|
|
2212
|
-
for (let e of r.options) if (
|
|
2309
|
+
for (let e of r.options) if (G(e, n)) return !0;
|
|
2213
2310
|
return !1;
|
|
2214
2311
|
}
|
|
2215
2312
|
if (r.type === "tuple") {
|
|
2216
|
-
for (let e of r.items) if (
|
|
2217
|
-
return !!(r.rest &&
|
|
2313
|
+
for (let e of r.items) if (G(e, n)) return !0;
|
|
2314
|
+
return !!(r.rest && G(r.rest, n));
|
|
2218
2315
|
}
|
|
2219
2316
|
return !1;
|
|
2220
2317
|
}
|
|
2221
|
-
var
|
|
2222
|
-
let r =
|
|
2318
|
+
var ni = (e, t = {}) => (n) => {
|
|
2319
|
+
let r = $r({
|
|
2223
2320
|
...n,
|
|
2224
2321
|
processors: t
|
|
2225
2322
|
});
|
|
2226
|
-
return
|
|
2227
|
-
},
|
|
2228
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
2323
|
+
return W(e, r), ei(r, e), ti(r, e);
|
|
2324
|
+
}, ri = (e, t, n = {}) => (r) => {
|
|
2325
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = $r({
|
|
2229
2326
|
...i ?? {},
|
|
2230
2327
|
target: a,
|
|
2231
2328
|
io: t,
|
|
2232
2329
|
processors: n
|
|
2233
2330
|
});
|
|
2234
|
-
return
|
|
2235
|
-
},
|
|
2331
|
+
return W(e, o), ei(o, e), ti(o, e);
|
|
2332
|
+
}, ii = {
|
|
2236
2333
|
guid: "uuid",
|
|
2237
2334
|
url: "uri",
|
|
2238
2335
|
datetime: "date-time",
|
|
2239
2336
|
json_string: "json-string",
|
|
2240
2337
|
regex: ""
|
|
2241
|
-
},
|
|
2338
|
+
}, ai = (e, t, n, r) => {
|
|
2242
2339
|
let i = n;
|
|
2243
2340
|
i.type = "string";
|
|
2244
2341
|
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
|
|
2245
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format =
|
|
2342
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ii[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
2246
2343
|
let e = [...c];
|
|
2247
2344
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
2248
2345
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2249
2346
|
pattern: e.source
|
|
2250
2347
|
}))]);
|
|
2251
2348
|
}
|
|
2252
|
-
},
|
|
2349
|
+
}, oi = (e, t, n, r) => {
|
|
2253
2350
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
2254
|
-
typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number"
|
|
2255
|
-
|
|
2351
|
+
typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number";
|
|
2352
|
+
let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
|
|
2353
|
+
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (i.multipleOf = c);
|
|
2354
|
+
}, si = (e, t, n, r) => {
|
|
2256
2355
|
n.not = {};
|
|
2257
|
-
},
|
|
2258
|
-
let i = e._zod.def, a =
|
|
2356
|
+
}, ci = (e, t, n, r) => {
|
|
2357
|
+
let i = e._zod.def, a = w(i.entries);
|
|
2259
2358
|
a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
|
|
2260
|
-
},
|
|
2359
|
+
}, li = (e, t, n, r) => {
|
|
2261
2360
|
if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
|
|
2262
|
-
},
|
|
2361
|
+
}, ui = (e, t, n, r) => {
|
|
2263
2362
|
if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
|
|
2264
|
-
},
|
|
2363
|
+
}, di = (e, t, n, r) => {
|
|
2265
2364
|
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
2266
|
-
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items =
|
|
2365
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = W(a.element, t, {
|
|
2267
2366
|
...r,
|
|
2268
2367
|
path: [...r.path, "items"]
|
|
2269
2368
|
});
|
|
2270
|
-
},
|
|
2369
|
+
}, fi = (e, t, n, r) => {
|
|
2271
2370
|
let i = n, a = e._zod.def;
|
|
2272
2371
|
i.type = "object", i.properties = {};
|
|
2273
2372
|
let o = a.shape;
|
|
2274
|
-
for (let e in o) i.properties[e] =
|
|
2373
|
+
for (let e in o) i.properties[e] = W(o[e], t, {
|
|
2275
2374
|
...r,
|
|
2276
2375
|
path: [
|
|
2277
2376
|
...r.path,
|
|
@@ -2283,12 +2382,12 @@ var Xr = (e, t = {}) => (n) => {
|
|
|
2283
2382
|
let n = a.shape[e]._zod;
|
|
2284
2383
|
return t.io === "input" ? n.optin === void 0 : n.optout === void 0;
|
|
2285
2384
|
}));
|
|
2286
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties =
|
|
2385
|
+
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = W(a.catchall, t, {
|
|
2287
2386
|
...r,
|
|
2288
2387
|
path: [...r.path, "additionalProperties"]
|
|
2289
2388
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
2290
|
-
},
|
|
2291
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) =>
|
|
2389
|
+
}, pi = (e, t, n, r) => {
|
|
2390
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => W(e, t, {
|
|
2292
2391
|
...r,
|
|
2293
2392
|
path: [
|
|
2294
2393
|
...r.path,
|
|
@@ -2297,15 +2396,15 @@ var Xr = (e, t = {}) => (n) => {
|
|
|
2297
2396
|
]
|
|
2298
2397
|
}));
|
|
2299
2398
|
a ? n.oneOf = o : n.anyOf = o;
|
|
2300
|
-
},
|
|
2301
|
-
let i = e._zod.def, a =
|
|
2399
|
+
}, mi = (e, t, n, r) => {
|
|
2400
|
+
let i = e._zod.def, a = W(i.left, t, {
|
|
2302
2401
|
...r,
|
|
2303
2402
|
path: [
|
|
2304
2403
|
...r.path,
|
|
2305
2404
|
"allOf",
|
|
2306
2405
|
0
|
|
2307
2406
|
]
|
|
2308
|
-
}), o =
|
|
2407
|
+
}), o = W(i.right, t, {
|
|
2309
2408
|
...r,
|
|
2310
2409
|
path: [
|
|
2311
2410
|
...r.path,
|
|
@@ -2314,17 +2413,17 @@ var Xr = (e, t = {}) => (n) => {
|
|
|
2314
2413
|
]
|
|
2315
2414
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1;
|
|
2316
2415
|
n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
2317
|
-
},
|
|
2416
|
+
}, hi = (e, t, n, r) => {
|
|
2318
2417
|
let i = n, a = e._zod.def;
|
|
2319
2418
|
i.type = "array";
|
|
2320
|
-
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) =>
|
|
2419
|
+
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => W(e, t, {
|
|
2321
2420
|
...r,
|
|
2322
2421
|
path: [
|
|
2323
2422
|
...r.path,
|
|
2324
2423
|
o,
|
|
2325
2424
|
n
|
|
2326
2425
|
]
|
|
2327
|
-
})), l = a.rest ?
|
|
2426
|
+
})), l = a.rest ? W(a.rest, t, {
|
|
2328
2427
|
...r,
|
|
2329
2428
|
path: [
|
|
2330
2429
|
...r.path,
|
|
@@ -2335,27 +2434,27 @@ var Xr = (e, t = {}) => (n) => {
|
|
|
2335
2434
|
t.target === "draft-2020-12" ? (i.prefixItems = c, l && (i.items = l)) : t.target === "openapi-3.0" ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), i.minItems = c.length, l || (i.maxItems = c.length)) : (i.items = c, l && (i.additionalItems = l));
|
|
2336
2435
|
let { minimum: u, maximum: d } = e._zod.bag;
|
|
2337
2436
|
typeof u == "number" && (i.minItems = u), typeof d == "number" && (i.maxItems = d);
|
|
2338
|
-
},
|
|
2339
|
-
let i = e._zod.def, a =
|
|
2437
|
+
}, gi = (e, t, n, r) => {
|
|
2438
|
+
let i = e._zod.def, a = W(i.innerType, t, r), o = t.seen.get(e);
|
|
2340
2439
|
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
2341
|
-
},
|
|
2440
|
+
}, _i = (e, t, n, r) => {
|
|
2342
2441
|
let i = e._zod.def;
|
|
2343
|
-
|
|
2442
|
+
W(i.innerType, t, r);
|
|
2344
2443
|
let a = t.seen.get(e);
|
|
2345
2444
|
a.ref = i.innerType;
|
|
2346
|
-
},
|
|
2445
|
+
}, vi = (e, t, n, r) => {
|
|
2347
2446
|
let i = e._zod.def;
|
|
2348
|
-
|
|
2447
|
+
W(i.innerType, t, r);
|
|
2349
2448
|
let a = t.seen.get(e);
|
|
2350
2449
|
a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
|
|
2351
|
-
},
|
|
2450
|
+
}, yi = (e, t, n, r) => {
|
|
2352
2451
|
let i = e._zod.def;
|
|
2353
|
-
|
|
2452
|
+
W(i.innerType, t, r);
|
|
2354
2453
|
let a = t.seen.get(e);
|
|
2355
2454
|
a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
|
|
2356
|
-
},
|
|
2455
|
+
}, bi = (e, t, n, r) => {
|
|
2357
2456
|
let i = e._zod.def;
|
|
2358
|
-
|
|
2457
|
+
W(i.innerType, t, r);
|
|
2359
2458
|
let a = t.seen.get(e);
|
|
2360
2459
|
a.ref = i.innerType;
|
|
2361
2460
|
let o;
|
|
@@ -2365,51 +2464,49 @@ var Xr = (e, t = {}) => (n) => {
|
|
|
2365
2464
|
throw Error("Dynamic catch values are not supported in JSON Schema");
|
|
2366
2465
|
}
|
|
2367
2466
|
n.default = o;
|
|
2368
|
-
},
|
|
2369
|
-
let i = e._zod.def, a =
|
|
2370
|
-
|
|
2371
|
-
let
|
|
2372
|
-
|
|
2373
|
-
},
|
|
2467
|
+
}, xi = (e, t, n, r) => {
|
|
2468
|
+
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
2469
|
+
W(o, t, r);
|
|
2470
|
+
let s = t.seen.get(e);
|
|
2471
|
+
s.ref = o;
|
|
2472
|
+
}, Si = (e, t, n, r) => {
|
|
2374
2473
|
let i = e._zod.def;
|
|
2375
|
-
|
|
2474
|
+
W(i.innerType, t, r);
|
|
2376
2475
|
let a = t.seen.get(e);
|
|
2377
2476
|
a.ref = i.innerType, n.readOnly = !0;
|
|
2378
|
-
},
|
|
2477
|
+
}, Ci = (e, t, n, r) => {
|
|
2379
2478
|
let i = e._zod.def;
|
|
2380
|
-
|
|
2479
|
+
W(i.innerType, t, r);
|
|
2381
2480
|
let a = t.seen.get(e);
|
|
2382
2481
|
a.ref = i.innerType;
|
|
2383
|
-
},
|
|
2384
|
-
|
|
2482
|
+
}, wi = /* @__PURE__ */ b("ZodISODateTime", (e, t) => {
|
|
2483
|
+
Yt.init(e, t), Y.init(e, t);
|
|
2385
2484
|
});
|
|
2386
|
-
function
|
|
2387
|
-
return /* @__PURE__ */
|
|
2485
|
+
function Ti(e) {
|
|
2486
|
+
return /* @__PURE__ */ Sr(wi, e);
|
|
2388
2487
|
}
|
|
2389
|
-
var
|
|
2390
|
-
|
|
2488
|
+
var Ei = /* @__PURE__ */ b("ZodISODate", (e, t) => {
|
|
2489
|
+
Xt.init(e, t), Y.init(e, t);
|
|
2391
2490
|
});
|
|
2392
|
-
function
|
|
2393
|
-
return /* @__PURE__ */
|
|
2491
|
+
function Di(e) {
|
|
2492
|
+
return /* @__PURE__ */ Cr(Ei, e);
|
|
2394
2493
|
}
|
|
2395
|
-
var
|
|
2396
|
-
|
|
2494
|
+
var Oi = /* @__PURE__ */ b("ZodISOTime", (e, t) => {
|
|
2495
|
+
Zt.init(e, t), Y.init(e, t);
|
|
2397
2496
|
});
|
|
2398
|
-
function
|
|
2399
|
-
return /* @__PURE__ */
|
|
2497
|
+
function ki(e) {
|
|
2498
|
+
return /* @__PURE__ */ wr(Oi, e);
|
|
2400
2499
|
}
|
|
2401
|
-
var
|
|
2402
|
-
|
|
2500
|
+
var Ai = /* @__PURE__ */ b("ZodISODuration", (e, t) => {
|
|
2501
|
+
Qt.init(e, t), Y.init(e, t);
|
|
2403
2502
|
});
|
|
2404
|
-
function
|
|
2405
|
-
return /* @__PURE__ */
|
|
2503
|
+
function ji(e) {
|
|
2504
|
+
return /* @__PURE__ */ Tr(Ai, e);
|
|
2406
2505
|
}
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
format: { value: (t) => Te(e, t) },
|
|
2412
|
-
flatten: { value: (t) => we(e, t) },
|
|
2506
|
+
var K = /* @__PURE__ */ b("ZodError", (e, t) => {
|
|
2507
|
+
Te.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2508
|
+
format: { value: (t) => Oe(e, t) },
|
|
2509
|
+
flatten: { value: (t) => De(e, t) },
|
|
2413
2510
|
addIssue: { value: (t) => {
|
|
2414
2511
|
e.issues.push(t), e.message = JSON.stringify(e.issues, T, 2);
|
|
2415
2512
|
} },
|
|
@@ -2420,326 +2517,582 @@ var Ei = (e, t) => {
|
|
|
2420
2517
|
return e.issues.length === 0;
|
|
2421
2518
|
} }
|
|
2422
2519
|
});
|
|
2423
|
-
};
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2520
|
+
}, { Parent: Error }), Mi = /* @__PURE__ */ ke(K), Ni = /* @__PURE__ */ Ae(K), Pi = /* @__PURE__ */ je(K), Fi = /* @__PURE__ */ Ne(K), Ii = /* @__PURE__ */ Fe(K), Li = /* @__PURE__ */ Ie(K), Ri = /* @__PURE__ */ Le(K), zi = /* @__PURE__ */ Re(K), Bi = /* @__PURE__ */ ze(K), Vi = /* @__PURE__ */ Be(K), Hi = /* @__PURE__ */ Ve(K), Ui = /* @__PURE__ */ He(K), Wi = /* @__PURE__ */ new WeakMap();
|
|
2521
|
+
function q(e, t, n) {
|
|
2522
|
+
let r = Object.getPrototypeOf(e), i = Wi.get(r);
|
|
2523
|
+
if (i || (i = /* @__PURE__ */ new Set(), Wi.set(r, i)), !i.has(t)) {
|
|
2524
|
+
i.add(t);
|
|
2525
|
+
for (let e in n) {
|
|
2526
|
+
let t = n[e];
|
|
2527
|
+
Object.defineProperty(r, e, {
|
|
2528
|
+
configurable: !0,
|
|
2529
|
+
enumerable: !1,
|
|
2530
|
+
get() {
|
|
2531
|
+
let n = t.bind(this);
|
|
2532
|
+
return Object.defineProperty(this, e, {
|
|
2533
|
+
configurable: !0,
|
|
2534
|
+
writable: !0,
|
|
2535
|
+
enumerable: !0,
|
|
2536
|
+
value: n
|
|
2537
|
+
}), n;
|
|
2538
|
+
},
|
|
2539
|
+
set(t) {
|
|
2540
|
+
Object.defineProperty(this, e, {
|
|
2541
|
+
configurable: !0,
|
|
2542
|
+
writable: !0,
|
|
2543
|
+
enumerable: !0,
|
|
2544
|
+
value: t
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
});
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
var J = /* @__PURE__ */ b("ZodType", (e, t) => (V.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2552
|
+
input: ri(e, "input"),
|
|
2553
|
+
output: ri(e, "output")
|
|
2554
|
+
} }), e.toJSONSchema = ni(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Mi(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => Pi(e, t, n), e.parseAsync = async (t, n) => Ni(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Fi(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Ii(e, t, n), e.decode = (t, n) => Li(e, t, n), e.encodeAsync = async (t, n) => Ri(e, t, n), e.decodeAsync = async (t, n) => zi(e, t, n), e.safeEncode = (t, n) => Bi(e, t, n), e.safeDecode = (t, n) => Vi(e, t, n), e.safeEncodeAsync = async (t, n) => Hi(e, t, n), e.safeDecodeAsync = async (t, n) => Ui(e, t, n), q(e, "ZodType", {
|
|
2555
|
+
check(...e) {
|
|
2556
|
+
let t = this.def;
|
|
2557
|
+
return this.clone(M(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
2558
|
+
check: e,
|
|
2559
|
+
def: { check: "custom" },
|
|
2560
|
+
onattach: []
|
|
2561
|
+
} } : e)] }), { parent: !0 });
|
|
2562
|
+
},
|
|
2563
|
+
with(...e) {
|
|
2564
|
+
return this.check(...e);
|
|
2565
|
+
},
|
|
2566
|
+
clone(e, t) {
|
|
2567
|
+
return I(this, e, t);
|
|
2568
|
+
},
|
|
2569
|
+
brand() {
|
|
2570
|
+
return this;
|
|
2571
|
+
},
|
|
2572
|
+
register(e, t) {
|
|
2573
|
+
return e.add(this, t), this;
|
|
2574
|
+
},
|
|
2575
|
+
refine(e, t) {
|
|
2576
|
+
return this.check(eo(e, t));
|
|
2577
|
+
},
|
|
2578
|
+
superRefine(e, t) {
|
|
2579
|
+
return this.check(to(e, t));
|
|
2580
|
+
},
|
|
2581
|
+
overwrite(e) {
|
|
2582
|
+
return this.check(/* @__PURE__ */ U(e));
|
|
2583
|
+
},
|
|
2584
|
+
optional() {
|
|
2585
|
+
return Ia(this);
|
|
2586
|
+
},
|
|
2587
|
+
exactOptional() {
|
|
2588
|
+
return Ra(this);
|
|
2589
|
+
},
|
|
2590
|
+
nullable() {
|
|
2591
|
+
return Ba(this);
|
|
2592
|
+
},
|
|
2593
|
+
nullish() {
|
|
2594
|
+
return Ia(Ba(this));
|
|
2595
|
+
},
|
|
2596
|
+
nonoptional(e) {
|
|
2597
|
+
return Ka(this, e);
|
|
2598
|
+
},
|
|
2599
|
+
array() {
|
|
2600
|
+
return Sa(this);
|
|
2601
|
+
},
|
|
2602
|
+
or(e) {
|
|
2603
|
+
return Ea([this, e]);
|
|
2604
|
+
},
|
|
2605
|
+
and(e) {
|
|
2606
|
+
return Oa(this, e);
|
|
2607
|
+
},
|
|
2608
|
+
transform(e) {
|
|
2609
|
+
return Xa(this, Pa(e));
|
|
2610
|
+
},
|
|
2611
|
+
default(e) {
|
|
2612
|
+
return Ha(this, e);
|
|
2613
|
+
},
|
|
2614
|
+
prefault(e) {
|
|
2615
|
+
return Wa(this, e);
|
|
2616
|
+
},
|
|
2617
|
+
catch(e) {
|
|
2618
|
+
return Ja(this, e);
|
|
2619
|
+
},
|
|
2620
|
+
pipe(e) {
|
|
2621
|
+
return Xa(this, e);
|
|
2622
|
+
},
|
|
2623
|
+
readonly() {
|
|
2624
|
+
return Qa(this);
|
|
2625
|
+
},
|
|
2626
|
+
describe(e) {
|
|
2627
|
+
let t = this.clone();
|
|
2628
|
+
return Qn.add(t, { description: e }), t;
|
|
2629
|
+
},
|
|
2630
|
+
meta(...e) {
|
|
2631
|
+
if (e.length === 0) return Qn.get(this);
|
|
2632
|
+
let t = this.clone();
|
|
2633
|
+
return Qn.add(t, e[0]), t;
|
|
2634
|
+
},
|
|
2635
|
+
isOptional() {
|
|
2636
|
+
return this.safeParse(void 0).success;
|
|
2637
|
+
},
|
|
2638
|
+
isNullable() {
|
|
2639
|
+
return this.safeParse(null).success;
|
|
2640
|
+
},
|
|
2641
|
+
apply(e) {
|
|
2642
|
+
return e(this);
|
|
2643
|
+
}
|
|
2644
|
+
}), Object.defineProperty(e, "description", {
|
|
2436
2645
|
get() {
|
|
2437
|
-
return
|
|
2646
|
+
return Qn.get(e)?.description;
|
|
2438
2647
|
},
|
|
2439
2648
|
configurable: !0
|
|
2440
|
-
}), e
|
|
2441
|
-
|
|
2442
|
-
let n = e.clone();
|
|
2443
|
-
return Kn.add(n, t[0]), n;
|
|
2444
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), zi = /* @__PURE__ */ b("_ZodString", (e, t) => {
|
|
2445
|
-
Nt.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => $r(e, t, n, r);
|
|
2649
|
+
}), e)), Gi = /* @__PURE__ */ b("_ZodString", (e, t) => {
|
|
2650
|
+
Lt.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => ai(e, t, n, r);
|
|
2446
2651
|
let n = e._zod.bag;
|
|
2447
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null,
|
|
2448
|
-
|
|
2449
|
-
|
|
2652
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, q(e, "_ZodString", {
|
|
2653
|
+
regex(...e) {
|
|
2654
|
+
return this.check(/* @__PURE__ */ Rr(...e));
|
|
2655
|
+
},
|
|
2656
|
+
includes(...e) {
|
|
2657
|
+
return this.check(/* @__PURE__ */ Vr(...e));
|
|
2658
|
+
},
|
|
2659
|
+
startsWith(...e) {
|
|
2660
|
+
return this.check(/* @__PURE__ */ Hr(...e));
|
|
2661
|
+
},
|
|
2662
|
+
endsWith(...e) {
|
|
2663
|
+
return this.check(/* @__PURE__ */ Ur(...e));
|
|
2664
|
+
},
|
|
2665
|
+
min(...e) {
|
|
2666
|
+
return this.check(/* @__PURE__ */ Ir(...e));
|
|
2667
|
+
},
|
|
2668
|
+
max(...e) {
|
|
2669
|
+
return this.check(/* @__PURE__ */ Fr(...e));
|
|
2670
|
+
},
|
|
2671
|
+
length(...e) {
|
|
2672
|
+
return this.check(/* @__PURE__ */ Lr(...e));
|
|
2673
|
+
},
|
|
2674
|
+
nonempty(...e) {
|
|
2675
|
+
return this.check(/* @__PURE__ */ Ir(1, ...e));
|
|
2676
|
+
},
|
|
2677
|
+
lowercase(e) {
|
|
2678
|
+
return this.check(/* @__PURE__ */ zr(e));
|
|
2679
|
+
},
|
|
2680
|
+
uppercase(e) {
|
|
2681
|
+
return this.check(/* @__PURE__ */ Br(e));
|
|
2682
|
+
},
|
|
2683
|
+
trim() {
|
|
2684
|
+
return this.check(/* @__PURE__ */ Gr());
|
|
2685
|
+
},
|
|
2686
|
+
normalize(...e) {
|
|
2687
|
+
return this.check(/* @__PURE__ */ Wr(...e));
|
|
2688
|
+
},
|
|
2689
|
+
toLowerCase() {
|
|
2690
|
+
return this.check(/* @__PURE__ */ Kr());
|
|
2691
|
+
},
|
|
2692
|
+
toUpperCase() {
|
|
2693
|
+
return this.check(/* @__PURE__ */ qr());
|
|
2694
|
+
},
|
|
2695
|
+
slugify() {
|
|
2696
|
+
return this.check(/* @__PURE__ */ Jr());
|
|
2697
|
+
}
|
|
2698
|
+
});
|
|
2699
|
+
}), Ki = /* @__PURE__ */ b("ZodString", (e, t) => {
|
|
2700
|
+
Lt.init(e, t), Gi.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ er(Ji, t)), e.url = (t) => e.check(/* @__PURE__ */ or(Zi, t)), e.jwt = (t) => e.check(/* @__PURE__ */ xr(fa, t)), e.emoji = (t) => e.check(/* @__PURE__ */ sr(Qi, t)), e.guid = (t) => e.check(/* @__PURE__ */ tr(Yi, t)), e.uuid = (t) => e.check(/* @__PURE__ */ nr(Xi, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ rr(Xi, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ ir(Xi, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ ar(Xi, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ cr($i, t)), e.guid = (t) => e.check(/* @__PURE__ */ tr(Yi, t)), e.cuid = (t) => e.check(/* @__PURE__ */ lr(ea, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ ur(ta, t)), e.ulid = (t) => e.check(/* @__PURE__ */ dr(na, t)), e.base64 = (t) => e.check(/* @__PURE__ */ vr(la, t)), e.base64url = (t) => e.check(/* @__PURE__ */ yr(ua, t)), e.xid = (t) => e.check(/* @__PURE__ */ fr(ra, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ pr(ia, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ mr(aa, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ hr(oa, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ gr(sa, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ _r(ca, t)), e.e164 = (t) => e.check(/* @__PURE__ */ br(da, t)), e.datetime = (t) => e.check(Ti(t)), e.date = (t) => e.check(Di(t)), e.time = (t) => e.check(ki(t)), e.duration = (t) => e.check(ji(t));
|
|
2450
2701
|
});
|
|
2451
|
-
function
|
|
2452
|
-
return /* @__PURE__ */
|
|
2702
|
+
function qi(e) {
|
|
2703
|
+
return /* @__PURE__ */ $n(Ki, e);
|
|
2453
2704
|
}
|
|
2454
2705
|
var Y = /* @__PURE__ */ b("ZodStringFormat", (e, t) => {
|
|
2455
|
-
|
|
2456
|
-
}),
|
|
2457
|
-
|
|
2458
|
-
}),
|
|
2459
|
-
Pt.init(e, t), Y.init(e, t);
|
|
2460
|
-
}), Wi = /* @__PURE__ */ b("ZodUUID", (e, t) => {
|
|
2461
|
-
Ft.init(e, t), Y.init(e, t);
|
|
2462
|
-
}), Gi = /* @__PURE__ */ b("ZodURL", (e, t) => {
|
|
2463
|
-
Lt.init(e, t), Y.init(e, t);
|
|
2464
|
-
}), Ki = /* @__PURE__ */ b("ZodEmoji", (e, t) => {
|
|
2706
|
+
H.init(e, t), Gi.init(e, t);
|
|
2707
|
+
}), Ji = /* @__PURE__ */ b("ZodEmail", (e, t) => {
|
|
2708
|
+
Bt.init(e, t), Y.init(e, t);
|
|
2709
|
+
}), Yi = /* @__PURE__ */ b("ZodGUID", (e, t) => {
|
|
2465
2710
|
Rt.init(e, t), Y.init(e, t);
|
|
2466
|
-
}),
|
|
2711
|
+
}), Xi = /* @__PURE__ */ b("ZodUUID", (e, t) => {
|
|
2467
2712
|
zt.init(e, t), Y.init(e, t);
|
|
2468
|
-
}),
|
|
2469
|
-
Bt.init(e, t), Y.init(e, t);
|
|
2470
|
-
}), Yi = /* @__PURE__ */ b("ZodCUID2", (e, t) => {
|
|
2713
|
+
}), Zi = /* @__PURE__ */ b("ZodURL", (e, t) => {
|
|
2471
2714
|
Vt.init(e, t), Y.init(e, t);
|
|
2472
|
-
}),
|
|
2715
|
+
}), Qi = /* @__PURE__ */ b("ZodEmoji", (e, t) => {
|
|
2473
2716
|
Ht.init(e, t), Y.init(e, t);
|
|
2474
|
-
}),
|
|
2717
|
+
}), $i = /* @__PURE__ */ b("ZodNanoID", (e, t) => {
|
|
2475
2718
|
Ut.init(e, t), Y.init(e, t);
|
|
2476
|
-
}),
|
|
2719
|
+
}), ea = /* @__PURE__ */ b("ZodCUID", (e, t) => {
|
|
2477
2720
|
Wt.init(e, t), Y.init(e, t);
|
|
2478
|
-
}),
|
|
2479
|
-
|
|
2480
|
-
}),
|
|
2481
|
-
|
|
2482
|
-
}),
|
|
2483
|
-
|
|
2484
|
-
}),
|
|
2485
|
-
|
|
2486
|
-
}),
|
|
2721
|
+
}), ta = /* @__PURE__ */ b("ZodCUID2", (e, t) => {
|
|
2722
|
+
Gt.init(e, t), Y.init(e, t);
|
|
2723
|
+
}), na = /* @__PURE__ */ b("ZodULID", (e, t) => {
|
|
2724
|
+
Kt.init(e, t), Y.init(e, t);
|
|
2725
|
+
}), ra = /* @__PURE__ */ b("ZodXID", (e, t) => {
|
|
2726
|
+
qt.init(e, t), Y.init(e, t);
|
|
2727
|
+
}), ia = /* @__PURE__ */ b("ZodKSUID", (e, t) => {
|
|
2728
|
+
Jt.init(e, t), Y.init(e, t);
|
|
2729
|
+
}), aa = /* @__PURE__ */ b("ZodIPv4", (e, t) => {
|
|
2730
|
+
$t.init(e, t), Y.init(e, t);
|
|
2731
|
+
}), oa = /* @__PURE__ */ b("ZodIPv6", (e, t) => {
|
|
2487
2732
|
en.init(e, t), Y.init(e, t);
|
|
2488
|
-
}),
|
|
2733
|
+
}), sa = /* @__PURE__ */ b("ZodCIDRv4", (e, t) => {
|
|
2734
|
+
tn.init(e, t), Y.init(e, t);
|
|
2735
|
+
}), ca = /* @__PURE__ */ b("ZodCIDRv6", (e, t) => {
|
|
2489
2736
|
nn.init(e, t), Y.init(e, t);
|
|
2490
|
-
}),
|
|
2491
|
-
|
|
2492
|
-
}),
|
|
2493
|
-
|
|
2494
|
-
}),
|
|
2495
|
-
|
|
2737
|
+
}), la = /* @__PURE__ */ b("ZodBase64", (e, t) => {
|
|
2738
|
+
an.init(e, t), Y.init(e, t);
|
|
2739
|
+
}), ua = /* @__PURE__ */ b("ZodBase64URL", (e, t) => {
|
|
2740
|
+
sn.init(e, t), Y.init(e, t);
|
|
2741
|
+
}), da = /* @__PURE__ */ b("ZodE164", (e, t) => {
|
|
2742
|
+
cn.init(e, t), Y.init(e, t);
|
|
2743
|
+
}), fa = /* @__PURE__ */ b("ZodJWT", (e, t) => {
|
|
2744
|
+
un.init(e, t), Y.init(e, t);
|
|
2745
|
+
}), pa = /* @__PURE__ */ b("ZodNumber", (e, t) => {
|
|
2746
|
+
dn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => oi(e, t, n, r), q(e, "ZodNumber", {
|
|
2747
|
+
gt(e, t) {
|
|
2748
|
+
return this.check(/* @__PURE__ */ Mr(e, t));
|
|
2749
|
+
},
|
|
2750
|
+
gte(e, t) {
|
|
2751
|
+
return this.check(/* @__PURE__ */ Nr(e, t));
|
|
2752
|
+
},
|
|
2753
|
+
min(e, t) {
|
|
2754
|
+
return this.check(/* @__PURE__ */ Nr(e, t));
|
|
2755
|
+
},
|
|
2756
|
+
lt(e, t) {
|
|
2757
|
+
return this.check(/* @__PURE__ */ Ar(e, t));
|
|
2758
|
+
},
|
|
2759
|
+
lte(e, t) {
|
|
2760
|
+
return this.check(/* @__PURE__ */ jr(e, t));
|
|
2761
|
+
},
|
|
2762
|
+
max(e, t) {
|
|
2763
|
+
return this.check(/* @__PURE__ */ jr(e, t));
|
|
2764
|
+
},
|
|
2765
|
+
int(e) {
|
|
2766
|
+
return this.check(ga(e));
|
|
2767
|
+
},
|
|
2768
|
+
safe(e) {
|
|
2769
|
+
return this.check(ga(e));
|
|
2770
|
+
},
|
|
2771
|
+
positive(e) {
|
|
2772
|
+
return this.check(/* @__PURE__ */ Mr(0, e));
|
|
2773
|
+
},
|
|
2774
|
+
nonnegative(e) {
|
|
2775
|
+
return this.check(/* @__PURE__ */ Nr(0, e));
|
|
2776
|
+
},
|
|
2777
|
+
negative(e) {
|
|
2778
|
+
return this.check(/* @__PURE__ */ Ar(0, e));
|
|
2779
|
+
},
|
|
2780
|
+
nonpositive(e) {
|
|
2781
|
+
return this.check(/* @__PURE__ */ jr(0, e));
|
|
2782
|
+
},
|
|
2783
|
+
multipleOf(e, t) {
|
|
2784
|
+
return this.check(/* @__PURE__ */ Pr(e, t));
|
|
2785
|
+
},
|
|
2786
|
+
step(e, t) {
|
|
2787
|
+
return this.check(/* @__PURE__ */ Pr(e, t));
|
|
2788
|
+
},
|
|
2789
|
+
finite() {
|
|
2790
|
+
return this;
|
|
2791
|
+
}
|
|
2792
|
+
});
|
|
2496
2793
|
let n = e._zod.bag;
|
|
2497
2794
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2498
2795
|
});
|
|
2499
|
-
function
|
|
2500
|
-
return /* @__PURE__ */
|
|
2796
|
+
function ma(e) {
|
|
2797
|
+
return /* @__PURE__ */ Er(pa, e);
|
|
2501
2798
|
}
|
|
2502
|
-
var
|
|
2503
|
-
|
|
2799
|
+
var ha = /* @__PURE__ */ b("ZodNumberFormat", (e, t) => {
|
|
2800
|
+
fn.init(e, t), pa.init(e, t);
|
|
2504
2801
|
});
|
|
2505
|
-
function
|
|
2506
|
-
return /* @__PURE__ */
|
|
2802
|
+
function ga(e) {
|
|
2803
|
+
return /* @__PURE__ */ Dr(ha, e);
|
|
2507
2804
|
}
|
|
2508
|
-
var
|
|
2509
|
-
|
|
2805
|
+
var _a = /* @__PURE__ */ b("ZodUnknown", (e, t) => {
|
|
2806
|
+
pn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
2510
2807
|
});
|
|
2511
|
-
function
|
|
2512
|
-
return /* @__PURE__ */
|
|
2808
|
+
function va() {
|
|
2809
|
+
return /* @__PURE__ */ Or(_a);
|
|
2513
2810
|
}
|
|
2514
|
-
var
|
|
2515
|
-
|
|
2811
|
+
var ya = /* @__PURE__ */ b("ZodNever", (e, t) => {
|
|
2812
|
+
mn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => si(e, t, n, r);
|
|
2516
2813
|
});
|
|
2517
|
-
function
|
|
2518
|
-
return /* @__PURE__ */
|
|
2814
|
+
function ba(e) {
|
|
2815
|
+
return /* @__PURE__ */ kr(ya, e);
|
|
2519
2816
|
}
|
|
2520
|
-
var
|
|
2521
|
-
|
|
2817
|
+
var xa = /* @__PURE__ */ b("ZodArray", (e, t) => {
|
|
2818
|
+
gn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => di(e, t, n, r), e.element = t.element, q(e, "ZodArray", {
|
|
2819
|
+
min(e, t) {
|
|
2820
|
+
return this.check(/* @__PURE__ */ Ir(e, t));
|
|
2821
|
+
},
|
|
2822
|
+
nonempty(e) {
|
|
2823
|
+
return this.check(/* @__PURE__ */ Ir(1, e));
|
|
2824
|
+
},
|
|
2825
|
+
max(e, t) {
|
|
2826
|
+
return this.check(/* @__PURE__ */ Fr(e, t));
|
|
2827
|
+
},
|
|
2828
|
+
length(e, t) {
|
|
2829
|
+
return this.check(/* @__PURE__ */ Lr(e, t));
|
|
2830
|
+
},
|
|
2831
|
+
unwrap() {
|
|
2832
|
+
return this.element;
|
|
2833
|
+
}
|
|
2834
|
+
});
|
|
2522
2835
|
});
|
|
2523
|
-
function
|
|
2524
|
-
return /* @__PURE__ */
|
|
2836
|
+
function Sa(e, t) {
|
|
2837
|
+
return /* @__PURE__ */ Yr(xa, e, t);
|
|
2525
2838
|
}
|
|
2526
|
-
var
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2839
|
+
var Ca = /* @__PURE__ */ b("ZodObject", (e, t) => {
|
|
2840
|
+
xn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => fi(e, t, n, r), A(e, "shape", () => t.shape), q(e, "ZodObject", {
|
|
2841
|
+
keyof() {
|
|
2842
|
+
return Ma(Object.keys(this._zod.def.shape));
|
|
2843
|
+
},
|
|
2844
|
+
catchall(e) {
|
|
2845
|
+
return this.clone({
|
|
2846
|
+
...this._zod.def,
|
|
2847
|
+
catchall: e
|
|
2848
|
+
});
|
|
2849
|
+
},
|
|
2850
|
+
passthrough() {
|
|
2851
|
+
return this.clone({
|
|
2852
|
+
...this._zod.def,
|
|
2853
|
+
catchall: va()
|
|
2854
|
+
});
|
|
2855
|
+
},
|
|
2856
|
+
loose() {
|
|
2857
|
+
return this.clone({
|
|
2858
|
+
...this._zod.def,
|
|
2859
|
+
catchall: va()
|
|
2860
|
+
});
|
|
2861
|
+
},
|
|
2862
|
+
strict() {
|
|
2863
|
+
return this.clone({
|
|
2864
|
+
...this._zod.def,
|
|
2865
|
+
catchall: ba()
|
|
2866
|
+
});
|
|
2867
|
+
},
|
|
2868
|
+
strip() {
|
|
2869
|
+
return this.clone({
|
|
2870
|
+
...this._zod.def,
|
|
2871
|
+
catchall: void 0
|
|
2872
|
+
});
|
|
2873
|
+
},
|
|
2874
|
+
extend(e) {
|
|
2875
|
+
return me(this, e);
|
|
2876
|
+
},
|
|
2877
|
+
safeExtend(e) {
|
|
2878
|
+
return he(this, e);
|
|
2879
|
+
},
|
|
2880
|
+
merge(e) {
|
|
2881
|
+
return ge(this, e);
|
|
2882
|
+
},
|
|
2883
|
+
pick(e) {
|
|
2884
|
+
return fe(this, e);
|
|
2885
|
+
},
|
|
2886
|
+
omit(e) {
|
|
2887
|
+
return pe(this, e);
|
|
2888
|
+
},
|
|
2889
|
+
partial(...e) {
|
|
2890
|
+
return _e(Fa, this, e[0]);
|
|
2891
|
+
},
|
|
2892
|
+
required(...e) {
|
|
2893
|
+
return ve(Ga, this, e[0]);
|
|
2894
|
+
}
|
|
2895
|
+
});
|
|
2543
2896
|
});
|
|
2544
|
-
function
|
|
2545
|
-
return new
|
|
2897
|
+
function wa(e, t) {
|
|
2898
|
+
return new Ca({
|
|
2546
2899
|
type: "object",
|
|
2547
2900
|
shape: e ?? {},
|
|
2548
|
-
...
|
|
2901
|
+
...L(t)
|
|
2549
2902
|
});
|
|
2550
2903
|
}
|
|
2551
|
-
var
|
|
2552
|
-
|
|
2904
|
+
var Ta = /* @__PURE__ */ b("ZodUnion", (e, t) => {
|
|
2905
|
+
Cn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => pi(e, t, n, r), e.options = t.options;
|
|
2553
2906
|
});
|
|
2554
|
-
function
|
|
2555
|
-
return new
|
|
2907
|
+
function Ea(e, t) {
|
|
2908
|
+
return new Ta({
|
|
2556
2909
|
type: "union",
|
|
2557
2910
|
options: e,
|
|
2558
|
-
...
|
|
2911
|
+
...L(t)
|
|
2559
2912
|
});
|
|
2560
2913
|
}
|
|
2561
|
-
var
|
|
2562
|
-
|
|
2914
|
+
var Da = /* @__PURE__ */ b("ZodIntersection", (e, t) => {
|
|
2915
|
+
wn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => mi(e, t, n, r);
|
|
2563
2916
|
});
|
|
2564
|
-
function
|
|
2565
|
-
return new
|
|
2917
|
+
function Oa(e, t) {
|
|
2918
|
+
return new Da({
|
|
2566
2919
|
type: "intersection",
|
|
2567
2920
|
left: e,
|
|
2568
2921
|
right: t
|
|
2569
2922
|
});
|
|
2570
2923
|
}
|
|
2571
|
-
var
|
|
2572
|
-
|
|
2924
|
+
var ka = /* @__PURE__ */ b("ZodTuple", (e, t) => {
|
|
2925
|
+
Dn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => hi(e, t, n, r), e.rest = (t) => e.clone({
|
|
2573
2926
|
...e._zod.def,
|
|
2574
2927
|
rest: t
|
|
2575
2928
|
});
|
|
2576
2929
|
});
|
|
2577
|
-
function
|
|
2578
|
-
let r = t instanceof
|
|
2579
|
-
return new
|
|
2930
|
+
function Aa(e, t, n) {
|
|
2931
|
+
let r = t instanceof V;
|
|
2932
|
+
return new ka({
|
|
2580
2933
|
type: "tuple",
|
|
2581
2934
|
items: e,
|
|
2582
2935
|
rest: r ? t : null,
|
|
2583
|
-
...
|
|
2936
|
+
...L(r ? n : t)
|
|
2584
2937
|
});
|
|
2585
2938
|
}
|
|
2586
|
-
var
|
|
2587
|
-
|
|
2939
|
+
var ja = /* @__PURE__ */ b("ZodEnum", (e, t) => {
|
|
2940
|
+
jn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => ci(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2588
2941
|
let n = new Set(Object.keys(t.entries));
|
|
2589
2942
|
e.extract = (e, r) => {
|
|
2590
2943
|
let i = {};
|
|
2591
2944
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
2592
2945
|
else throw Error(`Key ${r} not found in enum`);
|
|
2593
|
-
return new
|
|
2946
|
+
return new ja({
|
|
2594
2947
|
...t,
|
|
2595
2948
|
checks: [],
|
|
2596
|
-
...
|
|
2949
|
+
...L(r),
|
|
2597
2950
|
entries: i
|
|
2598
2951
|
});
|
|
2599
2952
|
}, e.exclude = (e, r) => {
|
|
2600
2953
|
let i = { ...t.entries };
|
|
2601
2954
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
2602
2955
|
else throw Error(`Key ${t} not found in enum`);
|
|
2603
|
-
return new
|
|
2956
|
+
return new ja({
|
|
2604
2957
|
...t,
|
|
2605
2958
|
checks: [],
|
|
2606
|
-
...
|
|
2959
|
+
...L(r),
|
|
2607
2960
|
entries: i
|
|
2608
2961
|
});
|
|
2609
2962
|
};
|
|
2610
2963
|
});
|
|
2611
|
-
function
|
|
2612
|
-
return new
|
|
2964
|
+
function Ma(e, t) {
|
|
2965
|
+
return new ja({
|
|
2613
2966
|
type: "enum",
|
|
2614
2967
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
2615
|
-
...
|
|
2968
|
+
...L(t)
|
|
2616
2969
|
});
|
|
2617
2970
|
}
|
|
2618
|
-
var
|
|
2619
|
-
|
|
2620
|
-
if (r.direction === "backward") throw new
|
|
2971
|
+
var Na = /* @__PURE__ */ b("ZodTransform", (e, t) => {
|
|
2972
|
+
Mn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => ui(e, t, n, r), e._zod.parse = (n, r) => {
|
|
2973
|
+
if (r.direction === "backward") throw new ne(e.constructor.name);
|
|
2621
2974
|
n.addIssue = (r) => {
|
|
2622
|
-
if (typeof r == "string") n.issues.push(
|
|
2975
|
+
if (typeof r == "string") n.issues.push(Ce(r, n.value, t));
|
|
2623
2976
|
else {
|
|
2624
2977
|
let t = r;
|
|
2625
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(
|
|
2978
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(Ce(t));
|
|
2626
2979
|
}
|
|
2627
2980
|
};
|
|
2628
2981
|
let i = t.transform(n.value, n);
|
|
2629
|
-
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
2982
|
+
return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
|
|
2630
2983
|
};
|
|
2631
2984
|
});
|
|
2632
|
-
function
|
|
2633
|
-
return new
|
|
2985
|
+
function Pa(e) {
|
|
2986
|
+
return new Na({
|
|
2634
2987
|
type: "transform",
|
|
2635
2988
|
transform: e
|
|
2636
2989
|
});
|
|
2637
2990
|
}
|
|
2638
|
-
var
|
|
2639
|
-
|
|
2991
|
+
var Fa = /* @__PURE__ */ b("ZodOptional", (e, t) => {
|
|
2992
|
+
Pn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ci(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2640
2993
|
});
|
|
2641
|
-
function
|
|
2642
|
-
return new
|
|
2994
|
+
function Ia(e) {
|
|
2995
|
+
return new Fa({
|
|
2643
2996
|
type: "optional",
|
|
2644
2997
|
innerType: e
|
|
2645
2998
|
});
|
|
2646
2999
|
}
|
|
2647
|
-
var
|
|
2648
|
-
|
|
3000
|
+
var La = /* @__PURE__ */ b("ZodExactOptional", (e, t) => {
|
|
3001
|
+
Fn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ci(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2649
3002
|
});
|
|
2650
|
-
function
|
|
2651
|
-
return new
|
|
3003
|
+
function Ra(e) {
|
|
3004
|
+
return new La({
|
|
2652
3005
|
type: "optional",
|
|
2653
3006
|
innerType: e
|
|
2654
3007
|
});
|
|
2655
3008
|
}
|
|
2656
|
-
var
|
|
2657
|
-
|
|
3009
|
+
var za = /* @__PURE__ */ b("ZodNullable", (e, t) => {
|
|
3010
|
+
In.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => gi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2658
3011
|
});
|
|
2659
|
-
function
|
|
2660
|
-
return new
|
|
3012
|
+
function Ba(e) {
|
|
3013
|
+
return new za({
|
|
2661
3014
|
type: "nullable",
|
|
2662
3015
|
innerType: e
|
|
2663
3016
|
});
|
|
2664
3017
|
}
|
|
2665
|
-
var
|
|
2666
|
-
|
|
3018
|
+
var Va = /* @__PURE__ */ b("ZodDefault", (e, t) => {
|
|
3019
|
+
Ln.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => vi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2667
3020
|
});
|
|
2668
|
-
function
|
|
2669
|
-
return new
|
|
3021
|
+
function Ha(e, t) {
|
|
3022
|
+
return new Va({
|
|
2670
3023
|
type: "default",
|
|
2671
3024
|
innerType: e,
|
|
2672
3025
|
get defaultValue() {
|
|
2673
|
-
return typeof t == "function" ? t() :
|
|
3026
|
+
return typeof t == "function" ? t() : se(t);
|
|
2674
3027
|
}
|
|
2675
3028
|
});
|
|
2676
3029
|
}
|
|
2677
|
-
var
|
|
2678
|
-
|
|
3030
|
+
var Ua = /* @__PURE__ */ b("ZodPrefault", (e, t) => {
|
|
3031
|
+
zn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => yi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2679
3032
|
});
|
|
2680
|
-
function
|
|
2681
|
-
return new
|
|
3033
|
+
function Wa(e, t) {
|
|
3034
|
+
return new Ua({
|
|
2682
3035
|
type: "prefault",
|
|
2683
3036
|
innerType: e,
|
|
2684
3037
|
get defaultValue() {
|
|
2685
|
-
return typeof t == "function" ? t() :
|
|
3038
|
+
return typeof t == "function" ? t() : se(t);
|
|
2686
3039
|
}
|
|
2687
3040
|
});
|
|
2688
3041
|
}
|
|
2689
|
-
var
|
|
2690
|
-
|
|
3042
|
+
var Ga = /* @__PURE__ */ b("ZodNonOptional", (e, t) => {
|
|
3043
|
+
Bn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => _i(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2691
3044
|
});
|
|
2692
|
-
function
|
|
2693
|
-
return new
|
|
3045
|
+
function Ka(e, t) {
|
|
3046
|
+
return new Ga({
|
|
2694
3047
|
type: "nonoptional",
|
|
2695
3048
|
innerType: e,
|
|
2696
|
-
...
|
|
3049
|
+
...L(t)
|
|
2697
3050
|
});
|
|
2698
3051
|
}
|
|
2699
|
-
var
|
|
2700
|
-
|
|
3052
|
+
var qa = /* @__PURE__ */ b("ZodCatch", (e, t) => {
|
|
3053
|
+
Hn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => bi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2701
3054
|
});
|
|
2702
|
-
function
|
|
2703
|
-
return new
|
|
3055
|
+
function Ja(e, t) {
|
|
3056
|
+
return new qa({
|
|
2704
3057
|
type: "catch",
|
|
2705
3058
|
innerType: e,
|
|
2706
3059
|
catchValue: typeof t == "function" ? t : () => t
|
|
2707
3060
|
});
|
|
2708
3061
|
}
|
|
2709
|
-
var
|
|
2710
|
-
|
|
3062
|
+
var Ya = /* @__PURE__ */ b("ZodPipe", (e, t) => {
|
|
3063
|
+
Un.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => xi(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
2711
3064
|
});
|
|
2712
|
-
function
|
|
2713
|
-
return new
|
|
3065
|
+
function Xa(e, t) {
|
|
3066
|
+
return new Ya({
|
|
2714
3067
|
type: "pipe",
|
|
2715
3068
|
in: e,
|
|
2716
3069
|
out: t
|
|
2717
3070
|
});
|
|
2718
3071
|
}
|
|
2719
|
-
var
|
|
2720
|
-
|
|
3072
|
+
var Za = /* @__PURE__ */ b("ZodReadonly", (e, t) => {
|
|
3073
|
+
Gn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => Si(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2721
3074
|
});
|
|
2722
|
-
function
|
|
2723
|
-
return new
|
|
3075
|
+
function Qa(e) {
|
|
3076
|
+
return new Za({
|
|
2724
3077
|
type: "readonly",
|
|
2725
3078
|
innerType: e
|
|
2726
3079
|
});
|
|
2727
3080
|
}
|
|
2728
|
-
var
|
|
2729
|
-
|
|
3081
|
+
var $a = /* @__PURE__ */ b("ZodCustom", (e, t) => {
|
|
3082
|
+
qn.init(e, t), J.init(e, t), e._zod.processJSONSchema = (t, n, r) => li(e, t, n, r);
|
|
2730
3083
|
});
|
|
2731
|
-
function
|
|
2732
|
-
return /* @__PURE__ */
|
|
3084
|
+
function eo(e, t = {}) {
|
|
3085
|
+
return /* @__PURE__ */ Xr($a, e, t);
|
|
2733
3086
|
}
|
|
2734
|
-
function
|
|
2735
|
-
return /* @__PURE__ */
|
|
3087
|
+
function to(e, t) {
|
|
3088
|
+
return /* @__PURE__ */ Zr(e, t);
|
|
2736
3089
|
}
|
|
2737
3090
|
//#endregion
|
|
2738
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
2739
|
-
var
|
|
3091
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/use-map.js
|
|
3092
|
+
var no = r.createContext(null);
|
|
2740
3093
|
//#endregion
|
|
2741
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
2742
|
-
function
|
|
3094
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js
|
|
3095
|
+
function ro(e, t) {
|
|
2743
3096
|
let n = Array.isArray(e) ? e[0] : e ? e.x : 0, r = Array.isArray(e) ? e[1] : e ? e.y : 0, i = Array.isArray(t) ? t[0] : t ? t.x : 0, a = Array.isArray(t) ? t[1] : t ? t.y : 0;
|
|
2744
3097
|
return n === i && r === a;
|
|
2745
3098
|
}
|
|
@@ -2760,8 +3113,8 @@ function X(e, t) {
|
|
|
2760
3113
|
return !1;
|
|
2761
3114
|
}
|
|
2762
3115
|
//#endregion
|
|
2763
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
2764
|
-
function
|
|
3116
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/utils/transform.js
|
|
3117
|
+
function io(e) {
|
|
2765
3118
|
return {
|
|
2766
3119
|
longitude: e.center.lng,
|
|
2767
3120
|
latitude: e.center.lat,
|
|
@@ -2771,7 +3124,7 @@ function Qa(e) {
|
|
|
2771
3124
|
padding: e.padding
|
|
2772
3125
|
};
|
|
2773
3126
|
}
|
|
2774
|
-
function
|
|
3127
|
+
function ao(e, t) {
|
|
2775
3128
|
let n = t.viewState || t, r = {};
|
|
2776
3129
|
if ("longitude" in n && "latitude" in n && (n.longitude !== e.center.lng || n.latitude !== e.center.lat)) {
|
|
2777
3130
|
let t = e.center.constructor;
|
|
@@ -2780,8 +3133,8 @@ function $a(e, t) {
|
|
|
2780
3133
|
return "zoom" in n && n.zoom !== e.zoom && (r.zoom = n.zoom), "bearing" in n && n.bearing !== e.bearing && (r.bearing = n.bearing), "pitch" in n && n.pitch !== e.pitch && (r.pitch = n.pitch), n.padding && e.padding && !X(n.padding, e.padding) && (r.padding = n.padding), r;
|
|
2781
3134
|
}
|
|
2782
3135
|
//#endregion
|
|
2783
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
2784
|
-
var
|
|
3136
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js
|
|
3137
|
+
var oo = [
|
|
2785
3138
|
"type",
|
|
2786
3139
|
"source",
|
|
2787
3140
|
"source-layer",
|
|
@@ -2790,7 +3143,7 @@ var eo = [
|
|
|
2790
3143
|
"filter",
|
|
2791
3144
|
"layout"
|
|
2792
3145
|
];
|
|
2793
|
-
function
|
|
3146
|
+
function so(e) {
|
|
2794
3147
|
if (!e) return null;
|
|
2795
3148
|
if (typeof e == "string" || ("toJS" in e && (e = e.toJS()), !e.layers)) return e;
|
|
2796
3149
|
let t = {};
|
|
@@ -2801,7 +3154,7 @@ function to(e) {
|
|
|
2801
3154
|
let r = t[e.ref];
|
|
2802
3155
|
if (r) {
|
|
2803
3156
|
n ||= Object.assign({}, e), delete n.ref;
|
|
2804
|
-
for (let e of
|
|
3157
|
+
for (let e of oo) e in r && (n[e] = r[e]);
|
|
2805
3158
|
}
|
|
2806
3159
|
return n || e;
|
|
2807
3160
|
});
|
|
@@ -2811,12 +3164,25 @@ function to(e) {
|
|
|
2811
3164
|
};
|
|
2812
3165
|
}
|
|
2813
3166
|
//#endregion
|
|
2814
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
2815
|
-
var
|
|
3167
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js
|
|
3168
|
+
var co = {
|
|
2816
3169
|
version: 8,
|
|
2817
3170
|
sources: {},
|
|
2818
3171
|
layers: []
|
|
2819
|
-
},
|
|
3172
|
+
}, lo = {
|
|
3173
|
+
minZoom: 0,
|
|
3174
|
+
maxZoom: 22,
|
|
3175
|
+
minPitch: 0,
|
|
3176
|
+
maxPitch: 85,
|
|
3177
|
+
maxBounds: [
|
|
3178
|
+
-180,
|
|
3179
|
+
-85.051129,
|
|
3180
|
+
180,
|
|
3181
|
+
85.051129
|
|
3182
|
+
],
|
|
3183
|
+
projection: "mercator",
|
|
3184
|
+
renderWorldCopies: !0
|
|
3185
|
+
}, uo = {
|
|
2820
3186
|
mousedown: "onMouseDown",
|
|
2821
3187
|
mouseup: "onMouseUp",
|
|
2822
3188
|
mouseover: "onMouseOver",
|
|
@@ -2831,7 +3197,7 @@ var no = {
|
|
|
2831
3197
|
touchend: "onTouchEnd",
|
|
2832
3198
|
touchmove: "onTouchMove",
|
|
2833
3199
|
touchcancel: "onTouchCancel"
|
|
2834
|
-
},
|
|
3200
|
+
}, fo = {
|
|
2835
3201
|
movestart: "onMoveStart",
|
|
2836
3202
|
move: "onMove",
|
|
2837
3203
|
moveend: "onMoveEnd",
|
|
@@ -2847,7 +3213,7 @@ var no = {
|
|
|
2847
3213
|
pitchstart: "onPitchStart",
|
|
2848
3214
|
pitch: "onPitch",
|
|
2849
3215
|
pitchend: "onPitchEnd"
|
|
2850
|
-
},
|
|
3216
|
+
}, po = {
|
|
2851
3217
|
wheel: "onWheel",
|
|
2852
3218
|
boxzoomstart: "onBoxZoomStart",
|
|
2853
3219
|
boxzoomend: "onBoxZoomEnd",
|
|
@@ -2861,7 +3227,7 @@ var no = {
|
|
|
2861
3227
|
styledata: "onStyleData",
|
|
2862
3228
|
sourcedata: "onSourceData",
|
|
2863
3229
|
error: "onError"
|
|
2864
|
-
},
|
|
3230
|
+
}, mo = [
|
|
2865
3231
|
"minZoom",
|
|
2866
3232
|
"maxZoom",
|
|
2867
3233
|
"minPitch",
|
|
@@ -2869,7 +3235,7 @@ var no = {
|
|
|
2869
3235
|
"maxBounds",
|
|
2870
3236
|
"projection",
|
|
2871
3237
|
"renderWorldCopies"
|
|
2872
|
-
],
|
|
3238
|
+
], ho = [
|
|
2873
3239
|
"scrollZoom",
|
|
2874
3240
|
"boxZoom",
|
|
2875
3241
|
"dragRotate",
|
|
@@ -2878,19 +3244,19 @@ var no = {
|
|
|
2878
3244
|
"doubleClickZoom",
|
|
2879
3245
|
"touchZoomRotate",
|
|
2880
3246
|
"touchPitch"
|
|
2881
|
-
],
|
|
3247
|
+
], go = class e {
|
|
2882
3248
|
constructor(e, t, n) {
|
|
2883
3249
|
this._map = null, this._internalUpdate = !1, this._hoveredFeatures = null, this._propsedCameraUpdate = null, this._styleComponents = {}, this._onEvent = (e) => {
|
|
2884
|
-
let t = this.props[
|
|
3250
|
+
let t = this.props[po[e.type]];
|
|
2885
3251
|
t ? t(e) : e.type === "error" && console.error(e.error);
|
|
2886
3252
|
}, this._onCameraEvent = (e) => {
|
|
2887
3253
|
if (this._internalUpdate) return;
|
|
2888
|
-
e.viewState = this._propsedCameraUpdate ||
|
|
2889
|
-
let t = this.props[
|
|
3254
|
+
e.viewState = this._propsedCameraUpdate || io(this._map.transform);
|
|
3255
|
+
let t = this.props[fo[e.type]];
|
|
2890
3256
|
t && t(e);
|
|
2891
|
-
}, this._onCameraUpdate = (e) => this._internalUpdate ? e : (this._propsedCameraUpdate =
|
|
3257
|
+
}, this._onCameraUpdate = (e) => this._internalUpdate ? e : (this._propsedCameraUpdate = io(e), ao(e, this.props)), this._onPointerEvent = (e) => {
|
|
2892
3258
|
(e.type === "mousemove" || e.type === "mouseout") && this._updateHover(e);
|
|
2893
|
-
let t = this.props[
|
|
3259
|
+
let t = this.props[uo[e.type]];
|
|
2894
3260
|
t && (this.props.interactiveLayerIds && e.type !== "mouseover" && e.type !== "mouseout" && (e.features = this._hoveredFeatures || this._queryRenderedFeatures(e.point)), t(e), delete e.features);
|
|
2895
3261
|
}, this._MapClass = e, this.props = t, this._initialize(n);
|
|
2896
3262
|
}
|
|
@@ -2921,11 +3287,11 @@ var no = {
|
|
|
2921
3287
|
}) : r._updateViewState(s)), i.isStyleLoaded() ? i.fire("load") : i.once("style.load", () => i.fire("load")), i._update(), r;
|
|
2922
3288
|
}
|
|
2923
3289
|
_initialize(e) {
|
|
2924
|
-
let { props: t } = this, { mapStyle: n =
|
|
3290
|
+
let { props: t } = this, { mapStyle: n = co } = t, r = {
|
|
2925
3291
|
...t,
|
|
2926
3292
|
...t.initialViewState,
|
|
2927
3293
|
container: e,
|
|
2928
|
-
style:
|
|
3294
|
+
style: so(n)
|
|
2929
3295
|
}, i = r.initialViewState || r.viewState || r;
|
|
2930
3296
|
if (Object.assign(r, {
|
|
2931
3297
|
center: [i.longitude || 0, i.latitude || 0],
|
|
@@ -2947,9 +3313,9 @@ var no = {
|
|
|
2947
3313
|
}), a.on("sourcedata", () => {
|
|
2948
3314
|
this._updateStyleComponents(this.props);
|
|
2949
3315
|
});
|
|
2950
|
-
for (let e in
|
|
2951
|
-
for (let e in
|
|
2952
|
-
for (let e in
|
|
3316
|
+
for (let e in uo) a.on(e, this._onPointerEvent);
|
|
3317
|
+
for (let e in fo) a.on(e, this._onCameraEvent);
|
|
3318
|
+
for (let e in po) a.on(e, this._onEvent);
|
|
2953
3319
|
this._map = a;
|
|
2954
3320
|
}
|
|
2955
3321
|
recycle() {
|
|
@@ -2973,29 +3339,33 @@ var no = {
|
|
|
2973
3339
|
_updateViewState(e) {
|
|
2974
3340
|
let t = this._map, n = t.transform;
|
|
2975
3341
|
if (!t.isMoving()) {
|
|
2976
|
-
let r =
|
|
3342
|
+
let r = ao(n, e);
|
|
2977
3343
|
if (Object.keys(r).length > 0) return this._internalUpdate = !0, t.jumpTo(r), this._internalUpdate = !1, !0;
|
|
2978
3344
|
}
|
|
2979
3345
|
return !1;
|
|
2980
3346
|
}
|
|
2981
3347
|
_updateSettings(e, t) {
|
|
2982
3348
|
let n = this._map, r = !1;
|
|
2983
|
-
for (let i of
|
|
3349
|
+
for (let i of mo) if ((i in e || i in t) && !X(e[i], t[i])) {
|
|
3350
|
+
r = !0;
|
|
3351
|
+
let t = i in e ? e[i] : lo[i];
|
|
3352
|
+
n[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(n, t);
|
|
3353
|
+
}
|
|
2984
3354
|
return r;
|
|
2985
3355
|
}
|
|
2986
3356
|
_updateStyle(e, t) {
|
|
2987
3357
|
if (e.cursor !== t.cursor && (this._map.getCanvas().style.cursor = e.cursor || ""), e.mapStyle !== t.mapStyle) {
|
|
2988
|
-
let { mapStyle: t =
|
|
2989
|
-
"localIdeographFontFamily" in e && (r.localIdeographFontFamily = e.localIdeographFontFamily), this._map.setStyle(
|
|
3358
|
+
let { mapStyle: t = co, styleDiffing: n = !0 } = e, r = { diff: n };
|
|
3359
|
+
"localIdeographFontFamily" in e && (r.localIdeographFontFamily = e.localIdeographFontFamily), this._map.setStyle(so(t), r);
|
|
2990
3360
|
}
|
|
2991
3361
|
}
|
|
2992
3362
|
_updateStyleComponents({ light: e, projection: t, sky: n, terrain: r }) {
|
|
2993
3363
|
let i = this._map, a = this._styleComponents;
|
|
2994
|
-
i.style
|
|
3364
|
+
i.style?._loaded && (e && !X(e, a.light) && (a.light = e, i.setLight(e)), t && !X(t, a.projection) && t !== a.projection?.type && (a.projection = typeof t == "string" ? { type: t } : t, i.setProjection?.(a.projection)), n && !X(n, a.sky) && (a.sky = n, i.setSky(n)), r !== void 0 && !X(r, a.terrain) && (!r || i.getSource(r.source)) && (a.terrain = r, i.setTerrain(r)));
|
|
2995
3365
|
}
|
|
2996
3366
|
_updateHandlers(e, t) {
|
|
2997
3367
|
let n = this._map;
|
|
2998
|
-
for (let r of
|
|
3368
|
+
for (let r of ho) {
|
|
2999
3369
|
let i = e[r] ?? !0;
|
|
3000
3370
|
X(i, t[r] ?? !0) || (i ? n[r].enable(i) : n[r].disable());
|
|
3001
3371
|
}
|
|
@@ -3016,10 +3386,10 @@ var no = {
|
|
|
3016
3386
|
} else this._hoveredFeatures = null;
|
|
3017
3387
|
}
|
|
3018
3388
|
};
|
|
3019
|
-
|
|
3389
|
+
go.savedMaps = [];
|
|
3020
3390
|
//#endregion
|
|
3021
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3022
|
-
var
|
|
3391
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/maplibre/create-ref.js
|
|
3392
|
+
var _o = [
|
|
3023
3393
|
"setMaxBounds",
|
|
3024
3394
|
"setMinZoom",
|
|
3025
3395
|
"setMaxZoom",
|
|
@@ -3041,13 +3411,13 @@ var lo = [
|
|
|
3041
3411
|
"setFog",
|
|
3042
3412
|
"remove"
|
|
3043
3413
|
];
|
|
3044
|
-
function
|
|
3414
|
+
function vo(e) {
|
|
3045
3415
|
if (!e) return null;
|
|
3046
3416
|
let t = e.map, n = { getMap: () => t };
|
|
3047
|
-
for (let e of
|
|
3417
|
+
for (let e of yo(t)) !(e in n) && !_o.includes(e) && (n[e] = t[e].bind(t));
|
|
3048
3418
|
return n;
|
|
3049
3419
|
}
|
|
3050
|
-
function
|
|
3420
|
+
function yo(e) {
|
|
3051
3421
|
let t = /* @__PURE__ */ new Set(), n = e;
|
|
3052
3422
|
for (; n;) {
|
|
3053
3423
|
for (let r of Object.getOwnPropertyNames(n)) r[0] !== "_" && typeof e[r] == "function" && r !== "fire" && r !== "setEventedParent" && t.add(r);
|
|
@@ -3056,11 +3426,11 @@ function fo(e) {
|
|
|
3056
3426
|
return Array.from(t);
|
|
3057
3427
|
}
|
|
3058
3428
|
//#endregion
|
|
3059
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3060
|
-
var
|
|
3429
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/utils/use-isomorphic-layout-effect.js
|
|
3430
|
+
var bo = typeof document < "u" ? l : s;
|
|
3061
3431
|
//#endregion
|
|
3062
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3063
|
-
function
|
|
3432
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js
|
|
3433
|
+
function xo(e, t) {
|
|
3064
3434
|
let { RTLTextPlugin: n, maxParallelImageRequests: r, workerCount: i, workerUrl: a } = t;
|
|
3065
3435
|
if (n && e.getRTLTextPluginStatus && e.getRTLTextPluginStatus() === "unavailable") {
|
|
3066
3436
|
let { pluginUrl: t, lazy: r = !0 } = typeof n == "string" ? { pluginUrl: n } : n;
|
|
@@ -3071,21 +3441,21 @@ function mo(e, t) {
|
|
|
3071
3441
|
r !== void 0 && e.setMaxParallelImageRequests(r), i !== void 0 && e.setWorkerCount(i), a !== void 0 && e.setWorkerUrl(a);
|
|
3072
3442
|
}
|
|
3073
3443
|
//#endregion
|
|
3074
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3075
|
-
var
|
|
3076
|
-
function
|
|
3077
|
-
let i = o(
|
|
3444
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/map.js
|
|
3445
|
+
var So = r.createContext(null);
|
|
3446
|
+
function Co(e, n) {
|
|
3447
|
+
let i = o(no), [a, l] = f(null), p = d(), { current: m } = d({
|
|
3078
3448
|
mapLib: null,
|
|
3079
3449
|
map: null
|
|
3080
3450
|
});
|
|
3081
3451
|
s(() => {
|
|
3082
3452
|
let n = e.mapLib, r = !0, a;
|
|
3083
|
-
return Promise.resolve(n || import("./maplibre-gl-
|
|
3453
|
+
return Promise.resolve(n || import("./maplibre-gl-D8guyJSV.js").then((e) => /* @__PURE__ */ t(e.default, 1))).then((t) => {
|
|
3084
3454
|
if (!r) return;
|
|
3085
3455
|
if (!t) throw Error("Invalid mapLib");
|
|
3086
3456
|
let n = "Map" in t ? t : t.default;
|
|
3087
3457
|
if (!n.Map) throw Error("Invalid mapLib");
|
|
3088
|
-
|
|
3458
|
+
xo(n, e), e.reuseMaps && (a = go.reuse(e, p.current)), a ||= new go(n.Map, e, p.current), m.map = vo(a), m.mapLib = n, l(a), i?.onMapMount(m.map, e.id);
|
|
3089
3459
|
}).catch((t) => {
|
|
3090
3460
|
let { onError: n } = e;
|
|
3091
3461
|
n ? n({
|
|
@@ -3097,7 +3467,7 @@ function go(e, n) {
|
|
|
3097
3467
|
}), () => {
|
|
3098
3468
|
r = !1, a && (i?.onMapUnmount(e.id), e.reuseMaps ? a.recycle() : a.destroy());
|
|
3099
3469
|
};
|
|
3100
|
-
}, []),
|
|
3470
|
+
}, []), bo(() => {
|
|
3101
3471
|
a && a.setProps(e);
|
|
3102
3472
|
}), c(n, () => m.map, [a]);
|
|
3103
3473
|
let h = u(() => ({
|
|
@@ -3105,41 +3475,41 @@ function go(e, n) {
|
|
|
3105
3475
|
width: "100%",
|
|
3106
3476
|
height: "100%",
|
|
3107
3477
|
...e.style
|
|
3108
|
-
}), [e.style])
|
|
3478
|
+
}), [e.style]);
|
|
3109
3479
|
return r.createElement("div", {
|
|
3110
3480
|
id: e.id,
|
|
3111
3481
|
ref: p,
|
|
3112
3482
|
style: h
|
|
3113
|
-
}, a && r.createElement(
|
|
3483
|
+
}, a && r.createElement(So.Provider, { value: m }, r.createElement("div", {
|
|
3114
3484
|
"mapboxgl-children": "",
|
|
3115
|
-
style:
|
|
3485
|
+
style: { height: "100%" }
|
|
3116
3486
|
}, e.children)));
|
|
3117
3487
|
}
|
|
3118
|
-
var
|
|
3488
|
+
var wo = r.forwardRef(Co), To = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;
|
|
3119
3489
|
function Z(e, t) {
|
|
3120
3490
|
if (!e || !t) return;
|
|
3121
3491
|
let n = e.style;
|
|
3122
3492
|
for (let e in t) {
|
|
3123
3493
|
let r = t[e];
|
|
3124
|
-
Number.isFinite(r) && !
|
|
3494
|
+
Number.isFinite(r) && !To.test(e) ? n[e] = `${r}px` : n[e] = r;
|
|
3125
3495
|
}
|
|
3126
3496
|
}
|
|
3127
3497
|
//#endregion
|
|
3128
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3129
|
-
function
|
|
3498
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js
|
|
3499
|
+
function Eo(e, t) {
|
|
3130
3500
|
if (e === t) return null;
|
|
3131
|
-
let n =
|
|
3501
|
+
let n = Do(e), r = Do(t), i = [];
|
|
3132
3502
|
for (let e of r) n.has(e) || i.push(e);
|
|
3133
3503
|
for (let e of n) r.has(e) || i.push(e);
|
|
3134
3504
|
return i.length === 0 ? null : i;
|
|
3135
3505
|
}
|
|
3136
|
-
function
|
|
3506
|
+
function Do(e) {
|
|
3137
3507
|
return new Set(e ? e.trim().split(/\s+/) : []);
|
|
3138
3508
|
}
|
|
3139
3509
|
//#endregion
|
|
3140
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3141
|
-
var
|
|
3142
|
-
let { map: n, mapLib: i } = o(
|
|
3510
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/marker.js
|
|
3511
|
+
var Oo = a(i((e, t) => {
|
|
3512
|
+
let { map: n, mapLib: i } = o(So), a = d({ props: e }), l = u(() => {
|
|
3143
3513
|
let t = !1;
|
|
3144
3514
|
r.Children.forEach(e.children, (e) => {
|
|
3145
3515
|
e && (t = !0);
|
|
@@ -3168,17 +3538,17 @@ var xo = a(i((e, t) => {
|
|
|
3168
3538
|
s(() => (l.addTo(n.getMap()), () => {
|
|
3169
3539
|
l.remove();
|
|
3170
3540
|
}), []);
|
|
3171
|
-
let { longitude: f, latitude: p, offset: m, style: h, draggable:
|
|
3541
|
+
let { longitude: f, latitude: p, offset: m, style: h, draggable: ee = !1, popup: g = null, rotation: _ = 0, rotationAlignment: v = "auto", pitchAlignment: y = "auto" } = e;
|
|
3172
3542
|
s(() => {
|
|
3173
3543
|
Z(l.getElement(), h);
|
|
3174
3544
|
}, [h]), c(t, () => l, []);
|
|
3175
|
-
let
|
|
3176
|
-
(l.getLngLat().lng !== f || l.getLngLat().lat !== p) && l.setLngLat([f, p]), m && !
|
|
3177
|
-
let
|
|
3178
|
-
if (
|
|
3179
|
-
return a.current.props = e,
|
|
3180
|
-
})),
|
|
3181
|
-
let { map: n, mapLib: r } = o(
|
|
3545
|
+
let b = a.current.props;
|
|
3546
|
+
(l.getLngLat().lng !== f || l.getLngLat().lat !== p) && l.setLngLat([f, p]), m && !ro(l.getOffset(), m) && l.setOffset(m), l.isDraggable() !== ee && l.setDraggable(ee), l.getRotation() !== _ && l.setRotation(_), l.getRotationAlignment() !== v && l.setRotationAlignment(v), l.getPitchAlignment() !== y && l.setPitchAlignment(y), l.getPopup() !== g && l.setPopup(g);
|
|
3547
|
+
let x = Eo(b.className, e.className);
|
|
3548
|
+
if (x) for (let e of x) l.toggleClassName(e);
|
|
3549
|
+
return a.current.props = e, te(e.children, l.getElement());
|
|
3550
|
+
})), ko = a(i((e, t) => {
|
|
3551
|
+
let { map: n, mapLib: r } = o(So), i = u(() => document.createElement("div"), []), a = d({ props: e }), l = u(() => {
|
|
3182
3552
|
let t = { ...e }, n = new r.Popup(t);
|
|
3183
3553
|
return n.setLngLat([e.longitude, e.latitude]), n.once("open", (e) => {
|
|
3184
3554
|
a.current.props.onOpen?.(e);
|
|
@@ -3196,16 +3566,16 @@ var xo = a(i((e, t) => {
|
|
|
3196
3566
|
}, [e.style]), c(t, () => l, []), l.isOpen()) {
|
|
3197
3567
|
let t = a.current.props;
|
|
3198
3568
|
(l.getLngLat().lng !== e.longitude || l.getLngLat().lat !== e.latitude) && l.setLngLat([e.longitude, e.latitude]), e.offset && !X(t.offset, e.offset) && l.setOffset(e.offset), (t.anchor !== e.anchor || t.maxWidth !== e.maxWidth) && (l.options.anchor = e.anchor, l.setMaxWidth(e.maxWidth));
|
|
3199
|
-
let n =
|
|
3569
|
+
let n = Eo(t.className, e.className);
|
|
3200
3570
|
if (n) for (let e of n) l.toggleClassName(e);
|
|
3201
3571
|
a.current.props = e;
|
|
3202
3572
|
}
|
|
3203
|
-
return
|
|
3573
|
+
return te(e.children, i);
|
|
3204
3574
|
}));
|
|
3205
3575
|
//#endregion
|
|
3206
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3576
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/use-control.js
|
|
3207
3577
|
function Q(e, t, n, r) {
|
|
3208
|
-
let i = o(
|
|
3578
|
+
let i = o(So), a = u(() => e(i), []);
|
|
3209
3579
|
return s(() => {
|
|
3210
3580
|
let e = r || n || t, o = typeof t == "function" && typeof n == "function" ? t : null, s = typeof n == "function" ? n : typeof t == "function" ? t : null, { map: c } = i;
|
|
3211
3581
|
return c.hasControl(a) || (c.addControl(a, e?.position), o && o(i)), () => {
|
|
@@ -3214,26 +3584,26 @@ function Q(e, t, n, r) {
|
|
|
3214
3584
|
}, []), a;
|
|
3215
3585
|
}
|
|
3216
3586
|
//#endregion
|
|
3217
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3218
|
-
function
|
|
3587
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js
|
|
3588
|
+
function Ao(e) {
|
|
3219
3589
|
let t = Q(({ mapLib: t }) => new t.AttributionControl(e), { position: e.position });
|
|
3220
3590
|
return s(() => {
|
|
3221
3591
|
Z(t._container, e.style);
|
|
3222
3592
|
}, [e.style]), null;
|
|
3223
3593
|
}
|
|
3224
|
-
a(
|
|
3594
|
+
a(Ao);
|
|
3225
3595
|
//#endregion
|
|
3226
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3227
|
-
function
|
|
3596
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js
|
|
3597
|
+
function jo(e) {
|
|
3228
3598
|
let t = Q(({ mapLib: t }) => new t.FullscreenControl({ container: e.containerId && document.getElementById(e.containerId) }), { position: e.position });
|
|
3229
3599
|
return s(() => {
|
|
3230
3600
|
Z(t._controlContainer, e.style);
|
|
3231
3601
|
}, [e.style]), null;
|
|
3232
3602
|
}
|
|
3233
|
-
a(
|
|
3603
|
+
a(jo);
|
|
3234
3604
|
//#endregion
|
|
3235
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3236
|
-
function
|
|
3605
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js
|
|
3606
|
+
function Mo(e, t) {
|
|
3237
3607
|
let n = d({ props: e }), r = Q(({ mapLib: t }) => {
|
|
3238
3608
|
let r = new t.GeolocateControl(e), i = r._setupUI;
|
|
3239
3609
|
return r._setupUI = () => {
|
|
@@ -3254,19 +3624,19 @@ function To(e, t) {
|
|
|
3254
3624
|
Z(r._container, e.style);
|
|
3255
3625
|
}, [e.style]), null;
|
|
3256
3626
|
}
|
|
3257
|
-
a(i(
|
|
3627
|
+
a(i(Mo));
|
|
3258
3628
|
//#endregion
|
|
3259
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3260
|
-
function
|
|
3629
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/navigation-control.js
|
|
3630
|
+
function No(e) {
|
|
3261
3631
|
let t = Q(({ mapLib: t }) => new t.NavigationControl(e), { position: e.position });
|
|
3262
3632
|
return s(() => {
|
|
3263
3633
|
Z(t._container, e.style);
|
|
3264
3634
|
}, [e.style]), null;
|
|
3265
3635
|
}
|
|
3266
|
-
var
|
|
3636
|
+
var Po = a(No);
|
|
3267
3637
|
//#endregion
|
|
3268
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3269
|
-
function
|
|
3638
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/scale-control.js
|
|
3639
|
+
function Fo(e) {
|
|
3270
3640
|
let t = Q(({ mapLib: t }) => new t.ScaleControl(e), { position: e.position }), n = d(e), r = n.current;
|
|
3271
3641
|
n.current = e;
|
|
3272
3642
|
let { style: i } = e;
|
|
@@ -3274,28 +3644,28 @@ function Oo(e) {
|
|
|
3274
3644
|
Z(t._container, i);
|
|
3275
3645
|
}, [i]), null;
|
|
3276
3646
|
}
|
|
3277
|
-
a(
|
|
3647
|
+
a(Fo);
|
|
3278
3648
|
//#endregion
|
|
3279
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3280
|
-
function
|
|
3649
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/terrain-control.js
|
|
3650
|
+
function Io(e) {
|
|
3281
3651
|
let t = Q(({ mapLib: t }) => new t.TerrainControl(e), { position: e.position });
|
|
3282
3652
|
return s(() => {
|
|
3283
3653
|
Z(t._container, e.style);
|
|
3284
3654
|
}, [e.style]), null;
|
|
3285
3655
|
}
|
|
3286
|
-
a(
|
|
3656
|
+
a(Io);
|
|
3287
3657
|
//#endregion
|
|
3288
|
-
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.
|
|
3289
|
-
function
|
|
3658
|
+
//#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.1_maplibre-gl@5.24.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@vis.gl/react-maplibre/dist/components/logo-control.js
|
|
3659
|
+
function Lo(e) {
|
|
3290
3660
|
let t = Q(({ mapLib: t }) => new t.LogoControl(e), { position: e.position });
|
|
3291
3661
|
return s(() => {
|
|
3292
3662
|
Z(t._container, e.style);
|
|
3293
3663
|
}, [e.style]), null;
|
|
3294
3664
|
}
|
|
3295
|
-
a(
|
|
3665
|
+
a(Lo);
|
|
3296
3666
|
//#endregion
|
|
3297
|
-
//#region ../../node_modules/.pnpm/react@19.2.
|
|
3298
|
-
var
|
|
3667
|
+
//#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
3668
|
+
var Ro = /* @__PURE__ */ n(((e) => {
|
|
3299
3669
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
3300
3670
|
function r(e, n, r) {
|
|
3301
3671
|
var i = null;
|
|
@@ -3310,29 +3680,29 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3310
3680
|
};
|
|
3311
3681
|
}
|
|
3312
3682
|
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
3313
|
-
})),
|
|
3683
|
+
})), zo = /* @__PURE__ */ n(((t) => {
|
|
3314
3684
|
process.env.NODE_ENV !== "production" && (function() {
|
|
3315
3685
|
function n(e) {
|
|
3316
3686
|
if (e == null) return null;
|
|
3317
|
-
if (typeof e == "function") return e.$$typeof ===
|
|
3687
|
+
if (typeof e == "function") return e.$$typeof === re ? null : e.displayName || e.name || null;
|
|
3318
3688
|
if (typeof e == "string") return e;
|
|
3319
3689
|
switch (e) {
|
|
3320
|
-
case
|
|
3321
|
-
case
|
|
3322
|
-
case
|
|
3323
|
-
case
|
|
3324
|
-
case
|
|
3325
|
-
case
|
|
3690
|
+
case _: return "Fragment";
|
|
3691
|
+
case te: return "Profiler";
|
|
3692
|
+
case v: return "StrictMode";
|
|
3693
|
+
case ne: return "Suspense";
|
|
3694
|
+
case S: return "SuspenseList";
|
|
3695
|
+
case T: return "Activity";
|
|
3326
3696
|
}
|
|
3327
3697
|
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
3328
|
-
case
|
|
3329
|
-
case
|
|
3330
|
-
case
|
|
3331
|
-
case
|
|
3698
|
+
case g: return "Portal";
|
|
3699
|
+
case b: return e.displayName || "Context";
|
|
3700
|
+
case y: return (e._context.displayName || "Context") + ".Consumer";
|
|
3701
|
+
case x:
|
|
3332
3702
|
var t = e.render;
|
|
3333
3703
|
return e = e.displayName, e ||= (e = t.displayName || t.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
3334
|
-
case
|
|
3335
|
-
case
|
|
3704
|
+
case C: return t = e.displayName || null, t === null ? n(e.type) || "Memo" : t;
|
|
3705
|
+
case w:
|
|
3336
3706
|
t = e._payload, e = e._init;
|
|
3337
3707
|
try {
|
|
3338
3708
|
return n(e(t));
|
|
@@ -3357,8 +3727,8 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3357
3727
|
}
|
|
3358
3728
|
}
|
|
3359
3729
|
function a(e) {
|
|
3360
|
-
if (e ===
|
|
3361
|
-
if (typeof e == "object" && e && e.$$typeof ===
|
|
3730
|
+
if (e === _) return "<>";
|
|
3731
|
+
if (typeof e == "object" && e && e.$$typeof === w) return "<...>";
|
|
3362
3732
|
try {
|
|
3363
3733
|
var t = n(e);
|
|
3364
3734
|
return t ? "<" + t + ">" : "<...>";
|
|
@@ -3367,14 +3737,14 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3367
3737
|
}
|
|
3368
3738
|
}
|
|
3369
3739
|
function o() {
|
|
3370
|
-
var e =
|
|
3740
|
+
var e = E.A;
|
|
3371
3741
|
return e === null ? null : e.getOwner();
|
|
3372
3742
|
}
|
|
3373
3743
|
function s() {
|
|
3374
3744
|
return Error("react-stack-top-frame");
|
|
3375
3745
|
}
|
|
3376
3746
|
function c(e) {
|
|
3377
|
-
if (
|
|
3747
|
+
if (D.call(e, "key")) {
|
|
3378
3748
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
3379
3749
|
if (t && t.isReactWarning) return !1;
|
|
3380
3750
|
}
|
|
@@ -3382,7 +3752,7 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3382
3752
|
}
|
|
3383
3753
|
function l(e, t) {
|
|
3384
3754
|
function n() {
|
|
3385
|
-
|
|
3755
|
+
A || (A = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
3386
3756
|
}
|
|
3387
3757
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
3388
3758
|
get: n,
|
|
@@ -3391,12 +3761,12 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3391
3761
|
}
|
|
3392
3762
|
function u() {
|
|
3393
3763
|
var e = n(this.type);
|
|
3394
|
-
return
|
|
3764
|
+
return j[e] || (j[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
3395
3765
|
}
|
|
3396
3766
|
function d(e, t, n, r, i, a) {
|
|
3397
3767
|
var o = n.ref;
|
|
3398
3768
|
return e = {
|
|
3399
|
-
$$typeof:
|
|
3769
|
+
$$typeof: ee,
|
|
3400
3770
|
type: e,
|
|
3401
3771
|
key: t,
|
|
3402
3772
|
props: n,
|
|
@@ -3431,12 +3801,12 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3431
3801
|
}
|
|
3432
3802
|
function f(e, t, r, a, s, u) {
|
|
3433
3803
|
var f = t.children;
|
|
3434
|
-
if (f !== void 0) if (a) if (
|
|
3804
|
+
if (f !== void 0) if (a) if (O(f)) {
|
|
3435
3805
|
for (a = 0; a < f.length; a++) p(f[a]);
|
|
3436
3806
|
Object.freeze && Object.freeze(f);
|
|
3437
3807
|
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
3438
3808
|
else p(f);
|
|
3439
|
-
if (
|
|
3809
|
+
if (D.call(t, "key")) {
|
|
3440
3810
|
f = n(e);
|
|
3441
3811
|
var m = Object.keys(t).filter(function(e) {
|
|
3442
3812
|
return e !== "key";
|
|
@@ -3448,38 +3818,38 @@ var jo = /* @__PURE__ */ n(((e) => {
|
|
|
3448
3818
|
return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
|
|
3449
3819
|
}
|
|
3450
3820
|
function p(e) {
|
|
3451
|
-
m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof ===
|
|
3821
|
+
m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === w && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
3452
3822
|
}
|
|
3453
3823
|
function m(e) {
|
|
3454
|
-
return typeof e == "object" && !!e && e.$$typeof ===
|
|
3824
|
+
return typeof e == "object" && !!e && e.$$typeof === ee;
|
|
3455
3825
|
}
|
|
3456
|
-
var h = e("react"),
|
|
3826
|
+
var h = e("react"), ee = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), te = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), b = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), E = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, O = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
3457
3827
|
return null;
|
|
3458
3828
|
};
|
|
3459
3829
|
h = { react_stack_bottom_frame: function(e) {
|
|
3460
3830
|
return e();
|
|
3461
3831
|
} };
|
|
3462
|
-
var
|
|
3463
|
-
t.Fragment =
|
|
3464
|
-
var r = 1e4 >
|
|
3465
|
-
return f(e, t, n, !1, r ? Error("react-stack-top-frame") :
|
|
3832
|
+
var A, j = {}, M = h.react_stack_bottom_frame.bind(h, s)(), N = k(a(s)), ie = {};
|
|
3833
|
+
t.Fragment = _, t.jsx = function(e, t, n) {
|
|
3834
|
+
var r = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
3835
|
+
return f(e, t, n, !1, r ? Error("react-stack-top-frame") : M, r ? k(a(e)) : N);
|
|
3466
3836
|
}, t.jsxs = function(e, t, n) {
|
|
3467
|
-
var r = 1e4 >
|
|
3468
|
-
return f(e, t, n, !0, r ? Error("react-stack-top-frame") :
|
|
3837
|
+
var r = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
3838
|
+
return f(e, t, n, !0, r ? Error("react-stack-top-frame") : M, r ? k(a(e)) : N);
|
|
3469
3839
|
};
|
|
3470
3840
|
})();
|
|
3471
3841
|
})), $ = (/* @__PURE__ */ n(((e, t) => {
|
|
3472
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
3473
|
-
})))(),
|
|
3474
|
-
latitudeField:
|
|
3475
|
-
longitudeField:
|
|
3476
|
-
locationField:
|
|
3477
|
-
titleField:
|
|
3478
|
-
descriptionField:
|
|
3479
|
-
zoom:
|
|
3480
|
-
center:
|
|
3842
|
+
process.env.NODE_ENV === "production" ? t.exports = Ro() : t.exports = zo();
|
|
3843
|
+
})))(), Bo = wa({
|
|
3844
|
+
latitudeField: qi().optional(),
|
|
3845
|
+
longitudeField: qi().optional(),
|
|
3846
|
+
locationField: qi().optional(),
|
|
3847
|
+
titleField: qi().optional(),
|
|
3848
|
+
descriptionField: qi().optional(),
|
|
3849
|
+
zoom: ma().optional(),
|
|
3850
|
+
center: Aa([ma(), ma()]).optional()
|
|
3481
3851
|
});
|
|
3482
|
-
function
|
|
3852
|
+
function Vo(e) {
|
|
3483
3853
|
return e.data ? e.data : e.staticData ? {
|
|
3484
3854
|
provider: "value",
|
|
3485
3855
|
items: e.staticData
|
|
@@ -3488,7 +3858,7 @@ function Po(e) {
|
|
|
3488
3858
|
object: e.objectName
|
|
3489
3859
|
} : null;
|
|
3490
3860
|
}
|
|
3491
|
-
function
|
|
3861
|
+
function Ho(e) {
|
|
3492
3862
|
if (e) {
|
|
3493
3863
|
if (typeof e == "string") {
|
|
3494
3864
|
let t = e.split(" "), n = t[0], r = t[1]?.toLowerCase() === "desc" ? "desc" : "asc";
|
|
@@ -3497,7 +3867,7 @@ function Fo(e) {
|
|
|
3497
3867
|
if (Array.isArray(e)) return e.reduce((e, t) => (t.field && t.order && (e[t.field] = t.order), e), {});
|
|
3498
3868
|
}
|
|
3499
3869
|
}
|
|
3500
|
-
function
|
|
3870
|
+
function Uo(e) {
|
|
3501
3871
|
if (e.locationField || e.latitudeField) return {
|
|
3502
3872
|
locationField: e.locationField,
|
|
3503
3873
|
latitudeField: e.latitudeField,
|
|
@@ -3509,7 +3879,7 @@ function Io(e) {
|
|
|
3509
3879
|
};
|
|
3510
3880
|
let t = null;
|
|
3511
3881
|
if (e.filter && typeof e.filter == "object" && "map" in e.filter ? t = e.filter.map : e.map && (t = e.map), t) {
|
|
3512
|
-
let e =
|
|
3882
|
+
let e = Bo.safeParse(t);
|
|
3513
3883
|
return e.success || console.warn("[ObjectMap] Invalid map configuration:", e.error.format()), t;
|
|
3514
3884
|
}
|
|
3515
3885
|
return {
|
|
@@ -3522,7 +3892,7 @@ function Io(e) {
|
|
|
3522
3892
|
center: [0, 0]
|
|
3523
3893
|
};
|
|
3524
3894
|
}
|
|
3525
|
-
function
|
|
3895
|
+
function Wo(e, t) {
|
|
3526
3896
|
if (t.latitudeField && t.longitudeField) {
|
|
3527
3897
|
let n = e[t.latitudeField], r = e[t.longitudeField];
|
|
3528
3898
|
if (typeof n == "number" && typeof r == "number") return [n, r];
|
|
@@ -3544,7 +3914,7 @@ function Lo(e, t) {
|
|
|
3544
3914
|
}
|
|
3545
3915
|
return null;
|
|
3546
3916
|
}
|
|
3547
|
-
function
|
|
3917
|
+
function Go(e, t, n = 50) {
|
|
3548
3918
|
if (e.length <= 1 || t >= 15) return e.map((e) => ({
|
|
3549
3919
|
id: e.id,
|
|
3550
3920
|
coordinates: e.coordinates,
|
|
@@ -3575,57 +3945,57 @@ function Ro(e, t, n = 50) {
|
|
|
3575
3945
|
}
|
|
3576
3946
|
}), a;
|
|
3577
3947
|
}
|
|
3578
|
-
var
|
|
3579
|
-
let [p,
|
|
3948
|
+
var Ko = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick: i, onEdit: a, onDelete: o, enableClustering: c, clusterRadius: l = 50, ...d }) => {
|
|
3949
|
+
let [p, g] = f([]), [te, y] = f(!0), [b, x] = f(null), [ne, S] = f(null), [C, w] = f(null), [T, re] = f(""), E = Vo(e), D = u(() => E, [JSON.stringify(E)]), O = Uo(e), k = D?.provider === "value";
|
|
3580
3950
|
s(() => {
|
|
3581
3951
|
(async () => {
|
|
3582
3952
|
try {
|
|
3583
|
-
if (
|
|
3953
|
+
if (y(!0), d.data) {
|
|
3584
3954
|
let e = d.data;
|
|
3585
3955
|
if (Array.isArray(e)) {
|
|
3586
|
-
|
|
3956
|
+
g(e), y(!1);
|
|
3587
3957
|
return;
|
|
3588
3958
|
}
|
|
3589
3959
|
}
|
|
3590
3960
|
if (e.data) {
|
|
3591
3961
|
let t = e.data;
|
|
3592
3962
|
if (Array.isArray(t)) {
|
|
3593
|
-
|
|
3963
|
+
g(t), y(!1);
|
|
3594
3964
|
return;
|
|
3595
3965
|
}
|
|
3596
3966
|
}
|
|
3597
|
-
if (
|
|
3598
|
-
|
|
3967
|
+
if (k && D?.provider === "value") {
|
|
3968
|
+
g(D.items), y(!1);
|
|
3599
3969
|
return;
|
|
3600
3970
|
}
|
|
3601
3971
|
if (!t || typeof t.find != "function") throw Error("DataSource required for object/api providers");
|
|
3602
|
-
if (
|
|
3603
|
-
let n =
|
|
3604
|
-
|
|
3972
|
+
if (D?.provider === "object") {
|
|
3973
|
+
let n = D.object, r = m(ne?.fields);
|
|
3974
|
+
g(h(await t.find(n, {
|
|
3605
3975
|
$filter: e.filter,
|
|
3606
|
-
$orderby:
|
|
3976
|
+
$orderby: Ho(e.sort),
|
|
3607
3977
|
...r.length > 0 ? { $expand: r } : {}
|
|
3608
3978
|
})));
|
|
3609
|
-
} else
|
|
3610
|
-
|
|
3979
|
+
} else D?.provider === "api" && (console.warn("API provider not yet implemented for ObjectMap"), g([]));
|
|
3980
|
+
y(!1);
|
|
3611
3981
|
} catch (e) {
|
|
3612
|
-
|
|
3982
|
+
x(e), y(!1);
|
|
3613
3983
|
}
|
|
3614
3984
|
})();
|
|
3615
3985
|
}, [
|
|
3616
|
-
|
|
3986
|
+
D,
|
|
3617
3987
|
t,
|
|
3618
|
-
|
|
3988
|
+
k,
|
|
3619
3989
|
e.filter,
|
|
3620
3990
|
e.sort,
|
|
3621
|
-
|
|
3991
|
+
ne
|
|
3622
3992
|
]), s(() => {
|
|
3623
|
-
!
|
|
3993
|
+
!k && t && (async () => {
|
|
3624
3994
|
try {
|
|
3625
3995
|
if (!t) return;
|
|
3626
|
-
let n =
|
|
3996
|
+
let n = D?.provider === "object" ? D.object : e.objectName;
|
|
3627
3997
|
if (!n) return;
|
|
3628
|
-
|
|
3998
|
+
S(await t.getObjectSchema(n));
|
|
3629
3999
|
} catch (e) {
|
|
3630
4000
|
console.error("Failed to fetch object schema:", e);
|
|
3631
4001
|
}
|
|
@@ -3633,16 +4003,16 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3633
4003
|
}, [
|
|
3634
4004
|
e.objectName,
|
|
3635
4005
|
t,
|
|
3636
|
-
|
|
3637
|
-
|
|
4006
|
+
k,
|
|
4007
|
+
D
|
|
3638
4008
|
]);
|
|
3639
|
-
let { markers:
|
|
4009
|
+
let { markers: A, invalidCount: j } = u(() => {
|
|
3640
4010
|
let e = 0;
|
|
3641
4011
|
return {
|
|
3642
4012
|
markers: p.map((t, n) => {
|
|
3643
|
-
let r =
|
|
4013
|
+
let r = Wo(t, O);
|
|
3644
4014
|
if (!r) return e++, null;
|
|
3645
|
-
let i =
|
|
4015
|
+
let i = O.titleField ? t[O.titleField] : "Marker", a = O.descriptionField ? t[O.descriptionField] : void 0, [o, s] = r;
|
|
3646
4016
|
return !isFinite(o) || !isFinite(s) || o < -90 || o > 90 || s < -180 || s > 180 ? (e++, null) : {
|
|
3647
4017
|
id: t.id || t._id || `marker-${n}`,
|
|
3648
4018
|
title: i,
|
|
@@ -3653,40 +4023,40 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3653
4023
|
}).filter((e) => e !== null),
|
|
3654
4024
|
invalidCount: e
|
|
3655
4025
|
};
|
|
3656
|
-
}, [p,
|
|
4026
|
+
}, [p, O]), M = u(() => A.find((e) => e.id === C), [A, C]), [N, ie] = f(O.zoom || 3), ae = ee({
|
|
3657
4027
|
navigation: e.navigation,
|
|
3658
4028
|
objectName: e.objectName,
|
|
3659
4029
|
onRowClick: i
|
|
3660
|
-
}),
|
|
3661
|
-
if (!
|
|
3662
|
-
let e =
|
|
3663
|
-
return
|
|
3664
|
-
}, [
|
|
4030
|
+
}), P = u(() => {
|
|
4031
|
+
if (!T.trim()) return A;
|
|
4032
|
+
let e = T.toLowerCase();
|
|
4033
|
+
return A.filter((t) => t.title?.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e));
|
|
4034
|
+
}, [A, T]), oe = u(() => c ?? (e.enableClustering || P.length > 100) ? Go(P, N, l) : P.map((e) => ({
|
|
3665
4035
|
id: e.id,
|
|
3666
4036
|
coordinates: e.coordinates,
|
|
3667
4037
|
markers: [e],
|
|
3668
4038
|
isCluster: !1
|
|
3669
4039
|
})), [
|
|
3670
|
-
|
|
3671
|
-
|
|
4040
|
+
P,
|
|
4041
|
+
N,
|
|
3672
4042
|
c,
|
|
3673
4043
|
l,
|
|
3674
4044
|
e
|
|
3675
|
-
]),
|
|
3676
|
-
if (!
|
|
3677
|
-
longitude:
|
|
3678
|
-
latitude:
|
|
3679
|
-
zoom:
|
|
4045
|
+
]), F = u(() => {
|
|
4046
|
+
if (!P.length) return {
|
|
4047
|
+
longitude: O.center?.[1] || 0,
|
|
4048
|
+
latitude: O.center?.[0] || 0,
|
|
4049
|
+
zoom: O.zoom || 2
|
|
3680
4050
|
};
|
|
3681
|
-
let e =
|
|
4051
|
+
let e = P.map((e) => e.coordinates[0]), t = P.map((e) => e.coordinates[1]), n = Math.min(...e), r = Math.max(...e), i = Math.min(...t), a = Math.max(...t);
|
|
3682
4052
|
return {
|
|
3683
4053
|
longitude: (n + r) / 2,
|
|
3684
4054
|
latitude: (i + a) / 2,
|
|
3685
|
-
zoom:
|
|
4055
|
+
zoom: O.zoom || 3
|
|
3686
4056
|
};
|
|
3687
|
-
}, [
|
|
3688
|
-
return
|
|
3689
|
-
className:
|
|
4057
|
+
}, [P, O]);
|
|
4058
|
+
return te ? /* @__PURE__ */ (0, $.jsx)("div", {
|
|
4059
|
+
className: v("min-w-0 overflow-hidden", n),
|
|
3690
4060
|
children: /* @__PURE__ */ (0, $.jsx)("div", {
|
|
3691
4061
|
className: "flex items-center justify-center h-96 bg-muted rounded-lg border",
|
|
3692
4062
|
children: /* @__PURE__ */ (0, $.jsx)("div", {
|
|
@@ -3694,36 +4064,36 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3694
4064
|
children: "Loading map..."
|
|
3695
4065
|
})
|
|
3696
4066
|
})
|
|
3697
|
-
}) :
|
|
3698
|
-
className:
|
|
4067
|
+
}) : b ? /* @__PURE__ */ (0, $.jsx)("div", {
|
|
4068
|
+
className: v("min-w-0 overflow-hidden", n),
|
|
3699
4069
|
children: /* @__PURE__ */ (0, $.jsx)("div", {
|
|
3700
4070
|
className: "flex items-center justify-center h-96 bg-muted rounded-lg border",
|
|
3701
4071
|
children: /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3702
4072
|
className: "text-destructive",
|
|
3703
|
-
children: ["Error: ",
|
|
4073
|
+
children: ["Error: ", b.message]
|
|
3704
4074
|
})
|
|
3705
4075
|
})
|
|
3706
4076
|
}) : /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3707
|
-
className:
|
|
4077
|
+
className: v("min-w-0 overflow-hidden", n),
|
|
3708
4078
|
children: [
|
|
3709
|
-
|
|
4079
|
+
j > 0 && /* @__PURE__ */ (0, $.jsx)("div", {
|
|
3710
4080
|
className: "mb-2 p-2 text-sm text-yellow-800 bg-yellow-50 border border-yellow-200 rounded",
|
|
3711
|
-
children: `${
|
|
4081
|
+
children: `${j} record${j === 1 ? "" : "s"} with missing or invalid coordinates excluded from the map.`
|
|
3712
4082
|
}),
|
|
3713
|
-
|
|
4083
|
+
A.length > 0 && /* @__PURE__ */ (0, $.jsx)("div", {
|
|
3714
4084
|
className: "mb-2",
|
|
3715
4085
|
children: /* @__PURE__ */ (0, $.jsx)("input", {
|
|
3716
4086
|
type: "text",
|
|
3717
|
-
value:
|
|
3718
|
-
onChange: (e) =>
|
|
4087
|
+
value: T,
|
|
4088
|
+
onChange: (e) => re(e.target.value),
|
|
3719
4089
|
placeholder: "Search locations…",
|
|
3720
4090
|
className: "w-full px-3 py-2 text-sm border rounded-md bg-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
3721
4091
|
})
|
|
3722
4092
|
}),
|
|
3723
4093
|
/* @__PURE__ */ (0, $.jsx)("div", {
|
|
3724
4094
|
className: "relative border rounded-lg overflow-hidden bg-muted h-[300px] sm:h-[400px] md:h-[500px] lg:h-[600px] w-full",
|
|
3725
|
-
children: /* @__PURE__ */ (0, $.jsxs)(
|
|
3726
|
-
initialViewState:
|
|
4095
|
+
children: /* @__PURE__ */ (0, $.jsxs)(wo, {
|
|
4096
|
+
initialViewState: F,
|
|
3727
4097
|
style: {
|
|
3728
4098
|
width: "100%",
|
|
3729
4099
|
height: "100%"
|
|
@@ -3734,12 +4104,12 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3734
4104
|
touchPitch: !0,
|
|
3735
4105
|
onZoom: (e) => ie(Math.round(e.viewState.zoom)),
|
|
3736
4106
|
children: [
|
|
3737
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
4107
|
+
/* @__PURE__ */ (0, $.jsx)(Po, {
|
|
3738
4108
|
position: "top-right",
|
|
3739
4109
|
showCompass: !0,
|
|
3740
4110
|
showZoom: !0
|
|
3741
4111
|
}),
|
|
3742
|
-
|
|
4112
|
+
oe.map((e) => e.isCluster ? /* @__PURE__ */ (0, $.jsx)(Oo, {
|
|
3743
4113
|
longitude: e.coordinates[0],
|
|
3744
4114
|
latitude: e.coordinates[1],
|
|
3745
4115
|
anchor: "center",
|
|
@@ -3752,46 +4122,46 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3752
4122
|
title: `${e.markers.length} markers`,
|
|
3753
4123
|
children: e.markers.length
|
|
3754
4124
|
})
|
|
3755
|
-
}, e.id) : /* @__PURE__ */ (0, $.jsx)(
|
|
4125
|
+
}, e.id) : /* @__PURE__ */ (0, $.jsx)(Oo, {
|
|
3756
4126
|
longitude: e.coordinates[0],
|
|
3757
4127
|
latitude: e.coordinates[1],
|
|
3758
4128
|
anchor: "bottom",
|
|
3759
4129
|
onClick: (t) => {
|
|
3760
4130
|
t.originalEvent.stopPropagation();
|
|
3761
4131
|
let n = e.markers[0];
|
|
3762
|
-
|
|
4132
|
+
w(n.id), ae.handleClick(n.data), r?.(n.data);
|
|
3763
4133
|
},
|
|
3764
4134
|
children: /* @__PURE__ */ (0, $.jsx)("div", {
|
|
3765
4135
|
className: "text-2xl cursor-pointer hover:scale-110 transition-transform",
|
|
3766
4136
|
children: "📍"
|
|
3767
4137
|
})
|
|
3768
4138
|
}, e.id)),
|
|
3769
|
-
|
|
3770
|
-
longitude:
|
|
3771
|
-
latitude:
|
|
4139
|
+
M && /* @__PURE__ */ (0, $.jsx)(ko, {
|
|
4140
|
+
longitude: M.coordinates[0],
|
|
4141
|
+
latitude: M.coordinates[1],
|
|
3772
4142
|
anchor: "top",
|
|
3773
|
-
onClose: () =>
|
|
4143
|
+
onClose: () => w(null),
|
|
3774
4144
|
closeOnClick: !1,
|
|
3775
4145
|
children: /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3776
4146
|
className: "p-2 min-w-[150px] sm:min-w-[200px]",
|
|
3777
4147
|
children: [
|
|
3778
4148
|
/* @__PURE__ */ (0, $.jsx)("h3", {
|
|
3779
4149
|
className: "font-bold text-sm mb-1",
|
|
3780
|
-
children:
|
|
4150
|
+
children: M.title
|
|
3781
4151
|
}),
|
|
3782
|
-
|
|
4152
|
+
M.description && /* @__PURE__ */ (0, $.jsx)("p", {
|
|
3783
4153
|
className: "text-xs text-muted-foreground",
|
|
3784
|
-
children:
|
|
4154
|
+
children: M.description
|
|
3785
4155
|
}),
|
|
3786
4156
|
/* @__PURE__ */ (0, $.jsxs)("div", {
|
|
3787
4157
|
className: "mt-2 text-xs flex gap-2",
|
|
3788
4158
|
children: [a && /* @__PURE__ */ (0, $.jsx)("button", {
|
|
3789
4159
|
className: "text-blue-500 hover:underline",
|
|
3790
|
-
onClick: () => a(
|
|
4160
|
+
onClick: () => a(M.data),
|
|
3791
4161
|
children: "Edit"
|
|
3792
4162
|
}), o && /* @__PURE__ */ (0, $.jsx)("button", {
|
|
3793
4163
|
className: "text-red-500 hover:underline",
|
|
3794
|
-
onClick: () => o(
|
|
4164
|
+
onClick: () => o(M.data),
|
|
3795
4165
|
children: "Delete"
|
|
3796
4166
|
})]
|
|
3797
4167
|
})
|
|
@@ -3801,8 +4171,8 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3801
4171
|
]
|
|
3802
4172
|
})
|
|
3803
4173
|
}),
|
|
3804
|
-
|
|
3805
|
-
...
|
|
4174
|
+
ae.isOverlay && /* @__PURE__ */ (0, $.jsx)(_, {
|
|
4175
|
+
...ae,
|
|
3806
4176
|
title: "Location Details",
|
|
3807
4177
|
children: (e) => /* @__PURE__ */ (0, $.jsx)("div", {
|
|
3808
4178
|
className: "space-y-3",
|
|
@@ -3820,15 +4190,15 @@ var zo = ({ schema: e, dataSource: t, className: n, onMarkerClick: r, onRowClick
|
|
|
3820
4190
|
})
|
|
3821
4191
|
]
|
|
3822
4192
|
});
|
|
3823
|
-
},
|
|
3824
|
-
let { dataSource: n } =
|
|
3825
|
-
return /* @__PURE__ */ (0, $.jsx)(
|
|
4193
|
+
}, qo = ({ schema: e, ...t }) => {
|
|
4194
|
+
let { dataSource: n } = g() || {};
|
|
4195
|
+
return /* @__PURE__ */ (0, $.jsx)(Ko, {
|
|
3826
4196
|
schema: e,
|
|
3827
4197
|
dataSource: n,
|
|
3828
4198
|
...t
|
|
3829
4199
|
});
|
|
3830
4200
|
};
|
|
3831
|
-
console.log("Registering object-map..."), p.register("object-map",
|
|
4201
|
+
console.log("Registering object-map..."), p.register("object-map", qo, {
|
|
3832
4202
|
namespace: "plugin-map",
|
|
3833
4203
|
label: "Object Map",
|
|
3834
4204
|
category: "view",
|
|
@@ -3843,7 +4213,7 @@ console.log("Registering object-map..."), p.register("object-map", Bo, {
|
|
|
3843
4213
|
label: "Map Config",
|
|
3844
4214
|
description: "latitudeField, longitudeField, titleField"
|
|
3845
4215
|
}]
|
|
3846
|
-
}), p.register("map",
|
|
4216
|
+
}), p.register("map", qo, {
|
|
3847
4217
|
namespace: "view",
|
|
3848
4218
|
label: "Map View",
|
|
3849
4219
|
category: "view",
|
|
@@ -3860,4 +4230,4 @@ console.log("Registering object-map..."), p.register("object-map", Bo, {
|
|
|
3860
4230
|
}]
|
|
3861
4231
|
});
|
|
3862
4232
|
//#endregion
|
|
3863
|
-
export {
|
|
4233
|
+
export { Ko as ObjectMap, qo as ObjectMapRenderer };
|