@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/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 !!state2[name];
1830
+ return Boolean(state2[name]);
1831
1831
  }
1832
1832
  return false;
1833
1833
  },
1834
1834
  hasComponent(name) {
1835
1835
  var _a;
1836
- return !!((_a = state2 == null ? void 0 : state2[name]) == null ? void 0 : _a.component);
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.2";
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 !!(this.amountAndCurrency.amountDue && this.amountAndCurrency.amountDue !== this.amountAndCurrency.amount);
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 = exports.UsedValueState || (exports.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
- (function(exports) {
18288
- Object.defineProperty(exports, "__esModule", { value: true });
18289
- exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
18290
- const codegen_12 = codegen;
18291
- const code_12 = code$1;
18292
- function toHash(arr) {
18293
- const hash = {};
18294
- for (const item of arr)
18295
- hash[item] = true;
18296
- return hash;
18297
- }
18298
- exports.toHash = toHash;
18299
- function alwaysValidSchema(it2, schema2) {
18300
- if (typeof schema2 == "boolean")
18301
- return schema2;
18302
- if (Object.keys(schema2).length === 0)
18303
- return true;
18304
- checkUnknownRules(it2, schema2);
18305
- return !schemaHasRules(schema2, it2.self.RULES.all);
18306
- }
18307
- exports.alwaysValidSchema = alwaysValidSchema;
18308
- function checkUnknownRules(it2, schema2 = it2.schema) {
18309
- const { opts, self: self2 } = it2;
18310
- if (!opts.strictSchema)
18311
- return;
18312
- if (typeof schema2 === "boolean")
18313
- return;
18314
- const rules2 = self2.RULES.keywords;
18315
- for (const key in schema2) {
18316
- if (!rules2[key])
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
- exports.schemaHasRulesButRef = schemaHasRulesButRef;
18339
- function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword2, $data) {
18340
- if (!$data) {
18341
- if (typeof schema2 == "number" || typeof schema2 == "boolean")
18342
- return schema2;
18343
- if (typeof schema2 == "string")
18344
- return (0, codegen_12._)`${schema2}`;
18345
- }
18346
- return (0, codegen_12._)`${topSchemaRef}${schemaPath}${(0, codegen_12.getProperty)(keyword2)}`;
18347
- }
18348
- exports.schemaRefOrVal = schemaRefOrVal;
18349
- function unescapeFragment(str) {
18350
- return unescapeJsonPointer(decodeURIComponent(str));
18351
- }
18352
- exports.unescapeFragment = unescapeFragment;
18353
- function escapeFragment(str) {
18354
- return encodeURIComponent(escapeJsonPointer(str));
18355
- }
18356
- exports.escapeFragment = escapeFragment;
18357
- function escapeJsonPointer(str) {
18358
- if (typeof str == "number")
18359
- return `${str}`;
18360
- return str.replace(/~/g, "~0").replace(/\//g, "~1");
18361
- }
18362
- exports.escapeJsonPointer = escapeJsonPointer;
18363
- function unescapeJsonPointer(str) {
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
- exports.eachItem = eachItem;
18376
- function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {
18377
- return (gen, from, to, toName) => {
18378
- const res = to === void 0 ? from : to instanceof codegen_12.Name ? (from instanceof codegen_12.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_12.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);
18379
- return toName === codegen_12.Name && !(res instanceof codegen_12.Name) ? resultToName(gen, res) : res;
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
- exports.mergeEvaluated = {
18383
- props: makeMergeEvaluated({
18384
- mergeNames: (gen, from, to) => gen.if((0, codegen_12._)`${to} !== true && ${from} !== undefined`, () => {
18385
- gen.if((0, codegen_12._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_12._)`${to} || {}`).code((0, codegen_12._)`Object.assign(${to}, ${from})`));
18386
- }),
18387
- mergeToName: (gen, from, to) => gen.if((0, codegen_12._)`${to} !== true`, () => {
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
- function evaluatedPropsToName(gen, ps2) {
18406
- if (ps2 === true)
18407
- return gen.var("props", true);
18408
- const props = gen.var("props", (0, codegen_12._)`{}`);
18409
- if (ps2 !== void 0)
18410
- setEvaluated(gen, props, ps2);
18411
- return props;
18412
- }
18413
- exports.evaluatedPropsToName = evaluatedPropsToName;
18414
- function setEvaluated(gen, props, ps2) {
18415
- Object.keys(ps2).forEach((p2) => gen.assign((0, codegen_12._)`${props}${(0, codegen_12.getProperty)(p2)}`, true));
18416
- }
18417
- exports.setEvaluated = setEvaluated;
18418
- const snippets = {};
18419
- function useFunc(gen, f) {
18420
- return gen.scopeValue("func", {
18421
- ref: f,
18422
- code: snippets[f.code] || (snippets[f.code] = new code_12._Code(f.code))
18423
- });
18424
- }
18425
- exports.useFunc = useFunc;
18426
- var Type;
18427
- (function(Type2) {
18428
- Type2[Type2["Num"] = 0] = "Num";
18429
- Type2[Type2["Str"] = 1] = "Str";
18430
- })(Type = exports.Type || (exports.Type = {}));
18431
- function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
18432
- if (dataProp instanceof codegen_12.Name) {
18433
- const isNumber2 = dataPropType === Type.Num;
18434
- return jsPropertySyntax ? isNumber2 ? (0, codegen_12._)`"[" + ${dataProp} + "]"` : (0, codegen_12._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_12._)`"/" + ${dataProp}` : (0, codegen_12._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
18435
- }
18436
- return jsPropertySyntax ? (0, codegen_12.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
18437
- }
18438
- exports.getErrorPath = getErrorPath;
18439
- function checkStrictMode(it2, msg, mode = it2.opts.strictSchema) {
18440
- if (!mode)
18441
- return;
18442
- msg = `strict mode: ${msg}`;
18443
- if (mode === true)
18444
- throw new Error(msg);
18445
- it2.self.logger.warn(msg);
18446
- }
18447
- exports.checkStrictMode = checkStrictMode;
18448
- })(util);
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$x = codegen;
18451
+ const codegen_1$y = codegen;
18452
18452
  const names = {
18453
18453
  // validation function arguments
18454
- data: new codegen_1$x.Name("data"),
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$x.Name("valCxt"),
18457
- instancePath: new codegen_1$x.Name("instancePath"),
18458
- parentData: new codegen_1$x.Name("parentData"),
18459
- parentDataProperty: new codegen_1$x.Name("parentDataProperty"),
18460
- rootData: new codegen_1$x.Name("rootData"),
18461
- dynamicAnchors: new codegen_1$x.Name("dynamicAnchors"),
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$x.Name("vErrors"),
18464
- errors: new codegen_1$x.Name("errors"),
18465
- this: new codegen_1$x.Name("this"),
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$x.Name("self"),
18468
- scope: new codegen_1$x.Name("scope"),
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$x.Name("json"),
18471
- jsonPos: new codegen_1$x.Name("jsonPos"),
18472
- jsonLen: new codegen_1$x.Name("jsonLen"),
18473
- jsonPart: new codegen_1$x.Name("jsonPart")
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$2 = errors;
18595
- const codegen_1$w = codegen;
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$w._)`${validateName}.errors`, null);
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$2.reportError)(cxt, boolError, void 0, overrideAllErrors);
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
- (function(exports) {
18680
- Object.defineProperty(exports, "__esModule", { value: true });
18681
- exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
18682
- const rules_1 = rules;
18683
- const applicability_12 = applicability;
18684
- const errors_12 = errors;
18685
- const codegen_12 = codegen;
18686
- const util_12 = util;
18687
- var DataType;
18688
- (function(DataType2) {
18689
- DataType2[DataType2["Correct"] = 0] = "Correct";
18690
- DataType2[DataType2["Wrong"] = 1] = "Wrong";
18691
- })(DataType = exports.DataType || (exports.DataType = {}));
18692
- function getSchemaTypes(schema2) {
18693
- const types2 = getJSONTypes(schema2.type);
18694
- const hasNull = types2.includes("null");
18695
- if (hasNull) {
18696
- if (schema2.nullable === false)
18697
- throw new Error("type: null contradicts nullable: false");
18698
- } else {
18699
- if (!types2.length && schema2.nullable !== void 0) {
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
- return types2;
18708
+ if (schema2.nullable === true)
18709
+ types2.push("null");
18706
18710
  }
18707
- exports.getSchemaTypes = getSchemaTypes;
18708
- function getJSONTypes(ts2) {
18709
- const types2 = Array.isArray(ts2) ? ts2 : ts2 ? [ts2] : [];
18710
- if (types2.every(rules_1.isJSONType))
18711
- return types2;
18712
- throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
18713
- }
18714
- exports.getJSONTypes = getJSONTypes;
18715
- function coerceAndCheckDataType(it2, types2) {
18716
- const { gen, data, opts } = it2;
18717
- const coerceTo = coerceToTypes(types2, opts.coerceTypes);
18718
- const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_12.schemaHasRulesForType)(it2, types2[0]));
18719
- if (checkTypes) {
18720
- const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong);
18721
- gen.if(wrongType, () => {
18722
- if (coerceTo.length)
18723
- coerceData(it2, types2, coerceTo);
18724
- else
18725
- reportTypeError(it2);
18726
- });
18727
- }
18728
- return checkTypes;
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
- exports.coerceAndCheckDataType = coerceAndCheckDataType;
18731
- const COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
18732
- function coerceToTypes(types2, coerceTypes) {
18733
- return coerceTypes ? types2.filter((t2) => COERCIBLE.has(t2) || coerceTypes === "array" && t2 === "array") : [];
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
- function coerceData(it2, types2, coerceTo) {
18736
- const { gen, data, opts } = it2;
18737
- const dataType2 = gen.let("dataType", (0, codegen_12._)`typeof ${data}`);
18738
- const coerced = gen.let("coerced", (0, codegen_12._)`undefined`);
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
- function checkDataType(dataType2, data, strictNums, correct = DataType.Correct) {
18785
- const EQ = correct === DataType.Correct ? codegen_12.operators.EQ : codegen_12.operators.NEQ;
18786
- let cond;
18787
- switch (dataType2) {
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
- return (0, codegen_12._)`${data} ${EQ} null`;
18778
+ gen.elseIf((0, codegen_1$w._)`${data} === "" || ${data} === 0 || ${data} === false`);
18779
+ gen.assign(coerced, null);
18780
+ return;
18790
18781
  case "array":
18791
- cond = (0, codegen_12._)`Array.isArray(${data})`;
18792
- break;
18793
- case "object":
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
- })(dataType);
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 baseId2 = baseIds[parentJsonPtr];
19436
+ let innerBaseId = baseIds[parentJsonPtr];
19432
19437
  if (typeof sch[schemaId] == "string")
19433
- baseId2 = addRef.call(this, sch[schemaId]);
19438
+ innerBaseId = addRef.call(this, sch[schemaId]);
19434
19439
  addAnchor.call(this, sch.$anchor);
19435
19440
  addAnchor.call(this, sch.$dynamicAnchor);
19436
- baseIds[jsonPtr] = baseId2;
19441
+ baseIds[jsonPtr] = innerBaseId;
19437
19442
  function addRef(ref2) {
19438
19443
  const _resolve = this.opts.uriResolver.resolve;
19439
- ref2 = normalizeId(baseId2 ? _resolve(baseId2, ref2) : ref2);
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 rules_1 = rules;
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, rules_1.getRules)();
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
- (function(exports) {
23608
- Object.defineProperty(exports, "__esModule", { value: true });
23609
- exports.DiscrError = void 0;
23610
- (function(DiscrError) {
23611
- DiscrError["Tag"] = "tag";
23612
- DiscrError["Mapping"] = "mapping";
23613
- })(exports.DiscrError || (exports.DiscrError = {}));
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.3",
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.3"}`;
28616
+ return `RebillyInstruments Ver.${"9.38.5"}`;
28610
28617
  }
28611
28618
  on(eventName, callback) {
28612
28619
  on({ eventName, callback });