oxlint 1.76.0 → 1.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lint.js CHANGED
@@ -9,7 +9,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
9
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
10
  });
11
11
  return to;
12
- }, __toESM = (mod, isNodeMode, target) => (target = mod == null ? {} : __create(__getProtoOf(mod)), __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
12
+ }, __toESM = (mod, isNodeMode, target) => (target = mod == null ? {} : __create(__getProtoOf(mod)), __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
13
13
  value: mod,
14
14
  enumerable: !0
15
15
  }) : target, mod)), __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -329,7 +329,7 @@ var keys_default = freeze({
329
329
  });
330
330
  //#endregion
331
331
  //#region src-js/plugins/location.ts
332
- const ObjectDefineProperty$4 = Object.defineProperty, ArrayIsArray$6 = Array.isArray, LINE_BREAK_PATTERN = /\r\n|[\r\n\u2028\u2029]/gu, lines = [], lineStartIndices = [0], cachedLocations = [];
332
+ const ObjectDefineProperty$4 = Object.defineProperty, ArrayIsArray$5 = Array.isArray, LINE_BREAK_PATTERN = /\r\n|[\r\n\u2028\u2029]/gu, lines = [], lineStartIndices = [0], cachedLocations = [];
333
333
  let activeLocationsCount = 0;
334
334
  /**
335
335
  * Split source text into lines.
@@ -486,7 +486,7 @@ function traverse(node) {
486
486
  let keys = keys_default[node.type];
487
487
  for (let keyIndex = 0, keysLen = keys.length; keyIndex < keysLen; keyIndex++) {
488
488
  let child = node[keys[keyIndex]];
489
- if (ArrayIsArray$6(child)) for (let arrIndex = 0, arrLen = child.length; arrIndex < arrLen; arrIndex++) {
489
+ if (ArrayIsArray$5(child)) for (let arrIndex = 0, arrLen = child.length; arrIndex < arrLen; arrIndex++) {
490
490
  let entry = child[arrIndex];
491
491
  if (entry !== null) {
492
492
  if (entry.start > index) break;
@@ -1771,9 +1771,11 @@ function deserializeStatement(pos) {
1771
1771
  case 64: return deserializeBoxImportDeclaration(pos + 8);
1772
1772
  case 65: return deserializeBoxExportAllDeclaration(pos + 8);
1773
1773
  case 66: return deserializeBoxExportDefaultDeclaration(pos + 8);
1774
- case 67: return deserializeBoxExportNamedDeclaration(pos + 8);
1775
- case 68: return deserializeBoxTSExportAssignment(pos + 8);
1776
- case 69: return deserializeBoxTSNamespaceExportDeclaration(pos + 8);
1774
+ case 67: return deserializeBoxExportDeclaration(pos + 8);
1775
+ case 68: return deserializeBoxExportNamedDeclaration(pos + 8);
1776
+ case 69: return deserializeBoxExportFromDeclaration(pos + 8);
1777
+ case 70: return deserializeBoxTSExportAssignment(pos + 8);
1778
+ case 71: return deserializeBoxTSNamespaceExportDeclaration(pos + 8);
1777
1779
  default: throw Error(`Unexpected discriminant ${uint8[pos]} for Statement`);
1778
1780
  }
1779
1781
  }
@@ -2412,12 +2414,62 @@ function deserializeFunctionBody(pos) {
2412
2414
  }, body = deserializeVecDirective(pos + 16);
2413
2415
  return body.push(...deserializeVecStatement(pos + 40)), node.body = body, parent = previousParent, node;
2414
2416
  }
2417
+ function deserializeArrowFunctionBody(pos) {
2418
+ switch (uint8[pos]) {
2419
+ case 0: return deserializeBoxBooleanLiteral(pos + 8);
2420
+ case 1: return deserializeBoxNullLiteral(pos + 8);
2421
+ case 2: return deserializeBoxNumericLiteral(pos + 8);
2422
+ case 3: return deserializeBoxBigIntLiteral(pos + 8);
2423
+ case 4: return deserializeBoxRegExpLiteral(pos + 8);
2424
+ case 5: return deserializeBoxStringLiteral(pos + 8);
2425
+ case 6: return deserializeBoxTemplateLiteral(pos + 8);
2426
+ case 7: return deserializeBoxIdentifierReference(pos + 8);
2427
+ case 8: return deserializeBoxSuper(pos + 8);
2428
+ case 9: return deserializeBoxArrayExpression(pos + 8);
2429
+ case 10: return deserializeBoxArrowFunctionExpression(pos + 8);
2430
+ case 11: return deserializeBoxAssignmentExpression(pos + 8);
2431
+ case 12: return deserializeBoxAwaitExpression(pos + 8);
2432
+ case 13: return deserializeBoxBinaryExpression(pos + 8);
2433
+ case 14: return deserializeBoxCallExpression(pos + 8);
2434
+ case 15: return deserializeBoxChainExpression(pos + 8);
2435
+ case 16: return deserializeBoxClass(pos + 8);
2436
+ case 17: return deserializeBoxConditionalExpression(pos + 8);
2437
+ case 18: return deserializeBoxFunction(pos + 8);
2438
+ case 19: return deserializeBoxImportExpression(pos + 8);
2439
+ case 20: return deserializeBoxLogicalExpression(pos + 8);
2440
+ case 21: return deserializeBoxNewExpression(pos + 8);
2441
+ case 22: return deserializeBoxObjectExpression(pos + 8);
2442
+ case 23: return deserializeBoxParenthesizedExpression(pos + 8);
2443
+ case 24: return deserializeBoxSequenceExpression(pos + 8);
2444
+ case 25: return deserializeBoxTaggedTemplateExpression(pos + 8);
2445
+ case 26: return deserializeBoxThisExpression(pos + 8);
2446
+ case 27: return deserializeBoxUnaryExpression(pos + 8);
2447
+ case 28: return deserializeBoxUpdateExpression(pos + 8);
2448
+ case 29: return deserializeBoxYieldExpression(pos + 8);
2449
+ case 30: return deserializeBoxPrivateInExpression(pos + 8);
2450
+ case 31: return deserializeBoxImportMeta(pos + 8);
2451
+ case 32: return deserializeBoxNewTarget(pos + 8);
2452
+ case 33: return deserializeBoxJSXElement(pos + 8);
2453
+ case 34: return deserializeBoxJSXFragment(pos + 8);
2454
+ case 35: return deserializeBoxTSAsExpression(pos + 8);
2455
+ case 36: return deserializeBoxTSSatisfiesExpression(pos + 8);
2456
+ case 37: return deserializeBoxTSTypeAssertion(pos + 8);
2457
+ case 38: return deserializeBoxTSNonNullExpression(pos + 8);
2458
+ case 39: return deserializeBoxTSInstantiationExpression(pos + 8);
2459
+ case 40: return deserializeBoxV8IntrinsicExpression(pos + 8);
2460
+ case 48: return deserializeBoxComputedMemberExpression(pos + 8);
2461
+ case 49: return deserializeBoxStaticMemberExpression(pos + 8);
2462
+ case 50: return deserializeBoxPrivateFieldExpression(pos + 8);
2463
+ case 64: return deserializeBoxFunctionBody(pos + 8);
2464
+ default: throw Error(`Unexpected discriminant ${uint8[pos]} for ArrowFunctionBody`);
2465
+ }
2466
+ }
2415
2467
  function deserializeArrowFunctionExpression(pos) {
2416
- let expression = deserializeBool(pos + 48), start, end, previousParent = parent, node = parent = {
2468
+ let start, end, previousParent = parent, node = parent = {
2417
2469
  __proto__: NodeProto,
2418
2470
  type: "ArrowFunctionExpression",
2419
- expression,
2420
- async: deserializeBool(pos + 49),
2471
+ expression: uint8[pos + 40] !== 64,
2472
+ async: deserializeBool(pos + 56),
2421
2473
  typeParameters: null,
2422
2474
  params: null,
2423
2475
  returnType: null,
@@ -2428,8 +2480,8 @@ function deserializeArrowFunctionExpression(pos) {
2428
2480
  end: end = deserializeI32(pos + 4),
2429
2481
  range: [start, end],
2430
2482
  parent
2431
- }, body = deserializeBoxFunctionBody(pos + 40);
2432
- return expression === !0 && (body = body.body[0].expression, body.parent = parent), node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16), node.params = deserializeBoxFormalParameters(pos + 24), node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32), node.body = body, parent = previousParent, node;
2483
+ };
2484
+ return node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16), node.params = deserializeBoxFormalParameters(pos + 24), node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32), node.body = deserializeArrowFunctionBody(pos + 40), parent = previousParent, node;
2433
2485
  }
2434
2486
  function deserializeYieldExpression(pos) {
2435
2487
  let start, end, previousParent = parent, node = parent = {
@@ -2721,7 +2773,39 @@ function deserializeImportAttributeKey(pos) {
2721
2773
  default: throw Error(`Unexpected discriminant ${uint8[pos]} for ImportAttributeKey`);
2722
2774
  }
2723
2775
  }
2776
+ function deserializeExportDeclaration(pos) {
2777
+ let start, end, previousParent = parent, node = parent = {
2778
+ __proto__: NodeProto,
2779
+ type: "ExportNamedDeclaration",
2780
+ declaration: null,
2781
+ specifiers: [],
2782
+ source: null,
2783
+ exportKind: null,
2784
+ attributes: [],
2785
+ start: start = deserializeI32(pos),
2786
+ end: end = deserializeI32(pos + 4),
2787
+ range: [start, end],
2788
+ parent
2789
+ }, declaration = deserializeDeclaration(pos + 16);
2790
+ return node.declaration = declaration, node.exportKind = declaration.declare === !0 || declaration.type === "TSTypeAliasDeclaration" || declaration.type === "TSInterfaceDeclaration" ? "type" : "value", parent = previousParent, node;
2791
+ }
2724
2792
  function deserializeExportNamedDeclaration(pos) {
2793
+ let start, end, previousParent = parent, node = parent = {
2794
+ __proto__: NodeProto,
2795
+ type: "ExportNamedDeclaration",
2796
+ declaration: null,
2797
+ specifiers: null,
2798
+ source: null,
2799
+ exportKind: deserializeImportOrExportKind(pos + 12),
2800
+ attributes: [],
2801
+ start: start = deserializeI32(pos),
2802
+ end: end = deserializeI32(pos + 4),
2803
+ range: [start, end],
2804
+ parent
2805
+ };
2806
+ return node.specifiers = deserializeVecExportSpecifier(pos + 16), parent = previousParent, node;
2807
+ }
2808
+ function deserializeExportFromDeclaration(pos) {
2725
2809
  let start, end, previousParent = parent, node = parent = {
2726
2810
  __proto__: NodeProto,
2727
2811
  type: "ExportNamedDeclaration",
@@ -2734,8 +2818,8 @@ function deserializeExportNamedDeclaration(pos) {
2734
2818
  end: end = deserializeI32(pos + 4),
2735
2819
  range: [start, end],
2736
2820
  parent
2737
- }, withClause = deserializeOptionBoxWithClause(pos + 104);
2738
- return node.declaration = deserializeOptionDeclaration(pos + 16), node.specifiers = deserializeVecExportSpecifier(pos + 32), node.source = deserializeOptionStringLiteral(pos + 56), node.attributes = withClause === null ? [] : withClause.attributes, parent = previousParent, node;
2821
+ }, withClause = deserializeOptionBoxWithClause(pos + 88);
2822
+ return node.specifiers = deserializeVecExportSpecifier(pos + 16), node.source = deserializeStringLiteral(pos + 40), node.attributes = withClause === null ? [] : withClause.attributes, parent = previousParent, node;
2739
2823
  }
2740
2824
  function deserializeExportDefaultDeclaration(pos) {
2741
2825
  let start, end, previousParent = parent, node = parent = {
@@ -3967,7 +4051,7 @@ function deserializeTSIndexSignature(pos) {
3967
4051
  range: [start, end],
3968
4052
  parent
3969
4053
  };
3970
- return node.parameters = deserializeVecTSIndexSignatureName(pos + 16), node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 40), parent = previousParent, node;
4054
+ return node.parameters = [deserializeTSIndexSignatureName(pos + 16)], node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 56), parent = previousParent, node;
3971
4055
  }
3972
4056
  function deserializeTSCallSignatureDeclaration(pos) {
3973
4057
  let start, end, previousParent = parent, node = parent = {
@@ -5116,9 +5200,15 @@ function deserializeBoxExportAllDeclaration(pos) {
5116
5200
  function deserializeBoxExportDefaultDeclaration(pos) {
5117
5201
  return deserializeExportDefaultDeclaration(int32[pos >> 2]);
5118
5202
  }
5203
+ function deserializeBoxExportDeclaration(pos) {
5204
+ return deserializeExportDeclaration(int32[pos >> 2]);
5205
+ }
5119
5206
  function deserializeBoxExportNamedDeclaration(pos) {
5120
5207
  return deserializeExportNamedDeclaration(int32[pos >> 2]);
5121
5208
  }
5209
+ function deserializeBoxExportFromDeclaration(pos) {
5210
+ return deserializeExportFromDeclaration(int32[pos >> 2]);
5211
+ }
5122
5212
  function deserializeBoxTSExportAssignment(pos) {
5123
5213
  return deserializeTSExportAssignment(int32[pos >> 2]);
5124
5214
  }
@@ -5160,9 +5250,6 @@ function deserializeVecImportAttribute(pos) {
5160
5250
  for (; pos !== endPos;) arr.push(deserializeImportAttribute(pos)), pos += 120;
5161
5251
  return arr;
5162
5252
  }
5163
- function deserializeOptionDeclaration(pos) {
5164
- return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
5165
- }
5166
5253
  function deserializeVecExportSpecifier(pos) {
5167
5254
  let arr = [], pos32 = pos >> 2;
5168
5255
  pos = int32[pos32];
@@ -5170,9 +5257,6 @@ function deserializeVecExportSpecifier(pos) {
5170
5257
  for (; pos !== endPos;) arr.push(deserializeExportSpecifier(pos)), pos += 128;
5171
5258
  return arr;
5172
5259
  }
5173
- function deserializeOptionStringLiteral(pos) {
5174
- return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
5175
- }
5176
5260
  function deserializeOptionModuleExportName(pos) {
5177
5261
  return uint8[pos] === 255 ? null : deserializeModuleExportName(pos);
5178
5262
  }
@@ -5415,13 +5499,6 @@ function deserializeBoxTSConstructSignatureDeclaration(pos) {
5415
5499
  function deserializeBoxTSMethodSignature(pos) {
5416
5500
  return deserializeTSMethodSignature(int32[pos >> 2]);
5417
5501
  }
5418
- function deserializeVecTSIndexSignatureName(pos) {
5419
- let arr = [], pos32 = pos >> 2;
5420
- pos = int32[pos32];
5421
- let endPos = pos + int32[pos32 + 2] * 40;
5422
- for (; pos !== endPos;) arr.push(deserializeTSIndexSignatureName(pos)), pos += 40;
5423
- return arr;
5424
- }
5425
5502
  function deserializeOptionTSModuleDeclarationBody(pos) {
5426
5503
  return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
5427
5504
  }
@@ -11743,9 +11820,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
11743
11820
  case types_1.AST_NODE_TYPES.TSParameterProperty:
11744
11821
  this.visitFunctionParameterTypeAnnotation(node.parameter);
11745
11822
  break;
11746
- default:
11747
- this.visitType(node.typeAnnotation);
11748
- break;
11823
+ default: this.visitType(node.typeAnnotation);
11749
11824
  }
11750
11825
  }
11751
11826
  visitJSXElement(node) {
@@ -12793,12 +12868,12 @@ function addGlobals() {
12793
12868
  }
12794
12869
  globalScope.through = globalScope.through.filter((ref) => {
12795
12870
  let { name } = ref.identifier, variable = globalScope.set.get(name);
12796
- return variable ? (ref.resolved = variable, variable.references.push(ref), !1) : !0;
12871
+ return !variable || (ref.resolved = variable, variable.references.push(ref), !1);
12797
12872
  });
12798
12873
  let { implicit } = globalScope;
12799
12874
  implicit.variables = implicit.variables.filter((variable) => {
12800
12875
  let { name } = variable;
12801
- return globalScope.set.has(name) ? (implicit.set.delete(name), !1) : !0;
12876
+ return !globalScope.set.has(name) || (implicit.set.delete(name), !1);
12802
12877
  }), implicit.leftToBeResolved = implicit.leftToBeResolved.filter((ref) => !globalScope.set.has(ref.identifier.name));
12803
12878
  }
12804
12879
  /**
@@ -14174,7 +14249,7 @@ function resetSettings() {
14174
14249
  }
14175
14250
  //#endregion
14176
14251
  //#region package.json
14177
- var version = "1.76.0";
14252
+ var version = "1.77.0";
14178
14253
  //#endregion
14179
14254
  //#region src-js/plugins/context.ts
14180
14255
  const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
@@ -14481,7 +14556,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14481
14556
  sets[0] = sets[0].slice(0, -1);
14482
14557
  for (var xl = sets.length - 1, x = 1; x < xl; ++x) sets[x] = sets[x].slice(1, -1);
14483
14558
  return sets[xl] = sets[xl].slice(1), sets.join("");
14484
- } else return sets[0];
14559
+ }
14560
+ return sets[0];
14485
14561
  }
14486
14562
  function subexp(str) {
14487
14563
  return "(?:" + str + ")";
@@ -14559,7 +14635,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14559
14635
  if (Array.isArray(arr)) {
14560
14636
  for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
14561
14637
  return arr2;
14562
- } else return Array.from(arr);
14638
+ }
14639
+ return Array.from(arr);
14563
14640
  }, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\0-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = {
14564
14641
  overflow: "Overflow: input needs wider integers to process",
14565
14642
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
@@ -14815,7 +14892,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14815
14892
  newHost = newFirst.join(":") + "::" + newLast.join(":");
14816
14893
  } else newHost = fields.join(":");
14817
14894
  return zone && (newHost += "%" + zone), newHost;
14818
- } else return host;
14895
+ }
14896
+ return host;
14819
14897
  }
14820
14898
  var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i, NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0;
14821
14899
  function parse(uriString) {
@@ -14823,7 +14901,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14823
14901
  options.reference === "suffix" && (uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString);
14824
14902
  var matches = uriString.match(URI_PARSE);
14825
14903
  if (matches) {
14826
- NO_MATCH_IS_UNDEFINED ? (components.scheme = matches[1], components.userinfo = matches[3], components.host = matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = matches[7], components.fragment = matches[8], isNaN(components.port) && (components.port = matches[5])) : (components.scheme = matches[1] || void 0, components.userinfo = uriString.indexOf("@") === -1 ? void 0 : matches[3], components.host = uriString.indexOf("//") === -1 ? void 0 : matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = uriString.indexOf("?") === -1 ? void 0 : matches[7], components.fragment = uriString.indexOf("#") === -1 ? void 0 : matches[8], isNaN(components.port) && (components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0)), components.host &&= _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol), components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0 ? components.reference = "same-document" : components.scheme === void 0 ? components.reference = "relative" : components.fragment === void 0 ? components.reference = "absolute" : components.reference = "uri", options.reference && options.reference !== "suffix" && options.reference !== components.reference && (components.error = components.error || "URI is not a " + options.reference + " reference.");
14904
+ NO_MATCH_IS_UNDEFINED ? (components.scheme = matches[1], components.userinfo = matches[3], components.host = matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = matches[7], components.fragment = matches[8], isNaN(components.port) && (components.port = matches[5])) : (components.scheme = matches[1] || void 0, components.userinfo = uriString.indexOf("@") === -1 ? void 0 : matches[3], components.host = uriString.indexOf("//") === -1 ? void 0 : matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = uriString.indexOf("?") === -1 ? void 0 : matches[7], components.fragment = uriString.indexOf("#") === -1 ? void 0 : matches[8], isNaN(components.port) && (components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0)), components.host &&= _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol), components.reference = components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0 ? "same-document" : components.scheme === void 0 ? "relative" : components.fragment === void 0 ? "absolute" : "uri", options.reference && options.reference !== "suffix" && options.reference !== components.reference && (components.error = components.error || "URI is not a " + options.reference + " reference.");
14827
14905
  var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
14828
14906
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
14829
14907
  if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) try {
@@ -14875,7 +14953,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14875
14953
  }
14876
14954
  function resolveComponents(base, relative) {
14877
14955
  var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, skipNormalization = arguments[3], target = {};
14878
- return skipNormalization || (base = parse(serialize(base, options), options), relative = parse(serialize(relative, options), options)), options ||= {}, !options.tolerant && relative.scheme ? (target.scheme = relative.scheme, target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0 ? (target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.path ? (relative.path.charAt(0) === "/" ? target.path = removeDotSegments(relative.path) : ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path ? target.path = "/" + relative.path : base.path ? target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path : target.path = relative.path, target.path = removeDotSegments(target.path)), target.query = relative.query) : (target.path = base.path, relative.query === void 0 ? target.query = base.query : target.query = relative.query), target.userinfo = base.userinfo, target.host = base.host, target.port = base.port), target.scheme = base.scheme), target.fragment = relative.fragment, target;
14956
+ return skipNormalization || (base = parse(serialize(base, options), options), relative = parse(serialize(relative, options), options)), options ||= {}, !options.tolerant && relative.scheme ? (target.scheme = relative.scheme, target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0 ? (target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.path ? (relative.path.charAt(0) === "/" ? target.path = removeDotSegments(relative.path) : (target.path = (base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path ? "/" + relative.path : base.path ? base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path : relative.path, target.path = removeDotSegments(target.path)), target.query = relative.query) : (target.path = base.path, target.query = relative.query === void 0 ? base.query : relative.query), target.userinfo = base.userinfo, target.host = base.host, target.port = base.port), target.scheme = base.scheme), target.fragment = relative.fragment, target;
14879
14957
  }
14880
14958
  function resolve(baseURI, relativeURI, options) {
14881
14959
  var schemelessOptions = assign({ scheme: "null" }, options);
@@ -14953,9 +15031,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14953
15031
  case "body":
14954
15032
  mailtoComponents.body = unescapeComponent(hfield[1], options);
14955
15033
  break;
14956
- default:
14957
- unknownHeaders = !0, headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
14958
- break;
15034
+ default: unknownHeaders = !0, headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
14959
15035
  }
14960
15036
  }
14961
15037
  unknownHeaders && (mailtoComponents.headers = headers);
@@ -15488,8 +15564,10 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15488
15564
  var $$outStack = $$outStack || [];
15489
15565
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'boolean schema is false' "), it.opts.verbose && (out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15490
15566
  var __err = out;
15491
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
15492
- } else it.isTop ? $async ? out += " return data; " : out += " validate.errors = null; return true; " : out += " var " + $valid + " = true; ";
15567
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
15568
+ /* istanbul ignore if */
15569
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
15570
+ } else it.isTop ? out += $async ? " return data; " : " validate.errors = null; return true; " : out += " var " + $valid + " = true; ";
15493
15571
  return it.isTop && (out += " }; return validate; "), out;
