@xmachines/play-solid 1.0.0-beta.36 → 1.0.0-beta.38

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