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

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 (33) hide show
  1. package/dist/browser/{createResourceDialog-C2ZLGPla.js → createResourceDialog-C_8I3Fua.js} +1 -1
  2. package/dist/browser/dist-CoszrK7m.js +4 -0
  3. package/dist/browser/{switch-DuB8aovT.js → editorComponent-Dq4IKp5R.js} +1222 -608
  4. package/dist/browser/flow-authoring-node.d.ts +3 -0
  5. package/dist/browser/flow-authoring.js +1388 -1555
  6. package/dist/browser/flow-change.d.ts +12 -7
  7. package/dist/browser/flow-change.js +966 -1105
  8. package/dist/browser/{flowChanges-Z49mslMz.js → flowChanges-BBtkyUGd.js} +1974 -1839
  9. package/dist/browser/{flowRunInputEditorStore-BBqQIOCR.js → flowRunInputEditorStore-CTORQcA2.js} +378 -429
  10. package/dist/browser/{flowWorkspace-DCaVDqtY.js → flowWorkspace-DNmBb3ZW.js} +52795 -52886
  11. package/dist/browser/{inputValues-CLnpqFAf.js → inputValues-BbSVOWQP.js} +2 -2
  12. package/dist/browser/{markdownContent-Bon8uhjM.js → markdownContent-D2oHGWc6.js} +1 -1
  13. package/dist/browser/ui.css +1 -1
  14. package/dist/browser/value-DPg_9yXB.js +93 -0
  15. package/dist/browser/workbench.css +1 -1
  16. package/dist/browser/workbench.js +508 -507
  17. package/dist/browser/{workbenchSelect-DX9IFmX-.js → workbenchSelect-CQOvpteT.js} +1057 -1223
  18. package/dist/common/authoringExamples.d.ts +3 -2
  19. package/dist/common/control-api-conformance.js +1359 -1484
  20. package/dist/common/control-api.d.ts +5 -1
  21. package/dist/common/control-api.js +942 -1077
  22. package/dist/common/control-requests.js +751 -834
  23. package/dist/common/flow-encoding.js +1502 -1637
  24. package/dist/common/flow-graph.d.ts +18 -2
  25. package/dist/common/flow-semantics.js +1982 -2116
  26. package/dist/common/mcp.js +908 -1016
  27. package/dist/common/provider-triggers.js +2048 -2183
  28. package/dist/common/run-events.js +1 -0
  29. package/dist/common/scheduler.d.ts +2 -2
  30. package/dist/common/scheduler.js +1282 -1477
  31. package/package.json +1 -1
  32. package/dist/browser/dist-B_T-OpQp.js +0 -4
  33. package/dist/browser/languages-C0zQ4GSo.js +0 -42
@@ -1716,88 +1716,7 @@ function mr(e, t, n) {
1716
1716
  }
1717
1717
  return e.value = c.data, e;
1718
1718
  }
1719
- var hr = /*@__PURE__*/ w("$ZodTuple", (e, t) => {
1720
- O.init(e, t);
1721
- let n = t.items, r = T.memoizer;
1722
- r?.attach(e), e._zod.parse = (i, a) => {
1723
- let o = i.value;
1724
- if (!Array.isArray(o)) return i.issues.push({
1725
- input: o,
1726
- inst: e,
1727
- expected: "tuple",
1728
- code: "invalid_type"
1729
- }), i;
1730
- i.value = r ? r.alloc(e, i, [], a) : [];
1731
- let s = [], c = gr(n, "optin"), l = gr(n, "optout");
1732
- if (!t.rest) {
1733
- if (o.length < c) return i.issues.push({
1734
- code: "too_small",
1735
- minimum: c,
1736
- inclusive: !0,
1737
- input: o,
1738
- inst: e,
1739
- origin: "array"
1740
- }), i;
1741
- o.length > n.length && i.issues.push({
1742
- code: "too_big",
1743
- maximum: n.length,
1744
- inclusive: !0,
1745
- input: o,
1746
- inst: e,
1747
- origin: "array"
1748
- });
1749
- }
1750
- let u = Array(n.length);
1751
- for (let e = 0; e < n.length; e++) {
1752
- let t = n[e]._zod.run({
1753
- value: o[e],
1754
- issues: []
1755
- }, a);
1756
- t instanceof Promise ? s.push(t.then((t) => {
1757
- u[e] = t;
1758
- })) : u[e] = t;
1759
- }
1760
- if (t.rest) {
1761
- let e = n.length - 1, r = o.slice(n.length);
1762
- for (let n of r) {
1763
- e++;
1764
- let r = t.rest._zod.run({
1765
- value: n,
1766
- issues: []
1767
- }, a);
1768
- r instanceof Promise ? s.push(r.then((t) => _r(t, i, e))) : _r(r, i, e);
1769
- }
1770
- }
1771
- return s.length ? Promise.all(s).then(() => vr(u, i, n, o, l)) : vr(u, i, n, o, l);
1772
- };
1773
- });
1774
- function gr(e, t) {
1775
- for (let n = e.length - 1; n >= 0; n--) if (!(t === "optin" ? e[n]._zod.optin !== void 0 : e[n]._zod.optout === "optional")) return n + 1;
1776
- return 0;
1777
- }
1778
- function _r(e, t, n) {
1779
- e.issues.length && t.issues.push(...y(n, e.issues)), t.value[n] = e.value;
1780
- }
1781
- function vr(e, t, n, r, i) {
1782
- for (let a = 0; a < n.length; a++) {
1783
- let o = e[a], s = a < r.length;
1784
- if (!s && a >= i && n[a]._zod.optin === "optional") {
1785
- t.value.length = a;
1786
- break;
1787
- }
1788
- if (o.issues.length) {
1789
- if (!s && a >= i) {
1790
- t.value.length = a;
1791
- break;
1792
- }
1793
- t.issues.push(...y(a, o.issues));
1794
- }
1795
- t.value[a] = o.value;
1796
- }
1797
- for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
1798
- return t;
1799
- }
1800
- var yr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1719
+ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1801
1720
  O.init(e, t);
1802
1721
  let n = T.memoizer;
1803
1722
  n?.attach(e), e._zod.parse = (r, i) => {
@@ -1903,7 +1822,7 @@ var yr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1903
1822
  }
1904
1823
  return o.length ? Promise.all(o).then(() => r) : r;
1905
1824
  };
1906
- }), br = /*@__PURE__*/ w("$ZodEnum", (e, t) => {
1825
+ }), gr = /*@__PURE__*/ w("$ZodEnum", (e, t) => {
1907
1826
  O.init(e, t);
1908
1827
  let r = n(t.entries), i = new Set(r);
1909
1828
  e._zod.values = i;
@@ -1917,7 +1836,7 @@ var yr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1917
1836
  inst: e
1918
1837
  }), t;
1919
1838
  };
1920
- }), xr = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
1839
+ }), _r = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
1921
1840
  O.init(e, t);
1922
1841
  let n = new Set(t.values);
1923
1842
  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) => {
@@ -1929,7 +1848,7 @@ var yr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1929
1848
  inst: e
1930
1849
  }), r;
1931
1850
  };
1932
- }), Sr = /*@__PURE__*/ w("$ZodTransform", (e, t) => {
1851
+ }), vr = /*@__PURE__*/ w("$ZodTransform", (e, t) => {
1933
1852
  O.init(e, t), e._zod.optin = "optional", T.memoizer?.guard(e), e._zod.parse = (n, r) => {
1934
1853
  if (r.direction === "backward") throw new Re(e.constructor.name);
1935
1854
  let i = t.transform(n.value, n);
@@ -1938,10 +1857,10 @@ var yr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1938
1857
  return n.value = i, n;
1939
1858
  };
1940
1859
  });
1941
- function Cr(e, t) {
1860
+ function yr(e, t) {
1942
1861
  return e.value = t.issues.length ? void 0 : t.value, e;
1943
1862
  }
1944
- var wr = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
1863
+ var br = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
1945
1864
  O.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", C(e, "values", (e) => {
1946
1865
  let t = e.def.innerType._zod.values;
1947
1866
  return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
@@ -1955,40 +1874,40 @@ var wr = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
1955
1874
  value: e.value,
1956
1875
  issues: []
1957
1876
  }, n);
1958
- return r instanceof Promise ? r.then((t) => Cr(e, t)) : Cr(e, r);
1877
+ return r instanceof Promise ? r.then((t) => yr(e, t)) : yr(e, r);
1959
1878
  }
1960
1879
  return t.innerType._zod.run(e, n);
1961
1880
  };
1962
- }), Tr = /*@__PURE__*/ w("$ZodExactOptional", (e, t) => {
1963
- wr.init(e, t), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1964
- }), Er = /*@__PURE__*/ w("$ZodNullable", (e, t) => {
1881
+ }), xr = /*@__PURE__*/ w("$ZodExactOptional", (e, t) => {
1882
+ br.init(e, t), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1883
+ }), Sr = /*@__PURE__*/ w("$ZodNullable", (e, t) => {
1965
1884
  O.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "pattern", (e) => {
1966
1885
  let t = e.def.innerType._zod.pattern;
1967
1886
  return t ? RegExp(`^(${s(t.source)}|null)$`) : void 0;
1968
1887
  }), C(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1969
- }), Dr = /*@__PURE__*/ w("$ZodDefault", (e, t) => {
1888
+ }), Cr = /*@__PURE__*/ w("$ZodDefault", (e, t) => {
1970
1889
  O.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
1971
1890
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
1972
1891
  if (e.value === void 0) return e.value = t.defaultValue, e;
1973
1892
  let r = t.innerType._zod.run(e, n);
1974
- return r instanceof Promise ? r.then((e) => Or(e, t)) : Or(r, t);
1893
+ return r instanceof Promise ? r.then((e) => wr(e, t)) : wr(r, t);
1975
1894
  };
1976
1895
  });