15494
15572
  }
15495
15573
  if (it.isTop) {
@@ -15522,21 +15600,25 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15522
15600
  if (arr1) for (var $type, $i = -1, l1 = arr1.length - 1; $i < l1;) $type = arr1[$i += 1], $type == "string" ? out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; " : $type == "number" || $type == "integer" ? (out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " ", $type == "integer" && (out += " && !(" + $data + " % 1)"), out += ")) " + $coerced + " = +" + $data + "; ") : $type == "boolean" ? out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; " : $type == "null" ? out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; " : it.opts.coerceTypes == "array" && $type == "array" && (out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; ");
15523
15601
  out += " else { ";
15524
15602
  var $$outStack = $$outStack || [];
15525
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", $typeIsArray ? out += "" + $typeSchema.join(",") : out += "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", $typeIsArray ? out += "" + $typeSchema.join(",") : out += "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15603
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15526
15604
  var __err = out;
15527
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } if (" + $coerced + " !== undefined) { ";
15605
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
15606
+ /* istanbul ignore if */
15607
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } if (" + $coerced + " !== undefined) { ";
15528
15608
  var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty";
15529
15609
  out += " " + $data + " = " + $coerced + "; ", $dataLvl || (out += "if (" + $parentData + " !== undefined)"), out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } ";
