@golemui/gui-lit 1.1.0 → 1.1.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/{button.element-3a7rRHbA.js → button.element-CJay43iR.js} +16 -13
  3. package/{calendar-BuJgwvZx.js → calendar-D31xNsxx.js} +72 -59
  4. package/{calendar.element-M5MPJmap.js → calendar.element-BhFrCsns.js} +22 -20
  5. package/{checkbox.element-CVskoXEc.js → checkbox.element-DAAVB651.js} +49 -49
  6. package/{currency.element-CfFrAtrr.js → currency.element-D8A2ObpM.js} +11 -10
  7. package/{date-Bj9mI3GU.js → date-DBuYpvcO.js} +35 -27
  8. package/{date-input-cJDkNnVw.js → date-input-DLiMreSS.js} +64 -44
  9. package/date-picker.element-DeUQtbLg.js +357 -0
  10. package/{date-time-calendar-BzRfkLKU.js → date-time-calendar-DzU-FtVl.js} +89 -76
  11. package/{date-time-calendar.element-DC4NK0y1.js → date-time-calendar.element-BLBcVsFu.js} +13 -11
  12. package/{date-time-input-BXxsfuyZ.js → date-time-input-DZaz2heD.js} +75 -43
  13. package/{date-time-picker.element-Dy-8cb-_.js → date-time-picker.element-BUbLdV6i.js} +125 -65
  14. package/{date-time.element-Bv4XdzMi.js → date-time.element-B5onfSBG.js} +31 -25
  15. package/{date.element-Consgsbb.js → date.element-BsKhLrEc.js} +22 -19
  16. package/{day-status-0-hJHrI7.js → day-status-CsWStVQV.js} +153 -129
  17. package/{dropdown.element-WsD61Qel.js → dropdown.element-CXpMwJsU.js} +19 -13
  18. package/{errors-QjKhr6mA.js → errors-Byb2dIhK.js} +3 -2
  19. package/index.js +1643 -1184
  20. package/index.umd.cjs +792 -399
  21. package/{list-CrLIL4by.js → list-D730tmGN.js} +115 -116
  22. package/{list.element-DV82YxnJ.js → list.element-eo3DIOrp.js} +2 -2
  23. package/{markdown.element-p-kC47D7.js → markdown.element-FbtwdnAv.js} +310 -218
  24. package/{number.element-CBr47IiY.js → number.element-BEpOCzXy.js} +76 -61
  25. package/package.json +6 -6
  26. package/{part-templates-Db871PS3.js → part-templates-VORbpgs2.js} +132 -118
  27. package/{password.element-n-R9RbkB.js → password.element-CBaB8h5b.js} +19 -17
  28. package/{pill-ranges-DCqDmpkk.js → pill-ranges-DpvWwP-3.js} +12 -12
  29. package/{pills-Be1UrLgq.js → pills-BDMO2NiR.js} +80 -58
  30. package/popup.controller-B33OvX_y.js +86 -0
  31. package/{radiogroup.element-CeQn623u.js → radiogroup.element-KWzBx8mx.js} +55 -51
  32. package/{range-calendar-CKPYeSGt.js → range-calendar-DO_woqcF.js} +101 -87
  33. package/{range-calendar.element-D6KYq18B.js → range-calendar.element-DHLZhpnj.js} +15 -13
  34. package/{range-date-input-D--AqBMv.js → range-date-input-Br7XqQPK.js} +90 -71
  35. package/{range-date-input.element-D4nIXJbw.js → range-date-input.element-BdD4SlB4.js} +15 -12
  36. package/{range-date-picker.element-dhxPAAE6.js → range-date-picker.element-DWRHiAoC.js} +97 -49
  37. package/{range-date-time-calendar-yksWrR7b.js → range-date-time-calendar-B3EMgN1E.js} +150 -136
  38. package/{range-date-time-calendar.element-C00aDefZ.js → range-date-time-calendar.element-Coea6RF4.js} +9 -7
  39. package/{range-date-time-input-B37TUoM3.js → range-date-time-input-Cu-T_nuC.js} +125 -94
  40. package/{range-date-time-input.element-DUnbv4ed.js → range-date-time-input.element-Cti44iuW.js} +31 -25
  41. package/{range-date-time-picker.element-Cbps6s_G.js → range-date-time-picker.element-CDN2RL1y.js} +107 -47
  42. package/{range-time-input-3lhqR1Ku.js → range-time-input-BP9ZL9O8.js} +85 -66
  43. package/{range-time-input.element-dU2iBdmJ.js → range-time-input.element-B7wtHJoQ.js} +14 -11
  44. package/{range-time-picker.element-v6nQsIPw.js → range-time-picker.element-CPIAiQPC.js} +92 -51
  45. package/{repeater.element-CtNgB4F5.js → repeater.element-BM1Keckd.js} +1 -1
  46. package/{select.element-C0V-Bv3L.js → select.element-eepcXTpL.js} +84 -78
  47. package/{tabs.element-BvAyI71N.js → tabs.element-CvcIA8P3.js} +1 -0
  48. package/{tags.element-DvwEpxpK.js → tags.element-CPHgotb0.js} +21 -14
  49. package/templates-Dmr34nwp.js +88 -0
  50. package/{textarea.element-HThYqdR_.js → textarea.element-CiNEy9uq.js} +8 -7
  51. package/{textinput.element-CkXNzMUg.js → textinput.element-AL2Nr768.js} +10 -9
  52. package/{time-input-BOhlBGJZ.js → time-input-5dkSm8UW.js} +67 -47
  53. package/{time-list-Czo48bZm.js → time-list-DLcq8BAp.js} +1 -1
  54. package/{time-picker-bFJ63ky8.js → time-picker-g337F8d0.js} +89 -51
  55. package/{time-picker.element-CYZVXgRS.js → time-picker.element-DLihegjg.js} +23 -19
  56. package/{time.element-fK3oLi49.js → time.element-BneqgMlQ.js} +22 -19
  57. package/{toggle.element-C1kCw5H8.js → toggle.element-Cz91CRdp.js} +44 -43
  58. package/date-picker.element-va_-LGZD.js +0 -312
  59. package/popup.controller-eUDxE6jD.js +0 -71
  60. package/templates-Dk1jxLwS.js +0 -75
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { filterTap as St, standardValidate as Ye, isStandardValidateSuccess as Ke } from "@golemui/core";
1
+ import { filterTap as Zt, standardValidate as He, isStandardValidateSuccess as Qe } from "@golemui/core";
2
2
  import "@golemui/gui-shared";
3
3
  import "@golemui/lit";
