@burdenoff/fe-libs 2026.1027.2 → 2026.1027.3

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 (50) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +8 -5
  2. package/dist/node_modules/@openuidev/devtools/dist/index.js +74 -0
  3. package/dist/node_modules/@openuidev/lang-core/dist/index.js +3779 -0
  4. package/dist/node_modules/@openuidev/lang-core/dist/shared-Dzgc28Wo.js +39 -0
  5. package/dist/node_modules/@openuidev/observability/dist/index.js +30 -0
  6. package/dist/node_modules/@openuidev/react-lang/dist/exports-CLfR509v.js +946 -0
  7. package/dist/node_modules/@openuidev/react-lang/dist/index.js +25 -0
  8. package/dist/node_modules/ci-info/index.js +34 -0
  9. package/dist/node_modules/ci-info/vendors.json.js +331 -0
  10. package/dist/node_modules/react-dom/cjs/react-dom-client.development.js +11168 -0
  11. package/dist/node_modules/react-dom/cjs/react-dom-client.production.js +7384 -0
  12. package/dist/node_modules/react-dom/client.js +19 -0
  13. package/dist/node_modules/scheduler/cjs/scheduler.development.js +203 -0
  14. package/dist/node_modules/scheduler/cjs/scheduler.production.js +203 -0
  15. package/dist/node_modules/scheduler/index.js +10 -0
  16. package/dist/node_modules/zod/v4/classic/errors.js +23 -0
  17. package/dist/node_modules/zod/v4/classic/iso.js +31 -0
  18. package/dist/node_modules/zod/v4/classic/parse.js +6 -0
  19. package/dist/node_modules/zod/v4/classic/schemas.js +339 -0
  20. package/dist/node_modules/zod/v4/core/api.js +491 -0
  21. package/dist/node_modules/zod/v4/core/checks.js +283 -0
  22. package/dist/node_modules/zod/v4/core/core.js +44 -0
  23. package/dist/node_modules/zod/v4/core/doc.js +23 -0
  24. package/dist/node_modules/zod/v4/core/errors.js +41 -0
  25. package/dist/node_modules/zod/v4/core/json-schema-processors.js +306 -0
  26. package/dist/node_modules/zod/v4/core/parse.js +68 -0
  27. package/dist/node_modules/zod/v4/core/regexes.js +25 -0
  28. package/dist/node_modules/zod/v4/core/registries.js +40 -0
  29. package/dist/node_modules/zod/v4/core/schemas.js +796 -0
  30. package/dist/node_modules/zod/v4/core/to-json-schema.js +222 -0
  31. package/dist/node_modules/zod/v4/core/util.js +266 -0
  32. package/dist/node_modules/zod/v4/core/versions.js +8 -0
  33. package/dist/shared/assistant/index.d.ts +4 -0
  34. package/dist/shared/assistant/openui/AssistantOpenUiBlock.d.ts +19 -0
  35. package/dist/shared/assistant/openui/AssistantOpenUiBlock.js +26 -0
  36. package/dist/shared/assistant/openui/AssistantRichContent.d.ts +13 -0
  37. package/dist/shared/assistant/openui/AssistantRichContent.js +37 -0
  38. package/dist/shared/assistant/openui/OpenUiBoundary.d.ts +26 -0
  39. package/dist/shared/assistant/openui/OpenUiBoundary.js +13 -0
  40. package/dist/shared/assistant/openui/generativeUi.d.ts +6 -0
  41. package/dist/shared/assistant/openui/generativeUi.js +12 -0
  42. package/dist/shared/assistant/openui/library.d.ts +2 -0
  43. package/dist/shared/assistant/openui/library.js +191 -0
  44. package/dist/shared/assistant/openui/limits.d.ts +12 -0
  45. package/dist/shared/assistant/openui/limits.js +7 -0
  46. package/dist/shared/assistant/openui/segments.d.ts +40 -0
  47. package/dist/shared/assistant/openui/segments.js +52 -0
  48. package/dist/shared/assistant/ui/AssistantMessageItem.js +115 -109
  49. package/dist/shared-assistant.js +108 -104
  50. package/package.json +2 -1