15530
15610
  } else {
15531
15611
  var $$outStack = $$outStack || [];
15532
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", $typeIsArray ? out += "" + $typeSchema.join(",") : out += "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", $typeIsArray ? out += "" + $typeSchema.join(",") : out += "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15612
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15533
15613
  var __err = out;
15534
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
15614
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
15615
+ /* istanbul ignore if */
15616
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
15535
15617
  }
15536
15618
  out += " } ";
15537
15619
  }
15538
15620
  }
15539
- if (it.schema.$ref && !$refKeywords) out += " " + it.RULES.all.$ref.code(it, "$ref") + " ", $breakOnError && (out += " } if (errors === ", $top ? out += "0" : out += "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
15621
+ if (it.schema.$ref && !$refKeywords) out += " " + it.RULES.all.$ref.code(it, "$ref") + " ", $breakOnError && (out += " } if (errors === ", out += $top ? "0" : "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
15540
15622
  else {
15541
15623
  var arr2 = it.RULES;
15542
15624
  if (arr2) {
@@ -15584,11 +15666,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15584
15666
  if ($breakOnError && (out += " " + $closingBraces1 + " ", $closingBraces1 = ""), $rulesGroup.type && (out += " } ", $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes)) {
15585
15667
  out += " else { ";
15586
15668
  var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $$outStack = $$outStack || [];
15587
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", $typeIsArray ? out += "" + $typeSchema.join(",") : out += "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", $typeIsArray ? out += "" + $typeSchema.join(",") : out += "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15669
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15588
15670
  var __err = out;
15589
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ";
15671
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
15672
+ /* istanbul ignore if */
15673
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ";
15590
15674
  }
15591
- $breakOnError && (out += " if (errors === ", $top ? out += "0" : out += "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
15675
+ $breakOnError && (out += " if (errors === ", out += $top ? "0" : "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
15592
15676
  }
15593
15677
  }
15594
15678
  }
@@ -15936,7 +16020,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15936
16020
  var $$outStack = $$outStack || [];
15937
16021
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '$ref' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { ref: '" + it.util.escapeQuotes($schema) + "' } ", it.opts.messages !== !1 && (out += " , message: 'can\\'t resolve reference " + it.util.escapeQuotes($schema) + "' "), it.opts.verbose && (out += " , schema: " + it.util.toQuotedString($schema) + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
15938
16022
  var __err = out;
15939
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $breakOnError && (out += " if (false) { ");
16023
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16024
+ /* istanbul ignore if */
16025
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $breakOnError && (out += " if (false) { ");
15940
16026
  } else if (it.opts.missingRefs == "ignore") it.logger.warn($message), $breakOnError && (out += " if (true) { ");
15941
16027
  else throw new it.MissingRefError(it.baseId, $schema, $message);
15942
16028
  } else if ($refVal.inline) {
@@ -15967,7 +16053,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15967
16053
  $it.level++;
15968
16054
  var $nextValid = "valid" + $it.level, $currentBaseId = $it.baseId, $allSchemasEmpty = !0, arr1 = $schema;
15969
16055
  if (arr1) for (var $sch, $i = -1, l1 = arr1.length - 1; $i < l1;) $sch = arr1[$i += 1], (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) && ($allSchemasEmpty = !1, $it.schema = $sch, $it.schemaPath = $schemaPath + "[" + $i + "]", $it.errSchemaPath = $errSchemaPath + "/" + $i, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, $breakOnError && (out += " if (" + $nextValid + ") { ", $closingBraces += "}"));
15970
- return $breakOnError && ($allSchemasEmpty ? out += " if (true) { " : out += " " + $closingBraces.slice(0, -1) + " "), out;
16056
+ return $breakOnError && (out += $allSchemasEmpty ? " if (true) { " : " " + $closingBraces.slice(0, -1) + " "), out;
15971
16057
  };
15972
16058
  })), require_anyOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15973
16059
  module.exports = function generate_anyOf(it, $keyword, $ruleType) {
@@ -15983,7 +16069,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15983
16069
  it.compositeRule = $it.compositeRule = !0;
15984
16070
  var arr1 = $schema;
15985
16071
  if (arr1) for (var $sch, $i = -1, l1 = arr1.length - 1; $i < l1;) $sch = arr1[$i += 1], $it.schema = $sch, $it.schemaPath = $schemaPath + "[" + $i + "]", $it.errSchemaPath = $errSchemaPath + "/" + $i, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { ", $closingBraces += "}";
15986
- it.compositeRule = $it.compositeRule = $wasComposite, out += " " + $closingBraces + " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should match some schema in anyOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError && (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.opts.allErrors && (out += " } ");
16072
+ it.compositeRule = $it.compositeRule = $wasComposite, out += " " + $closingBraces + " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should match some schema in anyOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
16073
+ /* istanbul ignore if */
16074
+ (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.opts.allErrors && (out += " } ");
15987
16075
  } else $breakOnError && (out += " if (true) { ");
15988
16076
  return out;
15989
16077
  };
@@ -16001,7 +16089,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16001
16089
  var $$outStack = $$outStack || [];
16002
16090
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } ", it.opts.messages !== !1 && (out += " , message: 'should be equal to constant' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16003
16091
  var __err = out;
16004
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " }", $breakOnError && (out += " else { "), out;
16092
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16093
+ /* istanbul ignore if */
16094
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " }", $breakOnError && (out += " else { "), out;
16005
16095
  };
16006
16096
  })), require_contains = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16007
16097
  module.exports = function generate_contains(it, $keyword, $ruleType) {
@@ -16019,7 +16109,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16019
16109
  var $$outStack = $$outStack || [];
16020
16110
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should contain a valid item' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16021
16111
  var __err = out;
16022
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ", $nonEmptySchema && (out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "), it.opts.allErrors && (out += " } "), out;
16112
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16113
+ /* istanbul ignore if */
16114
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ", $nonEmptySchema && (out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "), it.opts.allErrors && (out += " } "), out;
16023
16115
  };
16024
16116
  })), require_dependencies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16025
16117
  module.exports = function generate_dependencies(it, $keyword, $ruleType) {
@@ -16047,7 +16139,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16047
16139
  var $$outStack = $$outStack || [];
16048
16140
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } ", it.opts.messages !== !1 && (out += " , message: 'should have ", $deps.length == 1 ? out += "property " + it.util.escapeQuotes($deps[0]) : out += "properties " + it.util.escapeQuotes($deps.join(", ")), out += " when property " + it.util.escapeQuotes($property) + " is present' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16049
16141
  var __err = out;
16050
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
16142
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16143
+ /* istanbul ignore if */
16144
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
16051
16145
  } else {
16052
16146
  out += " ) { ";
16053
16147
  var arr2 = $deps;
@@ -16076,7 +16170,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16076
16170
  var $$outStack = $$outStack || [];
16077
16171
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } ", it.opts.messages !== !1 && (out += " , message: 'should be equal to one of the allowed values' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16078
16172
  var __err = out;
16079
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " }", $breakOnError && (out += " else { "), out;
16173
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16174
+ /* istanbul ignore if */
16175
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " }", $breakOnError && (out += " else { "), out;
16080
16176
  };
16081
16177
  })), require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16082
16178
  module.exports = function generate_format(it, $keyword, $ruleType) {
@@ -16108,13 +16204,15 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16108
16204
  } else {
16109
16205
  out += " if (! ";
16110
16206
  var $formatRef = "formats" + it.util.getProperty($schema);
16111
- $isObject && ($formatRef += ".validate"), typeof $format == "function" ? out += " " + $formatRef + "(" + $data + ") " : out += " " + $formatRef + ".test(" + $data + ") ", out += ") { ";
16207
+ $isObject && ($formatRef += ".validate"), out += typeof $format == "function" ? " " + $formatRef + "(" + $data + ") " : " " + $formatRef + ".test(" + $data + ") ", out += ") { ";
16112
16208
  }
16113
16209
  }
16114
16210
  var $$outStack = $$outStack || [];
16115
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: ", $isData ? out += "" + $schemaValue : out += "" + it.util.toQuotedString($schema), out += " } ", it.opts.messages !== !1 && (out += " , message: 'should match format \"", $isData ? out += "' + " + $schemaValue + " + '" : out += "" + it.util.escapeQuotes($schema), out += "\"' "), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + it.util.toQuotedString($schema), out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16211
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: ", out += $isData ? "" + $schemaValue : "" + it.util.toQuotedString($schema), out += " } ", it.opts.messages !== !1 && (out += " , message: 'should match format \"", out += $isData ? "' + " + $schemaValue + " + '" : "" + it.util.escapeQuotes($schema), out += "\"' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + it.util.toQuotedString($schema), out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16116
16212
  var __err = out;
