@rippling/pebble-sdui-mobile 0.17.0 → 0.18.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/catalogs/custom-apps/action-params.d.ts +3 -0
- package/dist/catalogs/custom-apps/actions.d.ts +2 -1
- package/dist/catalogs/custom-apps/catalog.d.ts +1 -1
- package/dist/catalogs/custom-apps/component-events.d.ts +1 -0
- package/dist/catalogs/custom-apps/component-props.d.ts +66 -7
- package/dist/catalogs/custom-apps/components.d.ts +17 -16
- package/dist/catalogs/custom-apps/function-params.d.ts +4 -0
- package/dist/catalogs/custom-apps/functions.d.ts +9 -1
- package/dist/catalogs/custom-apps/index.cjs +5 -5
- package/dist/catalogs/custom-apps/index.cjs.map +1 -1
- package/dist/catalogs/custom-apps/index.d.ts +7 -7
- package/dist/catalogs/custom-apps/index.js +836 -568
- package/dist/catalogs/custom-apps/index.js.map +1 -1
- package/dist/core/component-utils.cjs +1 -1
- package/dist/core/component-utils.cjs.map +1 -1
- package/dist/core/component-utils.d.ts +16 -2
- package/dist/core/component-utils.js +4 -4
- package/dist/core/component-utils.js.map +1 -1
- package/dist/core/spec.cjs +1 -1
- package/dist/core/spec.cjs.map +1 -1
- package/dist/core/spec.d.ts +1 -0
- package/dist/core/spec.js +63 -56
- package/dist/core/spec.js.map +1 -1
- package/dist/docs/typescript/mobile/catalogs/custom-apps/actions.md +26 -0
- package/dist/docs/typescript/mobile/catalogs/custom-apps/components.md +30 -4
- package/dist/docs/typescript/mobile/catalogs/custom-apps/computed-functions.md +32 -0
- package/dist/docs/typescript/mobile/catalogs/custom-apps/definitions.md +11 -2
- package/dist/docs/typescript/mobile/catalogs/custom-apps/readme.md +1 -1
- package/dist/docs/typescript/mobile/catalogs/custom-apps/types.md +126 -12
- package/package.json +1 -1
|
@@ -1,44 +1,50 @@
|
|
|
1
1
|
import { buildNode as P } from "../../core/component-utils.js";
|
|
2
|
-
import { buildAction as
|
|
2
|
+
import { buildAction as Ve } from "../../core/action-utils.js";
|
|
3
3
|
import { createCatalogSchemaValidator as Yo } from "../../core/catalog-validation.js";
|
|
4
4
|
import { renderComponentMarkdown as Zo } from "../../core/component-markdown.js";
|
|
5
5
|
import { renderElementTree as Xo } from "../../core/spec.js";
|
|
6
|
-
const uu = (e) => P("ActionCard", e), fu = (e) => P("
|
|
6
|
+
const uu = (e) => P("ActionCard", e), fu = (e) => P("ActionSheet", e), hu = (e) => P("Anchor", e), mu = (e) => P("Animation", e), gu = (e) => P("Avatar", e), yu = (e) => P("AvatarStack", e), bu = (e) => P("Badge", e), $u = (e) => P("Button", e), vu = (e) => P("Card", e), Su = (e) => P("Checkbox", e), wu = (e) => P("CheckboxGroup", e), ku = (e) => P("Chip", e), Ou = (e) => P("Country", e), Cu = (e) => P("Currency", e), Pu = (e) => P("Date", e), _u = (e) => P("DateRange", e), Vu = (e) => P("DateTimePicker", e), Du = (e) => P("Divider", e), Fu = (e) => P("Email", e), ju = (e) => P("ExpansionPanel", e), Ru = (e) => P("FileViewerButton", e), Tu = (e) => P("FileViewerPressable", e), Iu = (e) => P("FloatingButton", e), Eu = (e) => P("Form", e), xu = (e) => P("Group", e), Au = (e) => P("Hidden", e), Nu = (e) => P("HStack", e), zu = (e) => P("Icon", e), Mu = (e) => P("Image", e), Lu = (e) => P("InputText", e), Bu = (e) => P("Label", e), qu = (e) => P("List", e), Hu = (e) => P("ListItem", e), Wu = (e) => P("ModalSheet", e), Uu = (e) => P("Notice", e), Gu = (e) => P("Number", e), Ku = (e) => P("ObjectFooter", e), Ju = (e) => P("ObjectItem", e), Yu = (e) => P("ObjectListView", e), Zu = (e) => P("ObjectListViewCard", e), Xu = (e) => P("PageCondensedFooter", e), Qu = (e) => P("PageCondensedHeader", e), ef = (e) => P("PageContent", e), tf = (e) => P("PageFilterHeader", e), rf = (e) => P("PageFooter", e), of = (e) => P("PageHeader", e), nf = (e) => P("PageModalActionHeader", e), sf = (e) => P("Password", e), af = (e) => P("Percentage", e), lf = (e) => P("Phone", e), df = (e) => P("Pressable", e), cf = (e) => P("ProgressIndicator", e), pf = (e) => P("Radio", e), uf = (e) => P("RadioGroup", e), ff = (e) => P("Search", e), hf = (e) => P("SectionHeader", e), mf = (e) => P("Select", e), gf = (e) => P("SelectChips", e), yf = (e) => P("Signature", e), bf = (e) => P("Sin", e), $f = (e) => P("Slider", e), vf = (e) => P("SliderRange", e), Sf = (e) => P("SnackBar", e), wf = (e) => P("Spacer", e), kf = (e) => P("Spinner", e), Of = (e) => P("Ssn", e), Cf = (e) => P("Status", e), Pf = (e) => P("StatusBar", e), _f = (e) => P("Switch", e), Vf = (e) => P("Tabs", e), Df = (e) => P("Text", e), Ff = (e) => P("Textarea", e), jf = (e) => P("Time", e), Rf = (e) => P("TimeRange", e), Tf = (e) => P("Tip", e), If = (e) => P("VStack", e), Ef = (e) => P("Widget", e), xf = (e) => P("WorkEmail", e), Af = (e, t) => Ve("copyToClipboard", e, t), Nf = (e, t) => Ve("goBack", e, t), zf = (e, t) => Ve("linking_openURL", e, t), Mf = (e, t) => Ve("navigate", e, t), Lf = (e, t) => Ve("push", e, t), Bf = (e, t) => Ve("setState", e, t), qf = (e, t) => Ve("triggerApi", e, t), Hf = (e) => ({
|
|
7
7
|
$computed: "currency_format",
|
|
8
8
|
args: e
|
|
9
|
-
}),
|
|
9
|
+
}), Wf = (e) => ({
|
|
10
10
|
$computed: "currency_getCurrencyCodeByCountryCode",
|
|
11
11
|
args: e
|
|
12
|
-
}),
|
|
12
|
+
}), Uf = (e) => ({
|
|
13
13
|
$computed: "currency_getCurrencyNameByCode",
|
|
14
14
|
args: e
|
|
15
|
-
}),
|
|
15
|
+
}), Gf = (e) => ({
|
|
16
16
|
$computed: "currency_getCurrencySymbol",
|
|
17
17
|
args: e
|
|
18
|
-
}),
|
|
18
|
+
}), Kf = (e) => ({
|
|
19
19
|
$computed: "currency_isConvertableToCurrency",
|
|
20
20
|
args: e
|
|
21
|
-
}),
|
|
21
|
+
}), Jf = (e) => ({
|
|
22
22
|
$computed: "currency_toMoney",
|
|
23
23
|
args: e
|
|
24
|
-
}),
|
|
24
|
+
}), Yf = (e) => ({
|
|
25
25
|
$computed: "dateTime_add",
|
|
26
26
|
args: e
|
|
27
|
-
}),
|
|
27
|
+
}), Zf = (e) => ({
|
|
28
28
|
$computed: "dateTime_format",
|
|
29
29
|
args: e
|
|
30
|
+
}), Xf = (e) => ({
|
|
31
|
+
$computed: "platform_isAndroid",
|
|
32
|
+
args: e
|
|
33
|
+
}), Qf = (e) => ({
|
|
34
|
+
$computed: "platform_isIOS",
|
|
35
|
+
args: e
|
|
30
36
|
});
|
|
31
|
-
var tr = { exports: {} }, qi = {}, oe = {},
|
|
37
|
+
var tr = { exports: {} }, qi = {}, oe = {}, Ae = {}, nt = {}, E = {}, ot = {};
|
|
32
38
|
(function(e) {
|
|
33
39
|
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;
|
|
34
40
|
class t {
|
|
35
41
|
}
|
|
36
42
|
e._CodeOrName = t, e.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
37
43
|
class r extends t {
|
|
38
|
-
constructor(
|
|
39
|
-
if (super(), !e.IDENTIFIER.test(
|
|
44
|
+
constructor($) {
|
|
45
|
+
if (super(), !e.IDENTIFIER.test($))
|
|
40
46
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
41
|
-
this.str =
|
|
47
|
+
this.str = $;
|
|
42
48
|
}
|
|
43
49
|
toString() {
|
|
44
50
|
return this.str;
|
|
@@ -52,8 +58,8 @@ var tr = { exports: {} }, qi = {}, oe = {}, xe = {}, nt = {}, E = {}, ot = {};
|
|
|
52
58
|
}
|
|
53
59
|
e.Name = r;
|
|
54
60
|
class i extends t {
|
|
55
|
-
constructor(
|
|
56
|
-
super(), this._items = typeof
|
|
61
|
+
constructor($) {
|
|
62
|
+
super(), this._items = typeof $ == "string" ? [$] : $;
|
|
57
63
|
}
|
|
58
64
|
toString() {
|
|
59
65
|
return this.str;
|
|
@@ -61,89 +67,89 @@ var tr = { exports: {} }, qi = {}, oe = {}, xe = {}, nt = {}, E = {}, ot = {};
|
|
|
61
67
|
emptyStr() {
|
|
62
68
|
if (this._items.length > 1)
|
|
63
69
|
return !1;
|
|
64
|
-
const
|
|
65
|
-
return
|
|
70
|
+
const $ = this._items[0];
|
|
71
|
+
return $ === "" || $ === '""';
|
|
66
72
|
}
|
|
67
73
|
get str() {
|
|
68
|
-
var
|
|
69
|
-
return (
|
|
74
|
+
var $;
|
|
75
|
+
return ($ = this._str) !== null && $ !== void 0 ? $ : this._str = this._items.reduce((C, D) => `${C}${D}`, "");
|
|
70
76
|
}
|
|
71
77
|
get names() {
|
|
72
|
-
var
|
|
73
|
-
return (
|
|
78
|
+
var $;
|
|
79
|
+
return ($ = this._names) !== null && $ !== void 0 ? $ : this._names = this._items.reduce((C, D) => (D instanceof r && (C[D.str] = (C[D.str] || 0) + 1), C), {});
|
|
74
80
|
}
|
|
75
81
|
}
|
|
76
82
|
e._Code = i, e.nil = new i("");
|
|
77
|
-
function o(u,
|
|
83
|
+
function o(u, ...$) {
|
|
78
84
|
const C = [u[0]];
|
|
79
85
|
let D = 0;
|
|
80
|
-
for (; D <
|
|
81
|
-
l(C,
|
|
86
|
+
for (; D < $.length; )
|
|
87
|
+
l(C, $[D]), C.push(u[++D]);
|
|
82
88
|
return new i(C);
|
|
83
89
|
}
|
|
84
90
|
e._ = o;
|
|
85
91
|
const n = new i("+");
|
|
86
|
-
function a(u,
|
|
87
|
-
const C = [
|
|
92
|
+
function a(u, ...$) {
|
|
93
|
+
const C = [w(u[0])];
|
|
88
94
|
let D = 0;
|
|
89
|
-
for (; D <
|
|
90
|
-
C.push(n), l(C,
|
|
95
|
+
for (; D < $.length; )
|
|
96
|
+
C.push(n), l(C, $[D]), C.push(n, w(u[++D]));
|
|
91
97
|
return d(C), new i(C);
|
|
92
98
|
}
|
|
93
99
|
e.str = a;
|
|
94
|
-
function l(u,
|
|
95
|
-
|
|
100
|
+
function l(u, $) {
|
|
101
|
+
$ instanceof i ? u.push(...$._items) : $ instanceof r ? u.push($) : u.push(h($));
|
|
96
102
|
}
|
|
97
103
|
e.addCodeArg = l;
|
|
98
104
|
function d(u) {
|
|
99
|
-
let
|
|
100
|
-
for (;
|
|
101
|
-
if (u[
|
|
102
|
-
const C = c(u[
|
|
105
|
+
let $ = 1;
|
|
106
|
+
for (; $ < u.length - 1; ) {
|
|
107
|
+
if (u[$] === n) {
|
|
108
|
+
const C = c(u[$ - 1], u[$ + 1]);
|
|
103
109
|
if (C !== void 0) {
|
|
104
|
-
u.splice(
|
|
110
|
+
u.splice($ - 1, 3, C);
|
|
105
111
|
continue;
|
|
106
112
|
}
|
|
107
|
-
u[
|
|
113
|
+
u[$++] = "+";
|
|
108
114
|
}
|
|
109
|
-
|
|
115
|
+
$++;
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
|
-
function c(u,
|
|
113
|
-
if (
|
|
118
|
+
function c(u, $) {
|
|
119
|
+
if ($ === '""')
|
|
114
120
|
return u;
|
|
115
121
|
if (u === '""')
|
|
116
|
-
return
|
|
122
|
+
return $;
|
|
117
123
|
if (typeof u == "string")
|
|
118
|
-
return
|
|
119
|
-
if (typeof
|
|
120
|
-
return `"${u}${
|
|
124
|
+
return $ instanceof r || u[u.length - 1] !== '"' ? void 0 : typeof $ != "string" ? `${u.slice(0, -1)}${$}"` : $[0] === '"' ? u.slice(0, -1) + $.slice(1) : void 0;
|
|
125
|
+
if (typeof $ == "string" && $[0] === '"' && !(u instanceof r))
|
|
126
|
+
return `"${u}${$.slice(1)}`;
|
|
121
127
|
}
|
|
122
|
-
function f(u,
|
|
123
|
-
return
|
|
128
|
+
function f(u, $) {
|
|
129
|
+
return $.emptyStr() ? u : u.emptyStr() ? $ : a`${u}${$}`;
|
|
124
130
|
}
|
|
125
131
|
e.strConcat = f;
|
|
126
132
|
function h(u) {
|
|
127
|
-
return typeof u == "number" || typeof u == "boolean" || u === null ? u :
|
|
133
|
+
return typeof u == "number" || typeof u == "boolean" || u === null ? u : w(Array.isArray(u) ? u.join(",") : u);
|
|
128
134
|
}
|
|
129
135
|
function k(u) {
|
|
130
|
-
return new i(
|
|
136
|
+
return new i(w(u));
|
|
131
137
|
}
|
|
132
138
|
e.stringify = k;
|
|
133
|
-
function
|
|
139
|
+
function w(u) {
|
|
134
140
|
return JSON.stringify(u).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
135
141
|
}
|
|
136
|
-
e.safeStringify =
|
|
137
|
-
function
|
|
142
|
+
e.safeStringify = w;
|
|
143
|
+
function b(u) {
|
|
138
144
|
return typeof u == "string" && e.IDENTIFIER.test(u) ? new i(`.${u}`) : o`[${u}]`;
|
|
139
145
|
}
|
|
140
|
-
e.getProperty =
|
|
141
|
-
function
|
|
146
|
+
e.getProperty = b;
|
|
147
|
+
function v(u) {
|
|
142
148
|
if (typeof u == "string" && e.IDENTIFIER.test(u))
|
|
143
149
|
return new i(`${u}`);
|
|
144
150
|
throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`);
|
|
145
151
|
}
|
|
146
|
-
e.getEsmExportName =
|
|
152
|
+
e.getEsmExportName = v;
|
|
147
153
|
function g(u) {
|
|
148
154
|
return new i(u.toString());
|
|
149
155
|
}
|
|
@@ -212,17 +218,17 @@ var rr = {};
|
|
|
212
218
|
var h;
|
|
213
219
|
if (f.ref === void 0)
|
|
214
220
|
throw new Error("CodeGen: ref must be passed in value");
|
|
215
|
-
const k = this.toName(c), { prefix:
|
|
216
|
-
let
|
|
217
|
-
if (
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
return
|
|
221
|
+
const k = this.toName(c), { prefix: w } = k, b = (h = f.key) !== null && h !== void 0 ? h : f.ref;
|
|
222
|
+
let v = this._values[w];
|
|
223
|
+
if (v) {
|
|
224
|
+
const $ = v.get(b);
|
|
225
|
+
if ($)
|
|
226
|
+
return $;
|
|
221
227
|
} else
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
const g = this._scope[
|
|
225
|
-
return g[u] = f.ref, k.setValue(f, { property:
|
|
228
|
+
v = this._values[w] = /* @__PURE__ */ new Map();
|
|
229
|
+
v.set(b, k);
|
|
230
|
+
const g = this._scope[w] || (this._scope[w] = []), u = g.length;
|
|
231
|
+
return g[u] = f.ref, k.setValue(f, { property: w, itemIndex: u }), k;
|
|
226
232
|
}
|
|
227
233
|
getValue(c, f) {
|
|
228
234
|
const h = this._values[c];
|
|
@@ -244,28 +250,28 @@ var rr = {};
|
|
|
244
250
|
}, f, h);
|
|
245
251
|
}
|
|
246
252
|
_reduceValues(c, f, h = {}, k) {
|
|
247
|
-
let
|
|
248
|
-
for (const
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
253
|
+
let w = t.nil;
|
|
254
|
+
for (const b in c) {
|
|
255
|
+
const v = c[b];
|
|
256
|
+
if (!v)
|
|
251
257
|
continue;
|
|
252
|
-
const g = h[
|
|
253
|
-
|
|
258
|
+
const g = h[b] = h[b] || /* @__PURE__ */ new Map();
|
|
259
|
+
v.forEach((u) => {
|
|
254
260
|
if (g.has(u))
|
|
255
261
|
return;
|
|
256
262
|
g.set(u, i.Started);
|
|
257
|
-
let
|
|
258
|
-
if (
|
|
263
|
+
let $ = f(u);
|
|
264
|
+
if ($) {
|
|
259
265
|
const C = this.opts.es5 ? e.varKinds.var : e.varKinds.const;
|
|
260
|
-
|
|
261
|
-
} else if (
|
|
262
|
-
|
|
266
|
+
w = (0, t._)`${w}${C} ${u} = ${$};${this.opts._n}`;
|
|
267
|
+
} else if ($ = k == null ? void 0 : k(u))
|
|
268
|
+
w = (0, t._)`${w}${$}${this.opts._n}`;
|
|
263
269
|
else
|
|
264
270
|
throw new r(u);
|
|
265
271
|
g.set(u, i.Completed);
|
|
266
272
|
});
|
|
267
273
|
}
|
|
268
|
-
return
|
|
274
|
+
return w;
|
|
269
275
|
}
|
|
270
276
|
}
|
|
271
277
|
e.ValueScope = l;
|
|
@@ -321,12 +327,12 @@ var rr = {};
|
|
|
321
327
|
}
|
|
322
328
|
}
|
|
323
329
|
class a extends n {
|
|
324
|
-
constructor(s, p,
|
|
325
|
-
super(), this.varKind = s, this.name = p, this.rhs =
|
|
330
|
+
constructor(s, p, S) {
|
|
331
|
+
super(), this.varKind = s, this.name = p, this.rhs = S;
|
|
326
332
|
}
|
|
327
333
|
render({ es5: s, _n: p }) {
|
|
328
|
-
const
|
|
329
|
-
return `${
|
|
334
|
+
const S = s ? r.varKinds.var : this.varKind, R = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
335
|
+
return `${S} ${this.name}${R};` + p;
|
|
330
336
|
}
|
|
331
337
|
optimizeNames(s, p) {
|
|
332
338
|
if (s[this.name.str])
|
|
@@ -337,8 +343,8 @@ var rr = {};
|
|
|
337
343
|
}
|
|
338
344
|
}
|
|
339
345
|
class l extends n {
|
|
340
|
-
constructor(s, p,
|
|
341
|
-
super(), this.lhs = s, this.rhs = p, this.sideEffects =
|
|
346
|
+
constructor(s, p, S) {
|
|
347
|
+
super(), this.lhs = s, this.rhs = p, this.sideEffects = S;
|
|
342
348
|
}
|
|
343
349
|
render({ _n: s }) {
|
|
344
350
|
return `${this.lhs} = ${this.rhs};` + s;
|
|
@@ -349,12 +355,12 @@ var rr = {};
|
|
|
349
355
|
}
|
|
350
356
|
get names() {
|
|
351
357
|
const s = this.lhs instanceof t.Name ? {} : { ...this.lhs.names };
|
|
352
|
-
return
|
|
358
|
+
return De(s, this.rhs);
|
|
353
359
|
}
|
|
354
360
|
}
|
|
355
361
|
class d extends l {
|
|
356
|
-
constructor(s, p,
|
|
357
|
-
super(s,
|
|
362
|
+
constructor(s, p, S, R) {
|
|
363
|
+
super(s, S, R), this.op = p;
|
|
358
364
|
}
|
|
359
365
|
render({ _n: s }) {
|
|
360
366
|
return `${this.lhs} ${this.op}= ${this.rhs};` + s;
|
|
@@ -404,46 +410,46 @@ var rr = {};
|
|
|
404
410
|
return this.code instanceof t._CodeOrName ? this.code.names : {};
|
|
405
411
|
}
|
|
406
412
|
}
|
|
407
|
-
class
|
|
413
|
+
class w extends n {
|
|
408
414
|
constructor(s = []) {
|
|
409
415
|
super(), this.nodes = s;
|
|
410
416
|
}
|
|
411
417
|
render(s) {
|
|
412
|
-
return this.nodes.reduce((p,
|
|
418
|
+
return this.nodes.reduce((p, S) => p + S.render(s), "");
|
|
413
419
|
}
|
|
414
420
|
optimizeNodes() {
|
|
415
421
|
const { nodes: s } = this;
|
|
416
422
|
let p = s.length;
|
|
417
423
|
for (; p--; ) {
|
|
418
|
-
const
|
|
419
|
-
Array.isArray(
|
|
424
|
+
const S = s[p].optimizeNodes();
|
|
425
|
+
Array.isArray(S) ? s.splice(p, 1, ...S) : S ? s[p] = S : s.splice(p, 1);
|
|
420
426
|
}
|
|
421
427
|
return s.length > 0 ? this : void 0;
|
|
422
428
|
}
|
|
423
429
|
optimizeNames(s, p) {
|
|
424
|
-
const { nodes:
|
|
425
|
-
let R =
|
|
430
|
+
const { nodes: S } = this;
|
|
431
|
+
let R = S.length;
|
|
426
432
|
for (; R--; ) {
|
|
427
|
-
const T =
|
|
428
|
-
T.optimizeNames(s, p) || (Ue(s, T.names),
|
|
433
|
+
const T = S[R];
|
|
434
|
+
T.optimizeNames(s, p) || (Ue(s, T.names), S.splice(R, 1));
|
|
429
435
|
}
|
|
430
|
-
return
|
|
436
|
+
return S.length > 0 ? this : void 0;
|
|
431
437
|
}
|
|
432
438
|
get names() {
|
|
433
439
|
return this.nodes.reduce((s, p) => le(s, p.names), {});
|
|
434
440
|
}
|
|
435
441
|
}
|
|
436
|
-
class
|
|
442
|
+
class b extends w {
|
|
437
443
|
render(s) {
|
|
438
444
|
return "{" + s._n + super.render(s) + "}" + s._n;
|
|
439
445
|
}
|
|
440
446
|
}
|
|
441
|
-
class
|
|
447
|
+
class v extends w {
|
|
442
448
|
}
|
|
443
|
-
class g extends
|
|
449
|
+
class g extends b {
|
|
444
450
|
}
|
|
445
451
|
g.kind = "else";
|
|
446
|
-
class u extends
|
|
452
|
+
class u extends b {
|
|
447
453
|
constructor(s, p) {
|
|
448
454
|
super(p), this.condition = s;
|
|
449
455
|
}
|
|
@@ -458,8 +464,8 @@ var rr = {};
|
|
|
458
464
|
return this.nodes;
|
|
459
465
|
let p = this.else;
|
|
460
466
|
if (p) {
|
|
461
|
-
const
|
|
462
|
-
p = this.else = Array.isArray(
|
|
467
|
+
const S = p.optimizeNodes();
|
|
468
|
+
p = this.else = Array.isArray(S) ? new g(S) : S;
|
|
463
469
|
}
|
|
464
470
|
if (p)
|
|
465
471
|
return s === !1 ? p instanceof u ? p : p.nodes : this.nodes.length ? this : new u(lt(s), p instanceof u ? [p] : p.nodes);
|
|
@@ -467,20 +473,20 @@ var rr = {};
|
|
|
467
473
|
return this;
|
|
468
474
|
}
|
|
469
475
|
optimizeNames(s, p) {
|
|
470
|
-
var
|
|
471
|
-
if (this.else = (
|
|
476
|
+
var S;
|
|
477
|
+
if (this.else = (S = this.else) === null || S === void 0 ? void 0 : S.optimizeNames(s, p), !!(super.optimizeNames(s, p) || this.else))
|
|
472
478
|
return this.condition = he(this.condition, s, p), this;
|
|
473
479
|
}
|
|
474
480
|
get names() {
|
|
475
481
|
const s = super.names;
|
|
476
|
-
return
|
|
482
|
+
return De(s, this.condition), this.else && le(s, this.else.names), s;
|
|
477
483
|
}
|
|
478
484
|
}
|
|
479
485
|
u.kind = "if";
|
|
480
|
-
class
|
|
486
|
+
class $ extends b {
|
|
481
487
|
}
|
|
482
|
-
|
|
483
|
-
class C extends
|
|
488
|
+
$.kind = "for";
|
|
489
|
+
class C extends $ {
|
|
484
490
|
constructor(s) {
|
|
485
491
|
super(), this.iteration = s;
|
|
486
492
|
}
|
|
@@ -495,22 +501,22 @@ var rr = {};
|
|
|
495
501
|
return le(super.names, this.iteration.names);
|
|
496
502
|
}
|
|
497
503
|
}
|
|
498
|
-
class D extends
|
|
499
|
-
constructor(s, p,
|
|
500
|
-
super(), this.varKind = s, this.name = p, this.from =
|
|
504
|
+
class D extends $ {
|
|
505
|
+
constructor(s, p, S, R) {
|
|
506
|
+
super(), this.varKind = s, this.name = p, this.from = S, this.to = R;
|
|
501
507
|
}
|
|
502
508
|
render(s) {
|
|
503
|
-
const p = s.es5 ? r.varKinds.var : this.varKind, { name:
|
|
504
|
-
return `for(${p} ${
|
|
509
|
+
const p = s.es5 ? r.varKinds.var : this.varKind, { name: S, from: R, to: T } = this;
|
|
510
|
+
return `for(${p} ${S}=${R}; ${S}<${T}; ${S}++)` + super.render(s);
|
|
505
511
|
}
|
|
506
512
|
get names() {
|
|
507
|
-
const s =
|
|
508
|
-
return
|
|
513
|
+
const s = De(super.names, this.from);
|
|
514
|
+
return De(s, this.to);
|
|
509
515
|
}
|
|
510
516
|
}
|
|
511
|
-
class F extends
|
|
512
|
-
constructor(s, p,
|
|
513
|
-
super(), this.loop = s, this.varKind = p, this.name =
|
|
517
|
+
class F extends $ {
|
|
518
|
+
constructor(s, p, S, R) {
|
|
519
|
+
super(), this.loop = s, this.varKind = p, this.name = S, this.iterable = R;
|
|
514
520
|
}
|
|
515
521
|
render(s) {
|
|
516
522
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(s);
|
|
@@ -523,22 +529,22 @@ var rr = {};
|
|
|
523
529
|
return le(super.names, this.iterable.names);
|
|
524
530
|
}
|
|
525
531
|
}
|
|
526
|
-
class L extends
|
|
527
|
-
constructor(s, p,
|
|
528
|
-
super(), this.name = s, this.args = p, this.async =
|
|
532
|
+
class L extends b {
|
|
533
|
+
constructor(s, p, S) {
|
|
534
|
+
super(), this.name = s, this.args = p, this.async = S;
|
|
529
535
|
}
|
|
530
536
|
render(s) {
|
|
531
537
|
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(s);
|
|
532
538
|
}
|
|
533
539
|
}
|
|
534
540
|
L.kind = "func";
|
|
535
|
-
class H extends
|
|
541
|
+
class H extends w {
|
|
536
542
|
render(s) {
|
|
537
543
|
return "return " + super.render(s);
|
|
538
544
|
}
|
|
539
545
|
}
|
|
540
546
|
H.kind = "return";
|
|
541
|
-
class ae extends
|
|
547
|
+
class ae extends b {
|
|
542
548
|
render(s) {
|
|
543
549
|
let p = "try" + super.render(s);
|
|
544
550
|
return this.catch && (p += this.catch.render(s)), this.finally && (p += this.finally.render(s)), p;
|
|
@@ -548,15 +554,15 @@ var rr = {};
|
|
|
548
554
|
return super.optimizeNodes(), (s = this.catch) === null || s === void 0 || s.optimizeNodes(), (p = this.finally) === null || p === void 0 || p.optimizeNodes(), this;
|
|
549
555
|
}
|
|
550
556
|
optimizeNames(s, p) {
|
|
551
|
-
var
|
|
552
|
-
return super.optimizeNames(s, p), (
|
|
557
|
+
var S, R;
|
|
558
|
+
return super.optimizeNames(s, p), (S = this.catch) === null || S === void 0 || S.optimizeNames(s, p), (R = this.finally) === null || R === void 0 || R.optimizeNames(s, p), this;
|
|
553
559
|
}
|
|
554
560
|
get names() {
|
|
555
561
|
const s = super.names;
|
|
556
562
|
return this.catch && le(s, this.catch.names), this.finally && le(s, this.finally.names), s;
|
|
557
563
|
}
|
|
558
564
|
}
|
|
559
|
-
class fe extends
|
|
565
|
+
class fe extends b {
|
|
560
566
|
constructor(s) {
|
|
561
567
|
super(), this.error = s;
|
|
562
568
|
}
|
|
@@ -565,7 +571,7 @@ var rr = {};
|
|
|
565
571
|
}
|
|
566
572
|
}
|
|
567
573
|
fe.kind = "catch";
|
|
568
|
-
class ve extends
|
|
574
|
+
class ve extends b {
|
|
569
575
|
render(s) {
|
|
570
576
|
return "finally" + super.render(s);
|
|
571
577
|
}
|
|
@@ -574,7 +580,7 @@ var rr = {};
|
|
|
574
580
|
class We {
|
|
575
581
|
constructor(s, p = {}) {
|
|
576
582
|
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...p, _n: p.lines ? `
|
|
577
|
-
` : "" }, this._extScope = s, this._scope = new r.Scope({ parent: s }), this._nodes = [new
|
|
583
|
+
` : "" }, this._extScope = s, this._scope = new r.Scope({ parent: s }), this._nodes = [new v()];
|
|
578
584
|
}
|
|
579
585
|
toString() {
|
|
580
586
|
return this._root.render(this.opts);
|
|
@@ -589,8 +595,8 @@ var rr = {};
|
|
|
589
595
|
}
|
|
590
596
|
// reserves unique name in the external scope and assigns value to it
|
|
591
597
|
scopeValue(s, p) {
|
|
592
|
-
const
|
|
593
|
-
return (this._values[
|
|
598
|
+
const S = this._extScope.value(s, p);
|
|
599
|
+
return (this._values[S.prefix] || (this._values[S.prefix] = /* @__PURE__ */ new Set())).add(S), S;
|
|
594
600
|
}
|
|
595
601
|
getScopeValue(s, p) {
|
|
596
602
|
return this._extScope.getValue(s, p);
|
|
@@ -603,25 +609,25 @@ var rr = {};
|
|
|
603
609
|
scopeCode() {
|
|
604
610
|
return this._extScope.scopeCode(this._values);
|
|
605
611
|
}
|
|
606
|
-
_def(s, p,
|
|
612
|
+
_def(s, p, S, R) {
|
|
607
613
|
const T = this._scope.toName(p);
|
|
608
|
-
return
|
|
614
|
+
return S !== void 0 && R && (this._constants[T.str] = S), this._leafNode(new a(s, T, S)), T;
|
|
609
615
|
}
|
|
610
616
|
// `const` declaration (`var` in es5 mode)
|
|
611
|
-
const(s, p,
|
|
612
|
-
return this._def(r.varKinds.const, s, p,
|
|
617
|
+
const(s, p, S) {
|
|
618
|
+
return this._def(r.varKinds.const, s, p, S);
|
|
613
619
|
}
|
|
614
620
|
// `let` declaration with optional assignment (`var` in es5 mode)
|
|
615
|
-
let(s, p,
|
|
616
|
-
return this._def(r.varKinds.let, s, p,
|
|
621
|
+
let(s, p, S) {
|
|
622
|
+
return this._def(r.varKinds.let, s, p, S);
|
|
617
623
|
}
|
|
618
624
|
// `var` declaration with optional assignment
|
|
619
|
-
var(s, p,
|
|
620
|
-
return this._def(r.varKinds.var, s, p,
|
|
625
|
+
var(s, p, S) {
|
|
626
|
+
return this._def(r.varKinds.var, s, p, S);
|
|
621
627
|
}
|
|
622
628
|
// assignment code
|
|
623
|
-
assign(s, p,
|
|
624
|
-
return this._leafNode(new l(s, p,
|
|
629
|
+
assign(s, p, S) {
|
|
630
|
+
return this._leafNode(new l(s, p, S));
|
|
625
631
|
}
|
|
626
632
|
// `+=` code
|
|
627
633
|
add(s, p) {
|
|
@@ -634,17 +640,17 @@ var rr = {};
|
|
|
634
640
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
635
641
|
object(...s) {
|
|
636
642
|
const p = ["{"];
|
|
637
|
-
for (const [
|
|
638
|
-
p.length > 1 && p.push(","), p.push(
|
|
643
|
+
for (const [S, R] of s)
|
|
644
|
+
p.length > 1 && p.push(","), p.push(S), (S !== R || this.opts.es5) && (p.push(":"), (0, t.addCodeArg)(p, R));
|
|
639
645
|
return p.push("}"), new t._Code(p);
|
|
640
646
|
}
|
|
641
647
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
642
|
-
if(s, p,
|
|
643
|
-
if (this._blockNode(new u(s)), p &&
|
|
644
|
-
this.code(p).else().code(
|
|
648
|
+
if(s, p, S) {
|
|
649
|
+
if (this._blockNode(new u(s)), p && S)
|
|
650
|
+
this.code(p).else().code(S).endIf();
|
|
645
651
|
else if (p)
|
|
646
652
|
this.code(p).endIf();
|
|
647
|
-
else if (
|
|
653
|
+
else if (S)
|
|
648
654
|
throw new Error('CodeGen: "else" body without "then" body');
|
|
649
655
|
return this;
|
|
650
656
|
}
|
|
@@ -668,32 +674,32 @@ var rr = {};
|
|
|
668
674
|
return this._for(new C(s), p);
|
|
669
675
|
}
|
|
670
676
|
// `for` statement for a range of values
|
|
671
|
-
forRange(s, p,
|
|
677
|
+
forRange(s, p, S, R, T = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
672
678
|
const z = this._scope.toName(s);
|
|
673
|
-
return this._for(new D(T, z, p,
|
|
679
|
+
return this._for(new D(T, z, p, S), () => R(z));
|
|
674
680
|
}
|
|
675
681
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
676
|
-
forOf(s, p,
|
|
682
|
+
forOf(s, p, S, R = r.varKinds.const) {
|
|
677
683
|
const T = this._scope.toName(s);
|
|
678
684
|
if (this.opts.es5) {
|
|
679
685
|
const z = p instanceof t.Name ? p : this.var("_arr", p);
|
|
680
686
|
return this.forRange("_i", 0, (0, t._)`${z}.length`, (N) => {
|
|
681
|
-
this.var(T, (0, t._)`${z}[${N}]`),
|
|
687
|
+
this.var(T, (0, t._)`${z}[${N}]`), S(T);
|
|
682
688
|
});
|
|
683
689
|
}
|
|
684
|
-
return this._for(new F("of", R, T, p), () =>
|
|
690
|
+
return this._for(new F("of", R, T, p), () => S(T));
|
|
685
691
|
}
|
|
686
692
|
// `for-in` statement.
|
|
687
693
|
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
|
688
|
-
forIn(s, p,
|
|
694
|
+
forIn(s, p, S, R = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
|
|
689
695
|
if (this.opts.ownProperties)
|
|
690
|
-
return this.forOf(s, (0, t._)`Object.keys(${p})`,
|
|
696
|
+
return this.forOf(s, (0, t._)`Object.keys(${p})`, S);
|
|
691
697
|
const T = this._scope.toName(s);
|
|
692
|
-
return this._for(new F("in", R, T, p), () =>
|
|
698
|
+
return this._for(new F("in", R, T, p), () => S(T));
|
|
693
699
|
}
|
|
694
700
|
// end `for` loop
|
|
695
701
|
endFor() {
|
|
696
|
-
return this._endBlockNode(
|
|
702
|
+
return this._endBlockNode($);
|
|
697
703
|
}
|
|
698
704
|
// `label` statement
|
|
699
705
|
label(s) {
|
|
@@ -711,15 +717,15 @@ var rr = {};
|
|
|
711
717
|
return this._endBlockNode(H);
|
|
712
718
|
}
|
|
713
719
|
// `try` statement
|
|
714
|
-
try(s, p,
|
|
715
|
-
if (!p && !
|
|
720
|
+
try(s, p, S) {
|
|
721
|
+
if (!p && !S)
|
|
716
722
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
717
723
|
const R = new ae();
|
|
718
724
|
if (this._blockNode(R), this.code(s), p) {
|
|
719
725
|
const T = this.name("e");
|
|
720
726
|
this._currNode = R.catch = new fe(T), p(T);
|
|
721
727
|
}
|
|
722
|
-
return
|
|
728
|
+
return S && (this._currNode = R.finally = new ve(), this.code(S)), this._endBlockNode(fe, ve);
|
|
723
729
|
}
|
|
724
730
|
// `throw` statement
|
|
725
731
|
throw(s) {
|
|
@@ -734,14 +740,14 @@ var rr = {};
|
|
|
734
740
|
const p = this._blockStarts.pop();
|
|
735
741
|
if (p === void 0)
|
|
736
742
|
throw new Error("CodeGen: not in self-balancing block");
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
throw new Error(`CodeGen: wrong number of nodes: ${
|
|
743
|
+
const S = this._nodes.length - p;
|
|
744
|
+
if (S < 0 || s !== void 0 && S !== s)
|
|
745
|
+
throw new Error(`CodeGen: wrong number of nodes: ${S} vs ${s} expected`);
|
|
740
746
|
return this._nodes.length = p, this;
|
|
741
747
|
}
|
|
742
748
|
// `function` heading (or definition if funcBody is passed)
|
|
743
|
-
func(s, p = t.nil,
|
|
744
|
-
return this._blockNode(new L(s, p,
|
|
749
|
+
func(s, p = t.nil, S, R) {
|
|
750
|
+
return this._blockNode(new L(s, p, S)), R && this.code(R).endFunc(), this;
|
|
745
751
|
}
|
|
746
752
|
// end function definition
|
|
747
753
|
endFunc() {
|
|
@@ -758,8 +764,8 @@ var rr = {};
|
|
|
758
764
|
this._currNode.nodes.push(s), this._nodes.push(s);
|
|
759
765
|
}
|
|
760
766
|
_endBlockNode(s, p) {
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
767
|
+
const S = this._currNode;
|
|
768
|
+
if (S instanceof s || p && S instanceof p)
|
|
763
769
|
return this._nodes.pop(), this;
|
|
764
770
|
throw new Error(`CodeGen: not in block "${p ? `${s.kind}/${p.kind}` : s.kind}"`);
|
|
765
771
|
}
|
|
@@ -787,16 +793,16 @@ var rr = {};
|
|
|
787
793
|
y[p] = (y[p] || 0) + (s[p] || 0);
|
|
788
794
|
return y;
|
|
789
795
|
}
|
|
790
|
-
function
|
|
796
|
+
function De(y, s) {
|
|
791
797
|
return s instanceof t._CodeOrName ? le(y, s.names) : y;
|
|
792
798
|
}
|
|
793
799
|
function he(y, s, p) {
|
|
794
800
|
if (y instanceof t.Name)
|
|
795
|
-
return
|
|
801
|
+
return S(y);
|
|
796
802
|
if (!R(y))
|
|
797
803
|
return y;
|
|
798
|
-
return new t._Code(y._items.reduce((T, z) => (z instanceof t.Name && (z =
|
|
799
|
-
function
|
|
804
|
+
return new t._Code(y._items.reduce((T, z) => (z instanceof t.Name && (z = S(z)), z instanceof t._Code ? T.push(...z._items) : T.push(z), T), []));
|
|
805
|
+
function S(T) {
|
|
800
806
|
const z = p[T.str];
|
|
801
807
|
return z === void 0 || s[T.str] !== 1 ? T : (delete s[T.str], z);
|
|
802
808
|
}
|
|
@@ -1008,13 +1014,13 @@ Q.default = cn;
|
|
|
1008
1014
|
}, e.keyword$DataError = {
|
|
1009
1015
|
message: ({ keyword: g, schemaType: u }) => u ? (0, t.str)`"${g}" keyword must be ${u} ($data)` : (0, t.str)`"${g}" keyword is invalid ($data)`
|
|
1010
1016
|
};
|
|
1011
|
-
function o(g, u = e.keywordError,
|
|
1012
|
-
const { it: D } = g, { gen: F, compositeRule: L, allErrors: H } = D, ae = h(g, u,
|
|
1017
|
+
function o(g, u = e.keywordError, $, C) {
|
|
1018
|
+
const { it: D } = g, { gen: F, compositeRule: L, allErrors: H } = D, ae = h(g, u, $);
|
|
1013
1019
|
C ?? (L || H) ? d(F, ae) : c(D, (0, t._)`[${ae}]`);
|
|
1014
1020
|
}
|
|
1015
1021
|
e.reportError = o;
|
|
1016
|
-
function n(g, u = e.keywordError,
|
|
1017
|
-
const { it: C } = g, { gen: D, compositeRule: F, allErrors: L } = C, H = h(g, u,
|
|
1022
|
+
function n(g, u = e.keywordError, $) {
|
|
1023
|
+
const { it: C } = g, { gen: D, compositeRule: F, allErrors: L } = C, H = h(g, u, $);
|
|
1018
1024
|
d(D, H), F || L || c(C, i.default.vErrors);
|
|
1019
1025
|
}
|
|
1020
1026
|
e.reportExtraError = n;
|
|
@@ -1022,22 +1028,22 @@ Q.default = cn;
|
|
|
1022
1028
|
g.assign(i.default.errors, u), g.if((0, t._)`${i.default.vErrors} !== null`, () => g.if(u, () => g.assign((0, t._)`${i.default.vErrors}.length`, u), () => g.assign(i.default.vErrors, null)));
|
|
1023
1029
|
}
|
|
1024
1030
|
e.resetErrorsCount = a;
|
|
1025
|
-
function l({ gen: g, keyword: u, schemaValue:
|
|
1031
|
+
function l({ gen: g, keyword: u, schemaValue: $, data: C, errsCount: D, it: F }) {
|
|
1026
1032
|
if (D === void 0)
|
|
1027
1033
|
throw new Error("ajv implementation error");
|
|
1028
1034
|
const L = g.name("err");
|
|
1029
1035
|
g.forRange("i", D, i.default.errors, (H) => {
|
|
1030
|
-
g.const(L, (0, t._)`${i.default.vErrors}[${H}]`), g.if((0, t._)`${L}.instancePath === undefined`, () => g.assign((0, t._)`${L}.instancePath`, (0, t.strConcat)(i.default.instancePath, F.errorPath))), g.assign((0, t._)`${L}.schemaPath`, (0, t.str)`${F.errSchemaPath}/${u}`), F.opts.verbose && (g.assign((0, t._)`${L}.schema`,
|
|
1036
|
+
g.const(L, (0, t._)`${i.default.vErrors}[${H}]`), g.if((0, t._)`${L}.instancePath === undefined`, () => g.assign((0, t._)`${L}.instancePath`, (0, t.strConcat)(i.default.instancePath, F.errorPath))), g.assign((0, t._)`${L}.schemaPath`, (0, t.str)`${F.errSchemaPath}/${u}`), F.opts.verbose && (g.assign((0, t._)`${L}.schema`, $), g.assign((0, t._)`${L}.data`, C));
|
|
1031
1037
|
});
|
|
1032
1038
|
}
|
|
1033
1039
|
e.extendErrors = l;
|
|
1034
1040
|
function d(g, u) {
|
|
1035
|
-
const
|
|
1036
|
-
g.if((0, t._)`${i.default.vErrors} === null`, () => g.assign(i.default.vErrors, (0, t._)`[${
|
|
1041
|
+
const $ = g.const("err", u);
|
|
1042
|
+
g.if((0, t._)`${i.default.vErrors} === null`, () => g.assign(i.default.vErrors, (0, t._)`[${$}]`), (0, t._)`${i.default.vErrors}.push(${$})`), g.code((0, t._)`${i.default.errors}++`);
|
|
1037
1043
|
}
|
|
1038
1044
|
function c(g, u) {
|
|
1039
|
-
const { gen:
|
|
1040
|
-
D.$async ?
|
|
1045
|
+
const { gen: $, validateName: C, schemaEnv: D } = g;
|
|
1046
|
+
D.$async ? $.throw((0, t._)`new ${g.ValidationError}(${u})`) : ($.assign((0, t._)`${C}.errors`, u), $.return(!1));
|
|
1041
1047
|
}
|
|
1042
1048
|
const f = {
|
|
1043
1049
|
keyword: new t.Name("keyword"),
|
|
@@ -1049,32 +1055,32 @@ Q.default = cn;
|
|
|
1049
1055
|
schema: new t.Name("schema"),
|
|
1050
1056
|
parentSchema: new t.Name("parentSchema")
|
|
1051
1057
|
};
|
|
1052
|
-
function h(g, u,
|
|
1058
|
+
function h(g, u, $) {
|
|
1053
1059
|
const { createErrors: C } = g.it;
|
|
1054
|
-
return C === !1 ? (0, t._)`{}` : k(g, u,
|
|
1060
|
+
return C === !1 ? (0, t._)`{}` : k(g, u, $);
|
|
1055
1061
|
}
|
|
1056
|
-
function k(g, u,
|
|
1062
|
+
function k(g, u, $ = {}) {
|
|
1057
1063
|
const { gen: C, it: D } = g, F = [
|
|
1058
|
-
|
|
1059
|
-
|
|
1064
|
+
w(D, $),
|
|
1065
|
+
b(g, $)
|
|
1060
1066
|
];
|
|
1061
|
-
return
|
|
1067
|
+
return v(g, u, F), C.object(...F);
|
|
1062
1068
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const
|
|
1065
|
-
return [i.default.instancePath, (0, t.strConcat)(i.default.instancePath,
|
|
1069
|
+
function w({ errorPath: g }, { instancePath: u }) {
|
|
1070
|
+
const $ = u ? (0, t.str)`${g}${(0, r.getErrorPath)(u, r.Type.Str)}` : g;
|
|
1071
|
+
return [i.default.instancePath, (0, t.strConcat)(i.default.instancePath, $)];
|
|
1066
1072
|
}
|
|
1067
|
-
function
|
|
1073
|
+
function b({ keyword: g, it: { errSchemaPath: u } }, { schemaPath: $, parentSchema: C }) {
|
|
1068
1074
|
let D = C ? u : (0, t.str)`${u}/${g}`;
|
|
1069
|
-
return
|
|
1075
|
+
return $ && (D = (0, t.str)`${D}${(0, r.getErrorPath)($, r.Type.Str)}`), [f.schemaPath, D];
|
|
1070
1076
|
}
|
|
1071
|
-
function
|
|
1077
|
+
function v(g, { params: u, message: $ }, C) {
|
|
1072
1078
|
const { keyword: D, data: F, schemaValue: L, it: H } = g, { opts: ae, propertyName: fe, topSchemaRef: ve, schemaPath: We } = H;
|
|
1073
|
-
C.push([f.keyword, D], [f.params, typeof u == "function" ? u(g) : u || (0, t._)`{}`]), ae.messages && C.push([f.message, typeof
|
|
1079
|
+
C.push([f.keyword, D], [f.params, typeof u == "function" ? u(g) : u || (0, t._)`{}`]), ae.messages && C.push([f.message, typeof $ == "function" ? $(g) : $]), ae.verbose && C.push([f.schema, L], [f.parentSchema, (0, t._)`${ve}${We}`], [i.default.data, F]), fe && C.push([f.propertyName, fe]);
|
|
1074
1080
|
}
|
|
1075
1081
|
})(nt);
|
|
1076
|
-
Object.defineProperty(
|
|
1077
|
-
|
|
1082
|
+
Object.defineProperty(Ae, "__esModule", { value: !0 });
|
|
1083
|
+
Ae.boolOrEmptySchema = Ae.topBoolOrEmptySchema = void 0;
|
|
1078
1084
|
const pn = nt, un = E, fn = Q, hn = {
|
|
1079
1085
|
message: "boolean schema is false"
|
|
1080
1086
|
};
|
|
@@ -1082,12 +1088,12 @@ function mn(e) {
|
|
|
1082
1088
|
const { gen: t, schema: r, validateName: i } = e;
|
|
1083
1089
|
r === !1 ? Ji(e, !1) : typeof r == "object" && r.$async === !0 ? t.return(fn.default.data) : (t.assign((0, un._)`${i}.errors`, null), t.return(!0));
|
|
1084
1090
|
}
|
|
1085
|
-
|
|
1091
|
+
Ae.topBoolOrEmptySchema = mn;
|
|
1086
1092
|
function gn(e, t) {
|
|
1087
1093
|
const { gen: r, schema: i } = e;
|
|
1088
1094
|
i === !1 ? (r.var(t, !1), Ji(e)) : r.var(t, !0);
|
|
1089
1095
|
}
|
|
1090
|
-
|
|
1096
|
+
Ae.boolOrEmptySchema = gn;
|
|
1091
1097
|
function Ji(e, t) {
|
|
1092
1098
|
const { gen: r, data: i } = e, o = {
|
|
1093
1099
|
gen: r,
|
|
@@ -1145,10 +1151,10 @@ de.shouldUseRule = Zi;
|
|
|
1145
1151
|
Object.defineProperty(W, "__esModule", { value: !0 });
|
|
1146
1152
|
W.reportTypeError = W.checkDataTypes = W.checkDataType = W.coerceAndCheckDataType = W.getJSONTypes = W.getSchemaTypes = W.DataType = void 0;
|
|
1147
1153
|
const wn = Pe, kn = de, On = nt, x = E, Xi = V;
|
|
1148
|
-
var
|
|
1154
|
+
var Ee;
|
|
1149
1155
|
(function(e) {
|
|
1150
1156
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
1151
|
-
})(
|
|
1157
|
+
})(Ee || (W.DataType = Ee = {}));
|
|
1152
1158
|
function Cn(e) {
|
|
1153
1159
|
const t = Qi(e.type);
|
|
1154
1160
|
if (t.includes("null")) {
|
|
@@ -1172,7 +1178,7 @@ W.getJSONTypes = Qi;
|
|
|
1172
1178
|
function Pn(e, t) {
|
|
1173
1179
|
const { gen: r, data: i, opts: o } = e, n = _n(t, o.coerceTypes), a = t.length > 0 && !(n.length === 0 && t.length === 1 && (0, kn.schemaHasRulesForType)(e, t[0]));
|
|
1174
1180
|
if (a) {
|
|
1175
|
-
const l = pr(t, i, o.strictNumbers,
|
|
1181
|
+
const l = pr(t, i, o.strictNumbers, Ee.Wrong);
|
|
1176
1182
|
r.if(l, () => {
|
|
1177
1183
|
n.length ? Vn(e, t, n) : ur(e);
|
|
1178
1184
|
});
|
|
@@ -1220,8 +1226,8 @@ function Vn(e, t, r) {
|
|
|
1220
1226
|
function Dn({ gen: e, parentData: t, parentDataProperty: r }, i) {
|
|
1221
1227
|
e.if((0, x._)`${t} !== undefined`, () => e.assign((0, x._)`${t}[${r}]`, i));
|
|
1222
1228
|
}
|
|
1223
|
-
function or(e, t, r, i =
|
|
1224
|
-
const o = i ===
|
|
1229
|
+
function or(e, t, r, i = Ee.Correct) {
|
|
1230
|
+
const o = i === Ee.Correct ? x.operators.EQ : x.operators.NEQ;
|
|
1225
1231
|
let n;
|
|
1226
1232
|
switch (e) {
|
|
1227
1233
|
case "null":
|
|
@@ -1241,7 +1247,7 @@ function or(e, t, r, i = Ie.Correct) {
|
|
|
1241
1247
|
default:
|
|
1242
1248
|
return (0, x._)`typeof ${t} ${o} ${e}`;
|
|
1243
1249
|
}
|
|
1244
|
-
return i ===
|
|
1250
|
+
return i === Ee.Correct ? n : (0, x.not)(n);
|
|
1245
1251
|
function a(l = x.nil) {
|
|
1246
1252
|
return (0, x.and)((0, x._)`typeof ${t} == "number"`, l, r ? (0, x._)`isFinite(${t})` : x.nil);
|
|
1247
1253
|
}
|
|
@@ -1289,7 +1295,7 @@ function jn(e) {
|
|
|
1289
1295
|
var Pt = {};
|
|
1290
1296
|
Object.defineProperty(Pt, "__esModule", { value: !0 });
|
|
1291
1297
|
Pt.assignDefaults = void 0;
|
|
1292
|
-
const
|
|
1298
|
+
const je = E, Rn = V;
|
|
1293
1299
|
function Tn(e, t) {
|
|
1294
1300
|
const { properties: r, items: i } = e.schema;
|
|
1295
1301
|
if (t === "object" && r)
|
|
@@ -1302,13 +1308,13 @@ function mi(e, t, r) {
|
|
|
1302
1308
|
const { gen: i, compositeRule: o, data: n, opts: a } = e;
|
|
1303
1309
|
if (r === void 0)
|
|
1304
1310
|
return;
|
|
1305
|
-
const l = (0,
|
|
1311
|
+
const l = (0, je._)`${n}${(0, je.getProperty)(t)}`;
|
|
1306
1312
|
if (o) {
|
|
1307
1313
|
(0, Rn.checkStrictMode)(e, `default is ignored for: ${l}`);
|
|
1308
1314
|
return;
|
|
1309
1315
|
}
|
|
1310
|
-
let d = (0,
|
|
1311
|
-
a.useDefaults === "empty" && (d = (0,
|
|
1316
|
+
let d = (0, je._)`${l} === undefined`;
|
|
1317
|
+
a.useDefaults === "empty" && (d = (0, je._)`${d} || ${l} === null || ${l} === ""`), i.if(d, (0, je._)`${l} = ${(0, je.stringify)(r)}`);
|
|
1312
1318
|
}
|
|
1313
1319
|
var se = {}, A = {};
|
|
1314
1320
|
Object.defineProperty(A, "__esModule", { value: !0 });
|
|
@@ -1441,27 +1447,27 @@ function Kn(e, t) {
|
|
|
1441
1447
|
e.block$data(h, k), e.ok((r = t.valid) !== null && r !== void 0 ? r : h);
|
|
1442
1448
|
function k() {
|
|
1443
1449
|
if (t.errors === !1)
|
|
1444
|
-
|
|
1450
|
+
v(), t.modifying && gi(e), g(() => e.error());
|
|
1445
1451
|
else {
|
|
1446
|
-
const u = t.async ?
|
|
1452
|
+
const u = t.async ? w() : b();
|
|
1447
1453
|
t.modifying && gi(e), g(() => Jn(e, u));
|
|
1448
1454
|
}
|
|
1449
1455
|
}
|
|
1450
|
-
function
|
|
1456
|
+
function w() {
|
|
1451
1457
|
const u = i.let("ruleErrs", null);
|
|
1452
|
-
return i.try(() =>
|
|
1458
|
+
return i.try(() => v((0, Y._)`await `), ($) => i.assign(h, !1).if((0, Y._)`${$} instanceof ${d.ValidationError}`, () => i.assign(u, (0, Y._)`${$}.errors`), () => i.throw($))), u;
|
|
1453
1459
|
}
|
|
1454
|
-
function
|
|
1460
|
+
function b() {
|
|
1455
1461
|
const u = (0, Y._)`${f}.errors`;
|
|
1456
|
-
return i.assign(u, null),
|
|
1462
|
+
return i.assign(u, null), v(Y.nil), u;
|
|
1457
1463
|
}
|
|
1458
|
-
function
|
|
1459
|
-
const
|
|
1460
|
-
i.assign(h, (0, Y._)`${u}${(0, Wn.callValidateCode)(e, f,
|
|
1464
|
+
function v(u = t.async ? (0, Y._)`await ` : Y.nil) {
|
|
1465
|
+
const $ = d.opts.passContext ? we.default.this : we.default.self, C = !("compile" in t && !l || t.schema === !1);
|
|
1466
|
+
i.assign(h, (0, Y._)`${u}${(0, Wn.callValidateCode)(e, f, $, C)}`, t.modifying);
|
|
1461
1467
|
}
|
|
1462
1468
|
function g(u) {
|
|
1463
|
-
var
|
|
1464
|
-
i.if((0, Y.not)((
|
|
1469
|
+
var $;
|
|
1470
|
+
i.if((0, Y.not)(($ = t.valid) !== null && $ !== void 0 ? $ : h), u);
|
|
1465
1471
|
}
|
|
1466
1472
|
}
|
|
1467
1473
|
se.funcKeywordCode = Kn;
|
|
@@ -1643,8 +1649,8 @@ function mt(e, t, r, i, o, n, a, l, d, c) {
|
|
|
1643
1649
|
mt(e, t, r, h[k], o + "/" + f + "/" + k, n, o, f, i, k);
|
|
1644
1650
|
} else if (f in be.propsKeywords) {
|
|
1645
1651
|
if (h && typeof h == "object")
|
|
1646
|
-
for (var
|
|
1647
|
-
mt(e, t, r, h[
|
|
1652
|
+
for (var w in h)
|
|
1653
|
+
mt(e, t, r, h[w], o + "/" + f + "/" + rs(w), n, o, f, i, w);
|
|
1648
1654
|
} else (f in be.keywords || e.allKeys && !(f in be.skipKeywords)) && mt(e, t, r, h, o + "/" + f, n, o, f, i);
|
|
1649
1655
|
}
|
|
1650
1656
|
r(i, o, n, a, l, d, c);
|
|
@@ -1706,7 +1712,7 @@ function ao(e) {
|
|
|
1706
1712
|
return t;
|
|
1707
1713
|
}
|
|
1708
1714
|
function lo(e, t = "", r) {
|
|
1709
|
-
r !== !1 && (t =
|
|
1715
|
+
r !== !1 && (t = xe(t));
|
|
1710
1716
|
const i = e.parse(t);
|
|
1711
1717
|
return co(e, i);
|
|
1712
1718
|
}
|
|
@@ -1716,34 +1722,34 @@ function co(e, t) {
|
|
|
1716
1722
|
}
|
|
1717
1723
|
K._getFullPath = co;
|
|
1718
1724
|
const cs = /#\/?$/;
|
|
1719
|
-
function
|
|
1725
|
+
function xe(e) {
|
|
1720
1726
|
return e ? e.replace(cs, "") : "";
|
|
1721
1727
|
}
|
|
1722
|
-
K.normalizeId =
|
|
1728
|
+
K.normalizeId = xe;
|
|
1723
1729
|
function ps(e, t, r) {
|
|
1724
|
-
return r =
|
|
1730
|
+
return r = xe(r), e.resolve(t, r);
|
|
1725
1731
|
}
|
|
1726
1732
|
K.resolveUrl = ps;
|
|
1727
1733
|
const us = /^[a-z_][-a-z0-9._]*$/i;
|
|
1728
1734
|
function fs(e, t) {
|
|
1729
1735
|
if (typeof e == "boolean")
|
|
1730
1736
|
return {};
|
|
1731
|
-
const { schemaId: r, uriResolver: i } = this.opts, o =
|
|
1732
|
-
return ss(e, { allKeys: !0 }, (h, k,
|
|
1733
|
-
if (
|
|
1737
|
+
const { schemaId: r, uriResolver: i } = this.opts, o = xe(e[r] || t), n = { "": o }, a = lo(i, o, !1), l = {}, d = /* @__PURE__ */ new Set();
|
|
1738
|
+
return ss(e, { allKeys: !0 }, (h, k, w, b) => {
|
|
1739
|
+
if (b === void 0)
|
|
1734
1740
|
return;
|
|
1735
|
-
const
|
|
1736
|
-
let g = n[
|
|
1737
|
-
typeof h[r] == "string" && (g = u.call(this, h[r])),
|
|
1741
|
+
const v = a + k;
|
|
1742
|
+
let g = n[b];
|
|
1743
|
+
typeof h[r] == "string" && (g = u.call(this, h[r])), $.call(this, h.$anchor), $.call(this, h.$dynamicAnchor), n[k] = g;
|
|
1738
1744
|
function u(C) {
|
|
1739
1745
|
const D = this.opts.uriResolver.resolve;
|
|
1740
|
-
if (C =
|
|
1746
|
+
if (C = xe(g ? D(g, C) : C), d.has(C))
|
|
1741
1747
|
throw f(C);
|
|
1742
1748
|
d.add(C);
|
|
1743
1749
|
let F = this.refs[C];
|
|
1744
|
-
return typeof F == "string" && (F = this.refs[F]), typeof F == "object" ? c(h, F.schema, C) : C !==
|
|
1750
|
+
return typeof F == "string" && (F = this.refs[F]), typeof F == "object" ? c(h, F.schema, C) : C !== xe(v) && (C[0] === "#" ? (c(h, l[C], C), l[C] = h) : this.refs[C] = v), C;
|
|
1745
1751
|
}
|
|
1746
|
-
function
|
|
1752
|
+
function $(C) {
|
|
1747
1753
|
if (typeof C == "string") {
|
|
1748
1754
|
if (!us.test(C))
|
|
1749
1755
|
throw new Error(`invalid anchor "${C}"`);
|
|
@@ -1751,9 +1757,9 @@ function fs(e, t) {
|
|
|
1751
1757
|
}
|
|
1752
1758
|
}
|
|
1753
1759
|
}), l;
|
|
1754
|
-
function c(h, k,
|
|
1760
|
+
function c(h, k, w) {
|
|
1755
1761
|
if (k !== void 0 && !ns(h, k))
|
|
1756
|
-
throw f(
|
|
1762
|
+
throw f(w);
|
|
1757
1763
|
}
|
|
1758
1764
|
function f(h) {
|
|
1759
1765
|
return new Error(`reference "${h}" resolves to more than one schema`);
|
|
@@ -1762,7 +1768,7 @@ function fs(e, t) {
|
|
|
1762
1768
|
K.getSchemaRefs = fs;
|
|
1763
1769
|
Object.defineProperty(oe, "__esModule", { value: !0 });
|
|
1764
1770
|
oe.getData = oe.KeywordCxt = oe.validateFunctionCode = void 0;
|
|
1765
|
-
const po =
|
|
1771
|
+
const po = Ae, yi = W, gr = de, St = W, hs = Pt, Xe = se, Jt = $e, j = E, I = Q, ms = K, ce = V, Ke = nt;
|
|
1766
1772
|
function gs(e) {
|
|
1767
1773
|
if (ho(e) && (mo(e), fo(e))) {
|
|
1768
1774
|
$s(e);
|
|
@@ -2142,17 +2148,17 @@ function br(e) {
|
|
|
2142
2148
|
this._compilations.add(e), (0, Ms.validateFunctionCode)(c), a.optimize(this.opts.code.optimize);
|
|
2143
2149
|
const h = a.toString();
|
|
2144
2150
|
f = `${a.scopeRefs(Se.default.scope)}return ${h}`, this.opts.code.process && (f = this.opts.code.process(f, e));
|
|
2145
|
-
const
|
|
2146
|
-
if (this.scope.value(d, { ref:
|
|
2147
|
-
const { props:
|
|
2148
|
-
|
|
2149
|
-
props:
|
|
2150
|
-
items:
|
|
2151
|
-
dynamicProps:
|
|
2152
|
-
dynamicItems:
|
|
2153
|
-
},
|
|
2154
|
-
}
|
|
2155
|
-
return e.validate =
|
|
2151
|
+
const w = new Function(`${Se.default.self}`, `${Se.default.scope}`, f)(this, this.scope.get());
|
|
2152
|
+
if (this.scope.value(d, { ref: w }), w.errors = null, w.schema = e.schema, w.schemaEnv = e, e.$async && (w.$async = !0), this.opts.code.source === !0 && (w.source = { validateName: d, validateCode: h, scopeValues: a._values }), this.opts.unevaluated) {
|
|
2153
|
+
const { props: b, items: v } = c;
|
|
2154
|
+
w.evaluated = {
|
|
2155
|
+
props: b instanceof te.Name ? void 0 : b,
|
|
2156
|
+
items: v instanceof te.Name ? void 0 : v,
|
|
2157
|
+
dynamicProps: b instanceof te.Name,
|
|
2158
|
+
dynamicItems: v instanceof te.Name
|
|
2159
|
+
}, w.source && (w.source.evaluated = (0, te.stringify)(w.evaluated));
|
|
2160
|
+
}
|
|
2161
|
+
return e.validate = w, e;
|
|
2156
2162
|
} catch (h) {
|
|
2157
2163
|
throw delete e.validate, delete e.validateName, f && this.logger.error("Error compiling schema, function code:", f), h;
|
|
2158
2164
|
} finally {
|
|
@@ -2601,15 +2607,15 @@ const { normalizeIPv6: Pa, removeDotSegments: Ye, recomposeAuthority: _a, normal
|
|
|
2601
2607
|
function Ea(e, t) {
|
|
2602
2608
|
return typeof e == "string" ? e = /** @type {T} */
|
|
2603
2609
|
Ma(e, t) : typeof e == "object" && (e = /** @type {T} */
|
|
2604
|
-
|
|
2610
|
+
Ne(_e(e, t), t)), e;
|
|
2605
2611
|
}
|
|
2606
2612
|
function xa(e, t, r) {
|
|
2607
|
-
const i = r ? Object.assign({ scheme: "null" }, r) : { scheme: "null" }, o = Io(
|
|
2613
|
+
const i = r ? Object.assign({ scheme: "null" }, r) : { scheme: "null" }, o = Io(Ne(e, i), Ne(t, i), i, !0);
|
|
2608
2614
|
return i.skipEscape = !0, _e(o, i);
|
|
2609
2615
|
}
|
|
2610
2616
|
function Io(e, t, r, i) {
|
|
2611
2617
|
const o = {};
|
|
2612
|
-
return i || (e =
|
|
2618
|
+
return i || (e = Ne(_e(e, r), r), t = Ne(_e(t, r), r)), r = r || {}, !r.tolerant && t.scheme ? (o.scheme = t.scheme, o.userinfo = t.userinfo, o.host = t.host, o.port = t.port, o.path = Ye(t.path || ""), o.query = t.query) : (t.userinfo !== void 0 || t.host !== void 0 || t.port !== void 0 ? (o.userinfo = t.userinfo, o.host = t.host, o.port = t.port, o.path = Ye(t.path || ""), o.query = t.query) : (t.path ? (t.path[0] === "/" ? o.path = Ye(t.path) : ((e.userinfo !== void 0 || e.host !== void 0 || e.port !== void 0) && !e.path ? o.path = "/" + t.path : e.path ? o.path = e.path.slice(0, e.path.lastIndexOf("/") + 1) + t.path : o.path = t.path, o.path = Ye(o.path)), o.query = t.query) : (o.path = e.path, t.query !== void 0 ? o.query = t.query : o.query = e.query), o.userinfo = e.userinfo, o.host = e.host, o.port = e.port), o.scheme = e.scheme), o.fragment = t.fragment, o;
|
|
2613
2619
|
}
|
|
2614
2620
|
function Aa(e, t, r) {
|
|
2615
2621
|
const i = ki(e, r), o = ki(t, r);
|
|
@@ -2688,7 +2694,7 @@ function Eo(e, t) {
|
|
|
2688
2694
|
i.error = i.error || "URI can not be parsed.";
|
|
2689
2695
|
return { parsed: i, malformedAuthorityOrPort: o };
|
|
2690
2696
|
}
|
|
2691
|
-
function
|
|
2697
|
+
function Ne(e, t) {
|
|
2692
2698
|
return Eo(e, t).parsed;
|
|
2693
2699
|
}
|
|
2694
2700
|
function Ma(e, t) {
|
|
@@ -2716,7 +2722,7 @@ const wr = {
|
|
|
2716
2722
|
resolveComponent: Io,
|
|
2717
2723
|
equal: Aa,
|
|
2718
2724
|
serialize: _e,
|
|
2719
|
-
parse:
|
|
2725
|
+
parse: Ne
|
|
2720
2726
|
};
|
|
2721
2727
|
Dt.exports = wr;
|
|
2722
2728
|
Dt.exports.default = wr;
|
|
@@ -2746,9 +2752,9 @@ $r.default = Ao;
|
|
|
2746
2752
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
2747
2753
|
return r.CodeGen;
|
|
2748
2754
|
} });
|
|
2749
|
-
const i = st, o = Me, n = Pe, a = Z, l = E, d = K, c = W, f = V, h = Xs, k = $r,
|
|
2750
|
-
|
|
2751
|
-
const
|
|
2755
|
+
const i = st, o = Me, n = Pe, a = Z, l = E, d = K, c = W, f = V, h = Xs, k = $r, w = (_, m) => new RegExp(_, m);
|
|
2756
|
+
w.code = "new RegExp";
|
|
2757
|
+
const b = ["removeAdditional", "useDefaults", "coerceTypes"], v = /* @__PURE__ */ new Set([
|
|
2752
2758
|
"validate",
|
|
2753
2759
|
"serialize",
|
|
2754
2760
|
"parse",
|
|
@@ -2782,19 +2788,19 @@ $r.default = Ao;
|
|
|
2782
2788
|
ignoreKeywordsWithRef: "",
|
|
2783
2789
|
jsPropertySyntax: "",
|
|
2784
2790
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
2785
|
-
},
|
|
2791
|
+
}, $ = 200;
|
|
2786
2792
|
function C(_) {
|
|
2787
|
-
var m, O, y, s, p,
|
|
2788
|
-
const Ge = _.strict, Kt = (m = _.code) === null || m === void 0 ? void 0 : m.optimize, pi = Kt === !0 || Kt === void 0 ? 1 : Kt || 0, ui = (y = (O = _.code) === null || O === void 0 ? void 0 : O.regExp) !== null && y !== void 0 ? y :
|
|
2793
|
+
var m, O, y, s, p, S, R, T, z, N, U, Fe, Et, xt, At, Nt, zt, Mt, Lt, Bt, qt, Ht, Wt, Ut, Gt;
|
|
2794
|
+
const Ge = _.strict, Kt = (m = _.code) === null || m === void 0 ? void 0 : m.optimize, pi = Kt === !0 || Kt === void 0 ? 1 : Kt || 0, ui = (y = (O = _.code) === null || O === void 0 ? void 0 : O.regExp) !== null && y !== void 0 ? y : w, Jo = (s = _.uriResolver) !== null && s !== void 0 ? s : k.default;
|
|
2789
2795
|
return {
|
|
2790
|
-
strictSchema: (
|
|
2796
|
+
strictSchema: (S = (p = _.strictSchema) !== null && p !== void 0 ? p : Ge) !== null && S !== void 0 ? S : !0,
|
|
2791
2797
|
strictNumbers: (T = (R = _.strictNumbers) !== null && R !== void 0 ? R : Ge) !== null && T !== void 0 ? T : !0,
|
|
2792
2798
|
strictTypes: (N = (z = _.strictTypes) !== null && z !== void 0 ? z : Ge) !== null && N !== void 0 ? N : "log",
|
|
2793
|
-
strictTuples: (
|
|
2799
|
+
strictTuples: (Fe = (U = _.strictTuples) !== null && U !== void 0 ? U : Ge) !== null && Fe !== void 0 ? Fe : "log",
|
|
2794
2800
|
strictRequired: (xt = (Et = _.strictRequired) !== null && Et !== void 0 ? Et : Ge) !== null && xt !== void 0 ? xt : !1,
|
|
2795
2801
|
code: _.code ? { ..._.code, optimize: pi, regExp: ui } : { optimize: pi, regExp: ui },
|
|
2796
|
-
loopRequired: (At = _.loopRequired) !== null && At !== void 0 ? At :
|
|
2797
|
-
loopEnum: (Nt = _.loopEnum) !== null && Nt !== void 0 ? Nt :
|
|
2802
|
+
loopRequired: (At = _.loopRequired) !== null && At !== void 0 ? At : $,
|
|
2803
|
+
loopEnum: (Nt = _.loopEnum) !== null && Nt !== void 0 ? Nt : $,
|
|
2798
2804
|
meta: (zt = _.meta) !== null && zt !== void 0 ? zt : !0,
|
|
2799
2805
|
messages: (Mt = _.messages) !== null && Mt !== void 0 ? Mt : !0,
|
|
2800
2806
|
inlineRefs: (Lt = _.inlineRefs) !== null && Lt !== void 0 ? Lt : !0,
|
|
@@ -2811,7 +2817,7 @@ $r.default = Ao;
|
|
|
2811
2817
|
constructor(m = {}) {
|
|
2812
2818
|
this.schemas = {}, this.refs = {}, this.formats = /* @__PURE__ */ Object.create(null), this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), m = this.opts = { ...m, ...C(m) };
|
|
2813
2819
|
const { es5: O, lines: y } = this.opts.code;
|
|
2814
|
-
this.scope = new l.ValueScope({ scope: {}, prefixes:
|
|
2820
|
+
this.scope = new l.ValueScope({ scope: {}, prefixes: v, es5: O, lines: y }), this.logger = le(m.logger);
|
|
2815
2821
|
const s = m.validateFormats;
|
|
2816
2822
|
m.validateFormats = !1, this.RULES = (0, n.getRules)(), F.call(this, g, m, "NOT SUPPORTED"), F.call(this, u, m, "DEPRECATED", "warn"), this._metaOpts = ve.call(this), m.formats && ae.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), m.keywords && fe.call(this, m.keywords), typeof m.meta == "object" && this.addMetaSchema(m.meta), H.call(this), m.validateFormats = s;
|
|
2817
2823
|
}
|
|
@@ -2848,19 +2854,19 @@ $r.default = Ao;
|
|
|
2848
2854
|
return s.call(this, m, O);
|
|
2849
2855
|
async function s(N, U) {
|
|
2850
2856
|
await p.call(this, N.$schema);
|
|
2851
|
-
const
|
|
2852
|
-
return
|
|
2857
|
+
const Fe = this._addSchema(N, U);
|
|
2858
|
+
return Fe.validate || S.call(this, Fe);
|
|
2853
2859
|
}
|
|
2854
2860
|
async function p(N) {
|
|
2855
2861
|
N && !this.getSchema(N) && await s.call(this, { $ref: N }, !0);
|
|
2856
2862
|
}
|
|
2857
|
-
async function
|
|
2863
|
+
async function S(N) {
|
|
2858
2864
|
try {
|
|
2859
2865
|
return this._compileSchemaEnv(N);
|
|
2860
2866
|
} catch (U) {
|
|
2861
2867
|
if (!(U instanceof o.default))
|
|
2862
2868
|
throw U;
|
|
2863
|
-
return R.call(this, U), await T.call(this, U.missingSchema),
|
|
2869
|
+
return R.call(this, U), await T.call(this, U.missingSchema), S.call(this, N);
|
|
2864
2870
|
}
|
|
2865
2871
|
}
|
|
2866
2872
|
function R({ missingSchema: N, missingRef: U }) {
|
|
@@ -2885,15 +2891,15 @@ $r.default = Ao;
|
|
|
2885
2891
|
// Adds schema to the instance
|
|
2886
2892
|
addSchema(m, O, y, s = this.opts.validateSchema) {
|
|
2887
2893
|
if (Array.isArray(m)) {
|
|
2888
|
-
for (const
|
|
2889
|
-
this.addSchema(
|
|
2894
|
+
for (const S of m)
|
|
2895
|
+
this.addSchema(S, void 0, y, s);
|
|
2890
2896
|
return this;
|
|
2891
2897
|
}
|
|
2892
2898
|
let p;
|
|
2893
2899
|
if (typeof m == "object") {
|
|
2894
|
-
const { schemaId:
|
|
2895
|
-
if (p = m[
|
|
2896
|
-
throw new Error(`schema ${
|
|
2900
|
+
const { schemaId: S } = this.opts;
|
|
2901
|
+
if (p = m[S], p !== void 0 && typeof p != "string")
|
|
2902
|
+
throw new Error(`schema ${S} must be string`);
|
|
2897
2903
|
}
|
|
2898
2904
|
return O = (0, d.normalizeId)(O || p), this._checkUnique(O), this.schemas[O] = this._addSchema(m, y, O, s, !0), this;
|
|
2899
2905
|
}
|
|
@@ -2982,7 +2988,7 @@ $r.default = Ao;
|
|
|
2982
2988
|
type: (0, c.getJSONTypes)(O.type),
|
|
2983
2989
|
schemaType: (0, c.getJSONTypes)(O.schemaType)
|
|
2984
2990
|
};
|
|
2985
|
-
return (0, f.eachItem)(y, s.type.length === 0 ? (p) => Ue.call(this, p, s) : (p) => s.type.forEach((
|
|
2991
|
+
return (0, f.eachItem)(y, s.type.length === 0 ? (p) => Ue.call(this, p, s) : (p) => s.type.forEach((S) => Ue.call(this, p, s, S))), this;
|
|
2986
2992
|
}
|
|
2987
2993
|
getKeyword(m) {
|
|
2988
2994
|
const O = this.RULES.all[m];
|
|
@@ -3010,15 +3016,15 @@ $r.default = Ao;
|
|
|
3010
3016
|
m = JSON.parse(JSON.stringify(m));
|
|
3011
3017
|
for (const s of O) {
|
|
3012
3018
|
const p = s.split("/").slice(1);
|
|
3013
|
-
let
|
|
3019
|
+
let S = m;
|
|
3014
3020
|
for (const R of p)
|
|
3015
|
-
|
|
3021
|
+
S = S[R];
|
|
3016
3022
|
for (const R in y) {
|
|
3017
3023
|
const T = y[R];
|
|
3018
3024
|
if (typeof T != "object")
|
|
3019
3025
|
continue;
|
|
3020
|
-
const { $data: z } = T.definition, N =
|
|
3021
|
-
z && N && (
|
|
3026
|
+
const { $data: z } = T.definition, N = S[R];
|
|
3027
|
+
z && N && (S[R] = dt(N));
|
|
3022
3028
|
}
|
|
3023
3029
|
}
|
|
3024
3030
|
return m;
|
|
@@ -3030,10 +3036,10 @@ $r.default = Ao;
|
|
|
3030
3036
|
}
|
|
3031
3037
|
}
|
|
3032
3038
|
_addSchema(m, O, y, s = this.opts.validateSchema, p = this.opts.addUsedSchema) {
|
|
3033
|
-
let
|
|
3039
|
+
let S;
|
|
3034
3040
|
const { schemaId: R } = this.opts;
|
|
3035
3041
|
if (typeof m == "object")
|
|
3036
|
-
|
|
3042
|
+
S = m[R];
|
|
3037
3043
|
else {
|
|
3038
3044
|
if (this.opts.jtd)
|
|
3039
3045
|
throw new Error("schema must be object");
|
|
@@ -3043,7 +3049,7 @@ $r.default = Ao;
|
|
|
3043
3049
|
let T = this._cache.get(m);
|
|
3044
3050
|
if (T !== void 0)
|
|
3045
3051
|
return T;
|
|
3046
|
-
y = (0, d.normalizeId)(
|
|
3052
|
+
y = (0, d.normalizeId)(S || y);
|
|
3047
3053
|
const z = d.getSchemaRefs.call(this, m, y);
|
|
3048
3054
|
return T = new a.SchemaEnv({ schema: m, schemaId: R, meta: O, baseId: y, localRefs: z }), this._cache.set(T.schema, T), p && !y.startsWith("#") && (y && this._checkUnique(y), this.refs[y] = T), s && this.validateSchema(m, !0), T;
|
|
3049
3055
|
}
|
|
@@ -3104,7 +3110,7 @@ $r.default = Ao;
|
|
|
3104
3110
|
}
|
|
3105
3111
|
function ve() {
|
|
3106
3112
|
const _ = { ...this.opts };
|
|
3107
|
-
for (const m of
|
|
3113
|
+
for (const m of b)
|
|
3108
3114
|
delete _[m];
|
|
3109
3115
|
return _;
|
|
3110
3116
|
}
|
|
@@ -3121,13 +3127,13 @@ $r.default = Ao;
|
|
|
3121
3127
|
return _;
|
|
3122
3128
|
throw new Error("logger must implement log, warn and error methods");
|
|
3123
3129
|
}
|
|
3124
|
-
const
|
|
3130
|
+
const De = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
3125
3131
|
function he(_, m) {
|
|
3126
3132
|
const { RULES: O } = this;
|
|
3127
3133
|
if ((0, f.eachItem)(_, (y) => {
|
|
3128
3134
|
if (O.keywords[y])
|
|
3129
3135
|
throw new Error(`Keyword ${y} is already defined`);
|
|
3130
|
-
if (!
|
|
3136
|
+
if (!De.test(y))
|
|
3131
3137
|
throw new Error(`Keyword ${y} has invalid name`);
|
|
3132
3138
|
}), !!m && m.$data && !("code" in m || "validate" in m))
|
|
3133
3139
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
@@ -3138,8 +3144,8 @@ $r.default = Ao;
|
|
|
3138
3144
|
if (O && s)
|
|
3139
3145
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
3140
3146
|
const { RULES: p } = this;
|
|
3141
|
-
let
|
|
3142
|
-
if (
|
|
3147
|
+
let S = s ? p.post : p.rules.find(({ type: T }) => T === O);
|
|
3148
|
+
if (S || (S = { type: O, rules: [] }, p.rules.push(S)), p.keywords[_] = !0, !m)
|
|
3143
3149
|
return;
|
|
3144
3150
|
const R = {
|
|
3145
3151
|
keyword: _,
|
|
@@ -3149,7 +3155,7 @@ $r.default = Ao;
|
|
|
3149
3155
|
schemaType: (0, c.getJSONTypes)(m.schemaType)
|
|
3150
3156
|
}
|
|
3151
3157
|
};
|
|
3152
|
-
m.before ? lt.call(this,
|
|
3158
|
+
m.before ? lt.call(this, S, R, m.before) : S.rules.push(R), p.all[_] = R, (y = m.implements) === null || y === void 0 || y.forEach((T) => this.addKeyword(T));
|
|
3153
3159
|
}
|
|
3154
3160
|
function lt(_, m, O) {
|
|
3155
3161
|
const y = _.rules.findIndex((s) => s.keyword === O);
|
|
@@ -3178,7 +3184,7 @@ Cr.default = Ba;
|
|
|
3178
3184
|
var ue = {};
|
|
3179
3185
|
Object.defineProperty(ue, "__esModule", { value: !0 });
|
|
3180
3186
|
ue.callRef = ue.getValidate = void 0;
|
|
3181
|
-
const qa = Me, Oi = A, X = E,
|
|
3187
|
+
const qa = Me, Oi = A, X = E, Re = Q, Ci = Z, ct = V, Ha = {
|
|
3182
3188
|
keyword: "$ref",
|
|
3183
3189
|
schemaType: "string",
|
|
3184
3190
|
code(e) {
|
|
@@ -3190,23 +3196,23 @@ const qa = Me, Oi = A, X = E, je = Q, Ci = Z, ct = V, Ha = {
|
|
|
3190
3196
|
throw new qa.default(i.opts.uriResolver, o, r);
|
|
3191
3197
|
if (f instanceof Ci.SchemaEnv)
|
|
3192
3198
|
return k(f);
|
|
3193
|
-
return
|
|
3199
|
+
return w(f);
|
|
3194
3200
|
function h() {
|
|
3195
3201
|
if (n === c)
|
|
3196
3202
|
return yt(e, a, n, n.$async);
|
|
3197
|
-
const
|
|
3198
|
-
return yt(e, (0, X._)`${
|
|
3203
|
+
const b = t.scopeValue("root", { ref: c });
|
|
3204
|
+
return yt(e, (0, X._)`${b}.validate`, c, c.$async);
|
|
3199
3205
|
}
|
|
3200
|
-
function k(
|
|
3201
|
-
const
|
|
3202
|
-
yt(e,
|
|
3206
|
+
function k(b) {
|
|
3207
|
+
const v = No(e, b);
|
|
3208
|
+
yt(e, v, b, b.$async);
|
|
3203
3209
|
}
|
|
3204
|
-
function
|
|
3205
|
-
const
|
|
3206
|
-
schema:
|
|
3210
|
+
function w(b) {
|
|
3211
|
+
const v = t.scopeValue("schema", l.code.source === !0 ? { ref: b, code: (0, X.stringify)(b) } : { ref: b }), g = t.name("valid"), u = e.subschema({
|
|
3212
|
+
schema: b,
|
|
3207
3213
|
dataTypes: [],
|
|
3208
3214
|
schemaPath: X.nil,
|
|
3209
|
-
topSchemaRef:
|
|
3215
|
+
topSchemaRef: v,
|
|
3210
3216
|
errSchemaPath: r
|
|
3211
3217
|
}, g);
|
|
3212
3218
|
e.mergeEvaluated(u), e.ok(g);
|
|
@@ -3219,42 +3225,42 @@ function No(e, t) {
|
|
|
3219
3225
|
}
|
|
3220
3226
|
ue.getValidate = No;
|
|
3221
3227
|
function yt(e, t, r, i) {
|
|
3222
|
-
const { gen: o, it: n } = e, { allErrors: a, schemaEnv: l, opts: d } = n, c = d.passContext ?
|
|
3228
|
+
const { gen: o, it: n } = e, { allErrors: a, schemaEnv: l, opts: d } = n, c = d.passContext ? Re.default.this : X.nil;
|
|
3223
3229
|
i ? f() : h();
|
|
3224
3230
|
function f() {
|
|
3225
3231
|
if (!l.$async)
|
|
3226
3232
|
throw new Error("async schema referenced by sync schema");
|
|
3227
|
-
const
|
|
3233
|
+
const b = o.let("valid");
|
|
3228
3234
|
o.try(() => {
|
|
3229
|
-
o.code((0, X._)`await ${(0, Oi.callValidateCode)(e, t, c)}`),
|
|
3230
|
-
}, (
|
|
3231
|
-
o.if((0, X._)`!(${
|
|
3232
|
-
}), e.ok(
|
|
3235
|
+
o.code((0, X._)`await ${(0, Oi.callValidateCode)(e, t, c)}`), w(t), a || o.assign(b, !0);
|
|
3236
|
+
}, (v) => {
|
|
3237
|
+
o.if((0, X._)`!(${v} instanceof ${n.ValidationError})`, () => o.throw(v)), k(v), a || o.assign(b, !1);
|
|
3238
|
+
}), e.ok(b);
|
|
3233
3239
|
}
|
|
3234
3240
|
function h() {
|
|
3235
|
-
e.result((0, Oi.callValidateCode)(e, t, c), () =>
|
|
3241
|
+
e.result((0, Oi.callValidateCode)(e, t, c), () => w(t), () => k(t));
|
|
3236
3242
|
}
|
|
3237
|
-
function k(
|
|
3238
|
-
const
|
|
3239
|
-
o.assign(
|
|
3243
|
+
function k(b) {
|
|
3244
|
+
const v = (0, X._)`${b}.errors`;
|
|
3245
|
+
o.assign(Re.default.vErrors, (0, X._)`${Re.default.vErrors} === null ? ${v} : ${Re.default.vErrors}.concat(${v})`), o.assign(Re.default.errors, (0, X._)`${Re.default.vErrors}.length`);
|
|
3240
3246
|
}
|
|
3241
|
-
function
|
|
3242
|
-
var
|
|
3247
|
+
function w(b) {
|
|
3248
|
+
var v;
|
|
3243
3249
|
if (!n.opts.unevaluated)
|
|
3244
3250
|
return;
|
|
3245
|
-
const g = (
|
|
3251
|
+
const g = (v = r == null ? void 0 : r.validate) === null || v === void 0 ? void 0 : v.evaluated;
|
|
3246
3252
|
if (n.props !== !0)
|
|
3247
3253
|
if (g && !g.dynamicProps)
|
|
3248
3254
|
g.props !== void 0 && (n.props = ct.mergeEvaluated.props(o, g.props, n.props));
|
|
3249
3255
|
else {
|
|
3250
|
-
const u = o.var("props", (0, X._)`${
|
|
3256
|
+
const u = o.var("props", (0, X._)`${b}.evaluated.props`);
|
|
3251
3257
|
n.props = ct.mergeEvaluated.props(o, u, n.props, X.Name);
|
|
3252
3258
|
}
|
|
3253
3259
|
if (n.items !== !0)
|
|
3254
3260
|
if (g && !g.dynamicItems)
|
|
3255
3261
|
g.items !== void 0 && (n.items = ct.mergeEvaluated.items(o, g.items, n.items));
|
|
3256
3262
|
else {
|
|
3257
|
-
const u = o.var("items", (0, X._)`${
|
|
3263
|
+
const u = o.var("items", (0, X._)`${b}.evaluated.items`);
|
|
3258
3264
|
n.items = ct.mergeEvaluated.items(o, u, n.items, X.Name);
|
|
3259
3265
|
}
|
|
3260
3266
|
}
|
|
@@ -3344,9 +3350,9 @@ const ke = E, Xa = V, Qa = Fr, el = {
|
|
|
3344
3350
|
Dr.default = tl;
|
|
3345
3351
|
var jr = {};
|
|
3346
3352
|
Object.defineProperty(jr, "__esModule", { value: !0 });
|
|
3347
|
-
const rl = A, il = V,
|
|
3348
|
-
message: ({ schemaCode: e }) => (0,
|
|
3349
|
-
params: ({ schemaCode: e }) => (0,
|
|
3353
|
+
const rl = A, il = V, Ie = E, ol = {
|
|
3354
|
+
message: ({ schemaCode: e }) => (0, Ie.str)`must match pattern "${e}"`,
|
|
3355
|
+
params: ({ schemaCode: e }) => (0, Ie._)`{pattern: ${e}}`
|
|
3350
3356
|
}, nl = {
|
|
3351
3357
|
keyword: "pattern",
|
|
3352
3358
|
type: "string",
|
|
@@ -3356,11 +3362,11 @@ const rl = A, il = V, Te = E, ol = {
|
|
|
3356
3362
|
code(e) {
|
|
3357
3363
|
const { gen: t, data: r, $data: i, schema: o, schemaCode: n, it: a } = e, l = a.opts.unicodeRegExp ? "u" : "";
|
|
3358
3364
|
if (i) {
|
|
3359
|
-
const { regExp: d } = a.opts.code, c = d.code === "new RegExp" ? (0,
|
|
3360
|
-
t.try(() => t.assign(f, (0,
|
|
3365
|
+
const { regExp: d } = a.opts.code, c = d.code === "new RegExp" ? (0, Ie._)`new RegExp` : (0, il.useFunc)(t, d), f = t.let("valid");
|
|
3366
|
+
t.try(() => t.assign(f, (0, Ie._)`${c}(${n}, ${l}).test(${r})`), () => t.assign(f, !1)), e.fail$data((0, Ie._)`!${f}`);
|
|
3361
3367
|
} else {
|
|
3362
3368
|
const d = (0, rl.usePattern)(e, o);
|
|
3363
|
-
e.fail$data((0,
|
|
3369
|
+
e.fail$data((0, Ie._)`!${d}.test(${r})`);
|
|
3364
3370
|
}
|
|
3365
3371
|
}
|
|
3366
3372
|
};
|
|
@@ -3402,10 +3408,10 @@ const Je = A, tt = E, ll = V, dl = {
|
|
|
3402
3408
|
return;
|
|
3403
3409
|
const d = r.length >= l.loopRequired;
|
|
3404
3410
|
if (a.allErrors ? c() : f(), l.strictRequired) {
|
|
3405
|
-
const
|
|
3406
|
-
for (const
|
|
3407
|
-
if ((
|
|
3408
|
-
const g = a.schemaEnv.baseId + a.errSchemaPath, u = `required property "${
|
|
3411
|
+
const w = e.parentSchema.properties, { definedProperties: b } = e.it;
|
|
3412
|
+
for (const v of r)
|
|
3413
|
+
if ((w == null ? void 0 : w[v]) === void 0 && !b.has(v)) {
|
|
3414
|
+
const g = a.schemaEnv.baseId + a.errSchemaPath, u = `required property "${v}" is not defined at "${g}" (strictRequired)`;
|
|
3409
3415
|
(0, ll.checkStrictMode)(a, u, a.opts.strictRequired);
|
|
3410
3416
|
}
|
|
3411
3417
|
}
|
|
@@ -3413,25 +3419,25 @@ const Je = A, tt = E, ll = V, dl = {
|
|
|
3413
3419
|
if (d || n)
|
|
3414
3420
|
e.block$data(tt.nil, h);
|
|
3415
3421
|
else
|
|
3416
|
-
for (const
|
|
3417
|
-
(0, Je.checkReportMissingProp)(e,
|
|
3422
|
+
for (const w of r)
|
|
3423
|
+
(0, Je.checkReportMissingProp)(e, w);
|
|
3418
3424
|
}
|
|
3419
3425
|
function f() {
|
|
3420
|
-
const
|
|
3426
|
+
const w = t.let("missing");
|
|
3421
3427
|
if (d || n) {
|
|
3422
|
-
const
|
|
3423
|
-
e.block$data(
|
|
3428
|
+
const b = t.let("valid", !0);
|
|
3429
|
+
e.block$data(b, () => k(w, b)), e.ok(b);
|
|
3424
3430
|
} else
|
|
3425
|
-
t.if((0, Je.checkMissingProp)(e, r,
|
|
3431
|
+
t.if((0, Je.checkMissingProp)(e, r, w)), (0, Je.reportMissingProp)(e, w), t.else();
|
|
3426
3432
|
}
|
|
3427
3433
|
function h() {
|
|
3428
|
-
t.forOf("prop", i, (
|
|
3429
|
-
e.setParams({ missingProperty:
|
|
3434
|
+
t.forOf("prop", i, (w) => {
|
|
3435
|
+
e.setParams({ missingProperty: w }), t.if((0, Je.noPropertyInData)(t, o, w, l.ownProperties), () => e.error());
|
|
3430
3436
|
});
|
|
3431
3437
|
}
|
|
3432
|
-
function k(
|
|
3433
|
-
e.setParams({ missingProperty:
|
|
3434
|
-
t.assign(
|
|
3438
|
+
function k(w, b) {
|
|
3439
|
+
e.setParams({ missingProperty: w }), t.forOf(w, i, () => {
|
|
3440
|
+
t.assign(b, (0, Je.propertyInData)(t, o, w, l.ownProperties)), t.if((0, tt.not)(b), () => {
|
|
3435
3441
|
e.error(), t.break();
|
|
3436
3442
|
});
|
|
3437
3443
|
}, tt.nil);
|
|
@@ -3481,23 +3487,23 @@ const Xt = W, G = E, fl = V, hl = at, ml = {
|
|
|
3481
3487
|
const d = t.let("valid"), c = n.items ? (0, Xt.getSchemaTypes)(n.items) : [];
|
|
3482
3488
|
e.block$data(d, f, (0, G._)`${a} === false`), e.ok(d);
|
|
3483
3489
|
function f() {
|
|
3484
|
-
const
|
|
3485
|
-
e.setParams({ i:
|
|
3490
|
+
const b = t.let("i", (0, G._)`${r}.length`), v = t.let("j");
|
|
3491
|
+
e.setParams({ i: b, j: v }), t.assign(d, !0), t.if((0, G._)`${b} > 1`, () => (h() ? k : w)(b, v));
|
|
3486
3492
|
}
|
|
3487
3493
|
function h() {
|
|
3488
|
-
return c.length > 0 && !c.some((
|
|
3489
|
-
}
|
|
3490
|
-
function k(
|
|
3491
|
-
const g = t.name("item"), u = (0, Xt.checkDataTypes)(c, g, l.opts.strictNumbers, Xt.DataType.Wrong),
|
|
3492
|
-
t.for((0, G._)`;${
|
|
3493
|
-
t.let(g, (0, G._)`${r}[${
|
|
3494
|
-
t.assign(
|
|
3495
|
-
}).code((0, G._)`${
|
|
3494
|
+
return c.length > 0 && !c.some((b) => b === "object" || b === "array");
|
|
3495
|
+
}
|
|
3496
|
+
function k(b, v) {
|
|
3497
|
+
const g = t.name("item"), u = (0, Xt.checkDataTypes)(c, g, l.opts.strictNumbers, Xt.DataType.Wrong), $ = t.const("indices", (0, G._)`{}`);
|
|
3498
|
+
t.for((0, G._)`;${b}--;`, () => {
|
|
3499
|
+
t.let(g, (0, G._)`${r}[${b}]`), t.if(u, (0, G._)`continue`), c.length > 1 && t.if((0, G._)`typeof ${g} == "string"`, (0, G._)`${g} += "_"`), t.if((0, G._)`typeof ${$}[${g}] == "number"`, () => {
|
|
3500
|
+
t.assign(v, (0, G._)`${$}[${g}]`), e.error(), t.assign(d, !1).break();
|
|
3501
|
+
}).code((0, G._)`${$}[${g}] = ${b}`);
|
|
3496
3502
|
});
|
|
3497
3503
|
}
|
|
3498
|
-
function
|
|
3504
|
+
function w(b, v) {
|
|
3499
3505
|
const g = (0, fl.useFunc)(t, hl.default), u = t.name("outer");
|
|
3500
|
-
t.label(u).for((0, G._)`;${
|
|
3506
|
+
t.label(u).for((0, G._)`;${b}--;`, () => t.for((0, G._)`${v} = ${b}; ${v}--;`, () => t.if((0, G._)`${g}(${r}[${b}], ${r}[${v}])`, () => {
|
|
3501
3507
|
e.error(), t.assign(d, !1).break(u);
|
|
3502
3508
|
})));
|
|
3503
3509
|
}
|
|
@@ -3542,16 +3548,16 @@ const Ze = E, Sl = V, wl = at, kl = {
|
|
|
3542
3548
|
else {
|
|
3543
3549
|
if (!Array.isArray(o))
|
|
3544
3550
|
throw new Error("ajv implementation error");
|
|
3545
|
-
const
|
|
3546
|
-
f = (0, Ze.or)(...o.map((
|
|
3551
|
+
const w = t.const("vSchema", n);
|
|
3552
|
+
f = (0, Ze.or)(...o.map((b, v) => k(w, v)));
|
|
3547
3553
|
}
|
|
3548
3554
|
e.pass(f);
|
|
3549
3555
|
function h() {
|
|
3550
|
-
t.assign(f, !1), t.forOf("v", n, (
|
|
3556
|
+
t.assign(f, !1), t.forOf("v", n, (w) => t.if((0, Ze._)`${c()}(${r}, ${w})`, () => t.assign(f, !0).break()));
|
|
3551
3557
|
}
|
|
3552
|
-
function k(
|
|
3553
|
-
const
|
|
3554
|
-
return typeof
|
|
3558
|
+
function k(w, b) {
|
|
3559
|
+
const v = o[b];
|
|
3560
|
+
return typeof v == "object" && v !== null ? (0, Ze._)`${c()}(${r}, ${w}[${b}])` : (0, Ze._)`${r} === ${v}`;
|
|
3555
3561
|
}
|
|
3556
3562
|
}
|
|
3557
3563
|
};
|
|
@@ -3643,9 +3649,9 @@ function Bo(e, t, r = e.schema) {
|
|
|
3643
3649
|
}, d)), e.ok(d));
|
|
3644
3650
|
});
|
|
3645
3651
|
function f(h) {
|
|
3646
|
-
const { opts: k, errSchemaPath:
|
|
3647
|
-
if (k.strictTuples && !
|
|
3648
|
-
const g = `"${a}" is ${
|
|
3652
|
+
const { opts: k, errSchemaPath: w } = l, b = r.length, v = b === h.minItems && (b === h.maxItems || h[t] === !1);
|
|
3653
|
+
if (k.strictTuples && !v) {
|
|
3654
|
+
const g = `"${a}" is ${b}-tuple, but minItems or maxItems/${t} are not specified or different at path "${w}"`;
|
|
3649
3655
|
(0, bt.checkStrictMode)(l, g, k.strictTuples);
|
|
3650
3656
|
}
|
|
3651
3657
|
}
|
|
@@ -3705,29 +3711,29 @@ const ee = E, pt = V, Gl = {
|
|
|
3705
3711
|
return;
|
|
3706
3712
|
}
|
|
3707
3713
|
if ((0, pt.alwaysValidSchema)(n, r)) {
|
|
3708
|
-
let
|
|
3709
|
-
l !== void 0 && (
|
|
3714
|
+
let v = (0, ee._)`${f} >= ${a}`;
|
|
3715
|
+
l !== void 0 && (v = (0, ee._)`${v} && ${f} <= ${l}`), e.pass(v);
|
|
3710
3716
|
return;
|
|
3711
3717
|
}
|
|
3712
3718
|
n.items = !0;
|
|
3713
3719
|
const h = t.name("valid");
|
|
3714
|
-
l === void 0 && a === 1 ?
|
|
3720
|
+
l === void 0 && a === 1 ? w(h, () => t.if(h, () => t.break())) : a === 0 ? (t.let(h, !0), l !== void 0 && t.if((0, ee._)`${o}.length > 0`, k)) : (t.let(h, !1), k()), e.result(h, () => e.reset());
|
|
3715
3721
|
function k() {
|
|
3716
|
-
const
|
|
3717
|
-
|
|
3722
|
+
const v = t.name("_valid"), g = t.let("count", 0);
|
|
3723
|
+
w(v, () => t.if(v, () => b(g)));
|
|
3718
3724
|
}
|
|
3719
|
-
function
|
|
3725
|
+
function w(v, g) {
|
|
3720
3726
|
t.forRange("i", 0, f, (u) => {
|
|
3721
3727
|
e.subschema({
|
|
3722
3728
|
keyword: "contains",
|
|
3723
3729
|
dataProp: u,
|
|
3724
3730
|
dataPropType: pt.Type.Num,
|
|
3725
3731
|
compositeRule: !0
|
|
3726
|
-
},
|
|
3732
|
+
}, v), g();
|
|
3727
3733
|
});
|
|
3728
3734
|
}
|
|
3729
|
-
function
|
|
3730
|
-
t.code((0, ee._)`${
|
|
3735
|
+
function b(v) {
|
|
3736
|
+
t.code((0, ee._)`${v}++`), l === void 0 ? t.if((0, ee._)`${v} >= ${a}`, () => t.assign(h, !0).break()) : (t.if((0, ee._)`${v} > ${l}`, () => t.assign(h, !1).break()), a === 1 ? t.assign(h, !0) : t.if((0, ee._)`${v} >= ${a}`, () => t.assign(h, !0)));
|
|
3731
3737
|
}
|
|
3732
3738
|
}
|
|
3733
3739
|
};
|
|
@@ -3771,35 +3777,35 @@ var Ft = {};
|
|
|
3771
3777
|
const { gen: f, data: h, it: k } = d;
|
|
3772
3778
|
if (Object.keys(c).length === 0)
|
|
3773
3779
|
return;
|
|
3774
|
-
const
|
|
3775
|
-
for (const
|
|
3776
|
-
const
|
|
3777
|
-
if (
|
|
3780
|
+
const w = f.let("missing");
|
|
3781
|
+
for (const b in c) {
|
|
3782
|
+
const v = c[b];
|
|
3783
|
+
if (v.length === 0)
|
|
3778
3784
|
continue;
|
|
3779
|
-
const g = (0, i.propertyInData)(f, h,
|
|
3785
|
+
const g = (0, i.propertyInData)(f, h, b, k.opts.ownProperties);
|
|
3780
3786
|
d.setParams({
|
|
3781
|
-
property:
|
|
3782
|
-
depsCount:
|
|
3783
|
-
deps:
|
|
3787
|
+
property: b,
|
|
3788
|
+
depsCount: v.length,
|
|
3789
|
+
deps: v.join(", ")
|
|
3784
3790
|
}), k.allErrors ? f.if(g, () => {
|
|
3785
|
-
for (const u of
|
|
3791
|
+
for (const u of v)
|
|
3786
3792
|
(0, i.checkReportMissingProp)(d, u);
|
|
3787
|
-
}) : (f.if((0, t._)`${g} && (${(0, i.checkMissingProp)(d,
|
|
3793
|
+
}) : (f.if((0, t._)`${g} && (${(0, i.checkMissingProp)(d, v, w)})`), (0, i.reportMissingProp)(d, w), f.else());
|
|
3788
3794
|
}
|
|
3789
3795
|
}
|
|
3790
3796
|
e.validatePropertyDeps = a;
|
|
3791
3797
|
function l(d, c = d.schema) {
|
|
3792
|
-
const { gen: f, data: h, keyword: k, it:
|
|
3793
|
-
for (const
|
|
3794
|
-
(0, r.alwaysValidSchema)(
|
|
3795
|
-
(0, i.propertyInData)(f, h,
|
|
3798
|
+
const { gen: f, data: h, keyword: k, it: w } = d, b = f.name("valid");
|
|
3799
|
+
for (const v in c)
|
|
3800
|
+
(0, r.alwaysValidSchema)(w, c[v]) || (f.if(
|
|
3801
|
+
(0, i.propertyInData)(f, h, v, w.opts.ownProperties),
|
|
3796
3802
|
() => {
|
|
3797
|
-
const g = d.subschema({ keyword: k, schemaProp:
|
|
3798
|
-
d.mergeValidEvaluated(g,
|
|
3803
|
+
const g = d.subschema({ keyword: k, schemaProp: v }, b);
|
|
3804
|
+
d.mergeValidEvaluated(g, b);
|
|
3799
3805
|
},
|
|
3800
|
-
() => f.var(
|
|
3806
|
+
() => f.var(b, !0)
|
|
3801
3807
|
// TODO var
|
|
3802
|
-
), d.ok(
|
|
3808
|
+
), d.ok(b));
|
|
3803
3809
|
}
|
|
3804
3810
|
e.validateSchemaDeps = l, e.default = o;
|
|
3805
3811
|
})(Ft);
|
|
@@ -3855,23 +3861,23 @@ const ut = A, re = E, Xl = Q, ft = V, Ql = {
|
|
|
3855
3861
|
h(), e.ok((0, re._)`${n} === ${Xl.default.errors}`);
|
|
3856
3862
|
function h() {
|
|
3857
3863
|
t.forIn("key", o, (g) => {
|
|
3858
|
-
!c.length && !f.length ?
|
|
3864
|
+
!c.length && !f.length ? b(g) : t.if(k(g), () => b(g));
|
|
3859
3865
|
});
|
|
3860
3866
|
}
|
|
3861
3867
|
function k(g) {
|
|
3862
3868
|
let u;
|
|
3863
3869
|
if (c.length > 8) {
|
|
3864
|
-
const
|
|
3865
|
-
u = (0, ut.isOwnProperty)(t,
|
|
3866
|
-
} else c.length ? u = (0, re.or)(...c.map((
|
|
3867
|
-
return f.length && (u = (0, re.or)(u, ...f.map((
|
|
3870
|
+
const $ = (0, ft.schemaRefOrVal)(a, i.properties, "properties");
|
|
3871
|
+
u = (0, ut.isOwnProperty)(t, $, g);
|
|
3872
|
+
} else c.length ? u = (0, re.or)(...c.map(($) => (0, re._)`${g} === ${$}`)) : u = re.nil;
|
|
3873
|
+
return f.length && (u = (0, re.or)(u, ...f.map(($) => (0, re._)`${(0, ut.usePattern)(e, $)}.test(${g})`))), (0, re.not)(u);
|
|
3868
3874
|
}
|
|
3869
|
-
function
|
|
3875
|
+
function w(g) {
|
|
3870
3876
|
t.code((0, re._)`delete ${o}[${g}]`);
|
|
3871
3877
|
}
|
|
3872
|
-
function
|
|
3878
|
+
function b(g) {
|
|
3873
3879
|
if (d.removeAdditional === "all" || d.removeAdditional && r === !1) {
|
|
3874
|
-
|
|
3880
|
+
w(g);
|
|
3875
3881
|
return;
|
|
3876
3882
|
}
|
|
3877
3883
|
if (r === !1) {
|
|
@@ -3880,18 +3886,18 @@ const ut = A, re = E, Xl = Q, ft = V, Ql = {
|
|
|
3880
3886
|
}
|
|
3881
3887
|
if (typeof r == "object" && !(0, ft.alwaysValidSchema)(a, r)) {
|
|
3882
3888
|
const u = t.name("valid");
|
|
3883
|
-
d.removeAdditional === "failing" ? (
|
|
3884
|
-
e.reset(),
|
|
3885
|
-
})) : (
|
|
3889
|
+
d.removeAdditional === "failing" ? (v(g, u, !1), t.if((0, re.not)(u), () => {
|
|
3890
|
+
e.reset(), w(g);
|
|
3891
|
+
})) : (v(g, u), l || t.if((0, re.not)(u), () => t.break()));
|
|
3886
3892
|
}
|
|
3887
3893
|
}
|
|
3888
|
-
function
|
|
3894
|
+
function v(g, u, $) {
|
|
3889
3895
|
const C = {
|
|
3890
3896
|
keyword: "additionalProperties",
|
|
3891
3897
|
dataProp: g,
|
|
3892
3898
|
dataPropType: ft.Type.Str
|
|
3893
3899
|
};
|
|
3894
|
-
|
|
3900
|
+
$ === !1 && Object.assign(C, {
|
|
3895
3901
|
compositeRule: !0,
|
|
3896
3902
|
createErrors: !1,
|
|
3897
3903
|
allErrors: !1
|
|
@@ -3939,7 +3945,7 @@ const Fi = A, ht = E, ji = V, Ri = V, id = {
|
|
|
3939
3945
|
type: "object",
|
|
3940
3946
|
schemaType: "object",
|
|
3941
3947
|
code(e) {
|
|
3942
|
-
const { gen: t, schema: r, data: i, parentSchema: o, it: n } = e, { opts: a } = n, l = (0, Fi.allSchemaProperties)(r), d = l.filter((
|
|
3948
|
+
const { gen: t, schema: r, data: i, parentSchema: o, it: n } = e, { opts: a } = n, l = (0, Fi.allSchemaProperties)(r), d = l.filter((v) => (0, ji.alwaysValidSchema)(n, r[v]));
|
|
3943
3949
|
if (l.length === 0 || d.length === l.length && (!n.opts.unevaluated || n.props === !0))
|
|
3944
3950
|
return;
|
|
3945
3951
|
const c = a.strictSchema && !a.allowMatchingProperties && o.properties, f = t.name("valid");
|
|
@@ -3947,20 +3953,20 @@ const Fi = A, ht = E, ji = V, Ri = V, id = {
|
|
|
3947
3953
|
const { props: h } = n;
|
|
3948
3954
|
k();
|
|
3949
3955
|
function k() {
|
|
3950
|
-
for (const
|
|
3951
|
-
c &&
|
|
3956
|
+
for (const v of l)
|
|
3957
|
+
c && w(v), n.allErrors ? b(v) : (t.var(f, !0), b(v), t.if(f));
|
|
3952
3958
|
}
|
|
3953
|
-
function
|
|
3959
|
+
function w(v) {
|
|
3954
3960
|
for (const g in c)
|
|
3955
|
-
new RegExp(
|
|
3961
|
+
new RegExp(v).test(g) && (0, ji.checkStrictMode)(n, `property ${g} matches pattern ${v} (use allowMatchingProperties)`);
|
|
3956
3962
|
}
|
|
3957
|
-
function
|
|
3963
|
+
function b(v) {
|
|
3958
3964
|
t.forIn("key", i, (g) => {
|
|
3959
|
-
t.if((0, ht._)`${(0, Fi.usePattern)(e,
|
|
3960
|
-
const u = d.includes(
|
|
3965
|
+
t.if((0, ht._)`${(0, Fi.usePattern)(e, v)}.test(${g})`, () => {
|
|
3966
|
+
const u = d.includes(v);
|
|
3961
3967
|
u || e.subschema({
|
|
3962
3968
|
keyword: "patternProperties",
|
|
3963
|
-
schemaProp:
|
|
3969
|
+
schemaProp: v,
|
|
3964
3970
|
dataProp: g,
|
|
3965
3971
|
dataPropType: Ri.Type.Str
|
|
3966
3972
|
}, f), n.opts.unevaluated && h !== !0 ? t.assign((0, ht._)`${h}[${g}]`, !0) : !u && !n.allErrors && t.if((0, ht.not)(f), () => t.break());
|
|
@@ -4273,10 +4279,10 @@ const ye = E, Ni = V, nc = Q, sc = {
|
|
|
4273
4279
|
return (0, ye._)`!${h} || !${h}[${k}]`;
|
|
4274
4280
|
}
|
|
4275
4281
|
function f(h, k) {
|
|
4276
|
-
const
|
|
4277
|
-
for (const
|
|
4278
|
-
h[
|
|
4279
|
-
return (0, ye.and)(...
|
|
4282
|
+
const w = [];
|
|
4283
|
+
for (const b in h)
|
|
4284
|
+
h[b] === !0 && w.push((0, ye._)`${k} !== ${b}`);
|
|
4285
|
+
return (0, ye.and)(...w);
|
|
4280
4286
|
}
|
|
4281
4287
|
}
|
|
4282
4288
|
};
|
|
@@ -4329,32 +4335,32 @@ const q = E, fc = {
|
|
|
4329
4335
|
const { gen: r, data: i, $data: o, schema: n, schemaCode: a, it: l } = e, { opts: d, errSchemaPath: c, schemaEnv: f, self: h } = l;
|
|
4330
4336
|
if (!d.validateFormats)
|
|
4331
4337
|
return;
|
|
4332
|
-
o ? k() :
|
|
4338
|
+
o ? k() : w();
|
|
4333
4339
|
function k() {
|
|
4334
|
-
const
|
|
4340
|
+
const b = r.scopeValue("formats", {
|
|
4335
4341
|
ref: h.formats,
|
|
4336
4342
|
code: d.code.formats
|
|
4337
|
-
}),
|
|
4338
|
-
r.if((0, q._)`typeof ${
|
|
4339
|
-
function
|
|
4343
|
+
}), v = r.const("fDef", (0, q._)`${b}[${a}]`), g = r.let("fType"), u = r.let("format");
|
|
4344
|
+
r.if((0, q._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`, () => r.assign(g, (0, q._)`${v}.type || "string"`).assign(u, (0, q._)`${v}.validate`), () => r.assign(g, (0, q._)`"string"`).assign(u, v)), e.fail$data((0, q.or)($(), C()));
|
|
4345
|
+
function $() {
|
|
4340
4346
|
return d.strictSchema === !1 ? q.nil : (0, q._)`${a} && !${u}`;
|
|
4341
4347
|
}
|
|
4342
4348
|
function C() {
|
|
4343
|
-
const D = f.$async ? (0, q._)`(${
|
|
4349
|
+
const D = f.$async ? (0, q._)`(${v}.async ? await ${u}(${i}) : ${u}(${i}))` : (0, q._)`${u}(${i})`, F = (0, q._)`(typeof ${u} == "function" ? ${D} : ${u}.test(${i}))`;
|
|
4344
4350
|
return (0, q._)`${u} && ${u} !== true && ${g} === ${t} && !${F}`;
|
|
4345
4351
|
}
|
|
4346
4352
|
}
|
|
4347
|
-
function
|
|
4348
|
-
const
|
|
4349
|
-
if (
|
|
4350
|
-
|
|
4353
|
+
function w() {
|
|
4354
|
+
const b = h.formats[n];
|
|
4355
|
+
if (!b) {
|
|
4356
|
+
$();
|
|
4351
4357
|
return;
|
|
4352
4358
|
}
|
|
4353
|
-
if (
|
|
4359
|
+
if (b === !0)
|
|
4354
4360
|
return;
|
|
4355
|
-
const [
|
|
4356
|
-
|
|
4357
|
-
function
|
|
4361
|
+
const [v, g, u] = C(b);
|
|
4362
|
+
v === t && e.pass(D());
|
|
4363
|
+
function $() {
|
|
4358
4364
|
if (d.strictSchema === !1) {
|
|
4359
4365
|
h.logger.warn(F());
|
|
4360
4366
|
return;
|
|
@@ -4369,7 +4375,7 @@ const q = E, fc = {
|
|
|
4369
4375
|
return typeof F == "object" && !(F instanceof RegExp) ? [F.type || "string", F.validate, (0, q._)`${H}.validate`] : ["string", F, H];
|
|
4370
4376
|
}
|
|
4371
4377
|
function D() {
|
|
4372
|
-
if (typeof
|
|
4378
|
+
if (typeof b == "object" && !(b instanceof RegExp) && b.async) {
|
|
4373
4379
|
if (!f.$async)
|
|
4374
4380
|
throw new Error("async format in sync schema");
|
|
4375
4381
|
return (0, q._)`await ${u}(${i})`;
|
|
@@ -4383,10 +4389,10 @@ li.default = hc;
|
|
|
4383
4389
|
Object.defineProperty(ai, "__esModule", { value: !0 });
|
|
4384
4390
|
const mc = li, gc = [mc.default];
|
|
4385
4391
|
ai.default = gc;
|
|
4386
|
-
var
|
|
4387
|
-
Object.defineProperty(
|
|
4388
|
-
|
|
4389
|
-
|
|
4392
|
+
var ze = {};
|
|
4393
|
+
Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
4394
|
+
ze.contentVocabulary = ze.metadataVocabulary = void 0;
|
|
4395
|
+
ze.metadataVocabulary = [
|
|
4390
4396
|
"title",
|
|
4391
4397
|
"description",
|
|
4392
4398
|
"default",
|
|
@@ -4395,13 +4401,13 @@ Ne.metadataVocabulary = [
|
|
|
4395
4401
|
"writeOnly",
|
|
4396
4402
|
"examples"
|
|
4397
4403
|
];
|
|
4398
|
-
|
|
4404
|
+
ze.contentVocabulary = [
|
|
4399
4405
|
"contentMediaType",
|
|
4400
4406
|
"contentEncoding",
|
|
4401
4407
|
"contentSchema"
|
|
4402
4408
|
];
|
|
4403
4409
|
Object.defineProperty(kr, "__esModule", { value: !0 });
|
|
4404
|
-
const yc = Or, bc = Pr, $c = Nr, vc = Zr, Sc = ei, wc = oi, kc = ai, Mi =
|
|
4410
|
+
const yc = Or, bc = Pr, $c = Nr, vc = Zr, Sc = ei, wc = oi, kc = ai, Mi = ze, Oc = [
|
|
4405
4411
|
vc.default,
|
|
4406
4412
|
yc.default,
|
|
4407
4413
|
bc.default,
|
|
@@ -4421,9 +4427,9 @@ var Li;
|
|
|
4421
4427
|
e.Tag = "tag", e.Mapping = "mapping";
|
|
4422
4428
|
})(Li || (Rt.DiscrError = Li = {}));
|
|
4423
4429
|
Object.defineProperty(di, "__esModule", { value: !0 });
|
|
4424
|
-
const
|
|
4430
|
+
const Te = E, lr = Rt, Bi = Z, Cc = Me, Pc = V, _c = {
|
|
4425
4431
|
message: ({ params: { discrError: e, tagName: t } }) => e === lr.DiscrError.Tag ? `tag "${t}" must be string` : `value of tag "${t}" must be in oneOf`,
|
|
4426
|
-
params: ({ params: { discrError: e, tag: t, tagName: r } }) => (0,
|
|
4432
|
+
params: ({ params: { discrError: e, tag: t, tagName: r } }) => (0, Te._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`
|
|
4427
4433
|
}, Vc = {
|
|
4428
4434
|
keyword: "discriminator",
|
|
4429
4435
|
type: "object",
|
|
@@ -4440,22 +4446,22 @@ const Re = E, lr = Rt, Bi = Z, Cc = Me, Pc = V, _c = {
|
|
|
4440
4446
|
throw new Error("discriminator: mapping is not supported");
|
|
4441
4447
|
if (!a)
|
|
4442
4448
|
throw new Error("discriminator: requires oneOf keyword");
|
|
4443
|
-
const d = t.let("valid", !1), c = t.const("tag", (0,
|
|
4444
|
-
t.if((0,
|
|
4449
|
+
const d = t.let("valid", !1), c = t.const("tag", (0, Te._)`${r}${(0, Te.getProperty)(l)}`);
|
|
4450
|
+
t.if((0, Te._)`typeof ${c} == "string"`, () => f(), () => e.error(!1, { discrError: lr.DiscrError.Tag, tag: c, tagName: l })), e.ok(d);
|
|
4445
4451
|
function f() {
|
|
4446
|
-
const
|
|
4452
|
+
const w = k();
|
|
4447
4453
|
t.if(!1);
|
|
4448
|
-
for (const
|
|
4449
|
-
t.elseIf((0,
|
|
4454
|
+
for (const b in w)
|
|
4455
|
+
t.elseIf((0, Te._)`${c} === ${b}`), t.assign(d, h(w[b]));
|
|
4450
4456
|
t.else(), e.error(!1, { discrError: lr.DiscrError.Mapping, tag: c, tagName: l }), t.endIf();
|
|
4451
4457
|
}
|
|
4452
|
-
function h(
|
|
4453
|
-
const
|
|
4454
|
-
return e.mergeEvaluated(
|
|
4458
|
+
function h(w) {
|
|
4459
|
+
const b = t.name("valid"), v = e.subschema({ keyword: "oneOf", schemaProp: w }, b);
|
|
4460
|
+
return e.mergeEvaluated(v, Te.Name), b;
|
|
4455
4461
|
}
|
|
4456
4462
|
function k() {
|
|
4457
|
-
var
|
|
4458
|
-
const
|
|
4463
|
+
var w;
|
|
4464
|
+
const b = {}, v = u(o);
|
|
4459
4465
|
let g = !0;
|
|
4460
4466
|
for (let D = 0; D < a.length; D++) {
|
|
4461
4467
|
let F = a[D];
|
|
@@ -4464,18 +4470,18 @@ const Re = E, lr = Rt, Bi = Z, Cc = Me, Pc = V, _c = {
|
|
|
4464
4470
|
if (F = Bi.resolveRef.call(n.self, n.schemaEnv.root, n.baseId, H), F instanceof Bi.SchemaEnv && (F = F.schema), F === void 0)
|
|
4465
4471
|
throw new Cc.default(n.opts.uriResolver, n.baseId, H);
|
|
4466
4472
|
}
|
|
4467
|
-
const L = (
|
|
4473
|
+
const L = (w = F == null ? void 0 : F.properties) === null || w === void 0 ? void 0 : w[l];
|
|
4468
4474
|
if (typeof L != "object")
|
|
4469
4475
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);
|
|
4470
|
-
g = g && (
|
|
4476
|
+
g = g && (v || u(F)), $(L, D);
|
|
4471
4477
|
}
|
|
4472
4478
|
if (!g)
|
|
4473
4479
|
throw new Error(`discriminator: "${l}" must be required`);
|
|
4474
|
-
return
|
|
4480
|
+
return b;
|
|
4475
4481
|
function u({ required: D }) {
|
|
4476
4482
|
return Array.isArray(D) && D.includes(l);
|
|
4477
4483
|
}
|
|
4478
|
-
function
|
|
4484
|
+
function $(D, F) {
|
|
4479
4485
|
if (D.const)
|
|
4480
4486
|
C(D.const, F);
|
|
4481
4487
|
else if (D.enum)
|
|
@@ -4485,9 +4491,9 @@ const Re = E, lr = Rt, Bi = Z, Cc = Me, Pc = V, _c = {
|
|
|
4485
4491
|
throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);
|
|
4486
4492
|
}
|
|
4487
4493
|
function C(D, F) {
|
|
4488
|
-
if (typeof D != "string" || D in
|
|
4494
|
+
if (typeof D != "string" || D in b)
|
|
4489
4495
|
throw new Error(`discriminator: "${l}" values must be unique strings`);
|
|
4490
|
-
|
|
4496
|
+
b[D] = F;
|
|
4491
4497
|
}
|
|
4492
4498
|
}
|
|
4493
4499
|
}
|
|
@@ -4963,21 +4969,21 @@ ci.default = Qp;
|
|
|
4963
4969
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = t.Ajv2020 = void 0;
|
|
4964
4970
|
const r = qi, i = kr, o = di, n = ci, a = "https://json-schema.org/draft/2020-12/schema";
|
|
4965
4971
|
class l extends r.default {
|
|
4966
|
-
constructor(
|
|
4972
|
+
constructor(w = {}) {
|
|
4967
4973
|
super({
|
|
4968
|
-
...
|
|
4974
|
+
...w,
|
|
4969
4975
|
dynamicRef: !0,
|
|
4970
4976
|
next: !0,
|
|
4971
4977
|
unevaluated: !0
|
|
4972
4978
|
});
|
|
4973
4979
|
}
|
|
4974
4980
|
_addVocabularies() {
|
|
4975
|
-
super._addVocabularies(), i.default.forEach((
|
|
4981
|
+
super._addVocabularies(), i.default.forEach((w) => this.addVocabulary(w)), this.opts.discriminator && this.addKeyword(o.default);
|
|
4976
4982
|
}
|
|
4977
4983
|
_addDefaultMetaSchema() {
|
|
4978
4984
|
super._addDefaultMetaSchema();
|
|
4979
|
-
const { $data:
|
|
4980
|
-
|
|
4985
|
+
const { $data: w, meta: b } = this.opts;
|
|
4986
|
+
b && (n.default.call(this, w), this.refs["http://json-schema.org/schema"] = a);
|
|
4981
4987
|
}
|
|
4982
4988
|
defaultMeta() {
|
|
4983
4989
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(a) ? a : void 0);
|
|
@@ -5012,7 +5018,7 @@ ci.default = Qp;
|
|
|
5012
5018
|
} });
|
|
5013
5019
|
})(tr, tr.exports);
|
|
5014
5020
|
var eu = tr.exports;
|
|
5015
|
-
const tu = "custom-apps", ru = "1.
|
|
5021
|
+
const tu = "custom-apps", ru = "1.11.0", pe = {
|
|
5016
5022
|
ActionCard: {
|
|
5017
5023
|
description: "Card with icon asset, title, caption, and action buttons",
|
|
5018
5024
|
events: ["primaryAction", "secondaryAction"],
|
|
@@ -5078,6 +5084,141 @@ const tu = "custom-apps", ru = "1.8.0", pe = {
|
|
|
5078
5084
|
},
|
|
5079
5085
|
acceptsChildren: !1
|
|
5080
5086
|
},
|
|
5087
|
+
ActionSheet: {
|
|
5088
|
+
description: "Bottom-sheet list of backend-authored actions",
|
|
5089
|
+
events: [],
|
|
5090
|
+
propsSchema: {
|
|
5091
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
5092
|
+
additionalProperties: !1,
|
|
5093
|
+
properties: {
|
|
5094
|
+
data: {
|
|
5095
|
+
description: "Selectable ActionSheet options",
|
|
5096
|
+
items: {
|
|
5097
|
+
additionalProperties: !1,
|
|
5098
|
+
properties: {
|
|
5099
|
+
actions: {
|
|
5100
|
+
description: "Actions executed in order when this option is selected",
|
|
5101
|
+
items: {
|
|
5102
|
+
additionalProperties: {},
|
|
5103
|
+
properties: {
|
|
5104
|
+
action: {
|
|
5105
|
+
description: "Registered action name",
|
|
5106
|
+
type: "string"
|
|
5107
|
+
},
|
|
5108
|
+
options: {
|
|
5109
|
+
additionalProperties: {},
|
|
5110
|
+
propertyNames: {
|
|
5111
|
+
type: "string"
|
|
5112
|
+
},
|
|
5113
|
+
type: "object"
|
|
5114
|
+
},
|
|
5115
|
+
params: {
|
|
5116
|
+
additionalProperties: {},
|
|
5117
|
+
propertyNames: {
|
|
5118
|
+
type: "string"
|
|
5119
|
+
},
|
|
5120
|
+
type: "object"
|
|
5121
|
+
}
|
|
5122
|
+
},
|
|
5123
|
+
required: ["action"],
|
|
5124
|
+
type: "object"
|
|
5125
|
+
},
|
|
5126
|
+
type: "array"
|
|
5127
|
+
},
|
|
5128
|
+
avatar: {
|
|
5129
|
+
additionalProperties: {},
|
|
5130
|
+
description: "Avatar displayed beside the option",
|
|
5131
|
+
properties: {
|
|
5132
|
+
backgroundColor: {
|
|
5133
|
+
type: "string"
|
|
5134
|
+
},
|
|
5135
|
+
contentFit: {
|
|
5136
|
+
type: "string"
|
|
5137
|
+
},
|
|
5138
|
+
source: {
|
|
5139
|
+
description: "Remote image URL",
|
|
5140
|
+
type: "string"
|
|
5141
|
+
}
|
|
5142
|
+
},
|
|
5143
|
+
required: ["source"],
|
|
5144
|
+
type: "object"
|
|
5145
|
+
},
|
|
5146
|
+
description: {
|
|
5147
|
+
description: "Secondary description text",
|
|
5148
|
+
type: "string"
|
|
5149
|
+
},
|
|
5150
|
+
id: {
|
|
5151
|
+
description: "Unique identifier for this option",
|
|
5152
|
+
type: "string"
|
|
5153
|
+
},
|
|
5154
|
+
title: {
|
|
5155
|
+
description: "Display text for this option",
|
|
5156
|
+
type: "string"
|
|
5157
|
+
},
|
|
5158
|
+
visible: {
|
|
5159
|
+
description: "If false, hides this option. Default: true",
|
|
5160
|
+
type: "boolean"
|
|
5161
|
+
}
|
|
5162
|
+
},
|
|
5163
|
+
required: ["id", "title", "actions"],
|
|
5164
|
+
type: "object"
|
|
5165
|
+
},
|
|
5166
|
+
type: "array"
|
|
5167
|
+
},
|
|
5168
|
+
dismissActions: {
|
|
5169
|
+
description: "Actions executed when the sheet is dismissed",
|
|
5170
|
+
items: {
|
|
5171
|
+
additionalProperties: {},
|
|
5172
|
+
properties: {
|
|
5173
|
+
action: {
|
|
5174
|
+
description: "Registered action name",
|
|
5175
|
+
type: "string"
|
|
5176
|
+
},
|
|
5177
|
+
options: {
|
|
5178
|
+
additionalProperties: {},
|
|
5179
|
+
propertyNames: {
|
|
5180
|
+
type: "string"
|
|
5181
|
+
},
|
|
5182
|
+
type: "object"
|
|
5183
|
+
},
|
|
5184
|
+
params: {
|
|
5185
|
+
additionalProperties: {},
|
|
5186
|
+
propertyNames: {
|
|
5187
|
+
type: "string"
|
|
5188
|
+
},
|
|
5189
|
+
type: "object"
|
|
5190
|
+
}
|
|
5191
|
+
},
|
|
5192
|
+
required: ["action"],
|
|
5193
|
+
type: "object"
|
|
5194
|
+
},
|
|
5195
|
+
type: "array"
|
|
5196
|
+
},
|
|
5197
|
+
header: {
|
|
5198
|
+
additionalProperties: !1,
|
|
5199
|
+
properties: {
|
|
5200
|
+
title: {
|
|
5201
|
+
description: "ActionSheet heading",
|
|
5202
|
+
type: "string"
|
|
5203
|
+
}
|
|
5204
|
+
},
|
|
5205
|
+
required: ["title"],
|
|
5206
|
+
type: "object"
|
|
5207
|
+
},
|
|
5208
|
+
testID: {
|
|
5209
|
+
description: "Test identifier",
|
|
5210
|
+
type: "string"
|
|
5211
|
+
},
|
|
5212
|
+
visible: {
|
|
5213
|
+
description: "If true, the ActionSheet is visible",
|
|
5214
|
+
type: "boolean"
|
|
5215
|
+
}
|
|
5216
|
+
},
|
|
5217
|
+
required: ["visible", "data"],
|
|
5218
|
+
type: "object"
|
|
5219
|
+
},
|
|
5220
|
+
acceptsChildren: !1
|
|
5221
|
+
},
|
|
5081
5222
|
Anchor: {
|
|
5082
5223
|
description: "Inline text link that opens supported URLs",
|
|
5083
5224
|
events: ["press", "open", "error"],
|
|
@@ -9074,7 +9215,7 @@ const tu = "custom-apps", ru = "1.8.0", pe = {
|
|
|
9074
9215
|
type: "array"
|
|
9075
9216
|
},
|
|
9076
9217
|
decimalPlaces: {
|
|
9077
|
-
description: "Number of decimal places allowed",
|
|
9218
|
+
description: "Number of decimal places allowed. Mutually exclusive with isIntegerOnly.",
|
|
9078
9219
|
type: "number"
|
|
9079
9220
|
},
|
|
9080
9221
|
defaultValue: {
|
|
@@ -9100,6 +9241,10 @@ const tu = "custom-apps", ru = "1.8.0", pe = {
|
|
|
9100
9241
|
description: "Help text shown below the input",
|
|
9101
9242
|
type: "string"
|
|
9102
9243
|
},
|
|
9244
|
+
isIntegerOnly: {
|
|
9245
|
+
description: "Restrict to integer values only. Takes precedence over decimalPlaces.",
|
|
9246
|
+
type: "boolean"
|
|
9247
|
+
},
|
|
9103
9248
|
label: {
|
|
9104
9249
|
description: "Label shown above the input",
|
|
9105
9250
|
type: "string"
|
|
@@ -12918,6 +13063,77 @@ const tu = "custom-apps", ru = "1.8.0", pe = {
|
|
|
12918
13063
|
description: "Disables the input. Default: false",
|
|
12919
13064
|
type: "boolean"
|
|
12920
13065
|
},
|
|
13066
|
+
domainList: {
|
|
13067
|
+
anyOf: [
|
|
13068
|
+
{
|
|
13069
|
+
type: "string"
|
|
13070
|
+
},
|
|
13071
|
+
{
|
|
13072
|
+
items: {
|
|
13073
|
+
anyOf: [
|
|
13074
|
+
{
|
|
13075
|
+
type: "string"
|
|
13076
|
+
},
|
|
13077
|
+
{
|
|
13078
|
+
additionalProperties: !1,
|
|
13079
|
+
properties: {
|
|
13080
|
+
label: {
|
|
13081
|
+
description: "Visible domain label",
|
|
13082
|
+
type: "string"
|
|
13083
|
+
},
|
|
13084
|
+
tag: {
|
|
13085
|
+
description: "Optional tag shown on the domain row",
|
|
13086
|
+
type: "string"
|
|
13087
|
+
},
|
|
13088
|
+
value: {
|
|
13089
|
+
description: "Domain value used in the composed email",
|
|
13090
|
+
type: "string"
|
|
13091
|
+
}
|
|
13092
|
+
},
|
|
13093
|
+
required: ["label", "value"],
|
|
13094
|
+
type: "object"
|
|
13095
|
+
},
|
|
13096
|
+
{
|
|
13097
|
+
additionalProperties: !1,
|
|
13098
|
+
properties: {
|
|
13099
|
+
label: {
|
|
13100
|
+
description: "Group heading in the domain selector",
|
|
13101
|
+
type: "string"
|
|
13102
|
+
},
|
|
13103
|
+
list: {
|
|
13104
|
+
description: "Domains in this group",
|
|
13105
|
+
items: {
|
|
13106
|
+
additionalProperties: !1,
|
|
13107
|
+
properties: {
|
|
13108
|
+
label: {
|
|
13109
|
+
description: "Visible domain label",
|
|
13110
|
+
type: "string"
|
|
13111
|
+
},
|
|
13112
|
+
tag: {
|
|
13113
|
+
description: "Optional tag shown on the domain row",
|
|
13114
|
+
type: "string"
|
|
13115
|
+
},
|
|
13116
|
+
value: {
|
|
13117
|
+
description: "Domain value used in the composed email",
|
|
13118
|
+
type: "string"
|
|
13119
|
+
}
|
|
13120
|
+
},
|
|
13121
|
+
required: ["label", "value"],
|
|
13122
|
+
type: "object"
|
|
13123
|
+
},
|
|
13124
|
+
type: "array"
|
|
13125
|
+
}
|
|
13126
|
+
},
|
|
13127
|
+
required: ["label", "list"],
|
|
13128
|
+
type: "object"
|
|
13129
|
+
}
|
|
13130
|
+
]
|
|
13131
|
+
},
|
|
13132
|
+
type: "array"
|
|
13133
|
+
}
|
|
13134
|
+
],
|
|
13135
|
+
description: "Allowed domains. When set, the user types only the username and picks a domain."
|
|
13136
|
+
},
|
|
12921
13137
|
error: {
|
|
12922
13138
|
anyOf: [
|
|
12923
13139
|
{
|
|
@@ -12997,6 +13213,22 @@ const tu = "custom-apps", ru = "1.8.0", pe = {
|
|
|
12997
13213
|
type: "object"
|
|
12998
13214
|
}
|
|
12999
13215
|
},
|
|
13216
|
+
linking_openURL: {
|
|
13217
|
+
description: "Open a supported URL using the device operating system.",
|
|
13218
|
+
docs: "`url` (required): the resolved URL to open.",
|
|
13219
|
+
paramsSchema: {
|
|
13220
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
13221
|
+
additionalProperties: !1,
|
|
13222
|
+
properties: {
|
|
13223
|
+
url: {
|
|
13224
|
+
description: "URL to open using the device operating system.",
|
|
13225
|
+
type: "string"
|
|
13226
|
+
}
|
|
13227
|
+
},
|
|
13228
|
+
required: ["url"],
|
|
13229
|
+
type: "object"
|
|
13230
|
+
}
|
|
13231
|
+
},
|
|
13000
13232
|
navigate: {
|
|
13001
13233
|
description: "Navigate to a React Navigation screen by name using the mobile route registered in the navigator.",
|
|
13002
13234
|
docs: '`screen` (required): the React Navigation screen name to navigate to, usually in "{namespace}/{ScreenName}" format.\n`params` (optional): key-value params forwarded to the target screen (same as React Navigation `navigate` second argument).\nUses the global NavigationService, so it works from any SDUI component regardless of navigation context.',
|
|
@@ -13273,6 +13505,24 @@ The value may use $state or $computed expressions. This is useful for deriving v
|
|
|
13273
13505
|
required: ["value"],
|
|
13274
13506
|
type: "object"
|
|
13275
13507
|
}
|
|
13508
|
+
},
|
|
13509
|
+
platform_isAndroid: {
|
|
13510
|
+
description: "Return whether the current React Native platform is Android.",
|
|
13511
|
+
paramsSchema: {
|
|
13512
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
13513
|
+
additionalProperties: !1,
|
|
13514
|
+
properties: {},
|
|
13515
|
+
type: "object"
|
|
13516
|
+
}
|
|
13517
|
+
},
|
|
13518
|
+
platform_isIOS: {
|
|
13519
|
+
description: "Return whether the current React Native platform is iOS.",
|
|
13520
|
+
paramsSchema: {
|
|
13521
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
13522
|
+
additionalProperties: !1,
|
|
13523
|
+
properties: {},
|
|
13524
|
+
type: "object"
|
|
13525
|
+
}
|
|
13276
13526
|
}
|
|
13277
13527
|
}, iu = {}, Go = {
|
|
13278
13528
|
AlignItemsValue: {
|
|
@@ -13674,6 +13924,8 @@ The value may use $state or $computed expressions. This is useful for deriving v
|
|
|
13674
13924
|
"brex",
|
|
13675
13925
|
"briefcaseFilled",
|
|
13676
13926
|
"briefcaseOutline",
|
|
13927
|
+
"browserFilled",
|
|
13928
|
+
"browserOutline",
|
|
13677
13929
|
"browserRipplingLogoFilled",
|
|
13678
13930
|
"browserRipplingLogoOutline",
|
|
13679
13931
|
"budgetDollarFilled",
|
|
@@ -13753,6 +14005,7 @@ The value may use $state or $computed expressions. This is useful for deriving v
|
|
|
13753
14005
|
"chevronLeft",
|
|
13754
14006
|
"chevronRight",
|
|
13755
14007
|
"chevronUp",
|
|
14008
|
+
"chevronsInwardVerical",
|
|
13756
14009
|
"chrome",
|
|
13757
14010
|
"circleArrowUpGraphFilled",
|
|
13758
14011
|
"circleArrowUpGraphOutline",
|
|
@@ -14333,6 +14586,10 @@ The value may use $state or $computed expressions. This is useful for deriving v
|
|
|
14333
14586
|
"paidSeatSelectionOutline",
|
|
14334
14587
|
"paintRollerFilled",
|
|
14335
14588
|
"paintRollerOutline",
|
|
14589
|
+
"panelCollapseVerticalFilled",
|
|
14590
|
+
"panelCollapseVerticalOutline",
|
|
14591
|
+
"panelExpandVerticalFilled",
|
|
14592
|
+
"panelExpandVerticalOutline",
|
|
14336
14593
|
"password",
|
|
14337
14594
|
"passwordRefreshFilled",
|
|
14338
14595
|
"passwordRefreshOutline",
|
|
@@ -14402,6 +14659,8 @@ The value may use $state or $computed expressions. This is useful for deriving v
|
|
|
14402
14659
|
"photoGalleryOutlined",
|
|
14403
14660
|
"pieChartGraphFilled",
|
|
14404
14661
|
"pieChartGraphOutline",
|
|
14662
|
+
"pillsFilled",
|
|
14663
|
+
"pillsOutline",
|
|
14405
14664
|
"pinLeft",
|
|
14406
14665
|
"pinRight",
|
|
14407
14666
|
"plaid",
|
|
@@ -15194,7 +15453,7 @@ The value may use $state or $computed expressions. This is useful for deriving v
|
|
|
15194
15453
|
{ field: "relatedComponents", title: "Related components" },
|
|
15195
15454
|
{ field: "subComponents", title: "Sub-components" }
|
|
15196
15455
|
];
|
|
15197
|
-
function
|
|
15456
|
+
function eh() {
|
|
15198
15457
|
return Object.fromEntries(
|
|
15199
15458
|
Object.entries(pe).map(([e, t]) => [
|
|
15200
15459
|
e,
|
|
@@ -15202,7 +15461,7 @@ function Yf() {
|
|
|
15202
15461
|
])
|
|
15203
15462
|
);
|
|
15204
15463
|
}
|
|
15205
|
-
function
|
|
15464
|
+
function th() {
|
|
15206
15465
|
return Object.fromEntries(
|
|
15207
15466
|
Object.entries(vt).map(([e, t]) => [
|
|
15208
15467
|
e,
|
|
@@ -15210,7 +15469,7 @@ function Zf() {
|
|
|
15210
15469
|
])
|
|
15211
15470
|
);
|
|
15212
15471
|
}
|
|
15213
|
-
function
|
|
15472
|
+
function rh() {
|
|
15214
15473
|
return Object.fromEntries(
|
|
15215
15474
|
Object.entries(it).map(([e, t]) => [
|
|
15216
15475
|
e,
|
|
@@ -15218,13 +15477,13 @@ function Xf() {
|
|
|
15218
15477
|
])
|
|
15219
15478
|
);
|
|
15220
15479
|
}
|
|
15221
|
-
function
|
|
15480
|
+
function ih() {
|
|
15222
15481
|
return it;
|
|
15223
15482
|
}
|
|
15224
|
-
function
|
|
15483
|
+
function oh() {
|
|
15225
15484
|
return Go;
|
|
15226
15485
|
}
|
|
15227
|
-
function
|
|
15486
|
+
function nh(e) {
|
|
15228
15487
|
if (!Object.hasOwn(pe, e))
|
|
15229
15488
|
throw new Error(
|
|
15230
15489
|
`Unknown component '${e}'. Available: ${Object.keys(pe).join(", ")}`
|
|
@@ -15232,7 +15491,7 @@ function th(e) {
|
|
|
15232
15491
|
const t = { ...pe[e] };
|
|
15233
15492
|
return delete t.example, t;
|
|
15234
15493
|
}
|
|
15235
|
-
function
|
|
15494
|
+
function sh(e) {
|
|
15236
15495
|
if (!Object.hasOwn(pe, e))
|
|
15237
15496
|
throw new Error(
|
|
15238
15497
|
`Unknown component '${e}'. Available: ${Object.keys(pe).join(", ")}`
|
|
@@ -15243,14 +15502,14 @@ function rh(e) {
|
|
|
15243
15502
|
ou
|
|
15244
15503
|
);
|
|
15245
15504
|
}
|
|
15246
|
-
function
|
|
15505
|
+
function ah(e) {
|
|
15247
15506
|
if (!(e in vt))
|
|
15248
15507
|
throw new Error(
|
|
15249
15508
|
`Unknown action '${e}'. Available: ${Object.keys(vt).join(", ")}`
|
|
15250
15509
|
);
|
|
15251
15510
|
return vt[e];
|
|
15252
15511
|
}
|
|
15253
|
-
function
|
|
15512
|
+
function lh(e) {
|
|
15254
15513
|
if (!(e in it))
|
|
15255
15514
|
throw new Error(
|
|
15256
15515
|
`Unknown function '${e}'. Available: ${Object.keys(it).join(", ")}`
|
|
@@ -15281,7 +15540,7 @@ const su = Yo({
|
|
|
15281
15540
|
supportsStandardDirectives: !1,
|
|
15282
15541
|
validateSchema: Ko
|
|
15283
15542
|
});
|
|
15284
|
-
function
|
|
15543
|
+
function dh(e) {
|
|
15285
15544
|
const t = [], r = e.elements ?? {}, i = e.root;
|
|
15286
15545
|
i && !(i in r) && t.push(`Root element '${i}' not found in elements map`);
|
|
15287
15546
|
for (const [o, n] of Object.entries(r)) {
|
|
@@ -15292,23 +15551,28 @@ function nh(e) {
|
|
|
15292
15551
|
}
|
|
15293
15552
|
const l = pe[a], d = l.propsSchema;
|
|
15294
15553
|
if (d) {
|
|
15295
|
-
const
|
|
15296
|
-
for (const
|
|
15554
|
+
const b = n.props ?? {};
|
|
15555
|
+
for (const v of Ko(
|
|
15297
15556
|
su.preparePropsSchema(d),
|
|
15298
|
-
|
|
15557
|
+
b
|
|
15299
15558
|
))
|
|
15300
|
-
t.push(`Element '${o}': ${
|
|
15559
|
+
t.push(`Element '${o}': ${v}`);
|
|
15301
15560
|
}
|
|
15302
15561
|
const c = n.on ?? {}, f = l.events ?? [];
|
|
15303
|
-
for (const
|
|
15304
|
-
f.includes(
|
|
15305
|
-
`Element '${o}': unknown event '${
|
|
15562
|
+
for (const b of Object.keys(c))
|
|
15563
|
+
f.includes(b) || t.push(
|
|
15564
|
+
`Element '${o}': unknown event '${b}'. Valid: ${f.join(", ")}`
|
|
15306
15565
|
);
|
|
15307
15566
|
(n.children ?? []).length > 0 && !l.acceptsChildren && t.push(`Element '${o}': '${a}' does not accept children`);
|
|
15567
|
+
const k = n.slots ?? {}, w = l.slots ?? [];
|
|
15568
|
+
for (const b of Object.keys(k))
|
|
15569
|
+
w.includes(b) || t.push(
|
|
15570
|
+
`Element '${o}': unknown slot '${b}'. Valid: ${w.join(", ")}`
|
|
15571
|
+
);
|
|
15308
15572
|
}
|
|
15309
15573
|
return t;
|
|
15310
15574
|
}
|
|
15311
|
-
function
|
|
15575
|
+
function ch(e) {
|
|
15312
15576
|
return {
|
|
15313
15577
|
...Xo(e.root, e.state),
|
|
15314
15578
|
platform: "mobile",
|
|
@@ -15318,108 +15582,112 @@ function sh(e) {
|
|
|
15318
15582
|
}
|
|
15319
15583
|
export {
|
|
15320
15584
|
uu as ActionCard,
|
|
15321
|
-
fu as
|
|
15322
|
-
hu as
|
|
15323
|
-
mu as
|
|
15324
|
-
gu as
|
|
15325
|
-
yu as
|
|
15326
|
-
bu as
|
|
15585
|
+
fu as ActionSheet,
|
|
15586
|
+
hu as Anchor,
|
|
15587
|
+
mu as Animation,
|
|
15588
|
+
gu as Avatar,
|
|
15589
|
+
yu as AvatarStack,
|
|
15590
|
+
bu as Badge,
|
|
15591
|
+
$u as Button,
|
|
15327
15592
|
tu as CATALOG_NAME,
|
|
15328
15593
|
ru as CATALOG_VERSION,
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15336
|
-
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
Lf as
|
|
15423
|
-
|
|
15594
|
+
vu as Card,
|
|
15595
|
+
Su as Checkbox,
|
|
15596
|
+
wu as CheckboxGroup,
|
|
15597
|
+
ku as Chip,
|
|
15598
|
+
Ou as Country,
|
|
15599
|
+
Cu as Currency,
|
|
15600
|
+
Pu as Date,
|
|
15601
|
+
_u as DateRange,
|
|
15602
|
+
Vu as DateTimePicker,
|
|
15603
|
+
Du as Divider,
|
|
15604
|
+
Fu as Email,
|
|
15605
|
+
ju as ExpansionPanel,
|
|
15606
|
+
Ru as FileViewerButton,
|
|
15607
|
+
Tu as FileViewerPressable,
|
|
15608
|
+
Iu as FloatingButton,
|
|
15609
|
+
Eu as Form,
|
|
15610
|
+
xu as Group,
|
|
15611
|
+
Nu as HStack,
|
|
15612
|
+
Au as Hidden,
|
|
15613
|
+
zu as Icon,
|
|
15614
|
+
Mu as Image,
|
|
15615
|
+
Lu as InputText,
|
|
15616
|
+
Bu as Label,
|
|
15617
|
+
qu as List,
|
|
15618
|
+
Hu as ListItem,
|
|
15619
|
+
Wu as ModalSheet,
|
|
15620
|
+
Uu as Notice,
|
|
15621
|
+
Gu as Number,
|
|
15622
|
+
Ku as ObjectFooter,
|
|
15623
|
+
Ju as ObjectItem,
|
|
15624
|
+
Yu as ObjectListView,
|
|
15625
|
+
Zu as ObjectListViewCard,
|
|
15626
|
+
Xu as PageCondensedFooter,
|
|
15627
|
+
Qu as PageCondensedHeader,
|
|
15628
|
+
ef as PageContent,
|
|
15629
|
+
tf as PageFilterHeader,
|
|
15630
|
+
rf as PageFooter,
|
|
15631
|
+
of as PageHeader,
|
|
15632
|
+
nf as PageModalActionHeader,
|
|
15633
|
+
sf as Password,
|
|
15634
|
+
af as Percentage,
|
|
15635
|
+
lf as Phone,
|
|
15636
|
+
df as Pressable,
|
|
15637
|
+
cf as ProgressIndicator,
|
|
15638
|
+
pf as Radio,
|
|
15639
|
+
uf as RadioGroup,
|
|
15640
|
+
ff as Search,
|
|
15641
|
+
hf as SectionHeader,
|
|
15642
|
+
mf as Select,
|
|
15643
|
+
gf as SelectChips,
|
|
15644
|
+
yf as Signature,
|
|
15645
|
+
bf as Sin,
|
|
15646
|
+
$f as Slider,
|
|
15647
|
+
vf as SliderRange,
|
|
15648
|
+
Sf as SnackBar,
|
|
15649
|
+
wf as Spacer,
|
|
15650
|
+
kf as Spinner,
|
|
15651
|
+
Of as Ssn,
|
|
15652
|
+
Cf as Status,
|
|
15653
|
+
Pf as StatusBar,
|
|
15654
|
+
_f as Switch,
|
|
15655
|
+
Vf as Tabs,
|
|
15656
|
+
Df as Text,
|
|
15657
|
+
Ff as Textarea,
|
|
15658
|
+
jf as Time,
|
|
15659
|
+
Rf as TimeRange,
|
|
15660
|
+
Tf as Tip,
|
|
15661
|
+
If as VStack,
|
|
15662
|
+
Ef as Widget,
|
|
15663
|
+
xf as WorkEmail,
|
|
15664
|
+
Af as copyToClipboard,
|
|
15665
|
+
Hf as currencyFormat,
|
|
15666
|
+
Wf as currencyGetCurrencyCodeByCountryCode,
|
|
15667
|
+
Uf as currencyGetCurrencyNameByCode,
|
|
15668
|
+
Gf as currencyGetCurrencySymbol,
|
|
15669
|
+
Kf as currencyIsConvertableToCurrency,
|
|
15670
|
+
Jf as currencyToMoney,
|
|
15671
|
+
Yf as dateTimeAdd,
|
|
15672
|
+
Zf as dateTimeFormat,
|
|
15673
|
+
ah as getAction,
|
|
15674
|
+
th as getActions,
|
|
15675
|
+
nh as getComponent,
|
|
15676
|
+
sh as getComponentMarkdown,
|
|
15677
|
+
eh as getComponents,
|
|
15678
|
+
ih as getComputedFunctions,
|
|
15679
|
+
oh as getDefs,
|
|
15680
|
+
lh as getFunction,
|
|
15681
|
+
rh as getFunctions,
|
|
15682
|
+
Nf as goBack,
|
|
15683
|
+
zf as linking_openURL,
|
|
15684
|
+
Mf as navigate,
|
|
15685
|
+
Xf as platformIsAndroid,
|
|
15686
|
+
Qf as platformIsIOS,
|
|
15687
|
+
Lf as push,
|
|
15688
|
+
ch as render,
|
|
15689
|
+
Bf as setState,
|
|
15690
|
+
qf as triggerApi,
|
|
15691
|
+
dh as validate
|
|
15424
15692
|
};
|
|
15425
15693
|
//# sourceMappingURL=index.js.map
|