@@ -0,0 +1,796 @@
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 ee, optionalKeys as te, prefixIssues as g, propertyKeyTypes as _ } from "./util.js";
3
+ import { safeParse as v, safeParseAsync as y } from "./parse.js";
4
+ import { base64 as b, base64url as x, cidrv4 as ne, cidrv6 as re, cuid as ie, cuid2 as ae, date as oe, datetime as se, duration as ce, e164 as le, email as ue, emoji as de, guid as fe, ipv4 as pe, ipv6 as me, ksuid as he, nanoid as ge, number as S, string as _e, time as C, ulid as w, uuid as T, xid as E } from "./regexes.js";
5
+ import { $ZodCheck as D, $ZodCheckNumberFormat as O, $ZodCheckStringFormat as k } from "./checks.js";
6
+ import { Doc as A } from "./doc.js";
7
+ import { version as j } from "./versions.js";
8
+ //#region node_modules/zod/v4/core/schemas.js
9
+ var M = /*@__PURE__*/ n("$ZodType", (t, n) => {
10
+ var r;
11
+ t ??= {}, t._zod.def = n, t._zod.bag = t._zod.bag || {}, t._zod.version = j;
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 = v(t, e);
69
+ return n.success ? { value: n.data } : { issues: n.error?.issues };
70
+ } catch {
71
+ return y(t, e).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
72
+ }
73
+ },
74
+ vendor: "zod",
75
+ version: 1
76
+ }));
77
+ }), N = /*@__PURE__*/ n("$ZodString", (e, t) => {
78
+ M.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? _e(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
+ }), P = /*@__PURE__*/ n("$ZodStringFormat", (e, t) => {
90
+ k.init(e, t), N.init(e, t);
91
+ }), F = /*@__PURE__*/ n("$ZodGUID", (e, t) => {
92
+ t.pattern ??= fe, P.init(e, t);
93
+ }), I = /*@__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 ??= T(e);
107
+ } else t.pattern ??= T();
108
+ P.init(e, t);
109
+ }), ve = /*@__PURE__*/ n("$ZodEmail", (e, t) => {
110
+ t.pattern ??= ue, P.init(e, t);
111
+ }), ye = /*@__PURE__*/ n("$ZodURL", (e, t) => {
112
+ P.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
+ }), be = /*@__PURE__*/ n("$ZodEmoji", (e, t) => {
144
+ t.pattern ??= de(), P.init(e, t);
145
+ }), xe = /*@__PURE__*/ n("$ZodNanoID", (e, t) => {
146
+ t.pattern ??= ge, P.init(e, t);
147
+ }), Se = /*@__PURE__*/ n("$ZodCUID", (e, t) => {
148
+ t.pattern ??= ie, P.init(e, t);
149
+ }), Ce = /*@__PURE__*/ n("$ZodCUID2", (e, t) => {
150
+ t.pattern ??= ae, P.init(e, t);
151
+ }), we = /*@__PURE__*/ n("$ZodULID", (e, t) => {
152
+ t.pattern ??= w, P.init(e, t);
153
+ }), Te = /*@__PURE__*/ n("$ZodXID", (e, t) => {
154
+ t.pattern ??= E, P.init(e, t);
155
+ }), Ee = /*@__PURE__*/ n("$ZodKSUID", (e, t) => {
156
+ t.pattern ??= he, P.init(e, t);
157
+ }), De = /*@__PURE__*/ n("$ZodISODateTime", (e, t) => {
158
+ t.pattern ??= se(t), P.init(e, t);
159
+ }), Oe = /*@__PURE__*/ n("$ZodISODate", (e, t) => {
160
+ t.pattern ??= oe, P.init(e, t);
161
+ }), ke = /*@__PURE__*/ n("$ZodISOTime", (e, t) => {
162
+ t.pattern ??= C(t), P.init(e, t);
163
+ }), Ae = /*@__PURE__*/ n("$ZodISODuration", (e, t) => {
164
+ t.pattern ??= ce, P.init(e, t);
165
+ }), je = /*@__PURE__*/ n("$ZodIPv4", (e, t) => {
166
+ t.pattern ??= pe, P.init(e, t), e._zod.bag.format = "ipv4";
167
+ }), Me = /*@__PURE__*/ n("$ZodIPv6", (e, t) => {
168
+ t.pattern ??= me, P.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
+ }), Ne = /*@__PURE__*/ n("$ZodCIDRv4", (e, t) => {
182
+ t.pattern ??= ne, P.init(e, t);
183
+ }), Pe = /*@__PURE__*/ n("$ZodCIDRv6", (e, t) => {
184
+ t.pattern ??= re, P.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 L(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 Fe = /*@__PURE__*/ n("$ZodBase64", (e, t) => {
214
+ t.pattern ??= b, P.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
215
+ L(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 Ie(e) {
225
+ if (!x.test(e)) return !1;
226
+ let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
227
+ return L(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
228
+ }
229
+ var Le = /*@__PURE__*/ n("$ZodBase64URL", (e, t) => {
230
+ t.pattern ??= x, P.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
231
+ Ie(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
+ }), Re = /*@__PURE__*/ n("$ZodE164", (e, t) => {
240
+ t.pattern ??= le, P.init(e, t);
241
+ });
242
+ function ze(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 Be = /*@__PURE__*/ n("$ZodJWT", (e, t) => {
255
+ P.init(e, t), e._zod.check = (n) => {
256
+ ze(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
+ }), R = /*@__PURE__*/ n("$ZodNumber", (e, t) => {
265
+ M.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? S, 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
+ }), Ve = /*@__PURE__*/ n("$ZodNumberFormat", (e, t) => {
281
+ O.init(e, t), R.init(e, t);
282
+ }), He = /*@__PURE__*/ n("$ZodAny", (e, t) => {
283
+ M.init(e, t), e._zod.parse = (e) => e;
284
+ }), Ue = /*@__PURE__*/ n("$ZodUnknown", (e, t) => {
285
+ M.init(e, t), e._zod.parse = (e) => e;
286
+ }), We = /*@__PURE__*/ n("$ZodNever", (e, t) => {
287
+ M.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
288
+ expected: "never",
289
+ code: "invalid_type",
290
+ input: t.value,
291
+ inst: e
292
+ }), t);
293
+ });
294
+ function z(e, t, n) {
295
+ e.issues.length && t.issues.push(...g(n, e.issues)), t.value[n] = e.value;
296
+ }
297
+ var Ge = /*@__PURE__*/ n("$ZodArray", (e, t) => {
298
+ M.init(e, t), e._zod.parse = (n, r) => {
299
+ let i = n.value;
300
+ if (!Array.isArray(i)) return n.issues.push({
301
+ expected: "array",
302
+ code: "invalid_type",
303
+ input: i,
304
+ inst: e
305
+ }), n;
306
+ n.value = Array(i.length);
307
+ let a = [];
308
+ for (let e = 0; e < i.length; e++) {
309
+ let o = i[e], s = t.element._zod.run({
310
+ value: o,
311
+ issues: []
312
+ }, r);
313
+ s instanceof Promise ? a.push(s.then((t) => z(t, n, e))) : z(s, n, e);
314
+ }
315
+ return a.length ? Promise.all(a).then(() => n) : n;
316
+ };
317
+ });
318
+ function B(e, t, n, r, i) {
319
+ if (e.issues.length) {
320
+ if (i && !(n in r)) return;
321
+ t.issues.push(...g(n, e.issues));
322
+ }
323
+ e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
324
+ }
325
+ function V(e) {
326
+ let t = Object.keys(e.shape);
327
+ for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
328
+ let n = te(e.shape);
329
+ return {
330
+ ...e,
331
+ keys: t,
332
+ keySet: new Set(t),
333
+ numKeys: t.length,
334
+ optionalKeys: new Set(n)
335
+ };
336
+ }
337
+ function H(e, t, n, r, i, a) {
338
+ let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optout === "optional";
339
+ for (let i in t) {
340
+ if (s.has(i)) continue;
341
+ if (l === "never") {
342
+ o.push(i);
343
+ continue;
344
+ }
345
+ let a = c.run({
346
+ value: t[i],
347
+ issues: []
348
+ }, r);
349
+ a instanceof Promise ? e.push(a.then((e) => B(e, n, i, t, u))) : B(a, n, i, t, u);
350
+ }
351
+ return o.length && n.issues.push({
352
+ code: "unrecognized_keys",
353
+ keys: o,
354
+ input: t,
355
+ inst: a
356
+ }), e.length ? Promise.all(e).then(() => n) : n;
357
+ }
358
+ var Ke = /*@__PURE__*/ n("$ZodObject", (e, t) => {
359
+ if (M.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
360
+ let e = t.shape;
361
+ Object.defineProperty(t, "shape", { get: () => {
362
+ let n = { ...e };
363
+ return Object.defineProperty(t, "shape", { value: n }), n;
364
+ } });
365
+ }
366
+ let n = s(() => V(t));
367
+ l(e._zod, "propValues", () => {
368
+ let e = t.shape, n = {};
369
+ for (let t in e) {
370
+ let r = e[t]._zod;
371
+ if (r.values) {
372
+ n[t] ?? (n[t] = /* @__PURE__ */ new Set());
373
+ for (let e of r.values) n[t].add(e);
374
+ }
375
+ }
376
+ return n;
377
+ });
378
+ let r = m, i = t.catchall, a;
379
+ e._zod.parse = (t, o) => {
380
+ a ??= n.value;
381
+ let s = t.value;
382
+ if (!r(s)) return t.issues.push({
383
+ expected: "object",
384
+ code: "invalid_type",
385
+ input: s,
386
+ inst: e
387
+ }), t;
388
+ t.value = {};
389
+ let c = [], l = a.shape;
390
+ for (let e of a.keys) {
391
+ let n = l[e], r = n._zod.optout === "optional", i = n._zod.run({
392
+ value: s[e],
393
+ issues: []
394
+ }, o);
395
+ i instanceof Promise ? c.push(i.then((n) => B(n, t, e, s, r))) : B(i, t, e, s, r);
396
+ }
397
+ return i ? H(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
398
+ };
399
+ }), qe = /*@__PURE__*/ n("$ZodObjectJIT", (e, t) => {
400
+ Ke.init(e, t);
401
+ let n = e._zod.parse, r = s(() => V(t)), a = (e) => {
402
+ let t = new A([
403
+ "shape",
404
+ "payload",
405
+ "ctx"
406
+ ]), n = r.value, i = (e) => {
407
+ let t = u(e);
408
+ return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
409
+ };
410
+ t.write("const input = payload.value;");
411
+ let a = Object.create(null), o = 0;
412
+ for (let e of n.keys) a[e] = `key_${o++}`;
413
+ t.write("const newResult = {};");
414
+ for (let r of n.keys) {
415
+ let n = a[r], o = u(r), s = e[r]?._zod?.optout === "optional";
416
+ t.write(`const ${n} = ${i(r)};`), s ? t.write(`
417
+ if (${n}.issues.length) {
418
+ if (${o} in input) {
419
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
420
+ ...iss,
421
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
422
+ })));
423
+ }
424
+ }
425
+
426
+ if (${n}.value === undefined) {
427
+ if (${o} in input) {
428
+ newResult[${o}] = undefined;
429
+ }
430
+ } else {
431
+ newResult[${o}] = ${n}.value;
432
+ }
433
+
434
+ `) : t.write(`
435
+ if (${n}.issues.length) {
436
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
437
+ ...iss,
438
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
439
+ })));
440
+ }
441
+
442
+ if (${n}.value === undefined) {
443
+ if (${o} in input) {
444
+ newResult[${o}] = undefined;
445
+ }
446
+ } else {
447
+ newResult[${o}] = ${n}.value;
448
+ }
449
+
450
+ `);
451
+ }
452
+ t.write("payload.value = newResult;"), t.write("return payload;");
453
+ let s = t.compile();
454
+ return (t, n) => s(e, t, n);
455
+ }, c, l = m, d = !i.jitless, f = d && o.value, p = t.catchall, h;
456
+ e._zod.parse = (i, o) => {
457
+ h ??= r.value;
458
+ let s = i.value;
459
+ return l(s) ? d && f && o?.async === !1 && o.jitless !== !0 ? (c ||= a(t.shape), i = c(i, o), p ? H([], s, i, o, h, e) : i) : n(i, o) : (i.issues.push({
460
+ expected: "object",
461
+ code: "invalid_type",
462
+ input: s,
463
+ inst: e
464
+ }), i);
465
+ };
466
+ });
467
+ function U(e, t, n, i) {
468
+ for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
469
+ let o = e.filter((e) => !a(e));
470
+ return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
471
+ code: "invalid_union",
472
+ input: t.value,
473
+ inst: n,
474
+ errors: e.map((e) => e.issues.map((e) => f(e, i, r())))
475
+ }), t);
476
+ }
477
+ var Je = /*@__PURE__*/ n("$ZodUnion", (e, t) => {
478
+ M.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", () => {
479
+ if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
480
+ }), l(e._zod, "pattern", () => {
481
+ if (t.options.every((e) => e._zod.pattern)) {
482
+ let e = t.options.map((e) => e._zod.pattern);
483
+ return RegExp(`^(${e.map((e) => c(e.source)).join("|")})$`);
484
+ }
485
+ });
486
+ let n = t.options.length === 1, r = t.options[0]._zod.run;
487
+ e._zod.parse = (i, a) => {
488
+ if (n) return r(i, a);
489
+ let o = !1, s = [];
490
+ for (let e of t.options) {
491
+ let t = e._zod.run({
492
+ value: i.value,
493
+ issues: []
494
+ }, a);
495
+ if (t instanceof Promise) s.push(t), o = !0;
496
+ else {
497
+ if (t.issues.length === 0) return t;
498
+ s.push(t);
499
+ }
500
+ }
501
+ return o ? Promise.all(s).then((t) => U(t, i, e, a)) : U(s, i, e, a);
502
+ };
503
+ }), Ye = /*@__PURE__*/ n("$ZodIntersection", (e, t) => {
504
+ M.init(e, t), e._zod.parse = (e, n) => {
505
+ let r = e.value, i = t.left._zod.run({
506
+ value: r,
507
+ issues: []
508
+ }, n), a = t.right._zod.run({
509
+ value: r,
510
+ issues: []
511
+ }, n);
512
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => G(e, t, n)) : G(e, i, a);
513
+ };
514
+ });
515
+ function W(e, t) {
516
+ if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
517
+ valid: !0,
518
+ data: e
519
+ };
520
+ if (h(e) && h(t)) {
521
+ let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
522
+ ...e,
523
+ ...t
524
+ };
525
+ for (let n of r) {
526
+ let r = W(e[n], t[n]);
527
+ if (!r.valid) return {
528
+ valid: !1,
529
+ mergeErrorPath: [n, ...r.mergeErrorPath]
530
+ };
531
+ i[n] = r.data;
532
+ }
533
+ return {
534
+ valid: !0,
535
+ data: i
536
+ };
537
+ }
538
+ if (Array.isArray(e) && Array.isArray(t)) {
539
+ if (e.length !== t.length) return {
540
+ valid: !1,
541
+ mergeErrorPath: []
542
+ };
543
+ let n = [];
544
+ for (let r = 0; r < e.length; r++) {
545
+ let i = e[r], a = t[r], o = W(i, a);
546
+ if (!o.valid) return {
547
+ valid: !1,
548
+ mergeErrorPath: [r, ...o.mergeErrorPath]
549
+ };
550
+ n.push(o.data);
551
+ }
552
+ return {
553
+ valid: !0,
554
+ data: n
555
+ };
556
+ }
557
+ return {
558
+ valid: !1,
559
+ mergeErrorPath: []
560
+ };
561
+ }
562
+ function G(e, t, n) {
563
+ let r = /* @__PURE__ */ new Map(), i;
564
+ for (let n of t.issues) if (n.code === "unrecognized_keys") {
565
+ i ??= n;
566
+ for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0;
567
+ } else e.issues.push(n);
568
+ 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;
569
+ else e.issues.push(t);
570
+ let o = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
571
+ if (o.length && i && e.issues.push({
572
+ ...i,
573
+ keys: o
574
+ }), a(e)) return e;
575
+ let s = W(t.value, n.value);
576
+ if (!s.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
577
+ return e.value = s.data, e;
578
+ }
579
+ var Xe = /*@__PURE__*/ n("$ZodRecord", (e, t) => {
580
+ M.init(e, t), e._zod.parse = (n, i) => {
581
+ let a = n.value;
582
+ if (!h(a)) return n.issues.push({
583
+ expected: "record",
584
+ code: "invalid_type",
585
+ input: a,
586
+ inst: e
587
+ }), n;
588
+ let o = [], s = t.keyType._zod.values;
589
+ if (s) {
590
+ n.value = {};
591
+ let r = /* @__PURE__ */ new Set();
592
+ for (let e of s) if (typeof e == "string" || typeof e == "number" || typeof e == "symbol") {
593
+ r.add(typeof e == "number" ? e.toString() : e);
594
+ let s = t.valueType._zod.run({
595
+ value: a[e],
596
+ issues: []
597
+ }, i);
598
+ s instanceof Promise ? o.push(s.then((t) => {
599
+ t.issues.length && n.issues.push(...g(e, t.issues)), n.value[e] = t.value;
600
+ })) : (s.issues.length && n.issues.push(...g(e, s.issues)), n.value[e] = s.value);
601
+ }
602
+ let c;
603
+ for (let e in a) r.has(e) || (c ??= [], c.push(e));
604
+ c && c.length > 0 && n.issues.push({
605
+ code: "unrecognized_keys",
606
+ input: a,
607
+ inst: e,
608
+ keys: c
609
+ });
610
+ } else {
611
+ n.value = {};
612
+ for (let s of Reflect.ownKeys(a)) {
613
+ if (s === "__proto__") continue;
614
+ let c = t.keyType._zod.run({
615
+ value: s,
616
+ issues: []
617
+ }, i);
618
+ if (c instanceof Promise) throw Error("Async schemas not supported in object keys currently");
619
+ if (typeof s == "string" && S.test(s) && c.issues.length) {
620
+ let e = t.keyType._zod.run({
621
+ value: Number(s),
622
+ issues: []
623
+ }, i);
624
+ if (e instanceof Promise) throw Error("Async schemas not supported in object keys currently");
625
+ e.issues.length === 0 && (c = e);
626
+ }
627
+ if (c.issues.length) {
628
+ t.mode === "loose" ? n.value[s] = a[s] : n.issues.push({
629
+ code: "invalid_key",
630
+ origin: "record",
631
+ issues: c.issues.map((e) => f(e, i, r())),
632
+ input: s,
633
+ path: [s],
634
+ inst: e
635
+ });
636
+ continue;
637
+ }
638
+ let l = t.valueType._zod.run({
639
+ value: a[s],
640
+ issues: []
641
+ }, i);
642
+ l instanceof Promise ? o.push(l.then((e) => {
643
+ e.issues.length && n.issues.push(...g(s, e.issues)), n.value[c.value] = e.value;
644
+ })) : (l.issues.length && n.issues.push(...g(s, l.issues)), n.value[c.value] = l.value);
645
+ }
646
+ }
647
+ return o.length ? Promise.all(o).then(() => n) : n;
648
+ };
649
+ }), Ze = /*@__PURE__*/ n("$ZodEnum", (e, t) => {
650
+ M.init(e, t);
651
+ let n = p(t.entries), r = new Set(n);
652
+ e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => _.has(typeof e)).map((e) => typeof e == "string" ? d(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
653
+ let a = t.value;
654
+ return r.has(a) || t.issues.push({
655
+ code: "invalid_value",
656
+ values: n,
657
+ input: a,
658
+ inst: e
659
+ }), t;
660
+ };
661
+ }), Qe = /*@__PURE__*/ n("$ZodLiteral", (e, t) => {
662
+ if (M.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
663
+ let n = new Set(t.values);
664
+ 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) => {
665
+ let a = r.value;
666
+ return n.has(a) || r.issues.push({
667
+ code: "invalid_value",
668
+ values: t.values,
669
+ input: a,
670
+ inst: e
671
+ }), r;
672
+ };
673
+ }), $e = /*@__PURE__*/ n("$ZodTransform", (n, r) => {
674
+ M.init(n, r), n._zod.parse = (i, a) => {
675
+ if (a.direction === "backward") throw new t(n.constructor.name);
676
+ let o = r.transform(i.value, i);
677
+ if (a.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((e) => (i.value = e, i));
678
+ if (o instanceof Promise) throw new e();
679
+ return i.value = o, i;
680
+ };
681
+ });
682
+ function K(e, t) {
683
+ return e.issues.length && t === void 0 ? {
684
+ issues: [],
685
+ value: void 0
686
+ } : e;
687
+ }
688
+ var q = /*@__PURE__*/ n("$ZodOptional", (e, t) => {
689
+ M.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", () => {
690
+ let e = t.innerType._zod.pattern;
691
+ return e ? RegExp(`^(${c(e.source)})?$`) : void 0;
692
+ }), e._zod.parse = (e, n) => {
693
+ if (t.innerType._zod.optin === "optional") {
694
+ let r = t.innerType._zod.run(e, n);
695
+ return r instanceof Promise ? r.then((t) => K(t, e.value)) : K(r, e.value);
696
+ }
697
+ return e.value === void 0 ? e : t.innerType._zod.run(e, n);
698
+ };
699
+ }), J = /*@__PURE__*/ n("$ZodExactOptional", (e, t) => {
700
+ q.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);
701
+ }), et = /*@__PURE__*/ n("$ZodNullable", (e, t) => {
702
+ M.init(e, t), l(e._zod, "optin", () => t.innerType._zod.optin), l(e._zod, "optout", () => t.innerType._zod.optout), l(e._zod, "pattern", () => {
703
+ let e = t.innerType._zod.pattern;
704
+ return e ? RegExp(`^(${c(e.source)}|null)$`) : void 0;
705
+ }), 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);
706
+ }), tt = /*@__PURE__*/ n("$ZodDefault", (e, t) => {
707
+ M.init(e, t), e._zod.optin = "optional", l(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
708
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
709
+ if (e.value === void 0) return e.value = t.defaultValue, e;
710
+ let r = t.innerType._zod.run(e, n);
711
+ return r instanceof Promise ? r.then((e) => Y(e, t)) : Y(r, t);
712
+ };
713
+ });
714
+ function Y(e, t) {
715
+ return e.value === void 0 && (e.value = t.defaultValue), e;
716
+ }
717
+ var nt = /*@__PURE__*/ n("$ZodPrefault", (e, t) => {
718
+ M.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));
719
+ }), rt = /*@__PURE__*/ n("$ZodNonOptional", (e, t) => {
720
+ M.init(e, t), l(e._zod, "values", () => {
721
+ let e = t.innerType._zod.values;
722
+ return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
723
+ }), e._zod.parse = (n, r) => {
724
+ let i = t.innerType._zod.run(n, r);
725
+ return i instanceof Promise ? i.then((t) => X(t, e)) : X(i, e);
726
+ };
727
+ });
728
+ function X(e, t) {
729
+ return !e.issues.length && e.value === void 0 && e.issues.push({
730
+ code: "invalid_type",
731
+ expected: "nonoptional",
732
+ input: e.value,
733
+ inst: t
734
+ }), e;
735
+ }
736
+ var it = /*@__PURE__*/ n("$ZodCatch", (e, t) => {
737
+ M.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) => {
738
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
739
+ let i = t.innerType._zod.run(e, n);
740
+ return i instanceof Promise ? i.then((i) => (e.value = i.value, i.issues.length && (e.value = t.catchValue({
741
+ ...e,
742
+ error: { issues: i.issues.map((e) => f(e, n, r())) },
743
+ input: e.value
744
+ }), e.issues = []), e)) : (e.value = i.value, i.issues.length && (e.value = t.catchValue({
745
+ ...e,
746
+ error: { issues: i.issues.map((e) => f(e, n, r())) },
747
+ input: e.value
748
+ }), e.issues = []), e);
749
+ };
750
+ }), at = /*@__PURE__*/ n("$ZodPipe", (e, t) => {
751
+ M.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) => {
752
+ if (n.direction === "backward") {
753
+ let r = t.out._zod.run(e, n);
754
+ return r instanceof Promise ? r.then((e) => Z(e, t.in, n)) : Z(r, t.in, n);
755
+ }
756
+ let r = t.in._zod.run(e, n);
757
+ return r instanceof Promise ? r.then((e) => Z(e, t.out, n)) : Z(r, t.out, n);
758
+ };
759
+ });
760
+ function Z(e, t, n) {
761
+ return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
762
+ value: e.value,
763
+ issues: e.issues
764
+ }, n);
765
+ }
766
+ var ot = /*@__PURE__*/ n("$ZodReadonly", (e, t) => {
767
+ M.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) => {
768
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
769
+ let r = t.innerType._zod.run(e, n);
770
+ return r instanceof Promise ? r.then(Q) : Q(r);
771
+ };
772
+ });
773
+ function Q(e) {
774
+ return e.value = Object.freeze(e.value), e;
775
+ }
776
+ var st = /*@__PURE__*/ n("$ZodCustom", (e, t) => {
777
+ D.init(e, t), M.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
778
+ let r = n.value, i = t.fn(r);
779
+ if (i instanceof Promise) return i.then((t) => $(t, n, r, e));
780
+ $(i, n, r, e);
781
+ };
782
+ });
783
+ function $(e, t, n, r) {
784
+ if (!e) {
785
+ let e = {
786
+ code: "custom",
787
+ input: n,
788
+ inst: r,
789
+ path: [...r._zod.def.path ?? []],
790
+ continue: !r._zod.def.abort
791
+ };
792
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(ee(e));
793
+ }
794
+ }
795
+ //#endregion
796
+ export { He as $ZodAny, Ge as $ZodArray, Fe as $ZodBase64, Le as $ZodBase64URL, Ne as $ZodCIDRv4, Pe as $ZodCIDRv6, Se as $ZodCUID, Ce as $ZodCUID2, it as $ZodCatch, st as $ZodCustom, tt as $ZodDefault, Re as $ZodE164, ve as $ZodEmail, be as $ZodEmoji, Ze as $ZodEnum, J as $ZodExactOptional, F as $ZodGUID, je as $ZodIPv4, Me as $ZodIPv6, Oe as $ZodISODate, De as $ZodISODateTime, Ae as $ZodISODuration, ke as $ZodISOTime, Ye as $ZodIntersection, Be as $ZodJWT, Ee as $ZodKSUID, Qe as $ZodLiteral, xe as $ZodNanoID, We as $ZodNever, rt as $ZodNonOptional, et as $ZodNullable, R as $ZodNumber, Ve as $ZodNumberFormat, qe as $ZodObjectJIT, q as $ZodOptional, at as $ZodPipe, nt as $ZodPrefault, ot as $ZodReadonly, Xe as $ZodRecord, N as $ZodString, P as $ZodStringFormat, $e as $ZodTransform, M as $ZodType, we as $ZodULID, ye as $ZodURL, I as $ZodUUID, Je as $ZodUnion, Ue as $ZodUnknown, Te as $ZodXID };