16117
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { "), out;
16213
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16214
+ /* istanbul ignore if */
16215
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { "), out;
16118
16216
  };
16119
16217
  })), require_if = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16120
16218
  module.exports = function generate_if(it, $keyword, $ruleType) {
@@ -16125,7 +16223,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16125
16223
  var $ifClause;
16126
16224
  $it.createErrors = !1, $it.schema = $schema, $it.schemaPath = $schemaPath, $it.errSchemaPath = $errSchemaPath, out += " var " + $errs + " = errors; var " + $valid + " = true; ";
16127
16225
  var $wasComposite = it.compositeRule;
16128
- it.compositeRule = $it.compositeRule = !0, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, $it.createErrors = !0, out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.compositeRule = $it.compositeRule = $wasComposite, $thenPresent ? (out += " if (" + $nextValid + ") { ", $it.schema = it.schema.then, $it.schemaPath = it.schemaPath + ".then", $it.errSchemaPath = it.errSchemaPath + "/then", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'then'; ") : $ifClause = "'then'", out += " } ", $elsePresent && (out += " else { ")) : out += " if (!" + $nextValid + ") { ", $elsePresent && ($it.schema = it.schema.else, $it.schemaPath = it.schemaPath + ".else", $it.errSchemaPath = it.errSchemaPath + "/else", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'else'; ") : $ifClause = "'else'", out += " } "), out += " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } ", it.opts.messages !== !1 && (out += " , message: 'should match \"' + " + $ifClause + " + '\" schema' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError && (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += " } ", $breakOnError && (out += " else { ");
16226
+ it.compositeRule = $it.compositeRule = !0, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, $it.createErrors = !0, out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.compositeRule = $it.compositeRule = $wasComposite, $thenPresent ? (out += " if (" + $nextValid + ") { ", $it.schema = it.schema.then, $it.schemaPath = it.schemaPath + ".then", $it.errSchemaPath = it.errSchemaPath + "/then", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'then'; ") : $ifClause = "'then'", out += " } ", $elsePresent && (out += " else { ")) : out += " if (!" + $nextValid + ") { ", $elsePresent && ($it.schema = it.schema.else, $it.schemaPath = it.schemaPath + ".else", $it.errSchemaPath = it.errSchemaPath + "/else", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'else'; ") : $ifClause = "'else'", out += " } "), out += " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } ", it.opts.messages !== !1 && (out += " , message: 'should match \"' + " + $ifClause + " + '\" schema' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
16227
+ /* istanbul ignore if */
16228
+ (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += " } ", $breakOnError && (out += " else { ");
16129
16229
  } else $breakOnError && (out += " if (true) { ");
16130
16230
  return out;
16131
16231
  };
@@ -16143,7 +16243,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16143
16243
  var $$outStack = $$outStack || [];
16144
16244
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have more than " + $schema.length + " items' "), it.opts.verbose && (out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16145
16245
  var __err = out;
16146
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $errSchemaPath = $currErrSchemaPath, $breakOnError && ($closingBraces += "}", out += " else { ");
16246
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16247
+ /* istanbul ignore if */
16248
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $errSchemaPath = $currErrSchemaPath, $breakOnError && ($closingBraces += "}", out += " else { ");
16147
16249
  }
16148
16250
  var arr1 = $schema;
16149
16251
  if (arr1) {
@@ -16184,7 +16286,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16184
16286
  var $errorKeyword = $exclusiveKeyword, $$outStack = $$outStack || [];
16185
16287
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: '" + $exclusiveKeyword + " should be boolean' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16186
16288
  var __err = out;
16187
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; ", $schema === void 0 && ($errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaValueExcl, $isData = $isDataExcl);
16289
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16290
+ /* istanbul ignore if */
16291
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; ", $schema === void 0 && ($errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaValueExcl, $isData = $isDataExcl);
16188
16292
  } else {
16189
16293
  var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op;
16190
16294
  if ($exclIsNumber && $isData) {
@@ -16198,9 +16302,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16198
16302
  }
16199
16303
  $errorKeyword ||= $keyword;
16200
16304
  var $$outStack = $$outStack || [];
16201
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } ", it.opts.messages !== !1 && (out += " , message: 'should be " + $opStr + " ", $isData ? out += "' + " + $schemaValue : out += "" + $schemaValue + "'"), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16305
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } ", it.opts.messages !== !1 && (out += " , message: 'should be " + $opStr + " ", out += $isData ? "' + " + $schemaValue : "" + $schemaValue + "'"), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16202
16306
  var __err = out;
16203
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { "), out;
16307
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16308
+ /* istanbul ignore if */
16309
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { "), out;
16204
16310
  };
16205
16311
  })), require__limitItems = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16206
16312
  module.exports = function generate__limitItems(it, $keyword, $ruleType) {
@@ -16209,9 +16315,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16209
16315
  var $op = $keyword == "maxItems" ? ">" : "<";
16210
16316
  out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $data + ".length " + $op + " " + $schemaValue + ") { ";
16211
16317
  var $errorKeyword = $keyword, $$outStack = $$outStack || [];
16212
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", $keyword == "maxItems" ? out += "more" : out += "fewer", out += " than ", $isData ? out += "' + " + $schemaValue + " + '" : out += "" + $schema, out += " items' "), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16318
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", out += $keyword == "maxItems" ? "more" : "fewer", out += " than ", out += $isData ? "' + " + $schemaValue + " + '" : "" + $schema, out += " items' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16213
16319
  var __err = out;
16214
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16320
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16321
+ /* istanbul ignore if */
16322
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16215
16323
  };
16216
16324
  })), require__limitLength = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16217
16325
  module.exports = function generate__limitLength(it, $keyword, $ruleType) {
@@ -16220,9 +16328,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16220
16328
  var $op = $keyword == "maxLength" ? ">" : "<";
16221
16329
  out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), it.opts.unicode === !1 ? out += " " + $data + ".length " : out += " ucs2length(" + $data + ") ", out += " " + $op + " " + $schemaValue + ") { ";
16222
16330
  var $errorKeyword = $keyword, $$outStack = $$outStack || [];
16223
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT be ", $keyword == "maxLength" ? out += "longer" : out += "shorter", out += " than ", $isData ? out += "' + " + $schemaValue + " + '" : out += "" + $schema, out += " characters' "), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16331
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT be ", out += $keyword == "maxLength" ? "longer" : "shorter", out += " than ", out += $isData ? "' + " + $schemaValue + " + '" : "" + $schema, out += " characters' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16224
16332
  var __err = out;
16225
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16333
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16334
+ /* istanbul ignore if */
16335
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16226
16336
  };
16227
16337
  })), require__limitProperties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16228
16338
  module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
@@ -16231,9 +16341,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16231
16341
  var $op = $keyword == "maxProperties" ? ">" : "<";
16232
16342
  out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { ";
16233
16343
  var $errorKeyword = $keyword, $$outStack = $$outStack || [];
16234
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", $keyword == "maxProperties" ? out += "more" : out += "fewer", out += " than ", $isData ? out += "' + " + $schemaValue + " + '" : out += "" + $schema, out += " properties' "), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16344
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", out += $keyword == "maxProperties" ? "more" : "fewer", out += " than ", out += $isData ? "' + " + $schemaValue + " + '" : "" + $schema, out += " properties' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16235
16345
  var __err = out;
16236
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16346
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16347
+ /* istanbul ignore if */
16348
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16237
16349
  };
16238
16350
  })), require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16239
16351
  module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
@@ -16241,9 +16353,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16241
16353
  if ($isData ? (out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; ", $schemaValue = "schema" + $lvl) : $schemaValue = $schema, !($isData || typeof $schema == "number")) throw Error($keyword + " must be number");
16242
16354
  out += "var division" + $lvl + ";if (", $isData && (out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "), out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", ", it.opts.multipleOfPrecision ? out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " " : out += " division" + $lvl + " !== parseInt(division" + $lvl + ") ", out += " ) ", $isData && (out += " ) "), out += " ) { ";
16243
16355
  var $$outStack = $$outStack || [];
16244
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should be multiple of ", $isData ? out += "' + " + $schemaValue : out += "" + $schemaValue + "'"), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16356
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should be multiple of ", out += $isData ? "' + " + $schemaValue : "" + $schemaValue + "'"), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16245
16357
  var __err = out;
16246
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16358
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16359
+ /* istanbul ignore if */
16360
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16247
16361
  };
