@rebilly/instruments 9.38.5 → 9.38.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1676
- package/dist/index.js +374 -369
- package/dist/index.min.js +12 -12
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -5690,7 +5690,7 @@ function Jt$1(e2, t2) {
|
|
|
5690
5690
|
return s;
|
|
5691
5691
|
}
|
|
5692
5692
|
var Gt$1 = P;
|
|
5693
|
-
const Yt$1 = /* @__PURE__ */ wt$1(Gt$1), Qt$1 = "
|
|
5693
|
+
const Yt$1 = /* @__PURE__ */ wt$1(Gt$1), Qt$1 = "0.0.0";
|
|
5694
5694
|
let Xt$1 = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Zt$1 = (e2 = 21) => {
|
|
5695
5695
|
let t2 = "", s = e2;
|
|
5696
5696
|
for (; s--; )
|
|
@@ -17444,7 +17444,7 @@ var scope = {};
|
|
|
17444
17444
|
(function(UsedValueState2) {
|
|
17445
17445
|
UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
|
|
17446
17446
|
UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
|
|
17447
|
-
})(UsedValueState
|
|
17447
|
+
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
17448
17448
|
exports.varKinds = {
|
|
17449
17449
|
const: new code_12.Name("const"),
|
|
17450
17450
|
let: new code_12.Name("let"),
|
|
@@ -18286,193 +18286,197 @@ var scope = {};
|
|
|
18286
18286
|
}
|
|
18287
18287
|
})(codegen);
|
|
18288
18288
|
var util = {};
|
|
18289
|
-
(
|
|
18290
|
-
|
|
18291
|
-
|
|
18292
|
-
|
|
18293
|
-
|
|
18294
|
-
|
|
18295
|
-
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
|
|
18308
|
-
|
|
18309
|
-
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
|
|
18314
|
-
|
|
18315
|
-
|
|
18316
|
-
|
|
18317
|
-
|
|
18318
|
-
|
|
18319
|
-
checkStrictMode(it2, `unknown keyword: "${key}"`);
|
|
18320
|
-
}
|
|
18321
|
-
}
|
|
18322
|
-
exports.checkUnknownRules = checkUnknownRules;
|
|
18323
|
-
function schemaHasRules(schema2, rules2) {
|
|
18324
|
-
if (typeof schema2 == "boolean")
|
|
18325
|
-
return !schema2;
|
|
18326
|
-
for (const key in schema2)
|
|
18327
|
-
if (rules2[key])
|
|
18328
|
-
return true;
|
|
18329
|
-
return false;
|
|
18330
|
-
}
|
|
18331
|
-
exports.schemaHasRules = schemaHasRules;
|
|
18332
|
-
function schemaHasRulesButRef(schema2, RULES) {
|
|
18333
|
-
if (typeof schema2 == "boolean")
|
|
18334
|
-
return !schema2;
|
|
18335
|
-
for (const key in schema2)
|
|
18336
|
-
if (key !== "$ref" && RULES.all[key])
|
|
18337
|
-
return true;
|
|
18338
|
-
return false;
|
|
18289
|
+
Object.defineProperty(util, "__esModule", { value: true });
|
|
18290
|
+
util.checkStrictMode = util.getErrorPath = util.Type = util.useFunc = util.setEvaluated = util.evaluatedPropsToName = util.mergeEvaluated = util.eachItem = util.unescapeJsonPointer = util.escapeJsonPointer = util.escapeFragment = util.unescapeFragment = util.schemaRefOrVal = util.schemaHasRulesButRef = util.schemaHasRules = util.checkUnknownRules = util.alwaysValidSchema = util.toHash = void 0;
|
|
18291
|
+
const codegen_1$z = codegen;
|
|
18292
|
+
const code_1$a = code$1;
|
|
18293
|
+
function toHash(arr) {
|
|
18294
|
+
const hash = {};
|
|
18295
|
+
for (const item of arr)
|
|
18296
|
+
hash[item] = true;
|
|
18297
|
+
return hash;
|
|
18298
|
+
}
|
|
18299
|
+
util.toHash = toHash;
|
|
18300
|
+
function alwaysValidSchema(it2, schema2) {
|
|
18301
|
+
if (typeof schema2 == "boolean")
|
|
18302
|
+
return schema2;
|
|
18303
|
+
if (Object.keys(schema2).length === 0)
|
|
18304
|
+
return true;
|
|
18305
|
+
checkUnknownRules(it2, schema2);
|
|
18306
|
+
return !schemaHasRules(schema2, it2.self.RULES.all);
|
|
18307
|
+
}
|
|
18308
|
+
util.alwaysValidSchema = alwaysValidSchema;
|
|
18309
|
+
function checkUnknownRules(it2, schema2 = it2.schema) {
|
|
18310
|
+
const { opts, self: self2 } = it2;
|
|
18311
|
+
if (!opts.strictSchema)
|
|
18312
|
+
return;
|
|
18313
|
+
if (typeof schema2 === "boolean")
|
|
18314
|
+
return;
|
|
18315
|
+
const rules2 = self2.RULES.keywords;
|
|
18316
|
+
for (const key in schema2) {
|
|
18317
|
+
if (!rules2[key])
|
|
18318
|
+
checkStrictMode(it2, `unknown keyword: "${key}"`);
|
|
18339
18319
|
}
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
|
|
18350
|
-
|
|
18351
|
-
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
18367
|
-
}
|
|
18368
|
-
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
18369
|
-
function eachItem(xs2, f) {
|
|
18370
|
-
if (Array.isArray(xs2)) {
|
|
18371
|
-
for (const x2 of xs2)
|
|
18372
|
-
f(x2);
|
|
18373
|
-
} else {
|
|
18374
|
-
f(xs2);
|
|
18375
|
-
}
|
|
18320
|
+
}
|
|
18321
|
+
util.checkUnknownRules = checkUnknownRules;
|
|
18322
|
+
function schemaHasRules(schema2, rules2) {
|
|
18323
|
+
if (typeof schema2 == "boolean")
|
|
18324
|
+
return !schema2;
|
|
18325
|
+
for (const key in schema2)
|
|
18326
|
+
if (rules2[key])
|
|
18327
|
+
return true;
|
|
18328
|
+
return false;
|
|
18329
|
+
}
|
|
18330
|
+
util.schemaHasRules = schemaHasRules;
|
|
18331
|
+
function schemaHasRulesButRef(schema2, RULES) {
|
|
18332
|
+
if (typeof schema2 == "boolean")
|
|
18333
|
+
return !schema2;
|
|
18334
|
+
for (const key in schema2)
|
|
18335
|
+
if (key !== "$ref" && RULES.all[key])
|
|
18336
|
+
return true;
|
|
18337
|
+
return false;
|
|
18338
|
+
}
|
|
18339
|
+
util.schemaHasRulesButRef = schemaHasRulesButRef;
|
|
18340
|
+
function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword2, $data) {
|
|
18341
|
+
if (!$data) {
|
|
18342
|
+
if (typeof schema2 == "number" || typeof schema2 == "boolean")
|
|
18343
|
+
return schema2;
|
|
18344
|
+
if (typeof schema2 == "string")
|
|
18345
|
+
return (0, codegen_1$z._)`${schema2}`;
|
|
18376
18346
|
}
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18380
|
-
|
|
18381
|
-
|
|
18382
|
-
|
|
18347
|
+
return (0, codegen_1$z._)`${topSchemaRef}${schemaPath}${(0, codegen_1$z.getProperty)(keyword2)}`;
|
|
18348
|
+
}
|
|
18349
|
+
util.schemaRefOrVal = schemaRefOrVal;
|
|
18350
|
+
function unescapeFragment(str) {
|
|
18351
|
+
return unescapeJsonPointer(decodeURIComponent(str));
|
|
18352
|
+
}
|
|
18353
|
+
util.unescapeFragment = unescapeFragment;
|
|
18354
|
+
function escapeFragment(str) {
|
|
18355
|
+
return encodeURIComponent(escapeJsonPointer(str));
|
|
18356
|
+
}
|
|
18357
|
+
util.escapeFragment = escapeFragment;
|
|
18358
|
+
function escapeJsonPointer(str) {
|
|
18359
|
+
if (typeof str == "number")
|
|
18360
|
+
return `${str}`;
|
|
18361
|
+
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
18362
|
+
}
|
|
18363
|
+
util.escapeJsonPointer = escapeJsonPointer;
|
|
18364
|
+
function unescapeJsonPointer(str) {
|
|
18365
|
+
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
18366
|
+
}
|
|
18367
|
+
util.unescapeJsonPointer = unescapeJsonPointer;
|
|
18368
|
+
function eachItem(xs2, f) {
|
|
18369
|
+
if (Array.isArray(xs2)) {
|
|
18370
|
+
for (const x2 of xs2)
|
|
18371
|
+
f(x2);
|
|
18372
|
+
} else {
|
|
18373
|
+
f(xs2);
|
|
18383
18374
|
}
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
if (from === true) {
|
|
18391
|
-
gen.assign(to, true);
|
|
18392
|
-
} else {
|
|
18393
|
-
gen.assign(to, (0, codegen_12._)`${to} || {}`);
|
|
18394
|
-
setEvaluated(gen, to, from);
|
|
18395
|
-
}
|
|
18396
|
-
}),
|
|
18397
|
-
mergeValues: (from, to) => from === true ? true : { ...from, ...to },
|
|
18398
|
-
resultToName: evaluatedPropsToName
|
|
18399
|
-
}),
|
|
18400
|
-
items: makeMergeEvaluated({
|
|
18401
|
-
mergeNames: (gen, from, to) => gen.if((0, codegen_12._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_12._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
|
|
18402
|
-
mergeToName: (gen, from, to) => gen.if((0, codegen_12._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_12._)`${to} > ${from} ? ${to} : ${from}`)),
|
|
18403
|
-
mergeValues: (from, to) => from === true ? true : Math.max(from, to),
|
|
18404
|
-
resultToName: (gen, items2) => gen.var("items", items2)
|
|
18405
|
-
})
|
|
18375
|
+
}
|
|
18376
|
+
util.eachItem = eachItem;
|
|
18377
|
+
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {
|
|
18378
|
+
return (gen, from, to, toName) => {
|
|
18379
|
+
const res = to === void 0 ? from : to instanceof codegen_1$z.Name ? (from instanceof codegen_1$z.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1$z.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);
|
|
18380
|
+
return toName === codegen_1$z.Name && !(res instanceof codegen_1$z.Name) ? resultToName(gen, res) : res;
|
|
18406
18381
|
};
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
})
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
|
|
18448
|
-
|
|
18449
|
-
|
|
18450
|
-
}
|
|
18382
|
+
}
|
|
18383
|
+
util.mergeEvaluated = {
|
|
18384
|
+
props: makeMergeEvaluated({
|
|
18385
|
+
mergeNames: (gen, from, to) => gen.if((0, codegen_1$z._)`${to} !== true && ${from} !== undefined`, () => {
|
|
18386
|
+
gen.if((0, codegen_1$z._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1$z._)`${to} || {}`).code((0, codegen_1$z._)`Object.assign(${to}, ${from})`));
|
|
18387
|
+
}),
|
|
18388
|
+
mergeToName: (gen, from, to) => gen.if((0, codegen_1$z._)`${to} !== true`, () => {
|
|
18389
|
+
if (from === true) {
|
|
18390
|
+
gen.assign(to, true);
|
|
18391
|
+
} else {
|
|
18392
|
+
gen.assign(to, (0, codegen_1$z._)`${to} || {}`);
|
|
18393
|
+
setEvaluated(gen, to, from);
|
|
18394
|
+
}
|
|
18395
|
+
}),
|
|
18396
|
+
mergeValues: (from, to) => from === true ? true : { ...from, ...to },
|
|
18397
|
+
resultToName: evaluatedPropsToName
|
|
18398
|
+
}),
|
|
18399
|
+
items: makeMergeEvaluated({
|
|
18400
|
+
mergeNames: (gen, from, to) => gen.if((0, codegen_1$z._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1$z._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
|
|
18401
|
+
mergeToName: (gen, from, to) => gen.if((0, codegen_1$z._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1$z._)`${to} > ${from} ? ${to} : ${from}`)),
|
|
18402
|
+
mergeValues: (from, to) => from === true ? true : Math.max(from, to),
|
|
18403
|
+
resultToName: (gen, items2) => gen.var("items", items2)
|
|
18404
|
+
})
|
|
18405
|
+
};
|
|
18406
|
+
function evaluatedPropsToName(gen, ps2) {
|
|
18407
|
+
if (ps2 === true)
|
|
18408
|
+
return gen.var("props", true);
|
|
18409
|
+
const props = gen.var("props", (0, codegen_1$z._)`{}`);
|
|
18410
|
+
if (ps2 !== void 0)
|
|
18411
|
+
setEvaluated(gen, props, ps2);
|
|
18412
|
+
return props;
|
|
18413
|
+
}
|
|
18414
|
+
util.evaluatedPropsToName = evaluatedPropsToName;
|
|
18415
|
+
function setEvaluated(gen, props, ps2) {
|
|
18416
|
+
Object.keys(ps2).forEach((p2) => gen.assign((0, codegen_1$z._)`${props}${(0, codegen_1$z.getProperty)(p2)}`, true));
|
|
18417
|
+
}
|
|
18418
|
+
util.setEvaluated = setEvaluated;
|
|
18419
|
+
const snippets = {};
|
|
18420
|
+
function useFunc(gen, f) {
|
|
18421
|
+
return gen.scopeValue("func", {
|
|
18422
|
+
ref: f,
|
|
18423
|
+
code: snippets[f.code] || (snippets[f.code] = new code_1$a._Code(f.code))
|
|
18424
|
+
});
|
|
18425
|
+
}
|
|
18426
|
+
util.useFunc = useFunc;
|
|
18427
|
+
var Type;
|
|
18428
|
+
(function(Type2) {
|
|
18429
|
+
Type2[Type2["Num"] = 0] = "Num";
|
|
18430
|
+
Type2[Type2["Str"] = 1] = "Str";
|
|
18431
|
+
})(Type || (util.Type = Type = {}));
|
|
18432
|
+
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
18433
|
+
if (dataProp instanceof codegen_1$z.Name) {
|
|
18434
|
+
const isNumber2 = dataPropType === Type.Num;
|
|
18435
|
+
return jsPropertySyntax ? isNumber2 ? (0, codegen_1$z._)`"[" + ${dataProp} + "]"` : (0, codegen_1$z._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1$z._)`"/" + ${dataProp}` : (0, codegen_1$z._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
|
|
18436
|
+
}
|
|
18437
|
+
return jsPropertySyntax ? (0, codegen_1$z.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
|
|
18438
|
+
}
|
|
18439
|
+
util.getErrorPath = getErrorPath;
|
|
18440
|
+
function checkStrictMode(it2, msg, mode = it2.opts.strictSchema) {
|
|
18441
|
+
if (!mode)
|
|
18442
|
+
return;
|
|
18443
|
+
msg = `strict mode: ${msg}`;
|
|
18444
|
+
if (mode === true)
|
|
18445
|
+
throw new Error(msg);
|
|
18446
|
+
it2.self.logger.warn(msg);
|
|
18447
|
+
}
|
|
18448
|
+
util.checkStrictMode = checkStrictMode;
|
|
18451
18449
|
var names$1 = {};
|
|
18452
18450
|
Object.defineProperty(names$1, "__esModule", { value: true });
|
|
18453
|
-
const codegen_1$
|
|
18451
|
+
const codegen_1$y = codegen;
|
|
18454
18452
|
const names = {
|
|
18455
18453
|
// validation function arguments
|
|
18456
|
-
data: new codegen_1$
|
|
18454
|
+
data: new codegen_1$y.Name("data"),
|
|
18455
|
+
// data passed to validation function
|
|
18457
18456
|
// args passed from referencing schema
|
|
18458
|
-
valCxt: new codegen_1$
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
|
|
18457
|
+
valCxt: new codegen_1$y.Name("valCxt"),
|
|
18458
|
+
// validation/data context - should not be used directly, it is destructured to the names below
|
|
18459
|
+
instancePath: new codegen_1$y.Name("instancePath"),
|
|
18460
|
+
parentData: new codegen_1$y.Name("parentData"),
|
|
18461
|
+
parentDataProperty: new codegen_1$y.Name("parentDataProperty"),
|
|
18462
|
+
rootData: new codegen_1$y.Name("rootData"),
|
|
18463
|
+
// root data - same as the data passed to the first/top validation function
|
|
18464
|
+
dynamicAnchors: new codegen_1$y.Name("dynamicAnchors"),
|
|
18465
|
+
// used to support recursiveRef and dynamicRef
|
|
18464
18466
|
// function scoped variables
|
|
18465
|
-
vErrors: new codegen_1$
|
|
18466
|
-
|
|
18467
|
-
|
|
18467
|
+
vErrors: new codegen_1$y.Name("vErrors"),
|
|
18468
|
+
// null or array of validation errors
|
|
18469
|
+
errors: new codegen_1$y.Name("errors"),
|
|
18470
|
+
// counter of validation errors
|
|
18471
|
+
this: new codegen_1$y.Name("this"),
|
|
18468
18472
|
// "globals"
|
|
18469
|
-
self: new codegen_1$
|
|
18470
|
-
scope: new codegen_1$
|
|
18473
|
+
self: new codegen_1$y.Name("self"),
|
|
18474
|
+
scope: new codegen_1$y.Name("scope"),
|
|
18471
18475
|
// JTD serialize/parse name for JSON string and position
|
|
18472
|
-
json: new codegen_1$
|
|
18473
|
-
jsonPos: new codegen_1$
|
|
18474
|
-
jsonLen: new codegen_1$
|
|
18475
|
-
jsonPart: new codegen_1$
|
|
18476
|
+
json: new codegen_1$y.Name("json"),
|
|
18477
|
+
jsonPos: new codegen_1$y.Name("jsonPos"),
|
|
18478
|
+
jsonLen: new codegen_1$y.Name("jsonLen"),
|
|
18479
|
+
jsonPart: new codegen_1$y.Name("jsonPart")
|
|
18476
18480
|
};
|
|
18477
18481
|
names$1.default = names;
|
|
18478
18482
|
(function(exports) {
|
|
@@ -18545,6 +18549,7 @@ names$1.default = names;
|
|
|
18545
18549
|
const E2 = {
|
|
18546
18550
|
keyword: new codegen_12.Name("keyword"),
|
|
18547
18551
|
schemaPath: new codegen_12.Name("schemaPath"),
|
|
18552
|
+
// also used in JTD errors
|
|
18548
18553
|
params: new codegen_12.Name("params"),
|
|
18549
18554
|
propertyName: new codegen_12.Name("propertyName"),
|
|
18550
18555
|
message: new codegen_12.Name("message"),
|
|
@@ -18593,8 +18598,8 @@ names$1.default = names;
|
|
|
18593
18598
|
})(errors);
|
|
18594
18599
|
Object.defineProperty(boolSchema, "__esModule", { value: true });
|
|
18595
18600
|
boolSchema.boolOrEmptySchema = boolSchema.topBoolOrEmptySchema = void 0;
|
|
18596
|
-
const errors_1$
|
|
18597
|
-
const codegen_1$
|
|
18601
|
+
const errors_1$3 = errors;
|
|
18602
|
+
const codegen_1$x = codegen;
|
|
18598
18603
|
const names_1$9 = names$1;
|
|
18599
18604
|
const boolError = {
|
|
18600
18605
|
message: "boolean schema is false"
|
|
@@ -18606,7 +18611,7 @@ function topBoolOrEmptySchema(it2) {
|
|
|
18606
18611
|
} else if (typeof schema2 == "object" && schema2.$async === true) {
|
|
18607
18612
|
gen.return(names_1$9.default.data);
|
|
18608
18613
|
} else {
|
|
18609
|
-
gen.assign((0, codegen_1$
|
|
18614
|
+
gen.assign((0, codegen_1$x._)`${validateName}.errors`, null);
|
|
18610
18615
|
gen.return(true);
|
|
18611
18616
|
}
|
|
18612
18617
|
}
|
|
@@ -18633,7 +18638,7 @@ function falseSchemaError(it2, overrideAllErrors) {
|
|
|
18633
18638
|
params: {},
|
|
18634
18639
|
it: it2
|
|
18635
18640
|
};
|
|
18636
|
-
(0, errors_1$
|
|
18641
|
+
(0, errors_1$3.reportError)(cxt, boolError, void 0, overrideAllErrors);
|
|
18637
18642
|
}
|
|
18638
18643
|
var dataType = {};
|
|
18639
18644
|
var rules = {};
|
|
@@ -18678,185 +18683,183 @@ function shouldUseRule(schema2, rule) {
|
|
|
18678
18683
|
return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0));
|
|
18679
18684
|
}
|
|
18680
18685
|
applicability.shouldUseRule = shouldUseRule;
|
|
18681
|
-
(
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
if (
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
throw new Error('"nullable" cannot be used without "type"');
|
|
18703
|
-
}
|
|
18704
|
-
if (schema2.nullable === true)
|
|
18705
|
-
types2.push("null");
|
|
18686
|
+
Object.defineProperty(dataType, "__esModule", { value: true });
|
|
18687
|
+
dataType.reportTypeError = dataType.checkDataTypes = dataType.checkDataType = dataType.coerceAndCheckDataType = dataType.getJSONTypes = dataType.getSchemaTypes = dataType.DataType = void 0;
|
|
18688
|
+
const rules_1 = rules;
|
|
18689
|
+
const applicability_1$1 = applicability;
|
|
18690
|
+
const errors_1$2 = errors;
|
|
18691
|
+
const codegen_1$w = codegen;
|
|
18692
|
+
const util_1$u = util;
|
|
18693
|
+
var DataType;
|
|
18694
|
+
(function(DataType2) {
|
|
18695
|
+
DataType2[DataType2["Correct"] = 0] = "Correct";
|
|
18696
|
+
DataType2[DataType2["Wrong"] = 1] = "Wrong";
|
|
18697
|
+
})(DataType || (dataType.DataType = DataType = {}));
|
|
18698
|
+
function getSchemaTypes(schema2) {
|
|
18699
|
+
const types2 = getJSONTypes(schema2.type);
|
|
18700
|
+
const hasNull = types2.includes("null");
|
|
18701
|
+
if (hasNull) {
|
|
18702
|
+
if (schema2.nullable === false)
|
|
18703
|
+
throw new Error("type: null contradicts nullable: false");
|
|
18704
|
+
} else {
|
|
18705
|
+
if (!types2.length && schema2.nullable !== void 0) {
|
|
18706
|
+
throw new Error('"nullable" cannot be used without "type"');
|
|
18706
18707
|
}
|
|
18707
|
-
|
|
18708
|
+
if (schema2.nullable === true)
|
|
18709
|
+
types2.push("null");
|
|
18708
18710
|
}
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18720
|
-
|
|
18721
|
-
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
|
|
18730
|
-
|
|
18711
|
+
return types2;
|
|
18712
|
+
}
|
|
18713
|
+
dataType.getSchemaTypes = getSchemaTypes;
|
|
18714
|
+
function getJSONTypes(ts2) {
|
|
18715
|
+
const types2 = Array.isArray(ts2) ? ts2 : ts2 ? [ts2] : [];
|
|
18716
|
+
if (types2.every(rules_1.isJSONType))
|
|
18717
|
+
return types2;
|
|
18718
|
+
throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
|
|
18719
|
+
}
|
|
18720
|
+
dataType.getJSONTypes = getJSONTypes;
|
|
18721
|
+
function coerceAndCheckDataType(it2, types2) {
|
|
18722
|
+
const { gen, data, opts } = it2;
|
|
18723
|
+
const coerceTo = coerceToTypes(types2, opts.coerceTypes);
|
|
18724
|
+
const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1$1.schemaHasRulesForType)(it2, types2[0]));
|
|
18725
|
+
if (checkTypes) {
|
|
18726
|
+
const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong);
|
|
18727
|
+
gen.if(wrongType, () => {
|
|
18728
|
+
if (coerceTo.length)
|
|
18729
|
+
coerceData(it2, types2, coerceTo);
|
|
18730
|
+
else
|
|
18731
|
+
reportTypeError(it2);
|
|
18732
|
+
});
|
|
18731
18733
|
}
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
|
|
18735
|
-
|
|
18734
|
+
return checkTypes;
|
|
18735
|
+
}
|
|
18736
|
+
dataType.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
18737
|
+
const COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
18738
|
+
function coerceToTypes(types2, coerceTypes) {
|
|
18739
|
+
return coerceTypes ? types2.filter((t2) => COERCIBLE.has(t2) || coerceTypes === "array" && t2 === "array") : [];
|
|
18740
|
+
}
|
|
18741
|
+
function coerceData(it2, types2, coerceTo) {
|
|
18742
|
+
const { gen, data, opts } = it2;
|
|
18743
|
+
const dataType2 = gen.let("dataType", (0, codegen_1$w._)`typeof ${data}`);
|
|
18744
|
+
const coerced = gen.let("coerced", (0, codegen_1$w._)`undefined`);
|
|
18745
|
+
if (opts.coerceTypes === "array") {
|
|
18746
|
+
gen.if((0, codegen_1$w._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1$w._)`${data}[0]`).assign(dataType2, (0, codegen_1$w._)`typeof ${data}`).if(checkDataTypes(types2, data, opts.strictNumbers), () => gen.assign(coerced, data)));
|
|
18736
18747
|
}
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
if (opts.coerceTypes === "array") {
|
|
18742
|
-
gen.if((0, codegen_12._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_12._)`${data}[0]`).assign(dataType2, (0, codegen_12._)`typeof ${data}`).if(checkDataTypes(types2, data, opts.strictNumbers), () => gen.assign(coerced, data)));
|
|
18748
|
+
gen.if((0, codegen_1$w._)`${coerced} !== undefined`);
|
|
18749
|
+
for (const t2 of coerceTo) {
|
|
18750
|
+
if (COERCIBLE.has(t2) || t2 === "array" && opts.coerceTypes === "array") {
|
|
18751
|
+
coerceSpecificType(t2);
|
|
18743
18752
|
}
|
|
18744
|
-
gen.if((0, codegen_12._)`${coerced} !== undefined`);
|
|
18745
|
-
for (const t2 of coerceTo) {
|
|
18746
|
-
if (COERCIBLE.has(t2) || t2 === "array" && opts.coerceTypes === "array") {
|
|
18747
|
-
coerceSpecificType(t2);
|
|
18748
|
-
}
|
|
18749
|
-
}
|
|
18750
|
-
gen.else();
|
|
18751
|
-
reportTypeError(it2);
|
|
18752
|
-
gen.endIf();
|
|
18753
|
-
gen.if((0, codegen_12._)`${coerced} !== undefined`, () => {
|
|
18754
|
-
gen.assign(data, coerced);
|
|
18755
|
-
assignParentData(it2, coerced);
|
|
18756
|
-
});
|
|
18757
|
-
function coerceSpecificType(t2) {
|
|
18758
|
-
switch (t2) {
|
|
18759
|
-
case "string":
|
|
18760
|
-
gen.elseIf((0, codegen_12._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced, (0, codegen_12._)`"" + ${data}`).elseIf((0, codegen_12._)`${data} === null`).assign(coerced, (0, codegen_12._)`""`);
|
|
18761
|
-
return;
|
|
18762
|
-
case "number":
|
|
18763
|
-
gen.elseIf((0, codegen_12._)`${dataType2} == "boolean" || ${data} === null
|
|
18764
|
-
|| (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_12._)`+${data}`);
|
|
18765
|
-
return;
|
|
18766
|
-
case "integer":
|
|
18767
|
-
gen.elseIf((0, codegen_12._)`${dataType2} === "boolean" || ${data} === null
|
|
18768
|
-
|| (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_12._)`+${data}`);
|
|
18769
|
-
return;
|
|
18770
|
-
case "boolean":
|
|
18771
|
-
gen.elseIf((0, codegen_12._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_12._)`${data} === "true" || ${data} === 1`).assign(coerced, true);
|
|
18772
|
-
return;
|
|
18773
|
-
case "null":
|
|
18774
|
-
gen.elseIf((0, codegen_12._)`${data} === "" || ${data} === 0 || ${data} === false`);
|
|
18775
|
-
gen.assign(coerced, null);
|
|
18776
|
-
return;
|
|
18777
|
-
case "array":
|
|
18778
|
-
gen.elseIf((0, codegen_12._)`${dataType2} === "string" || ${dataType2} === "number"
|
|
18779
|
-
|| ${dataType2} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_12._)`[${data}]`);
|
|
18780
|
-
}
|
|
18781
|
-
}
|
|
18782
|
-
}
|
|
18783
|
-
function assignParentData({ gen, parentData, parentDataProperty }, expr) {
|
|
18784
|
-
gen.if((0, codegen_12._)`${parentData} !== undefined`, () => gen.assign((0, codegen_12._)`${parentData}[${parentDataProperty}]`, expr));
|
|
18785
18753
|
}
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18754
|
+
gen.else();
|
|
18755
|
+
reportTypeError(it2);
|
|
18756
|
+
gen.endIf();
|
|
18757
|
+
gen.if((0, codegen_1$w._)`${coerced} !== undefined`, () => {
|
|
18758
|
+
gen.assign(data, coerced);
|
|
18759
|
+
assignParentData(it2, coerced);
|
|
18760
|
+
});
|
|
18761
|
+
function coerceSpecificType(t2) {
|
|
18762
|
+
switch (t2) {
|
|
18763
|
+
case "string":
|
|
18764
|
+
gen.elseIf((0, codegen_1$w._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced, (0, codegen_1$w._)`"" + ${data}`).elseIf((0, codegen_1$w._)`${data} === null`).assign(coerced, (0, codegen_1$w._)`""`);
|
|
18765
|
+
return;
|
|
18766
|
+
case "number":
|
|
18767
|
+
gen.elseIf((0, codegen_1$w._)`${dataType2} == "boolean" || ${data} === null
|
|
18768
|
+
|| (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1$w._)`+${data}`);
|
|
18769
|
+
return;
|
|
18770
|
+
case "integer":
|
|
18771
|
+
gen.elseIf((0, codegen_1$w._)`${dataType2} === "boolean" || ${data} === null
|
|
18772
|
+
|| (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1$w._)`+${data}`);
|
|
18773
|
+
return;
|
|
18774
|
+
case "boolean":
|
|
18775
|
+
gen.elseIf((0, codegen_1$w._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1$w._)`${data} === "true" || ${data} === 1`).assign(coerced, true);
|
|
18776
|
+
return;
|
|
18790
18777
|
case "null":
|
|
18791
|
-
|
|
18778
|
+
gen.elseIf((0, codegen_1$w._)`${data} === "" || ${data} === 0 || ${data} === false`);
|
|
18779
|
+
gen.assign(coerced, null);
|
|
18780
|
+
return;
|
|
18792
18781
|
case "array":
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
cond = (0, codegen_12._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
|
|
18797
|
-
break;
|
|
18798
|
-
case "integer":
|
|
18799
|
-
cond = numCond((0, codegen_12._)`!(${data} % 1) && !isNaN(${data})`);
|
|
18800
|
-
break;
|
|
18801
|
-
case "number":
|
|
18802
|
-
cond = numCond();
|
|
18803
|
-
break;
|
|
18804
|
-
default:
|
|
18805
|
-
return (0, codegen_12._)`typeof ${data} ${EQ} ${dataType2}`;
|
|
18806
|
-
}
|
|
18807
|
-
return correct === DataType.Correct ? cond : (0, codegen_12.not)(cond);
|
|
18808
|
-
function numCond(_cond = codegen_12.nil) {
|
|
18809
|
-
return (0, codegen_12.and)((0, codegen_12._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_12._)`isFinite(${data})` : codegen_12.nil);
|
|
18810
|
-
}
|
|
18811
|
-
}
|
|
18812
|
-
exports.checkDataType = checkDataType;
|
|
18813
|
-
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
18814
|
-
if (dataTypes.length === 1) {
|
|
18815
|
-
return checkDataType(dataTypes[0], data, strictNums, correct);
|
|
18816
|
-
}
|
|
18817
|
-
let cond;
|
|
18818
|
-
const types2 = (0, util_12.toHash)(dataTypes);
|
|
18819
|
-
if (types2.array && types2.object) {
|
|
18820
|
-
const notObj = (0, codegen_12._)`typeof ${data} != "object"`;
|
|
18821
|
-
cond = types2.null ? notObj : (0, codegen_12._)`!${data} || ${notObj}`;
|
|
18822
|
-
delete types2.null;
|
|
18823
|
-
delete types2.array;
|
|
18824
|
-
delete types2.object;
|
|
18825
|
-
} else {
|
|
18826
|
-
cond = codegen_12.nil;
|
|
18827
|
-
}
|
|
18828
|
-
if (types2.number)
|
|
18829
|
-
delete types2.integer;
|
|
18830
|
-
for (const t2 in types2)
|
|
18831
|
-
cond = (0, codegen_12.and)(cond, checkDataType(t2, data, strictNums, correct));
|
|
18832
|
-
return cond;
|
|
18833
|
-
}
|
|
18834
|
-
exports.checkDataTypes = checkDataTypes;
|
|
18835
|
-
const typeError = {
|
|
18836
|
-
message: ({ schema: schema2 }) => `must be ${schema2}`,
|
|
18837
|
-
params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_12._)`{type: ${schema2}}` : (0, codegen_12._)`{type: ${schemaValue}}`
|
|
18838
|
-
};
|
|
18839
|
-
function reportTypeError(it2) {
|
|
18840
|
-
const cxt = getTypeErrorContext(it2);
|
|
18841
|
-
(0, errors_12.reportError)(cxt, typeError);
|
|
18842
|
-
}
|
|
18843
|
-
exports.reportTypeError = reportTypeError;
|
|
18844
|
-
function getTypeErrorContext(it2) {
|
|
18845
|
-
const { gen, data, schema: schema2 } = it2;
|
|
18846
|
-
const schemaCode = (0, util_12.schemaRefOrVal)(it2, schema2, "type");
|
|
18847
|
-
return {
|
|
18848
|
-
gen,
|
|
18849
|
-
keyword: "type",
|
|
18850
|
-
data,
|
|
18851
|
-
schema: schema2.type,
|
|
18852
|
-
schemaCode,
|
|
18853
|
-
schemaValue: schemaCode,
|
|
18854
|
-
parentSchema: schema2,
|
|
18855
|
-
params: {},
|
|
18856
|
-
it: it2
|
|
18857
|
-
};
|
|
18782
|
+
gen.elseIf((0, codegen_1$w._)`${dataType2} === "string" || ${dataType2} === "number"
|
|
18783
|
+
|| ${dataType2} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1$w._)`[${data}]`);
|
|
18784
|
+
}
|
|
18858
18785
|
}
|
|
18859
|
-
}
|
|
18786
|
+
}
|
|
18787
|
+
function assignParentData({ gen, parentData, parentDataProperty }, expr) {
|
|
18788
|
+
gen.if((0, codegen_1$w._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1$w._)`${parentData}[${parentDataProperty}]`, expr));
|
|
18789
|
+
}
|
|
18790
|
+
function checkDataType(dataType2, data, strictNums, correct = DataType.Correct) {
|
|
18791
|
+
const EQ = correct === DataType.Correct ? codegen_1$w.operators.EQ : codegen_1$w.operators.NEQ;
|
|
18792
|
+
let cond;
|
|
18793
|
+
switch (dataType2) {
|
|
18794
|
+
case "null":
|
|
18795
|
+
return (0, codegen_1$w._)`${data} ${EQ} null`;
|
|
18796
|
+
case "array":
|
|
18797
|
+
cond = (0, codegen_1$w._)`Array.isArray(${data})`;
|
|
18798
|
+
break;
|
|
18799
|
+
case "object":
|
|
18800
|
+
cond = (0, codegen_1$w._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
|
|
18801
|
+
break;
|
|
18802
|
+
case "integer":
|
|
18803
|
+
cond = numCond((0, codegen_1$w._)`!(${data} % 1) && !isNaN(${data})`);
|
|
18804
|
+
break;
|
|
18805
|
+
case "number":
|
|
18806
|
+
cond = numCond();
|
|
18807
|
+
break;
|
|
18808
|
+
default:
|
|
18809
|
+
return (0, codegen_1$w._)`typeof ${data} ${EQ} ${dataType2}`;
|
|
18810
|
+
}
|
|
18811
|
+
return correct === DataType.Correct ? cond : (0, codegen_1$w.not)(cond);
|
|
18812
|
+
function numCond(_cond = codegen_1$w.nil) {
|
|
18813
|
+
return (0, codegen_1$w.and)((0, codegen_1$w._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1$w._)`isFinite(${data})` : codegen_1$w.nil);
|
|
18814
|
+
}
|
|
18815
|
+
}
|
|
18816
|
+
dataType.checkDataType = checkDataType;
|
|
18817
|
+
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
18818
|
+
if (dataTypes.length === 1) {
|
|
18819
|
+
return checkDataType(dataTypes[0], data, strictNums, correct);
|
|
18820
|
+
}
|
|
18821
|
+
let cond;
|
|
18822
|
+
const types2 = (0, util_1$u.toHash)(dataTypes);
|
|
18823
|
+
if (types2.array && types2.object) {
|
|
18824
|
+
const notObj = (0, codegen_1$w._)`typeof ${data} != "object"`;
|
|
18825
|
+
cond = types2.null ? notObj : (0, codegen_1$w._)`!${data} || ${notObj}`;
|
|
18826
|
+
delete types2.null;
|
|
18827
|
+
delete types2.array;
|
|
18828
|
+
delete types2.object;
|
|
18829
|
+
} else {
|
|
18830
|
+
cond = codegen_1$w.nil;
|
|
18831
|
+
}
|
|
18832
|
+
if (types2.number)
|
|
18833
|
+
delete types2.integer;
|
|
18834
|
+
for (const t2 in types2)
|
|
18835
|
+
cond = (0, codegen_1$w.and)(cond, checkDataType(t2, data, strictNums, correct));
|
|
18836
|
+
return cond;
|
|
18837
|
+
}
|
|
18838
|
+
dataType.checkDataTypes = checkDataTypes;
|
|
18839
|
+
const typeError = {
|
|
18840
|
+
message: ({ schema: schema2 }) => `must be ${schema2}`,
|
|
18841
|
+
params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1$w._)`{type: ${schema2}}` : (0, codegen_1$w._)`{type: ${schemaValue}}`
|
|
18842
|
+
};
|
|
18843
|
+
function reportTypeError(it2) {
|
|
18844
|
+
const cxt = getTypeErrorContext(it2);
|
|
18845
|
+
(0, errors_1$2.reportError)(cxt, typeError);
|
|
18846
|
+
}
|
|
18847
|
+
dataType.reportTypeError = reportTypeError;
|
|
18848
|
+
function getTypeErrorContext(it2) {
|
|
18849
|
+
const { gen, data, schema: schema2 } = it2;
|
|
18850
|
+
const schemaCode = (0, util_1$u.schemaRefOrVal)(it2, schema2, "type");
|
|
18851
|
+
return {
|
|
18852
|
+
gen,
|
|
18853
|
+
keyword: "type",
|
|
18854
|
+
data,
|
|
18855
|
+
schema: schema2.type,
|
|
18856
|
+
schemaCode,
|
|
18857
|
+
schemaValue: schemaCode,
|
|
18858
|
+
parentSchema: schema2,
|
|
18859
|
+
params: {},
|
|
18860
|
+
it: it2
|
|
18861
|
+
};
|
|
18862
|
+
}
|
|
18860
18863
|
var defaults = {};
|
|
18861
18864
|
Object.defineProperty(defaults, "__esModule", { value: true });
|
|
18862
18865
|
defaults.assignDefaults = void 0;
|
|
@@ -19430,15 +19433,15 @@ function getSchemaRefs(schema2, baseId) {
|
|
|
19430
19433
|
if (parentJsonPtr === void 0)
|
|
19431
19434
|
return;
|
|
19432
19435
|
const fullPath = pathPrefix + jsonPtr;
|
|
19433
|
-
let
|
|
19436
|
+
let innerBaseId = baseIds[parentJsonPtr];
|
|
19434
19437
|
if (typeof sch[schemaId] == "string")
|
|
19435
|
-
|
|
19438
|
+
innerBaseId = addRef.call(this, sch[schemaId]);
|
|
19436
19439
|
addAnchor.call(this, sch.$anchor);
|
|
19437
19440
|
addAnchor.call(this, sch.$dynamicAnchor);
|
|
19438
|
-
baseIds[jsonPtr] =
|
|
19441
|
+
baseIds[jsonPtr] = innerBaseId;
|
|
19439
19442
|
function addRef(ref2) {
|
|
19440
19443
|
const _resolve = this.opts.uriResolver.resolve;
|
|
19441
|
-
ref2 = normalizeId(
|
|
19444
|
+
ref2 = normalizeId(innerBaseId ? _resolve(innerBaseId, ref2) : ref2);
|
|
19442
19445
|
if (schemaRefs.has(ref2))
|
|
19443
19446
|
throw ambiguos(ref2);
|
|
19444
19447
|
schemaRefs.add(ref2);
|
|
@@ -20050,6 +20053,7 @@ function compileSchema(sch) {
|
|
|
20050
20053
|
parentDataProperty: names_1$5.default.parentDataProperty,
|
|
20051
20054
|
dataNames: [names_1$5.default.data],
|
|
20052
20055
|
dataPathArr: [codegen_1$q.nil],
|
|
20056
|
+
// TODO can its length be used as dataLevel if nil is removed?
|
|
20053
20057
|
dataLevel: 0,
|
|
20054
20058
|
dataTypes: [],
|
|
20055
20059
|
definedProperties: /* @__PURE__ */ new Set(),
|
|
@@ -21316,7 +21320,7 @@ uri$1.default = uri;
|
|
|
21316
21320
|
} });
|
|
21317
21321
|
const validation_error_12 = validation_error;
|
|
21318
21322
|
const ref_error_12 = ref_error;
|
|
21319
|
-
const
|
|
21323
|
+
const rules_12 = rules;
|
|
21320
21324
|
const compile_12 = compile;
|
|
21321
21325
|
const codegen_2 = codegen;
|
|
21322
21326
|
const resolve_12 = resolve$1;
|
|
@@ -21407,7 +21411,7 @@ uri$1.default = uri;
|
|
|
21407
21411
|
this.logger = getLogger(opts.logger);
|
|
21408
21412
|
const formatOpt = opts.validateFormats;
|
|
21409
21413
|
opts.validateFormats = false;
|
|
21410
|
-
this.RULES = (0,
|
|
21414
|
+
this.RULES = (0, rules_12.getRules)();
|
|
21411
21415
|
checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
|
|
21412
21416
|
checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
|
|
21413
21417
|
this._metaOpts = getMetaSchemaOptions.call(this);
|
|
@@ -21763,9 +21767,9 @@ uri$1.default = uri;
|
|
|
21763
21767
|
}
|
|
21764
21768
|
}
|
|
21765
21769
|
}
|
|
21766
|
-
exports.default = Ajv;
|
|
21767
21770
|
Ajv.ValidationError = validation_error_12.default;
|
|
21768
21771
|
Ajv.MissingRefError = ref_error_12.default;
|
|
21772
|
+
exports.default = Ajv;
|
|
21769
21773
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
21770
21774
|
for (const key in checkOpts) {
|
|
21771
21775
|
const opt = key;
|
|
@@ -23606,14 +23610,13 @@ const unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default
|
|
|
23606
23610
|
unevaluated$1.default = unevaluated;
|
|
23607
23611
|
var discriminator = {};
|
|
23608
23612
|
var types = {};
|
|
23609
|
-
(
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23614
|
-
|
|
23615
|
-
|
|
23616
|
-
})(types);
|
|
23613
|
+
Object.defineProperty(types, "__esModule", { value: true });
|
|
23614
|
+
types.DiscrError = void 0;
|
|
23615
|
+
var DiscrError;
|
|
23616
|
+
(function(DiscrError2) {
|
|
23617
|
+
DiscrError2["Tag"] = "tag";
|
|
23618
|
+
DiscrError2["Mapping"] = "mapping";
|
|
23619
|
+
})(DiscrError || (types.DiscrError = DiscrError = {}));
|
|
23617
23620
|
Object.defineProperty(discriminator, "__esModule", { value: true });
|
|
23618
23621
|
const codegen_1 = codegen;
|
|
23619
23622
|
const types_1 = types;
|
|
@@ -24209,7 +24212,7 @@ function addMetaSchema2019($data) {
|
|
|
24209
24212
|
jsonSchema201909.default = addMetaSchema2019;
|
|
24210
24213
|
(function(module, exports) {
|
|
24211
24214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24212
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
24215
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
|
|
24213
24216
|
const core_12 = core$3;
|
|
24214
24217
|
const draft7_1 = draft7;
|
|
24215
24218
|
const dynamic_1 = dynamic$1;
|
|
@@ -24248,7 +24251,9 @@ jsonSchema201909.default = addMetaSchema2019;
|
|
|
24248
24251
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
24249
24252
|
}
|
|
24250
24253
|
}
|
|
24254
|
+
exports.Ajv2019 = Ajv2019;
|
|
24251
24255
|
module.exports = exports = Ajv2019;
|
|
24256
|
+
module.exports.Ajv2019 = Ajv2019;
|
|
24252
24257
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24253
24258
|
exports.default = Ajv2019;
|
|
24254
24259
|
var validate_12 = validate$1;
|
|
@@ -25266,7 +25271,7 @@ function handleComputedProperty(options) {
|
|
|
25266
25271
|
var _a;
|
|
25267
25272
|
return Object.assign({}, options, {
|
|
25268
25273
|
_computed: {
|
|
25269
|
-
version: "
|
|
25274
|
+
version: "0.0.0",
|
|
25270
25275
|
paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
|
|
25271
25276
|
}
|
|
25272
25277
|
});
|
|
@@ -28608,7 +28613,7 @@ class RebillyInstrumentsInstance {
|
|
|
28608
28613
|
await show({ componentName, payload });
|
|
28609
28614
|
}
|
|
28610
28615
|
get version() {
|
|
28611
|
-
return `RebillyInstruments Ver.${"
|
|
28616
|
+
return `RebillyInstruments Ver.${"0.0.0"}`;
|
|
28612
28617
|
}
|
|
28613
28618
|
on(eventName, callback) {
|
|
28614
28619
|
on({ eventName, callback });
|