@oomol-lab/open-flow 0.1.0-beta.27 → 0.1.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/browser/{createResourceDialog-BwI2JmPE.js → createResourceDialog-C2ZLGPla.js} +1 -1
  2. package/dist/browser/flow-authoring-node.d.ts +3 -2
  3. package/dist/browser/flow-authoring.js +933 -915
  4. package/dist/browser/flow-change-schema.d.ts +4 -0
  5. package/dist/browser/flow-change.d.ts +8 -7
  6. package/dist/browser/flow-change.js +1067 -1050
  7. package/dist/browser/flow-notifications.d.ts +6 -2
  8. package/dist/browser/{flowChanges-DhEjA0n5.js → flowChanges-Z49mslMz.js} +1096 -1014
  9. package/dist/browser/{flowWorkspace-zcweMsLS.js → flowWorkspace-DCaVDqtY.js} +40105 -43746
  10. package/dist/browser/host-conformance.js +7 -1
  11. package/dist/browser/{inputValues-C5ExCCf0.js → inputValues-CLnpqFAf.js} +1 -1
  12. package/dist/browser/{markdownContent-SIlWuHve.js → markdownContent-Bon8uhjM.js} +23 -23
  13. package/dist/browser/{switch-CyZ96-UF.js → switch-DuB8aovT.js} +5035 -513
  14. package/dist/browser/ui.css +1 -1
  15. package/dist/browser/workbench.css +1 -1
  16. package/dist/browser/workbench.js +890 -727
  17. package/dist/browser/{workbenchSelect-BUu7CjUA.js → workbenchSelect-DX9IFmX-.js} +1187 -1156
  18. package/dist/common/authoringExamples.d.ts +27 -0
  19. package/dist/common/control-api-conformance.js +838 -820
  20. package/dist/common/control-api-errors.d.ts +8 -0
  21. package/dist/common/control-api.d.ts +7 -3
  22. package/dist/common/control-api.js +1423 -1368
  23. package/dist/common/control-requests.d.ts +13 -6
  24. package/dist/common/control-requests.js +2034 -1510
  25. package/dist/common/cron-trigger.d.ts +2 -1
  26. package/dist/common/cron-trigger.js +27 -24
  27. package/dist/common/draftOperations.d.ts +14 -0
  28. package/dist/common/engine-contract.d.ts +2 -2
  29. package/dist/common/flow-encoding.d.ts +3 -0
  30. package/dist/common/flow-encoding.js +1067 -968
  31. package/dist/common/flow-notifications.d.ts +6 -2
  32. package/dist/common/flow-schema.d.ts +1 -2
  33. package/dist/common/flow-semantics.d.ts +2 -1
  34. package/dist/common/flow-semantics.js +7935 -7812
  35. package/dist/common/flowInspection.d.ts +16 -0
  36. package/dist/common/integration-trigger.d.ts +2 -2
  37. package/dist/common/integration-trigger.js +8 -8
  38. package/dist/common/mcp.d.ts +2 -1
  39. package/dist/common/mcp.js +138 -105
  40. package/dist/common/poll-trigger.d.ts +3 -0
  41. package/dist/common/poll-trigger.js +26 -22
  42. package/dist/common/provider-triggers.js +2704 -2599
  43. package/dist/common/runtime-contract.js +3 -3
  44. package/dist/common/scheduler.d.ts +4 -3
  45. package/dist/common/scheduler.js +1855 -1725
  46. package/dist/common/trigger-contract.d.ts +5 -0
  47. package/dist/common/webhook-trigger.d.ts +3 -3
  48. package/dist/common/webhook-trigger.js +64 -18
  49. package/package.json +1 -1
@@ -24,7 +24,7 @@ function n(e) {
24
24
  return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
25
25
  }
26
26
  function r(e, t = "|") {
27
- return e.map((e) => ce(e)).join(t);
27
+ return e.map((e) => le(e)).join(t);
28
28
  }
