@bonsae/nrg 0.15.0 → 0.16.0
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/README.md +4 -10
- package/package.json +1 -1
- package/server/index.cjs +11 -5
- package/server/resources/nrg-client.js +561 -552
- package/test/index.js +3 -2
- package/types/server.d.ts +11 -6
- package/types/shims/form/components/node-red-editor-input.vue.d.ts +5 -1
- package/types/shims/form/components/node-red-json-schema-form.vue.d.ts +5 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){var s=document.createElement("style");s.textContent=".nrg-toggles-grid[data-v-7e7ab58c]{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px 16px}[data-v-7e7ab58c] .node-red-vue-input-error-message{color:var(--red-ui-text-color-error)}[data-v-7e7ab58c] .form-row input[type=text],[data-v-7e7ab58c] .form-row input[type=number],[data-v-7e7ab58c] .form-row input[type=password]{height:34px;padding:0 8px;box-sizing:border-box}.nrg-label[data-v-864b02f2]{display:inline-block;width:100%;margin-bottom:4px;cursor:default}.nrg-label i[data-v-864b02f2]{margin-right:5px}.nrg-required[data-v-864b02f2]{color:var(--red-ui-text-color-error);margin-left:2px}.editor-wrapper[data-v-
|
|
2
|
-
var
|
|
3
|
-
var ks = (e, t, r) => t in e ?
|
|
1
|
+
(function(){var s=document.createElement("style");s.textContent=".nrg-toggles-grid[data-v-7e7ab58c]{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px 16px}[data-v-7e7ab58c] .node-red-vue-input-error-message{color:var(--red-ui-text-color-error)}[data-v-7e7ab58c] .form-row input[type=text],[data-v-7e7ab58c] .form-row input[type=number],[data-v-7e7ab58c] .form-row input[type=password]{height:34px;padding:0 8px;box-sizing:border-box}.nrg-label[data-v-864b02f2]{display:inline-block;width:100%;margin-bottom:4px;cursor:default}.nrg-label i[data-v-864b02f2]{margin-right:5px}.nrg-required[data-v-864b02f2]{color:var(--red-ui-text-color-error);margin-left:2px}.editor-wrapper[data-v-92de5d96]{position:relative}.expand-button[data-v-92de5d96]{position:absolute;top:-23px;right:0;z-index:10;transition:color .3s ease;cursor:pointer}.nrg-toggle-wrapper[data-v-724dcae4]{display:inline-flex;align-items:center}.nrg-toggle[data-v-724dcae4]{position:relative;display:inline-flex!important;flex-direction:column;align-items:flex-start;cursor:pointer;gap:4px;-webkit-user-select:none;user-select:none}.nrg-toggle__input[data-v-724dcae4]{position:absolute;opacity:0;width:0;height:0}.nrg-toggle__slider[data-v-724dcae4]{position:relative;display:inline-block;width:36px;min-width:36px;height:20px;background-color:var(--red-ui-secondary-border-color, #ccc);border-radius:10px;transition:background-color .2s ease}.nrg-toggle__slider[data-v-724dcae4]:after{content:\"\";position:absolute;top:2px;left:2px;width:16px;height:16px;background-color:#fff;border-radius:50%;transition:transform .2s ease}.nrg-toggle--checked .nrg-toggle__slider[data-v-724dcae4]{background-color:var(--red-ui-text-color-link, #0070d2)}.nrg-toggle--checked .nrg-toggle__slider[data-v-724dcae4]:after{transform:translate(16px)}.nrg-toggle__label[data-v-724dcae4]{cursor:default;white-space:nowrap}.nrg-toggle__label i[data-v-724dcae4]{margin-right:2px}\n";document.head.appendChild(s);})();
|
|
2
|
+
var Is = Object.defineProperty;
|
|
3
|
+
var ks = (e, t, r) => t in e ? Is(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
4
4
|
var yr = (e, t, r) => ks(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
|
-
import { defineComponent as Pe, resolveComponent as he, openBlock as W, createElementBlock as ee, Fragment as nr, createVNode as
|
|
6
|
-
function
|
|
5
|
+
import { defineComponent as Pe, resolveComponent as he, openBlock as W, createElementBlock as ee, Fragment as nr, createVNode as be, createCommentVNode as ne, createElementVNode as ce, normalizeClass as sr, renderSlot as Ae, createTextVNode as Un, toDisplayString as Ie, createBlock as _e, withDirectives as qs, vShow as Ts, Teleport as As, renderList as gr, createApp as Ds } from "/nrg/assets/vue.esm-browser.prod.js";
|
|
6
|
+
function Ms(e, t, { signal: r, edges: s } = {}) {
|
|
7
7
|
let l, a = null;
|
|
8
8
|
const o = s != null && s.includes("leading"), u = s == null || s.includes("trailing"), y = () => {
|
|
9
9
|
a !== null && (e.apply(l, a), l = void 0, a = null);
|
|
@@ -30,12 +30,12 @@ function Ds(e, t, { signal: r, edges: s } = {}) {
|
|
|
30
30
|
};
|
|
31
31
|
return E.schedule = P, E.cancel = d, E.flush = v, r == null || r.addEventListener("abort", d, { once: !0 }), E;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Vs() {
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function zs(e) {
|
|
36
36
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Cs(e) {
|
|
39
39
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
40
40
|
}
|
|
41
41
|
function or(e) {
|
|
@@ -44,12 +44,12 @@ function or(e) {
|
|
|
44
44
|
function ar(e) {
|
|
45
45
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
46
46
|
}
|
|
47
|
-
const Kn = "[object RegExp]", Bn = "[object String]", Hn = "[object Number]", Gn = "[object Boolean]", ir = "[object Arguments]", Jn = "[object Symbol]", Wn = "[object Date]", Yn = "[object Map]", Zn = "[object Set]", Qn = "[object Array]",
|
|
48
|
-
function
|
|
47
|
+
const Kn = "[object RegExp]", Bn = "[object String]", Hn = "[object Number]", Gn = "[object Boolean]", ir = "[object Arguments]", Jn = "[object Symbol]", Wn = "[object Date]", Yn = "[object Map]", Zn = "[object Set]", Qn = "[object Array]", Fs = "[object Function]", Xn = "[object ArrayBuffer]", Mt = "[object Object]", Ls = "[object Error]", xn = "[object DataView]", es = "[object Uint8Array]", ts = "[object Uint8ClampedArray]", rs = "[object Uint16Array]", ns = "[object Uint32Array]", Us = "[object BigUint64Array]", ss = "[object Int8Array]", os = "[object Int16Array]", as = "[object Int32Array]", Ks = "[object BigInt64Array]", is = "[object Float32Array]", us = "[object Float64Array]";
|
|
48
|
+
function Ce(e, t, r, s = /* @__PURE__ */ new Map(), l = void 0) {
|
|
49
49
|
const a = l == null ? void 0 : l(e, t, r, s);
|
|
50
50
|
if (a !== void 0)
|
|
51
51
|
return a;
|
|
52
|
-
if (
|
|
52
|
+
if (zs(e))
|
|
53
53
|
return e;
|
|
54
54
|
if (s.has(e))
|
|
55
55
|
return s.get(e);
|
|
@@ -57,7 +57,7 @@ function ze(e, t, r, s = /* @__PURE__ */ new Map(), l = void 0) {
|
|
|
57
57
|
const o = new Array(e.length);
|
|
58
58
|
s.set(e, o);
|
|
59
59
|
for (let u = 0; u < e.length; u++)
|
|
60
|
-
o[u] =
|
|
60
|
+
o[u] = Ce(e[u], u, r, s, l);
|
|
61
61
|
return Object.hasOwn(e, "index") && (o.index = e.index), Object.hasOwn(e, "input") && (o.input = e.input), o;
|
|
62
62
|
}
|
|
63
63
|
if (e instanceof Date)
|
|
@@ -70,23 +70,23 @@ function ze(e, t, r, s = /* @__PURE__ */ new Map(), l = void 0) {
|
|
|
70
70
|
const o = /* @__PURE__ */ new Map();
|
|
71
71
|
s.set(e, o);
|
|
72
72
|
for (const [u, y] of e)
|
|
73
|
-
o.set(u,
|
|
73
|
+
o.set(u, Ce(y, u, r, s, l));
|
|
74
74
|
return o;
|
|
75
75
|
}
|
|
76
76
|
if (e instanceof Set) {
|
|
77
77
|
const o = /* @__PURE__ */ new Set();
|
|
78
78
|
s.set(e, o);
|
|
79
79
|
for (const u of e)
|
|
80
|
-
o.add(
|
|
80
|
+
o.add(Ce(u, void 0, r, s, l));
|
|
81
81
|
return o;
|
|
82
82
|
}
|
|
83
83
|
if (typeof Buffer < "u" && Buffer.isBuffer(e))
|
|
84
84
|
return e.subarray();
|
|
85
|
-
if (
|
|
85
|
+
if (Cs(e)) {
|
|
86
86
|
const o = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
87
87
|
s.set(e, o);
|
|
88
88
|
for (let u = 0; u < e.length; u++)
|
|
89
|
-
o[u] =
|
|
89
|
+
o[u] = Ce(e[u], u, r, s, l);
|
|
90
90
|
return o;
|
|
91
91
|
}
|
|
92
92
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
|
|
@@ -121,7 +121,7 @@ function ze(e, t, r, s = /* @__PURE__ */ new Map(), l = void 0) {
|
|
|
121
121
|
const o = new String(e.valueOf());
|
|
122
122
|
return s.set(e, o), Re(o, e, r, s, l), o;
|
|
123
123
|
}
|
|
124
|
-
if (typeof e == "object" &&
|
|
124
|
+
if (typeof e == "object" && Bs(e)) {
|
|
125
125
|
const o = Object.create(Object.getPrototypeOf(e));
|
|
126
126
|
return s.set(e, o), Re(o, e, r, s, l), o;
|
|
127
127
|
}
|
|
@@ -131,10 +131,10 @@ function Re(e, t, r = e, s, l) {
|
|
|
131
131
|
const a = [...Object.keys(t), ...or(t)];
|
|
132
132
|
for (let o = 0; o < a.length; o++) {
|
|
133
133
|
const u = a[o], y = Object.getOwnPropertyDescriptor(e, u);
|
|
134
|
-
(y == null || y.writable) && (e[u] =
|
|
134
|
+
(y == null || y.writable) && (e[u] = Ce(t[u], u, r, s, l));
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Bs(e) {
|
|
138
138
|
switch (ar(e)) {
|
|
139
139
|
case ir:
|
|
140
140
|
case Qn:
|
|
@@ -163,8 +163,8 @@ function Ks(e) {
|
|
|
163
163
|
return !1;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return
|
|
166
|
+
function Hs(e) {
|
|
167
|
+
return Ce(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
|
|
168
168
|
}
|
|
169
169
|
function vr(e) {
|
|
170
170
|
if (!e || typeof e != "object")
|
|
@@ -172,10 +172,10 @@ function vr(e) {
|
|
|
172
172
|
const t = Object.getPrototypeOf(e);
|
|
173
173
|
return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function Gs(e, t) {
|
|
176
176
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Js(e, t, r) {
|
|
179
179
|
return He(e, t, void 0, void 0, void 0, void 0, r);
|
|
180
180
|
}
|
|
181
181
|
function He(e, t, r, s, l, a, o) {
|
|
@@ -210,7 +210,7 @@ function Ge(e, t, r, s) {
|
|
|
210
210
|
return e.toString() === t.toString();
|
|
211
211
|
case Hn: {
|
|
212
212
|
const y = e.valueOf(), g = t.valueOf();
|
|
213
|
-
return
|
|
213
|
+
return Gs(y, g);
|
|
214
214
|
}
|
|
215
215
|
case Gn:
|
|
216
216
|
case Wn:
|
|
@@ -218,7 +218,7 @@ function Ge(e, t, r, s) {
|
|
|
218
218
|
return Object.is(e.valueOf(), t.valueOf());
|
|
219
219
|
case Kn:
|
|
220
220
|
return e.source === t.source && e.flags === t.flags;
|
|
221
|
-
case
|
|
221
|
+
case Fs:
|
|
222
222
|
return e === t;
|
|
223
223
|
}
|
|
224
224
|
r = r ?? /* @__PURE__ */ new Map();
|
|
@@ -253,11 +253,11 @@ function Ge(e, t, r, s) {
|
|
|
253
253
|
case ts:
|
|
254
254
|
case rs:
|
|
255
255
|
case ns:
|
|
256
|
-
case
|
|
256
|
+
case Us:
|
|
257
257
|
case ss:
|
|
258
258
|
case os:
|
|
259
259
|
case as:
|
|
260
|
-
case
|
|
260
|
+
case Ks:
|
|
261
261
|
case is:
|
|
262
262
|
case us: {
|
|
263
263
|
if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
|
|
@@ -271,7 +271,7 @@ function Ge(e, t, r, s) {
|
|
|
271
271
|
return e.byteLength !== t.byteLength ? !1 : Ge(new Uint8Array(e), new Uint8Array(t), r, s);
|
|
272
272
|
case xn:
|
|
273
273
|
return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : Ge(new Uint8Array(e), new Uint8Array(t), r, s);
|
|
274
|
-
case
|
|
274
|
+
case Ls:
|
|
275
275
|
return e.name === t.name && e.message === t.message;
|
|
276
276
|
case Mt: {
|
|
277
277
|
if (!(Ge(e.constructor, t.constructor, r, s) || vr(e) && vr(t)))
|
|
@@ -296,14 +296,14 @@ function Ge(e, t, r, s) {
|
|
|
296
296
|
r.delete(e), r.delete(t);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
return
|
|
299
|
+
function Ws(e, t) {
|
|
300
|
+
return Js(e, t, Vs);
|
|
301
301
|
}
|
|
302
302
|
function zt(e) {
|
|
303
303
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
304
304
|
}
|
|
305
305
|
var Le = {}, _r;
|
|
306
|
-
function
|
|
306
|
+
function Ys() {
|
|
307
307
|
if (_r) return Le;
|
|
308
308
|
_r = 1;
|
|
309
309
|
var e = /~/, t = /~[01]/g;
|
|
@@ -368,8 +368,8 @@ function Ws() {
|
|
|
368
368
|
}
|
|
369
369
|
return Le.get = o, Le.set = u, Le.compile = y, Le;
|
|
370
370
|
}
|
|
371
|
-
var
|
|
372
|
-
const cs = /* @__PURE__ */ zt(
|
|
371
|
+
var Zs = Ys();
|
|
372
|
+
const cs = /* @__PURE__ */ zt(Zs);
|
|
373
373
|
var Ze = { exports: {} }, Bt = {}, we = {}, ke = {}, Ht = {}, Gt = {}, Jt = {}, $r;
|
|
374
374
|
function Je() {
|
|
375
375
|
return $r || ($r = 1, (function(e) {
|
|
@@ -1160,17 +1160,17 @@ function Y() {
|
|
|
1160
1160
|
return typeof O == "boolean" || typeof O == "number" || O === null ? !O : (0, t._)`!${k(O)}`;
|
|
1161
1161
|
}
|
|
1162
1162
|
e.not = se;
|
|
1163
|
-
const oe =
|
|
1163
|
+
const oe = I(e.operators.AND);
|
|
1164
1164
|
function te(...O) {
|
|
1165
1165
|
return O.reduce(oe);
|
|
1166
1166
|
}
|
|
1167
1167
|
e.and = te;
|
|
1168
|
-
const de =
|
|
1168
|
+
const de = I(e.operators.OR);
|
|
1169
1169
|
function V(...O) {
|
|
1170
1170
|
return O.reduce(de);
|
|
1171
1171
|
}
|
|
1172
1172
|
e.or = V;
|
|
1173
|
-
function
|
|
1173
|
+
function I(O) {
|
|
1174
1174
|
return (p, S) => p === t.nil ? S : S === t.nil ? p : (0, t._)`${k(p)} ${O} ${k(S)}`;
|
|
1175
1175
|
}
|
|
1176
1176
|
function k(O) {
|
|
@@ -1431,7 +1431,7 @@ function We() {
|
|
|
1431
1431
|
})(Ht)), Ht;
|
|
1432
1432
|
}
|
|
1433
1433
|
var Or;
|
|
1434
|
-
function
|
|
1434
|
+
function Qs() {
|
|
1435
1435
|
if (Or) return ke;
|
|
1436
1436
|
Or = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.boolOrEmptySchema = ke.topBoolOrEmptySchema = void 0;
|
|
1437
1437
|
const e = /* @__PURE__ */ We(), t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ Ne(), s = {
|
|
@@ -1488,10 +1488,10 @@ function ds() {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
return qe.getRules = s, qe;
|
|
1490
1490
|
}
|
|
1491
|
-
var Ee = {},
|
|
1491
|
+
var Ee = {}, jr;
|
|
1492
1492
|
function ls() {
|
|
1493
|
-
if (
|
|
1494
|
-
|
|
1493
|
+
if (jr) return Ee;
|
|
1494
|
+
jr = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.shouldUseRule = Ee.shouldUseGroup = Ee.schemaHasRulesForType = void 0;
|
|
1495
1495
|
function e({ schema: s, self: l }, a) {
|
|
1496
1496
|
const o = l.RULES.types[a];
|
|
1497
1497
|
return o && o !== !0 && t(s, o);
|
|
@@ -1507,10 +1507,10 @@ function ls() {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
return Ee.shouldUseRule = r, Ee;
|
|
1509
1509
|
}
|
|
1510
|
-
var
|
|
1510
|
+
var Ir;
|
|
1511
1511
|
function Vt() {
|
|
1512
|
-
if (
|
|
1513
|
-
|
|
1512
|
+
if (Ir) return ue;
|
|
1513
|
+
Ir = 1, Object.defineProperty(ue, "__esModule", { value: !0 }), ue.reportTypeError = ue.checkDataTypes = ue.checkDataType = ue.coerceAndCheckDataType = ue.getJSONTypes = ue.getSchemaTypes = ue.DataType = void 0;
|
|
1514
1514
|
const e = /* @__PURE__ */ ds(), t = /* @__PURE__ */ ls(), r = /* @__PURE__ */ We(), s = /* @__PURE__ */ Y(), l = /* @__PURE__ */ x();
|
|
1515
1515
|
var a;
|
|
1516
1516
|
(function(n) {
|
|
@@ -1656,7 +1656,7 @@ function Vt() {
|
|
|
1656
1656
|
return ue;
|
|
1657
1657
|
}
|
|
1658
1658
|
var Ue = {}, kr;
|
|
1659
|
-
function
|
|
1659
|
+
function Xs() {
|
|
1660
1660
|
if (kr) return Ue;
|
|
1661
1661
|
kr = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.assignDefaults = void 0;
|
|
1662
1662
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x();
|
|
@@ -1683,7 +1683,7 @@ function Qs() {
|
|
|
1683
1683
|
return Ue;
|
|
1684
1684
|
}
|
|
1685
1685
|
var ve = {}, re = {}, qr;
|
|
1686
|
-
function
|
|
1686
|
+
function $e() {
|
|
1687
1687
|
if (qr) return re;
|
|
1688
1688
|
qr = 1, Object.defineProperty(re, "__esModule", { value: !0 }), re.validateUnion = re.validateArray = re.usePattern = re.callValidateCode = re.schemaProperties = re.allSchemaProperties = re.noPropertyInData = re.propertyInData = re.isOwnProperty = re.hasPropFunc = re.reportMissingProp = re.checkMissingProp = re.checkReportMissingProp = void 0;
|
|
1689
1689
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ Ne(), s = /* @__PURE__ */ x();
|
|
@@ -1792,10 +1792,10 @@ function _e() {
|
|
|
1792
1792
|
return re.validateUnion = c, re;
|
|
1793
1793
|
}
|
|
1794
1794
|
var Tr;
|
|
1795
|
-
function
|
|
1795
|
+
function xs() {
|
|
1796
1796
|
if (Tr) return ve;
|
|
1797
1797
|
Tr = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.validateKeywordUsage = ve.validSchemaType = ve.funcKeywordCode = ve.macroKeywordCode = void 0;
|
|
1798
|
-
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ Ne(), r = /* @__PURE__ */
|
|
1798
|
+
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ Ne(), r = /* @__PURE__ */ $e(), s = /* @__PURE__ */ We();
|
|
1799
1799
|
function l(b, d) {
|
|
1800
1800
|
const { gen: v, keyword: E, schema: h, parentSchema: c, it: n } = b, f = d.macro.call(n.self, h, c, n), w = g(v, E, f);
|
|
1801
1801
|
n.opts.validateSchema !== !1 && n.self.validateSchema(f, !0);
|
|
@@ -1881,7 +1881,7 @@ function Xs() {
|
|
|
1881
1881
|
return ve.validateKeywordUsage = P, ve;
|
|
1882
1882
|
}
|
|
1883
1883
|
var Se = {}, Ar;
|
|
1884
|
-
function
|
|
1884
|
+
function eo() {
|
|
1885
1885
|
if (Ar) return Se;
|
|
1886
1886
|
Ar = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.extendSubschemaMode = Se.extendSubschemaData = Se.getSubschema = void 0;
|
|
1887
1887
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x();
|
|
@@ -1965,7 +1965,7 @@ function fs() {
|
|
|
1965
1965
|
}), Yt;
|
|
1966
1966
|
}
|
|
1967
1967
|
var Zt = { exports: {} }, Mr;
|
|
1968
|
-
function
|
|
1968
|
+
function to() {
|
|
1969
1969
|
if (Mr) return Zt.exports;
|
|
1970
1970
|
Mr = 1;
|
|
1971
1971
|
var e = Zt.exports = function(s, l, a) {
|
|
@@ -2043,7 +2043,7 @@ var Vr;
|
|
|
2043
2043
|
function Ct() {
|
|
2044
2044
|
if (Vr) return le;
|
|
2045
2045
|
Vr = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.getSchemaRefs = le.resolveUrl = le.normalizeId = le._getFullPath = le.getFullPath = le.inlineRef = void 0;
|
|
2046
|
-
const e = /* @__PURE__ */ x(), t = fs(), r =
|
|
2046
|
+
const e = /* @__PURE__ */ x(), t = fs(), r = to(), s = /* @__PURE__ */ new Set([
|
|
2047
2047
|
"type",
|
|
2048
2048
|
"format",
|
|
2049
2049
|
"pattern",
|
|
@@ -2152,7 +2152,7 @@ var zr;
|
|
|
2152
2152
|
function Ye() {
|
|
2153
2153
|
if (zr) return we;
|
|
2154
2154
|
zr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.getData = we.KeywordCxt = we.validateFunctionCode = void 0;
|
|
2155
|
-
const e = /* @__PURE__ */
|
|
2155
|
+
const e = /* @__PURE__ */ Qs(), t = /* @__PURE__ */ Vt(), r = /* @__PURE__ */ ls(), s = /* @__PURE__ */ Vt(), l = /* @__PURE__ */ Xs(), a = /* @__PURE__ */ xs(), o = /* @__PURE__ */ eo(), u = /* @__PURE__ */ Y(), y = /* @__PURE__ */ Ne(), g = /* @__PURE__ */ Ct(), m = /* @__PURE__ */ x(), P = /* @__PURE__ */ We();
|
|
2156
2156
|
function b(R) {
|
|
2157
2157
|
if (i(R) && (N(R), w(R))) {
|
|
2158
2158
|
h(R);
|
|
@@ -2161,204 +2161,204 @@ function Ye() {
|
|
|
2161
2161
|
d(R, () => (0, e.topBoolOrEmptySchema)(R));
|
|
2162
2162
|
}
|
|
2163
2163
|
we.validateFunctionCode = b;
|
|
2164
|
-
function d({ gen: R, validateName:
|
|
2165
|
-
G.code.es5 ? R.func(
|
|
2164
|
+
function d({ gen: R, validateName: j, schema: D, schemaEnv: L, opts: G }, Q) {
|
|
2165
|
+
G.code.es5 ? R.func(j, (0, u._)`${y.default.data}, ${y.default.valCxt}`, L.$async, () => {
|
|
2166
2166
|
R.code((0, u._)`"use strict"; ${n(D, G)}`), E(R, G), R.code(Q);
|
|
2167
|
-
}) : R.func(
|
|
2167
|
+
}) : R.func(j, (0, u._)`${y.default.data}, ${v(G)}`, L.$async, () => R.code(n(D, G)).code(Q));
|
|
2168
2168
|
}
|
|
2169
2169
|
function v(R) {
|
|
2170
2170
|
return (0, u._)`{${y.default.instancePath}="", ${y.default.parentData}, ${y.default.parentDataProperty}, ${y.default.rootData}=${y.default.data}${R.dynamicRef ? (0, u._)`, ${y.default.dynamicAnchors}={}` : u.nil}}={}`;
|
|
2171
2171
|
}
|
|
2172
|
-
function E(R,
|
|
2172
|
+
function E(R, j) {
|
|
2173
2173
|
R.if(y.default.valCxt, () => {
|
|
2174
|
-
R.var(y.default.instancePath, (0, u._)`${y.default.valCxt}.${y.default.instancePath}`), R.var(y.default.parentData, (0, u._)`${y.default.valCxt}.${y.default.parentData}`), R.var(y.default.parentDataProperty, (0, u._)`${y.default.valCxt}.${y.default.parentDataProperty}`), R.var(y.default.rootData, (0, u._)`${y.default.valCxt}.${y.default.rootData}`),
|
|
2174
|
+
R.var(y.default.instancePath, (0, u._)`${y.default.valCxt}.${y.default.instancePath}`), R.var(y.default.parentData, (0, u._)`${y.default.valCxt}.${y.default.parentData}`), R.var(y.default.parentDataProperty, (0, u._)`${y.default.valCxt}.${y.default.parentDataProperty}`), R.var(y.default.rootData, (0, u._)`${y.default.valCxt}.${y.default.rootData}`), j.dynamicRef && R.var(y.default.dynamicAnchors, (0, u._)`${y.default.valCxt}.${y.default.dynamicAnchors}`);
|
|
2175
2175
|
}, () => {
|
|
2176
|
-
R.var(y.default.instancePath, (0, u._)`""`), R.var(y.default.parentData, (0, u._)`undefined`), R.var(y.default.parentDataProperty, (0, u._)`undefined`), R.var(y.default.rootData, y.default.data),
|
|
2176
|
+
R.var(y.default.instancePath, (0, u._)`""`), R.var(y.default.parentData, (0, u._)`undefined`), R.var(y.default.parentDataProperty, (0, u._)`undefined`), R.var(y.default.rootData, y.default.data), j.dynamicRef && R.var(y.default.dynamicAnchors, (0, u._)`{}`);
|
|
2177
2177
|
});
|
|
2178
2178
|
}
|
|
2179
2179
|
function h(R) {
|
|
2180
|
-
const { schema:
|
|
2180
|
+
const { schema: j, opts: D, gen: L } = R;
|
|
2181
2181
|
d(R, () => {
|
|
2182
|
-
D.$comment &&
|
|
2182
|
+
D.$comment && j.$comment && K(R), C(R), L.let(y.default.vErrors, null), L.let(y.default.errors, 0), D.unevaluated && c(R), q(R), B(R);
|
|
2183
2183
|
});
|
|
2184
2184
|
}
|
|
2185
2185
|
function c(R) {
|
|
2186
|
-
const { gen:
|
|
2187
|
-
R.evaluated =
|
|
2186
|
+
const { gen: j, validateName: D } = R;
|
|
2187
|
+
R.evaluated = j.const("evaluated", (0, u._)`${D}.evaluated`), j.if((0, u._)`${R.evaluated}.dynamicProps`, () => j.assign((0, u._)`${R.evaluated}.props`, (0, u._)`undefined`)), j.if((0, u._)`${R.evaluated}.dynamicItems`, () => j.assign((0, u._)`${R.evaluated}.items`, (0, u._)`undefined`));
|
|
2188
2188
|
}
|
|
2189
|
-
function n(R,
|
|
2190
|
-
const D = typeof R == "object" && R[
|
|
2191
|
-
return D && (
|
|
2189
|
+
function n(R, j) {
|
|
2190
|
+
const D = typeof R == "object" && R[j.schemaId];
|
|
2191
|
+
return D && (j.code.source || j.code.process) ? (0, u._)`/*# sourceURL=${D} */` : u.nil;
|
|
2192
2192
|
}
|
|
2193
|
-
function f(R,
|
|
2193
|
+
function f(R, j) {
|
|
2194
2194
|
if (i(R) && (N(R), w(R))) {
|
|
2195
|
-
_(R,
|
|
2195
|
+
_(R, j);
|
|
2196
2196
|
return;
|
|
2197
2197
|
}
|
|
2198
|
-
(0, e.boolOrEmptySchema)(R,
|
|
2198
|
+
(0, e.boolOrEmptySchema)(R, j);
|
|
2199
2199
|
}
|
|
2200
|
-
function w({ schema: R, self:
|
|
2200
|
+
function w({ schema: R, self: j }) {
|
|
2201
2201
|
if (typeof R == "boolean")
|
|
2202
2202
|
return !R;
|
|
2203
2203
|
for (const D in R)
|
|
2204
|
-
if (
|
|
2204
|
+
if (j.RULES.all[D])
|
|
2205
2205
|
return !0;
|
|
2206
2206
|
return !1;
|
|
2207
2207
|
}
|
|
2208
2208
|
function i(R) {
|
|
2209
2209
|
return typeof R.schema != "boolean";
|
|
2210
2210
|
}
|
|
2211
|
-
function _(R,
|
|
2211
|
+
function _(R, j) {
|
|
2212
2212
|
const { schema: D, gen: L, opts: G } = R;
|
|
2213
2213
|
G.$comment && D.$comment && K(R), A(R), F(R);
|
|
2214
2214
|
const Q = L.const("_errs", y.default.errors);
|
|
2215
|
-
q(R, Q), L.var(
|
|
2215
|
+
q(R, Q), L.var(j, (0, u._)`${Q} === ${y.default.errors}`);
|
|
2216
2216
|
}
|
|
2217
2217
|
function N(R) {
|
|
2218
2218
|
(0, m.checkUnknownRules)(R), M(R);
|
|
2219
2219
|
}
|
|
2220
|
-
function q(R,
|
|
2220
|
+
function q(R, j) {
|
|
2221
2221
|
if (R.opts.jtd)
|
|
2222
|
-
return se(R, [], !1,
|
|
2222
|
+
return se(R, [], !1, j);
|
|
2223
2223
|
const D = (0, t.getSchemaTypes)(R.schema), L = (0, t.coerceAndCheckDataType)(R, D);
|
|
2224
|
-
se(R, D, !L,
|
|
2224
|
+
se(R, D, !L, j);
|
|
2225
2225
|
}
|
|
2226
2226
|
function M(R) {
|
|
2227
|
-
const { schema:
|
|
2228
|
-
|
|
2227
|
+
const { schema: j, errSchemaPath: D, opts: L, self: G } = R;
|
|
2228
|
+
j.$ref && L.ignoreKeywordsWithRef && (0, m.schemaHasRulesButRef)(j, G.RULES) && G.logger.warn(`$ref: keywords ignored in schema at path "${D}"`);
|
|
2229
2229
|
}
|
|
2230
2230
|
function C(R) {
|
|
2231
|
-
const { schema:
|
|
2232
|
-
|
|
2231
|
+
const { schema: j, opts: D } = R;
|
|
2232
|
+
j.default !== void 0 && D.useDefaults && D.strictSchema && (0, m.checkStrictMode)(R, "default is ignored in the schema root");
|
|
2233
2233
|
}
|
|
2234
2234
|
function A(R) {
|
|
2235
|
-
const
|
|
2236
|
-
|
|
2235
|
+
const j = R.schema[R.opts.schemaId];
|
|
2236
|
+
j && (R.baseId = (0, g.resolveUrl)(R.opts.uriResolver, R.baseId, j));
|
|
2237
2237
|
}
|
|
2238
2238
|
function F(R) {
|
|
2239
2239
|
if (R.schema.$async && !R.schemaEnv.$async)
|
|
2240
2240
|
throw new Error("async schema in sync schema");
|
|
2241
2241
|
}
|
|
2242
|
-
function K({ gen: R, schemaEnv:
|
|
2242
|
+
function K({ gen: R, schemaEnv: j, schema: D, errSchemaPath: L, opts: G }) {
|
|
2243
2243
|
const Q = D.$comment;
|
|
2244
2244
|
if (G.$comment === !0)
|
|
2245
2245
|
R.code((0, u._)`${y.default.self}.logger.log(${Q})`);
|
|
2246
2246
|
else if (typeof G.$comment == "function") {
|
|
2247
|
-
const ae = (0, u.str)`${L}/$comment`, ge = R.scopeValue("root", { ref:
|
|
2247
|
+
const ae = (0, u.str)`${L}/$comment`, ge = R.scopeValue("root", { ref: j.root });
|
|
2248
2248
|
R.code((0, u._)`${y.default.self}.opts.$comment(${Q}, ${ae}, ${ge}.schema)`);
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
2251
|
function B(R) {
|
|
2252
|
-
const { gen:
|
|
2253
|
-
D.$async ?
|
|
2252
|
+
const { gen: j, schemaEnv: D, validateName: L, ValidationError: G, opts: Q } = R;
|
|
2253
|
+
D.$async ? j.if((0, u._)`${y.default.errors} === 0`, () => j.return(y.default.data), () => j.throw((0, u._)`new ${G}(${y.default.vErrors})`)) : (j.assign((0, u._)`${L}.errors`, y.default.vErrors), Q.unevaluated && X(R), j.return((0, u._)`${y.default.errors} === 0`));
|
|
2254
2254
|
}
|
|
2255
|
-
function X({ gen: R, evaluated:
|
|
2256
|
-
D instanceof u.Name && R.assign((0, u._)`${
|
|
2255
|
+
function X({ gen: R, evaluated: j, props: D, items: L }) {
|
|
2256
|
+
D instanceof u.Name && R.assign((0, u._)`${j}.props`, D), L instanceof u.Name && R.assign((0, u._)`${j}.items`, L);
|
|
2257
2257
|
}
|
|
2258
|
-
function se(R,
|
|
2258
|
+
function se(R, j, D, L) {
|
|
2259
2259
|
const { gen: G, schema: Q, data: ae, allErrors: ge, opts: fe, self: pe } = R, { RULES: ie } = pe;
|
|
2260
2260
|
if (Q.$ref && (fe.ignoreKeywordsWithRef || !(0, m.schemaHasRulesButRef)(Q, ie))) {
|
|
2261
2261
|
G.block(() => U(R, "$ref", ie.all.$ref.definition));
|
|
2262
2262
|
return;
|
|
2263
2263
|
}
|
|
2264
|
-
fe.jtd || te(R,
|
|
2264
|
+
fe.jtd || te(R, j), G.block(() => {
|
|
2265
2265
|
for (const ye of ie.rules)
|
|
2266
|
-
|
|
2267
|
-
|
|
2266
|
+
Me(ye);
|
|
2267
|
+
Me(ie.post);
|
|
2268
2268
|
});
|
|
2269
|
-
function
|
|
2270
|
-
(0, r.shouldUseGroup)(Q, ye) && (ye.type ? (G.if((0, s.checkDataType)(ye.type, ae, fe.strictNumbers)), oe(R, ye),
|
|
2269
|
+
function Me(ye) {
|
|
2270
|
+
(0, r.shouldUseGroup)(Q, ye) && (ye.type ? (G.if((0, s.checkDataType)(ye.type, ae, fe.strictNumbers)), oe(R, ye), j.length === 1 && j[0] === ye.type && D && (G.else(), (0, s.reportTypeError)(R)), G.endIf()) : oe(R, ye), ge || G.if((0, u._)`${y.default.errors} === ${L || 0}`));
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
|
-
function oe(R,
|
|
2273
|
+
function oe(R, j) {
|
|
2274
2274
|
const { gen: D, schema: L, opts: { useDefaults: G } } = R;
|
|
2275
|
-
G && (0, l.assignDefaults)(R,
|
|
2276
|
-
for (const Q of
|
|
2277
|
-
(0, r.shouldUseRule)(L, Q) && U(R, Q.keyword, Q.definition,
|
|
2275
|
+
G && (0, l.assignDefaults)(R, j.type), D.block(() => {
|
|
2276
|
+
for (const Q of j.rules)
|
|
2277
|
+
(0, r.shouldUseRule)(L, Q) && U(R, Q.keyword, Q.definition, j.type);
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
2280
|
-
function te(R,
|
|
2281
|
-
R.schemaEnv.meta || !R.opts.strictTypes || (de(R,
|
|
2280
|
+
function te(R, j) {
|
|
2281
|
+
R.schemaEnv.meta || !R.opts.strictTypes || (de(R, j), R.opts.allowUnionTypes || V(R, j), I(R, R.dataTypes));
|
|
2282
2282
|
}
|
|
2283
|
-
function de(R,
|
|
2284
|
-
if (
|
|
2283
|
+
function de(R, j) {
|
|
2284
|
+
if (j.length) {
|
|
2285
2285
|
if (!R.dataTypes.length) {
|
|
2286
|
-
R.dataTypes =
|
|
2286
|
+
R.dataTypes = j;
|
|
2287
2287
|
return;
|
|
2288
2288
|
}
|
|
2289
|
-
|
|
2289
|
+
j.forEach((D) => {
|
|
2290
2290
|
O(R.dataTypes, D) || S(R, `type "${D}" not allowed by context "${R.dataTypes.join(",")}"`);
|
|
2291
|
-
}), p(R,
|
|
2291
|
+
}), p(R, j);
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
2294
|
-
function V(R,
|
|
2295
|
-
|
|
2294
|
+
function V(R, j) {
|
|
2295
|
+
j.length > 1 && !(j.length === 2 && j.includes("null")) && S(R, "use allowUnionTypes to allow union type keyword");
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2297
|
+
function I(R, j) {
|
|
2298
2298
|
const D = R.self.RULES.all;
|
|
2299
2299
|
for (const L in D) {
|
|
2300
2300
|
const G = D[L];
|
|
2301
2301
|
if (typeof G == "object" && (0, r.shouldUseRule)(R.schema, G)) {
|
|
2302
2302
|
const { type: Q } = G.definition;
|
|
2303
|
-
Q.length && !Q.some((ae) => k(
|
|
2303
|
+
Q.length && !Q.some((ae) => k(j, ae)) && S(R, `missing type "${Q.join(",")}" for keyword "${L}"`);
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
function k(R,
|
|
2308
|
-
return R.includes(
|
|
2307
|
+
function k(R, j) {
|
|
2308
|
+
return R.includes(j) || j === "number" && R.includes("integer");
|
|
2309
2309
|
}
|
|
2310
|
-
function O(R,
|
|
2311
|
-
return R.includes(
|
|
2310
|
+
function O(R, j) {
|
|
2311
|
+
return R.includes(j) || j === "integer" && R.includes("number");
|
|
2312
2312
|
}
|
|
2313
|
-
function p(R,
|
|
2313
|
+
function p(R, j) {
|
|
2314
2314
|
const D = [];
|
|
2315
2315
|
for (const L of R.dataTypes)
|
|
2316
|
-
O(
|
|
2316
|
+
O(j, L) ? D.push(L) : j.includes("integer") && L === "number" && D.push("integer");
|
|
2317
2317
|
R.dataTypes = D;
|
|
2318
2318
|
}
|
|
2319
|
-
function S(R,
|
|
2319
|
+
function S(R, j) {
|
|
2320
2320
|
const D = R.schemaEnv.baseId + R.errSchemaPath;
|
|
2321
|
-
|
|
2321
|
+
j += ` at "${D}" (strictTypes)`, (0, m.checkStrictMode)(R, j, R.opts.strictTypes);
|
|
2322
2322
|
}
|
|
2323
2323
|
class T {
|
|
2324
|
-
constructor(
|
|
2325
|
-
if ((0, a.validateKeywordUsage)(
|
|
2326
|
-
this.schemaCode =
|
|
2324
|
+
constructor(j, D, L) {
|
|
2325
|
+
if ((0, a.validateKeywordUsage)(j, D, L), this.gen = j.gen, this.allErrors = j.allErrors, this.keyword = L, this.data = j.data, this.schema = j.schema[L], this.$data = D.$data && j.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, m.schemaRefOrVal)(j, this.schema, L, this.$data), this.schemaType = D.schemaType, this.parentSchema = j.schema, this.params = {}, this.it = j, this.def = D, this.$data)
|
|
2326
|
+
this.schemaCode = j.gen.const("vSchema", J(this.$data, j));
|
|
2327
2327
|
else if (this.schemaCode = this.schemaValue, !(0, a.validSchemaType)(this.schema, D.schemaType, D.allowUndefined))
|
|
2328
2328
|
throw new Error(`${L} value must be ${JSON.stringify(D.schemaType)}`);
|
|
2329
|
-
("code" in D ? D.trackErrors : D.errors !== !1) && (this.errsCount =
|
|
2329
|
+
("code" in D ? D.trackErrors : D.errors !== !1) && (this.errsCount = j.gen.const("_errs", y.default.errors));
|
|
2330
2330
|
}
|
|
2331
|
-
result(
|
|
2332
|
-
this.failResult((0, u.not)(
|
|
2331
|
+
result(j, D, L) {
|
|
2332
|
+
this.failResult((0, u.not)(j), D, L);
|
|
2333
2333
|
}
|
|
2334
|
-
failResult(
|
|
2335
|
-
this.gen.if(
|
|
2334
|
+
failResult(j, D, L) {
|
|
2335
|
+
this.gen.if(j), L ? L() : this.error(), D ? (this.gen.else(), D(), this.allErrors && this.gen.endIf()) : this.allErrors ? this.gen.endIf() : this.gen.else();
|
|
2336
2336
|
}
|
|
2337
|
-
pass(
|
|
2338
|
-
this.failResult((0, u.not)(
|
|
2337
|
+
pass(j, D) {
|
|
2338
|
+
this.failResult((0, u.not)(j), void 0, D);
|
|
2339
2339
|
}
|
|
2340
|
-
fail(
|
|
2341
|
-
if (
|
|
2340
|
+
fail(j) {
|
|
2341
|
+
if (j === void 0) {
|
|
2342
2342
|
this.error(), this.allErrors || this.gen.if(!1);
|
|
2343
2343
|
return;
|
|
2344
2344
|
}
|
|
2345
|
-
this.gen.if(
|
|
2345
|
+
this.gen.if(j), this.error(), this.allErrors ? this.gen.endIf() : this.gen.else();
|
|
2346
2346
|
}
|
|
2347
|
-
fail$data(
|
|
2347
|
+
fail$data(j) {
|
|
2348
2348
|
if (!this.$data)
|
|
2349
|
-
return this.fail(
|
|
2349
|
+
return this.fail(j);
|
|
2350
2350
|
const { schemaCode: D } = this;
|
|
2351
|
-
this.fail((0, u._)`${D} !== undefined && (${(0, u.or)(this.invalid$data(),
|
|
2351
|
+
this.fail((0, u._)`${D} !== undefined && (${(0, u.or)(this.invalid$data(), j)})`);
|
|
2352
2352
|
}
|
|
2353
|
-
error(
|
|
2353
|
+
error(j, D, L) {
|
|
2354
2354
|
if (D) {
|
|
2355
|
-
this.setParams(D), this._error(
|
|
2355
|
+
this.setParams(D), this._error(j, L), this.setParams({});
|
|
2356
2356
|
return;
|
|
2357
2357
|
}
|
|
2358
|
-
this._error(
|
|
2358
|
+
this._error(j, L);
|
|
2359
2359
|
}
|
|
2360
|
-
_error(
|
|
2361
|
-
(
|
|
2360
|
+
_error(j, D) {
|
|
2361
|
+
(j ? P.reportExtraError : P.reportError)(this, this.def.error, D);
|
|
2362
2362
|
}
|
|
2363
2363
|
$dataError() {
|
|
2364
2364
|
(0, P.reportError)(this, this.def.$dataError || P.keyword$DataError);
|
|
@@ -2368,25 +2368,25 @@ function Ye() {
|
|
|
2368
2368
|
throw new Error('add "trackErrors" to keyword definition');
|
|
2369
2369
|
(0, P.resetErrorsCount)(this.gen, this.errsCount);
|
|
2370
2370
|
}
|
|
2371
|
-
ok(
|
|
2372
|
-
this.allErrors || this.gen.if(
|
|
2371
|
+
ok(j) {
|
|
2372
|
+
this.allErrors || this.gen.if(j);
|
|
2373
2373
|
}
|
|
2374
|
-
setParams(
|
|
2375
|
-
D ? Object.assign(this.params,
|
|
2374
|
+
setParams(j, D) {
|
|
2375
|
+
D ? Object.assign(this.params, j) : this.params = j;
|
|
2376
2376
|
}
|
|
2377
|
-
block$data(
|
|
2377
|
+
block$data(j, D, L = u.nil) {
|
|
2378
2378
|
this.gen.block(() => {
|
|
2379
|
-
this.check$data(
|
|
2379
|
+
this.check$data(j, L), D();
|
|
2380
2380
|
});
|
|
2381
2381
|
}
|
|
2382
|
-
check$data(
|
|
2382
|
+
check$data(j = u.nil, D = u.nil) {
|
|
2383
2383
|
if (!this.$data)
|
|
2384
2384
|
return;
|
|
2385
2385
|
const { gen: L, schemaCode: G, schemaType: Q, def: ae } = this;
|
|
2386
|
-
L.if((0, u.or)((0, u._)`${G} === undefined`, D)),
|
|
2386
|
+
L.if((0, u.or)((0, u._)`${G} === undefined`, D)), j !== u.nil && L.assign(j, !0), (Q.length || ae.validateSchema) && (L.elseIf(this.invalid$data()), this.$dataError(), j !== u.nil && L.assign(j, !1)), L.else();
|
|
2387
2387
|
}
|
|
2388
2388
|
invalid$data() {
|
|
2389
|
-
const { gen:
|
|
2389
|
+
const { gen: j, schemaCode: D, schemaType: L, def: G, it: Q } = this;
|
|
2390
2390
|
return (0, u.or)(ae(), ge());
|
|
2391
2391
|
function ae() {
|
|
2392
2392
|
if (L.length) {
|
|
@@ -2399,35 +2399,35 @@ function Ye() {
|
|
|
2399
2399
|
}
|
|
2400
2400
|
function ge() {
|
|
2401
2401
|
if (G.validateSchema) {
|
|
2402
|
-
const fe =
|
|
2402
|
+
const fe = j.scopeValue("validate$data", { ref: G.validateSchema });
|
|
2403
2403
|
return (0, u._)`!${fe}(${D})`;
|
|
2404
2404
|
}
|
|
2405
2405
|
return u.nil;
|
|
2406
2406
|
}
|
|
2407
2407
|
}
|
|
2408
|
-
subschema(
|
|
2409
|
-
const L = (0, o.getSubschema)(this.it,
|
|
2410
|
-
(0, o.extendSubschemaData)(L, this.it,
|
|
2408
|
+
subschema(j, D) {
|
|
2409
|
+
const L = (0, o.getSubschema)(this.it, j);
|
|
2410
|
+
(0, o.extendSubschemaData)(L, this.it, j), (0, o.extendSubschemaMode)(L, j);
|
|
2411
2411
|
const G = { ...this.it, ...L, items: void 0, props: void 0 };
|
|
2412
2412
|
return f(G, D), G;
|
|
2413
2413
|
}
|
|
2414
|
-
mergeEvaluated(
|
|
2414
|
+
mergeEvaluated(j, D) {
|
|
2415
2415
|
const { it: L, gen: G } = this;
|
|
2416
|
-
L.opts.unevaluated && (L.props !== !0 &&
|
|
2416
|
+
L.opts.unevaluated && (L.props !== !0 && j.props !== void 0 && (L.props = m.mergeEvaluated.props(G, j.props, L.props, D)), L.items !== !0 && j.items !== void 0 && (L.items = m.mergeEvaluated.items(G, j.items, L.items, D)));
|
|
2417
2417
|
}
|
|
2418
|
-
mergeValidEvaluated(
|
|
2418
|
+
mergeValidEvaluated(j, D) {
|
|
2419
2419
|
const { it: L, gen: G } = this;
|
|
2420
2420
|
if (L.opts.unevaluated && (L.props !== !0 || L.items !== !0))
|
|
2421
|
-
return G.if(D, () => this.mergeEvaluated(
|
|
2421
|
+
return G.if(D, () => this.mergeEvaluated(j, u.Name)), !0;
|
|
2422
2422
|
}
|
|
2423
2423
|
}
|
|
2424
2424
|
we.KeywordCxt = T;
|
|
2425
|
-
function U(R,
|
|
2426
|
-
const G = new T(R, D,
|
|
2425
|
+
function U(R, j, D, L) {
|
|
2426
|
+
const G = new T(R, D, j);
|
|
2427
2427
|
"code" in D ? D.code(G, L) : G.$data && D.validate ? (0, a.funcKeywordCode)(G, D) : "macro" in D ? (0, a.macroKeywordCode)(G, D) : (D.compile || D.validate) && (0, a.funcKeywordCode)(G, D);
|
|
2428
2428
|
}
|
|
2429
2429
|
const z = /^\/(?:[^~]|~0|~1)*$/, H = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
2430
|
-
function J(R, { dataLevel:
|
|
2430
|
+
function J(R, { dataLevel: j, dataNames: D, dataPathArr: L }) {
|
|
2431
2431
|
let G, Q;
|
|
2432
2432
|
if (R === "")
|
|
2433
2433
|
return y.default.rootData;
|
|
@@ -2441,13 +2441,13 @@ function Ye() {
|
|
|
2441
2441
|
throw new Error(`Invalid JSON-pointer: ${R}`);
|
|
2442
2442
|
const ie = +pe[1];
|
|
2443
2443
|
if (G = pe[2], G === "#") {
|
|
2444
|
-
if (ie >=
|
|
2444
|
+
if (ie >= j)
|
|
2445
2445
|
throw new Error(fe("property/index", ie));
|
|
2446
|
-
return L[
|
|
2446
|
+
return L[j - ie];
|
|
2447
2447
|
}
|
|
2448
|
-
if (ie >
|
|
2448
|
+
if (ie > j)
|
|
2449
2449
|
throw new Error(fe("data", ie));
|
|
2450
|
-
if (Q = D[
|
|
2450
|
+
if (Q = D[j - ie], !G)
|
|
2451
2451
|
return Q;
|
|
2452
2452
|
}
|
|
2453
2453
|
let ae = Q;
|
|
@@ -2456,7 +2456,7 @@ function Ye() {
|
|
|
2456
2456
|
pe && (Q = (0, u._)`${Q}${(0, u.getProperty)((0, m.unescapeJsonPointer)(pe))}`, ae = (0, u._)`${ae} && ${Q}`);
|
|
2457
2457
|
return ae;
|
|
2458
2458
|
function fe(pe, ie) {
|
|
2459
|
-
return `Cannot access ${pe} ${ie} levels up, current level is ${
|
|
2459
|
+
return `Cannot access ${pe} ${ie} levels up, current level is ${j}`;
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
return we.getData = J, we;
|
|
@@ -2642,13 +2642,13 @@ function dr() {
|
|
|
2642
2642
|
}
|
|
2643
2643
|
return me;
|
|
2644
2644
|
}
|
|
2645
|
-
const
|
|
2646
|
-
$id:
|
|
2647
|
-
description:
|
|
2648
|
-
type:
|
|
2649
|
-
required:
|
|
2650
|
-
properties:
|
|
2651
|
-
additionalProperties:
|
|
2645
|
+
const ro = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", no = "Meta-schema for $data reference (JSON AnySchema extension proposal)", so = "object", oo = ["$data"], ao = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, io = !1, uo = {
|
|
2646
|
+
$id: ro,
|
|
2647
|
+
description: no,
|
|
2648
|
+
type: so,
|
|
2649
|
+
required: oo,
|
|
2650
|
+
properties: ao,
|
|
2651
|
+
additionalProperties: io
|
|
2652
2652
|
};
|
|
2653
2653
|
var et = {}, Ke = { exports: {} }, Qt, Ur;
|
|
2654
2654
|
function ps() {
|
|
@@ -2816,7 +2816,7 @@ function ps() {
|
|
|
2816
2816
|
}, Qt;
|
|
2817
2817
|
}
|
|
2818
2818
|
var Xt, Kr;
|
|
2819
|
-
function
|
|
2819
|
+
function co() {
|
|
2820
2820
|
if (Kr) return Xt;
|
|
2821
2821
|
Kr = 1;
|
|
2822
2822
|
const { isUUID: e } = ps(), t = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu, r = (
|
|
@@ -2962,10 +2962,10 @@ function uo() {
|
|
|
2962
2962
|
}, Xt;
|
|
2963
2963
|
}
|
|
2964
2964
|
var Br;
|
|
2965
|
-
function
|
|
2965
|
+
function lo() {
|
|
2966
2966
|
if (Br) return Ke.exports;
|
|
2967
2967
|
Br = 1;
|
|
2968
|
-
const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: r, normalizeComponentEncoding: s, isIPv4: l, nonSimpleDomain: a } = ps(), { SCHEMES: o, getSchemeHandler: u } =
|
|
2968
|
+
const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: r, normalizeComponentEncoding: s, isIPv4: l, nonSimpleDomain: a } = ps(), { SCHEMES: o, getSchemeHandler: u } = co();
|
|
2969
2969
|
function y(h, c) {
|
|
2970
2970
|
return typeof h == "string" ? h = /** @type {T} */
|
|
2971
2971
|
b(v(h, c), c) : typeof h == "object" && (h = /** @type {T} */
|
|
@@ -3053,14 +3053,14 @@ function co() {
|
|
|
3053
3053
|
return Ke.exports = E, Ke.exports.default = E, Ke.exports.fastUri = E, Ke.exports;
|
|
3054
3054
|
}
|
|
3055
3055
|
var Hr;
|
|
3056
|
-
function
|
|
3056
|
+
function fo() {
|
|
3057
3057
|
if (Hr) return et;
|
|
3058
3058
|
Hr = 1, Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3059
|
-
const e =
|
|
3059
|
+
const e = lo();
|
|
3060
3060
|
return e.code = 'require("ajv/dist/runtime/uri").default', et.default = e, et;
|
|
3061
3061
|
}
|
|
3062
3062
|
var Gr;
|
|
3063
|
-
function
|
|
3063
|
+
function po() {
|
|
3064
3064
|
return Gr || (Gr = 1, (function(e) {
|
|
3065
3065
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
|
|
3066
3066
|
var t = /* @__PURE__ */ Ye();
|
|
@@ -3081,7 +3081,7 @@ function fo() {
|
|
|
3081
3081
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
3082
3082
|
return r.CodeGen;
|
|
3083
3083
|
} });
|
|
3084
|
-
const s = /* @__PURE__ */ cr(), l = /* @__PURE__ */ Ft(), a = /* @__PURE__ */ ds(), o = /* @__PURE__ */ dr(), u = /* @__PURE__ */ Y(), y = /* @__PURE__ */ Ct(), g = /* @__PURE__ */ Vt(), m = /* @__PURE__ */ x(), P =
|
|
3084
|
+
const s = /* @__PURE__ */ cr(), l = /* @__PURE__ */ Ft(), a = /* @__PURE__ */ ds(), o = /* @__PURE__ */ dr(), u = /* @__PURE__ */ Y(), y = /* @__PURE__ */ Ct(), g = /* @__PURE__ */ Vt(), m = /* @__PURE__ */ x(), P = uo, b = /* @__PURE__ */ fo(), d = (V, I) => new RegExp(V, I);
|
|
3085
3085
|
d.code = "new RegExp";
|
|
3086
3086
|
const v = ["removeAdditional", "useDefaults", "coerceTypes"], E = /* @__PURE__ */ new Set([
|
|
3087
3087
|
"validate",
|
|
@@ -3119,13 +3119,13 @@ function fo() {
|
|
|
3119
3119
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
3120
3120
|
}, n = 200;
|
|
3121
3121
|
function f(V) {
|
|
3122
|
-
var
|
|
3123
|
-
const Fe = V.strict, Kt = (
|
|
3122
|
+
var I, k, O, p, S, T, U, z, H, J, R, j, D, L, G, Q, ae, ge, fe, pe, ie, Me, ye, Lt, Ut;
|
|
3123
|
+
const Fe = V.strict, Kt = (I = V.code) === null || I === void 0 ? void 0 : I.optimize, hr = Kt === !0 || Kt === void 0 ? 1 : Kt || 0, mr = (O = (k = V.code) === null || k === void 0 ? void 0 : k.regExp) !== null && O !== void 0 ? O : d, js = (p = V.uriResolver) !== null && p !== void 0 ? p : b.default;
|
|
3124
3124
|
return {
|
|
3125
3125
|
strictSchema: (T = (S = V.strictSchema) !== null && S !== void 0 ? S : Fe) !== null && T !== void 0 ? T : !0,
|
|
3126
3126
|
strictNumbers: (z = (U = V.strictNumbers) !== null && U !== void 0 ? U : Fe) !== null && z !== void 0 ? z : !0,
|
|
3127
3127
|
strictTypes: (J = (H = V.strictTypes) !== null && H !== void 0 ? H : Fe) !== null && J !== void 0 ? J : "log",
|
|
3128
|
-
strictTuples: (
|
|
3128
|
+
strictTuples: (j = (R = V.strictTuples) !== null && R !== void 0 ? R : Fe) !== null && j !== void 0 ? j : "log",
|
|
3129
3129
|
strictRequired: (L = (D = V.strictRequired) !== null && D !== void 0 ? D : Fe) !== null && L !== void 0 ? L : !1,
|
|
3130
3130
|
code: V.code ? { ...V.code, optimize: hr, regExp: mr } : { optimize: hr, regExp: mr },
|
|
3131
3131
|
loopRequired: (G = V.loopRequired) !== null && G !== void 0 ? G : n,
|
|
@@ -3135,56 +3135,56 @@ function fo() {
|
|
|
3135
3135
|
inlineRefs: (fe = V.inlineRefs) !== null && fe !== void 0 ? fe : !0,
|
|
3136
3136
|
schemaId: (pe = V.schemaId) !== null && pe !== void 0 ? pe : "$id",
|
|
3137
3137
|
addUsedSchema: (ie = V.addUsedSchema) !== null && ie !== void 0 ? ie : !0,
|
|
3138
|
-
validateSchema: (
|
|
3138
|
+
validateSchema: (Me = V.validateSchema) !== null && Me !== void 0 ? Me : !0,
|
|
3139
3139
|
validateFormats: (ye = V.validateFormats) !== null && ye !== void 0 ? ye : !0,
|
|
3140
3140
|
unicodeRegExp: (Lt = V.unicodeRegExp) !== null && Lt !== void 0 ? Lt : !0,
|
|
3141
3141
|
int32range: (Ut = V.int32range) !== null && Ut !== void 0 ? Ut : !0,
|
|
3142
|
-
uriResolver:
|
|
3142
|
+
uriResolver: js
|
|
3143
3143
|
};
|
|
3144
3144
|
}
|
|
3145
3145
|
class w {
|
|
3146
|
-
constructor(
|
|
3147
|
-
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(),
|
|
3146
|
+
constructor(I = {}) {
|
|
3147
|
+
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), I = this.opts = { ...I, ...f(I) };
|
|
3148
3148
|
const { es5: k, lines: O } = this.opts.code;
|
|
3149
|
-
this.scope = new u.ValueScope({ scope: {}, prefixes: E, es5: k, lines: O }), this.logger = F(
|
|
3150
|
-
const p =
|
|
3151
|
-
|
|
3149
|
+
this.scope = new u.ValueScope({ scope: {}, prefixes: E, es5: k, lines: O }), this.logger = F(I.logger);
|
|
3150
|
+
const p = I.validateFormats;
|
|
3151
|
+
I.validateFormats = !1, this.RULES = (0, a.getRules)(), i.call(this, h, I, "NOT SUPPORTED"), i.call(this, c, I, "DEPRECATED", "warn"), this._metaOpts = C.call(this), I.formats && q.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), I.keywords && M.call(this, I.keywords), typeof I.meta == "object" && this.addMetaSchema(I.meta), N.call(this), I.validateFormats = p;
|
|
3152
3152
|
}
|
|
3153
3153
|
_addVocabularies() {
|
|
3154
3154
|
this.addKeyword("$async");
|
|
3155
3155
|
}
|
|
3156
3156
|
_addDefaultMetaSchema() {
|
|
3157
|
-
const { $data:
|
|
3157
|
+
const { $data: I, meta: k, schemaId: O } = this.opts;
|
|
3158
3158
|
let p = P;
|
|
3159
|
-
O === "id" && (p = { ...P }, p.id = p.$id, delete p.$id), k &&
|
|
3159
|
+
O === "id" && (p = { ...P }, p.id = p.$id, delete p.$id), k && I && this.addMetaSchema(p, p[O], !1);
|
|
3160
3160
|
}
|
|
3161
3161
|
defaultMeta() {
|
|
3162
|
-
const { meta:
|
|
3163
|
-
return this.opts.defaultMeta = typeof
|
|
3162
|
+
const { meta: I, schemaId: k } = this.opts;
|
|
3163
|
+
return this.opts.defaultMeta = typeof I == "object" ? I[k] || I : void 0;
|
|
3164
3164
|
}
|
|
3165
|
-
validate(
|
|
3165
|
+
validate(I, k) {
|
|
3166
3166
|
let O;
|
|
3167
|
-
if (typeof
|
|
3168
|
-
if (O = this.getSchema(
|
|
3169
|
-
throw new Error(`no schema with key or ref "${
|
|
3167
|
+
if (typeof I == "string") {
|
|
3168
|
+
if (O = this.getSchema(I), !O)
|
|
3169
|
+
throw new Error(`no schema with key or ref "${I}"`);
|
|
3170
3170
|
} else
|
|
3171
|
-
O = this.compile(
|
|
3171
|
+
O = this.compile(I);
|
|
3172
3172
|
const p = O(k);
|
|
3173
3173
|
return "$async" in O || (this.errors = O.errors), p;
|
|
3174
3174
|
}
|
|
3175
|
-
compile(
|
|
3176
|
-
const O = this._addSchema(
|
|
3175
|
+
compile(I, k) {
|
|
3176
|
+
const O = this._addSchema(I, k);
|
|
3177
3177
|
return O.validate || this._compileSchemaEnv(O);
|
|
3178
3178
|
}
|
|
3179
|
-
compileAsync(
|
|
3179
|
+
compileAsync(I, k) {
|
|
3180
3180
|
if (typeof this.opts.loadSchema != "function")
|
|
3181
3181
|
throw new Error("options.loadSchema should be a function");
|
|
3182
3182
|
const { loadSchema: O } = this.opts;
|
|
3183
|
-
return p.call(this,
|
|
3183
|
+
return p.call(this, I, k);
|
|
3184
3184
|
async function p(J, R) {
|
|
3185
3185
|
await S.call(this, J.$schema);
|
|
3186
|
-
const
|
|
3187
|
-
return
|
|
3186
|
+
const j = this._addSchema(J, R);
|
|
3187
|
+
return j.validate || T.call(this, j);
|
|
3188
3188
|
}
|
|
3189
3189
|
async function S(J) {
|
|
3190
3190
|
J && !this.getSchema(J) && await p.call(this, { $ref: J }, !0);
|
|
@@ -3218,35 +3218,35 @@ function fo() {
|
|
|
3218
3218
|
}
|
|
3219
3219
|
}
|
|
3220
3220
|
// Adds schema to the instance
|
|
3221
|
-
addSchema(
|
|
3222
|
-
if (Array.isArray(
|
|
3223
|
-
for (const T of
|
|
3221
|
+
addSchema(I, k, O, p = this.opts.validateSchema) {
|
|
3222
|
+
if (Array.isArray(I)) {
|
|
3223
|
+
for (const T of I)
|
|
3224
3224
|
this.addSchema(T, void 0, O, p);
|
|
3225
3225
|
return this;
|
|
3226
3226
|
}
|
|
3227
3227
|
let S;
|
|
3228
|
-
if (typeof
|
|
3228
|
+
if (typeof I == "object") {
|
|
3229
3229
|
const { schemaId: T } = this.opts;
|
|
3230
|
-
if (S =
|
|
3230
|
+
if (S = I[T], S !== void 0 && typeof S != "string")
|
|
3231
3231
|
throw new Error(`schema ${T} must be string`);
|
|
3232
3232
|
}
|
|
3233
|
-
return k = (0, y.normalizeId)(k || S), this._checkUnique(k), this.schemas[k] = this._addSchema(
|
|
3233
|
+
return k = (0, y.normalizeId)(k || S), this._checkUnique(k), this.schemas[k] = this._addSchema(I, O, k, p, !0), this;
|
|
3234
3234
|
}
|
|
3235
3235
|
// Add schema that will be used to validate other schemas
|
|
3236
3236
|
// options in META_IGNORE_OPTIONS are alway set to false
|
|
3237
|
-
addMetaSchema(
|
|
3238
|
-
return this.addSchema(
|
|
3237
|
+
addMetaSchema(I, k, O = this.opts.validateSchema) {
|
|
3238
|
+
return this.addSchema(I, k, !0, O), this;
|
|
3239
3239
|
}
|
|
3240
3240
|
// Validate schema against its meta-schema
|
|
3241
|
-
validateSchema(
|
|
3242
|
-
if (typeof
|
|
3241
|
+
validateSchema(I, k) {
|
|
3242
|
+
if (typeof I == "boolean")
|
|
3243
3243
|
return !0;
|
|
3244
3244
|
let O;
|
|
3245
|
-
if (O =
|
|
3245
|
+
if (O = I.$schema, O !== void 0 && typeof O != "string")
|
|
3246
3246
|
throw new Error("$schema must be a string");
|
|
3247
3247
|
if (O = O || this.opts.defaultMeta || this.defaultMeta(), !O)
|
|
3248
3248
|
return this.logger.warn("meta-schema not available"), this.errors = null, !0;
|
|
3249
|
-
const p = this.validate(O,
|
|
3249
|
+
const p = this.validate(O, I);
|
|
3250
3250
|
if (!p && k) {
|
|
3251
3251
|
const S = "schema is invalid: " + this.errorsText();
|
|
3252
3252
|
if (this.opts.validateSchema === "log")
|
|
@@ -3258,15 +3258,15 @@ function fo() {
|
|
|
3258
3258
|
}
|
|
3259
3259
|
// Get compiled schema by `key` or `ref`.
|
|
3260
3260
|
// (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
|
|
3261
|
-
getSchema(
|
|
3261
|
+
getSchema(I) {
|
|
3262
3262
|
let k;
|
|
3263
|
-
for (; typeof (k = _.call(this,
|
|
3264
|
-
|
|
3263
|
+
for (; typeof (k = _.call(this, I)) == "string"; )
|
|
3264
|
+
I = k;
|
|
3265
3265
|
if (k === void 0) {
|
|
3266
3266
|
const { schemaId: O } = this.opts, p = new o.SchemaEnv({ schema: {}, schemaId: O });
|
|
3267
|
-
if (k = o.resolveSchema.call(this, p,
|
|
3267
|
+
if (k = o.resolveSchema.call(this, p, I), !k)
|
|
3268
3268
|
return;
|
|
3269
|
-
this.refs[
|
|
3269
|
+
this.refs[I] = k;
|
|
3270
3270
|
}
|
|
3271
3271
|
return k.validate || this._compileSchemaEnv(k);
|
|
3272
3272
|
}
|
|
@@ -3274,20 +3274,20 @@ function fo() {
|
|
|
3274
3274
|
// If no parameter is passed all schemas but meta-schemas are removed.
|
|
3275
3275
|
// If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
|
|
3276
3276
|
// Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
|
3277
|
-
removeSchema(
|
|
3278
|
-
if (
|
|
3279
|
-
return this._removeAllSchemas(this.schemas,
|
|
3280
|
-
switch (typeof
|
|
3277
|
+
removeSchema(I) {
|
|
3278
|
+
if (I instanceof RegExp)
|
|
3279
|
+
return this._removeAllSchemas(this.schemas, I), this._removeAllSchemas(this.refs, I), this;
|
|
3280
|
+
switch (typeof I) {
|
|
3281
3281
|
case "undefined":
|
|
3282
3282
|
return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
|
|
3283
3283
|
case "string": {
|
|
3284
|
-
const k = _.call(this,
|
|
3285
|
-
return typeof k == "object" && this._cache.delete(k.schema), delete this.schemas[
|
|
3284
|
+
const k = _.call(this, I);
|
|
3285
|
+
return typeof k == "object" && this._cache.delete(k.schema), delete this.schemas[I], delete this.refs[I], this;
|
|
3286
3286
|
}
|
|
3287
3287
|
case "object": {
|
|
3288
|
-
const k =
|
|
3288
|
+
const k = I;
|
|
3289
3289
|
this._cache.delete(k);
|
|
3290
|
-
let O =
|
|
3290
|
+
let O = I[this.opts.schemaId];
|
|
3291
3291
|
return O && (O = (0, y.normalizeId)(O), delete this.schemas[O], delete this.refs[O]), this;
|
|
3292
3292
|
}
|
|
3293
3293
|
default:
|
|
@@ -3295,17 +3295,17 @@ function fo() {
|
|
|
3295
3295
|
}
|
|
3296
3296
|
}
|
|
3297
3297
|
// add "vocabulary" - a collection of keywords
|
|
3298
|
-
addVocabulary(
|
|
3299
|
-
for (const k of
|
|
3298
|
+
addVocabulary(I) {
|
|
3299
|
+
for (const k of I)
|
|
3300
3300
|
this.addKeyword(k);
|
|
3301
3301
|
return this;
|
|
3302
3302
|
}
|
|
3303
|
-
addKeyword(
|
|
3303
|
+
addKeyword(I, k) {
|
|
3304
3304
|
let O;
|
|
3305
|
-
if (typeof
|
|
3306
|
-
O =
|
|
3307
|
-
else if (typeof
|
|
3308
|
-
if (k =
|
|
3305
|
+
if (typeof I == "string")
|
|
3306
|
+
O = I, typeof k == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), k.keyword = O);
|
|
3307
|
+
else if (typeof I == "object" && k === void 0) {
|
|
3308
|
+
if (k = I, O = k.keyword, Array.isArray(O) && !O.length)
|
|
3309
3309
|
throw new Error("addKeywords: keyword must be string or non-empty array");
|
|
3310
3310
|
} else
|
|
3311
3311
|
throw new Error("invalid addKeywords parameters");
|
|
@@ -3319,33 +3319,33 @@ function fo() {
|
|
|
3319
3319
|
};
|
|
3320
3320
|
return (0, m.eachItem)(O, p.type.length === 0 ? (S) => X.call(this, S, p) : (S) => p.type.forEach((T) => X.call(this, S, p, T))), this;
|
|
3321
3321
|
}
|
|
3322
|
-
getKeyword(
|
|
3323
|
-
const k = this.RULES.all[
|
|
3322
|
+
getKeyword(I) {
|
|
3323
|
+
const k = this.RULES.all[I];
|
|
3324
3324
|
return typeof k == "object" ? k.definition : !!k;
|
|
3325
3325
|
}
|
|
3326
3326
|
// Remove keyword
|
|
3327
|
-
removeKeyword(
|
|
3327
|
+
removeKeyword(I) {
|
|
3328
3328
|
const { RULES: k } = this;
|
|
3329
|
-
delete k.keywords[
|
|
3329
|
+
delete k.keywords[I], delete k.all[I];
|
|
3330
3330
|
for (const O of k.rules) {
|
|
3331
|
-
const p = O.rules.findIndex((S) => S.keyword ===
|
|
3331
|
+
const p = O.rules.findIndex((S) => S.keyword === I);
|
|
3332
3332
|
p >= 0 && O.rules.splice(p, 1);
|
|
3333
3333
|
}
|
|
3334
3334
|
return this;
|
|
3335
3335
|
}
|
|
3336
3336
|
// Add format
|
|
3337
|
-
addFormat(
|
|
3338
|
-
return typeof k == "string" && (k = new RegExp(k)), this.formats[
|
|
3337
|
+
addFormat(I, k) {
|
|
3338
|
+
return typeof k == "string" && (k = new RegExp(k)), this.formats[I] = k, this;
|
|
3339
3339
|
}
|
|
3340
|
-
errorsText(
|
|
3341
|
-
return !
|
|
3340
|
+
errorsText(I = this.errors, { separator: k = ", ", dataVar: O = "data" } = {}) {
|
|
3341
|
+
return !I || I.length === 0 ? "No errors" : I.map((p) => `${O}${p.instancePath} ${p.message}`).reduce((p, S) => p + k + S);
|
|
3342
3342
|
}
|
|
3343
|
-
$dataMetaSchema(
|
|
3343
|
+
$dataMetaSchema(I, k) {
|
|
3344
3344
|
const O = this.RULES.all;
|
|
3345
|
-
|
|
3345
|
+
I = JSON.parse(JSON.stringify(I));
|
|
3346
3346
|
for (const p of k) {
|
|
3347
3347
|
const S = p.split("/").slice(1);
|
|
3348
|
-
let T =
|
|
3348
|
+
let T = I;
|
|
3349
3349
|
for (const U of S)
|
|
3350
3350
|
T = T[U];
|
|
3351
3351
|
for (const U in O) {
|
|
@@ -3356,56 +3356,56 @@ function fo() {
|
|
|
3356
3356
|
H && J && (T[U] = de(J));
|
|
3357
3357
|
}
|
|
3358
3358
|
}
|
|
3359
|
-
return
|
|
3359
|
+
return I;
|
|
3360
3360
|
}
|
|
3361
|
-
_removeAllSchemas(
|
|
3362
|
-
for (const O in
|
|
3363
|
-
const p =
|
|
3364
|
-
(!k || k.test(O)) && (typeof p == "string" ? delete
|
|
3361
|
+
_removeAllSchemas(I, k) {
|
|
3362
|
+
for (const O in I) {
|
|
3363
|
+
const p = I[O];
|
|
3364
|
+
(!k || k.test(O)) && (typeof p == "string" ? delete I[O] : p && !p.meta && (this._cache.delete(p.schema), delete I[O]));
|
|
3365
3365
|
}
|
|
3366
3366
|
}
|
|
3367
|
-
_addSchema(
|
|
3367
|
+
_addSchema(I, k, O, p = this.opts.validateSchema, S = this.opts.addUsedSchema) {
|
|
3368
3368
|
let T;
|
|
3369
3369
|
const { schemaId: U } = this.opts;
|
|
3370
|
-
if (typeof
|
|
3371
|
-
T =
|
|
3370
|
+
if (typeof I == "object")
|
|
3371
|
+
T = I[U];
|
|
3372
3372
|
else {
|
|
3373
3373
|
if (this.opts.jtd)
|
|
3374
3374
|
throw new Error("schema must be object");
|
|
3375
|
-
if (typeof
|
|
3375
|
+
if (typeof I != "boolean")
|
|
3376
3376
|
throw new Error("schema must be object or boolean");
|
|
3377
3377
|
}
|
|
3378
|
-
let z = this._cache.get(
|
|
3378
|
+
let z = this._cache.get(I);
|
|
3379
3379
|
if (z !== void 0)
|
|
3380
3380
|
return z;
|
|
3381
3381
|
O = (0, y.normalizeId)(T || O);
|
|
3382
|
-
const H = y.getSchemaRefs.call(this,
|
|
3383
|
-
return z = new o.SchemaEnv({ schema:
|
|
3382
|
+
const H = y.getSchemaRefs.call(this, I, O);
|
|
3383
|
+
return z = new o.SchemaEnv({ schema: I, schemaId: U, meta: k, baseId: O, localRefs: H }), this._cache.set(z.schema, z), S && !O.startsWith("#") && (O && this._checkUnique(O), this.refs[O] = z), p && this.validateSchema(I, !0), z;
|
|
3384
3384
|
}
|
|
3385
|
-
_checkUnique(
|
|
3386
|
-
if (this.schemas[
|
|
3387
|
-
throw new Error(`schema with key or id "${
|
|
3385
|
+
_checkUnique(I) {
|
|
3386
|
+
if (this.schemas[I] || this.refs[I])
|
|
3387
|
+
throw new Error(`schema with key or id "${I}" already exists`);
|
|
3388
3388
|
}
|
|
3389
|
-
_compileSchemaEnv(
|
|
3390
|
-
if (
|
|
3389
|
+
_compileSchemaEnv(I) {
|
|
3390
|
+
if (I.meta ? this._compileMetaSchema(I) : o.compileSchema.call(this, I), !I.validate)
|
|
3391
3391
|
throw new Error("ajv implementation error");
|
|
3392
|
-
return
|
|
3392
|
+
return I.validate;
|
|
3393
3393
|
}
|
|
3394
|
-
_compileMetaSchema(
|
|
3394
|
+
_compileMetaSchema(I) {
|
|
3395
3395
|
const k = this.opts;
|
|
3396
3396
|
this.opts = this._metaOpts;
|
|
3397
3397
|
try {
|
|
3398
|
-
o.compileSchema.call(this,
|
|
3398
|
+
o.compileSchema.call(this, I);
|
|
3399
3399
|
} finally {
|
|
3400
3400
|
this.opts = k;
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
3403
|
}
|
|
3404
3404
|
w.ValidationError = s.default, w.MissingRefError = l.default, e.default = w;
|
|
3405
|
-
function i(V,
|
|
3405
|
+
function i(V, I, k, O = "error") {
|
|
3406
3406
|
for (const p in V) {
|
|
3407
3407
|
const S = p;
|
|
3408
|
-
S in
|
|
3408
|
+
S in I && this.logger[O](`${k}: option ${p}. ${V[S]}`);
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
3411
|
function _(V) {
|
|
@@ -3417,13 +3417,13 @@ function fo() {
|
|
|
3417
3417
|
if (Array.isArray(V))
|
|
3418
3418
|
this.addSchema(V);
|
|
3419
3419
|
else
|
|
3420
|
-
for (const
|
|
3421
|
-
this.addSchema(V[
|
|
3420
|
+
for (const I in V)
|
|
3421
|
+
this.addSchema(V[I], I);
|
|
3422
3422
|
}
|
|
3423
3423
|
function q() {
|
|
3424
3424
|
for (const V in this.opts.formats) {
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3425
|
+
const I = this.opts.formats[V];
|
|
3426
|
+
I && this.addFormat(V, I);
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
3429
|
function M(V) {
|
|
@@ -3432,15 +3432,15 @@ function fo() {
|
|
|
3432
3432
|
return;
|
|
3433
3433
|
}
|
|
3434
3434
|
this.logger.warn("keywords option as map is deprecated, pass array");
|
|
3435
|
-
for (const
|
|
3436
|
-
const k = V[
|
|
3437
|
-
k.keyword || (k.keyword =
|
|
3435
|
+
for (const I in V) {
|
|
3436
|
+
const k = V[I];
|
|
3437
|
+
k.keyword || (k.keyword = I), this.addKeyword(k);
|
|
3438
3438
|
}
|
|
3439
3439
|
}
|
|
3440
3440
|
function C() {
|
|
3441
3441
|
const V = { ...this.opts };
|
|
3442
|
-
for (const
|
|
3443
|
-
delete V[
|
|
3442
|
+
for (const I of v)
|
|
3443
|
+
delete V[I];
|
|
3444
3444
|
return V;
|
|
3445
3445
|
}
|
|
3446
3446
|
const A = { log() {
|
|
@@ -3457,42 +3457,42 @@ function fo() {
|
|
|
3457
3457
|
throw new Error("logger must implement log, warn and error methods");
|
|
3458
3458
|
}
|
|
3459
3459
|
const K = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
3460
|
-
function B(V,
|
|
3460
|
+
function B(V, I) {
|
|
3461
3461
|
const { RULES: k } = this;
|
|
3462
3462
|
if ((0, m.eachItem)(V, (O) => {
|
|
3463
3463
|
if (k.keywords[O])
|
|
3464
3464
|
throw new Error(`Keyword ${O} is already defined`);
|
|
3465
3465
|
if (!K.test(O))
|
|
3466
3466
|
throw new Error(`Keyword ${O} has invalid name`);
|
|
3467
|
-
}), !!
|
|
3467
|
+
}), !!I && I.$data && !("code" in I || "validate" in I))
|
|
3468
3468
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
3469
3469
|
}
|
|
3470
|
-
function X(V,
|
|
3470
|
+
function X(V, I, k) {
|
|
3471
3471
|
var O;
|
|
3472
|
-
const p =
|
|
3472
|
+
const p = I == null ? void 0 : I.post;
|
|
3473
3473
|
if (k && p)
|
|
3474
3474
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
3475
3475
|
const { RULES: S } = this;
|
|
3476
3476
|
let T = p ? S.post : S.rules.find(({ type: z }) => z === k);
|
|
3477
|
-
if (T || (T = { type: k, rules: [] }, S.rules.push(T)), S.keywords[V] = !0, !
|
|
3477
|
+
if (T || (T = { type: k, rules: [] }, S.rules.push(T)), S.keywords[V] = !0, !I)
|
|
3478
3478
|
return;
|
|
3479
3479
|
const U = {
|
|
3480
3480
|
keyword: V,
|
|
3481
3481
|
definition: {
|
|
3482
|
-
...
|
|
3483
|
-
type: (0, g.getJSONTypes)(
|
|
3484
|
-
schemaType: (0, g.getJSONTypes)(
|
|
3482
|
+
...I,
|
|
3483
|
+
type: (0, g.getJSONTypes)(I.type),
|
|
3484
|
+
schemaType: (0, g.getJSONTypes)(I.schemaType)
|
|
3485
3485
|
}
|
|
3486
3486
|
};
|
|
3487
|
-
|
|
3487
|
+
I.before ? se.call(this, T, U, I.before) : T.rules.push(U), S.all[V] = U, (O = I.implements) === null || O === void 0 || O.forEach((z) => this.addKeyword(z));
|
|
3488
3488
|
}
|
|
3489
|
-
function se(V,
|
|
3489
|
+
function se(V, I, k) {
|
|
3490
3490
|
const O = V.rules.findIndex((p) => p.keyword === k);
|
|
3491
|
-
O >= 0 ? V.rules.splice(O, 0,
|
|
3491
|
+
O >= 0 ? V.rules.splice(O, 0, I) : (V.rules.push(I), this.logger.warn(`rule ${k} is not defined`));
|
|
3492
3492
|
}
|
|
3493
3493
|
function oe(V) {
|
|
3494
|
-
let { metaSchema:
|
|
3495
|
-
|
|
3494
|
+
let { metaSchema: I } = V;
|
|
3495
|
+
I !== void 0 && (V.$data && this.opts.$data && (I = de(I)), V.validateSchema = this.compile(I, !0));
|
|
3496
3496
|
}
|
|
3497
3497
|
const te = {
|
|
3498
3498
|
$ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
|
|
@@ -3503,7 +3503,7 @@ function fo() {
|
|
|
3503
3503
|
})(Bt)), Bt;
|
|
3504
3504
|
}
|
|
3505
3505
|
var tt = {}, rt = {}, nt = {}, Jr;
|
|
3506
|
-
function
|
|
3506
|
+
function ho() {
|
|
3507
3507
|
if (Jr) return nt;
|
|
3508
3508
|
Jr = 1, Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
3509
3509
|
const e = {
|
|
@@ -3514,11 +3514,11 @@ function po() {
|
|
|
3514
3514
|
};
|
|
3515
3515
|
return nt.default = e, nt;
|
|
3516
3516
|
}
|
|
3517
|
-
var
|
|
3518
|
-
function
|
|
3519
|
-
if (Wr) return
|
|
3520
|
-
Wr = 1, Object.defineProperty(
|
|
3521
|
-
const e = /* @__PURE__ */ Ft(), t = /* @__PURE__ */
|
|
3517
|
+
var je = {}, Wr;
|
|
3518
|
+
function mo() {
|
|
3519
|
+
if (Wr) return je;
|
|
3520
|
+
Wr = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.callRef = je.getValidate = void 0;
|
|
3521
|
+
const e = /* @__PURE__ */ Ft(), t = /* @__PURE__ */ $e(), r = /* @__PURE__ */ Y(), s = /* @__PURE__ */ Ne(), l = /* @__PURE__ */ dr(), a = /* @__PURE__ */ x(), o = {
|
|
3522
3522
|
keyword: "$ref",
|
|
3523
3523
|
schemaType: "string",
|
|
3524
3524
|
code(g) {
|
|
@@ -3557,7 +3557,7 @@ function ho() {
|
|
|
3557
3557
|
const { gen: P } = g;
|
|
3558
3558
|
return m.validate ? P.scopeValue("validate", { ref: m.validate }) : (0, r._)`${P.scopeValue("wrapper", { ref: m })}.validate`;
|
|
3559
3559
|
}
|
|
3560
|
-
|
|
3560
|
+
je.getValidate = u;
|
|
3561
3561
|
function y(g, m, P, b) {
|
|
3562
3562
|
const { gen: d, it: v } = g, { allErrors: E, schemaEnv: h, opts: c } = v, n = c.passContext ? s.default.this : r.nil;
|
|
3563
3563
|
b ? f() : w();
|
|
@@ -3599,13 +3599,13 @@ function ho() {
|
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
3601
|
}
|
|
3602
|
-
return
|
|
3602
|
+
return je.callRef = y, je.default = o, je;
|
|
3603
3603
|
}
|
|
3604
3604
|
var Yr;
|
|
3605
|
-
function
|
|
3605
|
+
function yo() {
|
|
3606
3606
|
if (Yr) return rt;
|
|
3607
3607
|
Yr = 1, Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
3608
|
-
const e = /* @__PURE__ */
|
|
3608
|
+
const e = /* @__PURE__ */ ho(), t = /* @__PURE__ */ mo(), r = [
|
|
3609
3609
|
"$schema",
|
|
3610
3610
|
"$id",
|
|
3611
3611
|
"$defs",
|
|
@@ -3618,7 +3618,7 @@ function mo() {
|
|
|
3618
3618
|
return rt.default = r, rt;
|
|
3619
3619
|
}
|
|
3620
3620
|
var st = {}, ot = {}, Zr;
|
|
3621
|
-
function
|
|
3621
|
+
function go() {
|
|
3622
3622
|
if (Zr) return ot;
|
|
3623
3623
|
Zr = 1, Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
3624
3624
|
const e = /* @__PURE__ */ Y(), t = e.operators, r = {
|
|
@@ -3643,7 +3643,7 @@ function yo() {
|
|
|
3643
3643
|
return ot.default = l, ot;
|
|
3644
3644
|
}
|
|
3645
3645
|
var at = {}, Qr;
|
|
3646
|
-
function
|
|
3646
|
+
function vo() {
|
|
3647
3647
|
if (Qr) return at;
|
|
3648
3648
|
Qr = 1, Object.defineProperty(at, "__esModule", { value: !0 });
|
|
3649
3649
|
const e = /* @__PURE__ */ Y(), r = {
|
|
@@ -3663,7 +3663,7 @@ function go() {
|
|
|
3663
3663
|
return at.default = r, at;
|
|
3664
3664
|
}
|
|
3665
3665
|
var it = {}, ut = {}, Xr;
|
|
3666
|
-
function
|
|
3666
|
+
function _o() {
|
|
3667
3667
|
if (Xr) return ut;
|
|
3668
3668
|
Xr = 1, Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
3669
3669
|
function e(t) {
|
|
@@ -3676,10 +3676,10 @@ function vo() {
|
|
|
3676
3676
|
return ut.default = e, e.code = 'require("ajv/dist/runtime/ucs2length").default', ut;
|
|
3677
3677
|
}
|
|
3678
3678
|
var xr;
|
|
3679
|
-
function
|
|
3679
|
+
function $o() {
|
|
3680
3680
|
if (xr) return it;
|
|
3681
3681
|
xr = 1, Object.defineProperty(it, "__esModule", { value: !0 });
|
|
3682
|
-
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */
|
|
3682
|
+
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ _o(), l = {
|
|
3683
3683
|
keyword: ["maxLength", "minLength"],
|
|
3684
3684
|
type: "string",
|
|
3685
3685
|
schemaType: "number",
|
|
@@ -3699,10 +3699,10 @@ function _o() {
|
|
|
3699
3699
|
return it.default = l, it;
|
|
3700
3700
|
}
|
|
3701
3701
|
var ct = {}, en;
|
|
3702
|
-
function
|
|
3702
|
+
function bo() {
|
|
3703
3703
|
if (en) return ct;
|
|
3704
3704
|
en = 1, Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
3705
|
-
const e = /* @__PURE__ */
|
|
3705
|
+
const e = /* @__PURE__ */ $e(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ Y(), l = {
|
|
3706
3706
|
keyword: "pattern",
|
|
3707
3707
|
type: "string",
|
|
3708
3708
|
schemaType: "string",
|
|
@@ -3725,7 +3725,7 @@ function $o() {
|
|
|
3725
3725
|
return ct.default = l, ct;
|
|
3726
3726
|
}
|
|
3727
3727
|
var dt = {}, tn;
|
|
3728
|
-
function
|
|
3728
|
+
function wo() {
|
|
3729
3729
|
if (tn) return dt;
|
|
3730
3730
|
tn = 1, Object.defineProperty(dt, "__esModule", { value: !0 });
|
|
3731
3731
|
const e = /* @__PURE__ */ Y(), r = {
|
|
@@ -3748,10 +3748,10 @@ function bo() {
|
|
|
3748
3748
|
return dt.default = r, dt;
|
|
3749
3749
|
}
|
|
3750
3750
|
var lt = {}, rn;
|
|
3751
|
-
function
|
|
3751
|
+
function Eo() {
|
|
3752
3752
|
if (rn) return lt;
|
|
3753
3753
|
rn = 1, Object.defineProperty(lt, "__esModule", { value: !0 });
|
|
3754
|
-
const e = /* @__PURE__ */
|
|
3754
|
+
const e = /* @__PURE__ */ $e(), t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ x(), l = {
|
|
3755
3755
|
keyword: "required",
|
|
3756
3756
|
type: "object",
|
|
3757
3757
|
schemaType: "array",
|
|
@@ -3805,7 +3805,7 @@ function wo() {
|
|
|
3805
3805
|
return lt.default = l, lt;
|
|
3806
3806
|
}
|
|
3807
3807
|
var ft = {}, nn;
|
|
3808
|
-
function
|
|
3808
|
+
function So() {
|
|
3809
3809
|
if (nn) return ft;
|
|
3810
3810
|
nn = 1, Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
3811
3811
|
const e = /* @__PURE__ */ Y(), r = {
|
|
@@ -3835,7 +3835,7 @@ function lr() {
|
|
|
3835
3835
|
return e.code = 'require("ajv/dist/runtime/equal").default', ht.default = e, ht;
|
|
3836
3836
|
}
|
|
3837
3837
|
var on;
|
|
3838
|
-
function
|
|
3838
|
+
function Po() {
|
|
3839
3839
|
if (on) return pt;
|
|
3840
3840
|
on = 1, Object.defineProperty(pt, "__esModule", { value: !0 });
|
|
3841
3841
|
const e = /* @__PURE__ */ Vt(), t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ x(), s = /* @__PURE__ */ lr(), a = {
|
|
@@ -3879,7 +3879,7 @@ function So() {
|
|
|
3879
3879
|
return pt.default = a, pt;
|
|
3880
3880
|
}
|
|
3881
3881
|
var mt = {}, an;
|
|
3882
|
-
function
|
|
3882
|
+
function No() {
|
|
3883
3883
|
if (an) return mt;
|
|
3884
3884
|
an = 1, Object.defineProperty(mt, "__esModule", { value: !0 });
|
|
3885
3885
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ lr(), l = {
|
|
@@ -3897,7 +3897,7 @@ function Po() {
|
|
|
3897
3897
|
return mt.default = l, mt;
|
|
3898
3898
|
}
|
|
3899
3899
|
var yt = {}, un;
|
|
3900
|
-
function
|
|
3900
|
+
function Oo() {
|
|
3901
3901
|
if (un) return yt;
|
|
3902
3902
|
un = 1, Object.defineProperty(yt, "__esModule", { value: !0 });
|
|
3903
3903
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ lr(), l = {
|
|
@@ -3937,10 +3937,10 @@ function No() {
|
|
|
3937
3937
|
return yt.default = l, yt;
|
|
3938
3938
|
}
|
|
3939
3939
|
var cn;
|
|
3940
|
-
function
|
|
3940
|
+
function Ro() {
|
|
3941
3941
|
if (cn) return st;
|
|
3942
3942
|
cn = 1, Object.defineProperty(st, "__esModule", { value: !0 });
|
|
3943
|
-
const e = /* @__PURE__ */
|
|
3943
|
+
const e = /* @__PURE__ */ go(), t = /* @__PURE__ */ vo(), r = /* @__PURE__ */ $o(), s = /* @__PURE__ */ bo(), l = /* @__PURE__ */ wo(), a = /* @__PURE__ */ Eo(), o = /* @__PURE__ */ So(), u = /* @__PURE__ */ Po(), y = /* @__PURE__ */ No(), g = /* @__PURE__ */ Oo(), m = [
|
|
3944
3944
|
// number
|
|
3945
3945
|
e.default,
|
|
3946
3946
|
t.default,
|
|
@@ -3961,10 +3961,10 @@ function Oo() {
|
|
|
3961
3961
|
];
|
|
3962
3962
|
return st.default = m, st;
|
|
3963
3963
|
}
|
|
3964
|
-
var gt = {},
|
|
3964
|
+
var gt = {}, Ve = {}, dn;
|
|
3965
3965
|
function hs() {
|
|
3966
|
-
if (dn) return
|
|
3967
|
-
dn = 1, Object.defineProperty(
|
|
3966
|
+
if (dn) return Ve;
|
|
3967
|
+
dn = 1, Object.defineProperty(Ve, "__esModule", { value: !0 }), Ve.validateAdditionalItems = void 0;
|
|
3968
3968
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), s = {
|
|
3969
3969
|
keyword: "additionalItems",
|
|
3970
3970
|
type: "array",
|
|
@@ -3999,13 +3999,13 @@ function hs() {
|
|
|
3999
3999
|
});
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
4002
|
-
return
|
|
4002
|
+
return Ve.validateAdditionalItems = l, Ve.default = s, Ve;
|
|
4003
4003
|
}
|
|
4004
|
-
var vt = {},
|
|
4004
|
+
var vt = {}, ze = {}, ln;
|
|
4005
4005
|
function ms() {
|
|
4006
|
-
if (ln) return
|
|
4007
|
-
ln = 1, Object.defineProperty(
|
|
4008
|
-
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */
|
|
4006
|
+
if (ln) return ze;
|
|
4007
|
+
ln = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.validateTuple = void 0;
|
|
4008
|
+
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ $e(), s = {
|
|
4009
4009
|
keyword: "items",
|
|
4010
4010
|
type: "array",
|
|
4011
4011
|
schemaType: ["object", "array", "boolean"],
|
|
@@ -4036,10 +4036,10 @@ function ms() {
|
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
4038
|
}
|
|
4039
|
-
return
|
|
4039
|
+
return ze.validateTuple = l, ze.default = s, ze;
|
|
4040
4040
|
}
|
|
4041
4041
|
var fn;
|
|
4042
|
-
function
|
|
4042
|
+
function jo() {
|
|
4043
4043
|
if (fn) return vt;
|
|
4044
4044
|
fn = 1, Object.defineProperty(vt, "__esModule", { value: !0 });
|
|
4045
4045
|
const e = /* @__PURE__ */ ms(), t = {
|
|
@@ -4055,7 +4055,7 @@ var _t = {}, pn;
|
|
|
4055
4055
|
function Io() {
|
|
4056
4056
|
if (pn) return _t;
|
|
4057
4057
|
pn = 1, Object.defineProperty(_t, "__esModule", { value: !0 });
|
|
4058
|
-
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */
|
|
4058
|
+
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), r = /* @__PURE__ */ $e(), s = /* @__PURE__ */ hs(), a = {
|
|
4059
4059
|
keyword: "items",
|
|
4060
4060
|
type: "array",
|
|
4061
4061
|
schemaType: ["object", "boolean"],
|
|
@@ -4072,7 +4072,7 @@ function Io() {
|
|
|
4072
4072
|
return _t.default = a, _t;
|
|
4073
4073
|
}
|
|
4074
4074
|
var $t = {}, hn;
|
|
4075
|
-
function
|
|
4075
|
+
function ko() {
|
|
4076
4076
|
if (hn) return $t;
|
|
4077
4077
|
hn = 1, Object.defineProperty($t, "__esModule", { value: !0 });
|
|
4078
4078
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), s = {
|
|
@@ -4129,10 +4129,10 @@ function jo() {
|
|
|
4129
4129
|
return $t.default = s, $t;
|
|
4130
4130
|
}
|
|
4131
4131
|
var xt = {}, mn;
|
|
4132
|
-
function
|
|
4132
|
+
function qo() {
|
|
4133
4133
|
return mn || (mn = 1, (function(e) {
|
|
4134
4134
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
4135
|
-
const t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ x(), s = /* @__PURE__ */
|
|
4135
|
+
const t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ x(), s = /* @__PURE__ */ $e();
|
|
4136
4136
|
e.error = {
|
|
4137
4137
|
message: ({ params: { property: y, depsCount: g, deps: m } }) => {
|
|
4138
4138
|
const P = g === 1 ? "property" : "properties";
|
|
@@ -4202,7 +4202,7 @@ function ko() {
|
|
|
4202
4202
|
})(xt)), xt;
|
|
4203
4203
|
}
|
|
4204
4204
|
var bt = {}, yn;
|
|
4205
|
-
function
|
|
4205
|
+
function To() {
|
|
4206
4206
|
if (yn) return bt;
|
|
4207
4207
|
yn = 1, Object.defineProperty(bt, "__esModule", { value: !0 });
|
|
4208
4208
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), s = {
|
|
@@ -4237,7 +4237,7 @@ var wt = {}, gn;
|
|
|
4237
4237
|
function ys() {
|
|
4238
4238
|
if (gn) return wt;
|
|
4239
4239
|
gn = 1, Object.defineProperty(wt, "__esModule", { value: !0 });
|
|
4240
|
-
const e = /* @__PURE__ */
|
|
4240
|
+
const e = /* @__PURE__ */ $e(), t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ Ne(), s = /* @__PURE__ */ x(), a = {
|
|
4241
4241
|
keyword: "additionalProperties",
|
|
4242
4242
|
type: ["object"],
|
|
4243
4243
|
schemaType: ["boolean", "object"],
|
|
@@ -4305,10 +4305,10 @@ function ys() {
|
|
|
4305
4305
|
return wt.default = a, wt;
|
|
4306
4306
|
}
|
|
4307
4307
|
var Et = {}, vn;
|
|
4308
|
-
function
|
|
4308
|
+
function Ao() {
|
|
4309
4309
|
if (vn) return Et;
|
|
4310
4310
|
vn = 1, Object.defineProperty(Et, "__esModule", { value: !0 });
|
|
4311
|
-
const e = /* @__PURE__ */ Ye(), t = /* @__PURE__ */
|
|
4311
|
+
const e = /* @__PURE__ */ Ye(), t = /* @__PURE__ */ $e(), r = /* @__PURE__ */ x(), s = /* @__PURE__ */ ys(), l = {
|
|
4312
4312
|
keyword: "properties",
|
|
4313
4313
|
type: "object",
|
|
4314
4314
|
schemaType: "object",
|
|
@@ -4340,10 +4340,10 @@ function To() {
|
|
|
4340
4340
|
return Et.default = l, Et;
|
|
4341
4341
|
}
|
|
4342
4342
|
var St = {}, _n;
|
|
4343
|
-
function
|
|
4343
|
+
function Do() {
|
|
4344
4344
|
if (_n) return St;
|
|
4345
4345
|
_n = 1, Object.defineProperty(St, "__esModule", { value: !0 });
|
|
4346
|
-
const e = /* @__PURE__ */
|
|
4346
|
+
const e = /* @__PURE__ */ $e(), t = /* @__PURE__ */ Y(), r = /* @__PURE__ */ x(), s = /* @__PURE__ */ x(), l = {
|
|
4347
4347
|
keyword: "patternProperties",
|
|
4348
4348
|
type: "object",
|
|
4349
4349
|
schemaType: "object",
|
|
@@ -4381,7 +4381,7 @@ function Ao() {
|
|
|
4381
4381
|
return St.default = l, St;
|
|
4382
4382
|
}
|
|
4383
4383
|
var Pt = {}, $n;
|
|
4384
|
-
function
|
|
4384
|
+
function Mo() {
|
|
4385
4385
|
if ($n) return Pt;
|
|
4386
4386
|
$n = 1, Object.defineProperty(Pt, "__esModule", { value: !0 });
|
|
4387
4387
|
const e = /* @__PURE__ */ x(), t = {
|
|
@@ -4407,20 +4407,20 @@ function Do() {
|
|
|
4407
4407
|
return Pt.default = t, Pt;
|
|
4408
4408
|
}
|
|
4409
4409
|
var Nt = {}, bn;
|
|
4410
|
-
function
|
|
4410
|
+
function Vo() {
|
|
4411
4411
|
if (bn) return Nt;
|
|
4412
4412
|
bn = 1, Object.defineProperty(Nt, "__esModule", { value: !0 });
|
|
4413
4413
|
const t = {
|
|
4414
4414
|
keyword: "anyOf",
|
|
4415
4415
|
schemaType: "array",
|
|
4416
4416
|
trackErrors: !0,
|
|
4417
|
-
code: (/* @__PURE__ */
|
|
4417
|
+
code: (/* @__PURE__ */ $e()).validateUnion,
|
|
4418
4418
|
error: { message: "must match a schema in anyOf" }
|
|
4419
4419
|
};
|
|
4420
4420
|
return Nt.default = t, Nt;
|
|
4421
4421
|
}
|
|
4422
4422
|
var Ot = {}, wn;
|
|
4423
|
-
function
|
|
4423
|
+
function zo() {
|
|
4424
4424
|
if (wn) return Ot;
|
|
4425
4425
|
wn = 1, Object.defineProperty(Ot, "__esModule", { value: !0 });
|
|
4426
4426
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), s = {
|
|
@@ -4456,7 +4456,7 @@ function Vo() {
|
|
|
4456
4456
|
return Ot.default = s, Ot;
|
|
4457
4457
|
}
|
|
4458
4458
|
var Rt = {}, En;
|
|
4459
|
-
function
|
|
4459
|
+
function Co() {
|
|
4460
4460
|
if (En) return Rt;
|
|
4461
4461
|
En = 1, Object.defineProperty(Rt, "__esModule", { value: !0 });
|
|
4462
4462
|
const e = /* @__PURE__ */ x(), t = {
|
|
@@ -4477,10 +4477,10 @@ function zo() {
|
|
|
4477
4477
|
};
|
|
4478
4478
|
return Rt.default = t, Rt;
|
|
4479
4479
|
}
|
|
4480
|
-
var
|
|
4481
|
-
function
|
|
4482
|
-
if (Sn) return
|
|
4483
|
-
Sn = 1, Object.defineProperty(
|
|
4480
|
+
var jt = {}, Sn;
|
|
4481
|
+
function Fo() {
|
|
4482
|
+
if (Sn) return jt;
|
|
4483
|
+
Sn = 1, Object.defineProperty(jt, "__esModule", { value: !0 });
|
|
4484
4484
|
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ x(), s = {
|
|
4485
4485
|
keyword: "if",
|
|
4486
4486
|
schemaType: ["object", "boolean"],
|
|
@@ -4522,12 +4522,12 @@ function Co() {
|
|
|
4522
4522
|
const u = a.schema[o];
|
|
4523
4523
|
return u !== void 0 && !(0, t.alwaysValidSchema)(a, u);
|
|
4524
4524
|
}
|
|
4525
|
-
return
|
|
4525
|
+
return jt.default = s, jt;
|
|
4526
4526
|
}
|
|
4527
|
-
var
|
|
4528
|
-
function
|
|
4529
|
-
if (Pn) return
|
|
4530
|
-
Pn = 1, Object.defineProperty(
|
|
4527
|
+
var It = {}, Pn;
|
|
4528
|
+
function Lo() {
|
|
4529
|
+
if (Pn) return It;
|
|
4530
|
+
Pn = 1, Object.defineProperty(It, "__esModule", { value: !0 });
|
|
4531
4531
|
const e = /* @__PURE__ */ x(), t = {
|
|
4532
4532
|
keyword: ["then", "else"],
|
|
4533
4533
|
schemaType: ["object", "boolean"],
|
|
@@ -4535,13 +4535,13 @@ function Fo() {
|
|
|
4535
4535
|
s.if === void 0 && (0, e.checkStrictMode)(l, `"${r}" without "if" is ignored`);
|
|
4536
4536
|
}
|
|
4537
4537
|
};
|
|
4538
|
-
return
|
|
4538
|
+
return It.default = t, It;
|
|
4539
4539
|
}
|
|
4540
4540
|
var Nn;
|
|
4541
|
-
function
|
|
4541
|
+
function Uo() {
|
|
4542
4542
|
if (Nn) return gt;
|
|
4543
4543
|
Nn = 1, Object.defineProperty(gt, "__esModule", { value: !0 });
|
|
4544
|
-
const e = /* @__PURE__ */ hs(), t = /* @__PURE__ */
|
|
4544
|
+
const e = /* @__PURE__ */ hs(), t = /* @__PURE__ */ jo(), r = /* @__PURE__ */ ms(), s = /* @__PURE__ */ Io(), l = /* @__PURE__ */ ko(), a = /* @__PURE__ */ qo(), o = /* @__PURE__ */ To(), u = /* @__PURE__ */ ys(), y = /* @__PURE__ */ Ao(), g = /* @__PURE__ */ Do(), m = /* @__PURE__ */ Mo(), P = /* @__PURE__ */ Vo(), b = /* @__PURE__ */ zo(), d = /* @__PURE__ */ Co(), v = /* @__PURE__ */ Fo(), E = /* @__PURE__ */ Lo();
|
|
4545
4545
|
function h(c = !1) {
|
|
4546
4546
|
const n = [
|
|
4547
4547
|
// any
|
|
@@ -4563,7 +4563,7 @@ function Lo() {
|
|
|
4563
4563
|
return gt.default = h, gt;
|
|
4564
4564
|
}
|
|
4565
4565
|
var kt = {}, qt = {}, On;
|
|
4566
|
-
function
|
|
4566
|
+
function Ko() {
|
|
4567
4567
|
if (On) return qt;
|
|
4568
4568
|
On = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
|
|
4569
4569
|
const e = /* @__PURE__ */ Y(), r = {
|
|
@@ -4632,15 +4632,15 @@ function Uo() {
|
|
|
4632
4632
|
return qt.default = r, qt;
|
|
4633
4633
|
}
|
|
4634
4634
|
var Rn;
|
|
4635
|
-
function
|
|
4635
|
+
function Bo() {
|
|
4636
4636
|
if (Rn) return kt;
|
|
4637
4637
|
Rn = 1, Object.defineProperty(kt, "__esModule", { value: !0 });
|
|
4638
|
-
const t = [(/* @__PURE__ */
|
|
4638
|
+
const t = [(/* @__PURE__ */ Ko()).default];
|
|
4639
4639
|
return kt.default = t, kt;
|
|
4640
4640
|
}
|
|
4641
|
-
var Te = {},
|
|
4642
|
-
function
|
|
4643
|
-
return
|
|
4641
|
+
var Te = {}, jn;
|
|
4642
|
+
function Ho() {
|
|
4643
|
+
return jn || (jn = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.contentVocabulary = Te.metadataVocabulary = void 0, Te.metadataVocabulary = [
|
|
4644
4644
|
"title",
|
|
4645
4645
|
"description",
|
|
4646
4646
|
"default",
|
|
@@ -4654,11 +4654,11 @@ function Bo() {
|
|
|
4654
4654
|
"contentSchema"
|
|
4655
4655
|
]), Te;
|
|
4656
4656
|
}
|
|
4657
|
-
var
|
|
4658
|
-
function
|
|
4659
|
-
if (
|
|
4660
|
-
|
|
4661
|
-
const e = /* @__PURE__ */
|
|
4657
|
+
var In;
|
|
4658
|
+
function Go() {
|
|
4659
|
+
if (In) return tt;
|
|
4660
|
+
In = 1, Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
4661
|
+
const e = /* @__PURE__ */ yo(), t = /* @__PURE__ */ Ro(), r = /* @__PURE__ */ Uo(), s = /* @__PURE__ */ Bo(), l = /* @__PURE__ */ Ho(), a = [
|
|
4662
4662
|
e.default,
|
|
4663
4663
|
t.default,
|
|
4664
4664
|
(0, r.default)(),
|
|
@@ -4669,7 +4669,7 @@ function Ho() {
|
|
|
4669
4669
|
return tt.default = a, tt;
|
|
4670
4670
|
}
|
|
4671
4671
|
var Tt = {}, Be = {}, kn;
|
|
4672
|
-
function
|
|
4672
|
+
function Jo() {
|
|
4673
4673
|
if (kn) return Be;
|
|
4674
4674
|
kn = 1, Object.defineProperty(Be, "__esModule", { value: !0 }), Be.DiscrError = void 0;
|
|
4675
4675
|
var e;
|
|
@@ -4678,10 +4678,10 @@ function Go() {
|
|
|
4678
4678
|
})(e || (Be.DiscrError = e = {})), Be;
|
|
4679
4679
|
}
|
|
4680
4680
|
var qn;
|
|
4681
|
-
function
|
|
4681
|
+
function Wo() {
|
|
4682
4682
|
if (qn) return Tt;
|
|
4683
4683
|
qn = 1, Object.defineProperty(Tt, "__esModule", { value: !0 });
|
|
4684
|
-
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */
|
|
4684
|
+
const e = /* @__PURE__ */ Y(), t = /* @__PURE__ */ Jo(), r = /* @__PURE__ */ dr(), s = /* @__PURE__ */ Ft(), l = /* @__PURE__ */ x(), o = {
|
|
4685
4685
|
keyword: "discriminator",
|
|
4686
4686
|
type: "object",
|
|
4687
4687
|
schemaType: "object",
|
|
@@ -4754,20 +4754,20 @@ function Jo() {
|
|
|
4754
4754
|
};
|
|
4755
4755
|
return Tt.default = o, Tt;
|
|
4756
4756
|
}
|
|
4757
|
-
const
|
|
4758
|
-
$schema:
|
|
4759
|
-
$id:
|
|
4760
|
-
title:
|
|
4761
|
-
definitions:
|
|
4762
|
-
type:
|
|
4763
|
-
properties:
|
|
4757
|
+
const Yo = "http://json-schema.org/draft-07/schema#", Zo = "http://json-schema.org/draft-07/schema#", Qo = "Core schema meta-schema", Xo = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, xo = ["object", "boolean"], ea = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, ta = {
|
|
4758
|
+
$schema: Yo,
|
|
4759
|
+
$id: Zo,
|
|
4760
|
+
title: Qo,
|
|
4761
|
+
definitions: Xo,
|
|
4762
|
+
type: xo,
|
|
4763
|
+
properties: ea,
|
|
4764
4764
|
default: !0
|
|
4765
4765
|
};
|
|
4766
4766
|
var Tn;
|
|
4767
4767
|
function fr() {
|
|
4768
4768
|
return Tn || (Tn = 1, (function(e, t) {
|
|
4769
4769
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = t.Ajv = void 0;
|
|
4770
|
-
const r = /* @__PURE__ */
|
|
4770
|
+
const r = /* @__PURE__ */ po(), s = /* @__PURE__ */ Go(), l = /* @__PURE__ */ Wo(), a = ta, o = ["/properties"], u = "http://json-schema.org/draft-07/schema";
|
|
4771
4771
|
class y extends r.default {
|
|
4772
4772
|
_addVocabularies() {
|
|
4773
4773
|
super._addVocabularies(), s.default.forEach((v) => this.addVocabulary(v)), this.opts.discriminator && this.addKeyword(l.default);
|
|
@@ -4811,10 +4811,10 @@ function fr() {
|
|
|
4811
4811
|
} });
|
|
4812
4812
|
})(Ze, Ze.exports)), Ze.exports;
|
|
4813
4813
|
}
|
|
4814
|
-
var
|
|
4815
|
-
const
|
|
4814
|
+
var ra = /* @__PURE__ */ fr();
|
|
4815
|
+
const na = /* @__PURE__ */ zt(ra);
|
|
4816
4816
|
var At = { exports: {} }, er = {}, An;
|
|
4817
|
-
function
|
|
4817
|
+
function sa() {
|
|
4818
4818
|
return An || (An = 1, (function(e) {
|
|
4819
4819
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatNames = e.fastFormats = e.fullFormats = void 0;
|
|
4820
4820
|
function t(A, F) {
|
|
@@ -4902,12 +4902,12 @@ function na() {
|
|
|
4902
4902
|
const B = u.exec(K);
|
|
4903
4903
|
if (!B)
|
|
4904
4904
|
return !1;
|
|
4905
|
-
const X = +B[1], se = +B[2], oe = +B[3], te = B[4], de = B[5] === "-" ? -1 : 1, V = +(B[6] || 0),
|
|
4906
|
-
if (V > 23 ||
|
|
4905
|
+
const X = +B[1], se = +B[2], oe = +B[3], te = B[4], de = B[5] === "-" ? -1 : 1, V = +(B[6] || 0), I = +(B[7] || 0);
|
|
4906
|
+
if (V > 23 || I > 59 || A && !te)
|
|
4907
4907
|
return !1;
|
|
4908
4908
|
if (X <= 23 && se <= 59 && oe < 60)
|
|
4909
4909
|
return !0;
|
|
4910
|
-
const k = se -
|
|
4910
|
+
const k = se - I * de, O = X - V * de - (k < 0 ? 1 : 0);
|
|
4911
4911
|
return (O === 23 || O === -1) && (k === 59 || k === -1) && oe < 61;
|
|
4912
4912
|
};
|
|
4913
4913
|
}
|
|
@@ -4978,7 +4978,7 @@ function na() {
|
|
|
4978
4978
|
})(er)), er;
|
|
4979
4979
|
}
|
|
4980
4980
|
var tr = {}, Dn;
|
|
4981
|
-
function
|
|
4981
|
+
function oa() {
|
|
4982
4982
|
return Dn || (Dn = 1, (function(e) {
|
|
4983
4983
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatLimitDefinition = void 0;
|
|
4984
4984
|
const t = /* @__PURE__ */ fr(), r = /* @__PURE__ */ Y(), s = r.operators, l = {
|
|
@@ -5033,10 +5033,10 @@ function sa() {
|
|
|
5033
5033
|
})(tr)), tr;
|
|
5034
5034
|
}
|
|
5035
5035
|
var Mn;
|
|
5036
|
-
function
|
|
5036
|
+
function aa() {
|
|
5037
5037
|
return Mn || (Mn = 1, (function(e, t) {
|
|
5038
5038
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
5039
|
-
const r =
|
|
5039
|
+
const r = sa(), s = oa(), l = /* @__PURE__ */ Y(), a = new l.Name("fullFormats"), o = new l.Name("fastFormats"), u = (g, m = { keywords: !0 }) => {
|
|
5040
5040
|
if (Array.isArray(m))
|
|
5041
5041
|
return y(g, m, r.fullFormats, a), g;
|
|
5042
5042
|
const [P, b] = m.mode === "fast" ? [r.fastFormats, o] : [r.fullFormats, a], d = m.formats || r.formatNames;
|
|
@@ -5057,10 +5057,10 @@ function oa() {
|
|
|
5057
5057
|
e.exports = t = u, Object.defineProperty(t, "__esModule", { value: !0 }), t.default = u;
|
|
5058
5058
|
})(At, At.exports)), At.exports;
|
|
5059
5059
|
}
|
|
5060
|
-
var
|
|
5061
|
-
const
|
|
5060
|
+
var ia = aa();
|
|
5061
|
+
const ua = /* @__PURE__ */ zt(ia);
|
|
5062
5062
|
var Dt = { exports: {} }, Vn;
|
|
5063
|
-
function
|
|
5063
|
+
function ca() {
|
|
5064
5064
|
return Vn || (Vn = 1, (function(e, t) {
|
|
5065
5065
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
5066
5066
|
const r = /* @__PURE__ */ fr(), s = /* @__PURE__ */ Y(), l = /* @__PURE__ */ Je(), a = /* @__PURE__ */ Ye(), o = /* @__PURE__ */ We(), u = /* @__PURE__ */ Ne(), y = "errorMessage", g = new r.Name("emUsed"), m = {
|
|
@@ -5171,14 +5171,14 @@ function ua() {
|
|
|
5171
5171
|
R(p, w.items), n.assign(z, r.str`items`);
|
|
5172
5172
|
}, () => {
|
|
5173
5173
|
R(O, w.properties), n.assign(z, r.str`properties`);
|
|
5174
|
-
}), H = r._`[${z}]`) : p ? (n.if(T), R(p, w.items), H = r._`.items`) : O && (n.if(s.and(S, s.not(T))), R(O, w.properties), H = r._`.properties`), n.forOf("err", u.default.vErrors, (
|
|
5174
|
+
}), H = r._`[${z}]`) : p ? (n.if(T), R(p, w.items), H = r._`.items`) : O && (n.if(s.and(S, s.not(T))), R(O, w.properties), H = r._`.properties`), n.forOf("err", u.default.vErrors, (j) => oe(j, U, (D) => n.code(r._`${U}[${D}].push(${j})`).assign(r._`${j}.${g}`, !0))), n.forIn("key", U, (j) => n.if(r._`${U}[${j}].length`, () => {
|
|
5175
5175
|
o.reportError(c, {
|
|
5176
|
-
message: r._`${
|
|
5177
|
-
params: r._`{errors: ${U}[${
|
|
5178
|
-
}), n.assign(r._`${u.default.vErrors}[${u.default.errors}-1].instancePath`, r._`${q} + "/" + ${
|
|
5176
|
+
message: r._`${j} in ${J} ? ${J}[${j}]() : ${i}${H}[${j}]`,
|
|
5177
|
+
params: r._`{errors: ${U}[${j}]}`
|
|
5178
|
+
}), n.assign(r._`${u.default.vErrors}[${u.default.errors}-1].instancePath`, r._`${q} + "/" + ${j}.replace(/~/g, "~0").replace(/\\//g, "~1")`);
|
|
5179
5179
|
})), n.endIf();
|
|
5180
|
-
function R(
|
|
5181
|
-
n.assign(U, r.stringify(
|
|
5180
|
+
function R(j, D) {
|
|
5181
|
+
n.assign(U, r.stringify(j)), n.assign(J, de(j, D));
|
|
5182
5182
|
}
|
|
5183
5183
|
}
|
|
5184
5184
|
function B(k) {
|
|
@@ -5219,14 +5219,14 @@ function ua() {
|
|
|
5219
5219
|
const p = [];
|
|
5220
5220
|
for (const S in k) {
|
|
5221
5221
|
const T = O[S];
|
|
5222
|
-
P.test(T) && p.push([S,
|
|
5222
|
+
P.test(T) && p.push([S, I(T)]);
|
|
5223
5223
|
}
|
|
5224
5224
|
return n.object(...p);
|
|
5225
5225
|
}
|
|
5226
5226
|
function V(k) {
|
|
5227
5227
|
return P.test(k) ? new l._Code(l.safeStringify(k).replace(b, (O, p) => `" + JSON.stringify(${a.getData(p, _)}) + "`).replace(d, "")) : r.stringify(k);
|
|
5228
5228
|
}
|
|
5229
|
-
function
|
|
5229
|
+
function I(k) {
|
|
5230
5230
|
return r._`function(){return ${V(k)}}`;
|
|
5231
5231
|
}
|
|
5232
5232
|
},
|
|
@@ -5267,13 +5267,13 @@ function ua() {
|
|
|
5267
5267
|
t.default = E, e.exports = E, e.exports.default = E;
|
|
5268
5268
|
})(Dt, Dt.exports)), Dt.exports;
|
|
5269
5269
|
}
|
|
5270
|
-
var
|
|
5271
|
-
const
|
|
5272
|
-
class
|
|
5270
|
+
var da = ca();
|
|
5271
|
+
const la = /* @__PURE__ */ zt(da);
|
|
5272
|
+
class fa {
|
|
5273
5273
|
constructor(t) {
|
|
5274
5274
|
yr(this, "ajv");
|
|
5275
5275
|
const { customKeywords: r, customFormats: s, ...l } = t || {};
|
|
5276
|
-
this.ajv = new
|
|
5276
|
+
this.ajv = new na({
|
|
5277
5277
|
allErrors: !0,
|
|
5278
5278
|
code: {
|
|
5279
5279
|
source: !1
|
|
@@ -5289,7 +5289,7 @@ class la {
|
|
|
5289
5289
|
validateSchema: !1,
|
|
5290
5290
|
verbose: !0,
|
|
5291
5291
|
...l
|
|
5292
|
-
}),
|
|
5292
|
+
}), ua(this.ajv), la(this.ajv), this.addCustomKeywords(r || []), this.addCustomFormats(s || {});
|
|
5293
5293
|
}
|
|
5294
5294
|
/**
|
|
5295
5295
|
* Add custom keywords to the validator
|
|
@@ -5379,7 +5379,7 @@ class pr extends Error {
|
|
|
5379
5379
|
super(t), this.errors = r, this.name = "ValidationError", Object.setPrototypeOf(this, pr.prototype);
|
|
5380
5380
|
}
|
|
5381
5381
|
}
|
|
5382
|
-
const
|
|
5382
|
+
const pa = new fa({
|
|
5383
5383
|
customKeywords: [
|
|
5384
5384
|
{
|
|
5385
5385
|
keyword: "x-nrg-skip-validation",
|
|
@@ -5403,12 +5403,12 @@ const fa = new la({
|
|
|
5403
5403
|
}
|
|
5404
5404
|
});
|
|
5405
5405
|
function gs(e, t) {
|
|
5406
|
-
const r =
|
|
5406
|
+
const r = pa.validate(e, t, {
|
|
5407
5407
|
cacheKey: `node-schema-${e.type}`
|
|
5408
5408
|
});
|
|
5409
5409
|
return r.valid ? [] : r.errors ?? [];
|
|
5410
5410
|
}
|
|
5411
|
-
function
|
|
5411
|
+
function ha(e, t) {
|
|
5412
5412
|
const r = gs(e, t).filter((s) => {
|
|
5413
5413
|
var o;
|
|
5414
5414
|
if (((o = s.parentSchema) == null ? void 0 : o.format) !== "password") return !0;
|
|
@@ -5422,7 +5422,7 @@ function pa(e, t) {
|
|
|
5422
5422
|
return s.keyword === "required" && ((a = s.params) != null && a.missingProperty) && (l = `${l}/${s.params.missingProperty}`), `${l.slice(1) || "root"}: ${s.message ?? "invalid"}`;
|
|
5423
5423
|
});
|
|
5424
5424
|
}
|
|
5425
|
-
function
|
|
5425
|
+
function ma(e, t) {
|
|
5426
5426
|
return gs(e, t).filter((r) => {
|
|
5427
5427
|
var l;
|
|
5428
5428
|
return ((l = r.parentSchema) == null ? void 0 : l.format) !== "password" ? !0 : cs.get(e, r.instancePath) !== "__PWD__";
|
|
@@ -5437,7 +5437,7 @@ function ha(e, t) {
|
|
|
5437
5437
|
{}
|
|
5438
5438
|
);
|
|
5439
5439
|
}
|
|
5440
|
-
const
|
|
5440
|
+
const ya = Pe({
|
|
5441
5441
|
name: "NodeRedVueApp",
|
|
5442
5442
|
props: {
|
|
5443
5443
|
node: {
|
|
@@ -5477,7 +5477,7 @@ const ma = Pe({
|
|
|
5477
5477
|
}
|
|
5478
5478
|
},
|
|
5479
5479
|
created() {
|
|
5480
|
-
this.debouncedValidate =
|
|
5480
|
+
this.debouncedValidate = Ms(() => this.validate(), 150);
|
|
5481
5481
|
},
|
|
5482
5482
|
beforeMount() {
|
|
5483
5483
|
var e;
|
|
@@ -5517,7 +5517,7 @@ const ma = Pe({
|
|
|
5517
5517
|
},
|
|
5518
5518
|
methods: {
|
|
5519
5519
|
validate() {
|
|
5520
|
-
this.errors =
|
|
5520
|
+
this.errors = ma(this.localNode, this.schema);
|
|
5521
5521
|
},
|
|
5522
5522
|
resolveLabel(e, t) {
|
|
5523
5523
|
const r = this.$i18n(e), s = `${this.localNode.type}.${e}`;
|
|
@@ -5534,38 +5534,38 @@ const ma = Pe({
|
|
|
5534
5534
|
for (const [s, l] of t)
|
|
5535
5535
|
r[s] = l;
|
|
5536
5536
|
return r;
|
|
5537
|
-
},
|
|
5537
|
+
}, ga = {
|
|
5538
5538
|
key: 0,
|
|
5539
5539
|
class: "form-row nrg-toggles-grid"
|
|
5540
|
-
},
|
|
5540
|
+
}, va = { key: 0 }, _a = { key: 1 }, $a = {
|
|
5541
5541
|
key: 1,
|
|
5542
5542
|
class: "form-row nrg-toggles-grid"
|
|
5543
|
-
},
|
|
5544
|
-
function
|
|
5543
|
+
}, ba = { key: 0 }, wa = { key: 1 }, Ea = { key: 2 }, Sa = { style: { width: "100%", "padding-bottom": "12px" } };
|
|
5544
|
+
function Pa(e, t, r, s, l, a) {
|
|
5545
5545
|
const o = he("NodeRedToggle"), u = he("NodeRedNodeForm");
|
|
5546
5546
|
return W(), ee(
|
|
5547
5547
|
nr,
|
|
5548
5548
|
null,
|
|
5549
5549
|
[
|
|
5550
|
-
e.features.hasInputSchema || e.features.hasOutputSchema ? (W(), ee("div",
|
|
5551
|
-
e.features.hasInputSchema ? (W(), ee("div",
|
|
5552
|
-
|
|
5550
|
+
e.features.hasInputSchema || e.features.hasOutputSchema ? (W(), ee("div", ga, [
|
|
5551
|
+
e.features.hasInputSchema ? (W(), ee("div", va, [
|
|
5552
|
+
be(o, {
|
|
5553
5553
|
"model-value": e.localNode.validateInput,
|
|
5554
5554
|
label: e.resolveLabel("toggles.validateInput", "Validate Input"),
|
|
5555
5555
|
"onUpdate:modelValue": t[0] || (t[0] = (y) => e.localNode.validateInput = y)
|
|
5556
5556
|
}, null, 8, ["model-value", "label"])
|
|
5557
5557
|
])) : ne("v-if", !0),
|
|
5558
|
-
e.features.hasOutputSchema ? (W(), ee("div",
|
|
5559
|
-
|
|
5558
|
+
e.features.hasOutputSchema ? (W(), ee("div", _a, [
|
|
5559
|
+
be(o, {
|
|
5560
5560
|
"model-value": e.localNode.validateOutput,
|
|
5561
5561
|
label: e.resolveLabel("toggles.validateOutput", "Validate Output"),
|
|
5562
5562
|
"onUpdate:modelValue": t[1] || (t[1] = (y) => e.localNode.validateOutput = y)
|
|
5563
5563
|
}, null, 8, ["model-value", "label"])
|
|
5564
5564
|
])) : ne("v-if", !0)
|
|
5565
5565
|
])) : ne("v-if", !0),
|
|
5566
|
-
e.hasBuiltinPorts ? (W(), ee("div",
|
|
5567
|
-
e.hasErrorPort ? (W(), ee("div",
|
|
5568
|
-
|
|
5566
|
+
e.hasBuiltinPorts ? (W(), ee("div", $a, [
|
|
5567
|
+
e.hasErrorPort ? (W(), ee("div", ba, [
|
|
5568
|
+
be(o, {
|
|
5569
5569
|
"model-value": e.localNode.errorPort,
|
|
5570
5570
|
label: e.resolveLabel("toggles.errorPort", "Error Port"),
|
|
5571
5571
|
"onUpdate:modelValue": t[2] || (t[2] = (y) => {
|
|
@@ -5573,8 +5573,8 @@ function Sa(e, t, r, s, l, a) {
|
|
|
5573
5573
|
})
|
|
5574
5574
|
}, null, 8, ["model-value", "label"])
|
|
5575
5575
|
])) : ne("v-if", !0),
|
|
5576
|
-
e.hasCompletePort ? (W(), ee("div",
|
|
5577
|
-
|
|
5576
|
+
e.hasCompletePort ? (W(), ee("div", wa, [
|
|
5577
|
+
be(o, {
|
|
5578
5578
|
"model-value": e.localNode.completePort,
|
|
5579
5579
|
label: e.resolveLabel("toggles.completePort", "Complete Port"),
|
|
5580
5580
|
"onUpdate:modelValue": t[3] || (t[3] = (y) => {
|
|
@@ -5582,8 +5582,8 @@ function Sa(e, t, r, s, l, a) {
|
|
|
5582
5582
|
})
|
|
5583
5583
|
}, null, 8, ["model-value", "label"])
|
|
5584
5584
|
])) : ne("v-if", !0),
|
|
5585
|
-
e.hasStatusPort ? (W(), ee("div",
|
|
5586
|
-
|
|
5585
|
+
e.hasStatusPort ? (W(), ee("div", Ea, [
|
|
5586
|
+
be(o, {
|
|
5587
5587
|
"model-value": e.localNode.statusPort,
|
|
5588
5588
|
label: e.resolveLabel("toggles.statusPort", "Status Port"),
|
|
5589
5589
|
"onUpdate:modelValue": t[4] || (t[4] = (y) => {
|
|
@@ -5592,8 +5592,8 @@ function Sa(e, t, r, s, l, a) {
|
|
|
5592
5592
|
}, null, 8, ["model-value", "label"])
|
|
5593
5593
|
])) : ne("v-if", !0)
|
|
5594
5594
|
])) : ne("v-if", !0),
|
|
5595
|
-
ce("div",
|
|
5596
|
-
|
|
5595
|
+
ce("div", Sa, [
|
|
5596
|
+
be(u, {
|
|
5597
5597
|
node: e.localNode,
|
|
5598
5598
|
schema: e.schema,
|
|
5599
5599
|
errors: e.errors,
|
|
@@ -5605,7 +5605,7 @@ function Sa(e, t, r, s, l, a) {
|
|
|
5605
5605
|
/* STABLE_FRAGMENT */
|
|
5606
5606
|
);
|
|
5607
5607
|
}
|
|
5608
|
-
const
|
|
5608
|
+
const Na = /* @__PURE__ */ Oe(ya, [["render", Pa], ["__scopeId", "data-v-7e7ab58c"]]), Oa = Pe({
|
|
5609
5609
|
name: "NodeRedInputLabel",
|
|
5610
5610
|
props: {
|
|
5611
5611
|
label: {
|
|
@@ -5626,12 +5626,12 @@ const Pa = /* @__PURE__ */ Oe(ma, [["render", Sa], ["__scopeId", "data-v-7e7ab58
|
|
|
5626
5626
|
return this.icon ? `fa ${this.icon.startsWith("fa-") ? this.icon : `fa-${this.icon}`}` : "";
|
|
5627
5627
|
}
|
|
5628
5628
|
}
|
|
5629
|
-
}),
|
|
5629
|
+
}), Ra = { class: "nrg-label" }, ja = {
|
|
5630
5630
|
key: 1,
|
|
5631
5631
|
class: "nrg-required"
|
|
5632
5632
|
};
|
|
5633
5633
|
function Ia(e, t, r, s, l, a) {
|
|
5634
|
-
return W(), ee("span",
|
|
5634
|
+
return W(), ee("span", Ra, [
|
|
5635
5635
|
e.icon ? (W(), ee(
|
|
5636
5636
|
"i",
|
|
5637
5637
|
{
|
|
@@ -5642,18 +5642,18 @@ function Ia(e, t, r, s, l, a) {
|
|
|
5642
5642
|
2
|
|
5643
5643
|
/* CLASS */
|
|
5644
5644
|
)) : ne("v-if", !0),
|
|
5645
|
-
|
|
5645
|
+
Ae(e.$slots, "default", {}, () => [
|
|
5646
5646
|
Un(
|
|
5647
|
-
|
|
5647
|
+
Ie(e.label),
|
|
5648
5648
|
1
|
|
5649
5649
|
/* TEXT */
|
|
5650
5650
|
)
|
|
5651
5651
|
], !0),
|
|
5652
|
-
e.required ? (W(), ee("span",
|
|
5652
|
+
e.required ? (W(), ee("span", ja, "*")) : ne("v-if", !0)
|
|
5653
5653
|
]);
|
|
5654
5654
|
}
|
|
5655
|
-
const
|
|
5656
|
-
components: { NodeRedInputLabel:
|
|
5655
|
+
const De = /* @__PURE__ */ Oe(Oa, [["render", Ia], ["__scopeId", "data-v-864b02f2"]]), zn = "*************", ka = Pe({
|
|
5656
|
+
components: { NodeRedInputLabel: De },
|
|
5657
5657
|
props: {
|
|
5658
5658
|
value: {
|
|
5659
5659
|
type: String,
|
|
@@ -5704,15 +5704,15 @@ const Ae = /* @__PURE__ */ Oe(Na, [["render", Ia], ["__scopeId", "data-v-864b02f
|
|
|
5704
5704
|
this.type === "password" && this.value === "__PWD__" && (this.internalValue = zn);
|
|
5705
5705
|
}
|
|
5706
5706
|
}
|
|
5707
|
-
}),
|
|
5707
|
+
}), qa = { style: { display: "flex", "flex-direction": "column", width: "100%" } }, Ta = ["type", "value", "placeholder"], Aa = {
|
|
5708
5708
|
key: 0,
|
|
5709
5709
|
class: "node-red-vue-input-error-message"
|
|
5710
5710
|
};
|
|
5711
|
-
function
|
|
5711
|
+
function Da(e, t, r, s, l, a) {
|
|
5712
5712
|
const o = he("NodeRedInputLabel");
|
|
5713
|
-
return W(), ee("div",
|
|
5714
|
-
|
|
5715
|
-
e.label ? (W(),
|
|
5713
|
+
return W(), ee("div", qa, [
|
|
5714
|
+
Ae(e.$slots, "label", {}, () => [
|
|
5715
|
+
e.label ? (W(), _e(o, {
|
|
5716
5716
|
key: 0,
|
|
5717
5717
|
label: e.label,
|
|
5718
5718
|
icon: e.icon,
|
|
@@ -5728,17 +5728,17 @@ function Aa(e, t, r, s, l, a) {
|
|
|
5728
5728
|
onInput: t[0] || (t[0] = (...u) => e.onInput && e.onInput(...u)),
|
|
5729
5729
|
onFocus: t[1] || (t[1] = (...u) => e.onFocus && e.onFocus(...u)),
|
|
5730
5730
|
onBlur: t[2] || (t[2] = (...u) => e.onBlur && e.onBlur(...u))
|
|
5731
|
-
}, null, 40,
|
|
5731
|
+
}, null, 40, Ta),
|
|
5732
5732
|
e.error ? (W(), ee(
|
|
5733
5733
|
"div",
|
|
5734
|
-
|
|
5735
|
-
|
|
5734
|
+
Aa,
|
|
5735
|
+
Ie(e.error),
|
|
5736
5736
|
1
|
|
5737
5737
|
/* TEXT */
|
|
5738
5738
|
)) : ne("v-if", !0)
|
|
5739
5739
|
]);
|
|
5740
5740
|
}
|
|
5741
|
-
const vs = /* @__PURE__ */ Oe(
|
|
5741
|
+
const vs = /* @__PURE__ */ Oe(ka, [["render", Da]]), Ma = [
|
|
5742
5742
|
"msg",
|
|
5743
5743
|
"flow",
|
|
5744
5744
|
"global",
|
|
@@ -5753,8 +5753,8 @@ const vs = /* @__PURE__ */ Oe(ja, [["render", Aa]]), Da = [
|
|
|
5753
5753
|
"env",
|
|
5754
5754
|
"node",
|
|
5755
5755
|
"cred"
|
|
5756
|
-
], _s = ["errorPort", "completePort", "statusPort"],
|
|
5757
|
-
components: { NodeRedInputLabel:
|
|
5756
|
+
], _s = ["errorPort", "completePort", "statusPort"], Va = Pe({
|
|
5757
|
+
components: { NodeRedInputLabel: De },
|
|
5758
5758
|
props: {
|
|
5759
5759
|
value: {
|
|
5760
5760
|
type: Object,
|
|
@@ -5773,7 +5773,7 @@ const vs = /* @__PURE__ */ Oe(ja, [["render", Aa]]), Da = [
|
|
|
5773
5773
|
},
|
|
5774
5774
|
types: {
|
|
5775
5775
|
type: Array,
|
|
5776
|
-
default: () =>
|
|
5776
|
+
default: () => Ma
|
|
5777
5777
|
},
|
|
5778
5778
|
label: {
|
|
5779
5779
|
type: String,
|
|
@@ -5850,20 +5850,20 @@ const vs = /* @__PURE__ */ Oe(ja, [["render", Aa]]), Da = [
|
|
|
5850
5850
|
});
|
|
5851
5851
|
}
|
|
5852
5852
|
}
|
|
5853
|
-
}),
|
|
5853
|
+
}), za = { style: { display: "flex", "flex-direction": "column", width: "100%" } }, Ca = {
|
|
5854
5854
|
ref: "typedInput",
|
|
5855
5855
|
type: "text",
|
|
5856
5856
|
class: "node-red-typed-input",
|
|
5857
5857
|
style: { flex: "1", width: "100%" }
|
|
5858
|
-
},
|
|
5858
|
+
}, Fa = {
|
|
5859
5859
|
key: 0,
|
|
5860
5860
|
class: "node-red-vue-input-error-message"
|
|
5861
5861
|
};
|
|
5862
|
-
function
|
|
5862
|
+
function La(e, t, r, s, l, a) {
|
|
5863
5863
|
const o = he("NodeRedInputLabel");
|
|
5864
|
-
return W(), ee("div",
|
|
5865
|
-
|
|
5866
|
-
e.label ? (W(),
|
|
5864
|
+
return W(), ee("div", za, [
|
|
5865
|
+
Ae(e.$slots, "label", {}, () => [
|
|
5866
|
+
e.label ? (W(), _e(o, {
|
|
5867
5867
|
key: 0,
|
|
5868
5868
|
label: e.label,
|
|
5869
5869
|
icon: e.icon,
|
|
@@ -5872,22 +5872,22 @@ function Fa(e, t, r, s, l, a) {
|
|
|
5872
5872
|
]),
|
|
5873
5873
|
ce(
|
|
5874
5874
|
"input",
|
|
5875
|
-
|
|
5875
|
+
Ca,
|
|
5876
5876
|
null,
|
|
5877
5877
|
512
|
|
5878
5878
|
/* NEED_PATCH */
|
|
5879
5879
|
),
|
|
5880
5880
|
e.error ? (W(), ee(
|
|
5881
5881
|
"div",
|
|
5882
|
-
|
|
5883
|
-
|
|
5882
|
+
Fa,
|
|
5883
|
+
Ie(e.error),
|
|
5884
5884
|
1
|
|
5885
5885
|
/* TEXT */
|
|
5886
5886
|
)) : ne("v-if", !0)
|
|
5887
5887
|
]);
|
|
5888
5888
|
}
|
|
5889
|
-
const $s = /* @__PURE__ */ Oe(
|
|
5890
|
-
components: { NodeRedInputLabel:
|
|
5889
|
+
const $s = /* @__PURE__ */ Oe(Va, [["render", La]]), Ua = Pe({
|
|
5890
|
+
components: { NodeRedInputLabel: De },
|
|
5891
5891
|
props: {
|
|
5892
5892
|
value: {
|
|
5893
5893
|
type: String,
|
|
@@ -5941,15 +5941,15 @@ const $s = /* @__PURE__ */ Oe(Ma, [["render", Fa]]), La = Pe({
|
|
|
5941
5941
|
this.$emit("update:value", t === "_ADD_" ? "" : t);
|
|
5942
5942
|
}), e.val(this.value || "_ADD_");
|
|
5943
5943
|
}
|
|
5944
|
-
}),
|
|
5944
|
+
}), Ka = { style: { display: "flex", "flex-direction": "column", width: "100%" } }, Ba = ["id"], Ha = {
|
|
5945
5945
|
key: 0,
|
|
5946
5946
|
class: "node-red-vue-input-error-message"
|
|
5947
5947
|
};
|
|
5948
|
-
function
|
|
5948
|
+
function Ga(e, t, r, s, l, a) {
|
|
5949
5949
|
const o = he("NodeRedInputLabel");
|
|
5950
|
-
return W(), ee("div",
|
|
5951
|
-
|
|
5952
|
-
e.label ? (W(),
|
|
5950
|
+
return W(), ee("div", Ka, [
|
|
5951
|
+
Ae(e.$slots, "label", {}, () => [
|
|
5952
|
+
e.label ? (W(), _e(o, {
|
|
5953
5953
|
key: 0,
|
|
5954
5954
|
label: e.label,
|
|
5955
5955
|
icon: e.icon,
|
|
@@ -5960,18 +5960,18 @@ function Ha(e, t, r, s, l, a) {
|
|
|
5960
5960
|
id: e.inputId,
|
|
5961
5961
|
type: "text",
|
|
5962
5962
|
style: { width: "100%" }
|
|
5963
|
-
}, null, 8,
|
|
5963
|
+
}, null, 8, Ba),
|
|
5964
5964
|
e.error ? (W(), ee(
|
|
5965
5965
|
"div",
|
|
5966
|
-
|
|
5967
|
-
|
|
5966
|
+
Ha,
|
|
5967
|
+
Ie(e.error),
|
|
5968
5968
|
1
|
|
5969
5969
|
/* TEXT */
|
|
5970
5970
|
)) : ne("v-if", !0)
|
|
5971
5971
|
]);
|
|
5972
5972
|
}
|
|
5973
|
-
const bs = /* @__PURE__ */ Oe(
|
|
5974
|
-
components: { NodeRedInputLabel:
|
|
5973
|
+
const bs = /* @__PURE__ */ Oe(Ua, [["render", Ga]]), Ja = Pe({
|
|
5974
|
+
components: { NodeRedInputLabel: De },
|
|
5975
5975
|
props: {
|
|
5976
5976
|
value: {
|
|
5977
5977
|
type: [String, Array],
|
|
@@ -6034,20 +6034,20 @@ const bs = /* @__PURE__ */ Oe(La, [["render", Ha]]), Ga = Pe({
|
|
|
6034
6034
|
this.$emit("update:value", r);
|
|
6035
6035
|
});
|
|
6036
6036
|
}
|
|
6037
|
-
}),
|
|
6037
|
+
}), Wa = { style: { display: "flex", "flex-direction": "column", width: "100%" } }, Ya = {
|
|
6038
6038
|
ref: "selectInput",
|
|
6039
6039
|
type: "text",
|
|
6040
6040
|
class: "node-input-select",
|
|
6041
6041
|
style: { width: "100%" }
|
|
6042
|
-
},
|
|
6042
|
+
}, Za = {
|
|
6043
6043
|
key: 0,
|
|
6044
6044
|
class: "node-red-vue-input-error-message"
|
|
6045
6045
|
};
|
|
6046
|
-
function
|
|
6046
|
+
function Qa(e, t, r, s, l, a) {
|
|
6047
6047
|
const o = he("NodeRedInputLabel");
|
|
6048
|
-
return W(), ee("div",
|
|
6049
|
-
|
|
6050
|
-
e.label ? (W(),
|
|
6048
|
+
return W(), ee("div", Wa, [
|
|
6049
|
+
Ae(e.$slots, "label", {}, () => [
|
|
6050
|
+
e.label ? (W(), _e(o, {
|
|
6051
6051
|
key: 0,
|
|
6052
6052
|
label: e.label,
|
|
6053
6053
|
icon: e.icon,
|
|
@@ -6056,22 +6056,22 @@ function Za(e, t, r, s, l, a) {
|
|
|
6056
6056
|
]),
|
|
6057
6057
|
ce(
|
|
6058
6058
|
"input",
|
|
6059
|
-
|
|
6059
|
+
Ya,
|
|
6060
6060
|
null,
|
|
6061
6061
|
512
|
|
6062
6062
|
/* NEED_PATCH */
|
|
6063
6063
|
),
|
|
6064
6064
|
e.error ? (W(), ee(
|
|
6065
6065
|
"div",
|
|
6066
|
-
|
|
6067
|
-
|
|
6066
|
+
Za,
|
|
6067
|
+
Ie(e.error),
|
|
6068
6068
|
1
|
|
6069
6069
|
/* TEXT */
|
|
6070
6070
|
)) : ne("v-if", !0)
|
|
6071
6071
|
]);
|
|
6072
6072
|
}
|
|
6073
|
-
const ws = /* @__PURE__ */ Oe(
|
|
6074
|
-
components: { NodeRedInputLabel:
|
|
6073
|
+
const ws = /* @__PURE__ */ Oe(Ja, [["render", Qa]]), Xa = Pe({
|
|
6074
|
+
components: { NodeRedInputLabel: De },
|
|
6075
6075
|
props: {
|
|
6076
6076
|
value: {
|
|
6077
6077
|
type: String,
|
|
@@ -6187,7 +6187,7 @@ const ws = /* @__PURE__ */ Oe(Ga, [["render", Za]]), Qa = Pe({
|
|
|
6187
6187
|
default: ""
|
|
6188
6188
|
}
|
|
6189
6189
|
},
|
|
6190
|
-
emits: ["update:value"],
|
|
6190
|
+
emits: ["update:value", "editor-ready", "tray-open", "tray-close"],
|
|
6191
6191
|
// Non-reactive instance property — must NOT be in data() because Vue's
|
|
6192
6192
|
// reactivity proxy breaks Monaco editor and jQuery widgets. markRaw() was
|
|
6193
6193
|
// tested and also does not work. Declared here so Vue ignores it.
|
|
@@ -6196,7 +6196,8 @@ const ws = /* @__PURE__ */ Oe(Ga, [["render", Za]]), Qa = Pe({
|
|
|
6196
6196
|
const e = Math.random().toString(36).substring(2, 9);
|
|
6197
6197
|
return {
|
|
6198
6198
|
editorId: "node-red-editor-" + e,
|
|
6199
|
-
stateId: e
|
|
6199
|
+
stateId: e,
|
|
6200
|
+
trayElement: null
|
|
6200
6201
|
};
|
|
6201
6202
|
},
|
|
6202
6203
|
mounted() {
|
|
@@ -6204,13 +6205,13 @@ const ws = /* @__PURE__ */ Oe(Ga, [["render", Za]]), Qa = Pe({
|
|
|
6204
6205
|
RED.popover.tooltip(e, RED._("node-red:common.label.expand")), this.mountEditor(), this.createExpandeEditorTray();
|
|
6205
6206
|
},
|
|
6206
6207
|
beforeUnmount() {
|
|
6207
|
-
if (this.
|
|
6208
|
+
if (this.editor) {
|
|
6208
6209
|
try {
|
|
6209
|
-
this.
|
|
6210
|
+
this.editor.destroy();
|
|
6210
6211
|
} catch (e) {
|
|
6211
6212
|
console.error(`Error destroying editor for ID ${this.editorId}:`, e);
|
|
6212
6213
|
}
|
|
6213
|
-
this.
|
|
6214
|
+
this.editor = null;
|
|
6214
6215
|
}
|
|
6215
6216
|
},
|
|
6216
6217
|
methods: {
|
|
@@ -6234,24 +6235,24 @@ const ws = /* @__PURE__ */ Oe(Ga, [["render", Za]]), Qa = Pe({
|
|
|
6234
6235
|
});
|
|
6235
6236
|
},
|
|
6236
6237
|
createEditorInstance() {
|
|
6237
|
-
this.
|
|
6238
|
+
this.editor = RED.editor.createEditor({
|
|
6238
6239
|
id: this.editorId,
|
|
6239
6240
|
mode: this.language,
|
|
6240
6241
|
value: this.value
|
|
6241
|
-
}), this.
|
|
6242
|
-
const e = this.
|
|
6242
|
+
}), this.editor.getSession().on("change", () => {
|
|
6243
|
+
const e = this.editor.getValue();
|
|
6243
6244
|
e !== this.value && this.$emit("update:value", e);
|
|
6244
|
-
});
|
|
6245
|
+
}), this.$emit("editor-ready", this.editor);
|
|
6245
6246
|
},
|
|
6246
6247
|
createExpandeEditorTray() {
|
|
6247
6248
|
let e;
|
|
6248
6249
|
const t = () => {
|
|
6249
6250
|
setTimeout(() => {
|
|
6250
|
-
this.
|
|
6251
|
+
this.editor.focus();
|
|
6251
6252
|
}, 250), RED.tray.close();
|
|
6252
6253
|
}, r = () => {
|
|
6253
|
-
e.saveView(), this.
|
|
6254
|
-
this.
|
|
6254
|
+
e.saveView(), this.editor.setValue(e.getValue(), -1), setTimeout(() => {
|
|
6255
|
+
this.editor.restoreView(), this.editor.focus();
|
|
6255
6256
|
}, 250), RED.tray.close();
|
|
6256
6257
|
};
|
|
6257
6258
|
this.expandedEditorTray = {
|
|
@@ -6284,9 +6285,11 @@ const ws = /* @__PURE__ */ Oe(Ga, [["render", Za]]), Qa = Pe({
|
|
|
6284
6285
|
focus: !0,
|
|
6285
6286
|
value: this.value
|
|
6286
6287
|
}), l.i18n();
|
|
6288
|
+
const a = s.find(".red-ui-tray-body")[0], o = document.createElement("div");
|
|
6289
|
+
o.className = "red-ui-tray-footer", a.insertAdjacentElement("afterend", o), this.trayElement = o, this.$emit("tray-open", this.trayElement);
|
|
6287
6290
|
},
|
|
6288
|
-
close:
|
|
6289
|
-
e.destroy();
|
|
6291
|
+
close: () => {
|
|
6292
|
+
this.$emit("tray-close"), this.trayElement && (this.trayElement.remove(), this.trayElement = null), e.destroy();
|
|
6290
6293
|
}
|
|
6291
6294
|
};
|
|
6292
6295
|
},
|
|
@@ -6294,25 +6297,25 @@ const ws = /* @__PURE__ */ Oe(Ga, [["render", Za]]), Qa = Pe({
|
|
|
6294
6297
|
RED.tray.show(this.expandedEditorTray);
|
|
6295
6298
|
}
|
|
6296
6299
|
}
|
|
6297
|
-
}),
|
|
6300
|
+
}), xa = {
|
|
6298
6301
|
ref: "container",
|
|
6299
6302
|
class: "container"
|
|
6300
|
-
},
|
|
6301
|
-
function
|
|
6303
|
+
}, ei = { class: "editor-wrapper" }, ti = ["id"];
|
|
6304
|
+
function ri(e, t, r, s, l, a) {
|
|
6302
6305
|
const o = he("NodeRedInputLabel");
|
|
6303
6306
|
return W(), ee(
|
|
6304
6307
|
"div",
|
|
6305
|
-
|
|
6308
|
+
xa,
|
|
6306
6309
|
[
|
|
6307
|
-
|
|
6308
|
-
e.label ? (W(),
|
|
6310
|
+
Ae(e.$slots, "label", {}, () => [
|
|
6311
|
+
e.label ? (W(), _e(o, {
|
|
6309
6312
|
key: 0,
|
|
6310
6313
|
label: e.label,
|
|
6311
6314
|
icon: e.icon,
|
|
6312
6315
|
required: e.required
|
|
6313
6316
|
}, null, 8, ["label", "icon", "required"])) : ne("v-if", !0)
|
|
6314
6317
|
], !0),
|
|
6315
|
-
ce("div",
|
|
6318
|
+
ce("div", ei, [
|
|
6316
6319
|
ce(
|
|
6317
6320
|
"button",
|
|
6318
6321
|
{
|
|
@@ -6335,23 +6338,29 @@ function ti(e, t, r, s, l, a) {
|
|
|
6335
6338
|
ce("div", {
|
|
6336
6339
|
id: e.editorId,
|
|
6337
6340
|
ref: "editor"
|
|
6338
|
-
}, null, 8,
|
|
6341
|
+
}, null, 8, ti)
|
|
6339
6342
|
]),
|
|
6340
6343
|
qs(ce(
|
|
6341
6344
|
"div",
|
|
6342
6345
|
{ class: "node-red-vue-input-error-message" },
|
|
6343
|
-
|
|
6346
|
+
Ie(e.error),
|
|
6344
6347
|
513
|
|
6345
6348
|
/* TEXT, NEED_PATCH */
|
|
6346
6349
|
), [
|
|
6347
6350
|
[Ts, e.error]
|
|
6348
|
-
])
|
|
6351
|
+
]),
|
|
6352
|
+
e.trayElement ? (W(), _e(As, {
|
|
6353
|
+
key: 0,
|
|
6354
|
+
to: e.trayElement
|
|
6355
|
+
}, [
|
|
6356
|
+
Ae(e.$slots, "tray-footer", {}, void 0, !0)
|
|
6357
|
+
], 8, ["to"])) : ne("v-if", !0)
|
|
6349
6358
|
],
|
|
6350
6359
|
512
|
|
6351
6360
|
/* NEED_PATCH */
|
|
6352
6361
|
);
|
|
6353
6362
|
}
|
|
6354
|
-
const Es = /* @__PURE__ */ Oe(
|
|
6363
|
+
const Es = /* @__PURE__ */ Oe(Xa, [["render", ri], ["__scopeId", "data-v-92de5d96"]]), ni = Pe({
|
|
6355
6364
|
name: "NodeRedToggle",
|
|
6356
6365
|
props: {
|
|
6357
6366
|
modelValue: {
|
|
@@ -6373,12 +6382,12 @@ const Es = /* @__PURE__ */ Oe(Qa, [["render", ti], ["__scopeId", "data-v-595c66d
|
|
|
6373
6382
|
return this.icon ? `fa ${this.icon.startsWith("fa-") ? this.icon : `fa-${this.icon}`}` : "";
|
|
6374
6383
|
}
|
|
6375
6384
|
}
|
|
6376
|
-
}),
|
|
6385
|
+
}), si = { class: "nrg-toggle-wrapper" }, oi = ["checked"], ai = {
|
|
6377
6386
|
key: 0,
|
|
6378
6387
|
class: "nrg-toggle__label"
|
|
6379
6388
|
};
|
|
6380
|
-
function
|
|
6381
|
-
return W(), ee("div",
|
|
6389
|
+
function ii(e, t, r, s, l, a) {
|
|
6390
|
+
return W(), ee("div", si, [
|
|
6382
6391
|
ce(
|
|
6383
6392
|
"label",
|
|
6384
6393
|
{
|
|
@@ -6393,8 +6402,8 @@ function ai(e, t, r, s, l, a) {
|
|
|
6393
6402
|
"update:modelValue",
|
|
6394
6403
|
o.target.checked
|
|
6395
6404
|
))
|
|
6396
|
-
}, null, 40,
|
|
6397
|
-
e.icon || e.label ? (W(), ee("span",
|
|
6405
|
+
}, null, 40, oi),
|
|
6406
|
+
e.icon || e.label ? (W(), ee("span", ai, [
|
|
6398
6407
|
e.icon ? (W(), ee(
|
|
6399
6408
|
"i",
|
|
6400
6409
|
{
|
|
@@ -6406,7 +6415,7 @@ function ai(e, t, r, s, l, a) {
|
|
|
6406
6415
|
/* CLASS */
|
|
6407
6416
|
)) : ne("v-if", !0),
|
|
6408
6417
|
Un(
|
|
6409
|
-
" " +
|
|
6418
|
+
" " + Ie(e.label),
|
|
6410
6419
|
1
|
|
6411
6420
|
/* TEXT */
|
|
6412
6421
|
)
|
|
@@ -6424,7 +6433,7 @@ function ai(e, t, r, s, l, a) {
|
|
|
6424
6433
|
)
|
|
6425
6434
|
]);
|
|
6426
6435
|
}
|
|
6427
|
-
const Ss = /* @__PURE__ */ Oe(
|
|
6436
|
+
const Ss = /* @__PURE__ */ Oe(ni, [["render", ii], ["__scopeId", "data-v-724dcae4"]]), ui = /* @__PURE__ */ new Set([
|
|
6428
6437
|
"id",
|
|
6429
6438
|
"type",
|
|
6430
6439
|
"x",
|
|
@@ -6439,16 +6448,16 @@ const Ss = /* @__PURE__ */ Oe(ri, [["render", ai], ["__scopeId", "data-v-724dcae
|
|
|
6439
6448
|
"outputs",
|
|
6440
6449
|
..._s
|
|
6441
6450
|
]), Ps = new Set(_s);
|
|
6442
|
-
function
|
|
6451
|
+
function ci(e) {
|
|
6443
6452
|
return e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()).trim();
|
|
6444
6453
|
}
|
|
6445
|
-
function
|
|
6454
|
+
function di(e) {
|
|
6446
6455
|
var t, r;
|
|
6447
6456
|
return e.type === "object" && !!((t = e.properties) != null && t.value) && !!((r = e.properties) != null && r.type);
|
|
6448
6457
|
}
|
|
6449
6458
|
function Cn(e, t, r, s) {
|
|
6450
6459
|
var y;
|
|
6451
|
-
const l = s || t.title ||
|
|
6460
|
+
const l = s || t.title || ci(e), a = t["x-nrg-form"] ?? {}, o = a.icon || "";
|
|
6452
6461
|
if (t["x-nrg-node-type"])
|
|
6453
6462
|
return {
|
|
6454
6463
|
key: e,
|
|
@@ -6458,7 +6467,7 @@ function Cn(e, t, r, s) {
|
|
|
6458
6467
|
required: r,
|
|
6459
6468
|
configType: t["x-nrg-node-type"]
|
|
6460
6469
|
};
|
|
6461
|
-
if (
|
|
6470
|
+
if (di(t))
|
|
6462
6471
|
return {
|
|
6463
6472
|
key: e,
|
|
6464
6473
|
label: l,
|
|
@@ -6570,10 +6579,10 @@ function Cn(e, t, r, s) {
|
|
|
6570
6579
|
};
|
|
6571
6580
|
}
|
|
6572
6581
|
}
|
|
6573
|
-
const
|
|
6582
|
+
const li = Pe({
|
|
6574
6583
|
name: "NodeRedJsonSchemaForm",
|
|
6575
6584
|
components: {
|
|
6576
|
-
NodeRedInputLabel:
|
|
6585
|
+
NodeRedInputLabel: De,
|
|
6577
6586
|
NodeRedToggle: Ss,
|
|
6578
6587
|
NodeRedInput: vs,
|
|
6579
6588
|
NodeRedSelectInput: ws,
|
|
@@ -6600,7 +6609,7 @@ const di = Pe({
|
|
|
6600
6609
|
var t;
|
|
6601
6610
|
if (!((t = this.schema) != null && t.properties)) return [];
|
|
6602
6611
|
const e = new Set(this.schema.required ?? []);
|
|
6603
|
-
return Object.entries(this.schema.properties).filter(([r]) => !
|
|
6612
|
+
return Object.entries(this.schema.properties).filter(([r]) => !ui.has(r)).map(
|
|
6604
6613
|
([r, s]) => Cn(
|
|
6605
6614
|
r,
|
|
6606
6615
|
s,
|
|
@@ -6644,11 +6653,11 @@ const di = Pe({
|
|
|
6644
6653
|
return r;
|
|
6645
6654
|
}
|
|
6646
6655
|
}
|
|
6647
|
-
}),
|
|
6656
|
+
}), fi = { key: 1 }, pi = { key: 2 }, hi = ["checked", "onChange"], mi = { key: 6 }, yi = ["value", "onInput"], gi = {
|
|
6648
6657
|
key: 0,
|
|
6649
6658
|
class: "node-red-vue-input-error-message"
|
|
6650
6659
|
};
|
|
6651
|
-
function
|
|
6660
|
+
function vi(e, t, r, s, l, a) {
|
|
6652
6661
|
const o = he("NodeRedInput"), u = he("NodeRedToggle"), y = he("NodeRedInputLabel"), g = he("NodeRedSelectInput"), m = he("NodeRedTypedInput"), P = he("NodeRedConfigInput"), b = he("NodeRedEditorInput");
|
|
6653
6662
|
return W(), ee("div", null, [
|
|
6654
6663
|
(W(!0), ee(
|
|
@@ -6658,7 +6667,7 @@ function gi(e, t, r, s, l, a) {
|
|
|
6658
6667
|
key: d.key,
|
|
6659
6668
|
class: "form-row"
|
|
6660
6669
|
}, [
|
|
6661
|
-
d.inputType === "text" || d.inputType === "number" ? (W(),
|
|
6670
|
+
d.inputType === "text" || d.inputType === "number" ? (W(), _e(o, {
|
|
6662
6671
|
key: 0,
|
|
6663
6672
|
value: e.node[d.key],
|
|
6664
6673
|
type: d.htmlType,
|
|
@@ -6667,8 +6676,8 @@ function gi(e, t, r, s, l, a) {
|
|
|
6667
6676
|
required: d.required,
|
|
6668
6677
|
error: e.errors[`node.${d.key}`],
|
|
6669
6678
|
"onUpdate:value": (v) => e.node[d.key] = v
|
|
6670
|
-
}, null, 8, ["value", "type", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "boolean" && d.toggle ? (W(), ee("div",
|
|
6671
|
-
|
|
6679
|
+
}, null, 8, ["value", "type", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "boolean" && d.toggle ? (W(), ee("div", fi, [
|
|
6680
|
+
be(u, {
|
|
6672
6681
|
"model-value": e.node[d.key],
|
|
6673
6682
|
label: d.label,
|
|
6674
6683
|
icon: d.icon,
|
|
@@ -6676,8 +6685,8 @@ function gi(e, t, r, s, l, a) {
|
|
|
6676
6685
|
e.node[d.key] = v, d.isBuiltinPort && e.recalculateOutputs();
|
|
6677
6686
|
}
|
|
6678
6687
|
}, null, 8, ["model-value", "label", "icon", "onUpdate:modelValue"])
|
|
6679
|
-
])) : d.inputType === "boolean" ? (W(), ee("div",
|
|
6680
|
-
|
|
6688
|
+
])) : d.inputType === "boolean" ? (W(), ee("div", pi, [
|
|
6689
|
+
be(y, {
|
|
6681
6690
|
label: d.label,
|
|
6682
6691
|
icon: d.icon,
|
|
6683
6692
|
required: d.required
|
|
@@ -6689,8 +6698,8 @@ function gi(e, t, r, s, l, a) {
|
|
|
6689
6698
|
onChange: (v) => {
|
|
6690
6699
|
e.node[d.key] = v.target.checked, d.isBuiltinPort && e.recalculateOutputs();
|
|
6691
6700
|
}
|
|
6692
|
-
}, null, 40,
|
|
6693
|
-
])) : d.inputType === "select" ? (W(),
|
|
6701
|
+
}, null, 40, hi)
|
|
6702
|
+
])) : d.inputType === "select" ? (W(), _e(g, {
|
|
6694
6703
|
key: 3,
|
|
6695
6704
|
value: e.node[d.key],
|
|
6696
6705
|
options: d.options,
|
|
@@ -6700,7 +6709,7 @@ function gi(e, t, r, s, l, a) {
|
|
|
6700
6709
|
required: d.required,
|
|
6701
6710
|
error: e.errors[`node.${d.key}`],
|
|
6702
6711
|
"onUpdate:value": (v) => e.node[d.key] = v
|
|
6703
|
-
}, null, 8, ["value", "options", "multiple", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "typed" ? (W(),
|
|
6712
|
+
}, null, 8, ["value", "options", "multiple", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "typed" ? (W(), _e(m, {
|
|
6704
6713
|
key: 4,
|
|
6705
6714
|
value: e.node[d.key],
|
|
6706
6715
|
types: d.types,
|
|
@@ -6709,7 +6718,7 @@ function gi(e, t, r, s, l, a) {
|
|
|
6709
6718
|
required: d.required,
|
|
6710
6719
|
error: e.errors[`node.${d.key}`],
|
|
6711
6720
|
"onUpdate:value": (v) => e.node[d.key] = v
|
|
6712
|
-
}, null, 8, ["value", "types", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "config" ? (W(),
|
|
6721
|
+
}, null, 8, ["value", "types", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "config" ? (W(), _e(P, {
|
|
6713
6722
|
key: 5,
|
|
6714
6723
|
value: e.node[d.key],
|
|
6715
6724
|
type: d.configType,
|
|
@@ -6720,8 +6729,8 @@ function gi(e, t, r, s, l, a) {
|
|
|
6720
6729
|
required: d.required,
|
|
6721
6730
|
error: e.errors[`node.${d.key}`],
|
|
6722
6731
|
"onUpdate:value": (v) => e.node[d.key] = v
|
|
6723
|
-
}, null, 8, ["value", "type", "node", "prop-name", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "array-text" ? (W(), ee("div",
|
|
6724
|
-
|
|
6732
|
+
}, null, 8, ["value", "type", "node", "prop-name", "label", "icon", "required", "error", "onUpdate:value"])) : d.inputType === "array-text" ? (W(), ee("div", mi, [
|
|
6733
|
+
be(y, {
|
|
6725
6734
|
label: d.label,
|
|
6726
6735
|
icon: d.icon,
|
|
6727
6736
|
required: d.required
|
|
@@ -6740,15 +6749,15 @@ function gi(e, t, r, s, l, a) {
|
|
|
6740
6749
|
style: { width: "100%", resize: "vertical", "font-family": "monospace", "font-size": "13px" },
|
|
6741
6750
|
onInput: (v) => e.node[d.key] = v.target.value.split(`
|
|
6742
6751
|
`).filter(Boolean)
|
|
6743
|
-
}, null, 40,
|
|
6752
|
+
}, null, 40, yi),
|
|
6744
6753
|
e.errors[`node.${d.key}`] ? (W(), ee(
|
|
6745
6754
|
"span",
|
|
6746
|
-
|
|
6747
|
-
|
|
6755
|
+
gi,
|
|
6756
|
+
Ie(e.errors[`node.${d.key}`]),
|
|
6748
6757
|
1
|
|
6749
6758
|
/* TEXT */
|
|
6750
6759
|
)) : ne("v-if", !0)
|
|
6751
|
-
])) : d.inputType === "editor" ? (W(),
|
|
6760
|
+
])) : d.inputType === "editor" ? (W(), _e(b, {
|
|
6752
6761
|
key: 7,
|
|
6753
6762
|
value: e.node[d.key],
|
|
6754
6763
|
language: d.language,
|
|
@@ -6769,7 +6778,7 @@ function gi(e, t, r, s, l, a) {
|
|
|
6769
6778
|
key: `cred-${d.key}`,
|
|
6770
6779
|
class: "form-row"
|
|
6771
6780
|
}, [
|
|
6772
|
-
|
|
6781
|
+
be(o, {
|
|
6773
6782
|
value: e.node.credentials[d.key],
|
|
6774
6783
|
type: d.htmlType,
|
|
6775
6784
|
label: d.label,
|
|
@@ -6784,26 +6793,26 @@ function gi(e, t, r, s, l, a) {
|
|
|
6784
6793
|
))
|
|
6785
6794
|
]);
|
|
6786
6795
|
}
|
|
6787
|
-
const Fn = /* @__PURE__ */ Oe(
|
|
6788
|
-
function
|
|
6789
|
-
const l =
|
|
6796
|
+
const Fn = /* @__PURE__ */ Oe(li, [["render", vi]]);
|
|
6797
|
+
function _i(e, t, r, s) {
|
|
6798
|
+
const l = Ds(Na, {
|
|
6790
6799
|
node: e,
|
|
6791
6800
|
schema: r,
|
|
6792
6801
|
features: s
|
|
6793
6802
|
});
|
|
6794
|
-
return l.component("NodeRedInputLabel",
|
|
6803
|
+
return l.component("NodeRedInputLabel", De), l.component("NodeRedToggle", Ss), l.component("NodeRedInput", vs), l.component("NodeRedTypedInput", $s), l.component("NodeRedConfigInput", bs), l.component("NodeRedSelectInput", ws), l.component("NodeRedEditorInput", Es), l.component("NodeRedJsonSchemaForm", Fn), l.component("NodeRedNodeForm", (t == null ? void 0 : t.component) ?? Fn), l.config.globalProperties.$i18n = (a) => e._(`${e.type}.${a}`), l;
|
|
6795
6804
|
}
|
|
6796
|
-
function
|
|
6797
|
-
$(`#${l}`).empty(), e._newState =
|
|
6805
|
+
function $i(e, t, r, s, l) {
|
|
6806
|
+
$(`#${l}`).empty(), e._newState = Hs(e), e._app = _i(e._newState, t, r, s), e._app.mount(`#${l}`);
|
|
6798
6807
|
}
|
|
6799
6808
|
function rr(e) {
|
|
6800
6809
|
e._app && (e._app.unmount(), e._app = null);
|
|
6801
6810
|
}
|
|
6802
6811
|
const Ns = {}, ur = {};
|
|
6803
|
-
function
|
|
6812
|
+
function Si(e) {
|
|
6804
6813
|
Object.assign(Ns, e);
|
|
6805
6814
|
}
|
|
6806
|
-
function
|
|
6815
|
+
function Pi(e) {
|
|
6807
6816
|
Object.assign(ur, e);
|
|
6808
6817
|
}
|
|
6809
6818
|
function Ln(e) {
|
|
@@ -6824,7 +6833,7 @@ function Os(e, t) {
|
|
|
6824
6833
|
if (!Array.isArray(a) && typeof a == "object" && a !== null) {
|
|
6825
6834
|
const u = Os(a, o);
|
|
6826
6835
|
Object.keys(u).length && (r[l] = u);
|
|
6827
|
-
} else
|
|
6836
|
+
} else Ws(a, o) || (r[l] = a);
|
|
6828
6837
|
}), r;
|
|
6829
6838
|
}
|
|
6830
6839
|
function Rs(e, t) {
|
|
@@ -6833,10 +6842,10 @@ function Rs(e, t) {
|
|
|
6833
6842
|
Array.isArray(s) ? e[r] = [...s] : s !== null && typeof s == "object" ? ((!e[r] || typeof e[r] != "object" || Array.isArray(e[r])) && (e[r] = {}), Rs(e[r], s)) : e[r] = s;
|
|
6834
6843
|
}
|
|
6835
6844
|
}
|
|
6836
|
-
function
|
|
6845
|
+
function Ni(e) {
|
|
6837
6846
|
return e;
|
|
6838
6847
|
}
|
|
6839
|
-
async function
|
|
6848
|
+
async function bi(e) {
|
|
6840
6849
|
var r, s, l, a;
|
|
6841
6850
|
const { type: t } = e;
|
|
6842
6851
|
try {
|
|
@@ -6845,7 +6854,7 @@ async function $i(e) {
|
|
|
6845
6854
|
hasInputSchema: !!m.inputSchema,
|
|
6846
6855
|
hasOutputSchema: !!m.outputsSchema
|
|
6847
6856
|
};
|
|
6848
|
-
|
|
6857
|
+
$i(this, c, v, n, d);
|
|
6849
6858
|
}, u = function() {
|
|
6850
6859
|
var N;
|
|
6851
6860
|
const c = this;
|
|
@@ -6928,7 +6937,7 @@ async function $i(e) {
|
|
|
6928
6937
|
c && (P[c] = {
|
|
6929
6938
|
...P[c],
|
|
6930
6939
|
validate: function(n, f) {
|
|
6931
|
-
return
|
|
6940
|
+
return ha(this, v);
|
|
6932
6941
|
}
|
|
6933
6942
|
});
|
|
6934
6943
|
}
|
|
@@ -7001,17 +7010,17 @@ async function $i(e) {
|
|
|
7001
7010
|
throw console.error(`Error while registering node type ${t}:`, o), o;
|
|
7002
7011
|
}
|
|
7003
7012
|
}
|
|
7004
|
-
async function
|
|
7013
|
+
async function Oi(e) {
|
|
7005
7014
|
try {
|
|
7006
|
-
await Promise.all(e.map((t) =>
|
|
7015
|
+
await Promise.all(e.map((t) => bi(t)));
|
|
7007
7016
|
} catch (t) {
|
|
7008
7017
|
throw console.error("Error registering node types:", t), t;
|
|
7009
7018
|
}
|
|
7010
7019
|
}
|
|
7011
7020
|
export {
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7021
|
+
Pi as __setForms,
|
|
7022
|
+
Si as __setSchemas,
|
|
7023
|
+
Ni as defineNode,
|
|
7024
|
+
bi as registerType,
|
|
7025
|
+
Oi as registerTypes
|
|
7017
7026
|
};
|