1977
- function Or(e, t) {
1896
+ function wr(e, t) {
1978
1897
  return e.value === void 0 && (e.value = t.defaultValue), e;
1979
1898
  }
1980
- var kr = /*@__PURE__*/ w("$ZodPrefault", (e, t) => {
1899
+ var Tr = /*@__PURE__*/ w("$ZodPrefault", (e, t) => {
1981
1900
  O.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1982
- }), Ar = /*@__PURE__*/ w("$ZodNonOptional", (e, t) => {
1901
+ }), Er = /*@__PURE__*/ w("$ZodNonOptional", (e, t) => {
1983
1902
  O.init(e, t), C(e, "values", (e) => {
1984
1903
  let t = e.def.innerType._zod.values;
1985
1904
  return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
1986
1905
  }), e._zod.parse = (n, r) => {
1987
1906
  let i = t.innerType._zod.run(n, r);
1988
- return i instanceof Promise ? i.then((t) => jr(t, e)) : jr(i, e);
1907
+ return i instanceof Promise ? i.then((t) => Dr(t, e)) : Dr(i, e);
1989
1908
  };
1990
1909
  });
1991
- function jr(e, t) {
1910
+ function Dr(e, t) {
1992
1911
  return !e.issues.length && e.value === void 0 && e.issues.push({
1993
1912
  code: "invalid_type",
1994
1913
  expected: "nonoptional",
@@ -1996,7 +1915,7 @@ function jr(e, t) {
1996
1915
  inst: t
1997
1916
  }), e;
1998
1917
  }
1999
- function Mr(e, t, n, r) {
1918
+ function Or(e, t, n, r) {
2000
1919
  return t.issues.length ? (e.value = n.catchValue({
2001
1920
  ...t,
2002
1921
  value: e.value,
@@ -2004,54 +1923,54 @@ function Mr(e, t, n, r) {
2004
1923
  input: e.value
2005
1924
  }), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
2006
1925
  }
2007
- var Nr = /*@__PURE__*/ w("$ZodCatch", (e, t) => {
1926
+ var kr = /*@__PURE__*/ w("$ZodCatch", (e, t) => {
2008
1927
  O.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2009
1928
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2010
1929
  let r = t.innerType._zod.run({
2011
1930
  value: e.value,
2012
1931
  issues: []
2013
1932
  }, n);
2014
- return r instanceof Promise ? r.then((r) => Mr(e, r, t, n)) : Mr(e, r, t, n);
1933
+ return r instanceof Promise ? r.then((r) => Or(e, r, t, n)) : Or(e, r, t, n);
2015
1934
  };
2016
- }), Pr = /*@__PURE__*/ w("$ZodPipe", (e, t) => {
1935
+ }), Ar = /*@__PURE__*/ w("$ZodPipe", (e, t) => {
2017
1936
  O.init(e, t), C(e, "values", (e) => e.def.in._zod.values), C(e, "optin", (e) => e.def.in._zod.optin), C(e, "optout", (e) => e.def.out._zod.optout), C(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
2018
1937
  if (n.direction === "backward") {
2019
1938
  let r = t.out._zod.run(e, n);
2020
- return r instanceof Promise ? r.then((e) => Fr(e, t.in, n)) : Fr(r, t.in, n);
1939
+ return r instanceof Promise ? r.then((e) => jr(e, t.in, n)) : jr(r, t.in, n);
2021
1940
  }
2022
1941
  let r = t.in._zod.run(e, n);
2023
- return r instanceof Promise ? r.then((e) => Fr(e, t.out, n)) : Fr(r, t.out, n);
1942
+ return r instanceof Promise ? r.then((e) => jr(e, t.out, n)) : jr(r, t.out, n);
2024
1943
  };
2025
1944
  });
2026
- function Fr(e, t, n) {
1945
+ function jr(e, t, n) {
2027
1946
  return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
2028
1947
  value: e.value,
2029
1948
  issues: e.issues
2030
1949
  }, n);
2031
1950
  }
2032
- var Ir = /*@__PURE__*/ w("$ZodReadonly", (e, t) => {
1951
+ var Mr = /*@__PURE__*/ w("$ZodReadonly", (e, t) => {
2033
1952
  O.init(e, t), C(e, "propValues", (e) => e.def.innerType._zod.propValues), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "optin", (e) => e.def.innerType?._zod?.optin), C(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
2034
1953
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2035
1954
  let r = t.innerType._zod.run(e, n);
2036
- return r instanceof Promise ? r.then(Lr) : Lr(r);
1955
+ return r instanceof Promise ? r.then(Nr) : Nr(r);
2037
1956
  };
2038
1957
  });
2039
- function Lr(e) {
1958
+ function Nr(e) {
2040
1959
  return e.memo || (e.value = Object.freeze(e.value)), e;
2041
1960
  }
2042
- var Rr = /*@__PURE__*/ w("$ZodLazy", (e, t) => {
1961
+ var Pr = /*@__PURE__*/ w("$ZodLazy", (e, t) => {
2043
1962
  O.init(e, t), u(e._zod, "innerType", () => {
2044
1963
  let e = t;
2045
1964
  return e._cachedInner ||= t.getter(), e._cachedInner;
2046
1965
  }), C(e, "pattern", (e) => e.innerType?._zod?.pattern), C(e, "propValues", (e) => e.innerType?._zod?.propValues), C(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), C(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
2047
- }), zr = /*@__PURE__*/ w("$ZodCustom", (e, t) => {
1966
+ }), Fr = /*@__PURE__*/ w("$ZodCustom", (e, t) => {
2048
1967
  D.init(e, t), O.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
2049
1968
  let r = n.value, i = t.fn(r);
2050
- if (i instanceof Promise) return i.then((t) => Br(t, n, r, e));
2051
- Br(i, n, r, e);
1969
+ if (i instanceof Promise) return i.then((t) => Ir(t, n, r, e));
1970
+ Ir(i, n, r, e);
2052
1971
  };
2053
1972
  });
2054
- function Br(e, t, n, r) {
1973
+ function Ir(e, t, n, r) {
2055
1974
  if (!e) {
2056
1975
  let e = {
2057
1976
  code: "custom",
@@ -2065,25 +1984,25 @@ function Br(e, t, n, r) {
2065
1984
  }
2066
1985
  //#endregion
2067
1986
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
2068
- var Vr = class extends Error {
1987
+ var Lr = class extends Error {
2069
1988
  constructor() {
2070
1989
  super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
2071
1990
  }
2072
- }, Hr = "~memo", Ur = [];
2073
- function Wr(e) {
1991
+ }, Rr = "~memo", zr = [];
1992
+ function Br(e) {
2074
1993
  return e.map((e) => e.path ? {
2075
1994
  ...e,
2076
1995
  path: e.path.slice()
2077
1996
  } : { ...e });
2078
1997
  }
2079
- var Gr = /*@__PURE__*/ new WeakMap();
2080
- function Kr(e, t) {
2081
- let n = Gr.get(e);
1998
+ var Vr = /*@__PURE__*/ new WeakMap();
1999
+ function Hr(e, t) {
2000
+ let n = Vr.get(e);
2082
2001
  if (n !== void 0) return n;
2083
2002
  if (t.has(e)) return !0;
2084
2003
  t.add(e);
2085
2004
  let r = !1, i = (e) => {
2086
- !r && e?._zod && Kr(e, t) && (r = !0);
2005
+ !r && e?._zod && Hr(e, t) && (r = !0);
2087
2006
  }, a = e._zod.def;
2088
2007
  switch (a.type) {
2089
2008
  case "object":
@@ -2160,28 +2079,28 @@ function Kr(e, t) {
2160
2079
  }
2161
2080
  }
2162
2081
  }
2163
- return t.delete(e), Gr.set(e, r), r;
2082
+ return t.delete(e), Vr.set(e, r), r;
2164
2083
  }
2165
- function qr(e, t) {
2084
+ function Ur(e, t) {
2166
2085
  let n = e.buckets.get(t);
2167
2086
  return n || (n = /* @__PURE__ */ new Map(), e.buckets.set(t, n)), n;
2168
2087
  }
2169
- var Jr, Yr = [], Xr = {
2088
+ var Wr, Gr = [], Kr = {
2170
2089
  alloc(e, t, n) {
2171
- let r = Jr;
2090
+ let r = Wr;
2172
2091
  if (!r) return n;
2173
- Jr = void 0;
2092
+ Wr = void 0;
2174
2093
  let i = {
2175
2094
  value: n,
2176
2095
  issues: null
2177
2096
  };
2178
- return r.set(t.value, i), Yr.push(i), n;
2097
+ return r.set(t.value, i), Gr.push(i), n;
2179
2098
  },
2180
2099
  guard(e) {
2181
2100
  var t;
2182
2101
  (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
2183
2102
  let t = e._zod.parse, n = (e, n) => {
2184
- if (n.direction !== "backward" && Qr(n, e.value)) throw new Vr();
2103
+ if (n.direction !== "backward" && Jr(n, e.value)) throw new Lr();
2185
2104
  return t(e, n);
2186
2105
  };
2187
2106
  e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
@@ -2192,38 +2111,38 @@ var Jr, Yr = [], Xr = {
2192
2111
  let n, r, i;
2193
2112
  (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
2194
2113
  let t = e._zod.parse, a = (o, s) => {
2195
- if (n === void 0 && (n = Kr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
2114
+ if (n === void 0 && (n = Hr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
2196
2115
  let c = o.value;
2197
2116
  if (typeof c != "object" || !c) return t(o, s);
2198
- let l = s[Hr];
2117
+ let l = s[Rr];
2199
2118
  l || (l = {
2200
2119
  buckets: /* @__PURE__ */ new Map(),
2201
2120
  backEdges: void 0
2202
- }, s[Hr] = l);
2121
+ }, s[Rr] = l);
2203
2122
  let u;
2204
- r === s ? u = i : (u = qr(l, e), r = s, i = u);
2123
+ r === s ? u = i : (u = Ur(l, e), r = s, i = u);
2205
2124
  let d = u.get(c);
2206
- if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Wr(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
2207
- Jr = u;
2208
- let f = Yr.length, p = t(o, s);
2209
- Jr = void 0;
2210
- let m = Yr.length > f ? Yr.pop() : void 0;
2211
- return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Wr(e.issues) : Ur), e)) : (m && (m.issues = p.issues.length ? Wr(p.issues) : Ur), p);
2125
+ if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Br(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
2126
+ Wr = u;
2127
+ let f = Gr.length, p = t(o, s);
2128
+ Wr = void 0;
2129
+ let m = Gr.length > f ? Gr.pop() : void 0;
2130
+ return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Br(e.issues) : zr), e)) : (m && (m.issues = p.issues.length ? Br(p.issues) : zr), p);
2212
2131
  };
2213
2132
  e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
2214
2133
  });
2215
2134
  }
2216
2135
  };
2217
- function Zr() {
2218
- return Xr;
2136
+ function qr() {
2137
+ return Kr;
2219
2138
  }
2220
- function Qr(e, t) {
2221
- let n = e[Hr]?.backEdges;
2139
+ function Jr(e, t) {
2140
+ let n = e[Rr]?.backEdges;
2222
2141
  return n !== void 0 && typeof t == "object" && !!t && n.has(t);
2223
2142
  }
2224
2143
  //#endregion
2225
2144
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
2226
- var $r = () => {
2145
+ var Yr = () => {
2227
2146
  let e = {
2228
2147
  string: {
2229
2148
  unit: "characters",
@@ -2309,12 +2228,12 @@ var $r = () => {
2309
2228
  }
2310
2229
  };
2311
2230
  };
2312
- function ei() {
2313
- return { localeError: $r() };
2231
+ function Xr() {
2232
+ return { localeError: Yr() };
2314
2233
  }
2315
2234
  //#endregion
2316
2235
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
2317
- var ti, ni = class {
2236
+ var Zr, Qr = class {
2318
2237
  constructor() {
2319
2238
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2320
2239
  }
@@ -2346,22 +2265,22 @@ var ti, ni = class {
2346
2265
  return this._map.has(e);
2347
2266
  }
2348
2267
  };
2349
- function ri() {
2350
- return new ni();
2268
+ function $r() {
2269
+ return new Qr();
2351
2270
  }
2352
- (ti = globalThis).__zod_globalRegistry ?? (ti.__zod_globalRegistry = ri());
2353
- var ii = globalThis.__zod_globalRegistry;
2271
+ (Zr = globalThis).__zod_globalRegistry ?? (Zr.__zod_globalRegistry = $r());
2272
+ var ei = globalThis.__zod_globalRegistry;
2354
2273
  //#endregion
2355
2274
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
2356
2275
  // @__NO_SIDE_EFFECTS__
2357
- function ai(e, t) {
2276
+ function ti(e, t) {
2358
2277
  return new e({
2359
2278
  type: "string",
2360
2279
  ...v(t)
2361
2280
  });
2362
2281
  }
2363
2282
  // @__NO_SIDE_EFFECTS__
2364
- function oi(e, t) {
2283
+ function ni(e, t) {
2365
2284
  return new e({
2366
2285
  type: "string",
2367
2286
  format: "email",
@@ -2371,7 +2290,7 @@ function oi(e, t) {
2371
2290
  });
2372
2291
  }
2373
2292
  // @__NO_SIDE_EFFECTS__
2374
- function si(e, t) {
2293
+ function ri(e, t) {
2375
2294
  return new e({
2376
2295
  type: "string",
2377
2296
  format: "guid",
@@ -2381,7 +2300,7 @@ function si(e, t) {
2381
2300
  });
2382
2301
  }
2383
2302
  // @__NO_SIDE_EFFECTS__
2384
- function ci(e, t) {
2303
+ function ii(e, t) {
2385
2304
  return new e({
2386
2305
  type: "string",
2387
2306
  format: "uuid",
@@ -2391,7 +2310,7 @@ function ci(e, t) {
2391
2310
  });
2392
2311
  }
2393
2312
  // @__NO_SIDE_EFFECTS__
2394
- function li(e, t) {
2313
+ function ai(e, t) {
2395
2314
  return new e({
2396
2315
  type: "string",
2397
2316
  format: "uuid",
@@ -2402,7 +2321,7 @@ function li(e, t) {
2402
2321
  });
2403
2322
  }
2404
2323
  // @__NO_SIDE_EFFECTS__
2405
- function ui(e, t) {
2324
+ function oi(e, t) {
2406
2325
  return new e({
2407
2326
  type: "string",
2408
2327
  format: "uuid",
@@ -2413,7 +2332,7 @@ function ui(e, t) {
2413
2332
  });
2414
2333
  }
2415
2334
  // @__NO_SIDE_EFFECTS__
2416
- function di(e, t) {
2335
+ function si(e, t) {
2417
2336
  return new e({
2418
2337
  type: "string",
2419
2338
  format: "uuid",
@@ -2424,7 +2343,7 @@ function di(e, t) {
2424
2343
  });
2425
2344
  }
2426
2345
  // @__NO_SIDE_EFFECTS__
2427
- function fi(e, t) {
2346
+ function ci(e, t) {
2428
2347
  return new e({
2429
2348
  type: "string",
2430
2349
  format: "url",
@@ -2434,7 +2353,7 @@ function fi(e, t) {
2434
2353
  });
2435
2354
  }
2436
2355
  // @__NO_SIDE_EFFECTS__
2437
- function pi(e, t) {
2356
+ function li(e, t) {
2438
2357
  return new e({
2439
2358
  type: "string",
2440
2359
  format: "emoji",
@@ -2444,7 +2363,7 @@ function pi(e, t) {
2444
2363
  });
2445
2364
  }
2446
2365
  // @__NO_SIDE_EFFECTS__
2447
- function mi(e, t) {
2366
+ function ui(e, t) {
2448
2367
  return new e({
2449
2368
  type: "string",
2450
2369
  format: "nanoid",
@@ -2454,7 +2373,7 @@ function mi(e, t) {
2454
2373
  });
2455
2374
  }
2456
2375
  // @__NO_SIDE_EFFECTS__
2457
- function hi(e, t) {
2376
+ function di(e, t) {
2458
2377
  return new e({
2459
2378
  type: "string",
2460
2379
  format: "cuid",
@@ -2464,7 +2383,7 @@ function hi(e, t) {
2464
2383
  });
2465
2384
  }
2466
2385
  // @__NO_SIDE_EFFECTS__
2467
- function gi(e, t) {
2386
+ function fi(e, t) {
2468
2387
  return new e({
2469
2388
  type: "string",
2470
2389
  format: "cuid2",
@@ -2474,7 +2393,7 @@ function gi(e, t) {
2474
2393
  });
2475
2394
  }
2476
2395
  // @__NO_SIDE_EFFECTS__
2477
- function _i(e, t) {
2396
+ function pi(e, t) {
2478
2397
  return new e({
2479
2398
  type: "string",
2480
2399
  format: "ulid",
@@ -2484,7 +2403,7 @@ function _i(e, t) {
2484
2403
  });
2485
2404
  }
2486
2405
  // @__NO_SIDE_EFFECTS__
2487
- function vi(e, t) {
2406
+ function mi(e, t) {
2488
2407
  return new e({
2489
2408
  type: "string",
2490
2409
  format: "xid",
@@ -2494,7 +2413,7 @@ function vi(e, t) {
2494
2413
  });
2495
2414
  }
2496
2415
  // @__NO_SIDE_EFFECTS__
2497
- function yi(e, t) {
2416
+ function hi(e, t) {
2498
2417
  return new e({
2499
2418
  type: "string",
2500
2419
  format: "ksuid",
@@ -2504,7 +2423,7 @@ function yi(e, t) {
2504
2423
  });
2505
2424
  }
2506
2425
  // @__NO_SIDE_EFFECTS__
2507
- function bi(e, t) {
2426
+ function gi(e, t) {
2508
2427
  return new e({
2509
2428
  type: "string",
2510
2429
  format: "ipv4",
@@ -2514,7 +2433,7 @@ function bi(e, t) {
2514
2433
  });
2515
2434
  }
2516
2435
  // @__NO_SIDE_EFFECTS__
2517
- function xi(e, t) {
2436
+ function _i(e, t) {
2518
2437
  return new e({
2519
2438
  type: "string",
2520
2439
  format: "ipv6",
@@ -2524,7 +2443,7 @@ function xi(e, t) {
2524
2443
  });
2525
2444
  }
2526
2445
  // @__NO_SIDE_EFFECTS__
2527
- function Si(e, t) {
2446
+ function vi(e, t) {
2528
2447
  return new e({
2529
2448
  type: "string",
2530
2449
  format: "cidrv4",
@@ -2534,7 +2453,7 @@ function Si(e, t) {
2534
2453
  });
2535
2454
  }
2536
2455
  // @__NO_SIDE_EFFECTS__
2537
- function Ci(e, t) {
2456
+ function yi(e, t) {
2538
2457
  return new e({
2539
2458
  type: "string",
2540
2459
  format: "cidrv6",
@@ -2544,7 +2463,7 @@ function Ci(e, t) {
2544
2463
  });
2545
2464
  }
2546
2465
  // @__NO_SIDE_EFFECTS__
2547
- function wi(e, t) {
2466
+ function bi(e, t) {
2548
2467
  return new e({
2549
2468
  type: "string",
2550
2469
  format: "base64",
@@ -2554,7 +2473,7 @@ function wi(e, t) {
2554
2473
  });
2555
2474
  }
2556
2475
  // @__NO_SIDE_EFFECTS__
2557
- function Ti(e, t) {
2476
+ function xi(e, t) {
2558
2477
  return new e({
2559
2478
  type: "string",
2560
2479
  format: "base64url",
@@ -2564,7 +2483,7 @@ function Ti(e, t) {
2564
2483
  });
2565
2484
  }
2566
2485
  // @__NO_SIDE_EFFECTS__
2567
- function Ei(e, t) {
2486
+ function Si(e, t) {
2568
2487
  return new e({
2569
2488
  type: "string",
2570
2489
  format: "e164",
@@ -2574,7 +2493,7 @@ function Ei(e, t) {
2574
2493
  });
2575
2494
  }
2576
2495
  // @__NO_SIDE_EFFECTS__
2577
- function Di(e, t) {
2496
+ function Ci(e, t) {
2578
2497
  return new e({
2579
2498
  type: "string",
2580
2499
  format: "jwt",
@@ -2584,7 +2503,7 @@ function Di(e, t) {
2584
2503
  });
2585
2504
  }
2586
2505
  // @__NO_SIDE_EFFECTS__
2587
- function Oi(e, t) {
2506
+ function wi(e, t) {
2588
2507
  return new e({
2589
2508
  type: "string",
2590
2509
  format: "datetime",
@@ -2596,7 +2515,7 @@ function Oi(e, t) {
2596
2515
  });
2597
2516
  }
2598
2517
  // @__NO_SIDE_EFFECTS__
2599
- function ki(e, t) {
2518
+ function Ti(e, t) {
2600
2519
  return new e({
2601
2520
  type: "string",
2602
2521
  format: "date",
@@ -2605,7 +2524,7 @@ function ki(e, t) {
2605
2524
  });
2606
2525
  }
2607
2526
  // @__NO_SIDE_EFFECTS__
2608
- function Ai(e, t) {
2527
+ function Ei(e, t) {
2609
2528
  return new e({
2610
2529
  type: "string",
2611
2530
  format: "time",
@@ -2615,7 +2534,7 @@ function Ai(e, t) {
2615
2534
  });
2616
2535
  }
2617
2536
  // @__NO_SIDE_EFFECTS__
2618
- function ji(e, t) {
2537
+ function Di(e, t) {
2619
2538
  return new e({
2620
2539
  type: "string",
2621
2540
  format: "duration",
@@ -2624,7 +2543,7 @@ function ji(e, t) {
2624
2543
  });
2625
2544
  }
2626
2545
  // @__NO_SIDE_EFFECTS__
2627
- function Mi(e, t) {
2546
+ function Oi(e, t) {
2628
2547
  return new e({
2629
2548
  type: "number",
2630
2549
  checks: [],
@@ -2632,7 +2551,7 @@ function Mi(e, t) {
2632
2551
  });
2633
2552
  }
2634
2553
  // @__NO_SIDE_EFFECTS__
2635
- function Ni(e, t) {
2554
+ function ki(e, t) {
2636
2555
  return new e({
2637
2556
  type: "number",
2638
2557
  check: "number_format",
@@ -2642,32 +2561,32 @@ function Ni(e, t) {
2642
2561
  });
2643
2562
  }
2644
2563
  // @__NO_SIDE_EFFECTS__
2645
- function Pi(e, t) {
2564
+ function Ai(e, t) {
2646
2565
  return new e({
2647
2566
  type: "boolean",
2648
2567
  ...v(t)
2649
2568
  });
2650
2569
  }
2651
2570
  // @__NO_SIDE_EFFECTS__
2652
- function Fi(e, t) {
2571
+ function ji(e, t) {
2653
2572
  return new e({
2654
2573
  type: "null",
2655
2574
  ...v(t)
2656
2575
  });
2657
2576
  }
2658
2577
  // @__NO_SIDE_EFFECTS__
2659
- function Ii(e) {
2578
+ function Mi(e) {
2660
2579
  return new e({ type: "unknown" });
2661
2580
  }
2662
2581
  // @__NO_SIDE_EFFECTS__
2663
- function Li(e, t) {
2582
+ function Ni(e, t) {
2664
2583
  return new e({
2665
2584
  type: "never",
2666
2585
  ...v(t)
2667
2586
  });
2668
2587
  }
2669
2588
  // @__NO_SIDE_EFFECTS__
2670
- function Ri(e, t) {
2589
+ function Pi(e, t) {
2671
2590
  return new Jt({
2672
2591
  check: "less_than",
2673
2592
  ...v(t),
@@ -2676,7 +2595,7 @@ function Ri(e, t) {
2676
2595
  });
2677
2596
  }
2678
2597
  // @__NO_SIDE_EFFECTS__
2679
- function zi(e, t) {
2598
+ function Fi(e, t) {
2680
2599
  return new Jt({
2681
2600
  check: "less_than",
2682
2601
  ...v(t),
@@ -2685,7 +2604,7 @@ function zi(e, t) {
2685
2604
  });
2686
2605
  }
2687
2606
  // @__NO_SIDE_EFFECTS__
2688
- function Bi(e, t) {
2607
+ function Ii(e, t) {
2689
2608
  return new Yt({
2690
2609
  check: "greater_than",
2691
2610
  ...v(t),
@@ -2694,7 +2613,7 @@ function Bi(e, t) {
2694
2613
  });
2695
2614
  }
2696
2615
  // @__NO_SIDE_EFFECTS__
2697
- function Vi(e, t) {
2616
+ function Li(e, t) {
2698
2617
  return new Yt({
2699
2618
  check: "greater_than",
2700
2619
  ...v(t),
@@ -2703,7 +2622,7 @@ function Vi(e, t) {
2703
2622
  });
2704
2623
  }
2705
2624
  // @__NO_SIDE_EFFECTS__
2706
- function Hi(e, t) {
2625
+ function Ri(e, t) {
2707
2626
  return new Xt({
2708
2627
  check: "multiple_of",
2709
2628
  ...v(t),
@@ -2711,7 +2630,7 @@ function Hi(e, t) {
2711
2630
  });
2712
2631
  }
2713
2632
  // @__NO_SIDE_EFFECTS__
2714
- function Ui(e, t) {
2633
+ function zi(e, t) {
2715
2634
  return new Qt({
2716
2635
  check: "max_length",
2717
2636
  ...v(t),
@@ -2719,7 +2638,7 @@ function Ui(e, t) {
2719
2638
  });
2720
2639
  }
2721
2640
  // @__NO_SIDE_EFFECTS__
2722
- function Wi(e, t) {
2641
+ function Bi(e, t) {
2723
2642
  return new $t({
2724
2643
  check: "min_length",
2725
2644
  ...v(t),
@@ -2727,7 +2646,7 @@ function Wi(e, t) {
2727
2646
  });
2728
2647
  }
2729
2648
  // @__NO_SIDE_EFFECTS__
2730
- function Gi(e, t) {
2649
+ function Vi(e, t) {
2731
2650
  return new en({
2732
2651
  check: "length_equals",
2733
2652
  ...v(t),
@@ -2735,7 +2654,7 @@ function Gi(e, t) {
2735
2654
  });
2736
2655
  }
2737
2656
  // @__NO_SIDE_EFFECTS__
2738
- function Ki(e, t) {
2657
+ function Hi(e, t) {
2739
2658
  return new nn({
2740
2659
  check: "string_format",
2741
2660
  format: "regex",
@@ -2744,7 +2663,7 @@ function Ki(e, t) {
2744
2663
  });
2745
2664
  }
2746
2665
  // @__NO_SIDE_EFFECTS__
2747
- function qi(e) {
2666
+ function Ui(e) {
2748
2667
  return new rn({
2749
2668
  check: "string_format",
2750
2669
  format: "lowercase",
@@ -2752,7 +2671,7 @@ function qi(e) {
2752
2671
  });
2753
2672
  }
2754
2673
  // @__NO_SIDE_EFFECTS__
2755
- function Ji(e) {
2674
+ function Wi(e) {
2756
2675
  return new an({
2757
2676
  check: "string_format",
2758
2677
  format: "uppercase",
@@ -2760,7 +2679,7 @@ function Ji(e) {
2760
2679
  });
2761
2680
  }
2762
2681
  // @__NO_SIDE_EFFECTS__
2763
- function Yi(e, t) {
2682
+ function Gi(e, t) {
2764
2683
  return new on({
2765
2684
  check: "string_format",
2766
2685
  format: "includes",
@@ -2769,7 +2688,7 @@ function Yi(e, t) {
2769
2688
  });
2770
2689
  }
2771
2690
  // @__NO_SIDE_EFFECTS__
2772
- function Xi(e, t) {
2691
+ function Ki(e, t) {
2773
2692
  return new sn({
2774
2693
  check: "string_format",
2775
2694
  format: "starts_with",
@@ -2778,7 +2697,7 @@ function Xi(e, t) {
2778
2697
  });
2779
2698
  }
2780
2699
  // @__NO_SIDE_EFFECTS__
2781
- function Zi(e, t) {
2700
+ function qi(e, t) {
2782
2701
  return new cn({
2783
2702
  check: "string_format",
2784
2703
  format: "ends_with",
@@ -2787,34 +2706,34 @@ function Zi(e, t) {
2787
2706
  });
2788
2707
  }
2789
2708
  // @__NO_SIDE_EFFECTS__
2790
- function A(e) {
2709
+ function Ji(e) {
2791
2710
  return new ln({
2792
2711
  check: "overwrite",
2793
2712
  tx: e
2794
2713
  });
2795
2714
  }
2796
2715
  // @__NO_SIDE_EFFECTS__
2797
- function Qi(e) {
2798
- return /* @__PURE__ */ A((t) => t.normalize(e));
2716
+ function Yi(e) {
2717
+ return /* @__PURE__ */ Ji((t) => t.normalize(e));
2799
2718
  }
2800
2719
  // @__NO_SIDE_EFFECTS__
2801
- function $i() {
2802
- return /* @__PURE__ */ A((e) => e.trim());
2720
+ function Xi() {
2721
+ return /* @__PURE__ */ Ji((e) => e.trim());
2803
2722
  }
2804
2723
  // @__NO_SIDE_EFFECTS__
2805
- function ea() {
2806
- return /* @__PURE__ */ A((e) => e.toLowerCase());
2724
+ function Zi() {
2725
+ return /* @__PURE__ */ Ji((e) => e.toLowerCase());
2807
2726
  }
2808
2727
  // @__NO_SIDE_EFFECTS__
2809
- function ta() {
2810
- return /* @__PURE__ */ A((e) => e.toUpperCase());
2728
+ function Qi() {
2729
+ return /* @__PURE__ */ Ji((e) => e.toUpperCase());
2811
2730
  }
2812
2731
  // @__NO_SIDE_EFFECTS__
2813
- function na() {
2814
- return /* @__PURE__ */ A((e) => m(e));
2732
+ function $i() {
2733
+ return /* @__PURE__ */ Ji((e) => m(e));
2815
2734
  }
2816
2735
  // @__NO_SIDE_EFFECTS__
2817
- function ra(e, t, n) {
2736
+ function ea(e, t, n) {
2818
2737
  return new e({
2819
2738
  type: "array",
2820
2739
  element: t,
@@ -2822,7 +2741,7 @@ function ra(e, t, n) {
2822
2741
  });
2823
2742
  }
2824
2743
  // @__NO_SIDE_EFFECTS__
2825
- function ia(e, t, n) {
2744
+ function ta(e, t, n) {
2826
2745
  return new e({
2827
2746
  type: "custom",
2828
2747
  check: "custom",
@@ -2831,8 +2750,8 @@ function ia(e, t, n) {
2831
2750
  });
2832
2751
  }
2833
2752
  // @__NO_SIDE_EFFECTS__
2834
- function aa(e, t) {
2835
- let n = /* @__PURE__ */ oa((t) => (t.addIssue = (e) => {
2753
+ function na(e, t) {
2754
+ let n = /* @__PURE__ */ ra((t) => (t.addIssue = (e) => {
2836
2755
  if (typeof e == "string") t.issues.push(Ce(e, t.value, n._zod.def));
2837
2756
  else {
2838
2757
  let r = e;
@@ -2842,7 +2761,7 @@ function aa(e, t) {
2842
2761
  return n;
2843
2762
  }
2844
2763
  // @__NO_SIDE_EFFECTS__
2845
- function oa(e, t) {
2764
+ function ra(e, t) {
2846
2765
  let n = new D({
2847
2766
  check: "custom",
2848
2767
  ...v(t)
@@ -2851,15 +2770,15 @@ function oa(e, t) {
2851
2770
  }
2852
2771
  //#endregion
2853
2772
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
2854
- function sa(e, ...t) {
2773
+ function ia(e, ...t) {
2855
2774
  for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && d(e, t, n[t]);
2856
2775
  return e;
2857
2776
  }
2858
- function ca(e) {
2777
+ function aa(e) {
2859
2778
  let t = e?.target ?? "draft-2020-12";
2860
2779
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2861
2780
  processors: e.processors ?? {},
2862
- metadataRegistry: e?.metadata ?? ii,
2781
+ metadataRegistry: e?.metadata ?? ei,
2863
2782
  target: t,
2864
2783
  unrepresentable: e?.unrepresentable ?? "throw",
2865
2784
  override: e?.override ?? (() => {}),
@@ -2875,7 +2794,7 @@ function ca(e) {
2875
2794
  external: e?.external ?? void 0
2876
2795
  };
2877
2796
  }
2878
- function j(e, t, n, r, i) {
2797
+ function A(e, t, n, r, i) {
2879
2798
  let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
2880
2799
  zodSchema: e,
2881
2800
  path: r.path,
@@ -2885,7 +2804,7 @@ function j(e, t, n, r, i) {
2885
2804
  if (a === void 0 || a === "throw") throw Error(i);
2886
2805
  return Object.assign(n, a), !0;
2887
2806
  }
2888
- function M(e, t, n = {
2807
+ function j(e, t, n = {
2889
2808
  path: [],
2890
2809
  schemaPath: []
2891
2810
  }) {
@@ -2914,15 +2833,15 @@ function M(e, t, n = {
2914
2833
  a(e, t, n, r);
2915
2834
  }
2916
2835
  let a = e._zod.parent;
2917
- a && (o.ref ||= a, M(a, t, r), t.seen.get(a).isParent = !0);
2836
+ a && (o.ref ||= a, j(a, t, r), t.seen.get(a).isParent = !0);
2918
2837
  }
2919
2838
  let c = t.metadataRegistry.get(e);
2920
- return c && sa(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;
2839
+ return c && ia(o.schema, c), t.io === "input" && M(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;
2921
2840
  }
2922
- function la(e) {
2841
+ function oa(e) {
2923
2842
  return e.replace(/~/g, "~0").replace(/\//g, "~1");
2924
2843
  }
2925
- function ua(e, t) {
2844
+ function sa(e, t) {
2926
2845
  let n = e.seen.get(t);
2927
2846
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2928
2847
  if (e.external && e.sharedDefsExtractedFor === e.external) return;
@@ -2943,7 +2862,7 @@ function ua(e, t) {
2943
2862
  let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2944
2863
  return t[1].defId = a, {
2945
2864
  defId: a,
2946
- ref: `${i("__shared")}#/${r}/${la(a)}`
2865
+ ref: `${i("__shared")}#/${r}/${oa(a)}`
2947
2866
  };
2948
2867
  }
2949
2868
  let i = `#/${r}/`;
@@ -2951,7 +2870,7 @@ function ua(e, t) {
2951
2870
  let a = t[1].schema.id ?? `__schema${e.counter++}`;
2952
2871
  return {
2953
2872
  defId: a,
2954
- ref: i + la(a)
2873
+ ref: i + oa(a)
2955
2874
  };
2956
2875
  }, a = (e) => {
2957
2876
  if (e[1].schema.$ref) return;
@@ -2995,13 +2914,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2995
2914
  }
2996
2915
  e.external && (e.sharedDefsExtractedFor = e.external);
2997
2916
  }
2998
- function da(e) {
2917
+ function ca(e) {
2999
2918
  let t = e.anyOf;
3000
2919
  if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
3001
2920
  let n = [];
3002
2921
  for (let e of t) {
3003
2922
  if (!e || typeof e != "object") return;
3004
- da(e);
2923
+ ca(e);
3005
2924
  let t = Object.keys(e);
3006
2925
  if (t.length !== 1 || t[0] !== "type") return;
3007
2926
  let r = e.type;
@@ -3012,21 +2931,21 @@ function da(e) {
3012
2931
  }
3013
2932
  delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
3014
2933
  }
3015
- var fa = /* @__PURE__ */ new Set([
2934
+ var la = /* @__PURE__ */ new Set([
3016
2935
  "type",
3017
2936
  "properties",
3018
2937
  "required",
3019
2938
  "additionalProperties"
3020
- ]), pa = ["oneOf", "anyOf"];
3021
- function ma(e) {
2939
+ ]), ua = ["oneOf", "anyOf"];
2940
+ function da(e) {
3022
2941
  let t = e.additionalProperties;
3023
2942
  return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
3024
2943
  }
3025
- function ha(e) {
2944
+ function fa(e) {
3026
2945
  let t = [];
3027
2946
  for (let n of e) {
3028
2947
  if (typeof n != "object" || n.type !== "object") return null;
3029
- for (let e in n) if (!fa.has(e)) return null;
2948
+ for (let e in n) if (!la.has(e)) return null;
3030
2949
  t.push(n);
3031
2950
  }
3032
2951
  let n = {}, r = /* @__PURE__ */ new Set();
@@ -3035,10 +2954,10 @@ function ha(e) {
3035
2954
  if (Object.prototype.hasOwnProperty.call(n, r)) continue;
3036
2955
  let e = [];
3037
2956
  for (let n of t) {
3038
- let t = n.properties?.[r] ?? ma(n);
2957
+ let t = n.properties?.[r] ?? da(n);
3039
2958
  t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
3040
2959
  }
3041
- d(n, r, e.length === 1 ? e[0] : ha(e) ?? { allOf: e });
2960
+ d(n, r, e.length === 1 ? e[0] : fa(e) ?? { allOf: e });
3042
2961
  }
3043
2962
  for (let t of e.required ?? []) r.add(t);
3044
2963
  }
@@ -3050,29 +2969,29 @@ function ha(e) {
3050
2969
  else {
3051
2970
  let e = [];
3052
2971
  for (let n of t) {
3053
- let t = ma(n);
2972
+ let t = da(n);
3054
2973
  t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
3055
2974
  }
3056
2975
  e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
3057
2976
  }
3058
2977
  return i;
3059
2978
  }
3060
- function ga(e) {
2979
+ function pa(e) {
3061
2980
  let t = e.allOf;
3062
2981
  if (!Array.isArray(t) || t.length < 2) return;
3063
- for (let t of fa) if (t in e) return;
3064
- let n = t.filter((e) => pa.some((t) => Array.isArray(e[t]))), r = null;
3065
- if (!n.length) r = ha(t);
2982
+ for (let t of la) if (t in e) return;
2983
+ let n = t.filter((e) => ua.some((t) => Array.isArray(e[t]))), r = null;
2984
+ if (!n.length) r = fa(t);
3066
2985
  else {
3067
- let e = n[0], i = pa.find((t) => Array.isArray(e[t]));
2986
+ let e = n[0], i = ua.find((t) => Array.isArray(e[t]));
3068
2987
  if (Object.keys(e).length !== 1) return;
3069
- let a = t.filter((t) => t !== e), o = e[i].map((e) => ha([...a, e]));
2988
+ let a = t.filter((t) => t !== e), o = e[i].map((e) => fa([...a, e]));
3070
2989
  if (o.some((e) => !e)) return;
3071
2990
  r = { [i]: o };
3072
2991
  }
3073
- r && (delete e.allOf, sa(e, r));
2992
+ r && (delete e.allOf, ia(e, r));
3074
2993
  }
3075
- function _a(e, t) {
2994
+ function ma(e, t) {
3076
2995
  let n = e.seen.get(t);
3077
2996
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
3078
2997
  let r = (t) => {
@@ -3082,7 +3001,7 @@ function _a(e, t) {
3082
3001
  if (n.ref = null, o) {
3083
3002
  r(o);
3084
3003
  let n = e.seen.get(o), s = n.schema;
3085
- if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : sa(i, s), sa(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3004
+ 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]);
3086
3005
  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];
3087
3006
  }
3088
3007
  let s = t._zod.parent;
@@ -3099,7 +3018,7 @@ function _a(e, t) {
3099
3018
  };
3100
3019
  if (!e.external || e.sharedEmitDoneFor !== e.external) {
3101
3020
  for (let t of [...e.seen.entries()].reverse()) r(t[0]);
3102
- if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) da(t[1].def ?? t[1].schema);
3021
+ if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ca(t[1].def ?? t[1].schema);
3103
3022
  for (let t of e.deferred) t();
3104
3023
  if (e.intersections.length) {
3105
3024
  let t = /* @__PURE__ */ new Map();
@@ -3109,7 +3028,7 @@ function _a(e, t) {
3109
3028
  let r = t.get(n);
3110
3029
  r ? r.push(e) : t.set(n, [e]);
3111
3030
  }
3112
- for (let n of e.intersections) for (let e of t.get(n) ?? []) ga(e);
3031
+ for (let n of e.intersections) for (let e of t.get(n) ?? []) pa(e);
3113
3032
  }
3114
3033
  }
3115
3034
  let i = {};
@@ -3118,7 +3037,7 @@ function _a(e, t) {
3118
3037
  if (!n) throw Error("Schema is missing an `id` property");
3119
3038
  i.$id = e.external.uri(n);
3120
3039
  }
3121
- sa(i, n.defId ? n.schema : n.def ?? n.schema);
3040
+ ia(i, n.defId ? n.schema : n.def ?? n.schema);
3122
3041
  let a = e.metadataRegistry.get(t)?.id;
3123
3042
  a !== void 0 && i.id === a && delete i.id;
3124
3043
  let o = e.external?.defs ?? {};
@@ -3133,8 +3052,8 @@ function _a(e, t) {
3133
3052
  value: {
3134
3053
  ...t["~standard"],
3135
3054
  jsonSchema: {
3136
- input: ya(t, "input", e.processors),
3137
- output: ya(t, "output", e.processors)
3055
+ input: ga(t, "input", e.processors),
3056
+ output: ga(t, "output", e.processors)
3138
3057
  }
3139
3058
  },
3140
3059
  enumerable: !1,
@@ -3144,93 +3063,93 @@ function _a(e, t) {
3144
3063
  throw Error("Error converting schema to JSON.");
3145
3064
  }
3146
3065
  }
3147
- function N(e, t) {
3066
+ function M(e, t) {
3148
3067
  let n = t ?? { seen: /* @__PURE__ */ new Set() };
3149
3068
  if (n.seen.has(e)) return !1;
3150
3069
  n.seen.add(e);
3151
3070
  let r = e._zod.def;
3152
3071
  if (r.type === "transform") return !0;
3153
- if (r.type === "array") return N(r.element, n);
3154
- if (r.type === "set") return N(r.valueType, n);
3155
- if (r.type === "lazy") return N(r.getter(), n);
3156
- 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);
3157
- if (r.type === "intersection") return N(r.left, n) || N(r.right, n);
3158
- if (r.type === "record" || r.type === "map") return N(r.keyType, n) || N(r.valueType, n);
3159
- if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : N(r.in, n) || N(r.out, n);
3072
+ if (r.type === "array") return M(r.element, n);
3073
+ if (r.type === "set") return M(r.valueType, n);
3074
+ if (r.type === "lazy") return M(r.getter(), n);
3075
+ 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 M(r.innerType, n);
3076
+ if (r.type === "intersection") return M(r.left, n) || M(r.right, n);
3077
+ if (r.type === "record" || r.type === "map") return M(r.keyType, n) || M(r.valueType, n);
3078
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : M(r.in, n) || M(r.out, n);
3160
3079
  if (r.type === "object") {
3161
- for (let e in r.shape) if (N(r.shape[e], n)) return !0;
3080
+ for (let e in r.shape) if (M(r.shape[e], n)) return !0;
3162
3081
  return !1;
3163
3082
  }
3164
3083
  if (r.type === "union") {
3165
- for (let e of r.options) if (N(e, n)) return !0;
3084
+ for (let e of r.options) if (M(e, n)) return !0;
3166
3085
  return !1;
3167
3086
  }
3168
3087
  if (r.type === "tuple") {
3169
- for (let e of r.items) if (N(e, n)) return !0;
3170
- return !!(r.rest && N(r.rest, n));
3088
+ for (let e of r.items) if (M(e, n)) return !0;
3089
+ return !!(r.rest && M(r.rest, n));
3171
3090
  }
3172
3091
  return !1;
3173
3092
  }
3174
- var va = (e, t = {}) => (n) => {
3175
- let r = ca({
3093
+ var ha = (e, t = {}) => (n) => {
3094
+ let r = aa({
3176
3095
  ...n,
3177
3096
  processors: t
3178
3097
  });
3179
- return M(e, r), ua(r, e), _a(r, e);
3180
- }, ya = (e, t, n = {}) => (r) => {
3181
- let { libraryOptions: i, target: a } = r ?? {}, o = ca({
3098
+ return j(e, r), sa(r, e), ma(r, e);
3099
+ }, ga = (e, t, n = {}) => (r) => {
3100
+ let { libraryOptions: i, target: a } = r ?? {}, o = aa({
3182
3101
  ...i ?? {},
3183
3102
  target: a,
3184
3103
  io: t,
3185
3104
  processors: n
3186
3105
  });
3187
- return M(e, o), ua(o, e), _a(o, e);
3188
- }, ba = {
3106
+ return j(e, o), sa(o, e), ma(o, e);
3107
+ }, _a = {
3189
3108
  guid: "uuid",
3190
3109
  url: "uri",
3191
3110
  datetime: "date-time",
3192
3111
  json_string: "json-string",
3193
3112
  regex: ""
3194
- }, xa = (e, t, n, r) => {
3113
+ }, va = (e, t, n, r) => {
3195
3114
  let i = n;
3196
3115
  i.type = "string";
3197
3116
  let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
3198
- if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ba[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3117
+ 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) {
3199
3118
  let e = [...c];
3200
3119
  e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
3201
3120
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3202
3121
  pattern: e.source
3203
3122
  }))]);
3204
3123
  }
3205
- }, Sa = (e, t, n, r) => {
3124
+ }, ya = (e, t, n, r) => {
3206
3125
  let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
3207
3126
  i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
3208
3127
  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";
3209
- 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`));
3210
- }, Ca = (e, t, n, r) => {
3128
+ 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) : A(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3129
+ }, ba = (e, t, n, r) => {
3211
3130
  n.type = "boolean";
3131
+ }, xa = (e, t, n, r) => {
3132
+ A(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3133
+ }, Sa = (e, t, n, r) => {
3134
+ A(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3135
+ }, Ca = (e, t, n, r) => {
3136
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3212
3137
  }, wa = (e, t, n, r) => {
3213
- j(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3138
+ A(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3214
3139
  }, Ta = (e, t, n, r) => {
3215
- j(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3140
+ A(e, t, n, r, "Void cannot be represented in JSON Schema");
3216
3141
  }, Ea = (e, t, n, r) => {
3217
- t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3218
- }, Da = (e, t, n, r) => {
3219
- j(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3220
- }, Oa = (e, t, n, r) => {
3221
- j(e, t, n, r, "Void cannot be represented in JSON Schema");
3222
- }, ka = (e, t, n, r) => {
3223
3142
  n.not = {};
3224
- }, Aa = (e, t, n, r) => {}, ja = (e, t, n, r) => {}, Ma = (e, t, n, r) => {
3225
- j(e, t, n, r, "Date cannot be represented in JSON Schema");
3226
- }, Na = (e, t, r, i) => {
3143
+ }, Da = (e, t, n, r) => {}, Oa = (e, t, n, r) => {}, ka = (e, t, n, r) => {
3144
+ A(e, t, n, r, "Date cannot be represented in JSON Schema");
3145
+ }, Aa = (e, t, r, i) => {
3227
3146
  let a = e._zod.def, o = n(a.entries);
3228
3147
  if (o.length === 0) {
3229
3148
  r.not = {};
3230
3149
  return;
3231
3150
  }
3232
3151
  o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
3233
- }, Pa = (e, t, n, r) => {
3152
+ }, ja = (e, t, n, r) => {
3234
3153
  let i = e._zod.def;
3235
3154
  if (i.values.length === 0) {
3236
3155
  n.not = {};
@@ -3238,9 +3157,9 @@ var va = (e, t = {}) => (n) => {
3238
3157
  }
3239
3158
  let a = [];
3240
3159
  for (let o of i.values) if (o === void 0) {
3241
- if (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3160
+ if (A(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3242
3161
  } else if (typeof o == "bigint") {
3243
- if (j(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3162
+ if (A(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3244
3163
  a.push(Number(o));
3245
3164
  } else a.push(o);
3246
3165
  if (a.length !== 0) {
@@ -3249,47 +3168,47 @@ var va = (e, t = {}) => (n) => {
3249
3168
  n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
3250
3169
  } 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;
3251
3170
  }
3252
- }, Fa = (e, t, n, r) => {
3253
- j(e, t, n, r, "NaN cannot be represented in JSON Schema");
3254
- }, Ia = (e, t, n, r) => {
3171
+ }, Ma = (e, t, n, r) => {
3172
+ A(e, t, n, r, "NaN cannot be represented in JSON Schema");
3173
+ }, Na = (e, t, n, r) => {
3255
3174
  let i = n, a = e._zod.pattern;
3256
3175
  if (!a) throw Error("Pattern not found in template literal");
3257
3176
  i.type = "string", i.pattern = a.source;
3258
- }, La = (e, t, n, r) => {
3177
+ }, Pa = (e, t, n, r) => {
3259
3178
  let i = n, a = {
3260
3179
  type: "string",
3261
3180
  format: "binary",
3262
3181
  contentEncoding: "binary"
3263
3182
  }, { minimum: o, maximum: s, mime: c } = e._zod.bag;
3264
3183
  o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a);
3265
- }, Ra = (e, t, n, r) => {
3184
+ }, Fa = (e, t, n, r) => {
3266
3185
  n.type = "boolean";
3186
+ }, Ia = (e, t, n, r) => {
3187
+ A(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3188
+ }, La = (e, t, n, r) => {
3189
+ A(e, t, n, r, "Function types cannot be represented in JSON Schema");
3190
+ }, Ra = (e, t, n, r) => {
3191
+ A(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3267
3192
  }, za = (e, t, n, r) => {
3268
- j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3193
+ A(e, t, n, r, "Map cannot be represented in JSON Schema");
3269
3194
  }, Ba = (e, t, n, r) => {
3270
- j(e, t, n, r, "Function types cannot be represented in JSON Schema");
3195
+ A(e, t, n, r, "Set cannot be represented in JSON Schema");
3271
3196
  }, Va = (e, t, n, r) => {
3272
- j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3273
- }, Ha = (e, t, n, r) => {
3274
- j(e, t, n, r, "Map cannot be represented in JSON Schema");
3275
- }, Ua = (e, t, n, r) => {
3276
- j(e, t, n, r, "Set cannot be represented in JSON Schema");
3277
- }, Wa = (e, t, n, r) => {
3278
3197
  let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
3279
- typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = M(a.element, t, {
3198
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = j(a.element, t, {
3280
3199
  ...r,
3281
3200
  path: [...r.path, "items"]
3282
3201
  });
3283
3202
  };
3284
- function Ga(e) {
3203
+ function Ha(e) {
3285
3204
  let t = e._zod.def;
3286
- return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Ga(t.out) : t.type === "catch" ? Ga(t.innerType) : e._zod.optin;
3205
+ return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Ha(t.out) : t.type === "catch" ? Ha(t.innerType) : e._zod.optin;
3287
3206
  }
3288
- var Ka = (e, t, n, r) => {
3207
+ var Ua = (e, t, n, r) => {
3289
3208
  let i = n, a = e._zod.def, o = a.shape;
3290
- if (Object.getOwnPropertySymbols(o).length && j(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3209
+ if (Object.getOwnPropertySymbols(o).length && A(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3291
3210
  i.type = "object", i.properties = {};
3292
- for (let e in o) d(i.properties, e, M(o[e], t, {
3211
+ for (let e in o) d(i.properties, e, j(o[e], t, {
3293
3212
  ...r,
3294
3213
  path: [
3295
3214
  ...r.path,
@@ -3299,14 +3218,14 @@ var Ka = (e, t, n, r) => {
3299
3218
  }));
3300
3219
  let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
3301
3220
  let n = a.shape[e];
3302
- return t.io === "input" ? Ga(n) === void 0 : n._zod.optout === void 0;
3221
+ return t.io === "input" ? Ha(n) === void 0 : n._zod.optout === void 0;
3303
3222
  }));
3304
- 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, {
3223
+ c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = j(a.catchall, t, {
3305
3224
  ...r,
3306
3225
  path: [...r.path, "additionalProperties"]
3307
3226
  })) : t.io === "output" && (i.additionalProperties = !1);
3308
- }, qa = (e, t, n, r) => {
3309
- let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => M(e, t, {
3227
+ }, Wa = (e, t, n, r) => {
3228
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => j(e, t, {
3310
3229
  ...r,
3311
3230
  path: [
3312
3231
  ...r.path,
@@ -3315,15 +3234,15 @@ var Ka = (e, t, n, r) => {
3315
3234
  ]
3316
3235
  }));
3317
3236
  a ? n.oneOf = o : n.anyOf = o;
3318
- }, Ja = (e, t, n, r) => {
3319
- let i = e._zod.def, a = M(i.left, t, {
3237
+ }, Ga = (e, t, n, r) => {
3238
+ let i = e._zod.def, a = j(i.left, t, {
3320
3239
  ...r,
3321
3240
  path: [
3322
3241
  ...r.path,
3323
3242
  "allOf",
3324
3243
  0
3325
3244
  ]
3326
- }), o = M(i.right, t, {
3245
+ }), o = j(i.right, t, {
3327
3246
  ...r,
3328
3247
  path: [
3329
3248
  ...r.path,
@@ -3332,17 +3251,17 @@ var Ka = (e, t, n, r) => {
3332
3251
  ]
3333
3252
  }), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
3334
3253
  n.allOf = c, t.intersections.push(c);
3335
- }, Ya = (e, t, n, r) => {
3254
+ }, Ka = (e, t, n, r) => {
3336
3255
  let i = n, a = e._zod.def;
3337
3256
  i.type = "array";
3338
- 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, {
3257
+ let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => j(e, t, {
3339
3258
  ...r,
3340
3259
  path: [
3341
3260
  ...r.path,
3342
3261
  o,
3343
3262
  n
3344
3263
  ]
3345
- })), l = a.rest ? M(a.rest, t, {
3264
+ })), l = a.rest ? j(a.rest, t, {
3346
3265
  ...r,
3347
3266
  path: [
3348
3267
  ...r.path,
@@ -3352,7 +3271,7 @@ var Ka = (e, t, n, r) => {
3352
3271
  }) : null, u = a.items.length;
3353
3272
  for (; u > 0;) {
3354
3273
  let e = a.items[u - 1];
3355
- if (!(t.io === "input" ? Ga(e) !== void 0 : e._zod.optout === "optional")) break;
3274
+ if (!(t.io === "input" ? Ha(e) !== void 0 : e._zod.optout === "optional")) break;
3356
3275
  u--;
3357
3276
  }
3358
3277
  let d = a.items.length, f = !a.rest;
@@ -3360,19 +3279,19 @@ var Ka = (e, t, n, r) => {
3360
3279
  let { minimum: p, maximum: m } = e._zod.bag;
3361
3280
  typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
3362
3281
  };
3363
- function Xa(e, t, n) {
3282
+ function qa(e, t, n) {
3364
3283
  if (t.$ref) {
3365
3284
  if (n.has(t)) return t;
3366
3285
  n.add(t);
3367
3286
  let r = e.get(t)?.def;
3368
3287
  if (!r) return t;
3369
- let i = Xa(e, r, n);
3288
+ let i = qa(e, r, n);
3370
3289
  return i === r ? t : i;
3371
3290
  }
3372
3291
  for (let r of ["anyOf", "oneOf"]) {
3373
3292
  let i = t[r];
3374
3293
  if (!Array.isArray(i)) continue;
3375
- let a = i.map((t) => Xa(e, t, n));
3294
+ let a = i.map((t) => qa(e, t, n));
3376
3295
  a.some((e, t) => e !== i[t]) && (t = {
3377
3296
  ...t,
3378
3297
  [r]: a
@@ -3383,15 +3302,15 @@ function Xa(e, t, n) {
3383
3302
  let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
3384
3303
  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") ? Vt : Bt).source), p) : p;
3385
3304
  }
3386
- var Za = /* @__PURE__ */ new WeakMap();
3387
- function Qa(e) {
3305
+ var Ja = /* @__PURE__ */ new WeakMap();
3306
+ function Ya(e) {
3388
3307
  let t = /* @__PURE__ */ new Map();
3389
3308
  for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
3390
3309
  let n = /* @__PURE__ */ new Map();
3391
- for (let r of Za.get(e) ?? []) {
3310
+ for (let r of Ja.get(e) ?? []) {
3392
3311
  let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
3393
3312
  if (!a || a === !0 || n.has(a)) continue;
3394
- let o = Xa(t, a, /* @__PURE__ */ new Set());
3313
+ let o = qa(t, a, /* @__PURE__ */ new Set());
3395
3314
  o !== a && n.set(a, o);
3396
3315
  }
3397
3316
  if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
@@ -3399,12 +3318,12 @@ function Qa(e) {
3399
3318
  t && (e.propertyNames = t);
3400
3319
  }
3401
3320
  }
3402
- var $a = (e, t, n, r) => {
3321
+ var Xa = (e, t, n, r) => {
3403
3322
  let i = n, a = e._zod.def;
3404
3323
  i.type = "object";
3405
3324
  let o = a.keyType, s = o._zod.bag?.patterns;
3406
3325
  if (a.mode === "loose" && s && s.size > 0) {
3407
- let e = M(a.valueType, t, {
3326
+ let e = j(a.valueType, t, {
3408
3327
  ...r,
3409
3328
  path: [
3410
3329
  ...r.path,
@@ -3416,138 +3335,138 @@ var $a = (e, t, n, r) => {
3416
3335
  for (let t of s) d(i.patternProperties, t.source, e);
3417
3336
  } else {
3418
3337
  if (t.target === "draft-07" || t.target === "draft-2020-12") {
3419
- i.propertyNames = M(a.keyType, t, {
3338
+ i.propertyNames = j(a.keyType, t, {
3420
3339
  ...r,
3421
3340
  path: [...r.path, "propertyNames"]
3422
3341
  });
3423
- let n = Za.get(t);
3424
- n || (n = [], Za.set(t, n), t.deferred.push(() => Qa(t))), n.push(e);
3342
+ let n = Ja.get(t);
3343
+ n || (n = [], Ja.set(t, n), t.deferred.push(() => Ya(t))), n.push(e);
3425
3344
  }
3426
- i.additionalProperties = M(a.valueType, t, {
3345
+ i.additionalProperties = j(a.valueType, t, {
3427
3346
  ...r,
3428
3347
  path: [...r.path, "additionalProperties"]
3429
3348
  });
3430
3349
  }
3431
- let c = o._zod.values, l = t.io === "input" && Ga(a.valueType) !== void 0;
3350
+ let c = o._zod.values, l = t.io === "input" && Ha(a.valueType) !== void 0;
3432
3351
  if (c && !a.partial && !l) {
3433
3352
  let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
3434
3353
  e.length > 0 && (i.required = e.map(String));
3435
3354
  }
3436
- }, eo = (e, t, n, r) => {
3437
- let i = e._zod.def, a = M(i.innerType, t, r), o = t.seen.get(e);
3355
+ }, Za = (e, t, n, r) => {
3356
+ let i = e._zod.def, a = j(i.innerType, t, r), o = t.seen.get(e);
3438
3357
  t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3439
- }, to = (e, t, n, r) => {
3358
+ }, Qa = (e, t, n, r) => {
3440
3359
  let i = e._zod.def;
3441
- M(i.innerType, t, r);
3360
+ j(i.innerType, t, r);
3442
3361
  let a = t.seen.get(e);
3443
3362
  a.ref = i.innerType;
3444
- }, no = Symbol();
3445
- function ro(e, t, n, r, i) {
3363
+ }, $a = Symbol();
3364
+ function eo(e, t, n, r, i) {
3446
3365
  let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
3447
- return a ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), no) : JSON.parse(o);
3366
+ return a ? (A(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), $a) : JSON.parse(o);
3448
3367
  }
3449
- var io = (e, t, n, r) => {
3368
+ var to = (e, t, n, r) => {
3450
3369
  let i = e._zod.def;
3451
- M(i.innerType, t, r);
3370
+ j(i.innerType, t, r);
3452
3371
  let a = t.seen.get(e);
3453
3372
  a.ref = i.innerType;
3454
- let o = ro(i.defaultValue, e, t, n, r);
3455
- o !== no && (n.default = o);
3456
- }, ao = (e, t, n, r) => {
3373
+ let o = eo(i.defaultValue, e, t, n, r);
3374
+ o !== $a && (n.default = o);
3375
+ }, no = (e, t, n, r) => {
3457
3376
  let i = e._zod.def;
3458
- M(i.innerType, t, r);
3377
+ j(i.innerType, t, r);
3459
3378
  let a = t.seen.get(e);
3460
3379
  if (a.ref = i.innerType, t.io !== "input") return;
3461
- let o = ro(i.defaultValue, e, t, n, r);
3462
- o !== no && (n._prefault = o);
3463
- }, oo = (e, t, n, r) => {
3380
+ let o = eo(i.defaultValue, e, t, n, r);
3381
+ o !== $a && (n._prefault = o);
3382
+ }, ro = (e, t, n, r) => {
3464
3383
  let i = e._zod.def;
3465
- M(i.innerType, t, r);
3384
+ j(i.innerType, t, r);
3466
3385
  let a = t.seen.get(e);
3467
3386
  a.ref = i.innerType;
3468
3387
  let o;
3469
3388
  try {
3470
3389
  o = i.catchValue(void 0);
3471
3390
  } catch {
3472
- j(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3391
+ A(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3473
3392
  return;
3474
3393
  }
3475
3394
  n.default = o;
3476
- }, so = (e, t, n, r) => {
3395
+ }, io = (e, t, n, r) => {
3477
3396
  let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
3478
- M(o, t, r);
3397
+ j(o, t, r);
3479
3398
  let s = t.seen.get(e);
3480
3399
  s.ref = o;
3481
- }, co = (e, t, n, r) => {
3400
+ }, ao = (e, t, n, r) => {
3482
3401
  let i = e._zod.def;
3483
- M(i.innerType, t, r);
3402
+ j(i.innerType, t, r);
3484
3403
  let a = t.seen.get(e);
3485
3404
  a.ref = i.innerType, n.readOnly = !0;
3486
- }, lo = (e, t, n, r) => {
3405
+ }, oo = (e, t, n, r) => {
3487
3406
  let i = e._zod.def;
3488
- M(i.innerType, t, r);
3407
+ j(i.innerType, t, r);
3489
3408
  let a = t.seen.get(e);
3490
3409
  a.ref = i.innerType;
3491
- }, uo = (e, t, n, r) => {
3410
+ }, so = (e, t, n, r) => {
3492
3411
  let i = e._zod.def;
3493
- M(i.innerType, t, r);
3412
+ j(i.innerType, t, r);
3494
3413
  let a = t.seen.get(e);
3495
3414
  a.ref = i.innerType;
3496
- }, fo = (e, t, n, r) => {
3415
+ }, co = (e, t, n, r) => {
3497
3416
  let i = e._zod.innerType;
3498
- M(i, t, r);
3417
+ j(i, t, r);
3499
3418
  let a = t.seen.get(e);
3500
3419
  a.ref = i;
3501
- }, po = {
3502
- string: xa,
3503
- number: Sa,
3504
- boolean: Ca,
3505
- bigint: wa,
3506
- symbol: Ta,
3507
- null: Ea,
3508
- undefined: Da,
3509
- void: Oa,
3510
- never: ka,
3511
- any: Aa,
3512
- unknown: ja,
3513
- date: Ma,
3514
- enum: Na,
3515
- literal: Pa,
3516
- nan: Fa,
3517
- template_literal: Ia,
3518
- file: La,
3519
- success: Ra,
3520
- custom: za,
3521
- function: Ba,
3522
- transform: Va,
3523
- map: Ha,
3524
- set: Ua,
3525
- array: Wa,
3526
- object: Ka,
3527
- union: qa,
3528
- intersection: Ja,
3529
- tuple: Ya,
3530
- record: $a,
3531
- nullable: eo,
3532
- nonoptional: to,
3533
- default: io,
3534
- prefault: ao,
3535
- catch: oo,
3536
- pipe: so,
3537
- readonly: co,
3538
- promise: lo,
3539
- optional: uo,
3540
- lazy: fo
3420
+ }, lo = {
3421
+ string: va,
3422
+ number: ya,
3423
+ boolean: ba,
3424
+ bigint: xa,
3425
+ symbol: Sa,
3426
+ null: Ca,
3427
+ undefined: wa,
3428
+ void: Ta,
3429
+ never: Ea,
3430
+ any: Da,
3431
+ unknown: Oa,
3432
+ date: ka,
3433
+ enum: Aa,
3434
+ literal: ja,
3435
+ nan: Ma,
3436
+ template_literal: Na,
3437
+ file: Pa,
3438
+ success: Fa,
3439
+ custom: Ia,
3440
+ function: La,
3441
+ transform: Ra,
3442
+ map: za,
3443
+ set: Ba,
3444
+ array: Va,
3445
+ object: Ua,
3446
+ union: Wa,
3447
+ intersection: Ga,
3448
+ tuple: Ka,
3449
+ record: Xa,
3450
+ nullable: Za,
3451
+ nonoptional: Qa,
3452
+ default: to,
3453
+ prefault: no,
3454
+ catch: ro,
3455
+ pipe: io,
3456
+ readonly: ao,
3457
+ promise: oo,
3458
+ optional: so,
3459
+ lazy: co
3541
3460
  };
3542
- function mo(e, t) {
3461
+ function uo(e, t) {
3543
3462
  if ("_idmap" in e) {
3544
- let n = e, r = ca({
3463
+ let n = e, r = aa({
3545
3464
  ...t,
3546
- processors: po
3465
+ processors: lo
3547
3466
  }), i = {};
3548
3467
  for (let e of n._idmap.entries()) {
3549
3468
  let [t, n] = e;
3550
- M(n, r);
3469
+ j(n, r);
3551
3470
  }
3552
3471
  let a = {};
3553
3472
  r.external = {
@@ -3557,20 +3476,20 @@ function mo(e, t) {
3557
3476
  };
3558
3477
  for (let e of n._idmap.entries()) {
3559
3478
  let [t, n] = e;
3560
- ua(r, n), d(a, t, _a(r, n));
3479
+ sa(r, n), d(a, t, ma(r, n));
3561
3480
  }
3562
3481
  return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
3563
3482
  }
3564
- let n = ca({
3483
+ let n = aa({
3565
3484
  ...t,
3566
- processors: po
3485
+ processors: lo
3567
3486
  });
3568
- return M(e, n), ua(n, e), _a(n, e);
3487
+ return j(e, n), sa(n, e), ma(n, e);
3569
3488
  }
3570
3489
  //#endregion
3571
3490
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
3572
- var ho = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3573
- function go(e, t, n) {
3491
+ var fo = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3492
+ function po(e, t, n) {
3574
3493
  Object.defineProperty(e, t, {
3575
3494
  configurable: !0,
3576
3495
  enumerable: !1,
@@ -3591,12 +3510,12 @@ function go(e, t, n) {
3591
3510
  }
3592
3511
  });
3593
3512
  }
3594
- var _o = (e, t) => {
3513
+ var mo = (e, t) => {
3595
3514
  Ke.init(e, t), e.name = "ZodError";
3596
3515
  let n = Object.getPrototypeOf(e);
3597
- ho.has(n) || (ho.add(n), go(n, "format", (e) => (t) => Xe(e, t)), go(n, "flatten", (e) => (t) => Ye(e, t)), go(n, "addIssue", (e) => (t) => {
3516
+ fo.has(n) || (fo.add(n), po(n, "format", (e) => (t) => Xe(e, t)), po(n, "flatten", (e) => (t) => Ye(e, t)), po(n, "addIssue", (e) => (t) => {
3598
3517
  e.issues.push(t), e.message = JSON.stringify(e.issues, i, 2);
3599
- }), go(n, "addIssues", (e) => (t) => {
3518
+ }), po(n, "addIssues", (e) => (t) => {
3600
3519
  e.issues.push(...t), e.message = JSON.stringify(e.issues, i, 2);
3601
3520
  }), Object.defineProperty(n, "isEmpty", {
3602
3521
  configurable: !0,
@@ -3605,16 +3524,16 @@ var _o = (e, t) => {
3605
3524
  return this.issues.length === 0;
3606
3525
  }
3607
3526
  }));
3608
- }, vo = /*@__PURE__*/ w("ZodError", _o), P = /*@__PURE__*/ w("ZodError", _o, void 0, { Parent: Error }), yo = /* @__PURE__ */ Qe(P), bo = /* @__PURE__ */ $e(P), xo = /* @__PURE__ */ et(P), So = /* @__PURE__ */ nt(P), Co = /* @__PURE__ */ it(P), wo = /* @__PURE__ */ at(P), To = /* @__PURE__ */ ot(P), Eo = /* @__PURE__ */ st(P), Do = /* @__PURE__ */ ct(P), Oo = /* @__PURE__ */ lt(P), ko = /* @__PURE__ */ ut(P), Ao = /* @__PURE__ */ dt(P);
3527
+ }, ho = /*@__PURE__*/ w("ZodError", mo), N = /*@__PURE__*/ w("ZodError", mo, void 0, { Parent: Error }), go = /* @__PURE__ */ Qe(N), _o = /* @__PURE__ */ $e(N), vo = /* @__PURE__ */ et(N), yo = /* @__PURE__ */ nt(N), bo = /* @__PURE__ */ it(N), xo = /* @__PURE__ */ at(N), So = /* @__PURE__ */ ot(N), Co = /* @__PURE__ */ st(N), wo = /* @__PURE__ */ ct(N), To = /* @__PURE__ */ lt(N), Eo = /* @__PURE__ */ ut(N), Do = /* @__PURE__ */ dt(N);
3609
3528
  //#endregion
3610
3529
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
3611
- function jo() {
3612
- T.localeError || E(ei());
3530
+ function Oo() {
3531
+ T.localeError || E(Xr());
3613
3532
  }
3614
- function Mo() {
3615
- T.memoizer || E({ memoizer: Zr() });
3533
+ function ko() {
3534
+ T.memoizer || E({ memoizer: qr() });
3616
3535
  }
3617
- var F = /*@__PURE__*/ w("ZodType", (e, t) => (jo(), O.init(e, t), e.def = t, e.type = t.type, e), {
3536
+ var P = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), O.init(e, t), e.def = t, e.type = t.type, e), {
3618
3537
  check(...e) {
3619
3538
  let t = this.def;
3620
3539
  return this.clone(f(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
@@ -3636,64 +3555,64 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (jo(), O.init(e, t), e.def = t, e.t
3636
3555
  return e.add(this, t), this;
3637
3556
  },
3638
3557
  refine(e, t) {
3639
- return this.check(Js(e, t));
3558
+ return this.check(Us(e, t));
3640
3559
  },
3641
3560
  superRefine(e, t) {
3642
- return this.check(Ys(e, t));
3561
+ return this.check(Ws(e, t));
3643
3562
  },
3644
3563
  overwrite(e) {
3645
- return this.check(/* @__PURE__ */ A(e));
3564
+ return this.check(/* @__PURE__ */ Ji(e));
3646
3565
  },
3647
3566
  optional() {
3648
- return Os(this);
3567
+ return Cs(this);
3649
3568
  },
3650
3569
  exactOptional() {
3651
- return As(this);
3570
+ return Ts(this);
3652
3571
  },
3653
3572
  nullable() {
3654
- return Ms(this);
3573
+ return Ds(this);
3655
3574
  },
3656
3575
  nullish() {
3657
- return Os(Ms(this));
3576
+ return Cs(Ds(this));
3658
3577
  },
3659
3578
  nonoptional(e) {
3660
- return Rs(this, e);
3579
+ return Ns(this, e);
3661
3580
  },
3662
3581
  array() {
3663
- return B(this);
3582
+ return z(this);
3664
3583
  },
3665
3584
  or(e) {
3666
- return H([this, e]);
3585
+ return V([this, e]);
3667
3586
  },
3668
3587
  and(e) {
3669
- return ys(this, e);
3588
+ return gs(this, e);
3670
3589
  },
3671
3590
  transform(e) {
3672
- return Hs(this, Es(e));
3591
+ return Ls(this, xs(e));
3673
3592
  },
3674
3593
  default(e) {
3675
- return Ps(this, e);
3594
+ return ks(this, e);
3676
3595
  },
3677
3596
  prefault(e) {
3678
- return Is(this, e);
3597
+ return js(this, e);
3679
3598
  },
3680
3599
  catch(e) {
3681
- return Bs(this, e);
3600
+ return Fs(this, e);
3682
3601
  },
3683
3602
  pipe(e) {
3684
- return Hs(this, e);
3603
+ return Ls(this, e);
3685
3604
  },
3686
3605
  readonly() {
3687
- return Ws(this);
3606
+ return zs(this);
3688
3607
  },
3689
3608
  describe(e) {
3690
3609
  let t = this.clone();
3691
- return ii.add(t, { description: e }), t;
3610
+ return ei.add(t, { description: e }), t;
3692
3611
  },
3693
3612
  meta(...e) {
3694
- if (e.length === 0) return ii.get(this);
3613
+ if (e.length === 0) return ei.get(this);
3695
3614
  let t = this.clone();
3696
- return ii.add(t, e[0]), t;
3615
+ return ei.add(t, e[0]), t;
3697
3616
  },
3698
3617
  isOptional() {
3699
3618
  return this.safeParse(void 0).success;
@@ -3708,8 +3627,8 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (jo(), O.init(e, t), e.def = t, e.t
3708
3627
  return Te(this, "~standard", {
3709
3628
  ...pn(this),
3710
3629
  jsonSchema: {
3711
- input: ya(this, "input"),
3712
- output: ya(this, "output")
3630
+ input: ga(this, "input"),
3631
+ output: ga(this, "output")
3713
3632
  }
3714
3633
  });
3715
3634
  },
@@ -3717,16 +3636,16 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (jo(), O.init(e, t), e.def = t, e.t
3717
3636
  x(this, "~standard", e);
3718
3637
  },
3719
3638
  parse: function e(t, n) {
3720
- return yo(this, t, n, { callee: e });
3639
+ return go(this, t, n, { callee: e });
3721
3640
  },
3722
3641
  parseAsync: async function e(t, n) {
3723
- return await bo(this, t, n, { callee: e });
3642
+ return await _o(this, t, n, { callee: e });
3724
3643
  },
3725
3644
  safeParse(e, t) {
3726
- return xo(this, e, t);
3645
+ return vo(this, e, t);
3727
3646
  },
3728
3647
  async safeParseAsync(e, t) {
3729
- return So(this, e, t);
3648
+ return yo(this, e, t);
3730
3649
  },
3731
3650
  get spa() {
3732
3651
  return this?.safeParseAsync;
@@ -3735,332 +3654,332 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (jo(), O.init(e, t), e.def = t, e.t
3735
3654
  x(this, "spa", e);
3736
3655
  },
3737
3656
  encode: function e(t, n) {
3738
- return Co(this, t, n, { callee: e });
3657
+ return bo(this, t, n, { callee: e });
3739
3658
  },
3740
3659
  decode: function e(t, n) {
3741
- return wo(this, t, n, { callee: e });
3660
+ return xo(this, t, n, { callee: e });
3742
3661
  },
3743
3662
  encodeAsync: async function e(t, n) {
3744
- return await To(this, t, n, { callee: e });
3663
+ return await So(this, t, n, { callee: e });
3745
3664
  },
3746
3665
  decodeAsync: async function e(t, n) {
3747
- return await Eo(this, t, n, { callee: e });
3666
+ return await Co(this, t, n, { callee: e });
3748
3667
  },
3749
3668
  safeEncode(e, t) {
3750
- return Do(this, e, t);
3669
+ return wo(this, e, t);
3751
3670
  },
3752
3671
  safeDecode(e, t) {
3753
- return Oo(this, e, t);
3672
+ return To(this, e, t);
3754
3673
  },
3755
3674
  async safeEncodeAsync(e, t) {
3756
- return ko(this, e, t);
3675
+ return Eo(this, e, t);
3757
3676
  },
3758
3677
  async safeDecodeAsync(e, t) {
3759
- return Ao(this, e, t);
3678
+ return Do(this, e, t);
3760
3679
  },
3761
3680
  toJSONSchema(e) {
3762
- return va(this, {})(e);
3681
+ return ha(this, {})(e);
3763
3682
  },
3764
3683
  get description() {
3765
- return ii.get(this)?.description;
3684
+ return ei.get(this)?.description;
3766
3685
  },
3767
3686
  get _def() {
3768
3687
  return this._zod.def;
3769
3688
  }
3770
- }), No = /*@__PURE__*/ w("_ZodString", (e, t) => {
3771
- mn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
3689
+ }), Ao = /*@__PURE__*/ w("_ZodString", (e, t) => {
3690
+ mn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
3772
3691
  let n = e._zod.bag;
3773
3692
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
3774
3693
  }, {
3775
3694
  regex(...e) {
3776
- return this.check(/* @__PURE__ */ Ki(...e));
3695
+ return this.check(/* @__PURE__ */ Hi(...e));
3777
3696
  },
3778
3697
  includes(...e) {
3779
- return this.check(/* @__PURE__ */ Yi(...e));
3698
+ return this.check(/* @__PURE__ */ Gi(...e));
3780
3699
  },
3781
3700
  startsWith(...e) {
3782
- return this.check(/* @__PURE__ */ Xi(...e));
3701
+ return this.check(/* @__PURE__ */ Ki(...e));
3783
3702
  },
3784
3703
  endsWith(...e) {
3785
- return this.check(/* @__PURE__ */ Zi(...e));
3704
+ return this.check(/* @__PURE__ */ qi(...e));
3786
3705
  },
3787
3706
  min(...e) {
3788
- return this.check(/* @__PURE__ */ Wi(...e));
3707
+ return this.check(/* @__PURE__ */ Bi(...e));
3789
3708
  },
3790
3709
  max(...e) {
3791
- return this.check(/* @__PURE__ */ Ui(...e));
3710
+ return this.check(/* @__PURE__ */ zi(...e));
3792
3711
  },
3793
3712
  length(...e) {
3794
- return this.check(/* @__PURE__ */ Gi(...e));
3713
+ return this.check(/* @__PURE__ */ Vi(...e));
3795
3714
  },
3796
3715
  nonempty(...e) {
3797
- return this.check(/* @__PURE__ */ Wi(1, ...e));
3716
+ return this.check(/* @__PURE__ */ Bi(1, ...e));
3798
3717
  },
3799
3718
  lowercase(e) {
3800
- return this.check(/* @__PURE__ */ qi(e));
3719
+ return this.check(/* @__PURE__ */ Ui(e));
3801
3720
  },
3802
3721
  uppercase(e) {
3803
- return this.check(/* @__PURE__ */ Ji(e));
3722
+ return this.check(/* @__PURE__ */ Wi(e));
3804
3723
  },
3805
3724
  trim() {
3806
- return this.check(/* @__PURE__ */ $i());
3725
+ return this.check(/* @__PURE__ */ Xi());
3807
3726
  },
3808
3727
  normalize(...e) {
3809
- return this.check(/* @__PURE__ */ Qi(...e));
3728
+ return this.check(/* @__PURE__ */ Yi(...e));
3810
3729
  },
3811
3730
  toLowerCase() {
3812
- return this.check(/* @__PURE__ */ ea());
3731
+ return this.check(/* @__PURE__ */ Zi());
3813
3732
  },
3814
3733
  toUpperCase() {
3815
- return this.check(/* @__PURE__ */ ta());
3734
+ return this.check(/* @__PURE__ */ Qi());
3816
3735
  },
3817
3736
  slugify() {
3818
- return this.check(/* @__PURE__ */ na());
3737
+ return this.check(/* @__PURE__ */ $i());
3819
3738
  }
3820
- }), Po = /*@__PURE__*/ w("ZodString", (e, t) => {
3821
- mn.init(e, t), No.init(e, t);
3739
+ }), jo = /*@__PURE__*/ w("ZodString", (e, t) => {
3740
+ mn.init(e, t), Ao.init(e, t);
3822
3741
  }, {
3823
3742
  email(e) {
3824
- return this.check(/* @__PURE__ */ oi(zo, e));
3743
+ return this.check(/* @__PURE__ */ ni(Io, e));
3825
3744
  },
3826
3745
  url(e) {
3827
- return this.check(/* @__PURE__ */ fi(Ho, e));
3746
+ return this.check(/* @__PURE__ */ ci(zo, e));
3828
3747
  },
3829
3748
  jwt(e) {
3830
- return this.check(/* @__PURE__ */ Di(rs, e));
3749
+ return this.check(/* @__PURE__ */ Ci(es, e));
3831
3750
  },
3832
3751
  emoji(e) {
3833
- return this.check(/* @__PURE__ */ pi(Uo, e));
3752
+ return this.check(/* @__PURE__ */ li(Bo, e));
3834
3753
  },
3835
3754
  guid(e) {
3836
- return this.check(/* @__PURE__ */ si(Bo, e));
3755
+ return this.check(/* @__PURE__ */ ri(Lo, e));
3837
3756
  },
3838
3757
  uuid(e) {
3839
- return this.check(/* @__PURE__ */ ci(Vo, e));
3758
+ return this.check(/* @__PURE__ */ ii(Ro, e));
3840
3759
  },
3841
3760
  uuidv4(e) {
3842
- return this.check(/* @__PURE__ */ li(Vo, e));
3761
+ return this.check(/* @__PURE__ */ ai(Ro, e));
3843
3762
  },
3844
3763
  uuidv6(e) {
3845
- return this.check(/* @__PURE__ */ ui(Vo, e));
3764
+ return this.check(/* @__PURE__ */ oi(Ro, e));
3846
3765
  },
3847
3766
  uuidv7(e) {
3848
- return this.check(/* @__PURE__ */ di(Vo, e));
3767
+ return this.check(/* @__PURE__ */ si(Ro, e));
3849
3768
  },
3850
3769
  nanoid(e) {
3851
- return this.check(/* @__PURE__ */ mi(Wo, e));
3770
+ return this.check(/* @__PURE__ */ ui(Vo, e));
3852
3771
  },
3853
3772
  cuid(e) {
3854
- return this.check(/* @__PURE__ */ hi(Go, e));
3773
+ return this.check(/* @__PURE__ */ di(Ho, e));
3855
3774
  },
3856
3775
  cuid2(e) {
3857
- return this.check(/* @__PURE__ */ gi(Ko, e));
3776
+ return this.check(/* @__PURE__ */ fi(Uo, e));
3858
3777
  },
3859
3778
  ulid(e) {
3860
- return this.check(/* @__PURE__ */ _i(qo, e));
3779
+ return this.check(/* @__PURE__ */ pi(Wo, e));
3861
3780
  },
3862
3781
  base64(e) {
3863
- return this.check(/* @__PURE__ */ wi(es, e));
3782
+ return this.check(/* @__PURE__ */ bi(Zo, e));
3864
3783
  },
3865
3784
  base64url(e) {
3866
- return this.check(/* @__PURE__ */ Ti(ts, e));
3785
+ return this.check(/* @__PURE__ */ xi(Qo, e));
3867
3786
  },
3868
3787
  xid(e) {
3869
- return this.check(/* @__PURE__ */ vi(Jo, e));
3788
+ return this.check(/* @__PURE__ */ mi(Go, e));
3870
3789
  },
3871
3790
  ksuid(e) {
3872
- return this.check(/* @__PURE__ */ yi(Yo, e));
3791
+ return this.check(/* @__PURE__ */ hi(Ko, e));
3873
3792
  },
3874
3793
  ipv4(e) {
3875
- return this.check(/* @__PURE__ */ bi(Xo, e));
3794
+ return this.check(/* @__PURE__ */ gi(qo, e));
3876
3795
  },
3877
3796
  ipv6(e) {
3878
- return this.check(/* @__PURE__ */ xi(Zo, e));
3797
+ return this.check(/* @__PURE__ */ _i(Jo, e));
3879
3798
  },
3880
3799
  cidrv4(e) {
3881
- return this.check(/* @__PURE__ */ Si(Qo, e));
3800
+ return this.check(/* @__PURE__ */ vi(Yo, e));
3882
3801
  },
3883
3802
  cidrv6(e) {
3884
- return this.check(/* @__PURE__ */ Ci($o, e));
3803
+ return this.check(/* @__PURE__ */ yi(Xo, e));
3885
3804
  },
3886
3805
  e164(e) {
3887
- return this.check(/* @__PURE__ */ Ei(ns, e));
3806
+ return this.check(/* @__PURE__ */ Si($o, e));
3888
3807
  },
3889
3808
  datetime(e) {
3890
- return this.check(/* @__PURE__ */ Oi(Fo, e));
3809
+ return this.check(/* @__PURE__ */ wi(Mo, e));
3891
3810
  },
3892
3811
  date(e) {
3893
- return this.check(/* @__PURE__ */ ki(Io, e));
3812
+ return this.check(/* @__PURE__ */ Ti(No, e));
3894
3813
  },
3895
3814
  time(e) {
3896
- return this.check(/* @__PURE__ */ Ai(Lo, e));
3815
+ return this.check(/* @__PURE__ */ Ei(Po, e));
3897
3816
  },
3898
3817
  duration(e) {
3899
- return this.check(/* @__PURE__ */ ji(Ro, e));
3818
+ return this.check(/* @__PURE__ */ Di(Fo, e));
3900
3819
  }
3901
3820
  });
3902
- function I(e) {
3903
- return /* @__PURE__ */ ai(Po, e);
3904
- }
3905
- var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3906
- k.init(e, t), No.init(e, t);
3907
- }), Fo = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3908
- jn.init(e, t), L.init(e, t);
3909
- }), Io = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3910
- Mn.init(e, t), L.init(e, t);
3911
- }), Lo = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3912
- Nn.init(e, t), L.init(e, t);
3913
- }), Ro = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3914
- Pn.init(e, t), L.init(e, t);
3915
- }), zo = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3916
- _n.init(e, t), L.init(e, t);
3917
- }), Bo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3918
- hn.init(e, t), L.init(e, t);
3919
- }), Vo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3920
- gn.init(e, t), L.init(e, t);
3921
- }), Ho = /*@__PURE__*/ w("ZodURL", (e, t) => {
3922
- Cn.init(e, t), L.init(e, t);
3923
- }), Uo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3924
- wn.init(e, t), L.init(e, t);
3925
- }), Wo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3926
- Tn.init(e, t), L.init(e, t);
3927
- }), Go = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3928
- En.init(e, t), L.init(e, t);
3929
- }), Ko = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3930
- Dn.init(e, t), L.init(e, t);
3931
- }), qo = /*@__PURE__*/ w("ZodULID", (e, t) => {
3932
- On.init(e, t), L.init(e, t);
3933
- }), Jo = /*@__PURE__*/ w("ZodXID", (e, t) => {
3934
- kn.init(e, t), L.init(e, t);
3935
- }), Yo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3936
- An.init(e, t), L.init(e, t);
3937
- }), Xo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3938
- Fn.init(e, t), L.init(e, t);
3939
- }), Zo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3940
- Rn.init(e, t), L.init(e, t);
3941
- }), Qo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3942
- zn.init(e, t), L.init(e, t);
3943
- }), $o = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3944
- Vn.init(e, t), L.init(e, t);
3945
- }), es = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3946
- Un.init(e, t), L.init(e, t);
3947
- }), ts = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3948
- Gn.init(e, t), L.init(e, t);
3949
- }), ns = /*@__PURE__*/ w("ZodE164", (e, t) => {
3950
- Kn.init(e, t), L.init(e, t);
3951
- }), rs = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3952
- Jn.init(e, t), L.init(e, t);
3953
- }), is = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3954
- Yn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
3821
+ function F(e) {
3822
+ return /* @__PURE__ */ ti(jo, e);
3823
+ }
3824
+ var I = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3825
+ k.init(e, t), Ao.init(e, t);
3826
+ }), Mo = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3827
+ jn.init(e, t), I.init(e, t);
3828
+ }), No = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3829
+ Mn.init(e, t), I.init(e, t);
3830
+ }), Po = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3831
+ Nn.init(e, t), I.init(e, t);
3832
+ }), Fo = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3833
+ Pn.init(e, t), I.init(e, t);
3834
+ }), Io = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3835
+ _n.init(e, t), I.init(e, t);
3836
+ }), Lo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3837
+ hn.init(e, t), I.init(e, t);
3838
+ }), Ro = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3839
+ gn.init(e, t), I.init(e, t);
3840
+ }), zo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3841
+ Cn.init(e, t), I.init(e, t);
3842
+ }), Bo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3843
+ wn.init(e, t), I.init(e, t);
3844
+ }), Vo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3845
+ Tn.init(e, t), I.init(e, t);
3846
+ }), Ho = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3847
+ En.init(e, t), I.init(e, t);
3848
+ }), Uo = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3849
+ Dn.init(e, t), I.init(e, t);
3850
+ }), Wo = /*@__PURE__*/ w("ZodULID", (e, t) => {
3851
+ On.init(e, t), I.init(e, t);
3852
+ }), Go = /*@__PURE__*/ w("ZodXID", (e, t) => {
3853
+ kn.init(e, t), I.init(e, t);
3854
+ }), Ko = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3855
+ An.init(e, t), I.init(e, t);
3856
+ }), qo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3857
+ Fn.init(e, t), I.init(e, t);
3858
+ }), Jo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3859
+ Rn.init(e, t), I.init(e, t);
3860
+ }), Yo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3861
+ zn.init(e, t), I.init(e, t);
3862
+ }), Xo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3863
+ Vn.init(e, t), I.init(e, t);
3864
+ }), Zo = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3865
+ Un.init(e, t), I.init(e, t);
3866
+ }), Qo = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3867
+ Gn.init(e, t), I.init(e, t);
3868
+ }), $o = /*@__PURE__*/ w("ZodE164", (e, t) => {
3869
+ Kn.init(e, t), I.init(e, t);
3870
+ }), es = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3871
+ Jn.init(e, t), I.init(e, t);
3872
+ }), ts = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3873
+ Yn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
3955
3874
  let n = e._zod.bag;
3956
3875
  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;
3957
3876
  }, {
3958
3877
  gt(e, t) {
3959
- return this.check(/* @__PURE__ */ Bi(e, t));
3878
+ return this.check(/* @__PURE__ */ Ii(e, t));
3960
3879
  },
3961
3880
  gte(e, t) {
3962
- return this.check(/* @__PURE__ */ Vi(e, t));
3881
+ return this.check(/* @__PURE__ */ Li(e, t));
3963
3882
  },
3964
3883
  min(e, t) {
3965
- return this.check(/* @__PURE__ */ Vi(e, t));
3884
+ return this.check(/* @__PURE__ */ Li(e, t));
3966
3885
  },
3967
3886
  lt(e, t) {
3968
- return this.check(/* @__PURE__ */ Ri(e, t));
3887
+ return this.check(/* @__PURE__ */ Pi(e, t));
3969
3888
  },
3970
3889
  lte(e, t) {
3971
- return this.check(/* @__PURE__ */ zi(e, t));
3890
+ return this.check(/* @__PURE__ */ Fi(e, t));
3972
3891
  },
3973
3892
  max(e, t) {
3974
- return this.check(/* @__PURE__ */ zi(e, t));
3893
+ return this.check(/* @__PURE__ */ Fi(e, t));
3975
3894
  },
3976
3895
  int(e) {
3977
- return this.check(os(e));
3896
+ return this.check(rs(e));
3978
3897
  },
3979
3898
  safe(e) {
3980
- return this.check(os(e));
3899
+ return this.check(rs(e));
3981
3900
  },
3982
3901
  positive(e) {
3983
- return this.check(/* @__PURE__ */ Bi(0, e));
3902
+ return this.check(/* @__PURE__ */ Ii(0, e));
3984
3903
  },
3985
3904
  nonnegative(e) {
3986
- return this.check(/* @__PURE__ */ Vi(0, e));
3905
+ return this.check(/* @__PURE__ */ Li(0, e));
3987
3906
  },
3988
3907
  negative(e) {
3989
- return this.check(/* @__PURE__ */ Ri(0, e));
3908
+ return this.check(/* @__PURE__ */ Pi(0, e));
3990
3909
  },
3991
3910
  nonpositive(e) {
3992
- return this.check(/* @__PURE__ */ zi(0, e));
3911
+ return this.check(/* @__PURE__ */ Fi(0, e));
3993
3912
  },
3994
3913
  multipleOf(e, t) {
3995
- return this.check(/* @__PURE__ */ Hi(e, t));
3914
+ return this.check(/* @__PURE__ */ Ri(e, t));
3996
3915
  },
3997
3916
  step(e, t) {
3998
- return this.check(/* @__PURE__ */ Hi(e, t));
3917
+ return this.check(/* @__PURE__ */ Ri(e, t));
3999
3918
  },
4000
3919
  finite() {
4001
3920
  return this;
4002
3921
  }
4003
3922
  });
4004
- function R(e) {
4005
- return /* @__PURE__ */ Mi(is, e);
3923
+ function L(e) {
3924
+ return /* @__PURE__ */ Oi(ts, e);
4006
3925
  }
4007
- var as = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
4008
- Xn.init(e, t), is.init(e, t);
3926
+ var ns = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
3927
+ Xn.init(e, t), ts.init(e, t);
4009
3928
  });
4010
- function os(e) {
4011
- return /* @__PURE__ */ Ni(as, e);
3929
+ function rs(e) {
3930
+ return /* @__PURE__ */ ki(ns, e);
4012
3931
  }
4013
- var ss = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
4014
- Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
3932
+ var is = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
3933
+ Zn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
4015
3934
  });
4016
- function z(e) {
4017
- return /* @__PURE__ */ Pi(ss, e);
3935
+ function R(e) {
3936
+ return /* @__PURE__ */ Ai(is, e);
4018
3937
  }
4019
- var cs = /*@__PURE__*/ w("ZodNull", (e, t) => {
4020
- Qn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
3938
+ var as = /*@__PURE__*/ w("ZodNull", (e, t) => {
3939
+ Qn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
4021
3940
  });
4022
- function ls(e) {
4023
- return /* @__PURE__ */ Fi(cs, e);
3941
+ function os(e) {
3942
+ return /* @__PURE__ */ ji(as, e);
4024
3943
  }
4025
- var us = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
4026
- $n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3944
+ var ss = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
3945
+ $n.init(e, t), P.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
4027
3946
  });
4028
- function ds() {
4029
- return /* @__PURE__ */ Ii(us);
3947
+ function cs() {
3948
+ return /* @__PURE__ */ Mi(ss);
4030
3949
  }
4031
- var fs = /*@__PURE__*/ w("ZodNever", (e, t) => {
4032
- er.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r);
3950
+ var ls = /*@__PURE__*/ w("ZodNever", (e, t) => {
3951
+ er.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
4033
3952
  });
4034
- function ps(e) {
4035
- return /* @__PURE__ */ Li(fs, e);
3953
+ function us(e) {
3954
+ return /* @__PURE__ */ Ni(ls, e);
4036
3955
  }
4037
- var ms = /*@__PURE__*/ w("ZodArray", (e, t) => {
4038
- Mo(), nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.element = t.element;
3956
+ var ds = /*@__PURE__*/ w("ZodArray", (e, t) => {
3957
+ ko(), nr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.element = t.element;
4039
3958
  }, {
4040
3959
  min(e, t) {
4041
- return this.check(/* @__PURE__ */ Wi(e, t));
3960
+ return this.check(/* @__PURE__ */ Bi(e, t));
4042
3961
  },
4043
3962
  nonempty(e) {
4044
- return this.check(/* @__PURE__ */ Wi(1, e));
3963
+ return this.check(/* @__PURE__ */ Bi(1, e));
4045
3964
  },
4046
3965
  max(e, t) {
4047
- return this.check(/* @__PURE__ */ Ui(e, t));
3966
+ return this.check(/* @__PURE__ */ zi(e, t));
4048
3967
  },
4049
3968
  length(e, t) {
4050
- return this.check(/* @__PURE__ */ Gi(e, t));
3969
+ return this.check(/* @__PURE__ */ Vi(e, t));
4051
3970
  },
4052
3971
  unwrap() {
4053
3972
  return this.element;
4054
3973
  }
4055
3974
  });
4056
- function B(e, t) {
4057
- return /* @__PURE__ */ ra(ms, e, t);
3975
+ function z(e, t) {
3976
+ return /* @__PURE__ */ ea(ds, e, t);
4058
3977
  }
4059
- var hs = /*@__PURE__*/ w("ZodObject", (e, t) => {
4060
- Mo(), lr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
3978
+ var fs = /*@__PURE__*/ w("ZodObject", (e, t) => {
3979
+ ko(), lr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
4061
3980
  }, {
4062
3981
  keyof() {
4063
- return W(Object.keys(this._zod.def.shape));
3982
+ return U(Object.keys(this._zod.def.shape));
4064
3983
  },
4065
3984
  catchall(e) {
4066
3985
  return this.clone({
@@ -4071,19 +3990,19 @@ var hs = /*@__PURE__*/ w("ZodObject", (e, t) => {
4071
3990
  passthrough() {
4072
3991
  return this.clone({
4073
3992
  ...this._zod.def,
4074
- catchall: ds()
3993
+ catchall: cs()
4075
3994
  });
4076
3995
  },
4077
3996
  loose() {
4078
3997
  return this.clone({
4079
3998
  ...this._zod.def,
4080
- catchall: ds()
3999
+ catchall: cs()
4081
4000
  });
4082
4001
  },
4083
4002
  strict() {
4084
4003
  return this.clone({
4085
4004
  ...this._zod.def,
4086
- catchall: ps()
4005
+ catchall: us()
4087
4006
  });
4088
4007
  },
4089
4008
  strip() {
@@ -4108,104 +4027,74 @@ var hs = /*@__PURE__*/ w("ZodObject", (e, t) => {
4108
4027
  return le(this, e);
4109
4028
  },
4110
4029
  partial(...e) {
4111
- return pe(Ds, this, e[0]);
4030
+ return pe(Ss, this, e[0]);
4112
4031
  },
4113
4032
  exactPartial(...e) {
4114
- return pe(ks, this, e[0], "exactPartial");
4033
+ return pe(ws, this, e[0], "exactPartial");
4115
4034
  },
4116
4035
  required(...e) {
4117
- return me(Ls, this, e[0]);
4036
+ return me(Ms, this, e[0]);
4118
4037
  }
4119
4038
  });
4120
- function V(e, t) {
4121
- return new hs({
4039
+ function B(e, t) {
4040
+ return new fs({
4122
4041
  type: "object",
4123
4042
  shape: e ?? {},
4124
4043
  ...v(t)
4125
4044
  });
4126
4045
  }
4127
- function gs(e, t) {
4128
- return new hs({
4046
+ function ps(e, t) {
4047
+ return new fs({
4129
4048
  type: "object",
4130
4049
  shape: e,
4131
- catchall: ps(),
4050
+ catchall: us(),
4132
4051
  ...v(t)
4133
4052
  });
4134
4053
  }
4135
- var _s = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4136
- dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.options = t.options;
4054
+ var ms = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4055
+ dr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.options = t.options;
4137
4056
  });
4138
- function H(e, t) {
4139
- return new _s({
4057
+ function V(e, t) {
4058
+ return new ms({
4140
4059
  type: "union",
4141
4060
  options: e,
4142
4061
  ...v(t)
4143
4062
  });
4144
4063
  }
4145
- var vs = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4146
- fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r);
4064
+ var hs = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4065
+ fr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r);
4147
4066
  });
4148
- function ys(e, t) {
4149
- return new vs({
4067
+ function gs(e, t) {
4068
+ return new hs({
4150
4069
  type: "intersection",
4151
4070
  left: e,
4152
4071
  right: t
4153
4072
  });
4154
4073
  }
4155
- var bs = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4156
- Mo(), hr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r);
4157
- }, {
4158
- rest(e) {
4159
- return this.clone({
4160
- ...this._zod.def,
4161
- rest: e
4162
- });
4163
- },
4164
- partial() {
4165
- let e = this._zod.def;
4166
- if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
4167
- return this.clone({
4168
- ...e,
4169
- items: e.items.map((e) => new Ds({
4170
- type: "optional",
4171
- innerType: e
4172
- }))
4173
- });
4174
- }
4175
- });
4176
- function xs(e, t, n) {
4177
- let r = t instanceof O;
4178
- return new bs({
4179
- type: "tuple",
4180
- items: e,
4181
- rest: r ? t : null,
4182
- ...v(r ? n : t)
4183
- });
4184
- }
4185
- var Ss = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4186
- Mo(), yr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => $a(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4074
+ var _s = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4075
+ ko(), hr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4187
4076
  });
4188
- function U(e, t, n) {
4189
- return !t || !t._zod ? new Ss({
4077
+ function H(e, t, n) {
4078
+ return !t || !t._zod ? new _s({
4190
4079
  type: "record",
4191
- keyType: I(),
4080
+ keyType: F(),
4192
4081
  valueType: e,
4193
4082
  ...v(t)
4194
- }) : new Ss({
4083
+ }) : new _s({
4195
4084
  type: "record",
4196
4085
  keyType: e,
4197
4086
  valueType: t,
4198
4087
  ...v(n)
4199
4088
  });
4200
4089
  }
4201
- var Cs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4202
- br.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4090
+ var vs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4091
+ gr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4203
4092
  let n = new Set(Object.keys(t.entries));
4204
4093
  e.extract = (e, r) => {
4205
4094
  let i = {};
4206
4095
  for (let r of e) if (n.has(r)) i[r] = t.entries[r];
4207
4096
  else throw Error(`Key ${r} not found in enum`);
4208
- return new Cs({
4097
+ return new vs({
4209
4098
  ...t,
4210
4099
  checks: [],
4211
4100
  ...v(r),
@@ -4215,7 +4104,7 @@ var Cs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4215
4104
  let i = { ...t.entries };
4216
4105
  for (let t of e) if (n.has(t)) delete i[t];
4217
4106
  else throw Error(`Key ${t} not found in enum`);
4218
- return new Cs({
4107
+ return new vs({
4219
4108
  ...t,
4220
4109
  checks: [],
4221
4110
  ...v(r),
@@ -4223,28 +4112,28 @@ var Cs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4223
4112
  });
4224
4113
  };
4225
4114
  });
4226
- function W(e, t) {
4227
- return new Cs({
4115
+ function U(e, t) {
4116
+ return new vs({
4228
4117
  type: "enum",
4229
4118
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
4230
4119
  ...v(t)
4231
4120
  });
4232
4121
  }
4233
- var ws = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4234
- xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4122
+ var ys = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4123
+ _r.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4235
4124
  if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
4236
4125
  return t.values[0];
4237
4126
  } });
4238
4127
  });
4239
- function G(e, t) {
4240
- return new ws({
4128
+ function W(e, t) {
4129
+ return new ys({
4241
4130
  type: "literal",
4242
4131
  values: Array.isArray(e) ? e : [e],
4243
4132
  ...v(t)
4244
4133
  });
4245
4134
  }
4246
- var Ts = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4247
- Mo(), Sr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e._zod.parse = (n, r) => {
4135
+ var bs = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4136
+ ko(), vr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e._zod.parse = (n, r) => {
4248
4137
  if (r.direction === "backward") throw new Re(e.constructor.name);
4249
4138
  n.addIssue = (r) => {
4250
4139
  if (typeof r == "string") n.issues.push(Ce(r, n.value, t));
@@ -4257,44 +4146,44 @@ var Ts = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4257
4146
  return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
4258
4147
  };
4259
4148
  });
4260
- function Es(e) {
4261
- return new Ts({
4149
+ function xs(e) {
4150
+ return new bs({
4262
4151
  type: "transform",
4263
4152
  transform: e
4264
4153
  });
4265
4154
  }
4266
- var Ds = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4267
- wr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4155
+ var Ss = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4156
+ br.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4268
4157
  });
4269
- function Os(e) {
4270
- return new Ds({
4158
+ function Cs(e) {
4159
+ return new Ss({
4271
4160
  type: "optional",
4272
4161
  innerType: e
4273
4162
  });
4274
4163
  }
4275
- var ks = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4276
- Tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4164
+ var ws = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4165
+ xr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4277
4166
  });
4278
- function As(e) {
4279
- return new ks({
4167
+ function Ts(e) {
4168
+ return new ws({
4280
4169
  type: "optional",
4281
4170
  innerType: e
4282
4171
  });
4283
4172
  }
4284
- var js = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4285
- Er.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4173
+ var Es = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4174
+ Sr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4286
4175
  });
4287
- function Ms(e) {
4288
- return new js({
4176
+ function Ds(e) {
4177
+ return new Es({
4289
4178
  type: "nullable",
4290
4179
  innerType: e
4291
4180
  });
4292
4181
  }
4293
- var Ns = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4294
- Dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4182
+ var Os = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4183
+ Cr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4295
4184
  });
4296
- function Ps(e, t) {
4297
- return new Ns({
4185
+ function ks(e, t) {
4186
+ return new Os({
4298
4187
  type: "default",
4299
4188
  innerType: e,
4300
4189
  get defaultValue() {
@@ -4302,11 +4191,11 @@ function Ps(e, t) {
4302
4191
  }
4303
4192
  });
4304
4193
  }
4305
- var Fs = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4306
- kr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4194
+ var As = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4195
+ Tr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4307
4196
  });
4308
- function Is(e, t) {
4309
- return new Fs({
4197
+ function js(e, t) {
4198
+ return new As({
4310
4199
  type: "prefault",
4311
4200
  innerType: e,
4312
4201
  get defaultValue() {
@@ -4314,188 +4203,188 @@ function Is(e, t) {
4314
4203
  }
4315
4204
  });
4316
4205
  }
4317
- var Ls = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4318
- Ar.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4206
+ var Ms = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4207
+ Er.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4319
4208
  });
4320
- function Rs(e, t) {
4321
- return new Ls({
4209
+ function Ns(e, t) {
4210
+ return new Ms({
4322
4211
  type: "nonoptional",
4323
4212
  innerType: e,
4324
4213
  ...v(t)
4325
4214
  });
4326
4215
  }
4327
- var zs = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4328
- Nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4216
+ var Ps = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4217
+ kr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4329
4218
  });
4330
- function Bs(e, t) {
4331
- return new zs({
4219
+ function Fs(e, t) {
4220
+ return new Ps({
4332
4221
  type: "catch",
4333
4222
  innerType: e,
4334
4223
  catchValue: typeof t == "function" ? t : Me(t)
4335
4224
  });
4336
4225
  }
4337
- var Vs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4338
- Pr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.in = t.in, e.out = t.out;
4226
+ var Is = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4227
+ Ar.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.in = t.in, e.out = t.out;
4339
4228
  });
4340
- function Hs(e, t) {
4341
- return new Vs({
4229
+ function Ls(e, t) {
4230
+ return new Is({
4342
4231
  type: "pipe",
4343
4232
  in: e,
4344
4233
  out: t
4345
4234
  });
4346
4235
  }
4347
- var Us = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4348
- Ir.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => co(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4236
+ var Rs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4237
+ Mr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4349
4238
  });
4350
- function Ws(e) {
4351
- return new Us({
4239
+ function zs(e) {
4240
+ return new Rs({
4352
4241
  type: "readonly",
4353
4242
  innerType: e
4354
4243
  });
4355
4244
  }
4356
- var Gs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4357
- Rr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => fo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4245
+ var Bs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4246
+ Pr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => co(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4358
4247
  });
4359
- function Ks(e) {
4360
- return new Gs({
4248
+ function Vs(e) {
4249
+ return new Bs({
4361
4250
  type: "lazy",
4362
4251
  getter: e
4363
4252
  });
4364
4253
  }
4365
- var qs = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4366
- zr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r);
4254
+ var Hs = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4255
+ Fr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r);
4367
4256
  });
4368
- function Js(e, t = {}) {
4369
- return /* @__PURE__ */ ia(qs, e, t);
4257
+ function Us(e, t = {}) {
4258
+ return /* @__PURE__ */ ta(Hs, e, t);
4370
4259
  }
4371
- function Ys(e, t) {
4372
- return /* @__PURE__ */ aa(e, t);
4260
+ function Ws(e, t) {
4261
+ return /* @__PURE__ */ na(e, t);
4373
4262
  }
4374
- function Xs(e) {
4375
- let t = Ks(() => H([
4376
- I(e),
4263
+ function Gs(e) {
4264
+ let t = Vs(() => V([
4265
+ F(e),
4266
+ L(),
4377
4267
  R(),
4378
- z(),
4379
- ls(),
4380
- B(t),
4381
- U(I(), t)
4268
+ os(),
4269
+ z(t),
4270
+ H(F(), t)
4382
4271
  ]));
4383
4272
  return t;
4384
4273
  }
4385
- function Zs(e, t = 0) {
4274
+ function Ks(e, t = 0) {
4386
4275
  if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
4387
- if (typeof e == "object" && e) for (let n of Object.values(e)) Zs(n, t + 1);
4276
+ if (typeof e == "object" && e) for (let n of Object.values(e)) Ks(n, t + 1);
4388
4277
  }
4389
4278
  //#endregion
4390
4279
  //#region src/flow/common/triggerScheduleSchema.ts
4391
- var Qs = B(H([V({
4392
- type: G("cron"),
4393
- expression: I(),
4394
- timezone: I()
4395
- }), V({
4396
- type: G("every"),
4397
- unit: W([
4280
+ var qs = z(V([B({
4281
+ type: W("cron"),
4282
+ expression: F(),
4283
+ timezone: F()
4284
+ }), B({
4285
+ type: W("every"),
4286
+ unit: U([
4398
4287
  "day",
4399
4288
  "hour",
4400
4289
  "minute",
4401
4290
  "month",
4402
4291
  "week"
4403
4292
  ]),
4404
- value: R()
4405
- })])), K = I(), q = Xs(), $s = B(K), ec = V({
4406
- description: K.optional(),
4407
- jsonSchema: q,
4408
- nullable: z(),
4409
- handle: K
4410
- }), J = ec.extend({ value: q.optional() }), tc = V({
4411
- collapsed: z().optional(),
4412
- group: K
4413
- }), nc = V({
4414
- kind: G("node"),
4415
- nodeId: K,
4416
- output: K
4417
- }), rc = V({
4418
- kind: G("flow"),
4419
- input: K
4420
- }), ic = H([
4421
- nc,
4422
- rc,
4423
- V({
4424
- kind: G("binding"),
4425
- bindingId: K
4293
+ value: L()
4294
+ })])), G = F(), K = Gs(), Js = z(G), Ys = B({
4295
+ description: G.optional(),
4296
+ jsonSchema: K,
4297
+ nullable: R(),
4298
+ handle: G
4299
+ }), q = Ys.extend({ value: K.optional() }), Xs = B({
4300
+ collapsed: R().optional(),
4301
+ group: G
4302
+ }), Zs = B({
4303
+ kind: W("node"),
4304
+ nodeId: G,
4305
+ output: G
4306
+ }), Qs = B({
4307
+ kind: W("flow"),
4308
+ input: G
4309
+ }), $s = V([
4310
+ Zs,
4311
+ Qs,
4312
+ B({
4313
+ kind: W("binding"),
4314
+ bindingId: G
4426
4315
  })
4427
- ]), ac = H([V({
4428
- kind: G("value"),
4429
- value: q
4430
- }), V({
4431
- kind: G("sources"),
4432
- sources: B(ic)
4433
- })]), oc = U(K, ac), sc = {
4434
- inputs: B(H([J, tc])),
4435
- outputs: B(H([ec, tc]))
4436
- }, cc = V({
4437
- kind: G("connector"),
4438
- action: K,
4439
- connectionId: K.optional(),
4440
- connections: B(V({
4441
- connectionId: K,
4442
- alias: K.optional()
4316
+ ]), ec = V([B({
4317
+ kind: W("value"),
4318
+ value: K
4319
+ }), B({
4320
+ kind: W("sources"),
4321
+ sources: z($s)
4322
+ })]), tc = H(G, ec), nc = {
4323
+ inputs: z(V([q, Xs])),
4324
+ outputs: z(V([Ys, Xs]))
4325
+ }, rc = B({
4326
+ kind: W("connector"),
4327
+ action: G,
4328
+ connectionId: G.optional(),
4329
+ connections: z(B({
4330
+ connectionId: G,
4331
+ alias: G.optional()
4443
4332
  }))
4444
- }), lc = V({
4445
- ...sc,
4446
- name: K,
4447
- moduleId: K,
4448
- capabilities: B(cc).optional()
4449
- }), uc = H([V({
4450
- kind: G("value"),
4451
- value: q
4452
- }), V({
4453
- kind: G("input"),
4454
- input: K
4455
- })]), dc = H([uc, V({ kind: G("model") })]), fc = V({
4456
- ...sc,
4457
- name: K,
4458
- executor: H([
4459
- V({
4460
- kind: G("connector"),
4461
- action: K,
4462
- connectionId: K.optional()
4333
+ }), ic = B({
4334
+ ...nc,
4335
+ name: G,
4336
+ moduleId: G,
4337
+ capabilities: z(rc).optional()
4338
+ }), ac = V([B({
4339
+ kind: W("value"),
4340
+ value: K
4341
+ }), B({
4342
+ kind: W("input"),
4343
+ input: G
4344
+ })]), oc = V([ac, B({ kind: W("model") })]), sc = B({
4345
+ ...nc,
4346
+ name: G,
4347
+ executor: V([
4348
+ B({
4349
+ kind: W("connector"),
4350
+ action: G,
4351
+ connectionId: G.optional()
4463
4352
  }),
4464
- V({
4465
- kind: G("llm"),
4466
- mode: W(["chat", "json"])
4353
+ B({
4354
+ kind: W("llm"),
4355
+ mode: U(["chat", "json"])
4467
4356
  }),
4468
- V({
4469
- kind: G("agent"),
4470
- code: z().optional(),
4471
- model: K,
4472
- prompt: uc,
4473
- system: K,
4474
- maxRounds: R(),
4475
- tools: B(V({
4476
- id: K,
4477
- name: K,
4478
- description: K,
4479
- action: K,
4480
- connectionId: K.optional(),
4481
- approval: z(),
4482
- inputs: B(J.extend({ source: dc }))
4357
+ B({
4358
+ kind: W("agent"),
4359
+ code: R().optional(),
4360
+ model: G,
4361
+ prompt: ac,
4362
+ system: G,
4363
+ maxRounds: L(),
4364
+ tools: z(B({
4365
+ id: G,
4366
+ name: G,
4367
+ description: G,
4368
+ action: G,
4369
+ connectionId: G.optional(),
4370
+ approval: R(),
4371
+ inputs: z(q.extend({ source: oc }))
4483
4372
  })),
4484
- notification: V({
4485
- taskId: K,
4486
- messageHandle: K,
4487
- inputs: U(K, uc)
4373
+ notification: B({
4374
+ taskId: G,
4375
+ messageHandle: G,
4376
+ inputs: H(G, ac)
4488
4377
  }).optional()
4489
4378
  })
4490
4379
  ])
4491
- }), pc = {
4492
- input: J,
4493
- cases: B(V({
4494
- output: K,
4495
- relation: W(["all", "any"]),
4496
- expressions: B(V({
4497
- input: K,
4498
- operator: W([
4380
+ }), cc = {
4381
+ input: q,
4382
+ cases: z(B({
4383
+ output: G,
4384
+ relation: U(["all", "any"]),
4385
+ expressions: z(B({
4386
+ input: G,
4387
+ operator: U([
4499
4388
  "!=",
4500
4389
  "<",
4501
4390
  "<=",
@@ -4517,44 +4406,41 @@ var Qs = B(H([V({
4517
4406
  "notHasValue",
4518
4407
  "startsWith"
4519
4408
  ]),
4520
- value: q.optional()
4409
+ value: K.optional()
4521
4410
  }))
4522
4411
  })),
4523
- defaultOutput: K.optional()
4524
- }, mc = {
4525
- actions: H([xs([G("continue")]), xs([G("approve"), G("reject")])]),
4526
- prompt: K
4527
- }, hc = {
4528
- bodyFields: B(J),
4529
- options: V({
4530
- allowedMethods: $s.optional(),
4531
- allowedOrigins: $s.optional(),
4532
- noResponseBody: z().optional(),
4533
- responseData: K.optional(),
4534
- responseHeaders: U(K, K).optional(),
4535
- responseStatusCode: R().optional()
4412
+ defaultOutput: G.optional()
4413
+ }, lc = { prompt: G }, uc = {
4414
+ bodyFields: z(q),
4415
+ options: B({
4416
+ allowedMethods: Js.optional(),
4417
+ allowedOrigins: Js.optional(),
4418
+ noResponseBody: R().optional(),
4419
+ responseData: G.optional(),
4420
+ responseHeaders: H(G, G).optional(),
4421
+ responseStatusCode: L().optional()
4536
4422
  }).optional()
4537
- }, gc = {
4538
- configSchema: q,
4539
- definitionVersion: G(2),
4540
- description: K,
4541
- displayName: K,
4542
- key: K,
4543
- name: K,
4544
- outputs: B(ec).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4545
- provider: K
4546
- }, _c = V({
4547
- body: V({
4548
- allowArray: z(),
4549
- allowEmpty: z(),
4550
- formats: B(W([
4423
+ }, dc = {
4424
+ configSchema: K,
4425
+ definitionVersion: W(2),
4426
+ description: G,
4427
+ displayName: G,
4428
+ key: G,
4429
+ name: G,
4430
+ outputs: z(Ys).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4431
+ provider: G
4432
+ }, fc = B({
4433
+ body: B({
4434
+ allowArray: R(),
4435
+ allowEmpty: R(),
4436
+ formats: z(U([
4551
4437
  "form",
4552
4438
  "json",
4553
4439
  "multipart",
4554
4440
  "text"
4555
4441
  ]))
4556
4442
  }),
4557
- methods: B(W([
4443
+ methods: z(U([
4558
4444
  "DELETE",
4559
4445
  "GET",
4560
4446
  "HEAD",
@@ -4562,316 +4448,322 @@ var Qs = B(H([V({
4562
4448
  "POST",
4563
4449
  "PUT"
4564
4450
  ])),
4565
- successStatus: R()
4566
- }), vc = {
4567
- name: K,
4568
- description: K.optional(),
4569
- icon: K.optional()
4570
- }, yc = {
4571
- maxExecutions: R().int().positive().max(2 ** 53 - 1).optional(),
4572
- inputs: oc,
4573
- name: K.optional(),
4574
- description: K.optional(),
4575
- icon: K.optional(),
4576
- timeoutMs: R().optional()
4577
- }, bc = H([
4578
- V({
4579
- ...yc,
4580
- kind: G("condition"),
4581
- ...pc
4451
+ successStatus: L()
4452
+ }), pc = {
4453
+ name: G,
4454
+ description: G.optional(),
4455
+ icon: G.optional()
4456
+ }, J = {
4457
+ maxExecutions: L().int().positive().max(2 ** 53 - 1).optional(),
4458
+ inputs: tc,
4459
+ name: G.optional(),
4460
+ description: G.optional(),
4461
+ icon: G.optional(),
4462
+ timeoutMs: L().optional()
4463
+ }, mc = V([
4464
+ B({
4465
+ ...J,
4466
+ kind: W("condition"),
4467
+ ...cc
4582
4468
  }),
4583
- V({
4584
- ...yc,
4585
- inputs: ds().transform(() => ({})).default({}),
4586
- kind: G("value"),
4587
- values: B(J)
4469
+ B({
4470
+ ...J,
4471
+ inputs: cs().transform(() => ({})).default({}),
4472
+ kind: W("value"),
4473
+ values: z(q)
4588
4474
  }),
4589
- V({
4590
- ...yc,
4591
- kind: G("subflow"),
4592
- subflowId: K
4475
+ B({
4476
+ ...J,
4477
+ kind: W("subflow"),
4478
+ subflowId: G
4593
4479
  }),
4594
- V({
4595
- ...yc,
4596
- kind: G("task"),
4597
- task: lc,
4598
- additionalInputs: B(J).optional()
4480
+ B({
4481
+ ...J,
4482
+ kind: W("task"),
4483
+ task: ic,
4484
+ additionalInputs: z(q).optional()
4599
4485
  }),
4600
- V({
4601
- ...yc,
4602
- kind: G("task"),
4603
- taskId: K,
4604
- additionalInputs: B(J).optional()
4486
+ B({
4487
+ ...J,
4488
+ kind: W("task"),
4489
+ taskId: G,
4490
+ additionalInputs: z(q).optional()
4605
4491
  }),
4606
- gs({
4607
- ...yc,
4608
- kind: G("wait"),
4609
- input: J,
4610
- ...mc
4492
+ ps({
4493
+ ...J,
4494
+ kind: W("approval"),
4495
+ input: q,
4496
+ ...lc
4611
4497
  }).omit({ timeoutMs: !0 }),
4612
- V({
4613
- ...vc,
4614
- kind: G("manual")
4498
+ ps({
4499
+ ...J,
4500
+ kind: W("wait"),
4501
+ input: q,
4502
+ ...lc
4503
+ }).omit({ timeoutMs: !0 }),
4504
+ B({
4505
+ ...pc,
4506
+ kind: W("manual")
4615
4507
  }),
4616
- V({
4617
- ...vc,
4618
- kind: G("webhook"),
4619
- ...hc
4508
+ B({
4509
+ ...pc,
4510
+ kind: W("webhook"),
4511
+ ...uc
4620
4512
  }),
4621
- V({
4622
- ...vc,
4623
- kind: G("cron"),
4624
- cronTimes: Qs
4513
+ B({
4514
+ ...pc,
4515
+ kind: W("cron"),
4516
+ cronTimes: qs
4625
4517
  }),
4626
- V({
4627
- ...vc,
4628
- kind: G("poll"),
4629
- bindingId: K,
4630
- config: U(K, q),
4631
- definition: V({
4632
- ...gc,
4633
- type: G("poll")
4518
+ B({
4519
+ ...pc,
4520
+ kind: W("poll"),
4521
+ bindingId: G,
4522
+ config: H(G, K),
4523
+ definition: B({
4524
+ ...dc,
4525
+ type: W("poll")
4634
4526
  }),
4635
- pollTimes: Qs
4527
+ pollTimes: qs
4636
4528
  }),
4637
- V({
4638
- ...vc,
4639
- kind: G("integration"),
4640
- bindingId: K,
4641
- config: U(K, q),
4642
- definition: V({
4643
- ...gc,
4644
- type: G("integration"),
4645
- endpoint: _c
4529
+ B({
4530
+ ...pc,
4531
+ kind: W("integration"),
4532
+ bindingId: G,
4533
+ config: H(G, K),
4534
+ definition: B({
4535
+ ...dc,
4536
+ type: W("integration"),
4537
+ endpoint: fc
4646
4538
  })
4647
4539
  })
4648
- ]), xc = H([V({ kind: G("flow") }), V({
4649
- kind: G("subflow"),
4650
- id: K
4651
- })]), Sc = V({
4652
- source: K,
4653
- target: K,
4654
- sourceHandle: K.optional()
4540
+ ]), hc = V([B({ kind: W("flow") }), B({
4541
+ kind: W("subflow"),
4542
+ id: G
4543
+ })]), gc = B({
4544
+ source: G,
4545
+ target: G,
4546
+ sourceHandle: G.optional()
4655
4547
  }), Y = {
4656
- nodeId: K,
4657
- target: xc
4658
- }, Cc = V({
4659
- name: K,
4660
- inputs: B(J),
4661
- outputs: B(ec.extend({ sources: B(H([nc, rc])) }))
4662
- }), wc = V({
4663
- nodes: U(K, bc),
4664
- edges: B(Sc).default([])
4665
- }), Tc = V({
4666
- kind: W(["connection", "variable"]),
4667
- target: K
4668
- }), Ec = V({
4669
- name: K,
4670
- imports: $s,
4671
- source: K
4672
- }), Dc = V({
4673
- bindings: U(K, Tc),
4674
- graph: wc,
4675
- subflows: U(K, Cc.extend({ graph: wc })),
4676
- tasks: U(K, fc)
4548
+ nodeId: G,
4549
+ target: hc
4550
+ }, _c = B({
4551
+ name: G,
4552
+ inputs: z(q),
4553
+ outputs: z(Ys.extend({ sources: z(V([Zs, Qs])) }))
4554
+ }), vc = B({
4555
+ nodes: H(G, mc),
4556
+ edges: z(gc).default([])
4557
+ }), yc = B({
4558
+ kind: U(["connection", "variable"]),
4559
+ target: G
4560
+ }), bc = B({
4561
+ name: G,
4562
+ imports: Js,
4563
+ source: G
4564
+ }), xc = B({
4565
+ bindings: H(G, yc),
4566
+ graph: vc,
4567
+ subflows: H(G, _c.extend({ graph: vc })),
4568
+ tasks: H(G, sc)
4677
4569
  });
4678
- V({
4679
- modelVersion: G(2),
4680
- document: Dc,
4681
- modules: U(K, Ec)
4570
+ B({
4571
+ modelVersion: W(2),
4572
+ document: xc,
4573
+ modules: H(G, bc)
4682
4574
  }).extend({
4683
- kind: G("open-flow-flow-revision"),
4684
- version: G(1)
4575
+ kind: W("open-flow-flow-revision"),
4576
+ version: W(1)
4685
4577
  });
4686
- var Oc = {
4578
+ var Sc = {
4687
4579
  "binding.create": {
4688
- bindingId: K,
4689
- binding: Tc
4580
+ bindingId: G,
4581
+ binding: yc
4690
4582
  },
4691
- "binding.delete": { bindingId: K },
4583
+ "binding.delete": { bindingId: G },
4692
4584
  "binding.target.set": {
4693
- bindingId: K,
4694
- before: K,
4695
- value: K
4585
+ bindingId: G,
4586
+ before: G,
4587
+ value: G
4696
4588
  },
4697
4589
  "graph.edge.connect": {
4698
- target: xc,
4699
- edge: Sc
4590
+ target: hc,
4591
+ edge: gc
4700
4592
  },
4701
4593
  "graph.edge.disconnect": {
4702
- target: xc,
4703
- edge: Sc
4594
+ target: hc,
4595
+ edge: gc
4704
4596
  },
4705
4597
  "graph.node.create": {
4706
4598
  ...Y,
4707
- node: bc
4599
+ node: mc
4708
4600
  },
4709
4601
  "graph.node.delete": Y,
4710
- "graph.node.field.set": H([
4711
- V({
4602
+ "graph.node.field.set": V([
4603
+ B({
4712
4604
  ...Y,
4713
- kind: G("graph.node.field.set"),
4714
- field: W([
4605
+ kind: W("graph.node.field.set"),
4606
+ field: U([
4715
4607
  "description",
4716
4608
  "icon",
4717
4609
  "name"
4718
4610
  ]),
4719
- before: K.optional(),
4720
- value: K.optional()
4611
+ before: G.optional(),
4612
+ value: G.optional()
4721
4613
  }),
4722
- V({
4614
+ B({
4723
4615
  ...Y,
4724
- kind: G("graph.node.field.set"),
4725
- field: G("maxExecutions"),
4726
- before: R().int().positive().max(2 ** 53 - 1).optional(),
4727
- value: R().int().positive().max(2 ** 53 - 1).optional()
4616
+ kind: W("graph.node.field.set"),
4617
+ field: W("maxExecutions"),
4618
+ before: L().int().positive().max(2 ** 53 - 1).optional(),
4619
+ value: L().int().positive().max(2 ** 53 - 1).optional()
4728
4620
  }),
4729
- V({
4621
+ B({
4730
4622
  ...Y,
4731
- kind: G("graph.node.field.set"),
4732
- field: G("timeoutMs"),
4733
- before: R().optional(),
4734
- value: R().optional()
4623
+ kind: W("graph.node.field.set"),
4624
+ field: W("timeoutMs"),
4625
+ before: L().optional(),
4626
+ value: L().optional()
4735
4627
  })
4736
4628
  ]),
4737
4629
  "graph.node.input.set": {
4738
4630
  ...Y,
4739
- handle: K,
4740
- before: ac.optional(),
4741
- value: ac.optional()
4631
+ handle: G,
4632
+ before: ec.optional(),
4633
+ value: ec.optional()
4742
4634
  },
4743
4635
  "graph.node.additional-inputs.set": {
4744
4636
  ...Y,
4745
- before: B(J).optional(),
4746
- value: B(J).optional()
4637
+ before: z(q).optional(),
4638
+ value: z(q).optional()
4747
4639
  },
4748
4640
  "graph.node.condition.set": {
4749
4641
  ...Y,
4750
- before: V(pc),
4751
- value: V(pc)
4642
+ before: B(cc),
4643
+ value: B(cc)
4752
4644
  },
4753
4645
  "graph.node.values.set": {
4754
4646
  ...Y,
4755
- before: B(J),
4756
- value: B(J)
4647
+ before: z(q),
4648
+ value: z(q)
4757
4649
  },
4758
- "graph.node.wait.set": {
4650
+ "graph.node.resolution.set": {
4759
4651
  ...Y,
4760
- target: V({ kind: G("flow") }),
4761
- before: V(mc),
4762
- value: V(mc)
4652
+ target: B({ kind: W("flow") }),
4653
+ before: B(lc),
4654
+ value: B(lc)
4763
4655
  },
4764
4656
  "graph.node.webhook.set": {
4765
4657
  ...Y,
4766
- target: V({ kind: G("flow") }),
4767
- before: V(hc),
4768
- value: V(hc)
4658
+ target: B({ kind: W("flow") }),
4659
+ before: B(uc),
4660
+ value: B(uc)
4769
4661
  },
4770
4662
  "graph.node.task.ports.set": {
4771
4663
  ...Y,
4772
- before: V(sc),
4773
- value: V(sc)
4664
+ before: B(nc),
4665
+ value: B(nc)
4774
4666
  },
4775
4667
  "graph.node.task.name.set": {
4776
4668
  ...Y,
4777
- before: K,
4778
- value: K
4669
+ before: G,
4670
+ value: G
4779
4671
  },
4780
4672
  "graph.node.task.capabilities.set": {
4781
4673
  ...Y,
4782
- before: B(cc).optional(),
4783
- value: B(cc).optional()
4674
+ before: z(rc).optional(),
4675
+ value: z(rc).optional()
4784
4676
  },
4785
4677
  "graph.trigger.config.set": {
4786
- nodeId: K,
4787
- name: K,
4788
- before: q.optional(),
4789
- value: q.optional()
4678
+ nodeId: G,
4679
+ name: G,
4680
+ before: K.optional(),
4681
+ value: K.optional()
4790
4682
  },
4791
4683
  "graph.trigger.schedule.set": {
4792
- nodeId: K,
4793
- before: Qs,
4794
- value: Qs
4684
+ nodeId: G,
4685
+ before: qs,
4686
+ value: qs
4795
4687
  },
4796
4688
  "module.create": {
4797
- moduleId: K,
4798
- module: Ec
4689
+ moduleId: G,
4690
+ module: bc
4799
4691
  },
4800
- "module.delete": { moduleId: K },
4692
+ "module.delete": { moduleId: G },
4801
4693
  "module.rename": {
4802
- moduleId: K,
4803
- before: K,
4804
- name: K
4694
+ moduleId: G,
4695
+ before: G,
4696
+ name: G
4805
4697
  },
4806
4698
  "module.source.replace": {
4807
- moduleId: K,
4808
- beforeImports: $s,
4809
- beforeSource: K,
4810
- imports: $s,
4811
- source: K
4699
+ moduleId: G,
4700
+ beforeImports: Js,
4701
+ beforeSource: G,
4702
+ imports: Js,
4703
+ source: G
4812
4704
  },
4813
4705
  "subflow.create": {
4814
- subflowId: K,
4815
- subflow: Cc.extend({ graph: wc })
4706
+ subflowId: G,
4707
+ subflow: _c.extend({ graph: vc })
4816
4708
  },
4817
4709
  "subflow.definition.set": {
4818
- subflowId: K,
4819
- before: Cc,
4820
- definition: Cc
4710
+ subflowId: G,
4711
+ before: _c,
4712
+ definition: _c
4821
4713
  },
4822
- "subflow.delete": { subflowId: K },
4714
+ "subflow.delete": { subflowId: G },
4823
4715
  "task.create": {
4824
- taskId: K,
4825
- task: fc
4716
+ taskId: G,
4717
+ task: sc
4826
4718
  },
4827
- "task.delete": { taskId: K },
4719
+ "task.delete": { taskId: G },
4828
4720
  "task.connector.connection.set": {
4829
- taskId: K,
4830
- before: K.optional(),
4831
- value: K.optional()
4721
+ taskId: G,
4722
+ before: G.optional(),
4723
+ value: G.optional()
4832
4724
  },
4833
4725
  "task.agent.set": {
4834
- taskId: K,
4835
- before: fc,
4836
- value: fc
4726
+ taskId: G,
4727
+ before: sc,
4728
+ value: sc
4837
4729
  },
4838
4730
  "task.llm.mode.set": {
4839
- taskId: K,
4840
- before: W(["chat", "json"]),
4841
- value: W(["chat", "json"])
4731
+ taskId: G,
4732
+ before: U(["chat", "json"]),
4733
+ value: U(["chat", "json"])
4842
4734
  },
4843
4735
  "task.name.set": {
4844
- taskId: K,
4845
- before: K,
4846
- value: K
4736
+ taskId: G,
4737
+ before: G,
4738
+ value: G
4847
4739
  }
4848
- }, kc = new Map(Object.entries(Oc).map(([e, t]) => [e, t instanceof F ? t : V({
4849
- kind: G(e),
4740
+ }, Cc = new Map(Object.entries(Sc).map(([e, t]) => [e, t instanceof P ? t : B({
4741
+ kind: W(e),
4850
4742
  ...t
4851
- })])), Ac = B(H([...kc.values()])).min(1);
4852
- function jc(e, t, n) {
4743
+ })])), wc = z(V([...Cc.values()])).min(1);
4744
+ function Tc(e, t, n) {
4853
4745
  try {
4854
4746
  return n(e);
4855
4747
  } catch (e) {
4856
- throw e instanceof vo ? TypeError(`operations[${t}]: ${e.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`, { cause: e }) : e;
4748
+ throw e instanceof ho ? TypeError(`operations[${t}]: ${e.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`, { cause: e }) : e;
4857
4749
  }
4858
4750
  }
4859
- function Mc(e, t) {
4860
- let { kind: n } = jc(e, t, V({ kind: K }).parse), r = kc.get(n);
4751
+ function Ec(e, t) {
4752
+ let { kind: n } = Tc(e, t, B({ kind: G }).parse), r = Cc.get(n);
4861
4753
  if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
4862
- return jc(e, t, r.parse);
4754
+ return Tc(e, t, r.parse);
4863
4755
  }
4864
- function Nc(e) {
4865
- return Zs(e), B(ds()).min(1).parse(e).map(Mc);
4756
+ function Dc(e) {
4757
+ return Ks(e), z(cs()).min(1).parse(e).map(Ec);
4866
4758
  }
4867
- function Pc(e) {
4868
- let t = e == null ? Ac : kc.get(e);
4759
+ function Oc(e) {
4760
+ let t = e == null ? wc : Cc.get(e);
4869
4761
  if (t == null) throw TypeError(`Unknown operation ${JSON.stringify(e)}.`);
4870
- return mo(t, { io: "input" });
4762
+ return uo(t, { io: "input" });
4871
4763
  }
4872
4764
  //#endregion
4873
4765
  //#region src/flow/common/change.ts
4874
- var Fc = /* @__PURE__ */ new Set([
4766
+ var kc = /* @__PURE__ */ new Set([
4875
4767
  "const",
4876
4768
  "enum",
4877
4769
  "exclusiveMaximum",
@@ -4889,11 +4781,11 @@ var Fc = /* @__PURE__ */ new Set([
4889
4781
  "required",
4890
4782
  "type"
4891
4783
  ]);
4892
- function Ic(e) {
4893
- return Fc.has(e);
4784
+ function Ac(e) {
4785
+ return kc.has(e);
4894
4786
  }
4895
- var Lc = 80;
4896
- function Rc(e) {
4787
+ var jc = 80;
4788
+ function Mc(e) {
4897
4789
  let t = e.trim();
4898
4790
  if (t.length == 0) return "empty";
4899
4791
  if (t.length > 80) return "tooLong";
@@ -4903,13 +4795,13 @@ function Rc(e) {
4903
4795
  }
4904
4796
  if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(t)) return "specialCharacter";
4905
4797
  }
4906
- function zc(e) {
4798
+ function Nc(e) {
4907
4799
  return e.length <= 256 && /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) && e.slice(0, 3).toUpperCase() != "OO_";
4908
4800
  }
4909
- function Bc(e) {
4801
+ function Pc(e) {
4910
4802
  return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
4911
4803
  }
4912
- function Vc(e) {
4804
+ function Fc(e) {
4913
4805
  if (!Array.isArray(e)) throw TypeError("Connector capabilities must be an array.");
4914
4806
  let t = /* @__PURE__ */ new Set();
4915
4807
  return e.map((e) => {
@@ -4948,24 +4840,24 @@ function Vc(e) {
4948
4840
  function X(e) {
4949
4841
  return e.trim().normalize("NFC");
4950
4842
  }
4951
- function Hc(e, t) {
4843
+ function Ic(e, t) {
4952
4844
  let n = X(e), r = new Set([...t].map(X));
4953
4845
  if (!r.has(n)) return n;
4954
4846
  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;
4955
4847
  for (; r.has(`${s} (${c})`);) c += 1;
4956
4848
  return `${s} (${c})`;
4957
4849
  }
4958
- function Uc(e, t, n) {
4850
+ function Lc(e, t, n) {
4959
4851
  let r = X(n);
4960
4852
  return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null && X(n.name) == r) ? "duplicate" : void 0;
4961
4853
  }
4962
- var Wc = class extends Error {
4854
+ var Rc = class extends Error {
4963
4855
  constructor(e) {
4964
4856
  super(e), this.name = "FlowChangeError";
4965
4857
  }
4966
4858
  };
4967
4859
  function Z(e) {
4968
- throw new Wc(e);
4860
+ throw new Rc(e);
4969
4861
  }
4970
4862
  function Q(e, t) {
4971
4863
  if (t.kind == "flow") return e.graph;
@@ -4989,23 +4881,7 @@ function $(e, t, n) {
4989
4881
  }
4990
4882
  };
4991
4883
  }
4992
- function Gc(e, t) {
4993
- if (!("inputs" in e)) return e;
4994
- let n = { ...e.inputs };
4995
- for (let [e, r] of Object.entries(n)) {
4996
- if (r.kind != "sources") continue;
4997
- let i = r.sources.filter((e) => e.kind != "node" || !t.has(e.nodeId));
4998
- i.length == 0 ? delete n[e] : n[e] = {
4999
- kind: "sources",
5000
- sources: i
5001
- };
5002
- }
5003
- return {
5004
- ...e,
5005
- inputs: n
5006
- };
5007
- }
5008
- function Kc(e, n) {
4884
+ function zc(e, n) {
5009
4885
  let r = { ...e.document }, i = { ...e.modules };
5010
4886
  for (let e of n) switch (e.kind) {
5011
4887
  case "binding.create":
@@ -5086,8 +4962,8 @@ function Kc(e, n) {
5086
4962
  }
5087
4963
  case "graph.node.create": {
5088
4964
  let t = Q(r, e.target);
5089
- t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Vc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
5090
- let n = X(e.node.name), i = Uc(t, e.nodeId, n);
4965
+ t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Fc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
4966
+ let n = X(e.node.name), i = Lc(t, e.nodeId, n);
5091
4967
  i == "empty" && Z("A Node name cannot be empty."), i == "duplicate" && Z("A Node with this name already exists in the target graph.");
5092
4968
  let a = n == e.node.name ? e.node : {
5093
4969
  ...e.node,
@@ -5105,24 +4981,12 @@ function Kc(e, n) {
5105
4981
  case "graph.node.delete": {
5106
4982
  let t = Q(r, e.target);
5107
4983
  t.nodes[e.nodeId] ?? Z("The Node does not exist in the target graph.");
5108
- let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => n.has(e) ? [] : [[e, Gc(t, n)]]));
5109
- if (Object.assign(r, $(r, e.target, {
4984
+ let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).filter(([e]) => !n.has(e)));
4985
+ Object.assign(r, $(r, e.target, {
5110
4986
  ...t,
5111
4987
  edges: t.edges.filter((e) => !n.has(e.source) && !n.has(e.target)),
5112
4988
  nodes: i
5113
- })), e.target.kind == "subflow") {
5114
- let t = r.subflows[e.target.id], i = t.outputs.map((e) => ({
5115
- ...e,
5116
- sources: e.sources.filter((e) => e.kind != "node" || !n.has(e.nodeId))
5117
- }));
5118
- r.subflows = {
5119
- ...r.subflows,
5120
- [e.target.id]: {
5121
- ...t,
5122
- outputs: i
5123
- }
5124
- };
5125
- }
4989
+ }));
5126
4990
  break;
5127
4991
  }
5128
4992
  case "graph.node.field.set": {
@@ -5131,7 +4995,7 @@ function Kc(e, n) {
5131
4995
  let a = { ...i };
5132
4996
  if (e.field == "name") {
5133
4997
  typeof e.value != "string" && Z("A Node name cannot be empty.");
5134
- let t = X(e.value), r = Uc(n, e.nodeId, t);
4998
+ let t = X(e.value), r = Lc(n, e.nodeId, t);
5135
4999
  r == "empty" && Z("A Node name cannot be empty."), r == "duplicate" && Z("A Node with this name already exists in the target graph."), Object.assign(a, { name: t });
5136
5000
  } else e.value == null ? Reflect.deleteProperty(a, e.field) : Object.assign(a, { [e.field]: e.value });
5137
5001
  Object.assign(r, $(r, e.target, {
@@ -5163,7 +5027,7 @@ function Kc(e, n) {
5163
5027
  let n = Q(r, e.target), i = n.nodes[e.nodeId];
5164
5028
  (i?.kind != "task" || i.task == null) && Z("The inline Task Node does not exist."), t(i.task.capabilities, e.before) || Z("The inline Task capabilities changed before this operation was applied.");
5165
5029
  let a = { ...i.task };
5166
- e.value === void 0 ? delete a.capabilities : a.capabilities = Vc(e.value), Object.assign(r, $(r, e.target, {
5030
+ e.value === void 0 ? delete a.capabilities : a.capabilities = Fc(e.value), Object.assign(r, $(r, e.target, {
5167
5031
  ...n,
5168
5032
  nodes: {
5169
5033
  ...n.nodes,
@@ -5231,12 +5095,9 @@ function Kc(e, n) {
5231
5095
  }));
5232
5096
  break;
5233
5097
  }
5234
- case "graph.node.wait.set": {
5098
+ case "graph.node.resolution.set": {
5235
5099
  let n = r.graph, i = n.nodes[e.nodeId];
5236
- (i?.kind != "wait" || !t({
5237
- actions: i.actions,
5238
- prompt: i.prompt
5239
- }, e.before)) && Z("The Wait Node changed before this operation was applied.");
5100
+ (i?.kind != "wait" && i?.kind != "approval" || !t({ prompt: i.prompt }, e.before)) && Z("The resolution node changed before this operation was applied.");
5240
5101
  let a = {
5241
5102
  ...i,
5242
5103
  ...e.value
@@ -5329,7 +5190,7 @@ function Kc(e, n) {
5329
5190
  }
5330
5191
  case "subflow.create":
5331
5192
  r.subflows[e.subflowId] != null && Z("A Subflow with this ID already exists.");
5332
- for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Vc(t.task.capabilities);
5193
+ for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Fc(t.task.capabilities);
5333
5194
  r.subflows = {
5334
5195
  ...r.subflows,
5335
5196
  [e.subflowId]: e.subflow
@@ -5425,4 +5286,4 @@ function Kc(e, n) {
5425
5286
  };
5426
5287
  }
5427
5288
  //#endregion
5428
- export { Wc as FlowChangeError, Kc as applyFlowChanges, Pc as changeOperationsSchema, Nc as decodeChangeOperations, Vc as decodeConnectorCapabilities, Ic as isSchemaKeyword, Hc as nextNodeName, Uc as nodeNameIssue, X as normalizeNodeName, Bc as portsByHandle, Rc as resourceNameIssue, Lc as resourceNameMaxLength, zc as validVariableName };
5289
+ export { Rc as FlowChangeError, zc as applyFlowChanges, Oc as changeOperationsSchema, Dc as decodeChangeOperations, Fc as decodeConnectorCapabilities, Ac as isSchemaKeyword, Ic as nextNodeName, Lc as nodeNameIssue, X as normalizeNodeName, Pc as portsByHandle, Mc as resourceNameIssue, jc as resourceNameMaxLength, Nc as validVariableName };