@baron1996/kline-scene-schema 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/generated/schemas.d.ts +308 -0
  2. package/dist/generated/schemas.d.ts.map +1 -1
  3. package/dist/generated/schemas.js +401 -0
  4. package/dist/generated/time-series-scene.d.ts +88 -0
  5. package/dist/generated/time-series-scene.d.ts.map +1 -0
  6. package/dist/generated/time-series-scene.js +2 -0
  7. package/dist/generated/validate-time-series-scene.d.ts +15 -0
  8. package/dist/generated/validate-time-series-scene.d.ts.map +1 -0
  9. package/dist/generated/validate-time-series-scene.js +2359 -0
  10. package/dist/index.d.ts +7 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +7 -1
  13. package/dist/time-series-canonical-json.d.ts +3 -0
  14. package/dist/time-series-canonical-json.d.ts.map +1 -0
  15. package/dist/time-series-canonical-json.js +15 -0
  16. package/dist/time-series-canonicalize.d.ts +3 -0
  17. package/dist/time-series-canonicalize.d.ts.map +1 -0
  18. package/dist/time-series-canonicalize.js +19 -0
  19. package/dist/time-series-errors.d.ts +13 -0
  20. package/dist/time-series-errors.d.ts.map +1 -0
  21. package/dist/time-series-errors.js +12 -0
  22. package/dist/time-series-semantic-validator.d.ts +5 -0
  23. package/dist/time-series-semantic-validator.d.ts.map +1 -0
  24. package/dist/time-series-semantic-validator.js +81 -0
  25. package/dist/time-series-validator.d.ts +4 -0
  26. package/dist/time-series-validator.d.ts.map +1 -0
  27. package/dist/time-series-validator.js +52 -0
  28. package/package.json +1 -1
  29. package/schema/time-series-chart-config.schema.json +75 -0
  30. package/schema/time-series-runtime.schema.json +13 -0
  31. package/schema/time-series-scene.schema.json +154 -0
