@object-ui/plugin-timeline 3.0.3 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,53 +1,53 @@
1
- import * as A from "react";
2
- import an, { useState as ce, useEffect as He, useCallback as cn } from "react";
3
- import { renderChildren as Xe, cn as j, NavigationOverlay as un } from "@object-ui/components";
4
- import { ComponentRegistry as Ie } from "@object-ui/core";
5
- import { useDataScope as ln, useNavigationOverlay as fn, useSchemaContext as dn } from "@object-ui/react";
6
- import { usePullToRefresh as pn } from "@object-ui/mobile";
7
- var ue = { exports: {} }, te = {};
8
- var Qe;
9
- function hn() {
10
- if (Qe) return te;
11
- Qe = 1;
1
+ import * as N from "react";
2
+ import un, { useState as ce, useEffect as Re, useCallback as ln } from "react";
3
+ import { renderChildren as Qe, cn as O, NavigationOverlay as dn, cva as wt } from "@object-ui/components";
4
+ import { ComponentRegistry as Me, buildExpandFields as fn, extractRecords as pn } from "@object-ui/core";
5
+ import { useDataScope as mn, useNavigationOverlay as hn, useSchemaContext as gn } from "@object-ui/react";
6
+ import { usePullToRefresh as _n } from "@object-ui/mobile";
7
+ var ge = { exports: {} }, ue = {};
8
+ var et;
9
+ function vn() {
10
+ if (et) return ue;
11
+ et = 1;
12
12
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
13
- function n(r, o, i) {
14
- var s = null;
15
- if (i !== void 0 && (s = "" + i), o.key !== void 0 && (s = "" + o.key), "key" in o) {
16
- i = {};
13
+ function n(r, o, s) {
14
+ var i = null;
15
+ if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
16
+ s = {};
17
17
  for (var a in o)
18
- a !== "key" && (i[a] = o[a]);
19
- } else i = o;
20
- return o = i.ref, {
18
+ a !== "key" && (s[a] = o[a]);
19
+ } else s = o;
20
+ return o = s.ref, {
21
21
  $$typeof: e,
22
22
  type: r,
23
- key: s,
23
+ key: i,
24
24
  ref: o !== void 0 ? o : null,
25
- props: i
25
+ props: s
26
26
  };
27
27
  }
28
- return te.Fragment = t, te.jsx = n, te.jsxs = n, te;
28
+ return ue.Fragment = t, ue.jsx = n, ue.jsxs = n, ue;
29
29
  }
30
- var ne = {};
31
- var et;
32
- function mn() {
33
- return et || (et = 1, process.env.NODE_ENV !== "production" && (function() {
30
+ var le = {};
31
+ var tt;
32
+ function yn() {
33
+ return tt || (tt = 1, process.env.NODE_ENV !== "production" && (function() {
34
34
  function e(l) {
35
35
  if (l == null) return null;
36
36
  if (typeof l == "function")
37
- return l.$$typeof === J ? null : l.displayName || l.name || null;
37
+ return l.$$typeof === P ? null : l.displayName || l.name || null;
38
38
  if (typeof l == "string") return l;
39
39
  switch (l) {
40
- case b:
40
+ case w:
41
41
  return "Fragment";
42
- case ee:
42
+ case Y:
43
43
  return "Profiler";
44
44
  case M:
45
45
  return "StrictMode";
46
- case ie:
46
+ case me:
47
47
  return "Suspense";
48
- case N:
48
+ case H:
49
49
  return "SuspenseList";
50
- case ze:
50
+ case Ze:
51
51
  return "Activity";
52
52
  }
53
53
  if (typeof l == "object")
@@ -56,16 +56,16 @@ function mn() {
56
56
  ), l.$$typeof) {
57
57
  case y:
58
58
  return "Portal";
59
- case S:
59
+ case R:
60
60
  return l.displayName || "Context";
61
- case C:
61
+ case I:
62
62
  return (l._context.displayName || "Context") + ".Consumer";
63
- case P:
63
+ case A:
64
64
  var v = l.render;
65
65
  return l = l.displayName, l || (l = v.displayName || v.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
66
- case O:
66
+ case re:
67
67
  return v = l.displayName || null, v !== null ? v : e(l.type) || "Memo";
68
- case F:
68
+ case X:
69
69
  v = l._payload, l = l._init;
70
70
  try {
71
71
  return e(l(v));
@@ -86,17 +86,17 @@ function mn() {
86
86
  }
87
87
  if (v) {
88
88
  v = console;
89
- var T = v.error, Z = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
89
+ var T = v.error, S = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
90
90
  return T.call(
91
91
  v,
92
92
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
93
- Z
93
+ S
94
94
  ), t(l);
95
95
  }
96
96
  }
97
97
  function r(l) {
98
- if (l === b) return "<>";
99
- if (typeof l == "object" && l !== null && l.$$typeof === F)
98
+ if (l === w) return "<>";
99
+ if (typeof l == "object" && l !== null && l.$$typeof === X)
100
100
  return "<...>";
101
101
  try {
102
102
  var v = e(l);
@@ -106,14 +106,14 @@ function mn() {
106
106
  }
107
107
  }
108
108
  function o() {
109
- var l = ke.A;
109
+ var l = j.A;
110
110
  return l === null ? null : l.getOwner();
111
111
  }
112
- function i() {
112
+ function s() {
113
113
  return Error("react-stack-top-frame");
114
114
  }
115
- function s(l) {
116
- if (We.call(l, "key")) {
115
+ function i(l) {
116
+ if (F.call(l, "key")) {
117
117
  var v = Object.getOwnPropertyDescriptor(l, "key").get;
118
118
  if (v && v.isReactWarning) return !1;
119
119
  }
@@ -121,7 +121,7 @@ function mn() {
121
121
  }
122
122
  function a(l, v) {
123
123
  function T() {
124
- Ge || (Ge = !0, console.error(
124
+ se || (se = !0, console.error(
125
125
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
126
126
  v
127
127
  ));
@@ -133,19 +133,19 @@ function mn() {
133
133
  }
134
134
  function c() {
135
135
  var l = e(this.type);
136
- return Ye[l] || (Ye[l] = !0, console.error(
136
+ return ae[l] || (ae[l] = !0, console.error(
137
137
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
138
138
  )), l = this.props.ref, l !== void 0 ? l : null;
139
139
  }
140
- function f(l, v, T, Z, ae, Te) {
141
- var E = T.ref;
140
+ function d(l, v, T, S, he, Ee) {
141
+ var Z = T.ref;
142
142
  return l = {
143
- $$typeof: w,
143
+ $$typeof: b,
144
144
  type: l,
145
145
  key: v,
146
146
  props: T,
147
- _owner: Z
148
- }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(l, "ref", {
147
+ _owner: S
148
+ }, (Z !== void 0 ? Z : null) !== null ? Object.defineProperty(l, "ref", {
149
149
  enumerable: !1,
150
150
  get: c
151
151
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -162,69 +162,69 @@ function mn() {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
- value: ae
165
+ value: he
166
166
  }), Object.defineProperty(l, "_debugTask", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
- value: Te
170
+ value: Ee
171
171
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
172
172
  }
173
- function d(l, v, T, Z, ae, Te) {
174
- var E = v.children;
175
- if (E !== void 0)
176
- if (Z)
177
- if (on(E)) {
178
- for (Z = 0; Z < E.length; Z++)
179
- _(E[Z]);
180
- Object.freeze && Object.freeze(E);
173
+ function f(l, v, T, S, he, Ee) {
174
+ var Z = v.children;
175
+ if (Z !== void 0)
176
+ if (S)
177
+ if (oe(Z)) {
178
+ for (S = 0; S < Z.length; S++)
179
+ _(Z[S]);
180
+ Object.freeze && Object.freeze(Z);
181
181
  } else
182
182
  console.error(
183
183
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
184
184
  );
185
- else _(E);
186
- if (We.call(v, "key")) {
187
- E = e(l);
188
- var K = Object.keys(v).filter(function(sn) {
189
- return sn !== "key";
185
+ else _(Z);
186
+ if (F.call(v, "key")) {
187
+ Z = e(l);
188
+ var Q = Object.keys(v).filter(function(cn) {
189
+ return cn !== "key";
190
190
  });
191
- Z = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", Ke[E + Z] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
191
+ S = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", Xe[Z + S] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
192
192
  `A props object containing a "key" prop is being spread into JSX:
193
193
  let props = %s;
194
194
  <%s {...props} />
195
195
  React keys must be passed directly to JSX without using spread:
196
196
  let props = %s;
197
197
  <%s key={someKey} {...props} />`,
198
+ S,
198
199
  Z,
199
- E,
200
- K,
201
- E
202
- ), Ke[E + Z] = !0);
200
+ Q,
201
+ Z
202
+ ), Xe[Z + S] = !0);
203
203
  }
204
- if (E = null, T !== void 0 && (n(T), E = "" + T), s(v) && (n(v.key), E = "" + v.key), "key" in v) {
204
+ if (Z = null, T !== void 0 && (n(T), Z = "" + T), i(v) && (n(v.key), Z = "" + v.key), "key" in v) {
205
205
  T = {};
206
- for (var Oe in v)
207
- Oe !== "key" && (T[Oe] = v[Oe]);
206
+ for (var xe in v)
207
+ xe !== "key" && (T[xe] = v[xe]);
208
208
  } else T = v;
209
- return E && a(
209
+ return Z && a(
210
210
  T,
211
211
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
212
- ), f(
212
+ ), d(
213
213
  l,
214
- E,
214
+ Z,
215
215
  T,
216
216
  o(),
217
- ae,
218
- Te
217
+ he,
218
+ Ee
219
219
  );
220
220
  }
221
221
  function _(l) {
222
- m(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === F && (l._payload.status === "fulfilled" ? m(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
222
+ h(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === X && (l._payload.status === "fulfilled" ? h(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
223
223
  }
224
- function m(l) {
225
- return typeof l == "object" && l !== null && l.$$typeof === w;
224
+ function h(l) {
225
+ return typeof l == "object" && l !== null && l.$$typeof === b;
226
226
  }
227
- var p = an, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), ee = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), S = /* @__PURE__ */ Symbol.for("react.context"), P = /* @__PURE__ */ Symbol.for("react.forward_ref"), ie = /* @__PURE__ */ Symbol.for("react.suspense"), N = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), F = /* @__PURE__ */ Symbol.for("react.lazy"), ze = /* @__PURE__ */ Symbol.for("react.activity"), J = /* @__PURE__ */ Symbol.for("react.client.reference"), ke = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, We = Object.prototype.hasOwnProperty, on = Array.isArray, $e = console.createTask ? console.createTask : function() {
227
+ var p = un, b = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), w = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), Y = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.consumer"), R = /* @__PURE__ */ Symbol.for("react.context"), A = /* @__PURE__ */ Symbol.for("react.forward_ref"), me = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), re = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), Ze = /* @__PURE__ */ Symbol.for("react.activity"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), j = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, oe = Array.isArray, ie = console.createTask ? console.createTask : function() {
228
228
  return null;
229
229
  };
230
230
  p = {
@@ -232,56 +232,56 @@ React keys must be passed directly to JSX without using spread:
232
232
  return l();
233
233
  }
234
234
  };
235
- var Ge, Ye = {}, Be = p.react_stack_bottom_frame.bind(
235
+ var se, ae = {}, U = p.react_stack_bottom_frame.bind(
236
236
  p,
237
- i
238
- )(), qe = $e(r(i)), Ke = {};
239
- ne.Fragment = b, ne.jsx = function(l, v, T) {
240
- var Z = 1e4 > ke.recentlyCreatedOwnerStacks++;
241
- return d(
237
+ s
238
+ )(), He = ie(r(s)), Xe = {};
239
+ le.Fragment = w, le.jsx = function(l, v, T) {
240
+ var S = 1e4 > j.recentlyCreatedOwnerStacks++;
241
+ return f(
242
242
  l,
243
243
  v,
244
244
  T,
245
245
  !1,
246
- Z ? Error("react-stack-top-frame") : Be,
247
- Z ? $e(r(l)) : qe
246
+ S ? Error("react-stack-top-frame") : U,
247
+ S ? ie(r(l)) : He
248
248
  );
249
- }, ne.jsxs = function(l, v, T) {
250
- var Z = 1e4 > ke.recentlyCreatedOwnerStacks++;
251
- return d(
249
+ }, le.jsxs = function(l, v, T) {
250
+ var S = 1e4 > j.recentlyCreatedOwnerStacks++;
251
+ return f(
252
252
  l,
253
253
  v,
254
254
  T,
255
255
  !0,
256
- Z ? Error("react-stack-top-frame") : Be,
257
- Z ? $e(r(l)) : qe
256
+ S ? Error("react-stack-top-frame") : U,
257
+ S ? ie(r(l)) : He
258
258
  );
259
259
  };
260
- })()), ne;
260
+ })()), le;
261
261
  }
262
- var tt;
263
- function gn() {
264
- return tt || (tt = 1, process.env.NODE_ENV === "production" ? ue.exports = hn() : ue.exports = mn()), ue.exports;
262
+ var nt;
263
+ function bn() {
264
+ return nt || (nt = 1, process.env.NODE_ENV === "production" ? ge.exports = vn() : ge.exports = yn()), ge.exports;
265
265
  }
266
- var h = gn();
267
- const _n = 10080 * 60 * 1e3;
268
- function vn(e) {
266
+ var m = bn();
267
+ const wn = 10080 * 60 * 1e3;
268
+ function zn(e) {
269
269
  const t = e.flatMap(
270
- (o) => (o.items || []).flatMap((i) => [i.startDate, i.endDate])
270
+ (o) => (o.items || []).flatMap((s) => [s.startDate, s.endDate])
271
271
  ), n = Math.min(...t.map((o) => new Date(o).getTime())), r = Math.max(...t.map((o) => new Date(o).getTime()));
272
272
  return {
273
273
  minDate: new Date(n).toISOString().split("T")[0],
274
274
  maxDate: new Date(r).toISOString().split("T")[0]
275
275
  };
276
276
  }
277
- function yn(e, t, n, r) {
278
- const o = new Date(e).getTime(), i = new Date(t).getTime(), s = new Date(n).getTime(), c = new Date(r).getTime() - s, f = o - s, d = i - o;
277
+ function kn(e, t, n, r) {
278
+ const o = new Date(e).getTime(), s = new Date(t).getTime(), i = new Date(n).getTime(), c = new Date(r).getTime() - i, d = o - i, f = s - o;
279
279
  return {
280
- start: f / c * 100,
281
- width: d / c * 100
280
+ start: d / c * 100,
281
+ width: f / c * 100
282
282
  };
283
283
  }
284
- function le(e, t) {
284
+ function _e(e, t) {
285
285
  const n = new Date(e);
286
286
  return t === "short" ? n.toLocaleDateString() : t === "long" ? n.toLocaleDateString("en-US", {
287
287
  year: "numeric",
@@ -289,111 +289,111 @@ function le(e, t) {
289
289
  day: "numeric"
290
290
  }) : n.toISOString().split("T")[0];
291
291
  }
292
- const wt = ({ schema: e, className: t, ...n }) => {
292
+ const zt = ({ schema: e, className: t, ...n }) => {
293
293
  const {
294
294
  variant: r = "vertical",
295
295
  items: o = [],
296
- dateFormat: i = "short",
297
- onItemClick: s
296
+ dateFormat: s = "short",
297
+ onItemClick: i
298
298
  } = e;
299
299
  if (r === "vertical")
300
- return /* @__PURE__ */ h.jsx(Yt, { className: t, ...n, children: o.map((a, c) => /* @__PURE__ */ h.jsxs(Bt, { className: j(a.className, s && "cursor-pointer"), onClick: () => s?.(a), children: [
301
- /* @__PURE__ */ h.jsx(Ee, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ h.jsx("span", { className: "text-xs", children: a.icon }) }),
302
- /* @__PURE__ */ h.jsxs(qt, { children: [
303
- a.time && /* @__PURE__ */ h.jsx(Re, { dateTime: a.time, children: le(a.time, i) }),
304
- a.title && /* @__PURE__ */ h.jsx(xe, { children: a.title }),
305
- a.description && /* @__PURE__ */ h.jsx(Pe, { className: "line-clamp-2 sm:line-clamp-none", children: a.description }),
306
- a.content && Xe(a.content)
300
+ return /* @__PURE__ */ m.jsx(Kt, { className: t, ...n, children: o.map((a, c) => /* @__PURE__ */ m.jsxs(Ht, { className: O(a.className, i && "cursor-pointer"), onClick: () => i?.(a), children: [
301
+ /* @__PURE__ */ m.jsx(Ie, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ m.jsx("span", { className: "text-xs", children: a.icon }) }),
302
+ /* @__PURE__ */ m.jsxs(Xt, { children: [
303
+ a.time && /* @__PURE__ */ m.jsx(Ce, { dateTime: a.time, children: _e(a.time, s) }),
304
+ a.title && /* @__PURE__ */ m.jsx(Ae, { children: a.title }),
305
+ a.description && /* @__PURE__ */ m.jsx(Fe, { className: "line-clamp-2 sm:line-clamp-none", children: a.description }),
306
+ a.content && Qe(a.content)
307
307
  ] })
308
308
  ] }, c)) });
309
309
  if (r === "horizontal")
310
- return /* @__PURE__ */ h.jsx(Kt, { className: j("overflow-x-auto [-webkit-overflow-scrolling:touch]", t), ...n, children: o.map((a, c) => /* @__PURE__ */ h.jsxs(Ht, { className: j(a.className, s && "cursor-pointer"), onClick: () => s?.(a), children: [
311
- /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col items-center", children: [
312
- /* @__PURE__ */ h.jsx(Ee, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ h.jsx("span", { className: "text-xs", children: a.icon }) }),
313
- /* @__PURE__ */ h.jsxs("div", { className: "mt-4 text-center", children: [
314
- a.time && /* @__PURE__ */ h.jsx(Re, { dateTime: a.time, children: le(a.time, i) }),
315
- a.title && /* @__PURE__ */ h.jsx(xe, { children: a.title }),
316
- a.description && /* @__PURE__ */ h.jsx(Pe, { className: "text-center line-clamp-2 sm:line-clamp-none", children: a.description }),
317
- a.content && Xe(a.content)
310
+ return /* @__PURE__ */ m.jsx(Qt, { className: O("overflow-x-auto [-webkit-overflow-scrolling:touch]", t), ...n, children: o.map((a, c) => /* @__PURE__ */ m.jsxs(en, { className: O(a.className, i && "cursor-pointer"), onClick: () => i?.(a), children: [
311
+ /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col items-center", children: [
312
+ /* @__PURE__ */ m.jsx(Ie, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ m.jsx("span", { className: "text-xs", children: a.icon }) }),
313
+ /* @__PURE__ */ m.jsxs("div", { className: "mt-4 text-center", children: [
314
+ a.time && /* @__PURE__ */ m.jsx(Ce, { dateTime: a.time, children: _e(a.time, s) }),
315
+ a.title && /* @__PURE__ */ m.jsx(Ae, { children: a.title }),
316
+ a.description && /* @__PURE__ */ m.jsx(Fe, { className: "text-center line-clamp-2 sm:line-clamp-none", children: a.description }),
317
+ a.content && Qe(a.content)
318
318
  ] })
319
319
  ] }),
320
- c < o.length - 1 && /* @__PURE__ */ h.jsx("div", { className: "absolute left-full w-16 border-t-2 border-gray-200 top-3" })
320
+ c < o.length - 1 && /* @__PURE__ */ m.jsx("div", { className: "absolute left-full w-16 border-t-2 border-gray-200 top-3" })
321
321
  ] }, c)) });
322
322
  if (r === "gantt") {
323
- const a = vn(o), c = e.minDate || a.minDate, f = e.maxDate || a.maxDate, d = e.timeScale || "month", m = (() => {
324
- const p = [], w = new Date(c), y = new Date(f);
325
- if (d === "month") {
326
- const b = new Date(w);
327
- for (; b <= y; )
323
+ const a = zn(o), c = e.minDate || a.minDate, d = e.maxDate || a.maxDate, f = e.timeScale || "month", h = (() => {
324
+ const p = [], b = new Date(c), y = new Date(d);
325
+ if (f === "month") {
326
+ const w = new Date(b);
327
+ for (; w <= y; )
328
328
  p.push(
329
- b.toLocaleDateString("en-US", {
329
+ w.toLocaleDateString("en-US", {
330
330
  month: "short",
331
331
  year: "numeric"
332
332
  })
333
- ), b.setMonth(b.getMonth() + 1);
334
- } else if (d === "week") {
335
- const b = new Date(w);
336
- for (; b <= y; )
333
+ ), w.setMonth(w.getMonth() + 1);
334
+ } else if (f === "week") {
335
+ const w = new Date(b);
336
+ for (; w <= y; )
337
337
  p.push(
338
338
  `Week ${Math.ceil(
339
- (b.getTime() - w.getTime()) / _n
339
+ (w.getTime() - b.getTime()) / wn
340
340
  ) + 1}`
341
- ), b.setDate(b.getDate() + 7);
342
- } else if (d === "day") {
343
- const b = new Date(w);
344
- for (; b <= y; )
341
+ ), w.setDate(w.getDate() + 7);
342
+ } else if (f === "day") {
343
+ const w = new Date(b);
344
+ for (; w <= y; )
345
345
  p.push(
346
- b.toLocaleDateString("en-US", {
346
+ w.toLocaleDateString("en-US", {
347
347
  month: "short",
348
348
  day: "numeric"
349
349
  })
350
- ), b.setDate(b.getDate() + 1);
350
+ ), w.setDate(w.getDate() + 1);
351
351
  }
352
352
  return p;
353
353
  })();
354
- return /* @__PURE__ */ h.jsxs(Xt, { className: j("overflow-x-auto [-webkit-overflow-scrolling:touch]", t), ...n, children: [
355
- /* @__PURE__ */ h.jsxs(Qt, { children: [
356
- /* @__PURE__ */ h.jsx(Ne, { className: "flex items-center px-2 sm:px-4 py-2 sm:py-3", children: /* @__PURE__ */ h.jsx("span", { className: "font-semibold text-xs sm:text-sm", children: e.rowLabel || "Items" }) }),
357
- /* @__PURE__ */ h.jsx(De, { children: /* @__PURE__ */ h.jsx("div", { className: "flex h-full", children: m.map((p, w) => /* @__PURE__ */ h.jsx(
354
+ return /* @__PURE__ */ m.jsxs(tn, { className: O("overflow-x-auto [-webkit-overflow-scrolling:touch]", t), ...n, children: [
355
+ /* @__PURE__ */ m.jsxs(nn, { children: [
356
+ /* @__PURE__ */ m.jsx(Ue, { className: "flex items-center px-2 sm:px-4 py-2 sm:py-3", children: /* @__PURE__ */ m.jsx("span", { className: "font-semibold text-xs sm:text-sm", children: e.rowLabel || "Items" }) }),
357
+ /* @__PURE__ */ m.jsx(Le, { children: /* @__PURE__ */ m.jsx("div", { className: "flex h-full", children: h.map((p, b) => /* @__PURE__ */ m.jsx(
358
358
  "div",
359
359
  {
360
360
  className: "flex-1 px-1 sm:px-2 py-2 sm:py-3 border-r text-xs font-medium text-center",
361
361
  children: p
362
362
  },
363
- w
363
+ b
364
364
  )) }) })
365
365
  ] }),
366
- /* @__PURE__ */ h.jsx("div", { children: /* @__PURE__ */ h.jsxs("div", { className: "flex", children: [
367
- /* @__PURE__ */ h.jsx(Ne, { children: o.map((p, w) => /* @__PURE__ */ h.jsx(Ae, { children: /* @__PURE__ */ h.jsx(en, { title: p.label, className: "truncate", children: p.label }) }, w)) }),
368
- /* @__PURE__ */ h.jsx(De, { className: "relative", children: o.map((p, w) => /* @__PURE__ */ h.jsx(Ae, { className: "relative", children: (p.items || []).map((y, b) => {
369
- const M = yn(
366
+ /* @__PURE__ */ m.jsx("div", { children: /* @__PURE__ */ m.jsxs("div", { className: "flex", children: [
367
+ /* @__PURE__ */ m.jsx(Ue, { children: o.map((p, b) => /* @__PURE__ */ m.jsx(Je, { children: /* @__PURE__ */ m.jsx(rn, { title: p.label, className: "truncate", children: p.label }) }, b)) }),
368
+ /* @__PURE__ */ m.jsx(Le, { className: "relative", children: o.map((p, b) => /* @__PURE__ */ m.jsx(Je, { className: "relative", children: (p.items || []).map((y, w) => {
369
+ const M = kn(
370
370
  y.startDate,
371
371
  y.endDate,
372
372
  c,
373
- f
373
+ d
374
374
  );
375
- return /* @__PURE__ */ h.jsx(
376
- tn,
375
+ return /* @__PURE__ */ m.jsx(
376
+ on,
377
377
  {
378
378
  start: M.start,
379
379
  width: M.width,
380
380
  variant: y.variant || "default",
381
- onClick: () => s?.(y, p, w, b),
381
+ onClick: () => i?.(y, p, b, w),
382
382
  title: `${y.title || ""}
383
- ${le(y.startDate, i)} - ${le(y.endDate, i)}`,
384
- children: /* @__PURE__ */ h.jsx(nn, { children: y.title })
383
+ ${_e(y.startDate, s)} - ${_e(y.endDate, s)}`,
384
+ children: /* @__PURE__ */ m.jsx(sn, { children: y.title })
385
385
  },
386
- b
386
+ w
387
387
  );
388
- }) }, w)) })
388
+ }) }, b)) })
389
389
  ] }) })
390
390
  ] });
391
391
  }
392
392
  return null;
393
393
  };
394
- Ie.register(
394
+ Me.register(
395
395
  "timeline",
396
- wt,
396
+ zt,
397
397
  {
398
398
  namespace: "plugin-timeline",
399
399
  label: "Timeline",
@@ -590,57 +590,57 @@ function u(e, t, n) {
590
590
  if (a._zod || Object.defineProperty(a, "_zod", {
591
591
  value: {
592
592
  def: c,
593
- constr: s,
593
+ constr: i,
594
594
  traits: /* @__PURE__ */ new Set()
595
595
  },
596
596
  enumerable: !1
597
597
  }), a._zod.traits.has(e))
598
598
  return;
599
599
  a._zod.traits.add(e), t(a, c);
600
- const f = s.prototype, d = Object.keys(f);
601
- for (let _ = 0; _ < d.length; _++) {
602
- const m = d[_];
603
- m in a || (a[m] = f[m].bind(a));
600
+ const d = i.prototype, f = Object.keys(d);
601
+ for (let _ = 0; _ < f.length; _++) {
602
+ const h = f[_];
603
+ h in a || (a[h] = d[h].bind(a));
604
604
  }
605
605
  }
606
606
  const o = n?.Parent ?? Object;
607
- class i extends o {
607
+ class s extends o {
608
608
  }
609
- Object.defineProperty(i, "name", { value: e });
610
- function s(a) {
609
+ Object.defineProperty(s, "name", { value: e });
610
+ function i(a) {
611
611
  var c;
612
- const f = n?.Parent ? new i() : this;
613
- r(f, a), (c = f._zod).deferred ?? (c.deferred = []);
614
- for (const d of f._zod.deferred)
615
- d();
616
- return f;
612
+ const d = n?.Parent ? new s() : this;
613
+ r(d, a), (c = d._zod).deferred ?? (c.deferred = []);
614
+ for (const f of d._zod.deferred)
615
+ f();
616
+ return d;
617
617
  }
618
- return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
618
+ return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
619
619
  value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
620
- }), Object.defineProperty(s, "name", { value: e }), s;
620
+ }), Object.defineProperty(i, "name", { value: e }), i;
621
621
  }
622
- class X extends Error {
622
+ class te extends Error {
623
623
  constructor() {
624
624
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
625
625
  }
626
626
  }
627
- class bt extends Error {
627
+ class kt extends Error {
628
628
  constructor(t) {
629
629
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
630
630
  }
631
631
  }
632
- const zt = {};
633
- function Y(e) {
634
- return zt;
632
+ const $t = {};
633
+ function B(e) {
634
+ return $t;
635
635
  }
636
- function kt(e) {
636
+ function Tt(e) {
637
637
  const t = Object.values(e).filter((r) => typeof r == "number");
638
638
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
639
639
  }
640
- function je(e, t) {
640
+ function Pe(e, t) {
641
641
  return typeof t == "bigint" ? t.toString() : t;
642
642
  }
643
- function Ce(e) {
643
+ function Ve(e) {
644
644
  return {
645
645
  get value() {
646
646
  {
@@ -650,20 +650,20 @@ function Ce(e) {
650
650
  }
651
651
  };
652
652
  }
653
- function Fe(e) {
653
+ function We(e) {
654
654
  return e == null;
655
655
  }
656
- function Ue(e) {
656
+ function Ge(e) {
657
657
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
658
658
  return e.slice(t, n);
659
659
  }
660
- const nt = /* @__PURE__ */ Symbol("evaluating");
660
+ const rt = /* @__PURE__ */ Symbol("evaluating");
661
661
  function z(e, t, n) {
662
662
  let r;
663
663
  Object.defineProperty(e, t, {
664
664
  get() {
665
- if (r !== nt)
666
- return r === void 0 && (r = nt, r = n()), r;
665
+ if (r !== rt)
666
+ return r === void 0 && (r = rt, r = n()), r;
667
667
  },
668
668
  set(o) {
669
669
  Object.defineProperty(e, t, {
@@ -674,7 +674,7 @@ function z(e, t, n) {
674
674
  configurable: !0
675
675
  });
676
676
  }
677
- function q(e, t, n) {
677
+ function K(e, t, n) {
678
678
  Object.defineProperty(e, t, {
679
679
  value: n,
680
680
  writable: !0,
@@ -690,18 +690,18 @@ function W(...e) {
690
690
  }
691
691
  return Object.defineProperties({}, t);
692
692
  }
693
- function rt(e) {
693
+ function ot(e) {
694
694
  return JSON.stringify(e);
695
695
  }
696
- function wn(e) {
696
+ function $n(e) {
697
697
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
698
698
  }
699
- const $t = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
699
+ const jt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
700
700
  };
701
- function he(e) {
701
+ function we(e) {
702
702
  return typeof e == "object" && e !== null && !Array.isArray(e);
703
703
  }
704
- const bn = Ce(() => {
704
+ const Tn = Ve(() => {
705
705
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
706
706
  return !1;
707
707
  try {
@@ -711,20 +711,20 @@ const bn = Ce(() => {
711
711
  return !1;
712
712
  }
713
713
  });
714
- function oe(e) {
715
- if (he(e) === !1)
714
+ function fe(e) {
715
+ if (we(e) === !1)
716
716
  return !1;
717
717
  const t = e.constructor;
718
718
  if (t === void 0 || typeof t != "function")
719
719
  return !0;
720
720
  const n = t.prototype;
721
- return !(he(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
721
+ return !(we(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
722
722
  }
723
- function Tt(e) {
724
- return oe(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
723
+ function Ot(e) {
724
+ return fe(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
725
725
  }
726
- const zn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
727
- function ve(e) {
726
+ const jn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
727
+ function Te(e) {
728
728
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
729
729
  }
730
730
  function G(e, t, n) {
@@ -744,79 +744,79 @@ function g(e) {
744
744
  }
745
745
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
746
746
  }
747
- function kn(e) {
747
+ function On(e) {
748
748
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
749
749
  }
750
- function $n(e, t) {
750
+ function Sn(e, t) {
751
751
  const n = e._zod.def, r = n.checks;
752
752
  if (r && r.length > 0)
753
753
  throw new Error(".pick() cannot be used on object schemas containing refinements");
754
- const i = W(e._zod.def, {
754
+ const s = W(e._zod.def, {
755
755
  get shape() {
756
- const s = {};
756
+ const i = {};
757
757
  for (const a in t) {
758
758
  if (!(a in n.shape))
759
759
  throw new Error(`Unrecognized key: "${a}"`);
760
- t[a] && (s[a] = n.shape[a]);
760
+ t[a] && (i[a] = n.shape[a]);
761
761
  }
762
- return q(this, "shape", s), s;
762
+ return K(this, "shape", i), i;
763
763
  },
764
764
  checks: []
765
765
  });
766
- return G(e, i);
766
+ return G(e, s);
767
767
  }
768
- function Tn(e, t) {
768
+ function Zn(e, t) {
769
769
  const n = e._zod.def, r = n.checks;
770
770
  if (r && r.length > 0)
771
771
  throw new Error(".omit() cannot be used on object schemas containing refinements");
772
- const i = W(e._zod.def, {
772
+ const s = W(e._zod.def, {
773
773
  get shape() {
774
- const s = { ...e._zod.def.shape };
774
+ const i = { ...e._zod.def.shape };
775
775
  for (const a in t) {
776
776
  if (!(a in n.shape))
777
777
  throw new Error(`Unrecognized key: "${a}"`);
778
- t[a] && delete s[a];
778
+ t[a] && delete i[a];
779
779
  }
780
- return q(this, "shape", s), s;
780
+ return K(this, "shape", i), i;
781
781
  },
782
782
  checks: []
783
783
  });
784
- return G(e, i);
784
+ return G(e, s);
785
785
  }
786
- function On(e, t) {
787
- if (!oe(t))
786
+ function En(e, t) {
787
+ if (!fe(t))
788
788
  throw new Error("Invalid input to extend: expected a plain object");
789
789
  const n = e._zod.def.checks;
790
790
  if (n && n.length > 0) {
791
- const i = e._zod.def.shape;
792
- for (const s in t)
793
- if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
791
+ const s = e._zod.def.shape;
792
+ for (const i in t)
793
+ if (Object.getOwnPropertyDescriptor(s, i) !== void 0)
794
794
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
795
795
  }
796
796
  const o = W(e._zod.def, {
797
797
  get shape() {
798
- const i = { ...e._zod.def.shape, ...t };
799
- return q(this, "shape", i), i;
798
+ const s = { ...e._zod.def.shape, ...t };
799
+ return K(this, "shape", s), s;
800
800
  }
801
801
  });
802
802
  return G(e, o);
803
803
  }
804
- function jn(e, t) {
805
- if (!oe(t))
804
+ function xn(e, t) {
805
+ if (!fe(t))
806
806
  throw new Error("Invalid input to safeExtend: expected a plain object");
807
807
  const n = W(e._zod.def, {
808
808
  get shape() {
809
809
  const r = { ...e._zod.def.shape, ...t };
810
- return q(this, "shape", r), r;
810
+ return K(this, "shape", r), r;
811
811
  }
812
812
  });
813
813
  return G(e, n);
814
814
  }
815
- function Sn(e, t) {
815
+ function Rn(e, t) {
816
816
  const n = W(e._zod.def, {
817
817
  get shape() {
818
818
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
819
- return q(this, "shape", r), r;
819
+ return K(this, "shape", r), r;
820
820
  },
821
821
  get catchall() {
822
822
  return t._zod.def.catchall;
@@ -826,59 +826,59 @@ function Sn(e, t) {
826
826
  });
827
827
  return G(e, n);
828
828
  }
829
- function Zn(e, t, n) {
829
+ function Pn(e, t, n) {
830
830
  const o = t._zod.def.checks;
831
831
  if (o && o.length > 0)
832
832
  throw new Error(".partial() cannot be used on object schemas containing refinements");
833
- const s = W(t._zod.def, {
833
+ const i = W(t._zod.def, {
834
834
  get shape() {
835
835
  const a = t._zod.def.shape, c = { ...a };
836
836
  if (n)
837
- for (const f in n) {
838
- if (!(f in a))
839
- throw new Error(`Unrecognized key: "${f}"`);
840
- n[f] && (c[f] = e ? new e({
837
+ for (const d in n) {
838
+ if (!(d in a))
839
+ throw new Error(`Unrecognized key: "${d}"`);
840
+ n[d] && (c[d] = e ? new e({
841
841
  type: "optional",
842
- innerType: a[f]
843
- }) : a[f]);
842
+ innerType: a[d]
843
+ }) : a[d]);
844
844
  }
845
845
  else
846
- for (const f in a)
847
- c[f] = e ? new e({
846
+ for (const d in a)
847
+ c[d] = e ? new e({
848
848
  type: "optional",
849
- innerType: a[f]
850
- }) : a[f];
851
- return q(this, "shape", c), c;
849
+ innerType: a[d]
850
+ }) : a[d];
851
+ return K(this, "shape", c), c;
852
852
  },
853
853
  checks: []
854
854
  });
855
- return G(t, s);
855
+ return G(t, i);
856
856
  }
857
- function En(e, t, n) {
857
+ function Dn(e, t, n) {
858
858
  const r = W(t._zod.def, {
859
859
  get shape() {
860
- const o = t._zod.def.shape, i = { ...o };
860
+ const o = t._zod.def.shape, s = { ...o };
861
861
  if (n)
862
- for (const s in n) {
863
- if (!(s in i))
864
- throw new Error(`Unrecognized key: "${s}"`);
865
- n[s] && (i[s] = new e({
862
+ for (const i in n) {
863
+ if (!(i in s))
864
+ throw new Error(`Unrecognized key: "${i}"`);
865
+ n[i] && (s[i] = new e({
866
866
  type: "nonoptional",
867
- innerType: o[s]
867
+ innerType: o[i]
868
868
  }));
869
869
  }
870
870
  else
871
- for (const s in o)
872
- i[s] = new e({
871
+ for (const i in o)
872
+ s[i] = new e({
873
873
  type: "nonoptional",
874
- innerType: o[s]
874
+ innerType: o[i]
875
875
  });
876
- return q(this, "shape", i), i;
876
+ return K(this, "shape", s), s;
877
877
  }
878
878
  });
879
879
  return G(t, r);
880
880
  }
881
- function H(e, t = 0) {
881
+ function ee(e, t = 0) {
882
882
  if (e.aborted === !0)
883
883
  return !0;
884
884
  for (let n = t; n < e.issues.length; n++)
@@ -886,27 +886,27 @@ function H(e, t = 0) {
886
886
  return !0;
887
887
  return !1;
888
888
  }
889
- function Ot(e, t) {
889
+ function St(e, t) {
890
890
  return t.map((n) => {
891
891
  var r;
892
892
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
893
893
  });
894
894
  }
895
- function fe(e) {
895
+ function ve(e) {
896
896
  return typeof e == "string" ? e : e?.message;
897
897
  }
898
- function B(e, t, n) {
898
+ function q(e, t, n) {
899
899
  const r = { ...e, path: e.path ?? [] };
900
900
  if (!e.message) {
901
- const o = fe(e.inst?._zod.def?.error?.(e)) ?? fe(t?.error?.(e)) ?? fe(n.customError?.(e)) ?? fe(n.localeError?.(e)) ?? "Invalid input";
901
+ const o = ve(e.inst?._zod.def?.error?.(e)) ?? ve(t?.error?.(e)) ?? ve(n.customError?.(e)) ?? ve(n.localeError?.(e)) ?? "Invalid input";
902
902
  r.message = o;
903
903
  }
904
904
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
905
905
  }
906
- function Le(e) {
906
+ function Ye(e) {
907
907
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
908
908
  }
909
- function se(...e) {
909
+ function pe(...e) {
910
910
  const [t, n, r] = e;
911
911
  return typeof t == "string" ? {
912
912
  message: t,
@@ -915,118 +915,118 @@ function se(...e) {
915
915
  inst: r
916
916
  } : { ...t };
917
917
  }
918
- const jt = (e, t) => {
918
+ const Zt = (e, t) => {
919
919
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
920
920
  value: e._zod,
921
921
  enumerable: !1
922
922
  }), Object.defineProperty(e, "issues", {
923
923
  value: t,
924
924
  enumerable: !1
925
- }), e.message = JSON.stringify(t, je, 2), Object.defineProperty(e, "toString", {
925
+ }), e.message = JSON.stringify(t, Pe, 2), Object.defineProperty(e, "toString", {
926
926
  value: () => e.message,
927
927
  enumerable: !1
928
928
  });
929
- }, St = u("$ZodError", jt), Zt = u("$ZodError", jt, { Parent: Error });
930
- function xn(e, t = (n) => n.message) {
929
+ }, Et = u("$ZodError", Zt), xt = u("$ZodError", Zt, { Parent: Error });
930
+ function Nn(e, t = (n) => n.message) {
931
931
  const n = {}, r = [];
932
932
  for (const o of e.issues)
933
933
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
934
934
  return { formErrors: r, fieldErrors: n };
935
935
  }
936
- function Rn(e, t = (n) => n.message) {
936
+ function In(e, t = (n) => n.message) {
937
937
  const n = { _errors: [] }, r = (o) => {
938
- for (const i of o.issues)
939
- if (i.code === "invalid_union" && i.errors.length)
940
- i.errors.map((s) => r({ issues: s }));
941
- else if (i.code === "invalid_key")
942
- r({ issues: i.issues });
943
- else if (i.code === "invalid_element")
944
- r({ issues: i.issues });
945
- else if (i.path.length === 0)
946
- n._errors.push(t(i));
938
+ for (const s of o.issues)
939
+ if (s.code === "invalid_union" && s.errors.length)
940
+ s.errors.map((i) => r({ issues: i }));
941
+ else if (s.code === "invalid_key")
942
+ r({ issues: s.issues });
943
+ else if (s.code === "invalid_element")
944
+ r({ issues: s.issues });
945
+ else if (s.path.length === 0)
946
+ n._errors.push(t(s));
947
947
  else {
948
- let s = n, a = 0;
949
- for (; a < i.path.length; ) {
950
- const c = i.path[a];
951
- a === i.path.length - 1 ? (s[c] = s[c] || { _errors: [] }, s[c]._errors.push(t(i))) : s[c] = s[c] || { _errors: [] }, s = s[c], a++;
948
+ let i = n, a = 0;
949
+ for (; a < s.path.length; ) {
950
+ const c = s.path[a];
951
+ a === s.path.length - 1 ? (i[c] = i[c] || { _errors: [] }, i[c]._errors.push(t(s))) : i[c] = i[c] || { _errors: [] }, i = i[c], a++;
952
952
  }
953
953
  }
954
954
  };
955
955
  return r(e), n;
956
956
  }
957
- const Je = (e) => (t, n, r, o) => {
958
- const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
959
- if (s instanceof Promise)
960
- throw new X();
961
- if (s.issues.length) {
962
- const a = new (o?.Err ?? e)(s.issues.map((c) => B(c, i, Y())));
963
- throw $t(a, o?.callee), a;
964
- }
965
- return s.value;
966
- }, Me = (e) => async (t, n, r, o) => {
967
- const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
968
- let s = t._zod.run({ value: n, issues: [] }, i);
969
- if (s instanceof Promise && (s = await s), s.issues.length) {
970
- const a = new (o?.Err ?? e)(s.issues.map((c) => B(c, i, Y())));
971
- throw $t(a, o?.callee), a;
972
- }
973
- return s.value;
974
- }, ye = (e) => (t, n, r) => {
975
- const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
957
+ const Be = (e) => (t, n, r, o) => {
958
+ const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
976
959
  if (i instanceof Promise)
977
- throw new X();
978
- return i.issues.length ? {
960
+ throw new te();
961
+ if (i.issues.length) {
962
+ const a = new (o?.Err ?? e)(i.issues.map((c) => q(c, s, B())));
963
+ throw jt(a, o?.callee), a;
964
+ }
965
+ return i.value;
966
+ }, qe = (e) => async (t, n, r, o) => {
967
+ const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
968
+ let i = t._zod.run({ value: n, issues: [] }, s);
969
+ if (i instanceof Promise && (i = await i), i.issues.length) {
970
+ const a = new (o?.Err ?? e)(i.issues.map((c) => q(c, s, B())));
971
+ throw jt(a, o?.callee), a;
972
+ }
973
+ return i.value;
974
+ }, je = (e) => (t, n, r) => {
975
+ const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
976
+ if (s instanceof Promise)
977
+ throw new te();
978
+ return s.issues.length ? {
979
979
  success: !1,
980
- error: new (e ?? St)(i.issues.map((s) => B(s, o, Y())))
981
- } : { success: !0, data: i.value };
982
- }, Pn = /* @__PURE__ */ ye(Zt), we = (e) => async (t, n, r) => {
980
+ error: new (e ?? Et)(s.issues.map((i) => q(i, o, B())))
981
+ } : { success: !0, data: s.value };
982
+ }, An = /* @__PURE__ */ je(xt), Oe = (e) => async (t, n, r) => {
983
983
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
984
- let i = t._zod.run({ value: n, issues: [] }, o);
985
- return i instanceof Promise && (i = await i), i.issues.length ? {
984
+ let s = t._zod.run({ value: n, issues: [] }, o);
985
+ return s instanceof Promise && (s = await s), s.issues.length ? {
986
986
  success: !1,
987
- error: new e(i.issues.map((s) => B(s, o, Y())))
988
- } : { success: !0, data: i.value };
989
- }, Nn = /* @__PURE__ */ we(Zt), Dn = (e) => (t, n, r) => {
987
+ error: new e(s.issues.map((i) => q(i, o, B())))
988
+ } : { success: !0, data: s.value };
989
+ }, Cn = /* @__PURE__ */ Oe(xt), Fn = (e) => (t, n, r) => {
990
990
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
991
- return Je(e)(t, n, o);
992
- }, An = (e) => (t, n, r) => Je(e)(t, n, r), In = (e) => async (t, n, r) => {
991
+ return Be(e)(t, n, o);
992
+ }, Un = (e) => (t, n, r) => Be(e)(t, n, r), Ln = (e) => async (t, n, r) => {
993
993
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
994
- return Me(e)(t, n, o);
995
- }, Cn = (e) => async (t, n, r) => Me(e)(t, n, r), Fn = (e) => (t, n, r) => {
994
+ return qe(e)(t, n, o);
995
+ }, Jn = (e) => async (t, n, r) => qe(e)(t, n, r), Mn = (e) => (t, n, r) => {
996
996
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
997
- return ye(e)(t, n, o);
998
- }, Un = (e) => (t, n, r) => ye(e)(t, n, r), Ln = (e) => async (t, n, r) => {
997
+ return je(e)(t, n, o);
998
+ }, Vn = (e) => (t, n, r) => je(e)(t, n, r), Wn = (e) => async (t, n, r) => {
999
999
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1000
- return we(e)(t, n, o);
1001
- }, Jn = (e) => async (t, n, r) => we(e)(t, n, r), Mn = /^[cC][^\s-]{8,}$/, Vn = /^[0-9a-z]+$/, Wn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Gn = /^[0-9a-vA-V]{20}$/, Yn = /^[A-Za-z0-9]{27}$/, Bn = /^[a-zA-Z0-9_-]{21}$/, qn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Kn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ot = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Hn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Xn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1002
- function Qn() {
1003
- return new RegExp(Xn, "u");
1000
+ return Oe(e)(t, n, o);
1001
+ }, Gn = (e) => async (t, n, r) => Oe(e)(t, n, r), Yn = /^[cC][^\s-]{8,}$/, Bn = /^[0-9a-z]+$/, qn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Kn = /^[0-9a-vA-V]{20}$/, Hn = /^[A-Za-z0-9]{27}$/, Xn = /^[a-zA-Z0-9_-]{21}$/, Qn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, er = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, it = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, tr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, nr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1002
+ function rr() {
1003
+ return new RegExp(nr, "u");
1004
1004
  }
1005
- const er = /^(?:(?: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])$/, tr = /^(([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}|:))$/, nr = /^((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])$/, rr = /^(([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])$/, or = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Et = /^[A-Za-z0-9_-]*$/, sr = /^\+[1-9]\d{6,14}$/, xt = "(?:(?:\\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])))", ir = /* @__PURE__ */ new RegExp(`^${xt}$`);
1006
- function Rt(e) {
1005
+ const or = /^(?:(?: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])$/, ir = /^(([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}|:))$/, sr = /^((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])$/, ar = /^(([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])$/, cr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Rt = /^[A-Za-z0-9_-]*$/, ur = /^\+[1-9]\d{6,14}$/, Pt = "(?:(?:\\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])))", lr = /* @__PURE__ */ new RegExp(`^${Pt}$`);
1006
+ function Dt(e) {
1007
1007
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1008
1008
  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+)?)?`;
1009
1009
  }
1010
- function ar(e) {
1011
- return new RegExp(`^${Rt(e)}$`);
1010
+ function dr(e) {
1011
+ return new RegExp(`^${Dt(e)}$`);
1012
1012
  }
1013
- function cr(e) {
1014
- const t = Rt({ precision: e.precision }), n = ["Z"];
1013
+ function fr(e) {
1014
+ const t = Dt({ precision: e.precision }), n = ["Z"];
1015
1015
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1016
1016
  const r = `${t}(?:${n.join("|")})`;
1017
- return new RegExp(`^${xt}T(?:${r})$`);
1017
+ return new RegExp(`^${Pt}T(?:${r})$`);
1018
1018
  }
1019
- const ur = (e) => {
1019
+ const pr = (e) => {
1020
1020
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1021
1021
  return new RegExp(`^${t}$`);
1022
- }, lr = /^[^A-Z]*$/, fr = /^[^a-z]*$/, L = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
1022
+ }, mr = /^[^A-Z]*$/, hr = /^[^a-z]*$/, V = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
1023
1023
  var n;
1024
1024
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
1025
- }), dr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
1025
+ }), gr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
1026
1026
  var n;
1027
- L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1027
+ V.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1028
1028
  const o = r.value;
1029
- return !Fe(o) && o.length !== void 0;
1029
+ return !We(o) && o.length !== void 0;
1030
1030
  }), e._zod.onattach.push((r) => {
1031
1031
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1032
1032
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1034,9 +1034,9 @@ const ur = (e) => {
1034
1034
  const o = r.value;
1035
1035
  if (o.length <= t.maximum)
1036
1036
  return;
1037
- const s = Le(o);
1037
+ const i = Ye(o);
1038
1038
  r.issues.push({
1039
- origin: s,
1039
+ origin: i,
1040
1040
  code: "too_big",
1041
1041
  maximum: t.maximum,
1042
1042
  inclusive: !0,
@@ -1045,11 +1045,11 @@ const ur = (e) => {
1045
1045
  continue: !t.abort
1046
1046
  });
1047
1047
  };
1048
- }), pr = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
1048
+ }), _r = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
1049
1049
  var n;
1050
- L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1050
+ V.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1051
1051
  const o = r.value;
1052
- return !Fe(o) && o.length !== void 0;
1052
+ return !We(o) && o.length !== void 0;
1053
1053
  }), e._zod.onattach.push((r) => {
1054
1054
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1055
1055
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1057,9 +1057,9 @@ const ur = (e) => {
1057
1057
  const o = r.value;
1058
1058
  if (o.length >= t.minimum)
1059
1059
  return;
1060
- const s = Le(o);
1060
+ const i = Ye(o);
1061
1061
  r.issues.push({
1062
- origin: s,
1062
+ origin: i,
1063
1063
  code: "too_small",
1064
1064
  minimum: t.minimum,
1065
1065
  inclusive: !0,
@@ -1068,21 +1068,21 @@ const ur = (e) => {
1068
1068
  continue: !t.abort
1069
1069
  });
1070
1070
  };
1071
- }), hr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
1071
+ }), vr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
1072
1072
  var n;
1073
- L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1073
+ V.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1074
1074
  const o = r.value;
1075
- return !Fe(o) && o.length !== void 0;
1075
+ return !We(o) && o.length !== void 0;
1076
1076
  }), e._zod.onattach.push((r) => {
1077
1077
  const o = r._zod.bag;
1078
1078
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
1079
1079
  }), e._zod.check = (r) => {
1080
- const o = r.value, i = o.length;
1081
- if (i === t.length)
1080
+ const o = r.value, s = o.length;
1081
+ if (s === t.length)
1082
1082
  return;
1083
- const s = Le(o), a = i > t.length;
1083
+ const i = Ye(o), a = s > t.length;
1084
1084
  r.issues.push({
1085
- origin: s,
1085
+ origin: i,
1086
1086
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
1087
1087
  inclusive: !0,
1088
1088
  exact: !0,
@@ -1091,11 +1091,11 @@ const ur = (e) => {
1091
1091
  continue: !t.abort
1092
1092
  });
1093
1093
  };
1094
- }), be = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
1094
+ }), Se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
1095
1095
  var n, r;
1096
- L.init(e, t), e._zod.onattach.push((o) => {
1097
- const i = o._zod.bag;
1098
- i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
1096
+ V.init(e, t), e._zod.onattach.push((o) => {
1097
+ const s = o._zod.bag;
1098
+ s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
1099
1099
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
1100
1100
  t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
1101
1101
  origin: "string",
@@ -1108,8 +1108,8 @@ const ur = (e) => {
1108
1108
  });
1109
1109
  }) : (r = e._zod).check ?? (r.check = () => {
1110
1110
  });
1111
- }), mr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
1112
- be.init(e, t), e._zod.check = (n) => {
1111
+ }), yr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
1112
+ Se.init(e, t), e._zod.check = (n) => {
1113
1113
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1114
1114
  origin: "string",
1115
1115
  code: "invalid_format",
@@ -1120,16 +1120,16 @@ const ur = (e) => {
1120
1120
  continue: !t.abort
1121
1121
  });
1122
1122
  };
1123
- }), gr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
1124
- t.pattern ?? (t.pattern = lr), be.init(e, t);
1125
- }), _r = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
1126
- t.pattern ?? (t.pattern = fr), be.init(e, t);
1127
- }), vr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
1128
- L.init(e, t);
1129
- const n = ve(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1123
+ }), br = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
1124
+ t.pattern ?? (t.pattern = mr), Se.init(e, t);
1125
+ }), wr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
1126
+ t.pattern ?? (t.pattern = hr), Se.init(e, t);
1127
+ }), zr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
1128
+ V.init(e, t);
1129
+ const n = Te(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1130
1130
  t.pattern = r, e._zod.onattach.push((o) => {
1131
- const i = o._zod.bag;
1132
- i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
1131
+ const s = o._zod.bag;
1132
+ s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
1133
1133
  }), e._zod.check = (o) => {
1134
1134
  o.value.includes(t.includes, t.position) || o.issues.push({
1135
1135
  origin: "string",
@@ -1141,9 +1141,9 @@ const ur = (e) => {
1141
1141
  continue: !t.abort
1142
1142
  });
1143
1143
  };
1144
- }), yr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
1145
- L.init(e, t);
1146
- const n = new RegExp(`^${ve(t.prefix)}.*`);
1144
+ }), kr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
1145
+ V.init(e, t);
1146
+ const n = new RegExp(`^${Te(t.prefix)}.*`);
1147
1147
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1148
1148
  const o = r._zod.bag;
1149
1149
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -1158,9 +1158,9 @@ const ur = (e) => {
1158
1158
  continue: !t.abort
1159
1159
  });
1160
1160
  };
1161
- }), wr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
1162
- L.init(e, t);
1163
- const n = new RegExp(`.*${ve(t.suffix)}$`);
1161
+ }), $r = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
1162
+ V.init(e, t);
1163
+ const n = new RegExp(`.*${Te(t.suffix)}$`);
1164
1164
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1165
1165
  const o = r._zod.bag;
1166
1166
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -1175,12 +1175,12 @@ const ur = (e) => {
1175
1175
  continue: !t.abort
1176
1176
  });
1177
1177
  };
1178
- }), br = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
1179
- L.init(e, t), e._zod.check = (n) => {
1178
+ }), Tr = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
1179
+ V.init(e, t), e._zod.check = (n) => {
1180
1180
  n.value = t.tx(n.value);
1181
1181
  };
1182
1182
  });
1183
- class zr {
1183
+ class jr {
1184
1184
  constructor(t = []) {
1185
1185
  this.content = [], this.indent = 0, this && (this.args = t);
1186
1186
  }
@@ -1193,78 +1193,78 @@ class zr {
1193
1193
  return;
1194
1194
  }
1195
1195
  const r = t.split(`
1196
- `).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
1197
- for (const s of i)
1198
- this.content.push(s);
1196
+ `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
1197
+ for (const i of s)
1198
+ this.content.push(i);
1199
1199
  }
1200
1200
  compile() {
1201
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
1201
+ const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
1202
1202
  return new t(...n, o.join(`
1203
1203
  `));
1204
1204
  }
1205
1205
  }
1206
- const kr = {
1206
+ const Or = {
1207
1207
  major: 4,
1208
1208
  minor: 3,
1209
1209
  patch: 6
1210
- }, x = /* @__PURE__ */ u("$ZodType", (e, t) => {
1210
+ }, E = /* @__PURE__ */ u("$ZodType", (e, t) => {
1211
1211
  var n;
1212
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = kr;
1212
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Or;
1213
1213
  const r = [...e._zod.def.checks ?? []];
1214
1214
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
1215
1215
  for (const o of r)
1216
- for (const i of o._zod.onattach)
1217
- i(e);
1216
+ for (const s of o._zod.onattach)
1217
+ s(e);
1218
1218
  if (r.length === 0)
1219
1219
  (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
1220
1220
  e._zod.run = e._zod.parse;
1221
1221
  });
1222
1222
  else {
1223
- const o = (s, a, c) => {
1224
- let f = H(s), d;
1223
+ const o = (i, a, c) => {
1224
+ let d = ee(i), f;
1225
1225
  for (const _ of a) {
1226
1226
  if (_._zod.def.when) {
1227
- if (!_._zod.def.when(s))
1227
+ if (!_._zod.def.when(i))
1228
1228
  continue;
1229
- } else if (f)
1229
+ } else if (d)
1230
1230
  continue;
1231
- const m = s.issues.length, p = _._zod.check(s);
1231
+ const h = i.issues.length, p = _._zod.check(i);
1232
1232
  if (p instanceof Promise && c?.async === !1)
1233
- throw new X();
1234
- if (d || p instanceof Promise)
1235
- d = (d ?? Promise.resolve()).then(async () => {
1236
- await p, s.issues.length !== m && (f || (f = H(s, m)));
1233
+ throw new te();
1234
+ if (f || p instanceof Promise)
1235
+ f = (f ?? Promise.resolve()).then(async () => {
1236
+ await p, i.issues.length !== h && (d || (d = ee(i, h)));
1237
1237
  });
1238
1238
  else {
1239
- if (s.issues.length === m)
1239
+ if (i.issues.length === h)
1240
1240
  continue;
1241
- f || (f = H(s, m));
1241
+ d || (d = ee(i, h));
1242
1242
  }
1243
1243
  }
1244
- return d ? d.then(() => s) : s;
1245
- }, i = (s, a, c) => {
1246
- if (H(s))
1247
- return s.aborted = !0, s;
1248
- const f = o(a, r, c);
1249
- if (f instanceof Promise) {
1244
+ return f ? f.then(() => i) : i;
1245
+ }, s = (i, a, c) => {
1246
+ if (ee(i))
1247
+ return i.aborted = !0, i;
1248
+ const d = o(a, r, c);
1249
+ if (d instanceof Promise) {
1250
1250
  if (c.async === !1)
1251
- throw new X();
1252
- return f.then((d) => e._zod.parse(d, c));
1251
+ throw new te();
1252
+ return d.then((f) => e._zod.parse(f, c));
1253
1253
  }
1254
- return e._zod.parse(f, c);
1254
+ return e._zod.parse(d, c);
1255
1255
  };
1256
- e._zod.run = (s, a) => {
1256
+ e._zod.run = (i, a) => {
1257
1257
  if (a.skipChecks)
1258
- return e._zod.parse(s, a);
1258
+ return e._zod.parse(i, a);
1259
1259
  if (a.direction === "backward") {
1260
- const f = e._zod.parse({ value: s.value, issues: [] }, { ...a, skipChecks: !0 });
1261
- return f instanceof Promise ? f.then((d) => i(d, s, a)) : i(f, s, a);
1260
+ const d = e._zod.parse({ value: i.value, issues: [] }, { ...a, skipChecks: !0 });
1261
+ return d instanceof Promise ? d.then((f) => s(f, i, a)) : s(d, i, a);
1262
1262
  }
1263
- const c = e._zod.parse(s, a);
1263
+ const c = e._zod.parse(i, a);
1264
1264
  if (c instanceof Promise) {
1265
1265
  if (a.async === !1)
1266
- throw new X();
1267
- return c.then((f) => o(f, r, a));
1266
+ throw new te();
1267
+ return c.then((d) => o(d, r, a));
1268
1268
  }
1269
1269
  return o(c, r, a);
1270
1270
  };
@@ -1272,17 +1272,17 @@ const kr = {
1272
1272
  z(e, "~standard", () => ({
1273
1273
  validate: (o) => {
1274
1274
  try {
1275
- const i = Pn(e, o);
1276
- return i.success ? { value: i.data } : { issues: i.error?.issues };
1275
+ const s = An(e, o);
1276
+ return s.success ? { value: s.data } : { issues: s.error?.issues };
1277
1277
  } catch {
1278
- return Nn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1278
+ return Cn(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
1279
1279
  }
1280
1280
  },
1281
1281
  vendor: "zod",
1282
1282
  version: 1
1283
1283
  }));
1284
- }), Ve = /* @__PURE__ */ u("$ZodString", (e, t) => {
1285
- x.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? ur(e._zod.bag), e._zod.parse = (n, r) => {
1284
+ }), Ke = /* @__PURE__ */ u("$ZodString", (e, t) => {
1285
+ E.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? pr(e._zod.bag), e._zod.parse = (n, r) => {
1286
1286
  if (t.coerce)
1287
1287
  try {
1288
1288
  n.value = String(n.value);
@@ -1296,10 +1296,10 @@ const kr = {
1296
1296
  }), n;
1297
1297
  };
1298
1298
  }), k = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
1299
- be.init(e, t), Ve.init(e, t);
1300
- }), $r = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
1301
- t.pattern ?? (t.pattern = Kn), k.init(e, t);
1302
- }), Tr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
1299
+ Se.init(e, t), Ke.init(e, t);
1300
+ }), Sr = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
1301
+ t.pattern ?? (t.pattern = er), k.init(e, t);
1302
+ }), Zr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
1303
1303
  if (t.version) {
1304
1304
  const r = {
1305
1305
  v1: 1,
@@ -1313,13 +1313,13 @@ const kr = {
1313
1313
  }[t.version];
1314
1314
  if (r === void 0)
1315
1315
  throw new Error(`Invalid UUID version: "${t.version}"`);
1316
- t.pattern ?? (t.pattern = ot(r));
1316
+ t.pattern ?? (t.pattern = it(r));
1317
1317
  } else
1318
- t.pattern ?? (t.pattern = ot());
1318
+ t.pattern ?? (t.pattern = it());
1319
1319
  k.init(e, t);
1320
- }), Or = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1321
- t.pattern ?? (t.pattern = Hn), k.init(e, t);
1322
- }), jr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1320
+ }), Er = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1321
+ t.pattern ?? (t.pattern = tr), k.init(e, t);
1322
+ }), xr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1323
1323
  k.init(e, t), e._zod.check = (n) => {
1324
1324
  try {
1325
1325
  const r = n.value.trim(), o = new URL(r);
@@ -1351,32 +1351,32 @@ const kr = {
1351
1351
  });
1352
1352
  }
1353
1353
  };
1354
- }), Sr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1355
- t.pattern ?? (t.pattern = Qn()), k.init(e, t);
1356
- }), Zr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1357
- t.pattern ?? (t.pattern = Bn), k.init(e, t);
1358
- }), Er = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1359
- t.pattern ?? (t.pattern = Mn), k.init(e, t);
1360
- }), xr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1361
- t.pattern ?? (t.pattern = Vn), k.init(e, t);
1362
- }), Rr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1363
- t.pattern ?? (t.pattern = Wn), k.init(e, t);
1364
- }), Pr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1365
- t.pattern ?? (t.pattern = Gn), k.init(e, t);
1366
- }), Nr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1354
+ }), Rr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1355
+ t.pattern ?? (t.pattern = rr()), k.init(e, t);
1356
+ }), Pr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1357
+ t.pattern ?? (t.pattern = Xn), k.init(e, t);
1358
+ }), Dr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1367
1359
  t.pattern ?? (t.pattern = Yn), k.init(e, t);
1368
- }), Dr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1369
- t.pattern ?? (t.pattern = cr(t)), k.init(e, t);
1370
- }), Ar = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1371
- t.pattern ?? (t.pattern = ir), k.init(e, t);
1372
- }), Ir = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1373
- t.pattern ?? (t.pattern = ar(t)), k.init(e, t);
1374
- }), Cr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1360
+ }), Nr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1361
+ t.pattern ?? (t.pattern = Bn), k.init(e, t);
1362
+ }), Ir = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1375
1363
  t.pattern ?? (t.pattern = qn), k.init(e, t);
1376
- }), Fr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1377
- t.pattern ?? (t.pattern = er), k.init(e, t), e._zod.bag.format = "ipv4";
1378
- }), Ur = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1379
- t.pattern ?? (t.pattern = tr), k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1364
+ }), Ar = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1365
+ t.pattern ?? (t.pattern = Kn), k.init(e, t);
1366
+ }), Cr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1367
+ t.pattern ?? (t.pattern = Hn), k.init(e, t);
1368
+ }), Fr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1369
+ t.pattern ?? (t.pattern = fr(t)), k.init(e, t);
1370
+ }), Ur = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1371
+ t.pattern ?? (t.pattern = lr), k.init(e, t);
1372
+ }), Lr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1373
+ t.pattern ?? (t.pattern = dr(t)), k.init(e, t);
1374
+ }), Jr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1375
+ t.pattern ?? (t.pattern = Qn), k.init(e, t);
1376
+ }), Mr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1377
+ t.pattern ?? (t.pattern = or), k.init(e, t), e._zod.bag.format = "ipv4";
1378
+ }), Vr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1379
+ t.pattern ?? (t.pattern = ir), k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1380
1380
  try {
1381
1381
  new URL(`http://[${n.value}]`);
1382
1382
  } catch {
@@ -1389,21 +1389,21 @@ const kr = {
1389
1389
  });
1390
1390
  }
1391
1391
  };
1392
- }), Lr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1393
- t.pattern ?? (t.pattern = nr), k.init(e, t);
1394
- }), Jr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1395
- t.pattern ?? (t.pattern = rr), k.init(e, t), e._zod.check = (n) => {
1392
+ }), Wr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1393
+ t.pattern ?? (t.pattern = sr), k.init(e, t);
1394
+ }), Gr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1395
+ t.pattern ?? (t.pattern = ar), k.init(e, t), e._zod.check = (n) => {
1396
1396
  const r = n.value.split("/");
1397
1397
  try {
1398
1398
  if (r.length !== 2)
1399
1399
  throw new Error();
1400
- const [o, i] = r;
1401
- if (!i)
1400
+ const [o, s] = r;
1401
+ if (!s)
1402
1402
  throw new Error();
1403
- const s = Number(i);
1404
- if (`${s}` !== i)
1403
+ const i = Number(s);
1404
+ if (`${i}` !== s)
1405
1405
  throw new Error();
1406
- if (s < 0 || s > 128)
1406
+ if (i < 0 || i > 128)
1407
1407
  throw new Error();
1408
1408
  new URL(`http://[${o}]`);
1409
1409
  } catch {
@@ -1417,7 +1417,7 @@ const kr = {
1417
1417
  }
1418
1418
  };
1419
1419
  });
1420
- function Pt(e) {
1420
+ function Nt(e) {
1421
1421
  if (e === "")
1422
1422
  return !0;
1423
1423
  if (e.length % 4 !== 0)
@@ -1428,9 +1428,9 @@ function Pt(e) {
1428
1428
  return !1;
1429
1429
  }
1430
1430
  }
1431
- const Mr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1432
- t.pattern ?? (t.pattern = or), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1433
- Pt(n.value) || n.issues.push({
1431
+ const Yr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1432
+ t.pattern ?? (t.pattern = cr), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1433
+ Nt(n.value) || n.issues.push({
1434
1434
  code: "invalid_format",
1435
1435
  format: "base64",
1436
1436
  input: n.value,
@@ -1439,15 +1439,15 @@ const Mr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1439
1439
  });
1440
1440
  };
1441
1441
  });
1442
- function Vr(e) {
1443
- if (!Et.test(e))
1442
+ function Br(e) {
1443
+ if (!Rt.test(e))
1444
1444
  return !1;
1445
1445
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1446
- return Pt(n);
1446
+ return Nt(n);
1447
1447
  }
1448
- const Wr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1449
- t.pattern ?? (t.pattern = Et), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1450
- Vr(n.value) || n.issues.push({
1448
+ const qr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1449
+ t.pattern ?? (t.pattern = Rt), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1450
+ Br(n.value) || n.issues.push({
1451
1451
  code: "invalid_format",
1452
1452
  format: "base64url",
1453
1453
  input: n.value,
@@ -1455,10 +1455,10 @@ const Wr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1455
1455
  continue: !t.abort
1456
1456
  });
1457
1457
  };
1458
- }), Gr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1459
- t.pattern ?? (t.pattern = sr), k.init(e, t);
1458
+ }), Kr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1459
+ t.pattern ?? (t.pattern = ur), k.init(e, t);
1460
1460
  });
1461
- function Yr(e, t = null) {
1461
+ function Hr(e, t = null) {
1462
1462
  try {
1463
1463
  const n = e.split(".");
1464
1464
  if (n.length !== 3)
@@ -1472,9 +1472,9 @@ function Yr(e, t = null) {
1472
1472
  return !1;
1473
1473
  }
1474
1474
  }
1475
- const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1475
+ const Xr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1476
1476
  k.init(e, t), e._zod.check = (n) => {
1477
- Yr(n.value, t.alg) || n.issues.push({
1477
+ Hr(n.value, t.alg) || n.issues.push({
1478
1478
  code: "invalid_format",
1479
1479
  format: "jwt",
1480
1480
  input: n.value,
@@ -1482,10 +1482,10 @@ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1482
1482
  continue: !t.abort
1483
1483
  });
1484
1484
  };
1485
- }), qr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1486
- x.init(e, t), e._zod.parse = (n) => n;
1487
- }), Kr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1488
- x.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1485
+ }), Qr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1486
+ E.init(e, t), e._zod.parse = (n) => n;
1487
+ }), eo = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1488
+ E.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1489
1489
  expected: "never",
1490
1490
  code: "invalid_type",
1491
1491
  input: n.value,
@@ -1493,10 +1493,10 @@ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1493
1493
  }), n);
1494
1494
  });
1495
1495
  function st(e, t, n) {
1496
- e.issues.length && t.issues.push(...Ot(n, e.issues)), t.value[n] = e.value;
1496
+ e.issues.length && t.issues.push(...St(n, e.issues)), t.value[n] = e.value;
1497
1497
  }
1498
- const Hr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1499
- x.init(e, t), e._zod.parse = (n, r) => {
1498
+ const to = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1499
+ E.init(e, t), e._zod.parse = (n, r) => {
1500
1500
  const o = n.value;
1501
1501
  if (!Array.isArray(o))
1502
1502
  return n.issues.push({
@@ -1506,31 +1506,31 @@ const Hr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1506
1506
  inst: e
1507
1507
  }), n;
1508
1508
  n.value = Array(o.length);
1509
- const i = [];
1510
- for (let s = 0; s < o.length; s++) {
1511
- const a = o[s], c = t.element._zod.run({
1509
+ const s = [];
1510
+ for (let i = 0; i < o.length; i++) {
1511
+ const a = o[i], c = t.element._zod.run({
1512
1512
  value: a,
1513
1513
  issues: []
1514
1514
  }, r);
1515
- c instanceof Promise ? i.push(c.then((f) => st(f, n, s))) : st(c, n, s);
1515
+ c instanceof Promise ? s.push(c.then((d) => st(d, n, i))) : st(c, n, i);
1516
1516
  }
1517
- return i.length ? Promise.all(i).then(() => n) : n;
1517
+ return s.length ? Promise.all(s).then(() => n) : n;
1518
1518
  };
1519
1519
  });
1520
- function me(e, t, n, r, o) {
1520
+ function ze(e, t, n, r, o) {
1521
1521
  if (e.issues.length) {
1522
1522
  if (o && !(n in r))
1523
1523
  return;
1524
- t.issues.push(...Ot(n, e.issues));
1524
+ t.issues.push(...St(n, e.issues));
1525
1525
  }
1526
1526
  e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1527
1527
  }
1528
- function Nt(e) {
1528
+ function It(e) {
1529
1529
  const t = Object.keys(e.shape);
1530
1530
  for (const r of t)
1531
1531
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1532
1532
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1533
- const n = kn(e.shape);
1533
+ const n = On(e.shape);
1534
1534
  return {
1535
1535
  ...e,
1536
1536
  keys: t,
@@ -1539,27 +1539,27 @@ function Nt(e) {
1539
1539
  optionalKeys: new Set(n)
1540
1540
  };
1541
1541
  }
1542
- function Dt(e, t, n, r, o, i) {
1543
- const s = [], a = o.keySet, c = o.catchall._zod, f = c.def.type, d = c.optout === "optional";
1542
+ function At(e, t, n, r, o, s) {
1543
+ const i = [], a = o.keySet, c = o.catchall._zod, d = c.def.type, f = c.optout === "optional";
1544
1544
  for (const _ in t) {
1545
1545
  if (a.has(_))
1546
1546
  continue;
1547
- if (f === "never") {
1548
- s.push(_);
1547
+ if (d === "never") {
1548
+ i.push(_);
1549
1549
  continue;
1550
1550
  }
1551
- const m = c.run({ value: t[_], issues: [] }, r);
1552
- m instanceof Promise ? e.push(m.then((p) => me(p, n, _, t, d))) : me(m, n, _, t, d);
1551
+ const h = c.run({ value: t[_], issues: [] }, r);
1552
+ h instanceof Promise ? e.push(h.then((p) => ze(p, n, _, t, f))) : ze(h, n, _, t, f);
1553
1553
  }
1554
- return s.length && n.issues.push({
1554
+ return i.length && n.issues.push({
1555
1555
  code: "unrecognized_keys",
1556
- keys: s,
1556
+ keys: i,
1557
1557
  input: t,
1558
- inst: i
1558
+ inst: s
1559
1559
  }), e.length ? Promise.all(e).then(() => n) : n;
1560
1560
  }
1561
- const Xr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1562
- if (x.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1561
+ const no = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1562
+ if (E.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1563
1563
  const a = t.shape;
1564
1564
  Object.defineProperty(t, "shape", {
1565
1565
  get: () => {
@@ -1570,172 +1570,172 @@ const Xr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1570
1570
  }
1571
1571
  });
1572
1572
  }
1573
- const r = Ce(() => Nt(t));
1573
+ const r = Ve(() => It(t));
1574
1574
  z(e._zod, "propValues", () => {
1575
1575
  const a = t.shape, c = {};
1576
- for (const f in a) {
1577
- const d = a[f]._zod;
1578
- if (d.values) {
1579
- c[f] ?? (c[f] = /* @__PURE__ */ new Set());
1580
- for (const _ of d.values)
1581
- c[f].add(_);
1576
+ for (const d in a) {
1577
+ const f = a[d]._zod;
1578
+ if (f.values) {
1579
+ c[d] ?? (c[d] = /* @__PURE__ */ new Set());
1580
+ for (const _ of f.values)
1581
+ c[d].add(_);
1582
1582
  }
1583
1583
  }
1584
1584
  return c;
1585
1585
  });
1586
- const o = he, i = t.catchall;
1587
- let s;
1586
+ const o = we, s = t.catchall;
1587
+ let i;
1588
1588
  e._zod.parse = (a, c) => {
1589
- s ?? (s = r.value);
1590
- const f = a.value;
1591
- if (!o(f))
1589
+ i ?? (i = r.value);
1590
+ const d = a.value;
1591
+ if (!o(d))
1592
1592
  return a.issues.push({
1593
1593
  expected: "object",
1594
1594
  code: "invalid_type",
1595
- input: f,
1595
+ input: d,
1596
1596
  inst: e
1597
1597
  }), a;
1598
1598
  a.value = {};
1599
- const d = [], _ = s.shape;
1600
- for (const m of s.keys) {
1601
- const p = _[m], w = p._zod.optout === "optional", y = p._zod.run({ value: f[m], issues: [] }, c);
1602
- y instanceof Promise ? d.push(y.then((b) => me(b, a, m, f, w))) : me(y, a, m, f, w);
1599
+ const f = [], _ = i.shape;
1600
+ for (const h of i.keys) {
1601
+ const p = _[h], b = p._zod.optout === "optional", y = p._zod.run({ value: d[h], issues: [] }, c);
1602
+ y instanceof Promise ? f.push(y.then((w) => ze(w, a, h, d, b))) : ze(y, a, h, d, b);
1603
1603
  }
1604
- return i ? Dt(d, f, a, c, r.value, e) : d.length ? Promise.all(d).then(() => a) : a;
1604
+ return s ? At(f, d, a, c, r.value, e) : f.length ? Promise.all(f).then(() => a) : a;
1605
1605
  };
1606
- }), Qr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1607
- Xr.init(e, t);
1608
- const n = e._zod.parse, r = Ce(() => Nt(t)), o = (m) => {
1609
- const p = new zr(["shape", "payload", "ctx"]), w = r.value, y = (C) => {
1610
- const S = rt(C);
1611
- return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
1606
+ }), ro = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1607
+ no.init(e, t);
1608
+ const n = e._zod.parse, r = Ve(() => It(t)), o = (h) => {
1609
+ const p = new jr(["shape", "payload", "ctx"]), b = r.value, y = (I) => {
1610
+ const R = ot(I);
1611
+ return `shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`;
1612
1612
  };
1613
1613
  p.write("const input = payload.value;");
1614
- const b = /* @__PURE__ */ Object.create(null);
1614
+ const w = /* @__PURE__ */ Object.create(null);
1615
1615
  let M = 0;
1616
- for (const C of w.keys)
1617
- b[C] = `key_${M++}`;
1616
+ for (const I of b.keys)
1617
+ w[I] = `key_${M++}`;
1618
1618
  p.write("const newResult = {};");
1619
- for (const C of w.keys) {
1620
- const S = b[C], P = rt(C), N = m[C]?._zod?.optout === "optional";
1621
- p.write(`const ${S} = ${y(C)};`), N ? p.write(`
1622
- if (${S}.issues.length) {
1623
- if (${P} in input) {
1624
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
1619
+ for (const I of b.keys) {
1620
+ const R = w[I], A = ot(I), H = h[I]?._zod?.optout === "optional";
1621
+ p.write(`const ${R} = ${y(I)};`), H ? p.write(`
1622
+ if (${R}.issues.length) {
1623
+ if (${A} in input) {
1624
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
1625
1625
  ...iss,
1626
- path: iss.path ? [${P}, ...iss.path] : [${P}]
1626
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
1627
1627
  })));
1628
1628
  }
1629
1629
  }
1630
1630
 
1631
- if (${S}.value === undefined) {
1632
- if (${P} in input) {
1633
- newResult[${P}] = undefined;
1631
+ if (${R}.value === undefined) {
1632
+ if (${A} in input) {
1633
+ newResult[${A}] = undefined;
1634
1634
  }
1635
1635
  } else {
1636
- newResult[${P}] = ${S}.value;
1636
+ newResult[${A}] = ${R}.value;
1637
1637
  }
1638
1638
 
1639
1639
  `) : p.write(`
1640
- if (${S}.issues.length) {
1641
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
1640
+ if (${R}.issues.length) {
1641
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
1642
1642
  ...iss,
1643
- path: iss.path ? [${P}, ...iss.path] : [${P}]
1643
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
1644
1644
  })));
1645
1645
  }
1646
1646
 
1647
- if (${S}.value === undefined) {
1648
- if (${P} in input) {
1649
- newResult[${P}] = undefined;
1647
+ if (${R}.value === undefined) {
1648
+ if (${A} in input) {
1649
+ newResult[${A}] = undefined;
1650
1650
  }
1651
1651
  } else {
1652
- newResult[${P}] = ${S}.value;
1652
+ newResult[${A}] = ${R}.value;
1653
1653
  }
1654
1654
 
1655
1655
  `);
1656
1656
  }
1657
1657
  p.write("payload.value = newResult;"), p.write("return payload;");
1658
- const ee = p.compile();
1659
- return (C, S) => ee(m, C, S);
1658
+ const Y = p.compile();
1659
+ return (I, R) => Y(h, I, R);
1660
1660
  };
1661
- let i;
1662
- const s = he, a = !zt.jitless, f = a && bn.value, d = t.catchall;
1661
+ let s;
1662
+ const i = we, a = !$t.jitless, d = a && Tn.value, f = t.catchall;
1663
1663
  let _;
1664
- e._zod.parse = (m, p) => {
1664
+ e._zod.parse = (h, p) => {
1665
1665
  _ ?? (_ = r.value);
1666
- const w = m.value;
1667
- return s(w) ? a && f && p?.async === !1 && p.jitless !== !0 ? (i || (i = o(t.shape)), m = i(m, p), d ? Dt([], w, m, p, _, e) : m) : n(m, p) : (m.issues.push({
1666
+ const b = h.value;
1667
+ return i(b) ? a && d && p?.async === !1 && p.jitless !== !0 ? (s || (s = o(t.shape)), h = s(h, p), f ? At([], b, h, p, _, e) : h) : n(h, p) : (h.issues.push({
1668
1668
  expected: "object",
1669
1669
  code: "invalid_type",
1670
- input: w,
1670
+ input: b,
1671
1671
  inst: e
1672
- }), m);
1672
+ }), h);
1673
1673
  };
1674
1674
  });
1675
- function it(e, t, n, r) {
1676
- for (const i of e)
1677
- if (i.issues.length === 0)
1678
- return t.value = i.value, t;
1679
- const o = e.filter((i) => !H(i));
1675
+ function at(e, t, n, r) {
1676
+ for (const s of e)
1677
+ if (s.issues.length === 0)
1678
+ return t.value = s.value, t;
1679
+ const o = e.filter((s) => !ee(s));
1680
1680
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1681
1681
  code: "invalid_union",
1682
1682
  input: t.value,
1683
1683
  inst: n,
1684
- errors: e.map((i) => i.issues.map((s) => B(s, r, Y())))
1684
+ errors: e.map((s) => s.issues.map((i) => q(i, r, B())))
1685
1685
  }), t);
1686
1686
  }
1687
- const eo = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1688
- x.init(e, t), z(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), z(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), z(e._zod, "values", () => {
1687
+ const oo = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1688
+ E.init(e, t), z(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), z(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), z(e._zod, "values", () => {
1689
1689
  if (t.options.every((o) => o._zod.values))
1690
1690
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1691
1691
  }), z(e._zod, "pattern", () => {
1692
1692
  if (t.options.every((o) => o._zod.pattern)) {
1693
- const o = t.options.map((i) => i._zod.pattern);
1694
- return new RegExp(`^(${o.map((i) => Ue(i.source)).join("|")})$`);
1693
+ const o = t.options.map((s) => s._zod.pattern);
1694
+ return new RegExp(`^(${o.map((s) => Ge(s.source)).join("|")})$`);
1695
1695
  }
1696
1696
  });
1697
1697
  const n = t.options.length === 1, r = t.options[0]._zod.run;
1698
- e._zod.parse = (o, i) => {
1698
+ e._zod.parse = (o, s) => {
1699
1699
  if (n)
1700
- return r(o, i);
1701
- let s = !1;
1700
+ return r(o, s);
1701
+ let i = !1;
1702
1702
  const a = [];
1703
1703
  for (const c of t.options) {
1704
- const f = c._zod.run({
1704
+ const d = c._zod.run({
1705
1705
  value: o.value,
1706
1706
  issues: []
1707
- }, i);
1708
- if (f instanceof Promise)
1709
- a.push(f), s = !0;
1707
+ }, s);
1708
+ if (d instanceof Promise)
1709
+ a.push(d), i = !0;
1710
1710
  else {
1711
- if (f.issues.length === 0)
1712
- return f;
1713
- a.push(f);
1711
+ if (d.issues.length === 0)
1712
+ return d;
1713
+ a.push(d);
1714
1714
  }
1715
1715
  }
1716
- return s ? Promise.all(a).then((c) => it(c, o, e, i)) : it(a, o, e, i);
1716
+ return i ? Promise.all(a).then((c) => at(c, o, e, s)) : at(a, o, e, s);
1717
1717
  };
1718
- }), to = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1719
- x.init(e, t), e._zod.parse = (n, r) => {
1720
- const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1721
- return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, f]) => at(n, c, f)) : at(n, i, s);
1718
+ }), io = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1719
+ E.init(e, t), e._zod.parse = (n, r) => {
1720
+ const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1721
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, d]) => ct(n, c, d)) : ct(n, s, i);
1722
1722
  };
1723
1723
  });
1724
- function Se(e, t) {
1724
+ function De(e, t) {
1725
1725
  if (e === t)
1726
1726
  return { valid: !0, data: e };
1727
1727
  if (e instanceof Date && t instanceof Date && +e == +t)
1728
1728
  return { valid: !0, data: e };
1729
- if (oe(e) && oe(t)) {
1730
- const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1731
- for (const i of r) {
1732
- const s = Se(e[i], t[i]);
1733
- if (!s.valid)
1729
+ if (fe(e) && fe(t)) {
1730
+ const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
1731
+ for (const s of r) {
1732
+ const i = De(e[s], t[s]);
1733
+ if (!i.valid)
1734
1734
  return {
1735
1735
  valid: !1,
1736
- mergeErrorPath: [i, ...s.mergeErrorPath]
1736
+ mergeErrorPath: [s, ...i.mergeErrorPath]
1737
1737
  };
1738
- o[i] = s.data;
1738
+ o[s] = i.data;
1739
1739
  }
1740
1740
  return { valid: !0, data: o };
1741
1741
  }
@@ -1744,19 +1744,19 @@ function Se(e, t) {
1744
1744
  return { valid: !1, mergeErrorPath: [] };
1745
1745
  const n = [];
1746
1746
  for (let r = 0; r < e.length; r++) {
1747
- const o = e[r], i = t[r], s = Se(o, i);
1748
- if (!s.valid)
1747
+ const o = e[r], s = t[r], i = De(o, s);
1748
+ if (!i.valid)
1749
1749
  return {
1750
1750
  valid: !1,
1751
- mergeErrorPath: [r, ...s.mergeErrorPath]
1751
+ mergeErrorPath: [r, ...i.mergeErrorPath]
1752
1752
  };
1753
- n.push(s.data);
1753
+ n.push(i.data);
1754
1754
  }
1755
1755
  return { valid: !0, data: n };
1756
1756
  }
1757
1757
  return { valid: !1, mergeErrorPath: [] };
1758
1758
  }
1759
- function at(e, t, n) {
1759
+ function ct(e, t, n) {
1760
1760
  const r = /* @__PURE__ */ new Map();
1761
1761
  let o;
1762
1762
  for (const a of t.issues)
@@ -1772,84 +1772,84 @@ function at(e, t, n) {
1772
1772
  r.has(c) || r.set(c, {}), r.get(c).r = !0;
1773
1773
  else
1774
1774
  e.issues.push(a);
1775
- const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1776
- if (i.length && o && e.issues.push({ ...o, keys: i }), H(e))
1775
+ const s = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1776
+ if (s.length && o && e.issues.push({ ...o, keys: s }), ee(e))
1777
1777
  return e;
1778
- const s = Se(t.value, n.value);
1779
- if (!s.valid)
1780
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1781
- return e.value = s.data, e;
1782
- }
1783
- const no = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1784
- x.init(e, t);
1785
- const n = kt(t.entries), r = new Set(n);
1786
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => zn.has(typeof o)).map((o) => typeof o == "string" ? ve(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1787
- const s = o.value;
1788
- return r.has(s) || o.issues.push({
1778
+ const i = De(t.value, n.value);
1779
+ if (!i.valid)
1780
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1781
+ return e.value = i.data, e;
1782
+ }
1783
+ const so = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1784
+ E.init(e, t);
1785
+ const n = Tt(t.entries), r = new Set(n);
1786
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => jn.has(typeof o)).map((o) => typeof o == "string" ? Te(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1787
+ const i = o.value;
1788
+ return r.has(i) || o.issues.push({
1789
1789
  code: "invalid_value",
1790
1790
  values: n,
1791
- input: s,
1791
+ input: i,
1792
1792
  inst: e
1793
1793
  }), o;
1794
1794
  };
1795
- }), ro = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1796
- x.init(e, t), e._zod.parse = (n, r) => {
1795
+ }), ao = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1796
+ E.init(e, t), e._zod.parse = (n, r) => {
1797
1797
  if (r.direction === "backward")
1798
- throw new bt(e.constructor.name);
1798
+ throw new kt(e.constructor.name);
1799
1799
  const o = t.transform(n.value, n);
1800
1800
  if (r.async)
1801
- return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1801
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
1802
1802
  if (o instanceof Promise)
1803
- throw new X();
1803
+ throw new te();
1804
1804
  return n.value = o, n;
1805
1805
  };
1806
1806
  });
1807
- function ct(e, t) {
1807
+ function ut(e, t) {
1808
1808
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1809
1809
  }
1810
- const At = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1811
- x.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), z(e._zod, "pattern", () => {
1810
+ const Ct = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1811
+ E.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), z(e._zod, "pattern", () => {
1812
1812
  const n = t.innerType._zod.pattern;
1813
- return n ? new RegExp(`^(${Ue(n.source)})?$`) : void 0;
1813
+ return n ? new RegExp(`^(${Ge(n.source)})?$`) : void 0;
1814
1814
  }), e._zod.parse = (n, r) => {
1815
1815
  if (t.innerType._zod.optin === "optional") {
1816
1816
  const o = t.innerType._zod.run(n, r);
1817
- return o instanceof Promise ? o.then((i) => ct(i, n.value)) : ct(o, n.value);
1817
+ return o instanceof Promise ? o.then((s) => ut(s, n.value)) : ut(o, n.value);
1818
1818
  }
1819
1819
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1820
1820
  };
1821
- }), oo = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1822
- At.init(e, t), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1823
- }), so = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1824
- x.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "pattern", () => {
1821
+ }), co = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1822
+ Ct.init(e, t), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1823
+ }), uo = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1824
+ E.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "pattern", () => {
1825
1825
  const n = t.innerType._zod.pattern;
1826
- return n ? new RegExp(`^(${Ue(n.source)}|null)$`) : void 0;
1826
+ return n ? new RegExp(`^(${Ge(n.source)}|null)$`) : void 0;
1827
1827
  }), z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1828
- }), io = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1829
- x.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1828
+ }), lo = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1829
+ E.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1830
1830
  if (r.direction === "backward")
1831
1831
  return t.innerType._zod.run(n, r);
1832
1832
  if (n.value === void 0)
1833
1833
  return n.value = t.defaultValue, n;
1834
1834
  const o = t.innerType._zod.run(n, r);
1835
- return o instanceof Promise ? o.then((i) => ut(i, t)) : ut(o, t);
1835
+ return o instanceof Promise ? o.then((s) => lt(s, t)) : lt(o, t);
1836
1836
  };
1837
1837
  });
1838
- function ut(e, t) {
1838
+ function lt(e, t) {
1839
1839
  return e.value === void 0 && (e.value = t.defaultValue), e;
1840
1840
  }
1841
- const ao = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1842
- x.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1843
- }), co = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1844
- x.init(e, t), z(e._zod, "values", () => {
1841
+ const fo = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1842
+ E.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1843
+ }), po = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1844
+ E.init(e, t), z(e._zod, "values", () => {
1845
1845
  const n = t.innerType._zod.values;
1846
1846
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1847
1847
  }), e._zod.parse = (n, r) => {
1848
1848
  const o = t.innerType._zod.run(n, r);
1849
- return o instanceof Promise ? o.then((i) => lt(i, e)) : lt(o, e);
1849
+ return o instanceof Promise ? o.then((s) => dt(s, e)) : dt(o, e);
1850
1850
  };
1851
1851
  });
1852
- function lt(e, t) {
1852
+ function dt(e, t) {
1853
1853
  return !e.issues.length && e.value === void 0 && e.issues.push({
1854
1854
  code: "invalid_type",
1855
1855
  expected: "nonoptional",
@@ -1857,40 +1857,40 @@ function lt(e, t) {
1857
1857
  inst: t
1858
1858
  }), e;
1859
1859
  }
1860
- const uo = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1861
- x.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1860
+ const mo = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1861
+ E.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1862
1862
  if (r.direction === "backward")
1863
1863
  return t.innerType._zod.run(n, r);
1864
1864
  const o = t.innerType._zod.run(n, r);
1865
- return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1865
+ return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1866
1866
  ...n,
1867
1867
  error: {
1868
- issues: i.issues.map((s) => B(s, r, Y()))
1868
+ issues: s.issues.map((i) => q(i, r, B()))
1869
1869
  },
1870
1870
  input: n.value
1871
1871
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1872
1872
  ...n,
1873
1873
  error: {
1874
- issues: o.issues.map((i) => B(i, r, Y()))
1874
+ issues: o.issues.map((s) => q(s, r, B()))
1875
1875
  },
1876
1876
  input: n.value
1877
1877
  }), n.issues = []), n);
1878
1878
  };
1879
- }), lo = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1880
- x.init(e, t), z(e._zod, "values", () => t.in._zod.values), z(e._zod, "optin", () => t.in._zod.optin), z(e._zod, "optout", () => t.out._zod.optout), z(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1879
+ }), ho = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1880
+ E.init(e, t), z(e._zod, "values", () => t.in._zod.values), z(e._zod, "optin", () => t.in._zod.optin), z(e._zod, "optout", () => t.out._zod.optout), z(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1881
1881
  if (r.direction === "backward") {
1882
- const i = t.out._zod.run(n, r);
1883
- return i instanceof Promise ? i.then((s) => de(s, t.in, r)) : de(i, t.in, r);
1882
+ const s = t.out._zod.run(n, r);
1883
+ return s instanceof Promise ? s.then((i) => ye(i, t.in, r)) : ye(s, t.in, r);
1884
1884
  }
1885
1885
  const o = t.in._zod.run(n, r);
1886
- return o instanceof Promise ? o.then((i) => de(i, t.out, r)) : de(o, t.out, r);
1886
+ return o instanceof Promise ? o.then((s) => ye(s, t.out, r)) : ye(o, t.out, r);
1887
1887
  };
1888
1888
  });
1889
- function de(e, t, n) {
1889
+ function ye(e, t, n) {
1890
1890
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1891
1891
  }
1892
- const fo = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1893
- x.init(e, t), z(e._zod, "propValues", () => t.innerType._zod.propValues), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "optin", () => t.innerType?._zod?.optin), z(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1892
+ const go = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1893
+ E.init(e, t), z(e._zod, "propValues", () => t.innerType._zod.propValues), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "optin", () => t.innerType?._zod?.optin), z(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1894
1894
  if (r.direction === "backward")
1895
1895
  return t.innerType._zod.run(n, r);
1896
1896
  const o = t.innerType._zod.run(n, r);
@@ -1900,15 +1900,15 @@ const fo = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1900
1900
  function ft(e) {
1901
1901
  return e.value = Object.freeze(e.value), e;
1902
1902
  }
1903
- const po = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1904
- L.init(e, t), x.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1903
+ const _o = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1904
+ V.init(e, t), E.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1905
1905
  const r = n.value, o = t.fn(r);
1906
1906
  if (o instanceof Promise)
1907
- return o.then((i) => dt(i, n, r, e));
1908
- dt(o, n, r, e);
1907
+ return o.then((s) => pt(s, n, r, e));
1908
+ pt(o, n, r, e);
1909
1909
  };
1910
1910
  });
1911
- function dt(e, t, n, r) {
1911
+ function pt(e, t, n, r) {
1912
1912
  if (!e) {
1913
1913
  const o = {
1914
1914
  code: "custom",
@@ -1920,11 +1920,11 @@ function dt(e, t, n, r) {
1920
1920
  continue: !r._zod.def.abort
1921
1921
  // params: inst._zod.def.params,
1922
1922
  };
1923
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(se(o));
1923
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(pe(o));
1924
1924
  }
1925
1925
  }
1926
- var pt;
1927
- class ho {
1926
+ var mt;
1927
+ class vo {
1928
1928
  constructor() {
1929
1929
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1930
1930
  }
@@ -1953,20 +1953,20 @@ class ho {
1953
1953
  return this._map.has(t);
1954
1954
  }
1955
1955
  }
1956
- function mo() {
1957
- return new ho();
1956
+ function yo() {
1957
+ return new vo();
1958
1958
  }
1959
- (pt = globalThis).__zod_globalRegistry ?? (pt.__zod_globalRegistry = mo());
1960
- const re = globalThis.__zod_globalRegistry;
1959
+ (mt = globalThis).__zod_globalRegistry ?? (mt.__zod_globalRegistry = yo());
1960
+ const de = globalThis.__zod_globalRegistry;
1961
1961
  // @__NO_SIDE_EFFECTS__
1962
- function go(e, t) {
1962
+ function bo(e, t) {
1963
1963
  return new e({
1964
1964
  type: "string",
1965
1965
  ...g(t)
1966
1966
  });
1967
1967
  }
1968
1968
  // @__NO_SIDE_EFFECTS__
1969
- function _o(e, t) {
1969
+ function wo(e, t) {
1970
1970
  return new e({
1971
1971
  type: "string",
1972
1972
  format: "email",
@@ -1986,7 +1986,7 @@ function ht(e, t) {
1986
1986
  });
1987
1987
  }
1988
1988
  // @__NO_SIDE_EFFECTS__
1989
- function vo(e, t) {
1989
+ function zo(e, t) {
1990
1990
  return new e({
1991
1991
  type: "string",
1992
1992
  format: "uuid",
@@ -1996,7 +1996,7 @@ function vo(e, t) {
1996
1996
  });
1997
1997
  }
1998
1998
  // @__NO_SIDE_EFFECTS__
1999
- function yo(e, t) {
1999
+ function ko(e, t) {
2000
2000
  return new e({
2001
2001
  type: "string",
2002
2002
  format: "uuid",
@@ -2007,7 +2007,7 @@ function yo(e, t) {
2007
2007
  });
2008
2008
  }
2009
2009
  // @__NO_SIDE_EFFECTS__
2010
- function wo(e, t) {
2010
+ function $o(e, t) {
2011
2011
  return new e({
2012
2012
  type: "string",
2013
2013
  format: "uuid",
@@ -2018,7 +2018,7 @@ function wo(e, t) {
2018
2018
  });
2019
2019
  }
2020
2020
  // @__NO_SIDE_EFFECTS__
2021
- function bo(e, t) {
2021
+ function To(e, t) {
2022
2022
  return new e({
2023
2023
  type: "string",
2024
2024
  format: "uuid",
@@ -2029,7 +2029,7 @@ function bo(e, t) {
2029
2029
  });
2030
2030
  }
2031
2031
  // @__NO_SIDE_EFFECTS__
2032
- function zo(e, t) {
2032
+ function jo(e, t) {
2033
2033
  return new e({
2034
2034
  type: "string",
2035
2035
  format: "url",
@@ -2039,7 +2039,7 @@ function zo(e, t) {
2039
2039
  });
2040
2040
  }
2041
2041
  // @__NO_SIDE_EFFECTS__
2042
- function ko(e, t) {
2042
+ function Oo(e, t) {
2043
2043
  return new e({
2044
2044
  type: "string",
2045
2045
  format: "emoji",
@@ -2049,7 +2049,7 @@ function ko(e, t) {
2049
2049
  });
2050
2050
  }
2051
2051
  // @__NO_SIDE_EFFECTS__
2052
- function $o(e, t) {
2052
+ function So(e, t) {
2053
2053
  return new e({
2054
2054
  type: "string",
2055
2055
  format: "nanoid",
@@ -2059,7 +2059,7 @@ function $o(e, t) {
2059
2059
  });
2060
2060
  }
2061
2061
  // @__NO_SIDE_EFFECTS__
2062
- function To(e, t) {
2062
+ function Zo(e, t) {
2063
2063
  return new e({
2064
2064
  type: "string",
2065
2065
  format: "cuid",
@@ -2069,7 +2069,7 @@ function To(e, t) {
2069
2069
  });
2070
2070
  }
2071
2071
  // @__NO_SIDE_EFFECTS__
2072
- function Oo(e, t) {
2072
+ function Eo(e, t) {
2073
2073
  return new e({
2074
2074
  type: "string",
2075
2075
  format: "cuid2",
@@ -2079,7 +2079,7 @@ function Oo(e, t) {
2079
2079
  });
2080
2080
  }
2081
2081
  // @__NO_SIDE_EFFECTS__
2082
- function jo(e, t) {
2082
+ function xo(e, t) {
2083
2083
  return new e({
2084
2084
  type: "string",
2085
2085
  format: "ulid",
@@ -2089,7 +2089,7 @@ function jo(e, t) {
2089
2089
  });
2090
2090
  }
2091
2091
  // @__NO_SIDE_EFFECTS__
2092
- function So(e, t) {
2092
+ function Ro(e, t) {
2093
2093
  return new e({
2094
2094
  type: "string",
2095
2095
  format: "xid",
@@ -2099,7 +2099,7 @@ function So(e, t) {
2099
2099
  });
2100
2100
  }
2101
2101
  // @__NO_SIDE_EFFECTS__
2102
- function Zo(e, t) {
2102
+ function Po(e, t) {
2103
2103
  return new e({
2104
2104
  type: "string",
2105
2105
  format: "ksuid",
@@ -2109,7 +2109,7 @@ function Zo(e, t) {
2109
2109
  });
2110
2110
  }
2111
2111
  // @__NO_SIDE_EFFECTS__
2112
- function Eo(e, t) {
2112
+ function Do(e, t) {
2113
2113
  return new e({
2114
2114
  type: "string",
2115
2115
  format: "ipv4",
@@ -2119,7 +2119,7 @@ function Eo(e, t) {
2119
2119
  });
2120
2120
  }
2121
2121
  // @__NO_SIDE_EFFECTS__
2122
- function xo(e, t) {
2122
+ function No(e, t) {
2123
2123
  return new e({
2124
2124
  type: "string",
2125
2125
  format: "ipv6",
@@ -2129,7 +2129,7 @@ function xo(e, t) {
2129
2129
  });
2130
2130
  }
2131
2131
  // @__NO_SIDE_EFFECTS__
2132
- function Ro(e, t) {
2132
+ function Io(e, t) {
2133
2133
  return new e({
2134
2134
  type: "string",
2135
2135
  format: "cidrv4",
@@ -2139,7 +2139,7 @@ function Ro(e, t) {
2139
2139
  });
2140
2140
  }
2141
2141
  // @__NO_SIDE_EFFECTS__
2142
- function Po(e, t) {
2142
+ function Ao(e, t) {
2143
2143
  return new e({
2144
2144
  type: "string",
2145
2145
  format: "cidrv6",
@@ -2149,7 +2149,7 @@ function Po(e, t) {
2149
2149
  });
2150
2150
  }
2151
2151
  // @__NO_SIDE_EFFECTS__
2152
- function No(e, t) {
2152
+ function Co(e, t) {
2153
2153
  return new e({
2154
2154
  type: "string",
2155
2155
  format: "base64",
@@ -2159,7 +2159,7 @@ function No(e, t) {
2159
2159
  });
2160
2160
  }
2161
2161
  // @__NO_SIDE_EFFECTS__
2162
- function Do(e, t) {
2162
+ function Fo(e, t) {
2163
2163
  return new e({
2164
2164
  type: "string",
2165
2165
  format: "base64url",
@@ -2169,7 +2169,7 @@ function Do(e, t) {
2169
2169
  });
2170
2170
  }
2171
2171
  // @__NO_SIDE_EFFECTS__
2172
- function Ao(e, t) {
2172
+ function Uo(e, t) {
2173
2173
  return new e({
2174
2174
  type: "string",
2175
2175
  format: "e164",
@@ -2179,7 +2179,7 @@ function Ao(e, t) {
2179
2179
  });
2180
2180
  }
2181
2181
  // @__NO_SIDE_EFFECTS__
2182
- function Io(e, t) {
2182
+ function Lo(e, t) {
2183
2183
  return new e({
2184
2184
  type: "string",
2185
2185
  format: "jwt",
@@ -2189,7 +2189,7 @@ function Io(e, t) {
2189
2189
  });
2190
2190
  }
2191
2191
  // @__NO_SIDE_EFFECTS__
2192
- function Co(e, t) {
2192
+ function Jo(e, t) {
2193
2193
  return new e({
2194
2194
  type: "string",
2195
2195
  format: "datetime",
@@ -2201,7 +2201,7 @@ function Co(e, t) {
2201
2201
  });
2202
2202
  }
2203
2203
  // @__NO_SIDE_EFFECTS__
2204
- function Fo(e, t) {
2204
+ function Mo(e, t) {
2205
2205
  return new e({
2206
2206
  type: "string",
2207
2207
  format: "date",
@@ -2210,7 +2210,7 @@ function Fo(e, t) {
2210
2210
  });
2211
2211
  }
2212
2212
  // @__NO_SIDE_EFFECTS__
2213
- function Uo(e, t) {
2213
+ function Vo(e, t) {
2214
2214
  return new e({
2215
2215
  type: "string",
2216
2216
  format: "time",
@@ -2220,7 +2220,7 @@ function Uo(e, t) {
2220
2220
  });
2221
2221
  }
2222
2222
  // @__NO_SIDE_EFFECTS__
2223
- function Lo(e, t) {
2223
+ function Wo(e, t) {
2224
2224
  return new e({
2225
2225
  type: "string",
2226
2226
  format: "duration",
@@ -2229,45 +2229,45 @@ function Lo(e, t) {
2229
2229
  });
2230
2230
  }
2231
2231
  // @__NO_SIDE_EFFECTS__
2232
- function Jo(e) {
2232
+ function Go(e) {
2233
2233
  return new e({
2234
2234
  type: "unknown"
2235
2235
  });
2236
2236
  }
2237
2237
  // @__NO_SIDE_EFFECTS__
2238
- function Mo(e, t) {
2238
+ function Yo(e, t) {
2239
2239
  return new e({
2240
2240
  type: "never",
2241
2241
  ...g(t)
2242
2242
  });
2243
2243
  }
2244
2244
  // @__NO_SIDE_EFFECTS__
2245
- function It(e, t) {
2246
- return new dr({
2245
+ function Ft(e, t) {
2246
+ return new gr({
2247
2247
  check: "max_length",
2248
2248
  ...g(t),
2249
2249
  maximum: e
2250
2250
  });
2251
2251
  }
2252
2252
  // @__NO_SIDE_EFFECTS__
2253
- function ge(e, t) {
2254
- return new pr({
2253
+ function ke(e, t) {
2254
+ return new _r({
2255
2255
  check: "min_length",
2256
2256
  ...g(t),
2257
2257
  minimum: e
2258
2258
  });
2259
2259
  }
2260
2260
  // @__NO_SIDE_EFFECTS__
2261
- function Ct(e, t) {
2262
- return new hr({
2261
+ function Ut(e, t) {
2262
+ return new vr({
2263
2263
  check: "length_equals",
2264
2264
  ...g(t),
2265
2265
  length: e
2266
2266
  });
2267
2267
  }
2268
2268
  // @__NO_SIDE_EFFECTS__
2269
- function Vo(e, t) {
2270
- return new mr({
2269
+ function Bo(e, t) {
2270
+ return new yr({
2271
2271
  check: "string_format",
2272
2272
  format: "regex",
2273
2273
  ...g(t),
@@ -2275,24 +2275,24 @@ function Vo(e, t) {
2275
2275
  });
2276
2276
  }
2277
2277
  // @__NO_SIDE_EFFECTS__
2278
- function Wo(e) {
2279
- return new gr({
2278
+ function qo(e) {
2279
+ return new br({
2280
2280
  check: "string_format",
2281
2281
  format: "lowercase",
2282
2282
  ...g(e)
2283
2283
  });
2284
2284
  }
2285
2285
  // @__NO_SIDE_EFFECTS__
2286
- function Go(e) {
2287
- return new _r({
2286
+ function Ko(e) {
2287
+ return new wr({
2288
2288
  check: "string_format",
2289
2289
  format: "uppercase",
2290
2290
  ...g(e)
2291
2291
  });
2292
2292
  }
2293
2293
  // @__NO_SIDE_EFFECTS__
2294
- function Yo(e, t) {
2295
- return new vr({
2294
+ function Ho(e, t) {
2295
+ return new zr({
2296
2296
  check: "string_format",
2297
2297
  format: "includes",
2298
2298
  ...g(t),
@@ -2300,8 +2300,8 @@ function Yo(e, t) {
2300
2300
  });
2301
2301
  }
2302
2302
  // @__NO_SIDE_EFFECTS__
2303
- function Bo(e, t) {
2304
- return new yr({
2303
+ function Xo(e, t) {
2304
+ return new kr({
2305
2305
  check: "string_format",
2306
2306
  format: "starts_with",
2307
2307
  ...g(t),
@@ -2309,8 +2309,8 @@ function Bo(e, t) {
2309
2309
  });
2310
2310
  }
2311
2311
  // @__NO_SIDE_EFFECTS__
2312
- function qo(e, t) {
2313
- return new wr({
2312
+ function Qo(e, t) {
2313
+ return new $r({
2314
2314
  check: "string_format",
2315
2315
  format: "ends_with",
2316
2316
  ...g(t),
@@ -2318,34 +2318,34 @@ function qo(e, t) {
2318
2318
  });
2319
2319
  }
2320
2320
  // @__NO_SIDE_EFFECTS__
2321
- function Q(e) {
2322
- return new br({
2321
+ function ne(e) {
2322
+ return new Tr({
2323
2323
  check: "overwrite",
2324
2324
  tx: e
2325
2325
  });
2326
2326
  }
2327
2327
  // @__NO_SIDE_EFFECTS__
2328
- function Ko(e) {
2329
- return /* @__PURE__ */ Q((t) => t.normalize(e));
2328
+ function ei(e) {
2329
+ return /* @__PURE__ */ ne((t) => t.normalize(e));
2330
2330
  }
2331
2331
  // @__NO_SIDE_EFFECTS__
2332
- function Ho() {
2333
- return /* @__PURE__ */ Q((e) => e.trim());
2332
+ function ti() {
2333
+ return /* @__PURE__ */ ne((e) => e.trim());
2334
2334
  }
2335
2335
  // @__NO_SIDE_EFFECTS__
2336
- function Xo() {
2337
- return /* @__PURE__ */ Q((e) => e.toLowerCase());
2336
+ function ni() {
2337
+ return /* @__PURE__ */ ne((e) => e.toLowerCase());
2338
2338
  }
2339
2339
  // @__NO_SIDE_EFFECTS__
2340
- function Qo() {
2341
- return /* @__PURE__ */ Q((e) => e.toUpperCase());
2340
+ function ri() {
2341
+ return /* @__PURE__ */ ne((e) => e.toUpperCase());
2342
2342
  }
2343
2343
  // @__NO_SIDE_EFFECTS__
2344
- function es() {
2345
- return /* @__PURE__ */ Q((e) => wn(e));
2344
+ function oi() {
2345
+ return /* @__PURE__ */ ne((e) => $n(e));
2346
2346
  }
2347
2347
  // @__NO_SIDE_EFFECTS__
2348
- function ts(e, t, n) {
2348
+ function ii(e, t, n) {
2349
2349
  return new e({
2350
2350
  type: "array",
2351
2351
  element: t,
@@ -2356,7 +2356,7 @@ function ts(e, t, n) {
2356
2356
  });
2357
2357
  }
2358
2358
  // @__NO_SIDE_EFFECTS__
2359
- function ns(e, t, n) {
2359
+ function si(e, t, n) {
2360
2360
  return new e({
2361
2361
  type: "custom",
2362
2362
  check: "custom",
@@ -2365,30 +2365,30 @@ function ns(e, t, n) {
2365
2365
  });
2366
2366
  }
2367
2367
  // @__NO_SIDE_EFFECTS__
2368
- function rs(e) {
2369
- const t = /* @__PURE__ */ os((n) => (n.addIssue = (r) => {
2368
+ function ai(e) {
2369
+ const t = /* @__PURE__ */ ci((n) => (n.addIssue = (r) => {
2370
2370
  if (typeof r == "string")
2371
- n.issues.push(se(r, n.value, t._zod.def));
2371
+ n.issues.push(pe(r, n.value, t._zod.def));
2372
2372
  else {
2373
2373
  const o = r;
2374
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(se(o));
2374
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(pe(o));
2375
2375
  }
2376
2376
  }, e(n.value, n)));
2377
2377
  return t;
2378
2378
  }
2379
2379
  // @__NO_SIDE_EFFECTS__
2380
- function os(e, t) {
2381
- const n = new L({
2380
+ function ci(e, t) {
2381
+ const n = new V({
2382
2382
  check: "custom",
2383
2383
  ...g(t)
2384
2384
  });
2385
2385
  return n._zod.check = e, n;
2386
2386
  }
2387
- function Ft(e) {
2387
+ function Lt(e) {
2388
2388
  let t = e?.target ?? "draft-2020-12";
2389
2389
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2390
2390
  processors: e.processors ?? {},
2391
- metadataRegistry: e?.metadata ?? re,
2391
+ metadataRegistry: e?.metadata ?? de,
2392
2392
  target: t,
2393
2393
  unrepresentable: e?.unrepresentable ?? "throw",
2394
2394
  override: e?.override ?? (() => {
@@ -2403,173 +2403,173 @@ function Ft(e) {
2403
2403
  }
2404
2404
  function D(e, t, n = { path: [], schemaPath: [] }) {
2405
2405
  var r;
2406
- const o = e._zod.def, i = t.seen.get(e);
2407
- if (i)
2408
- return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
2409
- const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
2410
- t.seen.set(e, s);
2406
+ const o = e._zod.def, s = t.seen.get(e);
2407
+ if (s)
2408
+ return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
2409
+ const i = { schema: {}, count: 1, cycle: void 0, path: n.path };
2410
+ t.seen.set(e, i);
2411
2411
  const a = e._zod.toJSONSchema?.();
2412
2412
  if (a)
2413
- s.schema = a;
2413
+ i.schema = a;
2414
2414
  else {
2415
- const d = {
2415
+ const f = {
2416
2416
  ...n,
2417
2417
  schemaPath: [...n.schemaPath, e],
2418
2418
  path: n.path
2419
2419
  };
2420
2420
  if (e._zod.processJSONSchema)
2421
- e._zod.processJSONSchema(t, s.schema, d);
2421
+ e._zod.processJSONSchema(t, i.schema, f);
2422
2422
  else {
2423
- const m = s.schema, p = t.processors[o.type];
2423
+ const h = i.schema, p = t.processors[o.type];
2424
2424
  if (!p)
2425
2425
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2426
- p(e, t, m, d);
2426
+ p(e, t, h, f);
2427
2427
  }
2428
2428
  const _ = e._zod.parent;
2429
- _ && (s.ref || (s.ref = _), D(_, t, d), t.seen.get(_).isParent = !0);
2429
+ _ && (i.ref || (i.ref = _), D(_, t, f), t.seen.get(_).isParent = !0);
2430
2430
  }
2431
2431
  const c = t.metadataRegistry.get(e);
2432
- return c && Object.assign(s.schema, c), t.io === "input" && I(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
2432
+ return c && Object.assign(i.schema, c), t.io === "input" && C(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2433
2433
  }
2434
- function Ut(e, t) {
2434
+ function Jt(e, t) {
2435
2435
  const n = e.seen.get(t);
2436
2436
  if (!n)
2437
2437
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2438
2438
  const r = /* @__PURE__ */ new Map();
2439
- for (const s of e.seen.entries()) {
2440
- const a = e.metadataRegistry.get(s[0])?.id;
2439
+ for (const i of e.seen.entries()) {
2440
+ const a = e.metadataRegistry.get(i[0])?.id;
2441
2441
  if (a) {
2442
2442
  const c = r.get(a);
2443
- if (c && c !== s[0])
2443
+ if (c && c !== i[0])
2444
2444
  throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2445
- r.set(a, s[0]);
2445
+ r.set(a, i[0]);
2446
2446
  }
2447
2447
  }
2448
- const o = (s) => {
2448
+ const o = (i) => {
2449
2449
  const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
2450
2450
  if (e.external) {
2451
- const _ = e.external.registry.get(s[0])?.id, m = e.external.uri ?? ((w) => w);
2451
+ const _ = e.external.registry.get(i[0])?.id, h = e.external.uri ?? ((b) => b);
2452
2452
  if (_)
2453
- return { ref: m(_) };
2454
- const p = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
2455
- return s[1].defId = p, { defId: p, ref: `${m("__shared")}#/${a}/${p}` };
2453
+ return { ref: h(_) };
2454
+ const p = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
2455
+ return i[1].defId = p, { defId: p, ref: `${h("__shared")}#/${a}/${p}` };
2456
2456
  }
2457
- if (s[1] === n)
2457
+ if (i[1] === n)
2458
2458
  return { ref: "#" };
2459
- const f = `#/${a}/`, d = s[1].schema.id ?? `__schema${e.counter++}`;
2460
- return { defId: d, ref: f + d };
2461
- }, i = (s) => {
2462
- if (s[1].schema.$ref)
2459
+ const d = `#/${a}/`, f = i[1].schema.id ?? `__schema${e.counter++}`;
2460
+ return { defId: f, ref: d + f };
2461
+ }, s = (i) => {
2462
+ if (i[1].schema.$ref)
2463
2463
  return;
2464
- const a = s[1], { ref: c, defId: f } = o(s);
2465
- a.def = { ...a.schema }, f && (a.defId = f);
2466
- const d = a.schema;
2467
- for (const _ in d)
2468
- delete d[_];
2469
- d.$ref = c;
2464
+ const a = i[1], { ref: c, defId: d } = o(i);
2465
+ a.def = { ...a.schema }, d && (a.defId = d);
2466
+ const f = a.schema;
2467
+ for (const _ in f)
2468
+ delete f[_];
2469
+ f.$ref = c;
2470
2470
  };
2471
2471
  if (e.cycles === "throw")
2472
- for (const s of e.seen.entries()) {
2473
- const a = s[1];
2472
+ for (const i of e.seen.entries()) {
2473
+ const a = i[1];
2474
2474
  if (a.cycle)
2475
2475
  throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
2476
2476
 
2477
2477
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2478
2478
  }
2479
- for (const s of e.seen.entries()) {
2480
- const a = s[1];
2481
- if (t === s[0]) {
2482
- i(s);
2479
+ for (const i of e.seen.entries()) {
2480
+ const a = i[1];
2481
+ if (t === i[0]) {
2482
+ s(i);
2483
2483
  continue;
2484
2484
  }
2485
2485
  if (e.external) {
2486
- const f = e.external.registry.get(s[0])?.id;
2487
- if (t !== s[0] && f) {
2488
- i(s);
2486
+ const d = e.external.registry.get(i[0])?.id;
2487
+ if (t !== i[0] && d) {
2488
+ s(i);
2489
2489
  continue;
2490
2490
  }
2491
2491
  }
2492
- if (e.metadataRegistry.get(s[0])?.id) {
2493
- i(s);
2492
+ if (e.metadataRegistry.get(i[0])?.id) {
2493
+ s(i);
2494
2494
  continue;
2495
2495
  }
2496
2496
  if (a.cycle) {
2497
- i(s);
2497
+ s(i);
2498
2498
  continue;
2499
2499
  }
2500
2500
  if (a.count > 1 && e.reused === "ref") {
2501
- i(s);
2501
+ s(i);
2502
2502
  continue;
2503
2503
  }
2504
2504
  }
2505
2505
  }
2506
- function Lt(e, t) {
2506
+ function Mt(e, t) {
2507
2507
  const n = e.seen.get(t);
2508
2508
  if (!n)
2509
2509
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2510
- const r = (s) => {
2511
- const a = e.seen.get(s);
2510
+ const r = (i) => {
2511
+ const a = e.seen.get(i);
2512
2512
  if (a.ref === null)
2513
2513
  return;
2514
- const c = a.def ?? a.schema, f = { ...c }, d = a.ref;
2515
- if (a.ref = null, d) {
2516
- r(d);
2517
- const m = e.seen.get(d), p = m.schema;
2518
- if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(p)) : Object.assign(c, p), Object.assign(c, f), s._zod.parent === d)
2514
+ const c = a.def ?? a.schema, d = { ...c }, f = a.ref;
2515
+ if (a.ref = null, f) {
2516
+ r(f);
2517
+ const h = e.seen.get(f), p = h.schema;
2518
+ if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(p)) : Object.assign(c, p), Object.assign(c, d), i._zod.parent === f)
2519
2519
  for (const y in c)
2520
- y === "$ref" || y === "allOf" || y in f || delete c[y];
2521
- if (p.$ref && m.def)
2520
+ y === "$ref" || y === "allOf" || y in d || delete c[y];
2521
+ if (p.$ref && h.def)
2522
2522
  for (const y in c)
2523
- y === "$ref" || y === "allOf" || y in m.def && JSON.stringify(c[y]) === JSON.stringify(m.def[y]) && delete c[y];
2523
+ y === "$ref" || y === "allOf" || y in h.def && JSON.stringify(c[y]) === JSON.stringify(h.def[y]) && delete c[y];
2524
2524
  }
2525
- const _ = s._zod.parent;
2526
- if (_ && _ !== d) {
2525
+ const _ = i._zod.parent;
2526
+ if (_ && _ !== f) {
2527
2527
  r(_);
2528
- const m = e.seen.get(_);
2529
- if (m?.schema.$ref && (c.$ref = m.schema.$ref, m.def))
2528
+ const h = e.seen.get(_);
2529
+ if (h?.schema.$ref && (c.$ref = h.schema.$ref, h.def))
2530
2530
  for (const p in c)
2531
- p === "$ref" || p === "allOf" || p in m.def && JSON.stringify(c[p]) === JSON.stringify(m.def[p]) && delete c[p];
2531
+ p === "$ref" || p === "allOf" || p in h.def && JSON.stringify(c[p]) === JSON.stringify(h.def[p]) && delete c[p];
2532
2532
  }
2533
2533
  e.override({
2534
- zodSchema: s,
2534
+ zodSchema: i,
2535
2535
  jsonSchema: c,
2536
2536
  path: a.path ?? []
2537
2537
  });
2538
2538
  };
2539
- for (const s of [...e.seen.entries()].reverse())
2540
- r(s[0]);
2539
+ for (const i of [...e.seen.entries()].reverse())
2540
+ r(i[0]);
2541
2541
  const o = {};
2542
2542
  if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2543
- const s = e.external.registry.get(t)?.id;
2544
- if (!s)
2543
+ const i = e.external.registry.get(t)?.id;
2544
+ if (!i)
2545
2545
  throw new Error("Schema is missing an `id` property");
2546
- o.$id = e.external.uri(s);
2546
+ o.$id = e.external.uri(i);
2547
2547
  }
2548
2548
  Object.assign(o, n.def ?? n.schema);
2549
- const i = e.external?.defs ?? {};
2550
- for (const s of e.seen.entries()) {
2551
- const a = s[1];
2552
- a.def && a.defId && (i[a.defId] = a.def);
2549
+ const s = e.external?.defs ?? {};
2550
+ for (const i of e.seen.entries()) {
2551
+ const a = i[1];
2552
+ a.def && a.defId && (s[a.defId] = a.def);
2553
2553
  }
2554
- e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
2554
+ e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
2555
2555
  try {
2556
- const s = JSON.parse(JSON.stringify(o));
2557
- return Object.defineProperty(s, "~standard", {
2556
+ const i = JSON.parse(JSON.stringify(o));
2557
+ return Object.defineProperty(i, "~standard", {
2558
2558
  value: {
2559
2559
  ...t["~standard"],
2560
2560
  jsonSchema: {
2561
- input: _e(t, "input", e.processors),
2562
- output: _e(t, "output", e.processors)
2561
+ input: $e(t, "input", e.processors),
2562
+ output: $e(t, "output", e.processors)
2563
2563
  }
2564
2564
  },
2565
2565
  enumerable: !1,
2566
2566
  writable: !1
2567
- }), s;
2567
+ }), i;
2568
2568
  } catch {
2569
2569
  throw new Error("Error converting schema to JSON.");
2570
2570
  }
2571
2571
  }
2572
- function I(e, t) {
2572
+ function C(e, t) {
2573
2573
  const n = t ?? { seen: /* @__PURE__ */ new Set() };
2574
2574
  if (n.seen.has(e))
2575
2575
  return !1;
@@ -2578,203 +2578,203 @@ function I(e, t) {
2578
2578
  if (r.type === "transform")
2579
2579
  return !0;
2580
2580
  if (r.type === "array")
2581
- return I(r.element, n);
2581
+ return C(r.element, n);
2582
2582
  if (r.type === "set")
2583
- return I(r.valueType, n);
2583
+ return C(r.valueType, n);
2584
2584
  if (r.type === "lazy")
2585
- return I(r.getter(), n);
2585
+ return C(r.getter(), n);
2586
2586
  if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
2587
- return I(r.innerType, n);
2587
+ return C(r.innerType, n);
2588
2588
  if (r.type === "intersection")
2589
- return I(r.left, n) || I(r.right, n);
2589
+ return C(r.left, n) || C(r.right, n);
2590
2590
  if (r.type === "record" || r.type === "map")
2591
- return I(r.keyType, n) || I(r.valueType, n);
2591
+ return C(r.keyType, n) || C(r.valueType, n);
2592
2592
  if (r.type === "pipe")
2593
- return I(r.in, n) || I(r.out, n);
2593
+ return C(r.in, n) || C(r.out, n);
2594
2594
  if (r.type === "object") {
2595
2595
  for (const o in r.shape)
2596
- if (I(r.shape[o], n))
2596
+ if (C(r.shape[o], n))
2597
2597
  return !0;
2598
2598
  return !1;
2599
2599
  }
2600
2600
  if (r.type === "union") {
2601
2601
  for (const o of r.options)
2602
- if (I(o, n))
2602
+ if (C(o, n))
2603
2603
  return !0;
2604
2604
  return !1;
2605
2605
  }
2606
2606
  if (r.type === "tuple") {
2607
2607
  for (const o of r.items)
2608
- if (I(o, n))
2608
+ if (C(o, n))
2609
2609
  return !0;
2610
- return !!(r.rest && I(r.rest, n));
2610
+ return !!(r.rest && C(r.rest, n));
2611
2611
  }
2612
2612
  return !1;
2613
2613
  }
2614
- const ss = (e, t = {}) => (n) => {
2615
- const r = Ft({ ...n, processors: t });
2616
- return D(e, r), Ut(r, e), Lt(r, e);
2617
- }, _e = (e, t, n = {}) => (r) => {
2618
- const { libraryOptions: o, target: i } = r ?? {}, s = Ft({ ...o ?? {}, target: i, io: t, processors: n });
2619
- return D(e, s), Ut(s, e), Lt(s, e);
2620
- }, is = {
2614
+ const ui = (e, t = {}) => (n) => {
2615
+ const r = Lt({ ...n, processors: t });
2616
+ return D(e, r), Jt(r, e), Mt(r, e);
2617
+ }, $e = (e, t, n = {}) => (r) => {
2618
+ const { libraryOptions: o, target: s } = r ?? {}, i = Lt({ ...o ?? {}, target: s, io: t, processors: n });
2619
+ return D(e, i), Jt(i, e), Mt(i, e);
2620
+ }, li = {
2621
2621
  guid: "uuid",
2622
2622
  url: "uri",
2623
2623
  datetime: "date-time",
2624
2624
  json_string: "json-string",
2625
2625
  regex: ""
2626
2626
  // do not set
2627
- }, as = (e, t, n, r) => {
2627
+ }, di = (e, t, n, r) => {
2628
2628
  const o = n;
2629
2629
  o.type = "string";
2630
- const { minimum: i, maximum: s, format: a, patterns: c, contentEncoding: f } = e._zod.bag;
2631
- if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = is[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), f && (o.contentEncoding = f), c && c.size > 0) {
2632
- const d = [...c];
2633
- d.length === 1 ? o.pattern = d[0].source : d.length > 1 && (o.allOf = [
2634
- ...d.map((_) => ({
2630
+ const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: d } = e._zod.bag;
2631
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = li[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), d && (o.contentEncoding = d), c && c.size > 0) {
2632
+ const f = [...c];
2633
+ f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
2634
+ ...f.map((_) => ({
2635
2635
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2636
2636
  pattern: _.source
2637
2637
  }))
2638
2638
  ]);
2639
2639
  }
2640
- }, cs = (e, t, n, r) => {
2640
+ }, fi = (e, t, n, r) => {
2641
2641
  n.not = {};
2642
- }, us = (e, t, n, r) => {
2643
- }, ls = (e, t, n, r) => {
2644
- const o = e._zod.def, i = kt(o.entries);
2645
- i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
2646
- }, fs = (e, t, n, r) => {
2642
+ }, pi = (e, t, n, r) => {
2643
+ }, mi = (e, t, n, r) => {
2644
+ const o = e._zod.def, s = Tt(o.entries);
2645
+ s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), n.enum = s;
2646
+ }, hi = (e, t, n, r) => {
2647
2647
  if (t.unrepresentable === "throw")
2648
2648
  throw new Error("Custom types cannot be represented in JSON Schema");
2649
- }, ds = (e, t, n, r) => {
2649
+ }, gi = (e, t, n, r) => {
2650
2650
  if (t.unrepresentable === "throw")
2651
2651
  throw new Error("Transforms cannot be represented in JSON Schema");
2652
- }, ps = (e, t, n, r) => {
2653
- const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
2654
- typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = D(i.element, t, { ...r, path: [...r.path, "items"] });
2655
- }, hs = (e, t, n, r) => {
2656
- const o = n, i = e._zod.def;
2652
+ }, _i = (e, t, n, r) => {
2653
+ const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
2654
+ typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = D(s.element, t, { ...r, path: [...r.path, "items"] });
2655
+ }, vi = (e, t, n, r) => {
2656
+ const o = n, s = e._zod.def;
2657
2657
  o.type = "object", o.properties = {};
2658
- const s = i.shape;
2659
- for (const f in s)
2660
- o.properties[f] = D(s[f], t, {
2658
+ const i = s.shape;
2659
+ for (const d in i)
2660
+ o.properties[d] = D(i[d], t, {
2661
2661
  ...r,
2662
- path: [...r.path, "properties", f]
2662
+ path: [...r.path, "properties", d]
2663
2663
  });
2664
- const a = new Set(Object.keys(s)), c = new Set([...a].filter((f) => {
2665
- const d = i.shape[f]._zod;
2666
- return t.io === "input" ? d.optin === void 0 : d.optout === void 0;
2664
+ const a = new Set(Object.keys(i)), c = new Set([...a].filter((d) => {
2665
+ const f = s.shape[d]._zod;
2666
+ return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
2667
2667
  }));
2668
- c.size > 0 && (o.required = Array.from(c)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = D(i.catchall, t, {
2668
+ c.size > 0 && (o.required = Array.from(c)), s.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = D(s.catchall, t, {
2669
2669
  ...r,
2670
2670
  path: [...r.path, "additionalProperties"]
2671
2671
  })) : t.io === "output" && (o.additionalProperties = !1);
2672
- }, ms = (e, t, n, r) => {
2673
- const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => D(a, t, {
2672
+ }, yi = (e, t, n, r) => {
2673
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => D(a, t, {
2674
2674
  ...r,
2675
- path: [...r.path, i ? "oneOf" : "anyOf", c]
2675
+ path: [...r.path, s ? "oneOf" : "anyOf", c]
2676
2676
  }));
2677
- i ? n.oneOf = s : n.anyOf = s;
2678
- }, gs = (e, t, n, r) => {
2679
- const o = e._zod.def, i = D(o.left, t, {
2677
+ s ? n.oneOf = i : n.anyOf = i;
2678
+ }, bi = (e, t, n, r) => {
2679
+ const o = e._zod.def, s = D(o.left, t, {
2680
2680
  ...r,
2681
2681
  path: [...r.path, "allOf", 0]
2682
- }), s = D(o.right, t, {
2682
+ }), i = D(o.right, t, {
2683
2683
  ...r,
2684
2684
  path: [...r.path, "allOf", 1]
2685
- }), a = (f) => "allOf" in f && Object.keys(f).length === 1, c = [
2686
- ...a(i) ? i.allOf : [i],
2687
- ...a(s) ? s.allOf : [s]
2685
+ }), a = (d) => "allOf" in d && Object.keys(d).length === 1, c = [
2686
+ ...a(s) ? s.allOf : [s],
2687
+ ...a(i) ? i.allOf : [i]
2688
2688
  ];
2689
2689
  n.allOf = c;
2690
- }, _s = (e, t, n, r) => {
2691
- const o = e._zod.def, i = D(o.innerType, t, r), s = t.seen.get(e);
2692
- t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
2693
- }, vs = (e, t, n, r) => {
2690
+ }, wi = (e, t, n, r) => {
2691
+ const o = e._zod.def, s = D(o.innerType, t, r), i = t.seen.get(e);
2692
+ t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
2693
+ }, zi = (e, t, n, r) => {
2694
2694
  const o = e._zod.def;
2695
2695
  D(o.innerType, t, r);
2696
- const i = t.seen.get(e);
2697
- i.ref = o.innerType;
2698
- }, ys = (e, t, n, r) => {
2696
+ const s = t.seen.get(e);
2697
+ s.ref = o.innerType;
2698
+ }, ki = (e, t, n, r) => {
2699
2699
  const o = e._zod.def;
2700
2700
  D(o.innerType, t, r);
2701
- const i = t.seen.get(e);
2702
- i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2703
- }, ws = (e, t, n, r) => {
2701
+ const s = t.seen.get(e);
2702
+ s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2703
+ }, $i = (e, t, n, r) => {
2704
2704
  const o = e._zod.def;
2705
2705
  D(o.innerType, t, r);
2706
- const i = t.seen.get(e);
2707
- i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2708
- }, bs = (e, t, n, r) => {
2706
+ const s = t.seen.get(e);
2707
+ s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2708
+ }, Ti = (e, t, n, r) => {
2709
2709
  const o = e._zod.def;
2710
2710
  D(o.innerType, t, r);
2711
- const i = t.seen.get(e);
2712
- i.ref = o.innerType;
2713
- let s;
2711
+ const s = t.seen.get(e);
2712
+ s.ref = o.innerType;
2713
+ let i;
2714
2714
  try {
2715
- s = o.catchValue(void 0);
2715
+ i = o.catchValue(void 0);
2716
2716
  } catch {
2717
2717
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2718
2718
  }
2719
- n.default = s;
2720
- }, zs = (e, t, n, r) => {
2721
- const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2722
- D(i, t, r);
2723
- const s = t.seen.get(e);
2724
- s.ref = i;
2725
- }, ks = (e, t, n, r) => {
2719
+ n.default = i;
2720
+ }, ji = (e, t, n, r) => {
2721
+ const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2722
+ D(s, t, r);
2723
+ const i = t.seen.get(e);
2724
+ i.ref = s;
2725
+ }, Oi = (e, t, n, r) => {
2726
2726
  const o = e._zod.def;
2727
2727
  D(o.innerType, t, r);
2728
- const i = t.seen.get(e);
2729
- i.ref = o.innerType, n.readOnly = !0;
2730
- }, Jt = (e, t, n, r) => {
2728
+ const s = t.seen.get(e);
2729
+ s.ref = o.innerType, n.readOnly = !0;
2730
+ }, Vt = (e, t, n, r) => {
2731
2731
  const o = e._zod.def;
2732
2732
  D(o.innerType, t, r);
2733
- const i = t.seen.get(e);
2734
- i.ref = o.innerType;
2735
- }, $s = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2736
- Dr.init(e, t), $.init(e, t);
2733
+ const s = t.seen.get(e);
2734
+ s.ref = o.innerType;
2735
+ }, Si = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2736
+ Fr.init(e, t), $.init(e, t);
2737
2737
  });
2738
- function Ts(e) {
2739
- return /* @__PURE__ */ Co($s, e);
2738
+ function Zi(e) {
2739
+ return /* @__PURE__ */ Jo(Si, e);
2740
2740
  }
2741
- const Os = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2742
- Ar.init(e, t), $.init(e, t);
2741
+ const Ei = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2742
+ Ur.init(e, t), $.init(e, t);
2743
2743
  });
2744
- function js(e) {
2745
- return /* @__PURE__ */ Fo(Os, e);
2744
+ function xi(e) {
2745
+ return /* @__PURE__ */ Mo(Ei, e);
2746
2746
  }
2747
- const Ss = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2748
- Ir.init(e, t), $.init(e, t);
2747
+ const Ri = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2748
+ Lr.init(e, t), $.init(e, t);
2749
2749
  });
2750
- function Zs(e) {
2751
- return /* @__PURE__ */ Uo(Ss, e);
2750
+ function Pi(e) {
2751
+ return /* @__PURE__ */ Vo(Ri, e);
2752
2752
  }
2753
- const Es = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2754
- Cr.init(e, t), $.init(e, t);
2753
+ const Di = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2754
+ Jr.init(e, t), $.init(e, t);
2755
2755
  });
2756
- function xs(e) {
2757
- return /* @__PURE__ */ Lo(Es, e);
2756
+ function Ni(e) {
2757
+ return /* @__PURE__ */ Wo(Di, e);
2758
2758
  }
2759
- const Rs = (e, t) => {
2760
- St.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2759
+ const Ii = (e, t) => {
2760
+ Et.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2761
2761
  format: {
2762
- value: (n) => Rn(e, n)
2762
+ value: (n) => In(e, n)
2763
2763
  // enumerable: false,
2764
2764
  },
2765
2765
  flatten: {
2766
- value: (n) => xn(e, n)
2766
+ value: (n) => Nn(e, n)
2767
2767
  // enumerable: false,
2768
2768
  },
2769
2769
  addIssue: {
2770
2770
  value: (n) => {
2771
- e.issues.push(n), e.message = JSON.stringify(e.issues, je, 2);
2771
+ e.issues.push(n), e.message = JSON.stringify(e.issues, Pe, 2);
2772
2772
  }
2773
2773
  // enumerable: false,
2774
2774
  },
2775
2775
  addIssues: {
2776
2776
  value: (n) => {
2777
- e.issues.push(...n), e.message = JSON.stringify(e.issues, je, 2);
2777
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, Pe, 2);
2778
2778
  }
2779
2779
  // enumerable: false,
2780
2780
  },
@@ -2785,431 +2785,467 @@ const Rs = (e, t) => {
2785
2785
  // enumerable: false,
2786
2786
  }
2787
2787
  });
2788
- }, U = u("ZodError", Rs, {
2788
+ }, J = u("ZodError", Ii, {
2789
2789
  Parent: Error
2790
- }), Ps = /* @__PURE__ */ Je(U), Ns = /* @__PURE__ */ Me(U), Ds = /* @__PURE__ */ ye(U), As = /* @__PURE__ */ we(U), Is = /* @__PURE__ */ Dn(U), Cs = /* @__PURE__ */ An(U), Fs = /* @__PURE__ */ In(U), Us = /* @__PURE__ */ Cn(U), Ls = /* @__PURE__ */ Fn(U), Js = /* @__PURE__ */ Un(U), Ms = /* @__PURE__ */ Ln(U), Vs = /* @__PURE__ */ Jn(U), R = /* @__PURE__ */ u("ZodType", (e, t) => (x.init(e, t), Object.assign(e["~standard"], {
2790
+ }), Ai = /* @__PURE__ */ Be(J), Ci = /* @__PURE__ */ qe(J), Fi = /* @__PURE__ */ je(J), Ui = /* @__PURE__ */ Oe(J), Li = /* @__PURE__ */ Fn(J), Ji = /* @__PURE__ */ Un(J), Mi = /* @__PURE__ */ Ln(J), Vi = /* @__PURE__ */ Jn(J), Wi = /* @__PURE__ */ Mn(J), Gi = /* @__PURE__ */ Vn(J), Yi = /* @__PURE__ */ Wn(J), Bi = /* @__PURE__ */ Gn(J), x = /* @__PURE__ */ u("ZodType", (e, t) => (E.init(e, t), Object.assign(e["~standard"], {
2791
2791
  jsonSchema: {
2792
- input: _e(e, "input"),
2793
- output: _e(e, "output")
2792
+ input: $e(e, "input"),
2793
+ output: $e(e, "output")
2794
2794
  }
2795
- }), e.toJSONSchema = ss(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(W(t, {
2795
+ }), e.toJSONSchema = ui(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(W(t, {
2796
2796
  checks: [
2797
2797
  ...t.checks ?? [],
2798
2798
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2799
2799
  ]
2800
2800
  }), {
2801
2801
  parent: !0
2802
- }), e.with = e.check, e.clone = (n, r) => G(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ps(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ds(e, n, r), e.parseAsync = async (n, r) => Ns(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => As(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Is(e, n, r), e.decode = (n, r) => Cs(e, n, r), e.encodeAsync = async (n, r) => Fs(e, n, r), e.decodeAsync = async (n, r) => Us(e, n, r), e.safeEncode = (n, r) => Ls(e, n, r), e.safeDecode = (n, r) => Js(e, n, r), e.safeEncodeAsync = async (n, r) => Ms(e, n, r), e.safeDecodeAsync = async (n, r) => Vs(e, n, r), e.refine = (n, r) => e.check(Ai(n, r)), e.superRefine = (n) => e.check(Ii(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ Q(n)), e.optional = () => _t(e), e.exactOptional = () => ki(e), e.nullable = () => vt(e), e.nullish = () => _t(vt(e)), e.nonoptional = (n) => Zi(e, n), e.array = () => pi(e), e.or = (n) => gi([e, n]), e.and = (n) => vi(e, n), e.transform = (n) => yt(e, bi(n)), e.default = (n) => Oi(e, n), e.prefault = (n) => Si(e, n), e.catch = (n) => xi(e, n), e.pipe = (n) => yt(e, n), e.readonly = () => Ni(e), e.describe = (n) => {
2802
+ }), e.with = e.check, e.clone = (n, r) => G(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ai(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Fi(e, n, r), e.parseAsync = async (n, r) => Ci(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Ui(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Li(e, n, r), e.decode = (n, r) => Ji(e, n, r), e.encodeAsync = async (n, r) => Mi(e, n, r), e.decodeAsync = async (n, r) => Vi(e, n, r), e.safeEncode = (n, r) => Wi(e, n, r), e.safeDecode = (n, r) => Gi(e, n, r), e.safeEncodeAsync = async (n, r) => Yi(e, n, r), e.safeDecodeAsync = async (n, r) => Bi(e, n, r), e.refine = (n, r) => e.check(Fs(n, r)), e.superRefine = (n) => e.check(Us(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ ne(n)), e.optional = () => vt(e), e.exactOptional = () => js(e), e.nullable = () => yt(e), e.nullish = () => vt(yt(e)), e.nonoptional = (n) => Rs(e, n), e.array = () => _s(e), e.or = (n) => bs([e, n]), e.and = (n) => zs(e, n), e.transform = (n) => bt(e, $s(n)), e.default = (n) => Zs(e, n), e.prefault = (n) => xs(e, n), e.catch = (n) => Ds(e, n), e.pipe = (n) => bt(e, n), e.readonly = () => As(e), e.describe = (n) => {
2803
2803
  const r = e.clone();
2804
- return re.add(r, { description: n }), r;
2804
+ return de.add(r, { description: n }), r;
2805
2805
  }, Object.defineProperty(e, "description", {
2806
2806
  get() {
2807
- return re.get(e)?.description;
2807
+ return de.get(e)?.description;
2808
2808
  },
2809
2809
  configurable: !0
2810
2810
  }), e.meta = (...n) => {
2811
2811
  if (n.length === 0)
2812
- return re.get(e);
2812
+ return de.get(e);
2813
2813
  const r = e.clone();
2814
- return re.add(r, n[0]), r;
2815
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Mt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2816
- Ve.init(e, t), R.init(e, t), e._zod.processJSONSchema = (r, o, i) => as(e, r, o);
2814
+ return de.add(r, n[0]), r;
2815
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Wt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2816
+ Ke.init(e, t), x.init(e, t), e._zod.processJSONSchema = (r, o, s) => di(e, r, o);
2817
2817
  const n = e._zod.bag;
2818
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Vo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Yo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Bo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ qo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ge(...r)), e.max = (...r) => e.check(/* @__PURE__ */ It(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ct(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ge(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Wo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Go(r)), e.trim = () => e.check(/* @__PURE__ */ Ho()), e.normalize = (...r) => e.check(/* @__PURE__ */ Ko(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Xo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Qo()), e.slugify = () => e.check(/* @__PURE__ */ es());
2819
- }), Ws = /* @__PURE__ */ u("ZodString", (e, t) => {
2820
- Ve.init(e, t), Mt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ _o(Gs, n)), e.url = (n) => e.check(/* @__PURE__ */ zo(Ys, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Io(ci, n)), e.emoji = (n) => e.check(/* @__PURE__ */ ko(Bs, n)), e.guid = (n) => e.check(/* @__PURE__ */ ht(mt, n)), e.uuid = (n) => e.check(/* @__PURE__ */ vo(pe, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ yo(pe, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ wo(pe, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ bo(pe, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ $o(qs, n)), e.guid = (n) => e.check(/* @__PURE__ */ ht(mt, n)), e.cuid = (n) => e.check(/* @__PURE__ */ To(Ks, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Oo(Hs, n)), e.ulid = (n) => e.check(/* @__PURE__ */ jo(Xs, n)), e.base64 = (n) => e.check(/* @__PURE__ */ No(si, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Do(ii, n)), e.xid = (n) => e.check(/* @__PURE__ */ So(Qs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Zo(ei, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Eo(ti, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ xo(ni, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Ro(ri, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Po(oi, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Ao(ai, n)), e.datetime = (n) => e.check(Ts(n)), e.date = (n) => e.check(js(n)), e.time = (n) => e.check(Zs(n)), e.duration = (n) => e.check(xs(n));
2818
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Bo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Ho(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Xo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Qo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ke(...r)), e.max = (...r) => e.check(/* @__PURE__ */ Ft(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ut(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ke(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ qo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Ko(r)), e.trim = () => e.check(/* @__PURE__ */ ti()), e.normalize = (...r) => e.check(/* @__PURE__ */ ei(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ ni()), e.toUpperCase = () => e.check(/* @__PURE__ */ ri()), e.slugify = () => e.check(/* @__PURE__ */ oi());
2819
+ }), qi = /* @__PURE__ */ u("ZodString", (e, t) => {
2820
+ Ke.init(e, t), Wt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ wo(Ki, n)), e.url = (n) => e.check(/* @__PURE__ */ jo(Hi, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Lo(fs, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Oo(Xi, n)), e.guid = (n) => e.check(/* @__PURE__ */ ht(gt, n)), e.uuid = (n) => e.check(/* @__PURE__ */ zo(be, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ ko(be, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ $o(be, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ To(be, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ So(Qi, n)), e.guid = (n) => e.check(/* @__PURE__ */ ht(gt, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Zo(es, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Eo(ts, n)), e.ulid = (n) => e.check(/* @__PURE__ */ xo(ns, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Co(us, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Fo(ls, n)), e.xid = (n) => e.check(/* @__PURE__ */ Ro(rs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Po(os, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Do(is, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ No(ss, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Io(as, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Ao(cs, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Uo(ds, n)), e.datetime = (n) => e.check(Zi(n)), e.date = (n) => e.check(xi(n)), e.time = (n) => e.check(Pi(n)), e.duration = (n) => e.check(Ni(n));
2821
2821
  });
2822
- function V(e) {
2823
- return /* @__PURE__ */ go(Ws, e);
2822
+ function L(e) {
2823
+ return /* @__PURE__ */ bo(qi, e);
2824
2824
  }
2825
2825
  const $ = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2826
- k.init(e, t), Mt.init(e, t);
2827
- }), Gs = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2828
- Or.init(e, t), $.init(e, t);
2829
- }), mt = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2830
- $r.init(e, t), $.init(e, t);
2831
- }), pe = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2832
- Tr.init(e, t), $.init(e, t);
2833
- }), Ys = /* @__PURE__ */ u("ZodURL", (e, t) => {
2834
- jr.init(e, t), $.init(e, t);
2835
- }), Bs = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2826
+ k.init(e, t), Wt.init(e, t);
2827
+ }), Ki = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2828
+ Er.init(e, t), $.init(e, t);
2829
+ }), gt = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2836
2830
  Sr.init(e, t), $.init(e, t);
2837
- }), qs = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2831
+ }), be = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2838
2832
  Zr.init(e, t), $.init(e, t);
2839
- }), Ks = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2840
- Er.init(e, t), $.init(e, t);
2841
- }), Hs = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2833
+ }), Hi = /* @__PURE__ */ u("ZodURL", (e, t) => {
2842
2834
  xr.init(e, t), $.init(e, t);
2843
- }), Xs = /* @__PURE__ */ u("ZodULID", (e, t) => {
2835
+ }), Xi = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2844
2836
  Rr.init(e, t), $.init(e, t);
2845
- }), Qs = /* @__PURE__ */ u("ZodXID", (e, t) => {
2837
+ }), Qi = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2846
2838
  Pr.init(e, t), $.init(e, t);
2847
- }), ei = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2839
+ }), es = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2840
+ Dr.init(e, t), $.init(e, t);
2841
+ }), ts = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2848
2842
  Nr.init(e, t), $.init(e, t);
2849
- }), ti = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2850
- Fr.init(e, t), $.init(e, t);
2851
- }), ni = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2852
- Ur.init(e, t), $.init(e, t);
2853
- }), ri = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2854
- Lr.init(e, t), $.init(e, t);
2855
- }), oi = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2856
- Jr.init(e, t), $.init(e, t);
2857
- }), si = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2843
+ }), ns = /* @__PURE__ */ u("ZodULID", (e, t) => {
2844
+ Ir.init(e, t), $.init(e, t);
2845
+ }), rs = /* @__PURE__ */ u("ZodXID", (e, t) => {
2846
+ Ar.init(e, t), $.init(e, t);
2847
+ }), os = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2848
+ Cr.init(e, t), $.init(e, t);
2849
+ }), is = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2858
2850
  Mr.init(e, t), $.init(e, t);
2859
- }), ii = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2851
+ }), ss = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2852
+ Vr.init(e, t), $.init(e, t);
2853
+ }), as = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2860
2854
  Wr.init(e, t), $.init(e, t);
2861
- }), ai = /* @__PURE__ */ u("ZodE164", (e, t) => {
2855
+ }), cs = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2862
2856
  Gr.init(e, t), $.init(e, t);
2863
- }), ci = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2864
- Br.init(e, t), $.init(e, t);
2865
- }), ui = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2866
- qr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => us();
2857
+ }), us = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2858
+ Yr.init(e, t), $.init(e, t);
2859
+ }), ls = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2860
+ qr.init(e, t), $.init(e, t);
2861
+ }), ds = /* @__PURE__ */ u("ZodE164", (e, t) => {
2862
+ Kr.init(e, t), $.init(e, t);
2863
+ }), fs = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2864
+ Xr.init(e, t), $.init(e, t);
2865
+ }), ps = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2866
+ Qr.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => pi();
2867
2867
  });
2868
- function gt() {
2869
- return /* @__PURE__ */ Jo(ui);
2868
+ function _t() {
2869
+ return /* @__PURE__ */ Go(ps);
2870
2870
  }
2871
- const li = /* @__PURE__ */ u("ZodNever", (e, t) => {
2872
- Kr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n, r);
2871
+ const ms = /* @__PURE__ */ u("ZodNever", (e, t) => {
2872
+ eo.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => fi(e, n, r);
2873
2873
  });
2874
- function fi(e) {
2875
- return /* @__PURE__ */ Mo(li, e);
2874
+ function hs(e) {
2875
+ return /* @__PURE__ */ Yo(ms, e);
2876
2876
  }
2877
- const di = /* @__PURE__ */ u("ZodArray", (e, t) => {
2878
- Hr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ ge(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ ge(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ It(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Ct(n, r)), e.unwrap = () => e.element;
2877
+ const gs = /* @__PURE__ */ u("ZodArray", (e, t) => {
2878
+ to.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => _i(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ ke(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ ke(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ Ft(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Ut(n, r)), e.unwrap = () => e.element;
2879
2879
  });
2880
- function pi(e, t) {
2881
- return /* @__PURE__ */ ts(di, e, t);
2880
+ function _s(e, t) {
2881
+ return /* @__PURE__ */ ii(gs, e, t);
2882
2882
  }
2883
- const hi = /* @__PURE__ */ u("ZodObject", (e, t) => {
2884
- Qr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), z(e, "shape", () => t.shape), e.keyof = () => yi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: gt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: gt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: fi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => On(e, n), e.safeExtend = (n) => jn(e, n), e.merge = (n) => Sn(e, n), e.pick = (n) => $n(e, n), e.omit = (n) => Tn(e, n), e.partial = (...n) => Zn(Wt, e, n[0]), e.required = (...n) => En(Gt, e, n[0]);
2883
+ const vs = /* @__PURE__ */ u("ZodObject", (e, t) => {
2884
+ ro.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => vi(e, n, r, o), z(e, "shape", () => t.shape), e.keyof = () => Yt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: _t() }), e.loose = () => e.clone({ ...e._zod.def, catchall: _t() }), e.strict = () => e.clone({ ...e._zod.def, catchall: hs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => En(e, n), e.safeExtend = (n) => xn(e, n), e.merge = (n) => Rn(e, n), e.pick = (n) => Sn(e, n), e.omit = (n) => Zn(e, n), e.partial = (...n) => Pn(Bt, e, n[0]), e.required = (...n) => Dn(qt, e, n[0]);
2885
2885
  });
2886
- function Vt(e, t) {
2886
+ function Gt(e, t) {
2887
2887
  const n = {
2888
2888
  type: "object",
2889
2889
  shape: e ?? {},
2890
2890
  ...g(t)
2891
2891
  };
2892
- return new hi(n);
2892
+ return new vs(n);
2893
2893
  }
2894
- const mi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2895
- eo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.options = t.options;
2894
+ const ys = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2895
+ oo.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => yi(e, n, r, o), e.options = t.options;
2896
2896
  });
2897
- function gi(e, t) {
2898
- return new mi({
2897
+ function bs(e, t) {
2898
+ return new ys({
2899
2899
  type: "union",
2900
2900
  options: e,
2901
2901
  ...g(t)
2902
2902
  });
2903
2903
  }
2904
- const _i = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2905
- to.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o);
2904
+ const ws = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2905
+ io.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => bi(e, n, r, o);
2906
2906
  });
2907
- function vi(e, t) {
2908
- return new _i({
2907
+ function zs(e, t) {
2908
+ return new ws({
2909
2909
  type: "intersection",
2910
2910
  left: e,
2911
2911
  right: t
2912
2912
  });
2913
2913
  }
2914
- const Ze = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2915
- no.init(e, t), R.init(e, t), e._zod.processJSONSchema = (r, o, i) => ls(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2914
+ const Ne = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2915
+ so.init(e, t), x.init(e, t), e._zod.processJSONSchema = (r, o, s) => mi(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2916
2916
  const n = new Set(Object.keys(t.entries));
2917
2917
  e.extract = (r, o) => {
2918
- const i = {};
2919
- for (const s of r)
2920
- if (n.has(s))
2921
- i[s] = t.entries[s];
2918
+ const s = {};
2919
+ for (const i of r)
2920
+ if (n.has(i))
2921
+ s[i] = t.entries[i];
2922
2922
  else
2923
- throw new Error(`Key ${s} not found in enum`);
2924
- return new Ze({
2923
+ throw new Error(`Key ${i} not found in enum`);
2924
+ return new Ne({
2925
2925
  ...t,
2926
2926
  checks: [],
2927
2927
  ...g(o),
2928
- entries: i
2928
+ entries: s
2929
2929
  });
2930
2930
  }, e.exclude = (r, o) => {
2931
- const i = { ...t.entries };
2932
- for (const s of r)
2933
- if (n.has(s))
2934
- delete i[s];
2931
+ const s = { ...t.entries };
2932
+ for (const i of r)
2933
+ if (n.has(i))
2934
+ delete s[i];
2935
2935
  else
2936
- throw new Error(`Key ${s} not found in enum`);
2937
- return new Ze({
2936
+ throw new Error(`Key ${i} not found in enum`);
2937
+ return new Ne({
2938
2938
  ...t,
2939
2939
  checks: [],
2940
2940
  ...g(o),
2941
- entries: i
2941
+ entries: s
2942
2942
  });
2943
2943
  };
2944
2944
  });
2945
- function yi(e, t) {
2945
+ function Yt(e, t) {
2946
2946
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2947
- return new Ze({
2947
+ return new Ne({
2948
2948
  type: "enum",
2949
2949
  entries: n,
2950
2950
  ...g(t)
2951
2951
  });
2952
2952
  }
2953
- const wi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2954
- ro.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n), e._zod.parse = (n, r) => {
2953
+ const ks = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2954
+ ao.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => gi(e, n), e._zod.parse = (n, r) => {
2955
2955
  if (r.direction === "backward")
2956
- throw new bt(e.constructor.name);
2957
- n.addIssue = (i) => {
2958
- if (typeof i == "string")
2959
- n.issues.push(se(i, n.value, t));
2956
+ throw new kt(e.constructor.name);
2957
+ n.addIssue = (s) => {
2958
+ if (typeof s == "string")
2959
+ n.issues.push(pe(s, n.value, t));
2960
2960
  else {
2961
- const s = i;
2962
- s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(se(s));
2961
+ const i = s;
2962
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(pe(i));
2963
2963
  }
2964
2964
  };
2965
2965
  const o = t.transform(n.value, n);
2966
- return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2966
+ return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2967
2967
  };
2968
2968
  });
2969
- function bi(e) {
2970
- return new wi({
2969
+ function $s(e) {
2970
+ return new ks({
2971
2971
  type: "transform",
2972
2972
  transform: e
2973
2973
  });
2974
2974
  }
2975
- const Wt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2976
- At.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2975
+ const Bt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2976
+ Ct.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2977
2977
  });
2978
- function _t(e) {
2979
- return new Wt({
2978
+ function vt(e) {
2979
+ return new Bt({
2980
2980
  type: "optional",
2981
2981
  innerType: e
2982
2982
  });
2983
2983
  }
2984
- const zi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2985
- oo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2984
+ const Ts = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2985
+ co.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2986
2986
  });
2987
- function ki(e) {
2988
- return new zi({
2987
+ function js(e) {
2988
+ return new Ts({
2989
2989
  type: "optional",
2990
2990
  innerType: e
2991
2991
  });
2992
2992
  }
2993
- const $i = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2994
- so.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2993
+ const Os = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2994
+ uo.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => wi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2995
2995
  });
2996
- function vt(e) {
2997
- return new $i({
2996
+ function yt(e) {
2997
+ return new Os({
2998
2998
  type: "nullable",
2999
2999
  innerType: e
3000
3000
  });
3001
3001
  }
3002
- const Ti = /* @__PURE__ */ u("ZodDefault", (e, t) => {
3003
- io.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ys(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3002
+ const Ss = /* @__PURE__ */ u("ZodDefault", (e, t) => {
3003
+ lo.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => ki(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3004
3004
  });
3005
- function Oi(e, t) {
3006
- return new Ti({
3005
+ function Zs(e, t) {
3006
+ return new Ss({
3007
3007
  type: "default",
3008
3008
  innerType: e,
3009
3009
  get defaultValue() {
3010
- return typeof t == "function" ? t() : Tt(t);
3010
+ return typeof t == "function" ? t() : Ot(t);
3011
3011
  }
3012
3012
  });
3013
3013
  }
3014
- const ji = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
3015
- ao.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ws(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3014
+ const Es = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
3015
+ fo.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => $i(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3016
3016
  });
3017
- function Si(e, t) {
3018
- return new ji({
3017
+ function xs(e, t) {
3018
+ return new Es({
3019
3019
  type: "prefault",
3020
3020
  innerType: e,
3021
3021
  get defaultValue() {
3022
- return typeof t == "function" ? t() : Tt(t);
3022
+ return typeof t == "function" ? t() : Ot(t);
3023
3023
  }
3024
3024
  });
3025
3025
  }
3026
- const Gt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
3027
- co.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3026
+ const qt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
3027
+ po.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => zi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3028
3028
  });
3029
- function Zi(e, t) {
3030
- return new Gt({
3029
+ function Rs(e, t) {
3030
+ return new qt({
3031
3031
  type: "nonoptional",
3032
3032
  innerType: e,
3033
3033
  ...g(t)
3034
3034
  });
3035
3035
  }
3036
- const Ei = /* @__PURE__ */ u("ZodCatch", (e, t) => {
3037
- uo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => bs(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3036
+ const Ps = /* @__PURE__ */ u("ZodCatch", (e, t) => {
3037
+ mo.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ti(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3038
3038
  });
3039
- function xi(e, t) {
3040
- return new Ei({
3039
+ function Ds(e, t) {
3040
+ return new Ps({
3041
3041
  type: "catch",
3042
3042
  innerType: e,
3043
3043
  catchValue: typeof t == "function" ? t : () => t
3044
3044
  });
3045
3045
  }
3046
- const Ri = /* @__PURE__ */ u("ZodPipe", (e, t) => {
3047
- lo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => zs(e, n, r, o), e.in = t.in, e.out = t.out;
3046
+ const Ns = /* @__PURE__ */ u("ZodPipe", (e, t) => {
3047
+ ho.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => ji(e, n, r, o), e.in = t.in, e.out = t.out;
3048
3048
  });
3049
- function yt(e, t) {
3050
- return new Ri({
3049
+ function bt(e, t) {
3050
+ return new Ns({
3051
3051
  type: "pipe",
3052
3052
  in: e,
3053
3053
  out: t
3054
3054
  // ...util.normalizeParams(params),
3055
3055
  });
3056
3056
  }
3057
- const Pi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
3058
- fo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ks(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3057
+ const Is = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
3058
+ go.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => Oi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3059
3059
  });
3060
- function Ni(e) {
3061
- return new Pi({
3060
+ function As(e) {
3061
+ return new Is({
3062
3062
  type: "readonly",
3063
3063
  innerType: e
3064
3064
  });
3065
3065
  }
3066
- const Di = /* @__PURE__ */ u("ZodCustom", (e, t) => {
3067
- po.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n);
3066
+ const Cs = /* @__PURE__ */ u("ZodCustom", (e, t) => {
3067
+ _o.init(e, t), x.init(e, t), e._zod.processJSONSchema = (n, r, o) => hi(e, n);
3068
3068
  });
3069
- function Ai(e, t = {}) {
3070
- return /* @__PURE__ */ ns(Di, e, t);
3071
- }
3072
- function Ii(e) {
3073
- return /* @__PURE__ */ rs(e);
3074
- }
3075
- const Ci = Vt({
3076
- title: V().optional(),
3077
- date: V().optional(),
3078
- description: V().optional(),
3079
- variant: V().optional()
3080
- }), Fi = Vt({
3081
- mapping: Ci.optional(),
3082
- objectName: V().optional(),
3083
- titleField: V().optional(),
3084
- dateField: V().optional(),
3085
- descriptionField: V().optional()
3086
- }), Ui = ({
3069
+ function Fs(e, t = {}) {
3070
+ return /* @__PURE__ */ si(Cs, e, t);
3071
+ }
3072
+ function Us(e) {
3073
+ return /* @__PURE__ */ ai(e);
3074
+ }
3075
+ const Ls = Gt({
3076
+ title: L().optional(),
3077
+ date: L().optional(),
3078
+ description: L().optional(),
3079
+ variant: L().optional()
3080
+ }), Js = Gt({
3081
+ mapping: Ls.optional(),
3082
+ objectName: L().optional(),
3083
+ titleField: L().optional(),
3084
+ /** @deprecated Use startDateField instead */
3085
+ dateField: L().optional(),
3086
+ startDateField: L().optional(),
3087
+ endDateField: L().optional(),
3088
+ descriptionField: L().optional(),
3089
+ groupByField: L().optional(),
3090
+ colorField: L().optional(),
3091
+ scale: Yt(["hour", "day", "week", "month", "quarter", "year"]).optional()
3092
+ }), Ms = ({
3087
3093
  schema: e,
3088
3094
  dataSource: t,
3089
3095
  className: n,
3090
3096
  onRowClick: r,
3091
3097
  onItemClick: o,
3092
- ...i
3098
+ ...s
3093
3099
  }) => {
3094
- const [s, a] = ce([]), [c, f] = ce(!1), [d, _] = ce(null), [m, p] = ce(0);
3095
- He(() => {
3096
- const N = Fi.safeParse(e);
3097
- N.success || console.warn("[ObjectTimeline] Invalid timeline configuration:", N.error.format());
3100
+ const [i, a] = ce([]), [c, d] = ce(!1), [f, _] = ce(null), [h, p] = ce(0), [b, y] = ce(null), w = e.timeline;
3101
+ Re(() => {
3102
+ const P = Js.safeParse(e);
3103
+ P.success || console.warn("[ObjectTimeline] Invalid timeline configuration:", P.error.format());
3098
3104
  }, [e]);
3099
- const w = ln(e.bind);
3100
- He(() => {
3101
- const N = async () => {
3102
- if (!(!t || !e.objectName)) {
3103
- f(!0);
3105
+ const M = mn(e.bind);
3106
+ Re(() => {
3107
+ let P = !0;
3108
+ return (async () => {
3109
+ if (!(!t || typeof t.getObjectSchema != "function" || !e.objectName))
3104
3110
  try {
3105
- const O = await t.find(e.objectName, {
3106
- options: { $top: 100 }
3107
- });
3108
- let F = O;
3109
- O.records ? F = O.records : O.data && (F = O.data), Array.isArray(F) && a(F);
3110
- } catch (O) {
3111
- console.error(O), _(O);
3111
+ const F = await t.getObjectSchema(e.objectName);
3112
+ P && y(F);
3113
+ } catch (F) {
3114
+ console.warn("Failed to fetch object def for ObjectTimeline", F);
3115
+ }
3116
+ })(), () => {
3117
+ P = !1;
3118
+ };
3119
+ }, [e.objectName, t]), Re(() => {
3120
+ const P = async () => {
3121
+ if (!(!t || typeof t.find != "function" || !e.objectName)) {
3122
+ d(!0);
3123
+ try {
3124
+ const j = fn(b?.fields), F = await t.find(e.objectName, {
3125
+ options: { $top: 100 },
3126
+ ...j.length > 0 ? { $expand: j } : {}
3127
+ }), oe = pn(F);
3128
+ a(oe);
3129
+ } catch (j) {
3130
+ console.error(j), _(j);
3112
3131
  } finally {
3113
- f(!1);
3132
+ d(!1);
3114
3133
  }
3115
3134
  }
3116
3135
  };
3117
- e.objectName && !w && !e.items && !i.data && N();
3118
- }, [e.objectName, t, w, e.items, i.data, m]);
3119
- const y = i.data || w || s;
3120
- let b = e.items;
3121
- if (!b && y && Array.isArray(y)) {
3122
- const N = e.mapping?.title || e.titleField || "name", O = e.mapping?.date || e.dateField || "date", F = e.mapping?.description || e.descriptionField || "description", ze = e.mapping?.variant || "variant";
3123
- b = y.map((J) => ({
3124
- title: J[N],
3136
+ e.objectName && !M && !e.items && !s.data && P();
3137
+ }, [e.objectName, t, M, e.items, s.data, h, b]);
3138
+ const Y = s.data || M || i;
3139
+ let I = e.items;
3140
+ if (!I && Y && Array.isArray(Y)) {
3141
+ const P = w?.titleField ?? e.mapping?.title ?? e.titleField ?? "name", j = w?.startDateField ?? e.mapping?.date ?? e.startDateField ?? e.dateField ?? "date", F = w?.endDateField ?? e.endDateField ?? j, oe = e.mapping?.description ?? e.descriptionField ?? "description", ie = e.mapping?.variant ?? "variant", se = w?.groupByField ?? e.groupByField, ae = w?.colorField ?? e.colorField;
3142
+ I = Y.map((U) => ({
3143
+ title: U[P],
3125
3144
  // Support both 'time' (vertical) and 'startDate' (gantt)
3126
- time: J[O],
3127
- startDate: J[O],
3128
- endDate: J[O],
3129
- // Default single point
3130
- description: J[F],
3131
- variant: J[ze] || "default",
3145
+ time: U[j],
3146
+ startDate: U[j],
3147
+ endDate: U[F],
3148
+ description: U[oe],
3149
+ variant: U[ie] || "default",
3150
+ // Spec-compliant: group and color support
3151
+ ...se ? { group: U[se] } : {},
3152
+ ...ae ? { color: U[ae] } : {},
3132
3153
  // Pass original item for click handlers
3133
- _data: J
3154
+ _data: U
3134
3155
  }));
3135
3156
  }
3136
- const M = cn(async () => {
3137
- p((N) => N + 1);
3138
- }, []), { ref: ee, isRefreshing: C, pullDistance: S } = pn({
3139
- onRefresh: M,
3157
+ const R = ln(async () => {
3158
+ p((P) => P + 1);
3159
+ }, []), { ref: A, isRefreshing: me, pullDistance: H } = _n({
3160
+ onRefresh: R,
3140
3161
  enabled: !!e.objectName && !!t
3141
- }), P = fn({
3162
+ }), re = hn({
3142
3163
  navigation: e.navigation,
3143
3164
  objectName: e.objectName,
3144
3165
  onRowClick: r ?? o
3145
- }), ie = {
3166
+ }), X = w?.scale ?? e.scale, Ze = {
3146
3167
  ...e,
3147
- items: b || [],
3168
+ items: I || [],
3148
3169
  className: n || e.className,
3149
- onItemClick: (N) => {
3150
- const O = N._data || N;
3151
- P.handleClick(O), o?.(O);
3170
+ // Map spec 'scale' to renderer 'timeScale' (used by gantt variant)
3171
+ ...X ? { timeScale: X } : {},
3172
+ onItemClick: (P) => {
3173
+ const j = P._data || P;
3174
+ re.handleClick(j), o?.(j);
3152
3175
  }
3153
3176
  };
3154
- return d ? /* @__PURE__ */ h.jsxs("div", { className: "p-4 text-red-500", children: [
3177
+ return f ? /* @__PURE__ */ m.jsxs("div", { className: "p-4 text-red-500", children: [
3155
3178
  "Error loading timeline: ",
3156
- d.message
3157
- ] }) : /* @__PURE__ */ h.jsxs("div", { ref: ee, className: "relative overflow-auto h-full", children: [
3158
- S > 0 && /* @__PURE__ */ h.jsx(
3179
+ f.message
3180
+ ] }) : /* @__PURE__ */ m.jsxs("div", { ref: A, className: "relative overflow-auto h-full min-w-0", children: [
3181
+ H > 0 && /* @__PURE__ */ m.jsx(
3159
3182
  "div",
3160
3183
  {
3161
3184
  className: "flex items-center justify-center text-xs text-muted-foreground",
3162
- style: { height: S },
3163
- children: C ? "Refreshing…" : "Pull to refresh"
3185
+ style: { height: H },
3186
+ children: me ? "Refreshing…" : "Pull to refresh"
3164
3187
  }
3165
3188
  ),
3166
- /* @__PURE__ */ h.jsx(wt, { schema: ie }),
3167
- P.isOverlay && /* @__PURE__ */ h.jsx(un, { ...P, title: "Timeline Item", children: (N) => /* @__PURE__ */ h.jsx("div", { className: "space-y-3", children: Object.entries(N).map(([O, F]) => /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col", children: [
3168
- /* @__PURE__ */ h.jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: O.replace(/_/g, " ") }),
3169
- /* @__PURE__ */ h.jsx("span", { className: "text-sm", children: String(F ?? "—") })
3170
- ] }, O)) }) })
3189
+ /* @__PURE__ */ m.jsx(zt, { schema: Ze }),
3190
+ re.isOverlay && /* @__PURE__ */ m.jsx(dn, { ...re, title: "Timeline Item", children: (P) => /* @__PURE__ */ m.jsx("div", { className: "space-y-3", children: Object.entries(P).map(([j, F]) => /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col", children: [
3191
+ /* @__PURE__ */ m.jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: j.replace(/_/g, " ") }),
3192
+ /* @__PURE__ */ m.jsx("span", { className: "text-sm", children: String(F ?? "—") })
3193
+ ] }, j)) }) })
3171
3194
  ] });
3172
- }, Yt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3195
+ }, Kt = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3173
3196
  "ol",
3174
3197
  {
3175
3198
  ref: n,
3176
- className: j("relative border-l border-gray-200", e),
3199
+ className: O("relative border-l border-gray-200", e),
3177
3200
  ...t
3178
3201
  }
3179
3202
  ));
3180
- Yt.displayName = "Timeline";
3181
- const Bt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3203
+ Kt.displayName = "Timeline";
3204
+ const Vs = wt("ml-6", {
3205
+ variants: {
3206
+ density: {
3207
+ default: "mb-10",
3208
+ compact: "mb-3",
3209
+ comfortable: "mb-6"
3210
+ }
3211
+ },
3212
+ defaultVariants: { density: "default" }
3213
+ }), Ht = N.forwardRef(({ className: e, density: t, ...n }, r) => /* @__PURE__ */ m.jsx(
3182
3214
  "li",
3183
3215
  {
3184
- ref: n,
3185
- className: j("mb-10 ml-6", e),
3186
- ...t
3216
+ ref: r,
3217
+ className: O(Vs({ density: t }), e),
3218
+ ...n
3187
3219
  }
3188
3220
  ));
3189
- Bt.displayName = "TimelineItem";
3190
- const Ee = A.forwardRef(({ className: e, variant: t = "default", ...n }, r) => {
3191
- const o = {
3192
- default: "bg-gray-200 border-gray-300",
3193
- success: "bg-green-200 border-green-500",
3194
- warning: "bg-yellow-200 border-yellow-500",
3195
- danger: "bg-red-200 border-red-500",
3196
- info: "bg-blue-200 border-blue-500"
3197
- };
3198
- return /* @__PURE__ */ h.jsx(
3199
- "div",
3200
- {
3201
- ref: r,
3202
- className: j(
3203
- "absolute -left-3 w-6 h-6 rounded-full border-2 flex items-center justify-center",
3204
- o[t],
3205
- e
3206
- ),
3207
- ...n
3208
- }
3209
- );
3210
- });
3211
- Ee.displayName = "TimelineMarker";
3212
- const qt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3221
+ Ht.displayName = "TimelineItem";
3222
+ const Ws = wt(
3223
+ "absolute -left-3 w-6 h-6 rounded-full border-2 flex items-center justify-center",
3224
+ {
3225
+ variants: {
3226
+ variant: {
3227
+ default: "bg-blue-200 border-blue-400",
3228
+ success: "bg-emerald-200 border-emerald-500",
3229
+ warning: "bg-amber-200 border-amber-500",
3230
+ danger: "bg-red-200 border-red-500",
3231
+ info: "bg-purple-200 border-purple-500",
3232
+ todo: "bg-slate-200 border-slate-400",
3233
+ "in-progress": "bg-blue-200 border-blue-500",
3234
+ done: "bg-emerald-200 border-emerald-500"
3235
+ }
3236
+ },
3237
+ defaultVariants: { variant: "default" }
3238
+ }
3239
+ ), Ie = N.forwardRef(({ className: e, variant: t = "default", ...n }, r) => /* @__PURE__ */ m.jsx(
3240
+ "div",
3241
+ {
3242
+ ref: r,
3243
+ className: O(Ws({ variant: t }), e),
3244
+ ...n
3245
+ }
3246
+ ));
3247
+ Ie.displayName = "TimelineMarker";
3248
+ const Xt = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3213
3249
  "div",
3214
3250
  {
3215
3251
  ref: n,
@@ -3217,121 +3253,121 @@ const qt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3217
3253
  ...t
3218
3254
  }
3219
3255
  ));
3220
- qt.displayName = "TimelineContent";
3221
- const xe = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3256
+ Xt.displayName = "TimelineContent";
3257
+ const Ae = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3222
3258
  "h3",
3223
3259
  {
3224
3260
  ref: n,
3225
- className: j("font-semibold text-lg mb-1", e),
3261
+ className: O("font-semibold text-lg mb-1", e),
3226
3262
  ...t
3227
3263
  }
3228
3264
  ));
3229
- xe.displayName = "TimelineTitle";
3230
- const Re = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3265
+ Ae.displayName = "TimelineTitle";
3266
+ const Ce = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3231
3267
  "time",
3232
3268
  {
3233
3269
  ref: n,
3234
- className: j("text-sm font-normal text-gray-500 mb-2 block", e),
3270
+ className: O("text-sm font-normal text-gray-500 mb-2 block", e),
3235
3271
  ...t
3236
3272
  }
3237
3273
  ));
3238
- Re.displayName = "TimelineTime";
3239
- const Pe = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3274
+ Ce.displayName = "TimelineTime";
3275
+ const Fe = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3240
3276
  "p",
3241
3277
  {
3242
3278
  ref: n,
3243
- className: j("text-base text-gray-700", e),
3279
+ className: O("text-base text-gray-700", e),
3244
3280
  ...t
3245
3281
  }
3246
3282
  ));
3247
- Pe.displayName = "TimelineDescription";
3248
- const Kt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3283
+ Fe.displayName = "TimelineDescription";
3284
+ const Qt = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3249
3285
  "div",
3250
3286
  {
3251
3287
  ref: n,
3252
- className: j("relative flex overflow-x-auto py-8", e),
3288
+ className: O("relative flex overflow-x-auto py-8", e),
3253
3289
  ...t
3254
3290
  }
3255
3291
  ));
3256
- Kt.displayName = "TimelineHorizontal";
3257
- const Ht = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3292
+ Qt.displayName = "TimelineHorizontal";
3293
+ const en = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3258
3294
  "div",
3259
3295
  {
3260
3296
  ref: n,
3261
- className: j("flex-shrink-0 w-64 relative", e),
3297
+ className: O("flex-shrink-0 w-64 relative", e),
3262
3298
  ...t
3263
3299
  }
3264
3300
  ));
3265
- Ht.displayName = "TimelineHorizontalItem";
3266
- const Xt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3301
+ en.displayName = "TimelineHorizontalItem";
3302
+ const tn = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3267
3303
  "div",
3268
3304
  {
3269
3305
  ref: n,
3270
- className: j("relative w-full border rounded-lg overflow-hidden", e),
3306
+ className: O("relative w-full border rounded-lg overflow-hidden", e),
3271
3307
  ...t
3272
3308
  }
3273
3309
  ));
3274
- Xt.displayName = "TimelineGantt";
3275
- const Qt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3310
+ tn.displayName = "TimelineGantt";
3311
+ const nn = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3276
3312
  "div",
3277
3313
  {
3278
3314
  ref: n,
3279
- className: j("flex border-b bg-gray-50", e),
3315
+ className: O("flex border-b bg-gray-50", e),
3280
3316
  ...t
3281
3317
  }
3282
3318
  ));
3283
- Qt.displayName = "TimelineGanttHeader";
3284
- const Ne = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3319
+ nn.displayName = "TimelineGanttHeader";
3320
+ const Ue = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3285
3321
  "div",
3286
3322
  {
3287
3323
  ref: n,
3288
- className: j("w-48 border-r bg-white", e),
3324
+ className: O("w-48 border-r bg-white", e),
3289
3325
  ...t
3290
3326
  }
3291
3327
  ));
3292
- Ne.displayName = "TimelineGanttRowLabels";
3293
- const De = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3328
+ Ue.displayName = "TimelineGanttRowLabels";
3329
+ const Le = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3294
3330
  "div",
3295
3331
  {
3296
3332
  ref: n,
3297
- className: j("flex-1 overflow-x-auto", e),
3333
+ className: O("flex-1 overflow-x-auto", e),
3298
3334
  ...t
3299
3335
  }
3300
3336
  ));
3301
- De.displayName = "TimelineGanttGrid";
3302
- const Ae = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3337
+ Le.displayName = "TimelineGanttGrid";
3338
+ const Je = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3303
3339
  "div",
3304
3340
  {
3305
3341
  ref: n,
3306
- className: j("flex items-center border-b min-h-12", e),
3342
+ className: O("flex items-center border-b min-h-12", e),
3307
3343
  ...t
3308
3344
  }
3309
3345
  ));
3310
- Ae.displayName = "TimelineGanttRow";
3311
- const en = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3346
+ Je.displayName = "TimelineGanttRow";
3347
+ const rn = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3312
3348
  "div",
3313
3349
  {
3314
3350
  ref: n,
3315
- className: j("px-4 py-2 font-medium text-sm truncate", e),
3351
+ className: O("px-4 py-2 font-medium text-sm truncate", e),
3316
3352
  ...t
3317
3353
  }
3318
3354
  ));
3319
- en.displayName = "TimelineGanttLabel";
3320
- const tn = A.forwardRef(({ className: e, start: t = 0, width: n = 100, variant: r = "default", ...o }, i) => {
3321
- const s = {
3355
+ rn.displayName = "TimelineGanttLabel";
3356
+ const on = N.forwardRef(({ className: e, start: t = 0, width: n = 100, variant: r = "default", ...o }, s) => {
3357
+ const i = {
3322
3358
  default: "bg-blue-500 hover:bg-blue-600",
3323
3359
  success: "bg-green-500 hover:bg-green-600",
3324
3360
  warning: "bg-yellow-500 hover:bg-yellow-600",
3325
3361
  danger: "bg-red-500 hover:bg-red-600",
3326
3362
  info: "bg-purple-500 hover:bg-purple-600"
3327
3363
  };
3328
- return /* @__PURE__ */ h.jsx(
3364
+ return /* @__PURE__ */ m.jsx(
3329
3365
  "div",
3330
3366
  {
3331
- ref: i,
3332
- className: j(
3367
+ ref: s,
3368
+ className: O(
3333
3369
  "absolute h-8 rounded-md transition-colors cursor-pointer",
3334
- s[r],
3370
+ i[r],
3335
3371
  e
3336
3372
  ),
3337
3373
  style: {
@@ -3342,21 +3378,21 @@ const tn = A.forwardRef(({ className: e, start: t = 0, width: n = 100, variant:
3342
3378
  }
3343
3379
  );
3344
3380
  });
3345
- tn.displayName = "TimelineGanttBar";
3346
- const nn = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3381
+ on.displayName = "TimelineGanttBar";
3382
+ const sn = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3347
3383
  "div",
3348
3384
  {
3349
3385
  ref: n,
3350
- className: j("px-2 py-1 text-white text-xs font-medium truncate", e),
3386
+ className: O("px-2 py-1 text-white text-xs font-medium truncate", e),
3351
3387
  ...t
3352
3388
  }
3353
3389
  ));
3354
- nn.displayName = "TimelineGanttBarContent";
3355
- const rn = ({ schema: e, ...t }) => {
3356
- const { dataSource: n } = dn();
3357
- return /* @__PURE__ */ h.jsx(Ui, { schema: e, dataSource: n, ...t });
3390
+ sn.displayName = "TimelineGanttBarContent";
3391
+ const an = ({ schema: e, ...t }) => {
3392
+ const { dataSource: n } = gn() || {};
3393
+ return /* @__PURE__ */ m.jsx(Ms, { schema: e, dataSource: n, ...t });
3358
3394
  };
3359
- Ie.register("object-timeline", rn, {
3395
+ Me.register("object-timeline", an, {
3360
3396
  namespace: "plugin-timeline",
3361
3397
  label: "Object Timeline",
3362
3398
  category: "view",
@@ -3365,7 +3401,7 @@ Ie.register("object-timeline", rn, {
3365
3401
  { name: "variant", type: "enum", enum: ["vertical", "horizontal", "gantt"], defaultValue: "vertical" }
3366
3402
  ]
3367
3403
  });
3368
- Ie.register("timeline", rn, {
3404
+ Me.register("timeline", an, {
3369
3405
  namespace: "view",
3370
3406
  label: "Timeline View",
3371
3407
  category: "view",
@@ -3375,24 +3411,26 @@ Ie.register("timeline", rn, {
3375
3411
  ]
3376
3412
  });
3377
3413
  export {
3378
- Ui as ObjectTimeline,
3379
- rn as ObjectTimelineRenderer,
3380
- Yt as Timeline,
3381
- qt as TimelineContent,
3382
- Pe as TimelineDescription,
3383
- Xt as TimelineGantt,
3384
- tn as TimelineGanttBar,
3385
- nn as TimelineGanttBarContent,
3386
- De as TimelineGanttGrid,
3387
- Qt as TimelineGanttHeader,
3388
- en as TimelineGanttLabel,
3389
- Ae as TimelineGanttRow,
3390
- Ne as TimelineGanttRowLabels,
3391
- Kt as TimelineHorizontal,
3392
- Ht as TimelineHorizontalItem,
3393
- Bt as TimelineItem,
3394
- Ee as TimelineMarker,
3395
- wt as TimelineRenderer,
3396
- Re as TimelineTime,
3397
- xe as TimelineTitle
3414
+ Ms as ObjectTimeline,
3415
+ an as ObjectTimelineRenderer,
3416
+ Kt as Timeline,
3417
+ Xt as TimelineContent,
3418
+ Fe as TimelineDescription,
3419
+ tn as TimelineGantt,
3420
+ on as TimelineGanttBar,
3421
+ sn as TimelineGanttBarContent,
3422
+ Le as TimelineGanttGrid,
3423
+ nn as TimelineGanttHeader,
3424
+ rn as TimelineGanttLabel,
3425
+ Je as TimelineGanttRow,
3426
+ Ue as TimelineGanttRowLabels,
3427
+ Qt as TimelineHorizontal,
3428
+ en as TimelineHorizontalItem,
3429
+ Ht as TimelineItem,
3430
+ Ie as TimelineMarker,
3431
+ zt as TimelineRenderer,
3432
+ Ce as TimelineTime,
3433
+ Ae as TimelineTitle,
3434
+ Vs as timelineItemVariants,
3435
+ Ws as timelineMarkerVariants
3398
3436
  };