29
29
  function i(e, t) {
30
30
  return typeof t == "bigint" ? t.toString() : t;
@@ -80,44 +80,44 @@ function f(...e) {
80
80
  function p(e) {
81
81
  return JSON.stringify(e);
82
82
  }
83
- function m(e) {
83
+ function ee(e) {
84
84
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
85
85
  }
86
- var ee = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
87
- function te(e) {
86
+ var te = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
87
+ function ne(e) {
88
88
  return typeof e == "object" && !!e && !Array.isArray(e);
89
89
  }
90
- var ne = /* @__PURE__*/ a(() => {
91
- if (v.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
90
+ var re = /* @__PURE__*/ a(() => {
91
+ if (_.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
92
92
  try {
93
93
  return Function(""), !0;
94
94
  } catch {
95
95
  return !1;
96
96
  }
97
97
  });
98
- function re(e) {
99
- if (te(e) === !1) return !1;
98
+ function ie(e) {
99
+ if (ne(e) === !1) return !1;
100
100
  let t = e.constructor;
101
101
  if (t === void 0 || typeof t != "function") return !0;
102
102
  let n = t.prototype;
103
- return te(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
103
+ return ne(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
104
104
  }
105
- function ie(e) {
106
- return re(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
105
+ function ae(e) {
106
+ return ie(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
107
107
  }
108
- var ae = /* @__PURE__*/ new Set([
108
+ var oe = /* @__PURE__*/ new Set([
109
109
  "string",
110
110
  "number",
111
111
  "symbol"
112
112
  ]);
113
- function oe(e) {
113
+ function se(e) {
114
114
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
115
115
  }
116
- function se(e, t, n) {
116
+ function ce(e, t, n) {
117
117
  let r = new e._zod.constr(t ?? e._zod.def);
118
118
  return (!t || n?.parent) && (r._zod.parent = e), r;
119
119
  }
120
- function h(e) {
120
+ function m(e) {
121
121
  let t = e;
122
122
  if (!t) return {};
123
123
  if (typeof t == "string") return { error: () => t };
@@ -130,23 +130,23 @@ function h(e) {
130
130
  error: () => t.error
131
131
  } : t;
132
132
  }
133
- function ce(e) {
133
+ function le(e) {
134
134
  return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
135
135
  }
136
- function le(e) {
136
+ function ue(e) {
137
137
  return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
138
138
  }
139
- var ue = {
139
+ var de = {
140
140
  safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
141
141
  int32: [-2147483648, 2147483647],
142
142
  uint32: [0, 4294967295],
143
143
  float32: [-34028234663852886e22, 34028234663852886e22],
144
144
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
145
145
  };
146
- function de(e, t) {
146
+ function fe(e, t) {
147
147
  let n = e._zod.def, r = n.checks;
148
148
  if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
149
- return se(e, f(e._zod.def, {
149
+ return ce(e, f(e._zod.def, {
150
150
  get shape() {
151
151
  let e = {};
152
152
  for (let r of Reflect.ownKeys(t)) {
@@ -158,10 +158,10 @@ function de(e, t) {
158
158
  checks: []
159
159
  }));
160
160
  }
161
- function fe(e, t) {
161
+ function pe(e, t) {
162
162
  let n = e._zod.def, r = n.checks;
163
163
  if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
164
- return se(e, f(e._zod.def, {
164
+ return ce(e, f(e._zod.def, {
165
165
  get shape() {
166
166
  let r = { ...e._zod.def.shape };
167
167
  for (let e of Reflect.ownKeys(t)) {
@@ -173,14 +173,14 @@ function fe(e, t) {
173
173
  checks: []
174
174
  }));
175
175
  }
176
- function pe(e, t) {
177
- if (!re(t)) throw Error("Invalid input to extend: expected a plain object");
176
+ function me(e, t) {
177
+ if (!ie(t)) throw Error("Invalid input to extend: expected a plain object");
178
178
  let n = e._zod.def.checks;
179
179
  if (n && n.length > 0) {
180
180
  let n = e._zod.def.shape;
181
181
  for (let e of Reflect.ownKeys(t)) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
182
182
  }
183
- return se(e, f(e._zod.def, { get shape() {
183
+ return ce(e, f(e._zod.def, { get shape() {
184
184
  let n = {
185
185
  ...e._zod.def.shape,
186
186
  ...t
@@ -188,9 +188,9 @@ function pe(e, t) {
188
188
  return d(this, "shape", n), n;
189
189
  } }));
190
190
  }
191
- function me(e, t) {
192
- if (!re(t)) throw Error("Invalid input to safeExtend: expected a plain object");
193
- return se(e, f(e._zod.def, { get shape() {
191
+ function he(e, t) {
192
+ if (!ie(t)) throw Error("Invalid input to safeExtend: expected a plain object");
193
+ return ce(e, f(e._zod.def, { get shape() {
194
194
  let n = {
195
195
  ...e._zod.def.shape,
196
196
  ...t
@@ -198,10 +198,10 @@ function me(e, t) {
198
198
  return d(this, "shape", n), n;
199
199
  } }));
200
200
  }
201
- function he(e, t) {
201
+ function ge(e, t) {
202
202
  if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
203
203
  if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
204
- return se(e, f(e._zod.def, {
204
+ return ce(e, f(e._zod.def, {
205
205
  get shape() {
206
206
  let n = {
207
207
  ...e._zod.def.shape,
@@ -215,10 +215,10 @@ function he(e, t) {
215
215
  checks: t._zod.def.checks ?? []
216
216
  }));
217
217
  }
218
- function ge(e, t, n, r = "partial") {
218
+ function _e(e, t, n, r = "partial") {
219
219
  let i = t._zod.def.checks;
220
220
  if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
221
- return se(t, f(t._zod.def, {
221
+ return ce(t, f(t._zod.def, {
222
222
  get shape() {
223
223
  let r = t._zod.def.shape, i = { ...r };
224
224
  if (n) for (let t of Reflect.ownKeys(n)) {
@@ -237,8 +237,8 @@ function ge(e, t, n, r = "partial") {
237
237
  checks: []
238
238
  }));
239
239
  }
240
- function _e(e, t, n) {
241
- return se(t, f(t._zod.def, { get shape() {
240
+ function ve(e, t, n) {
241
+ return ce(t, f(t._zod.def, { get shape() {
242
242
  let r = t._zod.def.shape, i = { ...r };
243
243
  if (n) for (let t of Reflect.ownKeys(n)) {
244
244
  if (!Object.prototype.hasOwnProperty.call(i, t)) throw Error(`Unrecognized key: "${String(t)}"`);
@@ -254,48 +254,48 @@ function _e(e, t, n) {
254
254
  return d(this, "shape", i), i;
255
255
  } }));
256
256
  }
257
- function ve(e, t = 0) {
257
+ function ye(e, t = 0) {
258
258
  if (e.aborted === !0) return !0;
259
259
  for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
260
260
  return !1;
261
261
  }
262
- function ye(e, t = 0) {
262
+ function be(e, t = 0) {
263
263
  if (e.aborted === !0) return !0;
264
264
  for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
265
265
  return !1;
266
266
  }
267
- function be(e, t) {
267
+ function xe(e, t) {
268
268
  return t.map((t) => {
269
269
  var n;
270
270
  return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
271
271
  });
272
272
  }
273
- function xe(e) {
273
+ function Se(e) {
274
274
  return typeof e == "string" ? e : e?.message;
275
275
  }
276
- function Se(e, t, n) {
276
+ function Ce(e, t, n) {
277
277
  var r;
278
278
  for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
279
279
  }
280
- function Ce(e, t, n) {
280
+ function we(e, t, n) {
281
281
  var r;
282
282
  let i = e.inst?._zod?.traits;
283
283
  i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
284
- let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : xe(e.inst?._zod.def?.error?.(e)) ?? xe(a?.(e)) ?? xe(t?.error?.(e)) ?? xe(n.customError?.(e)) ?? xe(n.localeError?.(e)) ?? "Invalid input", { inst: s, schema: c, continue: l, input: u, ...d } = e;
284
+ let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : Se(e.inst?._zod.def?.error?.(e)) ?? Se(a?.(e)) ?? Se(t?.error?.(e)) ?? Se(n.customError?.(e)) ?? Se(n.localeError?.(e)) ?? "Invalid input", { inst: s, schema: c, continue: l, input: u, ...d } = e;
285
285
  return d.path ??= [], d.message = o, t?.reportInput && (d.input = u), d;
286
286
  }
287
- var we = /[\uD800-\uDBFF]/;
288
- function Te(e) {
287
+ var Te = /[\uD800-\uDBFF]/;
288
+ function Ee(e) {
289
289
  let t = e.length;
290
- if (!we.test(e)) return t;
290
+ if (!Te.test(e)) return t;
291
291
  let n = t;
292
292
  for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
293
293
  return n;
294
294
  }
295
- function Ee(e) {
295
+ function De(e) {
296
296
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
297
297
  }
298
- function De(e) {
298
+ function Oe(e) {
299
299
  let t = typeof e;
300
300
  switch (t) {
301
301
  case "number": return Number.isNaN(e) ? "nan" : "number";
@@ -308,7 +308,7 @@ function De(e) {
308
308
  }
309
309
  return t;
310
310
  }
311
- function Oe(...e) {
311
+ function ke(...e) {
312
312
  let [t, n, r] = e;
313
313
  return typeof t == "string" ? {
314
314
  message: t,
@@ -317,16 +317,16 @@ function Oe(...e) {
317
317
  inst: r
318
318
  } : { ...t };
319
319
  }
320
- function ke(e, t) {
320
+ function Ae(e, t) {
321
321
  for (let n in t) {
322
322
  let r = Object.getOwnPropertyDescriptor(t, n);
323
323
  r.get ? Object.defineProperty(e, n, {
324
324
  ...r,
325
325
  enumerable: !1
326
- }) : Me(e, n, r.value);
326
+ }) : Ne(e, n, r.value);
327
327
  }
328
328
  }
329
- function Ae(e, t, n, r = !0) {
329
+ function je(e, t, n, r = !0) {
330
330
  return Object.defineProperty(e, t, {
331
331
  configurable: !0,
332
332
  writable: !0,
@@ -334,51 +334,51 @@ function Ae(e, t, n, r = !0) {
334
334
  value: n
335
335
  }), n;
336
336
  }
337
- function je(e, t, n) {
338
- return Ae(e, t, n, !1);
339
- }
340
337
  function Me(e, t, n) {
338
+ return je(e, t, n, !1);
339
+ }
340
+ function Ne(e, t, n) {
341
341
  Object.defineProperty(e, t, {
342
342
  configurable: !0,
343
343
  get() {
344
- return this == null ? n : Ae(this, t, n.bind(this));
344
+ return this == null ? n : je(this, t, n.bind(this));
345
345
  },
346
346
  set(e) {
347
- Ae(this, t, e);
347
+ je(this, t, e);
348
348
  }
349
349
  });
350
350
  }
351
- function Ne(e, t) {
351
+ function Pe(e, t) {
352
352
  let n = Object.getPrototypeOf(e);
353
353
  return t in n ? void 0 : n;
354
354
  }
355
- var Pe, Fe = !1, Ie = {
355
+ var Fe, Ie = !1, Le = {
356
356
  configurable: !0,
357
357
  get() {
358
- Fe = !0;
358
+ Ie = !0;
359
359
  }
360
360
  };
361
- function g(e, t, n) {
361
+ function h(e, t, n) {
362
362
  let r = Object.getPrototypeOf(e._zod);
363
- if (t in r && Pe !== e._zod) {
364
- Pe = void 0;
363
+ if (t in r && Fe !== e._zod) {
364
+ Fe = void 0;
365
365
  return;
366
366
  }
367
- Pe = e._zod, Object.defineProperty(r, t, {
367
+ Fe = e._zod, Object.defineProperty(r, t, {
368
368
  configurable: !0,
369
369
  get() {
370
- Object.defineProperty(this, t, Ie);
371
- let e = Fe;
372
- Fe = !1;
370
+ Object.defineProperty(this, t, Le);
371
+ let e = Ie;
372
+ Ie = !1;
373
373
  try {
374
374
  let r = n(this);
375
- return Fe ? delete this[t] : Object.defineProperty(this, t, {
375
+ return Ie ? delete this[t] : Object.defineProperty(this, t, {
376
376
  configurable: !0,
377
377
  writable: !0,
378
378
  value: r
379
- }), Fe ||= e, r;
379
+ }), Ie ||= e, r;
380
380
  } catch (n) {
381
- throw delete this[t], Fe ||= e, n;
381
+ throw delete this[t], Ie ||= e, n;
382
382
  }
383
383
  },
384
384
  set(e) {
@@ -390,8 +390,8 @@ function g(e, t, n) {
390
390
  }
391
391
  });
392
392
  }
393
- function Le(e, t, n, r) {
394
- let i = Ne(e, t);
393
+ function Re(e, t, n, r) {
394
+ let i = Pe(e, t);
395
395
  i && Object.defineProperty(i, t, {
396
396
  configurable: !0,
397
397
  get() {
@@ -413,26 +413,26 @@ function Le(e, t, n, r) {
413
413
  }
414
414
  });
415
415
  }
416
- var Re = "~constantCatch";
417
- function ze(e) {
416
+ var ze = "~constantCatch";
417
+ function Be(e) {
418
418
  let t = () => e;
419
- return t[Re] = !0, t;
419
+ return t[ze] = !0, t;
420
420
  }
421
421
  //#endregion
422
422
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/core.js
423
- var Be, Ve = {
423
+ var Ve, He = {
424
424
  value: void 0,
425
425
  enumerable: !1
426
- }, He = "captureStackTrace" in Error ? Error : null;
427
- function Ue(e) {
428
- let t = He;
426
+ }, Ue = "captureStackTrace" in Error ? Error : null;
427
+ function We(e) {
428
+ let t = Ue;
429
429
  if (t) {
430
430
  let n = t.stackTraceLimit;
431
431
  if (typeof n == "number") {
432
432
  try {
433
433
  t.stackTraceLimit = 0;
434
434
  } catch {
435
- return He = null, new e();
435
+ return Ue = null, new e();
436
436
  }
437
437
  try {
438
438
  return new e();
@@ -443,7 +443,7 @@ function Ue(e) {
443
443
  }
444
444
  return new e();
445
445
  }
446
- function _(e, t, n, r) {
446
+ function g(e, t, n, r) {
447
447
  let i = {};
448
448
  function a(e) {
449
449
  this.def = e, this.constr = d, this.traits = /* @__PURE__ */ new Set();
@@ -452,11 +452,11 @@ function _(e, t, n, r) {
452
452
  let o = n, s = o && /* @__PURE__ */ new WeakSet();
453
453
  function c(n, r) {
454
454
  if (!n._zod) {
455
- Ve.value = new a(r);
455
+ He.value = new a(r);
456
456
  try {
457
- Object.defineProperty(n, "_zod", Ve);
457
+ Object.defineProperty(n, "_zod", He);
458
458
  } finally {
459
- Ve.value = void 0;
459
+ He.value = void 0;
460
460
  }
461
461
  }
462
462
  if (n._zod.traits.has(e)) return;
@@ -464,7 +464,7 @@ function _(e, t, n, r) {
464
464
  let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
465
465
  for (; r && r !== t;) r = Object.getPrototypeOf(r);
466
466
  let i = r ?? e;
467
- s.has(i) || (s.add(i), ke(i, o));
467
+ s.has(i) || (s.add(i), Ae(i, o));
468
468
  }
469
469
  let i = d.prototype;
470
470
  for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
@@ -473,7 +473,7 @@ function _(e, t, n, r) {
473
473
  class u extends l {}
474
474
  Object.defineProperty(u, "name", { value: e });
475
475
  function d(e) {
476
- let t = r?.Parent ? Ue(u) : this;
476
+ let t = r?.Parent ? We(u) : this;
477
477
  c(t, e);
478
478
  let n = t._zod.deferred;
479
479
  if (n) {
@@ -485,19 +485,19 @@ function _(e, t, n, r) {
485
485
  }
486
486
  return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
487
487
  }
488
- var We = class extends Error {
488
+ var Ge = class extends Error {
489
489
  constructor() {
490
490
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
491
491
  }
492
- }, Ge = class extends Error {
492
+ }, Ke = class extends Error {
493
493
  constructor(e) {
494
494
  super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
495
495
  }
496
496
  };
497
- (Be = globalThis).__zod_globalConfig ?? (Be.__zod_globalConfig = {});
498
- var v = globalThis.__zod_globalConfig;
499
- function Ke(e) {
500
- return e && Object.assign(v, e), v;
497
+ (Ve = globalThis).__zod_globalConfig ?? (Ve.__zod_globalConfig = {});
498
+ var _ = globalThis.__zod_globalConfig;
499
+ function v(e) {
500
+ return e && Object.assign(_, e), _;
501
501
  }
502
502
  //#endregion
503
503
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/errors.js
@@ -541,7 +541,7 @@ var Ye = {
541
541
  });
542
542
  }
543
543
  }));
544
- }, et = _("$ZodError", $e), tt = _("$ZodError", $e, void 0, { Parent: Error });
544
+ }, et = g("$ZodError", $e), tt = g("$ZodError", $e, void 0, { Parent: Error });
545
545
  function nt(e, t, n) {
546
546
  return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
547
547
  value: n(),
@@ -605,10 +605,10 @@ var ot = (e) => {
605
605
  value: r,
606
606
  issues: []
607
607
  }, o);
608
- if (s instanceof Promise) throw new We();
608
+ if (s instanceof Promise) throw new Ge();
609
609
  if (s.issues.length) {
610
- let n = new ((a?.Err) ?? e)(s.issues.map((e) => Ce(e, o, Ke())));
611
- throw ee(n, a?.callee ?? t), n;
610
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => we(e, o, v())));
611
+ throw te(n, a?.callee ?? t), n;
612
612
  }
613
613
  return s.value;
614
614
  };
@@ -623,8 +623,8 @@ var ot = (e) => {
623
623
  issues: []
624
624
  }, o);
625
625
  if (s instanceof Promise && (s = await s), s.issues.length) {
626
- let n = new ((a?.Err) ?? e)(s.issues.map((e) => Ce(e, o, Ke())));
627
- throw ee(n, a?.callee ?? t), n;
626
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => we(e, o, v())));
627
+ throw te(n, a?.callee ?? t), n;
628
628
  }
629
629
  return s.value;
630
630
  };
@@ -637,10 +637,10 @@ var ot = (e) => {
637
637
  value: n,
638
638
  issues: []
639
639
  }, i);
640
- if (a instanceof Promise) throw new We();
640
+ if (a instanceof Promise) throw new Ge();
641
641
  return a.issues.length ? {
642
642
  success: !1,
643
- error: new (e ?? et)(a.issues.map((e) => Ce(e, i, Ke())))
643
+ error: new (e ?? et)(a.issues.map((e) => we(e, i, v())))
644
644
  } : {
645
645
  success: !0,
646
646
  data: a.value
@@ -655,7 +655,7 @@ var ot = (e) => {
655
655
  }, i);
656
656
  return a instanceof Promise && (a = await a), a.issues.length ? {
657
657
  success: !1,
658
- error: new e(a.issues.map((e) => Ce(e, i, Ke())))
658
+ error: new e(a.issues.map((e) => we(e, i, v())))
659
659
  } : {
660
660
  success: !0,
661
661
  data: a.value
@@ -728,7 +728,7 @@ function Kt(e) {
728
728
  var qt = (e) => {
729
729
  let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
730
730
  return RegExp(`^${t}$`);
731
- }, Jt = /^-?\d+$/, Yt = /^-?\d+(?:\.\d+)?$/, Xt = /^(?:true|false)$/i, Zt = /^null$/i, Qt = /^[^A-Z]*$/, $t = /^[^a-z]*$/, y = /*@__PURE__*/ _("$ZodCheck", (e, t) => {
731
+ }, Jt = /^-?\d+$/, Yt = /^-?\d+(?:\.\d+)?$/, Xt = /^(?:true|false)$/i, Zt = /^null$/i, Qt = /^[^A-Z]*$/, $t = /^[^a-z]*$/, y = /*@__PURE__*/ g("$ZodCheck", (e, t) => {
732
732
  var n;
733
733
  e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
734
734
  }), en = (e) => {
@@ -738,7 +738,7 @@ var qt = (e) => {
738
738
  number: "number",
739
739
  bigint: "bigint",
740
740
  object: "date"
741
- }, nn = /*@__PURE__*/ _("$ZodCheckLessThan", (e, t) => {
741
+ }, nn = /*@__PURE__*/ g("$ZodCheckLessThan", (e, t) => {
742
742
  y.init(e, t);
743
743
  let n = tn[typeof t.value];
744
744
  e._zod.onattach.push((e) => {
@@ -755,7 +755,7 @@ var qt = (e) => {
755
755
  continue: !t.abort
756
756
  });
757
757
  };
758
- }), rn = /*@__PURE__*/ _("$ZodCheckGreaterThan", (e, t) => {
758
+ }), rn = /*@__PURE__*/ g("$ZodCheckGreaterThan", (e, t) => {
759
759
  y.init(e, t);
760
760
  let n = tn[typeof t.value];
761
761
  e._zod.onattach.push((e) => {
@@ -772,7 +772,7 @@ var qt = (e) => {
772
772
  continue: !t.abort
773
773
  });
774
774
  };
775
- }), an = /*@__PURE__*/ _("$ZodCheckMultipleOf", (e, t) => {
775
+ }), an = /*@__PURE__*/ g("$ZodCheckMultipleOf", (e, t) => {
776
776
  y.init(e, t), e._zod.onattach.push((e) => {
777
777
  var n;
778
778
  (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
@@ -787,9 +787,9 @@ var qt = (e) => {
787
787
  continue: !t.abort
788
788
  });
789
789
  };
790
- }), on = /*@__PURE__*/ _("$ZodCheckNumberFormat", (e, t) => {
790
+ }), on = /*@__PURE__*/ g("$ZodCheckNumberFormat", (e, t) => {
791
791
  y.init(e, t), t.format = t.format || "float64";
792
- let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = ue[t.format];
792
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = de[t.format];
793
793
  e._zod.onattach.push((e) => {
794
794
  let r = e._zod.bag;
795
795
  r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Jt);
@@ -848,15 +848,15 @@ var qt = (e) => {
848
848
  continue: !t.abort
849
849
  });
850
850
  };
851
- }), sn = /*@__PURE__*/ _("$ZodCheckMaxLength", (e, t) => {
851
+ }), sn = /*@__PURE__*/ g("$ZodCheckMaxLength", (e, t) => {
852
852
  var n;
853
853
  y.init(e, t), (n = e._zod.def).when ?? (n.when = en), e._zod.onattach.push((e) => {
854
854
  let n = e._zod.bag.maximum ?? Infinity;
855
855
  t.maximum < n && (e._zod.bag.maximum = t.maximum);
856
856
  }), e._zod.check = (n) => {
857
857
  let r = n.value, i = r.length;
858
- if ((typeof r == "string" && i > t.maximum ? Te(r) : i) <= t.maximum) return;
859
- let a = Ee(r);
858
+ if ((typeof r == "string" && i > t.maximum ? Ee(r) : i) <= t.maximum) return;
859
+ let a = De(r);
860
860
  n.issues.push({
861
861
  origin: a,
862
862
  code: "too_big",
@@ -867,15 +867,15 @@ var qt = (e) => {
867
867
  continue: !t.abort
868
868
  });
869
869
  };
870
- }), cn = /*@__PURE__*/ _("$ZodCheckMinLength", (e, t) => {
870
+ }), cn = /*@__PURE__*/ g("$ZodCheckMinLength", (e, t) => {
871
871
  var n;
872
872
  y.init(e, t), (n = e._zod.def).when ?? (n.when = en), e._zod.onattach.push((e) => {
873
873
  let n = e._zod.bag.minimum ?? -Infinity;
874
874
  t.minimum > n && (e._zod.bag.minimum = t.minimum);
875
875
  }), e._zod.check = (n) => {
876
876
  let r = n.value, i = r.length;
877
- if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? Te(r) : i) >= t.minimum) return;
878
- let a = Ee(r);
877
+ if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? Ee(r) : i) >= t.minimum) return;
878
+ let a = De(r);
879
879
  n.issues.push({
880
880
  origin: a,
881
881
  code: "too_small",
@@ -886,15 +886,15 @@ var qt = (e) => {
886
886
  continue: !t.abort
887
887
  });
888
888
  };
889
- }), ln = /*@__PURE__*/ _("$ZodCheckLengthEquals", (e, t) => {
889
+ }), ln = /*@__PURE__*/ g("$ZodCheckLengthEquals", (e, t) => {
890
890
  var n;
891
891
  y.init(e, t), (n = e._zod.def).when ?? (n.when = en), e._zod.onattach.push((e) => {
892
892
  let n = e._zod.bag;
893
893
  n.minimum = t.length, n.maximum = t.length, n.length = t.length;
894
894
  }), e._zod.check = (n) => {
895
- let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? Te(r) : i;
895
+ let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? Ee(r) : i;
896
896
  if (a === t.length) return;
897
- let o = Ee(r), s = a > t.length;
897
+ let o = De(r), s = a > t.length;
898
898
  n.issues.push({
899
899
  origin: o,
900
900
  ...s ? {
@@ -911,7 +911,7 @@ var qt = (e) => {
911
911
  continue: !t.abort
912
912
  });
913
913
  };
914
- }), un = /*@__PURE__*/ _("$ZodCheckStringFormat", (e, t) => {
914
+ }), un = /*@__PURE__*/ g("$ZodCheckStringFormat", (e, t) => {
915
915
  var n, r;
916
916
  y.init(e, t), e._zod.onattach.push((e) => {
917
917
  let n = e._zod.bag;
@@ -927,7 +927,7 @@ var qt = (e) => {
927
927
  continue: !t.abort
928
928
  });
929
929
  }) : (r = e._zod).check ?? (r.check = () => {});
930
- }), dn = /*@__PURE__*/ _("$ZodCheckRegex", (e, t) => {
930
+ }), dn = /*@__PURE__*/ g("$ZodCheckRegex", (e, t) => {
931
931
  un.init(e, t), e._zod.check = (n) => {
932
932
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
933
933
  origin: "string",
@@ -939,13 +939,13 @@ var qt = (e) => {
939
939
  continue: !t.abort
940
940
  });
941
941
  };
942
- }), fn = /*@__PURE__*/ _("$ZodCheckLowerCase", (e, t) => {
942
+ }), fn = /*@__PURE__*/ g("$ZodCheckLowerCase", (e, t) => {
943
943
  t.pattern ??= Qt, un.init(e, t);
944
- }), pn = /*@__PURE__*/ _("$ZodCheckUpperCase", (e, t) => {
944
+ }), pn = /*@__PURE__*/ g("$ZodCheckUpperCase", (e, t) => {
945
945
  t.pattern ??= $t, un.init(e, t);
946
- }), mn = /*@__PURE__*/ _("$ZodCheckIncludes", (e, t) => {
946
+ }), mn = /*@__PURE__*/ g("$ZodCheckIncludes", (e, t) => {
947
947
  y.init(e, t);
948
- let n = oe(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
948
+ let n = se(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
949
949
  t.pattern = r, e._zod.onattach.push((e) => {
950
950
  let t = e._zod.bag;
951
951
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
@@ -960,9 +960,9 @@ var qt = (e) => {
960
960
  continue: !t.abort
961
961
  });
962
962
  };
963
- }), hn = /*@__PURE__*/ _("$ZodCheckStartsWith", (e, t) => {
963
+ }), hn = /*@__PURE__*/ g("$ZodCheckStartsWith", (e, t) => {
964
964
  y.init(e, t);
965
- let n = RegExp(`^${oe(t.prefix)}.*`);
965
+ let n = RegExp(`^${se(t.prefix)}.*`);
966
966
  t.pattern ??= n, e._zod.onattach.push((e) => {
967
967
  let t = e._zod.bag;
968
968
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
@@ -977,9 +977,9 @@ var qt = (e) => {
977
977
  continue: !t.abort
978
978
  });
979
979
  };
980
- }), gn = /*@__PURE__*/ _("$ZodCheckEndsWith", (e, t) => {
980
+ }), gn = /*@__PURE__*/ g("$ZodCheckEndsWith", (e, t) => {
981
981
  y.init(e, t);
982
- let n = RegExp(`.*${oe(t.suffix)}$`);
982
+ let n = RegExp(`.*${se(t.suffix)}$`);
983
983
  t.pattern ??= n, e._zod.onattach.push((e) => {
984
984
  let t = e._zod.bag;
985
985
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
@@ -994,7 +994,7 @@ var qt = (e) => {
994
994
  continue: !t.abort
995
995
  });
996
996
  };
997
- }), _n = /*@__PURE__*/ _("$ZodCheckOverwrite", (e, t) => {
997
+ }), _n = /*@__PURE__*/ g("$ZodCheckOverwrite", (e, t) => {
998
998
  y.init(e, t), e._zod.check = (e) => {
999
999
  e.value = t.tx(e.value);
1000
1000
  };
@@ -1021,7 +1021,7 @@ var qt = (e) => {
1021
1021
  major: 4,
1022
1022
  minor: 5,
1023
1023
  patch: 4
1024
- }, b = /*@__PURE__*/ _("$ZodType", (e, t) => {
1024
+ }, b = /*@__PURE__*/ g("$ZodType", (e, t) => {
1025
1025
  var n;
1026
1026
  e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = yn;
1027
1027
  let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
@@ -1032,27 +1032,27 @@ var qt = (e) => {
1032
1032
  else {
1033
1033
  let t = (t, n, r) => {
1034
1034
  if (t.memo) return t;
1035
- let i = ve(t), a;
1035
+ let i = ye(t), a;
1036
1036
  for (let o of n) {
1037
1037
  if (o._zod.def.when) {
1038
- if (ye(t) || !o._zod.def.when(t)) continue;
1038
+ if (be(t) || !o._zod.def.when(t)) continue;
1039
1039
  } else if (i) continue;
1040
1040
  let n = t.issues.length, s = o._zod.check(t);
1041
- if (s instanceof Promise && r?.async === !1) throw new We();
1041
+ if (s instanceof Promise && r?.async === !1) throw new Ge();
1042
1042
  if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
1043
- await s, t.issues.length !== n && (Se(t.issues, n, e), i ||= ve(t, n));
1043
+ await s, t.issues.length !== n && (Ce(t.issues, n, e), i ||= ye(t, n));
1044
1044
  });
1045
1045
  else {
1046
1046
  if (t.issues.length === n) continue;
1047
- Se(t.issues, n, e), i ||= ve(t, n);
1047
+ Ce(t.issues, n, e), i ||= ye(t, n);
1048
1048
  }
1049
1049
  }
1050
1050
  return a ? a.then(() => t) : t;
1051
1051
  }, n = (n, r, a) => {
1052
- if (ve(n)) return n.aborted = !0, n;
1052
+ if (ye(n)) return n.aborted = !0, n;
1053
1053
  let o = t(r, i, a);
1054
1054
  if (o instanceof Promise) {
1055
- if (a.async === !1) throw new We();
1055
+ if (a.async === !1) throw new Ge();
1056
1056
  return o.then((t) => e._zod.parse(t, a));
1057
1057
  }
1058
1058
  return e._zod.parse(o, a);
@@ -1071,7 +1071,7 @@ var qt = (e) => {
1071
1071
  }
1072
1072
  let o = e._zod.parse(r, a);
1073
1073
  if (o instanceof Promise) {
1074
- if (a.async === !1) throw new We();
1074
+ if (a.async === !1) throw new Ge();
1075
1075
  return o.then((e) => t(e, i, a));
1076
1076
  }
1077
1077
  return t(o, i, a);
@@ -1079,10 +1079,10 @@ var qt = (e) => {
1079
1079
  }
1080
1080
  }, {
1081
1081
  get "~standard"() {
1082
- return je(this, "~standard", xn(this));
1082
+ return Me(this, "~standard", xn(this));
1083
1083
  },
1084
1084
  set "~standard"(e) {
1085
- Ae(this, "~standard", e);
1085
+ je(this, "~standard", e);
1086
1086
  }
1087
1087
  }), bn = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
1088
1088
  function xn(e) {
@@ -1098,7 +1098,7 @@ function xn(e) {
1098
1098
  version: 1
1099
1099
  };
1100
1100
  }
1101
- var Sn = /*@__PURE__*/ _("$ZodString", (e, t) => {
1101
+ var Sn = /*@__PURE__*/ g("$ZodString", (e, t) => {
1102
1102
  b.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? qt(e._zod.bag), e._zod.parse = (n, r) => {
1103
1103
  if (t.coerce) try {
1104
1104
  n.value = String(n.value);
@@ -1110,11 +1110,11 @@ var Sn = /*@__PURE__*/ _("$ZodString", (e, t) => {
1110
1110
  inst: e
1111
1111
  }), n;
1112
1112
  };
1113
- }), x = /*@__PURE__*/ _("$ZodStringFormat", (e, t) => {
1113
+ }), x = /*@__PURE__*/ g("$ZodStringFormat", (e, t) => {
1114
1114
  un.init(e, t), Sn.init(e, t);
1115
- }), Cn = /*@__PURE__*/ _("$ZodGUID", (e, t) => {
1115
+ }), Cn = /*@__PURE__*/ g("$ZodGUID", (e, t) => {
1116
1116
  t.pattern ??= Ot, x.init(e, t);
1117
- }), wn = /*@__PURE__*/ _("$ZodUUID", (e, t) => {
1117
+ }), wn = /*@__PURE__*/ g("$ZodUUID", (e, t) => {
1118
1118
  if (t.version) {
1119
1119
  let e = {
1120
1120
  v1: 1,
@@ -1130,7 +1130,7 @@ var Sn = /*@__PURE__*/ _("$ZodString", (e, t) => {
1130
1130
  t.pattern ??= kt(e);
1131
1131
  } else t.pattern ??= kt();
1132
1132
  x.init(e, t);
1133
- }), Tn = /*@__PURE__*/ _("$ZodEmail", (e, t) => {
1133
+ }), Tn = /*@__PURE__*/ g("$ZodEmail", (e, t) => {
1134
1134
  t.pattern ??= At, x.init(e, t);
1135
1135
  });
1136
1136
  function En(e, t) {
@@ -1151,7 +1151,7 @@ function kn(e, t) {
1151
1151
  function An(e, t) {
1152
1152
  return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
1153
1153
  }
1154
- var jn = /*@__PURE__*/ _("$ZodURL", (e, t) => {
1154
+ var jn = /*@__PURE__*/ g("$ZodURL", (e, t) => {
1155
1155
  x.init(e, t), e._zod.check = (n) => {
1156
1156
  try {
1157
1157
  let r = n.value.trim(), i = En(r, t);
@@ -1204,32 +1204,32 @@ var jn = /*@__PURE__*/ _("$ZodURL", (e, t) => {
1204
1204
  });
1205
1205
  }
1206
1206
  };
1207
- }), Mn = /*@__PURE__*/ _("$ZodEmoji", (e, t) => {
1207
+ }), Mn = /*@__PURE__*/ g("$ZodEmoji", (e, t) => {
1208
1208
  t.pattern ??= Mt(), x.init(e, t);
1209
- }), Nn = /*@__PURE__*/ _("$ZodNanoID", (e, t) => {
1209
+ }), Nn = /*@__PURE__*/ g("$ZodNanoID", (e, t) => {
1210
1210
  if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
1211
1211
  t.pattern ??= t.length === void 0 ? Tt : Et(t.length), x.init(e, t);
1212
- }), Pn = /*@__PURE__*/ _("$ZodCUID", (e, t) => {
1212
+ }), Pn = /*@__PURE__*/ g("$ZodCUID", (e, t) => {
1213
1213
  t.pattern ??= bt, x.init(e, t);
1214
- }), Fn = /*@__PURE__*/ _("$ZodCUID2", (e, t) => {
1214
+ }), Fn = /*@__PURE__*/ g("$ZodCUID2", (e, t) => {
1215
1215
  t.pattern ??= xt, x.init(e, t);
1216
- }), In = /*@__PURE__*/ _("$ZodULID", (e, t) => {
1216
+ }), In = /*@__PURE__*/ g("$ZodULID", (e, t) => {
1217
1217
  t.pattern ??= St, x.init(e, t);
1218
- }), Ln = /*@__PURE__*/ _("$ZodXID", (e, t) => {
1218
+ }), Ln = /*@__PURE__*/ g("$ZodXID", (e, t) => {
1219
1219
  t.pattern ??= Ct, x.init(e, t);
1220
- }), Rn = /*@__PURE__*/ _("$ZodKSUID", (e, t) => {
1220
+ }), Rn = /*@__PURE__*/ g("$ZodKSUID", (e, t) => {
1221
1221
  t.pattern ??= wt, x.init(e, t);
1222
- }), zn = /*@__PURE__*/ _("$ZodISODateTime", (e, t) => {
1222
+ }), zn = /*@__PURE__*/ g("$ZodISODateTime", (e, t) => {
1223
1223
  t.pattern ??= Kt(t), x.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
1224
1224
  e._zod.bag.laxFormat = !0;
1225
1225
  }));
1226
- }), Bn = /*@__PURE__*/ _("$ZodISODate", (e, t) => {
1226
+ }), Bn = /*@__PURE__*/ g("$ZodISODate", (e, t) => {
1227
1227
  t.pattern ??= Ut, x.init(e, t);
1228
- }), Vn = /*@__PURE__*/ _("$ZodISOTime", (e, t) => {
1228
+ }), Vn = /*@__PURE__*/ g("$ZodISOTime", (e, t) => {
1229
1229
  t.pattern ??= Gt(t), x.init(e, t);
1230
- }), Hn = /*@__PURE__*/ _("$ZodISODuration", (e, t) => {
1230
+ }), Hn = /*@__PURE__*/ g("$ZodISODuration", (e, t) => {
1231
1231
  t.pattern ??= Dt, x.init(e, t);
1232
- }), Un = /*@__PURE__*/ _("$ZodIPv4", (e, t) => {
1232
+ }), Un = /*@__PURE__*/ g("$ZodIPv4", (e, t) => {
1233
1233
  t.pattern ??= Nt, x.init(e, t), e._zod.bag.format = "ipv4";
1234
1234
  }), Wn = /^[0-9a-fA-F:.]+$/;
1235
1235
  function Gn(e) {
@@ -1240,7 +1240,7 @@ function Gn(e) {
1240
1240
  return !1;
1241
1241
  }
1242
1242
  }
1243
- var Kn = /*@__PURE__*/ _("$ZodIPv6", (e, t) => {
1243
+ var Kn = /*@__PURE__*/ g("$ZodIPv6", (e, t) => {
1244
1244
  t.pattern ??= Pt, x.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1245
1245
  Gn(n.value) || n.issues.push({
1246
1246
  code: "invalid_format",
@@ -1250,7 +1250,7 @@ var Kn = /*@__PURE__*/ _("$ZodIPv6", (e, t) => {
1250
1250
  continue: !t.abort
1251
1251
  });
1252
1252
  };
1253
- }), qn = /*@__PURE__*/ _("$ZodCIDRv4", (e, t) => {
1253
+ }), qn = /*@__PURE__*/ g("$ZodCIDRv4", (e, t) => {
1254
1254
  t.pattern ??= Ft, x.init(e, t);
1255
1255
  });
1256
1256
  function Jn(e) {
@@ -1261,7 +1261,7 @@ function Jn(e) {
1261
1261
  let i = Number(r);
1262
1262
  return `${i}` !== r || i < 0 || i > 128 ? !1 : Gn(n);
1263
1263
  }
1264
- var Yn = /*@__PURE__*/ _("$ZodCIDRv6", (e, t) => {
1264
+ var Yn = /*@__PURE__*/ g("$ZodCIDRv6", (e, t) => {
1265
1265
  t.pattern ??= It, x.init(e, t), e._zod.check = (n) => {
1266
1266
  Jn(n.value) || n.issues.push({
1267
1267
  code: "invalid_format",
@@ -1281,7 +1281,7 @@ function Xn(e) {
1281
1281
  return !1;
1282
1282
  }
1283
1283
  }
1284
- var Zn = /*@__PURE__*/ _("$ZodBase64", (e, t) => {
1284
+ var Zn = /*@__PURE__*/ g("$ZodBase64", (e, t) => {
1285
1285
  t.pattern ??= Lt, x.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1286
1286
  Xn(n.value) || n.issues.push({
1287
1287
  code: "invalid_format",
@@ -1297,7 +1297,7 @@ function Qn(e) {
1297
1297
  let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
1298
1298
  return Xn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
1299
1299
  }
1300
- var $n = /*@__PURE__*/ _("$ZodBase64URL", (e, t) => {
1300
+ var $n = /*@__PURE__*/ g("$ZodBase64URL", (e, t) => {
1301
1301
  t.pattern ??= Rt, x.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1302
1302
  Qn(n.value) || n.issues.push({
1303
1303
  code: "invalid_format",
@@ -1307,7 +1307,7 @@ var $n = /*@__PURE__*/ _("$ZodBase64URL", (e, t) => {
1307
1307
  continue: !t.abort
1308
1308
  });
1309
1309
  };
1310
- }), er = /*@__PURE__*/ _("$ZodE164", (e, t) => {
1310
+ }), er = /*@__PURE__*/ g("$ZodE164", (e, t) => {
1311
1311
  t.pattern ??= Bt, x.init(e, t);
1312
1312
  });
1313
1313
  function tr(e, t = null) {
@@ -1322,7 +1322,7 @@ function tr(e, t = null) {
1322
1322
  return !1;
1323
1323
  }
1324
1324
  }
1325
- var nr = /*@__PURE__*/ _("$ZodJWT", (e, t) => {
1325
+ var nr = /*@__PURE__*/ g("$ZodJWT", (e, t) => {
1326
1326
  x.init(e, t), e._zod.check = (n) => {
1327
1327
  tr(n.value, t.alg) || n.issues.push({
1328
1328
  code: "invalid_format",
@@ -1332,7 +1332,7 @@ var nr = /*@__PURE__*/ _("$ZodJWT", (e, t) => {
1332
1332
  continue: !t.abort
1333
1333
  });
1334
1334
  };
1335
- }), rr = /*@__PURE__*/ _("$ZodNumber", (e, t) => {
1335
+ }), rr = /*@__PURE__*/ g("$ZodNumber", (e, t) => {
1336
1336
  b.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Yt, e._zod.parse = (n, r) => {
1337
1337
  if (t.coerce) try {
1338
1338
  n.value = Number(n.value);
@@ -1348,9 +1348,9 @@ var nr = /*@__PURE__*/ _("$ZodJWT", (e, t) => {
1348
1348
  ...a ? { received: a } : {}
1349
1349
  }), n;
1350
1350
  };
1351
- }), ir = /*@__PURE__*/ _("$ZodNumberFormat", (e, t) => {
1351
+ }), ir = /*@__PURE__*/ g("$ZodNumberFormat", (e, t) => {
1352
1352
  on.init(e, t), rr.init(e, t);
1353
- }), ar = /*@__PURE__*/ _("$ZodBoolean", (e, t) => {
1353
+ }), ar = /*@__PURE__*/ g("$ZodBoolean", (e, t) => {
1354
1354
  b.init(e, t), e._zod.pattern = Xt, e._zod.parse = (n, r) => {
1355
1355
  if (t.coerce) try {
1356
1356
  n.value = !!n.value;
@@ -1363,7 +1363,7 @@ var nr = /*@__PURE__*/ _("$ZodJWT", (e, t) => {
1363
1363
  inst: e
1364
1364
  }), n;
1365
1365
  };
1366
- }), or = /*@__PURE__*/ _("$ZodNull", (e, t) => {
1366
+ }), or = /*@__PURE__*/ g("$ZodNull", (e, t) => {
1367
1367
  b.init(e, t), e._zod.pattern = Zt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
1368
1368
  let r = t.value;
1369
1369
  return r === null || t.issues.push({
@@ -1373,9 +1373,9 @@ var nr = /*@__PURE__*/ _("$ZodJWT", (e, t) => {
1373
1373
  inst: e
1374
1374
  }), t;
1375
1375
  };
1376
- }), sr = /*@__PURE__*/ _("$ZodUnknown", (e, t) => {
1376
+ }), sr = /*@__PURE__*/ g("$ZodUnknown", (e, t) => {
1377
1377
  b.init(e, t), e._zod.parse = (e) => e;
1378
- }), cr = /*@__PURE__*/ _("$ZodNever", (e, t) => {
1378
+ }), cr = /*@__PURE__*/ g("$ZodNever", (e, t) => {
1379
1379
  b.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1380
1380
  expected: "never",
1381
1381
  code: "invalid_type",
@@ -1384,11 +1384,11 @@ var nr = /*@__PURE__*/ _("$ZodJWT", (e, t) => {
1384
1384
  }), t);
1385
1385
  });
1386
1386
  function lr(e, t, n) {
1387
- e.issues.length && t.issues.push(...be(n, e.issues)), t.value[n] = e.value;
1387
+ e.issues.length && t.issues.push(...xe(n, e.issues)), t.value[n] = e.value;
1388
1388
  }
1389
- var ur = /*@__PURE__*/ _("$ZodArray", (e, t) => {
1389
+ var ur = /*@__PURE__*/ g("$ZodArray", (e, t) => {
1390
1390
  b.init(e, t);
1391
- let n = v.memoizer;
1391
+ let n = _.memoizer;
1392
1392
  n?.attach(e), e._zod.parse = (r, i) => {
1393
1393
  let a = r.value;
1394
1394
  if (!Array.isArray(a)) return r.issues.push({
@@ -1414,7 +1414,7 @@ function dr(e, t, n, r, i, a) {
1414
1414
  if (!(!o && s && i === "optional")) {
1415
1415
  if (e.issues.length) {
1416
1416
  if (i !== void 0 && s && !o) return;
1417
- t.issues.push(...be(n, e.issues));
1417
+ t.issues.push(...xe(n, e.issues));
1418
1418
  }
1419
1419
  if (!o && i === void 0) {
1420
1420
  e.issues.length || t.issues.push({
@@ -1432,7 +1432,7 @@ var fr = [];
1432
1432
  function pr(e) {
1433
1433
  let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : fr, i = r.length ? [...t, ...r] : t;
1434
1434
  for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
1435
- let a = le(e.shape);
1435
+ let a = ue(e.shape);
1436
1436
  return {
1437
1437
  ...e,
1438
1438
  allKeys: i,
@@ -1468,7 +1468,7 @@ function mr(e, t, n, r, i, a) {
1468
1468
  continue: !0
1469
1469
  }), e.length ? Promise.all(e).then(() => n) : n;
1470
1470
  }
1471
- var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t) => {
1471
+ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ g("$ZodObject", (e, t) => {
1472
1472
  if (b.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1473
1473
  let e = t.shape;
1474
1474
  hr.set(t, e), Object.defineProperty(t, "shape", { get: () => {
@@ -1477,7 +1477,7 @@ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t
1477
1477
  } });
1478
1478
  }
1479
1479
  let n = a(() => pr(t));
1480
- g(e, "propValues", (e) => {
1480
+ h(e, "propValues", (e) => {
1481
1481
  let t = e.def.shape, n = {};
1482
1482
  for (let e in t) {
1483
1483
  let r = t[e]._zod;
@@ -1489,7 +1489,7 @@ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t
1489
1489
  }
1490
1490
  return n;
1491
1491
  });
1492
- let r = te, i = t.catchall, o, s = v.memoizer;
1492
+ let r = ne, i = t.catchall, o, s = _.memoizer;
1493
1493
  s?.attach(e), e._zod.parse = (t, a) => {
1494
1494
  o ??= n.value;
1495
1495
  let c = t.value;
@@ -1511,9 +1511,9 @@ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t
1511
1511
  }
1512
1512
  return i ? mr(l, c, t, a, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
1513
1513
  };
1514
- }), _r = /*@__PURE__*/ _("$ZodObjectJIT", (e, t) => {
1514
+ }), _r = /*@__PURE__*/ g("$ZodObjectJIT", (e, t) => {
1515
1515
  gr.init(e, t);
1516
- let n = e._zod.parse, r = a(() => pr(t)), i = v.memoizer, o = (t) => {
1516
+ let n = e._zod.parse, r = a(() => pr(t)), i = _.memoizer, o = (t) => {
1517
1517
  let n = r.value, a = n.symbolKeys, o = new vn(["payload", "ctx"], {
1518
1518
  shape: t,
1519
1519
  inst: e,
@@ -1531,8 +1531,8 @@ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t
1531
1531
  o.write(i ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
1532
1532
  for (let e of n.allKeys) {
1533
1533
  if (e === "__proto__") continue;
1534
- let n = l[e], r = typeof e == "symbol" ? `syms[${a.indexOf(e)}]` : p(e), i = `${r} in input`, u = t[e], d = u?._zod?.optin, f = d !== void 0, m = u?._zod?.optout === "optional";
1535
- if (o.write(`const ${n} = ${s(r)};`), f && m) {
1534
+ let n = l[e], r = typeof e == "symbol" ? `syms[${a.indexOf(e)}]` : p(e), i = `${r} in input`, u = t[e], d = u?._zod?.optin, f = d !== void 0, ee = u?._zod?.optout === "optional";
1535
+ if (o.write(`const ${n} = ${s(r)};`), f && ee) {
1536
1536
  let e = d === "optional" ? `${n}_present` : `${n}.value !== undefined || ${n}_present`;
1537
1537
  o.write(`
1538
1538
  const ${n}_present = ${i};
@@ -1578,7 +1578,7 @@ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t
1578
1578
  `);
1579
1579
  }
1580
1580
  return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
1581
- }, s, c = te, l = !v.jitless, u = l && ne.value, d = t.catchall, f;
1581
+ }, s, c = ne, l = !_.jitless, u = l && re.value, d = t.catchall, f;
1582
1582
  e._zod.parse = (i, a) => {
1583
1583
  f ??= r.value;
1584
1584
  let p = i.value;
@@ -1592,18 +1592,18 @@ var hr = /* @__PURE__ */ new WeakMap(), gr = /*@__PURE__*/ _("$ZodObject", (e, t
1592
1592
  });
1593
1593
  function vr(e, t, n, r) {
1594
1594
  for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1595
- let i = e.filter((e) => !ve(e));
1595
+ let i = e.filter((e) => !ye(e));
1596
1596
  return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1597
1597
  code: "invalid_union",
1598
1598
  input: t.value,
1599
1599
  inst: n,
1600
- errors: e.map((e) => e.issues.map((e) => Ce(e, r, Ke())))
1600
+ errors: e.map((e) => e.issues.map((e) => we(e, r, v())))
1601
1601
  }), t);
1602
1602
  }
1603
- var yr = /*@__PURE__*/ _("$ZodUnion", (e, t) => {
1604
- b.init(e, t), g(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), g(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), g(e, "values", (e) => {
1603
+ var yr = /*@__PURE__*/ g("$ZodUnion", (e, t) => {
1604
+ b.init(e, t), h(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), h(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), h(e, "values", (e) => {
1605
1605
  if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
1606
- }), g(e, "pattern", (e) => {
1606
+ }), h(e, "pattern", (e) => {
1607
1607
  if (e.def.options.every((e) => e._zod.pattern)) {
1608
1608
  let t = e.def.options.map((e) => e._zod.pattern);
1609
1609
  return RegExp(`^(${t.map((e) => s(e.source)).join("|")})$`);
@@ -1626,10 +1626,10 @@ var yr = /*@__PURE__*/ _("$ZodUnion", (e, t) => {
1626
1626
  }
1627
1627
  return a ? Promise.all(o).then((t) => vr(t, r, e, i)) : vr(o, r, e, i);
1628
1628
  };
1629
- }), br = /*@__PURE__*/ _("$ZodDiscriminatedUnion", (e, t) => {
1629
+ }), br = /*@__PURE__*/ g("$ZodDiscriminatedUnion", (e, t) => {
1630
1630
  t.inclusive = !1, yr.init(e, t);
1631
1631
  let n = e._zod.parse;
1632
- g(e, "propValues", (e) => {
1632
+ h(e, "propValues", (e) => {
1633
1633
  let t = {};
1634
1634
  for (let n of e.def.options) {
1635
1635
  let r = n._zod.propValues;
@@ -1658,7 +1658,7 @@ var yr = /*@__PURE__*/ _("$ZodUnion", (e, t) => {
1658
1658
  });
1659
1659
  e._zod.parse = (i, a) => {
1660
1660
  let o = i.value;
1661
- if (!te(o)) return i.issues.push({
1661
+ if (!ne(o)) return i.issues.push({
1662
1662
  code: "invalid_type",
1663
1663
  expected: "object",
1664
1664
  input: o,
@@ -1676,7 +1676,7 @@ var yr = /*@__PURE__*/ _("$ZodUnion", (e, t) => {
1676
1676
  inst: e
1677
1677
  }), i);
1678
1678
  };
1679
- }), xr = /*@__PURE__*/ _("$ZodIntersection", (e, t) => {
1679
+ }), xr = /*@__PURE__*/ g("$ZodIntersection", (e, t) => {
1680
1680
  b.init(e, t), e._zod.parse = (e, n) => {
1681
1681
  let r = e.value, i = t.left._zod.run({
1682
1682
  value: r,
@@ -1693,7 +1693,7 @@ function Sr(e, t) {
1693
1693
  valid: !0,
1694
1694
  data: e
1695
1695
  };
1696
- if (re(e) && re(t)) {
1696
+ if (ie(e) && ie(t)) {
1697
1697
  let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1698
1698
  ...e,
1699
1699
  ...t
@@ -1761,14 +1761,14 @@ function Cr(e, t, n) {
1761
1761
  }
1762
1762
  let c = Sr(t.value, n.value);
1763
1763
  if (!c.valid) {
1764
- if (ve(e)) return e;
1764
+ if (ye(e)) return e;
1765
1765
  throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
1766
1766
  }
1767
1767
  return e.value = c.data, e;
1768
1768
  }
1769
- var wr = /*@__PURE__*/ _("$ZodTuple", (e, t) => {
1769
+ var wr = /*@__PURE__*/ g("$ZodTuple", (e, t) => {
1770
1770
  b.init(e, t);
1771
- let n = t.items, r = v.memoizer;
1771
+ let n = t.items, r = _.memoizer;
1772
1772
  r?.attach(e), e._zod.parse = (i, a) => {
1773
1773
  let o = i.value;
1774
1774
  if (!Array.isArray(o)) return i.issues.push({
@@ -1826,7 +1826,7 @@ function Tr(e, t) {
1826
1826
  return 0;
1827
1827
  }
1828
1828
  function Er(e, t, n) {
1829
- e.issues.length && t.issues.push(...be(n, e.issues)), t.value[n] = e.value;
1829
+ e.issues.length && t.issues.push(...xe(n, e.issues)), t.value[n] = e.value;
1830
1830
  }
1831
1831
  function Dr(e, t, n, r, i) {
1832
1832
  for (let a = 0; a < n.length; a++) {
@@ -1840,19 +1840,19 @@ function Dr(e, t, n, r, i) {
1840
1840
  t.value.length = a;
1841
1841
  break;
1842
1842
  }
1843
- t.issues.push(...be(a, o.issues));
1843
+ t.issues.push(...xe(a, o.issues));
1844
1844
  }
1845
1845
  t.value[a] = o.value;
1846
1846
  }
1847
1847
  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;
1848
1848
  return t;
1849
1849
  }
1850
- var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1850
+ var Or = /*@__PURE__*/ g("$ZodRecord", (e, t) => {
1851
1851
  b.init(e, t);
1852
- let n = v.memoizer;
1852
+ let n = _.memoizer;
1853
1853
  n?.attach(e), e._zod.parse = (r, i) => {
1854
1854
  let a = r.value;
1855
- if (!re(a)) return r.issues.push({
1855
+ if (!ie(a)) return r.issues.push({
1856
1856
  expected: "record",
1857
1857
  code: "invalid_type",
1858
1858
  input: a,
@@ -1873,7 +1873,7 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1873
1873
  r.issues.push({
1874
1874
  code: "invalid_key",
1875
1875
  origin: "record",
1876
- issues: s.issues.map((e) => Ce(e, i, Ke())),
1876
+ issues: s.issues.map((e) => we(e, i, v())),
1877
1877
  input: n,
1878
1878
  path: [n],
1879
1879
  inst: e
@@ -1887,8 +1887,8 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1887
1887
  issues: []
1888
1888
  }, i);
1889
1889
  u instanceof Promise ? o.push(u.then((e) => {
1890
- e.issues.length && r.issues.push(...be(n, e.issues)), r.value[l] = e.value;
1891
- })) : (u.issues.length && r.issues.push(...be(n, u.issues)), r.value[l] = u.value);
1890
+ e.issues.length && r.issues.push(...xe(n, e.issues)), r.value[l] = e.value;
1891
+ })) : (u.issues.length && r.issues.push(...xe(n, u.issues)), r.value[l] = u.value);
1892
1892
  }
1893
1893
  let l;
1894
1894
  for (let e in a) if (!c.has(e)) {
@@ -1926,7 +1926,7 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1926
1926
  t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
1927
1927
  code: "invalid_key",
1928
1928
  origin: "record",
1929
- issues: l.issues.map((e) => Ce(e, i, Ke())),
1929
+ issues: l.issues.map((e) => we(e, i, v())),
1930
1930
  input: n,
1931
1931
  path: [n],
1932
1932
  inst: e
@@ -1940,8 +1940,8 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1940
1940
  issues: []
1941
1941
  }, i);
1942
1942
  d instanceof Promise ? o.push(d.then((e) => {
1943
- e.issues.length && r.issues.push(...be(n, e.issues)), r.value[u] = e.value;
1944
- })) : (d.issues.length && r.issues.push(...be(n, d.issues)), r.value[u] = d.value);
1943
+ e.issues.length && r.issues.push(...xe(n, e.issues)), r.value[u] = e.value;
1944
+ })) : (d.issues.length && r.issues.push(...xe(n, d.issues)), r.value[u] = d.value);
1945
1945
  }
1946
1946
  c && c.length > 0 && r.issues.push({
1947
1947
  code: "unrecognized_keys",
@@ -1953,12 +1953,12 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1953
1953
  }
1954
1954
  return o.length ? Promise.all(o).then(() => r) : r;
1955
1955
  };
1956
- }), kr = /*@__PURE__*/ _("$ZodEnum", (e, t) => {
1956
+ }), kr = /*@__PURE__*/ g("$ZodEnum", (e, t) => {
1957
1957
  b.init(e, t);
1958
1958
  let r = n(t.entries), i = new Set(r);
1959
1959
  e._zod.values = i;
1960
- let a = r.filter((e) => ae.has(typeof e));
1961
- e._zod.pattern = RegExp(a.length ? `^(${a.map((e) => oe(e.toString())).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (t, n) => {
1960
+ let a = r.filter((e) => oe.has(typeof e));
1961
+ e._zod.pattern = RegExp(a.length ? `^(${a.map((e) => se(e.toString())).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (t, n) => {
1962
1962
  let a = t.value;
1963
1963
  return i.has(a) || t.issues.push({
1964
1964
  code: "invalid_value",
@@ -1967,10 +1967,10 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1967
1967
  inst: e
1968
1968
  }), t;
1969
1969
  };
1970
- }), Ar = /*@__PURE__*/ _("$ZodLiteral", (e, t) => {
1970
+ }), Ar = /*@__PURE__*/ g("$ZodLiteral", (e, t) => {
1971
1971
  b.init(e, t);
1972
1972
  let n = new Set(t.values);
1973
- e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? oe(e) : e ? oe(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
1973
+ e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? se(e) : e ? se(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
1974
1974
  let a = r.value;
1975
1975
  return n.has(a) || r.issues.push({
1976
1976
  code: "invalid_value",
@@ -1979,23 +1979,23 @@ var Or = /*@__PURE__*/ _("$ZodRecord", (e, t) => {
1979
1979
  inst: e
1980
1980
  }), r;
1981
1981
  };
1982
- }), jr = /*@__PURE__*/ _("$ZodTransform", (e, t) => {
1983
- b.init(e, t), e._zod.optin = "optional", v.memoizer?.guard(e), e._zod.parse = (n, r) => {
1984
- if (r.direction === "backward") throw new Ge(e.constructor.name);
1982
+ }), jr = /*@__PURE__*/ g("$ZodTransform", (e, t) => {
1983
+ b.init(e, t), e._zod.optin = "optional", _.memoizer?.guard(e), e._zod.parse = (n, r) => {
1984
+ if (r.direction === "backward") throw new Ke(e.constructor.name);
1985
1985
  let i = t.transform(n.value, n);
1986
1986
  if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
1987
- if (i instanceof Promise) throw new We();
1987
+ if (i instanceof Promise) throw new Ge();
1988
1988
  return n.value = i, n;
1989
1989
  };
1990
1990
  });
1991
1991
  function Mr(e, t) {
1992
1992
  return e.value = t.issues.length ? void 0 : t.value, e;
1993
1993
  }
1994
- var Nr = /*@__PURE__*/ _("$ZodOptional", (e, t) => {
1995
- b.init(e, t), g(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", g(e, "values", (e) => {
1994
+ var Nr = /*@__PURE__*/ g("$ZodOptional", (e, t) => {
1995
+ b.init(e, t), h(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", h(e, "values", (e) => {
1996
1996
  let t = e.def.innerType._zod.values;
1997
1997
  return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
1998
- }), g(e, "pattern", (e) => {
1998
+ }), h(e, "pattern", (e) => {
1999
1999
  let t = e.def.innerType._zod.pattern;
2000
2000
  return t ? RegExp(`^(${s(t.source)})?$`) : void 0;
2001
2001
  }), e._zod.parse = (e, n) => {
@@ -2009,15 +2009,15 @@ var Nr = /*@__PURE__*/ _("$ZodOptional", (e, t) => {
2009
2009
  }
2010
2010
  return t.innerType._zod.run(e, n);
2011
2011
  };
2012
- }), Pr = /*@__PURE__*/ _("$ZodExactOptional", (e, t) => {
2013
- Nr.init(e, t), g(e, "values", (e) => e.def.innerType._zod.values), g(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
2014
- }), Fr = /*@__PURE__*/ _("$ZodNullable", (e, t) => {
2015
- b.init(e, t), g(e, "optin", (e) => e.def.innerType._zod.optin), g(e, "optout", (e) => e.def.innerType._zod.optout), g(e, "pattern", (e) => {
2012
+ }), Pr = /*@__PURE__*/ g("$ZodExactOptional", (e, t) => {
2013
+ Nr.init(e, t), h(e, "values", (e) => e.def.innerType._zod.values), h(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
2014
+ }), Fr = /*@__PURE__*/ g("$ZodNullable", (e, t) => {
2015
+ b.init(e, t), h(e, "optin", (e) => e.def.innerType._zod.optin), h(e, "optout", (e) => e.def.innerType._zod.optout), h(e, "pattern", (e) => {
2016
2016
  let t = e.def.innerType._zod.pattern;
2017
2017
  return t ? RegExp(`^(${s(t.source)}|null)$`) : void 0;
2018
- }), g(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
2019
- }), Ir = /*@__PURE__*/ _("$ZodDefault", (e, t) => {
2020
- b.init(e, t), e._zod.optin = "defaulted", g(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2018
+ }), h(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
2019
+ }), Ir = /*@__PURE__*/ g("$ZodDefault", (e, t) => {
2020
+ b.init(e, t), e._zod.optin = "defaulted", h(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2021
2021
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2022
2022
  if (e.value === void 0) return e.value = t.defaultValue, e;
2023
2023
  let r = t.innerType._zod.run(e, n);
@@ -2027,10 +2027,10 @@ var Nr = /*@__PURE__*/ _("$ZodOptional", (e, t) => {
2027
2027
  function Lr(e, t) {
2028
2028
  return e.value === void 0 && (e.value = t.defaultValue), e;
2029
2029
  }
2030
- var Rr = /*@__PURE__*/ _("$ZodPrefault", (e, t) => {
2031
- b.init(e, t), e._zod.optin = "defaulted", g(e, "values", (e) => e.def.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));
2032
- }), zr = /*@__PURE__*/ _("$ZodNonOptional", (e, t) => {
2033
- b.init(e, t), g(e, "values", (e) => {
2030
+ var Rr = /*@__PURE__*/ g("$ZodPrefault", (e, t) => {
2031
+ b.init(e, t), e._zod.optin = "defaulted", h(e, "values", (e) => e.def.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));
2032
+ }), zr = /*@__PURE__*/ g("$ZodNonOptional", (e, t) => {
2033
+ b.init(e, t), h(e, "values", (e) => {
2034
2034
  let t = e.def.innerType._zod.values;
2035
2035
  return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
2036
2036
  }), e._zod.parse = (n, r) => {
@@ -2050,12 +2050,12 @@ function Vr(e, t, n, r) {
2050
2050
  return t.issues.length ? (e.value = n.catchValue({
2051
2051
  ...t,
2052
2052
  value: e.value,
2053
- error: { issues: t.issues.map((e) => Ce(e, r, Ke())) },
2053
+ error: { issues: t.issues.map((e) => we(e, r, v())) },
2054
2054
  input: e.value
2055
2055
  }), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
2056
2056
  }
2057
- var Hr = /*@__PURE__*/ _("$ZodCatch", (e, t) => {
2058
- b.init(e, t), g(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), g(e, "optout", (e) => e.def.innerType._zod.optout), g(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2057
+ var Hr = /*@__PURE__*/ g("$ZodCatch", (e, t) => {
2058
+ b.init(e, t), h(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), h(e, "optout", (e) => e.def.innerType._zod.optout), h(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2059
2059
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2060
2060
  let r = t.innerType._zod.run({
2061
2061
  value: e.value,
@@ -2063,8 +2063,8 @@ var Hr = /*@__PURE__*/ _("$ZodCatch", (e, t) => {
2063
2063
  }, n);
2064
2064
  return r instanceof Promise ? r.then((r) => Vr(e, r, t, n)) : Vr(e, r, t, n);
2065
2065
  };
2066
- }), Ur = /*@__PURE__*/ _("$ZodPipe", (e, t) => {
2067
- b.init(e, t), g(e, "values", (e) => e.def.in._zod.values), g(e, "optin", (e) => e.def.in._zod.optin), g(e, "optout", (e) => e.def.out._zod.optout), g(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
2066
+ }), Ur = /*@__PURE__*/ g("$ZodPipe", (e, t) => {
2067
+ b.init(e, t), h(e, "values", (e) => e.def.in._zod.values), h(e, "optin", (e) => e.def.in._zod.optin), h(e, "optout", (e) => e.def.out._zod.optout), h(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
2068
2068
  if (n.direction === "backward") {
2069
2069
  let r = t.out._zod.run(e, n);
2070
2070
  return r instanceof Promise ? r.then((e) => Wr(e, t.in, n)) : Wr(r, t.in, n);
@@ -2079,8 +2079,8 @@ function Wr(e, t, n) {
2079
2079
  issues: e.issues
2080
2080
  }, n);
2081
2081
  }
2082
- var Gr = /*@__PURE__*/ _("$ZodReadonly", (e, t) => {
2083
- b.init(e, t), g(e, "propValues", (e) => e.def.innerType._zod.propValues), g(e, "values", (e) => e.def.innerType._zod.values), g(e, "optin", (e) => e.def.innerType?._zod?.optin), g(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
2082
+ var Gr = /*@__PURE__*/ g("$ZodReadonly", (e, t) => {
2083
+ b.init(e, t), h(e, "propValues", (e) => e.def.innerType._zod.propValues), h(e, "values", (e) => e.def.innerType._zod.values), h(e, "optin", (e) => e.def.innerType?._zod?.optin), h(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
2084
2084
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2085
2085
  let r = t.innerType._zod.run(e, n);
2086
2086
  return r instanceof Promise ? r.then(Kr) : Kr(r);
@@ -2089,12 +2089,12 @@ var Gr = /*@__PURE__*/ _("$ZodReadonly", (e, t) => {
2089
2089
  function Kr(e) {
2090
2090
  return e.memo || (e.value = Object.freeze(e.value)), e;
2091
2091
  }
2092
- var qr = /*@__PURE__*/ _("$ZodLazy", (e, t) => {
2092
+ var qr = /*@__PURE__*/ g("$ZodLazy", (e, t) => {
2093
2093
  b.init(e, t), u(e._zod, "innerType", () => {
2094
2094
  let e = t;
2095
2095
  return e._cachedInner ||= t.getter(), e._cachedInner;
2096
- }), g(e, "pattern", (e) => e.innerType?._zod?.pattern), g(e, "propValues", (e) => e.innerType?._zod?.propValues), g(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), g(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
2097
- }), Jr = /*@__PURE__*/ _("$ZodCustom", (e, t) => {
2096
+ }), h(e, "pattern", (e) => e.innerType?._zod?.pattern), h(e, "propValues", (e) => e.innerType?._zod?.propValues), h(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), h(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
2097
+ }), Jr = /*@__PURE__*/ g("$ZodCustom", (e, t) => {
2098
2098
  y.init(e, t), b.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
2099
2099
  let r = n.value, i = t.fn(r);
2100
2100
  if (i instanceof Promise) return i.then((t) => Yr(t, n, r, e));
@@ -2110,7 +2110,7 @@ function Yr(e, t, n, r) {
2110
2110
  path: [...r._zod.def.path ?? []],
2111
2111
  continue: !r._zod.def.abort
2112
2112
  };
2113
- r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Oe(e));
2113
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(ke(e));
2114
2114
  }
2115
2115
  }
2116
2116
  //#endregion
@@ -2257,8 +2257,8 @@ var ri, ii = [], ai = {
2257
2257
  ri = u;
2258
2258
  let f = ii.length, p = t(o, s);
2259
2259
  ri = void 0;
2260
- let m = ii.length > f ? ii.pop() : void 0;
2261
- return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? $r(e.issues) : Qr), e)) : (m && (m.issues = p.issues.length ? $r(p.issues) : Qr), p);
2260
+ let ee = ii.length > f ? ii.pop() : void 0;
2261
+ return p instanceof Promise ? p.then((e) => (ee && (ee.issues = e.issues.length ? $r(e.issues) : Qr), e)) : (ee && (ee.issues = p.issues.length ? $r(p.issues) : Qr), p);
2262
2262
  };
2263
2263
  e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
2264
2264
  });
@@ -2336,8 +2336,8 @@ var ci = () => {
2336
2336
  }
2337
2337
  return (e) => {
2338
2338
  switch (e.code) {
2339
- case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(De(e.input), e.input)}`;
2340
- case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ce(e.values[0])}` : `Invalid option: expected one of ${r(e.values, "|")}`;
2339
+ case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(Oe(e.input), e.input)}`;
2340
+ case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${le(e.values[0])}` : `Invalid option: expected one of ${r(e.values, "|")}`;
2341
2341
  case "too_big": {
2342
2342
  let n = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = t(e.origin);
2343
2343
  return r ? `Too big: expected ${e.origin ?? "value"} to have ${n}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${n}${e.maximum.toString()}`;
@@ -2407,7 +2407,7 @@ var pi = globalThis.__zod_globalRegistry;
2407
2407
  function mi(e, t) {
2408
2408
  return new e({
2409
2409
  type: "string",
2410
- ...h(t)
2410
+ ...m(t)
2411
2411
  });
2412
2412
  }
2413
2413
  // @__NO_SIDE_EFFECTS__
@@ -2417,7 +2417,7 @@ function hi(e, t) {
2417
2417
  format: "email",
2418
2418
  check: "string_format",
2419
2419
  abort: !1,
2420
- ...h(t)
2420
+ ...m(t)
2421
2421
  });
2422
2422
  }
2423
2423
  // @__NO_SIDE_EFFECTS__
@@ -2427,7 +2427,7 @@ function gi(e, t) {
2427
2427
  format: "guid",
2428
2428
  check: "string_format",
2429
2429
  abort: !1,
2430
- ...h(t)
2430
+ ...m(t)
2431
2431
  });
2432
2432
  }
2433
2433
  // @__NO_SIDE_EFFECTS__
@@ -2437,7 +2437,7 @@ function _i(e, t) {
2437
2437
  format: "uuid",
2438
2438
  check: "string_format",
2439
2439
  abort: !1,
2440
- ...h(t)
2440
+ ...m(t)
2441
2441
  });
2442
2442
  }
2443
2443
  // @__NO_SIDE_EFFECTS__
@@ -2448,7 +2448,7 @@ function vi(e, t) {
2448
2448
  check: "string_format",
2449
2449
  abort: !1,
2450
2450
  version: "v4",
2451
- ...h(t)
2451
+ ...m(t)
2452
2452
  });
2453
2453
  }
2454
2454
  // @__NO_SIDE_EFFECTS__
@@ -2459,7 +2459,7 @@ function yi(e, t) {
2459
2459
  check: "string_format",
2460
2460
  abort: !1,
2461
2461
  version: "v6",
2462
- ...h(t)
2462
+ ...m(t)
2463
2463
  });
2464
2464
  }
2465
2465
  // @__NO_SIDE_EFFECTS__
@@ -2470,7 +2470,7 @@ function bi(e, t) {
2470
2470
  check: "string_format",
2471
2471
  abort: !1,
2472
2472
  version: "v7",
2473
- ...h(t)
2473
+ ...m(t)
2474
2474
  });
2475
2475
  }
2476
2476
  // @__NO_SIDE_EFFECTS__
@@ -2480,7 +2480,7 @@ function xi(e, t) {
2480
2480
  format: "url",
2481
2481
  check: "string_format",
2482
2482
  abort: !1,
2483
- ...h(t)
2483
+ ...m(t)
2484
2484
  });
2485
2485
  }
2486
2486
  // @__NO_SIDE_EFFECTS__
@@ -2490,7 +2490,7 @@ function Si(e, t) {
2490
2490
  format: "emoji",
2491
2491
  check: "string_format",
2492
2492
  abort: !1,
2493
- ...h(t)
2493
+ ...m(t)
2494
2494
  });
2495
2495
  }
2496
2496
  // @__NO_SIDE_EFFECTS__
@@ -2500,7 +2500,7 @@ function Ci(e, t) {
2500
2500
  format: "nanoid",
2501
2501
  check: "string_format",
2502
2502
  abort: !1,
2503
- ...h(t)
2503
+ ...m(t)
2504
2504
  });
2505
2505
  }
2506
2506
  // @__NO_SIDE_EFFECTS__
@@ -2510,7 +2510,7 @@ function wi(e, t) {
2510
2510
  format: "cuid",
2511
2511
  check: "string_format",
2512
2512
  abort: !1,
2513
- ...h(t)
2513
+ ...m(t)
2514
2514
  });
2515
2515
  }
2516
2516
  // @__NO_SIDE_EFFECTS__
@@ -2520,7 +2520,7 @@ function Ti(e, t) {
2520
2520
  format: "cuid2",
2521
2521
  check: "string_format",
2522
2522
  abort: !1,
2523
- ...h(t)
2523
+ ...m(t)
2524
2524
  });
2525
2525
  }
2526
2526
  // @__NO_SIDE_EFFECTS__
@@ -2530,7 +2530,7 @@ function Ei(e, t) {
2530
2530
  format: "ulid",
2531
2531
  check: "string_format",
2532
2532
  abort: !1,
2533
- ...h(t)
2533
+ ...m(t)
2534
2534
  });
2535
2535
  }
2536
2536
  // @__NO_SIDE_EFFECTS__
@@ -2540,7 +2540,7 @@ function Di(e, t) {
2540
2540
  format: "xid",
2541
2541
  check: "string_format",
2542
2542
  abort: !1,
2543
- ...h(t)
2543
+ ...m(t)
2544
2544
  });
2545
2545
  }
2546
2546
  // @__NO_SIDE_EFFECTS__
@@ -2550,7 +2550,7 @@ function Oi(e, t) {
2550
2550
  format: "ksuid",
2551
2551
  check: "string_format",
2552
2552
  abort: !1,
2553
- ...h(t)
2553
+ ...m(t)
2554
2554
  });
2555
2555
  }
2556
2556
  // @__NO_SIDE_EFFECTS__
@@ -2560,7 +2560,7 @@ function ki(e, t) {
2560
2560
  format: "ipv4",
2561
2561
  check: "string_format",
2562
2562
  abort: !1,
2563
- ...h(t)
2563
+ ...m(t)
2564
2564
  });
2565
2565
  }
2566
2566
  // @__NO_SIDE_EFFECTS__
@@ -2570,7 +2570,7 @@ function Ai(e, t) {
2570
2570
  format: "ipv6",
2571
2571
  check: "string_format",
2572
2572
  abort: !1,
2573
- ...h(t)
2573
+ ...m(t)
2574
2574
  });
2575
2575
  }
2576
2576
  // @__NO_SIDE_EFFECTS__
@@ -2580,7 +2580,7 @@ function ji(e, t) {
2580
2580
  format: "cidrv4",
2581
2581
  check: "string_format",
2582
2582
  abort: !1,
2583
- ...h(t)
2583
+ ...m(t)
2584
2584
  });
2585
2585
  }
2586
2586
  // @__NO_SIDE_EFFECTS__
@@ -2590,7 +2590,7 @@ function Mi(e, t) {
2590
2590
  format: "cidrv6",
2591
2591
  check: "string_format",
2592
2592
  abort: !1,
2593
- ...h(t)
2593
+ ...m(t)
2594
2594
  });
2595
2595
  }
2596
2596
  // @__NO_SIDE_EFFECTS__
@@ -2600,7 +2600,7 @@ function Ni(e, t) {
2600
2600
  format: "base64",
2601
2601
  check: "string_format",
2602
2602
  abort: !1,
2603
- ...h(t)
2603
+ ...m(t)
2604
2604
  });
2605
2605
  }
2606
2606
  // @__NO_SIDE_EFFECTS__
@@ -2610,7 +2610,7 @@ function Pi(e, t) {
2610
2610
  format: "base64url",
2611
2611
  check: "string_format",
2612
2612
  abort: !1,
2613
- ...h(t)
2613
+ ...m(t)
2614
2614
  });
2615
2615
  }
2616
2616
  // @__NO_SIDE_EFFECTS__
@@ -2620,7 +2620,7 @@ function Fi(e, t) {
2620
2620
  format: "e164",
2621
2621
  check: "string_format",
2622
2622
  abort: !1,
2623
- ...h(t)
2623
+ ...m(t)
2624
2624
  });
2625
2625
  }
2626
2626
  // @__NO_SIDE_EFFECTS__
@@ -2630,7 +2630,7 @@ function Ii(e, t) {
2630
2630
  format: "jwt",
2631
2631
  check: "string_format",
2632
2632
  abort: !1,
2633
- ...h(t)
2633
+ ...m(t)
2634
2634
  });
2635
2635
  }
2636
2636
  // @__NO_SIDE_EFFECTS__
@@ -2642,7 +2642,7 @@ function Li(e, t) {
2642
2642
  offset: !1,
2643
2643
  local: !1,
2644
2644
  precision: null,
2645
- ...h(t)
2645
+ ...m(t)
2646
2646
  });
2647
2647
  }
2648
2648
  // @__NO_SIDE_EFFECTS__
@@ -2651,7 +2651,7 @@ function Ri(e, t) {
2651
2651
  type: "string",
2652
2652
  format: "date",
2653
2653
  check: "string_format",
2654
- ...h(t)
2654
+ ...m(t)
2655
2655
  });
2656
2656
  }
2657
2657
  // @__NO_SIDE_EFFECTS__
@@ -2661,7 +2661,7 @@ function zi(e, t) {
2661
2661
  format: "time",
2662
2662
  check: "string_format",
2663
2663
  precision: null,
2664
- ...h(t)
2664
+ ...m(t)
2665
2665
  });
2666
2666
  }
2667
2667
  // @__NO_SIDE_EFFECTS__
@@ -2670,7 +2670,7 @@ function Bi(e, t) {
2670
2670
  type: "string",
2671
2671
  format: "duration",
2672
2672
  check: "string_format",
2673
- ...h(t)
2673
+ ...m(t)
2674
2674
  });
2675
2675
  }
2676
2676
  // @__NO_SIDE_EFFECTS__
@@ -2678,7 +2678,7 @@ function Vi(e, t) {
2678
2678
  return new e({
2679
2679
  type: "number",
2680
2680
  checks: [],
2681
- ...h(t)
2681
+ ...m(t)
2682
2682
  });
2683
2683
  }
2684
2684
  // @__NO_SIDE_EFFECTS__
@@ -2688,21 +2688,21 @@ function Hi(e, t) {
2688
2688
  check: "number_format",
2689
2689
  abort: !1,
2690
2690
  format: "safeint",
2691
- ...h(t)
2691
+ ...m(t)
2692
2692
  });
2693
2693
  }
2694
2694
  // @__NO_SIDE_EFFECTS__
2695
2695
  function Ui(e, t) {
2696
2696
  return new e({
2697
2697
  type: "boolean",
2698
- ...h(t)
2698
+ ...m(t)
2699
2699
  });
2700
2700
  }
2701
2701
  // @__NO_SIDE_EFFECTS__
2702
2702
  function Wi(e, t) {
2703
2703
  return new e({
2704
2704
  type: "null",
2705
- ...h(t)
2705
+ ...m(t)
2706
2706
  });
2707
2707
  }
2708
2708
  // @__NO_SIDE_EFFECTS__
@@ -2713,14 +2713,14 @@ function Gi(e) {
2713
2713
  function Ki(e, t) {
2714
2714
  return new e({
2715
2715
  type: "never",
2716
- ...h(t)
2716
+ ...m(t)
2717
2717
  });
2718
2718
  }
2719
2719
  // @__NO_SIDE_EFFECTS__
2720
2720
  function qi(e, t) {
2721
2721
  return new nn({
2722
2722
  check: "less_than",
2723
- ...h(t),
2723
+ ...m(t),
2724
2724
  value: e,
2725
2725
  inclusive: !1
2726
2726
  });
@@ -2729,7 +2729,7 @@ function qi(e, t) {
2729
2729
  function Ji(e, t) {
2730
2730
  return new nn({
2731
2731
  check: "less_than",
2732
- ...h(t),
2732
+ ...m(t),
2733
2733
  value: e,
2734
2734
  inclusive: !0
2735
2735
  });
@@ -2738,7 +2738,7 @@ function Ji(e, t) {
2738
2738
  function Yi(e, t) {
2739
2739
  return new rn({
2740
2740
  check: "greater_than",
2741
- ...h(t),
2741
+ ...m(t),
2742
2742
  value: e,
2743
2743
  inclusive: !1
2744
2744
  });
@@ -2747,7 +2747,7 @@ function Yi(e, t) {
2747
2747
  function Xi(e, t) {
2748
2748
  return new rn({
2749
2749
  check: "greater_than",
2750
- ...h(t),
2750
+ ...m(t),
2751
2751
  value: e,
2752
2752
  inclusive: !0
2753
2753
  });
@@ -2756,7 +2756,7 @@ function Xi(e, t) {
2756
2756
  function Zi(e, t) {
2757
2757
  return new an({
2758
2758
  check: "multiple_of",
2759
- ...h(t),
2759
+ ...m(t),
2760
2760
  value: e
2761
2761
  });
2762
2762
  }
@@ -2764,7 +2764,7 @@ function Zi(e, t) {
2764
2764
  function Qi(e, t) {
2765
2765
  return new sn({
2766
2766
  check: "max_length",
2767
- ...h(t),
2767
+ ...m(t),
2768
2768
  maximum: e
2769
2769
  });
2770
2770
  }
@@ -2772,7 +2772,7 @@ function Qi(e, t) {
2772
2772
  function $i(e, t) {
2773
2773
  return new cn({
2774
2774
  check: "min_length",
2775
- ...h(t),
2775
+ ...m(t),
2776
2776
  minimum: e
2777
2777
  });
2778
2778
  }
@@ -2780,7 +2780,7 @@ function $i(e, t) {
2780
2780
  function ea(e, t) {
2781
2781
  return new ln({
2782
2782
  check: "length_equals",
2783
- ...h(t),
2783
+ ...m(t),
2784
2784
  length: e
2785
2785
  });
2786
2786
  }
@@ -2789,7 +2789,7 @@ function ta(e, t) {
2789
2789
  return new dn({
2790
2790
  check: "string_format",
2791
2791
  format: "regex",
2792
- ...h(t),
2792
+ ...m(t),
2793
2793
  pattern: e
2794
2794
  });
2795
2795
  }
@@ -2798,7 +2798,7 @@ function na(e) {
2798
2798
  return new fn({
2799
2799
  check: "string_format",
2800
2800
  format: "lowercase",
2801
- ...h(e)
2801
+ ...m(e)
2802
2802
  });
2803
2803
  }
2804
2804
  // @__NO_SIDE_EFFECTS__
@@ -2806,7 +2806,7 @@ function ra(e) {
2806
2806
  return new pn({
2807
2807
  check: "string_format",
2808
2808
  format: "uppercase",
2809
- ...h(e)
2809
+ ...m(e)
2810
2810
  });
2811
2811
  }
2812
2812
  // @__NO_SIDE_EFFECTS__
@@ -2814,7 +2814,7 @@ function ia(e, t) {
2814
2814
  return new mn({
2815
2815
  check: "string_format",
2816
2816
  format: "includes",
2817
- ...h(t),
2817
+ ...m(t),
2818
2818
  includes: e
2819
2819
  });
2820
2820
  }
@@ -2823,7 +2823,7 @@ function aa(e, t) {
2823
2823
  return new hn({
2824
2824
  check: "string_format",
2825
2825
  format: "starts_with",
2826
- ...h(t),
2826
+ ...m(t),
2827
2827
  prefix: e
2828
2828
  });
2829
2829
  }
@@ -2832,7 +2832,7 @@ function oa(e, t) {
2832
2832
  return new gn({
2833
2833
  check: "string_format",
2834
2834
  format: "ends_with",
2835
- ...h(t),
2835
+ ...m(t),
2836
2836
  suffix: e
2837
2837
  });
2838
2838
  }
@@ -2861,14 +2861,14 @@ function da() {
2861
2861
  }
2862
2862
  // @__NO_SIDE_EFFECTS__
2863
2863
  function fa() {
2864
- return /* @__PURE__ */ sa((e) => m(e));
2864
+ return /* @__PURE__ */ sa((e) => ee(e));
2865
2865
  }
2866
2866
  // @__NO_SIDE_EFFECTS__
2867
2867
  function pa(e, t, n) {
2868
2868
  return new e({
2869
2869
  type: "array",
2870
2870
  element: t,
2871
- ...h(n)
2871
+ ...m(n)
2872
2872
  });
2873
2873
  }
2874
2874
  // @__NO_SIDE_EFFECTS__
@@ -2877,16 +2877,16 @@ function ma(e, t, n) {
2877
2877
  type: "custom",
2878
2878
  check: "custom",
2879
2879
  fn: t,
2880
- ...h(n)
2880
+ ...m(n)
2881
2881
  });
2882
2882
  }
2883
2883
  // @__NO_SIDE_EFFECTS__
2884
2884
  function ha(e, t) {
2885
2885
  let n = /* @__PURE__ */ ga((t) => (t.addIssue = (e) => {
2886
- if (typeof e == "string") t.issues.push(Oe(e, t.value, n._zod.def));
2886
+ if (typeof e == "string") t.issues.push(ke(e, t.value, n._zod.def));
2887
2887
  else {
2888
2888
  let r = e;
2889
- r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(Oe(r));
2889
+ r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(ke(r));
2890
2890
  }
2891
2891
  }, e(t.value, t)), t);
2892
2892
  return n;
@@ -2895,7 +2895,7 @@ function ha(e, t) {
2895
2895
  function ga(e, t) {
2896
2896
  let n = new y({
2897
2897
  check: "custom",
2898
- ...h(t)
2898
+ ...m(t)
2899
2899
  });
2900
2900
  return n._zod.check = e, n;
2901
2901
  }
@@ -3376,8 +3376,8 @@ var Ua = (e, t, n, r) => {
3376
3376
  }
3377
3377
  let d = a.items.length, f = !a.rest;
3378
3378
  t.target === "draft-2020-12" ? (i.prefixItems = c, f ? i.items = !1 : l && (i.items = l), u > 0 && (i.minItems = u), f && (i.maxItems = d)) : t.target === "openapi-3.0" ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), u > 0 && (i.minItems = u), f && (i.maxItems = d)) : (i.items = c, f ? i.additionalItems = !1 : l && (i.additionalItems = l), u > 0 && (i.minItems = u), f && (i.maxItems = d));
3379
- let { minimum: p, maximum: m } = e._zod.bag;
3380
- typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
3379
+ let { minimum: p, maximum: ee } = e._zod.bag;
3380
+ typeof p == "number" && (i.minItems = p), typeof ee == "number" && (i.maxItems = ee);
3381
3381
  };
3382
3382
  function qa(e, t, n) {
3383
3383
  if (t.$ref) {
@@ -3534,7 +3534,7 @@ function lo(e, t, n) {
3534
3534
  }
3535
3535
  });
3536
3536
  }
3537
- var w = /*@__PURE__*/ _("ZodError", (e, t) => {
3537
+ var w = /*@__PURE__*/ g("ZodError", (e, t) => {
3538
3538
  et.init(e, t), e.name = "ZodError";
3539
3539
  let n = Object.getPrototypeOf(e);
3540
3540
  co.has(n) || (co.add(n), lo(n, "format", (e) => (t) => it(e, t)), lo(n, "flatten", (e) => (t) => rt(e, t)), lo(n, "addIssue", (e) => (t) => {
@@ -3552,12 +3552,12 @@ var w = /*@__PURE__*/ _("ZodError", (e, t) => {
3552
3552
  //#endregion
3553
3553
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
3554
3554
  function Co() {
3555
- v.localeError || Ke(li());
3555
+ _.localeError || v(li());
3556
3556
  }
3557
3557
  function wo() {
3558
- v.memoizer || Ke({ memoizer: oi() });
3558
+ _.memoizer || v({ memoizer: oi() });
3559
3559
  }
3560
- var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.type = t.type, e), {
3560
+ var T = /*@__PURE__*/ g("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.type = t.type, e), {
3561
3561
  check(...e) {
3562
3562
  let t = this.def;
3563
3563
  return this.clone(f(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
@@ -3570,7 +3570,7 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3570
3570
  return this.check(...e);
3571
3571
  },
3572
3572
  clone(e, t) {
3573
- return se(this, e, t);
3573
+ return ce(this, e, t);
3574
3574
  },
3575
3575
  brand() {
3576
3576
  return this;
@@ -3579,55 +3579,55 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3579
3579
  return e.add(this, t), this;
3580
3580
  },
3581
3581
  refine(e, t) {
3582
- return this.check(Hs(e, t));
3582
+ return this.check(Vs(e, t));
3583
3583
  },
3584
3584
  superRefine(e, t) {
3585
- return this.check(Us(e, t));
3585
+ return this.check(Hs(e, t));
3586
3586
  },
3587
3587
  overwrite(e) {
3588
3588
  return this.check(/* @__PURE__ */ sa(e));
3589
3589
  },
3590
3590
  optional() {
3591
- return Ss(this);
3591
+ return xs(this);
3592
3592
  },
3593
3593
  exactOptional() {
3594
- return ws(this);
3594
+ return Cs(this);
3595
3595
  },
3596
3596
  nullable() {
3597
- return Es(this);
3597
+ return Ts(this);
3598
3598
  },
3599
3599
  nullish() {
3600
- return Ss(Es(this));
3600
+ return xs(Ts(this));
3601
3601
  },
3602
3602
  nonoptional(e) {
3603
- return Ms(this, e);
3603
+ return js(this, e);
3604
3604
  },
3605
3605
  array() {
3606
3606
  return A(this);
3607
3607
  },
3608
3608
  or(e) {
3609
- return M([this, e]);
3609
+ return N([this, e]);
3610
3610
  },
3611
3611
  and(e) {
3612
- return ps(this, e);
3612
+ return fs(this, e);
3613
3613
  },
3614
3614
  transform(e) {
3615
- return Is(this, bs(e));
3615
+ return Fs(this, ys(e));
3616
3616
  },
3617
3617
  default(e) {
3618
- return Os(this, e);
3618
+ return Ds(this, e);
3619
3619
  },
3620
3620
  prefault(e) {
3621
- return As(this, e);
3621
+ return ks(this, e);
3622
3622
  },
3623
3623
  catch(e) {
3624
- return Ps(this, e);
3624
+ return Ns(this, e);
3625
3625
  },
3626
3626
  pipe(e) {
3627
- return Is(this, e);
3627
+ return Fs(this, e);
3628
3628
  },
3629
3629
  readonly() {
3630
- return Rs(this);
3630
+ return Ls(this);
3631
3631
  },
3632
3632
  describe(e) {
3633
3633
  let t = this.clone();
@@ -3648,7 +3648,7 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3648
3648
  return t.length === 0 ? e(this) : e(this, ...t);
3649
3649
  },
3650
3650
  get "~standard"() {
3651
- return je(this, "~standard", {
3651
+ return Me(this, "~standard", {
3652
3652
  ...xn(this),
3653
3653
  jsonSchema: {
3654
3654
  input: Aa(this, "input"),
@@ -3657,7 +3657,7 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3657
3657
  });
3658
3658
  },
3659
3659
  set "~standard"(e) {
3660
- Ae(this, "~standard", e);
3660
+ je(this, "~standard", e);
3661
3661
  },
3662
3662
  parse: function e(t, n) {
3663
3663
  return uo(this, t, n, { callee: e });
@@ -3675,7 +3675,7 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3675
3675
  return this?.safeParseAsync;
3676
3676
  },
3677
3677
  set spa(e) {
3678
- Ae(this, "spa", e);
3678
+ je(this, "spa", e);
3679
3679
  },
3680
3680
  encode: function e(t, n) {
3681
3681
  return ho(this, t, n, { callee: e });
@@ -3710,7 +3710,7 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3710
3710
  get _def() {
3711
3711
  return this._zod.def;
3712
3712
  }
3713
- }), To = /*@__PURE__*/ _("_ZodString", (e, t) => {
3713
+ }), To = /*@__PURE__*/ g("_ZodString", (e, t) => {
3714
3714
  Sn.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
3715
3715
  let n = e._zod.bag;
3716
3716
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
@@ -3760,7 +3760,7 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3760
3760
  slugify() {
3761
3761
  return this.check(/* @__PURE__ */ fa());
3762
3762
  }
3763
- }), Eo = /*@__PURE__*/ _("ZodString", (e, t) => {
3763
+ }), Eo = /*@__PURE__*/ g("ZodString", (e, t) => {
3764
3764
  Sn.init(e, t), To.init(e, t);
3765
3765
  }, {
3766
3766
  email(e) {
@@ -3845,55 +3845,55 @@ var T = /*@__PURE__*/ _("ZodType", (e, t) => (Co(), b.init(e, t), e.def = t, e.t
3845
3845
  function E(e) {
3846
3846
  return /* @__PURE__ */ mi(Eo, e);
3847
3847
  }
3848
- var D = /*@__PURE__*/ _("ZodStringFormat", (e, t) => {
3848
+ var D = /*@__PURE__*/ g("ZodStringFormat", (e, t) => {
3849
3849
  x.init(e, t), To.init(e, t);
3850
- }), Do = /*@__PURE__*/ _("ZodISODateTime", (e, t) => {
3850
+ }), Do = /*@__PURE__*/ g("ZodISODateTime", (e, t) => {
3851
3851
  zn.init(e, t), D.init(e, t);
3852
- }), Oo = /*@__PURE__*/ _("ZodISODate", (e, t) => {
3852
+ }), Oo = /*@__PURE__*/ g("ZodISODate", (e, t) => {
3853
3853
  Bn.init(e, t), D.init(e, t);
3854
- }), ko = /*@__PURE__*/ _("ZodISOTime", (e, t) => {
3854
+ }), ko = /*@__PURE__*/ g("ZodISOTime", (e, t) => {
3855
3855
  Vn.init(e, t), D.init(e, t);
3856
- }), Ao = /*@__PURE__*/ _("ZodISODuration", (e, t) => {
3856
+ }), Ao = /*@__PURE__*/ g("ZodISODuration", (e, t) => {
3857
3857
  Hn.init(e, t), D.init(e, t);
3858
- }), jo = /*@__PURE__*/ _("ZodEmail", (e, t) => {
3858
+ }), jo = /*@__PURE__*/ g("ZodEmail", (e, t) => {
3859
3859
  Tn.init(e, t), D.init(e, t);
3860
- }), Mo = /*@__PURE__*/ _("ZodGUID", (e, t) => {
3860
+ }), Mo = /*@__PURE__*/ g("ZodGUID", (e, t) => {
3861
3861
  Cn.init(e, t), D.init(e, t);
3862
- }), No = /*@__PURE__*/ _("ZodUUID", (e, t) => {
3862
+ }), No = /*@__PURE__*/ g("ZodUUID", (e, t) => {
3863
3863
  wn.init(e, t), D.init(e, t);
3864
- }), Po = /*@__PURE__*/ _("ZodURL", (e, t) => {
3864
+ }), Po = /*@__PURE__*/ g("ZodURL", (e, t) => {
3865
3865
  jn.init(e, t), D.init(e, t);
3866
- }), Fo = /*@__PURE__*/ _("ZodEmoji", (e, t) => {
3866
+ }), Fo = /*@__PURE__*/ g("ZodEmoji", (e, t) => {
3867
3867
  Mn.init(e, t), D.init(e, t);
3868
- }), Io = /*@__PURE__*/ _("ZodNanoID", (e, t) => {
3868
+ }), Io = /*@__PURE__*/ g("ZodNanoID", (e, t) => {
3869
3869
  Nn.init(e, t), D.init(e, t);
3870
- }), Lo = /*@__PURE__*/ _("ZodCUID", (e, t) => {
3870
+ }), Lo = /*@__PURE__*/ g("ZodCUID", (e, t) => {
3871
3871
  Pn.init(e, t), D.init(e, t);
3872
- }), Ro = /*@__PURE__*/ _("ZodCUID2", (e, t) => {
3872
+ }), Ro = /*@__PURE__*/ g("ZodCUID2", (e, t) => {
3873
3873
  Fn.init(e, t), D.init(e, t);
3874
- }), zo = /*@__PURE__*/ _("ZodULID", (e, t) => {
3874
+ }), zo = /*@__PURE__*/ g("ZodULID", (e, t) => {
3875
3875
  In.init(e, t), D.init(e, t);
3876
- }), Bo = /*@__PURE__*/ _("ZodXID", (e, t) => {
3876
+ }), Bo = /*@__PURE__*/ g("ZodXID", (e, t) => {
3877
3877
  Ln.init(e, t), D.init(e, t);
3878
- }), Vo = /*@__PURE__*/ _("ZodKSUID", (e, t) => {
3878
+ }), Vo = /*@__PURE__*/ g("ZodKSUID", (e, t) => {
3879
3879
  Rn.init(e, t), D.init(e, t);
3880
- }), Ho = /*@__PURE__*/ _("ZodIPv4", (e, t) => {
3880
+ }), Ho = /*@__PURE__*/ g("ZodIPv4", (e, t) => {
3881
3881
  Un.init(e, t), D.init(e, t);
3882
- }), Uo = /*@__PURE__*/ _("ZodIPv6", (e, t) => {
3882
+ }), Uo = /*@__PURE__*/ g("ZodIPv6", (e, t) => {
3883
3883
  Kn.init(e, t), D.init(e, t);
3884
- }), Wo = /*@__PURE__*/ _("ZodCIDRv4", (e, t) => {
3884
+ }), Wo = /*@__PURE__*/ g("ZodCIDRv4", (e, t) => {
3885
3885
  qn.init(e, t), D.init(e, t);
3886
- }), Go = /*@__PURE__*/ _("ZodCIDRv6", (e, t) => {
3886
+ }), Go = /*@__PURE__*/ g("ZodCIDRv6", (e, t) => {
3887
3887
  Yn.init(e, t), D.init(e, t);
3888
- }), Ko = /*@__PURE__*/ _("ZodBase64", (e, t) => {
3888
+ }), Ko = /*@__PURE__*/ g("ZodBase64", (e, t) => {
3889
3889
  Zn.init(e, t), D.init(e, t);
3890
- }), qo = /*@__PURE__*/ _("ZodBase64URL", (e, t) => {
3890
+ }), qo = /*@__PURE__*/ g("ZodBase64URL", (e, t) => {
3891
3891
  $n.init(e, t), D.init(e, t);
3892
- }), Jo = /*@__PURE__*/ _("ZodE164", (e, t) => {
3892
+ }), Jo = /*@__PURE__*/ g("ZodE164", (e, t) => {
3893
3893
  er.init(e, t), D.init(e, t);
3894
- }), Yo = /*@__PURE__*/ _("ZodJWT", (e, t) => {
3894
+ }), Yo = /*@__PURE__*/ g("ZodJWT", (e, t) => {
3895
3895
  nr.init(e, t), D.init(e, t);
3896
- }), Xo = /*@__PURE__*/ _("ZodNumber", (e, t) => {
3896
+ }), Xo = /*@__PURE__*/ g("ZodNumber", (e, t) => {
3897
3897
  rr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r);
3898
3898
  let n = e._zod.bag;
3899
3899
  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;
@@ -3947,37 +3947,37 @@ var D = /*@__PURE__*/ _("ZodStringFormat", (e, t) => {
3947
3947
  function O(e) {
3948
3948
  return /* @__PURE__ */ Vi(Xo, e);
3949
3949
  }
3950
- var Zo = /*@__PURE__*/ _("ZodNumberFormat", (e, t) => {
3950
+ var Zo = /*@__PURE__*/ g("ZodNumberFormat", (e, t) => {
3951
3951
  ir.init(e, t), Xo.init(e, t);
3952
3952
  });
3953
3953
  function Qo(e) {
3954
3954
  return /* @__PURE__ */ Hi(Zo, e);
3955
3955
  }
3956
- var $o = /*@__PURE__*/ _("ZodBoolean", (e, t) => {
3956
+ var $o = /*@__PURE__*/ g("ZodBoolean", (e, t) => {
3957
3957
  ar.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r);
3958
3958
  });
3959
3959
  function k(e) {
3960
3960
  return /* @__PURE__ */ Ui($o, e);
3961
3961
  }
3962
- var es = /*@__PURE__*/ _("ZodNull", (e, t) => {
3962
+ var es = /*@__PURE__*/ g("ZodNull", (e, t) => {
3963
3963
  or.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r);
3964
3964
  });
3965
3965
  function ts(e) {
3966
3966
  return /* @__PURE__ */ Wi(es, e);
3967
3967
  }
3968
- var ns = /*@__PURE__*/ _("ZodUnknown", (e, t) => {
3968
+ var ns = /*@__PURE__*/ g("ZodUnknown", (e, t) => {
3969
3969
  sr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3970
3970
  });
3971
3971
  function rs() {
3972
3972
  return /* @__PURE__ */ Gi(ns);
3973
3973
  }
3974
- var is = /*@__PURE__*/ _("ZodNever", (e, t) => {
3974
+ var is = /*@__PURE__*/ g("ZodNever", (e, t) => {
3975
3975
  cr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r);
3976
3976
  });
3977
3977
  function as(e) {
3978
3978
  return /* @__PURE__ */ Ki(is, e);
3979
3979
  }
3980
- var os = /*@__PURE__*/ _("ZodArray", (e, t) => {
3980
+ var os = /*@__PURE__*/ g("ZodArray", (e, t) => {
3981
3981
  wo(), ur.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.element = t.element;
3982
3982
  }, {
3983
3983
  min(e, t) {
@@ -3999,11 +3999,11 @@ var os = /*@__PURE__*/ _("ZodArray", (e, t) => {
3999
3999
  function A(e, t) {
4000
4000
  return /* @__PURE__ */ pa(os, e, t);
4001
4001
  }
4002
- var ss = /*@__PURE__*/ _("ZodObject", (e, t) => {
4003
- wo(), _r.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), Le(e, "shape", (e) => e._zod.def.shape, !1);
4002
+ var ss = /*@__PURE__*/ g("ZodObject", (e, t) => {
4003
+ wo(), _r.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), Re(e, "shape", (e) => e._zod.def.shape, !1);
4004
4004
  }, {
4005
4005
  keyof() {
4006
- return P(Object.keys(this._zod.def.shape));
4006
+ return F(Object.keys(this._zod.def.shape));
4007
4007
  },
4008
4008
  catchall(e) {
4009
4009
  return this.clone({
@@ -4036,77 +4036,77 @@ var ss = /*@__PURE__*/ _("ZodObject", (e, t) => {
4036
4036
  });
4037
4037
  },
4038
4038
  extend(e) {
4039
- return pe(this, e);
4039
+ return me(this, e);
4040
4040
  },
4041
4041
  safeExtend(e) {
4042
- return me(this, e);
4042
+ return he(this, e);
4043
4043
  },
4044
4044
  merge(e) {
4045
- return he(this, e);
4045
+ return ge(this, e);
4046
4046
  },
4047
4047
  pick(e) {
4048
- return de(this, e);
4048
+ return fe(this, e);
4049
4049
  },
4050
4050
  omit(e) {
4051
- return fe(this, e);
4051
+ return pe(this, e);
4052
4052
  },
4053
4053
  partial(...e) {
4054
- return ge(xs, this, e[0]);
4054
+ return _e(bs, this, e[0]);
4055
4055
  },
4056
4056
  exactPartial(...e) {
4057
- return ge(Cs, this, e[0], "exactPartial");
4057
+ return _e(Ss, this, e[0], "exactPartial");
4058
4058
  },
4059
4059
  required(...e) {
4060
- return _e(js, this, e[0]);
4060
+ return ve(As, this, e[0]);
4061
4061
  }
4062
4062
  });
4063
4063
  function j(e, t) {
4064
4064
  return new ss({
4065
4065
  type: "object",
4066
4066
  shape: e ?? {},
4067
- ...h(t)
4067
+ ...m(t)
4068
4068
  });
4069
4069
  }
4070
- function cs(e, t) {
4070
+ function M(e, t) {
4071
4071
  return new ss({
4072
4072
  type: "object",
4073
4073
  shape: e,
4074
4074
  catchall: as(),
4075
- ...h(t)
4075
+ ...m(t)
4076
4076
  });
4077
4077
  }
4078
- var ls = /*@__PURE__*/ _("ZodUnion", (e, t) => {
4078
+ var cs = /*@__PURE__*/ g("ZodUnion", (e, t) => {
4079
4079
  yr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.options = t.options;
4080
4080
  });
4081
- function M(e, t) {
4082
- return new ls({
4081
+ function N(e, t) {
4082
+ return new cs({
4083
4083
  type: "union",
4084
4084
  options: e,
4085
- ...h(t)
4085
+ ...m(t)
4086
4086
  });
4087
4087
  }
4088
- var us = /*@__PURE__*/ _("ZodDiscriminatedUnion", (e, t) => {
4089
- ls.init(e, t), br.init(e, t);
4088
+ var ls = /*@__PURE__*/ g("ZodDiscriminatedUnion", (e, t) => {
4089
+ cs.init(e, t), br.init(e, t);
4090
4090
  });
4091
- function ds(e, t, n) {
4092
- return new us({
4091
+ function us(e, t, n) {
4092
+ return new ls({
4093
4093
  type: "union",
4094
4094
  options: t,
4095
4095
  discriminator: e,
4096
- ...h(n)
4096
+ ...m(n)
4097
4097
  });
4098
4098
  }
4099
- var fs = /*@__PURE__*/ _("ZodIntersection", (e, t) => {
4099
+ var ds = /*@__PURE__*/ g("ZodIntersection", (e, t) => {
4100
4100
  xr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r);
4101
4101
  });
4102
- function ps(e, t) {
4103
- return new fs({
4102
+ function fs(e, t) {
4103
+ return new ds({
4104
4104
  type: "intersection",
4105
4105
  left: e,
4106
4106
  right: t
4107
4107
  });
4108
4108
  }
4109
- var ms = /*@__PURE__*/ _("ZodTuple", (e, t) => {
4109
+ var ps = /*@__PURE__*/ g("ZodTuple", (e, t) => {
4110
4110
  wo(), wr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r);
4111
4111
  }, {
4112
4112
  rest(e) {
@@ -4120,237 +4120,237 @@ var ms = /*@__PURE__*/ _("ZodTuple", (e, t) => {
4120
4120
  if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
4121
4121
  return this.clone({
4122
4122
  ...e,
4123
- items: e.items.map((e) => new xs({
4123
+ items: e.items.map((e) => new bs({
4124
4124
  type: "optional",
4125
4125
  innerType: e
4126
4126
  }))
4127
4127
  });
4128
4128
  }
4129
4129
  });
4130
- function hs(e, t, n) {
4130
+ function ms(e, t, n) {
4131
4131
  let r = t instanceof b;
4132
- return new ms({
4132
+ return new ps({
4133
4133
  type: "tuple",
4134
4134
  items: e,
4135
4135
  rest: r ? t : null,
4136
- ...h(r ? n : t)
4136
+ ...m(r ? n : t)
4137
4137
  });
4138
4138
  }
4139
- var gs = /*@__PURE__*/ _("ZodRecord", (e, t) => {
4139
+ var hs = /*@__PURE__*/ g("ZodRecord", (e, t) => {
4140
4140
  wo(), Or.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4141
4141
  });
4142
- function N(e, t, n) {
4143
- return !t || !t._zod ? new gs({
4142
+ function P(e, t, n) {
4143
+ return !t || !t._zod ? new hs({
4144
4144
  type: "record",
4145
4145
  keyType: E(),
4146
4146
  valueType: e,
4147
- ...h(t)
4148
- }) : new gs({
4147
+ ...m(t)
4148
+ }) : new hs({
4149
4149
  type: "record",
4150
4150
  keyType: e,
4151
4151
  valueType: t,
4152
- ...h(n)
4152
+ ...m(n)
4153
4153
  });
4154
4154
  }
4155
- var _s = /*@__PURE__*/ _("ZodEnum", (e, t) => {
4155
+ var gs = /*@__PURE__*/ g("ZodEnum", (e, t) => {
4156
4156
  kr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4157
4157
  let n = new Set(Object.keys(t.entries));
4158
4158
  e.extract = (e, r) => {
4159
4159
  let i = {};
4160
4160
  for (let r of e) if (n.has(r)) i[r] = t.entries[r];
4161
4161
  else throw Error(`Key ${r} not found in enum`);
4162
- return new _s({
4162
+ return new gs({
4163
4163
  ...t,
4164
4164
  checks: [],
4165
- ...h(r),
4165
+ ...m(r),
4166
4166
  entries: i
4167
4167
  });
4168
4168
  }, e.exclude = (e, r) => {
4169
4169
  let i = { ...t.entries };
4170
4170
  for (let t of e) if (n.has(t)) delete i[t];
4171
4171
  else throw Error(`Key ${t} not found in enum`);
4172
- return new _s({
4172
+ return new gs({
4173
4173
  ...t,
4174
4174
  checks: [],
4175
- ...h(r),
4175
+ ...m(r),
4176
4176
  entries: i
4177
4177
  });
4178
4178
  };
4179
4179
  });
4180
- function P(e, t) {
4181
- return new _s({
4180
+ function F(e, t) {
4181
+ return new gs({
4182
4182
  type: "enum",
4183
4183
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
4184
- ...h(t)
4184
+ ...m(t)
4185
4185
  });
4186
4186
  }
4187
- var vs = /*@__PURE__*/ _("ZodLiteral", (e, t) => {
4187
+ var _s = /*@__PURE__*/ g("ZodLiteral", (e, t) => {
4188
4188
  Ar.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4189
4189
  if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
4190
4190
  return t.values[0];
4191
4191
  } });
4192
4192
  });
4193
- function F(e, t) {
4194
- return new vs({
4193
+ function I(e, t) {
4194
+ return new _s({
4195
4195
  type: "literal",
4196
4196
  values: Array.isArray(e) ? e : [e],
4197
- ...h(t)
4197
+ ...m(t)
4198
4198
  });
4199
4199
  }
4200
- var ys = /*@__PURE__*/ _("ZodTransform", (e, t) => {
4200
+ var vs = /*@__PURE__*/ g("ZodTransform", (e, t) => {
4201
4201
  wo(), jr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e._zod.parse = (n, r) => {
4202
- if (r.direction === "backward") throw new Ge(e.constructor.name);
4202
+ if (r.direction === "backward") throw new Ke(e.constructor.name);
4203
4203
  n.addIssue = (r) => {
4204
- if (typeof r == "string") n.issues.push(Oe(r, n.value, t));
4204
+ if (typeof r == "string") n.issues.push(ke(r, n.value, t));
4205
4205
  else {
4206
4206
  let t = r;
4207
- t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(Oe(t));
4207
+ t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(ke(t));
4208
4208
  }
4209
4209
  };
4210
4210
  let i = t.transform(n.value, n);
4211
4211
  return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
4212
4212
  };
4213
4213
  });
4214
- function bs(e) {
4215
- return new ys({
4214
+ function ys(e) {
4215
+ return new vs({
4216
4216
  type: "transform",
4217
4217
  transform: e
4218
4218
  });
4219
4219
  }
4220
- var xs = /*@__PURE__*/ _("ZodOptional", (e, t) => {
4220
+ var bs = /*@__PURE__*/ g("ZodOptional", (e, t) => {
4221
4221
  Nr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4222
4222
  });
4223
- function Ss(e) {
4224
- return new xs({
4223
+ function xs(e) {
4224
+ return new bs({
4225
4225
  type: "optional",
4226
4226
  innerType: e
4227
4227
  });
4228
4228
  }
4229
- var Cs = /*@__PURE__*/ _("ZodExactOptional", (e, t) => {
4229
+ var Ss = /*@__PURE__*/ g("ZodExactOptional", (e, t) => {
4230
4230
  Pr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4231
4231
  });
4232
- function ws(e) {
4233
- return new Cs({
4232
+ function Cs(e) {
4233
+ return new Ss({
4234
4234
  type: "optional",
4235
4235
  innerType: e
4236
4236
  });
4237
4237
  }
4238
- var Ts = /*@__PURE__*/ _("ZodNullable", (e, t) => {
4238
+ var ws = /*@__PURE__*/ g("ZodNullable", (e, t) => {
4239
4239
  Fr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4240
4240
  });
4241
- function Es(e) {
4242
- return new Ts({
4241
+ function Ts(e) {
4242
+ return new ws({
4243
4243
  type: "nullable",
4244
4244
  innerType: e
4245
4245
  });
4246
4246
  }
4247
- var Ds = /*@__PURE__*/ _("ZodDefault", (e, t) => {
4247
+ var Es = /*@__PURE__*/ g("ZodDefault", (e, t) => {
4248
4248
  Ir.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4249
4249
  });
4250
- function Os(e, t) {
4251
- return new Ds({
4250
+ function Ds(e, t) {
4251
+ return new Es({
4252
4252
  type: "default",
4253
4253
  innerType: e,
4254
4254
  get defaultValue() {
4255
- return typeof t == "function" ? t() : ie(t);
4255
+ return typeof t == "function" ? t() : ae(t);
4256
4256
  }
4257
4257
  });
4258
4258
  }
4259
- var ks = /*@__PURE__*/ _("ZodPrefault", (e, t) => {
4259
+ var Os = /*@__PURE__*/ g("ZodPrefault", (e, t) => {
4260
4260
  Rr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4261
4261
  });
4262
- function As(e, t) {
4263
- return new ks({
4262
+ function ks(e, t) {
4263
+ return new Os({
4264
4264
  type: "prefault",
4265
4265
  innerType: e,
4266
4266
  get defaultValue() {
4267
- return typeof t == "function" ? t() : ie(t);
4267
+ return typeof t == "function" ? t() : ae(t);
4268
4268
  }
4269
4269
  });
4270
4270
  }
4271
- var js = /*@__PURE__*/ _("ZodNonOptional", (e, t) => {
4271
+ var As = /*@__PURE__*/ g("ZodNonOptional", (e, t) => {
4272
4272
  zr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4273
4273
  });
4274
- function Ms(e, t) {
4275
- return new js({
4274
+ function js(e, t) {
4275
+ return new As({
4276
4276
  type: "nonoptional",
4277
4277
  innerType: e,
4278
- ...h(t)
4278
+ ...m(t)
4279
4279
  });
4280
4280
  }
4281
- var Ns = /*@__PURE__*/ _("ZodCatch", (e, t) => {
4281
+ var Ms = /*@__PURE__*/ g("ZodCatch", (e, t) => {
4282
4282
  Hr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4283
4283
  });
4284
- function Ps(e, t) {
4285
- return new Ns({
4284
+ function Ns(e, t) {
4285
+ return new Ms({
4286
4286
  type: "catch",
4287
4287
  innerType: e,
4288
- catchValue: typeof t == "function" ? t : ze(t)
4288
+ catchValue: typeof t == "function" ? t : Be(t)
4289
4289
  });
4290
4290
  }
4291
- var Fs = /*@__PURE__*/ _("ZodPipe", (e, t) => {
4291
+ var Ps = /*@__PURE__*/ g("ZodPipe", (e, t) => {
4292
4292
  Ur.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.in = t.in, e.out = t.out;
4293
4293
  });
4294
- function Is(e, t) {
4295
- return new Fs({
4294
+ function Fs(e, t) {
4295
+ return new Ps({
4296
4296
  type: "pipe",
4297
4297
  in: e,
4298
4298
  out: t
4299
4299
  });
4300
4300
  }
4301
- var Ls = /*@__PURE__*/ _("ZodReadonly", (e, t) => {
4301
+ var Is = /*@__PURE__*/ g("ZodReadonly", (e, t) => {
4302
4302
  Gr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4303
4303
  });
4304
- function Rs(e) {
4305
- return new Ls({
4304
+ function Ls(e) {
4305
+ return new Is({
4306
4306
  type: "readonly",
4307
4307
  innerType: e
4308
4308
  });
4309
4309
  }
4310
- var zs = /*@__PURE__*/ _("ZodLazy", (e, t) => {
4310
+ var Rs = /*@__PURE__*/ g("ZodLazy", (e, t) => {
4311
4311
  qr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4312
4312
  });
4313
- function Bs(e) {
4314
- return new zs({
4313
+ function zs(e) {
4314
+ return new Rs({
4315
4315
  type: "lazy",
4316
4316
  getter: e
4317
4317
  });
4318
4318
  }
4319
- var Vs = /*@__PURE__*/ _("ZodCustom", (e, t) => {
4319
+ var Bs = /*@__PURE__*/ g("ZodCustom", (e, t) => {
4320
4320
  Jr.init(e, t), T.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r);
4321
4321
  });
4322
- function Hs(e, t = {}) {
4323
- return /* @__PURE__ */ ma(Vs, e, t);
4322
+ function Vs(e, t = {}) {
4323
+ return /* @__PURE__ */ ma(Bs, e, t);
4324
4324
  }
4325
- function Us(e, t) {
4325
+ function Hs(e, t) {
4326
4326
  return /* @__PURE__ */ ha(e, t);
4327
4327
  }
4328
- function Ws(e) {
4329
- let t = Bs(() => M([
4328
+ function Us(e) {
4329
+ let t = zs(() => N([
4330
4330
  E(e),
4331
4331
  O(),
4332
4332
  k(),
4333
4333
  ts(),
4334
4334
  A(t),
4335
- N(E(), t)
4335
+ P(E(), t)
4336
4336
  ]));
4337
4337
  return t;
4338
4338
  }
4339
4339
  //#endregion
4340
4340
  //#region src/control/common/eventSources.ts
4341
- var Gs = E().min(1).max(256), Ks = E().regex(/^[a-z][a-z0-9_.]{0,127}$/), qs = E().trim().min(1).max(128);
4342
- cs({
4343
- version: F(1),
4344
- sourceId: Gs,
4341
+ var Ws = E().min(1).max(256), Gs = E().regex(/^[a-z][a-z0-9_.]{0,127}$/), Ks = E().trim().min(1).max(128);
4342
+ M({
4343
+ version: I(1),
4344
+ sourceId: Ws,
4345
4345
  revision: Qo().positive(),
4346
- name: qs,
4347
- provider: P(["feishu", "feishu_app_bot"]),
4348
- appId: Gs,
4349
- tenantKey: Gs,
4350
- connectionId: Gs,
4351
- teamId: Gs.nullable(),
4346
+ name: Ks,
4347
+ provider: F(["feishu", "feishu_app_bot"]),
4348
+ appId: Ws,
4349
+ tenantKey: Ws,
4350
+ connectionId: Ws,
4351
+ teamId: Ws.nullable(),
4352
4352
  enabled: k(),
4353
- eventTypes: A(Ks),
4353
+ eventTypes: A(Gs),
4354
4354
  manageSubscriptions: k(),
4355
4355
  verificationTokenConfigured: k(),
4356
4356
  encryptKeyConfigured: k(),
@@ -4358,10 +4358,10 @@ cs({
4358
4358
  verifiedAt: E().nullable(),
4359
4359
  lastReceivedAt: E().nullable(),
4360
4360
  updatedAt: E(),
4361
- consumers: A(cs({
4362
- flowId: Gs,
4361
+ consumers: A(M({
4362
+ flowId: Ws,
4363
4363
  flowName: E(),
4364
- triggerNodeId: Gs
4364
+ triggerNodeId: Ws
4365
4365
  }))
4366
4366
  }), new Map([
4367
4367
  "en",
@@ -4374,7 +4374,7 @@ cs({
4374
4374
  ].map((e) => [e.toLowerCase(), e]));
4375
4375
  //#endregion
4376
4376
  //#region src/control/common/errors.ts
4377
- var I = {
4377
+ var L = {
4378
4378
  authenticationRequired: "authentication.required",
4379
4379
  authorizationDenied: "authorization.denied",
4380
4380
  bindingUnresolved: "binding.unresolved",
@@ -4389,6 +4389,8 @@ var I = {
4389
4389
  eventSourceNotFound: "event-source.not-found",
4390
4390
  eventSourceConflict: "event-source.conflict",
4391
4391
  flowInvalid: "flow.invalid",
4392
+ flowRepairRequired: "flow.repair-required",
4393
+ flowUpgradeRequired: "flow.upgrade-required",
4392
4394
  flowNotFound: "flow.not-found",
4393
4395
  flowBusy: "flow.busy",
4394
4396
  flowConflict: "flow.conflict",
@@ -4416,33 +4418,33 @@ var I = {
4416
4418
  variableLimitReached: "variable.limit-reached",
4417
4419
  variableNotFound: "variable.not-found"
4418
4420
  };
4419
- I.eventSourceInvalid, I.eventSourceIdentityUnavailable, I.eventSourceNotFound, I.eventSourceConflict, I.authenticationRequired, I.authorizationDenied, I.bindingUnresolved, I.connectorActionNotFound, I.connectorUnconfigured, I.connectorUnavailable, I.connectorConsoleUnconfigured, I.engineUnavailable, I.engineUnsupported, I.flowInvalid, I.flowNotFound, I.flowBusy, I.flowConflict, I.flowPresentationConflict, I.flowRevisionConflict, I.liveConflict, I.liveNotFound, I.pageInvalidCursor, I.publicationConflict, I.publicationNotFound, I.publicationUnsupported, I.publishOperationNotFound, I.routeNotFound, I.runConflict, I.runEventsExpired, I.runInvalid, I.runNotFound, I.runNotTerminal, I.runOverloaded, I.runWaitNotFound, I.triggerKeyInvalid, I.triggerKeyNotFound, I.triggerNotFound, I.variableInvalid, I.variableLimitReached, I.variableNotFound;
4420
- var Js = class extends Error {
4421
+ L.eventSourceInvalid, L.eventSourceIdentityUnavailable, L.eventSourceNotFound, L.eventSourceConflict, L.authenticationRequired, L.authorizationDenied, L.bindingUnresolved, L.connectorActionNotFound, L.connectorUnconfigured, L.connectorUnavailable, L.connectorConsoleUnconfigured, L.engineUnavailable, L.engineUnsupported, L.flowInvalid, L.flowRepairRequired, L.flowUpgradeRequired, L.flowNotFound, L.flowBusy, L.flowConflict, L.flowPresentationConflict, L.flowRevisionConflict, L.liveConflict, L.liveNotFound, L.pageInvalidCursor, L.publicationConflict, L.publicationNotFound, L.publicationUnsupported, L.publishOperationNotFound, L.routeNotFound, L.runConflict, L.runEventsExpired, L.runInvalid, L.runNotFound, L.runNotTerminal, L.runOverloaded, L.runWaitNotFound, L.triggerKeyInvalid, L.triggerKeyNotFound, L.triggerNotFound, L.variableInvalid, L.variableLimitReached, L.variableNotFound;
4422
+ var qs = class extends Error {
4421
4423
  constructor(e, t, n) {
4422
4424
  super(n), this.code = t, this.name = "ApiError", this.status = e;
4423
4425
  }
4424
4426
  };
4425
4427
  //#endregion
4426
4428
  //#region src/control/common/decoding.ts
4427
- function L() {
4428
- throw new Js(502, "response.invalid", "The Control API returned an invalid response.");
4429
+ function R() {
4430
+ throw new qs(502, "response.invalid", "The Control API returned an invalid response.");
4429
4431
  }
4430
- function Ys(e) {
4431
- return typeof e != "object" || !e || Array.isArray(e) ? L() : e;
4432
+ function Js(e) {
4433
+ return typeof e != "object" || !e || Array.isArray(e) ? R() : e;
4432
4434
  }
4433
- function R(e) {
4434
- return typeof e == "string" && e.length > 0 ? e : L();
4435
+ function z(e) {
4436
+ return typeof e == "string" && e.length > 0 ? e : R();
4435
4437
  }
4436
- function Xs(e) {
4437
- return Number.isSafeInteger(e) ? e : L();
4438
+ function Ys(e) {
4439
+ return Number.isSafeInteger(e) ? e : R();
4438
4440
  }
4439
- function Zs(e) {
4441
+ function Xs(e) {
4440
4442
  if (e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e)) return e;
4441
- if (Array.isArray(e)) return e.map(Zs);
4442
- let t = Ys(e);
4443
- return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, Zs(t)]));
4443
+ if (Array.isArray(e)) return e.map(Xs);
4444
+ let t = Js(e);
4445
+ return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, Xs(t)]));
4444
4446
  }
4445
- cs({
4447
+ M({
4446
4448
  pointer: E().max(4096).default(""),
4447
4449
  offset: O().int().nonnegative().default(0),
4448
4450
  limit: O().int().min(1).max(100).default(20),
@@ -4450,9 +4452,9 @@ cs({
4450
4452
  });
4451
4453
  //#endregion
4452
4454
  //#region src/control/common/results.ts
4453
- var Qs = Ws(), $s = cs({
4455
+ var Zs = Us(), Qs = M({
4454
4456
  pointer: E(),
4455
- type: P([
4457
+ type: F([
4456
4458
  "object",
4457
4459
  "array",
4458
4460
  "string",
@@ -4462,130 +4464,144 @@ var Qs = Ws(), $s = cs({
4462
4464
  ]),
4463
4465
  length: O().int().nonnegative().optional(),
4464
4466
  complete: k(),
4465
- value: Qs.optional()
4466
- }), ec = $s.extend({
4467
+ value: Zs.optional()
4468
+ }), $s = Qs.extend({
4467
4469
  offset: O().int().nonnegative(),
4468
4470
  nextOffset: O().int().positive().optional(),
4469
- entries: A($s).optional()
4470
- }), tc = cs({
4471
+ entries: A(Qs).optional()
4472
+ }), ec = M({
4471
4473
  resultId: E().min(1),
4472
4474
  callId: E().min(1),
4473
4475
  toolId: E().min(1),
4474
- source: ds("kind", [cs({
4475
- kind: F("connector"),
4476
+ source: us("kind", [M({
4477
+ kind: I("connector"),
4476
4478
  action: E().min(1)
4477
- }), cs({ kind: F("code") })]),
4479
+ }), M({ kind: I("code") })]),
4478
4480
  bytes: O().int().nonnegative(),
4479
4481
  digest: E().regex(/^[a-f0-9]{64}$/),
4480
4482
  createdAt: E().datetime()
4481
4483
  });
4482
- cs({
4483
- version: F(1),
4484
+ M({
4485
+ version: I(1),
4484
4486
  runId: E(),
4485
- results: A(tc),
4487
+ results: A(ec),
4486
4488
  nextAfter: E().optional()
4487
- }), cs({
4488
- version: F(1),
4489
+ }), M({
4490
+ version: I(1),
4489
4491
  runId: E(),
4490
- result: tc,
4491
- page: ec
4492
+ result: ec,
4493
+ page: $s
4492
4494
  }), new TextEncoder();
4493
4495
  //#endregion
4494
- //#region src/flow/common/changeSchema.ts
4495
- var z = E(), B = Ws(), nc = A(z), rc = j({
4496
- description: z.optional(),
4497
- jsonSchema: B,
4496
+ //#region src/flow/common/triggerScheduleSchema.ts
4497
+ var tc = A(N([j({
4498
+ type: I("cron"),
4499
+ expression: E(),
4500
+ timezone: E()
4501
+ }), j({
4502
+ type: I("every"),
4503
+ unit: F([
4504
+ "day",
4505
+ "hour",
4506
+ "minute",
4507
+ "month",
4508
+ "week"
4509
+ ]),
4510
+ value: O()
4511
+ })])), B = E(), nc = Us(), rc = A(B), ic = j({
4512
+ description: B.optional(),
4513
+ jsonSchema: nc,
4498
4514
  nullable: k(),
4499
- handle: z
4500
- }), V = rc.extend({ value: B.optional() }), ic = j({
4515
+ handle: B
4516
+ }), V = ic.extend({ value: nc.optional() }), ac = j({
4501
4517
  collapsed: k().optional(),
4502
- group: z
4503
- }), ac = j({
4504
- kind: F("node"),
4505
- nodeId: z,
4506
- output: z
4518
+ group: B
4507
4519
  }), oc = j({
4508
- kind: F("flow"),
4509
- input: z
4510
- }), sc = M([
4511
- ac,
4520
+ kind: I("node"),
4521
+ nodeId: B,
4522
+ output: B
4523
+ }), sc = j({
4524
+ kind: I("flow"),
4525
+ input: B
4526
+ }), cc = N([
4512
4527
  oc,
4528
+ sc,
4513
4529
  j({
4514
- kind: F("binding"),
4515
- bindingId: z
4530
+ kind: I("binding"),
4531
+ bindingId: B
4516
4532
  })
4517
- ]), cc = M([j({
4518
- kind: F("value"),
4519
- value: B
4533
+ ]), lc = N([j({
4534
+ kind: I("value"),
4535
+ value: nc
4520
4536
  }), j({
4521
- kind: F("sources"),
4522
- sources: A(sc)
4523
- })]), lc = N(z, cc), uc = {
4524
- inputs: A(M([V, ic])),
4525
- outputs: A(M([rc, ic]))
4526
- }, dc = j({
4527
- kind: F("connector"),
4528
- action: z,
4529
- connectionId: z.optional(),
4537
+ kind: I("sources"),
4538
+ sources: A(cc)
4539
+ })]), uc = P(B, lc), dc = {
4540
+ inputs: A(N([V, ac])),
4541
+ outputs: A(N([ic, ac]))
4542
+ }, fc = j({
4543
+ kind: I("connector"),
4544
+ action: B,
4545
+ connectionId: B.optional(),
4530
4546
  connections: A(j({
4531
- connectionId: z,
4532
- alias: z.optional()
4547
+ connectionId: B,
4548
+ alias: B.optional()
4533
4549
  }))
4534
- }), fc = j({
4535
- ...uc,
4536
- name: z,
4537
- moduleId: z,
4538
- capabilities: A(dc).optional()
4539
- }), pc = M([j({
4540
- kind: F("value"),
4541
- value: B
4550
+ }), pc = j({
4551
+ ...dc,
4552
+ name: B,
4553
+ moduleId: B,
4554
+ capabilities: A(fc).optional()
4555
+ }), mc = N([j({
4556
+ kind: I("value"),
4557
+ value: nc
4542
4558
  }), j({
4543
- kind: F("input"),
4544
- input: z
4545
- })]), mc = M([pc, j({ kind: F("model") })]), hc = j({
4546
- ...uc,
4547
- name: z,
4548
- executor: M([
4559
+ kind: I("input"),
4560
+ input: B
4561
+ })]), hc = N([mc, j({ kind: I("model") })]), gc = j({
4562
+ ...dc,
4563
+ name: B,
4564
+ executor: N([
4549
4565
  j({
4550
- kind: F("connector"),
4551
- action: z,
4552
- connectionId: z.optional()
4566
+ kind: I("connector"),
4567
+ action: B,
4568
+ connectionId: B.optional()
4553
4569
  }),
4554
4570
  j({
4555
- kind: F("llm"),
4556
- mode: P(["chat", "json"])
4571
+ kind: I("llm"),
4572
+ mode: F(["chat", "json"])
4557
4573
  }),
4558
4574
  j({
4559
- kind: F("agent"),
4575
+ kind: I("agent"),
4560
4576
  code: k().optional(),
4561
- model: z,
4562
- prompt: pc,
4563
- system: z,
4577
+ model: B,
4578
+ prompt: mc,
4579
+ system: B,
4564
4580
  maxRounds: O(),
4565
4581
  tools: A(j({
4566
- id: z,
4567
- name: z,
4568
- description: z,
4569
- action: z,
4570
- connectionId: z.optional(),
4582
+ id: B,
4583
+ name: B,
4584
+ description: B,
4585
+ action: B,
4586
+ connectionId: B.optional(),
4571
4587
  approval: k(),
4572
- inputs: A(V.extend({ source: mc }))
4588
+ inputs: A(V.extend({ source: hc }))
4573
4589
  })),
4574
4590
  notification: j({
4575
- taskId: z,
4576
- messageHandle: z,
4577
- inputs: N(z, pc)
4591
+ taskId: B,
4592
+ messageHandle: B,
4593
+ inputs: P(B, mc)
4578
4594
  }).optional()
4579
4595
  })
4580
4596
  ])
4581
- }), gc = {
4597
+ }), _c = {
4582
4598
  input: V,
4583
4599
  cases: A(j({
4584
- output: z,
4585
- relation: P(["all", "any"]),
4600
+ output: B,
4601
+ relation: F(["all", "any"]),
4586
4602
  expressions: A(j({
4587
- input: z,
4588
- operator: P([
4603
+ input: B,
4604
+ operator: F([
4589
4605
  "!=",
4590
4606
  "<",
4591
4607
  "<=",
@@ -4607,58 +4623,44 @@ var z = E(), B = Ws(), nc = A(z), rc = j({
4607
4623
  "notHasValue",
4608
4624
  "startsWith"
4609
4625
  ]),
4610
- value: B.optional()
4626
+ value: nc.optional()
4611
4627
  }))
4612
4628
  })),
4613
- defaultOutput: z.optional()
4614
- }, _c = {
4615
- actions: M([hs([F("continue")]), hs([F("approve"), F("reject")])]),
4616
- prompt: z
4629
+ defaultOutput: B.optional()
4617
4630
  }, vc = {
4618
- inputsDef: A(V),
4631
+ actions: N([ms([I("continue")]), ms([I("approve"), I("reject")])]),
4632
+ prompt: B
4633
+ }, yc = {
4634
+ bodyFields: A(V),
4619
4635
  options: j({
4620
- allowedMethods: nc.optional(),
4621
- allowedOrigins: nc.optional(),
4636
+ allowedMethods: rc.optional(),
4637
+ allowedOrigins: rc.optional(),
4622
4638
  noResponseBody: k().optional(),
4623
- responseData: z.optional(),
4624
- responseHeaders: N(z, z).optional(),
4639
+ responseData: B.optional(),
4640
+ responseHeaders: P(B, B).optional(),
4625
4641
  responseStatusCode: O().optional()
4626
4642
  }).optional()
4627
- }, yc = A(M([j({
4628
- type: F("cron"),
4629
- expression: z,
4630
- timezone: z
4631
- }), j({
4632
- type: F("every"),
4633
- unit: P([
4634
- "day",
4635
- "hour",
4636
- "minute",
4637
- "month",
4638
- "week"
4639
- ]),
4640
- value: O()
4641
- })])), bc = {
4642
- configSchema: B,
4643
- definitionVersion: O(),
4644
- description: z,
4645
- displayName: z,
4646
- key: z,
4647
- name: z,
4648
- payloadSchema: B,
4649
- provider: z
4643
+ }, bc = {
4644
+ configSchema: nc,
4645
+ definitionVersion: I(2),
4646
+ description: B,
4647
+ displayName: B,
4648
+ key: B,
4649
+ name: B,
4650
+ outputs: A(ic).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4651
+ provider: B
4650
4652
  }, xc = j({
4651
4653
  body: j({
4652
4654
  allowArray: k(),
4653
4655
  allowEmpty: k(),
4654
- formats: A(P([
4656
+ formats: A(F([
4655
4657
  "form",
4656
4658
  "json",
4657
4659
  "multipart",
4658
4660
  "text"
4659
4661
  ]))
4660
4662
  }),
4661
- methods: A(P([
4663
+ methods: A(F([
4662
4664
  "DELETE",
4663
4665
  "GET",
4664
4666
  "HEAD",
@@ -4668,134 +4670,135 @@ var z = E(), B = Ws(), nc = A(z), rc = j({
4668
4670
  ])),
4669
4671
  successStatus: O()
4670
4672
  }), Sc = {
4671
- name: z,
4672
- description: z.optional(),
4673
- icon: z.optional()
4673
+ name: B,
4674
+ description: B.optional(),
4675
+ icon: B.optional()
4674
4676
  }, Cc = {
4675
- inputs: lc,
4676
- name: z.optional(),
4677
- description: z.optional(),
4678
- icon: z.optional(),
4677
+ maxExecutions: O().int().positive().max(2 ** 53 - 1).optional(),
4678
+ inputs: uc,
4679
+ name: B.optional(),
4680
+ description: B.optional(),
4681
+ icon: B.optional(),
4679
4682
  timeoutMs: O().optional()
4680
- }, wc = M([
4683
+ }, wc = N([
4681
4684
  j({
4682
4685
  ...Cc,
4683
- kind: F("condition"),
4684
- ...gc
4686
+ kind: I("condition"),
4687
+ ..._c
4685
4688
  }),
4686
4689
  j({
4687
4690
  ...Cc,
4688
4691
  inputs: rs().transform(() => ({})).default({}),
4689
- kind: F("value"),
4692
+ kind: I("value"),
4690
4693
  values: A(V)
4691
4694
  }),
4692
4695
  j({
4693
4696
  ...Cc,
4694
- kind: F("subflow"),
4695
- subflowId: z
4697
+ kind: I("subflow"),
4698
+ subflowId: B
4696
4699
  }),
4697
4700
  j({
4698
4701
  ...Cc,
4699
- kind: F("task"),
4700
- task: fc,
4702
+ kind: I("task"),
4703
+ task: pc,
4701
4704
  additionalInputs: A(V).optional()
4702
4705
  }),
4703
4706
  j({
4704
4707
  ...Cc,
4705
- kind: F("task"),
4706
- taskId: z,
4708
+ kind: I("task"),
4709
+ taskId: B,
4707
4710
  additionalInputs: A(V).optional()
4708
4711
  }),
4709
- cs({
4712
+ M({
4710
4713
  ...Cc,
4711
- kind: F("wait"),
4714
+ kind: I("wait"),
4712
4715
  input: V,
4713
- ..._c
4716
+ ...vc
4714
4717
  }).omit({ timeoutMs: !0 }),
4715
4718
  j({
4716
4719
  ...Sc,
4717
- kind: F("manual")
4720
+ kind: I("manual")
4718
4721
  }),
4719
4722
  j({
4720
4723
  ...Sc,
4721
- kind: F("webhook"),
4722
- ...vc
4724
+ kind: I("webhook"),
4725
+ ...yc
4723
4726
  }),
4724
4727
  j({
4725
4728
  ...Sc,
4726
- kind: F("cron"),
4727
- cronTimes: yc
4729
+ kind: I("cron"),
4730
+ cronTimes: tc
4728
4731
  }),
4729
4732
  j({
4730
4733
  ...Sc,
4731
- kind: F("poll"),
4732
- bindingId: z,
4733
- config: N(z, B),
4734
+ kind: I("poll"),
4735
+ bindingId: B,
4736
+ config: P(B, nc),
4734
4737
  definition: j({
4735
4738
  ...bc,
4736
- type: F("poll")
4739
+ type: I("poll")
4737
4740
  }),
4738
- pollTimes: yc
4741
+ pollTimes: tc
4739
4742
  }),
4740
4743
  j({
4741
4744
  ...Sc,
4742
- kind: F("integration"),
4743
- bindingId: z,
4744
- config: N(z, B),
4745
+ kind: I("integration"),
4746
+ bindingId: B,
4747
+ config: P(B, nc),
4745
4748
  definition: j({
4746
4749
  ...bc,
4747
- type: F("integration"),
4750
+ type: I("integration"),
4748
4751
  endpoint: xc
4749
4752
  })
4750
4753
  })
4751
- ]), Tc = M([j({ kind: F("flow") }), j({
4752
- kind: F("subflow"),
4753
- id: z
4754
+ ]), Tc = N([j({ kind: I("flow") }), j({
4755
+ kind: I("subflow"),
4756
+ id: B
4754
4757
  })]), Ec = j({
4755
- source: z,
4756
- target: z,
4757
- sourceHandle: z.optional()
4758
+ source: B,
4759
+ target: B,
4760
+ sourceHandle: B.optional()
4758
4761
  }), H = {
4759
- nodeId: z,
4762
+ nodeId: B,
4760
4763
  target: Tc
4761
4764
  }, Dc = j({
4762
- name: z,
4765
+ name: B,
4763
4766
  inputs: A(V),
4764
- outputs: A(rc.extend({ sources: A(M([ac, oc])) }))
4767
+ outputs: A(ic.extend({ sources: A(N([oc, sc])) }))
4765
4768
  }), Oc = j({
4766
- nodes: N(z, wc),
4769
+ nodes: P(B, wc),
4767
4770
  edges: A(Ec).default([])
4768
4771
  }), kc = j({
4769
- kind: P(["connection", "variable"]),
4770
- target: z
4772
+ kind: F(["connection", "variable"]),
4773
+ target: B
4771
4774
  }), Ac = j({
4772
- name: z,
4773
- imports: nc,
4774
- source: z
4775
+ name: B,
4776
+ imports: rc,
4777
+ source: B
4775
4778
  }), jc = j({
4776
- bindings: N(z, kc),
4779
+ bindings: P(B, kc),
4777
4780
  graph: Oc,
4778
- subflows: N(z, Dc.extend({ graph: Oc })),
4779
- tasks: N(z, hc)
4781
+ subflows: P(B, Dc.extend({ graph: Oc })),
4782
+ tasks: P(B, gc)
4780
4783
  });
4781
4784
  j({
4782
- modelVersion: F(1),
4785
+ modelVersion: I(2),
4783
4786
  document: jc,
4784
- modules: N(z, Ac)
4787
+ modules: P(B, Ac)
4785
4788
  }).extend({
4786
- kind: F("open-flow-flow-revision"),
4787
- version: F(1)
4789
+ kind: I("open-flow-flow-revision"),
4790
+ version: I(1)
4788
4791
  });
4789
4792
  var Mc = {
4790
4793
  "binding.create": {
4791
- bindingId: z,
4794
+ bindingId: B,
4792
4795
  binding: kc
4793
4796
  },
4794
- "binding.delete": { bindingId: z },
4797
+ "binding.delete": { bindingId: B },
4795
4798
  "binding.target.set": {
4796
- bindingId: z,
4797
- before: z,
4798
- value: z
4799
+ bindingId: B,
4800
+ before: B,
4801
+ value: B
4799
4802
  },
4800
4803
  "graph.edge.connect": {
4801
4804
  target: Tc,
@@ -4810,28 +4813,38 @@ var Mc = {
4810
4813
  node: wc
4811
4814
  },
4812
4815
  "graph.node.delete": H,
4813
- "graph.node.field.set": M([j({
4814
- ...H,
4815
- kind: F("graph.node.field.set"),
4816
- field: P([
4817
- "description",
4818
- "icon",
4819
- "name"
4820
- ]),
4821
- before: z.optional(),
4822
- value: z.optional()
4823
- }), j({
4824
- ...H,
4825
- kind: F("graph.node.field.set"),
4826
- field: F("timeoutMs"),
4827
- before: O().optional(),
4828
- value: O().optional()
4829
- })]),
4816
+ "graph.node.field.set": N([
4817
+ j({
4818
+ ...H,
4819
+ kind: I("graph.node.field.set"),
4820
+ field: F([
4821
+ "description",
4822
+ "icon",
4823
+ "name"
4824
+ ]),
4825
+ before: B.optional(),
4826
+ value: B.optional()
4827
+ }),
4828
+ j({
4829
+ ...H,
4830
+ kind: I("graph.node.field.set"),
4831
+ field: I("maxExecutions"),
4832
+ before: O().int().positive().max(2 ** 53 - 1).optional(),
4833
+ value: O().int().positive().max(2 ** 53 - 1).optional()
4834
+ }),
4835
+ j({
4836
+ ...H,
4837
+ kind: I("graph.node.field.set"),
4838
+ field: I("timeoutMs"),
4839
+ before: O().optional(),
4840
+ value: O().optional()
4841
+ })
4842
+ ]),
4830
4843
  "graph.node.input.set": {
4831
4844
  ...H,
4832
- handle: z,
4833
- before: cc.optional(),
4834
- value: cc.optional()
4845
+ handle: B,
4846
+ before: lc.optional(),
4847
+ value: lc.optional()
4835
4848
  },
4836
4849
  "graph.node.additional-inputs.set": {
4837
4850
  ...H,
@@ -4840,8 +4853,8 @@ var Mc = {
4840
4853
  },
4841
4854
  "graph.node.condition.set": {
4842
4855
  ...H,
4843
- before: j(gc),
4844
- value: j(gc)
4856
+ before: j(_c),
4857
+ value: j(_c)
4845
4858
  },
4846
4859
  "graph.node.values.set": {
4847
4860
  ...H,
@@ -4850,111 +4863,111 @@ var Mc = {
4850
4863
  },
4851
4864
  "graph.node.wait.set": {
4852
4865
  ...H,
4853
- target: j({ kind: F("flow") }),
4854
- before: j(_c),
4855
- value: j(_c)
4866
+ target: j({ kind: I("flow") }),
4867
+ before: j(vc),
4868
+ value: j(vc)
4856
4869
  },
4857
4870
  "graph.node.webhook.set": {
4858
4871
  ...H,
4859
- target: j({ kind: F("flow") }),
4860
- before: j(vc),
4861
- value: j(vc)
4872
+ target: j({ kind: I("flow") }),
4873
+ before: j(yc),
4874
+ value: j(yc)
4862
4875
  },
4863
4876
  "graph.node.task.ports.set": {
4864
4877
  ...H,
4865
- before: j(uc),
4866
- value: j(uc)
4878
+ before: j(dc),
4879
+ value: j(dc)
4867
4880
  },
4868
4881
  "graph.node.task.name.set": {
4869
4882
  ...H,
4870
- before: z,
4871
- value: z
4883
+ before: B,
4884
+ value: B
4872
4885
  },
4873
4886
  "graph.node.task.capabilities.set": {
4874
4887
  ...H,
4875
- before: A(dc).optional(),
4876
- value: A(dc).optional()
4888
+ before: A(fc).optional(),
4889
+ value: A(fc).optional()
4877
4890
  },
4878
4891
  "graph.trigger.config.set": {
4879
- nodeId: z,
4880
- name: z,
4881
- before: B.optional(),
4882
- value: B.optional()
4892
+ nodeId: B,
4893
+ name: B,
4894
+ before: nc.optional(),
4895
+ value: nc.optional()
4883
4896
  },
4884
4897
  "graph.trigger.schedule.set": {
4885
- nodeId: z,
4886
- before: yc,
4887
- value: yc
4898
+ nodeId: B,
4899
+ before: tc,
4900
+ value: tc
4888
4901
  },
4889
4902
  "module.create": {
4890
- moduleId: z,
4903
+ moduleId: B,
4891
4904
  module: Ac
4892
4905
  },
4893
- "module.delete": { moduleId: z },
4906
+ "module.delete": { moduleId: B },
4894
4907
  "module.rename": {
4895
- moduleId: z,
4896
- before: z,
4897
- name: z
4908
+ moduleId: B,
4909
+ before: B,
4910
+ name: B
4898
4911
  },
4899
4912
  "module.source.replace": {
4900
- moduleId: z,
4901
- beforeImports: nc,
4902
- beforeSource: z,
4903
- imports: nc,
4904
- source: z
4913
+ moduleId: B,
4914
+ beforeImports: rc,
4915
+ beforeSource: B,
4916
+ imports: rc,
4917
+ source: B
4905
4918
  },
4906
4919
  "subflow.create": {
4907
- subflowId: z,
4920
+ subflowId: B,
4908
4921
  subflow: Dc.extend({ graph: Oc })
4909
4922
  },
4910
4923
  "subflow.definition.set": {
4911
- subflowId: z,
4924
+ subflowId: B,
4912
4925
  before: Dc,
4913
4926
  definition: Dc
4914
4927
  },
4915
- "subflow.delete": { subflowId: z },
4928
+ "subflow.delete": { subflowId: B },
4916
4929
  "task.create": {
4917
- taskId: z,
4918
- task: hc
4930
+ taskId: B,
4931
+ task: gc
4919
4932
  },
4920
- "task.delete": { taskId: z },
4933
+ "task.delete": { taskId: B },
4921
4934
  "task.connector.connection.set": {
4922
- taskId: z,
4923
- before: z.optional(),
4924
- value: z.optional()
4935
+ taskId: B,
4936
+ before: B.optional(),
4937
+ value: B.optional()
4925
4938
  },
4926
4939
  "task.agent.set": {
4927
- taskId: z,
4928
- before: hc,
4929
- value: hc
4940
+ taskId: B,
4941
+ before: gc,
4942
+ value: gc
4930
4943
  },
4931
4944
  "task.llm.mode.set": {
4932
- taskId: z,
4933
- before: P(["chat", "json"]),
4934
- value: P(["chat", "json"])
4945
+ taskId: B,
4946
+ before: F(["chat", "json"]),
4947
+ value: F(["chat", "json"])
4935
4948
  },
4936
4949
  "task.name.set": {
4937
- taskId: z,
4938
- before: z,
4939
- value: z
4950
+ taskId: B,
4951
+ before: B,
4952
+ value: B
4940
4953
  }
4941
4954
  };
4942
- A(M([...new Map(Object.entries(Mc).map(([e, t]) => [e, t instanceof T ? t : j({
4943
- kind: F(e),
4955
+ A(N([...new Map(Object.entries(Mc).map(([e, t]) => [e, t instanceof T ? t : j({
4956
+ kind: I(e),
4944
4957
  ...t
4945
4958
  })])).values()])).min(1), new TextEncoder();
4946
- var Nc = N(E(), rs()), Pc = j({
4959
+ var Nc = P(E(), rs()), Pc = j({
4947
4960
  jsonSchema: rs(),
4948
4961
  nullable: k(),
4949
4962
  value: rs().optional(),
4950
4963
  description: E().optional()
4951
- }).strict(), Fc = N(E(), Pc), Ic = M([j({
4952
- kind: F("value"),
4964
+ }).strict(), Fc = P(E(), Pc), Ic = N([j({
4965
+ kind: I("value"),
4953
4966
  value: rs()
4954
4967
  }).strict(), j({
4955
- kind: F("sources"),
4968
+ kind: I("sources"),
4956
4969
  sources: A(j({
4957
- kind: F("node"),
4970
+ kind: I("node"),
4958
4971
  nodeId: E(),
4959
4972
  output: E()
4960
4973
  }).strict())
@@ -4962,37 +4975,37 @@ var Nc = N(E(), rs()), Pc = j({
4962
4975
  name: E().optional(),
4963
4976
  description: E().optional(),
4964
4977
  icon: E().optional()
4965
- }, Rc = M([
4978
+ }, Rc = N([
4966
4979
  j({
4967
4980
  ...Lc,
4968
- kind: F("cron"),
4981
+ kind: I("cron"),
4969
4982
  cronTimes: A(rs())
4970
4983
  }).strict(),
4971
4984
  j({
4972
4985
  ...Lc,
4973
- kind: F("manual")
4986
+ kind: I("manual")
4974
4987
  }).strict(),
4975
4988
  j({
4976
4989
  ...Lc,
4977
- kind: F("task"),
4978
- concurrency: F(1).optional(),
4979
- inputs: N(E(), Ic),
4990
+ kind: I("task"),
4991
+ concurrency: I(1).optional(),
4992
+ inputs: P(E(), Ic),
4980
4993
  task: j({
4981
4994
  name: E(),
4982
4995
  moduleId: E(),
4983
4996
  inputs: Fc,
4984
- outputs: N(E(), Pc.omit({ value: !0 }))
4997
+ outputs: P(E(), Pc.omit({ value: !0 }))
4985
4998
  }).strict()
4986
4999
  }).strict()
4987
5000
  ]);
4988
5001
  j({
4989
5002
  name: E(),
4990
- graph: j({ nodes: N(E(), Rc) }).strict()
5003
+ graph: j({ nodes: P(E(), Rc) }).strict()
4991
5004
  }).strict(), j({
4992
- kind: F("open-flow-project-revision"),
4993
- version: F(1),
4994
- modelVersion: F(1),
4995
- modules: N(E(), j({
5005
+ kind: I("open-flow-project-revision"),
5006
+ version: I(1),
5007
+ modelVersion: N([I(1), I(2)]),
5008
+ modules: P(E(), j({
4996
5009
  name: E(),
4997
5010
  source: E(),
4998
5011
  imports: A(E())
@@ -5007,12 +5020,12 @@ j({
5007
5020
  //#endregion
5008
5021
  //#region src/control/common/api.ts
5009
5022
  function zc(e) {
5010
- let t = Ys(e), n = Xs(t.sequence);
5011
- if (n < 0) return L();
5023
+ let t = Js(e), n = Ys(t.sequence);
5024
+ if (n < 0) return R();
5012
5025
  let r = {
5013
- createdAt: R(t.createdAt),
5026
+ createdAt: z(t.createdAt),
5014
5027
  sequence: n
5015
- }, i = Ys(t.payload), a = t.kind;
5028
+ }, i = Js(t.payload), a = t.kind;
5016
5029
  switch (a) {
5017
5030
  case "run.queued": return {
5018
5031
  ...r,
@@ -5023,44 +5036,44 @@ function zc(e) {
5023
5036
  ...r,
5024
5037
  kind: a,
5025
5038
  payload: {
5026
- flowId: R(i.flowId),
5027
- scopeId: R(i.scopeId),
5028
- ...i.parentScopeId === void 0 ? {} : { parentScopeId: R(i.parentScopeId) }
5039
+ flowId: z(i.flowId),
5040
+ scopeId: z(i.scopeId),
5041
+ ...i.parentScopeId === void 0 ? {} : { parentScopeId: z(i.parentScopeId) }
5029
5042
  }
5030
5043
  };
5031
5044
  case "run.progress": return {
5032
5045
  ...r,
5033
5046
  kind: a,
5034
5047
  payload: {
5035
- flowId: R(i.flowId),
5036
- scopeId: R(i.scopeId),
5048
+ flowId: z(i.flowId),
5049
+ scopeId: z(i.scopeId),
5037
5050
  progress: Bc(i.progress)
5038
5051
  }
5039
5052
  };
5040
5053
  case "run.waiting": return Array.isArray(i.waitIds) ? {
5041
5054
  ...r,
5042
5055
  kind: a,
5043
- payload: { waitIds: i.waitIds.map((e) => R(e)) }
5044
- } : L();
5056
+ payload: { waitIds: i.waitIds.map((e) => z(e)) }
5057
+ } : R();
5045
5058
  case "wait.created": return {
5046
5059
  ...r,
5047
5060
  kind: a,
5048
5061
  payload: {
5049
- expiresAt: R(i.expiresAt),
5050
- nodeId: R(i.nodeId),
5051
- waitId: R(i.waitId),
5052
- waitingSince: R(i.waitingSince)
5062
+ expiresAt: z(i.expiresAt),
5063
+ nodeId: z(i.nodeId),
5064
+ waitId: z(i.waitId),
5065
+ waitingSince: z(i.waitingSince)
5053
5066
  }
5054
5067
  };
5055
5068
  case "run.resolved": {
5056
5069
  let e = i.action;
5057
- return e !== "approve" && e !== "continue" && e !== "reject" ? L() : {
5070
+ return e !== "approve" && e !== "continue" && e !== "reject" ? R() : {
5058
5071
  ...r,
5059
5072
  kind: a,
5060
5073
  payload: {
5061
5074
  action: e,
5062
- resolvedAt: R(i.resolvedAt),
5063
- waitId: R(i.waitId)
5075
+ resolvedAt: z(i.resolvedAt),
5076
+ waitId: z(i.waitId)
5064
5077
  }
5065
5078
  };
5066
5079
  }
@@ -5070,12 +5083,12 @@ function zc(e) {
5070
5083
  case "run.indeterminate": return {
5071
5084
  ...r,
5072
5085
  kind: a,
5073
- payload: { result: Zs(i.result) }
5086
+ payload: { result: Xs(i.result) }
5074
5087
  };
5075
5088
  case "run.events-truncated": return {
5076
5089
  ...r,
5077
5090
  kind: a,
5078
- payload: Object.fromEntries(Object.entries(i).map(([e, t]) => [e, Zs(t)]))
5091
+ payload: Object.fromEntries(Object.entries(i).map(([e, t]) => [e, Xs(t)]))
5079
5092
  };
5080
5093
  case "node.started":
5081
5094
  case "node.completed":
@@ -5084,22 +5097,22 @@ function zc(e) {
5084
5097
  case "node.progress":
5085
5098
  case "node.artifact": {
5086
5099
  let e = {
5087
- flowId: R(i.flowId),
5088
- scopeId: R(i.scopeId),
5089
- nodeId: R(i.nodeId),
5090
- executionId: R(i.executionId)
5100
+ flowId: z(i.flowId),
5101
+ scopeId: z(i.scopeId),
5102
+ nodeId: z(i.nodeId),
5103
+ executionId: z(i.executionId)
5091
5104
  };
5092
5105
  switch (a) {
5093
5106
  case "node.started": {
5094
5107
  let t = i.nodeKind;
5095
- return t !== void 0 && t !== "condition" && t !== "connector" && t !== "javascript" && t !== "llm" && t !== "agent" && t !== "subflow" && t !== "value" && t !== "wait" ? L() : {
5108
+ return t !== void 0 && t !== "condition" && t !== "connector" && t !== "javascript" && t !== "llm" && t !== "agent" && t !== "subflow" && t !== "value" && t !== "wait" ? R() : {
5096
5109
  ...r,
5097
5110
  kind: a,
5098
5111
  payload: {
5099
5112
  ...e,
5100
5113
  ...t === void 0 ? {} : { nodeKind: t },
5101
- ...i.nodeTitle === void 0 ? {} : { nodeTitle: R(i.nodeTitle) },
5102
- ...i.operation === void 0 ? {} : { operation: R(i.operation) }
5114
+ ...i.nodeTitle === void 0 ? {} : { nodeTitle: z(i.nodeTitle) },
5115
+ ...i.operation === void 0 ? {} : { operation: z(i.operation) }
5103
5116
  }
5104
5117
  };
5105
5118
  }
@@ -5108,32 +5121,32 @@ function zc(e) {
5108
5121
  kind: a,
5109
5122
  payload: {
5110
5123
  ...e,
5111
- outputs: Object.fromEntries(Object.entries(Ys(i.outputs)).map(([e, t]) => [e, Zs(t)]))
5124
+ outputs: Object.fromEntries(Object.entries(Js(i.outputs)).map(([e, t]) => [e, Xs(t)]))
5112
5125
  }
5113
5126
  };
5114
5127
  case "node.failed": {
5115
- let t = Ys(i.error);
5128
+ let t = Js(i.error);
5116
5129
  return {
5117
5130
  ...r,
5118
5131
  kind: a,
5119
5132
  payload: {
5120
5133
  ...e,
5121
5134
  error: {
5122
- code: R(t.code),
5123
- message: R(t.message)
5135
+ code: z(t.code),
5136
+ message: z(t.message)
5124
5137
  }
5125
5138
  }
5126
5139
  };
5127
5140
  }
5128
5141
  case "node.log": {
5129
5142
  let t = i.level;
5130
- return t !== "debug" && t !== "info" && t !== "warn" && t !== "error" ? L() : {
5143
+ return t !== "debug" && t !== "info" && t !== "warn" && t !== "error" ? R() : {
5131
5144
  ...r,
5132
5145
  kind: a,
5133
5146
  payload: {
5134
5147
  ...e,
5135
5148
  level: t,
5136
- message: R(i.message)
5149
+ message: z(i.message)
5137
5150
  }
5138
5151
  };
5139
5152
  }
@@ -5146,34 +5159,34 @@ function zc(e) {
5146
5159
  }
5147
5160
  };
5148
5161
  case "node.artifact": {
5149
- let t = Ys(i.artifact), n = Xs(t.size), o = R(t.digest);
5150
- return t.kind != "artifact" || n < 0 || !/^sha256:[0-9a-f]{64}$/.test(o) ? L() : {
5162
+ let t = Js(i.artifact), n = Ys(t.size), o = z(t.digest);
5163
+ return t.kind != "artifact" || n < 0 || !/^sha256:[0-9a-f]{64}$/.test(o) ? R() : {
5151
5164
  ...r,
5152
5165
  kind: a,
5153
5166
  payload: {
5154
5167
  ...e,
5155
5168
  artifact: {
5156
5169
  kind: "artifact",
5157
- id: R(t.id),
5158
- name: R(t.name),
5170
+ id: z(t.id),
5171
+ name: z(t.name),
5159
5172
  size: n,
5160
5173
  digest: o,
5161
- ...t.mediaType === void 0 ? {} : { mediaType: R(t.mediaType) }
5174
+ ...t.mediaType === void 0 ? {} : { mediaType: z(t.mediaType) }
5162
5175
  }
5163
5176
  }
5164
5177
  };
5165
5178
  }
5166
5179
  }
5167
5180
  }
5168
- default: return L();
5181
+ default: return R();
5169
5182
  }
5170
5183
  }
5171
5184
  function Bc(e) {
5172
- return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : L();
5185
+ return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : R();
5173
5186
  }
5174
5187
  //#endregion
5175
5188
  //#region src/control/common/conformance.ts
5176
- var U = "open-flow-engine/v4";
5189
+ var U = "open-flow-engine/v5";
5177
5190
  function W(e) {
5178
5191
  throw Error(e);
5179
5192
  }
@@ -5298,10 +5311,10 @@ function Jc(e, t, n) {
5298
5311
  inputs: {},
5299
5312
  trigger: {
5300
5313
  nodeId: "start",
5301
- payload: {}
5314
+ outputs: {}
5302
5315
  },
5303
5316
  publicationId: t,
5304
- version: 1
5317
+ version: 2
5305
5318
  }),
5306
5319
  headers: { "idempotency-key": n },
5307
5320
  method: "POST"
@@ -5319,9 +5332,9 @@ var Yc = [
5319
5332
  inputs: {},
5320
5333
  trigger: {
5321
5334
  nodeId: "start",
5322
- payload: t
5335
+ outputs: t
5323
5336
  },
5324
- version: 1
5337
+ version: 2
5325
5338
  })
5326
5339
  }), a = await Promise.all([
5327
5340
  i(),
@@ -5523,7 +5536,7 @@ var Yc = [
5523
5536
  node: {
5524
5537
  kind: "webhook",
5525
5538
  name: "Other",
5526
- inputsDef: []
5539
+ bodyFields: []
5527
5540
  }
5528
5541
  },
5529
5542
  {
@@ -5566,9 +5579,14 @@ var Yc = [
5566
5579
  inputs: {},
5567
5580
  trigger: {
5568
5581
  nodeId: t,
5569
- payload: {}
5582
+ outputs: t === "start" ? {} : {
5583
+ headers: {},
5584
+ query: {},
5585
+ body: {},
5586
+ webhookUrl: "http://example.com/webhook"
5587
+ }
5570
5588
  },
5571
- version: 1
5589
+ version: 2
5572
5590
  })
5573
5591
  });
5574
5592
  await Y(await a("start"), 202, "Run valid entry"), await X(await a("other"), 400, "flow.invalid", "Reject invalid entry branch"), await X(await Gc(e, n, r, null, "partial-publish"), 400, "flow.invalid", "Reject incomplete publication");
@@ -5590,18 +5608,18 @@ var Yc = [
5590
5608
  void 0,
5591
5609
  {
5592
5610
  nodeId: "missing",
5593
- payload: {}
5611
+ outputs: {}
5594
5612
  },
5595
5613
  {
5596
5614
  nodeId: "start",
5597
- payload: { unexpected: !0 }
5615
+ outputs: { payload: { unexpected: !0 } }
5598
5616
  }
5599
5617
  ]) await X(await Z(e, i, {
5600
5618
  body: JSON.stringify({
5601
5619
  engineContract: U,
5602
5620
  inputs: {},
5603
5621
  trigger: t,
5604
- version: 1
5622
+ version: 2
5605
5623
  }),
5606
5624
  headers: { "idempotency-key": `invalid-entry-${JSON.stringify(t)}` },
5607
5625
  method: "POST"
@@ -5612,9 +5630,9 @@ var Yc = [
5612
5630
  inputs: {},
5613
5631
  trigger: {
5614
5632
  nodeId: "start",
5615
- payload: {}
5633
+ outputs: {}
5616
5634
  },
5617
- version: 1
5635
+ version: 2
5618
5636
  }),
5619
5637
  headers: { "idempotency-key": "draft-run" },
5620
5638
  method: "POST"
@@ -5625,9 +5643,9 @@ var Yc = [
5625
5643
  inputs: {},
5626
5644
  trigger: {
5627
5645
  nodeId: "another",
5628
- payload: {}
5646
+ outputs: {}
5629
5647
  },
5630
- version: 1
5648
+ version: 2
5631
5649
  }),
5632
5650
  headers: { "idempotency-key": "draft-run" },
5633
5651
  method: "POST"
@@ -5638,9 +5656,9 @@ var Yc = [
5638
5656
  inputs: {},
5639
5657
  trigger: {
5640
5658
  nodeId: "start",
5641
- payload: {}
5659
+ outputs: {}
5642
5660
  },
5643
- version: 1
5661
+ version: 2
5644
5662
  }),
5645
5663
  headers: { "idempotency-key": "draft-run-second" },
5646
5664
  method: "POST"
@@ -5693,9 +5711,9 @@ var Yc = [
5693
5711
  inputs: {},
5694
5712
  trigger: {
5695
5713
  nodeId: "start",
5696
- payload: {}
5714
+ outputs: {}
5697
5715
  },
5698
- version: 1
5716
+ version: 2
5699
5717
  }),
5700
5718
  headers: { "idempotency-key": t },
5701
5719
  method: "POST"
@@ -5719,18 +5737,18 @@ var Yc = [
5719
5737
  await X(await f("continue"), 400, "run.invalid", "Reject unsupported Wait action");
5720
5738
  let p = await Y(await f("approve"), 200, "Approve Wait");
5721
5739
  G(p.action, "approve", "Approved action"), G(p.resolutionAccepted, !0, "Approved resolution"), G(p.status, "running", "Resolved Run status"), J(p.resolvedAt, "Wait resolution time");
5722
- let m = await Y(await f("reject"), 200, "Reject resolved Wait");
5723
- G(m.action, "approve", "Winning action"), G(m.resolutionAccepted, !1, "Competing resolution");
5740
+ let ee = await Y(await f("reject"), 200, "Reject resolved Wait");
5741
+ G(ee.action, "approve", "Winning action"), G(ee.resolutionAccepted, !1, "Competing resolution");
5724
5742
  for (let t = 0; s.status != "completed" && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), s = await Y(await Z(e, `/v1/runs/${o}`), 200, "Read resumed Run");
5725
5743
  G(s.status, "completed", "Resumed Run status"), G(s.waits, [], "Completed Wait projection");
5726
- let ee = await Y(await f("approve"), 200, "Replay approved Wait");
5727
- G(ee.resolutionAccepted, !0, "Replayed resolution"), G(ee.status, "completed", "Replayed terminal status");
5728
- let te = await Y(await Z(e, `/v1/runs/${o}/events`), 200, "Read resumed Run events");
5729
- for (let e of q(te.events, "Run events")) zc(e);
5730
- G(q(te.events, "Completed events").filter((e) => K(e, "Completed event").kind == "run.resolved").length, 1, "Resolved event count");
5731
- let ne = await i("wait-run-cancel", "Create cancelable Wait Run"), re = J(ne.runId, "Cancelable Wait Run id"), ie = ne;
5732
- for (let t = 0; q(ie.waits, "Waits").length == 0 && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), ie = await Y(await Z(e, `/v1/runs/${re}`), 200, "Read cancelable Wait Run");
5733
- G(ie.status, "running", "Cancelable Wait status"), G((await Y(await Z(e, `/v1/runs/${re}/cancel`, {
5744
+ let te = await Y(await f("approve"), 200, "Replay approved Wait");
5745
+ G(te.resolutionAccepted, !0, "Replayed resolution"), G(te.status, "completed", "Replayed terminal status");
5746
+ let ne = await Y(await Z(e, `/v1/runs/${o}/events`), 200, "Read resumed Run events");
5747
+ for (let e of q(ne.events, "Run events")) zc(e);
5748
+ G(q(ne.events, "Completed events").filter((e) => K(e, "Completed event").kind == "run.resolved").length, 1, "Resolved event count");
5749
+ let re = await i("wait-run-cancel", "Create cancelable Wait Run"), ie = J(re.runId, "Cancelable Wait Run id"), ae = re;
5750
+ for (let t = 0; q(ae.waits, "Waits").length == 0 && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), ae = await Y(await Z(e, `/v1/runs/${ie}`), 200, "Read cancelable Wait Run");
5751
+ G(ae.status, "running", "Cancelable Wait status"), G((await Y(await Z(e, `/v1/runs/${ie}/cancel`, {
5734
5752
  body: JSON.stringify({ version: 1 }),
5735
5753
  method: "POST"
5736
5754
  }), 200, "Cancel waiting Run")).status, "canceled", "Canceled waiting Run status");
@@ -5771,9 +5789,9 @@ var Yc = [
5771
5789
  inputs: {},
5772
5790
  trigger: {
5773
5791
  nodeId: "start",
5774
- payload: {}
5792
+ outputs: {}
5775
5793
  },
5776
- version: 1
5794
+ version: 2
5777
5795
  }),
5778
5796
  headers: { "idempotency-key": r },
5779
5797
  method: "POST"
@@ -5807,9 +5825,9 @@ var Yc = [
5807
5825
  inputs: {},
5808
5826
  trigger: {
5809
5827
  nodeId: "start",
5810
- payload: {}
5828
+ outputs: {}
5811
5829
  },
5812
- version: 1
5830
+ version: 2
5813
5831
  })
5814
5832
  }), 202, "Disabled Flow permits Draft test");
5815
5833
  let s = J((await Kc(e, await Gc(e, n, r, a, "enable-next"), 202, "Publish disabled Flow")).publication.publicationId, "Next Publication id");
@@ -5878,7 +5896,7 @@ var Yc = [
5878
5896
  }, {
5879
5897
  kind: "graph.node.create",
5880
5898
  node: {
5881
- inputsDef: [],
5899
+ bodyFields: [],
5882
5900
  kind: "webhook",
5883
5901
  name: "Incoming"
5884
5902
  },