@rebilly/instruments 9.38.4 → 9.38.6
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 +4 -0
- package/dist/index.js +379 -372
- package/dist/index.min.js +12 -12
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1827,13 +1827,13 @@ const iframes = (/* @__PURE__ */ (() => {
|
|
|
1827
1827
|
summary: null,
|
|
1828
1828
|
hasFrame(name) {
|
|
1829
1829
|
if ((state2 == null ? void 0 : state2[name]) && !name.match(/^has.*/)) {
|
|
1830
|
-
return
|
|
1830
|
+
return Boolean(state2[name]);
|
|
1831
1831
|
}
|
|
1832
1832
|
return false;
|
|
1833
1833
|
},
|
|
1834
1834
|
hasComponent(name) {
|
|
1835
1835
|
var _a;
|
|
1836
|
-
return
|
|
1836
|
+
return Boolean((_a = state2 == null ? void 0 : state2[name]) == null ? void 0 : _a.component);
|
|
1837
1837
|
}
|
|
1838
1838
|
};
|
|
1839
1839
|
}
|
|
@@ -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 = "56.21.
|
|
5693
|
+
const Yt$1 = /* @__PURE__ */ wt$1(Gt$1), Qt$1 = "56.21.4";
|
|
5694
5694
|
let Xt$1 = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Zt$1 = (e2 = 21) => {
|
|
5695
5695
|
let t2 = "", s = e2;
|
|
5696
5696
|
for (; s--; )
|
|
@@ -16351,7 +16351,9 @@ class DataInstance {
|
|
|
16351
16351
|
return Boolean(this.previewPurchase);
|
|
16352
16352
|
}
|
|
16353
16353
|
get hasAmountDue() {
|
|
16354
|
-
return
|
|
16354
|
+
return Boolean(
|
|
16355
|
+
this.amountAndCurrency.amountDue && this.amountAndCurrency.amountDue !== this.amountAndCurrency.amount
|
|
16356
|
+
);
|
|
16355
16357
|
}
|
|
16356
16358
|
get summaryItems() {
|
|
16357
16359
|
const {
|
|
@@ -17442,7 +17444,7 @@ var scope = {};
|
|
|
17442
17444
|
(function(UsedValueState2) {
|
|
17443
17445
|
UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
|
|
17444
17446
|
UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
|
|
17445
|
-
})(UsedValueState
|
|
17447
|
+
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
17446
17448
|
exports.varKinds = {
|
|
17447
17449
|
const: new code_12.Name("const"),
|
|
17448
17450
|
let: new code_12.Name("let"),
|
|
@@ -18284,193 +18286,197 @@ var scope = {};
|
|
|
18284
18286
|
}
|
|
18285
18287
|
})(codegen);
|
|
18286
18288
|
var util = {};
|
|
18287
|
-
(
|
|
18288
|
-
|
|
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
|
-
checkStrictMode(it2, `unknown keyword: "${key}"`);
|
|
18318
|
-
}
|
|
18319
|
-
}
|
|
18320
|
-
exports.checkUnknownRules = checkUnknownRules;
|
|
18321
|
-
function schemaHasRules(schema2, rules2) {
|
|
18322
|
-
if (typeof schema2 == "boolean")
|
|
18323
|
-
return !schema2;
|
|
18324
|
-
for (const key in schema2)
|
|
18325
|
-
if (rules2[key])
|
|
18326
|
-
return true;
|
|
18327
|
-
return false;
|
|
18328
|
-
}
|
|
18329
|
-
exports.schemaHasRules = schemaHasRules;
|
|
18330
|
-
function schemaHasRulesButRef(schema2, RULES) {
|
|
18331
|
-
if (typeof schema2 == "boolean")
|
|
18332
|
-
return !schema2;
|
|
18333
|
-
for (const key in schema2)
|
|
18334
|
-
if (key !== "$ref" && RULES.all[key])
|
|
18335
|
-
return true;
|
|
18336
|
-
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}"`);
|
|
18337
18319
|
}
|
|
18338
|
-
|
|
18339
|
-
|
|
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
|
-
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
18365
|
-
}
|
|
18366
|
-
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
18367
|
-
function eachItem(xs2, f) {
|
|
18368
|
-
if (Array.isArray(xs2)) {
|
|
18369
|
-
for (const x2 of xs2)
|
|
18370
|
-
f(x2);
|
|
18371
|
-
} else {
|
|
18372
|
-
f(xs2);
|
|
18373
|
-
}
|
|
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}`;
|
|
18374
18346
|
}
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18380
|
-
|
|
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);
|
|
18381
18374
|
}
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
if (from === true) {
|
|
18389
|
-
gen.assign(to, true);
|
|
18390
|
-
} else {
|
|
18391
|
-
gen.assign(to, (0, codegen_12._)`${to} || {}`);
|
|
18392
|
-
setEvaluated(gen, to, from);
|
|
18393
|
-
}
|
|
18394
|
-
}),
|
|
18395
|
-
mergeValues: (from, to) => from === true ? true : { ...from, ...to },
|
|
18396
|
-
resultToName: evaluatedPropsToName
|
|
18397
|
-
}),
|
|
18398
|
-
items: makeMergeEvaluated({
|
|
18399
|
-
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}`)),
|
|
18400
|
-
mergeToName: (gen, from, to) => gen.if((0, codegen_12._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_12._)`${to} > ${from} ? ${to} : ${from}`)),
|
|
18401
|
-
mergeValues: (from, to) => from === true ? true : Math.max(from, to),
|
|
18402
|
-
resultToName: (gen, items2) => gen.var("items", items2)
|
|
18403
|
-
})
|
|
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;
|
|
18404
18381
|
};
|
|
18405
|
-
|
|
18406
|
-
|
|
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
|
-
}
|
|
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;
|
|
18449
18449
|
var names$1 = {};
|
|
18450
18450
|
Object.defineProperty(names$1, "__esModule", { value: true });
|
|
18451
|
-
const codegen_1$
|
|
18451
|
+
const codegen_1$y = codegen;
|
|
18452
18452
|
const names = {
|
|
18453
18453
|
// validation function arguments
|
|
18454
|
-
data: new codegen_1$
|
|
18454
|
+
data: new codegen_1$y.Name("data"),
|
|
18455
|
+
// data passed to validation function
|
|
18455
18456
|
// args passed from referencing schema
|
|
18456
|
-
valCxt: new codegen_1$
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
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
|
|
18462
18466
|
// function scoped variables
|
|
18463
|
-
vErrors: new codegen_1$
|
|
18464
|
-
|
|
18465
|
-
|
|
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"),
|
|
18466
18472
|
// "globals"
|
|
18467
|
-
self: new codegen_1$
|
|
18468
|
-
scope: new codegen_1$
|
|
18473
|
+
self: new codegen_1$y.Name("self"),
|
|
18474
|
+
scope: new codegen_1$y.Name("scope"),
|
|
18469
18475
|
// JTD serialize/parse name for JSON string and position
|
|
18470
|
-
json: new codegen_1$
|
|
18471
|
-
jsonPos: new codegen_1$
|
|
18472
|
-
jsonLen: new codegen_1$
|
|
18473
|
-
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")
|
|
18474
18480
|
};
|
|
18475
18481
|
names$1.default = names;
|
|
18476
18482
|
(function(exports) {
|
|
@@ -18543,6 +18549,7 @@ names$1.default = names;
|
|
|
18543
18549
|
const E2 = {
|
|
18544
18550
|
keyword: new codegen_12.Name("keyword"),
|
|
18545
18551
|
schemaPath: new codegen_12.Name("schemaPath"),
|
|
18552
|
+
// also used in JTD errors
|
|
18546
18553
|
params: new codegen_12.Name("params"),
|
|
18547
18554
|
propertyName: new codegen_12.Name("propertyName"),
|
|
18548
18555
|
message: new codegen_12.Name("message"),
|
|
@@ -18591,8 +18598,8 @@ names$1.default = names;
|
|
|
18591
18598
|
})(errors);
|
|
18592
18599
|
Object.defineProperty(boolSchema, "__esModule", { value: true });
|
|
18593
18600
|
boolSchema.boolOrEmptySchema = boolSchema.topBoolOrEmptySchema = void 0;
|
|
18594
|
-
const errors_1$
|
|
18595
|
-
const codegen_1$
|
|
18601
|
+
const errors_1$3 = errors;
|
|
18602
|
+
const codegen_1$x = codegen;
|
|
18596
18603
|
const names_1$9 = names$1;
|
|
18597
18604
|
const boolError = {
|
|
18598
18605
|
message: "boolean schema is false"
|
|
@@ -18604,7 +18611,7 @@ function topBoolOrEmptySchema(it2) {
|
|
|
18604
18611
|
} else if (typeof schema2 == "object" && schema2.$async === true) {
|
|
18605
18612
|
gen.return(names_1$9.default.data);
|
|
18606
18613
|
} else {
|
|
18607
|
-
gen.assign((0, codegen_1$
|
|
18614
|
+
gen.assign((0, codegen_1$x._)`${validateName}.errors`, null);
|
|
18608
18615
|
gen.return(true);
|
|
18609
18616
|
}
|
|
18610
18617
|
}
|
|
@@ -18631,7 +18638,7 @@ function falseSchemaError(it2, overrideAllErrors) {
|
|
|
18631
18638
|
params: {},
|
|
18632
18639
|
it: it2
|
|
18633
18640
|
};
|
|
18634
|
-
(0, errors_1$
|
|
18641
|
+
(0, errors_1$3.reportError)(cxt, boolError, void 0, overrideAllErrors);
|
|
18635
18642
|
}
|
|
18636
18643
|
var dataType = {};
|
|
18637
18644
|
var rules = {};
|
|
@@ -18676,185 +18683,183 @@ function shouldUseRule(schema2, rule) {
|
|
|
18676
18683
|
return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0));
|
|
18677
18684
|
}
|
|
18678
18685
|
applicability.shouldUseRule = shouldUseRule;
|
|
18679
|
-
(
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
if (
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
throw new Error('"nullable" cannot be used without "type"');
|
|
18701
|
-
}
|
|
18702
|
-
if (schema2.nullable === true)
|
|
18703
|
-
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"');
|
|
18704
18707
|
}
|
|
18705
|
-
|
|
18708
|
+
if (schema2.nullable === true)
|
|
18709
|
+
types2.push("null");
|
|
18706
18710
|
}
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18720
|
-
|
|
18721
|
-
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
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
|
+
});
|
|
18729
18733
|
}
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18733
|
-
|
|
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)));
|
|
18734
18747
|
}
|
|
18735
|
-
|
|
18736
|
-
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
if (opts.coerceTypes === "array") {
|
|
18740
|
-
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);
|
|
18741
18752
|
}
|
|
18742
|
-
gen.if((0, codegen_12._)`${coerced} !== undefined`);
|
|
18743
|
-
for (const t2 of coerceTo) {
|
|
18744
|
-
if (COERCIBLE.has(t2) || t2 === "array" && opts.coerceTypes === "array") {
|
|
18745
|
-
coerceSpecificType(t2);
|
|
18746
|
-
}
|
|
18747
|
-
}
|
|
18748
|
-
gen.else();
|
|
18749
|
-
reportTypeError(it2);
|
|
18750
|
-
gen.endIf();
|
|
18751
|
-
gen.if((0, codegen_12._)`${coerced} !== undefined`, () => {
|
|
18752
|
-
gen.assign(data, coerced);
|
|
18753
|
-
assignParentData(it2, coerced);
|
|
18754
|
-
});
|
|
18755
|
-
function coerceSpecificType(t2) {
|
|
18756
|
-
switch (t2) {
|
|
18757
|
-
case "string":
|
|
18758
|
-
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._)`""`);
|
|
18759
|
-
return;
|
|
18760
|
-
case "number":
|
|
18761
|
-
gen.elseIf((0, codegen_12._)`${dataType2} == "boolean" || ${data} === null
|
|
18762
|
-
|| (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_12._)`+${data}`);
|
|
18763
|
-
return;
|
|
18764
|
-
case "integer":
|
|
18765
|
-
gen.elseIf((0, codegen_12._)`${dataType2} === "boolean" || ${data} === null
|
|
18766
|
-
|| (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_12._)`+${data}`);
|
|
18767
|
-
return;
|
|
18768
|
-
case "boolean":
|
|
18769
|
-
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);
|
|
18770
|
-
return;
|
|
18771
|
-
case "null":
|
|
18772
|
-
gen.elseIf((0, codegen_12._)`${data} === "" || ${data} === 0 || ${data} === false`);
|
|
18773
|
-
gen.assign(coerced, null);
|
|
18774
|
-
return;
|
|
18775
|
-
case "array":
|
|
18776
|
-
gen.elseIf((0, codegen_12._)`${dataType2} === "string" || ${dataType2} === "number"
|
|
18777
|
-
|| ${dataType2} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_12._)`[${data}]`);
|
|
18778
|
-
}
|
|
18779
|
-
}
|
|
18780
|
-
}
|
|
18781
|
-
function assignParentData({ gen, parentData, parentDataProperty }, expr) {
|
|
18782
|
-
gen.if((0, codegen_12._)`${parentData} !== undefined`, () => gen.assign((0, codegen_12._)`${parentData}[${parentDataProperty}]`, expr));
|
|
18783
18753
|
}
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
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;
|
|
18788
18777
|
case "null":
|
|
18789
|
-
|
|
18778
|
+
gen.elseIf((0, codegen_1$w._)`${data} === "" || ${data} === 0 || ${data} === false`);
|
|
18779
|
+
gen.assign(coerced, null);
|
|
18780
|
+
return;
|
|
18790
18781
|
case "array":
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
cond = (0, codegen_12._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
|
|
18795
|
-
break;
|
|
18796
|
-
case "integer":
|
|
18797
|
-
cond = numCond((0, codegen_12._)`!(${data} % 1) && !isNaN(${data})`);
|
|
18798
|
-
break;
|
|
18799
|
-
case "number":
|
|
18800
|
-
cond = numCond();
|
|
18801
|
-
break;
|
|
18802
|
-
default:
|
|
18803
|
-
return (0, codegen_12._)`typeof ${data} ${EQ} ${dataType2}`;
|
|
18804
|
-
}
|
|
18805
|
-
return correct === DataType.Correct ? cond : (0, codegen_12.not)(cond);
|
|
18806
|
-
function numCond(_cond = codegen_12.nil) {
|
|
18807
|
-
return (0, codegen_12.and)((0, codegen_12._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_12._)`isFinite(${data})` : codegen_12.nil);
|
|
18808
|
-
}
|
|
18809
|
-
}
|
|
18810
|
-
exports.checkDataType = checkDataType;
|
|
18811
|
-
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
18812
|
-
if (dataTypes.length === 1) {
|
|
18813
|
-
return checkDataType(dataTypes[0], data, strictNums, correct);
|
|
18814
|
-
}
|
|
18815
|
-
let cond;
|
|
18816
|
-
const types2 = (0, util_12.toHash)(dataTypes);
|
|
18817
|
-
if (types2.array && types2.object) {
|
|
18818
|
-
const notObj = (0, codegen_12._)`typeof ${data} != "object"`;
|
|
18819
|
-
cond = types2.null ? notObj : (0, codegen_12._)`!${data} || ${notObj}`;
|
|
18820
|
-
delete types2.null;
|
|
18821
|
-
delete types2.array;
|
|
18822
|
-
delete types2.object;
|
|
18823
|
-
} else {
|
|
18824
|
-
cond = codegen_12.nil;
|
|
18825
|
-
}
|
|
18826
|
-
if (types2.number)
|
|
18827
|
-
delete types2.integer;
|
|
18828
|
-
for (const t2 in types2)
|
|
18829
|
-
cond = (0, codegen_12.and)(cond, checkDataType(t2, data, strictNums, correct));
|
|
18830
|
-
return cond;
|
|
18831
|
-
}
|
|
18832
|
-
exports.checkDataTypes = checkDataTypes;
|
|
18833
|
-
const typeError = {
|
|
18834
|
-
message: ({ schema: schema2 }) => `must be ${schema2}`,
|
|
18835
|
-
params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_12._)`{type: ${schema2}}` : (0, codegen_12._)`{type: ${schemaValue}}`
|
|
18836
|
-
};
|
|
18837
|
-
function reportTypeError(it2) {
|
|
18838
|
-
const cxt = getTypeErrorContext(it2);
|
|
18839
|
-
(0, errors_12.reportError)(cxt, typeError);
|
|
18840
|
-
}
|
|
18841
|
-
exports.reportTypeError = reportTypeError;
|
|
18842
|
-
function getTypeErrorContext(it2) {
|
|
18843
|
-
const { gen, data, schema: schema2 } = it2;
|
|
18844
|
-
const schemaCode = (0, util_12.schemaRefOrVal)(it2, schema2, "type");
|
|
18845
|
-
return {
|
|
18846
|
-
gen,
|
|
18847
|
-
keyword: "type",
|
|
18848
|
-
data,
|
|
18849
|
-
schema: schema2.type,
|
|
18850
|
-
schemaCode,
|
|
18851
|
-
schemaValue: schemaCode,
|
|
18852
|
-
parentSchema: schema2,
|
|
18853
|
-
params: {},
|
|
18854
|
-
it: it2
|
|
18855
|
-
};
|
|
18782
|
+
gen.elseIf((0, codegen_1$w._)`${dataType2} === "string" || ${dataType2} === "number"
|
|
18783
|
+
|| ${dataType2} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1$w._)`[${data}]`);
|
|
18784
|
+
}
|
|
18856
18785
|
}
|
|
18857
|
-
}
|
|
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
|
+
}
|
|
18858
18863
|
var defaults = {};
|
|
18859
18864
|
Object.defineProperty(defaults, "__esModule", { value: true });
|
|
18860
18865
|
defaults.assignDefaults = void 0;
|
|
@@ -19428,15 +19433,15 @@ function getSchemaRefs(schema2, baseId) {
|
|
|
19428
19433
|
if (parentJsonPtr === void 0)
|
|
19429
19434
|
return;
|
|
19430
19435
|
const fullPath = pathPrefix + jsonPtr;
|
|
19431
|
-
let
|
|
19436
|
+
let innerBaseId = baseIds[parentJsonPtr];
|
|
19432
19437
|
if (typeof sch[schemaId] == "string")
|
|
19433
|
-
|
|
19438
|
+
innerBaseId = addRef.call(this, sch[schemaId]);
|
|
19434
19439
|
addAnchor.call(this, sch.$anchor);
|
|
19435
19440
|
addAnchor.call(this, sch.$dynamicAnchor);
|
|
19436
|
-
baseIds[jsonPtr] =
|
|
19441
|
+
baseIds[jsonPtr] = innerBaseId;
|
|
19437
19442
|
function addRef(ref2) {
|
|
19438
19443
|
const _resolve = this.opts.uriResolver.resolve;
|
|
19439
|
-
ref2 = normalizeId(
|
|
19444
|
+
ref2 = normalizeId(innerBaseId ? _resolve(innerBaseId, ref2) : ref2);
|
|
19440
19445
|
if (schemaRefs.has(ref2))
|
|
19441
19446
|
throw ambiguos(ref2);
|
|
19442
19447
|
schemaRefs.add(ref2);
|
|
@@ -20048,6 +20053,7 @@ function compileSchema(sch) {
|
|
|
20048
20053
|
parentDataProperty: names_1$5.default.parentDataProperty,
|
|
20049
20054
|
dataNames: [names_1$5.default.data],
|
|
20050
20055
|
dataPathArr: [codegen_1$q.nil],
|
|
20056
|
+
// TODO can its length be used as dataLevel if nil is removed?
|
|
20051
20057
|
dataLevel: 0,
|
|
20052
20058
|
dataTypes: [],
|
|
20053
20059
|
definedProperties: /* @__PURE__ */ new Set(),
|
|
@@ -21314,7 +21320,7 @@ uri$1.default = uri;
|
|
|
21314
21320
|
} });
|
|
21315
21321
|
const validation_error_12 = validation_error;
|
|
21316
21322
|
const ref_error_12 = ref_error;
|
|
21317
|
-
const
|
|
21323
|
+
const rules_12 = rules;
|
|
21318
21324
|
const compile_12 = compile;
|
|
21319
21325
|
const codegen_2 = codegen;
|
|
21320
21326
|
const resolve_12 = resolve$1;
|
|
@@ -21405,7 +21411,7 @@ uri$1.default = uri;
|
|
|
21405
21411
|
this.logger = getLogger(opts.logger);
|
|
21406
21412
|
const formatOpt = opts.validateFormats;
|
|
21407
21413
|
opts.validateFormats = false;
|
|
21408
|
-
this.RULES = (0,
|
|
21414
|
+
this.RULES = (0, rules_12.getRules)();
|
|
21409
21415
|
checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
|
|
21410
21416
|
checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
|
|
21411
21417
|
this._metaOpts = getMetaSchemaOptions.call(this);
|
|
@@ -21761,9 +21767,9 @@ uri$1.default = uri;
|
|
|
21761
21767
|
}
|
|
21762
21768
|
}
|
|
21763
21769
|
}
|
|
21764
|
-
exports.default = Ajv;
|
|
21765
21770
|
Ajv.ValidationError = validation_error_12.default;
|
|
21766
21771
|
Ajv.MissingRefError = ref_error_12.default;
|
|
21772
|
+
exports.default = Ajv;
|
|
21767
21773
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
21768
21774
|
for (const key in checkOpts) {
|
|
21769
21775
|
const opt = key;
|
|
@@ -23604,14 +23610,13 @@ const unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default
|
|
|
23604
23610
|
unevaluated$1.default = unevaluated;
|
|
23605
23611
|
var discriminator = {};
|
|
23606
23612
|
var types = {};
|
|
23607
|
-
(
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23614
|
-
})(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 = {}));
|
|
23615
23620
|
Object.defineProperty(discriminator, "__esModule", { value: true });
|
|
23616
23621
|
const codegen_1 = codegen;
|
|
23617
23622
|
const types_1 = types;
|
|
@@ -24207,7 +24212,7 @@ function addMetaSchema2019($data) {
|
|
|
24207
24212
|
jsonSchema201909.default = addMetaSchema2019;
|
|
24208
24213
|
(function(module, exports) {
|
|
24209
24214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24210
|
-
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;
|
|
24211
24216
|
const core_12 = core$3;
|
|
24212
24217
|
const draft7_1 = draft7;
|
|
24213
24218
|
const dynamic_1 = dynamic$1;
|
|
@@ -24246,7 +24251,9 @@ jsonSchema201909.default = addMetaSchema2019;
|
|
|
24246
24251
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
24247
24252
|
}
|
|
24248
24253
|
}
|
|
24254
|
+
exports.Ajv2019 = Ajv2019;
|
|
24249
24255
|
module.exports = exports = Ajv2019;
|
|
24256
|
+
module.exports.Ajv2019 = Ajv2019;
|
|
24250
24257
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24251
24258
|
exports.default = Ajv2019;
|
|
24252
24259
|
var validate_12 = validate$1;
|
|
@@ -25264,7 +25271,7 @@ function handleComputedProperty(options) {
|
|
|
25264
25271
|
var _a;
|
|
25265
25272
|
return Object.assign({}, options, {
|
|
25266
25273
|
_computed: {
|
|
25267
|
-
version: "9.38.
|
|
25274
|
+
version: "9.38.5",
|
|
25268
25275
|
paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
|
|
25269
25276
|
}
|
|
25270
25277
|
});
|
|
@@ -28606,7 +28613,7 @@ class RebillyInstrumentsInstance {
|
|
|
28606
28613
|
await show({ componentName, payload });
|
|
28607
28614
|
}
|
|
28608
28615
|
get version() {
|
|
28609
|
-
return `RebillyInstruments Ver.${"9.38.
|
|
28616
|
+
return `RebillyInstruments Ver.${"9.38.5"}`;
|
|
28610
28617
|
}
|
|
28611
28618
|
on(eventName, callback) {
|
|
28612
28619
|
on({ eventName, callback });
|