16248
16362
  })), require_not = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16249
16363
  module.exports = function generate_not(it, $keyword, $ruleType) {
@@ -16259,7 +16373,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16259
16373
  var $$outStack = $$outStack || [];
16260
16374
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should NOT be valid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16261
16375
  var __err = out;
16262
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.opts.allErrors && (out += " } ");
16376
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16377
+ /* istanbul ignore if */
16378
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.opts.allErrors && (out += " } ");
16263
16379
  } else out += " var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should NOT be valid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $breakOnError && (out += " if (false) { ");
16264
16380
  return out;
16265
16381
  };
@@ -16273,7 +16389,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16273
16389
  it.compositeRule = $it.compositeRule = !0;
16274
16390
  var arr1 = $schema;
16275
16391
  if (arr1) for (var $sch, $i = -1, l1 = arr1.length - 1; $i < l1;) $sch = arr1[$i += 1], (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) ? ($it.schema = $sch, $it.schemaPath = $schemaPath + "[" + $i + "]", $it.errSchemaPath = $errSchemaPath + "/" + $i, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId) : out += " var " + $nextValid + " = true; ", $i && (out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { ", $closingBraces += "}"), out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }";
16276
- return it.compositeRule = $it.compositeRule = $wasComposite, out += "" + $closingBraces + "if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } ", it.opts.messages !== !1 && (out += " , message: 'should match exactly one schema in oneOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError && (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }", it.opts.allErrors && (out += " } "), out;
16392
+ return it.compositeRule = $it.compositeRule = $wasComposite, out += "" + $closingBraces + "if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } ", it.opts.messages !== !1 && (out += " , message: 'should match exactly one schema in oneOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
16393
+ /* istanbul ignore if */
16394
+ (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }", it.opts.allErrors && (out += " } "), out;
16277
16395
  };
16278
16396
  })), require_pattern = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16279
16397
  module.exports = function generate_pattern(it, $keyword, $ruleType) {
@@ -16286,9 +16404,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16286
16404
  out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "), out += " !" + $regexp + ".test(" + $data + ") ) {";
16287
16405
  }
16288
16406
  var $$outStack = $$outStack || [];
16289
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: ", $isData ? out += "" + $schemaValue : out += "" + it.util.toQuotedString($schema), out += " } ", it.opts.messages !== !1 && (out += " , message: 'should match pattern \"", $isData ? out += "' + " + $schemaValue + " + '" : out += "" + it.util.escapeQuotes($schema), out += "\"' "), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + it.util.toQuotedString($schema), out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16407
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: ", out += $isData ? "" + $schemaValue : "" + it.util.toQuotedString($schema), out += " } ", it.opts.messages !== !1 && (out += " , message: 'should match pattern \"", out += $isData ? "' + " + $schemaValue + " + '" : "" + it.util.escapeQuotes($schema), out += "\"' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + it.util.toQuotedString($schema), out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16290
16408
  var __err = out;
16291
- return out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16409
+ return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16410
+ /* istanbul ignore if */
16411
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
16292
16412
  };
16293
16413
  })), require_properties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16294
16414
  module.exports = function generate_properties(it, $keyword, $ruleType) {
@@ -16300,7 +16420,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16300
16420
  return p !== "__proto__";
16301
16421
  }