@@ -0,0 +1,2359 @@
1
+ // @ts-nocheck -- generated standalone validator
2
+ "use strict";
3
+ export const validateTimeSeriesScene = validate20;
4
+ const schema31 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://baron.dev/kline-scene/time-series-scene.schema.json", "title": "TimeSeriesScene", "type": "object", "additionalProperties": false, "required": ["schema", "version", "runtime", "period", "series", "data", "chart", "viewport", "render", "metadata"], "properties": { "schema": { "const": "@baron1996/time-series-scene" }, "version": { "const": 1 }, "runtime": { "$ref": "https://baron.dev/kline-scene/time-series-runtime.schema.json" }, "period": { "$ref": "#/$defs/timeSeriesPeriod" }, "series": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "$ref": "#/$defs/timeSeriesDefinition" } }, "data": { "type": "array", "minItems": 1, "maxItems": 1000000, "items": { "$ref": "#/$defs/timeSeriesPoint" } }, "chart": { "$ref": "https://baron.dev/kline-scene/time-series-chart-config.schema.json" }, "viewport": { "$ref": "#/$defs/timeSeriesViewport" }, "render": { "$ref": "#/$defs/timeSeriesRender" }, "metadata": { "$ref": "#/$defs/metadata" } }, "$defs": { "timeSeriesPeriod": { "type": "object", "additionalProperties": false, "required": ["span", "type"], "properties": { "span": { "type": "integer", "minimum": 1, "maximum": 100000 }, "type": { "enum": ["second", "minute", "hour", "day", "week", "month", "year"] } } }, "timeSeriesDefinition": { "type": "object", "additionalProperties": false, "required": ["id", "name", "type", "unit", "precision", "visible", "style"], "properties": { "id": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 256 }, "type": { "const": "line" }, "unit": { "type": "string", "minLength": 1, "maxLength": 64 }, "precision": { "type": "integer", "minimum": 0, "maximum": 16 }, "visible": { "type": "boolean" }, "style": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/lineStyle" } } }, "timeSeriesPoint": { "type": "object", "additionalProperties": false, "required": ["timestamp", "values"], "properties": { "timestamp": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "values": { "type": "object", "minProperties": 1, "maxProperties": 64, "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$" }, "additionalProperties": { "oneOf": [{ "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber" }, { "type": "null" }] } } } }, "timeSeriesViewport": { "type": "object", "additionalProperties": false, "required": ["barSpace", "rightOffsetDistance", "anchorTimestamp"], "properties": { "barSpace": { "type": "number", "minimum": 1, "maximum": 100 }, "rightOffsetDistance": { "type": "number", "minimum": 0, "maximum": 10000 }, "anchorTimestamp": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } } }, "timeSeriesRender": { "type": "object", "additionalProperties": false, "required": ["width", "height", "deviceScaleFactor", "background", "fontFamily", "timeoutMs"], "properties": { "width": { "type": "integer", "minimum": 320, "maximum": 8192 }, "height": { "type": "integer", "minimum": 240, "maximum": 8192 }, "deviceScaleFactor": { "type": "number", "minimum": 0.5, "maximum": 4 }, "background": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor" }, "fontFamily": { "const": "Baron Sans" }, "timeoutMs": { "type": "integer", "minimum": 100, "maximum": 120000 } } }, "metadata": { "type": "object", "maxProperties": 64, "propertyNames": { "type": "string", "minLength": 1, "maxLength": 128 }, "additionalProperties": { "oneOf": [{ "type": "null" }, { "type": "boolean" }, { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber" }, { "type": "string" }] } } } };
5
+ const schema32 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://baron.dev/kline-scene/time-series-runtime.schema.json", "title": "TimeSeriesRuntimeIdentity", "type": "object", "additionalProperties": false, "required": ["engine", "engineVersion", "runtimeVersion"], "properties": { "engine": { "const": "klinecharts" }, "engineVersion": { "const": "10.0.0" }, "runtimeVersion": { "const": "0.1.0" } } };
6
+ const schema33 = { "type": "object", "additionalProperties": false, "required": ["span", "type"], "properties": { "span": { "type": "integer", "minimum": 1, "maximum": 100000 }, "type": { "enum": ["second", "minute", "hour", "day", "week", "month", "year"] } } };
7
+ const schema45 = { "type": "object", "additionalProperties": false, "required": ["barSpace", "rightOffsetDistance", "anchorTimestamp"], "properties": { "barSpace": { "type": "number", "minimum": 1, "maximum": 100 }, "rightOffsetDistance": { "type": "number", "minimum": 0, "maximum": 10000 }, "anchorTimestamp": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } } };
8
+ const func1 = Object.prototype.hasOwnProperty;
9
+ const schema34 = { "type": "object", "additionalProperties": false, "required": ["id", "name", "type", "unit", "precision", "visible", "style"], "properties": { "id": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 256 }, "type": { "const": "line" }, "unit": { "type": "string", "minLength": 1, "maxLength": 64 }, "precision": { "type": "integer", "minimum": 0, "maximum": 16 }, "visible": { "type": "boolean" }, "style": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/lineStyle" } } };
10
+ const pattern4 = new RegExp("^[A-Za-z][A-Za-z0-9_-]{0,63}$", "u");
11
+ const func2 = (value) => { let length = 0; for (const _character of value)
12
+ length++; return length; };
13
+ const schema36 = { "type": "object", "additionalProperties": false, "required": ["color", "size", "style"], "properties": { "color": { "$ref": "#/$defs/rgbaColor" }, "size": { "type": "number", "exclusiveMinimum": 0, "maximum": 20 }, "style": { "enum": ["solid", "dashed", "dotted"] } } };
14
+ const schema37 = { "type": "string", "pattern": "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" };
15
+ const pattern5 = new RegExp("^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$", "u");
16
+ function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate23.evaluated; if (evaluated0.dynamicProps) {
17
+ evaluated0.props = undefined;
18
+ } if (evaluated0.dynamicItems) {
19
+ evaluated0.items = undefined;
20
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
21
+ if (data.color === undefined) {
22
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "color" }, message: "must have required property '" + "color" + "'" };
23
+ if (vErrors === null) {
24
+ vErrors = [err0];
25
+ }
26
+ else {
27
+ vErrors.push(err0);
28
+ }
29
+ errors++;
30
+ }
31
+ if (data.size === undefined) {
32
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "size" }, message: "must have required property '" + "size" + "'" };
33
+ if (vErrors === null) {
34
+ vErrors = [err1];
35
+ }
36
+ else {
37
+ vErrors.push(err1);
38
+ }
39
+ errors++;
40
+ }
41
+ if (data.style === undefined) {
42
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "style" }, message: "must have required property '" + "style" + "'" };
43
+ if (vErrors === null) {
44
+ vErrors = [err2];
45
+ }
46
+ else {
47
+ vErrors.push(err2);
48
+ }
49
+ errors++;
50
+ }
51
+ for (const key0 in data) {
52
+ if (!(((key0 === "color") || (key0 === "size")) || (key0 === "style"))) {
53
+ const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
54
+ if (vErrors === null) {
55
+ vErrors = [err3];
56
+ }
57
+ else {
58
+ vErrors.push(err3);
59
+ }
60
+ errors++;
61
+ }
62
+ }
63
+ if (data.color !== undefined) {
64
+ let data0 = data.color;
65
+ if (typeof data0 === "string") {
66
+ if (!pattern5.test(data0)) {
67
+ const err4 = { instancePath: instancePath + "/color", schemaPath: "#/$defs/rgbaColor/pattern", keyword: "pattern", params: { pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" }, message: "must match pattern \"" + "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" + "\"" };
68
+ if (vErrors === null) {
69
+ vErrors = [err4];
70
+ }
71
+ else {
72
+ vErrors.push(err4);
73
+ }
74
+ errors++;
75
+ }
76
+ }
77
+ else {
78
+ const err5 = { instancePath: instancePath + "/color", schemaPath: "#/$defs/rgbaColor/type", keyword: "type", params: { type: "string" }, message: "must be string" };
79
+ if (vErrors === null) {
80
+ vErrors = [err5];
81
+ }
82
+ else {
83
+ vErrors.push(err5);
84
+ }
85
+ errors++;
86
+ }
87
+ }
88
+ if (data.size !== undefined) {
89
+ let data1 = data.size;
90
+ if ((typeof data1 == "number") && (isFinite(data1))) {
91
+ if (data1 > 20 || isNaN(data1)) {
92
+ const err6 = { instancePath: instancePath + "/size", schemaPath: "#/properties/size/maximum", keyword: "maximum", params: { comparison: "<=", limit: 20 }, message: "must be <= 20" };
93
+ if (vErrors === null) {
94
+ vErrors = [err6];
95
+ }
96
+ else {
97
+ vErrors.push(err6);
98
+ }
99
+ errors++;
100
+ }
101
+ if (data1 <= 0 || isNaN(data1)) {
102
+ const err7 = { instancePath: instancePath + "/size", schemaPath: "#/properties/size/exclusiveMinimum", keyword: "exclusiveMinimum", params: { comparison: ">", limit: 0 }, message: "must be > 0" };
103
+ if (vErrors === null) {
104
+ vErrors = [err7];
105
+ }
106
+ else {
107
+ vErrors.push(err7);
108
+ }
109
+ errors++;
110
+ }
111
+ }
112
+ else {
113
+ const err8 = { instancePath: instancePath + "/size", schemaPath: "#/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
114
+ if (vErrors === null) {
115
+ vErrors = [err8];
116
+ }
117
+ else {
118
+ vErrors.push(err8);
119
+ }
120
+ errors++;
121
+ }
122
+ }
123
+ if (data.style !== undefined) {
124
+ let data2 = data.style;
125
+ if (!(((data2 === "solid") || (data2 === "dashed")) || (data2 === "dotted"))) {
126
+ const err9 = { instancePath: instancePath + "/style", schemaPath: "#/properties/style/enum", keyword: "enum", params: { allowedValues: schema36.properties.style.enum }, message: "must be equal to one of the allowed values" };
127
+ if (vErrors === null) {
128
+ vErrors = [err9];
129
+ }
130
+ else {
131
+ vErrors.push(err9);
132
+ }
133
+ errors++;
134
+ }
135
+ }
136
+ }
137
+ else {
138
+ const err10 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
139
+ if (vErrors === null) {
140
+ vErrors = [err10];
141
+ }
142
+ else {
143
+ vErrors.push(err10);
144
+ }
145
+ errors++;
146
+ } validate23.errors = vErrors; return errors === 0; }
147
+ validate23.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
148
+ function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate21.evaluated; if (evaluated0.dynamicProps) {
149
+ evaluated0.props = undefined;
150
+ } if (evaluated0.dynamicItems) {
151
+ evaluated0.items = undefined;
152
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
153
+ if (data.id === undefined) {
154
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
155
+ if (vErrors === null) {
156
+ vErrors = [err0];
157
+ }
158
+ else {
159
+ vErrors.push(err0);
160
+ }
161
+ errors++;
162
+ }
163
+ if (data.name === undefined) {
164
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" };
165
+ if (vErrors === null) {
166
+ vErrors = [err1];
167
+ }
168
+ else {
169
+ vErrors.push(err1);
170
+ }
171
+ errors++;
172
+ }
173
+ if (data.type === undefined) {
174
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" };
175
+ if (vErrors === null) {
176
+ vErrors = [err2];
177
+ }
178
+ else {
179
+ vErrors.push(err2);
180
+ }
181
+ errors++;
182
+ }
183
+ if (data.unit === undefined) {
184
+ const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "unit" }, message: "must have required property '" + "unit" + "'" };
185
+ if (vErrors === null) {
186
+ vErrors = [err3];
187
+ }
188
+ else {
189
+ vErrors.push(err3);
190
+ }
191
+ errors++;
192
+ }
193
+ if (data.precision === undefined) {
194
+ const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "precision" }, message: "must have required property '" + "precision" + "'" };
195
+ if (vErrors === null) {
196
+ vErrors = [err4];
197
+ }
198
+ else {
199
+ vErrors.push(err4);
200
+ }
201
+ errors++;
202
+ }
203
+ if (data.visible === undefined) {
204
+ const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "visible" }, message: "must have required property '" + "visible" + "'" };
205
+ if (vErrors === null) {
206
+ vErrors = [err5];
207
+ }
208
+ else {
209
+ vErrors.push(err5);
210
+ }
211
+ errors++;
212
+ }
213
+ if (data.style === undefined) {
214
+ const err6 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "style" }, message: "must have required property '" + "style" + "'" };
215
+ if (vErrors === null) {
216
+ vErrors = [err6];
217
+ }
218
+ else {
219
+ vErrors.push(err6);
220
+ }
221
+ errors++;
222
+ }
223
+ for (const key0 in data) {
224
+ if (!(((((((key0 === "id") || (key0 === "name")) || (key0 === "type")) || (key0 === "unit")) || (key0 === "precision")) || (key0 === "visible")) || (key0 === "style"))) {
225
+ const err7 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
226
+ if (vErrors === null) {
227
+ vErrors = [err7];
228
+ }
229
+ else {
230
+ vErrors.push(err7);
231
+ }
232
+ errors++;
233
+ }
234
+ }
235
+ if (data.id !== undefined) {
236
+ let data0 = data.id;
237
+ if (typeof data0 === "string") {
238
+ if (!pattern4.test(data0)) {
239
+ const err8 = { instancePath: instancePath + "/id", schemaPath: "#/properties/id/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z][A-Za-z0-9_-]{0,63}$" }, message: "must match pattern \"" + "^[A-Za-z][A-Za-z0-9_-]{0,63}$" + "\"" };
240
+ if (vErrors === null) {
241
+ vErrors = [err8];
242
+ }
243
+ else {
244
+ vErrors.push(err8);
245
+ }
246
+ errors++;
247
+ }
248
+ }
249
+ else {
250
+ const err9 = { instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
251
+ if (vErrors === null) {
252
+ vErrors = [err9];
253
+ }
254
+ else {
255
+ vErrors.push(err9);
256
+ }
257
+ errors++;
258
+ }
259
+ }
260
+ if (data.name !== undefined) {
261
+ let data1 = data.name;
262
+ if (typeof data1 === "string") {
263
+ if (func2(data1) > 256) {
264
+ const err10 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" };
265
+ if (vErrors === null) {
266
+ vErrors = [err10];
267
+ }
268
+ else {
269
+ vErrors.push(err10);
270
+ }
271
+ errors++;
272
+ }
273
+ if (func2(data1) < 1) {
274
+ const err11 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
275
+ if (vErrors === null) {
276
+ vErrors = [err11];
277
+ }
278
+ else {
279
+ vErrors.push(err11);
280
+ }
281
+ errors++;
282
+ }
283
+ }
284
+ else {
285
+ const err12 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
286
+ if (vErrors === null) {
287
+ vErrors = [err12];
288
+ }
289
+ else {
290
+ vErrors.push(err12);
291
+ }
292
+ errors++;
293
+ }
294
+ }
295
+ if (data.type !== undefined) {
296
+ if ("line" !== data.type) {
297
+ const err13 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "line" }, message: "must be equal to constant" };
298
+ if (vErrors === null) {
299
+ vErrors = [err13];
300
+ }
301
+ else {
302
+ vErrors.push(err13);
303
+ }
304
+ errors++;
305
+ }
306
+ }
307
+ if (data.unit !== undefined) {
308
+ let data3 = data.unit;
309
+ if (typeof data3 === "string") {
310
+ if (func2(data3) > 64) {
311
+ const err14 = { instancePath: instancePath + "/unit", schemaPath: "#/properties/unit/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters" };
312
+ if (vErrors === null) {
313
+ vErrors = [err14];
314
+ }
315
+ else {
316
+ vErrors.push(err14);
317
+ }
318
+ errors++;
319
+ }
320
+ if (func2(data3) < 1) {
321
+ const err15 = { instancePath: instancePath + "/unit", schemaPath: "#/properties/unit/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
322
+ if (vErrors === null) {
323
+ vErrors = [err15];
324
+ }
325
+ else {
326
+ vErrors.push(err15);
327
+ }
328
+ errors++;
329
+ }
330
+ }
331
+ else {
332
+ const err16 = { instancePath: instancePath + "/unit", schemaPath: "#/properties/unit/type", keyword: "type", params: { type: "string" }, message: "must be string" };
333
+ if (vErrors === null) {
334
+ vErrors = [err16];
335
+ }
336
+ else {
337
+ vErrors.push(err16);
338
+ }
339
+ errors++;
340
+ }
341
+ }
342
+ if (data.precision !== undefined) {
343
+ let data4 = data.precision;
344
+ if (!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) {
345
+ const err17 = { instancePath: instancePath + "/precision", schemaPath: "#/properties/precision/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
346
+ if (vErrors === null) {
347
+ vErrors = [err17];
348
+ }
349
+ else {
350
+ vErrors.push(err17);
351
+ }
352
+ errors++;
353
+ }
354
+ if ((typeof data4 == "number") && (isFinite(data4))) {
355
+ if (data4 > 16 || isNaN(data4)) {
356
+ const err18 = { instancePath: instancePath + "/precision", schemaPath: "#/properties/precision/maximum", keyword: "maximum", params: { comparison: "<=", limit: 16 }, message: "must be <= 16" };
357
+ if (vErrors === null) {
358
+ vErrors = [err18];
359
+ }
360
+ else {
361
+ vErrors.push(err18);
362
+ }
363
+ errors++;
364
+ }
365
+ if (data4 < 0 || isNaN(data4)) {
366
+ const err19 = { instancePath: instancePath + "/precision", schemaPath: "#/properties/precision/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
367
+ if (vErrors === null) {
368
+ vErrors = [err19];
369
+ }
370
+ else {
371
+ vErrors.push(err19);
372
+ }
373
+ errors++;
374
+ }
375
+ }
376
+ }
377
+ if (data.visible !== undefined) {
378
+ if (typeof data.visible !== "boolean") {
379
+ const err20 = { instancePath: instancePath + "/visible", schemaPath: "#/properties/visible/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
380
+ if (vErrors === null) {
381
+ vErrors = [err20];
382
+ }
383
+ else {
384
+ vErrors.push(err20);
385
+ }
386
+ errors++;
387
+ }
388
+ }
389
+ if (data.style !== undefined) {
390
+ if (!(validate23(data.style, { instancePath: instancePath + "/style", parentData: data, parentDataProperty: "style", rootData, dynamicAnchors }))) {
391
+ vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
392
+ errors = vErrors.length;
393
+ }
394
+ }
395
+ }
396
+ else {
397
+ const err21 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
398
+ if (vErrors === null) {
399
+ vErrors = [err21];
400
+ }
401
+ else {
402
+ vErrors.push(err21);
403
+ }
404
+ errors++;
405
+ } validate21.errors = vErrors; return errors === 0; }
406
+ validate21.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
407
+ const schema38 = { "type": "object", "additionalProperties": false, "required": ["timestamp", "values"], "properties": { "timestamp": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "values": { "type": "object", "minProperties": 1, "maxProperties": 64, "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$" }, "additionalProperties": { "oneOf": [{ "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber" }, { "type": "null" }] } } } };
408
+ const schema39 = { "type": "number", "minimum": -1.7976931348623157e+308, "maximum": 1.7976931348623157e+308 };
409
+ function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate26.evaluated; if (evaluated0.dynamicProps) {
410
+ evaluated0.props = undefined;
411
+ } if (evaluated0.dynamicItems) {
412
+ evaluated0.items = undefined;
413
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
414
+ if (data.timestamp === undefined) {
415
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "timestamp" }, message: "must have required property '" + "timestamp" + "'" };
416
+ if (vErrors === null) {
417
+ vErrors = [err0];
418
+ }
419
+ else {
420
+ vErrors.push(err0);
421
+ }
422
+ errors++;
423
+ }
424
+ if (data.values === undefined) {
425
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "values" }, message: "must have required property '" + "values" + "'" };
426
+ if (vErrors === null) {
427
+ vErrors = [err1];
428
+ }
429
+ else {
430
+ vErrors.push(err1);
431
+ }
432
+ errors++;
433
+ }
434
+ for (const key0 in data) {
435
+ if (!((key0 === "timestamp") || (key0 === "values"))) {
436
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
437
+ if (vErrors === null) {
438
+ vErrors = [err2];
439
+ }
440
+ else {
441
+ vErrors.push(err2);
442
+ }
443
+ errors++;
444
+ }
445
+ }
446
+ if (data.timestamp !== undefined) {
447
+ let data0 = data.timestamp;
448
+ if (!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))) {
449
+ const err3 = { instancePath: instancePath + "/timestamp", schemaPath: "#/properties/timestamp/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
450
+ if (vErrors === null) {
451
+ vErrors = [err3];
452
+ }
453
+ else {
454
+ vErrors.push(err3);
455
+ }
456
+ errors++;
457
+ }
458
+ if ((typeof data0 == "number") && (isFinite(data0))) {
459
+ if (data0 > 9007199254740991 || isNaN(data0)) {
460
+ const err4 = { instancePath: instancePath + "/timestamp", schemaPath: "#/properties/timestamp/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
461
+ if (vErrors === null) {
462
+ vErrors = [err4];
463
+ }
464
+ else {
465
+ vErrors.push(err4);
466
+ }
467
+ errors++;
468
+ }
469
+ if (data0 < 1 || isNaN(data0)) {
470
+ const err5 = { instancePath: instancePath + "/timestamp", schemaPath: "#/properties/timestamp/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
471
+ if (vErrors === null) {
472
+ vErrors = [err5];
473
+ }
474
+ else {
475
+ vErrors.push(err5);
476
+ }
477
+ errors++;
478
+ }
479
+ }
480
+ }
481
+ if (data.values !== undefined) {
482
+ let data1 = data.values;
483
+ if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
484
+ if (Object.keys(data1).length > 64) {
485
+ const err6 = { instancePath: instancePath + "/values", schemaPath: "#/properties/values/maxProperties", keyword: "maxProperties", params: { limit: 64 }, message: "must NOT have more than 64 properties" };
486
+ if (vErrors === null) {
487
+ vErrors = [err6];
488
+ }
489
+ else {
490
+ vErrors.push(err6);
491
+ }
492
+ errors++;
493
+ }
494
+ if (Object.keys(data1).length < 1) {
495
+ const err7 = { instancePath: instancePath + "/values", schemaPath: "#/properties/values/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" };
496
+ if (vErrors === null) {
497
+ vErrors = [err7];
498
+ }
499
+ else {
500
+ vErrors.push(err7);
501
+ }
502
+ errors++;
503
+ }
504
+ for (const key1 in data1) {
505
+ const _errs6 = errors;
506
+ if (typeof key1 === "string") {
507
+ if (!pattern4.test(key1)) {
508
+ const err8 = { instancePath: instancePath + "/values", schemaPath: "#/properties/values/propertyNames/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z][A-Za-z0-9_-]{0,63}$" }, message: "must match pattern \"" + "^[A-Za-z][A-Za-z0-9_-]{0,63}$" + "\"", propertyName: key1 };
509
+ if (vErrors === null) {
510
+ vErrors = [err8];
511
+ }
512
+ else {
513
+ vErrors.push(err8);
514
+ }
515
+ errors++;
516
+ }
517
+ }
518
+ var valid1 = _errs6 === errors;
519
+ if (!valid1) {
520
+ const err9 = { instancePath: instancePath + "/values", schemaPath: "#/properties/values/propertyNames", keyword: "propertyNames", params: { propertyName: key1 }, message: "property name must be valid" };
521
+ if (vErrors === null) {
522
+ vErrors = [err9];
523
+ }
524
+ else {
525
+ vErrors.push(err9);
526
+ }
527
+ errors++;
528
+ }
529
+ }
530
+ for (const key2 in data1) {
531
+ let data2 = data1[key2];
532
+ const _errs9 = errors;
533
+ let valid3 = false;
534
+ let passing0 = null;
535
+ const _errs10 = errors;
536
+ if ((typeof data2 == "number") && (isFinite(data2))) {
537
+ if (data2 > 1.7976931348623157e+308 || isNaN(data2)) {
538
+ const err10 = { instancePath: instancePath + "/values/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber/maximum", keyword: "maximum", params: { comparison: "<=", limit: 1.7976931348623157e+308 }, message: "must be <= 1.7976931348623157e+308" };
539
+ if (vErrors === null) {
540
+ vErrors = [err10];
541
+ }
542
+ else {
543
+ vErrors.push(err10);
544
+ }
545
+ errors++;
546
+ }
547
+ if (data2 < -1.7976931348623157e+308 || isNaN(data2)) {
548
+ const err11 = { instancePath: instancePath + "/values/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber/minimum", keyword: "minimum", params: { comparison: ">=", limit: -1.7976931348623157e+308 }, message: "must be >= -1.7976931348623157e+308" };
549
+ if (vErrors === null) {
550
+ vErrors = [err11];
551
+ }
552
+ else {
553
+ vErrors.push(err11);
554
+ }
555
+ errors++;
556
+ }
557
+ }
558
+ else {
559
+ const err12 = { instancePath: instancePath + "/values/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber/type", keyword: "type", params: { type: "number" }, message: "must be number" };
560
+ if (vErrors === null) {
561
+ vErrors = [err12];
562
+ }
563
+ else {
564
+ vErrors.push(err12);
565
+ }
566
+ errors++;
567
+ }
568
+ var _valid0 = _errs10 === errors;
569
+ if (_valid0) {
570
+ valid3 = true;
571
+ passing0 = 0;
572
+ }
573
+ const _errs13 = errors;
574
+ if (data2 !== null) {
575
+ const err13 = { instancePath: instancePath + "/values/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/values/additionalProperties/oneOf/1/type", keyword: "type", params: { type: "null" }, message: "must be null" };
576
+ if (vErrors === null) {
577
+ vErrors = [err13];
578
+ }
579
+ else {
580
+ vErrors.push(err13);
581
+ }
582
+ errors++;
583
+ }
584
+ var _valid0 = _errs13 === errors;
585
+ if (_valid0 && valid3) {
586
+ valid3 = false;
587
+ passing0 = [passing0, 1];
588
+ }
589
+ else {
590
+ if (_valid0) {
591
+ valid3 = true;
592
+ passing0 = 1;
593
+ }
594
+ }
595
+ if (!valid3) {
596
+ const err14 = { instancePath: instancePath + "/values/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/values/additionalProperties/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
597
+ if (vErrors === null) {
598
+ vErrors = [err14];
599
+ }
600
+ else {
601
+ vErrors.push(err14);
602
+ }
603
+ errors++;
604
+ }
605
+ else {
606
+ errors = _errs9;
607
+ if (vErrors !== null) {
608
+ if (_errs9) {
609
+ vErrors.length = _errs9;
610
+ }
611
+ else {
612
+ vErrors = null;
613
+ }
614
+ }
615
+ }
616
+ }
617
+ }
618
+ else {
619
+ const err15 = { instancePath: instancePath + "/values", schemaPath: "#/properties/values/type", keyword: "type", params: { type: "object" }, message: "must be object" };
620
+ if (vErrors === null) {
621
+ vErrors = [err15];
622
+ }
623
+ else {
624
+ vErrors.push(err15);
625
+ }
626
+ errors++;
627
+ }
628
+ }
629
+ }
630
+ else {
631
+ const err16 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
632
+ if (vErrors === null) {
633
+ vErrors = [err16];
634
+ }
635
+ else {
636
+ vErrors.push(err16);
637
+ }
638
+ errors++;
639
+ } validate26.errors = vErrors; return errors === 0; }
640
+ validate26.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
641
+ const schema40 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://baron.dev/kline-scene/time-series-chart-config.schema.json", "title": "TimeSeriesChartConfig", "type": "object", "additionalProperties": false, "required": ["locale", "timezone", "layout", "grid", "thousandsSeparator", "decimalFold", "zoomAnchor", "dateFormat", "largeNumberFormat"], "properties": { "locale": { "type": "string", "minLength": 2, "maxLength": 64, "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$" }, "timezone": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z_+-]+(?:/[A-Za-z0-9_+-]+)*$" }, "layout": { "type": "object", "additionalProperties": false, "required": ["backgroundColor", "textColor", "fontFamily", "fontSize"], "properties": { "backgroundColor": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor" }, "textColor": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor" }, "fontFamily": { "type": "string", "minLength": 1, "maxLength": 128 }, "fontSize": { "type": "number", "minimum": 8, "maximum": 32 } } }, "grid": { "type": "object", "additionalProperties": false, "required": ["horizontalColor", "verticalColor"], "properties": { "horizontalColor": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor" }, "verticalColor": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor" } } }, "thousandsSeparator": { "enum": ["", ",", " ", "_"] }, "decimalFold": { "type": "object", "additionalProperties": false, "required": ["enabled", "threshold"], "properties": { "enabled": { "type": "boolean" }, "threshold": { "type": "integer", "minimum": 1, "maximum": 16 } } }, "zoomAnchor": { "enum": ["cursor", "right"] }, "dateFormat": { "enum": ["yyyy-MM-dd", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mm:ss"] }, "largeNumberFormat": { "enum": ["western", "chinese", "plain"] } } };
642
+ const pattern7 = new RegExp("^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$", "u");
643
+ const pattern8 = new RegExp("^[A-Za-z_+-]+(?:/[A-Za-z0-9_+-]+)*$", "u");
644
+ function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://baron.dev/kline-scene/time-series-chart-config.schema.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate28.evaluated; if (evaluated0.dynamicProps) {
645
+ evaluated0.props = undefined;
646
+ } if (evaluated0.dynamicItems) {
647
+ evaluated0.items = undefined;
648
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
649
+ if (data.locale === undefined) {
650
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "locale" }, message: "must have required property '" + "locale" + "'" };
651
+ if (vErrors === null) {
652
+ vErrors = [err0];
653
+ }
654
+ else {
655
+ vErrors.push(err0);
656
+ }
657
+ errors++;
658
+ }
659
+ if (data.timezone === undefined) {
660
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "timezone" }, message: "must have required property '" + "timezone" + "'" };
661
+ if (vErrors === null) {
662
+ vErrors = [err1];
663
+ }
664
+ else {
665
+ vErrors.push(err1);
666
+ }
667
+ errors++;
668
+ }
669
+ if (data.layout === undefined) {
670
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "layout" }, message: "must have required property '" + "layout" + "'" };
671
+ if (vErrors === null) {
672
+ vErrors = [err2];
673
+ }
674
+ else {
675
+ vErrors.push(err2);
676
+ }
677
+ errors++;
678
+ }
679
+ if (data.grid === undefined) {
680
+ const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "grid" }, message: "must have required property '" + "grid" + "'" };
681
+ if (vErrors === null) {
682
+ vErrors = [err3];
683
+ }
684
+ else {
685
+ vErrors.push(err3);
686
+ }
687
+ errors++;
688
+ }
689
+ if (data.thousandsSeparator === undefined) {
690
+ const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "thousandsSeparator" }, message: "must have required property '" + "thousandsSeparator" + "'" };
691
+ if (vErrors === null) {
692
+ vErrors = [err4];
693
+ }
694
+ else {
695
+ vErrors.push(err4);
696
+ }
697
+ errors++;
698
+ }
699
+ if (data.decimalFold === undefined) {
700
+ const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "decimalFold" }, message: "must have required property '" + "decimalFold" + "'" };
701
+ if (vErrors === null) {
702
+ vErrors = [err5];
703
+ }
704
+ else {
705
+ vErrors.push(err5);
706
+ }
707
+ errors++;
708
+ }
709
+ if (data.zoomAnchor === undefined) {
710
+ const err6 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "zoomAnchor" }, message: "must have required property '" + "zoomAnchor" + "'" };
711
+ if (vErrors === null) {
712
+ vErrors = [err6];
713
+ }
714
+ else {
715
+ vErrors.push(err6);
716
+ }
717
+ errors++;
718
+ }
719
+ if (data.dateFormat === undefined) {
720
+ const err7 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "dateFormat" }, message: "must have required property '" + "dateFormat" + "'" };
721
+ if (vErrors === null) {
722
+ vErrors = [err7];
723
+ }
724
+ else {
725
+ vErrors.push(err7);
726
+ }
727
+ errors++;
728
+ }
729
+ if (data.largeNumberFormat === undefined) {
730
+ const err8 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "largeNumberFormat" }, message: "must have required property '" + "largeNumberFormat" + "'" };
731
+ if (vErrors === null) {
732
+ vErrors = [err8];
733
+ }
734
+ else {
735
+ vErrors.push(err8);
736
+ }
737
+ errors++;
738
+ }
739
+ for (const key0 in data) {
740
+ if (!(func1.call(schema40.properties, key0))) {
741
+ const err9 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
742
+ if (vErrors === null) {
743
+ vErrors = [err9];
744
+ }
745
+ else {
746
+ vErrors.push(err9);
747
+ }
748
+ errors++;
749
+ }
750
+ }
751
+ if (data.locale !== undefined) {
752
+ let data0 = data.locale;
753
+ if (typeof data0 === "string") {
754
+ if (func2(data0) > 64) {
755
+ const err10 = { instancePath: instancePath + "/locale", schemaPath: "#/properties/locale/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters" };
756
+ if (vErrors === null) {
757
+ vErrors = [err10];
758
+ }
759
+ else {
760
+ vErrors.push(err10);
761
+ }
762
+ errors++;
763
+ }
764
+ if (func2(data0) < 2) {
765
+ const err11 = { instancePath: instancePath + "/locale", schemaPath: "#/properties/locale/minLength", keyword: "minLength", params: { limit: 2 }, message: "must NOT have fewer than 2 characters" };
766
+ if (vErrors === null) {
767
+ vErrors = [err11];
768
+ }
769
+ else {
770
+ vErrors.push(err11);
771
+ }
772
+ errors++;
773
+ }
774
+ if (!pattern7.test(data0)) {
775
+ const err12 = { instancePath: instancePath + "/locale", schemaPath: "#/properties/locale/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$" }, message: "must match pattern \"" + "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$" + "\"" };
776
+ if (vErrors === null) {
777
+ vErrors = [err12];
778
+ }
779
+ else {
780
+ vErrors.push(err12);
781
+ }
782
+ errors++;
783
+ }
784
+ }
785
+ else {
786
+ const err13 = { instancePath: instancePath + "/locale", schemaPath: "#/properties/locale/type", keyword: "type", params: { type: "string" }, message: "must be string" };
787
+ if (vErrors === null) {
788
+ vErrors = [err13];
789
+ }
790
+ else {
791
+ vErrors.push(err13);
792
+ }
793
+ errors++;
794
+ }
795
+ }
796
+ if (data.timezone !== undefined) {
797
+ let data1 = data.timezone;
798
+ if (typeof data1 === "string") {
799
+ if (func2(data1) > 128) {
800
+ const err14 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
801
+ if (vErrors === null) {
802
+ vErrors = [err14];
803
+ }
804
+ else {
805
+ vErrors.push(err14);
806
+ }
807
+ errors++;
808
+ }
809
+ if (func2(data1) < 1) {
810
+ const err15 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
811
+ if (vErrors === null) {
812
+ vErrors = [err15];
813
+ }
814
+ else {
815
+ vErrors.push(err15);
816
+ }
817
+ errors++;
818
+ }
819
+ if (!pattern8.test(data1)) {
820
+ const err16 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z_+-]+(?:/[A-Za-z0-9_+-]+)*$" }, message: "must match pattern \"" + "^[A-Za-z_+-]+(?:/[A-Za-z0-9_+-]+)*$" + "\"" };
821
+ if (vErrors === null) {
822
+ vErrors = [err16];
823
+ }
824
+ else {
825
+ vErrors.push(err16);
826
+ }
827
+ errors++;
828
+ }
829
+ }
830
+ else {
831
+ const err17 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/type", keyword: "type", params: { type: "string" }, message: "must be string" };
832
+ if (vErrors === null) {
833
+ vErrors = [err17];
834
+ }
835
+ else {
836
+ vErrors.push(err17);
837
+ }
838
+ errors++;
839
+ }
840
+ }
841
+ if (data.layout !== undefined) {
842
+ let data2 = data.layout;
843
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
844
+ if (data2.backgroundColor === undefined) {
845
+ const err18 = { instancePath: instancePath + "/layout", schemaPath: "#/properties/layout/required", keyword: "required", params: { missingProperty: "backgroundColor" }, message: "must have required property '" + "backgroundColor" + "'" };
846
+ if (vErrors === null) {
847
+ vErrors = [err18];
848
+ }
849
+ else {
850
+ vErrors.push(err18);
851
+ }
852
+ errors++;
853
+ }
854
+ if (data2.textColor === undefined) {
855
+ const err19 = { instancePath: instancePath + "/layout", schemaPath: "#/properties/layout/required", keyword: "required", params: { missingProperty: "textColor" }, message: "must have required property '" + "textColor" + "'" };
856
+ if (vErrors === null) {
857
+ vErrors = [err19];
858
+ }
859
+ else {
860
+ vErrors.push(err19);
861
+ }
862
+ errors++;
863
+ }
864
+ if (data2.fontFamily === undefined) {
865
+ const err20 = { instancePath: instancePath + "/layout", schemaPath: "#/properties/layout/required", keyword: "required", params: { missingProperty: "fontFamily" }, message: "must have required property '" + "fontFamily" + "'" };
866
+ if (vErrors === null) {
867
+ vErrors = [err20];
868
+ }
869
+ else {
870
+ vErrors.push(err20);
871
+ }
872
+ errors++;
873
+ }
874
+ if (data2.fontSize === undefined) {
875
+ const err21 = { instancePath: instancePath + "/layout", schemaPath: "#/properties/layout/required", keyword: "required", params: { missingProperty: "fontSize" }, message: "must have required property '" + "fontSize" + "'" };
876
+ if (vErrors === null) {
877
+ vErrors = [err21];
878
+ }
879
+ else {
880
+ vErrors.push(err21);
881
+ }
882
+ errors++;
883
+ }
884
+ for (const key1 in data2) {
885
+ if (!((((key1 === "backgroundColor") || (key1 === "textColor")) || (key1 === "fontFamily")) || (key1 === "fontSize"))) {
886
+ const err22 = { instancePath: instancePath + "/layout", schemaPath: "#/properties/layout/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
887
+ if (vErrors === null) {
888
+ vErrors = [err22];
889
+ }
890
+ else {
891
+ vErrors.push(err22);
892
+ }
893
+ errors++;
894
+ }
895
+ }
896
+ if (data2.backgroundColor !== undefined) {
897
+ let data3 = data2.backgroundColor;
898
+ if (typeof data3 === "string") {
899
+ if (!pattern5.test(data3)) {
900
+ const err23 = { instancePath: instancePath + "/layout/backgroundColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/pattern", keyword: "pattern", params: { pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" }, message: "must match pattern \"" + "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" + "\"" };
901
+ if (vErrors === null) {
902
+ vErrors = [err23];
903
+ }
904
+ else {
905
+ vErrors.push(err23);
906
+ }
907
+ errors++;
908
+ }
909
+ }
910
+ else {
911
+ const err24 = { instancePath: instancePath + "/layout/backgroundColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/type", keyword: "type", params: { type: "string" }, message: "must be string" };
912
+ if (vErrors === null) {
913
+ vErrors = [err24];
914
+ }
915
+ else {
916
+ vErrors.push(err24);
917
+ }
918
+ errors++;
919
+ }
920
+ }
921
+ if (data2.textColor !== undefined) {
922
+ let data4 = data2.textColor;
923
+ if (typeof data4 === "string") {
924
+ if (!pattern5.test(data4)) {
925
+ const err25 = { instancePath: instancePath + "/layout/textColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/pattern", keyword: "pattern", params: { pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" }, message: "must match pattern \"" + "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" + "\"" };
926
+ if (vErrors === null) {
927
+ vErrors = [err25];
928
+ }
929
+ else {
930
+ vErrors.push(err25);
931
+ }
932
+ errors++;
933
+ }
934
+ }
935
+ else {
936
+ const err26 = { instancePath: instancePath + "/layout/textColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/type", keyword: "type", params: { type: "string" }, message: "must be string" };
937
+ if (vErrors === null) {
938
+ vErrors = [err26];
939
+ }
940
+ else {
941
+ vErrors.push(err26);
942
+ }
943
+ errors++;
944
+ }
945
+ }
946
+ if (data2.fontFamily !== undefined) {
947
+ let data5 = data2.fontFamily;
948
+ if (typeof data5 === "string") {
949
+ if (func2(data5) > 128) {
950
+ const err27 = { instancePath: instancePath + "/layout/fontFamily", schemaPath: "#/properties/layout/properties/fontFamily/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
951
+ if (vErrors === null) {
952
+ vErrors = [err27];
953
+ }
954
+ else {
955
+ vErrors.push(err27);
956
+ }
957
+ errors++;
958
+ }
959
+ if (func2(data5) < 1) {
960
+ const err28 = { instancePath: instancePath + "/layout/fontFamily", schemaPath: "#/properties/layout/properties/fontFamily/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
961
+ if (vErrors === null) {
962
+ vErrors = [err28];
963
+ }
964
+ else {
965
+ vErrors.push(err28);
966
+ }
967
+ errors++;
968
+ }
969
+ }
970
+ else {
971
+ const err29 = { instancePath: instancePath + "/layout/fontFamily", schemaPath: "#/properties/layout/properties/fontFamily/type", keyword: "type", params: { type: "string" }, message: "must be string" };
972
+ if (vErrors === null) {
973
+ vErrors = [err29];
974
+ }
975
+ else {
976
+ vErrors.push(err29);
977
+ }
978
+ errors++;
979
+ }
980
+ }
981
+ if (data2.fontSize !== undefined) {
982
+ let data6 = data2.fontSize;
983
+ if ((typeof data6 == "number") && (isFinite(data6))) {
984
+ if (data6 > 32 || isNaN(data6)) {
985
+ const err30 = { instancePath: instancePath + "/layout/fontSize", schemaPath: "#/properties/layout/properties/fontSize/maximum", keyword: "maximum", params: { comparison: "<=", limit: 32 }, message: "must be <= 32" };
986
+ if (vErrors === null) {
987
+ vErrors = [err30];
988
+ }
989
+ else {
990
+ vErrors.push(err30);
991
+ }
992
+ errors++;
993
+ }
994
+ if (data6 < 8 || isNaN(data6)) {
995
+ const err31 = { instancePath: instancePath + "/layout/fontSize", schemaPath: "#/properties/layout/properties/fontSize/minimum", keyword: "minimum", params: { comparison: ">=", limit: 8 }, message: "must be >= 8" };
996
+ if (vErrors === null) {
997
+ vErrors = [err31];
998
+ }
999
+ else {
1000
+ vErrors.push(err31);
1001
+ }
1002
+ errors++;
1003
+ }
1004
+ }
1005
+ else {
1006
+ const err32 = { instancePath: instancePath + "/layout/fontSize", schemaPath: "#/properties/layout/properties/fontSize/type", keyword: "type", params: { type: "number" }, message: "must be number" };
1007
+ if (vErrors === null) {
1008
+ vErrors = [err32];
1009
+ }
1010
+ else {
1011
+ vErrors.push(err32);
1012
+ }
1013
+ errors++;
1014
+ }
1015
+ }
1016
+ }
1017
+ else {
1018
+ const err33 = { instancePath: instancePath + "/layout", schemaPath: "#/properties/layout/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1019
+ if (vErrors === null) {
1020
+ vErrors = [err33];
1021
+ }
1022
+ else {
1023
+ vErrors.push(err33);
1024
+ }
1025
+ errors++;
1026
+ }
1027
+ }
1028
+ if (data.grid !== undefined) {
1029
+ let data7 = data.grid;
1030
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
1031
+ if (data7.horizontalColor === undefined) {
1032
+ const err34 = { instancePath: instancePath + "/grid", schemaPath: "#/properties/grid/required", keyword: "required", params: { missingProperty: "horizontalColor" }, message: "must have required property '" + "horizontalColor" + "'" };
1033
+ if (vErrors === null) {
1034
+ vErrors = [err34];
1035
+ }
1036
+ else {
1037
+ vErrors.push(err34);
1038
+ }
1039
+ errors++;
1040
+ }
1041
+ if (data7.verticalColor === undefined) {
1042
+ const err35 = { instancePath: instancePath + "/grid", schemaPath: "#/properties/grid/required", keyword: "required", params: { missingProperty: "verticalColor" }, message: "must have required property '" + "verticalColor" + "'" };
1043
+ if (vErrors === null) {
1044
+ vErrors = [err35];
1045
+ }
1046
+ else {
1047
+ vErrors.push(err35);
1048
+ }
1049
+ errors++;
1050
+ }
1051
+ for (const key2 in data7) {
1052
+ if (!((key2 === "horizontalColor") || (key2 === "verticalColor"))) {
1053
+ const err36 = { instancePath: instancePath + "/grid", schemaPath: "#/properties/grid/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
1054
+ if (vErrors === null) {
1055
+ vErrors = [err36];
1056
+ }
1057
+ else {
1058
+ vErrors.push(err36);
1059
+ }
1060
+ errors++;
1061
+ }
1062
+ }
1063
+ if (data7.horizontalColor !== undefined) {
1064
+ let data8 = data7.horizontalColor;
1065
+ if (typeof data8 === "string") {
1066
+ if (!pattern5.test(data8)) {
1067
+ const err37 = { instancePath: instancePath + "/grid/horizontalColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/pattern", keyword: "pattern", params: { pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" }, message: "must match pattern \"" + "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" + "\"" };
1068
+ if (vErrors === null) {
1069
+ vErrors = [err37];
1070
+ }
1071
+ else {
1072
+ vErrors.push(err37);
1073
+ }
1074
+ errors++;
1075
+ }
1076
+ }
1077
+ else {
1078
+ const err38 = { instancePath: instancePath + "/grid/horizontalColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1079
+ if (vErrors === null) {
1080
+ vErrors = [err38];
1081
+ }
1082
+ else {
1083
+ vErrors.push(err38);
1084
+ }
1085
+ errors++;
1086
+ }
1087
+ }
1088
+ if (data7.verticalColor !== undefined) {
1089
+ let data9 = data7.verticalColor;
1090
+ if (typeof data9 === "string") {
1091
+ if (!pattern5.test(data9)) {
1092
+ const err39 = { instancePath: instancePath + "/grid/verticalColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/pattern", keyword: "pattern", params: { pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" }, message: "must match pattern \"" + "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" + "\"" };
1093
+ if (vErrors === null) {
1094
+ vErrors = [err39];
1095
+ }
1096
+ else {
1097
+ vErrors.push(err39);
1098
+ }
1099
+ errors++;
1100
+ }
1101
+ }
1102
+ else {
1103
+ const err40 = { instancePath: instancePath + "/grid/verticalColor", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1104
+ if (vErrors === null) {
1105
+ vErrors = [err40];
1106
+ }
1107
+ else {
1108
+ vErrors.push(err40);
1109
+ }
1110
+ errors++;
1111
+ }
1112
+ }
1113
+ }
1114
+ else {
1115
+ const err41 = { instancePath: instancePath + "/grid", schemaPath: "#/properties/grid/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1116
+ if (vErrors === null) {
1117
+ vErrors = [err41];
1118
+ }
1119
+ else {
1120
+ vErrors.push(err41);
1121
+ }
1122
+ errors++;
1123
+ }
1124
+ }
1125
+ if (data.thousandsSeparator !== undefined) {
1126
+ let data10 = data.thousandsSeparator;
1127
+ if (!((((data10 === "") || (data10 === ",")) || (data10 === " ")) || (data10 === "_"))) {
1128
+ const err42 = { instancePath: instancePath + "/thousandsSeparator", schemaPath: "#/properties/thousandsSeparator/enum", keyword: "enum", params: { allowedValues: schema40.properties.thousandsSeparator.enum }, message: "must be equal to one of the allowed values" };
1129
+ if (vErrors === null) {
1130
+ vErrors = [err42];
1131
+ }
1132
+ else {
1133
+ vErrors.push(err42);
1134
+ }
1135
+ errors++;
1136
+ }
1137
+ }
1138
+ if (data.decimalFold !== undefined) {
1139
+ let data11 = data.decimalFold;
1140
+ if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
1141
+ if (data11.enabled === undefined) {
1142
+ const err43 = { instancePath: instancePath + "/decimalFold", schemaPath: "#/properties/decimalFold/required", keyword: "required", params: { missingProperty: "enabled" }, message: "must have required property '" + "enabled" + "'" };
1143
+ if (vErrors === null) {
1144
+ vErrors = [err43];
1145
+ }
1146
+ else {
1147
+ vErrors.push(err43);
1148
+ }
1149
+ errors++;
1150
+ }
1151
+ if (data11.threshold === undefined) {
1152
+ const err44 = { instancePath: instancePath + "/decimalFold", schemaPath: "#/properties/decimalFold/required", keyword: "required", params: { missingProperty: "threshold" }, message: "must have required property '" + "threshold" + "'" };
1153
+ if (vErrors === null) {
1154
+ vErrors = [err44];
1155
+ }
1156
+ else {
1157
+ vErrors.push(err44);
1158
+ }
1159
+ errors++;
1160
+ }
1161
+ for (const key3 in data11) {
1162
+ if (!((key3 === "enabled") || (key3 === "threshold"))) {
1163
+ const err45 = { instancePath: instancePath + "/decimalFold", schemaPath: "#/properties/decimalFold/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
1164
+ if (vErrors === null) {
1165
+ vErrors = [err45];
1166
+ }
1167
+ else {
1168
+ vErrors.push(err45);
1169
+ }
1170
+ errors++;
1171
+ }
1172
+ }
1173
+ if (data11.enabled !== undefined) {
1174
+ if (typeof data11.enabled !== "boolean") {
1175
+ const err46 = { instancePath: instancePath + "/decimalFold/enabled", schemaPath: "#/properties/decimalFold/properties/enabled/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
1176
+ if (vErrors === null) {
1177
+ vErrors = [err46];
1178
+ }
1179
+ else {
1180
+ vErrors.push(err46);
1181
+ }
1182
+ errors++;
1183
+ }
1184
+ }
1185
+ if (data11.threshold !== undefined) {
1186
+ let data13 = data11.threshold;
1187
+ if (!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))) {
1188
+ const err47 = { instancePath: instancePath + "/decimalFold/threshold", schemaPath: "#/properties/decimalFold/properties/threshold/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
1189
+ if (vErrors === null) {
1190
+ vErrors = [err47];
1191
+ }
1192
+ else {
1193
+ vErrors.push(err47);
1194
+ }
1195
+ errors++;
1196
+ }
1197
+ if ((typeof data13 == "number") && (isFinite(data13))) {
1198
+ if (data13 > 16 || isNaN(data13)) {
1199
+ const err48 = { instancePath: instancePath + "/decimalFold/threshold", schemaPath: "#/properties/decimalFold/properties/threshold/maximum", keyword: "maximum", params: { comparison: "<=", limit: 16 }, message: "must be <= 16" };
1200
+ if (vErrors === null) {
1201
+ vErrors = [err48];
1202
+ }
1203
+ else {
1204
+ vErrors.push(err48);
1205
+ }
1206
+ errors++;
1207
+ }
1208
+ if (data13 < 1 || isNaN(data13)) {
1209
+ const err49 = { instancePath: instancePath + "/decimalFold/threshold", schemaPath: "#/properties/decimalFold/properties/threshold/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
1210
+ if (vErrors === null) {
1211
+ vErrors = [err49];
1212
+ }
1213
+ else {
1214
+ vErrors.push(err49);
1215
+ }
1216
+ errors++;
1217
+ }
1218
+ }
1219
+ }
1220
+ }
1221
+ else {
1222
+ const err50 = { instancePath: instancePath + "/decimalFold", schemaPath: "#/properties/decimalFold/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1223
+ if (vErrors === null) {
1224
+ vErrors = [err50];
1225
+ }
1226
+ else {
1227
+ vErrors.push(err50);
1228
+ }
1229
+ errors++;
1230
+ }
1231
+ }
1232
+ if (data.zoomAnchor !== undefined) {
1233
+ let data14 = data.zoomAnchor;
1234
+ if (!((data14 === "cursor") || (data14 === "right"))) {
1235
+ const err51 = { instancePath: instancePath + "/zoomAnchor", schemaPath: "#/properties/zoomAnchor/enum", keyword: "enum", params: { allowedValues: schema40.properties.zoomAnchor.enum }, message: "must be equal to one of the allowed values" };
1236
+ if (vErrors === null) {
1237
+ vErrors = [err51];
1238
+ }
1239
+ else {
1240
+ vErrors.push(err51);
1241
+ }
1242
+ errors++;
1243
+ }
1244
+ }
1245
+ if (data.dateFormat !== undefined) {
1246
+ let data15 = data.dateFormat;
1247
+ if (!(((data15 === "yyyy-MM-dd") || (data15 === "yyyy-MM-dd HH:mm")) || (data15 === "yyyy-MM-dd HH:mm:ss"))) {
1248
+ const err52 = { instancePath: instancePath + "/dateFormat", schemaPath: "#/properties/dateFormat/enum", keyword: "enum", params: { allowedValues: schema40.properties.dateFormat.enum }, message: "must be equal to one of the allowed values" };
1249
+ if (vErrors === null) {
1250
+ vErrors = [err52];
1251
+ }
1252
+ else {
1253
+ vErrors.push(err52);
1254
+ }
1255
+ errors++;
1256
+ }
1257
+ }
1258
+ if (data.largeNumberFormat !== undefined) {
1259
+ let data16 = data.largeNumberFormat;
1260
+ if (!(((data16 === "western") || (data16 === "chinese")) || (data16 === "plain"))) {
1261
+ const err53 = { instancePath: instancePath + "/largeNumberFormat", schemaPath: "#/properties/largeNumberFormat/enum", keyword: "enum", params: { allowedValues: schema40.properties.largeNumberFormat.enum }, message: "must be equal to one of the allowed values" };
1262
+ if (vErrors === null) {
1263
+ vErrors = [err53];
1264
+ }
1265
+ else {
1266
+ vErrors.push(err53);
1267
+ }
1268
+ errors++;
1269
+ }
1270
+ }
1271
+ }
1272
+ else {
1273
+ const err54 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1274
+ if (vErrors === null) {
1275
+ vErrors = [err54];
1276
+ }
1277
+ else {
1278
+ vErrors.push(err54);
1279
+ }
1280
+ errors++;
1281
+ } validate28.errors = vErrors; return errors === 0; }
1282
+ validate28.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1283
+ const schema46 = { "type": "object", "additionalProperties": false, "required": ["width", "height", "deviceScaleFactor", "background", "fontFamily", "timeoutMs"], "properties": { "width": { "type": "integer", "minimum": 320, "maximum": 8192 }, "height": { "type": "integer", "minimum": 240, "maximum": 8192 }, "deviceScaleFactor": { "type": "number", "minimum": 0.5, "maximum": 4 }, "background": { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor" }, "fontFamily": { "const": "Baron Sans" }, "timeoutMs": { "type": "integer", "minimum": 100, "maximum": 120000 } } };
1284
+ function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate30.evaluated; if (evaluated0.dynamicProps) {
1285
+ evaluated0.props = undefined;
1286
+ } if (evaluated0.dynamicItems) {
1287
+ evaluated0.items = undefined;
1288
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
1289
+ if (data.width === undefined) {
1290
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "width" }, message: "must have required property '" + "width" + "'" };
1291
+ if (vErrors === null) {
1292
+ vErrors = [err0];
1293
+ }
1294
+ else {
1295
+ vErrors.push(err0);
1296
+ }
1297
+ errors++;
1298
+ }
1299
+ if (data.height === undefined) {
1300
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "height" }, message: "must have required property '" + "height" + "'" };
1301
+ if (vErrors === null) {
1302
+ vErrors = [err1];
1303
+ }
1304
+ else {
1305
+ vErrors.push(err1);
1306
+ }
1307
+ errors++;
1308
+ }
1309
+ if (data.deviceScaleFactor === undefined) {
1310
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "deviceScaleFactor" }, message: "must have required property '" + "deviceScaleFactor" + "'" };
1311
+ if (vErrors === null) {
1312
+ vErrors = [err2];
1313
+ }
1314
+ else {
1315
+ vErrors.push(err2);
1316
+ }
1317
+ errors++;
1318
+ }
1319
+ if (data.background === undefined) {
1320
+ const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "background" }, message: "must have required property '" + "background" + "'" };
1321
+ if (vErrors === null) {
1322
+ vErrors = [err3];
1323
+ }
1324
+ else {
1325
+ vErrors.push(err3);
1326
+ }
1327
+ errors++;
1328
+ }
1329
+ if (data.fontFamily === undefined) {
1330
+ const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "fontFamily" }, message: "must have required property '" + "fontFamily" + "'" };
1331
+ if (vErrors === null) {
1332
+ vErrors = [err4];
1333
+ }
1334
+ else {
1335
+ vErrors.push(err4);
1336
+ }
1337
+ errors++;
1338
+ }
1339
+ if (data.timeoutMs === undefined) {
1340
+ const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "timeoutMs" }, message: "must have required property '" + "timeoutMs" + "'" };
1341
+ if (vErrors === null) {
1342
+ vErrors = [err5];
1343
+ }
1344
+ else {
1345
+ vErrors.push(err5);
1346
+ }
1347
+ errors++;
1348
+ }
1349
+ for (const key0 in data) {
1350
+ if (!((((((key0 === "width") || (key0 === "height")) || (key0 === "deviceScaleFactor")) || (key0 === "background")) || (key0 === "fontFamily")) || (key0 === "timeoutMs"))) {
1351
+ const err6 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
1352
+ if (vErrors === null) {
1353
+ vErrors = [err6];
1354
+ }
1355
+ else {
1356
+ vErrors.push(err6);
1357
+ }
1358
+ errors++;
1359
+ }
1360
+ }
1361
+ if (data.width !== undefined) {
1362
+ let data0 = data.width;
1363
+ if (!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))) {
1364
+ const err7 = { instancePath: instancePath + "/width", schemaPath: "#/properties/width/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
1365
+ if (vErrors === null) {
1366
+ vErrors = [err7];
1367
+ }
1368
+ else {
1369
+ vErrors.push(err7);
1370
+ }
1371
+ errors++;
1372
+ }
1373
+ if ((typeof data0 == "number") && (isFinite(data0))) {
1374
+ if (data0 > 8192 || isNaN(data0)) {
1375
+ const err8 = { instancePath: instancePath + "/width", schemaPath: "#/properties/width/maximum", keyword: "maximum", params: { comparison: "<=", limit: 8192 }, message: "must be <= 8192" };
1376
+ if (vErrors === null) {
1377
+ vErrors = [err8];
1378
+ }
1379
+ else {
1380
+ vErrors.push(err8);
1381
+ }
1382
+ errors++;
1383
+ }
1384
+ if (data0 < 320 || isNaN(data0)) {
1385
+ const err9 = { instancePath: instancePath + "/width", schemaPath: "#/properties/width/minimum", keyword: "minimum", params: { comparison: ">=", limit: 320 }, message: "must be >= 320" };
1386
+ if (vErrors === null) {
1387
+ vErrors = [err9];
1388
+ }
1389
+ else {
1390
+ vErrors.push(err9);
1391
+ }
1392
+ errors++;
1393
+ }
1394
+ }
1395
+ }
1396
+ if (data.height !== undefined) {
1397
+ let data1 = data.height;
1398
+ if (!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))) {
1399
+ const err10 = { instancePath: instancePath + "/height", schemaPath: "#/properties/height/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
1400
+ if (vErrors === null) {
1401
+ vErrors = [err10];
1402
+ }
1403
+ else {
1404
+ vErrors.push(err10);
1405
+ }
1406
+ errors++;
1407
+ }
1408
+ if ((typeof data1 == "number") && (isFinite(data1))) {
1409
+ if (data1 > 8192 || isNaN(data1)) {
1410
+ const err11 = { instancePath: instancePath + "/height", schemaPath: "#/properties/height/maximum", keyword: "maximum", params: { comparison: "<=", limit: 8192 }, message: "must be <= 8192" };
1411
+ if (vErrors === null) {
1412
+ vErrors = [err11];
1413
+ }
1414
+ else {
1415
+ vErrors.push(err11);
1416
+ }
1417
+ errors++;
1418
+ }
1419
+ if (data1 < 240 || isNaN(data1)) {
1420
+ const err12 = { instancePath: instancePath + "/height", schemaPath: "#/properties/height/minimum", keyword: "minimum", params: { comparison: ">=", limit: 240 }, message: "must be >= 240" };
1421
+ if (vErrors === null) {
1422
+ vErrors = [err12];
1423
+ }
1424
+ else {
1425
+ vErrors.push(err12);
1426
+ }
1427
+ errors++;
1428
+ }
1429
+ }
1430
+ }
1431
+ if (data.deviceScaleFactor !== undefined) {
1432
+ let data2 = data.deviceScaleFactor;
1433
+ if ((typeof data2 == "number") && (isFinite(data2))) {
1434
+ if (data2 > 4 || isNaN(data2)) {
1435
+ const err13 = { instancePath: instancePath + "/deviceScaleFactor", schemaPath: "#/properties/deviceScaleFactor/maximum", keyword: "maximum", params: { comparison: "<=", limit: 4 }, message: "must be <= 4" };
1436
+ if (vErrors === null) {
1437
+ vErrors = [err13];
1438
+ }
1439
+ else {
1440
+ vErrors.push(err13);
1441
+ }
1442
+ errors++;
1443
+ }
1444
+ if (data2 < 0.5 || isNaN(data2)) {
1445
+ const err14 = { instancePath: instancePath + "/deviceScaleFactor", schemaPath: "#/properties/deviceScaleFactor/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0.5 }, message: "must be >= 0.5" };
1446
+ if (vErrors === null) {
1447
+ vErrors = [err14];
1448
+ }
1449
+ else {
1450
+ vErrors.push(err14);
1451
+ }
1452
+ errors++;
1453
+ }
1454
+ }
1455
+ else {
1456
+ const err15 = { instancePath: instancePath + "/deviceScaleFactor", schemaPath: "#/properties/deviceScaleFactor/type", keyword: "type", params: { type: "number" }, message: "must be number" };
1457
+ if (vErrors === null) {
1458
+ vErrors = [err15];
1459
+ }
1460
+ else {
1461
+ vErrors.push(err15);
1462
+ }
1463
+ errors++;
1464
+ }
1465
+ }
1466
+ if (data.background !== undefined) {
1467
+ let data3 = data.background;
1468
+ if (typeof data3 === "string") {
1469
+ if (!pattern5.test(data3)) {
1470
+ const err16 = { instancePath: instancePath + "/background", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/pattern", keyword: "pattern", params: { pattern: "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" }, message: "must match pattern \"" + "^rgba\\(\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*[0-9]{1,3}\\s*,\\s*(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)\\s*\\)$" + "\"" };
1471
+ if (vErrors === null) {
1472
+ vErrors = [err16];
1473
+ }
1474
+ else {
1475
+ vErrors.push(err16);
1476
+ }
1477
+ errors++;
1478
+ }
1479
+ }
1480
+ else {
1481
+ const err17 = { instancePath: instancePath + "/background", schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/rgbaColor/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1482
+ if (vErrors === null) {
1483
+ vErrors = [err17];
1484
+ }
1485
+ else {
1486
+ vErrors.push(err17);
1487
+ }
1488
+ errors++;
1489
+ }
1490
+ }
1491
+ if (data.fontFamily !== undefined) {
1492
+ if ("Baron Sans" !== data.fontFamily) {
1493
+ const err18 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/properties/fontFamily/const", keyword: "const", params: { allowedValue: "Baron Sans" }, message: "must be equal to constant" };
1494
+ if (vErrors === null) {
1495
+ vErrors = [err18];
1496
+ }
1497
+ else {
1498
+ vErrors.push(err18);
1499
+ }
1500
+ errors++;
1501
+ }
1502
+ }
1503
+ if (data.timeoutMs !== undefined) {
1504
+ let data5 = data.timeoutMs;
1505
+ if (!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) {
1506
+ const err19 = { instancePath: instancePath + "/timeoutMs", schemaPath: "#/properties/timeoutMs/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
1507
+ if (vErrors === null) {
1508
+ vErrors = [err19];
1509
+ }
1510
+ else {
1511
+ vErrors.push(err19);
1512
+ }
1513
+ errors++;
1514
+ }
1515
+ if ((typeof data5 == "number") && (isFinite(data5))) {
1516
+ if (data5 > 120000 || isNaN(data5)) {
1517
+ const err20 = { instancePath: instancePath + "/timeoutMs", schemaPath: "#/properties/timeoutMs/maximum", keyword: "maximum", params: { comparison: "<=", limit: 120000 }, message: "must be <= 120000" };
1518
+ if (vErrors === null) {
1519
+ vErrors = [err20];
1520
+ }
1521
+ else {
1522
+ vErrors.push(err20);
1523
+ }
1524
+ errors++;
1525
+ }
1526
+ if (data5 < 100 || isNaN(data5)) {
1527
+ const err21 = { instancePath: instancePath + "/timeoutMs", schemaPath: "#/properties/timeoutMs/minimum", keyword: "minimum", params: { comparison: ">=", limit: 100 }, message: "must be >= 100" };
1528
+ if (vErrors === null) {
1529
+ vErrors = [err21];
1530
+ }
1531
+ else {
1532
+ vErrors.push(err21);
1533
+ }
1534
+ errors++;
1535
+ }
1536
+ }
1537
+ }
1538
+ }
1539
+ else {
1540
+ const err22 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1541
+ if (vErrors === null) {
1542
+ vErrors = [err22];
1543
+ }
1544
+ else {
1545
+ vErrors.push(err22);
1546
+ }
1547
+ errors++;
1548
+ } validate30.errors = vErrors; return errors === 0; }
1549
+ validate30.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1550
+ const schema48 = { "type": "object", "maxProperties": 64, "propertyNames": { "type": "string", "minLength": 1, "maxLength": 128 }, "additionalProperties": { "oneOf": [{ "type": "null" }, { "type": "boolean" }, { "$ref": "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber" }, { "type": "string" }] } };
1551
+ function validate32(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate32.evaluated; if (evaluated0.dynamicProps) {
1552
+ evaluated0.props = undefined;
1553
+ } if (evaluated0.dynamicItems) {
1554
+ evaluated0.items = undefined;
1555
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
1556
+ if (Object.keys(data).length > 64) {
1557
+ const err0 = { instancePath, schemaPath: "#/maxProperties", keyword: "maxProperties", params: { limit: 64 }, message: "must NOT have more than 64 properties" };
1558
+ if (vErrors === null) {
1559
+ vErrors = [err0];
1560
+ }
1561
+ else {
1562
+ vErrors.push(err0);
1563
+ }
1564
+ errors++;
1565
+ }
1566
+ for (const key0 in data) {
1567
+ const _errs1 = errors;
1568
+ if (typeof key0 === "string") {
1569
+ if (func2(key0) > 128) {
1570
+ const err1 = { instancePath, schemaPath: "#/propertyNames/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters", propertyName: key0 };
1571
+ if (vErrors === null) {
1572
+ vErrors = [err1];
1573
+ }
1574
+ else {
1575
+ vErrors.push(err1);
1576
+ }
1577
+ errors++;
1578
+ }
1579
+ if (func2(key0) < 1) {
1580
+ const err2 = { instancePath, schemaPath: "#/propertyNames/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters", propertyName: key0 };
1581
+ if (vErrors === null) {
1582
+ vErrors = [err2];
1583
+ }
1584
+ else {
1585
+ vErrors.push(err2);
1586
+ }
1587
+ errors++;
1588
+ }
1589
+ }
1590
+ else {
1591
+ const err3 = { instancePath, schemaPath: "#/propertyNames/type", keyword: "type", params: { type: "string" }, message: "must be string", propertyName: key0 };
1592
+ if (vErrors === null) {
1593
+ vErrors = [err3];
1594
+ }
1595
+ else {
1596
+ vErrors.push(err3);
1597
+ }
1598
+ errors++;
1599
+ }
1600
+ var valid0 = _errs1 === errors;
1601
+ if (!valid0) {
1602
+ const err4 = { instancePath, schemaPath: "#/propertyNames", keyword: "propertyNames", params: { propertyName: key0 }, message: "property name must be valid" };
1603
+ if (vErrors === null) {
1604
+ vErrors = [err4];
1605
+ }
1606
+ else {
1607
+ vErrors.push(err4);
1608
+ }
1609
+ errors++;
1610
+ }
1611
+ }
1612
+ for (const key1 in data) {
1613
+ let data0 = data[key1];
1614
+ const _errs5 = errors;
1615
+ let valid2 = false;
1616
+ let passing0 = null;
1617
+ const _errs6 = errors;
1618
+ if (data0 !== null) {
1619
+ const err5 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/additionalProperties/oneOf/0/type", keyword: "type", params: { type: "null" }, message: "must be null" };
1620
+ if (vErrors === null) {
1621
+ vErrors = [err5];
1622
+ }
1623
+ else {
1624
+ vErrors.push(err5);
1625
+ }
1626
+ errors++;
1627
+ }
1628
+ var _valid0 = _errs6 === errors;
1629
+ if (_valid0) {
1630
+ valid2 = true;
1631
+ passing0 = 0;
1632
+ }
1633
+ const _errs8 = errors;
1634
+ if (typeof data0 !== "boolean") {
1635
+ const err6 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/additionalProperties/oneOf/1/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
1636
+ if (vErrors === null) {
1637
+ vErrors = [err6];
1638
+ }
1639
+ else {
1640
+ vErrors.push(err6);
1641
+ }
1642
+ errors++;
1643
+ }
1644
+ var _valid0 = _errs8 === errors;
1645
+ if (_valid0 && valid2) {
1646
+ valid2 = false;
1647
+ passing0 = [passing0, 1];
1648
+ }
1649
+ else {
1650
+ if (_valid0) {
1651
+ valid2 = true;
1652
+ passing0 = 1;
1653
+ }
1654
+ const _errs10 = errors;
1655
+ if ((typeof data0 == "number") && (isFinite(data0))) {
1656
+ if (data0 > 1.7976931348623157e+308 || isNaN(data0)) {
1657
+ const err7 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber/maximum", keyword: "maximum", params: { comparison: "<=", limit: 1.7976931348623157e+308 }, message: "must be <= 1.7976931348623157e+308" };
1658
+ if (vErrors === null) {
1659
+ vErrors = [err7];
1660
+ }
1661
+ else {
1662
+ vErrors.push(err7);
1663
+ }
1664
+ errors++;
1665
+ }
1666
+ if (data0 < -1.7976931348623157e+308 || isNaN(data0)) {
1667
+ const err8 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber/minimum", keyword: "minimum", params: { comparison: ">=", limit: -1.7976931348623157e+308 }, message: "must be >= -1.7976931348623157e+308" };
1668
+ if (vErrors === null) {
1669
+ vErrors = [err8];
1670
+ }
1671
+ else {
1672
+ vErrors.push(err8);
1673
+ }
1674
+ errors++;
1675
+ }
1676
+ }
1677
+ else {
1678
+ const err9 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "https://baron.dev/kline-scene/common.schema.json#/$defs/finiteNumber/type", keyword: "type", params: { type: "number" }, message: "must be number" };
1679
+ if (vErrors === null) {
1680
+ vErrors = [err9];
1681
+ }
1682
+ else {
1683
+ vErrors.push(err9);
1684
+ }
1685
+ errors++;
1686
+ }
1687
+ var _valid0 = _errs10 === errors;
1688
+ if (_valid0 && valid2) {
1689
+ valid2 = false;
1690
+ passing0 = [passing0, 2];
1691
+ }
1692
+ else {
1693
+ if (_valid0) {
1694
+ valid2 = true;
1695
+ passing0 = 2;
1696
+ }
1697
+ const _errs13 = errors;
1698
+ if (typeof data0 !== "string") {
1699
+ const err10 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/additionalProperties/oneOf/3/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1700
+ if (vErrors === null) {
1701
+ vErrors = [err10];
1702
+ }
1703
+ else {
1704
+ vErrors.push(err10);
1705
+ }
1706
+ errors++;
1707
+ }
1708
+ var _valid0 = _errs13 === errors;
1709
+ if (_valid0 && valid2) {
1710
+ valid2 = false;
1711
+ passing0 = [passing0, 3];
1712
+ }
1713
+ else {
1714
+ if (_valid0) {
1715
+ valid2 = true;
1716
+ passing0 = 3;
1717
+ }
1718
+ }
1719
+ }
1720
+ }
1721
+ if (!valid2) {
1722
+ const err11 = { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/additionalProperties/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
1723
+ if (vErrors === null) {
1724
+ vErrors = [err11];
1725
+ }
1726
+ else {
1727
+ vErrors.push(err11);
1728
+ }
1729
+ errors++;
1730
+ }
1731
+ else {
1732
+ errors = _errs5;
1733
+ if (vErrors !== null) {
1734
+ if (_errs5) {
1735
+ vErrors.length = _errs5;
1736
+ }
1737
+ else {
1738
+ vErrors = null;
1739
+ }
1740
+ }
1741
+ }
1742
+ }
1743
+ }
1744
+ else {
1745
+ const err12 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1746
+ if (vErrors === null) {
1747
+ vErrors = [err12];
1748
+ }
1749
+ else {
1750
+ vErrors.push(err12);
1751
+ }
1752
+ errors++;
1753
+ } validate32.errors = vErrors; return errors === 0; }
1754
+ validate32.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1755
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://baron.dev/kline-scene/time-series-scene.schema.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate20.evaluated; if (evaluated0.dynamicProps) {
1756
+ evaluated0.props = undefined;
1757
+ } if (evaluated0.dynamicItems) {
1758
+ evaluated0.items = undefined;
1759
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
1760
+ if (data.schema === undefined) {
1761
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "schema" }, message: "must have required property '" + "schema" + "'" };
1762
+ if (vErrors === null) {
1763
+ vErrors = [err0];
1764
+ }
1765
+ else {
1766
+ vErrors.push(err0);
1767
+ }
1768
+ errors++;
1769
+ }
1770
+ if (data.version === undefined) {
1771
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property '" + "version" + "'" };
1772
+ if (vErrors === null) {
1773
+ vErrors = [err1];
1774
+ }
1775
+ else {
1776
+ vErrors.push(err1);
1777
+ }
1778
+ errors++;
1779
+ }
1780
+ if (data.runtime === undefined) {
1781
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "runtime" }, message: "must have required property '" + "runtime" + "'" };
1782
+ if (vErrors === null) {
1783
+ vErrors = [err2];
1784
+ }
1785
+ else {
1786
+ vErrors.push(err2);
1787
+ }
1788
+ errors++;
1789
+ }
1790
+ if (data.period === undefined) {
1791
+ const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "period" }, message: "must have required property '" + "period" + "'" };
1792
+ if (vErrors === null) {
1793
+ vErrors = [err3];
1794
+ }
1795
+ else {
1796
+ vErrors.push(err3);
1797
+ }
1798
+ errors++;
1799
+ }
1800
+ if (data.series === undefined) {
1801
+ const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "series" }, message: "must have required property '" + "series" + "'" };
1802
+ if (vErrors === null) {
1803
+ vErrors = [err4];
1804
+ }
1805
+ else {
1806
+ vErrors.push(err4);
1807
+ }
1808
+ errors++;
1809
+ }
1810
+ if (data.data === undefined) {
1811
+ const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "data" }, message: "must have required property '" + "data" + "'" };
1812
+ if (vErrors === null) {
1813
+ vErrors = [err5];
1814
+ }
1815
+ else {
1816
+ vErrors.push(err5);
1817
+ }
1818
+ errors++;
1819
+ }
1820
+ if (data.chart === undefined) {
1821
+ const err6 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "chart" }, message: "must have required property '" + "chart" + "'" };
1822
+ if (vErrors === null) {
1823
+ vErrors = [err6];
1824
+ }
1825
+ else {
1826
+ vErrors.push(err6);
1827
+ }
1828
+ errors++;
1829
+ }
1830
+ if (data.viewport === undefined) {
1831
+ const err7 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "viewport" }, message: "must have required property '" + "viewport" + "'" };
1832
+ if (vErrors === null) {
1833
+ vErrors = [err7];
1834
+ }
1835
+ else {
1836
+ vErrors.push(err7);
1837
+ }
1838
+ errors++;
1839
+ }
1840
+ if (data.render === undefined) {
1841
+ const err8 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "render" }, message: "must have required property '" + "render" + "'" };
1842
+ if (vErrors === null) {
1843
+ vErrors = [err8];
1844
+ }
1845
+ else {
1846
+ vErrors.push(err8);
1847
+ }
1848
+ errors++;
1849
+ }
1850
+ if (data.metadata === undefined) {
1851
+ const err9 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "metadata" }, message: "must have required property '" + "metadata" + "'" };
1852
+ if (vErrors === null) {
1853
+ vErrors = [err9];
1854
+ }
1855
+ else {
1856
+ vErrors.push(err9);
1857
+ }
1858
+ errors++;
1859
+ }
1860
+ for (const key0 in data) {
1861
+ if (!(func1.call(schema31.properties, key0))) {
1862
+ const err10 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
1863
+ if (vErrors === null) {
1864
+ vErrors = [err10];
1865
+ }
1866
+ else {
1867
+ vErrors.push(err10);
1868
+ }
1869
+ errors++;
1870
+ }
1871
+ }
1872
+ if (data.schema !== undefined) {
1873
+ if ("@baron1996/time-series-scene" !== data.schema) {
1874
+ const err11 = { instancePath: instancePath + "/schema", schemaPath: "#/properties/schema/const", keyword: "const", params: { allowedValue: "@baron1996/time-series-scene" }, message: "must be equal to constant" };
1875
+ if (vErrors === null) {
1876
+ vErrors = [err11];
1877
+ }
1878
+ else {
1879
+ vErrors.push(err11);
1880
+ }
1881
+ errors++;
1882
+ }
1883
+ }
1884
+ if (data.version !== undefined) {
1885
+ if (1 !== data.version) {
1886
+ const err12 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/const", keyword: "const", params: { allowedValue: 1 }, message: "must be equal to constant" };
1887
+ if (vErrors === null) {
1888
+ vErrors = [err12];
1889
+ }
1890
+ else {
1891
+ vErrors.push(err12);
1892
+ }
1893
+ errors++;
1894
+ }
1895
+ }
1896
+ if (data.runtime !== undefined) {
1897
+ let data2 = data.runtime;
1898
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
1899
+ if (data2.engine === undefined) {
1900
+ const err13 = { instancePath: instancePath + "/runtime", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/required", keyword: "required", params: { missingProperty: "engine" }, message: "must have required property '" + "engine" + "'" };
1901
+ if (vErrors === null) {
1902
+ vErrors = [err13];
1903
+ }
1904
+ else {
1905
+ vErrors.push(err13);
1906
+ }
1907
+ errors++;
1908
+ }
1909
+ if (data2.engineVersion === undefined) {
1910
+ const err14 = { instancePath: instancePath + "/runtime", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/required", keyword: "required", params: { missingProperty: "engineVersion" }, message: "must have required property '" + "engineVersion" + "'" };
1911
+ if (vErrors === null) {
1912
+ vErrors = [err14];
1913
+ }
1914
+ else {
1915
+ vErrors.push(err14);
1916
+ }
1917
+ errors++;
1918
+ }
1919
+ if (data2.runtimeVersion === undefined) {
1920
+ const err15 = { instancePath: instancePath + "/runtime", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/required", keyword: "required", params: { missingProperty: "runtimeVersion" }, message: "must have required property '" + "runtimeVersion" + "'" };
1921
+ if (vErrors === null) {
1922
+ vErrors = [err15];
1923
+ }
1924
+ else {
1925
+ vErrors.push(err15);
1926
+ }
1927
+ errors++;
1928
+ }
1929
+ for (const key1 in data2) {
1930
+ if (!(((key1 === "engine") || (key1 === "engineVersion")) || (key1 === "runtimeVersion"))) {
1931
+ const err16 = { instancePath: instancePath + "/runtime", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
1932
+ if (vErrors === null) {
1933
+ vErrors = [err16];
1934
+ }
1935
+ else {
1936
+ vErrors.push(err16);
1937
+ }
1938
+ errors++;
1939
+ }
1940
+ }
1941
+ if (data2.engine !== undefined) {
1942
+ if ("klinecharts" !== data2.engine) {
1943
+ const err17 = { instancePath: instancePath + "/runtime/engine", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/properties/engine/const", keyword: "const", params: { allowedValue: "klinecharts" }, message: "must be equal to constant" };
1944
+ if (vErrors === null) {
1945
+ vErrors = [err17];
1946
+ }
1947
+ else {
1948
+ vErrors.push(err17);
1949
+ }
1950
+ errors++;
1951
+ }
1952
+ }
1953
+ if (data2.engineVersion !== undefined) {
1954
+ if ("10.0.0" !== data2.engineVersion) {
1955
+ const err18 = { instancePath: instancePath + "/runtime/engineVersion", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/properties/engineVersion/const", keyword: "const", params: { allowedValue: "10.0.0" }, message: "must be equal to constant" };
1956
+ if (vErrors === null) {
1957
+ vErrors = [err18];
1958
+ }
1959
+ else {
1960
+ vErrors.push(err18);
1961
+ }
1962
+ errors++;
1963
+ }
1964
+ }
1965
+ if (data2.runtimeVersion !== undefined) {
1966
+ if ("0.1.0" !== data2.runtimeVersion) {
1967
+ const err19 = { instancePath: instancePath + "/runtime/runtimeVersion", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/properties/runtimeVersion/const", keyword: "const", params: { allowedValue: "0.1.0" }, message: "must be equal to constant" };
1968
+ if (vErrors === null) {
1969
+ vErrors = [err19];
1970
+ }
1971
+ else {
1972
+ vErrors.push(err19);
1973
+ }
1974
+ errors++;
1975
+ }
1976
+ }
1977
+ }
1978
+ else {
1979
+ const err20 = { instancePath: instancePath + "/runtime", schemaPath: "https://baron.dev/kline-scene/time-series-runtime.schema.json/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1980
+ if (vErrors === null) {
1981
+ vErrors = [err20];
1982
+ }
1983
+ else {
1984
+ vErrors.push(err20);
1985
+ }
1986
+ errors++;
1987
+ }
1988
+ }
1989
+ if (data.period !== undefined) {
1990
+ let data6 = data.period;
1991
+ if (data6 && typeof data6 == "object" && !Array.isArray(data6)) {
1992
+ if (data6.span === undefined) {
1993
+ const err21 = { instancePath: instancePath + "/period", schemaPath: "#/$defs/timeSeriesPeriod/required", keyword: "required", params: { missingProperty: "span" }, message: "must have required property '" + "span" + "'" };
1994
+ if (vErrors === null) {
1995
+ vErrors = [err21];
1996
+ }
1997
+ else {
1998
+ vErrors.push(err21);
1999
+ }
2000
+ errors++;
2001
+ }
2002
+ if (data6.type === undefined) {
2003
+ const err22 = { instancePath: instancePath + "/period", schemaPath: "#/$defs/timeSeriesPeriod/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" };
2004
+ if (vErrors === null) {
2005
+ vErrors = [err22];
2006
+ }
2007
+ else {
2008
+ vErrors.push(err22);
2009
+ }
2010
+ errors++;
2011
+ }
2012
+ for (const key2 in data6) {
2013
+ if (!((key2 === "span") || (key2 === "type"))) {
2014
+ const err23 = { instancePath: instancePath + "/period", schemaPath: "#/$defs/timeSeriesPeriod/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
2015
+ if (vErrors === null) {
2016
+ vErrors = [err23];
2017
+ }
2018
+ else {
2019
+ vErrors.push(err23);
2020
+ }
2021
+ errors++;
2022
+ }
2023
+ }
2024
+ if (data6.span !== undefined) {
2025
+ let data7 = data6.span;
2026
+ if (!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))) {
2027
+ const err24 = { instancePath: instancePath + "/period/span", schemaPath: "#/$defs/timeSeriesPeriod/properties/span/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
2028
+ if (vErrors === null) {
2029
+ vErrors = [err24];
2030
+ }
2031
+ else {
2032
+ vErrors.push(err24);
2033
+ }
2034
+ errors++;
2035
+ }
2036
+ if ((typeof data7 == "number") && (isFinite(data7))) {
2037
+ if (data7 > 100000 || isNaN(data7)) {
2038
+ const err25 = { instancePath: instancePath + "/period/span", schemaPath: "#/$defs/timeSeriesPeriod/properties/span/maximum", keyword: "maximum", params: { comparison: "<=", limit: 100000 }, message: "must be <= 100000" };
2039
+ if (vErrors === null) {
2040
+ vErrors = [err25];
2041
+ }
2042
+ else {
2043
+ vErrors.push(err25);
2044
+ }
2045
+ errors++;
2046
+ }
2047
+ if (data7 < 1 || isNaN(data7)) {
2048
+ const err26 = { instancePath: instancePath + "/period/span", schemaPath: "#/$defs/timeSeriesPeriod/properties/span/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
2049
+ if (vErrors === null) {
2050
+ vErrors = [err26];
2051
+ }
2052
+ else {
2053
+ vErrors.push(err26);
2054
+ }
2055
+ errors++;
2056
+ }
2057
+ }
2058
+ }
2059
+ if (data6.type !== undefined) {
2060
+ let data8 = data6.type;
2061
+ if (!(((((((data8 === "second") || (data8 === "minute")) || (data8 === "hour")) || (data8 === "day")) || (data8 === "week")) || (data8 === "month")) || (data8 === "year"))) {
2062
+ const err27 = { instancePath: instancePath + "/period/type", schemaPath: "#/$defs/timeSeriesPeriod/properties/type/enum", keyword: "enum", params: { allowedValues: schema33.properties.type.enum }, message: "must be equal to one of the allowed values" };
2063
+ if (vErrors === null) {
2064
+ vErrors = [err27];
2065
+ }
2066
+ else {
2067
+ vErrors.push(err27);
2068
+ }
2069
+ errors++;
2070
+ }
2071
+ }
2072
+ }
2073
+ else {
2074
+ const err28 = { instancePath: instancePath + "/period", schemaPath: "#/$defs/timeSeriesPeriod/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2075
+ if (vErrors === null) {
2076
+ vErrors = [err28];
2077
+ }
2078
+ else {
2079
+ vErrors.push(err28);
2080
+ }
2081
+ errors++;
2082
+ }
2083
+ }
2084
+ if (data.series !== undefined) {
2085
+ let data9 = data.series;
2086
+ if (Array.isArray(data9)) {
2087
+ if (data9.length > 64) {
2088
+ const err29 = { instancePath: instancePath + "/series", schemaPath: "#/properties/series/maxItems", keyword: "maxItems", params: { limit: 64 }, message: "must NOT have more than 64 items" };
2089
+ if (vErrors === null) {
2090
+ vErrors = [err29];
2091
+ }
2092
+ else {
2093
+ vErrors.push(err29);
2094
+ }
2095
+ errors++;
2096
+ }
2097
+ if (data9.length < 1) {
2098
+ const err30 = { instancePath: instancePath + "/series", schemaPath: "#/properties/series/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2099
+ if (vErrors === null) {
2100
+ vErrors = [err30];
2101
+ }
2102
+ else {
2103
+ vErrors.push(err30);
2104
+ }
2105
+ errors++;
2106
+ }
2107
+ const len0 = data9.length;
2108
+ for (let i0 = 0; i0 < len0; i0++) {
2109
+ if (!(validate21(data9[i0], { instancePath: instancePath + "/series/" + i0, parentData: data9, parentDataProperty: i0, rootData, dynamicAnchors }))) {
2110
+ vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
2111
+ errors = vErrors.length;
2112
+ }
2113
+ }
2114
+ }
2115
+ else {
2116
+ const err31 = { instancePath: instancePath + "/series", schemaPath: "#/properties/series/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2117
+ if (vErrors === null) {
2118
+ vErrors = [err31];
2119
+ }
2120
+ else {
2121
+ vErrors.push(err31);
2122
+ }
2123
+ errors++;
2124
+ }
2125
+ }
2126
+ if (data.data !== undefined) {
2127
+ let data11 = data.data;
2128
+ if (Array.isArray(data11)) {
2129
+ if (data11.length > 1000000) {
2130
+ const err32 = { instancePath: instancePath + "/data", schemaPath: "#/properties/data/maxItems", keyword: "maxItems", params: { limit: 1000000 }, message: "must NOT have more than 1000000 items" };
2131
+ if (vErrors === null) {
2132
+ vErrors = [err32];
2133
+ }
2134
+ else {
2135
+ vErrors.push(err32);
2136
+ }
2137
+ errors++;
2138
+ }
2139
+ if (data11.length < 1) {
2140
+ const err33 = { instancePath: instancePath + "/data", schemaPath: "#/properties/data/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2141
+ if (vErrors === null) {
2142
+ vErrors = [err33];
2143
+ }
2144
+ else {
2145
+ vErrors.push(err33);
2146
+ }
2147
+ errors++;
2148
+ }
2149
+ const len1 = data11.length;
2150
+ for (let i1 = 0; i1 < len1; i1++) {
2151
+ if (!(validate26(data11[i1], { instancePath: instancePath + "/data/" + i1, parentData: data11, parentDataProperty: i1, rootData, dynamicAnchors }))) {
2152
+ vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);
2153
+ errors = vErrors.length;
2154
+ }
2155
+ }
2156
+ }
2157
+ else {
2158
+ const err34 = { instancePath: instancePath + "/data", schemaPath: "#/properties/data/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2159
+ if (vErrors === null) {
2160
+ vErrors = [err34];
2161
+ }
2162
+ else {
2163
+ vErrors.push(err34);
2164
+ }
2165
+ errors++;
2166
+ }
2167
+ }
2168
+ if (data.chart !== undefined) {
2169
+ if (!(validate28(data.chart, { instancePath: instancePath + "/chart", parentData: data, parentDataProperty: "chart", rootData, dynamicAnchors }))) {
2170
+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
2171
+ errors = vErrors.length;
2172
+ }
2173
+ }
2174
+ if (data.viewport !== undefined) {
2175
+ let data14 = data.viewport;
2176
+ if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
2177
+ if (data14.barSpace === undefined) {
2178
+ const err35 = { instancePath: instancePath + "/viewport", schemaPath: "#/$defs/timeSeriesViewport/required", keyword: "required", params: { missingProperty: "barSpace" }, message: "must have required property '" + "barSpace" + "'" };
2179
+ if (vErrors === null) {
2180
+ vErrors = [err35];
2181
+ }
2182
+ else {
2183
+ vErrors.push(err35);
2184
+ }
2185
+ errors++;
2186
+ }
2187
+ if (data14.rightOffsetDistance === undefined) {
2188
+ const err36 = { instancePath: instancePath + "/viewport", schemaPath: "#/$defs/timeSeriesViewport/required", keyword: "required", params: { missingProperty: "rightOffsetDistance" }, message: "must have required property '" + "rightOffsetDistance" + "'" };
2189
+ if (vErrors === null) {
2190
+ vErrors = [err36];
2191
+ }
2192
+ else {
2193
+ vErrors.push(err36);
2194
+ }
2195
+ errors++;
2196
+ }
2197
+ if (data14.anchorTimestamp === undefined) {
2198
+ const err37 = { instancePath: instancePath + "/viewport", schemaPath: "#/$defs/timeSeriesViewport/required", keyword: "required", params: { missingProperty: "anchorTimestamp" }, message: "must have required property '" + "anchorTimestamp" + "'" };
2199
+ if (vErrors === null) {
2200
+ vErrors = [err37];
2201
+ }
2202
+ else {
2203
+ vErrors.push(err37);
2204
+ }
2205
+ errors++;
2206
+ }
2207
+ for (const key3 in data14) {
2208
+ if (!(((key3 === "barSpace") || (key3 === "rightOffsetDistance")) || (key3 === "anchorTimestamp"))) {
2209
+ const err38 = { instancePath: instancePath + "/viewport", schemaPath: "#/$defs/timeSeriesViewport/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
2210
+ if (vErrors === null) {
2211
+ vErrors = [err38];
2212
+ }
2213
+ else {
2214
+ vErrors.push(err38);
2215
+ }
2216
+ errors++;
2217
+ }
2218
+ }
2219
+ if (data14.barSpace !== undefined) {
2220
+ let data15 = data14.barSpace;
2221
+ if ((typeof data15 == "number") && (isFinite(data15))) {
2222
+ if (data15 > 100 || isNaN(data15)) {
2223
+ const err39 = { instancePath: instancePath + "/viewport/barSpace", schemaPath: "#/$defs/timeSeriesViewport/properties/barSpace/maximum", keyword: "maximum", params: { comparison: "<=", limit: 100 }, message: "must be <= 100" };
2224
+ if (vErrors === null) {
2225
+ vErrors = [err39];
2226
+ }
2227
+ else {
2228
+ vErrors.push(err39);
2229
+ }
2230
+ errors++;
2231
+ }
2232
+ if (data15 < 1 || isNaN(data15)) {
2233
+ const err40 = { instancePath: instancePath + "/viewport/barSpace", schemaPath: "#/$defs/timeSeriesViewport/properties/barSpace/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
2234
+ if (vErrors === null) {
2235
+ vErrors = [err40];
2236
+ }
2237
+ else {
2238
+ vErrors.push(err40);
2239
+ }
2240
+ errors++;
2241
+ }
2242
+ }
2243
+ else {
2244
+ const err41 = { instancePath: instancePath + "/viewport/barSpace", schemaPath: "#/$defs/timeSeriesViewport/properties/barSpace/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2245
+ if (vErrors === null) {
2246
+ vErrors = [err41];
2247
+ }
2248
+ else {
2249
+ vErrors.push(err41);
2250
+ }
2251
+ errors++;
2252
+ }
2253
+ }
2254
+ if (data14.rightOffsetDistance !== undefined) {
2255
+ let data16 = data14.rightOffsetDistance;
2256
+ if ((typeof data16 == "number") && (isFinite(data16))) {
2257
+ if (data16 > 10000 || isNaN(data16)) {
2258
+ const err42 = { instancePath: instancePath + "/viewport/rightOffsetDistance", schemaPath: "#/$defs/timeSeriesViewport/properties/rightOffsetDistance/maximum", keyword: "maximum", params: { comparison: "<=", limit: 10000 }, message: "must be <= 10000" };
2259
+ if (vErrors === null) {
2260
+ vErrors = [err42];
2261
+ }
2262
+ else {
2263
+ vErrors.push(err42);
2264
+ }
2265
+ errors++;
2266
+ }
2267
+ if (data16 < 0 || isNaN(data16)) {
2268
+ const err43 = { instancePath: instancePath + "/viewport/rightOffsetDistance", schemaPath: "#/$defs/timeSeriesViewport/properties/rightOffsetDistance/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
2269
+ if (vErrors === null) {
2270
+ vErrors = [err43];
2271
+ }
2272
+ else {
2273
+ vErrors.push(err43);
2274
+ }
2275
+ errors++;
2276
+ }
2277
+ }
2278
+ else {
2279
+ const err44 = { instancePath: instancePath + "/viewport/rightOffsetDistance", schemaPath: "#/$defs/timeSeriesViewport/properties/rightOffsetDistance/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2280
+ if (vErrors === null) {
2281
+ vErrors = [err44];
2282
+ }
2283
+ else {
2284
+ vErrors.push(err44);
2285
+ }
2286
+ errors++;
2287
+ }
2288
+ }
2289
+ if (data14.anchorTimestamp !== undefined) {
2290
+ let data17 = data14.anchorTimestamp;
2291
+ if (!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))) {
2292
+ const err45 = { instancePath: instancePath + "/viewport/anchorTimestamp", schemaPath: "#/$defs/timeSeriesViewport/properties/anchorTimestamp/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
2293
+ if (vErrors === null) {
2294
+ vErrors = [err45];
2295
+ }
2296
+ else {
2297
+ vErrors.push(err45);
2298
+ }
2299
+ errors++;
2300
+ }
2301
+ if ((typeof data17 == "number") && (isFinite(data17))) {
2302
+ if (data17 > 9007199254740991 || isNaN(data17)) {
2303
+ const err46 = { instancePath: instancePath + "/viewport/anchorTimestamp", schemaPath: "#/$defs/timeSeriesViewport/properties/anchorTimestamp/maximum", keyword: "maximum", params: { comparison: "<=", limit: 9007199254740991 }, message: "must be <= 9007199254740991" };
2304
+ if (vErrors === null) {
2305
+ vErrors = [err46];
2306
+ }
2307
+ else {
2308
+ vErrors.push(err46);
2309
+ }
2310
+ errors++;
2311
+ }
2312
+ if (data17 < 1 || isNaN(data17)) {
2313
+ const err47 = { instancePath: instancePath + "/viewport/anchorTimestamp", schemaPath: "#/$defs/timeSeriesViewport/properties/anchorTimestamp/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
2314
+ if (vErrors === null) {
2315
+ vErrors = [err47];
2316
+ }
2317
+ else {
2318
+ vErrors.push(err47);
2319
+ }
2320
+ errors++;
2321
+ }
2322
+ }
2323
+ }
2324
+ }
2325
+ else {
2326
+ const err48 = { instancePath: instancePath + "/viewport", schemaPath: "#/$defs/timeSeriesViewport/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2327
+ if (vErrors === null) {
2328
+ vErrors = [err48];
2329
+ }
2330
+ else {
2331
+ vErrors.push(err48);
2332
+ }
2333
+ errors++;
2334
+ }
2335
+ }
2336
+ if (data.render !== undefined) {
2337
+ if (!(validate30(data.render, { instancePath: instancePath + "/render", parentData: data, parentDataProperty: "render", rootData, dynamicAnchors }))) {
2338
+ vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
2339
+ errors = vErrors.length;
2340
+ }
2341
+ }
2342
+ if (data.metadata !== undefined) {
2343
+ if (!(validate32(data.metadata, { instancePath: instancePath + "/metadata", parentData: data, parentDataProperty: "metadata", rootData, dynamicAnchors }))) {
2344
+ vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
2345
+ errors = vErrors.length;
2346
+ }
2347
+ }
2348
+ }
2349
+ else {
2350
+ const err49 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2351
+ if (vErrors === null) {
2352
+ vErrors = [err49];
2353
+ }
2354
+ else {
2355
+ vErrors.push(err49);
2356
+ }
2357
+ errors++;
2358
+ } validate20.errors = vErrors; return errors === 0; }
2359
+ validate20.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };