@golemui/gui-lit 1.0.0-rc.1 → 1.0.0-rc.2

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 (4) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/index.js +892 -1298
  3. package/index.umd.cjs +185 -187
  4. package/package.json +6 -6
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { filterTap as Pt, standardValidate as Ke, isStandardValidateSuccess as qe } from "@golemui/core";
1
+ import { filterTap as Tt, standardValidate as Be, isStandardValidateSuccess as Ye } from "@golemui/core";
2
2
  import "@golemui/gui-shared";
3
3
  import "@golemui/lit";
4
- import { LitElement as Zt, html as It } from "lit";
5
- import { property as Xe, query as Ct, customElement as Nt } from "lit/decorators.js";
6
- const He = {
4
+ import { LitElement as At, html as St } from "lit";
5
+ import { property as Ge, query as zt, customElement as Et } from "lit/decorators.js";
6
+ const Ke = {
7
7
  LAYOUTS: "LAYOUTS",
8
8
  DISPLAYS: "DISPLAYS"
9
9
  };
10
- function Lt(e) {
10
+ function $t(e) {
11
11
  return function(t, n = () => !0) {
12
12
  return {
13
13
  kind: "leaf",
@@ -17,41 +17,41 @@ function Lt(e) {
17
17
  };
18
18
  };
19
19
  }
20
- function T(e, t) {
20
+ function w(e, t) {
21
21
  return typeof e == "function" ? e : { type: t, ...e ?? {} };
22
22
  }
23
- const Mt = (e, t) => ({
23
+ const Ot = (e, t) => ({
24
24
  type: "ITEMS",
25
- itemType: He.DISPLAYS,
25
+ itemType: Ke.DISPLAYS,
26
26
  items: [{ render: e }],
27
27
  tags: t ?? []
28
- }), q = /* @__PURE__ */ new Map();
29
- function Qe(e, t) {
30
- if (q.has(e))
28
+ }), K = /* @__PURE__ */ new Map();
29
+ function qe(e, t) {
30
+ if (K.has(e))
31
31
  throw new Error(`Item type "${e}" is already registered.`);
32
- q.set(e, t);
32
+ K.set(e, t);
33
33
  }
34
- function H(e) {
35
- const t = q.get(e);
34
+ function q(e) {
35
+ const t = K.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 et(e) {
43
- return q.has(e);
42
+ function Xe(e) {
43
+ return K.has(e);
44
44
  }
45
- function y(e) {
45
+ function h(e) {
46
46
  const t = (a) => {
47
47
  if (!e.sensibleDefaults)
48
48
  return {};
49
49
  let u = { ...e.sensibleDefaults.base };
50
50
  for (const c of a) {
51
51
  const p = c.config;
52
- for (const d of e.sensibleDefaults.fields) {
53
- const m = d;
54
- p[m] != null && (u = { ...u, [m]: p[m] });
52
+ for (const m of e.sensibleDefaults.fields) {
53
+ const f = m;
54
+ p[f] != null && (u = { ...u, [f]: p[f] });
55
55
  }
56
56
  }
57
57
  return u;
@@ -77,11 +77,11 @@ function y(e) {
77
77
  ...e.buildCustomWidget ? { buildCustomWidget: e.buildCustomWidget } : {},
78
78
  ...e.getChildren ? { getChildren: e.getChildren } : {}
79
79
  };
80
- Qe(e.itemType, o);
81
- const s = Lt(e.itemType);
80
+ qe(e.itemType, o);
81
+ const s = $t(e.itemType);
82
82
  return { gsl: s, gslByUid: (a, u) => s(u, ((c) => c.uid === a)) };
83
83
  }
84
- function _(e) {
84
+ function y(e) {
85
85
  const {
86
86
  uid: t,
87
87
  path: n,
@@ -93,40 +93,40 @@ function _(e) {
93
93
  type: u,
94
94
  size: c,
95
95
  onLoad: p,
96
- onChange: d,
97
- onFilter: m,
98
- on: h,
96
+ onChange: m,
97
+ onFilter: f,
98
+ on: z,
99
99
  states: P,
100
- include: k,
101
- exclude: ke,
102
- validator: Te,
103
- ...L
100
+ include: V,
101
+ exclude: _e,
102
+ validator: ve,
103
+ ...C
104
104
  } = e;
105
- return L;
105
+ return C;
106
106
  }
107
- function Dt(e) {
107
+ function Zt(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 w(e, t) {
111
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Dt(e.path) };
110
+ function v(e, t) {
111
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Zt(e.path) };
112
112
  }
113
- function N(e, t) {
113
+ function Z(e, t) {
114
114
  return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
115
115
  }
116
- function Rt(e) {
116
+ function Pt(e) {
117
117
  switch (e.type) {
118
118
  case "text":
119
- return jt(e);
119
+ return It(e);
120
120
  case "number":
121
- return Wt(e);
121
+ return Lt(e);
122
122
  case "boolean":
123
- return Ft(e);
123
+ return Ct(e);
124
124
  default:
125
125
  throw new Error(`Unsupported field type "${e.type}"`);
126
126
  }
127
127
  }
128
- function Ft(e) {
129
- const t = _(e);
128
+ function Ct(e) {
129
+ const t = y(e);
130
130
  return {
131
131
  uid: e.uid ?? "",
132
132
  kind: "input",
@@ -135,12 +135,12 @@ function Ft(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: T(e.validator, "boolean") } : {},
138
+ ...e.validator != null ? { validator: w(e.validator, "boolean") } : {},
139
139
  props: t
140
140
  };
141
141
  }
142
- function jt(e) {
143
- const t = _(e);
142
+ function It(e) {
143
+ const t = y(e);
144
144
  return {
145
145
  uid: e.uid ?? "",
146
146
  kind: "input",
@@ -153,11 +153,11 @@ function jt(e) {
153
153
  placeholder: t.placeholder ?? "",
154
154
  ...t
155
155
  },
156
- validator: T(e.validator, "string")
156
+ validator: w(e.validator, "string")
157
157
  };
158
158
  }
159
- function Wt(e) {
160
- const t = _(e);
159
+ function Lt(e) {
160
+ const t = y(e);
161
161
  return {
162
162
  uid: e.uid ?? "",
163
163
  kind: "input",
@@ -170,10 +170,10 @@ function Wt(e) {
170
170
  placeholder: t.placeholder ?? "",
171
171
  ...t
172
172
  },
173
- validator: T(e.validator, "number")
173
+ validator: w(e.validator, "number")
174
174
  };
175
175
  }
176
- y({
176
+ h({
177
177
  itemType: "INPUTS",
178
178
  entryShape: "keyed",
179
179
  sensibleDefaults: {
@@ -183,19 +183,19 @@ y({
183
183
  },
184
184
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
185
185
  apply: (e, t) => {
186
- let n = w(e, t);
187
- return n = N(n, t), n;
186
+ let n = v(e, t);
187
+ return n = Z(n, t), n;
188
188
  }
189
189
  },
190
- mapToWidget: Rt
190
+ mapToWidget: Pt
191
191
  });
192
- y({
192
+ h({
193
193
  itemType: "SELECT",
194
194
  entryShape: "keyed",
195
195
  sensibleDefaults: {
196
196
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
197
197
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
198
- apply: (e, t) => N(w(e, t), t)
198
+ apply: (e, t) => Z(v(e, t), t)
199
199
  },
200
200
  mapToWidget: (e) => ({
201
201
  uid: e.uid ?? "",
@@ -206,10 +206,10 @@ y({
206
206
  ...e.disabled != null ? { disabled: e.disabled } : {},
207
207
  ...e.readonly != null ? { readonly: e.readonly } : {},
208
208
  ...e.validator != null ? { validator: e.validator } : {},
209
- props: _(e)
209
+ props: y(e)
210
210
  })
211
211
  });
212
- y({
212
+ h({
213
213
  itemType: "DROPDOWN",
214
214
  entryShape: "keyed",
215
215
  sensibleDefaults: {
@@ -218,7 +218,7 @@ y({
218
218
  suppressAutomaticPlaceholders: !1
219
219
  },
220
220
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
221
- apply: (e, t) => N(w(e, t), t)
221
+ apply: (e, t) => Z(v(e, t), t)
222
222
  },
223
223
  mapToWidget: (e) => ({
224
224
  uid: e.uid ?? "",
@@ -229,16 +229,16 @@ y({
229
229
  ...e.disabled != null ? { disabled: e.disabled } : {},
230
230
  ...e.readonly != null ? { readonly: e.readonly } : {},
231
231
  ...e.validator != null ? { validator: e.validator } : {},
232
- props: _(e)
232
+ props: y(e)
233
233
  })
234
234
  });
235
- y({
235
+ h({
236
236
  itemType: "RADIOGROUP",
237
237
  entryShape: "keyed",
238
238
  sensibleDefaults: {
239
239
  base: { suppressAutomaticLabels: !1 },
240
240
  fields: ["suppressAutomaticLabels"],
241
- apply: (e, t) => w(e, t)
241
+ apply: (e, t) => v(e, t)
242
242
  },
243
243
  mapToWidget: (e) => ({
244
244
  uid: e.uid ?? "",
@@ -249,16 +249,16 @@ y({
249
249
  ...e.disabled != null ? { disabled: e.disabled } : {},
250
250
  ...e.readonly != null ? { readonly: e.readonly } : {},
251
251
  ...e.validator != null ? { validator: e.validator } : {},
252
- props: _(e)
252
+ props: y(e)
253
253
  })
254
254
  });
255
- y({
255
+ h({
256
256
  itemType: "CHECKBOX",
257
257
  entryShape: "keyed",
258
258
  sensibleDefaults: {
259
259
  base: { suppressAutomaticLabels: !1 },
260
260
  fields: ["suppressAutomaticLabels"],
261
- apply: (e, t) => w(e, t)
261
+ apply: (e, t) => v(e, t)
262
262
  },
263
263
  mapToWidget: (e) => ({
264
264
  uid: e.uid ?? "",
@@ -268,17 +268,17 @@ y({
268
268
  ...e.label != null ? { label: e.label } : {},
269
269
  ...e.disabled != null ? { disabled: e.disabled } : {},
270
270
  ...e.readonly != null ? { readonly: e.readonly } : {},
271
- ...e.validator != null ? { validator: T(e.validator, "boolean") } : {},
272
- props: _(e)
271
+ ...e.validator != null ? { validator: w(e.validator, "boolean") } : {},
272
+ props: y(e)
273
273
  })
274
274
  });
275
- y({
275
+ h({
276
276
  itemType: "TEXTAREA",
277
277
  entryShape: "keyed",
278
278
  sensibleDefaults: {
279
279
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
280
280
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
281
- apply: (e, t) => N(w(e, t), t)
281
+ apply: (e, t) => Z(v(e, t), t)
282
282
  },
283
283
  mapToWidget: (e) => ({
284
284
  uid: e.uid ?? "",
@@ -288,17 +288,17 @@ y({
288
288
  ...e.label != null ? { label: e.label } : {},
289
289
  ...e.disabled != null ? { disabled: e.disabled } : {},
290
290
  ...e.readonly != null ? { readonly: e.readonly } : {},
291
- ...e.validator != null ? { validator: T(e.validator, "string") } : {},
292
- props: _(e)
291
+ ...e.validator != null ? { validator: w(e.validator, "string") } : {},
292
+ props: y(e)
293
293
  })
294
294
  });
295
- y({
295
+ h({
296
296
  itemType: "PASSWORD",
297
297
  entryShape: "keyed",
298
298
  sensibleDefaults: {
299
299
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
300
300
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
301
- apply: (e, t) => N(w(e, t), t)
301
+ apply: (e, t) => Z(v(e, t), t)
302
302
  },
303
303
  mapToWidget: (e) => ({
304
304
  uid: e.uid ?? "",
@@ -308,17 +308,17 @@ y({
308
308
  ...e.label != null ? { label: e.label } : {},
309
309
  ...e.disabled != null ? { disabled: e.disabled } : {},
310
310
  ...e.readonly != null ? { readonly: e.readonly } : {},
311
- ...e.validator != null ? { validator: T(e.validator, "string") } : {},
312
- props: _(e)
311
+ ...e.validator != null ? { validator: w(e.validator, "string") } : {},
312
+ props: y(e)
313
313
  })
314
314
  });
315
- y({
315
+ h({
316
316
  itemType: "CURRENCY",
317
317
  entryShape: "keyed",
318
318
  sensibleDefaults: {
319
319
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
320
320
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
321
- apply: (e, t) => N(w(e, t), t)
321
+ apply: (e, t) => Z(v(e, t), t)
322
322
  },
323
323
  mapToWidget: (e) => ({
324
324
  uid: e.uid ?? "",
@@ -328,17 +328,17 @@ y({
328
328
  ...e.label != null ? { label: e.label } : {},
329
329
  ...e.disabled != null ? { disabled: e.disabled } : {},
330
330
  ...e.readonly != null ? { readonly: e.readonly } : {},
331
- ...e.validator != null ? { validator: T(e.validator, "number") } : {},
332
- props: _(e)
331
+ ...e.validator != null ? { validator: w(e.validator, "number") } : {},
332
+ props: y(e)
333
333
  })
334
334
  });
335
- y({
335
+ h({
336
336
  itemType: "MARKDOWN",
337
337
  entryShape: "keyed",
338
338
  sensibleDefaults: {
339
339
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
340
340
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
341
- apply: (e, t) => N(w(e, t), t)
341
+ apply: (e, t) => Z(v(e, t), t)
342
342
  },
343
343
  mapToWidget: (e) => ({
344
344
  uid: e.uid ?? "",
@@ -348,17 +348,17 @@ y({
348
348
  ...e.label != null ? { label: e.label } : {},
349
349
  ...e.disabled != null ? { disabled: e.disabled } : {},
350
350
  ...e.readonly != null ? { readonly: e.readonly } : {},
351
- ...e.validator != null ? { validator: T(e.validator, "string") } : {},
352
- props: _(e)
351
+ ...e.validator != null ? { validator: w(e.validator, "string") } : {},
352
+ props: y(e)
353
353
  })
354
354
  });
355
- y({
355
+ h({
356
356
  itemType: "LIST",
357
357
  entryShape: "keyed",
358
358
  sensibleDefaults: {
359
359
  base: { suppressAutomaticLabels: !1 },
360
360
  fields: ["suppressAutomaticLabels"],
361
- apply: (e, t) => w(e, t)
361
+ apply: (e, t) => v(e, t)
362
362
  },
363
363
  mapToWidget: (e) => ({
364
364
  uid: e.uid ?? "",
@@ -369,16 +369,16 @@ y({
369
369
  ...e.disabled != null ? { disabled: e.disabled } : {},
370
370
  ...e.readonly != null ? { readonly: e.readonly } : {},
371
371
  ...e.validator != null ? { validator: e.validator } : {},
372
- props: _(e)
372
+ props: y(e)
373
373
  })
374
374
  });
375
- y({
375
+ h({
376
376
  itemType: "CALENDAR",
377
377
  entryShape: "bare",
378
378
  sensibleDefaults: {
379
379
  base: { suppressAutomaticLabels: !1 },
380
380
  fields: ["suppressAutomaticLabels"],
381
- apply: (e, t) => w(e, t)
381
+ apply: (e, t) => v(e, t)
382
382
  },
383
383
  mapToWidget: (e) => ({
384
384
  uid: e.uid ?? "",
@@ -388,17 +388,17 @@ y({
388
388
  ...e.label != null ? { label: e.label } : {},
389
389
  ...e.disabled != null ? { disabled: e.disabled } : {},
390
390
  ...e.readonly != null ? { readonly: e.readonly } : {},
391
- ...e.validator != null ? { validator: T(e.validator, "string") } : {},
392
- props: _(e)
391
+ ...e.validator != null ? { validator: w(e.validator, "string") } : {},
392
+ props: y(e)
393
393
  })
394
394
  });
395
- y({
395
+ h({
396
396
  itemType: "DATE_INPUT",
397
397
  entryShape: "keyed",
398
398
  sensibleDefaults: {
399
399
  base: { suppressAutomaticLabels: !1 },
400
400
  fields: ["suppressAutomaticLabels"],
401
- apply: (e, t) => w(e, t)
401
+ apply: (e, t) => v(e, t)
402
402
  },
403
403
  mapToWidget: (e) => ({
404
404
  uid: e.uid ?? "",
@@ -408,11 +408,11 @@ y({
408
408
  ...e.label != null ? { label: e.label } : {},
409
409
  ...e.disabled != null ? { disabled: e.disabled } : {},
410
410
  ...e.readonly != null ? { readonly: e.readonly } : {},
411
- ...e.validator != null ? { validator: T(e.validator, "string") } : {},
412
- props: _(e)
411
+ ...e.validator != null ? { validator: w(e.validator, "string") } : {},
412
+ props: y(e)
413
413
  })
414
414
  });
415
- y({
415
+ h({
416
416
  itemType: "DATE_PICKER",
417
417
  entryShape: "keyed",
418
418
  sensibleDefaults: {
@@ -421,7 +421,7 @@ y({
421
421
  suppressAutomaticPlaceholders: !1
422
422
  },
423
423
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
424
- apply: (e, t) => N(w(e, t), t)
424
+ apply: (e, t) => Z(v(e, t), t)
425
425
  },
426
426
  mapToWidget: (e) => ({
427
427
  uid: e.uid ?? "",
@@ -431,17 +431,17 @@ y({
431
431
  ...e.label != null ? { label: e.label } : {},
432
432
  ...e.disabled != null ? { disabled: e.disabled } : {},
433
433
  ...e.readonly != null ? { readonly: e.readonly } : {},
434
- ...e.validator != null ? { validator: T(e.validator, "string") } : {},
435
- props: _(e)
434
+ ...e.validator != null ? { validator: w(e.validator, "string") } : {},
435
+ props: y(e)
436
436
  })
437
437
  });
438
- y({
438
+ h({
439
439
  itemType: "RANGE_CALENDAR",
440
440
  entryShape: "keyed",
441
441
  sensibleDefaults: {
442
442
  base: { suppressAutomaticLabels: !1 },
443
443
  fields: ["suppressAutomaticLabels"],
444
- apply: (e, t) => w(e, t)
444
+ apply: (e, t) => v(e, t)
445
445
  },
446
446
  mapToWidget: (e) => ({
447
447
  uid: e.uid ?? "",
@@ -451,17 +451,17 @@ y({
451
451
  ...e.label != null ? { label: e.label } : {},
452
452
  ...e.disabled != null ? { disabled: e.disabled } : {},
453
453
  ...e.readonly != null ? { readonly: e.readonly } : {},
454
- ...e.validator != null ? { validator: T(e.validator, "array") } : {},
455
- props: _(e)
454
+ ...e.validator != null ? { validator: w(e.validator, "array") } : {},
455
+ props: y(e)
456
456
  })
457
457
  });
458
- y({
458
+ h({
459
459
  itemType: "RANGE_DATE_INPUT",
460
460
  entryShape: "keyed",
461
461
  sensibleDefaults: {
462
462
  base: { suppressAutomaticLabels: !1 },
463
463
  fields: ["suppressAutomaticLabels"],
464
- apply: (e, t) => w(e, t)
464
+ apply: (e, t) => v(e, t)
465
465
  },
466
466
  mapToWidget: (e) => ({
467
467
  uid: e.uid ?? "",
@@ -471,11 +471,11 @@ y({
471
471
  ...e.label != null ? { label: e.label } : {},
472
472
  ...e.disabled != null ? { disabled: e.disabled } : {},
473
473
  ...e.readonly != null ? { readonly: e.readonly } : {},
474
- ...e.validator != null ? { validator: T(e.validator, "array") } : {},
475
- props: _(e)
474
+ ...e.validator != null ? { validator: w(e.validator, "array") } : {},
475
+ props: y(e)
476
476
  })
477
477
  });
478
- y({
478
+ h({
479
479
  itemType: "RANGE_DATE_PICKER",
480
480
  entryShape: "keyed",
481
481
  sensibleDefaults: {
@@ -484,7 +484,7 @@ y({
484
484
  suppressAutomaticPlaceholders: !1
485
485
  },
486
486
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
487
- apply: (e, t) => N(w(e, t), t)
487
+ apply: (e, t) => Z(v(e, t), t)
488
488
  },
489
489
  mapToWidget: (e) => ({
490
490
  uid: e.uid ?? "",
@@ -494,15 +494,15 @@ y({
494
494
  ...e.label != null ? { label: e.label } : {},
495
495
  ...e.disabled != null ? { disabled: e.disabled } : {},
496
496
  ...e.readonly != null ? { readonly: e.readonly } : {},
497
- ...e.validator != null ? { validator: T(e.validator, "array") } : {},
498
- props: _(e)
497
+ ...e.validator != null ? { validator: w(e.validator, "array") } : {},
498
+ props: y(e)
499
499
  })
500
500
  });
501
- function xt(e) {
501
+ function Dt(e) {
502
502
  const t = {};
503
503
  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;
504
504
  }
505
- function Ut(e) {
505
+ function Mt(e) {
506
506
  return {
507
507
  uid: e.uid ?? "",
508
508
  kind: "input",
@@ -511,25 +511,25 @@ function Ut(e) {
511
511
  ...e.label != null ? { label: e.label } : {},
512
512
  ...e.disabled != null ? { disabled: e.disabled } : {},
513
513
  ...e.readonly != null ? { readonly: e.readonly } : {},
514
- ...e.validator != null ? { validator: T(e.validator, "array") } : {},
514
+ ...e.validator != null ? { validator: w(e.validator, "array") } : {},
515
515
  props: {
516
- ...xt(e),
516
+ ...Dt(e),
517
517
  template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
518
518
  }
519
519
  };
520
520
  }
521
- function le(e, t) {
521
+ function ae(e, t) {
522
522
  for (const n of e) {
523
523
  if (typeof n == "function") continue;
524
524
  const r = n;
525
- typeof r.path == "string" && r.path && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && le(r.children, t);
525
+ typeof r.path == "string" && r.path && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && ae(r.children, t);
526
526
  const o = r.props;
527
- o?.template?.children && Array.isArray(o.template.children) && le(o.template.children, t);
527
+ o?.template?.children && Array.isArray(o.template.children) && ae(o.template.children, t);
528
528
  }
529
529
  }
530
- function Vt(e, t) {
530
+ function Nt(e, t) {
531
531
  const n = t.walkChildren(t.children ?? []), r = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
532
- r && le(n, r + ".items.");
532
+ r && ae(n, r + ".items.");
533
533
  const o = {
534
534
  kind: "layout",
535
535
  type: "flex",
@@ -553,32 +553,32 @@ function Vt(e, t) {
553
553
  };
554
554
  });
555
555
  }
556
- function Jt(e) {
556
+ function xt(e) {
557
557
  return {
558
558
  baseDef: e.def,
559
559
  path: e.key,
560
560
  children: e.children
561
561
  };
562
562
  }
563
- function Bt(e) {
563
+ function Rt(e) {
564
564
  return e.children;
565
565
  }
566
- const Yt = {
567
- parseEntry: Jt,
566
+ const Ft = {
567
+ parseEntry: xt,
568
568
  rollUpSensibleDefaults: () => ({}),
569
569
  applySensibleDefaults: (e) => e,
570
- mapToWidget: Ut,
571
- buildCustomWidget: Vt,
572
- getChildren: Bt
570
+ mapToWidget: Mt,
571
+ buildCustomWidget: Nt,
572
+ getChildren: Rt
573
573
  };
574
- Qe("REPEATER", Yt);
575
- const tt = {
574
+ qe("REPEATER", Ft);
575
+ const He = {
576
576
  onLoad: "load",
577
577
  onChange: "change",
578
578
  onFilter: "filter",
579
579
  onBlur: "blur"
580
- }, Gt = Object.keys(tt);
581
- class Kt {
580
+ }, Wt = Object.keys(He);
581
+ class Ut {
582
582
  // ── Action-specific: onClick ───────────────────────────────────
583
583
  extractOnClickFromMergeResult(t, n, r) {
584
584
  if (t.kind === "dynamic") {
@@ -614,10 +614,10 @@ class Kt {
614
614
  const o = { ...t.on || {} };
615
615
  let s = !1;
616
616
  const i = { ...t };
617
- for (const a of Gt) {
617
+ for (const a of Wt) {
618
618
  const u = t[a];
619
619
  if (u == null) continue;
620
- const c = tt[a];
620
+ const c = He[a];
621
621
  if (typeof u == "function") {
622
622
  const p = r.next();
623
623
  n.set(p, u), o[c] = p, s = !0;
@@ -627,8 +627,8 @@ class Kt {
627
627
  return s && (i.on = o), i;
628
628
  }
629
629
  }
630
- const ye = new Kt();
631
- function qt(e) {
630
+ const me = new Ut();
631
+ function jt(e) {
632
632
  const {
633
633
  uid: t,
634
634
  label: n,
@@ -640,9 +640,9 @@ function qt(e) {
640
640
  type: u,
641
641
  tags: c,
642
642
  size: p,
643
- include: d,
644
- exclude: m,
645
- states: h,
643
+ include: m,
644
+ exclude: f,
645
+ states: z,
646
646
  ...P
647
647
  } = e;
648
648
  return {
@@ -656,17 +656,17 @@ function qt(e) {
656
656
  props: P
657
657
  };
658
658
  }
659
- y({
659
+ h({
660
660
  itemType: "ACTIONS",
661
661
  entryShape: "bare",
662
- mapToWidget: qt,
663
- afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
662
+ mapToWidget: jt,
663
+ afterMerge: (e, t) => me.extractOnClickFromMergeResult(
664
664
  e,
665
665
  t.eventRegistry,
666
666
  t.eventIdGenerator
667
667
  )
668
668
  });
669
- function Xt(e) {
669
+ function Vt(e) {
670
670
  const {
671
671
  uid: t,
672
672
  widgetName: n,
@@ -688,7 +688,7 @@ function Xt(e) {
688
688
  children: []
689
689
  };
690
690
  }
691
- function Ht(e, t) {
691
+ function Bt(e, t) {
692
692
  const n = t.walkChildren(t.children ?? []);
693
693
  if (e.kind === "static")
694
694
  return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: n };
@@ -698,17 +698,17 @@ function Ht(e, t) {
698
698
  return { ...t.mapStaticDef(s, "LAYOUTS"), children: n };
699
699
  });
700
700
  }
701
- function Qt(e) {
701
+ function Yt(e) {
702
702
  return e.children;
703
703
  }
704
- y({
704
+ h({
705
705
  itemType: "LAYOUTS",
706
706
  entryShape: "compound",
707
- mapToWidget: Xt,
708
- buildCustomWidget: Ht,
709
- getChildren: Qt
707
+ mapToWidget: Vt,
708
+ buildCustomWidget: Bt,
709
+ getChildren: Yt
710
710
  });
711
- function en(e) {
711
+ function Gt(e) {
712
712
  return {
713
713
  uid: "",
714
714
  kind: "display",
@@ -716,7 +716,7 @@ function en(e) {
716
716
  props: { render: e.render }
717
717
  };
718
718
  }
719
- function tn(e, t) {
719
+ function Kt(e, t) {
720
720
  if (e.kind === "static") {
721
721
  const r = e.def;
722
722
  return ((o) => ({
@@ -741,13 +741,13 @@ function tn(e, t) {
741
741
  };
742
742
  });
743
743
  }
744
- y({
744
+ h({
745
745
  itemType: "DISPLAYS",
746
746
  entryShape: "bare",
747
- mapToWidget: en,
748
- buildCustomWidget: tn
747
+ mapToWidget: Gt,
748
+ buildCustomWidget: Kt
749
749
  });
750
- y({
750
+ h({
751
751
  itemType: "ALERTS",
752
752
  entryShape: "bare",
753
753
  mapToWidget: (e) => ({
@@ -760,7 +760,7 @@ y({
760
760
  }
761
761
  })
762
762
  });
763
- y({
763
+ h({
764
764
  itemType: "MARKDOWN_TEXTS",
765
765
  entryShape: "bare",
766
766
  mapToWidget: (e) => ({
@@ -772,7 +772,7 @@ y({
772
772
  }
773
773
  })
774
774
  });
775
- function nn(e) {
775
+ function qt(e) {
776
776
  return {
777
777
  uid: e.uid ?? "",
778
778
  kind: "layout",
@@ -785,7 +785,7 @@ function nn(e) {
785
785
  children: []
786
786
  };
787
787
  }
788
- function rn(e, t) {
788
+ function Xt(e, t) {
789
789
  const n = t.walkChildren(t.children ?? []);
790
790
  if (e.kind === "static")
791
791
  return { ...t.mapStaticDef(e.def, "TABS"), children: n };
@@ -795,17 +795,17 @@ function rn(e, t) {
795
795
  return { ...t.mapStaticDef(s, "TABS"), children: n };
796
796
  });
797
797
  }
798
- function on(e) {
798
+ function Ht(e) {
799
799
  return e.children;
800
800
  }
801
- y({
801
+ h({
802
802
  itemType: "TABS",
803
803
  entryShape: "compound",
804
- mapToWidget: nn,
805
- buildCustomWidget: rn,
806
- getChildren: on
804
+ mapToWidget: qt,
805
+ buildCustomWidget: Xt,
806
+ getChildren: Ht
807
807
  });
808
- function sn(e) {
808
+ function Jt(e) {
809
809
  return {
810
810
  uid: e.uid ?? "",
811
811
  kind: "layout",
@@ -819,7 +819,7 @@ function sn(e) {
819
819
  children: []
820
820
  };
821
821
  }
822
- function an(e, t) {
822
+ function Qt(e, t) {
823
823
  const n = t.walkChildren(t.children ?? []);
824
824
  if (e.kind === "static")
825
825
  return { ...t.mapStaticDef(e.def, "ACCORDION"), children: n };
@@ -829,17 +829,17 @@ function an(e, t) {
829
829
  return { ...t.mapStaticDef(s, "ACCORDION"), children: n };
830
830
  });
831
831
  }
832
- function un(e) {
832
+ function en(e) {
833
833
  return e.children;
834
834
  }
835
- y({
835
+ h({
836
836
  itemType: "ACCORDION",
837
837
  entryShape: "compound",
838
- mapToWidget: sn,
839
- buildCustomWidget: an,
840
- getChildren: un
838
+ mapToWidget: Jt,
839
+ buildCustomWidget: Qt,
840
+ getChildren: en
841
841
  });
842
- y({
842
+ h({
843
843
  itemType: "CUSTOM_INPUT",
844
844
  entryShape: "keyed",
845
845
  sensibleDefaults: {
@@ -847,7 +847,7 @@ y({
847
847
  suppressAutomaticLabels: !1
848
848
  },
849
849
  fields: ["suppressAutomaticLabels"],
850
- apply: (e, t) => w(e, t)
850
+ apply: (e, t) => v(e, t)
851
851
  },
852
852
  mapToWidget: (e) => ({
853
853
  uid: e.uid ?? "",
@@ -862,7 +862,7 @@ y({
862
862
  props: e.props ?? {}
863
863
  })
864
864
  });
865
- y({
865
+ h({
866
866
  itemType: "CUSTOM_ACTION",
867
867
  entryShape: "bare",
868
868
  mapToWidget: (e) => {
@@ -877,9 +877,9 @@ y({
877
877
  tags: u,
878
878
  size: c,
879
879
  include: p,
880
- exclude: d,
881
- states: m,
882
- props: h,
880
+ exclude: m,
881
+ states: f,
882
+ props: z,
883
883
  ...P
884
884
  } = e;
885
885
  return {
@@ -889,16 +889,16 @@ y({
889
889
  label: n,
890
890
  disabled: r,
891
891
  ...o != null ? { on: o } : {},
892
- props: { ...h, ...P }
892
+ props: { ...z, ...P }
893
893
  };
894
894
  },
895
- afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
895
+ afterMerge: (e, t) => me.extractOnClickFromMergeResult(
896
896
  e,
897
897
  t.eventRegistry,
898
898
  t.eventIdGenerator
899
899
  )
900
900
  });
901
- y({
901
+ h({
902
902
  itemType: "CUSTOM_DISPLAY",
903
903
  entryShape: "bare",
904
904
  mapToWidget: (e) => ({
@@ -908,7 +908,7 @@ y({
908
908
  props: e.props ?? {}
909
909
  })
910
910
  });
911
- function cn(e) {
911
+ function tn(e) {
912
912
  return {
913
913
  uid: e.uid ?? "",
914
914
  kind: "layout",
@@ -917,7 +917,7 @@ function cn(e) {
917
917
  children: []
918
918
  };
919
919
  }
920
- function ln(e, t) {
920
+ function nn(e, t) {
921
921
  const n = t.walkChildren(t.children ?? []);
922
922
  if (e.kind === "static")
923
923
  return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: n };
@@ -927,23 +927,23 @@ function ln(e, t) {
927
927
  return { ...t.mapStaticDef(s, "CUSTOM_LAYOUT"), children: n };
928
928
  });
929
929
  }
930
- function pn(e) {
930
+ function rn(e) {
931
931
  return e.children;
932
932
  }
933
- y({
933
+ h({
934
934
  itemType: "CUSTOM_LAYOUT",
935
935
  entryShape: "compound",
936
- mapToWidget: cn,
937
- buildCustomWidget: ln,
938
- getChildren: pn
936
+ mapToWidget: tn,
937
+ buildCustomWidget: nn,
938
+ getChildren: rn
939
939
  });
940
- y({
940
+ h({
941
941
  itemType: "TAGS",
942
942
  entryShape: "keyed",
943
943
  sensibleDefaults: {
944
944
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
945
945
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
946
- apply: (e, t) => N(w(e, t), t)
946
+ apply: (e, t) => Z(v(e, t), t)
947
947
  },
948
948
  mapToWidget: (e) => ({
949
949
  uid: e.uid ?? "",
@@ -953,11 +953,11 @@ y({
953
953
  ...e.label != null ? { label: e.label } : {},
954
954
  ...e.disabled != null ? { disabled: e.disabled } : {},
955
955
  ...e.readonly != null ? { readonly: e.readonly } : {},
956
- ...e.validator != null ? { validator: T(e.validator, "array") } : {},
957
- props: _(e)
956
+ ...e.validator != null ? { validator: w(e.validator, "array") } : {},
957
+ props: y(e)
958
958
  })
959
959
  });
960
- const nt = {
960
+ const Je = {
961
961
  INPUTS: /* @__PURE__ */ new Set([
962
962
  "INPUTS",
963
963
  "TEXTAREA",
@@ -983,11 +983,11 @@ const nt = {
983
983
  DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
984
984
  LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
985
985
  };
986
- function dn(e, t) {
987
- const n = nt[e];
986
+ function on(e, t) {
987
+ const n = Je[e];
988
988
  return n ? n.has(t) : e === t;
989
989
  }
990
- class mn {
990
+ class sn {
991
991
  resolve(t, n) {
992
992
  const r = [];
993
993
  for (const s of n)
@@ -1004,7 +1004,7 @@ class mn {
1004
1004
  this.collectFromLeaf(o, n, r);
1005
1005
  }
1006
1006
  collectFromLeaf(t, n, r) {
1007
- dn(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1007
+ on(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1008
1008
  }
1009
1009
  rollUpSensibleDefaults(t) {
1010
1010
  const n = /* @__PURE__ */ new Map(), r = (s, i) => {
@@ -1012,7 +1012,7 @@ class mn {
1012
1012
  a.push(i), n.set(s, a);
1013
1013
  };
1014
1014
  for (const s of t) {
1015
- const i = nt[s.selectorType];
1015
+ const i = Je[s.selectorType];
1016
1016
  if (i)
1017
1017
  for (const a of i) r(a, s);
1018
1018
  else
@@ -1020,12 +1020,12 @@ class mn {
1020
1020
  }
1021
1021
  const o = {};
1022
1022
  for (const [s, i] of n)
1023
- et(s) && (o[s] = H(s).rollUpSensibleDefaults(i));
1023
+ Xe(s) && (o[s] = q(s).rollUpSensibleDefaults(i));
1024
1024
  return o;
1025
1025
  }
1026
1026
  }
1027
- const fn = new mn();
1028
- class hn {
1027
+ const an = new sn();
1028
+ class un {
1029
1029
  /**
1030
1030
  * Deep merges two objects, with right taking precedence over left when properties conflict.
1031
1031
  * Arrays are replaced, not merged.
@@ -1044,8 +1044,8 @@ class hn {
1044
1044
  return r;
1045
1045
  }
1046
1046
  }
1047
- const yn = new hn();
1048
- class gn {
1047
+ const cn = new un();
1048
+ class ln {
1049
1049
  constructor(t) {
1050
1050
  this.objectUtils = t;
1051
1051
  }
@@ -1096,9 +1096,9 @@ class gn {
1096
1096
  }
1097
1097
  // ── Apply sensible defaults via registry ──
1098
1098
  applySensibleDefaults(t, n, r) {
1099
- if (!et(n)) return t;
1099
+ if (!Xe(n)) return t;
1100
1100
  const o = r.sensibleDefaults[n] ?? {};
1101
- return H(n).applySensibleDefaults(t, o);
1101
+ return q(n).applySensibleDefaults(t, o);
1102
1102
  }
1103
1103
  // ── Create promoted FunctionWidget ──
1104
1104
  createPromotedFunction(t, n, r, o, s) {
@@ -1126,8 +1126,8 @@ class gn {
1126
1126
  };
1127
1127
  }
1128
1128
  }
1129
- const bn = new gn(yn);
1130
- class _n {
1129
+ const pn = new ln(cn);
1130
+ class dn {
1131
1131
  mapToWidget(t, n) {
1132
1132
  if (t.kind === "dynamic") {
1133
1133
  const r = t.fn;
@@ -1139,7 +1139,7 @@ class _n {
1139
1139
  return this.mapStaticDef(t.def, n);
1140
1140
  }
1141
1141
  mapStaticDef(t, n) {
1142
- const r = H(n).mapToWidget(t);
1142
+ const r = q(n).mapToWidget(t);
1143
1143
  return this.applyBaseWidgetFields(r, t);
1144
1144
  }
1145
1145
  /**
@@ -1150,8 +1150,8 @@ class _n {
1150
1150
  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;
1151
1151
  }
1152
1152
  }
1153
- const vn = new _n();
1154
- class wn {
1153
+ const mn = new dn();
1154
+ class hn {
1155
1155
  /**
1156
1156
  * Ensures the output is always a uniform GslSelector[] of aggregated selectors.
1157
1157
  *
@@ -1176,18 +1176,18 @@ class wn {
1176
1176
  };
1177
1177
  }
1178
1178
  }
1179
- const Sn = new wn(), kn = {
1179
+ const fn = new hn(), bn = {
1180
1180
  input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
1181
1181
  action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
1182
1182
  layout: /* @__PURE__ */ new Set(["size"]),
1183
1183
  display: /* @__PURE__ */ new Set([])
1184
- }, Ae = {
1184
+ }, we = {
1185
1185
  onChange: "change",
1186
1186
  onLoad: "load",
1187
1187
  onFilter: "filter",
1188
1188
  onClick: "click"
1189
1189
  };
1190
- class Tn {
1190
+ class gn {
1191
1191
  /**
1192
1192
  * Extracts `states` from a merge result, combining with state-targeted
1193
1193
  * GSL leaf selectors from `_gslStates`.
@@ -1207,8 +1207,8 @@ class Tn {
1207
1207
  const a = t.fn;
1208
1208
  return {
1209
1209
  cleanedResult: { kind: "dynamic", fn: (c) => {
1210
- const p = a(c), { states: d, ...m } = p;
1211
- return m;
1210
+ const p = a(c), { states: m, ...f } = p;
1211
+ return f;
1212
1212
  } },
1213
1213
  stateData: { stateOverrides: r }
1214
1214
  };
@@ -1237,11 +1237,11 @@ class Tn {
1237
1237
  const { stateOverrides: s } = n;
1238
1238
  if (Object.keys(s).length === 0)
1239
1239
  return t;
1240
- const i = { ...t }, a = t.kind, u = kn[a] || /* @__PURE__ */ new Set();
1240
+ const i = { ...t }, a = t.kind, u = bn[a] || /* @__PURE__ */ new Set();
1241
1241
  t.props && (i.props = { ...t.props }), t.on && (i.on = { ...t.on });
1242
1242
  for (const [c, p] of Object.entries(s))
1243
- for (const [d, m] of Object.entries(p))
1244
- d === "visible" ? this.applyVisibility(i, c, m) : Ae[d] ? this.applyStateEvent(i, c, d, m, r, o) : u.has(d) ? i[`${d}.${c}`] = m : (i.props || (i.props = {}), i.props[`${d}.${c}`] = m);
1243
+ for (const [m, f] of Object.entries(p))
1244
+ m === "visible" ? this.applyVisibility(i, c, f) : we[m] ? this.applyStateEvent(i, c, m, f, r, o) : u.has(m) ? i[`${m}.${c}`] = f : (i.props || (i.props = {}), i.props[`${m}.${c}`] = f);
1245
1245
  return i;
1246
1246
  }
1247
1247
  hasStateData(t) {
@@ -1259,24 +1259,24 @@ class Tn {
1259
1259
  }
1260
1260
  // ── State-suffixed event helpers ──
1261
1261
  applyStateEvent(t, n, r, o, s, i) {
1262
- const a = Ae[r];
1262
+ const a = we[r];
1263
1263
  if (t.on || (t.on = {}), typeof o == "function") {
1264
1264
  const u = i.next();
1265
1265
  s.set(u, o), t.on[`${a}.${n}`] = u;
1266
1266
  } else typeof o == "string" && (t.on[`${a}.${n}`] = o);
1267
1267
  }
1268
1268
  }
1269
- const zn = new Tn();
1270
- function An() {
1269
+ const yn = new gn();
1270
+ function _n() {
1271
1271
  let e = 0;
1272
1272
  return { next: () => `event_${e++}` };
1273
1273
  }
1274
- class On {
1274
+ class vn {
1275
1275
  constructor(t, n, r, o, s) {
1276
1276
  this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = s;
1277
1277
  }
1278
1278
  walkAndMap(t, n, r) {
1279
- const o = /* @__PURE__ */ new Map(), s = An(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1279
+ const o = /* @__PURE__ */ new Map(), s = _n(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1280
1280
  return { widgets: this.walkItems(
1281
1281
  t,
1282
1282
  n,
@@ -1305,28 +1305,28 @@ class On {
1305
1305
  });
1306
1306
  }
1307
1307
  processItem(t, n, r, o, s, i, a, u, c) {
1308
- const p = n, d = H(n), m = d.parseEntry(t), h = this.buildBaseDef(m), P = this.buildDecoratorForMatching(h, p, r), k = this.resolver.resolve(P, o), ke = k.leafSelectors.filter((z) => z.targetState != null), Te = {
1309
- leafSelectors: k.leafSelectors.filter((z) => z.targetState == null),
1310
- sensibleDefaults: k.sensibleDefaults
1308
+ const p = n, m = q(n), f = m.parseEntry(t), z = this.buildBaseDef(f), P = this.buildDecoratorForMatching(z, p, r), V = this.resolver.resolve(P, o), _e = V.leafSelectors.filter((T) => T.targetState != null), ve = {
1309
+ leafSelectors: V.leafSelectors.filter((T) => T.targetState == null),
1310
+ sensibleDefaults: V.sensibleDefaults
1311
1311
  };
1312
- let L = this.merger.merge(h, p, Te);
1313
- d.afterMerge && (L = d.afterMerge(L, {
1312
+ let C = this.merger.merge(z, p, ve);
1313
+ m.afterMerge && (C = m.afterMerge(C, {
1314
1314
  eventRegistry: s,
1315
1315
  formConfig: i,
1316
1316
  eventIdGenerator: a
1317
- })), L = this.eventWiring.wireInputLayoutEvents(
1318
- L,
1317
+ })), C = this.eventWiring.wireInputLayoutEvents(
1318
+ C,
1319
1319
  s,
1320
1320
  a
1321
1321
  );
1322
- const { cleanedResult: ze, stateData: ue } = this.stateExpansion.extractFromMergeResult(
1323
- L,
1324
- ke
1322
+ const { cleanedResult: ke, stateData: se } = this.stateExpansion.extractFromMergeResult(
1323
+ C,
1324
+ _e
1325
1325
  );
1326
- let C;
1327
- if (d.buildCustomWidget) {
1328
- const z = this.buildCustomWidgetContext(
1329
- m.children,
1326
+ let O;
1327
+ if (m.buildCustomWidget) {
1328
+ const T = this.buildCustomWidgetContext(
1329
+ f.children,
1330
1330
  o,
1331
1331
  s,
1332
1332
  i,
@@ -1334,33 +1334,33 @@ class On {
1334
1334
  u,
1335
1335
  c
1336
1336
  );
1337
- C = this.buildCustomWidget(d, ze, z);
1337
+ O = this.buildCustomWidget(m, ke, T);
1338
1338
  } else
1339
- C = this.mapper.mapToWidget(ze, p);
1340
- if (typeof C != "function") {
1341
- const z = C;
1342
- z.uid || (z.path && !c.has(z.path) ? (z.uid = z.path, c.add(z.path)) : z.uid = `dx_${u.value++}`);
1343
- }
1344
- if (this.stateExpansion.hasStateData(ue))
1345
- if (typeof C == "function") {
1346
- const z = C;
1347
- C = ((Et) => {
1348
- const $t = z(Et);
1339
+ O = this.mapper.mapToWidget(ke, p);
1340
+ if (typeof O != "function") {
1341
+ const T = O;
1342
+ T.uid || (T.path && !c.has(T.path) ? (T.uid = T.path, c.add(T.path)) : T.uid = `dx_${u.value++}`);
1343
+ }
1344
+ if (this.stateExpansion.hasStateData(se))
1345
+ if (typeof O == "function") {
1346
+ const T = O;
1347
+ O = ((kt) => {
1348
+ const wt = T(kt);
1349
1349
  return this.stateExpansion.applyToWidget(
1350
- $t,
1351
- ue,
1350
+ wt,
1351
+ se,
1352
1352
  s,
1353
1353
  a
1354
1354
  );
1355
1355
  });
1356
1356
  } else
1357
- C = this.stateExpansion.applyToWidget(
1358
- C,
1359
- ue,
1357
+ O = this.stateExpansion.applyToWidget(
1358
+ O,
1359
+ se,
1360
1360
  s,
1361
1361
  a
1362
1362
  );
1363
- return C;
1363
+ return O;
1364
1364
  }
1365
1365
  buildCustomWidgetContext(t, n, r, o, s, i, a) {
1366
1366
  return {
@@ -1398,7 +1398,7 @@ class On {
1398
1398
  return { itemType: n, tags: o, uid: s, type: i };
1399
1399
  }
1400
1400
  }
1401
- class En {
1401
+ class kn {
1402
1402
  constructor(t, n) {
1403
1403
  this.selectorNormalizer = t, this.walker = n;
1404
1404
  }
@@ -1426,7 +1426,7 @@ class En {
1426
1426
  */
1427
1427
  prepareForm(t, n, r) {
1428
1428
  const s = (Array.isArray(t) ? [...t] : [t]).map(
1429
- (u) => typeof u == "function" ? Mt(u) : u
1429
+ (u) => typeof u == "function" ? Ot(u) : u
1430
1430
  ), i = this.selectorNormalizer.normalizeSelectors(n), a = {
1431
1431
  ...this.selectorNormalizer.extractFormConfig(),
1432
1432
  ...r
@@ -1437,7 +1437,7 @@ class En {
1437
1437
  children: s
1438
1438
  };
1439
1439
  return {
1440
- defs: [{ type: "ITEMS", itemType: He.LAYOUTS, items: [u], tags: [] }],
1440
+ defs: [{ type: "ITEMS", itemType: Ke.LAYOUTS, items: [u], tags: [] }],
1441
1441
  gslSelectors: i,
1442
1442
  formConfig: a
1443
1443
  };
@@ -1465,11 +1465,11 @@ class En {
1465
1465
  if (i) {
1466
1466
  const a = (c) => {
1467
1467
  if (c && typeof c == "object" && "path" in c && !("type" in c)) {
1468
- const { path: p, ...d } = c;
1469
- for (const [m, h] of Object.entries(d))
1468
+ const { path: p, ...m } = c;
1469
+ for (const [f, z] of Object.entries(m))
1470
1470
  s.callback({
1471
1471
  type: "OVERRIDE_WIDGET_PROP",
1472
- payload: { path: p, prop: m, value: h }
1472
+ payload: { path: p, prop: f, value: z }
1473
1473
  });
1474
1474
  } else
1475
1475
  s.callback(c);
@@ -1483,37 +1483,37 @@ class En {
1483
1483
  }), r.dependencies && (o.dependencies = r.dependencies), r.widgetLoaders && (o.widgetLoaders = r.widgetLoaders), r.validateOn && (o.validateOn = r.validateOn), r.itemRenderers && (o.itemRenderers = r.itemRenderers), o;
1484
1484
  }
1485
1485
  }
1486
- const $n = new On(
1487
- fn,
1488
- bn,
1489
- vn,
1490
- ye,
1491
- zn
1492
- ), Pn = new En(Sn, $n);
1493
- function Zn(e) {
1494
- return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Oe) : Oe(e);
1486
+ const wn = new vn(
1487
+ an,
1488
+ pn,
1489
+ mn,
1490
+ me,
1491
+ yn
1492
+ ), Tn = new kn(fn, wn);
1493
+ function An(e) {
1494
+ return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Te) : Te(e);
1495
1495
  }
1496
- function Oe(e) {
1496
+ function Te(e) {
1497
1497
  if (typeof e == "function") return !0;
1498
1498
  if (e === null || typeof e != "object") return !1;
1499
1499
  const t = e;
1500
1500
  return t.type === "ITEMS" && typeof t.itemType == "string";
1501
1501
  }
1502
- const Ee = Object.freeze({}), In = Object.freeze({}), $e = /* @__PURE__ */ new WeakMap();
1503
- function ce(e, t) {
1502
+ const Ae = Object.freeze({}), Sn = Object.freeze({}), Se = /* @__PURE__ */ new WeakMap();
1503
+ function ie(e, t) {
1504
1504
  return e == null ? t : typeof e == "object" ? e : {};
1505
1505
  }
1506
- function Cn(e, t, n) {
1507
- if (!Zn(e))
1506
+ function zn(e, t, n) {
1507
+ if (!An(e))
1508
1508
  return { formDef: e };
1509
- const r = ce(e, Ee), o = ce(t, Ee), s = ce(n, In);
1510
- let i = $e.get(r);
1511
- i || (i = /* @__PURE__ */ new WeakMap(), $e.set(r, i));
1509
+ const r = ie(e, Ae), o = ie(t, Ae), s = ie(n, Sn);
1510
+ let i = Se.get(r);
1511
+ i || (i = /* @__PURE__ */ new WeakMap(), Se.set(r, i));
1512
1512
  let a = i.get(o);
1513
1513
  a || (a = /* @__PURE__ */ new WeakMap(), i.set(o, a));
1514
1514
  const u = a.get(s);
1515
1515
  if (u) return u;
1516
- const c = Pn.processDxFacade(
1516
+ const c = Tn.processDxFacade(
1517
1517
  e,
1518
1518
  t,
1519
1519
  n
@@ -1540,9 +1540,9 @@ function l(e, t, n) {
1540
1540
  return;
1541
1541
  a._zod.traits.add(e), t(a, u);
1542
1542
  const c = i.prototype, p = Object.keys(c);
1543
- for (let d = 0; d < p.length; d++) {
1544
- const m = p[d];
1545
- m in a || (a[m] = c[m].bind(a));
1543
+ for (let m = 0; m < p.length; m++) {
1544
+ const f = p[m];
1545
+ f in a || (a[f] = c[f].bind(a));
1546
1546
  }
1547
1547
  }
1548
1548
  const o = n?.Parent ?? Object;
@@ -1561,37 +1561,37 @@ function l(e, t, n) {
1561
1561
  value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
1562
1562
  }), Object.defineProperty(i, "name", { value: e }), i;
1563
1563
  }
1564
- class j extends Error {
1564
+ class N extends Error {
1565
1565
  constructor() {
1566
1566
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1567
1567
  }
1568
1568
  }
1569
- class rt extends Error {
1569
+ class Qe extends Error {
1570
1570
  constructor(t) {
1571
1571
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
1572
1572
  }
1573
1573
  }
1574
- const Nn = {};
1575
- function M(e) {
1576
- return Nn;
1574
+ const En = {};
1575
+ function I(e) {
1576
+ return En;
1577
1577
  }
1578
- function pe(e, t) {
1578
+ function ue(e, t) {
1579
1579
  return typeof t == "bigint" ? t.toString() : t;
1580
1580
  }
1581
- function ge(e) {
1581
+ function he(e) {
1582
1582
  return e == null;
1583
1583
  }
1584
- function be(e) {
1584
+ function fe(e) {
1585
1585
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
1586
1586
  return e.slice(t, n);
1587
1587
  }
1588
- const Pe = /* @__PURE__ */ Symbol("evaluating");
1589
- function g(e, t, n) {
1588
+ const ze = /* @__PURE__ */ Symbol("evaluating");
1589
+ function b(e, t, n) {
1590
1590
  let r;
1591
1591
  Object.defineProperty(e, t, {
1592
1592
  get() {
1593
- if (r !== Pe)
1594
- return r === void 0 && (r = Pe, r = n()), r;
1593
+ if (r !== ze)
1594
+ return r === void 0 && (r = ze, r = n()), r;
1595
1595
  },
1596
1596
  set(o) {
1597
1597
  Object.defineProperty(e, t, {
@@ -1602,7 +1602,7 @@ function g(e, t, n) {
1602
1602
  configurable: !0
1603
1603
  });
1604
1604
  }
1605
- function Ln(...e) {
1605
+ function $n(...e) {
1606
1606
  const t = {};
1607
1607
  for (const n of e) {
1608
1608
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1610,34 +1610,34 @@ function Ln(...e) {
1610
1610
  }
1611
1611
  return Object.defineProperties({}, t);
1612
1612
  }
1613
- function Mn(e) {
1613
+ function On(e) {
1614
1614
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1615
1615
  }
1616
- const ot = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1616
+ const et = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1617
1617
  };
1618
- function Ze(e) {
1618
+ function Ee(e) {
1619
1619
  return typeof e == "object" && e !== null && !Array.isArray(e);
1620
1620
  }
1621
- function de(e) {
1622
- if (Ze(e) === !1)
1621
+ function ce(e) {
1622
+ if (Ee(e) === !1)
1623
1623
  return !1;
1624
1624
  const t = e.constructor;
1625
1625
  if (t === void 0 || typeof t != "function")
1626
1626
  return !0;
1627
1627
  const n = t.prototype;
1628
- return !(Ze(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1628
+ return !(Ee(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1629
1629
  }
1630
- function st(e) {
1631
- return de(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
1630
+ function tt(e) {
1631
+ return ce(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
1632
1632
  }
1633
- function _e(e) {
1633
+ function be(e) {
1634
1634
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1635
1635
  }
1636
- function it(e, t, n) {
1636
+ function nt(e, t, n) {
1637
1637
  const r = new e._zod.constr(t ?? e._zod.def);
1638
1638
  return (!t || n?.parent) && (r._zod.parent = e), r;
1639
1639
  }
1640
- function f(e) {
1640
+ function d(e) {
1641
1641
  const t = e;
1642
1642
  if (!t)
1643
1643
  return {};
@@ -1650,14 +1650,14 @@ function f(e) {
1650
1650
  }
1651
1651
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
1652
1652
  }
1653
- const Dn = {
1653
+ const Zn = {
1654
1654
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
1655
1655
  int32: [-2147483648, 2147483647],
1656
1656
  uint32: [0, 4294967295],
1657
1657
  float32: [-34028234663852886e22, 34028234663852886e22],
1658
1658
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
1659
1659
  };
1660
- function F(e, t = 0) {
1660
+ function M(e, t = 0) {
1661
1661
  if (e.aborted === !0)
1662
1662
  return !0;
1663
1663
  for (let n = t; n < e.issues.length; n++)
@@ -1665,27 +1665,27 @@ function F(e, t = 0) {
1665
1665
  return !0;
1666
1666
  return !1;
1667
1667
  }
1668
- function Rn(e, t) {
1668
+ function Pn(e, t) {
1669
1669
  return t.map((n) => {
1670
1670
  var r;
1671
1671
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
1672
1672
  });
1673
1673
  }
1674
- function G(e) {
1674
+ function B(e) {
1675
1675
  return typeof e == "string" ? e : e?.message;
1676
1676
  }
1677
- function D(e, t, n) {
1677
+ function L(e, t, n) {
1678
1678
  const r = { ...e, path: e.path ?? [] };
1679
1679
  if (!e.message) {
1680
- const o = G(e.inst?._zod.def?.error?.(e)) ?? G(t?.error?.(e)) ?? G(n.customError?.(e)) ?? G(n.localeError?.(e)) ?? "Invalid input";
1680
+ const o = B(e.inst?._zod.def?.error?.(e)) ?? B(t?.error?.(e)) ?? B(n.customError?.(e)) ?? B(n.localeError?.(e)) ?? "Invalid input";
1681
1681
  r.message = o;
1682
1682
  }
1683
1683
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
1684
1684
  }
1685
- function ve(e) {
1685
+ function ge(e) {
1686
1686
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
1687
1687
  }
1688
- function J(...e) {
1688
+ function W(...e) {
1689
1689
  const [t, n, r] = e;
1690
1690
  return typeof t == "string" ? {
1691
1691
  message: t,
@@ -1694,25 +1694,25 @@ function J(...e) {
1694
1694
  inst: r
1695
1695
  } : { ...t };
1696
1696
  }
1697
- const at = (e, t) => {
1697
+ const rt = (e, t) => {
1698
1698
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
1699
1699
  value: e._zod,
1700
1700
  enumerable: !1
1701
1701
  }), Object.defineProperty(e, "issues", {
1702
1702
  value: t,
1703
1703
  enumerable: !1
1704
- }), e.message = JSON.stringify(t, pe, 2), Object.defineProperty(e, "toString", {
1704
+ }), e.message = JSON.stringify(t, ue, 2), Object.defineProperty(e, "toString", {
1705
1705
  value: () => e.message,
1706
1706
  enumerable: !1
1707
1707
  });
1708
- }, ut = l("$ZodError", at), Q = l("$ZodError", at, { Parent: Error });
1709
- function Fn(e, t = (n) => n.message) {
1708
+ }, ot = l("$ZodError", rt), X = l("$ZodError", rt, { Parent: Error });
1709
+ function Cn(e, t = (n) => n.message) {
1710
1710
  const n = {}, r = [];
1711
1711
  for (const o of e.issues)
1712
1712
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
1713
1713
  return { formErrors: r, fieldErrors: n };
1714
1714
  }
1715
- function jn(e, t = (n) => n.message) {
1715
+ function In(e, t = (n) => n.message) {
1716
1716
  const n = { _errors: [] }, r = (o) => {
1717
1717
  for (const s of o.issues)
1718
1718
  if (s.code === "invalid_union" && s.errors.length)
@@ -1733,77 +1733,77 @@ function jn(e, t = (n) => n.message) {
1733
1733
  };
1734
1734
  return r(e), n;
1735
1735
  }
1736
- const ee = (e) => (t, n, r, o) => {
1736
+ const H = (e) => (t, n, r, o) => {
1737
1737
  const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
1738
1738
  if (i instanceof Promise)
1739
- throw new j();
1739
+ throw new N();
1740
1740
  if (i.issues.length) {
1741
- const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, M())));
1742
- throw ot(a, o?.callee), a;
1741
+ const a = new (o?.Err ?? e)(i.issues.map((u) => L(u, s, I())));
1742
+ throw et(a, o?.callee), a;
1743
1743
  }
1744
1744
  return i.value;
1745
- }, Wn = /* @__PURE__ */ ee(Q), te = (e) => async (t, n, r, o) => {
1745
+ }, Ln = /* @__PURE__ */ H(X), J = (e) => async (t, n, r, o) => {
1746
1746
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1747
1747
  let i = t._zod.run({ value: n, issues: [] }, s);
1748
1748
  if (i instanceof Promise && (i = await i), i.issues.length) {
1749
- const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, M())));
1750
- throw ot(a, o?.callee), a;
1749
+ const a = new (o?.Err ?? e)(i.issues.map((u) => L(u, s, I())));
1750
+ throw et(a, o?.callee), a;
1751
1751
  }
1752
1752
  return i.value;
1753
- }, xn = /* @__PURE__ */ te(Q), ne = (e) => (t, n, r) => {
1753
+ }, Dn = /* @__PURE__ */ J(X), Q = (e) => (t, n, r) => {
1754
1754
  const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
1755
1755
  if (s instanceof Promise)
1756
- throw new j();
1756
+ throw new N();
1757
1757
  return s.issues.length ? {
1758
1758
  success: !1,
1759
- error: new (e ?? ut)(s.issues.map((i) => D(i, o, M())))
1759
+ error: new (e ?? ot)(s.issues.map((i) => L(i, o, I())))
1760
1760
  } : { success: !0, data: s.value };
1761
- }, ct = /* @__PURE__ */ ne(Q), re = (e) => async (t, n, r) => {
1761
+ }, st = /* @__PURE__ */ Q(X), ee = (e) => async (t, n, r) => {
1762
1762
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1763
1763
  let s = t._zod.run({ value: n, issues: [] }, o);
1764
1764
  return s instanceof Promise && (s = await s), s.issues.length ? {
1765
1765
  success: !1,
1766
- error: new e(s.issues.map((i) => D(i, o, M())))
1766
+ error: new e(s.issues.map((i) => L(i, o, I())))
1767
1767
  } : { success: !0, data: s.value };
1768
- }, lt = /* @__PURE__ */ re(Q), Un = (e) => (t, n, r) => {
1768
+ }, it = /* @__PURE__ */ ee(X), Mn = (e) => (t, n, r) => {
1769
1769
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1770
- return ee(e)(t, n, o);
1771
- }, Vn = (e) => (t, n, r) => ee(e)(t, n, r), Jn = (e) => async (t, n, r) => {
1770
+ return H(e)(t, n, o);
1771
+ }, Nn = (e) => (t, n, r) => H(e)(t, n, r), xn = (e) => async (t, n, r) => {
1772
1772
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1773
- return te(e)(t, n, o);
1774
- }, Bn = (e) => async (t, n, r) => te(e)(t, n, r), Yn = (e) => (t, n, r) => {
1773
+ return J(e)(t, n, o);
1774
+ }, Rn = (e) => async (t, n, r) => J(e)(t, n, r), Fn = (e) => (t, n, r) => {
1775
1775
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1776
- return ne(e)(t, n, o);
1777
- }, Gn = (e) => (t, n, r) => ne(e)(t, n, r), Kn = (e) => async (t, n, r) => {
1776
+ return Q(e)(t, n, o);
1777
+ }, Wn = (e) => (t, n, r) => Q(e)(t, n, r), Un = (e) => async (t, n, r) => {
1778
1778
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1779
- return re(e)(t, n, o);
1780
- }, qn = (e) => async (t, n, r) => re(e)(t, n, r), Xn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ie = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Hn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, 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])$/, er = /^(([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}|:))$/, tr = /^(?=.{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])?)*\.?$/, pt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", nr = /* @__PURE__ */ new RegExp(`^${pt}$`);
1781
- function dt(e) {
1779
+ return ee(e)(t, n, o);
1780
+ }, jn = (e) => async (t, n, r) => ee(e)(t, n, r), Vn = /^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)$/, Bn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Yn = /^(?:(?: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])$/, Gn = /^(([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}|:))$/, Kn = /^(?=.{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])?)*\.?$/, at = "(?:(?:\\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])))", qn = /* @__PURE__ */ new RegExp(`^${at}$`);
1781
+ function ut(e) {
1782
1782
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1783
1783
  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+)?)?`;
1784
1784
  }
1785
- function rr(e) {
1786
- return new RegExp(`^${dt(e)}$`);
1785
+ function Xn(e) {
1786
+ return new RegExp(`^${ut(e)}$`);
1787
1787
  }
1788
- function or(e) {
1789
- const t = dt({ precision: e.precision }), n = ["Z"];
1788
+ function Hn(e) {
1789
+ const t = ut({ precision: e.precision }), n = ["Z"];
1790
1790
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1791
1791
  const r = `${t}(?:${n.join("|")})`;
1792
- return new RegExp(`^${pt}T(?:${r})$`);
1792
+ return new RegExp(`^${at}T(?:${r})$`);
1793
1793
  }
1794
- const sr = (e) => {
1794
+ const Jn = (e) => {
1795
1795
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1796
1796
  return new RegExp(`^${t}$`);
1797
- }, ir = /^-?\d+$/, ar = /^-?\d+(?:\.\d+)?$/, ur = /^(?:true|false)$/i, cr = /^[^A-Z]*$/, lr = /^[^a-z]*$/, $ = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
1797
+ }, Qn = /^-?\d+$/, er = /^-?\d+(?:\.\d+)?/, tr = /^(?:true|false)$/i, nr = /^[^A-Z]*$/, rr = /^[^a-z]*$/, S = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
1798
1798
  var n;
1799
1799
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
1800
- }), mt = {
1800
+ }), ct = {
1801
1801
  number: "number",
1802
1802
  bigint: "bigint",
1803
1803
  object: "date"
1804
- }, pr = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
1805
- $.init(e, t);
1806
- const n = mt[typeof t.value];
1804
+ }, or = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
1805
+ S.init(e, t);
1806
+ const n = ct[typeof t.value];
1807
1807
  e._zod.onattach.push((r) => {
1808
1808
  const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1809
1809
  t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
@@ -1811,16 +1811,16 @@ const sr = (e) => {
1811
1811
  (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
1812
1812
  origin: n,
1813
1813
  code: "too_big",
1814
- maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
1814
+ maximum: t.value,
1815
1815
  input: r.value,
1816
1816
  inclusive: t.inclusive,
1817
1817
  inst: e,
1818
1818
  continue: !t.abort
1819
1819
  });
1820
1820
  };
1821
- }), dr = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
1822
- $.init(e, t);
1823
- const n = mt[typeof t.value];
1821
+ }), sr = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
1822
+ S.init(e, t);
1823
+ const n = ct[typeof t.value];
1824
1824
  e._zod.onattach.push((r) => {
1825
1825
  const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1826
1826
  t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
@@ -1828,19 +1828,19 @@ const sr = (e) => {
1828
1828
  (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
1829
1829
  origin: n,
1830
1830
  code: "too_small",
1831
- minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
1831
+ minimum: t.value,
1832
1832
  input: r.value,
1833
1833
  inclusive: t.inclusive,
1834
1834
  inst: e,
1835
1835
  continue: !t.abort
1836
1836
  });
1837
1837
  };
1838
- }), mr = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
1839
- $.init(e, t), t.format = t.format || "float64";
1840
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = Dn[t.format];
1838
+ }), ir = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
1839
+ S.init(e, t), t.format = t.format || "float64";
1840
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = Zn[t.format];
1841
1841
  e._zod.onattach.push((i) => {
1842
1842
  const a = i._zod.bag;
1843
- a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = ir);
1843
+ a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = Qn);
1844
1844
  }), e._zod.check = (i) => {
1845
1845
  const a = i.value;
1846
1846
  if (n) {
@@ -1863,7 +1863,6 @@ const sr = (e) => {
1863
1863
  note: "Integers must be within the safe integer range.",
1864
1864
  inst: e,
1865
1865
  origin: r,
1866
- inclusive: !0,
1867
1866
  continue: !t.abort
1868
1867
  }) : i.issues.push({
1869
1868
  input: a,
@@ -1872,7 +1871,6 @@ const sr = (e) => {
1872
1871
  note: "Integers must be within the safe integer range.",
1873
1872
  inst: e,
1874
1873
  origin: r,
1875
- inclusive: !0,
1876
1874
  continue: !t.abort
1877
1875
  });
1878
1876
  return;
@@ -1891,16 +1889,14 @@ const sr = (e) => {
1891
1889
  input: a,
1892
1890
  code: "too_big",
1893
1891
  maximum: s,
1894
- inclusive: !0,
1895
- inst: e,
1896
- continue: !t.abort
1892
+ inst: e
1897
1893
  });
1898
1894
  };
1899
- }), fr = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
1895
+ }), ar = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
1900
1896
  var n;
1901
- $.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1897
+ S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1902
1898
  const o = r.value;
1903
- return !ge(o) && o.length !== void 0;
1899
+ return !he(o) && o.length !== void 0;
1904
1900
  }), e._zod.onattach.push((r) => {
1905
1901
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1906
1902
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1908,7 +1904,7 @@ const sr = (e) => {
1908
1904
  const o = r.value;
1909
1905
  if (o.length <= t.maximum)
1910
1906
  return;
1911
- const i = ve(o);
1907
+ const i = ge(o);
1912
1908
  r.issues.push({
1913
1909
  origin: i,
1914
1910
  code: "too_big",
@@ -1919,11 +1915,11 @@ const sr = (e) => {
1919
1915
  continue: !t.abort
1920
1916
  });
1921
1917
  };
1922
- }), hr = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
1918
+ }), ur = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
1923
1919
  var n;
1924
- $.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1920
+ S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1925
1921
  const o = r.value;
1926
- return !ge(o) && o.length !== void 0;
1922
+ return !he(o) && o.length !== void 0;
1927
1923
  }), e._zod.onattach.push((r) => {
1928
1924
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1929
1925
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1931,7 +1927,7 @@ const sr = (e) => {
1931
1927
  const o = r.value;
1932
1928
  if (o.length >= t.minimum)
1933
1929
  return;
1934
- const i = ve(o);
1930
+ const i = ge(o);
1935
1931
  r.issues.push({
1936
1932
  origin: i,
1937
1933
  code: "too_small",
@@ -1942,11 +1938,11 @@ const sr = (e) => {
1942
1938
  continue: !t.abort
1943
1939
  });
1944
1940
  };
1945
- }), yr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
1941
+ }), cr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
1946
1942
  var n;
1947
- $.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1943
+ S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1948
1944
  const o = r.value;
1949
- return !ge(o) && o.length !== void 0;
1945
+ return !he(o) && o.length !== void 0;
1950
1946
  }), e._zod.onattach.push((r) => {
1951
1947
  const o = r._zod.bag;
1952
1948
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -1954,7 +1950,7 @@ const sr = (e) => {
1954
1950
  const o = r.value, s = o.length;
1955
1951
  if (s === t.length)
1956
1952
  return;
1957
- const i = ve(o), a = s > t.length;
1953
+ const i = ge(o), a = s > t.length;
1958
1954
  r.issues.push({
1959
1955
  origin: i,
1960
1956
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -1965,9 +1961,9 @@ const sr = (e) => {
1965
1961
  continue: !t.abort
1966
1962
  });
1967
1963
  };
1968
- }), oe = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
1964
+ }), te = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
1969
1965
  var n, r;
1970
- $.init(e, t), e._zod.onattach.push((o) => {
1966
+ S.init(e, t), e._zod.onattach.push((o) => {
1971
1967
  const s = o._zod.bag;
1972
1968
  s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
1973
1969
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
@@ -1982,8 +1978,8 @@ const sr = (e) => {
1982
1978
  });
1983
1979
  }) : (r = e._zod).check ?? (r.check = () => {
1984
1980
  });
1985
- }), gr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
1986
- oe.init(e, t), e._zod.check = (n) => {
1981
+ }), lr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
1982
+ te.init(e, t), e._zod.check = (n) => {
1987
1983
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1988
1984
  origin: "string",
1989
1985
  code: "invalid_format",
@@ -1994,13 +1990,13 @@ const sr = (e) => {
1994
1990
  continue: !t.abort
1995
1991
  });
1996
1992
  };
1997
- }), br = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
1998
- t.pattern ?? (t.pattern = cr), oe.init(e, t);
1999
- }), _r = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
2000
- t.pattern ?? (t.pattern = lr), oe.init(e, t);
2001
- }), vr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
2002
- $.init(e, t);
2003
- const n = _e(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1993
+ }), pr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
1994
+ t.pattern ?? (t.pattern = nr), te.init(e, t);
1995
+ }), dr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
1996
+ t.pattern ?? (t.pattern = rr), te.init(e, t);
1997
+ }), mr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
1998
+ S.init(e, t);
1999
+ const n = be(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
2004
2000
  t.pattern = r, e._zod.onattach.push((o) => {
2005
2001
  const s = o._zod.bag;
2006
2002
  s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
@@ -2015,9 +2011,9 @@ const sr = (e) => {
2015
2011
  continue: !t.abort
2016
2012
  });
2017
2013
  };
2018
- }), wr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
2019
- $.init(e, t);
2020
- const n = new RegExp(`^${_e(t.prefix)}.*`);
2014
+ }), hr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
2015
+ S.init(e, t);
2016
+ const n = new RegExp(`^${be(t.prefix)}.*`);
2021
2017
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
2022
2018
  const o = r._zod.bag;
2023
2019
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -2032,9 +2028,9 @@ const sr = (e) => {
2032
2028
  continue: !t.abort
2033
2029
  });
2034
2030
  };
2035
- }), Sr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
2036
- $.init(e, t);
2037
- const n = new RegExp(`.*${_e(t.suffix)}$`);
2031
+ }), fr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
2032
+ S.init(e, t);
2033
+ const n = new RegExp(`.*${be(t.suffix)}$`);
2038
2034
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
2039
2035
  const o = r._zod.bag;
2040
2036
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -2049,17 +2045,17 @@ const sr = (e) => {
2049
2045
  continue: !t.abort
2050
2046
  });
2051
2047
  };
2052
- }), kr = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
2053
- $.init(e, t), e._zod.check = (n) => {
2048
+ }), br = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
2049
+ S.init(e, t), e._zod.check = (n) => {
2054
2050
  n.value = t.tx(n.value);
2055
2051
  };
2056
- }), Tr = {
2052
+ }), gr = {
2057
2053
  major: 4,
2058
- minor: 3,
2059
- patch: 6
2060
- }, v = /* @__PURE__ */ l("$ZodType", (e, t) => {
2054
+ minor: 1,
2055
+ patch: 13
2056
+ }, _ = /* @__PURE__ */ l("$ZodType", (e, t) => {
2061
2057
  var n;
2062
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Tr;
2058
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = gr;
2063
2059
  const r = [...e._zod.def.checks ?? []];
2064
2060
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
2065
2061
  for (const o of r)
@@ -2071,34 +2067,34 @@ const sr = (e) => {
2071
2067
  });
2072
2068
  else {
2073
2069
  const o = (i, a, u) => {
2074
- let c = F(i), p;
2075
- for (const d of a) {
2076
- if (d._zod.def.when) {
2077
- if (!d._zod.def.when(i))
2070
+ let c = M(i), p;
2071
+ for (const m of a) {
2072
+ if (m._zod.def.when) {
2073
+ if (!m._zod.def.when(i))
2078
2074
  continue;
2079
2075
  } else if (c)
2080
2076
  continue;
2081
- const m = i.issues.length, h = d._zod.check(i);
2082
- if (h instanceof Promise && u?.async === !1)
2083
- throw new j();
2084
- if (p || h instanceof Promise)
2077
+ const f = i.issues.length, z = m._zod.check(i);
2078
+ if (z instanceof Promise && u?.async === !1)
2079
+ throw new N();
2080
+ if (p || z instanceof Promise)
2085
2081
  p = (p ?? Promise.resolve()).then(async () => {
2086
- await h, i.issues.length !== m && (c || (c = F(i, m)));
2082
+ await z, i.issues.length !== f && (c || (c = M(i, f)));
2087
2083
  });
2088
2084
  else {
2089
- if (i.issues.length === m)
2085
+ if (i.issues.length === f)
2090
2086
  continue;
2091
- c || (c = F(i, m));
2087
+ c || (c = M(i, f));
2092
2088
  }
2093
2089
  }
2094
2090
  return p ? p.then(() => i) : i;
2095
2091
  }, s = (i, a, u) => {
2096
- if (F(i))
2092
+ if (M(i))
2097
2093
  return i.aborted = !0, i;
2098
2094
  const c = o(a, r, u);
2099
2095
  if (c instanceof Promise) {
2100
2096
  if (u.async === !1)
2101
- throw new j();
2097
+ throw new N();
2102
2098
  return c.then((p) => e._zod.parse(p, u));
2103
2099
  }
2104
2100
  return e._zod.parse(c, u);
@@ -2113,26 +2109,26 @@ const sr = (e) => {
2113
2109
  const u = e._zod.parse(i, a);
2114
2110
  if (u instanceof Promise) {
2115
2111
  if (a.async === !1)
2116
- throw new j();
2112
+ throw new N();
2117
2113
  return u.then((c) => o(c, r, a));
2118
2114
  }
2119
2115
  return o(u, r, a);
2120
2116
  };
2121
2117
  }
2122
- g(e, "~standard", () => ({
2118
+ e["~standard"] = {
2123
2119
  validate: (o) => {
2124
2120
  try {
2125
- const s = ct(e, o);
2121
+ const s = st(e, o);
2126
2122
  return s.success ? { value: s.data } : { issues: s.error?.issues };
2127
2123
  } catch {
2128
- return lt(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2124
+ return it(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2129
2125
  }
2130
2126
  },
2131
2127
  vendor: "zod",
2132
2128
  version: 1
2133
- }));
2134
- }), we = /* @__PURE__ */ l("$ZodString", (e, t) => {
2135
- v.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? sr(e._zod.bag), e._zod.parse = (n, r) => {
2129
+ };
2130
+ }), ye = /* @__PURE__ */ l("$ZodString", (e, t) => {
2131
+ _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Jn(e._zod.bag), e._zod.parse = (n, r) => {
2136
2132
  if (t.coerce)
2137
2133
  try {
2138
2134
  n.value = String(n.value);
@@ -2145,9 +2141,9 @@ const sr = (e) => {
2145
2141
  inst: e
2146
2142
  }), n;
2147
2143
  };
2148
- }), Z = /* @__PURE__ */ l("$ZodStringFormat", (e, t) => {
2149
- oe.init(e, t), we.init(e, t);
2150
- }), zr = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
2144
+ }), E = /* @__PURE__ */ l("$ZodStringFormat", (e, t) => {
2145
+ te.init(e, t), ye.init(e, t);
2146
+ }), yr = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
2151
2147
  if (t.version) {
2152
2148
  const r = {
2153
2149
  v1: 1,
@@ -2161,14 +2157,14 @@ const sr = (e) => {
2161
2157
  }[t.version];
2162
2158
  if (r === void 0)
2163
2159
  throw new Error(`Invalid UUID version: "${t.version}"`);
2164
- t.pattern ?? (t.pattern = Ie(r));
2160
+ t.pattern ?? (t.pattern = $e(r));
2165
2161
  } else
2166
- t.pattern ?? (t.pattern = Ie());
2167
- Z.init(e, t);
2168
- }), Ar = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
2169
- t.pattern ?? (t.pattern = Hn), Z.init(e, t);
2170
- }), Or = /* @__PURE__ */ l("$ZodURL", (e, t) => {
2171
- Z.init(e, t), e._zod.check = (n) => {
2162
+ t.pattern ?? (t.pattern = $e());
2163
+ E.init(e, t);
2164
+ }), _r = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
2165
+ t.pattern ?? (t.pattern = Bn), E.init(e, t);
2166
+ }), vr = /* @__PURE__ */ l("$ZodURL", (e, t) => {
2167
+ E.init(e, t), e._zod.check = (n) => {
2172
2168
  try {
2173
2169
  const r = n.value.trim(), o = new URL(r);
2174
2170
  t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
@@ -2199,18 +2195,18 @@ const sr = (e) => {
2199
2195
  });
2200
2196
  }
2201
2197
  };
2202
- }), Er = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
2203
- t.pattern ?? (t.pattern = or(t)), Z.init(e, t);
2204
- }), $r = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
2205
- t.pattern ?? (t.pattern = nr), Z.init(e, t);
2206
- }), Pr = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
2207
- t.pattern ?? (t.pattern = rr(t)), Z.init(e, t);
2208
- }), Zr = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
2209
- t.pattern ?? (t.pattern = Xn), Z.init(e, t);
2210
- }), Ir = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
2211
- t.pattern ?? (t.pattern = Qn), Z.init(e, t), e._zod.bag.format = "ipv4";
2212
- }), Cr = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
2213
- t.pattern ?? (t.pattern = er), Z.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2198
+ }), kr = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
2199
+ t.pattern ?? (t.pattern = Hn(t)), E.init(e, t);
2200
+ }), wr = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
2201
+ t.pattern ?? (t.pattern = qn), E.init(e, t);
2202
+ }), Tr = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
2203
+ t.pattern ?? (t.pattern = Xn(t)), E.init(e, t);
2204
+ }), Ar = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
2205
+ t.pattern ?? (t.pattern = Vn), E.init(e, t);
2206
+ }), Sr = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
2207
+ t.pattern ?? (t.pattern = Yn), E.init(e, t), e._zod.bag.format = "ipv4";
2208
+ }), zr = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
2209
+ t.pattern ?? (t.pattern = Gn), E.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2214
2210
  try {
2215
2211
  new URL(`http://[${n.value}]`);
2216
2212
  } catch {
@@ -2223,8 +2219,8 @@ const sr = (e) => {
2223
2219
  });
2224
2220
  }
2225
2221
  };
2226
- }), Nr = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, t) => {
2227
- Z.init(e, t), e._zod.check = (n) => {
2222
+ }), Er = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, t) => {
2223
+ E.init(e, t), e._zod.check = (n) => {
2228
2224
  t.fn(n.value) || n.issues.push({
2229
2225
  code: "invalid_format",
2230
2226
  format: t.format,
@@ -2233,8 +2229,8 @@ const sr = (e) => {
2233
2229
  continue: !t.abort
2234
2230
  });
2235
2231
  };
2236
- }), ft = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2237
- v.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ar, e._zod.parse = (n, r) => {
2232
+ }), lt = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2233
+ _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? er, e._zod.parse = (n, r) => {
2238
2234
  if (t.coerce)
2239
2235
  try {
2240
2236
  n.value = Number(n.value);
@@ -2252,10 +2248,10 @@ const sr = (e) => {
2252
2248
  ...s ? { received: s } : {}
2253
2249
  }), n;
2254
2250
  };
2255
- }), Lr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2256
- mr.init(e, t), ft.init(e, t);
2257
- }), Mr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2258
- v.init(e, t), e._zod.pattern = ur, e._zod.parse = (n, r) => {
2251
+ }), $r = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2252
+ ir.init(e, t), lt.init(e, t);
2253
+ }), Or = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2254
+ _.init(e, t), e._zod.pattern = tr, e._zod.parse = (n, r) => {
2259
2255
  if (t.coerce)
2260
2256
  try {
2261
2257
  n.value = !!n.value;
@@ -2269,14 +2265,14 @@ const sr = (e) => {
2269
2265
  inst: e
2270
2266
  }), n;
2271
2267
  };
2272
- }), Dr = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2273
- v.init(e, t), e._zod.parse = (n) => n;
2268
+ }), Zr = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2269
+ _.init(e, t), e._zod.parse = (n) => n;
2274
2270
  });
2275
- function Ce(e, t, n) {
2276
- e.issues.length && t.issues.push(...Rn(n, e.issues)), t.value[n] = e.value;
2271
+ function Oe(e, t, n) {
2272
+ e.issues.length && t.issues.push(...Pn(n, e.issues)), t.value[n] = e.value;
2277
2273
  }
2278
- const ht = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2279
- v.init(e, t), e._zod.parse = (n, r) => {
2274
+ const pt = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2275
+ _.init(e, t), e._zod.parse = (n, r) => {
2280
2276
  const o = n.value;
2281
2277
  if (!Array.isArray(o))
2282
2278
  return n.issues.push({
@@ -2292,31 +2288,31 @@ const ht = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2292
2288
  value: a,
2293
2289
  issues: []
2294
2290
  }, r);
2295
- u instanceof Promise ? s.push(u.then((c) => Ce(c, n, i))) : Ce(u, n, i);
2291
+ u instanceof Promise ? s.push(u.then((c) => Oe(c, n, i))) : Oe(u, n, i);
2296
2292
  }
2297
2293
  return s.length ? Promise.all(s).then(() => n) : n;
2298
2294
  };
2299
2295
  });
2300
- function Ne(e, t, n, r) {
2296
+ function Ze(e, t, n, r) {
2301
2297
  for (const s of e)
2302
2298
  if (s.issues.length === 0)
2303
2299
  return t.value = s.value, t;
2304
- const o = e.filter((s) => !F(s));
2300
+ const o = e.filter((s) => !M(s));
2305
2301
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
2306
2302
  code: "invalid_union",
2307
2303
  input: t.value,
2308
2304
  inst: n,
2309
- errors: e.map((s) => s.issues.map((i) => D(i, r, M())))
2305
+ errors: e.map((s) => s.issues.map((i) => L(i, r, I())))
2310
2306
  }), t);
2311
2307
  }
2312
- const Rr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2313
- v.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
2308
+ const Pr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2309
+ _.init(e, t), b(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), b(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), b(e._zod, "values", () => {
2314
2310
  if (t.options.every((o) => o._zod.values))
2315
2311
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
2316
- }), g(e._zod, "pattern", () => {
2312
+ }), b(e._zod, "pattern", () => {
2317
2313
  if (t.options.every((o) => o._zod.pattern)) {
2318
2314
  const o = t.options.map((s) => s._zod.pattern);
2319
- return new RegExp(`^(${o.map((s) => be(s.source)).join("|")})$`);
2315
+ return new RegExp(`^(${o.map((s) => fe(s.source)).join("|")})$`);
2320
2316
  }
2321
2317
  });
2322
2318
  const n = t.options.length === 1, r = t.options[0]._zod.run;
@@ -2338,23 +2334,23 @@ const Rr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2338
2334
  a.push(c);
2339
2335
  }
2340
2336
  }
2341
- return i ? Promise.all(a).then((u) => Ne(u, o, e, s)) : Ne(a, o, e, s);
2337
+ return i ? Promise.all(a).then((u) => Ze(u, o, e, s)) : Ze(a, o, e, s);
2342
2338
  };
2343
- }), Fr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2344
- v.init(e, t), e._zod.parse = (n, r) => {
2339
+ }), Cr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2340
+ _.init(e, t), e._zod.parse = (n, r) => {
2345
2341
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2346
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Le(n, u, c)) : Le(n, s, i);
2342
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Pe(n, u, c)) : Pe(n, s, i);
2347
2343
  };
2348
2344
  });
2349
- function me(e, t) {
2345
+ function le(e, t) {
2350
2346
  if (e === t)
2351
2347
  return { valid: !0, data: e };
2352
2348
  if (e instanceof Date && t instanceof Date && +e == +t)
2353
2349
  return { valid: !0, data: e };
2354
- if (de(e) && de(t)) {
2350
+ if (ce(e) && ce(t)) {
2355
2351
  const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
2356
2352
  for (const s of r) {
2357
- const i = me(e[s], t[s]);
2353
+ const i = le(e[s], t[s]);
2358
2354
  if (!i.valid)
2359
2355
  return {
2360
2356
  valid: !1,
@@ -2369,7 +2365,7 @@ function me(e, t) {
2369
2365
  return { valid: !1, mergeErrorPath: [] };
2370
2366
  const n = [];
2371
2367
  for (let r = 0; r < e.length; r++) {
2372
- const o = e[r], s = t[r], i = me(o, s);
2368
+ const o = e[r], s = t[r], i = le(o, s);
2373
2369
  if (!i.valid)
2374
2370
  return {
2375
2371
  valid: !1,
@@ -2381,88 +2377,70 @@ function me(e, t) {
2381
2377
  }
2382
2378
  return { valid: !1, mergeErrorPath: [] };
2383
2379
  }
2384
- function Le(e, t, n) {
2385
- const r = /* @__PURE__ */ new Map();
2386
- let o;
2387
- for (const a of t.issues)
2388
- if (a.code === "unrecognized_keys") {
2389
- o ?? (o = a);
2390
- for (const u of a.keys)
2391
- r.has(u) || r.set(u, {}), r.get(u).l = !0;
2392
- } else
2393
- e.issues.push(a);
2394
- for (const a of n.issues)
2395
- if (a.code === "unrecognized_keys")
2396
- for (const u of a.keys)
2397
- r.has(u) || r.set(u, {}), r.get(u).r = !0;
2398
- else
2399
- e.issues.push(a);
2400
- const s = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
2401
- if (s.length && o && e.issues.push({ ...o, keys: s }), F(e))
2380
+ function Pe(e, t, n) {
2381
+ if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), M(e))
2402
2382
  return e;
2403
- const i = me(t.value, n.value);
2404
- if (!i.valid)
2405
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
2406
- return e.value = i.data, e;
2383
+ const r = le(t.value, n.value);
2384
+ if (!r.valid)
2385
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
2386
+ return e.value = r.data, e;
2407
2387
  }
2408
- const jr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2409
- v.init(e, t), e._zod.parse = (n, r) => {
2388
+ const Ir = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2389
+ _.init(e, t), e._zod.parse = (n, r) => {
2410
2390
  if (r.direction === "backward")
2411
- throw new rt(e.constructor.name);
2391
+ throw new Qe(e.constructor.name);
2412
2392
  const o = t.transform(n.value, n);
2413
2393
  if (r.async)
2414
2394
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
2415
2395
  if (o instanceof Promise)
2416
- throw new j();
2396
+ throw new N();
2417
2397
  return n.value = o, n;
2418
2398
  };
2419
2399
  });
2420
- function Me(e, t) {
2400
+ function Ce(e, t) {
2421
2401
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2422
2402
  }
2423
- const Se = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2424
- v.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
2403
+ const dt = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2404
+ _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), b(e._zod, "pattern", () => {
2425
2405
  const n = t.innerType._zod.pattern;
2426
- return n ? new RegExp(`^(${be(n.source)})?$`) : void 0;
2406
+ return n ? new RegExp(`^(${fe(n.source)})?$`) : void 0;
2427
2407
  }), e._zod.parse = (n, r) => {
2428
2408
  if (t.innerType._zod.optin === "optional") {
2429
2409
  const o = t.innerType._zod.run(n, r);
2430
- return o instanceof Promise ? o.then((s) => Me(s, n.value)) : Me(o, n.value);
2410
+ return o instanceof Promise ? o.then((s) => Ce(s, n.value)) : Ce(o, n.value);
2431
2411
  }
2432
2412
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
2433
2413
  };
2434
- }), Wr = /* @__PURE__ */ l("$ZodExactOptional", (e, t) => {
2435
- Se.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
2436
- }), xr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2437
- v.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
2414
+ }), Lr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2415
+ _.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "pattern", () => {
2438
2416
  const n = t.innerType._zod.pattern;
2439
- return n ? new RegExp(`^(${be(n.source)}|null)$`) : void 0;
2440
- }), g(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);
2441
- }), Ur = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2442
- v.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2417
+ return n ? new RegExp(`^(${fe(n.source)}|null)$`) : void 0;
2418
+ }), b(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);
2419
+ }), Dr = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2420
+ _.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2443
2421
  if (r.direction === "backward")
2444
2422
  return t.innerType._zod.run(n, r);
2445
2423
  if (n.value === void 0)
2446
2424
  return n.value = t.defaultValue, n;
2447
2425
  const o = t.innerType._zod.run(n, r);
2448
- return o instanceof Promise ? o.then((s) => De(s, t)) : De(o, t);
2426
+ return o instanceof Promise ? o.then((s) => Ie(s, t)) : Ie(o, t);
2449
2427
  };
2450
2428
  });
2451
- function De(e, t) {
2429
+ function Ie(e, t) {
2452
2430
  return e.value === void 0 && (e.value = t.defaultValue), e;
2453
2431
  }
2454
- const Vr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2455
- v.init(e, t), e._zod.optin = "optional", g(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));
2456
- }), Jr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2457
- v.init(e, t), g(e._zod, "values", () => {
2432
+ const Mr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2433
+ _.init(e, t), e._zod.optin = "optional", b(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));
2434
+ }), Nr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2435
+ _.init(e, t), b(e._zod, "values", () => {
2458
2436
  const n = t.innerType._zod.values;
2459
2437
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
2460
2438
  }), e._zod.parse = (n, r) => {
2461
2439
  const o = t.innerType._zod.run(n, r);
2462
- return o instanceof Promise ? o.then((s) => Re(s, e)) : Re(o, e);
2440
+ return o instanceof Promise ? o.then((s) => Le(s, e)) : Le(o, e);
2463
2441
  };
2464
2442
  });
2465
- function Re(e, t) {
2443
+ function Le(e, t) {
2466
2444
  return !e.issues.length && e.value === void 0 && e.issues.push({
2467
2445
  code: "invalid_type",
2468
2446
  expected: "nonoptional",
@@ -2470,58 +2448,58 @@ function Re(e, t) {
2470
2448
  inst: t
2471
2449
  }), e;
2472
2450
  }
2473
- const Br = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2474
- v.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2451
+ const xr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2452
+ _.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2475
2453
  if (r.direction === "backward")
2476
2454
  return t.innerType._zod.run(n, r);
2477
2455
  const o = t.innerType._zod.run(n, r);
2478
2456
  return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
2479
2457
  ...n,
2480
2458
  error: {
2481
- issues: s.issues.map((i) => D(i, r, M()))
2459
+ issues: s.issues.map((i) => L(i, r, I()))
2482
2460
  },
2483
2461
  input: n.value
2484
2462
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
2485
2463
  ...n,
2486
2464
  error: {
2487
- issues: o.issues.map((s) => D(s, r, M()))
2465
+ issues: o.issues.map((s) => L(s, r, I()))
2488
2466
  },
2489
2467
  input: n.value
2490
2468
  }), n.issues = []), n);
2491
2469
  };
2492
- }), Yr = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2493
- v.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2470
+ }), Rr = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2471
+ _.init(e, t), b(e._zod, "values", () => t.in._zod.values), b(e._zod, "optin", () => t.in._zod.optin), b(e._zod, "optout", () => t.out._zod.optout), b(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2494
2472
  if (r.direction === "backward") {
2495
2473
  const s = t.out._zod.run(n, r);
2496
- return s instanceof Promise ? s.then((i) => K(i, t.in, r)) : K(s, t.in, r);
2474
+ return s instanceof Promise ? s.then((i) => Y(i, t.in, r)) : Y(s, t.in, r);
2497
2475
  }
2498
2476
  const o = t.in._zod.run(n, r);
2499
- return o instanceof Promise ? o.then((s) => K(s, t.out, r)) : K(o, t.out, r);
2477
+ return o instanceof Promise ? o.then((s) => Y(s, t.out, r)) : Y(o, t.out, r);
2500
2478
  };
2501
2479
  });
2502
- function K(e, t, n) {
2480
+ function Y(e, t, n) {
2503
2481
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
2504
2482
  }
2505
- const Gr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2506
- v.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2483
+ const Fr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2484
+ _.init(e, t), b(e._zod, "propValues", () => t.innerType._zod.propValues), b(e._zod, "values", () => t.innerType._zod.values), b(e._zod, "optin", () => t.innerType?._zod?.optin), b(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2507
2485
  if (r.direction === "backward")
2508
2486
  return t.innerType._zod.run(n, r);
2509
2487
  const o = t.innerType._zod.run(n, r);
2510
- return o instanceof Promise ? o.then(Fe) : Fe(o);
2488
+ return o instanceof Promise ? o.then(De) : De(o);
2511
2489
  };
2512
2490
  });
2513
- function Fe(e) {
2491
+ function De(e) {
2514
2492
  return e.value = Object.freeze(e.value), e;
2515
2493
  }
2516
- const yt = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2517
- $.init(e, t), v.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2494
+ const mt = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2495
+ S.init(e, t), _.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2518
2496
  const r = n.value, o = t.fn(r);
2519
2497
  if (o instanceof Promise)
2520
- return o.then((s) => je(s, n, r, e));
2521
- je(o, n, r, e);
2498
+ return o.then((s) => Me(s, n, r, e));
2499
+ Me(o, n, r, e);
2522
2500
  };
2523
2501
  });
2524
- function je(e, t, n, r) {
2502
+ function Me(e, t, n, r) {
2525
2503
  if (!e) {
2526
2504
  const o = {
2527
2505
  code: "custom",
@@ -2533,17 +2511,22 @@ function je(e, t, n, r) {
2533
2511
  continue: !r._zod.def.abort
2534
2512
  // params: inst._zod.def.params,
2535
2513
  };
2536
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(J(o));
2514
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(W(o));
2537
2515
  }
2538
2516
  }
2539
- var We;
2540
- class Kr {
2517
+ var Ne;
2518
+ class Wr {
2541
2519
  constructor() {
2542
2520
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2543
2521
  }
2544
2522
  add(t, ...n) {
2545
2523
  const r = n[0];
2546
- return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
2524
+ if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
2525
+ if (this._idmap.has(r.id))
2526
+ throw new Error(`ID ${r.id} already exists in the registry`);
2527
+ this._idmap.set(r.id, t);
2528
+ }
2529
+ return this;
2547
2530
  }
2548
2531
  clear() {
2549
2532
  return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
@@ -2566,70 +2549,63 @@ class Kr {
2566
2549
  return this._map.has(t);
2567
2550
  }
2568
2551
  }
2569
- function qr() {
2570
- return new Kr();
2552
+ function Ur() {
2553
+ return new Wr();
2571
2554
  }
2572
- (We = globalThis).__zod_globalRegistry ?? (We.__zod_globalRegistry = qr());
2573
- const V = globalThis.__zod_globalRegistry;
2574
- // @__NO_SIDE_EFFECTS__
2575
- function Xr(e, t) {
2555
+ (Ne = globalThis).__zod_globalRegistry ?? (Ne.__zod_globalRegistry = Ur());
2556
+ const G = globalThis.__zod_globalRegistry;
2557
+ function jr(e, t) {
2576
2558
  return new e({
2577
2559
  type: "string",
2578
- ...f(t)
2560
+ ...d(t)
2579
2561
  });
2580
2562
  }
2581
- // @__NO_SIDE_EFFECTS__
2582
- function Hr(e, t) {
2563
+ function Vr(e, t) {
2583
2564
  return new e({
2584
2565
  type: "string",
2585
2566
  format: "email",
2586
2567
  check: "string_format",
2587
2568
  abort: !1,
2588
- ...f(t)
2569
+ ...d(t)
2589
2570
  });
2590
2571
  }
2591
- // @__NO_SIDE_EFFECTS__
2592
- function Qr(e, t) {
2572
+ function Br(e, t) {
2593
2573
  return new e({
2594
2574
  type: "string",
2595
2575
  format: "uuid",
2596
2576
  check: "string_format",
2597
2577
  abort: !1,
2598
- ...f(t)
2578
+ ...d(t)
2599
2579
  });
2600
2580
  }
2601
- // @__NO_SIDE_EFFECTS__
2602
- function eo(e, t) {
2581
+ function Yr(e, t) {
2603
2582
  return new e({
2604
2583
  type: "string",
2605
2584
  format: "url",
2606
2585
  check: "string_format",
2607
2586
  abort: !1,
2608
- ...f(t)
2587
+ ...d(t)
2609
2588
  });
2610
2589
  }
2611
- // @__NO_SIDE_EFFECTS__
2612
- function to(e, t) {
2590
+ function Gr(e, t) {
2613
2591
  return new e({
2614
2592
  type: "string",
2615
2593
  format: "ipv4",
2616
2594
  check: "string_format",
2617
2595
  abort: !1,
2618
- ...f(t)
2596
+ ...d(t)
2619
2597
  });
2620
2598
  }
2621
- // @__NO_SIDE_EFFECTS__
2622
- function no(e, t) {
2599
+ function Kr(e, t) {
2623
2600
  return new e({
2624
2601
  type: "string",
2625
2602
  format: "ipv6",
2626
2603
  check: "string_format",
2627
2604
  abort: !1,
2628
- ...f(t)
2605
+ ...d(t)
2629
2606
  });
2630
2607
  }
2631
- // @__NO_SIDE_EFFECTS__
2632
- function ro(e, t) {
2608
+ function qr(e, t) {
2633
2609
  return new e({
2634
2610
  type: "string",
2635
2611
  format: "datetime",
@@ -2637,233 +2613,204 @@ function ro(e, t) {
2637
2613
  offset: !1,
2638
2614
  local: !1,
2639
2615
  precision: null,
2640
- ...f(t)
2616
+ ...d(t)
2641
2617
  });
2642
2618
  }
2643
- // @__NO_SIDE_EFFECTS__
2644
- function oo(e, t) {
2619
+ function Xr(e, t) {
2645
2620
  return new e({
2646
2621
  type: "string",
2647
2622
  format: "date",
2648
2623
  check: "string_format",
2649
- ...f(t)
2624
+ ...d(t)
2650
2625
  });
2651
2626
  }
2652
- // @__NO_SIDE_EFFECTS__
2653
- function so(e, t) {
2627
+ function Hr(e, t) {
2654
2628
  return new e({
2655
2629
  type: "string",
2656
2630
  format: "time",
2657
2631
  check: "string_format",
2658
2632
  precision: null,
2659
- ...f(t)
2633
+ ...d(t)
2660
2634
  });
2661
2635
  }
2662
- // @__NO_SIDE_EFFECTS__
2663
- function io(e, t) {
2636
+ function Jr(e, t) {
2664
2637
  return new e({
2665
2638
  type: "string",
2666
2639
  format: "duration",
2667
2640
  check: "string_format",
2668
- ...f(t)
2641
+ ...d(t)
2669
2642
  });
2670
2643
  }
2671
- // @__NO_SIDE_EFFECTS__
2672
- function ao(e, t) {
2644
+ function Qr(e, t) {
2673
2645
  return new e({
2674
2646
  type: "number",
2675
2647
  checks: [],
2676
- ...f(t)
2648
+ ...d(t)
2677
2649
  });
2678
2650
  }
2679
- // @__NO_SIDE_EFFECTS__
2680
- function uo(e, t) {
2651
+ function eo(e, t) {
2681
2652
  return new e({
2682
2653
  type: "number",
2683
2654
  check: "number_format",
2684
2655
  abort: !1,
2685
2656
  format: "safeint",
2686
- ...f(t)
2657
+ ...d(t)
2687
2658
  });
2688
2659
  }
2689
- // @__NO_SIDE_EFFECTS__
2690
- function co(e, t) {
2660
+ function to(e, t) {
2691
2661
  return new e({
2692
2662
  type: "boolean",
2693
- ...f(t)
2663
+ ...d(t)
2694
2664
  });
2695
2665
  }
2696
- // @__NO_SIDE_EFFECTS__
2697
- function lo(e) {
2666
+ function no(e) {
2698
2667
  return new e({
2699
2668
  type: "any"
2700
2669
  });
2701
2670
  }
2702
- // @__NO_SIDE_EFFECTS__
2703
- function po(e, t) {
2704
- return new pr({
2671
+ function ro(e, t) {
2672
+ return new or({
2705
2673
  check: "less_than",
2706
- ...f(t),
2674
+ ...d(t),
2707
2675
  value: e,
2708
2676
  inclusive: !0
2709
2677
  });
2710
2678
  }
2711
- // @__NO_SIDE_EFFECTS__
2712
- function mo(e, t) {
2713
- return new dr({
2679
+ function oo(e, t) {
2680
+ return new sr({
2714
2681
  check: "greater_than",
2715
- ...f(t),
2682
+ ...d(t),
2716
2683
  value: e,
2717
2684
  inclusive: !0
2718
2685
  });
2719
2686
  }
2720
- // @__NO_SIDE_EFFECTS__
2721
- function se(e, t) {
2722
- return new fr({
2687
+ function ne(e, t) {
2688
+ return new ar({
2723
2689
  check: "max_length",
2724
- ...f(t),
2690
+ ...d(t),
2725
2691
  maximum: e
2726
2692
  });
2727
2693
  }
2728
- // @__NO_SIDE_EFFECTS__
2729
- function W(e, t) {
2730
- return new hr({
2694
+ function x(e, t) {
2695
+ return new ur({
2731
2696
  check: "min_length",
2732
- ...f(t),
2697
+ ...d(t),
2733
2698
  minimum: e
2734
2699
  });
2735
2700
  }
2736
- // @__NO_SIDE_EFFECTS__
2737
- function gt(e, t) {
2738
- return new yr({
2701
+ function ht(e, t) {
2702
+ return new cr({
2739
2703
  check: "length_equals",
2740
- ...f(t),
2704
+ ...d(t),
2741
2705
  length: e
2742
2706
  });
2743
2707
  }
2744
- // @__NO_SIDE_EFFECTS__
2745
- function bt(e, t) {
2746
- return new gr({
2708
+ function ft(e, t) {
2709
+ return new lr({
2747
2710
  check: "string_format",
2748
2711
  format: "regex",
2749
- ...f(t),
2712
+ ...d(t),
2750
2713
  pattern: e
2751
2714
  });
2752
2715
  }
2753
- // @__NO_SIDE_EFFECTS__
2754
- function fo(e) {
2755
- return new br({
2716
+ function so(e) {
2717
+ return new pr({
2756
2718
  check: "string_format",
2757
2719
  format: "lowercase",
2758
- ...f(e)
2720
+ ...d(e)
2759
2721
  });
2760
2722
  }
2761
- // @__NO_SIDE_EFFECTS__
2762
- function ho(e) {
2763
- return new _r({
2723
+ function io(e) {
2724
+ return new dr({
2764
2725
  check: "string_format",
2765
2726
  format: "uppercase",
2766
- ...f(e)
2727
+ ...d(e)
2767
2728
  });
2768
2729
  }
2769
- // @__NO_SIDE_EFFECTS__
2770
- function yo(e, t) {
2771
- return new vr({
2730
+ function ao(e, t) {
2731
+ return new mr({
2772
2732
  check: "string_format",
2773
2733
  format: "includes",
2774
- ...f(t),
2734
+ ...d(t),
2775
2735
  includes: e
2776
2736
  });
2777
2737
  }
2778
- // @__NO_SIDE_EFFECTS__
2779
- function go(e, t) {
2780
- return new wr({
2738
+ function uo(e, t) {
2739
+ return new hr({
2781
2740
  check: "string_format",
2782
2741
  format: "starts_with",
2783
- ...f(t),
2742
+ ...d(t),
2784
2743
  prefix: e
2785
2744
  });
2786
2745
  }
2787
- // @__NO_SIDE_EFFECTS__
2788
- function bo(e, t) {
2789
- return new Sr({
2746
+ function co(e, t) {
2747
+ return new fr({
2790
2748
  check: "string_format",
2791
2749
  format: "ends_with",
2792
- ...f(t),
2750
+ ...d(t),
2793
2751
  suffix: e
2794
2752
  });
2795
2753
  }
2796
- // @__NO_SIDE_EFFECTS__
2797
- function x(e) {
2798
- return new kr({
2754
+ function R(e) {
2755
+ return new br({
2799
2756
  check: "overwrite",
2800
2757
  tx: e
2801
2758
  });
2802
2759
  }
2803
- // @__NO_SIDE_EFFECTS__
2804
- function _o(e) {
2805
- return /* @__PURE__ */ x((t) => t.normalize(e));
2760
+ function lo(e) {
2761
+ return R((t) => t.normalize(e));
2806
2762
  }
2807
- // @__NO_SIDE_EFFECTS__
2808
- function vo() {
2809
- return /* @__PURE__ */ x((e) => e.trim());
2763
+ function po() {
2764
+ return R((e) => e.trim());
2810
2765
  }
2811
- // @__NO_SIDE_EFFECTS__
2812
- function wo() {
2813
- return /* @__PURE__ */ x((e) => e.toLowerCase());
2766
+ function mo() {
2767
+ return R((e) => e.toLowerCase());
2814
2768
  }
2815
- // @__NO_SIDE_EFFECTS__
2816
- function So() {
2817
- return /* @__PURE__ */ x((e) => e.toUpperCase());
2769
+ function ho() {
2770
+ return R((e) => e.toUpperCase());
2818
2771
  }
2819
- // @__NO_SIDE_EFFECTS__
2820
- function ko() {
2821
- return /* @__PURE__ */ x((e) => Mn(e));
2772
+ function fo() {
2773
+ return R((e) => On(e));
2822
2774
  }
2823
- // @__NO_SIDE_EFFECTS__
2824
- function To(e, t, n) {
2775
+ function bo(e, t, n) {
2825
2776
  return new e({
2826
2777
  type: "array",
2827
2778
  element: t,
2828
2779
  // get element() {
2829
2780
  // return element;
2830
2781
  // },
2831
- ...f(n)
2782
+ ...d(n)
2832
2783
  });
2833
2784
  }
2834
- // @__NO_SIDE_EFFECTS__
2835
- function _t(e, t, n) {
2785
+ function bt(e, t, n) {
2836
2786
  return new e({
2837
2787
  type: "custom",
2838
2788
  check: "custom",
2839
2789
  fn: t,
2840
- ...f(n)
2790
+ ...d(n)
2841
2791
  });
2842
2792
  }
2843
- // @__NO_SIDE_EFFECTS__
2844
- function vt(e) {
2845
- const t = /* @__PURE__ */ zo((n) => (n.addIssue = (r) => {
2793
+ function gt(e) {
2794
+ const t = go((n) => (n.addIssue = (r) => {
2846
2795
  if (typeof r == "string")
2847
- n.issues.push(J(r, n.value, t._zod.def));
2796
+ n.issues.push(W(r, n.value, t._zod.def));
2848
2797
  else {
2849
2798
  const o = r;
2850
- 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(J(o));
2799
+ 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(W(o));
2851
2800
  }
2852
2801
  }, e(n.value, n)));
2853
2802
  return t;
2854
2803
  }
2855
- // @__NO_SIDE_EFFECTS__
2856
- function zo(e, t) {
2857
- const n = new $({
2804
+ function go(e, t) {
2805
+ const n = new S({
2858
2806
  check: "custom",
2859
- ...f(t)
2807
+ ...d(t)
2860
2808
  });
2861
2809
  return n._zod.check = e, n;
2862
2810
  }
2863
- // @__NO_SIDE_EFFECTS__
2864
- function Ao(e, t, n, r = {}) {
2865
- const o = f(r), s = {
2866
- ...f(r),
2811
+ function yo(e, t, n, r = {}) {
2812
+ const o = d(r), s = {
2813
+ ...d(r),
2867
2814
  check: "string_format",
2868
2815
  type: "string",
2869
2816
  format: t,
@@ -2872,374 +2819,49 @@ function Ao(e, t, n, r = {}) {
2872
2819
  };
2873
2820
  return n instanceof RegExp && (s.pattern = n), new e(s);
2874
2821
  }
2875
- function wt(e) {
2876
- let t = e?.target ?? "draft-2020-12";
2877
- return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2878
- processors: e.processors ?? {},
2879
- metadataRegistry: e?.metadata ?? V,
2880
- target: t,
2881
- unrepresentable: e?.unrepresentable ?? "throw",
2882
- override: e?.override ?? (() => {
2883
- }),
2884
- io: e?.io ?? "output",
2885
- counter: 0,
2886
- seen: /* @__PURE__ */ new Map(),
2887
- cycles: e?.cycles ?? "ref",
2888
- reused: e?.reused ?? "inline",
2889
- external: e?.external ?? void 0
2890
- };
2891
- }
2892
- function O(e, t, n = { path: [], schemaPath: [] }) {
2893
- var r;
2894
- const o = e._zod.def, s = t.seen.get(e);
2895
- if (s)
2896
- return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
2897
- const i = { schema: {}, count: 1, cycle: void 0, path: n.path };
2898
- t.seen.set(e, i);
2899
- const a = e._zod.toJSONSchema?.();
2900
- if (a)
2901
- i.schema = a;
2902
- else {
2903
- const p = {
2904
- ...n,
2905
- schemaPath: [...n.schemaPath, e],
2906
- path: n.path
2907
- };
2908
- if (e._zod.processJSONSchema)
2909
- e._zod.processJSONSchema(t, i.schema, p);
2910
- else {
2911
- const m = i.schema, h = t.processors[o.type];
2912
- if (!h)
2913
- throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2914
- h(e, t, m, p);
2915
- }
2916
- const d = e._zod.parent;
2917
- d && (i.ref || (i.ref = d), O(d, t, p), t.seen.get(d).isParent = !0);
2918
- }
2919
- const u = t.metadataRegistry.get(e);
2920
- return u && Object.assign(i.schema, u), t.io === "input" && A(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;
2921
- }
2922
- function St(e, t) {
2923
- const n = e.seen.get(t);
2924
- if (!n)
2925
- throw new Error("Unprocessed schema. This is a bug in Zod.");
2926
- const r = /* @__PURE__ */ new Map();
2927
- for (const i of e.seen.entries()) {
2928
- const a = e.metadataRegistry.get(i[0])?.id;
2929
- if (a) {
2930
- const u = r.get(a);
2931
- if (u && u !== i[0])
2932
- throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2933
- r.set(a, i[0]);
2934
- }
2935
- }
2936
- const o = (i) => {
2937
- const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
2938
- if (e.external) {
2939
- const d = e.external.registry.get(i[0])?.id, m = e.external.uri ?? ((P) => P);
2940
- if (d)
2941
- return { ref: m(d) };
2942
- const h = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
2943
- return i[1].defId = h, { defId: h, ref: `${m("__shared")}#/${a}/${h}` };
2944
- }
2945
- if (i[1] === n)
2946
- return { ref: "#" };
2947
- const c = `#/${a}/`, p = i[1].schema.id ?? `__schema${e.counter++}`;
2948
- return { defId: p, ref: c + p };
2949
- }, s = (i) => {
2950
- if (i[1].schema.$ref)
2951
- return;
2952
- const a = i[1], { ref: u, defId: c } = o(i);
2953
- a.def = { ...a.schema }, c && (a.defId = c);
2954
- const p = a.schema;
2955
- for (const d in p)
2956
- delete p[d];
2957
- p.$ref = u;
2958
- };
2959
- if (e.cycles === "throw")
2960
- for (const i of e.seen.entries()) {
2961
- const a = i[1];
2962
- if (a.cycle)
2963
- throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
2964
-
2965
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2966
- }
2967
- for (const i of e.seen.entries()) {
2968
- const a = i[1];
2969
- if (t === i[0]) {
2970
- s(i);
2971
- continue;
2972
- }
2973
- if (e.external) {
2974
- const c = e.external.registry.get(i[0])?.id;
2975
- if (t !== i[0] && c) {
2976
- s(i);
2977
- continue;
2978
- }
2979
- }
2980
- if (e.metadataRegistry.get(i[0])?.id) {
2981
- s(i);
2982
- continue;
2983
- }
2984
- if (a.cycle) {
2985
- s(i);
2986
- continue;
2987
- }
2988
- if (a.count > 1 && e.reused === "ref") {
2989
- s(i);
2990
- continue;
2991
- }
2992
- }
2822
+ const _o = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
2823
+ kr.init(e, t), re.init(e, t);
2824
+ });
2825
+ function vo(e) {
2826
+ return qr(_o, e);
2993
2827
  }
2994
- function kt(e, t) {
2995
- const n = e.seen.get(t);
2996
- if (!n)
2997
- throw new Error("Unprocessed schema. This is a bug in Zod.");
2998
- const r = (i) => {
2999
- const a = e.seen.get(i);
3000
- if (a.ref === null)
3001
- return;
3002
- const u = a.def ?? a.schema, c = { ...u }, p = a.ref;
3003
- if (a.ref = null, p) {
3004
- r(p);
3005
- const m = e.seen.get(p), h = m.schema;
3006
- if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (u.allOf = u.allOf ?? [], u.allOf.push(h)) : Object.assign(u, h), Object.assign(u, c), i._zod.parent === p)
3007
- for (const k in u)
3008
- k === "$ref" || k === "allOf" || k in c || delete u[k];
3009
- if (h.$ref && m.def)
3010
- for (const k in u)
3011
- k === "$ref" || k === "allOf" || k in m.def && JSON.stringify(u[k]) === JSON.stringify(m.def[k]) && delete u[k];
3012
- }
3013
- const d = i._zod.parent;
3014
- if (d && d !== p) {
3015
- r(d);
3016
- const m = e.seen.get(d);
3017
- if (m?.schema.$ref && (u.$ref = m.schema.$ref, m.def))
3018
- for (const h in u)
3019
- h === "$ref" || h === "allOf" || h in m.def && JSON.stringify(u[h]) === JSON.stringify(m.def[h]) && delete u[h];
3020
- }
3021
- e.override({
3022
- zodSchema: i,
3023
- jsonSchema: u,
3024
- path: a.path ?? []
3025
- });
3026
- };
3027
- for (const i of [...e.seen.entries()].reverse())
3028
- r(i[0]);
3029
- const o = {};
3030
- 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) {
3031
- const i = e.external.registry.get(t)?.id;
3032
- if (!i)
3033
- throw new Error("Schema is missing an `id` property");
3034
- o.$id = e.external.uri(i);
3035
- }
3036
- Object.assign(o, n.def ?? n.schema);
3037
- const s = e.external?.defs ?? {};
3038
- for (const i of e.seen.entries()) {
3039
- const a = i[1];
3040
- a.def && a.defId && (s[a.defId] = a.def);
3041
- }
3042
- e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
3043
- try {
3044
- const i = JSON.parse(JSON.stringify(o));
3045
- return Object.defineProperty(i, "~standard", {
3046
- value: {
3047
- ...t["~standard"],
3048
- jsonSchema: {
3049
- input: X(t, "input", e.processors),
3050
- output: X(t, "output", e.processors)
3051
- }
3052
- },
3053
- enumerable: !1,
3054
- writable: !1
3055
- }), i;
3056
- } catch {
3057
- throw new Error("Error converting schema to JSON.");
3058
- }
2828
+ const ko = /* @__PURE__ */ l("ZodISODate", (e, t) => {
2829
+ wr.init(e, t), re.init(e, t);
2830
+ });
2831
+ function wo(e) {
2832
+ return Xr(ko, e);
3059
2833
  }
3060
- function A(e, t) {
3061
- const n = t ?? { seen: /* @__PURE__ */ new Set() };
3062
- if (n.seen.has(e))
3063
- return !1;
3064
- n.seen.add(e);
3065
- const r = e._zod.def;
3066
- if (r.type === "transform")
3067
- return !0;
3068
- if (r.type === "array")
3069
- return A(r.element, n);
3070
- if (r.type === "set")
3071
- return A(r.valueType, n);
3072
- if (r.type === "lazy")
3073
- return A(r.getter(), n);
3074
- if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
3075
- return A(r.innerType, n);
3076
- if (r.type === "intersection")
3077
- return A(r.left, n) || A(r.right, n);
3078
- if (r.type === "record" || r.type === "map")
3079
- return A(r.keyType, n) || A(r.valueType, n);
3080
- if (r.type === "pipe")
3081
- return A(r.in, n) || A(r.out, n);
3082
- if (r.type === "object") {
3083
- for (const o in r.shape)
3084
- if (A(r.shape[o], n))
3085
- return !0;
3086
- return !1;
3087
- }
3088
- if (r.type === "union") {
3089
- for (const o of r.options)
3090
- if (A(o, n))
3091
- return !0;
3092
- return !1;
3093
- }
3094
- if (r.type === "tuple") {
3095
- for (const o of r.items)
3096
- if (A(o, n))
3097
- return !0;
3098
- return !!(r.rest && A(r.rest, n));
3099
- }
3100
- return !1;
2834
+ const To = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
2835
+ Tr.init(e, t), re.init(e, t);
2836
+ });
2837
+ function Ao(e) {
2838
+ return Hr(To, e);
3101
2839
  }
3102
- const Oo = (e, t = {}) => (n) => {
3103
- const r = wt({ ...n, processors: t });
3104
- return O(e, r), St(r, e), kt(r, e);
3105
- }, X = (e, t, n = {}) => (r) => {
3106
- const { libraryOptions: o, target: s } = r ?? {}, i = wt({ ...o ?? {}, target: s, io: t, processors: n });
3107
- return O(e, i), St(i, e), kt(i, e);
3108
- }, Eo = {
3109
- guid: "uuid",
3110
- url: "uri",
3111
- datetime: "date-time",
3112
- json_string: "json-string",
3113
- regex: ""
3114
- // do not set
3115
- }, $o = (e, t, n, r) => {
3116
- const o = n;
3117
- o.type = "string";
3118
- const { minimum: s, maximum: i, format: a, patterns: u, contentEncoding: c } = e._zod.bag;
3119
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = Eo[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), c && (o.contentEncoding = c), u && u.size > 0) {
3120
- const p = [...u];
3121
- p.length === 1 ? o.pattern = p[0].source : p.length > 1 && (o.allOf = [
3122
- ...p.map((d) => ({
3123
- ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3124
- pattern: d.source
3125
- }))
3126
- ]);
3127
- }
3128
- }, Po = (e, t, n, r) => {
3129
- if (t.unrepresentable === "throw")
3130
- throw new Error("Custom types cannot be represented in JSON Schema");
3131
- }, Zo = (e, t, n, r) => {
3132
- if (t.unrepresentable === "throw")
3133
- throw new Error("Transforms cannot be represented in JSON Schema");
3134
- }, Io = (e, t, n, r) => {
3135
- const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
3136
- typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = O(s.element, t, { ...r, path: [...r.path, "items"] });
3137
- }, Co = (e, t, n, r) => {
3138
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, u) => O(a, t, {
3139
- ...r,
3140
- path: [...r.path, s ? "oneOf" : "anyOf", u]
3141
- }));
3142
- s ? n.oneOf = i : n.anyOf = i;
3143
- }, No = (e, t, n, r) => {
3144
- const o = e._zod.def, s = O(o.left, t, {
3145
- ...r,
3146
- path: [...r.path, "allOf", 0]
3147
- }), i = O(o.right, t, {
3148
- ...r,
3149
- path: [...r.path, "allOf", 1]
3150
- }), a = (c) => "allOf" in c && Object.keys(c).length === 1, u = [
3151
- ...a(s) ? s.allOf : [s],
3152
- ...a(i) ? i.allOf : [i]
3153
- ];
3154
- n.allOf = u;
3155
- }, Lo = (e, t, n, r) => {
3156
- const o = e._zod.def, s = O(o.innerType, t, r), i = t.seen.get(e);
3157
- t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
3158
- }, Mo = (e, t, n, r) => {
3159
- const o = e._zod.def;
3160
- O(o.innerType, t, r);
3161
- const s = t.seen.get(e);
3162
- s.ref = o.innerType;
3163
- }, Do = (e, t, n, r) => {
3164
- const o = e._zod.def;
3165
- O(o.innerType, t, r);
3166
- const s = t.seen.get(e);
3167
- s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
3168
- }, Ro = (e, t, n, r) => {
3169
- const o = e._zod.def;
3170
- O(o.innerType, t, r);
3171
- const s = t.seen.get(e);
3172
- s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
3173
- }, Fo = (e, t, n, r) => {
3174
- const o = e._zod.def;
3175
- O(o.innerType, t, r);
3176
- const s = t.seen.get(e);
3177
- s.ref = o.innerType;
3178
- let i;
3179
- try {
3180
- i = o.catchValue(void 0);
3181
- } catch {
3182
- throw new Error("Dynamic catch values are not supported in JSON Schema");
3183
- }
3184
- n.default = i;
3185
- }, jo = (e, t, n, r) => {
3186
- const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
3187
- O(s, t, r);
3188
- const i = t.seen.get(e);
3189
- i.ref = s;
3190
- }, Wo = (e, t, n, r) => {
3191
- const o = e._zod.def;
3192
- O(o.innerType, t, r);
3193
- const s = t.seen.get(e);
3194
- s.ref = o.innerType, n.readOnly = !0;
3195
- }, Tt = (e, t, n, r) => {
3196
- const o = e._zod.def;
3197
- O(o.innerType, t, r);
3198
- const s = t.seen.get(e);
3199
- s.ref = o.innerType;
3200
- }, xo = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
3201
- Er.init(e, t), ie.init(e, t);
3202
- });
3203
- function Uo(e) {
3204
- return /* @__PURE__ */ ro(xo, e);
3205
- }
3206
- const Vo = /* @__PURE__ */ l("ZodISODate", (e, t) => {
3207
- $r.init(e, t), ie.init(e, t);
3208
- });
3209
- function Jo(e) {
3210
- return /* @__PURE__ */ oo(Vo, e);
3211
- }
3212
- const Bo = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
3213
- Pr.init(e, t), ie.init(e, t);
3214
- });
3215
- function Yo(e) {
3216
- return /* @__PURE__ */ so(Bo, e);
3217
- }
3218
- const Go = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
3219
- Zr.init(e, t), ie.init(e, t);
2840
+ const So = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
2841
+ Ar.init(e, t), re.init(e, t);
3220
2842
  });
3221
- function Ko(e) {
3222
- return /* @__PURE__ */ io(Go, e);
2843
+ function zo(e) {
2844
+ return Jr(So, e);
3223
2845
  }
3224
- const qo = (e, t) => {
3225
- ut.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2846
+ const Eo = (e, t) => {
2847
+ ot.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
3226
2848
  format: {
3227
- value: (n) => jn(e, n)
2849
+ value: (n) => In(e, n)
3228
2850
  // enumerable: false,
3229
2851
  },
3230
2852
  flatten: {
3231
- value: (n) => Fn(e, n)
2853
+ value: (n) => Cn(e, n)
3232
2854
  // enumerable: false,
3233
2855
  },
3234
2856
  addIssue: {
3235
2857
  value: (n) => {
3236
- e.issues.push(n), e.message = JSON.stringify(e.issues, pe, 2);
2858
+ e.issues.push(n), e.message = JSON.stringify(e.issues, ue, 2);
3237
2859
  }
3238
2860
  // enumerable: false,
3239
2861
  },
3240
2862
  addIssues: {
3241
2863
  value: (n) => {
3242
- e.issues.push(...n), e.message = JSON.stringify(e.issues, pe, 2);
2864
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, ue, 2);
3243
2865
  }
3244
2866
  // enumerable: false,
3245
2867
  },
@@ -3250,492 +2872,464 @@ const qo = (e, t) => {
3250
2872
  // enumerable: false,
3251
2873
  }
3252
2874
  });
3253
- }, I = l("ZodError", qo, {
2875
+ }, $ = l("ZodError", Eo, {
3254
2876
  Parent: Error
3255
- }), Xo = /* @__PURE__ */ ee(I), Ho = /* @__PURE__ */ te(I), Qo = /* @__PURE__ */ ne(I), es = /* @__PURE__ */ re(I), ts = /* @__PURE__ */ Un(I), ns = /* @__PURE__ */ Vn(I), rs = /* @__PURE__ */ Jn(I), os = /* @__PURE__ */ Bn(I), ss = /* @__PURE__ */ Yn(I), is = /* @__PURE__ */ Gn(I), as = /* @__PURE__ */ Kn(I), us = /* @__PURE__ */ qn(I), E = /* @__PURE__ */ l("ZodType", (e, t) => (v.init(e, t), Object.assign(e["~standard"], {
3256
- jsonSchema: {
3257
- input: X(e, "input"),
3258
- output: X(e, "output")
3259
- }
3260
- }), e.toJSONSchema = Oo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Ln(t, {
2877
+ }), $o = /* @__PURE__ */ H($), Oo = /* @__PURE__ */ J($), Zo = /* @__PURE__ */ Q($), Po = /* @__PURE__ */ ee($), Co = /* @__PURE__ */ Mn($), Io = /* @__PURE__ */ Nn($), Lo = /* @__PURE__ */ xn($), Do = /* @__PURE__ */ Rn($), Mo = /* @__PURE__ */ Fn($), No = /* @__PURE__ */ Wn($), xo = /* @__PURE__ */ Un($), Ro = /* @__PURE__ */ jn($), A = /* @__PURE__ */ l("ZodType", (e, t) => (_.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone($n(t, {
3261
2878
  checks: [
3262
2879
  ...t.checks ?? [],
3263
2880
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3264
2881
  ]
3265
- }), {
3266
- parent: !0
3267
- }), e.with = e.check, e.clone = (n, r) => it(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qo(e, n, r), e.parseAsync = async (n, r) => Ho(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ts(e, n, r), e.decode = (n, r) => ns(e, n, r), e.encodeAsync = async (n, r) => rs(e, n, r), e.decodeAsync = async (n, r) => os(e, n, r), e.safeEncode = (n, r) => ss(e, n, r), e.safeDecode = (n, r) => is(e, n, r), e.safeEncodeAsync = async (n, r) => as(e, n, r), e.safeDecodeAsync = async (n, r) => us(e, n, r), e.refine = (n, r) => e.check(Ns(n, r)), e.superRefine = (n) => e.check(Ls(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ x(n)), e.optional = () => xe(e), e.exactOptional = () => vs(e), e.nullable = () => Ue(e), e.nullish = () => xe(Ue(e)), e.nonoptional = (n) => Os(e, n), e.array = () => ps(e), e.or = (n) => ms([e, n]), e.and = (n) => hs(e, n), e.transform = (n) => Ve(e, gs(n)), e.default = (n) => ks(e, n), e.prefault = (n) => zs(e, n), e.catch = (n) => $s(e, n), e.pipe = (n) => Ve(e, n), e.readonly = () => Is(e), e.describe = (n) => {
2882
+ })), e.clone = (n, r) => nt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => $o(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) => Po(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Co(e, n, r), e.decode = (n, r) => Io(e, n, r), e.encodeAsync = async (n, r) => Lo(e, n, r), e.decodeAsync = async (n, r) => Do(e, n, r), e.safeEncode = (n, r) => Mo(e, n, r), e.safeDecode = (n, r) => No(e, n, r), e.safeEncodeAsync = async (n, r) => xo(e, n, r), e.safeDecodeAsync = async (n, r) => Ro(e, n, r), e.refine = (n, r) => e.check(cs(n, r)), e.superRefine = (n) => e.check(ls(n)), e.overwrite = (n) => e.check(R(n)), e.optional = () => xe(e), e.nullable = () => Re(e), e.nullish = () => xe(Re(e)), e.nonoptional = (n) => ns(e, n), e.array = () => Uo(e), e.or = (n) => Vo([e, n]), e.and = (n) => Yo(e, n), e.transform = (n) => Fe(e, Ko(n)), e.default = (n) => Jo(e, n), e.prefault = (n) => es(e, n), e.catch = (n) => os(e, n), e.pipe = (n) => Fe(e, n), e.readonly = () => as(e), e.describe = (n) => {
3268
2883
  const r = e.clone();
3269
- return V.add(r, { description: n }), r;
2884
+ return G.add(r, { description: n }), r;
3270
2885
  }, Object.defineProperty(e, "description", {
3271
2886
  get() {
3272
- return V.get(e)?.description;
2887
+ return G.get(e)?.description;
3273
2888
  },
3274
2889
  configurable: !0
3275
2890
  }), e.meta = (...n) => {
3276
2891
  if (n.length === 0)
3277
- return V.get(e);
2892
+ return G.get(e);
3278
2893
  const r = e.clone();
3279
- return V.add(r, n[0]), r;
3280
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), cs = /* @__PURE__ */ l("_ZodString", (e, t) => {
3281
- we.init(e, t), E.init(e, t), e._zod.processJSONSchema = (r, o, s) => $o(e, r, o);
2894
+ return G.add(r, n[0]), r;
2895
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Fo = /* @__PURE__ */ l("_ZodString", (e, t) => {
2896
+ ye.init(e, t), A.init(e, t);
3282
2897
  const n = e._zod.bag;
3283
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ bt(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ yo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ go(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ bo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ W(...r)), e.max = (...r) => e.check(/* @__PURE__ */ se(...r)), e.length = (...r) => e.check(/* @__PURE__ */ gt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ W(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ fo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ ho(r)), e.trim = () => e.check(/* @__PURE__ */ vo()), e.normalize = (...r) => e.check(/* @__PURE__ */ _o(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ wo()), e.toUpperCase = () => e.check(/* @__PURE__ */ So()), e.slugify = () => e.check(/* @__PURE__ */ ko());
3284
- }), ie = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
3285
- Z.init(e, t), cs.init(e, t);
3286
- }), ls = /* @__PURE__ */ l("ZodArray", (e, t) => {
3287
- ht.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Io(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ W(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ W(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ se(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ gt(n, r)), e.unwrap = () => e.element;
2898
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(ft(...r)), e.includes = (...r) => e.check(ao(...r)), e.startsWith = (...r) => e.check(uo(...r)), e.endsWith = (...r) => e.check(co(...r)), e.min = (...r) => e.check(x(...r)), e.max = (...r) => e.check(ne(...r)), e.length = (...r) => e.check(ht(...r)), e.nonempty = (...r) => e.check(x(1, ...r)), e.lowercase = (r) => e.check(so(r)), e.uppercase = (r) => e.check(io(r)), e.trim = () => e.check(po()), e.normalize = (...r) => e.check(lo(...r)), e.toLowerCase = () => e.check(mo()), e.toUpperCase = () => e.check(ho()), e.slugify = () => e.check(fo());
2899
+ }), re = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
2900
+ E.init(e, t), Fo.init(e, t);
2901
+ }), Wo = /* @__PURE__ */ l("ZodArray", (e, t) => {
2902
+ pt.init(e, t), A.init(e, t), e.element = t.element, e.min = (n, r) => e.check(x(n, r)), e.nonempty = (n) => e.check(x(1, n)), e.max = (n, r) => e.check(ne(n, r)), e.length = (n, r) => e.check(ht(n, r)), e.unwrap = () => e.element;
3288
2903
  });
3289
- function ps(e, t) {
3290
- return /* @__PURE__ */ To(ls, e, t);
2904
+ function Uo(e, t) {
2905
+ return bo(Wo, e, t);
3291
2906
  }
3292
- const ds = /* @__PURE__ */ l("ZodUnion", (e, t) => {
3293
- Rr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Co(e, n, r, o), e.options = t.options;
2907
+ const jo = /* @__PURE__ */ l("ZodUnion", (e, t) => {
2908
+ Pr.init(e, t), A.init(e, t), e.options = t.options;
3294
2909
  });
3295
- function ms(e, t) {
3296
- return new ds({
2910
+ function Vo(e, t) {
2911
+ return new jo({
3297
2912
  type: "union",
3298
2913
  options: e,
3299
- ...f(t)
2914
+ ...d(t)
3300
2915
  });
3301
2916
  }
3302
- const fs = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
3303
- Fr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => No(e, n, r, o);
2917
+ const Bo = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
2918
+ Cr.init(e, t), A.init(e, t);
3304
2919
  });
3305
- function hs(e, t) {
3306
- return new fs({
2920
+ function Yo(e, t) {
2921
+ return new Bo({
3307
2922
  type: "intersection",
3308
2923
  left: e,
3309
2924
  right: t
3310
2925
  });
3311
2926
  }
3312
- const ys = /* @__PURE__ */ l("ZodTransform", (e, t) => {
3313
- jr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Zo(e, n), e._zod.parse = (n, r) => {
2927
+ const Go = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2928
+ Ir.init(e, t), A.init(e, t), e._zod.parse = (n, r) => {
3314
2929
  if (r.direction === "backward")
3315
- throw new rt(e.constructor.name);
2930
+ throw new Qe(e.constructor.name);
3316
2931
  n.addIssue = (s) => {
3317
2932
  if (typeof s == "string")
3318
- n.issues.push(J(s, n.value, t));
2933
+ n.issues.push(W(s, n.value, t));
3319
2934
  else {
3320
2935
  const i = s;
3321
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(J(i));
2936
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(W(i));
3322
2937
  }
3323
2938
  };
3324
2939
  const o = t.transform(n.value, n);
3325
2940
  return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
3326
2941
  };
3327
2942
  });
3328
- function gs(e) {
3329
- return new ys({
2943
+ function Ko(e) {
2944
+ return new Go({
3330
2945
  type: "transform",
3331
2946
  transform: e
3332
2947
  });
3333
2948
  }
3334
- const bs = /* @__PURE__ */ l("ZodOptional", (e, t) => {
3335
- Se.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Tt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2949
+ const qo = /* @__PURE__ */ l("ZodOptional", (e, t) => {
2950
+ dt.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3336
2951
  });
3337
2952
  function xe(e) {
3338
- return new bs({
2953
+ return new qo({
3339
2954
  type: "optional",
3340
2955
  innerType: e
3341
2956
  });
3342
2957
  }
3343
- const _s = /* @__PURE__ */ l("ZodExactOptional", (e, t) => {
3344
- Wr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Tt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2958
+ const Xo = /* @__PURE__ */ l("ZodNullable", (e, t) => {
2959
+ Lr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3345
2960
  });
3346
- function vs(e) {
3347
- return new _s({
3348
- type: "optional",
3349
- innerType: e
3350
- });
3351
- }
3352
- const ws = /* @__PURE__ */ l("ZodNullable", (e, t) => {
3353
- xr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3354
- });
3355
- function Ue(e) {
3356
- return new ws({
2961
+ function Re(e) {
2962
+ return new Xo({
3357
2963
  type: "nullable",
3358
2964
  innerType: e
3359
2965
  });
3360
2966
  }
3361
- const Ss = /* @__PURE__ */ l("ZodDefault", (e, t) => {
3362
- Ur.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Do(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2967
+ const Ho = /* @__PURE__ */ l("ZodDefault", (e, t) => {
2968
+ Dr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3363
2969
  });
3364
- function ks(e, t) {
3365
- return new Ss({
2970
+ function Jo(e, t) {
2971
+ return new Ho({
3366
2972
  type: "default",
3367
2973
  innerType: e,
3368
2974
  get defaultValue() {
3369
- return typeof t == "function" ? t() : st(t);
2975
+ return typeof t == "function" ? t() : tt(t);
3370
2976
  }
3371
2977
  });
3372
2978
  }
3373
- const Ts = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
3374
- Vr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ro(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2979
+ const Qo = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
2980
+ Mr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3375
2981
  });
3376
- function zs(e, t) {
3377
- return new Ts({
2982
+ function es(e, t) {
2983
+ return new Qo({
3378
2984
  type: "prefault",
3379
2985
  innerType: e,
3380
2986
  get defaultValue() {
3381
- return typeof t == "function" ? t() : st(t);
2987
+ return typeof t == "function" ? t() : tt(t);
3382
2988
  }
3383
2989
  });
3384
2990
  }
3385
- const As = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3386
- Jr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2991
+ const ts = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
2992
+ Nr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3387
2993
  });
3388
- function Os(e, t) {
3389
- return new As({
2994
+ function ns(e, t) {
2995
+ return new ts({
3390
2996
  type: "nonoptional",
3391
2997
  innerType: e,
3392
- ...f(t)
2998
+ ...d(t)
3393
2999
  });
3394
3000
  }
3395
- const Es = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3396
- Br.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3001
+ const rs = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3002
+ xr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3397
3003
  });
3398
- function $s(e, t) {
3399
- return new Es({
3004
+ function os(e, t) {
3005
+ return new rs({
3400
3006
  type: "catch",
3401
3007
  innerType: e,
3402
3008
  catchValue: typeof t == "function" ? t : () => t
3403
3009
  });
3404
3010
  }
3405
- const Ps = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3406
- Yr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => jo(e, n, r, o), e.in = t.in, e.out = t.out;
3011
+ const ss = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3012
+ Rr.init(e, t), A.init(e, t), e.in = t.in, e.out = t.out;
3407
3013
  });
3408
- function Ve(e, t) {
3409
- return new Ps({
3014
+ function Fe(e, t) {
3015
+ return new ss({
3410
3016
  type: "pipe",
3411
3017
  in: e,
3412
3018
  out: t
3413
3019
  // ...util.normalizeParams(params),
3414
3020
  });
3415
3021
  }
3416
- const Zs = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3417
- Gr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3022
+ const is = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3023
+ Fr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3418
3024
  });
3419
- function Is(e) {
3420
- return new Zs({
3025
+ function as(e) {
3026
+ return new is({
3421
3027
  type: "readonly",
3422
3028
  innerType: e
3423
3029
  });
3424
3030
  }
3425
- const Cs = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3426
- yt.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Po(e, n);
3031
+ const us = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3032
+ mt.init(e, t), A.init(e, t);
3427
3033
  });
3428
- function Ns(e, t = {}) {
3429
- return /* @__PURE__ */ _t(Cs, e, t);
3034
+ function cs(e, t = {}) {
3035
+ return bt(us, e, t);
3430
3036
  }
3431
- function Ls(e) {
3432
- return /* @__PURE__ */ vt(e);
3037
+ function ls(e) {
3038
+ return gt(e);
3433
3039
  }
3434
- const R = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3040
+ const D = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3435
3041
  if (!e._zod)
3436
3042
  throw new Error("Uninitialized schema in ZodMiniType.");
3437
- v.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Wn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ct(e, n, r), e.parseAsync = async (n, r) => xn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => lt(e, n, r), e.check = (...n) => e.clone({
3438
- ...t,
3439
- checks: [
3440
- ...t.checks ?? [],
3441
- ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3442
- ]
3443
- }, { parent: !0 }), e.with = e.check, e.clone = (n, r) => it(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.apply = (n) => n(e);
3444
- }), zt = /* @__PURE__ */ l("ZodMiniString", (e, t) => {
3445
- we.init(e, t), R.init(e, t);
3043
+ _.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Ln(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => st(e, n, r), e.parseAsync = async (n, r) => Dn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => it(e, n, r), e.check = (...n) => e.clone(
3044
+ {
3045
+ ...t,
3046
+ checks: [
3047
+ ...t.checks ?? [],
3048
+ ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3049
+ ]
3050
+ }
3051
+ // { parent: true }
3052
+ ), e.clone = (n, r) => nt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e));
3053
+ }), yt = /* @__PURE__ */ l("ZodMiniString", (e, t) => {
3054
+ ye.init(e, t), D.init(e, t);
3446
3055
  });
3447
- // @__NO_SIDE_EFFECTS__
3448
- function Je(e) {
3449
- return /* @__PURE__ */ Xr(zt, e);
3056
+ function We(e) {
3057
+ return jr(yt, e);
3450
3058
  }
3451
- const U = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3452
- Z.init(e, t), zt.init(e, t);
3453
- }), Ms = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3454
- Ar.init(e, t), U.init(e, t);
3059
+ const F = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3060
+ E.init(e, t), yt.init(e, t);
3061
+ }), ps = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3062
+ _r.init(e, t), F.init(e, t);
3455
3063
  });
3456
- // @__NO_SIDE_EFFECTS__
3457
- function Ds(e) {
3458
- return /* @__PURE__ */ Hr(Ms, e);
3064
+ function ds(e) {
3065
+ return Vr(ps, e);
3459
3066
  }
3460
- const Rs = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3461
- zr.init(e, t), U.init(e, t);
3067
+ const ms = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3068
+ yr.init(e, t), F.init(e, t);
3462
3069
  });
3463
- // @__NO_SIDE_EFFECTS__
3464
- function Fs(e) {
3465
- return /* @__PURE__ */ Qr(Rs, e);
3070
+ function hs(e) {
3071
+ return Br(ms, e);
3466
3072
  }
3467
- const js = /* @__PURE__ */ l("ZodMiniURL", (e, t) => {
3468
- Or.init(e, t), U.init(e, t);
3073
+ const fs = /* @__PURE__ */ l("ZodMiniURL", (e, t) => {
3074
+ vr.init(e, t), F.init(e, t);
3469
3075
  });
3470
- // @__NO_SIDE_EFFECTS__
3471
- function Ws(e) {
3472
- return /* @__PURE__ */ eo(js, e);
3076
+ function bs(e) {
3077
+ return Yr(fs, e);
3473
3078
  }
3474
- const xs = /* @__PURE__ */ l("ZodMiniIPv4", (e, t) => {
3475
- Ir.init(e, t), U.init(e, t);
3079
+ const gs = /* @__PURE__ */ l("ZodMiniIPv4", (e, t) => {
3080
+ Sr.init(e, t), F.init(e, t);
3476
3081
  });
3477
- // @__NO_SIDE_EFFECTS__
3478
- function Us(e) {
3479
- return /* @__PURE__ */ to(xs, e);
3082
+ function ys(e) {
3083
+ return Gr(gs, e);
3480
3084
  }
3481
- const Vs = /* @__PURE__ */ l("ZodMiniIPv6", (e, t) => {
3482
- Cr.init(e, t), U.init(e, t);
3085
+ const _s = /* @__PURE__ */ l("ZodMiniIPv6", (e, t) => {
3086
+ zr.init(e, t), F.init(e, t);
3483
3087
  });
3484
- // @__NO_SIDE_EFFECTS__
3485
- function Js(e) {
3486
- return /* @__PURE__ */ no(Vs, e);
3088
+ function vs(e) {
3089
+ return Kr(_s, e);
3487
3090
  }
3488
- const Bs = /* @__PURE__ */ l("ZodMiniCustomStringFormat", (e, t) => {
3489
- Nr.init(e, t), U.init(e, t);
3091
+ const ks = /* @__PURE__ */ l("ZodMiniCustomStringFormat", (e, t) => {
3092
+ Er.init(e, t), F.init(e, t);
3490
3093
  });
3491
- // @__NO_SIDE_EFFECTS__
3492
- function Ys(e) {
3493
- return /* @__PURE__ */ Ao(Bs, "hostname", tr, e);
3094
+ function ws(e) {
3095
+ return yo(ks, "hostname", Kn, e);
3494
3096
  }
3495
- const At = /* @__PURE__ */ l("ZodMiniNumber", (e, t) => {
3496
- ft.init(e, t), R.init(e, t);
3097
+ const _t = /* @__PURE__ */ l("ZodMiniNumber", (e, t) => {
3098
+ lt.init(e, t), D.init(e, t);
3497
3099
  });
3498
- // @__NO_SIDE_EFFECTS__
3499
- function Be(e) {
3500
- return /* @__PURE__ */ ao(At, e);
3100
+ function Ue(e) {
3101
+ return Qr(_t, e);
3501
3102
  }
3502
- const Gs = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3503
- Lr.init(e, t), At.init(e, t);
3103
+ const Ts = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3104
+ $r.init(e, t), _t.init(e, t);
3504
3105
  });
3505
- // @__NO_SIDE_EFFECTS__
3506
- function Ks(e) {
3507
- return /* @__PURE__ */ uo(Gs, e);
3106
+ function As(e) {
3107
+ return eo(Ts, e);
3508
3108
  }
3509
- const qs = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3510
- Mr.init(e, t), R.init(e, t);
3109
+ const Ss = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3110
+ Or.init(e, t), D.init(e, t);
3511
3111
  });
3512
- // @__NO_SIDE_EFFECTS__
3513
- function Ye(e) {
3514
- return /* @__PURE__ */ co(qs, e);
3112
+ function je(e) {
3113
+ return to(Ss, e);
3515
3114
  }
3516
- const Xs = /* @__PURE__ */ l("ZodMiniAny", (e, t) => {
3517
- Dr.init(e, t), R.init(e, t);
3115
+ const zs = /* @__PURE__ */ l("ZodMiniAny", (e, t) => {
3116
+ Zr.init(e, t), D.init(e, t);
3518
3117
  });
3519
- // @__NO_SIDE_EFFECTS__
3520
- function fe() {
3521
- return /* @__PURE__ */ lo(Xs);
3118
+ function pe() {
3119
+ return no(zs);
3522
3120
  }
3523
- const Hs = /* @__PURE__ */ l("ZodMiniArray", (e, t) => {
3524
- ht.init(e, t), R.init(e, t);
3121
+ const Es = /* @__PURE__ */ l("ZodMiniArray", (e, t) => {
3122
+ pt.init(e, t), D.init(e, t);
3525
3123
  });
3526
- // @__NO_SIDE_EFFECTS__
3527
- function Ge(e, t) {
3528
- return new Hs({
3124
+ function Ve(e, t) {
3125
+ return new Es({
3529
3126
  type: "array",
3530
3127
  element: e,
3531
- ...f(t)
3128
+ ...d(t)
3532
3129
  });
3533
3130
  }
3534
- const Qs = /* @__PURE__ */ l("ZodMiniOptional", (e, t) => {
3535
- Se.init(e, t), R.init(e, t);
3131
+ const $s = /* @__PURE__ */ l("ZodMiniOptional", (e, t) => {
3132
+ dt.init(e, t), D.init(e, t);
3536
3133
  });
3537
- // @__NO_SIDE_EFFECTS__
3538
- function ei(e) {
3539
- return new Qs({
3134
+ function Os(e) {
3135
+ return new $s({
3540
3136
  type: "optional",
3541
3137
  innerType: e
3542
3138
  });
3543
3139
  }
3544
- const ti = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3545
- yt.init(e, t), R.init(e, t);
3546
- });
3547
- // @__NO_SIDE_EFFECTS__
3548
- function S(e, t = {}) {
3549
- return /* @__PURE__ */ _t(ti, e, t);
3550
- }
3551
- // @__NO_SIDE_EFFECTS__
3552
- function Ot(e) {
3553
- return /* @__PURE__ */ vt(e);
3554
- }
3555
- const he = {
3556
- email: { schema: /* @__PURE__ */ Ds() },
3557
- hostname: { schema: /* @__PURE__ */ Ys() },
3558
- ipv4: { schema: /* @__PURE__ */ Us() },
3559
- ipv6: { schema: /* @__PURE__ */ Js() },
3560
- url: { schema: /* @__PURE__ */ Ws() },
3561
- uuid: { schema: /* @__PURE__ */ Fs() },
3562
- date: { schema: Jo() },
3563
- time: { schema: Yo() },
3564
- "date-time": { schema: Uo() },
3565
- duration: { schema: Ko() }
3566
- }, ni = Object.keys(he), ri = (e) => (t, n) => {
3140
+ const Zs = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3141
+ mt.init(e, t), D.init(e, t);
3142
+ });
3143
+ function k(e, t = {}) {
3144
+ return bt(Zs, e, t);
3145
+ }
3146
+ function vt(e) {
3147
+ return gt(e);
3148
+ }
3149
+ const de = {
3150
+ email: { schema: ds() },
3151
+ hostname: { schema: ws() },
3152
+ ipv4: { schema: ys() },
3153
+ ipv6: { schema: vs() },
3154
+ url: { schema: bs() },
3155
+ uuid: { schema: hs() },
3156
+ date: { schema: wo() },
3157
+ time: { schema: Ao() },
3158
+ "date-time": { schema: vo() },
3159
+ duration: { schema: zo() }
3160
+ }, Ps = Object.keys(de), Cs = (e) => (t, n) => {
3567
3161
  switch (t.type) {
3568
3162
  case "string":
3569
- return oi(t, n);
3163
+ return Is(t, n);
3570
3164
  case "integer":
3571
3165
  case "number":
3572
- return ii(t, n);
3166
+ return Ds(t, n);
3573
3167
  case "boolean":
3574
- return ai(t, n);
3168
+ return Ms(t, n);
3575
3169
  case "array":
3576
- return ui(t, n);
3170
+ return Ns(t, n);
3577
3171
  case "custom": {
3578
3172
  if (!e)
3579
3173
  throw new Error(
3580
3174
  'Validator type "custom" requires a customValidators object, but it was not supplied.'
3581
3175
  );
3582
- return ci(t, e);
3176
+ return xs(t, e);
3583
3177
  }
3584
3178
  }
3585
3179
  };
3586
- function b(e, t) {
3180
+ function g(e, t) {
3587
3181
  if (e !== void 0)
3588
3182
  return typeof e == "string" ? e : t?.translate(e.key, e.params, e.default) ?? e.default;
3589
3183
  }
3590
- function oi(e, t) {
3591
- return Y(e, (n) => {
3592
- const r = b(n.messages?.invalid, t);
3593
- let o = r ? /* @__PURE__ */ Je(r) : /* @__PURE__ */ Je();
3184
+ function Is(e, t) {
3185
+ return j(e, (n) => {
3186
+ const r = g(n.messages?.invalid, t);
3187
+ let o = r ? We(r) : We();
3594
3188
  if (n.required === !0) {
3595
- const s = b(n.messages?.required, t) ?? "This field is required";
3596
- o = o.check(/* @__PURE__ */ S((i) => i.length > 0, { error: s }));
3189
+ const s = g(n.messages?.required, t) ?? "This field is required";
3190
+ o = o.check(k((i) => i.length > 0, { error: s }));
3597
3191
  }
3598
3192
  if (typeof n.minLength == "number") {
3599
- const s = b(n.messages?.minLength, t), i = n.minLength;
3193
+ const s = g(n.messages?.minLength, t), i = n.minLength;
3600
3194
  o = o.check(
3601
- s ? /* @__PURE__ */ S((a) => a.length >= i, { error: s }) : /* @__PURE__ */ W(i)
3195
+ s ? k((a) => a.length >= i, { error: s }) : x(i)
3602
3196
  );
3603
3197
  }
3604
3198
  if (typeof n.maxLength == "number") {
3605
- const s = b(n.messages?.maxLength, t), i = n.maxLength;
3199
+ const s = g(n.messages?.maxLength, t), i = n.maxLength;
3606
3200
  o = o.check(
3607
- s ? /* @__PURE__ */ S((a) => a.length <= i, { error: s }) : /* @__PURE__ */ se(i)
3201
+ s ? k((a) => a.length <= i, { error: s }) : ne(i)
3608
3202
  );
3609
3203
  }
3610
3204
  if (typeof n.pattern == "string") {
3611
- const s = b(n.messages?.pattern, t), i = new RegExp(n.pattern);
3205
+ const s = g(n.messages?.pattern, t), i = new RegExp(n.pattern);
3612
3206
  o = o.check(
3613
- s ? /* @__PURE__ */ S((a) => i.test(a), { error: s }) : /* @__PURE__ */ bt(i)
3207
+ s ? k((a) => i.test(a), { error: s }) : ft(i)
3614
3208
  );
3615
3209
  }
3616
3210
  if (n.enum) {
3617
- const s = n.enum, i = b(n.messages?.enum, t);
3618
- o = o.check(/* @__PURE__ */ S((a) => s.includes(a), i ? { error: i } : void 0));
3211
+ const s = n.enum, i = g(n.messages?.enum, t);
3212
+ o = o.check(k((a) => s.includes(a), i ? { error: i } : void 0));
3619
3213
  }
3620
3214
  if (n.const !== void 0) {
3621
- const s = b(n.messages?.const, t);
3622
- o = o.check(/* @__PURE__ */ S((i) => i === n.const, s ? { error: s } : void 0));
3215
+ const s = g(n.messages?.const, t);
3216
+ o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3623
3217
  }
3624
3218
  if (n.format !== void 0)
3625
- if (ni.includes(n.format)) {
3626
- const s = b(n.messages?.format, t);
3219
+ if (Ps.includes(n.format)) {
3220
+ const s = g(n.messages?.format, t);
3627
3221
  o = o.check(
3628
- s ? /* @__PURE__ */ Ot((i, a) => {
3629
- const u = Ke(
3630
- he[n.format].schema,
3222
+ s ? vt((i, a) => {
3223
+ const u = Be(
3224
+ de[n.format].schema,
3631
3225
  i
3632
3226
  );
3633
- qe(u) || a.addIssue({ code: "custom", path: [], message: s });
3634
- }) : he[n.format].schema
3227
+ Ye(u) || a.addIssue({ code: "custom", path: [], message: s });
3228
+ }) : de[n.format].schema
3635
3229
  );
3636
3230
  } else
3637
3231
  console.error(`The string validation format "${n.format}" is not supported`);
3638
3232
  return o;
3639
3233
  });
3640
3234
  }
3641
- const si = (e, t) => {
3235
+ const Ls = (e, t) => {
3642
3236
  if (t === 0)
3643
3237
  return !1;
3644
3238
  const n = e / t;
3645
3239
  return Math.abs(n - Math.round(n)) < 1e-10;
3646
3240
  };
3647
- function ii(e, t) {
3648
- return Y(e, (n) => {
3649
- const r = b(n.messages?.invalid, t);
3650
- let o = r ? /* @__PURE__ */ Be(r) : /* @__PURE__ */ Be();
3651
- if (n.type === "integer" && (o = o.check(/* @__PURE__ */ Ks())), n.minimum !== void 0) {
3652
- const s = b(n.messages?.minimum, t), i = n.minimum;
3653
- o = o.check(s ? /* @__PURE__ */ S((a) => a >= i, { error: s }) : /* @__PURE__ */ mo(i));
3241
+ function Ds(e, t) {
3242
+ return j(e, (n) => {
3243
+ const r = g(n.messages?.invalid, t);
3244
+ let o = r ? Ue(r) : Ue();
3245
+ if (n.type === "integer" && (o = o.check(As())), n.minimum !== void 0) {
3246
+ const s = g(n.messages?.minimum, t), i = n.minimum;
3247
+ o = o.check(s ? k((a) => a >= i, { error: s }) : oo(i));
3654
3248
  }
3655
3249
  if (n.maximum !== void 0) {
3656
- const s = b(n.messages?.maximum, t), i = n.maximum;
3657
- o = o.check(s ? /* @__PURE__ */ S((a) => a <= i, { error: s }) : /* @__PURE__ */ po(i));
3250
+ const s = g(n.messages?.maximum, t), i = n.maximum;
3251
+ o = o.check(s ? k((a) => a <= i, { error: s }) : ro(i));
3658
3252
  }
3659
3253
  if (n.exclusiveMinimum !== void 0) {
3660
- const s = b(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3661
- o = o.check(/* @__PURE__ */ S((a) => a > i, s ? { error: s } : void 0));
3254
+ const s = g(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3255
+ o = o.check(k((a) => a > i, s ? { error: s } : void 0));
3662
3256
  }
3663
3257
  if (n.exclusiveMaximum !== void 0) {
3664
- const s = b(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3665
- o = o.check(/* @__PURE__ */ S((a) => a < i, s ? { error: s } : void 0));
3258
+ const s = g(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3259
+ o = o.check(k((a) => a < i, s ? { error: s } : void 0));
3666
3260
  }
3667
3261
  if (n.multipleOf !== void 0) {
3668
- const s = b(n.messages?.multipleOf, t), i = n.multipleOf;
3262
+ const s = g(n.messages?.multipleOf, t), i = n.multipleOf;
3669
3263
  o = o.check(
3670
- /* @__PURE__ */ S((a) => si(a, i), s ? { error: s } : void 0)
3264
+ k((a) => Ls(a, i), s ? { error: s } : void 0)
3671
3265
  );
3672
3266
  }
3673
3267
  if (n.enum) {
3674
- const s = n.enum, i = b(n.messages?.enum, t);
3675
- o = o.check(/* @__PURE__ */ S((a) => s.includes(a), i ? { error: i } : void 0));
3268
+ const s = n.enum, i = g(n.messages?.enum, t);
3269
+ o = o.check(k((a) => s.includes(a), i ? { error: i } : void 0));
3676
3270
  }
3677
3271
  if (n.const !== void 0) {
3678
- const s = b(n.messages?.const, t);
3679
- o = o.check(/* @__PURE__ */ S((i) => i === n.const, s ? { error: s } : void 0));
3272
+ const s = g(n.messages?.const, t);
3273
+ o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3680
3274
  }
3681
3275
  return o;
3682
3276
  });
3683
3277
  }
3684
- function ai(e, t) {
3685
- return Y(e, (n) => {
3686
- const r = b(n.messages?.invalid, t);
3687
- let o = r ? /* @__PURE__ */ Ye(r) : /* @__PURE__ */ Ye();
3278
+ function Ms(e, t) {
3279
+ return j(e, (n) => {
3280
+ const r = g(n.messages?.invalid, t);
3281
+ let o = r ? je(r) : je();
3688
3282
  if (n.const !== void 0) {
3689
- const s = b(n.messages?.const, t);
3690
- o = o.check(/* @__PURE__ */ S((i) => i === n.const, s ? { error: s } : void 0));
3283
+ const s = g(n.messages?.const, t);
3284
+ o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3691
3285
  }
3692
3286
  return o;
3693
3287
  });
3694
3288
  }
3695
- function ui(e, t) {
3696
- return Y(e, (n) => {
3697
- const r = b(n.messages?.invalid, t);
3698
- let o = r ? /* @__PURE__ */ Ge(/* @__PURE__ */ fe(), r) : /* @__PURE__ */ Ge(/* @__PURE__ */ fe());
3289
+ function Ns(e, t) {
3290
+ return j(e, (n) => {
3291
+ const r = g(n.messages?.invalid, t);
3292
+ let o = r ? Ve(pe(), r) : Ve(pe());
3699
3293
  if (n.required === !0) {
3700
- const s = b(n.messages?.required, t) ?? "This field is required";
3701
- o = o.check(/* @__PURE__ */ S((i) => i.length > 0, { error: s }));
3294
+ const s = g(n.messages?.required, t) ?? "This field is required";
3295
+ o = o.check(k((i) => i.length > 0, { error: s }));
3702
3296
  }
3703
3297
  if (typeof n.minItems == "number") {
3704
- const s = b(n.messages?.minItems, t), i = n.minItems;
3298
+ const s = g(n.messages?.minItems, t), i = n.minItems;
3705
3299
  o = o.check(
3706
- s ? /* @__PURE__ */ S((a) => a.length >= i, { error: s }) : /* @__PURE__ */ W(i)
3300
+ s ? k((a) => a.length >= i, { error: s }) : x(i)
3707
3301
  );
3708
3302
  }
3709
3303
  if (typeof n.maxItems == "number") {
3710
- const s = b(n.messages?.maxItems, t), i = n.maxItems;
3304
+ const s = g(n.messages?.maxItems, t), i = n.maxItems;
3711
3305
  o = o.check(
3712
- s ? /* @__PURE__ */ S((a) => a.length <= i, { error: s }) : /* @__PURE__ */ se(i)
3306
+ s ? k((a) => a.length <= i, { error: s }) : ne(i)
3713
3307
  );
3714
3308
  }
3715
3309
  return o;
3716
3310
  });
3717
3311
  }
3718
- function ci(e, t) {
3719
- return Y(e, (n) => {
3720
- let r = /* @__PURE__ */ fe();
3721
- return Pt(
3312
+ function xs(e, t) {
3313
+ return j(e, (n) => {
3314
+ let r = pe();
3315
+ return Tt(
3722
3316
  Object.keys(n),
3723
3317
  // filter non-custom validator keys
3724
3318
  (o) => o !== "type" && o !== "required",
3725
3319
  (o) => {
3726
3320
  const s = n[o], i = t[o], a = i(s);
3727
3321
  r = r.check(
3728
- /* @__PURE__ */ Ot((u, c) => {
3729
- const p = Ke(
3322
+ vt((u, c) => {
3323
+ const p = Be(
3730
3324
  a,
3731
3325
  u
3732
3326
  );
3733
- if (!qe(p)) {
3734
- const d = p.issues[0];
3327
+ if (!Ye(p)) {
3328
+ const m = p.issues[0];
3735
3329
  c.addIssue({
3736
3330
  code: "custom",
3737
3331
  path: [],
3738
- message: d?.message || `Validation failed for ${o}`
3332
+ message: m?.message || `Validation failed for ${o}`
3739
3333
  });
3740
3334
  }
3741
3335
  })
@@ -3744,11 +3338,11 @@ function ci(e, t) {
3744
3338
  ), r;
3745
3339
  });
3746
3340
  }
3747
- function Y(e, t) {
3341
+ function j(e, t) {
3748
3342
  const n = t(e);
3749
- return e.required ? n : /* @__PURE__ */ ei(n);
3343
+ return e.required ? n : Os(n);
3750
3344
  }
3751
- const li = {
3345
+ const Rs = {
3752
3346
  // ACTION
3753
3347
  button: async () => (await import("./button.element-3a7rRHbA.js")).ButtonElement,
3754
3348
  // INPUTS
@@ -3783,12 +3377,12 @@ const li = {
3783
3377
  markdownText: async () => (await import("./markdown-text.element-B8TfVLIO.js")).MarkdownTextElement,
3784
3378
  renderer: async () => (await import("./renderer.element-CNyMn2Lu.js")).RendererElement
3785
3379
  };
3786
- var pi = Object.defineProperty, di = Object.getOwnPropertyDescriptor, ae = (e, t, n, r) => {
3787
- for (var o = r > 1 ? void 0 : r ? di(t, n) : t, s = e.length - 1, i; s >= 0; s--)
3380
+ var Fs = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, oe = (e, t, n, r) => {
3381
+ for (var o = r > 1 ? void 0 : r ? Ws(t, n) : t, s = e.length - 1, i; s >= 0; s--)
3788
3382
  (i = e[s]) && (o = (r ? i(t, n, o) : i(o)) || o);
3789
- return r && o && pi(t, n, o), o;
3383
+ return r && o && Fs(t, n, o), o;
3790
3384
  };
3791
- let B = class extends Zt {
3385
+ let U = class extends At {
3792
3386
  constructor() {
3793
3387
  super(...arguments), this.autocomplete = void 0;
3794
3388
  }
@@ -3802,10 +3396,10 @@ let B = class extends Zt {
3802
3396
  return this;
3803
3397
  }
3804
3398
  render() {
3805
- const e = this.config, t = Cn(e.formDef, e.formSelectors, e.formConfig), n = {
3399
+ const e = this.config, t = zn(e.formDef, e.formSelectors, e.formConfig), n = {
3806
3400
  formDef: t.formDef,
3807
3401
  widgetLoaders: {
3808
- ...li,
3402
+ ...Rs,
3809
3403
  ...t.widgetLoaders,
3810
3404
  ...e.customWidgetLoaders ?? {}
3811
3405
  },
@@ -3820,10 +3414,10 @@ let B = class extends Zt {
3820
3414
  data: e.data,
3821
3415
  meta: e.meta,
3822
3416
  formName: e.formName
3823
- }, r = ri({
3417
+ }, r = Cs({
3824
3418
  ...e.customValidators ?? {}
3825
3419
  }), o = t.formEvent, s = o ? (i) => o(i.detail) : void 0;
3826
- return It`
3420
+ return St`
3827
3421
  <gui-core-form
3828
3422
  .config=${n}
3829
3423
  .validators=${r}
@@ -3833,19 +3427,19 @@ let B = class extends Zt {
3833
3427
  `;
3834
3428
  }
3835
3429
  };
3836
- ae([
3837
- Xe({ attribute: !1 })
3838
- ], B.prototype, "config", 2);
3839
- ae([
3840
- Xe({ type: String })
3841
- ], B.prototype, "autocomplete", 2);
3842
- ae([
3843
- Ct("gui-core-form")
3844
- ], B.prototype, "coreForm", 2);
3845
- B = ae([
3846
- Nt("gui-form")
3847
- ], B);
3430
+ oe([
3431
+ Ge({ attribute: !1 })
3432
+ ], U.prototype, "config", 2);
3433
+ oe([
3434
+ Ge({ type: String })
3435
+ ], U.prototype, "autocomplete", 2);
3436
+ oe([
3437
+ zt("gui-core-form")
3438
+ ], U.prototype, "coreForm", 2);
3439
+ U = oe([
3440
+ Et("gui-form")
3441
+ ], U);
3848
3442
  export {
3849
- B as FormElement,
3850
- li as widgetLoaders
3443
+ U as FormElement,
3444
+ Rs as widgetLoaders
3851
3445
  };