@fiction/sdk 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo/index.d.ts +2 -0
- package/dist/sdk.js +221 -202
- package/dist/sdk.js.map +1 -1
- package/dist/sdkClient.d.ts +19 -2
- package/dist/self/SelfController.d.ts +2 -0
- package/dist/self/ui/SelfWrap.vue.d.ts +1 -0
- package/dist/self.js +244 -227
- package/dist/self.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.js
CHANGED
|
@@ -7,15 +7,15 @@ import { watch as Me, ref as H, computed as Ve } from "vue";
|
|
|
7
7
|
import { c as Wt, S as Gt } from "./base-CEr2lLFg.js";
|
|
8
8
|
import { hc as Jt } from "hono/client";
|
|
9
9
|
function c(e, t, n) {
|
|
10
|
-
function o(d,
|
|
10
|
+
function o(d, p) {
|
|
11
11
|
var f;
|
|
12
12
|
Object.defineProperty(d, "_zod", {
|
|
13
13
|
value: d._zod ?? {},
|
|
14
14
|
enumerable: !1
|
|
15
|
-
}), (f = d._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), d._zod.traits.add(e), t(d,
|
|
15
|
+
}), (f = d._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), d._zod.traits.add(e), t(d, p);
|
|
16
16
|
for (const k in a.prototype)
|
|
17
17
|
k in d || Object.defineProperty(d, k, { value: a.prototype[k].bind(d) });
|
|
18
|
-
d._zod.constr = a, d._zod.def =
|
|
18
|
+
d._zod.constr = a, d._zod.def = p;
|
|
19
19
|
}
|
|
20
20
|
s(o, "init");
|
|
21
21
|
const r = n?.Parent ?? Object, u = class u extends r {
|
|
@@ -24,9 +24,9 @@ function c(e, t, n) {
|
|
|
24
24
|
let i = u;
|
|
25
25
|
Object.defineProperty(i, "name", { value: e });
|
|
26
26
|
function a(d) {
|
|
27
|
-
var
|
|
27
|
+
var p;
|
|
28
28
|
const f = n?.Parent ? new i() : this;
|
|
29
|
-
o(f, d), (
|
|
29
|
+
o(f, d), (p = f._zod).deferred ?? (p.deferred = []);
|
|
30
30
|
for (const k of f._zod.deferred)
|
|
31
31
|
k();
|
|
32
32
|
return f;
|
|
@@ -36,23 +36,23 @@ function c(e, t, n) {
|
|
|
36
36
|
}), Object.defineProperty(a, "name", { value: e }), a;
|
|
37
37
|
}
|
|
38
38
|
s(c, "$constructor");
|
|
39
|
-
const
|
|
39
|
+
const Pe = class Pe extends Error {
|
|
40
40
|
constructor() {
|
|
41
41
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
s(
|
|
45
|
-
let C =
|
|
46
|
-
const
|
|
44
|
+
s(Pe, "$ZodAsyncError");
|
|
45
|
+
let C = Pe;
|
|
46
|
+
const Oe = class Oe extends Error {
|
|
47
47
|
constructor(t) {
|
|
48
48
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
s(
|
|
52
|
-
let ce =
|
|
53
|
-
const
|
|
51
|
+
s(Oe, "$ZodEncodeError");
|
|
52
|
+
let ce = Oe;
|
|
53
|
+
const pt = {};
|
|
54
54
|
function F(e) {
|
|
55
|
-
return
|
|
55
|
+
return pt;
|
|
56
56
|
}
|
|
57
57
|
s(F, "config");
|
|
58
58
|
function Kt(e) {
|
|
@@ -64,7 +64,7 @@ function _e(e, t) {
|
|
|
64
64
|
return typeof t == "bigint" ? t.toString() : t;
|
|
65
65
|
}
|
|
66
66
|
s(_e, "jsonStringifyReplacer");
|
|
67
|
-
function
|
|
67
|
+
function he(e) {
|
|
68
68
|
return {
|
|
69
69
|
get value() {
|
|
70
70
|
{
|
|
@@ -74,7 +74,7 @@ function pe(e) {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
s(
|
|
77
|
+
s(he, "cached");
|
|
78
78
|
function Ie(e) {
|
|
79
79
|
return e == null;
|
|
80
80
|
}
|
|
@@ -135,13 +135,13 @@ function We(e) {
|
|
|
135
135
|
return JSON.stringify(e);
|
|
136
136
|
}
|
|
137
137
|
s(We, "esc");
|
|
138
|
-
const
|
|
138
|
+
const ht = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
139
139
|
};
|
|
140
140
|
function J(e) {
|
|
141
141
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
142
142
|
}
|
|
143
143
|
s(J, "isObject");
|
|
144
|
-
const Yt =
|
|
144
|
+
const Yt = he(() => {
|
|
145
145
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
146
146
|
return !1;
|
|
147
147
|
try {
|
|
@@ -175,7 +175,7 @@ function D(e, t, n) {
|
|
|
175
175
|
return (!t || n?.parent) && (o._zod.parent = e), o;
|
|
176
176
|
}
|
|
177
177
|
s(D, "clone");
|
|
178
|
-
function
|
|
178
|
+
function h(e) {
|
|
179
179
|
const t = e;
|
|
180
180
|
if (!t)
|
|
181
181
|
return {};
|
|
@@ -188,7 +188,7 @@ function p(e) {
|
|
|
188
188
|
}
|
|
189
189
|
return delete t.message, typeof t.error == "string" ? { ...t, error: /* @__PURE__ */ s(() => t.error, "error") } : t;
|
|
190
190
|
}
|
|
191
|
-
s(
|
|
191
|
+
s(h, "normalizeParams");
|
|
192
192
|
function Ht(e) {
|
|
193
193
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
194
194
|
}
|
|
@@ -407,8 +407,8 @@ function un(e, t) {
|
|
|
407
407
|
else {
|
|
408
408
|
let u = o, d = 0;
|
|
409
409
|
for (; d < a.path.length; ) {
|
|
410
|
-
const
|
|
411
|
-
d === a.path.length - 1 ? (u[
|
|
410
|
+
const p = a.path[d];
|
|
411
|
+
d === a.path.length - 1 ? (u[p] = u[p] || { _errors: [] }, u[p]._errors.push(n(a))) : u[p] = u[p] || { _errors: [] }, u = u[p], d++;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}, "processError");
|
|
@@ -421,7 +421,7 @@ const Ee = /* @__PURE__ */ s((e) => (t, n, o, r) => {
|
|
|
421
421
|
throw new C();
|
|
422
422
|
if (a.issues.length) {
|
|
423
423
|
const u = new (r?.Err ?? e)(a.issues.map((d) => R(d, i, F())));
|
|
424
|
-
throw
|
|
424
|
+
throw ht(u, r?.callee), u;
|
|
425
425
|
}
|
|
426
426
|
return a.value;
|
|
427
427
|
}, "_parse"), Te = /* @__PURE__ */ s((e) => async (t, n, o, r) => {
|
|
@@ -429,7 +429,7 @@ const Ee = /* @__PURE__ */ s((e) => (t, n, o, r) => {
|
|
|
429
429
|
let a = t._zod.run({ value: n, issues: [] }, i);
|
|
430
430
|
if (a instanceof Promise && (a = await a), a.issues.length) {
|
|
431
431
|
const u = new (r?.Err ?? e)(a.issues.map((d) => R(d, i, F())));
|
|
432
|
-
throw
|
|
432
|
+
throw ht(u, r?.callee), u;
|
|
433
433
|
}
|
|
434
434
|
return a.value;
|
|
435
435
|
}, "_parseAsync"), fe = /* @__PURE__ */ s((e) => (t, n, o) => {
|
|
@@ -447,10 +447,10 @@ const Ee = /* @__PURE__ */ s((e) => (t, n, o, r) => {
|
|
|
447
447
|
success: !1,
|
|
448
448
|
error: new e(i.issues.map((a) => R(a, r, F())))
|
|
449
449
|
} : { success: !0, data: i.value };
|
|
450
|
-
}, "_safeParseAsync"), dn = /* @__PURE__ */ me(_t),
|
|
450
|
+
}, "_safeParseAsync"), dn = /* @__PURE__ */ me(_t), pn = /* @__PURE__ */ s((e) => (t, n, o) => {
|
|
451
451
|
const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
452
452
|
return Ee(e)(t, n, r);
|
|
453
|
-
}, "_encode"),
|
|
453
|
+
}, "_encode"), hn = /* @__PURE__ */ s((e) => (t, n, o) => Ee(e)(t, n, o), "_decode"), fn = /* @__PURE__ */ s((e) => async (t, n, o) => {
|
|
454
454
|
const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
455
455
|
return Te(e)(t, n, r);
|
|
456
456
|
}, "_encodeAsync"), mn = /* @__PURE__ */ s((e) => async (t, n, o) => Te(e)(t, n, o), "_decodeAsync"), gn = /* @__PURE__ */ s((e) => (t, n, o) => {
|
|
@@ -464,7 +464,7 @@ function Tn() {
|
|
|
464
464
|
return new RegExp(En, "u");
|
|
465
465
|
}
|
|
466
466
|
s(Tn, "emoji");
|
|
467
|
-
const
|
|
467
|
+
const jn = /^(?:(?: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])$/, Pn = /^(([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}|:))$/, On = /^((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])$/, xn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Cn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, wt = /^[A-Za-z0-9_-]*$/, Nn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Un = /^\+(?:[0-9]){6,14}[0-9]$/, bt = "(?:(?:\\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])))", Dn = /* @__PURE__ */ new RegExp(`^${bt}$`);
|
|
468
468
|
function kt(e) {
|
|
469
469
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
470
470
|
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+)?)?`;
|
|
@@ -798,50 +798,50 @@ const io = {
|
|
|
798
798
|
});
|
|
799
799
|
else {
|
|
800
800
|
const r = /* @__PURE__ */ s((a, u, d) => {
|
|
801
|
-
let
|
|
801
|
+
let p = V(a), f;
|
|
802
802
|
for (const k of u) {
|
|
803
803
|
if (k._zod.def.when) {
|
|
804
804
|
if (!k._zod.def.when(a))
|
|
805
805
|
continue;
|
|
806
|
-
} else if (
|
|
806
|
+
} else if (p)
|
|
807
807
|
continue;
|
|
808
808
|
const b = a.issues.length, $ = k._zod.check(a);
|
|
809
809
|
if ($ instanceof Promise && d?.async === !1)
|
|
810
810
|
throw new C();
|
|
811
811
|
if (f || $ instanceof Promise)
|
|
812
812
|
f = (f ?? Promise.resolve()).then(async () => {
|
|
813
|
-
await $, a.issues.length !== b && (
|
|
813
|
+
await $, a.issues.length !== b && (p || (p = V(a, b)));
|
|
814
814
|
});
|
|
815
815
|
else {
|
|
816
816
|
if (a.issues.length === b)
|
|
817
817
|
continue;
|
|
818
|
-
|
|
818
|
+
p || (p = V(a, b));
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
return f ? f.then(() => a) : a;
|
|
822
822
|
}, "runChecks"), i = /* @__PURE__ */ s((a, u, d) => {
|
|
823
823
|
if (V(a))
|
|
824
824
|
return a.aborted = !0, a;
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
825
|
+
const p = r(u, o, d);
|
|
826
|
+
if (p instanceof Promise) {
|
|
827
827
|
if (d.async === !1)
|
|
828
828
|
throw new C();
|
|
829
|
-
return
|
|
829
|
+
return p.then((f) => e._zod.parse(f, d));
|
|
830
830
|
}
|
|
831
|
-
return e._zod.parse(
|
|
831
|
+
return e._zod.parse(p, d);
|
|
832
832
|
}, "handleCanaryResult");
|
|
833
833
|
e._zod.run = (a, u) => {
|
|
834
834
|
if (u.skipChecks)
|
|
835
835
|
return e._zod.parse(a, u);
|
|
836
836
|
if (u.direction === "backward") {
|
|
837
|
-
const
|
|
838
|
-
return
|
|
837
|
+
const p = e._zod.parse({ value: a.value, issues: [] }, { ...u, skipChecks: !0 });
|
|
838
|
+
return p instanceof Promise ? p.then((f) => i(f, a, u)) : i(p, a, u);
|
|
839
839
|
}
|
|
840
840
|
const d = e._zod.parse(a, u);
|
|
841
841
|
if (d instanceof Promise) {
|
|
842
842
|
if (u.async === !1)
|
|
843
843
|
throw new C();
|
|
844
|
-
return d.then((
|
|
844
|
+
return d.then((p) => r(p, o, u));
|
|
845
845
|
}
|
|
846
846
|
return r(d, o, u);
|
|
847
847
|
};
|
|
@@ -858,7 +858,7 @@ const io = {
|
|
|
858
858
|
vendor: "zod",
|
|
859
859
|
version: 1
|
|
860
860
|
};
|
|
861
|
-
}),
|
|
861
|
+
}), je = /* @__PURE__ */ c("$ZodString", (e, t) => {
|
|
862
862
|
g.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Ln(e._zod.bag), e._zod.parse = (n, o) => {
|
|
863
863
|
if (t.coerce)
|
|
864
864
|
try {
|
|
@@ -873,7 +873,7 @@ const io = {
|
|
|
873
873
|
}), n;
|
|
874
874
|
};
|
|
875
875
|
}), v = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
|
|
876
|
-
ge.init(e, t),
|
|
876
|
+
ge.init(e, t), je.init(e, t);
|
|
877
877
|
}), ao = /* @__PURE__ */ c("$ZodGUID", (e, t) => {
|
|
878
878
|
t.pattern ?? (t.pattern = Sn), v.init(e, t);
|
|
879
879
|
}), so = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
|
|
@@ -930,9 +930,9 @@ const io = {
|
|
|
930
930
|
};
|
|
931
931
|
}), lo = /* @__PURE__ */ c("$ZodEmoji", (e, t) => {
|
|
932
932
|
t.pattern ?? (t.pattern = Tn()), v.init(e, t);
|
|
933
|
-
}),
|
|
933
|
+
}), po = /* @__PURE__ */ c("$ZodNanoID", (e, t) => {
|
|
934
934
|
t.pattern ?? (t.pattern = Zn), v.init(e, t);
|
|
935
|
-
}),
|
|
935
|
+
}), ho = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
|
|
936
936
|
t.pattern ?? (t.pattern = bn), v.init(e, t);
|
|
937
937
|
}), fo = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
|
|
938
938
|
t.pattern ?? (t.pattern = kn), v.init(e, t);
|
|
@@ -951,12 +951,12 @@ const io = {
|
|
|
951
951
|
}), ko = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
|
|
952
952
|
t.pattern ?? (t.pattern = In), v.init(e, t);
|
|
953
953
|
}), zo = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
|
|
954
|
-
t.pattern ?? (t.pattern =
|
|
954
|
+
t.pattern ?? (t.pattern = jn), v.init(e, t), e._zod.onattach.push((n) => {
|
|
955
955
|
const o = n._zod.bag;
|
|
956
956
|
o.format = "ipv4";
|
|
957
957
|
});
|
|
958
958
|
}), yo = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
|
|
959
|
-
t.pattern ?? (t.pattern =
|
|
959
|
+
t.pattern ?? (t.pattern = Pn), v.init(e, t), e._zod.onattach.push((n) => {
|
|
960
960
|
const o = n._zod.bag;
|
|
961
961
|
o.format = "ipv6";
|
|
962
962
|
}), e._zod.check = (n) => {
|
|
@@ -973,7 +973,7 @@ const io = {
|
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
975
|
}), $o = /* @__PURE__ */ c("$ZodCIDRv4", (e, t) => {
|
|
976
|
-
t.pattern ?? (t.pattern =
|
|
976
|
+
t.pattern ?? (t.pattern = On), v.init(e, t);
|
|
977
977
|
}), Zo = /* @__PURE__ */ c("$ZodCIDRv6", (e, t) => {
|
|
978
978
|
t.pattern ?? (t.pattern = xn), v.init(e, t), e._zod.check = (n) => {
|
|
979
979
|
const o = n.value.split("/");
|
|
@@ -1062,7 +1062,7 @@ function To(e, t = null) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
1064
|
s(To, "isValidJWT");
|
|
1065
|
-
const
|
|
1065
|
+
const jo = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
|
|
1066
1066
|
v.init(e, t), e._zod.check = (n) => {
|
|
1067
1067
|
To(n.value, t.alg) || n.issues.push({
|
|
1068
1068
|
code: "invalid_format",
|
|
@@ -1091,9 +1091,9 @@ const Po = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
|
|
|
1091
1091
|
...i ? { received: i } : {}
|
|
1092
1092
|
}), n;
|
|
1093
1093
|
};
|
|
1094
|
-
}),
|
|
1094
|
+
}), Po = /* @__PURE__ */ c("$ZodNumber", (e, t) => {
|
|
1095
1095
|
Kn.init(e, t), It.init(e, t);
|
|
1096
|
-
}),
|
|
1096
|
+
}), Oo = /* @__PURE__ */ c("$ZodBoolean", (e, t) => {
|
|
1097
1097
|
g.init(e, t), e._zod.pattern = Bn, e._zod.parse = (n, o) => {
|
|
1098
1098
|
if (t.coerce)
|
|
1099
1099
|
try {
|
|
@@ -1157,7 +1157,7 @@ const Do = /* @__PURE__ */ c("$ZodArray", (e, t) => {
|
|
|
1157
1157
|
value: u,
|
|
1158
1158
|
issues: []
|
|
1159
1159
|
}, o);
|
|
1160
|
-
d instanceof Promise ? i.push(d.then((
|
|
1160
|
+
d instanceof Promise ? i.push(d.then((p) => Je(p, n, a))) : Je(d, n, a);
|
|
1161
1161
|
}
|
|
1162
1162
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
1163
1163
|
};
|
|
@@ -1182,11 +1182,11 @@ function St(e) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
s(St, "normalizeDef");
|
|
1184
1184
|
function At(e, t, n, o, r, i) {
|
|
1185
|
-
const a = [], u = r.keySet, d = r.catchall._zod,
|
|
1185
|
+
const a = [], u = r.keySet, d = r.catchall._zod, p = d.def.type;
|
|
1186
1186
|
for (const f of Object.keys(t)) {
|
|
1187
1187
|
if (u.has(f))
|
|
1188
1188
|
continue;
|
|
1189
|
-
if (
|
|
1189
|
+
if (p === "never") {
|
|
1190
1190
|
a.push(f);
|
|
1191
1191
|
continue;
|
|
1192
1192
|
}
|
|
@@ -1213,15 +1213,15 @@ const Fo = /* @__PURE__ */ c("$ZodObject", (e, t) => {
|
|
|
1213
1213
|
}, "get")
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
const o =
|
|
1216
|
+
const o = he(() => St(t));
|
|
1217
1217
|
m(e._zod, "propValues", () => {
|
|
1218
1218
|
const u = t.shape, d = {};
|
|
1219
|
-
for (const
|
|
1220
|
-
const f = u[
|
|
1219
|
+
for (const p in u) {
|
|
1220
|
+
const f = u[p]._zod;
|
|
1221
1221
|
if (f.values) {
|
|
1222
|
-
d[
|
|
1222
|
+
d[p] ?? (d[p] = /* @__PURE__ */ new Set());
|
|
1223
1223
|
for (const k of f.values)
|
|
1224
|
-
d[
|
|
1224
|
+
d[p].add(k);
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
return d;
|
|
@@ -1230,67 +1230,67 @@ const Fo = /* @__PURE__ */ c("$ZodObject", (e, t) => {
|
|
|
1230
1230
|
let a;
|
|
1231
1231
|
e._zod.parse = (u, d) => {
|
|
1232
1232
|
a ?? (a = o.value);
|
|
1233
|
-
const
|
|
1234
|
-
if (!r(
|
|
1233
|
+
const p = u.value;
|
|
1234
|
+
if (!r(p))
|
|
1235
1235
|
return u.issues.push({
|
|
1236
1236
|
expected: "object",
|
|
1237
1237
|
code: "invalid_type",
|
|
1238
|
-
input:
|
|
1238
|
+
input: p,
|
|
1239
1239
|
inst: e
|
|
1240
1240
|
}), u;
|
|
1241
1241
|
u.value = {};
|
|
1242
1242
|
const f = [], k = a.shape;
|
|
1243
1243
|
for (const b of a.keys) {
|
|
1244
|
-
const E = k[b]._zod.run({ value:
|
|
1245
|
-
E instanceof Promise ? f.push(E.then((ve) => ue(ve, u, b,
|
|
1244
|
+
const E = k[b]._zod.run({ value: p[b], issues: [] }, d);
|
|
1245
|
+
E instanceof Promise ? f.push(E.then((ve) => ue(ve, u, b, p))) : ue(E, u, b, p);
|
|
1246
1246
|
}
|
|
1247
|
-
return i ? At(f,
|
|
1247
|
+
return i ? At(f, p, u, d, o.value, e) : f.length ? Promise.all(f).then(() => u) : u;
|
|
1248
1248
|
};
|
|
1249
1249
|
}), Ro = /* @__PURE__ */ c("$ZodObjectJIT", (e, t) => {
|
|
1250
1250
|
Fo.init(e, t);
|
|
1251
|
-
const n = e._zod.parse, o =
|
|
1252
|
-
const $ = new we(["shape", "payload", "ctx"]), E = o.value, ve = /* @__PURE__ */ s((
|
|
1253
|
-
const
|
|
1254
|
-
return `shape[${
|
|
1251
|
+
const n = e._zod.parse, o = he(() => St(t)), r = /* @__PURE__ */ s((b) => {
|
|
1252
|
+
const $ = new we(["shape", "payload", "ctx"]), E = o.value, ve = /* @__PURE__ */ s((O) => {
|
|
1253
|
+
const P = We(O);
|
|
1254
|
+
return `shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`;
|
|
1255
1255
|
}, "parseStr");
|
|
1256
1256
|
$.write("const input = payload.value;");
|
|
1257
1257
|
const Fe = /* @__PURE__ */ Object.create(null);
|
|
1258
1258
|
let Mt = 0;
|
|
1259
|
-
for (const
|
|
1260
|
-
Fe[
|
|
1259
|
+
for (const O of E.keys)
|
|
1260
|
+
Fe[O] = `key_${Mt++}`;
|
|
1261
1261
|
$.write("const newResult = {};");
|
|
1262
|
-
for (const
|
|
1263
|
-
const
|
|
1264
|
-
$.write(`const ${
|
|
1265
|
-
if (${
|
|
1266
|
-
payload.issues = payload.issues.concat(${
|
|
1262
|
+
for (const O of E.keys) {
|
|
1263
|
+
const P = Fe[O], W = We(O);
|
|
1264
|
+
$.write(`const ${P} = ${ve(O)};`), $.write(`
|
|
1265
|
+
if (${P}.issues.length) {
|
|
1266
|
+
payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
|
|
1267
1267
|
...iss,
|
|
1268
1268
|
path: iss.path ? [${W}, ...iss.path] : [${W}]
|
|
1269
1269
|
})));
|
|
1270
1270
|
}
|
|
1271
1271
|
|
|
1272
1272
|
|
|
1273
|
-
if (${
|
|
1273
|
+
if (${P}.value === undefined) {
|
|
1274
1274
|
if (${W} in input) {
|
|
1275
1275
|
newResult[${W}] = undefined;
|
|
1276
1276
|
}
|
|
1277
1277
|
} else {
|
|
1278
|
-
newResult[${W}] = ${
|
|
1278
|
+
newResult[${W}] = ${P}.value;
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
1281
1281
|
`);
|
|
1282
1282
|
}
|
|
1283
1283
|
$.write("payload.value = newResult;"), $.write("return payload;");
|
|
1284
1284
|
const Vt = $.compile();
|
|
1285
|
-
return (
|
|
1285
|
+
return (O, P) => Vt(b, O, P);
|
|
1286
1286
|
}, "generateFastpass");
|
|
1287
1287
|
let i;
|
|
1288
|
-
const a = J, u = !
|
|
1288
|
+
const a = J, u = !pt.jitless, p = u && Yt.value, f = t.catchall;
|
|
1289
1289
|
let k;
|
|
1290
1290
|
e._zod.parse = (b, $) => {
|
|
1291
1291
|
k ?? (k = o.value);
|
|
1292
1292
|
const E = b.value;
|
|
1293
|
-
return a(E) ? u &&
|
|
1293
|
+
return a(E) ? u && p && $?.async === !1 && $.jitless !== !0 ? (i || (i = r(t.shape)), b = i(b, $), f ? At([], E, b, $, k, e) : b) : n(b, $) : (b.issues.push({
|
|
1294
1294
|
expected: "object",
|
|
1295
1295
|
code: "invalid_type",
|
|
1296
1296
|
input: E,
|
|
@@ -1328,16 +1328,16 @@ const Et = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
|
|
|
1328
1328
|
let a = !1;
|
|
1329
1329
|
const u = [];
|
|
1330
1330
|
for (const d of t.options) {
|
|
1331
|
-
const
|
|
1331
|
+
const p = d._zod.run({
|
|
1332
1332
|
value: r.value,
|
|
1333
1333
|
issues: []
|
|
1334
1334
|
}, i);
|
|
1335
|
-
if (
|
|
1336
|
-
u.push(
|
|
1335
|
+
if (p instanceof Promise)
|
|
1336
|
+
u.push(p), a = !0;
|
|
1337
1337
|
else {
|
|
1338
|
-
if (
|
|
1339
|
-
return
|
|
1340
|
-
u.push(
|
|
1338
|
+
if (p.issues.length === 0)
|
|
1339
|
+
return p;
|
|
1340
|
+
u.push(p);
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
1343
|
return a ? Promise.all(u).then((d) => Ke(d, r, e, i)) : Ke(u, r, e, i);
|
|
@@ -1353,13 +1353,13 @@ const Et = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
|
|
|
1353
1353
|
throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);
|
|
1354
1354
|
for (const [u, d] of Object.entries(a)) {
|
|
1355
1355
|
r[u] || (r[u] = /* @__PURE__ */ new Set());
|
|
1356
|
-
for (const
|
|
1357
|
-
r[u].add(
|
|
1356
|
+
for (const p of d)
|
|
1357
|
+
r[u].add(p);
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
return r;
|
|
1361
1361
|
});
|
|
1362
|
-
const o =
|
|
1362
|
+
const o = he(() => {
|
|
1363
1363
|
const r = t.options, i = /* @__PURE__ */ new Map();
|
|
1364
1364
|
for (const a of r) {
|
|
1365
1365
|
const u = a._zod.propValues?.[t.discriminator];
|
|
@@ -1396,7 +1396,7 @@ const Et = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
|
|
|
1396
1396
|
}), Mo = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
|
|
1397
1397
|
g.init(e, t), e._zod.parse = (n, o) => {
|
|
1398
1398
|
const r = n.value, i = t.left._zod.run({ value: r, issues: [] }, o), a = t.right._zod.run({ value: r, issues: [] }, o);
|
|
1399
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([d,
|
|
1399
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([d, p]) => qe(n, d, p)) : qe(n, i, a);
|
|
1400
1400
|
};
|
|
1401
1401
|
});
|
|
1402
1402
|
function be(e, t) {
|
|
@@ -1647,7 +1647,7 @@ const te = /* @__PURE__ */ tr();
|
|
|
1647
1647
|
function nr(e, t) {
|
|
1648
1648
|
return new e({
|
|
1649
1649
|
type: "string",
|
|
1650
|
-
...
|
|
1650
|
+
...h(t)
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
1653
|
s(nr, "_string");
|
|
@@ -1657,7 +1657,7 @@ function or(e, t) {
|
|
|
1657
1657
|
format: "email",
|
|
1658
1658
|
check: "string_format",
|
|
1659
1659
|
abort: !1,
|
|
1660
|
-
...
|
|
1660
|
+
...h(t)
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
s(or, "_email");
|
|
@@ -1667,7 +1667,7 @@ function tt(e, t) {
|
|
|
1667
1667
|
format: "guid",
|
|
1668
1668
|
check: "string_format",
|
|
1669
1669
|
abort: !1,
|
|
1670
|
-
...
|
|
1670
|
+
...h(t)
|
|
1671
1671
|
});
|
|
1672
1672
|
}
|
|
1673
1673
|
s(tt, "_guid");
|
|
@@ -1677,7 +1677,7 @@ function rr(e, t) {
|
|
|
1677
1677
|
format: "uuid",
|
|
1678
1678
|
check: "string_format",
|
|
1679
1679
|
abort: !1,
|
|
1680
|
-
...
|
|
1680
|
+
...h(t)
|
|
1681
1681
|
});
|
|
1682
1682
|
}
|
|
1683
1683
|
s(rr, "_uuid");
|
|
@@ -1688,7 +1688,7 @@ function ir(e, t) {
|
|
|
1688
1688
|
check: "string_format",
|
|
1689
1689
|
abort: !1,
|
|
1690
1690
|
version: "v4",
|
|
1691
|
-
...
|
|
1691
|
+
...h(t)
|
|
1692
1692
|
});
|
|
1693
1693
|
}
|
|
1694
1694
|
s(ir, "_uuidv4");
|
|
@@ -1699,7 +1699,7 @@ function ar(e, t) {
|
|
|
1699
1699
|
check: "string_format",
|
|
1700
1700
|
abort: !1,
|
|
1701
1701
|
version: "v6",
|
|
1702
|
-
...
|
|
1702
|
+
...h(t)
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
1705
|
s(ar, "_uuidv6");
|
|
@@ -1710,7 +1710,7 @@ function sr(e, t) {
|
|
|
1710
1710
|
check: "string_format",
|
|
1711
1711
|
abort: !1,
|
|
1712
1712
|
version: "v7",
|
|
1713
|
-
...
|
|
1713
|
+
...h(t)
|
|
1714
1714
|
});
|
|
1715
1715
|
}
|
|
1716
1716
|
s(sr, "_uuidv7");
|
|
@@ -1720,7 +1720,7 @@ function cr(e, t) {
|
|
|
1720
1720
|
format: "url",
|
|
1721
1721
|
check: "string_format",
|
|
1722
1722
|
abort: !1,
|
|
1723
|
-
...
|
|
1723
|
+
...h(t)
|
|
1724
1724
|
});
|
|
1725
1725
|
}
|
|
1726
1726
|
s(cr, "_url");
|
|
@@ -1730,7 +1730,7 @@ function ur(e, t) {
|
|
|
1730
1730
|
format: "emoji",
|
|
1731
1731
|
check: "string_format",
|
|
1732
1732
|
abort: !1,
|
|
1733
|
-
...
|
|
1733
|
+
...h(t)
|
|
1734
1734
|
});
|
|
1735
1735
|
}
|
|
1736
1736
|
s(ur, "_emoji");
|
|
@@ -1740,7 +1740,7 @@ function lr(e, t) {
|
|
|
1740
1740
|
format: "nanoid",
|
|
1741
1741
|
check: "string_format",
|
|
1742
1742
|
abort: !1,
|
|
1743
|
-
...
|
|
1743
|
+
...h(t)
|
|
1744
1744
|
});
|
|
1745
1745
|
}
|
|
1746
1746
|
s(lr, "_nanoid");
|
|
@@ -1750,37 +1750,37 @@ function dr(e, t) {
|
|
|
1750
1750
|
format: "cuid",
|
|
1751
1751
|
check: "string_format",
|
|
1752
1752
|
abort: !1,
|
|
1753
|
-
...
|
|
1753
|
+
...h(t)
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
1756
|
s(dr, "_cuid");
|
|
1757
|
-
function
|
|
1757
|
+
function pr(e, t) {
|
|
1758
1758
|
return new e({
|
|
1759
1759
|
type: "string",
|
|
1760
1760
|
format: "cuid2",
|
|
1761
1761
|
check: "string_format",
|
|
1762
1762
|
abort: !1,
|
|
1763
|
-
...
|
|
1763
|
+
...h(t)
|
|
1764
1764
|
});
|
|
1765
1765
|
}
|
|
1766
|
-
s(
|
|
1767
|
-
function
|
|
1766
|
+
s(pr, "_cuid2");
|
|
1767
|
+
function hr(e, t) {
|
|
1768
1768
|
return new e({
|
|
1769
1769
|
type: "string",
|
|
1770
1770
|
format: "ulid",
|
|
1771
1771
|
check: "string_format",
|
|
1772
1772
|
abort: !1,
|
|
1773
|
-
...
|
|
1773
|
+
...h(t)
|
|
1774
1774
|
});
|
|
1775
1775
|
}
|
|
1776
|
-
s(
|
|
1776
|
+
s(hr, "_ulid");
|
|
1777
1777
|
function fr(e, t) {
|
|
1778
1778
|
return new e({
|
|
1779
1779
|
type: "string",
|
|
1780
1780
|
format: "xid",
|
|
1781
1781
|
check: "string_format",
|
|
1782
1782
|
abort: !1,
|
|
1783
|
-
...
|
|
1783
|
+
...h(t)
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
s(fr, "_xid");
|
|
@@ -1790,7 +1790,7 @@ function mr(e, t) {
|
|
|
1790
1790
|
format: "ksuid",
|
|
1791
1791
|
check: "string_format",
|
|
1792
1792
|
abort: !1,
|
|
1793
|
-
...
|
|
1793
|
+
...h(t)
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
1796
|
s(mr, "_ksuid");
|
|
@@ -1800,7 +1800,7 @@ function gr(e, t) {
|
|
|
1800
1800
|
format: "ipv4",
|
|
1801
1801
|
check: "string_format",
|
|
1802
1802
|
abort: !1,
|
|
1803
|
-
...
|
|
1803
|
+
...h(t)
|
|
1804
1804
|
});
|
|
1805
1805
|
}
|
|
1806
1806
|
s(gr, "_ipv4");
|
|
@@ -1810,7 +1810,7 @@ function vr(e, t) {
|
|
|
1810
1810
|
format: "ipv6",
|
|
1811
1811
|
check: "string_format",
|
|
1812
1812
|
abort: !1,
|
|
1813
|
-
...
|
|
1813
|
+
...h(t)
|
|
1814
1814
|
});
|
|
1815
1815
|
}
|
|
1816
1816
|
s(vr, "_ipv6");
|
|
@@ -1820,7 +1820,7 @@ function _r(e, t) {
|
|
|
1820
1820
|
format: "cidrv4",
|
|
1821
1821
|
check: "string_format",
|
|
1822
1822
|
abort: !1,
|
|
1823
|
-
...
|
|
1823
|
+
...h(t)
|
|
1824
1824
|
});
|
|
1825
1825
|
}
|
|
1826
1826
|
s(_r, "_cidrv4");
|
|
@@ -1830,7 +1830,7 @@ function wr(e, t) {
|
|
|
1830
1830
|
format: "cidrv6",
|
|
1831
1831
|
check: "string_format",
|
|
1832
1832
|
abort: !1,
|
|
1833
|
-
...
|
|
1833
|
+
...h(t)
|
|
1834
1834
|
});
|
|
1835
1835
|
}
|
|
1836
1836
|
s(wr, "_cidrv6");
|
|
@@ -1840,7 +1840,7 @@ function br(e, t) {
|
|
|
1840
1840
|
format: "base64",
|
|
1841
1841
|
check: "string_format",
|
|
1842
1842
|
abort: !1,
|
|
1843
|
-
...
|
|
1843
|
+
...h(t)
|
|
1844
1844
|
});
|
|
1845
1845
|
}
|
|
1846
1846
|
s(br, "_base64");
|
|
@@ -1850,7 +1850,7 @@ function kr(e, t) {
|
|
|
1850
1850
|
format: "base64url",
|
|
1851
1851
|
check: "string_format",
|
|
1852
1852
|
abort: !1,
|
|
1853
|
-
...
|
|
1853
|
+
...h(t)
|
|
1854
1854
|
});
|
|
1855
1855
|
}
|
|
1856
1856
|
s(kr, "_base64url");
|
|
@@ -1860,7 +1860,7 @@ function zr(e, t) {
|
|
|
1860
1860
|
format: "e164",
|
|
1861
1861
|
check: "string_format",
|
|
1862
1862
|
abort: !1,
|
|
1863
|
-
...
|
|
1863
|
+
...h(t)
|
|
1864
1864
|
});
|
|
1865
1865
|
}
|
|
1866
1866
|
s(zr, "_e164");
|
|
@@ -1870,7 +1870,7 @@ function yr(e, t) {
|
|
|
1870
1870
|
format: "jwt",
|
|
1871
1871
|
check: "string_format",
|
|
1872
1872
|
abort: !1,
|
|
1873
|
-
...
|
|
1873
|
+
...h(t)
|
|
1874
1874
|
});
|
|
1875
1875
|
}
|
|
1876
1876
|
s(yr, "_jwt");
|
|
@@ -1882,7 +1882,7 @@ function $r(e, t) {
|
|
|
1882
1882
|
offset: !1,
|
|
1883
1883
|
local: !1,
|
|
1884
1884
|
precision: null,
|
|
1885
|
-
...
|
|
1885
|
+
...h(t)
|
|
1886
1886
|
});
|
|
1887
1887
|
}
|
|
1888
1888
|
s($r, "_isoDateTime");
|
|
@@ -1891,7 +1891,7 @@ function Zr(e, t) {
|
|
|
1891
1891
|
type: "string",
|
|
1892
1892
|
format: "date",
|
|
1893
1893
|
check: "string_format",
|
|
1894
|
-
...
|
|
1894
|
+
...h(t)
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
1897
|
s(Zr, "_isoDate");
|
|
@@ -1901,7 +1901,7 @@ function Ir(e, t) {
|
|
|
1901
1901
|
format: "time",
|
|
1902
1902
|
check: "string_format",
|
|
1903
1903
|
precision: null,
|
|
1904
|
-
...
|
|
1904
|
+
...h(t)
|
|
1905
1905
|
});
|
|
1906
1906
|
}
|
|
1907
1907
|
s(Ir, "_isoTime");
|
|
@@ -1910,7 +1910,7 @@ function Sr(e, t) {
|
|
|
1910
1910
|
type: "string",
|
|
1911
1911
|
format: "duration",
|
|
1912
1912
|
check: "string_format",
|
|
1913
|
-
...
|
|
1913
|
+
...h(t)
|
|
1914
1914
|
});
|
|
1915
1915
|
}
|
|
1916
1916
|
s(Sr, "_isoDuration");
|
|
@@ -1918,7 +1918,7 @@ function Ar(e, t) {
|
|
|
1918
1918
|
return new e({
|
|
1919
1919
|
type: "number",
|
|
1920
1920
|
checks: [],
|
|
1921
|
-
...
|
|
1921
|
+
...h(t)
|
|
1922
1922
|
});
|
|
1923
1923
|
}
|
|
1924
1924
|
s(Ar, "_number");
|
|
@@ -1928,47 +1928,47 @@ function Er(e, t) {
|
|
|
1928
1928
|
check: "number_format",
|
|
1929
1929
|
abort: !1,
|
|
1930
1930
|
format: "safeint",
|
|
1931
|
-
...
|
|
1931
|
+
...h(t)
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
1934
|
s(Er, "_int");
|
|
1935
1935
|
function Tr(e, t) {
|
|
1936
1936
|
return new e({
|
|
1937
1937
|
type: "boolean",
|
|
1938
|
-
...
|
|
1938
|
+
...h(t)
|
|
1939
1939
|
});
|
|
1940
1940
|
}
|
|
1941
1941
|
s(Tr, "_boolean");
|
|
1942
|
-
function
|
|
1942
|
+
function jr(e) {
|
|
1943
1943
|
return new e({
|
|
1944
1944
|
type: "any"
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
|
-
s(
|
|
1948
|
-
function
|
|
1947
|
+
s(jr, "_any");
|
|
1948
|
+
function Pr(e) {
|
|
1949
1949
|
return new e({
|
|
1950
1950
|
type: "unknown"
|
|
1951
1951
|
});
|
|
1952
1952
|
}
|
|
1953
|
-
s(
|
|
1954
|
-
function
|
|
1953
|
+
s(Pr, "_unknown");
|
|
1954
|
+
function Or(e, t) {
|
|
1955
1955
|
return new e({
|
|
1956
1956
|
type: "never",
|
|
1957
|
-
...
|
|
1957
|
+
...h(t)
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
|
-
s(
|
|
1960
|
+
s(Or, "_never");
|
|
1961
1961
|
function xr(e, t) {
|
|
1962
1962
|
return new e({
|
|
1963
1963
|
type: "date",
|
|
1964
|
-
...
|
|
1964
|
+
...h(t)
|
|
1965
1965
|
});
|
|
1966
1966
|
}
|
|
1967
1967
|
s(xr, "_date");
|
|
1968
1968
|
function nt(e, t) {
|
|
1969
1969
|
return new yt({
|
|
1970
1970
|
check: "less_than",
|
|
1971
|
-
...
|
|
1971
|
+
...h(t),
|
|
1972
1972
|
value: e,
|
|
1973
1973
|
inclusive: !1
|
|
1974
1974
|
});
|
|
@@ -1977,7 +1977,7 @@ s(nt, "_lt");
|
|
|
1977
1977
|
function ae(e, t) {
|
|
1978
1978
|
return new yt({
|
|
1979
1979
|
check: "less_than",
|
|
1980
|
-
...
|
|
1980
|
+
...h(t),
|
|
1981
1981
|
value: e,
|
|
1982
1982
|
inclusive: !0
|
|
1983
1983
|
});
|
|
@@ -1986,7 +1986,7 @@ s(ae, "_lte");
|
|
|
1986
1986
|
function ot(e, t) {
|
|
1987
1987
|
return new $t({
|
|
1988
1988
|
check: "greater_than",
|
|
1989
|
-
...
|
|
1989
|
+
...h(t),
|
|
1990
1990
|
value: e,
|
|
1991
1991
|
inclusive: !1
|
|
1992
1992
|
});
|
|
@@ -1995,7 +1995,7 @@ s(ot, "_gt");
|
|
|
1995
1995
|
function se(e, t) {
|
|
1996
1996
|
return new $t({
|
|
1997
1997
|
check: "greater_than",
|
|
1998
|
-
...
|
|
1998
|
+
...h(t),
|
|
1999
1999
|
value: e,
|
|
2000
2000
|
inclusive: !0
|
|
2001
2001
|
});
|
|
@@ -2004,7 +2004,7 @@ s(se, "_gte");
|
|
|
2004
2004
|
function rt(e, t) {
|
|
2005
2005
|
return new Jn({
|
|
2006
2006
|
check: "multiple_of",
|
|
2007
|
-
...
|
|
2007
|
+
...h(t),
|
|
2008
2008
|
value: e
|
|
2009
2009
|
});
|
|
2010
2010
|
}
|
|
@@ -2012,7 +2012,7 @@ s(rt, "_multipleOf");
|
|
|
2012
2012
|
function Tt(e, t) {
|
|
2013
2013
|
return new qn({
|
|
2014
2014
|
check: "max_length",
|
|
2015
|
-
...
|
|
2015
|
+
...h(t),
|
|
2016
2016
|
maximum: e
|
|
2017
2017
|
});
|
|
2018
2018
|
}
|
|
@@ -2020,24 +2020,24 @@ s(Tt, "_maxLength");
|
|
|
2020
2020
|
function le(e, t) {
|
|
2021
2021
|
return new Yn({
|
|
2022
2022
|
check: "min_length",
|
|
2023
|
-
...
|
|
2023
|
+
...h(t),
|
|
2024
2024
|
minimum: e
|
|
2025
2025
|
});
|
|
2026
2026
|
}
|
|
2027
2027
|
s(le, "_minLength");
|
|
2028
|
-
function
|
|
2028
|
+
function jt(e, t) {
|
|
2029
2029
|
return new Xn({
|
|
2030
2030
|
check: "length_equals",
|
|
2031
|
-
...
|
|
2031
|
+
...h(t),
|
|
2032
2032
|
length: e
|
|
2033
2033
|
});
|
|
2034
2034
|
}
|
|
2035
|
-
s(
|
|
2035
|
+
s(jt, "_length");
|
|
2036
2036
|
function Cr(e, t) {
|
|
2037
2037
|
return new Hn({
|
|
2038
2038
|
check: "string_format",
|
|
2039
2039
|
format: "regex",
|
|
2040
|
-
...
|
|
2040
|
+
...h(t),
|
|
2041
2041
|
pattern: e
|
|
2042
2042
|
});
|
|
2043
2043
|
}
|
|
@@ -2046,7 +2046,7 @@ function Nr(e) {
|
|
|
2046
2046
|
return new Qn({
|
|
2047
2047
|
check: "string_format",
|
|
2048
2048
|
format: "lowercase",
|
|
2049
|
-
...
|
|
2049
|
+
...h(e)
|
|
2050
2050
|
});
|
|
2051
2051
|
}
|
|
2052
2052
|
s(Nr, "_lowercase");
|
|
@@ -2054,7 +2054,7 @@ function Ur(e) {
|
|
|
2054
2054
|
return new eo({
|
|
2055
2055
|
check: "string_format",
|
|
2056
2056
|
format: "uppercase",
|
|
2057
|
-
...
|
|
2057
|
+
...h(e)
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
2060
|
s(Ur, "_uppercase");
|
|
@@ -2062,7 +2062,7 @@ function Dr(e, t) {
|
|
|
2062
2062
|
return new to({
|
|
2063
2063
|
check: "string_format",
|
|
2064
2064
|
format: "includes",
|
|
2065
|
-
...
|
|
2065
|
+
...h(t),
|
|
2066
2066
|
includes: e
|
|
2067
2067
|
});
|
|
2068
2068
|
}
|
|
@@ -2071,7 +2071,7 @@ function Fr(e, t) {
|
|
|
2071
2071
|
return new no({
|
|
2072
2072
|
check: "string_format",
|
|
2073
2073
|
format: "starts_with",
|
|
2074
|
-
...
|
|
2074
|
+
...h(t),
|
|
2075
2075
|
prefix: e
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
@@ -2080,7 +2080,7 @@ function Rr(e, t) {
|
|
|
2080
2080
|
return new oo({
|
|
2081
2081
|
check: "string_format",
|
|
2082
2082
|
format: "ends_with",
|
|
2083
|
-
...
|
|
2083
|
+
...h(t),
|
|
2084
2084
|
suffix: e
|
|
2085
2085
|
});
|
|
2086
2086
|
}
|
|
@@ -2115,7 +2115,7 @@ function Wr(e, t, n) {
|
|
|
2115
2115
|
// get element() {
|
|
2116
2116
|
// return element;
|
|
2117
2117
|
// },
|
|
2118
|
-
...
|
|
2118
|
+
...h(n)
|
|
2119
2119
|
});
|
|
2120
2120
|
}
|
|
2121
2121
|
s(Wr, "_array");
|
|
@@ -2124,7 +2124,7 @@ function Gr(e, t, n) {
|
|
|
2124
2124
|
type: "custom",
|
|
2125
2125
|
check: "custom",
|
|
2126
2126
|
fn: t,
|
|
2127
|
-
...
|
|
2127
|
+
...h(n)
|
|
2128
2128
|
});
|
|
2129
2129
|
}
|
|
2130
2130
|
s(Gr, "_refine");
|
|
@@ -2143,7 +2143,7 @@ s(Jr, "_superRefine");
|
|
|
2143
2143
|
function Kr(e, t) {
|
|
2144
2144
|
const n = new A({
|
|
2145
2145
|
check: "custom",
|
|
2146
|
-
...
|
|
2146
|
+
...h(t)
|
|
2147
2147
|
});
|
|
2148
2148
|
return n._zod.check = e, n;
|
|
2149
2149
|
}
|
|
@@ -2207,12 +2207,12 @@ const oi = /* @__PURE__ */ s((e, t) => {
|
|
|
2207
2207
|
});
|
|
2208
2208
|
}, "initializer"), T = c("ZodError", oi, {
|
|
2209
2209
|
Parent: Error
|
|
2210
|
-
}), ri = /* @__PURE__ */ Ee(T), ii = /* @__PURE__ */ Te(T), ai = /* @__PURE__ */ fe(T), si = /* @__PURE__ */ me(T), ci = /* @__PURE__ */
|
|
2210
|
+
}), ri = /* @__PURE__ */ Ee(T), ii = /* @__PURE__ */ Te(T), ai = /* @__PURE__ */ fe(T), si = /* @__PURE__ */ me(T), ci = /* @__PURE__ */ pn(T), ui = /* @__PURE__ */ hn(T), li = /* @__PURE__ */ fn(T), di = /* @__PURE__ */ mn(T), pi = /* @__PURE__ */ gn(T), hi = /* @__PURE__ */ vn(T), fi = /* @__PURE__ */ _n(T), mi = /* @__PURE__ */ wn(T), _ = /* @__PURE__ */ c("ZodType", (e, t) => (g.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(M(t, {
|
|
2211
2211
|
checks: [
|
|
2212
2212
|
...t.checks ?? [],
|
|
2213
2213
|
...n.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
|
|
2214
2214
|
]
|
|
2215
|
-
})), e.clone = (n, o) => D(e, n, o), e.brand = () => e, e.register = ((n, o) => (n.add(e, o), e)), e.parse = (n, o) => ri(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => ai(e, n, o), e.parseAsync = async (n, o) => ii(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => si(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => ci(e, n, o), e.decode = (n, o) => ui(e, n, o), e.encodeAsync = async (n, o) => li(e, n, o), e.decodeAsync = async (n, o) => di(e, n, o), e.safeEncode = (n, o) =>
|
|
2215
|
+
})), e.clone = (n, o) => D(e, n, o), e.brand = () => e, e.register = ((n, o) => (n.add(e, o), e)), e.parse = (n, o) => ri(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => ai(e, n, o), e.parseAsync = async (n, o) => ii(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => si(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => ci(e, n, o), e.decode = (n, o) => ui(e, n, o), e.encodeAsync = async (n, o) => li(e, n, o), e.decodeAsync = async (n, o) => di(e, n, o), e.safeEncode = (n, o) => pi(e, n, o), e.safeDecode = (n, o) => hi(e, n, o), e.safeEncodeAsync = async (n, o) => fi(e, n, o), e.safeDecodeAsync = async (n, o) => mi(e, n, o), e.refine = (n, o) => e.check(sa(n, o)), e.superRefine = (n) => e.check(ca(n)), e.overwrite = (n) => e.check(X(n)), e.optional = () => ct(e), e.nullable = () => ut(e), e.nullish = () => ct(ut(e)), e.nonoptional = (n) => ea(e, n), e.array = () => U(e), e.or = (n) => pe([e, n]), e.and = (n) => Wi(e, n), e.transform = (n) => lt(e, Ki(n)), e.default = (n) => Xi(e, n), e.prefault = (n) => Qi(e, n), e.catch = (n) => na(e, n), e.pipe = (n) => lt(e, n), e.readonly = () => ia(e), e.describe = (n) => {
|
|
2216
2216
|
const o = e.clone();
|
|
2217
2217
|
return te.add(o, { description: n }), o;
|
|
2218
2218
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2225,19 +2225,19 @@ const oi = /* @__PURE__ */ s((e, t) => {
|
|
|
2225
2225
|
return te.get(e);
|
|
2226
2226
|
const o = e.clone();
|
|
2227
2227
|
return te.add(o, n[0]), o;
|
|
2228
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
2229
|
-
|
|
2228
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Pt = /* @__PURE__ */ c("_ZodString", (e, t) => {
|
|
2229
|
+
je.init(e, t), _.init(e, t);
|
|
2230
2230
|
const n = e._zod.bag;
|
|
2231
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(Cr(...o)), e.includes = (...o) => e.check(Dr(...o)), e.startsWith = (...o) => e.check(Fr(...o)), e.endsWith = (...o) => e.check(Rr(...o)), e.min = (...o) => e.check(le(...o)), e.max = (...o) => e.check(Tt(...o)), e.length = (...o) => e.check(
|
|
2231
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(Cr(...o)), e.includes = (...o) => e.check(Dr(...o)), e.startsWith = (...o) => e.check(Fr(...o)), e.endsWith = (...o) => e.check(Rr(...o)), e.min = (...o) => e.check(le(...o)), e.max = (...o) => e.check(Tt(...o)), e.length = (...o) => e.check(jt(...o)), e.nonempty = (...o) => e.check(le(1, ...o)), e.lowercase = (o) => e.check(Nr(o)), e.uppercase = (o) => e.check(Ur(o)), e.trim = () => e.check(Mr()), e.normalize = (...o) => e.check(Lr(...o)), e.toLowerCase = () => e.check(Vr()), e.toUpperCase = () => e.check(Br());
|
|
2232
2232
|
}), gi = /* @__PURE__ */ c("ZodString", (e, t) => {
|
|
2233
|
-
|
|
2233
|
+
je.init(e, t), Pt.init(e, t), e.email = (n) => e.check(or(vi, n)), e.url = (n) => e.check(cr(_i, n)), e.jwt = (n) => e.check(yr(Oi, n)), e.emoji = (n) => e.check(ur(wi, n)), e.guid = (n) => e.check(tt(it, n)), e.uuid = (n) => e.check(rr(ne, n)), e.uuidv4 = (n) => e.check(ir(ne, n)), e.uuidv6 = (n) => e.check(ar(ne, n)), e.uuidv7 = (n) => e.check(sr(ne, n)), e.nanoid = (n) => e.check(lr(bi, n)), e.guid = (n) => e.check(tt(it, n)), e.cuid = (n) => e.check(dr(ki, n)), e.cuid2 = (n) => e.check(pr(zi, n)), e.ulid = (n) => e.check(hr(yi, n)), e.base64 = (n) => e.check(br(Ti, n)), e.base64url = (n) => e.check(kr(ji, n)), e.xid = (n) => e.check(fr($i, n)), e.ksuid = (n) => e.check(mr(Zi, n)), e.ipv4 = (n) => e.check(gr(Ii, n)), e.ipv6 = (n) => e.check(vr(Si, n)), e.cidrv4 = (n) => e.check(_r(Ai, n)), e.cidrv6 = (n) => e.check(wr(Ei, n)), e.e164 = (n) => e.check(zr(Pi, n)), e.datetime = (n) => e.check(Yr(n)), e.date = (n) => e.check(Hr(n)), e.time = (n) => e.check(ei(n)), e.duration = (n) => e.check(ni(n));
|
|
2234
2234
|
});
|
|
2235
2235
|
function l(e) {
|
|
2236
2236
|
return nr(gi, e);
|
|
2237
2237
|
}
|
|
2238
2238
|
s(l, "string");
|
|
2239
2239
|
const w = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
|
|
2240
|
-
v.init(e, t),
|
|
2240
|
+
v.init(e, t), Pt.init(e, t);
|
|
2241
2241
|
}), vi = /* @__PURE__ */ c("ZodEmail", (e, t) => {
|
|
2242
2242
|
co.init(e, t), w.init(e, t);
|
|
2243
2243
|
}), it = /* @__PURE__ */ c("ZodGUID", (e, t) => {
|
|
@@ -2249,9 +2249,9 @@ const w = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
|
|
|
2249
2249
|
}), wi = /* @__PURE__ */ c("ZodEmoji", (e, t) => {
|
|
2250
2250
|
lo.init(e, t), w.init(e, t);
|
|
2251
2251
|
}), bi = /* @__PURE__ */ c("ZodNanoID", (e, t) => {
|
|
2252
|
-
ho.init(e, t), w.init(e, t);
|
|
2253
|
-
}), ki = /* @__PURE__ */ c("ZodCUID", (e, t) => {
|
|
2254
2252
|
po.init(e, t), w.init(e, t);
|
|
2253
|
+
}), ki = /* @__PURE__ */ c("ZodCUID", (e, t) => {
|
|
2254
|
+
ho.init(e, t), w.init(e, t);
|
|
2255
2255
|
}), zi = /* @__PURE__ */ c("ZodCUID2", (e, t) => {
|
|
2256
2256
|
fo.init(e, t), w.init(e, t);
|
|
2257
2257
|
}), yi = /* @__PURE__ */ c("ZodULID", (e, t) => {
|
|
@@ -2270,30 +2270,30 @@ const w = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
|
|
|
2270
2270
|
Zo.init(e, t), w.init(e, t);
|
|
2271
2271
|
}), Ti = /* @__PURE__ */ c("ZodBase64", (e, t) => {
|
|
2272
2272
|
Io.init(e, t), w.init(e, t);
|
|
2273
|
-
}),
|
|
2273
|
+
}), ji = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
|
|
2274
2274
|
Ao.init(e, t), w.init(e, t);
|
|
2275
|
-
}),
|
|
2275
|
+
}), Pi = /* @__PURE__ */ c("ZodE164", (e, t) => {
|
|
2276
2276
|
Eo.init(e, t), w.init(e, t);
|
|
2277
|
-
}),
|
|
2278
|
-
|
|
2279
|
-
}),
|
|
2277
|
+
}), Oi = /* @__PURE__ */ c("ZodJWT", (e, t) => {
|
|
2278
|
+
jo.init(e, t), w.init(e, t);
|
|
2279
|
+
}), Ot = /* @__PURE__ */ c("ZodNumber", (e, t) => {
|
|
2280
2280
|
It.init(e, t), _.init(e, t), e.gt = (o, r) => e.check(ot(o, r)), e.gte = (o, r) => e.check(se(o, r)), e.min = (o, r) => e.check(se(o, r)), e.lt = (o, r) => e.check(nt(o, r)), e.lte = (o, r) => e.check(ae(o, r)), e.max = (o, r) => e.check(ae(o, r)), e.int = (o) => e.check(at(o)), e.safe = (o) => e.check(at(o)), e.positive = (o) => e.check(ot(0, o)), e.nonnegative = (o) => e.check(se(0, o)), e.negative = (o) => e.check(nt(0, o)), e.nonpositive = (o) => e.check(ae(0, o)), e.multipleOf = (o, r) => e.check(rt(o, r)), e.step = (o, r) => e.check(rt(o, r)), e.finite = () => e;
|
|
2281
2281
|
const n = e._zod.bag;
|
|
2282
2282
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2283
2283
|
});
|
|
2284
2284
|
function S(e) {
|
|
2285
|
-
return Ar(
|
|
2285
|
+
return Ar(Ot, e);
|
|
2286
2286
|
}
|
|
2287
2287
|
s(S, "number");
|
|
2288
2288
|
const xi = /* @__PURE__ */ c("ZodNumberFormat", (e, t) => {
|
|
2289
|
-
|
|
2289
|
+
Po.init(e, t), Ot.init(e, t);
|
|
2290
2290
|
});
|
|
2291
2291
|
function at(e) {
|
|
2292
2292
|
return Er(xi, e);
|
|
2293
2293
|
}
|
|
2294
2294
|
s(at, "int");
|
|
2295
2295
|
const Ci = /* @__PURE__ */ c("ZodBoolean", (e, t) => {
|
|
2296
|
-
|
|
2296
|
+
Oo.init(e, t), _.init(e, t);
|
|
2297
2297
|
});
|
|
2298
2298
|
function I(e) {
|
|
2299
2299
|
return Tr(Ci, e);
|
|
@@ -2303,21 +2303,21 @@ const Ni = /* @__PURE__ */ c("ZodAny", (e, t) => {
|
|
|
2303
2303
|
xo.init(e, t), _.init(e, t);
|
|
2304
2304
|
});
|
|
2305
2305
|
function de() {
|
|
2306
|
-
return
|
|
2306
|
+
return jr(Ni);
|
|
2307
2307
|
}
|
|
2308
2308
|
s(de, "any");
|
|
2309
2309
|
const Ui = /* @__PURE__ */ c("ZodUnknown", (e, t) => {
|
|
2310
2310
|
Co.init(e, t), _.init(e, t);
|
|
2311
2311
|
});
|
|
2312
2312
|
function st() {
|
|
2313
|
-
return
|
|
2313
|
+
return Pr(Ui);
|
|
2314
2314
|
}
|
|
2315
2315
|
s(st, "unknown");
|
|
2316
2316
|
const Di = /* @__PURE__ */ c("ZodNever", (e, t) => {
|
|
2317
2317
|
No.init(e, t), _.init(e, t);
|
|
2318
2318
|
});
|
|
2319
2319
|
function Fi(e) {
|
|
2320
|
-
return
|
|
2320
|
+
return Or(Di, e);
|
|
2321
2321
|
}
|
|
2322
2322
|
s(Fi, "never");
|
|
2323
2323
|
const Ri = /* @__PURE__ */ c("ZodDate", (e, t) => {
|
|
@@ -2330,7 +2330,7 @@ function ze(e) {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
s(ze, "date");
|
|
2332
2332
|
const Li = /* @__PURE__ */ c("ZodArray", (e, t) => {
|
|
2333
|
-
Do.init(e, t), _.init(e, t), e.element = t.element, e.min = (n, o) => e.check(le(n, o)), e.nonempty = (n) => e.check(le(1, n)), e.max = (n, o) => e.check(Tt(n, o)), e.length = (n, o) => e.check(
|
|
2333
|
+
Do.init(e, t), _.init(e, t), e.element = t.element, e.min = (n, o) => e.check(le(n, o)), e.nonempty = (n) => e.check(le(1, n)), e.max = (n, o) => e.check(Tt(n, o)), e.length = (n, o) => e.check(jt(n, o)), e.unwrap = () => e.element;
|
|
2334
2334
|
});
|
|
2335
2335
|
function U(e, t) {
|
|
2336
2336
|
return Wr(Li, e, t);
|
|
@@ -2343,7 +2343,7 @@ function y(e, t) {
|
|
|
2343
2343
|
const n = {
|
|
2344
2344
|
type: "object",
|
|
2345
2345
|
shape: e ?? {},
|
|
2346
|
-
...
|
|
2346
|
+
...h(t)
|
|
2347
2347
|
};
|
|
2348
2348
|
return new Mi(n);
|
|
2349
2349
|
}
|
|
@@ -2351,14 +2351,14 @@ s(y, "object");
|
|
|
2351
2351
|
const xt = /* @__PURE__ */ c("ZodUnion", (e, t) => {
|
|
2352
2352
|
Et.init(e, t), _.init(e, t), e.options = t.options;
|
|
2353
2353
|
});
|
|
2354
|
-
function
|
|
2354
|
+
function pe(e, t) {
|
|
2355
2355
|
return new xt({
|
|
2356
2356
|
type: "union",
|
|
2357
2357
|
options: e,
|
|
2358
|
-
...
|
|
2358
|
+
...h(t)
|
|
2359
2359
|
});
|
|
2360
2360
|
}
|
|
2361
|
-
s(
|
|
2361
|
+
s(pe, "union");
|
|
2362
2362
|
const Vi = /* @__PURE__ */ c("ZodDiscriminatedUnion", (e, t) => {
|
|
2363
2363
|
xt.init(e, t), Lo.init(e, t);
|
|
2364
2364
|
});
|
|
@@ -2367,7 +2367,7 @@ function Ct(e, t, n) {
|
|
|
2367
2367
|
type: "union",
|
|
2368
2368
|
options: t,
|
|
2369
2369
|
discriminator: e,
|
|
2370
|
-
...
|
|
2370
|
+
...h(n)
|
|
2371
2371
|
});
|
|
2372
2372
|
}
|
|
2373
2373
|
s(Ct, "discriminatedUnion");
|
|
@@ -2395,7 +2395,7 @@ const ye = /* @__PURE__ */ c("ZodEnum", (e, t) => {
|
|
|
2395
2395
|
return new ye({
|
|
2396
2396
|
...t,
|
|
2397
2397
|
checks: [],
|
|
2398
|
-
...
|
|
2398
|
+
...h(r),
|
|
2399
2399
|
entries: i
|
|
2400
2400
|
});
|
|
2401
2401
|
}, e.exclude = (o, r) => {
|
|
@@ -2408,7 +2408,7 @@ const ye = /* @__PURE__ */ c("ZodEnum", (e, t) => {
|
|
|
2408
2408
|
return new ye({
|
|
2409
2409
|
...t,
|
|
2410
2410
|
checks: [],
|
|
2411
|
-
...
|
|
2411
|
+
...h(r),
|
|
2412
2412
|
entries: i
|
|
2413
2413
|
});
|
|
2414
2414
|
};
|
|
@@ -2418,7 +2418,7 @@ function z(e, t) {
|
|
|
2418
2418
|
return new ye({
|
|
2419
2419
|
type: "enum",
|
|
2420
2420
|
entries: n,
|
|
2421
|
-
...
|
|
2421
|
+
...h(t)
|
|
2422
2422
|
});
|
|
2423
2423
|
}
|
|
2424
2424
|
s(z, "_enum");
|
|
@@ -2435,7 +2435,7 @@ function Y(e, t) {
|
|
|
2435
2435
|
return new Gi({
|
|
2436
2436
|
type: "literal",
|
|
2437
2437
|
values: Array.isArray(e) ? e : [e],
|
|
2438
|
-
...
|
|
2438
|
+
...h(t)
|
|
2439
2439
|
});
|
|
2440
2440
|
}
|
|
2441
2441
|
s(Y, "literal");
|
|
@@ -2515,7 +2515,7 @@ function ea(e, t) {
|
|
|
2515
2515
|
return new Ut({
|
|
2516
2516
|
type: "nonoptional",
|
|
2517
2517
|
innerType: e,
|
|
2518
|
-
...
|
|
2518
|
+
...h(t)
|
|
2519
2519
|
});
|
|
2520
2520
|
}
|
|
2521
2521
|
s(ea, "nonoptional");
|
|
@@ -2563,7 +2563,7 @@ function ca(e) {
|
|
|
2563
2563
|
return Jr(e);
|
|
2564
2564
|
}
|
|
2565
2565
|
s(ca, "superRefine");
|
|
2566
|
-
const ua = z(["image", "video", "audio"]), la = z(["avatar", "cover", "voice", "general"]), da = z(["processing", "active", "failed", "deleted"]),
|
|
2566
|
+
const ua = z(["image", "video", "audio"]), la = z(["avatar", "cover", "voice", "general"]), da = z(["processing", "active", "failed", "deleted"]), pa = z(["jpg", "jpeg", "png", "gif", "webp", "svg"]), ha = z(["mp4", "webm", "ogg", "mov", "avi"]), fa = z(["mp3", "wav", "ogg", "aac", "flac"]), ma = y({
|
|
2567
2567
|
mediaId: l(),
|
|
2568
2568
|
userId: l(),
|
|
2569
2569
|
orgId: l(),
|
|
@@ -2609,10 +2609,10 @@ const ua = z(["image", "video", "audio"]), la = z(["avatar", "cover", "voice", "
|
|
|
2609
2609
|
controls: I().optional()
|
|
2610
2610
|
}), _a = N.extend({
|
|
2611
2611
|
format: Y("image"),
|
|
2612
|
-
imageFormat:
|
|
2612
|
+
imageFormat: pa
|
|
2613
2613
|
}), wa = N.extend({
|
|
2614
2614
|
format: Y("video"),
|
|
2615
|
-
videoFormat:
|
|
2615
|
+
videoFormat: ha,
|
|
2616
2616
|
video: ga.optional()
|
|
2617
2617
|
}), ba = N.extend({
|
|
2618
2618
|
format: Y("audio"),
|
|
@@ -2631,8 +2631,8 @@ const Dt = z(["xxs", "xs", "sm", "md", "lg", "xl"]), Ft = z(["primary", "default
|
|
|
2631
2631
|
size: Dt.optional(),
|
|
2632
2632
|
theme: Ft.optional(),
|
|
2633
2633
|
design: Rt.optional(),
|
|
2634
|
-
icon:
|
|
2635
|
-
iconAfter:
|
|
2634
|
+
icon: pe([l(), N]).optional(),
|
|
2635
|
+
iconAfter: pe([l(), N]).optional(),
|
|
2636
2636
|
rounding: z(["full", "md", "lg"]).optional(),
|
|
2637
2637
|
loading: I().optional(),
|
|
2638
2638
|
disabled: I().optional(),
|
|
@@ -2782,7 +2782,7 @@ const za = y({
|
|
|
2782
2782
|
// Screen reader label
|
|
2783
2783
|
subLabel: l().optional(),
|
|
2784
2784
|
// Secondary text
|
|
2785
|
-
value:
|
|
2785
|
+
value: pe([l(), S()]).optional(),
|
|
2786
2786
|
description: l().optional(),
|
|
2787
2787
|
info: l().optional(),
|
|
2788
2788
|
count: S().optional(),
|
|
@@ -2852,8 +2852,8 @@ const Ne = class Ne {
|
|
|
2852
2852
|
domain: u,
|
|
2853
2853
|
path: d = "/"
|
|
2854
2854
|
} = o;
|
|
2855
|
-
let
|
|
2856
|
-
|
|
2855
|
+
let p = `${t}=${encodeURIComponent(n)}`;
|
|
2856
|
+
p += `; Path=${d}`, p += `; Max-Age=${a}`, p += `; SameSite=${i}`, r && (p += "; Secure"), u && (p += `; Domain=${u}`), document.cookie = p;
|
|
2857
2857
|
}
|
|
2858
2858
|
/**
|
|
2859
2859
|
* Remove cookie by setting expired date
|
|
@@ -2919,8 +2919,8 @@ function ya(e, t) {
|
|
|
2919
2919
|
const u = a.json.bind(a), d = a.clone();
|
|
2920
2920
|
return Object.defineProperty(d, "json", {
|
|
2921
2921
|
value: /* @__PURE__ */ s(async () => {
|
|
2922
|
-
const
|
|
2923
|
-
return typeof
|
|
2922
|
+
const p = await u();
|
|
2923
|
+
return typeof p == "object" && p !== null && "ok" in p && ("user" in p || "token" in p) && t(p), p;
|
|
2924
2924
|
}, "value")
|
|
2925
2925
|
}), d;
|
|
2926
2926
|
}
|
|
@@ -2929,7 +2929,7 @@ function ya(e, t) {
|
|
|
2929
2929
|
});
|
|
2930
2930
|
}
|
|
2931
2931
|
s(ya, "createApiClient");
|
|
2932
|
-
let $a = Symbol("clean"),
|
|
2932
|
+
let $a = Symbol("clean"), j = [], x = 0;
|
|
2933
2933
|
const oe = 4;
|
|
2934
2934
|
let Lt = /* @__PURE__ */ s((e) => {
|
|
2935
2935
|
let t = [], n = {
|
|
@@ -2940,24 +2940,24 @@ let Lt = /* @__PURE__ */ s((e) => {
|
|
|
2940
2940
|
lc: 0,
|
|
2941
2941
|
listen(o) {
|
|
2942
2942
|
return n.lc = t.push(o), () => {
|
|
2943
|
-
for (let i = x + oe; i <
|
|
2944
|
-
|
|
2943
|
+
for (let i = x + oe; i < j.length; )
|
|
2944
|
+
j[i] === o ? j.splice(i, oe) : i += oe;
|
|
2945
2945
|
let r = t.indexOf(o);
|
|
2946
2946
|
~r && (t.splice(r, 1), --n.lc || n.off());
|
|
2947
2947
|
};
|
|
2948
2948
|
},
|
|
2949
2949
|
notify(o, r) {
|
|
2950
|
-
let i = !
|
|
2950
|
+
let i = !j.length;
|
|
2951
2951
|
for (let a of t)
|
|
2952
|
-
|
|
2952
|
+
j.push(a, n.value, o, r);
|
|
2953
2953
|
if (i) {
|
|
2954
|
-
for (x = 0; x <
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2954
|
+
for (x = 0; x < j.length; x += oe)
|
|
2955
|
+
j[x](
|
|
2956
|
+
j[x + 1],
|
|
2957
|
+
j[x + 2],
|
|
2958
|
+
j[x + 3]
|
|
2959
2959
|
);
|
|
2960
|
-
|
|
2960
|
+
j.length = 0;
|
|
2961
2961
|
}
|
|
2962
2962
|
},
|
|
2963
2963
|
/* It will be called on last listener unsubscribing.
|
|
@@ -3289,7 +3289,7 @@ const De = class De extends Gt {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
/**
|
|
3291
3291
|
* Start conversation session (auto-creates conversation if needed)
|
|
3292
|
-
* Returns
|
|
3292
|
+
* Returns conversation data for tracking messages
|
|
3293
3293
|
*/
|
|
3294
3294
|
async startConversation(n) {
|
|
3295
3295
|
try {
|
|
@@ -3311,7 +3311,7 @@ const De = class De extends Gt {
|
|
|
3311
3311
|
this.logger.error("Failed to start conversation", { error: a, args: n });
|
|
3312
3312
|
return;
|
|
3313
3313
|
}
|
|
3314
|
-
return this.logger.info("Conversation started", { conversationId: i.data.conversationId }), i.data
|
|
3314
|
+
return this.logger.info("Conversation started", { conversationId: i.data.conversationId }), i.data;
|
|
3315
3315
|
} catch (o) {
|
|
3316
3316
|
this.logger.error("Start conversation error", { error: o, args: n });
|
|
3317
3317
|
return;
|
|
@@ -3326,6 +3326,25 @@ const De = class De extends Gt {
|
|
|
3326
3326
|
let o = this.storage.getItem(n);
|
|
3327
3327
|
return o || (o = Le({ prefix: "anon" }), this.storage.setItem(n, o)), o;
|
|
3328
3328
|
}
|
|
3329
|
+
/**
|
|
3330
|
+
* Save message to conversation
|
|
3331
|
+
* Called by SelfController to persist messages
|
|
3332
|
+
*/
|
|
3333
|
+
async saveMessage(n) {
|
|
3334
|
+
try {
|
|
3335
|
+
const r = await (await this.api.conversation.messages.$post({
|
|
3336
|
+
json: {
|
|
3337
|
+
sessionId: n.conversationId,
|
|
3338
|
+
participantId: n.participantId,
|
|
3339
|
+
content: n.content,
|
|
3340
|
+
role: n.role
|
|
3341
|
+
}
|
|
3342
|
+
})).json();
|
|
3343
|
+
return r.ok ? !0 : (this.logger.error("Failed to save message", { error: "error" in r ? r.error : "Unknown error", args: n }), !1);
|
|
3344
|
+
} catch (o) {
|
|
3345
|
+
return this.logger.error("Save message error", { error: o, args: n }), !1;
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3329
3348
|
};
|
|
3330
3349
|
s(De, "FictionSDK");
|
|
3331
3350
|
let dt = De;
|