16302
16422
  if (out += "var " + $errs + " = errors;var " + $nextValid + " = true;", $ownProperties && (out += " var " + $dataProperties + " = undefined;"), $checkAdditional) {
16303
- if ($ownProperties ? out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : out += " for (var " + $key + " in " + $data + ") { ", $someProperties) {
16423
+ if (out += $ownProperties ? " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : " for (var " + $key + " in " + $data + ") { ", $someProperties) {
16304
16424
  if (out += " var isAdditional" + $lvl + " = !(false ", $schemaKeys.length) if ($schemaKeys.length > 8) out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") ";
16305
16425
  else {
16306
16426
  var arr1 = $schemaKeys;
@@ -16323,7 +16443,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16323
16443
  var $$outStack = $$outStack || [];
16324
16444
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is an invalid additional property" : out += "should NOT have additional properties", out += "' "), it.opts.verbose && (out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16325
16445
  var __err = out;
16326
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $errSchemaPath = $currErrSchemaPath, $breakOnError && (out += " break; ");
16446
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16447
+ /* istanbul ignore if */
16448
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $errSchemaPath = $currErrSchemaPath, $breakOnError && (out += " break; ");
16327
16449
  }
16328
16450
  else if ($additionalIsSchema) if ($removeAdditional == "failing") {
16329
16451
  out += " var " + $errs + " = errors; ";
@@ -16370,7 +16492,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16370
16492
  var $$outStack = $$outStack || [];
16371
16493
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16372
16494
  var __err = out;
16373
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $errSchemaPath = $currErrSchemaPath, it.errorPath = $currentErrorPath, out += " } else { ";
16495
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16496
+ /* istanbul ignore if */
16497
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $errSchemaPath = $currErrSchemaPath, it.errorPath = $currentErrorPath, out += " } else { ";
16374
16498
  } else $breakOnError ? (out += " if ( " + $useData + " === undefined ", $ownProperties && (out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "), out += ") { " + $nextValid + " = true; } else { ") : (out += " if (" + $useData + " !== undefined ", $ownProperties && (out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "), out += " ) { ");
16375
16499
  out += " " + $code + " } ";
16376
16500
  }
@@ -16384,7 +16508,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16384
16508
  $pProperty = arr4[i4 += 1];
16385
16509
  var $sch = $pProperties[$pProperty];
16386
16510
  if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) {
16387
- $it.schema = $sch, $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty), $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty), $ownProperties ? out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : out += " for (var " + $key + " in " + $data + ") { ", out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { ", $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
16511
+ $it.schema = $sch, $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty), $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty), out += $ownProperties ? " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : " for (var " + $key + " in " + $data + ") { ", out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { ", $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
16388
16512
  var $passData = $data + "[" + $key + "]";
16389
16513
  $it.dataPathArr[$dataNxt] = $key;
16390
16514
  var $code = it.validate($it);
@@ -16402,11 +16526,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16402
16526
  if (out += "var " + $errs + " = errors;", it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === !1 : it.util.schemaHasRules($schema, it.RULES.all)) {
16403
16527
  $it.schema = $schema, $it.schemaPath = $schemaPath, $it.errSchemaPath = $errSchemaPath;
16404
16528
  var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $nextData = "data" + ($it.dataLevel = it.dataLevel + 1), $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId;
16405
- $ownProperties && (out += " var " + $dataProperties + " = undefined; "), $ownProperties ? out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : out += " for (var " + $key + " in " + $data + ") { ", out += " var startErrs" + $lvl + " = errors; ";
16529
+ $ownProperties && (out += " var " + $dataProperties + " = undefined; "), out += $ownProperties ? " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : " for (var " + $key + " in " + $data + ") { ", out += " var startErrs" + $lvl + " = errors; ";
16406
16530
  var $passData = $key, $wasComposite = it.compositeRule;
16407
16531
  it.compositeRule = $it.compositeRule = !0;
16408
16532
  var $code = it.validate($it);
16409
- $it.baseId = $currentBaseId, it.util.varOccurences($code, $nextData) < 2 ? out += " " + it.util.varReplace($code, $nextData, $passData) + " " : out += " var " + $nextData + " = " + $passData + "; " + $code + " ", it.compositeRule = $it.compositeRule = $wasComposite, out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + "<errors; " + $i + "++) { vErrors[" + $i + "].propertyName = " + $key + "; } var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'propertyNames' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { propertyName: '" + $invalidName + "' } ", it.opts.messages !== !1 && (out += " , message: 'property name \\'" + $invalidName + "\\' is invalid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError && (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), $breakOnError && (out += " break; "), out += " } }";
16533
+ $it.baseId = $currentBaseId, it.util.varOccurences($code, $nextData) < 2 ? out += " " + it.util.varReplace($code, $nextData, $passData) + " " : out += " var " + $nextData + " = " + $passData + "; " + $code + " ", it.compositeRule = $it.compositeRule = $wasComposite, out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + "<errors; " + $i + "++) { vErrors[" + $i + "].propertyName = " + $key + "; } var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'propertyNames' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { propertyName: '" + $invalidName + "' } ", it.opts.messages !== !1 && (out += " , message: 'property name \\'" + $invalidName + "\\' is invalid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
16534
+ /* istanbul ignore if */
16535
+ (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), $breakOnError && (out += " break; "), out += " } }";
16410
16536
  }
16411
16537
  return $breakOnError && (out += " " + $closingBraces + " if (" + $errs + " == errors) {"), out;
16412
16538
  };
@@ -16432,7 +16558,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16432
16558
  var $$outStack = $$outStack || [];
16433
16559
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16434
16560
  var __err = out;
16435
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
16561
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16562
+ /* istanbul ignore if */
16563
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
16436
16564
  } else {
16437
16565
  out += " if ( ";
16438
16566
  var arr2 = $required;
@@ -16447,7 +16575,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16447
16575
  var $$outStack = $$outStack || [];
16448
16576
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16449
16577
  var __err = out;
16450
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
16578
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16579
+ /* istanbul ignore if */
16580
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
16451
16581
  }
16452
16582
  else if ($loopRequired) {
16453
16583
  $isData || (out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; ");
@@ -16479,9 +16609,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16479
16609
  }
16480
16610
  out += " } ", $isData && (out += " } "), out += " if (!" + $valid + ") { ";
16481
16611
  var $$outStack = $$outStack || [];
16482
- $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "), it.opts.verbose && (out += " , schema: ", $isData ? out += "validate.schema" + $schemaPath : out += "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16612
+ $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16483
16613
  var __err = out;
16484
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { ");
16614
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16615
+ /* istanbul ignore if */
16616
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { ");
16485
16617
  } else $breakOnError && (out += " if (true) { ");
16486
16618
  return out;
16487
16619
  };
@@ -16739,15 +16871,19 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16739
16871
  }
16740
16872
  if ($rDef.modifying && (out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"), out += "" + $closingBraces, $rDef.valid) $breakOnError && (out += " if (true) { ");
16741
16873
  else {
16742
- out += " if ( ", $rDef.valid === void 0 ? (out += " !", $macro ? out += "" + $nextValid : out += "" + $valid) : out += " " + !$rDef.valid + " ", out += ") { ", $errorKeyword = $rule.keyword;
16874
+ out += " if ( ", $rDef.valid === void 0 ? (out += " !", out += $macro ? "" + $nextValid : "" + $valid) : out += " " + !$rDef.valid + " ", out += ") { ", $errorKeyword = $rule.keyword;
16743
16875
  var $$outStack = $$outStack || [];
16744
16876
  $$outStack.push(out), out = "";
16745
16877
  var $$outStack = $$outStack || [];
16746
16878
  $$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } ", it.opts.messages !== !1 && (out += " , message: 'should pass \"" + $rule.keyword + "\" keyword validation' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
16747
16879
  var __err = out;
16748
- out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
16880
+ out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
16881
+ /* istanbul ignore if */
16882
+ it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
16749
16883
  var def_customError = out;
16750
- out = $$outStack.pop(), $inline ? $rDef.errors ? $rDef.errors != "full" && (out += " for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } ") : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (" + $errs + " == errors) { " + def_customError + " } else { for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } ") : $macro ? (out += " var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } ", it.opts.messages !== !1 && (out += " , message: 'should pass \"" + $rule.keyword + "\" keyword validation' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError && (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; ")) : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (Array.isArray(" + $ruleErrs + ")) { if (vErrors === null) vErrors = " + $ruleErrs + "; else vErrors = vErrors.concat(" + $ruleErrs + "); errors = vErrors.length; for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } else { " + def_customError + " } "), out += " } ", $breakOnError && (out += " else { ");
16884
+ out = $$outStack.pop(), $inline ? $rDef.errors ? $rDef.errors != "full" && (out += " for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } ") : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (" + $errs + " == errors) { " + def_customError + " } else { for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } ") : $macro ? (out += " var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } ", it.opts.messages !== !1 && (out += " , message: 'should pass \"" + $rule.keyword + "\" keyword validation' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
16885
+ /* istanbul ignore if */
16886
+ (it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; ")) : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (Array.isArray(" + $ruleErrs + ")) { if (vErrors === null) vErrors = " + $ruleErrs + "; else vErrors = vErrors.concat(" + $ruleErrs + "); errors = vErrors.length; for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } else { " + def_customError + " } "), out += " } ", $breakOnError && (out += " else { ");
16751
16887
  }
16752
16888
  return out;
16753
16889
  };
@@ -17435,7 +17571,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17435
17571
  function switchWorkspace(workspaceUri) {
17436
17572
  if (currentWorkspaceUri === workspaceUri) return;
17437
17573
  let workspace = workspaces.get(workspaceUri);
17438
- setCwd(workspace.cwd), setRegisteredRules(workspace.rules), setAllOptions(workspace.allOptions), setCurrentWorkspace(workspace, workspaceUri);
17574
+ setCwd(workspace.cwd), setRegisteredRules(workspace.rules), setRegisteredPluginNames(workspace.pluginNames), setAllOptions(workspace.allOptions), setCurrentWorkspace(workspace, workspaceUri);
17439
17575
  }
17440
17576
  //#endregion
17441
17577
  //#region src-js/plugins/options.ts
@@ -17600,7 +17736,7 @@ function mergeValues(configValue, defaultValue) {
17600
17736
  //#endregion
17601
17737
  //#region src-js/plugins/load.ts
17602
17738
  const JSONStringify$1 = JSON.stringify, ObjectKeys$1 = Object.keys, ArrayIsArray$2 = Array.isArray, ObjectDefineProperty$2 = Object.defineProperty, JSONParse = JSON.parse;
17603
- let registeredRules = [];
17739
+ let registeredRules = [], registeredPluginNames = /* @__PURE__ */ new Set();
17604
17740
  /**
17605
17741
  * Set `registeredRules`. Used when switching workspaces.
17606
17742
  * @param rules - Array of `RuleDetails` objects
@@ -17608,6 +17744,13 @@ let registeredRules = [];
17608
17744
  function setRegisteredRules(rules) {
17609
17745
  registeredRules = rules;
17610
17746
  }
17747
+ /**
17748
+ * Set `registeredPluginNames`. Used when switching workspaces.
17749
+ * @param pluginNames - Set of registered plugin names
17750
+ */
17751
+ function setRegisteredPluginNames(pluginNames) {
17752
+ registeredPluginNames = pluginNames;
17753
+ }
17611
17754
  const neverRunBeforeHook = () => !1;
17612
17755
  /**
17613
17756
  * Load a plugin.
@@ -17637,11 +17780,12 @@ async function loadPlugin(url, pluginName, pluginNameIsAlias, workspaceUri) {
17637
17780
  * @param workspaceUri - Workspace URI (`null` in CLI, string in LSP)
17638
17781
  * @returns - Plugin details
17639
17782
  * @throws {Error} If `plugin.meta.name` is `null` / `undefined` and `packageName` not provided
17783
+ * @throws {Error} If another plugin with the same name is already registered
17640
17784
  * @throws {TypeError} If one of plugin's rules is malformed, or its `createOnce` method returns invalid visitor
17641
17785
  * @throws {TypeError} If `plugin.meta.name` is not a string
17642
17786
  */
17643
17787
  function registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) {
17644
- pluginName = getPluginName(plugin, pluginName, pluginNameIsAlias), workspaceUri !== null && switchWorkspace(workspaceUri);
17788
+ if (pluginName = getPluginName(plugin, pluginName, pluginNameIsAlias), workspaceUri !== null && switchWorkspace(workspaceUri), registeredPluginNames.has(pluginName)) throw Error(`Plugin name '${pluginName}' is already registered. Use a different name or an alias in \`jsPlugins\`.`);
17645
17789
  let offset = registeredRules.length, { rules } = plugin, ruleNames = ObjectKeys$1(rules), ruleNamesLen = ruleNames.length;
17646
17790
  for (let i = 0; i < ruleNamesLen; i++) {
17647
17791
  let ruleName = ruleNames[i], rule = rules[ruleName], fullRuleName = `${pluginName}/${ruleName}`, isFixable = !1, hasSuggestions = !1, messages = null, defaultOptions = DEFAULT_OPTIONS, schemaValidator = null, ruleMeta = rule.meta;
@@ -17691,7 +17835,7 @@ function registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) {
17691
17835
  }
17692
17836
  ObjectDefineProperty$2(ruleDetails.context, "id", { value: fullRuleName }), registeredRules.push(ruleDetails);
17693
17837
  }
