@arcforges/api-client 1.0.0-ci.195.1 → 1.0.0-ci.205.1
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/NOTICE +4 -4
- package/build-identity.json +43 -11
- package/dist/gen/http.d.ts +4 -0
- package/dist/gen/http.js +4 -0
- package/dist/shapes/gen/DeclarativePanel.d.ts +154 -0
- package/dist/shapes/gen/DeclarativePanel.js +2988 -0
- package/dist/shapes/gen/ExtensionManifest.d.ts +278 -0
- package/dist/shapes/gen/ExtensionManifest.js +3974 -0
- package/dist/shapes/gen/ExtensionWorkflow.d.ts +151 -0
- package/dist/shapes/gen/ExtensionWorkflow.js +2251 -0
- package/dist/shapes/gen/PolicyBody.d.ts +269 -0
- package/dist/shapes/gen/PolicyBody.js +4188 -0
- package/package.json +2 -2
- package/sbom.cdx.json +9 -9
- package/schemas/public/http/v1/manifest.schema.json +1459 -0
- package/schemas/public/http/v1/panel.schema.json +963 -0
- package/schemas/public/http/v1/policy-body.schema.json +1376 -0
- package/schemas/public/http/v1/workflow.schema.json +715 -0
- package/source.json +6 -2
|
@@ -0,0 +1,2988 @@
|
|
|
1
|
+
export function isDeclarativePanel(value) { return check0(value); }
|
|
2
|
+
/** The schema's declared UTF-8 document bound in bytes. */
|
|
3
|
+
export const declarativePanelJsonMaxBytes = 4194304;
|
|
4
|
+
/** Parses one strict DeclarativePanel document; refusal kinds match the C# codec. */
|
|
5
|
+
export function tryParseDeclarativePanelJson(input) {
|
|
6
|
+
const parsed = strictJson(input, 4194304);
|
|
7
|
+
if (!parsed.ok)
|
|
8
|
+
return parsed;
|
|
9
|
+
return isDeclarativePanel(parsed.value) ? { ok: true, value: parsed.value } : { ok: false, failure: "invalid" };
|
|
10
|
+
}
|
|
11
|
+
/** Parses one strict DeclarativePanel document or throws an error carrying the refusal kind. */
|
|
12
|
+
export function parseDeclarativePanelJson(input) {
|
|
13
|
+
const result = tryParseDeclarativePanelJson(input);
|
|
14
|
+
if (!result.ok)
|
|
15
|
+
throw Object.assign(new Error(`DeclarativePanel JSON refused: ${result.failure}.`), { failure: result.failure });
|
|
16
|
+
return result.value;
|
|
17
|
+
}
|
|
18
|
+
/** Writes compact UTF-8 in schema property order and refuses output the schema rejects. */
|
|
19
|
+
export function serializeDeclarativePanelJson(value) {
|
|
20
|
+
if (!isDeclarativePanel(value))
|
|
21
|
+
throw Object.assign(new Error('Invalid recursive shape'), { failure: 'invalid' });
|
|
22
|
+
const bytes = new TextEncoder().encode(JSON.stringify(orderDeclarativePanel(value)));
|
|
23
|
+
const result = tryParseDeclarativePanelJson(bytes);
|
|
24
|
+
if (!result.ok)
|
|
25
|
+
throw Object.assign(new Error(`DeclarativePanel JSON refused: ${result.failure}.`), { failure: result.failure });
|
|
26
|
+
return bytes;
|
|
27
|
+
}
|
|
28
|
+
function orderDeclarativePanel(value) {
|
|
29
|
+
const out = {};
|
|
30
|
+
out["schemaVersion"] = value["schemaVersion"];
|
|
31
|
+
if (value["inputSchemaId"] !== undefined)
|
|
32
|
+
out["inputSchemaId"] = value["inputSchemaId"];
|
|
33
|
+
out["controls"] = value["controls"].map(item => orderPanelControl(item));
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
function orderPanelAll(value) {
|
|
37
|
+
const out = {};
|
|
38
|
+
out["operator"] = value["operator"];
|
|
39
|
+
out["predicates"] = value["predicates"].map(item => orderPanelPredicate(item));
|
|
40
|
+
return out;
|
|
41
|
+
}
|
|
42
|
+
function orderPanelAny(value) {
|
|
43
|
+
const out = {};
|
|
44
|
+
out["operator"] = value["operator"];
|
|
45
|
+
out["predicates"] = value["predicates"].map(item => orderPanelPredicate(item));
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
function orderPanelArgument(value) {
|
|
49
|
+
const out = {};
|
|
50
|
+
out["name"] = value["name"];
|
|
51
|
+
out["valueRef"] = orderPanelValueRef(value["valueRef"]);
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function orderPanelButtonControl(value) {
|
|
55
|
+
const out = {};
|
|
56
|
+
out["id"] = value["id"];
|
|
57
|
+
out["kind"] = value["kind"];
|
|
58
|
+
if (value["label"] !== undefined)
|
|
59
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
60
|
+
if (value["help"] !== undefined)
|
|
61
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
62
|
+
if (value["visible"] !== undefined)
|
|
63
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
64
|
+
out["operationId"] = value["operationId"];
|
|
65
|
+
out["arguments"] = value["arguments"].map(item => orderPanelArgument(item));
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
function orderPanelColumnControl(value) {
|
|
69
|
+
const out = {};
|
|
70
|
+
out["id"] = value["id"];
|
|
71
|
+
out["kind"] = value["kind"];
|
|
72
|
+
if (value["label"] !== undefined)
|
|
73
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
74
|
+
if (value["help"] !== undefined)
|
|
75
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
76
|
+
if (value["visible"] !== undefined)
|
|
77
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
78
|
+
out["children"] = value["children"];
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
function orderPanelComparison(value) {
|
|
82
|
+
const out = {};
|
|
83
|
+
out["operator"] = value["operator"];
|
|
84
|
+
out["left"] = orderPanelValueRef(value["left"]);
|
|
85
|
+
out["right"] = orderPanelValueRef(value["right"]);
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
88
|
+
function orderPanelControl(value) {
|
|
89
|
+
if (check5(value))
|
|
90
|
+
return orderPanelColumnControl(value);
|
|
91
|
+
if (check29(value))
|
|
92
|
+
return orderPanelRowControl(value);
|
|
93
|
+
if (check40(value))
|
|
94
|
+
return orderPanelSectionControl(value);
|
|
95
|
+
if (check51(value))
|
|
96
|
+
return orderPanelTextControl(value);
|
|
97
|
+
if (check63(value))
|
|
98
|
+
return orderPanelTextInputControl(value);
|
|
99
|
+
if (check72(value))
|
|
100
|
+
return orderPanelNumberInputControl(value);
|
|
101
|
+
if (check81(value))
|
|
102
|
+
return orderPanelToggleControl(value);
|
|
103
|
+
if (check90(value))
|
|
104
|
+
return orderPanelSelectControl(value);
|
|
105
|
+
if (check99(value))
|
|
106
|
+
return orderPanelButtonControl(value);
|
|
107
|
+
if (check112(value))
|
|
108
|
+
return orderPanelListControl(value);
|
|
109
|
+
if (check122(value))
|
|
110
|
+
return orderPanelTableControl(value);
|
|
111
|
+
if (check132(value))
|
|
112
|
+
return orderPanelResourceLinkControl(value);
|
|
113
|
+
if (check141(value))
|
|
114
|
+
return orderPanelPreviewControl(value);
|
|
115
|
+
throw new TypeError('Invalid closed union');
|
|
116
|
+
}
|
|
117
|
+
function orderPanelExists(value) {
|
|
118
|
+
const out = {};
|
|
119
|
+
out["operator"] = value["operator"];
|
|
120
|
+
out["value"] = orderPanelValueRef(value["value"]);
|
|
121
|
+
return out;
|
|
122
|
+
}
|
|
123
|
+
function orderPanelListControl(value) {
|
|
124
|
+
const out = {};
|
|
125
|
+
out["id"] = value["id"];
|
|
126
|
+
out["kind"] = value["kind"];
|
|
127
|
+
if (value["label"] !== undefined)
|
|
128
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
129
|
+
if (value["help"] !== undefined)
|
|
130
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
131
|
+
if (value["visible"] !== undefined)
|
|
132
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
133
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
134
|
+
out["pageSize"] = value["pageSize"];
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
function orderPanelNumberInputControl(value) {
|
|
138
|
+
const out = {};
|
|
139
|
+
out["id"] = value["id"];
|
|
140
|
+
out["kind"] = value["kind"];
|
|
141
|
+
if (value["label"] !== undefined)
|
|
142
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
143
|
+
if (value["help"] !== undefined)
|
|
144
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
145
|
+
if (value["visible"] !== undefined)
|
|
146
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
147
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
148
|
+
return out;
|
|
149
|
+
}
|
|
150
|
+
function orderPanelPredicate(value) {
|
|
151
|
+
if (check15(value))
|
|
152
|
+
return orderPanelComparison(value);
|
|
153
|
+
if (check19(value))
|
|
154
|
+
return orderPanelExists(value);
|
|
155
|
+
if (check21(value))
|
|
156
|
+
return orderPanelAll(value);
|
|
157
|
+
if (check24(value))
|
|
158
|
+
return orderPanelAny(value);
|
|
159
|
+
throw new TypeError('Invalid closed union');
|
|
160
|
+
}
|
|
161
|
+
function orderPanelPreviewControl(value) {
|
|
162
|
+
const out = {};
|
|
163
|
+
out["id"] = value["id"];
|
|
164
|
+
out["kind"] = value["kind"];
|
|
165
|
+
if (value["label"] !== undefined)
|
|
166
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
167
|
+
if (value["help"] !== undefined)
|
|
168
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
169
|
+
if (value["visible"] !== undefined)
|
|
170
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
171
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
172
|
+
return out;
|
|
173
|
+
}
|
|
174
|
+
function orderPanelResourceLinkControl(value) {
|
|
175
|
+
const out = {};
|
|
176
|
+
out["id"] = value["id"];
|
|
177
|
+
out["kind"] = value["kind"];
|
|
178
|
+
if (value["label"] !== undefined)
|
|
179
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
180
|
+
if (value["help"] !== undefined)
|
|
181
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
182
|
+
if (value["visible"] !== undefined)
|
|
183
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
184
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
185
|
+
return out;
|
|
186
|
+
}
|
|
187
|
+
function orderPanelRowControl(value) {
|
|
188
|
+
const out = {};
|
|
189
|
+
out["id"] = value["id"];
|
|
190
|
+
out["kind"] = value["kind"];
|
|
191
|
+
if (value["label"] !== undefined)
|
|
192
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
193
|
+
if (value["help"] !== undefined)
|
|
194
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
195
|
+
if (value["visible"] !== undefined)
|
|
196
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
197
|
+
out["children"] = value["children"];
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
function orderPanelSectionControl(value) {
|
|
201
|
+
const out = {};
|
|
202
|
+
out["id"] = value["id"];
|
|
203
|
+
out["kind"] = value["kind"];
|
|
204
|
+
if (value["label"] !== undefined)
|
|
205
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
206
|
+
if (value["help"] !== undefined)
|
|
207
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
208
|
+
if (value["visible"] !== undefined)
|
|
209
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
210
|
+
out["children"] = value["children"];
|
|
211
|
+
return out;
|
|
212
|
+
}
|
|
213
|
+
function orderPanelSelectControl(value) {
|
|
214
|
+
const out = {};
|
|
215
|
+
out["id"] = value["id"];
|
|
216
|
+
out["kind"] = value["kind"];
|
|
217
|
+
if (value["label"] !== undefined)
|
|
218
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
219
|
+
if (value["help"] !== undefined)
|
|
220
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
221
|
+
if (value["visible"] !== undefined)
|
|
222
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
223
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
224
|
+
out["optionsBinding"] = orderPanelValueRef(value["optionsBinding"]);
|
|
225
|
+
return out;
|
|
226
|
+
}
|
|
227
|
+
function orderPanelTableControl(value) {
|
|
228
|
+
const out = {};
|
|
229
|
+
out["id"] = value["id"];
|
|
230
|
+
out["kind"] = value["kind"];
|
|
231
|
+
if (value["label"] !== undefined)
|
|
232
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
233
|
+
if (value["help"] !== undefined)
|
|
234
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
235
|
+
if (value["visible"] !== undefined)
|
|
236
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
237
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
238
|
+
out["pageSize"] = value["pageSize"];
|
|
239
|
+
return out;
|
|
240
|
+
}
|
|
241
|
+
function orderPanelTextControl(value) {
|
|
242
|
+
const out = {};
|
|
243
|
+
out["id"] = value["id"];
|
|
244
|
+
out["kind"] = value["kind"];
|
|
245
|
+
if (value["label"] !== undefined)
|
|
246
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
247
|
+
if (value["help"] !== undefined)
|
|
248
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
249
|
+
if (value["visible"] !== undefined)
|
|
250
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
251
|
+
out["text"] = Object.fromEntries(Object.entries(value["text"]));
|
|
252
|
+
return out;
|
|
253
|
+
}
|
|
254
|
+
function orderPanelTextInputControl(value) {
|
|
255
|
+
const out = {};
|
|
256
|
+
out["id"] = value["id"];
|
|
257
|
+
out["kind"] = value["kind"];
|
|
258
|
+
if (value["label"] !== undefined)
|
|
259
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
260
|
+
if (value["help"] !== undefined)
|
|
261
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
262
|
+
if (value["visible"] !== undefined)
|
|
263
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
264
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
265
|
+
return out;
|
|
266
|
+
}
|
|
267
|
+
function orderPanelToggleControl(value) {
|
|
268
|
+
const out = {};
|
|
269
|
+
out["id"] = value["id"];
|
|
270
|
+
out["kind"] = value["kind"];
|
|
271
|
+
if (value["label"] !== undefined)
|
|
272
|
+
out["label"] = Object.fromEntries(Object.entries(value["label"]));
|
|
273
|
+
if (value["help"] !== undefined)
|
|
274
|
+
out["help"] = Object.fromEntries(Object.entries(value["help"]));
|
|
275
|
+
if (value["visible"] !== undefined)
|
|
276
|
+
out["visible"] = orderPanelPredicate(value["visible"]);
|
|
277
|
+
out["binding"] = orderPanelValueRef(value["binding"]);
|
|
278
|
+
return out;
|
|
279
|
+
}
|
|
280
|
+
function orderPanelValueRef(value) {
|
|
281
|
+
const out = {};
|
|
282
|
+
out["property"] = value["property"];
|
|
283
|
+
return out;
|
|
284
|
+
}
|
|
285
|
+
function check0(value, depth = 0) {
|
|
286
|
+
if (depth >= 128)
|
|
287
|
+
return false;
|
|
288
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
289
|
+
return false;
|
|
290
|
+
const object = value;
|
|
291
|
+
for (const key of Object.keys(object)) {
|
|
292
|
+
switch (key) {
|
|
293
|
+
case "schemaVersion":
|
|
294
|
+
if (!check1(object[key], depth + 1))
|
|
295
|
+
return false;
|
|
296
|
+
break;
|
|
297
|
+
case "inputSchemaId":
|
|
298
|
+
if (!check2(object[key], depth + 1))
|
|
299
|
+
return false;
|
|
300
|
+
break;
|
|
301
|
+
case "controls":
|
|
302
|
+
if (!check3(object[key], depth + 1))
|
|
303
|
+
return false;
|
|
304
|
+
break;
|
|
305
|
+
default: return false;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if (!Object.prototype.hasOwnProperty.call(object, "schemaVersion"))
|
|
309
|
+
return false;
|
|
310
|
+
if (!Object.prototype.hasOwnProperty.call(object, "controls"))
|
|
311
|
+
return false;
|
|
312
|
+
if (!panelTree(value))
|
|
313
|
+
return false;
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
function check1(value, depth = 0) {
|
|
317
|
+
if (depth >= 128)
|
|
318
|
+
return false;
|
|
319
|
+
if (typeof value !== 'string' || !validText(value))
|
|
320
|
+
return false;
|
|
321
|
+
if (value !== "panel.v1")
|
|
322
|
+
return false;
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
function check2(value, depth = 0) {
|
|
326
|
+
if (depth >= 128)
|
|
327
|
+
return false;
|
|
328
|
+
if (typeof value !== 'string' || !validText(value))
|
|
329
|
+
return false;
|
|
330
|
+
if ([...value].length < 1)
|
|
331
|
+
return false;
|
|
332
|
+
if ([...value].length > 128)
|
|
333
|
+
return false;
|
|
334
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
335
|
+
return false;
|
|
336
|
+
return true;
|
|
337
|
+
}
|
|
338
|
+
function check3(value, depth = 0) {
|
|
339
|
+
if (depth >= 128)
|
|
340
|
+
return false;
|
|
341
|
+
if (!Array.isArray(value))
|
|
342
|
+
return false;
|
|
343
|
+
if (value.length < 0)
|
|
344
|
+
return false;
|
|
345
|
+
if (value.length > 1000)
|
|
346
|
+
return false;
|
|
347
|
+
if (!value.every(item => check4(item, depth + 1)))
|
|
348
|
+
return false;
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
function check4(value, depth = 0) {
|
|
352
|
+
if (depth >= 128)
|
|
353
|
+
return false;
|
|
354
|
+
if ((check5(value, depth + 1) ? 1 : 0) + (check29(value, depth + 1) ? 1 : 0) + (check40(value, depth + 1) ? 1 : 0) + (check51(value, depth + 1) ? 1 : 0) + (check63(value, depth + 1) ? 1 : 0) + (check72(value, depth + 1) ? 1 : 0) + (check81(value, depth + 1) ? 1 : 0) + (check90(value, depth + 1) ? 1 : 0) + (check99(value, depth + 1) ? 1 : 0) + (check112(value, depth + 1) ? 1 : 0) + (check122(value, depth + 1) ? 1 : 0) + (check132(value, depth + 1) ? 1 : 0) + (check141(value, depth + 1) ? 1 : 0) !== 1)
|
|
355
|
+
return false;
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
function check5(value, depth = 0) {
|
|
359
|
+
if (depth >= 128)
|
|
360
|
+
return false;
|
|
361
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
362
|
+
return false;
|
|
363
|
+
const object = value;
|
|
364
|
+
for (const key of Object.keys(object)) {
|
|
365
|
+
switch (key) {
|
|
366
|
+
case "id":
|
|
367
|
+
if (!check6(object[key], depth + 1))
|
|
368
|
+
return false;
|
|
369
|
+
break;
|
|
370
|
+
case "kind":
|
|
371
|
+
if (!check7(object[key], depth + 1))
|
|
372
|
+
return false;
|
|
373
|
+
break;
|
|
374
|
+
case "label":
|
|
375
|
+
if (!check8(object[key], depth + 1))
|
|
376
|
+
return false;
|
|
377
|
+
break;
|
|
378
|
+
case "help":
|
|
379
|
+
if (!check11(object[key], depth + 1))
|
|
380
|
+
return false;
|
|
381
|
+
break;
|
|
382
|
+
case "visible":
|
|
383
|
+
if (!check14(object[key], depth + 1))
|
|
384
|
+
return false;
|
|
385
|
+
break;
|
|
386
|
+
case "children":
|
|
387
|
+
if (!check27(object[key], depth + 1))
|
|
388
|
+
return false;
|
|
389
|
+
break;
|
|
390
|
+
default: return false;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
394
|
+
return false;
|
|
395
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
396
|
+
return false;
|
|
397
|
+
if (!Object.prototype.hasOwnProperty.call(object, "children"))
|
|
398
|
+
return false;
|
|
399
|
+
return true;
|
|
400
|
+
}
|
|
401
|
+
function check6(value, depth = 0) {
|
|
402
|
+
if (depth >= 128)
|
|
403
|
+
return false;
|
|
404
|
+
if (typeof value !== 'string' || !validText(value))
|
|
405
|
+
return false;
|
|
406
|
+
if ([...value].length < 1)
|
|
407
|
+
return false;
|
|
408
|
+
if ([...value].length > 128)
|
|
409
|
+
return false;
|
|
410
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
411
|
+
return false;
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
function check7(value, depth = 0) {
|
|
415
|
+
if (depth >= 128)
|
|
416
|
+
return false;
|
|
417
|
+
if (typeof value !== 'string' || !validText(value))
|
|
418
|
+
return false;
|
|
419
|
+
if (value !== "column")
|
|
420
|
+
return false;
|
|
421
|
+
return true;
|
|
422
|
+
}
|
|
423
|
+
function check8(value, depth = 0) {
|
|
424
|
+
if (depth >= 128)
|
|
425
|
+
return false;
|
|
426
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
427
|
+
return false;
|
|
428
|
+
const object = value;
|
|
429
|
+
const keys = Object.keys(object);
|
|
430
|
+
for (const key of keys) {
|
|
431
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check10(object[key], depth + 1))
|
|
432
|
+
return false;
|
|
433
|
+
if ([...key].length > 255)
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
if (keys.length < 1)
|
|
437
|
+
return false;
|
|
438
|
+
if (keys.length > 16)
|
|
439
|
+
return false;
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
function check9(value, depth = 0) {
|
|
443
|
+
if (depth >= 128)
|
|
444
|
+
return false;
|
|
445
|
+
if (typeof value !== 'string' || !validText(value))
|
|
446
|
+
return false;
|
|
447
|
+
if ([...value].length > 255)
|
|
448
|
+
return false;
|
|
449
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
450
|
+
return false;
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
function check10(value, depth = 0) {
|
|
454
|
+
if (depth >= 128)
|
|
455
|
+
return false;
|
|
456
|
+
if (typeof value !== 'string' || !validText(value))
|
|
457
|
+
return false;
|
|
458
|
+
if ([...value].length < 1)
|
|
459
|
+
return false;
|
|
460
|
+
if ([...value].length > 256)
|
|
461
|
+
return false;
|
|
462
|
+
return true;
|
|
463
|
+
}
|
|
464
|
+
function check11(value, depth = 0) {
|
|
465
|
+
if (depth >= 128)
|
|
466
|
+
return false;
|
|
467
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
468
|
+
return false;
|
|
469
|
+
const object = value;
|
|
470
|
+
const keys = Object.keys(object);
|
|
471
|
+
for (const key of keys) {
|
|
472
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check13(object[key], depth + 1))
|
|
473
|
+
return false;
|
|
474
|
+
if ([...key].length > 255)
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
477
|
+
if (keys.length < 1)
|
|
478
|
+
return false;
|
|
479
|
+
if (keys.length > 16)
|
|
480
|
+
return false;
|
|
481
|
+
return true;
|
|
482
|
+
}
|
|
483
|
+
function check12(value, depth = 0) {
|
|
484
|
+
if (depth >= 128)
|
|
485
|
+
return false;
|
|
486
|
+
if (typeof value !== 'string' || !validText(value))
|
|
487
|
+
return false;
|
|
488
|
+
if ([...value].length > 255)
|
|
489
|
+
return false;
|
|
490
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
491
|
+
return false;
|
|
492
|
+
return true;
|
|
493
|
+
}
|
|
494
|
+
function check13(value, depth = 0) {
|
|
495
|
+
if (depth >= 128)
|
|
496
|
+
return false;
|
|
497
|
+
if (typeof value !== 'string' || !validText(value))
|
|
498
|
+
return false;
|
|
499
|
+
if ([...value].length < 1)
|
|
500
|
+
return false;
|
|
501
|
+
if ([...value].length > 256)
|
|
502
|
+
return false;
|
|
503
|
+
return true;
|
|
504
|
+
}
|
|
505
|
+
function check14(value, depth = 0) {
|
|
506
|
+
if (depth >= 128)
|
|
507
|
+
return false;
|
|
508
|
+
if ((check15(value, depth + 1) ? 1 : 0) + (check19(value, depth + 1) ? 1 : 0) + (check21(value, depth + 1) ? 1 : 0) + (check24(value, depth + 1) ? 1 : 0) !== 1)
|
|
509
|
+
return false;
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
function check15(value, depth = 0) {
|
|
513
|
+
if (depth >= 128)
|
|
514
|
+
return false;
|
|
515
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
516
|
+
return false;
|
|
517
|
+
const object = value;
|
|
518
|
+
for (const key of Object.keys(object)) {
|
|
519
|
+
switch (key) {
|
|
520
|
+
case "operator":
|
|
521
|
+
if (!check16(object[key], depth + 1))
|
|
522
|
+
return false;
|
|
523
|
+
break;
|
|
524
|
+
case "left":
|
|
525
|
+
if (!check17(object[key], depth + 1))
|
|
526
|
+
return false;
|
|
527
|
+
break;
|
|
528
|
+
case "right":
|
|
529
|
+
if (!check17(object[key], depth + 1))
|
|
530
|
+
return false;
|
|
531
|
+
break;
|
|
532
|
+
default: return false;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
if (!Object.prototype.hasOwnProperty.call(object, "operator"))
|
|
536
|
+
return false;
|
|
537
|
+
if (!Object.prototype.hasOwnProperty.call(object, "left"))
|
|
538
|
+
return false;
|
|
539
|
+
if (!Object.prototype.hasOwnProperty.call(object, "right"))
|
|
540
|
+
return false;
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
543
|
+
function check16(value, depth = 0) {
|
|
544
|
+
if (depth >= 128)
|
|
545
|
+
return false;
|
|
546
|
+
if (typeof value !== 'string' || !validText(value))
|
|
547
|
+
return false;
|
|
548
|
+
if (value !== "eq" && value !== "ne" && value !== "lt" && value !== "le" && value !== "gt" && value !== "ge")
|
|
549
|
+
return false;
|
|
550
|
+
return true;
|
|
551
|
+
}
|
|
552
|
+
function check17(value, depth = 0) {
|
|
553
|
+
if (depth >= 128)
|
|
554
|
+
return false;
|
|
555
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
556
|
+
return false;
|
|
557
|
+
const object = value;
|
|
558
|
+
for (const key of Object.keys(object)) {
|
|
559
|
+
switch (key) {
|
|
560
|
+
case "property":
|
|
561
|
+
if (!check18(object[key], depth + 1))
|
|
562
|
+
return false;
|
|
563
|
+
break;
|
|
564
|
+
default: return false;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (!Object.prototype.hasOwnProperty.call(object, "property"))
|
|
568
|
+
return false;
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
571
|
+
function check18(value, depth = 0) {
|
|
572
|
+
if (depth >= 128)
|
|
573
|
+
return false;
|
|
574
|
+
if (typeof value !== 'string' || !validText(value))
|
|
575
|
+
return false;
|
|
576
|
+
if ([...value].length < 1)
|
|
577
|
+
return false;
|
|
578
|
+
if ([...value].length > 128)
|
|
579
|
+
return false;
|
|
580
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
581
|
+
return false;
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
function check19(value, depth = 0) {
|
|
585
|
+
if (depth >= 128)
|
|
586
|
+
return false;
|
|
587
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
588
|
+
return false;
|
|
589
|
+
const object = value;
|
|
590
|
+
for (const key of Object.keys(object)) {
|
|
591
|
+
switch (key) {
|
|
592
|
+
case "operator":
|
|
593
|
+
if (!check20(object[key], depth + 1))
|
|
594
|
+
return false;
|
|
595
|
+
break;
|
|
596
|
+
case "value":
|
|
597
|
+
if (!check17(object[key], depth + 1))
|
|
598
|
+
return false;
|
|
599
|
+
break;
|
|
600
|
+
default: return false;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (!Object.prototype.hasOwnProperty.call(object, "operator"))
|
|
604
|
+
return false;
|
|
605
|
+
if (!Object.prototype.hasOwnProperty.call(object, "value"))
|
|
606
|
+
return false;
|
|
607
|
+
return true;
|
|
608
|
+
}
|
|
609
|
+
function check20(value, depth = 0) {
|
|
610
|
+
if (depth >= 128)
|
|
611
|
+
return false;
|
|
612
|
+
if (typeof value !== 'string' || !validText(value))
|
|
613
|
+
return false;
|
|
614
|
+
if (value !== "exists")
|
|
615
|
+
return false;
|
|
616
|
+
return true;
|
|
617
|
+
}
|
|
618
|
+
function check21(value, depth = 0) {
|
|
619
|
+
if (depth >= 128)
|
|
620
|
+
return false;
|
|
621
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
622
|
+
return false;
|
|
623
|
+
const object = value;
|
|
624
|
+
for (const key of Object.keys(object)) {
|
|
625
|
+
switch (key) {
|
|
626
|
+
case "operator":
|
|
627
|
+
if (!check22(object[key], depth + 1))
|
|
628
|
+
return false;
|
|
629
|
+
break;
|
|
630
|
+
case "predicates":
|
|
631
|
+
if (!check23(object[key], depth + 1))
|
|
632
|
+
return false;
|
|
633
|
+
break;
|
|
634
|
+
default: return false;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
if (!Object.prototype.hasOwnProperty.call(object, "operator"))
|
|
638
|
+
return false;
|
|
639
|
+
if (!Object.prototype.hasOwnProperty.call(object, "predicates"))
|
|
640
|
+
return false;
|
|
641
|
+
return true;
|
|
642
|
+
}
|
|
643
|
+
function check22(value, depth = 0) {
|
|
644
|
+
if (depth >= 128)
|
|
645
|
+
return false;
|
|
646
|
+
if (typeof value !== 'string' || !validText(value))
|
|
647
|
+
return false;
|
|
648
|
+
if (value !== "all")
|
|
649
|
+
return false;
|
|
650
|
+
return true;
|
|
651
|
+
}
|
|
652
|
+
function check23(value, depth = 0) {
|
|
653
|
+
if (depth >= 128)
|
|
654
|
+
return false;
|
|
655
|
+
if (!Array.isArray(value))
|
|
656
|
+
return false;
|
|
657
|
+
if (value.length < 1)
|
|
658
|
+
return false;
|
|
659
|
+
if (value.length > 128)
|
|
660
|
+
return false;
|
|
661
|
+
if (!value.every(item => check14(item, depth + 1)))
|
|
662
|
+
return false;
|
|
663
|
+
return true;
|
|
664
|
+
}
|
|
665
|
+
function check24(value, depth = 0) {
|
|
666
|
+
if (depth >= 128)
|
|
667
|
+
return false;
|
|
668
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
669
|
+
return false;
|
|
670
|
+
const object = value;
|
|
671
|
+
for (const key of Object.keys(object)) {
|
|
672
|
+
switch (key) {
|
|
673
|
+
case "operator":
|
|
674
|
+
if (!check25(object[key], depth + 1))
|
|
675
|
+
return false;
|
|
676
|
+
break;
|
|
677
|
+
case "predicates":
|
|
678
|
+
if (!check26(object[key], depth + 1))
|
|
679
|
+
return false;
|
|
680
|
+
break;
|
|
681
|
+
default: return false;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
if (!Object.prototype.hasOwnProperty.call(object, "operator"))
|
|
685
|
+
return false;
|
|
686
|
+
if (!Object.prototype.hasOwnProperty.call(object, "predicates"))
|
|
687
|
+
return false;
|
|
688
|
+
return true;
|
|
689
|
+
}
|
|
690
|
+
function check25(value, depth = 0) {
|
|
691
|
+
if (depth >= 128)
|
|
692
|
+
return false;
|
|
693
|
+
if (typeof value !== 'string' || !validText(value))
|
|
694
|
+
return false;
|
|
695
|
+
if (value !== "any")
|
|
696
|
+
return false;
|
|
697
|
+
return true;
|
|
698
|
+
}
|
|
699
|
+
function check26(value, depth = 0) {
|
|
700
|
+
if (depth >= 128)
|
|
701
|
+
return false;
|
|
702
|
+
if (!Array.isArray(value))
|
|
703
|
+
return false;
|
|
704
|
+
if (value.length < 1)
|
|
705
|
+
return false;
|
|
706
|
+
if (value.length > 128)
|
|
707
|
+
return false;
|
|
708
|
+
if (!value.every(item => check14(item, depth + 1)))
|
|
709
|
+
return false;
|
|
710
|
+
return true;
|
|
711
|
+
}
|
|
712
|
+
function check27(value, depth = 0) {
|
|
713
|
+
if (depth >= 128)
|
|
714
|
+
return false;
|
|
715
|
+
if (!Array.isArray(value))
|
|
716
|
+
return false;
|
|
717
|
+
if (value.length < 0)
|
|
718
|
+
return false;
|
|
719
|
+
if (value.length > 1000)
|
|
720
|
+
return false;
|
|
721
|
+
if (!value.every(item => check28(item, depth + 1)))
|
|
722
|
+
return false;
|
|
723
|
+
return true;
|
|
724
|
+
}
|
|
725
|
+
function check28(value, depth = 0) {
|
|
726
|
+
if (depth >= 128)
|
|
727
|
+
return false;
|
|
728
|
+
if (typeof value !== 'string' || !validText(value))
|
|
729
|
+
return false;
|
|
730
|
+
if ([...value].length < 1)
|
|
731
|
+
return false;
|
|
732
|
+
if ([...value].length > 128)
|
|
733
|
+
return false;
|
|
734
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
735
|
+
return false;
|
|
736
|
+
return true;
|
|
737
|
+
}
|
|
738
|
+
function check29(value, depth = 0) {
|
|
739
|
+
if (depth >= 128)
|
|
740
|
+
return false;
|
|
741
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
742
|
+
return false;
|
|
743
|
+
const object = value;
|
|
744
|
+
for (const key of Object.keys(object)) {
|
|
745
|
+
switch (key) {
|
|
746
|
+
case "id":
|
|
747
|
+
if (!check30(object[key], depth + 1))
|
|
748
|
+
return false;
|
|
749
|
+
break;
|
|
750
|
+
case "kind":
|
|
751
|
+
if (!check31(object[key], depth + 1))
|
|
752
|
+
return false;
|
|
753
|
+
break;
|
|
754
|
+
case "label":
|
|
755
|
+
if (!check32(object[key], depth + 1))
|
|
756
|
+
return false;
|
|
757
|
+
break;
|
|
758
|
+
case "help":
|
|
759
|
+
if (!check35(object[key], depth + 1))
|
|
760
|
+
return false;
|
|
761
|
+
break;
|
|
762
|
+
case "visible":
|
|
763
|
+
if (!check14(object[key], depth + 1))
|
|
764
|
+
return false;
|
|
765
|
+
break;
|
|
766
|
+
case "children":
|
|
767
|
+
if (!check38(object[key], depth + 1))
|
|
768
|
+
return false;
|
|
769
|
+
break;
|
|
770
|
+
default: return false;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
774
|
+
return false;
|
|
775
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
776
|
+
return false;
|
|
777
|
+
if (!Object.prototype.hasOwnProperty.call(object, "children"))
|
|
778
|
+
return false;
|
|
779
|
+
return true;
|
|
780
|
+
}
|
|
781
|
+
function check30(value, depth = 0) {
|
|
782
|
+
if (depth >= 128)
|
|
783
|
+
return false;
|
|
784
|
+
if (typeof value !== 'string' || !validText(value))
|
|
785
|
+
return false;
|
|
786
|
+
if ([...value].length < 1)
|
|
787
|
+
return false;
|
|
788
|
+
if ([...value].length > 128)
|
|
789
|
+
return false;
|
|
790
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
791
|
+
return false;
|
|
792
|
+
return true;
|
|
793
|
+
}
|
|
794
|
+
function check31(value, depth = 0) {
|
|
795
|
+
if (depth >= 128)
|
|
796
|
+
return false;
|
|
797
|
+
if (typeof value !== 'string' || !validText(value))
|
|
798
|
+
return false;
|
|
799
|
+
if (value !== "row")
|
|
800
|
+
return false;
|
|
801
|
+
return true;
|
|
802
|
+
}
|
|
803
|
+
function check32(value, depth = 0) {
|
|
804
|
+
if (depth >= 128)
|
|
805
|
+
return false;
|
|
806
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
807
|
+
return false;
|
|
808
|
+
const object = value;
|
|
809
|
+
const keys = Object.keys(object);
|
|
810
|
+
for (const key of keys) {
|
|
811
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check34(object[key], depth + 1))
|
|
812
|
+
return false;
|
|
813
|
+
if ([...key].length > 255)
|
|
814
|
+
return false;
|
|
815
|
+
}
|
|
816
|
+
if (keys.length < 1)
|
|
817
|
+
return false;
|
|
818
|
+
if (keys.length > 16)
|
|
819
|
+
return false;
|
|
820
|
+
return true;
|
|
821
|
+
}
|
|
822
|
+
function check33(value, depth = 0) {
|
|
823
|
+
if (depth >= 128)
|
|
824
|
+
return false;
|
|
825
|
+
if (typeof value !== 'string' || !validText(value))
|
|
826
|
+
return false;
|
|
827
|
+
if ([...value].length > 255)
|
|
828
|
+
return false;
|
|
829
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
830
|
+
return false;
|
|
831
|
+
return true;
|
|
832
|
+
}
|
|
833
|
+
function check34(value, depth = 0) {
|
|
834
|
+
if (depth >= 128)
|
|
835
|
+
return false;
|
|
836
|
+
if (typeof value !== 'string' || !validText(value))
|
|
837
|
+
return false;
|
|
838
|
+
if ([...value].length < 1)
|
|
839
|
+
return false;
|
|
840
|
+
if ([...value].length > 256)
|
|
841
|
+
return false;
|
|
842
|
+
return true;
|
|
843
|
+
}
|
|
844
|
+
function check35(value, depth = 0) {
|
|
845
|
+
if (depth >= 128)
|
|
846
|
+
return false;
|
|
847
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
848
|
+
return false;
|
|
849
|
+
const object = value;
|
|
850
|
+
const keys = Object.keys(object);
|
|
851
|
+
for (const key of keys) {
|
|
852
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check37(object[key], depth + 1))
|
|
853
|
+
return false;
|
|
854
|
+
if ([...key].length > 255)
|
|
855
|
+
return false;
|
|
856
|
+
}
|
|
857
|
+
if (keys.length < 1)
|
|
858
|
+
return false;
|
|
859
|
+
if (keys.length > 16)
|
|
860
|
+
return false;
|
|
861
|
+
return true;
|
|
862
|
+
}
|
|
863
|
+
function check36(value, depth = 0) {
|
|
864
|
+
if (depth >= 128)
|
|
865
|
+
return false;
|
|
866
|
+
if (typeof value !== 'string' || !validText(value))
|
|
867
|
+
return false;
|
|
868
|
+
if ([...value].length > 255)
|
|
869
|
+
return false;
|
|
870
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
871
|
+
return false;
|
|
872
|
+
return true;
|
|
873
|
+
}
|
|
874
|
+
function check37(value, depth = 0) {
|
|
875
|
+
if (depth >= 128)
|
|
876
|
+
return false;
|
|
877
|
+
if (typeof value !== 'string' || !validText(value))
|
|
878
|
+
return false;
|
|
879
|
+
if ([...value].length < 1)
|
|
880
|
+
return false;
|
|
881
|
+
if ([...value].length > 256)
|
|
882
|
+
return false;
|
|
883
|
+
return true;
|
|
884
|
+
}
|
|
885
|
+
function check38(value, depth = 0) {
|
|
886
|
+
if (depth >= 128)
|
|
887
|
+
return false;
|
|
888
|
+
if (!Array.isArray(value))
|
|
889
|
+
return false;
|
|
890
|
+
if (value.length < 0)
|
|
891
|
+
return false;
|
|
892
|
+
if (value.length > 1000)
|
|
893
|
+
return false;
|
|
894
|
+
if (!value.every(item => check39(item, depth + 1)))
|
|
895
|
+
return false;
|
|
896
|
+
return true;
|
|
897
|
+
}
|
|
898
|
+
function check39(value, depth = 0) {
|
|
899
|
+
if (depth >= 128)
|
|
900
|
+
return false;
|
|
901
|
+
if (typeof value !== 'string' || !validText(value))
|
|
902
|
+
return false;
|
|
903
|
+
if ([...value].length < 1)
|
|
904
|
+
return false;
|
|
905
|
+
if ([...value].length > 128)
|
|
906
|
+
return false;
|
|
907
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
908
|
+
return false;
|
|
909
|
+
return true;
|
|
910
|
+
}
|
|
911
|
+
function check40(value, depth = 0) {
|
|
912
|
+
if (depth >= 128)
|
|
913
|
+
return false;
|
|
914
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
915
|
+
return false;
|
|
916
|
+
const object = value;
|
|
917
|
+
for (const key of Object.keys(object)) {
|
|
918
|
+
switch (key) {
|
|
919
|
+
case "id":
|
|
920
|
+
if (!check41(object[key], depth + 1))
|
|
921
|
+
return false;
|
|
922
|
+
break;
|
|
923
|
+
case "kind":
|
|
924
|
+
if (!check42(object[key], depth + 1))
|
|
925
|
+
return false;
|
|
926
|
+
break;
|
|
927
|
+
case "label":
|
|
928
|
+
if (!check43(object[key], depth + 1))
|
|
929
|
+
return false;
|
|
930
|
+
break;
|
|
931
|
+
case "help":
|
|
932
|
+
if (!check46(object[key], depth + 1))
|
|
933
|
+
return false;
|
|
934
|
+
break;
|
|
935
|
+
case "visible":
|
|
936
|
+
if (!check14(object[key], depth + 1))
|
|
937
|
+
return false;
|
|
938
|
+
break;
|
|
939
|
+
case "children":
|
|
940
|
+
if (!check49(object[key], depth + 1))
|
|
941
|
+
return false;
|
|
942
|
+
break;
|
|
943
|
+
default: return false;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
947
|
+
return false;
|
|
948
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
949
|
+
return false;
|
|
950
|
+
if (!Object.prototype.hasOwnProperty.call(object, "children"))
|
|
951
|
+
return false;
|
|
952
|
+
return true;
|
|
953
|
+
}
|
|
954
|
+
function check41(value, depth = 0) {
|
|
955
|
+
if (depth >= 128)
|
|
956
|
+
return false;
|
|
957
|
+
if (typeof value !== 'string' || !validText(value))
|
|
958
|
+
return false;
|
|
959
|
+
if ([...value].length < 1)
|
|
960
|
+
return false;
|
|
961
|
+
if ([...value].length > 128)
|
|
962
|
+
return false;
|
|
963
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
964
|
+
return false;
|
|
965
|
+
return true;
|
|
966
|
+
}
|
|
967
|
+
function check42(value, depth = 0) {
|
|
968
|
+
if (depth >= 128)
|
|
969
|
+
return false;
|
|
970
|
+
if (typeof value !== 'string' || !validText(value))
|
|
971
|
+
return false;
|
|
972
|
+
if (value !== "section")
|
|
973
|
+
return false;
|
|
974
|
+
return true;
|
|
975
|
+
}
|
|
976
|
+
function check43(value, depth = 0) {
|
|
977
|
+
if (depth >= 128)
|
|
978
|
+
return false;
|
|
979
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
980
|
+
return false;
|
|
981
|
+
const object = value;
|
|
982
|
+
const keys = Object.keys(object);
|
|
983
|
+
for (const key of keys) {
|
|
984
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check45(object[key], depth + 1))
|
|
985
|
+
return false;
|
|
986
|
+
if ([...key].length > 255)
|
|
987
|
+
return false;
|
|
988
|
+
}
|
|
989
|
+
if (keys.length < 1)
|
|
990
|
+
return false;
|
|
991
|
+
if (keys.length > 16)
|
|
992
|
+
return false;
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
function check44(value, depth = 0) {
|
|
996
|
+
if (depth >= 128)
|
|
997
|
+
return false;
|
|
998
|
+
if (typeof value !== 'string' || !validText(value))
|
|
999
|
+
return false;
|
|
1000
|
+
if ([...value].length > 255)
|
|
1001
|
+
return false;
|
|
1002
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1003
|
+
return false;
|
|
1004
|
+
return true;
|
|
1005
|
+
}
|
|
1006
|
+
function check45(value, depth = 0) {
|
|
1007
|
+
if (depth >= 128)
|
|
1008
|
+
return false;
|
|
1009
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1010
|
+
return false;
|
|
1011
|
+
if ([...value].length < 1)
|
|
1012
|
+
return false;
|
|
1013
|
+
if ([...value].length > 256)
|
|
1014
|
+
return false;
|
|
1015
|
+
return true;
|
|
1016
|
+
}
|
|
1017
|
+
function check46(value, depth = 0) {
|
|
1018
|
+
if (depth >= 128)
|
|
1019
|
+
return false;
|
|
1020
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1021
|
+
return false;
|
|
1022
|
+
const object = value;
|
|
1023
|
+
const keys = Object.keys(object);
|
|
1024
|
+
for (const key of keys) {
|
|
1025
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check48(object[key], depth + 1))
|
|
1026
|
+
return false;
|
|
1027
|
+
if ([...key].length > 255)
|
|
1028
|
+
return false;
|
|
1029
|
+
}
|
|
1030
|
+
if (keys.length < 1)
|
|
1031
|
+
return false;
|
|
1032
|
+
if (keys.length > 16)
|
|
1033
|
+
return false;
|
|
1034
|
+
return true;
|
|
1035
|
+
}
|
|
1036
|
+
function check47(value, depth = 0) {
|
|
1037
|
+
if (depth >= 128)
|
|
1038
|
+
return false;
|
|
1039
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1040
|
+
return false;
|
|
1041
|
+
if ([...value].length > 255)
|
|
1042
|
+
return false;
|
|
1043
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1044
|
+
return false;
|
|
1045
|
+
return true;
|
|
1046
|
+
}
|
|
1047
|
+
function check48(value, depth = 0) {
|
|
1048
|
+
if (depth >= 128)
|
|
1049
|
+
return false;
|
|
1050
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1051
|
+
return false;
|
|
1052
|
+
if ([...value].length < 1)
|
|
1053
|
+
return false;
|
|
1054
|
+
if ([...value].length > 256)
|
|
1055
|
+
return false;
|
|
1056
|
+
return true;
|
|
1057
|
+
}
|
|
1058
|
+
function check49(value, depth = 0) {
|
|
1059
|
+
if (depth >= 128)
|
|
1060
|
+
return false;
|
|
1061
|
+
if (!Array.isArray(value))
|
|
1062
|
+
return false;
|
|
1063
|
+
if (value.length < 0)
|
|
1064
|
+
return false;
|
|
1065
|
+
if (value.length > 1000)
|
|
1066
|
+
return false;
|
|
1067
|
+
if (!value.every(item => check50(item, depth + 1)))
|
|
1068
|
+
return false;
|
|
1069
|
+
return true;
|
|
1070
|
+
}
|
|
1071
|
+
function check50(value, depth = 0) {
|
|
1072
|
+
if (depth >= 128)
|
|
1073
|
+
return false;
|
|
1074
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1075
|
+
return false;
|
|
1076
|
+
if ([...value].length < 1)
|
|
1077
|
+
return false;
|
|
1078
|
+
if ([...value].length > 128)
|
|
1079
|
+
return false;
|
|
1080
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1081
|
+
return false;
|
|
1082
|
+
return true;
|
|
1083
|
+
}
|
|
1084
|
+
function check51(value, depth = 0) {
|
|
1085
|
+
if (depth >= 128)
|
|
1086
|
+
return false;
|
|
1087
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1088
|
+
return false;
|
|
1089
|
+
const object = value;
|
|
1090
|
+
for (const key of Object.keys(object)) {
|
|
1091
|
+
switch (key) {
|
|
1092
|
+
case "id":
|
|
1093
|
+
if (!check52(object[key], depth + 1))
|
|
1094
|
+
return false;
|
|
1095
|
+
break;
|
|
1096
|
+
case "kind":
|
|
1097
|
+
if (!check53(object[key], depth + 1))
|
|
1098
|
+
return false;
|
|
1099
|
+
break;
|
|
1100
|
+
case "label":
|
|
1101
|
+
if (!check54(object[key], depth + 1))
|
|
1102
|
+
return false;
|
|
1103
|
+
break;
|
|
1104
|
+
case "help":
|
|
1105
|
+
if (!check57(object[key], depth + 1))
|
|
1106
|
+
return false;
|
|
1107
|
+
break;
|
|
1108
|
+
case "visible":
|
|
1109
|
+
if (!check14(object[key], depth + 1))
|
|
1110
|
+
return false;
|
|
1111
|
+
break;
|
|
1112
|
+
case "text":
|
|
1113
|
+
if (!check60(object[key], depth + 1))
|
|
1114
|
+
return false;
|
|
1115
|
+
break;
|
|
1116
|
+
default: return false;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
1120
|
+
return false;
|
|
1121
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
1122
|
+
return false;
|
|
1123
|
+
if (!Object.prototype.hasOwnProperty.call(object, "text"))
|
|
1124
|
+
return false;
|
|
1125
|
+
return true;
|
|
1126
|
+
}
|
|
1127
|
+
function check52(value, depth = 0) {
|
|
1128
|
+
if (depth >= 128)
|
|
1129
|
+
return false;
|
|
1130
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1131
|
+
return false;
|
|
1132
|
+
if ([...value].length < 1)
|
|
1133
|
+
return false;
|
|
1134
|
+
if ([...value].length > 128)
|
|
1135
|
+
return false;
|
|
1136
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1137
|
+
return false;
|
|
1138
|
+
return true;
|
|
1139
|
+
}
|
|
1140
|
+
function check53(value, depth = 0) {
|
|
1141
|
+
if (depth >= 128)
|
|
1142
|
+
return false;
|
|
1143
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1144
|
+
return false;
|
|
1145
|
+
if (value !== "text")
|
|
1146
|
+
return false;
|
|
1147
|
+
return true;
|
|
1148
|
+
}
|
|
1149
|
+
function check54(value, depth = 0) {
|
|
1150
|
+
if (depth >= 128)
|
|
1151
|
+
return false;
|
|
1152
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1153
|
+
return false;
|
|
1154
|
+
const object = value;
|
|
1155
|
+
const keys = Object.keys(object);
|
|
1156
|
+
for (const key of keys) {
|
|
1157
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check56(object[key], depth + 1))
|
|
1158
|
+
return false;
|
|
1159
|
+
if ([...key].length > 255)
|
|
1160
|
+
return false;
|
|
1161
|
+
}
|
|
1162
|
+
if (keys.length < 1)
|
|
1163
|
+
return false;
|
|
1164
|
+
if (keys.length > 16)
|
|
1165
|
+
return false;
|
|
1166
|
+
return true;
|
|
1167
|
+
}
|
|
1168
|
+
function check55(value, depth = 0) {
|
|
1169
|
+
if (depth >= 128)
|
|
1170
|
+
return false;
|
|
1171
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1172
|
+
return false;
|
|
1173
|
+
if ([...value].length > 255)
|
|
1174
|
+
return false;
|
|
1175
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1176
|
+
return false;
|
|
1177
|
+
return true;
|
|
1178
|
+
}
|
|
1179
|
+
function check56(value, depth = 0) {
|
|
1180
|
+
if (depth >= 128)
|
|
1181
|
+
return false;
|
|
1182
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1183
|
+
return false;
|
|
1184
|
+
if ([...value].length < 1)
|
|
1185
|
+
return false;
|
|
1186
|
+
if ([...value].length > 256)
|
|
1187
|
+
return false;
|
|
1188
|
+
return true;
|
|
1189
|
+
}
|
|
1190
|
+
function check57(value, depth = 0) {
|
|
1191
|
+
if (depth >= 128)
|
|
1192
|
+
return false;
|
|
1193
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1194
|
+
return false;
|
|
1195
|
+
const object = value;
|
|
1196
|
+
const keys = Object.keys(object);
|
|
1197
|
+
for (const key of keys) {
|
|
1198
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check59(object[key], depth + 1))
|
|
1199
|
+
return false;
|
|
1200
|
+
if ([...key].length > 255)
|
|
1201
|
+
return false;
|
|
1202
|
+
}
|
|
1203
|
+
if (keys.length < 1)
|
|
1204
|
+
return false;
|
|
1205
|
+
if (keys.length > 16)
|
|
1206
|
+
return false;
|
|
1207
|
+
return true;
|
|
1208
|
+
}
|
|
1209
|
+
function check58(value, depth = 0) {
|
|
1210
|
+
if (depth >= 128)
|
|
1211
|
+
return false;
|
|
1212
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1213
|
+
return false;
|
|
1214
|
+
if ([...value].length > 255)
|
|
1215
|
+
return false;
|
|
1216
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1217
|
+
return false;
|
|
1218
|
+
return true;
|
|
1219
|
+
}
|
|
1220
|
+
function check59(value, depth = 0) {
|
|
1221
|
+
if (depth >= 128)
|
|
1222
|
+
return false;
|
|
1223
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1224
|
+
return false;
|
|
1225
|
+
if ([...value].length < 1)
|
|
1226
|
+
return false;
|
|
1227
|
+
if ([...value].length > 256)
|
|
1228
|
+
return false;
|
|
1229
|
+
return true;
|
|
1230
|
+
}
|
|
1231
|
+
function check60(value, depth = 0) {
|
|
1232
|
+
if (depth >= 128)
|
|
1233
|
+
return false;
|
|
1234
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1235
|
+
return false;
|
|
1236
|
+
const object = value;
|
|
1237
|
+
const keys = Object.keys(object);
|
|
1238
|
+
for (const key of keys) {
|
|
1239
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check62(object[key], depth + 1))
|
|
1240
|
+
return false;
|
|
1241
|
+
if ([...key].length > 255)
|
|
1242
|
+
return false;
|
|
1243
|
+
}
|
|
1244
|
+
if (keys.length < 1)
|
|
1245
|
+
return false;
|
|
1246
|
+
if (keys.length > 16)
|
|
1247
|
+
return false;
|
|
1248
|
+
return true;
|
|
1249
|
+
}
|
|
1250
|
+
function check61(value, depth = 0) {
|
|
1251
|
+
if (depth >= 128)
|
|
1252
|
+
return false;
|
|
1253
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1254
|
+
return false;
|
|
1255
|
+
if ([...value].length > 255)
|
|
1256
|
+
return false;
|
|
1257
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1258
|
+
return false;
|
|
1259
|
+
return true;
|
|
1260
|
+
}
|
|
1261
|
+
function check62(value, depth = 0) {
|
|
1262
|
+
if (depth >= 128)
|
|
1263
|
+
return false;
|
|
1264
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1265
|
+
return false;
|
|
1266
|
+
if ([...value].length < 1)
|
|
1267
|
+
return false;
|
|
1268
|
+
if ([...value].length > 256)
|
|
1269
|
+
return false;
|
|
1270
|
+
return true;
|
|
1271
|
+
}
|
|
1272
|
+
function check63(value, depth = 0) {
|
|
1273
|
+
if (depth >= 128)
|
|
1274
|
+
return false;
|
|
1275
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1276
|
+
return false;
|
|
1277
|
+
const object = value;
|
|
1278
|
+
for (const key of Object.keys(object)) {
|
|
1279
|
+
switch (key) {
|
|
1280
|
+
case "id":
|
|
1281
|
+
if (!check64(object[key], depth + 1))
|
|
1282
|
+
return false;
|
|
1283
|
+
break;
|
|
1284
|
+
case "kind":
|
|
1285
|
+
if (!check65(object[key], depth + 1))
|
|
1286
|
+
return false;
|
|
1287
|
+
break;
|
|
1288
|
+
case "label":
|
|
1289
|
+
if (!check66(object[key], depth + 1))
|
|
1290
|
+
return false;
|
|
1291
|
+
break;
|
|
1292
|
+
case "help":
|
|
1293
|
+
if (!check69(object[key], depth + 1))
|
|
1294
|
+
return false;
|
|
1295
|
+
break;
|
|
1296
|
+
case "visible":
|
|
1297
|
+
if (!check14(object[key], depth + 1))
|
|
1298
|
+
return false;
|
|
1299
|
+
break;
|
|
1300
|
+
case "binding":
|
|
1301
|
+
if (!check17(object[key], depth + 1))
|
|
1302
|
+
return false;
|
|
1303
|
+
break;
|
|
1304
|
+
default: return false;
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
1308
|
+
return false;
|
|
1309
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
1310
|
+
return false;
|
|
1311
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
1312
|
+
return false;
|
|
1313
|
+
return true;
|
|
1314
|
+
}
|
|
1315
|
+
function check64(value, depth = 0) {
|
|
1316
|
+
if (depth >= 128)
|
|
1317
|
+
return false;
|
|
1318
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1319
|
+
return false;
|
|
1320
|
+
if ([...value].length < 1)
|
|
1321
|
+
return false;
|
|
1322
|
+
if ([...value].length > 128)
|
|
1323
|
+
return false;
|
|
1324
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1325
|
+
return false;
|
|
1326
|
+
return true;
|
|
1327
|
+
}
|
|
1328
|
+
function check65(value, depth = 0) {
|
|
1329
|
+
if (depth >= 128)
|
|
1330
|
+
return false;
|
|
1331
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1332
|
+
return false;
|
|
1333
|
+
if (value !== "textInput")
|
|
1334
|
+
return false;
|
|
1335
|
+
return true;
|
|
1336
|
+
}
|
|
1337
|
+
function check66(value, depth = 0) {
|
|
1338
|
+
if (depth >= 128)
|
|
1339
|
+
return false;
|
|
1340
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1341
|
+
return false;
|
|
1342
|
+
const object = value;
|
|
1343
|
+
const keys = Object.keys(object);
|
|
1344
|
+
for (const key of keys) {
|
|
1345
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check68(object[key], depth + 1))
|
|
1346
|
+
return false;
|
|
1347
|
+
if ([...key].length > 255)
|
|
1348
|
+
return false;
|
|
1349
|
+
}
|
|
1350
|
+
if (keys.length < 1)
|
|
1351
|
+
return false;
|
|
1352
|
+
if (keys.length > 16)
|
|
1353
|
+
return false;
|
|
1354
|
+
return true;
|
|
1355
|
+
}
|
|
1356
|
+
function check67(value, depth = 0) {
|
|
1357
|
+
if (depth >= 128)
|
|
1358
|
+
return false;
|
|
1359
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1360
|
+
return false;
|
|
1361
|
+
if ([...value].length > 255)
|
|
1362
|
+
return false;
|
|
1363
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1364
|
+
return false;
|
|
1365
|
+
return true;
|
|
1366
|
+
}
|
|
1367
|
+
function check68(value, depth = 0) {
|
|
1368
|
+
if (depth >= 128)
|
|
1369
|
+
return false;
|
|
1370
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1371
|
+
return false;
|
|
1372
|
+
if ([...value].length < 1)
|
|
1373
|
+
return false;
|
|
1374
|
+
if ([...value].length > 256)
|
|
1375
|
+
return false;
|
|
1376
|
+
return true;
|
|
1377
|
+
}
|
|
1378
|
+
function check69(value, depth = 0) {
|
|
1379
|
+
if (depth >= 128)
|
|
1380
|
+
return false;
|
|
1381
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1382
|
+
return false;
|
|
1383
|
+
const object = value;
|
|
1384
|
+
const keys = Object.keys(object);
|
|
1385
|
+
for (const key of keys) {
|
|
1386
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check71(object[key], depth + 1))
|
|
1387
|
+
return false;
|
|
1388
|
+
if ([...key].length > 255)
|
|
1389
|
+
return false;
|
|
1390
|
+
}
|
|
1391
|
+
if (keys.length < 1)
|
|
1392
|
+
return false;
|
|
1393
|
+
if (keys.length > 16)
|
|
1394
|
+
return false;
|
|
1395
|
+
return true;
|
|
1396
|
+
}
|
|
1397
|
+
function check70(value, depth = 0) {
|
|
1398
|
+
if (depth >= 128)
|
|
1399
|
+
return false;
|
|
1400
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1401
|
+
return false;
|
|
1402
|
+
if ([...value].length > 255)
|
|
1403
|
+
return false;
|
|
1404
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1405
|
+
return false;
|
|
1406
|
+
return true;
|
|
1407
|
+
}
|
|
1408
|
+
function check71(value, depth = 0) {
|
|
1409
|
+
if (depth >= 128)
|
|
1410
|
+
return false;
|
|
1411
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1412
|
+
return false;
|
|
1413
|
+
if ([...value].length < 1)
|
|
1414
|
+
return false;
|
|
1415
|
+
if ([...value].length > 256)
|
|
1416
|
+
return false;
|
|
1417
|
+
return true;
|
|
1418
|
+
}
|
|
1419
|
+
function check72(value, depth = 0) {
|
|
1420
|
+
if (depth >= 128)
|
|
1421
|
+
return false;
|
|
1422
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1423
|
+
return false;
|
|
1424
|
+
const object = value;
|
|
1425
|
+
for (const key of Object.keys(object)) {
|
|
1426
|
+
switch (key) {
|
|
1427
|
+
case "id":
|
|
1428
|
+
if (!check73(object[key], depth + 1))
|
|
1429
|
+
return false;
|
|
1430
|
+
break;
|
|
1431
|
+
case "kind":
|
|
1432
|
+
if (!check74(object[key], depth + 1))
|
|
1433
|
+
return false;
|
|
1434
|
+
break;
|
|
1435
|
+
case "label":
|
|
1436
|
+
if (!check75(object[key], depth + 1))
|
|
1437
|
+
return false;
|
|
1438
|
+
break;
|
|
1439
|
+
case "help":
|
|
1440
|
+
if (!check78(object[key], depth + 1))
|
|
1441
|
+
return false;
|
|
1442
|
+
break;
|
|
1443
|
+
case "visible":
|
|
1444
|
+
if (!check14(object[key], depth + 1))
|
|
1445
|
+
return false;
|
|
1446
|
+
break;
|
|
1447
|
+
case "binding":
|
|
1448
|
+
if (!check17(object[key], depth + 1))
|
|
1449
|
+
return false;
|
|
1450
|
+
break;
|
|
1451
|
+
default: return false;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
1455
|
+
return false;
|
|
1456
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
1457
|
+
return false;
|
|
1458
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
1459
|
+
return false;
|
|
1460
|
+
return true;
|
|
1461
|
+
}
|
|
1462
|
+
function check73(value, depth = 0) {
|
|
1463
|
+
if (depth >= 128)
|
|
1464
|
+
return false;
|
|
1465
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1466
|
+
return false;
|
|
1467
|
+
if ([...value].length < 1)
|
|
1468
|
+
return false;
|
|
1469
|
+
if ([...value].length > 128)
|
|
1470
|
+
return false;
|
|
1471
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1472
|
+
return false;
|
|
1473
|
+
return true;
|
|
1474
|
+
}
|
|
1475
|
+
function check74(value, depth = 0) {
|
|
1476
|
+
if (depth >= 128)
|
|
1477
|
+
return false;
|
|
1478
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1479
|
+
return false;
|
|
1480
|
+
if (value !== "numberInput")
|
|
1481
|
+
return false;
|
|
1482
|
+
return true;
|
|
1483
|
+
}
|
|
1484
|
+
function check75(value, depth = 0) {
|
|
1485
|
+
if (depth >= 128)
|
|
1486
|
+
return false;
|
|
1487
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1488
|
+
return false;
|
|
1489
|
+
const object = value;
|
|
1490
|
+
const keys = Object.keys(object);
|
|
1491
|
+
for (const key of keys) {
|
|
1492
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check77(object[key], depth + 1))
|
|
1493
|
+
return false;
|
|
1494
|
+
if ([...key].length > 255)
|
|
1495
|
+
return false;
|
|
1496
|
+
}
|
|
1497
|
+
if (keys.length < 1)
|
|
1498
|
+
return false;
|
|
1499
|
+
if (keys.length > 16)
|
|
1500
|
+
return false;
|
|
1501
|
+
return true;
|
|
1502
|
+
}
|
|
1503
|
+
function check76(value, depth = 0) {
|
|
1504
|
+
if (depth >= 128)
|
|
1505
|
+
return false;
|
|
1506
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1507
|
+
return false;
|
|
1508
|
+
if ([...value].length > 255)
|
|
1509
|
+
return false;
|
|
1510
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1511
|
+
return false;
|
|
1512
|
+
return true;
|
|
1513
|
+
}
|
|
1514
|
+
function check77(value, depth = 0) {
|
|
1515
|
+
if (depth >= 128)
|
|
1516
|
+
return false;
|
|
1517
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1518
|
+
return false;
|
|
1519
|
+
if ([...value].length < 1)
|
|
1520
|
+
return false;
|
|
1521
|
+
if ([...value].length > 256)
|
|
1522
|
+
return false;
|
|
1523
|
+
return true;
|
|
1524
|
+
}
|
|
1525
|
+
function check78(value, depth = 0) {
|
|
1526
|
+
if (depth >= 128)
|
|
1527
|
+
return false;
|
|
1528
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1529
|
+
return false;
|
|
1530
|
+
const object = value;
|
|
1531
|
+
const keys = Object.keys(object);
|
|
1532
|
+
for (const key of keys) {
|
|
1533
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check80(object[key], depth + 1))
|
|
1534
|
+
return false;
|
|
1535
|
+
if ([...key].length > 255)
|
|
1536
|
+
return false;
|
|
1537
|
+
}
|
|
1538
|
+
if (keys.length < 1)
|
|
1539
|
+
return false;
|
|
1540
|
+
if (keys.length > 16)
|
|
1541
|
+
return false;
|
|
1542
|
+
return true;
|
|
1543
|
+
}
|
|
1544
|
+
function check79(value, depth = 0) {
|
|
1545
|
+
if (depth >= 128)
|
|
1546
|
+
return false;
|
|
1547
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1548
|
+
return false;
|
|
1549
|
+
if ([...value].length > 255)
|
|
1550
|
+
return false;
|
|
1551
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1552
|
+
return false;
|
|
1553
|
+
return true;
|
|
1554
|
+
}
|
|
1555
|
+
function check80(value, depth = 0) {
|
|
1556
|
+
if (depth >= 128)
|
|
1557
|
+
return false;
|
|
1558
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1559
|
+
return false;
|
|
1560
|
+
if ([...value].length < 1)
|
|
1561
|
+
return false;
|
|
1562
|
+
if ([...value].length > 256)
|
|
1563
|
+
return false;
|
|
1564
|
+
return true;
|
|
1565
|
+
}
|
|
1566
|
+
function check81(value, depth = 0) {
|
|
1567
|
+
if (depth >= 128)
|
|
1568
|
+
return false;
|
|
1569
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1570
|
+
return false;
|
|
1571
|
+
const object = value;
|
|
1572
|
+
for (const key of Object.keys(object)) {
|
|
1573
|
+
switch (key) {
|
|
1574
|
+
case "id":
|
|
1575
|
+
if (!check82(object[key], depth + 1))
|
|
1576
|
+
return false;
|
|
1577
|
+
break;
|
|
1578
|
+
case "kind":
|
|
1579
|
+
if (!check83(object[key], depth + 1))
|
|
1580
|
+
return false;
|
|
1581
|
+
break;
|
|
1582
|
+
case "label":
|
|
1583
|
+
if (!check84(object[key], depth + 1))
|
|
1584
|
+
return false;
|
|
1585
|
+
break;
|
|
1586
|
+
case "help":
|
|
1587
|
+
if (!check87(object[key], depth + 1))
|
|
1588
|
+
return false;
|
|
1589
|
+
break;
|
|
1590
|
+
case "visible":
|
|
1591
|
+
if (!check14(object[key], depth + 1))
|
|
1592
|
+
return false;
|
|
1593
|
+
break;
|
|
1594
|
+
case "binding":
|
|
1595
|
+
if (!check17(object[key], depth + 1))
|
|
1596
|
+
return false;
|
|
1597
|
+
break;
|
|
1598
|
+
default: return false;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
1602
|
+
return false;
|
|
1603
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
1604
|
+
return false;
|
|
1605
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
1606
|
+
return false;
|
|
1607
|
+
return true;
|
|
1608
|
+
}
|
|
1609
|
+
function check82(value, depth = 0) {
|
|
1610
|
+
if (depth >= 128)
|
|
1611
|
+
return false;
|
|
1612
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1613
|
+
return false;
|
|
1614
|
+
if ([...value].length < 1)
|
|
1615
|
+
return false;
|
|
1616
|
+
if ([...value].length > 128)
|
|
1617
|
+
return false;
|
|
1618
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1619
|
+
return false;
|
|
1620
|
+
return true;
|
|
1621
|
+
}
|
|
1622
|
+
function check83(value, depth = 0) {
|
|
1623
|
+
if (depth >= 128)
|
|
1624
|
+
return false;
|
|
1625
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1626
|
+
return false;
|
|
1627
|
+
if (value !== "toggle")
|
|
1628
|
+
return false;
|
|
1629
|
+
return true;
|
|
1630
|
+
}
|
|
1631
|
+
function check84(value, depth = 0) {
|
|
1632
|
+
if (depth >= 128)
|
|
1633
|
+
return false;
|
|
1634
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1635
|
+
return false;
|
|
1636
|
+
const object = value;
|
|
1637
|
+
const keys = Object.keys(object);
|
|
1638
|
+
for (const key of keys) {
|
|
1639
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check86(object[key], depth + 1))
|
|
1640
|
+
return false;
|
|
1641
|
+
if ([...key].length > 255)
|
|
1642
|
+
return false;
|
|
1643
|
+
}
|
|
1644
|
+
if (keys.length < 1)
|
|
1645
|
+
return false;
|
|
1646
|
+
if (keys.length > 16)
|
|
1647
|
+
return false;
|
|
1648
|
+
return true;
|
|
1649
|
+
}
|
|
1650
|
+
function check85(value, depth = 0) {
|
|
1651
|
+
if (depth >= 128)
|
|
1652
|
+
return false;
|
|
1653
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1654
|
+
return false;
|
|
1655
|
+
if ([...value].length > 255)
|
|
1656
|
+
return false;
|
|
1657
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1658
|
+
return false;
|
|
1659
|
+
return true;
|
|
1660
|
+
}
|
|
1661
|
+
function check86(value, depth = 0) {
|
|
1662
|
+
if (depth >= 128)
|
|
1663
|
+
return false;
|
|
1664
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1665
|
+
return false;
|
|
1666
|
+
if ([...value].length < 1)
|
|
1667
|
+
return false;
|
|
1668
|
+
if ([...value].length > 256)
|
|
1669
|
+
return false;
|
|
1670
|
+
return true;
|
|
1671
|
+
}
|
|
1672
|
+
function check87(value, depth = 0) {
|
|
1673
|
+
if (depth >= 128)
|
|
1674
|
+
return false;
|
|
1675
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1676
|
+
return false;
|
|
1677
|
+
const object = value;
|
|
1678
|
+
const keys = Object.keys(object);
|
|
1679
|
+
for (const key of keys) {
|
|
1680
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check89(object[key], depth + 1))
|
|
1681
|
+
return false;
|
|
1682
|
+
if ([...key].length > 255)
|
|
1683
|
+
return false;
|
|
1684
|
+
}
|
|
1685
|
+
if (keys.length < 1)
|
|
1686
|
+
return false;
|
|
1687
|
+
if (keys.length > 16)
|
|
1688
|
+
return false;
|
|
1689
|
+
return true;
|
|
1690
|
+
}
|
|
1691
|
+
function check88(value, depth = 0) {
|
|
1692
|
+
if (depth >= 128)
|
|
1693
|
+
return false;
|
|
1694
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1695
|
+
return false;
|
|
1696
|
+
if ([...value].length > 255)
|
|
1697
|
+
return false;
|
|
1698
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1699
|
+
return false;
|
|
1700
|
+
return true;
|
|
1701
|
+
}
|
|
1702
|
+
function check89(value, depth = 0) {
|
|
1703
|
+
if (depth >= 128)
|
|
1704
|
+
return false;
|
|
1705
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1706
|
+
return false;
|
|
1707
|
+
if ([...value].length < 1)
|
|
1708
|
+
return false;
|
|
1709
|
+
if ([...value].length > 256)
|
|
1710
|
+
return false;
|
|
1711
|
+
return true;
|
|
1712
|
+
}
|
|
1713
|
+
function check90(value, depth = 0) {
|
|
1714
|
+
if (depth >= 128)
|
|
1715
|
+
return false;
|
|
1716
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1717
|
+
return false;
|
|
1718
|
+
const object = value;
|
|
1719
|
+
for (const key of Object.keys(object)) {
|
|
1720
|
+
switch (key) {
|
|
1721
|
+
case "id":
|
|
1722
|
+
if (!check91(object[key], depth + 1))
|
|
1723
|
+
return false;
|
|
1724
|
+
break;
|
|
1725
|
+
case "kind":
|
|
1726
|
+
if (!check92(object[key], depth + 1))
|
|
1727
|
+
return false;
|
|
1728
|
+
break;
|
|
1729
|
+
case "label":
|
|
1730
|
+
if (!check93(object[key], depth + 1))
|
|
1731
|
+
return false;
|
|
1732
|
+
break;
|
|
1733
|
+
case "help":
|
|
1734
|
+
if (!check96(object[key], depth + 1))
|
|
1735
|
+
return false;
|
|
1736
|
+
break;
|
|
1737
|
+
case "visible":
|
|
1738
|
+
if (!check14(object[key], depth + 1))
|
|
1739
|
+
return false;
|
|
1740
|
+
break;
|
|
1741
|
+
case "binding":
|
|
1742
|
+
if (!check17(object[key], depth + 1))
|
|
1743
|
+
return false;
|
|
1744
|
+
break;
|
|
1745
|
+
case "optionsBinding":
|
|
1746
|
+
if (!check17(object[key], depth + 1))
|
|
1747
|
+
return false;
|
|
1748
|
+
break;
|
|
1749
|
+
default: return false;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
1753
|
+
return false;
|
|
1754
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
1755
|
+
return false;
|
|
1756
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
1757
|
+
return false;
|
|
1758
|
+
if (!Object.prototype.hasOwnProperty.call(object, "optionsBinding"))
|
|
1759
|
+
return false;
|
|
1760
|
+
return true;
|
|
1761
|
+
}
|
|
1762
|
+
function check91(value, depth = 0) {
|
|
1763
|
+
if (depth >= 128)
|
|
1764
|
+
return false;
|
|
1765
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1766
|
+
return false;
|
|
1767
|
+
if ([...value].length < 1)
|
|
1768
|
+
return false;
|
|
1769
|
+
if ([...value].length > 128)
|
|
1770
|
+
return false;
|
|
1771
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1772
|
+
return false;
|
|
1773
|
+
return true;
|
|
1774
|
+
}
|
|
1775
|
+
function check92(value, depth = 0) {
|
|
1776
|
+
if (depth >= 128)
|
|
1777
|
+
return false;
|
|
1778
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1779
|
+
return false;
|
|
1780
|
+
if (value !== "select")
|
|
1781
|
+
return false;
|
|
1782
|
+
return true;
|
|
1783
|
+
}
|
|
1784
|
+
function check93(value, depth = 0) {
|
|
1785
|
+
if (depth >= 128)
|
|
1786
|
+
return false;
|
|
1787
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1788
|
+
return false;
|
|
1789
|
+
const object = value;
|
|
1790
|
+
const keys = Object.keys(object);
|
|
1791
|
+
for (const key of keys) {
|
|
1792
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check95(object[key], depth + 1))
|
|
1793
|
+
return false;
|
|
1794
|
+
if ([...key].length > 255)
|
|
1795
|
+
return false;
|
|
1796
|
+
}
|
|
1797
|
+
if (keys.length < 1)
|
|
1798
|
+
return false;
|
|
1799
|
+
if (keys.length > 16)
|
|
1800
|
+
return false;
|
|
1801
|
+
return true;
|
|
1802
|
+
}
|
|
1803
|
+
function check94(value, depth = 0) {
|
|
1804
|
+
if (depth >= 128)
|
|
1805
|
+
return false;
|
|
1806
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1807
|
+
return false;
|
|
1808
|
+
if ([...value].length > 255)
|
|
1809
|
+
return false;
|
|
1810
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1811
|
+
return false;
|
|
1812
|
+
return true;
|
|
1813
|
+
}
|
|
1814
|
+
function check95(value, depth = 0) {
|
|
1815
|
+
if (depth >= 128)
|
|
1816
|
+
return false;
|
|
1817
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1818
|
+
return false;
|
|
1819
|
+
if ([...value].length < 1)
|
|
1820
|
+
return false;
|
|
1821
|
+
if ([...value].length > 256)
|
|
1822
|
+
return false;
|
|
1823
|
+
return true;
|
|
1824
|
+
}
|
|
1825
|
+
function check96(value, depth = 0) {
|
|
1826
|
+
if (depth >= 128)
|
|
1827
|
+
return false;
|
|
1828
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1829
|
+
return false;
|
|
1830
|
+
const object = value;
|
|
1831
|
+
const keys = Object.keys(object);
|
|
1832
|
+
for (const key of keys) {
|
|
1833
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check98(object[key], depth + 1))
|
|
1834
|
+
return false;
|
|
1835
|
+
if ([...key].length > 255)
|
|
1836
|
+
return false;
|
|
1837
|
+
}
|
|
1838
|
+
if (keys.length < 1)
|
|
1839
|
+
return false;
|
|
1840
|
+
if (keys.length > 16)
|
|
1841
|
+
return false;
|
|
1842
|
+
return true;
|
|
1843
|
+
}
|
|
1844
|
+
function check97(value, depth = 0) {
|
|
1845
|
+
if (depth >= 128)
|
|
1846
|
+
return false;
|
|
1847
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1848
|
+
return false;
|
|
1849
|
+
if ([...value].length > 255)
|
|
1850
|
+
return false;
|
|
1851
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1852
|
+
return false;
|
|
1853
|
+
return true;
|
|
1854
|
+
}
|
|
1855
|
+
function check98(value, depth = 0) {
|
|
1856
|
+
if (depth >= 128)
|
|
1857
|
+
return false;
|
|
1858
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1859
|
+
return false;
|
|
1860
|
+
if ([...value].length < 1)
|
|
1861
|
+
return false;
|
|
1862
|
+
if ([...value].length > 256)
|
|
1863
|
+
return false;
|
|
1864
|
+
return true;
|
|
1865
|
+
}
|
|
1866
|
+
function check99(value, depth = 0) {
|
|
1867
|
+
if (depth >= 128)
|
|
1868
|
+
return false;
|
|
1869
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1870
|
+
return false;
|
|
1871
|
+
const object = value;
|
|
1872
|
+
for (const key of Object.keys(object)) {
|
|
1873
|
+
switch (key) {
|
|
1874
|
+
case "id":
|
|
1875
|
+
if (!check100(object[key], depth + 1))
|
|
1876
|
+
return false;
|
|
1877
|
+
break;
|
|
1878
|
+
case "kind":
|
|
1879
|
+
if (!check101(object[key], depth + 1))
|
|
1880
|
+
return false;
|
|
1881
|
+
break;
|
|
1882
|
+
case "label":
|
|
1883
|
+
if (!check102(object[key], depth + 1))
|
|
1884
|
+
return false;
|
|
1885
|
+
break;
|
|
1886
|
+
case "help":
|
|
1887
|
+
if (!check105(object[key], depth + 1))
|
|
1888
|
+
return false;
|
|
1889
|
+
break;
|
|
1890
|
+
case "visible":
|
|
1891
|
+
if (!check14(object[key], depth + 1))
|
|
1892
|
+
return false;
|
|
1893
|
+
break;
|
|
1894
|
+
case "operationId":
|
|
1895
|
+
if (!check108(object[key], depth + 1))
|
|
1896
|
+
return false;
|
|
1897
|
+
break;
|
|
1898
|
+
case "arguments":
|
|
1899
|
+
if (!check109(object[key], depth + 1))
|
|
1900
|
+
return false;
|
|
1901
|
+
break;
|
|
1902
|
+
default: return false;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
1906
|
+
return false;
|
|
1907
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
1908
|
+
return false;
|
|
1909
|
+
if (!Object.prototype.hasOwnProperty.call(object, "operationId"))
|
|
1910
|
+
return false;
|
|
1911
|
+
if (!Object.prototype.hasOwnProperty.call(object, "arguments"))
|
|
1912
|
+
return false;
|
|
1913
|
+
return true;
|
|
1914
|
+
}
|
|
1915
|
+
function check100(value, depth = 0) {
|
|
1916
|
+
if (depth >= 128)
|
|
1917
|
+
return false;
|
|
1918
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1919
|
+
return false;
|
|
1920
|
+
if ([...value].length < 1)
|
|
1921
|
+
return false;
|
|
1922
|
+
if ([...value].length > 128)
|
|
1923
|
+
return false;
|
|
1924
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1925
|
+
return false;
|
|
1926
|
+
return true;
|
|
1927
|
+
}
|
|
1928
|
+
function check101(value, depth = 0) {
|
|
1929
|
+
if (depth >= 128)
|
|
1930
|
+
return false;
|
|
1931
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1932
|
+
return false;
|
|
1933
|
+
if (value !== "button")
|
|
1934
|
+
return false;
|
|
1935
|
+
return true;
|
|
1936
|
+
}
|
|
1937
|
+
function check102(value, depth = 0) {
|
|
1938
|
+
if (depth >= 128)
|
|
1939
|
+
return false;
|
|
1940
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1941
|
+
return false;
|
|
1942
|
+
const object = value;
|
|
1943
|
+
const keys = Object.keys(object);
|
|
1944
|
+
for (const key of keys) {
|
|
1945
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check104(object[key], depth + 1))
|
|
1946
|
+
return false;
|
|
1947
|
+
if ([...key].length > 255)
|
|
1948
|
+
return false;
|
|
1949
|
+
}
|
|
1950
|
+
if (keys.length < 1)
|
|
1951
|
+
return false;
|
|
1952
|
+
if (keys.length > 16)
|
|
1953
|
+
return false;
|
|
1954
|
+
return true;
|
|
1955
|
+
}
|
|
1956
|
+
function check103(value, depth = 0) {
|
|
1957
|
+
if (depth >= 128)
|
|
1958
|
+
return false;
|
|
1959
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1960
|
+
return false;
|
|
1961
|
+
if ([...value].length > 255)
|
|
1962
|
+
return false;
|
|
1963
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
1964
|
+
return false;
|
|
1965
|
+
return true;
|
|
1966
|
+
}
|
|
1967
|
+
function check104(value, depth = 0) {
|
|
1968
|
+
if (depth >= 128)
|
|
1969
|
+
return false;
|
|
1970
|
+
if (typeof value !== 'string' || !validText(value))
|
|
1971
|
+
return false;
|
|
1972
|
+
if ([...value].length < 1)
|
|
1973
|
+
return false;
|
|
1974
|
+
if ([...value].length > 256)
|
|
1975
|
+
return false;
|
|
1976
|
+
return true;
|
|
1977
|
+
}
|
|
1978
|
+
function check105(value, depth = 0) {
|
|
1979
|
+
if (depth >= 128)
|
|
1980
|
+
return false;
|
|
1981
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
1982
|
+
return false;
|
|
1983
|
+
const object = value;
|
|
1984
|
+
const keys = Object.keys(object);
|
|
1985
|
+
for (const key of keys) {
|
|
1986
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check107(object[key], depth + 1))
|
|
1987
|
+
return false;
|
|
1988
|
+
if ([...key].length > 255)
|
|
1989
|
+
return false;
|
|
1990
|
+
}
|
|
1991
|
+
if (keys.length < 1)
|
|
1992
|
+
return false;
|
|
1993
|
+
if (keys.length > 16)
|
|
1994
|
+
return false;
|
|
1995
|
+
return true;
|
|
1996
|
+
}
|
|
1997
|
+
function check106(value, depth = 0) {
|
|
1998
|
+
if (depth >= 128)
|
|
1999
|
+
return false;
|
|
2000
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2001
|
+
return false;
|
|
2002
|
+
if ([...value].length > 255)
|
|
2003
|
+
return false;
|
|
2004
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2005
|
+
return false;
|
|
2006
|
+
return true;
|
|
2007
|
+
}
|
|
2008
|
+
function check107(value, depth = 0) {
|
|
2009
|
+
if (depth >= 128)
|
|
2010
|
+
return false;
|
|
2011
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2012
|
+
return false;
|
|
2013
|
+
if ([...value].length < 1)
|
|
2014
|
+
return false;
|
|
2015
|
+
if ([...value].length > 256)
|
|
2016
|
+
return false;
|
|
2017
|
+
return true;
|
|
2018
|
+
}
|
|
2019
|
+
function check108(value, depth = 0) {
|
|
2020
|
+
if (depth >= 128)
|
|
2021
|
+
return false;
|
|
2022
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2023
|
+
return false;
|
|
2024
|
+
if ([...value].length < 1)
|
|
2025
|
+
return false;
|
|
2026
|
+
if ([...value].length > 128)
|
|
2027
|
+
return false;
|
|
2028
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2029
|
+
return false;
|
|
2030
|
+
return true;
|
|
2031
|
+
}
|
|
2032
|
+
function check109(value, depth = 0) {
|
|
2033
|
+
if (depth >= 128)
|
|
2034
|
+
return false;
|
|
2035
|
+
if (!Array.isArray(value))
|
|
2036
|
+
return false;
|
|
2037
|
+
if (value.length < 0)
|
|
2038
|
+
return false;
|
|
2039
|
+
if (value.length > 64)
|
|
2040
|
+
return false;
|
|
2041
|
+
if (!value.every(item => check110(item, depth + 1)))
|
|
2042
|
+
return false;
|
|
2043
|
+
return true;
|
|
2044
|
+
}
|
|
2045
|
+
function check110(value, depth = 0) {
|
|
2046
|
+
if (depth >= 128)
|
|
2047
|
+
return false;
|
|
2048
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2049
|
+
return false;
|
|
2050
|
+
const object = value;
|
|
2051
|
+
for (const key of Object.keys(object)) {
|
|
2052
|
+
switch (key) {
|
|
2053
|
+
case "name":
|
|
2054
|
+
if (!check111(object[key], depth + 1))
|
|
2055
|
+
return false;
|
|
2056
|
+
break;
|
|
2057
|
+
case "valueRef":
|
|
2058
|
+
if (!check17(object[key], depth + 1))
|
|
2059
|
+
return false;
|
|
2060
|
+
break;
|
|
2061
|
+
default: return false;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
if (!Object.prototype.hasOwnProperty.call(object, "name"))
|
|
2065
|
+
return false;
|
|
2066
|
+
if (!Object.prototype.hasOwnProperty.call(object, "valueRef"))
|
|
2067
|
+
return false;
|
|
2068
|
+
return true;
|
|
2069
|
+
}
|
|
2070
|
+
function check111(value, depth = 0) {
|
|
2071
|
+
if (depth >= 128)
|
|
2072
|
+
return false;
|
|
2073
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2074
|
+
return false;
|
|
2075
|
+
if ([...value].length < 1)
|
|
2076
|
+
return false;
|
|
2077
|
+
if ([...value].length > 128)
|
|
2078
|
+
return false;
|
|
2079
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2080
|
+
return false;
|
|
2081
|
+
return true;
|
|
2082
|
+
}
|
|
2083
|
+
function check112(value, depth = 0) {
|
|
2084
|
+
if (depth >= 128)
|
|
2085
|
+
return false;
|
|
2086
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2087
|
+
return false;
|
|
2088
|
+
const object = value;
|
|
2089
|
+
for (const key of Object.keys(object)) {
|
|
2090
|
+
switch (key) {
|
|
2091
|
+
case "id":
|
|
2092
|
+
if (!check113(object[key], depth + 1))
|
|
2093
|
+
return false;
|
|
2094
|
+
break;
|
|
2095
|
+
case "kind":
|
|
2096
|
+
if (!check114(object[key], depth + 1))
|
|
2097
|
+
return false;
|
|
2098
|
+
break;
|
|
2099
|
+
case "label":
|
|
2100
|
+
if (!check115(object[key], depth + 1))
|
|
2101
|
+
return false;
|
|
2102
|
+
break;
|
|
2103
|
+
case "help":
|
|
2104
|
+
if (!check118(object[key], depth + 1))
|
|
2105
|
+
return false;
|
|
2106
|
+
break;
|
|
2107
|
+
case "visible":
|
|
2108
|
+
if (!check14(object[key], depth + 1))
|
|
2109
|
+
return false;
|
|
2110
|
+
break;
|
|
2111
|
+
case "binding":
|
|
2112
|
+
if (!check17(object[key], depth + 1))
|
|
2113
|
+
return false;
|
|
2114
|
+
break;
|
|
2115
|
+
case "pageSize":
|
|
2116
|
+
if (!check121(object[key], depth + 1))
|
|
2117
|
+
return false;
|
|
2118
|
+
break;
|
|
2119
|
+
default: return false;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
2123
|
+
return false;
|
|
2124
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
2125
|
+
return false;
|
|
2126
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
2127
|
+
return false;
|
|
2128
|
+
if (!Object.prototype.hasOwnProperty.call(object, "pageSize"))
|
|
2129
|
+
return false;
|
|
2130
|
+
return true;
|
|
2131
|
+
}
|
|
2132
|
+
function check113(value, depth = 0) {
|
|
2133
|
+
if (depth >= 128)
|
|
2134
|
+
return false;
|
|
2135
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2136
|
+
return false;
|
|
2137
|
+
if ([...value].length < 1)
|
|
2138
|
+
return false;
|
|
2139
|
+
if ([...value].length > 128)
|
|
2140
|
+
return false;
|
|
2141
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2142
|
+
return false;
|
|
2143
|
+
return true;
|
|
2144
|
+
}
|
|
2145
|
+
function check114(value, depth = 0) {
|
|
2146
|
+
if (depth >= 128)
|
|
2147
|
+
return false;
|
|
2148
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2149
|
+
return false;
|
|
2150
|
+
if (value !== "list")
|
|
2151
|
+
return false;
|
|
2152
|
+
return true;
|
|
2153
|
+
}
|
|
2154
|
+
function check115(value, depth = 0) {
|
|
2155
|
+
if (depth >= 128)
|
|
2156
|
+
return false;
|
|
2157
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2158
|
+
return false;
|
|
2159
|
+
const object = value;
|
|
2160
|
+
const keys = Object.keys(object);
|
|
2161
|
+
for (const key of keys) {
|
|
2162
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check117(object[key], depth + 1))
|
|
2163
|
+
return false;
|
|
2164
|
+
if ([...key].length > 255)
|
|
2165
|
+
return false;
|
|
2166
|
+
}
|
|
2167
|
+
if (keys.length < 1)
|
|
2168
|
+
return false;
|
|
2169
|
+
if (keys.length > 16)
|
|
2170
|
+
return false;
|
|
2171
|
+
return true;
|
|
2172
|
+
}
|
|
2173
|
+
function check116(value, depth = 0) {
|
|
2174
|
+
if (depth >= 128)
|
|
2175
|
+
return false;
|
|
2176
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2177
|
+
return false;
|
|
2178
|
+
if ([...value].length > 255)
|
|
2179
|
+
return false;
|
|
2180
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2181
|
+
return false;
|
|
2182
|
+
return true;
|
|
2183
|
+
}
|
|
2184
|
+
function check117(value, depth = 0) {
|
|
2185
|
+
if (depth >= 128)
|
|
2186
|
+
return false;
|
|
2187
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2188
|
+
return false;
|
|
2189
|
+
if ([...value].length < 1)
|
|
2190
|
+
return false;
|
|
2191
|
+
if ([...value].length > 256)
|
|
2192
|
+
return false;
|
|
2193
|
+
return true;
|
|
2194
|
+
}
|
|
2195
|
+
function check118(value, depth = 0) {
|
|
2196
|
+
if (depth >= 128)
|
|
2197
|
+
return false;
|
|
2198
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2199
|
+
return false;
|
|
2200
|
+
const object = value;
|
|
2201
|
+
const keys = Object.keys(object);
|
|
2202
|
+
for (const key of keys) {
|
|
2203
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check120(object[key], depth + 1))
|
|
2204
|
+
return false;
|
|
2205
|
+
if ([...key].length > 255)
|
|
2206
|
+
return false;
|
|
2207
|
+
}
|
|
2208
|
+
if (keys.length < 1)
|
|
2209
|
+
return false;
|
|
2210
|
+
if (keys.length > 16)
|
|
2211
|
+
return false;
|
|
2212
|
+
return true;
|
|
2213
|
+
}
|
|
2214
|
+
function check119(value, depth = 0) {
|
|
2215
|
+
if (depth >= 128)
|
|
2216
|
+
return false;
|
|
2217
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2218
|
+
return false;
|
|
2219
|
+
if ([...value].length > 255)
|
|
2220
|
+
return false;
|
|
2221
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2222
|
+
return false;
|
|
2223
|
+
return true;
|
|
2224
|
+
}
|
|
2225
|
+
function check120(value, depth = 0) {
|
|
2226
|
+
if (depth >= 128)
|
|
2227
|
+
return false;
|
|
2228
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2229
|
+
return false;
|
|
2230
|
+
if ([...value].length < 1)
|
|
2231
|
+
return false;
|
|
2232
|
+
if ([...value].length > 256)
|
|
2233
|
+
return false;
|
|
2234
|
+
return true;
|
|
2235
|
+
}
|
|
2236
|
+
function check121(value, depth = 0) {
|
|
2237
|
+
if (depth >= 128)
|
|
2238
|
+
return false;
|
|
2239
|
+
if (typeof value !== 'number' || !Number.isSafeInteger(value))
|
|
2240
|
+
return false;
|
|
2241
|
+
if (value < 1)
|
|
2242
|
+
return false;
|
|
2243
|
+
if (value > 500)
|
|
2244
|
+
return false;
|
|
2245
|
+
return true;
|
|
2246
|
+
}
|
|
2247
|
+
function check122(value, depth = 0) {
|
|
2248
|
+
if (depth >= 128)
|
|
2249
|
+
return false;
|
|
2250
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2251
|
+
return false;
|
|
2252
|
+
const object = value;
|
|
2253
|
+
for (const key of Object.keys(object)) {
|
|
2254
|
+
switch (key) {
|
|
2255
|
+
case "id":
|
|
2256
|
+
if (!check123(object[key], depth + 1))
|
|
2257
|
+
return false;
|
|
2258
|
+
break;
|
|
2259
|
+
case "kind":
|
|
2260
|
+
if (!check124(object[key], depth + 1))
|
|
2261
|
+
return false;
|
|
2262
|
+
break;
|
|
2263
|
+
case "label":
|
|
2264
|
+
if (!check125(object[key], depth + 1))
|
|
2265
|
+
return false;
|
|
2266
|
+
break;
|
|
2267
|
+
case "help":
|
|
2268
|
+
if (!check128(object[key], depth + 1))
|
|
2269
|
+
return false;
|
|
2270
|
+
break;
|
|
2271
|
+
case "visible":
|
|
2272
|
+
if (!check14(object[key], depth + 1))
|
|
2273
|
+
return false;
|
|
2274
|
+
break;
|
|
2275
|
+
case "binding":
|
|
2276
|
+
if (!check17(object[key], depth + 1))
|
|
2277
|
+
return false;
|
|
2278
|
+
break;
|
|
2279
|
+
case "pageSize":
|
|
2280
|
+
if (!check131(object[key], depth + 1))
|
|
2281
|
+
return false;
|
|
2282
|
+
break;
|
|
2283
|
+
default: return false;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
2287
|
+
return false;
|
|
2288
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
2289
|
+
return false;
|
|
2290
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
2291
|
+
return false;
|
|
2292
|
+
if (!Object.prototype.hasOwnProperty.call(object, "pageSize"))
|
|
2293
|
+
return false;
|
|
2294
|
+
return true;
|
|
2295
|
+
}
|
|
2296
|
+
function check123(value, depth = 0) {
|
|
2297
|
+
if (depth >= 128)
|
|
2298
|
+
return false;
|
|
2299
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2300
|
+
return false;
|
|
2301
|
+
if ([...value].length < 1)
|
|
2302
|
+
return false;
|
|
2303
|
+
if ([...value].length > 128)
|
|
2304
|
+
return false;
|
|
2305
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2306
|
+
return false;
|
|
2307
|
+
return true;
|
|
2308
|
+
}
|
|
2309
|
+
function check124(value, depth = 0) {
|
|
2310
|
+
if (depth >= 128)
|
|
2311
|
+
return false;
|
|
2312
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2313
|
+
return false;
|
|
2314
|
+
if (value !== "table")
|
|
2315
|
+
return false;
|
|
2316
|
+
return true;
|
|
2317
|
+
}
|
|
2318
|
+
function check125(value, depth = 0) {
|
|
2319
|
+
if (depth >= 128)
|
|
2320
|
+
return false;
|
|
2321
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2322
|
+
return false;
|
|
2323
|
+
const object = value;
|
|
2324
|
+
const keys = Object.keys(object);
|
|
2325
|
+
for (const key of keys) {
|
|
2326
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check127(object[key], depth + 1))
|
|
2327
|
+
return false;
|
|
2328
|
+
if ([...key].length > 255)
|
|
2329
|
+
return false;
|
|
2330
|
+
}
|
|
2331
|
+
if (keys.length < 1)
|
|
2332
|
+
return false;
|
|
2333
|
+
if (keys.length > 16)
|
|
2334
|
+
return false;
|
|
2335
|
+
return true;
|
|
2336
|
+
}
|
|
2337
|
+
function check126(value, depth = 0) {
|
|
2338
|
+
if (depth >= 128)
|
|
2339
|
+
return false;
|
|
2340
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2341
|
+
return false;
|
|
2342
|
+
if ([...value].length > 255)
|
|
2343
|
+
return false;
|
|
2344
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2345
|
+
return false;
|
|
2346
|
+
return true;
|
|
2347
|
+
}
|
|
2348
|
+
function check127(value, depth = 0) {
|
|
2349
|
+
if (depth >= 128)
|
|
2350
|
+
return false;
|
|
2351
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2352
|
+
return false;
|
|
2353
|
+
if ([...value].length < 1)
|
|
2354
|
+
return false;
|
|
2355
|
+
if ([...value].length > 256)
|
|
2356
|
+
return false;
|
|
2357
|
+
return true;
|
|
2358
|
+
}
|
|
2359
|
+
function check128(value, depth = 0) {
|
|
2360
|
+
if (depth >= 128)
|
|
2361
|
+
return false;
|
|
2362
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2363
|
+
return false;
|
|
2364
|
+
const object = value;
|
|
2365
|
+
const keys = Object.keys(object);
|
|
2366
|
+
for (const key of keys) {
|
|
2367
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check130(object[key], depth + 1))
|
|
2368
|
+
return false;
|
|
2369
|
+
if ([...key].length > 255)
|
|
2370
|
+
return false;
|
|
2371
|
+
}
|
|
2372
|
+
if (keys.length < 1)
|
|
2373
|
+
return false;
|
|
2374
|
+
if (keys.length > 16)
|
|
2375
|
+
return false;
|
|
2376
|
+
return true;
|
|
2377
|
+
}
|
|
2378
|
+
function check129(value, depth = 0) {
|
|
2379
|
+
if (depth >= 128)
|
|
2380
|
+
return false;
|
|
2381
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2382
|
+
return false;
|
|
2383
|
+
if ([...value].length > 255)
|
|
2384
|
+
return false;
|
|
2385
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2386
|
+
return false;
|
|
2387
|
+
return true;
|
|
2388
|
+
}
|
|
2389
|
+
function check130(value, depth = 0) {
|
|
2390
|
+
if (depth >= 128)
|
|
2391
|
+
return false;
|
|
2392
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2393
|
+
return false;
|
|
2394
|
+
if ([...value].length < 1)
|
|
2395
|
+
return false;
|
|
2396
|
+
if ([...value].length > 256)
|
|
2397
|
+
return false;
|
|
2398
|
+
return true;
|
|
2399
|
+
}
|
|
2400
|
+
function check131(value, depth = 0) {
|
|
2401
|
+
if (depth >= 128)
|
|
2402
|
+
return false;
|
|
2403
|
+
if (typeof value !== 'number' || !Number.isSafeInteger(value))
|
|
2404
|
+
return false;
|
|
2405
|
+
if (value < 1)
|
|
2406
|
+
return false;
|
|
2407
|
+
if (value > 500)
|
|
2408
|
+
return false;
|
|
2409
|
+
return true;
|
|
2410
|
+
}
|
|
2411
|
+
function check132(value, depth = 0) {
|
|
2412
|
+
if (depth >= 128)
|
|
2413
|
+
return false;
|
|
2414
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2415
|
+
return false;
|
|
2416
|
+
const object = value;
|
|
2417
|
+
for (const key of Object.keys(object)) {
|
|
2418
|
+
switch (key) {
|
|
2419
|
+
case "id":
|
|
2420
|
+
if (!check133(object[key], depth + 1))
|
|
2421
|
+
return false;
|
|
2422
|
+
break;
|
|
2423
|
+
case "kind":
|
|
2424
|
+
if (!check134(object[key], depth + 1))
|
|
2425
|
+
return false;
|
|
2426
|
+
break;
|
|
2427
|
+
case "label":
|
|
2428
|
+
if (!check135(object[key], depth + 1))
|
|
2429
|
+
return false;
|
|
2430
|
+
break;
|
|
2431
|
+
case "help":
|
|
2432
|
+
if (!check138(object[key], depth + 1))
|
|
2433
|
+
return false;
|
|
2434
|
+
break;
|
|
2435
|
+
case "visible":
|
|
2436
|
+
if (!check14(object[key], depth + 1))
|
|
2437
|
+
return false;
|
|
2438
|
+
break;
|
|
2439
|
+
case "binding":
|
|
2440
|
+
if (!check17(object[key], depth + 1))
|
|
2441
|
+
return false;
|
|
2442
|
+
break;
|
|
2443
|
+
default: return false;
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
2447
|
+
return false;
|
|
2448
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
2449
|
+
return false;
|
|
2450
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
2451
|
+
return false;
|
|
2452
|
+
return true;
|
|
2453
|
+
}
|
|
2454
|
+
function check133(value, depth = 0) {
|
|
2455
|
+
if (depth >= 128)
|
|
2456
|
+
return false;
|
|
2457
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2458
|
+
return false;
|
|
2459
|
+
if ([...value].length < 1)
|
|
2460
|
+
return false;
|
|
2461
|
+
if ([...value].length > 128)
|
|
2462
|
+
return false;
|
|
2463
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2464
|
+
return false;
|
|
2465
|
+
return true;
|
|
2466
|
+
}
|
|
2467
|
+
function check134(value, depth = 0) {
|
|
2468
|
+
if (depth >= 128)
|
|
2469
|
+
return false;
|
|
2470
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2471
|
+
return false;
|
|
2472
|
+
if (value !== "resourceLink")
|
|
2473
|
+
return false;
|
|
2474
|
+
return true;
|
|
2475
|
+
}
|
|
2476
|
+
function check135(value, depth = 0) {
|
|
2477
|
+
if (depth >= 128)
|
|
2478
|
+
return false;
|
|
2479
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2480
|
+
return false;
|
|
2481
|
+
const object = value;
|
|
2482
|
+
const keys = Object.keys(object);
|
|
2483
|
+
for (const key of keys) {
|
|
2484
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check137(object[key], depth + 1))
|
|
2485
|
+
return false;
|
|
2486
|
+
if ([...key].length > 255)
|
|
2487
|
+
return false;
|
|
2488
|
+
}
|
|
2489
|
+
if (keys.length < 1)
|
|
2490
|
+
return false;
|
|
2491
|
+
if (keys.length > 16)
|
|
2492
|
+
return false;
|
|
2493
|
+
return true;
|
|
2494
|
+
}
|
|
2495
|
+
function check136(value, depth = 0) {
|
|
2496
|
+
if (depth >= 128)
|
|
2497
|
+
return false;
|
|
2498
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2499
|
+
return false;
|
|
2500
|
+
if ([...value].length > 255)
|
|
2501
|
+
return false;
|
|
2502
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2503
|
+
return false;
|
|
2504
|
+
return true;
|
|
2505
|
+
}
|
|
2506
|
+
function check137(value, depth = 0) {
|
|
2507
|
+
if (depth >= 128)
|
|
2508
|
+
return false;
|
|
2509
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2510
|
+
return false;
|
|
2511
|
+
if ([...value].length < 1)
|
|
2512
|
+
return false;
|
|
2513
|
+
if ([...value].length > 256)
|
|
2514
|
+
return false;
|
|
2515
|
+
return true;
|
|
2516
|
+
}
|
|
2517
|
+
function check138(value, depth = 0) {
|
|
2518
|
+
if (depth >= 128)
|
|
2519
|
+
return false;
|
|
2520
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2521
|
+
return false;
|
|
2522
|
+
const object = value;
|
|
2523
|
+
const keys = Object.keys(object);
|
|
2524
|
+
for (const key of keys) {
|
|
2525
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check140(object[key], depth + 1))
|
|
2526
|
+
return false;
|
|
2527
|
+
if ([...key].length > 255)
|
|
2528
|
+
return false;
|
|
2529
|
+
}
|
|
2530
|
+
if (keys.length < 1)
|
|
2531
|
+
return false;
|
|
2532
|
+
if (keys.length > 16)
|
|
2533
|
+
return false;
|
|
2534
|
+
return true;
|
|
2535
|
+
}
|
|
2536
|
+
function check139(value, depth = 0) {
|
|
2537
|
+
if (depth >= 128)
|
|
2538
|
+
return false;
|
|
2539
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2540
|
+
return false;
|
|
2541
|
+
if ([...value].length > 255)
|
|
2542
|
+
return false;
|
|
2543
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2544
|
+
return false;
|
|
2545
|
+
return true;
|
|
2546
|
+
}
|
|
2547
|
+
function check140(value, depth = 0) {
|
|
2548
|
+
if (depth >= 128)
|
|
2549
|
+
return false;
|
|
2550
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2551
|
+
return false;
|
|
2552
|
+
if ([...value].length < 1)
|
|
2553
|
+
return false;
|
|
2554
|
+
if ([...value].length > 256)
|
|
2555
|
+
return false;
|
|
2556
|
+
return true;
|
|
2557
|
+
}
|
|
2558
|
+
function check141(value, depth = 0) {
|
|
2559
|
+
if (depth >= 128)
|
|
2560
|
+
return false;
|
|
2561
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2562
|
+
return false;
|
|
2563
|
+
const object = value;
|
|
2564
|
+
for (const key of Object.keys(object)) {
|
|
2565
|
+
switch (key) {
|
|
2566
|
+
case "id":
|
|
2567
|
+
if (!check142(object[key], depth + 1))
|
|
2568
|
+
return false;
|
|
2569
|
+
break;
|
|
2570
|
+
case "kind":
|
|
2571
|
+
if (!check143(object[key], depth + 1))
|
|
2572
|
+
return false;
|
|
2573
|
+
break;
|
|
2574
|
+
case "label":
|
|
2575
|
+
if (!check144(object[key], depth + 1))
|
|
2576
|
+
return false;
|
|
2577
|
+
break;
|
|
2578
|
+
case "help":
|
|
2579
|
+
if (!check147(object[key], depth + 1))
|
|
2580
|
+
return false;
|
|
2581
|
+
break;
|
|
2582
|
+
case "visible":
|
|
2583
|
+
if (!check14(object[key], depth + 1))
|
|
2584
|
+
return false;
|
|
2585
|
+
break;
|
|
2586
|
+
case "binding":
|
|
2587
|
+
if (!check17(object[key], depth + 1))
|
|
2588
|
+
return false;
|
|
2589
|
+
break;
|
|
2590
|
+
default: return false;
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
if (!Object.prototype.hasOwnProperty.call(object, "id"))
|
|
2594
|
+
return false;
|
|
2595
|
+
if (!Object.prototype.hasOwnProperty.call(object, "kind"))
|
|
2596
|
+
return false;
|
|
2597
|
+
if (!Object.prototype.hasOwnProperty.call(object, "binding"))
|
|
2598
|
+
return false;
|
|
2599
|
+
return true;
|
|
2600
|
+
}
|
|
2601
|
+
function check142(value, depth = 0) {
|
|
2602
|
+
if (depth >= 128)
|
|
2603
|
+
return false;
|
|
2604
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2605
|
+
return false;
|
|
2606
|
+
if ([...value].length < 1)
|
|
2607
|
+
return false;
|
|
2608
|
+
if ([...value].length > 128)
|
|
2609
|
+
return false;
|
|
2610
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9._-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2611
|
+
return false;
|
|
2612
|
+
return true;
|
|
2613
|
+
}
|
|
2614
|
+
function check143(value, depth = 0) {
|
|
2615
|
+
if (depth >= 128)
|
|
2616
|
+
return false;
|
|
2617
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2618
|
+
return false;
|
|
2619
|
+
if (value !== "preview")
|
|
2620
|
+
return false;
|
|
2621
|
+
return true;
|
|
2622
|
+
}
|
|
2623
|
+
function check144(value, depth = 0) {
|
|
2624
|
+
if (depth >= 128)
|
|
2625
|
+
return false;
|
|
2626
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2627
|
+
return false;
|
|
2628
|
+
const object = value;
|
|
2629
|
+
const keys = Object.keys(object);
|
|
2630
|
+
for (const key of keys) {
|
|
2631
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check146(object[key], depth + 1))
|
|
2632
|
+
return false;
|
|
2633
|
+
if ([...key].length > 255)
|
|
2634
|
+
return false;
|
|
2635
|
+
}
|
|
2636
|
+
if (keys.length < 1)
|
|
2637
|
+
return false;
|
|
2638
|
+
if (keys.length > 16)
|
|
2639
|
+
return false;
|
|
2640
|
+
return true;
|
|
2641
|
+
}
|
|
2642
|
+
function check145(value, depth = 0) {
|
|
2643
|
+
if (depth >= 128)
|
|
2644
|
+
return false;
|
|
2645
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2646
|
+
return false;
|
|
2647
|
+
if ([...value].length > 255)
|
|
2648
|
+
return false;
|
|
2649
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2650
|
+
return false;
|
|
2651
|
+
return true;
|
|
2652
|
+
}
|
|
2653
|
+
function check146(value, depth = 0) {
|
|
2654
|
+
if (depth >= 128)
|
|
2655
|
+
return false;
|
|
2656
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2657
|
+
return false;
|
|
2658
|
+
if ([...value].length < 1)
|
|
2659
|
+
return false;
|
|
2660
|
+
if ([...value].length > 256)
|
|
2661
|
+
return false;
|
|
2662
|
+
return true;
|
|
2663
|
+
}
|
|
2664
|
+
function check147(value, depth = 0) {
|
|
2665
|
+
if (depth >= 128)
|
|
2666
|
+
return false;
|
|
2667
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
2668
|
+
return false;
|
|
2669
|
+
const object = value;
|
|
2670
|
+
const keys = Object.keys(object);
|
|
2671
|
+
for (const key of keys) {
|
|
2672
|
+
if (!validText(key) || (new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(key)?.[0] !== key || !check149(object[key], depth + 1))
|
|
2673
|
+
return false;
|
|
2674
|
+
if ([...key].length > 255)
|
|
2675
|
+
return false;
|
|
2676
|
+
}
|
|
2677
|
+
if (keys.length < 1)
|
|
2678
|
+
return false;
|
|
2679
|
+
if (keys.length > 16)
|
|
2680
|
+
return false;
|
|
2681
|
+
return true;
|
|
2682
|
+
}
|
|
2683
|
+
function check148(value, depth = 0) {
|
|
2684
|
+
if (depth >= 128)
|
|
2685
|
+
return false;
|
|
2686
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2687
|
+
return false;
|
|
2688
|
+
if ([...value].length > 255)
|
|
2689
|
+
return false;
|
|
2690
|
+
if ((new RegExp("^[A-Za-z][A-Za-z0-9-]*$", 'u')).exec(value)?.[0] !== value)
|
|
2691
|
+
return false;
|
|
2692
|
+
return true;
|
|
2693
|
+
}
|
|
2694
|
+
function check149(value, depth = 0) {
|
|
2695
|
+
if (depth >= 128)
|
|
2696
|
+
return false;
|
|
2697
|
+
if (typeof value !== 'string' || !validText(value))
|
|
2698
|
+
return false;
|
|
2699
|
+
if ([...value].length < 1)
|
|
2700
|
+
return false;
|
|
2701
|
+
if ([...value].length > 256)
|
|
2702
|
+
return false;
|
|
2703
|
+
return true;
|
|
2704
|
+
}
|
|
2705
|
+
/** Strict UTF-8 JSON: no BOM, comments, trailing commas or duplicate properties; depth <= 32; integer lexemes only. */
|
|
2706
|
+
function strictJson(input, maxBytes) {
|
|
2707
|
+
let text;
|
|
2708
|
+
if (typeof input === "string") {
|
|
2709
|
+
if (!validText(input))
|
|
2710
|
+
return { ok: false, failure: "malformed" };
|
|
2711
|
+
if (new TextEncoder().encode(input).byteLength > maxBytes)
|
|
2712
|
+
return { ok: false, failure: "tooLarge" };
|
|
2713
|
+
text = input;
|
|
2714
|
+
}
|
|
2715
|
+
else {
|
|
2716
|
+
if (input.byteLength > maxBytes)
|
|
2717
|
+
return { ok: false, failure: "tooLarge" };
|
|
2718
|
+
try {
|
|
2719
|
+
text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(input);
|
|
2720
|
+
}
|
|
2721
|
+
catch {
|
|
2722
|
+
return { ok: false, failure: "malformed" };
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
try {
|
|
2726
|
+
return { ok: true, value: new StrictJsonReader(text).document() };
|
|
2727
|
+
}
|
|
2728
|
+
catch {
|
|
2729
|
+
return { ok: false, failure: "malformed" };
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
class StrictJsonReader {
|
|
2733
|
+
text;
|
|
2734
|
+
index = 0;
|
|
2735
|
+
constructor(text) {
|
|
2736
|
+
this.text = text;
|
|
2737
|
+
}
|
|
2738
|
+
document() {
|
|
2739
|
+
this.space();
|
|
2740
|
+
const value = this.value(0);
|
|
2741
|
+
this.space();
|
|
2742
|
+
if (this.index !== this.text.length)
|
|
2743
|
+
throw new SyntaxError("Trailing JSON content");
|
|
2744
|
+
return value;
|
|
2745
|
+
}
|
|
2746
|
+
value(depth) {
|
|
2747
|
+
switch (this.text[this.index]) {
|
|
2748
|
+
case "{": return this.object(depth + 1);
|
|
2749
|
+
case "[": return this.array(depth + 1);
|
|
2750
|
+
case '"': return this.string();
|
|
2751
|
+
case "t": return this.literal("true", true);
|
|
2752
|
+
case "f": return this.literal("false", false);
|
|
2753
|
+
case "n": return this.literal("null", null);
|
|
2754
|
+
default: return this.number();
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
object(depth) {
|
|
2758
|
+
if (depth > 32)
|
|
2759
|
+
throw new SyntaxError("JSON depth exceeded");
|
|
2760
|
+
this.index++;
|
|
2761
|
+
const out = {};
|
|
2762
|
+
const keys = new Set();
|
|
2763
|
+
this.space();
|
|
2764
|
+
if (this.text[this.index] === "}") {
|
|
2765
|
+
this.index++;
|
|
2766
|
+
return out;
|
|
2767
|
+
}
|
|
2768
|
+
for (;;) {
|
|
2769
|
+
this.space();
|
|
2770
|
+
if (this.text[this.index] !== '"')
|
|
2771
|
+
throw new SyntaxError("Expected property name");
|
|
2772
|
+
const key = this.string();
|
|
2773
|
+
if (keys.has(key))
|
|
2774
|
+
throw new SyntaxError("Duplicate JSON property");
|
|
2775
|
+
keys.add(key);
|
|
2776
|
+
this.space();
|
|
2777
|
+
if (this.text[this.index++] !== ":")
|
|
2778
|
+
throw new SyntaxError("Expected colon");
|
|
2779
|
+
this.space();
|
|
2780
|
+
// defineProperty keeps names such as __proto__ as ordinary own properties.
|
|
2781
|
+
Object.defineProperty(out, key, { value: this.value(depth), enumerable: true, writable: true, configurable: true });
|
|
2782
|
+
this.space();
|
|
2783
|
+
const next = this.text[this.index++];
|
|
2784
|
+
if (next === "}")
|
|
2785
|
+
return out;
|
|
2786
|
+
if (next !== ",")
|
|
2787
|
+
throw new SyntaxError("Expected comma");
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
array(depth) {
|
|
2791
|
+
if (depth > 32)
|
|
2792
|
+
throw new SyntaxError("JSON depth exceeded");
|
|
2793
|
+
this.index++;
|
|
2794
|
+
const out = [];
|
|
2795
|
+
this.space();
|
|
2796
|
+
if (this.text[this.index] === "]") {
|
|
2797
|
+
this.index++;
|
|
2798
|
+
return out;
|
|
2799
|
+
}
|
|
2800
|
+
for (;;) {
|
|
2801
|
+
this.space();
|
|
2802
|
+
out.push(this.value(depth));
|
|
2803
|
+
this.space();
|
|
2804
|
+
const next = this.text[this.index++];
|
|
2805
|
+
if (next === "]")
|
|
2806
|
+
return out;
|
|
2807
|
+
if (next !== ",")
|
|
2808
|
+
throw new SyntaxError("Expected comma");
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
string() {
|
|
2812
|
+
this.index++;
|
|
2813
|
+
let out = "";
|
|
2814
|
+
for (;;) {
|
|
2815
|
+
const c = this.text[this.index++];
|
|
2816
|
+
if (c === undefined)
|
|
2817
|
+
throw new SyntaxError("Unterminated string");
|
|
2818
|
+
if (c === '"')
|
|
2819
|
+
break;
|
|
2820
|
+
if (c < " ")
|
|
2821
|
+
throw new SyntaxError("Unescaped control character");
|
|
2822
|
+
if (c !== "\\") {
|
|
2823
|
+
out += c;
|
|
2824
|
+
continue;
|
|
2825
|
+
}
|
|
2826
|
+
const e = this.text[this.index++];
|
|
2827
|
+
const simple = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" };
|
|
2828
|
+
if (e !== undefined && e in simple) {
|
|
2829
|
+
out += simple[e];
|
|
2830
|
+
continue;
|
|
2831
|
+
}
|
|
2832
|
+
if (e !== "u" || !/^[0-9a-fA-F]{4}$/.test(this.text.slice(this.index, this.index + 4)))
|
|
2833
|
+
throw new SyntaxError("Invalid escape");
|
|
2834
|
+
out += String.fromCharCode(parseInt(this.text.slice(this.index, this.index + 4), 16));
|
|
2835
|
+
this.index += 4;
|
|
2836
|
+
}
|
|
2837
|
+
if (!validText(out))
|
|
2838
|
+
throw new SyntaxError("Lone surrogate escape");
|
|
2839
|
+
return out;
|
|
2840
|
+
}
|
|
2841
|
+
number() {
|
|
2842
|
+
const match = /-?(?:0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/y;
|
|
2843
|
+
match.lastIndex = this.index;
|
|
2844
|
+
const found = match.exec(this.text);
|
|
2845
|
+
if (found === null)
|
|
2846
|
+
throw new SyntaxError("Invalid JSON value");
|
|
2847
|
+
this.index = match.lastIndex;
|
|
2848
|
+
// Selected schemas have no fractional numbers; fraction/exponent lexemes never satisfy an integer.
|
|
2849
|
+
return found[1] !== undefined || found[2] !== undefined ? Number.NaN : Number(found[0]);
|
|
2850
|
+
}
|
|
2851
|
+
literal(word, value) {
|
|
2852
|
+
if (this.text.slice(this.index, this.index + word.length) !== word)
|
|
2853
|
+
throw new SyntaxError("Invalid JSON literal");
|
|
2854
|
+
this.index += word.length;
|
|
2855
|
+
return value;
|
|
2856
|
+
}
|
|
2857
|
+
space() {
|
|
2858
|
+
while (this.text[this.index] === " " || this.text[this.index] === "\t" || this.text[this.index] === "\n" || this.text[this.index] === "\r")
|
|
2859
|
+
this.index++;
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
function validText(value) {
|
|
2863
|
+
for (const scalar of value) {
|
|
2864
|
+
const point = scalar.codePointAt(0);
|
|
2865
|
+
if (point >= 0xd800 && point <= 0xdfff)
|
|
2866
|
+
return false;
|
|
2867
|
+
}
|
|
2868
|
+
return true;
|
|
2869
|
+
}
|
|
2870
|
+
function inventoryRules(value) {
|
|
2871
|
+
const files = value.files;
|
|
2872
|
+
const seen = new Set();
|
|
2873
|
+
let previous;
|
|
2874
|
+
let total = 0n;
|
|
2875
|
+
for (const file of files) {
|
|
2876
|
+
const path = file.path;
|
|
2877
|
+
const folded = path.toUpperCase();
|
|
2878
|
+
if (path.length === 0 || folded === 'INVENTORY.JSON' || folded === 'SIGNATURE.JSON' || seen.has(folded) || (previous !== undefined && previous >= path))
|
|
2879
|
+
return false;
|
|
2880
|
+
for (const segment of path.split('/')) {
|
|
2881
|
+
if (!/^[A-Za-z0-9_.-]+$/.test(segment) || segment === '.' || segment === '..' || segment.endsWith('.') || /^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.|$)/i.test(segment))
|
|
2882
|
+
return false;
|
|
2883
|
+
}
|
|
2884
|
+
const size = BigInt(file.size);
|
|
2885
|
+
if (size > 134217728n)
|
|
2886
|
+
return false;
|
|
2887
|
+
total += size;
|
|
2888
|
+
if (total > 1073741824n)
|
|
2889
|
+
return false;
|
|
2890
|
+
seen.add(folded);
|
|
2891
|
+
previous = path;
|
|
2892
|
+
}
|
|
2893
|
+
return files.some(file => file.path === 'manifest.json');
|
|
2894
|
+
}
|
|
2895
|
+
function panelTree(input) {
|
|
2896
|
+
const value = input;
|
|
2897
|
+
const controls = new Map();
|
|
2898
|
+
const parents = new Map();
|
|
2899
|
+
let bindings = false;
|
|
2900
|
+
for (const control of value.controls) {
|
|
2901
|
+
const id = control.id;
|
|
2902
|
+
if (controls.has(id))
|
|
2903
|
+
return false;
|
|
2904
|
+
controls.set(id, control);
|
|
2905
|
+
for (const key of ['label', 'help', 'text']) {
|
|
2906
|
+
if (control[key] !== undefined) {
|
|
2907
|
+
const tags = Object.keys(control[key]);
|
|
2908
|
+
if (new Set(tags.map(tag => tag.toLowerCase())).size !== tags.length || !tags.every(panelLocale))
|
|
2909
|
+
return false;
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
if (control.binding !== undefined || control.optionsBinding !== undefined)
|
|
2913
|
+
bindings = true;
|
|
2914
|
+
if (control.arguments !== undefined) {
|
|
2915
|
+
const args = control.arguments;
|
|
2916
|
+
if (new Set(args.map(argument => argument.name)).size !== args.length)
|
|
2917
|
+
return false;
|
|
2918
|
+
if (args.length)
|
|
2919
|
+
bindings = true;
|
|
2920
|
+
}
|
|
2921
|
+
if (control.visible !== undefined) {
|
|
2922
|
+
bindings = true;
|
|
2923
|
+
const pending = [{ value: control.visible, depth: 1 }];
|
|
2924
|
+
let count = 0;
|
|
2925
|
+
while (pending.length) {
|
|
2926
|
+
const current = pending.pop();
|
|
2927
|
+
if (++count > 128 || current.depth > 8)
|
|
2928
|
+
return false;
|
|
2929
|
+
if (current.value.predicates !== undefined)
|
|
2930
|
+
for (const term of current.value.predicates)
|
|
2931
|
+
pending.push({ value: term, depth: current.depth + 1 });
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
for (const child of (control.children ?? [])) {
|
|
2935
|
+
if (parents.has(child))
|
|
2936
|
+
return false;
|
|
2937
|
+
parents.set(child, id);
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
if (bindings && value.inputSchemaId === undefined)
|
|
2941
|
+
return false;
|
|
2942
|
+
for (const child of parents.keys())
|
|
2943
|
+
if (!controls.has(child))
|
|
2944
|
+
return false;
|
|
2945
|
+
const visited = new Set();
|
|
2946
|
+
const pending = [];
|
|
2947
|
+
for (const id of controls.keys())
|
|
2948
|
+
if (!parents.has(id))
|
|
2949
|
+
pending.push({ id, depth: 1 });
|
|
2950
|
+
while (pending.length) {
|
|
2951
|
+
const current = pending.pop();
|
|
2952
|
+
if (current.depth > 16 || visited.has(current.id))
|
|
2953
|
+
return false;
|
|
2954
|
+
visited.add(current.id);
|
|
2955
|
+
for (const child of (controls.get(current.id).children ?? []))
|
|
2956
|
+
pending.push({ id: child, depth: current.depth + 1 });
|
|
2957
|
+
}
|
|
2958
|
+
return visited.size === controls.size;
|
|
2959
|
+
}
|
|
2960
|
+
function panelLocale(value) {
|
|
2961
|
+
const normalized = value.toLowerCase();
|
|
2962
|
+
if (['en-gb-oed', 'i-ami', 'i-bnn', 'i-default', 'i-enochian', 'i-hak', 'i-klingon', 'i-lux', 'i-mingo', 'i-navajo', 'i-pwn', 'i-tao', 'i-tay', 'i-tsu', 'sgn-be-fr', 'sgn-be-nl', 'sgn-ch-de', 'art-lojban', 'cel-gaulish', 'no-bok', 'no-nyn', 'zh-guoyu', 'zh-hakka', 'zh-min', 'zh-min-nan', 'zh-xiang'].includes(normalized))
|
|
2963
|
+
return true;
|
|
2964
|
+
const grammar = /^(?:(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4}|[A-Za-z]{5,8})(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(?:-[0-9A-WY-Za-wy-z](?:-[A-Za-z0-9]{2,8})+)*(?:-[xX](?:-[A-Za-z0-9]{1,8})+)?|[xX](?:-[A-Za-z0-9]{1,8})+)$/u;
|
|
2965
|
+
if (grammar.exec(value)?.[0] !== value)
|
|
2966
|
+
return false;
|
|
2967
|
+
const singleton = new Set(), variants = new Set();
|
|
2968
|
+
let extension = false;
|
|
2969
|
+
const tokens = normalized.split('-');
|
|
2970
|
+
if (tokens[0] === 'x')
|
|
2971
|
+
return true;
|
|
2972
|
+
for (const token of tokens.slice(1)) {
|
|
2973
|
+
if (token === 'x')
|
|
2974
|
+
break;
|
|
2975
|
+
if (token.length === 1) {
|
|
2976
|
+
if (singleton.has(token))
|
|
2977
|
+
return false;
|
|
2978
|
+
singleton.add(token);
|
|
2979
|
+
extension = true;
|
|
2980
|
+
}
|
|
2981
|
+
else if (!extension && (token.length >= 5 || (token.length === 4 && /^[0-9]/u.test(token)))) {
|
|
2982
|
+
if (variants.has(token))
|
|
2983
|
+
return false;
|
|
2984
|
+
variants.add(token);
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
return true;
|
|
2988
|
+
}
|