@gitroll/tacitt-cli 0.6.5 → 0.6.7

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.
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
2
2
  import { isIP } from "node:net";
3
3
  import { domainToASCII } from "node:url";
4
4
  import { posix, win32 } from "node:path";
5
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/util.js
5
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/util.js
6
6
  function getEnumValues(entries) {
7
7
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
8
8
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -14,14 +14,22 @@ function jsonStringifyReplacer(_, value) {
14
14
  if (typeof value === "bigint") return value.toString();
15
15
  return value;
16
16
  }
17
- function cached(getter) {
18
- return { get value() {
19
- {
20
- const value = getter();
21
- Object.defineProperty(this, "value", { value });
22
- return value;
17
+ var Cached = class {
18
+ constructor(getter) {
19
+ this._getter = getter;
20
+ this._value = void 0;
21
+ }
22
+ get value() {
23
+ const getter = this._getter;
24
+ if (getter !== void 0) {
25
+ this._value = getter();
26
+ this._getter = void 0;
23
27
  }
24
- } };
28
+ return this._value;
29
+ }
30
+ };
31
+ function cached(getter) {
32
+ return new Cached(getter);
25
33
  }
26
34
  function nullish(input) {
27
35
  return input === null || input === void 0;
@@ -46,6 +54,58 @@ function assignProp(target, prop, value) {
46
54
  configurable: true
47
55
  });
48
56
  }
57
+ /**
58
+ * Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it.
59
+ *
60
+ * Its keys and descriptors read without invoking anything, which is what lets a discriminated union check its discriminator, and the cycle walk read a shape, without resolving a getter that references the schema being constructed. A def that answers `shape` from an accessor of its own has none.
61
+ */
62
+ function rawShape(def) {
63
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
64
+ return desc?.get ? desc.get.raw : desc?.value;
65
+ }
66
+ function sourceShape(schema) {
67
+ return rawShape(schema._zod.def) ?? schema._zod.def.shape;
68
+ }
69
+ function deferProp(target, key, getter) {
70
+ Object.defineProperty(target, key, {
71
+ get() {
72
+ const value = getter();
73
+ assignProp(this, key, value);
74
+ return value;
75
+ },
76
+ enumerable: true,
77
+ configurable: true
78
+ });
79
+ }
80
+ function putProp(target, key, value) {
81
+ if (key in target) assignProp(target, key, value);
82
+ else target[key] = value;
83
+ }
84
+ /**
85
+ * Copies `keys` of `source`'s shape onto `target`, each value passed through `wrap`.
86
+ *
87
+ * A key the source has resolved is copied through now, so the derived shape states it outright and nothing has to resolve it to learn what it holds. A key the source still defers stays deferred, and reads back through the source's own `shape`, so it resolves once and both shapes get that one schema.
88
+ */
89
+ function mirrorShape(target, source, keys, wrap) {
90
+ const raw = sourceShape(source);
91
+ for (const key of keys) {
92
+ const desc = Object.getOwnPropertyDescriptor(raw, key);
93
+ if (!desc.enumerable) continue;
94
+ if (desc.get) deferProp(target, key, () => {
95
+ const value = source._zod.def.shape[key];
96
+ return wrap ? wrap(value, key) : value;
97
+ });
98
+ else putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
99
+ }
100
+ }
101
+ function mirrorProps(target, source) {
102
+ for (const key of Reflect.ownKeys(source)) {
103
+ const desc = Object.getOwnPropertyDescriptor(source, key);
104
+ if (!desc.enumerable) continue;
105
+ if (desc.get) deferProp(target, key, () => source[key]);
106
+ else putProp(target, key, desc.value);
107
+ }
108
+ }
49
109
  function mergeDefs(...defs) {
50
110
  const mergedDescriptors = {};
51
111
  for (const def of defs) {
@@ -136,39 +196,39 @@ const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({
136
196
  float32: [-34028234663852886e22, 34028234663852886e22],
137
197
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
138
198
  }))();
199
+ const BIGINT_FORMAT_RANGES = {
200
+ int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
201
+ uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
202
+ };
139
203
  function pick(schema, mask) {
140
204
  const currDef = schema._zod.def;
141
205
  const checks = currDef.checks;
142
206
  if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
143
- return clone(schema, mergeDefs(schema._zod.def, {
144
- get shape() {
145
- const newShape = {};
146
- for (const key of Reflect.ownKeys(mask)) {
147
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) throw new Error(`Unrecognized key: "${String(key)}"`);
148
- if (!mask[key]) continue;
149
- assignProp(newShape, key, currDef.shape[key]);
150
- }
151
- assignProp(this, "shape", newShape);
152
- return newShape;
153
- },
207
+ const newShape = {};
208
+ mirrorShape(newShape, schema, maskedKeys(schema, mask));
209
+ return clone(schema, mergeDefs(currDef, {
210
+ shape: newShape,
154
211
  checks: []
155
212
  }));
156
213
  }
214
+ function maskedKeys(schema, mask) {
215
+ const raw = sourceShape(schema);
216
+ const keys = [];
217
+ for (const key of Reflect.ownKeys(mask)) {
218
+ if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) throw new Error(`Unrecognized key: "${String(key)}"`);
219
+ if (mask[key]) keys.push(key);
220
+ }
221
+ return keys;
222
+ }
157
223
  function omit(schema, mask) {
158
224
  const currDef = schema._zod.def;
159
225
  const checks = currDef.checks;
160
226
  if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
161
- return clone(schema, mergeDefs(schema._zod.def, {
162
- get shape() {
163
- const newShape = { ...schema._zod.def.shape };
164
- for (const key of Reflect.ownKeys(mask)) {
165
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) throw new Error(`Unrecognized key: "${String(key)}"`);
166
- if (!mask[key]) continue;
167
- delete newShape[key];
168
- }
169
- assignProp(this, "shape", newShape);
170
- return newShape;
171
- },
227
+ const omitted = new Set(maskedKeys(schema, mask));
228
+ const newShape = {};
229
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
230
+ return clone(schema, mergeDefs(currDef, {
231
+ shape: newShape,
172
232
  checks: []
173
233
  }));
174
234
  }
@@ -176,41 +236,29 @@ function extend(schema, shape) {
176
236
  if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
177
237
  const checks = schema._zod.def.checks;
178
238
  if (checks && checks.length > 0) {
179
- const existingShape = schema._zod.def.shape;
239
+ const existingShape = sourceShape(schema);
180
240
  for (const key of Reflect.ownKeys(shape)) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
181
241
  }
182
- return clone(schema, mergeDefs(schema._zod.def, { get shape() {
183
- const _shape = {
184
- ...schema._zod.def.shape,
185
- ...shape
186
- };
187
- assignProp(this, "shape", _shape);
188
- return _shape;
189
- } }));
242
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
243
+ }
244
+ function extended(schema, shape) {
245
+ const newShape = {};
246
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));
247
+ mirrorProps(newShape, shape);
248
+ return newShape;
190
249
  }
191
250
  function safeExtend(schema, shape) {
192
251
  if (!isPlainObject(shape)) throw new Error("Invalid input to safeExtend: expected a plain object");
193
- return clone(schema, mergeDefs(schema._zod.def, { get shape() {
194
- const _shape = {
195
- ...schema._zod.def.shape,
196
- ...shape
197
- };
198
- assignProp(this, "shape", _shape);
199
- return _shape;
200
- } }));
252
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
201
253
  }
202
254
  function merge(a, b) {
203
255
  if (!b?._zod?.def) throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
204
256
  if (a._zod.def.checks?.length) throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
257
+ const newShape = {};
258
+ mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
259
+ mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
205
260
  return clone(a, mergeDefs(a._zod.def, {
206
- get shape() {
207
- const _shape = {
208
- ...a._zod.def.shape,
209
- ...b._zod.def.shape
210
- };
211
- assignProp(this, "shape", _shape);
212
- return _shape;
213
- },
261
+ shape: newShape,
214
262
  get catchall() {
215
263
  return b._zod.def.catchall;
216
264
  },
@@ -220,47 +268,25 @@ function merge(a, b) {
220
268
  function partial(Class, schema, mask, name = "partial") {
221
269
  const checks = schema._zod.def.checks;
222
270
  if (checks && checks.length > 0) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
271
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
272
+ const newShape = {};
273
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class && ((value, key) => selected && !selected.has(key) ? value : new Class({
274
+ type: "optional",
275
+ innerType: value
276
+ })));
223
277
  return clone(schema, mergeDefs(schema._zod.def, {
224
- get shape() {
225
- const oldShape = schema._zod.def.shape;
226
- const shape = { ...oldShape };
227
- if (mask) for (const key of Reflect.ownKeys(mask)) {
228
- if (!Object.prototype.hasOwnProperty.call(oldShape, key)) throw new Error(`Unrecognized key: "${String(key)}"`);
229
- if (!mask[key]) continue;
230
- shape[key] = Class ? new Class({
231
- type: "optional",
232
- innerType: oldShape[key]
233
- }) : oldShape[key];
234
- }
235
- else for (const key of Reflect.ownKeys(oldShape)) shape[key] = Class ? new Class({
236
- type: "optional",
237
- innerType: oldShape[key]
238
- }) : oldShape[key];
239
- assignProp(this, "shape", shape);
240
- return shape;
241
- },
278
+ shape: newShape,
242
279
  checks: []
243
280
  }));
244
281
  }
245
282
  function required(Class, schema, mask) {
246
- return clone(schema, mergeDefs(schema._zod.def, { get shape() {
247
- const oldShape = schema._zod.def.shape;
248
- const shape = { ...oldShape };
249
- if (mask) for (const key of Reflect.ownKeys(mask)) {
250
- if (!Object.prototype.hasOwnProperty.call(shape, key)) throw new Error(`Unrecognized key: "${String(key)}"`);
251
- if (!mask[key]) continue;
252
- shape[key] = new Class({
253
- type: "nonoptional",
254
- innerType: oldShape[key]
255
- });
256
- }
257
- else for (const key of Reflect.ownKeys(oldShape)) shape[key] = new Class({
258
- type: "nonoptional",
259
- innerType: oldShape[key]
260
- });
261
- assignProp(this, "shape", shape);
262
- return shape;
263
- } }));
283
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
284
+ const newShape = {};
285
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => selected && !selected.has(key) ? value : new Class({
286
+ type: "nonoptional",
287
+ innerType: value
288
+ }));
289
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));
264
290
  }
265
291
  function aborted(x, startIndex = 0) {
266
292
  if (x.aborted === true) return true;
@@ -283,6 +309,17 @@ function prefixIssues(path, issues) {
283
309
  function unwrapMessage(message) {
284
310
  return typeof message === "string" ? message : message?.message;
285
311
  }
312
+ /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
313
+ function sizeCaps(defChecks) {
314
+ const caps = [];
315
+ for (const ch of defChecks ?? []) {
316
+ const d = ch._zod.def;
317
+ if (!/_(length|size)$|_equals$/.test(d.check)) break;
318
+ const max = d.maximum ?? d.length ?? d.size;
319
+ if (max >= 0) caps.push([max, ch]);
320
+ }
321
+ return caps;
322
+ }
286
323
  function attachSchema(issues, start, inst) {
287
324
  var _a;
288
325
  for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
@@ -296,11 +333,15 @@ function finalizeIssue(iss, ctx, config) {
296
333
  }
297
334
  const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0;
298
335
  const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
299
- const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;
300
- rest.path ?? (rest.path = []);
301
- rest.message = message;
302
- if (ctx?.reportInput) rest.input = _input;
303
- return rest;
336
+ const full = {};
337
+ for (const k of Object.keys(iss)) {
338
+ if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__") continue;
339
+ full[k] = iss[k];
340
+ }
341
+ full.path ?? (full.path = []);
342
+ full.message = message;
343
+ if (ctx?.reportInput) full.input = iss.input;
344
+ return full;
304
345
  }
305
346
  const highSurrogate = /[\uD800-\uDBFF]/;
306
347
  function codePointLength(str) {
@@ -370,6 +411,23 @@ function own(inst, key, value, enumerable = true) {
370
411
  function hide(inst, key, value) {
371
412
  return own(inst, key, value, false);
372
413
  }
414
+ /** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */
415
+ function derived(computes, table) {
416
+ for (const key in computes) {
417
+ const compute = computes[key];
418
+ Object.defineProperty(table, key, {
419
+ configurable: true,
420
+ enumerable: true,
421
+ get() {
422
+ return own(this, key, compute(this));
423
+ },
424
+ set(value) {
425
+ own(this, key, value);
426
+ }
427
+ });
428
+ }
429
+ return table;
430
+ }
373
431
  function defineBound(proto, key, fn) {
374
432
  Object.defineProperty(proto, key, {
375
433
  configurable: true,
@@ -478,9 +536,9 @@ function constantCatch(value) {
478
536
  return fn;
479
537
  }
480
538
  //#endregion
481
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/core.js
539
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/core.js
482
540
  var _a$1;
483
- const _zodDesc$1 = {
541
+ const _zodDesc = {
484
542
  value: void 0,
485
543
  enumerable: false
486
544
  };
@@ -517,14 +575,13 @@ function $constructor(name, initializer, proto, params) {
517
575
  const initialized = protoMembers && /* @__PURE__ */ new WeakSet();
518
576
  function init(inst, def) {
519
577
  if (!inst._zod) {
520
- _zodDesc$1.value = new Internals(def);
578
+ _zodDesc.value = new Internals(def);
521
579
  try {
522
- Object.defineProperty(inst, "_zod", _zodDesc$1);
580
+ Object.defineProperty(inst, "_zod", _zodDesc);
523
581
  } finally {
524
- _zodDesc$1.value = void 0;
582
+ _zodDesc.value = void 0;
525
583
  }
526
- }
527
- if (inst._zod.traits.has(name)) return;
584
+ } else if (inst._zod.traits.has(name)) return;
528
585
  inst._zod.traits.add(name);
529
586
  initializer(inst, def);
530
587
  if (initialized) {
@@ -585,7 +642,7 @@ function config(newConfig) {
585
642
  return globalConfig;
586
643
  }
587
644
  //#endregion
588
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/errors.js
645
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/errors.js
589
646
  function _getMessage() {
590
647
  const internals = this._zod;
591
648
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -600,10 +657,6 @@ const _messageDesc = {
600
657
  enumerable: true,
601
658
  configurable: true
602
659
  };
603
- const _zodDesc = {
604
- value: void 0,
605
- enumerable: false
606
- };
607
660
  const _issuesDesc = {
608
661
  value: void 0,
609
662
  enumerable: false
@@ -611,11 +664,8 @@ const _issuesDesc = {
611
664
  const _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
612
665
  const initializer$1 = (inst, def) => {
613
666
  inst.name = "$ZodError";
614
- _zodDesc.value = inst._zod;
615
- Object.defineProperty(inst, "_zod", _zodDesc);
616
667
  _issuesDesc.value = def;
617
668
  Object.defineProperty(inst, "issues", _issuesDesc);
618
- _zodDesc.value = void 0;
619
669
  _issuesDesc.value = void 0;
620
670
  Object.defineProperty(inst, "message", _messageDesc);
621
671
  const proto = Object.getPrototypeOf(inst);
@@ -644,7 +694,7 @@ const initializer$1 = (inst, def) => {
644
694
  }
645
695
  };
646
696
  const $ZodError = $constructor("$ZodError", initializer$1);
647
- const $ZodRealError = $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
697
+ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
648
698
  /** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
649
699
  * ("toString", "constructor") would otherwise read through to the prototype, and assigning
650
700
  * "__proto__" would hit the setter instead of creating a key. */
@@ -708,7 +758,7 @@ function formatError(error, mapper = (issue) => issue.message) {
708
758
  return fieldErrors;
709
759
  }
710
760
  //#endregion
711
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/parse.js
761
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/parse.js
712
762
  function finalizeParams(callee, params) {
713
763
  return {
714
764
  callee: params?.callee ?? callee,
@@ -765,15 +815,30 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
765
815
  issues: []
766
816
  }, ctx);
767
817
  if (result instanceof Promise) throw new $ZodAsyncError();
768
- return result.issues.length ? {
769
- success: false,
770
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
771
- } : {
818
+ return result.issues.length ? failure(_Err, result.issues, ctx) : {
772
819
  success: true,
773
820
  data: result.value
774
821
  };
775
822
  };
776
- const safeParse$1 = /* @__PURE__*/ _safeParse($ZodRealError);
823
+ function failure(Err, issues, ctx) {
824
+ let error;
825
+ return {
826
+ success: false,
827
+ get error() {
828
+ if (!error) {
829
+ error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
830
+ issues = void 0;
831
+ ctx = void 0;
832
+ }
833
+ return error;
834
+ },
835
+ set error(e) {
836
+ error = e;
837
+ issues = void 0;
838
+ ctx = void 0;
839
+ }
840
+ };
841
+ }
777
842
  const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
778
843
  const ctx = _ctx ? {
779
844
  ..._ctx,
@@ -784,15 +849,61 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
784
849
  issues: []
785
850
  }, ctx);
786
851
  if (result instanceof Promise) result = await result;
787
- return result.issues.length ? {
788
- success: false,
789
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
790
- } : {
852
+ return result.issues.length ? failure(_Err, result.issues, ctx) : {
791
853
  success: true,
792
854
  data: result.value
793
855
  };
794
856
  };
795
- const safeParseAsync$1 = /* @__PURE__*/ _safeParseAsync($ZodRealError);
857
+ const COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
858
+ const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
859
+ const validate = ((schema, value, _ctx) => {
860
+ const validator = schema._zod.bag.validator;
861
+ if (validator !== void 0) {
862
+ if (validator(value) !== COMPILE_INVALID) return true;
863
+ if (validator.definite === true && _ctx === void 0) return false;
864
+ }
865
+ return validateFallback(schema, value, _ctx);
866
+ });
867
+ function validateFallback(schema, value, _ctx) {
868
+ const ctx = _ctx ? {
869
+ ..._ctx,
870
+ async: false,
871
+ abortEarly: true
872
+ } : {
873
+ async: false,
874
+ abortEarly: true
875
+ };
876
+ const fallbackRun = schema._zod.bag.fallbackRun;
877
+ let result;
878
+ if (fallbackRun) {
879
+ ctx[COMPILE_FALLBACK] = true;
880
+ result = fallbackRun({
881
+ value,
882
+ issues: []
883
+ }, ctx);
884
+ } else result = schema._zod.run({
885
+ value,
886
+ issues: []
887
+ }, ctx);
888
+ if (result instanceof Promise) throw new $ZodAsyncError();
889
+ return result.issues.length === 0;
890
+ }
891
+ const validateAsync$1 = async (schema, value, _ctx) => {
892
+ const ctx = _ctx ? {
893
+ ..._ctx,
894
+ async: true,
895
+ abortEarly: true
896
+ } : {
897
+ async: true,
898
+ abortEarly: true
899
+ };
900
+ let result = schema._zod.run({
901
+ value,
902
+ issues: []
903
+ }, ctx);
904
+ if (result instanceof Promise) result = await result;
905
+ return result.issues.length === 0;
906
+ };
796
907
  const _encode = (_Err) => {
797
908
  const parse = _parse(_Err);
798
909
  const fn = (schema, value, _ctx, _params) => {
@@ -850,7 +961,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
850
961
  return _safeParseAsync(_Err)(schema, value, _ctx);
851
962
  };
852
963
  //#endregion
853
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/regexes.js
964
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/regexes.js
854
965
  /**
855
966
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
856
967
  * (timestamps embedded in the id). Use {@link cuid2} instead.
@@ -877,8 +988,8 @@ const uuid$1 = (version) => {
877
988
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
878
989
  };
879
990
  /** Practical email validation */
880
- const email$1 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
881
- const _emoji$1 = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
991
+ const email$1 = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
992
+ const _emoji$1 = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
882
993
  function emoji() {
883
994
  return new RegExp(_emoji$1, "u");
884
995
  }
@@ -887,7 +998,7 @@ const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:
887
998
  const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
888
999
  const cidrv6 = /^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
889
1000
  const base64$1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
890
- const base64url = /^[A-Za-z0-9_-]*$/;
1001
+ const base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
891
1002
  const httpProtocol = /^https?$/;
892
1003
  const e164 = /^\+[1-9]\d{6,14}$/;
893
1004
  const dateSource = `(?:(?:\\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])))`;
@@ -915,18 +1026,14 @@ function datetime$1(args) {
915
1026
  const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;
916
1027
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
917
1028
  }
918
- const string$1 = (params) => {
919
- const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
920
- return new RegExp(`^${regex}$`);
921
- };
922
- const integer = /^-?\d+$/;
1029
+ const anyString = /^[\s\S]{0,}$/;
923
1030
  const number$1 = /^-?\d+(?:\.\d+)?$/;
924
1031
  const boolean$1 = /^(?:true|false)$/i;
925
1032
  const _null$2 = /^null$/i;
926
1033
  const lowercase = /^[^A-Z]*$/;
927
1034
  const uppercase = /^[^a-z]*$/;
928
1035
  //#endregion
929
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/checks.js
1036
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/checks.js
930
1037
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
931
1038
  var _a;
932
1039
  inst._zod ?? (inst._zod = {});
@@ -946,14 +1053,6 @@ const numericOriginMap = {
946
1053
  const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
947
1054
  $ZodCheck.init(inst, def);
948
1055
  const origin = numericOriginMap[typeof def.value];
949
- inst._zod.onattach.push((inst) => {
950
- const bag = inst._zod.bag;
951
- const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
952
- if (def.value < curr) {
953
- if (def.inclusive) bag.maximum = def.value;
954
- else bag.exclusiveMaximum = def.value;
955
- }
956
- });
957
1056
  inst._zod.check = (payload) => {
958
1057
  if (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;
959
1058
  payload.issues.push({
@@ -970,14 +1069,6 @@ const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst,
970
1069
  const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
971
1070
  $ZodCheck.init(inst, def);
972
1071
  const origin = numericOriginMap[typeof def.value];
973
- inst._zod.onattach.push((inst) => {
974
- const bag = inst._zod.bag;
975
- const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
976
- if (def.value > curr) {
977
- if (def.inclusive) bag.minimum = def.value;
978
- else bag.exclusiveMinimum = def.value;
979
- }
980
- });
981
1072
  inst._zod.check = (payload) => {
982
1073
  if (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;
983
1074
  payload.issues.push({
@@ -993,10 +1084,6 @@ const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan",
993
1084
  });
994
1085
  const $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
995
1086
  $ZodCheck.init(inst, def);
996
- inst._zod.onattach.push((inst) => {
997
- var _a;
998
- (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
999
- });
1000
1087
  inst._zod.check = (payload) => {
1001
1088
  if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
1002
1089
  if (typeof payload.value === "bigint" ? def.value !== BigInt(0) && payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
@@ -1016,13 +1103,6 @@ const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat"
1016
1103
  const isInt = def.format?.includes("int");
1017
1104
  const origin = isInt ? "int" : "number";
1018
1105
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
1019
- inst._zod.onattach.push((inst) => {
1020
- const bag = inst._zod.bag;
1021
- bag.format = def.format;
1022
- bag.minimum = minimum;
1023
- bag.maximum = maximum;
1024
- if (isInt) bag.pattern = integer;
1025
- });
1026
1106
  inst._zod.check = (payload) => {
1027
1107
  const input = payload.value;
1028
1108
  if (isInt) {
@@ -1085,10 +1165,6 @@ const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (ins
1085
1165
  var _a;
1086
1166
  $ZodCheck.init(inst, def);
1087
1167
  (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1088
- inst._zod.onattach.push((inst) => {
1089
- const curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1090
- if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
1091
- });
1092
1168
  inst._zod.check = (payload) => {
1093
1169
  const input = payload.value;
1094
1170
  const units = input.length;
@@ -1109,10 +1185,6 @@ const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (ins
1109
1185
  var _a;
1110
1186
  $ZodCheck.init(inst, def);
1111
1187
  (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1112
- inst._zod.onattach.push((inst) => {
1113
- const curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1114
- if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
1115
- });
1116
1188
  inst._zod.check = (payload) => {
1117
1189
  const input = payload.value;
1118
1190
  const units = input.length;
@@ -1133,12 +1205,6 @@ const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals"
1133
1205
  var _a;
1134
1206
  $ZodCheck.init(inst, def);
1135
1207
  (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1136
- inst._zod.onattach.push((inst) => {
1137
- const bag = inst._zod.bag;
1138
- bag.minimum = def.length;
1139
- bag.maximum = def.length;
1140
- bag.length = def.length;
1141
- });
1142
1208
  inst._zod.check = (payload) => {
1143
1209
  const input = payload.value;
1144
1210
  const units = input.length;
@@ -1166,14 +1232,6 @@ const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals"
1166
1232
  const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
1167
1233
  var _a, _b;
1168
1234
  $ZodCheck.init(inst, def);
1169
- inst._zod.onattach.push((inst) => {
1170
- const bag = inst._zod.bag;
1171
- bag.format = def.format;
1172
- if (def.pattern) {
1173
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
1174
- bag.patterns.add(def.pattern);
1175
- }
1176
- });
1177
1235
  if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1178
1236
  def.pattern.lastIndex = 0;
1179
1237
  if (def.pattern.test(payload.value)) return;
@@ -1216,13 +1274,7 @@ const $ZodCheckUpperCase = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (ins
1216
1274
  const $ZodCheckIncludes = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (inst, def) => {
1217
1275
  $ZodCheck.init(inst, def);
1218
1276
  const escapedRegex = escapeRegex(def.includes);
1219
- const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
1220
- def.pattern = pattern;
1221
- inst._zod.onattach.push((inst) => {
1222
- const bag = inst._zod.bag;
1223
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
1224
- bag.patterns.add(pattern);
1225
- });
1277
+ def.pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
1226
1278
  inst._zod.check = (payload) => {
1227
1279
  if (payload.value.includes(def.includes, def.position)) return;
1228
1280
  payload.issues.push({
@@ -1240,11 +1292,6 @@ const $ZodCheckStartsWith = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (i
1240
1292
  $ZodCheck.init(inst, def);
1241
1293
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
1242
1294
  def.pattern ?? (def.pattern = pattern);
1243
- inst._zod.onattach.push((inst) => {
1244
- const bag = inst._zod.bag;
1245
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
1246
- bag.patterns.add(pattern);
1247
- });
1248
1295
  inst._zod.check = (payload) => {
1249
1296
  if (payload.value.startsWith(def.prefix)) return;
1250
1297
  payload.issues.push({
@@ -1262,11 +1309,6 @@ const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst,
1262
1309
  $ZodCheck.init(inst, def);
1263
1310
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
1264
1311
  def.pattern ?? (def.pattern = pattern);
1265
- inst._zod.onattach.push((inst) => {
1266
- const bag = inst._zod.bag;
1267
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
1268
- bag.patterns.add(pattern);
1269
- });
1270
1312
  inst._zod.check = (payload) => {
1271
1313
  if (payload.value.endsWith(def.suffix)) return;
1272
1314
  payload.issues.push({
@@ -1287,7 +1329,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
1287
1329
  };
1288
1330
  });
1289
1331
  //#endregion
1290
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/doc.js
1332
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/doc.js
1291
1333
  var Doc = class {
1292
1334
  constructor(args = [], closed = {}) {
1293
1335
  this.content = [];
@@ -1297,8 +1339,11 @@ var Doc = class {
1297
1339
  }
1298
1340
  indented(fn) {
1299
1341
  this.indent += 1;
1300
- fn(this);
1301
- this.indent -= 1;
1342
+ try {
1343
+ fn(this);
1344
+ } finally {
1345
+ this.indent -= 1;
1346
+ }
1302
1347
  }
1303
1348
  write(arg) {
1304
1349
  if (typeof arg === "function") {
@@ -1318,14 +1363,14 @@ var Doc = class {
1318
1363
  }
1319
1364
  };
1320
1365
  //#endregion
1321
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/versions.js
1366
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/versions.js
1322
1367
  const version = {
1323
1368
  major: 4,
1324
- minor: 5,
1325
- patch: 4
1369
+ minor: 6,
1370
+ patch: 6
1326
1371
  };
1327
1372
  //#endregion
1328
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/schemas.js
1373
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/schemas.js
1329
1374
  const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1330
1375
  var _a;
1331
1376
  inst ?? (inst = {});
@@ -1414,15 +1459,26 @@ const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1414
1459
  }
1415
1460
  });
1416
1461
  /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
1417
- const toStandardResult = (r) => r.success ? { value: r.data } : { issues: r.error?.issues };
1462
+ const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value };
1463
+ async function validateAsync(inst, value) {
1464
+ const ctx = { async: true };
1465
+ return toStandardResult(await inst._zod.run({
1466
+ value,
1467
+ issues: []
1468
+ }, ctx), ctx);
1469
+ }
1418
1470
  function standardProps(inst) {
1419
1471
  return {
1420
1472
  validate: (value) => {
1473
+ const ctx = { async: false };
1421
1474
  try {
1422
- return toStandardResult(safeParse$1(inst, value));
1423
- } catch (_) {
1424
- return safeParseAsync$1(inst, value).then(toStandardResult);
1425
- }
1475
+ const r = inst._zod.run({
1476
+ value,
1477
+ issues: []
1478
+ }, ctx);
1479
+ if (!(r instanceof Promise)) return toStandardResult(r, ctx);
1480
+ } catch (_) {}
1481
+ return validateAsync(inst, value);
1426
1482
  },
1427
1483
  vendor: "zod",
1428
1484
  version: 1
@@ -1430,7 +1486,7 @@ function standardProps(inst) {
1430
1486
  }
1431
1487
  const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
1432
1488
  $ZodType.init(inst, def);
1433
- inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
1489
+ inst._zod.pattern = def.pattern ?? anyString;
1434
1490
  inst._zod.parse = (payload, _) => {
1435
1491
  if (def.coerce) try {
1436
1492
  payload.value = String(payload.value);
@@ -1474,10 +1530,27 @@ const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
1474
1530
  def.pattern ?? (def.pattern = email$1);
1475
1531
  $ZodStringFormat.init(inst, def);
1476
1532
  });
1477
- /** Parses a URL for `$ZodURL`, applying the one guard the URL constructor cannot express. Returns the parsed URL, or a code naming the stage that rejected it — the runtime needs that distinction to pick an issue note, and compiled code only needs to know it is not a URL. */
1533
+ function canParseURL(input) {
1534
+ try {
1535
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
1536
+ new URL(input);
1537
+ return true;
1538
+ } catch {
1539
+ return false;
1540
+ }
1541
+ }
1542
+ function validateURL(trimmed, def) {
1543
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
1544
+ return parseURLObject(trimmed, def);
1545
+ }
1546
+ /** Parses a URL while preserving the non-normalizing HTTP guard. */
1478
1547
  function parseURLObject(trimmed, def) {
1479
1548
  if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
1480
1549
  try {
1550
+ if (typeof URL !== "undefined") {
1551
+ const URLStatic = URL;
1552
+ if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
1553
+ }
1481
1554
  return new URL(trimmed);
1482
1555
  } catch {
1483
1556
  return 2;
@@ -1501,7 +1574,7 @@ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1501
1574
  inst._zod.check = (payload) => {
1502
1575
  try {
1503
1576
  const trimmed = payload.value.trim();
1504
- const url = parseURLObject(trimmed, def);
1577
+ const url = validateURL(trimmed, def);
1505
1578
  if (url === 1) {
1506
1579
  payload.issues.push({
1507
1580
  code: "invalid_format",
@@ -1523,6 +1596,10 @@ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1523
1596
  });
1524
1597
  return;
1525
1598
  }
1599
+ if (url === true) {
1600
+ payload.value = stripTabAndNewline(trimmed);
1601
+ return;
1602
+ }
1526
1603
  if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
1527
1604
  code: "invalid_format",
1528
1605
  format: "url",
@@ -1591,12 +1668,6 @@ const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
1591
1668
  const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
1592
1669
  def.pattern ?? (def.pattern = datetime$1(def));
1593
1670
  $ZodStringFormat.init(inst, def);
1594
- if (def.local || def.precision === -1) {
1595
- inst._zod.bag.laxFormat = true;
1596
- inst._zod.onattach.push((s) => {
1597
- s._zod.bag.laxFormat = true;
1598
- });
1599
- }
1600
1671
  });
1601
1672
  const $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
1602
1673
  def.pattern ?? (def.pattern = date);
@@ -1613,23 +1684,16 @@ const $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def
1613
1684
  const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
1614
1685
  def.pattern ?? (def.pattern = ipv4);
1615
1686
  $ZodStringFormat.init(inst, def);
1616
- inst._zod.bag.format = `ipv4`;
1617
1687
  });
1618
1688
  /** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL("http://[...]")` parses an authority, not an address, so `@` and `\` re-delimit it and `"::@1\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `"::1\n"` validated as `::1`. */
1619
1689
  const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
1620
1690
  function isValidIPv6(value) {
1621
1691
  if (!ipv6Alphabet.test(value)) return false;
1622
- try {
1623
- new URL(`http://[${value}]`);
1624
- return true;
1625
- } catch {
1626
- return false;
1627
- }
1692
+ return canParseURL(`http://[${value}]`);
1628
1693
  }
1629
1694
  const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1630
1695
  def.pattern ?? (def.pattern = ipv6);
1631
1696
  $ZodStringFormat.init(inst, def);
1632
- inst._zod.bag.format = `ipv6`;
1633
1697
  inst._zod.check = (payload) => {
1634
1698
  if (!isValidIPv6(payload.value)) payload.issues.push({
1635
1699
  code: "invalid_format",
@@ -1678,10 +1742,10 @@ function isValidBase64(data) {
1678
1742
  return false;
1679
1743
  }
1680
1744
  }
1745
+ const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
1681
1746
  const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
1682
- def.pattern ?? (def.pattern = base64$1);
1747
+ def.pattern ?? (def.pattern = base64Charset);
1683
1748
  $ZodStringFormat.init(inst, def);
1684
- inst._zod.bag.contentEncoding = "base64";
1685
1749
  inst._zod.check = (payload) => {
1686
1750
  if (isValidBase64(payload.value)) return;
1687
1751
  payload.issues.push({
@@ -1693,15 +1757,15 @@ const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
1693
1757
  });
1694
1758
  };
1695
1759
  });
1760
+ const base64urlCharset = /^[A-Za-z0-9_-]*$/;
1696
1761
  function isValidBase64URL(data) {
1697
- if (!base64url.test(data)) return false;
1762
+ if (!base64urlCharset.test(data)) return false;
1698
1763
  const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1699
1764
  return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
1700
1765
  }
1701
1766
  const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
1702
- def.pattern ?? (def.pattern = base64url);
1767
+ def.pattern ?? (def.pattern = base64urlCharset);
1703
1768
  $ZodStringFormat.init(inst, def);
1704
- inst._zod.bag.contentEncoding = "base64url";
1705
1769
  inst._zod.check = (payload) => {
1706
1770
  if (isValidBase64URL(payload.value)) return;
1707
1771
  payload.issues.push({
@@ -1747,7 +1811,7 @@ const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
1747
1811
  });
1748
1812
  const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
1749
1813
  $ZodType.init(inst, def);
1750
- inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
1814
+ inst._zod.pattern = number$1;
1751
1815
  inst._zod.parse = (payload, _ctx) => {
1752
1816
  if (def.coerce) try {
1753
1817
  payload.value = Number(payload.value);
@@ -1819,6 +1883,26 @@ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
1819
1883
  return payload;
1820
1884
  };
1821
1885
  });
1886
+ function capSize(inst, size) {
1887
+ const caps = sizeCaps(inst._zod.def.checks);
1888
+ if (!caps.length) return;
1889
+ const cap = Math.min(...caps.map((c) => c[0]));
1890
+ const parse = inst._zod.parse;
1891
+ inst._zod.parse = (payload, ctx) => {
1892
+ const n = size(payload.value);
1893
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
1894
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) {
1895
+ const start = payload.issues.length;
1896
+ ch._zod.check(payload);
1897
+ payload.issues[start].continue = false;
1898
+ attachSchema(payload.issues, start, inst);
1899
+ return payload;
1900
+ }
1901
+ }
1902
+ return parse(payload, ctx);
1903
+ };
1904
+ }
1905
+ const arraySize = (input) => Array.isArray(input) ? input.length : -1;
1822
1906
  function handleArrayResult(result, final, index) {
1823
1907
  if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1824
1908
  final.value[index] = result.value;
@@ -1840,6 +1924,7 @@ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
1840
1924
  }
1841
1925
  payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
1842
1926
  const proms = [];
1927
+ const abortEarly = ctx?.abortEarly;
1843
1928
  for (let i = 0; i < input.length; i++) {
1844
1929
  const item = input[i];
1845
1930
  const result = def.element._zod.run({
@@ -1847,11 +1932,15 @@ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
1847
1932
  issues: []
1848
1933
  }, ctx);
1849
1934
  if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
1850
- else handleArrayResult(result, payload, i);
1935
+ else {
1936
+ handleArrayResult(result, payload, i);
1937
+ if (abortEarly && result.issues.length !== 0 && aborted(result)) break;
1938
+ }
1851
1939
  }
1852
1940
  if (proms.length) return Promise.all(proms).then(() => payload);
1853
1941
  return payload;
1854
1942
  };
1943
+ capSize(inst, arraySize);
1855
1944
  });
1856
1945
  function handlePropertyResult(result, final, key, input, optin, optout) {
1857
1946
  const isPresent = key in input;
@@ -1871,7 +1960,7 @@ function handlePropertyResult(result, final, key, input, optin, optout) {
1871
1960
  return;
1872
1961
  }
1873
1962
  if (result.value === void 0) {
1874
- if (isPresent) final.value[key] = void 0;
1963
+ if (isPresent || optin === "defaulted" && !isOptionalOut) final.value[key] = void 0;
1875
1964
  } else final.value[key] = result.value;
1876
1965
  }
1877
1966
  const NO_SYMBOL_KEYS = [];
@@ -1891,14 +1980,19 @@ function normalizeDef(def) {
1891
1980
  optionalKeys: new Set(okeys)
1892
1981
  };
1893
1982
  }
1894
- function handleCatchall(proms, input, payload, ctx, def, inst) {
1983
+ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
1895
1984
  const unrecognized = [];
1896
1985
  const keySet = def.keySet;
1897
1986
  const _catchall = def.catchall._zod;
1898
1987
  const t = _catchall.def.type;
1899
1988
  const optin = _catchall.optin;
1900
1989
  const optout = _catchall.optout;
1990
+ let seen = 0;
1901
1991
  for (const key in input) {
1992
+ if (abortEarly && payload.issues.length !== seen) {
1993
+ if (aborted(payload, seen)) break;
1994
+ seen = payload.issues.length;
1995
+ }
1902
1996
  if (keySet.has(key)) continue;
1903
1997
  if (key === "__proto__") {
1904
1998
  if (t === "never") unrecognized.push(key);
@@ -1927,18 +2021,19 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1927
2021
  return payload;
1928
2022
  });
1929
2023
  }
1930
- const propShapes = /* @__PURE__ */ new WeakMap();
1931
2024
  const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
1932
2025
  $ZodType.init(inst, def);
1933
- if (!Object.getOwnPropertyDescriptor(def, "shape")?.get) {
1934
- const sh = def.shape;
1935
- propShapes.set(def, sh);
1936
- Object.defineProperty(def, "shape", { get: () => {
2026
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
2027
+ const sh = desc?.get ? desc.get.raw : def.shape ?? {};
2028
+ if (sh) {
2029
+ const get = () => {
1937
2030
  const newSh = { ...sh };
1938
2031
  Object.defineProperty(def, "shape", { value: newSh });
1939
- propShapes.set(def, newSh);
2032
+ get.raw = newSh;
1940
2033
  return newSh;
1941
- } });
2034
+ };
2035
+ get.raw = sh;
2036
+ Object.defineProperty(def, "shape", { get });
1942
2037
  }
1943
2038
  const _normalized = cached(() => normalizeDef(def));
1944
2039
  defineLazyInternal(inst, "propValues", (zod) => {
@@ -1974,7 +2069,13 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
1974
2069
  payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1975
2070
  const proms = [];
1976
2071
  const shape = value.shape;
2072
+ const abortEarly = ctx?.abortEarly;
2073
+ let seen = payload.issues.length;
1977
2074
  for (const key of value.allKeys) {
2075
+ if (abortEarly && payload.issues.length !== seen) {
2076
+ if (aborted(payload, seen)) break;
2077
+ seen = payload.issues.length;
2078
+ }
1978
2079
  if (key === "__proto__") continue;
1979
2080
  const el = shape[key];
1980
2081
  const optin = el._zod.optin;
@@ -1987,7 +2088,7 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
1987
2088
  else handlePropertyResult(r, payload, key, input, optin, optout);
1988
2089
  }
1989
2090
  if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
1990
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
2091
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
1991
2092
  };
1992
2093
  });
1993
2094
  const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -2006,10 +2107,16 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
2006
2107
  });
2007
2108
  const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2008
2109
  const prefixStr = (id, k) => `
2110
+ let ${id}_ab = false;
2009
2111
  for (let i = 0; i < ${id}.issues.length; i++) {
2010
2112
  const iss = ${id}.issues[i];
2011
2113
  iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
2012
2114
  payload.issues.push(iss);
2115
+ if (iss.continue !== true) ${id}_ab = true;
2116
+ }
2117
+ if (${id}_ab && ctx && ctx.abortEarly) {
2118
+ payload.value = newResult;
2119
+ return payload;
2013
2120
  }`;
2014
2121
  doc.write(`const input = payload.value;`);
2015
2122
  const ids = Object.create(null);
@@ -2051,6 +2158,10 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
2051
2158
  input: undefined,
2052
2159
  path: [${k}]
2053
2160
  });
2161
+ if (ctx && ctx.abortEarly) {
2162
+ payload.value = newResult;
2163
+ return payload;
2164
+ }
2054
2165
  }
2055
2166
 
2056
2167
  if (${id}_present) {
@@ -2058,19 +2169,18 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
2058
2169
  }
2059
2170
 
2060
2171
  `);
2061
- else doc.write(`
2172
+ else {
2173
+ doc.write(`
2062
2174
  if (${id}.issues.length) {${prefixStr(id, k)}
2063
2175
  }
2064
-
2065
- if (${id}.value === undefined) {
2066
- if (${isPresent}) {
2067
- newResult[${k}] = undefined;
2068
- }
2069
- } else {
2176
+ `);
2177
+ if (optin === "defaulted") doc.write(`newResult[${k}] = ${id}.value;`);
2178
+ else doc.write(`
2179
+ if (${id}.value !== undefined || ${isPresent}) {
2070
2180
  newResult[${k}] = ${id}.value;
2071
2181
  }
2072
-
2073
2182
  `);
2183
+ }
2074
2184
  }
2075
2185
  doc.write(`payload.value = newResult;`);
2076
2186
  doc.write(`return payload;`);
@@ -2098,7 +2208,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
2098
2208
  if (!fastpass) fastpass = generateFastpass(def.shape);
2099
2209
  payload = fastpass(payload, ctx);
2100
2210
  if (!catchall) return payload;
2101
- return handleCatchall([], input, payload, ctx, value, inst);
2211
+ return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);
2102
2212
  }
2103
2213
  return superParse(payload, ctx);
2104
2214
  };
@@ -2158,39 +2268,42 @@ const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
2158
2268
  });
2159
2269
  };
2160
2270
  });
2271
+ function discriminatorMap(def) {
2272
+ const map = /* @__PURE__ */ new Map();
2273
+ for (const option of def.options) {
2274
+ const values = option._zod.propValues?.[def.discriminator];
2275
+ if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
2276
+ for (const value of values) if (map.has(value)) {
2277
+ if (value !== void 0) throw new Error(`Duplicate discriminator value "${String(value)}"`);
2278
+ map.set(value, null);
2279
+ } else map.set(value, option);
2280
+ }
2281
+ return map;
2282
+ }
2161
2283
  const $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2162
2284
  def.inclusive = false;
2163
2285
  $ZodUnion.init(inst, def);
2164
2286
  const _super = inst._zod.parse;
2165
2287
  defineLazyInternal(inst, "propValues", (zod) => {
2166
2288
  const propValues = {};
2289
+ let undefinedCount = 0;
2167
2290
  for (const option of zod.def.options) {
2168
2291
  const pv = option._zod.propValues;
2169
2292
  if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
2293
+ if (pv[zod.def.discriminator]?.has(void 0)) undefinedCount++;
2170
2294
  for (const [k, v] of Object.entries(pv)) {
2171
2295
  if (!Object.prototype.hasOwnProperty.call(propValues, k)) assignProp(propValues, k, /* @__PURE__ */ new Set());
2172
2296
  for (const val of v) propValues[k].add(val);
2173
2297
  }
2174
2298
  }
2299
+ if (!zod.def.unionFallback && undefinedCount > 1) propValues[zod.def.discriminator]?.delete(void 0);
2175
2300
  return propValues;
2176
2301
  });
2177
2302
  def.options.forEach((option, i) => {
2178
- const propShape = propShapes.get(option._zod.def);
2303
+ const propShape = rawShape(option._zod.def);
2179
2304
  if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) throw new Error(`Invalid discriminated union option at index "${i}"`);
2180
2305
  });
2181
- const disc = cached(() => {
2182
- const opts = def.options;
2183
- const map = /* @__PURE__ */ new Map();
2184
- for (const o of opts) {
2185
- const values = o._zod.propValues?.[def.discriminator];
2186
- if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
2187
- for (const v of values) {
2188
- if (map.has(v)) throw new Error(`Duplicate discriminator value "${String(v)}"`);
2189
- map.set(v, o);
2190
- }
2191
- }
2192
- return map;
2193
- });
2306
+ const disc = cached(() => discriminatorMap(def));
2194
2307
  inst._zod.parse = (payload, ctx) => {
2195
2308
  const input = payload.value;
2196
2309
  if (!isObject$1(input)) {
@@ -2202,15 +2315,16 @@ const $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnio
2202
2315
  });
2203
2316
  return payload;
2204
2317
  }
2205
- const opt = disc.value.get(input?.[def.discriminator]);
2206
- if (opt) return opt._zod.run(payload, ctx);
2318
+ const value = input?.[def.discriminator];
2319
+ const opt = disc.value.get(value);
2320
+ if (opt && (value !== void 0 || ctx.direction !== "backward")) return opt._zod.run(payload, ctx);
2207
2321
  if (def.unionFallback || ctx.direction === "backward") return _super(payload, ctx);
2208
2322
  payload.issues.push({
2209
2323
  code: "invalid_union",
2210
2324
  errors: [],
2211
2325
  note: "No matching discriminator",
2212
2326
  discriminator: def.discriminator,
2213
- options: Array.from(disc.value.keys()),
2327
+ options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
2214
2328
  input,
2215
2329
  path: [def.discriminator],
2216
2330
  inst
@@ -2337,8 +2451,10 @@ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
2337
2451
  const values = getEnumValues(def.entries);
2338
2452
  const valuesSet = new Set(values);
2339
2453
  inst._zod.values = valuesSet;
2340
- const patternValues = values.filter((k) => propertyKeyTypes.has(typeof k));
2341
- inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
2454
+ defineLazyInternal(inst, "pattern", (zod) => {
2455
+ const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k));
2456
+ return new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
2457
+ });
2342
2458
  inst._zod.parse = (payload, _ctx) => {
2343
2459
  const input = payload.value;
2344
2460
  if (valuesSet.has(input)) return payload;
@@ -2355,7 +2471,10 @@ const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
2355
2471
  $ZodType.init(inst, def);
2356
2472
  const values = new Set(def.values);
2357
2473
  inst._zod.values = values;
2358
- inst._zod.pattern = new RegExp(def.values.length ? `^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
2474
+ defineLazyInternal(inst, "pattern", (zod) => {
2475
+ const vals = zod.def.values;
2476
+ return new RegExp(vals.length ? `^(${vals.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
2477
+ });
2359
2478
  inst._zod.parse = (payload, _ctx) => {
2360
2479
  const input = payload.value;
2361
2480
  if (values.has(input)) return payload;
@@ -2590,7 +2709,7 @@ function handleRefineResult(result, payload, input, inst) {
2590
2709
  }
2591
2710
  }
2592
2711
  //#endregion
2593
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
2712
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/memoizer.js
2594
2713
  var $ZodCyclicError = class extends Error {
2595
2714
  constructor() {
2596
2715
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -2600,6 +2719,9 @@ var $ZodCyclicError = class extends Error {
2600
2719
  /** Keyed off the context object every schema in one parse call already shares. */
2601
2720
  const STATE = "~memo";
2602
2721
  const NO_ISSUES = [];
2722
+ function isRef(value) {
2723
+ return value !== null && typeof value === "object";
2724
+ }
2603
2725
  function cloneIssues(issues) {
2604
2726
  return issues.map((iss) => iss.path ? {
2605
2727
  ...iss,
@@ -2607,22 +2729,44 @@ function cloneIssues(issues) {
2607
2729
  } : { ...iss });
2608
2730
  }
2609
2731
  const recursive = /*@__PURE__*/ new WeakMap();
2732
+ /** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
2733
+ const NONE = 0;
2734
+ const ASSUMED = 1;
2735
+ const PROVEN = 2;
2610
2736
  /** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
2611
- function isRecursive(inst, stack) {
2737
+ function isRecursive(inst, stack, resolve) {
2612
2738
  const cached = recursive.get(inst);
2613
- if (cached !== void 0) return cached;
2614
- if (stack.has(inst)) return true;
2739
+ if (cached !== void 0) return cached ? PROVEN : NONE;
2740
+ if (stack.has(inst)) return PROVEN;
2615
2741
  stack.add(inst);
2616
- let result = false;
2742
+ let result = NONE;
2617
2743
  const check = (child) => {
2618
- if (!result && child?._zod && isRecursive(child, stack)) result = true;
2744
+ if (result !== PROVEN && child?._zod) {
2745
+ const answer = isRecursive(child, stack, resolve);
2746
+ if (answer > result) result = answer;
2747
+ }
2748
+ };
2749
+ const shape = (sh, spread) => {
2750
+ let answer = NONE;
2751
+ for (const key of Reflect.ownKeys(sh)) {
2752
+ const desc = Object.getOwnPropertyDescriptor(sh, key);
2753
+ if (spread && !desc.enumerable) continue;
2754
+ const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
2755
+ if (child > answer) answer = child;
2756
+ }
2757
+ return answer;
2758
+ };
2759
+ const merge = (answer) => {
2760
+ if (answer > result) result = answer;
2619
2761
  };
2620
2762
  const def = inst._zod.def;
2621
2763
  switch (def.type) {
2622
- case "object":
2623
- for (const key of Reflect.ownKeys(def.shape)) check(def.shape[key]);
2764
+ case "object": {
2765
+ const raw = rawShape(def);
2766
+ merge(raw ? shape(raw, true) : ASSUMED);
2624
2767
  check(def.catchall);
2625
2768
  break;
2769
+ }
2626
2770
  case "array":
2627
2771
  check(def.element);
2628
2772
  break;
@@ -2664,9 +2808,11 @@ function isRecursive(inst, stack) {
2664
2808
  check(def.input);
2665
2809
  check(def.output);
2666
2810
  break;
2667
- case "lazy":
2668
- check(inst._zod.innerType);
2811
+ case "lazy": {
2812
+ const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
2813
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
2669
2814
  break;
2815
+ }
2670
2816
  case "template_literal":
2671
2817
  case "string":
2672
2818
  case "number":
@@ -2697,13 +2843,17 @@ function isRecursive(inst, stack) {
2697
2843
  }
2698
2844
  }
2699
2845
  stack.delete(inst);
2700
- recursive.set(inst, result);
2701
- return result;
2846
+ return settle(inst, result);
2847
+ }
2848
+ /** An assumed answer must not outlive the resolution that settles it, so only a certain one is cached. */
2849
+ function settle(inst, answer) {
2850
+ if (answer !== ASSUMED) recursive.set(inst, answer === PROVEN);
2851
+ return answer;
2702
2852
  }
2703
2853
  function bucketFor(state, inst) {
2704
2854
  let bucket = state.buckets.get(inst);
2705
2855
  if (!bucket) {
2706
- bucket = /* @__PURE__ */ new Map();
2856
+ bucket = /* @__PURE__ */ new WeakMap();
2707
2857
  state.buckets.set(inst, bucket);
2708
2858
  }
2709
2859
  return bucket;
@@ -2739,6 +2889,7 @@ const memo = {
2739
2889
  attach(inst) {
2740
2890
  var _a;
2741
2891
  let isRecursiveInst;
2892
+ let rechecked = false;
2742
2893
  let lastCtx;
2743
2894
  let lastBucket;
2744
2895
  (_a = inst._zod).deferred ?? (_a.deferred = []);
@@ -2746,19 +2897,21 @@ const memo = {
2746
2897
  const base = inst._zod.parse;
2747
2898
  const wrapped = (payload, ctx) => {
2748
2899
  if (isRecursiveInst === void 0) {
2749
- isRecursiveInst = isRecursive(inst, /* @__PURE__ */ new Set());
2750
- if (!isRecursiveInst) {
2900
+ const walked = isRecursive(inst, /* @__PURE__ */ new Set(), false);
2901
+ if (walked === NONE) {
2751
2902
  inst._zod.parse = base;
2752
2903
  if (inst._zod.run === wrapped) inst._zod.run = base;
2753
2904
  return base(payload, ctx);
2754
2905
  }
2906
+ if (walked === PROVEN || rechecked) isRecursiveInst = true;
2907
+ else rechecked = true;
2755
2908
  }
2756
2909
  const input = payload.value;
2757
- if (input === null || typeof input !== "object") return base(payload, ctx);
2910
+ if (!isRef(input)) return base(payload, ctx);
2758
2911
  let state = ctx[STATE];
2759
2912
  if (!state) {
2760
2913
  state = {
2761
- buckets: /* @__PURE__ */ new Map(),
2914
+ buckets: /* @__PURE__ */ new WeakMap(),
2762
2915
  backEdges: void 0
2763
2916
  };
2764
2917
  ctx[STATE] = state;
@@ -2777,7 +2930,7 @@ const memo = {
2777
2930
  if (hit.issues.length) payload.issues.push(...cloneIssues(hit.issues));
2778
2931
  } else {
2779
2932
  payload.memo = true;
2780
- state.backEdges ?? (state.backEdges = /* @__PURE__ */ new Set());
2933
+ state.backEdges ?? (state.backEdges = /* @__PURE__ */ new WeakSet());
2781
2934
  state.backEdges.add(hit.value);
2782
2935
  }
2783
2936
  return payload;
@@ -2806,10 +2959,10 @@ function memoizer() {
2806
2959
  /** Whether this value is a node a back-edge resolved to before it finished. */
2807
2960
  function isBackEdge(ctx, value) {
2808
2961
  const backEdges = ctx[STATE]?.backEdges;
2809
- return backEdges !== void 0 && value !== null && typeof value === "object" && backEdges.has(value);
2962
+ return backEdges !== void 0 && isRef(value) && backEdges.has(value);
2810
2963
  }
2811
2964
  //#endregion
2812
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/en.js
2965
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/en.js
2813
2966
  const error = () => {
2814
2967
  const Sizable = {
2815
2968
  string: {
@@ -2864,7 +3017,9 @@ const error = () => {
2864
3017
  base64url: "base64url-encoded string",
2865
3018
  json_string: "JSON string",
2866
3019
  e164: "E.164 number",
3020
+ currency_code: "currency code",
2867
3021
  credit_card: "credit card number",
3022
+ iban: "IBAN",
2868
3023
  jwt: "JWT",
2869
3024
  template_literal: "input"
2870
3025
  };
@@ -2915,7 +3070,7 @@ function en_default() {
2915
3070
  return { localeError: error() };
2916
3071
  }
2917
3072
  //#endregion
2918
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/registries.js
3073
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/registries.js
2919
3074
  var _a;
2920
3075
  var $ZodRegistry = class {
2921
3076
  constructor() {
@@ -2962,13 +3117,17 @@ function registry() {
2962
3117
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
2963
3118
  const globalRegistry = globalThis.__zod_globalRegistry;
2964
3119
  //#endregion
2965
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/api.js
3120
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/api.js
3121
+ function snapshotChecks(def) {
3122
+ if (def.checks) def.checks = [...def.checks];
3123
+ return def;
3124
+ }
2966
3125
  // @__NO_SIDE_EFFECTS__
2967
3126
  function _string(Class, params) {
2968
- return new Class({
3127
+ return new Class(snapshotChecks({
2969
3128
  type: "string",
2970
3129
  ...normalizeParams(params)
2971
- });
3130
+ }));
2972
3131
  }
2973
3132
  // @__NO_SIDE_EFFECTS__
2974
3133
  function _email(Class, params) {
@@ -3240,11 +3399,11 @@ function _isoDuration(Class, params) {
3240
3399
  }
3241
3400
  // @__NO_SIDE_EFFECTS__
3242
3401
  function _number(Class, params) {
3243
- return new Class({
3402
+ return new Class(snapshotChecks({
3244
3403
  type: "number",
3245
3404
  checks: [],
3246
3405
  ...normalizeParams(params)
3247
- });
3406
+ }));
3248
3407
  }
3249
3408
  // @__NO_SIDE_EFFECTS__
3250
3409
  function _int(Class, params) {
@@ -3474,7 +3633,7 @@ function _check(fn, params) {
3474
3633
  return ch;
3475
3634
  }
3476
3635
  //#endregion
3477
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
3636
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/to-json-schema.js
3478
3637
  function assignProps(target, ...sources) {
3479
3638
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
3480
3639
  return target;
@@ -3517,7 +3676,7 @@ function handleUnrepresentable(schema, ctx, json, params, message) {
3517
3676
  Object.assign(json, result);
3518
3677
  return true;
3519
3678
  }
3520
- function process(schema, ctx, _params = {
3679
+ function processSchema(schema, ctx, _params = {
3521
3680
  path: [],
3522
3681
  schemaPath: []
3523
3682
  }) {
@@ -3556,7 +3715,7 @@ function process(schema, ctx, _params = {
3556
3715
  const parent = schema._zod.parent;
3557
3716
  if (parent) {
3558
3717
  if (!result.ref) result.ref = parent;
3559
- process(parent, ctx, params);
3718
+ processSchema(parent, ctx, params);
3560
3719
  ctx.seen.get(parent).isParent = true;
3561
3720
  }
3562
3721
  }
@@ -3646,10 +3805,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3646
3805
  continue;
3647
3806
  }
3648
3807
  if (seen.count > 1) {
3649
- if (ctx.reused === "ref") {
3650
- extractToDef(entry);
3651
- continue;
3652
- }
3808
+ if (ctx.reused === "ref") extractToDef(entry);
3653
3809
  }
3654
3810
  }
3655
3811
  if (ctx.external) ctx.sharedDefsExtractedFor = ctx.external;
@@ -3904,7 +4060,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
3904
4060
  ...params,
3905
4061
  processors
3906
4062
  });
3907
- process(schema, ctx);
4063
+ processSchema(schema, ctx);
3908
4064
  extractDefs(ctx, schema);
3909
4065
  return finalize(ctx, schema);
3910
4066
  };
@@ -3916,12 +4072,84 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
3916
4072
  io,
3917
4073
  processors
3918
4074
  });
3919
- process(schema, ctx);
4075
+ processSchema(schema, ctx);
3920
4076
  extractDefs(ctx, schema);
3921
4077
  return finalize(ctx, schema);
3922
4078
  };
3923
4079
  //#endregion
3924
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema-processors.js
4080
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/json-schema-processors.js
4081
+ const narrowMin = (agg, key, value) => {
4082
+ if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
4083
+ };
4084
+ const narrowMax = (agg, key, value) => {
4085
+ if (agg[key] === void 0 || value < agg[key]) agg[key] = value;
4086
+ };
4087
+ const narrowBoth = (agg, value) => {
4088
+ narrowMin(agg, "minimum", value);
4089
+ narrowMax(agg, "maximum", value);
4090
+ };
4091
+ const addDivisor = (agg, value) => {
4092
+ agg.multipleOf ?? (agg.multipleOf = []);
4093
+ if (!agg.multipleOf.includes(value)) agg.multipleOf.push(value);
4094
+ };
4095
+ const addPattern = (agg, pattern) => {
4096
+ agg.patterns ?? (agg.patterns = /* @__PURE__ */ new Set());
4097
+ agg.patterns.add(pattern);
4098
+ };
4099
+ const intersectMime = (agg, mime) => {
4100
+ agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime];
4101
+ };
4102
+ const setFormat = (agg, format) => {
4103
+ agg.format = format;
4104
+ if (format.includes("int")) agg.isInt = true;
4105
+ };
4106
+ const minContributor = (agg, def) => narrowMin(agg, "minimum", def.minimum);
4107
+ const maxContributor = (agg, def) => narrowMax(agg, "maximum", def.maximum);
4108
+ const formatContributor = (ranges) => (agg, def) => {
4109
+ setFormat(agg, def.format);
4110
+ const [minimum, maximum] = ranges[def.format];
4111
+ narrowMin(agg, "minimum", minimum);
4112
+ narrowMax(agg, "maximum", maximum);
4113
+ };
4114
+ const contributors = {
4115
+ greater_than: (agg, def) => narrowMin(agg, def.inclusive ? "minimum" : "exclusiveMinimum", def.value),
4116
+ less_than: (agg, def) => narrowMax(agg, def.inclusive ? "maximum" : "exclusiveMaximum", def.value),
4117
+ multiple_of: (agg, def) => addDivisor(agg, def.value),
4118
+ number_format: formatContributor(NUMBER_FORMAT_RANGES),
4119
+ bigint_format: formatContributor(BIGINT_FORMAT_RANGES),
4120
+ min_length: minContributor,
4121
+ max_length: maxContributor,
4122
+ length_equals: (agg, def) => narrowBoth(agg, def.length),
4123
+ min_size: minContributor,
4124
+ max_size: maxContributor,
4125
+ size_equals: (agg, def) => narrowBoth(agg, def.size),
4126
+ string_format: (agg, def) => {
4127
+ setFormat(agg, def.format);
4128
+ if (def.pattern) addPattern(agg, def.pattern);
4129
+ if (def.format === "base64" || def.format === "base64url") agg.contentEncoding = def.format;
4130
+ if (def.local || def.precision === -1) agg.laxFormat = true;
4131
+ },
4132
+ mime_type: (agg, def) => intersectMime(agg, def.mime)
4133
+ };
4134
+ function aggregateChecks(schema) {
4135
+ const agg = {};
4136
+ const def = schema._zod.def;
4137
+ const list = schema._zod.traits.has("$ZodCheck") ? [schema, ...def.checks ?? []] : def.checks ?? [];
4138
+ for (const ch of list) contributors[ch._zod.def.check]?.(agg, ch._zod.def);
4139
+ const bag = schema._zod.bag;
4140
+ if (bag.minimum !== void 0) narrowMin(agg, "minimum", bag.minimum);
4141
+ if (bag.exclusiveMinimum !== void 0) narrowMin(agg, "exclusiveMinimum", bag.exclusiveMinimum);
4142
+ if (bag.maximum !== void 0) narrowMax(agg, "maximum", bag.maximum);
4143
+ if (bag.exclusiveMaximum !== void 0) narrowMax(agg, "exclusiveMaximum", bag.exclusiveMaximum);
4144
+ if (bag.multipleOf !== void 0) addDivisor(agg, bag.multipleOf);
4145
+ if (bag.format !== void 0) {
4146
+ agg.format ?? (agg.format = bag.format);
4147
+ if (bag.format.includes("int")) agg.isInt = true;
4148
+ }
4149
+ if (bag.mime) intersectMime(agg, bag.mime);
4150
+ for (const pattern of bag.patterns ?? []) addPattern(agg, pattern);
4151
+ return agg;
4152
+ }
3925
4153
  const formatMap = {
3926
4154
  guid: "uuid",
3927
4155
  url: "uri",
@@ -3929,10 +4157,12 @@ const formatMap = {
3929
4157
  json_string: "json-string",
3930
4158
  regex: ""
3931
4159
  };
4160
+ const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64$1], [base64urlCharset, base64url]]);
4161
+ const exactPattern = (p) => exactPatterns.get(p) ?? p;
3932
4162
  const stringProcessor = (schema, ctx, _json, _params) => {
3933
4163
  const json = _json;
3934
4164
  json.type = "string";
3935
- const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = schema._zod.bag;
4165
+ const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);
3936
4166
  if (typeof minimum === "number") json.minLength = minimum;
3937
4167
  if (typeof maximum === "number") json.maxLength = maximum;
3938
4168
  if (format) {
@@ -3942,7 +4172,7 @@ const stringProcessor = (schema, ctx, _json, _params) => {
3942
4172
  }
3943
4173
  if (contentEncoding) json.contentEncoding = contentEncoding;
3944
4174
  if (patterns && patterns.size > 0) {
3945
- const patternList = [...patterns];
4175
+ const patternList = [...patterns].map(exactPattern);
3946
4176
  if (patternList.length === 1) json.pattern = patternList[0].source;
3947
4177
  else if (patternList.length > 1) json.allOf = [...patternList.map((regex) => ({
3948
4178
  ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
@@ -3952,9 +4182,8 @@ const stringProcessor = (schema, ctx, _json, _params) => {
3952
4182
  };
3953
4183
  const numberProcessor = (schema, ctx, _json, params) => {
3954
4184
  const json = _json;
3955
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
3956
- if (typeof format === "string" && format.includes("int")) json.type = "integer";
3957
- else json.type = "number";
4185
+ const { minimum, maximum, multipleOf, exclusiveMaximum, exclusiveMinimum, isInt } = aggregateChecks(schema);
4186
+ json.type = isInt ? "integer" : "number";
3958
4187
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
3959
4188
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
3960
4189
  const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
@@ -3970,9 +4199,13 @@ const numberProcessor = (schema, ctx, _json, params) => {
3970
4199
  json.exclusiveMaximum = true;
3971
4200
  } else json.exclusiveMaximum = exclusiveMaximum;
3972
4201
  } else if (typeof maximum === "number") json.maximum = maximum;
3973
- if (typeof multipleOf === "number") {
3974
- if (Number.isFinite(multipleOf) && multipleOf !== 0) json.multipleOf = Math.abs(multipleOf);
3975
- else handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`);
4202
+ if (multipleOf) {
4203
+ const divisors = /* @__PURE__ */ new Set();
4204
+ for (const divisor of multipleOf) if (Number.isFinite(divisor) && divisor !== 0) divisors.add(Math.abs(divisor));
4205
+ else handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`);
4206
+ const [first, ...rest] = divisors;
4207
+ if (first !== void 0) json.multipleOf = first;
4208
+ if (rest.length) json.allOf = [...json.allOf ?? [], ...rest.map((m) => ({ multipleOf: m }))];
3976
4209
  }
3977
4210
  };
3978
4211
  const booleanProcessor = (_schema, _ctx, json, _params) => {
@@ -4034,11 +4267,11 @@ const transformProcessor = (schema, ctx, json, params) => {
4034
4267
  const arrayProcessor = (schema, ctx, _json, params) => {
4035
4268
  const json = _json;
4036
4269
  const def = schema._zod.def;
4037
- const { minimum, maximum } = schema._zod.bag;
4270
+ const { minimum, maximum } = aggregateChecks(schema);
4038
4271
  if (typeof minimum === "number") json.minItems = minimum;
4039
4272
  if (typeof maximum === "number") json.maxItems = maximum;
4040
4273
  json.type = "array";
4041
- json.items = process(def.element, ctx, {
4274
+ json.items = processSchema(def.element, ctx, {
4042
4275
  ...params,
4043
4276
  path: [...params.path, "items"]
4044
4277
  });
@@ -4056,7 +4289,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
4056
4289
  if (Object.getOwnPropertySymbols(shape).length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
4057
4290
  json.type = "object";
4058
4291
  json.properties = {};
4059
- for (const key in shape) assignProp(json.properties, key, process(shape[key], ctx, {
4292
+ for (const key in shape) assignProp(json.properties, key, processSchema(shape[key], ctx, {
4060
4293
  ...params,
4061
4294
  path: [
4062
4295
  ...params.path,
@@ -4064,17 +4297,16 @@ const objectProcessor = (schema, ctx, _json, params) => {
4064
4297
  key
4065
4298
  ]
4066
4299
  }));
4067
- const allKeys = new Set(Object.keys(shape));
4068
- const requiredKeys = new Set([...allKeys].filter((key) => {
4300
+ const requiredKeys = [];
4301
+ for (const key of Object.keys(shape)) {
4069
4302
  const field = def.shape[key];
4070
- if (ctx.io === "input") return inputOptin(field) === void 0;
4071
- else return field._zod.optout === void 0;
4072
- }));
4073
- if (requiredKeys.size > 0) json.required = Array.from(requiredKeys);
4303
+ if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) requiredKeys.push(key);
4304
+ }
4305
+ if (requiredKeys.length > 0) json.required = requiredKeys;
4074
4306
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
4075
4307
  else if (!def.catchall) {
4076
4308
  if (ctx.io === "output") json.additionalProperties = false;
4077
- } else if (def.catchall) json.additionalProperties = process(def.catchall, ctx, {
4309
+ } else if (def.catchall) json.additionalProperties = processSchema(def.catchall, ctx, {
4078
4310
  ...params,
4079
4311
  path: [...params.path, "additionalProperties"]
4080
4312
  });
@@ -4082,7 +4314,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
4082
4314
  const unionProcessor = (schema, ctx, json, params) => {
4083
4315
  const def = schema._zod.def;
4084
4316
  const isExclusive = def.inclusive === false;
4085
- const options = def.options.map((x, i) => process(x, ctx, {
4317
+ const options = def.options.map((x, i) => processSchema(x, ctx, {
4086
4318
  ...params,
4087
4319
  path: [
4088
4320
  ...params.path,
@@ -4095,7 +4327,7 @@ const unionProcessor = (schema, ctx, json, params) => {
4095
4327
  };
4096
4328
  const intersectionProcessor = (schema, ctx, json, params) => {
4097
4329
  const def = schema._zod.def;
4098
- const a = process(def.left, ctx, {
4330
+ const a = processSchema(def.left, ctx, {
4099
4331
  ...params,
4100
4332
  path: [
4101
4333
  ...params.path,
@@ -4103,7 +4335,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
4103
4335
  0
4104
4336
  ]
4105
4337
  });
4106
- const b = process(def.right, ctx, {
4338
+ const b = processSchema(def.right, ctx, {
4107
4339
  ...params,
4108
4340
  path: [
4109
4341
  ...params.path,
@@ -4118,7 +4350,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
4118
4350
  };
4119
4351
  const nullableProcessor = (schema, ctx, json, params) => {
4120
4352
  const def = schema._zod.def;
4121
- const inner = process(def.innerType, ctx, params);
4353
+ const inner = processSchema(def.innerType, ctx, params);
4122
4354
  const seen = ctx.seen.get(schema);
4123
4355
  if (ctx.target === "openapi-3.0") {
4124
4356
  seen.ref = def.innerType;
@@ -4127,7 +4359,7 @@ const nullableProcessor = (schema, ctx, json, params) => {
4127
4359
  };
4128
4360
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
4129
4361
  const def = schema._zod.def;
4130
- process(def.innerType, ctx, params);
4362
+ processSchema(def.innerType, ctx, params);
4131
4363
  const seen = ctx.seen.get(schema);
4132
4364
  seen.ref = def.innerType;
4133
4365
  };
@@ -4148,7 +4380,7 @@ function serializeDefaultValue(value, schema, ctx, json, params) {
4148
4380
  }
4149
4381
  const defaultProcessor = (schema, ctx, json, params) => {
4150
4382
  const def = schema._zod.def;
4151
- process(def.innerType, ctx, params);
4383
+ processSchema(def.innerType, ctx, params);
4152
4384
  const seen = ctx.seen.get(schema);
4153
4385
  seen.ref = def.innerType;
4154
4386
  const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);
@@ -4156,7 +4388,7 @@ const defaultProcessor = (schema, ctx, json, params) => {
4156
4388
  };
4157
4389
  const prefaultProcessor = (schema, ctx, json, params) => {
4158
4390
  const def = schema._zod.def;
4159
- process(def.innerType, ctx, params);
4391
+ processSchema(def.innerType, ctx, params);
4160
4392
  const seen = ctx.seen.get(schema);
4161
4393
  seen.ref = def.innerType;
4162
4394
  if (ctx.io !== "input") return;
@@ -4165,7 +4397,7 @@ const prefaultProcessor = (schema, ctx, json, params) => {
4165
4397
  };
4166
4398
  const catchProcessor = (schema, ctx, json, params) => {
4167
4399
  const def = schema._zod.def;
4168
- process(def.innerType, ctx, params);
4400
+ processSchema(def.innerType, ctx, params);
4169
4401
  const seen = ctx.seen.get(schema);
4170
4402
  seen.ref = def.innerType;
4171
4403
  let catchValue;
@@ -4181,25 +4413,25 @@ const pipeProcessor = (schema, ctx, _json, params) => {
4181
4413
  const def = schema._zod.def;
4182
4414
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
4183
4415
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
4184
- process(innerType, ctx, params);
4416
+ processSchema(innerType, ctx, params);
4185
4417
  const seen = ctx.seen.get(schema);
4186
4418
  seen.ref = innerType;
4187
4419
  };
4188
4420
  const readonlyProcessor = (schema, ctx, json, params) => {
4189
4421
  const def = schema._zod.def;
4190
- process(def.innerType, ctx, params);
4422
+ processSchema(def.innerType, ctx, params);
4191
4423
  const seen = ctx.seen.get(schema);
4192
4424
  seen.ref = def.innerType;
4193
4425
  json.readOnly = true;
4194
4426
  };
4195
4427
  const optionalProcessor = (schema, ctx, _json, params) => {
4196
4428
  const def = schema._zod.def;
4197
- process(def.innerType, ctx, params);
4429
+ processSchema(def.innerType, ctx, params);
4198
4430
  const seen = ctx.seen.get(schema);
4199
4431
  seen.ref = def.innerType;
4200
4432
  };
4201
4433
  //#endregion
4202
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/errors.js
4434
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/errors.js
4203
4435
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
4204
4436
  function _lazyMethod(proto, key, make) {
4205
4437
  Object.defineProperty(proto, key, {
@@ -4249,7 +4481,7 @@ const initializer = (inst, issues) => {
4249
4481
  };
4250
4482
  const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4251
4483
  //#endregion
4252
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/parse.js
4484
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/parse.js
4253
4485
  const parse = /* @__PURE__ */ _parse(ZodRealError);
4254
4486
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
4255
4487
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -4263,7 +4495,7 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
4263
4495
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
4264
4496
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
4265
4497
  //#endregion
4266
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
4498
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/schemas.js
4267
4499
  function _ensureDefaultLocale() {
4268
4500
  if (!globalConfig.localeError) config(en_default());
4269
4501
  }
@@ -4399,6 +4631,12 @@ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
4399
4631
  set spa(value) {
4400
4632
  own(this, "spa", value);
4401
4633
  },
4634
+ validate(data, params) {
4635
+ return validate(this, data, params);
4636
+ },
4637
+ validateAsync(data, params) {
4638
+ return validateAsync$1(this, data, params);
4639
+ },
4402
4640
  encode: function _encode(data, params) {
4403
4641
  return encode(this, data, params, { callee: _encode });
4404
4642
  },
@@ -4438,10 +4676,10 @@ const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
4438
4676
  $ZodString.init(inst, def);
4439
4677
  ZodType.init(inst, def);
4440
4678
  inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
4441
- const bag = inst._zod.bag;
4442
- inst.format = bag.format ?? null;
4443
- inst.minLength = bag.minimum ?? null;
4444
- inst.maxLength = bag.maximum ?? null;
4679
+ }, /*@__PURE__*/ derived({
4680
+ format: (inst) => aggregateChecks(inst).format ?? null,
4681
+ minLength: (inst) => aggregateChecks(inst).minimum ?? null,
4682
+ maxLength: (inst) => aggregateChecks(inst).maximum ?? null
4445
4683
  }, {
4446
4684
  regex(...args) {
4447
4685
  return this.check(/* @__PURE__ */ _regex(...args));
@@ -4488,7 +4726,7 @@ const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
4488
4726
  slugify() {
4489
4727
  return this.check(/* @__PURE__ */ _slugify());
4490
4728
  }
4491
- });
4729
+ }));
4492
4730
  const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
4493
4731
  $ZodString.init(inst, def);
4494
4732
  _ZodString.init(inst, def);
@@ -4686,12 +4924,21 @@ const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
4686
4924
  $ZodNumber.init(inst, def);
4687
4925
  ZodType.init(inst, def);
4688
4926
  inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
4689
- const bag = inst._zod.bag;
4690
- inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
4691
- inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
4692
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? .5);
4693
4927
  inst.isFinite = true;
4694
- inst.format = bag.format ?? null;
4928
+ }, /*@__PURE__*/ derived({
4929
+ minValue: (inst) => {
4930
+ const { minimum, exclusiveMinimum } = aggregateChecks(inst);
4931
+ return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
4932
+ },
4933
+ maxValue: (inst) => {
4934
+ const { maximum, exclusiveMaximum } = aggregateChecks(inst);
4935
+ return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
4936
+ },
4937
+ isInt: (inst) => {
4938
+ const { isInt, multipleOf } = aggregateChecks(inst);
4939
+ return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
4940
+ },
4941
+ format: (inst) => aggregateChecks(inst).format ?? null
4695
4942
  }, {
4696
4943
  gt(value, params) {
4697
4944
  return this.check(/* @__PURE__ */ _gt(value, params));
@@ -4738,7 +4985,7 @@ const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
4738
4985
  finite() {
4739
4986
  return this;
4740
4987
  }
4741
- });
4988
+ }));
4742
4989
  function number(params) {
4743
4990
  return /* @__PURE__ */ _number(ZodNumber, params);
4744
4991
  }
@@ -4818,34 +5065,19 @@ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
4818
5065
  return _enum(Object.keys(this._zod.def.shape));
4819
5066
  },
4820
5067
  catchall(catchall) {
4821
- return this.clone({
4822
- ...this._zod.def,
4823
- catchall
4824
- });
5068
+ return this.clone(mergeDefs(this._zod.def, { catchall }));
4825
5069
  },
4826
5070
  passthrough() {
4827
- return this.clone({
4828
- ...this._zod.def,
4829
- catchall: unknown()
4830
- });
5071
+ return this.clone(mergeDefs(this._zod.def, { catchall: unknown() }));
4831
5072
  },
4832
5073
  loose() {
4833
- return this.clone({
4834
- ...this._zod.def,
4835
- catchall: unknown()
4836
- });
5074
+ return this.clone(mergeDefs(this._zod.def, { catchall: unknown() }));
4837
5075
  },
4838
5076
  strict() {
4839
- return this.clone({
4840
- ...this._zod.def,
4841
- catchall: never()
4842
- });
5077
+ return this.clone(mergeDefs(this._zod.def, { catchall: never() }));
4843
5078
  },
4844
5079
  strip() {
4845
- return this.clone({
4846
- ...this._zod.def,
4847
- catchall: void 0
4848
- });
5080
+ return this.clone(mergeDefs(this._zod.def, { catchall: void 0 }));
4849
5081
  },
4850
5082
  extend(incoming) {
4851
5083
  return extend(this, incoming);
@@ -4930,7 +5162,7 @@ const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
4930
5162
  ZodType.init(inst, def);
4931
5163
  inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
4932
5164
  inst.enum = def.entries;
4933
- inst.options = Object.values(def.entries);
5165
+ inst.options = [...inst._zod.values];
4934
5166
  const keys = new Set(Object.keys(def.entries));
4935
5167
  inst.extract = (values, params) => {
4936
5168
  const newEntries = {};
@@ -5145,7 +5377,7 @@ function superRefine(fn, params) {
5145
5377
  return /* @__PURE__ */ _superRefine(fn, params);
5146
5378
  }
5147
5379
  //#endregion
5148
- //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/iso.js
5380
+ //#region node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/iso.js
5149
5381
  function datetime(params) {
5150
5382
  return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
5151
5383
  }