17694
- return {
17838
+ return registeredPluginNames.add(pluginName), {
17695
17839
  name: pluginName,
17696
17840
  offset,
17697
17841
  ruleNames
@@ -17797,7 +17941,7 @@ function conformHookFn(hookFn, hookName) {
17797
17941
  return hookFn;
17798
17942
  }
17799
17943
  //#endregion
17800
- //#region ../../node_modules/.pnpm/eslint@10.7.0/node_modules/eslint/lib/shared/assert.js
17944
+ //#region ../../node_modules/.pnpm/eslint@10.8.0/node_modules/eslint/lib/shared/assert.js
17801
17945
  /**
17802
17946
  * @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
17803
17947
  * @author Josh Goldberg
@@ -18341,7 +18485,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18341
18485
  * Detect Electron renderer / nwjs process, which is node, but we should
18342
18486
  * treat as a browser.
18343
18487
  */
18344
- typeof process > "u" || process.type === "renderer" || process.browser === !0 || process.__nwjs ? module.exports = require_browser() : module.exports = require_node();
18488
+ module.exports = typeof process > "u" || process.type === "renderer" || process.browser === !0 || process.__nwjs ? require_browser() : require_node();
18345
18489
  })), require_debug_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18346
18490
  let debug = require_src()("eslint:code-path");
18347
18491
  /**
@@ -18394,7 +18538,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18394
18538
  * @param {boolean} leaving A flag whether or not it's leaving
18395
18539
  * @returns {void}
18396
18540
  */
18397
- dumpState: debug.enabled ? function(node, state, leaving) {
18541
+ dumpState: debug.enabled ? /* c8 ignore next */ function(node, state, leaving) {
18398
18542
  for (let i = 0; i < state.currentSegments.length; ++i) {
18399
18543
  let segInternal = state.currentSegments[i].internal;
18400
18544
  if (leaving) {
@@ -18409,10 +18553,10 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18409
18553
  * The DOT code can be visualized with Graphvis.
18410
18554
  * @param {CodePath} codePath A code path to dump.
18411
18555
  * @returns {void}
18412
- * @see http://www.graphviz.org
18556
+ * @see https://www.graphviz.org
18413
18557
  * @see http://www.webgraphviz.com
18414
18558
  */
18415
- dumpDot: debug.enabled ? function(codePath) {
18559
+ dumpDot: debug.enabled ? /* c8 ignore next */ function(codePath) {
18416
18560
  let text = "\ndigraph {\nnode[shape=box,style=\"rounded,filled\",fillcolor=white];\ninitial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
18417
18561
  codePath.returnedSegments.length > 0 && (text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n"), codePath.thrownSegments.length > 0 && (text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize=true];\n");
18418
18562
  let traceMap = Object.create(null), arrows = this.makeDotArrows(codePath, traceMap);
@@ -20051,10 +20195,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20051
20195
  case "ForOfStatement":
20052
20196
  parent.left === node ? state.makeForInOfLeft() : parent.right === node ? state.makeForInOfRight() : (assert(parent.body === node), state.makeForInOfBody());
20053
20197
  break;
20054
- case "AssignmentPattern":
20055
- parent.right === node && (state.pushForkContext(), state.forkBypassPath(), state.forkPath());
20056
- break;
20057
- default: break;
20198
+ case "AssignmentPattern": parent.right === node && (state.pushForkContext(), state.forkBypassPath(), state.forkPath());
20058
20199
  }
20059
20200
  }
20060
20201
  /**
@@ -20126,10 +20267,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20126
20267
  case "ForOfStatement":
20127
20268
  state.pushLoopContext(node.type, getLabel(node));
20128
20269
  break;
20129
- case "LabeledStatement":
20130
- breakableTypePattern.test(node.body.type) || state.pushBreakContext(!1, node.label.name);
20131
- break;
20132
- default: break;
20270
+ case "LabeledStatement": breakableTypePattern.test(node.body.type) || state.pushBreakContext(!1, node.label.name);
20133
20271
  }
20134
20272
  forwardCurrentToHead(analyzer, node), debug.dumpState(node, state, !1);
20135
20273
  }
@@ -20198,10 +20336,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20198
20336
  case "AssignmentPattern":
20199
20337
  state.popForkContext();
20200
20338
  break;
20201
- case "LabeledStatement":
20202
- breakableTypePattern.test(node.body.type) || state.popBreakContext();
20203
- break;
20204
- default: break;
20339
+ case "LabeledStatement": breakableTypePattern.test(node.body.type) || state.popBreakContext();
20205
20340
  }
20206
20341
  dontForward || forwardCurrentToHead(analyzer, node), debug.dumpState(node, state, !0);
20207
20342
  }
@@ -20228,10 +20363,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20228
20363
  case "StaticBlock":
20229
20364
  endCodePath();
20230
20365
  break;
20231
- case "CallExpression":
20232
- node.optional === !0 && node.arguments.length === 0 && CodePath.getState(analyzer.codePath).makeOptionalRight();
20233
- break;
20234
- default: break;
20366
+ case "CallExpression": node.optional === !0 && node.arguments.length === 0 && CodePath.getState(analyzer.codePath).makeOptionalRight();
20235
20367
  }
20236
20368
  isPropertyDefinitionValue(node) && endCodePath();
20237
20369
  }
@@ -23703,7 +23835,7 @@ function lintFileImpl(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJ
23703
23835
  let hasBOM = buffer[2147483574] === 1;
23704
23836
  setupSourceForFile(buffer, hasBOM), setSettingsForFile(settingsJSON), setGlobalsForFile(globalsJSON);
23705
23837
  for (let i = 0, len = ruleIds.length; i < len; i++) {
23706
- let ruleDetails = registeredRules[ruleIds[i]];
23838
+ let ruleId = ruleIds[i], ruleDetails = registeredRules[ruleId];
23707
23839
  ruleDetails.ruleIndex = i;
23708
23840
  let optionsId = optionsIds[i];
23709
23841
  OPTIONS_DESCRIPTOR.value = optionsId === 0 ? ruleDetails.defaultOptions : allOptions[optionsId], ObjectDefineProperty(ruleDetails.context, "options", OPTIONS_DESCRIPTOR);
@@ -23761,4 +23893,4 @@ function resetStateAfterError() {
23761
23893
  runAfterHooks(!1), finalizeCompiledVisitor(), resetCompiledVisitor(), diagnostics.length = 0, ancestors.length = 0, resetFile(), resetCfgWalk();
23762
23894
  }
23763
23895
  //#endregion
23764
- export { BLOCK_SIZE as _, loadPlugin as a, __commonJSMin as b, allOptions as c, diagnostics as d, replacePlaceholders as f, BLOCK_ALIGN as g, ACTIVE_SIZE as h, resetStateAfterError as i, setOptions as l, getNodeByRangeIndex as m, lintFile as n, registerPlugin as o, getLineColumnFromOffset as p, lintFileImpl as r, registeredRules as s, buffers as t, PLACEHOLDER_REGEX as u, BUFFER_SIZE as v, __toESM as x, DATA_POINTER_POS_32 as y };
23896
+ export { __toESM as S, BLOCK_ALIGN as _, loadPlugin as a, DATA_POINTER_POS_32 as b, registeredRules as c, PLACEHOLDER_REGEX as d, diagnostics as f, ACTIVE_SIZE as g, getNodeByRangeIndex as h, resetStateAfterError as i, allOptions as l, getLineColumnFromOffset as m, lintFile as n, registerPlugin as o, replacePlaceholders as p, lintFileImpl as r, registeredPluginNames as s, buffers as t, setOptions as u, BLOCK_SIZE as v, __commonJSMin as x, BUFFER_SIZE as y };