@animaapp/anima-sdk-react 0.2.6 → 0.2.8
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/.turbo/turbo-build.log +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -75
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var qr = (t, e, n) => e in t ? sa(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var n of Br(e))
|
|
10
10
|
ua.call(e, n) && qr(t, n, e[n]);
|
|
11
11
|
return t;
|
|
12
|
-
},
|
|
12
|
+
}, Kr = (t, e) => aa(t, ia(e));
|
|
13
13
|
var Be = (t, e, n) => new Promise((r, s) => {
|
|
14
14
|
var a = (u) => {
|
|
15
15
|
try {
|
|
@@ -35,7 +35,7 @@ const ya = (t) => {
|
|
|
35
35
|
return btoa(e);
|
|
36
36
|
};
|
|
37
37
|
var ga = Object.defineProperty, _a = (t, e, n) => e in t ? ga(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, tn = (t, e, n) => _a(t, typeof e != "symbol" ? e + "" : e, n);
|
|
38
|
-
class
|
|
38
|
+
class Hr extends Error {
|
|
39
39
|
constructor(e, n) {
|
|
40
40
|
super(e), tn(this, "type"), tn(this, "field"), tn(this, "value"), tn(this, "line"), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
|
|
41
41
|
}
|
|
@@ -82,7 +82,7 @@ function va(t) {
|
|
|
82
82
|
break;
|
|
83
83
|
case "retry":
|
|
84
84
|
/^\d+$/.test(v) ? r(parseInt(v, 10)) : n(
|
|
85
|
-
new
|
|
85
|
+
new Hr(`Invalid \`retry\` value: "${v}"`, {
|
|
86
86
|
type: "invalid-retry",
|
|
87
87
|
value: v,
|
|
88
88
|
line: m
|
|
@@ -91,7 +91,7 @@ function va(t) {
|
|
|
91
91
|
break;
|
|
92
92
|
default:
|
|
93
93
|
n(
|
|
94
|
-
new
|
|
94
|
+
new Hr(
|
|
95
95
|
`Unknown field "${l.length > 20 ? `${l.slice(0, 20)}…` : l}"`,
|
|
96
96
|
{ type: "unknown-field", field: l, value: v, line: m }
|
|
97
97
|
)
|
|
@@ -172,8 +172,8 @@ function wa(t) {
|
|
|
172
172
|
const e = globalThis.DOMException;
|
|
173
173
|
return typeof e == "function" ? new e(t, "SyntaxError") : new SyntaxError(t);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return t instanceof Error ? "errors" in t && Array.isArray(t.errors) ? t.errors.map(
|
|
175
|
+
function Kn(t) {
|
|
176
|
+
return t instanceof Error ? "errors" in t && Array.isArray(t.errors) ? t.errors.map(Kn).join(", ") : "cause" in t && t.cause instanceof Error ? `${t}: ${Kn(t.cause)}` : t.message : `${t}`;
|
|
177
177
|
}
|
|
178
178
|
function Jr(t) {
|
|
179
179
|
return {
|
|
@@ -187,11 +187,11 @@ function Jr(t) {
|
|
|
187
187
|
}
|
|
188
188
|
var Ss = (t) => {
|
|
189
189
|
throw TypeError(t);
|
|
190
|
-
}, Ar = (t, e, n) => e.has(t) || Ss("Cannot " + n), A = (t, e, n) => (Ar(t, e, "read from private field"), n ? n.call(t) : e.get(t)), U = (t, e, n) => e.has(t) ? Ss("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), L = (t, e, n, r) => (Ar(t, e, "write to private field"), e.set(t, n), n), Ce = (t, e, n) => (Ar(t, e, "access private method"), n), re,
|
|
190
|
+
}, Ar = (t, e, n) => e.has(t) || Ss("Cannot " + n), A = (t, e, n) => (Ar(t, e, "read from private field"), n ? n.call(t) : e.get(t)), U = (t, e, n) => e.has(t) ? Ss("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), L = (t, e, n, r) => (Ar(t, e, "write to private field"), e.set(t, n), n), Ce = (t, e, n) => (Ar(t, e, "access private method"), n), re, He, ut, on, fn, Nt, ft, Pt, Ze, ct, ht, dt, Et, fe, Hn, Gn, Jn, Xr, Xn, Yn, xt, Qn, er;
|
|
191
191
|
class un extends EventTarget {
|
|
192
192
|
constructor(e, n) {
|
|
193
193
|
var r, s;
|
|
194
|
-
super(), U(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, U(this, re), U(this,
|
|
194
|
+
super(), U(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, U(this, re), U(this, He), U(this, ut), U(this, on), U(this, fn), U(this, Nt), U(this, ft), U(this, Pt, null), U(this, Ze), U(this, ct), U(this, ht, null), U(this, dt, null), U(this, Et, null), U(this, Gn, (a) => Be(this, null, function* () {
|
|
195
195
|
var i;
|
|
196
196
|
A(this, ct).reset();
|
|
197
197
|
const { body: o, redirected: u, status: c, headers: h } = a;
|
|
@@ -222,25 +222,25 @@ class un extends EventTarget {
|
|
|
222
222
|
v && A(this, ct).feed(k.decode(v, { stream: !l })), l && (b = !1, A(this, ct).reset(), Ce(this, fe, Qn).call(this));
|
|
223
223
|
} while (b);
|
|
224
224
|
})), U(this, Jn, (a) => {
|
|
225
|
-
L(this, Ze, void 0), !(a.name === "AbortError" || a.type === "aborted") && Ce(this, fe, Qn).call(this,
|
|
225
|
+
L(this, Ze, void 0), !(a.name === "AbortError" || a.type === "aborted") && Ce(this, fe, Qn).call(this, Kn(a));
|
|
226
226
|
}), U(this, Xn, (a) => {
|
|
227
227
|
typeof a.id == "string" && L(this, Pt, a.id);
|
|
228
228
|
const i = new MessageEvent(a.event || "message", {
|
|
229
229
|
data: a.data,
|
|
230
|
-
origin: A(this, ut) ? A(this, ut).origin : A(this,
|
|
230
|
+
origin: A(this, ut) ? A(this, ut).origin : A(this, He).origin,
|
|
231
231
|
lastEventId: a.id || ""
|
|
232
232
|
});
|
|
233
233
|
A(this, dt) && (!a.event || a.event === "message") && A(this, dt).call(this, i), this.dispatchEvent(i);
|
|
234
234
|
}), U(this, Yn, (a) => {
|
|
235
235
|
L(this, Nt, a);
|
|
236
236
|
}), U(this, er, () => {
|
|
237
|
-
L(this, ft, void 0), A(this, re) === this.CONNECTING && Ce(this, fe,
|
|
237
|
+
L(this, ft, void 0), A(this, re) === this.CONNECTING && Ce(this, fe, Hn).call(this);
|
|
238
238
|
});
|
|
239
239
|
try {
|
|
240
240
|
if (e instanceof URL)
|
|
241
|
-
L(this,
|
|
241
|
+
L(this, He, e);
|
|
242
242
|
else if (typeof e == "string")
|
|
243
|
-
L(this,
|
|
243
|
+
L(this, He, new URL(e, ka()));
|
|
244
244
|
else
|
|
245
245
|
throw new Error("Invalid URL");
|
|
246
246
|
} catch (a) {
|
|
@@ -249,7 +249,7 @@ class un extends EventTarget {
|
|
|
249
249
|
L(this, ct, va({
|
|
250
250
|
onEvent: A(this, Xn),
|
|
251
251
|
onRetry: A(this, Yn)
|
|
252
|
-
})), L(this, re, this.CONNECTING), L(this, Nt, 3e3), L(this, fn, (r = n == null ? void 0 : n.fetch) != null ? r : globalThis.fetch), L(this, on, (s = n == null ? void 0 : n.withCredentials) != null ? s : !1), Ce(this, fe,
|
|
252
|
+
})), L(this, re, this.CONNECTING), L(this, Nt, 3e3), L(this, fn, (r = n == null ? void 0 : n.fetch) != null ? r : globalThis.fetch), L(this, on, (s = n == null ? void 0 : n.withCredentials) != null ? s : !1), Ce(this, fe, Hn).call(this);
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
255
|
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
@@ -272,7 +272,7 @@ class un extends EventTarget {
|
|
|
272
272
|
* @public
|
|
273
273
|
*/
|
|
274
274
|
get url() {
|
|
275
|
-
return A(this,
|
|
275
|
+
return A(this, He).href;
|
|
276
276
|
}
|
|
277
277
|
/**
|
|
278
278
|
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
@@ -322,13 +322,13 @@ class un extends EventTarget {
|
|
|
322
322
|
A(this, ft) && clearTimeout(A(this, ft)), A(this, re) !== this.CLOSED && (A(this, Ze) && A(this, Ze).abort(), L(this, re, this.CLOSED), L(this, Ze, void 0));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
re = /* @__PURE__ */ new WeakMap(),
|
|
325
|
+
re = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakSet(), /**
|
|
326
326
|
* Connect to the given URL and start receiving events
|
|
327
327
|
*
|
|
328
328
|
* @internal
|
|
329
329
|
*/
|
|
330
|
-
|
|
331
|
-
L(this, re, this.CONNECTING), L(this, Ze, new AbortController()), A(this, fn)(A(this,
|
|
330
|
+
Hn = function() {
|
|
331
|
+
L(this, re, this.CONNECTING), L(this, Ze, new AbortController()), A(this, fn)(A(this, He), Ce(this, fe, Xr).call(this)).then(A(this, Gn)).catch(A(this, Jn));
|
|
332
332
|
}, Gn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), /**
|
|
333
333
|
* Get request options for the `fetch()` request
|
|
334
334
|
*
|
|
@@ -476,7 +476,7 @@ function Sn(t) {
|
|
|
476
476
|
function On(t) {
|
|
477
477
|
return t instanceof Set;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Ke(t) {
|
|
480
480
|
return t.copy_ || t.base_;
|
|
481
481
|
}
|
|
482
482
|
function nr(t, e) {
|
|
@@ -645,24 +645,24 @@ var Cr = {
|
|
|
645
645
|
get(t, e) {
|
|
646
646
|
if (e === oe)
|
|
647
647
|
return t;
|
|
648
|
-
const n =
|
|
648
|
+
const n = Ke(t);
|
|
649
649
|
if (!tr(n, e))
|
|
650
650
|
return Pa(t, n, e);
|
|
651
651
|
const r = n[e];
|
|
652
652
|
return t.finalized_ || !Ye(r) ? r : r === In(t.base_, e) ? (jn(t), t.copy_[e] = ir(r, t)) : r;
|
|
653
653
|
},
|
|
654
654
|
has(t, e) {
|
|
655
|
-
return e in
|
|
655
|
+
return e in Ke(t);
|
|
656
656
|
},
|
|
657
657
|
ownKeys(t) {
|
|
658
|
-
return Reflect.ownKeys(
|
|
658
|
+
return Reflect.ownKeys(Ke(t));
|
|
659
659
|
},
|
|
660
660
|
set(t, e, n) {
|
|
661
|
-
const r = Ns(
|
|
661
|
+
const r = Ns(Ke(t), e);
|
|
662
662
|
if (r != null && r.set)
|
|
663
663
|
return r.set.call(t.draft_, n), !0;
|
|
664
664
|
if (!t.modified_) {
|
|
665
|
-
const s = In(
|
|
665
|
+
const s = In(Ke(t), e), a = s == null ? void 0 : s[oe];
|
|
666
666
|
if (a && a.base_ === n)
|
|
667
667
|
return t.copy_[e] = n, t.assigned_[e] = !1, !0;
|
|
668
668
|
if (Sa(n, s) && (n !== void 0 || tr(t.base_, e)))
|
|
@@ -679,7 +679,7 @@ var Cr = {
|
|
|
679
679
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
680
680
|
// the same guarantee in ES5 mode.
|
|
681
681
|
getOwnPropertyDescriptor(t, e) {
|
|
682
|
-
const n =
|
|
682
|
+
const n = Ke(t), r = Reflect.getOwnPropertyDescriptor(n, e);
|
|
683
683
|
return r && {
|
|
684
684
|
writable: !0,
|
|
685
685
|
configurable: t.type_ !== 1 || e !== "length",
|
|
@@ -710,7 +710,7 @@ jt.set = function(t, e, n) {
|
|
|
710
710
|
};
|
|
711
711
|
function In(t, e) {
|
|
712
712
|
const n = t[oe];
|
|
713
|
-
return (n ?
|
|
713
|
+
return (n ? Ke(n) : t)[e];
|
|
714
714
|
}
|
|
715
715
|
function Pa(t, e, n) {
|
|
716
716
|
var s;
|
|
@@ -901,7 +901,7 @@ const rs = {
|
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
903
|
const o = new un(t, {
|
|
904
|
-
fetch: (g, b) => fetch(g,
|
|
904
|
+
fetch: (g, b) => fetch(g, Kr(Ue({}, b), {
|
|
905
905
|
method: e,
|
|
906
906
|
body: JSON.stringify(a)
|
|
907
907
|
}))
|
|
@@ -1201,10 +1201,10 @@ const za = () => dr, [lr, fr] = Jt && window.addEventListener ? [
|
|
|
1201
1201
|
}, qa = {
|
|
1202
1202
|
isOnline: za,
|
|
1203
1203
|
isVisible: Va
|
|
1204
|
-
},
|
|
1204
|
+
}, Ka = {
|
|
1205
1205
|
initFocus: Ua,
|
|
1206
1206
|
initReconnect: Ba
|
|
1207
|
-
}, ds = !Gt.useId, Zt = !Jt || Fa,
|
|
1207
|
+
}, ds = !Gt.useId, Zt = !Jt || Fa, Ha = (t) => Wa() ? window.requestAnimationFrame(t) : setTimeout(t, 1), Ln = Zt ? la : fa, $n = typeof navigator != "undefined" && navigator.connection, ls = !Zt && $n && ([
|
|
1208
1208
|
"slow-2g",
|
|
1209
1209
|
"2g"
|
|
1210
1210
|
].includes($n.effectiveType) || $n.saveData), sn = /* @__PURE__ */ new WeakMap(), Fn = (t, e) => ur.prototype.toString.call(t) === `[object ${e}]`;
|
|
@@ -1332,7 +1332,7 @@ const fs = (t, e) => {
|
|
|
1332
1332
|
t[n][0] && t[n][0](e);
|
|
1333
1333
|
}, Xa = (t, e) => {
|
|
1334
1334
|
if (!Pe.has(t)) {
|
|
1335
|
-
const n = Me(
|
|
1335
|
+
const n = Me(Ka, e), r = {}, s = Ms.bind(ee, t);
|
|
1336
1336
|
let a = De;
|
|
1337
1337
|
const i = {}, o = (h, p) => {
|
|
1338
1338
|
const k = i[h] || [];
|
|
@@ -1478,11 +1478,11 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1478
1478
|
isLoading: !0
|
|
1479
1479
|
}, Oe) : Oe;
|
|
1480
1480
|
}, G = M(), W = le(), ye = Z(G), ot = G === W ? ye : Z(W);
|
|
1481
|
-
let
|
|
1481
|
+
let K = ye;
|
|
1482
1482
|
return [
|
|
1483
1483
|
() => {
|
|
1484
1484
|
const Y = Z(M());
|
|
1485
|
-
return Dr(Y,
|
|
1485
|
+
return Dr(Y, K) ? (K.data = Y.data, K.isLoading = Y.isLoading, K.isValidating = Y.isValidating, K.error = Y.error, K) : (K = Y, Y);
|
|
1486
1486
|
},
|
|
1487
1487
|
() => ot
|
|
1488
1488
|
];
|
|
@@ -1504,7 +1504,7 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1504
1504
|
if (!m || !Z || q.current || $().isPaused())
|
|
1505
1505
|
return !1;
|
|
1506
1506
|
let G, W, ye = !0;
|
|
1507
|
-
const ot = j || {},
|
|
1507
|
+
const ot = j || {}, K = !l[m] || !ot.dedupe, Y = () => ds ? !q.current && m === D.current && R.current : m === D.current, Oe = {
|
|
1508
1508
|
isValidating: !1,
|
|
1509
1509
|
isLoading: !1
|
|
1510
1510
|
}, zr = () => {
|
|
@@ -1517,26 +1517,26 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1517
1517
|
};
|
|
1518
1518
|
N(M().data) && (Ur.isLoading = !0);
|
|
1519
1519
|
try {
|
|
1520
|
-
if (
|
|
1520
|
+
if (K && (rt(Ur), n.loadingTimeout && N(M().data) && setTimeout(() => {
|
|
1521
1521
|
ye && Y() && $().onLoadingSlow(m, n);
|
|
1522
1522
|
}, n.loadingTimeout), l[m] = [
|
|
1523
1523
|
Z(z),
|
|
1524
1524
|
pr()
|
|
1525
|
-
]), [G, W] = l[m], G = yield G,
|
|
1526
|
-
return
|
|
1525
|
+
]), [G, W] = l[m], G = yield G, K && setTimeout(Vr, n.dedupingInterval), !l[m] || l[m][1] !== W)
|
|
1526
|
+
return K && Y() && $().onDiscarded(m), !1;
|
|
1527
1527
|
Oe.error = ee;
|
|
1528
1528
|
const ce = b[m];
|
|
1529
1529
|
if (!N(ce) && // case 1
|
|
1530
1530
|
(W <= ce[0] || // case 2
|
|
1531
1531
|
W <= ce[1] || // case 3
|
|
1532
1532
|
ce[1] === 0))
|
|
1533
|
-
return zr(),
|
|
1533
|
+
return zr(), K && Y() && $().onDiscarded(m), !1;
|
|
1534
1534
|
const Te = M().data;
|
|
1535
|
-
Oe.data = s(Te, G) ? Te : G,
|
|
1535
|
+
Oe.data = s(Te, G) ? Te : G, K && Y() && $().onSuccess(G, m, n);
|
|
1536
1536
|
} catch (ce) {
|
|
1537
1537
|
Vr();
|
|
1538
1538
|
const Te = $(), { shouldRetryOnError: Nn } = Te;
|
|
1539
|
-
Te.isPaused() || (Oe.error = ce,
|
|
1539
|
+
Te.isPaused() || (Oe.error = ce, K && Y() && (Te.onError(ce, m, Te), (Nn === !0 || be(Nn) && Nn(ce)) && (!$().revalidateOnFocus || !$().revalidateOnReconnect || Se()) && Te.onErrorRetry(ce, m, Te, (ra) => {
|
|
1540
1540
|
const Pn = g[m];
|
|
1541
1541
|
Pn && Pn[0] && Pn[0](us, ra);
|
|
1542
1542
|
}, {
|
|
@@ -1575,8 +1575,8 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1575
1575
|
let Z = 0;
|
|
1576
1576
|
const W = fi(m, g, (ye, ot = {}) => {
|
|
1577
1577
|
if (ye == Rs) {
|
|
1578
|
-
const
|
|
1579
|
-
$().revalidateOnFocus &&
|
|
1578
|
+
const K = Date.now();
|
|
1579
|
+
$().revalidateOnFocus && K > Z && Se() && (Z = K + $().focusThrottleInterval, j());
|
|
1580
1580
|
} else if (ye == Is)
|
|
1581
1581
|
$().revalidateOnReconnect && Se() && j();
|
|
1582
1582
|
else {
|
|
@@ -1588,7 +1588,7 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1588
1588
|
});
|
|
1589
1589
|
return q.current = !1, D.current = m, R.current = !0, rt({
|
|
1590
1590
|
_k: z
|
|
1591
|
-
}), $r && (N(Ve) || Zt ? j() :
|
|
1591
|
+
}), $r && (N(Ve) || Zt ? j() : Ha(j)), () => {
|
|
1592
1592
|
q.current = !0, W();
|
|
1593
1593
|
};
|
|
1594
1594
|
}, [
|
|
@@ -2209,7 +2209,7 @@ class T {
|
|
|
2209
2209
|
}
|
|
2210
2210
|
catch(e) {
|
|
2211
2211
|
const n = typeof e == "function" ? e : () => e;
|
|
2212
|
-
return new
|
|
2212
|
+
return new Kt(x(d({}, O(this._def)), {
|
|
2213
2213
|
innerType: this,
|
|
2214
2214
|
catchValue: n,
|
|
2215
2215
|
typeName: E.ZodCatch
|
|
@@ -2225,7 +2225,7 @@ class T {
|
|
|
2225
2225
|
return Xt.create(this, e);
|
|
2226
2226
|
}
|
|
2227
2227
|
readonly() {
|
|
2228
|
-
return
|
|
2228
|
+
return Ht.create(this);
|
|
2229
2229
|
}
|
|
2230
2230
|
isOptional() {
|
|
2231
2231
|
return this.safeParse(void 0).success;
|
|
@@ -3553,7 +3553,7 @@ Ft.create = (t, e) => new Ft(d({
|
|
|
3553
3553
|
options: t,
|
|
3554
3554
|
typeName: E.ZodUnion
|
|
3555
3555
|
}, O(e)));
|
|
3556
|
-
const Ie = (t) => t instanceof Vt ? Ie(t.schema) : t instanceof me ? Ie(t.innerType()) : t instanceof Ut ? [t.value] : t instanceof Fe ? t.options : t instanceof Bt ? C.objectValues(t.enum) : t instanceof qt ? Ie(t._def.innerType) : t instanceof Lt ? [void 0] : t instanceof $t ? [null] : t instanceof we ? [void 0, ...Ie(t.unwrap())] : t instanceof We ? [null, ...Ie(t.unwrap())] : t instanceof Rr || t instanceof
|
|
3556
|
+
const Ie = (t) => t instanceof Vt ? Ie(t.schema) : t instanceof me ? Ie(t.innerType()) : t instanceof Ut ? [t.value] : t instanceof Fe ? t.options : t instanceof Bt ? C.objectValues(t.enum) : t instanceof qt ? Ie(t._def.innerType) : t instanceof Lt ? [void 0] : t instanceof $t ? [null] : t instanceof we ? [void 0, ...Ie(t.unwrap())] : t instanceof We ? [null, ...Ie(t.unwrap())] : t instanceof Rr || t instanceof Ht ? Ie(t.unwrap()) : t instanceof Kt ? Ie(t._def.innerType) : [];
|
|
3557
3557
|
class An extends T {
|
|
3558
3558
|
_parse(e) {
|
|
3559
3559
|
const { ctx: n } = this._processInputParams(e);
|
|
@@ -4251,7 +4251,7 @@ qt.create = (t, e) => new qt(d({
|
|
|
4251
4251
|
typeName: E.ZodDefault,
|
|
4252
4252
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default
|
|
4253
4253
|
}, O(e)));
|
|
4254
|
-
class
|
|
4254
|
+
class Kt extends T {
|
|
4255
4255
|
_parse(e) {
|
|
4256
4256
|
const { ctx: n } = this._processInputParams(e), r = x(d({}, n), {
|
|
4257
4257
|
common: x(d({}, n.common), {
|
|
@@ -4284,7 +4284,7 @@ class Ht extends T {
|
|
|
4284
4284
|
return this._def.innerType;
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
|
-
|
|
4287
|
+
Kt.create = (t, e) => new Kt(d({
|
|
4288
4288
|
innerType: t,
|
|
4289
4289
|
typeName: E.ZodCatch,
|
|
4290
4290
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch
|
|
@@ -4359,7 +4359,7 @@ class Xt extends T {
|
|
|
4359
4359
|
});
|
|
4360
4360
|
}
|
|
4361
4361
|
}
|
|
4362
|
-
class
|
|
4362
|
+
class Ht extends T {
|
|
4363
4363
|
_parse(e) {
|
|
4364
4364
|
const n = this._def.innerType._parse(e), r = (s) => (et(s) && (s.value = Object.freeze(s.value)), s);
|
|
4365
4365
|
return Dt(n) ? n.then((s) => r(s)) : r(n);
|
|
@@ -4368,7 +4368,7 @@ class Kt extends T {
|
|
|
4368
4368
|
return this._def.innerType;
|
|
4369
4369
|
}
|
|
4370
4370
|
}
|
|
4371
|
-
|
|
4371
|
+
Ht.create = (t, e) => new Ht(d({
|
|
4372
4372
|
innerType: t,
|
|
4373
4373
|
typeName: E.ZodReadonly
|
|
4374
4374
|
}, O(e)));
|
|
@@ -4390,7 +4390,7 @@ var E;
|
|
|
4390
4390
|
})(E || (E = {}));
|
|
4391
4391
|
const qi = (t, e = {
|
|
4392
4392
|
message: `Input not instance of ${t.name}`
|
|
4393
|
-
}) => qs((n) => n instanceof t, e),
|
|
4393
|
+
}) => qs((n) => n instanceof t, e), Ks = he.create, Hs = Le.create, Ki = En.create, Hi = $e.create, Gs = Mt.create, Gi = tt.create, Ji = bn.create, Xi = Lt.create, Yi = $t.create, Qi = _t.create, eo = Xe.create, to = Re.create, no = wn.create, ro = pe.create, so = F.create, ao = F.strictCreate, io = Ft.create, oo = An.create, uo = Wt.create, co = xe.create, lo = zt.create, fo = kn.create, ho = nt.create, po = pt.create, mo = Vt.create, yo = Ut.create, go = Fe.create, _o = Bt.create, vo = vt.create, ys = me.create, bo = we.create, wo = We.create, ko = me.createWithPreprocess, Eo = Xt.create, xo = () => Ks().optional(), So = () => Hs().optional(), Oo = () => Gs().optional(), To = {
|
|
4394
4394
|
string: (t) => he.create(x(d({}, t), { coerce: !0 })),
|
|
4395
4395
|
number: (t) => Le.create(x(d({}, t), { coerce: !0 })),
|
|
4396
4396
|
boolean: (t) => Mt.create(x(d({}, t), {
|
|
@@ -4399,7 +4399,7 @@ const qi = (t, e = {
|
|
|
4399
4399
|
bigint: (t) => $e.create(x(d({}, t), { coerce: !0 })),
|
|
4400
4400
|
date: (t) => tt.create(x(d({}, t), { coerce: !0 }))
|
|
4401
4401
|
}, Ao = S;
|
|
4402
|
-
var
|
|
4402
|
+
var H = /* @__PURE__ */ Object.freeze({
|
|
4403
4403
|
__proto__: null,
|
|
4404
4404
|
defaultErrorMap: gt,
|
|
4405
4405
|
setErrorMap: wi,
|
|
@@ -4457,12 +4457,12 @@ var K = /* @__PURE__ */ Object.freeze({
|
|
|
4457
4457
|
ZodOptional: we,
|
|
4458
4458
|
ZodNullable: We,
|
|
4459
4459
|
ZodDefault: qt,
|
|
4460
|
-
ZodCatch:
|
|
4460
|
+
ZodCatch: Kt,
|
|
4461
4461
|
ZodNaN: En,
|
|
4462
4462
|
BRAND: Ui,
|
|
4463
4463
|
ZodBranded: Rr,
|
|
4464
4464
|
ZodPipeline: Xt,
|
|
4465
|
-
ZodReadonly:
|
|
4465
|
+
ZodReadonly: Ht,
|
|
4466
4466
|
custom: qs,
|
|
4467
4467
|
Schema: T,
|
|
4468
4468
|
ZodSchema: T,
|
|
@@ -4473,7 +4473,7 @@ var K = /* @__PURE__ */ Object.freeze({
|
|
|
4473
4473
|
coerce: To,
|
|
4474
4474
|
any: Qi,
|
|
4475
4475
|
array: ro,
|
|
4476
|
-
bigint:
|
|
4476
|
+
bigint: Hi,
|
|
4477
4477
|
boolean: Gs,
|
|
4478
4478
|
date: Gi,
|
|
4479
4479
|
discriminatedUnion: oo,
|
|
@@ -4485,12 +4485,12 @@ var K = /* @__PURE__ */ Object.freeze({
|
|
|
4485
4485
|
lazy: mo,
|
|
4486
4486
|
literal: yo,
|
|
4487
4487
|
map: fo,
|
|
4488
|
-
nan:
|
|
4488
|
+
nan: Ki,
|
|
4489
4489
|
nativeEnum: _o,
|
|
4490
4490
|
never: to,
|
|
4491
4491
|
null: Yi,
|
|
4492
4492
|
nullable: wo,
|
|
4493
|
-
number:
|
|
4493
|
+
number: Hs,
|
|
4494
4494
|
object: so,
|
|
4495
4495
|
oboolean: Oo,
|
|
4496
4496
|
onumber: So,
|
|
@@ -4502,7 +4502,7 @@ var K = /* @__PURE__ */ Object.freeze({
|
|
|
4502
4502
|
record: lo,
|
|
4503
4503
|
set: ho,
|
|
4504
4504
|
strictObject: ao,
|
|
4505
|
-
string:
|
|
4505
|
+
string: Ks,
|
|
4506
4506
|
symbol: Ji,
|
|
4507
4507
|
transformer: ys,
|
|
4508
4508
|
tuple: co,
|
|
@@ -4515,15 +4515,15 @@ var K = /* @__PURE__ */ Object.freeze({
|
|
|
4515
4515
|
quotelessJson: bi,
|
|
4516
4516
|
ZodError: ie
|
|
4517
4517
|
});
|
|
4518
|
-
|
|
4519
|
-
language:
|
|
4520
|
-
disableMarkedForExport:
|
|
4518
|
+
H.object({
|
|
4519
|
+
language: H.enum(["typescript", "javascript"]).optional(),
|
|
4520
|
+
disableMarkedForExport: H.boolean().optional()
|
|
4521
4521
|
}).and(
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
framework:
|
|
4525
|
-
model:
|
|
4526
|
-
styling:
|
|
4522
|
+
H.union([
|
|
4523
|
+
H.object({
|
|
4524
|
+
framework: H.literal("react"),
|
|
4525
|
+
model: H.string().optional(),
|
|
4526
|
+
styling: H.enum([
|
|
4527
4527
|
"plain_css",
|
|
4528
4528
|
"css_modules",
|
|
4529
4529
|
"styled_components",
|
|
@@ -4532,16 +4532,16 @@ K.object({
|
|
|
4532
4532
|
"scss",
|
|
4533
4533
|
"inline_styles"
|
|
4534
4534
|
]),
|
|
4535
|
-
uiLibrary:
|
|
4536
|
-
enableUILibraryTheming:
|
|
4537
|
-
enableCompactStructure:
|
|
4538
|
-
enableAutoSplit:
|
|
4539
|
-
autoSplitThreshold:
|
|
4535
|
+
uiLibrary: H.enum(["mui", "antd", "radix", "shadcn"]).optional(),
|
|
4536
|
+
enableUILibraryTheming: H.boolean().optional(),
|
|
4537
|
+
enableCompactStructure: H.boolean().optional(),
|
|
4538
|
+
enableAutoSplit: H.boolean().optional(),
|
|
4539
|
+
autoSplitThreshold: H.number().optional()
|
|
4540
4540
|
}),
|
|
4541
|
-
|
|
4542
|
-
framework:
|
|
4543
|
-
styling:
|
|
4544
|
-
enableTranslation:
|
|
4541
|
+
H.object({
|
|
4542
|
+
framework: H.literal("html"),
|
|
4543
|
+
styling: H.enum(["plain_css", "inline_styles"]),
|
|
4544
|
+
enableTranslation: H.boolean().optional()
|
|
4545
4545
|
})
|
|
4546
4546
|
])
|
|
4547
4547
|
);
|
|
@@ -4718,7 +4718,7 @@ function ws(t, e, n, r = null) {
|
|
|
4718
4718
|
}
|
|
4719
4719
|
return t;
|
|
4720
4720
|
}
|
|
4721
|
-
const qo = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis,
|
|
4721
|
+
const qo = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis, Ko = typeof global != "undefined" && global !== null && global.Object === Object && global, Ho = typeof self != "undefined" && self !== null && self.Object === Object && self, Un = qo || Ko || Ho || Function("return this")();
|
|
4722
4722
|
function Go(t) {
|
|
4723
4723
|
return t.slice(0);
|
|
4724
4724
|
}
|