@oomol-lab/open-flow 0.1.0-beta.23 → 0.1.0-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{createResourceDialog-PKbMMpEk.js → createResourceDialog-BwI2JmPE.js} +7 -7
- package/dist/browser/flow-authoring.js +249 -250
- package/dist/browser/flow-change.d.ts +16 -7
- package/dist/browser/flow-change.js +824 -804
- package/dist/browser/{flowChanges-BUlMz4iC.js → flowChanges-BqPtWEI9.js} +2706 -2906
- package/dist/browser/{flowWorkspace-DLArN17T.js → flowWorkspace-CpMGzmfz.js} +37249 -35916
- package/dist/browser/{inputValues-CcGVt51C.js → inputValues-CeeJw_G8.js} +1 -1
- package/dist/browser/licenses.md +24 -0
- package/dist/browser/{lite-Cy6aeiL6.js → lite-BuKZ8joP.js} +50 -43
- package/dist/browser/{input-group-C2frNYAx.js → switch-CyZ96-UF.js} +1519 -612
- package/dist/browser/theme.css +30 -4
- package/dist/browser/ui-input.d.ts +3 -1
- package/dist/browser/ui.css +1 -1
- package/dist/browser/ui.js +10 -8
- package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +753 -714
- package/dist/browser/{workbenchSelect-CPRUXKbf.js → workbenchSelect-BUu7CjUA.js} +504 -490
- package/dist/common/control-api-conformance.js +18 -18
- package/dist/common/control-api.d.ts +43 -15
- package/dist/common/control-api.js +1803 -1755
- package/dist/common/control-requests.js +2 -7
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-encoding.js +587 -589
- package/dist/common/flow-graph.d.ts +31 -1
- package/dist/common/flow-schema.d.ts +11 -1
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +1542 -1457
- package/dist/common/mcp.d.ts +1 -0
- package/dist/common/mcp.js +308 -260
- package/dist/common/provider-triggers.js +934 -931
- package/dist/common/run-lifecycle.d.ts +1 -1
- package/dist/common/run-lifecycle.js +5 -5
- package/dist/common/runtime-contract.d.ts +2 -0
- package/dist/common/runtime-contract.js +96 -32
- package/dist/common/scheduler.d.ts +39 -21
- package/dist/common/scheduler.js +2358 -2339
- package/package.json +1 -1
|
@@ -2787,34 +2787,34 @@ function Xi(e, t) {
|
|
|
2787
2787
|
});
|
|
2788
2788
|
}
|
|
2789
2789
|
// @__NO_SIDE_EFFECTS__
|
|
2790
|
-
function
|
|
2790
|
+
function Zi(e) {
|
|
2791
2791
|
return new cn({
|
|
2792
2792
|
check: "overwrite",
|
|
2793
2793
|
tx: e
|
|
2794
2794
|
});
|
|
2795
2795
|
}
|
|
2796
2796
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function
|
|
2798
|
-
return /* @__PURE__ */
|
|
2799
|
-
}
|
|
2800
|
-
// @__NO_SIDE_EFFECTS__
|
|
2801
|
-
function Qi() {
|
|
2802
|
-
return /* @__PURE__ */ j((e) => e.trim());
|
|
2797
|
+
function Qi(e) {
|
|
2798
|
+
return /* @__PURE__ */ Zi((t) => t.normalize(e));
|
|
2803
2799
|
}
|
|
2804
2800
|
// @__NO_SIDE_EFFECTS__
|
|
2805
2801
|
function $i() {
|
|
2806
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ Zi((e) => e.trim());
|
|
2807
2803
|
}
|
|
2808
2804
|
// @__NO_SIDE_EFFECTS__
|
|
2809
2805
|
function ea() {
|
|
2810
|
-
return /* @__PURE__ */
|
|
2806
|
+
return /* @__PURE__ */ Zi((e) => e.toLowerCase());
|
|
2811
2807
|
}
|
|
2812
2808
|
// @__NO_SIDE_EFFECTS__
|
|
2813
2809
|
function ta() {
|
|
2814
|
-
return /* @__PURE__ */
|
|
2810
|
+
return /* @__PURE__ */ Zi((e) => e.toUpperCase());
|
|
2811
|
+
}
|
|
2812
|
+
// @__NO_SIDE_EFFECTS__
|
|
2813
|
+
function na() {
|
|
2814
|
+
return /* @__PURE__ */ Zi((e) => m(e));
|
|
2815
2815
|
}
|
|
2816
2816
|
// @__NO_SIDE_EFFECTS__
|
|
2817
|
-
function
|
|
2817
|
+
function ra(e, t, n) {
|
|
2818
2818
|
return new e({
|
|
2819
2819
|
type: "array",
|
|
2820
2820
|
element: t,
|
|
@@ -2822,7 +2822,7 @@ function na(e, t, n) {
|
|
|
2822
2822
|
});
|
|
2823
2823
|
}
|
|
2824
2824
|
// @__NO_SIDE_EFFECTS__
|
|
2825
|
-
function
|
|
2825
|
+
function ia(e, t, n) {
|
|
2826
2826
|
return new e({
|
|
2827
2827
|
type: "custom",
|
|
2828
2828
|
check: "custom",
|
|
@@ -2831,8 +2831,8 @@ function ra(e, t, n) {
|
|
|
2831
2831
|
});
|
|
2832
2832
|
}
|
|
2833
2833
|
// @__NO_SIDE_EFFECTS__
|
|
2834
|
-
function
|
|
2835
|
-
let n = /* @__PURE__ */
|
|
2834
|
+
function aa(e, t) {
|
|
2835
|
+
let n = /* @__PURE__ */ oa((t) => (t.addIssue = (e) => {
|
|
2836
2836
|
if (typeof e == "string") t.issues.push(Ce(e, t.value, n._zod.def));
|
|
2837
2837
|
else {
|
|
2838
2838
|
let r = e;
|
|
@@ -2842,7 +2842,7 @@ function ia(e, t) {
|
|
|
2842
2842
|
return n;
|
|
2843
2843
|
}
|
|
2844
2844
|
// @__NO_SIDE_EFFECTS__
|
|
2845
|
-
function
|
|
2845
|
+
function oa(e, t) {
|
|
2846
2846
|
let n = new O({
|
|
2847
2847
|
check: "custom",
|
|
2848
2848
|
...v(t)
|
|
@@ -2851,11 +2851,11 @@ function aa(e, t) {
|
|
|
2851
2851
|
}
|
|
2852
2852
|
//#endregion
|
|
2853
2853
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
|
|
2854
|
-
function
|
|
2854
|
+
function sa(e, ...t) {
|
|
2855
2855
|
for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && d(e, t, n[t]);
|
|
2856
2856
|
return e;
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function ca(e) {
|
|
2859
2859
|
let t = e?.target ?? "draft-2020-12";
|
|
2860
2860
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2861
2861
|
processors: e.processors ?? {},
|
|
@@ -2875,7 +2875,7 @@ function sa(e) {
|
|
|
2875
2875
|
external: e?.external ?? void 0
|
|
2876
2876
|
};
|
|
2877
2877
|
}
|
|
2878
|
-
function
|
|
2878
|
+
function j(e, t, n, r, i) {
|
|
2879
2879
|
let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
|
|
2880
2880
|
zodSchema: e,
|
|
2881
2881
|
path: r.path,
|
|
@@ -2885,7 +2885,7 @@ function M(e, t, n, r, i) {
|
|
|
2885
2885
|
if (a === void 0 || a === "throw") throw Error(i);
|
|
2886
2886
|
return Object.assign(n, a), !0;
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function M(e, t, n = {
|
|
2889
2889
|
path: [],
|
|
2890
2890
|
schemaPath: []
|
|
2891
2891
|
}) {
|
|
@@ -2914,15 +2914,15 @@ function N(e, t, n = {
|
|
|
2914
2914
|
a(e, t, n, r);
|
|
2915
2915
|
}
|
|
2916
2916
|
let a = e._zod.parent;
|
|
2917
|
-
a && (o.ref ||= a,
|
|
2917
|
+
a && (o.ref ||= a, M(a, t, r), t.seen.get(a).isParent = !0);
|
|
2918
2918
|
}
|
|
2919
2919
|
let c = t.metadataRegistry.get(e);
|
|
2920
|
-
return c &&
|
|
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;
|
|
2921
2921
|
}
|
|
2922
|
-
function
|
|
2922
|
+
function la(e) {
|
|
2923
2923
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2924
2924
|
}
|
|
2925
|
-
function
|
|
2925
|
+
function ua(e, t) {
|
|
2926
2926
|
let n = e.seen.get(t);
|
|
2927
2927
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2928
2928
|
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
@@ -2943,7 +2943,7 @@ function la(e, t) {
|
|
|
2943
2943
|
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2944
2944
|
return t[1].defId = a, {
|
|
2945
2945
|
defId: a,
|
|
2946
|
-
ref: `${i("__shared")}#/${r}/${
|
|
2946
|
+
ref: `${i("__shared")}#/${r}/${la(a)}`
|
|
2947
2947
|
};
|
|
2948
2948
|
}
|
|
2949
2949
|
let i = `#/${r}/`;
|
|
@@ -2951,7 +2951,7 @@ function la(e, t) {
|
|
|
2951
2951
|
let a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2952
2952
|
return {
|
|
2953
2953
|
defId: a,
|
|
2954
|
-
ref: i +
|
|
2954
|
+
ref: i + la(a)
|
|
2955
2955
|
};
|
|
2956
2956
|
}, a = (e) => {
|
|
2957
2957
|
if (e[1].schema.$ref) return;
|
|
@@ -2995,13 +2995,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2995
2995
|
}
|
|
2996
2996
|
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
2997
2997
|
}
|
|
2998
|
-
function
|
|
2998
|
+
function da(e) {
|
|
2999
2999
|
let t = e.anyOf;
|
|
3000
3000
|
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
3001
3001
|
let n = [];
|
|
3002
3002
|
for (let e of t) {
|
|
3003
3003
|
if (!e || typeof e != "object") return;
|
|
3004
|
-
|
|
3004
|
+
da(e);
|
|
3005
3005
|
let t = Object.keys(e);
|
|
3006
3006
|
if (t.length !== 1 || t[0] !== "type") return;
|
|
3007
3007
|
let r = e.type;
|
|
@@ -3012,21 +3012,21 @@ function ua(e) {
|
|
|
3012
3012
|
}
|
|
3013
3013
|
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
3014
3014
|
}
|
|
3015
|
-
var
|
|
3015
|
+
var fa = /* @__PURE__ */ new Set([
|
|
3016
3016
|
"type",
|
|
3017
3017
|
"properties",
|
|
3018
3018
|
"required",
|
|
3019
3019
|
"additionalProperties"
|
|
3020
|
-
]),
|
|
3021
|
-
function
|
|
3020
|
+
]), pa = ["oneOf", "anyOf"];
|
|
3021
|
+
function ma(e) {
|
|
3022
3022
|
let t = e.additionalProperties;
|
|
3023
3023
|
return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
|
|
3024
3024
|
}
|
|
3025
|
-
function
|
|
3025
|
+
function ha(e) {
|
|
3026
3026
|
let t = [];
|
|
3027
3027
|
for (let n of e) {
|
|
3028
3028
|
if (typeof n != "object" || n.type !== "object") return null;
|
|
3029
|
-
for (let e in n) if (!
|
|
3029
|
+
for (let e in n) if (!fa.has(e)) return null;
|
|
3030
3030
|
t.push(n);
|
|
3031
3031
|
}
|
|
3032
3032
|
let n = {}, r = /* @__PURE__ */ new Set();
|
|
@@ -3035,10 +3035,10 @@ function ma(e) {
|
|
|
3035
3035
|
if (Object.prototype.hasOwnProperty.call(n, r)) continue;
|
|
3036
3036
|
let e = [];
|
|
3037
3037
|
for (let n of t) {
|
|
3038
|
-
let t = n.properties?.[r] ??
|
|
3038
|
+
let t = n.properties?.[r] ?? ma(n);
|
|
3039
3039
|
t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
|
|
3040
3040
|
}
|
|
3041
|
-
d(n, r, e.length === 1 ? e[0] :
|
|
3041
|
+
d(n, r, e.length === 1 ? e[0] : ha(e) ?? { allOf: e });
|
|
3042
3042
|
}
|
|
3043
3043
|
for (let t of e.required ?? []) r.add(t);
|
|
3044
3044
|
}
|
|
@@ -3050,29 +3050,29 @@ function ma(e) {
|
|
|
3050
3050
|
else {
|
|
3051
3051
|
let e = [];
|
|
3052
3052
|
for (let n of t) {
|
|
3053
|
-
let t =
|
|
3053
|
+
let t = ma(n);
|
|
3054
3054
|
t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
|
|
3055
3055
|
}
|
|
3056
3056
|
e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
|
|
3057
3057
|
}
|
|
3058
3058
|
return i;
|
|
3059
3059
|
}
|
|
3060
|
-
function
|
|
3060
|
+
function ga(e) {
|
|
3061
3061
|
let t = e.allOf;
|
|
3062
3062
|
if (!Array.isArray(t) || t.length < 2) return;
|
|
3063
|
-
for (let t of
|
|
3064
|
-
let n = t.filter((e) =>
|
|
3065
|
-
if (!n.length) r =
|
|
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);
|
|
3066
3066
|
else {
|
|
3067
|
-
let e = n[0], i =
|
|
3067
|
+
let e = n[0], i = pa.find((t) => Array.isArray(e[t]));
|
|
3068
3068
|
if (Object.keys(e).length !== 1) return;
|
|
3069
|
-
let a = t.filter((t) => t !== e), o = e[i].map((e) =>
|
|
3069
|
+
let a = t.filter((t) => t !== e), o = e[i].map((e) => ha([...a, e]));
|
|
3070
3070
|
if (o.some((e) => !e)) return;
|
|
3071
3071
|
r = { [i]: o };
|
|
3072
3072
|
}
|
|
3073
|
-
r && (delete e.allOf,
|
|
3073
|
+
r && (delete e.allOf, sa(e, r));
|
|
3074
3074
|
}
|
|
3075
|
-
function
|
|
3075
|
+
function _a(e, t) {
|
|
3076
3076
|
let n = e.seen.get(t);
|
|
3077
3077
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
3078
3078
|
let r = (t) => {
|
|
@@ -3082,7 +3082,7 @@ function ga(e, t) {
|
|
|
3082
3082
|
if (n.ref = null, o) {
|
|
3083
3083
|
r(o);
|
|
3084
3084
|
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)) :
|
|
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]);
|
|
3086
3086
|
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
3087
|
}
|
|
3088
3088
|
let s = t._zod.parent;
|
|
@@ -3099,7 +3099,7 @@ function ga(e, t) {
|
|
|
3099
3099
|
};
|
|
3100
3100
|
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
3101
3101
|
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())
|
|
3102
|
+
if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) da(t[1].def ?? t[1].schema);
|
|
3103
3103
|
for (let t of e.deferred) t();
|
|
3104
3104
|
if (e.intersections.length) {
|
|
3105
3105
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3109,7 +3109,7 @@ function ga(e, t) {
|
|
|
3109
3109
|
let r = t.get(n);
|
|
3110
3110
|
r ? r.push(e) : t.set(n, [e]);
|
|
3111
3111
|
}
|
|
3112
|
-
for (let n of e.intersections) for (let e of t.get(n) ?? [])
|
|
3112
|
+
for (let n of e.intersections) for (let e of t.get(n) ?? []) ga(e);
|
|
3113
3113
|
}
|
|
3114
3114
|
}
|
|
3115
3115
|
let i = {};
|
|
@@ -3118,7 +3118,7 @@ function ga(e, t) {
|
|
|
3118
3118
|
if (!n) throw Error("Schema is missing an `id` property");
|
|
3119
3119
|
i.$id = e.external.uri(n);
|
|
3120
3120
|
}
|
|
3121
|
-
|
|
3121
|
+
sa(i, n.defId ? n.schema : n.def ?? n.schema);
|
|
3122
3122
|
let a = e.metadataRegistry.get(t)?.id;
|
|
3123
3123
|
a !== void 0 && i.id === a && delete i.id;
|
|
3124
3124
|
let o = e.external?.defs ?? {};
|
|
@@ -3133,8 +3133,8 @@ function ga(e, t) {
|
|
|
3133
3133
|
value: {
|
|
3134
3134
|
...t["~standard"],
|
|
3135
3135
|
jsonSchema: {
|
|
3136
|
-
input:
|
|
3137
|
-
output:
|
|
3136
|
+
input: ya(t, "input", e.processors),
|
|
3137
|
+
output: ya(t, "output", e.processors)
|
|
3138
3138
|
}
|
|
3139
3139
|
},
|
|
3140
3140
|
enumerable: !1,
|
|
@@ -3144,93 +3144,93 @@ function ga(e, t) {
|
|
|
3144
3144
|
throw Error("Error converting schema to JSON.");
|
|
3145
3145
|
}
|
|
3146
3146
|
}
|
|
3147
|
-
function
|
|
3147
|
+
function N(e, t) {
|
|
3148
3148
|
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3149
3149
|
if (n.seen.has(e)) return !1;
|
|
3150
3150
|
n.seen.add(e);
|
|
3151
3151
|
let r = e._zod.def;
|
|
3152
3152
|
if (r.type === "transform") return !0;
|
|
3153
|
-
if (r.type === "array") return
|
|
3154
|
-
if (r.type === "set") return
|
|
3155
|
-
if (r.type === "lazy") return
|
|
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
|
|
3157
|
-
if (r.type === "intersection") return
|
|
3158
|
-
if (r.type === "record" || r.type === "map") return
|
|
3159
|
-
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !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);
|
|
3160
3160
|
if (r.type === "object") {
|
|
3161
|
-
for (let e in r.shape) if (
|
|
3161
|
+
for (let e in r.shape) if (N(r.shape[e], n)) return !0;
|
|
3162
3162
|
return !1;
|
|
3163
3163
|
}
|
|
3164
3164
|
if (r.type === "union") {
|
|
3165
|
-
for (let e of r.options) if (
|
|
3165
|
+
for (let e of r.options) if (N(e, n)) return !0;
|
|
3166
3166
|
return !1;
|
|
3167
3167
|
}
|
|
3168
3168
|
if (r.type === "tuple") {
|
|
3169
|
-
for (let e of r.items) if (
|
|
3170
|
-
return !!(r.rest &&
|
|
3169
|
+
for (let e of r.items) if (N(e, n)) return !0;
|
|
3170
|
+
return !!(r.rest && N(r.rest, n));
|
|
3171
3171
|
}
|
|
3172
3172
|
return !1;
|
|
3173
3173
|
}
|
|
3174
|
-
var
|
|
3175
|
-
let r =
|
|
3174
|
+
var va = (e, t = {}) => (n) => {
|
|
3175
|
+
let r = ca({
|
|
3176
3176
|
...n,
|
|
3177
3177
|
processors: t
|
|
3178
3178
|
});
|
|
3179
|
-
return
|
|
3180
|
-
},
|
|
3181
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
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({
|
|
3182
3182
|
...i ?? {},
|
|
3183
3183
|
target: a,
|
|
3184
3184
|
io: t,
|
|
3185
3185
|
processors: n
|
|
3186
3186
|
});
|
|
3187
|
-
return
|
|
3188
|
-
},
|
|
3187
|
+
return M(e, o), ua(o, e), _a(o, e);
|
|
3188
|
+
}, ba = {
|
|
3189
3189
|
guid: "uuid",
|
|
3190
3190
|
url: "uri",
|
|
3191
3191
|
datetime: "date-time",
|
|
3192
3192
|
json_string: "json-string",
|
|
3193
3193
|
regex: ""
|
|
3194
|
-
},
|
|
3194
|
+
}, xa = (e, t, n, r) => {
|
|
3195
3195
|
let i = n;
|
|
3196
3196
|
i.type = "string";
|
|
3197
3197
|
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 =
|
|
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) {
|
|
3199
3199
|
let e = [...c];
|
|
3200
3200
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
3201
3201
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3202
3202
|
pattern: e.source
|
|
3203
3203
|
}))]);
|
|
3204
3204
|
}
|
|
3205
|
-
},
|
|
3205
|
+
}, Sa = (e, t, n, r) => {
|
|
3206
3206
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
3207
3207
|
i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
|
|
3208
3208
|
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) :
|
|
3210
|
-
}, Sa = (e, t, n, r) => {
|
|
3211
|
-
n.type = "boolean";
|
|
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`));
|
|
3212
3210
|
}, Ca = (e, t, n, r) => {
|
|
3213
|
-
|
|
3211
|
+
n.type = "boolean";
|
|
3214
3212
|
}, wa = (e, t, n, r) => {
|
|
3215
|
-
|
|
3213
|
+
j(e, t, n, r, "BigInt cannot be represented in JSON Schema");
|
|
3216
3214
|
}, Ta = (e, t, n, r) => {
|
|
3217
|
-
|
|
3215
|
+
j(e, t, n, r, "Symbols cannot be represented in JSON Schema");
|
|
3218
3216
|
}, Ea = (e, t, n, r) => {
|
|
3219
|
-
|
|
3217
|
+
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
3220
3218
|
}, Da = (e, t, n, r) => {
|
|
3221
|
-
|
|
3219
|
+
j(e, t, n, r, "Undefined cannot be represented in JSON Schema");
|
|
3222
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
3223
|
n.not = {};
|
|
3224
|
-
},
|
|
3225
|
-
|
|
3226
|
-
},
|
|
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) => {
|
|
3227
3227
|
let a = e._zod.def, o = n(a.entries);
|
|
3228
3228
|
if (o.length === 0) {
|
|
3229
3229
|
r.not = {};
|
|
3230
3230
|
return;
|
|
3231
3231
|
}
|
|
3232
3232
|
o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
|
|
3233
|
-
},
|
|
3233
|
+
}, Pa = (e, t, n, r) => {
|
|
3234
3234
|
let i = e._zod.def;
|
|
3235
3235
|
if (i.values.length === 0) {
|
|
3236
3236
|
n.not = {};
|
|
@@ -3238,9 +3238,9 @@ var _a = (e, t = {}) => (n) => {
|
|
|
3238
3238
|
}
|
|
3239
3239
|
let a = [];
|
|
3240
3240
|
for (let o of i.values) if (o === void 0) {
|
|
3241
|
-
if (
|
|
3241
|
+
if (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
|
|
3242
3242
|
} else if (typeof o == "bigint") {
|
|
3243
|
-
if (
|
|
3243
|
+
if (j(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
|
|
3244
3244
|
a.push(Number(o));
|
|
3245
3245
|
} else a.push(o);
|
|
3246
3246
|
if (a.length !== 0) {
|
|
@@ -3249,47 +3249,47 @@ var _a = (e, t = {}) => (n) => {
|
|
|
3249
3249
|
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
|
|
3250
3250
|
} 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
3251
|
}
|
|
3252
|
-
}, Pa = (e, t, n, r) => {
|
|
3253
|
-
M(e, t, n, r, "NaN cannot be represented in JSON Schema");
|
|
3254
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) => {
|
|
3255
3255
|
let i = n, a = e._zod.pattern;
|
|
3256
3256
|
if (!a) throw Error("Pattern not found in template literal");
|
|
3257
3257
|
i.type = "string", i.pattern = a.source;
|
|
3258
|
-
},
|
|
3258
|
+
}, La = (e, t, n, r) => {
|
|
3259
3259
|
let i = n, a = {
|
|
3260
3260
|
type: "string",
|
|
3261
3261
|
format: "binary",
|
|
3262
3262
|
contentEncoding: "binary"
|
|
3263
3263
|
}, { minimum: o, maximum: s, mime: c } = e._zod.bag;
|
|
3264
3264
|
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
|
-
}, La = (e, t, n, r) => {
|
|
3266
|
-
n.type = "boolean";
|
|
3267
3265
|
}, Ra = (e, t, n, r) => {
|
|
3268
|
-
|
|
3266
|
+
n.type = "boolean";
|
|
3269
3267
|
}, za = (e, t, n, r) => {
|
|
3270
|
-
|
|
3268
|
+
j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3271
3269
|
}, Ba = (e, t, n, r) => {
|
|
3272
|
-
|
|
3270
|
+
j(e, t, n, r, "Function types cannot be represented in JSON Schema");
|
|
3273
3271
|
}, Va = (e, t, n, r) => {
|
|
3274
|
-
|
|
3272
|
+
j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3275
3273
|
}, Ha = (e, t, n, r) => {
|
|
3276
|
-
|
|
3274
|
+
j(e, t, n, r, "Map cannot be represented in JSON Schema");
|
|
3277
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
3278
|
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 =
|
|
3279
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = M(a.element, t, {
|
|
3280
3280
|
...r,
|
|
3281
3281
|
path: [...r.path, "items"]
|
|
3282
3282
|
});
|
|
3283
3283
|
};
|
|
3284
|
-
function
|
|
3284
|
+
function Ga(e) {
|
|
3285
3285
|
let t = e._zod.def;
|
|
3286
|
-
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ?
|
|
3286
|
+
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Ga(t.out) : t.type === "catch" ? Ga(t.innerType) : e._zod.optin;
|
|
3287
3287
|
}
|
|
3288
|
-
var
|
|
3288
|
+
var Ka = (e, t, n, r) => {
|
|
3289
3289
|
let i = n, a = e._zod.def, o = a.shape;
|
|
3290
|
-
if (Object.getOwnPropertySymbols(o).length &&
|
|
3290
|
+
if (Object.getOwnPropertySymbols(o).length && j(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
3291
3291
|
i.type = "object", i.properties = {};
|
|
3292
|
-
for (let e in o) d(i.properties, e,
|
|
3292
|
+
for (let e in o) d(i.properties, e, M(o[e], t, {
|
|
3293
3293
|
...r,
|
|
3294
3294
|
path: [
|
|
3295
3295
|
...r.path,
|
|
@@ -3299,14 +3299,14 @@ var Ga = (e, t, n, r) => {
|
|
|
3299
3299
|
}));
|
|
3300
3300
|
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
3301
3301
|
let n = a.shape[e];
|
|
3302
|
-
return t.io === "input" ?
|
|
3302
|
+
return t.io === "input" ? Ga(n) === void 0 : n._zod.optout === void 0;
|
|
3303
3303
|
}));
|
|
3304
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties =
|
|
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, {
|
|
3305
3305
|
...r,
|
|
3306
3306
|
path: [...r.path, "additionalProperties"]
|
|
3307
3307
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
3308
|
-
},
|
|
3309
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) =>
|
|
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, {
|
|
3310
3310
|
...r,
|
|
3311
3311
|
path: [
|
|
3312
3312
|
...r.path,
|
|
@@ -3315,15 +3315,15 @@ var Ga = (e, t, n, r) => {
|
|
|
3315
3315
|
]
|
|
3316
3316
|
}));
|
|
3317
3317
|
a ? n.oneOf = o : n.anyOf = o;
|
|
3318
|
-
},
|
|
3319
|
-
let i = e._zod.def, a =
|
|
3318
|
+
}, Ja = (e, t, n, r) => {
|
|
3319
|
+
let i = e._zod.def, a = M(i.left, t, {
|
|
3320
3320
|
...r,
|
|
3321
3321
|
path: [
|
|
3322
3322
|
...r.path,
|
|
3323
3323
|
"allOf",
|
|
3324
3324
|
0
|
|
3325
3325
|
]
|
|
3326
|
-
}), o =
|
|
3326
|
+
}), o = M(i.right, t, {
|
|
3327
3327
|
...r,
|
|
3328
3328
|
path: [
|
|
3329
3329
|
...r.path,
|
|
@@ -3332,17 +3332,17 @@ var Ga = (e, t, n, r) => {
|
|
|
3332
3332
|
]
|
|
3333
3333
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
3334
3334
|
n.allOf = c, t.intersections.push(c);
|
|
3335
|
-
},
|
|
3335
|
+
}, Ya = (e, t, n, r) => {
|
|
3336
3336
|
let i = n, a = e._zod.def;
|
|
3337
3337
|
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) =>
|
|
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, {
|
|
3339
3339
|
...r,
|
|
3340
3340
|
path: [
|
|
3341
3341
|
...r.path,
|
|
3342
3342
|
o,
|
|
3343
3343
|
n
|
|
3344
3344
|
]
|
|
3345
|
-
})), l = a.rest ?
|
|
3345
|
+
})), l = a.rest ? M(a.rest, t, {
|
|
3346
3346
|
...r,
|
|
3347
3347
|
path: [
|
|
3348
3348
|
...r.path,
|
|
@@ -3352,7 +3352,7 @@ var Ga = (e, t, n, r) => {
|
|
|
3352
3352
|
}) : null, u = a.items.length;
|
|
3353
3353
|
for (; u > 0;) {
|
|
3354
3354
|
let e = a.items[u - 1];
|
|
3355
|
-
if (!(t.io === "input" ?
|
|
3355
|
+
if (!(t.io === "input" ? Ga(e) !== void 0 : e._zod.optout === "optional")) break;
|
|
3356
3356
|
u--;
|
|
3357
3357
|
}
|
|
3358
3358
|
let d = a.items.length, f = !a.rest;
|
|
@@ -3360,19 +3360,19 @@ var Ga = (e, t, n, r) => {
|
|
|
3360
3360
|
let { minimum: p, maximum: m } = e._zod.bag;
|
|
3361
3361
|
typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
|
|
3362
3362
|
};
|
|
3363
|
-
function
|
|
3363
|
+
function Xa(e, t, n) {
|
|
3364
3364
|
if (t.$ref) {
|
|
3365
3365
|
if (n.has(t)) return t;
|
|
3366
3366
|
n.add(t);
|
|
3367
3367
|
let r = e.get(t)?.def;
|
|
3368
3368
|
if (!r) return t;
|
|
3369
|
-
let i =
|
|
3369
|
+
let i = Xa(e, r, n);
|
|
3370
3370
|
return i === r ? t : i;
|
|
3371
3371
|
}
|
|
3372
3372
|
for (let r of ["anyOf", "oneOf"]) {
|
|
3373
3373
|
let i = t[r];
|
|
3374
3374
|
if (!Array.isArray(i)) continue;
|
|
3375
|
-
let a = i.map((t) =>
|
|
3375
|
+
let a = i.map((t) => Xa(e, t, n));
|
|
3376
3376
|
a.some((e, t) => e !== i[t]) && (t = {
|
|
3377
3377
|
...t,
|
|
3378
3378
|
[r]: a
|
|
@@ -3383,15 +3383,15 @@ function Ya(e, t, n) {
|
|
|
3383
3383
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3384
3384
|
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") ? Bt : zt).source), p) : p;
|
|
3385
3385
|
}
|
|
3386
|
-
var
|
|
3387
|
-
function
|
|
3386
|
+
var Za = /* @__PURE__ */ new WeakMap();
|
|
3387
|
+
function Qa(e) {
|
|
3388
3388
|
let t = /* @__PURE__ */ new Map();
|
|
3389
3389
|
for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
|
|
3390
3390
|
let n = /* @__PURE__ */ new Map();
|
|
3391
|
-
for (let r of
|
|
3391
|
+
for (let r of Za.get(e) ?? []) {
|
|
3392
3392
|
let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
|
|
3393
3393
|
if (!a || a === !0 || n.has(a)) continue;
|
|
3394
|
-
let o =
|
|
3394
|
+
let o = Xa(t, a, /* @__PURE__ */ new Set());
|
|
3395
3395
|
o !== a && n.set(a, o);
|
|
3396
3396
|
}
|
|
3397
3397
|
if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
|
|
@@ -3399,12 +3399,12 @@ function Za(e) {
|
|
|
3399
3399
|
t && (e.propertyNames = t);
|
|
3400
3400
|
}
|
|
3401
3401
|
}
|
|
3402
|
-
var
|
|
3402
|
+
var $a = (e, t, n, r) => {
|
|
3403
3403
|
let i = n, a = e._zod.def;
|
|
3404
3404
|
i.type = "object";
|
|
3405
3405
|
let o = a.keyType, s = o._zod.bag?.patterns;
|
|
3406
3406
|
if (a.mode === "loose" && s && s.size > 0) {
|
|
3407
|
-
let e =
|
|
3407
|
+
let e = M(a.valueType, t, {
|
|
3408
3408
|
...r,
|
|
3409
3409
|
path: [
|
|
3410
3410
|
...r.path,
|
|
@@ -3416,138 +3416,138 @@ var Qa = (e, t, n, r) => {
|
|
|
3416
3416
|
for (let t of s) d(i.patternProperties, t.source, e);
|
|
3417
3417
|
} else {
|
|
3418
3418
|
if (t.target === "draft-07" || t.target === "draft-2020-12") {
|
|
3419
|
-
i.propertyNames =
|
|
3419
|
+
i.propertyNames = M(a.keyType, t, {
|
|
3420
3420
|
...r,
|
|
3421
3421
|
path: [...r.path, "propertyNames"]
|
|
3422
3422
|
});
|
|
3423
|
-
let n =
|
|
3424
|
-
n || (n = [],
|
|
3423
|
+
let n = Za.get(t);
|
|
3424
|
+
n || (n = [], Za.set(t, n), t.deferred.push(() => Qa(t))), n.push(e);
|
|
3425
3425
|
}
|
|
3426
|
-
i.additionalProperties =
|
|
3426
|
+
i.additionalProperties = M(a.valueType, t, {
|
|
3427
3427
|
...r,
|
|
3428
3428
|
path: [...r.path, "additionalProperties"]
|
|
3429
3429
|
});
|
|
3430
3430
|
}
|
|
3431
|
-
let c = o._zod.values, l = t.io === "input" &&
|
|
3431
|
+
let c = o._zod.values, l = t.io === "input" && Ga(a.valueType) !== void 0;
|
|
3432
3432
|
if (c && !a.partial && !l) {
|
|
3433
3433
|
let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
|
|
3434
3434
|
e.length > 0 && (i.required = e.map(String));
|
|
3435
3435
|
}
|
|
3436
|
-
}, $a = (e, t, n, r) => {
|
|
3437
|
-
let i = e._zod.def, a = N(i.innerType, t, r), o = t.seen.get(e);
|
|
3438
|
-
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3439
3436
|
}, eo = (e, t, n, r) => {
|
|
3437
|
+
let i = e._zod.def, a = M(i.innerType, t, r), o = t.seen.get(e);
|
|
3438
|
+
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3439
|
+
}, to = (e, t, n, r) => {
|
|
3440
3440
|
let i = e._zod.def;
|
|
3441
|
-
|
|
3441
|
+
M(i.innerType, t, r);
|
|
3442
3442
|
let a = t.seen.get(e);
|
|
3443
3443
|
a.ref = i.innerType;
|
|
3444
|
-
},
|
|
3445
|
-
function
|
|
3444
|
+
}, no = Symbol();
|
|
3445
|
+
function ro(e, t, n, r, i) {
|
|
3446
3446
|
let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
|
|
3447
|
-
return a ? (
|
|
3447
|
+
return a ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), no) : JSON.parse(o);
|
|
3448
3448
|
}
|
|
3449
|
-
var
|
|
3449
|
+
var io = (e, t, n, r) => {
|
|
3450
3450
|
let i = e._zod.def;
|
|
3451
|
-
|
|
3451
|
+
M(i.innerType, t, r);
|
|
3452
3452
|
let a = t.seen.get(e);
|
|
3453
3453
|
a.ref = i.innerType;
|
|
3454
|
-
let o =
|
|
3455
|
-
o !==
|
|
3456
|
-
},
|
|
3454
|
+
let o = ro(i.defaultValue, e, t, n, r);
|
|
3455
|
+
o !== no && (n.default = o);
|
|
3456
|
+
}, ao = (e, t, n, r) => {
|
|
3457
3457
|
let i = e._zod.def;
|
|
3458
|
-
|
|
3458
|
+
M(i.innerType, t, r);
|
|
3459
3459
|
let a = t.seen.get(e);
|
|
3460
3460
|
if (a.ref = i.innerType, t.io !== "input") return;
|
|
3461
|
-
let o =
|
|
3462
|
-
o !==
|
|
3463
|
-
},
|
|
3461
|
+
let o = ro(i.defaultValue, e, t, n, r);
|
|
3462
|
+
o !== no && (n._prefault = o);
|
|
3463
|
+
}, oo = (e, t, n, r) => {
|
|
3464
3464
|
let i = e._zod.def;
|
|
3465
|
-
|
|
3465
|
+
M(i.innerType, t, r);
|
|
3466
3466
|
let a = t.seen.get(e);
|
|
3467
3467
|
a.ref = i.innerType;
|
|
3468
3468
|
let o;
|
|
3469
3469
|
try {
|
|
3470
3470
|
o = i.catchValue(void 0);
|
|
3471
3471
|
} catch {
|
|
3472
|
-
|
|
3472
|
+
j(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
|
|
3473
3473
|
return;
|
|
3474
3474
|
}
|
|
3475
3475
|
n.default = o;
|
|
3476
|
-
},
|
|
3476
|
+
}, so = (e, t, n, r) => {
|
|
3477
3477
|
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
3478
|
-
|
|
3478
|
+
M(o, t, r);
|
|
3479
3479
|
let s = t.seen.get(e);
|
|
3480
3480
|
s.ref = o;
|
|
3481
|
-
},
|
|
3481
|
+
}, co = (e, t, n, r) => {
|
|
3482
3482
|
let i = e._zod.def;
|
|
3483
|
-
|
|
3483
|
+
M(i.innerType, t, r);
|
|
3484
3484
|
let a = t.seen.get(e);
|
|
3485
3485
|
a.ref = i.innerType, n.readOnly = !0;
|
|
3486
|
-
},
|
|
3486
|
+
}, lo = (e, t, n, r) => {
|
|
3487
3487
|
let i = e._zod.def;
|
|
3488
|
-
|
|
3488
|
+
M(i.innerType, t, r);
|
|
3489
3489
|
let a = t.seen.get(e);
|
|
3490
3490
|
a.ref = i.innerType;
|
|
3491
|
-
},
|
|
3491
|
+
}, uo = (e, t, n, r) => {
|
|
3492
3492
|
let i = e._zod.def;
|
|
3493
|
-
|
|
3493
|
+
M(i.innerType, t, r);
|
|
3494
3494
|
let a = t.seen.get(e);
|
|
3495
3495
|
a.ref = i.innerType;
|
|
3496
|
-
},
|
|
3496
|
+
}, fo = (e, t, n, r) => {
|
|
3497
3497
|
let i = e._zod.innerType;
|
|
3498
|
-
|
|
3498
|
+
M(i, t, r);
|
|
3499
3499
|
let a = t.seen.get(e);
|
|
3500
3500
|
a.ref = i;
|
|
3501
|
-
},
|
|
3502
|
-
string:
|
|
3503
|
-
number:
|
|
3504
|
-
boolean:
|
|
3505
|
-
bigint:
|
|
3506
|
-
symbol:
|
|
3507
|
-
null:
|
|
3508
|
-
undefined:
|
|
3509
|
-
void:
|
|
3510
|
-
never:
|
|
3511
|
-
any:
|
|
3512
|
-
unknown:
|
|
3513
|
-
date:
|
|
3514
|
-
enum:
|
|
3515
|
-
literal:
|
|
3516
|
-
nan:
|
|
3517
|
-
template_literal:
|
|
3518
|
-
file:
|
|
3519
|
-
success:
|
|
3520
|
-
custom:
|
|
3521
|
-
function:
|
|
3522
|
-
transform:
|
|
3523
|
-
map:
|
|
3524
|
-
set:
|
|
3525
|
-
array:
|
|
3526
|
-
object:
|
|
3527
|
-
union:
|
|
3528
|
-
intersection:
|
|
3529
|
-
tuple:
|
|
3530
|
-
record:
|
|
3531
|
-
nullable:
|
|
3532
|
-
nonoptional:
|
|
3533
|
-
default:
|
|
3534
|
-
prefault:
|
|
3535
|
-
catch:
|
|
3536
|
-
pipe:
|
|
3537
|
-
readonly:
|
|
3538
|
-
promise:
|
|
3539
|
-
optional:
|
|
3540
|
-
lazy:
|
|
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
|
|
3541
3541
|
};
|
|
3542
|
-
function
|
|
3542
|
+
function mo(e, t) {
|
|
3543
3543
|
if ("_idmap" in e) {
|
|
3544
|
-
let n = e, r =
|
|
3544
|
+
let n = e, r = ca({
|
|
3545
3545
|
...t,
|
|
3546
|
-
processors:
|
|
3546
|
+
processors: po
|
|
3547
3547
|
}), i = {};
|
|
3548
3548
|
for (let e of n._idmap.entries()) {
|
|
3549
3549
|
let [t, n] = e;
|
|
3550
|
-
|
|
3550
|
+
M(n, r);
|
|
3551
3551
|
}
|
|
3552
3552
|
let a = {};
|
|
3553
3553
|
r.external = {
|
|
@@ -3557,20 +3557,20 @@ function po(e, t) {
|
|
|
3557
3557
|
};
|
|
3558
3558
|
for (let e of n._idmap.entries()) {
|
|
3559
3559
|
let [t, n] = e;
|
|
3560
|
-
|
|
3560
|
+
ua(r, n), d(a, t, _a(r, n));
|
|
3561
3561
|
}
|
|
3562
3562
|
return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
|
|
3563
3563
|
}
|
|
3564
|
-
let n =
|
|
3564
|
+
let n = ca({
|
|
3565
3565
|
...t,
|
|
3566
|
-
processors:
|
|
3566
|
+
processors: po
|
|
3567
3567
|
});
|
|
3568
|
-
return
|
|
3568
|
+
return M(e, n), ua(n, e), _a(n, e);
|
|
3569
3569
|
}
|
|
3570
3570
|
//#endregion
|
|
3571
3571
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
|
|
3572
|
-
var
|
|
3573
|
-
function
|
|
3572
|
+
var ho = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3573
|
+
function go(e, t, n) {
|
|
3574
3574
|
Object.defineProperty(e, t, {
|
|
3575
3575
|
configurable: !0,
|
|
3576
3576
|
enumerable: !1,
|
|
@@ -3591,12 +3591,12 @@ function ho(e, t, n) {
|
|
|
3591
3591
|
}
|
|
3592
3592
|
});
|
|
3593
3593
|
}
|
|
3594
|
-
var
|
|
3594
|
+
var P = /*@__PURE__*/ w("ZodError", (e, t) => {
|
|
3595
3595
|
Ge.init(e, t), e.name = "ZodError";
|
|
3596
3596
|
let n = Object.getPrototypeOf(e);
|
|
3597
|
-
|
|
3597
|
+
ho.has(n) || (ho.add(n), go(n, "format", (e) => (t) => Ye(e, t)), go(n, "flatten", (e) => (t) => Je(e, t)), go(n, "addIssue", (e) => (t) => {
|
|
3598
3598
|
e.issues.push(t), e.message = JSON.stringify(e.issues, i, 2);
|
|
3599
|
-
}),
|
|
3599
|
+
}), go(n, "addIssues", (e) => (t) => {
|
|
3600
3600
|
e.issues.push(...t), e.message = JSON.stringify(e.issues, i, 2);
|
|
3601
3601
|
}), Object.defineProperty(n, "isEmpty", {
|
|
3602
3602
|
configurable: !0,
|
|
@@ -3605,16 +3605,16 @@ var F = /*@__PURE__*/ w("ZodError", (e, t) => {
|
|
|
3605
3605
|
return this.issues.length === 0;
|
|
3606
3606
|
}
|
|
3607
3607
|
}));
|
|
3608
|
-
}, void 0, { Parent: Error }),
|
|
3608
|
+
}, void 0, { Parent: Error }), _o = /* @__PURE__ */ Ze(P), vo = /* @__PURE__ */ Qe(P), yo = /* @__PURE__ */ $e(P), bo = /* @__PURE__ */ tt(P), xo = /* @__PURE__ */ rt(P), So = /* @__PURE__ */ it(P), Co = /* @__PURE__ */ at(P), wo = /* @__PURE__ */ ot(P), To = /* @__PURE__ */ st(P), Eo = /* @__PURE__ */ ct(P), Do = /* @__PURE__ */ lt(P), Oo = /* @__PURE__ */ ut(P);
|
|
3609
3609
|
//#endregion
|
|
3610
3610
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3611
|
-
function
|
|
3611
|
+
function ko() {
|
|
3612
3612
|
E.localeError || D($r());
|
|
3613
3613
|
}
|
|
3614
|
-
function
|
|
3614
|
+
function Ao() {
|
|
3615
3615
|
E.memoizer || D({ memoizer: Xr() });
|
|
3616
3616
|
}
|
|
3617
|
-
var
|
|
3617
|
+
var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3618
3618
|
check(...e) {
|
|
3619
3619
|
let t = this.def;
|
|
3620
3620
|
return this.clone(f(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3636,55 +3636,55 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
|
|
|
3636
3636
|
return e.add(this, t), this;
|
|
3637
3637
|
},
|
|
3638
3638
|
refine(e, t) {
|
|
3639
|
-
return this.check(
|
|
3639
|
+
return this.check(qs(e, t));
|
|
3640
3640
|
},
|
|
3641
3641
|
superRefine(e, t) {
|
|
3642
|
-
return this.check(
|
|
3642
|
+
return this.check(Js(e, t));
|
|
3643
3643
|
},
|
|
3644
3644
|
overwrite(e) {
|
|
3645
|
-
return this.check(/* @__PURE__ */
|
|
3645
|
+
return this.check(/* @__PURE__ */ Zi(e));
|
|
3646
3646
|
},
|
|
3647
3647
|
optional() {
|
|
3648
|
-
return
|
|
3648
|
+
return Ds(this);
|
|
3649
3649
|
},
|
|
3650
3650
|
exactOptional() {
|
|
3651
|
-
return
|
|
3651
|
+
return ks(this);
|
|
3652
3652
|
},
|
|
3653
3653
|
nullable() {
|
|
3654
|
-
return
|
|
3654
|
+
return js(this);
|
|
3655
3655
|
},
|
|
3656
3656
|
nullish() {
|
|
3657
|
-
return
|
|
3657
|
+
return Ds(js(this));
|
|
3658
3658
|
},
|
|
3659
3659
|
nonoptional(e) {
|
|
3660
|
-
return
|
|
3660
|
+
return Ls(this, e);
|
|
3661
3661
|
},
|
|
3662
3662
|
array() {
|
|
3663
|
-
return
|
|
3663
|
+
return z(this);
|
|
3664
3664
|
},
|
|
3665
3665
|
or(e) {
|
|
3666
|
-
return
|
|
3666
|
+
return V([this, e]);
|
|
3667
3667
|
},
|
|
3668
3668
|
and(e) {
|
|
3669
|
-
return
|
|
3669
|
+
return vs(this, e);
|
|
3670
3670
|
},
|
|
3671
3671
|
transform(e) {
|
|
3672
|
-
return
|
|
3672
|
+
return Vs(this, Ts(e));
|
|
3673
3673
|
},
|
|
3674
3674
|
default(e) {
|
|
3675
|
-
return
|
|
3675
|
+
return Ns(this, e);
|
|
3676
3676
|
},
|
|
3677
3677
|
prefault(e) {
|
|
3678
|
-
return
|
|
3678
|
+
return Fs(this, e);
|
|
3679
3679
|
},
|
|
3680
3680
|
catch(e) {
|
|
3681
|
-
return
|
|
3681
|
+
return zs(this, e);
|
|
3682
3682
|
},
|
|
3683
3683
|
pipe(e) {
|
|
3684
|
-
return
|
|
3684
|
+
return Vs(this, e);
|
|
3685
3685
|
},
|
|
3686
3686
|
readonly() {
|
|
3687
|
-
return
|
|
3687
|
+
return Us(this);
|
|
3688
3688
|
},
|
|
3689
3689
|
describe(e) {
|
|
3690
3690
|
let t = this.clone();
|
|
@@ -3708,8 +3708,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
|
|
|
3708
3708
|
return Te(this, "~standard", {
|
|
3709
3709
|
...fn(this),
|
|
3710
3710
|
jsonSchema: {
|
|
3711
|
-
input:
|
|
3712
|
-
output:
|
|
3711
|
+
input: ya(this, "input"),
|
|
3712
|
+
output: ya(this, "output")
|
|
3713
3713
|
}
|
|
3714
3714
|
});
|
|
3715
3715
|
},
|
|
@@ -3717,16 +3717,16 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
|
|
|
3717
3717
|
x(this, "~standard", e);
|
|
3718
3718
|
},
|
|
3719
3719
|
parse: function e(t, n) {
|
|
3720
|
-
return
|
|
3720
|
+
return _o(this, t, n, { callee: e });
|
|
3721
3721
|
},
|
|
3722
3722
|
parseAsync: async function e(t, n) {
|
|
3723
|
-
return await
|
|
3723
|
+
return await vo(this, t, n, { callee: e });
|
|
3724
3724
|
},
|
|
3725
3725
|
safeParse(e, t) {
|
|
3726
|
-
return
|
|
3726
|
+
return yo(this, e, t);
|
|
3727
3727
|
},
|
|
3728
3728
|
async safeParseAsync(e, t) {
|
|
3729
|
-
return
|
|
3729
|
+
return bo(this, e, t);
|
|
3730
3730
|
},
|
|
3731
3731
|
get spa() {
|
|
3732
3732
|
return this?.safeParseAsync;
|
|
@@ -3735,31 +3735,31 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
|
|
|
3735
3735
|
x(this, "spa", e);
|
|
3736
3736
|
},
|
|
3737
3737
|
encode: function e(t, n) {
|
|
3738
|
-
return
|
|
3738
|
+
return xo(this, t, n, { callee: e });
|
|
3739
3739
|
},
|
|
3740
3740
|
decode: function e(t, n) {
|
|
3741
|
-
return
|
|
3741
|
+
return So(this, t, n, { callee: e });
|
|
3742
3742
|
},
|
|
3743
3743
|
encodeAsync: async function e(t, n) {
|
|
3744
|
-
return await
|
|
3744
|
+
return await Co(this, t, n, { callee: e });
|
|
3745
3745
|
},
|
|
3746
3746
|
decodeAsync: async function e(t, n) {
|
|
3747
|
-
return await
|
|
3747
|
+
return await wo(this, t, n, { callee: e });
|
|
3748
3748
|
},
|
|
3749
3749
|
safeEncode(e, t) {
|
|
3750
|
-
return
|
|
3750
|
+
return To(this, e, t);
|
|
3751
3751
|
},
|
|
3752
3752
|
safeDecode(e, t) {
|
|
3753
|
-
return
|
|
3753
|
+
return Eo(this, e, t);
|
|
3754
3754
|
},
|
|
3755
3755
|
async safeEncodeAsync(e, t) {
|
|
3756
|
-
return
|
|
3756
|
+
return Do(this, e, t);
|
|
3757
3757
|
},
|
|
3758
3758
|
async safeDecodeAsync(e, t) {
|
|
3759
|
-
return
|
|
3759
|
+
return Oo(this, e, t);
|
|
3760
3760
|
},
|
|
3761
3761
|
toJSONSchema(e) {
|
|
3762
|
-
return
|
|
3762
|
+
return va(this, {})(e);
|
|
3763
3763
|
},
|
|
3764
3764
|
get description() {
|
|
3765
3765
|
return ri.get(this)?.description;
|
|
@@ -3767,8 +3767,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
|
|
|
3767
3767
|
get _def() {
|
|
3768
3768
|
return this._zod.def;
|
|
3769
3769
|
}
|
|
3770
|
-
}),
|
|
3771
|
-
pn.init(e, t),
|
|
3770
|
+
}), jo = /*@__PURE__*/ w("_ZodString", (e, t) => {
|
|
3771
|
+
pn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3772
3772
|
let n = e._zod.bag;
|
|
3773
3773
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
3774
3774
|
}, {
|
|
@@ -3803,155 +3803,155 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
|
|
|
3803
3803
|
return this.check(/* @__PURE__ */ qi(e));
|
|
3804
3804
|
},
|
|
3805
3805
|
trim() {
|
|
3806
|
-
return this.check(/* @__PURE__ */
|
|
3806
|
+
return this.check(/* @__PURE__ */ $i());
|
|
3807
3807
|
},
|
|
3808
3808
|
normalize(...e) {
|
|
3809
|
-
return this.check(/* @__PURE__ */
|
|
3809
|
+
return this.check(/* @__PURE__ */ Qi(...e));
|
|
3810
3810
|
},
|
|
3811
3811
|
toLowerCase() {
|
|
3812
|
-
return this.check(/* @__PURE__ */
|
|
3812
|
+
return this.check(/* @__PURE__ */ ea());
|
|
3813
3813
|
},
|
|
3814
3814
|
toUpperCase() {
|
|
3815
|
-
return this.check(/* @__PURE__ */
|
|
3815
|
+
return this.check(/* @__PURE__ */ ta());
|
|
3816
3816
|
},
|
|
3817
3817
|
slugify() {
|
|
3818
|
-
return this.check(/* @__PURE__ */
|
|
3818
|
+
return this.check(/* @__PURE__ */ na());
|
|
3819
3819
|
}
|
|
3820
|
-
}),
|
|
3821
|
-
pn.init(e, t),
|
|
3820
|
+
}), Mo = /*@__PURE__*/ w("ZodString", (e, t) => {
|
|
3821
|
+
pn.init(e, t), jo.init(e, t);
|
|
3822
3822
|
}, {
|
|
3823
3823
|
email(e) {
|
|
3824
|
-
return this.check(/* @__PURE__ */ ai(
|
|
3824
|
+
return this.check(/* @__PURE__ */ ai(Ro, e));
|
|
3825
3825
|
},
|
|
3826
3826
|
url(e) {
|
|
3827
|
-
return this.check(/* @__PURE__ */ di(
|
|
3827
|
+
return this.check(/* @__PURE__ */ di(Vo, e));
|
|
3828
3828
|
},
|
|
3829
3829
|
jwt(e) {
|
|
3830
|
-
return this.check(/* @__PURE__ */ Ei(
|
|
3830
|
+
return this.check(/* @__PURE__ */ Ei(ns, e));
|
|
3831
3831
|
},
|
|
3832
3832
|
emoji(e) {
|
|
3833
|
-
return this.check(/* @__PURE__ */ fi(
|
|
3833
|
+
return this.check(/* @__PURE__ */ fi(Ho, e));
|
|
3834
3834
|
},
|
|
3835
3835
|
guid(e) {
|
|
3836
|
-
return this.check(/* @__PURE__ */ oi(
|
|
3836
|
+
return this.check(/* @__PURE__ */ oi(zo, e));
|
|
3837
3837
|
},
|
|
3838
3838
|
uuid(e) {
|
|
3839
|
-
return this.check(/* @__PURE__ */ si(
|
|
3839
|
+
return this.check(/* @__PURE__ */ si(Bo, e));
|
|
3840
3840
|
},
|
|
3841
3841
|
uuidv4(e) {
|
|
3842
|
-
return this.check(/* @__PURE__ */ ci(
|
|
3842
|
+
return this.check(/* @__PURE__ */ ci(Bo, e));
|
|
3843
3843
|
},
|
|
3844
3844
|
uuidv6(e) {
|
|
3845
|
-
return this.check(/* @__PURE__ */ li(
|
|
3845
|
+
return this.check(/* @__PURE__ */ li(Bo, e));
|
|
3846
3846
|
},
|
|
3847
3847
|
uuidv7(e) {
|
|
3848
|
-
return this.check(/* @__PURE__ */ ui(
|
|
3848
|
+
return this.check(/* @__PURE__ */ ui(Bo, e));
|
|
3849
3849
|
},
|
|
3850
3850
|
nanoid(e) {
|
|
3851
|
-
return this.check(/* @__PURE__ */ pi(
|
|
3851
|
+
return this.check(/* @__PURE__ */ pi(Uo, e));
|
|
3852
3852
|
},
|
|
3853
3853
|
cuid(e) {
|
|
3854
|
-
return this.check(/* @__PURE__ */ mi(
|
|
3854
|
+
return this.check(/* @__PURE__ */ mi(Wo, e));
|
|
3855
3855
|
},
|
|
3856
3856
|
cuid2(e) {
|
|
3857
|
-
return this.check(/* @__PURE__ */ hi(
|
|
3857
|
+
return this.check(/* @__PURE__ */ hi(Go, e));
|
|
3858
3858
|
},
|
|
3859
3859
|
ulid(e) {
|
|
3860
|
-
return this.check(/* @__PURE__ */ gi(
|
|
3860
|
+
return this.check(/* @__PURE__ */ gi(Ko, e));
|
|
3861
3861
|
},
|
|
3862
3862
|
base64(e) {
|
|
3863
|
-
return this.check(/* @__PURE__ */ Ci(
|
|
3863
|
+
return this.check(/* @__PURE__ */ Ci($o, e));
|
|
3864
3864
|
},
|
|
3865
3865
|
base64url(e) {
|
|
3866
|
-
return this.check(/* @__PURE__ */ wi(
|
|
3866
|
+
return this.check(/* @__PURE__ */ wi(es, e));
|
|
3867
3867
|
},
|
|
3868
3868
|
xid(e) {
|
|
3869
|
-
return this.check(/* @__PURE__ */ _i(
|
|
3869
|
+
return this.check(/* @__PURE__ */ _i(qo, e));
|
|
3870
3870
|
},
|
|
3871
3871
|
ksuid(e) {
|
|
3872
|
-
return this.check(/* @__PURE__ */ vi(
|
|
3872
|
+
return this.check(/* @__PURE__ */ vi(Jo, e));
|
|
3873
3873
|
},
|
|
3874
3874
|
ipv4(e) {
|
|
3875
|
-
return this.check(/* @__PURE__ */ yi(
|
|
3875
|
+
return this.check(/* @__PURE__ */ yi(Yo, e));
|
|
3876
3876
|
},
|
|
3877
3877
|
ipv6(e) {
|
|
3878
|
-
return this.check(/* @__PURE__ */ bi(
|
|
3878
|
+
return this.check(/* @__PURE__ */ bi(Xo, e));
|
|
3879
3879
|
},
|
|
3880
3880
|
cidrv4(e) {
|
|
3881
|
-
return this.check(/* @__PURE__ */ xi(
|
|
3881
|
+
return this.check(/* @__PURE__ */ xi(Zo, e));
|
|
3882
3882
|
},
|
|
3883
3883
|
cidrv6(e) {
|
|
3884
|
-
return this.check(/* @__PURE__ */ Si(
|
|
3884
|
+
return this.check(/* @__PURE__ */ Si(Qo, e));
|
|
3885
3885
|
},
|
|
3886
3886
|
e164(e) {
|
|
3887
|
-
return this.check(/* @__PURE__ */ Ti(
|
|
3887
|
+
return this.check(/* @__PURE__ */ Ti(ts, e));
|
|
3888
3888
|
},
|
|
3889
3889
|
datetime(e) {
|
|
3890
|
-
return this.check(/* @__PURE__ */ Di(
|
|
3890
|
+
return this.check(/* @__PURE__ */ Di(Po, e));
|
|
3891
3891
|
},
|
|
3892
3892
|
date(e) {
|
|
3893
|
-
return this.check(/* @__PURE__ */ Oi(
|
|
3893
|
+
return this.check(/* @__PURE__ */ Oi(Fo, e));
|
|
3894
3894
|
},
|
|
3895
3895
|
time(e) {
|
|
3896
|
-
return this.check(/* @__PURE__ */ ki(
|
|
3896
|
+
return this.check(/* @__PURE__ */ ki(Io, e));
|
|
3897
3897
|
},
|
|
3898
3898
|
duration(e) {
|
|
3899
|
-
return this.check(/* @__PURE__ */ Ai(
|
|
3899
|
+
return this.check(/* @__PURE__ */ Ai(Lo, e));
|
|
3900
3900
|
}
|
|
3901
3901
|
});
|
|
3902
|
-
function
|
|
3903
|
-
return /* @__PURE__ */ ii(
|
|
3904
|
-
}
|
|
3905
|
-
var
|
|
3906
|
-
A.init(e, t),
|
|
3907
|
-
}),
|
|
3908
|
-
An.init(e, t),
|
|
3909
|
-
}),
|
|
3910
|
-
jn.init(e, t),
|
|
3911
|
-
}),
|
|
3912
|
-
Mn.init(e, t),
|
|
3913
|
-
}),
|
|
3914
|
-
Nn.init(e, t),
|
|
3915
|
-
}),
|
|
3916
|
-
gn.init(e, t),
|
|
3917
|
-
}),
|
|
3918
|
-
mn.init(e, t),
|
|
3919
|
-
}),
|
|
3920
|
-
hn.init(e, t),
|
|
3921
|
-
}),
|
|
3922
|
-
Sn.init(e, t),
|
|
3923
|
-
}),
|
|
3924
|
-
Cn.init(e, t),
|
|
3925
|
-
}),
|
|
3926
|
-
wn.init(e, t),
|
|
3927
|
-
}),
|
|
3928
|
-
Tn.init(e, t),
|
|
3929
|
-
}),
|
|
3930
|
-
En.init(e, t),
|
|
3931
|
-
}),
|
|
3932
|
-
Dn.init(e, t),
|
|
3933
|
-
}),
|
|
3934
|
-
On.init(e, t),
|
|
3935
|
-
}),
|
|
3936
|
-
kn.init(e, t),
|
|
3937
|
-
}),
|
|
3938
|
-
Pn.init(e, t),
|
|
3939
|
-
}),
|
|
3940
|
-
Ln.init(e, t),
|
|
3941
|
-
}),
|
|
3942
|
-
Rn.init(e, t),
|
|
3943
|
-
}),
|
|
3944
|
-
Bn.init(e, t),
|
|
3945
|
-
}),
|
|
3946
|
-
Hn.init(e, t),
|
|
3947
|
-
}),
|
|
3948
|
-
Wn.init(e, t),
|
|
3949
|
-
}),
|
|
3950
|
-
Gn.init(e, t),
|
|
3951
|
-
}),
|
|
3952
|
-
qn.init(e, t),
|
|
3953
|
-
}),
|
|
3954
|
-
Jn.init(e, t),
|
|
3902
|
+
function No(e) {
|
|
3903
|
+
return /* @__PURE__ */ ii(Mo, e);
|
|
3904
|
+
}
|
|
3905
|
+
var I = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
3906
|
+
A.init(e, t), jo.init(e, t);
|
|
3907
|
+
}), Po = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
|
|
3908
|
+
An.init(e, t), I.init(e, t);
|
|
3909
|
+
}), Fo = /*@__PURE__*/ w("ZodISODate", (e, t) => {
|
|
3910
|
+
jn.init(e, t), I.init(e, t);
|
|
3911
|
+
}), Io = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
|
|
3912
|
+
Mn.init(e, t), I.init(e, t);
|
|
3913
|
+
}), Lo = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
|
|
3914
|
+
Nn.init(e, t), I.init(e, t);
|
|
3915
|
+
}), Ro = /*@__PURE__*/ w("ZodEmail", (e, t) => {
|
|
3916
|
+
gn.init(e, t), I.init(e, t);
|
|
3917
|
+
}), zo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
|
|
3918
|
+
mn.init(e, t), I.init(e, t);
|
|
3919
|
+
}), Bo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
|
|
3920
|
+
hn.init(e, t), I.init(e, t);
|
|
3921
|
+
}), Vo = /*@__PURE__*/ w("ZodURL", (e, t) => {
|
|
3922
|
+
Sn.init(e, t), I.init(e, t);
|
|
3923
|
+
}), Ho = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
|
|
3924
|
+
Cn.init(e, t), I.init(e, t);
|
|
3925
|
+
}), Uo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
|
|
3926
|
+
wn.init(e, t), I.init(e, t);
|
|
3927
|
+
}), Wo = /*@__PURE__*/ w("ZodCUID", (e, t) => {
|
|
3928
|
+
Tn.init(e, t), I.init(e, t);
|
|
3929
|
+
}), Go = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
|
|
3930
|
+
En.init(e, t), I.init(e, t);
|
|
3931
|
+
}), Ko = /*@__PURE__*/ w("ZodULID", (e, t) => {
|
|
3932
|
+
Dn.init(e, t), I.init(e, t);
|
|
3933
|
+
}), qo = /*@__PURE__*/ w("ZodXID", (e, t) => {
|
|
3934
|
+
On.init(e, t), I.init(e, t);
|
|
3935
|
+
}), Jo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
|
|
3936
|
+
kn.init(e, t), I.init(e, t);
|
|
3937
|
+
}), Yo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
|
|
3938
|
+
Pn.init(e, t), I.init(e, t);
|
|
3939
|
+
}), Xo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
|
|
3940
|
+
Ln.init(e, t), I.init(e, t);
|
|
3941
|
+
}), Zo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
|
|
3942
|
+
Rn.init(e, t), I.init(e, t);
|
|
3943
|
+
}), Qo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
|
|
3944
|
+
Bn.init(e, t), I.init(e, t);
|
|
3945
|
+
}), $o = /*@__PURE__*/ w("ZodBase64", (e, t) => {
|
|
3946
|
+
Hn.init(e, t), I.init(e, t);
|
|
3947
|
+
}), es = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
|
|
3948
|
+
Wn.init(e, t), I.init(e, t);
|
|
3949
|
+
}), ts = /*@__PURE__*/ w("ZodE164", (e, t) => {
|
|
3950
|
+
Gn.init(e, t), I.init(e, t);
|
|
3951
|
+
}), ns = /*@__PURE__*/ w("ZodJWT", (e, t) => {
|
|
3952
|
+
qn.init(e, t), I.init(e, t);
|
|
3953
|
+
}), rs = /*@__PURE__*/ w("ZodNumber", (e, t) => {
|
|
3954
|
+
Jn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
|
|
3955
3955
|
let n = e._zod.bag;
|
|
3956
3956
|
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
3957
|
}, {
|
|
@@ -3974,10 +3974,10 @@ var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
|
3974
3974
|
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3975
3975
|
},
|
|
3976
3976
|
int(e) {
|
|
3977
|
-
return this.check(
|
|
3977
|
+
return this.check(as(e));
|
|
3978
3978
|
},
|
|
3979
3979
|
safe(e) {
|
|
3980
|
-
return this.check(
|
|
3980
|
+
return this.check(as(e));
|
|
3981
3981
|
},
|
|
3982
3982
|
positive(e) {
|
|
3983
3983
|
return this.check(/* @__PURE__ */ zi(0, e));
|
|
@@ -4001,41 +4001,41 @@ var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
|
4001
4001
|
return this;
|
|
4002
4002
|
}
|
|
4003
4003
|
});
|
|
4004
|
-
function
|
|
4005
|
-
return /* @__PURE__ */ ji(
|
|
4004
|
+
function L(e) {
|
|
4005
|
+
return /* @__PURE__ */ ji(rs, e);
|
|
4006
4006
|
}
|
|
4007
|
-
var
|
|
4008
|
-
Yn.init(e, t),
|
|
4007
|
+
var is = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
|
|
4008
|
+
Yn.init(e, t), rs.init(e, t);
|
|
4009
4009
|
});
|
|
4010
|
-
function
|
|
4011
|
-
return /* @__PURE__ */ Mi(
|
|
4010
|
+
function as(e) {
|
|
4011
|
+
return /* @__PURE__ */ Mi(is, e);
|
|
4012
4012
|
}
|
|
4013
|
-
var
|
|
4014
|
-
Xn.init(e, t),
|
|
4013
|
+
var os = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
|
|
4014
|
+
Xn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
|
|
4015
4015
|
});
|
|
4016
|
-
function
|
|
4017
|
-
return /* @__PURE__ */ Ni(
|
|
4016
|
+
function R(e) {
|
|
4017
|
+
return /* @__PURE__ */ Ni(os, e);
|
|
4018
4018
|
}
|
|
4019
|
-
var
|
|
4020
|
-
Zn.init(e, t),
|
|
4019
|
+
var ss = /*@__PURE__*/ w("ZodNull", (e, t) => {
|
|
4020
|
+
Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
|
|
4021
4021
|
});
|
|
4022
|
-
function
|
|
4023
|
-
return /* @__PURE__ */ Pi(
|
|
4022
|
+
function cs(e) {
|
|
4023
|
+
return /* @__PURE__ */ Pi(ss, e);
|
|
4024
4024
|
}
|
|
4025
|
-
var
|
|
4026
|
-
Qn.init(e, t),
|
|
4025
|
+
var ls = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
|
|
4026
|
+
Qn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
4027
4027
|
});
|
|
4028
|
-
function
|
|
4029
|
-
return /* @__PURE__ */ Fi(
|
|
4028
|
+
function us() {
|
|
4029
|
+
return /* @__PURE__ */ Fi(ls);
|
|
4030
4030
|
}
|
|
4031
|
-
var
|
|
4032
|
-
$n.init(e, t),
|
|
4031
|
+
var ds = /*@__PURE__*/ w("ZodNever", (e, t) => {
|
|
4032
|
+
$n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r);
|
|
4033
4033
|
});
|
|
4034
|
-
function
|
|
4035
|
-
return /* @__PURE__ */ Ii(
|
|
4034
|
+
function fs(e) {
|
|
4035
|
+
return /* @__PURE__ */ Ii(ds, e);
|
|
4036
4036
|
}
|
|
4037
|
-
var
|
|
4038
|
-
|
|
4037
|
+
var ps = /*@__PURE__*/ w("ZodArray", (e, t) => {
|
|
4038
|
+
Ao(), tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.element = t.element;
|
|
4039
4039
|
}, {
|
|
4040
4040
|
min(e, t) {
|
|
4041
4041
|
return this.check(/* @__PURE__ */ Ui(e, t));
|
|
@@ -4053,14 +4053,14 @@ var fs = /*@__PURE__*/ w("ZodArray", (e, t) => {
|
|
|
4053
4053
|
return this.element;
|
|
4054
4054
|
}
|
|
4055
4055
|
});
|
|
4056
|
-
function
|
|
4057
|
-
return /* @__PURE__ */
|
|
4056
|
+
function z(e, t) {
|
|
4057
|
+
return /* @__PURE__ */ ra(ps, e, t);
|
|
4058
4058
|
}
|
|
4059
|
-
var
|
|
4060
|
-
|
|
4059
|
+
var ms = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
4060
|
+
Ao(), cr.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);
|
|
4061
4061
|
}, {
|
|
4062
4062
|
keyof() {
|
|
4063
|
-
return
|
|
4063
|
+
return U(Object.keys(this._zod.def.shape));
|
|
4064
4064
|
},
|
|
4065
4065
|
catchall(e) {
|
|
4066
4066
|
return this.clone({
|
|
@@ -4071,19 +4071,19 @@ var ps = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
|
4071
4071
|
passthrough() {
|
|
4072
4072
|
return this.clone({
|
|
4073
4073
|
...this._zod.def,
|
|
4074
|
-
catchall:
|
|
4074
|
+
catchall: us()
|
|
4075
4075
|
});
|
|
4076
4076
|
},
|
|
4077
4077
|
loose() {
|
|
4078
4078
|
return this.clone({
|
|
4079
4079
|
...this._zod.def,
|
|
4080
|
-
catchall:
|
|
4080
|
+
catchall: us()
|
|
4081
4081
|
});
|
|
4082
4082
|
},
|
|
4083
4083
|
strict() {
|
|
4084
4084
|
return this.clone({
|
|
4085
4085
|
...this._zod.def,
|
|
4086
|
-
catchall:
|
|
4086
|
+
catchall: fs()
|
|
4087
4087
|
});
|
|
4088
4088
|
},
|
|
4089
4089
|
strip() {
|
|
@@ -4108,44 +4108,52 @@ var ps = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
|
4108
4108
|
return le(this, e);
|
|
4109
4109
|
},
|
|
4110
4110
|
partial(...e) {
|
|
4111
|
-
return pe(
|
|
4111
|
+
return pe(Es, this, e[0]);
|
|
4112
4112
|
},
|
|
4113
4113
|
exactPartial(...e) {
|
|
4114
|
-
return pe(
|
|
4114
|
+
return pe(Os, this, e[0], "exactPartial");
|
|
4115
4115
|
},
|
|
4116
4116
|
required(...e) {
|
|
4117
|
-
return me(
|
|
4117
|
+
return me(Is, this, e[0]);
|
|
4118
4118
|
}
|
|
4119
4119
|
});
|
|
4120
|
-
function
|
|
4121
|
-
return new
|
|
4120
|
+
function B(e, t) {
|
|
4121
|
+
return new ms({
|
|
4122
4122
|
type: "object",
|
|
4123
4123
|
shape: e ?? {},
|
|
4124
4124
|
...v(t)
|
|
4125
4125
|
});
|
|
4126
4126
|
}
|
|
4127
|
-
|
|
4128
|
-
ur.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.options = t.options;
|
|
4129
|
-
});
|
|
4130
|
-
function H(e, t) {
|
|
4127
|
+
function hs(e, t) {
|
|
4131
4128
|
return new ms({
|
|
4129
|
+
type: "object",
|
|
4130
|
+
shape: e,
|
|
4131
|
+
catchall: fs(),
|
|
4132
|
+
...v(t)
|
|
4133
|
+
});
|
|
4134
|
+
}
|
|
4135
|
+
var gs = /*@__PURE__*/ w("ZodUnion", (e, t) => {
|
|
4136
|
+
ur.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.options = t.options;
|
|
4137
|
+
});
|
|
4138
|
+
function V(e, t) {
|
|
4139
|
+
return new gs({
|
|
4132
4140
|
type: "union",
|
|
4133
4141
|
options: e,
|
|
4134
4142
|
...v(t)
|
|
4135
4143
|
});
|
|
4136
4144
|
}
|
|
4137
|
-
var
|
|
4138
|
-
dr.init(e, t),
|
|
4145
|
+
var _s = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
|
|
4146
|
+
dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r);
|
|
4139
4147
|
});
|
|
4140
|
-
function
|
|
4141
|
-
return new
|
|
4148
|
+
function vs(e, t) {
|
|
4149
|
+
return new _s({
|
|
4142
4150
|
type: "intersection",
|
|
4143
4151
|
left: e,
|
|
4144
4152
|
right: t
|
|
4145
4153
|
});
|
|
4146
4154
|
}
|
|
4147
|
-
var
|
|
4148
|
-
|
|
4155
|
+
var ys = /*@__PURE__*/ w("ZodTuple", (e, t) => {
|
|
4156
|
+
Ao(), mr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r);
|
|
4149
4157
|
}, {
|
|
4150
4158
|
rest(e) {
|
|
4151
4159
|
return this.clone({
|
|
@@ -4158,46 +4166,46 @@ var _s = /*@__PURE__*/ w("ZodTuple", (e, t) => {
|
|
|
4158
4166
|
if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
4159
4167
|
return this.clone({
|
|
4160
4168
|
...e,
|
|
4161
|
-
items: e.items.map((e) => new
|
|
4169
|
+
items: e.items.map((e) => new Es({
|
|
4162
4170
|
type: "optional",
|
|
4163
4171
|
innerType: e
|
|
4164
4172
|
}))
|
|
4165
4173
|
});
|
|
4166
4174
|
}
|
|
4167
4175
|
});
|
|
4168
|
-
function
|
|
4176
|
+
function bs(e, t, n) {
|
|
4169
4177
|
let r = t instanceof k;
|
|
4170
|
-
return new
|
|
4178
|
+
return new ys({
|
|
4171
4179
|
type: "tuple",
|
|
4172
4180
|
items: e,
|
|
4173
4181
|
rest: r ? t : null,
|
|
4174
4182
|
...v(r ? n : t)
|
|
4175
4183
|
});
|
|
4176
4184
|
}
|
|
4177
|
-
var
|
|
4178
|
-
|
|
4185
|
+
var xs = /*@__PURE__*/ w("ZodRecord", (e, t) => {
|
|
4186
|
+
Ao(), vr.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;
|
|
4179
4187
|
});
|
|
4180
|
-
function
|
|
4181
|
-
return !t || !t._zod ? new
|
|
4188
|
+
function H(e, t, n) {
|
|
4189
|
+
return !t || !t._zod ? new xs({
|
|
4182
4190
|
type: "record",
|
|
4183
|
-
keyType:
|
|
4191
|
+
keyType: No(),
|
|
4184
4192
|
valueType: e,
|
|
4185
4193
|
...v(t)
|
|
4186
|
-
}) : new
|
|
4194
|
+
}) : new xs({
|
|
4187
4195
|
type: "record",
|
|
4188
4196
|
keyType: e,
|
|
4189
4197
|
valueType: t,
|
|
4190
4198
|
...v(n)
|
|
4191
4199
|
});
|
|
4192
4200
|
}
|
|
4193
|
-
var
|
|
4194
|
-
yr.init(e, t),
|
|
4201
|
+
var Ss = /*@__PURE__*/ w("ZodEnum", (e, t) => {
|
|
4202
|
+
yr.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);
|
|
4195
4203
|
let n = new Set(Object.keys(t.entries));
|
|
4196
4204
|
e.extract = (e, r) => {
|
|
4197
4205
|
let i = {};
|
|
4198
4206
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
4199
4207
|
else throw Error(`Key ${r} not found in enum`);
|
|
4200
|
-
return new
|
|
4208
|
+
return new Ss({
|
|
4201
4209
|
...t,
|
|
4202
4210
|
checks: [],
|
|
4203
4211
|
...v(r),
|
|
@@ -4207,7 +4215,7 @@ var bs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
|
|
|
4207
4215
|
let i = { ...t.entries };
|
|
4208
4216
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
4209
4217
|
else throw Error(`Key ${t} not found in enum`);
|
|
4210
|
-
return new
|
|
4218
|
+
return new Ss({
|
|
4211
4219
|
...t,
|
|
4212
4220
|
checks: [],
|
|
4213
4221
|
...v(r),
|
|
@@ -4215,28 +4223,28 @@ var bs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
|
|
|
4215
4223
|
});
|
|
4216
4224
|
};
|
|
4217
4225
|
});
|
|
4218
|
-
function
|
|
4219
|
-
return new
|
|
4226
|
+
function U(e, t) {
|
|
4227
|
+
return new Ss({
|
|
4220
4228
|
type: "enum",
|
|
4221
4229
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
4222
4230
|
...v(t)
|
|
4223
4231
|
});
|
|
4224
4232
|
}
|
|
4225
|
-
var
|
|
4226
|
-
br.init(e, t),
|
|
4233
|
+
var Cs = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
|
|
4234
|
+
br.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() {
|
|
4227
4235
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4228
4236
|
return t.values[0];
|
|
4229
4237
|
} });
|
|
4230
4238
|
});
|
|
4231
|
-
function
|
|
4232
|
-
return new
|
|
4239
|
+
function W(e, t) {
|
|
4240
|
+
return new Cs({
|
|
4233
4241
|
type: "literal",
|
|
4234
4242
|
values: Array.isArray(e) ? e : [e],
|
|
4235
4243
|
...v(t)
|
|
4236
4244
|
});
|
|
4237
4245
|
}
|
|
4238
|
-
var
|
|
4239
|
-
|
|
4246
|
+
var ws = /*@__PURE__*/ w("ZodTransform", (e, t) => {
|
|
4247
|
+
Ao(), xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4240
4248
|
if (r.direction === "backward") throw new Le(e.constructor.name);
|
|
4241
4249
|
n.addIssue = (r) => {
|
|
4242
4250
|
if (typeof r == "string") n.issues.push(Ce(r, n.value, t));
|
|
@@ -4249,44 +4257,44 @@ var Ss = /*@__PURE__*/ w("ZodTransform", (e, t) => {
|
|
|
4249
4257
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
4250
4258
|
};
|
|
4251
4259
|
});
|
|
4252
|
-
function
|
|
4253
|
-
return new
|
|
4260
|
+
function Ts(e) {
|
|
4261
|
+
return new ws({
|
|
4254
4262
|
type: "transform",
|
|
4255
4263
|
transform: e
|
|
4256
4264
|
});
|
|
4257
4265
|
}
|
|
4258
|
-
var
|
|
4259
|
-
Cr.init(e, t),
|
|
4266
|
+
var Es = /*@__PURE__*/ w("ZodOptional", (e, t) => {
|
|
4267
|
+
Cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4260
4268
|
});
|
|
4261
|
-
function
|
|
4262
|
-
return new
|
|
4269
|
+
function Ds(e) {
|
|
4270
|
+
return new Es({
|
|
4263
4271
|
type: "optional",
|
|
4264
4272
|
innerType: e
|
|
4265
4273
|
});
|
|
4266
4274
|
}
|
|
4267
|
-
var
|
|
4268
|
-
wr.init(e, t),
|
|
4275
|
+
var Os = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
|
|
4276
|
+
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;
|
|
4269
4277
|
});
|
|
4270
|
-
function
|
|
4271
|
-
return new
|
|
4278
|
+
function ks(e) {
|
|
4279
|
+
return new Os({
|
|
4272
4280
|
type: "optional",
|
|
4273
4281
|
innerType: e
|
|
4274
4282
|
});
|
|
4275
4283
|
}
|
|
4276
|
-
var
|
|
4277
|
-
Tr.init(e, t),
|
|
4284
|
+
var As = /*@__PURE__*/ w("ZodNullable", (e, t) => {
|
|
4285
|
+
Tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4278
4286
|
});
|
|
4279
|
-
function
|
|
4280
|
-
return new
|
|
4287
|
+
function js(e) {
|
|
4288
|
+
return new As({
|
|
4281
4289
|
type: "nullable",
|
|
4282
4290
|
innerType: e
|
|
4283
4291
|
});
|
|
4284
4292
|
}
|
|
4285
|
-
var
|
|
4286
|
-
Er.init(e, t),
|
|
4293
|
+
var Ms = /*@__PURE__*/ w("ZodDefault", (e, t) => {
|
|
4294
|
+
Er.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;
|
|
4287
4295
|
});
|
|
4288
|
-
function
|
|
4289
|
-
return new
|
|
4296
|
+
function Ns(e, t) {
|
|
4297
|
+
return new Ms({
|
|
4290
4298
|
type: "default",
|
|
4291
4299
|
innerType: e,
|
|
4292
4300
|
get defaultValue() {
|
|
@@ -4294,11 +4302,11 @@ function js(e, t) {
|
|
|
4294
4302
|
}
|
|
4295
4303
|
});
|
|
4296
4304
|
}
|
|
4297
|
-
var
|
|
4298
|
-
Or.init(e, t),
|
|
4305
|
+
var Ps = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
|
|
4306
|
+
Or.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4299
4307
|
});
|
|
4300
|
-
function
|
|
4301
|
-
return new
|
|
4308
|
+
function Fs(e, t) {
|
|
4309
|
+
return new Ps({
|
|
4302
4310
|
type: "prefault",
|
|
4303
4311
|
innerType: e,
|
|
4304
4312
|
get defaultValue() {
|
|
@@ -4306,174 +4314,174 @@ function Ns(e, t) {
|
|
|
4306
4314
|
}
|
|
4307
4315
|
});
|
|
4308
4316
|
}
|
|
4309
|
-
var
|
|
4310
|
-
kr.init(e, t),
|
|
4317
|
+
var Is = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
|
|
4318
|
+
kr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4311
4319
|
});
|
|
4312
|
-
function
|
|
4313
|
-
return new
|
|
4320
|
+
function Ls(e, t) {
|
|
4321
|
+
return new Is({
|
|
4314
4322
|
type: "nonoptional",
|
|
4315
4323
|
innerType: e,
|
|
4316
4324
|
...v(t)
|
|
4317
4325
|
});
|
|
4318
4326
|
}
|
|
4319
|
-
var
|
|
4320
|
-
Mr.init(e, t),
|
|
4327
|
+
var Rs = /*@__PURE__*/ w("ZodCatch", (e, t) => {
|
|
4328
|
+
Mr.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;
|
|
4321
4329
|
});
|
|
4322
|
-
function
|
|
4323
|
-
return new
|
|
4330
|
+
function zs(e, t) {
|
|
4331
|
+
return new Rs({
|
|
4324
4332
|
type: "catch",
|
|
4325
4333
|
innerType: e,
|
|
4326
4334
|
catchValue: typeof t == "function" ? t : Me(t)
|
|
4327
4335
|
});
|
|
4328
4336
|
}
|
|
4329
|
-
var
|
|
4330
|
-
Nr.init(e, t),
|
|
4337
|
+
var Bs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
|
|
4338
|
+
Nr.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;
|
|
4331
4339
|
});
|
|
4332
|
-
function
|
|
4333
|
-
return new
|
|
4340
|
+
function Vs(e, t) {
|
|
4341
|
+
return new Bs({
|
|
4334
4342
|
type: "pipe",
|
|
4335
4343
|
in: e,
|
|
4336
4344
|
out: t
|
|
4337
4345
|
});
|
|
4338
4346
|
}
|
|
4339
|
-
var
|
|
4340
|
-
Fr.init(e, t),
|
|
4347
|
+
var Hs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
|
|
4348
|
+
Fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => co(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4341
4349
|
});
|
|
4342
|
-
function
|
|
4343
|
-
return new
|
|
4350
|
+
function Us(e) {
|
|
4351
|
+
return new Hs({
|
|
4344
4352
|
type: "readonly",
|
|
4345
4353
|
innerType: e
|
|
4346
4354
|
});
|
|
4347
4355
|
}
|
|
4348
|
-
var
|
|
4349
|
-
Lr.init(e, t),
|
|
4356
|
+
var Ws = /*@__PURE__*/ w("ZodLazy", (e, t) => {
|
|
4357
|
+
Lr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => fo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4350
4358
|
});
|
|
4351
|
-
function
|
|
4352
|
-
return new
|
|
4359
|
+
function Gs(e) {
|
|
4360
|
+
return new Ws({
|
|
4353
4361
|
type: "lazy",
|
|
4354
4362
|
getter: e
|
|
4355
4363
|
});
|
|
4356
4364
|
}
|
|
4357
|
-
var
|
|
4358
|
-
Rr.init(e, t),
|
|
4365
|
+
var Ks = /*@__PURE__*/ w("ZodCustom", (e, t) => {
|
|
4366
|
+
Rr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r);
|
|
4359
4367
|
});
|
|
4360
|
-
function
|
|
4361
|
-
return /* @__PURE__ */
|
|
4368
|
+
function qs(e, t = {}) {
|
|
4369
|
+
return /* @__PURE__ */ ia(Ks, e, t);
|
|
4362
4370
|
}
|
|
4363
|
-
function
|
|
4364
|
-
return /* @__PURE__ */
|
|
4371
|
+
function Js(e, t) {
|
|
4372
|
+
return /* @__PURE__ */ aa(e, t);
|
|
4365
4373
|
}
|
|
4366
|
-
function
|
|
4367
|
-
let t =
|
|
4368
|
-
|
|
4374
|
+
function Ys(e) {
|
|
4375
|
+
let t = Gs(() => V([
|
|
4376
|
+
No(e),
|
|
4377
|
+
L(),
|
|
4369
4378
|
R(),
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
U(Mo(), t)
|
|
4379
|
+
cs(),
|
|
4380
|
+
z(t),
|
|
4381
|
+
H(No(), t)
|
|
4374
4382
|
]));
|
|
4375
4383
|
return t;
|
|
4376
4384
|
}
|
|
4377
|
-
function
|
|
4385
|
+
function Xs(e, t = 0) {
|
|
4378
4386
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4379
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4387
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) Xs(n, t + 1);
|
|
4380
4388
|
}
|
|
4381
4389
|
//#endregion
|
|
4382
4390
|
//#region src/flow/common/changeSchema.ts
|
|
4383
|
-
var
|
|
4384
|
-
description:
|
|
4385
|
-
jsonSchema:
|
|
4386
|
-
nullable:
|
|
4387
|
-
handle:
|
|
4388
|
-
}),
|
|
4389
|
-
collapsed:
|
|
4390
|
-
group:
|
|
4391
|
-
}),
|
|
4392
|
-
kind:
|
|
4393
|
-
nodeId:
|
|
4394
|
-
output:
|
|
4395
|
-
}),
|
|
4396
|
-
kind:
|
|
4397
|
-
input:
|
|
4398
|
-
}),
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
kind:
|
|
4403
|
-
bindingId:
|
|
4391
|
+
var G = No(), K = Ys(), Zs = z(G), Qs = B({
|
|
4392
|
+
description: G.optional(),
|
|
4393
|
+
jsonSchema: K,
|
|
4394
|
+
nullable: R(),
|
|
4395
|
+
handle: G
|
|
4396
|
+
}), q = Qs.extend({ value: K.optional() }), $s = B({
|
|
4397
|
+
collapsed: R().optional(),
|
|
4398
|
+
group: G
|
|
4399
|
+
}), ec = B({
|
|
4400
|
+
kind: W("node"),
|
|
4401
|
+
nodeId: G,
|
|
4402
|
+
output: G
|
|
4403
|
+
}), tc = B({
|
|
4404
|
+
kind: W("flow"),
|
|
4405
|
+
input: G
|
|
4406
|
+
}), nc = V([
|
|
4407
|
+
ec,
|
|
4408
|
+
tc,
|
|
4409
|
+
B({
|
|
4410
|
+
kind: W("binding"),
|
|
4411
|
+
bindingId: G
|
|
4404
4412
|
})
|
|
4405
|
-
]),
|
|
4406
|
-
kind:
|
|
4407
|
-
value:
|
|
4408
|
-
}),
|
|
4409
|
-
kind:
|
|
4410
|
-
sources:
|
|
4411
|
-
})]),
|
|
4412
|
-
inputs:
|
|
4413
|
-
outputs:
|
|
4414
|
-
},
|
|
4415
|
-
kind:
|
|
4416
|
-
action:
|
|
4417
|
-
connectionId:
|
|
4418
|
-
connections: B(
|
|
4419
|
-
connectionId:
|
|
4420
|
-
alias:
|
|
4413
|
+
]), rc = V([B({
|
|
4414
|
+
kind: W("value"),
|
|
4415
|
+
value: K
|
|
4416
|
+
}), B({
|
|
4417
|
+
kind: W("sources"),
|
|
4418
|
+
sources: z(nc)
|
|
4419
|
+
})]), ic = H(G, rc), ac = {
|
|
4420
|
+
inputs: z(V([q, $s])),
|
|
4421
|
+
outputs: z(V([Qs, $s]))
|
|
4422
|
+
}, oc = B({
|
|
4423
|
+
kind: W("connector"),
|
|
4424
|
+
action: G,
|
|
4425
|
+
connectionId: G.optional(),
|
|
4426
|
+
connections: z(B({
|
|
4427
|
+
connectionId: G,
|
|
4428
|
+
alias: G.optional()
|
|
4421
4429
|
}))
|
|
4422
|
-
}),
|
|
4423
|
-
...
|
|
4424
|
-
name:
|
|
4425
|
-
moduleId:
|
|
4426
|
-
capabilities:
|
|
4427
|
-
}),
|
|
4428
|
-
kind:
|
|
4429
|
-
value:
|
|
4430
|
-
}),
|
|
4431
|
-
kind:
|
|
4432
|
-
input:
|
|
4433
|
-
})]),
|
|
4434
|
-
...
|
|
4435
|
-
name:
|
|
4436
|
-
executor:
|
|
4437
|
-
|
|
4438
|
-
kind:
|
|
4439
|
-
action:
|
|
4440
|
-
connectionId:
|
|
4430
|
+
}), sc = B({
|
|
4431
|
+
...ac,
|
|
4432
|
+
name: G,
|
|
4433
|
+
moduleId: G,
|
|
4434
|
+
capabilities: z(oc).optional()
|
|
4435
|
+
}), cc = V([B({
|
|
4436
|
+
kind: W("value"),
|
|
4437
|
+
value: K
|
|
4438
|
+
}), B({
|
|
4439
|
+
kind: W("input"),
|
|
4440
|
+
input: G
|
|
4441
|
+
})]), lc = V([cc, B({ kind: W("model") })]), uc = B({
|
|
4442
|
+
...ac,
|
|
4443
|
+
name: G,
|
|
4444
|
+
executor: V([
|
|
4445
|
+
B({
|
|
4446
|
+
kind: W("connector"),
|
|
4447
|
+
action: G,
|
|
4448
|
+
connectionId: G.optional()
|
|
4441
4449
|
}),
|
|
4442
|
-
|
|
4443
|
-
kind:
|
|
4444
|
-
mode:
|
|
4450
|
+
B({
|
|
4451
|
+
kind: W("llm"),
|
|
4452
|
+
mode: U(["chat", "json"])
|
|
4445
4453
|
}),
|
|
4446
|
-
|
|
4447
|
-
kind:
|
|
4448
|
-
code:
|
|
4449
|
-
model:
|
|
4450
|
-
prompt:
|
|
4451
|
-
system:
|
|
4452
|
-
maxRounds:
|
|
4453
|
-
tools: B(
|
|
4454
|
-
id:
|
|
4455
|
-
name:
|
|
4456
|
-
description:
|
|
4457
|
-
action:
|
|
4458
|
-
connectionId:
|
|
4459
|
-
approval:
|
|
4460
|
-
inputs:
|
|
4454
|
+
B({
|
|
4455
|
+
kind: W("agent"),
|
|
4456
|
+
code: R().optional(),
|
|
4457
|
+
model: G,
|
|
4458
|
+
prompt: cc,
|
|
4459
|
+
system: G,
|
|
4460
|
+
maxRounds: L(),
|
|
4461
|
+
tools: z(B({
|
|
4462
|
+
id: G,
|
|
4463
|
+
name: G,
|
|
4464
|
+
description: G,
|
|
4465
|
+
action: G,
|
|
4466
|
+
connectionId: G.optional(),
|
|
4467
|
+
approval: R(),
|
|
4468
|
+
inputs: z(q.extend({ source: lc }))
|
|
4461
4469
|
})),
|
|
4462
|
-
notification:
|
|
4463
|
-
taskId:
|
|
4464
|
-
messageHandle:
|
|
4465
|
-
inputs:
|
|
4470
|
+
notification: B({
|
|
4471
|
+
taskId: G,
|
|
4472
|
+
messageHandle: G,
|
|
4473
|
+
inputs: H(G, cc)
|
|
4466
4474
|
}).optional()
|
|
4467
4475
|
})
|
|
4468
4476
|
])
|
|
4469
|
-
}),
|
|
4470
|
-
input:
|
|
4471
|
-
cases: B(
|
|
4472
|
-
output:
|
|
4473
|
-
relation:
|
|
4474
|
-
expressions: B(
|
|
4475
|
-
input:
|
|
4476
|
-
operator:
|
|
4477
|
+
}), dc = {
|
|
4478
|
+
input: q,
|
|
4479
|
+
cases: z(B({
|
|
4480
|
+
output: G,
|
|
4481
|
+
relation: U(["all", "any"]),
|
|
4482
|
+
expressions: z(B({
|
|
4483
|
+
input: G,
|
|
4484
|
+
operator: U([
|
|
4477
4485
|
"!=",
|
|
4478
4486
|
"<",
|
|
4479
4487
|
"<=",
|
|
@@ -4495,63 +4503,58 @@ var K = Mo(), q = qs(), Ys = B(K), Xs = V({
|
|
|
4495
4503
|
"notHasValue",
|
|
4496
4504
|
"startsWith"
|
|
4497
4505
|
]),
|
|
4498
|
-
value:
|
|
4506
|
+
value: K.optional()
|
|
4499
4507
|
}))
|
|
4500
4508
|
})),
|
|
4501
|
-
defaultOutput:
|
|
4502
|
-
},
|
|
4503
|
-
actions:
|
|
4504
|
-
prompt:
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
allowedOrigins: Ys.optional(),
|
|
4515
|
-
noResponseBody: z().optional(),
|
|
4516
|
-
responseData: K.optional(),
|
|
4517
|
-
responseHeaders: U(K, K).optional(),
|
|
4518
|
-
responseStatusCode: R().optional()
|
|
4509
|
+
defaultOutput: G.optional()
|
|
4510
|
+
}, fc = {
|
|
4511
|
+
actions: V([bs([W("continue")]), bs([W("approve"), W("reject")])]),
|
|
4512
|
+
prompt: G
|
|
4513
|
+
}, pc = {
|
|
4514
|
+
inputsDef: z(q),
|
|
4515
|
+
options: B({
|
|
4516
|
+
allowedMethods: Zs.optional(),
|
|
4517
|
+
allowedOrigins: Zs.optional(),
|
|
4518
|
+
noResponseBody: R().optional(),
|
|
4519
|
+
responseData: G.optional(),
|
|
4520
|
+
responseHeaders: H(G, G).optional(),
|
|
4521
|
+
responseStatusCode: L().optional()
|
|
4519
4522
|
}).optional()
|
|
4520
|
-
},
|
|
4521
|
-
type:
|
|
4522
|
-
expression:
|
|
4523
|
-
timezone:
|
|
4524
|
-
}),
|
|
4525
|
-
type:
|
|
4526
|
-
unit:
|
|
4523
|
+
}, mc = z(V([B({
|
|
4524
|
+
type: W("cron"),
|
|
4525
|
+
expression: G,
|
|
4526
|
+
timezone: G
|
|
4527
|
+
}), B({
|
|
4528
|
+
type: W("every"),
|
|
4529
|
+
unit: U([
|
|
4527
4530
|
"day",
|
|
4528
4531
|
"hour",
|
|
4529
4532
|
"minute",
|
|
4530
4533
|
"month",
|
|
4531
4534
|
"week"
|
|
4532
4535
|
]),
|
|
4533
|
-
value:
|
|
4534
|
-
})])),
|
|
4535
|
-
configSchema:
|
|
4536
|
-
definitionVersion:
|
|
4537
|
-
description:
|
|
4538
|
-
displayName:
|
|
4539
|
-
key:
|
|
4540
|
-
name:
|
|
4541
|
-
payloadSchema:
|
|
4542
|
-
provider:
|
|
4543
|
-
},
|
|
4544
|
-
body:
|
|
4545
|
-
allowArray:
|
|
4546
|
-
allowEmpty:
|
|
4547
|
-
formats:
|
|
4536
|
+
value: L()
|
|
4537
|
+
})])), hc = {
|
|
4538
|
+
configSchema: K,
|
|
4539
|
+
definitionVersion: L(),
|
|
4540
|
+
description: G,
|
|
4541
|
+
displayName: G,
|
|
4542
|
+
key: G,
|
|
4543
|
+
name: G,
|
|
4544
|
+
payloadSchema: K,
|
|
4545
|
+
provider: G
|
|
4546
|
+
}, gc = B({
|
|
4547
|
+
body: B({
|
|
4548
|
+
allowArray: R(),
|
|
4549
|
+
allowEmpty: R(),
|
|
4550
|
+
formats: z(U([
|
|
4548
4551
|
"form",
|
|
4549
4552
|
"json",
|
|
4550
4553
|
"multipart",
|
|
4551
4554
|
"text"
|
|
4552
4555
|
]))
|
|
4553
4556
|
}),
|
|
4554
|
-
methods:
|
|
4557
|
+
methods: z(U([
|
|
4555
4558
|
"DELETE",
|
|
4556
4559
|
"GET",
|
|
4557
4560
|
"HEAD",
|
|
@@ -4559,300 +4562,321 @@ var K = Mo(), q = qs(), Ys = B(K), Xs = V({
|
|
|
4559
4562
|
"POST",
|
|
4560
4563
|
"PUT"
|
|
4561
4564
|
])),
|
|
4562
|
-
successStatus:
|
|
4563
|
-
}),
|
|
4564
|
-
name:
|
|
4565
|
-
description:
|
|
4566
|
-
icon:
|
|
4567
|
-
},
|
|
4568
|
-
inputs:
|
|
4569
|
-
name:
|
|
4570
|
-
description:
|
|
4571
|
-
icon:
|
|
4572
|
-
timeoutMs:
|
|
4573
|
-
},
|
|
4574
|
-
|
|
4575
|
-
...
|
|
4576
|
-
kind:
|
|
4577
|
-
...
|
|
4565
|
+
successStatus: L()
|
|
4566
|
+
}), _c = {
|
|
4567
|
+
name: G,
|
|
4568
|
+
description: G.optional(),
|
|
4569
|
+
icon: G.optional()
|
|
4570
|
+
}, J = {
|
|
4571
|
+
inputs: ic,
|
|
4572
|
+
name: G.optional(),
|
|
4573
|
+
description: G.optional(),
|
|
4574
|
+
icon: G.optional(),
|
|
4575
|
+
timeoutMs: L().optional()
|
|
4576
|
+
}, vc = V([
|
|
4577
|
+
B({
|
|
4578
|
+
...J,
|
|
4579
|
+
kind: W("condition"),
|
|
4580
|
+
...dc
|
|
4578
4581
|
}),
|
|
4579
|
-
|
|
4580
|
-
...
|
|
4581
|
-
inputs:
|
|
4582
|
-
kind:
|
|
4583
|
-
values:
|
|
4582
|
+
B({
|
|
4583
|
+
...J,
|
|
4584
|
+
inputs: us().transform(() => ({})).default({}),
|
|
4585
|
+
kind: W("value"),
|
|
4586
|
+
values: z(q)
|
|
4584
4587
|
}),
|
|
4585
|
-
|
|
4586
|
-
...
|
|
4587
|
-
kind:
|
|
4588
|
-
subflowId:
|
|
4588
|
+
B({
|
|
4589
|
+
...J,
|
|
4590
|
+
kind: W("subflow"),
|
|
4591
|
+
subflowId: G
|
|
4589
4592
|
}),
|
|
4590
|
-
|
|
4591
|
-
...
|
|
4592
|
-
kind:
|
|
4593
|
-
task:
|
|
4594
|
-
additionalInputs:
|
|
4593
|
+
B({
|
|
4594
|
+
...J,
|
|
4595
|
+
kind: W("task"),
|
|
4596
|
+
task: sc,
|
|
4597
|
+
additionalInputs: z(q).optional()
|
|
4595
4598
|
}),
|
|
4596
|
-
|
|
4597
|
-
...
|
|
4598
|
-
kind:
|
|
4599
|
-
taskId:
|
|
4600
|
-
additionalInputs:
|
|
4599
|
+
B({
|
|
4600
|
+
...J,
|
|
4601
|
+
kind: W("task"),
|
|
4602
|
+
taskId: G,
|
|
4603
|
+
additionalInputs: z(q).optional()
|
|
4601
4604
|
}),
|
|
4602
|
-
|
|
4603
|
-
...
|
|
4604
|
-
kind:
|
|
4605
|
-
input:
|
|
4606
|
-
...
|
|
4605
|
+
hs({
|
|
4606
|
+
...J,
|
|
4607
|
+
kind: W("wait"),
|
|
4608
|
+
input: q,
|
|
4609
|
+
...fc
|
|
4607
4610
|
}).omit({ timeoutMs: !0 }),
|
|
4608
|
-
|
|
4609
|
-
...
|
|
4610
|
-
kind:
|
|
4611
|
+
B({
|
|
4612
|
+
..._c,
|
|
4613
|
+
kind: W("manual")
|
|
4611
4614
|
}),
|
|
4612
|
-
|
|
4613
|
-
...
|
|
4614
|
-
kind:
|
|
4615
|
-
...
|
|
4615
|
+
B({
|
|
4616
|
+
..._c,
|
|
4617
|
+
kind: W("webhook"),
|
|
4618
|
+
...pc
|
|
4616
4619
|
}),
|
|
4617
|
-
|
|
4618
|
-
...
|
|
4619
|
-
kind:
|
|
4620
|
-
cronTimes:
|
|
4620
|
+
B({
|
|
4621
|
+
..._c,
|
|
4622
|
+
kind: W("cron"),
|
|
4623
|
+
cronTimes: mc
|
|
4621
4624
|
}),
|
|
4622
|
-
|
|
4623
|
-
...
|
|
4624
|
-
kind:
|
|
4625
|
-
bindingId:
|
|
4626
|
-
config:
|
|
4627
|
-
definition:
|
|
4628
|
-
...
|
|
4629
|
-
type:
|
|
4625
|
+
B({
|
|
4626
|
+
..._c,
|
|
4627
|
+
kind: W("poll"),
|
|
4628
|
+
bindingId: G,
|
|
4629
|
+
config: H(G, K),
|
|
4630
|
+
definition: B({
|
|
4631
|
+
...hc,
|
|
4632
|
+
type: W("poll")
|
|
4630
4633
|
}),
|
|
4631
|
-
pollTimes:
|
|
4634
|
+
pollTimes: mc
|
|
4632
4635
|
}),
|
|
4633
|
-
|
|
4634
|
-
...
|
|
4635
|
-
kind:
|
|
4636
|
-
bindingId:
|
|
4637
|
-
config:
|
|
4638
|
-
definition:
|
|
4639
|
-
...
|
|
4640
|
-
type:
|
|
4641
|
-
endpoint:
|
|
4636
|
+
B({
|
|
4637
|
+
..._c,
|
|
4638
|
+
kind: W("integration"),
|
|
4639
|
+
bindingId: G,
|
|
4640
|
+
config: H(G, K),
|
|
4641
|
+
definition: B({
|
|
4642
|
+
...hc,
|
|
4643
|
+
type: W("integration"),
|
|
4644
|
+
endpoint: gc
|
|
4642
4645
|
})
|
|
4643
4646
|
})
|
|
4644
|
-
]),
|
|
4645
|
-
kind:
|
|
4646
|
-
id:
|
|
4647
|
-
})]),
|
|
4648
|
-
source:
|
|
4649
|
-
target:
|
|
4650
|
-
sourceHandle:
|
|
4647
|
+
]), yc = V([B({ kind: W("flow") }), B({
|
|
4648
|
+
kind: W("subflow"),
|
|
4649
|
+
id: G
|
|
4650
|
+
})]), bc = B({
|
|
4651
|
+
source: G,
|
|
4652
|
+
target: G,
|
|
4653
|
+
sourceHandle: G.optional()
|
|
4651
4654
|
}), Y = {
|
|
4652
|
-
nodeId:
|
|
4653
|
-
target:
|
|
4654
|
-
},
|
|
4655
|
-
name:
|
|
4656
|
-
inputs:
|
|
4657
|
-
outputs:
|
|
4658
|
-
}),
|
|
4659
|
-
nodes:
|
|
4660
|
-
edges:
|
|
4661
|
-
}),
|
|
4662
|
-
kind:
|
|
4663
|
-
target:
|
|
4664
|
-
}),
|
|
4665
|
-
name:
|
|
4666
|
-
imports:
|
|
4667
|
-
source:
|
|
4668
|
-
}),
|
|
4669
|
-
bindings:
|
|
4670
|
-
graph:
|
|
4671
|
-
subflows:
|
|
4672
|
-
tasks:
|
|
4655
|
+
nodeId: G,
|
|
4656
|
+
target: yc
|
|
4657
|
+
}, xc = B({
|
|
4658
|
+
name: G,
|
|
4659
|
+
inputs: z(q),
|
|
4660
|
+
outputs: z(Qs.extend({ sources: z(V([ec, tc])) }))
|
|
4661
|
+
}), Sc = B({
|
|
4662
|
+
nodes: H(G, vc),
|
|
4663
|
+
edges: z(bc).default([])
|
|
4664
|
+
}), Cc = B({
|
|
4665
|
+
kind: U(["connection", "variable"]),
|
|
4666
|
+
target: G
|
|
4667
|
+
}), wc = B({
|
|
4668
|
+
name: G,
|
|
4669
|
+
imports: Zs,
|
|
4670
|
+
source: G
|
|
4671
|
+
}), Tc = B({
|
|
4672
|
+
bindings: H(G, Cc),
|
|
4673
|
+
graph: Sc,
|
|
4674
|
+
subflows: H(G, xc.extend({ graph: Sc })),
|
|
4675
|
+
tasks: H(G, uc)
|
|
4673
4676
|
});
|
|
4674
|
-
|
|
4675
|
-
modelVersion:
|
|
4676
|
-
document:
|
|
4677
|
-
modules:
|
|
4677
|
+
B({
|
|
4678
|
+
modelVersion: W(1),
|
|
4679
|
+
document: Tc,
|
|
4680
|
+
modules: H(G, wc)
|
|
4678
4681
|
}).extend({
|
|
4679
|
-
kind:
|
|
4680
|
-
version:
|
|
4682
|
+
kind: W("open-flow-flow-revision"),
|
|
4683
|
+
version: W(1)
|
|
4681
4684
|
});
|
|
4682
|
-
var
|
|
4685
|
+
var Ec = {
|
|
4683
4686
|
"binding.create": {
|
|
4684
|
-
bindingId:
|
|
4685
|
-
binding:
|
|
4687
|
+
bindingId: G,
|
|
4688
|
+
binding: Cc
|
|
4686
4689
|
},
|
|
4687
|
-
"binding.delete": { bindingId:
|
|
4690
|
+
"binding.delete": { bindingId: G },
|
|
4688
4691
|
"binding.target.set": {
|
|
4689
|
-
bindingId:
|
|
4690
|
-
before:
|
|
4691
|
-
value:
|
|
4692
|
+
bindingId: G,
|
|
4693
|
+
before: G,
|
|
4694
|
+
value: G
|
|
4692
4695
|
},
|
|
4693
4696
|
"graph.edge.connect": {
|
|
4694
|
-
target:
|
|
4695
|
-
edge:
|
|
4697
|
+
target: yc,
|
|
4698
|
+
edge: bc
|
|
4696
4699
|
},
|
|
4697
4700
|
"graph.edge.disconnect": {
|
|
4698
|
-
target:
|
|
4699
|
-
edge:
|
|
4701
|
+
target: yc,
|
|
4702
|
+
edge: bc
|
|
4700
4703
|
},
|
|
4701
4704
|
"graph.node.create": {
|
|
4702
4705
|
...Y,
|
|
4703
|
-
node:
|
|
4706
|
+
node: vc
|
|
4704
4707
|
},
|
|
4705
4708
|
"graph.node.delete": Y,
|
|
4706
|
-
"graph.node.field.set":
|
|
4709
|
+
"graph.node.field.set": V([B({
|
|
4707
4710
|
...Y,
|
|
4708
|
-
kind:
|
|
4709
|
-
field:
|
|
4711
|
+
kind: W("graph.node.field.set"),
|
|
4712
|
+
field: U([
|
|
4710
4713
|
"description",
|
|
4711
4714
|
"icon",
|
|
4712
4715
|
"name"
|
|
4713
4716
|
]),
|
|
4714
|
-
before:
|
|
4715
|
-
value:
|
|
4716
|
-
}),
|
|
4717
|
+
before: G.optional(),
|
|
4718
|
+
value: G.optional()
|
|
4719
|
+
}), B({
|
|
4717
4720
|
...Y,
|
|
4718
|
-
kind:
|
|
4719
|
-
field:
|
|
4720
|
-
before:
|
|
4721
|
-
value:
|
|
4721
|
+
kind: W("graph.node.field.set"),
|
|
4722
|
+
field: W("timeoutMs"),
|
|
4723
|
+
before: L().optional(),
|
|
4724
|
+
value: L().optional()
|
|
4722
4725
|
})]),
|
|
4723
4726
|
"graph.node.input.set": {
|
|
4724
4727
|
...Y,
|
|
4725
|
-
handle:
|
|
4726
|
-
before:
|
|
4727
|
-
value:
|
|
4728
|
+
handle: G,
|
|
4729
|
+
before: rc.optional(),
|
|
4730
|
+
value: rc.optional()
|
|
4728
4731
|
},
|
|
4729
4732
|
"graph.node.additional-inputs.set": {
|
|
4730
4733
|
...Y,
|
|
4731
|
-
before:
|
|
4732
|
-
value:
|
|
4734
|
+
before: z(q).optional(),
|
|
4735
|
+
value: z(q).optional()
|
|
4733
4736
|
},
|
|
4734
4737
|
"graph.node.condition.set": {
|
|
4735
4738
|
...Y,
|
|
4736
|
-
before:
|
|
4737
|
-
value:
|
|
4739
|
+
before: B(dc),
|
|
4740
|
+
value: B(dc)
|
|
4738
4741
|
},
|
|
4739
4742
|
"graph.node.values.set": {
|
|
4740
4743
|
...Y,
|
|
4741
|
-
before:
|
|
4742
|
-
value:
|
|
4744
|
+
before: z(q),
|
|
4745
|
+
value: z(q)
|
|
4743
4746
|
},
|
|
4744
4747
|
"graph.node.wait.set": {
|
|
4745
4748
|
...Y,
|
|
4746
|
-
target:
|
|
4747
|
-
before:
|
|
4748
|
-
value:
|
|
4749
|
+
target: B({ kind: W("flow") }),
|
|
4750
|
+
before: B(fc),
|
|
4751
|
+
value: B(fc)
|
|
4749
4752
|
},
|
|
4750
4753
|
"graph.node.webhook.set": {
|
|
4751
4754
|
...Y,
|
|
4752
|
-
target:
|
|
4753
|
-
before:
|
|
4754
|
-
value:
|
|
4755
|
+
target: B({ kind: W("flow") }),
|
|
4756
|
+
before: B(pc),
|
|
4757
|
+
value: B(pc)
|
|
4755
4758
|
},
|
|
4756
4759
|
"graph.node.task.ports.set": {
|
|
4757
4760
|
...Y,
|
|
4758
|
-
before:
|
|
4759
|
-
value:
|
|
4761
|
+
before: B(ac),
|
|
4762
|
+
value: B(ac)
|
|
4760
4763
|
},
|
|
4761
4764
|
"graph.node.task.name.set": {
|
|
4762
4765
|
...Y,
|
|
4763
|
-
before:
|
|
4764
|
-
value:
|
|
4766
|
+
before: G,
|
|
4767
|
+
value: G
|
|
4765
4768
|
},
|
|
4766
4769
|
"graph.node.task.capabilities.set": {
|
|
4767
4770
|
...Y,
|
|
4768
|
-
before:
|
|
4769
|
-
value:
|
|
4771
|
+
before: z(oc).optional(),
|
|
4772
|
+
value: z(oc).optional()
|
|
4770
4773
|
},
|
|
4771
4774
|
"graph.trigger.config.set": {
|
|
4772
|
-
nodeId:
|
|
4773
|
-
name:
|
|
4774
|
-
before:
|
|
4775
|
-
value:
|
|
4775
|
+
nodeId: G,
|
|
4776
|
+
name: G,
|
|
4777
|
+
before: K.optional(),
|
|
4778
|
+
value: K.optional()
|
|
4776
4779
|
},
|
|
4777
4780
|
"graph.trigger.schedule.set": {
|
|
4778
|
-
nodeId:
|
|
4779
|
-
before:
|
|
4780
|
-
value:
|
|
4781
|
+
nodeId: G,
|
|
4782
|
+
before: mc,
|
|
4783
|
+
value: mc
|
|
4781
4784
|
},
|
|
4782
4785
|
"module.create": {
|
|
4783
|
-
moduleId:
|
|
4784
|
-
module:
|
|
4786
|
+
moduleId: G,
|
|
4787
|
+
module: wc
|
|
4785
4788
|
},
|
|
4786
|
-
"module.delete": { moduleId:
|
|
4789
|
+
"module.delete": { moduleId: G },
|
|
4787
4790
|
"module.rename": {
|
|
4788
|
-
moduleId:
|
|
4789
|
-
before:
|
|
4790
|
-
name:
|
|
4791
|
+
moduleId: G,
|
|
4792
|
+
before: G,
|
|
4793
|
+
name: G
|
|
4791
4794
|
},
|
|
4792
4795
|
"module.source.replace": {
|
|
4793
|
-
moduleId:
|
|
4794
|
-
beforeImports:
|
|
4795
|
-
beforeSource:
|
|
4796
|
-
imports:
|
|
4797
|
-
source:
|
|
4796
|
+
moduleId: G,
|
|
4797
|
+
beforeImports: Zs,
|
|
4798
|
+
beforeSource: G,
|
|
4799
|
+
imports: Zs,
|
|
4800
|
+
source: G
|
|
4798
4801
|
},
|
|
4799
4802
|
"subflow.create": {
|
|
4800
|
-
subflowId:
|
|
4801
|
-
subflow:
|
|
4803
|
+
subflowId: G,
|
|
4804
|
+
subflow: xc.extend({ graph: Sc })
|
|
4802
4805
|
},
|
|
4803
4806
|
"subflow.definition.set": {
|
|
4804
|
-
subflowId:
|
|
4805
|
-
before:
|
|
4806
|
-
definition:
|
|
4807
|
+
subflowId: G,
|
|
4808
|
+
before: xc,
|
|
4809
|
+
definition: xc
|
|
4807
4810
|
},
|
|
4808
|
-
"subflow.delete": { subflowId:
|
|
4811
|
+
"subflow.delete": { subflowId: G },
|
|
4809
4812
|
"task.create": {
|
|
4810
|
-
taskId:
|
|
4811
|
-
task:
|
|
4813
|
+
taskId: G,
|
|
4814
|
+
task: uc
|
|
4812
4815
|
},
|
|
4813
|
-
"task.delete": { taskId:
|
|
4816
|
+
"task.delete": { taskId: G },
|
|
4814
4817
|
"task.connector.connection.set": {
|
|
4815
|
-
taskId:
|
|
4816
|
-
before:
|
|
4817
|
-
value:
|
|
4818
|
+
taskId: G,
|
|
4819
|
+
before: G.optional(),
|
|
4820
|
+
value: G.optional()
|
|
4818
4821
|
},
|
|
4819
4822
|
"task.agent.set": {
|
|
4820
|
-
taskId:
|
|
4821
|
-
before:
|
|
4822
|
-
value:
|
|
4823
|
+
taskId: G,
|
|
4824
|
+
before: uc,
|
|
4825
|
+
value: uc
|
|
4823
4826
|
},
|
|
4824
4827
|
"task.llm.mode.set": {
|
|
4825
|
-
taskId:
|
|
4826
|
-
before:
|
|
4827
|
-
value:
|
|
4828
|
+
taskId: G,
|
|
4829
|
+
before: U(["chat", "json"]),
|
|
4830
|
+
value: U(["chat", "json"])
|
|
4828
4831
|
},
|
|
4829
4832
|
"task.name.set": {
|
|
4830
|
-
taskId:
|
|
4831
|
-
before:
|
|
4832
|
-
value:
|
|
4833
|
+
taskId: G,
|
|
4834
|
+
before: G,
|
|
4835
|
+
value: G
|
|
4833
4836
|
}
|
|
4834
|
-
},
|
|
4835
|
-
kind:
|
|
4837
|
+
}, Dc = new Map(Object.entries(Ec).map(([e, t]) => [e, t instanceof F ? t : B({
|
|
4838
|
+
kind: W(e),
|
|
4836
4839
|
...t
|
|
4837
|
-
})])),
|
|
4838
|
-
function
|
|
4839
|
-
return
|
|
4840
|
-
let { kind: n } =
|
|
4840
|
+
})])), Oc = z(V([...Dc.values()])).min(1);
|
|
4841
|
+
function kc(e) {
|
|
4842
|
+
return Xs(e), z(us()).min(1).parse(e).map((e, t) => {
|
|
4843
|
+
let { kind: n } = B({ kind: G }).parse(e), r = Dc.get(n);
|
|
4841
4844
|
if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
|
|
4842
4845
|
let i = r.safeParse(e);
|
|
4843
4846
|
if (!i.success) throw TypeError(`operations[${t}]: ${i.error.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`);
|
|
4844
4847
|
return i.data;
|
|
4845
4848
|
});
|
|
4846
4849
|
}
|
|
4847
|
-
function
|
|
4848
|
-
let t = e == null ?
|
|
4850
|
+
function Ac(e) {
|
|
4851
|
+
let t = e == null ? Oc : Dc.get(e);
|
|
4849
4852
|
if (t == null) throw TypeError(`Unknown operation ${JSON.stringify(e)}.`);
|
|
4850
|
-
return
|
|
4853
|
+
return mo(t, { io: "input" });
|
|
4851
4854
|
}
|
|
4852
4855
|
//#endregion
|
|
4853
4856
|
//#region src/flow/common/change.ts
|
|
4854
|
-
var
|
|
4855
|
-
|
|
4857
|
+
var jc = /* @__PURE__ */ new Set([
|
|
4858
|
+
"const",
|
|
4859
|
+
"enum",
|
|
4860
|
+
"exclusiveMaximum",
|
|
4861
|
+
"exclusiveMinimum",
|
|
4862
|
+
"maximum",
|
|
4863
|
+
"maxItems",
|
|
4864
|
+
"maxLength",
|
|
4865
|
+
"maxProperties",
|
|
4866
|
+
"minimum",
|
|
4867
|
+
"minItems",
|
|
4868
|
+
"minLength",
|
|
4869
|
+
"minProperties",
|
|
4870
|
+
"multipleOf",
|
|
4871
|
+
"pattern",
|
|
4872
|
+
"required",
|
|
4873
|
+
"type"
|
|
4874
|
+
]);
|
|
4875
|
+
function Mc(e) {
|
|
4876
|
+
return jc.has(e);
|
|
4877
|
+
}
|
|
4878
|
+
var Nc = 80;
|
|
4879
|
+
function Pc(e) {
|
|
4856
4880
|
let t = e.trim();
|
|
4857
4881
|
if (t.length == 0) return "empty";
|
|
4858
4882
|
if (t.length > 80) return "tooLong";
|
|
@@ -4862,13 +4886,13 @@ function jc(e) {
|
|
|
4862
4886
|
}
|
|
4863
4887
|
if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(t)) return "specialCharacter";
|
|
4864
4888
|
}
|
|
4865
|
-
function
|
|
4889
|
+
function Fc(e) {
|
|
4866
4890
|
return e.length <= 256 && /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) && e.slice(0, 3).toUpperCase() != "OO_";
|
|
4867
4891
|
}
|
|
4868
|
-
function
|
|
4892
|
+
function Ic(e) {
|
|
4869
4893
|
return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
|
|
4870
4894
|
}
|
|
4871
|
-
function
|
|
4895
|
+
function Lc(e) {
|
|
4872
4896
|
if (!Array.isArray(e)) throw TypeError("Connector capabilities must be an array.");
|
|
4873
4897
|
let t = /* @__PURE__ */ new Set();
|
|
4874
4898
|
return e.map((e) => {
|
|
@@ -4907,24 +4931,24 @@ function Pc(e) {
|
|
|
4907
4931
|
function X(e) {
|
|
4908
4932
|
return e.trim().normalize("NFC");
|
|
4909
4933
|
}
|
|
4910
|
-
function
|
|
4934
|
+
function Rc(e, t) {
|
|
4911
4935
|
let n = X(e), r = new Set([...t].map(X));
|
|
4912
4936
|
if (!r.has(n)) return n;
|
|
4913
4937
|
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;
|
|
4914
4938
|
for (; r.has(`${s} (${c})`);) c += 1;
|
|
4915
4939
|
return `${s} (${c})`;
|
|
4916
4940
|
}
|
|
4917
|
-
function
|
|
4941
|
+
function zc(e, t, n) {
|
|
4918
4942
|
let r = X(n);
|
|
4919
4943
|
return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null && X(n.name) == r) ? "duplicate" : void 0;
|
|
4920
4944
|
}
|
|
4921
|
-
var
|
|
4945
|
+
var Bc = class extends Error {
|
|
4922
4946
|
constructor(e) {
|
|
4923
4947
|
super(e), this.name = "FlowChangeError";
|
|
4924
4948
|
}
|
|
4925
4949
|
};
|
|
4926
4950
|
function Z(e) {
|
|
4927
|
-
throw new
|
|
4951
|
+
throw new Bc(e);
|
|
4928
4952
|
}
|
|
4929
4953
|
function Q(e, t) {
|
|
4930
4954
|
if (t.kind == "flow") return e.graph;
|
|
@@ -4948,7 +4972,7 @@ function $(e, t, n) {
|
|
|
4948
4972
|
}
|
|
4949
4973
|
};
|
|
4950
4974
|
}
|
|
4951
|
-
function
|
|
4975
|
+
function Vc(e, t) {
|
|
4952
4976
|
if (!("inputs" in e)) return e;
|
|
4953
4977
|
let n = { ...e.inputs };
|
|
4954
4978
|
for (let [e, r] of Object.entries(n)) {
|
|
@@ -4964,7 +4988,7 @@ function Rc(e, t) {
|
|
|
4964
4988
|
inputs: n
|
|
4965
4989
|
};
|
|
4966
4990
|
}
|
|
4967
|
-
function
|
|
4991
|
+
function Hc(e, n) {
|
|
4968
4992
|
let r = { ...e.document }, i = { ...e.modules };
|
|
4969
4993
|
for (let e of n) switch (e.kind) {
|
|
4970
4994
|
case "binding.create":
|
|
@@ -5045,8 +5069,8 @@ function zc(e, n) {
|
|
|
5045
5069
|
}
|
|
5046
5070
|
case "graph.node.create": {
|
|
5047
5071
|
let t = Q(r, e.target);
|
|
5048
|
-
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 &&
|
|
5049
|
-
let n = X(e.node.name), i =
|
|
5072
|
+
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 && Lc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
|
|
5073
|
+
let n = X(e.node.name), i = zc(t, e.nodeId, n);
|
|
5050
5074
|
i == "empty" && Z("A Node name cannot be empty."), i == "duplicate" && Z("A Node with this name already exists in the target graph.");
|
|
5051
5075
|
let a = n == e.node.name ? e.node : {
|
|
5052
5076
|
...e.node,
|
|
@@ -5064,7 +5088,7 @@ function zc(e, n) {
|
|
|
5064
5088
|
case "graph.node.delete": {
|
|
5065
5089
|
let t = Q(r, e.target);
|
|
5066
5090
|
t.nodes[e.nodeId] ?? Z("The Node does not exist in the target graph.");
|
|
5067
|
-
let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => n.has(e) ? [] : [[e,
|
|
5091
|
+
let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => n.has(e) ? [] : [[e, Vc(t, n)]]));
|
|
5068
5092
|
if (Object.assign(r, $(r, e.target, {
|
|
5069
5093
|
...t,
|
|
5070
5094
|
edges: t.edges.filter((e) => !n.has(e.source) && !n.has(e.target)),
|
|
@@ -5090,7 +5114,7 @@ function zc(e, n) {
|
|
|
5090
5114
|
let a = { ...i };
|
|
5091
5115
|
if (e.field == "name") {
|
|
5092
5116
|
typeof e.value != "string" && Z("A Node name cannot be empty.");
|
|
5093
|
-
let t = X(e.value), r =
|
|
5117
|
+
let t = X(e.value), r = zc(n, e.nodeId, t);
|
|
5094
5118
|
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 });
|
|
5095
5119
|
} else e.value == null ? Reflect.deleteProperty(a, e.field) : Object.assign(a, { [e.field]: e.value });
|
|
5096
5120
|
Object.assign(r, $(r, e.target, {
|
|
@@ -5122,7 +5146,7 @@ function zc(e, n) {
|
|
|
5122
5146
|
let n = Q(r, e.target), i = n.nodes[e.nodeId];
|
|
5123
5147
|
(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.");
|
|
5124
5148
|
let a = { ...i.task };
|
|
5125
|
-
e.value === void 0 ? delete a.capabilities : a.capabilities =
|
|
5149
|
+
e.value === void 0 ? delete a.capabilities : a.capabilities = Lc(e.value), Object.assign(r, $(r, e.target, {
|
|
5126
5150
|
...n,
|
|
5127
5151
|
nodes: {
|
|
5128
5152
|
...n.nodes,
|
|
@@ -5194,13 +5218,9 @@ function zc(e, n) {
|
|
|
5194
5218
|
let n = r.graph, i = n.nodes[e.nodeId];
|
|
5195
5219
|
(i?.kind != "wait" || !t({
|
|
5196
5220
|
actions: i.actions,
|
|
5197
|
-
...i.notification == null ? {} : { notification: i.notification },
|
|
5198
5221
|
prompt: i.prompt
|
|
5199
5222
|
}, e.before)) && Z("The Wait Node changed before this operation was applied.");
|
|
5200
|
-
let
|
|
5201
|
-
...o,
|
|
5202
|
-
...e.value
|
|
5203
|
-
} : {
|
|
5223
|
+
let a = {
|
|
5204
5224
|
...i,
|
|
5205
5225
|
...e.value
|
|
5206
5226
|
};
|
|
@@ -5208,7 +5228,7 @@ function zc(e, n) {
|
|
|
5208
5228
|
...n,
|
|
5209
5229
|
nodes: {
|
|
5210
5230
|
...n.nodes,
|
|
5211
|
-
[e.nodeId]:
|
|
5231
|
+
[e.nodeId]: a
|
|
5212
5232
|
}
|
|
5213
5233
|
};
|
|
5214
5234
|
break;
|
|
@@ -5292,7 +5312,7 @@ function zc(e, n) {
|
|
|
5292
5312
|
}
|
|
5293
5313
|
case "subflow.create":
|
|
5294
5314
|
r.subflows[e.subflowId] != null && Z("A Subflow with this ID already exists.");
|
|
5295
|
-
for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 &&
|
|
5315
|
+
for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Lc(t.task.capabilities);
|
|
5296
5316
|
r.subflows = {
|
|
5297
5317
|
...r.subflows,
|
|
5298
5318
|
[e.subflowId]: e.subflow
|
|
@@ -5388,4 +5408,4 @@ function zc(e, n) {
|
|
|
5388
5408
|
};
|
|
5389
5409
|
}
|
|
5390
5410
|
//#endregion
|
|
5391
|
-
export {
|
|
5411
|
+
export { Bc as FlowChangeError, Hc as applyFlowChanges, Ac as changeOperationsSchema, kc as decodeChangeOperations, Lc as decodeConnectorCapabilities, Mc as isSchemaKeyword, Rc as nextNodeName, zc as nodeNameIssue, X as normalizeNodeName, Ic as portsByHandle, Pc as resourceNameIssue, Nc as resourceNameMaxLength, Fc as validVariableName };
|