@makoojs/cli 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14,84 +14,108 @@ var v = Object.create, y = Object.defineProperty, b = Object.getOwnPropertyDescr
14
14
  }, T = (e, t, n) => (n = e == null ? {} : v(S(e)), w(t || !e || !e.__esModule ? y(n, "default", {
15
15
  value: e,
16
16
  enumerable: !0
17
- }) : n, e)), E = (e) => e;
18
- function re(e) {
19
- return e;
20
- }
21
- //#endregion
22
- //#region packages/cli/src/error/error.ts
23
- var ie = class extends f {
17
+ }) : n, e)), E = class extends f {
24
18
  constructor(e, t = d.CLI_RUNTIME_SETUP_NOT_FOUND, n) {
25
19
  super(`Runtime setup file not found at ${e}`, [{
26
20
  path: "runtime.setup",
27
21
  message: e
28
22
  }], t, n), this.name = "RuntimeSetupNotFoundError";
29
23
  }
30
- }, D = class extends f {
24
+ }, re = class extends f {
31
25
  constructor(e, t, n = d.CLI_MANIFEST_VALIDATION_FAIL, r) {
32
- let i = t.map(F), a = c(u.cwd(), e);
26
+ let i = t.map(L), a = c(u.cwd(), e);
33
27
  super(`Invalid manifest at ${a}`, i, n, r), this.name = "ManifestValidationError";
34
28
  }
35
- }, O = class extends f {
29
+ }, ie = class extends f {
36
30
  constructor(e, t = d.CLI_CONFIG_INVALID, n) {
37
31
  super("Invalid CliConfig", e, t, n), this.name = "ConfigValidationError";
38
32
  }
39
- }, ae = class extends f {
33
+ }, D = class extends f {
40
34
  constructor(e, t = d.CLI_UNKNOWN_FRAMEWORK, n) {
41
35
  super(`Cannot infer framework from "${e}". Set "framework" explicitly ("Vue" or "React") in the module manifest.`, [{
42
36
  path: "framework",
43
37
  message: `cannot infer from "${e}"`
44
38
  }], t, n), this.name = "UnknownFrameworkError";
45
39
  }
46
- }, oe = class extends f {
40
+ }, O = class extends f {
47
41
  constructor(e, t = d.CLI_COMPONENT_NOT_FOUND, n) {
48
42
  super(`Missing component path for injection "${e}"`, [{
49
43
  path: "component",
50
44
  message: "could not resolve component path"
51
45
  }], t, n), this.name = "ComponentNotFoundError";
52
46
  }
53
- }, k = class extends f {
47
+ }, ae = class extends f {
54
48
  constructor(e, t = d.CLI_SOURCE_DIR_NOT_FOUND, n) {
55
49
  super(`Source directory not found at ${e}`, void 0, t, n), this.name = "SourceDirNotFoundError";
56
50
  }
57
- }, A = class extends f {
51
+ }, oe = class extends f {
58
52
  constructor(e, t = d.CLI_MANIFEST_NOT_FOUND, n) {
59
53
  super(`No manifest found in source directory at ${e}`, void 0, t, n), this.name = "ManifestNotFoundError";
60
54
  }
55
+ }, k = class extends f {
56
+ constructor(e, t, n = d.CLI_MANIFEST_BINDING_NOT_FOUND, r) {
57
+ let i = e === "injectionDefaults" ? `${e}.${t}` : `${e}s.${t}`;
58
+ super(`Missing manifest binding for ${e === "injectionDefaults" ? "injection defaults" : e} "${t}"`, [{
59
+ path: i,
60
+ message: "could not resolve manifest source"
61
+ }], n, r), this.name = "ManifestBindingNotFoundError";
62
+ }
63
+ }, A = class extends f {
64
+ constructor(e, t = d.CLI_MANIFEST_IMPORT_NOT_FOUND, n) {
65
+ super(`Missing manifest import for "${e}"`, [{
66
+ path: "manifestFile",
67
+ message: e
68
+ }], t, n), this.name = "ManifestImportNotFoundError";
69
+ }
61
70
  }, j = class extends f {
71
+ constructor(e, t, n, r = d.CLI_SELECTOR_TARGET_UNSUPPORTED, i) {
72
+ let a = c(u.cwd(), e);
73
+ super(`Unsupported selector target "${n}" in manifest at ${a}`, [{
74
+ path: t,
75
+ message: "must be a CSS selector; document and window are not supported"
76
+ }], r, i), this.name = "UnsupportedSelectorTargetError";
77
+ }
78
+ }, M = class extends f {
79
+ constructor(e = d.CLI_FUNCTION_SERIALIZATION_UNSUPPORTED, t) {
80
+ super("Function values cannot be serialized into the generated entry; use a manifest binding instead", [{
81
+ path: "generator.inlineValue",
82
+ message: "function values require a manifest binding"
83
+ }], e, t), this.name = "FunctionSerializationError";
84
+ }
85
+ }, se = class extends f {
62
86
  constructor(e, t = d.CLI_MANIFEST_LOAD_FAIL, n) {
63
87
  super(`Failed to load manifest at ${e}`, [{
64
88
  path: "(load)",
65
89
  message: n instanceof Error ? n.message : String(n)
66
90
  }], t, n), this.name = "ManifestLoadError";
67
91
  }
68
- }, M = class extends f {
92
+ }, N = class extends f {
69
93
  constructor(e, t = d.CLI_MODULE_MANIFEST_LOAD_FAIL, n) {
70
94
  super(`Failed to load module manifest at ${e}`, [{
71
95
  path: "(load)",
72
96
  message: n instanceof Error ? n.message : String(n)
73
97
  }], t, n), this.name = "ModuleManifestLoadError";
74
98
  }
75
- }, se = class extends f {
76
- constructor(e = d.CLI_NO_ENABLED_INJECTIONS, t) {
77
- super("No enabled injections — all injections are disabled or filtered out", void 0, e, t), this.name = "NoEnabledInjectionsError";
99
+ }, P = class extends f {
100
+ constructor(e = d.CLI_NO_ENABLED_TASKS, t) {
101
+ super("No enabled tasks — all injections and listeners are disabled or filtered out", void 0, e, t), this.name = "NoEnabledTasksError";
78
102
  }
79
103
  };
80
- function N(e) {
104
+ function F(e) {
81
105
  return e.length === 0 ? "(root)" : e.filter((e) => typeof e != "symbol").map((e) => typeof e == "number" ? `[${e}]` : e).join(".");
82
106
  }
83
- function P(e) {
107
+ function I(e) {
84
108
  return e.code === "invalid_type" && e.message.endsWith("received undefined") ? "is required" : e.message;
85
109
  }
86
- function F(e) {
110
+ function L(e) {
87
111
  return {
88
- path: N(e.path),
89
- message: P(e)
112
+ path: F(e.path),
113
+ message: I(e)
90
114
  };
91
115
  }
92
116
  //#endregion
93
117
  //#region packages/cli/src/config/defaults.ts
94
- var I = [
118
+ var R = [
95
119
  ".ts",
96
120
  ".tsx",
97
121
  ".js",
@@ -100,27 +124,27 @@ var I = [
100
124
  ".cts",
101
125
  ".mjs",
102
126
  ".cjs"
103
- ], L = /\bimport\s+(?:type\s+)?(?:[^'"]*?\s+from\s+)?['"]([^'"]+)['"]|\bexport\s+(?:type\s+)?(?:[^'"]*?\s+from\s+)?['"]([^'"]+)['"]/g, R = /\brequire\s*\(['"]([^'"]+)['"]\)/g, z = "\0virtual:makoo/entry", ce = "makoo-entry.ts", le = "\0makoo-entry.ts", B = new Set([".tsx", ".jsx"]), ue = new Set([".vue"]), V = "injections", de = "manifest", fe = {
104
- dir: V,
127
+ ], z = /\bimport\s+(?:type\s+)?(?:[^'"]*?\s+from\s+)?['"]([^'"]+)['"]|\bexport\s+(?:type\s+)?(?:[^'"]*?\s+from\s+)?['"]([^'"]+)['"]/g, ce = /\brequire\s*\(['"]([^'"]+)['"]\)/g, le = "\0virtual:makoo/entry", B = "makoo-entry.ts", ue = "\0makoo-entry.ts", V = new Set([".tsx", ".jsx"]), de = new Set([".vue"]), fe = "injections", pe = "manifest", me = {
128
+ dir: fe,
105
129
  include: ["*"],
106
130
  exclude: [],
107
- manifest: de
108
- }, pe = { setup: [] }, me = {
131
+ manifest: pe
132
+ }, he = { setup: [] }, ge = {
109
133
  alive: !1,
110
134
  scope: "local",
111
135
  timeout: 5e3,
112
136
  hooks: {}
113
- }, he = {
137
+ }, _e = {
114
138
  open: u.platform === "win32" || u.platform === "darwin",
115
139
  prefix: "server:"
116
- }, ge = {
140
+ }, ve = {
117
141
  metaFileName: !1,
118
142
  autoGrant: !0
119
- }, _e = {
143
+ }, ye = {
120
144
  align: 2,
121
145
  clientAlias: "$",
122
146
  styleImport: !0
123
- }, ve;
147
+ }, be;
124
148
  function H(e, t, n) {
125
149
  function r(n, r) {
126
150
  if (n._zod || Object.defineProperty(n, "_zod", {
@@ -150,30 +174,30 @@ function H(e, t, n) {
150
174
  }
151
175
  return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
152
176
  }
153
- var ye = class extends Error {
177
+ var xe = class extends Error {
154
178
  constructor() {
155
179
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
156
180
  }
157
- }, be = class extends Error {
181
+ }, Se = class extends Error {
158
182
  constructor(e) {
159
183
  super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
160
184
  }
161
185
  };
162
- (ve = globalThis).__zod_globalConfig ?? (ve.__zod_globalConfig = {});
163
- var xe = globalThis.__zod_globalConfig;
164
- function Se(e) {
165
- return e && Object.assign(xe, e), xe;
186
+ (be = globalThis).__zod_globalConfig ?? (be.__zod_globalConfig = {});
187
+ var Ce = globalThis.__zod_globalConfig;
188
+ function we(e) {
189
+ return e && Object.assign(Ce, e), Ce;
166
190
  }
167
191
  //#endregion
168
192
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
169
- function Ce(e) {
193
+ function Te(e) {
170
194
  let t = Object.values(e).filter((e) => typeof e == "number");
171
195
  return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
172
196
  }
173
- function we(e, t) {
197
+ function Ee(e, t) {
174
198
  return typeof t == "bigint" ? t.toString() : t;
175
199
  }
176
- function Te(e) {
200
+ function De(e) {
177
201
  return { get value() {
178
202
  {
179
203
  let t = e();
@@ -182,23 +206,23 @@ function Te(e) {
182
206
  throw Error("cached value already set");
183
207
  } };
184
208
  }
185
- function Ee(e) {
209
+ function Oe(e) {
186
210
  return e == null;
187
211
  }
188
- function De(e) {
212
+ function ke(e) {
189
213
  let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
190
214
  return e.slice(t, n);
191
215
  }
192
- function Oe(e, t) {
216
+ function Ae(e, t) {
193
217
  let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
194
218
  return Math.abs(n - r) < i ? 0 : n - r;
195
219
  }
196
- var ke = /* @__PURE__ */ Symbol("evaluating");
220
+ var je = /* @__PURE__ */ Symbol("evaluating");
197
221
  function U(e, t, n) {
198
222
  let r;
199
223
  Object.defineProperty(e, t, {
200
224
  get() {
201
- if (r !== ke) return r === void 0 && (r = ke, r = n()), r;
225
+ if (r !== je) return r === void 0 && (r = je, r = n()), r;
202
226
  },
203
227
  set(n) {
204
228
  Object.defineProperty(e, t, { value: n });
@@ -206,7 +230,7 @@ function U(e, t, n) {
206
230
  configurable: !0
207
231
  });
208
232
  }
209
- function Ae(e, t, n) {
233
+ function Me(e, t, n) {
210
234
  Object.defineProperty(e, t, {
211
235
  value: n,
212
236
  writable: !0,
@@ -214,48 +238,48 @@ function Ae(e, t, n) {
214
238
  configurable: !0
215
239
  });
216
240
  }
217
- function je(...e) {
241
+ function Ne(...e) {
218
242
  let t = {};
219
243
  for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
220
244
  return Object.defineProperties({}, t);
221
245
  }
222
- function Me(e) {
246
+ function Pe(e) {
223
247
  return JSON.stringify(e);
224
248
  }
225
- function Ne(e) {
249
+ function Fe(e) {
226
250
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
227
251
  }
228
- var Pe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
229
- function Fe(e) {
252
+ var Ie = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
253
+ function Le(e) {
230
254
  return typeof e == "object" && !!e && !Array.isArray(e);
231
255
  }
232
- var Ie = /* @__PURE__ */ Te(() => {
233
- if (xe.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
256
+ var Re = /* @__PURE__ */ De(() => {
257
+ if (Ce.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
234
258
  try {
235
259
  return Function(""), !0;
236
260
  } catch {
237
261
  return !1;
238
262
  }
239
263
  });
240
- function Le(e) {
241
- if (Fe(e) === !1) return !1;
264
+ function ze(e) {
265
+ if (Le(e) === !1) return !1;
242
266
  let t = e.constructor;
243
267
  if (t === void 0 || typeof t != "function") return !0;
244
268
  let n = t.prototype;
245
- return !(Fe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
269
+ return !(Le(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
246
270
  }
247
- function Re(e) {
248
- return Le(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
271
+ function Be(e) {
272
+ return ze(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
249
273
  }
250
- var ze = /* @__PURE__ */ new Set([
274
+ var Ve = /* @__PURE__ */ new Set([
251
275
  "string",
252
276
  "number",
253
277
  "symbol"
254
278
  ]);
255
- function Be(e) {
279
+ function He(e) {
256
280
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
257
281
  }
258
- function Ve(e, t, n) {
282
+ function Ue(e, t, n) {
259
283
  let r = new e._zod.constr(t ?? e._zod.def);
260
284
  return (!t || n?.parent) && (r._zod.parent = e), r;
261
285
  }
@@ -272,80 +296,80 @@ function W(e) {
272
296
  error: () => t.error
273
297
  } : t;
274
298
  }
275
- function He(e) {
299
+ function We(e) {
276
300
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
277
301
  }
278
- var Ue = {
302
+ var Ge = {
279
303
  safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
280
304
  int32: [-2147483648, 2147483647],
281
305
  uint32: [0, 4294967295],
282
306
  float32: [-34028234663852886e22, 34028234663852886e22],
283
307
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
284
308
  };
285
- function We(e, t) {
309
+ function Ke(e, t) {
286
310
  let n = e._zod.def, r = n.checks;
287
311
  if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
288
- return Ve(e, je(e._zod.def, {
312
+ return Ue(e, Ne(e._zod.def, {
289
313
  get shape() {
290
314
  let e = {};
291
315
  for (let r in t) {
292
316
  if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
293
317
  t[r] && (e[r] = n.shape[r]);
294
318
  }
295
- return Ae(this, "shape", e), e;
319
+ return Me(this, "shape", e), e;
296
320
  },
297
321
  checks: []
298
322
  }));
299
323
  }
300
- function Ge(e, t) {
324
+ function qe(e, t) {
301
325
  let n = e._zod.def, r = n.checks;
302
326
  if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
303
- return Ve(e, je(e._zod.def, {
327
+ return Ue(e, Ne(e._zod.def, {
304
328
  get shape() {
305
329
  let r = { ...e._zod.def.shape };
306
330
  for (let e in t) {
307
331
  if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
308
332
  t[e] && delete r[e];
309
333
  }
310
- return Ae(this, "shape", r), r;
334
+ return Me(this, "shape", r), r;
311
335
  },
312
336
  checks: []
313
337
  }));
314
338
  }
315
- function Ke(e, t) {
316
- if (!Le(t)) throw Error("Invalid input to extend: expected a plain object");
339
+ function Je(e, t) {
340
+ if (!ze(t)) throw Error("Invalid input to extend: expected a plain object");
317
341
  let n = e._zod.def.checks;
318
342
  if (n && n.length > 0) {
319
343
  let n = e._zod.def.shape;
320
344
  for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
321
345
  }
322
- return Ve(e, je(e._zod.def, { get shape() {
346
+ return Ue(e, Ne(e._zod.def, { get shape() {
323
347
  let n = {
324
348
  ...e._zod.def.shape,
325
349
  ...t
326
350
  };
327
- return Ae(this, "shape", n), n;
351
+ return Me(this, "shape", n), n;
328
352
  } }));
329
353
  }
330
- function qe(e, t) {
331
- if (!Le(t)) throw Error("Invalid input to safeExtend: expected a plain object");
332
- return Ve(e, je(e._zod.def, { get shape() {
354
+ function Ye(e, t) {
355
+ if (!ze(t)) throw Error("Invalid input to safeExtend: expected a plain object");
356
+ return Ue(e, Ne(e._zod.def, { get shape() {
333
357
  let n = {
334
358
  ...e._zod.def.shape,
335
359
  ...t
336
360
  };
337
- return Ae(this, "shape", n), n;
361
+ return Me(this, "shape", n), n;
338
362
  } }));
339
363
  }
340
- function Je(e, t) {
364
+ function Xe(e, t) {
341
365
  if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
342
- return Ve(e, je(e._zod.def, {
366
+ return Ue(e, Ne(e._zod.def, {
343
367
  get shape() {
344
368
  let n = {
345
369
  ...e._zod.def.shape,
346
370
  ...t._zod.def.shape
347
371
  };
348
- return Ae(this, "shape", n), n;
372
+ return Me(this, "shape", n), n;
349
373
  },
350
374
  get catchall() {
351
375
  return t._zod.def.catchall;
@@ -353,10 +377,10 @@ function Je(e, t) {
353
377
  checks: t._zod.def.checks ?? []
354
378
  }));
355
379
  }
356
- function Ye(e, t, n) {
380
+ function Ze(e, t, n) {
357
381
  let r = t._zod.def.checks;
358
382
  if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
359
- return Ve(t, je(t._zod.def, {
383
+ return Ue(t, Ne(t._zod.def, {
360
384
  get shape() {
361
385
  let r = t._zod.def.shape, i = { ...r };
362
386
  if (n) for (let t in n) {
@@ -370,13 +394,13 @@ function Ye(e, t, n) {
370
394
  type: "optional",
371
395
  innerType: r[t]
372
396
  }) : r[t];
373
- return Ae(this, "shape", i), i;
397
+ return Me(this, "shape", i), i;
374
398
  },
375
399
  checks: []
376
400
  }));
377
401
  }
378
- function Xe(e, t, n) {
379
- return Ve(t, je(t._zod.def, { get shape() {
402
+ function Qe(e, t, n) {
403
+ return Ue(t, Ne(t._zod.def, { get shape() {
380
404
  let r = t._zod.def.shape, i = { ...r };
381
405
  if (n) for (let t in n) {
382
406
  if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
@@ -389,36 +413,36 @@ function Xe(e, t, n) {
389
413
  type: "nonoptional",
390
414
  innerType: r[t]
391
415
  });
392
- return Ae(this, "shape", i), i;
416
+ return Me(this, "shape", i), i;
393
417
  } }));
394
418
  }
395
- function Ze(e, t = 0) {
419
+ function $e(e, t = 0) {
396
420
  if (e.aborted === !0) return !0;
397
421
  for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
398
422
  return !1;
399
423
  }
400
- function Qe(e, t = 0) {
424
+ function et(e, t = 0) {
401
425
  if (e.aborted === !0) return !0;
402
426
  for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
403
427
  return !1;
404
428
  }
405
- function $e(e, t) {
429
+ function tt(e, t) {
406
430
  return t.map((t) => {
407
431
  var n;
408
432
  return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
409
433
  });
410
434
  }
411
- function et(e) {
435
+ function nt(e) {
412
436
  return typeof e == "string" ? e : e?.message;
413
437
  }
414
- function tt(e, t, n) {
415
- let r = e.message ? e.message : et(e.inst?._zod.def?.error?.(e)) ?? et(t?.error?.(e)) ?? et(n.customError?.(e)) ?? et(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
438
+ function rt(e, t, n) {
439
+ let r = e.message ? e.message : nt(e.inst?._zod.def?.error?.(e)) ?? nt(t?.error?.(e)) ?? nt(n.customError?.(e)) ?? nt(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
416
440
  return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
417
441
  }
418
- function nt(e) {
442
+ function it(e) {
419
443
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
420
444
  }
421
- function rt(...e) {
445
+ function at(...e) {
422
446
  let [t, n, r] = e;
423
447
  return typeof t == "string" ? {
424
448
  message: t,
@@ -429,19 +453,19 @@ function rt(...e) {
429
453
  }
430
454
  //#endregion
431
455
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
432
- var it = (e, t) => {
456
+ var ot = (e, t) => {
433
457
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
434
458
  value: e._zod,
435
459
  enumerable: !1
436
460
  }), Object.defineProperty(e, "issues", {
437
461
  value: t,
438
462
  enumerable: !1
439
- }), e.message = JSON.stringify(t, we, 2), Object.defineProperty(e, "toString", {
463
+ }), e.message = JSON.stringify(t, Ee, 2), Object.defineProperty(e, "toString", {
440
464
  value: () => e.message,
441
465
  enumerable: !1
442
466
  });
443
- }, at = H("$ZodError", it), ot = H("$ZodError", it, { Parent: Error });
444
- function st(e, t = (e) => e.message) {
467
+ }, st = H("$ZodError", ot), ct = H("$ZodError", ot, { Parent: Error });
468
+ function lt(e, t = (e) => e.message) {
445
469
  let n = {}, r = [];
446
470
  for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
447
471
  return {
@@ -449,7 +473,7 @@ function st(e, t = (e) => e.message) {
449
473
  fieldErrors: n
450
474
  };
451
475
  }
452
- function ct(e, t = (e) => e.message) {
476
+ function ut(e, t = (e) => e.message) {
453
477
  let n = { _errors: [] }, r = (e, i = []) => {
454
478
  for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
455
479
  else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
@@ -470,7 +494,7 @@ function ct(e, t = (e) => e.message) {
470
494
  }
471
495
  //#endregion
472
496
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
473
- var lt = (e) => (t, n, r, i) => {
497
+ var dt = (e) => (t, n, r, i) => {
474
498
  let a = r ? {
475
499
  ...r,
476
500
  async: !1
@@ -478,13 +502,13 @@ var lt = (e) => (t, n, r, i) => {
478
502
  value: n,
479
503
  issues: []
480
504
  }, a);
481
- if (o instanceof Promise) throw new ye();
505
+ if (o instanceof Promise) throw new xe();
482
506
  if (o.issues.length) {
483
- let t = new (i?.Err ?? e)(o.issues.map((e) => tt(e, a, Se())));
484
- throw Pe(t, i?.callee), t;
507
+ let t = new (i?.Err ?? e)(o.issues.map((e) => rt(e, a, we())));
508
+ throw Ie(t, i?.callee), t;
485
509
  }
486
510
  return o.value;
487
- }, ut = /* @__PURE__ */ lt(ot), dt = (e) => async (t, n, r, i) => {
511
+ }, ft = (e) => async (t, n, r, i) => {
488
512
  let a = r ? {
489
513
  ...r,
490
514
  async: !0
@@ -493,11 +517,11 @@ var lt = (e) => (t, n, r, i) => {
493
517
  issues: []
494
518
  }, a);
495
519
  if (o instanceof Promise && (o = await o), o.issues.length) {
496
- let t = new (i?.Err ?? e)(o.issues.map((e) => tt(e, a, Se())));
497
- throw Pe(t, i?.callee), t;
520
+ let t = new (i?.Err ?? e)(o.issues.map((e) => rt(e, a, we())));
521
+ throw Ie(t, i?.callee), t;
498
522
  }
499
523
  return o.value;
500
- }, ft = /* @__PURE__ */ dt(ot), pt = (e) => (t, n, r) => {
524
+ }, pt = (e) => (t, n, r) => {
501
525
  let i = r ? {
502
526
  ...r,
503
527
  async: !1
@@ -505,15 +529,15 @@ var lt = (e) => (t, n, r, i) => {
505
529
  value: n,
506
530
  issues: []
507
531
  }, i);
508
- if (a instanceof Promise) throw new ye();
532
+ if (a instanceof Promise) throw new xe();
509
533
  return a.issues.length ? {
510
534
  success: !1,
511
- error: new (e ?? at)(a.issues.map((e) => tt(e, i, Se())))
535
+ error: new (e ?? st)(a.issues.map((e) => rt(e, i, we())))
512
536
  } : {
513
537
  success: !0,
514
538
  data: a.value
515
539
  };
516
- }, mt = /* @__PURE__ */ pt(ot), ht = (e) => async (t, n, r) => {
540
+ }, mt = /* @__PURE__ */ pt(ct), ht = (e) => async (t, n, r) => {
517
541
  let i = r ? {
518
542
  ...r,
519
543
  async: !0
@@ -523,24 +547,24 @@ var lt = (e) => (t, n, r, i) => {
523
547
  }, i);
524
548
  return a instanceof Promise && (a = await a), a.issues.length ? {
525
549
  success: !1,
526
- error: new e(a.issues.map((e) => tt(e, i, Se())))
550
+ error: new e(a.issues.map((e) => rt(e, i, we())))
527
551
  } : {
528
552
  success: !0,
529
553
  data: a.value
530
554
  };
531
- }, gt = /* @__PURE__ */ ht(ot), _t = (e) => (t, n, r) => {
555
+ }, gt = /* @__PURE__ */ ht(ct), _t = (e) => (t, n, r) => {
532
556
  let i = r ? {
533
557
  ...r,
534
558
  direction: "backward"
535
559
  } : { direction: "backward" };
536
- return lt(e)(t, n, i);
537
- }, vt = (e) => (t, n, r) => lt(e)(t, n, r), yt = (e) => async (t, n, r) => {
560
+ return dt(e)(t, n, i);
561
+ }, vt = (e) => (t, n, r) => dt(e)(t, n, r), yt = (e) => async (t, n, r) => {
538
562
  let i = r ? {
539
563
  ...r,
540
564
  direction: "backward"
541
565
  } : { direction: "backward" };
542
- return dt(e)(t, n, i);
543
- }, bt = (e) => async (t, n, r) => dt(e)(t, n, r), xt = (e) => (t, n, r) => {
566
+ return ft(e)(t, n, i);
567
+ }, bt = (e) => async (t, n, r) => ft(e)(t, n, r), xt = (e) => (t, n, r) => {
544
568
  let i = r ? {
545
569
  ...r,
546
570
  direction: "backward"
@@ -620,7 +644,7 @@ var Xt = (e) => {
620
644
  (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
621
645
  }), e._zod.check = (n) => {
622
646
  if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
623
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Oe(n.value, t.value) === 0) || n.issues.push({
647
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Ae(n.value, t.value) === 0) || n.issues.push({
624
648
  origin: typeof n.value,
625
649
  code: "not_multiple_of",
626
650
  divisor: t.value,
@@ -631,7 +655,7 @@ var Xt = (e) => {
631
655
  };
632
656
  }), sn = /* @__PURE__ */ H("$ZodCheckNumberFormat", (e, t) => {
633
657
  G.init(e, t), t.format = t.format || "float64";
634
- let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = Ue[t.format];
658
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = Ge[t.format];
635
659
  e._zod.onattach.push((e) => {
636
660
  let r = e._zod.bag;
637
661
  r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Zt);
@@ -694,14 +718,14 @@ var Xt = (e) => {
694
718
  var n;
695
719
  G.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
696
720
  let t = e.value;
697
- return !Ee(t) && t.length !== void 0;
721
+ return !Oe(t) && t.length !== void 0;
698
722
  }), e._zod.onattach.push((e) => {
699
723
  let n = e._zod.bag.maximum ?? Infinity;
700
724
  t.maximum < n && (e._zod.bag.maximum = t.maximum);
701
725
  }), e._zod.check = (n) => {
702
726
  let r = n.value;
703
727
  if (r.length <= t.maximum) return;
704
- let i = nt(r);
728
+ let i = it(r);
705
729
  n.issues.push({
706
730
  origin: i,
707
731
  code: "too_big",
@@ -716,14 +740,14 @@ var Xt = (e) => {
716
740
  var n;
717
741
  G.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
718
742
  let t = e.value;
719
- return !Ee(t) && t.length !== void 0;
743
+ return !Oe(t) && t.length !== void 0;
720
744
  }), e._zod.onattach.push((e) => {
721
745
  let n = e._zod.bag.minimum ?? -Infinity;
722
746
  t.minimum > n && (e._zod.bag.minimum = t.minimum);
723
747
  }), e._zod.check = (n) => {
724
748
  let r = n.value;
725
749
  if (r.length >= t.minimum) return;
726
- let i = nt(r);
750
+ let i = it(r);
727
751
  n.issues.push({
728
752
  origin: i,
729
753
  code: "too_small",
@@ -738,14 +762,14 @@ var Xt = (e) => {
738
762
  var n;
739
763
  G.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
740
764
  let t = e.value;
741
- return !Ee(t) && t.length !== void 0;
765
+ return !Oe(t) && t.length !== void 0;
742
766
  }), e._zod.onattach.push((e) => {
743
767
  let n = e._zod.bag;
744
768
  n.minimum = t.length, n.maximum = t.length, n.length = t.length;
745
769
  }), e._zod.check = (n) => {
746
770
  let r = n.value, i = r.length;
747
771
  if (i === t.length) return;
748
- let a = nt(r), o = i > t.length;
772
+ let a = it(r), o = i > t.length;
749
773
  n.issues.push({
750
774
  origin: a,
751
775
  ...o ? {
@@ -796,7 +820,7 @@ var Xt = (e) => {
796
820
  t.pattern ??= tn, dn.init(e, t);
797
821
  }), hn = /* @__PURE__ */ H("$ZodCheckIncludes", (e, t) => {
798
822
  G.init(e, t);
799
- let n = Be(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
823
+ let n = He(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
800
824
  t.pattern = r, e._zod.onattach.push((e) => {
801
825
  let t = e._zod.bag;
802
826
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
@@ -813,7 +837,7 @@ var Xt = (e) => {
813
837
  };
814
838
  }), gn = /* @__PURE__ */ H("$ZodCheckStartsWith", (e, t) => {
815
839
  G.init(e, t);
816
- let n = RegExp(`^${Be(t.prefix)}.*`);
840
+ let n = RegExp(`^${He(t.prefix)}.*`);
817
841
  t.pattern ??= n, e._zod.onattach.push((e) => {
818
842
  let t = e._zod.bag;
819
843
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
@@ -830,7 +854,7 @@ var Xt = (e) => {
830
854
  };
831
855
  }), _n = /* @__PURE__ */ H("$ZodCheckEndsWith", (e, t) => {
832
856
  G.init(e, t);
833
- let n = RegExp(`.*${Be(t.suffix)}$`);
857
+ let n = RegExp(`.*${He(t.suffix)}$`);
834
858
  t.pattern ??= n, e._zod.onattach.push((e) => {
835
859
  let t = e._zod.bag;
836
860
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
@@ -883,27 +907,27 @@ var Xt = (e) => {
883
907
  });
884
908
  else {
885
909
  let t = (e, t, n) => {
886
- let r = Ze(e), i;
910
+ let r = $e(e), i;
887
911
  for (let a of t) {
888
912
  if (a._zod.def.when) {
889
- if (Qe(e) || !a._zod.def.when(e)) continue;
913
+ if (et(e) || !a._zod.def.when(e)) continue;
890
914
  } else if (r) continue;
891
915
  let t = e.issues.length, o = a._zod.check(e);
892
- if (o instanceof Promise && n?.async === !1) throw new ye();
916
+ if (o instanceof Promise && n?.async === !1) throw new xe();
893
917
  if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
894
- await o, e.issues.length !== t && (r ||= Ze(e, t));
918
+ await o, e.issues.length !== t && (r ||= $e(e, t));
895
919
  });
896
920
  else {
897
921
  if (e.issues.length === t) continue;
898
- r ||= Ze(e, t);
922
+ r ||= $e(e, t);
899
923
  }
900
924
  }
901
925
  return i ? i.then(() => e) : e;
902
926
  }, n = (n, i, a) => {
903
- if (Ze(n)) return n.aborted = !0, n;
927
+ if ($e(n)) return n.aborted = !0, n;
904
928
  let o = t(i, r, a);
905
929
  if (o instanceof Promise) {
906
- if (a.async === !1) throw new ye();
930
+ if (a.async === !1) throw new xe();
907
931
  return o.then((t) => e._zod.parse(t, a));
908
932
  }
909
933
  return e._zod.parse(o, a);
@@ -922,7 +946,7 @@ var Xt = (e) => {
922
946
  }
923
947
  let o = e._zod.parse(i, a);
924
948
  if (o instanceof Promise) {
925
- if (a.async === !1) throw new ye();
949
+ if (a.async === !1) throw new xe();
926
950
  return o.then((e) => t(e, r, a));
927
951
  }
928
952
  return t(o, r, a);
@@ -1181,7 +1205,7 @@ var qn = /* @__PURE__ */ H("$ZodJWT", (e, t) => {
1181
1205
  }), t);
1182
1206
  });
1183
1207
  function $n(e, t, n) {
1184
- e.issues.length && t.issues.push(...$e(n, e.issues)), t.value[n] = e.value;
1208
+ e.issues.length && t.issues.push(...tt(n, e.issues)), t.value[n] = e.value;
1185
1209
  }
1186
1210
  var er = /* @__PURE__ */ H("$ZodArray", (e, t) => {
1187
1211
  K.init(e, t), e._zod.parse = (n, r) => {
@@ -1208,7 +1232,7 @@ function tr(e, t, n, r, i, a) {
1208
1232
  let o = n in r;
1209
1233
  if (e.issues.length) {
1210
1234
  if (i && a && !o) return;
1211
- t.issues.push(...$e(n, e.issues));
1235
+ t.issues.push(...tt(n, e.issues));
1212
1236
  }
1213
1237
  if (!o && !i) {
1214
1238
  e.issues.length || t.issues.push({
@@ -1224,7 +1248,7 @@ function tr(e, t, n, r, i, a) {
1224
1248
  function nr(e) {
1225
1249
  let t = Object.keys(e.shape);
1226
1250
  for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
1227
- let n = He(e.shape);
1251
+ let n = We(e.shape);
1228
1252
  return {
1229
1253
  ...e,
1230
1254
  keys: t,
@@ -1262,7 +1286,7 @@ var ir = /* @__PURE__ */ H("$ZodObject", (e, t) => {
1262
1286
  return Object.defineProperty(t, "shape", { value: n }), n;
1263
1287
  } });
1264
1288
  }
1265
- let n = Te(() => nr(t));
1289
+ let n = De(() => nr(t));
1266
1290
  U(e._zod, "propValues", () => {
1267
1291
  let e = t.shape, n = {};
1268
1292
  for (let t in e) {
@@ -1274,7 +1298,7 @@ var ir = /* @__PURE__ */ H("$ZodObject", (e, t) => {
1274
1298
  }
1275
1299
  return n;
1276
1300
  });
1277
- let r = Fe, i = t.catchall, a;
1301
+ let r = Le, i = t.catchall, a;
1278
1302
  e._zod.parse = (t, o) => {
1279
1303
  a ??= n.value;
1280
1304
  let s = t.value;
@@ -1297,13 +1321,13 @@ var ir = /* @__PURE__ */ H("$ZodObject", (e, t) => {
1297
1321
  };
1298
1322
  }), ar = /* @__PURE__ */ H("$ZodObjectJIT", (e, t) => {
1299
1323
  ir.init(e, t);
1300
- let n = e._zod.parse, r = Te(() => nr(t)), i = (e) => {
1324
+ let n = e._zod.parse, r = De(() => nr(t)), i = (e) => {
1301
1325
  let t = new yn([
1302
1326
  "shape",
1303
1327
  "payload",
1304
1328
  "ctx"
1305
1329
  ]), n = r.value, i = (e) => {
1306
- let t = Me(e);
1330
+ let t = Pe(e);
1307
1331
  return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
1308
1332
  };
1309
1333
  t.write("const input = payload.value;");
@@ -1311,7 +1335,7 @@ var ir = /* @__PURE__ */ H("$ZodObject", (e, t) => {
1311
1335
  for (let e of n.keys) a[e] = `key_${o++}`;
1312
1336
  t.write("const newResult = {};");
1313
1337
  for (let r of n.keys) {
1314
- let n = a[r], o = Me(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
1338
+ let n = a[r], o = Pe(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
1315
1339
  t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
1316
1340
  if (${n}.issues.length) {
1317
1341
  if (${o} in input) {
@@ -1376,7 +1400,7 @@ var ir = /* @__PURE__ */ H("$ZodObject", (e, t) => {
1376
1400
  t.write("payload.value = newResult;"), t.write("return payload;");
1377
1401
  let s = t.compile();
1378
1402
  return (t, n) => s(e, t, n);
1379
- }, a, o = Fe, s = !xe.jitless, c = s && Ie.value, l = t.catchall, u;
1403
+ }, a, o = Le, s = !Ce.jitless, c = s && Re.value, l = t.catchall, u;
1380
1404
  e._zod.parse = (d, f) => {
1381
1405
  u ??= r.value;
1382
1406
  let p = d.value;
@@ -1390,12 +1414,12 @@ var ir = /* @__PURE__ */ H("$ZodObject", (e, t) => {
1390
1414
  });
1391
1415
  function or(e, t, n, r) {
1392
1416
  for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1393
- let i = e.filter((e) => !Ze(e));
1417
+ let i = e.filter((e) => !$e(e));
1394
1418
  return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1395
1419
  code: "invalid_union",
1396
1420
  input: t.value,
1397
1421
  inst: n,
1398
- errors: e.map((e) => e.issues.map((e) => tt(e, r, Se())))
1422
+ errors: e.map((e) => e.issues.map((e) => rt(e, r, we())))
1399
1423
  }), t);
1400
1424
  }
1401
1425
  var sr = /* @__PURE__ */ H("$ZodUnion", (e, t) => {
@@ -1404,7 +1428,7 @@ var sr = /* @__PURE__ */ H("$ZodUnion", (e, t) => {
1404
1428
  }), U(e._zod, "pattern", () => {
1405
1429
  if (t.options.every((e) => e._zod.pattern)) {
1406
1430
  let e = t.options.map((e) => e._zod.pattern);
1407
- return RegExp(`^(${e.map((e) => De(e.source)).join("|")})$`);
1431
+ return RegExp(`^(${e.map((e) => ke(e.source)).join("|")})$`);
1408
1432
  }
1409
1433
  });
1410
1434
  let n = t.options.length === 1 ? t.options[0]._zod.run : null;
@@ -1441,7 +1465,7 @@ function lr(e, t) {
1441
1465
  valid: !0,
1442
1466
  data: e
1443
1467
  };
1444
- if (Le(e) && Le(t)) {
1468
+ if (ze(e) && ze(t)) {
1445
1469
  let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1446
1470
  ...e,
1447
1471
  ...t
@@ -1495,92 +1519,15 @@ function ur(e, t, n) {
1495
1519
  if (a.length && i && e.issues.push({
1496
1520
  ...i,
1497
1521
  keys: a
1498
- }), Ze(e)) return e;
1522
+ }), $e(e)) return e;
1499
1523
  let o = lr(t.value, n.value);
1500
1524
  if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
1501
1525
  return e.value = o.data, e;
1502
1526
  }
1503
- var dr = /* @__PURE__ */ H("$ZodTuple", (e, t) => {
1504
- K.init(e, t);
1505
- let n = t.items;
1506
- e._zod.parse = (r, i) => {
1507
- let a = r.value;
1508
- if (!Array.isArray(a)) return r.issues.push({
1509
- input: a,
1510
- inst: e,
1511
- expected: "tuple",
1512
- code: "invalid_type"
1513
- }), r;
1514
- r.value = [];
1515
- let o = [], s = fr(n, "optin"), c = fr(n, "optout");
1516
- if (!t.rest) {
1517
- if (a.length < s) return r.issues.push({
1518
- code: "too_small",
1519
- minimum: s,
1520
- inclusive: !0,
1521
- input: a,
1522
- inst: e,
1523
- origin: "array"
1524
- }), r;
1525
- a.length > n.length && r.issues.push({
1526
- code: "too_big",
1527
- maximum: n.length,
1528
- inclusive: !0,
1529
- input: a,
1530
- inst: e,
1531
- origin: "array"
1532
- });
1533
- }
1534
- let l = Array(n.length);
1535
- for (let e = 0; e < n.length; e++) {
1536
- let t = n[e]._zod.run({
1537
- value: a[e],
1538
- issues: []
1539
- }, i);
1540
- t instanceof Promise ? o.push(t.then((t) => {
1541
- l[e] = t;
1542
- })) : l[e] = t;
1543
- }
1544
- if (t.rest) {
1545
- let e = n.length - 1, s = a.slice(n.length);
1546
- for (let n of s) {
1547
- e++;
1548
- let a = t.rest._zod.run({
1549
- value: n,
1550
- issues: []
1551
- }, i);
1552
- a instanceof Promise ? o.push(a.then((t) => pr(t, r, e))) : pr(a, r, e);
1553
- }
1554
- }
1555
- return o.length ? Promise.all(o).then(() => mr(l, r, n, a, c)) : mr(l, r, n, a, c);
1556
- };
1557
- });
1558
- function fr(e, t) {
1559
- for (let n = e.length - 1; n >= 0; n--) if (e[n]._zod[t] !== "optional") return n + 1;
1560
- return 0;
1561
- }
1562
- function pr(e, t, n) {
1563
- e.issues.length && t.issues.push(...$e(n, e.issues)), t.value[n] = e.value;
1564
- }
1565
- function mr(e, t, n, r, i) {
1566
- for (let a = 0; a < n.length; a++) {
1567
- let n = e[a], o = a < r.length;
1568
- if (n.issues.length) {
1569
- if (!o && a >= i) {
1570
- t.value.length = a;
1571
- break;
1572
- }
1573
- t.issues.push(...$e(a, n.issues));
1574
- }
1575
- t.value[a] = n.value;
1576
- }
1577
- for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
1578
- return t;
1579
- }
1580
- var hr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1527
+ var dr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1581
1528
  K.init(e, t), e._zod.parse = (n, r) => {
1582
1529
  let i = n.value;
1583
- if (!Le(i)) return n.issues.push({
1530
+ if (!ze(i)) return n.issues.push({
1584
1531
  expected: "record",
1585
1532
  code: "invalid_type",
1586
1533
  input: i,
@@ -1601,7 +1548,7 @@ var hr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1601
1548
  n.issues.push({
1602
1549
  code: "invalid_key",
1603
1550
  origin: "record",
1604
- issues: o.issues.map((e) => tt(e, r, Se())),
1551
+ issues: o.issues.map((e) => rt(e, r, we())),
1605
1552
  input: c,
1606
1553
  path: [c],
1607
1554
  inst: e
@@ -1613,8 +1560,8 @@ var hr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1613
1560
  issues: []
1614
1561
  }, r);
1615
1562
  u instanceof Promise ? a.push(u.then((e) => {
1616
- e.issues.length && n.issues.push(...$e(c, e.issues)), n.value[l] = e.value;
1617
- })) : (u.issues.length && n.issues.push(...$e(c, u.issues)), n.value[l] = u.value);
1563
+ e.issues.length && n.issues.push(...tt(c, e.issues)), n.value[l] = e.value;
1564
+ })) : (u.issues.length && n.issues.push(...tt(c, u.issues)), n.value[l] = u.value);
1618
1565
  }
1619
1566
  let c;
1620
1567
  for (let e in i) s.has(e) || (c ??= [], c.push(e));
@@ -1645,7 +1592,7 @@ var hr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1645
1592
  t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
1646
1593
  code: "invalid_key",
1647
1594
  origin: "record",
1648
- issues: s.issues.map((e) => tt(e, r, Se())),
1595
+ issues: s.issues.map((e) => rt(e, r, we())),
1649
1596
  input: o,
1650
1597
  path: [o],
1651
1598
  inst: e
@@ -1657,16 +1604,16 @@ var hr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1657
1604
  issues: []
1658
1605
  }, r);
1659
1606
  c instanceof Promise ? a.push(c.then((e) => {
1660
- e.issues.length && n.issues.push(...$e(o, e.issues)), n.value[s.value] = e.value;
1661
- })) : (c.issues.length && n.issues.push(...$e(o, c.issues)), n.value[s.value] = c.value);
1607
+ e.issues.length && n.issues.push(...tt(o, e.issues)), n.value[s.value] = e.value;
1608
+ })) : (c.issues.length && n.issues.push(...tt(o, c.issues)), n.value[s.value] = c.value);
1662
1609
  }
1663
1610
  }
1664
1611
  return a.length ? Promise.all(a).then(() => n) : n;
1665
1612
  };
1666
- }), gr = /* @__PURE__ */ H("$ZodEnum", (e, t) => {
1613
+ }), fr = /* @__PURE__ */ H("$ZodEnum", (e, t) => {
1667
1614
  K.init(e, t);
1668
- let n = Ce(t.entries), r = new Set(n);
1669
- e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ze.has(typeof e)).map((e) => typeof e == "string" ? Be(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
1615
+ let n = Te(t.entries), r = new Set(n);
1616
+ e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => Ve.has(typeof e)).map((e) => typeof e == "string" ? He(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
1670
1617
  let a = t.value;
1671
1618
  return r.has(a) || t.issues.push({
1672
1619
  code: "invalid_value",
@@ -1675,62 +1622,62 @@ var hr = /* @__PURE__ */ H("$ZodRecord", (e, t) => {
1675
1622
  inst: e
1676
1623
  }), t;
1677
1624
  };
1678
- }), _r = /* @__PURE__ */ H("$ZodTransform", (e, t) => {
1625
+ }), pr = /* @__PURE__ */ H("$ZodTransform", (e, t) => {
1679
1626
  K.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
1680
- if (r.direction === "backward") throw new be(e.constructor.name);
1627
+ if (r.direction === "backward") throw new Se(e.constructor.name);
1681
1628
  let i = t.transform(n.value, n);
1682
1629
  if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
1683
- if (i instanceof Promise) throw new ye();
1630
+ if (i instanceof Promise) throw new xe();
1684
1631
  return n.value = i, n.fallback = !0, n;
1685
1632
  };
1686
1633
  });
1687
- function vr(e, t) {
1634
+ function mr(e, t) {
1688
1635
  return t === void 0 && (e.issues.length || e.fallback) ? {
1689
1636
  issues: [],
1690
1637
  value: void 0
1691
1638
  } : e;
1692
1639
  }
1693
- var yr = /* @__PURE__ */ H("$ZodOptional", (e, t) => {
1640
+ var hr = /* @__PURE__ */ H("$ZodOptional", (e, t) => {
1694
1641
  K.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", U(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), U(e._zod, "pattern", () => {
1695
1642
  let e = t.innerType._zod.pattern;
1696
- return e ? RegExp(`^(${De(e.source)})?$`) : void 0;
1643
+ return e ? RegExp(`^(${ke(e.source)})?$`) : void 0;
1697
1644
  }), e._zod.parse = (e, n) => {
1698
1645
  if (t.innerType._zod.optin === "optional") {
1699
1646
  let r = e.value, i = t.innerType._zod.run(e, n);
1700
- return i instanceof Promise ? i.then((e) => vr(e, r)) : vr(i, r);
1647
+ return i instanceof Promise ? i.then((e) => mr(e, r)) : mr(i, r);
1701
1648
  }
1702
1649
  return e.value === void 0 ? e : t.innerType._zod.run(e, n);
1703
1650
  };
1704
- }), br = /* @__PURE__ */ H("$ZodExactOptional", (e, t) => {
1705
- yr.init(e, t), U(e._zod, "values", () => t.innerType._zod.values), U(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1706
- }), xr = /* @__PURE__ */ H("$ZodNullable", (e, t) => {
1651
+ }), gr = /* @__PURE__ */ H("$ZodExactOptional", (e, t) => {
1652
+ hr.init(e, t), U(e._zod, "values", () => t.innerType._zod.values), U(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1653
+ }), _r = /* @__PURE__ */ H("$ZodNullable", (e, t) => {
1707
1654
  K.init(e, t), U(e._zod, "optin", () => t.innerType._zod.optin), U(e._zod, "optout", () => t.innerType._zod.optout), U(e._zod, "pattern", () => {
1708
1655
  let e = t.innerType._zod.pattern;
1709
- return e ? RegExp(`^(${De(e.source)}|null)$`) : void 0;
1656
+ return e ? RegExp(`^(${ke(e.source)}|null)$`) : void 0;
1710
1657
  }), U(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1711
- }), Sr = /* @__PURE__ */ H("$ZodDefault", (e, t) => {
1658
+ }), vr = /* @__PURE__ */ H("$ZodDefault", (e, t) => {
1712
1659
  K.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1713
1660
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
1714
1661
  if (e.value === void 0) return e.value = t.defaultValue, e;
1715
1662
  let r = t.innerType._zod.run(e, n);
1716
- return r instanceof Promise ? r.then((e) => Cr(e, t)) : Cr(r, t);
1663
+ return r instanceof Promise ? r.then((e) => yr(e, t)) : yr(r, t);
1717
1664
  };
1718
1665
  });
1719
- function Cr(e, t) {
1666
+ function yr(e, t) {
1720
1667
  return e.value === void 0 && (e.value = t.defaultValue), e;
1721
1668
  }
1722
- var wr = /* @__PURE__ */ H("$ZodPrefault", (e, t) => {
1669
+ var br = /* @__PURE__ */ H("$ZodPrefault", (e, t) => {
1723
1670
  K.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1724
- }), Tr = /* @__PURE__ */ H("$ZodNonOptional", (e, t) => {
1671
+ }), xr = /* @__PURE__ */ H("$ZodNonOptional", (e, t) => {
1725
1672
  K.init(e, t), U(e._zod, "values", () => {
1726
1673
  let e = t.innerType._zod.values;
1727
1674
  return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
1728
1675
  }), e._zod.parse = (n, r) => {
1729
1676
  let i = t.innerType._zod.run(n, r);
1730
- return i instanceof Promise ? i.then((t) => Er(t, e)) : Er(i, e);
1677
+ return i instanceof Promise ? i.then((t) => Sr(t, e)) : Sr(i, e);
1731
1678
  };
1732
1679
  });
1733
- function Er(e, t) {
1680
+ function Sr(e, t) {
1734
1681
  return !e.issues.length && e.value === void 0 && e.issues.push({
1735
1682
  code: "invalid_type",
1736
1683
  expected: "nonoptional",
@@ -1738,94 +1685,55 @@ function Er(e, t) {
1738
1685
  inst: t
1739
1686
  }), e;
1740
1687
  }
1741
- var Dr = /* @__PURE__ */ H("$ZodCatch", (e, t) => {
1688
+ var Cr = /* @__PURE__ */ H("$ZodCatch", (e, t) => {
1742
1689
  K.init(e, t), e._zod.optin = "optional", U(e._zod, "optout", () => t.innerType._zod.optout), U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1743
1690
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
1744
1691
  let r = t.innerType._zod.run(e, n);
1745
1692
  return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1746
1693
  ...e,
1747
- error: { issues: r.issues.map((e) => tt(e, n, Se())) },
1694
+ error: { issues: r.issues.map((e) => rt(e, n, we())) },
1748
1695
  input: e.value
1749
1696
  }), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1750
1697
  ...e,
1751
- error: { issues: r.issues.map((e) => tt(e, n, Se())) },
1698
+ error: { issues: r.issues.map((e) => rt(e, n, we())) },
1752
1699
  input: e.value
1753
1700
  }), e.issues = [], e.fallback = !0), e);
1754
1701
  };
1755
- }), Or = /* @__PURE__ */ H("$ZodPipe", (e, t) => {
1702
+ }), wr = /* @__PURE__ */ H("$ZodPipe", (e, t) => {
1756
1703
  K.init(e, t), U(e._zod, "values", () => t.in._zod.values), U(e._zod, "optin", () => t.in._zod.optin), U(e._zod, "optout", () => t.out._zod.optout), U(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
1757
1704
  if (n.direction === "backward") {
1758
1705
  let r = t.out._zod.run(e, n);
1759
- return r instanceof Promise ? r.then((e) => kr(e, t.in, n)) : kr(r, t.in, n);
1706
+ return r instanceof Promise ? r.then((e) => Tr(e, t.in, n)) : Tr(r, t.in, n);
1760
1707
  }
1761
1708
  let r = t.in._zod.run(e, n);
1762
- return r instanceof Promise ? r.then((e) => kr(e, t.out, n)) : kr(r, t.out, n);
1709
+ return r instanceof Promise ? r.then((e) => Tr(e, t.out, n)) : Tr(r, t.out, n);
1763
1710
  };
1764
1711
  });
1765
- function kr(e, t, n) {
1712
+ function Tr(e, t, n) {
1766
1713
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
1767
1714
  value: e.value,
1768
1715
  issues: e.issues,
1769
1716
  fallback: e.fallback
1770
1717
  }, n);
1771
1718
  }
1772
- var Ar = /* @__PURE__ */ H("$ZodReadonly", (e, t) => {
1719
+ var Er = /* @__PURE__ */ H("$ZodReadonly", (e, t) => {
1773
1720
  K.init(e, t), U(e._zod, "propValues", () => t.innerType._zod.propValues), U(e._zod, "values", () => t.innerType._zod.values), U(e._zod, "optin", () => t.innerType?._zod?.optin), U(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
1774
1721
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
1775
1722
  let r = t.innerType._zod.run(e, n);
1776
- return r instanceof Promise ? r.then(jr) : jr(r);
1723
+ return r instanceof Promise ? r.then(Dr) : Dr(r);
1777
1724
  };
1778
1725
  });
1779
- function jr(e) {
1726
+ function Dr(e) {
1780
1727
  return e.value = Object.freeze(e.value), e;
1781
1728
  }
1782
- var Mr = /* @__PURE__ */ H("$ZodFunction", (e, t) => (K.init(e, t), e._def = t, e._zod.def = t, e.implement = (t) => {
1783
- if (typeof t != "function") throw Error("implement() must be called with a function");
1784
- return function(...n) {
1785
- let r = e._def.input ? ut(e._def.input, n) : n, i = Reflect.apply(t, this, r);
1786
- return e._def.output ? ut(e._def.output, i) : i;
1787
- };
1788
- }, e.implementAsync = (t) => {
1789
- if (typeof t != "function") throw Error("implementAsync() must be called with a function");
1790
- return async function(...n) {
1791
- let r = e._def.input ? await ft(e._def.input, n) : n, i = await Reflect.apply(t, this, r);
1792
- return e._def.output ? await ft(e._def.output, i) : i;
1793
- };
1794
- }, e._zod.parse = (t, n) => typeof t.value == "function" ? (e._def.output && e._def.output._zod.def.type === "promise" ? t.value = e.implementAsync(t.value) : t.value = e.implement(t.value), t) : (t.issues.push({
1795
- code: "invalid_type",
1796
- expected: "function",
1797
- input: t.value,
1798
- inst: e
1799
- }), t), e.input = (...t) => {
1800
- let n = e.constructor;
1801
- return Array.isArray(t[0]) ? new n({
1802
- type: "function",
1803
- input: new dr({
1804
- type: "tuple",
1805
- items: t[0],
1806
- rest: t[1]
1807
- }),
1808
- output: e._def.output
1809
- }) : new n({
1810
- type: "function",
1811
- input: t[0],
1812
- output: e._def.output
1813
- });
1814
- }, e.output = (t) => {
1815
- let n = e.constructor;
1816
- return new n({
1817
- type: "function",
1818
- input: e._def.input,
1819
- output: t
1820
- });
1821
- }, e)), Nr = /* @__PURE__ */ H("$ZodCustom", (e, t) => {
1729
+ var Or = /* @__PURE__ */ H("$ZodCustom", (e, t) => {
1822
1730
  G.init(e, t), K.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
1823
1731
  let r = n.value, i = t.fn(r);
1824
- if (i instanceof Promise) return i.then((t) => Pr(t, n, r, e));
1825
- Pr(i, n, r, e);
1732
+ if (i instanceof Promise) return i.then((t) => kr(t, n, r, e));
1733
+ kr(i, n, r, e);
1826
1734
  };
1827
1735
  });
1828
- function Pr(e, t, n, r) {
1736
+ function kr(e, t, n, r) {
1829
1737
  if (!e) {
1830
1738
  let e = {
1831
1739
  code: "custom",
@@ -1834,12 +1742,12 @@ function Pr(e, t, n, r) {
1834
1742
  path: [...r._zod.def.path ?? []],
1835
1743
  continue: !r._zod.def.abort
1836
1744
  };
1837
- r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(rt(e));
1745
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(at(e));
1838
1746
  }
1839
1747
  }
1840
1748
  //#endregion
1841
1749
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
1842
- var Fr, Ir = class {
1750
+ var Ar, jr = class {
1843
1751
  constructor() {
1844
1752
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1845
1753
  }
@@ -1871,22 +1779,22 @@ var Fr, Ir = class {
1871
1779
  return this._map.has(e);
1872
1780
  }
1873
1781
  };
1874
- function Lr() {
1875
- return new Ir();
1782
+ function Mr() {
1783
+ return new jr();
1876
1784
  }
1877
- (Fr = globalThis).__zod_globalRegistry ?? (Fr.__zod_globalRegistry = Lr());
1878
- var Rr = globalThis.__zod_globalRegistry;
1785
+ (Ar = globalThis).__zod_globalRegistry ?? (Ar.__zod_globalRegistry = Mr());
1786
+ var Nr = globalThis.__zod_globalRegistry;
1879
1787
  //#endregion
1880
1788
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
1881
1789
  /* @__NO_SIDE_EFFECTS__ */
1882
- function zr(e, t) {
1790
+ function Pr(e, t) {
1883
1791
  return new e({
1884
1792
  type: "string",
1885
1793
  ...W(t)
1886
1794
  });
1887
1795
  }
1888
1796
  /* @__NO_SIDE_EFFECTS__ */
1889
- function Br(e, t) {
1797
+ function Fr(e, t) {
1890
1798
  return new e({
1891
1799
  type: "string",
1892
1800
  format: "email",
@@ -1896,7 +1804,7 @@ function Br(e, t) {
1896
1804
  });
1897
1805
  }
1898
1806
  /* @__NO_SIDE_EFFECTS__ */
1899
- function Vr(e, t) {
1807
+ function Ir(e, t) {
1900
1808
  return new e({
1901
1809
  type: "string",
1902
1810
  format: "guid",
@@ -1906,7 +1814,7 @@ function Vr(e, t) {
1906
1814
  });
1907
1815
  }
1908
1816
  /* @__NO_SIDE_EFFECTS__ */
1909
- function Hr(e, t) {
1817
+ function Lr(e, t) {
1910
1818
  return new e({
1911
1819
  type: "string",
1912
1820
  format: "uuid",
@@ -1916,7 +1824,7 @@ function Hr(e, t) {
1916
1824
  });
1917
1825
  }
1918
1826
  /* @__NO_SIDE_EFFECTS__ */
1919
- function Ur(e, t) {
1827
+ function Rr(e, t) {
1920
1828
  return new e({
1921
1829
  type: "string",
1922
1830
  format: "uuid",
@@ -1927,7 +1835,7 @@ function Ur(e, t) {
1927
1835
  });
1928
1836
  }
1929
1837
  /* @__NO_SIDE_EFFECTS__ */
1930
- function Wr(e, t) {
1838
+ function zr(e, t) {
1931
1839
  return new e({
1932
1840
  type: "string",
1933
1841
  format: "uuid",
@@ -1938,7 +1846,7 @@ function Wr(e, t) {
1938
1846
  });
1939
1847
  }
1940
1848
  /* @__NO_SIDE_EFFECTS__ */
1941
- function Gr(e, t) {
1849
+ function Br(e, t) {
1942
1850
  return new e({
1943
1851
  type: "string",
1944
1852
  format: "uuid",
@@ -1949,7 +1857,7 @@ function Gr(e, t) {
1949
1857
  });
1950
1858
  }
1951
1859
  /* @__NO_SIDE_EFFECTS__ */
1952
- function Kr(e, t) {
1860
+ function Vr(e, t) {
1953
1861
  return new e({
1954
1862
  type: "string",
1955
1863
  format: "url",
@@ -1959,7 +1867,7 @@ function Kr(e, t) {
1959
1867
  });
1960
1868
  }
1961
1869
  /* @__NO_SIDE_EFFECTS__ */
1962
- function qr(e, t) {
1870
+ function Hr(e, t) {
1963
1871
  return new e({
1964
1872
  type: "string",
1965
1873
  format: "emoji",
@@ -1969,7 +1877,7 @@ function qr(e, t) {
1969
1877
  });
1970
1878
  }
1971
1879
  /* @__NO_SIDE_EFFECTS__ */
1972
- function Jr(e, t) {
1880
+ function Ur(e, t) {
1973
1881
  return new e({
1974
1882
  type: "string",
1975
1883
  format: "nanoid",
@@ -1979,7 +1887,7 @@ function Jr(e, t) {
1979
1887
  });
1980
1888
  }
1981
1889
  /* @__NO_SIDE_EFFECTS__ */
1982
- function Yr(e, t) {
1890
+ function Wr(e, t) {
1983
1891
  return new e({
1984
1892
  type: "string",
1985
1893
  format: "cuid",
@@ -1989,7 +1897,7 @@ function Yr(e, t) {
1989
1897
  });
1990
1898
  }
1991
1899
  /* @__NO_SIDE_EFFECTS__ */
1992
- function Xr(e, t) {
1900
+ function Gr(e, t) {
1993
1901
  return new e({
1994
1902
  type: "string",
1995
1903
  format: "cuid2",
@@ -1999,7 +1907,7 @@ function Xr(e, t) {
1999
1907
  });
2000
1908
  }
2001
1909
  /* @__NO_SIDE_EFFECTS__ */
2002
- function Zr(e, t) {
1910
+ function Kr(e, t) {
2003
1911
  return new e({
2004
1912
  type: "string",
2005
1913
  format: "ulid",
@@ -2009,7 +1917,7 @@ function Zr(e, t) {
2009
1917
  });
2010
1918
  }
2011
1919
  /* @__NO_SIDE_EFFECTS__ */
2012
- function Qr(e, t) {
1920
+ function qr(e, t) {
2013
1921
  return new e({
2014
1922
  type: "string",
2015
1923
  format: "xid",
@@ -2019,7 +1927,7 @@ function Qr(e, t) {
2019
1927
  });
2020
1928
  }
2021
1929
  /* @__NO_SIDE_EFFECTS__ */
2022
- function $r(e, t) {
1930
+ function Jr(e, t) {
2023
1931
  return new e({
2024
1932
  type: "string",
2025
1933
  format: "ksuid",
@@ -2029,7 +1937,7 @@ function $r(e, t) {
2029
1937
  });
2030
1938
  }
2031
1939
  /* @__NO_SIDE_EFFECTS__ */
2032
- function ei(e, t) {
1940
+ function Yr(e, t) {
2033
1941
  return new e({
2034
1942
  type: "string",
2035
1943
  format: "ipv4",
@@ -2039,7 +1947,7 @@ function ei(e, t) {
2039
1947
  });
2040
1948
  }
2041
1949
  /* @__NO_SIDE_EFFECTS__ */
2042
- function ti(e, t) {
1950
+ function Xr(e, t) {
2043
1951
  return new e({
2044
1952
  type: "string",
2045
1953
  format: "ipv6",
@@ -2049,7 +1957,7 @@ function ti(e, t) {
2049
1957
  });
2050
1958
  }
2051
1959
  /* @__NO_SIDE_EFFECTS__ */
2052
- function ni(e, t) {
1960
+ function Zr(e, t) {
2053
1961
  return new e({
2054
1962
  type: "string",
2055
1963
  format: "cidrv4",
@@ -2059,7 +1967,7 @@ function ni(e, t) {
2059
1967
  });
2060
1968
  }
2061
1969
  /* @__NO_SIDE_EFFECTS__ */
2062
- function ri(e, t) {
1970
+ function Qr(e, t) {
2063
1971
  return new e({
2064
1972
  type: "string",
2065
1973
  format: "cidrv6",
@@ -2069,7 +1977,7 @@ function ri(e, t) {
2069
1977
  });
2070
1978
  }
2071
1979
  /* @__NO_SIDE_EFFECTS__ */
2072
- function ii(e, t) {
1980
+ function $r(e, t) {
2073
1981
  return new e({
2074
1982
  type: "string",
2075
1983
  format: "base64",
@@ -2079,7 +1987,7 @@ function ii(e, t) {
2079
1987
  });
2080
1988
  }
2081
1989
  /* @__NO_SIDE_EFFECTS__ */
2082
- function ai(e, t) {
1990
+ function ei(e, t) {
2083
1991
  return new e({
2084
1992
  type: "string",
2085
1993
  format: "base64url",
@@ -2089,7 +1997,7 @@ function ai(e, t) {
2089
1997
  });
2090
1998
  }
2091
1999
  /* @__NO_SIDE_EFFECTS__ */
2092
- function oi(e, t) {
2000
+ function ti(e, t) {
2093
2001
  return new e({
2094
2002
  type: "string",
2095
2003
  format: "e164",
@@ -2099,7 +2007,7 @@ function oi(e, t) {
2099
2007
  });
2100
2008
  }
2101
2009
  /* @__NO_SIDE_EFFECTS__ */
2102
- function si(e, t) {
2010
+ function ni(e, t) {
2103
2011
  return new e({
2104
2012
  type: "string",
2105
2013
  format: "jwt",
@@ -2109,7 +2017,7 @@ function si(e, t) {
2109
2017
  });
2110
2018
  }
2111
2019
  /* @__NO_SIDE_EFFECTS__ */
2112
- function ci(e, t) {
2020
+ function ri(e, t) {
2113
2021
  return new e({
2114
2022
  type: "string",
2115
2023
  format: "datetime",
@@ -2121,7 +2029,7 @@ function ci(e, t) {
2121
2029
  });
2122
2030
  }
2123
2031
  /* @__NO_SIDE_EFFECTS__ */
2124
- function li(e, t) {
2032
+ function ii(e, t) {
2125
2033
  return new e({
2126
2034
  type: "string",
2127
2035
  format: "date",
@@ -2130,7 +2038,7 @@ function li(e, t) {
2130
2038
  });
2131
2039
  }
2132
2040
  /* @__NO_SIDE_EFFECTS__ */
2133
- function ui(e, t) {
2041
+ function ai(e, t) {
2134
2042
  return new e({
2135
2043
  type: "string",
2136
2044
  format: "time",
@@ -2140,7 +2048,7 @@ function ui(e, t) {
2140
2048
  });
2141
2049
  }
2142
2050
  /* @__NO_SIDE_EFFECTS__ */
2143
- function di(e, t) {
2051
+ function oi(e, t) {
2144
2052
  return new e({
2145
2053
  type: "string",
2146
2054
  format: "duration",
@@ -2149,7 +2057,7 @@ function di(e, t) {
2149
2057
  });
2150
2058
  }
2151
2059
  /* @__NO_SIDE_EFFECTS__ */
2152
- function fi(e, t) {
2060
+ function si(e, t) {
2153
2061
  return new e({
2154
2062
  type: "number",
2155
2063
  checks: [],
@@ -2157,7 +2065,7 @@ function fi(e, t) {
2157
2065
  });
2158
2066
  }
2159
2067
  /* @__NO_SIDE_EFFECTS__ */
2160
- function pi(e, t) {
2068
+ function ci(e, t) {
2161
2069
  return new e({
2162
2070
  type: "number",
2163
2071
  check: "number_format",
@@ -2167,25 +2075,25 @@ function pi(e, t) {
2167
2075
  });
2168
2076
  }
2169
2077
  /* @__NO_SIDE_EFFECTS__ */
2170
- function mi(e, t) {
2078
+ function li(e, t) {
2171
2079
  return new e({
2172
2080
  type: "boolean",
2173
2081
  ...W(t)
2174
2082
  });
2175
2083
  }
2176
2084
  /* @__NO_SIDE_EFFECTS__ */
2177
- function hi(e) {
2085
+ function ui(e) {
2178
2086
  return new e({ type: "unknown" });
2179
2087
  }
2180
2088
  /* @__NO_SIDE_EFFECTS__ */
2181
- function gi(e, t) {
2089
+ function di(e, t) {
2182
2090
  return new e({
2183
2091
  type: "never",
2184
2092
  ...W(t)
2185
2093
  });
2186
2094
  }
2187
2095
  /* @__NO_SIDE_EFFECTS__ */
2188
- function _i(e, t) {
2096
+ function fi(e, t) {
2189
2097
  return new rn({
2190
2098
  check: "less_than",
2191
2099
  ...W(t),
@@ -2194,7 +2102,7 @@ function _i(e, t) {
2194
2102
  });
2195
2103
  }
2196
2104
  /* @__NO_SIDE_EFFECTS__ */
2197
- function vi(e, t) {
2105
+ function pi(e, t) {
2198
2106
  return new rn({
2199
2107
  check: "less_than",
2200
2108
  ...W(t),
@@ -2203,7 +2111,7 @@ function vi(e, t) {
2203
2111
  });
2204
2112
  }
2205
2113
  /* @__NO_SIDE_EFFECTS__ */
2206
- function yi(e, t) {
2114
+ function mi(e, t) {
2207
2115
  return new an({
2208
2116
  check: "greater_than",
2209
2117
  ...W(t),
@@ -2212,7 +2120,7 @@ function yi(e, t) {
2212
2120
  });
2213
2121
  }
2214
2122
  /* @__NO_SIDE_EFFECTS__ */
2215
- function bi(e, t) {
2123
+ function hi(e, t) {
2216
2124
  return new an({
2217
2125
  check: "greater_than",
2218
2126
  ...W(t),
@@ -2221,7 +2129,7 @@ function bi(e, t) {
2221
2129
  });
2222
2130
  }
2223
2131
  /* @__NO_SIDE_EFFECTS__ */
2224
- function xi(e, t) {
2132
+ function gi(e, t) {
2225
2133
  return new on({
2226
2134
  check: "multiple_of",
2227
2135
  ...W(t),
@@ -2229,7 +2137,7 @@ function xi(e, t) {
2229
2137
  });
2230
2138
  }
2231
2139
  /* @__NO_SIDE_EFFECTS__ */
2232
- function Si(e, t) {
2140
+ function _i(e, t) {
2233
2141
  return new cn({
2234
2142
  check: "max_length",
2235
2143
  ...W(t),
@@ -2237,7 +2145,7 @@ function Si(e, t) {
2237
2145
  });
2238
2146
  }
2239
2147
  /* @__NO_SIDE_EFFECTS__ */
2240
- function Ci(e, t) {
2148
+ function vi(e, t) {
2241
2149
  return new ln({
2242
2150
  check: "min_length",
2243
2151
  ...W(t),
@@ -2245,7 +2153,7 @@ function Ci(e, t) {
2245
2153
  });
2246
2154
  }
2247
2155
  /* @__NO_SIDE_EFFECTS__ */
2248
- function wi(e, t) {
2156
+ function yi(e, t) {
2249
2157
  return new un({
2250
2158
  check: "length_equals",
2251
2159
  ...W(t),
@@ -2253,7 +2161,7 @@ function wi(e, t) {
2253
2161
  });
2254
2162
  }
2255
2163
  /* @__NO_SIDE_EFFECTS__ */
2256
- function Ti(e, t) {
2164
+ function bi(e, t) {
2257
2165
  return new fn({
2258
2166
  check: "string_format",
2259
2167
  format: "regex",
@@ -2262,7 +2170,7 @@ function Ti(e, t) {
2262
2170
  });
2263
2171
  }
2264
2172
  /* @__NO_SIDE_EFFECTS__ */
2265
- function Ei(e) {
2173
+ function xi(e) {
2266
2174
  return new pn({
2267
2175
  check: "string_format",
2268
2176
  format: "lowercase",
@@ -2270,7 +2178,7 @@ function Ei(e) {
2270
2178
  });
2271
2179
  }
2272
2180
  /* @__NO_SIDE_EFFECTS__ */
2273
- function Di(e) {
2181
+ function Si(e) {
2274
2182
  return new mn({
2275
2183
  check: "string_format",
2276
2184
  format: "uppercase",
@@ -2278,7 +2186,7 @@ function Di(e) {
2278
2186
  });
2279
2187
  }
2280
2188
  /* @__NO_SIDE_EFFECTS__ */
2281
- function Oi(e, t) {
2189
+ function Ci(e, t) {
2282
2190
  return new hn({
2283
2191
  check: "string_format",
2284
2192
  format: "includes",
@@ -2287,7 +2195,7 @@ function Oi(e, t) {
2287
2195
  });
2288
2196
  }
2289
2197
  /* @__NO_SIDE_EFFECTS__ */
2290
- function ki(e, t) {
2198
+ function wi(e, t) {
2291
2199
  return new gn({
2292
2200
  check: "string_format",
2293
2201
  format: "starts_with",
@@ -2296,7 +2204,7 @@ function ki(e, t) {
2296
2204
  });
2297
2205
  }
2298
2206
  /* @__NO_SIDE_EFFECTS__ */
2299
- function Ai(e, t) {
2207
+ function Ti(e, t) {
2300
2208
  return new _n({
2301
2209
  check: "string_format",
2302
2210
  format: "ends_with",
@@ -2305,34 +2213,34 @@ function Ai(e, t) {
2305
2213
  });
2306
2214
  }
2307
2215
  /* @__NO_SIDE_EFFECTS__ */
2308
- function ji(e) {
2216
+ function Ei(e) {
2309
2217
  return new vn({
2310
2218
  check: "overwrite",
2311
2219
  tx: e
2312
2220
  });
2313
2221
  }
2314
2222
  /* @__NO_SIDE_EFFECTS__ */
2315
- function Mi(e) {
2316
- return /* @__PURE__ */ ji((t) => t.normalize(e));
2223
+ function Di(e) {
2224
+ return /* @__PURE__ */ Ei((t) => t.normalize(e));
2317
2225
  }
2318
2226
  /* @__NO_SIDE_EFFECTS__ */
2319
- function Ni() {
2320
- return /* @__PURE__ */ ji((e) => e.trim());
2227
+ function Oi() {
2228
+ return /* @__PURE__ */ Ei((e) => e.trim());
2321
2229
  }
2322
2230
  /* @__NO_SIDE_EFFECTS__ */
2323
- function Pi() {
2324
- return /* @__PURE__ */ ji((e) => e.toLowerCase());
2231
+ function ki() {
2232
+ return /* @__PURE__ */ Ei((e) => e.toLowerCase());
2325
2233
  }
2326
2234
  /* @__NO_SIDE_EFFECTS__ */
2327
- function Fi() {
2328
- return /* @__PURE__ */ ji((e) => e.toUpperCase());
2235
+ function Ai() {
2236
+ return /* @__PURE__ */ Ei((e) => e.toUpperCase());
2329
2237
  }
2330
2238
  /* @__NO_SIDE_EFFECTS__ */
2331
- function Ii() {
2332
- return /* @__PURE__ */ ji((e) => Ne(e));
2239
+ function ji() {
2240
+ return /* @__PURE__ */ Ei((e) => Fe(e));
2333
2241
  }
2334
2242
  /* @__NO_SIDE_EFFECTS__ */
2335
- function Li(e, t, n) {
2243
+ function Mi(e, t, n) {
2336
2244
  return new e({
2337
2245
  type: "array",
2338
2246
  element: t,
@@ -2340,7 +2248,17 @@ function Li(e, t, n) {
2340
2248
  });
2341
2249
  }
2342
2250
  /* @__NO_SIDE_EFFECTS__ */
2343
- function Ri(e, t, n) {
2251
+ function Ni(e, t, n) {
2252
+ let r = W(n);
2253
+ return r.abort ??= !0, new e({
2254
+ type: "custom",
2255
+ check: "custom",
2256
+ fn: t,
2257
+ ...r
2258
+ });
2259
+ }
2260
+ /* @__NO_SIDE_EFFECTS__ */
2261
+ function Pi(e, t, n) {
2344
2262
  return new e({
2345
2263
  type: "custom",
2346
2264
  check: "custom",
@@ -2349,18 +2267,18 @@ function Ri(e, t, n) {
2349
2267
  });
2350
2268
  }
2351
2269
  /* @__NO_SIDE_EFFECTS__ */
2352
- function zi(e, t) {
2353
- let n = /* @__PURE__ */ Bi((t) => (t.addIssue = (e) => {
2354
- if (typeof e == "string") t.issues.push(rt(e, t.value, n._zod.def));
2270
+ function Fi(e, t) {
2271
+ let n = /* @__PURE__ */ Ii((t) => (t.addIssue = (e) => {
2272
+ if (typeof e == "string") t.issues.push(at(e, t.value, n._zod.def));
2355
2273
  else {
2356
2274
  let r = e;
2357
- r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(rt(r));
2275
+ r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(at(r));
2358
2276
  }
2359
2277
  }, e(t.value, t)), t);
2360
2278
  return n;
2361
2279
  }
2362
2280
  /* @__NO_SIDE_EFFECTS__ */
2363
- function Bi(e, t) {
2281
+ function Ii(e, t) {
2364
2282
  let n = new G({
2365
2283
  check: "custom",
2366
2284
  ...W(t)
@@ -2369,11 +2287,11 @@ function Bi(e, t) {
2369
2287
  }
2370
2288
  //#endregion
2371
2289
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
2372
- function Vi(e) {
2290
+ function Li(e) {
2373
2291
  let t = e?.target ?? "draft-2020-12";
2374
2292
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2375
2293
  processors: e.processors ?? {},
2376
- metadataRegistry: e?.metadata ?? Rr,
2294
+ metadataRegistry: e?.metadata ?? Nr,
2377
2295
  target: t,
2378
2296
  unrepresentable: e?.unrepresentable ?? "throw",
2379
2297
  override: e?.override ?? (() => {}),
@@ -2419,7 +2337,7 @@ function J(e, t, n = {
2419
2337
  let c = t.metadataRegistry.get(e);
2420
2338
  return c && Object.assign(o.schema, c), t.io === "input" && Y(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2421
2339
  }
2422
- function Hi(e, t) {
2340
+ function Ri(e, t) {
2423
2341
  let n = e.seen.get(t);
2424
2342
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2425
2343
  let r = /* @__PURE__ */ new Map();
@@ -2489,7 +2407,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2489
2407
  }
2490
2408
  }
2491
2409
  }
2492
- function Ui(e, t) {
2410
+ function zi(e, t) {
2493
2411
  let n = e.seen.get(t);
2494
2412
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2495
2413
  let r = (t) => {
@@ -2536,8 +2454,8 @@ function Ui(e, t) {
2536
2454
  value: {
2537
2455
  ...t["~standard"],
2538
2456
  jsonSchema: {
2539
- input: Gi(t, "input", e.processors),
2540
- output: Gi(t, "output", e.processors)
2457
+ input: Vi(t, "input", e.processors),
2458
+ output: Vi(t, "output", e.processors)
2541
2459
  }
2542
2460
  },
2543
2461
  enumerable: !1,
@@ -2574,62 +2492,60 @@ function Y(e, t) {
2574
2492
  }
2575
2493
  return !1;
2576
2494
  }
2577
- var Wi = (e, t = {}) => (n) => {
2578
- let r = Vi({
2495
+ var Bi = (e, t = {}) => (n) => {
2496
+ let r = Li({
2579
2497
  ...n,
2580
2498
  processors: t
2581
2499
  });
2582
- return J(e, r), Hi(r, e), Ui(r, e);
2583
- }, Gi = (e, t, n = {}) => (r) => {
2584
- let { libraryOptions: i, target: a } = r ?? {}, o = Vi({
2500
+ return J(e, r), Ri(r, e), zi(r, e);
2501
+ }, Vi = (e, t, n = {}) => (r) => {
2502
+ let { libraryOptions: i, target: a } = r ?? {}, o = Li({
2585
2503
  ...i ?? {},
2586
2504
  target: a,
2587
2505
  io: t,
2588
2506
  processors: n
2589
2507
  });
2590
- return J(e, o), Hi(o, e), Ui(o, e);
2591
- }, Ki = {
2508
+ return J(e, o), Ri(o, e), zi(o, e);
2509
+ }, Hi = {
2592
2510
  guid: "uuid",
2593
2511
  url: "uri",
2594
2512
  datetime: "date-time",
2595
2513
  json_string: "json-string",
2596
2514
  regex: ""
2597
- }, qi = (e, t, n, r) => {
2515
+ }, Ui = (e, t, n, r) => {
2598
2516
  let i = n;
2599
2517
  i.type = "string";
2600
2518
  let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
2601
- if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = Ki[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
2519
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = Hi[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
2602
2520
  let e = [...c];
2603
2521
  e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
2604
2522
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2605
2523
  pattern: e.source
2606
2524
  }))]);
2607
2525
  }
2608
- }, Ji = (e, t, n, r) => {
2526
+ }, Wi = (e, t, n, r) => {
2609
2527
  let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
2610
2528
  typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number";
2611
2529
  let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
2612
2530
  d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (i.multipleOf = c);
2613
- }, Yi = (e, t, n, r) => {
2531
+ }, Gi = (e, t, n, r) => {
2614
2532
  n.type = "boolean";
2615
- }, Xi = (e, t, n, r) => {
2533
+ }, Ki = (e, t, n, r) => {
2616
2534
  n.not = {};
2617
- }, Zi = (e, t, n, r) => {
2618
- let i = e._zod.def, a = Ce(i.entries);
2535
+ }, qi = (e, t, n, r) => {
2536
+ let i = e._zod.def, a = Te(i.entries);
2619
2537
  a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
2620
- }, Qi = (e, t, n, r) => {
2538
+ }, Ji = (e, t, n, r) => {
2621
2539
  if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
2622
- }, $i = (e, t, n, r) => {
2623
- if (t.unrepresentable === "throw") throw Error("Function types cannot be represented in JSON Schema");
2624
- }, ea = (e, t, n, r) => {
2540
+ }, Yi = (e, t, n, r) => {
2625
2541
  if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
2626
- }, ta = (e, t, n, r) => {
2542
+ }, Xi = (e, t, n, r) => {
2627
2543
  let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
2628
2544
  typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = J(a.element, t, {
2629
2545
  ...r,
2630
2546
  path: [...r.path, "items"]
2631
2547
  });
2632
- }, na = (e, t, n, r) => {
2548
+ }, Zi = (e, t, n, r) => {
2633
2549
  let i = n, a = e._zod.def;
2634
2550
  i.type = "object", i.properties = {};
2635
2551
  let o = a.shape;
@@ -2649,7 +2565,7 @@ var Wi = (e, t = {}) => (n) => {
2649
2565
  ...r,
2650
2566
  path: [...r.path, "additionalProperties"]
2651
2567
  })) : t.io === "output" && (i.additionalProperties = !1);
2652
- }, ra = (e, t, n, r) => {
2568
+ }, Qi = (e, t, n, r) => {
2653
2569
  let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => J(e, t, {
2654
2570
  ...r,
2655
2571
  path: [
@@ -2659,7 +2575,7 @@ var Wi = (e, t = {}) => (n) => {
2659
2575
  ]
2660
2576
  }));
2661
2577
  a ? n.oneOf = o : n.anyOf = o;
2662
- }, ia = (e, t, n, r) => {
2578
+ }, $i = (e, t, n, r) => {
2663
2579
  let i = e._zod.def, a = J(i.left, t, {
2664
2580
  ...r,
2665
2581
  path: [
@@ -2676,28 +2592,7 @@ var Wi = (e, t = {}) => (n) => {
2676
2592
  ]
2677
2593
  }), s = (e) => "allOf" in e && Object.keys(e).length === 1;
2678
2594
  n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
2679
- }, aa = (e, t, n, r) => {
2680
- let i = n, a = e._zod.def;
2681
- i.type = "array";
2682
- let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => J(e, t, {
2683
- ...r,
2684
- path: [
2685
- ...r.path,
2686
- o,
2687
- n
2688
- ]
2689
- })), l = a.rest ? J(a.rest, t, {
2690
- ...r,
2691
- path: [
2692
- ...r.path,
2693
- s,
2694
- ...t.target === "openapi-3.0" ? [a.items.length] : []
2695
- ]
2696
- }) : null;
2697
- t.target === "draft-2020-12" ? (i.prefixItems = c, l && (i.items = l)) : t.target === "openapi-3.0" ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), i.minItems = c.length, l || (i.maxItems = c.length)) : (i.items = c, l && (i.additionalItems = l));
2698
- let { minimum: u, maximum: d } = e._zod.bag;
2699
- typeof u == "number" && (i.minItems = u), typeof d == "number" && (i.maxItems = d);
2700
- }, oa = (e, t, n, r) => {
2595
+ }, ea = (e, t, n, r) => {
2701
2596
  let i = n, a = e._zod.def;
2702
2597
  i.type = "object";
2703
2598
  let o = a.keyType, s = o._zod.bag?.patterns;
@@ -2724,25 +2619,25 @@ var Wi = (e, t = {}) => (n) => {
2724
2619
  let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
2725
2620
  e.length > 0 && (i.required = e);
2726
2621
  }
2727
- }, sa = (e, t, n, r) => {
2622
+ }, ta = (e, t, n, r) => {
2728
2623
  let i = e._zod.def, a = J(i.innerType, t, r), o = t.seen.get(e);
2729
2624
  t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
2730
- }, ca = (e, t, n, r) => {
2625
+ }, na = (e, t, n, r) => {
2731
2626
  let i = e._zod.def;
2732
2627
  J(i.innerType, t, r);
2733
2628
  let a = t.seen.get(e);
2734
2629
  a.ref = i.innerType;
2735
- }, la = (e, t, n, r) => {
2630
+ }, ra = (e, t, n, r) => {
2736
2631
  let i = e._zod.def;
2737
2632
  J(i.innerType, t, r);
2738
2633
  let a = t.seen.get(e);
2739
2634
  a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
2740
- }, ua = (e, t, n, r) => {
2635
+ }, ia = (e, t, n, r) => {
2741
2636
  let i = e._zod.def;
2742
2637
  J(i.innerType, t, r);
2743
2638
  let a = t.seen.get(e);
2744
2639
  a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
2745
- }, da = (e, t, n, r) => {
2640
+ }, aa = (e, t, n, r) => {
2746
2641
  let i = e._zod.def;
2747
2642
  J(i.innerType, t, r);
2748
2643
  let a = t.seen.get(e);
@@ -2754,63 +2649,63 @@ var Wi = (e, t = {}) => (n) => {
2754
2649
  throw Error("Dynamic catch values are not supported in JSON Schema");
2755
2650
  }
2756
2651
  n.default = o;
2757
- }, fa = (e, t, n, r) => {
2652
+ }, oa = (e, t, n, r) => {
2758
2653
  let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
2759
2654
  J(o, t, r);
2760
2655
  let s = t.seen.get(e);
2761
2656
  s.ref = o;
2762
- }, pa = (e, t, n, r) => {
2657
+ }, sa = (e, t, n, r) => {
2763
2658
  let i = e._zod.def;
2764
2659
  J(i.innerType, t, r);
2765
2660
  let a = t.seen.get(e);
2766
2661
  a.ref = i.innerType, n.readOnly = !0;
2767
- }, ma = (e, t, n, r) => {
2662
+ }, ca = (e, t, n, r) => {
2768
2663
  let i = e._zod.def;
2769
2664
  J(i.innerType, t, r);
2770
2665
  let a = t.seen.get(e);
2771
2666
  a.ref = i.innerType;
2772
- }, ha = /* @__PURE__ */ H("ZodISODateTime", (e, t) => {
2667
+ }, la = /* @__PURE__ */ H("ZodISODateTime", (e, t) => {
2773
2668
  Nn.init(e, t), $.init(e, t);
2774
2669
  });
2775
- function ga(e) {
2776
- return /* @__PURE__ */ ci(ha, e);
2670
+ function ua(e) {
2671
+ return /* @__PURE__ */ ri(la, e);
2777
2672
  }
2778
- var _a = /* @__PURE__ */ H("ZodISODate", (e, t) => {
2673
+ var da = /* @__PURE__ */ H("ZodISODate", (e, t) => {
2779
2674
  Pn.init(e, t), $.init(e, t);
2780
2675
  });
2781
- function va(e) {
2782
- return /* @__PURE__ */ li(_a, e);
2676
+ function fa(e) {
2677
+ return /* @__PURE__ */ ii(da, e);
2783
2678
  }
2784
- var ya = /* @__PURE__ */ H("ZodISOTime", (e, t) => {
2679
+ var pa = /* @__PURE__ */ H("ZodISOTime", (e, t) => {
2785
2680
  Fn.init(e, t), $.init(e, t);
2786
2681
  });
2787
- function ba(e) {
2788
- return /* @__PURE__ */ ui(ya, e);
2682
+ function ma(e) {
2683
+ return /* @__PURE__ */ ai(pa, e);
2789
2684
  }
2790
- var xa = /* @__PURE__ */ H("ZodISODuration", (e, t) => {
2685
+ var ha = /* @__PURE__ */ H("ZodISODuration", (e, t) => {
2791
2686
  In.init(e, t), $.init(e, t);
2792
2687
  });
2793
- function Sa(e) {
2794
- return /* @__PURE__ */ di(xa, e);
2688
+ function ga(e) {
2689
+ return /* @__PURE__ */ oi(ha, e);
2795
2690
  }
2796
2691
  var X = /* @__PURE__ */ H("ZodError", (e, t) => {
2797
- at.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2798
- format: { value: (t) => ct(e, t) },
2799
- flatten: { value: (t) => st(e, t) },
2692
+ st.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2693
+ format: { value: (t) => ut(e, t) },
2694
+ flatten: { value: (t) => lt(e, t) },
2800
2695
  addIssue: { value: (t) => {
2801
- e.issues.push(t), e.message = JSON.stringify(e.issues, we, 2);
2696
+ e.issues.push(t), e.message = JSON.stringify(e.issues, Ee, 2);
2802
2697
  } },
2803
2698
  addIssues: { value: (t) => {
2804
- e.issues.push(...t), e.message = JSON.stringify(e.issues, we, 2);
2699
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, Ee, 2);
2805
2700
  } },
2806
2701
  isEmpty: { get() {
2807
2702
  return e.issues.length === 0;
2808
2703
  } }
2809
2704
  });
2810
- }, { Parent: Error }), Ca = /* @__PURE__ */ lt(X), wa = /* @__PURE__ */ dt(X), Ta = /* @__PURE__ */ pt(X), Ea = /* @__PURE__ */ ht(X), Da = /* @__PURE__ */ _t(X), Oa = /* @__PURE__ */ vt(X), ka = /* @__PURE__ */ yt(X), Aa = /* @__PURE__ */ bt(X), ja = /* @__PURE__ */ xt(X), Ma = /* @__PURE__ */ St(X), Na = /* @__PURE__ */ Ct(X), Pa = /* @__PURE__ */ wt(X), Fa = /* @__PURE__ */ new WeakMap();
2811
- function Ia(e, t, n) {
2812
- let r = Object.getPrototypeOf(e), i = Fa.get(r);
2813
- if (i || (i = /* @__PURE__ */ new Set(), Fa.set(r, i)), !i.has(t)) {
2705
+ }, { Parent: Error }), _a = /* @__PURE__ */ dt(X), va = /* @__PURE__ */ ft(X), ya = /* @__PURE__ */ pt(X), ba = /* @__PURE__ */ ht(X), xa = /* @__PURE__ */ _t(X), Sa = /* @__PURE__ */ vt(X), Ca = /* @__PURE__ */ yt(X), wa = /* @__PURE__ */ bt(X), Ta = /* @__PURE__ */ xt(X), Ea = /* @__PURE__ */ St(X), Da = /* @__PURE__ */ Ct(X), Oa = /* @__PURE__ */ wt(X), ka = /* @__PURE__ */ new WeakMap();
2706
+ function Aa(e, t, n) {
2707
+ let r = Object.getPrototypeOf(e), i = ka.get(r);
2708
+ if (i || (i = /* @__PURE__ */ new Set(), ka.set(r, i)), !i.has(t)) {
2814
2709
  i.add(t);
2815
2710
  for (let e in n) {
2816
2711
  let t = n[e];
@@ -2839,12 +2734,12 @@ function Ia(e, t, n) {
2839
2734
  }
2840
2735
  }
2841
2736
  var Z = /* @__PURE__ */ H("ZodType", (e, t) => (K.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
2842
- input: Gi(e, "input"),
2843
- output: Gi(e, "output")
2844
- } }), e.toJSONSchema = Wi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Ca(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => Ta(e, t, n), e.parseAsync = async (t, n) => wa(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Ea(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Da(e, t, n), e.decode = (t, n) => Oa(e, t, n), e.encodeAsync = async (t, n) => ka(e, t, n), e.decodeAsync = async (t, n) => Aa(e, t, n), e.safeEncode = (t, n) => ja(e, t, n), e.safeDecode = (t, n) => Ma(e, t, n), e.safeEncodeAsync = async (t, n) => Na(e, t, n), e.safeDecodeAsync = async (t, n) => Pa(e, t, n), Ia(e, "ZodType", {
2737
+ input: Vi(e, "input"),
2738
+ output: Vi(e, "output")
2739
+ } }), e.toJSONSchema = Bi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => _a(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => ya(e, t, n), e.parseAsync = async (t, n) => va(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => ba(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => xa(e, t, n), e.decode = (t, n) => Sa(e, t, n), e.encodeAsync = async (t, n) => Ca(e, t, n), e.decodeAsync = async (t, n) => wa(e, t, n), e.safeEncode = (t, n) => Ta(e, t, n), e.safeDecode = (t, n) => Ea(e, t, n), e.safeEncodeAsync = async (t, n) => Da(e, t, n), e.safeDecodeAsync = async (t, n) => Oa(e, t, n), Aa(e, "ZodType", {
2845
2740
  check(...e) {
2846
2741
  let t = this.def;
2847
- return this.clone(je(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
2742
+ return this.clone(Ne(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
2848
2743
  check: e,
2849
2744
  def: { check: "custom" },
2850
2745
  onattach: []
@@ -2854,7 +2749,7 @@ var Z = /* @__PURE__ */ H("ZodType", (e, t) => (K.init(e, t), Object.assign(e["~
2854
2749
  return this.check(...e);
2855
2750
  },
2856
2751
  clone(e, t) {
2857
- return Ve(this, e, t);
2752
+ return Ue(this, e, t);
2858
2753
  },
2859
2754
  brand() {
2860
2755
  return this;
@@ -2863,64 +2758,64 @@ var Z = /* @__PURE__ */ H("ZodType", (e, t) => (K.init(e, t), Object.assign(e["~
2863
2758
  return e.add(this, t), this;
2864
2759
  },
2865
2760
  refine(e, t) {
2866
- return this.check(Qo(e, t));
2761
+ return this.check(Uo(e, t));
2867
2762
  },
2868
2763
  superRefine(e, t) {
2869
- return this.check($o(e, t));
2764
+ return this.check(Wo(e, t));
2870
2765
  },
2871
2766
  overwrite(e) {
2872
- return this.check(/* @__PURE__ */ ji(e));
2767
+ return this.check(/* @__PURE__ */ Ei(e));
2873
2768
  },
2874
2769
  optional() {
2875
- return Mo(this);
2770
+ return wo(this);
2876
2771
  },
2877
2772
  exactOptional() {
2878
- return Po(this);
2773
+ return Eo(this);
2879
2774
  },
2880
2775
  nullable() {
2881
- return Io(this);
2776
+ return Oo(this);
2882
2777
  },
2883
2778
  nullish() {
2884
- return Mo(Io(this));
2779
+ return wo(Oo(this));
2885
2780
  },
2886
2781
  nonoptional(e) {
2887
- return Ho(this, e);
2782
+ return Po(this, e);
2888
2783
  },
2889
2784
  array() {
2890
- return go(this);
2785
+ return lo(this);
2891
2786
  },
2892
2787
  or(e) {
2893
- return bo([this, e]);
2788
+ return mo([this, e]);
2894
2789
  },
2895
2790
  and(e) {
2896
- return So(this, e);
2791
+ return go(this, e);
2897
2792
  },
2898
2793
  transform(e) {
2899
- return Ko(this, Ao(e));
2794
+ return Ro(this, So(e));
2900
2795
  },
2901
2796
  default(e) {
2902
- return Ro(this, e);
2797
+ return Ao(this, e);
2903
2798
  },
2904
2799
  prefault(e) {
2905
- return Bo(this, e);
2800
+ return Mo(this, e);
2906
2801
  },
2907
2802
  catch(e) {
2908
- return Wo(this, e);
2803
+ return Io(this, e);
2909
2804
  },
2910
2805
  pipe(e) {
2911
- return Ko(this, e);
2806
+ return Ro(this, e);
2912
2807
  },
2913
2808
  readonly() {
2914
- return Jo(this);
2809
+ return Bo(this);
2915
2810
  },
2916
2811
  describe(e) {
2917
2812
  let t = this.clone();
2918
- return Rr.add(t, { description: e }), t;
2813
+ return Nr.add(t, { description: e }), t;
2919
2814
  },
2920
2815
  meta(...e) {
2921
- if (e.length === 0) return Rr.get(this);
2816
+ if (e.length === 0) return Nr.get(this);
2922
2817
  let t = this.clone();
2923
- return Rr.add(t, e[0]), t;
2818
+ return Nr.add(t, e[0]), t;
2924
2819
  },
2925
2820
  isOptional() {
2926
2821
  return this.safeParse(void 0).success;
@@ -2933,148 +2828,148 @@ var Z = /* @__PURE__ */ H("ZodType", (e, t) => (K.init(e, t), Object.assign(e["~
2933
2828
  }
2934
2829
  }), Object.defineProperty(e, "description", {
2935
2830
  get() {
2936
- return Rr.get(e)?.description;
2831
+ return Nr.get(e)?.description;
2937
2832
  },
2938
2833
  configurable: !0
2939
- }), e)), La = /* @__PURE__ */ H("_ZodString", (e, t) => {
2940
- xn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi(e, t, n, r);
2834
+ }), e)), ja = /* @__PURE__ */ H("_ZodString", (e, t) => {
2835
+ xn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ui(e, t, n, r);
2941
2836
  let n = e._zod.bag;
2942
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Ia(e, "_ZodString", {
2837
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Aa(e, "_ZodString", {
2943
2838
  regex(...e) {
2944
- return this.check(/* @__PURE__ */ Ti(...e));
2839
+ return this.check(/* @__PURE__ */ bi(...e));
2945
2840
  },
2946
2841
  includes(...e) {
2947
- return this.check(/* @__PURE__ */ Oi(...e));
2842
+ return this.check(/* @__PURE__ */ Ci(...e));
2948
2843
  },
2949
2844
  startsWith(...e) {
2950
- return this.check(/* @__PURE__ */ ki(...e));
2845
+ return this.check(/* @__PURE__ */ wi(...e));
2951
2846
  },
2952
2847
  endsWith(...e) {
2953
- return this.check(/* @__PURE__ */ Ai(...e));
2848
+ return this.check(/* @__PURE__ */ Ti(...e));
2954
2849
  },
2955
2850
  min(...e) {
2956
- return this.check(/* @__PURE__ */ Ci(...e));
2851
+ return this.check(/* @__PURE__ */ vi(...e));
2957
2852
  },
2958
2853
  max(...e) {
2959
- return this.check(/* @__PURE__ */ Si(...e));
2854
+ return this.check(/* @__PURE__ */ _i(...e));
2960
2855
  },
2961
2856
  length(...e) {
2962
- return this.check(/* @__PURE__ */ wi(...e));
2857
+ return this.check(/* @__PURE__ */ yi(...e));
2963
2858
  },
2964
2859
  nonempty(...e) {
2965
- return this.check(/* @__PURE__ */ Ci(1, ...e));
2860
+ return this.check(/* @__PURE__ */ vi(1, ...e));
2966
2861
  },
2967
2862
  lowercase(e) {
2968
- return this.check(/* @__PURE__ */ Ei(e));
2863
+ return this.check(/* @__PURE__ */ xi(e));
2969
2864
  },
2970
2865
  uppercase(e) {
2971
- return this.check(/* @__PURE__ */ Di(e));
2866
+ return this.check(/* @__PURE__ */ Si(e));
2972
2867
  },
2973
2868
  trim() {
2974
- return this.check(/* @__PURE__ */ Ni());
2869
+ return this.check(/* @__PURE__ */ Oi());
2975
2870
  },
2976
2871
  normalize(...e) {
2977
- return this.check(/* @__PURE__ */ Mi(...e));
2872
+ return this.check(/* @__PURE__ */ Di(...e));
2978
2873
  },
2979
2874
  toLowerCase() {
2980
- return this.check(/* @__PURE__ */ Pi());
2875
+ return this.check(/* @__PURE__ */ ki());
2981
2876
  },
2982
2877
  toUpperCase() {
2983
- return this.check(/* @__PURE__ */ Fi());
2878
+ return this.check(/* @__PURE__ */ Ai());
2984
2879
  },
2985
2880
  slugify() {
2986
- return this.check(/* @__PURE__ */ Ii());
2881
+ return this.check(/* @__PURE__ */ ji());
2987
2882
  }
2988
2883
  });
2989
- }), Ra = /* @__PURE__ */ H("ZodString", (e, t) => {
2990
- xn.init(e, t), La.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ Br(za, t)), e.url = (t) => e.check(/* @__PURE__ */ Kr(Ha, t)), e.jwt = (t) => e.check(/* @__PURE__ */ si(ro, t)), e.emoji = (t) => e.check(/* @__PURE__ */ qr(Ua, t)), e.guid = (t) => e.check(/* @__PURE__ */ Vr(Ba, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Hr(Va, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Ur(Va, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ Wr(Va, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Gr(Va, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Jr(Wa, t)), e.guid = (t) => e.check(/* @__PURE__ */ Vr(Ba, t)), e.cuid = (t) => e.check(/* @__PURE__ */ Yr(Ga, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Xr(Ka, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Zr(qa, t)), e.base64 = (t) => e.check(/* @__PURE__ */ ii(eo, t)), e.base64url = (t) => e.check(/* @__PURE__ */ ai(to, t)), e.xid = (t) => e.check(/* @__PURE__ */ Qr(Ja, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ $r(Ya, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ ei(Xa, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ti(Za, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ ni(Qa, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ ri($a, t)), e.e164 = (t) => e.check(/* @__PURE__ */ oi(no, t)), e.datetime = (t) => e.check(ga(t)), e.date = (t) => e.check(va(t)), e.time = (t) => e.check(ba(t)), e.duration = (t) => e.check(Sa(t));
2884
+ }), Ma = /* @__PURE__ */ H("ZodString", (e, t) => {
2885
+ xn.init(e, t), ja.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ Fr(Na, t)), e.url = (t) => e.check(/* @__PURE__ */ Vr(Ia, t)), e.jwt = (t) => e.check(/* @__PURE__ */ ni(Za, t)), e.emoji = (t) => e.check(/* @__PURE__ */ Hr(La, t)), e.guid = (t) => e.check(/* @__PURE__ */ Ir(Pa, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Lr(Fa, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Rr(Fa, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ zr(Fa, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Br(Fa, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Ur(Ra, t)), e.guid = (t) => e.check(/* @__PURE__ */ Ir(Pa, t)), e.cuid = (t) => e.check(/* @__PURE__ */ Wr(za, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Gr(Ba, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Kr(Va, t)), e.base64 = (t) => e.check(/* @__PURE__ */ $r(Ja, t)), e.base64url = (t) => e.check(/* @__PURE__ */ ei(Ya, t)), e.xid = (t) => e.check(/* @__PURE__ */ qr(Ha, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ Jr(Ua, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Yr(Wa, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ Xr(Ga, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ Zr(Ka, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Qr(qa, t)), e.e164 = (t) => e.check(/* @__PURE__ */ ti(Xa, t)), e.datetime = (t) => e.check(ua(t)), e.date = (t) => e.check(fa(t)), e.time = (t) => e.check(ma(t)), e.duration = (t) => e.check(ga(t));
2991
2886
  });
2992
2887
  function Q(e) {
2993
- return /* @__PURE__ */ zr(Ra, e);
2888
+ return /* @__PURE__ */ Pr(Ma, e);
2994
2889
  }
2995
2890
  var $ = /* @__PURE__ */ H("ZodStringFormat", (e, t) => {
2996
- q.init(e, t), La.init(e, t);
2997
- }), za = /* @__PURE__ */ H("ZodEmail", (e, t) => {
2891
+ q.init(e, t), ja.init(e, t);
2892
+ }), Na = /* @__PURE__ */ H("ZodEmail", (e, t) => {
2998
2893
  wn.init(e, t), $.init(e, t);
2999
- }), Ba = /* @__PURE__ */ H("ZodGUID", (e, t) => {
2894
+ }), Pa = /* @__PURE__ */ H("ZodGUID", (e, t) => {
3000
2895
  Sn.init(e, t), $.init(e, t);
3001
- }), Va = /* @__PURE__ */ H("ZodUUID", (e, t) => {
2896
+ }), Fa = /* @__PURE__ */ H("ZodUUID", (e, t) => {
3002
2897
  Cn.init(e, t), $.init(e, t);
3003
- }), Ha = /* @__PURE__ */ H("ZodURL", (e, t) => {
2898
+ }), Ia = /* @__PURE__ */ H("ZodURL", (e, t) => {
3004
2899
  Tn.init(e, t), $.init(e, t);
3005
- }), Ua = /* @__PURE__ */ H("ZodEmoji", (e, t) => {
2900
+ }), La = /* @__PURE__ */ H("ZodEmoji", (e, t) => {
3006
2901
  En.init(e, t), $.init(e, t);
3007
- }), Wa = /* @__PURE__ */ H("ZodNanoID", (e, t) => {
2902
+ }), Ra = /* @__PURE__ */ H("ZodNanoID", (e, t) => {
3008
2903
  Dn.init(e, t), $.init(e, t);
3009
- }), Ga = /* @__PURE__ */ H("ZodCUID", (e, t) => {
2904
+ }), za = /* @__PURE__ */ H("ZodCUID", (e, t) => {
3010
2905
  On.init(e, t), $.init(e, t);
3011
- }), Ka = /* @__PURE__ */ H("ZodCUID2", (e, t) => {
2906
+ }), Ba = /* @__PURE__ */ H("ZodCUID2", (e, t) => {
3012
2907
  kn.init(e, t), $.init(e, t);
3013
- }), qa = /* @__PURE__ */ H("ZodULID", (e, t) => {
2908
+ }), Va = /* @__PURE__ */ H("ZodULID", (e, t) => {
3014
2909
  An.init(e, t), $.init(e, t);
3015
- }), Ja = /* @__PURE__ */ H("ZodXID", (e, t) => {
2910
+ }), Ha = /* @__PURE__ */ H("ZodXID", (e, t) => {
3016
2911
  jn.init(e, t), $.init(e, t);
3017
- }), Ya = /* @__PURE__ */ H("ZodKSUID", (e, t) => {
2912
+ }), Ua = /* @__PURE__ */ H("ZodKSUID", (e, t) => {
3018
2913
  Mn.init(e, t), $.init(e, t);
3019
- }), Xa = /* @__PURE__ */ H("ZodIPv4", (e, t) => {
2914
+ }), Wa = /* @__PURE__ */ H("ZodIPv4", (e, t) => {
3020
2915
  Ln.init(e, t), $.init(e, t);
3021
- }), Za = /* @__PURE__ */ H("ZodIPv6", (e, t) => {
2916
+ }), Ga = /* @__PURE__ */ H("ZodIPv6", (e, t) => {
3022
2917
  Rn.init(e, t), $.init(e, t);
3023
- }), Qa = /* @__PURE__ */ H("ZodCIDRv4", (e, t) => {
2918
+ }), Ka = /* @__PURE__ */ H("ZodCIDRv4", (e, t) => {
3024
2919
  zn.init(e, t), $.init(e, t);
3025
- }), $a = /* @__PURE__ */ H("ZodCIDRv6", (e, t) => {
2920
+ }), qa = /* @__PURE__ */ H("ZodCIDRv6", (e, t) => {
3026
2921
  Bn.init(e, t), $.init(e, t);
3027
- }), eo = /* @__PURE__ */ H("ZodBase64", (e, t) => {
2922
+ }), Ja = /* @__PURE__ */ H("ZodBase64", (e, t) => {
3028
2923
  Hn.init(e, t), $.init(e, t);
3029
- }), to = /* @__PURE__ */ H("ZodBase64URL", (e, t) => {
2924
+ }), Ya = /* @__PURE__ */ H("ZodBase64URL", (e, t) => {
3030
2925
  Wn.init(e, t), $.init(e, t);
3031
- }), no = /* @__PURE__ */ H("ZodE164", (e, t) => {
2926
+ }), Xa = /* @__PURE__ */ H("ZodE164", (e, t) => {
3032
2927
  Gn.init(e, t), $.init(e, t);
3033
- }), ro = /* @__PURE__ */ H("ZodJWT", (e, t) => {
2928
+ }), Za = /* @__PURE__ */ H("ZodJWT", (e, t) => {
3034
2929
  qn.init(e, t), $.init(e, t);
3035
- }), io = /* @__PURE__ */ H("ZodNumber", (e, t) => {
3036
- Jn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ji(e, t, n, r), Ia(e, "ZodNumber", {
2930
+ }), Qa = /* @__PURE__ */ H("ZodNumber", (e, t) => {
2931
+ Jn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wi(e, t, n, r), Aa(e, "ZodNumber", {
3037
2932
  gt(e, t) {
3038
- return this.check(/* @__PURE__ */ yi(e, t));
2933
+ return this.check(/* @__PURE__ */ mi(e, t));
3039
2934
  },
3040
2935
  gte(e, t) {
3041
- return this.check(/* @__PURE__ */ bi(e, t));
2936
+ return this.check(/* @__PURE__ */ hi(e, t));
3042
2937
  },
3043
2938
  min(e, t) {
3044
- return this.check(/* @__PURE__ */ bi(e, t));
2939
+ return this.check(/* @__PURE__ */ hi(e, t));
3045
2940
  },
3046
2941
  lt(e, t) {
3047
- return this.check(/* @__PURE__ */ _i(e, t));
2942
+ return this.check(/* @__PURE__ */ fi(e, t));
3048
2943
  },
3049
2944
  lte(e, t) {
3050
- return this.check(/* @__PURE__ */ vi(e, t));
2945
+ return this.check(/* @__PURE__ */ pi(e, t));
3051
2946
  },
3052
2947
  max(e, t) {
3053
- return this.check(/* @__PURE__ */ vi(e, t));
2948
+ return this.check(/* @__PURE__ */ pi(e, t));
3054
2949
  },
3055
2950
  int(e) {
3056
- return this.check(so(e));
2951
+ return this.check(to(e));
3057
2952
  },
3058
2953
  safe(e) {
3059
- return this.check(so(e));
2954
+ return this.check(to(e));
3060
2955
  },
3061
2956
  positive(e) {
3062
- return this.check(/* @__PURE__ */ yi(0, e));
2957
+ return this.check(/* @__PURE__ */ mi(0, e));
3063
2958
  },
3064
2959
  nonnegative(e) {
3065
- return this.check(/* @__PURE__ */ bi(0, e));
2960
+ return this.check(/* @__PURE__ */ hi(0, e));
3066
2961
  },
3067
2962
  negative(e) {
3068
- return this.check(/* @__PURE__ */ _i(0, e));
2963
+ return this.check(/* @__PURE__ */ fi(0, e));
3069
2964
  },
3070
2965
  nonpositive(e) {
3071
- return this.check(/* @__PURE__ */ vi(0, e));
2966
+ return this.check(/* @__PURE__ */ pi(0, e));
3072
2967
  },
3073
2968
  multipleOf(e, t) {
3074
- return this.check(/* @__PURE__ */ xi(e, t));
2969
+ return this.check(/* @__PURE__ */ gi(e, t));
3075
2970
  },
3076
2971
  step(e, t) {
3077
- return this.check(/* @__PURE__ */ xi(e, t));
2972
+ return this.check(/* @__PURE__ */ gi(e, t));
3078
2973
  },
3079
2974
  finite() {
3080
2975
  return this;
@@ -3083,59 +2978,59 @@ var $ = /* @__PURE__ */ H("ZodStringFormat", (e, t) => {
3083
2978
  let n = e._zod.bag;
3084
2979
  e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
3085
2980
  });
3086
- function ao(e) {
3087
- return /* @__PURE__ */ fi(io, e);
2981
+ function $a(e) {
2982
+ return /* @__PURE__ */ si(Qa, e);
3088
2983
  }
3089
- var oo = /* @__PURE__ */ H("ZodNumberFormat", (e, t) => {
3090
- Yn.init(e, t), io.init(e, t);
2984
+ var eo = /* @__PURE__ */ H("ZodNumberFormat", (e, t) => {
2985
+ Yn.init(e, t), Qa.init(e, t);
3091
2986
  });
3092
- function so(e) {
3093
- return /* @__PURE__ */ pi(oo, e);
2987
+ function to(e) {
2988
+ return /* @__PURE__ */ ci(eo, e);
3094
2989
  }
3095
- var co = /* @__PURE__ */ H("ZodBoolean", (e, t) => {
3096
- Xn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yi(e, t, n, r);
2990
+ var no = /* @__PURE__ */ H("ZodBoolean", (e, t) => {
2991
+ Xn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gi(e, t, n, r);
3097
2992
  });
3098
- function lo(e) {
3099
- return /* @__PURE__ */ mi(co, e);
2993
+ function ro(e) {
2994
+ return /* @__PURE__ */ li(no, e);
3100
2995
  }
3101
- var uo = /* @__PURE__ */ H("ZodUnknown", (e, t) => {
2996
+ var io = /* @__PURE__ */ H("ZodUnknown", (e, t) => {
3102
2997
  Zn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3103
2998
  });
3104
- function fo() {
3105
- return /* @__PURE__ */ hi(uo);
2999
+ function ao() {
3000
+ return /* @__PURE__ */ ui(io);
3106
3001
  }
3107
- var po = /* @__PURE__ */ H("ZodNever", (e, t) => {
3108
- Qn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi(e, t, n, r);
3002
+ var oo = /* @__PURE__ */ H("ZodNever", (e, t) => {
3003
+ Qn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ki(e, t, n, r);
3109
3004
  });
3110
- function mo(e) {
3111
- return /* @__PURE__ */ gi(po, e);
3005
+ function so(e) {
3006
+ return /* @__PURE__ */ di(oo, e);
3112
3007
  }
3113
- var ho = /* @__PURE__ */ H("ZodArray", (e, t) => {
3114
- er.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta(e, t, n, r), e.element = t.element, Ia(e, "ZodArray", {
3008
+ var co = /* @__PURE__ */ H("ZodArray", (e, t) => {
3009
+ er.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi(e, t, n, r), e.element = t.element, Aa(e, "ZodArray", {
3115
3010
  min(e, t) {
3116
- return this.check(/* @__PURE__ */ Ci(e, t));
3011
+ return this.check(/* @__PURE__ */ vi(e, t));
3117
3012
  },
3118
3013
  nonempty(e) {
3119
- return this.check(/* @__PURE__ */ Ci(1, e));
3014
+ return this.check(/* @__PURE__ */ vi(1, e));
3120
3015
  },
3121
3016
  max(e, t) {
3122
- return this.check(/* @__PURE__ */ Si(e, t));
3017
+ return this.check(/* @__PURE__ */ _i(e, t));
3123
3018
  },
3124
3019
  length(e, t) {
3125
- return this.check(/* @__PURE__ */ wi(e, t));
3020
+ return this.check(/* @__PURE__ */ yi(e, t));
3126
3021
  },
3127
3022
  unwrap() {
3128
3023
  return this.element;
3129
3024
  }
3130
3025
  });
3131
3026
  });
3132
- function go(e, t) {
3133
- return /* @__PURE__ */ Li(ho, e, t);
3027
+ function lo(e, t) {
3028
+ return /* @__PURE__ */ Mi(co, e, t);
3134
3029
  }
3135
- var _o = /* @__PURE__ */ H("ZodObject", (e, t) => {
3136
- ar.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => na(e, t, n, r), U(e, "shape", () => t.shape), Ia(e, "ZodObject", {
3030
+ var uo = /* @__PURE__ */ H("ZodObject", (e, t) => {
3031
+ ar.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi(e, t, n, r), U(e, "shape", () => t.shape), Aa(e, "ZodObject", {
3137
3032
  keyof() {
3138
- return Oo(Object.keys(this._zod.def.shape));
3033
+ return bo(Object.keys(this._zod.def.shape));
3139
3034
  },
3140
3035
  catchall(e) {
3141
3036
  return this.clone({
@@ -3146,19 +3041,19 @@ var _o = /* @__PURE__ */ H("ZodObject", (e, t) => {
3146
3041
  passthrough() {
3147
3042
  return this.clone({
3148
3043
  ...this._zod.def,
3149
- catchall: fo()
3044
+ catchall: ao()
3150
3045
  });
3151
3046
  },
3152
3047
  loose() {
3153
3048
  return this.clone({
3154
3049
  ...this._zod.def,
3155
- catchall: fo()
3050
+ catchall: ao()
3156
3051
  });
3157
3052
  },
3158
3053
  strict() {
3159
3054
  return this.clone({
3160
3055
  ...this._zod.def,
3161
- catchall: mo()
3056
+ catchall: so()
3162
3057
  });
3163
3058
  },
3164
3059
  strip() {
@@ -3168,94 +3063,79 @@ var _o = /* @__PURE__ */ H("ZodObject", (e, t) => {
3168
3063
  });
3169
3064
  },
3170
3065
  extend(e) {
3171
- return Ke(this, e);
3066
+ return Je(this, e);
3172
3067
  },
3173
3068
  safeExtend(e) {
3174
- return qe(this, e);
3069
+ return Ye(this, e);
3175
3070
  },
3176
3071
  merge(e) {
3177
- return Je(this, e);
3072
+ return Xe(this, e);
3178
3073
  },
3179
3074
  pick(e) {
3180
- return We(this, e);
3075
+ return Ke(this, e);
3181
3076
  },
3182
3077
  omit(e) {
3183
- return Ge(this, e);
3078
+ return qe(this, e);
3184
3079
  },
3185
3080
  partial(...e) {
3186
- return Ye(jo, this, e[0]);
3081
+ return Ze(Co, this, e[0]);
3187
3082
  },
3188
3083
  required(...e) {
3189
- return Xe(Vo, this, e[0]);
3084
+ return Qe(No, this, e[0]);
3190
3085
  }
3191
3086
  });
3192
3087
  });
3193
- function vo(e, t) {
3194
- return new _o({
3088
+ function fo(e, t) {
3089
+ return new uo({
3195
3090
  type: "object",
3196
3091
  shape: e ?? {},
3197
3092
  ...W(t)
3198
3093
  });
3199
3094
  }
3200
- var yo = /* @__PURE__ */ H("ZodUnion", (e, t) => {
3201
- sr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra(e, t, n, r), e.options = t.options;
3095
+ var po = /* @__PURE__ */ H("ZodUnion", (e, t) => {
3096
+ sr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi(e, t, n, r), e.options = t.options;
3202
3097
  });
3203
- function bo(e, t) {
3204
- return new yo({
3098
+ function mo(e, t) {
3099
+ return new po({
3205
3100
  type: "union",
3206
3101
  options: e,
3207
3102
  ...W(t)
3208
3103
  });
3209
3104
  }
3210
- var xo = /* @__PURE__ */ H("ZodIntersection", (e, t) => {
3211
- cr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ia(e, t, n, r);
3105
+ var ho = /* @__PURE__ */ H("ZodIntersection", (e, t) => {
3106
+ cr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i(e, t, n, r);
3212
3107
  });
3213
- function So(e, t) {
3214
- return new xo({
3108
+ function go(e, t) {
3109
+ return new ho({
3215
3110
  type: "intersection",
3216
3111
  left: e,
3217
3112
  right: t
3218
3113
  });
3219
3114
  }
3220
- var Co = /* @__PURE__ */ H("ZodTuple", (e, t) => {
3221
- dr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => aa(e, t, n, r), e.rest = (t) => e.clone({
3222
- ...e._zod.def,
3223
- rest: t
3224
- });
3225
- });
3226
- function wo(e, t, n) {
3227
- let r = t instanceof K;
3228
- return new Co({
3229
- type: "tuple",
3230
- items: e,
3231
- rest: r ? t : null,
3232
- ...W(r ? n : t)
3233
- });
3234
- }
3235
- var To = /* @__PURE__ */ H("ZodRecord", (e, t) => {
3236
- hr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => oa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
3115
+ var _o = /* @__PURE__ */ H("ZodRecord", (e, t) => {
3116
+ dr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ea(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
3237
3117
  });
3238
- function Eo(e, t, n) {
3239
- return !t || !t._zod ? new To({
3118
+ function vo(e, t, n) {
3119
+ return !t || !t._zod ? new _o({
3240
3120
  type: "record",
3241
3121
  keyType: Q(),
3242
3122
  valueType: e,
3243
3123
  ...W(t)
3244
- }) : new To({
3124
+ }) : new _o({
3245
3125
  type: "record",
3246
3126
  keyType: e,
3247
3127
  valueType: t,
3248
3128
  ...W(n)
3249
3129
  });
3250
3130
  }
3251
- var Do = /* @__PURE__ */ H("ZodEnum", (e, t) => {
3252
- gr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
3131
+ var yo = /* @__PURE__ */ H("ZodEnum", (e, t) => {
3132
+ fr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
3253
3133
  let n = new Set(Object.keys(t.entries));
3254
3134
  e.extract = (e, r) => {
3255
3135
  let i = {};
3256
3136
  for (let r of e) if (n.has(r)) i[r] = t.entries[r];
3257
3137
  else throw Error(`Key ${r} not found in enum`);
3258
- return new Do({
3138
+ return new yo({
3259
3139
  ...t,
3260
3140
  checks: [],
3261
3141
  ...W(r),
@@ -3265,7 +3145,7 @@ var Do = /* @__PURE__ */ H("ZodEnum", (e, t) => {
3265
3145
  let i = { ...t.entries };
3266
3146
  for (let t of e) if (n.has(t)) delete i[t];
3267
3147
  else throw Error(`Key ${t} not found in enum`);
3268
- return new Do({
3148
+ return new yo({
3269
3149
  ...t,
3270
3150
  checks: [],
3271
3151
  ...W(r),
@@ -3273,145 +3153,138 @@ var Do = /* @__PURE__ */ H("ZodEnum", (e, t) => {
3273
3153
  });
3274
3154
  };
3275
3155
  });
3276
- function Oo(e, t) {
3277
- return new Do({
3156
+ function bo(e, t) {
3157
+ return new yo({
3278
3158
  type: "enum",
3279
3159
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
3280
3160
  ...W(t)
3281
3161
  });
3282
3162
  }
3283
- var ko = /* @__PURE__ */ H("ZodTransform", (e, t) => {
3284
- _r.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ea(e, t, n, r), e._zod.parse = (n, r) => {
3285
- if (r.direction === "backward") throw new be(e.constructor.name);
3163
+ var xo = /* @__PURE__ */ H("ZodTransform", (e, t) => {
3164
+ pr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yi(e, t, n, r), e._zod.parse = (n, r) => {
3165
+ if (r.direction === "backward") throw new Se(e.constructor.name);
3286
3166
  n.addIssue = (r) => {
3287
- if (typeof r == "string") n.issues.push(rt(r, n.value, t));
3167
+ if (typeof r == "string") n.issues.push(at(r, n.value, t));
3288
3168
  else {
3289
3169
  let t = r;
3290
- t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(rt(t));
3170
+ t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(at(t));
3291
3171
  }
3292
3172
  };
3293
3173
  let i = t.transform(n.value, n);
3294
3174
  return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
3295
3175
  };
3296
3176
  });
3297
- function Ao(e) {
3298
- return new ko({
3177
+ function So(e) {
3178
+ return new xo({
3299
3179
  type: "transform",
3300
3180
  transform: e
3301
3181
  });
3302
3182
  }
3303
- var jo = /* @__PURE__ */ H("ZodOptional", (e, t) => {
3304
- yr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ma(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3183
+ var Co = /* @__PURE__ */ H("ZodOptional", (e, t) => {
3184
+ hr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ca(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3305
3185
  });
3306
- function Mo(e) {
3307
- return new jo({
3186
+ function wo(e) {
3187
+ return new Co({
3308
3188
  type: "optional",
3309
3189
  innerType: e
3310
3190
  });
3311
3191
  }
3312
- var No = /* @__PURE__ */ H("ZodExactOptional", (e, t) => {
3313
- br.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ma(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3192
+ var To = /* @__PURE__ */ H("ZodExactOptional", (e, t) => {
3193
+ gr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ca(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3314
3194
  });
3315
- function Po(e) {
3316
- return new No({
3195
+ function Eo(e) {
3196
+ return new To({
3317
3197
  type: "optional",
3318
3198
  innerType: e
3319
3199
  });
3320
3200
  }
3321
- var Fo = /* @__PURE__ */ H("ZodNullable", (e, t) => {
3322
- xr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => sa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3201
+ var Do = /* @__PURE__ */ H("ZodNullable", (e, t) => {
3202
+ _r.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3323
3203
  });
3324
- function Io(e) {
3325
- return new Fo({
3204
+ function Oo(e) {
3205
+ return new Do({
3326
3206
  type: "nullable",
3327
3207
  innerType: e
3328
3208
  });
3329
3209
  }
3330
- var Lo = /* @__PURE__ */ H("ZodDefault", (e, t) => {
3331
- Sr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => la(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3210
+ var ko = /* @__PURE__ */ H("ZodDefault", (e, t) => {
3211
+ vr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3332
3212
  });
3333
- function Ro(e, t) {
3334
- return new Lo({
3213
+ function Ao(e, t) {
3214
+ return new ko({
3335
3215
  type: "default",
3336
3216
  innerType: e,
3337
3217
  get defaultValue() {
3338
- return typeof t == "function" ? t() : Re(t);
3218
+ return typeof t == "function" ? t() : Be(t);
3339
3219
  }
3340
3220
  });
3341
3221
  }
3342
- var zo = /* @__PURE__ */ H("ZodPrefault", (e, t) => {
3343
- wr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3222
+ var jo = /* @__PURE__ */ H("ZodPrefault", (e, t) => {
3223
+ br.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ia(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3344
3224
  });
3345
- function Bo(e, t) {
3346
- return new zo({
3225
+ function Mo(e, t) {
3226
+ return new jo({
3347
3227
  type: "prefault",
3348
3228
  innerType: e,
3349
3229
  get defaultValue() {
3350
- return typeof t == "function" ? t() : Re(t);
3230
+ return typeof t == "function" ? t() : Be(t);
3351
3231
  }
3352
3232
  });
3353
3233
  }
3354
- var Vo = /* @__PURE__ */ H("ZodNonOptional", (e, t) => {
3355
- Tr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ca(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3234
+ var No = /* @__PURE__ */ H("ZodNonOptional", (e, t) => {
3235
+ xr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => na(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3356
3236
  });
3357
- function Ho(e, t) {
3358
- return new Vo({
3237
+ function Po(e, t) {
3238
+ return new No({
3359
3239
  type: "nonoptional",
3360
3240
  innerType: e,
3361
3241
  ...W(t)
3362
3242
  });
3363
3243
  }
3364
- var Uo = /* @__PURE__ */ H("ZodCatch", (e, t) => {
3365
- Dr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => da(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3244
+ var Fo = /* @__PURE__ */ H("ZodCatch", (e, t) => {
3245
+ Cr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => aa(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3366
3246
  });
3367
- function Wo(e, t) {
3368
- return new Uo({
3247
+ function Io(e, t) {
3248
+ return new Fo({
3369
3249
  type: "catch",
3370
3250
  innerType: e,
3371
3251
  catchValue: typeof t == "function" ? t : () => t
3372
3252
  });
3373
3253
  }
3374
- var Go = /* @__PURE__ */ H("ZodPipe", (e, t) => {
3375
- Or.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => fa(e, t, n, r), e.in = t.in, e.out = t.out;
3254
+ var Lo = /* @__PURE__ */ H("ZodPipe", (e, t) => {
3255
+ wr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => oa(e, t, n, r), e.in = t.in, e.out = t.out;
3376
3256
  });
3377
- function Ko(e, t) {
3378
- return new Go({
3257
+ function Ro(e, t) {
3258
+ return new Lo({
3379
3259
  type: "pipe",
3380
3260
  in: e,
3381
3261
  out: t
3382
3262
  });
3383
3263
  }
3384
- var qo = /* @__PURE__ */ H("ZodReadonly", (e, t) => {
3385
- Ar.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => pa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3264
+ var zo = /* @__PURE__ */ H("ZodReadonly", (e, t) => {
3265
+ Er.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => sa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3386
3266
  });
3387
- function Jo(e) {
3388
- return new qo({
3267
+ function Bo(e) {
3268
+ return new zo({
3389
3269
  type: "readonly",
3390
3270
  innerType: e
3391
3271
  });
3392
3272
  }
3393
- var Yo = /* @__PURE__ */ H("ZodFunction", (e, t) => {
3394
- Mr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i(e, t, n, r);
3273
+ var Vo = /* @__PURE__ */ H("ZodCustom", (e, t) => {
3274
+ Or.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ji(e, t, n, r);
3395
3275
  });
3396
- function Xo(e) {
3397
- return new Yo({
3398
- type: "function",
3399
- input: Array.isArray(e?.input) ? wo(e?.input) : e?.input ?? go(fo()),
3400
- output: e?.output ?? fo()
3401
- });
3276
+ function Ho(e, t) {
3277
+ return /* @__PURE__ */ Ni(Vo, e ?? (() => !0), t);
3402
3278
  }
3403
- var Zo = /* @__PURE__ */ H("ZodCustom", (e, t) => {
3404
- Nr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi(e, t, n, r);
3405
- });
3406
- function Qo(e, t = {}) {
3407
- return /* @__PURE__ */ Ri(Zo, e, t);
3279
+ function Uo(e, t = {}) {
3280
+ return /* @__PURE__ */ Pi(Vo, e, t);
3408
3281
  }
3409
- function $o(e, t) {
3410
- return /* @__PURE__ */ zi(e, t);
3282
+ function Wo(e, t) {
3283
+ return /* @__PURE__ */ Fi(e, t);
3411
3284
  }
3412
3285
  //#endregion
3413
3286
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
3414
- var es = {
3287
+ var Go = {
3415
3288
  invalid_type: "invalid_type",
3416
3289
  too_big: "too_big",
3417
3290
  too_small: "too_small",
@@ -3423,90 +3296,96 @@ var es = {
3423
3296
  invalid_element: "invalid_element",
3424
3297
  invalid_value: "invalid_value",
3425
3298
  custom: "custom"
3426
- }, ts;
3427
- (function(e) {})(ts ||= {});
3428
- var ns = vo({
3429
- app: vo({
3299
+ }, Ko;
3300
+ (function(e) {})(Ko ||= {});
3301
+ var qo = fo({
3302
+ app: fo({
3430
3303
  name: Q().min(1, "app.name is required"),
3431
3304
  version: Q().min(1, "app.version is required"),
3432
3305
  description: Q().optional()
3433
3306
  }),
3434
- monkey: vo({ server: vo({}).passthrough().optional() }).passthrough().superRefine((e, t) => {
3307
+ monkey: fo({ server: fo({}).passthrough().optional() }).passthrough().superRefine((e, t) => {
3435
3308
  "clientAlias" in e && t.addIssue({
3436
- code: es.custom,
3309
+ code: Go.custom,
3437
3310
  path: ["clientAlias"],
3438
3311
  message: "monkey.clientAlias is not supported by makoo"
3439
3312
  }), e.server && typeof e.server == "object" && "mountGmApi" in e.server && t.addIssue({
3440
- code: es.custom,
3313
+ code: Go.custom,
3441
3314
  path: ["server", "mountGmApi"],
3442
3315
  message: "monkey.server.mountGmApi is not supported by makoo"
3443
3316
  });
3444
3317
  }).optional(),
3445
- source: vo({}).passthrough().optional(),
3446
- runtime: vo({}).passthrough().optional()
3318
+ source: fo({}).passthrough().optional(),
3319
+ runtime: fo({}).passthrough().optional()
3447
3320
  }).loose().superRefine((e, t) => {
3448
3321
  "injector" in e && t.addIssue({
3449
- code: es.custom,
3322
+ code: Go.custom,
3450
3323
  path: ["injector"],
3451
3324
  message: "injector is not supported in vite config; use manifest injectionDefaults instead"
3452
3325
  });
3453
3326
  });
3454
- function rs(e) {
3455
- let t = ns.safeParse(e);
3456
- if (!t.success) throw new O(t.error.issues.map(F));
3327
+ function Jo(e) {
3328
+ let t = qo.safeParse(e);
3329
+ if (!t.success) throw new ie(t.error.issues.map(L));
3457
3330
  }
3458
3331
  //#endregion
3459
3332
  //#region packages/cli/src/config/resolve.ts
3460
- var is = (e, t) => Array.isArray(e) ? e : e === void 0 ? t : [e], as = (e, t) => o(t) ? s(t) : s(l(e, t)), os = (e) => s(e ? l(e) : u.cwd()), ss = (e) => {
3333
+ var Yo = (e, t) => Array.isArray(e) ? e : e === void 0 ? t : [e], Xo = (e, t) => o(t) ? s(t) : s(l(e, t)), Zo = (e) => s(e ? l(e) : u.cwd()), Qo = (e) => {
3461
3334
  let t = a(e).toLowerCase();
3462
- if (B.has(t)) return "React";
3463
- if (ue.has(t)) return "Vue";
3464
- throw new ae(e);
3465
- }, cs = (e, t) => e && e !== "auto" ? e : ss(t), ls = (e) => {
3335
+ if (V.has(t)) return "React";
3336
+ if (de.has(t)) return "Vue";
3337
+ throw new D(e);
3338
+ }, $o = (e, t) => e && e !== "auto" ? e : Qo(t), es = (e) => {
3466
3339
  if (e) return Array.isArray(e) ? { include: e } : {
3467
3340
  include: e.include,
3468
3341
  exclude: e.exclude
3469
3342
  };
3470
- }, us = (e, t, n, i, o) => e.name ? e.name : i || r(t) || r(n, a(n)) || `injection-${typeof o == "number" ? o + 1 : 1}`, ds = (e, t) => t === !1 || t === void 0 ? !1 : t === !0 ? e.replace(/\.user\.js$/, ".meta.js") : typeof t == "function" ? t(e) : t, fs = (e) => typeof e == "string" ? { "": e } : e, ps = (e) => ({
3343
+ }, ts = (e, t, n, i, o) => e.name ? e.name : i || r(t) || r(n, a(n)) || `injection-${typeof o == "number" ? o + 1 : 1}`, ns = (e, t, n) => e.name ? e.name : t || `listener-${typeof n == "number" ? n + 1 : 1}`, rs = (e, t) => t === !1 || t === void 0 ? !1 : t === !0 ? e.replace(/\.user\.js$/, ".meta.js") : typeof t == "function" ? t(e) : t, is = (e) => typeof e == "string" ? { "": e } : e, as = (e) => ({
3471
3344
  ...e,
3472
- name: fs(e.name),
3473
- description: fs(e.description)
3474
- }), ms = (e) => {
3345
+ name: is(e.name),
3346
+ description: is(e.description)
3347
+ }), os = (e) => {
3475
3348
  let t = e?.injections;
3476
3349
  return t ? Array.isArray(t) ? t : Object.entries(t).map(([e, t]) => ({
3477
3350
  name: e,
3478
3351
  ...t
3479
3352
  })) : [];
3480
- }, hs = (e) => ({
3353
+ }, ss = (e) => {
3354
+ let t = e?.listeners;
3355
+ return t ? Array.isArray(t) ? t : Object.entries(t).map(([e, t]) => ({
3356
+ name: e,
3357
+ ...t
3358
+ })) : [];
3359
+ }, cs = (e) => ({
3481
3360
  name: e.name,
3482
3361
  version: e.version,
3483
3362
  description: e.description
3484
- }), gs = (e, t) => ({
3485
- dir: as(t, fe.dir),
3486
- include: is(e?.include, fe.include),
3487
- exclude: is(e?.exclude, fe.exclude),
3488
- manifest: de
3489
- }), _s = (e) => ({
3490
- alive: e?.alive ?? me.alive,
3491
- scope: e?.scope ?? me.scope,
3492
- timeout: e?.timeout ?? me.timeout,
3363
+ }), ls = (e, t) => ({
3364
+ dir: Xo(t, me.dir),
3365
+ include: Yo(e?.include, me.include),
3366
+ exclude: Yo(e?.exclude, me.exclude),
3367
+ manifest: pe
3368
+ }), us = (e) => ({
3369
+ alive: e?.alive ?? ge.alive,
3370
+ scope: e?.scope ?? ge.scope,
3371
+ timeout: e?.timeout ?? ge.timeout,
3493
3372
  hooks: e?.hooks
3494
- }), vs = (e, t) => ({ setup: is(e?.setup, pe.setup).map((e) => as(t, e)) }), ys = (e) => ({
3495
- open: e?.server?.open ?? he.open,
3496
- prefix: e?.server?.prefix ?? he.prefix,
3373
+ }), ds = (e, t) => ({ setup: Yo(e?.setup, he.setup).map((e) => Xo(t, e)) }), fs = (e) => ({
3374
+ open: e?.server?.open ?? _e.open,
3375
+ prefix: e?.server?.prefix ?? _e.prefix,
3497
3376
  mountGmApi: !1
3498
- }), bs = (e, t) => {
3377
+ }), ps = (e, t) => {
3499
3378
  let n = t?.build?.fileName ?? `${e.name}.user.js`;
3500
3379
  return {
3501
3380
  fileName: n,
3502
- metaFileName: ds(n, t?.build?.metaFileName ?? ge.metaFileName),
3381
+ metaFileName: rs(n, t?.build?.metaFileName ?? ve.metaFileName),
3503
3382
  externalGlobals: t?.build?.externalGlobals,
3504
- autoGrant: t?.build?.autoGrant ?? ge.autoGrant,
3383
+ autoGrant: t?.build?.autoGrant ?? ve.autoGrant,
3505
3384
  externalResource: t?.build?.externalResource,
3506
3385
  systemjs: t?.build?.systemjs,
3507
3386
  cssSideEffects: t?.build?.cssSideEffects
3508
3387
  };
3509
- }, xs = (e, t) => {
3388
+ }, ms = (e, t) => {
3510
3389
  let { userscript: n, align: r, styleImport: i, server: a, build: o, ...s } = t ?? {};
3511
3390
  return {
3512
3391
  ...s,
@@ -3516,16 +3395,16 @@ var is = (e, t) => Array.isArray(e) ? e : e === void 0 ? t : [e], as = (e, t) =>
3516
3395
  description: e.description,
3517
3396
  ...n
3518
3397
  },
3519
- align: r ?? _e.align ?? 2,
3520
- clientAlias: _e.clientAlias,
3521
- styleImport: i ?? _e.styleImport ?? !0,
3522
- server: ys(t),
3523
- build: bs(e, t)
3398
+ align: r ?? ye.align ?? 2,
3399
+ clientAlias: ye.clientAlias,
3400
+ styleImport: i ?? ye.styleImport ?? !0,
3401
+ server: fs(t),
3402
+ build: ps(e, t)
3524
3403
  };
3525
- }, Ss = (e, t) => {
3526
- let n = os(t.root), r = t.source ?? gs(void 0, n), a = t.injectionDefaults ?? _s(void 0), o = t.moduleDir ? as(n, t.moduleDir) : r.dir;
3527
- if (!t.componentPath) throw new oe(e.name ?? e.injectAt);
3528
- let s = as(n, t.componentPath), c = t.moduleDir ? o : s ? i(s) : r.dir, { component: l, framework: u, enabled: d, alive: f, scope: p, timeout: m, ...h } = e, ee = t.moduleId ?? us(e, c, s, t.fallbackName, t.index), te = cs(e.framework, s), g = t.moduleManifestFile ? as(n, t.moduleManifestFile) : void 0;
3404
+ }, hs = (e, t) => {
3405
+ let n = Zo(t.root), r = t.source ?? ls(void 0, n), a = t.injectionDefaults ?? us(void 0), o = t.moduleDir ? Xo(n, t.moduleDir) : r.dir;
3406
+ if (!t.componentPath) throw new O(e.name ?? e.injectAt);
3407
+ let s = Xo(n, t.componentPath), c = t.moduleDir ? o : s ? i(s) : r.dir, { component: l, framework: u, enabled: d, alive: f, scope: p, timeout: m, ...h } = e, ee = t.moduleId ?? ts(e, c, s, t.fallbackName, t.index), te = $o(e.framework, s), g = t.moduleManifestFile ? Xo(n, t.moduleManifestFile) : void 0;
3529
3408
  return {
3530
3409
  ...h,
3531
3410
  moduleId: ee,
@@ -3537,32 +3416,43 @@ var is = (e, t) => Array.isArray(e) ? e : e === void 0 ? t : [e], as = (e, t) =>
3537
3416
  alive: e.alive ?? a.alive,
3538
3417
  scope: e.scope ?? a.scope,
3539
3418
  timeout: e.timeout ?? a.timeout,
3540
- match: ls(e.match)
3419
+ match: es(e.match)
3541
3420
  };
3542
- }, Cs = (e, t) => {
3543
- let n = os(t.root);
3544
- return ms(e).map((e, r) => Ss(e, {
3421
+ }, gs = (e, t) => {
3422
+ let n = Zo(t.root);
3423
+ return os(e).map((e, r) => hs(e, {
3545
3424
  root: n,
3546
3425
  source: t.source,
3547
3426
  injectionDefaults: t.injectionDefaults,
3548
3427
  componentPath: l(t.source.dir, e.component),
3549
3428
  index: r
3550
3429
  }));
3551
- }, ws = (e, t = u.cwd()) => {
3552
- rs(e);
3553
- let n = os(t), r = hs(e.app), i = gs(e.source, t);
3430
+ }, _s = (e, t) => {
3431
+ let { name: n, enabled: r, match: i, ...a } = e;
3432
+ return {
3433
+ ...a,
3434
+ listenerId: t.listenerId ?? ns(e, t.fallbackName, t.index),
3435
+ enabled: e.enabled ?? !0,
3436
+ match: es(e.match)
3437
+ };
3438
+ }, vs = (e, t) => ss(e).map((e, n) => _s(e, {
3439
+ root: t.root,
3440
+ index: n
3441
+ })), ys = (e, t = u.cwd()) => {
3442
+ Jo(e);
3443
+ let n = Zo(t), r = cs(e.app), i = ls(e.source, t);
3554
3444
  return {
3555
3445
  root: n,
3556
3446
  app: r,
3557
- monkey: xs(r, e.monkey),
3447
+ monkey: ms(r, e.monkey),
3558
3448
  source: i,
3559
- runtime: vs(e.runtime, n)
3449
+ runtime: ds(e.runtime, n)
3560
3450
  };
3561
3451
  };
3562
- function Ts(e, t) {
3452
+ function bs(e, t) {
3563
3453
  let n = {
3564
3454
  ...e.monkey,
3565
- entry: `./${ce}`,
3455
+ entry: `./${B}`,
3566
3456
  userscript: e.monkey.userscript,
3567
3457
  align: e.monkey.align,
3568
3458
  generate: e.monkey.generate,
@@ -3574,8 +3464,8 @@ function Ts(e, t) {
3574
3464
  return {
3575
3465
  ...n,
3576
3466
  ...t,
3577
- entry: `./${ce}`,
3578
- userscript: ps({
3467
+ entry: `./${B}`,
3468
+ userscript: as({
3579
3469
  ...n.userscript,
3580
3470
  ...t?.userscript
3581
3471
  }),
@@ -3591,7 +3481,7 @@ function Ts(e, t) {
3591
3481
  }
3592
3482
  //#endregion
3593
3483
  //#region node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
3594
- var Es = /* @__PURE__ */ C(((e, t) => {
3484
+ var xs = /* @__PURE__ */ C(((e, t) => {
3595
3485
  var n = "\\\\/", r = `[^${n}]`, i = 0, a = "\\.", o = "\\+", s = "\\?", c = "\\/", l = "(?=.)", u = "[^/]", d = `(?:${c}|$)`, f = `(?:^|${c})`, p = `${a}{1,2}${d}`, m = {
3596
3486
  DOT_LITERAL: a,
3597
3487
  PLUS_LITERAL: o,
@@ -3732,8 +3622,8 @@ var Es = /* @__PURE__ */ C(((e, t) => {
3732
3622
  return e === !0 ? h : m;
3733
3623
  }
3734
3624
  };
3735
- })), Ds = /* @__PURE__ */ C(((e) => {
3736
- var { REGEX_BACKSLASH: t, REGEX_REMOVE_BACKSLASH: n, REGEX_SPECIAL_CHARS: r, REGEX_SPECIAL_CHARS_GLOBAL: i } = Es();
3625
+ })), Ss = /* @__PURE__ */ C(((e) => {
3626
+ var { REGEX_BACKSLASH: t, REGEX_REMOVE_BACKSLASH: n, REGEX_SPECIAL_CHARS: r, REGEX_SPECIAL_CHARS_GLOBAL: i } = xs();
3737
3627
  e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => r.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(i, "\\$1"), e.toPosixSlashes = (e) => e.replace(t, "/"), e.isWindows = () => {
3738
3628
  if (typeof navigator < "u" && navigator.platform) {
3739
3629
  let e = navigator.platform.toLowerCase();
@@ -3753,8 +3643,8 @@ var Es = /* @__PURE__ */ C(((e, t) => {
3753
3643
  let n = e.split(t ? /[\\/]/ : "/"), r = n[n.length - 1];
3754
3644
  return r === "" ? n[n.length - 2] : r;
3755
3645
  };
3756
- })), Os = /* @__PURE__ */ C(((e, t) => {
3757
- var n = Ds(), { CHAR_ASTERISK: r, CHAR_AT: i, CHAR_BACKWARD_SLASH: a, CHAR_COMMA: o, CHAR_DOT: s, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: l, CHAR_LEFT_CURLY_BRACE: u, CHAR_LEFT_PARENTHESES: d, CHAR_LEFT_SQUARE_BRACKET: f, CHAR_PLUS: p, CHAR_QUESTION_MARK: m, CHAR_RIGHT_CURLY_BRACE: h, CHAR_RIGHT_PARENTHESES: ee, CHAR_RIGHT_SQUARE_BRACKET: te } = Es(), g = (e) => e === l || e === a, _ = (e) => {
3646
+ })), Cs = /* @__PURE__ */ C(((e, t) => {
3647
+ var n = Ss(), { CHAR_ASTERISK: r, CHAR_AT: i, CHAR_BACKWARD_SLASH: a, CHAR_COMMA: o, CHAR_DOT: s, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: l, CHAR_LEFT_CURLY_BRACE: u, CHAR_LEFT_PARENTHESES: d, CHAR_LEFT_SQUARE_BRACKET: f, CHAR_PLUS: p, CHAR_QUESTION_MARK: m, CHAR_RIGHT_CURLY_BRACE: h, CHAR_RIGHT_PARENTHESES: ee, CHAR_RIGHT_SQUARE_BRACKET: te } = xs(), g = (e) => e === l || e === a, _ = (e) => {
3758
3648
  e.isPrefix !== !0 && (e.depth = e.isGlobstar ? Infinity : 1);
3759
3649
  };
3760
3650
  t.exports = (e, t) => {
@@ -3903,8 +3793,8 @@ var Es = /* @__PURE__ */ C(((e, t) => {
3903
3793
  }
3904
3794
  return B;
3905
3795
  };
3906
- })), ks = /* @__PURE__ */ C(((e, t) => {
3907
- var n = Es(), r = Ds(), { MAX_LENGTH: i, POSIX_REGEX_SOURCE: a, REGEX_NON_SPECIAL_CHARS: o, REGEX_SPECIAL_CHARS_BACKREF: s, REPLACEMENTS: c } = n, l = (e, t) => {
3796
+ })), ws = /* @__PURE__ */ C(((e, t) => {
3797
+ var n = xs(), r = Ss(), { MAX_LENGTH: i, POSIX_REGEX_SOURCE: a, REGEX_NON_SPECIAL_CHARS: o, REGEX_SPECIAL_CHARS_BACKREF: s, REPLACEMENTS: c } = n, l = (e, t) => {
3908
3798
  if (typeof t.expandRange == "function") return t.expandRange(...e, t);
3909
3799
  e.sort();
3910
3800
  let n = `[${e.join("-")}]`;
@@ -4557,8 +4447,8 @@ var Es = /* @__PURE__ */ C(((e, t) => {
4557
4447
  }, ne = S(r.removePrefix(e, y));
4558
4448
  return ne && a.strictSlashes !== !0 && (ne += `${u}?`), ne;
4559
4449
  }, t.exports = _;
4560
- })), As = /* @__PURE__ */ C(((e, t) => {
4561
- var n = Os(), r = ks(), i = Ds(), a = Es(), o = (e) => e && typeof e == "object" && !Array.isArray(e), s = (e, t, n = !1) => {
4450
+ })), Ts = /* @__PURE__ */ C(((e, t) => {
4451
+ var n = Cs(), r = ws(), i = Ss(), a = xs(), o = (e) => e && typeof e == "object" && !Array.isArray(e), s = (e, t, n = !1) => {
4562
4452
  if (Array.isArray(e)) {
4563
4453
  let r = e.map((e) => s(e, t, n));
4564
4454
  return (e) => {
@@ -4638,8 +4528,8 @@ var Es = /* @__PURE__ */ C(((e, t) => {
4638
4528
  return /$^/;
4639
4529
  }
4640
4530
  }, s.constants = a, t.exports = s;
4641
- })), js = /* @__PURE__ */ T((/* @__PURE__ */ C(((e, t) => {
4642
- var n = As(), r = Ds();
4531
+ })), Es = /* @__PURE__ */ T((/* @__PURE__ */ C(((e, t) => {
4532
+ var n = Ts(), r = Ss();
4643
4533
  function i(e, t, i = !1) {
4644
4534
  return t && (t.windows === null || t.windows === void 0) && (t = {
4645
4535
  ...t,
@@ -4648,52 +4538,52 @@ var Es = /* @__PURE__ */ C(((e, t) => {
4648
4538
  }
4649
4539
  Object.assign(i, n), t.exports = i;
4650
4540
  })))(), 1);
4651
- function Ms(e, t) {
4541
+ function Ds(e, t) {
4652
4542
  let r = n.relative(t, e);
4653
4543
  return r === "" || !r.startsWith("..") && !n.isAbsolute(r);
4654
4544
  }
4655
- function Ns(e) {
4545
+ function Os(e) {
4656
4546
  return e.split(n.sep).includes("node_modules");
4657
4547
  }
4658
- function Ps(e) {
4548
+ function ks(e) {
4659
4549
  return e.startsWith("./") || e.startsWith("../");
4660
4550
  }
4661
- function Fs(e) {
4551
+ function As(e) {
4662
4552
  let t = [];
4663
- for (let n of e.matchAll(L)) {
4553
+ for (let n of e.matchAll(z)) {
4664
4554
  let e = n[1] ?? n[2];
4665
- e && Ps(e) && t.push(e);
4555
+ e && ks(e) && t.push(e);
4666
4556
  }
4667
- for (let n of e.matchAll(R)) {
4557
+ for (let n of e.matchAll(ce)) {
4668
4558
  let e = n[1];
4669
- e && Ps(e) && t.push(e);
4559
+ e && ks(e) && t.push(e);
4670
4560
  }
4671
4561
  return t;
4672
4562
  }
4673
- function Is(e) {
4563
+ function js(e) {
4674
4564
  return !h(e) || !g(e).isFile() ? null : n.resolve(e);
4675
4565
  }
4676
- function Ls(e, t) {
4677
- let r = n.resolve(e, t), i = Is(r);
4566
+ function Ms(e, t) {
4567
+ let r = n.resolve(e, t), i = js(r);
4678
4568
  if (i) return i;
4679
- for (let e of I) {
4680
- let t = Is(r + e);
4569
+ for (let e of R) {
4570
+ let t = js(r + e);
4681
4571
  if (t) return t;
4682
4572
  }
4683
- for (let e of I) {
4684
- let t = Is(n.join(r, `index${e}`));
4573
+ for (let e of R) {
4574
+ let t = js(n.join(r, `index${e}`));
4685
4575
  if (t) return t;
4686
4576
  }
4687
4577
  return null;
4688
4578
  }
4689
- function Rs(e, t) {
4579
+ function Ns(e, t) {
4690
4580
  let r = n.resolve(t.root), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = (s) => {
4691
4581
  let c = n.resolve(s);
4692
- if (i.has(c) || (i.add(c), !Ms(c, r)) || Ns(c) || !h(c) || !g(c).isFile()) return;
4582
+ if (i.has(c) || (i.add(c), !Ds(c, r)) || Os(c) || !h(c) || !g(c).isFile()) return;
4693
4583
  (t.includeEntry || c !== n.resolve(e)) && a.add(c);
4694
4584
  let l = ee(c, "utf8"), u = n.dirname(c);
4695
- for (let e of Fs(l)) {
4696
- let t = Ls(u, e);
4585
+ for (let e of As(l)) {
4586
+ let t = Ms(u, e);
4697
4587
  t && o(t);
4698
4588
  }
4699
4589
  };
@@ -4701,46 +4591,73 @@ function Rs(e, t) {
4701
4591
  }
4702
4592
  //#endregion
4703
4593
  //#region packages/cli/src/scanner/validation.ts
4704
- var zs = Oo(p), Bs = bo([Xo(), go(Xo())]), Vs = Eo(Q(), Bs).refine((e) => Object.keys(e).every((e) => zs.safeParse(e).success), { message: "Invalid hook event name" }), Hs = vo({
4705
- alive: lo().optional(),
4706
- scope: Oo(["local", "global"]).optional(),
4707
- timeout: ao().optional(),
4708
- hooks: Vs.optional()
4709
- }), Us = bo([go(Q()), vo({
4710
- include: go(Q()).optional(),
4711
- exclude: go(Q()).optional()
4712
- })]), Ws = vo({
4594
+ var Ps = bo(p), Fs = Ho((e) => typeof e == "function"), Is = mo([Fs, lo(Fs)]), Ls = vo(Q(), Is).refine((e) => Object.keys(e).every((e) => Ps.safeParse(e).success), { message: "Invalid hook event name" }), Rs = fo({
4595
+ alive: ro().optional(),
4596
+ scope: bo(["local", "global"]).optional(),
4597
+ timeout: $a().optional(),
4598
+ hooks: Ls.optional()
4599
+ }), zs = mo([lo(Q()), fo({
4600
+ include: lo(Q()).optional(),
4601
+ exclude: lo(Q()).optional()
4602
+ })]), Bs = Ho((e) => typeof e == "function"), Vs = Ho((e) => typeof e == "function"), Hs = fo({
4603
+ listenAt: Q(),
4604
+ type: Q(),
4605
+ callback: Bs,
4606
+ capture: ro().optional(),
4607
+ activitySignal: Vs.optional()
4608
+ }), Us = fo({
4713
4609
  name: Q().optional(),
4714
4610
  injectAt: Q(),
4715
4611
  component: Q(),
4716
- framework: Oo([
4612
+ framework: bo([
4717
4613
  "auto",
4718
4614
  "Vue",
4719
4615
  "React"
4720
4616
  ]).optional(),
4721
- enabled: lo().optional(),
4722
- match: Us.optional(),
4723
- alive: lo().optional(),
4724
- scope: Oo(["local", "global"]).optional(),
4725
- timeout: ao().optional()
4726
- }), Gs = vo({
4727
- injectionDefaults: Hs.optional(),
4728
- injections: bo([go(Ws), Eo(Q(), Ws.omit({ name: !0 }))])
4729
- }).strict();
4617
+ enabled: ro().optional(),
4618
+ match: zs.optional(),
4619
+ alive: ro().optional(),
4620
+ scope: bo(["local", "global"]).optional(),
4621
+ timeout: $a().optional(),
4622
+ hooks: Ls.optional(),
4623
+ on: Hs.optional()
4624
+ }), Ws = Hs.extend({
4625
+ name: Q().optional(),
4626
+ enabled: ro().optional(),
4627
+ match: zs.optional()
4628
+ }), Gs = fo({
4629
+ injectionDefaults: Rs.optional(),
4630
+ injections: mo([lo(Us), vo(Q(), Us.omit({ name: !0 }))]).optional(),
4631
+ listeners: mo([lo(Ws), vo(Q(), Ws.omit({ name: !0 }))]).optional()
4632
+ }).strict().refine((e) => e.injections || e.listeners, { message: "Manifest must define injections or listeners" });
4730
4633
  function Ks(e, t) {
4731
4634
  let n = Gs.safeParse(e);
4732
- if (!n.success) throw new D(t, n.error.issues);
4733
- return n.data;
4635
+ if (!n.success) throw new re(t, n.error.issues);
4636
+ return Js(n.data, t), n.data;
4734
4637
  }
4735
4638
  function qs(e, t) {
4736
- let n = Ws.safeParse(e);
4737
- if (!n.success) throw new D(t, n.error.issues);
4738
- return n.data;
4639
+ let n = Us.safeParse(e);
4640
+ if (!n.success) throw new re(t, n.error.issues);
4641
+ return Ys(n.data.injectAt, t, "injectAt"), Ys(n.data.on?.listenAt, t, "on.listenAt"), n.data;
4642
+ }
4643
+ function Js(e, t) {
4644
+ Array.isArray(e.injections) ? e.injections.forEach((e, n) => {
4645
+ Ys(e.injectAt, t, `injections[${n}].injectAt`), Ys(e.on?.listenAt, t, `injections[${n}].on.listenAt`);
4646
+ }) : e.injections && Object.entries(e.injections).forEach(([e, n]) => {
4647
+ Ys(n.injectAt, t, `injections.${e}.injectAt`), Ys(n.on?.listenAt, t, `injections.${e}.on.listenAt`);
4648
+ }), Array.isArray(e.listeners) ? e.listeners.forEach((e, n) => {
4649
+ Ys(e.listenAt, t, `listeners[${n}].listenAt`);
4650
+ }) : e.listeners && Object.entries(e.listeners).forEach(([e, n]) => {
4651
+ Ys(n.listenAt, t, `listeners.${e}.listenAt`);
4652
+ });
4653
+ }
4654
+ function Ys(e, t, n) {
4655
+ if (e === "document" || e === "window") throw new j(t, n, e);
4739
4656
  }
4740
4657
  //#endregion
4741
4658
  //#region packages/cli/src/scanner/load/loadManifes.ts
4742
- async function Js(e) {
4743
- if (!h(e.dir)) throw new k(e.dir);
4659
+ async function Xs(e) {
4660
+ if (!h(e.dir)) throw new ae(e.dir);
4744
4661
  let t = e.manifest, r = _(e.dir, { moduleCache: !1 });
4745
4662
  for (let i of te(e.dir)) {
4746
4663
  let a = n.join(e.dir, i);
@@ -4749,12 +4666,12 @@ async function Js(e) {
4749
4666
  try {
4750
4667
  t = await r.import(a, { default: !0 });
4751
4668
  } catch (e) {
4752
- throw new j(a, void 0, e instanceof Error ? e : void 0);
4669
+ throw new se(a, void 0, e instanceof Error ? e : void 0);
4753
4670
  }
4754
4671
  return {
4755
4672
  manifest: Ks(t, a),
4756
4673
  manifestFile: a,
4757
- dependencies: Rs(a, { root: n.resolve(e.dir, "..") })
4674
+ dependencies: Ns(a, { root: n.resolve(e.dir, "..") })
4758
4675
  };
4759
4676
  }
4760
4677
  }
@@ -4762,7 +4679,7 @@ async function Js(e) {
4762
4679
  }
4763
4680
  //#endregion
4764
4681
  //#region packages/cli/src/scanner/load/loadMeta.ts
4765
- async function Ys(e) {
4682
+ async function Zs(e) {
4766
4683
  let t = m.readdirSync(e).filter((t) => {
4767
4684
  let r = n.join(e, t);
4768
4685
  return m.statSync(r).isFile();
@@ -4774,44 +4691,118 @@ async function Ys(e) {
4774
4691
  try {
4775
4692
  a = await r.import(t, { default: !0 });
4776
4693
  } catch (e) {
4777
- throw new M(t, void 0, e instanceof Error ? e : void 0);
4694
+ throw new N(t, void 0, e instanceof Error ? e : void 0);
4778
4695
  }
4779
4696
  return {
4780
4697
  moduleManifestFile: t,
4781
4698
  moduleConfig: qs(a, t),
4782
- dependencies: Rs(t, { root: n.resolve(e, "..", "..") })
4699
+ dependencies: Ns(t, { root: n.resolve(e, "..", "..") })
4783
4700
  };
4784
4701
  }
4785
4702
  return null;
4786
4703
  }
4787
4704
  //#endregion
4705
+ //#region packages/cli/src/scanner/manifestBinding.ts
4706
+ function Qs(e) {
4707
+ let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = nc(e.manifest.injections), a = nc(e.manifest.listeners), o = os(e.manifest), s = ss(e.manifest);
4708
+ return e.manifestInjections.forEach((n, r) => {
4709
+ t.set(n.moduleId, {
4710
+ config: o[r],
4711
+ binding: {
4712
+ manifestFile: e.manifestFile,
4713
+ valuePath: ["injections", i[r]]
4714
+ }
4715
+ });
4716
+ }), e.moduleInjections.forEach((t) => {
4717
+ if (!t.moduleManifestFile) return;
4718
+ let r = e.moduleInjectionConfigs.get(t.moduleId);
4719
+ if (!r) throw new k("injection", t.moduleId);
4720
+ n.set(t.moduleId, {
4721
+ config: r,
4722
+ binding: {
4723
+ manifestFile: t.moduleManifestFile,
4724
+ valuePath: []
4725
+ }
4726
+ });
4727
+ }), e.manifestListeners.forEach((t, n) => {
4728
+ let i = {
4729
+ manifestFile: e.manifestFile,
4730
+ valuePath: ["listeners", a[n]]
4731
+ }, o = s[n];
4732
+ r.set(t.listenerId, {
4733
+ callback: tc(i, ["callback"]),
4734
+ activitySignal: o.activitySignal ? tc(i, ["activitySignal"]) : void 0
4735
+ });
4736
+ }), {
4737
+ injectionDefaults: e.manifest.injectionDefaults?.hooks ? { hooks: {
4738
+ manifestFile: e.manifestFile,
4739
+ valuePath: ["injectionDefaults", "hooks"]
4740
+ } } : void 0,
4741
+ injections: Object.fromEntries(e.enabledInjections.map((e) => {
4742
+ let r = t.get(e.moduleId), i = n.get(e.moduleId);
4743
+ if (!r && !i) throw new k("injection", e.moduleId);
4744
+ return [e.moduleId, $s(r, i)];
4745
+ })),
4746
+ listeners: rc(e.enabledListeners.map((e) => e.listenerId), r, "listener")
4747
+ };
4748
+ }
4749
+ function $s(e, t) {
4750
+ let n = ec("hooks", e, t), r = ec("on", e, t);
4751
+ return {
4752
+ hooks: n?.config.hooks ? tc(n.binding, ["hooks"]) : void 0,
4753
+ on: r?.config.on ? {
4754
+ callback: tc(r.binding, ["on", "callback"]),
4755
+ activitySignal: r.config.on.activitySignal ? tc(r.binding, ["on", "activitySignal"]) : void 0
4756
+ } : void 0
4757
+ };
4758
+ }
4759
+ function ec(e, t, n) {
4760
+ return n && Object.hasOwn(n.config, e) ? n : t;
4761
+ }
4762
+ function tc(e, t) {
4763
+ return {
4764
+ manifestFile: e.manifestFile,
4765
+ valuePath: [...e.valuePath, ...t]
4766
+ };
4767
+ }
4768
+ function nc(e) {
4769
+ return e ? Array.isArray(e) ? e.map((e, t) => t) : Object.keys(e) : [];
4770
+ }
4771
+ function rc(e, t, n) {
4772
+ return Object.fromEntries(e.map((e) => {
4773
+ let r = t.get(e);
4774
+ if (!r) throw new k(n, e);
4775
+ return [e, r];
4776
+ }));
4777
+ }
4778
+ //#endregion
4788
4779
  //#region packages/cli/src/scanner/util.ts
4789
- function Xs(e, t) {
4780
+ function ic(e, t) {
4790
4781
  let n = new Map(t.map((e) => [e.moduleId, e])), r = e.map((e) => n.get(e.moduleId) ?? e);
4791
4782
  for (let n of t) e.some((e) => e.moduleId === n.moduleId) || r.push(n);
4792
4783
  return r;
4793
4784
  }
4794
4785
  //#endregion
4795
4786
  //#region packages/cli/src/scanner/scanner.ts
4796
- async function Zs(e) {
4797
- let t = await Js(e.source);
4798
- if (!t) throw new A(e.source.dir);
4787
+ async function ac(e) {
4788
+ let t = await Xs(e.source);
4789
+ if (!t) throw new oe(e.source.dir);
4799
4790
  let r = new Set(t.dependencies), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
4800
4791
  for (let t of e.runtime.setup) {
4801
- if (!h(t)) throw new ie(t);
4792
+ if (!h(t)) throw new E(t);
4802
4793
  a.add(t);
4803
- for (let n of Rs(t, { root: e.root })) o.add(n);
4794
+ for (let n of Ns(t, { root: e.root })) o.add(n);
4804
4795
  }
4805
- let s = _s(t.manifest.injectionDefaults), c = Cs(t.manifest, {
4796
+ let s = us(t.manifest.injectionDefaults), c = gs(t.manifest, {
4806
4797
  root: e.root,
4807
4798
  source: e.source,
4808
4799
  injectionDefaults: s
4809
- }), l = te(e.source.dir, { withFileTypes: !0 }).filter((e) => e.isDirectory()).map((e) => e.name), u = (0, js.default)(e.source.include), d = (0, js.default)(e.source.exclude), f = l.filter((e) => u(e) && !d(e)), p = [];
4810
- for (let t of f) {
4811
- let r = n.join(e.source.dir, t), a = await Ys(r);
4800
+ }), l = os(t.manifest), u = new Map(c.map((e, t) => [e.moduleId, l[t]])), d = te(e.source.dir, { withFileTypes: !0 }).filter((e) => e.isDirectory()).map((e) => e.name), f = (0, Es.default)(e.source.include), p = (0, Es.default)(e.source.exclude), m = d.filter((e) => f(e) && !p(e)), ee = [], g = /* @__PURE__ */ new Map();
4801
+ for (let t of m) {
4802
+ let r = n.join(e.source.dir, t), a = await Zs(r);
4812
4803
  if (!a) continue;
4813
4804
  for (let e of a.dependencies) i.add(e);
4814
- let o = Ss(a.moduleConfig, {
4805
+ let o = {
4815
4806
  root: e.root,
4816
4807
  source: e.source,
4817
4808
  injectionDefaults: s,
@@ -4819,68 +4810,84 @@ async function Zs(e) {
4819
4810
  componentPath: n.join(r, a.moduleConfig.component),
4820
4811
  fallbackName: t,
4821
4812
  moduleManifestFile: a.moduleManifestFile
4822
- });
4823
- p.push(o);
4813
+ }, c = a.moduleConfig.name || t, l = u.get(c), d = hs(l ? {
4814
+ ...l,
4815
+ ...a.moduleConfig
4816
+ } : a.moduleConfig, o);
4817
+ ee.push(d), g.set(d.moduleId, a.moduleConfig);
4824
4818
  }
4825
- let m = Xs(c, p).filter((e) => e.enabled);
4826
- if (m.length === 0) throw new se();
4827
- m.sort((e, t) => e.moduleId.localeCompare(t.moduleId));
4828
- let ee = [...new Set(m.map((e) => e.framework))];
4819
+ let _ = ic(c, ee).filter((e) => e.enabled), v = vs(t.manifest, { root: e.root }), y = v.filter((e) => e.enabled);
4820
+ if (_.length === 0 && y.length === 0) throw new P();
4821
+ let b = Qs({
4822
+ manifest: t.manifest,
4823
+ manifestFile: t.manifestFile,
4824
+ manifestInjections: c,
4825
+ moduleInjections: ee,
4826
+ moduleInjectionConfigs: g,
4827
+ manifestListeners: v,
4828
+ enabledInjections: _,
4829
+ enabledListeners: y
4830
+ });
4831
+ _.sort((e, t) => e.moduleId.localeCompare(t.moduleId)), y.sort((e, t) => e.listenerId.localeCompare(t.listenerId));
4832
+ let x = [...new Set(_.map((e) => e.framework))];
4829
4833
  return {
4830
4834
  config: e,
4831
4835
  injectionDefaults: s,
4832
4836
  manifestFile: t.manifestFile,
4837
+ manifestBindings: b,
4833
4838
  manifestDependencies: [...r].sort(),
4834
4839
  moduleManifestDependencies: [...i].sort(),
4835
4840
  runtimeSetupFiles: [...a].sort(),
4836
4841
  runtimeDependencies: [...o].sort(),
4837
- injections: m,
4838
- frameworks: ee
4842
+ injections: _,
4843
+ listeners: y,
4844
+ frameworks: x
4839
4845
  };
4840
4846
  }
4841
4847
  //#endregion
4842
4848
  //#region packages/cli/src/shared/terminalColor.ts
4843
- var Qs = {
4849
+ var oc = {
4844
4850
  reset: "\x1B[0m",
4845
4851
  bold: "\x1B[1m",
4846
4852
  cyan: "\x1B[36m",
4853
+ deepPink: "\x1B[38;5;162m",
4847
4854
  green: "\x1B[32m",
4848
4855
  dim: "\x1B[2m"
4849
- }, $s = (e, ...t) => `${t.join("")}${e}${Qs.reset}`;
4856
+ }, sc = (e, ...t) => `${t.join("")}${e}${oc.reset}`;
4850
4857
  //#endregion
4851
4858
  //#region packages/cli/src/vitePlugin/hmrController.ts
4852
- function ec(e) {
4853
- let t = e.moduleGraph.getModuleById(z);
4859
+ function cc(e) {
4860
+ let t = e.moduleGraph.getModuleById(le);
4854
4861
  t && e.moduleGraph.invalidateModule(t);
4855
4862
  }
4856
- function tc(e, t) {
4863
+ function lc(e, t) {
4857
4864
  let n = t instanceof Error ? t : Error(String(t));
4858
4865
  e.hot.send({
4859
4866
  type: "error",
4860
4867
  err: {
4861
4868
  message: n.message,
4862
4869
  stack: n.stack ?? "",
4863
- id: z,
4870
+ id: le,
4864
4871
  frame: "",
4865
4872
  plugin: "vite-plugin-makoo",
4866
4873
  loc: void 0
4867
4874
  }
4868
4875
  });
4869
4876
  }
4870
- function nc(e) {
4877
+ function uc(e) {
4871
4878
  e.moduleGraph.getModuleById("\0virtual:makoo/entry") && e.hot.send({
4872
4879
  type: "update",
4873
4880
  updates: [{
4874
4881
  type: "js-update",
4875
- path: z,
4876
- acceptedPath: z,
4882
+ path: le,
4883
+ acceptedPath: le,
4877
4884
  timestamp: Date.now(),
4878
4885
  explicitImportRequired: !1,
4879
4886
  isWithinCircularImport: !1
4880
4887
  }]
4881
4888
  });
4882
4889
  }
4883
- function rc(e, t) {
4890
+ function dc(e, t) {
4884
4891
  e.hot.send({
4885
4892
  type: "custom",
4886
4893
  event: "makoo:structural-hmr",
@@ -4889,7 +4896,7 @@ function rc(e, t) {
4889
4896
  }
4890
4897
  //#endregion
4891
4898
  //#region packages/cli/src/generator/render/import/importAdapter.ts
4892
- function ic(e) {
4899
+ function fc(e) {
4893
4900
  let t = /* @__PURE__ */ new Set();
4894
4901
  return e.forEach((e) => {
4895
4902
  t.add(e.framework);
@@ -4906,23 +4913,23 @@ function ic(e) {
4906
4913
  }
4907
4914
  //#endregion
4908
4915
  //#region packages/cli/src/generator/render/import/importComp.ts
4909
- var ac = (e) => e.replace(/\\/g, "/"), oc = (e) => {
4916
+ var pc = (e) => e.replace(/\\/g, "/"), mc = (e) => {
4910
4917
  let t = e.replace(/[^a-zA-Z0-9_$]/g, "_");
4911
4918
  return /^[a-zA-Z_$]/.test(t) ? t : `_${t}`;
4912
- }, sc = () => {
4919
+ }, hc = () => {
4913
4920
  let e = /* @__PURE__ */ new Map();
4914
4921
  return (t) => {
4915
- let n = `Injection_${oc(t)}`, r = e.get(n) ?? 0;
4922
+ let n = `Injection_${mc(t)}`, r = e.get(n) ?? 0;
4916
4923
  return e.set(n, r + 1), r === 0 ? n : `${n}_${r}`;
4917
4924
  };
4918
4925
  };
4919
- function cc(e) {
4920
- let t = sc(), n = e.map((e) => {
4926
+ function gc(e) {
4927
+ let t = hc(), n = e.map((e) => {
4921
4928
  let n = t(e.moduleId);
4922
4929
  return {
4923
4930
  componentMeta: e,
4924
4931
  componentName: n,
4925
- code: `import ${n} from '${ac(e.componentPath)}';`
4932
+ code: `import ${n} from '${pc(e.componentPath)}';`
4926
4933
  };
4927
4934
  }), r = n.map((e) => ({
4928
4935
  code: e.code,
@@ -4936,34 +4943,147 @@ function cc(e) {
4936
4943
  }
4937
4944
  //#endregion
4938
4945
  //#region packages/cli/src/generator/render/import/importMakooRuntime.ts
4939
- function lc() {
4946
+ function _c() {
4940
4947
  return "import { createMakoo, inject, listen } from '@makoojs/core'; \n";
4941
4948
  }
4942
4949
  //#endregion
4950
+ //#region packages/cli/src/generator/render/import/importManifest.ts
4951
+ var vc = (e) => e.replace(/\\/g, "/"), yc = (e) => {
4952
+ let t = bc(e).map((e) => e.manifestFile);
4953
+ return [...new Set(t.map(vc))].sort();
4954
+ }, bc = (e) => [
4955
+ ...e.injectionDefaults ? [e.injectionDefaults.hooks] : [],
4956
+ ...Object.values(e.injections).flatMap((e) => [
4957
+ e.hooks,
4958
+ e.on?.callback,
4959
+ e.on?.activitySignal
4960
+ ].filter((e) => !!e)),
4961
+ ...Object.values(e.listeners).flatMap((e) => [e.callback, e.activitySignal].filter((e) => !!e))
4962
+ ], xc = (e) => e.map((e) => `[${JSON.stringify(e)}]`).join("");
4963
+ function Sc(e) {
4964
+ let t = new Map(yc(e).map((e, t) => [e, `Manifest_${t}`]));
4965
+ return {
4966
+ code: [...t].map(([e, t]) => `import ${t} from '${e}';`).join("\n"),
4967
+ renderReference(e) {
4968
+ let n = t.get(vc(e.manifestFile));
4969
+ if (!n) throw new A(e.manifestFile);
4970
+ return `${n}${xc(e.valuePath)}`;
4971
+ }
4972
+ };
4973
+ }
4974
+ //#endregion
4943
4975
  //#region packages/cli/src/generator/render/import/importRuntimeSetup.ts
4944
- var uc = (e) => e.replace(/\\/g, "/");
4945
- function dc(e) {
4946
- return e.map((e) => `import '${uc(e)}';`).join("\n");
4976
+ var Cc = (e) => e.replace(/\\/g, "/");
4977
+ function wc(e) {
4978
+ return e.map((e) => `import '${Cc(e)}';`).join("\n");
4947
4979
  }
4948
4980
  //#endregion
4949
4981
  //#region packages/cli/src/generator/render/util/value.ts
4950
- var fc = (e) => `{${Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => `${JSON.stringify(e)}:${pc(t)}`).join(",")}}`, pc = (e) => typeof e == "function" ? `(${e.toString()})` : Array.isArray(e) ? `[${e.map((e) => pc(e)).join(",")}]` : e && typeof e == "object" ? fc(e) : JSON.stringify(e);
4982
+ var Tc = (e) => `{${Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => `${JSON.stringify(e)}:${Ec(t)}`).join(",")}}`, Ec = (e) => {
4983
+ if (typeof e == "function") throw new M();
4984
+ return Array.isArray(e) ? `[${e.map((e) => Ec(e)).join(",")}]` : e && typeof e == "object" ? Tc(e) : JSON.stringify(e);
4985
+ };
4951
4986
  //#endregion
4952
4987
  //#region packages/cli/src/generator/render/init/initMakooRuntime.ts
4953
- function mc(e, t) {
4954
- let n = "makoo", { hooks: r, ...i } = t, a = e.map((e) => `create${e}Adapter()`);
4988
+ function Dc(e, t, n, r) {
4989
+ let i = "makoo", { hooks: a, ...o } = t, s = e.map((e) => `create${e}Adapter()`), c;
4990
+ if (a) {
4991
+ if (!n) throw new k("injectionDefaults", "hooks");
4992
+ c = r(n.hooks);
4993
+ }
4955
4994
  return {
4956
- code: [`${n} = createMakoo({\n ${[
4957
- `defaults: ${pc(i)}`,
4958
- a.length > 0 ? `adapters: [${a.join(", ")}]` : null,
4959
- r ? `hooks: ${pc(r)}` : null
4960
- ].filter(Boolean).join(",\n ")}\n});`, `const ${n}Tasks = [];`].join("\n"),
4961
- instanceName: n
4995
+ code: [`${i} = createMakoo({\n ${[
4996
+ `defaults: ${Ec(o)}`,
4997
+ s.length > 0 ? `adapters: [${s.join(", ")}]` : null,
4998
+ c ? `hooks: ${c}` : null
4999
+ ].filter(Boolean).join(",\n ")}\n});`, `const ${i}Tasks = [];`].join("\n"),
5000
+ instanceName: i
4962
5001
  };
4963
5002
  }
4964
5003
  //#endregion
4965
5004
  //#region packages/cli/src/generator/render/init/registerComp.ts
4966
- var hc = () => [
5005
+ function Oc(e, t, n, r) {
5006
+ return {
5007
+ code: t.map((t) => {
5008
+ let i = n[t.componentMeta.moduleId], a = kc(t, i, r), o = `${e}Tasks.push(inject({${[
5009
+ `"id":${JSON.stringify(t.componentMeta.moduleId)}`,
5010
+ `"injectAt":${JSON.stringify(t.componentMeta.injectAt)}`,
5011
+ `"artifact":${t.componentName}`,
5012
+ `"options":${a}`
5013
+ ].join(",")}}));`;
5014
+ return t.componentMeta.match ? [
5015
+ `if (matchUrl(location.href, ${Ec(t.componentMeta.match)})) {`,
5016
+ ` ${o}`,
5017
+ "}"
5018
+ ].join("\n") : o;
5019
+ }).join("\n"),
5020
+ instanceName: e
5021
+ };
5022
+ }
5023
+ function kc(e, t, n) {
5024
+ let { componentMeta: r } = e, i = {
5025
+ alive: r.alive,
5026
+ scope: r.scope,
5027
+ timeout: r.timeout
5028
+ }, a = Object.entries(i).filter(([, e]) => e !== void 0).map(([e, t]) => `${JSON.stringify(e)}:${Ec(t)}`);
5029
+ if (r.hooks) {
5030
+ if (!t?.hooks) throw new k("injection", `${r.moduleId}.hooks`);
5031
+ a.push(`"hooks":${n(t.hooks)}`);
5032
+ }
5033
+ if (r.on) {
5034
+ if (!t?.on) throw new k("injection", `${r.moduleId}.on`);
5035
+ let e = [
5036
+ `"listenAt":${JSON.stringify(r.on.listenAt)}`,
5037
+ `"type":${JSON.stringify(r.on.type)}`,
5038
+ `"callback":${n(t.on.callback)}`,
5039
+ r.on.capture === void 0 ? null : `"capture":${JSON.stringify(r.on.capture)}`,
5040
+ r.on.activitySignal ? Ac(r.moduleId, t, n) : null
5041
+ ].filter(Boolean).join(",");
5042
+ a.push(`"on":listen({${e}})`);
5043
+ }
5044
+ return `{${a.join(",")}}`;
5045
+ }
5046
+ function Ac(e, t, n) {
5047
+ let r = t.on?.activitySignal;
5048
+ if (!r) throw new k("injection", `${e}.on.activitySignal`);
5049
+ return `"activitySignal":${n(r)}`;
5050
+ }
5051
+ //#endregion
5052
+ //#region packages/cli/src/generator/render/init/registerListener.ts
5053
+ function jc(e, t, n, r) {
5054
+ return {
5055
+ code: t.map((t) => {
5056
+ let i = n[t.listenerId];
5057
+ if (!i) throw new k("listener", t.listenerId);
5058
+ let a = `${e}Tasks.push(listen({${[
5059
+ `"id":${JSON.stringify(t.listenerId)}`,
5060
+ `"listenAt":${JSON.stringify(t.listenAt)}`,
5061
+ `"type":${JSON.stringify(t.type)}`,
5062
+ `"callback":${r(i.callback)}`,
5063
+ t.capture === void 0 ? null : `"capture":${JSON.stringify(t.capture)}`,
5064
+ t.activitySignal ? Mc(t.listenerId, i.activitySignal, r) : null
5065
+ ].filter(Boolean).join(",")}}));`;
5066
+ return t.match ? [
5067
+ `if (matchUrl(location.href, ${Ec(t.match)})) {`,
5068
+ ` ${a}`,
5069
+ "}"
5070
+ ].join("\n") : a;
5071
+ }).join("\n"),
5072
+ instanceName: e
5073
+ };
5074
+ }
5075
+ function Mc(e, t, n) {
5076
+ if (!t) throw new k("listener", `${e}.activitySignal`);
5077
+ return `"activitySignal":${n(t)}`;
5078
+ }
5079
+ //#endregion
5080
+ //#region packages/cli/src/generator/render/run/renderMakooStart.ts
5081
+ function Nc(e) {
5082
+ return `${e}.start(${e}Tasks)`;
5083
+ }
5084
+ //#endregion
5085
+ //#region packages/cli/src/generator/render/util/match.ts
5086
+ var Pc = () => [
4967
5087
  "const matchUrl = (url, match) => {",
4968
5088
  " if (!match) return true;",
4969
5089
  " const matches = (patterns) => {",
@@ -4977,57 +5097,25 @@ var hc = () => [
4977
5097
  " return true;",
4978
5098
  "};"
4979
5099
  ].join("\n");
4980
- function gc(e, t) {
4981
- let n = t.some((e) => e.componentMeta.match), r = t.map((t) => {
4982
- let n = _c({
4983
- alive: t.componentMeta.alive,
4984
- scope: t.componentMeta.scope,
4985
- timeout: t.componentMeta.timeout,
4986
- hooks: t.componentMeta.hooks
4987
- }, t.componentMeta.on), r = `${e}Tasks.push(inject({${[
4988
- `"id":${JSON.stringify(t.componentMeta.moduleId)}`,
4989
- `"injectAt":${JSON.stringify(t.componentMeta.injectAt)}`,
4990
- `"artifact":${t.componentName}`,
4991
- `"options":${n}`
4992
- ].join(",")}}));`;
4993
- return t.componentMeta.match ? [
4994
- `if (matchUrl(location.href, ${pc(t.componentMeta.match)})) {`,
4995
- ` ${r}`,
4996
- "}"
4997
- ].join("\n") : r;
4998
- });
4999
- return {
5000
- code: [n ? hc() : null, r.join("\n")].filter(Boolean).join("\n"),
5001
- instanceName: e
5002
- };
5003
- }
5004
- function _c(e, t) {
5005
- let n = Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => `${JSON.stringify(e)}:${pc(t)}`);
5006
- if (t) {
5007
- let e = t.activitySignal ? `, { "activitySignal":${pc(t.activitySignal)} }` : "";
5008
- n.push(`"on":listen(${JSON.stringify(t.listenAt)}, ${JSON.stringify(t.type)}, ${pc(t.callback)}${e})`);
5009
- }
5010
- return `{${n.join(",")}}`;
5011
- }
5012
- //#endregion
5013
- //#region packages/cli/src/generator/render/run/renderMakooStart.ts
5014
- function vc(e) {
5015
- return `${e}.start(${e}Tasks)`;
5016
- }
5017
5100
  //#endregion
5018
5101
  //#region packages/cli/src/generator/generator.ts
5019
- function yc(e) {
5020
- let t = dc(e.config.runtime.setup), n = cc(e.injections), r = ic(e.injections), i = mc(e.frameworks, e.injectionDefaults), a = gc(i.instanceName, n.component), o = [
5102
+ function Fc(e) {
5103
+ let t = wc(e.config.runtime.setup), n = Sc(e.manifestBindings), r = gc(e.injections), i = fc(e.injections), a = Dc(e.frameworks, e.injectionDefaults, e.manifestBindings.injectionDefaults, n.renderReference), o = Oc(a.instanceName, r.component, e.manifestBindings.injections, n.renderReference), s = jc(a.instanceName, e.listeners, e.manifestBindings.listeners, n.renderReference), c = [
5021
5104
  t,
5022
5105
  n.code,
5023
- lc(),
5024
- r.code
5025
- ].filter(Boolean).join("\n"), s = [
5106
+ r.code,
5107
+ _c(),
5108
+ i.code
5109
+ ].filter(Boolean).join("\n"), l = [
5026
5110
  "try {",
5027
5111
  ...[
5028
- i.code,
5029
5112
  a.code,
5030
- vc(i.instanceName)
5113
+ [
5114
+ e.injections.some((e) => e.match) || e.listeners.some((e) => e.match) ? Pc() : null,
5115
+ o.code,
5116
+ s.code
5117
+ ].filter(Boolean).join("\n"),
5118
+ Nc(a.instanceName)
5031
5119
  ].join("\n").split("\n").map((e) => ` ${e}`),
5032
5120
  "} catch (e) {",
5033
5121
  " console.error('[makoo] Injection startup failed:', e);",
@@ -5036,17 +5124,17 @@ function yc(e) {
5036
5124
  ].join("\n");
5037
5125
  return {
5038
5126
  code: [
5039
- o,
5040
- `let ${i.instanceName};`,
5041
- s
5127
+ c,
5128
+ `let ${a.instanceName};`,
5129
+ l
5042
5130
  ].join("\n"),
5043
- instanceName: i.instanceName
5131
+ instanceName: a.instanceName
5044
5132
  };
5045
5133
  }
5046
5134
  //#endregion
5047
5135
  //#region packages/cli/src/vitePlugin/virtualModule.ts
5048
- function bc(e, t) {
5049
- let n = yc(e), r = n.code;
5136
+ function Ic(e, t) {
5137
+ let n = Fc(e), r = n.code;
5050
5138
  return t ? `${r} \n ${`
5051
5139
  if(import.meta.hot){
5052
5140
  import.meta.hot.on('makoo:structural-hmr', (payload)=>{
@@ -5067,7 +5155,7 @@ function bc(e, t) {
5067
5155
  }
5068
5156
  //#endregion
5069
5157
  //#region packages/cli/src/vitePlugin/watchList.ts
5070
- function xc(e) {
5158
+ function Lc(e) {
5071
5159
  let { config: t, injections: n, manifestDependencies: r, moduleManifestDependencies: i, runtimeSetupFiles: a, runtimeDependencies: o } = e, s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
5072
5160
  s.add(e.manifestFile);
5073
5161
  for (let e of r) s.add(e);
@@ -5083,25 +5171,25 @@ function xc(e) {
5083
5171
  dirs: [...c]
5084
5172
  };
5085
5173
  }
5086
- function Sc(e, t) {
5087
- return Cc(e, t) !== null;
5174
+ function Rc(e, t) {
5175
+ return zc(e, t) !== null;
5088
5176
  }
5089
- function Cc(e, t) {
5177
+ function zc(e, t) {
5090
5178
  let { config: r } = t;
5091
5179
  return e === t.manifestFile ? "top-level-manifest" : t.manifestDependencies.includes(e) ? "manifest-dependency" : t.moduleManifestDependencies.includes(e) ? "module-manifest-dependency" : t.runtimeDependencies.includes(e) ? "runtime-dependency" : t.runtimeSetupFiles.includes(e) ? "runtime-setup" : !n.relative(r.source.dir, e).startsWith("..") && n.basename(e, n.extname(e)) === "manifest" ? "module-manifest" : null;
5092
5180
  }
5093
5181
  //#endregion
5094
5182
  //#region packages/cli/src/vitePlugin/makooMonkey.ts
5095
- function wc(e) {
5183
+ function Bc(e) {
5096
5184
  let t = null, r = !1, i = null, a = null;
5097
5185
  async function o() {
5098
- return a ||= Zs(e).then((e) => (t = e, !0)).catch((e) => (i ? tc(i, e) : console.error("[makoo]", e), !1)).finally(() => {
5186
+ return a ||= ac(e).then((e) => (t = e, !0)).catch((e) => (i ? lc(i, e) : console.error("[makoo]", e), !1)).finally(() => {
5099
5187
  a = null;
5100
5188
  }), a;
5101
5189
  }
5102
5190
  function s(e) {
5103
5191
  if (!t) return;
5104
- let { files: n, dirs: r } = xc(t);
5192
+ let { files: n, dirs: r } = Lc(t);
5105
5193
  for (let t of n) e.watcher.add(t);
5106
5194
  for (let t of r) e.watcher.add(t);
5107
5195
  }
@@ -5116,37 +5204,37 @@ function wc(e) {
5116
5204
  await o();
5117
5205
  },
5118
5206
  resolveId(e) {
5119
- if (e === "virtual:makoo/entry") return z;
5120
- if (e === "makoo-entry.ts" || e === "./makoo-entry.ts" || e === "/makoo-entry.ts") return le;
5207
+ if (e === "virtual:makoo/entry") return le;
5208
+ if (e === "makoo-entry.ts" || e === "./makoo-entry.ts" || e === "/makoo-entry.ts") return ue;
5121
5209
  },
5122
5210
  load(e) {
5123
- if (!(e !== "\0virtual:makoo/entry" && e !== "\0makoo-entry.ts")) return t ? bc(t, r) : "export {}";
5211
+ if (!(e !== "\0virtual:makoo/entry" && e !== "\0makoo-entry.ts")) return t ? Ic(t, r) : "export {}";
5124
5212
  },
5125
5213
  async configureServer(r) {
5126
5214
  i = r, await o() && s(r);
5127
5215
  let a = async (i) => {
5128
- if (!t || !Sc(i, t)) return;
5129
- let a = Cc(i, t);
5216
+ if (!t || !Rc(i, t)) return;
5217
+ let a = zc(i, t);
5130
5218
  if (!a || !await o()) return;
5131
5219
  let c = n.relative(e.root, i).replace(/\\/g, "/");
5132
- r.config.logger.info(`[makoo] ${$s("structural HMR", Qs.green)} ${$s(a, Qs.cyan)}: ${$s(c, Qs.dim)}`), s(r), ec(r), rc(r, {
5220
+ r.config.logger.info(`${sc("[makoo]", oc.deepPink)} ${sc("(client)", oc.dim)} ${sc("hmr update", oc.green)} ${sc(`${a}: ${c}`, oc.dim)}`, { timestamp: !0 }), s(r), cc(r), dc(r, {
5133
5221
  file: i,
5134
5222
  reason: a,
5135
5223
  timestamp: Date.now()
5136
- }), nc(r);
5224
+ }), uc(r);
5137
5225
  };
5138
5226
  r.watcher.on("change", a), r.watcher.on("add", a), r.watcher.on("remove", a), r.watcher.on("unlink", a), r.watcher.on("addDir", a), r.watcher.on("unlinkDir", a);
5139
5227
  },
5140
5228
  handleHotUpdate({ file: e, modules: n }) {
5141
- if (t) return Sc(e, t) ? [] : n;
5229
+ if (t) return Rc(e, t) ? [] : n;
5142
5230
  }
5143
5231
  };
5144
5232
  }
5145
5233
  //#endregion
5146
5234
  //#region packages/cli/src/vitePlugin/makoo.ts
5147
- function Tc(t) {
5148
- let n = ws(t, t.root), r = Ts(n, t.monkey);
5149
- return [wc(n), ...e(r)];
5235
+ function Vc(t) {
5236
+ let n = ys(t, t.root), r = bs(n, t.monkey);
5237
+ return [Bc(n), ...e(r)];
5150
5238
  }
5151
5239
  //#endregion
5152
- export { t as cdn, E as defineInjection, re as defineInjections, Tc as makoo };
5240
+ export { t as cdn, Vc as makoo };