@quickflo/quickforms-vue 1.7.2 → 1.8.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/dist/components/OneOfField.vue.d.ts.map +1 -1
- package/dist/index.js +901 -888
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { provide as ea, inject as ta, computed as G, defineComponent as me, ref as oe, createElementBlock as
|
|
1
|
+
import { provide as ea, inject as ta, computed as G, defineComponent as me, ref as oe, createElementBlock as q, openBlock as j, createElementVNode as D, withDirectives as je, createCommentVNode as C, createTextVNode as qe, toDisplayString as Q, vModelText as _t, normalizeClass as Er, vModelDynamic as Pr, vModelCheckbox as ra, Fragment as we, renderList as Ke, vModelSelect as na, createBlock as gt, resolveDynamicComponent as sa, createVNode as Jn, watch as He, onMounted as Or, mergeModels as $n, useModel as aa, reactive as oa, markRaw as ia, toRaw as wn, nextTick as Pt, normalizeStyle as la, renderSlot as da } from "vue";
|
|
2
2
|
import { useField as ca, useForm as ua } from "vee-validate";
|
|
3
3
|
class fa {
|
|
4
4
|
constructor() {
|
|
@@ -57,23 +57,23 @@ class fa {
|
|
|
57
57
|
this.components.clear();
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const pe = (e, t) => t ? e : -1,
|
|
60
|
+
const pe = (e, t) => t ? e : -1, st = (e) => e.type === "string" || e.const !== void 0 && typeof e.const == "string", ma = (e) => e.type === "number" || e.type === "integer" || e.const !== void 0 && typeof e.const == "number", lm = (e) => e.type === "integer", ha = (e) => e.type === "boolean" || e.const !== void 0 && typeof e.const == "boolean", pa = (e) => e.type === "object" || e.type === void 0 && e.properties !== void 0, ya = (e) => e.type === "array", va = (e) => e.type === "object" && e.additionalProperties !== void 0 && typeof e.additionalProperties == "object" && Object.keys(e.additionalProperties).length > 0 && // Has typed additionalProperties
|
|
61
61
|
(!e.properties || Object.keys(e.properties).length === 0), _a = (e) => e["x-render"] === "jsoneditor" ? !0 : e.type === "object" && e.additionalProperties !== void 0 && typeof e.additionalProperties == "object" && Object.keys(e.additionalProperties).length === 0 && // Empty = freeform
|
|
62
|
-
(!e.properties || Object.keys(e.properties).length === 0),
|
|
62
|
+
(!e.properties || Object.keys(e.properties).length === 0), dm = (e) => e.type === "null", ga = (e) => e.const !== void 0, ba = (e) => Array.isArray(e.enum) && e.enum.length > 0, cm = (e) => (t) => t.format === e, um = (e) => st(e) && e.format === "email", $a = (e) => st(e) && e.format === "date", fm = (e) => st(e) && e.format === "time", mm = (e) => st(e) && e.format === "date-time", hm = (e) => st(e) && (e.format === "url" || e.format === "uri"), Wn = (e) => Array.isArray(e.oneOf) && e.oneOf.length > 0, wa = (e) => Array.isArray(e.anyOf) && e.anyOf.length > 0, ka = (e) => Array.isArray(e.allOf) && e.allOf.length > 0, pm = (e) => Wn(e) && e.discriminator !== void 0, ym = (e) => e.if !== void 0, vm = (e) => (t) => t[e] !== void 0, _m = (...e) => (t) => e.every((n) => n(t)), gm = (...e) => (t) => e.some((n) => n(t)), bm = (e) => (t) => !e(t);
|
|
63
63
|
function Zn(e) {
|
|
64
64
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
65
65
|
}
|
|
66
|
-
var yr = { exports: {} }, Yn = {}, $e = {},
|
|
66
|
+
var yr = { exports: {} }, Yn = {}, $e = {}, rt = {}, $t = {}, B = {}, bt = {};
|
|
67
67
|
(function(e) {
|
|
68
68
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
69
69
|
class t {
|
|
70
70
|
}
|
|
71
71
|
e._CodeOrName = t, e.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
72
72
|
class n extends t {
|
|
73
|
-
constructor(
|
|
74
|
-
if (super(), !e.IDENTIFIER.test(
|
|
73
|
+
constructor(p) {
|
|
74
|
+
if (super(), !e.IDENTIFIER.test(p))
|
|
75
75
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
76
|
-
this.str =
|
|
76
|
+
this.str = p;
|
|
77
77
|
}
|
|
78
78
|
toString() {
|
|
79
79
|
return this.str;
|
|
@@ -87,8 +87,8 @@ var yr = { exports: {} }, Yn = {}, $e = {}, tt = {}, $t = {}, B = {}, bt = {};
|
|
|
87
87
|
}
|
|
88
88
|
e.Name = n;
|
|
89
89
|
class r extends t {
|
|
90
|
-
constructor(
|
|
91
|
-
super(), this._items = typeof
|
|
90
|
+
constructor(p) {
|
|
91
|
+
super(), this._items = typeof p == "string" ? [p] : p;
|
|
92
92
|
}
|
|
93
93
|
toString() {
|
|
94
94
|
return this.str;
|
|
@@ -96,93 +96,93 @@ var yr = { exports: {} }, Yn = {}, $e = {}, tt = {}, $t = {}, B = {}, bt = {};
|
|
|
96
96
|
emptyStr() {
|
|
97
97
|
if (this._items.length > 1)
|
|
98
98
|
return !1;
|
|
99
|
-
const
|
|
100
|
-
return
|
|
99
|
+
const p = this._items[0];
|
|
100
|
+
return p === "" || p === '""';
|
|
101
101
|
}
|
|
102
102
|
get str() {
|
|
103
|
-
var
|
|
104
|
-
return (
|
|
103
|
+
var p;
|
|
104
|
+
return (p = this._str) !== null && p !== void 0 ? p : this._str = this._items.reduce((k, S) => `${k}${S}`, "");
|
|
105
105
|
}
|
|
106
106
|
get names() {
|
|
107
|
-
var
|
|
108
|
-
return (
|
|
107
|
+
var p;
|
|
108
|
+
return (p = this._names) !== null && p !== void 0 ? p : this._names = this._items.reduce((k, S) => (S instanceof n && (k[S.str] = (k[S.str] || 0) + 1), k), {});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
e._Code = r, e.nil = new r("");
|
|
112
|
-
function s(f, ...
|
|
112
|
+
function s(f, ...p) {
|
|
113
113
|
const k = [f[0]];
|
|
114
114
|
let S = 0;
|
|
115
|
-
for (; S <
|
|
116
|
-
i(k,
|
|
115
|
+
for (; S < p.length; )
|
|
116
|
+
i(k, p[S]), k.push(f[++S]);
|
|
117
117
|
return new r(k);
|
|
118
118
|
}
|
|
119
119
|
e._ = s;
|
|
120
120
|
const a = new r("+");
|
|
121
|
-
function o(f, ...
|
|
122
|
-
const k = [
|
|
121
|
+
function o(f, ...p) {
|
|
122
|
+
const k = [b(f[0])];
|
|
123
123
|
let S = 0;
|
|
124
|
-
for (; S <
|
|
125
|
-
k.push(a), i(k,
|
|
124
|
+
for (; S < p.length; )
|
|
125
|
+
k.push(a), i(k, p[S]), k.push(a, b(f[++S]));
|
|
126
126
|
return d(k), new r(k);
|
|
127
127
|
}
|
|
128
128
|
e.str = o;
|
|
129
|
-
function i(f,
|
|
130
|
-
|
|
129
|
+
function i(f, p) {
|
|
130
|
+
p instanceof r ? f.push(...p._items) : p instanceof n ? f.push(p) : f.push(m(p));
|
|
131
131
|
}
|
|
132
132
|
e.addCodeArg = i;
|
|
133
133
|
function d(f) {
|
|
134
|
-
let
|
|
135
|
-
for (;
|
|
136
|
-
if (f[
|
|
137
|
-
const k = c(f[
|
|
134
|
+
let p = 1;
|
|
135
|
+
for (; p < f.length - 1; ) {
|
|
136
|
+
if (f[p] === a) {
|
|
137
|
+
const k = c(f[p - 1], f[p + 1]);
|
|
138
138
|
if (k !== void 0) {
|
|
139
|
-
f.splice(
|
|
139
|
+
f.splice(p - 1, 3, k);
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
|
-
f[
|
|
142
|
+
f[p++] = "+";
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
p++;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
function c(f,
|
|
148
|
-
if (
|
|
147
|
+
function c(f, p) {
|
|
148
|
+
if (p === '""')
|
|
149
149
|
return f;
|
|
150
150
|
if (f === '""')
|
|
151
|
-
return
|
|
151
|
+
return p;
|
|
152
152
|
if (typeof f == "string")
|
|
153
|
-
return
|
|
154
|
-
if (typeof
|
|
155
|
-
return `"${f}${
|
|
153
|
+
return p instanceof n || f[f.length - 1] !== '"' ? void 0 : typeof p != "string" ? `${f.slice(0, -1)}${p}"` : p[0] === '"' ? f.slice(0, -1) + p.slice(1) : void 0;
|
|
154
|
+
if (typeof p == "string" && p[0] === '"' && !(f instanceof n))
|
|
155
|
+
return `"${f}${p.slice(1)}`;
|
|
156
156
|
}
|
|
157
|
-
function u(f,
|
|
158
|
-
return
|
|
157
|
+
function u(f, p) {
|
|
158
|
+
return p.emptyStr() ? f : f.emptyStr() ? p : o`${f}${p}`;
|
|
159
159
|
}
|
|
160
160
|
e.strConcat = u;
|
|
161
161
|
function m(f) {
|
|
162
|
-
return typeof f == "number" || typeof f == "boolean" || f === null ? f :
|
|
162
|
+
return typeof f == "number" || typeof f == "boolean" || f === null ? f : b(Array.isArray(f) ? f.join(",") : f);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
return new r(
|
|
164
|
+
function g(f) {
|
|
165
|
+
return new r(b(f));
|
|
166
166
|
}
|
|
167
|
-
e.stringify =
|
|
168
|
-
function
|
|
167
|
+
e.stringify = g;
|
|
168
|
+
function b(f) {
|
|
169
169
|
return JSON.stringify(f).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
170
170
|
}
|
|
171
|
-
e.safeStringify =
|
|
172
|
-
function
|
|
171
|
+
e.safeStringify = b;
|
|
172
|
+
function _(f) {
|
|
173
173
|
return typeof f == "string" && e.IDENTIFIER.test(f) ? new r(`.${f}`) : s`[${f}]`;
|
|
174
174
|
}
|
|
175
|
-
e.getProperty =
|
|
176
|
-
function
|
|
175
|
+
e.getProperty = _;
|
|
176
|
+
function $(f) {
|
|
177
177
|
if (typeof f == "string" && e.IDENTIFIER.test(f))
|
|
178
178
|
return new r(`${f}`);
|
|
179
179
|
throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`);
|
|
180
180
|
}
|
|
181
|
-
e.getEsmExportName =
|
|
182
|
-
function
|
|
181
|
+
e.getEsmExportName = $;
|
|
182
|
+
function y(f) {
|
|
183
183
|
return new r(f.toString());
|
|
184
184
|
}
|
|
185
|
-
e.regexpCode =
|
|
185
|
+
e.regexpCode = y;
|
|
186
186
|
})(bt);
|
|
187
187
|
var vr = {};
|
|
188
188
|
(function(e) {
|
|
@@ -247,17 +247,17 @@ var vr = {};
|
|
|
247
247
|
var m;
|
|
248
248
|
if (u.ref === void 0)
|
|
249
249
|
throw new Error("CodeGen: ref must be passed in value");
|
|
250
|
-
const
|
|
251
|
-
let
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
return
|
|
250
|
+
const g = this.toName(c), { prefix: b } = g, _ = (m = u.key) !== null && m !== void 0 ? m : u.ref;
|
|
251
|
+
let $ = this._values[b];
|
|
252
|
+
if ($) {
|
|
253
|
+
const p = $.get(_);
|
|
254
|
+
if (p)
|
|
255
|
+
return p;
|
|
256
256
|
} else
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const
|
|
260
|
-
return
|
|
257
|
+
$ = this._values[b] = /* @__PURE__ */ new Map();
|
|
258
|
+
$.set(_, g);
|
|
259
|
+
const y = this._scope[b] || (this._scope[b] = []), f = y.length;
|
|
260
|
+
return y[f] = u.ref, g.setValue(u, { property: b, itemIndex: f }), g;
|
|
261
261
|
}
|
|
262
262
|
getValue(c, u) {
|
|
263
263
|
const m = this._values[c];
|
|
@@ -272,35 +272,35 @@ var vr = {};
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
scopeCode(c = this._values, u, m) {
|
|
275
|
-
return this._reduceValues(c, (
|
|
276
|
-
if (
|
|
277
|
-
throw new Error(`CodeGen: name "${
|
|
278
|
-
return
|
|
275
|
+
return this._reduceValues(c, (g) => {
|
|
276
|
+
if (g.value === void 0)
|
|
277
|
+
throw new Error(`CodeGen: name "${g}" has no value`);
|
|
278
|
+
return g.value.code;
|
|
279
279
|
}, u, m);
|
|
280
280
|
}
|
|
281
|
-
_reduceValues(c, u, m = {},
|
|
282
|
-
let
|
|
283
|
-
for (const
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
281
|
+
_reduceValues(c, u, m = {}, g) {
|
|
282
|
+
let b = t.nil;
|
|
283
|
+
for (const _ in c) {
|
|
284
|
+
const $ = c[_];
|
|
285
|
+
if (!$)
|
|
286
286
|
continue;
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
if (
|
|
287
|
+
const y = m[_] = m[_] || /* @__PURE__ */ new Map();
|
|
288
|
+
$.forEach((f) => {
|
|
289
|
+
if (y.has(f))
|
|
290
290
|
return;
|
|
291
|
-
|
|
292
|
-
let
|
|
293
|
-
if (
|
|
291
|
+
y.set(f, r.Started);
|
|
292
|
+
let p = u(f);
|
|
293
|
+
if (p) {
|
|
294
294
|
const k = this.opts.es5 ? e.varKinds.var : e.varKinds.const;
|
|
295
|
-
|
|
296
|
-
} else if (
|
|
297
|
-
|
|
295
|
+
b = (0, t._)`${b}${k} ${f} = ${p};${this.opts._n}`;
|
|
296
|
+
} else if (p = g == null ? void 0 : g(f))
|
|
297
|
+
b = (0, t._)`${b}${p}${this.opts._n}`;
|
|
298
298
|
else
|
|
299
299
|
throw new n(f);
|
|
300
|
-
|
|
300
|
+
y.set(f, r.Completed);
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
return
|
|
303
|
+
return b;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
e.ValueScope = i;
|
|
@@ -422,7 +422,7 @@ var vr = {};
|
|
|
422
422
|
return this.error.names;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
class
|
|
425
|
+
class g extends a {
|
|
426
426
|
constructor(l) {
|
|
427
427
|
super(), this.code = l;
|
|
428
428
|
}
|
|
@@ -439,7 +439,7 @@ var vr = {};
|
|
|
439
439
|
return this.code instanceof t._CodeOrName ? this.code.names : {};
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
class
|
|
442
|
+
class b extends a {
|
|
443
443
|
constructor(l = []) {
|
|
444
444
|
super(), this.nodes = l;
|
|
445
445
|
}
|
|
@@ -468,17 +468,17 @@ var vr = {};
|
|
|
468
468
|
return this.nodes.reduce((l, h) => H(l, h.names), {});
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
class
|
|
471
|
+
class _ extends b {
|
|
472
472
|
render(l) {
|
|
473
473
|
return "{" + l._n + super.render(l) + "}" + l._n;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class $ extends b {
|
|
477
477
|
}
|
|
478
|
-
class
|
|
478
|
+
class y extends _ {
|
|
479
479
|
}
|
|
480
|
-
|
|
481
|
-
class f extends
|
|
480
|
+
y.kind = "else";
|
|
481
|
+
class f extends _ {
|
|
482
482
|
constructor(l, h) {
|
|
483
483
|
super(h), this.condition = l;
|
|
484
484
|
}
|
|
@@ -494,7 +494,7 @@ var vr = {};
|
|
|
494
494
|
let h = this.else;
|
|
495
495
|
if (h) {
|
|
496
496
|
const E = h.optimizeNodes();
|
|
497
|
-
h = this.else = Array.isArray(E) ? new
|
|
497
|
+
h = this.else = Array.isArray(E) ? new y(E) : E;
|
|
498
498
|
}
|
|
499
499
|
if (h)
|
|
500
500
|
return l === !1 ? h instanceof f ? h : h.nodes : this.nodes.length ? this : new f(Se(l), h instanceof f ? [h] : h.nodes);
|
|
@@ -512,10 +512,10 @@ var vr = {};
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
f.kind = "if";
|
|
515
|
-
class
|
|
515
|
+
class p extends _ {
|
|
516
516
|
}
|
|
517
|
-
|
|
518
|
-
class k extends
|
|
517
|
+
p.kind = "for";
|
|
518
|
+
class k extends p {
|
|
519
519
|
constructor(l) {
|
|
520
520
|
super(), this.iteration = l;
|
|
521
521
|
}
|
|
@@ -530,7 +530,7 @@ var vr = {};
|
|
|
530
530
|
return H(super.names, this.iteration.names);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
class S extends
|
|
533
|
+
class S extends p {
|
|
534
534
|
constructor(l, h, E, A) {
|
|
535
535
|
super(), this.varKind = l, this.name = h, this.from = E, this.to = A;
|
|
536
536
|
}
|
|
@@ -543,7 +543,7 @@ var vr = {};
|
|
|
543
543
|
return ne(l, this.to);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
class O extends
|
|
546
|
+
class O extends p {
|
|
547
547
|
constructor(l, h, E, A) {
|
|
548
548
|
super(), this.loop = l, this.varKind = h, this.name = E, this.iterable = A;
|
|
549
549
|
}
|
|
@@ -558,7 +558,7 @@ var vr = {};
|
|
|
558
558
|
return H(super.names, this.iterable.names);
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
class z extends
|
|
561
|
+
class z extends _ {
|
|
562
562
|
constructor(l, h, E) {
|
|
563
563
|
super(), this.name = l, this.args = h, this.async = E;
|
|
564
564
|
}
|
|
@@ -567,13 +567,13 @@ var vr = {};
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
z.kind = "func";
|
|
570
|
-
class J extends
|
|
570
|
+
class J extends b {
|
|
571
571
|
render(l) {
|
|
572
572
|
return "return " + super.render(l);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
J.kind = "return";
|
|
576
|
-
class M extends
|
|
576
|
+
class M extends _ {
|
|
577
577
|
render(l) {
|
|
578
578
|
let h = "try" + super.render(l);
|
|
579
579
|
return this.catch && (h += this.catch.render(l)), this.finally && (h += this.finally.render(l)), h;
|
|
@@ -591,7 +591,7 @@ var vr = {};
|
|
|
591
591
|
return this.catch && H(l, this.catch.names), this.finally && H(l, this.finally.names), l;
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
class T extends
|
|
594
|
+
class T extends _ {
|
|
595
595
|
constructor(l) {
|
|
596
596
|
super(), this.error = l;
|
|
597
597
|
}
|
|
@@ -600,7 +600,7 @@ var vr = {};
|
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
T.kind = "catch";
|
|
603
|
-
class V extends
|
|
603
|
+
class V extends _ {
|
|
604
604
|
render(l) {
|
|
605
605
|
return "finally" + super.render(l);
|
|
606
606
|
}
|
|
@@ -609,7 +609,7 @@ var vr = {};
|
|
|
609
609
|
class W {
|
|
610
610
|
constructor(l, h = {}) {
|
|
611
611
|
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...h, _n: h.lines ? `
|
|
612
|
-
` : "" }, this._extScope = l, this._scope = new n.Scope({ parent: l }), this._nodes = [new
|
|
612
|
+
` : "" }, this._extScope = l, this._scope = new n.Scope({ parent: l }), this._nodes = [new $()];
|
|
613
613
|
}
|
|
614
614
|
toString() {
|
|
615
615
|
return this._root.render(this.opts);
|
|
@@ -664,7 +664,7 @@ var vr = {};
|
|
|
664
664
|
}
|
|
665
665
|
// appends passed SafeExpr to code or executes Block
|
|
666
666
|
code(l) {
|
|
667
|
-
return typeof l == "function" ? l() : l !== t.nil && this._leafNode(new
|
|
667
|
+
return typeof l == "function" ? l() : l !== t.nil && this._leafNode(new g(l)), this;
|
|
668
668
|
}
|
|
669
669
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
670
670
|
object(...l) {
|
|
@@ -689,11 +689,11 @@ var vr = {};
|
|
|
689
689
|
}
|
|
690
690
|
// `else` clause - only valid after `if` or `else if` clauses
|
|
691
691
|
else() {
|
|
692
|
-
return this._elseNode(new
|
|
692
|
+
return this._elseNode(new y());
|
|
693
693
|
}
|
|
694
694
|
// end `if` statement (needed if gen.if was used only with condition)
|
|
695
695
|
endIf() {
|
|
696
|
-
return this._endBlockNode(f,
|
|
696
|
+
return this._endBlockNode(f, y);
|
|
697
697
|
}
|
|
698
698
|
_for(l, h) {
|
|
699
699
|
return this._blockNode(l), h && this.code(h).endFor(), this;
|
|
@@ -728,7 +728,7 @@ var vr = {};
|
|
|
728
728
|
}
|
|
729
729
|
// end `for` loop
|
|
730
730
|
endFor() {
|
|
731
|
-
return this._endBlockNode(
|
|
731
|
+
return this._endBlockNode(p);
|
|
732
732
|
}
|
|
733
733
|
// `label` statement
|
|
734
734
|
label(l) {
|
|
@@ -847,17 +847,17 @@ var vr = {};
|
|
|
847
847
|
return typeof w == "boolean" || typeof w == "number" || w === null ? !w : (0, t._)`!${P(w)}`;
|
|
848
848
|
}
|
|
849
849
|
e.not = Se;
|
|
850
|
-
const
|
|
850
|
+
const Je = v(e.operators.AND);
|
|
851
851
|
function Zt(...w) {
|
|
852
|
-
return w.reduce(
|
|
852
|
+
return w.reduce(Je);
|
|
853
853
|
}
|
|
854
854
|
e.and = Zt;
|
|
855
|
-
const Et =
|
|
856
|
-
function
|
|
855
|
+
const Et = v(e.operators.OR);
|
|
856
|
+
function I(...w) {
|
|
857
857
|
return w.reduce(Et);
|
|
858
858
|
}
|
|
859
|
-
e.or =
|
|
860
|
-
function
|
|
859
|
+
e.or = I;
|
|
860
|
+
function v(w) {
|
|
861
861
|
return (l, h) => l === t.nil ? h : h === t.nil ? l : (0, t._)`${P(l)} ${w} ${P(h)}`;
|
|
862
862
|
}
|
|
863
863
|
function P(w) {
|
|
@@ -867,7 +867,7 @@ var vr = {};
|
|
|
867
867
|
var N = {};
|
|
868
868
|
Object.defineProperty(N, "__esModule", { value: !0 });
|
|
869
869
|
N.checkStrictMode = N.getErrorPath = N.Type = N.useFunc = N.setEvaluated = N.evaluatedPropsToName = N.mergeEvaluated = N.eachItem = N.unescapeJsonPointer = N.escapeJsonPointer = N.escapeFragment = N.unescapeFragment = N.schemaRefOrVal = N.schemaHasRulesButRef = N.schemaHasRules = N.checkUnknownRules = N.alwaysValidSchema = N.toHash = void 0;
|
|
870
|
-
const
|
|
870
|
+
const X = B, Sa = bt;
|
|
871
871
|
function Ea(e) {
|
|
872
872
|
const t = {};
|
|
873
873
|
for (const n of e)
|
|
@@ -911,9 +911,9 @@ function ja({ topSchemaRef: e, schemaPath: t }, n, r, s) {
|
|
|
911
911
|
if (typeof n == "number" || typeof n == "boolean")
|
|
912
912
|
return n;
|
|
913
913
|
if (typeof n == "string")
|
|
914
|
-
return (0,
|
|
914
|
+
return (0, X._)`${n}`;
|
|
915
915
|
}
|
|
916
|
-
return (0,
|
|
916
|
+
return (0, X._)`${e}${t}${(0, X.getProperty)(r)}`;
|
|
917
917
|
}
|
|
918
918
|
N.schemaRefOrVal = ja;
|
|
919
919
|
function qa(e) {
|
|
@@ -942,24 +942,24 @@ function Na(e, t) {
|
|
|
942
942
|
N.eachItem = Na;
|
|
943
943
|
function kn({ mergeNames: e, mergeToName: t, mergeValues: n, resultToName: r }) {
|
|
944
944
|
return (s, a, o, i) => {
|
|
945
|
-
const d = o === void 0 ? a : o instanceof
|
|
946
|
-
return i ===
|
|
945
|
+
const d = o === void 0 ? a : o instanceof X.Name ? (a instanceof X.Name ? e(s, a, o) : t(s, a, o), o) : a instanceof X.Name ? (t(s, o, a), a) : n(a, o);
|
|
946
|
+
return i === X.Name && !(d instanceof X.Name) ? r(s, d) : d;
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
949
|
N.mergeEvaluated = {
|
|
950
950
|
props: kn({
|
|
951
|
-
mergeNames: (e, t, n) => e.if((0,
|
|
952
|
-
e.if((0,
|
|
951
|
+
mergeNames: (e, t, n) => e.if((0, X._)`${n} !== true && ${t} !== undefined`, () => {
|
|
952
|
+
e.if((0, X._)`${t} === true`, () => e.assign(n, !0), () => e.assign(n, (0, X._)`${n} || {}`).code((0, X._)`Object.assign(${n}, ${t})`));
|
|
953
953
|
}),
|
|
954
|
-
mergeToName: (e, t, n) => e.if((0,
|
|
955
|
-
t === !0 ? e.assign(n, !0) : (e.assign(n, (0,
|
|
954
|
+
mergeToName: (e, t, n) => e.if((0, X._)`${n} !== true`, () => {
|
|
955
|
+
t === !0 ? e.assign(n, !0) : (e.assign(n, (0, X._)`${n} || {}`), qr(e, n, t));
|
|
956
956
|
}),
|
|
957
957
|
mergeValues: (e, t) => e === !0 ? !0 : { ...e, ...t },
|
|
958
958
|
resultToName: ts
|
|
959
959
|
}),
|
|
960
960
|
items: kn({
|
|
961
|
-
mergeNames: (e, t, n) => e.if((0,
|
|
962
|
-
mergeToName: (e, t, n) => e.if((0,
|
|
961
|
+
mergeNames: (e, t, n) => e.if((0, X._)`${n} !== true && ${t} !== undefined`, () => e.assign(n, (0, X._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),
|
|
962
|
+
mergeToName: (e, t, n) => e.if((0, X._)`${n} !== true`, () => e.assign(n, t === !0 ? !0 : (0, X._)`${n} > ${t} ? ${n} : ${t}`)),
|
|
963
963
|
mergeValues: (e, t) => e === !0 ? !0 : Math.max(e, t),
|
|
964
964
|
resultToName: (e, t) => e.var("items", t)
|
|
965
965
|
})
|
|
@@ -967,12 +967,12 @@ N.mergeEvaluated = {
|
|
|
967
967
|
function ts(e, t) {
|
|
968
968
|
if (t === !0)
|
|
969
969
|
return e.var("props", !0);
|
|
970
|
-
const n = e.var("props", (0,
|
|
970
|
+
const n = e.var("props", (0, X._)`{}`);
|
|
971
971
|
return t !== void 0 && qr(e, n, t), n;
|
|
972
972
|
}
|
|
973
973
|
N.evaluatedPropsToName = ts;
|
|
974
974
|
function qr(e, t, n) {
|
|
975
|
-
Object.keys(n).forEach((r) => e.assign((0,
|
|
975
|
+
Object.keys(n).forEach((r) => e.assign((0, X._)`${t}${(0, X.getProperty)(r)}`, !0));
|
|
976
976
|
}
|
|
977
977
|
N.setEvaluated = qr;
|
|
978
978
|
const Sn = {};
|
|
@@ -988,11 +988,11 @@ var _r;
|
|
|
988
988
|
e[e.Num = 0] = "Num", e[e.Str = 1] = "Str";
|
|
989
989
|
})(_r || (N.Type = _r = {}));
|
|
990
990
|
function Ta(e, t, n) {
|
|
991
|
-
if (e instanceof
|
|
991
|
+
if (e instanceof X.Name) {
|
|
992
992
|
const r = t === _r.Num;
|
|
993
|
-
return n ? r ? (0,
|
|
993
|
+
return n ? r ? (0, X._)`"[" + ${e} + "]"` : (0, X._)`"['" + ${e} + "']"` : r ? (0, X._)`"/" + ${e}` : (0, X._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
|
|
994
994
|
}
|
|
995
|
-
return n ? (0,
|
|
995
|
+
return n ? (0, X.getProperty)(e).toString() : "/" + jr(e);
|
|
996
996
|
}
|
|
997
997
|
N.getErrorPath = Ta;
|
|
998
998
|
function rs(e, t, n = e.opts.strictSchema) {
|
|
@@ -1039,40 +1039,40 @@ Ie.default = Ra;
|
|
|
1039
1039
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
1040
1040
|
const t = B, n = N, r = Ie;
|
|
1041
1041
|
e.keywordError = {
|
|
1042
|
-
message: ({ keyword:
|
|
1042
|
+
message: ({ keyword: y }) => (0, t.str)`must pass "${y}" keyword validation`
|
|
1043
1043
|
}, e.keyword$DataError = {
|
|
1044
|
-
message: ({ keyword:
|
|
1044
|
+
message: ({ keyword: y, schemaType: f }) => f ? (0, t.str)`"${y}" keyword must be ${f} ($data)` : (0, t.str)`"${y}" keyword is invalid ($data)`
|
|
1045
1045
|
};
|
|
1046
|
-
function s(
|
|
1047
|
-
const { it: S } =
|
|
1046
|
+
function s(y, f = e.keywordError, p, k) {
|
|
1047
|
+
const { it: S } = y, { gen: O, compositeRule: z, allErrors: J } = S, M = m(y, f, p);
|
|
1048
1048
|
k ?? (z || J) ? d(O, M) : c(S, (0, t._)`[${M}]`);
|
|
1049
1049
|
}
|
|
1050
1050
|
e.reportError = s;
|
|
1051
|
-
function a(
|
|
1052
|
-
const { it: k } =
|
|
1051
|
+
function a(y, f = e.keywordError, p) {
|
|
1052
|
+
const { it: k } = y, { gen: S, compositeRule: O, allErrors: z } = k, J = m(y, f, p);
|
|
1053
1053
|
d(S, J), O || z || c(k, r.default.vErrors);
|
|
1054
1054
|
}
|
|
1055
1055
|
e.reportExtraError = a;
|
|
1056
|
-
function o(
|
|
1057
|
-
|
|
1056
|
+
function o(y, f) {
|
|
1057
|
+
y.assign(r.default.errors, f), y.if((0, t._)`${r.default.vErrors} !== null`, () => y.if(f, () => y.assign((0, t._)`${r.default.vErrors}.length`, f), () => y.assign(r.default.vErrors, null)));
|
|
1058
1058
|
}
|
|
1059
1059
|
e.resetErrorsCount = o;
|
|
1060
|
-
function i({ gen:
|
|
1060
|
+
function i({ gen: y, keyword: f, schemaValue: p, data: k, errsCount: S, it: O }) {
|
|
1061
1061
|
if (S === void 0)
|
|
1062
1062
|
throw new Error("ajv implementation error");
|
|
1063
|
-
const z =
|
|
1064
|
-
|
|
1065
|
-
|
|
1063
|
+
const z = y.name("err");
|
|
1064
|
+
y.forRange("i", S, r.default.errors, (J) => {
|
|
1065
|
+
y.const(z, (0, t._)`${r.default.vErrors}[${J}]`), y.if((0, t._)`${z}.instancePath === undefined`, () => y.assign((0, t._)`${z}.instancePath`, (0, t.strConcat)(r.default.instancePath, O.errorPath))), y.assign((0, t._)`${z}.schemaPath`, (0, t.str)`${O.errSchemaPath}/${f}`), O.opts.verbose && (y.assign((0, t._)`${z}.schema`, p), y.assign((0, t._)`${z}.data`, k));
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
1068
|
e.extendErrors = i;
|
|
1069
|
-
function d(
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1069
|
+
function d(y, f) {
|
|
1070
|
+
const p = y.const("err", f);
|
|
1071
|
+
y.if((0, t._)`${r.default.vErrors} === null`, () => y.assign(r.default.vErrors, (0, t._)`[${p}]`), (0, t._)`${r.default.vErrors}.push(${p})`), y.code((0, t._)`${r.default.errors}++`);
|
|
1072
1072
|
}
|
|
1073
|
-
function c(
|
|
1074
|
-
const { gen:
|
|
1075
|
-
S.$async ?
|
|
1073
|
+
function c(y, f) {
|
|
1074
|
+
const { gen: p, validateName: k, schemaEnv: S } = y;
|
|
1075
|
+
S.$async ? p.throw((0, t._)`new ${y.ValidationError}(${f})`) : (p.assign((0, t._)`${k}.errors`, f), p.return(!1));
|
|
1076
1076
|
}
|
|
1077
1077
|
const u = {
|
|
1078
1078
|
keyword: new t.Name("keyword"),
|
|
@@ -1084,32 +1084,32 @@ Ie.default = Ra;
|
|
|
1084
1084
|
schema: new t.Name("schema"),
|
|
1085
1085
|
parentSchema: new t.Name("parentSchema")
|
|
1086
1086
|
};
|
|
1087
|
-
function m(
|
|
1088
|
-
const { createErrors: k } =
|
|
1089
|
-
return k === !1 ? (0, t._)`{}` :
|
|
1090
|
-
}
|
|
1091
|
-
function
|
|
1092
|
-
const { gen: k, it: S } =
|
|
1093
|
-
|
|
1094
|
-
|
|
1087
|
+
function m(y, f, p) {
|
|
1088
|
+
const { createErrors: k } = y.it;
|
|
1089
|
+
return k === !1 ? (0, t._)`{}` : g(y, f, p);
|
|
1090
|
+
}
|
|
1091
|
+
function g(y, f, p = {}) {
|
|
1092
|
+
const { gen: k, it: S } = y, O = [
|
|
1093
|
+
b(S, p),
|
|
1094
|
+
_(y, p)
|
|
1095
1095
|
];
|
|
1096
|
-
return
|
|
1096
|
+
return $(y, f, O), k.object(...O);
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const
|
|
1100
|
-
return [r.default.instancePath, (0, t.strConcat)(r.default.instancePath,
|
|
1098
|
+
function b({ errorPath: y }, { instancePath: f }) {
|
|
1099
|
+
const p = f ? (0, t.str)`${y}${(0, n.getErrorPath)(f, n.Type.Str)}` : y;
|
|
1100
|
+
return [r.default.instancePath, (0, t.strConcat)(r.default.instancePath, p)];
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
let S = k ? f : (0, t.str)`${f}/${
|
|
1104
|
-
return
|
|
1102
|
+
function _({ keyword: y, it: { errSchemaPath: f } }, { schemaPath: p, parentSchema: k }) {
|
|
1103
|
+
let S = k ? f : (0, t.str)`${f}/${y}`;
|
|
1104
|
+
return p && (S = (0, t.str)`${S}${(0, n.getErrorPath)(p, n.Type.Str)}`), [u.schemaPath, S];
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1107
|
-
const { keyword: S, data: O, schemaValue: z, it: J } =
|
|
1108
|
-
k.push([u.keyword, S], [u.params, typeof f == "function" ? f(
|
|
1106
|
+
function $(y, { params: f, message: p }, k) {
|
|
1107
|
+
const { keyword: S, data: O, schemaValue: z, it: J } = y, { opts: M, propertyName: T, topSchemaRef: V, schemaPath: W } = J;
|
|
1108
|
+
k.push([u.keyword, S], [u.params, typeof f == "function" ? f(y) : f || (0, t._)`{}`]), M.messages && k.push([u.message, typeof p == "function" ? p(y) : p]), M.verbose && k.push([u.schema, z], [u.parentSchema, (0, t._)`${V}${W}`], [r.default.data, O]), T && k.push([u.propertyName, T]);
|
|
1109
1109
|
}
|
|
1110
1110
|
})($t);
|
|
1111
|
-
Object.defineProperty(
|
|
1112
|
-
|
|
1111
|
+
Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
1112
|
+
rt.boolOrEmptySchema = rt.topBoolOrEmptySchema = void 0;
|
|
1113
1113
|
const Aa = $t, Da = B, Fa = Ie, Ca = {
|
|
1114
1114
|
message: "boolean schema is false"
|
|
1115
1115
|
};
|
|
@@ -1117,12 +1117,12 @@ function Va(e) {
|
|
|
1117
1117
|
const { gen: t, schema: n, validateName: r } = e;
|
|
1118
1118
|
n === !1 ? ns(e, !1) : typeof n == "object" && n.$async === !0 ? t.return(Fa.default.data) : (t.assign((0, Da._)`${r}.errors`, null), t.return(!0));
|
|
1119
1119
|
}
|
|
1120
|
-
|
|
1120
|
+
rt.topBoolOrEmptySchema = Va;
|
|
1121
1121
|
function za(e, t) {
|
|
1122
1122
|
const { gen: n, schema: r } = e;
|
|
1123
1123
|
r === !1 ? (n.var(t, !1), ns(e)) : n.var(t, !0);
|
|
1124
1124
|
}
|
|
1125
|
-
|
|
1125
|
+
rt.boolOrEmptySchema = za;
|
|
1126
1126
|
function ns(e, t) {
|
|
1127
1127
|
const { gen: n, data: r } = e, s = {
|
|
1128
1128
|
gen: n,
|
|
@@ -1180,10 +1180,10 @@ Me.shouldUseRule = as;
|
|
|
1180
1180
|
Object.defineProperty(se, "__esModule", { value: !0 });
|
|
1181
1181
|
se.reportTypeError = se.checkDataTypes = se.checkDataType = se.coerceAndCheckDataType = se.getJSONTypes = se.getSchemaTypes = se.DataType = void 0;
|
|
1182
1182
|
const Ba = Ge, xa = Me, Ja = $t, K = B, os = N;
|
|
1183
|
-
var
|
|
1183
|
+
var et;
|
|
1184
1184
|
(function(e) {
|
|
1185
1185
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
1186
|
-
})(
|
|
1186
|
+
})(et || (se.DataType = et = {}));
|
|
1187
1187
|
function Wa(e) {
|
|
1188
1188
|
const t = is(e.type);
|
|
1189
1189
|
if (t.includes("null")) {
|
|
@@ -1207,7 +1207,7 @@ se.getJSONTypes = is;
|
|
|
1207
1207
|
function Za(e, t) {
|
|
1208
1208
|
const { gen: n, data: r, opts: s } = e, a = Ya(t, s.coerceTypes), o = t.length > 0 && !(a.length === 0 && t.length === 1 && (0, xa.schemaHasRulesForType)(e, t[0]));
|
|
1209
1209
|
if (o) {
|
|
1210
|
-
const i = Ir(t, r, s.strictNumbers,
|
|
1210
|
+
const i = Ir(t, r, s.strictNumbers, et.Wrong);
|
|
1211
1211
|
n.if(i, () => {
|
|
1212
1212
|
a.length ? Qa(e, t, a) : Nr(e);
|
|
1213
1213
|
});
|
|
@@ -1255,8 +1255,8 @@ function Qa(e, t, n) {
|
|
|
1255
1255
|
function Xa({ gen: e, parentData: t, parentDataProperty: n }, r) {
|
|
1256
1256
|
e.if((0, K._)`${t} !== undefined`, () => e.assign((0, K._)`${t}[${n}]`, r));
|
|
1257
1257
|
}
|
|
1258
|
-
function gr(e, t, n, r =
|
|
1259
|
-
const s = r ===
|
|
1258
|
+
function gr(e, t, n, r = et.Correct) {
|
|
1259
|
+
const s = r === et.Correct ? K.operators.EQ : K.operators.NEQ;
|
|
1260
1260
|
let a;
|
|
1261
1261
|
switch (e) {
|
|
1262
1262
|
case "null":
|
|
@@ -1276,7 +1276,7 @@ function gr(e, t, n, r = Xe.Correct) {
|
|
|
1276
1276
|
default:
|
|
1277
1277
|
return (0, K._)`typeof ${t} ${s} ${e}`;
|
|
1278
1278
|
}
|
|
1279
|
-
return r ===
|
|
1279
|
+
return r === et.Correct ? a : (0, K.not)(a);
|
|
1280
1280
|
function o(i = K.nil) {
|
|
1281
1281
|
return (0, K.and)((0, K._)`typeof ${t} == "number"`, i, n ? (0, K._)`isFinite(${t})` : K.nil);
|
|
1282
1282
|
}
|
|
@@ -1324,7 +1324,7 @@ function to(e) {
|
|
|
1324
1324
|
var Kt = {};
|
|
1325
1325
|
Object.defineProperty(Kt, "__esModule", { value: !0 });
|
|
1326
1326
|
Kt.assignDefaults = void 0;
|
|
1327
|
-
const
|
|
1327
|
+
const Ze = B, ro = N;
|
|
1328
1328
|
function no(e, t) {
|
|
1329
1329
|
const { properties: n, items: r } = e.schema;
|
|
1330
1330
|
if (t === "object" && n)
|
|
@@ -1337,13 +1337,13 @@ function En(e, t, n) {
|
|
|
1337
1337
|
const { gen: r, compositeRule: s, data: a, opts: o } = e;
|
|
1338
1338
|
if (n === void 0)
|
|
1339
1339
|
return;
|
|
1340
|
-
const i = (0,
|
|
1340
|
+
const i = (0, Ze._)`${a}${(0, Ze.getProperty)(t)}`;
|
|
1341
1341
|
if (s) {
|
|
1342
1342
|
(0, ro.checkStrictMode)(e, `default is ignored for: ${i}`);
|
|
1343
1343
|
return;
|
|
1344
1344
|
}
|
|
1345
|
-
let d = (0,
|
|
1346
|
-
o.useDefaults === "empty" && (d = (0,
|
|
1345
|
+
let d = (0, Ze._)`${i} === undefined`;
|
|
1346
|
+
o.useDefaults === "empty" && (d = (0, Ze._)`${d} || ${i} === null || ${i} === ""`), r.if(d, (0, Ze._)`${i} = ${(0, Ze.stringify)(n)}`);
|
|
1347
1347
|
}
|
|
1348
1348
|
var Pe = {}, x = {};
|
|
1349
1349
|
Object.defineProperty(x, "__esModule", { value: !0 });
|
|
@@ -1402,8 +1402,8 @@ function uo({ schemaCode: e, data: t, it: { gen: n, topSchemaRef: r, schemaPath:
|
|
|
1402
1402
|
[Ae.default.rootData, Ae.default.rootData]
|
|
1403
1403
|
];
|
|
1404
1404
|
o.opts.dynamicRef && m.push([Ae.default.dynamicAnchors, Ae.default.dynamicAnchors]);
|
|
1405
|
-
const
|
|
1406
|
-
return d !== ee.nil ? (0, ee._)`${i}.call(${d}, ${
|
|
1405
|
+
const g = (0, ee._)`${u}, ${n.object(...m)}`;
|
|
1406
|
+
return d !== ee.nil ? (0, ee._)`${i}.call(${d}, ${g})` : (0, ee._)`${i}(${g})`;
|
|
1407
1407
|
}
|
|
1408
1408
|
x.callValidateCode = uo;
|
|
1409
1409
|
const fo = (0, ee._)`new RegExp`;
|
|
@@ -1473,30 +1473,30 @@ function go(e, t) {
|
|
|
1473
1473
|
const { gen: r, keyword: s, schema: a, parentSchema: o, $data: i, it: d } = e;
|
|
1474
1474
|
$o(d, t);
|
|
1475
1475
|
const c = !i && t.compile ? t.compile.call(d.self, a, o, d) : t.validate, u = us(r, s, c), m = r.let("valid");
|
|
1476
|
-
e.block$data(m,
|
|
1477
|
-
function
|
|
1476
|
+
e.block$data(m, g), e.ok((n = t.valid) !== null && n !== void 0 ? n : m);
|
|
1477
|
+
function g() {
|
|
1478
1478
|
if (t.errors === !1)
|
|
1479
|
-
|
|
1479
|
+
$(), t.modifying && Pn(e), y(() => e.error());
|
|
1480
1480
|
else {
|
|
1481
|
-
const f = t.async ?
|
|
1482
|
-
t.modifying && Pn(e),
|
|
1481
|
+
const f = t.async ? b() : _();
|
|
1482
|
+
t.modifying && Pn(e), y(() => bo(e, f));
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function b() {
|
|
1486
1486
|
const f = r.let("ruleErrs", null);
|
|
1487
|
-
return r.try(() =>
|
|
1487
|
+
return r.try(() => $((0, ce._)`await `), (p) => r.assign(m, !1).if((0, ce._)`${p} instanceof ${d.ValidationError}`, () => r.assign(f, (0, ce._)`${p}.errors`), () => r.throw(p))), f;
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function _() {
|
|
1490
1490
|
const f = (0, ce._)`${u}.errors`;
|
|
1491
|
-
return r.assign(f, null),
|
|
1491
|
+
return r.assign(f, null), $(ce.nil), f;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
const
|
|
1495
|
-
r.assign(m, (0, ce._)`${f}${(0, yo.callValidateCode)(e, u,
|
|
1493
|
+
function $(f = t.async ? (0, ce._)`await ` : ce.nil) {
|
|
1494
|
+
const p = d.opts.passContext ? ze.default.this : ze.default.self, k = !("compile" in t && !i || t.schema === !1);
|
|
1495
|
+
r.assign(m, (0, ce._)`${f}${(0, yo.callValidateCode)(e, u, p, k)}`, t.modifying);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
var
|
|
1499
|
-
r.if((0, ce.not)((
|
|
1497
|
+
function y(f) {
|
|
1498
|
+
var p;
|
|
1499
|
+
r.if((0, ce.not)((p = t.valid) !== null && p !== void 0 ? p : m), f);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
Pe.funcKeywordCode = go;
|
|
@@ -1575,8 +1575,8 @@ function Eo(e, t, { dataProp: n, dataPropType: r, data: s, dataTypes: a, propert
|
|
|
1575
1575
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
1576
1576
|
const { gen: i } = t;
|
|
1577
1577
|
if (n !== void 0) {
|
|
1578
|
-
const { errorPath: c, dataPathArr: u, opts: m } = t,
|
|
1579
|
-
d(
|
|
1578
|
+
const { errorPath: c, dataPathArr: u, opts: m } = t, g = i.let("data", (0, Ee._)`${t.data}${(0, Ee.getProperty)(n)}`, !0);
|
|
1579
|
+
d(g), e.errorPath = (0, Ee.str)`${c}${(0, fs.getErrorPath)(n, r, m.jsPropertySyntax)}`, e.parentDataProperty = (0, Ee._)`${n}`, e.dataPathArr = [...u, e.parentDataProperty];
|
|
1580
1580
|
}
|
|
1581
1581
|
if (s !== void 0) {
|
|
1582
1582
|
const c = s instanceof Ee.Name ? s : i.let("data", s, !0);
|
|
@@ -1674,12 +1674,12 @@ function Tt(e, t, n, r, s, a, o, i, d, c) {
|
|
|
1674
1674
|
var m = r[u];
|
|
1675
1675
|
if (Array.isArray(m)) {
|
|
1676
1676
|
if (u in Fe.arrayKeywords)
|
|
1677
|
-
for (var
|
|
1678
|
-
Tt(e, t, n, m[
|
|
1677
|
+
for (var g = 0; g < m.length; g++)
|
|
1678
|
+
Tt(e, t, n, m[g], s + "/" + u + "/" + g, a, s, u, r, g);
|
|
1679
1679
|
} else if (u in Fe.propsKeywords) {
|
|
1680
1680
|
if (m && typeof m == "object")
|
|
1681
|
-
for (var
|
|
1682
|
-
Tt(e, t, n, m[
|
|
1681
|
+
for (var b in m)
|
|
1682
|
+
Tt(e, t, n, m[b], s + "/" + u + "/" + Oo(b), a, s, u, r, b);
|
|
1683
1683
|
} else (u in Fe.keywords || e.allKeys && !(u in Fe.skipKeywords)) && Tt(e, t, n, m, s + "/" + u, a, s, u, r);
|
|
1684
1684
|
}
|
|
1685
1685
|
n(r, s, a, o, i, d, c);
|
|
@@ -1741,7 +1741,7 @@ function ps(e) {
|
|
|
1741
1741
|
return t;
|
|
1742
1742
|
}
|
|
1743
1743
|
function ys(e, t = "", n) {
|
|
1744
|
-
n !== !1 && (t =
|
|
1744
|
+
n !== !1 && (t = tt(t));
|
|
1745
1745
|
const r = e.parse(t);
|
|
1746
1746
|
return vs(e, r);
|
|
1747
1747
|
}
|
|
@@ -1751,34 +1751,34 @@ function vs(e, t) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
le._getFullPath = vs;
|
|
1753
1753
|
const Ao = /#\/?$/;
|
|
1754
|
-
function
|
|
1754
|
+
function tt(e) {
|
|
1755
1755
|
return e ? e.replace(Ao, "") : "";
|
|
1756
1756
|
}
|
|
1757
|
-
le.normalizeId =
|
|
1757
|
+
le.normalizeId = tt;
|
|
1758
1758
|
function Do(e, t, n) {
|
|
1759
|
-
return n =
|
|
1759
|
+
return n = tt(n), e.resolve(t, n);
|
|
1760
1760
|
}
|
|
1761
1761
|
le.resolveUrl = Do;
|
|
1762
1762
|
const Fo = /^[a-z_][-a-z0-9._]*$/i;
|
|
1763
1763
|
function Co(e, t) {
|
|
1764
1764
|
if (typeof e == "boolean")
|
|
1765
1765
|
return {};
|
|
1766
|
-
const { schemaId: n, uriResolver: r } = this.opts, s =
|
|
1767
|
-
return No(e, { allKeys: !0 }, (m, b,
|
|
1768
|
-
if (
|
|
1766
|
+
const { schemaId: n, uriResolver: r } = this.opts, s = tt(e[n] || t), a = { "": s }, o = ys(r, s, !1), i = {}, d = /* @__PURE__ */ new Set();
|
|
1767
|
+
return No(e, { allKeys: !0 }, (m, g, b, _) => {
|
|
1768
|
+
if (_ === void 0)
|
|
1769
1769
|
return;
|
|
1770
|
-
const
|
|
1771
|
-
let
|
|
1772
|
-
typeof m[n] == "string" && (
|
|
1770
|
+
const $ = o + g;
|
|
1771
|
+
let y = a[_];
|
|
1772
|
+
typeof m[n] == "string" && (y = f.call(this, m[n])), p.call(this, m.$anchor), p.call(this, m.$dynamicAnchor), a[g] = y;
|
|
1773
1773
|
function f(k) {
|
|
1774
1774
|
const S = this.opts.uriResolver.resolve;
|
|
1775
|
-
if (k =
|
|
1775
|
+
if (k = tt(y ? S(y, k) : k), d.has(k))
|
|
1776
1776
|
throw u(k);
|
|
1777
1777
|
d.add(k);
|
|
1778
1778
|
let O = this.refs[k];
|
|
1779
|
-
return typeof O == "string" && (O = this.refs[O]), typeof O == "object" ? c(m, O.schema, k) : k !==
|
|
1779
|
+
return typeof O == "string" && (O = this.refs[O]), typeof O == "object" ? c(m, O.schema, k) : k !== tt($) && (k[0] === "#" ? (c(m, i[k], k), i[k] = m) : this.refs[k] = $), k;
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function p(k) {
|
|
1782
1782
|
if (typeof k == "string") {
|
|
1783
1783
|
if (!Fo.test(k))
|
|
1784
1784
|
throw new Error(`invalid anchor "${k}"`);
|
|
@@ -1786,9 +1786,9 @@ function Co(e, t) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
}), i;
|
|
1789
|
-
function c(m,
|
|
1790
|
-
if (
|
|
1791
|
-
throw u(
|
|
1789
|
+
function c(m, g, b) {
|
|
1790
|
+
if (g !== void 0 && !Io(m, g))
|
|
1791
|
+
throw u(b);
|
|
1792
1792
|
}
|
|
1793
1793
|
function u(m) {
|
|
1794
1794
|
return new Error(`reference "${m}" resolves to more than one schema`);
|
|
@@ -1797,7 +1797,7 @@ function Co(e, t) {
|
|
|
1797
1797
|
le.getSchemaRefs = Co;
|
|
1798
1798
|
Object.defineProperty($e, "__esModule", { value: !0 });
|
|
1799
1799
|
$e.getData = $e.KeywordCxt = $e.validateFunctionCode = void 0;
|
|
1800
|
-
const _s =
|
|
1800
|
+
const _s = rt, On = se, Ar = Me, Ct = se, Vo = Kt, mt = Pe, ur = Ce, R = B, U = Ie, zo = le, Te = N, dt = $t;
|
|
1801
1801
|
function Uo(e) {
|
|
1802
1802
|
if ($s(e) && (ws(e), bs(e))) {
|
|
1803
1803
|
Ko(e);
|
|
@@ -1907,12 +1907,12 @@ function qn(e, t, n, r) {
|
|
|
1907
1907
|
return;
|
|
1908
1908
|
}
|
|
1909
1909
|
d.jtd || ei(e, t), s.block(() => {
|
|
1910
|
-
for (const
|
|
1911
|
-
m(
|
|
1910
|
+
for (const g of u.rules)
|
|
1911
|
+
m(g);
|
|
1912
1912
|
m(u.post);
|
|
1913
1913
|
});
|
|
1914
|
-
function m(
|
|
1915
|
-
(0, Ar.shouldUseGroup)(a,
|
|
1914
|
+
function m(g) {
|
|
1915
|
+
(0, Ar.shouldUseGroup)(a, g) && (g.type ? (s.if((0, Ct.checkDataType)(g.type, o, d.strictNumbers)), In(e, g), t.length === 1 && t[0] === g.type && n && (s.else(), (0, Ct.reportTypeError)(e)), s.endIf()) : In(e, g), i || s.if((0, R._)`${U.default.errors} === ${r || 0}`));
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
function In(e, t) {
|
|
@@ -2113,15 +2113,15 @@ class li extends Error {
|
|
|
2113
2113
|
}
|
|
2114
2114
|
}
|
|
2115
2115
|
wt.default = li;
|
|
2116
|
-
var
|
|
2117
|
-
Object.defineProperty(
|
|
2116
|
+
var at = {};
|
|
2117
|
+
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
2118
2118
|
const fr = le;
|
|
2119
2119
|
class di extends Error {
|
|
2120
2120
|
constructor(t, n, r, s) {
|
|
2121
2121
|
super(s || `can't resolve reference ${r} from id ${n}`), this.missingRef = (0, fr.resolveUrl)(t, n, r), this.missingSchema = (0, fr.normalizeId)((0, fr.getFullPath)(t, this.missingRef));
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
2124
|
-
|
|
2124
|
+
at.default = di;
|
|
2125
2125
|
var fe = {};
|
|
2126
2126
|
Object.defineProperty(fe, "__esModule", { value: !0 });
|
|
2127
2127
|
fe.resolveSchema = fe.getCompilingSchema = fe.resolveRef = fe.compileSchema = fe.SchemaEnv = void 0;
|
|
@@ -2177,17 +2177,17 @@ function Fr(e) {
|
|
|
2177
2177
|
this._compilations.add(e), (0, ui.validateFunctionCode)(c), o.optimize(this.opts.code.optimize);
|
|
2178
2178
|
const m = o.toString();
|
|
2179
2179
|
u = `${o.scopeRefs(Ve.default.scope)}return ${m}`, this.opts.code.process && (u = this.opts.code.process(u, e));
|
|
2180
|
-
const
|
|
2181
|
-
if (this.scope.value(d, { ref:
|
|
2182
|
-
const { props:
|
|
2183
|
-
|
|
2184
|
-
props:
|
|
2185
|
-
items:
|
|
2186
|
-
dynamicProps:
|
|
2187
|
-
dynamicItems:
|
|
2188
|
-
},
|
|
2189
|
-
}
|
|
2190
|
-
return e.validate =
|
|
2180
|
+
const b = new Function(`${Ve.default.self}`, `${Ve.default.scope}`, u)(this, this.scope.get());
|
|
2181
|
+
if (this.scope.value(d, { ref: b }), b.errors = null, b.schema = e.schema, b.schemaEnv = e, e.$async && (b.$async = !0), this.opts.code.source === !0 && (b.source = { validateName: d, validateCode: m, scopeValues: o._values }), this.opts.unevaluated) {
|
|
2182
|
+
const { props: _, items: $ } = c;
|
|
2183
|
+
b.evaluated = {
|
|
2184
|
+
props: _ instanceof _e.Name ? void 0 : _,
|
|
2185
|
+
items: $ instanceof _e.Name ? void 0 : $,
|
|
2186
|
+
dynamicProps: _ instanceof _e.Name,
|
|
2187
|
+
dynamicItems: $ instanceof _e.Name
|
|
2188
|
+
}, b.source && (b.source.evaluated = (0, _e.stringify)(b.evaluated));
|
|
2189
|
+
}
|
|
2190
|
+
return e.validate = b, e;
|
|
2191
2191
|
} catch (m) {
|
|
2192
2192
|
throw delete e.validate, delete e.validateName, u && this.logger.error("Error compiling schema, function code:", u), m;
|
|
2193
2193
|
} finally {
|
|
@@ -2695,9 +2695,9 @@ Cr.default = zs;
|
|
|
2695
2695
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
2696
2696
|
return n.CodeGen;
|
|
2697
2697
|
} });
|
|
2698
|
-
const r = wt, s =
|
|
2699
|
-
|
|
2700
|
-
const
|
|
2698
|
+
const r = wt, s = at, a = Ge, o = fe, i = B, d = le, c = se, u = N, m = ki, g = Cr, b = (I, v) => new RegExp(I, v);
|
|
2699
|
+
b.code = "new RegExp";
|
|
2700
|
+
const _ = ["removeAdditional", "useDefaults", "coerceTypes"], $ = /* @__PURE__ */ new Set([
|
|
2701
2701
|
"validate",
|
|
2702
2702
|
"serialize",
|
|
2703
2703
|
"parse",
|
|
@@ -2711,7 +2711,7 @@ Cr.default = zs;
|
|
|
2711
2711
|
"func",
|
|
2712
2712
|
"obj",
|
|
2713
2713
|
"Error"
|
|
2714
|
-
]),
|
|
2714
|
+
]), y = {
|
|
2715
2715
|
errorDataPath: "",
|
|
2716
2716
|
format: "`validateFormats: false` can be used instead.",
|
|
2717
2717
|
nullable: '"nullable" keyword is supported by default.',
|
|
@@ -2731,74 +2731,74 @@ Cr.default = zs;
|
|
|
2731
2731
|
ignoreKeywordsWithRef: "",
|
|
2732
2732
|
jsPropertySyntax: "",
|
|
2733
2733
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
2734
|
-
},
|
|
2735
|
-
function k(
|
|
2736
|
-
var
|
|
2737
|
-
const lt =
|
|
2734
|
+
}, p = 200;
|
|
2735
|
+
function k(I) {
|
|
2736
|
+
var v, P, w, l, h, E, A, F, Y, Z, ae, We, Yt, Qt, Xt, er, tr, rr, nr, sr, ar, or, ir, lr, dr;
|
|
2737
|
+
const lt = I.strict, cr = (v = I.code) === null || v === void 0 ? void 0 : v.optimize, gn = cr === !0 || cr === void 0 ? 1 : cr || 0, bn = (w = (P = I.code) === null || P === void 0 ? void 0 : P.regExp) !== null && w !== void 0 ? w : b, Xs = (l = I.uriResolver) !== null && l !== void 0 ? l : g.default;
|
|
2738
2738
|
return {
|
|
2739
|
-
strictSchema: (E = (h =
|
|
2740
|
-
strictNumbers: (F = (A =
|
|
2741
|
-
strictTypes: (Z = (Y =
|
|
2742
|
-
strictTuples: (
|
|
2743
|
-
strictRequired: (Qt = (Yt =
|
|
2744
|
-
code:
|
|
2745
|
-
loopRequired: (Xt =
|
|
2746
|
-
loopEnum: (er =
|
|
2747
|
-
meta: (tr =
|
|
2748
|
-
messages: (rr =
|
|
2749
|
-
inlineRefs: (nr =
|
|
2750
|
-
schemaId: (sr =
|
|
2751
|
-
addUsedSchema: (ar =
|
|
2752
|
-
validateSchema: (or =
|
|
2753
|
-
validateFormats: (ir =
|
|
2754
|
-
unicodeRegExp: (lr =
|
|
2755
|
-
int32range: (dr =
|
|
2739
|
+
strictSchema: (E = (h = I.strictSchema) !== null && h !== void 0 ? h : lt) !== null && E !== void 0 ? E : !0,
|
|
2740
|
+
strictNumbers: (F = (A = I.strictNumbers) !== null && A !== void 0 ? A : lt) !== null && F !== void 0 ? F : !0,
|
|
2741
|
+
strictTypes: (Z = (Y = I.strictTypes) !== null && Y !== void 0 ? Y : lt) !== null && Z !== void 0 ? Z : "log",
|
|
2742
|
+
strictTuples: (We = (ae = I.strictTuples) !== null && ae !== void 0 ? ae : lt) !== null && We !== void 0 ? We : "log",
|
|
2743
|
+
strictRequired: (Qt = (Yt = I.strictRequired) !== null && Yt !== void 0 ? Yt : lt) !== null && Qt !== void 0 ? Qt : !1,
|
|
2744
|
+
code: I.code ? { ...I.code, optimize: gn, regExp: bn } : { optimize: gn, regExp: bn },
|
|
2745
|
+
loopRequired: (Xt = I.loopRequired) !== null && Xt !== void 0 ? Xt : p,
|
|
2746
|
+
loopEnum: (er = I.loopEnum) !== null && er !== void 0 ? er : p,
|
|
2747
|
+
meta: (tr = I.meta) !== null && tr !== void 0 ? tr : !0,
|
|
2748
|
+
messages: (rr = I.messages) !== null && rr !== void 0 ? rr : !0,
|
|
2749
|
+
inlineRefs: (nr = I.inlineRefs) !== null && nr !== void 0 ? nr : !0,
|
|
2750
|
+
schemaId: (sr = I.schemaId) !== null && sr !== void 0 ? sr : "$id",
|
|
2751
|
+
addUsedSchema: (ar = I.addUsedSchema) !== null && ar !== void 0 ? ar : !0,
|
|
2752
|
+
validateSchema: (or = I.validateSchema) !== null && or !== void 0 ? or : !0,
|
|
2753
|
+
validateFormats: (ir = I.validateFormats) !== null && ir !== void 0 ? ir : !0,
|
|
2754
|
+
unicodeRegExp: (lr = I.unicodeRegExp) !== null && lr !== void 0 ? lr : !0,
|
|
2755
|
+
int32range: (dr = I.int32range) !== null && dr !== void 0 ? dr : !0,
|
|
2756
2756
|
uriResolver: Xs
|
|
2757
2757
|
};
|
|
2758
2758
|
}
|
|
2759
2759
|
class S {
|
|
2760
|
-
constructor(
|
|
2761
|
-
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(),
|
|
2760
|
+
constructor(v = {}) {
|
|
2761
|
+
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), v = this.opts = { ...v, ...k(v) };
|
|
2762
2762
|
const { es5: P, lines: w } = this.opts.code;
|
|
2763
|
-
this.scope = new i.ValueScope({ scope: {}, prefixes:
|
|
2764
|
-
const l =
|
|
2765
|
-
|
|
2763
|
+
this.scope = new i.ValueScope({ scope: {}, prefixes: $, es5: P, lines: w }), this.logger = H(v.logger);
|
|
2764
|
+
const l = v.validateFormats;
|
|
2765
|
+
v.validateFormats = !1, this.RULES = (0, a.getRules)(), O.call(this, y, v, "NOT SUPPORTED"), O.call(this, f, v, "DEPRECATED", "warn"), this._metaOpts = V.call(this), v.formats && M.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), v.keywords && T.call(this, v.keywords), typeof v.meta == "object" && this.addMetaSchema(v.meta), J.call(this), v.validateFormats = l;
|
|
2766
2766
|
}
|
|
2767
2767
|
_addVocabularies() {
|
|
2768
2768
|
this.addKeyword("$async");
|
|
2769
2769
|
}
|
|
2770
2770
|
_addDefaultMetaSchema() {
|
|
2771
|
-
const { $data:
|
|
2771
|
+
const { $data: v, meta: P, schemaId: w } = this.opts;
|
|
2772
2772
|
let l = m;
|
|
2773
|
-
w === "id" && (l = { ...m }, l.id = l.$id, delete l.$id), P &&
|
|
2773
|
+
w === "id" && (l = { ...m }, l.id = l.$id, delete l.$id), P && v && this.addMetaSchema(l, l[w], !1);
|
|
2774
2774
|
}
|
|
2775
2775
|
defaultMeta() {
|
|
2776
|
-
const { meta:
|
|
2777
|
-
return this.opts.defaultMeta = typeof
|
|
2776
|
+
const { meta: v, schemaId: P } = this.opts;
|
|
2777
|
+
return this.opts.defaultMeta = typeof v == "object" ? v[P] || v : void 0;
|
|
2778
2778
|
}
|
|
2779
|
-
validate(
|
|
2779
|
+
validate(v, P) {
|
|
2780
2780
|
let w;
|
|
2781
|
-
if (typeof
|
|
2782
|
-
if (w = this.getSchema(
|
|
2783
|
-
throw new Error(`no schema with key or ref "${
|
|
2781
|
+
if (typeof v == "string") {
|
|
2782
|
+
if (w = this.getSchema(v), !w)
|
|
2783
|
+
throw new Error(`no schema with key or ref "${v}"`);
|
|
2784
2784
|
} else
|
|
2785
|
-
w = this.compile(
|
|
2785
|
+
w = this.compile(v);
|
|
2786
2786
|
const l = w(P);
|
|
2787
2787
|
return "$async" in w || (this.errors = w.errors), l;
|
|
2788
2788
|
}
|
|
2789
|
-
compile(
|
|
2790
|
-
const w = this._addSchema(
|
|
2789
|
+
compile(v, P) {
|
|
2790
|
+
const w = this._addSchema(v, P);
|
|
2791
2791
|
return w.validate || this._compileSchemaEnv(w);
|
|
2792
2792
|
}
|
|
2793
|
-
compileAsync(
|
|
2793
|
+
compileAsync(v, P) {
|
|
2794
2794
|
if (typeof this.opts.loadSchema != "function")
|
|
2795
2795
|
throw new Error("options.loadSchema should be a function");
|
|
2796
2796
|
const { loadSchema: w } = this.opts;
|
|
2797
|
-
return l.call(this,
|
|
2797
|
+
return l.call(this, v, P);
|
|
2798
2798
|
async function l(Z, ae) {
|
|
2799
2799
|
await h.call(this, Z.$schema);
|
|
2800
|
-
const
|
|
2801
|
-
return
|
|
2800
|
+
const We = this._addSchema(Z, ae);
|
|
2801
|
+
return We.validate || E.call(this, We);
|
|
2802
2802
|
}
|
|
2803
2803
|
async function h(Z) {
|
|
2804
2804
|
Z && !this.getSchema(Z) && await l.call(this, { $ref: Z }, !0);
|
|
@@ -2832,35 +2832,35 @@ Cr.default = zs;
|
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
2834
|
// Adds schema to the instance
|
|
2835
|
-
addSchema(
|
|
2836
|
-
if (Array.isArray(
|
|
2837
|
-
for (const E of
|
|
2835
|
+
addSchema(v, P, w, l = this.opts.validateSchema) {
|
|
2836
|
+
if (Array.isArray(v)) {
|
|
2837
|
+
for (const E of v)
|
|
2838
2838
|
this.addSchema(E, void 0, w, l);
|
|
2839
2839
|
return this;
|
|
2840
2840
|
}
|
|
2841
2841
|
let h;
|
|
2842
|
-
if (typeof
|
|
2842
|
+
if (typeof v == "object") {
|
|
2843
2843
|
const { schemaId: E } = this.opts;
|
|
2844
|
-
if (h =
|
|
2844
|
+
if (h = v[E], h !== void 0 && typeof h != "string")
|
|
2845
2845
|
throw new Error(`schema ${E} must be string`);
|
|
2846
2846
|
}
|
|
2847
|
-
return P = (0, d.normalizeId)(P || h), this._checkUnique(P), this.schemas[P] = this._addSchema(
|
|
2847
|
+
return P = (0, d.normalizeId)(P || h), this._checkUnique(P), this.schemas[P] = this._addSchema(v, w, P, l, !0), this;
|
|
2848
2848
|
}
|
|
2849
2849
|
// Add schema that will be used to validate other schemas
|
|
2850
2850
|
// options in META_IGNORE_OPTIONS are alway set to false
|
|
2851
|
-
addMetaSchema(
|
|
2852
|
-
return this.addSchema(
|
|
2851
|
+
addMetaSchema(v, P, w = this.opts.validateSchema) {
|
|
2852
|
+
return this.addSchema(v, P, !0, w), this;
|
|
2853
2853
|
}
|
|
2854
2854
|
// Validate schema against its meta-schema
|
|
2855
|
-
validateSchema(
|
|
2856
|
-
if (typeof
|
|
2855
|
+
validateSchema(v, P) {
|
|
2856
|
+
if (typeof v == "boolean")
|
|
2857
2857
|
return !0;
|
|
2858
2858
|
let w;
|
|
2859
|
-
if (w =
|
|
2859
|
+
if (w = v.$schema, w !== void 0 && typeof w != "string")
|
|
2860
2860
|
throw new Error("$schema must be a string");
|
|
2861
2861
|
if (w = w || this.opts.defaultMeta || this.defaultMeta(), !w)
|
|
2862
2862
|
return this.logger.warn("meta-schema not available"), this.errors = null, !0;
|
|
2863
|
-
const l = this.validate(w,
|
|
2863
|
+
const l = this.validate(w, v);
|
|
2864
2864
|
if (!l && P) {
|
|
2865
2865
|
const h = "schema is invalid: " + this.errorsText();
|
|
2866
2866
|
if (this.opts.validateSchema === "log")
|
|
@@ -2872,15 +2872,15 @@ Cr.default = zs;
|
|
|
2872
2872
|
}
|
|
2873
2873
|
// Get compiled schema by `key` or `ref`.
|
|
2874
2874
|
// (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
|
|
2875
|
-
getSchema(
|
|
2875
|
+
getSchema(v) {
|
|
2876
2876
|
let P;
|
|
2877
|
-
for (; typeof (P = z.call(this,
|
|
2878
|
-
|
|
2877
|
+
for (; typeof (P = z.call(this, v)) == "string"; )
|
|
2878
|
+
v = P;
|
|
2879
2879
|
if (P === void 0) {
|
|
2880
2880
|
const { schemaId: w } = this.opts, l = new o.SchemaEnv({ schema: {}, schemaId: w });
|
|
2881
|
-
if (P = o.resolveSchema.call(this, l,
|
|
2881
|
+
if (P = o.resolveSchema.call(this, l, v), !P)
|
|
2882
2882
|
return;
|
|
2883
|
-
this.refs[
|
|
2883
|
+
this.refs[v] = P;
|
|
2884
2884
|
}
|
|
2885
2885
|
return P.validate || this._compileSchemaEnv(P);
|
|
2886
2886
|
}
|
|
@@ -2888,20 +2888,20 @@ Cr.default = zs;
|
|
|
2888
2888
|
// If no parameter is passed all schemas but meta-schemas are removed.
|
|
2889
2889
|
// If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
|
|
2890
2890
|
// Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
|
2891
|
-
removeSchema(
|
|
2892
|
-
if (
|
|
2893
|
-
return this._removeAllSchemas(this.schemas,
|
|
2894
|
-
switch (typeof
|
|
2891
|
+
removeSchema(v) {
|
|
2892
|
+
if (v instanceof RegExp)
|
|
2893
|
+
return this._removeAllSchemas(this.schemas, v), this._removeAllSchemas(this.refs, v), this;
|
|
2894
|
+
switch (typeof v) {
|
|
2895
2895
|
case "undefined":
|
|
2896
2896
|
return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
|
|
2897
2897
|
case "string": {
|
|
2898
|
-
const P = z.call(this,
|
|
2899
|
-
return typeof P == "object" && this._cache.delete(P.schema), delete this.schemas[
|
|
2898
|
+
const P = z.call(this, v);
|
|
2899
|
+
return typeof P == "object" && this._cache.delete(P.schema), delete this.schemas[v], delete this.refs[v], this;
|
|
2900
2900
|
}
|
|
2901
2901
|
case "object": {
|
|
2902
|
-
const P =
|
|
2902
|
+
const P = v;
|
|
2903
2903
|
this._cache.delete(P);
|
|
2904
|
-
let w =
|
|
2904
|
+
let w = v[this.opts.schemaId];
|
|
2905
2905
|
return w && (w = (0, d.normalizeId)(w), delete this.schemas[w], delete this.refs[w]), this;
|
|
2906
2906
|
}
|
|
2907
2907
|
default:
|
|
@@ -2909,23 +2909,23 @@ Cr.default = zs;
|
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
2911
|
// add "vocabulary" - a collection of keywords
|
|
2912
|
-
addVocabulary(
|
|
2913
|
-
for (const P of
|
|
2912
|
+
addVocabulary(v) {
|
|
2913
|
+
for (const P of v)
|
|
2914
2914
|
this.addKeyword(P);
|
|
2915
2915
|
return this;
|
|
2916
2916
|
}
|
|
2917
|
-
addKeyword(
|
|
2917
|
+
addKeyword(v, P) {
|
|
2918
2918
|
let w;
|
|
2919
|
-
if (typeof
|
|
2920
|
-
w =
|
|
2921
|
-
else if (typeof
|
|
2922
|
-
if (P =
|
|
2919
|
+
if (typeof v == "string")
|
|
2920
|
+
w = v, typeof P == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), P.keyword = w);
|
|
2921
|
+
else if (typeof v == "object" && P === void 0) {
|
|
2922
|
+
if (P = v, w = P.keyword, Array.isArray(w) && !w.length)
|
|
2923
2923
|
throw new Error("addKeywords: keyword must be string or non-empty array");
|
|
2924
2924
|
} else
|
|
2925
2925
|
throw new Error("invalid addKeywords parameters");
|
|
2926
2926
|
if (L.call(this, w, P), !P)
|
|
2927
2927
|
return (0, u.eachItem)(w, (h) => re.call(this, h)), this;
|
|
2928
|
-
|
|
2928
|
+
Je.call(this, P);
|
|
2929
2929
|
const l = {
|
|
2930
2930
|
...P,
|
|
2931
2931
|
type: (0, c.getJSONTypes)(P.type),
|
|
@@ -2933,33 +2933,33 @@ Cr.default = zs;
|
|
|
2933
2933
|
};
|
|
2934
2934
|
return (0, u.eachItem)(w, l.type.length === 0 ? (h) => re.call(this, h, l) : (h) => l.type.forEach((E) => re.call(this, h, l, E))), this;
|
|
2935
2935
|
}
|
|
2936
|
-
getKeyword(
|
|
2937
|
-
const P = this.RULES.all[
|
|
2936
|
+
getKeyword(v) {
|
|
2937
|
+
const P = this.RULES.all[v];
|
|
2938
2938
|
return typeof P == "object" ? P.definition : !!P;
|
|
2939
2939
|
}
|
|
2940
2940
|
// Remove keyword
|
|
2941
|
-
removeKeyword(
|
|
2941
|
+
removeKeyword(v) {
|
|
2942
2942
|
const { RULES: P } = this;
|
|
2943
|
-
delete P.keywords[
|
|
2943
|
+
delete P.keywords[v], delete P.all[v];
|
|
2944
2944
|
for (const w of P.rules) {
|
|
2945
|
-
const l = w.rules.findIndex((h) => h.keyword ===
|
|
2945
|
+
const l = w.rules.findIndex((h) => h.keyword === v);
|
|
2946
2946
|
l >= 0 && w.rules.splice(l, 1);
|
|
2947
2947
|
}
|
|
2948
2948
|
return this;
|
|
2949
2949
|
}
|
|
2950
2950
|
// Add format
|
|
2951
|
-
addFormat(
|
|
2952
|
-
return typeof P == "string" && (P = new RegExp(P)), this.formats[
|
|
2951
|
+
addFormat(v, P) {
|
|
2952
|
+
return typeof P == "string" && (P = new RegExp(P)), this.formats[v] = P, this;
|
|
2953
2953
|
}
|
|
2954
|
-
errorsText(
|
|
2955
|
-
return !
|
|
2954
|
+
errorsText(v = this.errors, { separator: P = ", ", dataVar: w = "data" } = {}) {
|
|
2955
|
+
return !v || v.length === 0 ? "No errors" : v.map((l) => `${w}${l.instancePath} ${l.message}`).reduce((l, h) => l + P + h);
|
|
2956
2956
|
}
|
|
2957
|
-
$dataMetaSchema(
|
|
2957
|
+
$dataMetaSchema(v, P) {
|
|
2958
2958
|
const w = this.RULES.all;
|
|
2959
|
-
|
|
2959
|
+
v = JSON.parse(JSON.stringify(v));
|
|
2960
2960
|
for (const l of P) {
|
|
2961
2961
|
const h = l.split("/").slice(1);
|
|
2962
|
-
let E =
|
|
2962
|
+
let E = v;
|
|
2963
2963
|
for (const A of h)
|
|
2964
2964
|
E = E[A];
|
|
2965
2965
|
for (const A in w) {
|
|
@@ -2970,149 +2970,149 @@ Cr.default = zs;
|
|
|
2970
2970
|
Y && Z && (E[A] = Et(Z));
|
|
2971
2971
|
}
|
|
2972
2972
|
}
|
|
2973
|
-
return
|
|
2973
|
+
return v;
|
|
2974
2974
|
}
|
|
2975
|
-
_removeAllSchemas(
|
|
2976
|
-
for (const w in
|
|
2977
|
-
const l =
|
|
2978
|
-
(!P || P.test(w)) && (typeof l == "string" ? delete
|
|
2975
|
+
_removeAllSchemas(v, P) {
|
|
2976
|
+
for (const w in v) {
|
|
2977
|
+
const l = v[w];
|
|
2978
|
+
(!P || P.test(w)) && (typeof l == "string" ? delete v[w] : l && !l.meta && (this._cache.delete(l.schema), delete v[w]));
|
|
2979
2979
|
}
|
|
2980
2980
|
}
|
|
2981
|
-
_addSchema(
|
|
2981
|
+
_addSchema(v, P, w, l = this.opts.validateSchema, h = this.opts.addUsedSchema) {
|
|
2982
2982
|
let E;
|
|
2983
2983
|
const { schemaId: A } = this.opts;
|
|
2984
|
-
if (typeof
|
|
2985
|
-
E =
|
|
2984
|
+
if (typeof v == "object")
|
|
2985
|
+
E = v[A];
|
|
2986
2986
|
else {
|
|
2987
2987
|
if (this.opts.jtd)
|
|
2988
2988
|
throw new Error("schema must be object");
|
|
2989
|
-
if (typeof
|
|
2989
|
+
if (typeof v != "boolean")
|
|
2990
2990
|
throw new Error("schema must be object or boolean");
|
|
2991
2991
|
}
|
|
2992
|
-
let F = this._cache.get(
|
|
2992
|
+
let F = this._cache.get(v);
|
|
2993
2993
|
if (F !== void 0)
|
|
2994
2994
|
return F;
|
|
2995
2995
|
w = (0, d.normalizeId)(E || w);
|
|
2996
|
-
const Y = d.getSchemaRefs.call(this,
|
|
2997
|
-
return F = new o.SchemaEnv({ schema:
|
|
2996
|
+
const Y = d.getSchemaRefs.call(this, v, w);
|
|
2997
|
+
return F = new o.SchemaEnv({ schema: v, schemaId: A, meta: P, baseId: w, localRefs: Y }), this._cache.set(F.schema, F), h && !w.startsWith("#") && (w && this._checkUnique(w), this.refs[w] = F), l && this.validateSchema(v, !0), F;
|
|
2998
2998
|
}
|
|
2999
|
-
_checkUnique(
|
|
3000
|
-
if (this.schemas[
|
|
3001
|
-
throw new Error(`schema with key or id "${
|
|
2999
|
+
_checkUnique(v) {
|
|
3000
|
+
if (this.schemas[v] || this.refs[v])
|
|
3001
|
+
throw new Error(`schema with key or id "${v}" already exists`);
|
|
3002
3002
|
}
|
|
3003
|
-
_compileSchemaEnv(
|
|
3004
|
-
if (
|
|
3003
|
+
_compileSchemaEnv(v) {
|
|
3004
|
+
if (v.meta ? this._compileMetaSchema(v) : o.compileSchema.call(this, v), !v.validate)
|
|
3005
3005
|
throw new Error("ajv implementation error");
|
|
3006
|
-
return
|
|
3006
|
+
return v.validate;
|
|
3007
3007
|
}
|
|
3008
|
-
_compileMetaSchema(
|
|
3008
|
+
_compileMetaSchema(v) {
|
|
3009
3009
|
const P = this.opts;
|
|
3010
3010
|
this.opts = this._metaOpts;
|
|
3011
3011
|
try {
|
|
3012
|
-
o.compileSchema.call(this,
|
|
3012
|
+
o.compileSchema.call(this, v);
|
|
3013
3013
|
} finally {
|
|
3014
3014
|
this.opts = P;
|
|
3015
3015
|
}
|
|
3016
3016
|
}
|
|
3017
3017
|
}
|
|
3018
3018
|
S.ValidationError = r.default, S.MissingRefError = s.default, e.default = S;
|
|
3019
|
-
function O(
|
|
3020
|
-
for (const l in
|
|
3019
|
+
function O(I, v, P, w = "error") {
|
|
3020
|
+
for (const l in I) {
|
|
3021
3021
|
const h = l;
|
|
3022
|
-
h in
|
|
3022
|
+
h in v && this.logger[w](`${P}: option ${l}. ${I[h]}`);
|
|
3023
3023
|
}
|
|
3024
3024
|
}
|
|
3025
|
-
function z(
|
|
3026
|
-
return
|
|
3025
|
+
function z(I) {
|
|
3026
|
+
return I = (0, d.normalizeId)(I), this.schemas[I] || this.refs[I];
|
|
3027
3027
|
}
|
|
3028
3028
|
function J() {
|
|
3029
|
-
const
|
|
3030
|
-
if (
|
|
3031
|
-
if (Array.isArray(
|
|
3032
|
-
this.addSchema(
|
|
3029
|
+
const I = this.opts.schemas;
|
|
3030
|
+
if (I)
|
|
3031
|
+
if (Array.isArray(I))
|
|
3032
|
+
this.addSchema(I);
|
|
3033
3033
|
else
|
|
3034
|
-
for (const
|
|
3035
|
-
this.addSchema(
|
|
3034
|
+
for (const v in I)
|
|
3035
|
+
this.addSchema(I[v], v);
|
|
3036
3036
|
}
|
|
3037
3037
|
function M() {
|
|
3038
|
-
for (const
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3038
|
+
for (const I in this.opts.formats) {
|
|
3039
|
+
const v = this.opts.formats[I];
|
|
3040
|
+
v && this.addFormat(I, v);
|
|
3041
3041
|
}
|
|
3042
3042
|
}
|
|
3043
|
-
function T(
|
|
3044
|
-
if (Array.isArray(
|
|
3045
|
-
this.addVocabulary(
|
|
3043
|
+
function T(I) {
|
|
3044
|
+
if (Array.isArray(I)) {
|
|
3045
|
+
this.addVocabulary(I);
|
|
3046
3046
|
return;
|
|
3047
3047
|
}
|
|
3048
3048
|
this.logger.warn("keywords option as map is deprecated, pass array");
|
|
3049
|
-
for (const
|
|
3050
|
-
const P =
|
|
3051
|
-
P.keyword || (P.keyword =
|
|
3049
|
+
for (const v in I) {
|
|
3050
|
+
const P = I[v];
|
|
3051
|
+
P.keyword || (P.keyword = v), this.addKeyword(P);
|
|
3052
3052
|
}
|
|
3053
3053
|
}
|
|
3054
3054
|
function V() {
|
|
3055
|
-
const
|
|
3056
|
-
for (const
|
|
3057
|
-
delete
|
|
3058
|
-
return
|
|
3055
|
+
const I = { ...this.opts };
|
|
3056
|
+
for (const v of _)
|
|
3057
|
+
delete I[v];
|
|
3058
|
+
return I;
|
|
3059
3059
|
}
|
|
3060
3060
|
const W = { log() {
|
|
3061
3061
|
}, warn() {
|
|
3062
3062
|
}, error() {
|
|
3063
3063
|
} };
|
|
3064
|
-
function H(
|
|
3065
|
-
if (
|
|
3064
|
+
function H(I) {
|
|
3065
|
+
if (I === !1)
|
|
3066
3066
|
return W;
|
|
3067
|
-
if (
|
|
3067
|
+
if (I === void 0)
|
|
3068
3068
|
return console;
|
|
3069
|
-
if (
|
|
3070
|
-
return
|
|
3069
|
+
if (I.log && I.warn && I.error)
|
|
3070
|
+
return I;
|
|
3071
3071
|
throw new Error("logger must implement log, warn and error methods");
|
|
3072
3072
|
}
|
|
3073
3073
|
const ne = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
3074
|
-
function L(
|
|
3074
|
+
function L(I, v) {
|
|
3075
3075
|
const { RULES: P } = this;
|
|
3076
|
-
if ((0, u.eachItem)(
|
|
3076
|
+
if ((0, u.eachItem)(I, (w) => {
|
|
3077
3077
|
if (P.keywords[w])
|
|
3078
3078
|
throw new Error(`Keyword ${w} is already defined`);
|
|
3079
3079
|
if (!ne.test(w))
|
|
3080
3080
|
throw new Error(`Keyword ${w} has invalid name`);
|
|
3081
|
-
}), !!
|
|
3081
|
+
}), !!v && v.$data && !("code" in v || "validate" in v))
|
|
3082
3082
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
3083
3083
|
}
|
|
3084
|
-
function re(
|
|
3084
|
+
function re(I, v, P) {
|
|
3085
3085
|
var w;
|
|
3086
|
-
const l =
|
|
3086
|
+
const l = v == null ? void 0 : v.post;
|
|
3087
3087
|
if (P && l)
|
|
3088
3088
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
3089
3089
|
const { RULES: h } = this;
|
|
3090
3090
|
let E = l ? h.post : h.rules.find(({ type: F }) => F === P);
|
|
3091
|
-
if (E || (E = { type: P, rules: [] }, h.rules.push(E)), h.keywords[
|
|
3091
|
+
if (E || (E = { type: P, rules: [] }, h.rules.push(E)), h.keywords[I] = !0, !v)
|
|
3092
3092
|
return;
|
|
3093
3093
|
const A = {
|
|
3094
|
-
keyword:
|
|
3094
|
+
keyword: I,
|
|
3095
3095
|
definition: {
|
|
3096
|
-
...
|
|
3097
|
-
type: (0, c.getJSONTypes)(
|
|
3098
|
-
schemaType: (0, c.getJSONTypes)(
|
|
3096
|
+
...v,
|
|
3097
|
+
type: (0, c.getJSONTypes)(v.type),
|
|
3098
|
+
schemaType: (0, c.getJSONTypes)(v.schemaType)
|
|
3099
3099
|
}
|
|
3100
3100
|
};
|
|
3101
|
-
|
|
3101
|
+
v.before ? Se.call(this, E, A, v.before) : E.rules.push(A), h.all[I] = A, (w = v.implements) === null || w === void 0 || w.forEach((F) => this.addKeyword(F));
|
|
3102
3102
|
}
|
|
3103
|
-
function Se(
|
|
3104
|
-
const w =
|
|
3105
|
-
w >= 0 ?
|
|
3103
|
+
function Se(I, v, P) {
|
|
3104
|
+
const w = I.rules.findIndex((l) => l.keyword === P);
|
|
3105
|
+
w >= 0 ? I.rules.splice(w, 0, v) : (I.rules.push(v), this.logger.warn(`rule ${P} is not defined`));
|
|
3106
3106
|
}
|
|
3107
|
-
function
|
|
3108
|
-
let { metaSchema:
|
|
3109
|
-
|
|
3107
|
+
function Je(I) {
|
|
3108
|
+
let { metaSchema: v } = I;
|
|
3109
|
+
v !== void 0 && (I.$data && this.opts.$data && (v = Et(v)), I.validateSchema = this.compile(v, !0));
|
|
3110
3110
|
}
|
|
3111
3111
|
const Zt = {
|
|
3112
3112
|
$ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
|
|
3113
3113
|
};
|
|
3114
|
-
function Et(
|
|
3115
|
-
return { anyOf: [
|
|
3114
|
+
function Et(I) {
|
|
3115
|
+
return { anyOf: [I, Zt] };
|
|
3116
3116
|
}
|
|
3117
3117
|
})(Yn);
|
|
3118
3118
|
var Ur = {}, Lr = {}, Hr = {};
|
|
@@ -3127,7 +3127,7 @@ Hr.default = tl;
|
|
|
3127
3127
|
var Be = {};
|
|
3128
3128
|
Object.defineProperty(Be, "__esModule", { value: !0 });
|
|
3129
3129
|
Be.callRef = Be.getValidate = void 0;
|
|
3130
|
-
const rl =
|
|
3130
|
+
const rl = at, Tn = x, ue = B, Ye = Ie, Rn = fe, jt = N, nl = {
|
|
3131
3131
|
keyword: "$ref",
|
|
3132
3132
|
schemaType: "string",
|
|
3133
3133
|
code(e) {
|
|
@@ -3138,27 +3138,27 @@ const rl = st, Tn = x, ue = B, Ze = Ie, Rn = fe, jt = N, nl = {
|
|
|
3138
3138
|
if (u === void 0)
|
|
3139
3139
|
throw new rl.default(r.opts.uriResolver, s, n);
|
|
3140
3140
|
if (u instanceof Rn.SchemaEnv)
|
|
3141
|
-
return
|
|
3142
|
-
return
|
|
3141
|
+
return g(u);
|
|
3142
|
+
return b(u);
|
|
3143
3143
|
function m() {
|
|
3144
3144
|
if (a === c)
|
|
3145
3145
|
return At(e, o, a, a.$async);
|
|
3146
|
-
const
|
|
3147
|
-
return At(e, (0, ue._)`${
|
|
3146
|
+
const _ = t.scopeValue("root", { ref: c });
|
|
3147
|
+
return At(e, (0, ue._)`${_}.validate`, c, c.$async);
|
|
3148
3148
|
}
|
|
3149
|
-
function
|
|
3150
|
-
const
|
|
3151
|
-
At(e,
|
|
3149
|
+
function g(_) {
|
|
3150
|
+
const $ = Us(e, _);
|
|
3151
|
+
At(e, $, _, _.$async);
|
|
3152
3152
|
}
|
|
3153
|
-
function
|
|
3154
|
-
const
|
|
3155
|
-
schema:
|
|
3153
|
+
function b(_) {
|
|
3154
|
+
const $ = t.scopeValue("schema", i.code.source === !0 ? { ref: _, code: (0, ue.stringify)(_) } : { ref: _ }), y = t.name("valid"), f = e.subschema({
|
|
3155
|
+
schema: _,
|
|
3156
3156
|
dataTypes: [],
|
|
3157
3157
|
schemaPath: ue.nil,
|
|
3158
|
-
topSchemaRef:
|
|
3158
|
+
topSchemaRef: $,
|
|
3159
3159
|
errSchemaPath: n
|
|
3160
|
-
},
|
|
3161
|
-
e.mergeEvaluated(f), e.ok(
|
|
3160
|
+
}, y);
|
|
3161
|
+
e.mergeEvaluated(f), e.ok(y);
|
|
3162
3162
|
}
|
|
3163
3163
|
}
|
|
3164
3164
|
};
|
|
@@ -3168,42 +3168,42 @@ function Us(e, t) {
|
|
|
3168
3168
|
}
|
|
3169
3169
|
Be.getValidate = Us;
|
|
3170
3170
|
function At(e, t, n, r) {
|
|
3171
|
-
const { gen: s, it: a } = e, { allErrors: o, schemaEnv: i, opts: d } = a, c = d.passContext ?
|
|
3171
|
+
const { gen: s, it: a } = e, { allErrors: o, schemaEnv: i, opts: d } = a, c = d.passContext ? Ye.default.this : ue.nil;
|
|
3172
3172
|
r ? u() : m();
|
|
3173
3173
|
function u() {
|
|
3174
3174
|
if (!i.$async)
|
|
3175
3175
|
throw new Error("async schema referenced by sync schema");
|
|
3176
|
-
const
|
|
3176
|
+
const _ = s.let("valid");
|
|
3177
3177
|
s.try(() => {
|
|
3178
|
-
s.code((0, ue._)`await ${(0, Tn.callValidateCode)(e, t, c)}`),
|
|
3179
|
-
}, (
|
|
3180
|
-
s.if((0, ue._)`!(${
|
|
3181
|
-
}), e.ok(
|
|
3178
|
+
s.code((0, ue._)`await ${(0, Tn.callValidateCode)(e, t, c)}`), b(t), o || s.assign(_, !0);
|
|
3179
|
+
}, ($) => {
|
|
3180
|
+
s.if((0, ue._)`!(${$} instanceof ${a.ValidationError})`, () => s.throw($)), g($), o || s.assign(_, !1);
|
|
3181
|
+
}), e.ok(_);
|
|
3182
3182
|
}
|
|
3183
3183
|
function m() {
|
|
3184
|
-
e.result((0, Tn.callValidateCode)(e, t, c), () =>
|
|
3184
|
+
e.result((0, Tn.callValidateCode)(e, t, c), () => b(t), () => g(t));
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3187
|
-
const
|
|
3188
|
-
s.assign(
|
|
3186
|
+
function g(_) {
|
|
3187
|
+
const $ = (0, ue._)`${_}.errors`;
|
|
3188
|
+
s.assign(Ye.default.vErrors, (0, ue._)`${Ye.default.vErrors} === null ? ${$} : ${Ye.default.vErrors}.concat(${$})`), s.assign(Ye.default.errors, (0, ue._)`${Ye.default.vErrors}.length`);
|
|
3189
3189
|
}
|
|
3190
|
-
function
|
|
3191
|
-
var
|
|
3190
|
+
function b(_) {
|
|
3191
|
+
var $;
|
|
3192
3192
|
if (!a.opts.unevaluated)
|
|
3193
3193
|
return;
|
|
3194
|
-
const
|
|
3194
|
+
const y = ($ = n == null ? void 0 : n.validate) === null || $ === void 0 ? void 0 : $.evaluated;
|
|
3195
3195
|
if (a.props !== !0)
|
|
3196
|
-
if (
|
|
3197
|
-
|
|
3196
|
+
if (y && !y.dynamicProps)
|
|
3197
|
+
y.props !== void 0 && (a.props = jt.mergeEvaluated.props(s, y.props, a.props));
|
|
3198
3198
|
else {
|
|
3199
|
-
const f = s.var("props", (0, ue._)`${
|
|
3199
|
+
const f = s.var("props", (0, ue._)`${_}.evaluated.props`);
|
|
3200
3200
|
a.props = jt.mergeEvaluated.props(s, f, a.props, ue.Name);
|
|
3201
3201
|
}
|
|
3202
3202
|
if (a.items !== !0)
|
|
3203
|
-
if (
|
|
3204
|
-
|
|
3203
|
+
if (y && !y.dynamicItems)
|
|
3204
|
+
y.items !== void 0 && (a.items = jt.mergeEvaluated.items(s, y.items, a.items));
|
|
3205
3205
|
else {
|
|
3206
|
-
const f = s.var("items", (0, ue._)`${
|
|
3206
|
+
const f = s.var("items", (0, ue._)`${_}.evaluated.items`);
|
|
3207
3207
|
a.items = jt.mergeEvaluated.items(s, f, a.items, ue.Name);
|
|
3208
3208
|
}
|
|
3209
3209
|
}
|
|
@@ -3345,10 +3345,10 @@ const ct = x, yt = B, bl = N, $l = {
|
|
|
3345
3345
|
return;
|
|
3346
3346
|
const d = n.length >= i.loopRequired;
|
|
3347
3347
|
if (o.allErrors ? c() : u(), i.strictRequired) {
|
|
3348
|
-
const
|
|
3349
|
-
for (const
|
|
3350
|
-
if ((
|
|
3351
|
-
const
|
|
3348
|
+
const b = e.parentSchema.properties, { definedProperties: _ } = e.it;
|
|
3349
|
+
for (const $ of n)
|
|
3350
|
+
if ((b == null ? void 0 : b[$]) === void 0 && !_.has($)) {
|
|
3351
|
+
const y = o.schemaEnv.baseId + o.errSchemaPath, f = `required property "${$}" is not defined at "${y}" (strictRequired)`;
|
|
3352
3352
|
(0, bl.checkStrictMode)(o, f, o.opts.strictRequired);
|
|
3353
3353
|
}
|
|
3354
3354
|
}
|
|
@@ -3356,25 +3356,25 @@ const ct = x, yt = B, bl = N, $l = {
|
|
|
3356
3356
|
if (d || a)
|
|
3357
3357
|
e.block$data(yt.nil, m);
|
|
3358
3358
|
else
|
|
3359
|
-
for (const
|
|
3360
|
-
(0, ct.checkReportMissingProp)(e,
|
|
3359
|
+
for (const b of n)
|
|
3360
|
+
(0, ct.checkReportMissingProp)(e, b);
|
|
3361
3361
|
}
|
|
3362
3362
|
function u() {
|
|
3363
|
-
const
|
|
3363
|
+
const b = t.let("missing");
|
|
3364
3364
|
if (d || a) {
|
|
3365
|
-
const
|
|
3366
|
-
e.block$data(
|
|
3365
|
+
const _ = t.let("valid", !0);
|
|
3366
|
+
e.block$data(_, () => g(b, _)), e.ok(_);
|
|
3367
3367
|
} else
|
|
3368
|
-
t.if((0, ct.checkMissingProp)(e, n,
|
|
3368
|
+
t.if((0, ct.checkMissingProp)(e, n, b)), (0, ct.reportMissingProp)(e, b), t.else();
|
|
3369
3369
|
}
|
|
3370
3370
|
function m() {
|
|
3371
|
-
t.forOf("prop", r, (
|
|
3372
|
-
e.setParams({ missingProperty:
|
|
3371
|
+
t.forOf("prop", r, (b) => {
|
|
3372
|
+
e.setParams({ missingProperty: b }), t.if((0, ct.noPropertyInData)(t, s, b, i.ownProperties), () => e.error());
|
|
3373
3373
|
});
|
|
3374
3374
|
}
|
|
3375
|
-
function b
|
|
3376
|
-
e.setParams({ missingProperty:
|
|
3377
|
-
t.assign(
|
|
3375
|
+
function g(b, _) {
|
|
3376
|
+
e.setParams({ missingProperty: b }), t.forOf(b, r, () => {
|
|
3377
|
+
t.assign(_, (0, ct.propertyInData)(t, s, b, i.ownProperties)), t.if((0, yt.not)(_), () => {
|
|
3378
3378
|
e.error(), t.break();
|
|
3379
3379
|
});
|
|
3380
3380
|
}, yt.nil);
|
|
@@ -3424,23 +3424,23 @@ const hr = se, ie = B, El = N, Pl = kt, Ol = {
|
|
|
3424
3424
|
const d = t.let("valid"), c = a.items ? (0, hr.getSchemaTypes)(a.items) : [];
|
|
3425
3425
|
e.block$data(d, u, (0, ie._)`${o} === false`), e.ok(d);
|
|
3426
3426
|
function u() {
|
|
3427
|
-
const
|
|
3428
|
-
e.setParams({ i:
|
|
3427
|
+
const _ = t.let("i", (0, ie._)`${n}.length`), $ = t.let("j");
|
|
3428
|
+
e.setParams({ i: _, j: $ }), t.assign(d, !0), t.if((0, ie._)`${_} > 1`, () => (m() ? g : b)(_, $));
|
|
3429
3429
|
}
|
|
3430
3430
|
function m() {
|
|
3431
|
-
return c.length > 0 && !c.some((
|
|
3432
|
-
}
|
|
3433
|
-
function
|
|
3434
|
-
const
|
|
3435
|
-
t.for((0, ie._)`;${
|
|
3436
|
-
t.let(
|
|
3437
|
-
t.assign(
|
|
3438
|
-
}).code((0, ie._)`${
|
|
3431
|
+
return c.length > 0 && !c.some((_) => _ === "object" || _ === "array");
|
|
3432
|
+
}
|
|
3433
|
+
function g(_, $) {
|
|
3434
|
+
const y = t.name("item"), f = (0, hr.checkDataTypes)(c, y, i.opts.strictNumbers, hr.DataType.Wrong), p = t.const("indices", (0, ie._)`{}`);
|
|
3435
|
+
t.for((0, ie._)`;${_}--;`, () => {
|
|
3436
|
+
t.let(y, (0, ie._)`${n}[${_}]`), t.if(f, (0, ie._)`continue`), c.length > 1 && t.if((0, ie._)`typeof ${y} == "string"`, (0, ie._)`${y} += "_"`), t.if((0, ie._)`typeof ${p}[${y}] == "number"`, () => {
|
|
3437
|
+
t.assign($, (0, ie._)`${p}[${y}]`), e.error(), t.assign(d, !1).break();
|
|
3438
|
+
}).code((0, ie._)`${p}[${y}] = ${_}`);
|
|
3439
3439
|
});
|
|
3440
3440
|
}
|
|
3441
|
-
function
|
|
3442
|
-
const
|
|
3443
|
-
t.label(f).for((0, ie._)`;${
|
|
3441
|
+
function b(_, $) {
|
|
3442
|
+
const y = (0, El.useFunc)(t, Pl.default), f = t.name("outer");
|
|
3443
|
+
t.label(f).for((0, ie._)`;${_}--;`, () => t.for((0, ie._)`${$} = ${_}; ${$}--;`, () => t.if((0, ie._)`${y}(${n}[${_}], ${n}[${$}])`, () => {
|
|
3444
3444
|
e.error(), t.assign(d, !1).break(f);
|
|
3445
3445
|
})));
|
|
3446
3446
|
}
|
|
@@ -3485,16 +3485,16 @@ const ft = B, Tl = N, Rl = kt, Al = {
|
|
|
3485
3485
|
else {
|
|
3486
3486
|
if (!Array.isArray(s))
|
|
3487
3487
|
throw new Error("ajv implementation error");
|
|
3488
|
-
const
|
|
3489
|
-
u = (0, ft.or)(...s.map((
|
|
3488
|
+
const b = t.const("vSchema", a);
|
|
3489
|
+
u = (0, ft.or)(...s.map((_, $) => g(b, $)));
|
|
3490
3490
|
}
|
|
3491
3491
|
e.pass(u);
|
|
3492
3492
|
function m() {
|
|
3493
|
-
t.assign(u, !1), t.forOf("v", a, (
|
|
3493
|
+
t.assign(u, !1), t.forOf("v", a, (b) => t.if((0, ft._)`${c()}(${n}, ${b})`, () => t.assign(u, !0).break()));
|
|
3494
3494
|
}
|
|
3495
|
-
function b
|
|
3496
|
-
const
|
|
3497
|
-
return typeof
|
|
3495
|
+
function g(b, _) {
|
|
3496
|
+
const $ = s[_];
|
|
3497
|
+
return typeof $ == "object" && $ !== null ? (0, ft._)`${c()}(${n}, ${b}[${_}])` : (0, ft._)`${n} === ${$}`;
|
|
3498
3498
|
}
|
|
3499
3499
|
}
|
|
3500
3500
|
};
|
|
@@ -3520,9 +3520,9 @@ const Fl = Gr, Cl = Br, Vl = xr, zl = Wr, Ul = Zr, Ll = Yr, Hl = Qr, Kl = Xr, Gl
|
|
|
3520
3520
|
Bl.default
|
|
3521
3521
|
];
|
|
3522
3522
|
Kr.default = xl;
|
|
3523
|
-
var rn = {},
|
|
3524
|
-
Object.defineProperty(
|
|
3525
|
-
|
|
3523
|
+
var rn = {}, ot = {};
|
|
3524
|
+
Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
3525
|
+
ot.validateAdditionalItems = void 0;
|
|
3526
3526
|
const Le = B, wr = N, Jl = {
|
|
3527
3527
|
message: ({ params: { len: e } }) => (0, Le.str)`must NOT have more than ${e} items`,
|
|
3528
3528
|
params: ({ params: { len: e } }) => (0, Le._)`{limit: ${e}}`
|
|
@@ -3557,11 +3557,11 @@ function Ks(e, t) {
|
|
|
3557
3557
|
});
|
|
3558
3558
|
}
|
|
3559
3559
|
}
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
var nn = {},
|
|
3563
|
-
Object.defineProperty(
|
|
3564
|
-
|
|
3560
|
+
ot.validateAdditionalItems = Ks;
|
|
3561
|
+
ot.default = Wl;
|
|
3562
|
+
var nn = {}, it = {};
|
|
3563
|
+
Object.defineProperty(it, "__esModule", { value: !0 });
|
|
3564
|
+
it.validateTuple = void 0;
|
|
3565
3565
|
const An = B, Dt = N, Zl = x, Yl = {
|
|
3566
3566
|
keyword: "items",
|
|
3567
3567
|
type: "array",
|
|
@@ -3578,25 +3578,25 @@ function Gs(e, t, n = e.schema) {
|
|
|
3578
3578
|
const { gen: r, parentSchema: s, data: a, keyword: o, it: i } = e;
|
|
3579
3579
|
u(s), i.opts.unevaluated && n.length && i.items !== !0 && (i.items = Dt.mergeEvaluated.items(r, n.length, i.items));
|
|
3580
3580
|
const d = r.name("valid"), c = r.const("len", (0, An._)`${a}.length`);
|
|
3581
|
-
n.forEach((m,
|
|
3582
|
-
(0, Dt.alwaysValidSchema)(i, m) || (r.if((0, An._)`${c} > ${
|
|
3581
|
+
n.forEach((m, g) => {
|
|
3582
|
+
(0, Dt.alwaysValidSchema)(i, m) || (r.if((0, An._)`${c} > ${g}`, () => e.subschema({
|
|
3583
3583
|
keyword: o,
|
|
3584
|
-
schemaProp:
|
|
3585
|
-
dataProp:
|
|
3584
|
+
schemaProp: g,
|
|
3585
|
+
dataProp: g
|
|
3586
3586
|
}, d)), e.ok(d));
|
|
3587
3587
|
});
|
|
3588
3588
|
function u(m) {
|
|
3589
|
-
const { opts:
|
|
3590
|
-
if (
|
|
3591
|
-
const
|
|
3592
|
-
(0, Dt.checkStrictMode)(i,
|
|
3589
|
+
const { opts: g, errSchemaPath: b } = i, _ = n.length, $ = _ === m.minItems && (_ === m.maxItems || m[t] === !1);
|
|
3590
|
+
if (g.strictTuples && !$) {
|
|
3591
|
+
const y = `"${o}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${b}"`;
|
|
3592
|
+
(0, Dt.checkStrictMode)(i, y, g.strictTuples);
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
|
-
|
|
3597
|
-
|
|
3596
|
+
it.validateTuple = Gs;
|
|
3597
|
+
it.default = Yl;
|
|
3598
3598
|
Object.defineProperty(nn, "__esModule", { value: !0 });
|
|
3599
|
-
const Ql =
|
|
3599
|
+
const Ql = it, Xl = {
|
|
3600
3600
|
keyword: "prefixItems",
|
|
3601
3601
|
type: "array",
|
|
3602
3602
|
schemaType: ["array"],
|
|
@@ -3606,7 +3606,7 @@ const Ql = ot, Xl = {
|
|
|
3606
3606
|
nn.default = Xl;
|
|
3607
3607
|
var sn = {};
|
|
3608
3608
|
Object.defineProperty(sn, "__esModule", { value: !0 });
|
|
3609
|
-
const Dn = B, ed = N, td = x, rd =
|
|
3609
|
+
const Dn = B, ed = N, td = x, rd = ot, nd = {
|
|
3610
3610
|
message: ({ params: { len: e } }) => (0, Dn.str)`must NOT have more than ${e} items`,
|
|
3611
3611
|
params: ({ params: { len: e } }) => (0, Dn._)`{limit: ${e}}`
|
|
3612
3612
|
}, sd = {
|
|
@@ -3648,29 +3648,29 @@ const ye = B, qt = N, ad = {
|
|
|
3648
3648
|
return;
|
|
3649
3649
|
}
|
|
3650
3650
|
if ((0, qt.alwaysValidSchema)(a, n)) {
|
|
3651
|
-
let
|
|
3652
|
-
i !== void 0 && (
|
|
3651
|
+
let $ = (0, ye._)`${u} >= ${o}`;
|
|
3652
|
+
i !== void 0 && ($ = (0, ye._)`${$} && ${u} <= ${i}`), e.pass($);
|
|
3653
3653
|
return;
|
|
3654
3654
|
}
|
|
3655
3655
|
a.items = !0;
|
|
3656
3656
|
const m = t.name("valid");
|
|
3657
|
-
i === void 0 && o === 1 ?
|
|
3658
|
-
function
|
|
3659
|
-
const
|
|
3660
|
-
|
|
3657
|
+
i === void 0 && o === 1 ? b(m, () => t.if(m, () => t.break())) : o === 0 ? (t.let(m, !0), i !== void 0 && t.if((0, ye._)`${s}.length > 0`, g)) : (t.let(m, !1), g()), e.result(m, () => e.reset());
|
|
3658
|
+
function g() {
|
|
3659
|
+
const $ = t.name("_valid"), y = t.let("count", 0);
|
|
3660
|
+
b($, () => t.if($, () => _(y)));
|
|
3661
3661
|
}
|
|
3662
|
-
function
|
|
3662
|
+
function b($, y) {
|
|
3663
3663
|
t.forRange("i", 0, u, (f) => {
|
|
3664
3664
|
e.subschema({
|
|
3665
3665
|
keyword: "contains",
|
|
3666
3666
|
dataProp: f,
|
|
3667
3667
|
dataPropType: qt.Type.Num,
|
|
3668
3668
|
compositeRule: !0
|
|
3669
|
-
},
|
|
3669
|
+
}, $), y();
|
|
3670
3670
|
});
|
|
3671
3671
|
}
|
|
3672
|
-
function
|
|
3673
|
-
t.code((0, ye._)`${
|
|
3672
|
+
function _($) {
|
|
3673
|
+
t.code((0, ye._)`${$}++`), i === void 0 ? t.if((0, ye._)`${$} >= ${o}`, () => t.assign(m, !0).break()) : (t.if((0, ye._)`${$} > ${i}`, () => t.assign(m, !1).break()), o === 1 ? t.assign(m, !0) : t.if((0, ye._)`${$} >= ${o}`, () => t.assign(m, !0)));
|
|
3674
3674
|
}
|
|
3675
3675
|
}
|
|
3676
3676
|
};
|
|
@@ -3705,44 +3705,44 @@ var Bs = {};
|
|
|
3705
3705
|
for (const m in d) {
|
|
3706
3706
|
if (m === "__proto__")
|
|
3707
3707
|
continue;
|
|
3708
|
-
const
|
|
3709
|
-
|
|
3708
|
+
const g = Array.isArray(d[m]) ? c : u;
|
|
3709
|
+
g[m] = d[m];
|
|
3710
3710
|
}
|
|
3711
3711
|
return [c, u];
|
|
3712
3712
|
}
|
|
3713
3713
|
function o(d, c = d.schema) {
|
|
3714
|
-
const { gen: u, data: m, it:
|
|
3714
|
+
const { gen: u, data: m, it: g } = d;
|
|
3715
3715
|
if (Object.keys(c).length === 0)
|
|
3716
3716
|
return;
|
|
3717
|
-
const
|
|
3718
|
-
for (const
|
|
3719
|
-
const
|
|
3720
|
-
if (
|
|
3717
|
+
const b = u.let("missing");
|
|
3718
|
+
for (const _ in c) {
|
|
3719
|
+
const $ = c[_];
|
|
3720
|
+
if ($.length === 0)
|
|
3721
3721
|
continue;
|
|
3722
|
-
const
|
|
3722
|
+
const y = (0, r.propertyInData)(u, m, _, g.opts.ownProperties);
|
|
3723
3723
|
d.setParams({
|
|
3724
|
-
property:
|
|
3725
|
-
depsCount:
|
|
3726
|
-
deps:
|
|
3727
|
-
}),
|
|
3728
|
-
for (const f of
|
|
3724
|
+
property: _,
|
|
3725
|
+
depsCount: $.length,
|
|
3726
|
+
deps: $.join(", ")
|
|
3727
|
+
}), g.allErrors ? u.if(y, () => {
|
|
3728
|
+
for (const f of $)
|
|
3729
3729
|
(0, r.checkReportMissingProp)(d, f);
|
|
3730
|
-
}) : (u.if((0, t._)`${
|
|
3730
|
+
}) : (u.if((0, t._)`${y} && (${(0, r.checkMissingProp)(d, $, b)})`), (0, r.reportMissingProp)(d, b), u.else());
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
3733
|
e.validatePropertyDeps = o;
|
|
3734
3734
|
function i(d, c = d.schema) {
|
|
3735
|
-
const { gen: u, data: m, keyword:
|
|
3736
|
-
for (const
|
|
3737
|
-
(0, n.alwaysValidSchema)(
|
|
3738
|
-
(0, r.propertyInData)(u, m,
|
|
3735
|
+
const { gen: u, data: m, keyword: g, it: b } = d, _ = u.name("valid");
|
|
3736
|
+
for (const $ in c)
|
|
3737
|
+
(0, n.alwaysValidSchema)(b, c[$]) || (u.if(
|
|
3738
|
+
(0, r.propertyInData)(u, m, $, b.opts.ownProperties),
|
|
3739
3739
|
() => {
|
|
3740
|
-
const
|
|
3741
|
-
d.mergeValidEvaluated(
|
|
3740
|
+
const y = d.subschema({ keyword: g, schemaProp: $ }, _);
|
|
3741
|
+
d.mergeValidEvaluated(y, _);
|
|
3742
3742
|
},
|
|
3743
|
-
() => u.var(
|
|
3743
|
+
() => u.var(_, !0)
|
|
3744
3744
|
// TODO var
|
|
3745
|
-
), d.ok(
|
|
3745
|
+
), d.ok(_));
|
|
3746
3746
|
}
|
|
3747
3747
|
e.validateSchemaDeps = i, e.default = s;
|
|
3748
3748
|
})(Bs);
|
|
@@ -3797,44 +3797,44 @@ const It = x, ge = B, cd = Ie, Nt = N, ud = {
|
|
|
3797
3797
|
const c = (0, It.allSchemaProperties)(r.properties), u = (0, It.allSchemaProperties)(r.patternProperties);
|
|
3798
3798
|
m(), e.ok((0, ge._)`${a} === ${cd.default.errors}`);
|
|
3799
3799
|
function m() {
|
|
3800
|
-
t.forIn("key", s, (
|
|
3801
|
-
!c.length && !u.length ?
|
|
3800
|
+
t.forIn("key", s, (y) => {
|
|
3801
|
+
!c.length && !u.length ? _(y) : t.if(g(y), () => _(y));
|
|
3802
3802
|
});
|
|
3803
3803
|
}
|
|
3804
|
-
function
|
|
3804
|
+
function g(y) {
|
|
3805
3805
|
let f;
|
|
3806
3806
|
if (c.length > 8) {
|
|
3807
|
-
const
|
|
3808
|
-
f = (0, It.isOwnProperty)(t,
|
|
3809
|
-
} else c.length ? f = (0, ge.or)(...c.map((
|
|
3810
|
-
return u.length && (f = (0, ge.or)(f, ...u.map((
|
|
3807
|
+
const p = (0, Nt.schemaRefOrVal)(o, r.properties, "properties");
|
|
3808
|
+
f = (0, It.isOwnProperty)(t, p, y);
|
|
3809
|
+
} else c.length ? f = (0, ge.or)(...c.map((p) => (0, ge._)`${y} === ${p}`)) : f = ge.nil;
|
|
3810
|
+
return u.length && (f = (0, ge.or)(f, ...u.map((p) => (0, ge._)`${(0, It.usePattern)(e, p)}.test(${y})`))), (0, ge.not)(f);
|
|
3811
3811
|
}
|
|
3812
|
-
function
|
|
3813
|
-
t.code((0, ge._)`delete ${s}[${
|
|
3812
|
+
function b(y) {
|
|
3813
|
+
t.code((0, ge._)`delete ${s}[${y}]`);
|
|
3814
3814
|
}
|
|
3815
|
-
function
|
|
3815
|
+
function _(y) {
|
|
3816
3816
|
if (d.removeAdditional === "all" || d.removeAdditional && n === !1) {
|
|
3817
|
-
|
|
3817
|
+
b(y);
|
|
3818
3818
|
return;
|
|
3819
3819
|
}
|
|
3820
3820
|
if (n === !1) {
|
|
3821
|
-
e.setParams({ additionalProperty:
|
|
3821
|
+
e.setParams({ additionalProperty: y }), e.error(), i || t.break();
|
|
3822
3822
|
return;
|
|
3823
3823
|
}
|
|
3824
3824
|
if (typeof n == "object" && !(0, Nt.alwaysValidSchema)(o, n)) {
|
|
3825
3825
|
const f = t.name("valid");
|
|
3826
|
-
d.removeAdditional === "failing" ? (
|
|
3827
|
-
e.reset(),
|
|
3828
|
-
})) : (
|
|
3826
|
+
d.removeAdditional === "failing" ? ($(y, f, !1), t.if((0, ge.not)(f), () => {
|
|
3827
|
+
e.reset(), b(y);
|
|
3828
|
+
})) : ($(y, f), i || t.if((0, ge.not)(f), () => t.break()));
|
|
3829
3829
|
}
|
|
3830
3830
|
}
|
|
3831
|
-
function
|
|
3831
|
+
function $(y, f, p) {
|
|
3832
3832
|
const k = {
|
|
3833
3833
|
keyword: "additionalProperties",
|
|
3834
|
-
dataProp:
|
|
3834
|
+
dataProp: y,
|
|
3835
3835
|
dataPropType: Nt.Type.Str
|
|
3836
3836
|
};
|
|
3837
|
-
|
|
3837
|
+
p === !1 && Object.assign(k, {
|
|
3838
3838
|
compositeRule: !0,
|
|
3839
3839
|
createErrors: !1,
|
|
3840
3840
|
allErrors: !1
|
|
@@ -3882,31 +3882,31 @@ const Vn = x, Mt = B, zn = N, Un = N, pd = {
|
|
|
3882
3882
|
type: "object",
|
|
3883
3883
|
schemaType: "object",
|
|
3884
3884
|
code(e) {
|
|
3885
|
-
const { gen: t, schema: n, data: r, parentSchema: s, it: a } = e, { opts: o } = a, i = (0, Vn.allSchemaProperties)(n), d = i.filter((
|
|
3885
|
+
const { gen: t, schema: n, data: r, parentSchema: s, it: a } = e, { opts: o } = a, i = (0, Vn.allSchemaProperties)(n), d = i.filter(($) => (0, zn.alwaysValidSchema)(a, n[$]));
|
|
3886
3886
|
if (i.length === 0 || d.length === i.length && (!a.opts.unevaluated || a.props === !0))
|
|
3887
3887
|
return;
|
|
3888
3888
|
const c = o.strictSchema && !o.allowMatchingProperties && s.properties, u = t.name("valid");
|
|
3889
3889
|
a.props !== !0 && !(a.props instanceof Mt.Name) && (a.props = (0, Un.evaluatedPropsToName)(t, a.props));
|
|
3890
3890
|
const { props: m } = a;
|
|
3891
|
-
|
|
3892
|
-
function
|
|
3893
|
-
for (const
|
|
3894
|
-
c && $
|
|
3891
|
+
g();
|
|
3892
|
+
function g() {
|
|
3893
|
+
for (const $ of i)
|
|
3894
|
+
c && b($), a.allErrors ? _($) : (t.var(u, !0), _($), t.if(u));
|
|
3895
3895
|
}
|
|
3896
|
-
function $
|
|
3897
|
-
for (const
|
|
3898
|
-
new RegExp(
|
|
3896
|
+
function b($) {
|
|
3897
|
+
for (const y in c)
|
|
3898
|
+
new RegExp($).test(y) && (0, zn.checkStrictMode)(a, `property ${y} matches pattern ${$} (use allowMatchingProperties)`);
|
|
3899
3899
|
}
|
|
3900
|
-
function
|
|
3901
|
-
t.forIn("key", r, (
|
|
3902
|
-
t.if((0, Mt._)`${(0, Vn.usePattern)(e,
|
|
3903
|
-
const f = d.includes(
|
|
3900
|
+
function _($) {
|
|
3901
|
+
t.forIn("key", r, (y) => {
|
|
3902
|
+
t.if((0, Mt._)`${(0, Vn.usePattern)(e, $)}.test(${y})`, () => {
|
|
3903
|
+
const f = d.includes($);
|
|
3904
3904
|
f || e.subschema({
|
|
3905
3905
|
keyword: "patternProperties",
|
|
3906
|
-
schemaProp:
|
|
3907
|
-
dataProp:
|
|
3906
|
+
schemaProp: $,
|
|
3907
|
+
dataProp: y,
|
|
3908
3908
|
dataPropType: Un.Type.Str
|
|
3909
|
-
}, u), a.opts.unevaluated && m !== !0 ? t.assign((0, Mt._)`${m}[${
|
|
3909
|
+
}, u), a.opts.unevaluated && m !== !0 ? t.assign((0, Mt._)`${m}[${y}]`, !0) : !f && !a.allErrors && t.if((0, Mt.not)(u), () => t.break());
|
|
3910
3910
|
});
|
|
3911
3911
|
});
|
|
3912
3912
|
}
|
|
@@ -3966,13 +3966,13 @@ const Ft = B, bd = N, $d = {
|
|
|
3966
3966
|
e.setParams({ passing: i }), t.block(c), e.result(o, () => e.reset(), () => e.error(!0));
|
|
3967
3967
|
function c() {
|
|
3968
3968
|
a.forEach((u, m) => {
|
|
3969
|
-
let
|
|
3970
|
-
(0, bd.alwaysValidSchema)(s, u) ? t.var(d, !0) :
|
|
3969
|
+
let g;
|
|
3970
|
+
(0, bd.alwaysValidSchema)(s, u) ? t.var(d, !0) : g = e.subschema({
|
|
3971
3971
|
keyword: "oneOf",
|
|
3972
3972
|
schemaProp: m,
|
|
3973
3973
|
compositeRule: !0
|
|
3974
3974
|
}, d), m > 0 && t.if((0, Ft._)`${d} && ${o}`).assign(o, !1).assign(i, (0, Ft._)`[${i}, ${m}]`).else(), t.if(d, () => {
|
|
3975
|
-
t.assign(o, !0), t.assign(i, m),
|
|
3975
|
+
t.assign(o, !0), t.assign(i, m), g && e.mergeEvaluated(g, Ft.Name);
|
|
3976
3976
|
});
|
|
3977
3977
|
});
|
|
3978
3978
|
}
|
|
@@ -4031,8 +4031,8 @@ const Ht = B, Js = N, Ed = {
|
|
|
4031
4031
|
}
|
|
4032
4032
|
function c(u, m) {
|
|
4033
4033
|
return () => {
|
|
4034
|
-
const
|
|
4035
|
-
t.assign(o, i), e.mergeValidEvaluated(
|
|
4034
|
+
const g = e.subschema({ keyword: u }, i);
|
|
4035
|
+
t.assign(o, i), e.mergeValidEvaluated(g, o), m ? t.assign(m, (0, Ht._)`${u}`) : e.setParams({ ifClause: u });
|
|
4036
4036
|
};
|
|
4037
4037
|
}
|
|
4038
4038
|
}
|
|
@@ -4053,7 +4053,7 @@ const Od = N, jd = {
|
|
|
4053
4053
|
};
|
|
4054
4054
|
pn.default = jd;
|
|
4055
4055
|
Object.defineProperty(rn, "__esModule", { value: !0 });
|
|
4056
|
-
const qd =
|
|
4056
|
+
const qd = ot, Id = nn, Nd = it, Md = sn, Td = an, Rd = Bs, Ad = on, Dd = Jt, Fd = ln, Cd = dn, Vd = cn, zd = un, Ud = fn, Ld = mn, Hd = hn, Kd = pn;
|
|
4057
4057
|
function Gd(e = !1) {
|
|
4058
4058
|
const t = [
|
|
4059
4059
|
// any
|
|
@@ -4088,32 +4088,32 @@ const te = B, Bd = {
|
|
|
4088
4088
|
const { gen: n, data: r, $data: s, schema: a, schemaCode: o, it: i } = e, { opts: d, errSchemaPath: c, schemaEnv: u, self: m } = i;
|
|
4089
4089
|
if (!d.validateFormats)
|
|
4090
4090
|
return;
|
|
4091
|
-
s ?
|
|
4092
|
-
function
|
|
4093
|
-
const
|
|
4091
|
+
s ? g() : b();
|
|
4092
|
+
function g() {
|
|
4093
|
+
const _ = n.scopeValue("formats", {
|
|
4094
4094
|
ref: m.formats,
|
|
4095
4095
|
code: d.code.formats
|
|
4096
|
-
}),
|
|
4097
|
-
n.if((0, te._)`typeof ${
|
|
4098
|
-
function
|
|
4096
|
+
}), $ = n.const("fDef", (0, te._)`${_}[${o}]`), y = n.let("fType"), f = n.let("format");
|
|
4097
|
+
n.if((0, te._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`, () => n.assign(y, (0, te._)`${$}.type || "string"`).assign(f, (0, te._)`${$}.validate`), () => n.assign(y, (0, te._)`"string"`).assign(f, $)), e.fail$data((0, te.or)(p(), k()));
|
|
4098
|
+
function p() {
|
|
4099
4099
|
return d.strictSchema === !1 ? te.nil : (0, te._)`${o} && !${f}`;
|
|
4100
4100
|
}
|
|
4101
4101
|
function k() {
|
|
4102
|
-
const S = u.$async ? (0, te._)`(${
|
|
4103
|
-
return (0, te._)`${f} && ${f} !== true && ${
|
|
4102
|
+
const S = u.$async ? (0, te._)`(${$}.async ? await ${f}(${r}) : ${f}(${r}))` : (0, te._)`${f}(${r})`, O = (0, te._)`(typeof ${f} == "function" ? ${S} : ${f}.test(${r}))`;
|
|
4103
|
+
return (0, te._)`${f} && ${f} !== true && ${y} === ${t} && !${O}`;
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
4106
|
-
function
|
|
4107
|
-
const
|
|
4108
|
-
if (!
|
|
4109
|
-
|
|
4106
|
+
function b() {
|
|
4107
|
+
const _ = m.formats[a];
|
|
4108
|
+
if (!_) {
|
|
4109
|
+
p();
|
|
4110
4110
|
return;
|
|
4111
4111
|
}
|
|
4112
|
-
if (
|
|
4112
|
+
if (_ === !0)
|
|
4113
4113
|
return;
|
|
4114
|
-
const [
|
|
4115
|
-
|
|
4116
|
-
function
|
|
4114
|
+
const [$, y, f] = k(_);
|
|
4115
|
+
$ === t && e.pass(S());
|
|
4116
|
+
function p() {
|
|
4117
4117
|
if (d.strictSchema === !1) {
|
|
4118
4118
|
m.logger.warn(O());
|
|
4119
4119
|
return;
|
|
@@ -4128,12 +4128,12 @@ const te = B, Bd = {
|
|
|
4128
4128
|
return typeof O == "object" && !(O instanceof RegExp) ? [O.type || "string", O.validate, (0, te._)`${J}.validate`] : ["string", O, J];
|
|
4129
4129
|
}
|
|
4130
4130
|
function S() {
|
|
4131
|
-
if (typeof
|
|
4131
|
+
if (typeof _ == "object" && !(_ instanceof RegExp) && _.async) {
|
|
4132
4132
|
if (!u.$async)
|
|
4133
4133
|
throw new Error("async format in sync schema");
|
|
4134
4134
|
return (0, te._)`await ${f}(${r})`;
|
|
4135
4135
|
}
|
|
4136
|
-
return typeof
|
|
4136
|
+
return typeof y == "function" ? (0, te._)`${f}(${r})` : (0, te._)`${f}.test(${r})`;
|
|
4137
4137
|
}
|
|
4138
4138
|
}
|
|
4139
4139
|
}
|
|
@@ -4142,10 +4142,10 @@ vn.default = xd;
|
|
|
4142
4142
|
Object.defineProperty(yn, "__esModule", { value: !0 });
|
|
4143
4143
|
const Jd = vn, Wd = [Jd.default];
|
|
4144
4144
|
yn.default = Wd;
|
|
4145
|
-
var
|
|
4146
|
-
Object.defineProperty(
|
|
4147
|
-
|
|
4148
|
-
|
|
4145
|
+
var nt = {};
|
|
4146
|
+
Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
4147
|
+
nt.contentVocabulary = nt.metadataVocabulary = void 0;
|
|
4148
|
+
nt.metadataVocabulary = [
|
|
4149
4149
|
"title",
|
|
4150
4150
|
"description",
|
|
4151
4151
|
"default",
|
|
@@ -4154,13 +4154,13 @@ rt.metadataVocabulary = [
|
|
|
4154
4154
|
"writeOnly",
|
|
4155
4155
|
"examples"
|
|
4156
4156
|
];
|
|
4157
|
-
|
|
4157
|
+
nt.contentVocabulary = [
|
|
4158
4158
|
"contentMediaType",
|
|
4159
4159
|
"contentEncoding",
|
|
4160
4160
|
"contentSchema"
|
|
4161
4161
|
];
|
|
4162
4162
|
Object.defineProperty(Ur, "__esModule", { value: !0 });
|
|
4163
|
-
const Zd = Lr, Yd = Kr, Qd = rn, Xd = yn, Hn =
|
|
4163
|
+
const Zd = Lr, Yd = Kr, Qd = rn, Xd = yn, Hn = nt, ec = [
|
|
4164
4164
|
Zd.default,
|
|
4165
4165
|
Yd.default,
|
|
4166
4166
|
(0, Qd.default)(),
|
|
@@ -4177,9 +4177,9 @@ var Kn;
|
|
|
4177
4177
|
e.Tag = "tag", e.Mapping = "mapping";
|
|
4178
4178
|
})(Kn || (Wt.DiscrError = Kn = {}));
|
|
4179
4179
|
Object.defineProperty(_n, "__esModule", { value: !0 });
|
|
4180
|
-
const
|
|
4180
|
+
const Xe = B, kr = Wt, Gn = fe, tc = at, rc = N, nc = {
|
|
4181
4181
|
message: ({ params: { discrError: e, tagName: t } }) => e === kr.DiscrError.Tag ? `tag "${t}" must be string` : `value of tag "${t}" must be in oneOf`,
|
|
4182
|
-
params: ({ params: { discrError: e, tag: t, tagName: n } }) => (0,
|
|
4182
|
+
params: ({ params: { discrError: e, tag: t, tagName: n } }) => (0, Xe._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`
|
|
4183
4183
|
}, sc = {
|
|
4184
4184
|
keyword: "discriminator",
|
|
4185
4185
|
type: "object",
|
|
@@ -4196,23 +4196,23 @@ const Qe = B, kr = Wt, Gn = fe, tc = st, rc = N, nc = {
|
|
|
4196
4196
|
throw new Error("discriminator: mapping is not supported");
|
|
4197
4197
|
if (!o)
|
|
4198
4198
|
throw new Error("discriminator: requires oneOf keyword");
|
|
4199
|
-
const d = t.let("valid", !1), c = t.const("tag", (0,
|
|
4200
|
-
t.if((0,
|
|
4199
|
+
const d = t.let("valid", !1), c = t.const("tag", (0, Xe._)`${n}${(0, Xe.getProperty)(i)}`);
|
|
4200
|
+
t.if((0, Xe._)`typeof ${c} == "string"`, () => u(), () => e.error(!1, { discrError: kr.DiscrError.Tag, tag: c, tagName: i })), e.ok(d);
|
|
4201
4201
|
function u() {
|
|
4202
|
-
const
|
|
4202
|
+
const b = g();
|
|
4203
4203
|
t.if(!1);
|
|
4204
|
-
for (const
|
|
4205
|
-
t.elseIf((0,
|
|
4204
|
+
for (const _ in b)
|
|
4205
|
+
t.elseIf((0, Xe._)`${c} === ${_}`), t.assign(d, m(b[_]));
|
|
4206
4206
|
t.else(), e.error(!1, { discrError: kr.DiscrError.Mapping, tag: c, tagName: i }), t.endIf();
|
|
4207
4207
|
}
|
|
4208
|
-
function m(
|
|
4209
|
-
const
|
|
4210
|
-
return e.mergeEvaluated(
|
|
4208
|
+
function m(b) {
|
|
4209
|
+
const _ = t.name("valid"), $ = e.subschema({ keyword: "oneOf", schemaProp: b }, _);
|
|
4210
|
+
return e.mergeEvaluated($, Xe.Name), _;
|
|
4211
4211
|
}
|
|
4212
|
-
function
|
|
4213
|
-
var
|
|
4214
|
-
const
|
|
4215
|
-
let
|
|
4212
|
+
function g() {
|
|
4213
|
+
var b;
|
|
4214
|
+
const _ = {}, $ = f(s);
|
|
4215
|
+
let y = !0;
|
|
4216
4216
|
for (let S = 0; S < o.length; S++) {
|
|
4217
4217
|
let O = o[S];
|
|
4218
4218
|
if (O != null && O.$ref && !(0, rc.schemaHasRulesButRef)(O, a.self.RULES)) {
|
|
@@ -4220,18 +4220,18 @@ const Qe = B, kr = Wt, Gn = fe, tc = st, rc = N, nc = {
|
|
|
4220
4220
|
if (O = Gn.resolveRef.call(a.self, a.schemaEnv.root, a.baseId, J), O instanceof Gn.SchemaEnv && (O = O.schema), O === void 0)
|
|
4221
4221
|
throw new tc.default(a.opts.uriResolver, a.baseId, J);
|
|
4222
4222
|
}
|
|
4223
|
-
const z = (
|
|
4223
|
+
const z = (b = O == null ? void 0 : O.properties) === null || b === void 0 ? void 0 : b[i];
|
|
4224
4224
|
if (typeof z != "object")
|
|
4225
4225
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);
|
|
4226
|
-
|
|
4226
|
+
y = y && ($ || f(O)), p(z, S);
|
|
4227
4227
|
}
|
|
4228
|
-
if (!
|
|
4228
|
+
if (!y)
|
|
4229
4229
|
throw new Error(`discriminator: "${i}" must be required`);
|
|
4230
|
-
return
|
|
4230
|
+
return _;
|
|
4231
4231
|
function f({ required: S }) {
|
|
4232
4232
|
return Array.isArray(S) && S.includes(i);
|
|
4233
4233
|
}
|
|
4234
|
-
function
|
|
4234
|
+
function p(S, O) {
|
|
4235
4235
|
if (S.const)
|
|
4236
4236
|
k(S.const, O);
|
|
4237
4237
|
else if (S.enum)
|
|
@@ -4241,9 +4241,9 @@ const Qe = B, kr = Wt, Gn = fe, tc = st, rc = N, nc = {
|
|
|
4241
4241
|
throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`);
|
|
4242
4242
|
}
|
|
4243
4243
|
function k(S, O) {
|
|
4244
|
-
if (typeof S != "string" || S in
|
|
4244
|
+
if (typeof S != "string" || S in _)
|
|
4245
4245
|
throw new Error(`discriminator: "${i}" values must be unique strings`);
|
|
4246
|
-
|
|
4246
|
+
_[S] = O;
|
|
4247
4247
|
}
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
@@ -4495,13 +4495,13 @@ const ac = "http://json-schema.org/draft-07/schema#", oc = "http://json-schema.o
|
|
|
4495
4495
|
const n = Yn, r = Ur, s = _n, a = uc, o = ["/properties"], i = "http://json-schema.org/draft-07/schema";
|
|
4496
4496
|
class d extends n.default {
|
|
4497
4497
|
_addVocabularies() {
|
|
4498
|
-
super._addVocabularies(), r.default.forEach((
|
|
4498
|
+
super._addVocabularies(), r.default.forEach((_) => this.addVocabulary(_)), this.opts.discriminator && this.addKeyword(s.default);
|
|
4499
4499
|
}
|
|
4500
4500
|
_addDefaultMetaSchema() {
|
|
4501
4501
|
if (super._addDefaultMetaSchema(), !this.opts.meta)
|
|
4502
4502
|
return;
|
|
4503
|
-
const
|
|
4504
|
-
this.addMetaSchema(
|
|
4503
|
+
const _ = this.opts.$data ? this.$dataMetaSchema(a, o) : a;
|
|
4504
|
+
this.addMetaSchema(_, i, !1), this.refs["http://json-schema.org/schema"] = i;
|
|
4505
4505
|
}
|
|
4506
4506
|
defaultMeta() {
|
|
4507
4507
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(i) ? i : void 0);
|
|
@@ -4530,9 +4530,9 @@ const ac = "http://json-schema.org/draft-07/schema#", oc = "http://json-schema.o
|
|
|
4530
4530
|
Object.defineProperty(t, "ValidationError", { enumerable: !0, get: function() {
|
|
4531
4531
|
return m.default;
|
|
4532
4532
|
} });
|
|
4533
|
-
var
|
|
4533
|
+
var g = at;
|
|
4534
4534
|
Object.defineProperty(t, "MissingRefError", { enumerable: !0, get: function() {
|
|
4535
|
-
return
|
|
4535
|
+
return g.default;
|
|
4536
4536
|
} });
|
|
4537
4537
|
})(yr, yr.exports);
|
|
4538
4538
|
var Ws = yr.exports;
|
|
@@ -4548,10 +4548,10 @@ var Sr = { exports: {} }, Zs = {};
|
|
|
4548
4548
|
date: t(a, o),
|
|
4549
4549
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
4550
4550
|
time: t(d, c),
|
|
4551
|
-
"date-time": t(m,
|
|
4551
|
+
"date-time": t(m, g),
|
|
4552
4552
|
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
4553
4553
|
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
4554
|
-
uri:
|
|
4554
|
+
uri: $,
|
|
4555
4555
|
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
|
4556
4556
|
// uri-template: https://tools.ietf.org/html/rfc6570
|
|
4557
4557
|
"uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
|
@@ -4591,7 +4591,7 @@ var Sr = { exports: {} }, Zs = {};
|
|
|
4591
4591
|
...e.fullFormats,
|
|
4592
4592
|
date: t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, o),
|
|
4593
4593
|
time: t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, c),
|
|
4594
|
-
"date-time": t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
|
|
4594
|
+
"date-time": t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, g),
|
|
4595
4595
|
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
4596
4596
|
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
4597
4597
|
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
@@ -4635,24 +4635,24 @@ var Sr = { exports: {} }, Zs = {};
|
|
|
4635
4635
|
const V = T.split(u);
|
|
4636
4636
|
return V.length === 2 && a(V[0]) && d(V[1], !0);
|
|
4637
4637
|
}
|
|
4638
|
-
function
|
|
4638
|
+
function g(T, V) {
|
|
4639
4639
|
if (!(T && V))
|
|
4640
4640
|
return;
|
|
4641
4641
|
const [W, H] = T.split(u), [ne, L] = V.split(u), re = o(W, ne);
|
|
4642
4642
|
if (re !== void 0)
|
|
4643
4643
|
return re || c(H, L);
|
|
4644
4644
|
}
|
|
4645
|
-
const
|
|
4646
|
-
function
|
|
4647
|
-
return
|
|
4645
|
+
const b = /\/|:/, _ = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
4646
|
+
function $(T) {
|
|
4647
|
+
return b.test(T) && _.test(T);
|
|
4648
4648
|
}
|
|
4649
|
-
const
|
|
4649
|
+
const y = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
4650
4650
|
function f(T) {
|
|
4651
|
-
return
|
|
4651
|
+
return y.lastIndex = 0, y.test(T);
|
|
4652
4652
|
}
|
|
4653
|
-
const
|
|
4653
|
+
const p = -2147483648, k = 2 ** 31 - 1;
|
|
4654
4654
|
function S(T) {
|
|
4655
|
-
return Number.isInteger(T) && T <= k && T >=
|
|
4655
|
+
return Number.isInteger(T) && T <= k && T >= p;
|
|
4656
4656
|
}
|
|
4657
4657
|
function O(T) {
|
|
4658
4658
|
return Number.isInteger(T);
|
|
@@ -4690,20 +4690,20 @@ var Ys = {};
|
|
|
4690
4690
|
$data: !0,
|
|
4691
4691
|
error: a,
|
|
4692
4692
|
code(i) {
|
|
4693
|
-
const { gen: d, data: c, schemaCode: u, keyword: m, it:
|
|
4694
|
-
if (
|
|
4693
|
+
const { gen: d, data: c, schemaCode: u, keyword: m, it: g } = i, { opts: b, self: _ } = g;
|
|
4694
|
+
if (!b.validateFormats)
|
|
4695
4695
|
return;
|
|
4696
|
-
const
|
|
4697
|
-
|
|
4698
|
-
function
|
|
4696
|
+
const $ = new t.KeywordCxt(g, _.RULES.all.format.definition, "format");
|
|
4697
|
+
$.$data ? y() : f();
|
|
4698
|
+
function y() {
|
|
4699
4699
|
const k = d.scopeValue("formats", {
|
|
4700
|
-
ref:
|
|
4701
|
-
code:
|
|
4702
|
-
}), S = d.const("fmt", n._`${k}[${
|
|
4703
|
-
i.fail$data(n.or(n._`typeof ${S} != "object"`, n._`${S} instanceof RegExp`, n._`typeof ${S}.compare != "function"`,
|
|
4700
|
+
ref: _.formats,
|
|
4701
|
+
code: b.code.formats
|
|
4702
|
+
}), S = d.const("fmt", n._`${k}[${$.schemaCode}]`);
|
|
4703
|
+
i.fail$data(n.or(n._`typeof ${S} != "object"`, n._`${S} instanceof RegExp`, n._`typeof ${S}.compare != "function"`, p(S)));
|
|
4704
4704
|
}
|
|
4705
4705
|
function f() {
|
|
4706
|
-
const k =
|
|
4706
|
+
const k = $.schema, S = _.formats[k];
|
|
4707
4707
|
if (!S || S === !0)
|
|
4708
4708
|
return;
|
|
4709
4709
|
if (typeof S != "object" || S instanceof RegExp || typeof S.compare != "function")
|
|
@@ -4711,11 +4711,11 @@ var Ys = {};
|
|
|
4711
4711
|
const O = d.scopeValue("formats", {
|
|
4712
4712
|
key: k,
|
|
4713
4713
|
ref: S,
|
|
4714
|
-
code:
|
|
4714
|
+
code: b.code.formats ? n._`${b.code.formats}${n.getProperty(k)}` : void 0
|
|
4715
4715
|
});
|
|
4716
|
-
i.fail$data(
|
|
4716
|
+
i.fail$data(p(O));
|
|
4717
4717
|
}
|
|
4718
|
-
function
|
|
4718
|
+
function p(k) {
|
|
4719
4719
|
return n._`${k}.compare(${c}, ${u}) ${s[m].fail} 0`;
|
|
4720
4720
|
}
|
|
4721
4721
|
},
|
|
@@ -4729,20 +4729,20 @@ var Ys = {};
|
|
|
4729
4729
|
const n = Zs, r = Ys, s = B, a = new s.Name("fullFormats"), o = new s.Name("fastFormats"), i = (c, u = { keywords: !0 }) => {
|
|
4730
4730
|
if (Array.isArray(u))
|
|
4731
4731
|
return d(c, u, n.fullFormats, a), c;
|
|
4732
|
-
const [m,
|
|
4733
|
-
return d(c,
|
|
4732
|
+
const [m, g] = u.mode === "fast" ? [n.fastFormats, o] : [n.fullFormats, a], b = u.formats || n.formatNames;
|
|
4733
|
+
return d(c, b, m, g), u.keywords && r.default(c), c;
|
|
4734
4734
|
};
|
|
4735
4735
|
i.get = (c, u = "full") => {
|
|
4736
|
-
const
|
|
4737
|
-
if (!
|
|
4736
|
+
const g = (u === "fast" ? n.fastFormats : n.fullFormats)[c];
|
|
4737
|
+
if (!g)
|
|
4738
4738
|
throw new Error(`Unknown format "${c}"`);
|
|
4739
|
-
return
|
|
4739
|
+
return g;
|
|
4740
4740
|
};
|
|
4741
|
-
function d(c, u, m,
|
|
4742
|
-
var
|
|
4743
|
-
(
|
|
4744
|
-
for (const
|
|
4745
|
-
c.addFormat(
|
|
4741
|
+
function d(c, u, m, g) {
|
|
4742
|
+
var b, _;
|
|
4743
|
+
(b = (_ = c.opts.code).formats) !== null && b !== void 0 || (_.formats = s._`require("ajv-formats/dist/formats").${g}`);
|
|
4744
|
+
for (const $ of u)
|
|
4745
|
+
c.addFormat($, m[$]);
|
|
4746
4746
|
}
|
|
4747
4747
|
e.exports = t = i, Object.defineProperty(t, "__esModule", { value: !0 }), t.default = i;
|
|
4748
4748
|
})(Sr, Sr.exports);
|
|
@@ -4902,23 +4902,23 @@ const Qs = Symbol("quickforms-context");
|
|
|
4902
4902
|
function yc(e) {
|
|
4903
4903
|
ea(Qs, e);
|
|
4904
4904
|
}
|
|
4905
|
-
function
|
|
4905
|
+
function xe() {
|
|
4906
4906
|
return ta(Qs, void 0);
|
|
4907
4907
|
}
|
|
4908
4908
|
function ke(e) {
|
|
4909
4909
|
return `field-${e.replace(/\./g, "-")}`;
|
|
4910
4910
|
}
|
|
4911
|
-
function
|
|
4911
|
+
function $m(e, t) {
|
|
4912
4912
|
return e.title || t.split(".").pop() || t;
|
|
4913
4913
|
}
|
|
4914
4914
|
function vc(e) {
|
|
4915
4915
|
const t = e["x-hint"];
|
|
4916
4916
|
return t || e.description;
|
|
4917
4917
|
}
|
|
4918
|
-
function
|
|
4918
|
+
function wm(e) {
|
|
4919
4919
|
return e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
4920
4920
|
}
|
|
4921
|
-
function
|
|
4921
|
+
function km(...e) {
|
|
4922
4922
|
return e.filter(Boolean).join(".");
|
|
4923
4923
|
}
|
|
4924
4924
|
const Ne = new pc();
|
|
@@ -4945,7 +4945,7 @@ function Bn(e) {
|
|
|
4945
4945
|
return typeof e == "boolean" || typeof e == "string" ? e : e && typeof e == "object" && e.valid === !1 ? e.message || "Validation failed" : !0;
|
|
4946
4946
|
}
|
|
4947
4947
|
function ve(e, t, n = {}) {
|
|
4948
|
-
const r =
|
|
4948
|
+
const r = xe(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", a = r == null ? void 0 : r.errorMessages, o = r == null ? void 0 : r.validators, i = r == null ? void 0 : r.validatorDebounce, d = (M, T) => {
|
|
4949
4949
|
var W;
|
|
4950
4950
|
const V = t["x-error-messages"];
|
|
4951
4951
|
return V != null && V[M] ? V[M] : (W = a == null ? void 0 : a[e]) != null && W[M] ? a[e][M] : T;
|
|
@@ -5044,9 +5044,9 @@ function ve(e, t, n = {}) {
|
|
|
5044
5044
|
return console.error("Custom validator error for", e, ":", H), "Validation error";
|
|
5045
5045
|
}
|
|
5046
5046
|
return !0;
|
|
5047
|
-
}, m = c(),
|
|
5047
|
+
}, m = c(), g = m && (o != null && o[e]) ? bc(u, m) : u, { value: b, errorMessage: _, errors: $, setValue: y, setTouched: f, meta: p } = ca(
|
|
5048
5048
|
e,
|
|
5049
|
-
s === "NoValidation" ? void 0 :
|
|
5049
|
+
s === "NoValidation" ? void 0 : g,
|
|
5050
5050
|
{
|
|
5051
5051
|
validateOnValueUpdate: !0,
|
|
5052
5052
|
// Always validate on update
|
|
@@ -5059,7 +5059,7 @@ function ve(e, t, n = {}) {
|
|
|
5059
5059
|
return r != null && r.hintRenderer ? r.hintRenderer(M, {
|
|
5060
5060
|
schema: t,
|
|
5061
5061
|
path: e,
|
|
5062
|
-
value:
|
|
5062
|
+
value: b.value
|
|
5063
5063
|
}) : M;
|
|
5064
5064
|
}), O = G(() => {
|
|
5065
5065
|
var T, V;
|
|
@@ -5068,14 +5068,14 @@ function ve(e, t, n = {}) {
|
|
|
5068
5068
|
}), z = G(() => {
|
|
5069
5069
|
const M = r == null ? void 0 : r.schema;
|
|
5070
5070
|
return M ? Ne.isRequired(M, e) : !1;
|
|
5071
|
-
}), J = G(() => s === "ValidateAndHide" || s === "NoValidation" ? null :
|
|
5071
|
+
}), J = G(() => s === "ValidateAndHide" || s === "NoValidation" ? null : _.value);
|
|
5072
5072
|
return {
|
|
5073
|
-
value:
|
|
5073
|
+
value: b,
|
|
5074
5074
|
errorMessage: J,
|
|
5075
|
-
errors:
|
|
5076
|
-
setValue:
|
|
5075
|
+
errors: $,
|
|
5076
|
+
setValue: y,
|
|
5077
5077
|
setTouched: f,
|
|
5078
|
-
meta:
|
|
5078
|
+
meta: p,
|
|
5079
5079
|
label: k,
|
|
5080
5080
|
hint: S,
|
|
5081
5081
|
hintMode: O,
|
|
@@ -5095,13 +5095,13 @@ const $c = /* @__PURE__ */ me({
|
|
|
5095
5095
|
},
|
|
5096
5096
|
setup(e, { expose: t }) {
|
|
5097
5097
|
t();
|
|
5098
|
-
const n = e, r =
|
|
5098
|
+
const n = e, r = xe(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", { value: a, errorMessage: o, label: i, hint: d, hintMode: c } = ve(
|
|
5099
5099
|
n.path,
|
|
5100
5100
|
n.schema,
|
|
5101
5101
|
{ label: n.label }
|
|
5102
|
-
), u = ke(n.path), m = oe(!1),
|
|
5102
|
+
), u = ke(n.path), m = oe(!1), g = oe(!1), b = oe(!1), _ = G(() => n.schema.format === "password"), $ = G(() => n.schema.format === "email" ? "email" : n.schema.format === "url" || n.schema.format === "uri" ? "url" : n.schema.format === "password" ? m.value ? "text" : "password" : "text"), y = G(() => n.schema.format === "textarea" || n.schema.maxLength && n.schema.maxLength > 200), f = () => {
|
|
5103
5103
|
m.value = !m.value;
|
|
5104
|
-
},
|
|
5104
|
+
}, p = G(() => !d.value || o.value ? !1 : c.value === "always" ? !0 : c.value === "focus" ? g.value : c.value === "hover" ? b.value : !0), k = { props: n, formContext: r, validationMode: s, value: a, errorMessage: o, label: i, hint: d, hintMode: c, fieldId: u, showPassword: m, isFocused: g, isHovered: b, isPassword: _, inputType: $, isTextarea: y, togglePasswordVisibility: f, showHint: p };
|
|
5105
5105
|
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
5106
5106
|
}
|
|
5107
5107
|
}), he = (e, t) => {
|
|
@@ -5143,19 +5143,19 @@ const $c = /* @__PURE__ */ me({
|
|
|
5143
5143
|
};
|
|
5144
5144
|
function Rc(e, t, n, r, s, a) {
|
|
5145
5145
|
var o, i;
|
|
5146
|
-
return j(),
|
|
5146
|
+
return j(), q("div", wc, [
|
|
5147
5147
|
D("label", {
|
|
5148
5148
|
for: r.fieldId,
|
|
5149
5149
|
class: "quickform-label"
|
|
5150
5150
|
}, [
|
|
5151
5151
|
qe(
|
|
5152
|
-
|
|
5152
|
+
Q(r.label) + " ",
|
|
5153
5153
|
1
|
|
5154
5154
|
/* TEXT */
|
|
5155
5155
|
),
|
|
5156
|
-
r.props.schema.required ? (j(),
|
|
5156
|
+
r.props.schema.required ? (j(), q("span", Sc, "*")) : C("v-if", !0)
|
|
5157
5157
|
], 8, kc),
|
|
5158
|
-
r.isTextarea ? je((j(),
|
|
5158
|
+
r.isTextarea ? je((j(), q("textarea", {
|
|
5159
5159
|
key: 0,
|
|
5160
5160
|
id: r.fieldId,
|
|
5161
5161
|
"onUpdate:modelValue": t[0] || (t[0] = (d) => r.value = d),
|
|
@@ -5173,7 +5173,7 @@ function Rc(e, t, n, r, s, a) {
|
|
|
5173
5173
|
onMouseleave: t[4] || (t[4] = (d) => r.isHovered = !1)
|
|
5174
5174
|
}, null, 40, Ec)), [
|
|
5175
5175
|
[_t, r.value]
|
|
5176
|
-
]) : (j(),
|
|
5176
|
+
]) : (j(), q("div", Pc, [
|
|
5177
5177
|
je(D("input", {
|
|
5178
5178
|
id: r.fieldId,
|
|
5179
5179
|
"onUpdate:modelValue": t[5] || (t[5] = (d) => r.value = d),
|
|
@@ -5194,14 +5194,14 @@ function Rc(e, t, n, r, s, a) {
|
|
|
5194
5194
|
}, null, 42, Oc), [
|
|
5195
5195
|
[Pr, r.value]
|
|
5196
5196
|
]),
|
|
5197
|
-
r.isPassword ? (j(),
|
|
5197
|
+
r.isPassword ? (j(), q("button", {
|
|
5198
5198
|
key: 0,
|
|
5199
5199
|
type: "button",
|
|
5200
5200
|
class: "quickform-password-toggle",
|
|
5201
5201
|
"aria-label": r.showPassword ? (o = r.formContext) == null ? void 0 : o.labels.hidePassword : (i = r.formContext) == null ? void 0 : i.labels.showPassword,
|
|
5202
5202
|
onClick: r.togglePasswordVisibility
|
|
5203
5203
|
}, [
|
|
5204
|
-
r.showPassword ? (j(),
|
|
5204
|
+
r.showPassword ? (j(), q("svg", qc, [...t[10] || (t[10] = [
|
|
5205
5205
|
D(
|
|
5206
5206
|
"path",
|
|
5207
5207
|
{ d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" },
|
|
@@ -5221,7 +5221,7 @@ function Rc(e, t, n, r, s, a) {
|
|
|
5221
5221
|
-1
|
|
5222
5222
|
/* CACHED */
|
|
5223
5223
|
)
|
|
5224
|
-
])])) : (j(),
|
|
5224
|
+
])])) : (j(), q("svg", Ic, [...t[11] || (t[11] = [
|
|
5225
5225
|
D(
|
|
5226
5226
|
"path",
|
|
5227
5227
|
{ d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" },
|
|
@@ -5243,17 +5243,17 @@ function Rc(e, t, n, r, s, a) {
|
|
|
5243
5243
|
])]))
|
|
5244
5244
|
], 8, jc)) : C("v-if", !0)
|
|
5245
5245
|
])),
|
|
5246
|
-
r.showHint ? (j(),
|
|
5246
|
+
r.showHint ? (j(), q("div", {
|
|
5247
5247
|
key: 2,
|
|
5248
5248
|
id: `${r.fieldId}-hint`,
|
|
5249
5249
|
class: "quickform-hint"
|
|
5250
5250
|
}, [
|
|
5251
5251
|
D("span", { innerHTML: r.hint }, null, 8, Mc)
|
|
5252
5252
|
], 8, Nc)) : C("v-if", !0),
|
|
5253
|
-
r.errorMessage ? (j(),
|
|
5253
|
+
r.errorMessage ? (j(), q(
|
|
5254
5254
|
"div",
|
|
5255
5255
|
Tc,
|
|
5256
|
-
|
|
5256
|
+
Q(r.errorMessage),
|
|
5257
5257
|
1
|
|
5258
5258
|
/* TEXT */
|
|
5259
5259
|
)) : C("v-if", !0)
|
|
@@ -5272,8 +5272,8 @@ const Ac = /* @__PURE__ */ he($c, [["render", Rc], ["__scopeId", "data-v-ad9ab1f
|
|
|
5272
5272
|
},
|
|
5273
5273
|
setup(e, { expose: t }) {
|
|
5274
5274
|
t();
|
|
5275
|
-
const n = e, r =
|
|
5276
|
-
return Object.defineProperty(
|
|
5275
|
+
const n = e, r = xe(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", { value: a, errorMessage: o, label: i, hint: d, hintMode: c } = ve(n.path, n.schema, { label: n.label }), u = ke(n.path), m = oe(!1), g = oe(!1), b = G(() => (n.schema.type === "integer", "number")), _ = G(() => n.schema.multipleOf ? n.schema.multipleOf : n.schema.type === "integer" ? 1 : "any"), $ = G(() => !d.value || o.value ? !1 : c.value === "always" ? !0 : c.value === "focus" ? m.value : c.value === "hover" ? g.value : !0), y = { props: n, formContext: r, validationMode: s, value: a, errorMessage: o, label: i, hint: d, hintMode: c, fieldId: u, isFocused: m, isHovered: g, inputType: b, step: _, showHint: $ };
|
|
5276
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
5277
5277
|
}
|
|
5278
5278
|
}), Fc = { class: "quickform-field quickform-number-field" }, Cc = ["for"], Vc = {
|
|
5279
5279
|
key: 0,
|
|
@@ -5283,17 +5283,17 @@ const Ac = /* @__PURE__ */ he($c, [["render", Rc], ["__scopeId", "data-v-ad9ab1f
|
|
|
5283
5283
|
class: "quickform-error"
|
|
5284
5284
|
};
|
|
5285
5285
|
function Kc(e, t, n, r, s, a) {
|
|
5286
|
-
return j(),
|
|
5286
|
+
return j(), q("div", Fc, [
|
|
5287
5287
|
D("label", {
|
|
5288
5288
|
for: r.fieldId,
|
|
5289
5289
|
class: "quickform-label"
|
|
5290
5290
|
}, [
|
|
5291
5291
|
qe(
|
|
5292
|
-
|
|
5292
|
+
Q(r.label) + " ",
|
|
5293
5293
|
1
|
|
5294
5294
|
/* TEXT */
|
|
5295
5295
|
),
|
|
5296
|
-
r.props.schema.required ? (j(),
|
|
5296
|
+
r.props.schema.required ? (j(), q("span", Vc, "*")) : C("v-if", !0)
|
|
5297
5297
|
], 8, Cc),
|
|
5298
5298
|
je(D("input", {
|
|
5299
5299
|
id: r.fieldId,
|
|
@@ -5320,17 +5320,17 @@ function Kc(e, t, n, r, s, a) {
|
|
|
5320
5320
|
{ number: !0 }
|
|
5321
5321
|
]
|
|
5322
5322
|
]),
|
|
5323
|
-
r.showHint ? (j(),
|
|
5323
|
+
r.showHint ? (j(), q("div", {
|
|
5324
5324
|
key: 0,
|
|
5325
5325
|
id: `${r.fieldId}-hint`,
|
|
5326
5326
|
class: "quickform-hint"
|
|
5327
5327
|
}, [
|
|
5328
5328
|
D("span", { innerHTML: r.hint }, null, 8, Lc)
|
|
5329
5329
|
], 8, Uc)) : C("v-if", !0),
|
|
5330
|
-
r.errorMessage ? (j(),
|
|
5330
|
+
r.errorMessage ? (j(), q(
|
|
5331
5331
|
"div",
|
|
5332
5332
|
Hc,
|
|
5333
|
-
|
|
5333
|
+
Q(r.errorMessage),
|
|
5334
5334
|
1
|
|
5335
5335
|
/* TEXT */
|
|
5336
5336
|
)) : C("v-if", !0)
|
|
@@ -5349,8 +5349,8 @@ const Gc = /* @__PURE__ */ he(Dc, [["render", Kc], ["__scopeId", "data-v-7def4a8
|
|
|
5349
5349
|
},
|
|
5350
5350
|
setup(e, { expose: t }) {
|
|
5351
5351
|
t();
|
|
5352
|
-
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = ve(n.path, n.schema, { label: n.label }), d = ke(n.path), c = oe(!1), u = oe(!1), m = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? c.value : i.value === "hover" ? u.value : !0),
|
|
5353
|
-
return Object.defineProperty(
|
|
5352
|
+
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = ve(n.path, n.schema, { label: n.label }), d = ke(n.path), c = oe(!1), u = oe(!1), m = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? c.value : i.value === "hover" ? u.value : !0), g = { props: n, value: r, errorMessage: s, label: a, hint: o, hintMode: i, fieldId: d, isFocused: c, isHovered: u, showHint: m };
|
|
5353
|
+
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
5354
5354
|
}
|
|
5355
5355
|
}), xc = { class: "quickform-field quickform-boolean-field" }, Jc = ["for"], Wc = ["id", "disabled", "readonly", "aria-describedby", "aria-invalid"], Zc = { class: "quickform-checkbox-text" }, Yc = {
|
|
5356
5356
|
key: 0,
|
|
@@ -5360,7 +5360,7 @@ const Gc = /* @__PURE__ */ he(Dc, [["render", Kc], ["__scopeId", "data-v-7def4a8
|
|
|
5360
5360
|
class: "quickform-error"
|
|
5361
5361
|
};
|
|
5362
5362
|
function tu(e, t, n, r, s, a) {
|
|
5363
|
-
return j(),
|
|
5363
|
+
return j(), q("div", xc, [
|
|
5364
5364
|
D("label", {
|
|
5365
5365
|
for: r.fieldId,
|
|
5366
5366
|
class: "quickform-checkbox-label",
|
|
@@ -5383,24 +5383,24 @@ function tu(e, t, n, r, s, a) {
|
|
|
5383
5383
|
]),
|
|
5384
5384
|
D("span", Zc, [
|
|
5385
5385
|
qe(
|
|
5386
|
-
|
|
5386
|
+
Q(r.label) + " ",
|
|
5387
5387
|
1
|
|
5388
5388
|
/* TEXT */
|
|
5389
5389
|
),
|
|
5390
|
-
r.props.schema.required ? (j(),
|
|
5390
|
+
r.props.schema.required ? (j(), q("span", Yc, "*")) : C("v-if", !0)
|
|
5391
5391
|
])
|
|
5392
5392
|
], 40, Jc),
|
|
5393
|
-
r.showHint ? (j(),
|
|
5393
|
+
r.showHint ? (j(), q("div", {
|
|
5394
5394
|
key: 0,
|
|
5395
5395
|
id: `${r.fieldId}-hint`,
|
|
5396
5396
|
class: "quickform-hint"
|
|
5397
5397
|
}, [
|
|
5398
5398
|
D("span", { innerHTML: r.hint }, null, 8, Xc)
|
|
5399
5399
|
], 8, Qc)) : C("v-if", !0),
|
|
5400
|
-
r.errorMessage ? (j(),
|
|
5400
|
+
r.errorMessage ? (j(), q(
|
|
5401
5401
|
"div",
|
|
5402
5402
|
eu,
|
|
5403
|
-
|
|
5403
|
+
Q(r.errorMessage),
|
|
5404
5404
|
1
|
|
5405
5405
|
/* TEXT */
|
|
5406
5406
|
)) : C("v-if", !0)
|
|
@@ -5423,27 +5423,27 @@ const ru = /* @__PURE__ */ he(Bc, [["render", tu], ["__scopeId", "data-v-1ff012c
|
|
|
5423
5423
|
n.path,
|
|
5424
5424
|
n.schema,
|
|
5425
5425
|
{ label: n.label }
|
|
5426
|
-
), d =
|
|
5426
|
+
), d = xe(), c = ke(n.path), u = `${c}-datalist`, m = oe(!1), g = oe(!1), b = G(() => {
|
|
5427
5427
|
if (!n.schema.enum) return [];
|
|
5428
|
-
const
|
|
5428
|
+
const p = n.schema["x-enum-labels"];
|
|
5429
5429
|
return n.schema.enum.map((k) => {
|
|
5430
5430
|
let S = String(k);
|
|
5431
|
-
return
|
|
5431
|
+
return p && k in p && (S = p[k]), {
|
|
5432
5432
|
value: k,
|
|
5433
5433
|
label: S
|
|
5434
5434
|
};
|
|
5435
5435
|
});
|
|
5436
|
-
}),
|
|
5436
|
+
}), _ = G(() => {
|
|
5437
5437
|
var O, z, J, M;
|
|
5438
|
-
const
|
|
5439
|
-
if ((
|
|
5440
|
-
return
|
|
5438
|
+
const p = n.schema["x-component-props"];
|
|
5439
|
+
if ((p == null ? void 0 : p.autocomplete) !== void 0)
|
|
5440
|
+
return p.autocomplete;
|
|
5441
5441
|
const k = ((z = (O = d == null ? void 0 : d.componentDefaults) == null ? void 0 : O.select) == null ? void 0 : z.autocomplete) || !1, S = ((M = (J = d == null ? void 0 : d.componentDefaults) == null ? void 0 : J.select) == null ? void 0 : M.autocompleteThreshold) || 5;
|
|
5442
|
-
return k ||
|
|
5443
|
-
}),
|
|
5444
|
-
var
|
|
5445
|
-
return ((
|
|
5446
|
-
}),
|
|
5442
|
+
return k || b.value.length >= S;
|
|
5443
|
+
}), $ = G(() => {
|
|
5444
|
+
var p;
|
|
5445
|
+
return ((p = d == null ? void 0 : d.labels) == null ? void 0 : p.selectPlaceholder) || "Select an option...";
|
|
5446
|
+
}), y = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? m.value : i.value === "hover" ? g.value : !0), f = { props: n, value: r, errorMessage: s, label: a, hint: o, hintMode: i, formContext: d, fieldId: c, datalistId: u, isFocused: m, isHovered: g, options: b, useAutocomplete: _, placeholder: $, showHint: y };
|
|
5447
5447
|
return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
|
|
5448
5448
|
}
|
|
5449
5449
|
}), su = { class: "quickform-field quickform-enum-field" }, au = ["for"], ou = {
|
|
@@ -5454,20 +5454,20 @@ const ru = /* @__PURE__ */ he(Bc, [["render", tu], ["__scopeId", "data-v-1ff012c
|
|
|
5454
5454
|
class: "quickform-error"
|
|
5455
5455
|
};
|
|
5456
5456
|
function pu(e, t, n, r, s, a) {
|
|
5457
|
-
return j(),
|
|
5457
|
+
return j(), q("div", su, [
|
|
5458
5458
|
D("label", {
|
|
5459
5459
|
for: r.fieldId,
|
|
5460
5460
|
class: "quickform-label"
|
|
5461
5461
|
}, [
|
|
5462
5462
|
qe(
|
|
5463
|
-
|
|
5463
|
+
Q(r.label) + " ",
|
|
5464
5464
|
1
|
|
5465
5465
|
/* TEXT */
|
|
5466
5466
|
),
|
|
5467
|
-
r.props.schema.required ? (j(),
|
|
5467
|
+
r.props.schema.required ? (j(), q("span", ou, "*")) : C("v-if", !0)
|
|
5468
5468
|
], 8, au),
|
|
5469
5469
|
C(" Use datalist for autocomplete when enabled "),
|
|
5470
|
-
r.useAutocomplete ? je((j(),
|
|
5470
|
+
r.useAutocomplete ? je((j(), q("input", {
|
|
5471
5471
|
key: 0,
|
|
5472
5472
|
id: r.fieldId,
|
|
5473
5473
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.value = o),
|
|
@@ -5485,19 +5485,19 @@ function pu(e, t, n, r, s, a) {
|
|
|
5485
5485
|
[_t, r.value]
|
|
5486
5486
|
]) : C("v-if", !0),
|
|
5487
5487
|
D("datalist", { id: r.datalistId }, [
|
|
5488
|
-
(j(!0),
|
|
5488
|
+
(j(!0), q(
|
|
5489
5489
|
we,
|
|
5490
5490
|
null,
|
|
5491
|
-
Ke(r.options, (o) => (j(),
|
|
5491
|
+
Ke(r.options, (o) => (j(), q("option", {
|
|
5492
5492
|
key: String(o.value),
|
|
5493
5493
|
value: o.value
|
|
5494
|
-
},
|
|
5494
|
+
}, Q(o.label), 9, lu))),
|
|
5495
5495
|
128
|
|
5496
5496
|
/* KEYED_FRAGMENT */
|
|
5497
5497
|
))
|
|
5498
5498
|
]),
|
|
5499
5499
|
C(" Use regular select when autocomplete disabled "),
|
|
5500
|
-
r.useAutocomplete ? C("v-if", !0) : je((j(),
|
|
5500
|
+
r.useAutocomplete ? C("v-if", !0) : je((j(), q("select", {
|
|
5501
5501
|
key: 1,
|
|
5502
5502
|
id: r.fieldId,
|
|
5503
5503
|
"onUpdate:modelValue": t[5] || (t[5] = (o) => r.value = o),
|
|
@@ -5513,34 +5513,34 @@ function pu(e, t, n, r, s, a) {
|
|
|
5513
5513
|
D(
|
|
5514
5514
|
"option",
|
|
5515
5515
|
cu,
|
|
5516
|
-
|
|
5516
|
+
Q(r.placeholder),
|
|
5517
5517
|
1
|
|
5518
5518
|
/* TEXT */
|
|
5519
5519
|
),
|
|
5520
|
-
(j(!0),
|
|
5520
|
+
(j(!0), q(
|
|
5521
5521
|
we,
|
|
5522
5522
|
null,
|
|
5523
|
-
Ke(r.options, (o) => (j(),
|
|
5523
|
+
Ke(r.options, (o) => (j(), q("option", {
|
|
5524
5524
|
key: String(o.value),
|
|
5525
5525
|
value: o.value
|
|
5526
|
-
},
|
|
5526
|
+
}, Q(o.label), 9, uu))),
|
|
5527
5527
|
128
|
|
5528
5528
|
/* KEYED_FRAGMENT */
|
|
5529
5529
|
))
|
|
5530
5530
|
], 40, du)), [
|
|
5531
5531
|
[na, r.value]
|
|
5532
5532
|
]),
|
|
5533
|
-
r.showHint ? (j(),
|
|
5533
|
+
r.showHint ? (j(), q("div", {
|
|
5534
5534
|
key: 2,
|
|
5535
5535
|
id: `${r.fieldId}-hint`,
|
|
5536
5536
|
class: "quickform-hint"
|
|
5537
5537
|
}, [
|
|
5538
5538
|
D("span", { innerHTML: r.hint }, null, 8, mu)
|
|
5539
5539
|
], 8, fu)) : C("v-if", !0),
|
|
5540
|
-
r.errorMessage ? (j(),
|
|
5540
|
+
r.errorMessage ? (j(), q(
|
|
5541
5541
|
"div",
|
|
5542
5542
|
hu,
|
|
5543
|
-
|
|
5543
|
+
Q(r.errorMessage),
|
|
5544
5544
|
1
|
|
5545
5545
|
/* TEXT */
|
|
5546
5546
|
)) : C("v-if", !0)
|
|
@@ -5559,8 +5559,8 @@ const yu = /* @__PURE__ */ he(nu, [["render", pu], ["__scopeId", "data-v-666cc49
|
|
|
5559
5559
|
},
|
|
5560
5560
|
setup(e, { expose: t }) {
|
|
5561
5561
|
t();
|
|
5562
|
-
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = ve(n.path, n.schema, { label: n.label }), d = ke(n.path), c = oe(!1), u = oe(!1), m = G(() => n.schema.format === "time" ? "time" : n.schema.format === "date-time" ? "datetime-local" : "date"),
|
|
5563
|
-
return Object.defineProperty(
|
|
5562
|
+
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = ve(n.path, n.schema, { label: n.label }), d = ke(n.path), c = oe(!1), u = oe(!1), m = G(() => n.schema.format === "time" ? "time" : n.schema.format === "date-time" ? "datetime-local" : "date"), g = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? c.value : i.value === "hover" ? u.value : !0), b = { props: n, value: r, errorMessage: s, label: a, hint: o, hintMode: i, fieldId: d, isFocused: c, isHovered: u, inputType: m, showHint: g };
|
|
5563
|
+
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
5564
5564
|
}
|
|
5565
5565
|
}), _u = { class: "quickform-field quickform-date-field" }, gu = ["for"], bu = {
|
|
5566
5566
|
key: 0,
|
|
@@ -5570,17 +5570,17 @@ const yu = /* @__PURE__ */ he(nu, [["render", pu], ["__scopeId", "data-v-666cc49
|
|
|
5570
5570
|
class: "quickform-error"
|
|
5571
5571
|
};
|
|
5572
5572
|
function Eu(e, t, n, r, s, a) {
|
|
5573
|
-
return j(),
|
|
5573
|
+
return j(), q("div", _u, [
|
|
5574
5574
|
D("label", {
|
|
5575
5575
|
for: r.fieldId,
|
|
5576
5576
|
class: "quickform-label"
|
|
5577
5577
|
}, [
|
|
5578
5578
|
qe(
|
|
5579
|
-
|
|
5579
|
+
Q(r.label) + " ",
|
|
5580
5580
|
1
|
|
5581
5581
|
/* TEXT */
|
|
5582
5582
|
),
|
|
5583
|
-
r.props.schema.required ? (j(),
|
|
5583
|
+
r.props.schema.required ? (j(), q("span", bu, "*")) : C("v-if", !0)
|
|
5584
5584
|
], 8, gu),
|
|
5585
5585
|
je(D("input", {
|
|
5586
5586
|
id: r.fieldId,
|
|
@@ -5598,17 +5598,17 @@ function Eu(e, t, n, r, s, a) {
|
|
|
5598
5598
|
}, null, 40, $u), [
|
|
5599
5599
|
[Pr, r.value]
|
|
5600
5600
|
]),
|
|
5601
|
-
r.showHint ? (j(),
|
|
5601
|
+
r.showHint ? (j(), q("div", {
|
|
5602
5602
|
key: 0,
|
|
5603
5603
|
id: `${r.fieldId}-hint`,
|
|
5604
5604
|
class: "quickform-hint"
|
|
5605
5605
|
}, [
|
|
5606
5606
|
D("span", { innerHTML: r.hint }, null, 8, ku)
|
|
5607
5607
|
], 8, wu)) : C("v-if", !0),
|
|
5608
|
-
r.errorMessage ? (j(),
|
|
5608
|
+
r.errorMessage ? (j(), q(
|
|
5609
5609
|
"div",
|
|
5610
5610
|
Su,
|
|
5611
|
-
|
|
5611
|
+
Q(r.errorMessage),
|
|
5612
5612
|
1
|
|
5613
5613
|
/* TEXT */
|
|
5614
5614
|
)) : C("v-if", !0)
|
|
@@ -5626,7 +5626,7 @@ const Pu = /* @__PURE__ */ he(vu, [["render", Eu], ["__scopeId", "data-v-e0ddab6
|
|
|
5626
5626
|
},
|
|
5627
5627
|
setup(e, { expose: t }) {
|
|
5628
5628
|
t();
|
|
5629
|
-
const n = e, r =
|
|
5629
|
+
const n = e, r = xe();
|
|
5630
5630
|
if (!r)
|
|
5631
5631
|
throw new Error("FieldRenderer must be used within a DynamicForm");
|
|
5632
5632
|
const s = G(() => {
|
|
@@ -5635,7 +5635,7 @@ const Pu = /* @__PURE__ */ he(vu, [["render", Eu], ["__scopeId", "data-v-e0ddab6
|
|
|
5635
5635
|
if (d["x-roles"]) {
|
|
5636
5636
|
const c = r.context.roles || [], u = d["x-roles"];
|
|
5637
5637
|
if (!Array.isArray(c) || c.length === 0 || !c.some(
|
|
5638
|
-
(
|
|
5638
|
+
(g) => u[g] && u[g].includes("view")
|
|
5639
5639
|
)) return !1;
|
|
5640
5640
|
}
|
|
5641
5641
|
return !0;
|
|
@@ -5646,7 +5646,7 @@ const Pu = /* @__PURE__ */ he(vu, [["render", Eu], ["__scopeId", "data-v-e0ddab6
|
|
|
5646
5646
|
if (d["x-roles"]) {
|
|
5647
5647
|
const c = r.context.roles || [], u = d["x-roles"];
|
|
5648
5648
|
if (!c.some(
|
|
5649
|
-
(
|
|
5649
|
+
(g) => u[g] && u[g].includes("edit")
|
|
5650
5650
|
)) return !0;
|
|
5651
5651
|
}
|
|
5652
5652
|
return !1;
|
|
@@ -5662,12 +5662,12 @@ const Pu = /* @__PURE__ */ he(vu, [["render", Eu], ["__scopeId", "data-v-e0ddab6
|
|
|
5662
5662
|
class: "quickform-no-renderer"
|
|
5663
5663
|
};
|
|
5664
5664
|
function qu(e, t, n, r, s, a) {
|
|
5665
|
-
return j(),
|
|
5665
|
+
return j(), q(
|
|
5666
5666
|
we,
|
|
5667
5667
|
null,
|
|
5668
5668
|
[
|
|
5669
5669
|
C(" Only render if visible "),
|
|
5670
|
-
r.isVisible ? (j(),
|
|
5670
|
+
r.isVisible ? (j(), q(
|
|
5671
5671
|
we,
|
|
5672
5672
|
{ key: 0 },
|
|
5673
5673
|
[
|
|
@@ -5679,18 +5679,18 @@ function qu(e, t, n, r, s, a) {
|
|
|
5679
5679
|
label: n.label,
|
|
5680
5680
|
disabled: n.disabled || r.context.disabled,
|
|
5681
5681
|
readonly: r.isFieldReadonly
|
|
5682
|
-
}, null, 8, ["schema", "uischema", "path", "label", "disabled", "readonly"])) : (j(),
|
|
5682
|
+
}, null, 8, ["schema", "uischema", "path", "label", "disabled", "readonly"])) : (j(), q("div", ju, [
|
|
5683
5683
|
D(
|
|
5684
5684
|
"p",
|
|
5685
5685
|
null,
|
|
5686
|
-
"No renderer available for field: " +
|
|
5686
|
+
"No renderer available for field: " + Q(n.path),
|
|
5687
5687
|
1
|
|
5688
5688
|
/* TEXT */
|
|
5689
5689
|
),
|
|
5690
5690
|
D(
|
|
5691
5691
|
"pre",
|
|
5692
5692
|
null,
|
|
5693
|
-
|
|
5693
|
+
Q(JSON.stringify(n.schema, null, 2)),
|
|
5694
5694
|
1
|
|
5695
5695
|
/* TEXT */
|
|
5696
5696
|
)
|
|
@@ -5735,21 +5735,21 @@ const St = /* @__PURE__ */ he(Ou, [["render", qu], ["__scopeId", "data-v-abf28e2
|
|
|
5735
5735
|
class: "quickform-error"
|
|
5736
5736
|
};
|
|
5737
5737
|
function Vu(e, t, n, r, s, a) {
|
|
5738
|
-
return j(),
|
|
5738
|
+
return j(), q("div", Nu, [
|
|
5739
5739
|
D("fieldset", {
|
|
5740
5740
|
id: r.fieldId,
|
|
5741
5741
|
class: "quickform-fieldset",
|
|
5742
5742
|
"aria-describedby": r.hint ? `${r.fieldId}-hint` : void 0
|
|
5743
5743
|
}, [
|
|
5744
|
-
r.label ? (j(),
|
|
5744
|
+
r.label ? (j(), q("legend", Tu, [
|
|
5745
5745
|
qe(
|
|
5746
|
-
|
|
5746
|
+
Q(r.label) + " ",
|
|
5747
5747
|
1
|
|
5748
5748
|
/* TEXT */
|
|
5749
5749
|
),
|
|
5750
|
-
r.props.schema.required ? (j(),
|
|
5750
|
+
r.props.schema.required ? (j(), q("span", Ru, "*")) : C("v-if", !0)
|
|
5751
5751
|
])) : C("v-if", !0),
|
|
5752
|
-
r.hint ? (j(),
|
|
5752
|
+
r.hint ? (j(), q("div", {
|
|
5753
5753
|
key: 1,
|
|
5754
5754
|
id: `${r.fieldId}-hint`,
|
|
5755
5755
|
class: "quickform-hint quickform-object-hint"
|
|
@@ -5757,7 +5757,7 @@ function Vu(e, t, n, r, s, a) {
|
|
|
5757
5757
|
D("span", { innerHTML: r.hint }, null, 8, Du)
|
|
5758
5758
|
], 8, Au)) : C("v-if", !0),
|
|
5759
5759
|
D("div", Fu, [
|
|
5760
|
-
(j(!0),
|
|
5760
|
+
(j(!0), q(
|
|
5761
5761
|
we,
|
|
5762
5762
|
null,
|
|
5763
5763
|
Ke(r.properties, (o) => (j(), gt(r.FieldRenderer, {
|
|
@@ -5771,10 +5771,10 @@ function Vu(e, t, n, r, s, a) {
|
|
|
5771
5771
|
/* KEYED_FRAGMENT */
|
|
5772
5772
|
))
|
|
5773
5773
|
]),
|
|
5774
|
-
r.errorMessage ? (j(),
|
|
5774
|
+
r.errorMessage ? (j(), q(
|
|
5775
5775
|
"div",
|
|
5776
5776
|
Cu,
|
|
5777
|
-
|
|
5777
|
+
Q(r.errorMessage),
|
|
5778
5778
|
1
|
|
5779
5779
|
/* TEXT */
|
|
5780
5780
|
)) : C("v-if", !0)
|
|
@@ -5798,27 +5798,27 @@ const zu = /* @__PURE__ */ he(Iu, [["render", Vu], ["__scopeId", "data-v-8012fc1
|
|
|
5798
5798
|
n.path,
|
|
5799
5799
|
n.schema,
|
|
5800
5800
|
{ label: n.label }
|
|
5801
|
-
), i =
|
|
5801
|
+
), i = xe(), d = ke(n.path), c = G({
|
|
5802
5802
|
get: () => Array.isArray(r.value) ? r.value : [],
|
|
5803
|
-
set: (
|
|
5803
|
+
set: (p) => r.value = p
|
|
5804
5804
|
}), u = G(() => Array.isArray(n.schema.items) ? n.schema.items[0] : n.schema.items), m = () => {
|
|
5805
5805
|
if (!u.value) return;
|
|
5806
|
-
const
|
|
5807
|
-
r.value = [...c.value,
|
|
5808
|
-
},
|
|
5806
|
+
const p = Ne.getDefaultValue(u.value);
|
|
5807
|
+
r.value = [...c.value, p];
|
|
5808
|
+
}, g = (p) => {
|
|
5809
5809
|
const k = [...c.value];
|
|
5810
|
-
k.splice(
|
|
5811
|
-
},
|
|
5812
|
-
if (k === "up" &&
|
|
5813
|
-
const S = [...c.value], O = k === "up" ?
|
|
5814
|
-
S[
|
|
5815
|
-
},
|
|
5810
|
+
k.splice(p, 1), r.value = k;
|
|
5811
|
+
}, b = (p, k) => {
|
|
5812
|
+
if (k === "up" && p === 0 || k === "down" && p === c.value.length - 1) return;
|
|
5813
|
+
const S = [...c.value], O = k === "up" ? p - 1 : p + 1, z = S[p];
|
|
5814
|
+
S[p] = S[O], S[O] = z, r.value = S;
|
|
5815
|
+
}, _ = G(() => !(n.disabled || n.readonly || n.schema.maxItems && c.value.length >= n.schema.maxItems)), $ = G(() => !(n.disabled || n.readonly || n.schema.minItems && c.value.length <= n.schema.minItems)), f = { props: n, value: r, errorMessage: s, label: a, hint: o, formContext: i, fieldId: d, arrayValue: c, itemsSchema: u, addItem: m, removeItem: g, moveItem: b, canAdd: _, canRemove: $, getItemLabel: (p) => {
|
|
5816
5816
|
var O;
|
|
5817
5817
|
const k = n.schema["x-item-label"];
|
|
5818
5818
|
if (k === "none" || k === !1)
|
|
5819
5819
|
return "";
|
|
5820
5820
|
if (typeof k == "string" && k.includes("{{")) {
|
|
5821
|
-
const z = c.value[
|
|
5821
|
+
const z = c.value[p];
|
|
5822
5822
|
if (typeof z == "object" && z !== null) {
|
|
5823
5823
|
let J = k, M = !1;
|
|
5824
5824
|
if (J = J.replace(/\{\{([^}]+)\}\}/g, (T, V) => {
|
|
@@ -5828,7 +5828,7 @@ const zu = /* @__PURE__ */ he(Iu, [["render", Vu], ["__scopeId", "data-v-8012fc1
|
|
|
5828
5828
|
return J.trim();
|
|
5829
5829
|
}
|
|
5830
5830
|
}
|
|
5831
|
-
return `${((O = u.value) == null ? void 0 : O.title) || "Item"} #${
|
|
5831
|
+
return `${((O = u.value) == null ? void 0 : O.title) || "Item"} #${p + 1}`;
|
|
5832
5832
|
}, FieldRenderer: St };
|
|
5833
5833
|
return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
|
|
5834
5834
|
}
|
|
@@ -5846,21 +5846,21 @@ const zu = /* @__PURE__ */ he(Iu, [["render", Vu], ["__scopeId", "data-v-8012fc1
|
|
|
5846
5846
|
class: "quickform-error"
|
|
5847
5847
|
};
|
|
5848
5848
|
function sf(e, t, n, r, s, a) {
|
|
5849
|
-
return j(),
|
|
5849
|
+
return j(), q("div", Lu, [
|
|
5850
5850
|
D("fieldset", {
|
|
5851
5851
|
id: r.fieldId,
|
|
5852
5852
|
class: "quickform-fieldset",
|
|
5853
5853
|
"aria-describedby": r.hint ? `${r.fieldId}-hint` : void 0
|
|
5854
5854
|
}, [
|
|
5855
|
-
r.label ? (j(),
|
|
5855
|
+
r.label ? (j(), q("legend", Ku, [
|
|
5856
5856
|
qe(
|
|
5857
|
-
|
|
5857
|
+
Q(r.label) + " ",
|
|
5858
5858
|
1
|
|
5859
5859
|
/* TEXT */
|
|
5860
5860
|
),
|
|
5861
|
-
r.props.schema.required ? (j(),
|
|
5861
|
+
r.props.schema.required ? (j(), q("span", Gu, "*")) : C("v-if", !0)
|
|
5862
5862
|
])) : C("v-if", !0),
|
|
5863
|
-
r.hint ? (j(),
|
|
5863
|
+
r.hint ? (j(), q("div", {
|
|
5864
5864
|
key: 1,
|
|
5865
5865
|
id: `${r.fieldId}-hint`,
|
|
5866
5866
|
class: "quickform-hint quickform-array-hint"
|
|
@@ -5868,10 +5868,10 @@ function sf(e, t, n, r, s, a) {
|
|
|
5868
5868
|
D("span", { innerHTML: r.hint }, null, 8, xu)
|
|
5869
5869
|
], 8, Bu)) : C("v-if", !0),
|
|
5870
5870
|
D("div", Ju, [
|
|
5871
|
-
(j(!0),
|
|
5871
|
+
(j(!0), q(
|
|
5872
5872
|
we,
|
|
5873
5873
|
null,
|
|
5874
|
-
Ke(r.arrayValue, (o, i) => (j(),
|
|
5874
|
+
Ke(r.arrayValue, (o, i) => (j(), q("div", {
|
|
5875
5875
|
key: i,
|
|
5876
5876
|
class: "quickform-array-item"
|
|
5877
5877
|
}, [
|
|
@@ -5911,7 +5911,7 @@ function sf(e, t, n, r, s, a) {
|
|
|
5911
5911
|
128
|
|
5912
5912
|
/* KEYED_FRAGMENT */
|
|
5913
5913
|
)),
|
|
5914
|
-
r.arrayValue.length === 0 ? (j(),
|
|
5914
|
+
r.arrayValue.length === 0 ? (j(), q("div", ef, " No items ")) : C("v-if", !0)
|
|
5915
5915
|
]),
|
|
5916
5916
|
D("div", tf, [
|
|
5917
5917
|
D("button", {
|
|
@@ -5919,12 +5919,12 @@ function sf(e, t, n, r, s, a) {
|
|
|
5919
5919
|
class: "quickform-btn quickform-btn-secondary",
|
|
5920
5920
|
disabled: !r.canAdd,
|
|
5921
5921
|
onClick: r.addItem
|
|
5922
|
-
}, " + " +
|
|
5922
|
+
}, " + " + Q(r.formContext.labels.addItem), 9, rf)
|
|
5923
5923
|
]),
|
|
5924
|
-
r.errorMessage ? (j(),
|
|
5924
|
+
r.errorMessage ? (j(), q(
|
|
5925
5925
|
"div",
|
|
5926
5926
|
nf,
|
|
5927
|
-
|
|
5927
|
+
Q(r.errorMessage),
|
|
5928
5928
|
1
|
|
5929
5929
|
/* TEXT */
|
|
5930
5930
|
)) : C("v-if", !0)
|
|
@@ -5950,43 +5950,43 @@ const af = /* @__PURE__ */ he(Uu, [["render", sf], ["__scopeId", "data-v-a078389
|
|
|
5950
5950
|
{ label: n.label }
|
|
5951
5951
|
), c = ke(n.path);
|
|
5952
5952
|
let u = 0;
|
|
5953
|
-
const m = oe([]),
|
|
5953
|
+
const m = oe([]), g = oe(!1);
|
|
5954
5954
|
He(
|
|
5955
5955
|
() => r.value,
|
|
5956
|
-
(
|
|
5957
|
-
if (
|
|
5958
|
-
|
|
5956
|
+
(y) => {
|
|
5957
|
+
if (g.value) {
|
|
5958
|
+
g.value = !1;
|
|
5959
5959
|
return;
|
|
5960
5960
|
}
|
|
5961
|
-
|
|
5961
|
+
y && typeof y == "object" && !Array.isArray(y) ? m.value = Object.entries(y).map(([f, p]) => ({
|
|
5962
5962
|
key: f,
|
|
5963
|
-
value: String(
|
|
5963
|
+
value: String(p),
|
|
5964
5964
|
id: u++
|
|
5965
5965
|
})) : m.value.length || (m.value = []);
|
|
5966
5966
|
},
|
|
5967
5967
|
{ immediate: !0 }
|
|
5968
5968
|
), He(
|
|
5969
5969
|
m,
|
|
5970
|
-
(
|
|
5970
|
+
(y) => {
|
|
5971
5971
|
const f = {};
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
}),
|
|
5972
|
+
y.forEach((p) => {
|
|
5973
|
+
p.key.trim() && (f[p.key] = p.value);
|
|
5974
|
+
}), g.value = !0, s(f);
|
|
5975
5975
|
},
|
|
5976
5976
|
{ deep: !0 }
|
|
5977
5977
|
);
|
|
5978
|
-
function
|
|
5978
|
+
function b() {
|
|
5979
5979
|
m.value.push({ key: "", value: "", id: u++ });
|
|
5980
5980
|
}
|
|
5981
|
-
function
|
|
5982
|
-
m.value = m.value.filter((f) => f.id !==
|
|
5981
|
+
function _(y) {
|
|
5982
|
+
m.value = m.value.filter((f) => f.id !== y);
|
|
5983
5983
|
}
|
|
5984
|
-
const
|
|
5984
|
+
const $ = { props: n, value: r, setValue: s, label: a, hint: o, errorMessage: i, required: d, fieldId: c, get nextId() {
|
|
5985
5985
|
return u;
|
|
5986
|
-
}, set nextId(
|
|
5987
|
-
u =
|
|
5988
|
-
}, pairs: m, isInternalUpdate:
|
|
5989
|
-
return Object.defineProperty(
|
|
5986
|
+
}, set nextId(y) {
|
|
5987
|
+
u = y;
|
|
5988
|
+
}, pairs: m, isInternalUpdate: g, addPair: b, removePair: _ };
|
|
5989
|
+
return Object.defineProperty($, "__isScriptSetup", { enumerable: !1, value: !0 }), $;
|
|
5990
5990
|
}
|
|
5991
5991
|
}), lf = { class: "quickform-field quickform-keyvalue-field" }, df = ["for"], cf = {
|
|
5992
5992
|
key: 0,
|
|
@@ -5999,20 +5999,20 @@ const af = /* @__PURE__ */ he(Uu, [["render", sf], ["__scopeId", "data-v-a078389
|
|
|
5999
5999
|
class: "quickform-error"
|
|
6000
6000
|
};
|
|
6001
6001
|
function bf(e, t, n, r, s, a) {
|
|
6002
|
-
return j(),
|
|
6003
|
-
r.label ? (j(),
|
|
6002
|
+
return j(), q("div", lf, [
|
|
6003
|
+
r.label ? (j(), q("label", {
|
|
6004
6004
|
key: 0,
|
|
6005
6005
|
for: r.fieldId,
|
|
6006
6006
|
class: "quickform-label"
|
|
6007
6007
|
}, [
|
|
6008
6008
|
qe(
|
|
6009
|
-
|
|
6009
|
+
Q(r.label) + " ",
|
|
6010
6010
|
1
|
|
6011
6011
|
/* TEXT */
|
|
6012
6012
|
),
|
|
6013
|
-
r.required ? (j(),
|
|
6013
|
+
r.required ? (j(), q("span", cf, "*")) : C("v-if", !0)
|
|
6014
6014
|
], 8, df)) : C("v-if", !0),
|
|
6015
|
-
r.hint ? (j(),
|
|
6015
|
+
r.hint ? (j(), q("div", {
|
|
6016
6016
|
key: 1,
|
|
6017
6017
|
id: `${r.fieldId}-hint`,
|
|
6018
6018
|
class: "quickform-hint"
|
|
@@ -6020,7 +6020,7 @@ function bf(e, t, n, r, s, a) {
|
|
|
6020
6020
|
D("span", { innerHTML: r.hint }, null, 8, ff)
|
|
6021
6021
|
], 8, uf)) : C("v-if", !0),
|
|
6022
6022
|
D("div", mf, [
|
|
6023
|
-
r.pairs.length ? (j(),
|
|
6023
|
+
r.pairs.length ? (j(), q("div", hf, [...t[0] || (t[0] = [
|
|
6024
6024
|
D(
|
|
6025
6025
|
"span",
|
|
6026
6026
|
{ class: "quickform-keyvalue-header-cell" },
|
|
@@ -6043,10 +6043,10 @@ function bf(e, t, n, r, s, a) {
|
|
|
6043
6043
|
/* CACHED */
|
|
6044
6044
|
)
|
|
6045
6045
|
])])) : C("v-if", !0),
|
|
6046
|
-
(j(!0),
|
|
6046
|
+
(j(!0), q(
|
|
6047
6047
|
we,
|
|
6048
6048
|
null,
|
|
6049
|
-
Ke(r.pairs, (o) => (j(),
|
|
6049
|
+
Ke(r.pairs, (o) => (j(), q("div", {
|
|
6050
6050
|
key: o.id,
|
|
6051
6051
|
class: "quickform-keyvalue-row"
|
|
6052
6052
|
}, [
|
|
@@ -6087,10 +6087,10 @@ function bf(e, t, n, r, s, a) {
|
|
|
6087
6087
|
onClick: r.addPair
|
|
6088
6088
|
}, " + Add Parameter ", 8, _f)
|
|
6089
6089
|
]),
|
|
6090
|
-
r.errorMessage ? (j(),
|
|
6090
|
+
r.errorMessage ? (j(), q(
|
|
6091
6091
|
"div",
|
|
6092
6092
|
gf,
|
|
6093
|
-
|
|
6093
|
+
Q(r.errorMessage),
|
|
6094
6094
|
1
|
|
6095
6095
|
/* TEXT */
|
|
6096
6096
|
)) : C("v-if", !0)
|
|
@@ -6113,42 +6113,42 @@ const $f = /* @__PURE__ */ he(of, [["render", bf], ["__scopeId", "data-v-8e716b7
|
|
|
6113
6113
|
n.path,
|
|
6114
6114
|
n.schema,
|
|
6115
6115
|
{ label: n.label }
|
|
6116
|
-
), c = ke(n.path), u = G(() => n.schema["x-show-format-hint"] !== !1), m = oe(""),
|
|
6116
|
+
), c = ke(n.path), u = G(() => n.schema["x-show-format-hint"] !== !1), m = oe(""), g = oe(null), b = oe(!1);
|
|
6117
6117
|
He(
|
|
6118
6118
|
() => r.value,
|
|
6119
6119
|
(S) => {
|
|
6120
|
-
if (
|
|
6120
|
+
if (!b.value) {
|
|
6121
6121
|
try {
|
|
6122
|
-
m.value = JSON.stringify(S || {}, null, 2),
|
|
6122
|
+
m.value = JSON.stringify(S || {}, null, 2), g.value = null;
|
|
6123
6123
|
} catch {
|
|
6124
6124
|
m.value = "{}";
|
|
6125
6125
|
}
|
|
6126
|
-
|
|
6126
|
+
b.value = !0;
|
|
6127
6127
|
}
|
|
6128
6128
|
},
|
|
6129
6129
|
{ immediate: !0 }
|
|
6130
6130
|
);
|
|
6131
|
-
function
|
|
6131
|
+
function _(S) {
|
|
6132
6132
|
const O = S.target;
|
|
6133
6133
|
m.value = O.value;
|
|
6134
6134
|
try {
|
|
6135
6135
|
const z = JSON.parse(m.value);
|
|
6136
|
-
s(z),
|
|
6136
|
+
s(z), g.value = null;
|
|
6137
6137
|
} catch (z) {
|
|
6138
|
-
|
|
6138
|
+
g.value = z.message;
|
|
6139
6139
|
}
|
|
6140
6140
|
}
|
|
6141
|
-
function
|
|
6141
|
+
function $() {
|
|
6142
6142
|
try {
|
|
6143
6143
|
const S = JSON.parse(m.value);
|
|
6144
|
-
m.value = JSON.stringify(S, null, 2),
|
|
6144
|
+
m.value = JSON.stringify(S, null, 2), g.value = null;
|
|
6145
6145
|
} catch {
|
|
6146
6146
|
}
|
|
6147
6147
|
}
|
|
6148
|
-
function
|
|
6148
|
+
function y(S) {
|
|
6149
6149
|
const O = S.target;
|
|
6150
6150
|
if (S.ctrlKey && (S.key === " " || S.code === "Space")) {
|
|
6151
|
-
S.preventDefault(), S.stopPropagation(),
|
|
6151
|
+
S.preventDefault(), S.stopPropagation(), $();
|
|
6152
6152
|
return;
|
|
6153
6153
|
}
|
|
6154
6154
|
if (S.key === "Tab") {
|
|
@@ -6161,10 +6161,10 @@ const $f = /* @__PURE__ */ he(of, [["render", bf], ["__scopeId", "data-v-8e716b7
|
|
|
6161
6161
|
}
|
|
6162
6162
|
(S.key === "Enter" || S.key === " ") && S.stopPropagation();
|
|
6163
6163
|
}
|
|
6164
|
-
const f = G(() =>
|
|
6164
|
+
const f = G(() => g.value || i.value), p = G(() => {
|
|
6165
6165
|
const S = n.schema["x-rows"];
|
|
6166
6166
|
return S !== void 0 ? S : 8;
|
|
6167
|
-
}), k = { props: n, value: r, setValue: s, label: a, hint: o, errorMessage: i, required: d, fieldId: c, showFormatHint: u, jsonText: m, parseError:
|
|
6167
|
+
}), k = { props: n, value: r, setValue: s, label: a, hint: o, errorMessage: i, required: d, fieldId: c, showFormatHint: u, jsonText: m, parseError: g, isInitialized: b, handleInput: _, formatJson: $, handleKeyDown: y, displayError: f, rows: p };
|
|
6168
6168
|
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
6169
6169
|
}
|
|
6170
6170
|
}), kf = { class: "quickform-field quickform-json-field" }, Sf = {
|
|
@@ -6182,22 +6182,22 @@ const $f = /* @__PURE__ */ he(of, [["render", bf], ["__scopeId", "data-v-8e716b7
|
|
|
6182
6182
|
class: "quickform-error"
|
|
6183
6183
|
};
|
|
6184
6184
|
function Mf(e, t, n, r, s, a) {
|
|
6185
|
-
return j(),
|
|
6186
|
-
r.label ? (j(),
|
|
6185
|
+
return j(), q("div", kf, [
|
|
6186
|
+
r.label ? (j(), q("div", Sf, [
|
|
6187
6187
|
D("label", {
|
|
6188
6188
|
for: r.fieldId,
|
|
6189
6189
|
class: "quickform-label"
|
|
6190
6190
|
}, [
|
|
6191
6191
|
qe(
|
|
6192
|
-
|
|
6192
|
+
Q(r.label) + " ",
|
|
6193
6193
|
1
|
|
6194
6194
|
/* TEXT */
|
|
6195
6195
|
),
|
|
6196
|
-
r.required ? (j(),
|
|
6196
|
+
r.required ? (j(), q("span", Pf, "*")) : C("v-if", !0)
|
|
6197
6197
|
], 8, Ef),
|
|
6198
|
-
r.showFormatHint ? (j(),
|
|
6198
|
+
r.showFormatHint ? (j(), q("span", Of, "ⓘ")) : C("v-if", !0)
|
|
6199
6199
|
])) : C("v-if", !0),
|
|
6200
|
-
r.hint ? (j(),
|
|
6200
|
+
r.hint ? (j(), q("div", {
|
|
6201
6201
|
key: 1,
|
|
6202
6202
|
id: `${r.fieldId}-hint`,
|
|
6203
6203
|
class: "quickform-hint"
|
|
@@ -6220,10 +6220,10 @@ function Mf(e, t, n, r, s, a) {
|
|
|
6220
6220
|
}, null, 42, If), [
|
|
6221
6221
|
[_t, r.jsonText]
|
|
6222
6222
|
]),
|
|
6223
|
-
r.displayError ? (j(),
|
|
6223
|
+
r.displayError ? (j(), q(
|
|
6224
6224
|
"div",
|
|
6225
6225
|
Nf,
|
|
6226
|
-
|
|
6226
|
+
Q(r.displayError),
|
|
6227
6227
|
1
|
|
6228
6228
|
/* TEXT */
|
|
6229
6229
|
)) : C("v-if", !0)
|
|
@@ -6242,18 +6242,25 @@ const Tf = /* @__PURE__ */ he(wf, [["render", Mf], ["__scopeId", "data-v-8122fb7
|
|
|
6242
6242
|
},
|
|
6243
6243
|
setup(e, { expose: t }) {
|
|
6244
6244
|
t();
|
|
6245
|
-
const n = e, { value: r, label: s, hint: a, errorMessage: o } = ve(n.path, n.schema, { label: n.label }), i = ke(n.path), d = G(() => n.schema.oneOf || n.schema.anyOf || []),
|
|
6245
|
+
const n = e, { value: r, label: s, hint: a, errorMessage: o } = ve(n.path, n.schema, { label: n.label }), i = ke(n.path), d = xe(), c = G(() => n.schema.oneOf || n.schema.anyOf || []), u = oe(0);
|
|
6246
6246
|
Or(() => {
|
|
6247
6247
|
if (r.value) {
|
|
6248
|
-
const
|
|
6249
|
-
|
|
6248
|
+
const f = c.value.findIndex((p) => Ne.validate(p, r.value).valid);
|
|
6249
|
+
f !== -1 && (u.value = f);
|
|
6250
6250
|
}
|
|
6251
6251
|
});
|
|
6252
|
-
const
|
|
6253
|
-
const
|
|
6254
|
-
|
|
6252
|
+
const m = G(() => c.value[u.value]), g = (f, p) => {
|
|
6253
|
+
const k = n.schema["x-oneof-labels"];
|
|
6254
|
+
return k && k[p] ? k[p] : f.title || `Option ${p + 1}`;
|
|
6255
|
+
}, b = G(() => c.value.map((f, p) => g(f, p))), _ = G(() => {
|
|
6256
|
+
var p, k;
|
|
6257
|
+
const f = n.schema["x-oneof-select-label"];
|
|
6258
|
+
return f || ((k = (p = d == null ? void 0 : d.componentDefaults) == null ? void 0 : p.oneOf) == null ? void 0 : k.selectLabel) || "Select Option";
|
|
6259
|
+
}), y = { props: n, value: r, label: s, hint: a, errorMessage: o, fieldId: i, formContext: d, options: c, selectedIndex: u, activeSchema: m, getOptionLabel: g, optionLabels: b, selectLabel: _, handleOptionChange: (f) => {
|
|
6260
|
+
const p = Number(f.target.value);
|
|
6261
|
+
u.value = p;
|
|
6255
6262
|
}, FieldRenderer: St };
|
|
6256
|
-
return Object.defineProperty(
|
|
6263
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
6257
6264
|
}
|
|
6258
6265
|
}), Af = { class: "quickform-field quickform-oneof-field" }, Df = ["id", "aria-describedby"], Ff = {
|
|
6259
6266
|
key: 0,
|
|
@@ -6261,26 +6268,26 @@ const Tf = /* @__PURE__ */ he(wf, [["render", Mf], ["__scopeId", "data-v-8122fb7
|
|
|
6261
6268
|
}, Cf = {
|
|
6262
6269
|
key: 0,
|
|
6263
6270
|
class: "quickform-required"
|
|
6264
|
-
}, Vf = ["id"], zf = ["innerHTML"], Uf = { class: "quickform-oneof-selector" }, Lf = ["value", "disabled"],
|
|
6271
|
+
}, Vf = ["id"], zf = ["innerHTML"], Uf = { class: "quickform-oneof-selector" }, Lf = ["for"], Hf = ["id", "value", "disabled"], Kf = ["value"], Gf = { class: "quickform-oneof-content" }, Bf = {
|
|
6265
6272
|
key: 2,
|
|
6266
6273
|
class: "quickform-error"
|
|
6267
6274
|
};
|
|
6268
|
-
function
|
|
6269
|
-
return j(),
|
|
6275
|
+
function xf(e, t, n, r, s, a) {
|
|
6276
|
+
return j(), q("div", Af, [
|
|
6270
6277
|
D("fieldset", {
|
|
6271
6278
|
id: r.fieldId,
|
|
6272
6279
|
class: "quickform-fieldset",
|
|
6273
6280
|
"aria-describedby": r.hint ? `${r.fieldId}-hint` : void 0
|
|
6274
6281
|
}, [
|
|
6275
|
-
r.label ? (j(),
|
|
6282
|
+
r.label ? (j(), q("legend", Ff, [
|
|
6276
6283
|
qe(
|
|
6277
|
-
|
|
6284
|
+
Q(r.label) + " ",
|
|
6278
6285
|
1
|
|
6279
6286
|
/* TEXT */
|
|
6280
6287
|
),
|
|
6281
|
-
r.props.schema.required ? (j(),
|
|
6288
|
+
r.props.schema.required ? (j(), q("span", Cf, "*")) : C("v-if", !0)
|
|
6282
6289
|
])) : C("v-if", !0),
|
|
6283
|
-
r.hint ? (j(),
|
|
6290
|
+
r.hint ? (j(), q("div", {
|
|
6284
6291
|
key: 1,
|
|
6285
6292
|
id: `${r.fieldId}-hint`,
|
|
6286
6293
|
class: "quickform-hint quickform-oneof-hint"
|
|
@@ -6288,25 +6295,31 @@ function Bf(e, t, n, r, s, a) {
|
|
|
6288
6295
|
D("span", { innerHTML: r.hint }, null, 8, zf)
|
|
6289
6296
|
], 8, Vf)) : C("v-if", !0),
|
|
6290
6297
|
D("div", Uf, [
|
|
6298
|
+
r.selectLabel ? (j(), q("label", {
|
|
6299
|
+
key: 0,
|
|
6300
|
+
for: `${r.fieldId}-select`,
|
|
6301
|
+
class: "quickform-select-label"
|
|
6302
|
+
}, Q(r.selectLabel), 9, Lf)) : C("v-if", !0),
|
|
6291
6303
|
D("select", {
|
|
6304
|
+
id: `${r.fieldId}-select`,
|
|
6292
6305
|
value: r.selectedIndex,
|
|
6293
6306
|
onChange: r.handleOptionChange,
|
|
6294
6307
|
class: "quickform-select",
|
|
6295
6308
|
disabled: n.disabled || n.readonly
|
|
6296
6309
|
}, [
|
|
6297
|
-
(j(!0),
|
|
6310
|
+
(j(!0), q(
|
|
6298
6311
|
we,
|
|
6299
6312
|
null,
|
|
6300
|
-
Ke(r.optionLabels, (o, i) => (j(),
|
|
6313
|
+
Ke(r.optionLabels, (o, i) => (j(), q("option", {
|
|
6301
6314
|
key: i,
|
|
6302
6315
|
value: i
|
|
6303
|
-
},
|
|
6316
|
+
}, Q(o), 9, Kf))),
|
|
6304
6317
|
128
|
|
6305
6318
|
/* KEYED_FRAGMENT */
|
|
6306
6319
|
))
|
|
6307
|
-
], 40,
|
|
6320
|
+
], 40, Hf)
|
|
6308
6321
|
]),
|
|
6309
|
-
D("div",
|
|
6322
|
+
D("div", Gf, [
|
|
6310
6323
|
r.activeSchema ? (j(), gt(r.FieldRenderer, {
|
|
6311
6324
|
key: 0,
|
|
6312
6325
|
schema: r.activeSchema,
|
|
@@ -6315,17 +6328,17 @@ function Bf(e, t, n, r, s, a) {
|
|
|
6315
6328
|
readonly: n.readonly
|
|
6316
6329
|
}, null, 8, ["schema", "path", "disabled", "readonly"])) : C("v-if", !0)
|
|
6317
6330
|
]),
|
|
6318
|
-
r.errorMessage ? (j(),
|
|
6331
|
+
r.errorMessage ? (j(), q(
|
|
6319
6332
|
"div",
|
|
6320
|
-
|
|
6321
|
-
|
|
6333
|
+
Bf,
|
|
6334
|
+
Q(r.errorMessage),
|
|
6322
6335
|
1
|
|
6323
6336
|
/* TEXT */
|
|
6324
6337
|
)) : C("v-if", !0)
|
|
6325
6338
|
], 8, Df)
|
|
6326
6339
|
]);
|
|
6327
6340
|
}
|
|
6328
|
-
const xn = /* @__PURE__ */ he(Rf, [["render",
|
|
6341
|
+
const xn = /* @__PURE__ */ he(Rf, [["render", xf], ["__scopeId", "data-v-dab625e6"], ["__file", "/Users/zachsherbondy/src/github.com/quickforms/packages/vue/src/components/OneOfField.vue"]]), Jf = /* @__PURE__ */ me({
|
|
6329
6342
|
__name: "AllOfField",
|
|
6330
6343
|
props: {
|
|
6331
6344
|
schema: { type: Object, required: !0 },
|
|
@@ -6345,9 +6358,9 @@ const xn = /* @__PURE__ */ he(Rf, [["render", Bf], ["__scopeId", "data-v-dab625e
|
|
|
6345
6358
|
}), d = { props: n, label: r, hint: s, errorMessage: a, fieldId: o, mergedSchema: i, FieldRenderer: St };
|
|
6346
6359
|
return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
|
|
6347
6360
|
}
|
|
6348
|
-
}),
|
|
6349
|
-
function
|
|
6350
|
-
return j(),
|
|
6361
|
+
}), Wf = { class: "quickform-field quickform-allof-field" };
|
|
6362
|
+
function Zf(e, t, n, r, s, a) {
|
|
6363
|
+
return j(), q("div", Wf, [
|
|
6351
6364
|
C(" If the merged result is an object, ObjectField might be better, but FieldRenderer will dispatch correctly "),
|
|
6352
6365
|
Jn(r.FieldRenderer, {
|
|
6353
6366
|
schema: r.mergedSchema,
|
|
@@ -6358,7 +6371,7 @@ function Wf(e, t, n, r, s, a) {
|
|
|
6358
6371
|
}, null, 8, ["schema", "path", "disabled", "readonly", "label"])
|
|
6359
6372
|
]);
|
|
6360
6373
|
}
|
|
6361
|
-
const
|
|
6374
|
+
const Yf = /* @__PURE__ */ he(Jf, [["render", Zf], ["__scopeId", "data-v-094fd67d"], ["__file", "/Users/zachsherbondy/src/github.com/quickforms/packages/vue/src/components/AllOfField.vue"]]), Qf = /* @__PURE__ */ me({
|
|
6362
6375
|
__name: "HiddenField",
|
|
6363
6376
|
props: {
|
|
6364
6377
|
schema: { type: Object, required: !0 },
|
|
@@ -6378,9 +6391,9 @@ const Zf = /* @__PURE__ */ he(xf, [["render", Wf], ["__scopeId", "data-v-094fd67
|
|
|
6378
6391
|
const s = { props: n, value: r };
|
|
6379
6392
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
6380
6393
|
}
|
|
6381
|
-
}),
|
|
6382
|
-
function
|
|
6383
|
-
return j(),
|
|
6394
|
+
}), Xf = ["value"];
|
|
6395
|
+
function em(e, t, n, r, s, a) {
|
|
6396
|
+
return j(), q(
|
|
6384
6397
|
we,
|
|
6385
6398
|
null,
|
|
6386
6399
|
[
|
|
@@ -6388,23 +6401,23 @@ function Xf(e, t, n, r, s, a) {
|
|
|
6388
6401
|
D("input", {
|
|
6389
6402
|
type: "hidden",
|
|
6390
6403
|
value: r.value
|
|
6391
|
-
}, null, 8,
|
|
6404
|
+
}, null, 8, Xf)
|
|
6392
6405
|
],
|
|
6393
6406
|
2112
|
|
6394
6407
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
6395
6408
|
);
|
|
6396
6409
|
}
|
|
6397
|
-
const
|
|
6398
|
-
function
|
|
6410
|
+
const tm = /* @__PURE__ */ he(Qf, [["render", em], ["__file", "/Users/zachsherbondy/src/github.com/quickforms/packages/vue/src/components/HiddenField.vue"]]);
|
|
6411
|
+
function rm() {
|
|
6399
6412
|
const e = new fa();
|
|
6400
6413
|
return e.register(
|
|
6401
6414
|
"hidden",
|
|
6402
|
-
|
|
6415
|
+
tm,
|
|
6403
6416
|
(t) => pe(100, ga(t))
|
|
6404
6417
|
), e.register(
|
|
6405
6418
|
"string",
|
|
6406
6419
|
Ac,
|
|
6407
|
-
(t) => pe(1,
|
|
6420
|
+
(t) => pe(1, st(t))
|
|
6408
6421
|
), e.register(
|
|
6409
6422
|
"number",
|
|
6410
6423
|
Gc,
|
|
@@ -6447,11 +6460,11 @@ function tm() {
|
|
|
6447
6460
|
(t) => pe(10, wa(t))
|
|
6448
6461
|
), e.register(
|
|
6449
6462
|
"allOf",
|
|
6450
|
-
|
|
6463
|
+
Yf,
|
|
6451
6464
|
(t) => pe(10, ka(t))
|
|
6452
6465
|
), e;
|
|
6453
6466
|
}
|
|
6454
|
-
const
|
|
6467
|
+
const Qe = "__root__", nm = /* @__PURE__ */ me({
|
|
6455
6468
|
__name: "DynamicForm",
|
|
6456
6469
|
props: /* @__PURE__ */ $n({
|
|
6457
6470
|
schema: { type: Object, required: !0 },
|
|
@@ -6465,19 +6478,19 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6465
6478
|
setup(e, { expose: t, emit: n }) {
|
|
6466
6479
|
var T, V, W, H, ne;
|
|
6467
6480
|
t();
|
|
6468
|
-
const r = e, s = aa(e, "modelValue"), a = n, o = r.options.registry ||
|
|
6469
|
-
[
|
|
6470
|
-
} : r.options.useDefaults !== !1 ? { ...Ne.getDefaultValue(r.schema), ...s.value } : { ...s.value }, { handleSubmit: c, values: u, setValues: m, setFieldValue:
|
|
6481
|
+
const r = e, s = aa(e, "modelValue"), a = n, o = r.options.registry || rm(), i = G(() => r.schema.type === "object" && !r.schema.properties), d = i.value ? {
|
|
6482
|
+
[Qe]: s.value && typeof s.value == "object" && Object.keys(s.value).length > 0 ? s.value : r.options.useDefaults !== !1 ? Ne.getDefaultValue(r.schema) : {}
|
|
6483
|
+
} : r.options.useDefaults !== !1 ? { ...Ne.getDefaultValue(r.schema), ...s.value } : { ...s.value }, { handleSubmit: c, values: u, setValues: m, setFieldValue: g, errors: b, meta: _ } = ua({
|
|
6471
6484
|
initialValues: d,
|
|
6472
6485
|
validateOnMount: r.options.validateOnMount ?? !1
|
|
6473
|
-
}),
|
|
6486
|
+
}), $ = {
|
|
6474
6487
|
selectPlaceholder: "Select an option...",
|
|
6475
6488
|
addItem: "Add item",
|
|
6476
6489
|
removeItem: "Remove",
|
|
6477
6490
|
submit: "Submit",
|
|
6478
6491
|
showPassword: "Show password",
|
|
6479
6492
|
hidePassword: "Hide password"
|
|
6480
|
-
},
|
|
6493
|
+
}, y = {
|
|
6481
6494
|
layout: {
|
|
6482
6495
|
fieldGap: "1rem"
|
|
6483
6496
|
},
|
|
@@ -6507,30 +6520,30 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6507
6520
|
errorMessages: r.options.errorMessages,
|
|
6508
6521
|
validators: r.options.validators,
|
|
6509
6522
|
validatorDebounce: r.options.validatorDebounce,
|
|
6510
|
-
formValues: () => i.value ? wn(u[
|
|
6511
|
-
labels: {
|
|
6523
|
+
formValues: () => i.value ? wn(u[Qe]) : wn(u),
|
|
6524
|
+
labels: { ...$, ...r.options.labels },
|
|
6512
6525
|
componentDefaults: {
|
|
6513
6526
|
// Start with all custom component defaults from options
|
|
6514
6527
|
...r.options.componentDefaults,
|
|
6515
6528
|
// Then merge in the built-in defaults
|
|
6516
6529
|
layout: {
|
|
6517
|
-
...
|
|
6530
|
+
...y.layout,
|
|
6518
6531
|
...(T = r.options.componentDefaults) == null ? void 0 : T.layout
|
|
6519
6532
|
},
|
|
6520
6533
|
select: {
|
|
6521
|
-
...
|
|
6534
|
+
...y.select,
|
|
6522
6535
|
...(V = r.options.componentDefaults) == null ? void 0 : V.select
|
|
6523
6536
|
},
|
|
6524
6537
|
array: {
|
|
6525
|
-
...
|
|
6538
|
+
...y.array,
|
|
6526
6539
|
...(W = r.options.componentDefaults) == null ? void 0 : W.array
|
|
6527
6540
|
},
|
|
6528
6541
|
number: {
|
|
6529
|
-
...
|
|
6542
|
+
...y.number,
|
|
6530
6543
|
...(H = r.options.componentDefaults) == null ? void 0 : H.number
|
|
6531
6544
|
},
|
|
6532
6545
|
hints: {
|
|
6533
|
-
...
|
|
6546
|
+
...y.hints,
|
|
6534
6547
|
...(ne = r.options.componentDefaults) == null ? void 0 : ne.hints
|
|
6535
6548
|
}
|
|
6536
6549
|
},
|
|
@@ -6538,10 +6551,10 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6538
6551
|
hintRenderer: r.options.hintRenderer
|
|
6539
6552
|
});
|
|
6540
6553
|
yc(f);
|
|
6541
|
-
const
|
|
6554
|
+
const p = oe(!1);
|
|
6542
6555
|
Or(() => {
|
|
6543
6556
|
Pt(() => {
|
|
6544
|
-
|
|
6557
|
+
p.value = !0, a("ready");
|
|
6545
6558
|
});
|
|
6546
6559
|
});
|
|
6547
6560
|
let k = !1, S = !1;
|
|
@@ -6549,7 +6562,7 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6549
6562
|
if (!S) {
|
|
6550
6563
|
if (k = !0, i.value) {
|
|
6551
6564
|
const re = L && typeof L == "object" && Object.keys(L).length > 0 ? L : r.options.useDefaults !== !1 ? Ne.getDefaultValue(r.schema) : {};
|
|
6552
|
-
|
|
6565
|
+
g(Qe, re);
|
|
6553
6566
|
} else
|
|
6554
6567
|
L && m(L);
|
|
6555
6568
|
Pt(() => {
|
|
@@ -6557,7 +6570,7 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6557
6570
|
});
|
|
6558
6571
|
}
|
|
6559
6572
|
}), i.value ? He(
|
|
6560
|
-
() => u[
|
|
6573
|
+
() => u[Qe],
|
|
6561
6574
|
(L) => {
|
|
6562
6575
|
k || (S = !0, s.value = L, Pt(() => {
|
|
6563
6576
|
S = !1;
|
|
@@ -6573,7 +6586,7 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6573
6586
|
},
|
|
6574
6587
|
{ deep: !0 }
|
|
6575
6588
|
), He(
|
|
6576
|
-
[
|
|
6589
|
+
[b, _],
|
|
6577
6590
|
([L, re]) => {
|
|
6578
6591
|
a("validation", {
|
|
6579
6592
|
valid: re.valid,
|
|
@@ -6583,15 +6596,15 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6583
6596
|
{ immediate: !0 }
|
|
6584
6597
|
);
|
|
6585
6598
|
const O = c((L) => {
|
|
6586
|
-
const re = i.value ? L[
|
|
6599
|
+
const re = i.value ? L[Qe] : L, Se = Ne.validate(r.schema, re);
|
|
6587
6600
|
Se.valid ? a("submit", re) : console.error("Form validation failed:", Se.errors);
|
|
6588
6601
|
}), z = G(() => r.schema.type !== "object" || !r.schema.properties ? [] : Object.entries(r.schema.properties).map(([L, re]) => ({
|
|
6589
6602
|
key: L,
|
|
6590
6603
|
schema: re,
|
|
6591
6604
|
path: L
|
|
6592
6605
|
}))), J = G(() => {
|
|
6593
|
-
var Se,
|
|
6594
|
-
const L = ((
|
|
6606
|
+
var Se, Je;
|
|
6607
|
+
const L = ((Je = (Se = r.options.componentDefaults) == null ? void 0 : Se.layout) == null ? void 0 : Je.fieldGap) ?? "1rem";
|
|
6595
6608
|
return {
|
|
6596
6609
|
xs: "4px",
|
|
6597
6610
|
sm: "8px",
|
|
@@ -6599,7 +6612,7 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6599
6612
|
lg: "24px",
|
|
6600
6613
|
xl: "32px"
|
|
6601
6614
|
}[L] ?? L;
|
|
6602
|
-
}), M = { props: r, model: s, emit: a, registry: o, SINGLE_FIELD_PATH:
|
|
6615
|
+
}), M = { props: r, model: s, emit: a, registry: o, SINGLE_FIELD_PATH: Qe, isSingleField: i, initialValues: d, handleSubmit: c, values: u, setValues: m, setFieldValue: g, errors: b, meta: _, defaultLabels: $, defaultComponentDefaults: y, formContext: f, isReady: p, get isUpdatingFromModel() {
|
|
6603
6616
|
return k;
|
|
6604
6617
|
}, set isUpdatingFromModel(L) {
|
|
6605
6618
|
k = L;
|
|
@@ -6610,12 +6623,12 @@ const Ye = "__root__", rm = /* @__PURE__ */ me({
|
|
|
6610
6623
|
}, onSubmit: O, properties: z, fieldGapStyle: J, FieldRenderer: St };
|
|
6611
6624
|
return Object.defineProperty(M, "__isScriptSetup", { enumerable: !1, value: !0 }), M;
|
|
6612
6625
|
}
|
|
6613
|
-
}),
|
|
6626
|
+
}), sm = {
|
|
6614
6627
|
key: 0,
|
|
6615
6628
|
class: "quickform-loading-overlay"
|
|
6616
6629
|
};
|
|
6617
|
-
function
|
|
6618
|
-
return j(),
|
|
6630
|
+
function am(e, t, n, r, s, a) {
|
|
6631
|
+
return j(), q(
|
|
6619
6632
|
"form",
|
|
6620
6633
|
{
|
|
6621
6634
|
class: "quickform",
|
|
@@ -6624,7 +6637,7 @@ function sm(e, t, n, r, s, a) {
|
|
|
6624
6637
|
},
|
|
6625
6638
|
[
|
|
6626
6639
|
C(" Loading overlay (shown until form is ready) "),
|
|
6627
|
-
n.showLoadingOverlay && !r.isReady ? (j(),
|
|
6640
|
+
n.showLoadingOverlay && !r.isReady ? (j(), q("div", sm, [
|
|
6628
6641
|
da(e.$slots, "loading", {}, () => [
|
|
6629
6642
|
t[1] || (t[1] = D(
|
|
6630
6643
|
"div",
|
|
@@ -6651,12 +6664,12 @@ function sm(e, t, n, r, s, a) {
|
|
|
6651
6664
|
path: r.SINGLE_FIELD_PATH,
|
|
6652
6665
|
disabled: n.options.disabled,
|
|
6653
6666
|
readonly: n.options.readonly
|
|
6654
|
-
}, null, 8, ["schema", "disabled", "readonly"])) : (j(),
|
|
6667
|
+
}, null, 8, ["schema", "disabled", "readonly"])) : (j(), q(
|
|
6655
6668
|
we,
|
|
6656
6669
|
{ key: 1 },
|
|
6657
6670
|
[
|
|
6658
6671
|
C(" Multiple fields (normal form) "),
|
|
6659
|
-
(j(!0),
|
|
6672
|
+
(j(!0), q(
|
|
6660
6673
|
we,
|
|
6661
6674
|
null,
|
|
6662
6675
|
Ke(r.properties, (o) => (j(), gt(r.FieldRenderer, {
|
|
@@ -6682,17 +6695,17 @@ function sm(e, t, n, r, s, a) {
|
|
|
6682
6695
|
/* STYLE, NEED_HYDRATION */
|
|
6683
6696
|
);
|
|
6684
6697
|
}
|
|
6685
|
-
const
|
|
6698
|
+
const Sm = /* @__PURE__ */ he(nm, [["render", am], ["__scopeId", "data-v-cb85e2c1"], ["__file", "/Users/zachsherbondy/src/github.com/quickforms/packages/vue/src/components/DynamicForm.vue"]]);
|
|
6686
6699
|
export {
|
|
6687
|
-
|
|
6700
|
+
Yf as AllOfField,
|
|
6688
6701
|
af as ArrayField,
|
|
6689
6702
|
ru as BooleanField,
|
|
6690
6703
|
fa as ComponentRegistry,
|
|
6691
6704
|
Pu as DateField,
|
|
6692
|
-
|
|
6705
|
+
Sm as DynamicForm,
|
|
6693
6706
|
yu as EnumField,
|
|
6694
6707
|
St as FieldRenderer,
|
|
6695
|
-
|
|
6708
|
+
tm as HiddenField,
|
|
6696
6709
|
Tf as JsonField,
|
|
6697
6710
|
$f as KeyValueField,
|
|
6698
6711
|
Gc as NumberField,
|
|
@@ -6700,40 +6713,40 @@ export {
|
|
|
6700
6713
|
xn as OneOfField,
|
|
6701
6714
|
pc as SchemaUtils,
|
|
6702
6715
|
Ac as StringField,
|
|
6703
|
-
|
|
6704
|
-
|
|
6716
|
+
_m as and,
|
|
6717
|
+
rm as createDefaultRegistry,
|
|
6705
6718
|
ke as generateFieldId,
|
|
6706
6719
|
vc as getHint,
|
|
6707
|
-
|
|
6720
|
+
$m as getLabel,
|
|
6708
6721
|
ka as hasAllOf,
|
|
6709
6722
|
wa as hasAnyOf,
|
|
6710
|
-
|
|
6723
|
+
ym as hasConditional,
|
|
6711
6724
|
ga as hasConst,
|
|
6712
|
-
|
|
6713
|
-
|
|
6725
|
+
vm as hasExtension,
|
|
6726
|
+
cm as hasFormat,
|
|
6714
6727
|
Wn as hasOneOf,
|
|
6715
6728
|
ya as isArrayType,
|
|
6716
6729
|
ha as isBooleanType,
|
|
6717
6730
|
$a as isDateFormat,
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6731
|
+
mm as isDateTimeFormat,
|
|
6732
|
+
pm as isDiscriminatedUnion,
|
|
6733
|
+
um as isEmailFormat,
|
|
6734
|
+
wm as isEmpty,
|
|
6722
6735
|
ba as isEnumType,
|
|
6723
|
-
|
|
6736
|
+
lm as isIntegerType,
|
|
6724
6737
|
_a as isJsonType,
|
|
6725
|
-
|
|
6738
|
+
dm as isNullType,
|
|
6726
6739
|
ma as isNumberType,
|
|
6727
6740
|
pa as isObjectType,
|
|
6728
6741
|
va as isRecordType,
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6742
|
+
st as isStringType,
|
|
6743
|
+
fm as isTimeFormat,
|
|
6744
|
+
hm as isUrlFormat,
|
|
6745
|
+
km as joinPath,
|
|
6746
|
+
bm as not,
|
|
6747
|
+
gm as or,
|
|
6735
6748
|
yc as provideFormContext,
|
|
6736
6749
|
pe as rankWith,
|
|
6737
|
-
|
|
6750
|
+
xe as useFormContext,
|
|
6738
6751
|
ve as useFormField
|
|
6739
6752
|
};
|