4
- import { LitElement as zt, html as Pt } from "lit";
5
- import { property as he, query as It, customElement as $t } from "lit/decorators.js";
6
- const qe = {
4
+ import { LitElement as Dt, html as Lt } from "lit";
5
+ import { property as be, query as Mt, customElement as Rt } from "lit/decorators.js";
6
+ const et = {
7
7
  LAYOUTS: "LAYOUTS",
8
8
  DISPLAYS: "DISPLAYS"
9
9
  };
10
- function Ct(e) {
10
+ function Wt(e) {
11
11
  return function(t, n = () => !0) {
12
12
  return {
13
13
  kind: "leaf",
@@ -17,54 +17,54 @@ function Ct(e) {
17
17
  };
18
18
  };
19
19
  }
20
- function g(e, t) {
20
+ function v(e, t) {
21
21
  return typeof e == "function" ? e : { type: t, ...e ?? {} };
22
22
  }
23
- const Ot = (e, t) => ({
23
+ const jt = (e, t) => ({
24
24
  type: "ITEMS",
25
- itemType: qe.DISPLAYS,
25
+ itemType: et.DISPLAYS,
26
26
  items: [{ render: e }],
27
27
  tags: t ?? []
28
- }), q = /* @__PURE__ */ new Map();
29
- function Xe(e, t) {
30
- if (q.has(e))
28
+ }), X = /* @__PURE__ */ new Map(), Ft = /* @__PURE__ */ new Map();
29
+ function tt(e, t, n) {
30
+ if (X.has(e))
31
31
  throw new Error(`Item type "${e}" is already registered.`);
32
- q.set(e, t);
32
+ X.set(e, t), n && Ft.set(e, n);
33
33
  }
34
- function X(e) {
35
- const t = q.get(e);
34
+ function Q(e) {
35
+ const t = X.get(e);
36
36
  if (!t)
37
37
  throw new Error(
38
38
  `No handler registered for item type "${e}". Did you forget to import the registration module?`
39
39
  );
40
40
  return t;
41
41
  }
42
- function He(e) {
43
- return q.has(e);
42
+ function nt(e) {
43
+ return X.has(e);
44
44
  }
45
- function d(e) {
46
- const t = (s) => {
45
+ function h(e) {
46
+ const t = (a) => {
47
47
  if (!e.sensibleDefaults)
48
48
  return {};
49
49
  let u = { ...e.sensibleDefaults.base };
50
- for (const l of s) {
50
+ for (const l of a) {
51
51
  const p = l.config;
52
- for (const m of e.sensibleDefaults.fields) {
53
- const y = m;
54
- p[y] != null && (u = { ...u, [y]: p[y] });
52
+ for (const d of e.sensibleDefaults.fields) {
53
+ const m = d;
54
+ p[m] != null && (u = { ...u, [m]: p[m] });
55
55
  }
56
56
  }
57
57
  return u;
58
- }, n = (s, u) => e.sensibleDefaults ? e.sensibleDefaults.apply(s, u) : s, r = (s) => {
58
+ }, n = (a, u) => e.sensibleDefaults ? e.sensibleDefaults.apply(a, u) : a, r = (a) => {
59
59
  switch (e.entryShape) {
60
60
  case "bare":
61
- return { baseDef: s };
61
+ return { baseDef: a };
62
62
  case "keyed": {
63
- const u = s;
63
+ const u = a;
64
64
  return { baseDef: u.def, path: u.key };
65
65
  }
66
66
  case "compound": {
67
- const u = s;
67
+ const u = a;
68
68
  return { baseDef: u.def, children: u.children };
69
69
  }
70
70
  }
@@ -77,9 +77,9 @@ function d(e) {
77
77
  ...e.buildCustomWidget ? { buildCustomWidget: e.buildCustomWidget } : {},
78
78
  ...e.getChildren ? { getChildren: e.getChildren } : {}
79
79
  };
80
- Xe(e.itemType, o);
81
- const a = Ct(e.itemType);
82
- return { gsl: a, gslByUid: (s, u) => a(u, ((l) => l.uid === s)) };
80
+ tt(e.itemType, o, e.kind);
81
+ const s = Wt(e.itemType);
82
+ return { gsl: s, gslByUid: (a, u) => s(u, ((l) => l.uid === a)) };
83
83
  }
84
84
  function b(e) {
85
85
  const {
@@ -87,45 +87,45 @@ function b(e) {
87
87
  path: n,
88
88
  label: r,
89
89
  disabled: o,
90
- readonly: a,
90
+ readonly: s,
91
91
  defaultValue: i,
92
- tags: s,
92
+ tags: a,
93
93
  type: u,
94
94
  size: l,
95
95
  onLoad: p,
96
- onChange: m,
97
- onFilter: y,
98
- on: S,
99
- states: C,
100
- include: B,
101
- exclude: Te,
102
- validator: ke,
103
- ...O
96
+ onChange: d,
97
+ onFilter: m,
98
+ on: y,
99
+ states: P,
100
+ include: S,
101
+ exclude: Ae,
102
+ validator: Ee,
103
+ ...D
104
104
  } = e;
105
- return O;
105
+ return D;
106
106
  }
107
- function Zt(e) {
107
+ function Ut(e) {
108
108
  return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
109
109
  }
110
- function f(e, t) {
111
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Zt(e.path) };
110
+ function g(e, t) {
111
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Ut(e.path) };
112
112
  }
113
- function z(e, t) {
113
+ function I(e, t) {
114
114
  return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
115
115
  }
116
- function Dt(e) {
116
+ function xt(e) {
117
117
  switch (e.type) {
118
118
  case "text":
119
- return Mt(e);
119
+ return Jt(e);
120
120
  case "number":
121
- return Nt(e);
121
+ return Bt(e);
122
122
  case "boolean":
123
- return Lt(e);
123
+ return Vt(e);
124
124
  default:
125
125
  throw new Error(`Unsupported field type "${e.type}"`);
126
126
  }
127
127
  }
128
- function Lt(e) {
128
+ function Vt(e) {
129
129
  const t = b(e);
130
130
  return {
131
131
  uid: e.uid ?? "",
@@ -135,11 +135,11 @@ function Lt(e) {
135
135
  ...e.label != null ? { label: e.label } : {},
136
136
  ...e.disabled != null ? { disabled: e.disabled } : {},
137
137
  ...e.readonly != null ? { readonly: e.readonly } : {},
138
- ...e.validator != null ? { validator: g(e.validator, "boolean") } : {},
138
+ ...e.validator != null ? { validator: v(e.validator, "boolean") } : {},
139
139
  props: t
140
140
  };
141
141
  }
142
- function Mt(e) {
142
+ function Jt(e) {
143
143
  const t = b(e);
144
144
  return {
145
145
  uid: e.uid ?? "",
@@ -153,10 +153,10 @@ function Mt(e) {
153
153
  placeholder: t.placeholder ?? "",
154
154
  ...t
155
155
  },
156
- validator: g(e.validator, "string")
156
+ validator: v(e.validator, "string")
157
157
  };
158
158
  }
159
- function Nt(e) {
159
+ function Bt(e) {
160
160
  const t = b(e);
161
161
  return {
162
162
  uid: e.uid ?? "",
@@ -170,11 +170,12 @@ function Nt(e) {
170
170
  placeholder: t.placeholder ?? "",
171
171
  ...t
172
172
  },
173
- validator: g(e.validator, "number")
173
+ validator: v(e.validator, "number")
174
174
  };
175
175
  }
176
- d({
176
+ h({
177
177
  itemType: "INPUTS",
178
+ kind: "input",
178
179
  entryShape: "keyed",
179
180
  sensibleDefaults: {
180
181
  base: {
@@ -183,19 +184,20 @@ d({
183
184
  },
184
185
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
185
186
  apply: (e, t) => {
186
- let n = f(e, t);
187
- return n = z(n, t), n;
187
+ let n = g(e, t);
188
+ return n = I(n, t), n;
188
189
  }
189
190
  },
190
- mapToWidget: Dt
191
+ mapToWidget: xt
191
192
  });
192
- d({
193
+ h({
193
194
  itemType: "SELECT",
195
+ kind: "input",
194
196
  entryShape: "keyed",
195
197
  sensibleDefaults: {
196
198
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
197
199
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
198
- apply: (e, t) => z(f(e, t), t)
200
+ apply: (e, t) => I(g(e, t), t)
199
201
  },
200
202
  mapToWidget: (e) => ({
201
203
  uid: e.uid ?? "",
@@ -209,8 +211,9 @@ d({
209
211
  props: b(e)
210
212
  })
211
213
  });
212
- d({
214
+ h({
213
215
  itemType: "DROPDOWN",
216
+ kind: "input",
214
217
  entryShape: "keyed",
215
218
  sensibleDefaults: {
216
219
  base: {
@@ -218,7 +221,7 @@ d({
218
221
  suppressAutomaticPlaceholders: !1
219
222
  },
220
223
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
221
- apply: (e, t) => z(f(e, t), t)
224
+ apply: (e, t) => I(g(e, t), t)
222
225
  },
223
226
  mapToWidget: (e) => ({
224
227
  uid: e.uid ?? "",
@@ -232,13 +235,14 @@ d({
232
235
  props: b(e)
233
236
  })
234
237
  });
235
- d({
238
+ h({
236
239
  itemType: "RADIOGROUP",
240
+ kind: "input",
237
241
  entryShape: "keyed",
238
242
  sensibleDefaults: {
239
243
  base: { suppressAutomaticLabels: !1 },
240
244
  fields: ["suppressAutomaticLabels"],
241
- apply: (e, t) => f(e, t)
245
+ apply: (e, t) => g(e, t)
242
246
  },
243
247
  mapToWidget: (e) => ({
244
248
  uid: e.uid ?? "",
@@ -252,13 +256,14 @@ d({
252
256
  props: b(e)
253
257
  })
254
258
  });
255
- d({
259
+ h({
256
260
  itemType: "CHECKBOX",
261
+ kind: "input",
257
262
  entryShape: "keyed",
258
263
  sensibleDefaults: {
259
264
  base: { suppressAutomaticLabels: !1 },
260
265
  fields: ["suppressAutomaticLabels"],
261
- apply: (e, t) => f(e, t)
266
+ apply: (e, t) => g(e, t)
262
267
  },
263
268
  mapToWidget: (e) => ({
264
269
  uid: e.uid ?? "",
@@ -268,17 +273,18 @@ d({
268
273
  ...e.label != null ? { label: e.label } : {},
269
274
  ...e.disabled != null ? { disabled: e.disabled } : {},
270
275
  ...e.readonly != null ? { readonly: e.readonly } : {},
271
- ...e.validator != null ? { validator: g(e.validator, "boolean") } : {},
276
+ ...e.validator != null ? { validator: v(e.validator, "boolean") } : {},
272
277
  props: b(e)
273
278
  })
274
279
  });
275
- d({
280
+ h({
276
281
  itemType: "TEXTAREA",
282
+ kind: "input",
277
283
  entryShape: "keyed",
278
284
  sensibleDefaults: {
279
285
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
280
286
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
281
- apply: (e, t) => z(f(e, t), t)
287
+ apply: (e, t) => I(g(e, t), t)
282
288
  },
283
289
  mapToWidget: (e) => ({
284
290
  uid: e.uid ?? "",
@@ -288,17 +294,18 @@ d({
288
294
  ...e.label != null ? { label: e.label } : {},
289
295
  ...e.disabled != null ? { disabled: e.disabled } : {},
290
296
  ...e.readonly != null ? { readonly: e.readonly } : {},
291
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
297
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
292
298
  props: b(e)
293
299
  })
294
300
  });
295
- d({
301
+ h({
296
302
  itemType: "PASSWORD",
303
+ kind: "input",
297
304
  entryShape: "keyed",
298
305
  sensibleDefaults: {
299
306
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
300
307
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
301
- apply: (e, t) => z(f(e, t), t)
308
+ apply: (e, t) => I(g(e, t), t)
302
309
  },
303
310
  mapToWidget: (e) => ({
304
311
  uid: e.uid ?? "",
@@ -308,17 +315,18 @@ d({
308
315
  ...e.label != null ? { label: e.label } : {},
309
316
  ...e.disabled != null ? { disabled: e.disabled } : {},
310
317
  ...e.readonly != null ? { readonly: e.readonly } : {},
311
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
318
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
312
319
  props: b(e)
313
320
  })
314
321
  });
315
- d({
322
+ h({
316
323
  itemType: "CURRENCY",
324
+ kind: "input",
317
325
  entryShape: "keyed",
318
326
  sensibleDefaults: {
319
327
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
320
328
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
321
- apply: (e, t) => z(f(e, t), t)
329
+ apply: (e, t) => I(g(e, t), t)
322
330
  },
323
331
  mapToWidget: (e) => ({
324
332
  uid: e.uid ?? "",
@@ -328,17 +336,18 @@ d({
328
336
  ...e.label != null ? { label: e.label } : {},
329
337
  ...e.disabled != null ? { disabled: e.disabled } : {},
330
338
  ...e.readonly != null ? { readonly: e.readonly } : {},
331
- ...e.validator != null ? { validator: g(e.validator, "number") } : {},
339
+ ...e.validator != null ? { validator: v(e.validator, "number") } : {},
332
340
  props: b(e)
333
341
  })
334
342
  });
335
- d({
343
+ h({
336
344
  itemType: "MARKDOWN",
345
+ kind: "input",
337
346
  entryShape: "keyed",
338
347
  sensibleDefaults: {
339
348
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
340
349
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
341
- apply: (e, t) => z(f(e, t), t)
350
+ apply: (e, t) => I(g(e, t), t)
342
351
  },
343
352
  mapToWidget: (e) => ({
344
353
  uid: e.uid ?? "",
@@ -348,17 +357,18 @@ d({
348
357
  ...e.label != null ? { label: e.label } : {},
349
358
  ...e.disabled != null ? { disabled: e.disabled } : {},
350
359
  ...e.readonly != null ? { readonly: e.readonly } : {},
351
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
360
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
352
361
  props: b(e)
353
362
  })
354
363
  });
355
- d({
364
+ h({
356
365
  itemType: "LIST",
366
+ kind: "input",
357
367
  entryShape: "keyed",
358
368
  sensibleDefaults: {
359
369
  base: { suppressAutomaticLabels: !1 },
360
370
  fields: ["suppressAutomaticLabels"],
361
- apply: (e, t) => f(e, t)
371
+ apply: (e, t) => g(e, t)
362
372
  },
363
373
  mapToWidget: (e) => ({
364
374
  uid: e.uid ?? "",
@@ -372,13 +382,14 @@ d({
372
382
  props: b(e)
373
383
  })
374
384
  });
375
- d({
385
+ h({
376
386
  itemType: "CALENDAR",
387
+ kind: "input",
377
388
  entryShape: "bare",
378
389
  sensibleDefaults: {
379
390
  base: { suppressAutomaticLabels: !1 },
380
391
  fields: ["suppressAutomaticLabels"],
381
- apply: (e, t) => f(e, t)
392
+ apply: (e, t) => g(e, t)
382
393
  },
383
394
  mapToWidget: (e) => ({
384
395
  uid: e.uid ?? "",
@@ -388,17 +399,18 @@ d({
388
399
  ...e.label != null ? { label: e.label } : {},
389
400
  ...e.disabled != null ? { disabled: e.disabled } : {},
390
401
  ...e.readonly != null ? { readonly: e.readonly } : {},
391
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
402
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
392
403
  props: b(e)
393
404
  })
394
405
  });
395
- d({
406
+ h({
396
407
  itemType: "DATE_TIME_CALENDAR",
408
+ kind: "input",
397
409
  entryShape: "bare",
398
410
  sensibleDefaults: {
399
411
  base: { suppressAutomaticLabels: !1 },
400
412
  fields: ["suppressAutomaticLabels"],
401
- apply: (e, t) => f(e, t)
413
+ apply: (e, t) => g(e, t)
402
414
  },
403
415
  mapToWidget: (e) => ({
404
416
  uid: e.uid ?? "",
@@ -408,17 +420,18 @@ d({
408
420
  ...e.label != null ? { label: e.label } : {},
409
421
  ...e.disabled != null ? { disabled: e.disabled } : {},
410
422
  ...e.readonly != null ? { readonly: e.readonly } : {},
411
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
423
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
412
424
  props: b(e)
413
425
  })
414
426
  });
415
- d({
427
+ h({
416
428
  itemType: "DATE_INPUT",
429
+ kind: "input",
417
430
  entryShape: "keyed",
418
431
  sensibleDefaults: {
419
432
  base: { suppressAutomaticLabels: !1 },
420
433
  fields: ["suppressAutomaticLabels"],
421
- apply: (e, t) => f(e, t)
434
+ apply: (e, t) => g(e, t)
422
435
  },
423
436
  mapToWidget: (e) => ({
424
437
  uid: e.uid ?? "",
@@ -428,12 +441,13 @@ d({
428
441
  ...e.label != null ? { label: e.label } : {},
429
442
  ...e.disabled != null ? { disabled: e.disabled } : {},
430
443
  ...e.readonly != null ? { readonly: e.readonly } : {},
431
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
444
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
432
445
  props: b(e)
433
446
  })
434
447
  });
435
- d({
448
+ h({
436
449
  itemType: "DATE_PICKER",
450
+ kind: "input",
437
451
  entryShape: "keyed",
438
452
  sensibleDefaults: {
439
453
  base: {
@@ -441,7 +455,7 @@ d({
441
455
  suppressAutomaticPlaceholders: !1
442
456
  },
443
457
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
444
- apply: (e, t) => z(f(e, t), t)
458
+ apply: (e, t) => I(g(e, t), t)
445
459
  },
446
460
  mapToWidget: (e) => ({
447
461
  uid: e.uid ?? "",
@@ -451,12 +465,13 @@ d({
451
465
  ...e.label != null ? { label: e.label } : {},
452
466
  ...e.disabled != null ? { disabled: e.disabled } : {},
453
467
  ...e.readonly != null ? { readonly: e.readonly } : {},
454
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
468
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
455
469
  props: b(e)
456
470
  })
457
471
  });
458
- d({
472
+ h({
459
473
  itemType: "DATE_TIME_PICKER",
474
+ kind: "input",
460
475
  entryShape: "keyed",
461
476
  sensibleDefaults: {
462
477
  base: {
@@ -464,7 +479,7 @@ d({
464
479
  suppressAutomaticPlaceholders: !1
465
480
  },
466
481
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
467
- apply: (e, t) => z(f(e, t), t)
482
+ apply: (e, t) => I(g(e, t), t)
468
483
  },
469
484
  mapToWidget: (e) => ({
470
485
  uid: e.uid ?? "",
@@ -474,17 +489,18 @@ d({
474
489
  ...e.label != null ? { label: e.label } : {},
475
490
  ...e.disabled != null ? { disabled: e.disabled } : {},
476
491
  ...e.readonly != null ? { readonly: e.readonly } : {},
477
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
492
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
478
493
  props: b(e)
479
494
  })
480
495
  });
481
- d({
496
+ h({
482
497
  itemType: "RANGE_CALENDAR",
498
+ kind: "input",
483
499
  entryShape: "keyed",
484
500
  sensibleDefaults: {
485
501
  base: { suppressAutomaticLabels: !1 },
486
502
  fields: ["suppressAutomaticLabels"],
487
- apply: (e, t) => f(e, t)
503
+ apply: (e, t) => g(e, t)
488
504
  },
489
505
  mapToWidget: (e) => ({
490
506
  uid: e.uid ?? "",
@@ -494,17 +510,18 @@ d({
494
510
  ...e.label != null ? { label: e.label } : {},
495
511
  ...e.disabled != null ? { disabled: e.disabled } : {},
496
512
  ...e.readonly != null ? { readonly: e.readonly } : {},
497
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
513
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
498
514
  props: b(e)
499
515
  })
500
516
  });
501
- d({
517
+ h({
502
518
  itemType: "RANGE_DATE_INPUT",
519
+ kind: "input",
503
520
  entryShape: "keyed",
504
521
  sensibleDefaults: {
505
522
  base: { suppressAutomaticLabels: !1 },
506
523
  fields: ["suppressAutomaticLabels"],
507
- apply: (e, t) => f(e, t)
524
+ apply: (e, t) => g(e, t)
508
525
  },
509
526
  mapToWidget: (e) => ({
510
527
  uid: e.uid ?? "",
@@ -514,17 +531,18 @@ d({
514
531
  ...e.label != null ? { label: e.label } : {},
515
532
  ...e.disabled != null ? { disabled: e.disabled } : {},
516
533
  ...e.readonly != null ? { readonly: e.readonly } : {},
517
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
534
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
518
535
  props: b(e)
519
536
  })
520
537
  });
521
- d({
538
+ h({
522
539
  itemType: "RANGE_DATE_TIME_INPUT",
540
+ kind: "input",
523
541
  entryShape: "keyed",
524
542
  sensibleDefaults: {
525
543
  base: { suppressAutomaticLabels: !1 },
526
544
  fields: ["suppressAutomaticLabels"],
527
- apply: (e, t) => f(e, t)
545
+ apply: (e, t) => g(e, t)
528
546
  },
529
547
  mapToWidget: (e) => ({
530
548
  uid: e.uid ?? "",
@@ -534,17 +552,18 @@ d({
534
552
  ...e.label != null ? { label: e.label } : {},
535
553
  ...e.disabled != null ? { disabled: e.disabled } : {},
536
554
  ...e.readonly != null ? { readonly: e.readonly } : {},
537
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
555
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
538
556
  props: b(e)
539
557
  })
540
558
  });
541
- d({
559
+ h({
542
560
  itemType: "RANGE_DATE_TIME_CALENDAR",
561
+ kind: "input",
543
562
  entryShape: "keyed",
544
563
  sensibleDefaults: {
545
564
  base: { suppressAutomaticLabels: !1 },
546
565
  fields: ["suppressAutomaticLabels"],
547
- apply: (e, t) => f(e, t)
566
+ apply: (e, t) => g(e, t)
548
567
  },
549
568
  mapToWidget: (e) => ({
550
569
  uid: e.uid ?? "",
@@ -554,17 +573,18 @@ d({
554
573
  ...e.label != null ? { label: e.label } : {},
555
574
  ...e.disabled != null ? { disabled: e.disabled } : {},
556
575
  ...e.readonly != null ? { readonly: e.readonly } : {},
557
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
576
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
558
577
  props: b(e)
559
578
  })
560
579
  });
561
- d({
580
+ h({
562
581
  itemType: "RANGE_DATE_TIME_PICKER",
582
+ kind: "input",
563
583
  entryShape: "keyed",
564
584
  sensibleDefaults: {
565
585
  base: { suppressAutomaticLabels: !1 },
566
586
  fields: ["suppressAutomaticLabels"],
567
- apply: (e, t) => f(e, t)
587
+ apply: (e, t) => g(e, t)
568
588
  },
569
589
  mapToWidget: (e) => ({
570
590
  uid: e.uid ?? "",
@@ -574,17 +594,18 @@ d({
574
594
  ...e.label != null ? { label: e.label } : {},
575
595
  ...e.disabled != null ? { disabled: e.disabled } : {},
576
596
  ...e.readonly != null ? { readonly: e.readonly } : {},
577
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
597
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
578
598
  props: b(e)
579
599
  })
580
600
  });
581
- d({
601
+ h({
582
602
  itemType: "RANGE_TIME_INPUT",
603
+ kind: "input",
583
604
  entryShape: "keyed",
584
605
  sensibleDefaults: {
585
606
  base: { suppressAutomaticLabels: !1 },
586
607
  fields: ["suppressAutomaticLabels"],
587
- apply: (e, t) => f(e, t)
608
+ apply: (e, t) => g(e, t)
588
609
  },
589
610
  mapToWidget: (e) => ({
590
611
  uid: e.uid ?? "",
@@ -594,17 +615,18 @@ d({
594
615
  ...e.label != null ? { label: e.label } : {},
595
616
  ...e.disabled != null ? { disabled: e.disabled } : {},
596
617
  ...e.readonly != null ? { readonly: e.readonly } : {},
597
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
618
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
598
619
  props: b(e)
599
620
  })
600
621
  });
601
- d({
622
+ h({
602
623
  itemType: "TIME_INPUT",
624
+ kind: "input",
603
625
  entryShape: "keyed",
604
626
  sensibleDefaults: {
605
627
  base: { suppressAutomaticLabels: !1 },
606
628
  fields: ["suppressAutomaticLabels"],
607
- apply: (e, t) => f(e, t)
629
+ apply: (e, t) => g(e, t)
608
630
  },
609
631
  mapToWidget: (e) => ({
610
632
  uid: e.uid ?? "",
@@ -614,12 +636,13 @@ d({
614
636
  ...e.label != null ? { label: e.label } : {},
615
637
  ...e.disabled != null ? { disabled: e.disabled } : {},
616
638
  ...e.readonly != null ? { readonly: e.readonly } : {},
617
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
639
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
618
640
  props: b(e)
619
641
  })
620
642
  });
621
- d({
643
+ h({
622
644
  itemType: "TIME_PICKER",
645
+ kind: "input",
623
646
  entryShape: "keyed",
624
647
  sensibleDefaults: {
625
648
  base: {
@@ -627,7 +650,7 @@ d({
627
650
  suppressAutomaticPlaceholders: !1
628
651
  },
629
652
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
630
- apply: (e, t) => z(f(e, t), t)
653
+ apply: (e, t) => I(g(e, t), t)
631
654
  },
632
655
  mapToWidget: (e) => ({
633
656
  uid: e.uid ?? "",
@@ -637,17 +660,18 @@ d({
637
660
  ...e.label != null ? { label: e.label } : {},
638
661
  ...e.disabled != null ? { disabled: e.disabled } : {},
639
662
  ...e.readonly != null ? { readonly: e.readonly } : {},
640
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
663
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
641
664
  props: b(e)
642
665
  })
643
666
  });
644
- d({
667
+ h({
645
668
  itemType: "DATE_TIME_INPUT",
669
+ kind: "input",
646
670
  entryShape: "keyed",
647
671
  sensibleDefaults: {
648
672
  base: { suppressAutomaticLabels: !1 },
649
673
  fields: ["suppressAutomaticLabels"],
650
- apply: (e, t) => f(e, t)
674
+ apply: (e, t) => g(e, t)
651
675
  },
652
676
  mapToWidget: (e) => ({
653
677
  uid: e.uid ?? "",
@@ -657,12 +681,13 @@ d({
657
681
  ...e.label != null ? { label: e.label } : {},
658
682
  ...e.disabled != null ? { disabled: e.disabled } : {},
659
683
  ...e.readonly != null ? { readonly: e.readonly } : {},
660
- ...e.validator != null ? { validator: g(e.validator, "string") } : {},
684
+ ...e.validator != null ? { validator: v(e.validator, "string") } : {},
661
685
  props: b(e)
662
686
  })
663
687
  });
664
- d({
688
+ h({
665
689
  itemType: "RANGE_DATE_PICKER",
690
+ kind: "input",
666
691
  entryShape: "keyed",
667
692
  sensibleDefaults: {
668
693
  base: {
@@ -670,7 +695,7 @@ d({
670
695
  suppressAutomaticPlaceholders: !1
671
696
  },
672
697
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
673
- apply: (e, t) => z(f(e, t), t)
698
+ apply: (e, t) => I(g(e, t), t)
674
699
  },
675
700
  mapToWidget: (e) => ({
676
701
  uid: e.uid ?? "",
@@ -680,17 +705,18 @@ d({
680
705
  ...e.label != null ? { label: e.label } : {},
681
706
  ...e.disabled != null ? { disabled: e.disabled } : {},
682
707
  ...e.readonly != null ? { readonly: e.readonly } : {},
683
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
708
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
684
709
  props: b(e)
685
710
  })
686
711
  });
687
- d({
712
+ h({
688
713
  itemType: "RANGE_TIME_PICKER",
714
+ kind: "input",
689
715
  entryShape: "keyed",
690
716
  sensibleDefaults: {
691
717
  base: { suppressAutomaticLabels: !1 },
692
718
  fields: ["suppressAutomaticLabels"],
693
- apply: (e, t) => f(e, t)
719
+ apply: (e, t) => g(e, t)
694
720
  },
695
721
  mapToWidget: (e) => ({
696
722
  uid: e.uid ?? "",
@@ -700,15 +726,15 @@ d({
700
726
  ...e.label != null ? { label: e.label } : {},
701
727
  ...e.disabled != null ? { disabled: e.disabled } : {},
702
728
  ...e.readonly != null ? { readonly: e.readonly } : {},
703
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
729
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
704
730
  props: b(e)
705
731
  })
706
732
  });
707
- function Rt(e) {
733
+ function Gt(e) {
708
734
  const t = {};
709
735
  return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
710
736
  }
711
- function xt(e) {
737
+ function Yt(e) {
712
738
  return {
713
739
  uid: e.uid ?? "",
714
740
  kind: "input",
@@ -717,25 +743,25 @@ function xt(e) {
717
743
  ...e.label != null ? { label: e.label } : {},
718
744
  ...e.disabled != null ? { disabled: e.disabled } : {},
719
745
  ...e.readonly != null ? { readonly: e.readonly } : {},
720
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
746
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
721
747
  props: {
722
- ...Rt(e),
748
+ ...Gt(e),
723
749
  template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
724
750
  }
725
751
  };
726
752
  }
727
- function se(e, t) {
753
+ function ce(e, t) {
728
754
  for (const n of e) {
729
755
  if (typeof n == "function") continue;
730
756
  const r = n;
731
- typeof r.path == "string" && r.path && !r.path.startsWith(t) && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && se(r.children, t);
757
+ typeof r.path == "string" && r.path && !r.path.startsWith(t) && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && ce(r.children, t);
732
758
  const o = r.props;
733
- o?.template?.children && Array.isArray(o.template.children) && se(o.template.children, t);
759
+ o?.template?.children && Array.isArray(o.template.children) && ce(o.template.children, t);
734
760
  }
735
761
  }
736
- function Wt(e, t) {
762
+ function Kt(e, t) {
737
763
  const n = t.walkChildren(t.children ?? []), r = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
738
- r && se(n, r + ".items.");
764
+ r && ce(n, r + ".items.");
739
765
  const o = {
740
766
  kind: "layout",
741
767
  type: "flex",
@@ -750,41 +776,41 @@ function Wt(e, t) {
750
776
  props: { ...i.props, template: o }
751
777
  };
752
778
  }
753
- const a = e.fn;
779
+ const s = e.fn;
754
780
  return ((i) => {
755
- const s = a(i), u = t.mapStaticDef(s, "REPEATER");
781
+ const a = s(i), u = t.mapStaticDef(a, "REPEATER");
756
782
  return {
757
783
  ...u,
758
784
  props: { ...u.props, template: o }
759
785
  };
760
786
  });
761
787
  }
762
- function Ft(e) {
788
+ function qt(e) {
763
789
  return {
764
790
  baseDef: e.def,
765
791
  path: e.key,
766
792
  children: e.children
767
793
  };
768
794
  }
769
- function Ut(e) {
795
+ function Xt(e) {
770
796
  return e.children;
771
797
  }
772
- const jt = {
773
- parseEntry: Ft,
798
+ const Ht = {
799
+ parseEntry: qt,
774
800
  rollUpSensibleDefaults: () => ({}),
775
801
  applySensibleDefaults: (e) => e,
776
- mapToWidget: xt,
777
- buildCustomWidget: Wt,
778
- getChildren: Ut
802
+ mapToWidget: Yt,
803
+ buildCustomWidget: Kt,
804
+ getChildren: Xt
779
805
  };
780
- Xe("REPEATER", jt);
781
- const Je = {
806
+ tt("REPEATER", Ht, "input");
807
+ const rt = {
782
808
  onLoad: "load",
783
809
  onChange: "change",
784
810
  onFilter: "filter",
785
811
  onBlur: "blur"
786
- }, Vt = Object.keys(Je);
787
- function Qe(e) {
812
+ }, Qt = Object.keys(rt);
813
+ function ot(e) {
788
814
  if (e.length > 0)
789
815
  return null;
790
816
  try {
@@ -794,7 +820,7 @@ function Qe(e) {
794
820
  return null;
795
821
  }
796
822
  }
797
- class Bt {
823
+ class en {
798
824
  // ── Action-specific: onClick ───────────────────────────────────
799
825
  extractOnClickFromMergeResult(t, n, r) {
800
826
  if (t.kind === "dynamic") {
@@ -808,19 +834,19 @@ class Bt {
808
834
  return { kind: "static", def: this.wireOnClick(o, n, r) };
809
835
  }
810
836
  wireOnClick(t, n, r) {
811
- const o = r.next(), a = t.onClick;
812
- if (typeof a == "function") {
813
- const { onClick: i, ...s } = t, u = a(void 0);
814
- return typeof u == "string" ? { ...s, uid: o, on: { click: u } } : (n.set(o, (l) => a(l.data)), { ...s, uid: o, on: { click: o } });
837
+ const o = r.next(), s = t.onClick;
838
+ if (typeof s == "function") {
839
+ const { onClick: i, ...a } = t, u = s(void 0);
840
+ return typeof u == "string" ? { ...a, uid: o, on: { click: u } } : (n.set(o, (l) => s(l.data)), { ...a, uid: o, on: { click: o } });
815
841
  }
816
842
  return { ...t, uid: o };
817
843
  }
818
844
  // ── Universal: onLoad, onChange, onFilter ──────────────────────
819
845
  wireInputLayoutEvents(t, n, r) {
820
846
  if (t.kind === "dynamic") {
821
- const a = t.fn;
822
- return { kind: "dynamic", fn: (s) => {
823
- const u = a(s);
847
+ const s = t.fn;
848
+ return { kind: "dynamic", fn: (a) => {
849
+ const u = s(a);
824
850
  return this.wireEventProperties(u, n, r);
825
851
  } };
826
852
  }
@@ -828,44 +854,44 @@ class Bt {
828
854
  }
829
855
  wireEventProperties(t, n, r) {
830
856
  const o = { ...t.on || {} };
831
- let a = !1;
857
+ let s = !1;
832
858
  const i = { ...t };
833
- for (const s of Vt) {
834
- const u = t[s];
859
+ for (const a of Qt) {
860
+ const u = t[a];
835
861
  if (u == null) continue;
836
- const l = Je[s];
862
+ const l = rt[a];
837
863
  if (typeof u == "function") {
838
- const p = Qe(u);
864
+ const p = ot(u);
839
865
  if (p != null)
840
866
  o[l] = p;
841
867
  else {
842
- const m = r.next();
843
- n.set(m, u), o[l] = m;
868
+ const d = r.next();
869
+ n.set(d, u), o[l] = d;
844
870
  }
845
- a = !0;
846
- } else typeof u == "string" && (o[l] = u, a = !0);
847
- delete i[s];
871
+ s = !0;
872
+ } else typeof u == "string" && (o[l] = u, s = !0);
873
+ delete i[a];
848
874
  }
849
- return a && (i.on = o), i;
875
+ return s && (i.on = o), i;
850
876
  }
851
877
  }
852
- const be = new Bt();
853
- function Gt(e) {
878
+ const ge = new en();
879
+ function tn(e) {
854
880
  const {
855
881
  uid: t,
856
882
  label: n,
857
883
  actionType: r,
858
884
  disabled: o,
859
- on: a,
885
+ on: s,
860
886
  onClick: i,
861
- data: s,
887
+ data: a,
862
888
  type: u,
863
889
  tags: l,
864
890
  size: p,
865
- include: m,
866
- exclude: y,
867
- states: S,
868
- ...C
891
+ include: d,
892
+ exclude: m,
893
+ states: y,
894
+ ...P
869
895
  } = e;
870
896
  return {
871
897
  uid: t ?? "",
@@ -874,29 +900,30 @@ function Gt(e) {
874
900
  disabled: o,
875
901
  actionType: r,
876
902
  label: n,
877
- ...a != null ? { on: a } : {},
878
- props: C
903
+ ...s != null ? { on: s } : {},
904
+ props: P
879
905
  };
880
906
  }
881
- d({
907
+ h({
882
908
  itemType: "ACTIONS",
909
+ kind: "action",
883
910
  entryShape: "bare",
884
- mapToWidget: Gt,
885
- afterMerge: (e, t) => be.extractOnClickFromMergeResult(
911
+ mapToWidget: tn,
912
+ afterMerge: (e, t) => ge.extractOnClickFromMergeResult(
886
913
  e,
887
914
  t.eventRegistry,
888
915
  t.eventIdGenerator
889
916
  )
890
917
  });
891
- function Yt(e) {
918
+ function nn(e) {
892
919
  const {
893
920
  uid: t,
894
921
  widgetName: n,
895
922
  tags: r,
896
923
  size: o,
897
- onChange: a,
924
+ onChange: s,
898
925
  include: i,
899
- exclude: s,
926
+ exclude: a,
900
927
  ...u
901
928
  } = e, { on: l, ...p } = u;
902
929
  return {
@@ -910,27 +937,28 @@ function Yt(e) {
910
937
  children: []
911
938
  };
912
939
  }
913
- function Kt(e, t) {
940
+ function rn(e, t) {
914
941
  const n = t.walkChildren(t.children ?? []);
915
942
  if (e.kind === "static")
916
943
  return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: n };
917
944
  const r = e.fn;
918
945
  return ((o) => {
919
- const a = r(o);
920
- return { ...t.mapStaticDef(a, "LAYOUTS"), children: n };
946
+ const s = r(o);
947
+ return { ...t.mapStaticDef(s, "LAYOUTS"), children: n };
921
948
  });
922
949
  }
923
- function qt(e) {
950
+ function on(e) {
924
951
  return e.children;
925
952
  }
926
- d({
953
+ h({
927
954
  itemType: "LAYOUTS",
955
+ kind: "layout",
928
956
  entryShape: "compound",
929
- mapToWidget: Yt,
930
- buildCustomWidget: Kt,
931
- getChildren: qt
957
+ mapToWidget: nn,
958
+ buildCustomWidget: rn,
959
+ getChildren: on
932
960
  });
933
- function ue(e) {
961
+ function pe(e) {
934
962
  return {
935
963
  errors: void 0,
936
964
  touched: void 0,
@@ -939,7 +967,7 @@ function ue(e) {
939
967
  $form: e?.$form ?? {}
940
968
  };
941
969
  }
942
- function Xt(e) {
970
+ function sn(e) {
943
971
  return {
944
972
  uid: "",
945
973
  kind: "display",
@@ -947,7 +975,7 @@ function Xt(e) {
947
975
  props: { render: e.render }
948
976
  };
949
977
  }
950
- function Ht(e, t) {
978
+ function an(e, t) {
951
979
  if (e.kind === "static") {
952
980
  const r = e.def;
953
981
  return ((o) => ({
@@ -956,7 +984,7 @@ function Ht(e, t) {
956
984
  type: "renderer",
957
985
  ...r.include != null ? { include: r.include } : {},
958
986
  ...r.exclude != null ? { exclude: r.exclude } : {},
959
- props: { render: r.render(ue(o)) }
987
+ props: { render: r.render(pe(o)) }
960
988
  }));
961
989
  }
962
990
  const n = e.fn;
@@ -968,18 +996,20 @@ function Ht(e, t) {
968
996
  type: "renderer",
969
997
  ...o.include != null ? { include: o.include } : {},
970
998
  ...o.exclude != null ? { exclude: o.exclude } : {},
971
- props: { render: o.render(ue(r)) }
999
+ props: { render: o.render(pe(r)) }
972
1000
  };
973
1001
  });
974
1002
  }
975
- d({
1003
+ h({
976
1004
  itemType: "DISPLAYS",
1005
+ kind: "display",
977
1006
  entryShape: "bare",
978
- mapToWidget: Xt,
979
- buildCustomWidget: Ht
1007
+ mapToWidget: sn,
1008
+ buildCustomWidget: an
980
1009
  });
981
- d({
1010
+ h({
982
1011
  itemType: "ALERTS",
1012
+ kind: "display",
983
1013
  entryShape: "bare",
984
1014
  mapToWidget: (e) => ({
985
1015
  uid: e.uid ?? "",
@@ -991,8 +1021,9 @@ d({
991
1021
  }
992
1022
  })
993
1023
  });
994
- d({
1024
+ h({
995
1025
  itemType: "MARKDOWN_TEXTS",
1026
+ kind: "display",
996
1027
  entryShape: "bare",
997
1028
  mapToWidget: (e) => ({
998
1029
  uid: e.uid ?? "",
@@ -1003,7 +1034,7 @@ d({
1003
1034
  }
1004
1035
  })
1005
1036
  });
1006
- function Jt(e) {
1037
+ function un(e) {
1007
1038
  return {
1008
1039
  uid: e.uid ?? "",
1009
1040
  kind: "layout",
@@ -1016,27 +1047,28 @@ function Jt(e) {
1016
1047
  children: []
1017
1048
  };
1018
1049
  }
1019
- function Qt(e, t) {
1050
+ function ln(e, t) {
1020
1051
  const n = t.walkChildren(t.children ?? []);
1021
1052
  if (e.kind === "static")
1022
1053
  return { ...t.mapStaticDef(e.def, "TABS"), children: n };
1023
1054
  const r = e.fn;
1024
1055
  return ((o) => {
1025
- const a = r(o);
1026
- return { ...t.mapStaticDef(a, "TABS"), children: n };
1056
+ const s = r(o);
1057
+ return { ...t.mapStaticDef(s, "TABS"), children: n };
1027
1058
  });
1028
1059
  }
1029
- function en(e) {
1060
+ function cn(e) {
1030
1061
  return e.children;
1031
1062
  }
1032
- d({
1063
+ h({
1033
1064
  itemType: "TABS",
1065
+ kind: "layout",
1034
1066
  entryShape: "compound",
1035
- mapToWidget: Jt,
1036
- buildCustomWidget: Qt,
1037
- getChildren: en
1067
+ mapToWidget: un,
1068
+ buildCustomWidget: ln,
1069
+ getChildren: cn
1038
1070
  });
1039
- function tn(e) {
1071
+ function pn(e) {
1040
1072
  return {
1041
1073
  uid: e.uid ?? "",
1042
1074
  kind: "layout",
@@ -1050,35 +1082,37 @@ function tn(e) {
1050
1082
  children: []
1051
1083
  };
1052
1084
  }
1053
- function nn(e, t) {
1085
+ function dn(e, t) {
1054
1086
  const n = t.walkChildren(t.children ?? []);
1055
1087
  if (e.kind === "static")
1056
1088
  return { ...t.mapStaticDef(e.def, "ACCORDION"), children: n };
1057
1089
  const r = e.fn;
1058
1090
  return ((o) => {
1059
- const a = r(o);
1060
- return { ...t.mapStaticDef(a, "ACCORDION"), children: n };
1091
+ const s = r(o);
1092
+ return { ...t.mapStaticDef(s, "ACCORDION"), children: n };
1061
1093
  });
1062
1094
  }
1063
- function rn(e) {
1095
+ function mn(e) {
1064
1096
  return e.children;
1065
1097
  }
1066
- d({
1098
+ h({
1067
1099
  itemType: "ACCORDION",
1100
+ kind: "layout",
1068
1101
  entryShape: "compound",
1069
- mapToWidget: tn,
1070
- buildCustomWidget: nn,
1071
- getChildren: rn
1102
+ mapToWidget: pn,
1103
+ buildCustomWidget: dn,
1104
+ getChildren: mn
1072
1105
  });
1073
- d({
1106
+ h({
1074
1107
  itemType: "CUSTOM_INPUT",
1108
+ kind: "input",
1075
1109
  entryShape: "keyed",
1076
1110
  sensibleDefaults: {
1077
1111
  base: {
1078
1112
  suppressAutomaticLabels: !1
1079
1113
  },
1080
1114
  fields: ["suppressAutomaticLabels"],
1081
- apply: (e, t) => f(e, t)
1115
+ apply: (e, t) => g(e, t)
1082
1116
  },
1083
1117
  mapToWidget: (e) => ({
1084
1118
  uid: e.uid ?? "",
@@ -1093,8 +1127,9 @@ d({
1093
1127
  props: e.props ?? {}
1094
1128
  })
1095
1129
  });
1096
- d({
1130
+ h({
1097
1131
  itemType: "CUSTOM_ACTION",
1132
+ kind: "action",
1098
1133
  entryShape: "bare",
1099
1134
  mapToWidget: (e) => {
1100
1135
  const {
@@ -1102,16 +1137,16 @@ d({
1102
1137
  label: n,
1103
1138
  disabled: r,
1104
1139
  on: o,
1105
- onClick: a,
1140
+ onClick: s,
1106
1141
  data: i,
1107
- customType: s,
1142
+ customType: a,
1108
1143
  tags: u,
1109
1144
  size: l,
1110
1145
  include: p,
1111
- exclude: m,
1112
- states: y,
1113
- props: S,
1114
- ...C
1146
+ exclude: d,
1147
+ states: m,
1148
+ props: y,
1149
+ ...P
1115
1150
  } = e;
1116
1151
  return {
1117
1152
  uid: t ?? "",
@@ -1120,17 +1155,18 @@ d({
1120
1155
  label: n,
1121
1156
  disabled: r,
1122
1157
  ...o != null ? { on: o } : {},
1123
- props: { ...S, ...C }
1158
+ props: { ...y, ...P }
1124
1159
  };
1125
1160
  },
1126
- afterMerge: (e, t) => be.extractOnClickFromMergeResult(
1161
+ afterMerge: (e, t) => ge.extractOnClickFromMergeResult(
1127
1162
  e,
1128
1163
  t.eventRegistry,
1129
1164
  t.eventIdGenerator
1130
1165
  )
1131
1166
  });
1132
- d({
1167
+ h({
1133
1168
  itemType: "CUSTOM_DISPLAY",
1169
+ kind: "display",
1134
1170
  entryShape: "bare",
1135
1171
  mapToWidget: (e) => ({
1136
1172
  uid: e.uid ?? "",
@@ -1139,7 +1175,7 @@ d({
1139
1175
  props: e.props ?? {}
1140
1176
  })
1141
1177
  });
1142
- function on(e) {
1178
+ function hn(e) {
1143
1179
  return {
1144
1180
  uid: e.uid ?? "",
1145
1181
  kind: "layout",
@@ -1148,33 +1184,35 @@ function on(e) {
1148
1184
  children: []
1149
1185
  };
1150
1186
  }
1151
- function an(e, t) {
1187
+ function fn(e, t) {
1152
1188
  const n = t.walkChildren(t.children ?? []);
1153
1189
  if (e.kind === "static")
1154
1190
  return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: n };
1155
1191
  const r = e.fn;
1156
1192
  return ((o) => {
1157
- const a = r(o);
1158
- return { ...t.mapStaticDef(a, "CUSTOM_LAYOUT"), children: n };
1193
+ const s = r(o);
1194
+ return { ...t.mapStaticDef(s, "CUSTOM_LAYOUT"), children: n };
1159
1195
  });
1160
1196
  }
1161
- function sn(e) {
1197
+ function yn(e) {
1162
1198
  return e.children;
1163
1199
  }
1164
- d({
1200
+ h({
1165
1201
  itemType: "CUSTOM_LAYOUT",
1202
+ kind: "layout",
1166
1203
  entryShape: "compound",
1167
- mapToWidget: on,
1168
- buildCustomWidget: an,
1169
- getChildren: sn
1204
+ mapToWidget: hn,
1205
+ buildCustomWidget: fn,
1206
+ getChildren: yn
1170
1207
  });
1171
- d({
1208
+ h({
1172
1209
  itemType: "TAGS",
1210
+ kind: "input",
1173
1211
  entryShape: "keyed",
1174
1212
  sensibleDefaults: {
1175
1213
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
1176
1214
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1177
- apply: (e, t) => z(f(e, t), t)
1215
+ apply: (e, t) => I(g(e, t), t)
1178
1216
  },
1179
1217
  mapToWidget: (e) => ({
1180
1218
  uid: e.uid ?? "",
@@ -1184,11 +1222,11 @@ d({
1184
1222
  ...e.label != null ? { label: e.label } : {},
1185
1223
  ...e.disabled != null ? { disabled: e.disabled } : {},
1186
1224
  ...e.readonly != null ? { readonly: e.readonly } : {},
1187
- ...e.validator != null ? { validator: g(e.validator, "array") } : {},
1225
+ ...e.validator != null ? { validator: v(e.validator, "array") } : {},
1188
1226
  props: b(e)
1189
1227
  })
1190
1228
  });
1191
- const et = {
1229
+ const st = {
1192
1230
  INPUTS: /* @__PURE__ */ new Set([
1193
1231
  "INPUTS",
1194
1232
  "TEXTAREA",
@@ -1224,15 +1262,15 @@ const et = {
1224
1262
  DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
1225
1263
  LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
1226
1264
  };
1227
- function un(e, t) {
1228
- const n = et[e];
1265
+ function bn(e, t) {
1266
+ const n = st[e];
1229
1267
  return n ? n.has(t) : e === t;
1230
1268
  }
1231
- class ln {
1269
+ class gn {
1232
1270
  resolve(t, n) {
1233
1271
  const r = [];
1234
- for (const a of n)
1235
- a.kind === "aggregated" ? this.collectFromAggregated(a, t, r) : this.collectFromLeaf(a, t, r);
1272
+ for (const s of n)
1273
+ s.kind === "aggregated" ? this.collectFromAggregated(s, t, r) : this.collectFromLeaf(s, t, r);
1236
1274
  const o = this.rollUpSensibleDefaults(r);
1237
1275
  return {
1238
1276
  leafSelectors: r,
@@ -1245,28 +1283,28 @@ class ln {
1245
1283
  this.collectFromLeaf(o, n, r);
1246
1284
  }
1247
1285
  collectFromLeaf(t, n, r) {
1248
- un(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1286
+ bn(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1249
1287
  }
1250
1288
  rollUpSensibleDefaults(t) {
1251
- const n = /* @__PURE__ */ new Map(), r = (a, i) => {
1252
- const s = n.get(a) ?? [];
1253
- s.push(i), n.set(a, s);
1289
+ const n = /* @__PURE__ */ new Map(), r = (s, i) => {
1290
+ const a = n.get(s) ?? [];
1291
+ a.push(i), n.set(s, a);
1254
1292
  };
1255
- for (const a of t) {
1256
- const i = et[a.selectorType];
1293
+ for (const s of t) {
1294
+ const i = st[s.selectorType];
1257
1295
  if (i)
1258
- for (const s of i) r(s, a);
1296
+ for (const a of i) r(a, s);
1259
1297
  else
1260
- r(a.selectorType, a);
1298
+ r(s.selectorType, s);
1261
1299
  }
1262
1300
  const o = {};
1263
- for (const [a, i] of n)
1264
- He(a) && (o[a] = X(a).rollUpSensibleDefaults(i));
1301
+ for (const [s, i] of n)
1302
+ nt(s) && (o[s] = Q(s).rollUpSensibleDefaults(i));
1265
1303
  return o;
1266
1304
  }
1267
1305
  }
1268
- const cn = new ln();
1269
- class pn {
1306
+ const _n = new gn();
1307
+ class vn {
1270
1308
  /**
1271
1309
  * Deep merges two objects, with right taking precedence over left when properties conflict.
1272
1310
  * Arrays are replaced, not merged.
@@ -1285,18 +1323,18 @@ class pn {
1285
1323
  return r;
1286
1324
  }
1287
1325
  }
1288
- const dn = new pn();
1289
- class mn {
1326
+ const Tn = new vn();
1327
+ class kn {
1290
1328
  constructor(t) {
1291
1329
  this.objectUtils = t;
1292
1330
  }
1293
1331
  merge(t, n, r) {
1294
- let o = {}, a = null;
1295
- typeof t == "function" && (a = t);
1332
+ let o = {}, s = null;
1333
+ typeof t == "function" && (s = t);
1296
1334
  const i = this.collectDecorators(r);
1297
1335
  for (const l of i) {
1298
- if (a != null) {
1299
- a = this.composeRuntimeFunctions(a, l);
1336
+ if (s != null) {
1337
+ s = this.composeRuntimeFunctions(s, l);
1300
1338
  continue;
1301
1339
  }
1302
1340
  if (typeof l == "function") {
@@ -1305,7 +1343,7 @@ class mn {
1305
1343
  ...typeof t == "function" ? {} : t
1306
1344
  });
1307
1345
  if (typeof p == "function") {
1308
- a = this.createPromotedFunction(
1346
+ s = this.createPromotedFunction(
1309
1347
  o,
1310
1348
  t,
1311
1349
  p,
@@ -1318,13 +1356,13 @@ class mn {
1318
1356
  } else
1319
1357
  o = this.objectUtils.deepMerge(o, l);
1320
1358
  }
1321
- if (a != null)
1359
+ if (s != null)
1322
1360
  return {
1323
1361
  kind: "dynamic",
1324
- fn: this.wrapWithSensibleDefaults(a, o, n, r)
1362
+ fn: this.wrapWithSensibleDefaults(s, o, n, r)
1325
1363
  };
1326
- const s = this.objectUtils.deepMerge(t, o);
1327
- return { kind: "static", def: this.applySensibleDefaults({ ...s }, n, r) };
1364
+ const a = this.objectUtils.deepMerge(t, o);
1365
+ return { kind: "static", def: this.applySensibleDefaults({ ...a }, n, r) };
1328
1366
  }
1329
1367
  // ── Collect all decorators in priority order ──
1330
1368
  collectDecorators(t) {
@@ -1337,50 +1375,50 @@ class mn {
1337
1375
  }
1338
1376
  // ── Apply sensible defaults via registry ──
1339
1377
  applySensibleDefaults(t, n, r) {
1340
- if (!He(n)) return t;
1378
+ if (!nt(n)) return t;
1341
1379
  const o = r.sensibleDefaults[n] ?? {};
1342
- return X(n).applySensibleDefaults(t, o);
1380
+ return Q(n).applySensibleDefaults(t, o);
1343
1381
  }
1344
1382
  // ── Create promoted FunctionWidget ──
1345
- createPromotedFunction(t, n, r, o, a) {
1383
+ createPromotedFunction(t, n, r, o, s) {
1346
1384
  return (i) => {
1347
- const s = r(i);
1348
- let u = this.objectUtils.deepMerge(t, s);
1349
- return u = this.objectUtils.deepMerge(u, n), this.applySensibleDefaults(u, o, a);
1385
+ const a = r(i);
1386
+ let u = this.objectUtils.deepMerge(t, a);
1387
+ return u = this.objectUtils.deepMerge(u, n), this.applySensibleDefaults(u, o, s);
1350
1388
  };
1351
1389
  }
1352
1390
  // ── Wrap runtime function with accumulated static decorators and sensible defaults ──
1353
1391
  wrapWithSensibleDefaults(t, n, r, o) {
1354
- return (a) => {
1355
- let i = t(a);
1392
+ return (s) => {
1393
+ let i = t(s);
1356
1394
  return Object.keys(n).length > 0 && (i = this.objectUtils.deepMerge(n, i)), this.applySensibleDefaults(i, r, o);
1357
1395
  };
1358
1396
  }
1359
1397
  // ── Compose two runtime functions ──
1360
1398
  composeRuntimeFunctions(t, n) {
1361
1399
  return typeof n == "function" ? (r) => {
1362
- const o = t(r), a = n(o);
1363
- return typeof a == "function" ? a(r) : this.objectUtils.deepMerge(a, o);
1400
+ const o = t(r), s = n(o);
1401
+ return typeof s == "function" ? s(r) : this.objectUtils.deepMerge(s, o);
1364
1402
  } : (r) => {
1365
1403
  const o = t(r);
1366
1404
  return this.objectUtils.deepMerge(o, n);
1367
1405
  };
1368
1406
  }
1369
1407
  }
1370
- const hn = new mn(dn);
1371
- class bn {
1408
+ const wn = new kn(Tn);
1409
+ class Sn {
1372
1410
  mapToWidget(t, n) {
1373
1411
  if (t.kind === "dynamic") {
1374
1412
  const r = t.fn;
1375
1413
  return ((o) => {
1376
- const a = r(o);
1377
- return this.mapStaticDef(a, n);
1414
+ const s = r(o);
1415
+ return this.mapStaticDef(s, n);
1378
1416
  });
1379
1417
  }
1380
1418
  return this.mapStaticDef(t.def, n);
1381
1419
  }
1382
1420
  mapStaticDef(t, n) {
1383
- const r = X(n).mapToWidget(t);
1421
+ const r = Q(n).mapToWidget(t);
1384
1422
  return this.applyBaseWidgetFields(r, t);
1385
1423
  }
1386
1424
  /**
@@ -1391,8 +1429,8 @@ class bn {
1391
1429
  return n.size != null && (t.size = n.size), n.defaultValue != null && t.kind === "input" && (t.defaultValue = n.defaultValue), n.on != null && (t.on = n.on), n.include != null && (t.include = n.include), n.exclude != null && (t.exclude = n.exclude), t;
1392
1430
  }
1393
1431
  }
1394
- const fn = new bn();
1395
- class yn {
1432
+ const An = new Sn();
1433
+ class En {
1396
1434
  /**
1397
1435
  * Ensures the output is always a uniform GslSelector[] of aggregated selectors.
1398
1436
  *
@@ -1403,8 +1441,8 @@ class yn {
1403
1441
  */
1404
1442
  normalizeSelectors(t) {
1405
1443
  const n = Array.isArray(t) ? t : [t], r = [], o = [];
1406
- for (const a of n)
1407
- a.kind === "leaf" ? o.push(a) : r.push(a);
1444
+ for (const s of n)
1445
+ s.kind === "leaf" ? o.push(s) : r.push(s);
1408
1446
  return o.length > 0 && r.unshift({
1409
1447
  kind: "aggregated",
1410
1448
  matcher: () => !0,
@@ -1417,18 +1455,18 @@ class yn {
1417
1455
  };
1418
1456
  }
1419
1457
  }
1420
- const gn = new yn(), _n = {
1458
+ const zn = new En(), On = {
1421
1459
  input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
1422
1460
  action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
1423
1461
  layout: /* @__PURE__ */ new Set(["size"]),
1424
1462
  display: /* @__PURE__ */ new Set([])
1425
- }, we = {
1463
+ }, Oe = {
1426
1464
  onChange: "change",
1427
1465
  onLoad: "load",
1428
1466
  onFilter: "filter",
1429
1467
  onClick: "click"
1430
1468
  };
1431
- class vn {
1469
+ class $n {
1432
1470
  /**
1433
1471
  * Extracts `states` from a merge result, combining with state-targeted
1434
1472
  * GSL leaf selectors from `_gslStates`.
@@ -1437,33 +1475,33 @@ class vn {
1437
1475
  */
1438
1476
  extractFromMergeResult(t, n) {
1439
1477
  const r = {};
1440
- for (const s of n) {
1441
- const u = s.targetState, l = s.config, p = l.override && typeof l.override != "function" ? l.override : l;
1478
+ for (const a of n) {
1479
+ const u = a.targetState, l = a.config, p = l.override && typeof l.override != "function" ? l.override : l;
1442
1480
  r[u] = {
1443
1481
  ...r[u] || {},
1444
1482
  ...p
1445
1483
  };
1446
1484
  }
1447
1485
  if (t.kind === "dynamic") {
1448
- const s = t.fn;
1486
+ const a = t.fn;
1449
1487
  return {
1450
1488
  cleanedResult: { kind: "dynamic", fn: (l) => {
1451
- const p = s(l), { states: m, ...y } = p;
1452
- return y;
1489
+ const p = a(l), { states: d, ...m } = p;
1490
+ return m;
1453
1491
  } },
1454
1492
  stateData: { stateOverrides: r }
1455
1493
  };
1456
1494
  }
1457
- const { states: o, ...a } = t.def, i = {};
1458
- for (const [s, u] of Object.entries(r))
1459
- i[s] = { ...u };
1495
+ const { states: o, ...s } = t.def, i = {};
1496
+ for (const [a, u] of Object.entries(r))
1497
+ i[a] = { ...u };
1460
1498
  if (o)
1461
- for (const [s, u] of Object.entries(
1499
+ for (const [a, u] of Object.entries(
1462
1500
  o
1463
1501
  ))
1464
- i[s] = { ...i[s] || {}, ...u };
1502
+ i[a] = { ...i[a] || {}, ...u };
1465
1503
  return {
1466
- cleanedResult: { kind: "static", def: a },
1504
+ cleanedResult: { kind: "static", def: s },
1467
1505
  stateData: { stateOverrides: i }
1468
1506
  };
1469
1507
  }
@@ -1475,14 +1513,14 @@ class vn {
1475
1513
  * - Custom props → `props: { 'prop.stateName': value }`
1476
1514
  */
1477
1515
  applyToWidget(t, n, r, o) {
1478
- const { stateOverrides: a } = n;
1479
- if (Object.keys(a).length === 0)
1516
+ const { stateOverrides: s } = n;
1517
+ if (Object.keys(s).length === 0)
1480
1518
  return t;
1481
- const i = { ...t }, s = t.kind, u = _n[s] || /* @__PURE__ */ new Set();
1519
+ const i = { ...t }, a = t.kind, u = On[a] || /* @__PURE__ */ new Set();
1482
1520
  t.props && (i.props = { ...t.props }), t.on && (i.on = { ...t.on });
1483
- for (const [l, p] of Object.entries(a))
1484
- for (const [m, y] of Object.entries(p))
1485
- m === "visible" ? this.applyVisibility(i, l, y) : we[m] ? this.applyStateEvent(i, l, m, y, r, o) : u.has(m) ? i[`${m}.${l}`] = y : (i.props || (i.props = {}), i.props[`${m}.${l}`] = y);
1521
+ for (const [l, p] of Object.entries(s))
1522
+ for (const [d, m] of Object.entries(p))
1523
+ d === "visible" ? this.applyVisibility(i, l, m) : Oe[d] ? this.applyStateEvent(i, l, d, m, r, o) : u.has(d) ? i[`${d}.${l}`] = m : (i.props || (i.props = {}), i.props[`${d}.${l}`] = m);
1486
1524
  return i;
1487
1525
  }
1488
1526
  hasStateData(t) {
@@ -1499,41 +1537,41 @@ class vn {
1499
1537
  }
1500
1538
  }
1501
1539
  // ── State-suffixed event helpers ──
1502
- applyStateEvent(t, n, r, o, a, i) {
1503
- const s = we[r];
1540
+ applyStateEvent(t, n, r, o, s, i) {
1541
+ const a = Oe[r];
1504
1542
  if (t.on || (t.on = {}), typeof o == "function") {
1505
- const u = Qe(o);
1543
+ const u = ot(o);
1506
1544
  if (u != null)
1507
- t.on[`${s}.${n}`] = u;
1545
+ t.on[`${a}.${n}`] = u;
1508
1546
  else {
1509
1547
  const l = i.next();
1510
- a.set(l, o), t.on[`${s}.${n}`] = l;
1548
+ s.set(l, o), t.on[`${a}.${n}`] = l;
1511
1549
  }
1512
- } else typeof o == "string" && (t.on[`${s}.${n}`] = o);
1550
+ } else typeof o == "string" && (t.on[`${a}.${n}`] = o);
1513
1551
  }
1514
1552
  }
1515
- const Tn = new vn();
1516
- function kn() {
1553
+ const Pn = new $n();
1554
+ function In() {
1517
1555
  let e = 0;
1518
1556
  return { next: () => `event_${e++}` };
1519
1557
  }
1520
- class An {
1521
- constructor(t, n, r, o, a) {
1522
- this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = a;
1558
+ class Cn {
1559
+ constructor(t, n, r, o, s) {
1560
+ this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = s;
1523
1561
  }
1524
1562
  walkAndMap(t, n, r) {
1525
- const o = /* @__PURE__ */ new Map(), a = kn(), i = { value: 0 }, s = /* @__PURE__ */ new Set();
1563
+ const o = /* @__PURE__ */ new Map(), s = In(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1526
1564
  return { widgets: this.walkItems(
1527
1565
  t,
1528
1566
  n,
1529
1567
  o,
1530
1568
  r,
1531
- a,
1569
+ s,
1532
1570
  i,
1533
- s
1571
+ a
1534
1572
  ), eventRegistry: o };
1535
1573
  }
1536
- walkItems(t, n, r, o, a, i, s) {
1574
+ walkItems(t, n, r, o, s, i, a) {
1537
1575
  return t.flatMap((u) => {
1538
1576
  if (u.type !== "ITEMS")
1539
1577
  throw new Error("Unexpected gui shortcut type");
@@ -1544,71 +1582,71 @@ class An {
1544
1582
  n,
1545
1583
  r,
1546
1584
  o,
1547
- a,
1585
+ s,
1548
1586
  i,
1549
- s
1587
+ a
1550
1588
  ));
1551
1589
  });
1552
1590
  }
1553
- processItem(t, n, r, o, a, i, s, u, l) {
1554
- const p = n, m = X(n), y = m.parseEntry(t), S = this.buildBaseDef(y), C = this.buildDecoratorForMatching(S, p, r), B = this.resolver.resolve(C, o), Te = B.leafSelectors.filter((A) => A.targetState != null), ke = {
1555
- leafSelectors: B.leafSelectors.filter((A) => A.targetState == null),
1556
- sensibleDefaults: B.sensibleDefaults
1591
+ processItem(t, n, r, o, s, i, a, u, l) {
1592
+ const p = n, d = Q(n), m = d.parseEntry(t), y = this.buildBaseDef(m), P = this.buildDecoratorForMatching(y, p, r), S = this.resolver.resolve(P, o), Ae = S.leafSelectors.filter((A) => A.targetState != null), Ee = {
1593
+ leafSelectors: S.leafSelectors.filter((A) => A.targetState == null),
1594
+ sensibleDefaults: S.sensibleDefaults
1557
1595
  };
1558
- let O = this.merger.merge(S, p, ke);
1559
- m.afterMerge && (O = m.afterMerge(O, {
1560
- eventRegistry: a,
1596
+ let D = this.merger.merge(y, p, Ee);
1597
+ d.afterMerge && (D = d.afterMerge(D, {
1598
+ eventRegistry: s,
1561
1599
  formConfig: i,
1562
- eventIdGenerator: s
1563
- })), O = this.eventWiring.wireInputLayoutEvents(
1564
- O,
1565
- a,
1566
- s
1600
+ eventIdGenerator: a
1601
+ })), D = this.eventWiring.wireInputLayoutEvents(
1602
+ D,
1603
+ s,
1604
+ a
1567
1605
  );
1568
- const { cleanedResult: Ae, stateData: ae } = this.stateExpansion.extractFromMergeResult(
1569
- O,
1570
- Te
1606
+ const { cleanedResult: ze, stateData: ue } = this.stateExpansion.extractFromMergeResult(
1607
+ D,
1608
+ Ae
1571
1609
  );
1572
- let $;
1573
- if (m.buildCustomWidget) {
1610
+ let Z;
1611
+ if (d.buildCustomWidget) {
1574
1612
  const A = this.buildCustomWidgetContext(
1575
- y.children,
1613
+ m.children,
1576
1614
  o,
1577
- a,
1578
- i,
1579
1615
  s,
1616
+ i,
1617
+ a,
1580
1618
  u,
1581
1619
  l
1582
1620
  );
1583
- $ = this.buildCustomWidget(m, Ae, A);
1621
+ Z = this.buildCustomWidget(d, ze, A);
1584
1622
  } else
1585
- $ = this.mapper.mapToWidget(Ae, p);
1586
- if (typeof $ != "function") {
1587
- const A = $;
1623
+ Z = this.mapper.mapToWidget(ze, p);
1624
+ if (typeof Z != "function") {
1625
+ const A = Z;
1588
1626
  A.uid || (A.path && !l.has(A.path) ? (A.uid = A.path, l.add(A.path)) : A.uid = `dx_${u.value++}`);
1589
1627
  }
1590
- if (this.stateExpansion.hasStateData(ae))
1591
- if (typeof $ == "function") {
1592
- const A = $;
1593
- $ = ((wt) => {
1594
- const Et = A(wt);
1628
+ if (this.stateExpansion.hasStateData(ue))
1629
+ if (typeof Z == "function") {
1630
+ const A = Z;
1631
+ Z = ((Ct) => {
1632
+ const Nt = A(Ct);
1595
1633
  return this.stateExpansion.applyToWidget(
1596
- Et,
1597
- ae,
1598
- a,
1599
- s
1634
+ Nt,
1635
+ ue,
1636
+ s,
1637
+ a
1600
1638
  );
1601
1639
  });
1602
1640
  } else
1603
- $ = this.stateExpansion.applyToWidget(
1604
- $,
1605
- ae,
1606
- a,
1607
- s
1641
+ Z = this.stateExpansion.applyToWidget(
1642
+ Z,
1643
+ ue,
1644
+ s,
1645
+ a
1608
1646
  );
1609
- return $;
1647
+ return Z;
1610
1648
  }
1611
- buildCustomWidgetContext(t, n, r, o, a, i, s) {
1649
+ buildCustomWidgetContext(t, n, r, o, s, i, a) {
1612
1650
  return {
1613
1651
  children: t,
1614
1652
  mapStaticDef: (u, l) => this.mapper.mapStaticDef(u, l),
@@ -1617,9 +1655,9 @@ class An {
1617
1655
  n,
1618
1656
  r,
1619
1657
  o,
1620
- a,
1658
+ s,
1621
1659
  i,
1622
- s
1660
+ a
1623
1661
  )
1624
1662
  };
1625
1663
  }
@@ -1633,31 +1671,31 @@ class An {
1633
1671
  buildBaseDef(t) {
1634
1672
  const n = t.baseDef;
1635
1673
  return typeof n == "function" ? (r) => {
1636
- const o = ue(r), a = n(o);
1637
- return t.path != null ? { ...a, path: t.path } : a;
1674
+ const o = pe(r), s = n(o);
1675
+ return t.path != null ? { ...s, path: t.path } : s;
1638
1676
  } : t.path != null ? { ...n, path: t.path } : n;
1639
1677
  }
1640
1678
  buildDecoratorForMatching(t, n, r) {
1641
1679
  if (typeof t == "function")
1642
1680
  return { itemType: n, tags: [...r] };
1643
- const o = [...r, ..."tags" in t && t.tags ? t.tags : []], a = "uid" in t ? t.uid : void 0, i = "type" in t ? t.type : void 0;
1644
- return { itemType: n, tags: o, uid: a, type: i };
1681
+ const o = [...r, ..."tags" in t && t.tags ? t.tags : []], s = "uid" in t ? t.uid : void 0, i = "type" in t ? t.type : void 0;
1682
+ return { itemType: n, tags: o, uid: s, type: i };
1645
1683
  }
1646
1684
  }
1647
- class wn {
1685
+ class Nn {
1648
1686
  constructor(t, n) {
1649
1687
  this.selectorNormalizer = t, this.walker = n;
1650
1688
  }
1651
1689
  processDxFacade(t, n = [], r) {
1652
- const { defs: o, gslSelectors: a, formConfig: i } = this.prepareForm(
1690
+ const { defs: o, gslSelectors: s, formConfig: i } = this.prepareForm(
1653
1691
  t,
1654
1692
  n,
1655
1693
  r
1656
- ), { widgets: s, eventRegistry: u } = this.walker.walkAndMap(
1694
+ ), { widgets: a, eventRegistry: u } = this.walker.walkAndMap(
1657
1695
  o,
1658
- a,
1696
+ s,
1659
1697
  i
1660
- ), l = s[0];
1698
+ ), l = a[0];
1661
1699
  return this.buildResult({ form: l }, u, i);
1662
1700
  }
1663
1701
  /**
@@ -1671,24 +1709,24 @@ class wn {
1671
1709
  * flex column layout so the form renders as a single vertical container.
1672
1710
  */
1673
1711
  prepareForm(t, n, r) {
1674
- const a = (Array.isArray(t) ? [...t] : [t]).map(
1675
- (u) => typeof u == "function" ? Ot(u) : u
1676
- ), i = this.selectorNormalizer.normalizeSelectors(n), s = {
1712
+ const s = (Array.isArray(t) ? [...t] : [t]).map(
1713
+ (u) => typeof u == "function" ? jt(u) : u
1714
+ ), i = this.selectorNormalizer.normalizeSelectors(n), a = {
1677
1715
  ...this.selectorNormalizer.extractFormConfig(),
1678
1716
  ...r
1679
1717
  };
1680
- if (!s.suppressAutomaticStack) {
1718
+ if (!a.suppressAutomaticStack) {
1681
1719
  const u = {
1682
1720
  def: { uid: "#root", direction: "column", widgetName: "flex" },
1683
- children: a
1721
+ children: s
1684
1722
  };
1685
1723
  return {
1686
- defs: [{ type: "ITEMS", itemType: qe.LAYOUTS, items: [u], tags: [] }],
1724
+ defs: [{ type: "ITEMS", itemType: et.LAYOUTS, items: [u], tags: [] }],
1687
1725
  gslSelectors: i,
1688
- formConfig: s
1726
+ formConfig: a
1689
1727
  };
1690
1728
  }
1691
- return { defs: a, gslSelectors: i, formConfig: s };
1729
+ return { defs: s, gslSelectors: i, formConfig: a };
1692
1730
  }
1693
1731
  /**
1694
1732
  * Converts DX `$`-separated state names to core's `:`-separated names.
@@ -1706,69 +1744,69 @@ class wn {
1706
1744
  states: this.convertStateNames(r.states)
1707
1745
  });
1708
1746
  const o = { form: t };
1709
- return n.size > 0 && (o.events = (a) => {
1710
- const i = n.get(a.name);
1747
+ return n.size > 0 && (o.events = (s) => {
1748
+ const i = n.get(s.name);
1711
1749
  if (i) {
1712
- const s = (l) => {
1750
+ const a = (l) => {
1713
1751
  if (l && typeof l == "object" && "path" in l && !("type" in l)) {
1714
- const { path: p, ...m } = l;
1715
- for (const [y, S] of Object.entries(m))
1716
- a.callback({
1752
+ const { path: p, ...d } = l;
1753
+ for (const [m, y] of Object.entries(d))
1754
+ s.callback({
1717
1755
  type: "OVERRIDE_WIDGET_PROP",
1718
- payload: { path: p, prop: y, value: S }
1756
+ payload: { path: p, prop: m, value: y }
1719
1757
  });
1720
1758
  } else
1721
- a.callback(l);
1759
+ s.callback(l);
1722
1760
  }, u = {
1723
- ...a,
1724
- callback: s,
1725
- update: s
1761
+ ...s,
1762
+ callback: a,
1763
+ update: a
1726
1764
  };
1727
1765
  i(u);
1728
1766
  }
1729
1767
  }), r.dependencies && (o.dependencies = r.dependencies), r.functions && (o.functions = r.functions), r.widgetLoaders && (o.widgetLoaders = r.widgetLoaders), r.validateOn && (o.validateOn = r.validateOn), r.itemRenderers && (o.itemRenderers = r.itemRenderers), o;
1730
1768
  }
1731
1769
  }
1732
- const En = new An(
1733
- cn,
1734
- hn,
1735
- fn,
1736
- be,
1737
- Tn
1738
- ), Sn = new wn(gn, En);
1739
- function tt(e) {
1740
- return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Ee) : Ee(e);
1741
- }
1742
- function Ee(e) {
1770
+ const Zn = new Cn(
1771
+ _n,
1772
+ wn,
1773
+ An,
1774
+ ge,
1775
+ Pn
1776
+ ), Dn = new Nn(zn, Zn);
1777
+ function it(e) {
1778
+ return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every($e) : $e(e);
1779
+ }
1780
+ function $e(e) {
1743
1781
  if (typeof e == "function") return !0;
1744
1782
  if (e === null || typeof e != "object") return !1;
1745
1783
  const t = e;
1746
1784
  return t.type === "ITEMS" && typeof t.itemType == "string";
1747
1785
  }
1748
- function zn(e) {
1786
+ function Ln(e) {
1749
1787
  if (!e || typeof e != "object" || Array.isArray(e))
1750
1788
  return;
1751
1789
  const t = e.form;
1752
- if (tt(t))
1790
+ if (it(t))
1753
1791
  throw new Error(
1754
1792
  "[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object."
1755
1793
  );
1756
1794
  }
1757
- const Se = Object.freeze({}), Pn = Object.freeze({}), ze = /* @__PURE__ */ new WeakMap();
1758
- function ie(e, t) {
1795
+ const Pe = Object.freeze({}), Mn = Object.freeze({}), Ie = /* @__PURE__ */ new WeakMap();
1796
+ function le(e, t) {
1759
1797
  return e == null ? t : typeof e == "object" ? e : {};
1760
1798
  }
1761
- function In(e, t, n) {
1762
- if (!tt(e))
1763
- return zn(e), { formDef: e };
1764
- const r = ie(e, Se), o = ie(t, Se), a = ie(n, Pn);
1765
- let i = ze.get(r);
1766
- i || (i = /* @__PURE__ */ new WeakMap(), ze.set(r, i));
1767
- let s = i.get(o);
1768
- s || (s = /* @__PURE__ */ new WeakMap(), i.set(o, s));
1769
- const u = s.get(a);
1799
+ function Rn(e, t, n) {
1800
+ if (!it(e))
1801
+ return Ln(e), { formDef: e };
1802
+ const r = le(e, Pe), o = le(t, Pe), s = le(n, Mn);
1803
+ let i = Ie.get(r);
1804
+ i || (i = /* @__PURE__ */ new WeakMap(), Ie.set(r, i));
1805
+ let a = i.get(o);
1806
+ a || (a = /* @__PURE__ */ new WeakMap(), i.set(o, a));
1807
+ const u = a.get(s);
1770
1808
  if (u) return u;
1771
- const l = Sn.processDxFacade(
1809
+ const l = Dn.processDxFacade(
1772
1810
  e,
1773
1811
  t,
1774
1812
  n
@@ -1781,73 +1819,73 @@ function In(e, t, n) {
1781
1819
  validateOn: l.validateOn,
1782
1820
  itemRenderers: l.itemRenderers
1783
1821
  };
1784
- return s.set(a, p), p;
1822
+ return a.set(s, p), p;
1785
1823
  }
1786
1824
  function c(e, t, n) {
1787
- function r(s, u) {
1788
- if (s._zod || Object.defineProperty(s, "_zod", {
1825
+ function r(a, u) {
1826
+ if (a._zod || Object.defineProperty(a, "_zod", {
1789
1827
  value: {
1790
1828
  def: u,
1791
1829
  constr: i,
1792
1830
  traits: /* @__PURE__ */ new Set()
1793
1831
  },
1794
1832
  enumerable: !1
1795
- }), s._zod.traits.has(e))
1833
+ }), a._zod.traits.has(e))
1796
1834
  return;
1797
- s._zod.traits.add(e), t(s, u);
1835
+ a._zod.traits.add(e), t(a, u);
1798
1836
  const l = i.prototype, p = Object.keys(l);
1799
- for (let m = 0; m < p.length; m++) {
1800
- const y = p[m];
1801
- y in s || (s[y] = l[y].bind(s));
1837
+ for (let d = 0; d < p.length; d++) {
1838
+ const m = p[d];
1839
+ m in a || (a[m] = l[m].bind(a));
1802
1840
  }
1803
1841
  }
1804
1842
  const o = n?.Parent ?? Object;
1805
- class a extends o {
1843
+ class s extends o {
1806
1844
  }
1807
- Object.defineProperty(a, "name", { value: e });
1808
- function i(s) {
1845
+ Object.defineProperty(s, "name", { value: e });
1846
+ function i(a) {
1809
1847
  var u;
1810
- const l = n?.Parent ? new a() : this;
1811
- r(l, s), (u = l._zod).deferred ?? (u.deferred = []);
1848
+ const l = n?.Parent ? new s() : this;
1849
+ r(l, a), (u = l._zod).deferred ?? (u.deferred = []);
1812
1850
  for (const p of l._zod.deferred)
1813
1851
  p();
1814
1852
  return l;
1815
1853
  }
1816
1854
  return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
1817
- value: (s) => n?.Parent && s instanceof n.Parent ? !0 : s?._zod?.traits?.has(e)
1855
+ value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
1818
1856
  }), Object.defineProperty(i, "name", { value: e }), i;
1819
1857
  }
1820
- class N extends Error {
1858
+ class j extends Error {
1821
1859
  constructor() {
1822
1860
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1823
1861
  }
1824
1862
  }
1825
- class nt extends Error {
1863
+ class at extends Error {
1826
1864
  constructor(t) {
1827
1865
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
1828
1866
  }
1829
1867
  }
1830
- const $n = {};
1831
- function Z(e) {
1832
- return $n;
1868
+ const Wn = {};
1869
+ function L(e) {
1870
+ return Wn;
1833
1871
  }
1834
- function le(e, t) {
1872
+ function de(e, t) {
1835
1873
  return typeof t == "bigint" ? t.toString() : t;
1836
1874
  }
1837
- function fe(e) {
1875
+ function _e(e) {
1838
1876
  return e == null;
1839
1877
  }
1840
- function ye(e) {
1878
+ function ve(e) {
1841
1879
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
1842
1880
  return e.slice(t, n);
1843
1881
  }
1844
- const Pe = /* @__PURE__ */ Symbol("evaluating");
1882
+ const Ce = /* @__PURE__ */ Symbol("evaluating");
1845
1883
  function _(e, t, n) {
1846
1884
  let r;
1847
1885
  Object.defineProperty(e, t, {
1848
1886
  get() {
1849
- if (r !== Pe)
1850
- return r === void 0 && (r = Pe, r = n()), r;
1887
+ if (r !== Ce)
1888
+ return r === void 0 && (r = Ce, r = n()), r;
1851
1889
  },
1852
1890
  set(o) {
1853
1891
  Object.defineProperty(e, t, {
@@ -1858,7 +1896,7 @@ function _(e, t, n) {
1858
1896
  configurable: !0
1859
1897
  });
1860
1898
  }
1861
- function Cn(...e) {
1899
+ function jn(...e) {
1862
1900
  const t = {};
1863
1901
  for (const n of e) {
1864
1902
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1866,34 +1904,34 @@ function Cn(...e) {
1866
1904
  }
1867
1905
  return Object.defineProperties({}, t);
1868
1906
  }
1869
- function On(e) {
1907
+ function Fn(e) {
1870
1908
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1871
1909
  }
1872
- const rt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1910
+ const ut = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1873
1911
  };
1874
- function Ie(e) {
1912
+ function Ne(e) {
1875
1913
  return typeof e == "object" && e !== null && !Array.isArray(e);
1876
1914
  }
1877
- function ce(e) {
1878
- if (Ie(e) === !1)
1915
+ function me(e) {
1916
+ if (Ne(e) === !1)
1879
1917
  return !1;
1880
1918
  const t = e.constructor;
1881
1919
  if (t === void 0 || typeof t != "function")
1882
1920
  return !0;
1883
1921
  const n = t.prototype;
1884
- return !(Ie(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1922
+ return !(Ne(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1885
1923
  }
1886
- function ot(e) {
1887
- return ce(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
1924
+ function lt(e) {
1925
+ return me(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
1888
1926
  }
1889
- function ge(e) {
1927
+ function Te(e) {
1890
1928
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1891
1929
  }
1892
- function at(e, t, n) {
1930
+ function ct(e, t, n) {
1893
1931
  const r = new e._zod.constr(t ?? e._zod.def);
1894
1932
  return (!t || n?.parent) && (r._zod.parent = e), r;
1895
1933
  }
1896
- function h(e) {
1934
+ function f(e) {
1897
1935
  const t = e;
1898
1936
  if (!t)
1899
1937
  return {};
@@ -1906,14 +1944,14 @@ function h(e) {
1906
1944
  }
1907
1945
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
1908
1946
  }
1909
- const Zn = {
1947
+ const Un = {
1910
1948
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
1911
1949
  int32: [-2147483648, 2147483647],
1912
1950
  uint32: [0, 4294967295],
1913
1951
  float32: [-34028234663852886e22, 34028234663852886e22],
1914
1952
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
1915
1953
  };
1916
- function M(e, t = 0) {
1954
+ function W(e, t = 0) {
1917
1955
  if (e.aborted === !0)
1918
1956
  return !0;
1919
1957
  for (let n = t; n < e.issues.length; n++)
@@ -1921,27 +1959,27 @@ function M(e, t = 0) {
1921
1959
  return !0;
1922
1960
  return !1;
1923
1961
  }
1924
- function Dn(e, t) {
1962
+ function xn(e, t) {
1925
1963
  return t.map((n) => {
1926
1964
  var r;
1927
1965
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
1928
1966
  });
1929
1967
  }
1930
- function G(e) {
1968
+ function K(e) {
1931
1969
  return typeof e == "string" ? e : e?.message;
1932
1970
  }
1933
- function D(e, t, n) {
1971
+ function M(e, t, n) {
1934
1972
  const r = { ...e, path: e.path ?? [] };
1935
1973
  if (!e.message) {
1936
- const o = G(e.inst?._zod.def?.error?.(e)) ?? G(t?.error?.(e)) ?? G(n.customError?.(e)) ?? G(n.localeError?.(e)) ?? "Invalid input";
1974
+ const o = K(e.inst?._zod.def?.error?.(e)) ?? K(t?.error?.(e)) ?? K(n.customError?.(e)) ?? K(n.localeError?.(e)) ?? "Invalid input";
1937
1975
  r.message = o;
1938
1976
  }
1939
1977
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
1940
1978
  }
1941
- function _e(e) {
1979
+ function ke(e) {
1942
1980
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
1943
1981
  }
1944
- function U(...e) {
1982
+ function B(...e) {
1945
1983
  const [t, n, r] = e;
1946
1984
  return typeof t == "string" ? {
1947
1985
  message: t,
@@ -1950,209 +1988,213 @@ function U(...e) {
1950
1988
  inst: r
1951
1989
  } : { ...t };
1952
1990
  }
1953
- const it = (e, t) => {
1991
+ const pt = (e, t) => {
1954
1992
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
1955
1993
  value: e._zod,
1956
1994
  enumerable: !1
1957
1995
  }), Object.defineProperty(e, "issues", {
1958
1996
  value: t,
1959
1997
  enumerable: !1
1960
- }), e.message = JSON.stringify(t, le, 2), Object.defineProperty(e, "toString", {
1998
+ }), e.message = JSON.stringify(t, de, 2), Object.defineProperty(e, "toString", {
1961
1999
  value: () => e.message,
1962
2000
  enumerable: !1
1963
2001
  });
1964
- }, st = c("$ZodError", it), H = c("$ZodError", it, { Parent: Error });
1965
- function Ln(e, t = (n) => n.message) {
2002
+ }, dt = c("$ZodError", pt), ee = c("$ZodError", pt, { Parent: Error });
2003
+ function Vn(e, t = (n) => n.message) {
1966
2004
  const n = {}, r = [];
1967
2005
  for (const o of e.issues)
1968
2006
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
1969
2007
  return { formErrors: r, fieldErrors: n };
1970
2008
  }
1971
- function Mn(e, t = (n) => n.message) {
2009
+ function Jn(e, t = (n) => n.message) {
1972
2010
  const n = { _errors: [] }, r = (o) => {
1973
- for (const a of o.issues)
1974
- if (a.code === "invalid_union" && a.errors.length)
1975
- a.errors.map((i) => r({ issues: i }));
1976
- else if (a.code === "invalid_key")
1977
- r({ issues: a.issues });
1978
- else if (a.code === "invalid_element")
1979
- r({ issues: a.issues });
1980
- else if (a.path.length === 0)
1981
- n._errors.push(t(a));
2011
+ for (const s of o.issues)
2012
+ if (s.code === "invalid_union" && s.errors.length)
2013
+ s.errors.map((i) => r({ issues: i }));
2014
+ else if (s.code === "invalid_key")
2015
+ r({ issues: s.issues });
2016
+ else if (s.code === "invalid_element")
2017
+ r({ issues: s.issues });
2018
+ else if (s.path.length === 0)
2019
+ n._errors.push(t(s));
1982
2020
  else {
1983
- let i = n, s = 0;
1984
- for (; s < a.path.length; ) {
1985
- const u = a.path[s];
1986
- s === a.path.length - 1 ? (i[u] = i[u] || { _errors: [] }, i[u]._errors.push(t(a))) : i[u] = i[u] || { _errors: [] }, i = i[u], s++;
2021
+ let i = n, a = 0;
2022
+ for (; a < s.path.length; ) {
2023
+ const u = s.path[a];
2024
+ a === s.path.length - 1 ? (i[u] = i[u] || { _errors: [] }, i[u]._errors.push(t(s))) : i[u] = i[u] || { _errors: [] }, i = i[u], a++;
1987
2025
  }
1988
2026
  }
1989
2027
  };
1990
2028
  return r(e), n;
1991
2029
  }
1992
- const J = (e) => (t, n, r, o) => {
1993
- const a = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, a);
2030
+ const te = (e) => (t, n, r, o) => {
2031
+ const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
1994
2032
  if (i instanceof Promise)
1995
- throw new N();
2033
+ throw new j();
1996
2034
  if (i.issues.length) {
1997
- const s = new (o?.Err ?? e)(i.issues.map((u) => D(u, a, Z())));
1998
- throw rt(s, o?.callee), s;
2035
+ const a = new (o?.Err ?? e)(i.issues.map((u) => M(u, s, L())));
2036
+ throw ut(a, o?.callee), a;
1999
2037
  }
2000
2038
  return i.value;
2001
- }, Nn = /* @__PURE__ */ J(H), Q = (e) => async (t, n, r, o) => {
2002
- const a = r ? Object.assign(r, { async: !0 }) : { async: !0 };
2003
- let i = t._zod.run({ value: n, issues: [] }, a);
2039
+ }, Bn = /* @__PURE__ */ te(ee), ne = (e) => async (t, n, r, o) => {
2040
+ const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
2041
+ let i = t._zod.run({ value: n, issues: [] }, s);
2004
2042
  if (i instanceof Promise && (i = await i), i.issues.length) {
2005
- const s = new (o?.Err ?? e)(i.issues.map((u) => D(u, a, Z())));
2006
- throw rt(s, o?.callee), s;
2043
+ const a = new (o?.Err ?? e)(i.issues.map((u) => M(u, s, L())));
2044
+ throw ut(a, o?.callee), a;
2007
2045
  }
2008
2046
  return i.value;
2009
- }, Rn = /* @__PURE__ */ Q(H), ee = (e) => (t, n, r) => {
2010
- const o = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, o);
2011
- if (a instanceof Promise)
2012
- throw new N();
2013
- return a.issues.length ? {
2047
+ }, Gn = /* @__PURE__ */ ne(ee), re = (e) => (t, n, r) => {
2048
+ const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
2049
+ if (s instanceof Promise)
2050
+ throw new j();
2051
+ return s.issues.length ? {
2014
2052
  success: !1,
2015
- error: new (e ?? st)(a.issues.map((i) => D(i, o, Z())))
2016
- } : { success: !0, data: a.value };
2017
- }, ut = /* @__PURE__ */ ee(H), te = (e) => async (t, n, r) => {
2053
+ error: new (e ?? dt)(s.issues.map((i) => M(i, o, L())))
2054
+ } : { success: !0, data: s.value };
2055
+ }, mt = /* @__PURE__ */ re(ee), oe = (e) => async (t, n, r) => {
2018
2056
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
2019
- let a = t._zod.run({ value: n, issues: [] }, o);
2020
- return a instanceof Promise && (a = await a), a.issues.length ? {
2057
+ let s = t._zod.run({ value: n, issues: [] }, o);
2058
+ return s instanceof Promise && (s = await s), s.issues.length ? {
2021
2059
  success: !1,
2022
- error: new e(a.issues.map((i) => D(i, o, Z())))
2023
- } : { success: !0, data: a.value };
2024
- }, lt = /* @__PURE__ */ te(H), xn = (e) => (t, n, r) => {
2060
+ error: new e(s.issues.map((i) => M(i, o, L())))
2061
+ } : { success: !0, data: s.value };
2062
+ }, ht = /* @__PURE__ */ oe(ee), Yn = (e) => (t, n, r) => {
2025
2063
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2026
- return J(e)(t, n, o);
2027
- }, Wn = (e) => (t, n, r) => J(e)(t, n, r), Fn = (e) => async (t, n, r) => {
2064
+ return te(e)(t, n, o);
2065
+ }, Kn = (e) => (t, n, r) => te(e)(t, n, r), qn = (e) => async (t, n, r) => {
2028
2066
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2029
- return Q(e)(t, n, o);
2030
- }, Un = (e) => async (t, n, r) => Q(e)(t, n, r), jn = (e) => (t, n, r) => {
2067
+ return ne(e)(t, n, o);
2068
+ }, Xn = (e) => async (t, n, r) => ne(e)(t, n, r), Hn = (e) => (t, n, r) => {
2031
2069
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2032
- return ee(e)(t, n, o);
2033
- }, Vn = (e) => (t, n, r) => ee(e)(t, n, r), Bn = (e) => async (t, n, r) => {
2070
+ return re(e)(t, n, o);
2071
+ }, Qn = (e) => (t, n, r) => re(e)(t, n, r), er = (e) => async (t, n, r) => {
2034
2072
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2035
- return te(e)(t, n, o);
2036
- }, Gn = (e) => async (t, n, r) => te(e)(t, n, r), Yn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, $e = (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)$/, Kn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, qn = /^(?:(?: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])$/, Xn = /^(([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}|:))$/, Hn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, ct = "(?:(?:\\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])))", Jn = /* @__PURE__ */ new RegExp(`^${ct}$`);
2037
- function pt(e) {
2073
+ return oe(e)(t, n, o);
2074
+ }, tr = (e) => async (t, n, r) => oe(e)(t, n, r), nr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ze = (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)$/, rr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, 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])$/, sr = /^(([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}|:))$/, ir = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, ft = "(?:(?:\\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])))", ar = /* @__PURE__ */ new RegExp(`^${ft}$`);
2075
+ function yt(e) {
2038
2076
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
2039
2077
  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+)?)?`;
2040
2078
  }
2041
- function Qn(e) {
2042
- return new RegExp(`^${pt(e)}$`);
2079
+ function ur(e) {
2080
+ return new RegExp(`^${yt(e)}$`);
2043
2081
  }
2044
- function er(e) {
2045
- const t = pt({ precision: e.precision }), n = ["Z"];
2082
+ function lr(e) {
2083
+ const t = yt({ precision: e.precision }), n = ["Z"];
2046
2084
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
2047
2085
  const r = `${t}(?:${n.join("|")})`;
2048
- return new RegExp(`^${ct}T(?:${r})$`);
2086
+ return new RegExp(`^${ft}T(?:${r})$`);
2049
2087
  }
2050
- const tr = (e) => {
2088
+ const cr = (e) => {
2051
2089
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
2052
2090
  return new RegExp(`^${t}$`);
2053
- }, nr = /^-?\d+$/, rr = /^-?\d+(?:\.\d+)?/, or = /^(?:true|false)$/i, ar = /^[^A-Z]*$/, ir = /^[^a-z]*$/, E = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
2091
+ }, pr = /^-?\d+$/, dr = /^-?\d+(?:\.\d+)?$/, mr = /^(?:true|false)$/i, hr = /^[^A-Z]*$/, fr = /^[^a-z]*$/, $ = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
2054
2092
  var n;
2055
2093
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
2056
- }), dt = {
2094
+ }), bt = {
2057
2095
  number: "number",
2058
2096
  bigint: "bigint",
2059
2097
  object: "date"
2060
- }, sr = /* @__PURE__ */ c("$ZodCheckLessThan", (e, t) => {
2061
- E.init(e, t);
2062
- const n = dt[typeof t.value];
2098
+ }, yr = /* @__PURE__ */ c("$ZodCheckLessThan", (e, t) => {
2099
+ $.init(e, t);
2100
+ const n = bt[typeof t.value];
2063
2101
  e._zod.onattach.push((r) => {
2064
- const o = r._zod.bag, a = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
2065
- t.value < a && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
2102
+ const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
2103
+ t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
2066
2104
  }), e._zod.check = (r) => {
2067
2105
  (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
2068
2106
  origin: n,
2069
2107
  code: "too_big",
2070
- maximum: t.value,
2108
+ maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
2071
2109
  input: r.value,
2072
2110
  inclusive: t.inclusive,
2073
2111
  inst: e,
2074
2112
  continue: !t.abort
2075
2113
  });
2076
2114
  };
2077
- }), ur = /* @__PURE__ */ c("$ZodCheckGreaterThan", (e, t) => {
2078
- E.init(e, t);
2079
- const n = dt[typeof t.value];
2115
+ }), br = /* @__PURE__ */ c("$ZodCheckGreaterThan", (e, t) => {
2116
+ $.init(e, t);
2117
+ const n = bt[typeof t.value];
2080
2118
  e._zod.onattach.push((r) => {
2081
- const o = r._zod.bag, a = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
2082
- t.value > a && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
2119
+ const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
2120
+ t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
2083
2121
  }), e._zod.check = (r) => {
2084
2122
  (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
2085
2123
  origin: n,
2086
2124
  code: "too_small",
2087
- minimum: t.value,
2125
+ minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
2088
2126
  input: r.value,
2089
2127
  inclusive: t.inclusive,
2090
2128
  inst: e,
2091
2129
  continue: !t.abort
2092
2130
  });
2093
2131
  };
2094
- }), lr = /* @__PURE__ */ c("$ZodCheckNumberFormat", (e, t) => {
2095
- E.init(e, t), t.format = t.format || "float64";
2096
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, a] = Zn[t.format];
2132
+ }), gr = /* @__PURE__ */ c("$ZodCheckNumberFormat", (e, t) => {
2133
+ $.init(e, t), t.format = t.format || "float64";
2134
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = Un[t.format];
2097
2135
  e._zod.onattach.push((i) => {
2098
- const s = i._zod.bag;
2099
- s.format = t.format, s.minimum = o, s.maximum = a, n && (s.pattern = nr);
2136
+ const a = i._zod.bag;
2137
+ a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = pr);
2100
2138
  }), e._zod.check = (i) => {
2101
- const s = i.value;
2139
+ const a = i.value;
2102
2140
  if (n) {
2103
- if (!Number.isInteger(s)) {
2141
+ if (!Number.isInteger(a)) {
2104
2142
  i.issues.push({
2105
2143
  expected: r,
2106
2144
  format: t.format,
2107
2145
  code: "invalid_type",
2108
2146
  continue: !1,
2109
- input: s,
2147
+ input: a,
2110
2148
  inst: e
2111
2149
  });
2112
2150
  return;
2113
2151
  }
2114
- if (!Number.isSafeInteger(s)) {
2115
- s > 0 ? i.issues.push({
2116
- input: s,
2152
+ if (!Number.isSafeInteger(a)) {
2153
+ a > 0 ? i.issues.push({
2154
+ input: a,
2117
2155
  code: "too_big",
2118
2156
  maximum: Number.MAX_SAFE_INTEGER,
2119
2157
  note: "Integers must be within the safe integer range.",
2120
2158
  inst: e,
2121
2159
  origin: r,
2160
+ inclusive: !0,
2122
2161
  continue: !t.abort
2123
2162
  }) : i.issues.push({
2124
- input: s,
2163
+ input: a,
2125
2164
  code: "too_small",
2126
2165
  minimum: Number.MIN_SAFE_INTEGER,
2127
2166
  note: "Integers must be within the safe integer range.",
2128
2167
  inst: e,
2129
2168
  origin: r,
2169
+ inclusive: !0,
2130
2170
  continue: !t.abort
2131
2171
  });
2132
2172
  return;
2133
2173
  }
2134
2174
  }
2135
- s < o && i.issues.push({
2175
+ a < o && i.issues.push({
2136
2176
  origin: "number",
2137
- input: s,
2177
+ input: a,
2138
2178
  code: "too_small",
2139
2179
  minimum: o,
2140
2180
  inclusive: !0,
2141
2181
  inst: e,
2142
2182
  continue: !t.abort
2143
- }), s > a && i.issues.push({
2183
+ }), a > s && i.issues.push({
2144
2184
  origin: "number",
2145
- input: s,
2185
+ input: a,
2146
2186
  code: "too_big",
2147
- maximum: a,
2148
- inst: e
2187
+ maximum: s,
2188
+ inclusive: !0,
2189
+ inst: e,
2190
+ continue: !t.abort
2149
2191
  });
2150
2192
  };
2151
- }), cr = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, t) => {
2193
+ }), _r = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, t) => {
2152
2194
  var n;
2153
- E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
2195
+ $.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
2154
2196
  const o = r.value;
2155
- return !fe(o) && o.length !== void 0;
2197
+ return !_e(o) && o.length !== void 0;
2156
2198
  }), e._zod.onattach.push((r) => {
2157
2199
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
2158
2200
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -2160,7 +2202,7 @@ const tr = (e) => {
2160
2202
  const o = r.value;
2161
2203
  if (o.length <= t.maximum)
2162
2204
  return;
2163
- const i = _e(o);
2205
+ const i = ke(o);
2164
2206
  r.issues.push({
2165
2207
  origin: i,
2166
2208
  code: "too_big",
@@ -2171,11 +2213,11 @@ const tr = (e) => {
2171
2213
  continue: !t.abort
2172
2214
  });
2173
2215
  };
2174
- }), pr = /* @__PURE__ */ c("$ZodCheckMinLength", (e, t) => {
2216
+ }), vr = /* @__PURE__ */ c("$ZodCheckMinLength", (e, t) => {
2175
2217
  var n;
2176
- E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
2218
+ $.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
2177
2219
  const o = r.value;
2178
- return !fe(o) && o.length !== void 0;
2220
+ return !_e(o) && o.length !== void 0;
2179
2221
  }), e._zod.onattach.push((r) => {
2180
2222
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
2181
2223
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -2183,7 +2225,7 @@ const tr = (e) => {
2183
2225
  const o = r.value;
2184
2226
  if (o.length >= t.minimum)
2185
2227
  return;
2186
- const i = _e(o);
2228
+ const i = ke(o);
2187
2229
  r.issues.push({
2188
2230
  origin: i,
2189
2231
  code: "too_small",
@@ -2194,22 +2236,22 @@ const tr = (e) => {
2194
2236
  continue: !t.abort
2195
2237
  });
2196
2238
  };
2197
- }), dr = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, t) => {
2239
+ }), Tr = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, t) => {
2198
2240
  var n;
2199
- E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
2241
+ $.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
2200
2242
  const o = r.value;
2201
- return !fe(o) && o.length !== void 0;
2243
+ return !_e(o) && o.length !== void 0;
2202
2244
  }), e._zod.onattach.push((r) => {
2203
2245
  const o = r._zod.bag;
2204
2246
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
2205
2247
  }), e._zod.check = (r) => {
2206
- const o = r.value, a = o.length;
2207
- if (a === t.length)
2248
+ const o = r.value, s = o.length;
2249
+ if (s === t.length)
2208
2250
  return;
2209
- const i = _e(o), s = a > t.length;
2251
+ const i = ke(o), a = s > t.length;
2210
2252
  r.issues.push({
2211
2253
  origin: i,
2212
- ...s ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
2254
+ ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
2213
2255
  inclusive: !0,
2214
2256
  exact: !0,
2215
2257
  input: r.value,
@@ -2217,11 +2259,11 @@ const tr = (e) => {
2217
2259
  continue: !t.abort
2218
2260
  });
2219
2261
  };
2220
- }), ne = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, t) => {
2262
+ }), se = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, t) => {
2221
2263
  var n, r;
2222
- E.init(e, t), e._zod.onattach.push((o) => {
2223
- const a = o._zod.bag;
2224
- a.format = t.format, t.pattern && (a.patterns ?? (a.patterns = /* @__PURE__ */ new Set()), a.patterns.add(t.pattern));
2264
+ $.init(e, t), e._zod.onattach.push((o) => {
2265
+ const s = o._zod.bag;
2266
+ s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
2225
2267
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
2226
2268
  t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
2227
2269
  origin: "string",
@@ -2234,8 +2276,8 @@ const tr = (e) => {
2234
2276
  });
2235
2277
  }) : (r = e._zod).check ?? (r.check = () => {
2236
2278
  });
2237
- }), mr = /* @__PURE__ */ c("$ZodCheckRegex", (e, t) => {
2238
- ne.init(e, t), e._zod.check = (n) => {
2279
+ }), kr = /* @__PURE__ */ c("$ZodCheckRegex", (e, t) => {
2280
+ se.init(e, t), e._zod.check = (n) => {
2239
2281
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
2240
2282
  origin: "string",
2241
2283
  code: "invalid_format",
@@ -2246,16 +2288,16 @@ const tr = (e) => {
2246
2288
  continue: !t.abort
2247
2289
  });
2248
2290
  };
2249
- }), hr = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
2250
- t.pattern ?? (t.pattern = ar), ne.init(e, t);
2251
- }), br = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
2252
- t.pattern ?? (t.pattern = ir), ne.init(e, t);
2253
- }), fr = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
2254
- E.init(e, t);
2255
- const n = ge(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
2291
+ }), wr = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
2292
+ t.pattern ?? (t.pattern = hr), se.init(e, t);
2293
+ }), Sr = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
2294
+ t.pattern ?? (t.pattern = fr), se.init(e, t);
2295
+ }), Ar = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
2296
+ $.init(e, t);
2297
+ const n = Te(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
2256
2298
  t.pattern = r, e._zod.onattach.push((o) => {
2257
- const a = o._zod.bag;
2258
- a.patterns ?? (a.patterns = /* @__PURE__ */ new Set()), a.patterns.add(r);
2299
+ const s = o._zod.bag;
2300
+ s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
2259
2301
  }), e._zod.check = (o) => {
2260
2302
  o.value.includes(t.includes, t.position) || o.issues.push({
2261
2303
  origin: "string",
@@ -2267,9 +2309,9 @@ const tr = (e) => {
2267
2309
  continue: !t.abort
2268
2310
  });
2269
2311
  };
2270
- }), yr = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, t) => {
2271
- E.init(e, t);
2272
- const n = new RegExp(`^${ge(t.prefix)}.*`);
2312
+ }), Er = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, t) => {
2313
+ $.init(e, t);
2314
+ const n = new RegExp(`^${Te(t.prefix)}.*`);
2273
2315
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
2274
2316
  const o = r._zod.bag;
2275
2317
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -2284,9 +2326,9 @@ const tr = (e) => {
2284
2326
  continue: !t.abort
2285
2327
  });
2286
2328
  };
2287
- }), gr = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, t) => {
2288
- E.init(e, t);
2289
- const n = new RegExp(`.*${ge(t.suffix)}$`);
2329
+ }), zr = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, t) => {
2330
+ $.init(e, t);
2331
+ const n = new RegExp(`.*${Te(t.suffix)}$`);
2290
2332
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
2291
2333
  const o = r._zod.bag;
2292
2334
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -2301,90 +2343,90 @@ const tr = (e) => {
2301
2343
  continue: !t.abort
2302
2344
  });
2303
2345
  };
2304
- }), _r = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, t) => {
2305
- E.init(e, t), e._zod.check = (n) => {
2346
+ }), Or = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, t) => {
2347
+ $.init(e, t), e._zod.check = (n) => {
2306
2348
  n.value = t.tx(n.value);
2307
2349
  };
2308
- }), vr = {
2350
+ }), $r = {
2309
2351
  major: 4,
2310
- minor: 1,
2311
- patch: 13
2312
- }, T = /* @__PURE__ */ c("$ZodType", (e, t) => {
2352
+ minor: 3,
2353
+ patch: 6
2354
+ }, k = /* @__PURE__ */ c("$ZodType", (e, t) => {
2313
2355
  var n;
2314
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = vr;
2356
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = $r;
2315
2357
  const r = [...e._zod.def.checks ?? []];
2316
2358
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
2317
2359
  for (const o of r)
2318
- for (const a of o._zod.onattach)
2319
- a(e);
2360
+ for (const s of o._zod.onattach)
2361
+ s(e);
2320
2362
  if (r.length === 0)
2321
2363
  (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
2322
2364
  e._zod.run = e._zod.parse;
2323
2365
  });
2324
2366
  else {
2325
- const o = (i, s, u) => {
2326
- let l = M(i), p;
2327
- for (const m of s) {
2328
- if (m._zod.def.when) {
2329
- if (!m._zod.def.when(i))
2367
+ const o = (i, a, u) => {
2368
+ let l = W(i), p;
2369
+ for (const d of a) {
2370
+ if (d._zod.def.when) {
2371
+ if (!d._zod.def.when(i))
2330
2372
  continue;
2331
2373
  } else if (l)
2332
2374
  continue;
2333
- const y = i.issues.length, S = m._zod.check(i);
2334
- if (S instanceof Promise && u?.async === !1)
2335
- throw new N();
2336
- if (p || S instanceof Promise)
2375
+ const m = i.issues.length, y = d._zod.check(i);
2376
+ if (y instanceof Promise && u?.async === !1)
2377
+ throw new j();
2378
+ if (p || y instanceof Promise)
2337
2379
  p = (p ?? Promise.resolve()).then(async () => {
2338
- await S, i.issues.length !== y && (l || (l = M(i, y)));
2380
+ await y, i.issues.length !== m && (l || (l = W(i, m)));
2339
2381
  });
2340
2382
  else {
2341
- if (i.issues.length === y)
2383
+ if (i.issues.length === m)
2342
2384
  continue;
2343
- l || (l = M(i, y));
2385
+ l || (l = W(i, m));
2344
2386
  }
2345
2387
  }
2346
2388
  return p ? p.then(() => i) : i;
2347
- }, a = (i, s, u) => {
2348
- if (M(i))
2389
+ }, s = (i, a, u) => {
2390
+ if (W(i))
2349
2391
  return i.aborted = !0, i;
2350
- const l = o(s, r, u);
2392
+ const l = o(a, r, u);
2351
2393
  if (l instanceof Promise) {
2352
2394
  if (u.async === !1)
2353
- throw new N();
2395
+ throw new j();
2354
2396
  return l.then((p) => e._zod.parse(p, u));
2355
2397
  }
2356
2398
  return e._zod.parse(l, u);
2357
2399
  };
2358
- e._zod.run = (i, s) => {
2359
- if (s.skipChecks)
2360
- return e._zod.parse(i, s);
2361
- if (s.direction === "backward") {
2362
- const l = e._zod.parse({ value: i.value, issues: [] }, { ...s, skipChecks: !0 });
2363
- return l instanceof Promise ? l.then((p) => a(p, i, s)) : a(l, i, s);
2400
+ e._zod.run = (i, a) => {
2401
+ if (a.skipChecks)
2402
+ return e._zod.parse(i, a);
2403
+ if (a.direction === "backward") {
2404
+ const l = e._zod.parse({ value: i.value, issues: [] }, { ...a, skipChecks: !0 });
2405
+ return l instanceof Promise ? l.then((p) => s(p, i, a)) : s(l, i, a);
2364
2406
  }
2365
- const u = e._zod.parse(i, s);
2407
+ const u = e._zod.parse(i, a);
2366
2408
  if (u instanceof Promise) {
2367
- if (s.async === !1)
2368
- throw new N();
2369
- return u.then((l) => o(l, r, s));
2409
+ if (a.async === !1)
2410
+ throw new j();
2411
+ return u.then((l) => o(l, r, a));
2370
2412
  }
2371
- return o(u, r, s);
2413
+ return o(u, r, a);
2372
2414
  };
2373
2415
  }
2374
- e["~standard"] = {
2416
+ _(e, "~standard", () => ({
2375
2417
  validate: (o) => {
2376
2418
  try {
2377
- const a = ut(e, o);
2378
- return a.success ? { value: a.data } : { issues: a.error?.issues };
2419
+ const s = mt(e, o);
2420
+ return s.success ? { value: s.data } : { issues: s.error?.issues };
2379
2421
  } catch {
2380
- return lt(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2422
+ return ht(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2381
2423
  }
2382
2424
  },
2383
2425
  vendor: "zod",
2384
2426
  version: 1
2385
- };
2386
- }), ve = /* @__PURE__ */ c("$ZodString", (e, t) => {
2387
- T.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? tr(e._zod.bag), e._zod.parse = (n, r) => {
2427
+ }));
2428
+ }), we = /* @__PURE__ */ c("$ZodString", (e, t) => {
2429
+ k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? cr(e._zod.bag), e._zod.parse = (n, r) => {
2388
2430
  if (t.coerce)
2389
2431
  try {
2390
2432
  n.value = String(n.value);
@@ -2397,9 +2439,9 @@ const tr = (e) => {
2397
2439
  inst: e
2398
2440
  }), n;
2399
2441
  };
2400
- }), P = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
2401
- ne.init(e, t), ve.init(e, t);
2402
- }), Tr = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
2442
+ }), C = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
2443
+ se.init(e, t), we.init(e, t);
2444
+ }), Pr = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
2403
2445
  if (t.version) {
2404
2446
  const r = {
2405
2447
  v1: 1,
@@ -2413,14 +2455,14 @@ const tr = (e) => {
2413
2455
  }[t.version];
2414
2456
  if (r === void 0)
2415
2457
  throw new Error(`Invalid UUID version: "${t.version}"`);
2416
- t.pattern ?? (t.pattern = $e(r));
2458
+ t.pattern ?? (t.pattern = Ze(r));
2417
2459
  } else
2418
- t.pattern ?? (t.pattern = $e());
2419
- P.init(e, t);
2420
- }), kr = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
2421
- t.pattern ?? (t.pattern = Kn), P.init(e, t);
2422
- }), Ar = /* @__PURE__ */ c("$ZodURL", (e, t) => {
2423
- P.init(e, t), e._zod.check = (n) => {
2460
+ t.pattern ?? (t.pattern = Ze());
2461
+ C.init(e, t);
2462
+ }), Ir = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
2463
+ t.pattern ?? (t.pattern = rr), C.init(e, t);
2464
+ }), Cr = /* @__PURE__ */ c("$ZodURL", (e, t) => {
2465
+ C.init(e, t), e._zod.check = (n) => {
2424
2466
  try {
2425
2467
  const r = n.value.trim(), o = new URL(r);
2426
2468
  t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
@@ -2451,18 +2493,18 @@ const tr = (e) => {
2451
2493
  });
2452
2494
  }
2453
2495
  };
2454
- }), wr = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
2455
- t.pattern ?? (t.pattern = er(t)), P.init(e, t);
2456
- }), Er = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
2457
- t.pattern ?? (t.pattern = Jn), P.init(e, t);
2458
- }), Sr = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
2459
- t.pattern ?? (t.pattern = Qn(t)), P.init(e, t);
2460
- }), zr = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
2461
- t.pattern ?? (t.pattern = Yn), P.init(e, t);
2462
- }), Pr = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
2463
- t.pattern ?? (t.pattern = qn), P.init(e, t), e._zod.bag.format = "ipv4";
2464
- }), Ir = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
2465
- t.pattern ?? (t.pattern = Xn), P.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2496
+ }), Nr = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
2497
+ t.pattern ?? (t.pattern = lr(t)), C.init(e, t);
2498
+ }), Zr = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
2499
+ t.pattern ?? (t.pattern = ar), C.init(e, t);
2500
+ }), Dr = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
2501
+ t.pattern ?? (t.pattern = ur(t)), C.init(e, t);
2502
+ }), Lr = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
2503
+ t.pattern ?? (t.pattern = nr), C.init(e, t);
2504
+ }), Mr = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
2505
+ t.pattern ?? (t.pattern = or), C.init(e, t), e._zod.bag.format = "ipv4";
2506
+ }), Rr = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
2507
+ t.pattern ?? (t.pattern = sr), C.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2466
2508
  try {
2467
2509
  new URL(`http://[${n.value}]`);
2468
2510
  } catch {
@@ -2475,8 +2517,8 @@ const tr = (e) => {
2475
2517
  });
2476
2518
  }
2477
2519
  };
2478
- }), $r = /* @__PURE__ */ c("$ZodCustomStringFormat", (e, t) => {
2479
- P.init(e, t), e._zod.check = (n) => {
2520
+ }), Wr = /* @__PURE__ */ c("$ZodCustomStringFormat", (e, t) => {
2521
+ C.init(e, t), e._zod.check = (n) => {
2480
2522
  t.fn(n.value) || n.issues.push({
2481
2523
  code: "invalid_format",
2482
2524
  format: t.format,
@@ -2485,8 +2527,8 @@ const tr = (e) => {
2485
2527
  continue: !t.abort
2486
2528
  });
2487
2529
  };
2488
- }), mt = /* @__PURE__ */ c("$ZodNumber", (e, t) => {
2489
- T.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? rr, e._zod.parse = (n, r) => {
2530
+ }), gt = /* @__PURE__ */ c("$ZodNumber", (e, t) => {
2531
+ k.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? dr, e._zod.parse = (n, r) => {
2490
2532
  if (t.coerce)
2491
2533
  try {
2492
2534
  n.value = Number(n.value);
@@ -2495,19 +2537,19 @@ const tr = (e) => {
2495
2537
  const o = n.value;
2496
2538
  if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
2497
2539
  return n;
2498
- const a = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
2540
+ const s = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
2499
2541
  return n.issues.push({
2500
2542
  expected: "number",
2501
2543
  code: "invalid_type",
2502
2544
  input: o,
2503
2545
  inst: e,
2504
- ...a ? { received: a } : {}
2546
+ ...s ? { received: s } : {}
2505
2547
  }), n;
2506
2548
  };
2507
- }), Cr = /* @__PURE__ */ c("$ZodNumberFormat", (e, t) => {
2508
- lr.init(e, t), mt.init(e, t);
2509
- }), Or = /* @__PURE__ */ c("$ZodBoolean", (e, t) => {
2510
- T.init(e, t), e._zod.pattern = or, e._zod.parse = (n, r) => {
2549
+ }), jr = /* @__PURE__ */ c("$ZodNumberFormat", (e, t) => {
2550
+ gr.init(e, t), gt.init(e, t);
2551
+ }), Fr = /* @__PURE__ */ c("$ZodBoolean", (e, t) => {
2552
+ k.init(e, t), e._zod.pattern = mr, e._zod.parse = (n, r) => {
2511
2553
  if (t.coerce)
2512
2554
  try {
2513
2555
  n.value = !!n.value;
@@ -2521,14 +2563,14 @@ const tr = (e) => {
2521
2563
  inst: e
2522
2564
  }), n;
2523
2565
  };
2524
- }), Zr = /* @__PURE__ */ c("$ZodAny", (e, t) => {
2525
- T.init(e, t), e._zod.parse = (n) => n;
2566
+ }), Ur = /* @__PURE__ */ c("$ZodAny", (e, t) => {
2567
+ k.init(e, t), e._zod.parse = (n) => n;
2526
2568
  });
2527
- function Ce(e, t, n) {
2528
- e.issues.length && t.issues.push(...Dn(n, e.issues)), t.value[n] = e.value;
2569
+ function De(e, t, n) {
2570
+ e.issues.length && t.issues.push(...xn(n, e.issues)), t.value[n] = e.value;
2529
2571
  }
2530
- const ht = /* @__PURE__ */ c("$ZodArray", (e, t) => {
2531
- T.init(e, t), e._zod.parse = (n, r) => {
2572
+ const _t = /* @__PURE__ */ c("$ZodArray", (e, t) => {
2573
+ k.init(e, t), e._zod.parse = (n, r) => {
2532
2574
  const o = n.value;
2533
2575
  if (!Array.isArray(o))
2534
2576
  return n.issues.push({
@@ -2538,81 +2580,81 @@ const ht = /* @__PURE__ */ c("$ZodArray", (e, t) => {
2538
2580
  inst: e
2539
2581
  }), n;
2540
2582
  n.value = Array(o.length);
2541
- const a = [];
2583
+ const s = [];
2542
2584
  for (let i = 0; i < o.length; i++) {
2543
- const s = o[i], u = t.element._zod.run({
2544
- value: s,
2585
+ const a = o[i], u = t.element._zod.run({
2586
+ value: a,
2545
2587
  issues: []
2546
2588
  }, r);
2547
- u instanceof Promise ? a.push(u.then((l) => Ce(l, n, i))) : Ce(u, n, i);
2589
+ u instanceof Promise ? s.push(u.then((l) => De(l, n, i))) : De(u, n, i);
2548
2590
  }
2549
- return a.length ? Promise.all(a).then(() => n) : n;
2591
+ return s.length ? Promise.all(s).then(() => n) : n;
2550
2592
  };
2551
2593
  });
2552
- function Oe(e, t, n, r) {
2553
- for (const a of e)
2554
- if (a.issues.length === 0)
2555
- return t.value = a.value, t;
2556
- const o = e.filter((a) => !M(a));
2594
+ function Le(e, t, n, r) {
2595
+ for (const s of e)
2596
+ if (s.issues.length === 0)
2597
+ return t.value = s.value, t;
2598
+ const o = e.filter((s) => !W(s));
2557
2599
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
2558
2600
  code: "invalid_union",
2559
2601
  input: t.value,
2560
2602
  inst: n,
2561
- errors: e.map((a) => a.issues.map((i) => D(i, r, Z())))
2603
+ errors: e.map((s) => s.issues.map((i) => M(i, r, L())))
2562
2604
  }), t);
2563
2605
  }
2564
- const Dr = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
2565
- T.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
2606
+ const xr = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
2607
+ k.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
2566
2608
  if (t.options.every((o) => o._zod.values))
2567
2609
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
2568
2610
  }), _(e._zod, "pattern", () => {
2569
2611
  if (t.options.every((o) => o._zod.pattern)) {
2570
- const o = t.options.map((a) => a._zod.pattern);
2571
- return new RegExp(`^(${o.map((a) => ye(a.source)).join("|")})$`);
2612
+ const o = t.options.map((s) => s._zod.pattern);
2613
+ return new RegExp(`^(${o.map((s) => ve(s.source)).join("|")})$`);
2572
2614
  }
2573
2615
  });
2574
2616
  const n = t.options.length === 1, r = t.options[0]._zod.run;
2575
- e._zod.parse = (o, a) => {
2617
+ e._zod.parse = (o, s) => {
2576
2618
  if (n)
2577
- return r(o, a);
2619
+ return r(o, s);
2578
2620
  let i = !1;
2579
- const s = [];
2621
+ const a = [];
2580
2622
  for (const u of t.options) {
2581
2623
  const l = u._zod.run({
2582
2624
  value: o.value,
2583
2625
  issues: []
2584
- }, a);
2626
+ }, s);
2585
2627
  if (l instanceof Promise)
2586
- s.push(l), i = !0;
2628
+ a.push(l), i = !0;
2587
2629
  else {
2588
2630
  if (l.issues.length === 0)
2589
2631
  return l;
2590
- s.push(l);
2632
+ a.push(l);
2591
2633
  }
2592
2634
  }
2593
- return i ? Promise.all(s).then((u) => Oe(u, o, e, a)) : Oe(s, o, e, a);
2635
+ return i ? Promise.all(a).then((u) => Le(u, o, e, s)) : Le(a, o, e, s);
2594
2636
  };
2595
- }), Lr = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
2596
- T.init(e, t), e._zod.parse = (n, r) => {
2597
- const o = n.value, a = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2598
- return a instanceof Promise || i instanceof Promise ? Promise.all([a, i]).then(([u, l]) => Ze(n, u, l)) : Ze(n, a, i);
2637
+ }), Vr = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
2638
+ k.init(e, t), e._zod.parse = (n, r) => {
2639
+ const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2640
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, l]) => Me(n, u, l)) : Me(n, s, i);
2599
2641
  };
2600
2642
  });
2601
- function pe(e, t) {
2643
+ function he(e, t) {
2602
2644
  if (e === t)
2603
2645
  return { valid: !0, data: e };
2604
2646
  if (e instanceof Date && t instanceof Date && +e == +t)
2605
2647
  return { valid: !0, data: e };
2606
- if (ce(e) && ce(t)) {
2607
- const n = Object.keys(t), r = Object.keys(e).filter((a) => n.indexOf(a) !== -1), o = { ...e, ...t };
2608
- for (const a of r) {
2609
- const i = pe(e[a], t[a]);
2648
+ if (me(e) && me(t)) {
2649
+ const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
2650
+ for (const s of r) {
2651
+ const i = he(e[s], t[s]);
2610
2652
  if (!i.valid)
2611
2653
  return {
2612
2654
  valid: !1,
2613
- mergeErrorPath: [a, ...i.mergeErrorPath]
2655
+ mergeErrorPath: [s, ...i.mergeErrorPath]
2614
2656
  };
2615
- o[a] = i.data;
2657
+ o[s] = i.data;
2616
2658
  }
2617
2659
  return { valid: !0, data: o };
2618
2660
  }
@@ -2621,7 +2663,7 @@ function pe(e, t) {
2621
2663
  return { valid: !1, mergeErrorPath: [] };
2622
2664
  const n = [];
2623
2665
  for (let r = 0; r < e.length; r++) {
2624
- const o = e[r], a = t[r], i = pe(o, a);
2666
+ const o = e[r], s = t[r], i = he(o, s);
2625
2667
  if (!i.valid)
2626
2668
  return {
2627
2669
  valid: !1,
@@ -2633,70 +2675,88 @@ function pe(e, t) {
2633
2675
  }
2634
2676
  return { valid: !1, mergeErrorPath: [] };
2635
2677
  }
2636
- function Ze(e, t, n) {
2637
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), M(e))
2678
+ function Me(e, t, n) {
2679
+ const r = /* @__PURE__ */ new Map();
2680
+ let o;
2681
+ for (const a of t.issues)
2682
+ if (a.code === "unrecognized_keys") {
2683
+ o ?? (o = a);
2684
+ for (const u of a.keys)
2685
+ r.has(u) || r.set(u, {}), r.get(u).l = !0;
2686
+ } else
2687
+ e.issues.push(a);
2688
+ for (const a of n.issues)
2689
+ if (a.code === "unrecognized_keys")
2690
+ for (const u of a.keys)
2691
+ r.has(u) || r.set(u, {}), r.get(u).r = !0;
2692
+ else
2693
+ e.issues.push(a);
2694
+ const s = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
2695
+ if (s.length && o && e.issues.push({ ...o, keys: s }), W(e))
2638
2696
  return e;
2639
- const r = pe(t.value, n.value);
2640
- if (!r.valid)
2641
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
2642
- return e.value = r.data, e;
2697
+ const i = he(t.value, n.value);
2698
+ if (!i.valid)
2699
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
2700
+ return e.value = i.data, e;
2643
2701
  }
2644
- const Mr = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
2645
- T.init(e, t), e._zod.parse = (n, r) => {
2702
+ const Jr = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
2703
+ k.init(e, t), e._zod.parse = (n, r) => {
2646
2704
  if (r.direction === "backward")
2647
- throw new nt(e.constructor.name);
2705
+ throw new at(e.constructor.name);
2648
2706
  const o = t.transform(n.value, n);
2649
2707
  if (r.async)
2650
2708
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
2651
2709
  if (o instanceof Promise)
2652
- throw new N();
2710
+ throw new j();
2653
2711
  return n.value = o, n;
2654
2712
  };
2655
2713
  });
2656
- function De(e, t) {
2714
+ function Re(e, t) {
2657
2715
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2658
2716
  }
2659
- const bt = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
2660
- T.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
2717
+ const Se = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
2718
+ k.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
2661
2719
  const n = t.innerType._zod.pattern;
2662
- return n ? new RegExp(`^(${ye(n.source)})?$`) : void 0;
2720
+ return n ? new RegExp(`^(${ve(n.source)})?$`) : void 0;
2663
2721
  }), e._zod.parse = (n, r) => {
2664
2722
  if (t.innerType._zod.optin === "optional") {
2665
2723
  const o = t.innerType._zod.run(n, r);
2666
- return o instanceof Promise ? o.then((a) => De(a, n.value)) : De(o, n.value);
2724
+ return o instanceof Promise ? o.then((s) => Re(s, n.value)) : Re(o, n.value);
2667
2725
  }
2668
2726
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
2669
2727
  };
2670
- }), Nr = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
2671
- T.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
2728
+ }), Br = /* @__PURE__ */ c("$ZodExactOptional", (e, t) => {
2729
+ Se.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
2730
+ }), Gr = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
2731
+ k.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
2672
2732
  const n = t.innerType._zod.pattern;
2673
- return n ? new RegExp(`^(${ye(n.source)}|null)$`) : void 0;
2733
+ return n ? new RegExp(`^(${ve(n.source)}|null)$`) : void 0;
2674
2734
  }), _(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);
2675
- }), Rr = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
2676
- T.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2735
+ }), Yr = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
2736
+ k.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2677
2737
  if (r.direction === "backward")
2678
2738
  return t.innerType._zod.run(n, r);
2679
2739
  if (n.value === void 0)
2680
2740
  return n.value = t.defaultValue, n;
2681
2741
  const o = t.innerType._zod.run(n, r);
2682
- return o instanceof Promise ? o.then((a) => Le(a, t)) : Le(o, t);
2742
+ return o instanceof Promise ? o.then((s) => We(s, t)) : We(o, t);
2683
2743
  };
2684
2744
  });
2685
- function Le(e, t) {
2745
+ function We(e, t) {
2686
2746
  return e.value === void 0 && (e.value = t.defaultValue), e;
2687
2747
  }
2688
- const xr = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
2689
- T.init(e, t), e._zod.optin = "optional", _(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));
2690
- }), Wr = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
2691
- T.init(e, t), _(e._zod, "values", () => {
2748
+ const Kr = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
2749
+ k.init(e, t), e._zod.optin = "optional", _(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));
2750
+ }), qr = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
2751
+ k.init(e, t), _(e._zod, "values", () => {
2692
2752
  const n = t.innerType._zod.values;
2693
2753
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
2694
2754
  }), e._zod.parse = (n, r) => {
2695
2755
  const o = t.innerType._zod.run(n, r);
2696
- return o instanceof Promise ? o.then((a) => Me(a, e)) : Me(o, e);
2756
+ return o instanceof Promise ? o.then((s) => je(s, e)) : je(o, e);
2697
2757
  };
2698
2758
  });
2699
- function Me(e, t) {
2759
+ function je(e, t) {
2700
2760
  return !e.issues.length && e.value === void 0 && e.issues.push({
2701
2761
  code: "invalid_type",
2702
2762
  expected: "nonoptional",
@@ -2704,58 +2764,58 @@ function Me(e, t) {
2704
2764
  inst: t
2705
2765
  }), e;
2706
2766
  }
2707
- const Fr = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
2708
- T.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2767
+ const Xr = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
2768
+ k.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2709
2769
  if (r.direction === "backward")
2710
2770
  return t.innerType._zod.run(n, r);
2711
2771
  const o = t.innerType._zod.run(n, r);
2712
- return o instanceof Promise ? o.then((a) => (n.value = a.value, a.issues.length && (n.value = t.catchValue({
2772
+ return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
2713
2773
  ...n,
2714
2774
  error: {
2715
- issues: a.issues.map((i) => D(i, r, Z()))
2775
+ issues: s.issues.map((i) => M(i, r, L()))
2716
2776
  },
2717
2777
  input: n.value
2718
2778
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
2719
2779
  ...n,
2720
2780
  error: {
2721
- issues: o.issues.map((a) => D(a, r, Z()))
2781
+ issues: o.issues.map((s) => M(s, r, L()))
2722
2782
  },
2723
2783
  input: n.value
2724
2784
  }), n.issues = []), n);
2725
2785
  };
2726
- }), Ur = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
2727
- T.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2786
+ }), Hr = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
2787
+ k.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2728
2788
  if (r.direction === "backward") {
2729
- const a = t.out._zod.run(n, r);
2730
- return a instanceof Promise ? a.then((i) => Y(i, t.in, r)) : Y(a, t.in, r);
2789
+ const s = t.out._zod.run(n, r);
2790
+ return s instanceof Promise ? s.then((i) => q(i, t.in, r)) : q(s, t.in, r);
2731
2791
  }
2732
2792
  const o = t.in._zod.run(n, r);
2733
- return o instanceof Promise ? o.then((a) => Y(a, t.out, r)) : Y(o, t.out, r);
2793
+ return o instanceof Promise ? o.then((s) => q(s, t.out, r)) : q(o, t.out, r);
2734
2794
  };
2735
2795
  });
2736
- function Y(e, t, n) {
2796
+ function q(e, t, n) {
2737
2797
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
2738
2798
  }
2739
- const jr = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
2740
- T.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2799
+ const Qr = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
2800
+ k.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2741
2801
  if (r.direction === "backward")
2742
2802
  return t.innerType._zod.run(n, r);
2743
2803
  const o = t.innerType._zod.run(n, r);
2744
- return o instanceof Promise ? o.then(Ne) : Ne(o);
2804
+ return o instanceof Promise ? o.then(Fe) : Fe(o);
2745
2805
  };
2746
2806
  });
2747
- function Ne(e) {
2807
+ function Fe(e) {
2748
2808
  return e.value = Object.freeze(e.value), e;
2749
2809
  }
2750
- const ft = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
2751
- E.init(e, t), T.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2810
+ const vt = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
2811
+ $.init(e, t), k.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2752
2812
  const r = n.value, o = t.fn(r);
2753
2813
  if (o instanceof Promise)
2754
- return o.then((a) => Re(a, n, r, e));
2755
- Re(o, n, r, e);
2814
+ return o.then((s) => Ue(s, n, r, e));
2815
+ Ue(o, n, r, e);
2756
2816
  };
2757
2817
  });
2758
- function Re(e, t, n, r) {
2818
+ function Ue(e, t, n, r) {
2759
2819
  if (!e) {
2760
2820
  const o = {
2761
2821
  code: "custom",
@@ -2767,22 +2827,17 @@ function Re(e, t, n, r) {
2767
2827
  continue: !r._zod.def.abort
2768
2828
  // params: inst._zod.def.params,
2769
2829
  };
2770
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(U(o));
2830
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(B(o));
2771
2831
  }
2772
2832
  }
2773
2833
  var xe;
2774
- class Vr {
2834
+ class eo {
2775
2835
  constructor() {
2776
2836
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2777
2837
  }
2778
2838
  add(t, ...n) {
2779
2839
  const r = n[0];
2780
- if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
2781
- if (this._idmap.has(r.id))
2782
- throw new Error(`ID ${r.id} already exists in the registry`);
2783
- this._idmap.set(r.id, t);
2784
- }
2785
- return this;
2840
+ return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
2786
2841
  }
2787
2842
  clear() {
2788
2843
  return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
@@ -2805,63 +2860,70 @@ class Vr {
2805
2860
  return this._map.has(t);
2806
2861
  }
2807
2862
  }
2808
- function Br() {
2809
- return new Vr();
2863
+ function to() {
2864
+ return new eo();
2810
2865
  }
2811
- (xe = globalThis).__zod_globalRegistry ?? (xe.__zod_globalRegistry = Br());
2812
- const K = globalThis.__zod_globalRegistry;
2813
- function Gr(e, t) {
2866
+ (xe = globalThis).__zod_globalRegistry ?? (xe.__zod_globalRegistry = to());
2867
+ const J = globalThis.__zod_globalRegistry;
2868
+ // @__NO_SIDE_EFFECTS__
2869
+ function no(e, t) {
2814
2870
  return new e({
2815
2871
  type: "string",
2816
- ...h(t)
2872
+ ...f(t)
2817
2873
  });
2818
2874
  }
2819
- function Yr(e, t) {
2875
+ // @__NO_SIDE_EFFECTS__
2876
+ function ro(e, t) {
2820
2877
  return new e({
2821
2878
  type: "string",
2822
2879
  format: "email",
2823
2880
  check: "string_format",
2824
2881
  abort: !1,
2825
- ...h(t)
2882
+ ...f(t)
2826
2883
  });
2827
2884
  }
2828
- function Kr(e, t) {
2885
+ // @__NO_SIDE_EFFECTS__
2886
+ function oo(e, t) {
2829
2887
  return new e({
2830
2888
  type: "string",
2831
2889
  format: "uuid",
2832
2890
  check: "string_format",
2833
2891
  abort: !1,
2834
- ...h(t)
2892
+ ...f(t)
2835
2893
  });
2836
2894
  }
2837
- function qr(e, t) {
2895
+ // @__NO_SIDE_EFFECTS__
2896
+ function so(e, t) {
2838
2897
  return new e({
2839
2898
  type: "string",
2840
2899
  format: "url",
2841
2900
  check: "string_format",
2842
2901
  abort: !1,
2843
- ...h(t)
2902
+ ...f(t)
2844
2903
  });
2845
2904
  }
2846
- function Xr(e, t) {
2905
+ // @__NO_SIDE_EFFECTS__
2906
+ function io(e, t) {
2847
2907
  return new e({
2848
2908
  type: "string",
2849
2909
  format: "ipv4",
2850
2910
  check: "string_format",
2851
2911
  abort: !1,
2852
- ...h(t)
2912
+ ...f(t)
2853
2913
  });
2854
2914
  }
2855
- function Hr(e, t) {
2915
+ // @__NO_SIDE_EFFECTS__
2916
+ function ao(e, t) {
2856
2917
  return new e({
2857
2918
  type: "string",
2858
2919
  format: "ipv6",
2859
2920
  check: "string_format",
2860
2921
  abort: !1,
2861
- ...h(t)
2922
+ ...f(t)
2862
2923
  });
2863
2924
  }
2864
- function Jr(e, t) {
2925
+ // @__NO_SIDE_EFFECTS__
2926
+ function uo(e, t) {
2865
2927
  return new e({
2866
2928
  type: "string",
2867
2929
  format: "datetime",
@@ -2869,255 +2931,609 @@ function Jr(e, t) {
2869
2931
  offset: !1,
2870
2932
  local: !1,
2871
2933
  precision: null,
2872
- ...h(t)
2934
+ ...f(t)
2873
2935
  });
2874
2936
  }
2875
- function Qr(e, t) {
2937
+ // @__NO_SIDE_EFFECTS__
2938
+ function lo(e, t) {
2876
2939
  return new e({
2877
2940
  type: "string",
2878
2941
  format: "date",
2879
2942
  check: "string_format",
2880
- ...h(t)
2943
+ ...f(t)
2881
2944
  });
2882
2945
  }
2883
- function eo(e, t) {
2946
+ // @__NO_SIDE_EFFECTS__
2947
+ function co(e, t) {
2884
2948
  return new e({
2885
2949
  type: "string",
2886
2950
  format: "time",
2887
2951
  check: "string_format",
2888
2952
  precision: null,
2889
- ...h(t)
2953
+ ...f(t)
2890
2954
  });
2891
2955
  }
2892
- function to(e, t) {
2956
+ // @__NO_SIDE_EFFECTS__
2957
+ function po(e, t) {
2893
2958
  return new e({
2894
2959
  type: "string",
2895
2960
  format: "duration",
2896
2961
  check: "string_format",
2897
- ...h(t)
2962
+ ...f(t)
2898
2963
  });
2899
2964
  }
2900
- function no(e, t) {
2965
+ // @__NO_SIDE_EFFECTS__
2966
+ function mo(e, t) {
2901
2967
  return new e({
2902
2968
  type: "number",
2903
2969
  checks: [],
2904
- ...h(t)
2970
+ ...f(t)
2905
2971
  });
2906
2972
  }
2907
- function ro(e, t) {
2973
+ // @__NO_SIDE_EFFECTS__
2974
+ function ho(e, t) {
2908
2975
  return new e({
2909
2976
  type: "number",
2910
2977
  check: "number_format",
2911
2978
  abort: !1,
2912
2979
  format: "safeint",
2913
- ...h(t)
2980
+ ...f(t)
2914
2981
  });
2915
2982
  }
2916
- function oo(e, t) {
2983
+ // @__NO_SIDE_EFFECTS__
2984
+ function fo(e, t) {
2917
2985
  return new e({
2918
2986
  type: "boolean",
2919
- ...h(t)
2987
+ ...f(t)
2920
2988
  });
2921
2989
  }
2922
- function ao(e) {
2990
+ // @__NO_SIDE_EFFECTS__
2991
+ function yo(e) {
2923
2992
  return new e({
2924
2993
  type: "any"
2925
2994
  });
2926
2995
  }
2927
- function io(e, t) {
2928
- return new sr({
2996
+ // @__NO_SIDE_EFFECTS__
2997
+ function bo(e, t) {
2998
+ return new yr({
2929
2999
  check: "less_than",
2930
- ...h(t),
3000
+ ...f(t),
2931
3001
  value: e,
2932
3002
  inclusive: !0
2933
3003
  });
2934
3004
  }
2935
- function so(e, t) {
2936
- return new ur({
3005
+ // @__NO_SIDE_EFFECTS__
3006
+ function go(e, t) {
3007
+ return new br({
2937
3008
  check: "greater_than",
2938
- ...h(t),
3009
+ ...f(t),
2939
3010
  value: e,
2940
3011
  inclusive: !0
2941
3012
  });
2942
3013
  }
2943
- function re(e, t) {
2944
- return new cr({
3014
+ // @__NO_SIDE_EFFECTS__
3015
+ function ie(e, t) {
3016
+ return new _r({
2945
3017
  check: "max_length",
2946
- ...h(t),
3018
+ ...f(t),
2947
3019
  maximum: e
2948
3020
  });
2949
3021
  }
2950
- function R(e, t) {
2951
- return new pr({
3022
+ // @__NO_SIDE_EFFECTS__
3023
+ function F(e, t) {
3024
+ return new vr({
2952
3025
  check: "min_length",
2953
- ...h(t),
3026
+ ...f(t),
2954
3027
  minimum: e
2955
3028
  });
2956
3029
  }
2957
- function yt(e, t) {
2958
- return new dr({
3030
+ // @__NO_SIDE_EFFECTS__
3031
+ function Tt(e, t) {
3032
+ return new Tr({
2959
3033
  check: "length_equals",
2960
- ...h(t),
3034
+ ...f(t),
2961
3035
  length: e
2962
3036
  });
2963
3037
  }
2964
- function gt(e, t) {
2965
- return new mr({
3038
+ // @__NO_SIDE_EFFECTS__
3039
+ function kt(e, t) {
3040
+ return new kr({
2966
3041
  check: "string_format",
2967
3042
  format: "regex",
2968
- ...h(t),
3043
+ ...f(t),
2969
3044
  pattern: e
2970
3045
  });
2971
3046
  }
2972
- function uo(e) {
2973
- return new hr({
3047
+ // @__NO_SIDE_EFFECTS__
3048
+ function _o(e) {
3049
+ return new wr({
2974
3050
  check: "string_format",
2975
3051
  format: "lowercase",
2976
- ...h(e)
3052
+ ...f(e)
2977
3053
  });
2978
3054
  }
2979
- function lo(e) {
2980
- return new br({
3055
+ // @__NO_SIDE_EFFECTS__
3056
+ function vo(e) {
3057
+ return new Sr({
2981
3058
  check: "string_format",
2982
3059
  format: "uppercase",
2983
- ...h(e)
3060
+ ...f(e)
2984
3061
  });
2985
3062
  }
2986
- function co(e, t) {
2987
- return new fr({
3063
+ // @__NO_SIDE_EFFECTS__
3064
+ function To(e, t) {
3065
+ return new Ar({
2988
3066
  check: "string_format",
2989
3067
  format: "includes",
2990
- ...h(t),
3068
+ ...f(t),
2991
3069
  includes: e
2992
3070
  });
2993
3071
  }
2994
- function po(e, t) {
2995
- return new yr({
3072
+ // @__NO_SIDE_EFFECTS__
3073
+ function ko(e, t) {
3074
+ return new Er({
2996
3075
  check: "string_format",
2997
3076
  format: "starts_with",
2998
- ...h(t),
3077
+ ...f(t),
2999
3078
  prefix: e
3000
3079
  });
3001
3080
  }
3002
- function mo(e, t) {
3003
- return new gr({
3081
+ // @__NO_SIDE_EFFECTS__
3082
+ function wo(e, t) {
3083
+ return new zr({
3004
3084
  check: "string_format",
3005
3085
  format: "ends_with",
3006
- ...h(t),
3086
+ ...f(t),
3007
3087
  suffix: e
3008
3088
  });
3009
3089
  }
3010
- function W(e) {
3011
- return new _r({
3090
+ // @__NO_SIDE_EFFECTS__
3091
+ function x(e) {
3092
+ return new Or({
3012
3093
  check: "overwrite",
3013
3094
  tx: e
3014
3095
  });
3015
3096
  }
3016
- function ho(e) {
3017
- return W((t) => t.normalize(e));
3097
+ // @__NO_SIDE_EFFECTS__
3098
+ function So(e) {
3099
+ return /* @__PURE__ */ x((t) => t.normalize(e));
3018
3100
  }
3019
- function bo() {
3020
- return W((e) => e.trim());
3101
+ // @__NO_SIDE_EFFECTS__
3102
+ function Ao() {
3103
+ return /* @__PURE__ */ x((e) => e.trim());
3021
3104
  }
3022
- function fo() {
3023
- return W((e) => e.toLowerCase());
3105
+ // @__NO_SIDE_EFFECTS__
3106
+ function Eo() {
3107
+ return /* @__PURE__ */ x((e) => e.toLowerCase());
3024
3108
  }
3025
- function yo() {
3026
- return W((e) => e.toUpperCase());
3109
+ // @__NO_SIDE_EFFECTS__
3110
+ function zo() {
3111
+ return /* @__PURE__ */ x((e) => e.toUpperCase());
3027
3112
  }
3028
- function go() {
3029
- return W((e) => On(e));
3113
+ // @__NO_SIDE_EFFECTS__
3114
+ function Oo() {
3115
+ return /* @__PURE__ */ x((e) => Fn(e));
3030
3116
  }
3031
- function _o(e, t, n) {
3117
+ // @__NO_SIDE_EFFECTS__
3118
+ function $o(e, t, n) {
3032
3119
  return new e({
3033
3120
  type: "array",
3034
3121
  element: t,
3035
3122
  // get element() {
3036
3123
  // return element;
3037
3124
  // },
3038
- ...h(n)
3125
+ ...f(n)
3039
3126
  });
3040
3127
  }
3041
- function _t(e, t, n) {
3128
+ // @__NO_SIDE_EFFECTS__
3129
+ function wt(e, t, n) {
3042
3130
  return new e({
3043
3131
  type: "custom",
3044
3132
  check: "custom",
3045
3133
  fn: t,
3046
- ...h(n)
3134
+ ...f(n)
3047
3135
  });
3048
3136
  }
3049
- function vt(e) {
3050
- const t = vo((n) => (n.addIssue = (r) => {
3137
+ // @__NO_SIDE_EFFECTS__
3138
+ function St(e) {
3139
+ const t = /* @__PURE__ */ Po((n) => (n.addIssue = (r) => {
3051
3140
  if (typeof r == "string")
3052
- n.issues.push(U(r, n.value, t._zod.def));
3141
+ n.issues.push(B(r, n.value, t._zod.def));
3053
3142
  else {
3054
3143
  const o = r;
3055
- 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(U(o));
3144
+ 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(B(o));
3056
3145
  }
3057
3146
  }, e(n.value, n)));
3058
3147
  return t;
3059
3148
  }
3060
- function vo(e, t) {
3061
- const n = new E({
3149
+ // @__NO_SIDE_EFFECTS__
3150
+ function Po(e, t) {
3151
+ const n = new $({
3062
3152
  check: "custom",
3063
- ...h(t)
3153
+ ...f(t)
3064
3154
  });
3065
3155
  return n._zod.check = e, n;
3066
3156
  }
3067
- function To(e, t, n, r = {}) {
3068
- const o = h(r), a = {
3069
- ...h(r),
3157
+ // @__NO_SIDE_EFFECTS__
3158
+ function Io(e, t, n, r = {}) {
3159
+ const o = f(r), s = {
3160
+ ...f(r),
3070
3161
  check: "string_format",
3071
3162
  type: "string",
3072
3163
  format: t,
3073
- fn: typeof n == "function" ? n : (s) => n.test(s),
3164
+ fn: typeof n == "function" ? n : (a) => n.test(a),
3074
3165
  ...o
3075
3166
  };
3076
- return n instanceof RegExp && (a.pattern = n), new e(a);
3167
+ return n instanceof RegExp && (s.pattern = n), new e(s);
3168
+ }
3169
+ function At(e) {
3170
+ let t = e?.target ?? "draft-2020-12";
3171
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
3172
+ processors: e.processors ?? {},
3173
+ metadataRegistry: e?.metadata ?? J,
3174
+ target: t,
3175
+ unrepresentable: e?.unrepresentable ?? "throw",
3176
+ override: e?.override ?? (() => {
3177
+ }),
3178
+ io: e?.io ?? "output",
3179
+ counter: 0,
3180
+ seen: /* @__PURE__ */ new Map(),
3181
+ cycles: e?.cycles ?? "ref",
3182
+ reused: e?.reused ?? "inline",
3183
+ external: e?.external ?? void 0
3184
+ };
3185
+ }
3186
+ function z(e, t, n = { path: [], schemaPath: [] }) {
3187
+ var r;
3188
+ const o = e._zod.def, s = t.seen.get(e);
3189
+ if (s)
3190
+ return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
3191
+ const i = { schema: {}, count: 1, cycle: void 0, path: n.path };
3192
+ t.seen.set(e, i);
3193
+ const a = e._zod.toJSONSchema?.();
3194
+ if (a)
3195
+ i.schema = a;
3196
+ else {
3197
+ const p = {
3198
+ ...n,
3199
+ schemaPath: [...n.schemaPath, e],
3200
+ path: n.path
3201
+ };
3202
+ if (e._zod.processJSONSchema)
3203
+ e._zod.processJSONSchema(t, i.schema, p);
3204
+ else {
3205
+ const m = i.schema, y = t.processors[o.type];
3206
+ if (!y)
3207
+ throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
3208
+ y(e, t, m, p);
3209
+ }
3210
+ const d = e._zod.parent;
3211
+ d && (i.ref || (i.ref = d), z(d, t, p), t.seen.get(d).isParent = !0);
3212
+ }
3213
+ const u = t.metadataRegistry.get(e);
3214
+ return u && Object.assign(i.schema, u), t.io === "input" && E(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;
3215
+ }
3216
+ function Et(e, t) {
3217
+ const n = e.seen.get(t);
3218
+ if (!n)
3219
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
3220
+ const r = /* @__PURE__ */ new Map();
3221
+ for (const i of e.seen.entries()) {
3222
+ const a = e.metadataRegistry.get(i[0])?.id;
3223
+ if (a) {
3224
+ const u = r.get(a);
3225
+ if (u && u !== i[0])
3226
+ throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
3227
+ r.set(a, i[0]);
3228
+ }
3229
+ }
3230
+ const o = (i) => {
3231
+ const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
3232
+ if (e.external) {
3233
+ const d = e.external.registry.get(i[0])?.id, m = e.external.uri ?? ((P) => P);
3234
+ if (d)
3235
+ return { ref: m(d) };
3236
+ const y = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
3237
+ return i[1].defId = y, { defId: y, ref: `${m("__shared")}#/${a}/${y}` };
3238
+ }
3239
+ if (i[1] === n)
3240
+ return { ref: "#" };
3241
+ const l = `#/${a}/`, p = i[1].schema.id ?? `__schema${e.counter++}`;
3242
+ return { defId: p, ref: l + p };
3243
+ }, s = (i) => {
3244
+ if (i[1].schema.$ref)
3245
+ return;
3246
+ const a = i[1], { ref: u, defId: l } = o(i);
3247
+ a.def = { ...a.schema }, l && (a.defId = l);
3248
+ const p = a.schema;
3249
+ for (const d in p)
3250
+ delete p[d];
3251
+ p.$ref = u;
3252
+ };
3253
+ if (e.cycles === "throw")
3254
+ for (const i of e.seen.entries()) {
3255
+ const a = i[1];
3256
+ if (a.cycle)
3257
+ throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
3258
+
3259
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
3260
+ }
3261
+ for (const i of e.seen.entries()) {
3262
+ const a = i[1];
3263
+ if (t === i[0]) {
3264
+ s(i);
3265
+ continue;
3266
+ }
3267
+ if (e.external) {
3268
+ const l = e.external.registry.get(i[0])?.id;
3269
+ if (t !== i[0] && l) {
3270
+ s(i);
3271
+ continue;
3272
+ }
3273
+ }
3274
+ if (e.metadataRegistry.get(i[0])?.id) {
3275
+ s(i);
3276
+ continue;
3277
+ }
3278
+ if (a.cycle) {
3279
+ s(i);
3280
+ continue;
3281
+ }
3282
+ if (a.count > 1 && e.reused === "ref") {
3283
+ s(i);
3284
+ continue;
3285
+ }
3286
+ }
3077
3287
  }
3078
- const ko = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
3079
- wr.init(e, t), oe.init(e, t);
3288
+ function zt(e, t) {
3289
+ const n = e.seen.get(t);
3290
+ if (!n)
3291
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
3292
+ const r = (i) => {
3293
+ const a = e.seen.get(i);
3294
+ if (a.ref === null)
3295
+ return;
3296
+ const u = a.def ?? a.schema, l = { ...u }, p = a.ref;
3297
+ if (a.ref = null, p) {
3298
+ r(p);
3299
+ const m = e.seen.get(p), y = m.schema;
3300
+ if (y.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (u.allOf = u.allOf ?? [], u.allOf.push(y)) : Object.assign(u, y), Object.assign(u, l), i._zod.parent === p)
3301
+ for (const S in u)
3302
+ S === "$ref" || S === "allOf" || S in l || delete u[S];
3303
+ if (y.$ref && m.def)
3304
+ for (const S in u)
3305
+ S === "$ref" || S === "allOf" || S in m.def && JSON.stringify(u[S]) === JSON.stringify(m.def[S]) && delete u[S];
3306
+ }
3307
+ const d = i._zod.parent;
3308
+ if (d && d !== p) {
3309
+ r(d);
3310
+ const m = e.seen.get(d);
3311
+ if (m?.schema.$ref && (u.$ref = m.schema.$ref, m.def))
3312
+ for (const y in u)
3313
+ y === "$ref" || y === "allOf" || y in m.def && JSON.stringify(u[y]) === JSON.stringify(m.def[y]) && delete u[y];
3314
+ }
3315
+ e.override({
3316
+ zodSchema: i,
3317
+ jsonSchema: u,
3318
+ path: a.path ?? []
3319
+ });
3320
+ };
3321
+ for (const i of [...e.seen.entries()].reverse())
3322
+ r(i[0]);
3323
+ const o = {};
3324
+ 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) {
3325
+ const i = e.external.registry.get(t)?.id;
3326
+ if (!i)
3327
+ throw new Error("Schema is missing an `id` property");
3328
+ o.$id = e.external.uri(i);
3329
+ }
3330
+ Object.assign(o, n.def ?? n.schema);
3331
+ const s = e.external?.defs ?? {};
3332
+ for (const i of e.seen.entries()) {
3333
+ const a = i[1];
3334
+ a.def && a.defId && (s[a.defId] = a.def);
3335
+ }
3336
+ e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
3337
+ try {
3338
+ const i = JSON.parse(JSON.stringify(o));
3339
+ return Object.defineProperty(i, "~standard", {
3340
+ value: {
3341
+ ...t["~standard"],
3342
+ jsonSchema: {
3343
+ input: H(t, "input", e.processors),
3344
+ output: H(t, "output", e.processors)
3345
+ }
3346
+ },
3347
+ enumerable: !1,
3348
+ writable: !1
3349
+ }), i;
3350
+ } catch {
3351
+ throw new Error("Error converting schema to JSON.");
3352
+ }
3353
+ }
3354
+ function E(e, t) {
3355
+ const n = t ?? { seen: /* @__PURE__ */ new Set() };
3356
+ if (n.seen.has(e))
3357
+ return !1;
3358
+ n.seen.add(e);
3359
+ const r = e._zod.def;
3360
+ if (r.type === "transform")
3361
+ return !0;
3362
+ if (r.type === "array")
3363
+ return E(r.element, n);
3364
+ if (r.type === "set")
3365
+ return E(r.valueType, n);
3366
+ if (r.type === "lazy")
3367
+ return E(r.getter(), n);
3368
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
3369
+ return E(r.innerType, n);
3370
+ if (r.type === "intersection")
3371
+ return E(r.left, n) || E(r.right, n);
3372
+ if (r.type === "record" || r.type === "map")
3373
+ return E(r.keyType, n) || E(r.valueType, n);
3374
+ if (r.type === "pipe")
3375
+ return E(r.in, n) || E(r.out, n);
3376
+ if (r.type === "object") {
3377
+ for (const o in r.shape)
3378
+ if (E(r.shape[o], n))
3379
+ return !0;
3380
+ return !1;
3381
+ }
3382
+ if (r.type === "union") {
3383
+ for (const o of r.options)
3384
+ if (E(o, n))
3385
+ return !0;
3386
+ return !1;
3387
+ }
3388
+ if (r.type === "tuple") {
3389
+ for (const o of r.items)
3390
+ if (E(o, n))
3391
+ return !0;
3392
+ return !!(r.rest && E(r.rest, n));
3393
+ }
3394
+ return !1;
3395
+ }
3396
+ const Co = (e, t = {}) => (n) => {
3397
+ const r = At({ ...n, processors: t });
3398
+ return z(e, r), Et(r, e), zt(r, e);
3399
+ }, H = (e, t, n = {}) => (r) => {
3400
+ const { libraryOptions: o, target: s } = r ?? {}, i = At({ ...o ?? {}, target: s, io: t, processors: n });
3401
+ return z(e, i), Et(i, e), zt(i, e);
3402
+ }, No = {
3403
+ guid: "uuid",
3404
+ url: "uri",
3405
+ datetime: "date-time",
3406
+ json_string: "json-string",
3407
+ regex: ""
3408
+ // do not set
3409
+ }, Zo = (e, t, n, r) => {
3410
+ const o = n;
3411
+ o.type = "string";
3412
+ const { minimum: s, maximum: i, format: a, patterns: u, contentEncoding: l } = e._zod.bag;
3413
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = No[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), l && (o.contentEncoding = l), u && u.size > 0) {
3414
+ const p = [...u];
3415
+ p.length === 1 ? o.pattern = p[0].source : p.length > 1 && (o.allOf = [
3416
+ ...p.map((d) => ({
3417
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3418
+ pattern: d.source
3419
+ }))
3420
+ ]);
3421
+ }
3422
+ }, Do = (e, t, n, r) => {
3423
+ if (t.unrepresentable === "throw")
3424
+ throw new Error("Custom types cannot be represented in JSON Schema");
3425
+ }, Lo = (e, t, n, r) => {
3426
+ if (t.unrepresentable === "throw")
3427
+ throw new Error("Transforms cannot be represented in JSON Schema");
3428
+ }, Mo = (e, t, n, r) => {
3429
+ const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
3430
+ typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = z(s.element, t, { ...r, path: [...r.path, "items"] });
3431
+ }, Ro = (e, t, n, r) => {
3432
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, u) => z(a, t, {
3433
+ ...r,
3434
+ path: [...r.path, s ? "oneOf" : "anyOf", u]
3435
+ }));
3436
+ s ? n.oneOf = i : n.anyOf = i;
3437
+ }, Wo = (e, t, n, r) => {
3438
+ const o = e._zod.def, s = z(o.left, t, {
3439
+ ...r,
3440
+ path: [...r.path, "allOf", 0]
3441
+ }), i = z(o.right, t, {
3442
+ ...r,
3443
+ path: [...r.path, "allOf", 1]
3444
+ }), a = (l) => "allOf" in l && Object.keys(l).length === 1, u = [
3445
+ ...a(s) ? s.allOf : [s],
3446
+ ...a(i) ? i.allOf : [i]
3447
+ ];
3448
+ n.allOf = u;
3449
+ }, jo = (e, t, n, r) => {
3450
+ const o = e._zod.def, s = z(o.innerType, t, r), i = t.seen.get(e);
3451
+ t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
3452
+ }, Fo = (e, t, n, r) => {
3453
+ const o = e._zod.def;
3454
+ z(o.innerType, t, r);
3455
+ const s = t.seen.get(e);
3456
+ s.ref = o.innerType;
3457
+ }, Uo = (e, t, n, r) => {
3458
+ const o = e._zod.def;
3459
+ z(o.innerType, t, r);
3460
+ const s = t.seen.get(e);
3461
+ s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
3462
+ }, xo = (e, t, n, r) => {
3463
+ const o = e._zod.def;
3464
+ z(o.innerType, t, r);
3465
+ const s = t.seen.get(e);
3466
+ s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
3467
+ }, Vo = (e, t, n, r) => {
3468
+ const o = e._zod.def;
3469
+ z(o.innerType, t, r);
3470
+ const s = t.seen.get(e);
3471
+ s.ref = o.innerType;
3472
+ let i;
3473
+ try {
3474
+ i = o.catchValue(void 0);
3475
+ } catch {
3476
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
3477
+ }
3478
+ n.default = i;
3479
+ }, Jo = (e, t, n, r) => {
3480
+ const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
3481
+ z(s, t, r);
3482
+ const i = t.seen.get(e);
3483
+ i.ref = s;
3484
+ }, Bo = (e, t, n, r) => {
3485
+ const o = e._zod.def;
3486
+ z(o.innerType, t, r);
3487
+ const s = t.seen.get(e);
3488
+ s.ref = o.innerType, n.readOnly = !0;
3489
+ }, Ot = (e, t, n, r) => {
3490
+ const o = e._zod.def;
3491
+ z(o.innerType, t, r);
3492
+ const s = t.seen.get(e);
3493
+ s.ref = o.innerType;
3494
+ }, Go = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
3495
+ Nr.init(e, t), ae.init(e, t);
3080
3496
  });
3081
- function Ao(e) {
3082
- return Jr(ko, e);
3497
+ function Yo(e) {
3498
+ return /* @__PURE__ */ uo(Go, e);
3083
3499
  }
3084
- const wo = /* @__PURE__ */ c("ZodISODate", (e, t) => {
3085
- Er.init(e, t), oe.init(e, t);
3500
+ const Ko = /* @__PURE__ */ c("ZodISODate", (e, t) => {
3501
+ Zr.init(e, t), ae.init(e, t);
3086
3502
  });
3087
- function Eo(e) {
3088
- return Qr(wo, e);
3503
+ function qo(e) {
3504
+ return /* @__PURE__ */ lo(Ko, e);
3089
3505
  }
3090
- const So = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
3091
- Sr.init(e, t), oe.init(e, t);
3506
+ const Xo = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
3507
+ Dr.init(e, t), ae.init(e, t);
3092
3508
  });
3093
- function zo(e) {
3094
- return eo(So, e);
3509
+ function Ho(e) {
3510
+ return /* @__PURE__ */ co(Xo, e);
3095
3511
  }
3096
- const Po = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
3097
- zr.init(e, t), oe.init(e, t);
3512
+ const Qo = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
3513
+ Lr.init(e, t), ae.init(e, t);
3098
3514
  });
3099
- function Io(e) {
3100
- return to(Po, e);
3515
+ function es(e) {
3516
+ return /* @__PURE__ */ po(Qo, e);
3101
3517
  }
3102
- const $o = (e, t) => {
3103
- st.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
3518
+ const ts = (e, t) => {
3519
+ dt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
3104
3520
  format: {
3105
- value: (n) => Mn(e, n)
3521
+ value: (n) => Jn(e, n)
3106
3522
  // enumerable: false,
3107
3523
  },
3108
3524
  flatten: {
3109
- value: (n) => Ln(e, n)
3525
+ value: (n) => Vn(e, n)
3110
3526
  // enumerable: false,
3111
3527
  },
3112
3528
  addIssue: {
3113
3529
  value: (n) => {
3114
- e.issues.push(n), e.message = JSON.stringify(e.issues, le, 2);
3530
+ e.issues.push(n), e.message = JSON.stringify(e.issues, de, 2);
3115
3531
  }
3116
3532
  // enumerable: false,
3117
3533
  },
3118
3534
  addIssues: {
3119
3535
  value: (n) => {
3120
- e.issues.push(...n), e.message = JSON.stringify(e.issues, le, 2);
3536
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, de, 2);
3121
3537
  }
3122
3538
  // enumerable: false,
3123
3539
  },
@@ -3128,464 +3544,507 @@ const $o = (e, t) => {
3128
3544
  // enumerable: false,
3129
3545
  }
3130
3546
  });
3131
- }, I = c("ZodError", $o, {
3547
+ }, N = c("ZodError", ts, {
3132
3548
  Parent: Error
3133
- }), Co = /* @__PURE__ */ J(I), Oo = /* @__PURE__ */ Q(I), Zo = /* @__PURE__ */ ee(I), Do = /* @__PURE__ */ te(I), Lo = /* @__PURE__ */ xn(I), Mo = /* @__PURE__ */ Wn(I), No = /* @__PURE__ */ Fn(I), Ro = /* @__PURE__ */ Un(I), xo = /* @__PURE__ */ jn(I), Wo = /* @__PURE__ */ Vn(I), Fo = /* @__PURE__ */ Bn(I), Uo = /* @__PURE__ */ Gn(I), w = /* @__PURE__ */ c("ZodType", (e, t) => (T.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Cn(t, {
3549
+ }), ns = /* @__PURE__ */ te(N), rs = /* @__PURE__ */ ne(N), os = /* @__PURE__ */ re(N), ss = /* @__PURE__ */ oe(N), is = /* @__PURE__ */ Yn(N), as = /* @__PURE__ */ Kn(N), us = /* @__PURE__ */ qn(N), ls = /* @__PURE__ */ Xn(N), cs = /* @__PURE__ */ Hn(N), ps = /* @__PURE__ */ Qn(N), ds = /* @__PURE__ */ er(N), ms = /* @__PURE__ */ tr(N), O = /* @__PURE__ */ c("ZodType", (e, t) => (k.init(e, t), Object.assign(e["~standard"], {
3550
+ jsonSchema: {
3551
+ input: H(e, "input"),
3552
+ output: H(e, "output")
3553
+ }
3554
+ }), e.toJSONSchema = Co(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(jn(t, {
3134
3555
  checks: [
3135
3556
  ...t.checks ?? [],
3136
3557
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3137
3558
  ]
3138
- })), e.clone = (n, r) => at(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Co(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Zo(e, n, r), e.parseAsync = async (n, r) => Oo(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Do(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Lo(e, n, r), e.decode = (n, r) => Mo(e, n, r), e.encodeAsync = async (n, r) => No(e, n, r), e.decodeAsync = async (n, r) => Ro(e, n, r), e.safeEncode = (n, r) => xo(e, n, r), e.safeDecode = (n, r) => Wo(e, n, r), e.safeEncodeAsync = async (n, r) => Fo(e, n, r), e.safeDecodeAsync = async (n, r) => Uo(e, n, r), e.refine = (n, r) => e.check(da(n, r)), e.superRefine = (n) => e.check(ma(n)), e.overwrite = (n) => e.check(W(n)), e.optional = () => We(e), e.nullable = () => Fe(e), e.nullish = () => We(Fe(e)), e.nonoptional = (n) => aa(e, n), e.array = () => Bo(e), e.or = (n) => Yo([e, n]), e.and = (n) => qo(e, n), e.transform = (n) => Ue(e, Ho(n)), e.default = (n) => ta(e, n), e.prefault = (n) => ra(e, n), e.catch = (n) => sa(e, n), e.pipe = (n) => Ue(e, n), e.readonly = () => ca(e), e.describe = (n) => {
3559
+ }), {
3560
+ parent: !0
3561
+ }), e.with = e.check, e.clone = (n, r) => ct(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ns(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => os(e, n, r), e.parseAsync = async (n, r) => rs(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ss(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => is(e, n, r), e.decode = (n, r) => as(e, n, r), e.encodeAsync = async (n, r) => us(e, n, r), e.decodeAsync = async (n, r) => ls(e, n, r), e.safeEncode = (n, r) => cs(e, n, r), e.safeDecode = (n, r) => ps(e, n, r), e.safeEncodeAsync = async (n, r) => ds(e, n, r), e.safeDecodeAsync = async (n, r) => ms(e, n, r), e.refine = (n, r) => e.check(Ws(n, r)), e.superRefine = (n) => e.check(js(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ x(n)), e.optional = () => Ve(e), e.exactOptional = () => As(e), e.nullable = () => Je(e), e.nullish = () => Ve(Je(e)), e.nonoptional = (n) => Cs(e, n), e.array = () => ys(e), e.or = (n) => gs([e, n]), e.and = (n) => vs(e, n), e.transform = (n) => Be(e, ks(n)), e.default = (n) => Os(e, n), e.prefault = (n) => Ps(e, n), e.catch = (n) => Zs(e, n), e.pipe = (n) => Be(e, n), e.readonly = () => Ms(e), e.describe = (n) => {
3139
3562
  const r = e.clone();
3140
- return K.add(r, { description: n }), r;
3563
+ return J.add(r, { description: n }), r;
3141
3564
  }, Object.defineProperty(e, "description", {
3142
3565
  get() {
3143
- return K.get(e)?.description;
3566
+ return J.get(e)?.description;
3144
3567
  },
3145
3568
  configurable: !0
3146
3569
  }), e.meta = (...n) => {
3147
3570
  if (n.length === 0)
3148
- return K.get(e);
3571
+ return J.get(e);
3149
3572
  const r = e.clone();
3150
- return K.add(r, n[0]), r;
3151
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), jo = /* @__PURE__ */ c("_ZodString", (e, t) => {
3152
- ve.init(e, t), w.init(e, t);
3573
+ return J.add(r, n[0]), r;
3574
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), hs = /* @__PURE__ */ c("_ZodString", (e, t) => {
3575
+ we.init(e, t), O.init(e, t), e._zod.processJSONSchema = (r, o, s) => Zo(e, r, o);
3153
3576
  const n = e._zod.bag;
3154
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(gt(...r)), e.includes = (...r) => e.check(co(...r)), e.startsWith = (...r) => e.check(po(...r)), e.endsWith = (...r) => e.check(mo(...r)), e.min = (...r) => e.check(R(...r)), e.max = (...r) => e.check(re(...r)), e.length = (...r) => e.check(yt(...r)), e.nonempty = (...r) => e.check(R(1, ...r)), e.lowercase = (r) => e.check(uo(r)), e.uppercase = (r) => e.check(lo(r)), e.trim = () => e.check(bo()), e.normalize = (...r) => e.check(ho(...r)), e.toLowerCase = () => e.check(fo()), e.toUpperCase = () => e.check(yo()), e.slugify = () => e.check(go());
3155
- }), oe = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
3156
- P.init(e, t), jo.init(e, t);
3157
- }), Vo = /* @__PURE__ */ c("ZodArray", (e, t) => {
3158
- ht.init(e, t), w.init(e, t), e.element = t.element, e.min = (n, r) => e.check(R(n, r)), e.nonempty = (n) => e.check(R(1, n)), e.max = (n, r) => e.check(re(n, r)), e.length = (n, r) => e.check(yt(n, r)), e.unwrap = () => e.element;
3577
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ kt(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ To(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ ko(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ wo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ F(...r)), e.max = (...r) => e.check(/* @__PURE__ */ ie(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Tt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ F(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ _o(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ vo(r)), e.trim = () => e.check(/* @__PURE__ */ Ao()), e.normalize = (...r) => e.check(/* @__PURE__ */ So(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Eo()), e.toUpperCase = () => e.check(/* @__PURE__ */ zo()), e.slugify = () => e.check(/* @__PURE__ */ Oo());
3578
+ }), ae = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
3579
+ C.init(e, t), hs.init(e, t);
3580
+ }), fs = /* @__PURE__ */ c("ZodArray", (e, t) => {
3581
+ _t.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ F(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ F(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ ie(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Tt(n, r)), e.unwrap = () => e.element;
3159
3582
  });
3160
- function Bo(e, t) {
3161
- return _o(Vo, e, t);
3583
+ function ys(e, t) {
3584
+ return /* @__PURE__ */ $o(fs, e, t);
3162
3585
  }
3163
- const Go = /* @__PURE__ */ c("ZodUnion", (e, t) => {
3164
- Dr.init(e, t), w.init(e, t), e.options = t.options;
3586
+ const bs = /* @__PURE__ */ c("ZodUnion", (e, t) => {
3587
+ xr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ro(e, n, r, o), e.options = t.options;
3165
3588
  });
3166
- function Yo(e, t) {
3167
- return new Go({
3589
+ function gs(e, t) {
3590
+ return new bs({
3168
3591
  type: "union",
3169
3592
  options: e,
3170
- ...h(t)
3593
+ ...f(t)
3171
3594
  });
3172
3595
  }
3173
- const Ko = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
3174
- Lr.init(e, t), w.init(e, t);
3596
+ const _s = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
3597
+ Vr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o);
3175
3598
  });
3176
- function qo(e, t) {
3177
- return new Ko({
3599
+ function vs(e, t) {
3600
+ return new _s({
3178
3601
  type: "intersection",
3179
3602
  left: e,
3180
3603
  right: t
3181
3604
  });
3182
3605
  }
3183
- const Xo = /* @__PURE__ */ c("ZodTransform", (e, t) => {
3184
- Mr.init(e, t), w.init(e, t), e._zod.parse = (n, r) => {
3606
+ const Ts = /* @__PURE__ */ c("ZodTransform", (e, t) => {
3607
+ Jr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n), e._zod.parse = (n, r) => {
3185
3608
  if (r.direction === "backward")
3186
- throw new nt(e.constructor.name);
3187
- n.addIssue = (a) => {
3188
- if (typeof a == "string")
3189
- n.issues.push(U(a, n.value, t));
3609
+ throw new at(e.constructor.name);
3610
+ n.addIssue = (s) => {
3611
+ if (typeof s == "string")
3612
+ n.issues.push(B(s, n.value, t));
3190
3613
  else {
3191
- const i = a;
3192
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(U(i));
3614
+ const i = s;
3615
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(B(i));
3193
3616
  }
3194
3617
  };
3195
3618
  const o = t.transform(n.value, n);
3196
- return o instanceof Promise ? o.then((a) => (n.value = a, n)) : (n.value = o, n);
3619
+ return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
3197
3620
  };
3198
3621
  });
3199
- function Ho(e) {
3200
- return new Xo({
3622
+ function ks(e) {
3623
+ return new Ts({
3201
3624
  type: "transform",
3202
3625
  transform: e
3203
3626
  });
3204
3627
  }
3205
- const Jo = /* @__PURE__ */ c("ZodOptional", (e, t) => {
3206
- bt.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
3628
+ const ws = /* @__PURE__ */ c("ZodOptional", (e, t) => {
3629
+ Se.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ot(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3207
3630
  });
3208
- function We(e) {
3209
- return new Jo({
3631
+ function Ve(e) {
3632
+ return new ws({
3210
3633
  type: "optional",
3211
3634
  innerType: e
3212
3635
  });
3213
3636
  }
3214
- const Qo = /* @__PURE__ */ c("ZodNullable", (e, t) => {
3215
- Nr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
3637
+ const Ss = /* @__PURE__ */ c("ZodExactOptional", (e, t) => {
3638
+ Br.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ot(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3216
3639
  });
3217
- function Fe(e) {
3218
- return new Qo({
3640
+ function As(e) {
3641
+ return new Ss({
3642
+ type: "optional",
3643
+ innerType: e
3644
+ });
3645
+ }
3646
+ const Es = /* @__PURE__ */ c("ZodNullable", (e, t) => {
3647
+ Gr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => jo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3648
+ });
3649
+ function Je(e) {
3650
+ return new Es({
3219
3651
  type: "nullable",
3220
3652
  innerType: e
3221
3653
  });
3222
3654
  }
3223
- const ea = /* @__PURE__ */ c("ZodDefault", (e, t) => {
3224
- Rr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3655
+ const zs = /* @__PURE__ */ c("ZodDefault", (e, t) => {
3656
+ Yr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3225
3657
  });
3226
- function ta(e, t) {
3227
- return new ea({
3658
+ function Os(e, t) {
3659
+ return new zs({
3228
3660
  type: "default",
3229
3661
  innerType: e,
3230
3662
  get defaultValue() {
3231
- return typeof t == "function" ? t() : ot(t);
3663
+ return typeof t == "function" ? t() : lt(t);
3232
3664
  }
3233
3665
  });
3234
3666
  }
3235
- const na = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
3236
- xr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
3667
+ const $s = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
3668
+ Kr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => xo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3237
3669
  });
3238
- function ra(e, t) {
3239
- return new na({
3670
+ function Ps(e, t) {
3671
+ return new $s({
3240
3672
  type: "prefault",
3241
3673
  innerType: e,
3242
3674
  get defaultValue() {
3243
- return typeof t == "function" ? t() : ot(t);
3675
+ return typeof t == "function" ? t() : lt(t);
3244
3676
  }
3245
3677
  });
3246
3678
  }
3247
- const oa = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
3248
- Wr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
3679
+ const Is = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
3680
+ qr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3249
3681
  });
3250
- function aa(e, t) {
3251
- return new oa({
3682
+ function Cs(e, t) {
3683
+ return new Is({
3252
3684
  type: "nonoptional",
3253
3685
  innerType: e,
3254
- ...h(t)
3686
+ ...f(t)
3255
3687
  });
3256
3688
  }
3257
- const ia = /* @__PURE__ */ c("ZodCatch", (e, t) => {
3258
- Fr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3689
+ const Ns = /* @__PURE__ */ c("ZodCatch", (e, t) => {
3690
+ Xr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3259
3691
  });
3260
- function sa(e, t) {
3261
- return new ia({
3692
+ function Zs(e, t) {
3693
+ return new Ns({
3262
3694
  type: "catch",
3263
3695
  innerType: e,
3264
3696
  catchValue: typeof t == "function" ? t : () => t
3265
3697
  });
3266
3698
  }
3267
- const ua = /* @__PURE__ */ c("ZodPipe", (e, t) => {
3268
- Ur.init(e, t), w.init(e, t), e.in = t.in, e.out = t.out;
3699
+ const Ds = /* @__PURE__ */ c("ZodPipe", (e, t) => {
3700
+ Hr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jo(e, n, r, o), e.in = t.in, e.out = t.out;
3269
3701
  });
3270
- function Ue(e, t) {
3271
- return new ua({
3702
+ function Be(e, t) {
3703
+ return new Ds({
3272
3704
  type: "pipe",
3273
3705
  in: e,
3274
3706
  out: t
3275
3707
  // ...util.normalizeParams(params),
3276
3708
  });
3277
3709
  }
3278
- const la = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
3279
- jr.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
3710
+ const Ls = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
3711
+ Qr.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3280
3712
  });
3281
- function ca(e) {
3282
- return new la({
3713
+ function Ms(e) {
3714
+ return new Ls({
3283
3715
  type: "readonly",
3284
3716
  innerType: e
3285
3717
  });
3286
3718
  }
3287
- const pa = /* @__PURE__ */ c("ZodCustom", (e, t) => {
3288
- ft.init(e, t), w.init(e, t);
3719
+ const Rs = /* @__PURE__ */ c("ZodCustom", (e, t) => {
3720
+ vt.init(e, t), O.init(e, t), e._zod.processJSONSchema = (n, r, o) => Do(e, n);
3289
3721
  });
3290
- function da(e, t = {}) {
3291
- return _t(pa, e, t);
3722
+ function Ws(e, t = {}) {
3723
+ return /* @__PURE__ */ wt(Rs, e, t);
3292
3724
  }
3293
- function ma(e) {
3294
- return vt(e);
3725
+ function js(e) {
3726
+ return /* @__PURE__ */ St(e);
3295
3727
  }
3296
- const L = /* @__PURE__ */ c("ZodMiniType", (e, t) => {
3728
+ const R = /* @__PURE__ */ c("ZodMiniType", (e, t) => {
3297
3729
  if (!e._zod)
3298
3730
  throw new Error("Uninitialized schema in ZodMiniType.");
3299
- T.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Nn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ut(e, n, r), e.parseAsync = async (n, r) => Rn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => lt(e, n, r), e.check = (...n) => e.clone(
3300
- {
3301
- ...t,
3302
- checks: [
3303
- ...t.checks ?? [],
3304
- ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3305
- ]
3306
- }
3307
- // { parent: true }
3308
- ), e.clone = (n, r) => at(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e));
3309
- }), Tt = /* @__PURE__ */ c("ZodMiniString", (e, t) => {
3310
- ve.init(e, t), L.init(e, t);
3731
+ k.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Bn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => mt(e, n, r), e.parseAsync = async (n, r) => Gn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ht(e, n, r), e.check = (...n) => e.clone({
3732
+ ...t,
3733
+ checks: [
3734
+ ...t.checks ?? [],
3735
+ ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3736
+ ]
3737
+ }, { parent: !0 }), e.with = e.check, e.clone = (n, r) => ct(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.apply = (n) => n(e);
3738
+ }), $t = /* @__PURE__ */ c("ZodMiniString", (e, t) => {
3739
+ we.init(e, t), R.init(e, t);
3311
3740
  });
3312
- function je(e) {
3313
- return Gr(Tt, e);
3314
- }
3315
- const F = /* @__PURE__ */ c("ZodMiniStringFormat", (e, t) => {
3316
- P.init(e, t), Tt.init(e, t);
3317
- }), ha = /* @__PURE__ */ c("ZodMiniEmail", (e, t) => {
3318
- kr.init(e, t), F.init(e, t);
3741
+ // @__NO_SIDE_EFFECTS__
3742
+ function Ge(e) {
3743
+ return /* @__PURE__ */ no($t, e);
3744
+ }
3745
+ const V = /* @__PURE__ */ c("ZodMiniStringFormat", (e, t) => {
3746
+ C.init(e, t), $t.init(e, t);
3747
+ }), Fs = /* @__PURE__ */ c("ZodMiniEmail", (e, t) => {
3748
+ Ir.init(e, t), V.init(e, t);
3319
3749
  });
3320
- function ba(e) {
3321
- return Yr(ha, e);
3750
+ // @__NO_SIDE_EFFECTS__
3751
+ function Us(e) {
3752
+ return /* @__PURE__ */ ro(Fs, e);
3322
3753
  }
3323
- const fa = /* @__PURE__ */ c("ZodMiniUUID", (e, t) => {
3324
- Tr.init(e, t), F.init(e, t);
3754
+ const xs = /* @__PURE__ */ c("ZodMiniUUID", (e, t) => {
3755
+ Pr.init(e, t), V.init(e, t);
3325
3756
  });
3326
- function ya(e) {
3327
- return Kr(fa, e);
3757
+ // @__NO_SIDE_EFFECTS__
3758
+ function Vs(e) {
3759
+ return /* @__PURE__ */ oo(xs, e);
3328
3760
  }
3329
- const ga = /* @__PURE__ */ c("ZodMiniURL", (e, t) => {
3330
- Ar.init(e, t), F.init(e, t);
3761
+ const Js = /* @__PURE__ */ c("ZodMiniURL", (e, t) => {
3762
+ Cr.init(e, t), V.init(e, t);
3331
3763
  });
3332
- function _a(e) {
3333
- return qr(ga, e);
3764
+ // @__NO_SIDE_EFFECTS__
3765
+ function Bs(e) {
3766
+ return /* @__PURE__ */ so(Js, e);
3334
3767
  }
3335
- const va = /* @__PURE__ */ c("ZodMiniIPv4", (e, t) => {
3336
- Pr.init(e, t), F.init(e, t);
3768
+ const Gs = /* @__PURE__ */ c("ZodMiniIPv4", (e, t) => {
3769
+ Mr.init(e, t), V.init(e, t);
3337
3770
  });
3338
- function Ta(e) {
3339
- return Xr(va, e);
3771
+ // @__NO_SIDE_EFFECTS__
3772
+ function Ys(e) {
3773
+ return /* @__PURE__ */ io(Gs, e);
3340
3774
  }
3341
- const ka = /* @__PURE__ */ c("ZodMiniIPv6", (e, t) => {
3342
- Ir.init(e, t), F.init(e, t);
3775
+ const Ks = /* @__PURE__ */ c("ZodMiniIPv6", (e, t) => {
3776
+ Rr.init(e, t), V.init(e, t);
3343
3777
  });
3344
- function Aa(e) {
3345
- return Hr(ka, e);
3778
+ // @__NO_SIDE_EFFECTS__
3779
+ function qs(e) {
3780
+ return /* @__PURE__ */ ao(Ks, e);
3346
3781
  }
3347
- const wa = /* @__PURE__ */ c("ZodMiniCustomStringFormat", (e, t) => {
3348
- $r.init(e, t), F.init(e, t);
3782
+ const Xs = /* @__PURE__ */ c("ZodMiniCustomStringFormat", (e, t) => {
3783
+ Wr.init(e, t), V.init(e, t);
3349
3784
  });
3350
- function Ea(e) {
3351
- return To(wa, "hostname", Hn, e);
3785
+ // @__NO_SIDE_EFFECTS__
3786
+ function Hs(e) {
3787
+ return /* @__PURE__ */ Io(Xs, "hostname", ir, e);
3352
3788
  }
3353
- const kt = /* @__PURE__ */ c("ZodMiniNumber", (e, t) => {
3354
- mt.init(e, t), L.init(e, t);
3789
+ const Pt = /* @__PURE__ */ c("ZodMiniNumber", (e, t) => {
3790
+ gt.init(e, t), R.init(e, t);
3355
3791
  });
3356
- function Ve(e) {
3357
- return no(kt, e);
3792
+ // @__NO_SIDE_EFFECTS__
3793
+ function Ye(e) {
3794
+ return /* @__PURE__ */ mo(Pt, e);
3358
3795
  }
3359
- const Sa = /* @__PURE__ */ c("ZodMiniNumberFormat", (e, t) => {
3360
- Cr.init(e, t), kt.init(e, t);
3796
+ const Qs = /* @__PURE__ */ c("ZodMiniNumberFormat", (e, t) => {
3797
+ jr.init(e, t), Pt.init(e, t);
3361
3798
  });
3362
- function za(e) {
3363
- return ro(Sa, e);
3799
+ // @__NO_SIDE_EFFECTS__
3800
+ function ei(e) {
3801
+ return /* @__PURE__ */ ho(Qs, e);
3364
3802
  }
3365
- const Pa = /* @__PURE__ */ c("ZodMiniBoolean", (e, t) => {
3366
- Or.init(e, t), L.init(e, t);
3803
+ const ti = /* @__PURE__ */ c("ZodMiniBoolean", (e, t) => {
3804
+ Fr.init(e, t), R.init(e, t);
3367
3805
  });
3368
- function Be(e) {
3369
- return oo(Pa, e);
3806
+ // @__NO_SIDE_EFFECTS__
3807
+ function Ke(e) {
3808
+ return /* @__PURE__ */ fo(ti, e);
3370
3809
  }
3371
- const Ia = /* @__PURE__ */ c("ZodMiniAny", (e, t) => {
3372
- Zr.init(e, t), L.init(e, t);
3810
+ const ni = /* @__PURE__ */ c("ZodMiniAny", (e, t) => {
3811
+ Ur.init(e, t), R.init(e, t);
3373
3812
  });
3374
- function de() {
3375
- return ao(Ia);
3813
+ // @__NO_SIDE_EFFECTS__
3814
+ function fe() {
3815
+ return /* @__PURE__ */ yo(ni);
3376
3816
  }
3377
- const $a = /* @__PURE__ */ c("ZodMiniArray", (e, t) => {
3378
- ht.init(e, t), L.init(e, t);
3817
+ const ri = /* @__PURE__ */ c("ZodMiniArray", (e, t) => {
3818
+ _t.init(e, t), R.init(e, t);
3379
3819
  });
3380
- function Ge(e, t) {
3381
- return new $a({
3820
+ // @__NO_SIDE_EFFECTS__
3821
+ function qe(e, t) {
3822
+ return new ri({
3382
3823
  type: "array",
3383
3824
  element: e,
3384
- ...h(t)
3825
+ ...f(t)
3385
3826
  });
3386
3827
  }
3387
- const Ca = /* @__PURE__ */ c("ZodMiniOptional", (e, t) => {
3388
- bt.init(e, t), L.init(e, t);
3828
+ const oi = /* @__PURE__ */ c("ZodMiniOptional", (e, t) => {
3829
+ Se.init(e, t), R.init(e, t);
3389
3830
  });
3390
- function Oa(e) {
3391
- return new Ca({
3831
+ // @__NO_SIDE_EFFECTS__
3832
+ function si(e) {
3833
+ return new oi({
3392
3834
  type: "optional",
3393
3835
  innerType: e
3394
3836
  });
3395
3837
  }
3396
- const Za = /* @__PURE__ */ c("ZodMiniCustom", (e, t) => {
3397
- ft.init(e, t), L.init(e, t);
3838
+ const ii = /* @__PURE__ */ c("ZodMiniCustom", (e, t) => {
3839
+ vt.init(e, t), R.init(e, t);
3398
3840
  });
3399
- function k(e, t = {}) {
3400
- return _t(Za, e, t);
3401
- }
3402
- function At(e) {
3403
- return vt(e);
3404
- }
3405
- const me = {
3406
- email: { schema: ba() },
3407
- hostname: { schema: Ea() },
3408
- ipv4: { schema: Ta() },
3409
- ipv6: { schema: Aa() },
3410
- url: { schema: _a() },
3411
- uuid: { schema: ya() },
3412
- date: { schema: Eo() },
3413
- time: { schema: zo() },
3414
- "date-time": { schema: Ao({ local: !0, offset: !0 }) },
3415
- duration: { schema: Io() }
3416
- }, Da = Object.keys(me), La = (e) => (t, n) => {
3841
+ // @__NO_SIDE_EFFECTS__
3842
+ function w(e, t = {}) {
3843
+ return /* @__PURE__ */ wt(ii, e, t);
3844
+ }
3845
+ // @__NO_SIDE_EFFECTS__
3846
+ function It(e) {
3847
+ return /* @__PURE__ */ St(e);
3848
+ }
3849
+ const ye = {
3850
+ email: { schema: /* @__PURE__ */ Us() },
3851
+ hostname: { schema: /* @__PURE__ */ Hs() },
3852
+ ipv4: { schema: /* @__PURE__ */ Ys() },
3853
+ ipv6: { schema: /* @__PURE__ */ qs() },
3854
+ url: { schema: /* @__PURE__ */ Bs() },
3855
+ uuid: { schema: /* @__PURE__ */ Vs() },
3856
+ date: { schema: qo() },
3857
+ time: { schema: Ho() },
3858
+ "date-time": { schema: Yo({ local: !0, offset: !0 }) },
3859
+ duration: { schema: es() }
3860
+ }, Xe = Object.keys(ye), ai = (e) => (t, n) => {
3417
3861
  switch (t.type) {
3418
3862
  case "string":
3419
- return Ma(t, n);
3863
+ return ui(t, n);
3420
3864
  case "integer":
3421
3865
  case "number":
3422
- return Ra(t, n);
3866
+ return ci(t, n);
3423
3867
  case "boolean":
3424
- return xa(t, n);
3868
+ return pi(t, n);
3425
3869
  case "array":
3426
- return Wa(t, n);
3870
+ return di(t, n);
3427
3871
  case "custom": {
3428
3872
  if (!e)
3429
3873
  throw new Error(
3430
3874
  'Validator type "custom" requires a customValidators object, but it was not supplied.'
3431
3875
  );
3432
- return Fa(t, e);
3876
+ return mi(t, e);
3877
+ }
3878
+ default: {
3879
+ const r = t;
3880
+ throw new Error(
3881
+ `Unknown validator config: ${JSON.stringify(r)}. The "type" property must be one of: "string", "number", "integer", "boolean", "array", "custom".`
3882
+ );
3433
3883
  }
3434
3884
  }
3435
3885
  };
3436
- function v(e, t) {
3886
+ function T(e, t) {
3437
3887
  if (e !== void 0)
3438
3888
  return typeof e == "string" ? e : t?.translate(e.key, e.params, e.default) ?? e.default;
3439
3889
  }
3440
- function Ma(e, t) {
3441
- return j(e, (n) => {
3442
- const r = v(n.messages?.invalid, t);
3443
- let o = r ? je(r) : je();
3890
+ function ui(e, t) {
3891
+ return G(e, (n) => {
3892
+ const r = T(n.messages?.invalid, t);
3893
+ let o = r ? /* @__PURE__ */ Ge(r) : /* @__PURE__ */ Ge();
3444
3894
  if (n.required === !0) {
3445
- const a = v(n.messages?.required, t) ?? "This field is required";
3446
- o = o.check(k((i) => i.length > 0, { error: a }));
3895
+ const s = T(n.messages?.required, t) ?? "This field is required";
3896
+ o = o.check(/* @__PURE__ */ w((i) => i.length > 0, { error: s }));
3447
3897
  }
3448
3898
  if (typeof n.minLength == "number") {
3449
- const a = v(n.messages?.minLength, t), i = n.minLength;
3899
+ const s = T(n.messages?.minLength, t), i = n.minLength;
3450
3900
  o = o.check(
3451
- a ? k((s) => s.length >= i, { error: a }) : R(i)
3901
+ s ? /* @__PURE__ */ w((a) => a.length >= i, { error: s }) : /* @__PURE__ */ F(i)
3452
3902
  );
3453
3903
  }
3454
3904
  if (typeof n.maxLength == "number") {
3455
- const a = v(n.messages?.maxLength, t), i = n.maxLength;
3905
+ const s = T(n.messages?.maxLength, t), i = n.maxLength;
3456
3906
  o = o.check(
3457
- a ? k((s) => s.length <= i, { error: a }) : re(i)
3907
+ s ? /* @__PURE__ */ w((a) => a.length <= i, { error: s }) : /* @__PURE__ */ ie(i)
3458
3908
  );
3459
3909
  }
3460
3910
  if (typeof n.pattern == "string") {
3461
- const a = v(n.messages?.pattern, t), i = new RegExp(n.pattern);
3911
+ const s = T(n.messages?.pattern, t), i = new RegExp(n.pattern);
3462
3912
  o = o.check(
3463
- a ? k((s) => i.test(s), { error: a }) : gt(i)
3913
+ s ? /* @__PURE__ */ w((a) => i.test(a), { error: s }) : /* @__PURE__ */ kt(i)
3464
3914
  );
3465
3915
  }
3466
3916
  if (n.enum) {
3467
- const a = n.enum, i = v(n.messages?.enum, t);
3468
- o = o.check(k((s) => a.includes(s), i ? { error: i } : void 0));
3917
+ const s = n.enum, i = T(n.messages?.enum, t);
3918
+ o = o.check(/* @__PURE__ */ w((a) => s.includes(a), i ? { error: i } : void 0));
3469
3919
  }
3470
3920
  if (n.const !== void 0) {
3471
- const a = v(n.messages?.const, t);
3472
- o = o.check(k((i) => i === n.const, a ? { error: a } : void 0));
3921
+ const s = T(n.messages?.const, t);
3922
+ o = o.check(/* @__PURE__ */ w((i) => i === n.const, s ? { error: s } : void 0));
3473
3923
  }
3474
3924
  if (n.format !== void 0)
3475
- if (Da.includes(n.format)) {
3476
- const a = v(n.messages?.format, t);
3925
+ if (Xe.includes(n.format)) {
3926
+ const s = T(n.messages?.format, t);
3477
3927
  o = o.check(
3478
- a ? At((i, s) => {
3479
- const u = Ye(
3480
- me[n.format].schema,
3928
+ s ? /* @__PURE__ */ It((i, a) => {
3929
+ const u = He(
3930
+ ye[n.format].schema,
3481
3931
  i
3482
3932
  );
3483
- Ke(u) || s.addIssue({ code: "custom", path: [], message: a });
3484
- }) : me[n.format].schema
3933
+ Qe(u) || a.addIssue({ code: "custom", path: [], message: s });
3934
+ }) : ye[n.format].schema
3485
3935
  );
3486
3936
  } else
3487
- console.error(`The string validation format "${n.format}" is not supported`);
3937
+ throw new Error(
3938
+ `Unknown string validation format: ${JSON.stringify(n.format)}. The "format" property must be one of: ${Xe.map((s) => `"${s}"`).join(", ")}.`
3939
+ );
3488
3940
  return o;
3489
3941
  });
3490
3942
  }
3491
- const Na = (e, t) => {
3943
+ const li = (e, t) => {
3492
3944
  if (t === 0)
3493
3945
  return !1;
3494
3946
  const n = e / t;
3495
3947
  return Math.abs(n - Math.round(n)) < 1e-10;
3496
3948
  };
3497
- function Ra(e, t) {
3498
- return j(e, (n) => {
3499
- const r = v(n.messages?.invalid, t);
3500
- let o = r ? Ve(r) : Ve();
3501
- if (n.type === "integer" && (o = o.check(za())), n.minimum !== void 0) {
3502
- const a = v(n.messages?.minimum, t), i = n.minimum;
3503
- o = o.check(a ? k((s) => s >= i, { error: a }) : so(i));
3949
+ function ci(e, t) {
3950
+ return G(e, (n) => {
3951
+ const r = T(n.messages?.invalid, t);
3952
+ let o = r ? /* @__PURE__ */ Ye(r) : /* @__PURE__ */ Ye();
3953
+ if (n.type === "integer" && (o = o.check(/* @__PURE__ */ ei())), n.minimum !== void 0) {
3954
+ const s = T(n.messages?.minimum, t), i = n.minimum;
3955
+ o = o.check(s ? /* @__PURE__ */ w((a) => a >= i, { error: s }) : /* @__PURE__ */ go(i));
3504
3956
  }
3505
3957
  if (n.maximum !== void 0) {
3506
- const a = v(n.messages?.maximum, t), i = n.maximum;
3507
- o = o.check(a ? k((s) => s <= i, { error: a }) : io(i));
3958
+ const s = T(n.messages?.maximum, t), i = n.maximum;
3959
+ o = o.check(s ? /* @__PURE__ */ w((a) => a <= i, { error: s }) : /* @__PURE__ */ bo(i));
3508
3960
  }
3509
3961
  if (n.exclusiveMinimum !== void 0) {
3510
- const a = v(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3511
- o = o.check(k((s) => s > i, a ? { error: a } : void 0));
3962
+ const s = T(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3963
+ o = o.check(/* @__PURE__ */ w((a) => a > i, s ? { error: s } : void 0));
3512
3964
  }
3513
3965
  if (n.exclusiveMaximum !== void 0) {
3514
- const a = v(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3515
- o = o.check(k((s) => s < i, a ? { error: a } : void 0));
3966
+ const s = T(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3967
+ o = o.check(/* @__PURE__ */ w((a) => a < i, s ? { error: s } : void 0));
3516
3968
  }
3517
3969
  if (n.multipleOf !== void 0) {
3518
- const a = v(n.messages?.multipleOf, t), i = n.multipleOf;
3970
+ const s = T(n.messages?.multipleOf, t), i = n.multipleOf;
3519
3971
  o = o.check(
3520
- k((s) => Na(s, i), a ? { error: a } : void 0)
3972
+ /* @__PURE__ */ w((a) => li(a, i), s ? { error: s } : void 0)
3521
3973
  );
3522
3974
  }
3523
3975
  if (n.enum) {
3524
- const a = n.enum, i = v(n.messages?.enum, t);
3525
- o = o.check(k((s) => a.includes(s), i ? { error: i } : void 0));
3976
+ const s = n.enum, i = T(n.messages?.enum, t);
3977
+ o = o.check(/* @__PURE__ */ w((a) => s.includes(a), i ? { error: i } : void 0));
3526
3978
  }
3527
3979
  if (n.const !== void 0) {
3528
- const a = v(n.messages?.const, t);
3529
- o = o.check(k((i) => i === n.const, a ? { error: a } : void 0));
3980
+ const s = T(n.messages?.const, t);
3981
+ o = o.check(/* @__PURE__ */ w((i) => i === n.const, s ? { error: s } : void 0));
3530
3982
  }
3531
3983
  return o;
3532
3984
  });
3533
3985
  }
3534
- function xa(e, t) {
3535
- return j(e, (n) => {
3536
- const r = v(n.messages?.invalid, t);
3537
- let o = r ? Be(r) : Be();
3986
+ function pi(e, t) {
3987
+ return G(e, (n) => {
3988
+ const r = T(n.messages?.invalid, t);
3989
+ let o = r ? /* @__PURE__ */ Ke(r) : /* @__PURE__ */ Ke();
3538
3990
  if (n.const !== void 0) {
3539
- const a = v(n.messages?.const, t);
3540
- o = o.check(k((i) => i === n.const, a ? { error: a } : void 0));
3991
+ const s = T(n.messages?.const, t);
3992
+ o = o.check(/* @__PURE__ */ w((i) => i === n.const, s ? { error: s } : void 0));
3541
3993
  }
3542
3994
  return o;
3543
3995
  });
3544
3996
  }
3545
- function Wa(e, t) {
3546
- return j(e, (n) => {
3547
- const r = v(n.messages?.invalid, t);
3548
- let o = r ? Ge(de(), r) : Ge(de());
3997
+ function di(e, t) {
3998
+ return G(e, (n) => {
3999
+ const r = T(n.messages?.invalid, t);
4000
+ let o = r ? /* @__PURE__ */ qe(/* @__PURE__ */ fe(), r) : /* @__PURE__ */ qe(/* @__PURE__ */ fe());
3549
4001
  if (n.required === !0) {
3550
- const a = v(n.messages?.required, t) ?? "This field is required";
3551
- o = o.check(k((i) => i.length > 0, { error: a }));
4002
+ const s = T(n.messages?.required, t) ?? "This field is required";
4003
+ o = o.check(/* @__PURE__ */ w((i) => i.length > 0, { error: s }));
3552
4004
  }
3553
4005
  if (typeof n.minItems == "number") {
3554
- const a = v(n.messages?.minItems, t), i = n.minItems;
4006
+ const s = T(n.messages?.minItems, t), i = n.minItems;
3555
4007
  o = o.check(
3556
- a ? k((s) => s.length >= i, { error: a }) : R(i)
4008
+ s ? /* @__PURE__ */ w((a) => a.length >= i, { error: s }) : /* @__PURE__ */ F(i)
3557
4009
  );
3558
4010
  }
3559
4011
  if (typeof n.maxItems == "number") {
3560
- const a = v(n.messages?.maxItems, t), i = n.maxItems;
4012
+ const s = T(n.messages?.maxItems, t), i = n.maxItems;
3561
4013
  o = o.check(
3562
- a ? k((s) => s.length <= i, { error: a }) : re(i)
4014
+ s ? /* @__PURE__ */ w((a) => a.length <= i, { error: s }) : /* @__PURE__ */ ie(i)
3563
4015
  );
3564
4016
  }
3565
4017
  return o;
3566
4018
  });
3567
4019
  }
3568
- function Fa(e, t) {
3569
- return j(e, (n) => {
3570
- let r = de();
3571
- return St(
4020
+ function mi(e, t) {
4021
+ return G(e, (n) => {
4022
+ let r = /* @__PURE__ */ fe();
4023
+ return Zt(
3572
4024
  Object.keys(n),
3573
4025
  // filter non-custom validator keys
3574
4026
  (o) => o !== "type" && o !== "required",
3575
4027
  (o) => {
3576
- const a = n[o], i = t[o], s = i(a);
4028
+ const s = n[o], i = t[o];
4029
+ if (!i) {
4030
+ const u = Object.keys(t).map((l) => `"${l}"`).join(", ");
4031
+ throw new Error(
4032
+ `Unknown custom validator rule "${o}". Registered rules: ${u || "(none)"}.`
4033
+ );
4034
+ }
4035
+ const a = i(s);
3577
4036
  r = r.check(
3578
- At((u, l) => {
3579
- const p = Ye(
3580
- s,
4037
+ /* @__PURE__ */ It((u, l) => {
4038
+ const p = He(
4039
+ a,
3581
4040
  u
3582
4041
  );
3583
- if (!Ke(p)) {
3584
- const m = p.issues[0];
4042
+ if (!Qe(p)) {
4043
+ const d = p.issues[0];
3585
4044
  l.addIssue({
3586
4045
  code: "custom",
3587
4046
  path: [],
3588
- message: m?.message || `Validation failed for ${o}`
4047
+ message: d?.message || `Validation failed for ${o}`
3589
4048
  });
3590
4049
  }
3591
4050
  })
@@ -3594,61 +4053,61 @@ function Fa(e, t) {
3594
4053
  ), r;
3595
4054
  });
3596
4055
  }
3597
- function j(e, t) {
4056
+ function G(e, t) {
3598
4057
  const n = t(e);
3599
- return e.required ? n : Oa(n);
4058
+ return e.required ? n : /* @__PURE__ */ si(n);
3600
4059
  }
3601
- const Ua = {
4060
+ const hi = {
3602
4061
  // ACTION
3603
- button: async () => (await import("./button.element-3a7rRHbA.js")).ButtonElement,
4062
+ button: async () => (await import("./button.element-CJay43iR.js")).ButtonElement,
3604
4063
  // INPUTS
3605
- calendar: async () => (await import("./calendar.element-M5MPJmap.js")).CalendarElement,
3606
- dateTimeCalendar: async () => (await import("./date-time-calendar.element-DC4NK0y1.js")).DateTimeCalendarElement,
3607
- rangeCalendar: async () => (await import("./range-calendar.element-D6KYq18B.js")).RangeCalendarElement,
3608
- rangeDateInput: async () => (await import("./range-date-input.element-D4nIXJbw.js")).RangeDateInputElement,
3609
- rangeTimeInput: async () => (await import("./range-time-input.element-dU2iBdmJ.js")).RangeTimeInputElement,
3610
- rangeDateTimeInput: async () => (await import("./range-date-time-input.element-DUnbv4ed.js")).RangeDateTimeInputElement,
3611
- rangeDateTimeCalendar: async () => (await import("./range-date-time-calendar.element-C00aDefZ.js")).RangeDateTimeCalendarElement,
3612
- rangeDateTimePicker: async () => (await import("./range-date-time-picker.element-Cbps6s_G.js")).RangeDateTimePickerElement,
3613
- rangeDatePicker: async () => (await import("./range-date-picker.element-dhxPAAE6.js")).RangeDatePickerElement,
3614
- rangeTimePicker: async () => (await import("./range-time-picker.element-v6nQsIPw.js")).RangeTimePickerElement,
3615
- currency: async () => (await import("./currency.element-CfFrAtrr.js")).CurrencyElement,
3616
- dateInput: async () => (await import("./date.element-Consgsbb.js")).DateElement,
3617
- datePicker: async () => (await import("./date-picker.element-va_-LGZD.js")).DatePickerElement,
3618
- dateTimePicker: async () => (await import("./date-time-picker.element-Dy-8cb-_.js")).DateTimePickerElement,
3619
- dropdown: async () => (await import("./dropdown.element-WsD61Qel.js")).DropdownElement,
3620
- list: async () => (await import("./list.element-DV82YxnJ.js")).ListElement,
3621
- markdown: async () => (await import("./markdown.element-p-kC47D7.js")).MarkdownElement,
3622
- password: async () => (await import("./password.element-n-R9RbkB.js")).PasswordElement,
3623
- textinput: async () => (await import("./textinput.element-CkXNzMUg.js")).TextinputElement,
3624
- timeInput: async () => (await import("./time.element-fK3oLi49.js")).TimeElement,
3625
- timePicker: async () => (await import("./time-picker.element-CYZVXgRS.js")).TimePickerElement,
3626
- dateTimeInput: async () => (await import("./date-time.element-Bv4XdzMi.js")).DateTimeElement,
3627
- textarea: async () => (await import("./textarea.element-HThYqdR_.js")).TextareaElement,
3628
- toggle: async () => (await import("./toggle.element-C1kCw5H8.js")).ToggleElement,
3629
- checkbox: async () => (await import("./checkbox.element-CVskoXEc.js")).CheckboxElement,
3630
- number: async () => (await import("./number.element-CBr47IiY.js")).NumberElement,
3631
- radiogroup: async () => (await import("./radiogroup.element-CeQn623u.js")).RadiogroupElement,
3632
- select: async () => (await import("./select.element-C0V-Bv3L.js")).SelectElement,
3633
- tags: async () => (await import("./tags.element-DvwEpxpK.js")).TagsElement,
4064
+ calendar: async () => (await import("./calendar.element-BhFrCsns.js")).CalendarElement,
4065
+ dateTimeCalendar: async () => (await import("./date-time-calendar.element-BLBcVsFu.js")).DateTimeCalendarElement,
4066
+ rangeCalendar: async () => (await import("./range-calendar.element-DHLZhpnj.js")).RangeCalendarElement,
4067
+ rangeDateInput: async () => (await import("./range-date-input.element-BdD4SlB4.js")).RangeDateInputElement,
4068
+ rangeTimeInput: async () => (await import("./range-time-input.element-B7wtHJoQ.js")).RangeTimeInputElement,
4069
+ rangeDateTimeInput: async () => (await import("./range-date-time-input.element-Cti44iuW.js")).RangeDateTimeInputElement,
4070
+ rangeDateTimeCalendar: async () => (await import("./range-date-time-calendar.element-Coea6RF4.js")).RangeDateTimeCalendarElement,
4071
+ rangeDateTimePicker: async () => (await import("./range-date-time-picker.element-CDN2RL1y.js")).RangeDateTimePickerElement,
4072
+ rangeDatePicker: async () => (await import("./range-date-picker.element-DWRHiAoC.js")).RangeDatePickerElement,
4073
+ rangeTimePicker: async () => (await import("./range-time-picker.element-CPIAiQPC.js")).RangeTimePickerElement,
4074
+ currency: async () => (await import("./currency.element-D8A2ObpM.js")).CurrencyElement,
4075
+ dateInput: async () => (await import("./date.element-BsKhLrEc.js")).DateElement,
4076
+ datePicker: async () => (await import("./date-picker.element-DeUQtbLg.js")).DatePickerElement,
4077
+ dateTimePicker: async () => (await import("./date-time-picker.element-BUbLdV6i.js")).DateTimePickerElement,
4078
+ dropdown: async () => (await import("./dropdown.element-CXpMwJsU.js")).DropdownElement,
4079
+ list: async () => (await import("./list.element-eo3DIOrp.js")).ListElement,
4080
+ markdown: async () => (await import("./markdown.element-FbtwdnAv.js")).MarkdownElement,
4081
+ password: async () => (await import("./password.element-CBaB8h5b.js")).PasswordElement,
4082
+ textinput: async () => (await import("./textinput.element-AL2Nr768.js")).TextinputElement,
4083
+ timeInput: async () => (await import("./time.element-BneqgMlQ.js")).TimeElement,
4084
+ timePicker: async () => (await import("./time-picker.element-DLihegjg.js")).TimePickerElement,
4085
+ dateTimeInput: async () => (await import("./date-time.element-B5onfSBG.js")).DateTimeElement,
4086
+ textarea: async () => (await import("./textarea.element-CiNEy9uq.js")).TextareaElement,
4087
+ toggle: async () => (await import("./toggle.element-Cz91CRdp.js")).ToggleElement,
4088
+ checkbox: async () => (await import("./checkbox.element-DAAVB651.js")).CheckboxElement,
4089
+ number: async () => (await import("./number.element-BEpOCzXy.js")).NumberElement,
4090
+ radiogroup: async () => (await import("./radiogroup.element-KWzBx8mx.js")).RadiogroupElement,
4091
+ select: async () => (await import("./select.element-eepcXTpL.js")).SelectElement,
4092
+ tags: async () => (await import("./tags.element-CPHgotb0.js")).TagsElement,
3634
4093
  // REPEATER
3635
- repeater: async () => (await import("./repeater.element-CtNgB4F5.js")).RepeaterElement,
4094
+ repeater: async () => (await import("./repeater.element-BM1Keckd.js")).RepeaterElement,
3636
4095
  // LAYOUTS
3637
4096
  flex: async () => (await import("./flex.element-DG4Uaj_X.js")).FlexElement,
3638
4097
  grid: async () => (await import("./grid.element-DCZsh-3J.js")).GridElement,
3639
- tabs: async () => (await import("./tabs.element-BvAyI71N.js")).TabsElement,
4098
+ tabs: async () => (await import("./tabs.element-CvcIA8P3.js")).TabsElement,
3640
4099
  accordion: async () => (await import("./accordion.element-BIgxl5e9.js")).AccordionElement,
3641
4100
  // DISPLAY
3642
4101
  alert: async () => (await import("./alert.element-DPWq9-0F.js")).AlertElement,
3643
4102
  markdownText: async () => (await import("./markdown-text.element-B8TfVLIO.js")).MarkdownTextElement,
3644
4103
  renderer: async () => (await import("./renderer.element-CNyMn2Lu.js")).RendererElement
3645
4104
  };
3646
- var ja = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, V = (e, t, n, r) => {
3647
- for (var o = r > 1 ? void 0 : r ? Va(t, n) : t, a = e.length - 1, i; a >= 0; a--)
3648
- (i = e[a]) && (o = (r ? i(t, n, o) : i(o)) || o);
3649
- return r && o && ja(t, n, o), o;
4105
+ var fi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Y = (e, t, n, r) => {
4106
+ for (var o = r > 1 ? void 0 : r ? yi(t, n) : t, s = e.length - 1, i; s >= 0; s--)
4107
+ (i = e[s]) && (o = (r ? i(t, n, o) : i(o)) || o);
4108
+ return r && o && fi(t, n, o), o;
3650
4109
  };
3651
- let x = class extends zt {
4110
+ let U = class extends Dt {
3652
4111
  constructor() {
3653
4112
  super(...arguments), this.autocomplete = void 0;
3654
4113
  }
@@ -3662,10 +4121,10 @@ let x = class extends zt {
3662
4121
  return this;
3663
4122
  }
3664
4123
  render() {
3665
- const e = this.config, t = In(e.formDef, e.formSelectors, e.formConfig), n = {
4124
+ const e = this.config, t = Rn(e.formDef, e.formSelectors, e.formConfig), n = {
3666
4125
  formDef: t.formDef,
3667
4126
  widgetLoaders: {
3668
- ...Ua,
4127
+ ...hi,
3669
4128
  ...t.widgetLoaders,
3670
4129
  ...e.customWidgetLoaders ?? {}
3671
4130
  },
@@ -3681,36 +4140,36 @@ let x = class extends zt {
3681
4140
  data: e.data,
3682
4141
  meta: e.meta,
3683
4142
  formName: e.formName
3684
- }, r = La({
4143
+ }, r = ai({
3685
4144
  ...e.customValidators ?? {}
3686
- }), o = t.formEvent, a = o ? (i) => o(i.detail) : void 0;
3687
- return Pt`
4145
+ }), o = t.formEvent, s = o ? (i) => o(i.detail) : void 0;
4146
+ return Lt`
3688
4147
  <gui-core-form
3689
4148
  .config=${n}
3690
4149
  .validators=${r}
3691
4150
  .autocomplete=${this.autocomplete}
3692
4151
  .formHealthBoundary=${this.formHealthBoundary}
3693
- @formEvent=${a}
4152
+ @formEvent=${s}
3694
4153
  ></gui-core-form>
3695
4154
  `;
3696
4155
  }
3697
4156
  };
3698
- V([
3699
- he({ attribute: !1 })
3700
- ], x.prototype, "config", 2);
3701
- V([
3702
- he({ type: String })
3703
- ], x.prototype, "autocomplete", 2);
3704
- V([
3705
- he({ attribute: !1 })
3706
- ], x.prototype, "formHealthBoundary", 2);
3707
- V([
3708
- It("gui-core-form")
3709
- ], x.prototype, "coreForm", 2);
3710
- x = V([
3711
- $t("gui-form")
3712
- ], x);
4157
+ Y([
4158
+ be({ attribute: !1 })
4159
+ ], U.prototype, "config", 2);
4160
+ Y([
4161
+ be({ type: String })
4162
+ ], U.prototype, "autocomplete", 2);
4163
+ Y([
4164
+ be({ attribute: !1 })
4165
+ ], U.prototype, "formHealthBoundary", 2);
4166
+ Y([
4167
+ Mt("gui-core-form")
4168
+ ], U.prototype, "coreForm", 2);
4169
+ U = Y([
4170
+ Rt("gui-form")
4171
+ ], U);
3713
4172
  export {
3714
- x as FormElement,
3715
- Ua as widgetLoaders
4173
+ U as FormElement,
4174
+ hi as widgetLoaders
3716
4175
  };