@camstack/addon-provider-homematic 1.2.194 → 1.2.195
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/CHANGELOG.md +11 -0
- package/dist/.bundle-modules.json +17 -8
- package/dist/_stub.js +2484 -1365
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-Da2xbO9l.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BxmxWSOr.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DMlVGmnP.mjs +26 -0
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-D_jZoh_U.mjs +26 -0
- package/dist/addon-provider-homematic.css +1 -1
- package/dist/addon.js +12914 -2312
- package/dist/addon.mjs +12914 -2312
- package/dist/{hostInit-DAlzBsEA.mjs → hostInit-DVAY-ltL.mjs} +3 -3
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BvA2vFCp.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-B3yyDS0x.mjs} +1 -1
- package/dist/widgets/_stub.js +4769 -0
- package/dist/widgets/_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-BPDLKZtI.mjs +156 -0
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C6zY_Ytj.mjs +26 -0
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react__loadShare__.js-Cz6ebdBh.mjs +26 -0
- package/dist/{_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-15LkOsGv.mjs → widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B8RWlLTT.mjs} +2 -2
- package/dist/widgets/dist-CYZr2fwk.mjs +2726 -0
- package/dist/widgets/hostInit-BlyQmRnG.mjs +129 -0
- package/dist/widgets/remoteEntry.js +134 -0
- package/dist/widgets/remoteEntry.ssr.js +33 -0
- package/dist/widgets/virtualExposes-C91wF3sM.mjs +27 -0
- package/dist/widgets/virtual_mf-exposes-ssr___mfe_internal__addon_provider_homematic_widgets__remoteEntry_js-DpwWfhOB.mjs +10 -0
- package/i18n/en.json +6 -1
- package/i18n/it.json +6 -1
- package/package.json +9 -5
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CqBgrgbo.mjs +0 -26
|
@@ -0,0 +1,4769 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C6zY_Ytj.mjs";
|
|
2
|
+
import { a as p, i as m, n as h, o as ee, r as g, s as _, t as v } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react__loadShare__.js-Cz6ebdBh.mjs";
|
|
3
|
+
import { n as y, t as b } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B8RWlLTT.mjs";
|
|
4
|
+
//#region ../../node_modules/zod/v4/core/core.js
|
|
5
|
+
var x;
|
|
6
|
+
function S(e, t, n) {
|
|
7
|
+
function r(n, r) {
|
|
8
|
+
if (n._zod || Object.defineProperty(n, "_zod", {
|
|
9
|
+
value: {
|
|
10
|
+
def: r,
|
|
11
|
+
constr: o,
|
|
12
|
+
traits: /* @__PURE__ */ new Set()
|
|
13
|
+
},
|
|
14
|
+
enumerable: !1
|
|
15
|
+
}), n._zod.traits.has(e)) return;
|
|
16
|
+
n._zod.traits.add(e), t(n, r);
|
|
17
|
+
let i = o.prototype, a = Object.keys(i);
|
|
18
|
+
for (let e = 0; e < a.length; e++) {
|
|
19
|
+
let t = a[e];
|
|
20
|
+
t in n || (n[t] = i[t].bind(n));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
let i = n?.Parent ?? Object;
|
|
24
|
+
class a extends i {}
|
|
25
|
+
Object.defineProperty(a, "name", { value: e });
|
|
26
|
+
function o(e) {
|
|
27
|
+
var t;
|
|
28
|
+
let i = n?.Parent ? new a() : this;
|
|
29
|
+
r(i, e), (t = i._zod).deferred ?? (t.deferred = []);
|
|
30
|
+
for (let e of i._zod.deferred) e();
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
|
|
34
|
+
}
|
|
35
|
+
var C = class extends Error {
|
|
36
|
+
constructor() {
|
|
37
|
+
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
38
|
+
}
|
|
39
|
+
}, te = class extends Error {
|
|
40
|
+
constructor(e) {
|
|
41
|
+
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
(x = globalThis).__zod_globalConfig ?? (x.__zod_globalConfig = {});
|
|
45
|
+
var w = globalThis.__zod_globalConfig;
|
|
46
|
+
function T(e) {
|
|
47
|
+
return e && Object.assign(w, e), w;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region ../../node_modules/zod/v4/core/util.js
|
|
51
|
+
function ne(e) {
|
|
52
|
+
let t = Object.values(e).filter((e) => typeof e == "number");
|
|
53
|
+
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
54
|
+
}
|
|
55
|
+
function re(e, t) {
|
|
56
|
+
return typeof t == "bigint" ? t.toString() : t;
|
|
57
|
+
}
|
|
58
|
+
function ie(e) {
|
|
59
|
+
return { get value() {
|
|
60
|
+
{
|
|
61
|
+
let t = e();
|
|
62
|
+
return Object.defineProperty(this, "value", { value: t }), t;
|
|
63
|
+
}
|
|
64
|
+
throw Error("cached value already set");
|
|
65
|
+
} };
|
|
66
|
+
}
|
|
67
|
+
function ae(e) {
|
|
68
|
+
return e == null;
|
|
69
|
+
}
|
|
70
|
+
function oe(e) {
|
|
71
|
+
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
72
|
+
return e.slice(t, n);
|
|
73
|
+
}
|
|
74
|
+
function se(e, t) {
|
|
75
|
+
let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
|
|
76
|
+
return Math.abs(n - r) < i ? 0 : n - r;
|
|
77
|
+
}
|
|
78
|
+
var ce = /* @__PURE__*/ Symbol("evaluating");
|
|
79
|
+
function E(e, t, n) {
|
|
80
|
+
let r;
|
|
81
|
+
Object.defineProperty(e, t, {
|
|
82
|
+
get() {
|
|
83
|
+
if (r !== ce) return r === void 0 && (r = ce, r = n()), r;
|
|
84
|
+
},
|
|
85
|
+
set(n) {
|
|
86
|
+
Object.defineProperty(e, t, { value: n });
|
|
87
|
+
},
|
|
88
|
+
configurable: !0
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function D(e, t, n) {
|
|
92
|
+
Object.defineProperty(e, t, {
|
|
93
|
+
value: n,
|
|
94
|
+
writable: !0,
|
|
95
|
+
enumerable: !0,
|
|
96
|
+
configurable: !0
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function O(...e) {
|
|
100
|
+
let t = {};
|
|
101
|
+
for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
|
|
102
|
+
return Object.defineProperties({}, t);
|
|
103
|
+
}
|
|
104
|
+
function le(e) {
|
|
105
|
+
return JSON.stringify(e);
|
|
106
|
+
}
|
|
107
|
+
function ue(e) {
|
|
108
|
+
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
109
|
+
}
|
|
110
|
+
var de = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
111
|
+
function fe(e) {
|
|
112
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
113
|
+
}
|
|
114
|
+
var pe = /* @__PURE__*/ ie(() => {
|
|
115
|
+
if (w.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
116
|
+
try {
|
|
117
|
+
return Function(""), !0;
|
|
118
|
+
} catch {
|
|
119
|
+
return !1;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
function k(e) {
|
|
123
|
+
if (fe(e) === !1) return !1;
|
|
124
|
+
let t = e.constructor;
|
|
125
|
+
if (t === void 0 || typeof t != "function") return !0;
|
|
126
|
+
let n = t.prototype;
|
|
127
|
+
return !(fe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
128
|
+
}
|
|
129
|
+
function me(e) {
|
|
130
|
+
return k(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
131
|
+
}
|
|
132
|
+
var he = /* @__PURE__*/ new Set([
|
|
133
|
+
"string",
|
|
134
|
+
"number",
|
|
135
|
+
"symbol"
|
|
136
|
+
]);
|
|
137
|
+
function A(e) {
|
|
138
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
139
|
+
}
|
|
140
|
+
function j(e, t, n) {
|
|
141
|
+
let r = new e._zod.constr(t ?? e._zod.def);
|
|
142
|
+
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
143
|
+
}
|
|
144
|
+
function M(e) {
|
|
145
|
+
let t = e;
|
|
146
|
+
if (!t) return {};
|
|
147
|
+
if (typeof t == "string") return { error: () => t };
|
|
148
|
+
if (t?.message !== void 0) {
|
|
149
|
+
if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
|
|
150
|
+
t.error = t.message;
|
|
151
|
+
}
|
|
152
|
+
return delete t.message, typeof t.error == "string" ? {
|
|
153
|
+
...t,
|
|
154
|
+
error: () => t.error
|
|
155
|
+
} : t;
|
|
156
|
+
}
|
|
157
|
+
function ge(e) {
|
|
158
|
+
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
159
|
+
}
|
|
160
|
+
var _e = {
|
|
161
|
+
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
162
|
+
int32: [-2147483648, 2147483647],
|
|
163
|
+
uint32: [0, 4294967295],
|
|
164
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
165
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
166
|
+
};
|
|
167
|
+
function ve(e, t) {
|
|
168
|
+
let n = e._zod.def, r = n.checks;
|
|
169
|
+
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
170
|
+
return j(e, O(e._zod.def, {
|
|
171
|
+
get shape() {
|
|
172
|
+
let e = {};
|
|
173
|
+
for (let r in t) {
|
|
174
|
+
if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
|
|
175
|
+
t[r] && (e[r] = n.shape[r]);
|
|
176
|
+
}
|
|
177
|
+
return D(this, "shape", e), e;
|
|
178
|
+
},
|
|
179
|
+
checks: []
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
function ye(e, t) {
|
|
183
|
+
let n = e._zod.def, r = n.checks;
|
|
184
|
+
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
185
|
+
return j(e, O(e._zod.def, {
|
|
186
|
+
get shape() {
|
|
187
|
+
let r = { ...e._zod.def.shape };
|
|
188
|
+
for (let e in t) {
|
|
189
|
+
if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
|
|
190
|
+
t[e] && delete r[e];
|
|
191
|
+
}
|
|
192
|
+
return D(this, "shape", r), r;
|
|
193
|
+
},
|
|
194
|
+
checks: []
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
function be(e, t) {
|
|
198
|
+
if (!k(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
199
|
+
let n = e._zod.def.checks;
|
|
200
|
+
if (n && n.length > 0) {
|
|
201
|
+
let n = e._zod.def.shape;
|
|
202
|
+
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
203
|
+
}
|
|
204
|
+
return j(e, O(e._zod.def, { get shape() {
|
|
205
|
+
let n = {
|
|
206
|
+
...e._zod.def.shape,
|
|
207
|
+
...t
|
|
208
|
+
};
|
|
209
|
+
return D(this, "shape", n), n;
|
|
210
|
+
} }));
|
|
211
|
+
}
|
|
212
|
+
function xe(e, t) {
|
|
213
|
+
if (!k(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
214
|
+
return j(e, O(e._zod.def, { get shape() {
|
|
215
|
+
let n = {
|
|
216
|
+
...e._zod.def.shape,
|
|
217
|
+
...t
|
|
218
|
+
};
|
|
219
|
+
return D(this, "shape", n), n;
|
|
220
|
+
} }));
|
|
221
|
+
}
|
|
222
|
+
function Se(e, t) {
|
|
223
|
+
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
224
|
+
return j(e, O(e._zod.def, {
|
|
225
|
+
get shape() {
|
|
226
|
+
let n = {
|
|
227
|
+
...e._zod.def.shape,
|
|
228
|
+
...t._zod.def.shape
|
|
229
|
+
};
|
|
230
|
+
return D(this, "shape", n), n;
|
|
231
|
+
},
|
|
232
|
+
get catchall() {
|
|
233
|
+
return t._zod.def.catchall;
|
|
234
|
+
},
|
|
235
|
+
checks: t._zod.def.checks ?? []
|
|
236
|
+
}));
|
|
237
|
+
}
|
|
238
|
+
function Ce(e, t, n) {
|
|
239
|
+
let r = t._zod.def.checks;
|
|
240
|
+
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
241
|
+
return j(t, O(t._zod.def, {
|
|
242
|
+
get shape() {
|
|
243
|
+
let r = t._zod.def.shape, i = { ...r };
|
|
244
|
+
if (n) for (let t in n) {
|
|
245
|
+
if (!(t in r)) throw Error(`Unrecognized key: "${t}"`);
|
|
246
|
+
n[t] && (i[t] = e ? new e({
|
|
247
|
+
type: "optional",
|
|
248
|
+
innerType: r[t]
|
|
249
|
+
}) : r[t]);
|
|
250
|
+
}
|
|
251
|
+
else for (let t in r) i[t] = e ? new e({
|
|
252
|
+
type: "optional",
|
|
253
|
+
innerType: r[t]
|
|
254
|
+
}) : r[t];
|
|
255
|
+
return D(this, "shape", i), i;
|
|
256
|
+
},
|
|
257
|
+
checks: []
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
function we(e, t, n) {
|
|
261
|
+
return j(t, O(t._zod.def, { get shape() {
|
|
262
|
+
let r = t._zod.def.shape, i = { ...r };
|
|
263
|
+
if (n) for (let t in n) {
|
|
264
|
+
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
265
|
+
n[t] && (i[t] = new e({
|
|
266
|
+
type: "nonoptional",
|
|
267
|
+
innerType: r[t]
|
|
268
|
+
}));
|
|
269
|
+
}
|
|
270
|
+
else for (let t in r) i[t] = new e({
|
|
271
|
+
type: "nonoptional",
|
|
272
|
+
innerType: r[t]
|
|
273
|
+
});
|
|
274
|
+
return D(this, "shape", i), i;
|
|
275
|
+
} }));
|
|
276
|
+
}
|
|
277
|
+
function N(e, t = 0) {
|
|
278
|
+
if (e.aborted === !0) return !0;
|
|
279
|
+
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
280
|
+
return !1;
|
|
281
|
+
}
|
|
282
|
+
function Te(e, t = 0) {
|
|
283
|
+
if (e.aborted === !0) return !0;
|
|
284
|
+
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
285
|
+
return !1;
|
|
286
|
+
}
|
|
287
|
+
function P(e, t) {
|
|
288
|
+
return t.map((t) => {
|
|
289
|
+
var n;
|
|
290
|
+
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function Ee(e) {
|
|
294
|
+
return typeof e == "string" ? e : e?.message;
|
|
295
|
+
}
|
|
296
|
+
function F(e, t, n) {
|
|
297
|
+
let r = e.message ? e.message : Ee(e.inst?._zod.def?.error?.(e)) ?? Ee(t?.error?.(e)) ?? Ee(n.customError?.(e)) ?? Ee(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
|
|
298
|
+
return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
|
|
299
|
+
}
|
|
300
|
+
function De(e) {
|
|
301
|
+
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
302
|
+
}
|
|
303
|
+
function Oe(...e) {
|
|
304
|
+
let [t, n, r] = e;
|
|
305
|
+
return typeof t == "string" ? {
|
|
306
|
+
message: t,
|
|
307
|
+
code: "custom",
|
|
308
|
+
input: n,
|
|
309
|
+
inst: r
|
|
310
|
+
} : { ...t };
|
|
311
|
+
}
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region ../../node_modules/zod/v4/core/errors.js
|
|
314
|
+
var ke = (e, t) => {
|
|
315
|
+
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
316
|
+
value: e._zod,
|
|
317
|
+
enumerable: !1
|
|
318
|
+
}), Object.defineProperty(e, "issues", {
|
|
319
|
+
value: t,
|
|
320
|
+
enumerable: !1
|
|
321
|
+
}), e.message = JSON.stringify(t, re, 2), Object.defineProperty(e, "toString", {
|
|
322
|
+
value: () => e.message,
|
|
323
|
+
enumerable: !1
|
|
324
|
+
});
|
|
325
|
+
}, Ae = S("$ZodError", ke), je = S("$ZodError", ke, { Parent: Error });
|
|
326
|
+
function Me(e, t = (e) => e.message) {
|
|
327
|
+
let n = {}, r = [];
|
|
328
|
+
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
329
|
+
return {
|
|
330
|
+
formErrors: r,
|
|
331
|
+
fieldErrors: n
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function Ne(e, t = (e) => e.message) {
|
|
335
|
+
let n = { _errors: [] }, r = (e, i = []) => {
|
|
336
|
+
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
337
|
+
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
338
|
+
else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
|
|
339
|
+
else {
|
|
340
|
+
let e = [...i, ...a.path];
|
|
341
|
+
if (e.length === 0) n._errors.push(t(a));
|
|
342
|
+
else {
|
|
343
|
+
let r = n, i = 0;
|
|
344
|
+
for (; i < e.length;) {
|
|
345
|
+
let n = e[i];
|
|
346
|
+
i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
return r(e), n;
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region ../../node_modules/zod/v4/core/parse.js
|
|
355
|
+
var Pe = (e) => (t, n, r, i) => {
|
|
356
|
+
let a = r ? {
|
|
357
|
+
...r,
|
|
358
|
+
async: !1
|
|
359
|
+
} : { async: !1 }, o = t._zod.run({
|
|
360
|
+
value: n,
|
|
361
|
+
issues: []
|
|
362
|
+
}, a);
|
|
363
|
+
if (o instanceof Promise) throw new C();
|
|
364
|
+
if (o.issues.length) {
|
|
365
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => F(e, a, T())));
|
|
366
|
+
throw de(t, i?.callee), t;
|
|
367
|
+
}
|
|
368
|
+
return o.value;
|
|
369
|
+
}, Fe = (e) => async (t, n, r, i) => {
|
|
370
|
+
let a = r ? {
|
|
371
|
+
...r,
|
|
372
|
+
async: !0
|
|
373
|
+
} : { async: !0 }, o = t._zod.run({
|
|
374
|
+
value: n,
|
|
375
|
+
issues: []
|
|
376
|
+
}, a);
|
|
377
|
+
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
378
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => F(e, a, T())));
|
|
379
|
+
throw de(t, i?.callee), t;
|
|
380
|
+
}
|
|
381
|
+
return o.value;
|
|
382
|
+
}, Ie = (e) => (t, n, r) => {
|
|
383
|
+
let i = r ? {
|
|
384
|
+
...r,
|
|
385
|
+
async: !1
|
|
386
|
+
} : { async: !1 }, a = t._zod.run({
|
|
387
|
+
value: n,
|
|
388
|
+
issues: []
|
|
389
|
+
}, i);
|
|
390
|
+
if (a instanceof Promise) throw new C();
|
|
391
|
+
return a.issues.length ? {
|
|
392
|
+
success: !1,
|
|
393
|
+
error: new (e ?? Ae)(a.issues.map((e) => F(e, i, T())))
|
|
394
|
+
} : {
|
|
395
|
+
success: !0,
|
|
396
|
+
data: a.value
|
|
397
|
+
};
|
|
398
|
+
}, Le = /* @__PURE__*/ Ie(je), Re = (e) => async (t, n, r) => {
|
|
399
|
+
let i = r ? {
|
|
400
|
+
...r,
|
|
401
|
+
async: !0
|
|
402
|
+
} : { async: !0 }, a = t._zod.run({
|
|
403
|
+
value: n,
|
|
404
|
+
issues: []
|
|
405
|
+
}, i);
|
|
406
|
+
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
407
|
+
success: !1,
|
|
408
|
+
error: new e(a.issues.map((e) => F(e, i, T())))
|
|
409
|
+
} : {
|
|
410
|
+
success: !0,
|
|
411
|
+
data: a.value
|
|
412
|
+
};
|
|
413
|
+
}, ze = /* @__PURE__*/ Re(je), Be = (e) => (t, n, r) => {
|
|
414
|
+
let i = r ? {
|
|
415
|
+
...r,
|
|
416
|
+
direction: "backward"
|
|
417
|
+
} : { direction: "backward" };
|
|
418
|
+
return Pe(e)(t, n, i);
|
|
419
|
+
}, Ve = (e) => (t, n, r) => Pe(e)(t, n, r), He = (e) => async (t, n, r) => {
|
|
420
|
+
let i = r ? {
|
|
421
|
+
...r,
|
|
422
|
+
direction: "backward"
|
|
423
|
+
} : { direction: "backward" };
|
|
424
|
+
return Fe(e)(t, n, i);
|
|
425
|
+
}, Ue = (e) => async (t, n, r) => Fe(e)(t, n, r), We = (e) => (t, n, r) => {
|
|
426
|
+
let i = r ? {
|
|
427
|
+
...r,
|
|
428
|
+
direction: "backward"
|
|
429
|
+
} : { direction: "backward" };
|
|
430
|
+
return Ie(e)(t, n, i);
|
|
431
|
+
}, Ge = (e) => (t, n, r) => Ie(e)(t, n, r), Ke = (e) => async (t, n, r) => {
|
|
432
|
+
let i = r ? {
|
|
433
|
+
...r,
|
|
434
|
+
direction: "backward"
|
|
435
|
+
} : { direction: "backward" };
|
|
436
|
+
return Re(e)(t, n, i);
|
|
437
|
+
}, qe = (e) => async (t, n, r) => Re(e)(t, n, r), Je = /^[cC][0-9a-z]{6,}$/, Ye = /^[0-9a-z]+$/, Xe = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ze = /^[0-9a-vA-V]{20}$/, Qe = /^[A-Za-z0-9]{27}$/, $e = /^[a-zA-Z0-9_-]{21}$/, et = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, tt = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, nt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, rt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, it = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
438
|
+
function at() {
|
|
439
|
+
return new RegExp(it, "u");
|
|
440
|
+
}
|
|
441
|
+
var ot = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, st = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, ct = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, lt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ut = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, dt = /^[A-Za-z0-9_-]*$/, ft = /^https?$/, pt = /^\+[1-9]\d{6,14}$/, mt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", ht = /*@__PURE__*/ RegExp(`^${mt}$`);
|
|
442
|
+
function gt(e) {
|
|
443
|
+
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
444
|
+
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
445
|
+
}
|
|
446
|
+
function _t(e) {
|
|
447
|
+
return RegExp(`^${gt(e)}$`);
|
|
448
|
+
}
|
|
449
|
+
function vt(e) {
|
|
450
|
+
let t = gt({ precision: e.precision }), n = ["Z"];
|
|
451
|
+
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
452
|
+
let r = `${t}(?:${n.join("|")})`;
|
|
453
|
+
return RegExp(`^${mt}T(?:${r})$`);
|
|
454
|
+
}
|
|
455
|
+
var yt = (e) => {
|
|
456
|
+
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
457
|
+
return RegExp(`^${t}$`);
|
|
458
|
+
}, bt = /^-?\d+$/, xt = /^-?\d+(?:\.\d+)?$/, St = /^(?:true|false)$/i, Ct = /^null$/i, wt = /^[^A-Z]*$/, Tt = /^[^a-z]*$/, I = /*@__PURE__*/ S("$ZodCheck", (e, t) => {
|
|
459
|
+
var n;
|
|
460
|
+
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
461
|
+
}), Et = {
|
|
462
|
+
number: "number",
|
|
463
|
+
bigint: "bigint",
|
|
464
|
+
object: "date"
|
|
465
|
+
}, Dt = /*@__PURE__*/ S("$ZodCheckLessThan", (e, t) => {
|
|
466
|
+
I.init(e, t);
|
|
467
|
+
let n = Et[typeof t.value];
|
|
468
|
+
e._zod.onattach.push((e) => {
|
|
469
|
+
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
470
|
+
t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
471
|
+
}), e._zod.check = (r) => {
|
|
472
|
+
(t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
|
|
473
|
+
origin: n,
|
|
474
|
+
code: "too_big",
|
|
475
|
+
maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
476
|
+
input: r.value,
|
|
477
|
+
inclusive: t.inclusive,
|
|
478
|
+
inst: e,
|
|
479
|
+
continue: !t.abort
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
}), Ot = /*@__PURE__*/ S("$ZodCheckGreaterThan", (e, t) => {
|
|
483
|
+
I.init(e, t);
|
|
484
|
+
let n = Et[typeof t.value];
|
|
485
|
+
e._zod.onattach.push((e) => {
|
|
486
|
+
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
487
|
+
t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
488
|
+
}), e._zod.check = (r) => {
|
|
489
|
+
(t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
|
|
490
|
+
origin: n,
|
|
491
|
+
code: "too_small",
|
|
492
|
+
minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
493
|
+
input: r.value,
|
|
494
|
+
inclusive: t.inclusive,
|
|
495
|
+
inst: e,
|
|
496
|
+
continue: !t.abort
|
|
497
|
+
});
|
|
498
|
+
};
|
|
499
|
+
}), kt = /*@__PURE__*/ S("$ZodCheckMultipleOf", (e, t) => {
|
|
500
|
+
I.init(e, t), e._zod.onattach.push((e) => {
|
|
501
|
+
var n;
|
|
502
|
+
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
503
|
+
}), e._zod.check = (n) => {
|
|
504
|
+
if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
505
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : se(n.value, t.value) === 0) || n.issues.push({
|
|
506
|
+
origin: typeof n.value,
|
|
507
|
+
code: "not_multiple_of",
|
|
508
|
+
divisor: t.value,
|
|
509
|
+
input: n.value,
|
|
510
|
+
inst: e,
|
|
511
|
+
continue: !t.abort
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
}), At = /*@__PURE__*/ S("$ZodCheckNumberFormat", (e, t) => {
|
|
515
|
+
I.init(e, t), t.format = t.format || "float64";
|
|
516
|
+
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = _e[t.format];
|
|
517
|
+
e._zod.onattach.push((e) => {
|
|
518
|
+
let r = e._zod.bag;
|
|
519
|
+
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = bt);
|
|
520
|
+
}), e._zod.check = (o) => {
|
|
521
|
+
let s = o.value;
|
|
522
|
+
if (n) {
|
|
523
|
+
if (!Number.isInteger(s)) {
|
|
524
|
+
o.issues.push({
|
|
525
|
+
expected: r,
|
|
526
|
+
format: t.format,
|
|
527
|
+
code: "invalid_type",
|
|
528
|
+
continue: !1,
|
|
529
|
+
input: s,
|
|
530
|
+
inst: e
|
|
531
|
+
});
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
if (!Number.isSafeInteger(s)) {
|
|
535
|
+
s > 0 ? o.issues.push({
|
|
536
|
+
input: s,
|
|
537
|
+
code: "too_big",
|
|
538
|
+
maximum: 2 ** 53 - 1,
|
|
539
|
+
note: "Integers must be within the safe integer range.",
|
|
540
|
+
inst: e,
|
|
541
|
+
origin: r,
|
|
542
|
+
inclusive: !0,
|
|
543
|
+
continue: !t.abort
|
|
544
|
+
}) : o.issues.push({
|
|
545
|
+
input: s,
|
|
546
|
+
code: "too_small",
|
|
547
|
+
minimum: -(2 ** 53 - 1),
|
|
548
|
+
note: "Integers must be within the safe integer range.",
|
|
549
|
+
inst: e,
|
|
550
|
+
origin: r,
|
|
551
|
+
inclusive: !0,
|
|
552
|
+
continue: !t.abort
|
|
553
|
+
});
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
s < i && o.issues.push({
|
|
558
|
+
origin: "number",
|
|
559
|
+
input: s,
|
|
560
|
+
code: "too_small",
|
|
561
|
+
minimum: i,
|
|
562
|
+
inclusive: !0,
|
|
563
|
+
inst: e,
|
|
564
|
+
continue: !t.abort
|
|
565
|
+
}), s > a && o.issues.push({
|
|
566
|
+
origin: "number",
|
|
567
|
+
input: s,
|
|
568
|
+
code: "too_big",
|
|
569
|
+
maximum: a,
|
|
570
|
+
inclusive: !0,
|
|
571
|
+
inst: e,
|
|
572
|
+
continue: !t.abort
|
|
573
|
+
});
|
|
574
|
+
};
|
|
575
|
+
}), jt = /*@__PURE__*/ S("$ZodCheckMaxLength", (e, t) => {
|
|
576
|
+
var n;
|
|
577
|
+
I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
578
|
+
let t = e.value;
|
|
579
|
+
return !ae(t) && t.length !== void 0;
|
|
580
|
+
}), e._zod.onattach.push((e) => {
|
|
581
|
+
let n = e._zod.bag.maximum ?? Infinity;
|
|
582
|
+
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
583
|
+
}), e._zod.check = (n) => {
|
|
584
|
+
let r = n.value;
|
|
585
|
+
if (r.length <= t.maximum) return;
|
|
586
|
+
let i = De(r);
|
|
587
|
+
n.issues.push({
|
|
588
|
+
origin: i,
|
|
589
|
+
code: "too_big",
|
|
590
|
+
maximum: t.maximum,
|
|
591
|
+
inclusive: !0,
|
|
592
|
+
input: r,
|
|
593
|
+
inst: e,
|
|
594
|
+
continue: !t.abort
|
|
595
|
+
});
|
|
596
|
+
};
|
|
597
|
+
}), Mt = /*@__PURE__*/ S("$ZodCheckMinLength", (e, t) => {
|
|
598
|
+
var n;
|
|
599
|
+
I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
600
|
+
let t = e.value;
|
|
601
|
+
return !ae(t) && t.length !== void 0;
|
|
602
|
+
}), e._zod.onattach.push((e) => {
|
|
603
|
+
let n = e._zod.bag.minimum ?? -Infinity;
|
|
604
|
+
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
605
|
+
}), e._zod.check = (n) => {
|
|
606
|
+
let r = n.value;
|
|
607
|
+
if (r.length >= t.minimum) return;
|
|
608
|
+
let i = De(r);
|
|
609
|
+
n.issues.push({
|
|
610
|
+
origin: i,
|
|
611
|
+
code: "too_small",
|
|
612
|
+
minimum: t.minimum,
|
|
613
|
+
inclusive: !0,
|
|
614
|
+
input: r,
|
|
615
|
+
inst: e,
|
|
616
|
+
continue: !t.abort
|
|
617
|
+
});
|
|
618
|
+
};
|
|
619
|
+
}), Nt = /*@__PURE__*/ S("$ZodCheckLengthEquals", (e, t) => {
|
|
620
|
+
var n;
|
|
621
|
+
I.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
622
|
+
let t = e.value;
|
|
623
|
+
return !ae(t) && t.length !== void 0;
|
|
624
|
+
}), e._zod.onattach.push((e) => {
|
|
625
|
+
let n = e._zod.bag;
|
|
626
|
+
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
627
|
+
}), e._zod.check = (n) => {
|
|
628
|
+
let r = n.value, i = r.length;
|
|
629
|
+
if (i === t.length) return;
|
|
630
|
+
let a = De(r), o = i > t.length;
|
|
631
|
+
n.issues.push({
|
|
632
|
+
origin: a,
|
|
633
|
+
...o ? {
|
|
634
|
+
code: "too_big",
|
|
635
|
+
maximum: t.length
|
|
636
|
+
} : {
|
|
637
|
+
code: "too_small",
|
|
638
|
+
minimum: t.length
|
|
639
|
+
},
|
|
640
|
+
inclusive: !0,
|
|
641
|
+
exact: !0,
|
|
642
|
+
input: n.value,
|
|
643
|
+
inst: e,
|
|
644
|
+
continue: !t.abort
|
|
645
|
+
});
|
|
646
|
+
};
|
|
647
|
+
}), Pt = /*@__PURE__*/ S("$ZodCheckStringFormat", (e, t) => {
|
|
648
|
+
var n, r;
|
|
649
|
+
I.init(e, t), e._zod.onattach.push((e) => {
|
|
650
|
+
let n = e._zod.bag;
|
|
651
|
+
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
652
|
+
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
653
|
+
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
654
|
+
origin: "string",
|
|
655
|
+
code: "invalid_format",
|
|
656
|
+
format: t.format,
|
|
657
|
+
input: n.value,
|
|
658
|
+
...t.pattern ? { pattern: t.pattern.toString() } : {},
|
|
659
|
+
inst: e,
|
|
660
|
+
continue: !t.abort
|
|
661
|
+
});
|
|
662
|
+
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
663
|
+
}), Ft = /*@__PURE__*/ S("$ZodCheckRegex", (e, t) => {
|
|
664
|
+
Pt.init(e, t), e._zod.check = (n) => {
|
|
665
|
+
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
666
|
+
origin: "string",
|
|
667
|
+
code: "invalid_format",
|
|
668
|
+
format: "regex",
|
|
669
|
+
input: n.value,
|
|
670
|
+
pattern: t.pattern.toString(),
|
|
671
|
+
inst: e,
|
|
672
|
+
continue: !t.abort
|
|
673
|
+
});
|
|
674
|
+
};
|
|
675
|
+
}), It = /*@__PURE__*/ S("$ZodCheckLowerCase", (e, t) => {
|
|
676
|
+
t.pattern ??= wt, Pt.init(e, t);
|
|
677
|
+
}), Lt = /*@__PURE__*/ S("$ZodCheckUpperCase", (e, t) => {
|
|
678
|
+
t.pattern ??= Tt, Pt.init(e, t);
|
|
679
|
+
}), Rt = /*@__PURE__*/ S("$ZodCheckIncludes", (e, t) => {
|
|
680
|
+
I.init(e, t);
|
|
681
|
+
let n = A(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
682
|
+
t.pattern = r, e._zod.onattach.push((e) => {
|
|
683
|
+
let t = e._zod.bag;
|
|
684
|
+
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
685
|
+
}), e._zod.check = (n) => {
|
|
686
|
+
n.value.includes(t.includes, t.position) || n.issues.push({
|
|
687
|
+
origin: "string",
|
|
688
|
+
code: "invalid_format",
|
|
689
|
+
format: "includes",
|
|
690
|
+
includes: t.includes,
|
|
691
|
+
input: n.value,
|
|
692
|
+
inst: e,
|
|
693
|
+
continue: !t.abort
|
|
694
|
+
});
|
|
695
|
+
};
|
|
696
|
+
}), zt = /*@__PURE__*/ S("$ZodCheckStartsWith", (e, t) => {
|
|
697
|
+
I.init(e, t);
|
|
698
|
+
let n = RegExp(`^${A(t.prefix)}.*`);
|
|
699
|
+
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
700
|
+
let t = e._zod.bag;
|
|
701
|
+
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
702
|
+
}), e._zod.check = (n) => {
|
|
703
|
+
n.value.startsWith(t.prefix) || n.issues.push({
|
|
704
|
+
origin: "string",
|
|
705
|
+
code: "invalid_format",
|
|
706
|
+
format: "starts_with",
|
|
707
|
+
prefix: t.prefix,
|
|
708
|
+
input: n.value,
|
|
709
|
+
inst: e,
|
|
710
|
+
continue: !t.abort
|
|
711
|
+
});
|
|
712
|
+
};
|
|
713
|
+
}), Bt = /*@__PURE__*/ S("$ZodCheckEndsWith", (e, t) => {
|
|
714
|
+
I.init(e, t);
|
|
715
|
+
let n = RegExp(`.*${A(t.suffix)}$`);
|
|
716
|
+
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
717
|
+
let t = e._zod.bag;
|
|
718
|
+
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
719
|
+
}), e._zod.check = (n) => {
|
|
720
|
+
n.value.endsWith(t.suffix) || n.issues.push({
|
|
721
|
+
origin: "string",
|
|
722
|
+
code: "invalid_format",
|
|
723
|
+
format: "ends_with",
|
|
724
|
+
suffix: t.suffix,
|
|
725
|
+
input: n.value,
|
|
726
|
+
inst: e,
|
|
727
|
+
continue: !t.abort
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
}), Vt = /*@__PURE__*/ S("$ZodCheckOverwrite", (e, t) => {
|
|
731
|
+
I.init(e, t), e._zod.check = (e) => {
|
|
732
|
+
e.value = t.tx(e.value);
|
|
733
|
+
};
|
|
734
|
+
}), Ht = class {
|
|
735
|
+
constructor(e = []) {
|
|
736
|
+
this.content = [], this.indent = 0, this && (this.args = e);
|
|
737
|
+
}
|
|
738
|
+
indented(e) {
|
|
739
|
+
this.indent += 1, e(this), --this.indent;
|
|
740
|
+
}
|
|
741
|
+
write(e) {
|
|
742
|
+
if (typeof e == "function") {
|
|
743
|
+
e(this, { execution: "sync" }), e(this, { execution: "async" });
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
|
|
747
|
+
for (let e of r) this.content.push(e);
|
|
748
|
+
}
|
|
749
|
+
compile() {
|
|
750
|
+
let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
|
|
751
|
+
return new e(...t, n.join("\n"));
|
|
752
|
+
}
|
|
753
|
+
}, Ut = {
|
|
754
|
+
major: 4,
|
|
755
|
+
minor: 4,
|
|
756
|
+
patch: 3
|
|
757
|
+
}, L = /*@__PURE__*/ S("$ZodType", (e, t) => {
|
|
758
|
+
var n;
|
|
759
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ut;
|
|
760
|
+
let r = [...e._zod.def.checks ?? []];
|
|
761
|
+
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
762
|
+
for (let t of r) for (let n of t._zod.onattach) n(e);
|
|
763
|
+
if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
764
|
+
e._zod.run = e._zod.parse;
|
|
765
|
+
});
|
|
766
|
+
else {
|
|
767
|
+
let t = (e, t, n) => {
|
|
768
|
+
let r = N(e), i;
|
|
769
|
+
for (let a of t) {
|
|
770
|
+
if (a._zod.def.when) {
|
|
771
|
+
if (Te(e) || !a._zod.def.when(e)) continue;
|
|
772
|
+
} else if (r) continue;
|
|
773
|
+
let t = e.issues.length, o = a._zod.check(e);
|
|
774
|
+
if (o instanceof Promise && n?.async === !1) throw new C();
|
|
775
|
+
if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
|
|
776
|
+
await o, e.issues.length !== t && (r ||= N(e, t));
|
|
777
|
+
});
|
|
778
|
+
else {
|
|
779
|
+
if (e.issues.length === t) continue;
|
|
780
|
+
r ||= N(e, t);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
return i ? i.then(() => e) : e;
|
|
784
|
+
}, n = (n, i, a) => {
|
|
785
|
+
if (N(n)) return n.aborted = !0, n;
|
|
786
|
+
let o = t(i, r, a);
|
|
787
|
+
if (o instanceof Promise) {
|
|
788
|
+
if (a.async === !1) throw new C();
|
|
789
|
+
return o.then((t) => e._zod.parse(t, a));
|
|
790
|
+
}
|
|
791
|
+
return e._zod.parse(o, a);
|
|
792
|
+
};
|
|
793
|
+
e._zod.run = (i, a) => {
|
|
794
|
+
if (a.skipChecks) return e._zod.parse(i, a);
|
|
795
|
+
if (a.direction === "backward") {
|
|
796
|
+
let t = e._zod.parse({
|
|
797
|
+
value: i.value,
|
|
798
|
+
issues: []
|
|
799
|
+
}, {
|
|
800
|
+
...a,
|
|
801
|
+
skipChecks: !0
|
|
802
|
+
});
|
|
803
|
+
return t instanceof Promise ? t.then((e) => n(e, i, a)) : n(t, i, a);
|
|
804
|
+
}
|
|
805
|
+
let o = e._zod.parse(i, a);
|
|
806
|
+
if (o instanceof Promise) {
|
|
807
|
+
if (a.async === !1) throw new C();
|
|
808
|
+
return o.then((e) => t(e, r, a));
|
|
809
|
+
}
|
|
810
|
+
return t(o, r, a);
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
E(e, "~standard", () => ({
|
|
814
|
+
validate: (t) => {
|
|
815
|
+
try {
|
|
816
|
+
let n = Le(e, t);
|
|
817
|
+
return n.success ? { value: n.data } : { issues: n.error?.issues };
|
|
818
|
+
} catch {
|
|
819
|
+
return ze(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
vendor: "zod",
|
|
823
|
+
version: 1
|
|
824
|
+
}));
|
|
825
|
+
}), Wt = /*@__PURE__*/ S("$ZodString", (e, t) => {
|
|
826
|
+
L.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? yt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
827
|
+
if (t.coerce) try {
|
|
828
|
+
n.value = String(n.value);
|
|
829
|
+
} catch {}
|
|
830
|
+
return typeof n.value == "string" || n.issues.push({
|
|
831
|
+
expected: "string",
|
|
832
|
+
code: "invalid_type",
|
|
833
|
+
input: n.value,
|
|
834
|
+
inst: e
|
|
835
|
+
}), n;
|
|
836
|
+
};
|
|
837
|
+
}), R = /*@__PURE__*/ S("$ZodStringFormat", (e, t) => {
|
|
838
|
+
Pt.init(e, t), Wt.init(e, t);
|
|
839
|
+
}), Gt = /*@__PURE__*/ S("$ZodGUID", (e, t) => {
|
|
840
|
+
t.pattern ??= tt, R.init(e, t);
|
|
841
|
+
}), Kt = /*@__PURE__*/ S("$ZodUUID", (e, t) => {
|
|
842
|
+
if (t.version) {
|
|
843
|
+
let e = {
|
|
844
|
+
v1: 1,
|
|
845
|
+
v2: 2,
|
|
846
|
+
v3: 3,
|
|
847
|
+
v4: 4,
|
|
848
|
+
v5: 5,
|
|
849
|
+
v6: 6,
|
|
850
|
+
v7: 7,
|
|
851
|
+
v8: 8
|
|
852
|
+
}[t.version];
|
|
853
|
+
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
854
|
+
t.pattern ??= nt(e);
|
|
855
|
+
} else t.pattern ??= nt();
|
|
856
|
+
R.init(e, t);
|
|
857
|
+
}), qt = /*@__PURE__*/ S("$ZodEmail", (e, t) => {
|
|
858
|
+
t.pattern ??= rt, R.init(e, t);
|
|
859
|
+
}), Jt = /*@__PURE__*/ S("$ZodURL", (e, t) => {
|
|
860
|
+
R.init(e, t), e._zod.check = (n) => {
|
|
861
|
+
try {
|
|
862
|
+
let r = n.value.trim();
|
|
863
|
+
if (!t.normalize && t.protocol?.source === ft.source && !/^https?:\/\//i.test(r)) {
|
|
864
|
+
n.issues.push({
|
|
865
|
+
code: "invalid_format",
|
|
866
|
+
format: "url",
|
|
867
|
+
note: "Invalid URL format",
|
|
868
|
+
input: n.value,
|
|
869
|
+
inst: e,
|
|
870
|
+
continue: !t.abort
|
|
871
|
+
});
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
let i = new URL(r);
|
|
875
|
+
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
|
|
876
|
+
code: "invalid_format",
|
|
877
|
+
format: "url",
|
|
878
|
+
note: "Invalid hostname",
|
|
879
|
+
pattern: t.hostname.source,
|
|
880
|
+
input: n.value,
|
|
881
|
+
inst: e,
|
|
882
|
+
continue: !t.abort
|
|
883
|
+
})), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(":") ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({
|
|
884
|
+
code: "invalid_format",
|
|
885
|
+
format: "url",
|
|
886
|
+
note: "Invalid protocol",
|
|
887
|
+
pattern: t.protocol.source,
|
|
888
|
+
input: n.value,
|
|
889
|
+
inst: e,
|
|
890
|
+
continue: !t.abort
|
|
891
|
+
})), t.normalize ? n.value = i.href : n.value = r;
|
|
892
|
+
return;
|
|
893
|
+
} catch {
|
|
894
|
+
n.issues.push({
|
|
895
|
+
code: "invalid_format",
|
|
896
|
+
format: "url",
|
|
897
|
+
input: n.value,
|
|
898
|
+
inst: e,
|
|
899
|
+
continue: !t.abort
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
}), Yt = /*@__PURE__*/ S("$ZodEmoji", (e, t) => {
|
|
904
|
+
t.pattern ??= at(), R.init(e, t);
|
|
905
|
+
}), Xt = /*@__PURE__*/ S("$ZodNanoID", (e, t) => {
|
|
906
|
+
t.pattern ??= $e, R.init(e, t);
|
|
907
|
+
}), Zt = /*@__PURE__*/ S("$ZodCUID", (e, t) => {
|
|
908
|
+
t.pattern ??= Je, R.init(e, t);
|
|
909
|
+
}), Qt = /*@__PURE__*/ S("$ZodCUID2", (e, t) => {
|
|
910
|
+
t.pattern ??= Ye, R.init(e, t);
|
|
911
|
+
}), $t = /*@__PURE__*/ S("$ZodULID", (e, t) => {
|
|
912
|
+
t.pattern ??= Xe, R.init(e, t);
|
|
913
|
+
}), en = /*@__PURE__*/ S("$ZodXID", (e, t) => {
|
|
914
|
+
t.pattern ??= Ze, R.init(e, t);
|
|
915
|
+
}), tn = /*@__PURE__*/ S("$ZodKSUID", (e, t) => {
|
|
916
|
+
t.pattern ??= Qe, R.init(e, t);
|
|
917
|
+
}), nn = /*@__PURE__*/ S("$ZodISODateTime", (e, t) => {
|
|
918
|
+
t.pattern ??= vt(t), R.init(e, t);
|
|
919
|
+
}), rn = /*@__PURE__*/ S("$ZodISODate", (e, t) => {
|
|
920
|
+
t.pattern ??= ht, R.init(e, t);
|
|
921
|
+
}), an = /*@__PURE__*/ S("$ZodISOTime", (e, t) => {
|
|
922
|
+
t.pattern ??= _t(t), R.init(e, t);
|
|
923
|
+
}), on = /*@__PURE__*/ S("$ZodISODuration", (e, t) => {
|
|
924
|
+
t.pattern ??= et, R.init(e, t);
|
|
925
|
+
}), sn = /*@__PURE__*/ S("$ZodIPv4", (e, t) => {
|
|
926
|
+
t.pattern ??= ot, R.init(e, t), e._zod.bag.format = "ipv4";
|
|
927
|
+
}), cn = /*@__PURE__*/ S("$ZodIPv6", (e, t) => {
|
|
928
|
+
t.pattern ??= st, R.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
929
|
+
try {
|
|
930
|
+
new URL(`http://[${n.value}]`);
|
|
931
|
+
} catch {
|
|
932
|
+
n.issues.push({
|
|
933
|
+
code: "invalid_format",
|
|
934
|
+
format: "ipv6",
|
|
935
|
+
input: n.value,
|
|
936
|
+
inst: e,
|
|
937
|
+
continue: !t.abort
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
}), ln = /*@__PURE__*/ S("$ZodCIDRv4", (e, t) => {
|
|
942
|
+
t.pattern ??= ct, R.init(e, t);
|
|
943
|
+
}), un = /*@__PURE__*/ S("$ZodCIDRv6", (e, t) => {
|
|
944
|
+
t.pattern ??= lt, R.init(e, t), e._zod.check = (n) => {
|
|
945
|
+
let r = n.value.split("/");
|
|
946
|
+
try {
|
|
947
|
+
if (r.length !== 2) throw Error();
|
|
948
|
+
let [e, t] = r;
|
|
949
|
+
if (!t) throw Error();
|
|
950
|
+
let n = Number(t);
|
|
951
|
+
if (`${n}` !== t || n < 0 || n > 128) throw Error();
|
|
952
|
+
new URL(`http://[${e}]`);
|
|
953
|
+
} catch {
|
|
954
|
+
n.issues.push({
|
|
955
|
+
code: "invalid_format",
|
|
956
|
+
format: "cidrv6",
|
|
957
|
+
input: n.value,
|
|
958
|
+
inst: e,
|
|
959
|
+
continue: !t.abort
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
};
|
|
963
|
+
});
|
|
964
|
+
function dn(e) {
|
|
965
|
+
if (e === "") return !0;
|
|
966
|
+
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
967
|
+
try {
|
|
968
|
+
return atob(e), !0;
|
|
969
|
+
} catch {
|
|
970
|
+
return !1;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
var fn = /*@__PURE__*/ S("$ZodBase64", (e, t) => {
|
|
974
|
+
t.pattern ??= ut, R.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
975
|
+
dn(n.value) || n.issues.push({
|
|
976
|
+
code: "invalid_format",
|
|
977
|
+
format: "base64",
|
|
978
|
+
input: n.value,
|
|
979
|
+
inst: e,
|
|
980
|
+
continue: !t.abort
|
|
981
|
+
});
|
|
982
|
+
};
|
|
983
|
+
});
|
|
984
|
+
function pn(e) {
|
|
985
|
+
if (!dt.test(e)) return !1;
|
|
986
|
+
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
987
|
+
return dn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
988
|
+
}
|
|
989
|
+
var mn = /*@__PURE__*/ S("$ZodBase64URL", (e, t) => {
|
|
990
|
+
t.pattern ??= dt, R.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
991
|
+
pn(n.value) || n.issues.push({
|
|
992
|
+
code: "invalid_format",
|
|
993
|
+
format: "base64url",
|
|
994
|
+
input: n.value,
|
|
995
|
+
inst: e,
|
|
996
|
+
continue: !t.abort
|
|
997
|
+
});
|
|
998
|
+
};
|
|
999
|
+
}), hn = /*@__PURE__*/ S("$ZodE164", (e, t) => {
|
|
1000
|
+
t.pattern ??= pt, R.init(e, t);
|
|
1001
|
+
});
|
|
1002
|
+
function gn(e, t = null) {
|
|
1003
|
+
try {
|
|
1004
|
+
let n = e.split(".");
|
|
1005
|
+
if (n.length !== 3) return !1;
|
|
1006
|
+
let [r] = n;
|
|
1007
|
+
if (!r) return !1;
|
|
1008
|
+
let i = JSON.parse(atob(r));
|
|
1009
|
+
return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
|
|
1010
|
+
} catch {
|
|
1011
|
+
return !1;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
var _n = /*@__PURE__*/ S("$ZodJWT", (e, t) => {
|
|
1015
|
+
R.init(e, t), e._zod.check = (n) => {
|
|
1016
|
+
gn(n.value, t.alg) || n.issues.push({
|
|
1017
|
+
code: "invalid_format",
|
|
1018
|
+
format: "jwt",
|
|
1019
|
+
input: n.value,
|
|
1020
|
+
inst: e,
|
|
1021
|
+
continue: !t.abort
|
|
1022
|
+
});
|
|
1023
|
+
};
|
|
1024
|
+
}), vn = /*@__PURE__*/ S("$ZodNumber", (e, t) => {
|
|
1025
|
+
L.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? xt, e._zod.parse = (n, r) => {
|
|
1026
|
+
if (t.coerce) try {
|
|
1027
|
+
n.value = Number(n.value);
|
|
1028
|
+
} catch {}
|
|
1029
|
+
let i = n.value;
|
|
1030
|
+
if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
|
|
1031
|
+
let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : "Infinity" : void 0;
|
|
1032
|
+
return n.issues.push({
|
|
1033
|
+
expected: "number",
|
|
1034
|
+
code: "invalid_type",
|
|
1035
|
+
input: i,
|
|
1036
|
+
inst: e,
|
|
1037
|
+
...a ? { received: a } : {}
|
|
1038
|
+
}), n;
|
|
1039
|
+
};
|
|
1040
|
+
}), yn = /*@__PURE__*/ S("$ZodNumberFormat", (e, t) => {
|
|
1041
|
+
At.init(e, t), vn.init(e, t);
|
|
1042
|
+
}), bn = /*@__PURE__*/ S("$ZodBoolean", (e, t) => {
|
|
1043
|
+
L.init(e, t), e._zod.pattern = St, e._zod.parse = (n, r) => {
|
|
1044
|
+
if (t.coerce) try {
|
|
1045
|
+
n.value = !!n.value;
|
|
1046
|
+
} catch {}
|
|
1047
|
+
let i = n.value;
|
|
1048
|
+
return typeof i == "boolean" || n.issues.push({
|
|
1049
|
+
expected: "boolean",
|
|
1050
|
+
code: "invalid_type",
|
|
1051
|
+
input: i,
|
|
1052
|
+
inst: e
|
|
1053
|
+
}), n;
|
|
1054
|
+
};
|
|
1055
|
+
}), xn = /*@__PURE__*/ S("$ZodNull", (e, t) => {
|
|
1056
|
+
L.init(e, t), e._zod.pattern = Ct, e._zod.values = new Set([null]), e._zod.parse = (t, n) => {
|
|
1057
|
+
let r = t.value;
|
|
1058
|
+
return r === null || t.issues.push({
|
|
1059
|
+
expected: "null",
|
|
1060
|
+
code: "invalid_type",
|
|
1061
|
+
input: r,
|
|
1062
|
+
inst: e
|
|
1063
|
+
}), t;
|
|
1064
|
+
};
|
|
1065
|
+
}), Sn = /*@__PURE__*/ S("$ZodUnknown", (e, t) => {
|
|
1066
|
+
L.init(e, t), e._zod.parse = (e) => e;
|
|
1067
|
+
}), Cn = /*@__PURE__*/ S("$ZodNever", (e, t) => {
|
|
1068
|
+
L.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1069
|
+
expected: "never",
|
|
1070
|
+
code: "invalid_type",
|
|
1071
|
+
input: t.value,
|
|
1072
|
+
inst: e
|
|
1073
|
+
}), t);
|
|
1074
|
+
});
|
|
1075
|
+
function wn(e, t, n) {
|
|
1076
|
+
e.issues.length && t.issues.push(...P(n, e.issues)), t.value[n] = e.value;
|
|
1077
|
+
}
|
|
1078
|
+
var Tn = /*@__PURE__*/ S("$ZodArray", (e, t) => {
|
|
1079
|
+
L.init(e, t), e._zod.parse = (n, r) => {
|
|
1080
|
+
let i = n.value;
|
|
1081
|
+
if (!Array.isArray(i)) return n.issues.push({
|
|
1082
|
+
expected: "array",
|
|
1083
|
+
code: "invalid_type",
|
|
1084
|
+
input: i,
|
|
1085
|
+
inst: e
|
|
1086
|
+
}), n;
|
|
1087
|
+
n.value = Array(i.length);
|
|
1088
|
+
let a = [];
|
|
1089
|
+
for (let e = 0; e < i.length; e++) {
|
|
1090
|
+
let o = i[e], s = t.element._zod.run({
|
|
1091
|
+
value: o,
|
|
1092
|
+
issues: []
|
|
1093
|
+
}, r);
|
|
1094
|
+
s instanceof Promise ? a.push(s.then((t) => wn(t, n, e))) : wn(s, n, e);
|
|
1095
|
+
}
|
|
1096
|
+
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1097
|
+
};
|
|
1098
|
+
});
|
|
1099
|
+
function En(e, t, n, r, i, a) {
|
|
1100
|
+
let o = n in r;
|
|
1101
|
+
if (e.issues.length) {
|
|
1102
|
+
if (i && a && !o) return;
|
|
1103
|
+
t.issues.push(...P(n, e.issues));
|
|
1104
|
+
}
|
|
1105
|
+
if (!o && !i) {
|
|
1106
|
+
e.issues.length || t.issues.push({
|
|
1107
|
+
code: "invalid_type",
|
|
1108
|
+
expected: "nonoptional",
|
|
1109
|
+
input: void 0,
|
|
1110
|
+
path: [n]
|
|
1111
|
+
});
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1115
|
+
}
|
|
1116
|
+
function Dn(e) {
|
|
1117
|
+
let t = Object.keys(e.shape);
|
|
1118
|
+
for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
|
|
1119
|
+
let n = ge(e.shape);
|
|
1120
|
+
return {
|
|
1121
|
+
...e,
|
|
1122
|
+
keys: t,
|
|
1123
|
+
keySet: new Set(t),
|
|
1124
|
+
numKeys: t.length,
|
|
1125
|
+
optionalKeys: new Set(n)
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
function On(e, t, n, r, i, a) {
|
|
1129
|
+
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
|
|
1130
|
+
for (let i in t) {
|
|
1131
|
+
if (i === "__proto__" || s.has(i)) continue;
|
|
1132
|
+
if (l === "never") {
|
|
1133
|
+
o.push(i);
|
|
1134
|
+
continue;
|
|
1135
|
+
}
|
|
1136
|
+
let a = c.run({
|
|
1137
|
+
value: t[i],
|
|
1138
|
+
issues: []
|
|
1139
|
+
}, r);
|
|
1140
|
+
a instanceof Promise ? e.push(a.then((e) => En(e, n, i, t, u, d))) : En(a, n, i, t, u, d);
|
|
1141
|
+
}
|
|
1142
|
+
return o.length && n.issues.push({
|
|
1143
|
+
code: "unrecognized_keys",
|
|
1144
|
+
keys: o,
|
|
1145
|
+
input: t,
|
|
1146
|
+
inst: a
|
|
1147
|
+
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1148
|
+
}
|
|
1149
|
+
var kn = /*@__PURE__*/ S("$ZodObject", (e, t) => {
|
|
1150
|
+
if (L.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1151
|
+
let e = t.shape;
|
|
1152
|
+
Object.defineProperty(t, "shape", { get: () => {
|
|
1153
|
+
let n = { ...e };
|
|
1154
|
+
return Object.defineProperty(t, "shape", { value: n }), n;
|
|
1155
|
+
} });
|
|
1156
|
+
}
|
|
1157
|
+
let n = ie(() => Dn(t));
|
|
1158
|
+
E(e._zod, "propValues", () => {
|
|
1159
|
+
let e = t.shape, n = {};
|
|
1160
|
+
for (let t in e) {
|
|
1161
|
+
let r = e[t]._zod;
|
|
1162
|
+
if (r.values) {
|
|
1163
|
+
n[t] ?? (n[t] = /* @__PURE__ */ new Set());
|
|
1164
|
+
for (let e of r.values) n[t].add(e);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
return n;
|
|
1168
|
+
});
|
|
1169
|
+
let r = fe, i = t.catchall, a;
|
|
1170
|
+
e._zod.parse = (t, o) => {
|
|
1171
|
+
a ??= n.value;
|
|
1172
|
+
let s = t.value;
|
|
1173
|
+
if (!r(s)) return t.issues.push({
|
|
1174
|
+
expected: "object",
|
|
1175
|
+
code: "invalid_type",
|
|
1176
|
+
input: s,
|
|
1177
|
+
inst: e
|
|
1178
|
+
}), t;
|
|
1179
|
+
t.value = {};
|
|
1180
|
+
let c = [], l = a.shape;
|
|
1181
|
+
for (let e of a.keys) {
|
|
1182
|
+
let n = l[e], r = n._zod.optin === "optional", i = n._zod.optout === "optional", a = n._zod.run({
|
|
1183
|
+
value: s[e],
|
|
1184
|
+
issues: []
|
|
1185
|
+
}, o);
|
|
1186
|
+
a instanceof Promise ? c.push(a.then((n) => En(n, t, e, s, r, i))) : En(a, t, e, s, r, i);
|
|
1187
|
+
}
|
|
1188
|
+
return i ? On(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1189
|
+
};
|
|
1190
|
+
}), An = /*@__PURE__*/ S("$ZodObjectJIT", (e, t) => {
|
|
1191
|
+
kn.init(e, t);
|
|
1192
|
+
let n = e._zod.parse, r = ie(() => Dn(t)), i = (e) => {
|
|
1193
|
+
let t = new Ht([
|
|
1194
|
+
"shape",
|
|
1195
|
+
"payload",
|
|
1196
|
+
"ctx"
|
|
1197
|
+
]), n = r.value, i = (e) => {
|
|
1198
|
+
let t = le(e);
|
|
1199
|
+
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
|
|
1200
|
+
};
|
|
1201
|
+
t.write("const input = payload.value;");
|
|
1202
|
+
let a = Object.create(null), o = 0;
|
|
1203
|
+
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1204
|
+
t.write("const newResult = {};");
|
|
1205
|
+
for (let r of n.keys) {
|
|
1206
|
+
let n = a[r], o = le(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
|
|
1207
|
+
t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
|
|
1208
|
+
if (${n}.issues.length) {
|
|
1209
|
+
if (${o} in input) {
|
|
1210
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1211
|
+
...iss,
|
|
1212
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1213
|
+
})));
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
if (${n}.value === undefined) {
|
|
1218
|
+
if (${o} in input) {
|
|
1219
|
+
newResult[${o}] = undefined;
|
|
1220
|
+
}
|
|
1221
|
+
} else {
|
|
1222
|
+
newResult[${o}] = ${n}.value;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
`) : c ? t.write(`
|
|
1226
|
+
if (${n}.issues.length) {
|
|
1227
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1228
|
+
...iss,
|
|
1229
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1230
|
+
})));
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
if (${n}.value === undefined) {
|
|
1234
|
+
if (${o} in input) {
|
|
1235
|
+
newResult[${o}] = undefined;
|
|
1236
|
+
}
|
|
1237
|
+
} else {
|
|
1238
|
+
newResult[${o}] = ${n}.value;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
`) : t.write(`
|
|
1242
|
+
const ${n}_present = ${o} in input;
|
|
1243
|
+
if (${n}.issues.length) {
|
|
1244
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
1245
|
+
...iss,
|
|
1246
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
1247
|
+
})));
|
|
1248
|
+
}
|
|
1249
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
1250
|
+
payload.issues.push({
|
|
1251
|
+
code: "invalid_type",
|
|
1252
|
+
expected: "nonoptional",
|
|
1253
|
+
input: undefined,
|
|
1254
|
+
path: [${o}]
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
if (${n}_present) {
|
|
1259
|
+
if (${n}.value === undefined) {
|
|
1260
|
+
newResult[${o}] = undefined;
|
|
1261
|
+
} else {
|
|
1262
|
+
newResult[${o}] = ${n}.value;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
`);
|
|
1267
|
+
}
|
|
1268
|
+
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1269
|
+
let s = t.compile();
|
|
1270
|
+
return (t, n) => s(e, t, n);
|
|
1271
|
+
}, a, o = fe, s = !w.jitless, c = s && pe.value, l = t.catchall, u;
|
|
1272
|
+
e._zod.parse = (d, f) => {
|
|
1273
|
+
u ??= r.value;
|
|
1274
|
+
let p = d.value;
|
|
1275
|
+
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? On([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
|
|
1276
|
+
expected: "object",
|
|
1277
|
+
code: "invalid_type",
|
|
1278
|
+
input: p,
|
|
1279
|
+
inst: e
|
|
1280
|
+
}), d);
|
|
1281
|
+
};
|
|
1282
|
+
});
|
|
1283
|
+
function jn(e, t, n, r) {
|
|
1284
|
+
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1285
|
+
let i = e.filter((e) => !N(e));
|
|
1286
|
+
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1287
|
+
code: "invalid_union",
|
|
1288
|
+
input: t.value,
|
|
1289
|
+
inst: n,
|
|
1290
|
+
errors: e.map((e) => e.issues.map((e) => F(e, r, T())))
|
|
1291
|
+
}), t);
|
|
1292
|
+
}
|
|
1293
|
+
var Mn = /*@__PURE__*/ S("$ZodUnion", (e, t) => {
|
|
1294
|
+
L.init(e, t), E(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), E(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), E(e._zod, "values", () => {
|
|
1295
|
+
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1296
|
+
}), E(e._zod, "pattern", () => {
|
|
1297
|
+
if (t.options.every((e) => e._zod.pattern)) {
|
|
1298
|
+
let e = t.options.map((e) => e._zod.pattern);
|
|
1299
|
+
return RegExp(`^(${e.map((e) => oe(e.source)).join("|")})$`);
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
1303
|
+
e._zod.parse = (r, i) => {
|
|
1304
|
+
if (n) return n(r, i);
|
|
1305
|
+
let a = !1, o = [];
|
|
1306
|
+
for (let e of t.options) {
|
|
1307
|
+
let t = e._zod.run({
|
|
1308
|
+
value: r.value,
|
|
1309
|
+
issues: []
|
|
1310
|
+
}, i);
|
|
1311
|
+
if (t instanceof Promise) o.push(t), a = !0;
|
|
1312
|
+
else {
|
|
1313
|
+
if (t.issues.length === 0) return t;
|
|
1314
|
+
o.push(t);
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
return a ? Promise.all(o).then((t) => jn(t, r, e, i)) : jn(o, r, e, i);
|
|
1318
|
+
};
|
|
1319
|
+
}), Nn = /*@__PURE__*/ S("$ZodDiscriminatedUnion", (e, t) => {
|
|
1320
|
+
t.inclusive = !1, Mn.init(e, t);
|
|
1321
|
+
let n = e._zod.parse;
|
|
1322
|
+
E(e._zod, "propValues", () => {
|
|
1323
|
+
let e = {};
|
|
1324
|
+
for (let n of t.options) {
|
|
1325
|
+
let r = n._zod.propValues;
|
|
1326
|
+
if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);
|
|
1327
|
+
for (let [t, n] of Object.entries(r)) {
|
|
1328
|
+
e[t] || (e[t] = /* @__PURE__ */ new Set());
|
|
1329
|
+
for (let r of n) e[t].add(r);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
return e;
|
|
1333
|
+
});
|
|
1334
|
+
let r = ie(() => {
|
|
1335
|
+
let e = t.options, n = /* @__PURE__ */ new Map();
|
|
1336
|
+
for (let r of e) {
|
|
1337
|
+
let e = r._zod.propValues?.[t.discriminator];
|
|
1338
|
+
if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);
|
|
1339
|
+
for (let t of e) {
|
|
1340
|
+
if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`);
|
|
1341
|
+
n.set(t, r);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
return n;
|
|
1345
|
+
});
|
|
1346
|
+
e._zod.parse = (i, a) => {
|
|
1347
|
+
let o = i.value;
|
|
1348
|
+
if (!fe(o)) return i.issues.push({
|
|
1349
|
+
code: "invalid_type",
|
|
1350
|
+
expected: "object",
|
|
1351
|
+
input: o,
|
|
1352
|
+
inst: e
|
|
1353
|
+
}), i;
|
|
1354
|
+
let s = r.value.get(o?.[t.discriminator]);
|
|
1355
|
+
return s ? s._zod.run(i, a) : t.unionFallback || a.direction === "backward" ? n(i, a) : (i.issues.push({
|
|
1356
|
+
code: "invalid_union",
|
|
1357
|
+
errors: [],
|
|
1358
|
+
note: "No matching discriminator",
|
|
1359
|
+
discriminator: t.discriminator,
|
|
1360
|
+
options: Array.from(r.value.keys()),
|
|
1361
|
+
input: o,
|
|
1362
|
+
path: [t.discriminator],
|
|
1363
|
+
inst: e
|
|
1364
|
+
}), i);
|
|
1365
|
+
};
|
|
1366
|
+
}), Pn = /*@__PURE__*/ S("$ZodIntersection", (e, t) => {
|
|
1367
|
+
L.init(e, t), e._zod.parse = (e, n) => {
|
|
1368
|
+
let r = e.value, i = t.left._zod.run({
|
|
1369
|
+
value: r,
|
|
1370
|
+
issues: []
|
|
1371
|
+
}, n), a = t.right._zod.run({
|
|
1372
|
+
value: r,
|
|
1373
|
+
issues: []
|
|
1374
|
+
}, n);
|
|
1375
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => In(e, t, n)) : In(e, i, a);
|
|
1376
|
+
};
|
|
1377
|
+
});
|
|
1378
|
+
function Fn(e, t) {
|
|
1379
|
+
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1380
|
+
valid: !0,
|
|
1381
|
+
data: e
|
|
1382
|
+
};
|
|
1383
|
+
if (k(e) && k(t)) {
|
|
1384
|
+
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1385
|
+
...e,
|
|
1386
|
+
...t
|
|
1387
|
+
};
|
|
1388
|
+
for (let n of r) {
|
|
1389
|
+
let r = Fn(e[n], t[n]);
|
|
1390
|
+
if (!r.valid) return {
|
|
1391
|
+
valid: !1,
|
|
1392
|
+
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
1393
|
+
};
|
|
1394
|
+
i[n] = r.data;
|
|
1395
|
+
}
|
|
1396
|
+
return {
|
|
1397
|
+
valid: !0,
|
|
1398
|
+
data: i
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
if (Array.isArray(e) && Array.isArray(t)) {
|
|
1402
|
+
if (e.length !== t.length) return {
|
|
1403
|
+
valid: !1,
|
|
1404
|
+
mergeErrorPath: []
|
|
1405
|
+
};
|
|
1406
|
+
let n = [];
|
|
1407
|
+
for (let r = 0; r < e.length; r++) {
|
|
1408
|
+
let i = e[r], a = t[r], o = Fn(i, a);
|
|
1409
|
+
if (!o.valid) return {
|
|
1410
|
+
valid: !1,
|
|
1411
|
+
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
1412
|
+
};
|
|
1413
|
+
n.push(o.data);
|
|
1414
|
+
}
|
|
1415
|
+
return {
|
|
1416
|
+
valid: !0,
|
|
1417
|
+
data: n
|
|
1418
|
+
};
|
|
1419
|
+
}
|
|
1420
|
+
return {
|
|
1421
|
+
valid: !1,
|
|
1422
|
+
mergeErrorPath: []
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
function In(e, t, n) {
|
|
1426
|
+
let r = /* @__PURE__ */ new Map(), i;
|
|
1427
|
+
for (let n of t.issues) if (n.code === "unrecognized_keys") {
|
|
1428
|
+
i ??= n;
|
|
1429
|
+
for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0;
|
|
1430
|
+
} else e.issues.push(n);
|
|
1431
|
+
for (let t of n.issues) if (t.code === "unrecognized_keys") for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0;
|
|
1432
|
+
else e.issues.push(t);
|
|
1433
|
+
let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
|
|
1434
|
+
if (a.length && i && e.issues.push({
|
|
1435
|
+
...i,
|
|
1436
|
+
keys: a
|
|
1437
|
+
}), N(e)) return e;
|
|
1438
|
+
let o = Fn(t.value, n.value);
|
|
1439
|
+
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1440
|
+
return e.value = o.data, e;
|
|
1441
|
+
}
|
|
1442
|
+
var Ln = /*@__PURE__*/ S("$ZodRecord", (e, t) => {
|
|
1443
|
+
L.init(e, t), e._zod.parse = (n, r) => {
|
|
1444
|
+
let i = n.value;
|
|
1445
|
+
if (!k(i)) return n.issues.push({
|
|
1446
|
+
expected: "record",
|
|
1447
|
+
code: "invalid_type",
|
|
1448
|
+
input: i,
|
|
1449
|
+
inst: e
|
|
1450
|
+
}), n;
|
|
1451
|
+
let a = [], o = t.keyType._zod.values;
|
|
1452
|
+
if (o) {
|
|
1453
|
+
n.value = {};
|
|
1454
|
+
let s = /* @__PURE__ */ new Set();
|
|
1455
|
+
for (let c of o) if (typeof c == "string" || typeof c == "number" || typeof c == "symbol") {
|
|
1456
|
+
s.add(typeof c == "number" ? c.toString() : c);
|
|
1457
|
+
let o = t.keyType._zod.run({
|
|
1458
|
+
value: c,
|
|
1459
|
+
issues: []
|
|
1460
|
+
}, r);
|
|
1461
|
+
if (o instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1462
|
+
if (o.issues.length) {
|
|
1463
|
+
n.issues.push({
|
|
1464
|
+
code: "invalid_key",
|
|
1465
|
+
origin: "record",
|
|
1466
|
+
issues: o.issues.map((e) => F(e, r, T())),
|
|
1467
|
+
input: c,
|
|
1468
|
+
path: [c],
|
|
1469
|
+
inst: e
|
|
1470
|
+
});
|
|
1471
|
+
continue;
|
|
1472
|
+
}
|
|
1473
|
+
let l = o.value, u = t.valueType._zod.run({
|
|
1474
|
+
value: i[c],
|
|
1475
|
+
issues: []
|
|
1476
|
+
}, r);
|
|
1477
|
+
u instanceof Promise ? a.push(u.then((e) => {
|
|
1478
|
+
e.issues.length && n.issues.push(...P(c, e.issues)), n.value[l] = e.value;
|
|
1479
|
+
})) : (u.issues.length && n.issues.push(...P(c, u.issues)), n.value[l] = u.value);
|
|
1480
|
+
}
|
|
1481
|
+
let c;
|
|
1482
|
+
for (let e in i) s.has(e) || (c ??= [], c.push(e));
|
|
1483
|
+
c && c.length > 0 && n.issues.push({
|
|
1484
|
+
code: "unrecognized_keys",
|
|
1485
|
+
input: i,
|
|
1486
|
+
inst: e,
|
|
1487
|
+
keys: c
|
|
1488
|
+
});
|
|
1489
|
+
} else {
|
|
1490
|
+
n.value = {};
|
|
1491
|
+
for (let o of Reflect.ownKeys(i)) {
|
|
1492
|
+
if (o === "__proto__" || !Object.prototype.propertyIsEnumerable.call(i, o)) continue;
|
|
1493
|
+
let s = t.keyType._zod.run({
|
|
1494
|
+
value: o,
|
|
1495
|
+
issues: []
|
|
1496
|
+
}, r);
|
|
1497
|
+
if (s instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1498
|
+
if (typeof o == "string" && xt.test(o) && s.issues.length) {
|
|
1499
|
+
let e = t.keyType._zod.run({
|
|
1500
|
+
value: Number(o),
|
|
1501
|
+
issues: []
|
|
1502
|
+
}, r);
|
|
1503
|
+
if (e instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1504
|
+
e.issues.length === 0 && (s = e);
|
|
1505
|
+
}
|
|
1506
|
+
if (s.issues.length) {
|
|
1507
|
+
t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
|
|
1508
|
+
code: "invalid_key",
|
|
1509
|
+
origin: "record",
|
|
1510
|
+
issues: s.issues.map((e) => F(e, r, T())),
|
|
1511
|
+
input: o,
|
|
1512
|
+
path: [o],
|
|
1513
|
+
inst: e
|
|
1514
|
+
});
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
let c = t.valueType._zod.run({
|
|
1518
|
+
value: i[o],
|
|
1519
|
+
issues: []
|
|
1520
|
+
}, r);
|
|
1521
|
+
c instanceof Promise ? a.push(c.then((e) => {
|
|
1522
|
+
e.issues.length && n.issues.push(...P(o, e.issues)), n.value[s.value] = e.value;
|
|
1523
|
+
})) : (c.issues.length && n.issues.push(...P(o, c.issues)), n.value[s.value] = c.value);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1527
|
+
};
|
|
1528
|
+
}), Rn = /*@__PURE__*/ S("$ZodEnum", (e, t) => {
|
|
1529
|
+
L.init(e, t);
|
|
1530
|
+
let n = ne(t.entries), r = new Set(n);
|
|
1531
|
+
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => he.has(typeof e)).map((e) => typeof e == "string" ? A(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1532
|
+
let a = t.value;
|
|
1533
|
+
return r.has(a) || t.issues.push({
|
|
1534
|
+
code: "invalid_value",
|
|
1535
|
+
values: n,
|
|
1536
|
+
input: a,
|
|
1537
|
+
inst: e
|
|
1538
|
+
}), t;
|
|
1539
|
+
};
|
|
1540
|
+
}), zn = /*@__PURE__*/ S("$ZodLiteral", (e, t) => {
|
|
1541
|
+
if (L.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
|
|
1542
|
+
let n = new Set(t.values);
|
|
1543
|
+
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? A(e) : e ? A(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
|
|
1544
|
+
let a = r.value;
|
|
1545
|
+
return n.has(a) || r.issues.push({
|
|
1546
|
+
code: "invalid_value",
|
|
1547
|
+
values: t.values,
|
|
1548
|
+
input: a,
|
|
1549
|
+
inst: e
|
|
1550
|
+
}), r;
|
|
1551
|
+
};
|
|
1552
|
+
}), Bn = /*@__PURE__*/ S("$ZodTransform", (e, t) => {
|
|
1553
|
+
L.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
|
|
1554
|
+
if (r.direction === "backward") throw new te(e.constructor.name);
|
|
1555
|
+
let i = t.transform(n.value, n);
|
|
1556
|
+
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
|
|
1557
|
+
if (i instanceof Promise) throw new C();
|
|
1558
|
+
return n.value = i, n.fallback = !0, n;
|
|
1559
|
+
};
|
|
1560
|
+
});
|
|
1561
|
+
function Vn(e, t) {
|
|
1562
|
+
return t === void 0 && (e.issues.length || e.fallback) ? {
|
|
1563
|
+
issues: [],
|
|
1564
|
+
value: void 0
|
|
1565
|
+
} : e;
|
|
1566
|
+
}
|
|
1567
|
+
var Hn = /*@__PURE__*/ S("$ZodOptional", (e, t) => {
|
|
1568
|
+
L.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", E(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), E(e._zod, "pattern", () => {
|
|
1569
|
+
let e = t.innerType._zod.pattern;
|
|
1570
|
+
return e ? RegExp(`^(${oe(e.source)})?$`) : void 0;
|
|
1571
|
+
}), e._zod.parse = (e, n) => {
|
|
1572
|
+
if (t.innerType._zod.optin === "optional") {
|
|
1573
|
+
let r = e.value, i = t.innerType._zod.run(e, n);
|
|
1574
|
+
return i instanceof Promise ? i.then((e) => Vn(e, r)) : Vn(i, r);
|
|
1575
|
+
}
|
|
1576
|
+
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1577
|
+
};
|
|
1578
|
+
}), Un = /*@__PURE__*/ S("$ZodExactOptional", (e, t) => {
|
|
1579
|
+
Hn.init(e, t), E(e._zod, "values", () => t.innerType._zod.values), E(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1580
|
+
}), Wn = /*@__PURE__*/ S("$ZodNullable", (e, t) => {
|
|
1581
|
+
L.init(e, t), E(e._zod, "optin", () => t.innerType._zod.optin), E(e._zod, "optout", () => t.innerType._zod.optout), E(e._zod, "pattern", () => {
|
|
1582
|
+
let e = t.innerType._zod.pattern;
|
|
1583
|
+
return e ? RegExp(`^(${oe(e.source)}|null)$`) : void 0;
|
|
1584
|
+
}), E(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1585
|
+
}), Gn = /*@__PURE__*/ S("$ZodDefault", (e, t) => {
|
|
1586
|
+
L.init(e, t), e._zod.optin = "optional", E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1587
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1588
|
+
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1589
|
+
let r = t.innerType._zod.run(e, n);
|
|
1590
|
+
return r instanceof Promise ? r.then((e) => Kn(e, t)) : Kn(r, t);
|
|
1591
|
+
};
|
|
1592
|
+
});
|
|
1593
|
+
function Kn(e, t) {
|
|
1594
|
+
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1595
|
+
}
|
|
1596
|
+
var qn = /*@__PURE__*/ S("$ZodPrefault", (e, t) => {
|
|
1597
|
+
L.init(e, t), e._zod.optin = "optional", E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1598
|
+
}), Jn = /*@__PURE__*/ S("$ZodNonOptional", (e, t) => {
|
|
1599
|
+
L.init(e, t), E(e._zod, "values", () => {
|
|
1600
|
+
let e = t.innerType._zod.values;
|
|
1601
|
+
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
1602
|
+
}), e._zod.parse = (n, r) => {
|
|
1603
|
+
let i = t.innerType._zod.run(n, r);
|
|
1604
|
+
return i instanceof Promise ? i.then((t) => Yn(t, e)) : Yn(i, e);
|
|
1605
|
+
};
|
|
1606
|
+
});
|
|
1607
|
+
function Yn(e, t) {
|
|
1608
|
+
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1609
|
+
code: "invalid_type",
|
|
1610
|
+
expected: "nonoptional",
|
|
1611
|
+
input: e.value,
|
|
1612
|
+
inst: t
|
|
1613
|
+
}), e;
|
|
1614
|
+
}
|
|
1615
|
+
var Xn = /*@__PURE__*/ S("$ZodCatch", (e, t) => {
|
|
1616
|
+
L.init(e, t), e._zod.optin = "optional", E(e._zod, "optout", () => t.innerType._zod.optout), E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1617
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1618
|
+
let r = t.innerType._zod.run(e, n);
|
|
1619
|
+
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1620
|
+
...e,
|
|
1621
|
+
error: { issues: r.issues.map((e) => F(e, n, T())) },
|
|
1622
|
+
input: e.value
|
|
1623
|
+
}), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1624
|
+
...e,
|
|
1625
|
+
error: { issues: r.issues.map((e) => F(e, n, T())) },
|
|
1626
|
+
input: e.value
|
|
1627
|
+
}), e.issues = [], e.fallback = !0), e);
|
|
1628
|
+
};
|
|
1629
|
+
}), Zn = /*@__PURE__*/ S("$ZodPipe", (e, t) => {
|
|
1630
|
+
L.init(e, t), E(e._zod, "values", () => t.in._zod.values), E(e._zod, "optin", () => t.in._zod.optin), E(e._zod, "optout", () => t.out._zod.optout), E(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1631
|
+
if (n.direction === "backward") {
|
|
1632
|
+
let r = t.out._zod.run(e, n);
|
|
1633
|
+
return r instanceof Promise ? r.then((e) => Qn(e, t.in, n)) : Qn(r, t.in, n);
|
|
1634
|
+
}
|
|
1635
|
+
let r = t.in._zod.run(e, n);
|
|
1636
|
+
return r instanceof Promise ? r.then((e) => Qn(e, t.out, n)) : Qn(r, t.out, n);
|
|
1637
|
+
};
|
|
1638
|
+
});
|
|
1639
|
+
function Qn(e, t, n) {
|
|
1640
|
+
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
|
|
1641
|
+
value: e.value,
|
|
1642
|
+
issues: e.issues,
|
|
1643
|
+
fallback: e.fallback
|
|
1644
|
+
}, n);
|
|
1645
|
+
}
|
|
1646
|
+
var $n = /*@__PURE__*/ S("$ZodReadonly", (e, t) => {
|
|
1647
|
+
L.init(e, t), E(e._zod, "propValues", () => t.innerType._zod.propValues), E(e._zod, "values", () => t.innerType._zod.values), E(e._zod, "optin", () => t.innerType?._zod?.optin), E(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1648
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1649
|
+
let r = t.innerType._zod.run(e, n);
|
|
1650
|
+
return r instanceof Promise ? r.then(er) : er(r);
|
|
1651
|
+
};
|
|
1652
|
+
});
|
|
1653
|
+
function er(e) {
|
|
1654
|
+
return e.value = Object.freeze(e.value), e;
|
|
1655
|
+
}
|
|
1656
|
+
var tr = /*@__PURE__*/ S("$ZodCustom", (e, t) => {
|
|
1657
|
+
I.init(e, t), L.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1658
|
+
let r = n.value, i = t.fn(r);
|
|
1659
|
+
if (i instanceof Promise) return i.then((t) => nr(t, n, r, e));
|
|
1660
|
+
nr(i, n, r, e);
|
|
1661
|
+
};
|
|
1662
|
+
});
|
|
1663
|
+
function nr(e, t, n, r) {
|
|
1664
|
+
if (!e) {
|
|
1665
|
+
let e = {
|
|
1666
|
+
code: "custom",
|
|
1667
|
+
input: n,
|
|
1668
|
+
inst: r,
|
|
1669
|
+
path: [...r._zod.def.path ?? []],
|
|
1670
|
+
continue: !r._zod.def.abort
|
|
1671
|
+
};
|
|
1672
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Oe(e));
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
//#endregion
|
|
1676
|
+
//#region ../../node_modules/zod/v4/core/registries.js
|
|
1677
|
+
var rr, ir = class {
|
|
1678
|
+
constructor() {
|
|
1679
|
+
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1680
|
+
}
|
|
1681
|
+
add(e, ...t) {
|
|
1682
|
+
let n = t[0];
|
|
1683
|
+
return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
|
|
1684
|
+
}
|
|
1685
|
+
clear() {
|
|
1686
|
+
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
1687
|
+
}
|
|
1688
|
+
remove(e) {
|
|
1689
|
+
let t = this._map.get(e);
|
|
1690
|
+
return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
|
|
1691
|
+
}
|
|
1692
|
+
get(e) {
|
|
1693
|
+
let t = e._zod.parent;
|
|
1694
|
+
if (t) {
|
|
1695
|
+
let n = { ...this.get(t) ?? {} };
|
|
1696
|
+
delete n.id;
|
|
1697
|
+
let r = {
|
|
1698
|
+
...n,
|
|
1699
|
+
...this._map.get(e)
|
|
1700
|
+
};
|
|
1701
|
+
return Object.keys(r).length ? r : void 0;
|
|
1702
|
+
}
|
|
1703
|
+
return this._map.get(e);
|
|
1704
|
+
}
|
|
1705
|
+
has(e) {
|
|
1706
|
+
return this._map.has(e);
|
|
1707
|
+
}
|
|
1708
|
+
};
|
|
1709
|
+
function ar() {
|
|
1710
|
+
return new ir();
|
|
1711
|
+
}
|
|
1712
|
+
(rr = globalThis).__zod_globalRegistry ?? (rr.__zod_globalRegistry = ar());
|
|
1713
|
+
var or = globalThis.__zod_globalRegistry;
|
|
1714
|
+
//#endregion
|
|
1715
|
+
//#region ../../node_modules/zod/v4/core/api.js
|
|
1716
|
+
// @__NO_SIDE_EFFECTS__
|
|
1717
|
+
function sr(e, t) {
|
|
1718
|
+
return new e({
|
|
1719
|
+
type: "string",
|
|
1720
|
+
...M(t)
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
// @__NO_SIDE_EFFECTS__
|
|
1724
|
+
function cr(e, t) {
|
|
1725
|
+
return new e({
|
|
1726
|
+
type: "string",
|
|
1727
|
+
format: "email",
|
|
1728
|
+
check: "string_format",
|
|
1729
|
+
abort: !1,
|
|
1730
|
+
...M(t)
|
|
1731
|
+
});
|
|
1732
|
+
}
|
|
1733
|
+
// @__NO_SIDE_EFFECTS__
|
|
1734
|
+
function lr(e, t) {
|
|
1735
|
+
return new e({
|
|
1736
|
+
type: "string",
|
|
1737
|
+
format: "guid",
|
|
1738
|
+
check: "string_format",
|
|
1739
|
+
abort: !1,
|
|
1740
|
+
...M(t)
|
|
1741
|
+
});
|
|
1742
|
+
}
|
|
1743
|
+
// @__NO_SIDE_EFFECTS__
|
|
1744
|
+
function ur(e, t) {
|
|
1745
|
+
return new e({
|
|
1746
|
+
type: "string",
|
|
1747
|
+
format: "uuid",
|
|
1748
|
+
check: "string_format",
|
|
1749
|
+
abort: !1,
|
|
1750
|
+
...M(t)
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
// @__NO_SIDE_EFFECTS__
|
|
1754
|
+
function dr(e, t) {
|
|
1755
|
+
return new e({
|
|
1756
|
+
type: "string",
|
|
1757
|
+
format: "uuid",
|
|
1758
|
+
check: "string_format",
|
|
1759
|
+
abort: !1,
|
|
1760
|
+
version: "v4",
|
|
1761
|
+
...M(t)
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
// @__NO_SIDE_EFFECTS__
|
|
1765
|
+
function fr(e, t) {
|
|
1766
|
+
return new e({
|
|
1767
|
+
type: "string",
|
|
1768
|
+
format: "uuid",
|
|
1769
|
+
check: "string_format",
|
|
1770
|
+
abort: !1,
|
|
1771
|
+
version: "v6",
|
|
1772
|
+
...M(t)
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
// @__NO_SIDE_EFFECTS__
|
|
1776
|
+
function pr(e, t) {
|
|
1777
|
+
return new e({
|
|
1778
|
+
type: "string",
|
|
1779
|
+
format: "uuid",
|
|
1780
|
+
check: "string_format",
|
|
1781
|
+
abort: !1,
|
|
1782
|
+
version: "v7",
|
|
1783
|
+
...M(t)
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
// @__NO_SIDE_EFFECTS__
|
|
1787
|
+
function mr(e, t) {
|
|
1788
|
+
return new e({
|
|
1789
|
+
type: "string",
|
|
1790
|
+
format: "url",
|
|
1791
|
+
check: "string_format",
|
|
1792
|
+
abort: !1,
|
|
1793
|
+
...M(t)
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
// @__NO_SIDE_EFFECTS__
|
|
1797
|
+
function hr(e, t) {
|
|
1798
|
+
return new e({
|
|
1799
|
+
type: "string",
|
|
1800
|
+
format: "emoji",
|
|
1801
|
+
check: "string_format",
|
|
1802
|
+
abort: !1,
|
|
1803
|
+
...M(t)
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
// @__NO_SIDE_EFFECTS__
|
|
1807
|
+
function gr(e, t) {
|
|
1808
|
+
return new e({
|
|
1809
|
+
type: "string",
|
|
1810
|
+
format: "nanoid",
|
|
1811
|
+
check: "string_format",
|
|
1812
|
+
abort: !1,
|
|
1813
|
+
...M(t)
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
// @__NO_SIDE_EFFECTS__
|
|
1817
|
+
function _r(e, t) {
|
|
1818
|
+
return new e({
|
|
1819
|
+
type: "string",
|
|
1820
|
+
format: "cuid",
|
|
1821
|
+
check: "string_format",
|
|
1822
|
+
abort: !1,
|
|
1823
|
+
...M(t)
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
// @__NO_SIDE_EFFECTS__
|
|
1827
|
+
function vr(e, t) {
|
|
1828
|
+
return new e({
|
|
1829
|
+
type: "string",
|
|
1830
|
+
format: "cuid2",
|
|
1831
|
+
check: "string_format",
|
|
1832
|
+
abort: !1,
|
|
1833
|
+
...M(t)
|
|
1834
|
+
});
|
|
1835
|
+
}
|
|
1836
|
+
// @__NO_SIDE_EFFECTS__
|
|
1837
|
+
function yr(e, t) {
|
|
1838
|
+
return new e({
|
|
1839
|
+
type: "string",
|
|
1840
|
+
format: "ulid",
|
|
1841
|
+
check: "string_format",
|
|
1842
|
+
abort: !1,
|
|
1843
|
+
...M(t)
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
// @__NO_SIDE_EFFECTS__
|
|
1847
|
+
function br(e, t) {
|
|
1848
|
+
return new e({
|
|
1849
|
+
type: "string",
|
|
1850
|
+
format: "xid",
|
|
1851
|
+
check: "string_format",
|
|
1852
|
+
abort: !1,
|
|
1853
|
+
...M(t)
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
// @__NO_SIDE_EFFECTS__
|
|
1857
|
+
function xr(e, t) {
|
|
1858
|
+
return new e({
|
|
1859
|
+
type: "string",
|
|
1860
|
+
format: "ksuid",
|
|
1861
|
+
check: "string_format",
|
|
1862
|
+
abort: !1,
|
|
1863
|
+
...M(t)
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1866
|
+
// @__NO_SIDE_EFFECTS__
|
|
1867
|
+
function Sr(e, t) {
|
|
1868
|
+
return new e({
|
|
1869
|
+
type: "string",
|
|
1870
|
+
format: "ipv4",
|
|
1871
|
+
check: "string_format",
|
|
1872
|
+
abort: !1,
|
|
1873
|
+
...M(t)
|
|
1874
|
+
});
|
|
1875
|
+
}
|
|
1876
|
+
// @__NO_SIDE_EFFECTS__
|
|
1877
|
+
function Cr(e, t) {
|
|
1878
|
+
return new e({
|
|
1879
|
+
type: "string",
|
|
1880
|
+
format: "ipv6",
|
|
1881
|
+
check: "string_format",
|
|
1882
|
+
abort: !1,
|
|
1883
|
+
...M(t)
|
|
1884
|
+
});
|
|
1885
|
+
}
|
|
1886
|
+
// @__NO_SIDE_EFFECTS__
|
|
1887
|
+
function wr(e, t) {
|
|
1888
|
+
return new e({
|
|
1889
|
+
type: "string",
|
|
1890
|
+
format: "cidrv4",
|
|
1891
|
+
check: "string_format",
|
|
1892
|
+
abort: !1,
|
|
1893
|
+
...M(t)
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
// @__NO_SIDE_EFFECTS__
|
|
1897
|
+
function Tr(e, t) {
|
|
1898
|
+
return new e({
|
|
1899
|
+
type: "string",
|
|
1900
|
+
format: "cidrv6",
|
|
1901
|
+
check: "string_format",
|
|
1902
|
+
abort: !1,
|
|
1903
|
+
...M(t)
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
// @__NO_SIDE_EFFECTS__
|
|
1907
|
+
function Er(e, t) {
|
|
1908
|
+
return new e({
|
|
1909
|
+
type: "string",
|
|
1910
|
+
format: "base64",
|
|
1911
|
+
check: "string_format",
|
|
1912
|
+
abort: !1,
|
|
1913
|
+
...M(t)
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
// @__NO_SIDE_EFFECTS__
|
|
1917
|
+
function Dr(e, t) {
|
|
1918
|
+
return new e({
|
|
1919
|
+
type: "string",
|
|
1920
|
+
format: "base64url",
|
|
1921
|
+
check: "string_format",
|
|
1922
|
+
abort: !1,
|
|
1923
|
+
...M(t)
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
// @__NO_SIDE_EFFECTS__
|
|
1927
|
+
function Or(e, t) {
|
|
1928
|
+
return new e({
|
|
1929
|
+
type: "string",
|
|
1930
|
+
format: "e164",
|
|
1931
|
+
check: "string_format",
|
|
1932
|
+
abort: !1,
|
|
1933
|
+
...M(t)
|
|
1934
|
+
});
|
|
1935
|
+
}
|
|
1936
|
+
// @__NO_SIDE_EFFECTS__
|
|
1937
|
+
function kr(e, t) {
|
|
1938
|
+
return new e({
|
|
1939
|
+
type: "string",
|
|
1940
|
+
format: "jwt",
|
|
1941
|
+
check: "string_format",
|
|
1942
|
+
abort: !1,
|
|
1943
|
+
...M(t)
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
// @__NO_SIDE_EFFECTS__
|
|
1947
|
+
function Ar(e, t) {
|
|
1948
|
+
return new e({
|
|
1949
|
+
type: "string",
|
|
1950
|
+
format: "datetime",
|
|
1951
|
+
check: "string_format",
|
|
1952
|
+
offset: !1,
|
|
1953
|
+
local: !1,
|
|
1954
|
+
precision: null,
|
|
1955
|
+
...M(t)
|
|
1956
|
+
});
|
|
1957
|
+
}
|
|
1958
|
+
// @__NO_SIDE_EFFECTS__
|
|
1959
|
+
function jr(e, t) {
|
|
1960
|
+
return new e({
|
|
1961
|
+
type: "string",
|
|
1962
|
+
format: "date",
|
|
1963
|
+
check: "string_format",
|
|
1964
|
+
...M(t)
|
|
1965
|
+
});
|
|
1966
|
+
}
|
|
1967
|
+
// @__NO_SIDE_EFFECTS__
|
|
1968
|
+
function Mr(e, t) {
|
|
1969
|
+
return new e({
|
|
1970
|
+
type: "string",
|
|
1971
|
+
format: "time",
|
|
1972
|
+
check: "string_format",
|
|
1973
|
+
precision: null,
|
|
1974
|
+
...M(t)
|
|
1975
|
+
});
|
|
1976
|
+
}
|
|
1977
|
+
// @__NO_SIDE_EFFECTS__
|
|
1978
|
+
function Nr(e, t) {
|
|
1979
|
+
return new e({
|
|
1980
|
+
type: "string",
|
|
1981
|
+
format: "duration",
|
|
1982
|
+
check: "string_format",
|
|
1983
|
+
...M(t)
|
|
1984
|
+
});
|
|
1985
|
+
}
|
|
1986
|
+
// @__NO_SIDE_EFFECTS__
|
|
1987
|
+
function Pr(e, t) {
|
|
1988
|
+
return new e({
|
|
1989
|
+
type: "number",
|
|
1990
|
+
checks: [],
|
|
1991
|
+
...M(t)
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
// @__NO_SIDE_EFFECTS__
|
|
1995
|
+
function Fr(e, t) {
|
|
1996
|
+
return new e({
|
|
1997
|
+
type: "number",
|
|
1998
|
+
check: "number_format",
|
|
1999
|
+
abort: !1,
|
|
2000
|
+
format: "safeint",
|
|
2001
|
+
...M(t)
|
|
2002
|
+
});
|
|
2003
|
+
}
|
|
2004
|
+
// @__NO_SIDE_EFFECTS__
|
|
2005
|
+
function Ir(e, t) {
|
|
2006
|
+
return new e({
|
|
2007
|
+
type: "boolean",
|
|
2008
|
+
...M(t)
|
|
2009
|
+
});
|
|
2010
|
+
}
|
|
2011
|
+
// @__NO_SIDE_EFFECTS__
|
|
2012
|
+
function Lr(e, t) {
|
|
2013
|
+
return new e({
|
|
2014
|
+
type: "null",
|
|
2015
|
+
...M(t)
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
// @__NO_SIDE_EFFECTS__
|
|
2019
|
+
function Rr(e) {
|
|
2020
|
+
return new e({ type: "unknown" });
|
|
2021
|
+
}
|
|
2022
|
+
// @__NO_SIDE_EFFECTS__
|
|
2023
|
+
function zr(e, t) {
|
|
2024
|
+
return new e({
|
|
2025
|
+
type: "never",
|
|
2026
|
+
...M(t)
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
// @__NO_SIDE_EFFECTS__
|
|
2030
|
+
function Br(e, t) {
|
|
2031
|
+
return new Dt({
|
|
2032
|
+
check: "less_than",
|
|
2033
|
+
...M(t),
|
|
2034
|
+
value: e,
|
|
2035
|
+
inclusive: !1
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
// @__NO_SIDE_EFFECTS__
|
|
2039
|
+
function Vr(e, t) {
|
|
2040
|
+
return new Dt({
|
|
2041
|
+
check: "less_than",
|
|
2042
|
+
...M(t),
|
|
2043
|
+
value: e,
|
|
2044
|
+
inclusive: !0
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
// @__NO_SIDE_EFFECTS__
|
|
2048
|
+
function Hr(e, t) {
|
|
2049
|
+
return new Ot({
|
|
2050
|
+
check: "greater_than",
|
|
2051
|
+
...M(t),
|
|
2052
|
+
value: e,
|
|
2053
|
+
inclusive: !1
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
// @__NO_SIDE_EFFECTS__
|
|
2057
|
+
function Ur(e, t) {
|
|
2058
|
+
return new Ot({
|
|
2059
|
+
check: "greater_than",
|
|
2060
|
+
...M(t),
|
|
2061
|
+
value: e,
|
|
2062
|
+
inclusive: !0
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
// @__NO_SIDE_EFFECTS__
|
|
2066
|
+
function Wr(e, t) {
|
|
2067
|
+
return new kt({
|
|
2068
|
+
check: "multiple_of",
|
|
2069
|
+
...M(t),
|
|
2070
|
+
value: e
|
|
2071
|
+
});
|
|
2072
|
+
}
|
|
2073
|
+
// @__NO_SIDE_EFFECTS__
|
|
2074
|
+
function Gr(e, t) {
|
|
2075
|
+
return new jt({
|
|
2076
|
+
check: "max_length",
|
|
2077
|
+
...M(t),
|
|
2078
|
+
maximum: e
|
|
2079
|
+
});
|
|
2080
|
+
}
|
|
2081
|
+
// @__NO_SIDE_EFFECTS__
|
|
2082
|
+
function Kr(e, t) {
|
|
2083
|
+
return new Mt({
|
|
2084
|
+
check: "min_length",
|
|
2085
|
+
...M(t),
|
|
2086
|
+
minimum: e
|
|
2087
|
+
});
|
|
2088
|
+
}
|
|
2089
|
+
// @__NO_SIDE_EFFECTS__
|
|
2090
|
+
function qr(e, t) {
|
|
2091
|
+
return new Nt({
|
|
2092
|
+
check: "length_equals",
|
|
2093
|
+
...M(t),
|
|
2094
|
+
length: e
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2097
|
+
// @__NO_SIDE_EFFECTS__
|
|
2098
|
+
function Jr(e, t) {
|
|
2099
|
+
return new Ft({
|
|
2100
|
+
check: "string_format",
|
|
2101
|
+
format: "regex",
|
|
2102
|
+
...M(t),
|
|
2103
|
+
pattern: e
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
2106
|
+
// @__NO_SIDE_EFFECTS__
|
|
2107
|
+
function Yr(e) {
|
|
2108
|
+
return new It({
|
|
2109
|
+
check: "string_format",
|
|
2110
|
+
format: "lowercase",
|
|
2111
|
+
...M(e)
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
// @__NO_SIDE_EFFECTS__
|
|
2115
|
+
function Xr(e) {
|
|
2116
|
+
return new Lt({
|
|
2117
|
+
check: "string_format",
|
|
2118
|
+
format: "uppercase",
|
|
2119
|
+
...M(e)
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
// @__NO_SIDE_EFFECTS__
|
|
2123
|
+
function Zr(e, t) {
|
|
2124
|
+
return new Rt({
|
|
2125
|
+
check: "string_format",
|
|
2126
|
+
format: "includes",
|
|
2127
|
+
...M(t),
|
|
2128
|
+
includes: e
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
// @__NO_SIDE_EFFECTS__
|
|
2132
|
+
function Qr(e, t) {
|
|
2133
|
+
return new zt({
|
|
2134
|
+
check: "string_format",
|
|
2135
|
+
format: "starts_with",
|
|
2136
|
+
...M(t),
|
|
2137
|
+
prefix: e
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
// @__NO_SIDE_EFFECTS__
|
|
2141
|
+
function $r(e, t) {
|
|
2142
|
+
return new Bt({
|
|
2143
|
+
check: "string_format",
|
|
2144
|
+
format: "ends_with",
|
|
2145
|
+
...M(t),
|
|
2146
|
+
suffix: e
|
|
2147
|
+
});
|
|
2148
|
+
}
|
|
2149
|
+
// @__NO_SIDE_EFFECTS__
|
|
2150
|
+
function z(e) {
|
|
2151
|
+
return new Vt({
|
|
2152
|
+
check: "overwrite",
|
|
2153
|
+
tx: e
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
// @__NO_SIDE_EFFECTS__
|
|
2157
|
+
function ei(e) {
|
|
2158
|
+
return /* @__PURE__ */ z((t) => t.normalize(e));
|
|
2159
|
+
}
|
|
2160
|
+
// @__NO_SIDE_EFFECTS__
|
|
2161
|
+
function ti() {
|
|
2162
|
+
return /* @__PURE__ */ z((e) => e.trim());
|
|
2163
|
+
}
|
|
2164
|
+
// @__NO_SIDE_EFFECTS__
|
|
2165
|
+
function ni() {
|
|
2166
|
+
return /* @__PURE__ */ z((e) => e.toLowerCase());
|
|
2167
|
+
}
|
|
2168
|
+
// @__NO_SIDE_EFFECTS__
|
|
2169
|
+
function ri() {
|
|
2170
|
+
return /* @__PURE__ */ z((e) => e.toUpperCase());
|
|
2171
|
+
}
|
|
2172
|
+
// @__NO_SIDE_EFFECTS__
|
|
2173
|
+
function ii() {
|
|
2174
|
+
return /* @__PURE__ */ z((e) => ue(e));
|
|
2175
|
+
}
|
|
2176
|
+
// @__NO_SIDE_EFFECTS__
|
|
2177
|
+
function ai(e, t, n) {
|
|
2178
|
+
return new e({
|
|
2179
|
+
type: "array",
|
|
2180
|
+
element: t,
|
|
2181
|
+
...M(n)
|
|
2182
|
+
});
|
|
2183
|
+
}
|
|
2184
|
+
// @__NO_SIDE_EFFECTS__
|
|
2185
|
+
function oi(e, t, n) {
|
|
2186
|
+
return new e({
|
|
2187
|
+
type: "custom",
|
|
2188
|
+
check: "custom",
|
|
2189
|
+
fn: t,
|
|
2190
|
+
...M(n)
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
// @__NO_SIDE_EFFECTS__
|
|
2194
|
+
function si(e, t) {
|
|
2195
|
+
let n = /* @__PURE__ */ ci((t) => (t.addIssue = (e) => {
|
|
2196
|
+
if (typeof e == "string") t.issues.push(Oe(e, t.value, n._zod.def));
|
|
2197
|
+
else {
|
|
2198
|
+
let r = e;
|
|
2199
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(Oe(r));
|
|
2200
|
+
}
|
|
2201
|
+
}, e(t.value, t)), t);
|
|
2202
|
+
return n;
|
|
2203
|
+
}
|
|
2204
|
+
// @__NO_SIDE_EFFECTS__
|
|
2205
|
+
function ci(e, t) {
|
|
2206
|
+
let n = new I({
|
|
2207
|
+
check: "custom",
|
|
2208
|
+
...M(t)
|
|
2209
|
+
});
|
|
2210
|
+
return n._zod.check = e, n;
|
|
2211
|
+
}
|
|
2212
|
+
//#endregion
|
|
2213
|
+
//#region ../../node_modules/zod/v4/core/to-json-schema.js
|
|
2214
|
+
function li(e) {
|
|
2215
|
+
let t = e?.target ?? "draft-2020-12";
|
|
2216
|
+
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2217
|
+
processors: e.processors ?? {},
|
|
2218
|
+
metadataRegistry: e?.metadata ?? or,
|
|
2219
|
+
target: t,
|
|
2220
|
+
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2221
|
+
override: e?.override ?? (() => {}),
|
|
2222
|
+
io: e?.io ?? "output",
|
|
2223
|
+
counter: 0,
|
|
2224
|
+
seen: /* @__PURE__ */ new Map(),
|
|
2225
|
+
cycles: e?.cycles ?? "ref",
|
|
2226
|
+
reused: e?.reused ?? "inline",
|
|
2227
|
+
external: e?.external ?? void 0
|
|
2228
|
+
};
|
|
2229
|
+
}
|
|
2230
|
+
function B(e, t, n = {
|
|
2231
|
+
path: [],
|
|
2232
|
+
schemaPath: []
|
|
2233
|
+
}) {
|
|
2234
|
+
var r;
|
|
2235
|
+
let i = e._zod.def, a = t.seen.get(e);
|
|
2236
|
+
if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
|
|
2237
|
+
let o = {
|
|
2238
|
+
schema: {},
|
|
2239
|
+
count: 1,
|
|
2240
|
+
cycle: void 0,
|
|
2241
|
+
path: n.path
|
|
2242
|
+
};
|
|
2243
|
+
t.seen.set(e, o);
|
|
2244
|
+
let s = e._zod.toJSONSchema?.();
|
|
2245
|
+
if (s) o.schema = s;
|
|
2246
|
+
else {
|
|
2247
|
+
let r = {
|
|
2248
|
+
...n,
|
|
2249
|
+
schemaPath: [...n.schemaPath, e],
|
|
2250
|
+
path: n.path
|
|
2251
|
+
};
|
|
2252
|
+
if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
|
|
2253
|
+
else {
|
|
2254
|
+
let n = o.schema, a = t.processors[i.type];
|
|
2255
|
+
if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
|
|
2256
|
+
a(e, t, n, r);
|
|
2257
|
+
}
|
|
2258
|
+
let a = e._zod.parent;
|
|
2259
|
+
a && (o.ref ||= a, B(a, t, r), t.seen.get(a).isParent = !0);
|
|
2260
|
+
}
|
|
2261
|
+
let c = t.metadataRegistry.get(e);
|
|
2262
|
+
return c && Object.assign(o.schema, c), t.io === "input" && V(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;
|
|
2263
|
+
}
|
|
2264
|
+
function ui(e, t) {
|
|
2265
|
+
let n = e.seen.get(t);
|
|
2266
|
+
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2267
|
+
let r = /* @__PURE__ */ new Map();
|
|
2268
|
+
for (let t of e.seen.entries()) {
|
|
2269
|
+
let n = e.metadataRegistry.get(t[0])?.id;
|
|
2270
|
+
if (n) {
|
|
2271
|
+
let e = r.get(n);
|
|
2272
|
+
if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
2273
|
+
r.set(n, t[0]);
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
let i = (t) => {
|
|
2277
|
+
let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
2278
|
+
if (e.external) {
|
|
2279
|
+
let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
|
|
2280
|
+
if (n) return { ref: i(n) };
|
|
2281
|
+
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2282
|
+
return t[1].defId = a, {
|
|
2283
|
+
defId: a,
|
|
2284
|
+
ref: `${i("__shared")}#/${r}/${a}`
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
if (t[1] === n) return { ref: "#" };
|
|
2288
|
+
let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2289
|
+
return {
|
|
2290
|
+
defId: a,
|
|
2291
|
+
ref: i + a
|
|
2292
|
+
};
|
|
2293
|
+
}, a = (e) => {
|
|
2294
|
+
if (e[1].schema.$ref) return;
|
|
2295
|
+
let t = e[1], { ref: n, defId: r } = i(e);
|
|
2296
|
+
t.def = { ...t.schema }, r && (t.defId = r);
|
|
2297
|
+
let a = t.schema;
|
|
2298
|
+
for (let e in a) delete a[e];
|
|
2299
|
+
a.$ref = n;
|
|
2300
|
+
};
|
|
2301
|
+
if (e.cycles === "throw") for (let t of e.seen.entries()) {
|
|
2302
|
+
let e = t[1];
|
|
2303
|
+
if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
|
|
2304
|
+
|
|
2305
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
2306
|
+
}
|
|
2307
|
+
for (let n of e.seen.entries()) {
|
|
2308
|
+
let r = n[1];
|
|
2309
|
+
if (t === n[0]) {
|
|
2310
|
+
a(n);
|
|
2311
|
+
continue;
|
|
2312
|
+
}
|
|
2313
|
+
if (e.external) {
|
|
2314
|
+
let r = e.external.registry.get(n[0])?.id;
|
|
2315
|
+
if (t !== n[0] && r) {
|
|
2316
|
+
a(n);
|
|
2317
|
+
continue;
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
if (e.metadataRegistry.get(n[0])?.id) {
|
|
2321
|
+
a(n);
|
|
2322
|
+
continue;
|
|
2323
|
+
}
|
|
2324
|
+
if (r.cycle) {
|
|
2325
|
+
a(n);
|
|
2326
|
+
continue;
|
|
2327
|
+
}
|
|
2328
|
+
if (r.count > 1 && e.reused === "ref") {
|
|
2329
|
+
a(n);
|
|
2330
|
+
continue;
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
function di(e, t) {
|
|
2335
|
+
let n = e.seen.get(t);
|
|
2336
|
+
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2337
|
+
let r = (t) => {
|
|
2338
|
+
let n = e.seen.get(t);
|
|
2339
|
+
if (n.ref === null) return;
|
|
2340
|
+
let i = n.def ?? n.schema, a = { ...i }, o = n.ref;
|
|
2341
|
+
if (n.ref = null, o) {
|
|
2342
|
+
r(o);
|
|
2343
|
+
let n = e.seen.get(o), s = n.schema;
|
|
2344
|
+
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === "$ref" || e === "allOf" || e in a || delete i[e];
|
|
2345
|
+
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];
|
|
2346
|
+
}
|
|
2347
|
+
let s = t._zod.parent;
|
|
2348
|
+
if (s && s !== o) {
|
|
2349
|
+
r(s);
|
|
2350
|
+
let t = e.seen.get(s);
|
|
2351
|
+
if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === "$ref" || e === "allOf" || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
|
|
2352
|
+
}
|
|
2353
|
+
e.override({
|
|
2354
|
+
zodSchema: t,
|
|
2355
|
+
jsonSchema: i,
|
|
2356
|
+
path: n.path ?? []
|
|
2357
|
+
});
|
|
2358
|
+
};
|
|
2359
|
+
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
2360
|
+
let i = {};
|
|
2361
|
+
if (e.target === "draft-2020-12" ? i.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? i.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? i.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
|
|
2362
|
+
let n = e.external.registry.get(t)?.id;
|
|
2363
|
+
if (!n) throw Error("Schema is missing an `id` property");
|
|
2364
|
+
i.$id = e.external.uri(n);
|
|
2365
|
+
}
|
|
2366
|
+
Object.assign(i, n.def ?? n.schema);
|
|
2367
|
+
let a = e.metadataRegistry.get(t)?.id;
|
|
2368
|
+
a !== void 0 && i.id === a && delete i.id;
|
|
2369
|
+
let o = e.external?.defs ?? {};
|
|
2370
|
+
for (let t of e.seen.entries()) {
|
|
2371
|
+
let e = t[1];
|
|
2372
|
+
e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def);
|
|
2373
|
+
}
|
|
2374
|
+
e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
|
|
2375
|
+
try {
|
|
2376
|
+
let n = JSON.parse(JSON.stringify(i));
|
|
2377
|
+
return Object.defineProperty(n, "~standard", {
|
|
2378
|
+
value: {
|
|
2379
|
+
...t["~standard"],
|
|
2380
|
+
jsonSchema: {
|
|
2381
|
+
input: pi(t, "input", e.processors),
|
|
2382
|
+
output: pi(t, "output", e.processors)
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
enumerable: !1,
|
|
2386
|
+
writable: !1
|
|
2387
|
+
}), n;
|
|
2388
|
+
} catch {
|
|
2389
|
+
throw Error("Error converting schema to JSON.");
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
function V(e, t) {
|
|
2393
|
+
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
2394
|
+
if (n.seen.has(e)) return !1;
|
|
2395
|
+
n.seen.add(e);
|
|
2396
|
+
let r = e._zod.def;
|
|
2397
|
+
if (r.type === "transform") return !0;
|
|
2398
|
+
if (r.type === "array") return V(r.element, n);
|
|
2399
|
+
if (r.type === "set") return V(r.valueType, n);
|
|
2400
|
+
if (r.type === "lazy") return V(r.getter(), n);
|
|
2401
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return V(r.innerType, n);
|
|
2402
|
+
if (r.type === "intersection") return V(r.left, n) || V(r.right, n);
|
|
2403
|
+
if (r.type === "record" || r.type === "map") return V(r.keyType, n) || V(r.valueType, n);
|
|
2404
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : V(r.in, n) || V(r.out, n);
|
|
2405
|
+
if (r.type === "object") {
|
|
2406
|
+
for (let e in r.shape) if (V(r.shape[e], n)) return !0;
|
|
2407
|
+
return !1;
|
|
2408
|
+
}
|
|
2409
|
+
if (r.type === "union") {
|
|
2410
|
+
for (let e of r.options) if (V(e, n)) return !0;
|
|
2411
|
+
return !1;
|
|
2412
|
+
}
|
|
2413
|
+
if (r.type === "tuple") {
|
|
2414
|
+
for (let e of r.items) if (V(e, n)) return !0;
|
|
2415
|
+
return !!(r.rest && V(r.rest, n));
|
|
2416
|
+
}
|
|
2417
|
+
return !1;
|
|
2418
|
+
}
|
|
2419
|
+
var fi = (e, t = {}) => (n) => {
|
|
2420
|
+
let r = li({
|
|
2421
|
+
...n,
|
|
2422
|
+
processors: t
|
|
2423
|
+
});
|
|
2424
|
+
return B(e, r), ui(r, e), di(r, e);
|
|
2425
|
+
}, pi = (e, t, n = {}) => (r) => {
|
|
2426
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = li({
|
|
2427
|
+
...i ?? {},
|
|
2428
|
+
target: a,
|
|
2429
|
+
io: t,
|
|
2430
|
+
processors: n
|
|
2431
|
+
});
|
|
2432
|
+
return B(e, o), ui(o, e), di(o, e);
|
|
2433
|
+
}, mi = {
|
|
2434
|
+
guid: "uuid",
|
|
2435
|
+
url: "uri",
|
|
2436
|
+
datetime: "date-time",
|
|
2437
|
+
json_string: "json-string",
|
|
2438
|
+
regex: ""
|
|
2439
|
+
}, hi = (e, t, n, r) => {
|
|
2440
|
+
let i = n;
|
|
2441
|
+
i.type = "string";
|
|
2442
|
+
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
|
|
2443
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = mi[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
2444
|
+
let e = [...c];
|
|
2445
|
+
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
2446
|
+
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2447
|
+
pattern: e.source
|
|
2448
|
+
}))]);
|
|
2449
|
+
}
|
|
2450
|
+
}, gi = (e, t, n, r) => {
|
|
2451
|
+
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
2452
|
+
typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number";
|
|
2453
|
+
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";
|
|
2454
|
+
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (i.multipleOf = c);
|
|
2455
|
+
}, _i = (e, t, n, r) => {
|
|
2456
|
+
n.type = "boolean";
|
|
2457
|
+
}, vi = (e, t, n, r) => {
|
|
2458
|
+
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
2459
|
+
}, yi = (e, t, n, r) => {
|
|
2460
|
+
n.not = {};
|
|
2461
|
+
}, bi = (e, t, n, r) => {
|
|
2462
|
+
let i = e._zod.def, a = ne(i.entries);
|
|
2463
|
+
a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
|
|
2464
|
+
}, xi = (e, t, n, r) => {
|
|
2465
|
+
let i = e._zod.def, a = [];
|
|
2466
|
+
for (let e of i.values) if (e === void 0) {
|
|
2467
|
+
if (t.unrepresentable === "throw") throw Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
2468
|
+
} else if (typeof e == "bigint") {
|
|
2469
|
+
if (t.unrepresentable === "throw") throw Error("BigInt literals cannot be represented in JSON Schema");
|
|
2470
|
+
a.push(Number(e));
|
|
2471
|
+
} else a.push(e);
|
|
2472
|
+
if (a.length !== 0) if (a.length === 1) {
|
|
2473
|
+
let e = a[0];
|
|
2474
|
+
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
|
|
2475
|
+
} 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;
|
|
2476
|
+
}, Si = (e, t, n, r) => {
|
|
2477
|
+
if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
|
|
2478
|
+
}, Ci = (e, t, n, r) => {
|
|
2479
|
+
if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
|
|
2480
|
+
}, wi = (e, t, n, r) => {
|
|
2481
|
+
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
2482
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = B(a.element, t, {
|
|
2483
|
+
...r,
|
|
2484
|
+
path: [...r.path, "items"]
|
|
2485
|
+
});
|
|
2486
|
+
}, Ti = (e, t, n, r) => {
|
|
2487
|
+
let i = n, a = e._zod.def;
|
|
2488
|
+
i.type = "object", i.properties = {};
|
|
2489
|
+
let o = a.shape;
|
|
2490
|
+
for (let e in o) i.properties[e] = B(o[e], t, {
|
|
2491
|
+
...r,
|
|
2492
|
+
path: [
|
|
2493
|
+
...r.path,
|
|
2494
|
+
"properties",
|
|
2495
|
+
e
|
|
2496
|
+
]
|
|
2497
|
+
});
|
|
2498
|
+
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
2499
|
+
let n = a.shape[e]._zod;
|
|
2500
|
+
return t.io === "input" ? n.optin === void 0 : n.optout === void 0;
|
|
2501
|
+
}));
|
|
2502
|
+
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = B(a.catchall, t, {
|
|
2503
|
+
...r,
|
|
2504
|
+
path: [...r.path, "additionalProperties"]
|
|
2505
|
+
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
2506
|
+
}, Ei = (e, t, n, r) => {
|
|
2507
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => B(e, t, {
|
|
2508
|
+
...r,
|
|
2509
|
+
path: [
|
|
2510
|
+
...r.path,
|
|
2511
|
+
a ? "oneOf" : "anyOf",
|
|
2512
|
+
n
|
|
2513
|
+
]
|
|
2514
|
+
}));
|
|
2515
|
+
a ? n.oneOf = o : n.anyOf = o;
|
|
2516
|
+
}, Di = (e, t, n, r) => {
|
|
2517
|
+
let i = e._zod.def, a = B(i.left, t, {
|
|
2518
|
+
...r,
|
|
2519
|
+
path: [
|
|
2520
|
+
...r.path,
|
|
2521
|
+
"allOf",
|
|
2522
|
+
0
|
|
2523
|
+
]
|
|
2524
|
+
}), o = B(i.right, t, {
|
|
2525
|
+
...r,
|
|
2526
|
+
path: [
|
|
2527
|
+
...r.path,
|
|
2528
|
+
"allOf",
|
|
2529
|
+
1
|
|
2530
|
+
]
|
|
2531
|
+
}), s = (e) => "allOf" in e && Object.keys(e).length === 1;
|
|
2532
|
+
n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
2533
|
+
}, Oi = (e, t, n, r) => {
|
|
2534
|
+
let i = n, a = e._zod.def;
|
|
2535
|
+
i.type = "object";
|
|
2536
|
+
let o = a.keyType, s = o._zod.bag?.patterns;
|
|
2537
|
+
if (a.mode === "loose" && s && s.size > 0) {
|
|
2538
|
+
let e = B(a.valueType, t, {
|
|
2539
|
+
...r,
|
|
2540
|
+
path: [
|
|
2541
|
+
...r.path,
|
|
2542
|
+
"patternProperties",
|
|
2543
|
+
"*"
|
|
2544
|
+
]
|
|
2545
|
+
});
|
|
2546
|
+
i.patternProperties = {};
|
|
2547
|
+
for (let t of s) i.patternProperties[t.source] = e;
|
|
2548
|
+
} else (t.target === "draft-07" || t.target === "draft-2020-12") && (i.propertyNames = B(a.keyType, t, {
|
|
2549
|
+
...r,
|
|
2550
|
+
path: [...r.path, "propertyNames"]
|
|
2551
|
+
})), i.additionalProperties = B(a.valueType, t, {
|
|
2552
|
+
...r,
|
|
2553
|
+
path: [...r.path, "additionalProperties"]
|
|
2554
|
+
});
|
|
2555
|
+
let c = o._zod.values;
|
|
2556
|
+
if (c) {
|
|
2557
|
+
let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
|
|
2558
|
+
e.length > 0 && (i.required = e);
|
|
2559
|
+
}
|
|
2560
|
+
}, ki = (e, t, n, r) => {
|
|
2561
|
+
let i = e._zod.def, a = B(i.innerType, t, r), o = t.seen.get(e);
|
|
2562
|
+
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
2563
|
+
}, Ai = (e, t, n, r) => {
|
|
2564
|
+
let i = e._zod.def;
|
|
2565
|
+
B(i.innerType, t, r);
|
|
2566
|
+
let a = t.seen.get(e);
|
|
2567
|
+
a.ref = i.innerType;
|
|
2568
|
+
}, ji = (e, t, n, r) => {
|
|
2569
|
+
let i = e._zod.def;
|
|
2570
|
+
B(i.innerType, t, r);
|
|
2571
|
+
let a = t.seen.get(e);
|
|
2572
|
+
a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
|
|
2573
|
+
}, Mi = (e, t, n, r) => {
|
|
2574
|
+
let i = e._zod.def;
|
|
2575
|
+
B(i.innerType, t, r);
|
|
2576
|
+
let a = t.seen.get(e);
|
|
2577
|
+
a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
|
|
2578
|
+
}, Ni = (e, t, n, r) => {
|
|
2579
|
+
let i = e._zod.def;
|
|
2580
|
+
B(i.innerType, t, r);
|
|
2581
|
+
let a = t.seen.get(e);
|
|
2582
|
+
a.ref = i.innerType;
|
|
2583
|
+
let o;
|
|
2584
|
+
try {
|
|
2585
|
+
o = i.catchValue(void 0);
|
|
2586
|
+
} catch {
|
|
2587
|
+
throw Error("Dynamic catch values are not supported in JSON Schema");
|
|
2588
|
+
}
|
|
2589
|
+
n.default = o;
|
|
2590
|
+
}, Pi = (e, t, n, r) => {
|
|
2591
|
+
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
2592
|
+
B(o, t, r);
|
|
2593
|
+
let s = t.seen.get(e);
|
|
2594
|
+
s.ref = o;
|
|
2595
|
+
}, Fi = (e, t, n, r) => {
|
|
2596
|
+
let i = e._zod.def;
|
|
2597
|
+
B(i.innerType, t, r);
|
|
2598
|
+
let a = t.seen.get(e);
|
|
2599
|
+
a.ref = i.innerType, n.readOnly = !0;
|
|
2600
|
+
}, Ii = (e, t, n, r) => {
|
|
2601
|
+
let i = e._zod.def;
|
|
2602
|
+
B(i.innerType, t, r);
|
|
2603
|
+
let a = t.seen.get(e);
|
|
2604
|
+
a.ref = i.innerType;
|
|
2605
|
+
}, Li = /*@__PURE__*/ S("ZodISODateTime", (e, t) => {
|
|
2606
|
+
nn.init(e, t), G.init(e, t);
|
|
2607
|
+
});
|
|
2608
|
+
function Ri(e) {
|
|
2609
|
+
return /* @__PURE__ */ Ar(Li, e);
|
|
2610
|
+
}
|
|
2611
|
+
var zi = /*@__PURE__*/ S("ZodISODate", (e, t) => {
|
|
2612
|
+
rn.init(e, t), G.init(e, t);
|
|
2613
|
+
});
|
|
2614
|
+
function Bi(e) {
|
|
2615
|
+
return /* @__PURE__ */ jr(zi, e);
|
|
2616
|
+
}
|
|
2617
|
+
var Vi = /*@__PURE__*/ S("ZodISOTime", (e, t) => {
|
|
2618
|
+
an.init(e, t), G.init(e, t);
|
|
2619
|
+
});
|
|
2620
|
+
function Hi(e) {
|
|
2621
|
+
return /* @__PURE__ */ Mr(Vi, e);
|
|
2622
|
+
}
|
|
2623
|
+
var Ui = /*@__PURE__*/ S("ZodISODuration", (e, t) => {
|
|
2624
|
+
on.init(e, t), G.init(e, t);
|
|
2625
|
+
});
|
|
2626
|
+
function Wi(e) {
|
|
2627
|
+
return /* @__PURE__ */ Nr(Ui, e);
|
|
2628
|
+
}
|
|
2629
|
+
var H = /*@__PURE__*/ S("ZodError", (e, t) => {
|
|
2630
|
+
Ae.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2631
|
+
format: { value: (t) => Ne(e, t) },
|
|
2632
|
+
flatten: { value: (t) => Me(e, t) },
|
|
2633
|
+
addIssue: { value: (t) => {
|
|
2634
|
+
e.issues.push(t), e.message = JSON.stringify(e.issues, re, 2);
|
|
2635
|
+
} },
|
|
2636
|
+
addIssues: { value: (t) => {
|
|
2637
|
+
e.issues.push(...t), e.message = JSON.stringify(e.issues, re, 2);
|
|
2638
|
+
} },
|
|
2639
|
+
isEmpty: { get() {
|
|
2640
|
+
return e.issues.length === 0;
|
|
2641
|
+
} }
|
|
2642
|
+
});
|
|
2643
|
+
}, { Parent: Error }), Gi = /* @__PURE__ */ Pe(H), Ki = /* @__PURE__ */ Fe(H), qi = /* @__PURE__ */ Ie(H), Ji = /* @__PURE__ */ Re(H), Yi = /* @__PURE__ */ Be(H), Xi = /* @__PURE__ */ Ve(H), Zi = /* @__PURE__ */ He(H), Qi = /* @__PURE__ */ Ue(H), $i = /* @__PURE__ */ We(H), ea = /* @__PURE__ */ Ge(H), ta = /* @__PURE__ */ Ke(H), na = /* @__PURE__ */ qe(H), ra = /* @__PURE__ */ new WeakMap();
|
|
2644
|
+
function ia(e, t, n) {
|
|
2645
|
+
let r = Object.getPrototypeOf(e), i = ra.get(r);
|
|
2646
|
+
if (i || (i = /* @__PURE__ */ new Set(), ra.set(r, i)), !i.has(t)) {
|
|
2647
|
+
i.add(t);
|
|
2648
|
+
for (let e in n) {
|
|
2649
|
+
let t = n[e];
|
|
2650
|
+
Object.defineProperty(r, e, {
|
|
2651
|
+
configurable: !0,
|
|
2652
|
+
enumerable: !1,
|
|
2653
|
+
get() {
|
|
2654
|
+
let n = t.bind(this);
|
|
2655
|
+
return Object.defineProperty(this, e, {
|
|
2656
|
+
configurable: !0,
|
|
2657
|
+
writable: !0,
|
|
2658
|
+
enumerable: !0,
|
|
2659
|
+
value: n
|
|
2660
|
+
}), n;
|
|
2661
|
+
},
|
|
2662
|
+
set(t) {
|
|
2663
|
+
Object.defineProperty(this, e, {
|
|
2664
|
+
configurable: !0,
|
|
2665
|
+
writable: !0,
|
|
2666
|
+
enumerable: !0,
|
|
2667
|
+
value: t
|
|
2668
|
+
});
|
|
2669
|
+
}
|
|
2670
|
+
});
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
var U = /*@__PURE__*/ S("ZodType", (e, t) => (L.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2675
|
+
input: pi(e, "input"),
|
|
2676
|
+
output: pi(e, "output")
|
|
2677
|
+
} }), e.toJSONSchema = fi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Gi(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => qi(e, t, n), e.parseAsync = async (t, n) => Ki(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Ji(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Yi(e, t, n), e.decode = (t, n) => Xi(e, t, n), e.encodeAsync = async (t, n) => Zi(e, t, n), e.decodeAsync = async (t, n) => Qi(e, t, n), e.safeEncode = (t, n) => $i(e, t, n), e.safeDecode = (t, n) => ea(e, t, n), e.safeEncodeAsync = async (t, n) => ta(e, t, n), e.safeDecodeAsync = async (t, n) => na(e, t, n), ia(e, "ZodType", {
|
|
2678
|
+
check(...e) {
|
|
2679
|
+
let t = this.def;
|
|
2680
|
+
return this.clone(O(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
2681
|
+
check: e,
|
|
2682
|
+
def: { check: "custom" },
|
|
2683
|
+
onattach: []
|
|
2684
|
+
} } : e)] }), { parent: !0 });
|
|
2685
|
+
},
|
|
2686
|
+
with(...e) {
|
|
2687
|
+
return this.check(...e);
|
|
2688
|
+
},
|
|
2689
|
+
clone(e, t) {
|
|
2690
|
+
return j(this, e, t);
|
|
2691
|
+
},
|
|
2692
|
+
brand() {
|
|
2693
|
+
return this;
|
|
2694
|
+
},
|
|
2695
|
+
register(e, t) {
|
|
2696
|
+
return e.add(this, t), this;
|
|
2697
|
+
},
|
|
2698
|
+
refine(e, t) {
|
|
2699
|
+
return this.check(_o(e, t));
|
|
2700
|
+
},
|
|
2701
|
+
superRefine(e, t) {
|
|
2702
|
+
return this.check(vo(e, t));
|
|
2703
|
+
},
|
|
2704
|
+
overwrite(e) {
|
|
2705
|
+
return this.check(/* @__PURE__ */ z(e));
|
|
2706
|
+
},
|
|
2707
|
+
optional() {
|
|
2708
|
+
return Qa(this);
|
|
2709
|
+
},
|
|
2710
|
+
exactOptional() {
|
|
2711
|
+
return eo(this);
|
|
2712
|
+
},
|
|
2713
|
+
nullable() {
|
|
2714
|
+
return no(this);
|
|
2715
|
+
},
|
|
2716
|
+
nullish() {
|
|
2717
|
+
return Qa(no(this));
|
|
2718
|
+
},
|
|
2719
|
+
nonoptional(e) {
|
|
2720
|
+
return co(this, e);
|
|
2721
|
+
},
|
|
2722
|
+
array() {
|
|
2723
|
+
return J(this);
|
|
2724
|
+
},
|
|
2725
|
+
or(e) {
|
|
2726
|
+
return za([this, e]);
|
|
2727
|
+
},
|
|
2728
|
+
and(e) {
|
|
2729
|
+
return Ua(this, e);
|
|
2730
|
+
},
|
|
2731
|
+
transform(e) {
|
|
2732
|
+
return po(this, Xa(e));
|
|
2733
|
+
},
|
|
2734
|
+
default(e) {
|
|
2735
|
+
return io(this, e);
|
|
2736
|
+
},
|
|
2737
|
+
prefault(e) {
|
|
2738
|
+
return oo(this, e);
|
|
2739
|
+
},
|
|
2740
|
+
catch(e) {
|
|
2741
|
+
return uo(this, e);
|
|
2742
|
+
},
|
|
2743
|
+
pipe(e) {
|
|
2744
|
+
return po(this, e);
|
|
2745
|
+
},
|
|
2746
|
+
readonly() {
|
|
2747
|
+
return ho(this);
|
|
2748
|
+
},
|
|
2749
|
+
describe(e) {
|
|
2750
|
+
let t = this.clone();
|
|
2751
|
+
return or.add(t, { description: e }), t;
|
|
2752
|
+
},
|
|
2753
|
+
meta(...e) {
|
|
2754
|
+
if (e.length === 0) return or.get(this);
|
|
2755
|
+
let t = this.clone();
|
|
2756
|
+
return or.add(t, e[0]), t;
|
|
2757
|
+
},
|
|
2758
|
+
isOptional() {
|
|
2759
|
+
return this.safeParse(void 0).success;
|
|
2760
|
+
},
|
|
2761
|
+
isNullable() {
|
|
2762
|
+
return this.safeParse(null).success;
|
|
2763
|
+
},
|
|
2764
|
+
apply(e) {
|
|
2765
|
+
return e(this);
|
|
2766
|
+
}
|
|
2767
|
+
}), Object.defineProperty(e, "description", {
|
|
2768
|
+
get() {
|
|
2769
|
+
return or.get(e)?.description;
|
|
2770
|
+
},
|
|
2771
|
+
configurable: !0
|
|
2772
|
+
}), e)), aa = /*@__PURE__*/ S("_ZodString", (e, t) => {
|
|
2773
|
+
Wt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => hi(e, t, n, r);
|
|
2774
|
+
let n = e._zod.bag;
|
|
2775
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, ia(e, "_ZodString", {
|
|
2776
|
+
regex(...e) {
|
|
2777
|
+
return this.check(/* @__PURE__ */ Jr(...e));
|
|
2778
|
+
},
|
|
2779
|
+
includes(...e) {
|
|
2780
|
+
return this.check(/* @__PURE__ */ Zr(...e));
|
|
2781
|
+
},
|
|
2782
|
+
startsWith(...e) {
|
|
2783
|
+
return this.check(/* @__PURE__ */ Qr(...e));
|
|
2784
|
+
},
|
|
2785
|
+
endsWith(...e) {
|
|
2786
|
+
return this.check(/* @__PURE__ */ $r(...e));
|
|
2787
|
+
},
|
|
2788
|
+
min(...e) {
|
|
2789
|
+
return this.check(/* @__PURE__ */ Kr(...e));
|
|
2790
|
+
},
|
|
2791
|
+
max(...e) {
|
|
2792
|
+
return this.check(/* @__PURE__ */ Gr(...e));
|
|
2793
|
+
},
|
|
2794
|
+
length(...e) {
|
|
2795
|
+
return this.check(/* @__PURE__ */ qr(...e));
|
|
2796
|
+
},
|
|
2797
|
+
nonempty(...e) {
|
|
2798
|
+
return this.check(/* @__PURE__ */ Kr(1, ...e));
|
|
2799
|
+
},
|
|
2800
|
+
lowercase(e) {
|
|
2801
|
+
return this.check(/* @__PURE__ */ Yr(e));
|
|
2802
|
+
},
|
|
2803
|
+
uppercase(e) {
|
|
2804
|
+
return this.check(/* @__PURE__ */ Xr(e));
|
|
2805
|
+
},
|
|
2806
|
+
trim() {
|
|
2807
|
+
return this.check(/* @__PURE__ */ ti());
|
|
2808
|
+
},
|
|
2809
|
+
normalize(...e) {
|
|
2810
|
+
return this.check(/* @__PURE__ */ ei(...e));
|
|
2811
|
+
},
|
|
2812
|
+
toLowerCase() {
|
|
2813
|
+
return this.check(/* @__PURE__ */ ni());
|
|
2814
|
+
},
|
|
2815
|
+
toUpperCase() {
|
|
2816
|
+
return this.check(/* @__PURE__ */ ri());
|
|
2817
|
+
},
|
|
2818
|
+
slugify() {
|
|
2819
|
+
return this.check(/* @__PURE__ */ ii());
|
|
2820
|
+
}
|
|
2821
|
+
});
|
|
2822
|
+
}), oa = /*@__PURE__*/ S("ZodString", (e, t) => {
|
|
2823
|
+
Wt.init(e, t), aa.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ cr(sa, t)), e.url = (t) => e.check(/* @__PURE__ */ mr(ua, t)), e.jwt = (t) => e.check(/* @__PURE__ */ kr(Ta, t)), e.emoji = (t) => e.check(/* @__PURE__ */ hr(da, t)), e.guid = (t) => e.check(/* @__PURE__ */ lr(ca, t)), e.uuid = (t) => e.check(/* @__PURE__ */ ur(la, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ dr(la, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ fr(la, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ pr(la, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ gr(fa, t)), e.guid = (t) => e.check(/* @__PURE__ */ lr(ca, t)), e.cuid = (t) => e.check(/* @__PURE__ */ _r(pa, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ vr(ma, t)), e.ulid = (t) => e.check(/* @__PURE__ */ yr(ha, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Er(Sa, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Dr(Ca, t)), e.xid = (t) => e.check(/* @__PURE__ */ br(ga, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ xr(_a, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Sr(va, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ Cr(ya, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ wr(ba, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Tr(xa, t)), e.e164 = (t) => e.check(/* @__PURE__ */ Or(wa, t)), e.datetime = (t) => e.check(Ri(t)), e.date = (t) => e.check(Bi(t)), e.time = (t) => e.check(Hi(t)), e.duration = (t) => e.check(Wi(t));
|
|
2824
|
+
});
|
|
2825
|
+
function W(e) {
|
|
2826
|
+
return /* @__PURE__ */ sr(oa, e);
|
|
2827
|
+
}
|
|
2828
|
+
var G = /*@__PURE__*/ S("ZodStringFormat", (e, t) => {
|
|
2829
|
+
R.init(e, t), aa.init(e, t);
|
|
2830
|
+
}), sa = /*@__PURE__*/ S("ZodEmail", (e, t) => {
|
|
2831
|
+
qt.init(e, t), G.init(e, t);
|
|
2832
|
+
}), ca = /*@__PURE__*/ S("ZodGUID", (e, t) => {
|
|
2833
|
+
Gt.init(e, t), G.init(e, t);
|
|
2834
|
+
}), la = /*@__PURE__*/ S("ZodUUID", (e, t) => {
|
|
2835
|
+
Kt.init(e, t), G.init(e, t);
|
|
2836
|
+
}), ua = /*@__PURE__*/ S("ZodURL", (e, t) => {
|
|
2837
|
+
Jt.init(e, t), G.init(e, t);
|
|
2838
|
+
}), da = /*@__PURE__*/ S("ZodEmoji", (e, t) => {
|
|
2839
|
+
Yt.init(e, t), G.init(e, t);
|
|
2840
|
+
}), fa = /*@__PURE__*/ S("ZodNanoID", (e, t) => {
|
|
2841
|
+
Xt.init(e, t), G.init(e, t);
|
|
2842
|
+
}), pa = /*@__PURE__*/ S("ZodCUID", (e, t) => {
|
|
2843
|
+
Zt.init(e, t), G.init(e, t);
|
|
2844
|
+
}), ma = /*@__PURE__*/ S("ZodCUID2", (e, t) => {
|
|
2845
|
+
Qt.init(e, t), G.init(e, t);
|
|
2846
|
+
}), ha = /*@__PURE__*/ S("ZodULID", (e, t) => {
|
|
2847
|
+
$t.init(e, t), G.init(e, t);
|
|
2848
|
+
}), ga = /*@__PURE__*/ S("ZodXID", (e, t) => {
|
|
2849
|
+
en.init(e, t), G.init(e, t);
|
|
2850
|
+
}), _a = /*@__PURE__*/ S("ZodKSUID", (e, t) => {
|
|
2851
|
+
tn.init(e, t), G.init(e, t);
|
|
2852
|
+
}), va = /*@__PURE__*/ S("ZodIPv4", (e, t) => {
|
|
2853
|
+
sn.init(e, t), G.init(e, t);
|
|
2854
|
+
}), ya = /*@__PURE__*/ S("ZodIPv6", (e, t) => {
|
|
2855
|
+
cn.init(e, t), G.init(e, t);
|
|
2856
|
+
}), ba = /*@__PURE__*/ S("ZodCIDRv4", (e, t) => {
|
|
2857
|
+
ln.init(e, t), G.init(e, t);
|
|
2858
|
+
}), xa = /*@__PURE__*/ S("ZodCIDRv6", (e, t) => {
|
|
2859
|
+
un.init(e, t), G.init(e, t);
|
|
2860
|
+
}), Sa = /*@__PURE__*/ S("ZodBase64", (e, t) => {
|
|
2861
|
+
fn.init(e, t), G.init(e, t);
|
|
2862
|
+
}), Ca = /*@__PURE__*/ S("ZodBase64URL", (e, t) => {
|
|
2863
|
+
mn.init(e, t), G.init(e, t);
|
|
2864
|
+
}), wa = /*@__PURE__*/ S("ZodE164", (e, t) => {
|
|
2865
|
+
hn.init(e, t), G.init(e, t);
|
|
2866
|
+
}), Ta = /*@__PURE__*/ S("ZodJWT", (e, t) => {
|
|
2867
|
+
_n.init(e, t), G.init(e, t);
|
|
2868
|
+
}), Ea = /*@__PURE__*/ S("ZodNumber", (e, t) => {
|
|
2869
|
+
vn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => gi(e, t, n, r), ia(e, "ZodNumber", {
|
|
2870
|
+
gt(e, t) {
|
|
2871
|
+
return this.check(/* @__PURE__ */ Hr(e, t));
|
|
2872
|
+
},
|
|
2873
|
+
gte(e, t) {
|
|
2874
|
+
return this.check(/* @__PURE__ */ Ur(e, t));
|
|
2875
|
+
},
|
|
2876
|
+
min(e, t) {
|
|
2877
|
+
return this.check(/* @__PURE__ */ Ur(e, t));
|
|
2878
|
+
},
|
|
2879
|
+
lt(e, t) {
|
|
2880
|
+
return this.check(/* @__PURE__ */ Br(e, t));
|
|
2881
|
+
},
|
|
2882
|
+
lte(e, t) {
|
|
2883
|
+
return this.check(/* @__PURE__ */ Vr(e, t));
|
|
2884
|
+
},
|
|
2885
|
+
max(e, t) {
|
|
2886
|
+
return this.check(/* @__PURE__ */ Vr(e, t));
|
|
2887
|
+
},
|
|
2888
|
+
int(e) {
|
|
2889
|
+
return this.check(Oa(e));
|
|
2890
|
+
},
|
|
2891
|
+
safe(e) {
|
|
2892
|
+
return this.check(Oa(e));
|
|
2893
|
+
},
|
|
2894
|
+
positive(e) {
|
|
2895
|
+
return this.check(/* @__PURE__ */ Hr(0, e));
|
|
2896
|
+
},
|
|
2897
|
+
nonnegative(e) {
|
|
2898
|
+
return this.check(/* @__PURE__ */ Ur(0, e));
|
|
2899
|
+
},
|
|
2900
|
+
negative(e) {
|
|
2901
|
+
return this.check(/* @__PURE__ */ Br(0, e));
|
|
2902
|
+
},
|
|
2903
|
+
nonpositive(e) {
|
|
2904
|
+
return this.check(/* @__PURE__ */ Vr(0, e));
|
|
2905
|
+
},
|
|
2906
|
+
multipleOf(e, t) {
|
|
2907
|
+
return this.check(/* @__PURE__ */ Wr(e, t));
|
|
2908
|
+
},
|
|
2909
|
+
step(e, t) {
|
|
2910
|
+
return this.check(/* @__PURE__ */ Wr(e, t));
|
|
2911
|
+
},
|
|
2912
|
+
finite() {
|
|
2913
|
+
return this;
|
|
2914
|
+
}
|
|
2915
|
+
});
|
|
2916
|
+
let n = e._zod.bag;
|
|
2917
|
+
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;
|
|
2918
|
+
});
|
|
2919
|
+
function K(e) {
|
|
2920
|
+
return /* @__PURE__ */ Pr(Ea, e);
|
|
2921
|
+
}
|
|
2922
|
+
var Da = /*@__PURE__*/ S("ZodNumberFormat", (e, t) => {
|
|
2923
|
+
yn.init(e, t), Ea.init(e, t);
|
|
2924
|
+
});
|
|
2925
|
+
function Oa(e) {
|
|
2926
|
+
return /* @__PURE__ */ Fr(Da, e);
|
|
2927
|
+
}
|
|
2928
|
+
var ka = /*@__PURE__*/ S("ZodBoolean", (e, t) => {
|
|
2929
|
+
bn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => _i(e, t, n, r);
|
|
2930
|
+
});
|
|
2931
|
+
function q(e) {
|
|
2932
|
+
return /* @__PURE__ */ Ir(ka, e);
|
|
2933
|
+
}
|
|
2934
|
+
var Aa = /*@__PURE__*/ S("ZodNull", (e, t) => {
|
|
2935
|
+
xn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => vi(e, t, n, r);
|
|
2936
|
+
});
|
|
2937
|
+
function ja(e) {
|
|
2938
|
+
return /* @__PURE__ */ Lr(Aa, e);
|
|
2939
|
+
}
|
|
2940
|
+
var Ma = /*@__PURE__*/ S("ZodUnknown", (e, t) => {
|
|
2941
|
+
Sn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
2942
|
+
});
|
|
2943
|
+
function Na() {
|
|
2944
|
+
return /* @__PURE__ */ Rr(Ma);
|
|
2945
|
+
}
|
|
2946
|
+
var Pa = /*@__PURE__*/ S("ZodNever", (e, t) => {
|
|
2947
|
+
Cn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => yi(e, t, n, r);
|
|
2948
|
+
});
|
|
2949
|
+
function Fa(e) {
|
|
2950
|
+
return /* @__PURE__ */ zr(Pa, e);
|
|
2951
|
+
}
|
|
2952
|
+
var Ia = /*@__PURE__*/ S("ZodArray", (e, t) => {
|
|
2953
|
+
Tn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => wi(e, t, n, r), e.element = t.element, ia(e, "ZodArray", {
|
|
2954
|
+
min(e, t) {
|
|
2955
|
+
return this.check(/* @__PURE__ */ Kr(e, t));
|
|
2956
|
+
},
|
|
2957
|
+
nonempty(e) {
|
|
2958
|
+
return this.check(/* @__PURE__ */ Kr(1, e));
|
|
2959
|
+
},
|
|
2960
|
+
max(e, t) {
|
|
2961
|
+
return this.check(/* @__PURE__ */ Gr(e, t));
|
|
2962
|
+
},
|
|
2963
|
+
length(e, t) {
|
|
2964
|
+
return this.check(/* @__PURE__ */ qr(e, t));
|
|
2965
|
+
},
|
|
2966
|
+
unwrap() {
|
|
2967
|
+
return this.element;
|
|
2968
|
+
}
|
|
2969
|
+
});
|
|
2970
|
+
});
|
|
2971
|
+
function J(e, t) {
|
|
2972
|
+
return /* @__PURE__ */ ai(Ia, e, t);
|
|
2973
|
+
}
|
|
2974
|
+
var La = /*@__PURE__*/ S("ZodObject", (e, t) => {
|
|
2975
|
+
An.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ti(e, t, n, r), E(e, "shape", () => t.shape), ia(e, "ZodObject", {
|
|
2976
|
+
keyof() {
|
|
2977
|
+
return X(Object.keys(this._zod.def.shape));
|
|
2978
|
+
},
|
|
2979
|
+
catchall(e) {
|
|
2980
|
+
return this.clone({
|
|
2981
|
+
...this._zod.def,
|
|
2982
|
+
catchall: e
|
|
2983
|
+
});
|
|
2984
|
+
},
|
|
2985
|
+
passthrough() {
|
|
2986
|
+
return this.clone({
|
|
2987
|
+
...this._zod.def,
|
|
2988
|
+
catchall: Na()
|
|
2989
|
+
});
|
|
2990
|
+
},
|
|
2991
|
+
loose() {
|
|
2992
|
+
return this.clone({
|
|
2993
|
+
...this._zod.def,
|
|
2994
|
+
catchall: Na()
|
|
2995
|
+
});
|
|
2996
|
+
},
|
|
2997
|
+
strict() {
|
|
2998
|
+
return this.clone({
|
|
2999
|
+
...this._zod.def,
|
|
3000
|
+
catchall: Fa()
|
|
3001
|
+
});
|
|
3002
|
+
},
|
|
3003
|
+
strip() {
|
|
3004
|
+
return this.clone({
|
|
3005
|
+
...this._zod.def,
|
|
3006
|
+
catchall: void 0
|
|
3007
|
+
});
|
|
3008
|
+
},
|
|
3009
|
+
extend(e) {
|
|
3010
|
+
return be(this, e);
|
|
3011
|
+
},
|
|
3012
|
+
safeExtend(e) {
|
|
3013
|
+
return xe(this, e);
|
|
3014
|
+
},
|
|
3015
|
+
merge(e) {
|
|
3016
|
+
return Se(this, e);
|
|
3017
|
+
},
|
|
3018
|
+
pick(e) {
|
|
3019
|
+
return ve(this, e);
|
|
3020
|
+
},
|
|
3021
|
+
omit(e) {
|
|
3022
|
+
return ye(this, e);
|
|
3023
|
+
},
|
|
3024
|
+
partial(...e) {
|
|
3025
|
+
return Ce(Za, this, e[0]);
|
|
3026
|
+
},
|
|
3027
|
+
required(...e) {
|
|
3028
|
+
return we(so, this, e[0]);
|
|
3029
|
+
}
|
|
3030
|
+
});
|
|
3031
|
+
});
|
|
3032
|
+
function Y(e, t) {
|
|
3033
|
+
return new La({
|
|
3034
|
+
type: "object",
|
|
3035
|
+
shape: e ?? {},
|
|
3036
|
+
...M(t)
|
|
3037
|
+
});
|
|
3038
|
+
}
|
|
3039
|
+
var Ra = /*@__PURE__*/ S("ZodUnion", (e, t) => {
|
|
3040
|
+
Mn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ei(e, t, n, r), e.options = t.options;
|
|
3041
|
+
});
|
|
3042
|
+
function za(e, t) {
|
|
3043
|
+
return new Ra({
|
|
3044
|
+
type: "union",
|
|
3045
|
+
options: e,
|
|
3046
|
+
...M(t)
|
|
3047
|
+
});
|
|
3048
|
+
}
|
|
3049
|
+
var Ba = /*@__PURE__*/ S("ZodDiscriminatedUnion", (e, t) => {
|
|
3050
|
+
Ra.init(e, t), Nn.init(e, t);
|
|
3051
|
+
});
|
|
3052
|
+
function Va(e, t, n) {
|
|
3053
|
+
return new Ba({
|
|
3054
|
+
type: "union",
|
|
3055
|
+
options: t,
|
|
3056
|
+
discriminator: e,
|
|
3057
|
+
...M(n)
|
|
3058
|
+
});
|
|
3059
|
+
}
|
|
3060
|
+
var Ha = /*@__PURE__*/ S("ZodIntersection", (e, t) => {
|
|
3061
|
+
Pn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Di(e, t, n, r);
|
|
3062
|
+
});
|
|
3063
|
+
function Ua(e, t) {
|
|
3064
|
+
return new Ha({
|
|
3065
|
+
type: "intersection",
|
|
3066
|
+
left: e,
|
|
3067
|
+
right: t
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
var Wa = /*@__PURE__*/ S("ZodRecord", (e, t) => {
|
|
3071
|
+
Ln.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oi(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
3072
|
+
});
|
|
3073
|
+
function Ga(e, t, n) {
|
|
3074
|
+
return !t || !t._zod ? new Wa({
|
|
3075
|
+
type: "record",
|
|
3076
|
+
keyType: W(),
|
|
3077
|
+
valueType: e,
|
|
3078
|
+
...M(t)
|
|
3079
|
+
}) : new Wa({
|
|
3080
|
+
type: "record",
|
|
3081
|
+
keyType: e,
|
|
3082
|
+
valueType: t,
|
|
3083
|
+
...M(n)
|
|
3084
|
+
});
|
|
3085
|
+
}
|
|
3086
|
+
var Ka = /*@__PURE__*/ S("ZodEnum", (e, t) => {
|
|
3087
|
+
Rn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => bi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3088
|
+
let n = new Set(Object.keys(t.entries));
|
|
3089
|
+
e.extract = (e, r) => {
|
|
3090
|
+
let i = {};
|
|
3091
|
+
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
3092
|
+
else throw Error(`Key ${r} not found in enum`);
|
|
3093
|
+
return new Ka({
|
|
3094
|
+
...t,
|
|
3095
|
+
checks: [],
|
|
3096
|
+
...M(r),
|
|
3097
|
+
entries: i
|
|
3098
|
+
});
|
|
3099
|
+
}, e.exclude = (e, r) => {
|
|
3100
|
+
let i = { ...t.entries };
|
|
3101
|
+
for (let t of e) if (n.has(t)) delete i[t];
|
|
3102
|
+
else throw Error(`Key ${t} not found in enum`);
|
|
3103
|
+
return new Ka({
|
|
3104
|
+
...t,
|
|
3105
|
+
checks: [],
|
|
3106
|
+
...M(r),
|
|
3107
|
+
entries: i
|
|
3108
|
+
});
|
|
3109
|
+
};
|
|
3110
|
+
});
|
|
3111
|
+
function X(e, t) {
|
|
3112
|
+
return new Ka({
|
|
3113
|
+
type: "enum",
|
|
3114
|
+
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
3115
|
+
...M(t)
|
|
3116
|
+
});
|
|
3117
|
+
}
|
|
3118
|
+
var qa = /*@__PURE__*/ S("ZodLiteral", (e, t) => {
|
|
3119
|
+
zn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => xi(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
3120
|
+
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3121
|
+
return t.values[0];
|
|
3122
|
+
} });
|
|
3123
|
+
});
|
|
3124
|
+
function Ja(e, t) {
|
|
3125
|
+
return new qa({
|
|
3126
|
+
type: "literal",
|
|
3127
|
+
values: Array.isArray(e) ? e : [e],
|
|
3128
|
+
...M(t)
|
|
3129
|
+
});
|
|
3130
|
+
}
|
|
3131
|
+
var Ya = /*@__PURE__*/ S("ZodTransform", (e, t) => {
|
|
3132
|
+
Bn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ci(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3133
|
+
if (r.direction === "backward") throw new te(e.constructor.name);
|
|
3134
|
+
n.addIssue = (r) => {
|
|
3135
|
+
if (typeof r == "string") n.issues.push(Oe(r, n.value, t));
|
|
3136
|
+
else {
|
|
3137
|
+
let t = r;
|
|
3138
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(Oe(t));
|
|
3139
|
+
}
|
|
3140
|
+
};
|
|
3141
|
+
let i = t.transform(n.value, n);
|
|
3142
|
+
return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
|
|
3143
|
+
};
|
|
3144
|
+
});
|
|
3145
|
+
function Xa(e) {
|
|
3146
|
+
return new Ya({
|
|
3147
|
+
type: "transform",
|
|
3148
|
+
transform: e
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
var Za = /*@__PURE__*/ S("ZodOptional", (e, t) => {
|
|
3152
|
+
Hn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ii(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3153
|
+
});
|
|
3154
|
+
function Qa(e) {
|
|
3155
|
+
return new Za({
|
|
3156
|
+
type: "optional",
|
|
3157
|
+
innerType: e
|
|
3158
|
+
});
|
|
3159
|
+
}
|
|
3160
|
+
var $a = /*@__PURE__*/ S("ZodExactOptional", (e, t) => {
|
|
3161
|
+
Un.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ii(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3162
|
+
});
|
|
3163
|
+
function eo(e) {
|
|
3164
|
+
return new $a({
|
|
3165
|
+
type: "optional",
|
|
3166
|
+
innerType: e
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
var to = /*@__PURE__*/ S("ZodNullable", (e, t) => {
|
|
3170
|
+
Wn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => ki(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3171
|
+
});
|
|
3172
|
+
function no(e) {
|
|
3173
|
+
return new to({
|
|
3174
|
+
type: "nullable",
|
|
3175
|
+
innerType: e
|
|
3176
|
+
});
|
|
3177
|
+
}
|
|
3178
|
+
var ro = /*@__PURE__*/ S("ZodDefault", (e, t) => {
|
|
3179
|
+
Gn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => ji(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3180
|
+
});
|
|
3181
|
+
function io(e, t) {
|
|
3182
|
+
return new ro({
|
|
3183
|
+
type: "default",
|
|
3184
|
+
innerType: e,
|
|
3185
|
+
get defaultValue() {
|
|
3186
|
+
return typeof t == "function" ? t() : me(t);
|
|
3187
|
+
}
|
|
3188
|
+
});
|
|
3189
|
+
}
|
|
3190
|
+
var ao = /*@__PURE__*/ S("ZodPrefault", (e, t) => {
|
|
3191
|
+
qn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Mi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3192
|
+
});
|
|
3193
|
+
function oo(e, t) {
|
|
3194
|
+
return new ao({
|
|
3195
|
+
type: "prefault",
|
|
3196
|
+
innerType: e,
|
|
3197
|
+
get defaultValue() {
|
|
3198
|
+
return typeof t == "function" ? t() : me(t);
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
3201
|
+
}
|
|
3202
|
+
var so = /*@__PURE__*/ S("ZodNonOptional", (e, t) => {
|
|
3203
|
+
Jn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ai(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3204
|
+
});
|
|
3205
|
+
function co(e, t) {
|
|
3206
|
+
return new so({
|
|
3207
|
+
type: "nonoptional",
|
|
3208
|
+
innerType: e,
|
|
3209
|
+
...M(t)
|
|
3210
|
+
});
|
|
3211
|
+
}
|
|
3212
|
+
var lo = /*@__PURE__*/ S("ZodCatch", (e, t) => {
|
|
3213
|
+
Xn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ni(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3214
|
+
});
|
|
3215
|
+
function uo(e, t) {
|
|
3216
|
+
return new lo({
|
|
3217
|
+
type: "catch",
|
|
3218
|
+
innerType: e,
|
|
3219
|
+
catchValue: typeof t == "function" ? t : () => t
|
|
3220
|
+
});
|
|
3221
|
+
}
|
|
3222
|
+
var fo = /*@__PURE__*/ S("ZodPipe", (e, t) => {
|
|
3223
|
+
Zn.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pi(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
3224
|
+
});
|
|
3225
|
+
function po(e, t) {
|
|
3226
|
+
return new fo({
|
|
3227
|
+
type: "pipe",
|
|
3228
|
+
in: e,
|
|
3229
|
+
out: t
|
|
3230
|
+
});
|
|
3231
|
+
}
|
|
3232
|
+
var mo = /*@__PURE__*/ S("ZodReadonly", (e, t) => {
|
|
3233
|
+
$n.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3234
|
+
});
|
|
3235
|
+
function ho(e) {
|
|
3236
|
+
return new mo({
|
|
3237
|
+
type: "readonly",
|
|
3238
|
+
innerType: e
|
|
3239
|
+
});
|
|
3240
|
+
}
|
|
3241
|
+
var go = /*@__PURE__*/ S("ZodCustom", (e, t) => {
|
|
3242
|
+
tr.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => Si(e, t, n, r);
|
|
3243
|
+
});
|
|
3244
|
+
function _o(e, t = {}) {
|
|
3245
|
+
return /* @__PURE__ */ oi(go, e, t);
|
|
3246
|
+
}
|
|
3247
|
+
function vo(e, t) {
|
|
3248
|
+
return /* @__PURE__ */ si(e, t);
|
|
3249
|
+
}
|
|
3250
|
+
//#endregion
|
|
3251
|
+
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
3252
|
+
var yo = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), bo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), xo = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), So = (e) => {
|
|
3253
|
+
let t = xo(e);
|
|
3254
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3255
|
+
}, Co = {
|
|
3256
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3257
|
+
width: 24,
|
|
3258
|
+
height: 24,
|
|
3259
|
+
viewBox: "0 0 24 24",
|
|
3260
|
+
fill: "none",
|
|
3261
|
+
stroke: "currentColor",
|
|
3262
|
+
strokeWidth: 2,
|
|
3263
|
+
strokeLinecap: "round",
|
|
3264
|
+
strokeLinejoin: "round"
|
|
3265
|
+
}, wo = (e) => {
|
|
3266
|
+
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
3267
|
+
return !1;
|
|
3268
|
+
}, To = h(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => v("svg", {
|
|
3269
|
+
ref: c,
|
|
3270
|
+
...Co,
|
|
3271
|
+
width: t,
|
|
3272
|
+
height: t,
|
|
3273
|
+
stroke: e,
|
|
3274
|
+
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
3275
|
+
className: yo("lucide", i),
|
|
3276
|
+
...!a && !wo(s) && { "aria-hidden": "true" },
|
|
3277
|
+
...s
|
|
3278
|
+
}, [...o.map(([e, t]) => v(e, t)), ...Array.isArray(a) ? a : [a]])), Eo = (e, t) => {
|
|
3279
|
+
let n = h(({ className: n, ...r }, i) => v(To, {
|
|
3280
|
+
ref: i,
|
|
3281
|
+
iconNode: t,
|
|
3282
|
+
className: yo(`lucide-${bo(So(e))}`, `lucide-${e}`, n),
|
|
3283
|
+
...r
|
|
3284
|
+
}));
|
|
3285
|
+
return n.displayName = So(e), n;
|
|
3286
|
+
}, Do = Eo("refresh-cw", [
|
|
3287
|
+
["path", {
|
|
3288
|
+
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
3289
|
+
key: "v9h5vc"
|
|
3290
|
+
}],
|
|
3291
|
+
["path", {
|
|
3292
|
+
d: "M21 3v5h-5",
|
|
3293
|
+
key: "1q7to0"
|
|
3294
|
+
}],
|
|
3295
|
+
["path", {
|
|
3296
|
+
d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",
|
|
3297
|
+
key: "3uifl3"
|
|
3298
|
+
}],
|
|
3299
|
+
["path", {
|
|
3300
|
+
d: "M8 16H3v5",
|
|
3301
|
+
key: "1cv678"
|
|
3302
|
+
}]
|
|
3303
|
+
]), Oo = Eo("send", [["path", {
|
|
3304
|
+
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
3305
|
+
key: "1ffxy3"
|
|
3306
|
+
}], ["path", {
|
|
3307
|
+
d: "m21.854 2.147-10.94 10.939",
|
|
3308
|
+
key: "12cjpa"
|
|
3309
|
+
}]]), ko = Eo("sliders-horizontal", [
|
|
3310
|
+
["path", {
|
|
3311
|
+
d: "M10 5H3",
|
|
3312
|
+
key: "1qgfaw"
|
|
3313
|
+
}],
|
|
3314
|
+
["path", {
|
|
3315
|
+
d: "M12 19H3",
|
|
3316
|
+
key: "yhmn1j"
|
|
3317
|
+
}],
|
|
3318
|
+
["path", {
|
|
3319
|
+
d: "M14 3v4",
|
|
3320
|
+
key: "1sua03"
|
|
3321
|
+
}],
|
|
3322
|
+
["path", {
|
|
3323
|
+
d: "M16 17v4",
|
|
3324
|
+
key: "1q0r14"
|
|
3325
|
+
}],
|
|
3326
|
+
["path", {
|
|
3327
|
+
d: "M21 12h-9",
|
|
3328
|
+
key: "1o4lsq"
|
|
3329
|
+
}],
|
|
3330
|
+
["path", {
|
|
3331
|
+
d: "M21 19h-5",
|
|
3332
|
+
key: "1rlt1p"
|
|
3333
|
+
}],
|
|
3334
|
+
["path", {
|
|
3335
|
+
d: "M21 5h-7",
|
|
3336
|
+
key: "1oszz2"
|
|
3337
|
+
}],
|
|
3338
|
+
["path", {
|
|
3339
|
+
d: "M8 10v4",
|
|
3340
|
+
key: "tgpxqk"
|
|
3341
|
+
}],
|
|
3342
|
+
["path", {
|
|
3343
|
+
d: "M8 12H3",
|
|
3344
|
+
key: "a7s4jb"
|
|
3345
|
+
}]
|
|
3346
|
+
]), Z = Y({ integrationId: W().min(1) }), Q = q();
|
|
3347
|
+
Y({
|
|
3348
|
+
integrationId: W(),
|
|
3349
|
+
name: W(),
|
|
3350
|
+
connected: q()
|
|
3351
|
+
});
|
|
3352
|
+
var Ao = Y({
|
|
3353
|
+
version: W().nullable(),
|
|
3354
|
+
product: W().nullable(),
|
|
3355
|
+
productFamily: X([
|
|
3356
|
+
"ccu3",
|
|
3357
|
+
"openccu",
|
|
3358
|
+
"unknown"
|
|
3359
|
+
]),
|
|
3360
|
+
platform: W().nullable(),
|
|
3361
|
+
serial: W().nullable(),
|
|
3362
|
+
hostname: W().nullable()
|
|
3363
|
+
}), jo = Y({
|
|
3364
|
+
address: W(),
|
|
3365
|
+
description: W().nullable(),
|
|
3366
|
+
dutyCycle: K().nullable(),
|
|
3367
|
+
connected: q().nullable(),
|
|
3368
|
+
isDefault: q(),
|
|
3369
|
+
firmware: W().nullable(),
|
|
3370
|
+
type: W().nullable()
|
|
3371
|
+
}), Mo = Y({
|
|
3372
|
+
name: W(),
|
|
3373
|
+
port: K().nullable(),
|
|
3374
|
+
info: W().nullable(),
|
|
3375
|
+
connected: q().nullable(),
|
|
3376
|
+
dutyCycle: K().nullable(),
|
|
3377
|
+
firmware: W().nullable(),
|
|
3378
|
+
type: W().nullable(),
|
|
3379
|
+
gateways: J(jo)
|
|
3380
|
+
});
|
|
3381
|
+
Y({
|
|
3382
|
+
info: Ao.nullable(),
|
|
3383
|
+
infoError: W().nullable(),
|
|
3384
|
+
interfaces: J(Mo),
|
|
3385
|
+
interfacesError: W().nullable()
|
|
3386
|
+
}), Y({
|
|
3387
|
+
messages: J(Y({
|
|
3388
|
+
id: W(),
|
|
3389
|
+
name: W().nullable(),
|
|
3390
|
+
address: W().nullable(),
|
|
3391
|
+
channel: K().nullable(),
|
|
3392
|
+
type: W().nullable(),
|
|
3393
|
+
timestamp: K().nullable(),
|
|
3394
|
+
acknowledgeable: q()
|
|
3395
|
+
})),
|
|
3396
|
+
error: W().nullable()
|
|
3397
|
+
}), Z.extend({
|
|
3398
|
+
id: W().min(1),
|
|
3399
|
+
confirmed: Q
|
|
3400
|
+
});
|
|
3401
|
+
var No = Y({ ok: Ja(!0) });
|
|
3402
|
+
Z.extend({
|
|
3403
|
+
address: W().min(1),
|
|
3404
|
+
enabled: q(),
|
|
3405
|
+
confirmed: Q
|
|
3406
|
+
});
|
|
3407
|
+
var Po = Y({
|
|
3408
|
+
receiver: W(),
|
|
3409
|
+
receiverName: W().nullable(),
|
|
3410
|
+
receiverDeviceName: W().nullable()
|
|
3411
|
+
}), Fo = Y({
|
|
3412
|
+
address: W(),
|
|
3413
|
+
index: W(),
|
|
3414
|
+
name: W().nullable(),
|
|
3415
|
+
central: X([
|
|
3416
|
+
"on",
|
|
3417
|
+
"off",
|
|
3418
|
+
"unknown"
|
|
3419
|
+
]),
|
|
3420
|
+
links: J(Po)
|
|
3421
|
+
}), Io = Y({
|
|
3422
|
+
address: W(),
|
|
3423
|
+
index: K(),
|
|
3424
|
+
type: W().nullable(),
|
|
3425
|
+
name: W().nullable()
|
|
3426
|
+
});
|
|
3427
|
+
Y({ devices: J(Y({
|
|
3428
|
+
address: W(),
|
|
3429
|
+
type: W(),
|
|
3430
|
+
name: W().nullable(),
|
|
3431
|
+
rooms: J(W()),
|
|
3432
|
+
functions: J(W()),
|
|
3433
|
+
firmware: W().nullable(),
|
|
3434
|
+
availableFirmware: W().nullable(),
|
|
3435
|
+
updatable: q().nullable(),
|
|
3436
|
+
rssi: K().nullable(),
|
|
3437
|
+
rssiPeer: K().nullable(),
|
|
3438
|
+
dutyCycle: K().nullable(),
|
|
3439
|
+
dutyCycleLimited: q().nullable(),
|
|
3440
|
+
lowBattery: q().nullable(),
|
|
3441
|
+
unreach: q().nullable(),
|
|
3442
|
+
configPending: q().nullable(),
|
|
3443
|
+
sabotage: q().nullable(),
|
|
3444
|
+
keyChannels: J(Fo).default([]),
|
|
3445
|
+
channels: J(Io).default([])
|
|
3446
|
+
})) });
|
|
3447
|
+
var Lo = ["hmip.heating.group", "HomeMatic.heating"], Ro = Y({
|
|
3448
|
+
address: W(),
|
|
3449
|
+
type: W(),
|
|
3450
|
+
deviceName: W().nullable()
|
|
3451
|
+
}), zo = Y({
|
|
3452
|
+
id: K(),
|
|
3453
|
+
name: W(),
|
|
3454
|
+
type: W(),
|
|
3455
|
+
typeLabel: W().nullable(),
|
|
3456
|
+
deviceAddress: W().nullable(),
|
|
3457
|
+
forbidSingleOperation: q(),
|
|
3458
|
+
members: J(Ro)
|
|
3459
|
+
}), Bo = Y({
|
|
3460
|
+
device: W(),
|
|
3461
|
+
channel: W(),
|
|
3462
|
+
name: W().nullable(),
|
|
3463
|
+
currentTemperature: K().nullable(),
|
|
3464
|
+
targetTemperature: K().nullable(),
|
|
3465
|
+
mode: X([
|
|
3466
|
+
"auto",
|
|
3467
|
+
"heat",
|
|
3468
|
+
"off"
|
|
3469
|
+
]),
|
|
3470
|
+
activity: X([
|
|
3471
|
+
"heating",
|
|
3472
|
+
"idle",
|
|
3473
|
+
"off"
|
|
3474
|
+
])
|
|
3475
|
+
}), Vo = Y({
|
|
3476
|
+
address: W(),
|
|
3477
|
+
type: W(),
|
|
3478
|
+
deviceName: W().nullable()
|
|
3479
|
+
});
|
|
3480
|
+
Y({
|
|
3481
|
+
groups: J(zo),
|
|
3482
|
+
groupsError: W().nullable(),
|
|
3483
|
+
thermostats: J(Bo),
|
|
3484
|
+
candidates: J(Vo)
|
|
3485
|
+
}), Z.extend({
|
|
3486
|
+
name: W(),
|
|
3487
|
+
type: X(Lo),
|
|
3488
|
+
members: J(W()),
|
|
3489
|
+
confirmed: Q
|
|
3490
|
+
}), Z.extend({
|
|
3491
|
+
id: K(),
|
|
3492
|
+
name: W().optional(),
|
|
3493
|
+
members: J(W()).optional(),
|
|
3494
|
+
confirmed: Q
|
|
3495
|
+
}), Z.extend({
|
|
3496
|
+
id: K(),
|
|
3497
|
+
confirmed: Q
|
|
3498
|
+
}), Y({
|
|
3499
|
+
interfaces: J(Y({
|
|
3500
|
+
name: W(),
|
|
3501
|
+
secondsLeft: K().nullable(),
|
|
3502
|
+
supportsSecure: q(),
|
|
3503
|
+
error: W().nullable()
|
|
3504
|
+
})),
|
|
3505
|
+
error: W().nullable()
|
|
3506
|
+
}), Z.extend({
|
|
3507
|
+
interface: W().min(1),
|
|
3508
|
+
on: q(),
|
|
3509
|
+
seconds: K().int().min(1).max(3600).optional(),
|
|
3510
|
+
mode: X(["normal", "secure"]).optional(),
|
|
3511
|
+
confirmed: Q
|
|
3512
|
+
}), Z.extend({
|
|
3513
|
+
address: W().min(1),
|
|
3514
|
+
reset: q(),
|
|
3515
|
+
force: q(),
|
|
3516
|
+
confirmed: Q
|
|
3517
|
+
});
|
|
3518
|
+
var Ho = za([
|
|
3519
|
+
q(),
|
|
3520
|
+
K(),
|
|
3521
|
+
W(),
|
|
3522
|
+
ja()
|
|
3523
|
+
]), Uo = Y({
|
|
3524
|
+
parameter: W(),
|
|
3525
|
+
type: W(),
|
|
3526
|
+
min: K().nullable(),
|
|
3527
|
+
max: K().nullable(),
|
|
3528
|
+
unit: W().nullable(),
|
|
3529
|
+
valueList: J(W()).nullable(),
|
|
3530
|
+
writable: q(),
|
|
3531
|
+
value: Ho
|
|
3532
|
+
}), Wo = Y({ channels: J(Y({
|
|
3533
|
+
channel: W(),
|
|
3534
|
+
channelType: W().nullable(),
|
|
3535
|
+
params: J(Uo),
|
|
3536
|
+
error: W().nullable()
|
|
3537
|
+
})) });
|
|
3538
|
+
Z.extend({ address: W().min(1) }), Z.extend({
|
|
3539
|
+
channel: W().min(1),
|
|
3540
|
+
values: Ga(W(), Ho),
|
|
3541
|
+
confirmed: Q
|
|
3542
|
+
});
|
|
3543
|
+
var Go = X([
|
|
3544
|
+
"toggle",
|
|
3545
|
+
"on",
|
|
3546
|
+
"off",
|
|
3547
|
+
"none"
|
|
3548
|
+
]), Ko = Va("kind", [Y({
|
|
3549
|
+
kind: Ja("switch"),
|
|
3550
|
+
short: Go,
|
|
3551
|
+
long: Go
|
|
3552
|
+
}), Y({ kind: Ja("custom") })]).nullable(), qo = Y({
|
|
3553
|
+
address: W(),
|
|
3554
|
+
name: W().nullable(),
|
|
3555
|
+
deviceName: W().nullable(),
|
|
3556
|
+
deviceType: W().nullable()
|
|
3557
|
+
}), Jo = Y({
|
|
3558
|
+
sender: qo,
|
|
3559
|
+
receiver: qo,
|
|
3560
|
+
name: W(),
|
|
3561
|
+
description: W(),
|
|
3562
|
+
profile: Ko
|
|
3563
|
+
}), Yo = Y({
|
|
3564
|
+
address: W(),
|
|
3565
|
+
deviceName: W().nullable(),
|
|
3566
|
+
error: W()
|
|
3567
|
+
});
|
|
3568
|
+
Y({
|
|
3569
|
+
links: J(Jo),
|
|
3570
|
+
senders: J(qo),
|
|
3571
|
+
receivers: J(qo),
|
|
3572
|
+
failures: J(Yo)
|
|
3573
|
+
}), Z.extend({
|
|
3574
|
+
sender: W().min(1),
|
|
3575
|
+
receiver: W().min(1),
|
|
3576
|
+
confirmed: Q
|
|
3577
|
+
}).extend({
|
|
3578
|
+
short: Go,
|
|
3579
|
+
long: Go
|
|
3580
|
+
});
|
|
3581
|
+
var Xo = Y({
|
|
3582
|
+
address: W(),
|
|
3583
|
+
name: W()
|
|
3584
|
+
});
|
|
3585
|
+
Y({
|
|
3586
|
+
device: Xo,
|
|
3587
|
+
channels: J(Xo)
|
|
3588
|
+
}), Z.extend({
|
|
3589
|
+
address: W().min(1),
|
|
3590
|
+
name: W(),
|
|
3591
|
+
renameChannels: q(),
|
|
3592
|
+
confirmed: Q
|
|
3593
|
+
}), Z.extend({
|
|
3594
|
+
address: W().min(1),
|
|
3595
|
+
name: W(),
|
|
3596
|
+
confirmed: Q
|
|
3597
|
+
}), Y({
|
|
3598
|
+
rooms: J(Y({
|
|
3599
|
+
id: W(),
|
|
3600
|
+
name: W(),
|
|
3601
|
+
channels: J(qo)
|
|
3602
|
+
})),
|
|
3603
|
+
channels: J(qo)
|
|
3604
|
+
}), Z.extend({
|
|
3605
|
+
name: W(),
|
|
3606
|
+
confirmed: Q
|
|
3607
|
+
}), Z.extend({
|
|
3608
|
+
id: W().min(1),
|
|
3609
|
+
name: W(),
|
|
3610
|
+
confirmed: Q
|
|
3611
|
+
}), Z.extend({
|
|
3612
|
+
id: W().min(1),
|
|
3613
|
+
confirmed: Q
|
|
3614
|
+
}), Z.extend({
|
|
3615
|
+
id: W().min(1),
|
|
3616
|
+
channels: J(W().min(1)),
|
|
3617
|
+
confirmed: Q
|
|
3618
|
+
}), Y({
|
|
3619
|
+
added: J(W()),
|
|
3620
|
+
removed: J(W())
|
|
3621
|
+
});
|
|
3622
|
+
var Zo = Uo.extend({ readable: q() }), Qo = Y({
|
|
3623
|
+
address: W(),
|
|
3624
|
+
index: K(),
|
|
3625
|
+
type: W().nullable(),
|
|
3626
|
+
name: W().nullable(),
|
|
3627
|
+
values: J(Zo)
|
|
3628
|
+
}), $o = Y({
|
|
3629
|
+
rssiDevice: K().nullable(),
|
|
3630
|
+
rssiPeer: K().nullable(),
|
|
3631
|
+
unreach: q().nullable(),
|
|
3632
|
+
lowBattery: q().nullable(),
|
|
3633
|
+
dutyCycle: za([q(), K()]).nullable(),
|
|
3634
|
+
configPending: q().nullable()
|
|
3635
|
+
}), es = Y({
|
|
3636
|
+
installed: W().nullable(),
|
|
3637
|
+
available: W().nullable(),
|
|
3638
|
+
updatable: q().nullable(),
|
|
3639
|
+
state: W().nullable()
|
|
3640
|
+
}), ts = Y({
|
|
3641
|
+
address: W(),
|
|
3642
|
+
name: W().nullable(),
|
|
3643
|
+
type: W(),
|
|
3644
|
+
firmware: es,
|
|
3645
|
+
diagnostics: $o,
|
|
3646
|
+
channels: J(Qo)
|
|
3647
|
+
});
|
|
3648
|
+
Z.extend({
|
|
3649
|
+
channel: W().min(1),
|
|
3650
|
+
parameter: W().min(1),
|
|
3651
|
+
value: Ho,
|
|
3652
|
+
deviceId: K().int().optional(),
|
|
3653
|
+
confirmed: Q
|
|
3654
|
+
});
|
|
3655
|
+
//#endregion
|
|
3656
|
+
//#region src/i18n/index.ts
|
|
3657
|
+
var { useT: $, Trans: ns, translate: rs } = c("provider-homematic", {
|
|
3658
|
+
en: {
|
|
3659
|
+
common: { loading: "Loading…" },
|
|
3660
|
+
write: { failedTitle: "The CCU refused the change" },
|
|
3661
|
+
page: {
|
|
3662
|
+
title: "Homematic CCU",
|
|
3663
|
+
subtitle: "Manage the CCU without opening its web interface",
|
|
3664
|
+
sectionsLabel: "CCU sections",
|
|
3665
|
+
ccuPicker: "CCU",
|
|
3666
|
+
tabOverview: "Overview",
|
|
3667
|
+
loadFailed: "Could not load the CCUs",
|
|
3668
|
+
noCcu: "No Homematic CCU is set up",
|
|
3669
|
+
noCcuHint: "Add a CCU from Integrations, then manage it here.",
|
|
3670
|
+
notConnected: "{{name}} is not connected",
|
|
3671
|
+
notConnectedHint: "The page works on a connected CCU. Check the connection in the integration.",
|
|
3672
|
+
tabDevices: "Devices",
|
|
3673
|
+
tabHeating: "Heating",
|
|
3674
|
+
tabPairing: "Pairing",
|
|
3675
|
+
tabLinks: "Direct links",
|
|
3676
|
+
tabSettings: "Settings"
|
|
3677
|
+
},
|
|
3678
|
+
overview: {
|
|
3679
|
+
loadFailed: "Could not read the CCU",
|
|
3680
|
+
ccuTitle: "CCU",
|
|
3681
|
+
infoUnavailable: "CCU details unavailable",
|
|
3682
|
+
infoNoAnswer: "The CCU did not answer. Version and serial need the WebUI credentials set in the integration.",
|
|
3683
|
+
version: "Version",
|
|
3684
|
+
product: "Product",
|
|
3685
|
+
hostname: "Hostname",
|
|
3686
|
+
serial: "Serial",
|
|
3687
|
+
interfacesTitle: "Interfaces",
|
|
3688
|
+
interfacesUnavailable: "Interfaces unavailable",
|
|
3689
|
+
noInterfaces: "The CCU reported no interfaces",
|
|
3690
|
+
colInterface: "Interface",
|
|
3691
|
+
colState: "State",
|
|
3692
|
+
colDutyCycle: "Duty cycle",
|
|
3693
|
+
colFirmware: "Firmware",
|
|
3694
|
+
colType: "Type",
|
|
3695
|
+
colGateways: "Gateways",
|
|
3696
|
+
messagesTitle: "Service messages",
|
|
3697
|
+
messagesUnavailable: "Service messages unavailable",
|
|
3698
|
+
noMessages: "No service messages",
|
|
3699
|
+
colWhen: "Since",
|
|
3700
|
+
colMessage: "Message",
|
|
3701
|
+
colDevice: "Device",
|
|
3702
|
+
ack: "Acknowledge",
|
|
3703
|
+
ackTitle: "Acknowledge service message",
|
|
3704
|
+
ackMessage: "Acknowledge {{type}} for {{name}} on the CCU? The message disappears from the CCU as well.",
|
|
3705
|
+
ackConfirm: "Acknowledge"
|
|
3706
|
+
},
|
|
3707
|
+
devices: {
|
|
3708
|
+
colDevice: "Device",
|
|
3709
|
+
colType: "Type",
|
|
3710
|
+
colPlace: "Room / function",
|
|
3711
|
+
colFirmware: "Firmware",
|
|
3712
|
+
colSignal: "Signal",
|
|
3713
|
+
colDutyCycle: "Duty cycle",
|
|
3714
|
+
colHealth: "Health",
|
|
3715
|
+
updateTo: "Update to {{version}}",
|
|
3716
|
+
dutyLimited: "Limit reached",
|
|
3717
|
+
unreach: "Unreachable",
|
|
3718
|
+
sabotage: "Sabotage",
|
|
3719
|
+
lowBattery: "Low battery",
|
|
3720
|
+
configPending: "Config pending",
|
|
3721
|
+
ok: "OK",
|
|
3722
|
+
loadFailed: "Could not read the devices",
|
|
3723
|
+
groupIssue: "Health",
|
|
3724
|
+
groupType: "Type",
|
|
3725
|
+
searchPlaceholder: "Search name, address, type, room",
|
|
3726
|
+
searchLabel: "Search CCU devices",
|
|
3727
|
+
facetsLabel: "Filter CCU devices",
|
|
3728
|
+
clearFilters: "Clear filters",
|
|
3729
|
+
noMatch: "No device matches the filter",
|
|
3730
|
+
none: "The CCU has no devices",
|
|
3731
|
+
deleteAction: "Delete from CCU",
|
|
3732
|
+
deleteDialogTitle: "Delete {{name}} from the CCU",
|
|
3733
|
+
deleteContinue: "Continue",
|
|
3734
|
+
deleteResetLabel: "Factory reset",
|
|
3735
|
+
deleteResetHint: "Reset the device to factory settings while removing it, so it can be paired again.",
|
|
3736
|
+
deleteResetOption: "Factory-reset the device",
|
|
3737
|
+
deleteForceLabel: "Unreachable device",
|
|
3738
|
+
deleteForceHint: "Remove it even when the CCU cannot reach it.",
|
|
3739
|
+
deleteForceOption: "Remove even if unreachable",
|
|
3740
|
+
deleteTitle: "Delete device from the CCU",
|
|
3741
|
+
deleteMessage: "{{name}} will be removed from the CCU. Its programs and links on the CCU are lost.",
|
|
3742
|
+
deleteMessageReset: "{{name}} will be factory-reset and removed from the CCU. Its programs and links on the CCU are lost.",
|
|
3743
|
+
deleteConfirm: "Delete device",
|
|
3744
|
+
configureAction: "Configure",
|
|
3745
|
+
buttonEventsOn: "on",
|
|
3746
|
+
buttonEventsOff: "off",
|
|
3747
|
+
buttonEventsUnknown: "unknown",
|
|
3748
|
+
buttonEventsAction: "Button events",
|
|
3749
|
+
buttonEventsTitle: "Button events — {{name}}",
|
|
3750
|
+
buttonEventsHint: "The CCU sends a press only when the key channel has a central link. Direct links stay.",
|
|
3751
|
+
buttonEventsStatus: "button events: {{state}}",
|
|
3752
|
+
buttonEventsBadge: "ch{{index}} {{state}}",
|
|
3753
|
+
buttonChannel: "Channel {{index}}",
|
|
3754
|
+
enableButtonEvents: "Enable button events",
|
|
3755
|
+
disableButtonEvents: "Disable button events",
|
|
3756
|
+
enableButtonEventsMessage: "Create a central link for {{name}}. Direct links stay.",
|
|
3757
|
+
disableButtonEventsMessage: "Remove the central link for {{name}}. Direct links stay.",
|
|
3758
|
+
directLinks: "Direct links: {{targets}}",
|
|
3759
|
+
directLinksNone: "No direct links",
|
|
3760
|
+
renameAction: "Rename on the CCU"
|
|
3761
|
+
},
|
|
3762
|
+
heating: {
|
|
3763
|
+
loadFailed: "Could not read the heating setup",
|
|
3764
|
+
groupsTitle: "Heating groups",
|
|
3765
|
+
groupsUnavailable: "Heating groups unavailable",
|
|
3766
|
+
noGroups: "No heating groups on the CCU",
|
|
3767
|
+
thermostatsTitle: "Thermostats",
|
|
3768
|
+
noThermostats: "The CCU reports no thermostats",
|
|
3769
|
+
newGroup: "New group",
|
|
3770
|
+
editGroup: "Edit {{name}}",
|
|
3771
|
+
save: "Save",
|
|
3772
|
+
edit: "Edit",
|
|
3773
|
+
delete: "Delete",
|
|
3774
|
+
colGroup: "Group",
|
|
3775
|
+
colType: "Type",
|
|
3776
|
+
colMembers: "Members",
|
|
3777
|
+
colThermostat: "Thermostat",
|
|
3778
|
+
colCurrent: "Current",
|
|
3779
|
+
colTarget: "Target",
|
|
3780
|
+
colMode: "Mode",
|
|
3781
|
+
colActivity: "Activity",
|
|
3782
|
+
mode_auto: "Auto",
|
|
3783
|
+
mode_heat: "Manual",
|
|
3784
|
+
mode_off: "Off",
|
|
3785
|
+
activity_heating: "Heating",
|
|
3786
|
+
activity_idle: "Idle",
|
|
3787
|
+
activity_off: "Off",
|
|
3788
|
+
fieldName: "Name",
|
|
3789
|
+
fieldType: "Group type",
|
|
3790
|
+
typeHmip: "HomematicIP heating group",
|
|
3791
|
+
typeHomematic: "Homematic heating group",
|
|
3792
|
+
fieldMembers: "Members",
|
|
3793
|
+
fieldMembersHint: "Thermostat channels on the CCU. The list you tick replaces the current members.",
|
|
3794
|
+
noCandidates: "The CCU has no thermostat channels to group",
|
|
3795
|
+
createTitle: "Create heating group",
|
|
3796
|
+
createMessage: "Create the group {{name}} with {{count}} member(s) on the CCU?",
|
|
3797
|
+
createConfirm: "Create group",
|
|
3798
|
+
updateTitle: "Change heating group",
|
|
3799
|
+
updateMessage: "Save the name and the {{count}} member(s) of {{name}} on the CCU? The members you ticked replace the current ones.",
|
|
3800
|
+
updateConfirm: "Save changes",
|
|
3801
|
+
deleteTitle: "Delete heating group",
|
|
3802
|
+
deleteMessage: "Delete the group {{name}} from the CCU? The thermostats stay on the CCU.",
|
|
3803
|
+
deleteConfirm: "Delete group"
|
|
3804
|
+
},
|
|
3805
|
+
pairing: {
|
|
3806
|
+
loadFailed: "Could not read the pairing windows",
|
|
3807
|
+
noInterfaces: "This CCU has no radio interface that can pair devices.",
|
|
3808
|
+
hmipKeyNote: "HmIP devices are paired with the window below; entering a device key or SGTIN is not offered by the CCU interface this page uses, use the CCU WebUI for that.",
|
|
3809
|
+
statusOpen: "Open, {{seconds}} s left",
|
|
3810
|
+
statusClosed: "Closed",
|
|
3811
|
+
statusUnknown: "Unknown",
|
|
3812
|
+
fieldSeconds: "Window length (seconds)",
|
|
3813
|
+
fieldMode: "Mode",
|
|
3814
|
+
modeNormal: "Normal",
|
|
3815
|
+
modeSecure: "Secure (also teaches the HomeMatic Secure key)",
|
|
3816
|
+
start: "Start pairing",
|
|
3817
|
+
stop: "Stop pairing",
|
|
3818
|
+
startTitle: "Open the {{name}} pairing window",
|
|
3819
|
+
startMessage: "{{name}} will accept new devices for {{seconds}} seconds. Put the device in pairing mode now.",
|
|
3820
|
+
stopTitle: "Close the {{name}} pairing window",
|
|
3821
|
+
stopMessage: "{{name}} will stop accepting new devices.",
|
|
3822
|
+
foundTitle: "Devices found",
|
|
3823
|
+
foundNone: "No new device since this tab opened.",
|
|
3824
|
+
foundWaiting: "Waiting for a device to pair..."
|
|
3825
|
+
},
|
|
3826
|
+
config: {
|
|
3827
|
+
title: "Configure {{name}}",
|
|
3828
|
+
loadFailed: "Could not read the device configuration",
|
|
3829
|
+
none: "This device has no configurable parameters.",
|
|
3830
|
+
channel: "Channel",
|
|
3831
|
+
range: "Between {{min}} and {{max}}",
|
|
3832
|
+
unknown: "Unknown",
|
|
3833
|
+
valuesUnreadable: "The current values could not be read: {{error}}",
|
|
3834
|
+
save: "Save changes",
|
|
3835
|
+
confirmTitle: "Write device configuration",
|
|
3836
|
+
confirmMessage: "{{count}} parameter(s) will be written to {{channel}}: {{names}}. A wrong value can change how the device behaves.",
|
|
3837
|
+
confirmLabel: "Write configuration"
|
|
3838
|
+
},
|
|
3839
|
+
links: {
|
|
3840
|
+
title: "Direct links",
|
|
3841
|
+
hint: "Links the CCU keeps between a sender channel and a receiver channel. Key → switch actuator links can be created and edited here; other links are shown as they are.",
|
|
3842
|
+
newLink: "New link",
|
|
3843
|
+
editProfile: "Change profile",
|
|
3844
|
+
delete: "Delete link",
|
|
3845
|
+
save: "Save",
|
|
3846
|
+
pick: "Pick a channel",
|
|
3847
|
+
fieldSender: "Key channel (sender)",
|
|
3848
|
+
fieldSenderHint: "Only key channels can start a link created here.",
|
|
3849
|
+
fieldReceiver: "Switch actuator channel (receiver)",
|
|
3850
|
+
fieldReceiverHint: "Only switch actuator channels for now.",
|
|
3851
|
+
fieldShort: "Short press",
|
|
3852
|
+
fieldLong: "Long press",
|
|
3853
|
+
action_toggle: "Toggle",
|
|
3854
|
+
action_on: "On",
|
|
3855
|
+
action_off: "Off",
|
|
3856
|
+
action_none: "Nothing",
|
|
3857
|
+
colSender: "Sender",
|
|
3858
|
+
colReceiver: "Receiver",
|
|
3859
|
+
colName: "Name",
|
|
3860
|
+
colProfile: "Profile",
|
|
3861
|
+
profileCustom: "Custom (not editable here)",
|
|
3862
|
+
profileSwitch: "Short: {{short}} · Long: {{long}}",
|
|
3863
|
+
none: "No direct links on this CCU.",
|
|
3864
|
+
loadFailed: "Could not read the direct links",
|
|
3865
|
+
partial_one: "The links of {{count}} device could not be read; the list is incomplete",
|
|
3866
|
+
partial_other: "The links of {{count}} devices could not be read; the list is incomplete",
|
|
3867
|
+
createTitle: "Create direct link",
|
|
3868
|
+
createMessage: "Create the link {{link}} on the CCU (short press: {{short}}, long press: {{long}})? The key will switch the actuator directly.",
|
|
3869
|
+
createConfirm: "Create link",
|
|
3870
|
+
profileTitle: "Change link profile",
|
|
3871
|
+
profileMessage: "Write short press: {{short}}, long press: {{long}} to the link {{link}} on the CCU?",
|
|
3872
|
+
profileConfirm: "Write profile",
|
|
3873
|
+
deleteTitle: "Delete direct link",
|
|
3874
|
+
deleteMessage: "Delete the link {{link}} on the CCU? The key will no longer switch that actuator directly.",
|
|
3875
|
+
deleteConfirm: "Delete link"
|
|
3876
|
+
},
|
|
3877
|
+
rename: {
|
|
3878
|
+
title: "Rename {{name}}",
|
|
3879
|
+
deviceName: "Device name",
|
|
3880
|
+
deviceSave: "Rename device",
|
|
3881
|
+
renameChannels: "Also rename every channel to the device name followed by :1, :2 …",
|
|
3882
|
+
channels: "Channels",
|
|
3883
|
+
channelsHint: "Rename one channel at a time; each rename asks first.",
|
|
3884
|
+
channelName: "Name of channel {{index}}",
|
|
3885
|
+
channelSave: "Rename",
|
|
3886
|
+
deviceTitle: "Rename device on the CCU",
|
|
3887
|
+
deviceMessage: "Rename {{from}} to {{to}} on the CCU?",
|
|
3888
|
+
deviceMessageChannels: "Rename {{from}} to {{to}} on the CCU, and every channel to {{to}}:1, {{to}}:2 …? Channel names you set by hand are replaced.",
|
|
3889
|
+
deviceConfirm: "Rename",
|
|
3890
|
+
channelTitle: "Rename channel on the CCU",
|
|
3891
|
+
channelMessage: "Rename the channel {{from}} to {{to}} on the CCU?",
|
|
3892
|
+
channelConfirm: "Rename"
|
|
3893
|
+
},
|
|
3894
|
+
rooms: {
|
|
3895
|
+
title: "Rooms",
|
|
3896
|
+
newRoom: "New room",
|
|
3897
|
+
fieldName: "Room name",
|
|
3898
|
+
colRoom: "Room",
|
|
3899
|
+
colChannels: "Channels",
|
|
3900
|
+
none: "The CCU has no rooms.",
|
|
3901
|
+
loadFailed: "Could not read the rooms",
|
|
3902
|
+
editChannels: "Choose channels",
|
|
3903
|
+
rename: "Rename",
|
|
3904
|
+
delete: "Delete room",
|
|
3905
|
+
save: "Save",
|
|
3906
|
+
search: "Search channels",
|
|
3907
|
+
selected_one: "{{count}} channel selected",
|
|
3908
|
+
selected_other: "{{count}} channels selected",
|
|
3909
|
+
channelsTitle: "Channels in {{name}}",
|
|
3910
|
+
createTitle: "Create room",
|
|
3911
|
+
createMessage: "Create the room {{name}} on the CCU?",
|
|
3912
|
+
createConfirm: "Create room",
|
|
3913
|
+
renameTitle: "Rename room",
|
|
3914
|
+
renameMessage: "Rename the room {{from}} to {{to}} on the CCU?",
|
|
3915
|
+
renameConfirm: "Rename",
|
|
3916
|
+
deleteTitle: "Delete room",
|
|
3917
|
+
deleteMessage: "Delete the room {{name}} on the CCU? Its channels stay, they just leave the room.",
|
|
3918
|
+
deleteConfirm: "Delete room",
|
|
3919
|
+
membersTitle: "Change room channels",
|
|
3920
|
+
membersMessage_one: "Set the room {{name}} to hold {{count}} channel on the CCU?",
|
|
3921
|
+
membersMessage_other: "Set the room {{name}} to hold {{count}} channels on the CCU?",
|
|
3922
|
+
membersConfirm: "Save channels"
|
|
3923
|
+
},
|
|
3924
|
+
panel: {
|
|
3925
|
+
loadFailed: "The device could not be read from the CCU",
|
|
3926
|
+
badConfig: "This panel is missing its CCU device",
|
|
3927
|
+
reload: "Reload",
|
|
3928
|
+
configure: "Configure",
|
|
3929
|
+
reachable: "Reachable",
|
|
3930
|
+
unreachable: "Unreachable",
|
|
3931
|
+
lowBattery: "Low battery",
|
|
3932
|
+
configPending: "Configuration pending",
|
|
3933
|
+
dutyCycleReached: "Duty cycle limit reached",
|
|
3934
|
+
dutyCycle: "Duty cycle {{value}}%",
|
|
3935
|
+
rssi: "RSSI {{device}} / {{peer}} dBm",
|
|
3936
|
+
firmware: "Firmware {{version}}",
|
|
3937
|
+
firmwareUpdate: "Update available: {{version}}",
|
|
3938
|
+
maintenance: "Maintenance",
|
|
3939
|
+
colParameter: "Parameter",
|
|
3940
|
+
colValue: "Value",
|
|
3941
|
+
yes: "Yes",
|
|
3942
|
+
no: "No",
|
|
3943
|
+
press: "Press",
|
|
3944
|
+
turnOn: "Turn on",
|
|
3945
|
+
turnOff: "Turn off",
|
|
3946
|
+
setAction: "Set…",
|
|
3947
|
+
set: "Send",
|
|
3948
|
+
setTitle: "Set {{parameter}} · {{channel}}",
|
|
3949
|
+
writeTitle: "Change a value on the CCU",
|
|
3950
|
+
writeMessage: "Set {{parameter}} of {{channel}} to {{value}}?",
|
|
3951
|
+
pressMessage: "Send {{parameter}} on {{channel}}? Whatever this key is linked to will run.",
|
|
3952
|
+
writeConfirm: "Send to the CCU",
|
|
3953
|
+
none: "No values"
|
|
3954
|
+
}
|
|
3955
|
+
},
|
|
3956
|
+
it: {
|
|
3957
|
+
common: { loading: "Caricamento…" },
|
|
3958
|
+
write: { failedTitle: "La CCU ha rifiutato la modifica" },
|
|
3959
|
+
page: {
|
|
3960
|
+
title: "Homematic CCU",
|
|
3961
|
+
subtitle: "Gestisci la CCU senza aprire la sua interfaccia web",
|
|
3962
|
+
sectionsLabel: "Sezioni della CCU",
|
|
3963
|
+
ccuPicker: "CCU",
|
|
3964
|
+
tabOverview: "Panoramica",
|
|
3965
|
+
loadFailed: "Impossibile caricare le CCU",
|
|
3966
|
+
noCcu: "Nessuna CCU Homematic configurata",
|
|
3967
|
+
noCcuHint: "Aggiungi una CCU da Integrazioni, poi gestiscila qui.",
|
|
3968
|
+
notConnected: "{{name}} non è connessa",
|
|
3969
|
+
notConnectedHint: "La pagina lavora su una CCU connessa. Controlla la connessione nell'integrazione.",
|
|
3970
|
+
tabDevices: "Dispositivi",
|
|
3971
|
+
tabHeating: "Riscaldamento",
|
|
3972
|
+
tabPairing: "Associazione",
|
|
3973
|
+
tabLinks: "Collegamenti diretti",
|
|
3974
|
+
tabSettings: "Impostazioni"
|
|
3975
|
+
},
|
|
3976
|
+
overview: {
|
|
3977
|
+
loadFailed: "Impossibile leggere la CCU",
|
|
3978
|
+
ccuTitle: "CCU",
|
|
3979
|
+
infoUnavailable: "Dettagli della CCU non disponibili",
|
|
3980
|
+
infoNoAnswer: "La CCU non ha risposto. Versione e seriale richiedono le credenziali WebUI impostate nell'integrazione.",
|
|
3981
|
+
version: "Versione",
|
|
3982
|
+
product: "Prodotto",
|
|
3983
|
+
hostname: "Nome host",
|
|
3984
|
+
serial: "Seriale",
|
|
3985
|
+
interfacesTitle: "Interfacce",
|
|
3986
|
+
interfacesUnavailable: "Interfacce non disponibili",
|
|
3987
|
+
noInterfaces: "La CCU non ha segnalato interfacce",
|
|
3988
|
+
colInterface: "Interfaccia",
|
|
3989
|
+
colState: "Stato",
|
|
3990
|
+
colDutyCycle: "Duty cycle",
|
|
3991
|
+
colFirmware: "Firmware",
|
|
3992
|
+
colType: "Tipo",
|
|
3993
|
+
colGateways: "Gateway",
|
|
3994
|
+
messagesTitle: "Messaggi di servizio",
|
|
3995
|
+
messagesUnavailable: "Messaggi di servizio non disponibili",
|
|
3996
|
+
noMessages: "Nessun messaggio di servizio",
|
|
3997
|
+
colWhen: "Da",
|
|
3998
|
+
colMessage: "Messaggio",
|
|
3999
|
+
colDevice: "Dispositivo",
|
|
4000
|
+
ack: "Conferma",
|
|
4001
|
+
ackTitle: "Conferma messaggio di servizio",
|
|
4002
|
+
ackMessage: "Confermare {{type}} per {{name}} sulla CCU? Il messaggio sparisce anche dalla CCU.",
|
|
4003
|
+
ackConfirm: "Conferma"
|
|
4004
|
+
},
|
|
4005
|
+
devices: {
|
|
4006
|
+
colDevice: "Dispositivo",
|
|
4007
|
+
colType: "Tipo",
|
|
4008
|
+
colPlace: "Stanza / funzione",
|
|
4009
|
+
colFirmware: "Firmware",
|
|
4010
|
+
colSignal: "Segnale",
|
|
4011
|
+
colDutyCycle: "Duty cycle",
|
|
4012
|
+
colHealth: "Stato",
|
|
4013
|
+
updateTo: "Aggiorna a {{version}}",
|
|
4014
|
+
dutyLimited: "Limite raggiunto",
|
|
4015
|
+
unreach: "Non raggiungibile",
|
|
4016
|
+
sabotage: "Sabotaggio",
|
|
4017
|
+
lowBattery: "Batteria scarica",
|
|
4018
|
+
configPending: "Configurazione in sospeso",
|
|
4019
|
+
ok: "OK",
|
|
4020
|
+
loadFailed: "Impossibile leggere i dispositivi",
|
|
4021
|
+
groupIssue: "Stato",
|
|
4022
|
+
groupType: "Tipo",
|
|
4023
|
+
searchPlaceholder: "Cerca nome, indirizzo, tipo, stanza",
|
|
4024
|
+
searchLabel: "Cerca dispositivi della CCU",
|
|
4025
|
+
facetsLabel: "Filtra dispositivi della CCU",
|
|
4026
|
+
clearFilters: "Azzera filtri",
|
|
4027
|
+
noMatch: "Nessun dispositivo corrisponde al filtro",
|
|
4028
|
+
none: "La CCU non ha dispositivi",
|
|
4029
|
+
deleteAction: "Elimina dalla CCU",
|
|
4030
|
+
deleteDialogTitle: "Elimina {{name}} dalla CCU",
|
|
4031
|
+
deleteContinue: "Continua",
|
|
4032
|
+
deleteResetLabel: "Ripristino di fabbrica",
|
|
4033
|
+
deleteResetHint: "Ripristina il dispositivo alle impostazioni di fabbrica mentre lo rimuovi, così potrà essere associato di nuovo.",
|
|
4034
|
+
deleteResetOption: "Ripristina il dispositivo di fabbrica",
|
|
4035
|
+
deleteForceLabel: "Dispositivo non raggiungibile",
|
|
4036
|
+
deleteForceHint: "Rimuovilo anche se la CCU non riesce a raggiungerlo.",
|
|
4037
|
+
deleteForceOption: "Rimuovi anche se non raggiungibile",
|
|
4038
|
+
deleteTitle: "Elimina dispositivo dalla CCU",
|
|
4039
|
+
deleteMessage: "{{name}} sarà rimosso dalla CCU. Programmi e collegamenti sulla CCU andranno persi.",
|
|
4040
|
+
deleteMessageReset: "{{name}} sarà ripristinato di fabbrica e rimosso dalla CCU. Programmi e collegamenti sulla CCU andranno persi.",
|
|
4041
|
+
deleteConfirm: "Elimina dispositivo",
|
|
4042
|
+
configureAction: "Configura",
|
|
4043
|
+
buttonEventsOn: "attivo",
|
|
4044
|
+
buttonEventsOff: "disattivo",
|
|
4045
|
+
buttonEventsUnknown: "sconosciuto",
|
|
4046
|
+
buttonEventsAction: "Eventi pulsante",
|
|
4047
|
+
buttonEventsTitle: "Eventi pulsante — {{name}}",
|
|
4048
|
+
buttonEventsHint: "La CCU invia una pressione solo se il canale tasto ha un collegamento centrale. I collegamenti diretti restano.",
|
|
4049
|
+
buttonEventsStatus: "eventi pulsante: {{state}}",
|
|
4050
|
+
buttonEventsBadge: "ch{{index}} {{state}}",
|
|
4051
|
+
buttonChannel: "Canale {{index}}",
|
|
4052
|
+
enableButtonEvents: "Abilita eventi pulsante",
|
|
4053
|
+
disableButtonEvents: "Disabilita eventi pulsante",
|
|
4054
|
+
enableButtonEventsMessage: "Crea un collegamento centrale per {{name}}. I collegamenti diretti restano.",
|
|
4055
|
+
disableButtonEventsMessage: "Rimuove il collegamento centrale di {{name}}. I collegamenti diretti restano.",
|
|
4056
|
+
directLinks: "Collegamenti diretti: {{targets}}",
|
|
4057
|
+
directLinksNone: "Nessun collegamento diretto",
|
|
4058
|
+
renameAction: "Rinomina sulla CCU"
|
|
4059
|
+
},
|
|
4060
|
+
heating: {
|
|
4061
|
+
loadFailed: "Impossibile leggere il riscaldamento",
|
|
4062
|
+
groupsTitle: "Gruppi di riscaldamento",
|
|
4063
|
+
groupsUnavailable: "Gruppi di riscaldamento non disponibili",
|
|
4064
|
+
noGroups: "Nessun gruppo di riscaldamento sulla CCU",
|
|
4065
|
+
thermostatsTitle: "Termostati",
|
|
4066
|
+
noThermostats: "La CCU non segnala termostati",
|
|
4067
|
+
newGroup: "Nuovo gruppo",
|
|
4068
|
+
editGroup: "Modifica {{name}}",
|
|
4069
|
+
save: "Salva",
|
|
4070
|
+
edit: "Modifica",
|
|
4071
|
+
delete: "Elimina",
|
|
4072
|
+
colGroup: "Gruppo",
|
|
4073
|
+
colType: "Tipo",
|
|
4074
|
+
colMembers: "Membri",
|
|
4075
|
+
colThermostat: "Termostato",
|
|
4076
|
+
colCurrent: "Attuale",
|
|
4077
|
+
colTarget: "Obiettivo",
|
|
4078
|
+
colMode: "Modo",
|
|
4079
|
+
colActivity: "Attività",
|
|
4080
|
+
mode_auto: "Auto",
|
|
4081
|
+
mode_heat: "Manuale",
|
|
4082
|
+
mode_off: "Spento",
|
|
4083
|
+
activity_heating: "Riscalda",
|
|
4084
|
+
activity_idle: "Inattivo",
|
|
4085
|
+
activity_off: "Spento",
|
|
4086
|
+
fieldName: "Nome",
|
|
4087
|
+
fieldType: "Tipo di gruppo",
|
|
4088
|
+
typeHmip: "Gruppo di riscaldamento HomematicIP",
|
|
4089
|
+
typeHomematic: "Gruppo di riscaldamento Homematic",
|
|
4090
|
+
fieldMembers: "Membri",
|
|
4091
|
+
fieldMembersHint: "Canali termostato sulla CCU. L'elenco selezionato sostituisce i membri attuali.",
|
|
4092
|
+
noCandidates: "La CCU non ha canali termostato da raggruppare",
|
|
4093
|
+
createTitle: "Crea gruppo di riscaldamento",
|
|
4094
|
+
createMessage: "Creare sulla CCU il gruppo {{name}} con {{count}} membri?",
|
|
4095
|
+
createConfirm: "Crea gruppo",
|
|
4096
|
+
updateTitle: "Modifica gruppo di riscaldamento",
|
|
4097
|
+
updateMessage: "Salvare sulla CCU nome e {{count}} membri di {{name}}? I membri selezionati sostituiscono quelli attuali.",
|
|
4098
|
+
updateConfirm: "Salva modifiche",
|
|
4099
|
+
deleteTitle: "Elimina gruppo di riscaldamento",
|
|
4100
|
+
deleteMessage: "Eliminare il gruppo {{name}} dalla CCU? I termostati restano sulla CCU.",
|
|
4101
|
+
deleteConfirm: "Elimina gruppo"
|
|
4102
|
+
},
|
|
4103
|
+
pairing: {
|
|
4104
|
+
loadFailed: "Impossibile leggere le finestre di associazione",
|
|
4105
|
+
noInterfaces: "Questa CCU non ha interfacce radio che possano associare dispositivi.",
|
|
4106
|
+
hmipKeyNote: "I dispositivi HmIP si associano con la finestra qui sotto; l'inserimento di chiave o SGTIN non è offerto dall'interfaccia CCU usata da questa pagina, usa la WebUI della CCU.",
|
|
4107
|
+
statusOpen: "Aperta, {{seconds}} s rimanenti",
|
|
4108
|
+
statusClosed: "Chiusa",
|
|
4109
|
+
statusUnknown: "Sconosciuto",
|
|
4110
|
+
fieldSeconds: "Durata finestra (secondi)",
|
|
4111
|
+
fieldMode: "Modalità",
|
|
4112
|
+
modeNormal: "Normale",
|
|
4113
|
+
modeSecure: "Sicura (insegna anche la chiave HomeMatic Secure)",
|
|
4114
|
+
start: "Avvia associazione",
|
|
4115
|
+
stop: "Ferma associazione",
|
|
4116
|
+
startTitle: "Apri la finestra di associazione {{name}}",
|
|
4117
|
+
startMessage: "{{name}} accetterà nuovi dispositivi per {{seconds}} secondi. Metti ora il dispositivo in modalità associazione.",
|
|
4118
|
+
stopTitle: "Chiudi la finestra di associazione {{name}}",
|
|
4119
|
+
stopMessage: "{{name}} smetterà di accettare nuovi dispositivi.",
|
|
4120
|
+
foundTitle: "Dispositivi trovati",
|
|
4121
|
+
foundNone: "Nessun nuovo dispositivo da quando hai aperto questa scheda.",
|
|
4122
|
+
foundWaiting: "In attesa di un dispositivo da associare..."
|
|
4123
|
+
},
|
|
4124
|
+
config: {
|
|
4125
|
+
title: "Configura {{name}}",
|
|
4126
|
+
loadFailed: "Impossibile leggere la configurazione del dispositivo",
|
|
4127
|
+
none: "Questo dispositivo non ha parametri configurabili.",
|
|
4128
|
+
channel: "Canale",
|
|
4129
|
+
range: "Tra {{min}} e {{max}}",
|
|
4130
|
+
unknown: "Sconosciuto",
|
|
4131
|
+
valuesUnreadable: "Impossibile leggere i valori attuali: {{error}}",
|
|
4132
|
+
save: "Salva modifiche",
|
|
4133
|
+
confirmTitle: "Scrivi configurazione dispositivo",
|
|
4134
|
+
confirmMessage: "{{count}} parametro/i verranno scritti su {{channel}}: {{names}}. Un valore sbagliato può cambiare il comportamento del dispositivo.",
|
|
4135
|
+
confirmLabel: "Scrivi configurazione"
|
|
4136
|
+
},
|
|
4137
|
+
links: {
|
|
4138
|
+
title: "Collegamenti diretti",
|
|
4139
|
+
hint: "Collegamenti che la CCU mantiene tra un canale mittente e un canale ricevente. Qui si possono creare e modificare i collegamenti tasto → attuatore; gli altri sono mostrati così come sono.",
|
|
4140
|
+
newLink: "Nuovo collegamento",
|
|
4141
|
+
editProfile: "Cambia profilo",
|
|
4142
|
+
delete: "Elimina collegamento",
|
|
4143
|
+
save: "Salva",
|
|
4144
|
+
pick: "Scegli un canale",
|
|
4145
|
+
fieldSender: "Canale tasto (mittente)",
|
|
4146
|
+
fieldSenderHint: "Solo i canali tasto possono avviare un collegamento creato qui.",
|
|
4147
|
+
fieldReceiver: "Canale attuatore (ricevente)",
|
|
4148
|
+
fieldReceiverHint: "Per ora solo canali attuatore di commutazione.",
|
|
4149
|
+
fieldShort: "Pressione breve",
|
|
4150
|
+
fieldLong: "Pressione lunga",
|
|
4151
|
+
action_toggle: "Commuta",
|
|
4152
|
+
action_on: "Accendi",
|
|
4153
|
+
action_off: "Spegni",
|
|
4154
|
+
action_none: "Nulla",
|
|
4155
|
+
colSender: "Mittente",
|
|
4156
|
+
colReceiver: "Ricevente",
|
|
4157
|
+
colName: "Nome",
|
|
4158
|
+
colProfile: "Profilo",
|
|
4159
|
+
profileCustom: "Personalizzato (non modificabile qui)",
|
|
4160
|
+
profileSwitch: "Breve: {{short}} · Lunga: {{long}}",
|
|
4161
|
+
none: "Nessun collegamento diretto su questa CCU.",
|
|
4162
|
+
loadFailed: "Impossibile leggere i collegamenti diretti",
|
|
4163
|
+
partial_one: "Non è stato possibile leggere i collegamenti di {{count}} dispositivo; l'elenco è incompleto",
|
|
4164
|
+
partial_other: "Non è stato possibile leggere i collegamenti di {{count}} dispositivi; l'elenco è incompleto",
|
|
4165
|
+
createTitle: "Crea collegamento diretto",
|
|
4166
|
+
createMessage: "Creare il collegamento {{link}} sulla CCU (pressione breve: {{short}}, lunga: {{long}})? Il tasto comanderà l'attuatore direttamente.",
|
|
4167
|
+
createConfirm: "Crea collegamento",
|
|
4168
|
+
profileTitle: "Cambia profilo del collegamento",
|
|
4169
|
+
profileMessage: "Scrivere pressione breve: {{short}}, lunga: {{long}} sul collegamento {{link}} nella CCU?",
|
|
4170
|
+
profileConfirm: "Scrivi profilo",
|
|
4171
|
+
deleteTitle: "Elimina collegamento diretto",
|
|
4172
|
+
deleteMessage: "Eliminare il collegamento {{link}} sulla CCU? Il tasto non comanderà più direttamente quell'attuatore.",
|
|
4173
|
+
deleteConfirm: "Elimina collegamento"
|
|
4174
|
+
},
|
|
4175
|
+
rename: {
|
|
4176
|
+
title: "Rinomina {{name}}",
|
|
4177
|
+
deviceName: "Nome del dispositivo",
|
|
4178
|
+
deviceSave: "Rinomina dispositivo",
|
|
4179
|
+
renameChannels: "Rinomina anche ogni canale con il nome del dispositivo seguito da :1, :2 …",
|
|
4180
|
+
channels: "Canali",
|
|
4181
|
+
channelsHint: "Rinomina un canale alla volta; ogni rinomina chiede conferma.",
|
|
4182
|
+
channelName: "Nome del canale {{index}}",
|
|
4183
|
+
channelSave: "Rinomina",
|
|
4184
|
+
deviceTitle: "Rinomina dispositivo sulla CCU",
|
|
4185
|
+
deviceMessage: "Rinominare {{from}} in {{to}} sulla CCU?",
|
|
4186
|
+
deviceMessageChannels: "Rinominare {{from}} in {{to}} sulla CCU, e ogni canale in {{to}}:1, {{to}}:2 …? I nomi dei canali impostati a mano vengono sostituiti.",
|
|
4187
|
+
deviceConfirm: "Rinomina",
|
|
4188
|
+
channelTitle: "Rinomina canale sulla CCU",
|
|
4189
|
+
channelMessage: "Rinominare il canale {{from}} in {{to}} sulla CCU?",
|
|
4190
|
+
channelConfirm: "Rinomina"
|
|
4191
|
+
},
|
|
4192
|
+
rooms: {
|
|
4193
|
+
title: "Stanze",
|
|
4194
|
+
newRoom: "Nuova stanza",
|
|
4195
|
+
fieldName: "Nome della stanza",
|
|
4196
|
+
colRoom: "Stanza",
|
|
4197
|
+
colChannels: "Canali",
|
|
4198
|
+
none: "La CCU non ha stanze.",
|
|
4199
|
+
loadFailed: "Impossibile leggere le stanze",
|
|
4200
|
+
editChannels: "Scegli i canali",
|
|
4201
|
+
rename: "Rinomina",
|
|
4202
|
+
delete: "Elimina stanza",
|
|
4203
|
+
save: "Salva",
|
|
4204
|
+
search: "Cerca canali",
|
|
4205
|
+
selected_one: "{{count}} canale selezionato",
|
|
4206
|
+
selected_other: "{{count}} canali selezionati",
|
|
4207
|
+
channelsTitle: "Canali in {{name}}",
|
|
4208
|
+
createTitle: "Crea stanza",
|
|
4209
|
+
createMessage: "Creare la stanza {{name}} sulla CCU?",
|
|
4210
|
+
createConfirm: "Crea stanza",
|
|
4211
|
+
renameTitle: "Rinomina stanza",
|
|
4212
|
+
renameMessage: "Rinominare la stanza {{from}} in {{to}} sulla CCU?",
|
|
4213
|
+
renameConfirm: "Rinomina",
|
|
4214
|
+
deleteTitle: "Elimina stanza",
|
|
4215
|
+
deleteMessage: "Eliminare la stanza {{name}} sulla CCU? I canali restano, escono solo dalla stanza.",
|
|
4216
|
+
deleteConfirm: "Elimina stanza",
|
|
4217
|
+
membersTitle: "Cambia i canali della stanza",
|
|
4218
|
+
membersMessage_one: "Impostare la stanza {{name}} con {{count}} canale sulla CCU?",
|
|
4219
|
+
membersMessage_other: "Impostare la stanza {{name}} con {{count}} canali sulla CCU?",
|
|
4220
|
+
membersConfirm: "Salva canali"
|
|
4221
|
+
},
|
|
4222
|
+
panel: {
|
|
4223
|
+
loadFailed: "Impossibile leggere il dispositivo dalla CCU",
|
|
4224
|
+
badConfig: "A questo pannello manca il dispositivo CCU",
|
|
4225
|
+
reload: "Ricarica",
|
|
4226
|
+
configure: "Configura",
|
|
4227
|
+
reachable: "Raggiungibile",
|
|
4228
|
+
unreachable: "Non raggiungibile",
|
|
4229
|
+
lowBattery: "Batteria scarica",
|
|
4230
|
+
configPending: "Configurazione in sospeso",
|
|
4231
|
+
dutyCycleReached: "Limite duty cycle raggiunto",
|
|
4232
|
+
dutyCycle: "Duty cycle {{value}}%",
|
|
4233
|
+
rssi: "RSSI {{device}} / {{peer}} dBm",
|
|
4234
|
+
firmware: "Firmware {{version}}",
|
|
4235
|
+
firmwareUpdate: "Aggiornamento disponibile: {{version}}",
|
|
4236
|
+
maintenance: "Manutenzione",
|
|
4237
|
+
colParameter: "Parametro",
|
|
4238
|
+
colValue: "Valore",
|
|
4239
|
+
yes: "Sì",
|
|
4240
|
+
no: "No",
|
|
4241
|
+
press: "Premi",
|
|
4242
|
+
turnOn: "Accendi",
|
|
4243
|
+
turnOff: "Spegni",
|
|
4244
|
+
setAction: "Imposta…",
|
|
4245
|
+
set: "Invia",
|
|
4246
|
+
setTitle: "Imposta {{parameter}} · {{channel}}",
|
|
4247
|
+
writeTitle: "Modifica un valore sulla CCU",
|
|
4248
|
+
writeMessage: "Impostare {{parameter}} di {{channel}} a {{value}}?",
|
|
4249
|
+
pressMessage: "Inviare {{parameter}} su {{channel}}? Verrà eseguito ciò a cui il tasto è collegato.",
|
|
4250
|
+
writeConfirm: "Invia alla CCU",
|
|
4251
|
+
none: "Nessun valore"
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
});
|
|
4255
|
+
//#endregion
|
|
4256
|
+
//#region src/ui/ParamField.tsx
|
|
4257
|
+
function is(e, t) {
|
|
4258
|
+
if (typeof t == "boolean") return t;
|
|
4259
|
+
if (e.type === "INTEGER" || e.type === "FLOAT") {
|
|
4260
|
+
if (t.trim() === "") return;
|
|
4261
|
+
let e = Number(t);
|
|
4262
|
+
return Number.isFinite(e) ? e : void 0;
|
|
4263
|
+
}
|
|
4264
|
+
return t;
|
|
4265
|
+
}
|
|
4266
|
+
function as(e) {
|
|
4267
|
+
let { param: r, edit: i, onEdit: a } = e, { t: o } = $(), s = r.unit === null ? r.parameter : `${r.parameter} (${r.unit})`, c = r.min !== null && r.max !== null ? o("config.range", {
|
|
4268
|
+
min: r.min,
|
|
4269
|
+
max: r.max
|
|
4270
|
+
}) : void 0;
|
|
4271
|
+
if (r.type === "BOOL") {
|
|
4272
|
+
let e = typeof i == "boolean" ? i : r.value === !0;
|
|
4273
|
+
return /* @__PURE__ */ b(u, {
|
|
4274
|
+
label: s,
|
|
4275
|
+
children: /* @__PURE__ */ b(d, {
|
|
4276
|
+
checked: e,
|
|
4277
|
+
disabled: !r.writable,
|
|
4278
|
+
onChange: () => a(!e)
|
|
4279
|
+
})
|
|
4280
|
+
});
|
|
4281
|
+
}
|
|
4282
|
+
if (r.type === "ENUM" && r.valueList !== null) {
|
|
4283
|
+
let e = typeof i == "string" ? i : typeof r.value == "string" ? r.value : "";
|
|
4284
|
+
return /* @__PURE__ */ b(u, {
|
|
4285
|
+
label: s,
|
|
4286
|
+
children: /* @__PURE__ */ b(n, {
|
|
4287
|
+
value: e,
|
|
4288
|
+
disabled: !r.writable,
|
|
4289
|
+
onChange: (e) => a(e.target.value),
|
|
4290
|
+
options: [...e === "" ? [{
|
|
4291
|
+
value: "",
|
|
4292
|
+
label: o("config.unknown")
|
|
4293
|
+
}] : [], ...r.valueList.map((e) => ({
|
|
4294
|
+
value: e,
|
|
4295
|
+
label: e
|
|
4296
|
+
}))]
|
|
4297
|
+
})
|
|
4298
|
+
});
|
|
4299
|
+
}
|
|
4300
|
+
let l = r.type === "INTEGER" || r.type === "FLOAT", f = typeof i == "string" ? i : r.value === null ? "" : String(r.value);
|
|
4301
|
+
return /* @__PURE__ */ b(u, {
|
|
4302
|
+
label: s,
|
|
4303
|
+
...c === void 0 ? {} : { description: c },
|
|
4304
|
+
children: /* @__PURE__ */ b(t, {
|
|
4305
|
+
type: l ? "number" : "text",
|
|
4306
|
+
value: f,
|
|
4307
|
+
disabled: !r.writable,
|
|
4308
|
+
...r.min === null ? {} : { min: r.min },
|
|
4309
|
+
...r.max === null ? {} : { max: r.max },
|
|
4310
|
+
onChange: (e) => a(e.target.value)
|
|
4311
|
+
})
|
|
4312
|
+
});
|
|
4313
|
+
}
|
|
4314
|
+
//#endregion
|
|
4315
|
+
//#region src/ui/ccu-client.ts
|
|
4316
|
+
var os = "provider-homematic";
|
|
4317
|
+
async function ss(e, t, n, r) {
|
|
4318
|
+
let i = await e.addons.custom.mutate({
|
|
4319
|
+
addonId: os,
|
|
4320
|
+
action: t,
|
|
4321
|
+
input: n
|
|
4322
|
+
});
|
|
4323
|
+
return r.parse(i);
|
|
4324
|
+
}
|
|
4325
|
+
//#endregion
|
|
4326
|
+
//#region src/ui/use-ccu-data.ts
|
|
4327
|
+
function cs(e, t, n, r, i = {}) {
|
|
4328
|
+
let [a, o] = _(void 0), [s, c] = _(null), [l, u] = _(n !== null), [d, f] = _(0), p = ee(0), h = JSON.stringify(n), v = i.pollMs;
|
|
4329
|
+
return m(() => {
|
|
4330
|
+
if (n === null) {
|
|
4331
|
+
o(void 0), u(!1);
|
|
4332
|
+
return;
|
|
4333
|
+
}
|
|
4334
|
+
let i = ++p.current, a, s = (l) => {
|
|
4335
|
+
l && u(!0), ss(e, t, n, r).then((e) => {
|
|
4336
|
+
p.current === i && (o(e), c(null), u(!1), v !== void 0 && (a = setTimeout(() => s(!1), v)));
|
|
4337
|
+
}, (e) => {
|
|
4338
|
+
p.current === i && (c(e instanceof Error ? e.message : String(e)), u(!1), v !== void 0 && (a = setTimeout(() => s(!1), v)));
|
|
4339
|
+
});
|
|
4340
|
+
};
|
|
4341
|
+
return s(!0), () => {
|
|
4342
|
+
p.current++, a !== void 0 && clearTimeout(a);
|
|
4343
|
+
};
|
|
4344
|
+
}, [
|
|
4345
|
+
e,
|
|
4346
|
+
t,
|
|
4347
|
+
h,
|
|
4348
|
+
r,
|
|
4349
|
+
d,
|
|
4350
|
+
v
|
|
4351
|
+
]), {
|
|
4352
|
+
data: a,
|
|
4353
|
+
error: s,
|
|
4354
|
+
loading: l,
|
|
4355
|
+
reload: g(() => f((e) => e + 1), [])
|
|
4356
|
+
};
|
|
4357
|
+
}
|
|
4358
|
+
//#endregion
|
|
4359
|
+
//#region src/ui/use-ccu-write.ts
|
|
4360
|
+
function ls(e) {
|
|
4361
|
+
let t = l(), n = o(), { t: r } = $();
|
|
4362
|
+
return g(async (i) => {
|
|
4363
|
+
if (!await t({
|
|
4364
|
+
title: i.title,
|
|
4365
|
+
message: i.message,
|
|
4366
|
+
confirmLabel: i.confirmLabel,
|
|
4367
|
+
variant: i.variant ?? "default"
|
|
4368
|
+
})) return null;
|
|
4369
|
+
try {
|
|
4370
|
+
return await ss(e, i.action, {
|
|
4371
|
+
...i.input,
|
|
4372
|
+
confirmed: !0
|
|
4373
|
+
}, i.schema);
|
|
4374
|
+
} catch (e) {
|
|
4375
|
+
return await n({
|
|
4376
|
+
title: r("write.failedTitle"),
|
|
4377
|
+
message: e instanceof Error ? e.message : String(e),
|
|
4378
|
+
variant: "danger"
|
|
4379
|
+
}), null;
|
|
4380
|
+
}
|
|
4381
|
+
}, [
|
|
4382
|
+
e,
|
|
4383
|
+
t,
|
|
4384
|
+
n,
|
|
4385
|
+
r
|
|
4386
|
+
]);
|
|
4387
|
+
}
|
|
4388
|
+
//#endregion
|
|
4389
|
+
//#region src/ui/ChannelConfigDialog.tsx
|
|
4390
|
+
function us(e) {
|
|
4391
|
+
let { trpc: t, integrationId: i, device: o, onClose: c } = e, { t: l } = $(), d = ls(t), f = cs(t, "getCcuDeviceConfig", p(() => ({
|
|
4392
|
+
integrationId: i,
|
|
4393
|
+
address: o.address
|
|
4394
|
+
}), [i, o.address]), Wo), [m, h] = _(null), [ee, g] = _({}), [v, x] = _(!1), S = f.data?.channels ?? [], C = S.find((e) => e.channel === m) ?? S[0], te = p(() => {
|
|
4395
|
+
let e = {};
|
|
4396
|
+
for (let t of C?.params ?? []) {
|
|
4397
|
+
let n = ee[`${C?.channel}/${t.parameter}`];
|
|
4398
|
+
if (n === void 0) continue;
|
|
4399
|
+
let r = is(t, n);
|
|
4400
|
+
r !== void 0 && r !== t.value && (e[t.parameter] = r);
|
|
4401
|
+
}
|
|
4402
|
+
return e;
|
|
4403
|
+
}, [C, ee]), w = Object.keys(te).length, T = async () => {
|
|
4404
|
+
if (C !== void 0) {
|
|
4405
|
+
x(!0);
|
|
4406
|
+
try {
|
|
4407
|
+
await d({
|
|
4408
|
+
action: "setCcuChannelConfig",
|
|
4409
|
+
input: {
|
|
4410
|
+
integrationId: i,
|
|
4411
|
+
channel: C.channel,
|
|
4412
|
+
values: te
|
|
4413
|
+
},
|
|
4414
|
+
schema: No,
|
|
4415
|
+
title: l("config.confirmTitle"),
|
|
4416
|
+
message: l("config.confirmMessage", {
|
|
4417
|
+
channel: C.channel,
|
|
4418
|
+
count: w,
|
|
4419
|
+
names: Object.keys(te).join(", ")
|
|
4420
|
+
}),
|
|
4421
|
+
confirmLabel: l("config.confirmLabel"),
|
|
4422
|
+
variant: "warning"
|
|
4423
|
+
}) !== null && (g({}), f.reload());
|
|
4424
|
+
} finally {
|
|
4425
|
+
x(!1);
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
};
|
|
4429
|
+
return /* @__PURE__ */ b(a, {
|
|
4430
|
+
open: !0,
|
|
4431
|
+
onClose: c,
|
|
4432
|
+
icon: ko,
|
|
4433
|
+
width: "lg",
|
|
4434
|
+
title: l("config.title", { name: o.name ?? o.address }),
|
|
4435
|
+
testId: "hm-config-dialog",
|
|
4436
|
+
footer: /* @__PURE__ */ b(r, {
|
|
4437
|
+
type: "button",
|
|
4438
|
+
onClick: () => void T(),
|
|
4439
|
+
disabled: w === 0 || v,
|
|
4440
|
+
children: l("config.save")
|
|
4441
|
+
}),
|
|
4442
|
+
children: f.error === null ? f.data === void 0 ? /* @__PURE__ */ b("p", {
|
|
4443
|
+
className: "text-sm text-foreground-subtle",
|
|
4444
|
+
children: l("common.loading")
|
|
4445
|
+
}) : C === void 0 ? /* @__PURE__ */ b("p", {
|
|
4446
|
+
className: "text-sm text-foreground-subtle",
|
|
4447
|
+
children: l("config.none")
|
|
4448
|
+
}) : /* @__PURE__ */ y("div", {
|
|
4449
|
+
className: "flex flex-col gap-3",
|
|
4450
|
+
children: [
|
|
4451
|
+
S.length > 1 && /* @__PURE__ */ b(u, {
|
|
4452
|
+
label: l("config.channel"),
|
|
4453
|
+
children: /* @__PURE__ */ b(n, {
|
|
4454
|
+
value: C.channel,
|
|
4455
|
+
onChange: (e) => {
|
|
4456
|
+
h(e.target.value), g({});
|
|
4457
|
+
},
|
|
4458
|
+
options: S.map((e) => ({
|
|
4459
|
+
value: e.channel,
|
|
4460
|
+
label: e.channelType === null ? e.channel : `${e.channel} · ${e.channelType}`
|
|
4461
|
+
}))
|
|
4462
|
+
})
|
|
4463
|
+
}),
|
|
4464
|
+
C.error !== null && /* @__PURE__ */ b("p", {
|
|
4465
|
+
className: "text-xs text-danger",
|
|
4466
|
+
children: l("config.valuesUnreadable", { error: C.error })
|
|
4467
|
+
}),
|
|
4468
|
+
C.params.map((e) => /* @__PURE__ */ b(as, {
|
|
4469
|
+
param: e,
|
|
4470
|
+
edit: ee[`${C.channel}/${e.parameter}`],
|
|
4471
|
+
onEdit: (t) => g((n) => ({
|
|
4472
|
+
...n,
|
|
4473
|
+
[`${C.channel}/${e.parameter}`]: t
|
|
4474
|
+
}))
|
|
4475
|
+
}, e.parameter))
|
|
4476
|
+
]
|
|
4477
|
+
}) : /* @__PURE__ */ b(s, {
|
|
4478
|
+
title: l("config.loadFailed"),
|
|
4479
|
+
message: f.error,
|
|
4480
|
+
onRetry: f.reload
|
|
4481
|
+
})
|
|
4482
|
+
});
|
|
4483
|
+
}
|
|
4484
|
+
//#endregion
|
|
4485
|
+
//#region src/ui/value-format.ts
|
|
4486
|
+
function ds(e) {
|
|
4487
|
+
return e.type !== "ENUM" || e.valueList === null || typeof e.value != "number" ? e : {
|
|
4488
|
+
...e,
|
|
4489
|
+
value: e.valueList[e.value] ?? null
|
|
4490
|
+
};
|
|
4491
|
+
}
|
|
4492
|
+
function fs(e, t) {
|
|
4493
|
+
if (e.type === "ENUM" && e.valueList !== null && typeof t == "string") {
|
|
4494
|
+
let n = e.valueList.indexOf(t);
|
|
4495
|
+
return n < 0 ? void 0 : n;
|
|
4496
|
+
}
|
|
4497
|
+
return is(e, t);
|
|
4498
|
+
}
|
|
4499
|
+
function ps(e) {
|
|
4500
|
+
if (!e.readable || e.value === null || typeof e.value == "boolean") return null;
|
|
4501
|
+
let t = ds(e).value;
|
|
4502
|
+
return t === null ? null : e.unit === null || e.unit === "" ? String(t) : `${String(t)} ${e.unit}`;
|
|
4503
|
+
}
|
|
4504
|
+
//#endregion
|
|
4505
|
+
//#region src/ui/SetValueDialog.tsx
|
|
4506
|
+
function ms(e) {
|
|
4507
|
+
let { param: t, channelLabel: n, onClose: i, onSet: o } = e, { t: s } = $(), [c, l] = _(void 0), [u, d] = _(!1), f = c === void 0 ? void 0 : fs(t, c), p = async () => {
|
|
4508
|
+
if (f !== void 0) {
|
|
4509
|
+
d(!0);
|
|
4510
|
+
try {
|
|
4511
|
+
await o(f);
|
|
4512
|
+
} finally {
|
|
4513
|
+
d(!1);
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
};
|
|
4517
|
+
return /* @__PURE__ */ b(a, {
|
|
4518
|
+
open: !0,
|
|
4519
|
+
onClose: i,
|
|
4520
|
+
icon: Oo,
|
|
4521
|
+
title: s("panel.setTitle", {
|
|
4522
|
+
parameter: t.parameter,
|
|
4523
|
+
channel: n
|
|
4524
|
+
}),
|
|
4525
|
+
testId: "hm-set-value-dialog",
|
|
4526
|
+
footer: /* @__PURE__ */ b(r, {
|
|
4527
|
+
type: "button",
|
|
4528
|
+
onClick: () => void p(),
|
|
4529
|
+
disabled: f === void 0 || u,
|
|
4530
|
+
children: s("panel.set")
|
|
4531
|
+
}),
|
|
4532
|
+
children: /* @__PURE__ */ b(as, {
|
|
4533
|
+
param: ds(t),
|
|
4534
|
+
edit: c,
|
|
4535
|
+
onEdit: l
|
|
4536
|
+
})
|
|
4537
|
+
});
|
|
4538
|
+
}
|
|
4539
|
+
//#endregion
|
|
4540
|
+
//#region src/ui/DevicePanel.tsx
|
|
4541
|
+
function hs(e) {
|
|
4542
|
+
return e.name ?? `${e.type ?? e.address} · ${e.index}`;
|
|
4543
|
+
}
|
|
4544
|
+
function gs(e) {
|
|
4545
|
+
let { diagnostics: t, firmware: n } = e.state, { t: r } = $(), i = (e) => e === null ? "—" : String(e);
|
|
4546
|
+
return /* @__PURE__ */ y("div", {
|
|
4547
|
+
className: "flex flex-wrap items-center gap-2",
|
|
4548
|
+
"data-testid": "hm-panel-diagnostics",
|
|
4549
|
+
children: [
|
|
4550
|
+
t.unreach !== null && /* @__PURE__ */ b(f, {
|
|
4551
|
+
variant: t.unreach ? "danger" : "success",
|
|
4552
|
+
children: t.unreach ? r("panel.unreachable") : r("panel.reachable")
|
|
4553
|
+
}),
|
|
4554
|
+
t.lowBattery === !0 && /* @__PURE__ */ b(f, {
|
|
4555
|
+
variant: "warning",
|
|
4556
|
+
children: r("panel.lowBattery")
|
|
4557
|
+
}),
|
|
4558
|
+
t.configPending === !0 && /* @__PURE__ */ b(f, {
|
|
4559
|
+
variant: "info",
|
|
4560
|
+
children: r("panel.configPending")
|
|
4561
|
+
}),
|
|
4562
|
+
t.dutyCycle === !0 && /* @__PURE__ */ b(f, {
|
|
4563
|
+
variant: "warning",
|
|
4564
|
+
children: r("panel.dutyCycleReached")
|
|
4565
|
+
}),
|
|
4566
|
+
typeof t.dutyCycle == "number" && /* @__PURE__ */ b(f, { children: r("panel.dutyCycle", { value: t.dutyCycle }) }),
|
|
4567
|
+
(t.rssiDevice !== null || t.rssiPeer !== null) && /* @__PURE__ */ b(f, { children: r("panel.rssi", {
|
|
4568
|
+
device: i(t.rssiDevice),
|
|
4569
|
+
peer: i(t.rssiPeer)
|
|
4570
|
+
}) }),
|
|
4571
|
+
n.installed !== null && /* @__PURE__ */ b(f, { children: r("panel.firmware", { version: n.installed }) }),
|
|
4572
|
+
n.available !== null && n.available !== n.installed && /* @__PURE__ */ b(f, {
|
|
4573
|
+
variant: "info",
|
|
4574
|
+
children: r("panel.firmwareUpdate", { version: n.available })
|
|
4575
|
+
})
|
|
4576
|
+
]
|
|
4577
|
+
});
|
|
4578
|
+
}
|
|
4579
|
+
function _s(e) {
|
|
4580
|
+
let { trpc: t, integrationId: n, address: a, deviceId: o } = e, { t: c } = $(), l = cs(t, "getCcuDeviceState", p(() => ({
|
|
4581
|
+
integrationId: n,
|
|
4582
|
+
address: a
|
|
4583
|
+
}), [n, a]), ts), u = ls(t), [d, m] = _({ kind: "closed" }), h = async (e, t, r) => {
|
|
4584
|
+
let i = t.type === "ACTION", a = ds({
|
|
4585
|
+
...t,
|
|
4586
|
+
value: r
|
|
4587
|
+
}).value;
|
|
4588
|
+
return await u({
|
|
4589
|
+
action: "setCcuValue",
|
|
4590
|
+
input: {
|
|
4591
|
+
integrationId: n,
|
|
4592
|
+
channel: e.address,
|
|
4593
|
+
parameter: t.parameter,
|
|
4594
|
+
value: r,
|
|
4595
|
+
...o === void 0 ? {} : { deviceId: o }
|
|
4596
|
+
},
|
|
4597
|
+
schema: No,
|
|
4598
|
+
title: c("panel.writeTitle"),
|
|
4599
|
+
message: i ? c("panel.pressMessage", {
|
|
4600
|
+
parameter: t.parameter,
|
|
4601
|
+
channel: hs(e)
|
|
4602
|
+
}) : c("panel.writeMessage", {
|
|
4603
|
+
parameter: t.parameter,
|
|
4604
|
+
channel: hs(e),
|
|
4605
|
+
value: String(a)
|
|
4606
|
+
}),
|
|
4607
|
+
confirmLabel: c("panel.writeConfirm"),
|
|
4608
|
+
variant: "warning"
|
|
4609
|
+
}) === null ? !1 : (l.reload(), !0);
|
|
4610
|
+
}, ee = (e, t) => {
|
|
4611
|
+
if (!t.writable) return null;
|
|
4612
|
+
if (t.type === "ACTION") return /* @__PURE__ */ b(r, {
|
|
4613
|
+
type: "button",
|
|
4614
|
+
size: "sm",
|
|
4615
|
+
variant: "outline",
|
|
4616
|
+
onClick: () => void h(e, t, !0),
|
|
4617
|
+
children: c("panel.press")
|
|
4618
|
+
});
|
|
4619
|
+
if (t.type === "BOOL") {
|
|
4620
|
+
let n = t.value !== !0;
|
|
4621
|
+
return /* @__PURE__ */ b(r, {
|
|
4622
|
+
type: "button",
|
|
4623
|
+
size: "sm",
|
|
4624
|
+
variant: "outline",
|
|
4625
|
+
onClick: () => void h(e, t, n),
|
|
4626
|
+
children: c(n ? "panel.turnOn" : "panel.turnOff")
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4629
|
+
return /* @__PURE__ */ b(r, {
|
|
4630
|
+
type: "button",
|
|
4631
|
+
size: "sm",
|
|
4632
|
+
variant: "outline",
|
|
4633
|
+
onClick: () => m({
|
|
4634
|
+
kind: "set",
|
|
4635
|
+
channel: e,
|
|
4636
|
+
param: t
|
|
4637
|
+
}),
|
|
4638
|
+
children: c("panel.setAction")
|
|
4639
|
+
});
|
|
4640
|
+
}, g = (e) => e.readable && typeof e.value == "boolean" ? /* @__PURE__ */ b(f, {
|
|
4641
|
+
variant: e.value ? "success" : "default",
|
|
4642
|
+
children: e.value ? c("panel.yes") : c("panel.no")
|
|
4643
|
+
}) : /* @__PURE__ */ b("span", {
|
|
4644
|
+
className: "text-sm text-foreground",
|
|
4645
|
+
children: ps(e) ?? "—"
|
|
4646
|
+
}), v = (e) => [
|
|
4647
|
+
{
|
|
4648
|
+
key: "parameter",
|
|
4649
|
+
header: c("panel.colParameter"),
|
|
4650
|
+
render: (e) => /* @__PURE__ */ b("span", {
|
|
4651
|
+
className: "font-mono text-xs text-foreground",
|
|
4652
|
+
children: e.parameter
|
|
4653
|
+
}),
|
|
4654
|
+
sortValue: (e) => e.parameter
|
|
4655
|
+
},
|
|
4656
|
+
{
|
|
4657
|
+
key: "value",
|
|
4658
|
+
header: c("panel.colValue"),
|
|
4659
|
+
render: g,
|
|
4660
|
+
notSortableReason: "Mixed value types"
|
|
4661
|
+
},
|
|
4662
|
+
{
|
|
4663
|
+
key: "actions",
|
|
4664
|
+
header: "",
|
|
4665
|
+
align: "right",
|
|
4666
|
+
notSortableReason: "Action column",
|
|
4667
|
+
render: (t) => ee(e, t)
|
|
4668
|
+
}
|
|
4669
|
+
];
|
|
4670
|
+
if (l.error !== null) return /* @__PURE__ */ b(s, {
|
|
4671
|
+
title: c("panel.loadFailed"),
|
|
4672
|
+
message: l.error,
|
|
4673
|
+
onRetry: l.reload
|
|
4674
|
+
});
|
|
4675
|
+
let x = l.data;
|
|
4676
|
+
return x === void 0 ? /* @__PURE__ */ b("p", {
|
|
4677
|
+
className: "text-sm text-foreground-subtle",
|
|
4678
|
+
children: c("common.loading")
|
|
4679
|
+
}) : /* @__PURE__ */ y("div", {
|
|
4680
|
+
className: "flex flex-col gap-3",
|
|
4681
|
+
"data-testid": "hm-device-panel",
|
|
4682
|
+
children: [
|
|
4683
|
+
/* @__PURE__ */ y("div", {
|
|
4684
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
4685
|
+
children: [/* @__PURE__ */ y("span", {
|
|
4686
|
+
className: "text-sm text-foreground-muted",
|
|
4687
|
+
children: [
|
|
4688
|
+
x.type,
|
|
4689
|
+
" · ",
|
|
4690
|
+
x.address
|
|
4691
|
+
]
|
|
4692
|
+
}), /* @__PURE__ */ y("div", {
|
|
4693
|
+
className: "flex gap-2",
|
|
4694
|
+
children: [/* @__PURE__ */ y(r, {
|
|
4695
|
+
type: "button",
|
|
4696
|
+
size: "sm",
|
|
4697
|
+
variant: "outline",
|
|
4698
|
+
onClick: l.reload,
|
|
4699
|
+
children: [/* @__PURE__ */ b(Do, { className: "h-4 w-4" }), c("panel.reload")]
|
|
4700
|
+
}), /* @__PURE__ */ y(r, {
|
|
4701
|
+
type: "button",
|
|
4702
|
+
size: "sm",
|
|
4703
|
+
onClick: () => m({ kind: "configure" }),
|
|
4704
|
+
children: [/* @__PURE__ */ b(ko, { className: "h-4 w-4" }), c("panel.configure")]
|
|
4705
|
+
})]
|
|
4706
|
+
})]
|
|
4707
|
+
}),
|
|
4708
|
+
/* @__PURE__ */ b(gs, { state: x }),
|
|
4709
|
+
x.channels.filter((e) => e.values.length > 0).map((e) => /* @__PURE__ */ y("div", {
|
|
4710
|
+
className: "flex flex-col gap-1",
|
|
4711
|
+
children: [/* @__PURE__ */ y("span", {
|
|
4712
|
+
className: "text-xs font-medium text-foreground-muted",
|
|
4713
|
+
children: [
|
|
4714
|
+
e.index === 0 ? c("panel.maintenance") : hs(e),
|
|
4715
|
+
" ·",
|
|
4716
|
+
" ",
|
|
4717
|
+
e.address
|
|
4718
|
+
]
|
|
4719
|
+
}), /* @__PURE__ */ b(i, {
|
|
4720
|
+
columns: v(e),
|
|
4721
|
+
rows: e.values,
|
|
4722
|
+
rowKey: (e) => e.parameter,
|
|
4723
|
+
minWidthPx: 280,
|
|
4724
|
+
emptyMessage: c("panel.none")
|
|
4725
|
+
})]
|
|
4726
|
+
}, e.address)),
|
|
4727
|
+
d.kind === "configure" && /* @__PURE__ */ b(us, {
|
|
4728
|
+
trpc: t,
|
|
4729
|
+
integrationId: n,
|
|
4730
|
+
device: {
|
|
4731
|
+
address: x.address,
|
|
4732
|
+
name: x.name
|
|
4733
|
+
},
|
|
4734
|
+
onClose: () => m({ kind: "closed" })
|
|
4735
|
+
}),
|
|
4736
|
+
d.kind === "set" && /* @__PURE__ */ b(ms, {
|
|
4737
|
+
param: d.param,
|
|
4738
|
+
channelLabel: hs(d.channel),
|
|
4739
|
+
onClose: () => m({ kind: "closed" }),
|
|
4740
|
+
onSet: async (e) => {
|
|
4741
|
+
await h(d.channel, d.param, e) && m({ kind: "closed" });
|
|
4742
|
+
}
|
|
4743
|
+
})
|
|
4744
|
+
]
|
|
4745
|
+
});
|
|
4746
|
+
}
|
|
4747
|
+
//#endregion
|
|
4748
|
+
//#region src/widgets/DevicePanelWidget.tsx
|
|
4749
|
+
var vs = Y({
|
|
4750
|
+
integrationId: W().min(1),
|
|
4751
|
+
address: W().min(1)
|
|
4752
|
+
});
|
|
4753
|
+
function ys(t) {
|
|
4754
|
+
let n = e(), { t: r } = $(), i = vs.safeParse(t.config ?? {});
|
|
4755
|
+
return i.success ? /* @__PURE__ */ b(_s, {
|
|
4756
|
+
trpc: n,
|
|
4757
|
+
integrationId: i.data.integrationId,
|
|
4758
|
+
address: i.data.address,
|
|
4759
|
+
...t.deviceId === void 0 ? {} : { deviceId: t.deviceId }
|
|
4760
|
+
}) : /* @__PURE__ */ b("p", {
|
|
4761
|
+
className: "text-sm text-danger",
|
|
4762
|
+
children: r("panel.badConfig")
|
|
4763
|
+
});
|
|
4764
|
+
}
|
|
4765
|
+
//#endregion
|
|
4766
|
+
//#region src/widgets/index.tsx
|
|
4767
|
+
var bs = { "device-panel": ys };
|
|
4768
|
+
//#endregion
|
|
4769
|
+
export { bs as default };
|