@oomol-lab/open-flow 0.1.0-beta.26 → 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-BqPtWEI9.js → flowChanges-Z49mslMz.js} +1098 -1027
  9. package/dist/browser/{flowWorkspace-CpMGzmfz.js → flowWorkspace-DCaVDqtY.js} +40105 -43746
  10. package/dist/browser/host-conformance.js +7 -1
  11. package/dist/browser/{inputValues-CeeJw_G8.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 +1425 -1381
  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 +140 -118
  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
@@ -4,7 +4,7 @@ function e(e) {
4
4
  return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
5
5
  }
6
6
  function t(e, t = "|") {
7
- return e.map((e) => ie(e)).join(t);
7
+ return e.map((e) => re(e)).join(t);
8
8
  }
9
9
  function n(e, t) {
10
10
  return typeof t == "bigint" ? t.toString() : t;
@@ -90,14 +90,14 @@ var ne = /* @__PURE__*/ new Set([
90
90
  "number",
91
91
  "symbol"
92
92
  ]);
93
- function re(e) {
93
+ function g(e) {
94
94
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
95
95
  }
96
- function g(e, t, n) {
96
+ function _(e, t, n) {
97
97
  let r = new e._zod.constr(t ?? e._zod.def);
98
98
  return (!t || n?.parent) && (r._zod.parent = e), r;
99
99
  }
100
- function _(e) {
100
+ function v(e) {
101
101
  let t = e;
102
102
  if (!t) return {};
103
103
  if (typeof t == "string") return { error: () => t };
@@ -110,23 +110,23 @@ function _(e) {
110
110
  error: () => t.error
111
111
  } : t;
112
112
  }
113
- function ie(e) {
113
+ function re(e) {
114
114
  return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
115
115
  }
116
- function ae(e) {
116
+ function ie(e) {
117
117
  return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
118
118
  }
119
- var oe = {
119
+ var ae = {
120
120
  safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
121
121
  int32: [-2147483648, 2147483647],
122
122
  uint32: [0, 4294967295],
123
123
  float32: [-34028234663852886e22, 34028234663852886e22],
124
124
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
125
125
  };
126
- function se(e, t) {
126
+ function oe(e, t) {
127
127
  let n = e._zod.def, r = n.checks;
128
128
  if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
129
- return g(e, u(e._zod.def, {
129
+ return _(e, u(e._zod.def, {
130
130
  get shape() {
131
131
  let e = {};
132
132
  for (let r of Reflect.ownKeys(t)) {
@@ -138,10 +138,10 @@ function se(e, t) {
138
138
  checks: []
139
139
  }));
140
140
  }
141
- function ce(e, t) {
141
+ function se(e, t) {
142
142
  let n = e._zod.def, r = n.checks;
143
143
  if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
144
- return g(e, u(e._zod.def, {
144
+ return _(e, u(e._zod.def, {
145
145
  get shape() {
146
146
  let r = { ...e._zod.def.shape };
147
147
  for (let e of Reflect.ownKeys(t)) {
@@ -153,14 +153,14 @@ function ce(e, t) {
153
153
  checks: []
154
154
  }));
155
155
  }
156
- function le(e, t) {
156
+ function ce(e, t) {
157
157
  if (!h(t)) throw Error("Invalid input to extend: expected a plain object");
158
158
  let n = e._zod.def.checks;
159
159
  if (n && n.length > 0) {
160
160
  let n = e._zod.def.shape;
161
161
  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.");
162
162
  }
163
- return g(e, u(e._zod.def, { get shape() {
163
+ return _(e, u(e._zod.def, { get shape() {
164
164
  let n = {
165
165
  ...e._zod.def.shape,
166
166
  ...t
@@ -168,9 +168,9 @@ function le(e, t) {
168
168
  return l(this, "shape", n), n;
169
169
  } }));
170
170
  }
171
- function ue(e, t) {
171
+ function le(e, t) {
172
172
  if (!h(t)) throw Error("Invalid input to safeExtend: expected a plain object");
173
- return g(e, u(e._zod.def, { get shape() {
173
+ return _(e, u(e._zod.def, { get shape() {
174
174
  let n = {
175
175
  ...e._zod.def.shape,
176
176
  ...t
@@ -178,10 +178,10 @@ function ue(e, t) {
178
178
  return l(this, "shape", n), n;
179
179
  } }));
180
180
  }
181
- function de(e, t) {
181
+ function ue(e, t) {
182
182
  if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
183
183
  if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
184
- return g(e, u(e._zod.def, {
184
+ return _(e, u(e._zod.def, {
185
185
  get shape() {
186
186
  let n = {
187
187
  ...e._zod.def.shape,
@@ -195,10 +195,10 @@ function de(e, t) {
195
195
  checks: t._zod.def.checks ?? []
196
196
  }));
197
197
  }
198
- function fe(e, t, n, r = "partial") {
198
+ function de(e, t, n, r = "partial") {
199
199
  let i = t._zod.def.checks;
200
200
  if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
201
- return g(t, u(t._zod.def, {
201
+ return _(t, u(t._zod.def, {
202
202
  get shape() {
203
203
  let r = t._zod.def.shape, i = { ...r };
204
204
  if (n) for (let t of Reflect.ownKeys(n)) {
@@ -217,8 +217,8 @@ function fe(e, t, n, r = "partial") {
217
217
  checks: []
218
218
  }));
219
219
  }
220
- function pe(e, t, n) {
221
- return g(t, u(t._zod.def, { get shape() {
220
+ function fe(e, t, n) {
221
+ return _(t, u(t._zod.def, { get shape() {
222
222
  let r = t._zod.def.shape, i = { ...r };
223
223
  if (n) for (let t of Reflect.ownKeys(n)) {
224
224
  if (!Object.prototype.hasOwnProperty.call(i, t)) throw Error(`Unrecognized key: "${String(t)}"`);
@@ -234,7 +234,7 @@ function pe(e, t, n) {
234
234
  return l(this, "shape", i), i;
235
235
  } }));
236
236
  }
237
- function v(e, t = 0) {
237
+ function pe(e, t = 0) {
238
238
  if (e.aborted === !0) return !0;
239
239
  for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
240
240
  return !1;
@@ -769,7 +769,7 @@ var It = (e) => {
769
769
  };
770
770
  }), Jt = /*@__PURE__*/ w("$ZodCheckNumberFormat", (e, t) => {
771
771
  O.init(e, t), t.format = t.format || "float64";
772
- let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = oe[t.format];
772
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = ae[t.format];
773
773
  e._zod.onattach.push((e) => {
774
774
  let r = e._zod.bag;
775
775
  r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Lt);
@@ -925,7 +925,7 @@ var It = (e) => {
925
925
  t.pattern ??= Ht, Qt.init(e, t);
926
926
  }), nn = /*@__PURE__*/ w("$ZodCheckIncludes", (e, t) => {
927
927
  O.init(e, t);
928
- let n = re(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
928
+ let n = g(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
929
929
  t.pattern = r, e._zod.onattach.push((e) => {
930
930
  let t = e._zod.bag;
931
931
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
@@ -942,7 +942,7 @@ var It = (e) => {
942
942
  };
943
943
  }), rn = /*@__PURE__*/ w("$ZodCheckStartsWith", (e, t) => {
944
944
  O.init(e, t);
945
- let n = RegExp(`^${re(t.prefix)}.*`);
945
+ let n = RegExp(`^${g(t.prefix)}.*`);
946
946
  t.pattern ??= n, e._zod.onattach.push((e) => {
947
947
  let t = e._zod.bag;
948
948
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
@@ -959,7 +959,7 @@ var It = (e) => {
959
959
  };
960
960
  }), an = /*@__PURE__*/ w("$ZodCheckEndsWith", (e, t) => {
961
961
  O.init(e, t);
962
- let n = RegExp(`.*${re(t.suffix)}$`);
962
+ let n = RegExp(`.*${g(t.suffix)}$`);
963
963
  t.pattern ??= n, e._zod.onattach.push((e) => {
964
964
  let t = e._zod.bag;
965
965
  t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
@@ -1012,7 +1012,7 @@ var It = (e) => {
1012
1012
  else {
1013
1013
  let t = (t, n, r) => {
1014
1014
  if (t.memo) return t;
1015
- let i = v(t), a;
1015
+ let i = pe(t), a;
1016
1016
  for (let o of n) {
1017
1017
  if (o._zod.def.when) {
1018
1018
  if (me(t) || !o._zod.def.when(t)) continue;
@@ -1020,16 +1020,16 @@ var It = (e) => {
1020
1020
  let n = t.issues.length, s = o._zod.check(t);
1021
1021
  if (s instanceof Promise && r?.async === !1) throw new T();
1022
1022
  if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
1023
- await s, t.issues.length !== n && (ge(t.issues, n, e), i ||= v(t, n));
1023
+ await s, t.issues.length !== n && (ge(t.issues, n, e), i ||= pe(t, n));
1024
1024
  });
1025
1025
  else {
1026
1026
  if (t.issues.length === n) continue;
1027
- ge(t.issues, n, e), i ||= v(t, n);
1027
+ ge(t.issues, n, e), i ||= pe(t, n);
1028
1028
  }
1029
1029
  }
1030
1030
  return a ? a.then(() => t) : t;
1031
1031
  }, n = (n, r, a) => {
1032
- if (v(n)) return n.aborted = !0, n;
1032
+ if (pe(n)) return n.aborted = !0, n;
1033
1033
  let o = t(r, i, a);
1034
1034
  if (o instanceof Promise) {
1035
1035
  if (a.async === !1) throw new T();
@@ -1412,7 +1412,7 @@ var tr = [];
1412
1412
  function nr(e) {
1413
1413
  let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : tr, i = r.length ? [...t, ...r] : t;
1414
1414
  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`);
1415
- let a = ae(e.shape);
1415
+ let a = ie(e.shape);
1416
1416
  return {
1417
1417
  ...e,
1418
1418
  allKeys: i,
@@ -1572,7 +1572,7 @@ var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ w("$ZodObject", (e, t
1572
1572
  });
1573
1573
  function sr(e, t, n, r) {
1574
1574
  for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1575
- let i = e.filter((e) => !v(e));
1575
+ let i = e.filter((e) => !pe(e));
1576
1576
  return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1577
1577
  code: "invalid_union",
1578
1578
  input: t.value,
@@ -1691,7 +1691,7 @@ function dr(e, t, n) {
1691
1691
  }
1692
1692
  let c = ur(t.value, n.value);
1693
1693
  if (!c.valid) {
1694
- if (v(e)) return e;
1694
+ if (pe(e)) return e;
1695
1695
  throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
1696
1696
  }
1697
1697
  return e.value = c.data, e;
@@ -1888,7 +1888,7 @@ var gr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1888
1888
  let r = e(n.entries), i = new Set(r);
1889
1889
  t._zod.values = i;
1890
1890
  let a = r.filter((e) => ne.has(typeof e));
1891
- t._zod.pattern = RegExp(a.length ? `^(${a.map((e) => re(e.toString())).join("|")})$` : "^[^\\s\\S]$"), t._zod.parse = (e, n) => {
1891
+ t._zod.pattern = RegExp(a.length ? `^(${a.map((e) => g(e.toString())).join("|")})$` : "^[^\\s\\S]$"), t._zod.parse = (e, n) => {
1892
1892
  let a = e.value;
1893
1893
  return i.has(a) || e.issues.push({
1894
1894
  code: "invalid_value",
@@ -1900,7 +1900,7 @@ var gr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1900
1900
  }), vr = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
1901
1901
  k.init(e, t);
1902
1902
  let n = new Set(t.values);
1903
- e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? re(e) : e ? re(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
1903
+ e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? g(e) : e ? g(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
1904
1904
  let a = r.value;
1905
1905
  return n.has(a) || r.issues.push({
1906
1906
  code: "invalid_value",
@@ -2267,7 +2267,7 @@ var Xr = () => {
2267
2267
  return (e) => {
2268
2268
  switch (e.code) {
2269
2269
  case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(be(e.input), e.input)}`;
2270
- case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ie(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
2270
+ case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${re(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
2271
2271
  case "too_big": {
2272
2272
  let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
2273
2273
  return r ? `Too big: expected ${e.origin ?? "value"} to have ${t}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${t}${e.maximum.toString()}`;
@@ -2337,7 +2337,7 @@ var ti = globalThis.__zod_globalRegistry;
2337
2337
  function ni(e, t) {
2338
2338
  return new e({
2339
2339
  type: "string",
2340
- ..._(t)
2340
+ ...v(t)
2341
2341
  });
2342
2342
  }
2343
2343
  // @__NO_SIDE_EFFECTS__
@@ -2347,7 +2347,7 @@ function ri(e, t) {
2347
2347
  format: "email",
2348
2348
  check: "string_format",
2349
2349
  abort: !1,
2350
- ..._(t)
2350
+ ...v(t)
2351
2351
  });
2352
2352
  }
2353
2353
  // @__NO_SIDE_EFFECTS__
@@ -2357,7 +2357,7 @@ function ii(e, t) {
2357
2357
  format: "guid",
2358
2358
  check: "string_format",
2359
2359
  abort: !1,
2360
- ..._(t)
2360
+ ...v(t)
2361
2361
  });
2362
2362
  }
2363
2363
  // @__NO_SIDE_EFFECTS__
@@ -2367,7 +2367,7 @@ function ai(e, t) {
2367
2367
  format: "uuid",
2368
2368
  check: "string_format",
2369
2369
  abort: !1,
2370
- ..._(t)
2370
+ ...v(t)
2371
2371
  });
2372
2372
  }
2373
2373
  // @__NO_SIDE_EFFECTS__
@@ -2378,7 +2378,7 @@ function oi(e, t) {
2378
2378
  check: "string_format",
2379
2379
  abort: !1,
2380
2380
  version: "v4",
2381
- ..._(t)
2381
+ ...v(t)
2382
2382
  });
2383
2383
  }
2384
2384
  // @__NO_SIDE_EFFECTS__
@@ -2389,7 +2389,7 @@ function si(e, t) {
2389
2389
  check: "string_format",
2390
2390
  abort: !1,
2391
2391
  version: "v6",
2392
- ..._(t)
2392
+ ...v(t)
2393
2393
  });
2394
2394
  }
2395
2395
  // @__NO_SIDE_EFFECTS__
@@ -2400,7 +2400,7 @@ function ci(e, t) {
2400
2400
  check: "string_format",
2401
2401
  abort: !1,
2402
2402
  version: "v7",
2403
- ..._(t)
2403
+ ...v(t)
2404
2404
  });
2405
2405
  }
2406
2406
  // @__NO_SIDE_EFFECTS__
@@ -2410,7 +2410,7 @@ function li(e, t) {
2410
2410
  format: "url",
2411
2411
  check: "string_format",
2412
2412
  abort: !1,
2413
- ..._(t)
2413
+ ...v(t)
2414
2414
  });
2415
2415
  }
2416
2416
  // @__NO_SIDE_EFFECTS__
@@ -2420,7 +2420,7 @@ function ui(e, t) {
2420
2420
  format: "emoji",
2421
2421
  check: "string_format",
2422
2422
  abort: !1,
2423
- ..._(t)
2423
+ ...v(t)
2424
2424
  });
2425
2425
  }
2426
2426
  // @__NO_SIDE_EFFECTS__
@@ -2430,7 +2430,7 @@ function di(e, t) {
2430
2430
  format: "nanoid",
2431
2431
  check: "string_format",
2432
2432
  abort: !1,
2433
- ..._(t)
2433
+ ...v(t)
2434
2434
  });
2435
2435
  }
2436
2436
  // @__NO_SIDE_EFFECTS__
@@ -2440,7 +2440,7 @@ function fi(e, t) {
2440
2440
  format: "cuid",
2441
2441
  check: "string_format",
2442
2442
  abort: !1,
2443
- ..._(t)
2443
+ ...v(t)
2444
2444
  });
2445
2445
  }
2446
2446
  // @__NO_SIDE_EFFECTS__
@@ -2450,7 +2450,7 @@ function pi(e, t) {
2450
2450
  format: "cuid2",
2451
2451
  check: "string_format",
2452
2452
  abort: !1,
2453
- ..._(t)
2453
+ ...v(t)
2454
2454
  });
2455
2455
  }
2456
2456
  // @__NO_SIDE_EFFECTS__
@@ -2460,7 +2460,7 @@ function mi(e, t) {
2460
2460
  format: "ulid",
2461
2461
  check: "string_format",
2462
2462
  abort: !1,
2463
- ..._(t)
2463
+ ...v(t)
2464
2464
  });
2465
2465
  }
2466
2466
  // @__NO_SIDE_EFFECTS__
@@ -2470,7 +2470,7 @@ function hi(e, t) {
2470
2470
  format: "xid",
2471
2471
  check: "string_format",
2472
2472
  abort: !1,
2473
- ..._(t)
2473
+ ...v(t)
2474
2474
  });
2475
2475
  }
2476
2476
  // @__NO_SIDE_EFFECTS__
@@ -2480,7 +2480,7 @@ function gi(e, t) {
2480
2480
  format: "ksuid",
2481
2481
  check: "string_format",
2482
2482
  abort: !1,
2483
- ..._(t)
2483
+ ...v(t)
2484
2484
  });
2485
2485
  }
2486
2486
  // @__NO_SIDE_EFFECTS__
@@ -2490,7 +2490,7 @@ function _i(e, t) {
2490
2490
  format: "ipv4",
2491
2491
  check: "string_format",
2492
2492
  abort: !1,
2493
- ..._(t)
2493
+ ...v(t)
2494
2494
  });
2495
2495
  }
2496
2496
  // @__NO_SIDE_EFFECTS__
@@ -2500,7 +2500,7 @@ function vi(e, t) {
2500
2500
  format: "ipv6",
2501
2501
  check: "string_format",
2502
2502
  abort: !1,
2503
- ..._(t)
2503
+ ...v(t)
2504
2504
  });
2505
2505
  }
2506
2506
  // @__NO_SIDE_EFFECTS__
@@ -2510,7 +2510,7 @@ function yi(e, t) {
2510
2510
  format: "cidrv4",
2511
2511
  check: "string_format",
2512
2512
  abort: !1,
2513
- ..._(t)
2513
+ ...v(t)
2514
2514
  });
2515
2515
  }
2516
2516
  // @__NO_SIDE_EFFECTS__
@@ -2520,7 +2520,7 @@ function bi(e, t) {
2520
2520
  format: "cidrv6",
2521
2521
  check: "string_format",
2522
2522
  abort: !1,
2523
- ..._(t)
2523
+ ...v(t)
2524
2524
  });
2525
2525
  }
2526
2526
  // @__NO_SIDE_EFFECTS__
@@ -2530,7 +2530,7 @@ function xi(e, t) {
2530
2530
  format: "base64",
2531
2531
  check: "string_format",
2532
2532
  abort: !1,
2533
- ..._(t)
2533
+ ...v(t)
2534
2534
  });
2535
2535
  }
2536
2536
  // @__NO_SIDE_EFFECTS__
@@ -2540,7 +2540,7 @@ function Si(e, t) {
2540
2540
  format: "base64url",
2541
2541
  check: "string_format",
2542
2542
  abort: !1,
2543
- ..._(t)
2543
+ ...v(t)
2544
2544
  });
2545
2545
  }
2546
2546
  // @__NO_SIDE_EFFECTS__
@@ -2550,7 +2550,7 @@ function Ci(e, t) {
2550
2550
  format: "e164",
2551
2551
  check: "string_format",
2552
2552
  abort: !1,
2553
- ..._(t)
2553
+ ...v(t)
2554
2554
  });
2555
2555
  }
2556
2556
  // @__NO_SIDE_EFFECTS__
@@ -2560,7 +2560,7 @@ function wi(e, t) {
2560
2560
  format: "jwt",
2561
2561
  check: "string_format",
2562
2562
  abort: !1,
2563
- ..._(t)
2563
+ ...v(t)
2564
2564
  });
2565
2565
  }
2566
2566
  // @__NO_SIDE_EFFECTS__
@@ -2572,7 +2572,7 @@ function Ti(e, t) {
2572
2572
  offset: !1,
2573
2573
  local: !1,
2574
2574
  precision: null,
2575
- ..._(t)
2575
+ ...v(t)
2576
2576
  });
2577
2577
  }
2578
2578
  // @__NO_SIDE_EFFECTS__
@@ -2581,7 +2581,7 @@ function Ei(e, t) {
2581
2581
  type: "string",
2582
2582
  format: "date",
2583
2583
  check: "string_format",
2584
- ..._(t)
2584
+ ...v(t)
2585
2585
  });
2586
2586
  }
2587
2587
  // @__NO_SIDE_EFFECTS__
@@ -2591,7 +2591,7 @@ function Di(e, t) {
2591
2591
  format: "time",
2592
2592
  check: "string_format",
2593
2593
  precision: null,
2594
- ..._(t)
2594
+ ...v(t)
2595
2595
  });
2596
2596
  }
2597
2597
  // @__NO_SIDE_EFFECTS__
@@ -2600,7 +2600,7 @@ function Oi(e, t) {
2600
2600
  type: "string",
2601
2601
  format: "duration",
2602
2602
  check: "string_format",
2603
- ..._(t)
2603
+ ...v(t)
2604
2604
  });
2605
2605
  }
2606
2606
  // @__NO_SIDE_EFFECTS__
@@ -2608,7 +2608,7 @@ function ki(e, t) {
2608
2608
  return new e({
2609
2609
  type: "number",
2610
2610
  checks: [],
2611
- ..._(t)
2611
+ ...v(t)
2612
2612
  });
2613
2613
  }
2614
2614
  // @__NO_SIDE_EFFECTS__
@@ -2618,21 +2618,21 @@ function Ai(e, t) {
2618
2618
  check: "number_format",
2619
2619
  abort: !1,
2620
2620
  format: "safeint",
2621
- ..._(t)
2621
+ ...v(t)
2622
2622
  });
2623
2623
  }
2624
2624
  // @__NO_SIDE_EFFECTS__
2625
2625
  function ji(e, t) {
2626
2626
  return new e({
2627
2627
  type: "boolean",
2628
- ..._(t)
2628
+ ...v(t)
2629
2629
  });
2630
2630
  }
2631
2631
  // @__NO_SIDE_EFFECTS__
2632
2632
  function Mi(e, t) {
2633
2633
  return new e({
2634
2634
  type: "null",
2635
- ..._(t)
2635
+ ...v(t)
2636
2636
  });
2637
2637
  }
2638
2638
  // @__NO_SIDE_EFFECTS__
@@ -2643,14 +2643,14 @@ function Ni(e) {
2643
2643
  function Pi(e, t) {
2644
2644
  return new e({
2645
2645
  type: "never",
2646
- ..._(t)
2646
+ ...v(t)
2647
2647
  });
2648
2648
  }
2649
2649
  // @__NO_SIDE_EFFECTS__
2650
2650
  function Fi(e, t) {
2651
2651
  return new Gt({
2652
2652
  check: "less_than",
2653
- ..._(t),
2653
+ ...v(t),
2654
2654
  value: e,
2655
2655
  inclusive: !1
2656
2656
  });
@@ -2659,7 +2659,7 @@ function Fi(e, t) {
2659
2659
  function Ii(e, t) {
2660
2660
  return new Gt({
2661
2661
  check: "less_than",
2662
- ..._(t),
2662
+ ...v(t),
2663
2663
  value: e,
2664
2664
  inclusive: !0
2665
2665
  });
@@ -2668,7 +2668,7 @@ function Ii(e, t) {
2668
2668
  function Li(e, t) {
2669
2669
  return new Kt({
2670
2670
  check: "greater_than",
2671
- ..._(t),
2671
+ ...v(t),
2672
2672
  value: e,
2673
2673
  inclusive: !1
2674
2674
  });
@@ -2677,7 +2677,7 @@ function Li(e, t) {
2677
2677
  function Ri(e, t) {
2678
2678
  return new Kt({
2679
2679
  check: "greater_than",
2680
- ..._(t),
2680
+ ...v(t),
2681
2681
  value: e,
2682
2682
  inclusive: !0
2683
2683
  });
@@ -2686,7 +2686,7 @@ function Ri(e, t) {
2686
2686
  function zi(e, t) {
2687
2687
  return new qt({
2688
2688
  check: "multiple_of",
2689
- ..._(t),
2689
+ ...v(t),
2690
2690
  value: e
2691
2691
  });
2692
2692
  }
@@ -2694,7 +2694,7 @@ function zi(e, t) {
2694
2694
  function Bi(e, t) {
2695
2695
  return new Yt({
2696
2696
  check: "max_length",
2697
- ..._(t),
2697
+ ...v(t),
2698
2698
  maximum: e
2699
2699
  });
2700
2700
  }
@@ -2702,7 +2702,7 @@ function Bi(e, t) {
2702
2702
  function Vi(e, t) {
2703
2703
  return new Xt({
2704
2704
  check: "min_length",
2705
- ..._(t),
2705
+ ...v(t),
2706
2706
  minimum: e
2707
2707
  });
2708
2708
  }
@@ -2710,7 +2710,7 @@ function Vi(e, t) {
2710
2710
  function Hi(e, t) {
2711
2711
  return new Zt({
2712
2712
  check: "length_equals",
2713
- ..._(t),
2713
+ ...v(t),
2714
2714
  length: e
2715
2715
  });
2716
2716
  }
@@ -2719,7 +2719,7 @@ function Ui(e, t) {
2719
2719
  return new $t({
2720
2720
  check: "string_format",
2721
2721
  format: "regex",
2722
- ..._(t),
2722
+ ...v(t),
2723
2723
  pattern: e
2724
2724
  });
2725
2725
  }
@@ -2728,7 +2728,7 @@ function Wi(e) {
2728
2728
  return new en({
2729
2729
  check: "string_format",
2730
2730
  format: "lowercase",
2731
- ..._(e)
2731
+ ...v(e)
2732
2732
  });
2733
2733
  }
2734
2734
  // @__NO_SIDE_EFFECTS__
@@ -2736,7 +2736,7 @@ function Gi(e) {
2736
2736
  return new tn({
2737
2737
  check: "string_format",
2738
2738
  format: "uppercase",
2739
- ..._(e)
2739
+ ...v(e)
2740
2740
  });
2741
2741
  }
2742
2742
  // @__NO_SIDE_EFFECTS__
@@ -2744,7 +2744,7 @@ function Ki(e, t) {
2744
2744
  return new nn({
2745
2745
  check: "string_format",
2746
2746
  format: "includes",
2747
- ..._(t),
2747
+ ...v(t),
2748
2748
  includes: e
2749
2749
  });
2750
2750
  }
@@ -2753,7 +2753,7 @@ function qi(e, t) {
2753
2753
  return new rn({
2754
2754
  check: "string_format",
2755
2755
  format: "starts_with",
2756
- ..._(t),
2756
+ ...v(t),
2757
2757
  prefix: e
2758
2758
  });
2759
2759
  }
@@ -2762,57 +2762,57 @@ function Ji(e, t) {
2762
2762
  return new an({
2763
2763
  check: "string_format",
2764
2764
  format: "ends_with",
2765
- ..._(t),
2765
+ ...v(t),
2766
2766
  suffix: e
2767
2767
  });
2768
2768
  }
2769
2769
  // @__NO_SIDE_EFFECTS__
2770
- function j(e) {
2770
+ function Yi(e) {
2771
2771
  return new on({
2772
2772
  check: "overwrite",
2773
2773
  tx: e
2774
2774
  });
2775
2775
  }
2776
2776
  // @__NO_SIDE_EFFECTS__
2777
- function Yi(e) {
2778
- return /* @__PURE__ */ j((t) => t.normalize(e));
2779
- }
2780
- // @__NO_SIDE_EFFECTS__
2781
- function Xi() {
2782
- return /* @__PURE__ */ j((e) => e.trim());
2777
+ function Xi(e) {
2778
+ return /* @__PURE__ */ Yi((t) => t.normalize(e));
2783
2779
  }
2784
2780
  // @__NO_SIDE_EFFECTS__
2785
2781
  function Zi() {
2786
- return /* @__PURE__ */ j((e) => e.toLowerCase());
2782
+ return /* @__PURE__ */ Yi((e) => e.trim());
2787
2783
  }
2788
2784
  // @__NO_SIDE_EFFECTS__
2789
2785
  function Qi() {
2790
- return /* @__PURE__ */ j((e) => e.toUpperCase());
2786
+ return /* @__PURE__ */ Yi((e) => e.toLowerCase());
2791
2787
  }
2792
2788
  // @__NO_SIDE_EFFECTS__
2793
2789
  function $i() {
2794
- return /* @__PURE__ */ j((e) => f(e));
2790
+ return /* @__PURE__ */ Yi((e) => e.toUpperCase());
2795
2791
  }
2796
2792
  // @__NO_SIDE_EFFECTS__
2797
- function ea(e, t, n) {
2793
+ function ea() {
2794
+ return /* @__PURE__ */ Yi((e) => f(e));
2795
+ }
2796
+ // @__NO_SIDE_EFFECTS__
2797
+ function ta(e, t, n) {
2798
2798
  return new e({
2799
2799
  type: "array",
2800
2800
  element: t,
2801
- ..._(n)
2801
+ ...v(n)
2802
2802
  });
2803
2803
  }
2804
2804
  // @__NO_SIDE_EFFECTS__
2805
- function ta(e, t, n) {
2805
+ function na(e, t, n) {
2806
2806
  return new e({
2807
2807
  type: "custom",
2808
2808
  check: "custom",
2809
2809
  fn: t,
2810
- ..._(n)
2810
+ ...v(n)
2811
2811
  });
2812
2812
  }
2813
2813
  // @__NO_SIDE_EFFECTS__
2814
- function na(e, t) {
2815
- let n = /* @__PURE__ */ ra((t) => (t.addIssue = (e) => {
2814
+ function ra(e, t) {
2815
+ let n = /* @__PURE__ */ ia((t) => (t.addIssue = (e) => {
2816
2816
  if (typeof e == "string") t.issues.push(xe(e, t.value, n._zod.def));
2817
2817
  else {
2818
2818
  let r = e;
@@ -2822,20 +2822,20 @@ function na(e, t) {
2822
2822
  return n;
2823
2823
  }
2824
2824
  // @__NO_SIDE_EFFECTS__
2825
- function ra(e, t) {
2825
+ function ia(e, t) {
2826
2826
  let n = new O({
2827
2827
  check: "custom",
2828
- ..._(t)
2828
+ ...v(t)
2829
2829
  });
2830
2830
  return n._zod.check = e, n;
2831
2831
  }
2832
2832
  //#endregion
2833
2833
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
2834
- function ia(e, ...t) {
2834
+ function aa(e, ...t) {
2835
2835
  for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && l(e, t, n[t]);
2836
2836
  return e;
2837
2837
  }
2838
- function aa(e) {
2838
+ function oa(e) {
2839
2839
  let t = e?.target ?? "draft-2020-12";
2840
2840
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2841
2841
  processors: e.processors ?? {},
@@ -2855,7 +2855,7 @@ function aa(e) {
2855
2855
  external: e?.external ?? void 0
2856
2856
  };
2857
2857
  }
2858
- function M(e, t, n, r, i) {
2858
+ function j(e, t, n, r, i) {
2859
2859
  let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
2860
2860
  zodSchema: e,
2861
2861
  path: r.path,
@@ -2865,7 +2865,7 @@ function M(e, t, n, r, i) {
2865
2865
  if (a === void 0 || a === "throw") throw Error(i);
2866
2866
  return Object.assign(n, a), !0;
2867
2867
  }
2868
- function N(e, t, n = {
2868
+ function M(e, t, n = {
2869
2869
  path: [],
2870
2870
  schemaPath: []
2871
2871
  }) {
@@ -2894,15 +2894,15 @@ function N(e, t, n = {
2894
2894
  a(e, t, n, r);
2895
2895
  }
2896
2896
  let a = e._zod.parent;
2897
- a && (o.ref ||= a, N(a, t, r), t.seen.get(a).isParent = !0);
2897
+ a && (o.ref ||= a, M(a, t, r), t.seen.get(a).isParent = !0);
2898
2898
  }
2899
2899
  let c = t.metadataRegistry.get(e);
2900
- return c && ia(o.schema, c), t.io === "input" && P(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2900
+ return c && aa(o.schema, c), t.io === "input" && N(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2901
2901
  }
2902
- function oa(e) {
2902
+ function sa(e) {
2903
2903
  return e.replace(/~/g, "~0").replace(/\//g, "~1");
2904
2904
  }
2905
- function sa(e, t) {
2905
+ function ca(e, t) {
2906
2906
  let n = e.seen.get(t);
2907
2907
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2908
2908
  if (e.external && e.sharedDefsExtractedFor === e.external) return;
@@ -2923,7 +2923,7 @@ function sa(e, t) {
2923
2923
  let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2924
2924
  return t[1].defId = a, {
2925
2925
  defId: a,
2926
- ref: `${i("__shared")}#/${r}/${oa(a)}`
2926
+ ref: `${i("__shared")}#/${r}/${sa(a)}`
2927
2927
  };
2928
2928
  }
2929
2929
  let i = `#/${r}/`;
@@ -2931,7 +2931,7 @@ function sa(e, t) {
2931
2931
  let a = t[1].schema.id ?? `__schema${e.counter++}`;
2932
2932
  return {
2933
2933
  defId: a,
2934
- ref: i + oa(a)
2934
+ ref: i + sa(a)
2935
2935
  };
2936
2936
  }, a = (e) => {
2937
2937
  if (e[1].schema.$ref) return;
@@ -2975,13 +2975,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2975
2975
  }
2976
2976
  e.external && (e.sharedDefsExtractedFor = e.external);
2977
2977
  }
2978
- function ca(e) {
2978
+ function la(e) {
2979
2979
  let t = e.anyOf;
2980
2980
  if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
2981
2981
  let n = [];
2982
2982
  for (let e of t) {
2983
2983
  if (!e || typeof e != "object") return;
2984
- ca(e);
2984
+ la(e);
2985
2985
  let t = Object.keys(e);
2986
2986
  if (t.length !== 1 || t[0] !== "type") return;
2987
2987
  let r = e.type;
@@ -2992,21 +2992,21 @@ function ca(e) {
2992
2992
  }
2993
2993
  delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
2994
2994
  }
2995
- var la = /* @__PURE__ */ new Set([
2995
+ var ua = /* @__PURE__ */ new Set([
2996
2996
  "type",
2997
2997
  "properties",
2998
2998
  "required",
2999
2999
  "additionalProperties"
3000
- ]), ua = ["oneOf", "anyOf"];
3001
- function da(e) {
3000
+ ]), da = ["oneOf", "anyOf"];
3001
+ function fa(e) {
3002
3002
  let t = e.additionalProperties;
3003
3003
  return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
3004
3004
  }
3005
- function fa(e) {
3005
+ function pa(e) {
3006
3006
  let t = [];
3007
3007
  for (let n of e) {
3008
3008
  if (typeof n != "object" || n.type !== "object") return null;
3009
- for (let e in n) if (!la.has(e)) return null;
3009
+ for (let e in n) if (!ua.has(e)) return null;
3010
3010
  t.push(n);
3011
3011
  }
3012
3012
  let n = {}, r = /* @__PURE__ */ new Set();
@@ -3015,10 +3015,10 @@ function fa(e) {
3015
3015
  if (Object.prototype.hasOwnProperty.call(n, r)) continue;
3016
3016
  let e = [];
3017
3017
  for (let n of t) {
3018
- let t = n.properties?.[r] ?? da(n);
3018
+ let t = n.properties?.[r] ?? fa(n);
3019
3019
  t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
3020
3020
  }
3021
- l(n, r, e.length === 1 ? e[0] : fa(e) ?? { allOf: e });
3021
+ l(n, r, e.length === 1 ? e[0] : pa(e) ?? { allOf: e });
3022
3022
  }
3023
3023
  for (let t of e.required ?? []) r.add(t);
3024
3024
  }
@@ -3030,29 +3030,29 @@ function fa(e) {
3030
3030
  else {
3031
3031
  let e = [];
3032
3032
  for (let n of t) {
3033
- let t = da(n);
3033
+ let t = fa(n);
3034
3034
  t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
3035
3035
  }
3036
3036
  e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
3037
3037
  }
3038
3038
  return i;
3039
3039
  }
3040
- function pa(e) {
3040
+ function ma(e) {
3041
3041
  let t = e.allOf;
3042
3042
  if (!Array.isArray(t) || t.length < 2) return;
3043
- for (let t of la) if (t in e) return;
3044
- let n = t.filter((e) => ua.some((t) => Array.isArray(e[t]))), r = null;
3045
- if (!n.length) r = fa(t);
3043
+ for (let t of ua) if (t in e) return;
3044
+ let n = t.filter((e) => da.some((t) => Array.isArray(e[t]))), r = null;
3045
+ if (!n.length) r = pa(t);
3046
3046
  else {
3047
- let e = n[0], i = ua.find((t) => Array.isArray(e[t]));
3047
+ let e = n[0], i = da.find((t) => Array.isArray(e[t]));
3048
3048
  if (Object.keys(e).length !== 1) return;
3049
- let a = t.filter((t) => t !== e), o = e[i].map((e) => fa([...a, e]));
3049
+ let a = t.filter((t) => t !== e), o = e[i].map((e) => pa([...a, e]));
3050
3050
  if (o.some((e) => !e)) return;
3051
3051
  r = { [i]: o };
3052
3052
  }
3053
- r && (delete e.allOf, ia(e, r));
3053
+ r && (delete e.allOf, aa(e, r));
3054
3054
  }
3055
- function ma(e, t) {
3055
+ function ha(e, t) {
3056
3056
  let n = e.seen.get(t);
3057
3057
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
3058
3058
  let r = (t) => {
@@ -3062,7 +3062,7 @@ function ma(e, t) {
3062
3062
  if (n.ref = null, o) {
3063
3063
  r(o);
3064
3064
  let n = e.seen.get(o), s = n.schema;
3065
- if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : ia(i, s), ia(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3065
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : aa(i, s), aa(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3066
3066
  if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
3067
3067
  }
3068
3068
  let s = t._zod.parent;
@@ -3079,7 +3079,7 @@ function ma(e, t) {
3079
3079
  };
3080
3080
  if (!e.external || e.sharedEmitDoneFor !== e.external) {
3081
3081
  for (let t of [...e.seen.entries()].reverse()) r(t[0]);
3082
- if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ca(t[1].def ?? t[1].schema);
3082
+ if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) la(t[1].def ?? t[1].schema);
3083
3083
  for (let t of e.deferred) t();
3084
3084
  if (e.intersections.length) {
3085
3085
  let t = /* @__PURE__ */ new Map();
@@ -3089,7 +3089,7 @@ function ma(e, t) {
3089
3089
  let r = t.get(n);
3090
3090
  r ? r.push(e) : t.set(n, [e]);
3091
3091
  }
3092
- for (let n of e.intersections) for (let e of t.get(n) ?? []) pa(e);
3092
+ for (let n of e.intersections) for (let e of t.get(n) ?? []) ma(e);
3093
3093
  }
3094
3094
  }
3095
3095
  let i = {};
@@ -3098,7 +3098,7 @@ function ma(e, t) {
3098
3098
  if (!n) throw Error("Schema is missing an `id` property");
3099
3099
  i.$id = e.external.uri(n);
3100
3100
  }
3101
- ia(i, n.defId ? n.schema : n.def ?? n.schema);
3101
+ aa(i, n.defId ? n.schema : n.def ?? n.schema);
3102
3102
  let a = e.metadataRegistry.get(t)?.id;
3103
3103
  a !== void 0 && i.id === a && delete i.id;
3104
3104
  let o = e.external?.defs ?? {};
@@ -3113,8 +3113,8 @@ function ma(e, t) {
3113
3113
  value: {
3114
3114
  ...t["~standard"],
3115
3115
  jsonSchema: {
3116
- input: ga(t, "input", e.processors),
3117
- output: ga(t, "output", e.processors)
3116
+ input: _a(t, "input", e.processors),
3117
+ output: _a(t, "output", e.processors)
3118
3118
  }
3119
3119
  },
3120
3120
  enumerable: !1,
@@ -3124,83 +3124,83 @@ function ma(e, t) {
3124
3124
  throw Error("Error converting schema to JSON.");
3125
3125
  }
3126
3126
  }
3127
- function P(e, t) {
3127
+ function N(e, t) {
3128
3128
  let n = t ?? { seen: /* @__PURE__ */ new Set() };
3129
3129
  if (n.seen.has(e)) return !1;
3130
3130
  n.seen.add(e);
3131
3131
  let r = e._zod.def;
3132
3132
  if (r.type === "transform") return !0;
3133
- if (r.type === "array") return P(r.element, n);
3134
- if (r.type === "set") return P(r.valueType, n);
3135
- if (r.type === "lazy") return P(r.getter(), n);
3136
- if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return P(r.innerType, n);
3137
- if (r.type === "intersection") return P(r.left, n) || P(r.right, n);
3138
- if (r.type === "record" || r.type === "map") return P(r.keyType, n) || P(r.valueType, n);
3139
- if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : P(r.in, n) || P(r.out, n);
3133
+ if (r.type === "array") return N(r.element, n);
3134
+ if (r.type === "set") return N(r.valueType, n);
3135
+ if (r.type === "lazy") return N(r.getter(), n);
3136
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return N(r.innerType, n);
3137
+ if (r.type === "intersection") return N(r.left, n) || N(r.right, n);
3138
+ if (r.type === "record" || r.type === "map") return N(r.keyType, n) || N(r.valueType, n);
3139
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : N(r.in, n) || N(r.out, n);
3140
3140
  if (r.type === "object") {
3141
- for (let e in r.shape) if (P(r.shape[e], n)) return !0;
3141
+ for (let e in r.shape) if (N(r.shape[e], n)) return !0;
3142
3142
  return !1;
3143
3143
  }
3144
3144
  if (r.type === "union") {
3145
- for (let e of r.options) if (P(e, n)) return !0;
3145
+ for (let e of r.options) if (N(e, n)) return !0;
3146
3146
  return !1;
3147
3147
  }
3148
3148
  if (r.type === "tuple") {
3149
- for (let e of r.items) if (P(e, n)) return !0;
3150
- return !!(r.rest && P(r.rest, n));
3149
+ for (let e of r.items) if (N(e, n)) return !0;
3150
+ return !!(r.rest && N(r.rest, n));
3151
3151
  }
3152
3152
  return !1;
3153
3153
  }
3154
- var ha = (e, t = {}) => (n) => {
3155
- let r = aa({
3154
+ var ga = (e, t = {}) => (n) => {
3155
+ let r = oa({
3156
3156
  ...n,
3157
3157
  processors: t
3158
3158
  });
3159
- return N(e, r), sa(r, e), ma(r, e);
3160
- }, ga = (e, t, n = {}) => (r) => {
3161
- let { libraryOptions: i, target: a } = r ?? {}, o = aa({
3159
+ return M(e, r), ca(r, e), ha(r, e);
3160
+ }, _a = (e, t, n = {}) => (r) => {
3161
+ let { libraryOptions: i, target: a } = r ?? {}, o = oa({
3162
3162
  ...i ?? {},
3163
3163
  target: a,
3164
3164
  io: t,
3165
3165
  processors: n
3166
3166
  });
3167
- return N(e, o), sa(o, e), ma(o, e);
3168
- }, _a = {
3167
+ return M(e, o), ca(o, e), ha(o, e);
3168
+ }, va = {
3169
3169
  guid: "uuid",
3170
3170
  url: "uri",
3171
3171
  datetime: "date-time",
3172
3172
  json_string: "json-string",
3173
3173
  regex: ""
3174
- }, va = (e, t, n, r) => {
3174
+ }, ya = (e, t, n, r) => {
3175
3175
  let i = n;
3176
3176
  i.type = "string";
3177
3177
  let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
3178
- if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = _a[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3178
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = va[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3179
3179
  let e = [...c];
3180
3180
  e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
3181
3181
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3182
3182
  pattern: e.source
3183
3183
  }))]);
3184
3184
  }
3185
- }, ya = (e, t, n, r) => {
3185
+ }, ba = (e, t, n, r) => {
3186
3186
  let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
3187
3187
  i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
3188
3188
  let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
3189
- d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : M(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3190
- }, ba = (e, t, n, r) => {
3191
- n.type = "boolean";
3189
+ d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : j(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3192
3190
  }, xa = (e, t, n, r) => {
3193
- t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3191
+ n.type = "boolean";
3194
3192
  }, Sa = (e, t, n, r) => {
3193
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3194
+ }, Ca = (e, t, n, r) => {
3195
3195
  n.not = {};
3196
- }, Ca = (t, n, r, i) => {
3196
+ }, wa = (t, n, r, i) => {
3197
3197
  let a = t._zod.def, o = e(a.entries);
3198
3198
  if (o.length === 0) {
3199
3199
  r.not = {};
3200
3200
  return;
3201
3201
  }
3202
3202
  o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
3203
- }, wa = (e, t, n, r) => {
3203
+ }, Ta = (e, t, n, r) => {
3204
3204
  let i = e._zod.def;
3205
3205
  if (i.values.length === 0) {
3206
3206
  n.not = {};
@@ -3208,9 +3208,9 @@ var ha = (e, t = {}) => (n) => {
3208
3208
  }
3209
3209
  let a = [];
3210
3210
  for (let o of i.values) if (o === void 0) {
3211
- if (M(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3211
+ if (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3212
3212
  } else if (typeof o == "bigint") {
3213
- if (M(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3213
+ if (j(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3214
3214
  a.push(Number(o));
3215
3215
  } else a.push(o);
3216
3216
  if (a.length !== 0) {
@@ -3219,26 +3219,26 @@ var ha = (e, t = {}) => (n) => {
3219
3219
  n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
3220
3220
  } else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
3221
3221
  }
3222
- }, Ta = (e, t, n, r) => {
3223
- M(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3224
3222
  }, Ea = (e, t, n, r) => {
3225
- M(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3223
+ j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3226
3224
  }, Da = (e, t, n, r) => {
3225
+ j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3226
+ }, Oa = (e, t, n, r) => {
3227
3227
  let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
3228
- typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = N(a.element, t, {
3228
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = M(a.element, t, {
3229
3229
  ...r,
3230
3230
  path: [...r.path, "items"]
3231
3231
  });
3232
3232
  };
3233
- function Oa(e) {
3233
+ function ka(e) {
3234
3234
  let t = e._zod.def;
3235
- return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Oa(t.out) : t.type === "catch" ? Oa(t.innerType) : e._zod.optin;
3235
+ return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? ka(t.out) : t.type === "catch" ? ka(t.innerType) : e._zod.optin;
3236
3236
  }
3237
- var ka = (e, t, n, r) => {
3237
+ var Aa = (e, t, n, r) => {
3238
3238
  let i = n, a = e._zod.def, o = a.shape;
3239
- if (Object.getOwnPropertySymbols(o).length && M(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3239
+ if (Object.getOwnPropertySymbols(o).length && j(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3240
3240
  i.type = "object", i.properties = {};
3241
- for (let e in o) l(i.properties, e, N(o[e], t, {
3241
+ for (let e in o) l(i.properties, e, M(o[e], t, {
3242
3242
  ...r,
3243
3243
  path: [
3244
3244
  ...r.path,
@@ -3248,14 +3248,14 @@ var ka = (e, t, n, r) => {
3248
3248
  }));
3249
3249
  let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
3250
3250
  let n = a.shape[e];
3251
- return t.io === "input" ? Oa(n) === void 0 : n._zod.optout === void 0;
3251
+ return t.io === "input" ? ka(n) === void 0 : n._zod.optout === void 0;
3252
3252
  }));
3253
- c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = N(a.catchall, t, {
3253
+ c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = M(a.catchall, t, {
3254
3254
  ...r,
3255
3255
  path: [...r.path, "additionalProperties"]
3256
3256
  })) : t.io === "output" && (i.additionalProperties = !1);
3257
- }, Aa = (e, t, n, r) => {
3258
- let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => N(e, t, {
3257
+ }, ja = (e, t, n, r) => {
3258
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => M(e, t, {
3259
3259
  ...r,
3260
3260
  path: [
3261
3261
  ...r.path,
@@ -3264,15 +3264,15 @@ var ka = (e, t, n, r) => {
3264
3264
  ]
3265
3265
  }));
3266
3266
  a ? n.oneOf = o : n.anyOf = o;
3267
- }, ja = (e, t, n, r) => {
3268
- let i = e._zod.def, a = N(i.left, t, {
3267
+ }, Ma = (e, t, n, r) => {
3268
+ let i = e._zod.def, a = M(i.left, t, {
3269
3269
  ...r,
3270
3270
  path: [
3271
3271
  ...r.path,
3272
3272
  "allOf",
3273
3273
  0
3274
3274
  ]
3275
- }), o = N(i.right, t, {
3275
+ }), o = M(i.right, t, {
3276
3276
  ...r,
3277
3277
  path: [
3278
3278
  ...r.path,
@@ -3281,17 +3281,17 @@ var ka = (e, t, n, r) => {
3281
3281
  ]
3282
3282
  }), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
3283
3283
  n.allOf = c, t.intersections.push(c);
3284
- }, Ma = (e, t, n, r) => {
3284
+ }, Na = (e, t, n, r) => {
3285
3285
  let i = n, a = e._zod.def;
3286
3286
  i.type = "array";
3287
- let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => N(e, t, {
3287
+ let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => M(e, t, {
3288
3288
  ...r,
3289
3289
  path: [
3290
3290
  ...r.path,
3291
3291
  o,
3292
3292
  n
3293
3293
  ]
3294
- })), l = a.rest ? N(a.rest, t, {
3294
+ })), l = a.rest ? M(a.rest, t, {
3295
3295
  ...r,
3296
3296
  path: [
3297
3297
  ...r.path,
@@ -3301,7 +3301,7 @@ var ka = (e, t, n, r) => {
3301
3301
  }) : null, u = a.items.length;
3302
3302
  for (; u > 0;) {
3303
3303
  let e = a.items[u - 1];
3304
- if (!(t.io === "input" ? Oa(e) !== void 0 : e._zod.optout === "optional")) break;
3304
+ if (!(t.io === "input" ? ka(e) !== void 0 : e._zod.optout === "optional")) break;
3305
3305
  u--;
3306
3306
  }
3307
3307
  let d = a.items.length, f = !a.rest;
@@ -3309,19 +3309,19 @@ var ka = (e, t, n, r) => {
3309
3309
  let { minimum: p, maximum: m } = e._zod.bag;
3310
3310
  typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
3311
3311
  };
3312
- function Na(e, t, n) {
3312
+ function Pa(e, t, n) {
3313
3313
  if (t.$ref) {
3314
3314
  if (n.has(t)) return t;
3315
3315
  n.add(t);
3316
3316
  let r = e.get(t)?.def;
3317
3317
  if (!r) return t;
3318
- let i = Na(e, r, n);
3318
+ let i = Pa(e, r, n);
3319
3319
  return i === r ? t : i;
3320
3320
  }
3321
3321
  for (let r of ["anyOf", "oneOf"]) {
3322
3322
  let i = t[r];
3323
3323
  if (!Array.isArray(i)) continue;
3324
- let a = i.map((t) => Na(e, t, n));
3324
+ let a = i.map((t) => Pa(e, t, n));
3325
3325
  a.some((e, t) => e !== i[t]) && (t = {
3326
3326
  ...t,
3327
3327
  [r]: a
@@ -3332,15 +3332,15 @@ function Na(e, t, n) {
3332
3332
  let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
3333
3333
  return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Rt : Lt).source), p) : p;
3334
3334
  }
3335
- var Pa = /* @__PURE__ */ new WeakMap();
3336
- function Fa(e) {
3335
+ var Fa = /* @__PURE__ */ new WeakMap();
3336
+ function Ia(e) {
3337
3337
  let t = /* @__PURE__ */ new Map();
3338
3338
  for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
3339
3339
  let n = /* @__PURE__ */ new Map();
3340
- for (let r of Pa.get(e) ?? []) {
3340
+ for (let r of Fa.get(e) ?? []) {
3341
3341
  let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
3342
3342
  if (!a || a === !0 || n.has(a)) continue;
3343
- let o = Na(t, a, /* @__PURE__ */ new Set());
3343
+ let o = Pa(t, a, /* @__PURE__ */ new Set());
3344
3344
  o !== a && n.set(a, o);
3345
3345
  }
3346
3346
  if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
@@ -3348,12 +3348,12 @@ function Fa(e) {
3348
3348
  t && (e.propertyNames = t);
3349
3349
  }
3350
3350
  }
3351
- var Ia = (e, t, n, r) => {
3351
+ var La = (e, t, n, r) => {
3352
3352
  let i = n, a = e._zod.def;
3353
3353
  i.type = "object";
3354
3354
  let o = a.keyType, s = o._zod.bag?.patterns;
3355
3355
  if (a.mode === "loose" && s && s.size > 0) {
3356
- let e = N(a.valueType, t, {
3356
+ let e = M(a.valueType, t, {
3357
3357
  ...r,
3358
3358
  path: [
3359
3359
  ...r.path,
@@ -3365,85 +3365,85 @@ var Ia = (e, t, n, r) => {
3365
3365
  for (let t of s) l(i.patternProperties, t.source, e);
3366
3366
  } else {
3367
3367
  if (t.target === "draft-07" || t.target === "draft-2020-12") {
3368
- i.propertyNames = N(a.keyType, t, {
3368
+ i.propertyNames = M(a.keyType, t, {
3369
3369
  ...r,
3370
3370
  path: [...r.path, "propertyNames"]
3371
3371
  });
3372
- let n = Pa.get(t);
3373
- n || (n = [], Pa.set(t, n), t.deferred.push(() => Fa(t))), n.push(e);
3372
+ let n = Fa.get(t);
3373
+ n || (n = [], Fa.set(t, n), t.deferred.push(() => Ia(t))), n.push(e);
3374
3374
  }
3375
- i.additionalProperties = N(a.valueType, t, {
3375
+ i.additionalProperties = M(a.valueType, t, {
3376
3376
  ...r,
3377
3377
  path: [...r.path, "additionalProperties"]
3378
3378
  });
3379
3379
  }
3380
- let c = o._zod.values, u = t.io === "input" && Oa(a.valueType) !== void 0;
3380
+ let c = o._zod.values, u = t.io === "input" && ka(a.valueType) !== void 0;
3381
3381
  if (c && !a.partial && !u) {
3382
3382
  let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
3383
3383
  e.length > 0 && (i.required = e.map(String));
3384
3384
  }
3385
- }, La = (e, t, n, r) => {
3386
- let i = e._zod.def, a = N(i.innerType, t, r), o = t.seen.get(e);
3387
- t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3388
3385
  }, Ra = (e, t, n, r) => {
3386
+ let i = e._zod.def, a = M(i.innerType, t, r), o = t.seen.get(e);
3387
+ t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3388
+ }, za = (e, t, n, r) => {
3389
3389
  let i = e._zod.def;
3390
- N(i.innerType, t, r);
3390
+ M(i.innerType, t, r);
3391
3391
  let a = t.seen.get(e);
3392
3392
  a.ref = i.innerType;
3393
- }, za = Symbol();
3394
- function Ba(e, t, n, r, i) {
3393
+ }, Ba = Symbol();
3394
+ function Va(e, t, n, r, i) {
3395
3395
  let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
3396
- return a ? (M(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), za) : JSON.parse(o);
3396
+ return a ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), Ba) : JSON.parse(o);
3397
3397
  }
3398
- var Va = (e, t, n, r) => {
3398
+ var Ha = (e, t, n, r) => {
3399
3399
  let i = e._zod.def;
3400
- N(i.innerType, t, r);
3400
+ M(i.innerType, t, r);
3401
3401
  let a = t.seen.get(e);
3402
3402
  a.ref = i.innerType;
3403
- let o = Ba(i.defaultValue, e, t, n, r);
3404
- o !== za && (n.default = o);
3405
- }, Ha = (e, t, n, r) => {
3403
+ let o = Va(i.defaultValue, e, t, n, r);
3404
+ o !== Ba && (n.default = o);
3405
+ }, Ua = (e, t, n, r) => {
3406
3406
  let i = e._zod.def;
3407
- N(i.innerType, t, r);
3407
+ M(i.innerType, t, r);
3408
3408
  let a = t.seen.get(e);
3409
3409
  if (a.ref = i.innerType, t.io !== "input") return;
3410
- let o = Ba(i.defaultValue, e, t, n, r);
3411
- o !== za && (n._prefault = o);
3412
- }, Ua = (e, t, n, r) => {
3410
+ let o = Va(i.defaultValue, e, t, n, r);
3411
+ o !== Ba && (n._prefault = o);
3412
+ }, Wa = (e, t, n, r) => {
3413
3413
  let i = e._zod.def;
3414
- N(i.innerType, t, r);
3414
+ M(i.innerType, t, r);
3415
3415
  let a = t.seen.get(e);
3416
3416
  a.ref = i.innerType;
3417
3417
  let o;
3418
3418
  try {
3419
3419
  o = i.catchValue(void 0);
3420
3420
  } catch {
3421
- M(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3421
+ j(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3422
3422
  return;
3423
3423
  }
3424
3424
  n.default = o;
3425
- }, Wa = (e, t, n, r) => {
3425
+ }, Ga = (e, t, n, r) => {
3426
3426
  let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
3427
- N(o, t, r);
3427
+ M(o, t, r);
3428
3428
  let s = t.seen.get(e);
3429
3429
  s.ref = o;
3430
- }, Ga = (e, t, n, r) => {
3430
+ }, Ka = (e, t, n, r) => {
3431
3431
  let i = e._zod.def;
3432
- N(i.innerType, t, r);
3432
+ M(i.innerType, t, r);
3433
3433
  let a = t.seen.get(e);
3434
3434
  a.ref = i.innerType, n.readOnly = !0;
3435
- }, Ka = (e, t, n, r) => {
3435
+ }, qa = (e, t, n, r) => {
3436
3436
  let i = e._zod.def;
3437
- N(i.innerType, t, r);
3437
+ M(i.innerType, t, r);
3438
3438
  let a = t.seen.get(e);
3439
3439
  a.ref = i.innerType;
3440
- }, qa = (e, t, n, r) => {
3440
+ }, Ja = (e, t, n, r) => {
3441
3441
  let i = e._zod.innerType;
3442
- N(i, t, r);
3442
+ M(i, t, r);
3443
3443
  let a = t.seen.get(e);
3444
3444
  a.ref = i;
3445
- }, Ja = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3446
- function Ya(e, t, n) {
3445
+ }, Ya = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3446
+ function Xa(e, t, n) {
3447
3447
  Object.defineProperty(e, t, {
3448
3448
  configurable: !0,
3449
3449
  enumerable: !1,
@@ -3464,12 +3464,12 @@ function Ya(e, t, n) {
3464
3464
  }
3465
3465
  });
3466
3466
  }
3467
- var F = /*@__PURE__*/ w("ZodError", (e, t) => {
3467
+ var P = /*@__PURE__*/ w("ZodError", (e, t) => {
3468
3468
  Ue.init(e, t), e.name = "ZodError";
3469
3469
  let r = Object.getPrototypeOf(e);
3470
- Ja.has(r) || (Ja.add(r), Ya(r, "format", (e) => (t) => qe(e, t)), Ya(r, "flatten", (e) => (t) => Ke(e, t)), Ya(r, "addIssue", (e) => (t) => {
3470
+ Ya.has(r) || (Ya.add(r), Xa(r, "format", (e) => (t) => qe(e, t)), Xa(r, "flatten", (e) => (t) => Ke(e, t)), Xa(r, "addIssue", (e) => (t) => {
3471
3471
  e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
3472
- }), Ya(r, "addIssues", (e) => (t) => {
3472
+ }), Xa(r, "addIssues", (e) => (t) => {
3473
3473
  e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
3474
3474
  }), Object.defineProperty(r, "isEmpty", {
3475
3475
  configurable: !0,
@@ -3478,16 +3478,16 @@ var F = /*@__PURE__*/ w("ZodError", (e, t) => {
3478
3478
  return this.issues.length === 0;
3479
3479
  }
3480
3480
  }));
3481
- }, void 0, { Parent: Error }), Xa = /* @__PURE__ */ Ye(F), Za = /* @__PURE__ */ Xe(F), Qa = /* @__PURE__ */ Ze(F), $a = /* @__PURE__ */ $e(F), eo = /* @__PURE__ */ tt(F), to = /* @__PURE__ */ nt(F), no = /* @__PURE__ */ rt(F), ro = /* @__PURE__ */ it(F), io = /* @__PURE__ */ at(F), ao = /* @__PURE__ */ ot(F), oo = /* @__PURE__ */ st(F), so = /* @__PURE__ */ ct(F);
3481
+ }, void 0, { Parent: Error }), Za = /* @__PURE__ */ Ye(P), Qa = /* @__PURE__ */ Xe(P), $a = /* @__PURE__ */ Ze(P), eo = /* @__PURE__ */ $e(P), to = /* @__PURE__ */ tt(P), no = /* @__PURE__ */ nt(P), ro = /* @__PURE__ */ rt(P), io = /* @__PURE__ */ it(P), ao = /* @__PURE__ */ at(P), oo = /* @__PURE__ */ ot(P), so = /* @__PURE__ */ st(P), co = /* @__PURE__ */ ct(P);
3482
3482
  //#endregion
3483
3483
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
3484
- function co() {
3484
+ function lo() {
3485
3485
  E.localeError || D(Zr());
3486
3486
  }
3487
- function lo() {
3487
+ function uo() {
3488
3488
  E.memoizer || D({ memoizer: Jr() });
3489
3489
  }
3490
- var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.type = t.type, e), {
3490
+ var F = /*@__PURE__*/ w("ZodType", (e, t) => (lo(), k.init(e, t), e.def = t, e.type = t.type, e), {
3491
3491
  check(...e) {
3492
3492
  let t = this.def;
3493
3493
  return this.clone(u(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
@@ -3500,7 +3500,7 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3500
3500
  return this.check(...e);
3501
3501
  },
3502
3502
  clone(e, t) {
3503
- return g(this, e, t);
3503
+ return _(this, e, t);
3504
3504
  },
3505
3505
  brand() {
3506
3506
  return this;
@@ -3509,55 +3509,55 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3509
3509
  return e.add(this, t), this;
3510
3510
  },
3511
3511
  refine(e, t) {
3512
- return this.check(Ts(e, t));
3512
+ return this.check(Es(e, t));
3513
3513
  },
3514
3514
  superRefine(e, t) {
3515
- return this.check(Es(e, t));
3515
+ return this.check(Ds(e, t));
3516
3516
  },
3517
3517
  overwrite(e) {
3518
- return this.check(/* @__PURE__ */ j(e));
3518
+ return this.check(/* @__PURE__ */ Yi(e));
3519
3519
  },
3520
3520
  optional() {
3521
- return as(this);
3521
+ return os(this);
3522
3522
  },
3523
3523
  exactOptional() {
3524
- return ss(this);
3524
+ return cs(this);
3525
3525
  },
3526
3526
  nullable() {
3527
- return ls(this);
3527
+ return us(this);
3528
3528
  },
3529
3529
  nullish() {
3530
- return as(ls(this));
3530
+ return os(us(this));
3531
3531
  },
3532
3532
  nonoptional(e) {
3533
- return hs(this, e);
3533
+ return gs(this, e);
3534
3534
  },
3535
3535
  array() {
3536
- return H(this);
3536
+ return V(this);
3537
3537
  },
3538
3538
  or(e) {
3539
- return W([this, e]);
3539
+ return U([this, e]);
3540
3540
  },
3541
3541
  and(e) {
3542
- return Xo(this, e);
3542
+ return Zo(this, e);
3543
3543
  },
3544
3544
  transform(e) {
3545
- return ys(this, rs(e));
3545
+ return bs(this, is(e));
3546
3546
  },
3547
3547
  default(e) {
3548
- return ds(this, e);
3548
+ return fs(this, e);
3549
3549
  },
3550
3550
  prefault(e) {
3551
- return ps(this, e);
3551
+ return ms(this, e);
3552
3552
  },
3553
3553
  catch(e) {
3554
- return _s(this, e);
3554
+ return vs(this, e);
3555
3555
  },
3556
3556
  pipe(e) {
3557
- return ys(this, e);
3557
+ return bs(this, e);
3558
3558
  },
3559
3559
  readonly() {
3560
- return xs(this);
3560
+ return Ss(this);
3561
3561
  },
3562
3562
  describe(e) {
3563
3563
  let t = this.clone();
@@ -3581,8 +3581,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3581
3581
  return Ce(this, "~standard", {
3582
3582
  ...un(this),
3583
3583
  jsonSchema: {
3584
- input: ga(this, "input"),
3585
- output: ga(this, "output")
3584
+ input: _a(this, "input"),
3585
+ output: _a(this, "output")
3586
3586
  }
3587
3587
  });
3588
3588
  },
@@ -3590,16 +3590,16 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3590
3590
  x(this, "~standard", e);
3591
3591
  },
3592
3592
  parse: function e(t, n) {
3593
- return Xa(this, t, n, { callee: e });
3593
+ return Za(this, t, n, { callee: e });
3594
3594
  },
3595
3595
  parseAsync: async function e(t, n) {
3596
- return await Za(this, t, n, { callee: e });
3596
+ return await Qa(this, t, n, { callee: e });
3597
3597
  },
3598
3598
  safeParse(e, t) {
3599
- return Qa(this, e, t);
3599
+ return $a(this, e, t);
3600
3600
  },
3601
3601
  async safeParseAsync(e, t) {
3602
- return $a(this, e, t);
3602
+ return eo(this, e, t);
3603
3603
  },
3604
3604
  get spa() {
3605
3605
  return this?.safeParseAsync;
@@ -3608,31 +3608,31 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3608
3608
  x(this, "spa", e);
3609
3609
  },
3610
3610
  encode: function e(t, n) {
3611
- return eo(this, t, n, { callee: e });
3611
+ return to(this, t, n, { callee: e });
3612
3612
  },
3613
3613
  decode: function e(t, n) {
3614
- return to(this, t, n, { callee: e });
3614
+ return no(this, t, n, { callee: e });
3615
3615
  },
3616
3616
  encodeAsync: async function e(t, n) {
3617
- return await no(this, t, n, { callee: e });
3617
+ return await ro(this, t, n, { callee: e });
3618
3618
  },
3619
3619
  decodeAsync: async function e(t, n) {
3620
- return await ro(this, t, n, { callee: e });
3620
+ return await io(this, t, n, { callee: e });
3621
3621
  },
3622
3622
  safeEncode(e, t) {
3623
- return io(this, e, t);
3623
+ return ao(this, e, t);
3624
3624
  },
3625
3625
  safeDecode(e, t) {
3626
- return ao(this, e, t);
3626
+ return oo(this, e, t);
3627
3627
  },
3628
3628
  async safeEncodeAsync(e, t) {
3629
- return oo(this, e, t);
3629
+ return so(this, e, t);
3630
3630
  },
3631
3631
  async safeDecodeAsync(e, t) {
3632
- return so(this, e, t);
3632
+ return co(this, e, t);
3633
3633
  },
3634
3634
  toJSONSchema(e) {
3635
- return ha(this, {})(e);
3635
+ return ga(this, {})(e);
3636
3636
  },
3637
3637
  get description() {
3638
3638
  return ti.get(this)?.description;
@@ -3640,8 +3640,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3640
3640
  get _def() {
3641
3641
  return this._zod.def;
3642
3642
  }
3643
- }), uo = /*@__PURE__*/ w("_ZodString", (e, t) => {
3644
- dn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
3643
+ }), fo = /*@__PURE__*/ w("_ZodString", (e, t) => {
3644
+ dn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
3645
3645
  let n = e._zod.bag;
3646
3646
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
3647
3647
  }, {
@@ -3676,155 +3676,155 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
3676
3676
  return this.check(/* @__PURE__ */ Gi(e));
3677
3677
  },
3678
3678
  trim() {
3679
- return this.check(/* @__PURE__ */ Xi());
3679
+ return this.check(/* @__PURE__ */ Zi());
3680
3680
  },
3681
3681
  normalize(...e) {
3682
- return this.check(/* @__PURE__ */ Yi(...e));
3682
+ return this.check(/* @__PURE__ */ Xi(...e));
3683
3683
  },
3684
3684
  toLowerCase() {
3685
- return this.check(/* @__PURE__ */ Zi());
3685
+ return this.check(/* @__PURE__ */ Qi());
3686
3686
  },
3687
3687
  toUpperCase() {
3688
- return this.check(/* @__PURE__ */ Qi());
3688
+ return this.check(/* @__PURE__ */ $i());
3689
3689
  },
3690
3690
  slugify() {
3691
- return this.check(/* @__PURE__ */ $i());
3691
+ return this.check(/* @__PURE__ */ ea());
3692
3692
  }
3693
- }), fo = /*@__PURE__*/ w("ZodString", (e, t) => {
3694
- dn.init(e, t), uo.init(e, t);
3693
+ }), po = /*@__PURE__*/ w("ZodString", (e, t) => {
3694
+ dn.init(e, t), fo.init(e, t);
3695
3695
  }, {
3696
3696
  email(e) {
3697
- return this.check(/* @__PURE__ */ ri(_o, e));
3697
+ return this.check(/* @__PURE__ */ ri(vo, e));
3698
3698
  },
3699
3699
  url(e) {
3700
- return this.check(/* @__PURE__ */ li(bo, e));
3700
+ return this.check(/* @__PURE__ */ li(xo, e));
3701
3701
  },
3702
3702
  jwt(e) {
3703
- return this.check(/* @__PURE__ */ wi(Fo, e));
3703
+ return this.check(/* @__PURE__ */ wi(Io, e));
3704
3704
  },
3705
3705
  emoji(e) {
3706
- return this.check(/* @__PURE__ */ ui(xo, e));
3706
+ return this.check(/* @__PURE__ */ ui(So, e));
3707
3707
  },
3708
3708
  guid(e) {
3709
- return this.check(/* @__PURE__ */ ii(vo, e));
3709
+ return this.check(/* @__PURE__ */ ii(yo, e));
3710
3710
  },
3711
3711
  uuid(e) {
3712
- return this.check(/* @__PURE__ */ ai(yo, e));
3712
+ return this.check(/* @__PURE__ */ ai(bo, e));
3713
3713
  },
3714
3714
  uuidv4(e) {
3715
- return this.check(/* @__PURE__ */ oi(yo, e));
3715
+ return this.check(/* @__PURE__ */ oi(bo, e));
3716
3716
  },
3717
3717
  uuidv6(e) {
3718
- return this.check(/* @__PURE__ */ si(yo, e));
3718
+ return this.check(/* @__PURE__ */ si(bo, e));
3719
3719
  },
3720
3720
  uuidv7(e) {
3721
- return this.check(/* @__PURE__ */ ci(yo, e));
3721
+ return this.check(/* @__PURE__ */ ci(bo, e));
3722
3722
  },
3723
3723
  nanoid(e) {
3724
- return this.check(/* @__PURE__ */ di(So, e));
3724
+ return this.check(/* @__PURE__ */ di(Co, e));
3725
3725
  },
3726
3726
  cuid(e) {
3727
- return this.check(/* @__PURE__ */ fi(Co, e));
3727
+ return this.check(/* @__PURE__ */ fi(wo, e));
3728
3728
  },
3729
3729
  cuid2(e) {
3730
- return this.check(/* @__PURE__ */ pi(wo, e));
3730
+ return this.check(/* @__PURE__ */ pi(To, e));
3731
3731
  },
3732
3732
  ulid(e) {
3733
- return this.check(/* @__PURE__ */ mi(To, e));
3733
+ return this.check(/* @__PURE__ */ mi(Eo, e));
3734
3734
  },
3735
3735
  base64(e) {
3736
- return this.check(/* @__PURE__ */ xi(Mo, e));
3736
+ return this.check(/* @__PURE__ */ xi(No, e));
3737
3737
  },
3738
3738
  base64url(e) {
3739
- return this.check(/* @__PURE__ */ Si(No, e));
3739
+ return this.check(/* @__PURE__ */ Si(Po, e));
3740
3740
  },
3741
3741
  xid(e) {
3742
- return this.check(/* @__PURE__ */ hi(Eo, e));
3742
+ return this.check(/* @__PURE__ */ hi(Do, e));
3743
3743
  },
3744
3744
  ksuid(e) {
3745
- return this.check(/* @__PURE__ */ gi(Do, e));
3745
+ return this.check(/* @__PURE__ */ gi(Oo, e));
3746
3746
  },
3747
3747
  ipv4(e) {
3748
- return this.check(/* @__PURE__ */ _i(Oo, e));
3748
+ return this.check(/* @__PURE__ */ _i(ko, e));
3749
3749
  },
3750
3750
  ipv6(e) {
3751
- return this.check(/* @__PURE__ */ vi(ko, e));
3751
+ return this.check(/* @__PURE__ */ vi(Ao, e));
3752
3752
  },
3753
3753
  cidrv4(e) {
3754
- return this.check(/* @__PURE__ */ yi(Ao, e));
3754
+ return this.check(/* @__PURE__ */ yi(jo, e));
3755
3755
  },
3756
3756
  cidrv6(e) {
3757
- return this.check(/* @__PURE__ */ bi(jo, e));
3757
+ return this.check(/* @__PURE__ */ bi(Mo, e));
3758
3758
  },
3759
3759
  e164(e) {
3760
- return this.check(/* @__PURE__ */ Ci(Po, e));
3760
+ return this.check(/* @__PURE__ */ Ci(Fo, e));
3761
3761
  },
3762
3762
  datetime(e) {
3763
- return this.check(/* @__PURE__ */ Ti(po, e));
3763
+ return this.check(/* @__PURE__ */ Ti(mo, e));
3764
3764
  },
3765
3765
  date(e) {
3766
- return this.check(/* @__PURE__ */ Ei(mo, e));
3766
+ return this.check(/* @__PURE__ */ Ei(ho, e));
3767
3767
  },
3768
3768
  time(e) {
3769
- return this.check(/* @__PURE__ */ Di(ho, e));
3769
+ return this.check(/* @__PURE__ */ Di(go, e));
3770
3770
  },
3771
3771
  duration(e) {
3772
- return this.check(/* @__PURE__ */ Oi(go, e));
3772
+ return this.check(/* @__PURE__ */ Oi(_o, e));
3773
3773
  }
3774
3774
  });
3775
- function L(e) {
3776
- return /* @__PURE__ */ ni(fo, e);
3777
- }
3778
- var R = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3779
- A.init(e, t), uo.init(e, t);
3780
- }), po = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3781
- On.init(e, t), R.init(e, t);
3782
- }), mo = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3783
- kn.init(e, t), R.init(e, t);
3784
- }), ho = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3785
- An.init(e, t), R.init(e, t);
3786
- }), go = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3787
- jn.init(e, t), R.init(e, t);
3788
- }), _o = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3789
- mn.init(e, t), R.init(e, t);
3790
- }), vo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3791
- fn.init(e, t), R.init(e, t);
3792
- }), yo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3793
- pn.init(e, t), R.init(e, t);
3794
- }), bo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3795
- bn.init(e, t), R.init(e, t);
3796
- }), xo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3797
- xn.init(e, t), R.init(e, t);
3798
- }), So = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3799
- Sn.init(e, t), R.init(e, t);
3800
- }), Co = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3801
- Cn.init(e, t), R.init(e, t);
3802
- }), wo = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3803
- wn.init(e, t), R.init(e, t);
3804
- }), To = /*@__PURE__*/ w("ZodULID", (e, t) => {
3805
- Tn.init(e, t), R.init(e, t);
3806
- }), Eo = /*@__PURE__*/ w("ZodXID", (e, t) => {
3807
- En.init(e, t), R.init(e, t);
3808
- }), Do = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3809
- Dn.init(e, t), R.init(e, t);
3810
- }), Oo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3811
- Mn.init(e, t), R.init(e, t);
3812
- }), ko = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3813
- Fn.init(e, t), R.init(e, t);
3814
- }), Ao = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3815
- In.init(e, t), R.init(e, t);
3816
- }), jo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3817
- Rn.init(e, t), R.init(e, t);
3818
- }), Mo = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3819
- Bn.init(e, t), R.init(e, t);
3820
- }), No = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3821
- Hn.init(e, t), R.init(e, t);
3822
- }), Po = /*@__PURE__*/ w("ZodE164", (e, t) => {
3823
- Un.init(e, t), R.init(e, t);
3824
- }), Fo = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3825
- Gn.init(e, t), R.init(e, t);
3826
- }), Io = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3827
- Kn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
3775
+ function I(e) {
3776
+ return /* @__PURE__ */ ni(po, e);
3777
+ }
3778
+ var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3779
+ A.init(e, t), fo.init(e, t);
3780
+ }), mo = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3781
+ On.init(e, t), L.init(e, t);
3782
+ }), ho = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3783
+ kn.init(e, t), L.init(e, t);
3784
+ }), go = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3785
+ An.init(e, t), L.init(e, t);
3786
+ }), _o = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3787
+ jn.init(e, t), L.init(e, t);
3788
+ }), vo = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3789
+ mn.init(e, t), L.init(e, t);
3790
+ }), yo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3791
+ fn.init(e, t), L.init(e, t);
3792
+ }), bo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3793
+ pn.init(e, t), L.init(e, t);
3794
+ }), xo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3795
+ bn.init(e, t), L.init(e, t);
3796
+ }), So = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3797
+ xn.init(e, t), L.init(e, t);
3798
+ }), Co = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3799
+ Sn.init(e, t), L.init(e, t);
3800
+ }), wo = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3801
+ Cn.init(e, t), L.init(e, t);
3802
+ }), To = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3803
+ wn.init(e, t), L.init(e, t);
3804
+ }), Eo = /*@__PURE__*/ w("ZodULID", (e, t) => {
3805
+ Tn.init(e, t), L.init(e, t);
3806
+ }), Do = /*@__PURE__*/ w("ZodXID", (e, t) => {
3807
+ En.init(e, t), L.init(e, t);
3808
+ }), Oo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3809
+ Dn.init(e, t), L.init(e, t);
3810
+ }), ko = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3811
+ Mn.init(e, t), L.init(e, t);
3812
+ }), Ao = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3813
+ Fn.init(e, t), L.init(e, t);
3814
+ }), jo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3815
+ In.init(e, t), L.init(e, t);
3816
+ }), Mo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3817
+ Rn.init(e, t), L.init(e, t);
3818
+ }), No = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3819
+ Bn.init(e, t), L.init(e, t);
3820
+ }), Po = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3821
+ Hn.init(e, t), L.init(e, t);
3822
+ }), Fo = /*@__PURE__*/ w("ZodE164", (e, t) => {
3823
+ Un.init(e, t), L.init(e, t);
3824
+ }), Io = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3825
+ Gn.init(e, t), L.init(e, t);
3826
+ }), Lo = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3827
+ Kn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
3828
3828
  let n = e._zod.bag;
3829
3829
  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;
3830
3830
  }, {
@@ -3847,10 +3847,10 @@ var R = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3847
3847
  return this.check(/* @__PURE__ */ Ii(e, t));
3848
3848
  },
3849
3849
  int(e) {
3850
- return this.check(Ro(e));
3850
+ return this.check(zo(e));
3851
3851
  },
3852
3852
  safe(e) {
3853
- return this.check(Ro(e));
3853
+ return this.check(zo(e));
3854
3854
  },
3855
3855
  positive(e) {
3856
3856
  return this.check(/* @__PURE__ */ Li(0, e));
@@ -3874,41 +3874,41 @@ var R = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3874
3874
  return this;
3875
3875
  }
3876
3876
  });
3877
- function z(e) {
3878
- return /* @__PURE__ */ ki(Io, e);
3877
+ function R(e) {
3878
+ return /* @__PURE__ */ ki(Lo, e);
3879
3879
  }
3880
- var Lo = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
3881
- qn.init(e, t), Io.init(e, t);
3880
+ var Ro = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
3881
+ qn.init(e, t), Lo.init(e, t);
3882
3882
  });
3883
- function Ro(e) {
3884
- return /* @__PURE__ */ Ai(Lo, e);
3883
+ function zo(e) {
3884
+ return /* @__PURE__ */ Ai(Ro, e);
3885
3885
  }
3886
- var zo = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
3887
- Jn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
3886
+ var Bo = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
3887
+ Jn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
3888
3888
  });
3889
- function B(e) {
3890
- return /* @__PURE__ */ ji(zo, e);
3889
+ function z(e) {
3890
+ return /* @__PURE__ */ ji(Bo, e);
3891
3891
  }
3892
- var Bo = /*@__PURE__*/ w("ZodNull", (e, t) => {
3893
- Yn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
3892
+ var Vo = /*@__PURE__*/ w("ZodNull", (e, t) => {
3893
+ Yn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
3894
3894
  });
3895
- function Vo(e) {
3896
- return /* @__PURE__ */ Mi(Bo, e);
3895
+ function Ho(e) {
3896
+ return /* @__PURE__ */ Mi(Vo, e);
3897
3897
  }
3898
- var Ho = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
3899
- Xn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3898
+ var Uo = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
3899
+ Xn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3900
3900
  });
3901
- function V() {
3902
- return /* @__PURE__ */ Ni(Ho);
3901
+ function B() {
3902
+ return /* @__PURE__ */ Ni(Uo);
3903
3903
  }
3904
- var Uo = /*@__PURE__*/ w("ZodNever", (e, t) => {
3905
- Zn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
3904
+ var Wo = /*@__PURE__*/ w("ZodNever", (e, t) => {
3905
+ Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
3906
3906
  });
3907
- function Wo(e) {
3908
- return /* @__PURE__ */ Pi(Uo, e);
3907
+ function Go(e) {
3908
+ return /* @__PURE__ */ Pi(Wo, e);
3909
3909
  }
3910
- var Go = /*@__PURE__*/ w("ZodArray", (e, t) => {
3911
- lo(), $n.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Da(e, t, n, r), e.element = t.element;
3910
+ var Ko = /*@__PURE__*/ w("ZodArray", (e, t) => {
3911
+ uo(), $n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oa(e, t, n, r), e.element = t.element;
3912
3912
  }, {
3913
3913
  min(e, t) {
3914
3914
  return this.check(/* @__PURE__ */ Vi(e, t));
@@ -3926,14 +3926,14 @@ var Go = /*@__PURE__*/ w("ZodArray", (e, t) => {
3926
3926
  return this.element;
3927
3927
  }
3928
3928
  });
3929
- function H(e, t) {
3930
- return /* @__PURE__ */ ea(Go, e, t);
3929
+ function V(e, t) {
3930
+ return /* @__PURE__ */ ta(Ko, e, t);
3931
3931
  }
3932
- var Ko = /*@__PURE__*/ w("ZodObject", (e, t) => {
3933
- lo(), or.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r), Oe(e, "shape", (e) => e._zod.def.shape, !1);
3932
+ var qo = /*@__PURE__*/ w("ZodObject", (e, t) => {
3933
+ uo(), or.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), Oe(e, "shape", (e) => e._zod.def.shape, !1);
3934
3934
  }, {
3935
3935
  keyof() {
3936
- return K(Object.keys(this._zod.def.shape));
3936
+ return G(Object.keys(this._zod.def.shape));
3937
3937
  },
3938
3938
  catchall(e) {
3939
3939
  return this.clone({
@@ -3944,19 +3944,19 @@ var Ko = /*@__PURE__*/ w("ZodObject", (e, t) => {
3944
3944
  passthrough() {
3945
3945
  return this.clone({
3946
3946
  ...this._zod.def,
3947
- catchall: V()
3947
+ catchall: B()
3948
3948
  });
3949
3949
  },
3950
3950
  loose() {
3951
3951
  return this.clone({
3952
3952
  ...this._zod.def,
3953
- catchall: V()
3953
+ catchall: B()
3954
3954
  });
3955
3955
  },
3956
3956
  strict() {
3957
3957
  return this.clone({
3958
3958
  ...this._zod.def,
3959
- catchall: Wo()
3959
+ catchall: Go()
3960
3960
  });
3961
3961
  },
3962
3962
  strip() {
@@ -3966,67 +3966,67 @@ var Ko = /*@__PURE__*/ w("ZodObject", (e, t) => {
3966
3966
  });
3967
3967
  },
3968
3968
  extend(e) {
3969
- return le(this, e);
3969
+ return ce(this, e);
3970
3970
  },
3971
3971
  safeExtend(e) {
3972
- return ue(this, e);
3972
+ return le(this, e);
3973
3973
  },
3974
3974
  merge(e) {
3975
- return de(this, e);
3975
+ return ue(this, e);
3976
3976
  },
3977
3977
  pick(e) {
3978
- return se(this, e);
3978
+ return oe(this, e);
3979
3979
  },
3980
3980
  omit(e) {
3981
- return ce(this, e);
3981
+ return se(this, e);
3982
3982
  },
3983
3983
  partial(...e) {
3984
- return fe(is, this, e[0]);
3984
+ return de(as, this, e[0]);
3985
3985
  },
3986
3986
  exactPartial(...e) {
3987
- return fe(os, this, e[0], "exactPartial");
3987
+ return de(ss, this, e[0], "exactPartial");
3988
3988
  },
3989
3989
  required(...e) {
3990
- return pe(ms, this, e[0]);
3990
+ return fe(hs, this, e[0]);
3991
3991
  }
3992
3992
  });
3993
- function U(e, t) {
3994
- return new Ko({
3993
+ function H(e, t) {
3994
+ return new qo({
3995
3995
  type: "object",
3996
3996
  shape: e ?? {},
3997
- ..._(t)
3997
+ ...v(t)
3998
3998
  });
3999
3999
  }
4000
- function qo(e, t) {
4001
- return new Ko({
4000
+ function Jo(e, t) {
4001
+ return new qo({
4002
4002
  type: "object",
4003
4003
  shape: e,
4004
- catchall: Wo(),
4005
- ..._(t)
4004
+ catchall: Go(),
4005
+ ...v(t)
4006
4006
  });
4007
4007
  }
4008
- var Jo = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4009
- cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.options = t.options;
4008
+ var Yo = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4009
+ cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r), e.options = t.options;
4010
4010
  });
4011
- function W(e, t) {
4012
- return new Jo({
4011
+ function U(e, t) {
4012
+ return new Yo({
4013
4013
  type: "union",
4014
4014
  options: e,
4015
- ..._(t)
4015
+ ...v(t)
4016
4016
  });
4017
4017
  }
4018
- var Yo = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4019
- lr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r);
4018
+ var Xo = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4019
+ lr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
4020
4020
  });
4021
- function Xo(e, t) {
4022
- return new Yo({
4021
+ function Zo(e, t) {
4022
+ return new Xo({
4023
4023
  type: "intersection",
4024
4024
  left: e,
4025
4025
  right: t
4026
4026
  });
4027
4027
  }
4028
- var Zo = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4029
- lo(), fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
4028
+ var Qo = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4029
+ uo(), fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r);
4030
4030
  }, {
4031
4031
  rest(e) {
4032
4032
  return this.clone({
@@ -4039,85 +4039,85 @@ var Zo = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4039
4039
  if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
4040
4040
  return this.clone({
4041
4041
  ...e,
4042
- items: e.items.map((e) => new is({
4042
+ items: e.items.map((e) => new as({
4043
4043
  type: "optional",
4044
4044
  innerType: e
4045
4045
  }))
4046
4046
  });
4047
4047
  }
4048
4048
  });
4049
- function Qo(e, t, n) {
4049
+ function $o(e, t, n) {
4050
4050
  let r = t instanceof k;
4051
- return new Zo({
4051
+ return new Qo({
4052
4052
  type: "tuple",
4053
4053
  items: e,
4054
4054
  rest: r ? t : null,
4055
- ..._(r ? n : t)
4055
+ ...v(r ? n : t)
4056
4056
  });
4057
4057
  }
4058
- var $o = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4059
- lo(), gr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4058
+ var es = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4059
+ uo(), gr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4060
4060
  });
4061
- function G(e, t, n) {
4062
- return !t || !t._zod ? new $o({
4061
+ function W(e, t, n) {
4062
+ return !t || !t._zod ? new es({
4063
4063
  type: "record",
4064
- keyType: L(),
4064
+ keyType: I(),
4065
4065
  valueType: e,
4066
- ..._(t)
4067
- }) : new $o({
4066
+ ...v(t)
4067
+ }) : new es({
4068
4068
  type: "record",
4069
4069
  keyType: e,
4070
4070
  valueType: t,
4071
- ..._(n)
4071
+ ...v(n)
4072
4072
  });
4073
4073
  }
4074
- var es = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4075
- _r.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4074
+ var ts = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4075
+ _r.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4076
4076
  let n = new Set(Object.keys(t.entries));
4077
4077
  e.extract = (e, r) => {
4078
4078
  let i = {};
4079
4079
  for (let r of e) if (n.has(r)) i[r] = t.entries[r];
4080
4080
  else throw Error(`Key ${r} not found in enum`);
4081
- return new es({
4081
+ return new ts({
4082
4082
  ...t,
4083
4083
  checks: [],
4084
- ..._(r),
4084
+ ...v(r),
4085
4085
  entries: i
4086
4086
  });
4087
4087
  }, e.exclude = (e, r) => {
4088
4088
  let i = { ...t.entries };
4089
4089
  for (let t of e) if (n.has(t)) delete i[t];
4090
4090
  else throw Error(`Key ${t} not found in enum`);
4091
- return new es({
4091
+ return new ts({
4092
4092
  ...t,
4093
4093
  checks: [],
4094
- ..._(r),
4094
+ ...v(r),
4095
4095
  entries: i
4096
4096
  });
4097
4097
  };
4098
4098
  });
4099
- function K(e, t) {
4100
- return new es({
4099
+ function G(e, t) {
4100
+ return new ts({
4101
4101
  type: "enum",
4102
4102
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
4103
- ..._(t)
4103
+ ...v(t)
4104
4104
  });
4105
4105
  }
4106
- var ts = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4107
- vr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4106
+ var ns = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4107
+ vr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4108
4108
  if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
4109
4109
  return t.values[0];
4110
4110
  } });
4111
4111
  });
4112
- function q(e, t) {
4113
- return new ts({
4112
+ function K(e, t) {
4113
+ return new ns({
4114
4114
  type: "literal",
4115
4115
  values: Array.isArray(e) ? e : [e],
4116
- ..._(t)
4116
+ ...v(t)
4117
4117
  });
4118
4118
  }
4119
- var ns = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4120
- lo(), yr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r), e._zod.parse = (n, r) => {
4119
+ var rs = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4120
+ uo(), yr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Da(e, t, n, r), e._zod.parse = (n, r) => {
4121
4121
  if (r.direction === "backward") throw new Fe(e.constructor.name);
4122
4122
  n.addIssue = (r) => {
4123
4123
  if (typeof r == "string") n.issues.push(xe(r, n.value, t));
@@ -4130,44 +4130,44 @@ var ns = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4130
4130
  return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
4131
4131
  };
4132
4132
  });
4133
- function rs(e) {
4134
- return new ns({
4133
+ function is(e) {
4134
+ return new rs({
4135
4135
  type: "transform",
4136
4136
  transform: e
4137
4137
  });
4138
4138
  }
4139
- var is = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4140
- xr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4139
+ var as = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4140
+ xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4141
4141
  });
4142
- function as(e) {
4143
- return new is({
4142
+ function os(e) {
4143
+ return new as({
4144
4144
  type: "optional",
4145
4145
  innerType: e
4146
4146
  });
4147
4147
  }
4148
- var os = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4149
- Sr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4148
+ var ss = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4149
+ Sr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4150
4150
  });
4151
- function ss(e) {
4152
- return new os({
4151
+ function cs(e) {
4152
+ return new ss({
4153
4153
  type: "optional",
4154
4154
  innerType: e
4155
4155
  });
4156
4156
  }
4157
- var cs = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4158
- Cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4157
+ var ls = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4158
+ Cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4159
4159
  });
4160
- function ls(e) {
4161
- return new cs({
4160
+ function us(e) {
4161
+ return new ls({
4162
4162
  type: "nullable",
4163
4163
  innerType: e
4164
4164
  });
4165
4165
  }
4166
- var us = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4167
- wr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4166
+ var ds = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4167
+ wr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4168
4168
  });
4169
- function ds(e, t) {
4170
- return new us({
4169
+ function fs(e, t) {
4170
+ return new ds({
4171
4171
  type: "default",
4172
4172
  innerType: e,
4173
4173
  get defaultValue() {
@@ -4175,11 +4175,11 @@ function ds(e, t) {
4175
4175
  }
4176
4176
  });
4177
4177
  }
4178
- var fs = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4179
- Er.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4178
+ var ps = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4179
+ Er.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4180
4180
  });
4181
- function ps(e, t) {
4182
- return new fs({
4181
+ function ms(e, t) {
4182
+ return new ps({
4183
4183
  type: "prefault",
4184
4184
  innerType: e,
4185
4185
  get defaultValue() {
@@ -4187,177 +4187,191 @@ function ps(e, t) {
4187
4187
  }
4188
4188
  });
4189
4189
  }
4190
- var ms = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4191
- Dr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4190
+ var hs = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4191
+ Dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4192
4192
  });
4193
- function hs(e, t) {
4194
- return new ms({
4193
+ function gs(e, t) {
4194
+ return new hs({
4195
4195
  type: "nonoptional",
4196
4196
  innerType: e,
4197
- ..._(t)
4197
+ ...v(t)
4198
4198
  });
4199
4199
  }
4200
- var gs = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4201
- Ar.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4200
+ var _s = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4201
+ Ar.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4202
4202
  });
4203
- function _s(e, t) {
4204
- return new gs({
4203
+ function vs(e, t) {
4204
+ return new _s({
4205
4205
  type: "catch",
4206
4206
  innerType: e,
4207
4207
  catchValue: typeof t == "function" ? t : Ae(t)
4208
4208
  });
4209
4209
  }
4210
- var vs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4211
- jr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.in = t.in, e.out = t.out;
4210
+ var ys = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4211
+ jr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.in = t.in, e.out = t.out;
4212
4212
  });
4213
- function ys(e, t) {
4214
- return new vs({
4213
+ function bs(e, t) {
4214
+ return new ys({
4215
4215
  type: "pipe",
4216
4216
  in: e,
4217
4217
  out: t
4218
4218
  });
4219
4219
  }
4220
- var bs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4221
- Nr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4220
+ var xs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4221
+ Nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4222
4222
  });
4223
- function xs(e) {
4224
- return new bs({
4223
+ function Ss(e) {
4224
+ return new xs({
4225
4225
  type: "readonly",
4226
4226
  innerType: e
4227
4227
  });
4228
4228
  }
4229
- var Ss = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4230
- Fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4229
+ var Cs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4230
+ Fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4231
4231
  });
4232
- function Cs(e) {
4233
- return new Ss({
4232
+ function ws(e) {
4233
+ return new Cs({
4234
4234
  type: "lazy",
4235
4235
  getter: e
4236
4236
  });
4237
4237
  }
4238
- var ws = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4239
- Ir.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r);
4238
+ var Ts = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4239
+ Ir.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
4240
4240
  });
4241
- function Ts(e, t = {}) {
4242
- return /* @__PURE__ */ ta(ws, e, t);
4241
+ function Es(e, t = {}) {
4242
+ return /* @__PURE__ */ na(Ts, e, t);
4243
4243
  }
4244
- function Es(e, t) {
4245
- return /* @__PURE__ */ na(e, t);
4244
+ function Ds(e, t) {
4245
+ return /* @__PURE__ */ ra(e, t);
4246
4246
  }
4247
- function Ds(e) {
4248
- let t = Cs(() => W([
4249
- L(e),
4247
+ function Os(e) {
4248
+ let t = ws(() => U([
4249
+ I(e),
4250
+ R(),
4250
4251
  z(),
4251
- B(),
4252
- Vo(),
4253
- H(t),
4254
- G(L(), t)
4252
+ Ho(),
4253
+ V(t),
4254
+ W(I(), t)
4255
4255
  ]));
4256
4256
  return t;
4257
4257
  }
4258
4258
  //#endregion
4259
4259
  //#region src/flow/common/json.ts
4260
- var Os = 64;
4261
- function ks(e, t = 0) {
4260
+ var ks = 64;
4261
+ function As(e, t = 0) {
4262
4262
  if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
4263
- if (typeof e == "object" && e) for (let n of Object.values(e)) ks(n, t + 1);
4263
+ if (typeof e == "object" && e) for (let n of Object.values(e)) As(n, t + 1);
4264
4264
  }
4265
4265
  //#endregion
4266
- //#region src/flow/common/changeSchema.ts
4267
- var J = L(), Y = Ds(), As = H(J), js = U({
4268
- description: J.optional(),
4269
- jsonSchema: Y,
4270
- nullable: B(),
4271
- handle: J
4272
- }), X = js.extend({ value: Y.optional() }), Ms = U({
4273
- collapsed: B().optional(),
4274
- group: J
4275
- }), Ns = U({
4276
- kind: q("node"),
4277
- nodeId: J,
4278
- output: J
4279
- }), Ps = U({
4280
- kind: q("flow"),
4281
- input: J
4282
- }), Fs = W([
4283
- Ns,
4284
- Ps,
4285
- U({
4286
- kind: q("binding"),
4287
- bindingId: J
4266
+ //#region src/flow/common/triggerScheduleSchema.ts
4267
+ var js = V(U([H({
4268
+ type: K("cron"),
4269
+ expression: I(),
4270
+ timezone: I()
4271
+ }), H({
4272
+ type: K("every"),
4273
+ unit: G([
4274
+ "day",
4275
+ "hour",
4276
+ "minute",
4277
+ "month",
4278
+ "week"
4279
+ ]),
4280
+ value: R()
4281
+ })])), q = I(), J = Os(), Ms = V(q), Ns = H({
4282
+ description: q.optional(),
4283
+ jsonSchema: J,
4284
+ nullable: z(),
4285
+ handle: q
4286
+ }), Y = Ns.extend({ value: J.optional() }), Ps = H({
4287
+ collapsed: z().optional(),
4288
+ group: q
4289
+ }), Fs = H({
4290
+ kind: K("node"),
4291
+ nodeId: q,
4292
+ output: q
4293
+ }), Is = H({
4294
+ kind: K("flow"),
4295
+ input: q
4296
+ }), Ls = U([
4297
+ Fs,
4298
+ Is,
4299
+ H({
4300
+ kind: K("binding"),
4301
+ bindingId: q
4288
4302
  })
4289
- ]), Is = W([U({
4290
- kind: q("value"),
4291
- value: Y
4292
- }), U({
4293
- kind: q("sources"),
4294
- sources: H(Fs)
4295
- })]), Ls = G(J, Is), Rs = {
4296
- inputs: H(W([X, Ms])),
4297
- outputs: H(W([js, Ms]))
4298
- }, zs = U({
4299
- kind: q("connector"),
4300
- action: J,
4301
- connectionId: J.optional(),
4302
- connections: H(U({
4303
- connectionId: J,
4304
- alias: J.optional()
4303
+ ]), Rs = U([H({
4304
+ kind: K("value"),
4305
+ value: J
4306
+ }), H({
4307
+ kind: K("sources"),
4308
+ sources: V(Ls)
4309
+ })]), zs = W(q, Rs), Bs = {
4310
+ inputs: V(U([Y, Ps])),
4311
+ outputs: V(U([Ns, Ps]))
4312
+ }, Vs = H({
4313
+ kind: K("connector"),
4314
+ action: q,
4315
+ connectionId: q.optional(),
4316
+ connections: V(H({
4317
+ connectionId: q,
4318
+ alias: q.optional()
4305
4319
  }))
4306
- }), Bs = U({
4307
- ...Rs,
4308
- name: J,
4309
- moduleId: J,
4310
- capabilities: H(zs).optional()
4311
- }), Vs = W([U({
4312
- kind: q("value"),
4313
- value: Y
4314
- }), U({
4315
- kind: q("input"),
4316
- input: J
4317
- })]), Hs = W([Vs, U({ kind: q("model") })]), Us = U({
4318
- ...Rs,
4319
- name: J,
4320
- executor: W([
4321
- U({
4322
- kind: q("connector"),
4323
- action: J,
4324
- connectionId: J.optional()
4320
+ }), Hs = H({
4321
+ ...Bs,
4322
+ name: q,
4323
+ moduleId: q,
4324
+ capabilities: V(Vs).optional()
4325
+ }), Us = U([H({
4326
+ kind: K("value"),
4327
+ value: J
4328
+ }), H({
4329
+ kind: K("input"),
4330
+ input: q
4331
+ })]), Ws = U([Us, H({ kind: K("model") })]), Gs = H({
4332
+ ...Bs,
4333
+ name: q,
4334
+ executor: U([
4335
+ H({
4336
+ kind: K("connector"),
4337
+ action: q,
4338
+ connectionId: q.optional()
4325
4339
  }),
4326
- U({
4327
- kind: q("llm"),
4328
- mode: K(["chat", "json"])
4340
+ H({
4341
+ kind: K("llm"),
4342
+ mode: G(["chat", "json"])
4329
4343
  }),
4330
- U({
4331
- kind: q("agent"),
4332
- code: B().optional(),
4333
- model: J,
4334
- prompt: Vs,
4335
- system: J,
4336
- maxRounds: z(),
4337
- tools: H(U({
4338
- id: J,
4339
- name: J,
4340
- description: J,
4341
- action: J,
4342
- connectionId: J.optional(),
4343
- approval: B(),
4344
- inputs: H(X.extend({ source: Hs }))
4344
+ H({
4345
+ kind: K("agent"),
4346
+ code: z().optional(),
4347
+ model: q,
4348
+ prompt: Us,
4349
+ system: q,
4350
+ maxRounds: R(),
4351
+ tools: V(H({
4352
+ id: q,
4353
+ name: q,
4354
+ description: q,
4355
+ action: q,
4356
+ connectionId: q.optional(),
4357
+ approval: z(),
4358
+ inputs: V(Y.extend({ source: Ws }))
4345
4359
  })),
4346
- notification: U({
4347
- taskId: J,
4348
- messageHandle: J,
4349
- inputs: G(J, Vs)
4360
+ notification: H({
4361
+ taskId: q,
4362
+ messageHandle: q,
4363
+ inputs: W(q, Us)
4350
4364
  }).optional()
4351
4365
  })
4352
4366
  ])
4353
- }), Ws = {
4354
- input: X,
4355
- cases: H(U({
4356
- output: J,
4357
- relation: K(["all", "any"]),
4358
- expressions: H(U({
4359
- input: J,
4360
- operator: K([
4367
+ }), Ks = {
4368
+ input: Y,
4369
+ cases: V(H({
4370
+ output: q,
4371
+ relation: G(["all", "any"]),
4372
+ expressions: V(H({
4373
+ input: q,
4374
+ operator: G([
4361
4375
  "!=",
4362
4376
  "<",
4363
4377
  "<=",
@@ -4379,58 +4393,44 @@ var J = L(), Y = Ds(), As = H(J), js = U({
4379
4393
  "notHasValue",
4380
4394
  "startsWith"
4381
4395
  ]),
4382
- value: Y.optional()
4396
+ value: J.optional()
4383
4397
  }))
4384
4398
  })),
4385
- defaultOutput: J.optional()
4386
- }, Gs = {
4387
- actions: W([Qo([q("continue")]), Qo([q("approve"), q("reject")])]),
4388
- prompt: J
4389
- }, Ks = {
4390
- inputsDef: H(X),
4391
- options: U({
4392
- allowedMethods: As.optional(),
4393
- allowedOrigins: As.optional(),
4394
- noResponseBody: B().optional(),
4395
- responseData: J.optional(),
4396
- responseHeaders: G(J, J).optional(),
4397
- responseStatusCode: z().optional()
4399
+ defaultOutput: q.optional()
4400
+ }, qs = {
4401
+ actions: U([$o([K("continue")]), $o([K("approve"), K("reject")])]),
4402
+ prompt: q
4403
+ }, Js = {
4404
+ bodyFields: V(Y),
4405
+ options: H({
4406
+ allowedMethods: Ms.optional(),
4407
+ allowedOrigins: Ms.optional(),
4408
+ noResponseBody: z().optional(),
4409
+ responseData: q.optional(),
4410
+ responseHeaders: W(q, q).optional(),
4411
+ responseStatusCode: R().optional()
4398
4412
  }).optional()
4399
- }, qs = H(W([U({
4400
- type: q("cron"),
4401
- expression: J,
4402
- timezone: J
4403
- }), U({
4404
- type: q("every"),
4405
- unit: K([
4406
- "day",
4407
- "hour",
4408
- "minute",
4409
- "month",
4410
- "week"
4411
- ]),
4412
- value: z()
4413
- })])), Js = {
4414
- configSchema: Y,
4415
- definitionVersion: z(),
4416
- description: J,
4417
- displayName: J,
4418
- key: J,
4419
- name: J,
4420
- payloadSchema: Y,
4421
- provider: J
4422
- }, Ys = U({
4423
- body: U({
4424
- allowArray: B(),
4425
- allowEmpty: B(),
4426
- formats: H(K([
4413
+ }, Ys = {
4414
+ configSchema: J,
4415
+ definitionVersion: K(2),
4416
+ description: q,
4417
+ displayName: q,
4418
+ key: q,
4419
+ name: q,
4420
+ outputs: V(Ns).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4421
+ provider: q
4422
+ }, Xs = H({
4423
+ body: H({
4424
+ allowArray: z(),
4425
+ allowEmpty: z(),
4426
+ formats: V(G([
4427
4427
  "form",
4428
4428
  "json",
4429
4429
  "multipart",
4430
4430
  "text"
4431
4431
  ]))
4432
4432
  }),
4433
- methods: H(K([
4433
+ methods: V(G([
4434
4434
  "DELETE",
4435
4435
  "GET",
4436
4436
  "HEAD",
@@ -4438,304 +4438,382 @@ var J = L(), Y = Ds(), As = H(J), js = U({
4438
4438
  "POST",
4439
4439
  "PUT"
4440
4440
  ])),
4441
- successStatus: z()
4442
- }), Xs = {
4443
- name: J,
4444
- description: J.optional(),
4445
- icon: J.optional()
4446
- }, Z = {
4447
- inputs: Ls,
4448
- name: J.optional(),
4449
- description: J.optional(),
4450
- icon: J.optional(),
4451
- timeoutMs: z().optional()
4452
- }, Zs = W([
4453
- U({
4454
- ...Z,
4455
- kind: q("condition"),
4456
- ...Ws
4441
+ successStatus: R()
4442
+ }), Zs = {
4443
+ name: q,
4444
+ description: q.optional(),
4445
+ icon: q.optional()
4446
+ }, X = {
4447
+ maxExecutions: R().int().positive().max(2 ** 53 - 1).optional(),
4448
+ inputs: zs,
4449
+ name: q.optional(),
4450
+ description: q.optional(),
4451
+ icon: q.optional(),
4452
+ timeoutMs: R().optional()
4453
+ }, Qs = U([
4454
+ H({
4455
+ ...X,
4456
+ kind: K("condition"),
4457
+ ...Ks
4457
4458
  }),
4458
- U({
4459
- ...Z,
4460
- inputs: V().transform(() => ({})).default({}),
4461
- kind: q("value"),
4462
- values: H(X)
4459
+ H({
4460
+ ...X,
4461
+ inputs: B().transform(() => ({})).default({}),
4462
+ kind: K("value"),
4463
+ values: V(Y)
4463
4464
  }),
4464
- U({
4465
- ...Z,
4466
- kind: q("subflow"),
4467
- subflowId: J
4465
+ H({
4466
+ ...X,
4467
+ kind: K("subflow"),
4468
+ subflowId: q
4468
4469
  }),
4469
- U({
4470
- ...Z,
4471
- kind: q("task"),
4472
- task: Bs,
4473
- additionalInputs: H(X).optional()
4470
+ H({
4471
+ ...X,
4472
+ kind: K("task"),
4473
+ task: Hs,
4474
+ additionalInputs: V(Y).optional()
4474
4475
  }),
4475
- U({
4476
- ...Z,
4477
- kind: q("task"),
4478
- taskId: J,
4479
- additionalInputs: H(X).optional()
4476
+ H({
4477
+ ...X,
4478
+ kind: K("task"),
4479
+ taskId: q,
4480
+ additionalInputs: V(Y).optional()
4480
4481
  }),
4481
- qo({
4482
- ...Z,
4483
- kind: q("wait"),
4484
- input: X,
4485
- ...Gs
4482
+ Jo({
4483
+ ...X,
4484
+ kind: K("wait"),
4485
+ input: Y,
4486
+ ...qs
4486
4487
  }).omit({ timeoutMs: !0 }),
4487
- U({
4488
- ...Xs,
4489
- kind: q("manual")
4488
+ H({
4489
+ ...Zs,
4490
+ kind: K("manual")
4490
4491
  }),
4491
- U({
4492
- ...Xs,
4493
- kind: q("webhook"),
4494
- ...Ks
4492
+ H({
4493
+ ...Zs,
4494
+ kind: K("webhook"),
4495
+ ...Js
4495
4496
  }),
4496
- U({
4497
- ...Xs,
4498
- kind: q("cron"),
4499
- cronTimes: qs
4497
+ H({
4498
+ ...Zs,
4499
+ kind: K("cron"),
4500
+ cronTimes: js
4500
4501
  }),
4501
- U({
4502
- ...Xs,
4503
- kind: q("poll"),
4504
- bindingId: J,
4505
- config: G(J, Y),
4506
- definition: U({
4507
- ...Js,
4508
- type: q("poll")
4502
+ H({
4503
+ ...Zs,
4504
+ kind: K("poll"),
4505
+ bindingId: q,
4506
+ config: W(q, J),
4507
+ definition: H({
4508
+ ...Ys,
4509
+ type: K("poll")
4509
4510
  }),
4510
- pollTimes: qs
4511
+ pollTimes: js
4511
4512
  }),
4512
- U({
4513
- ...Xs,
4514
- kind: q("integration"),
4515
- bindingId: J,
4516
- config: G(J, Y),
4517
- definition: U({
4518
- ...Js,
4519
- type: q("integration"),
4520
- endpoint: Ys
4513
+ H({
4514
+ ...Zs,
4515
+ kind: K("integration"),
4516
+ bindingId: q,
4517
+ config: W(q, J),
4518
+ definition: H({
4519
+ ...Ys,
4520
+ type: K("integration"),
4521
+ endpoint: Xs
4521
4522
  })
4522
4523
  })
4523
- ]), Qs = W([U({ kind: q("flow") }), U({
4524
- kind: q("subflow"),
4525
- id: J
4526
- })]), $s = U({
4527
- source: J,
4528
- target: J,
4529
- sourceHandle: J.optional()
4530
- }), Q = {
4531
- nodeId: J,
4532
- target: Qs
4533
- }, ec = U({
4534
- name: J,
4535
- inputs: H(X),
4536
- outputs: H(js.extend({ sources: H(W([Ns, Ps])) }))
4537
- }), tc = U({
4538
- nodes: G(J, Zs),
4539
- edges: H($s).default([])
4540
- }), nc = U({
4541
- kind: K(["connection", "variable"]),
4542
- target: J
4543
- }), rc = U({
4544
- name: J,
4545
- imports: As,
4546
- source: J
4547
- }), ic = U({
4548
- bindings: G(J, nc),
4549
- graph: tc,
4550
- subflows: G(J, ec.extend({ graph: tc })),
4551
- tasks: G(J, Us)
4552
- }), ac = U({
4553
- modelVersion: q(1),
4554
- document: ic,
4555
- modules: G(J, rc)
4556
- }), oc = ac.extend({
4557
- kind: q("open-flow-flow-revision"),
4558
- version: q(1)
4524
+ ]), $s = U([H({ kind: K("flow") }), H({
4525
+ kind: K("subflow"),
4526
+ id: q
4527
+ })]), ec = H({
4528
+ source: q,
4529
+ target: q,
4530
+ sourceHandle: q.optional()
4531
+ }), Z = {
4532
+ nodeId: q,
4533
+ target: $s
4534
+ }, tc = H({
4535
+ name: q,
4536
+ inputs: V(Y),
4537
+ outputs: V(Ns.extend({ sources: V(U([Fs, Is])) }))
4538
+ }), nc = H({
4539
+ nodes: W(q, Qs),
4540
+ edges: V(ec).default([])
4541
+ }), rc = H({
4542
+ kind: G(["connection", "variable"]),
4543
+ target: q
4544
+ }), ic = H({
4545
+ name: q,
4546
+ imports: Ms,
4547
+ source: q
4548
+ }), ac = H({
4549
+ bindings: W(q, rc),
4550
+ graph: nc,
4551
+ subflows: W(q, tc.extend({ graph: nc })),
4552
+ tasks: W(q, Gs)
4553
+ }), oc = H({
4554
+ modelVersion: K(2),
4555
+ document: ac,
4556
+ modules: W(q, ic)
4557
+ }), sc = oc.extend({
4558
+ kind: K("open-flow-flow-revision"),
4559
+ version: K(1)
4559
4560
  });
4560
- function sc(e) {
4561
- return ks(e), ic.parse(e);
4561
+ function Q(e) {
4562
+ return typeof e == "object" && e && !Array.isArray(e) ? e : {};
4562
4563
  }
4563
- function cc(e) {
4564
- return ks(e), ac.parse(e);
4564
+ function cc(e, t, n) {
4565
+ return Object.fromEntries(Object.entries(Q(e)).flatMap(([e, r]) => {
4566
+ let i = t.safeParse(n?.(r) ?? r);
4567
+ return i.success ? [[e, i.data]] : [];
4568
+ }));
4565
4569
  }
4566
4570
  function lc(e) {
4567
- ks(e);
4568
- let t = oc.parse(e);
4571
+ let t = Q(e);
4572
+ if (t.kind == "webhook" && t.bodyFields == null && t.inputsDef != null) return {
4573
+ ...t,
4574
+ bodyFields: t.inputsDef,
4575
+ inputsDef: void 0
4576
+ };
4577
+ if ((t.kind == "poll" || t.kind == "integration") && t.definition != null) {
4578
+ let e = Q(t.definition);
4579
+ if (e.outputs == null && e.payloadSchema != null) return {
4580
+ ...t,
4581
+ definition: {
4582
+ ...e,
4583
+ definitionVersion: 2,
4584
+ outputs: [{
4585
+ handle: "payload",
4586
+ jsonSchema: e.payloadSchema,
4587
+ nullable: !1
4588
+ }],
4589
+ payloadSchema: void 0
4590
+ }
4591
+ };
4592
+ }
4593
+ return t;
4594
+ }
4595
+ function uc(e) {
4596
+ let t = Q(e), n = cc(t.nodes, Qs, lc), r = new Set(Object.entries(n).flatMap(([e, t]) => t.kind == "webhook" ? [e] : []));
4597
+ for (let e of Object.values(n)) if ("inputs" in e) {
4598
+ for (let t of Object.values(e.inputs)) if (t.kind == "sources") for (let e of t.sources) e.kind == "node" && e.output == "payload" && r.has(e.nodeId) && (e.output = "body");
4599
+ }
4600
+ return {
4601
+ nodes: n,
4602
+ edges: Array.isArray(t.edges) ? t.edges.flatMap((e) => ec.safeParse(e).data ?? []) : []
4603
+ };
4604
+ }
4605
+ function dc(e) {
4606
+ As(e);
4607
+ let t = Q(e);
4608
+ if (t.kind != "open-flow-flow-revision" || t.version != 1) throw TypeError("The value is not an Open Flow Revision envelope.");
4609
+ if (typeof t.modelVersion == "number" && t.modelVersion > 2) throw TypeError("The Flow model is newer than this package.");
4610
+ let n = Q(t.document), r = uc(n.graph), i = Object.fromEntries(Object.entries(Q(n.subflows)).flatMap(([e, t]) => {
4611
+ let n = Q(t), r = tc.extend({ graph: nc }).safeParse({
4612
+ ...n,
4613
+ graph: uc(n.graph)
4614
+ });
4615
+ return r.success ? [[e, r.data]] : [];
4616
+ }));
4617
+ return pc({
4618
+ modelVersion: 2,
4619
+ document: {
4620
+ bindings: cc(n.bindings, rc),
4621
+ graph: r,
4622
+ subflows: i,
4623
+ tasks: cc(n.tasks, Gs)
4624
+ },
4625
+ modules: cc(t.modules, ic)
4626
+ });
4627
+ }
4628
+ function fc(e) {
4629
+ return As(e), ac.parse(e);
4630
+ }
4631
+ function pc(e) {
4632
+ return As(e), oc.parse(e);
4633
+ }
4634
+ function mc(e) {
4635
+ As(e);
4636
+ let t = sc.parse(e);
4569
4637
  return {
4570
4638
  modelVersion: t.modelVersion,
4571
4639
  document: t.document,
4572
4640
  modules: t.modules
4573
4641
  };
4574
4642
  }
4575
- var uc = {
4643
+ var hc = {
4576
4644
  "binding.create": {
4577
- bindingId: J,
4578
- binding: nc
4645
+ bindingId: q,
4646
+ binding: rc
4579
4647
  },
4580
- "binding.delete": { bindingId: J },
4648
+ "binding.delete": { bindingId: q },
4581
4649
  "binding.target.set": {
4582
- bindingId: J,
4583
- before: J,
4584
- value: J
4650
+ bindingId: q,
4651
+ before: q,
4652
+ value: q
4585
4653
  },
4586
4654
  "graph.edge.connect": {
4587
- target: Qs,
4588
- edge: $s
4655
+ target: $s,
4656
+ edge: ec
4589
4657
  },
4590
4658
  "graph.edge.disconnect": {
4591
- target: Qs,
4592
- edge: $s
4659
+ target: $s,
4660
+ edge: ec
4593
4661
  },
4594
4662
  "graph.node.create": {
4595
- ...Q,
4596
- node: Zs
4597
- },
4598
- "graph.node.delete": Q,
4599
- "graph.node.field.set": W([U({
4600
- ...Q,
4601
- kind: q("graph.node.field.set"),
4602
- field: K([
4603
- "description",
4604
- "icon",
4605
- "name"
4606
- ]),
4607
- before: J.optional(),
4608
- value: J.optional()
4609
- }), U({
4610
- ...Q,
4611
- kind: q("graph.node.field.set"),
4612
- field: q("timeoutMs"),
4613
- before: z().optional(),
4614
- value: z().optional()
4615
- })]),
4663
+ ...Z,
4664
+ node: Qs
4665
+ },
4666
+ "graph.node.delete": Z,
4667
+ "graph.node.field.set": U([
4668
+ H({
4669
+ ...Z,
4670
+ kind: K("graph.node.field.set"),
4671
+ field: G([
4672
+ "description",
4673
+ "icon",
4674
+ "name"
4675
+ ]),
4676
+ before: q.optional(),
4677
+ value: q.optional()
4678
+ }),
4679
+ H({
4680
+ ...Z,
4681
+ kind: K("graph.node.field.set"),
4682
+ field: K("maxExecutions"),
4683
+ before: R().int().positive().max(2 ** 53 - 1).optional(),
4684
+ value: R().int().positive().max(2 ** 53 - 1).optional()
4685
+ }),
4686
+ H({
4687
+ ...Z,
4688
+ kind: K("graph.node.field.set"),
4689
+ field: K("timeoutMs"),
4690
+ before: R().optional(),
4691
+ value: R().optional()
4692
+ })
4693
+ ]),
4616
4694
  "graph.node.input.set": {
4617
- ...Q,
4618
- handle: J,
4619
- before: Is.optional(),
4620
- value: Is.optional()
4695
+ ...Z,
4696
+ handle: q,
4697
+ before: Rs.optional(),
4698
+ value: Rs.optional()
4621
4699
  },
4622
4700
  "graph.node.additional-inputs.set": {
4623
- ...Q,
4624
- before: H(X).optional(),
4625
- value: H(X).optional()
4701
+ ...Z,
4702
+ before: V(Y).optional(),
4703
+ value: V(Y).optional()
4626
4704
  },
4627
4705
  "graph.node.condition.set": {
4628
- ...Q,
4629
- before: U(Ws),
4630
- value: U(Ws)
4706
+ ...Z,
4707
+ before: H(Ks),
4708
+ value: H(Ks)
4631
4709
  },
4632
4710
  "graph.node.values.set": {
4633
- ...Q,
4634
- before: H(X),
4635
- value: H(X)
4711
+ ...Z,
4712
+ before: V(Y),
4713
+ value: V(Y)
4636
4714
  },
4637
4715
  "graph.node.wait.set": {
4638
- ...Q,
4639
- target: U({ kind: q("flow") }),
4640
- before: U(Gs),
4641
- value: U(Gs)
4716
+ ...Z,
4717
+ target: H({ kind: K("flow") }),
4718
+ before: H(qs),
4719
+ value: H(qs)
4642
4720
  },
4643
4721
  "graph.node.webhook.set": {
4644
- ...Q,
4645
- target: U({ kind: q("flow") }),
4646
- before: U(Ks),
4647
- value: U(Ks)
4722
+ ...Z,
4723
+ target: H({ kind: K("flow") }),
4724
+ before: H(Js),
4725
+ value: H(Js)
4648
4726
  },
4649
4727
  "graph.node.task.ports.set": {
4650
- ...Q,
4651
- before: U(Rs),
4652
- value: U(Rs)
4728
+ ...Z,
4729
+ before: H(Bs),
4730
+ value: H(Bs)
4653
4731
  },
4654
4732
  "graph.node.task.name.set": {
4655
- ...Q,
4656
- before: J,
4657
- value: J
4733
+ ...Z,
4734
+ before: q,
4735
+ value: q
4658
4736
  },
4659
4737
  "graph.node.task.capabilities.set": {
4660
- ...Q,
4661
- before: H(zs).optional(),
4662
- value: H(zs).optional()
4738
+ ...Z,
4739
+ before: V(Vs).optional(),
4740
+ value: V(Vs).optional()
4663
4741
  },
4664
4742
  "graph.trigger.config.set": {
4665
- nodeId: J,
4666
- name: J,
4667
- before: Y.optional(),
4668
- value: Y.optional()
4743
+ nodeId: q,
4744
+ name: q,
4745
+ before: J.optional(),
4746
+ value: J.optional()
4669
4747
  },
4670
4748
  "graph.trigger.schedule.set": {
4671
- nodeId: J,
4672
- before: qs,
4673
- value: qs
4749
+ nodeId: q,
4750
+ before: js,
4751
+ value: js
4674
4752
  },
4675
4753
  "module.create": {
4676
- moduleId: J,
4677
- module: rc
4754
+ moduleId: q,
4755
+ module: ic
4678
4756
  },
4679
- "module.delete": { moduleId: J },
4757
+ "module.delete": { moduleId: q },
4680
4758
  "module.rename": {
4681
- moduleId: J,
4682
- before: J,
4683
- name: J
4759
+ moduleId: q,
4760
+ before: q,
4761
+ name: q
4684
4762
  },
4685
4763
  "module.source.replace": {
4686
- moduleId: J,
4687
- beforeImports: As,
4688
- beforeSource: J,
4689
- imports: As,
4690
- source: J
4764
+ moduleId: q,
4765
+ beforeImports: Ms,
4766
+ beforeSource: q,
4767
+ imports: Ms,
4768
+ source: q
4691
4769
  },
4692
4770
  "subflow.create": {
4693
- subflowId: J,
4694
- subflow: ec.extend({ graph: tc })
4771
+ subflowId: q,
4772
+ subflow: tc.extend({ graph: nc })
4695
4773
  },
4696
4774
  "subflow.definition.set": {
4697
- subflowId: J,
4698
- before: ec,
4699
- definition: ec
4775
+ subflowId: q,
4776
+ before: tc,
4777
+ definition: tc
4700
4778
  },
4701
- "subflow.delete": { subflowId: J },
4779
+ "subflow.delete": { subflowId: q },
4702
4780
  "task.create": {
4703
- taskId: J,
4704
- task: Us
4781
+ taskId: q,
4782
+ task: Gs
4705
4783
  },
4706
- "task.delete": { taskId: J },
4784
+ "task.delete": { taskId: q },
4707
4785
  "task.connector.connection.set": {
4708
- taskId: J,
4709
- before: J.optional(),
4710
- value: J.optional()
4786
+ taskId: q,
4787
+ before: q.optional(),
4788
+ value: q.optional()
4711
4789
  },
4712
4790
  "task.agent.set": {
4713
- taskId: J,
4714
- before: Us,
4715
- value: Us
4791
+ taskId: q,
4792
+ before: Gs,
4793
+ value: Gs
4716
4794
  },
4717
4795
  "task.llm.mode.set": {
4718
- taskId: J,
4719
- before: K(["chat", "json"]),
4720
- value: K(["chat", "json"])
4796
+ taskId: q,
4797
+ before: G(["chat", "json"]),
4798
+ value: G(["chat", "json"])
4721
4799
  },
4722
4800
  "task.name.set": {
4723
- taskId: J,
4724
- before: J,
4725
- value: J
4801
+ taskId: q,
4802
+ before: q,
4803
+ value: q
4726
4804
  }
4727
4805
  };
4728
- H(W([...new Map(Object.entries(uc).map(([e, t]) => [e, t instanceof I ? t : U({
4729
- kind: q(e),
4806
+ V(U([...new Map(Object.entries(hc).map(([e, t]) => [e, t instanceof F ? t : H({
4807
+ kind: K(e),
4730
4808
  ...t
4731
4809
  })])).values()])).min(1);
4732
4810
  //#endregion
4733
4811
  //#region src/flow/common/change.ts
4734
- function dc(e) {
4812
+ function gc(e) {
4735
4813
  return e.trim().normalize("NFC");
4736
4814
  }
4737
- function fc(e, t) {
4738
- let n = dc(e), r = new Set([...t].map(dc));
4815
+ function _c(e, t) {
4816
+ let n = gc(e), r = new Set([...t].map(gc));
4739
4817
  if (!r.has(n)) return n;
4740
4818
  let i = /^(.*) \((\d+)\)$/.exec(n), a = i?.[2], o = a != null && Number(a) >= 2 ? Number(a) : void 0, s = o == null ? n : i?.[1] ?? n, c = o == null ? 2 : o + 1;
4741
4819
  for (; r.has(`${s} (${c})`);) c += 1;
@@ -4743,24 +4821,24 @@ function fc(e, t) {
4743
4821
  }
4744
4822
  //#endregion
4745
4823
  //#region src/flow/common/encoding.ts
4746
- var pc = new TextEncoder();
4747
- function mc(e) {
4824
+ var vc = new TextEncoder();
4825
+ function yc(e) {
4748
4826
  if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
4749
- if (Array.isArray(e)) return `[${e.map(mc).join(",")}]`;
4827
+ if (Array.isArray(e)) return `[${e.map(yc).join(",")}]`;
4750
4828
  let t = e;
4751
- return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${mc(t[e])}`).join(",")}}`;
4829
+ return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${yc(t[e])}`).join(",")}}`;
4752
4830
  }
4753
- function hc(e) {
4754
- return pc.encode(mc(e));
4831
+ function bc(e) {
4832
+ return vc.encode(yc(e));
4755
4833
  }
4756
- async function gc(e) {
4834
+ async function xc(e) {
4757
4835
  let t = new Uint8Array(e.byteLength);
4758
4836
  return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
4759
4837
  }
4760
- function _c(e) {
4838
+ function Sc(e) {
4761
4839
  return Object.keys(e).toSorted().map((t) => [t, e[t]]);
4762
4840
  }
4763
- function vc(e) {
4841
+ function Cc(e) {
4764
4842
  return "handle" in e ? {
4765
4843
  ...e.description == null ? {} : { description: e.description },
4766
4844
  handle: e.handle,
@@ -4773,9 +4851,9 @@ function vc(e) {
4773
4851
  };
4774
4852
  }
4775
4853
  function $(e) {
4776
- return e.map(vc);
4854
+ return e.map(Cc);
4777
4855
  }
4778
- function yc(e) {
4856
+ function wc(e) {
4779
4857
  switch (e.kind) {
4780
4858
  case "sources": return {
4781
4859
  kind: e.kind,
@@ -4787,10 +4865,10 @@ function yc(e) {
4787
4865
  };
4788
4866
  }
4789
4867
  }
4790
- function bc(e) {
4791
- return Object.fromEntries(_c(e).map(([e, t]) => [e, yc(t)]));
4868
+ function Tc(e) {
4869
+ return Object.fromEntries(Sc(e).map(([e, t]) => [e, wc(t)]));
4792
4870
  }
4793
- function xc(e) {
4871
+ function Ec(e) {
4794
4872
  return e.map((e) => ({
4795
4873
  ...e.description == null ? {} : { description: e.description },
4796
4874
  handle: e.handle,
@@ -4799,13 +4877,14 @@ function xc(e) {
4799
4877
  sources: e.sources.map((e) => ({ ...e }))
4800
4878
  }));
4801
4879
  }
4802
- function Sc(e) {
4803
- if (!("inputs" in e)) return kc(e);
4880
+ function Dc(e) {
4881
+ if (!("inputs" in e)) return Pc(e);
4804
4882
  let t = {
4805
4883
  ...e.description == null ? {} : { description: e.description },
4806
4884
  ...e.icon == null ? {} : { icon: e.icon },
4807
- inputs: bc(e.inputs),
4885
+ inputs: Tc(e.inputs),
4808
4886
  ...e.name == null ? {} : { name: e.name },
4887
+ ...e.maxExecutions == null ? {} : { maxExecutions: e.maxExecutions },
4809
4888
  ...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
4810
4889
  };
4811
4890
  switch (e.kind) {
@@ -4823,7 +4902,7 @@ function Sc(e) {
4823
4902
  ...e.defaultOutput == null ? {} : { defaultOutput: e.defaultOutput },
4824
4903
  input: {
4825
4904
  handle: e.input.handle,
4826
- ...vc(e.input)
4905
+ ...Cc(e.input)
4827
4906
  },
4828
4907
  kind: e.kind
4829
4908
  };
@@ -4838,7 +4917,7 @@ function Sc(e) {
4838
4917
  taskId: e.taskId
4839
4918
  }) : Object.assign({}, t, {
4840
4919
  kind: e.kind,
4841
- task: Tc(e.task)
4920
+ task: Ac(e.task)
4842
4921
  });
4843
4922
  return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
4844
4923
  }
@@ -4852,23 +4931,23 @@ function Sc(e) {
4852
4931
  actions: e.actions,
4853
4932
  input: {
4854
4933
  handle: e.input.handle,
4855
- ...vc(e.input)
4934
+ ...Cc(e.input)
4856
4935
  },
4857
4936
  kind: e.kind,
4858
4937
  prompt: e.prompt
4859
4938
  };
4860
4939
  }
4861
4940
  }
4862
- function Cc(e) {
4941
+ function Oc(e) {
4863
4942
  return {
4864
4943
  edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
4865
- let n = mc(e), r = mc(t);
4944
+ let n = yc(e), r = yc(t);
4866
4945
  return n < r ? -1 : +(n > r);
4867
4946
  }),
4868
- nodes: Object.fromEntries(_c(e.nodes).map(([e, t]) => [e, Sc(t)]))
4947
+ nodes: Object.fromEntries(Sc(e.nodes).map(([e, t]) => [e, Dc(t)]))
4869
4948
  };
4870
4949
  }
4871
- function wc(e) {
4950
+ function kc(e) {
4872
4951
  return {
4873
4952
  executor: e.executor,
4874
4953
  inputs: $(e.inputs),
@@ -4876,7 +4955,7 @@ function wc(e) {
4876
4955
  outputs: $(e.outputs)
4877
4956
  };
4878
4957
  }
4879
- function Tc(e) {
4958
+ function Ac(e) {
4880
4959
  return {
4881
4960
  ...e.capabilities == null ? {} : { capabilities: e.capabilities },
4882
4961
  inputs: $(e.inputs),
@@ -4885,7 +4964,7 @@ function Tc(e) {
4885
4964
  outputs: $(e.outputs)
4886
4965
  };
4887
4966
  }
4888
- function Ec(e) {
4967
+ function jc(e) {
4889
4968
  return {
4890
4969
  configSchema: e.configSchema,
4891
4970
  definitionVersion: e.definitionVersion,
@@ -4902,12 +4981,12 @@ function Ec(e) {
4902
4981
  } } : {},
4903
4982
  key: e.key,
4904
4983
  name: e.name,
4905
- payloadSchema: e.payloadSchema,
4984
+ outputs: $(e.outputs),
4906
4985
  provider: e.provider,
4907
4986
  type: e.type
4908
4987
  };
4909
4988
  }
4910
- function Dc(e) {
4989
+ function Mc(e) {
4911
4990
  return {
4912
4991
  ...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
4913
4992
  ...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
@@ -4917,7 +4996,7 @@ function Dc(e) {
4917
4996
  ...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
4918
4997
  };
4919
4998
  }
4920
- function Oc(e) {
4999
+ function Nc(e) {
4921
5000
  switch (e.type) {
4922
5001
  case "cron": return {
4923
5002
  expression: e.expression,
@@ -4931,7 +5010,7 @@ function Oc(e) {
4931
5010
  };
4932
5011
  }
4933
5012
  }
4934
- function kc(e) {
5013
+ function Pc(e) {
4935
5014
  let t = (t) => ({
4936
5015
  ...e.description == null ? {} : { description: e.description },
4937
5016
  ...e.icon == null ? {} : { icon: e.icon },
@@ -4942,145 +5021,165 @@ function kc(e) {
4942
5021
  case "manual": return t(e.kind);
4943
5022
  case "webhook": return {
4944
5023
  ...t(e.kind),
4945
- inputsDef: e.inputsDef.map((e) => ({
5024
+ bodyFields: e.bodyFields.map((e) => ({
4946
5025
  handle: e.handle,
4947
- ...vc(e)
5026
+ ...Cc(e)
4948
5027
  })),
4949
- ...e.options == null ? {} : { options: Dc(e.options) }
5028
+ ...e.options == null ? {} : { options: Mc(e.options) }
4950
5029
  };
4951
5030
  case "cron": return {
4952
5031
  ...t(e.kind),
4953
- cronTimes: e.cronTimes.map(Oc)
5032
+ cronTimes: e.cronTimes.map(Nc)
4954
5033
  };
4955
5034
  case "poll": return {
4956
5035
  ...t(e.kind),
4957
5036
  bindingId: e.bindingId,
4958
5037
  config: e.config,
4959
- definition: Ec(e.definition),
4960
- pollTimes: e.pollTimes.map(Oc)
5038
+ definition: jc(e.definition),
5039
+ pollTimes: e.pollTimes.map(Nc)
4961
5040
  };
4962
5041
  case "integration": return {
4963
5042
  ...t(e.kind),
4964
5043
  bindingId: e.bindingId,
4965
5044
  config: e.config,
4966
- definition: Ec(e.definition)
5045
+ definition: jc(e.definition)
4967
5046
  };
4968
5047
  }
4969
5048
  }
4970
- function Ac(e) {
5049
+ function Fc(e) {
4971
5050
  let { name: t, description: n, icon: r, ...i } = e;
4972
- return mc(i);
5051
+ return yc(i);
4973
5052
  }
4974
- function jc(e) {
5053
+ function Ic(e) {
4975
5054
  return {
4976
- bindings: Object.fromEntries(_c(e.bindings)),
4977
- graph: Cc(e.graph),
4978
- subflows: Object.fromEntries(_c(e.subflows).map(([e, t]) => [e, {
4979
- graph: Cc(t.graph),
5055
+ bindings: Object.fromEntries(Sc(e.bindings)),
5056
+ graph: Oc(e.graph),
5057
+ subflows: Object.fromEntries(Sc(e.subflows).map(([e, t]) => [e, {
5058
+ graph: Oc(t.graph),
4980
5059
  inputs: $(t.inputs),
4981
5060
  name: t.name,
4982
- outputs: xc(t.outputs)
5061
+ outputs: Ec(t.outputs)
4983
5062
  }])),
4984
- tasks: Object.fromEntries(_c(e.tasks).map(([e, t]) => [e, wc(t)]))
5063
+ tasks: Object.fromEntries(Sc(e.tasks).map(([e, t]) => [e, kc(t)]))
4985
5064
  };
4986
5065
  }
4987
- function Mc(e) {
5066
+ function Lc(e) {
4988
5067
  return {
4989
5068
  imports: e.imports.toSorted(),
4990
5069
  name: e.name,
4991
5070
  source: e.source
4992
5071
  };
4993
5072
  }
4994
- function Nc(e) {
5073
+ function Rc(e) {
4995
5074
  return {
4996
- document: jc(e.document),
5075
+ document: Ic(e.document),
4997
5076
  kind: "open-flow-flow-revision",
4998
5077
  modelVersion: e.modelVersion,
4999
- modules: Object.fromEntries(_c(e.modules).map(([e, t]) => [e, Mc(t)])),
5078
+ modules: Object.fromEntries(Sc(e.modules).map(([e, t]) => [e, Lc(t)])),
5000
5079
  version: 1
5001
5080
  };
5002
5081
  }
5003
- function Pc(e) {
5004
- return hc(Nc(e));
5082
+ function zc(e) {
5083
+ return bc(Rc(e));
5005
5084
  }
5006
- function Fc(e) {
5007
- return lc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
5008
- }
5009
- var Ic = G(L(), V()), Lc = U({
5010
- jsonSchema: V(),
5011
- nullable: B(),
5012
- value: V().optional(),
5013
- description: L().optional()
5014
- }).strict(), Rc = G(L(), Lc), zc = W([U({
5015
- kind: q("value"),
5016
- value: V()
5017
- }).strict(), U({
5018
- kind: q("sources"),
5019
- sources: H(U({
5020
- kind: q("node"),
5021
- nodeId: L(),
5022
- output: L()
5085
+ function Bc(e) {
5086
+ return mc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
5087
+ }
5088
+ function Vc(e) {
5089
+ return JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e));
5090
+ }
5091
+ function Hc(e) {
5092
+ let t;
5093
+ try {
5094
+ t = Vc(e), mc(t);
5095
+ return;
5096
+ } catch {}
5097
+ try {
5098
+ dc(t);
5099
+ } catch {
5100
+ return;
5101
+ }
5102
+ let n = t;
5103
+ return typeof n.modelVersion == "number" && n.modelVersion < 2 ? "upgrade" : "repair";
5104
+ }
5105
+ function Uc(e) {
5106
+ return dc(Vc(e));
5107
+ }
5108
+ var Wc = W(I(), B()), Gc = H({
5109
+ jsonSchema: B(),
5110
+ nullable: z(),
5111
+ value: B().optional(),
5112
+ description: I().optional()
5113
+ }).strict(), Kc = W(I(), Gc), qc = U([H({
5114
+ kind: K("value"),
5115
+ value: B()
5116
+ }).strict(), H({
5117
+ kind: K("sources"),
5118
+ sources: V(H({
5119
+ kind: K("node"),
5120
+ nodeId: I(),
5121
+ output: I()
5023
5122
  }).strict())
5024
- }).strict()]), Bc = {
5025
- name: L().optional(),
5026
- description: L().optional(),
5027
- icon: L().optional()
5028
- }, Vc = W([
5029
- U({
5030
- ...Bc,
5031
- kind: q("cron"),
5032
- cronTimes: H(V())
5123
+ }).strict()]), Jc = {
5124
+ name: I().optional(),
5125
+ description: I().optional(),
5126
+ icon: I().optional()
5127
+ }, Yc = U([
5128
+ H({
5129
+ ...Jc,
5130
+ kind: K("cron"),
5131
+ cronTimes: V(B())
5033
5132
  }).strict(),
5034
- U({
5035
- ...Bc,
5036
- kind: q("manual")
5133
+ H({
5134
+ ...Jc,
5135
+ kind: K("manual")
5037
5136
  }).strict(),
5038
- U({
5039
- ...Bc,
5040
- kind: q("task"),
5041
- concurrency: q(1).optional(),
5042
- inputs: G(L(), zc),
5043
- task: U({
5044
- name: L(),
5045
- moduleId: L(),
5046
- inputs: Rc,
5047
- outputs: G(L(), Lc.omit({ value: !0 }))
5137
+ H({
5138
+ ...Jc,
5139
+ kind: K("task"),
5140
+ concurrency: K(1).optional(),
5141
+ inputs: W(I(), qc),
5142
+ task: H({
5143
+ name: I(),
5144
+ moduleId: I(),
5145
+ inputs: Kc,
5146
+ outputs: W(I(), Gc.omit({ value: !0 }))
5048
5147
  }).strict()
5049
5148
  }).strict()
5050
- ]), Hc = U({
5051
- name: L(),
5052
- graph: U({ nodes: G(L(), Vc) }).strict()
5053
- }).strict(), Uc = U({
5054
- kind: q("open-flow-project-revision"),
5055
- version: q(1),
5056
- modelVersion: q(1),
5057
- modules: G(L(), U({
5058
- name: L(),
5059
- source: L(),
5060
- imports: H(L())
5149
+ ]), Xc = H({
5150
+ name: I(),
5151
+ graph: H({ nodes: W(I(), Yc) }).strict()
5152
+ }).strict(), Zc = H({
5153
+ kind: K("open-flow-project-revision"),
5154
+ version: K(1),
5155
+ modelVersion: U([K(1), K(2)]),
5156
+ modules: W(I(), H({
5157
+ name: I(),
5158
+ source: I(),
5159
+ imports: V(I())
5061
5160
  }).strict()),
5062
- document: U({
5063
- bindings: Ic,
5064
- flows: Ic,
5065
- subflows: Ic,
5066
- tasks: Ic
5161
+ document: H({
5162
+ bindings: Wc,
5163
+ flows: Wc,
5164
+ subflows: Wc,
5165
+ tasks: Wc
5067
5166
  }).strict()
5068
5167
  }).strict();
5069
- function Wc(e) {
5168
+ function Qc(e) {
5070
5169
  return Object.entries(e).map(([e, t]) => Object.assign({ handle: e }, t));
5071
5170
  }
5072
- function Gc(e) {
5073
- return Object.keys(Uc.parse(e).document.flows).toSorted();
5171
+ function $c(e) {
5172
+ return Object.keys(Zc.parse(e).document.flows).toSorted();
5074
5173
  }
5075
- function Kc(e, t) {
5076
- let n = Uc.parse(e);
5174
+ function el(e, t) {
5175
+ let n = Zc.parse(e);
5077
5176
  if ([
5078
5177
  n.document.bindings,
5079
5178
  n.document.subflows,
5080
5179
  n.document.tasks
5081
5180
  ].some((e) => Object.keys(e).length != 0)) throw Error("Project bindings, managed tasks and subflows require an explicit semantic conversion.");
5082
- let r = Hc.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
5083
- let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = fc(n, a);
5181
+ let r = Xc.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
5182
+ let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = _c(n, a);
5084
5183
  if (a.add(r), r != n && i.push(`Renamed node ${e} to ${r}.`), t.kind != "task") return [e, {
5085
5184
  ...t,
5086
5185
  name: r
@@ -5091,12 +5190,12 @@ function Kc(e, t) {
5091
5190
  name: r,
5092
5191
  task: {
5093
5192
  ...t.task,
5094
- inputs: Wc(t.task.inputs),
5095
- outputs: Wc(t.task.outputs)
5193
+ inputs: Qc(t.task.inputs),
5194
+ outputs: Qc(t.task.outputs)
5096
5195
  }
5097
5196
  }];
5098
- })), s = cc({
5099
- modelVersion: 1,
5197
+ })), s = pc({
5198
+ modelVersion: 2,
5100
5199
  modules: n.modules,
5101
5200
  document: {
5102
5201
  bindings: {},
@@ -5130,7 +5229,7 @@ function Kc(e, t) {
5130
5229
  let f = { ...s.document.graph.nodes };
5131
5230
  return d != null && (f[d] = {
5132
5231
  kind: "manual",
5133
- name: fc("Start", a)
5232
+ name: _c("Start", a)
5134
5233
  }), {
5135
5234
  name: r.name,
5136
5235
  adjustments: i,
@@ -5147,4 +5246,4 @@ function Kc(e, t) {
5147
5246
  };
5148
5247
  }
5149
5248
  //#endregion
5150
- export { jc as canonicalDocument, Cc as canonicalGraph, hc as canonicalJsonBytes, Mc as canonicalModule, xc as canonicalOutputs, $ as canonicalPorts, wc as canonicalTask, Kc as convertProjectFlow, sc as decodeFlowDocument, Fc as decodeRevision, cc as decodeRevisionContent, gc as digestBytes, Pc as encodeRevision, Gc as legacyProjectFlowIds, Os as maxJsonDepth, Ac as triggerRuntimeJson };
5249
+ export { Ic as canonicalDocument, Oc as canonicalGraph, bc as canonicalJsonBytes, Lc as canonicalModule, Ec as canonicalOutputs, $ as canonicalPorts, kc as canonicalTask, el as convertProjectFlow, fc as decodeFlowDocument, Bc as decodeRevision, pc as decodeRevisionContent, xc as digestBytes, zc as encodeRevision, $c as legacyProjectFlowIds, ks as maxJsonDepth, Uc as repairRevision, Hc as revisionRepairKind, Fc as triggerRuntimeJson };